; _________________________________________
;| Blue Ranger by Balthazar & Jmorphman    |
; ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
;==============================================================================================
;========================================<SPECIAL MOVES>=======================================
;==============================================================================================

;========================<TRICERA CRASH>=============================
[StateDef 1000]
type = S
physics = N
moveType = A
anim = 1000
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = 72 * !var(20)
faceP2 = 1

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

[State 1000, Button Detect (AI)]
type = VarSet
trigger1 = !Time && AILevel
var(10) = 2

[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = !Time
value = ifElse(var(10) = 2, 1002, 1000)

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

[State 1000, Jump Sound]
type = PlaySnd
trigger1 = AnimElem = 3
value = 41,0

[State 1000, PosAdd]
type = PosAdd
trigger1 = AnimElem = 3
x = 6

[State 1000, Dust Helper]
type = Helper
trigger1 = AnimElem = 3
helperType = Normal
stateNo = 8103
ID = 8100
name = "Tricera Crash Dust"
posType = P1
pauseMoveTime = 255
superMoveTime = 255
ownPal = 1

[State 1000, Dash Sparks Trail FX]
type = Explod
trigger1 = AnimElemTime(4) % 4 = 1
trigger1 = AnimElemTime(5) < 0
trigger1 = !MoveContact
ID = 1007
anim = 1007
sprPriority = 4
posType = P1
pos = ceil(-6 * const(size.xScale)), 0
scale = const(size.xScale), const(size.yScale)
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1000, Dash Sparks FX]
type = Explod
trigger1 = AnimElem = 4
ID = 1006
anim = 1006
sprPriority = 3
posType = P1
pos = ceil(-6 * const(size.xScale)), 0
scale = const(size.xScale), const(size.yScale)
removeTime = -1
bindTime = -1
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1000, Shockwave FX]
type = Explod
trigger1 = AnimElem = 4
ID = 11258
anim = 11258
sprPriority = 3
posType = P1
pos = ceil(-51 * const(size.xScale)), ceil(8 * const(size.yScale))
scale = const(size.xScale), const(size.yScale)
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1000, Overlay FX]
type = Explod
trigger1 = AnimElem = 4
ID = 1005
anim = 1005
sprPriority = 3
posType = P1
pos = ceil(-6 * const(size.xScale)), 0
scale = const(size.xScale), const(size.yScale)
bindTime = -1
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1000, VelSet]
type = VelSet
trigger1 = AnimElem = 3
x = ifElse(var(10) = 2, 12, ifElse(var(10) = 1, 8, 6))

[State 1000, VelMul]
type = VelMul
trigger1 = AnimElemTime(5) >= 0
x = 0.95

[State 1000, VelSet]
type = VelSet
trigger1 = AnimElem = 9
x = 0

[State 1000, HitDef]
type = HitDef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = AnimElem = 4
ID = 1000
attr = A, SA
hitFlag = MAF
guardFlag = MA
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 84 < 7, 7, fvar(11) * 84)), 7
getPower = ifElse(!var(13), 72, 36) * !var(20), 12 * !var(20)
givePower = 36, 36
pauseTime = ifElse(var(20), 6, 12), ifElse(var(20), 6, 12)
guard.pauseTime = ifElse(var(20), 6, 12), ifElse(var(20), 6, 12)
animType = Hard
air.animType = Back
fall.animType = Back
ground.type = Low
air.type = Low
ground.hitTime = 18
ground.slideTime = 18
guard.hitTime = 18
air.hitTime = 120
ground.velocity = -4.32, 0
ground.cornerPush.velOff = 0
guard.velocity = -10.52
guard.cornerPush.velOff = 0
air.velocity = -4.32, -7.49
air.cornerPush.velOff = 0
yAccel = 0.58
fall = 0
air.fall = 1
fall.recover = 1
fall.recoverTime = 120
forceStand = 1
hitSound = -1 + 0 * (var(31) := 5)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 70), var(36) := -46
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 1000, RemoveExplod]
type = RemoveExplod
trigger1 = AnimElem = 5
trigger2 = MoveContact
id = 1006
ignoreHitPause = 1

[State 1000, Dash Sparks FX (Fade Away)]
type = Explod
trigger1 = MoveContact
ID = 1008
anim = 1008
sprPriority = 3
posType = P1
pos = ceil(-6 * const(size.xScale)), 0
scale = const(size.xScale), const(size.yScale)
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1
persistent = 0

[State 1000, Second Hit]
type = ChangeState
trigger1 = NumTarget(1000)
trigger1 = MoveHit
value = 1010

[State 1000, Dash End Sound]
type = PlaySnd
trigger1 = AnimElem = 5
value = 111,0

[State 1000, Skid Dust]
type = Explod
trigger1 = AnimElem = 5
anim = 8104
sprPriority = 3
posType = P1
pos = ceil(30 * const(size.xScale)), 0
vel = 0,0
scale = 0.5,0.5
pauseMovetime = -1
superMoveTime = -1
ownpal = 1

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

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


;Second Hit
[StateDef 1010]
type = S
anim = 1010
physics = N
moveType = A
velSet = 0,0

[State 1010, Woosh sound]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1,2

[State 1000, PosAdd]
type = PosAdd
trigger1 = !Time
x = 12

[State 1000, PosAdd]
type = PosAdd
trigger1 = AnimElem = 2
x = 10

[State 1000, PosAdd]
type = PosAdd
trigger1 = AnimElem = 3
x = 14

[State 1000, PosAdd]
type = PosAdd
trigger1 = AnimElem = 5
x = 2

[State 1010, HitDef]
type = HitDef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = AnimElem = 3
ID = 1010
attr = A, SA
hitFlag = MAF
guardFlag = MA
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 28 < 7, 7, fvar(11) * 28)), 7
getPower = ifElse(!var(13), 72, 36) * !var(20), 12 * !var(20)
givePower = 36, 36
pauseTime = ifElse(var(20), 6, 12), ifElse(var(20), 6, 12)
guard.pauseTime = ifElse(var(20), 6, 12), ifElse(var(20), 6, 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 = 120
ground.velocity = -4.32, 0
ground.cornerPush.velOff = 0
guard.velocity = -10.52
guard.cornerPush.velOff = 0
air.velocity = -4.32, -7.49
air.cornerPush.velOff = 0
yAccel = 0.58
fall = 0
air.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) := 83), 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 1010, Third Hit]
type = ChangeState
trigger1 = NumTarget(1010)
trigger1 = MoveHit
trigger1 = AnimElem = 6
value = 1020

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


;Third Hit
[StateDef 1020]
type = S
anim = 1020
physics = N
moveType = A
velSet = 0,0

[State 1020, PosAdd]
type = PosAdd
trigger1 = !Time
x = 4

[State 1020, PosAdd]
type = PosAdd
trigger1 = AnimElem = 2
x = 8

[State 1020, PosAdd]
type = PosAdd
trigger1 = AnimElem = 3
x = 20

[State 1020, PosAdd]
type = PosAdd
trigger1 = AnimElem = 4
trigger2 = AnimElem = 5
x = 10

[State 1020, PosAdd]
type = PosAdd
trigger1 = AnimElem = 6
x = 30

[State 1020, Jump Sound]
type = PlaySnd
trigger1 = AnimElem = 3
value = 41,0

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

[State 1020, Dust Helper]
type = Helper
trigger1 = AnimElem = 3
helperType = Normal
stateNo = 8100
ID = 8100
name = "Tricera Crash Dust"
posType = P1
ownPal = 1

[State 1020, Pillar FX]
type = Explod
trigger1 = AnimElem = 3
ID = 1025
anim = 1025
sprPriority = 3
posType = P1
pos = ceil(-86 * const(size.xScale)), 0
scale = const(size.xScale), const(size.yScale)
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1020, VelSet]
type = VelSet
trigger1 = AnimElem = 3
x = 2
y = -5

[State 1020, VelAdd]
type = VelAdd
trigger1 = AnimElemTime(3) > 0
y = 0.5

[State 1020, HitDef]
type = HitDef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = AnimElem = 3
attr = A, SA
hitFlag = MAF
guardFlag = M
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 14 < 7, 7, fvar(11) * 14)), 7
getPower = ifElse(!var(13), 72, 36) * !var(20), 12 * !var(20)
givePower = 36, 36
pauseTime = ifElse(var(20), 6, 12), ifElse(var(20), 6, 12)
guard.pauseTime = ifElse(var(20), 6, 12), ifElse(var(20), 6, 12)
animType = Back
air.animType = Back
fall.animType = Back
ground.type = High
air.type = Low
ground.hitTime = 18
ground.slideTime = 18
guard.hitTime = 18
air.hitTime = 120
ground.velocity = -4.16, -8.81
ground.cornerPush.velOff = 0
guard.velocity = -12.64
guard.cornerPush.velOff = 0
air.velocity = -4.16, -8.81
air.cornerPush.velOff = 0
yAccel = 0.5
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) := 47), var(36) := -85
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 1020, Hit Sound]
type = PlaySnd
trigger1 = MoveContact = 1 && var(30) = HitPauseTime
trigger1 = MoveHit = 1
value = 1020, 0
channel = 3
ignoreHitPause = 1

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

[State 1020, ChangeState]
type = ChangeState
trigger1 = pos y > -vel y
value = 1021


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

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

[State 1021, 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 1021, Landing Sound]
type = PlaySnd
trigger1 = !Time
value = 52,0

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



;========================<EX PATRIOT CIRCLE>=============================
[StateDef 1030]
type = S
physics = N
moveType = A
anim = 1030
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = -500
faceP2 = 1

[State 1030, Custom Combo Juggle Points Reset]
type = VarSet
trigger1 = !Time && var(20)
var(15) = 0
ignoreHitPause = 1

[State 1030, Custom Combo Reset]
type = PalFX
trigger1 = !Time
trigger1 = var(20) := -1
time = 1

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

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

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

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

[State 1030, Staff twirl sound]
type = PlaySnd
trigger1 = AnimElem = 16
trigger2 = AnimElem = 27
value = 1,410

[State 1030, Step sound]
type = PlaySnd
trigger1 = AnimElem = 10
value = 52,0

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

[State 1030, Width]
type = Width
trigger1 = AnimElem = 31
trigger2 = AnimElemTime(32) = 9
value = 15,0

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

[State 1030, Dust Helper]
type = Helper
trigger1 = AnimElem = 10
helperType = Normal
stateNo = 8103
ID = 8100
name = "Patriot Circle Dust"
posType = P1
pauseMoveTime = 255
superMoveTime = 255
ownPal = 1

[State 1030, PosAdd]
type = PosAdd
trigger1 = AnimElem = 10
trigger2 = AnimElem = 32
x = 48

[State 1030, PosAdd]
type = PosAdd
trigger1 = AnimElem = 33
x = 32

[State 1030, HitDef 1]
type = HitDef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = AnimElem = 10
attr = S, SA
hitFlag = MAF
guardFlag = M
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 14 < 7, 7, fvar(11) * 14)), 7
getPower = 0,0
givePower = 36, 36
pauseTime = 0, ifElse(var(20), 1, 2)
guard.pauseTime = 0, ifElse(var(20), 1, 2)
animType = Hard
air.animType = Back
fall.animType = Back
ground.type = High
air.type = Low
ground.hitTime = 16
ground.slideTime = 16
guard.hitTime = 16
air.hitTime = 120
ground.velocity = 0, 0
ground.cornerPush.velOff = 0
guard.velocity = 0
guard.cornerPush.velOff = 0
air.velocity = -4.32, -4.49
air.cornerPush.velOff = 0
yAccel = 0.58
fall = 0
air.fall = 1
fall.recover = 0
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) := 75), var(36) := -64
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 1030, HitDef 2]
type = HitDef
trigger1 = !var(16) && (var(15) < (1 + HitCount) || var(20))
trigger1 = AnimElem = 13
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, ifElse(var(20), 1, 2)
guard.pauseTime = 0, ifElse(var(20), 1, 2)
animType = Hard
air.animType = Back
fall.animType = Back
ground.type = High
air.type = Low
ground.hitTime = 16
ground.slideTime = 16
guard.hitTime = 16
air.hitTime = 120
ground.velocity = 0, 0
ground.cornerPush.velOff = 0
guard.velocity = 0
guard.cornerPush.velOff = 0
air.velocity = -4.32, -4.49
air.cornerPush.velOff = 0
yAccel = 0.58
fall = 0
air.fall = 1
fall.recover = 0
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) := 75), var(36) := -64
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 1030, HitDef 3]
type = HitDef
trigger1 = !var(16) && (var(15) < (1 + HitCount) || var(20))
trigger1 = AnimElem = 16
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, ifElse(var(20), 1, 2)
guard.pauseTime = 0, ifElse(var(20), 1, 2)
animType = Hard
air.animType = Back
fall.animType = Back
ground.type = High
air.type = Low
ground.hitTime = 16
ground.slideTime = 16
guard.hitTime = 16
air.hitTime = 120
ground.velocity = 0, 0
ground.cornerPush.velOff = 0
guard.velocity = 0
guard.cornerPush.velOff = 0
air.velocity = -4.32, -4.49
air.cornerPush.velOff = 0
yAccel = 0.58
fall = 0
air.fall = 1
fall.recover = 0
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) := 75), var(36) := -64
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 1030, HitDef 4]
type = HitDef
trigger1 = !var(16) && (var(15) < (1 + HitCount) || var(20))
trigger1 = AnimElem = 19
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, ifElse(var(20), 1, 2)
guard.pauseTime = 0, ifElse(var(20), 1, 2)
animType = Hard
air.animType = Back
fall.animType = Back
ground.type = High
air.type = Low
ground.hitTime = 16
ground.slideTime = 16
guard.hitTime = 16
air.hitTime = 120
ground.velocity = 0, 0
ground.cornerPush.velOff = 0
guard.velocity = 0
guard.cornerPush.velOff = 0
air.velocity = -4.32, -4.49
air.cornerPush.velOff = 0
yAccel = 0.58
fall = 0
air.fall = 1
fall.recover = 0
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) := 75), var(36) := -64
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 1030, HitDef 5]
type = HitDef
trigger1 = !var(16) && (var(15) < (1 + HitCount) || var(20))
trigger1 = AnimElem = 22
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, ifElse(var(20), 1, 2)
guard.pauseTime = 0, ifElse(var(20), 1, 2)
animType = Hard
air.animType = Back
fall.animType = Back
ground.type = High
air.type = Low
ground.hitTime = 16
ground.slideTime = 16
guard.hitTime = 16
air.hitTime = 120
ground.velocity = 0, 0
ground.cornerPush.velOff = 0
guard.velocity = 0
guard.cornerPush.velOff = 0
air.velocity = -4.32, -4.49
air.cornerPush.velOff = 0
yAccel = 0.58
fall = 0
air.fall = 1
fall.recover = 0
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) := 75), var(36) := -64
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 1030, HitDef 6]
type = HitDef
trigger1 = !var(16) && (var(15) < (1 + HitCount) || var(20))
trigger1 = AnimElem = 25
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, ifElse(var(20), 1, 2)
guard.pauseTime = 0, ifElse(var(20), 1, 2)
animType = Hard
air.animType = Back
fall.animType = Back
ground.type = High
air.type = Low
ground.hitTime = 16
ground.slideTime = 16
guard.hitTime = 16
air.hitTime = 120
ground.velocity = 0, 0
ground.cornerPush.velOff = 0
guard.velocity = 0
guard.cornerPush.velOff = 0
air.velocity = -4.32, -4.49
air.cornerPush.velOff = 0
yAccel = 0.58
fall = 0
air.fall = 1
fall.recover = 0
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) := 75), var(36) := -64
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 1030, HitDef 7]
type = HitDef
trigger1 = !var(16) && (var(15) < (1 + HitCount) || var(20))
trigger1 = AnimElem = 28
ID = 1030
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 = ifElse(var(20), 1, 2), ifElse(var(20), 1, 2)
guard.pauseTime = ifElse(var(20), 1, 2), ifElse(var(20), 1, 2)
animType = DiagUp
air.animType = DiagUp
fall.animType = DiagUp
ground.type = High
air.type = Low
ground.hitTime = 18
ground.slideTime = 18
guard.hitTime = 18
air.hitTime = 120
ground.velocity = -2.16, -10.81
ground.cornerPush.velOff = 0
guard.velocity = -12.64
guard.cornerPush.velOff = 0
air.velocity = -2.16, -10.81
air.cornerPush.velOff = 0
yAccel = 0.5
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) := 75), var(36) := -64
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 1030, Juggle Reset]
type = VarSet
trigger1 = NumTarget(1030)
trigger1 = MoveHit && !var(27)
var(15) = 0
persistent = 0

[State 1030, VarAdd]
type = VarAdd
trigger1 = NumTarget(1030)
trigger1 = MoveHit
var(27) = 1
persistent = 0

[State 1030, Juggle Flag]
type = VarSet
trigger1 = var(27) = 2
var(16) = 1

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

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



;========================<STINGER>=============================
[StateDef 1100]
type = S
physics = S
moveType = A
anim = 1100
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = 72 * !var(20)
faceP2 = 1

[State 1100, Button Detect]
type = VarSet
trigger1 = !Time && !AILevel
var(10) = ifElse((command = "c" || command = "rlsc"), 2, ifElse((command = "b" || command = "rlsb"), 2, 0))

[State 1100, Button Detect (AI)]
type = VarSet
trigger1 = !Time && AILevel
var(10) = ifElse(Random < 500, 1120, ifElse(Random < 500, 1110, 1100))

[State 1100, Voice]
type = PlaySnd
trigger1 = AnimElem = 5
value = 4,0
channel = 0

[State 1100, Jumping Sound]
type = PlaySnd
trigger1 = AnimElem = 5
value = 41,0
channel = 1

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

[State 1100, Dust Helper]
type = Helper
trigger1 = AnimElem = 5
helperType = Normal
stateNo = 8100
ID = 8100
name = "Stinger Dust"
posType = P1
ownPal = 1

[State 1100, VelSet]
type = VelSet
trigger1 = AnimElem = 5
x = P2Dist x / ((18 + ((18 ** 2) -(4 * 0.375 * (enemynear(0), const(size.height)))) ** 0.5) / 0.75)
y = -12

[State 1100, Turn]
type = Turn
trigger1 = AnimElemTime(5) >= 0 && vel x < 0
persistent = 0

[State 1200, VelSet]
type = VelSet
trigger1 = AnimElemTime(5) >= 0 && vel x > 10
x = 10

[State 1200, VelSet]
type = VelSet
trigger1 = AnimElemTime(5) >= 0 && vel x < 0
x = 0

[State 1100, VelAdd]
type = VelAdd
trigger1 = AnimElemTime(5) > 0
y = 0.75

[State 810, 1]
type = AfterImage
trigger1 = AnimElem = 4
time = 26
length = 4
framegap = 1
timegap = 6
trans = add1
palcontrast = 128,128,128
paladd = 0,0,0
palmul = 1,1,1

[State 1100, Feint Detection]
type = VarSet
trigger1 = 1
var(11) = 1

[State 1100, Feint Detection]
type = VarSet
trigger1 = AnimElemTime(5) <= 0 && !AILevel
trigger1 = command = "holda" || command = "holdb" || command = "holdc"
var(11) = 0

[State 1100, Switch to Feint]
type = ChangeState
trigger1 = AnimElem = 5 && var(11)
value = 1105
ctrl = 1

[State 1202, HitDef]
type = HitDef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = AnimElem = 13
ID = 1100
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), 72, 36) * !var(20), 12 * !var(20)
givePower = 36, 36
pauseTime = ifElse(var(20), 6, 12), ifElse(var(20), 15, 30)
guard.pauseTime = ifElse(var(20), 2, 4), ifElse(var(20), 2, 4)
animType = Hard
air.animType = Back
fall.animType = Back
ground.type = Low
air.type = Low
ground.hitTime = ifElse(var(10) = 2, 18, ifElse(var(10), 16, 12))
ground.slideTime = ifElse(var(10) = 2, 18, ifElse(var(10), 16, 12))
guard.hitTime = ifElse(var(10) = 2, 18, ifElse(var(10), 16, 12))
air.hitTime = 120
ground.velocity = -8.32, 0
ground.cornerPush.velOff = 0
guard.velocity = -10.52
guard.cornerPush.velOff = 0
air.velocity = -4.32, -4.49
air.cornerPush.velOff = 0
yAccel = 0.58
fall = 0
air.fall = 1
fall.recover = 0
fall.recoverTime = 120
hitSound = -1 + 0 * (var(31) := 3)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 80), var(36) := -27
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
forceStand = 1

[State 1100, BindToTarget]
type = BindToTarget
triggerAll = NumTarget
triggerAll = MoveHit && Target, Alive
trigger1 = Target, StateType != A && abs(pos x - Target, pos x) >= 15
trigger2 = Target, StateType = A
trigger2 = Target, const(size.head.pos.y) + Target, pos y >= pos y
time = 1
ID = 1100
pos = 85,47,Head
ignoreHitPause = 1
persistent = 0

[State 1100, Width]
type = Width
trigger1 = 1
edge = 25,0
ignoreHitPause = 1

;[State 0, TargetBind]
;type = TargetBind
;triggerAll = NumTarget
;triggerAll = MoveHit && Target, Alive
;trigger1 = Target, StateType = A
;trigger1 = Target, const(size.head.pos.y) + Target, pos y < pos y
;time = 1
;ID = 1100
;pos = 85,37
;ignoreHitPause = 1
;persistent = 0

[State 1100, ChangeState]
type = ChangeState
trigger1 = NumTarget
trigger1 = MoveHit && Target, Alive
trigger2 = MoveGuarded
value = ifElse(MoveGuarded, 1115, 1110)

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


;Failed 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

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


;Feint
[StateDef 1105]
type = A
anim = 1105
physics = N
moveType = A

[State 1401, VelAdd]
type = VelAdd
trigger1 = 1
y = 0.75

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


;Attack
[StateDef 1110]
type = A
physics = N
moveType = A
velSet = -3,-6
anim = 1110
ctrl = 0
sprPriority = 1
hitCountPersist = 1

[State 1101, PosFreeze]
type = PosFreeze
trigger1 = AnimElemTime(4) < 0
trigger2 = AnimElemTime(5) >= 0 && AnimElemTime(6) <= 0
value = 1

[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 6
x = 6
y = 0

[State 1101, VelAdd]
type = VelAdd
trigger1 = AnimElemTime(4) > 0
y = 0.65

[State 1202, HitDef]
type = HitDef
trigger1 = !var(16) && (var(15) < (1 + HitCount) || var(20))
trigger1 = AnimElem = 7
attr = A, SA
hitFlag = MAF
guardFlag = MA
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), 72, 36) * !var(20), 12 * !var(20)
givePower = 36, 36
pauseTime = ifElse(var(20), 6, 12), ifElse(var(20), 6, 12)
guard.pauseTime = ifElse(var(20), 6, 12), ifElse(var(20), 6, 12)
animType = Hard
air.animType = Back
fall.animType = Back
ground.type = Low
air.type = Low
ground.hitTime = ifElse(var(10) = 2, 18, ifElse(var(10), 16, 12))
ground.slideTime = ifElse(var(10) = 2, 18, ifElse(var(10), 16, 12))
guard.hitTime = ifElse(var(10) = 2, 18, ifElse(var(10), 16, 12))
air.hitTime = 120
ground.velocity = -4.32, -3.49
ground.cornerPush.velOff = 0
guard.velocity = -12.64
guard.cornerPush.velOff = 0
air.velocity = -4.32, -3.49
air.cornerPush.velOff = 0
yAccel = 0.5
fall = 1
fall.recover = 0
fall.recoverTime = 120
forceStand = 1
hitSound = -1 + 0 * (var(31) := 3)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 85), var(36) := -37
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 1101, ChangeState]
type = ChangeState
trigger1 = pos y > -vel y
value = 1111


;Sucess Landing
[StateDef 1111]
type = S
anim = 1111
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

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


;Guarded
[StateDef 1115]
type = A
physics = N
moveType = A
velSet = -3,-6
anim = 1115
ctrl = 0
sprPriority = 1

[State 1101, PosFreeze]
type = PosFreeze
trigger1 = AnimElemTime(4) < 0
value = 1

[State 1101, VelAdd]
type = VelAdd
trigger1 = AnimElemTime(4) > 0
y = 0.65

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




;========================<EX STINGER>=============================
[StateDef 1130]
type = S
physics = N
moveType = A
anim = 1130
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = -500

[State 1130, Custom Combo Juggle Points Reset]
type = VarSet
trigger1 = !Time && var(20)
var(15) = 0
ignoreHitPause = 1

[State 1130, Custom Combo Reset]
type = PalFX
trigger1 = !Time
trigger1 = var(20) := -1
time = 1

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

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

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

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

[State 1130, Jumping Sound]
type = PlaySnd
trigger1 = AnimElem = 7
value = 41,0
channel = 3

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

[State 1130, Dust Helper]
type = Helper
trigger1 = AnimElem = 7
helperType = Normal
stateNo = 8100
ID = 8100
name = "Stinger Dust"
posType = P1
ownPal = 1

[State 1130, VelSet]
type = VelSet
trigger1 = AnimElem = 7
y = -14.375

[State 1130, VelAdd]
type = VelAdd
trigger1 = AnimElemTime(7) >= 0
y = 0.927734375

[State 1130, Knives]
type = Explod
trigger1 = AnimElem = 3
ID = 1103
anim = 1133
sprPriority = 3
scale = const(size.xScale),const(size.yScale)
posType = P1
bindtime = -1
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1130, Followup Detection Reset]
type = VarSet
trigger1 = !Time
var(14) = 0

[State 1130, EX Stinger Juggle Count Reset]
type = VarSet
trigger1 = !Time
var(28) = 0

[State 1130, Attack]
type = VarSet
triggerAll = (!var(14) || AILevel) && AnimElemTime(2) >= 0
triggerAll = !AILevel
trigger1 = command = "a" || command = "b" || command = "c" || command = "x" || command = "y" || command = "z"
var(14) = 1131

[State 1130, Followup]
type = ChangeState
trigger1 = var(14) = [1000,2999]
trigger1 = AnimElemTime(8) >= 0
value = var(14)

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


;Attack
[StateDef 1131]
type = A
physics = N
moveType = A
velSet = 0,0
anim = 1101
ctrl = 0
sprPriority = 1

[State 1131, EX Flash]
type = VarSet
trigger1 = !Time
var(25) = 17

[State 1131, RemoveExplod]
type = RemoveExplod
trigger1 = NumExplod(1103)
ID = 1103

[State 1131, Voice]
type = PlaySnd
trigger1 = AnimElem = 5
value = 1101,0
channel = 0

[State 1131, Knife Throw Sound]
type = PlaySnd
trigger1 = AnimElem = 6
value = 1101,1
channel = 3

[State 1131, Knives]
type = Explod
trigger1 = !Time
ID = 1104
anim = 1104
sprPriority = 3
scale = const(size.xScale),const(size.yScale)
posType = P1
bindtime = -1
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 1131, PosFreeze]
type = PosFreeze
trigger1 = AnimElemTime(8) < 2
value = 1

[State 1131, VelAdd]
type = VelAdd
trigger1 = AnimElemTime(8) > 2
y = 0.78125

[State 1131, Knife 1]
type = Helper
trigger1 = AnimElemTime(6) = 1
helperType = Normal
stateNo = 1135
ID = 1135
posType = P1
pos = ceil(30 * const(size.xScale)), ceil(-46 * const(size.yScale))
name = "Knife 1 (EX Stinger)"
size.xScale = const(size.xScale)
size.yScale = const(size.yScale)
ownPal = 1

[State 1131, Knife 2]
type = Helper
trigger1 = AnimElemTime(6) = 1
helperType = Normal
stateNo = 1145
ID = 1145
posType = P1
pos = ceil(30 * const(size.xScale)), ceil(-46 * const(size.yScale))
name = "Knife 2 (EX Stinger)"
size.xScale = const(size.xScale)
size.yScale = const(size.yScale)
ownPal = 1

[State 1131, Knife 3]
type = Helper
trigger1 = AnimElemTime(6) = 1
helperType = Normal
stateNo = 1155
ID = 1155
posType = P1
pos = ceil(30 * const(size.xScale)), ceil(-46 * const(size.yScale))
name = "Knife 3 (EX Stinger)"
size.xScale = const(size.xScale)
size.yScale = const(size.yScale)
ownPal = 1

[State 1131, ChangeState]
type = ChangeState
trigger1 = pos y > -vel y
value = 1102



;=====================<MEKONG DELTA ATTACK>==========================
[StateDef 1200]
type = S
physics = N
moveType = A
anim = 1200
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = 72 * !var(20)
faceP2 = 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 1000, ChangeAnim]
type = ChangeAnim
trigger1 = !Time
value = ifElse(var(10) = 2, 1210, 1200)

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

[State 1200, Blade Hit]
type = HitDef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = AnimElem = 2
attr = S, SA
hitFlag = MAF
guardFlag = M
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * ifElse(var(10) = 2, 49, ifElse(var(10) = 1, 70, 105)) < 7, 7, fvar(11) * ifElse(var(10) = 2, 49, ifElse(var(10) = 1, 70, 105)))), 7
getPower = ifElse(!var(13), 144, 72) * !var(20), 36 * !var(20)
givePower = 36, 36
pauseTime = ifElse(var(20), 6, 12), ifElse(var(20), 6, 12)
guard.pauseTime = ifElse(var(20), 6, 12), ifElse(var(20), 6, 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 = -1.25, -12
ground.cornerPush.velOff = 0
guard.velocity = -12.64
guard.cornerPush.velOff = 0
air.velocity = -1.25, -12
air.cornerPush.velOff = 0
yAccel = 0.537109375
fall = 1
fall.recover = 1
fall.recoverTime = 120
forceStand = 1
hitSound = -1 + 0 * (var(31) := 5)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 31), var(36) := -89
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 1000, Laser effect]
type = PlaySnd
trigger1 = AnimElem = 6
value = 1200,1
channel = 1

[State 1000, overlay 1]
type = Explod
trigger1 = AnimElem = 7
anim = 11200
sprPriority = 3
posType = P1
scale = const(size.xScale), const(size.yScale)
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1000, overlay 2]
type = Explod
trigger1 = AnimElem = 7
anim = 11201 + 10 * (var(10) = 2)
sprPriority = 3
posType = P1
scale = const(size.xScale), const(size.yScale)
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1000, overlay 3]
type = Explod
trigger1 = AnimElem = 7
anim = 11202 + 10 * (var(10) = 2)
sprPriority = 3
posType = P1
scale = const(size.xScale), const(size.yScale)
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1000, overlay 4]
type = Explod
trigger1 = AnimElem = 7
anim = 11203 + 10 * (var(10) = 2)
sprPriority = 3
posType = P1
scale = const(size.xScale), const(size.yScale)
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1000, Radiating spark]
type = Explod
trigger1 = AnimElem = 6
anim = 1204
sprPriority = 5
posType = P1
pos = ceil(const(size.xScale) * ifElse(var(10) = 2, 0, 11)), ceil(const(size.yScale) * ifElse(var(10) = 2, 0, 14))
scale = const(size.xScale), const(size.yScale)
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 1

[State 1200, Laser shot]
type = Helper
trigger1 = AnimElem = 6
helperType = Normal
stateNo = 1205
ID = ifElse(var(10) = 2, 1215, 1205)
name = "Laser"
posType = P1
pos = ceil(const(size.xScale) * ifElse(var(10) = 2, 50, 62)), ceil(const(size.yScale) * ifElse(var(10) = 2, -150, -135))
size.xScale = const(size.xScale)
size.yScale = const(size.yScale)
ownPal = 1

[State 1200, Width]
type = Width
trigger1 = AnimElemTime(4) = 1
value = 30,0

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




;========================<EX MEKONG DELTA ATTACK>=============================
[StateDef 1232]
type = S
anim = 1232
physics = N
moveType = A
powerAdd = -500

[State 1232, Custom Combo Juggle Points Reset]
type = VarSet
trigger1 = !Time && var(20)
var(15) = 0
ignoreHitPause = 1

[State 1232, Custom Combo Reset]
type = PalFX
trigger1 = !Time
trigger1 = var(20) := -1
time = 1

[State 1232, EX Flash]
type = VarSet
trigger1 = !Time
var(25) = 25

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

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

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

[State 1232, Skid sound]
type = PlaySnd
trigger1 = !Time
value = 101,0
channel = 4

[State 1232, Width]
type = Width
trigger1 = 1
player = -5,0

[State 1232, Dust Helper]
type = Helper
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3
trigger3 = AnimElem = 4
trigger4 = AnimElem = 5
trigger5 = AnimElem = 6
helperType = Normal
stateNo = 8103
ID = 8100
name = "Mekong Delta Attack Dust"
posType = P1
pauseMoveTime = 255
superMoveTime = 255
ownPal = 1

[State 1232, VelSet]
type = VelSet
trigger1 = !Time
x = 6.5625

[State 1232, VelAdd]
type = VelAdd
trigger1 = AnimElemTime(11) < 0
x = 1.171875

[State 1232, VelSet]
type = VelSet
trigger1 = AnimElem = 11
x = 0

[State 1232, VarSet]
type = VarSet
trigger1 = !Time
var(28) = 0

[State 1232, EX Mekong Delta Attack Hit Count]
type = VarAdd
trigger1 = MoveContact = 1 && var(30) = HitPauseTime
trigger1 = MoveHit = 1 && var(31) >= 0
var(28) = 1
ignoreHitPause = 1

[State 1232, Auto Guard]
type = ReversalDef
trigger1 = AnimElemTime(10) < 0 && !MoveContact
reversal.attr = SCA, NA, SA
pauseTime = 12,12
sparkNo = -1 + 0 * (var(33) := 8020)
sparkXY = -10 + 0 * (var(35) := 29), var(36) := -14
hitSound = -1 + 0 * (var(31) := 750)
numHits = 0

[State 1232, HitDef]
type = HitDef
triggerAll = !var(16) && (var(15) < 1 || var(20)) && var(28) < 7
trigger1 = AnimElem = 1
trigger2 = AnimElem = 2
trigger3 = AnimElem = 3
trigger4 = AnimElem = 4
trigger5 = AnimElem = 5
trigger6 = AnimElem = 6
trigger7 = AnimElem = 7
trigger8 = AnimElem = 8
trigger9 = AnimElem = 9
ID = 1231
attr = S, SA
hitFlag = MAF
guardFlag = M
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 21 < 7, 7, fvar(11) * 21)), 7
getPower = 0,0
givePower = 36, 36
pauseTime = ifElse(var(20), 2, 4), ifElse(var(20), 2, 4)
guard.pauseTime = ifElse(var(20), 2, 4), ifElse(var(20), 2, 4)
animType = Hard
air.animType = Back
fall.animType = Back
ground.type = Low
air.type = Low
ground.hitTime = 24
ground.slideTime = 24
guard.hitTime = 24
air.hitTime = 120
ground.velocity = -4.32, 0
ground.cornerPush.velOff = 0
guard.velocity = -10.52
guard.cornerPush.velOff = 0
air.velocity = -4.32, -4.49
air.cornerPush.velOff = 0
yAccel = 0.58
fall = 0
air.fall = 1
fall.recover = 0
fall.recoverTime = 120
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) := 29), var(36) := -14
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 1232, Final Hit]
type = HitDef
triggerAll = !var(16) && (var(15) < 1 || var(20))
trigger1 = AnimElem = 10
trigger2 = AnimElem = 8 && var(28) >= 7
trigger3 = AnimElem = 9 && var(28) >= 7
ID = 1232
attr = S, SA
hitFlag = MAF
guardFlag = M
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 35 < 7, 7, fvar(11) * 35)), 7
getPower = 0,0
givePower = 36, 36
pauseTime = ifElse(var(20), 2, 4), ifElse(var(20), 2, 4)
guard.pauseTime = ifElse(var(20), 2, 4), ifElse(var(20), 2, 4)
animType = Hard
air.animType = Back
fall.animType = Back
ground.type = Low
air.type = Low
ground.hitTime = 28
ground.slideTime = 28
guard.hitTime = 28
air.hitTime = 120
ground.velocity = -4.32, 0
ground.cornerPush.velOff = 0
guard.velocity = -10.52
guard.cornerPush.velOff = 0
air.velocity = -4.32, -4.49
air.cornerPush.velOff = 0
yAccel = 0.58
fall = 0
air.fall = 1
fall.recover = 0
fall.recoverTime = 120
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) := 29), var(36) := -14
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 1232, ChangeState]
type = ChangeState
trigger1 = NumTarget(1232) && MoveContact
value = 1203

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

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



;=====================<MEKONG DELTA AIR RAID>==========================
[StateDef 1300]
type = S
physics = N
moveType = A
anim = 1300
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = 72 * !var(20)
faceP2 = 1

[State 1100, Button Detect]
type = VarSet
trigger1 = !Time && !AILevel
var(10) = ifElse((command = "c" || command = "rlsc"), 2, ifElse((command = "b" || command = "rlsb"), 2, 0))

[State 1300, Button Detect (AI)]
type = VarSet
trigger1 = AILevel
var(10) = 2

;[State 1300, ChangeAnim]
;type = ChangeAnim
;trigger1 = !Time
;value = ifElse(var(10) = 2, 1320, ifElse(var(10) = 1, 1310, 1300))

[State 1300, PosAdd]
type = PosAdd
trigger1 = AnimElem = 3
trigger2 = AnimElem = 4
trigger3 = AnimElem = 5
trigger4 = AnimElem = 6
x = 11

[State 0, PosAdd]
type = PosAdd
trigger1 = AnimElem = 14
x = 18

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

[State 1300, Woosh Sound 1]
type = PlaySnd
trigger1 = AnimElem = 4
value = 1,2
channel = 1

[State 1300, Jump sound]
type = PlaySnd
trigger1 = AnimElem = 5
value = 40,0
channel = 3

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

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

[State 1300, Dust Helper]
type = Helper
trigger1 = AnimElem = 6
helperType = Normal
stateNo = 8100
ID = 8100
name = "Stinger Dust"
posType = P1
ownPal = 1

[State 1300, VelSet]
type = VelSet
trigger1 = AnimElem = 6
x = 1.5
y = -4

[State 1100, VelAdd]
type = VelAdd
trigger1 = AnimElemTime(6) > 0
y = 0.325

[State 1000, HitDef]
type = HitDef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = AnimElem = 5
attr = A, SA
hitFlag = MAF
guardFlag = MA
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 35 < 7, 7, fvar(11) * 35)), 7
getPower = ifElse(!var(13), 72, 36) * !var(20), 12 * !var(20)
givePower = 36, 36
pauseTime = 8,8
guard.pauseTime = 8,8
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 = 120
ground.velocity = -4.32, 0
ground.cornerPush.velOff = 0
guard.velocity = -10.52
guard.cornerPush.velOff = 0
air.velocity = -4.32, -7.49
air.cornerPush.velOff = 0
yAccel = 0.58
fall = 0
air.fall = 1
fall.recover = 1
fall.recoverTime = 120
forceStand = 1
hitSound = -1 + 0 * (var(31) := 5)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 60), var(36) := -80
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 1000, HitDef]
type = HitDef
trigger1 = !var(16) && (var(15) < (1 + HitCount) || var(20))
trigger1 = AnimElem = 11
ID = 1300
attr = A, SA
hitFlag = MAF
guardFlag = MA
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 35 < 7, 7, fvar(11) * 35)), 7
getPower = ifElse(!var(13), 72, 36) * !var(20), 12 * !var(20)
givePower = 36, 36
pauseTime = 8,8
guard.pauseTime = 8,8
animType = Hard
air.animType = Back
fall.animType = Back
ground.type = Low
air.type = Low
ground.hitTime = 18
ground.slideTime = 18
guard.hitTime = 18
air.hitTime = 120
ground.velocity = -4.32, 0
ground.cornerPush.velOff = 0
guard.velocity = -10.52
guard.cornerPush.velOff = 0
air.velocity = -4.32, -7.49
air.cornerPush.velOff = 0
yAccel = 0.58
fall = 0
air.fall = 1
fall.recover = 1
fall.recoverTime = 120
forceStand = 1
hitSound = -1 + 0 * (var(31) := 5)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 65), var(36) := -70
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 3000, ChangeState]
type = ChangeState
trigger1 = NumTarget(1300)
trigger1 = MoveHit
trigger1 = pos y > -vel y
value = 1310

[State 1300, End]
type = ChangeState
trigger1 = pos y > -vel y
value = 1301


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

[State 1301, PosAdd]
type = PosAdd
trigger1 = !Time
x = 9

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

[State 1301, 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 1301, Landing Sound]
type = PlaySnd
trigger1 = !Time
value = 52,0

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



;Success
[StateDef 1310]
type = S
anim = 1310
physics = N
moveType = A
velSet = 0,0

[State 1000, Width]
type = Width
trigger1 = AnimElemTime(12) < 0
value = 12,0

[State 1301, PosAdd]
type = PosAdd
trigger1 = !Time
x = 18

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

[State 1301, 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 1301, Landing Sound]
type = PlaySnd
trigger1 = !Time
value = 52,0

[State 1310, Woosh]
type = PlaySnd
trigger1 = AnimElem = 3
value = 1,1
channel = 1

[State 1310, HitDef]
type = HitDef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = AnimElem = 4
attr = A, SA
hitFlag = MAF
guardFlag = MA
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 35 < 7, 7, fvar(11) * 35)), 7
getPower = ifElse(!var(13), 72, 36) * !var(20), 12 * !var(20)
givePower = 36, 36
pauseTime = ifElse(var(20), 4, 8), ifElse(var(20), 4, 8)
guard.pauseTime = ifElse(var(20), 4, 8), ifElse(var(20), 4, 8)
animType = Hard
air.animType = Back
fall.animType = Back
ground.type = High
air.type = Low
ground.hitTime = 32
ground.slideTime = 32
guard.hitTime = 32
air.hitTime = 120
ground.velocity = 0,0
ground.cornerPush.velOff = 0
ground.velocity = 0
guard.cornerPush.velOff = 0
air.velocity = -4.32, -7.49
air.cornerPush.velOff = 0
yAccel = 0.58
fall = 0
air.fall = 1
fall.recover = 1
fall.recoverTime = 120
forceStand = 1
hitSound = -1 + 0 * (var(31) := 1)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 60), var(36) := -80
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 225, PosAdd]
type = PosAdd
trigger1 = AnimElem = 11
trigger2 = AnimElem = 12
trigger3 = AnimElem = 13
x = 5

[State 225, PosAdd]
type = PosAdd
trigger1 = AnimElem = 14
x = 4

[State 225, Staff Woosh]
type = PlaySnd
trigger1 = AnimElem = 11
value = 1,2
channel = 3

[State 225, HitDef 1]
type = HitDef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = AnimElem = 12
forceNoFall = !var(20)
attr = S, NA
hitFlag = MAF
guardFlag = M
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 84 < 7, 7, fvar(11) * 84)), 0
getPower = ifElse(!var(13), 216, 72) * !var(20), 36 * !var(20)
givePower = 36, 36
pauseTime = ifElse(var(20), 4, 8), ifElse(var(20), 4, 8)
guard.pauseTime = ifElse(var(20), 4, 8), ifElse(var(20), 4, 8)
animType = Hard
air.animType = Back
fall.animType = Back
ground.type = Low
air.type = Low
ground.hitTime = 32
ground.slideTime = 32
guard.hitTime = 32
air.hitTime = 120
ground.velocity = 0, 0
ground.cornerPush.velOff = 0
guard.velocity = 0
guard.cornerPush.velOff = 0
air.velocity = -3.24, -7.73
air.cornerPush.velOff = 0
yAccel = 0.58
fall = 0
fall.recover = 1
fall.recoverTime = 120
hitSound = -1 + 0 * (var(31) := 2)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8012)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 84), var(36) := -63
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
forceStand = 1

[State 225, Staff Woosh]
type = PlaySnd
trigger1 = AnimElem = 21
value = 1,2
channel = 4

[State 225, HitDef 1]
type = HitDef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = AnimElem = 22
forceNoFall = !var(20)
attr = S, NA
hitFlag = MAF
guardFlag = M
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 84 < 7, 7, fvar(11) * 84)), 0
getPower = ifElse(!var(13), 216, 72) * !var(20), 36 * !var(20)
givePower = 36, 36
pauseTime = ifElse(var(20), 6, 16), ifElse(var(20), 6, 16)
guard.pauseTime = ifElse(var(20), 6, 16), ifElse(var(20), 6, 16)
animType = DiagUp
air.animType = DiagUp
fall.animType = DiagUp
ground.type = High
air.type = Low
ground.hitTime = 18
ground.slideTime = 18
guard.hitTime = 18
air.hitTime = 120
ground.velocity = -6.5, -8.5
ground.cornerPush.velOff = 0
guard.velocity = 0
guard.cornerPush.velOff = 0
air.velocity = -6.5, -8.5
air.cornerPush.velOff = 0
yAccel = 0.5
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) := 8012)
guard.sparkNo = -1 + 0 * (var(34) := 8000)
sparkXY = -10 + 0 * (var(35) := 84), var(36) := -34
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
forceStand = 1

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

[State 1300, Dust Helper]
type = Helper
trigger1 = AnimElem = 20
helperType = Normal
stateNo = 8100
ID = 8100
name = "Stinger Dust"
posType = P1
ownPal = 1

[State 1300, PosAdd]
type = PosAdd
trigger1 = AnimElem = 20
y = -20

[State 1300, Jump sound]
type = PlaySnd
trigger1 = AnimElem = 20
value = 41,0
channel = 5

[State 1300, VelSet]
type = VelSet
trigger1 = AnimElem = 20
y = -2.5

[State 1100, VelAdd]
type = VelAdd
trigger1 = AnimElemTime(20) > 0
y = 0.325

[State 225, PosAdd]
type = PosAdd
trigger1 = AnimElem = 25
trigger2 = AnimElem = 26
trigger3 = AnimElem = 27
x = 11

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


;========================<EX MEKONG DELTA AIR RAID>=============================
;Rolling
[StateDef 1330]
type = S
physics = N
moveType = I
anim = 1320
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = -500
faceP2 = 1

[State 1330, Custom Combo Juggle Points Reset]
type = VarSet
trigger1 = !Time && var(20)
var(15) = 0
ignoreHitPause = 1

[State 1330, Custom Combo Reset]
type = PalFX
trigger1 = !Time
trigger1 = var(20) := -1
time = 1

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

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

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

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

[State 1330, Roll Sound]
type = PlaySnd
trigger1 = !Time
value = 105,0
channel = 3

[State 1330, Landing Sound]
type = PlaySnd
trigger1 = AnimElem = 20
value = 52,0
channel = 4

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

[State 1330, VelSet]
type = VelSet
trigger1 = !Time
x = -9.375

[State 1330, Followup Detection Reset]
type = VarSet
trigger1 = !Time
var(14) = 0

[State 1330, Mekong Delta Air Raid (Attack)]
type = VarSet
triggerAll = (!var(14) || AILevel) && AnimElemTime(2) >= 0
trigger1 = !AILevel
trigger1 = command = "x" || command = "y" || command = "z"
var(14) = 1331

[State 1330, Followup]
type = ChangeState
triggerAll = var(14) = [1000,2999]
triggerAll = AnimElemTime(2) >= 0
trigger1 = AnimElemTime(20) < 0
value = var(14)

[State 1300, End]
type = ChangeState
trigger1 = !AnimTime
value = 11
ctrl = 1


;Attack
[StateDef 1331]
type = S
anim = 1331
physics = N
moveType = A
velSet = 0,0

[State 1331, EX Flash]
type = VarSet
trigger1 = !Time
var(25) = 32

[State 1331, Voice]
type = PlaySnd
trigger1 = AnimElem = 10
value = 1301,0
channel = 0

[State 1331, Staff sound]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1,249
channel = 5

[State 1331, Jump sound]
type = PlaySnd
trigger1 = AnimElem = 3
value = 41,0
channel = 6

[State 1331, Staff woosh]
type = PlaySnd
trigger1 = AnimElem = 11
value = 1,225
channel = 7

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

[State 1331, Dust Helper]
type = Helper
trigger1 = AnimElem = 3
helperType = Normal
stateNo = 8100
ID = 8100
name = "Stinger Dust"
posType = P1
ownPal = 1

[State 1331, VelSet]
type = VelSet
trigger1 = AnimElem = 4
x = P2Dist x / 24
y = -12.875

[State 1331, VelAdd]
type = VelAdd
trigger1 = AnimElemTime(4) > 0
y = 0.9765625

[State 1331, Heavy HitDef]
type = HitDef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = AnimElem = 13
attr = A, SA
hitFlag = MAF
guardFlag = HA
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 112 < 7, 7, fvar(11) * 112)), 7
getPower = 0, 0
givePower = 36, 36
pauseTime = ifElse(var(20), 6, 12), ifElse(var(20), 6, 12)
guard.pauseTime = ifElse(var(20), 6, 12), ifElse(var(20), 6, 12)
animType = Hard
air.animType = Back
fall.animType = Back
ground.type = High
air.type = Low
ground.hitTime = 18
ground.slideTime = 18
guard.hitTime = 20
guard.slideTime = 20
air.hitTime = 120
ground.velocity = -4.32, 0
ground.cornerPush.velOff = 0
guard.velocity = -10.52
guard.cornerPush.velOff = 0
air.velocity = -4.32, -7.49
air.cornerPush.velOff = 0
yAccel = 0.58
fall = 0
air.fall = 1
fall.recover = 1
fall.recoverTime = 120
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) := 69), var(36) := -35
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 1331, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(15) >= 0
moveType = I

[State 1331, End]
type = ChangeState
trigger1 = pos y > -vel y
value = 1302



;========================<MEKONG DELTA ESCAPE>=============================
[StateDef 1400]
type = S
physics = N
moveType = A
anim = 1400
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = 36 * !var(20)
faceP2 = 1

[State 1400, Voice]
type = PlaySnd
trigger1 = AnimElem = 3
value = 4,2
channel = 0

[State 1400, Jump Sound]
type = PlaySnd
trigger1 = AnimElem = 3
value = 41,0
channel = 1

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

[State 1400, Dust]
type = Helper
trigger1 = AnimElem = 3
helperType = Normal
stateNo = 8100
ID = 8100
name = "Mekong Delta Escape Dust"
posType = P1
ownPal = 1

[State 1400, VelSet]
type = VelSet
trigger1 = AnimElem = 3
x = ifElse((P2Dist x - 320) * 0.045 > -3, -3, (P2Dist x - 320) * 0.045)
y = -8.125

[State 1400, VelAdd]
type = VelAdd
trigger1 = AnimElemTime(3) > 0
y = 0.439453125

[State 1400, ChangeState]
type = ChangeState
trigger1 = AnimElemTime(5) > 0
trigger1 = BackEdgeDist < 25
value = 1401

[State 1400, ChangeState]
type = ChangeState
trigger1 = pos y > -vel y
value = 1402


;Jumping off wall
[StateDef 1401]
type = A
anim = 1401
physics = N
moveType = A
velSet = 0,0

[State 1401, VarSet]
type = VarSet
trigger1 = !Time
var(12) = 1

[State 1401, PosSet]
type = PosSet
trigger1 = !Time
x = -140 * Facing

[State 1401, Jump sound]
type = PlaySnd
trigger1 = !Time
value = 40,0
channel = 3

[State 1401, VelSet]
type = VelSet
trigger1 = AnimElem = 3
y = -11.25

[State 1401, VelSet]
type = VelSet
trigger1 = AnimElemTime(3) >= 0
x = 7.5 + (1.5 * command = "holdfwd") - (4.5 * command = "holdback")

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

[State 1401, CtrlSet]
type = CtrlSet
trigger1 = AnimElemTime(3) > 0
value = 1

[State 1401, ChangeState]
type = ChangeState
trigger1 = pos y > -vel y
value = 1402


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

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

[State 1402, 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 1402, Landing Sound]
type = PlaySnd
trigger1 = !Time
value = 52,0

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



;========================<EX MEKONG DELTA ESCAPE>=============================
[StateDef 1430]
type = S
physics = N
moveType = A
anim = 1400
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = -500
faceP2 = 1

[State 1430, Custom Combo Juggle Points Reset]
type = VarSet
trigger1 = !Time && var(20)
var(15) = 0
ignoreHitPause = 1

[State 1430, Custom Combo Reset]
type = PalFX
trigger1 = !Time
trigger1 = var(20) := -1
time = 1

[State 1430, EX Flash]
type = VarSet
trigger1 = 1
var(25) = 2

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

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

[State 1430, Voice]
type = PlaySnd
trigger1 = AnimElem = 3
value = 4,2
channel = 0

[State 1430, Jump Sound]
type = PlaySnd
trigger1 = AnimElem = 3
value = 41,0
channel = 3

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

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

[State 1430, Dust]
type = Helper
trigger1 = AnimElem = 3
helperType = Normal
stateNo = 8100
ID = 8100
name = "Mekong Delta Escape Dust"
posType = P1
ownPal = 1

[State 1430, VelSet]
type = VelSet
trigger1 = AnimElem = 3
x = ifElse((P2Dist x - 320) * 0.065 > -3, -3, (P2Dist x - 320) * 0.065)
y = -8.125

[State 1430, VelAdd]
type = VelAdd
trigger1 = AnimElemTime(3) > 0
y = 0.439453125

[State 1430, ChangeState]
type = ChangeState
trigger1 = AnimElemTime(5) > 0
trigger1 = BackEdgeDist < 25
value = 1401

[State 1430, ChangeState]
type = ChangeState
trigger1 = pos y > -vel y
value = 1402



;=====================<SCOUTER JUMP>==========================
[StateDef 1500]
type = S
physics = N
moveType = I
anim = 1500
ctrl = 0
velSet = 0,0
sprPriority = 1
faceP2 = 1

[State 1500, Direction Detect]
type = VarSet
trigger1 = !Time && !AILevel
var(10) = ifElse((command = "back" || command = "rlsback" || command = "holdback"), 1, 0)

[State 1500, Direction Detect (AI)]
type = VarSet
trigger1 = !Time && AILevel
var(10) = 0

[State 1500, ChangeAnim]
type = ChangeAnim
trigger1 = !Time
value = ifElse(var(10) = 1, 1510, 1500)

[State 1500, Voice]
type = PlaySnd
trigger1 = AnimElem = 5
value = 4,2
channel = 0

[State 1500, Staff Woosh Sound]
type = PlaySnd
trigger1 = !Time
value = 1,249
channel = 1

[State 1500, Jump Sound]
type = PlaySnd
trigger1 = AnimElem = 5
value = 41,0
channel = 3

[State 1500, VarSet]
type = VarSet
trigger1 = AnimElem = 5
var(12) = 2

[State 1500, StateTypeSet: Air, Physics: None]
type = StateTypeSet
trigger1 = AnimElemTime(5) >= 0
stateType = A
physics = N

[State 1500, Dust Helper]
type = Helper
trigger1 = AnimElem = 5
helperType = Normal
stateNo = 8100
ID = 8100
name = "Scouter Jump Dust"
posType = P1
ownPal = 1

[State 1500, VelSet]
type = VelSet
trigger1 = AnimElem = 5
x = ifElse(var(10), -9.375, 9.375)
y = ifElse(var(10), -9.0625, -8.75)

[State 1500, VelAdd]
type = VelAdd
trigger1 = AnimElemTime(5) > 0
x = ifElse(var(10), 0.030517578125, -0.030517578125)
y = 0.54931640625

[State 1500, CtrlSet]
type = CtrlSet
trigger1 = AnimElem = 5
value = 1

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



;========================<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(10) < 0
value = SCA
time = 1
ignoreHitPause = 1

[State 2900, VarSet]
type = VarSet
trigger1 = !Time
var(28) = 0

[State 2900, Voice]
type = PlaySnd
trigger1 = AnimElem = 10
value = 1002,0
channel = 0

[State 2900, Staff twirl sound]
type = PlaySnd
trigger1 = AnimElem = 5
trigger2 = AnimElem = 16
value = 1,410

[State 2900, Step sound]
type = PlaySnd
trigger1 = AnimElem = 10
value = 52,0

[State 2900, Width]
type = Width
trigger1 = AnimElemTime(9) = 1
value = 30,0

[State 2900, Width]
type = Width
trigger1 = AnimElem = 33
trigger2 = AnimElemTime(34) = 9
value = 15,0

[State 2900, Dust Helper]
type = Helper
trigger1 = !Time
helperType = Normal
stateNo = 8103
ID = 8100
name = "Patriot Circle Dust"
posType = P1
pauseMoveTime = 255
superMoveTime = 255
ownPal = 1

[State 2900, PosAdd]
type = PosAdd
trigger1 = AnimElem = 10
trigger2 = AnimElem = 34
x = 48

[State 2900, PosAdd]
type = PosAdd
trigger1 = AnimElem = 35
x = 32

[State 2900, HitDef 1]
type = HitDef
trigger1 = !var(16) && var(15) < (1 + var(28))
trigger1 = AnimElem = 10
ID = 2900
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 = 2,2
guard.pauseTime = 2,2
animType = Hard
air.animType = Back
fall.animType = Back
ground.type = High
air.type = Low
ground.hitTime = 16
ground.slideTime = 16
guard.hitTime = 16
air.hitTime = 120
ground.velocity = 0, 0
ground.cornerPush.velOff = 0
guard.velocity = 0
guard.cornerPush.velOff = 0
air.velocity = -4.32, -4.49
air.cornerPush.velOff = 0
yAccel = 0.58
fall = 0
air.fall = 1
fall.recover = 0
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) := 75), var(36) := -64
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 2900, VarAdd]
type = VarAdd
trigger1 = NumTarget(2900)
var(28) = 1
ignoreHitPause = 1
persistent = 0

[State 2900, HitDef 2]
type = HitDef
trigger1 = !var(16) && var(15) < (1 + var(28))
trigger1 = AnimElem = 13
ID = 2901
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 = 2,2
guard.pauseTime = 2,2
animType = Hard
air.animType = Back
fall.animType = Back
ground.type = High
air.type = Low
ground.hitTime = 16
ground.slideTime = 16
guard.hitTime = 16
air.hitTime = 120
ground.velocity = 0, 0
ground.cornerPush.velOff = 0
guard.velocity = 0
guard.cornerPush.velOff = 0
air.velocity = -4.32, -4.49
air.cornerPush.velOff = 0
yAccel = 0.58
fall = 0
air.fall = 1
fall.recover = 0
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) := 75), var(36) := -64
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 2900, VarAdd]
type = VarAdd
trigger1 = NumTarget(2901)
var(28) = 1
ignoreHitPause = 1
persistent = 0

[State 2900, HitDef 1]
type = HitDef
trigger1 = !var(16) && var(15) < (1 + var(28))
trigger1 = AnimElem = 16
ID = 2902
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 = 2,2
guard.pauseTime = 2,2
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) := 75), var(36) := -64
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 2900, VarAdd]
type = VarAdd
trigger1 = NumTarget(2902)
var(28) = 1
ignoreHitPause = 1
persistent = 0

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

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



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

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

[State 2910, Voice]
type = PlaySnd
trigger1 = AnimElem = 2
value = 4,1
channel = 0

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

[State 2910, SprPriority]
type = SprPriority
trigger1 = AnimElemTime(2) >= 0
value = -1
ignoreHitPause = 1

[State 2910, PlayerPush]
type = PlayerPush
trigger1 = AnimElemTime(2) >= 0
value = 0
ignoreHitPause = 1

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

[State 2910, Dust Helper]
type = Helper
trigger1 = AnimElem = 2
helperType = Normal
stateNo = 8100
ID = 8100
name = "Kick Zero Counter Dust"
posType = P1
ownPal = 1

[State 2910, VelSet]
type = VelSet
trigger1 = AnimElem = 2
x = 15
y = -5

[State 2910, VelAdd]
type = VelAdd
trigger1 = AnimElemTime(2) >= 0
x = -0.1953125
y = 0.78125

[State 2910, ChangeState]
type = ChangeState
trigger1 = pos y > -vel y
value = 2911


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

[State 2911, PosSet]
type = Turn
trigger1 = !Time

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

[State 2911, 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 2911, Landing Sound]
type = PlaySnd
trigger1 = !Time
value = 52,0

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