mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
[MIRROR] Port /datum/status_effect and convert wetness and fire stacks to it (#11666)
Co-authored-by: ShadowLarkens <shadowlarkens@gmail.com> Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
committed by
GitHub
parent
0000fce008
commit
9f292671ae
@@ -1,42 +0,0 @@
|
||||
// Ignition, but confined to the modifier system.
|
||||
// This makes it more predictable and thus, easier to balance.
|
||||
/datum/modifier/fire
|
||||
name = "on fire"
|
||||
desc = "You are on fire! You will be harmed until the fire goes out or you extinguish it with water."
|
||||
mob_overlay_state = "on_fire"
|
||||
|
||||
on_created_text = span_danger("You burst into flames!")
|
||||
on_expired_text = span_warning("The fire starts to fade.")
|
||||
stacks = MODIFIER_STACK_ALLOWED // Multiple instances will hurt a lot.
|
||||
var/damage_per_tick = 5
|
||||
|
||||
/datum/modifier/fire/intense
|
||||
mob_overlay_state = "on_fire_intense"
|
||||
damage_per_tick = 10
|
||||
|
||||
/datum/modifier/fire/tick()
|
||||
holder.inflict_heat_damage(damage_per_tick)
|
||||
|
||||
/datum/modifier/fire/weak
|
||||
damage_per_tick = 1
|
||||
|
||||
/*
|
||||
* Modifier used by projectiles, like the flamethrower, that rely heavily on fire_stacks to persist.
|
||||
*/
|
||||
|
||||
/datum/modifier/fire/stack_managed/tick()
|
||||
..()
|
||||
|
||||
if(!holder.fire_stacks || holder.fire_stacks < 0)
|
||||
if(prob(10))
|
||||
expire()
|
||||
|
||||
else if(holder.fire_stacks > 0)
|
||||
holder.fire_stacks -= 0.5
|
||||
|
||||
/datum/modifier/fire/stack_managed/intense
|
||||
mob_overlay_state = "on_fire_intense"
|
||||
damage_per_tick = 10
|
||||
|
||||
/datum/modifier/fire/stack_managed/weak
|
||||
damage_per_tick = 1
|
||||
Reference in New Issue
Block a user