In each HitDef that causes a status:
fall.envshake.ampl = 2 ;Sets the status type (given meaning in other code)
fall.envshake.freq = 50 ;Sets the status timer (in ticks)
At the top of each initial GetHit state (5000, 5010, 5020, 5030, 5070, 5080 to my knowledge):
[State 5000, Status Time]
type = VarSet
trigger1 = GetHitVar(fall.envshake.freq) > 0 ;If the move has a status time value
v = 5 ;Status time variable (determines how long to last)
value = GameTime + GetHitVar(fall.envshake.freq) ;Set to the move's value
[State 5000, Status Type]
type = VarSet
trigger1 = GetHitVar(fall.envshake.ampl) > 0 ;If the move has a status type value
v = 6 ;Status type variable (determines which status)
value = GetHitVar(fall.envshake.ampl) ;Set to the move's value
[State 5000, Burn Damage]
type = LifeAdd
trigger1 = time = 0 ;Only once during the animation
trigger1 = var(6) = 2 ;If the status is Burn
trigger1 = var(5) > GameTime ;If the timer is still running
value = -1 ;Deal 1 damage (increase the number for higher health)
absolute = 1 ;Always deal 1 (no scaling)
In State -2:
;---------------------------------------------------------------------------
; Burning Status Management
; The player is considered in Burn status if var6 = 2 and var5 > GameTime
[State -2, Burning Damage]
type = LifeAdd
trigger1 = var(6) = 2 ;Check status type
trigger1 = var(5) > GameTime ;Check status timer
trigger1 = (var(5) - GameTime)%10 = 0 ;Apply damage every 10 ticks
value = -1
[State -2, Burning Palette] ;Applies PalFX while in the Burn status
type = PalFX
trigger1 = var(6) = 2
trigger1 = GameTime > 0
trigger1 = var(5) > GameTime
trigger1 = (var(5) - GameTime)%10 = 0
time = -1
add = 100,-150,-200
mul = 256,256,256
sinadd = 40,80,40,10
invertall = 1
color = 0
ignorehitpause = 1
persistent = 1
;---------------------------------------------------------------------------
; Poison Status Management
; The player is considered in Poison status if var6 = 1 and var5 > GameTime
[State -2, Standard Poison Damage]
type = LifeAdd
trigger1 = var(6) = 1 ;Check status type
trigger1 = var(5) > GameTime ;Check status timer
trigger1 = (var(5) - GameTime)%5 = 0 ;Apply damage every 5 ticks
value = -1
[State -2, Standard Poison Palette] ;Applies PalFX while in the Poison status
type = PalFX
trigger1 = var(6) = 1
trigger1 = GameTime > 0
trigger1 = var(5) > GameTime
trigger1 = (var(5) - GameTime)%10 = 0
time = 10
add = 100,0,100
mul = 120,20,124
sinadd = 85,110,55,10
invertall = 1
color = 0
persistent = 1
;---------------------------------------------------------------------------
; Status Reset
; Resets all effects of status management once the time is up
[State -2, Reset Palette] ;Applies PalFX forcing the default palette to end the animation
type = PalFX
trigger1 = var(5) = GameTime
time = 10
add = 0,0,0
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256
[State -2, Reset State Type Identifier] ;Resets the status type variable to 0 to avoid accidents
type = VarSet
trigger1 = var(5) = GameTime
v = 6
value = 0