hugbox rads (#48325)

This commit is contained in:
Tetr4
2019-12-21 16:55:02 +01:00
committed by AnturK
parent c680129aaa
commit 00fdcc3072
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -16,6 +16,11 @@ Ask ninjanomnom if they're around
#define RAD_OVERDOSE_REDUCTION 0.000001 // Coefficient to the reduction in applied rads once the thing, usualy mob, has too much radiation
// WARNING: This number is highly sensitive to change, graph is first for best results
#define RAD_BURN_THRESHOLD 1000 // Applied radiation must be over this to burn
//Holy shit test after you tweak anything it's said like 6 times in here
//You probably want to plot any tweaks you make so you can see the curves visually
#define RAD_BURN_LOG_BASE 1.1
#define RAD_BURN_LOG_GRADIENT 10000
#define RAD_BURN_CURVE(X) log(1+((X-RAD_BURN_THRESHOLD)/RAD_BURN_LOG_GRADIENT))/log(RAD_BURN_LOG_BASE)
#define RAD_MOB_SAFE 500 // How much stored radiation in a mob with no ill effects
+1 -1
View File
@@ -1038,7 +1038,7 @@
var/blocked = getarmor(null, "rad")
if(amount > RAD_BURN_THRESHOLD)
apply_damage(log(amount)*2, BURN, null, blocked)
apply_damage(RAD_BURN_CURVE(amount), BURN, null, blocked)
apply_effect((amount*RAD_MOB_COEFFICIENT)/max(1, (radiation**2)*RAD_OVERDOSE_REDUCTION), EFFECT_IRRADIATE, blocked)