; _________________________________________
;| B.B. Hood by Jmorphman                  |
; ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
;==============================================================================================
;========================================<SPECIAL MOVES>=======================================
;==============================================================================================

;========================<SMILE & MISSILE>=============================
[StateDef 1000]
type = S
physics = N
moveType = A
anim = 1000
ctrl = 0
velSet = ifElse((PrevStateNo = [100,105]) && var(20), vel x, 0), 0
sprPriority = 1
powerAdd = 0
faceP2 = ifElse((PrevStateNo = [100,105]), 0, 1)

[State 1000, Button Detect]
type = VarSet
trigger1 = !Time && !AILevel
;ifElse((command = "z" || command = "rlsz"), 2, ifElse((command = "y" || command = "rlsy"), 1, 0))
var(10) = ifElse((NumExplod(90000220) || NumExplod(90000225)), 2, ifElse((NumExplod(90000210) || NumExplod(90000215)), 1, 0))

[State 1000, Button Detect (AI)]
type = VarSet
trigger1 = !Time && AILevel
var(10) = ifElse((P2MoveType = H || Random < 500), 2, ifElse(Random < 500, 1, 0))

[State 1000, Voice]
type = PlaySnd
trigger1 = AnimElem = 7
value = 1000,0
channel = 0

[State 1000, Missile sound effect]
type = PlaySnd
trigger1 = AnimElem = 7
value = 1000,1
channel = 1

[State 1000, Muzzle Flash (Top layer)]
type = Explod
trigger1 = AnimElem = 7
anim = 1003
ID = 1003
sprPriority = 5
posType = P1
scale = const(size.xScale) * 0.5, 0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1000, Muzzle Exhaust (Top layer)]
type = Explod
trigger1 = AnimElem = 7
anim = 11003
ID = 11003
sprPriority = 5
posType = P1
scale = const(size.xScale) * 0.5, 0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1000, Muzzle Flash (Bottom layer)]
type = Explod
trigger1 = AnimElem = 7
anim = 1004
ID = 1004
sprPriority = 5
posType = P1
scale = const(size.xScale) * 0.5, 0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1000, Muzzle Exhaust (Bottom layer)]
type = Explod
trigger1 = AnimElem = 7
anim = 11004
ID = 11004
sprPriority = 5
posType = P1
scale = const(size.xScale) * 0.5, 0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1000, Muzzle Exhaust (Back, top layer)]
type = Explod
trigger1 = AnimElem = 8
anim = 21003
ID = 21003
sprPriority = 0
posType = P1
scale = const(size.xScale) * 0.5, 0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1000, Muzzle Exhaust (Back, bottom layer)]
type = Explod
trigger1 = AnimElem = 8
anim = 21004
ID = 21004
sprPriority = 0
posType = P1
scale = const(size.xScale) * 0.5, 0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1000, Projectile]
type = Helper
trigger1 = AnimElem = 8
helperType = Normal
stateNo = 1005
ID = 1005
name = "Smile & Missile Projectile"
posType = P1
pos = ceil(30 * const(size.xScale)), -67
size.xScale = const(size.xScale)
size.yScale = 1
ownPal = 1

[State 1000, Width]
type = Width
trigger1 = AnimElemTime(8) = -1
value = 30,0

[State 1000, ChangeState]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1



;========================<ES SMILE & MISSILE>=============================
[StateDef 1030]
type = S
physics = N
moveType = A
anim = 1000
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = -1000
faceP2 = ifElse((PrevStateNo = [100,106]), 0, 1)

[State 1030, ES Flash]
type = VarSet
trigger1 = !Time
var(25) = 28

[State 1030, ES FX]
type = Explod
trigger1 = !Time
anim = 8210
sprPriority = 3
posType = p1
pos = ceil(26 * const(size.xScale)), -67
scale = 0.5, 0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

[State 1030, ES Startup Sound]
type = PlaySnd
trigger1 = !Time
value = 0,1000
channel = 1

[State 1030, Voice]
type = PlaySnd
trigger1 = AnimElem = 7
value = 1030,0
channel = 0

[State 1030, Missile sound effect]
type = PlaySnd
trigger1 = AnimElem = 7
value = 1000,1
channel = 3

[State 1030, Muzzle Flash (Top layer)]
type = Explod
trigger1 = AnimElem = 7
anim = 1003
ID = 1003
sprPriority = 5
posType = P1
scale = const(size.xScale) * 0.5, 0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1030, Muzzle Exhaust (Top layer)]
type = Explod
trigger1 = AnimElem = 7
anim = 11003
ID = 11003
sprPriority = 5
posType = P1
scale = const(size.xScale) * 0.5, 0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1030, Muzzle Flash (Bottom layer)]
type = Explod
trigger1 = AnimElem = 7
anim = 1004
ID = 1004
sprPriority = 5
posType = P1
scale = const(size.xScale) * 0.5, 0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1030, Muzzle Exhaust (Bottom layer)]
type = Explod
trigger1 = AnimElem = 7
anim = 11004
ID = 11004
sprPriority = 5
posType = P1
scale = const(size.xScale) * 0.5, 0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1030, Muzzle Exhaust (Back, top layer)]
type = Explod
trigger1 = AnimElem = 8
anim = 21003
ID = 21003
sprPriority = 0
posType = P1
scale = const(size.xScale) * 0.5, 0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1030, Muzzle Exhaust (Back, bottom layer)]
type = Explod
trigger1 = AnimElem = 8
anim = 21004
ID = 21004
sprPriority = 0
posType = P1
scale = const(size.xScale) * 0.5, 0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1030, Projectile]
type = Helper
trigger1 = AnimElem = 8
helperType = Normal
stateNo = 1035
ID = 1035
name = "ES Smile & Missile Projectile"
posType = P1
pos = ceil(30 * const(size.xScale)), -67
size.xScale = 0.504 * const(size.xScale)
size.yScale = 0.324
ownPal = 1

[State 1030, Width]
type = Width
trigger1 = AnimElemTime(8) = -1
value = 30,0

[State 1030, End]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1



;========================<SMILE & MISSILE (LOW)>=============================
[StateDef 1050]
type = S
physics = N
moveType = A
anim = 1050
ctrl = 0
velSet = ifElse((PrevStateNo = [100,105]) && var(20), vel x, 0), 0
sprPriority = 1
powerAdd = 0
faceP2 = ifElse((PrevStateNo = [100,105]), 0, 1)

[State 1050, Button Detect (Normal)]
type = VarSet
trigger1 = !Time && !AILevel && !var(20)
;ifElse((command = "c" || command = "rlsc"), 2, ifElse((command = "b" || command = "rlsb"), 1, 0))
var(10) = ifElse((NumExplod(90000250) || NumExplod(90000255)), 2, ifElse((NumExplod(90000240) || NumExplod(90000245)), 1, 0))

[State 1050, Button Detect (The Killing Time)]
type = VarSet
trigger1 = !Time && !AILevel && var(20)
;ifElse((command = "z" || command = "rlsz"), 2, ifElse((command = "y" || command = "rlsy"), 1, 0))
var(10) = ifElse((NumExplod(90000220) || NumExplod(90000225)), 2, ifElse((NumExplod(90000210) || NumExplod(90000215)), 1, 0))

[State 1050, Button Detect (AI)]
type = VarSet
trigger1 = !Time && AILevel
var(10) = ifElse((P2MoveType = H || Random < 500), 2, ifElse(Random < 500, 1, 0))

[State 1050, Voice]
type = PlaySnd
trigger1 = AnimElem = 7
value = 1050,0
channel = 0

[State 1050, Missile sound effect]
type = PlaySnd
trigger1 = AnimElem = 7
value = 1000,1
channel = 1

[State 1050, Muzzle Flash (Top layer)]
type = Explod
trigger1 = AnimElem = 7
anim = 1003
ID = 1003
sprPriority = 5
posType = P1
pos = ceil(21 * const(size.xScale)), 45
scale = const(size.xScale) * 0.5, 0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1050, Muzzle Exhaust (Top layer)]
type = Explod
trigger1 = AnimElem = 7
anim = 11003
ID = 11003
sprPriority = 5
posType = P1
pos = ceil(21 * const(size.xScale)), 45
scale = const(size.xScale) * 0.5, 0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1050, Muzzle Flash (Bottom layer)]
type = Explod
trigger1 = AnimElem = 7
anim = 1004
ID = 1004
sprPriority = 5
posType = P1
pos = ceil(21 * const(size.xScale)), 45
scale = const(size.xScale) * 0.5, 0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1050, Muzzle Exhaust (Bottom layer)]
type = Explod
trigger1 = AnimElem = 7
anim = 11004
ID = 11004
sprPriority = 5
posType = P1
pos = ceil(21 * const(size.xScale)), 45
scale = const(size.xScale) * 0.5, 0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1050, Muzzle Exhaust (Back, top layer)]
type = Explod
trigger1 = AnimElem = 8
anim = 21003
ID = 21003
sprPriority = 0
posType = P1
pos = ceil(22 * const(size.xScale)), 45
scale = const(size.xScale) * 0.5, 0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1050, Muzzle Exhaust (Back, bottom layer)]
type = Explod
trigger1 = AnimElem = 8
anim = 21004
ID = 21004
sprPriority = 0
posType = P1
pos = ceil(22 * const(size.xScale)), 45
scale = const(size.xScale) * 0.5, 0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1050, Projectile]
type = Helper
trigger1 = AnimElem = 8
helperType = Normal
stateNo = 1005
ID = 1005
name = "Smile & Missile Projectile"
posType = P1
pos = ceil(50 * const(size.xScale)), ceil(-22 * const(size.yScale))
size.xScale = const(size.xScale)
size.yScale = 1
ownPal = 1

[State 1050, Width]
type = Width
trigger1 = AnimElemTime(8) = -1
value = 30,0

[State 1050, ChangeState]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1



;========================<ES SMILE & MISSILE (LOW)>=============================
[StateDef 1080]
type = S
physics = N
moveType = A
anim = 1050
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = -1000
faceP2 = ifElse((PrevStateNo = [100,106]), 0, 1)

[State 1080, ES Flash]
type = VarSet
trigger1 = !Time
var(25) = 28

[State 1080, ES FX]
type = Explod
trigger1 = !Time
anim = 8210
sprPriority = 3
posType = P1
pos = ceil(26 * const(size.xScale)), -67
scale = 0.5, 0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

[State 1080, ES Startup Sound]
type = PlaySnd
trigger1 = !Time
value = 0,1000
channel = 1

[State 1080, Voice]
type = PlaySnd
trigger1 = AnimElem = 7
value = 1080,0
channel = 0

[State 1080, Missile sound effect]
type = PlaySnd
trigger1 = AnimElem = 7
value = 1000,1
channel = 3

[State 1080, Muzzle Flash (Top layer)]
type = Explod
trigger1 = AnimElem = 7
anim = 1003
ID = 1003
sprPriority = 5
posType = P1
pos = ceil(21 * const(size.xScale)), 45
scale = const(size.xScale) * 0.5, 0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1080, Muzzle Exhaust (Top layer)]
type = Explod
trigger1 = AnimElem = 7
anim = 11003
ID = 11003
sprPriority = 5
posType = P1
pos = ceil(21 * const(size.xScale)), 45
scale = const(size.xScale) * 0.5, 0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1080, Muzzle Flash (Bottom layer)]
type = Explod
trigger1 = AnimElem = 7
anim = 1004
ID = 1004
sprPriority = 5
posType = P1
pos = ceil(21 * const(size.xScale)), 45
scale = const(size.xScale) * 0.5, 0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1080, Muzzle Exhaust (Bottom layer)]
type = Explod
trigger1 = AnimElem = 7
anim = 11004
ID = 11004
sprPriority = 5
posType = P1
pos = ceil(21 * const(size.xScale)), 45
scale = const(size.xScale) * 0.5, 0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1080, Muzzle Exhaust (Back, top layer)]
type = Explod
trigger1 = AnimElem = 8
anim = 21003
ID = 21003
sprPriority = 0
posType = P1
pos = ceil(22 * const(size.xScale)), 45
scale = const(size.xScale) * 0.5, 0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1080, Muzzle Exhaust (Back, bottom layer)]
type = Explod
trigger1 = AnimElem = 8
anim = 21004
ID = 21004
sprPriority = 0
posType = P1
pos = ceil(22 * const(size.xScale)), 45
scale = const(size.xScale) * 0.5, 0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1080, Projectile]
type = Helper
trigger1 = AnimElem = 8
helperType = Normal
stateNo = 1035
ID = 1035
name = "ES Smile & Missile Projectile"
posType = P1
pos = ceil(50 * const(size.xScale)), ceil(-22 * const(size.yScale))
size.xScale = 0.504 * const(size.xScale)
size.yScale = 0.324
ownPal = 1

[State 1080, Width]
type = Width
trigger1 = AnimElemTime(8) = -1
value = 30,0

[State 1080, End]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1



;=====================<HAPPY & MISSILE>==========================
[StateDef 1100]
type = S
physics = N
moveType = A
anim = 1100
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = 72 * !var(20)
faceP2 = ifElse((PrevStateNo = [100,106]), 0, 1)

[State 1100, Button Detect]
type = VarSet
trigger1 = !Time && !AILevel
;ifElse((command = "z" || command = "rlsz"), 2, ifElse((command = "y" || command = "rlsy"), 1, 0))
var(10) = ifElse((NumExplod(90000220) || NumExplod(90000225)), 2, ifElse((NumExplod(90000210) || NumExplod(90000215)), 1, 0))

[State 1100, Button Detect (AI)]
type = VarSet
trigger1 = !Time && AILevel
var(10) = ifElse((P2MoveType = H || Random < 500), 2, ifElse(Random < 500, 1, 0))

[State 1100, Jump Sound]
type = PlaySnd
trigger1 = AnimElem = 2
value = 40,0
channel = 1

[State 1100, StateTypeSet: Air, Physics: None]
type = StateTypeSet
trigger1 = AnimElem = 2
stateType = A
physics = N

[State 1100, Dust Helper]
type = Helper
trigger1 = AnimElemTime(2) = 1
helperType = Normal
stateNo = 8100
ID = 8100
name = "Happy & Missile Dust"
posType = P1
ownPal = 1

[State 1100, VelSet]
type = VelSet
trigger1 = AnimElemTime(2) = 1
y = -7.5

[State 1100, VelAdd]
type = VelAdd
trigger1 = AnimElemTime(2) >= 1 && AnimElemTime(10) < 0
y = 0.390625

[State 1100, PosFreeze]
type = PosFreeze
trigger1 = AnimElemTime(10) >= 0 && AnimElemTime(11) < 1
value = 1
ignoreHitPause = 1

[State 1100, Voice]
type = PlaySnd
trigger1 = AnimElemTime(11) = -1
value = 1100,0
channel = 0

[State 1100, Missile sound effect]
type = PlaySnd
trigger1 = AnimElemTime(11) = -1
value = 1000,1
channel = 3

[State 1100, Muzzle Flash (Top layer)]
type = Explod
trigger1 = AnimElemTime(11) = -1
anim = 1103
ID = 1103
sprPriority = 5
posType = P1
scale = const(size.xScale) * 0.5, 0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1100, Muzzle Exhaust (Top layer)]
type = Explod
trigger1 = AnimElemTime(11) = -1
anim = 11103
ID = 11103
sprPriority = 5
posType = P1
scale = const(size.xScale) * 0.5, 0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1100, Muzzle Flash (Bottom layer)]
type = Explod
trigger1 = AnimElemTime(11) = -1
anim = 1104
ID = 1104
sprPriority = 5
posType = P1
scale = const(size.xScale) * 0.5, 0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1100, Muzzle Exhaust (Bottom layer)]
type = Explod
trigger1 = AnimElemTime(11) = -1
anim = 11104
ID = 11104
sprPriority = 5
posType = P1
scale = const(size.xScale) * 0.5, 0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1100, Muzzle Exhaust (Back, top layer)]
type = Explod
trigger1 = AnimElem = 11
anim = 21103
ID = 21103
sprPriority = 0
posType = P1
scale = const(size.xScale) * 0.5, 0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1100, Muzzle Exhaust (Back, bottom layer)]
type = Explod
trigger1 = AnimElem = 11
anim = 21104
ID = 21104
sprPriority = 0
posType = P1
scale = const(size.xScale) * 0.5, 0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1100, VelSet]
type = VelSet
trigger1 = AnimElemTime(11) = 1
x = -1.25 * const(size.xScale)
y = -4.375

[State 1100, VelAdd]
type = VelAdd
trigger1 = AnimElemTime(11) > 1 ;MvC2 speedup
;trigger1 = AnimElemTime(11) >= 1 ;original VS accel
x = 0.0244140625 * const(size.xScale)
y = 0.5859375 ;MvC2 speedup
;y = 0.29296875 ;original VS accel

[State 1100, Projectile]
type = Helper
trigger1 = AnimElem = 12
helperType = Normal
stateNo = 1105
ID = 1105
name = "Happy & Missile Projectile"
posType = P1
pos = ceil(33 * const(size.xScale)), -74
size.xScale = const(size.xScale)
size.yScale = 1
ownPal = 1

[State 1100, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(19) >= 0
moveType = I

[State 1100, End]
type = ChangeState
trigger1 = pos y > -vel y
value = 1101


;Landing
[StateDef 1101]
type = S
anim = 1101
physics = N
moveType = I
velSet = 0,0

[State 1101, PosSet]
type = PosSet
trigger1 = 1
y = 0

[State 1101, Landing Dust Explod]
type = Explod
trigger1 = !Time
anim = 8102
sprPriority = -3
posType = P1
scale = 0.5,0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

[State 1101, Landing Sound]
type = PlaySnd
trigger1 = !Time
value = 52,0
channel = 4

[State 1101, End]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1



;========================<ES HAPPY & MISSILE>=============================
[StateDef 1130]
type = S
physics = N
moveType = A
anim = 1100
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = -1000
faceP2 = ifElse((PrevStateNo = [100,106]), 0, 1)

[State 1130, ES Flash]
type = VarSet
trigger1 = !Time
var(25) = 43

[State 1130, ES FX]
type = Explod
trigger1 = !Time
anim = 8210
sprPriority = 3
posType = p1
pos = ceil(26 * const(size.xScale)), -67
scale = 0.5, 0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

[State 1130, ES Startup Sound]
type = PlaySnd
trigger1 = !Time
value = 0,1000
channel = 1

[State 1130, Jump Sound]
type = PlaySnd
trigger1 = AnimElem = 2
value = 40,0
channel = 3

[State 1130, StateTypeSet: Air, Physics: None]
type = StateTypeSet
trigger1 = AnimElem = 2
stateType = A
physics = N

[State 1130, Dust Helper]
type = Helper
trigger1 = AnimElemTime(2) = 1
helperType = Normal
stateNo = 8100
ID = 8100
name = "Happy & Missile Dust"
posType = P1
ownPal = 1

[State 1130, VelSet]
type = VelSet
trigger1 = AnimElemTime(2) = 1
y = -7.5

[State 1130, VelAdd]
type = VelAdd
trigger1 = AnimElemTime(2) >= 1 && AnimElemTime(10) < 0
y = 0.390625

[State 1130, PosFreeze]
type = PosFreeze
trigger1 = AnimElemTime(10) >= 0 && AnimElemTime(11) < 1
value = 1
ignoreHitPause = 1

[State 1130, Voice]
type = PlaySnd
trigger1 = AnimElemTime(11) = -1
value = 1130,0
channel = 0

[State 1130, Missile sound effect]
type = PlaySnd
trigger1 = AnimElemTime(11) = -1
value = 1000,1
channel = 4

[State 1130, Muzzle Flash (Top layer)]
type = Explod
trigger1 = AnimElemTime(11) = -1
anim = 1103
ID = 1103
sprPriority = 5
posType = P1
scale = const(size.xScale) * 0.5, 0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1130, Muzzle Exhaust (Top layer)]
type = Explod
trigger1 = AnimElemTime(11) = -1
anim = 11103
ID = 11103
sprPriority = 5
posType = P1
scale = const(size.xScale) * 0.5, 0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1130, Muzzle Flash (Bottom layer)]
type = Explod
trigger1 = AnimElemTime(11) = -1
anim = 1104
ID = 1104
sprPriority = 5
posType = P1
scale = const(size.xScale) * 0.5, 0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1130, Muzzle Exhaust (Bottom layer)]
type = Explod
trigger1 = AnimElemTime(11) = -1
anim = 11104
ID = 11104
sprPriority = 5
posType = P1
scale = const(size.xScale) * 0.5, 0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1130, Muzzle Exhaust (Back, top layer)]
type = Explod
trigger1 = AnimElem = 11
anim = 21103
ID = 21103
sprPriority = 0
posType = P1
scale = const(size.xScale) * 0.5, 0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1130, Muzzle Exhaust (Back, bottom layer)]
type = Explod
trigger1 = AnimElem = 11
anim = 21104
ID = 21104
sprPriority = 0
posType = P1
scale = const(size.xScale) * 0.5, 0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1130, VelSet]
type = VelSet
trigger1 = AnimElemTime(11) = 1
x = -1.25 * const(size.xScale)
y = -4.375

[State 1130, VelAdd]
type = VelAdd
trigger1 = AnimElemTime(11) > 1 ;MvC2 speedup
;trigger1 = AnimElemTime(11) >= 1 ;original VS accel
x = 0.0244140625 * const(size.xScale)
y = 0.5859375 ;MvC2 speedup
;y = 0.29296875 ;original VS accel

[State 1130, Projectile]
type = Helper
trigger1 = AnimElem = 12
helperType = Normal
stateNo = 1135
ID = 1135
name = "ES Happy & Missile Projectile"
posType = P1
pos = ceil(33 * const(size.xScale)), -74
size.xScale = 0.504 * const(size.xScale)
size.yScale = 0.324
ownPal = 1

[State 1130, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(19) >= 0
moveType = I

[State 1130, End]
type = ChangeState
trigger1 = pos y > -vel y
value = 1101



;=====================<HAPPY & MISSILE (THE KILLING TIME)>==========================
[StateDef 1150]
type = A
physics = N
moveType = A
anim = 1150
ctrl = 0
sprPriority = 1
powerAdd = 72 * !var(20)
faceP2 = ifElse((PrevStateNo = [100,106]), 0, 1)

[State 1150, Button Detect]
type = VarSet
trigger1 = !Time && !AILevel
;ifElse((command = "z" || command = "rlsz"), 2, ifElse((command = "y" || command = "rlsy"), 1, 0))
var(10) = ifElse((NumExplod(90000220) || NumExplod(90000225)), 2, ifElse((NumExplod(90000210) || NumExplod(90000215)), 1, 0))

[State 1150, Button Detect (AI)]
type = VarSet
trigger1 = !Time && AILevel
var(10) = ifElse((P2MoveType = H || Random < 500), 2, ifElse(Random < 500, 1, 0))

[State 1150, Gravity]
type = Gravity
trigger1 = AnimElemTime(3) < 0

[State 1150, VelAdd]
type = VelAdd
trigger1 = vel x
trigger1 = AnimElemTime(3) < 0
x = ifElse((var(3) = [2,3]), -0.04577636719, -0.03051757813) * ifElse(vel x < 0, -1, 1) * const(size.xScale)

[State 1150, PosFreeze]
type = PosFreeze
trigger1 = AnimElemTime(3) >= 0 && AnimElemTime(4) < 0
value = 1
ignoreHitPause = 1

[State 1150, Voice]
type = PlaySnd
trigger1 = AnimElemTime(4) = -2
value = 1100,0
channel = 0

[State 1150, Missile sound effect]
type = PlaySnd
trigger1 = AnimElemTime(4) = -2
value = 1000,1
channel = 3

[State 1150, Muzzle Flash (Top layer)]
type = Explod
trigger1 = AnimElemTime(4) = -2
anim = 1103
ID = 1103
sprPriority = 5
posType = P1
scale = const(size.xScale) * 0.5, 0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1150, Muzzle Exhaust (Top layer)]
type = Explod
trigger1 = AnimElemTime(4) = -2
anim = 11103
ID = 11103
sprPriority = 5
posType = P1
scale = const(size.xScale) * 0.5, 0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1150, Muzzle Flash (Bottom layer)]
type = Explod
trigger1 = AnimElemTime(4) = -2
anim = 1104
ID = 1104
sprPriority = 5
posType = P1
scale = const(size.xScale) * 0.5, 0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1150, Muzzle Exhaust (Bottom layer)]
type = Explod
trigger1 = AnimElemTime(4) = -2
anim = 11104
ID = 11104
sprPriority = 5
posType = P1
scale = const(size.xScale) * 0.5, 0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1100, Muzzle Exhaust (Back, top layer)]
type = Explod
trigger1 = AnimElem = 5
anim = 21103
ID = 21103
sprPriority = 0
posType = P1
scale = const(size.xScale) * 0.5, 0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1150, Muzzle Exhaust (Back, bottom layer)]
type = Explod
trigger1 = AnimElem = 5
anim = 21104
ID = 21104
sprPriority = 0
posType = P1
scale = const(size.xScale) * 0.5, 0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1150, VelSet]
type = VelSet
trigger1 = AnimElem = 4
x = -1.25 * const(size.xScale)
y = -4.375

[State 1150, VelAdd]
type = VelAdd
trigger1 = AnimElemTime(4) > 0
;trigger1 = AnimElemTime(11) > 1 ;MvC2 speedup
;trigger1 = AnimElemTime(11) >= 1 ;original VS accel
x = 0.0244140625 * const(size.xScale)
y = 0.5859375 ;MvC2 speedup
;y = 0.29296875 ;original VS accel

[State 1150, Projectile]
type = Helper
trigger1 = AnimElem = 4
helperType = Normal
stateNo = 1105
ID = 1105
name = "Happy & Missile Projectile"
posType = P1
pos = ceil(33 * const(size.xScale)), -74
size.xScale = const(size.xScale)
size.yScale = 1
ownPal = 1

[State 1150, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(12) >= 0
moveType = I

[State 1150, End]
type = ChangeState
trigger1 = pos y > -vel y && AnimElemTime(4) >= 0
value = 1101



;=====================<CHEER & FIRE>==========================
[StateDef 1200]
type = S
physics = N
moveType = A
anim = 1200
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = 72 * !var(20)
faceP2 = ifElse((PrevStateNo = [100,105]), 0, 1)

[State 1200, Button Detect]
type = VarSet
trigger1 = !Time && !AILevel
;ifElse((command = "z" || command = "rlsz"), 2, ifElse((command = "y" || command = "rlsy"), 1, 0))
var(10) = ifElse((NumExplod(90000220) || NumExplod(90000225)), 2, ifElse((NumExplod(90000210) || NumExplod(90000215)), 1, 0))

[State 1200, Button Detect (AI)]
type = VarSet
trigger1 = !Time && AILevel
var(10) = ifElse((P2MoveType = H || Random < 500), 2, ifElse(Random < 500, 1, 0))

[State 1200, ChangeAnim]
type = ChangeAnim
trigger1 = !Time
value = ifElse(var(10) = 0, 1200, ifElse(var(10) = 1, 1210, 1220))

[State 1200, Voice]
type = PlaySnd
trigger1 = !Time
value = 1200,0
channel = 0

[State 1200, Flame sound]
type = PlaySnd
trigger1 = Time = ifElse(var(10) = 2, 12, ifElse(var(10) = 1, 11, 9))
value = 1200,1
channel = 1

[State 1200, Flames (top layer)]
type = Explod
trigger1 = Time = ifElse(var(10) = 2, 12, ifElse(var(10) = 1, 11, 9))
trigger2 = Time = ifElse(var(10) = 2, 16, ifElse(var(10) = 1, 15, 13))
trigger3 = Time = ifElse(var(10) = 2, 20, ifElse(var(10) = 1, 19, 17))
trigger4 = Time = ifElse(var(10) = 2, 24, ifElse(var(10) = 1, 23, 21))
trigger5 = Time = ifElse(var(10) = 2, 28, ifElse(var(10) = 1, 27, 25))
anim = ifElse(var(10) = 0, 1205, ifElse(var(10) = 1, 1215, 1225))
sprPriority = 3
posType = P1
pos = ceil(32 * const(size.xScale)), -101
scale = const(size.xScale) * 0.5,0.429
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1200, Flames (bottom layer)]
type = Explod
trigger1 = Time = ifElse(var(10) = 2, 12, ifElse(var(10) = 1, 11, 9))
trigger2 = Time = ifElse(var(10) = 2, 16, ifElse(var(10) = 1, 15, 13))
trigger3 = Time = ifElse(var(10) = 2, 20, ifElse(var(10) = 1, 19, 17))
trigger4 = Time = ifElse(var(10) = 2, 24, ifElse(var(10) = 1, 23, 21))
trigger5 = Time = ifElse(var(10) = 2, 28, ifElse(var(10) = 1, 27, 25))
anim = ifElse(var(10) = 0, 11205, ifElse(var(10) = 1, 11215, 11225))
sprPriority = 3
posType = P1
pos = ceil(32 * const(size.xScale)), -101
scale = const(size.xScale) * 0.5,0.429
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1200, Projectile Shield]
type = Helper
trigger1 = AnimElem = 9
helperType = Normal
stateNo = 21205
ID = 21205
name = "Cheer & Fire Projectile Shield"
posType = P1
ownPal = 1

[State 1200, HitDef]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 9
ID = 1200
attr = S, SA
hitFlag = MAF
guardFlag = M
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * ifElse(var(10) = 2, 98, ifElse(var(10) = 1, 91, 84)) < 7, 7, fvar(11) * ifElse(var(10) = 2, 98, ifElse(var(10) = 1, 91, 84)))), 7
getPower = ifElse(!var(13), 144, 72) * !var(20), 36 * !var(20)
givePower = 36, 36
pauseTime = 1,2
guard.pauseTime = 1,2
animType = Hard
air.animType = Back
fall.animType = Back
ground.type = Low
air.type = Low
ground.hitTime = 15
ground.slideTime = 15
guard.hitTime = 15
air.hitTime = 60
airGuard.ctrlTime = 15
ground.velocity = -4.31, -7.36
ground.cornerPush.velOff = 0
guard.velocity = -10.52
guard.cornerPush.velOff = 0
air.velocity = -4.31, -7.36
air.cornerPush.velOff = 0
airGuard.velocity = -5, 0
airGuard.cornerPush.velOff = 0
yAccel = 0.58
fall = 1
air.fall = 1
fall.recover = 1
fall.recoverTime = 120
forceStand = 1
hitSound = -1 + 0 * (var(31) := 6)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 24), var(36) := -106
palFX.time = ifElse(EnemyNear, SelfAnimExist(7697), 12 * var(9), 35)
palFX.add = ifElse(EnemyNear, SelfAnimExist(7697), 255, 0), ifElse(EnemyNear, SelfAnimExist(7697), 255, 0), ifElse(EnemyNear, SelfAnimExist(7697), 255, 0)
palFX.mul = ifElse(EnemyNear, SelfAnimExist(7697), 256, 128), ifElse(EnemyNear, SelfAnimExist(7697), 256, 128), ifElse(EnemyNear, SelfAnimExist(7697), 256, 128)
palFX.sinAdd = ifElse(EnemyNear, SelfAnimExist(7697), -255, 96), ifElse(EnemyNear, SelfAnimExist(7697), -255, 96), ifElse(EnemyNear, SelfAnimExist(7697), -255, 96), ifElse(EnemyNear, SelfAnimExist(7697), 48, 4)
envShake.time = 14
envShake.ampl = 4
envShake.freq = 120

[State 1200, TargetState]
type = TargetState
trigger1 = MoveHit && NumTarget(1200)
value = 50255
ID = 1200
ignoreHitPause = 1
persistent = 0

[State 1200, Flames]
type = Helper
trigger1 = !NumHelper(8150) && !NumHelper(8155)
trigger1 = MoveHit = 1 && NumTarget
trigger1 = !(Target, HitShakeOver)
trigger1 = var(43) := (Target, ID)
helperType = Normal
stateNo = 8150
ID = ifElse(Target, SelfAnimExist(7697), 8150, 8155)
name = "Flames"
posType = P2
size.xScale = const(size.xScale) * 0.5
size.yScale = 0.5
ownPal = 1
ignoreHitPause = 1

[State 1200, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(16) >= 0
moveType = I

[State 1200, ChangeState]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1



;=====================<ES CHEER & FIRE>==========================
[StateDef 1230]
type = S
physics = N
moveType = A
anim = 1230
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = -1000
faceP2 = ifElse((PrevStateNo = [100,105]), 0, 1)

[State 1230, ES Flash]
type = VarSet
trigger1 = !Time
var(25) = 74

[State 1230, ES FX]
type = Explod
trigger1 = !Time
anim = 8210
sprPriority = 3
posType = p1
pos = ceil(18 * const(size.xScale)), ceil(-79 * const(size.yScale))
scale = 0.5, 0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

[State 1230, ES Startup Sound]
type = PlaySnd
trigger1 = !Time
value = 0,1000
channel = 1

[State 1230, Voice]
type = PlaySnd
trigger1 = !Time
value = 1230,0
channel = 0

[State 1230, Flame sound]
type = PlaySnd
trigger1 = Time = 9
value = 1200,1
channel = 3

[State 1230, Flames 1/13/14 (top layer)]
type = Explod
trigger1 = Time = 9
trigger2 = Time = 57
trigger3 = Time = 61
anim = 1235
sprPriority = 3
posType = P1
pos = ceil(22 * const(size.xScale)), -105
scale = const(size.xScale) * 0.5,0.429
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1230, Flames 1/13/14 (bottom layer)]
type = Explod
trigger1 = Time = 9
trigger2 = Time = 57
trigger3 = Time = 61
anim = 11235
sprPriority = 3
posType = P1
pos = ceil(22 * const(size.xScale)), -105
scale = const(size.xScale) * 0.5,0.429
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1230, Flames 2/3/12 (top layer)]
type = Explod
trigger1 = Time = 13
trigger2 = Time = 17
trigger3 = Time = 53
anim = 1205
sprPriority = 3
posType = P1
pos = ceil(32 * const(size.xScale)), -101
scale = const(size.xScale) * 0.5,0.429
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1230, Flames 2/3/12 (bottom layer)]
type = Explod
trigger1 = Time = 13
trigger2 = Time = 17
trigger3 = Time = 53
anim = 11205
sprPriority = 3
posType = P1
pos = ceil(32 * const(size.xScale)), -101
scale = const(size.xScale) * 0.5,0.429
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1230, Flames 4/10/11 (top layer)]
type = Explod
trigger1 = Time = 21
trigger2 = Time = 45
trigger3 = Time = 49
anim = 1236
sprPriority = 3
posType = P1
pos = ceil(40 * const(size.xScale)), -95
scale = const(size.xScale) * 0.5,0.429
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1230, Flames 4/10/11 (bottom layer)]
type = Explod
trigger1 = Time = 21
trigger2 = Time = 45
trigger3 = Time = 49
anim = 11236
sprPriority = 3
posType = P1
pos = ceil(40 * const(size.xScale)), -95
scale = const(size.xScale) * 0.5,0.429
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1230, Flames 5/6/9 (top layer)]
type = Explod
trigger1 = Time = 25
trigger2 = Time = 29
trigger3 = Time = 41
anim = 1237
sprPriority = 3
posType = P1
pos = ceil(48 * const(size.xScale)), -91
scale = const(size.xScale) * 0.5,0.429
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1230, Flames 5/6/9 (bottom layer)]
type = Explod
trigger1 = Time = 25
trigger2 = Time = 29
trigger3 = Time = 41
anim = 11237
sprPriority = 3
posType = P1
pos = ceil(48 * const(size.xScale)), -91
scale = const(size.xScale) * 0.5,0.429
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1230, Flames 7/8 (top layer)]
type = Explod
trigger1 = Time = 33
trigger2 = Time = 37
anim = 1238
sprPriority = 3
posType = P1
pos = ceil(55 * const(size.xScale)), -84
scale = const(size.xScale) * 0.5,0.429
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1230, Flames 7/8 (bottom layer)]
type = Explod
trigger1 = Time = 33
trigger2 = Time = 37
anim = 11238
sprPriority = 3
posType = P1
pos = ceil(55 * const(size.xScale)), -84
scale = const(size.xScale) * 0.5,0.429
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1230, NotHitBy]
type = NotHitBy
trigger1 = AnimElemTime(8) < 0
value = SCA
time = 1

[State 1230, Projectile Shield]
type = Helper
trigger1 = AnimElem = 8
helperType = Normal
stateNo = 21205
ID = 21235
name = "Cheer & Fire Projectile Shield"
posType = P1
ownPal = 1

[State 1230, Spark XY]
type = Null
trigger1 = AnimElem = 8 || AnimElem = 23
trigger1 = var(35) := 18 || var(36) := -125
trigger2 = AnimElem = 9 || AnimElem = 21
trigger2 = var(35) := 39 || var(36) := -125
trigger3 = AnimElem = 11 || AnimElem = 19
trigger3 = var(35) := 55 || var(36) := -115
trigger4 = AnimElem = 13 || AnimElem = 17
trigger4 = var(35) := 55 || var(36) := -98
trigger5 = AnimElem = 15
trigger5 = var(35) := 55 || var(36) := -88

[State 1230, HitDef]
type = HitDef
trigger1 = !var(16) && var(15) < (1 + HitCount)
trigger1 = AnimElem = 8 || AnimElem = 9 || AnimElem = 11 || AnimElem = 13 || AnimElem = 15 || AnimElem = 17 || AnimElem = 19 || AnimElem = 21 || AnimElem = 23
ID = ifElse(HitCount < 1, 1230, 1231)
attr = S, SA
hitFlag = MAF
guardFlag = M
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 56 < 7, 7, fvar(11) * 56)), 7
getPower = 0,0
givePower = 36, 36
pauseTime = 1,2
guard.pauseTime = 1,2
animType = Hard
air.animType = Back
fall.animType = Back
ground.type = Low
air.type = Low
ground.hitTime = 15
ground.slideTime = 15
guard.hitTime = 15
air.hitTime = 60
airGuard.ctrlTime = 15
ground.velocity = -4.31, -7.36
ground.cornerPush.velOff = 0
guard.velocity = -10.52
guard.cornerPush.velOff = 0
air.velocity = -4.31, -7.36
air.cornerPush.velOff = 0
airGuard.velocity = -5, 0
airGuard.cornerPush.velOff = 0
yAccel = 0.58
fall = 1
air.fall = 1
fall.recover = 1
fall.recoverTime = 120
forceStand = 1
hitSound = -1 + 0 * (var(31) := 6)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10, -55
palFX.time = ifElse(EnemyNear, SelfAnimExist(7697), 12 * var(9), 35)
palFX.add = ifElse(EnemyNear, SelfAnimExist(7697), 255, 0), ifElse(EnemyNear, SelfAnimExist(7697), 255, 0), ifElse(EnemyNear, SelfAnimExist(7697), 255, 0)
palFX.mul = ifElse(EnemyNear, SelfAnimExist(7697), 256, 128), ifElse(EnemyNear, SelfAnimExist(7697), 256, 128), ifElse(EnemyNear, SelfAnimExist(7697), 256, 128)
palFX.sinAdd = ifElse(EnemyNear, SelfAnimExist(7697), -255, 96), ifElse(EnemyNear, SelfAnimExist(7697), -255, 96), ifElse(EnemyNear, SelfAnimExist(7697), -255, 96), ifElse(EnemyNear, SelfAnimExist(7697), 48, 4)
envShake.time = 14
envShake.ampl = 4
envShake.freq = 120

[State 1230, TargetState (First Hit)]
type = TargetState
trigger1 = MoveHit = 1 && NumTarget(1230)
value = 50255
ID = 1230
ignoreHitPause = 1

[State 1230, TargetState (Subsequent Hits)]
type = TargetState
trigger1 = MoveHit = 1 && NumTarget(1231)
value = 50255
ID = 1231
ignoreHitPause = 1

[State 1230, Flames]
type = Helper
trigger1 = !NumHelper(8150) && !NumHelper(8155)
trigger1 = MoveHit = 1 && NumTarget
trigger1 = !(Target, HitShakeOver)
trigger1 = var(43) := (Target, ID)
helperType = Normal
stateNo = 8150
ID = ifElse(Target, SelfAnimExist(7697), 8150, 8155)
name = "Flames"
posType = P2
size.xScale = const(size.xScale) * 0.5
size.yScale = 0.5
ownPal = 1
ignoreHitPause = 1

[State 1230, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(25) >= 0
moveType = I

[State 1230, ChangeState]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1



;=====================<HORIZONTAL CHEER & FIRE>==========================
[StateDef 1250]
type = S
physics = N
moveType = A
anim = 1250
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = 72 * !var(20)
faceP2 = ifElse((PrevStateNo = [100,105]), 0, 1)

[State 1250, Button Detect]
type = VarSet
trigger1 = !Time && !AILevel
;ifElse((command = "c" || command = "rlsc"), 2, ifElse((command = "b" || command = "rlsb"), 1, 0))
var(10) = ifElse((NumExplod(90000250) || NumExplod(90000255)), 2, ifElse((NumExplod(90000240) || NumExplod(90000245)), 1, 0))

[State 1250, Button Detect (AI)]
type = VarSet
trigger1 = !Time && AILevel
var(10) = ifElse((P2MoveType = H || Random < 500), 2, ifElse(Random < 500, 1, 0))

[State 1250, ChangeAnim]
type = ChangeAnim
trigger1 = !Time
value = ifElse(var(10) = 0, 1250, ifElse(var(10) = 1, 1260, 1270))

[State 1250, Voice]
type = PlaySnd
trigger1 = !Time
value = 1200,0
channel = 0

[State 1250, Flame sound]
type = PlaySnd
trigger1 = Time = ifElse(var(10) = 2, 12, ifElse(var(10) = 1, 11, 9))
value = 1200,1
channel = 1

[State 1250, Flames (top layer)]
type = Explod
trigger1 = Time = ifElse(var(10) = 2, 12, ifElse(var(10) = 1, 11, 9))
trigger2 = Time = ifElse(var(10) = 2, 16, ifElse(var(10) = 1, 15, 13))
trigger3 = Time = ifElse(var(10) = 2, 20, ifElse(var(10) = 1, 19, 17))
trigger4 = Time = ifElse(var(10) = 2, 24, ifElse(var(10) = 1, 23, 21))
trigger5 = Time = ifElse(var(10) = 2, 28, ifElse(var(10) = 1, 27, 25))
anim = ifElse(var(10) = 0, 1255, ifElse(var(10) = 1, 1265, 1275))
sprPriority = 3
posType = P1
pos = ceil(56 * const(size.xScale)), -52
scale = const(size.xScale) * 0.5,0.429
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1250, Flames (bottom layer)]
type = Explod
trigger1 = Time = ifElse(var(10) = 2, 12, ifElse(var(10) = 1, 11, 9))
trigger2 = Time = ifElse(var(10) = 2, 16, ifElse(var(10) = 1, 15, 13))
trigger3 = Time = ifElse(var(10) = 2, 20, ifElse(var(10) = 1, 19, 17))
trigger4 = Time = ifElse(var(10) = 2, 24, ifElse(var(10) = 1, 23, 21))
trigger5 = Time = ifElse(var(10) = 2, 28, ifElse(var(10) = 1, 27, 25))
anim = ifElse(var(10) = 0, 11255, ifElse(var(10) = 1, 11265, 11275))
sprPriority = 3
posType = P1
pos = ceil(56 * const(size.xScale)), -52
scale = const(size.xScale) * 0.5,0.429
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1250, Projectile Shield]
type = Helper
trigger1 = AnimElem = 9
helperType = Normal
stateNo = 21205
ID = 21255
name = "Cheer & Fire Projectile Shield"
posType = P1
ownPal = 1

[State 1250, HitDef]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 9
ID = 1250
attr = S, SA
hitFlag = MAF
guardFlag = M
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * ifElse(var(10) = 2, 84, ifElse(var(10) = 1, 77, 70)) < 7, 7, fvar(11) * ifElse(var(10) = 2, 84, ifElse(var(10) = 1, 77, 70)))), 7
getPower = ifElse(!var(13), 144, 72) * !var(20), 36 * !var(20)
givePower = 36, 36
pauseTime = 1,2
guard.pauseTime = 1,2
animType = Hard
air.animType = Back
fall.animType = Back
ground.type = Low
air.type = Low
ground.hitTime = 15
ground.slideTime = 15
guard.hitTime = 15
air.hitTime = 60
airGuard.ctrlTime = 15
ground.velocity = -4.31, -7.36
ground.cornerPush.velOff = 0
guard.velocity = -10.52
guard.cornerPush.velOff = 0
air.velocity = -4.31, -7.36
air.cornerPush.velOff = 0
airGuard.velocity = -5, 0
airGuard.cornerPush.velOff = 0
yAccel = 0.58
fall = 1
air.fall = 1
fall.recover = 1
fall.recoverTime = 120
forceStand = 1
hitSound = -1 + 0 * (var(31) := 6)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 86), var(36) := -46
palFX.time = ifElse(EnemyNear, SelfAnimExist(7697), 12 * var(9), 35)
palFX.add = ifElse(EnemyNear, SelfAnimExist(7697), 255, 0), ifElse(EnemyNear, SelfAnimExist(7697), 255, 0), ifElse(EnemyNear, SelfAnimExist(7697), 255, 0)
palFX.mul = ifElse(EnemyNear, SelfAnimExist(7697), 256, 128), ifElse(EnemyNear, SelfAnimExist(7697), 256, 128), ifElse(EnemyNear, SelfAnimExist(7697), 256, 128)
palFX.sinAdd = ifElse(EnemyNear, SelfAnimExist(7697), -255, 96), ifElse(EnemyNear, SelfAnimExist(7697), -255, 96), ifElse(EnemyNear, SelfAnimExist(7697), -255, 96), ifElse(EnemyNear, SelfAnimExist(7697), 48, 4)
envShake.time = 14
envShake.ampl = 4
envShake.freq = 120

[State 1250, TargetState]
type = TargetState
trigger1 = MoveHit && NumTarget(1250)
value = 50255
ID = 1250
ignoreHitPause = 1
persistent = 0

[State 1250, Flames]
type = Helper
trigger1 = !NumHelper(8150) && !NumHelper(8155)
trigger1 = MoveHit = 1 && NumTarget
trigger1 = !(Target, HitShakeOver)
trigger1 = var(43) := (Target, ID)
helperType = Normal
stateNo = 8150
ID = ifElse(Target, SelfAnimExist(7697), 8150, 8155)
name = "Flames"
posType = P2
size.xScale = const(size.xScale) * 0.5
size.yScale = 0.5
ownPal = 1
ignoreHitPause = 1

[State 1250, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(16) >= 0
moveType = I

[State 1250, ChangeState]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1



;=====================<ES HORIZONTAL CHEER & FIRE>==========================
[StateDef 1280]
type = S
physics = N
moveType = A
anim = 1280
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = -1000
faceP2 = ifElse((PrevStateNo = [100,105]), 0, 1)

[State 1280, ES Flash]
type = VarSet
trigger1 = !Time
var(25) = 47

[State 1280, ES FX]
type = Explod
trigger1 = !Time
anim = 8210
sprPriority = 3
posType = p1
pos = ceil(16 * const(size.xScale)), ceil(-79 * const(size.yScale))
scale = 0.5, 0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

[State 1280, ES Startup Sound]
type = PlaySnd
trigger1 = !Time
value = 0,1000
channel = 1

[State 1280, Voice]
type = PlaySnd
trigger1 = !Time
value = 1230,0
channel = 0

[State 1280, Flame sound]
type = PlaySnd
trigger1 = Time = 9
value = 1200,1
channel = 3

[State 1280, Flames (top layer)]
type = Explod
trigger1 = Time = 9
anim = 1285
sprPriority = 3
posType = P1
pos = ceil(52 * const(size.xScale)), -51
;original size, pixel effects
;pos = ceil(59 * const(size.xScale)), -49
scale = const(size.xScale) * 0.5,0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1280, Flames (bottom layer)]
type = Explod
trigger1 = Time = 9
anim = 11285
sprPriority = 3
posType = P1
pos = ceil(52 * const(size.xScale)), -51
;pos = ceil(59 * const(size.xScale)), -49
scale = const(size.xScale) * 0.5,0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1280, Projectile Shield]
type = Helper
trigger1 = AnimElem = 8
helperType = Normal
stateNo = 21205
ID = 21285
name = "Cheer & Fire Projectile Shield"
posType = P1
ownPal = 1

[State 1280, HitDef]
type = HitDef
trigger1 = !var(16) && var(15) < (1 + HitCount)
trigger1 = AnimElem = 8 || AnimElem = 9 || AnimElem = 11 || AnimElem = 13 || AnimElem = 15 || AnimElem = 17 || AnimElem = 19 || AnimElem = 21 || AnimElem = 23
ID = ifElse(HitCount < 1, 1280, 1281)
attr = S, SA
hitFlag = MAF
guardFlag = M
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 63 < 7, 7, fvar(11) * 63)), 7
getPower = 0,0
givePower = 36, 36
pauseTime = 1,2
guard.pauseTime = 1,2
animType = Hard
air.animType = Back
fall.animType = Back
ground.type = Low
air.type = Low
ground.hitTime = 15
ground.slideTime = 15
guard.hitTime = 15
air.hitTime = 60
airGuard.ctrlTime = 15
ground.velocity = -4.31, -7.36
ground.cornerPush.velOff = 0
guard.velocity = -10.52
guard.cornerPush.velOff = 0
air.velocity = -4.31, -7.36
air.cornerPush.velOff = 0
airGuard.velocity = -5, 0
airGuard.cornerPush.velOff = 0
yAccel = 0.58
fall = 1
air.fall = 1
fall.recover = 1
fall.recoverTime = 120
forceStand = 1
hitSound = -1 + 0 * (var(31) := 6)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 110), var(36) := -46
palFX.time = ifElse(EnemyNear, SelfAnimExist(7697), 12 * var(9), 35)
palFX.add = ifElse(EnemyNear, SelfAnimExist(7697), 255, 0), ifElse(EnemyNear, SelfAnimExist(7697), 255, 0), ifElse(EnemyNear, SelfAnimExist(7697), 255, 0)
palFX.mul = ifElse(EnemyNear, SelfAnimExist(7697), 256, 128), ifElse(EnemyNear, SelfAnimExist(7697), 256, 128), ifElse(EnemyNear, SelfAnimExist(7697), 256, 128)
palFX.sinAdd = ifElse(EnemyNear, SelfAnimExist(7697), -255, 96), ifElse(EnemyNear, SelfAnimExist(7697), -255, 96), ifElse(EnemyNear, SelfAnimExist(7697), -255, 96), ifElse(EnemyNear, SelfAnimExist(7697), 48, 4)
envShake.time = 14
envShake.ampl = 4
envShake.freq = 120

[State 1280, TargetState (First Hit)]
type = TargetState
trigger1 = MoveHit = 1 && NumTarget(1280)
value = 50255
ID = 1280
ignoreHitPause = 1

[State 1280, TargetState (Subsequent Hits)]
type = TargetState
trigger1 = MoveHit = 1 && NumTarget(1281)
value = 50255
ID = 1281
ignoreHitPause = 1

[State 1280, Flames]
type = Helper
trigger1 = !NumHelper(8150) && !NumHelper(8155)
trigger1 = MoveHit = 1 && NumTarget
trigger1 = !(Target, HitShakeOver)
trigger1 = var(43) := (Target, ID)
helperType = Normal
stateNo = 8150
ID = ifElse(Target, SelfAnimExist(7697), 8150, 8155)
name = "Flames"
posType = P2
size.xScale = const(size.xScale) * 0.5
size.yScale = 0.5
ownPal = 1
ignoreHitPause = 1

[State 1280, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(25) >= 0
moveType = I

[State 1280, End]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1



;=====================<SHYNESS & STRIKE>==========================
[StateDef 1300]
type = S
physics = N
moveType = A
anim = 1300
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = 72 * !var(20)
faceP2 = ifElse((PrevStateNo = [100,105]), 0, 1)

[State 1300, Button Detect]
type = VarSet
trigger1 = !Time && !AILevel
;ifElse((command = "z" || command = "rlsz"), 2, ifElse((command = "y" || command = "rlsy"), 1, 0))
var(10) = ifElse((NumExplod(90000220) || NumExplod(90000225)), 2, ifElse((NumExplod(90000210) || NumExplod(90000215)), 1, 0))

[State 1300, Basket]
type = Helper
trigger1 = AnimElem = 3
helperType = Normal
stateNo = 1304
ID = 1304
name = "Shyness & Strike Basket"
posType = P1
size.xScale = const(size.xScale)
size.yScale = 1
ownPal = 0

;commented out stuff is VS1 version, VS2 version has faster charging
[State 1300, Basket swing sound (small)]
type = PlaySnd
trigger1 = AnimElem = 4 || AnimElem = 7
;trigger1 = AnimElem = 4 || AnimElem = 7 || AnimElem = 10 || AnimElem = 13
value = 1,0

[State 1300, Basket swing sound (medium)]
type = PlaySnd
trigger1 = AnimElem = 10 || AnimElem = 13
;trigger1 = AnimElem = 16 || AnimElem = 19 || AnimElem = 22 || AnimElem = 25
value = 1,3

[State 1300, Basket swing sound (large)]
type = PlaySnd
trigger1 = AnimElem = 16 || AnimElem = 19
;trigger1 = AnimElem = 28 || AnimElem = 31 || AnimElem = 34 || AnimElem = 37
value = 1,4

[State 1300, Charge]
type = VarAdd
trigger1 = AnimElem = 9
trigger2 = AnimElem = 15
;trigger1 = AnimElem = 15
;trigger2 = AnimElem = 27
var(10) = 10

[State 1300, End]
type = ChangeState
triggerAll = AnimElemTime(3) > 0
trigger1 = (var(10) % 10 = 0) && command != "holdx"
trigger2 = (var(10) % 10 = 1) && command != "holdy"
trigger3 = (var(10) % 10 = 2) && command != "holdz"
trigger4 = !AnimTime
trigger5 = AILevel
value = 1301


;Attack
[StateDef 1301]
type = S
anim = ifElse(var(10) >= 20, 1321, ifElse(var(10) >= 10, 1311, 1301))
physics = N
moveType = A
velSet = 0,0

[State 1301, Voice]
type = PlaySnd
trigger1 = !Time
value = 1300,0
channel = 0

[State 1301, Woosh sound]
type = PlaySnd
trigger1 = AnimElem = 5
value = 1300,1
channel = 1

[State 1301, VelSet]
type = VelSet
trigger1 = AnimElemTime(1) = 1
x = ifElse(var(10) >= 20, 12.5, ifElse(var(10) >= 10, 10, 7.5)) * const(size.xScale)

[State 1301, VelAdd]
type = VelAdd
trigger1 = vel x >= 0
x = ifElse(var(10) >= 20, -1.953125, ifElse(var(10) >= 10, -1.5625, -1.171875)) * const(size.xScale)

[State 1301, VelSet]
type = VelSet
trigger1 = vel x < 0
x = 0

[State 1301, HitDef]
type = HitDef
trigger1 = !var(16) && (var(15) < 1)
trigger1 = AnimElem = 3
attr = S, SA
hitFlag = MAF
guardFlag = M
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * ifElse(var(10) >= 20, 112, ifElse(var(10) >= 10, 105, 98)) < 7, 7, fvar(11) * ifElse(var(10) >= 20, 112, ifElse(var(10) >= 10, 105, 98)))), 7
getPower = ifElse(!var(13), 144, 72) * !var(20), 36 * !var(20)
givePower = 36, 36
pauseTime = 0,12
guard.pauseTime = 0,12
animType = Hard
air.animType = Hard
fall.animType = Hard
ground.type = Low
air.type = Low
ground.hitTime = 18
ground.slideTime = 18
guard.hitTime = 18
air.hitTime = 120
ground.velocity = -3.75, -10
ground.cornerPush.velOff = 0
guard.velocity = -12.64
guard.cornerPush.velOff = 0
air.velocity = -3.75, -10
air.cornerPush.velOff = 0
yAccel = 0.732421875
fall = 1
fall.recover = 1
fall.recoverTime = 120
forceStand = 1
hitSound = -1 + 0 * (var(31) := 2)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 145), var(36) := -55
palFX.time = 12 * var(9)
palFX.add = 255, 255, 255
palFX.sinAdd = -255, -255, -255, 48
envShake.time = 14
envShake.ampl = 4
envShake.freq = 120

[State 1301 Hold AnimElem]
type = ChangeAnim
trigger1 = MoveContact = [1,12]
trigger1 = AnimElemTime(6) >= 0
value = ifElse(var(10) >= 20, 1321, ifElse(var(10) >= 10, 1311, 1301))
elem = 6
ignoreHitPause = 1

[State 1301, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(4) >= 0
moveType = I

[State 1301, ChangeState]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1



;=====================<ES SHYNESS & STRIKE>==========================
[StateDef 1330]
type = S
physics = N
moveType = A
anim = 1330
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = -1000
faceP2 = ifElse((PrevStateNo = [100,105]), 0, 1)

[State 1330, ES Flash]
type = VarSet
trigger1 = !Time
var(25) = 59

[State 1330, ES FX]
type = Explod
trigger1 = !Time
anim = 8210
sprPriority = 3
posType = P1
pos = ceil(15 * const(size.xScale)), ceil(-48 * const(size.yScale))
scale = 0.5, 0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

[State 1330, ES Startup Sound]
type = PlaySnd
trigger1 = !Time
value = 0,1000
channel = 1

[State 1330, Voice]
type = PlaySnd
trigger1 = AnimElem = 6
value = 1330,0
channel = 0

[State 1330, Basket swing sound]
type = PlaySnd
trigger1 = AnimElem = 4
value = 1,4
channel = 3

[State 1330, Woosh sound]
type = PlaySnd
trigger1 = AnimElem = 10
value = 1300,1
channel = 4

[State 1330, Basket]
type = Helper
trigger1 = AnimElem = 3
helperType = Normal
stateNo = 1305
ID = 1335
name = "ES Shyness & Strike Basket"
posType = P1
size.xScale = const(size.xScale)
size.yScale = 1
ownPal = 0

[State 1330, VelSet]
type = VelSet
trigger1 = AnimElemTime(6) = 1
x = 12.5 * const(size.xScale)

[State 1330, VelAdd]
type = VelAdd
trigger1 = vel x >= 0
x = -1.953125 * const(size.xScale)

[State 1330, VelSet]
type = VelSet
trigger1 = vel x < 0
x = 0

[State 1330, HitDef]
type = HitDef
trigger1 = !var(16) && (var(15) < 1)
trigger1 = AnimElem = 8
attr = S, SA
hitFlag = MAF
guardFlag = M
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 133 < 7, 7, fvar(11) * 133)), 7
getPower = 0,0
givePower = 36, 36
pauseTime = 0,12
guard.pauseTime = 0,12
animType = Hard
air.animType = Hard
fall.animType = Hard
ground.type = Low
air.type = Low
ground.hitTime = 18
ground.slideTime = 18
guard.hitTime = 18
air.hitTime = 120
ground.velocity = -3.75, -10
ground.cornerPush.velOff = 0
guard.velocity = -12.64
guard.cornerPush.velOff = 0
air.velocity = -3.75, -10
air.cornerPush.velOff = 0
yAccel = 0.732421875
fall = 1
fall.recover = 1
fall.recoverTime = 120
forceStand = 1
hitSound = -1 + 0 * (var(31) := 2)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 145), var(36) := -55
palFX.time = 12 * var(9)
palFX.add = 255, 255, 255
palFX.sinAdd = -255, -255, -255, 48
envShake.time = 14
envShake.ampl = 4
envShake.freq = 120

[State 1330 Hold AnimElem]
type = ChangeAnim
trigger1 = MoveContact = [1,12]
trigger1 = AnimElemTime(11) >= 0
value = 1330
elem = 11
ignoreHitPause = 1

[State 1330, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(9) >= 0
moveType = I

[State 1330, ChangeState]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1



;=====================<SENTIMENTAL TYPHOON>==========================
[StateDef 1400]
type = S
physics = S
moveType = A
anim = 1400
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = 0
faceP2 = ifElse((PrevStateNo = [100,105]), 0, 1)

[State 1400, AttackDist]
type = AttackDist
trigger1 = 1
value = 0

[State 1400, HitDef]
type = HitDef
trigger1 = AnimElem = 2
trigger1 = P2BodyDist x < 55
trigger1 = !var(38)
attr = S, ST
hitFlag = M-
priority = 7, Miss
getPower = 0,0
givePower = 0,0
sparkNo = -1 +0 * (var(33) := 0)
guard.sparkNo = -1 +0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 40), var(36) := -50
hitSound = -1 +0 * (var(31) := 800)
guardSound = -1 +0 * (var(32) := 0)
fall = 1
fall.recover = 1
numHits = 0
p1StateNo = 1410

[State 1400, Voice (Missed)]
type = PlaySnd
trigger1 = AnimElem = 5
value = 800,0
channel = 0

[State 1400, Woosh Sound]
type = PlaySnd
trigger1 = AnimElem = 5
value = 1,0
channel = 1

[State 1400, Snap Sound]
type = PlaySnd
trigger1 = AnimElem = 6
value = 800,1
channel = 3

[State 1400, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(3) >= 0
moveType = I

[State 1400, End]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1


;Success
[Statedef 1410]
type = S
physics = N
moveType = A
anim = 1410
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = 72 * !var(20)

[State 1410, Lost Target]
type = ChangeState
trigger1 = !Time && !NumTarget
value = 0
ctrl = 1

[State 1410, Throw]
type = TargetState
trigger1 = !Time && NumTarget
value = 1415

[State 1410, ScreenBound]
type = ScreenBound
trigger1 = AnimElemTime(18) >= 0 && AnimElemTime(56) < 0
value = 0
moveCamera = 1,0
ignoreHitPause = 1

[State 1410, BindToTarget (Initial)]
type = BindToTarget
trigger1 = NumTarget
trigger1 = AnimElemTime(16) < 0
pos = ceil(const(size.xScale) * 69),0, Foot
;pos = ceil(const(size.xScale) * 84),0, Foot

[State 1410, BindToTarget (11 o'clock)]
type = BindToTarget
triggerAll = NumTarget
trigger1 = AnimElemTime(16) >= 0 && AnimElemTime(17) < 0
trigger2 = AnimElemTime(21) >= 0 && AnimElemTime(22) < 0
trigger3 = AnimElemTime(26) >= 0 && AnimElemTime(27) < 0
trigger4 = AnimElemTime(31) >= 0 && AnimElemTime(32) < 0
trigger5 = AnimElemTime(36) >= 0 && AnimElemTime(37) < 0
trigger6 = AnimElemTime(41) >= 0 && AnimElemTime(42) < 0
trigger7 = AnimElemTime(46) >= 0 && AnimElemTime(47) < 0
trigger8 = AnimElemTime(51) >= 0 && AnimElemTime(52) < 0
pos = ceil(const(size.xScale) * 29),-2, Foot

[State 1410, BindToTarget (1 o'clock)]
type = BindToTarget
triggerAll = NumTarget
trigger1 = AnimElemTime(17) >= 0 && AnimElemTime(18) < 0
trigger2 = AnimElemTime(22) >= 0 && AnimElemTime(23) < 0
trigger3 = AnimElemTime(27) >= 0 && AnimElemTime(28) < 0
trigger4 = AnimElemTime(32) >= 0 && AnimElemTime(33) < 0
trigger5 = AnimElemTime(37) >= 0 && AnimElemTime(38) < 0
trigger6 = AnimElemTime(44) >= 0 && AnimElemTime(45) < 0
trigger7 = AnimElemTime(49) >= 0 && AnimElemTime(50) < 0
trigger8 = AnimElemTime(54) >= 0 && AnimElemTime(55) < 0
pos = ceil(const(size.xScale) * -29),-2, Foot

[State 1410, BindToTarget (3 o'clock)]
type = BindToTarget
triggerAll = NumTarget
trigger1 = AnimElemTime(18) >= 0 && AnimElemTime(19) < 0
trigger2 = AnimElemTime(23) >= 0 && AnimElemTime(24) < 0
trigger3 = AnimElemTime(28) >= 0 && AnimElemTime(29) < 0
trigger4 = AnimElemTime(33) >= 0 && AnimElemTime(34) < 0
trigger5 = AnimElemTime(38) >= 0 && AnimElemTime(39) < 0
trigger6 = AnimElemTime(42) >= 0 && AnimElemTime(43) < 0
trigger7 = AnimElemTime(47) >= 0 && AnimElemTime(48) < 0
trigger8 = AnimElemTime(52) >= 0 && AnimElemTime(53) < 0
pos = ceil(const(size.xScale) * -64),11, Foot

[State 1410, BindToTarget (6 o'clock)]
type = BindToTarget
triggerAll = NumTarget
trigger1 = AnimElemTime(19) >= 0 && AnimElemTime(20) < 0
trigger2 = AnimElemTime(24) >= 0 && AnimElemTime(25) < 0
trigger3 = AnimElemTime(29) >= 0 && AnimElemTime(30) < 0
trigger4 = AnimElemTime(34) >= 0 && AnimElemTime(35) < 0
trigger5 = AnimElemTime(39) >= 0 && AnimElemTime(40) < 0
trigger6 = AnimElemTime(45) >= 0 && AnimElemTime(46) < 0
trigger7 = AnimElemTime(50) >= 0 && AnimElemTime(51) < 0
trigger8 = AnimElemTime(55) >= 0 && AnimElemTime(56) < 0
pos = ceil(const(size.xScale) * 0),21, Foot

[State 1410, BindToTarget (9 o'clock)]
type = BindToTarget
triggerAll = NumTarget
trigger1 = AnimElemTime(20) >= 0 && AnimElemTime(21) < 0
trigger2 = AnimElemTime(25) >= 0 && AnimElemTime(26) < 0
trigger3 = AnimElemTime(30) >= 0 && AnimElemTime(31) < 0
trigger4 = AnimElemTime(35) >= 0 && AnimElemTime(36) < 0
trigger5 = AnimElemTime(40) >= 0 && AnimElemTime(41) < 0
trigger6 = AnimElemTime(43) >= 0 && AnimElemTime(44) < 0
trigger7 = AnimElemTime(48) >= 0 && AnimElemTime(49) < 0
trigger8 = AnimElemTime(53) >= 0 && AnimElemTime(54) < 0
pos = ceil(const(size.xScale) * 64),11, Foot

[State 1410, BindToTarget (final)]
type = BindToTarget
triggerAll = NumTarget
trigger1 = AnimElemTime(56) = 0
pos = ceil(const(size.xScale) * 36),0, Foot

[State 1410, Voice 1]
type = PlaySnd
trigger1 = !Time
value = 20,0
channel = 0

[State 1410, Sparkle sound]
type = PlaySnd
trigger1 = AnimElem = 14
value = 193,1
channel = 1

[State 1410, Eye glare]
type = Explod
trigger1 = AnimElem = 14
anim = 1412
sprPriority = 2
posType = P1
pos = ceil(1 * const(size.xScale)), 0
scale = const(size.xScale), 1
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1410, Voice 2]
type = PlaySnd
trigger1 = AnimElem = 16
value = 1410,0
channel = 0

[State 1410, Wind sound]
type = PlaySnd
trigger1 = AnimElem = 16
value = 1410,1
channel = 3

[State 1410, Voice 3]
type = PlaySnd
trigger1 = AnimElem = 56
value = 4,1
channel = 0

[State 1410, Center vortex (top layer)]
type = Explod
trigger1 = Time = 80
anim = 11400
sprPriority = 4
posType = P2
facing = -1
pos = -1, 0
scale = const(size.xScale) * 0.5,0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1410, Center vortex (bottom layer)]
type = Explod
trigger1 = Time = 80
anim = 21400
sprPriority = 4
posType = P2
facing = -1
pos = -1, 0
scale = const(size.xScale) * 0.5,0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1410, Lowest ring (top layer)]
type = Explod
trigger1 = Time = 52
anim = 11410
bindTime = 8     ;in case P2 moves during first spin
sprPriority = 3
posType = P2
facing = -1
pos = 0, 16
scale = const(size.xScale) * 0.5,0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1410, Lowest ring (bottom layer)]
type = Explod
trigger1 = Time = 52
anim = 21410
bindTime = 8     ;in case P2 moves during first spin
sprPriority = 3
posType = P2
facing = -1
pos = 0, 16
scale = const(size.xScale) * 0.5,0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1410, 2nd lowest ring (top layer)]
type = Explod
trigger1 = Time = 64
anim = 11411
sprPriority = 3
posType = P2
facing = -1
pos = -7, -8
scale = const(size.xScale) * 0.5,0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1410, 2nd lowest ring (top layer)]
type = Explod
trigger1 = Time = 64
anim = 21411
sprPriority = 3
posType = P2
facing = -1
pos = -7, -8
scale = const(size.xScale) * 0.5,0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1410, 3rd lowest ring (top layer)]
type = Explod
trigger1 = Time = 78
anim = 11412
sprPriority = 3
posType = P2
facing = -1
pos = -1, -48
scale = const(size.xScale) * 0.5,0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1410, 3rd lowest ring (bottom layer)]
type = Explod
trigger1 = Time = 78
anim = 21412
sprPriority = 3
posType = P2
facing = -1
pos = -1, -48
scale = const(size.xScale) * 0.5,0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1410, Lower middle ring (top layer)]
type = Explod
trigger1 = Time = 98
anim = 11413
sprPriority = 3
posType = P2
facing = -1
pos = -26, -72
scale = const(size.xScale) * 0.5,0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1410, Lower middle ring (bottom layer)]
type = Explod
trigger1 = Time = 98
anim = 21413
sprPriority = 3
posType = P2
facing = -1
pos = -26, -72
scale = const(size.xScale) * 0.5,0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1410, Upper middle ring (top layer)]
type = Explod
trigger1 = Time = 99
anim = 11414
sprPriority = 3
posType = P2
facing = -1
pos = -39, -96
scale = const(size.xScale) * 0.5,0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1410, Upper middle ring (bottom layer)]
type = Explod
trigger1 = Time = 99
anim = 21414
sprPriority = 3
posType = P2
facing = -1
pos = -39, -96
scale = const(size.xScale) * 0.5,0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1410, 3rd uppermost ring (top layer)]
type = Explod
trigger1 = Time = 100
anim = 11415
sprPriority = 3
posType = P2
facing = -1
pos = -33, -120
scale = const(size.xScale) * 0.5,0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1410, 3rd uppermost ring (bottom layer)]
type = Explod
trigger1 = Time = 100
anim = 21415
sprPriority = 3
posType = P2
facing = -1
pos = -33, -120
scale = const(size.xScale) * 0.5,0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1410, 2nd uppermost ring (top layer)]
type = Explod
trigger1 = Time = 101;100
anim = 11416
sprPriority = 3
posType = P2
facing = -1
pos = -14, -144
scale = const(size.xScale) * 0.5,0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1410, 2nd uppermost ring (bottom layer)]
type = Explod
trigger1 = Time = 101;100
anim = 21416
sprPriority = 3
posType = P2
facing = -1
pos = -14, -144
scale = const(size.xScale) * 0.5,0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1410, Uppermost ring (top layer)]
type = Explod
trigger1 = Time = 102;101
anim = 11417
sprPriority = 3
posType = P2
facing = -1
pos = -7, -168
scale = const(size.xScale) * 0.5,0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1410, Uppermost ring (bottom layer)]
type = Explod
trigger1 = Time = 102;101
anim = 21417
sprPriority = 3
posType = P2
facing = -1
pos = -7, -168
scale = const(size.xScale) * 0.5,0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1410, Afterimage Helper]
type = Helper
trigger1 = AnimElem = 39
helperType = Normal
stateNo = 1413
ID = 1413
name = "Sentimental Typhoon Afterimage Helper"
posType = P1
pos = 0,-21
size.xScale = const(size.xScale)
size.yScale = const(size.yScale)
ownPal = 1

[State 1410, StateTypeSet: Air, Physics: None]
type = StateTypeSet
trigger1 = AnimElemTime(56) = 2
stateType = A
physics = N

[State 1410, Dust Helper]
type = Helper
trigger1 = AnimElemTime(56) = 2
helperType = Normal
stateNo = 8100
ID = 8100
name = "Sentimental Typhoon Dust"
posType = P1
ownPal = 1

[State 1410, VelSet]
type = VelSet
trigger1 = AnimElemTime(56) = 2
x = -5 * const(size.xScale)
y = -7.5

[State 1410, VelAdd]
type = VelAdd
trigger1 = AnimElemTime(56) >= 2
x = 0.048828125 * const(size.xScale)
y = 0.390625

[State 1410, Damage]
type = TargetLifeAdd
trigger1 = NumTarget && AnimElem = 56
value = floor(ifElse(161 * fvar(11) < 7, -7, -161 * fvar(11)))

[State 1410, TargetPowerAdd]
type = TargetPowerAdd
trigger1 = NumTarget && AnimElem = 56
value = 36

[State 1410, Power]
type = PowerAdd
trigger1 = NumTarget && AnimElem = 56 && !var(20)
value = 72

[State 1410, HitAdd]
type = HitAdd
trigger1 = NumTarget && AnimElem = 56
value = 1

[State 1410, VarAdd]
type = VarAdd
trigger1 = NumTarget && AnimElem = 56
var(13) = 1

[State 1410, Juggle]
type = VarAdd
trigger1 = NumTarget && AnimElem = 56
var(15) = 1
ignoreHitPause = 1

[State 1410, Juggle]
type = VarSet
trigger1 = NumTarget && AnimElem = 56
var(16) = 1
ignoreHitPause = 1

[State 1410, Throw]
type = TargetState
trigger1 = NumTarget && AnimElem = 56
value = 1416

[State 1410, End]
type = ChangeState
trigger1 = pos y > -vel y && AnimElemTime(56) >= 0
value = 1411


;Landing
[StateDef 1411]
type = S
anim = 1411
physics = N
moveType = I
velSet = 0,0

[State 1411, PosSet]
type = PosSet
trigger1 = 1
y = 0

[State 1411, Landing Dust Explod]
type = Explod
trigger1 = !Time
anim = 8102
sprPriority = -3
posType = P1
scale = 0.5,0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

[State 1411, Landing Sound]
type = PlaySnd
trigger1 = !Time
value = 52,0
channel = 4

[State 1411, End]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1



;===========<SENTIMETNAL TYPHOON (TARGET)>==========
;Being Thrown
[StateDef 1415]
type = A
moveType = H
physics = N
velSet = 0,0
sprPriority = 0

[State 1415, ChangeAnim2]
type = ChangeAnim2
trigger1 = !Time
value = 1415

[State 1415, Turn]
type = Turn
trigger1 = !Time
trigger1 = NumEnemy
trigger1 = Facing = EnemyNear, Facing
ignoreHitPause = 1

[State 1415, ScreenBound]
type = ScreenBound
trigger1 = AnimElemTime(5) >= 0
value = 0
moveCamera = 1,0
ignoreHitPause = 1

[State 1415, SprPriority]
type = SprPriority
trigger1 = 1
value = 0

[State 1415, SprPriority]
type = SprPriority
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(4) < 0
trigger2 = AnimElemTime(7) >= 0 && AnimElemTime(9) < 0
trigger3 = AnimElemTime(12) >= 0 && AnimElemTime(14) < 0
trigger4 = AnimElemTime(17) >= 0 && AnimElemTime(19) < 0
trigger5 = AnimElemTime(22) >= 0 && AnimElemTime(24) < 0
trigger6 = AnimElemTime(27) >= 0 && AnimElemTime(28) < 0
trigger7 = AnimElemTime(30) >= 0 && AnimElemTime(31) < 0
trigger8 = AnimElemTime(32) >= 0 && AnimElemTime(33) < 0
trigger9 = AnimElemTime(35) >= 0 && AnimElemTime(36) < 0
trigger10 = AnimElemTime(37) >= 0 && AnimElemTime(38) < 0
trigger11 = AnimElemTime(40) >= 0 && AnimElemTime(41) < 0
value = 2


;After Throw
[StateDef 1416]
type = A
moveType = H
physics = N
velSet = 0,0
sprPriority = 0

[State 1416, ChangeAnim]
type = ChangeAnim
trigger1 = !Time
value = 5070

[State 1416, Turn]
type = Turn
trigger1 = !Time
trigger1 = NumEnemy
trigger1 = Facing = EnemyNear, Facing
ignoreHitPause = 1

[State 1416, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0
moveCamera = 0,0
ignoreHitPause = 1

[State 1416, VelAdd]
type = VelAdd
trigger1 = Time > 2 && Time < 19
y = -1.953125

[State 1416, VelSet]
type = VelSet
trigger1 = Time = 19
y = 0

[State 1416, PosSet]
type = PosSet
trigger1 = Time = 19
y = -276

[State 1416, VelSet]
type = VelSet
trigger1 = Time = 57
y = 15

[State 1416, ChangeAnim (horiztonal spinning)]
type = ChangeAnim
trigger1 = Time = 52
trigger1 = SelfAnimExist(7008)
value = 7008

[State 1416, ChangeAnim (vertical spinning)]
type = ChangeAnim
trigger1 = Time = 52
trigger1 = !SelfAnimExist(7008) && SelfAnimExist(5251)
value = 5251

[State 1416, ChangeAnim (generic)]
type = ChangeAnim
trigger1 = Time = 19
trigger1 = !SelfAnimExist(7008) && !SelfAnimExist(5251)
value = 5160

[State 1416, Turn]
type = Turn
trigger1 = SelfAnimExist(7008) || SelfAnimExist(5251)
trigger1 = Alive
trigger1 = command = "recovery"
trigger1 = vel y > 0 && pos y >= const(movement.air.getHit.groundRecover.ground.threshold)
trigger2 = SelfAnimExist(7008)
trigger2 = pos y > -vel y
trigger3 = SelfAnimExist(5251)
trigger3 = vel y > 0
trigger3 = pos y >= const(movement.down.bounce.groundlevel)
trigger4 = Time = 19 && !SelfAnimExist(7008) && !SelfAnimExist(5251)

[State 1416, Recover]
type = SelfState
trigger1 = Alive
trigger1 = command = "recovery"
trigger1 = vel y > 0 && pos y >= const(movement.air.getHit.groundRecover.ground.threshold)
value = 5200

[State 1416, End]
type = ChangeState
trigger1 = vel y > 0
trigger1 = pos y >= const(movement.down.bounce.groundlevel)
trigger2 = pos y > -vel y && SelfAnimExist(7008)
value = 818



;=====================<SENTIMENTAL TYPHOON>==========================
[StateDef 1430]
type = S
physics = S
moveType = A
anim = 1400
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = -1000
faceP2 = ifElse((PrevStateNo = [100,105]), 0, 1)

[State 1430, ES Flash]
type = VarSet
trigger1 = !Time
var(25) = 30

[State 1430, ES FX]
type = Explod
trigger1 = !Time
anim = 8210
sprPriority = 3
posType = P1
pos = ceil(63 * const(size.xScale)), ceil(-71 * const(size.yScale))
scale = 0.5, 0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

[State 1430, ES Startup Sound]
type = PlaySnd
trigger1 = !Time
value = 0,1000
channel = 1

[State 1430, AttackDist]
type = AttackDist
trigger1 = 1
value = 0

[State 1430, HitDef]
type = HitDef
trigger1 = AnimElem = 2
trigger1 = P2BodyDist x < 55
trigger1 = !var(38)
attr = S, ST
hitFlag = M-
priority = 7, Miss
getPower = 0,0
givePower = 0,0
sparkNo = -1 +0 * (var(33) := 0)
guard.sparkNo = -1 +0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 40), var(36) := -50
hitSound = -1 +0 * (var(31) := 800)
guardSound = -1 +0 * (var(32) := 0)
fall = 1
fall.recover = 1
numHits = 0
p1StateNo = 1440

[State 1430, Voice (Missed)]
type = PlaySnd
trigger1 = AnimElem = 5
value = 800,0
channel = 0

[State 1430, Woosh Sound]
type = PlaySnd
trigger1 = AnimElem = 5
value = 1,0
channel = 3

[State 1430, Snap Sound]
type = PlaySnd
trigger1 = AnimElem = 6
value = 800,1
channel = 3

[State 1430, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(3) >= 0
moveType = I

[State 1430, End]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1


;Success
[Statedef 1440]
type = S
physics = N
moveType = A
anim = 1440
ctrl = 0
velSet = 0,0
sprPriority = 1

[State 1440, Lost Target]
type = ChangeState
trigger1 = !Time && !NumTarget
value = 0
ctrl = 1

[State 1440, ES Flash]
type = VarSet
trigger1 = !Time
var(25) = 202

[State 1440, Throw]
type = TargetState
trigger1 = !Time && NumTarget
value = 1445

[State 1440, ScreenBound]
type = ScreenBound
trigger1 = AnimElemTime(18) >= 0 && AnimElemTime(101) < 0
value = 0
moveCamera = 1,0
ignoreHitPause = 1

[State 1440, BindToTarget (Initial)]
type = BindToTarget
trigger1 = NumTarget
trigger1 = AnimElemTime(16) < 0
pos = ceil(const(size.xScale) * 69),0, Foot
 ;pos = ceil(const(size.xScale) * 84),0, Foot

[State 1440, BindToTarget (11 o'clock)]
type = BindToTarget
triggerAll = NumTarget
trigger1 = AnimElemTime(16) >= 0 && AnimElemTime(17) < 0
trigger2 = AnimElemTime(21) >= 0 && AnimElemTime(22) < 0
trigger3 = AnimElemTime(26) >= 0 && AnimElemTime(27) < 0
trigger4 = AnimElemTime(31) >= 0 && AnimElemTime(32) < 0
trigger5 = AnimElemTime(36) >= 0 && AnimElemTime(37) < 0
trigger6 = AnimElemTime(41) >= 0 && AnimElemTime(42) < 0
trigger7 = AnimElemTime(46) >= 0 && AnimElemTime(47) < 0
trigger8 = AnimElemTime(51) >= 0 && AnimElemTime(52) < 0
trigger9 = AnimElemTime(56) >= 0 && AnimElemTime(57) < 0
trigger10 = AnimElemTime(61) >= 0 && AnimElemTime(62) < 0
trigger11 = AnimElemTime(69) >= 0 && AnimElemTime(70) < 0
trigger12 = AnimElemTime(77) >= 0 && AnimElemTime(78) < 0
trigger13 = AnimElemTime(85) >= 0 && AnimElemTime(86) < 0
trigger14 = AnimElemTime(93) >= 0 && AnimElemTime(94) < 0
pos = ceil(const(size.xScale) * 29),-2, Foot

[State 1440, BindToTarget (1 o'clock)]
type = BindToTarget
triggerAll = NumTarget
trigger1 = AnimElemTime(17) >= 0 && AnimElemTime(18) < 0
trigger2 = AnimElemTime(22) >= 0 && AnimElemTime(23) < 0
trigger3 = AnimElemTime(27) >= 0 && AnimElemTime(28) < 0
trigger4 = AnimElemTime(32) >= 0 && AnimElemTime(33) < 0
trigger5 = AnimElemTime(37) >= 0 && AnimElemTime(38) < 0
trigger6 = AnimElemTime(42) >= 0 && AnimElemTime(43) < 0
trigger7 = AnimElemTime(47) >= 0 && AnimElemTime(48) < 0
trigger8 = AnimElemTime(52) >= 0 && AnimElemTime(53) < 0
trigger9 = AnimElemTime(57) >= 0 && AnimElemTime(58) < 0
trigger10 = AnimElemTime(62) >= 0 && AnimElemTime(63) < 0
trigger11 = AnimElemTime(68) >= 0 && AnimElemTime(69) < 0
trigger12 = AnimElemTime(72) >= 0 && AnimElemTime(73) < 0
trigger13 = AnimElemTime(76) >= 0 && AnimElemTime(77) < 0
trigger14 = AnimElemTime(80) >= 0 && AnimElemTime(81) < 0
trigger15 = AnimElemTime(84) >= 0 && AnimElemTime(85) < 0
trigger16 = AnimElemTime(88) >= 0 && AnimElemTime(89) < 0
trigger17 = AnimElemTime(92) >= 0 && AnimElemTime(93) < 0
trigger18 = AnimElemTime(96) >= 0 && AnimElemTime(97) < 0
pos = ceil(const(size.xScale) * -29),-2, Foot

[State 1440, BindToTarget (3 o'clock)]
type = BindToTarget
triggerAll = NumTarget
trigger1 = AnimElemTime(18) >= 0 && AnimElemTime(19) < 0
trigger2 = AnimElemTime(23) >= 0 && AnimElemTime(24) < 0
trigger3 = AnimElemTime(28) >= 0 && AnimElemTime(29) < 0
trigger4 = AnimElemTime(33) >= 0 && AnimElemTime(34) < 0
trigger5 = AnimElemTime(38) >= 0 && AnimElemTime(39) < 0
trigger6 = AnimElemTime(43) >= 0 && AnimElemTime(44) < 0
trigger7 = AnimElemTime(48) >= 0 && AnimElemTime(49) < 0
trigger8 = AnimElemTime(53) >= 0 && AnimElemTime(54) < 0
trigger9 = AnimElemTime(58) >= 0 && AnimElemTime(59) < 0
trigger10 = AnimElemTime(63) >= 0 && AnimElemTime(64) < 0
trigger11 = AnimElemTime(66) >= 0 && AnimElemTime(67) < 0
trigger12 = AnimElemTime(70) >= 0 && AnimElemTime(71) < 0
trigger13 = AnimElemTime(74) >= 0 && AnimElemTime(75) < 0
trigger14 = AnimElemTime(78) >= 0 && AnimElemTime(79) < 0
trigger15 = AnimElemTime(82) >= 0 && AnimElemTime(83) < 0
trigger16 = AnimElemTime(86) >= 0 && AnimElemTime(87) < 0
trigger17 = AnimElemTime(90) >= 0 && AnimElemTime(91) < 0
trigger18 = AnimElemTime(94) >= 0 && AnimElemTime(95) < 0
trigger19 = AnimElemTime(98) >= 0 && AnimElemTime(99) < 0
pos = ceil(const(size.xScale) * -64),11, Foot

[State 1440, BindToTarget (6 o'clock)]
type = BindToTarget
triggerAll = NumTarget
trigger1 = AnimElemTime(19) >= 0 && AnimElemTime(20) < 0
trigger2 = AnimElemTime(24) >= 0 && AnimElemTime(25) < 0
trigger3 = AnimElemTime(29) >= 0 && AnimElemTime(30) < 0
trigger4 = AnimElemTime(34) >= 0 && AnimElemTime(35) < 0
trigger5 = AnimElemTime(39) >= 0 && AnimElemTime(40) < 0
trigger6 = AnimElemTime(44) >= 0 && AnimElemTime(45) < 0
trigger7 = AnimElemTime(49) >= 0 && AnimElemTime(50) < 0
trigger8 = AnimElemTime(54) >= 0 && AnimElemTime(55) < 0
trigger9 = AnimElemTime(59) >= 0 && AnimElemTime(60) < 0
trigger10 = AnimElemTime(64) >= 0 && AnimElemTime(65) < 0
trigger11 = AnimElemTime(73) >= 0 && AnimElemTime(74) < 0
trigger12 = AnimElemTime(81) >= 0 && AnimElemTime(82) < 0
trigger13 = AnimElemTime(89) >= 0 && AnimElemTime(90) < 0
trigger14 = AnimElemTime(97) >= 0 && AnimElemTime(98) < 0
trigger15 = AnimElemTime(100) >= 0 && AnimElemTime(101) < 0
pos = ceil(const(size.xScale) * 0),21, Foot

[State 1440, BindToTarget (9 o'clock)]
type = BindToTarget
triggerAll = NumTarget
trigger1 = AnimElemTime(20) >= 0 && AnimElemTime(21) < 0
trigger2 = AnimElemTime(25) >= 0 && AnimElemTime(26) < 0
trigger3 = AnimElemTime(30) >= 0 && AnimElemTime(31) < 0
trigger4 = AnimElemTime(35) >= 0 && AnimElemTime(36) < 0
trigger5 = AnimElemTime(40) >= 0 && AnimElemTime(41) < 0
trigger6 = AnimElemTime(45) >= 0 && AnimElemTime(46) < 0
trigger7 = AnimElemTime(50) >= 0 && AnimElemTime(51) < 0
trigger8 = AnimElemTime(55) >= 0 && AnimElemTime(56) < 0
trigger9 = AnimElemTime(60) >= 0 && AnimElemTime(61) < 0
trigger10 = AnimElemTime(65) >= 0 && AnimElemTime(66) < 0
trigger11 = AnimElemTime(67) >= 0 && AnimElemTime(68) < 0
trigger12 = AnimElemTime(71) >= 0 && AnimElemTime(72) < 0
trigger13 = AnimElemTime(75) >= 0 && AnimElemTime(76) < 0
trigger14 = AnimElemTime(79) >= 0 && AnimElemTime(80) < 0
trigger15 = AnimElemTime(83) >= 0 && AnimElemTime(84) < 0
trigger16 = AnimElemTime(87) >= 0 && AnimElemTime(88) < 0
trigger17 = AnimElemTime(91) >= 0 && AnimElemTime(92) < 0
trigger18 = AnimElemTime(95) >= 0 && AnimElemTime(96) < 0
trigger19 = AnimElemTime(99) >= 0 && AnimElemTime(100) < 0
pos = ceil(const(size.xScale) * 64),11, Foot

[State 1440, BindToTarget (final)]
type = BindToTarget
triggerAll = NumTarget
trigger1 = AnimElemTime(101) = 0
pos = ceil(const(size.xScale) * 36),0, Foot

[State 1440, Voice 1]
type = PlaySnd
trigger1 = !Time
value = 20,0
channel = 0

[State 1440, Sparkle sound]
type = PlaySnd
trigger1 = AnimElem = 14
value = 193,1
channel = 1

[State 1440, Eye glare]
type = Explod
trigger1 = AnimElem = 14
anim = 1412
sprPriority = 2
posType = P1
pos = ceil(1 * const(size.xScale)), 0
scale = const(size.xScale), 1
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1440, Voice 2]
type = PlaySnd
trigger1 = AnimElem = 16
value = 1410,0
channel = 0

[State 1440, Wind sound]
type = PlaySnd
trigger1 = AnimElem = 16
value = 1410,1
channel = 3

[State 1440, Voice 3]
type = PlaySnd
trigger1 = AnimElem = 101
value = 4,1
channel = 0

[State 1440, Center vortex (top layer)]
type = Explod
trigger1 = Time = 80
anim = 11400
sprPriority = 4
posType = P2
facing = -1
pos = -1, 0
scale = const(size.xScale) * 0.5,0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1440, Center vortex (bottom layer)]
type = Explod
trigger1 = Time = 80
anim = 21400
sprPriority = 4
posType = P2
facing = -1
pos = -1, 0
scale = const(size.xScale) * 0.5,0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1440, Lowest ring (top layer)]
type = Explod
trigger1 = Time = 52
anim = 11440
bindTime = 8     ;in case P2 moves during first spin
sprPriority = 3
posType = P2
facing = -1
pos = 0, 16
scale = const(size.xScale) * 0.5,0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1440, Lowest ring (bottom layer)]
type = Explod
trigger1 = Time = 52
anim = 21440
bindTime = 8     ;in case P2 moves during first spin
sprPriority = 3
posType = P2
facing = -1
pos = 0, 16
scale = const(size.xScale) * 0.5,0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1440, 2nd lowest ring (top layer)]
type = Explod
trigger1 = Time = 64
anim = 11411
sprPriority = 3
posType = P2
facing = -1
pos = -7, -8
scale = const(size.xScale) * 0.5,0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1440, 2nd lowest ring (top layer)]
type = Explod
trigger1 = Time = 64
anim = 21411
sprPriority = 3
posType = P2
facing = -1
pos = -7, -8
scale = const(size.xScale) * 0.5,0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1440, 3rd lowest ring (top layer)]
type = Explod
trigger1 = Time = 78
anim = 11412
sprPriority = 3
posType = P2
facing = -1
pos = -1, -48
scale = const(size.xScale) * 0.5,0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1440, 3rd lowest ring (bottom layer)]
type = Explod
trigger1 = Time = 78
anim = 21412
sprPriority = 3
posType = P2
facing = -1
pos = -1, -48
scale = const(size.xScale) * 0.5,0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1440, Lower middle ring (top layer)]
type = Explod
trigger1 = Time = 98
anim = 11413
sprPriority = 3
posType = P2
facing = -1
pos = -26, -72
scale = const(size.xScale) * 0.5,0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1440, Lower middle ring (bottom layer)]
type = Explod
trigger1 = Time = 98
anim = 21413
sprPriority = 3
posType = P2
facing = -1
pos = -26, -72
scale = const(size.xScale) * 0.5,0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1440, Upper middle ring (top layer)]
type = Explod
trigger1 = Time = 99
anim = 11414
sprPriority = 3
posType = P2
facing = -1
pos = -39, -96
scale = const(size.xScale) * 0.5,0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1440, Upper middle ring (bottom layer)]
type = Explod
trigger1 = Time = 99
anim = 21414
sprPriority = 3
posType = P2
facing = -1
pos = -39, -96
scale = const(size.xScale) * 0.5,0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1440, 3rd uppermost ring (top layer)]
type = Explod
trigger1 = Time = 100
anim = 11415
sprPriority = 3
posType = P2
facing = -1
pos = -33, -120
scale = const(size.xScale) * 0.5,0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1440, 3rd uppermost ring (bottom layer)]
type = Explod
trigger1 = Time = 100
anim = 21415
sprPriority = 3
posType = P2
facing = -1
pos = -33, -120
scale = const(size.xScale) * 0.5,0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1440, 2nd uppermost ring (top layer)]
type = Explod
trigger1 = Time = 101;100
anim = 11416
sprPriority = 3
posType = P2
facing = -1
pos = -14, -144
scale = const(size.xScale) * 0.5,0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1440, 2nd uppermost ring (bottom layer)]
type = Explod
trigger1 = Time = 101;100
anim = 21416
sprPriority = 3
posType = P2
facing = -1
pos = -14, -144
scale = const(size.xScale) * 0.5,0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1440, Uppermost ring (top layer)]
type = Explod
trigger1 = Time = 102;101
anim = 11417
sprPriority = 3
posType = P2
facing = -1
pos = -7, -168
scale = const(size.xScale) * 0.5,0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1440, Uppermost ring (bottom layer)]
type = Explod
trigger1 = Time = 102;101
anim = 21417
sprPriority = 3
posType = P2
facing = -1
pos = -7, -168
scale = const(size.xScale) * 0.5,0.5
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1440, Afterimage Helper]
type = Helper
trigger1 = AnimElem = 64
helperType = Normal
stateNo = 1413
ID = 1443
name = "Sentimental Typhoon Afterimage Helper"
posType = P1
pos = 0,-21
size.xScale = const(size.xScale)
size.yScale = const(size.yScale)
ownPal = 1

[State 1440, StateTypeSet: Air, Physics: None]
type = StateTypeSet
trigger1 = AnimElemTime(101) = 2
stateType = A
physics = N

[State 1440, Dust Helper]
type = Helper
trigger1 = AnimElemTime(101) = 2
helperType = Normal
stateNo = 8100
ID = 8100
name = "Sentimental Typhoon Dust"
posType = P1
ownPal = 1

[State 1440, VelSet]
type = VelSet
trigger1 = AnimElemTime(101) = 2
x = -5 * const(size.xScale)
y = -7.5

[State 1440, VelAdd]
type = VelAdd
trigger1 = AnimElemTime(101) >= 2
x = 0.048828125 * const(size.xScale)
y = 0.390625

[State 1440, Damage]
type = TargetLifeAdd
trigger1 = NumTarget && AnimElem = 101
value = floor(ifElse(182 * fvar(11) < 7, -7, -182 * fvar(11)))

[State 1440, TargetPowerAdd]
type = TargetPowerAdd
trigger1 = NumTarget && AnimElem = 101
value = 36

[State 1440, HitAdd]
type = HitAdd
trigger1 = NumTarget && AnimElem = 101
value = 1

[State 1440, VarAdd]
type = VarAdd
trigger1 = NumTarget && AnimElem = 101
var(13) = 1

[State 1440, Juggle]
type = VarAdd
trigger1 = NumTarget && AnimElem = 101
var(15) = 1
ignoreHitPause = 1

[State 1440, Juggle]
type = VarSet
trigger1 = NumTarget && AnimElem = 101
var(16) = 1
ignoreHitPause = 1

[State 1440, Throw]
type = TargetState
trigger1 = NumTarget && AnimElem = 101
value = 1416

[State 1440, End]
type = ChangeState
trigger1 = pos y > -vel y && AnimElemTime(101) >= 0
value = 1411



;===========<ES SENTIMETNAL TYPHOON (TARGET)>==========
;Being Thrown
[StateDef 1445]
type = A
moveType = H
physics = N
velSet = 0,0
sprPriority = 0

[State 1445, ChangeAnim2]
type = ChangeAnim2
trigger1 = !Time
value = 1445

[State 1445, Turn]
type = Turn
trigger1 = !Time
trigger1 = NumEnemy
trigger1 = Facing = EnemyNear, Facing
ignoreHitPause = 1

[State 1445, ScreenBound]
type = ScreenBound
trigger1 = AnimElemTime(5) >= 0
value = 0
moveCamera = 1,0
ignoreHitPause = 1

[State 1445, SprPriority]
type = SprPriority
trigger1 = 1
value = 0

[State 1445, SprPriority]
type = SprPriority
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(4) < 0
trigger2 = AnimElemTime(7) >= 0 && AnimElemTime(9) < 0
trigger3 = AnimElemTime(12) >= 0 && AnimElemTime(14) < 0
trigger4 = AnimElemTime(17) >= 0 && AnimElemTime(19) < 0
trigger5 = AnimElemTime(22) >= 0 && AnimElemTime(24) < 0
trigger6 = AnimElemTime(27) >= 0 && AnimElemTime(29) < 0
trigger7 = AnimElemTime(32) >= 0 && AnimElemTime(34) < 0
trigger8 = AnimElemTime(37) >= 0 && AnimElemTime(39) < 0
trigger9 = AnimElemTime(42) >= 0 && AnimElemTime(44) < 0
trigger10 = AnimElemTime(47) >= 0 && AnimElemTime(49) < 0
trigger11 = AnimElemTime(54) >= 0 && AnimElemTime(56) < 0
trigger12 = AnimElemTime(58) >= 0 && AnimElemTime(59) < 0
trigger13 = AnimElemTime(62) >= 0 && AnimElemTime(64) < 0
trigger14 = AnimElemTime(66) >= 0 && AnimElemTime(67) < 0
trigger15 = AnimElemTime(70) >= 0 && AnimElemTime(72) < 0
trigger16 = AnimElemTime(74) >= 0 && AnimElemTime(75) < 0
trigger17 = AnimElemTime(78) >= 0 && AnimElemTime(80) < 0
trigger18 = AnimElemTime(82) >= 0 && AnimElemTime(83) < 0
value = 2



;========================<LAW OF THE BULLET>=============================
[StateDef 1500]
type = S
physics = N
moveType = A
anim = 1500
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = 36 * !var(20)
faceP2 = 1

[State 1500, Voice]
type = PlaySnd
trigger1 = !Time
value = 4,0
channel = 0

[State 1500, Jump Sound]
type = PlaySnd
trigger1 = AnimElem = 2
value = 40,0
channel = 1

[State 1500, StateTypeSet: Air, Physics: None]
type = StateTypeSet
trigger1 = AnimElem = 2
stateType = A
physics = N

[State 1500, Dust Helper]
type = Helper
trigger1 = AnimElem = 2
helperType = Normal
stateNo = 8100
ID = 8100
name = "Law of the Bullet Dust"
posType = P1
ownPal = 1

[State 1500, VarSet]
type = VarSet
trigger1 = AnimElem = 3
fvar(0) = (P2dist x / 27)

[State 1500, VelSet]
type = VelSet
trigger1 = AnimElem = 3
x = ifElse(EnemyNear, MoveType = H, fvar(0) - (EnemyNear, vel x) * ifElse(Facing = EnemyNear, Facing, -0.25, 1) / 1.5, fvar(0))
y = -10

[State 1500, VelAdd]
type = VelAdd
trigger1 = AnimElemTime(3) > 0
y = 0.78125

[State 1500, HitDef]
type = HitDef
trigger1 = AnimElem = 7
ID = 1500
attr = A, SA
hitFlag = FD
guardFlag = L
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 14 < 7, 7, fvar(11) * 14)), 0
getPower = ifElse(!var(13), 72, 36) * !var(20), 12 * !var(20)
givePower = 36, 36
pauseTime = 0, 12
guard.pauseTime = 0, 12
animType = Hard
air.animType = Back
fall.animType = Back
ground.type = High
air.type = Low
ground.hitTime = 18
ground.slideTime = 18
guard.hitTime = 18
air.hitTime = 18
ground.velocity = 0, 0
ground.cornerPush.velOff = 0
guard.velocity = 0
guard.cornerPush.velOff = 0
air.velocity = 0, -7.73
air.cornerPush.velOff = 0
down.velocity = 0, 0
down.cornerpush.veloff = 0
yAccel = 0.58
fall = 0
fall.recover = 1
fall.recoverTime = 18
hitSound = -1 + 0 * (var(31) := 5)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 9), var(36) := -10
palFX.time = 12 * var(9)
palFX.add = 255, 255, 255
palFX.sinAdd= -255, -255, -255, 48
envshake.time = 14
envshake.ampl = 4
envshake.freq = 120
kill = 0

[State 1500, TargetDrop]
type = TargetDrop
trigger1 = NumTarget(1500) > 1
ID = 1500
keepOne = 1
excludeID = 1500
ignoreHitPause = 1

[State 1500, TargetBind]
type = TargetBind
triggerAll = NumTarget(1500)
trigger1 = P2Dist x < -15 || P2Dist x > 50
time = 1
ID = 1500
pos = ifElse(P2Dist x > 50, 50, -15),0
ignoreHitPause = 1
persistent = 0

[State 1500, TargetState]
type = TargetState
trigger1 = NumTarget(1500)
value = 1505
ID = 1500
ignoreHitPause = 1
persistent = 0

[State 1500, Finish]
type = ChangeState
trigger1 = MoveHit && NumTarget(1500)
value = 1501

[State 1500, End]
type = ChangeState
trigger1 = pos y > -vel y
value = 1502


;Finish
[StateDef 1501]
type = A
physics = N
moveType = A
ctrl = 0
velSet = 0,0
sprPriority = 1
hitCountPersist = 1

[State 1501, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0
ignoreHitPause = 1

[State 1501, BindToTarget]
type = PosAdd
trigger1 = P2Dist x < -20 || P2Dist x > 20
trigger1 = !Time
x = ifElse(P2Dist x > 20, P2dist x - 20, P2dist x + 20)

[State 1501, PosSet (initial)]
type = PosSet
trigger1 = !Time
y = -7

[State 1501, PosSet (attack start)]
type = PosSet
trigger1 = NumTarget(1500)
trigger1 = Time = 12
x = Target(1500), pos x

[State 1501, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 12
value = 1501

[State 1501, Gunfire recoil effect (propelled into air)]
type = VelAdd
trigger1 = Anim = 1501
trigger1 = AnimElem = 3 || AnimElem = 5 || AnimElem = 7 || AnimElem = 9 || AnimElem = 11
y = -6.25

[State 1501, VelAdd (Gunfire)]
type = VelAdd
trigger1 = Anim = 1501
trigger1 = AnimElemTime(3) > 0 && AnimElemTime(13) < 0
y = 1.3671875

[State 1501, Gunfire sound player]
type = Helper
trigger1 = Anim = 1501
trigger1 = AnimElem = 3
helperType = Normal
stateNo = 10220
ID = 15010
name = "Gunfire sound player"
posType = P1
ownPal = 1

[State 1501, Gunfire]
type = Explod
trigger1 = Anim = 1501
trigger1 = AnimElem = 3
anim = 1505
ID = 1505
sprPriority = 1
posType = P1
pos = ceil(const(size.xScale) * 59), -66
scale = const(size.xScale) * 0.5, 0.5
bindTime = -1
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1501, Gunfire (Bottom layer)]
type = Explod
trigger1 = Anim = 1501
trigger1 = AnimElem = 3
anim = 11505
ID = 1505
sprPriority = 1
posType = P1
pos = ceil(const(size.xScale) * 59), -66
scale = const(size.xScale) * 0.5, 0.5
bindTime = -1
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1501, ModifyExplod]
type = ModifyExplod
trigger1 = Anim = 1501
trigger1 = AnimElem = 3 || AnimElem = 11
ID = 1505
posType = P1
pos = ceil(const(size.xScale) * 22), 9
ignoreHitPause = 1

[State 1501, ModifyExplod]
type = ModifyExplod
trigger1 = Anim = 1501
trigger1 = AnimElem = 5 || AnimElem = 9
ID = 1505
posType = P1
pos = ceil(const(size.xScale) * 32), 6
ignoreHitPause = 1

[State 1501, ModifyExplod]
type = ModifyExplod
trigger1 = Anim = 1501
trigger1 = AnimElem = 7
ID = 1505
posType = P1
pos = ceil(const(size.xScale) * 43), 1
ignoreHitPause = 1

[State 1501, Spark XY]
type = Null
triggerAll = Anim = 1501
trigger1 = AnimElem = 3 || AnimElem = 11
trigger1 = var(35) := 21 || var(36) := 18
trigger2 = AnimElem = 5 || AnimElem = 9
trigger2 = var(35) := 34 || var(36) := 12
trigger3 = AnimElem = 7
trigger3 = var(35) := 44 || var(36) := 8

[State 1501, HitDef]
type = HitDef
trigger1 = Anim = 1501
trigger1 = AnimElem = 3 || AnimElem = 5 || AnimElem = 7 || AnimElem = 9 || AnimElem = 11
ID = 1501
attr = A, SA
hitFlag = FD
guardFlag = L
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 7 < 7, 7, fvar(11) * 7)), 0
getPower = ifElse(!var(13), 72, 36) * !var(20), 12 * !var(20)
givePower = 36, 36
pauseTime = 2,2
guard.pauseTime = 2,2
animType = Hard
air.animType = Back
fall.animType = Back
ground.type = High
air.type = Low
ground.hitTime = 18
ground.slideTime = 18
guard.hitTime = 18
air.hitTime = 18
ground.velocity = 0, 0
ground.cornerPush.velOff = 0
guard.velocity = 0
guard.cornerPush.velOff = 0
air.velocity = 0, -7.73
air.cornerPush.velOff = 0
down.velocity = 0, 0
down.cornerpush.veloff = 0
yAccel = 0.58
fall = 0
fall.recover = 1
fall.recoverTime = 18
hitSound = -1 + 0 * (var(31) := 2)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10, -55
palFX.time = 12 * var(9)
palFX.add = 255, 255, 255
palFX.sinAdd = -255, -255, -255, 48
envshake.time = 14
envshake.ampl = 4
envshake.freq = 120

[State 1501, TargetDrop]
type = TargetDrop
trigger1 = NumTarget(1501) > 1
ID = 1501
keepOne = 1
excludeID = 1501
ignoreHitPause = 1

[State 1501, TargetState]
type = TargetState
trigger1 = NumTarget(1501)
trigger1 = MoveContact = 1 && HitPauseTime = 2
value = 1505
ID = 1501
ignoreHitPause = 1

[State 1501, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = Anim = 1501
trigger1 = AnimElemTime(13) >= 0
movetype = I

[State 1501, Voice]
type = PlaySnd
trigger1 = Anim = 1501
trigger1 = AnimElem = 13
value = 4,1
channel = 0

[State 1501, VelSet (Final)]
type = VelSet
trigger1 = Anim = 1501
trigger1 = AnimElem = 13
x = -fvar(0)
y = -5

[State 1501, VelAdd (Final)]
type = VelAdd
trigger1 = Anim = 1501
trigger1 = AnimElemTime(13) > 0
y = 0.78125

[State 1501, ChangeState]
type = ChangeState
trigger1 = Anim = 1501
trigger1 = pos y > -vel y
value = 1502


;Landing
[StateDef 1502]
type = S
anim = 47
physics = N
moveType = I
velSet = 0,0

[State 1502, PosSet]
type = PosSet
trigger1 = 1
y = 0

[State 1502, Landing Dust Explod]
type = Explod
trigger1 = !Time
anim = 8102
sprPriority = -3
posType = P1
scale = 0.5,0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

[State 1502, Landing Sound]
type = PlaySnd
trigger1 = !Time
value = 52,0
channel = 5

[State 1502, End]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1


;Hit by Law of the Bullet
[StateDef 1505]
type = L
moveType = H
physics = N
velSet = 0,0

[State 1505, PosSet]
type = PosSet
trigger1 = 1
y = 0
ignoreHitPause = 1

[State 1505, VarSet]
type = VarSet
trigger1 = !Time
sysvar(2) = 5080

[State 1505, VarAdd]
type = VarAdd
trigger1 = !Time
trigger1 = (Anim = [5081,5089]) || (Anim = [5111,5119])
trigger1 = SelfAnimExist(sysvar(2) + (Anim % 10))
sysvar(2) = Anim % 10

[State 1505, VarSet]
type = VarSet
trigger1 = !Time
trigger1 = sysvar(2) = 5090
trigger1 = !SelfAnimExist(5090)
sysvar(2) = 5030

[State 1505, ChangeAnim]
type = ChangeAnim
trigger1 = 1
value = sysvar(2)

[State 1505, ChangeState]
type = ChangeState
trigger1 = HitShakeOver
value = 1506


;Knocked back
[Statedef 1506]
type = L
moveType = H
physics = C

[State 1506, PosSet]
type = PosSet
trigger1 = 1
y = 0
ignoreHitPause = 1

[State 1506, HitVelSet]
type = HitVelSet
trigger1 = !Time
x = 1

[State 1506, VelSet]
type = VelSet
trigger1 = HitOver
x = 0

[State 1506, VarSet]
type = VarSet
trigger1 = !Time
sysvar(0) = 1

[State 1506, ChangeState]
type = ChangeState
trigger1 = HitOver && Alive
value = 1507

[State 1506, SelfState]
type = SelfState
trigger1 = HitOver && !Alive
value = 5150


;Recover
[StateDef 1507]
type = L
moveType = H
physics = N

[State 1507, FallEnvShake]
type = FallEnvShake
trigger1 = !Time

[State 1507, ChangeAnim]
type = ChangeAnim
trigger1 = SelfAnimExist(5110 + (Anim % 10))
trigger1 = Anim = [5081,5089]
value = 5110 + (Anim % 10)
persistent = 0

[State 1507, ChangeAnim]
type = ChangeAnim
triggerAll = !Time
triggerAll = Anim != [5110,5119]
trigger1 = Anim != [5161,5169]
trigger2 = !SelfAnimExist(5170 + (Anim % 10))
value = 5170

[State 1507, ChangeAnim]
type = ChangeAnim
triggerAll = !Time
triggerAll = Anim != [5110,5119]
trigger1 = Anim = [5161,5169]
trigger1 = SelfAnimExist(5170 + (Anim % 10))
value = 5170 + (Anim % 10)

[State 1507, HitFallDamage]
type = HitFallDamage
trigger1 = !Time

[State 1507, PosSet]
type = PosSet
trigger1 = !Time
y = 0

[State 1507, VarSet]
type = VarSet
trigger1 = !Time
trigger1 = GetHitVar(fall.yVel) != 0
sysvar(1) = floor(vel y)

[State 1507, PlaySnd]
type = PlaySnd
trigger1 = !Time
trigger1 = !sysvar(0)
value = F7, (sysvar(1) > Const720p(20)) + (sysvar(1) > Const720p(56))

[State 1507, Explod]
type = Explod
trigger1 = !Time
trigger1 = !sysvar(0)
anim = F(60 + (sysvar(1) > Const720p(20)) + (sysvar(1) > Const720p(56)))
pos = 0, 0
sprPriority = ifElse(sysvar(1) <= Const720p(56), -10, 10)

[State 1507, VelSet]
type = VelSet
trigger1 = !Time
y = 0

[State 1507, ChangeAnim]
type = ChangeAnim
triggerAll = Anim = [5171,5179]
triggerAll = SelfAnimExist(5110 + (Anim % 10))
trigger1 = !AnimTime
trigger2 = sysvar(0)
value = 5110 + (Anim % 10)
persistent = 0

[State 1507, ChangeAnim]
type = ChangeAnim
triggerAll = Anim != [5111,5119]
trigger1 = !AnimTime
trigger2 = sysvar(0)
value = 5110
persistent = 0

[State 1507, SelfState]
type = SelfState
triggerAll = !Alive
trigger1 = !AnimTime
trigger2 = sysvar(0)
trigger3 = Anim = [5110,5119]
value = 5150

[State 1507, VarSet]
type = VarSet
trigger1 = sysvar(0)
trigger1 = !Time
sysvar(0) = 0

[State 1507, VelMul]
type = VelMul
trigger1 = 1
x = 0.85

[State 1507, VelSet]
type = VelSet
trigger1 = abs(vel x) < const(movement.down.friction.threshold)
persistent = 0
x = 0

[State 1507, SelfState]
type = SelfState
trigger1 = !Time
value = 5120



;========================<ES LAW OF THE BULLET>=============================
[StateDef 1530]
type = S
physics = N
moveType = A
anim = 1500
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = -1000
faceP2 = 1

[State 1530, ES Flash]
type = VarSet
trigger1 = !Time
var(25) = 31

[State 1530, ES FX]
type = Explod
trigger1 = !Time
anim = 8210
sprPriority = 3
posType = P1
pos = ceil(15 * const(size.xScale)), ceil(-48 * const(size.yScale))
scale = 0.5, 0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

[State 1530, ES Startup Sound]
type = PlaySnd
trigger1 = !Time
value = 0,1000
channel = 1

[State 1530, Voice]
type = PlaySnd
trigger1 = !Time
value = 4,0
channel = 0

[State 1530, Jump Sound]
type = PlaySnd
trigger1 = AnimElem = 2
value = 40,0
channel = 3

[State 1530, StateTypeSet: Air, Physics: None]
type = StateTypeSet
trigger1 = AnimElem = 2
stateType = A
physics = N

[State 1530, Dust Helper]
type = Helper
trigger1 = AnimElem = 2
helperType = Normal
stateNo = 8100
ID = 8100
name = "ES Law of the Bullet Dust"
posType = P1
ownPal = 1

[State 1530, VarSet]
type = VarSet
trigger1 = AnimElem = 3
fvar(0) = (P2dist x / 27)

[State 1530, VelSet]
type = VelSet
trigger1 = AnimElem = 3
x = ifElse(EnemyNear, MoveType = H, fvar(0) - (EnemyNear, vel x) * ifElse(Facing = EnemyNear, Facing, -0.25, 1) / 1.5, fvar(0))
y = -10

[State 1530, VelAdd]
type = VelAdd
trigger1 = AnimElemTime(3) > 0
y = 0.78125

[State 1530, HitDef]
type = HitDef
trigger1 = AnimElem = 7
ID = 1530
attr = A, SA
hitFlag = FD
guardFlag = L
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 7 < 7, 7, fvar(11) * 7)), 0
getPower = 0,0
givePower = 36, 36
pauseTime = 0, 12
guard.pauseTime = 0, 12
animType = Hard
air.animType = Back
fall.animType = Back
ground.type = High
air.type = Low
ground.hitTime = 18
ground.slideTime = 18
guard.hitTime = 18
air.hitTime = 18
ground.velocity = 0, 0
ground.cornerPush.velOff = 0
guard.velocity = 0
guard.cornerPush.velOff = 0
air.velocity = 0, -7.73
air.cornerPush.velOff = 0
down.velocity = 0, 0
down.cornerpush.veloff = 0
yAccel = 0.58
fall = 0
fall.recover = 1
fall.recoverTime = 18
hitSound = -1 + 0 * (var(31) := 5)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 9), var(36) := -10
palFX.time = 12 * var(9)
palFX.add = 255, 255, 255
palFX.sinAdd= -255, -255, -255, 48
envshake.time = 14
envshake.ampl = 4
envshake.freq = 120
kill = 0

[State 1530, TargetDrop]
type = TargetDrop
trigger1 = NumTarget(1530) > 1
ID = 1530
keepOne = 1
excludeID = 1530
ignoreHitPause = 1

[State 1530, TargetBind]
type = TargetBind
triggerAll = NumTarget(1530)
trigger1 = P2Dist x < -15 || P2Dist x > 50
time = 1
ID = 1530
pos = ifElse(P2Dist x > 50, 50, -15),0
ignoreHitPause = 1
persistent = 0

[State 1530, TargetState]
type = TargetState
trigger1 = NumTarget(1530)
value = 1505
ID = 1530
ignoreHitPause = 1
persistent = 0

[State 1530, Finish]
type = ChangeState
trigger1 = MoveHit && NumTarget(1530)
value = 1531

[State 1530, End]
type = ChangeState
trigger1 = pos y > -vel y
value = 1502


;Success
[StateDef 1531]
type = A
physics = N
moveType = A
ctrl = 0
velSet = 0,0
sprPriority = 1
hitCountPersist = 1

[State 1531, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0
ignoreHitPause = 1

[State 1531, ES Flash]
type = VarSet
trigger1 = !Time
var(25) = 55

[State 1531, BindToTarget]
type = PosAdd
trigger1 = P2Dist x < -20 || P2Dist x > 20
trigger1 = !Time
x = ifElse(P2Dist x > 20, P2dist x - 20, P2dist x + 20)

[State 1531, PosSet (initial)]
type = PosSet
trigger1 = !Time
y = -7

[State 1531, PosSet (attack start)]
type = PosSet
trigger1 = NumTarget(1530)
trigger1 = Time = 12
x = Target(1530), pos x

[State 1530, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 12
value = 1531

[State 1531, Gunfire recoil effect (propelled into air)]
type = VelAdd
trigger1 = Anim = 1531
trigger1 = AnimElem = 3 || AnimElem = 5 || AnimElem = 7 || AnimElem = 9 || AnimElem = 11 || AnimElem = 13
y = -6.25

[State 1531, VelAdd (Gunfire)]
type = VelAdd
trigger1 = Anim = 1531
trigger1 = AnimElemTime(3) > 0
y = 1.3671875

[State 1531, Gunfire sound player]
type = Helper
trigger1 = Anim = 1531
trigger1 = AnimElem = 3
helperType = Normal
stateNo = 10220
ID = 15310
name = "Gunfire sound player"
posType = P1
ownPal = 1

[State 1531, Gunfire]
type = Explod
trigger1 = Anim = 1531
trigger1 = AnimElem = 3
anim = 1505
ID = 1505
sprPriority = 1
posType = P1
pos = ceil(const(size.xScale) * 59), -66
scale = const(size.xScale) * 0.5, 0.5
bindTime = -1
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1531, Gunfire (Bottom layer)]
type = Explod
trigger1 = Anim = 1531
trigger1 = AnimElem = 3
anim = 11505
ID = 1505
sprPriority = 1
posType = P1
pos = ceil(const(size.xScale) * 59), -66
scale = const(size.xScale) * 0.5, 0.5
bindTime = -1
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1531, ModifyExplod]
type = ModifyExplod
trigger1 = Anim = 1531
trigger1 = AnimElem = 3 || AnimElem = 11
ID = 1505
posType = P1
pos = ceil(const(size.xScale) * 22), 9
ignoreHitPause = 1

[State 1531, ModifyExplod]
type = ModifyExplod
trigger1 = Anim = 1531
trigger1 = AnimElem = 5 || AnimElem = 9
ID = 1505
posType = P1
pos = ceil(const(size.xScale) * 32), 6
ignoreHitPause = 1

[State 1531, ModifyExplod]
type = ModifyExplod
trigger1 = Anim = 1531
trigger1 = AnimElem = 7
ID = 1505
posType = P1
pos = ceil(const(size.xScale) * 43), 1
ignoreHitPause = 1

[State 1531, Spark XY]
type = Null
triggerAll = Anim = 1531
trigger1 = AnimElem = 3 || AnimElem = 11
trigger1 = var(35) := 21 || var(36) := 18
trigger2 = AnimElem = 5 || AnimElem = 9
trigger2 = var(35) := 34 || var(36) := 12
trigger3 = AnimElem = 7
trigger3 = var(35) := 44 || var(36) := 8

[State 1531, HitDef]
type = HitDef
trigger1 = Anim = 1531
trigger1 = AnimElem = 3 || AnimElem = 5 || AnimElem = 7 || AnimElem = 9 || AnimElem = 11
ID = 1531
attr = A, SA
hitFlag = FD
guardFlag = L
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 7 < 7, 7, fvar(11) * 7)), 0
getPower = 0,0
givePower = 36, 36
pauseTime = 2,2
guard.pauseTime = 2,2
animType = Hard
air.animType = Back
fall.animType = Back
ground.type = High
air.type = Low
ground.hitTime = 18
ground.slideTime = 18
guard.hitTime = 18
air.hitTime = 18
ground.velocity = 0, 0
ground.cornerPush.velOff = 0
guard.velocity = 0
guard.cornerPush.velOff = 0
air.velocity = 0, -7.73
air.cornerPush.velOff = 0
down.velocity = 0, 0
down.cornerpush.veloff = 0
yAccel = 0.58
fall = 0
fall.recover = 1
fall.recoverTime = 18
hitSound = -1 + 0 * (var(31) := 2)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10, -55
palFX.time = 12 * var(9)
palFX.add = 255, 255, 255
palFX.sinAdd = -255, -255, -255, 48
envshake.time = 14
envshake.ampl = 4
envshake.freq = 120
kill = 0

[State 1531, TargetDrop]
type = TargetDrop
trigger1 = NumTarget(1531) > 1
ID = 1531
keepOne = 1
excludeID = 1531
ignoreHitPause = 1

[State 1531, TargetState]
type = TargetState
trigger1 = NumTarget(1531)
trigger1 = MoveContact = 1 && HitPauseTime = 2
value = 1535
ID = 1531
ignoreHitPause = 1

[State 1531, ChangeState]
type = ChangeState
trigger1 = Anim = 1531
trigger1 = pos y > -vel y
value = 1532


;Finish
[StateDef 1532]
type = A
physics = N
moveType = A
anim = 1532
ctrl = 0
velSet = 0,0
sprPriority = 1
hitCountPersist = 1

[State 1532, ES Flash]
type = VarSet
trigger1 = !Time
var(25) = 49

[State 1532, PosSet (initial)]
type = PosSet
trigger1 = !Time
y = -18

[State 1532, PosSet (initial)]
type = PosAdd
trigger1 = !Time
x = -35

[State 1532, Gunfire sound player]
type = Helper
trigger1 = AnimElem = 3
helperType = Normal
stateNo = 10220
ID = 15320
name = "Gunfire sound player"
posType = P1
ownPal = 1

[State 1532, Gunfire]
type = Explod
trigger1 = AnimElem = 3
anim = 1535
ID = 1535
sprPriority = 1
posType = P1
pos = ceil(const(size.xScale) * 29), 3
scale = const(size.xScale) * 0.5, 0.5
bindTime = -1
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1532, Gunfire (Bottom layer)]
type = Explod
trigger1 = AnimElem = 3
anim = 11535
ID = 1535
sprPriority = 1
posType = P1
pos = ceil(const(size.xScale) * 29), 3
scale = const(size.xScale) * 0.5, 0.5
bindTime = -1
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1532, ModifyExplod]
type = ModifyExplod
trigger1 = AnimElem = 3 || AnimElem = 11
ID = 1535
posType = P1
pos = ceil(const(size.xScale) * 29), 3
ignoreHitPause = 1

[State 1532, ModifyExplod]
type = ModifyExplod
trigger1 = AnimElem = 5 || AnimElem = 9
ID = 1535
posType = P1
pos = ceil(const(size.xScale) * 39), 1
ignoreHitPause = 1

[State 1532, ModifyExplod]
type = ModifyExplod
trigger1 = AnimElem = 7
ID = 1535
posType = P1
pos = ceil(const(size.xScale) * 49), -4
ignoreHitPause = 1

[State 1532, Spark XY]
type = Null
trigger1 = AnimElem = 3 || AnimElem = 11
trigger1 = var(35) := 27 || var(36) := 10
trigger2 = AnimElem = 5 || AnimElem = 9
trigger2 = var(35) := 40 || var(36) := 6
trigger3 = AnimElem = 7
trigger3 = var(35) := 49 || var(36) := 2

[State 1532, HitDef]
type = HitDef
trigger1 = AnimElem = 3 || AnimElem = 5 || AnimElem = 7 || AnimElem = 9 || AnimElem = 11
ID = 1532
attr = A, SA
hitFlag = FD
guardFlag = L
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 7 < 7, 7, fvar(11) * 7)), 0
getPower = 0,0
givePower = 36, 36
pauseTime = 2,2
guard.pauseTime = 2,2
animType = Hard
air.animType = Back
fall.animType = Back
ground.type = High
air.type = Low
ground.hitTime = 18
ground.slideTime = 18
guard.hitTime = 18
air.hitTime = 18
ground.velocity = 0, 0
ground.cornerPush.velOff = 0
guard.velocity = 0
guard.cornerPush.velOff = 0
air.velocity = 0, -7.73
air.cornerPush.velOff = 0
down.velocity = 0, 0
down.cornerpush.veloff = 0
yAccel = 0.58
fall = 0
fall.recover = 1
fall.recoverTime = 18
hitSound = -1 + 0 * (var(31) := 2)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10, -55
palFX.time = 12 * var(9)
palFX.add = 255, 255, 255
palFX.sinAdd = -255, -255, -255, 48
envshake.time = 14
envshake.ampl = 4
envshake.freq = 120
kill = 0

[State 1532, TargetDrop]
type = TargetDrop
trigger1 = NumTarget(1532) > 1
ID = 1532
keepOne = 1
excludeID = 1532
ignoreHitPause = 1

[State 1532, TargetState]
type = TargetState
trigger1 = NumTarget(1532)
trigger1 = MoveContact = 1 && HitPauseTime = 2
value = 1535
ID = 1532
ignoreHitPause = 1

[State 1532, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(13) >= 0
movetype = I

[State 1532, Voice]
type = PlaySnd
trigger1 = AnimElem = 13
value = 4,1
channel = 0

[State 1532, VelSet (Final)]
type = VelSet
trigger1 = AnimElem = 13
x = -fvar(0)
y = -6.25

[State 1532, VelAdd (Final)]
type = VelAdd
trigger1 = AnimElemTime(13) > 0
y = 0.78125

[State 1532, Bomb]
type = Helper
trigger1 = AnimElemTime(13) = 1
helperType = Normal
stateNo = 21535
ID = 21535
name = "ES Law of the Bullet Bomb"
posType = P1
pos = ceil(0 * const(size.xScale)), -47
size.xScale = const(size.xScale)
size.yScale = 1
ownPal = 1

[State 1532, ChangeState]
type = ChangeState
trigger1 = Anim = 1532
trigger1 = pos y > -vel y
value = 1533


;Landing
[StateDef 1533]
type = S
anim = 1533
physics = N
moveType = I
velSet = 0,0

[State 1533, ES Flash]
type = VarSet
trigger1 = !Time
var(25) = 38

[State 1533, PosSet]
type = PosSet
trigger1 = 1
y = 0

[State 1533, Landing Dust Explod]
type = Explod
trigger1 = !Time
anim = 8102
sprPriority = -3
posType = P1
scale = 0.5,0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

[State 1533, Landing Sound]
type = PlaySnd
trigger1 = !Time
value = 52,0
channel = 5

[State 1533, End]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1


;Hit by ES Law of the Bullet
[StateDef 1535]
type = L
moveType = H
physics = N
velSet = 0,0

[State 1535, PosSet]
type = PosSet
trigger1 = 1
y = 0
ignoreHitPause = 1

[State 1535, VarSet]
type = VarSet
trigger1 = !Time
sysvar(2) = 5080

[State 1535, VarAdd]
type = VarAdd
trigger1 = !Time
trigger1 = (Anim = [5081,5089]) || (Anim = [5111,5119])
trigger1 = SelfAnimExist(sysvar(2) + (Anim % 10))
sysvar(2) = Anim % 10

[State 1535, VarSet]
type = VarSet
trigger1 = !Time
trigger1 = sysvar(2) = 5090
trigger1 = !SelfAnimExist(5090)
sysvar(2) = 5030

[State 1535, ChangeAnim]
type = ChangeAnim
trigger1 = 1
value = sysvar(2)

[State 1535, ChangeState]
type = ChangeState
trigger1 = HitShakeOver
value = 1536


;Knocked back
[Statedef 1536]
type = L
moveType = H
physics = C

[State 1536, PosSet]
type = PosSet
trigger1 = 1
y = 0
ignoreHitPause = 1

[State 1536, HitVelSet]
type = HitVelSet
trigger1 = !Time
x = 1

[State 1536, VelSet]
type = VelSet
trigger1 = HitOver
x = 0

[State 1536, VarSet]
type = VarSet
trigger1 = !Time
sysvar(0) = 1

[State 1536, ChangeState]
type = ChangeState
trigger1 = HitOver && Alive
value = 1537

[State 1536, SelfState]
type = SelfState
trigger1 = HitOver && !Alive
value = 5150


;Recover
[StateDef 1537]
type = L
moveType = H
physics = N

[State 1537, FallEnvShake]
type = FallEnvShake
trigger1 = !Time

[State 1537, ChangeAnim]
type = ChangeAnim
trigger1 = SelfAnimExist(5110 + (Anim % 10))
trigger1 = Anim = [5081,5089]
value = 5110 + (Anim % 10)
persistent = 0

[State 1537, ChangeAnim]
type = ChangeAnim
triggerAll = !Time
triggerAll = Anim != [5110,5119]
trigger1 = Anim != [5161,5169]
trigger2 = !SelfAnimExist(5170 + (Anim % 10))
value = 5170

[State 1537, ChangeAnim]
type = ChangeAnim
triggerAll = !Time
triggerAll = Anim != [5110,5119]
trigger1 = Anim = [5161,5169]
trigger1 = SelfAnimExist(5170 + (Anim % 10))
value = 5170 + (Anim % 10)

[State 1537, HitFallDamage]
type = HitFallDamage
trigger1 = !Time

[State 1537, PosSet]
type = PosSet
trigger1 = !Time
y = 0

[State 1537, VarSet]
type = VarSet
trigger1 = !Time
trigger1 = GetHitVar(fall.yVel) != 0
sysvar(1) = floor(vel y)

[State 1537, PlaySnd]
type = PlaySnd
trigger1 = !Time
trigger1 = !sysvar(0)
value = F7, (sysvar(1) > Const720p(20)) + (sysvar(1) > Const720p(56))

[State 1537, Explod]
type = Explod
trigger1 = !Time
trigger1 = !sysvar(0)
anim = F(60 + (sysvar(1) > Const720p(20)) + (sysvar(1) > Const720p(56)))
pos = 0, 0
sprPriority = ifElse(sysvar(1) <= Const720p(56), -10, 10)

[State 1537, VelSet]
type = VelSet
trigger1 = !Time
y = 0

[State 1537, ChangeAnim]
type = ChangeAnim
triggerAll = Anim = [5171,5179]
triggerAll = SelfAnimExist(5110 + (Anim % 10))
trigger1 = !AnimTime
trigger2 = sysvar(0)
value = 5110 + (Anim % 10)
persistent = 0

[State 1537, ChangeAnim]
type = ChangeAnim
triggerAll = Anim != [5111,5119]
trigger1 = !AnimTime
trigger2 = sysvar(0)
value = 5110
persistent = 0

[State 1537, SelfState]
type = SelfState
triggerAll = !Alive
trigger1 = !AnimTime
trigger2 = sysvar(0)
trigger3 = Anim = [5110,5119]
value = 5150

[State 1537, VarSet]
type = VarSet
trigger1 = sysvar(0)
trigger1 = !Time
sysvar(0) = 0

[State 1537, VelMul]
type = VelMul
trigger1 = 1
x = 0.85

[State 1537, VelSet]
type = VelSet
trigger1 = abs(vel x) < const(movement.down.friction.threshold)
persistent = 0
x = 0

[State 1537, SelfState]
type = SelfState
trigger1 = Time = 20
value = 5120



;=====================<PUNCH ZERO COUNTER>==========================
[StateDef 2900]
type = S
physics = N
moveType = A
anim = 2900
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = 0

[State 2900, NotHitBy]
type = NotHitBy
trigger1 = AnimElemTime(5) < 0
value = SCA
time = 1
ignoreHitPause = 1

[State 2900, Voice]
type = PlaySnd
trigger1 = !Time
value = 4,1
channel = 0

[State 2900, Gunfire sound player]
type = Helper
trigger1 = AnimElem = 5
helperType = Normal
stateNo = 10220
ID = 12900
name = "Gunfire sound player"
posType = P1
ownPal = 1

[State 2900, Gunfire]
type = Explod
trigger1 = AnimElem = 5
anim = 2905
sprPriority = 1
posType = P1
pos = ceil(const(size.xScale) * 65), -63
scale = const(size.xScale) * 0.5, 0.5
bindTime = -1
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 2900, Gunfire (Bottom layer)]
type = Explod
trigger1 = AnimElem = 5
anim = 12905
sprPriority = 1
posType = P1
pos = ceil(const(size.xScale) * 65), -63
scale = const(size.xScale) * 0.5, 0.5
bindTime = -1
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 2900, HitDef]
type = HitDef
trigger1 = !var(16) && (var(15) < (1 + HitCount))
trigger1 = AnimElem = 5 || AnimElem = 7 || AnimElem = 9
attr = S, SA
hitFlag = MAF
guardFlag = M
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 14 < 7, 7, fvar(11) * 14)), 0
getpower = 0,0
givePower = 36, 36
pauseTime = 0,6
guard.pauseTime = 0,6
animType = DiagUp
air.animType = DiagUp
fall.animType = DiagUp
ground.type = Low
air.type = Low
ground.hitTime = 18
ground.slideTime = 18
guard.hitTime = 18
air.hitTime = 120
ground.velocity = -5.54, -5.25
ground.cornerPush.velOff = 0
guard.velocity = -10.52
guard.cornerPush.velOff = 0
air.velocity = -5.54, -5.25
air.cornerPush.velOff = 0
yaccel = 0.58
fall = 1
fall.recover = 1
fall.recoverTime = 120
forceStand = 1
hitSound = -1 + 0 * (var(31) := 2)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 110), var(36) := -67
palFX.time = 12 * var(9)
palFX.add = 255, 255, 255
palFX.sinAdd = -255, -255, -255, 48
envShake.time = 14
envShake.ampl = 4
envShake.freq = 120

[State 2900, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(10) >= 0
moveType = I

[State 2900, End]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1



;========================<KICK ZERO COUNTER>=============================
[StateDef 2910]
type = S
physics = N
moveType = I
anim = 2910
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = 0

[State 2910, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
ignoreHitPause = 1

[State 2910, SuperPause]
type = SuperPause
trigger1 = !Time
time = 10
moveTime = 10
p2DefMul = 1
anim = -1
darken = 0

[State 2910, Voice]
type = PlaySnd
trigger1 = !Time
value = 2910,0
channel = 0

[State 2910, Warp Sound]
type = PlaySnd
trigger1 = !Time
value = 2910,1
channel = 1

[State 2910, Eye glare sound]
type = PlaySnd
trigger1 = !Time
value = 193,1
channel = 3

[State 2910, Doll]
type = Helper
trigger1 = !Time
helperType = Normal
stateNo = 12915
ID = 12915
posType = P1
size.xScale = const(size.xScale)
size.yScale = const(size.yScale)
name = "Jealousy & Fake Doll"
superMoveTime = 65535
ownPal = 1

;VS does a dynamic velset but ultimately is doing the same thing with BBH ending up w/ p2dist x = 100 +/- 6, but idc enough for that
[State 2910, PosSet]
type = PosSet
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(3) < 0
x = EnemyNear, pos x + (100 * Facing * const(size.xScale))

[State 2910, Turn]
type = Turn
trigger1 = AnimElem = 3
trigger1 = P2Dist x < 0

[State 2910, Eye glare 1]
type = Explod
trigger1 = AnimElem = 5
anim = 2916
sprPriority = 2
posType = P1
pos = ceil(-19 * const(size.xScale)), 0
scale = const(size.xScale), 1
ownPal = 1
superMoveTime = 65535
removeOnGetHit = 1
ignoreHitPause = 0

[State 2910, Eye glare 2]
type = Explod
trigger1 = AnimElem = 5
anim = 2916
sprPriority = 2
posType = P1
pos = ceil(-25 * const(size.xScale)), 0
scale = const(size.xScale), 1
ownPal = 1
superMoveTime = 65535
removeOnGetHit = 1
ignoreHitPause = 0

[State 2910, Camouflage Sheet]
type = Helper
trigger1 = AnimElemTime(5) = 1
helperType = Normal
stateNo = 2915
ID = 2915
posType = P1
size.xScale = const(size.xScale)
size.yScale = const(size.yScale)
name = "Jealousy & Fake Camouflage Sheet"
superMoveTime = 65535
ownPal = 1

[State 2910, PalFX]
type = PalFX
trigger1 = AnimElemTime(5) = -1
time = 16
mul = 192,192,192

[State 2910, End]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
