;======================================================================
;======================================================================
; -2/-3 states file for "Warakia_X"
;======================================================================
;======================================================================

[Statedef -2]

;----------------------------------------------------------------------
; HitSounds and HitEffects
;----------------------------------------------------------------------

;----------------------------------------------------------------------
; MoveContact detection

[State -2, MoveHitReset]
type = MoveHitReset
triggerall = MoveContact
triggerall = var(3) = 1
trigger1 = (StateNo = [200,430])
trigger2 = (StateNo = 600)
trigger3 = (StateNo = [1460,1469])
trigger4 = (StateNo = [1900,1920])
trigger5 = (StateNo = [700,710])
ignorehitpause = 1

[State -2, VarSet];MoveContact Detectcr
type = VarSet
trigger1 = MoveContact
var(3) = 2
ignorehitpause = 1

[State -2, VarSet];MoveContact Initializer
type = VarAdd
trigger1 = var(3) > 0
var(3) = -1
ignorehitpause = 1

[State -2, VarSet];HitFlag Reset
type = VarSet
trigger1 = MoveType != A
var(2) = 0
ignorehitpause = 1

[State -2, VarSet];Reverse Beat Flag Reset
type = VarSet
trigger1 = MoveType != A
var(4) = 0
ignorehitpause = 1

[State -2, VarAdd];HitCounter Addition
type = VarAdd
trigger1 = NumProjID(39999) > 0
fvar(1) = NumProjID(39999)
ignorehitpause = 1

;----------------------------------------------------------------------
; HitEffects Helper

[State -2, HitEffects]
type = Helper
trigger1 = MoveHit
trigger1 = var(1) = 1
helpertype = normal
name = "HitSpark"
postype = p2
pos = 0,-70
ownpal = 1
pausemovetime = 9999
supermovetime = 0
stateno = 30000
ID = 30000
size.xscale = 1
size.yscale = 1
ignorehitpause = 1

[State -2, HitEffects]
type = Helper
trigger1 = MoveHit
trigger1 = var(1) = 2
helpertype = normal
name = "HitSpark"
postype = p2
pos = 0,-60
ownpal = 1
pausemovetime = 9999
supermovetime = 0
stateno = 30000
ID = 30001
size.xscale = 1
size.yscale = 1
ignorehitpause = 1

[State -2, HitEffects]
type = Helper
trigger1 = MoveHit
trigger1 = var(1) = 3
helpertype = normal
name = "HitSpark"
postype = p2
pos = 0,-60
ownpal = 1
pausemovetime = 9999
supermovetime = 0
stateno = 30000
ID = 30005
size.xscale = 1
size.yscale = 1
ignorehitpause = 1

[State -2, HitEffects]
type = Helper
trigger1 = MoveHit
trigger1 = var(1) = 4
helpertype = normal
name = "HitSpark"
postype = p2
pos = 0,-10
ownpal = 1
pausemovetime = 9999
supermovetime = 0
stateno = 30000
ID = 30000
size.xscale = 1
size.yscale = 1
ignorehitpause = 1

[State -2, HitEffects]
type = Helper
trigger1 = MoveHit
trigger1 = var(1) = 5
helpertype = normal
name = "HitSpark"
postype = p2
pos = 0,-30
ownpal = 1
pausemovetime = 9999
supermovetime = 0
stateno = 30000
ID = 30001
size.xscale = 1
size.yscale = 1
ignorehitpause = 1

[State -2, HitEffects]
type = Helper
trigger1 = MoveHit
trigger1 = var(1) = 6
helpertype = normal
name = "HitSpark"
postype = p2
pos = 0,-10
ownpal = 1
pausemovetime = 9999
supermovetime = 0
stateno = 30000
ID = 30004
size.xscale = 1
size.yscale = 1
ignorehitpause = 1

[State -2, HitEffects]
type = Helper
trigger1 = MoveHit
trigger1 = var(1) = 7
helpertype = normal
name = "HitSpark"
postype = p2
pos = 0,-50
ownpal = 1
pausemovetime = 9999
supermovetime = 0
stateno = 30000
ID = 30000
size.xscale = 1
size.yscale = 1
ignorehitpause = 1

[State -2, HitEffects]
type = Helper
trigger1 = MoveHit
trigger1 = var(1) = 8
helpertype = normal
name = "HitSpark"
postype = p2
pos = 0,-60
ownpal = 1
pausemovetime = 9999
supermovetime = 0
stateno = 30000
ID = 30001
size.xscale = 1
size.yscale = 1
ignorehitpause = 1

[State -2, HitEffects]
type = Helper
trigger1 = MoveHit
trigger1 = var(1) = 9
helpertype = normal
name = "HitSpark"
postype = p2
pos = 0,-60
ownpal = 1
pausemovetime = 9999
supermovetime = 0
stateno = 30000
ID = 30005
size.xscale = 1
size.yscale = 1
ignorehitpause = 1

[State -2, HitEffects]
type = Helper
trigger1 = MoveHit
trigger1 = var(1) = 10
helpertype = normal
name = "HitSpark"
postype = p2
pos = 0,-80
ownpal = 1
pausemovetime = 9999
supermovetime = 0
stateno = 30000
ID = 30007
size.xscale = 1
size.yscale = 1
ignorehitpause = 1

;----------------------------------------------------------------------
; GuardEffect Helper

[State -2, GuardEffect]
type = Helper
trigger1 = MoveGuarded
trigger1 = var(1) = [1,3]
helpertype = normal
name = "GuardSpark"
postype = p2
pos = 0,-60
ownpal = 1
pausemovetime = 9999
supermovetime = 0
stateno = 30000
ID = 30009
size.xscale = 1
size.yscale = 1
ignorehitpause = 1

[State -2, GuardEffect]
type = Helper
trigger1 = MoveGuarded
trigger1 = var(1) = [4,6]
helpertype = normal
name = "GuardSpark"
postype = p2
pos = 0,-10
ownpal = 1
pausemovetime = 9999
supermovetime = 0
stateno = 30000
ID = 30009
size.xscale = 1
size.yscale = 1
ignorehitpause = 1

[State -2, GuardEffect]
type = Helper
trigger1 = MoveGuarded
trigger1 = var(1) = [7,9]
helpertype = normal
name = "GuardSpark"
postype = p2
pos = 0,-60
ownpal = 1
pausemovetime = 9999
supermovetime = 0
stateno = 30000
ID = 30009
size.xscale = 1
size.yscale = 1
ignorehitpause = 1

[State -2, GuardEffect]
type = Helper
trigger1 = MoveGuarded
trigger1 = var(1) = 10
helpertype = normal
name = "GuardSpark"
postype = p2
pos = 0,-70
ownpal = 1
pausemovetime = 9999
supermovetime = 0
stateno = 30000
ID = 30009
size.xscale = 1
size.yscale = 1
ignorehitpause = 1

;----------------------------------------------------------------------
; HitSounds / GuardSounds - for Player

[State -2, HitSounds]
type = PlaySnd
trigger1 = NumHelper(30000) > 0
value = s1,100
channel = 1
ignorehitpause = 1

[State -2, HitSounds]
type = PlaySnd
trigger1 = NumHelper(30001) > 0
value = s1,101
channel = 1
ignorehitpause = 1

[State -2, HitSounds]
type = PlaySnd
trigger1 = NumHelper(30002) > 0
value = s1,102
channel = 1
ignorehitpause = 1

[State -2, HitSounds]
type = PlaySnd
trigger1 = NumHelper(30003) > 0
value = s1,103
channel = 1
ignorehitpause = 1

[State -2, HitSounds]
type = PlaySnd
trigger1 = NumHelper(30004) > 0
value = s1,104
channel = 1
ignorehitpause = 1

[State -2, HitSounds]
type = PlaySnd
trigger1 = NumHelper(30005) > 0
value = s1,105
channel = 1
ignorehitpause = 1

[State -2, HitSounds]
type = PlaySnd
trigger1 = NumHelper(30006) > 0
value = s1,106
channel = 1
ignorehitpause = 1

[State -2, HitSounds]
type = PlaySnd
trigger1 = NumHelper(30007) > 0
value = s1,107
channel = 1
ignorehitpause = 1

[State -2, HitSounds]
type = PlaySnd
trigger1 = NumHelper(30008) > 0
value = s1,8
channel = 1
ignorehitpause = 1

[State -2, GuardSounds]
type = PlaySnd
trigger1 = NumHelper(30009) > 0
value = s1,9
channel = 6
ignorehitpause = 1

[State -2, HitSounds]
type = PlaySnd
trigger1 = NumHelper(30010) > 0
value = s21,0
channel = 1
ignorehitpause = 1

[State -2, HitSounds]
type = PlaySnd
trigger1 = NumHelper(30011) > 0
value = s21,1
channel = 1
ignorehitpause = 1

[State -2, HitSounds]
type = PlaySnd
trigger1 = NumHelper(30012) > 0
value = s21,2
channel = 1
ignorehitpause = 1

[State -2, HitSounds]
type = PlaySnd
trigger1 = NumHelper(30013) > 0
value = s21,3
channel = 1
ignorehitpause = 1

[State -2, HitSounds]
type = PlaySnd
trigger1 = NumHelper(30014) > 0
value = s21,4
channel = 1
ignorehitpause = 1

[State -2, HitSounds]
type = PlaySnd
trigger1 = NumHelper(30015) > 0
value = s21,5
channel = 1
ignorehitpause = 1

[State -2, GuardSounds]
type = PlaySnd
trigger1 = NumHelper(30016) > 0
value = s21,6
channel = 6
ignorehitpause = 1

[State -2, HitSounds]
type = PlaySnd
trigger1 = NumHelper(30017) > 0
value = s21,7
channel = 1
ignorehitpause = 1

;----------------------------------------------------------------------
; HitSounds / GuardSounds - for Helper

[State -2, HitSounds]
type = PlaySnd
trigger1 = NumProjID(31000) > 0
value = s1,100
channel = 1
ignorehitpause = 1

[State -2, HitSounds]
type = PlaySnd
trigger1 = NumProjID(31001) > 0
value = s1,101
channel = 1
ignorehitpause = 1

[State -2, HitSounds]
type = PlaySnd
trigger1 = NumProjID(31002) > 0
value = s1,102
channel = 1
ignorehitpause = 1

[State -2, HitSounds]
type = PlaySnd
trigger1 = NumProjID(31003) > 0
value = s1,103
channel = 1
ignorehitpause = 1

[State -2, HitSounds]
type = PlaySnd
trigger1 = NumProjID(31004) > 0
value = s1,104
channel = 1
ignorehitpause = 1

[State -2, HitSounds]
type = PlaySnd
trigger1 = NumProjID(31005) > 0
value = s1,105
channel = 1
ignorehitpause = 1

[State -2, HitSounds]
type = PlaySnd
trigger1 = NumProjID(31006) > 0
value = s1,106
channel = 1
ignorehitpause = 1

[State -2, HitSounds]
type = PlaySnd
trigger1 = NumProjID(31007) > 0
value = s1,107
channel = 1
ignorehitpause = 1

[State -2, HitSounds]
type = PlaySnd
trigger1 = NumProjID(31008) > 0
value = s1,8
channel = 1
ignorehitpause = 1

[State -2, GuardSounds]
type = PlaySnd
trigger1 = NumProjID(31009) > 0
value = s1,9
channel = 6
ignorehitpause = 1

[State -2, HitSounds]
type = PlaySnd
trigger1 = NumProjID(31010) > 0
value = s21,0
channel = 1
ignorehitpause = 1

[State -2, HitSounds]
type = PlaySnd
trigger1 = NumProjID(31011) > 0
value = s21,1
channel = 1
ignorehitpause = 1

[State -2, HitSounds]
type = PlaySnd
trigger1 = NumProjID(31012) > 0
value = s21,2
channel = 1
ignorehitpause = 1

[State -2, HitSounds]
type = PlaySnd
trigger1 = NumProjID(31013) > 0
value = s21,3
channel = 1
ignorehitpause = 1

[State -2, HitSounds]
type = PlaySnd
trigger1 = NumProjID(31014) > 0
value = s21,4
channel = 1
ignorehitpause = 1

[State -2, HitSounds]
type = PlaySnd
trigger1 = NumProjID(31015) > 0
value = s21,5
channel = 1
ignorehitpause = 1

[State -2, GuardSounds]
type = PlaySnd
trigger1 = NumProjID(31016) > 0
value = s21,6
channel = 6
ignorehitpause = 1

[State -2, HitSounds]
type = PlaySnd
trigger1 = NumProjID(31017) > 0
value = s21,7
channel = 1
ignorehitpause = 1

;----------------------------------------------------------------------
; Other Sounds

[State -2, Sounds];Critical Report
type = PlaySnd
trigger1 = NumProjID(32000) > 0
value = s3,9
channel = 3
ignorehitpause = 1
abspan = 1

[State -2, Sounds];Fumble Code(Butterfly Effect)
type = PlaySnd
trigger1 = NumProjID(32001) > 0
value = s3,4
channel = 3
ignorehitpause = 1
abspan = 1

[State -2, Sounds];Misaka Shiori - ICE
type = PlaySnd
trigger1 = NumProjID(32002) > 0
value = s22,8
channel = 3
ignorehitpause = 1
abspan = 1

[State -2, Sounds];Misaka Shiori - ICE_NEEDLE
type = PlaySnd
trigger1 = NumProjID(32003) > 0
value = s23,11
channel = 3
ignorehitpause = 1

[State -2, PlaySnd];Wire Damage
type = PlaySnd
triggerall = P2MoveType = H
triggerall = NumHelper(310) = 0
trigger1 = P2StateNo = 60002
value = s2,4
supermovetime = 0
pausemovetime = 0

;----------------------------------------------------------------------
; Movement in the air
;----------------------------------------------------------------------

;----------------------------------------------------------------------
; Air Jump / Air Dash

[State -2, VarSet];Air Jump flag initialize
type = VarSet
trigger1 = StateType != A
var(5) = 0

[State -2, VarSet];Air Dash flag initialize
type = VarSet
trigger1 = StateType != A
var(7) = 0

[State -2, VarSet];Holdup detector
type = VarAdd
trigger1 = command = "holdup"
var(6) = 1

[State -2, VarSet];Holdup flag initialize
type = VarSet
trigger1 = command != "holdup"
var(6) = 0

[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = StateType != A
ID = 10543

;----------------------------------------------------------------------
; Initializing
;----------------------------------------------------------------------

[State -2, VarSet];Initialize Night on the Blood Lier Hit flag
type = VarSet
trigger1 = MoveType != A
var(9) = 0
ignorehitpause = 1

[State -2, VarSet];Initialize Replica Sion Hit flag
type = VarSet
trigger1 = P2MoveType != H
var(10) = 0
ignorehitpause = 1

[State -2, VarSet];Initialize Force Romantic Cancel flag
type = VarSet
trigger1 = MoveType != A
var(11) = 0
ignorehitpause = 1

;----------------------------------------------------------------------
; Calculation of AttackMulset
;----------------------------------------------------------------------

[State -2, AttackMulSet]
type = AttackMulSet
trigger1 = 1
value = fvar(0)
ignorehitpause = 1

[State -2, VarSet];AttackMulSet
type = VarSet
trigger1 = 1
fvar(0) = fvar(2) * fvar(3) * fvar(4)
ignorehitpause = 1

;----------------------------------------------------------------------
; HitCount initialize

[State -2, VarSet];Hitcount initialize
type = VarSet
trigger1 = P2MoveType != H
fvar(1) = 0
ignorehitpause = 1

;----------------------------------------------------------------------
; AttackMulSet - HitCount

[State -2, VarSet]
type = VarSet
trigger1 = fvar(1) < 32
fvar(2) = 1.00 - 0.03125*fvar(1)
ignorehitpause = 1

[State -2, VarSet]
type = VarSet
trigger1 = fvar(1) > 31
fvar(2) = 0.03125
ignorehitpause = 1

;----------------------------------------------------------------------
; AttackMulSet - P2StateType

[State -2, VarSet]
type = VarSet
trigger1 = P2StateType = S
fvar(3) = 1.0
ignorehitpause = 1

[State -2, VarSet]
type = VarSet
trigger1 = P2StateType = C
fvar(3) = 1.08
ignorehitpause = 1

[State -2, VarSet]
type = VarSet
trigger1 = P2StateType = A
fvar(3) = 0.88
ignorehitpause = 1

;----------------------------------------------------------------------
; AttackMulSet - Life

[State -2, VarSet]
type = VarSet
trigger1 = ceil(Life*100/LifeMax) = [76,100]
fvar(4) = 1.0
ignorehitpause = 1

[State -2, VarSet]
type = VarSet
trigger1 = ceil(Life*100/LifeMax) = [51,75]
fvar(4) = 1.0
ignorehitpause = 1

[State -2, VarSet]
type = VarSet
trigger1 = ceil(Life*100/LifeMax) = [26,50]
fvar(4) = 1.05
ignorehitpause = 1

[State -2, VarSet]
type = VarSet
trigger1 = ceil(Life*100/LifeMax) = [0,25]
fvar(4) = 1.10
ignorehitpause = 1

;----------------------------------------------------------------------
; Calculation of DefenceMulset
;----------------------------------------------------------------------

[State -2, DefenceMulSet]
type = DefenceMulSet
trigger1 = 1
value = fvar(20)
ignorehitpause = 1

[State -2, VarSet];DefenceMulSet
type = VarSet
trigger1 = 1
fvar(20) = fvar(21)
ignorehitpause = 1

;----------------------------------------------------------------------
; DefenceMulSet - Life

[State -2, VarSet]
type = VarSet
trigger1 = ceil(Life*100/LifeMax) = [76,100]
fvar(21) = 1.1
ignorehitpause = 1

[State -2, VarSet]
type = VarSet
trigger1 = ceil(Life*100/LifeMax) = [51,75]
fvar(21) = 0.968
ignorehitpause = 1

[State -2, VarSet]
type = VarSet
trigger1 = ceil(Life*100/LifeMax) = [26,50]
fvar(21) = 0.843
ignorehitpause = 1

[State -2, VarSet]
type = VarSet
trigger1 = ceil(Life*100/LifeMax) = [0,25]
fvar(21) = 0.725
ignorehitpause = 1

;----------------------------------------------------------------------
; HEAT / MAX / BLOOD HEAT
;----------------------------------------------------------------------
;
;var(12) 	- Alternate Power
;var(13)	- Interrupt
;var(14) 	- Distionction Status <NONE(0) / HEAT(1) / MAX(2) / MAX_RECOVER(3) / BLOOD HEAT(4) / UNLIMITED!(5)>
;var(15)	- Alternate Vital Source

;----------------------------------------------------------------------
; PowerSet

[State -2, PowerSet]
type = PowerSet
trigger1 = var(14) != 0
trigger1 = var(12) > 0
value = var(12)
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999

[State -2, VarSet];Correction
type = VarSet
trigger1 = var(12) < 0
var(12) = 0
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999

[State -2, VarSet];Set Power
type = VarSet
trigger1 = Power = PowerMax
trigger2 = var(14) = 5
var(12) = PowerMax
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999

[State -2, VarSet];UNLIMITED!
type = Null;VarSet
trigger1 = 1
var(14) = 5
ignorehitpause = 1

[State -2, VarSet];Set Status - MAX
type = VarSet
trigger1 = Power = PowerMax
trigger1 = var(14) != 5
var(14) = 2
ignorehitpause = 1

[State -2, VarAdd];Decrease Power - HEAT / MAX
type = VarAdd
trigger1 = var(12) > 0
trigger1 = var(13) = 0
trigger1 = var(14) = [1,2]
trigger1 = NumHelper(310) = 0
var(12) = -5
ignorehitpause = 1
supermovetime = 0
pausemovetime = 0

[State -2, VarAdd];Decrease Power - BLOOD HEAT
type = VarAdd
trigger1 = var(12) > 0
trigger1 = var(13) = 0
trigger1 = var(14) = 4
trigger1 = NumHelper(310) = 0
var(12) = -5
ignorehitpause = 1
supermovetime = 0
pausemovetime = 0

[State -2, VarAdd];Decrease Power - <Interrupt> on HEAT / MAX
type = VarAdd
trigger1 = var(12) > 0
trigger1 = var(13) != 0
trigger1 = var(14) = [1,2]
var(12) = var(13)
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999

[State -2, VarAdd];Decrease Power - <Interrupt> on BLOOD HEAT
type = VarAdd
trigger1 = var(12) > 0
trigger1 = var(13) != 0
trigger1 = var(14) = 4
var(12) = ceil(var(13)/2)
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999

;----------------------------------------------------------------------
; Change Status

[State -2, VarSet];HEAT to NONE
type = VarSet
trigger1 = var(12) = 0	;Power = 0
trigger1 = var(14) = 1	;Status = MAX
var(14) = 0
ignorehitpause = 1

[State -2, VarSet];MAX to MAX_RECOVER
type = VarSet
trigger1 = var(12) = 0	;Power = 0
trigger1 = var(14) = 2	;Status = MAX
var(14) = 3
ignorehitpause = 1

[State -2, VarSet];BLOODHEAT to NONE
type = VarSet
trigger1 = var(12) = 0	;Power = 0
trigger1 = var(14) = 4	;Status = BLOOD HEAT
var(14) = 0
ignorehitpause = 1

;----------------------------------------------------------------------
; MAX_RECOVER

[State -2, VarSet];MAX_RECOVER
type = VarSet
trigger1 = var(14) = 3
var(12) = 2000
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999

[State -2, VarSet];MAX_RECOVER to NONE
type = VarSet
trigger1 = var(14) = 3
trigger1 = Power >= 2000
var(14) = 0
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999

;----------------------------------------------------------------------
; Life Regain

[State -2, LifeAdd];HEAT Life Recover
type = LifeAdd
triggerall = RoundState = 2
triggerall = Alive
triggerall = GameTime % 2 = 0
triggerall = MoveType != H
triggerall = var(14) = 1
trigger1 = var(15) > 0
value = 1
ignorehitpause = 1

[State -2, LifeAdd];HEAT Life Recover - Variable
type = VarAdd
triggerall = RoundState = 2
triggerall = Alive
triggerall = GameTime % 2 = 0
triggerall = MoveType != H
trigger1 = var(14) = 1
trigger1 = var(15) > 0
var(15) = -1
ignorehitpause = 1

[State -2, LifeAdd];BLOOD HEAT Life Recover
type = LifeAdd
triggerall = RoundState = 2
triggerall = Alive
triggerall = GameTime % 2 = 0
triggerall = MoveType != H
triggerall = var(14) = 4
trigger1 = var(15) > 0
value = 3
ignorehitpause = 1

[State -2, LifeAdd];BLOOD HEAT Life Recover - Variable
type = VarAdd
triggerall = RoundState = 2
triggerall = Alive
triggerall = GameTime % 2 = 0
triggerall = MoveType != H
triggerall = var(14) = 4
trigger1 = var(15) > 0
var(15) = -2
ignorehitpause = 1

[State -2, VarSet];HEAT Life Recover - Variable <Initialize>
type = VarSet
trigger1 = var(14) = 0
var(15) = 0
ignorehitpause = 1

[State -2, VarSet];Set Power
type = VarSet
trigger1 = var(14) = 0
var(12) = Power
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999

;----------------------------------------------------------------------
; AfterImage

[State -2, Helper]
type = Helper
triggerall = NumHelper(32000) = 0
triggerall = var(14) = [1,2]
trigger1 = MoveType = H && stateno = [120,155]
trigger2 = MoveType = H && stateno = [5000,5150]
trigger3 = MoveType != H
helpertype = normal
name = "AfterImage_Layer1"
ID = 32000
stateno = 32000
ownpal = 1
supermovetime = 9999
pausemovetime = 9999
ignorehitpause = 1
size.xscale = 1.025
size.yscale = 1.025

[State -2, Helper]
type = Helper
triggerall = NumHelper(32001) = 0
triggerall = var(14) = [1,2]
trigger1 = MoveType = H && stateno = [120,155]
trigger2 = MoveType = H && stateno = [5000,5150]
trigger3 = MoveType != H
helpertype = normal
name = "AfterImage_Layer2"
ID = 32001
stateno = 32001
ownpal = 1
supermovetime = 9999
pausemovetime = 9999
ignorehitpause = 1
size.xscale = 1.05
size.yscale = 1.05

[State -2, Helper]
type = Helper
triggerall = NumHelper(32010) = 0
triggerall = (var(14) = 4) || (var(14) = 5)
trigger1 = MoveType = H && stateno = [120,155]
trigger2 = MoveType = H && stateno = [5000,5150]
trigger3 = MoveType != H
helpertype = normal
name = "AfterImage_Layer1"
ID = 32010
stateno = 32010
ownpal = 1
supermovetime = 9999
pausemovetime = 9999
ignorehitpause = 1
:x
size.yscale = 1.025

[State -2, Helper]
type = Helper
triggerall = NumHelper(32011) = 0
triggerall = (var(14) = 4) || (var(14) = 5)
trigger1 = MoveType = H && stateno = [120,155]
trigger2 = MoveType = H && stateno = [5000,5150]
trigger3 = MoveType != H
helpertype = normal
name = "AfterImage_Layer2"
ID = 32011
stateno = 32011
ownpal = 1
supermovetime = 9999
pausemovetime = 9999
ignorehitpause = 1
size.xscale = 1.05
size.yscale = 1.05

;----------------------------------------------------------------------
; HEAT GAUGE

[State -2, Explod];Gauge - Frame
type = Explod
trigger1 = NumExplod(34000) = 0
anim = 34000
ID = 34000
pos = ifelse(TeamSide = 1,11,206),210
postype = Left
bindtime = -1
removetime = -1
ownpal = 1
ontop = 0
sprpriority = 3
facing = 1
pausemovetime = 999999
supermovetime = 999999
scale = 1,1

[State -2, Explod];Gauge - Bar <Normal>
type = Explod
triggerall = NumExplod(34001) = 0
triggerall = var(12) = [0,1999]
trigger1 = var(14) = 0
trigger2 = var(14) = 3
anim = 34001
ID = 34001
pos = ifelse(TeamSide = 1,13,308),212
postype = Left
bindtime = -1
removetime = -1
ownpal = 1
ontop = 0
sprpriority = 4
facing = ifelse(TeamSide = 1,1,-1)
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];Gauge - Bar <Lv.2>
type = Explod
triggerall = NumExplod(34002) = 0
triggerall = var(12) = [2000,2999]
trigger1 = var(14) = 0
trigger2 = var(14) = 3
anim = 34002
ID = 34002
pos = ifelse(TeamSide = 1,13,308),212
postype = Left
bindtime = -1
removetime = -1
ownpal = 1
ontop = 0
sprpriority = 4
facing = ifelse(TeamSide = 1,1,-1)
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];Gauge - Bar <HEAT>
type = Explod
triggerall = NumExplod(34003) = 0
trigger1 = var(14) = 1
anim = 34003
ID = 34003
pos = ifelse(TeamSide = 1,13,308),212
postype = Left
bindtime = -1
removetime = -1
ownpal = 1
ontop = 0
sprpriority = 4
facing = ifelse(TeamSide = 1,1,-1)
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];Gauge - TEXT <HEAT>
type = Explod
triggerall = NumExplod(34013) = 0
trigger1 = var(14) = 1
anim = 34012
ID = 34013
pos = ifelse(TeamSide = 1,85,204),215
postype = Left
bindtime = -1
removetime = -1
ownpal = 1
ontop = 0
sprpriority = 5
facing = 1
pausemovetime = 999999
supermovetime = 999999
scale = 0.5,0.5

[State -2, Explod];Gauge - Bar <MAX>
type = Explod
triggerall = NumExplod(34004) = 0
trigger1 = var(14) = 2
anim = 34003
ID = 34004
pos = ifelse(TeamSide = 1,13,308),212
postype = Left
bindtime = -1
removetime = -1
ownpal = 1
ontop = 0
sprpriority = 4
facing = ifelse(TeamSide = 1,1,-1)
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];Gauge - TEXT <MAX>
type = Explod
triggerall = NumExplod(34014) = 0
trigger1 = var(14) = 2
anim = 34013
ID = 34014
pos = ifelse(TeamSide = 1,85,204),213
postype = Left
bindtime = -1
removetime = -1
ownpal = 1
ontop = 0
sprpriority = 5
facing = 1
pausemovetime = 999999
supermovetime = 999999
scale = 0.5,0.5

[State -2, Explod];Gauge - Bar <BLOOD HEAT>
type = Explod
triggerall = NumExplod(34005) = 0
trigger1 = var(14) = 4
anim = 34004
ID = 34005
pos = ifelse(TeamSide = 1,13,308),212
postype = Left
bindtime = -1
removetime = -1
ownpal = 1
ontop = 0
sprpriority = 4
facing = ifelse(TeamSide = 1,1,-1)
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];Gauge - TEXT <BLOOD HEAT>
type = Explod
triggerall = NumExplod(34015) = 0
trigger1 = var(14) = 4
anim = 34014
ID = 34015
pos = ifelse(TeamSide = 1,10,246),210
postype = Left
bindtime = -1
removetime = -1
ownpal = 1
ontop = 0
sprpriority = 5
facing = 1
pausemovetime = 999999
supermovetime = 999999
scale = 0.5,0.5

[State -2, Explod];Gauge - Bar <UNLIMITED!>
type = Explod
triggerall = NumExplod(34006) = 0
trigger1 = var(14) = 5
anim = 34004
ID = 34006
pos = ifelse(TeamSide = 1,13,308),212
postype = Left
bindtime = -1
removetime = -1
ownpal = 1
ontop = 0
sprpriority = 4
facing = ifelse(TeamSide = 1,1,-1)
pausemovetime = 999999
supermovetime = 999999

[State -2, Explod];Gauge - TEXT <UNLIMITED!>
type = Explod
triggerall = NumExplod(34016) = 0
trigger1 = var(14) = 5
anim = 34010
ID = 34016
pos = ifelse(TeamSide = 1,10,260),210
postype = Left
bindtime = -1
removetime = -1
ownpal = 1
ontop = 0
sprpriority = 5
facing = 1
pausemovetime = 999999
supermovetime = 999999
scale = 0.5,0.5

;----------------------------------------------------------------------
; HEAT GAUGE

[State -2, ModifyExplod]
type = ModifyExplod
triggerall = NumExplod(34001) = 1
trigger1 = var(14) = 0
trigger2 = var(14) = 3
ID = 34001
scale = fvar(25)/100,1

[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = var(14) = 1
trigger2 = var(14) = 2
trigger3 = var(14) = 4
trigger4 = var(12) > 1999
ID = 34001
ignorehitpause = 1

[State -2, ModifyExplod]
type = ModifyExplod
triggerall = NumExplod(34002) = 1
trigger1 = var(14) = 0
trigger2 = var(14) = 3
ID = 34002
scale = fvar(25)/100,1

[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = var(14) = 1
trigger2 = var(14) = 2
trigger3 = var(14) = 4
trigger4 = var(12) < 2000
ID = 34002
ignorehitpause = 1

[State -2, ModifyExplod]
type = ModifyExplod
triggerall = NumExplod(34003) = 1
trigger1 = var(14) = 1
ID = 34003
scale = fvar(25)/100,1

[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = var(14) != 1
ID = 34003
ignorehitpause = 1

[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = var(14) != 1
ID = 34013
ignorehitpause = 1

[State -2, ModifyExplod]
type = ModifyExplod
triggerall = NumExplod(34004) = 1
trigger1 = var(14) = 2
ID = 34004
scale = fvar(25)/100,1

[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = var(14) != 2
ID = 34004
ignorehitpause = 1

[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = var(14) != 2
ID = 34014
ignorehitpause = 1

[State -2, ModifyExplod]
type = ModifyExplod
triggerall = NumExplod(34005) = 1
trigger1 = var(14) = 4
ID = 34005
scale = fvar(25)/100,1

[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = var(14) != 4
ID = 34005
ignorehitpause = 1

[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = var(14) != 4
ID = 34015
ignorehitpause = 1

[State -2, VarSet]
type = VarSet
trigger1 = 1
fvar(25) = ceil(var(12)*100/PowerMax)
ignorehitpause = 1

[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = var(14) != 5
ID = 34006
ignorehitpause = 1

[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = var(14) != 5
ID = 34016
ignorehitpause = 1

;----------------------------------------------------------------------
; Replicant Selector
;----------------------------------------------------------------------

[State -2, VarSet];Select replica command of "63214+A"
type = VarSet
trigger1 = 1
var(40) = 11300
ignorehitpause = 1

[State -2, VarSet];Select replica command of "63214+B"
type = VarSet
trigger1 = 1
var(41) = 11310
ignorehitpause = 1

[State -2, VarSet];Select replica command of "63214+C"
type = VarSet
trigger1 = 1
var(42) = 11320
ignorehitpause = 1

[State -2, VarSet];Select replica command of "41236+A"
type = VarSet
trigger1 = 1
var(43) = 11500
ignorehitpause = 1

[State -2, VarSet];Select replica command of "41236+B"
type = VarSet
trigger1 = 1
var(44) = 11510
ignorehitpause = 1

[State -2, VarSet];Select replica command of "41236+C"
type = VarSet
trigger1 = 1
var(45) = 11520
ignorehitpause = 1

;----------------------------------------------------------------------
; Special Features
;----------------------------------------------------------------------

;----------------------------------------------------------------------
; Poison Damage for Arcana Heart Characters by Drowin

[State -2, PowerAdd]
type = PowerAdd
triggerall = Enemy,AuthorName = "Drowin arcana"
triggerall = Enemy,fvar(20) > 0
trigger1 = Power > 0
value = -1

[State -2, LifeAdd]
type = LifeAdd
triggerall = Enemy,AuthorName = "Drowin arcana"
triggerall = Enemy,fvar(20) > 0
trigger1 = GameTime % 7 = 0
value = -1
kill = 0

[State -2, PalFX]
type = PalFX
triggerall = Enemy,AuthorName = "Drowin arcana"
trigger1 = Enemy,fvar(20) > 0
add = 100,0,110
mul = 220,220,220
time = 5

;----------------------------------------------------------------------
; Fire Damage for Akiha Vermilion by 9

[State -2, LifeAdd]
type = LifeAdd
triggerAll = Enemy,AuthorName = "‡H" && Enemy,Name = "Akiha_Vermilion"
trigger1 = Enemy,var(47) = 1
value = -5
kill = 0

[State -2, PowerAdd]
type = PowerAdd
triggerAll = Enemy,AuthorName = "‡H" && Enemy,Name = "Akiha_Vermilion"
trigger1 = Enemy,var(47) = 1
value = -26

;----------------------------------------------------------------------
; Debug

[State -3, DisplayToClipBoard]
type = DisplayToClipBoard
trigger1 = 1
text = "P2Dist Y = %f v56 = %d PrevStateNo = %d"
params = P2Dist Y,var(56),PrevStateNo
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999
