;Yagami Iori 95~2k2+SVC's CNS  ver 1.69 (var 1-59)
;
;  Patched(most suitable in both DOSMUGEN & WINMUGEN)
;
;1 - distinguish DOSMUGEN & WINMUGEN
;
;42,43 - st hg
;27 - helpervar       25,39 - palfx  23,13 - gethit(armor) 34 - counter hit
;28,29 - guard crush  20 - poweradd  21,22 - dizzy         41 - ai helper
;17 - throw st        57 - facing    33 - key input        40 - armor nhb
;31 - ar life no add  14 - counter   6 - jump,common       38 - armor fv
;4,5,12,18 - common   16 - armor     7 - slow              54 - st bn set
;58 - ai difficulty   55 - ai        26,30 - life          37 - st bomb
;11,19,32 - p set(c)  56 - st bomb n 10 - hp juggle        24,35,36 - catch st
;44 - oni juggle      45 - sc palfx  53 - st bar           51 - exceed
;3 - 2k2 mode         2 - powerset   50 - 2k2 mode palfx   52 - p2name kyo

;1 - helper 2021 var
;fv12 - common

[Data]
life = 1000          ;Amount of life to start with
attack = 100         ;100% attack power (more is stronger)
defence = 100        ;100% defensive power (more is stronger)
fall.defence_up = 50 ;Def goes up by 50% everytime player is hit on ground
liedown.time = 60    ;Time player takes before getting up from HIT_LIEDOWN
airjuggle = 15       ;Can do 15 points of juggling
sparkno = 2        ;Default spark number
guard.sparkno = 40 ;Default guard spark number
KO.echo = 0           ;1 to enable echo on KO
volume = 30           ;Volume offset (negative for softer)
IntPersistIndex = 51

[Size]
xscale = 1         ;Horizontal scaling factor.
yscale = 1           ;Vertical scaling factor.
height = 60
ground.back = 21     ;Player width (back, ground)
ground.front = 16    ;Player width (front, ground)
air.back = 13        ;Player width (back, air)
air.front = 13       ;Player width (front, air)
z.width = 3          ;Player width (into and out)
attack.width = 4,4   ;Default attack width: back, front
attack.dist = 160    ;Default attack distance
proj.attack.dist = 90 ;Default attack distance for projectiles
;proj.doscale = 1
head.pos = 7,-95
mid.pos = -2,-63

[Velocity]
walk.fwd  = 2.7      ;Walk forward
walk.back = -2.6     ;Walk backward
run.fwd  = 5.5, 0    ;Run forward (x, y)  - if y<0, player will hop
run.back = -8,-3.9 ;Run backward (x, y) - if y=0, player will run
jump.neu = 0,-8.9    ;Neutral jumping velocity (x, y)
jump.back = -3     ;Jump back Speed (x, y)
jump.fwd = 3       ;Jump forward Speed (x, y)
runjump.fwd = 4    ;.
airjump.neu = 0      ;.
airjump.back = 0 ;Air jump speeds (opt)
airjump.fwd = 0    ;.

[Movement]
airjump.num = 0  ;Number of air jumps allowed (opt)
airjump.height = 0  ;Minimum distance from ground before you can air jump (opt)
yaccel = .58         ;Vertical acceleration
stand.friction = .82  ;Friction coefficient when standing
crouch.friction = .82 ;Friction coefficient when crouching

;------------------------------------------------------------------------
; Format:
; [State STATENAME]
; number = number of controllers
;
; [State STATENAME 1]
; type = type (see testp3.c)
; starttime = time to activate controller
; endtime = time to stop controller (if omitted, defaults to starttime)
; value = ???? (depends on controller)
;------------------------------------------------------------------------
; Stand
[Statedef 00]
type = S
physics = S
sprpriority = 0

[State 0, 1]
type = stopsnd
trigger1 = time = 0
channel = 2

[State 0, 1]
type = varset
trigger1 = time = 0
var(18) = 0

[State 0, 1]
type = varset
trigger1 = time = 0
var(33) = 0

[State 0, 1]
type = varset
trigger1 = time = 0
var(38) = 0
[State 0, 1]
type = varset
trigger1 = time = 0
var(34) = 0

[State 0, 1]
type = varset
trigger1 = time = 0
var(47) = 0

[State 0, 1]
type = varset
trigger1 = time = 0
var(13) = 0

[State 0, 1]
type = varset
trigger1 = var(23) = 1
var(25) = 5

[State 0, 1]
type = varset
trigger1 = time = 0
trigger1 = var(23) = 1
var(13) = 1

[State 0, 1]
type = varset
trigger1 = time = 0
var(23) = 0

[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 0 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 
value = 0

[State 0, 1]
type = changestate
trigger1 = pos y < 0
value = 50

[State 0, 1]
type = posset
trigger1 = pos y > 0 || time = 0
y = 0

[State 0, 2]
type = VelSet
trigger1 = Time = 0
y = 0

[State 5001, 1]
type = HitVelSet
trigger1 = var(13) = 1
trigger1 = command != "holdfwd"
trigger1 = var(16) > 0
trigger1 = Time = 0
x = 1

[State 5001, 3] 
type = VelMul
trigger1 = var(13) = 1
trigger1 = command != "holdfwd"
trigger1 = Time >= GetHitVar(slidetime)
x = .6

[State 5001, 4]
type = VelSet
trigger1 = var(13) = 1
trigger1 = HitOver
x = 0

[State 0, 3] 
type = VelSet
triggerall = var(16) < 1
trigger1 = abs(vel x) < 2
trigger2 = Time = 4
x = 0

[state 265,7]
type = ChangeState
value = 3000
triggerall = var(58) > 1 || var(58) < 1
triggerall = p2name != "BigWomen"
triggerall = p2name != "CADILLACS"
triggerall = p2name != "Madgear"
triggerall = p2name != "DARK WARRIOR2"
triggerall = p2name != "Onslaught"
triggerall = p2name != "Apocalypse"
triggerall = var(55) = 1
triggerall = p2stateno != 150 && p2stateno != 151 && p2stateno != 152
triggerall = p2stateno != 153 && p2stateno != 154
triggerall = p2stateno != 131 && p2stateno != 5120 && p2stateno != 132
triggerall = p2stateno != 155
triggerall = p2statetype != A
triggerall = p2statetype != L   
triggerall = p2movetype != H
triggerall = p2stateno != 140
triggerall = enemynear,stateno != 130 || (enemynear,stateno = 130 && enemynear,prevstateno != 150 && enemynear,prevstateno != 152)
triggerall = p2bodydist Y >= -5 && p2bodydist X > -36
triggerall = p2bodydist X <= 5
trigger1 = p2movetype = A
trigger1 = random <= 300
trigger2 = random <= 200

[state 265,7]
type = ChangeState
value = 3200
triggerall = var(58) > 1 || var(58) < 1
triggerall = p2name != "BigWomen"
triggerall = p2name != "CADILLACS"
triggerall = p2name != "Madgear"
triggerall = p2name != "DARK WARRIOR2"
triggerall = p2name != "Onslaught"
triggerall = p2name != "Apocalypse"
triggerall = var(55) = 1
triggerall = p2stateno != 150 && p2stateno != 151 && p2stateno != 152
triggerall = p2stateno != 153 && p2stateno != 154 && p2stateno != 130
triggerall = p2stateno != 131 && p2stateno != 5120 && p2stateno != 132
triggerall = p2stateno != 155
triggerall = p2statetype != A
triggerall = p2movetype != H  
triggerall = p2statetype != L   
triggerall = p2bodydist Y >= -5
triggerall = p2bodydist X >= -50
trigger1 = p2bodydist X <= 39
trigger1 = p2movetype = A
trigger1 = random <= 150
trigger2 = p2bodydist X <= 39
trigger2 = p2movetype != A
trigger2 = random <= 100

[State 265, 7]
type = ChangeState
triggerall = var(55) = 1
triggerall = time = 0
triggerall = p2bodydist X > -50
triggerall = p2bodydist Y >= -40
trigger1 = p2bodydist X <= 50
trigger1 = p2movetype = A
trigger1 = random <= 150
value = 1030

[State 265, 7]
type = ChangeState
triggerall = var(58) > 1 || var(58) < 1
triggerall = var(55) = 1
triggerall = time = 0
triggerall = p2bodydist X > -50
triggerall = p2bodydist Y >= -40
trigger1 = p2bodydist X <= 50
trigger1 = p2movetype = A
trigger1 = random <= 150
value = 1040

[State 265, 7]
type = ChangeState
triggerall = var(58) > 2 || var(58) < 1
triggerall = var(16) < 1
triggerall = var(14) < 1 && var(3) < 1
triggerall = var(55) = 1
triggerall = time = 0
triggerall = p2bodydist X > -50
triggerall = p2bodydist Y >= -40
triggerall = p2bodydist X <= 50
triggerall = p2movetype = A
triggerall = random <= 150
trigger1 = power >= 500 + var(20)*100
value = 1050
;-------------------------------------------
; AI helper
[Statedef 1234]
anim = 12342
ctrl = 0

[State 111, 1]
type = Turn
trigger1 = facing != parent, facing

[State 112, 2]
type = ParentVarSet
triggerall = time > 0
triggerall = parent,var(58) < 0 || parent,var(58) > 0
triggerall = parent,var(41) = 0
triggerall = parent, movetype != H
triggerall = parent, RoundState = 2
trigger1 = parent, command = "x"
trigger2 = parent, command = "y"
trigger3 = parent, command = "z"
trigger4 = parent, command = "a"
trigger5 = parent, command = "b"
trigger6 = parent, command = "c"
trigger7 = parent, command = "s"
trigger8 = parent, command = "holdfwd"
trigger9 = parent, command = "holdback"
trigger10 = parent, command = "holdup"
trigger11 = parent, command = "holddown"
var(55) = 1

[State 113, 3]
type = ParentVarSet
triggerall = parent, var(55) = 1 && parent,var(41) = 0
triggerall = parent, RoundState = 2
trigger1 = command = "x" && parent, command = "x"
trigger2 = command = "y" && parent, command = "y"
trigger3 = command = "z" && parent, command = "z"
trigger4 = command = "a" && parent, command = "a"
trigger5 = command = "b" && parent, command = "b"
trigger6 = command = "c" && parent, command = "c"
trigger7 = command = "s" && parent, command = "s"
trigger8 = command = "holdfwd" && parent, command = "holdfwd"
trigger9 = command = "holdback" && parent, command = "holdback"
trigger10 = command = "holdup" && parent, command = "holdup"
trigger11 = command = "holddown" && parent, command = "holddown"
var(55) = 0

[State 112, 2]
type = ParentVarSet
triggerall = time > 0
triggerall = parent, RoundState = 2
trigger1 = parent, command = "x"
trigger2 = parent, command = "y"
trigger3 = parent, command = "z"
trigger4 = parent, command = "a"
trigger5 = parent, command = "b"
trigger6 = parent, command = "c"
trigger7 = parent, command = "s"
trigger8 = parent, command = "holdfwd"
trigger9 = parent, command = "holdback"
trigger10 = parent, command = "holdup"
trigger11 = parent, command = "holddown"
var(41) = 1

;------------------------------------------
[Statedef 10]
type    = C
physics = C
anim = 10

[State 10, 1]
type = varset
trigger1 = Time = 0
var(18) = 0

[State 10, 1]
type = varset
trigger1 = Time = 0
var(5) = 0

[State 10, 1]
type = VelMul
trigger1 = Time = 0
x = .75

[State 10, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 11

; Crouching
[Statedef 11]
type    = C
physics = C
sprpriority = 0

[State 11, 1] 
type = ChangeAnim
trigger1 = Anim != 11
trigger1 = time = 0
value = 11

[State 0, 1]
type = varset
trigger1 = time = 0
var(13) = 0

[State 0, 1]
type = varset
trigger1 = time = 0
var(18) = 0

[State 0, 1]
type = varset
trigger1 = var(23) = 1
var(25) = 5

[State 0, 1]
type = varset
trigger1 = time = 0
trigger1 = var(23) = 1
var(13) = 1

[State 0, 1]
type = varset
trigger1 = time = 0
var(23) = 0

[State 5001, 1]
type = HitVelSet
trigger1 = var(13) = 1
trigger1 = var(16) > 0
trigger1 = Time = 0
x = 1

[State 5001, 3] 
type = VelMul
trigger1 = var(13) = 1
trigger1 = Time >= GetHitVar(slidetime)
x = .6

[State 5001, 4]
type = VelSet
trigger1 = var(13) = 1
trigger1 = HitOver
x = 0

[State 11, 1] 
type = ChangeAnim
trigger1 = Anim = 6 && AnimTime = 0
value = 11
;---------------------------------------
; Walk
[Statedef 20]
type    = S
physics = S
sprpriority = 0

[State 0, 1]
type = varset
trigger1 = time = 0
var(18) = 0

[State 0, 1]
type = varset
trigger1 = time = 0
var(13) = 0

[State 0, 1]
type = varset
trigger1 = var(23) = 1
var(25) = 5

[State 0, 1]
type = varset
trigger1 = time = 0
trigger1 = var(23) = 1
var(13) = 1

[State 0, 1]
type = varset
trigger1 = time = 0
var(23) = 0

[State 20, 1]
type = VelSet
trigger1 = var(13) != 1
trigger1 = command = "holdfwd"
x = const(velocity.walk.fwd.x)

[State 20, 2]
type = VelSet
trigger1 = var(13) != 1
trigger1 = command = "holdback"
x = const(velocity.walk.back.x)

[State 20, 3]
type = ChangeAnim
triggerall = anim != 20
triggerall = command = "holdfwd"
trigger1 = Anim != 20 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 20

[State 5001, 1]
type = HitVelSet
trigger1 = var(13) = 1
trigger1 = var(16) > 0
trigger1 = !HitOver
trigger1 = Time = 0
x = 1

[State 5001, 3] 
type = VelMul
trigger1 = var(13) = 1
trigger1 = !HitOver
trigger1 = Time >= GetHitVar(slidetime)
x = .6

[State 5001, 5]
type = DefenceMulSet
trigger1 = var(13) = 1
trigger1 = HitOver
value = 1

[State 0, 1]
type = varset
trigger1 = command = "holdfwd"
trigger1 = vel x > -2
trigger2 = command = "holdback"
trigger2 = vel x < 2
var(13) = 0

[State 20, 4]
type = ChangeAnim
triggerall = anim != 21
triggerall = command = "holdback"
trigger1 = Anim != 21 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 21

[State 0, 1]
type = varset
trigger1 = command = "holdback"
var(18) = 1
[State 0, 1]
type = varset
trigger1 = command != "holdback"
var(18) = 0
;--------------------------------------
; Walk   ;only AI
[Statedef 22]
type    = S
physics = S
sprpriority = 0

[State 20, 1]
type = VelSet
trigger1 = 1
x = const(velocity.walk.fwd.x)

[State 20, 3]
type = ChangeAnim
trigger1 = Anim != 20 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 20

[State 20, 3]
type = Changestate
trigger1 = P2bodydist X <= 5 && P2dist X >= 0
trigger1 = time >= 4
value = 245
[State 20, 3]
type = Changestate
trigger1 = P2bodydist X >= 25
trigger1 = time >= 4
value = 450
;---------------------------------------
; turn
[Statedef 249]
type = S
physics = S
sprpriority = 0
ctrl = 1

[State 0, 1]
type = turn
trigger1 = time = 0

[State 0, 1]
type = Changestate
trigger1 = time = 1
value = 0
ctrl = 1

; GUARD (end)
[Statedef 140]
type = U    
physics = U 
ctrl = 1

[State 140, 1]
type = varset
trigger1 = Time = 0
var(18) = 0

[State 140, 1]
type = varset
trigger1 = Time = 0
trigger1 = command = "holdback"
var(18) = 1

[State 140, 1]
type = ChangeAnim
trigger1 = Time = 0
value = 140 + (statetype = C) + (statetype = A)*2

[State 140, 2]
type = StateTypeSet
trigger1 = Time = 0 && statetype = S
physics = S

[State 140, 3]
type = StateTypeSet
trigger1 = Time = 0 && statetype = C
physics = C

[State 140, 4]
type = StateTypeSet
trigger1 = Time = 0 && statetype = A
physics = A

[State 140, Hi to Lo]
type = StateTypeSet
trigger1 = statetype = S && command = "holddown"
statetype = C
physics = C

[State 140, Lo to Hi]
type = StateTypeSet
trigger1 = statetype = C && command != "holddown"
statetype = S
physics = S

[State 52, 2]
type = statetypeset
triggerall = var(55) = 1 && statetype = A
trigger1 = prevstateno = 132 && time = 0
physics = N
[State 52, 2]
type = statetypeset
triggerall = var(55) = 1 && statetype = A
trigger1 = prevstateno = 132 && time = 1
physics = A
;-------------------------------------
; SGUARDHIT (shaking)
[Statedef 150]
type    = S
movetype= H
physics = N
velset = 0,0
facep2 = 1

[State 0, 1]
type = varset
trigger1 = time = 0
trigger1 = var(23) = 1
var(25) = 5

[State 0, 1]
type = varset
trigger1 = time = 0
var(23) = 0

[State 150, 2]
type = lifeadd
trigger1 = time = 0
trigger1 = var(16) > 0
value = gethitvar(damage)

[State 150, 2]
type = lifeset
trigger1 = time > 0
trigger1 = var(16) > 0
value = var(26)

[State 0, 1]
type = varset
trigger1 = time = 0
var(12) = 0
ignorehitpause = 1
[State 0, 1]
type = varset
trigger1 = command = "FF" && var(55) = 0
var(12) = 1
ignorehitpause = 1
[State 0, 1]
type = varset
trigger1 = command = "ay" && var(55) = 0
var(12) = 2
ignorehitpause = 1

[State 150, 1]
type = ChangeAnim
trigger1 = 1
value = 150

[State 150, 2]
type = ChangeState
trigger1 = HitShakeOver
value = 151 + 2*(command = "holddown")

[State 151, Hi to Lo]
type = StateTypeSet
triggerall = statetype = S
trigger1 = var(55) = 0 && command = "holddown"
trigger2 = var(55) = 1
trigger2 = (p2statetype = C && random < 900) || gametime%30 < 25
statetype = C
physics = C

[State 151, Lo to Hi]
type = StateTypeSet
triggerall = statetype = C
trigger1 = var(55) = 0 && command != "holddown"
trigger2 = var(55) = 1
trigger2 = (p2statetype = S && random < 500) || (p2statetype = A && random < 900) || gametime%30 >= 25
statetype = S
physics = S

[State 150, 3]
type = ForceFeedback
trigger1 = time = 0
waveform = square
time = 3
;---------------------------------------
; SGUARDHIT2 (knocked back)
[Statedef 151]
type    = S
movetype= H
physics = S
anim = 150

[State 150, 2]
type = lifeset
trigger1 = var(16) > 0
trigger1 = time > 0
value = var(26)

[State 151, 1]
type = HitVelSet
trigger1 = Time = 0
x = 1

[State 151, 2]
type = VelSet
trigger1 = Time = GetHitVar(slidetime)
trigger2 = var(1) != 1000 && var(1) != 500 && var(1) != 750 && var(1) != 667
trigger2 = Time >= GetHitVar(hittime)
trigger3 = var(1) = 1000 || var(1) = 500 || var(1) = 750 || var(1) = 667
trigger3 = hitover
x = 0

[State 151, 3]
type = CtrlSet
trigger1 = Time = GetHitVar(ctrltime)
value = 1

[State 0, 1]
type = varset
trigger1 = command = "FF" && var(55) = 0
var(12) = 1
ignorehitpause = 1
[State 0, 1]
type = varset
trigger1 = command = "ay" && var(55) = 0
var(12) = 2
ignorehitpause = 1

[State 0, 1]
type = ChangeState
triggerall = var(12) > 0 && time <= 10
triggerall = var(16) < 1
triggerall = var(14) < 1
trigger1 = var(12) = 1 && power >= 212 + var(20)*100
trigger2 = var(12) != 1 && power >= 606 + var(20)*100
value = 1307

[State 151, Hi to Lo]
type = StateTypeSet
triggerall = statetype = S
trigger1 = var(55) = 0 && command = "holddown"
trigger2 = var(55) = 1
trigger2 = (p2statetype = C && random < 900) || gametime%30 < 25
statetype = C
physics = C

[State 151, Lo to Hi]
type = StateTypeSet
triggerall = statetype = C
trigger1 = var(55) = 0 && command != "holddown"
trigger2 = var(55) = 1
trigger2 = (p2statetype = S && random < 500) || (p2statetype = A && random < 900) || gametime%30 >= 25
statetype = S
physics = S

[State 151, 4]
type = ChangeState
trigger1 = var(1) != 1000 && var(1) != 500 && var(1) != 750 && var(1) != 667
trigger1 = Time >= GetHitVar(hittime)
trigger2 = var(1) = 1000 || var(1) = 500 || var(1) = 750 || var(1) = 667
trigger2 = hitover
value = 130
ctrl = 1
;--------------------------------------------
; CGUARDHIT (shaking)
[Statedef 152]
type    = C
movetype= H
physics = N
velset = 0,0
facep2 = 1

[State 0, 1]
type = varset
trigger1 = time = 0
trigger1 = var(23) = 1
var(25) = 5

[State 0, 1]
type = varset
trigger1 = time = 0
var(23) = 0

[State 150, 2]
type = lifeadd
trigger1 = var(16) > 0
trigger1 = time = 0
value = gethitvar(damage)

[State 150, 2]
type = lifeset
trigger1 = var(16) > 0
trigger1 = time > 0
value = var(26)

[State 0, 1]
type = varset
trigger1 = time = 0
var(12) = 0
ignorehitpause = 1
[State 0, 1]
type = varset
trigger1 = command = "FF" && var(55) = 0
var(12) = 1
ignorehitpause = 1
[State 0, 1]
type = varset
trigger1 = command = "ay" && var(55) = 0
var(12) = 2
ignorehitpause = 1

[State 152, 1]
type = ChangeAnim
trigger1 = 1
value = 151

[State 152, 3]
type = ChangeState
trigger1 = HitShakeOver
value = 151 + 2*(command = "holddown")

[State 151, Hi to Lo]
type = StateTypeSet
triggerall = statetype = S
trigger1 = var(55) = 0 && command = "holddown"
trigger2 = var(55) = 1
trigger2 = (p2statetype = C && random < 900) || gametime%30 < 25
statetype = C
physics = C

[State 151, Lo to Hi]
type = StateTypeSet
triggerall = statetype = C
trigger1 = var(55) = 0 && command != "holddown"
trigger2 = var(55) = 1
trigger2 = (p2statetype = S && random < 500) || (p2statetype = A && random < 900) || gametime%30 >= 25
statetype = S
physics = S

[State 152, 4]
type = ForceFeedback
trigger1 = time = 0
waveform = square
time = 4
;-----------------------------------------
; CGUARDHIT2 (knocked back)
[Statedef 153]
type    = C
movetype= H
physics = C
anim = 151

[State 150, 2]
type = lifeset
trigger1 = var(16) > 0
trigger1 = time > 0
value = var(26)

[State 153, 1]
type = HitVelSet
trigger1 = Time = 0
x = 1

[State 153, 2]
type = VelSet
trigger1 = Time = GetHitVar(slidetime)
trigger2 = var(1) != 1000 && var(1) != 500 && var(1) != 750 && var(1) != 667
trigger2 = Time >= GetHitVar(hittime)
trigger3 = var(1) = 1000 || var(1) = 500 || var(1) = 750 || var(1) = 667
trigger3 = hitover
x = 0

[State 153, 3]
type = CtrlSet
trigger1 = Time = GetHitVar(ctrltime)
value = 1

[State 0, 1]
type = varset
trigger1 = command = "FF" && var(55) = 0
var(12) = 1
ignorehitpause = 1
[State 0, 1]
type = varset
trigger1 = command = "ay" && var(55) = 0
var(12) = 2
ignorehitpause = 1

[State 0, 1]
type = ChangeState
triggerall = var(12) > 0 && time <= 10
triggerall = var(16) < 1
triggerall = var(14) < 1
trigger1 = var(12) = 1 && power >= 212 + var(20)*100
trigger2 = var(12) != 1 && power >= 606 + var(20)*100
value = 1307

[State 151, Hi to Lo]
type = StateTypeSet
triggerall = statetype = S
trigger1 = var(55) = 0 && command = "holddown"
trigger2 = var(55) = 1
trigger2 = (p2statetype = C && random < 900) || gametime%30 < 25
statetype = C
physics = C

[State 151, Lo to Hi]
type = StateTypeSet
triggerall = statetype = C
trigger1 = var(55) = 0 && command != "holddown"
trigger2 = var(55) = 1
trigger2 = (p2statetype = S && random < 500) || (p2statetype = A && random < 900) || gametime%30 >= 25
statetype = S
physics = S

[State 153, 4]
type = ChangeState
trigger1 = var(1) != 1000 && var(1) != 500 && var(1) != 750 && var(1) != 667
trigger1 = Time >= GetHitVar(hittime)
trigger2 = var(1) = 1000 || var(1) = 500 || var(1) = 750 || var(1) = 667
trigger2 = hitover
value = 131
ctrl = 1
;---------------------------------------
; AGUARDHIT (shaking)
[Statedef 154]
type    = A
movetype= H
physics = N
velset = 0,0
facep2 = 1

[State 0, 1]
type = varset
trigger1 = time = 0
trigger1 = prevstateno = 5020
var(25) = 5

[State 150, 2]
type = lifeadd
trigger1 = var(16) > 0
trigger1 = time = 0
value = gethitvar(damage)

[State 150, 2]
type = lifeset
trigger1 = var(16) > 0
trigger1 = time > 0
value = var(26)

[State 154, 2]
type = ChangeState
trigger1 = HitShakeOver
value = 155 

[State 154, 1]
type = ChangeAnim
trigger1 = 1
value = 152

[State 154, 3]
type = ForceFeedback
trigger1 = time = 0
waveform = square
time = 4
;----------------------------------
; AGUARDHIT2 (knocked away)
[Statedef 155]
type    = A
movetype= H
physics = N
anim = 152

[State 150, 2]
type = lifeset
trigger1 = var(16) > 0
trigger1 = time > 0
value = var(26)

[State 155, 1]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 155, 2]
type = VelAdd
trigger1 = 1
y = Const(movement.yaccel)

[State 155, 3]
type = CtrlSet
trigger1 = Time = GetHitVar(ctrltime)
value = 1

[State 155, 4]
type = VarSet
trigger1 = 1
sysvar(0) = (pos y >= 0) && (vel y > 0)

[State 155, 5]
type = VelSet
trigger1 = sysvar(0)
y = 0

[State 155, 6]
type = PosSet
trigger1 = sysvar(0)
y = 0

[State 155, 7]
type = ChangeState
trigger1 = sysvar(0)
trigger1 = command != "holdback"
value = 52

[State 155, 8]
type = ChangeState
trigger1 = sysvar(0)
value = 130
;--------------------------------------
; HITL_SHAKE
[Statedef 5080]
type    = L
movetype= H
physics = N
velset = 0,0
poweradd = 5

[State 5000, Damage]
type = lifeadd
trigger1 = var(16) > 0
value = -GetHitVar(damage)
persistent = 0
ignorehitpause = 1

[State 0, 1]
type = varset
trigger1 = var(16) > 0
var(25) = 5

[State 5020, 5]
type = ChangeState
trigger1 = var(16) > 0
trigger1 = time = 0
trigger1 = life > 0
value = 5120

[State 5080, 1]
type = VarSet
trigger1 = time = 0
sysvar(2) = ifelse (GetHitVar(yvel) = 0, 5080, 5090)

[State 5080, 1]
type = VarSet
triggerall = time = 0
triggerall = GetHitVar(yvel) = 0
trigger1 = anim = [5111,5119]
trigger2 = anim = [5161,5169]
trigger3 = anim = 8314
sysvar(2) = 8314

[State 5080, 2]
type = VarAdd
trigger1 = time = 0
trigger1 = (anim = [5081,5089]) || (anim = [5111,5119])
trigger1 = SelfAnimExist(sysvar(2) + (anim % 10))
sysvar(2) = anim % 10

[State 5080, 1]
type = VarSet
trigger1 = time = 0
trigger1 = GetHitVar(yvel) != 0
trigger1 = anim = 8314
sysvar(2) = 5093

[State 5080, 3] 
type = VarSet
trigger1 = time = 0
trigger1 = sysvar(2) = 5090
trigger1 = !SelfAnimExist(5090)
sysvar(2) = 5030

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

[State 5080, 4]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0
value = 5081 ;hitl_slide

[State 5080, 5]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) != 0
value = 5030 ;hit up
;-------------------------------------
; HIT_LIEDOWN
[Statedef 5110]
type    = L
movetype= H
physics = N

;[State 5210, 1] 
;type = PalFX
;trigger1 = Time = 0
;time = 1
;add = 0,0,0

[State 5110, EnvShake]
type = FallEnvShake
trigger1 = Time = 0

[State 5110, 3]
type = ChangeAnim
trigger1 = time = 0 && anim = 8314
value = 5111

[State 5110, 1] ;For hit up/up-diag type (from state 5081)
type = ChangeAnim
persistent = 0
trigger1 = SelfAnimExist(5110 + (anim % 10)) && anim != [5091,5099]
trigger1 = anim = [5081,5089]
value = 5110 + (anim % 10)

[State 5110, 2] ;Hit ground anim (normal)
type = ChangeAnim
triggerall = time = 0 && prevstateno != 5101 && anim != [5091,5099]
triggerall = anim != [5110,5119] ;Not already changed anim
trigger1 = anim != [5161,5169]
trigger2 = !SelfAnimExist(5170 + (anim % 10))
value = 5170
[State 5110, 2] ;Hit ground anim (normal)
type = ChangeAnim
triggerall = time = 0 && prevstateno = 5101 && anim != [5091,5099]
triggerall = anim != [5110,5119] ;Not already changed anim
trigger1 = anim != [5161,5169]
trigger2 = !SelfAnimExist(5170 + (anim % 10))
value = 5110

[State 5110, 3] ;Hit ground anim (for hit up)
type = ChangeAnim
triggerall = time = 0 && anim != [5091,5099]
triggerall = anim != [5110,5119] ;Not already changed anim
trigger1 = anim = [5161,5169]
trigger1 = SelfAnimExist(5170 + (anim % 10))
value = 5170 + (anim % 10)

[State 5110, 3]
type = ChangeAnim
trigger1 = time = 0 && anim = [5091,5099]
value = 5111

[State 5110, 4]
type = HitFallDamage
trigger1 = Time = 0

[State 5110, 5]
type = PosSet
trigger1 = Time = 0
y = 0

[State 5110, Var] ;Get fall velocity
type = VarSet
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) != 0
sysvar(1) = floor(vel y)

[State 5110, 6]
type = PlaySnd
trigger1 = Time = 0
trigger1 = !SysVar(0) || vel y != 0 || anim = 5170
;value = F7, 0 ;Hit ground
value = F7, (sysvar(1) > 5) + (sysvar(1) > 14)

[State 5110, 7]
type = GameMakeAnim
trigger1 = Time = 0
trigger1 = !SysVar(0) || vel y != 0 || anim = 5170
value = 60 + (sysvar(1) > 5) + (sysvar(1) > 14)
pos = 0, 0
under = sysvar(1) <= 14

[State 5110, 8]
type = VelSet
trigger1 = Time = 0
y = 0

[State 5110, 9] ;For hit up type
type = ChangeAnim
persistent = 0
triggerall = anim = [5171,5179]
triggerall = SelfAnimExist(5110 + (anim % 10))
trigger1 = AnimTime = 0
trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground anim
value = 5110 + (anim % 10)

[State 5110, 10] ;For normal
type = ChangeAnim
persistent = 0
triggerall = Anim != [5111,5119]
trigger1 = AnimTime = 0
trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground frame
value = 5110

[State 5110, 11] ;If just died
type = ChangeState
triggerall = !alive && time > 0
trigger1 = AnimTime = 0
trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground frame
trigger3 = Anim = [5110,5119]
value = 5150

[State 5110, 12]
type = VarSet
trigger1 = SysVar(0)
trigger1 = Time = 0
sysvar(0) = 0

[State 5110, 13] ;Friction
type = VelMul
trigger1 = 1
x = 0.85

[State 5110, 14]
type = ForceFeedback
trigger1 = alive
trigger1 = Time = 0
time = 8
ampl = 240
waveform = sine

[State 5110, 15]
type = ForceFeedback
trigger1 = !alive
trigger1 = Time = 0
ampl = 200, 7, -.467
time = 30
waveform = sine
;-------------------------------------
; HITG_SHAKE
[Statedef 5000]
type    = S
movetype= H
physics = N
velset = 0,0
poweradd = 5

[State 1300, 5]
type = projectile
triggerall = time = 0
triggerall = p2movetype = H
trigger1 = prevstateno = 2402
projanim = 9241
offset = 25,-36
ignorehitpause = 1
projsprpriority = 3
projremovetime = 22
projedgebound = 210

[State 9001, 1]
type = Explod
trigger1 = Time = 0
trigger1 = var(34) = 1
trigger1 = var(57) = 1
trigger1 = var(16) < 1
anim = 9004
pos = -84,190
postype = right
ignorehitpause = 1
bindtime = -1
ontop = 1
ownpal = 1

[State 9001, 1]
type = Explod
trigger1 = Time = 0
trigger1 = var(34) = 1
trigger1 = var(57) = 2
trigger1 = var(16) < 1
anim = 9004
pos = 8,190
postype = left
ignorehitpause = 1
bindtime = -1
ontop = 1
ownpal = 1

[State 9001, 3]
type = Envcolor
trigger1 = Time = 0
trigger1 = var(34) = 1
trigger1 = var(16) < 1
value = 255,255,255
time = 1
under = 1

[State 9001, 1]
type = varset
trigger1 = Time = 0
var(34) = 0

[State 5000, 6]
type = varset
trigger1 = time = 0
var(5) = 0

[State 5000, 6]
type = varset
trigger1 = time = 0
var(23) = 0

[State 5000, 6]
type = varset
trigger1 = time = 0
trigger1 = var(16) > 0
trigger1 = life > 0
var(23) = 1

[State 5000, Damage]
type = lifeadd
trigger1 = var(16) > 0
value = -GetHitVar(damage)
persistent = 0
ignorehitpause = 1

[State 5000, 6]
type = varset
trigger1 = time = 0
trigger1 = var(16) > 0
trigger1 = life > 0
var(26) = life

[State 5000, 6]
type = ChangeState
triggerall = command != "holdfwd"
triggerall = command != "holdback"
trigger1 = time = 0
trigger1 = var(16) > 0
trigger1 = life > 0
value = 0
ctrl = 1

[State 5000, 6]
type = ChangeState
triggerall = time = 0
triggerall = var(16) > 0
triggerall = life > 0
trigger1 = command = "holdfwd"
trigger2 = command = "holdback"
value = 20
ctrl = 1

[State 5000, 7]
type = varset
triggerall = time = 0
triggerall = var(16) > 0
triggerall = life <= 0
trigger1 = prevstateno = 150 || prevstateno = 151 || prevstateno = 152
trigger2 = prevstateno = 153 || prevstateno = 130
trigger3 = prevstateno = 131 || prevstateno = 120
trigger4 = prevstateno = 140 && var(18) = 1
trigger5 = prevstateno = 20 && var(18) = 1
var(5) = 1

[State 5000, 7]
type = lifeset
triggerall = time = 0
trigger1 = var(5) = 1
value = 2

[State 5000, 7]
type = ChangeState
triggerall = time = 0
triggerall = command = "holdback"
triggerall = command != "holddown"
trigger1 = var(5) = 1
value = 150          

[State 5000, 7]
type = ChangeState
triggerall = time = 0
triggerall = command = "holdback"
triggerall = command = "holddown"
trigger1 = var(5) = 1
value = 152

[State 5000, Damage]
type = lifeadd
triggerall = var(16) < 1
triggerall = time = 0 && life-gethitvar(damage) <= 0
trigger1 = prevstateno = 150 || prevstateno = 151 || prevstateno = 152
trigger2 = prevstateno = 153 || prevstateno = 130
trigger3 = prevstateno = 131 || prevstateno = 120
trigger4 = prevstateno = 140 && var(18) = 1
trigger5 = prevstateno = 20 && var(18) = 1
value = -GetHitVar(damage)
ignorehitpause = 1
[State 150, 1]
type = varset
triggerall = time = 0
triggerall = life <= 0
trigger1 = prevstateno = 150 || prevstateno = 151 || prevstateno = 152
trigger2 = prevstateno = 153 || prevstateno = 130
trigger3 = prevstateno = 131 || prevstateno = 120
trigger4 = prevstateno = 140 && var(18) = 1
trigger5 = prevstateno = 20 && var(18) = 1
var(4) = gethitvar(hitshaketime)
ignorehitpause = 1
[State 150, 1]
type = varset
triggerall = time = 0
triggerall = life <= 0
trigger1 = prevstateno = 150 || prevstateno = 151 || prevstateno = 152
trigger2 = prevstateno = 153 || prevstateno = 130
trigger3 = prevstateno = 131 || prevstateno = 120
trigger4 = prevstateno = 140 && var(18) = 1
trigger5 = prevstateno = 20 && var(18) = 1
var(5) = gethitvar(hittime)
ignorehitpause = 1
[State 150, 1]
type = varset
triggerall = time = 0
triggerall = life <= 0
trigger1 = prevstateno = 150 || prevstateno = 151 || prevstateno = 152
trigger2 = prevstateno = 153 || prevstateno = 130
trigger3 = prevstateno = 131 || prevstateno = 120
trigger4 = prevstateno = 140 && var(18) = 1
trigger5 = prevstateno = 20 && var(18) = 1
fvar(12) = gethitvar(xvel)
ignorehitpause = 1
[State 5000, 7]
type = ChangeState
triggerall = time = 0
triggerall = life <= 0
trigger1 = prevstateno = 150 || prevstateno = 151 || prevstateno = 130
trigger2 = prevstateno = 120 && command != "holddown"
trigger3 = prevstateno = 140 && command != "holddown" && var(18) = 1
trigger4 = prevstateno = 20 && var(18) = 1
value = 2100
ignorehitpause = 1
[State 5000, 7]
type = ChangeState
triggerall = time = 0
triggerall = life <= 0
trigger1 = prevstateno = 152 || prevstateno = 153 || prevstateno = 131
trigger2 = prevstateno = 120 && command = "holddown"
trigger3 = prevstateno = 140 && command = "holddown" && var(18) = 1
value = 2102
ignorehitpause = 1

[State 5000, 1] 
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = ifelse((GetHitVar(groundtype) = 1),5000,5010) + GetHitVar(animtype)
[State 5000, 2]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [0,3]
trigger1 = gethitvar(yvel) != 0
trigger1 = gethitvar(fall) = 0
value = 5050+ifelse(gethitvar(groundtype) !=1,5,0)

[State 5000, 2]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
trigger1 = gethitvar(groundtype) != 1
value = 5030

[State 5000, 2]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
trigger1 = gethitvar(groundtype) = 1
value = 5050

[State 5000, 3] 
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
trigger1 = gethitvar(groundtype) != 2
value = 5047 + GetHitVar(animtype)

[State 5000, 3] 
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
trigger1 = gethitvar(groundtype) = 2
value = 5053

[State 5000, 3] 
type = ChangeAnim
trigger1 = Time > 0
value = anim

[State 5000, 4] 
type = StateTypeSet
trigger1 = Time = 0
trigger1 = GetHitVar(yvel) != 0 && GetHitVar(fall)
trigger2 = Pos Y != 0
type = a

[State 5000, 5]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0
value = 5001 

[State 5000, 6]
type = ChangeState
trigger1 = HitShakeOver
value = 5030

[State 5000, FFB Light]
type = ForceFeedback
trigger1 = anim = 5000
trigger2 = anim = 5010
persistent = 0
time = 6
waveform = square

[State 5000, FFB Medium]
type = ForceFeedback
trigger1 = anim = 5001
trigger2 = anim = 5011
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3

[State 5000, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5012
trigger2 = anim = 5002
trigger3 = anim = 5030
persistent = 0
time = 15
waveform = sinesquare
ampl = 140
;------------------------------------
; HITG_SLIDE
[Statedef 5001]
type    = S
movetype= H
physics = S

[State 5001, 1]
type = HitVelSet
trigger1 = Time = 0
x = 1

[State 5001, 2]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 5005 + GetHitVar(animtype) + (GetHitVar(groundtype)=2)*10

[State 5001, 2]
type = ChangeAnim
trigger1 = anim = 5050 || anim = 5051
value = anim
elem = 1

[State 5001, 2]
type = ChangeAnim
trigger1 = anim = 5005 || anim = 5006 || anim = 5016 
trigger1 = animtime > 6
trigger1 = time > gethitvar(hittime) + gethitvar(slidetime) - 5
value = 5018

[State 5001, 2]
type = ChangeAnim
trigger1 = anim = 5015  
trigger1 = animtime > 3
trigger1 = time > gethitvar(hittime) + gethitvar(slidetime) - 5
value = 5018

[State 5001, 2]
type = ChangeAnim
trigger1 = anim = 5007 || anim = 5017
trigger1 = animtime > 10
trigger1 = time > gethitvar(hittime) + gethitvar(slidetime) - 5
value = 5018

[State 5001, 3] ;Stop sliding back
type = VelMul
trigger1 = Time >= GetHitVar(slidetime)
x = .6

[State 5001, 4]
type = VelSet
trigger1 = HitOver
x = 0

[State 5001, 5]
type = DefenceMulSet
trigger1 = HitOver
value = 1

[State 5001, 6]
type = ChangeState
trigger1 = HitOver
value = 0
ctrl = 1

; HITA_RECOV (recovering in air, not falling)
[Statedef 5040]
type    = A
movetype= H
physics = N
ctrl = 0

[State 5040, 1]
type = ChangeState
trigger1 = !Alive
value = 5050

[State 5040, 1]
type = nothitby
trigger1 = time > 6
value = SCA

[State 5040, 2]
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = Anim != 5040
trigger2 = Time = 0
trigger2 = Anim != 5035
value = 5040

[State 5040, 4]
type = StateTypeSet
trigger1 = HitOver
movetype = I

[State 5040, 5]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5040, 6]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 52 ;JUMPLAND
;------------------------------------
; HITA_FALL (knocked up, falling)
[Statedef 5050]
type    = A
movetype= H
physics = N

[State 5050, 1]
type = ChangeAnim
trigger1 = Time = 0     
trigger1 = Anim != 5035 && anim != 5030 && anim != 5050
trigger1 = (Anim != [5051, 5059]) && (Anim != [5061, 5069])
trigger1 = Anim != [5090,5099]
value = 5050

[State 5050, 1]
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = anim = 5030
value = 5055

[State 5050, 2] 
type = ChangeAnim
trigger1 = anim != 5050
trigger1 = anim = [5050,5059]
trigger1 = Vel Y >= ifelse(anim = 5050, 1, -2)
trigger1 = SelfAnimExist(anim+10)
trigger1 = anim != 5053
value = anim+10
persistent = 0

[State 5050, 2] 
type = ChangeAnim
trigger1 = Vel Y > 0
trigger1 = SelfAnimExist(anim+10)
trigger1 = anim = 5053
value = anim+10
persistent = 0

[State 5050, 3] 
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5050, 4] 
type = ChangeState
triggerall = Vel Y > 0
triggerall = Pos Y >= -20
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5200 

[State 5050, 5]
type = ChangeState
triggerall = Vel Y > -1
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5210 

[State 5050, 6]
type = ChangeState
;trigger1 = anim != 5055
trigger1 = Vel Y > 0
trigger1 = Pos Y >= ifelse((anim = [5051,5059]) || (anim = [5061,5069]), 0, 25)
value = 5100 
;[State 5050, 6]
;type = ChangeState
;trigger1 = anim = 5055
;trigger1 = Vel Y > 0
;trigger1 = Pos Y >= 5
;value = 5100 
;-------------------------------------
; HIT_BOUNCE (hit ground)
[Statedef 5100]
type    = L
movetype= H
physics = N

;[State 5210, 1] 
;type = PalFX
;trigger1 = Time = 0
;time = 1
;add = 0,0,0

[State 5100, 1]
type = VelSet
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) = 0
trigger1 = vel x > 1
x = 1

[State 5100, EnvShake]
type = FallEnvShake
trigger1 = Time = 0

[State 5100, Var] 
type = VarSet
trigger1 = Time = 0
sysvar(1) = floor(vel y)

[State 5100, 2]
type = ChangeAnim
triggerall = time = 0
trigger1 = anim = [5091,5099]
trigger1 = prevstateno = [5050,5099]
trigger2 = anim = [5161,5163]
value = 5111

[State 5100, 2] 
type = ChangeAnim
triggerall = time = 0
triggerall = anim != 5111
trigger1 = (anim != [5051,5059]) && (anim != [5061,5069])
trigger2 = !SelfAnimExist(5100 + (anim % 10))
value = 5100

[State 5100, 3] 
type = ChangeAnim
triggerall = anim != 5111
trigger1 = time = 0
trigger1 = (anim = [5051,5059]) || (anim = [5061,5069])
trigger1 = SelfAnimExist(5100 + (anim % 10))
value = 5100 + (anim % 10)

[State 5100, 4]
type = PosSet
trigger1 = Time = 0
y = 0

[State 5100, 5]
type = VelSet
trigger1 = Time = 0
y = 0

[State 5100, 6] 
type = VelMul
trigger1 = Time = 0
x = 0.75

[State 5100, 7]
type = ChangeState
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) = 0
value = 5110 

[State 5100, 8]
type = GameMakeAnim
trigger1 = Time = 1
value = 60 + (sysvar(1) > 5) + (sysvar(1) > 14)
pos = 0, 0
under = 1;sysvar(1) <= 10

[State 5100, 9]
type = HitFallDamage
trigger1 = Time = 3

[State 5100, 10]
type = PlaySnd
trigger1 = Time = 1
value = F7, (sysvar(1) > 5) + (sysvar(1) > 14)

[State 5100, 11]
type = PosFreeze
trigger1 = 1

[State 5100, 12]
type = ChangeState
trigger1 = AnimTime = 0
value = 5101

[State 5100, 13]
type = ForceFeedback
trigger1 = Time = 0
waveform = sinesquare
ampl = 128,-3,-.2,.005
time = 20
;---------------------------------------
; HIT_GETUP
[Statedef 5120]
type    = L
movetype= I
physics = N

[State 5120, 1a] ;Get up anim (normal)
type = ChangeAnim
triggerall = time = 0
trigger1 = anim != [5111,5119]
trigger2 = !SelfAnimExist(5120 + (anim % 10))
value = 5120

[State 5120, 1b] ;Get up anim (for hit up/diag-up)
type = ChangeAnim
trigger1 = time = 0
trigger1 = anim = [5111,5119]
trigger1 = SelfAnimExist(5120 + (anim % 10))
value = 5120 + (anim % 10)

[State 5120, 2]
type = VelSet
trigger1 = Time = 0
x = 0

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

[State 5120, 4]
type = HitFallSet
trigger1 = AnimTime = 0
value = 1

[State 5120, 5] ;Can't be thrown right after getting up
type = NotHitBy
trigger1 = AnimTime = 0
value = ,NT,ST,HT
time = 12

[State 5120, 6] ;Can't be hit right after getting up (short time)
type = NotHitBy
trigger1 = AnimTime = 0
value2 = SCA
time = 3

[State 520, 2] 
type = changestate
triggerall = var(55) = 1
triggerall = animtime = 0
triggerall = p2statetype != L   
trigger1 = p2bodydist X <= 40
trigger1 = p2bodydist X >= 20
trigger1 = p2bodydist Y >= -100
trigger1 = p2movetype = A
trigger1 = random <= 100
trigger2 = p2bodydist X < 20
trigger2 = p2bodydist X > -50
trigger2 = p2bodydist Y >= -10
trigger2 = p2movetype = A
trigger2 = random <= 100
value = 1030

[State 520, 2] 
type = changestate
triggerall = var(58) > 1 || var(58) < 1
triggerall = var(55) = 1
triggerall = animtime = 0
triggerall = p2statetype != L   
triggerall = p2movetype = A
trigger1 = p2bodydist X <= 30
trigger1 = p2bodydist X > -50
trigger1 = p2bodydist Y >= -10
trigger1 = random <= 100
trigger2 = p2bodydist X <= 50
trigger2 = p2bodydist X > 20
trigger2 = p2bodydist Y >= -100
trigger2 = random <= 100
value = 1040

[State 520, 2]
type = ChangeState
triggerall = var(58) > 2 || var(58) < 1
triggerall = power >= 500 + var(20)*100
triggerall = var(16) < 1
triggerall = var(55) = 1
triggerall = p2statetype != L   
triggerall = var(14) < 1 && var(3) < 1
triggerall = animtime = 0
triggerall = p2movetype = A
trigger1 = p2bodydist X <= 40
trigger1 = p2bodydist X > -50
trigger1 = p2bodydist Y >= -10
trigger1 = power >= 500 + var(20)*100
trigger1 = random <= 100
trigger2 = p2bodydist X <= 50
trigger2 = p2bodydist X > 20
trigger2 = p2bodydist Y >= -100
trigger2 = power >= 500 + var(20)*100
trigger2 = random <= 100
value = 1050

[State 520, 2]
type = changestate
trigger1 = var(55) = 1 && p2statetype != A
trigger1 = animtime = 0
trigger1 = p2movetype = A && facing != enemy,facing
trigger1 = p2bodydist X <= 50 && p2bodydist X >= -50
trigger1 = random <= 150
value = 1300
     
[State 520, 2]
type = changestate
trigger1 = var(55) = 1
trigger1 = animtime = 0
trigger1 = random <= 500
trigger1 = p2life > 0
value = 130
     
[State 520, 2]
type = changestate
trigger1 = var(55) = 1
trigger1 = animtime = 0
trigger1 = p2life > 0
value = 131
     
[State 5120, 7]
type = ChangeState
trigger1 = var(55) = 0 || p2life <= 0
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;----------------------------------
; HIT_BOUNCE (bounce into air)
[Statedef 5101]
type    = L
movetype= H
physics = N

[State 5101, 1]
type = ChangeAnim
triggerall = time = 0 && anim != 5111
trigger1 = anim != [5101,5109]
trigger2 = !SelfAnimExist(5160 + (anim % 10))
value = 5160

[State 5101, 2]
type = ChangeAnim
triggerall = time = 0 && anim != 5111
trigger1 = anim = [5101,5109]
trigger1 = SelfAnimExist(5160 + (anim % 10))
value = 5160 + (anim % 10)

[State 5101, 1]
type = ChangeAnim
trigger1 = time = 0 && anim = 5111
value = 5093

[State 5101, 3]
type = HitFallVel
trigger1 = Time = 0

[State 5101, 4]
type = PosSet
trigger1 = Time = 0
y = 20

[State 5050, 3] 
type = VelAdd
trigger1 = gethitvar(yaccel) >= 0.4
y = GetHitVar(yaccel)

[State 5050, 3] 
type = VelAdd
trigger1 = gethitvar(yaccel) < 0.4
y = .4

[State 5101, 6] 
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 12
type = ChangeState
value = 5110
;-------------------------------------
; HITC_SHAKE
[Statedef 5010]
type    = C
movetype= H
physics = N
velset = 0,0

[State 5010, 6]
type = varset
trigger1 = time = 0
var(23) = 0

[State 5010, 6]
type = varset
trigger1 = time = 0
trigger1 = var(16) > 0
trigger1 = life > 0
var(23) = 1

[State 5000, Damage]
type = lifeadd
trigger1 = var(16) > 0
value = -GetHitVar(damage)
persistent = 0
ignorehitpause = 1

[State 5010, 6]
type = ChangeState
trigger1 = time = 0
trigger1 = var(16) > 0
trigger1 = life > 0
value = 11
ctrl = 1

[State 5010, 1] 
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = 5020 + GetHitVar(animtype)
[State 5000, 2]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [0,3]
trigger1 = gethitvar(yvel) != 0
trigger1 = gethitvar(fall) = 0
value = 5050+ifelse(gethitvar(groundtype) !=1,5,0)

[State 5000, 2]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
trigger1 = gethitvar(groundtype) != 1
value = 5030

[State 5000, 2]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
trigger1 = gethitvar(groundtype) = 1
value = 5050

[State 5010, 3] 
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) 

[State 5010, 4] 
type = ChangeAnim
trigger1 = Time > 0
value = anim

[State 5010, 5]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0
value = 5011 

[State 5010, 6]
type = ChangeState
trigger1 = HitShakeOver
value = 5030

[State 5010, FFB Light]
type = ForceFeedback
trigger1 = anim = 5020
persistent = 0
time = 6
waveform = square

[State 5010, FFB Medium]
type = ForceFeedback
trigger1 = anim = 5021
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3

[State 5010, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5022
persistent = 0
time = 15
waveform = sinesquare
ampl = 140
;---------------------------------------------------------------------------
; HITC_SLIDE
[Statedef 5011]
type    = C
movetype= H
physics = C

[State 5011, 1]
type = HitVelSet
trigger1 = Time = 0
x = 1

[State 5011, 2]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 5025 + GetHitVar(animtype)
[State 5001, 2]
type = ChangeAnim
trigger1 = anim = 5050 || anim = 5051
value = anim
elem = 1

[State 5011, 3] ;Stop sliding back
type = VelMul
trigger1 = Time >= GetHitVar(slidetime)
x = .6

[State 5011, 4]
type = VelSet
trigger1 = HitOver
x = 0

[State 5011, 5]
type = DefenceMulSet
trigger1 = HitOver
value = 1

[State 5011, 6]
type = ChangeState
trigger1 = HitOver
value = 11
ctrl = 1
;-----------------------------------
; HITA_SHAKE
[Statedef 5020]
type    = A
movetype= H
physics = N
poweradd = 5

[State 9001, 1]
type = Explod
trigger1 = Time = 0
trigger1 = var(34) = 1
trigger1 = var(57) = 1
trigger1 = var(16) < 1
anim = 9004
pos = -84,190
postype = right
ignorehitpause = 1
bindtime = -1
ontop = 1
ownpal = 1

[State 9001, 1]
type = Explod
trigger1 = Time = 0
trigger1 = var(34) = 1
trigger1 = var(57) = 2
trigger1 = var(16) < 1
anim = 9004
pos = 8,190
postype = left
ignorehitpause = 1
bindtime = -1
ontop = 1
ownpal = 1

[State 9001, 3]
type = Envcolor
trigger1 = Time = 0
trigger1 = var(16) < 1
trigger1 = var(34) = 1
value = 255,255,255
time = 1
under = 1

[State 9001, 1]
type = varset
trigger1 = Time = 0
var(34) = 0

[State 5000, 6]
type = varset
trigger1 = time = 0
var(5) = 0

[State 5020, 1] 
type = posset
trigger1 = Time = 0
trigger1 = pos y > 2
y = 2

[State 5020, 4]
type = velset
trigger1 = Time = 0
trigger1 = var(16) < 1
trigger2 = life = 0
x = 0
y = 0

[State 5000, Damage]
type = lifeadd
trigger1 = var(16) > 0
value = -GetHitVar(damage)
persistent = 0
ignorehitpause = 1

[State 5000, 1]
type = varset
trigger1 = var(16) > 0
trigger1 = time = 0
trigger1 = life > 0
var(26) = life

[State 5020, 5]
type = ChangeState
triggerall = anim = 41 || anim = 42 || anim = 43 || anim = 2042 
trigger1 = var(16) > 0
trigger1 = time = 0
trigger1 = life > 0
value = 50
ctrl = 1

[State 5020, 5]
type = ChangeState
triggerall = anim != 41 && anim != 42 && anim != 43 && anim != 2042
trigger1 = var(16) > 0
trigger1 = time = 0
trigger1 = life > 0
value = 53
ctrl = 1

[State 5000, 6]
type = varset
triggerall = time = 0
triggerall = var(16) > 0
triggerall = life <= 0
triggerall = command = "holdback"
trigger1 = prevstateno = 132 || prevstateno = 154 || prevstateno = 155
trigger2 = prevstateno = 120 
trigger3 = prevstateno = 140 && var(18) = 1
var(5) = 1

[State 5000, 6]
type = lifeset
trigger1 = time = 0
trigger1 = var(5) = 1
value = 2

[State 5000, 6]
type = ChangeState
trigger1 = time = 0
trigger1 = command = "holdback"
trigger1 = var(5) = 1
value = 154          

[State 5020, 1] 
type = ChangeAnim
;trigger1 = Time = 0 && anim !=[5090,5099]
trigger1 = GetHitVar(animtype) != [3,5]
value = 5004

[State 5020, 2] 
type = ChangeAnim
;trigger1 = Time = 0 && anim !=[5090,5099]
trigger1 = GetHitVar(animtype) = [3,5]
trigger1 = gethitvar(airtype) != 1
value = 5030

[State 5020, 2] 
type = ChangeAnim
;trigger1 = Time = 0 && anim !=[5090,5099]
trigger1 = GetHitVar(animtype) = [3,5]
trigger1 = gethitvar(airtype) = 1
value = 5050

[State 5020, 3] 
type = ChangeAnim
;trigger1 = Time = 0 && anim !=[5090,5099]
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
trigger1 = gethitvar(airtype) != 2
value = 5047 + GetHitVar(animtype) 

[State 5020, 3] 
type = ChangeAnim
;trigger1 = Time = 0 && anim !=[5090,5099]
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
trigger1 = gethitvar(airtype) = 2
value = 5053 

[State 5020, 4] 
type = ChangeAnim
trigger1 = Time > 0
value = anim

[State 5020, 5]
type = ChangeState
trigger1 = HitShakeOver
value = 5030

[State 5020, FFB Light]
type = ForceFeedback
trigger1 = anim = 5000
trigger2 = anim = 5010
persistent = 0
time = 6
waveform = square

[State 5020, FFB Medium]
type = ForceFeedback
trigger1 = anim = 5001
trigger2 = anim = 5011
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3

[State 5020, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5012
trigger2 = anim = 5002
trigger3 = anim = 5030
trigger4 = anim = [5051,5059]
persistent = 0
time = 15
waveform = sinesquare
ampl = 140
;---------------------------------------------------------------------------
; HITA_UP (initial going up)
[Statedef 5030]
type    = A
movetype= H
physics = N
ctrl = 0

[State 5030, 1]
type = changestate
trigger1 = prevstateno = 2100 || prevstateno = 2102
value = prevstateno
ignorehitpause = 1

[State 5030, 1]
type = VelAdd;Gravity
trigger1 = 1
y = GetHitVar(yaccel)

[State 5030, 2]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 5030, 3]
type = ChangeState
triggerall = !HitFall
trigger1 = HitOver
trigger2 = Vel Y > 0    ;Hit ground
trigger2 = Pos Y >= 10  ;.
value = 5040 ;HITA_RECOV

[State 5030, 3]
type = Changeanim
trigger1 = !HitFall
trigger1 = (anim = 5050 || anim = 5051) && animelem = 2,>= 0 && animelem = 3,< 0
value = anim
elem = 2

[State 5030, 4]
type = ChangeState
triggerall = HitFall
trigger1 = HitOver
trigger2 = Vel Y > 0    ;Hit ground
trigger2 = Pos Y >= 10  ;.
value = 5050 ;HITA_FALL

[State 5030, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 5035 ;HITA_UP (transition)
;---------------------------------------------------------------------------
; HITA_UP_T (transition)
[Statedef 5035]
type    = A
movetype= H
physics = N

[State 5035, 1]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = SelfAnimExist(5035)
trigger1 = Anim != [5051,5059] ;Not if in hit up anim
trigger1 = Anim != 5090 ;Not if hit off ground anim
value = 5035

[State 5035, 2]
type = VelAdd
trigger1 = time > 0
y = GetHitVar(yaccel)

[State 5035, 3]
type = ChangeState
triggerall = !HitFall
trigger1 = HitOver  ;Hit is over
trigger2 = AnimTime = 0 ;Animation over
trigger3 = Vel Y > 0    ;Hit ground
trigger3 = Pos Y >= 10  ;.
trigger4 = Time = 0     ;No transition anim
trigger4 = Anim != 5035 ;.
value = 5040 ;HITA_RECOV

[State 5035, 4]
type = ChangeState
triggerall = HitFall
trigger1 = HitOver  ;Hit is over
trigger2 = AnimTime = 0 ;Anim is over
trigger3 = Vel Y > 0    ;Hit ground
trigger3 = Pos Y >= 10  ;.
trigger4 = Time = 0     ;No transition anim
trigger4 = Anim != 5035 ;.
value = 5050 ;HITA_FALL
;-----------------------------------
; HIT_TRIP (shaking)
[Statedef 5070]
type    = A
movetype= H
physics = N
velset = 0,0

[State 9001, 1]
type = Explod
trigger1 = Time = 0
trigger1 = var(34) = 1
trigger1 = var(57) = 1
trigger1 = var(16) < 1
anim = 9004
pos = -84,190
postype = right
ignorehitpause = 1
bindtime = -1
ontop = 1
ownpal = 1

[State 9001, 1]
type = Explod
trigger1 = Time = 0
trigger1 = var(34) = 1
trigger1 = var(57) = 2
trigger1 = var(16) < 1
anim = 9004
pos = 8,190
postype = left
ignorehitpause = 1
bindtime = -1
ontop = 1
ownpal = 1

[State 9001, 3]
type = Envcolor
trigger1 = Time = 0
trigger1 = var(34) = 1
trigger1 = var(16) < 1
value = 255,255,255
time = 1
under = 1

[State 9001, 1]
type = varset
trigger1 = Time = 0
var(34) = 0

[State 5000, 6]
type = varset
trigger1 = time = 0
var(5) = 0

[State 5000, 6]
type = varset
trigger1 = time = 0
trigger1 = var(16) > 0
trigger1 = life > 0
var(26) = life

[State 5000, 6]
type = varset
triggerall = time = 0
triggerall = var(16) > 0
triggerall = life <= 0
trigger1 = prevstateno = 150 || prevstateno = 151 || prevstateno = 152
trigger2 = prevstateno = 153 || prevstateno = 130
trigger3 = prevstateno = 131 || prevstateno = 120
trigger4 = prevstateno = 140 && var(18) = 1
trigger5 = prevstateno = 20 && var(18) = 1
var(5) = 1

[State 5000, 6]
type = lifeset
triggerall = time = 0
trigger1 = var(5) = 1
value = 2

[State 5000, 6]
type = ChangeState
triggerall = time = 0
triggerall = command = "holdback"
triggerall = command != "holddown"
trigger1 = var(5) = 1
value = 150          

[State 5000, 6]
type = ChangeState
triggerall = time = 0
triggerall = command = "holdback"
triggerall = command = "holddown"
trigger1 = var(5) = 1
value = 152          

[State 5000, Damage]
type = lifeadd
triggerall = var(16) < 1
triggerall = time = 0 && life-gethitvar(damage) <= 0
trigger1 = prevstateno = 150 || prevstateno = 151 || prevstateno = 152
trigger2 = prevstateno = 153
;trigger3 = prevstateno = 131 || prevstateno = 120 || prevstateno = 130
;trigger4 = prevstateno = 140 && var(18) = 1
;trigger5 = prevstateno = 20 && var(18) = 1
value = -GetHitVar(damage)
ignorehitpause = 1
[State 150, 1]
type = varset
triggerall = time = 0
triggerall = life <= 0
trigger1 = prevstateno = 150 || prevstateno = 151 || prevstateno = 152
trigger2 = prevstateno = 153
;trigger3 = prevstateno = 131 || prevstateno = 120 || prevstateno = 130
;trigger4 = prevstateno = 140 && var(18) = 1
;trigger5 = prevstateno = 20 && var(18) = 1
var(4) = gethitvar(hitshaketime)
ignorehitpause = 1
[State 150, 1]
type = varset
triggerall = time = 0
triggerall = life <= 0
trigger1 = prevstateno = 150 || prevstateno = 151 || prevstateno = 152
trigger2 = prevstateno = 153
;trigger3 = prevstateno = 131 || prevstateno = 120 || prevstateno = 130
;trigger4 = prevstateno = 140 && var(18) = 1
;trigger5 = prevstateno = 20 && var(18) = 1
var(5) = gethitvar(hittime)
ignorehitpause = 1
[State 150, 1]
type = varset
triggerall = time = 0
triggerall = life <= 0
trigger1 = prevstateno = 150 || prevstateno = 151 || prevstateno = 152
trigger2 = prevstateno = 153
;trigger3 = prevstateno = 131 || prevstateno = 120 || prevstateno = 130
;trigger4 = prevstateno = 140 && var(18) = 1
;trigger5 = prevstateno = 20 && var(18) = 1
fvar(12) = gethitvar(xvel)
ignorehitpause = 1
[State 5000, 7]
type = ChangeState
triggerall = time = 0
triggerall = life <= 0
trigger1 = prevstateno = 150 || prevstateno = 151; || prevstateno = 130
;trigger2 = prevstateno = 120 && command != "holddown"
;trigger3 = prevstateno = 140 && command != "holddown" && var(18) = 1
;trigger4 = prevstateno = 20 && var(18) = 1
value = 2100
ignorehitpause = 1
[State 5000, 7]
type = ChangeState
triggerall = time = 0
triggerall = life <= 0
trigger1 = prevstateno = 152 || prevstateno = 153; || prevstateno = 131
;trigger2 = prevstateno = 120 && command = "holddown"
;trigger3 = prevstateno = 140 && command = "holddown" && var(18) = 1
value = 2102
ignorehitpause = 1

[State 5070, 1]
type = ChangeAnim 
trigger1 = 1
value = 5070

[State 5070, 2]
type = ChangeState
trigger1 = time = 0
trigger1 = var(16) > 0
value = 5071

[State 5070, 2]
type = ChangeState
trigger1 = HitShakeOver
value = 5071

[State 5070, 3]
type = ForceFeedback
trigger1 = time = 0
time = 12
waveform = sinesquare
ampl = 140
;---------------------------------------
; HIT_TRIP2 (fall through air)
[Statedef 5071]
type    = A
movetype= H
physics = N

[State 5071, 1]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 5071, 2] 
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5050, 4] 
type = ChangeState
triggerall = Vel Y > 0
triggerall = Pos Y >= -20
triggerall = alive
trigger1 = Command = "recovery"
value = 5200 

[State 5071, 3] 
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 15
type = ChangeState
value = 5110
;--------------------------------------
; WIN
[Statedef 180]
type = S
ctrl = 0

[State 180, 1]
type = ChangeState
trigger1 = var(52) = 1 && matchover
value = 186
[State 180, 1]
type = ChangeState
trigger1 = var(52) = 1 && !matchover
value = 179

[State 180, 1]
type = VarRandom
trigger1 = Time = 0
v = 18
range = 0,99

[State 180, 3]
type = ChangeState
trigger1 = command = "hold_x" && var(55) = 0
value = 181

[State 180, 4]
type = ChangeState
trigger1 = command = "hold_a" && var(55) = 0
value = 182

[State 180, 5]
type = ChangeState
trigger1 = command = "hold_y" && var(55) = 0
value = 183

[State 180, 6]
type = ChangeState
trigger1 = command = "hold_b" && var(55) = 0
value = 184

[State 180, 6]
type = ChangeState
trigger1 = command = "hold_z" && var(55) = 0
value = 185

[State 180, 7]
type = ChangeState
trigger1 = Var(18) = [0,19]
value = 181

[State 180, 8]
type = ChangeState
trigger1 = Var(18) = [20,38]
value = 182

[State 180, 9]
type = ChangeState
trigger1 = Var(18) = [39,57]
value = 183

[State 180, 10]
type = ChangeState
trigger1 = Var(18) = [58,77]
value = 184

[State 180, 10]
type = ChangeState
trigger1 = Var(18) = [78,99]
value = 185
;------------------------------------
; WIN1
[Statedef 181]
type = S
ctrl = 0
anim = 181
velset = 0,0

[State 181, 2]
type = PlaySnd
trigger1 = animelem = 3
value = s12,3

[State 183, 1]
type = AssertSpecial
trigger1 = Time = [0,160]
flag = RoundNotOver
;---------------------------------------------------------------------------
; WIN2
[Statedef 182]
type = S
ctrl = 0
anim = 182
velset = 0,0

[State 183, 1]
type = AssertSpecial
trigger1 = Time = [0,300]
flag = RoundNotOver

[State 181, 2]
type = PlaySnd
trigger1 = Time = 0
value = s12,0
channel = 1

[State 181, 2]
type = PlaySnd
trigger1 = AnimElem = 11
value = s12,1
channel = 1

[State 181, 2]
type = PlaySnd
trigger1 = AnimElem = 21
value = s12,2
persistent = 0

[State 181, 2]
type = PlaySnd
trigger1 = Time = 0
value = s5,7
channel = 1

[State 181, 2]
type = PlaySnd
trigger1 = AnimElem = 11
value = s5,8
channel = 1

[State 181, 2]
type = PlaySnd
trigger1 = AnimElem = 22
value = s5,9
channel = 1
persistent = 0
;-------------------------------------
; WIN3
[Statedef 183]
type = S
ctrl = 0
anim = 183
velset = 0,0

[State 183, 1]
type = AssertSpecial
trigger1 = Time = [0,200]
flag = RoundNotOver

[State 182, 2]
type = PlaySnd
trigger1 = Time = 1
value = s12,4

[State 183, 1]
type = NotHitBy
trigger1 = 1
value = SCA
;-----------------------------------
; WIN4
[Statedef 184]
type = S
ctrl = 0
anim = 184
velset = 0,0

[State 183, 1]
type = AssertSpecial
trigger1 = Time = [0,200]
flag = RoundNotOver

[State 182, 2]
type = PlaySnd
trigger1 = Time = 1
value = s12,4

[State 183, 1]
type = NotHitBy
trigger1 = 1
value = SCA

;------------------------------------
; WIN5
[Statedef 185]
type = S
ctrl = 0
anim = 185
velset = 0,0

[State 183, 1]
type = AssertSpecial
trigger1 = Time = [0,150]
flag = RoundNotOver

[State 1300, 5]
type = projectile
trigger1 = AnimElem = 1
projanim = 186
offset = -2,-1
projsprpriority = 2
projremovetime = 27
projedgebound = 210

[State 182, 2]
type = PlaySnd
trigger1 = Time = 1
value = s0,1

[State 183, 1]
type = NotHitBy
trigger1 = 1
value = SCA
;------------------------------------
; vs kyo WIN
[Statedef 186]
type = S
ctrl = 0
anim = 187
velset = 0,0

[State 181, 2]
type = PlaySnd
trigger1 = animelem = 5
value = s9,7

[State 183, 1]
type = AssertSpecial
trigger1 = Time = [0,190]
flag = RoundNotOver
;------------------------------------
; vs kyo WIN round 1
[Statedef 179]
type = S
ctrl = 0
anim = 188
velset = 0,0

[State 181, 2]
type = PlaySnd
trigger1 = animelem = 5
value = s27,6

[State 183, 1]
type = AssertSpecial
trigger1 = Time = [0,130]
flag = RoundNotOver
;--------------------------------------
; INTRO
[Statedef 191]
type = S
physics = S
ctrl = 0
anim = 190
velset = 0,0,0

[State 191, 1] 
type = ChangeState
trigger1 = Time = 0
trigger1 = enemy, Name = "Kyo kusanagi" && enemy,authorname = "zzzasd"
value = 198

[State 191, 1] 
type = ChangeState
trigger1 = Time = 0
trigger1 = enemy,Name = "neoKyo" && enemy,authorname = "sander71113"
value = 199

[State 191, 1] 
type = ChangeState
trigger1 = Time = 0
trigger1 = enemy, Name = "Kyo kusanagi" && enemy,authorname = "sander71113"
value = 199;189

[State 191, 1] 
type = ChangeState
trigger1 = Time = 0
trigger1 = enemy, Name = "Kyo kusanagi" && enemy,authorname = "k-17"
value = 188

[State 191, 1] 
type = ChangeState
triggerall = Time = 0
trigger1 = P2Name = "Kyo99"
trigger2 = P4Name = "Kyo99"
value = 192

[State 191, 1] 
type = ChangeState
triggerall = Time = 0
trigger1 = P2Name = "Kyo2k"
trigger2 = P4Name = "Kyo2k"
trigger3 = p2name = "Kyo2000"
trigger4 = p4name = "Kyo2000"
trigger5 = p2name = "kyo00"
trigger6 = p4name = "kyo00"
value = 194

[State 191, 1] 
type = ChangeState
triggerall = Time = 0
trigger1 = P2Name = "Kyo2k1"
trigger2 = P4Name = "Kyo2k1"
trigger3 = p2name = "Kyo2001"
trigger4 = p4name = "Kyo2001"
trigger5 = p2name = "kyo01"
trigger6 = p4name = "kyo01"
trigger7 = p2name = "neokyo"
trigger8 = p4name = "neokyo"
value = 196

[State 191, 1] 
type = ChangeState
triggerall = Time = 0
trigger1 = P2Name = "Kyo2k2"
trigger2 = P4Name = "Kyo2k2"
trigger3 = p2name = "Kyo2002" || p2name = "kyo_svc"
trigger4 = p4name = "Kyo2002" || p4name = "kyo_svc"
trigger5 = p2name = "kyo02" || p2name = "svckyo"
trigger6 = p4name = "kyo02" || p4name = "svckyo"
trigger7 = p2name = "kyo'94" || p2name = "kyo'95"
trigger8 = p4name = "kyo'94" || p4name = "kyo'95"
trigger9 = p2name = "kyo03" || p4name = "kyo03"
trigger10 = P2Name = "R_kyo" || P4Name = "R_kyo"
trigger11 = p2name = "kyo2003" || p4name = "kyo2003"
trigger12 = p2name = "kyo2k3" || p4name = "kyo2k3"
value = 187

[State 191, 1] 
type = ChangeState
triggerall = Time = 0
trigger1 = P2Name = "Kyo98"
trigger2 = P4Name = "Kyo98"
trigger3 = p2name = "Kyo mk-2"
trigger4 = p4name = "Kyo mk-2"
trigger5 = p2name = "Kyo Kusanagi"
trigger6 = p4name = "Kyo Kusanagi"
value = 197

[State 191, 2]
type = ChangeState
trigger1 = Time = 0
trigger1 = random < 500
value = 193

[State 191, 1] 
type = VarSet
trigger1 = Time = 0
var(9) = 1

[State 191, 2] 
type = VarSet
trigger1 = AnimTime = 0
trigger2 = Time = 100
var(9) = 0

[State 191, 3]
type = ChangeState
trigger1 = AnimTime = 0   
value = 0

; Intro 2
[Statedef 193]
type = S
anim = 191

[State 193, 1]
type = AssertSpecial
trigger1 = Time = [0,180]
flag = Intro

[State 192, 5]
type = PlaySnd
trigger1 = AnimElem = 2,9
value = s26,1
channel = 1
[State 192, 5]
type = PlaySnd
trigger1 = AnimElem = 3
value = s8,1
channel = 1

[State 193, 8]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

; Intro vs kyo_svc(?)
[Statedef 187]
type = S
anim = 191

[State 193, 1]
type = AssertSpecial
trigger1 = animtime < 0
flag = Intro

[State 192, 5]
type = changeanim
trigger1 = time <= 180
value = 191
elem = 1

[State 192, 5]
type = PlaySnd
trigger1 = time = 99
value = s25,8
channel = 1

[State 192, 5]
type = PlaySnd
trigger1 = time = 181
value = s25,9
channel = 1

[State 193, 8]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
;-----------------------------------
; Intro vs. Kyo99
[Statedef 192]
type = S
anim = 192

[State 192, begin]
type = VarSet
trigger1 = time = 0
var(9) = 1   

[State 192, begin]
type = AssertSpecial
trigger1 = time = [0, 326]
flag = intro

[State 192, 2]
type = SprPriority
trigger1 = Time = 0
value = 2

[State 192, 4]
type = explod
trigger1 = AnimElem = 7
id = 988
anim = 988
pos = 6,3
sprpriority = 3
removetime = 5

[State 192, 4]
type = explod
trigger1 = AnimElem = 8
id = 988
anim = 988
pos = 5,4
sprpriority = 3
removetime = 65

[State 192, 4]
type = removeexplod
trigger1 = AnimElem = 21
id = 988

[State 192, 4]
type = explod
trigger1 = AnimElem = 21
anim = 988
id = 988
pos = 5,2
sprpriority = 3
removetime = 70

[State 192, 4]
type = removeexplod
trigger1 = AnimElem = 22
id = 988

[State 192, 4]
type = explod
trigger1 = AnimElem = 22
anim = 988
id = 988
pos = 5,1
sprpriority = 3
removetime = 70

[State 192, 4]
type = removeexplod
trigger1 = AnimElem = 23
id = 988

[State 192, 4]
type = Explod
trigger1 = AnimElem = 23
anim = 199
pos = 5,9
sprpriority = 3

[State 192, 5]
type = PlaySnd
trigger1 = AnimElem = 9
value = s0,0
channel = 2

[State 192, 6]
type = PlaySnd
trigger1 = AnimElem = 23
value = s0,1

[State 192, 7]
type = VarSet
trigger1 = Time = 10
var(9) = 0

[State 192, 8]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
;------------------------------------
; Intro vs. Kyo2000
[Statedef 194]
type = S
anim = 194

[State 192, begin]
type = AssertSpecial
trigger1 = 1
flag = intro

[State 192, 2]
type = SprPriority
trigger1 = Time = 0
value = 2
            
[State 192, 5]
type = PlaySnd
trigger1 = AnimElem = 18
value = s8,8
channel = 2

[State 192, 5]
type = PlaySnd
trigger1 = AnimElem = 20
value = s8,9

[State 192, 8]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
;---------------------------------------
; Intro vs. Kyo2001
[Statedef 196]
type = S
anim = 196

[State 192, begin]
type = AssertSpecial
trigger1 = 1
flag = intro

[State 192, 2]
type = SprPriority
trigger1 = Time = 0
value = 2
            
[State 1000, 4]
type = Helper
trigger1 = animelem = 8
name = "n2"
pos = 0,-20  
stateno = 1003

[State 522, 1]
type = PlaySnd
trigger1 = animelem = 8
value = s7,2

[State 192, 3]
type = Posadd
trigger1 = time = 0
x = 44

[State 192, 3]
type = Posadd
trigger1 = time = 394
x = -2

[State 192, 3]
type = velset
trigger1 = animelem = 8
x = -5.1
y = -2

[State 192, 4]
type = veladd
trigger1 = time >= 397 && time <= 403
y = .5

[State 192, 4]
type = velset
trigger1 = animelem = 10
x = 0
y = 0

[State 192, 5]
type = posadd
trigger1 = animelem = 10
x = -6

[State 192, 5]
type = posset
trigger1 = animelem = 10
y = 0

[State 192, 6]
type = PlaySnd
trigger1 = AnimElem = 3
value = s2,4
channel = 2

[State 192, 6]
type = PlaySnd
trigger1 = AnimElem = 8
value = s2,5

[State 192, 8]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

[Statedef 1003];helper
type = S
anim = 12342

[State 7200, 7]
type = Explod
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 750
anim = 3100
ID = 3100
sprpriority = 4
pos = 20,-50
random = 60,80
ignorehitpause = 1
ownpal = 1

[State 7200, 8]
type = Explod
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 500
anim = 3110
ID = 3100
sprpriority = 4
pos = 20,-50
random = 60,80
ignorehitpause = 1
ownpal = 1

[State 7200, 8]
type = destroyself
trigger1 = parent,animelem = 10
;---------------------------------------
; Intro vs. Kyo98
[Statedef 197]
type = S
anim = 197

[State 192, begin]
type = AssertSpecial
trigger1 = 1
flag = intro

[State 192, 4]
type = explod
trigger1 = AnimElem = 6
id = 988
anim = 988
pos = -65,-27
sprpriority = 3
removetime = -1

[State 192, 4]
type = removeexplod
trigger1 = AnimElem = 7
id = 988

[State 192, 4]
type = explod
trigger1 = AnimElem = 7
anim = 988
id = 988
pos = -46,-24
sprpriority = 3
removetime = -1

[State 192, 4]
type = removeexplod
trigger1 = AnimElem = 8
id = 988

[State 192, 4]
type = explod
trigger1 = AnimElem = 8
anim = 988
id = 988
pos = -35,-20
sprpriority = 3
removetime = -1

[State 192, 4]
type = removeexplod
trigger1 = AnimElem = 9
id = 988

[State 192, 4]
type = Explod
trigger1 = AnimElem = 9
anim = 988
id = 988
pos = -35,-21
sprpriority = 3

[State 192, 4]
type = removeexplod
trigger1 = AnimElem = 10
id = 988

[State 1300, 5]
type = projectile
trigger1 = animelem = 10
projanim = 313
offset = 0,0
projsprpriority = 4
projremovetime = 17
projedgebound = 210

[State 192, 2]
type = SprPriority
trigger1 = Time = 0
value = 2

[State 192, 5]
type = PlaySnd
trigger1 = AnimElem = 4,10
value = s2,8
channel = 2

[State 192, 5]
type = PlaySnd
trigger1 = time = 297
value = s2,9
channel = 2

[State 192, 6]
type = PlaySnd
trigger1 = AnimElem = 10
value = s0,1

[State 192, 8]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

; Intro vs. Kyox by sander
[Statedef 189]
type = S
anim = 197

[State 192, begin]
type = AssertSpecial
trigger1 = 1
flag = intro

[State 192, begin]
type = changeanim
trigger1 = time = 345
value = 197
elem = 9

[State 192, 4]
type = explod
trigger1 = AnimElem = 6
id = 988
anim = 988
pos = -65,-27
sprpriority = 3
removetime = -1

[State 192, 4]
type = removeexplod
trigger1 = AnimElem = 7
id = 988

[State 192, 4]
type = explod
trigger1 = AnimElem = 7
anim = 988
id = 988
pos = -46,-24
sprpriority = 3
removetime = -1

[State 192, 4]
type = removeexplod
trigger1 = AnimElem = 8
id = 988

[State 192, 4]
type = explod
trigger1 = AnimElem = 8
anim = 988
id = 988
pos = -35,-20
sprpriority = 3
removetime = -1

[State 192, 4]
type = removeexplod
trigger1 = AnimElem = 9
id = 988

[State 192, 4]
type = Explod
trigger1 = AnimElem = 9
anim = 988
id = 988
pos = -35,-21
sprpriority = 3

[State 192, 4]
type = removeexplod
trigger1 = AnimElem = 10
id = 988

[State 1300, 5]
type = projectile
trigger1 = animelem = 10
projanim = 313
offset = 0,0
projsprpriority = 4
projremovetime = 17
projedgebound = 210

[State 192, 2]
type = SprPriority
trigger1 = Time = 0
value = 2

[State 192, 5]
type = PlaySnd
trigger1 = AnimElem = 4,10
value = s2,8
channel = 2

[State 192, 5]
type = PlaySnd
trigger1 = time = 297
value = s2,9
channel = 2

[State 192, 6]
type = PlaySnd
trigger1 = AnimElem = 10
value = s0,1

[State 192, 8]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

; Intro vs. Kyo by k-17
[Statedef 188]
type = S
anim = 196

[State 192, begin]
type = AssertSpecial
trigger1 = 1
flag = intro

[State 192, begin]
type = changeanim
trigger1 = time = 142
value = 196
elem = 2

[State 192, 2]
type = SprPriority
trigger1 = Time = 0
value = 2
            
[State 1000, 4]
type = Helper
trigger1 = animelem = 8
name = "n2"
pos = 0,-20  
stateno = 1003

[State 522, 1]
type = PlaySnd
trigger1 = animelem = 8
value = s7,2

[State 192, 3]
type = Posadd
trigger1 = time = 0
x = 53

[State 192, 3]
type = Posadd
trigger1 = time = 379
x = -2

[State 192, 3]
type = velset
trigger1 = animelem = 8
x = -6.3
y = -2

[State 192, 4]
type = veladd
trigger1 = time >= 382 && time <= 388
y = .5

[State 192, 4]
type = velset
trigger1 = animelem = 10
x = 0
y = 0

[State 192, 5]
type = posadd
trigger1 = animelem = 10
x = -6

[State 192, 5]
type = posset
trigger1 = animelem = 10
y = 0

[State 192, 6]
type = PlaySnd
trigger1 = AnimElem = 3
value = s2,4
channel = 2

[State 192, 6]
type = PlaySnd
trigger1 = AnimElem = 8
value = s2,5

[State 192, 8]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
;--------------------------------------
; Intro vs. Kyo2001 by zzzasd
[Statedef 198]
type = S
anim = 196

[State 192, begin]
type = AssertSpecial
trigger1 = 1
flag = intro

[State 192, begin]
type = changeanim
trigger1 = time < 10
value = 196

[State 192, 2]
type = SprPriority
trigger1 = Time = 0
value = 2
            
[State 1000, 4]
type = Helper
trigger1 = animelem = 8
name = "n2"
pos = 0,-20  
stateno = 1003

[State 522, 1]
type = PlaySnd
trigger1 = animelem = 8
value = s7,2

[State 192, 3]
type = Posadd
trigger1 = time = 0
x = 44

[State 192, 3]
type = Posadd
trigger1 = time = 404
x = -2

[State 192, 3]
type = velset
trigger1 = animelem = 8
x = -5.1
y = -2

[State 192, 4]
type = veladd
trigger1 = time >= 407 && time <= 413
y = .5

[State 192, 4]
type = velset
trigger1 = animelem = 10
x = 0
y = 0

[State 192, 5]
type = posadd
trigger1 = animelem = 10
x = -6

[State 192, 5]
type = posset
trigger1 = animelem = 10
y = 0

[State 192, 6]
type = PlaySnd
trigger1 = AnimElem = 3
value = s2,4
channel = 2

[State 192, 6]
type = PlaySnd
trigger1 = AnimElem = 8
value = s2,5

[State 192, 8]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

; Intro vs. Kyo2001 by sander
[Statedef 199]
type = S
anim = 196

[State 192, begin]
type = AssertSpecial
trigger1 = 1
flag = intro

[State 192, begin]
type = changeanim
trigger1 = time < 30
value = 196

[State 192, 2]
type = SprPriority
trigger1 = Time = 0
value = 2
            
[State 1000, 4]
type = Helper
trigger1 = animelem = 8
name = "n2"
pos = 0,-20  
stateno = 1003

[State 522, 1]
type = PlaySnd
trigger1 = animelem = 8
value = s7,2

[State 192, 3]
type = Posadd
trigger1 = time = 0
x = 49

[State 192, 3]
type = Posadd
trigger1 = time = 424
x = -2

[State 192, 3]
type = velset
trigger1 = animelem = 8
x = -5.8
y = -2

[State 192, 4]
type = veladd
trigger1 = time >= 427 && time <= 433
y = .5

[State 192, 4]
type = velset
trigger1 = animelem = 10
x = 0
y = 0

[State 192, 5]
type = posadd
trigger1 = animelem = 10
x = -6

[State 192, 5]
type = posset
trigger1 = animelem = 10
y = 0

[State 192, 6]
type = PlaySnd
trigger1 = AnimElem = 3
value = s2,4
channel = 2

[State 192, 6]
type = PlaySnd
trigger1 = AnimElem = 8
value = s2,5

[State 192, 8]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
;----------------------------------
; HIT_AIRFALLRECOVER
[Statedef 5210]
type    = A
movetype= I
physics = N
anim = 5210
ctrl = 0

[State 5210, 1]
type = varset
trigger1 = time = 0
var(48) = 0

[State 5210, 1]
type = varset
trigger1 = time = 0
trigger1 = var(47) = 2
var(48) = 1

[State 5210, 1]
type = varset
trigger1 = time = 0
trigger1 = var(47) = 2
var(47) = 1

[State 5210, 1]
type = varset
trigger1 = time = 0
trigger1 = var(47) = 1
trigger1 = var(48) = 0
var(47) = 2

[State 5210, 1]
type = varset
trigger1 = time = 0
trigger1 = var(47) = 0
var(47) = 1

[State 5210, 1] 
type = PalFX
trigger1 = Time = 0
time = 3
add = 128,128,128

[State 5210, 1]
type = PosFreeze
trigger1 = Time = 0
value = 4

[State 5210, 2] 
type = Turn
trigger1 = Time = 0
trigger1 = vel X > 0

[State 5210, 1] 
type = VelMul
trigger1 = Time = 0
x = .8
y = .8

[State 5210, 1]
type = VelAdd
trigger1 = Time = 0
y = -4.5

[State 5210, 1] 
type = VelMul
trigger1 = Time = 0
trigger1 = Vel Y > 0
y = .5

[State 5210, 1]
type = VelAdd
trigger1 = Time = 0
trigger1 = Vel Y > -3
y = -2

[State 5210, 1]
type = VelAdd
trigger1 = Time = 0
trigger1 = Vel Y > -2
y = -1

[State 5210, 2] 
type = VelAdd
triggerall = var(55) = 0
trigger1 = Time = 0
trigger1 = Command = "holdup"
y = -2

[State 5210, 2] 
type = VelAdd
triggerall = var(55) = 0
trigger1 = Time = 0
trigger1 = Command = "holddown"
y = 1.5

[State 5210, 2] 
type = VelMul
triggerall = var(55) = 0
trigger1 = Time = 0
trigger1 = Command = "holdfwd"
x = 1

[State 5210, 2] 
type = VelAdd
triggerall = var(55) = 0
trigger1 = Time = 0
trigger1 = Command = "holdback"
x = -1

[State 5210, 3]
type = NotHitBy
trigger1 = Time = 0
trigger1 = var(47) != 2
value = SCA
time = 20

[State 5210, 3]
type = NotHitBy
trigger1 = time >= 0
trigger1 = var(47) = 2
value = SCA
time = 1

[State 5210, 4]
type = CtrlSet
trigger1 = Time = 20
value = 1

[State 5210, 5]
type = VelAdd
trigger1 = Time >= 0
y = .35

[State 0, 1]
type = varset
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
var(47) = 0

[State 5210, 5] 
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 52      
ctrl = 1

; Taunt
[Statedef 195]
type = S
movetype = I  
physics = S
anim = 195
velset = 0,0
ctrl = 0

[State 236, 1]
type = Varset
trigger1 = time = 0 || animtime = -9
var(18) = 0

[State 236, 1]
type = Varset
trigger1 = time = 0 && var(14) < 1 && var(16) < 1 && var(53) = 0 && var(59) > -2
trigger1 = var(56) < 3 && power >= 1000 + var(20)*100
var(18) = 1

[State 195, 1]
type = ctrlset
trigger1 = var(18) != 1 && time = 33
value = 1

[State 195, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = s8,0
channel = 7

[State 195, 1]
type = varadd
trigger1 = time = 0
trigger1 = var(18) = 1 && p2life > 0
trigger1 = power >= 1000 + var(20)*100
var(56) = 1

[state 182, 1]
type = varadd
trigger1 = var(18) = 1
trigger1 = time = 0
var(20) = 10
[state 8302, 0]
type = varadd
trigger1 = time = 0 && var(18) = 1 && var(3) > 0
var(2) = -1000

[State 195, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;-----------------------------------
; HIT_FALLRECOVER (on the ground)
[Statedef 5201]
type    = S
movetype= I
physics = S
anim = 5200
ctrl = 0

[State 5210, 2] 
type = Turn
trigger1 = Time = 0
trigger1 = vel X > 0

[State 5210, 1] 
type = PalFX
trigger1 = Time = 0
time = 1
add = 0,0,0 

[State 260, 7]
type = PlaySnd
trigger1 = time = 0
value = s8,2 

[State 5201, 2]
type = VelSet
trigger1 = Time = 0
y = 0

[State 5201, 2]
type = VelSet
trigger1 = Time >= 0
trigger1 = Time < 7
x = -5.5

[State 5201, 3]
type = PosSet
trigger1 = Time = 0
y = 0

[State 5201, 4]
type = NotHitBy
trigger1 = 1
value = SCA

[State 5201, 6]
type = Changestate
trigger1 = animtime = 0
value = 0
ctrl = 1
;------------------------------------
; STAND_A
[Statedef 200]
number = 6
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 245

[State 1405, 0]
type = varrandom
trigger1 = time = 0
v = 4
range = 2

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && (time < 6 || time >= 10)
value = ,AA,AP

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time >= 6 && time < 10
value = SCA

[State 230, 0]
type = varset
trigger1 = animelem = 4,1
var(38) = 0

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 3
value = s27,0

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 2
trigger1 = Random < 900
value = s14,0
channel = 1

[State 200, 3]
type = HitDef
trigger1 = animelem = 4              
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = S, NA
damage    = 38            
guardflag = MA             
sparkno = s10004
guard.sparkno = s10007
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-31
pausetime = 7,9
sparkno = -1
guard.sparkno = -1               
hitsound = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),5
guardsound = s27,3
ground.type = Low
getpower = 56,56
givepower = 21,21
ground.slidetime = 11
ground.hittime  = 11
guard.slidetime = 11-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,5,0)
guard.hittime  = 11-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,5,0)
guard.velocity = -6.6
ground.velocity = -6.6
air.velocity = -3,-4           
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0

[State 200, 3]
type = HitDef
triggerall = animelem = 4              
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = S, SA
animtype = medium
damage    = 38
guardflag = MA             
sparkno = s10005
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-31
pausetime = 10,10
sparkno = -1
guard.sparkno = -1               
hitsound = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),5
getpower = 56,56
givepower = 21,21
guardsound = s27,3
ground.type = Low
ground.slidetime = 20           
ground.hittime  = 20      
guard.slidetime = 20-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,9,0)
guard.hittime  = 20-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,9,0)
guard.velocity = -6.6
ground.velocity = -6.6
air.velocity = -3,-4           
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0

[State 200, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;------------------------------------
;STAND_A(close)
[Statedef 212]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 212

[State 1405, 0]
type = varrandom
trigger1 = time = 0
v = 4
range = 2

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && (time < 5 || time >= 8)
value = ,AA,AP

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time >= 5 && time < 8
value = SCA

[State 230, 0]
type = varset
trigger1 = animelem = 3,1
var(38) = 0

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 1
value = s27,0

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 1
trigger1 = Random < 900
value = s14,0
channel = 1

[State 210, 5]
type = HitDef
trigger1 = AnimElem = 3
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = C, NA
damage   = 38
animtype = light
guardflag = LA
pausetime = 7,9
sparkno = s10004
guard.sparkno = s10007
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-7
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),5
guardsound = s27,3
getpower = 56,56
givepower = 21,21
ground.type = low 
ground.slidetime = 8
ground.hittime  = 8
guard.slidetime = 8-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,3,0)
guard.hittime  = 8-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,3,0)
ground.velocity = -4.8
guard.velocity = -4.8
air.type = Low
air.velocity = -3,-4
airguard.velocity = -3.5
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0

[State 210, 5]
type = HitDef
triggerall = AnimElem = 3
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = C, SA
damage   = 38
animtype = Med
guardflag = LA
pausetime = 10,10
sparkno = s10005
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-7
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),5
guardsound = s27,3
ground.type = low 
getpower = 56,56
givepower = 21,21
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 17-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,8,0)
guard.hittime  = 17-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,8,0)
ground.velocity = -4.8
guard.velocity = -4.8
air.type = Low
air.velocity = -3,-4
airguard.velocity = -3.5
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0

[State 210, 5]
type = ChangeState
triggerall = var(58) > 1 || var(58) < 1
trigger1 = var(55) = 1
trigger1 = movecontact > 0
value = 235

[State 210, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;----------------------------------------
[Statedef 1012]
type    = S
physics = N
movetype= H
ctrl = 0

[State 1020, 2]
type = selfstate
triggerall = time = 0
triggerall = life > 0
trigger1 = prevstateno = 150 || prevstateno = 151 || prevstateno = 130
value = 150

[State 1020, 2]
type = selfstate
triggerall = time = 0
triggerall = life > 0
trigger1 = prevstateno = 154 || prevstateno = 155 || prevstateno = 132
value = 154

[State 1020, 1]
type = Nothitby
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 1020, 2]
type = Changestate
trigger1 = 1
value = 1014
ignorehitpause = 1
;-----------------------------------------------
; Hit by FP
[Statedef 1015]
type    = S
physics = N
movetype= H
ctrl = 0

[State 1020, 2]
type = selfstate
triggerall = time = 0
triggerall = life > 0
trigger1 = prevstateno = 150 || prevstateno = 151 || prevstateno = 130
value = 150

[State 1020, 2]
type = selfstate
triggerall = time = 0
triggerall = life > 0
trigger1 = prevstateno = 154 || prevstateno = 155 || prevstateno = 132
value = 154

[State 1020, 1]
type = Nothitby
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 1020, 2]
type = Changestate
trigger1 = 1
value = 1016
ignorehitpause = 1
;--------------------------------------------
[Statedef 1014]
type    = S
physics = N
movetype= H
ctrl = 0
velset = 0,0

[State 1030, 1]
type = changeanim
trigger1 = time < 2
value = 5022

[State 1030, 1]
type = changeanim2
trigger1 = time = 2
value = 1016
elem = 3

[State 1030, 1]
type = changeanim
trigger1 = time = 6
value = 5110
[State 1030, 1]
type = changeanim
trigger1 = time = 10
value = 5100

[State 1030, 1]
type = posadd
trigger1 = time = 2
x = -20

[State 1203, 5]
type = Envshake
trigger1 = time = 2
time = 15
freq = 255
ampl = -4
persistent = 0
ignorehitpause = 1

[State 1030, 2]
type = Posfreeze
trigger1 = time <= 3

[State 1030, 1]
type = playerpush
trigger1 = 1
value = 1

[State 1030, 2]
type = Posset
trigger1 = time = 0
y = 0

[State 1030, 4]
type = Nothitby
trigger1 = 1
value = SCA

[State 1030, 5]
type = Statetypeset
trigger1 = time = 2
value = L

[State 1030, 5]
type = Statetypeset
trigger1 = time = 3
value = A

[State 1030, 6]
type = Changestate
trigger1 = time = 14
value = 1017
;------------------------------------------
; Hit by FP,ground fall
[Statedef 1016]
type    = S
physics = N
movetype= H
ctrl = 0
velset = 0,0

[State 1030, 1]
type = changeanim2
trigger1 = time = 0
value = 1016

[State 1030, 1]
type = changeanim
trigger1 = time = 11
value = 5110
[State 1030, 1]
type = changeanim
trigger1 = time = 15
value = 5100

[State 1030, 1]
type = posadd
trigger1 = time = 7
x = -20

[State 1203, 5]
type = Envshake
trigger1 = time = 7
time = 15
freq = 255
ampl = -4
persistent = 0
ignorehitpause = 1

[State 1030, 1]
type = playerpush
trigger1 = 1
value = 1

[State 1030, 2]
type = Posfreeze
trigger1 = time <= 3

[State 1030, 2]
type = Posset
trigger1 = time = 0
y = 0

[State 1030, 4]
type = Nothitby
trigger1 = 1
value = SCA

[State 1030, 5]
type = Statetypeset
trigger1 = time = 7
value = L

[State 1030, 5]
type = Statetypeset
trigger1 = time = 8
value = A

[State 1030, 6]
type = Changestate
trigger1 = time = 19
value = 1017
;--------------------------------------
; Hit by FP,ground bounce
[Statedef 1017]
type    = L
physics = N
movetype= H
ctrl = 0
velset = 0,-2.5

[State 1203, 5]
type = nothitby
trigger1 = 1
value = SCA

[State 1030, 1]
type = playerpush
trigger1 = 1
value = 1

[State 1031, 1]
type = changeanim2
trigger1 = time = 0
value = 1017

[State 1031, 2]
type = Posadd
trigger1 = time = 0
x = -10
[State 1031, 2]
type = Posset
trigger1 = time = 0
y = -15

[State 1031, 2]
type = veladd
trigger1 = 1
y = .5

[State 1031, 2]
type = Posadd
trigger1 = pos y >= -15
trigger1 = vel y > 0
x = 5

[State 1031, 4]
type = Changestate
trigger1 = pos y >= -15
trigger1 = vel y > 0
value = 1018
;---------------------------------------
; Hit by FP,ground liedown
[Statedef 1018]
type    = L
physics = N
movetype= H
ctrl = 0
velset = 0,0

[State 1032, 1]
type = Changeanim
trigger1 = time = 0
value = 5110

[State 1032, 2]
type = posset
trigger1 = time = 0
y = 0

[State 1032, 3]
type = GameMakeAnim
trigger1 = Time = 0
value = 61
pos = 0, 0
under = 1

[State 1032, 4]
type = PlaySnd
trigger1 = Time = 0
value = F7, 0 

[State 1032, 6] 
type = SelfState
triggerall = !alive
trigger1 = Time = 0
value = 5110

[State 1032, 6] 
type = SelfState
triggerall = alive
trigger1 = Time = 25
value = 5120
;--------------------------------------------
[Statedef 1011]
type    = S
physics = N
movetype= H
ctrl = 0

[State 1020, 2]
type = selfstate
triggerall = time = 0
triggerall = life > 0
trigger1 = prevstateno = 150 || prevstateno = 151 || prevstateno = 130
value = 150

[State 1020, 2]
type = selfstate
triggerall = time = 0
triggerall = life > 0
trigger1 = prevstateno = 154 || prevstateno = 155 || prevstateno = 132
value = 154

[State 1020, 1]
type = Nothitby
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 1020, 2]
type = Changestate
trigger1 = SelfAnimExist(5111)
value = 1013
ignorehitpause = 1

[State 1020, 3]
type = Changestate
trigger1 = !SelfAnimExist(5111)
value = 1021
ignorehitpause = 1
;------------------------------------------------
; Hit by FP
[Statedef 1019]
type    = S
physics = N
movetype= H
ctrl = 0

[State 1020, 2]
type = selfstate
triggerall = time = 0
triggerall = life > 0
trigger1 = prevstateno = 150 || prevstateno = 151 || prevstateno = 130
value = 150

[State 1020, 2]
type = selfstate
triggerall = time = 0
triggerall = life > 0
trigger1 = prevstateno = 154 || prevstateno = 155 || prevstateno = 132
value = 154

[State 1020, 1]
type = Nothitby
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 1020, 2]
type = Changestate
trigger1 = SelfAnimExist(5111)
value = 1027
ignorehitpause = 1

[State 1020, 3]
type = Changestate
trigger1 = !SelfAnimExist(5111)
value = 1021
ignorehitpause = 1
;---------------------------------------
[Statedef 1013]
type    = S
physics = N
movetype= H
ctrl = 0
velset = 0,0

[State 1203, 5]
type = Envshake
trigger1 = time = 3
time = 15
freq = 255
ampl = -4
persistent = 0
ignorehitpause = 1

[State 1030, 1]
type = playerpush
trigger1 = 1
value = 1

[State 1030, 1]
type = changeanim
trigger1 = time <= 3
value = 5012

[State 1030, 2]
type = Posfreeze
trigger1 = time <= 3

[State 1030, 2]
type = changeanim
trigger1 = time = 3 && selfanimexist(5102)
value = 5102

[State 1030, 2]
type = posadd
trigger1 = time = 3 && selfanimexist(5102)
x = 10

[State 1030, 2]
type = posadd
trigger1 = time = 3 && !selfanimexist(5102)
x = -15
[State 1030, 2]
type = posadd
trigger1 = time = 7 && selfanimexist(5102)
x = -25

[State 1030, 2]
type = changeanim2
trigger1 = time = 3 && !selfanimexist(5102)
trigger2 = time = 7 && selfanimexist(5102)
value = 1026

[State 1030, 2]
type = changeanim
trigger1 = time = 7 && !selfanimexist(5102)
trigger2 = time = 11 && selfanimexist(5102)
value = 5111

[State 1030, 2]
type = Posset
trigger1 = time = 0
y = 0

[State 1030, 4]
type = Nothitby
trigger1 = 1
value = SCA

[State 1030, 5]
type = Statetypeset
trigger1 = time = 3
value = L

[State 1030, 5]
type = Statetypeset
trigger1 = time = 4
value = A

[State 1030, 6]
type = Changestate
trigger1 = time = 13 && !selfanimexist(5102)
trigger2 = time = 17 && selfanimexist(5102)
value = 1028
;----------------------------------------
; Hit by FP,ground fall
[Statedef 1027]
type    = S
physics = N
movetype= H
ctrl = 0
velset = 0,0

[State 1203, 5]
type = Envshake
trigger1 = time = 3
time = 15
freq = 255
ampl = -4
persistent = 0
ignorehitpause = 1

[State 1030, 1]
type = playerpush
trigger1 = 1
value = 1

[State 1030, 1]
type = changeanim
trigger1 = time < 3
value = 5020

[State 1030, 2]
type = Posfreeze
trigger1 = time <= 3

[State 1030, 2]
type = changeanim
trigger1 = time = 3 && selfanimexist(5102)
value = 5102

[State 1030, 2]
type = posadd
trigger1 = time = 3 && selfanimexist(5102)
x = 10

[State 1030, 2]
type = posadd
trigger1 = time = 3 && !selfanimexist(5102)
x = -15
[State 1030, 2]
type = posadd
trigger1 = time = 7 && selfanimexist(5102)
x = -25

[State 1030, 2]
type = changeanim2
trigger1 = time = 3 && !selfanimexist(5102)
trigger2 = time = 7 && selfanimexist(5102)
value = 1026

[State 1030, 2]
type = changeanim
trigger1 = time = 7 && !selfanimexist(5102)
trigger2 = time = 11 && selfanimexist(5102)
value = 5111

[State 1030, 2]
type = Posset
trigger1 = time = 0
y = 0

[State 1030, 4]
type = Nothitby
trigger1 = 1
value = SCA

[State 1030, 5]
type = Statetypeset
trigger1 = time = 3
value = L

[State 1030, 5]
type = Statetypeset
trigger1 = time = 4
value = A

[State 1030, 6]
type = Changestate
trigger1 = time = 13 && !selfanimexist(5102)
trigger2 = time = 17 && selfanimexist(5102)
value = 1028
;---------------------------------------
; Hit by FP,ground bounce
[Statedef 1028]
type    = L
physics = N
movetype= H
ctrl = 0
velset = 0,-2.5

[State 1203, 5]
type = velset
trigger1 = time = 0 && prevstateno = 1023
x = -3
y = -3.5
[State 1203, 5]
type = velmul
trigger1 = prevstateno = 1023
x = 0.98

[State 1203, 5]
type = nothitby
trigger1 = 1
value = SCA

[State 1030, 1]
type = playerpush
trigger1 = 1
value = 1

[State 1031, 1]
type = changeanim2
trigger1 = time = 0
value = 1029

[State 1031, 2]
type = Posset
trigger1 = time = 0
y = -10

[State 1031, 2]
type = veladd
trigger1 = 1
y = .5

[State 1031, 4]
type = Changestate
trigger1 = pos y >= -10
trigger1 = vel y > 0
value = 1029
;---------------------------------------
; Hit by FP,ground liedown
[Statedef 1029]
type    = L
physics = N
movetype= H
ctrl = 0
velset = 0,0

[State 1032, 1]
type = Changeanim
trigger1 = time = 0
value = 5111

[State 1032, 2]
type = posset
trigger1 = time = 0
y = 0

[State 1032, 3]
type = GameMakeAnim
trigger1 = Time = 0
value = 61
pos = 0, 0
under = 1

[State 1032, 4]
type = PlaySnd
trigger1 = Time = 0
value = F7,0 

[State 1032, 6] 
type = SelfState
triggerall = !alive
trigger1 = Time = 0
value = 5110

[State 1032, 6] 
type = SelfState
triggerall = alive
trigger1 = Time = 25
value = 5120
;------------------------------------------
[Statedef 1021]
type    = A
physics = N
movetype= H
ctrl = 0

[State 1021, 1]
type = playerpush
trigger1 = 1
value = 1

[State 1020, 2]
type = selfstate
triggerall = time = 0
triggerall = life > 0
trigger1 = prevstateno = 150 || prevstateno = 151 || prevstateno = 130
value = 150

[State 1020, 2]
type = selfstate
triggerall = time = 0
triggerall = life > 0
trigger1 = prevstateno = 154 || prevstateno = 155 || prevstateno = 132
value = 154

[State 1021, 1]
type = posadd
trigger1 = time = 0
x = -35
y = -60

[State 1021, 1]
type = changeanim2
trigger1 = time <= 2
value = 1021

[State 1021, 2]
type = Posfreeze
trigger1 = time <= 2

[State 1021, 3]
type = veladd
trigger1 = time > 2
y = 2

[State 1021, 3]
type = velset
trigger1 = time = 3
x = -8

[State 1021, 3]
type = velset
trigger1 = time = 0
y = 8

[State 1021, 4]
type = Nothitby
trigger1 = 1
value = SCA

[State 1021, 5]
type = Changestate
trigger1 = time > 3
trigger1 = pos y >= -25
trigger1 = vel y > 0
value = 1022
;--------------------------------------
; Hit by FP,Bouncing
[Statedef 1022]
type    = L
physics = N
movetype= H
ctrl = 0

[State 1203, 5]
type = nothitby
trigger1 = 1
value = SCA

[State 1203, 5]
type = Envshake
trigger1 = time = 0
time = 15
freq = 255
ampl = -4
ignorehitpause = 1

[State 1022, 1]
type = changeanim2
trigger1 = time <= 2
value = 1022

[State 1022, 2]
type = Posfreeze
trigger1 = time >= 0
trigger1 = time <= 2

[State 1022, 3]
type = Posset
trigger1 = time = 0
y = -20

[State 1022, 3]
type = veladd
trigger1 = time >= 3
x = -0.6
y = .5

[State 1022, 4]
type = velset
trigger1 = time = 0
y = -5
ignorehitpause = 1

[State 1022, 4]
type = velmul
trigger1 = 1
x = .8

[State 1022, 7]
type = Posadd
trigger1 = animelem = 3
y = 10

[State 1022, 8]
type = Changestate
trigger1 = pos y >= 0
trigger1 = vel y > 0
value = 1023
;---------------------------------------
; Hit by FP,liedown
[Statedef 1023]
type    = L
physics = N
movetype= H
ctrl = 0
velset = 0,0

[State 1023, 1]
type = Changeanim
trigger1 = time = 0
trigger1 = anim != 5162
value = 5110

[State 1023, 1]
type = Changeanim
trigger1 = time = 0
trigger1 = anim = 5162
value = 5112

[State 1023, 2]
type = posset
trigger1 = time = 0
y = 0

[State 1023, 3]
type = GameMakeAnim
trigger1 = Time = 0
value = 61
pos = 0, 0
under = 1

[State 1023, 4]
type = PlaySnd
trigger1 = Time = 0
value = F7,0 

[State 1023, 6] 
type = SelfState
triggerall = !alive && prevstateno != 1026
trigger1 = Time = 0
value = 5110

[State 1023, 6] 
type = SelfState
triggerall = alive
trigger1 = Time = 25
value = 5120

[State 1023, 6] 
type = changeState
trigger1 = prevstateno = 1026
trigger1 = Time = 3
value = 1028
;----------------------------------------
[Statedef 1024]
type    = A
physics = N
movetype= H
ctrl = 0

[State 1021, 1]
type = playerpush
trigger1 = 1
value = 1

[State 1020, 2]
type = selfstate
triggerall = time = 0
triggerall = life > 0
trigger1 = prevstateno = 150 || prevstateno = 151 || prevstateno = 130
value = 150

[State 1020, 2]
type = selfstate
triggerall = time = 0
triggerall = life > 0
trigger1 = prevstateno = 154 || prevstateno = 155 || prevstateno = 132
value = 154

[State 1021, 1]
type = posadd
trigger1 = time = 0
x = -35
y = -62

[State 1021, 1]
type = changeanim2
trigger1 = time <= 2
value = 1024

[State 1021, 2]
type = Posfreeze
trigger1 = time <= 2

[State 1021, 3]
type = veladd
trigger1 = time > 2
y = 2

[State 1021, 3]
type = velset
trigger1 = time = 3 
x = -8.5

[State 1021, 3]
type = velset
trigger1 = time = 0
y = 8

[State 1021, 4]
type = Nothitby
trigger1 = 1
value = SCA

[State 1021, 5]
type = Changestate
trigger1 = selfanimexist(5102)
trigger1 = selfanimexist(5162)
trigger1 = selfanimexist(5112)
trigger1 = time > 3
trigger1 = pos y >= -25
trigger1 = vel y > 0
value = 1025

[State 1021, 5]
type = Changestate
triggerall = time > 3
triggerall = pos y >= -25
triggerall = vel y > 0
trigger1 = !selfanimexist(5102)
trigger2 = !selfanimexist(5162)
trigger3 = !selfanimexist(5112)
value = 1022
;---------------------------
[Statedef 3011]
type    = L
physics = N
movetype= H
ctrl = 0

[State 1203, 5]
type = turn
trigger1 = time = 0
trigger1 = vel x > 0

[State 5100, 8]
type = GameMakeAnim
trigger1 = Time = 0 && prevstateno != 2026
value = 61 
pos = 0,-19
under = 1
[State 5100, 8]
type = GameMakeAnim
trigger1 = Time = 0 && prevstateno = 2026
value = 61 
pos = 0,-9
under = 1

[State 1203, 5]
type = nothitby
trigger1 = 1
value = SCA

[State 1022, 7]
type = Posset
trigger1 = time = 0
y = 0

[State 1022, 1]
type = statetypeset
trigger1 = time = 1
value = A

[State 1022, 1]
type = changeanim
trigger1 = time = 0
value = 5102

[State 1022, 1]
type = playsnd
trigger1 = time = 0
value = f7,0

[State 1022, 2]
type = Posfreeze
trigger1 = 1

[State 1022, 8]
type = Changestate
trigger1 = animtime = 0 && prevstateno = 2026
value = 3013

[State 1022, 8]
type = Changestate
trigger1 = animtime = 0 && prevstateno != 2026
value = 3012
;--------------------------------------
; Hit by FP,Bouncing
[Statedef 1025]
type    = L
physics = N
movetype= H
ctrl = 0

[State 1203, 5]
type = nothitby
trigger1 = 1
value = SCA

[State 1022, 7]
type = Posset
trigger1 = time = 0
y = 0

[State 1203, 5]
type = Envshake
trigger1 = time = 0
time = 15
freq = 255
ampl = -4
ignorehitpause = 1

[State 1022, 1]
type = changeanim
trigger1 = time = 0
value = 5102

[State 1022, 2]
type = Posfreeze
trigger1 = 1

[State 1022, 8]
type = Changestate
trigger1 = animtime = 0
value = 1026
;-------------------------------------
; Hit by FP,Bouncing
[Statedef 1026]
type    = L
physics = N
movetype= H
ctrl = 0

[State 1203, 5]
type = nothitby
trigger1 = 1
value = SCA

[State 1022, 7]
type = Posset
trigger1 = time = 0
y = 20

[State 1022, 1]
type = changeanim
trigger1 = time = 0
value = 5162

[State 1022, 4]
type = velset
trigger1 = time = 0
y = -5
ignorehitpause = 1

[State 1022, 3]
type = veladd
trigger1 = time >= 0
x = -0.6
y = .5

[State 1022, 4]
type = velmul
trigger1 = 1
x = .8

[State 1022, 8]
type = Changestate
trigger1 = pos y >= 15
trigger1 = vel y > 0
value = 1023

[Statedef 3012]          ;
type    = L
physics = N
movetype= H
ctrl = 0

[State 1203, 5]
type = nothitby
trigger1 = 1
value = SCA

[State 1022, 7]
type = Posset
trigger1 = time = 0
y = 20

[State 1022, 1]
type = changeanim
trigger1 = time = 0
value = 5162

[State 1022, 4]
type = velset
trigger1 = time = 0
y = -5
ignorehitpause = 1

[State 1022, 3]
type = veladd
trigger1 = time >= 0
x = -0.65
y = .5

[State 1022, 4]
type = velmul
trigger1 = 1
x = .8

[State 1022, 8]
type = selfstate
trigger1 = pos y >= 15
trigger1 = vel y > 0
value = 5110

[Statedef 3013]          ;
type    = L
physics = N
movetype= H
ctrl = 0

[State 1203, 5]
type = nothitby
trigger1 = 1
value = SCA

[State 1022, 7]
type = Posset
trigger1 = time = 0
y = 20

[State 1022, 1]
type = changeanim
trigger1 = time = 0
value = 5162

[State 1022, 4]
type = velset
trigger1 = time = 0
y = -5
ignorehitpause = 1

[State 1022, 3]
type = veladd
trigger1 = time >= 0
y = .5

[State 1022, 8]
type = selfstate
trigger1 = pos y >= 15
trigger1 = vel y > 0
value = 5110
;-----------------------------------
; Hit by st when throw
[Statedef 3010]
type = A
movetype = H
physics = N
ctrl = 0
anim = 5030

[State 3010, 1]
type = DefenceMulSet
trigger1 = time = 0
value = 1

[State 3010, 7]
type = posfreeze
trigger1 = time < 12

[State 3010, 6]
type = ForceFeedBack
trigger1 = time = 12
time = 1
waveform = square

[State 3010, 7]
type = posadd
trigger1 = time = 12
y = -10

[State 3010, 9]
type = ChangeAnim2
trigger1 = time = 12
value = 3010

[State 3010, 10]
type = HitVelSet
trigger1 = time = 0
persistent = 0
x = 1
y = 1

[State 3010, 11]
type = VelAdd
trigger1 = time >= 12
y = 0.5

[State 3010, 4]
type = EnvShake
trigger1 = time > 3
trigger1 = pos y >= 5
trigger1 = vel y > 0
time = 20
ampl = 2
freq = 255

[State 1021, 5]
type = Changestate
trigger1 = Anim = 3010
trigger1 = selfanimexist(5102)
trigger1 = selfanimexist(5162)
trigger1 = selfanimexist(5112)
trigger1 = time > 3
trigger1 = pos y >= 5
trigger1 = vel y > 0
value = 3011

[State 3010, 12]
type = SelfState
trigger1 = Anim = 3010
trigger1 = time > 3
trigger1 = (Vel Y > 0) && (Pos Y >= 5)
value = 5100
;-------------------------------------
;Axe kick    (single)
[Statedef 215]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
anim = 216
velset = 0,0

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 7
value = s27,0

[State 1000, 4]
type = Helper
trigger1 = time = 0
name = "n2"
pos = 0,0  
stateno = 219

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && (time < 18 || time >= 29)
value = ,AA,AP

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time >= 18 && time < 29
value = SCA

[State 230, 0]
type = varset
trigger1 = animelem = 8
var(38) = 0

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 1

[State 1000, 1]
type = varset
trigger1 = animelem = 9
var(34) = 0

[state 215, 1]
type = posAdd
trigger1 = AnimElem = 1
x = 10

[state 215, 2]
type = posAdd
trigger1 = AnimElem = 2
x = 17

[state 215, 2]
type = posAdd
trigger1 = AnimElem = 3
x = 9
              
[state 215, 2]
type = posAdd
trigger1 = AnimElem = 4
x = 5
              
[state 215, 2]
type = posAdd
trigger1 = AnimElem = 5
x = 1

[state 215, 2]
type = posAdd
trigger1 = AnimElem = 6
x = 2
              
[state 215, 2]
type = posAdd
trigger1 = AnimElem = 7
x = 3
              
[State 230, 2]
type = PlaySnd
trigger1 = animelem = 2
value = s3,6
channel = 1

[State 1002, 4]
type = Targetstate
trigger1 = movehit > 0 && numtarget(215) > 0
trigger1 = target(215),statetype = A
trigger1 = HitPauseTime = 1
value = 1021
id = 215
ignorehitpause = 1
persistent = 0

[State 1002, 4]
type = Targetstate
trigger1 = movehit > 0 && numtarget(215) > 0
trigger1 = target(215),statetype = C
trigger1 = HitPauseTime = 1
value = 1019
id = 215
ignorehitpause = 1
persistent = 0

[State 1002, 4]
type = Targetstate
trigger1 = movehit > 0 && numtarget(215) > 0
trigger1 = target(215),statetype = S
trigger1 = HitPauseTime = 1
value = 1011
ignorehitpause = 1
id = 215
persistent = 0

[State 1405, 0]
type = varrandom
trigger1 = time = 0 || animelem = 8
v = 4
range = 2

[State 210, 5]
type = HitDef
trigger1 = AnimElem = 7
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = S, NA
damage   = 53
animtype = hard
guardflag = MA
pausetime = 11,11
priority = 4,hit
sparkno = s10005
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-77
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),8
getpower = 56,56
givepower = 21,21
guardsound = s27,3
ground.type = High
ground.slidetime = 14
ground.hittime  = 18
guard.slidetime = 18-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,8,0)
guard.hittime  = 18-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,8,0)
ground.velocity = -5
air.type = Low
ground.cornerpush.veloff = -7
air.velocity = -3.1,-4
airguard.velocity = -3.5
air.fall = 1
fall.recovertime = 20
palfx.time = 1
palfx.add = 0,0,0

[State 210, 5]
type = HitDef
triggerall = AnimElem = 7
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = S, SA
damage   = 53
animtype = hard
guardflag = MA
pausetime = 11,11
sparkno = s10006
guard.sparkno = s10010
priority = 4,hit
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-77
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),8
guardsound = s27,3
ground.type = High
ground.slidetime = 16
ground.hittime  = 20
guard.slidetime = 20-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,9,0)
guard.hittime  = 20-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,9,0)
getpower = 56,56
givepower = 21,21
ground.velocity = -5
air.type = Low
ground.cornerpush.veloff = -7
air.velocity = -3.1,-4
airguard.velocity = -3.5
air.fall = 1
fall.recovertime = 20
palfx.time = 1
palfx.add = 0,0,0

[State 210, 5]
type = HitDef
trigger1 = AnimElem = 8
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = S, NA
damage   = 53
animtype = hard
priority = 4,hit
guardflag = HA
pausetime = 11,11
sparkno = s10005
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),8
guardsound = s27,3
getpower = 56,56
givepower = 21,21
ground.type = low
ground.slidetime = 19
ground.hittime  = 19
guard.slidetime = 33-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0)
guard.hittime  = 33-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0)
guard.velocity  = -16
ground.velocity = -12
ground.cornerpush.veloff = -20
guard.cornerpush.veloff = -21
air.velocity = -3.1,-4
airguard.velocity = -3.5
air.fall = 1
fall.recovertime = 20
palfx.time = 1
palfx.add = 0,0,0

[State 210, 5]
type = HitDef
triggerall = AnimElem = 8
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = S, SA
damage   = 53
animtype = hard
priority = 4,hit
guardflag = HA  
pausetime = 11,11
sparkno = s10006
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57
getpower = 56,56
givepower = 21,21
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),8
guardsound = s27,3
ground.type = low
ground.slidetime = 21
ground.hittime  = 21
guard.slidetime = 35-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,17,0)
guard.hittime  = 35-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,17,0)
guard.velocity  = -16
ground.velocity = -12
ground.cornerpush.veloff = -20
guard.cornerpush.veloff = -21
air.velocity = -3.1,-4
airguard.velocity = -3.5
air.fall = 1
fall.recovertime = 20
palfx.time = 1
palfx.add = 0,0,0

[State 210, 5]
type = HitDef
trigger1 = AnimElem = 9 && movecontact = 0
trigger1 = var(14) < 1 && var(16) < 1
attr = S,NA
damage   = 53
id = 215
animtype = light
priority = 4,hit
guardflag = HA
pausetime = 11,11
sparkno = s10005
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57
hitsound   = s5,4
guardsound = s27,3
getpower = 56,56
givepower = 21,21
ground.type = low
ground.slidetime = 18
ground.hittime  = 18
guard.slidetime = 32-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,15,0)
guard.hittime  = 32-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,15,0)
guard.velocity  = -16
ground.velocity = -12
ground.cornerpush.veloff = -20
guard.cornerpush.veloff = -21
air.velocity = -3.1,-4
airguard.velocity = -3.5
air.fall = 1
fall.recovertime = 20
palfx.time = 1
palfx.add = 0,0,0

[State 210, 5]
type = HitDef
trigger1 = AnimElem = 9 && movecontact = 0
trigger1 = var(14) > 0 || var(16) > 0
attr = S,SA
damage   = 53
id = 215
animtype = light
priority = 4,hit
guardflag = HA
pausetime = 11,11
sparkno = s10006
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57
hitsound   = s5,4
guardsound = s27,3
getpower = 56,56
givepower = 21,21
ground.type = low
ground.slidetime = 20
ground.hittime  = 20
guard.slidetime = 34-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0)
guard.hittime  = 34-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0)
guard.velocity  = -16
ground.velocity = -12
ground.cornerpush.veloff = -20
guard.cornerpush.veloff = -21
air.velocity = -3.1,-4
airguard.velocity = -3.5
air.fall = 1
fall.recovertime = 20
palfx.time = 1
palfx.add = 0,0,0

[state 210, 6]
type = posAdd
trigger1 = animelem = 14
x = 14

[State 210, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;Axe kick    (single)
[Statedef 218]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
anim = 218
velset = 0,0

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 7
value = s27,0

[State 1000, 4]
type = Helper
trigger1 = time = 0
name = "n2"
pos = 0,0  
stateno = 219

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && (time < 24 || time >= 36)
value = ,AA,AP

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time >= 24 && time < 36
value = SCA

[State 230, 0]
type = varset
trigger1 = animelem = 8
var(38) = 0

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 1

[State 1000, 1]
type = varset
trigger1 = animelem = 9
var(34) = 0

[state 215, 1]
type = posAdd
trigger1 = AnimElem = 1
x = 10

[state 215, 2]
type = posAdd
trigger1 = AnimElem = 2
x = 17

[state 215, 2]
type = posAdd
trigger1 = AnimElem = 3
x = 9
              
[state 215, 2]
type = posAdd
trigger1 = AnimElem = 4
x = 5
              
[state 215, 2]
type = posAdd
trigger1 = AnimElem = 5
x = 1

[state 215, 2]
type = posAdd
trigger1 = AnimElem = 6
x = 2
              
[state 215, 2]
type = posAdd
trigger1 = AnimElem = 7
x = 3
              
[State 230, 2]
type = PlaySnd
trigger1 = animelem = 2
value = s3,6
channel = 1

[State 1405, 0]
type = varrandom
trigger1 = time = 0 || animelem = 8
v = 4
range = 2

;[State 210, 5]
;type = HitDef
;trigger1 = AnimElem = 7
;trigger1 = var(14) < 1
;trigger1 = var(16) < 1
;attr = S, NA
;damage   = 53
;animtype = hard
;guardflag = MA
;pausetime = 11,11
;priority = 4,hit
;sparkno = s10005
;guard.sparkno = s10010
;sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-77
;hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),8
;getpower = 56,56
;givepower = 21,21
;guardsound = s27,3
;ground.type = High
;ground.slidetime = 14
;ground.hittime  = 18
;guard.slidetime = 18-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,8,0)
;guard.hittime  = 18-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,8,0)
;ground.velocity = -5
;air.type = Low
;ground.cornerpush.veloff = -7
;air.velocity = -3.1,-4
;airguard.velocity = -3.5
;air.fall = 1
;fall.recovertime = 20
;palfx.time = 1
;palfx.add = 0,0,0
;
;[State 210, 5]
;type = HitDef
;triggerall = AnimElem = 7
;trigger1 = var(14) > 0
;trigger2 = var(16) > 0
;attr = S, SA
;damage   = 53
;animtype = hard
;guardflag = MA
;pausetime = 11,11
;sparkno = s10006
;guard.sparkno = s10010
;priority = 4,hit
;sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-77
;hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),8
;guardsound = s27,3
;ground.type = High
;ground.slidetime = 16
;ground.hittime  = 20
;guard.slidetime = 20-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,9,0)
;guard.hittime  = 20-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,9,0)
;getpower = 56,56
;givepower = 21,21
;ground.velocity = -5
;air.type = Low
;ground.cornerpush.veloff = -7
;air.velocity = -3.1,-4
;airguard.velocity = -3.5
;air.fall = 1
;fall.recovertime = 20
;palfx.time = 1
;palfx.add = 0,0,0

[State 210, 5]
type = HitDef
trigger1 = AnimElem = 8
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = S, NA
damage   = 75
animtype = hard
priority = 4,hit
guardflag = HA
pausetime = 11,11
sparkno = s10005
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),8
guardsound = s27,3
getpower = 56,56
givepower = 21,21
ground.type = low
ground.slidetime = 21
ground.hittime  = 21
guard.slidetime = 40-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,19,0)
guard.hittime  = 40-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,19,0)
guard.velocity  = -16
ground.velocity = -12
ground.cornerpush.veloff = -20
guard.cornerpush.veloff = -21
air.velocity = -3.1,-4
airguard.velocity = -3.5
air.fall = 1
fall.recovertime = 20
palfx.time = 1
palfx.add = 0,0,0

[State 210, 5]
type = HitDef
triggerall = AnimElem = 8
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = S,SA
damage   = 75
animtype = hard
priority = 4,hit
guardflag = HA  
pausetime = 11,11
sparkno = s10006
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57
getpower = 56,56
givepower = 21,21
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),8
guardsound = s27,3
ground.type = low
ground.slidetime = 23
ground.hittime  = 23
guard.slidetime = 42-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,20,0)
guard.hittime  = 42-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,20,0)
ground.velocity = -12
ground.cornerpush.veloff = -20
guard.cornerpush.veloff = -21
guard.velocity  = -16
air.velocity = -3.1,-4
airguard.velocity = -3.5
air.fall = 1
fall.recovertime = 20
palfx.time = 1
palfx.add = 0,0,0

[State 210, 5]
type = HitDef
trigger1 = AnimElem = 9 && movecontact = 0
trigger1 = var(14) < 1 && var(16) < 1
attr = S,NA
damage   = 75
id = 215
animtype = hard
priority = 4,hit
guardflag = HA
pausetime = 11,11
sparkno = s10005
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),8
guardsound = s27,3
getpower = 56,56
givepower = 21,21
ground.type = low
ground.slidetime = 20
ground.hittime  = 20
guard.slidetime = 39-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,19,0)
guard.hittime  = 39-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,19,0)
ground.velocity = -12
ground.cornerpush.veloff = -20
guard.cornerpush.veloff = -21
air.velocity = -3.1,-4
airguard.velocity = -3.5
air.fall = 1
fall.recovertime = 20
palfx.time = 1
palfx.add = 0,0,0

[State 210, 5]
type = HitDef
trigger1 = AnimElem = 9 && movecontact = 0
trigger1 = var(14) > 0 || var(16) > 0
attr = S,SA
damage   = 75
id = 215
animtype = hard
priority = 4,hit
guardflag = HA
pausetime = 11,11
sparkno = s10006
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),8
guardsound = s27,3
getpower = 56,56
givepower = 21,21
ground.type = low
ground.slidetime = 22
ground.hittime  = 22
guard.slidetime = 41-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,20,0)
guard.hittime  = 41-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,20,0)
ground.velocity = -12
ground.cornerpush.veloff = -20
guard.cornerpush.veloff = -21
air.velocity = -3.1,-4
airguard.velocity = -3.5
air.fall = 1
fall.recovertime = 20
palfx.time = 1
palfx.add = 0,0,0

[state 210, 6]
type = posAdd
trigger1 = animelem = 14
x = 14

[State 210, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;-----------------------------------------
;Axe kick    (cancel)
[Statedef 216]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
anim = 215
velset = 0,0

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 7
value = s27,0

[State 1000, 4]
type = Helper
trigger1 = time = 0
name = "n2"
pos = 0,0  
stateno = 219

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && (time < 20 || time >= 32)
value = ,AA,AP

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time >= 20 && time < 32
value = SCA

[State 230, 0]
type = varset
trigger1 = animelem = 8
var(38) = 0

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 1

[State 1000, 1]
type = varset
trigger1 = animelem = 9
var(34) = 0

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 2
value = s3,6
channel = 1

[state 215, 1]
type = posAdd
trigger1 = AnimElem = 1
x = 10

[state 215, 2]
type = posAdd
trigger1 = AnimElem = 2
x = 17

[state 215, 2]
type = posAdd
trigger1 = AnimElem = 3
x = 9
              
[state 215, 2]
type = posAdd
trigger1 = AnimElem = 4
x = 5
              
[state 215, 2]
type = posAdd
trigger1 = AnimElem = 5
x = 1

[state 215, 2]
type = posAdd
trigger1 = AnimElem = 6
x = 2
              
[state 215, 2]
type = posAdd
trigger1 = AnimElem = 7
x = 3
              
[State 1405, 0]
type = varrandom
trigger1 = time = 0 || animelem = 8
v = 4
range = 2

[State 210, 5]
type = HitDef
trigger1 = AnimElem = 7
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = S, NA
damage   = 29
animtype = hard
guardflag = MA
pausetime = 10,11
sparkno = s10005
priority = 4,hit
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-77
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),8
guardsound = s27,3
ground.type = High
getpower = 56,56
givepower = 21,21
ground.slidetime = 13
ground.hittime  = 17
guard.slidetime = 17-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,8,0)
guard.hittime  = 17-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,8,0)
ground.velocity = -5
air.type = Low
ground.cornerpush.veloff = -7
air.velocity = -3.1,-4
airguard.velocity = -3.5
air.fall = 1
fall.recovertime = 20
palfx.time = 1
palfx.add = 0,0,0

[State 210, 5]
type = HitDef
triggerall = AnimElem = 7
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = S, SA
damage   = 29
animtype = hard
guardflag = MA
pausetime = 10,11
sparkno = s10006
priority = 4,hit
guard.sparkno = s10010
getpower = 56,56
givepower = 21,21
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-77
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),8
guardsound = s27,3
ground.type = High
ground.slidetime = 15
ground.hittime  = 19
guard.slidetime = 19-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,9,0)
guard.hittime  = 19-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,9,0)
ground.velocity = -5
air.type = Low
ground.cornerpush.veloff = -7
air.velocity = -3.1,-4
airguard.velocity = -3.5
air.fall = 1
fall.recovertime = 20
palfx.time = 1
palfx.add = 0,0,0

[State 210, 5]
type = HitDef
trigger1 = AnimElem = 8
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = S, NA
damage   = 30
animtype = hard
guardflag = MA  
pausetime = 11,11
sparkno = s10005
guard.sparkno = s10010
priority = 4,hit
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),8
guardsound = s27,3
getpower = 56,56
givepower = 21,21
ground.type = low
ground.slidetime = 21
ground.hittime  = 21
guard.slidetime = 40-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,19,0)
guard.hittime  = 40-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,19,0)
ground.velocity = -10
air.velocity = -3.1,-4
airguard.velocity = -3.5
air.fall = 1
fall.recovertime = 20
palfx.time = 1
palfx.add = 0,0,0

[State 210, 5]
type = HitDef
triggerall = AnimElem = 8
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = S, SA
damage   = 30
animtype = hard
guardflag = MA  
pausetime = 11,11
sparkno = s10006
priority = 4,hit
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),8
guardsound = s27,3
ground.type = low
getpower = 56,56
givepower = 21,21
ground.slidetime = 22
ground.hittime  = 22
guard.slidetime = 41-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,20,0)
guard.hittime  = 41-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,20,0)
ground.velocity = -10
air.velocity = -3.1,-4
airguard.velocity = -3.5
air.fall = 1
fall.recovertime = 20
palfx.time = 1
palfx.add = 0,0,0

[State 210, 5]
type = HitDef
trigger1 = AnimElem = 9 && movecontact = 0
trigger1 = var(14) < 1 && var(16) < 1
attr = S,NA
damage   = 30
id = 215
animtype = hard
priority = 4,hit
guardflag = HA
pausetime = 11,11
sparkno = s10005
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),8
guardsound = s27,3
getpower = 56,56
givepower = 21,21
ground.type = low
ground.slidetime = 20
ground.hittime  = 20
guard.slidetime = 39-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,19,0)
guard.hittime  = 39-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,19,0)
ground.velocity = -11
air.velocity = -3.1,-4
airguard.velocity = -3.5
air.fall = 1
fall.recovertime = 20
palfx.time = 1
palfx.add = 0,0,0

[State 210, 5]
type = HitDef
trigger1 = AnimElem = 9 && movecontact = 0
trigger1 = var(14) > 0 || var(16) > 0
attr = S,SA
damage   = 30
id = 215
animtype = hard
priority = 4,hit
guardflag = HA
pausetime = 11,11
sparkno = s10006
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),8
guardsound = s27,3
getpower = 56,56
givepower = 21,21
ground.type = low
ground.slidetime = 22
ground.hittime  = 22
guard.slidetime = 41-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,20,0)
guard.hittime  = 41-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,20,0)
ground.velocity = -11
air.velocity = -3.1,-4
airguard.velocity = -3.5
air.fall = 1
fall.recovertime = 20
palfx.time = 1
palfx.add = 0,0,0

[state 210, 6]
type = posAdd
trigger1 = animelem = 14
x = 14

[State 210, 6]
type = ChangeState
trigger1 = var(58) > 1 || var(58) < 1
trigger1 = p2name != "BigWomen"
trigger1 = p2name != "CADILLACS"
trigger1 = p2name != "Madgear"
trigger1 = p2name != "DARK WARRIOR2"
trigger1 = p2name != "Onslaught"
trigger1 = p2name != "Apocalypse"
trigger1 = var(55) = 1
trigger1 = time = 22
trigger1 = movecontact = 0
trigger1 = random <= 840
trigger1 = p2statetype != L   
trigger1 = p2bodydist Y >= -5
trigger1 = p2bodydist X >= -50
trigger1 = p2bodydist X <= 39
value = 3200

[State 210, 6]
type = ChangeState
trigger1 = numprojID(7000) = 0
trigger1 = var(55) = 1
trigger1 = time >= 24
trigger1 = time <= 26
trigger1 = var(14) > 10
trigger1 = p2bodydist X <= 45
trigger1 = movehit > 0
value = 1020

[State 240, 3]
type = ChangeState
trigger1 = var(58) > 2 || var(58) < 1
trigger1 = time >= 24
trigger1 = time <= 26
trigger1 = moveguarded > 0
trigger1 = var(55) = 1
trigger1 = random <= 80
value = 299

[State 240, 3]
type = ChangeState
triggerall = var(58) > 2 || var(58) < 1
triggerall = movehit > 0
triggerall = time >= 24
triggerall = time <= 26
triggerall = var(55) = 1
triggerall = power >= 2000 + var(20)*100
triggerall = var(14) < 1 && var(3) < 1
triggerall = p2bodydist Y >= -30
triggerall = var(16) < 1
trigger1 = power >= 2000 + var(20)*100
trigger1 = p2life >= 450
trigger1 = random <= 200
trigger2 = power >= 3000 + var(20)*100
trigger2 = p2life >= 450
trigger2 = random <= 800
trigger3 = p2life - life >= 100
trigger3 = p2life >= 450
trigger3 = random <= 900
value = 2500

[State 240, 3]
type = ChangeState
triggerall = var(58) > 2 || var(58) < 1
triggerall = time >= 24
triggerall = time <= 26
triggerall = movehit > 0
triggerall = var(55) = 1
triggerall = var(14) < 1
triggerall = power >= 1000 + var(20)*100 || var(3) > 0
triggerall = p2bodydist Y >= -30
triggerall = var(16) < 1
trigger1 = power >= 1200 + var(20)*100 || (var(3) > 0 && power >= 200 + var(20)*100)
trigger1 = p2life >= 180
trigger1 = random <= 200-ifelse(var(3)>256,100,0)
trigger2 = power >= 3000 + var(20)*100 || (var(3) > 0 && power >= 2000 + var(20)*100)
trigger2 = p2life >= 180
trigger2 = random <= 800-ifelse(var(3)>256,400,0)
trigger3 = p2life - life >= 100
trigger3 = p2life >= 180
trigger3 = random <= 900-ifelse(var(3)>256,450,0)
value = 2000

[State 210, 6]
type = ChangeState
trigger1 = var(55) = 1
trigger1 = time >= 24
trigger1 = time <= 26
trigger1 = moveguarded > 0
trigger1 = random <= 500
value = 510

[State 240, 4]
type = ChangeState
trigger1 = var(55) = 1
trigger1 = time = 26
trigger1 = movecontact = 0
trigger1 = p2movetype = A
trigger1 = p2bodydist X > -50 && p2bodydist X < 51
trigger1 = random <= 450
value = 1030

[State 240, 4]
type = ChangeState
trigger1 = var(58) > 1 || var(58) < 1
trigger1 = var(55) = 1
trigger1 = time = 26
trigger1 = movecontact = 0
trigger1 = p2bodydist X > -50 && p2bodydist X < 51
trigger1 = p2movetype = A
trigger1 = random <= 450
value = 1040

[State 240, 4]
type = ChangeState
triggerall = var(55) = 1
triggerall = p2statetype != L   
triggerall = p2stateno != 5050
trigger1 = time >= 24
trigger1 = time <= 26
trigger1 = moveguarded > 0
trigger1 = random <= 300
trigger2 = time = 26
trigger2 = movecontact = 0
trigger2 = p2bodydist X < 0
trigger2 = random <= 900
value = 4333

[State 240, 3]
type = ChangeState
triggerall = var(55) = 1
triggerall = numprojID(7000) = 0
triggerall = time = 26
trigger1 = movecontact = 0
trigger2 = moveguarded > 0
trigger2 = random <= 500
value = 1000

[State 240, 3]
type = ChangeState
trigger1 = var(55) = 1
trigger1 = time = 26
trigger1 = movecontact > 0
value = 520

[State 210, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;Axe kick    (2k1c)
[Statedef 217]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
anim = 217
velset = 0,0

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 7
value = s27,0

[State 1000, 4]
type = Helper
trigger1 = time = 0
name = "n2"
pos = 0,0  
stateno = 219

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && (time < 16 || time >= 27)
value = ,AA,AP

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time >= 16 && time < 27
value = SCA

[State 230, 0]
type = varset
trigger1 = animelem = 8
var(38) = 0

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 1

[State 1000, 1]
type = varset
trigger1 = animelem = 9
var(34) = 0

[state 215, 1]
type = posAdd
trigger1 = AnimElem = 1
x = 10

[state 215, 2]
type = posAdd
trigger1 = AnimElem = 2
x = 17

[state 215, 2]
type = posAdd
trigger1 = AnimElem = 3
x = 9
              
[state 215, 2]
type = posAdd
trigger1 = AnimElem = 4
x = 5
              
[state 215, 2]
type = posAdd
trigger1 = AnimElem = 5
x = 1

[state 215, 2]
type = posAdd
trigger1 = AnimElem = 6
x = 2
              
[state 215, 2]
type = posAdd
trigger1 = AnimElem = 7
x = 3
              
[State 230, 2]
type = PlaySnd
trigger1 = animelem = 2
value = s3,6
channel = 1

[State 1405, 0]
type = varrandom
trigger1 = time = 0 || animelem = 8 || animelem = 9
v = 4
range = 2

[State 210, 5]
type = HitDef
trigger1 = AnimElem = 7
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = S, NA
damage   = 29
animtype = hard
guardflag = MA
pausetime = 11,11
priority = 4,hit
sparkno = s10005
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-77
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),8
getpower = 56,56
givepower = 21,21
guardsound = s27,3
ground.type = High
ground.slidetime = 14
ground.hittime  = 18
guard.slidetime = 18-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,8,0)
guard.hittime  = 18-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,8,0)
ground.velocity = -5
air.type = Low
ground.cornerpush.veloff = -7
air.velocity = -3.1,-4
airguard.velocity = -3.5
air.fall = 1
fall.recovertime = 20
palfx.time = 1
palfx.add = 0,0,0

[State 210, 5]
type = HitDef
triggerall = AnimElem = 7
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = S, SA
damage   = 29
animtype = hard
guardflag = MA
pausetime = 11,11
sparkno = s10006
guard.sparkno = s10010
priority = 4,hit
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-77
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),8
guardsound = s27,3
ground.type = High
ground.slidetime = 16
ground.hittime  = 20
guard.slidetime = 20-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,9,0)
guard.hittime  = 20-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,9,0)
getpower = 56,56
givepower = 21,21
ground.velocity = -5
air.type = Low
ground.cornerpush.veloff = -7
air.velocity = -3.1,-4
airguard.velocity = -3.5
air.fall = 1
fall.recovertime = 20
palfx.time = 1
palfx.add = 0,0,0

[State 210, 5]
type = HitDef
trigger1 = AnimElem = 8
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = S, NA
damage   = 30
animtype = hard
priority = 4,hit
guardflag = MA
pausetime = 11,11
sparkno = s10005
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),8
guardsound = s27,3
getpower = 56,56
givepower = 21,21
ground.type = low
ground.slidetime = 21
ground.hittime  = 21
guard.slidetime = 33-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0)
guard.hittime  = 33-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0)
ground.velocity = -11
air.velocity = -3.1,-4
airguard.velocity = -3.5
air.fall = 1
fall.recovertime = 20
palfx.time = 1
palfx.add = 0,0,0

[State 210, 5]
type = HitDef
triggerall = AnimElem = 8
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = S, SA
damage   = 30
animtype = hard
priority = 4,hit
guardflag = MA  
pausetime = 11,11
sparkno = s10006
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57
getpower = 56,56
givepower = 21,21
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),8
guardsound = s27,3
ground.type = low
ground.slidetime = 22
ground.hittime  = 22
guard.slidetime = 34-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0)
guard.hittime  = 34-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0)
ground.velocity = -11
air.velocity = -3.1,-4
airguard.velocity = -3.5
air.fall = 1
fall.recovertime = 20
palfx.time = 1
palfx.add = 0,0,0

[State 210, 5]
type = HitDef
trigger1 = AnimElem = 9
trigger1 = var(14) < 1 && var(16) < 1
attr = S,NA
damage   = 30
id = 215
animtype = hard
priority = 4,hit
guardflag = HA
pausetime = 11,11
sparkno = s10005
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),8
guardsound = s27,3
getpower = 56,56
givepower = 21,21
ground.type = low
ground.slidetime = 20
ground.hittime  = 20
guard.slidetime = 32-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,15,0)
guard.hittime  = 32-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,15,0)
ground.velocity = -11
air.velocity = -3.1,-4
airguard.velocity = -3.5
air.fall = 1
fall.recovertime = 20
palfx.time = 1
palfx.add = 0,0,0

[State 210, 5]
type = HitDef
trigger1 = AnimElem = 9
trigger1 = var(14) > 0 || var(16) > 0
attr = S,SA
damage   = 30
id = 215
animtype = hard
priority = 4,hit
guardflag = HA
pausetime = 11,11
sparkno = s10006
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),8
guardsound = s27,3
getpower = 56,56
givepower = 21,21
ground.type = low
ground.slidetime = 22
ground.hittime  = 22
guard.slidetime = 34-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0)
guard.hittime  = 34-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0)
ground.velocity = -11
air.velocity = -3.1,-4
airguard.velocity = -3.5
air.fall = 1
fall.recovertime = 20
palfx.time = 1
palfx.add = 0,0,0

[state 210, 6]
type = posAdd
trigger1 = animelem = 14
x = 14

[State 240, 3]
type = ChangeState
trigger1 = var(58) > 2 || var(58) < 1
trigger1 = time >= 19
trigger1 = time <= 21
trigger1 = moveguarded > 0
trigger1 = var(55) = 1
trigger1 = random <= 80
value = 299

[State 240, 3]
type = ChangeState
triggerall = var(58) > 2 || var(58) < 1
triggerall = movehit > 0
triggerall = time >= 19
triggerall = time <= 21
triggerall = var(55) = 1
triggerall = power >= 2000 + var(20)*100
triggerall = var(14) < 1 && var(3) < 1
triggerall = p2bodydist Y >= -30
triggerall = var(16) < 1
trigger1 = power >= 2000 + var(20)*100
trigger1 = p2life >= 450
trigger1 = random <= 200
trigger2 = power >= 3000 + var(20)*100
trigger2 = p2life >= 450
trigger2 = random <= 800
trigger3 = p2life - life >= 100
trigger3 = p2life >= 450
trigger3 = random <= 900
value = 2500

[State 240, 3]
type = ChangeState
triggerall = var(58) > 2 || var(58) < 1
triggerall = time >= 19
triggerall = time <= 21
triggerall = movehit > 0
triggerall = var(55) = 1
triggerall = var(14) < 1
triggerall = power >= 1000 + var(20)*100 || var(3) > 0
triggerall = p2bodydist Y >= -30
triggerall = var(16) < 1
trigger1 = power >= 1200 + var(20)*100 || (var(3) > 0 && power >= 200 + var(20)*100)
trigger1 = p2life >= 180
trigger1 = random <= 200-ifelse(var(3)>256,100,0)
trigger2 = power >= 3000 + var(20)*100 || (var(3) > 0 && power >= 2000 + var(20)*100)
trigger2 = p2life >= 180
trigger2 = random <= 800-ifelse(var(3)>256,400,0)
trigger3 = p2life - life >= 100
trigger3 = p2life >= 180
trigger3 = random <= 900-ifelse(var(3)>256,450,0)
value = 2000

[State 210, 6]
type = ChangeState
trigger1 = var(55) = 1
trigger1 = time >= 19
trigger1 = time <= 21
trigger1 = moveguarded > 0
trigger1 = random <= 500
value = 510

[State 240, 4]
type = ChangeState
trigger1 = p2statetype != L   
trigger1 = p2stateno != 5050
trigger1 = var(55) = 1
trigger1 = time >= 19
trigger1 = time <= 21
trigger1 = moveguarded > 0
trigger1 = random <= 300
value = 4333

[State 240, 3]
type = ChangeState
trigger1 = var(55) = 1
trigger1 = numprojID(7000) = 0
trigger1 = time = 21
trigger1 = moveguarded > 0
trigger1 = random <= 500
value = 1000

[State 240, 3]
type = ChangeState
trigger1 = var(55) = 1
trigger1 = time = 21
trigger1 = movecontact > 0
value = 520

[State 210, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[Statedef 219] ;helper
type    = A
movetype= A
physics = N
anim = 219

[State 5050, 6]
type = nothitby
trigger1 = 1
value = SCA

[State 5050, 6]
type = turn
trigger1 = parent,facing != facing

[State 5050, 6]
type = playerpush
trigger1 = 1
value = 1

[State 5050, 6]
type = width
trigger1 = 1
value = 10

[State 5050, 6]
type = posadd
trigger1 = facing = 1
x = -(pos x - parent,pos x) 

[State 5050, 6]
type = posadd
trigger1 = facing = -1
x = pos x - parent,pos x 

[State 5050, 6]
type = destroyself
trigger1 = parent, stateno != 215 && parent, stateno != 216 && parent, stateno != 217 && parent, stateno != 218
trigger2 = (parent, stateno = 215 || parent, stateno = 216 || parent, stateno = 217 || parent, stateno = 218) && parent, animelem = 3

; Guard Crush
[Statedef 9001]
type    = S
physics = N
movetype = H
anim = 9002
velset = 0,0
ctrl = 0

[State 9001, 1]
type = playsnd
trigger1 = Time = 0
value = s27,5

[State 9001, 1]
type = Explod
trigger1 = Time = 0
trigger1 = var(57) = 1
anim = 9003
pos = -106,190
postype = right
ignorehitpause = 1
bindtime = -1
ontop = 1
ownpal = 1

[State 9001, 1]
type = Explod
trigger1 = Time = 0
trigger1 = var(57) = 2
anim = 9003
pos = 0,190
postype = left
ignorehitpause = 1
bindtime = -1
ontop = 1
ownpal = 1

[State 236, 1]
type = Varset
trigger1 = time = 0
trigger2 = anim = 9001 && animtime = 0
var(18) = 0

[State 236, 1]
type = Varadd
trigger1 = hitshakeover
var(18) = 1

[State 9001, 1]
type = Varset
trigger1 = time = 0
var(28) = 0

[State 9001, 2]
type = Pause
trigger1 = Time = 0
time = 2

[State 9001, 3]
type = Envcolor
trigger1 = Time = 0
value = 255,255,255
time = 1
under = 1

[State 9001, 5]
type = changeanim
trigger1 = var(18) = 5
trigger1 = anim = 9002
value = 9001

[State 151, 1]
type = HitVelSet
trigger1 = var(18) = 5
x = 2

[State 151, 1]
type = VelSet
trigger1 = var(18) = 5
trigger1 = vel x = 0
x = -4

[State 151, 1]
type = Velmul
trigger1 = var(18) > 4
x = 0.87

[State 9001, 6]
type = ChangeState
trigger1 = AnimTime = 0
trigger1 = anim = 9001
value = 0
ctrl = 1
;-----------------------------------
;KnockDown
[Statedef 11000]
type    = S
movetype= A
physics = N
juggle  = 9
ctrl = 0
anim = 11000
facep2 = 1
velset = 0,0

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 2
value = s3,0

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && (time < 9 || time >= 15)
value = ,AA,AP

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time >= 9 && time < 15
value = SCA

[State 230, 0]
type = varset
trigger1 = animelem = 3,3
var(38) = 0

[State 210, 5]
type = velset
trigger1 = AnimElem = 3
x = 6.5

[State 210, 5]
type = veladd
trigger1 = AnimElem = 3, >= 0
trigger1 = AnimElem = 4, < 0
x = -1

[State 210, 5]
type = posadd
trigger1 = AnimElem = 8
x = 2

[State 210, 5]
type = hitby
triggerall = var(16) < 1 || var(38) = 0
trigger1 = animelem = 2, >= 0
trigger1 = animelem = 3, < 0
value = SCA,AT

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 1,6
trigger1 = Random < 900
value = s22,0
channel = 1

[State 210, 5]
type = velset
trigger1 = AnimElem = 4
x = 0

[State 210, 5]
type = HitDef
trigger1 = AnimElem = 3
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = S, NA
damage   = 110
animtype = heavy
guardflag = MA
pausetime = 12,12
sparkno = s10005
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57
hitsound   = s5,4
guardsound = s27,3
getpower = 83,83
givepower = 21,21
priority = 4,HIT
ground.type = low
ground.slidetime = 30
ground.hittime = 30
guard.slidetime = 30-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,14,0)
guard.hittime  = 30-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,14,0)
guard.velocity = -16
ground.cornerpush.veloff = -10
air.cornerpush.veloff = -10
guard.cornerpush.veloff = -25
ground.velocity = -5,-7
air.velocity = -5,-7 
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 36
palfx.time = 1
palfx.add = 0,0,0

[State 210, 5]
type = HitDef
triggerall = AnimElem = 3
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = S, SA
damage   = 110
animtype = dup
guardflag = MA
pausetime = 12,12
sparkno = s10006
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57
hitsound   = s5,4
guardsound = s27,3
priority = 4,HIT
getpower = 83,83
givepower = 21,21
ground.type = low
ground.slidetime = 32
ground.hittime = 32
guard.slidetime = 32-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,15,0)
guard.hittime  = 32-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,15,0)
guard.velocity = -16
ground.cornerpush.veloff = -10
air.cornerpush.veloff = -10
guard.cornerpush.veloff = -25
ground.velocity = -5.6,-7
air.velocity = -5.6,-7 
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 36
palfx.time = 1
palfx.add = 0,0,0

[State 210, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;----------------------------------------
;KnockDown  (during guard)
[Statedef 11001]
type    = S
movetype= A
physics = N
juggle  = 9
ctrl = 0
anim = 11001
facep2 = 1
velset = 0,0

[State 210, 5]
type = velset
trigger1 = AnimElem = 3
x = 6.5

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 2
value = s3,0

[State 210, 5]
type = veladd
trigger1 = AnimElem = 3, >= 0
trigger1 = AnimElem = 4, < 0
x = -1

[State 210, 5]
type = posadd
trigger1 = AnimElem = 8
x = 2

[State 210, 5]
type = nothitby
trigger1 = time < 29
value = SCA

[State 230, 2]
type = PlaySnd
trigger1 = Time = 0
trigger1 = Random < 900
value = s22,0
channel = 1

[State 210, 5]
type = velset
trigger1 = AnimElem = 4
x = 0

[State 210, 5]
type = HitDef
trigger1 = AnimElem = 1
attr = S, SA
damage   = 50
animtype = heavy
guardflag = MA
pausetime = 12,12
sparkno = s10005
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57
hitsound   = s5,4
priority = 5,hit
guardsound = s27,3
ground.type = low
air.type = low
getpower = 0,0
givepower = 21,21
ground.slidetime = 31
ground.hittime = 31
guard.slidetime = 31-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,15,0)
guard.hittime  = 31-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,15,0)
guard.velocity = -16
ground.cornerpush.veloff = -10
air.cornerpush.veloff = -10
guard.cornerpush.veloff = -25
ground.velocity = -5,-7
air.velocity = -5,-7 
fall = 1
yaccel = .5 
fall.recover = 1
fall.recovertime = 36

[State 210, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;--------------------------------------
;STAND_C
[Statedef 220]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 220

[State 1405, 0]
type = varrandom
trigger1 = time = 0
v = 4
range = 2

[State 1405, 0]
type = varrandom
trigger1 = time = 0
v = 5
range = 1

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && (time < 10 || time >= 18)
value = ,AA,AP

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time >= 10 && time < 18
value = SCA

[State 230, 0]
type = varset
trigger1 = animelem = 6,1
var(38) = 0

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 4
value = s27,0

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 3
value = s3,6
channel = 1

[State 220, 2]
type = HitDef
trigger1 = AnimElem = 5 && var(5) = 0
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = S, NA
damage   = 96
animtype = Hard
guardflag = MA
pausetime = 12,12
sparkno = s10005
getpower = 95,95
givepower = 21,21
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),8
guardsound = s27,3
ground.type = high
air.type = low
ground.slidetime = 20
ground.hittime  = 20
guard.slidetime = 26-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,12,0)
guard.hittime = 26-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,12,0)
ground.velocity = -11  
guard.cornerpush.veloff = -15
ground.cornerpush.veloff = -15
air.velocity = -3.5,-5
airguard.velocity = -3.5
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
[State 220, 2]
type = HitDef
triggerall = AnimElem = 5 && var(5) = 0
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = S, SA
damage   = 96
animtype = Hard
guardflag = MA
pausetime = 12,12
sparkno = s10006
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),8
guardsound = s27,3
getpower = 95,95
givepower = 21,21
ground.type = high
air.type = low
ground.slidetime = 22
ground.hittime  = 22
guard.slidetime = 28-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,13,0)
guard.hittime = 28-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,13,0)
ground.velocity = -11  
guard.cornerpush.veloff = -15
ground.cornerpush.veloff = -15
air.velocity = -3.5,-5
airguard.velocity = -3.5
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0

[State 220, 2]
type = HitDef
trigger1 = AnimElem = 5 && var(5) = 1
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = S, NA
damage   = 96
animtype = Hard
guardflag = MA
pausetime = 12,12
sparkno = s10005
getpower = 95,95
givepower = 21,21
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),8
guardsound = s27,3
ground.type = low
ground.slidetime = 20
ground.hittime  = 20
guard.slidetime = 26-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,12,0)
guard.hittime = 26-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,12,0)
ground.velocity = -11  
guard.cornerpush.veloff = -15
ground.cornerpush.veloff = -15
air.velocity = -3.5,-5
airguard.velocity = -3.5
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
[State 220, 2]
type = HitDef
triggerall = AnimElem = 5 && var(5) = 1
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = S, SA
damage   = 96
animtype = Hard
guardflag = MA
pausetime = 12,12
sparkno = s10006
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),8
guardsound = s27,3
getpower = 95,95
givepower = 21,21
ground.type = low
ground.slidetime = 22
ground.hittime  = 22
guard.slidetime = 28-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,13,0)
guard.hittime = 28-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,13,0)
ground.velocity = -11  
guard.cornerpush.veloff = -15
ground.cornerpush.veloff = -15
air.velocity = -3.5,-5
airguard.velocity = -3.5
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0

[State 220, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;--------------------------------------
;STAND_C (close)
[Statedef 225]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 225

[State 1405, 0]
type = varrandom
trigger1 = time = 0
v = 4
range = 2

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && (time < 3 || time >= 10)
value = ,AA,AP

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time >= 3 && time < 10
value = SCA

[State 230, 0]
type = varset
trigger1 = animelem = 5
var(38) = 0
          
[State 230, 1]
type = PlaySnd
trigger1 = animelem = 1
value = s27,0

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 1
value = s3,6
channel = 1

[State 225, 2]
type = HitDef
trigger1 = AnimElem = 4
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = S, NA
damage   = 95  
animtype = Hard
guardflag = MA
pausetime = 12,12
sparkno = s10005
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-67+ceil(p2bodydist Y/2)
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),8
guardsound = s27,3
ground.type = High
air.type = low
getpower = 95,95
givepower = 21,21
ground.slidetime = 17
ground.hittime = 17
guard.slidetime = 23-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,11,0)
guard.hittime = 23-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,11,0)
guard.velocity = -11
ground.velocity = -10 
air.velocity = -3.5,-5
airguard.velocity = -3.5
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0

[State 225, 2]
type = HitDef
triggerall = AnimElem = 4
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = S, SA
damage   = 95  
animtype = Hard
guardflag = MA
pausetime = 12,12
sparkno = s10006
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-67+ceil(p2bodydist Y/2)
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),8
guardsound = s27,3
ground.type = High
air.type = low
getpower = 95,95
givepower = 21,21
ground.slidetime = 19
ground.hittime = 19
guard.slidetime = 25-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,12,0)
guard.hittime = 25-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,12,0)
guard.velocity = -11
ground.velocity = -10 
air.velocity = -3.5,-5
airguard.velocity = -3.5
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0

[State 225, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------
;STAND_X
[Statedef 230]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 230

[State 1405, 0]
type = varrandom
trigger1 = time = 0
v = 4
range = 2

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && (time < 6 || time >= 10)
value = ,AA,AP

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time >= 6 && time < 10
value = SCA

[State 230, 0]
type = varset
trigger1 = animelem = 4,1
var(38) = 0
          
[State 230, 1]
type = PlaySnd
trigger1 = animelem = 2
value = s3,0

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 2
trigger1 = Random < 900
value = s14,0
channel = 1

[State 230, 3]
type = HitDef
trigger1 = AnimElem = 4
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = S, NA
damage   = 46
guardflag = MA
pausetime = 7,9
sparkno = s10004
guard.sparkno = s10007
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-52
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),9
guardsound = s27,3
ground.type = low
ground.slidetime = 12
ground.hittime  = 12
guard.slidetime = 12-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,5,0)
guard.hittime  = 12-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,5,0)
getpower = 56,56
givepower = 21,21
guard.velocity = -6.5
ground.velocity = -6.5
air.velocity = -3,-4
airguard.velocity = -3     
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0

[State 230, 3]
type = HitDef
triggerall = AnimElem = 4
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = S, SA
animtype = medium
damage   = 46
guardflag = MA
pausetime = 10,10
sparkno = s10005
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-52
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),9
guardsound = s27,3
ground.type = low
getpower = 56,56
givepower = 21,21
ground.slidetime = 18
ground.hittime  = 18
guard.slidetime = 18-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,8,0)
guard.hittime  = 18-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,8,0)
guard.velocity = -6.5
ground.velocity = -6.5
air.velocity = -3,-4
airguard.velocity = -3     
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0

[State 230, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;STAND_X (close)
[Statedef 202]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 202

[State 1405, 0]
type = varrandom
trigger1 = time = 0
v = 4
range = 2

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && (time < 4 || time >= 8)
value = ,AA,AP

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time >= 4 && time < 8
value = SCA

[State 230, 0]
type = varset
trigger1 = animelem = 3,1
var(38) = 0
          
[State 230, 1]
type = PlaySnd
trigger1 = animelem = 1
value = s3,0

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 1
trigger1 = Random < 900
value = s14,0
channel = 1

[State 202, 2]
type = HitDef
trigger1 = AnimElem = 3 && prevstateno != 202
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = S, NA
animtype = light
damage   = 38
guardflag = MA
pausetime = 7,9
sparkno = s10004
guard.sparkno = s10007
sparkxy = 5-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-52
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),9
guardsound = s27,3
ground.type = low
getpower = 56,56
givepower = 21,21
ground.slidetime = 11
ground.hittime  = 11
guard.slidetime = 11-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,5,0)
guard.hittime  = 11-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,5,0)
guard.velocity = -5
ground.velocity = -5
air.velocity = -3,-4
airguard.velocity = -3     
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
[State 202, 2]
type = HitDef
triggerall = AnimElem = 3 && prevstateno != 202
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = S, SA
animtype = medium
damage   = 38
guardflag = MA
pausetime = 10,10
sparkno = s10005
guard.sparkno = s10010
sparkxy = 5-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),9
guardsound = s27,3
ground.type = low
getpower = 56,56
givepower = 21,21
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 17-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,8,0)
guard.hittime  = 17-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,8,0)
guard.velocity = -5
ground.velocity = -5
air.velocity = -3,-4
airguard.velocity = -3     
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0

[State 202, 2]
type = HitDef
trigger1 = AnimElem = 3 && prevstateno = 202
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = S, NA
animtype = light
damage   = 38
guardflag = MA
pausetime = 7,9
sparkno = s10004
guard.sparkno = s10007
sparkxy = 5-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-52
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),9
guardsound = s27,3
ground.type = high
air.type = low
getpower = 56,56
givepower = 21,21
ground.slidetime = 11
ground.hittime  = 11
guard.slidetime = 11-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,5,0)
guard.hittime  = 11-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,5,0)
guard.velocity = -5
ground.velocity = -5
air.velocity = -3,-4
airguard.velocity = -3     
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
[State 202, 2]
type = HitDef
triggerall = AnimElem = 3 && prevstateno = 202
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = S, SA
animtype = medium
damage   = 38
guardflag = MA
pausetime = 10,10
sparkno = s10005
guard.sparkno = s10010
sparkxy = 5-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),9
guardsound = s27,3
ground.type = high
air.type = low
getpower = 56,56
givepower = 21,21
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 17-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,8,0)
guard.hittime  = 17-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,8,0)
guard.velocity = -5
ground.velocity = -5
air.velocity = -3,-4
airguard.velocity = -3     
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0

[State 202, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;STAND_FWD_X
[Statedef 235]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 235
sprpriority = 1

[State 1405, 0]
type = varrandom
trigger1 = time = 0
v = 4
range = 2

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && (time < 8 || time >= 12)
value = ,AA,AP

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time >= 8 && time < 12
value = SCA

[State 230, 0]
type = varset
trigger1 = animelem = 5,1 && var(18) = 0
var(38) = 0
          
[State 230, 0]
type = varset
trigger1 = animelem = 5, >= 2 && var(18) = 1
var(38) = 1
          
[State 230, 0]
type = varset
trigger1 = animelem = 5, >= 2 && var(18) = 0
var(38) = 0
          
[State 1000, 1]
type = varset
trigger1 = animelem = 1
var(34) = 1

[State 1000, 1]
type = varset
trigger1 = animelem = 6
var(34) = 0

[State 236, 1]
type = Varset
trigger1 = animelem = 1 || animtime = 0
var(18) = 0

[state 215, 1]
type = posAdd
trigger1 = animelem = 1
x = 2

[State 325, 7]
type = PosAdd
trigger1 = AnimTime = 0
x = -2

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 3
value = s3,0

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 3
value = s14,0
channel = 1

[State 325, 5]
type = HitDef
trigger1 = animelem = 5
attr = S, NA
damage   = 45
animtype = hard
guardflag = MA
pausetime = 11,11
postype = p2
sparkno = s(ifelse(var(14)<1&&var(16)<1,10116,9999))
guard.sparkno = s10010
sparkxy = 8-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-30
hitsound   = s(ifelse(var(4)=0,1,ifelse(var(4)=1,4,5))),(ifelse(var(4)=0,9,ifelse(var(4)=1,7,6)))
guardsound = s27,3
getpower = 56,56
givepower = 21,21
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
guard.slidetime = 19-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,9,0)
guard.hittime  = 19-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,9,0)
ground.cornerpush.veloff = -14
air.cornerpush.veloff = -14
guard.cornerpush.veloff = -14
guard.velocity = -10
ground.velocity = -10  
air.velocity = -3.5,-4.8  
airguard.velocity = -3.5
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0

[State 325, 8]
type = Varset
trigger1 = var(55) = 0
trigger1 = command = "holdfwd"
trigger1 = command = "x"
trigger1 = animtime >= -29
trigger2 = animtime <= -19
trigger2 = var(55) = 1
trigger2 = var(14) < 1
trigger2 = movecontact > 0
trigger2 = p2bodydist X <= 18
var(18) = 1

[State 325, 9]
type = ChangeState
triggerall = numprojID(7000) = 0
triggerall = animtime <= -19
trigger1 = var(55) = 1
trigger1 = var(14) > 0
trigger1 = p2bodydist X <= 35
trigger1 = movehit > 0
value = 1020

[State 325, 9]
type = ChangeState
triggerall = var(18) = 1
trigger1 = animtime = -19 && movecontact = 0
trigger2 = animtime <= -19 && movecontact > 0
value = 236

[State 325, 9]
type = ChangeState
triggerall = var(58) > 2 || var(58) < 1
triggerall = animtime <= -19
triggerall = movehit > 0
triggerall = var(55) = 1
triggerall = power >= 2000 + var(20)*100
triggerall = var(14) < 1 && var(3) < 1
triggerall = var(16) < 1
triggerall = p2bodydist Y >= -30
trigger1 = power >= 2000 + var(20)*100
trigger1 = p2life >= 450
trigger1 = random <= 200
trigger2 = power >= 3000 + var(20)*100
trigger2 = p2life >= 450
trigger2 = random <= 800
trigger3 = p2life - life >= 100
trigger3 = p2life >= 450
trigger3 = random <= 900
value = 2500

[State 325, 9]
type = ChangeState
triggerall = var(58) > 2 || var(58) < 1
triggerall = animtime <= -19
triggerall = movehit > 0
triggerall = var(55) = 1
triggerall = var(14) < 1
triggerall = var(16) < 1
triggerall = p2bodydist X > 10
triggerall = p2bodydist Y >= -30
triggerall = power >= 1000 + var(20)*100 || var(3) > 0
trigger1 = power >= 1200 + var(20)*100 || (var(3) > 0 && power >= 200 + var(20)*100 && var(3) < 256)
trigger1 = p2life >= 180
trigger1 = random <= 200-ifelse(var(3)>256,100,0)
trigger2 = power >= 3000 + var(20)*100 || (var(3) > 0 && power >= 2000 + var(20)*100 && var(3) < 256)
trigger2 = p2life >= 180
trigger2 = random <= 800-ifelse(var(3)>256,400,0)
trigger3 = p2life - life >= 100
trigger3 = p2life >= 180
trigger3 = random <= 900-ifelse(var(3)>256,450,0)
value = 2000

[State 325, 9]
type = ChangeState
triggerall = var(58) > 2 || var(58) < 1
triggerall = animtime <= -19
triggerall = moveguarded > 0
triggerall = var(55) = 1
trigger1 = random <= 80
value = 299

[State 325, 9]
type = ChangeState
trigger1 = var(55) = 1
trigger1 = animtime <= -19
trigger1 = p2statetype != L   
trigger1 = p2stateno != 5050
trigger1 = moveguarded > 0
trigger1 = p2bodydist X > 15
trigger1 = random <= 200
value = 4333

[State 325, 9]
type = ChangeState
triggerall = animtime <= -19
trigger1 = var(55) = 1
trigger1 = var(14) < 1
trigger1 = movecontact > 0
trigger1 = p2bodydist X > 15
trigger1 = p2bodydist X <= 20
value = 510

[State 325, 9]
type = ChangeState
triggerall = animtime <= -19
trigger1 = var(55) = 1
trigger1 = var(14) < 1
trigger1 = movecontact > 0
trigger1 = p2bodydist X > 20
value = 520

[State 325, 10]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

; Standing X2
[Statedef 236]
type = S
physics = S
movetype = A
ctrl = 0
juggle = 8
anim = 236

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && (time < 9 || time >= 13)
value = ,AA,AP

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time >= 9 && time < 13
value = SCA

[State 230, 0]
type = varset
trigger1 = animelem = 5,1
var(38) = 0
          
[State 1000, 1]
type = varset
trigger1 = animelem = 1
var(34) = 1

[State 1000, 1]
type = varset
trigger1 = animelem = 6
var(34) = 0

[State 325,8]
type = Posadd
trigger1 = AnimElem = 3
x = 12

[State 325,8]
type = Posadd
trigger1 = AnimElem = 4
x = 13

[State 325,8]
type = Posadd
trigger1 = AnimElem = 5
x = 8

[State 325,8]
type = Posadd
trigger1 = AnimElem = 7
x = 3

[State 325,8]
type = Varset
trigger1 = animelem = 1
var(15) = 0

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 4
value = s3,0

[State 209, 3]
type = HitDef
trigger1 = AnimElem = 5
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = S, NA
animtype = hard
damage = 70
guardflag = MA
pausetime = 11,11
sparkno = s10005
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57
hitsound = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),2
getpower = 56,56
givepower = 21,21
guardsound = s27,3
ground.type = High
ground.slidetime = 16
ground.hittime = 16
guard.slidetime = 19-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,9,0)
guard.hittime  = 19-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,9,0)
ground.cornerpush.veloff = -18
air.cornerpush.veloff = -18
guard.cornerpush.veloff = -18
guard.velocity = -12
ground.velocity = -12
air.velocity = -3.5,-5
airguard.velocity = -1.5     
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0

[State 209, 3]
type = HitDef
triggerall = AnimElem = 5
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = S, SA
animtype = hard
damage = 63
guardflag = MA
pausetime = 10,10
sparkno = s10006
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57
hitsound = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),2
getpower = 56,56
givepower = 21,21
guardsound = s27,3
ground.type = High
ground.slidetime = 18
ground.hittime = 18
guard.slidetime = 21-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,10,0)
guard.hittime  = 21-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,10,0)
ground.cornerpush.veloff = -18
air.cornerpush.veloff = -18
guard.cornerpush.veloff = -18
guard.velocity = -12
ground.velocity = -12
air.velocity = -3.5,-5
airguard.velocity = -1.5     
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0

[State 209, 4]
type = ChangeState
triggerall = var(58) > 2 || var(58) < 1
triggerall = movehit > 0
triggerall = var(55) = 1
triggerall = power >= 2000 + var(20)*100
triggerall = var(14) < 1 && var(3) < 1
triggerall = var(16) < 1
triggerall = p2bodydist Y >= -30
trigger1 = power >= 2000 + var(20)*100
trigger1 = p2life >= 450
trigger1 = random <= 200
trigger2 = power >= 3000 + var(20)*100
trigger2 = p2life >= 450
trigger2 = random <= 800
trigger3 = p2life - life >= 100
trigger3 = p2life >= 450
trigger3 = random <= 900
value = 2500

[State 209, 4]
type = ChangeState
triggerall = var(58) > 2 || var(58) < 1
triggerall = movehit > 0
triggerall = var(55) = 1
triggerall = var(14) < 1
triggerall = power >= 1000 + var(20)*100 || var(3) > 0
triggerall = var(16) < 1
triggerall = p2bodydist Y >= -30
triggerall = p2bodydist X > 10
trigger1 = power >= 1200 + var(20)*100 || (var(3) > 0 && power >= 200 + var(20)*100 && var(3) < 256)
trigger1 = p2life >= 180
trigger1 = random <= 200-ifelse(var(3)>256,100,0)
trigger2 = power >= 3000 + var(20)*100 || (var(3) > 0 && power >= 2000 + var(20)*100 && var(3) < 256)
trigger2 = p2life >= 180
trigger2 = random <= 800-ifelse(var(3)>256,400,0)
trigger3 = p2life - life >= 100
trigger3 = p2life >= 180
trigger3 = random <= 900-ifelse(var(3)>256,450,0)
value = 2000

[State 209, 4]
type = ChangeState
triggerall = var(58) > 2 || var(58) < 1
triggerall = moveguarded > 0
triggerall = var(55) = 1
trigger1 = random <= 80
value = 299

[State 209, 4]
type = ChangeState
trigger1 = var(55) = 1
trigger1 = p2statetype != L   
trigger1 = p2stateno != 5050
trigger1 = moveguarded > 0
trigger1 = random <= 100
value = 4333

[State 209, 4]
type = ChangeState
triggerall = numprojID(7000) = 0
trigger1 = var(55) = 1
trigger1 = moveguarded > 0
trigger1 = random <= 100
value = 1000

[State 209, 4]
type = ChangeState
trigger1 = var(55) = 1
trigger1 = movecontact > 0
value = 520

[State 209, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[Statedef 8333]
type    = A
movetype= I
physics = N
ctrl = 0
velset = 0,0

[State 111,1]
type = AssertSpecial 
trigger1 = 1
flag = invisible

[State 111, 1]
type = Turn
trigger1 = facing != parent, facing

[State 5210, 1] 
type = changeanim
trigger1 = parent,movetype != H
value = parent,anim
elem = Parent,AnimElemNo(0)

[State 5210, 1] 
type = bindtoparent
trigger1 = 1
pos = 0,0

[State 1000, 4]
type = playerpush
trigger1 = 1
value = 0

[State 1000, 4]
type = nothitby
trigger1 = parent,stateno != 1030 || parent,time >= 6
trigger1 = parent,stateno != 1040 || parent,time >= 6
trigger1 = (parent,stateno != 3200 && parent,stateno != 3201) || (parent,time > 10 && parent,time != 12)
trigger1 = parent,stateno != 13000 && parent,movetype != H && parent,statetype != L
trigger1 = parent,stateno != 120 && parent,stateno != 130 && parent,stateno != 131
trigger1 = parent,stateno != 132 && parent,stateno != 150 && parent,stateno != 151
trigger1 = parent,stateno != 152 && parent,stateno != 153 && parent,stateno != 154
trigger1 = parent,stateno != 155 && parent,stateno != 150 && parent,stateno != 151
trigger1 = parent,stateno != 5200 && parent,stateno != 5201 && parent,stateno != 140
trigger1 = time > 0
trigger1 = parent,stateno != 0 && parent,stateno != 20 && parent,stateno != 10
trigger1 = parent,stateno != 11 && parent,stateno != 12 && parent,stateno != 50
trigger1 = parent,stateno != 2041 && parent,stateno != 40 && parent,stateno != 52
trigger1 = parent,stateno != 3500 && parent,stateno != 3510 && parent,stateno != 3601
trigger1 = parent,stateno != 3600
trigger1 = parent,stateno != 299 && parent,stateno != 305 && parent,stateno != 1307
trigger1 = parent,stateno != 300 || parent,time > 3
trigger1 = parent,stateno != 1400 && parent,stateno != 1500 && parent,stateno != 307
trigger1 = (parent,stateno != 2999 && parent,stateno != 3000) || parent,time != 1
value = ,AT
ignorehitpause = 1

[state 210, 0]
type = NotHitBy
trigger1 = parent,stateno = 1030 && parent,time < 6
trigger2 = parent,stateno = 1040 && parent,time < 6
trigger3 = parent,stateno = 3200 && parent,time < 11
trigger4 = parent,stateno = 3201 && parent,time < 11
trigger5 = parent,stateno = 13000 || parent,movetype = H || parent,statetype = L
trigger6 = parent,stateno = 120 || parent,stateno = 130 || parent,stateno = 131
trigger7 = parent,stateno = 132 || parent,stateno = 150 || parent,stateno = 151
trigger8 = parent,stateno = 152 || parent,stateno = 153 || parent,stateno = 154
trigger9 = parent,stateno = 155 || parent,stateno = 150 || parent,stateno = 151
trigger10 = parent,stateno = 5200 || parent,stateno = 5201 || parent,stateno = 140
trigger11 = time < 1
trigger12 = parent,stateno = 0 || parent,stateno = 20 || parent,stateno = 10
trigger13 = parent,stateno = 11 || parent,stateno = 12 || parent,stateno = 50
trigger14 = parent,stateno = 2041 || parent,stateno = 40 || parent,stateno = 52
trigger15 = parent,stateno = 3500 || parent,stateno = 3510 || parent,stateno = 3601
trigger16 = parent,stateno = 299 || parent,stateno = 305 || parent,stateno = 1307
trigger17 = parent,stateno = 3600
trigger18 = parent,stateno = 300 && parent,time < 4
trigger19 = parent,stateno = 1400 || parent,stateno = 1500 || parent,stateno = 307
trigger20 = (parent,stateno = 3200 || parent,stateno = 3201) && parent,time = 12
trigger21 = (parent,stateno = 2999 || parent,stateno = 3000) && parent,time = 1
value = SCA
ignorehitpause = 1

[state 210, 0]
type = NotHitBy
trigger1 = parent,stateno = 5120
trigger1 = parent,animtime = 0
value2 = SCA
time = 4
ignorehitpause = 1

[state 210, 0]
type = NotHitBy
trigger1 = parent,stateno = 5201
trigger1 = parent,animtime = 0
value2 = SCA
time = 2
ignorehitpause = 1

[state 210, 0]
type = HitBy
trigger1 = parent,stateno = 1030 && parent,time >= 6 && parent,time <= 7
trigger2 = parent,stateno = 1038
value2 = SCA,SA,HA,AP
ignorehitpause = 1

[state 1040, 1]
type = NotHitBy
trigger1 = parent,stateno = 1040
trigger1 = parent,time >= 6 && parent,time <= 7
trigger1 = parent,movecontact = 0
trigger2 = parent,stateno = 1037
trigger2 = parent,movecontact = 0
value2 = SCA
ignorehitpause = 1

[state 210, 0]
type = HitBy
trigger1 = parent,stateno = 1040
trigger1 = parent,time >= 6 && parent,time <= 7
trigger1 = parent,movecontact > 0
trigger2 = parent,stateno = 1037
trigger2 = parent,movecontact > 0
value2 = SCA,SA,HA,AP
ignorehitpause = 1

[state 210, 0]
type = notHitBy
trigger1 = parent,stateno = 1305
trigger2 = parent,stateno = 1300 || parent,stateno = 1301
trigger2 = parent,time >= 0 && parent,time <= 25
trigger3 = parent,animelem = 2, >= 0 && parent,animelem = 3, < 0
trigger3 = parent,stateno = 11000
trigger4 = parent,animelem = 4, >= 0 && parent,animelem = 5, < 0
trigger4 = parent,stateno = 650
trigger5 = parent,stateno = 651 && parent,animtime < -22
value2 = SCA
ignorehitpause = 1

[State 9401, 6]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
stateno = 8333
ignorehitpause = 1

[State 9401, 6]
type = parentvarset
trigger1 = time = 0 && (prevstateno = 5020 || prevstateno = 5070)
var(39) = 8

[State 9401, 6]
type = parentvarset
trigger1 = time = 0 && (prevstateno = 5020 || prevstateno = 5070) && parent,movetype = A
var(40) = 2

[State 1300, 5]
type = explod
trigger1 = parent,var(16) < 1
trigger1 = parent,var(57) = 1
anim = 817
pos = 4,35
postype = left
ignorehitpause = 1
persistent = 0
bindtime = -1
supermove = 1
sprpriority = -3
ownpal = 1

[State 1300, 5]
type = explod
trigger1 = parent,var(16) < 1
trigger1 = parent,var(57) = 2
anim = 818
pos = -5,35
postype = right
ignorehitpause = 1
sprpriority = -3
persistent = 0
supermove = 1
bindtime = -1
ownpal = 1

[State 5210, 1]
type = destroyself
trigger1 = parent,var(16) < 1
trigger1 = time > 0
;-------------------------------------
;STAND_Y
[Statedef 240]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 240
facep2 = 1
sprpriority = 1

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && (time < 8 || time >= 11)
value = ,AA,AP

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time >= 8 && time < 11
value = SCA

[State 230, 0]
type = varset
trigger1 = animelem = 5
var(38) = 0

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 4
value = s3,0

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 4
value = s3,6
channel = 1

[State 240, 2]
type = HitDef
trigger1 = AnimElem = 5
attr = S, NA
damage   = 83
animtype = hard
guardflag = MA
pausetime = 12,12
sparkno = s(ifelse(var(14)<1&&var(16)<1,10116,9999))
guard.sparkno = s10010
sparkxy = 8-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-30
hitsound   = s3,4
guardsound = s27,3
ground.type = low
getpower = 95,95
givepower = 21,21
ground.cornerpush.veloff = -15
air.cornerpush.veloff = -15
guard.cornerpush.veloff = -15
ground.slidetime = 15
ground.hittime  = 15
guard.slidetime = 21-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,10,0)
guard.hittime  = 21-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,10,0)
guard.velocity = -11
ground.velocity = -11  
air.velocity = -3.5,-5 
airguard.velocity = -3     
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0

[State 3000]
type = projectile
trigger1 = movehit > 0 && p2movetype = H
projanim = 10003
postype = p2
offset = 3, -35
projremovetime = 14
projsprpriority = 2
ignorehitpause = 1
persistent = 0
projedgebound = 210

[State 230, 0]
type = varrandom
trigger1 = animelem = 4
v = 5
range = 3

[State 1300, 5]
type = projectile
trigger1 = movehit > 0 && p2movetype = H && hitpausetime = 9-var(5) && random < 500
projanim = 10117+ifelse(random<500,1,0)
postype = p2
offset = -8,-50
velocity = 1,-8
ignorehitpause = 1
projsprpriority = 2
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = movehit > 0 && p2movetype = H && hitpausetime = 9-var(5) && random < 500
projanim = 10117+ifelse(random<500,1,0)
postype = p2
offset = -8,-50
velocity = 2,-7.5
ignorehitpause = 1
projsprpriority = 2
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = movehit > 0 && p2movetype = H && hitpausetime = 9-var(5) && random < 500
projanim = 10117+ifelse(random<500,1,0)
postype = p2
offset = -8,-50
velocity = 3,-7
ignorehitpause = 1
projsprpriority = 2
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = movehit > 0 && p2movetype = H && hitpausetime = 9-var(5) && random < 500
projanim = 10117+ifelse(random<500,1,0)
postype = p2
offset = -8,-50
velocity = 4,-6.5
ignorehitpause = 1
projsprpriority = 2
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = movehit > 0 && p2movetype = H && hitpausetime = 9-var(5) && random < 500
projanim = 10117+ifelse(random<500,1,0)
postype = p2
offset = -8,-50
velocity = 5,-6
ignorehitpause = 1
projsprpriority = 2
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = movehit > 0 && p2movetype = H && hitpausetime = 9-var(5) && random < 500
projanim = 10117+ifelse(random<500,1,0)
postype = p2
offset = -8,-50
velocity = 6,-5
ignorehitpause = 1
projsprpriority = 2
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = movehit > 0 && p2movetype = H && hitpausetime = 9-var(5) && random < 500
projanim = 10117+ifelse(random<500,1,0)
postype = p2
offset = -8,-50
velocity = 7,-4
ignorehitpause = 1
projsprpriority = 2
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = movehit > 0 && p2movetype = H && hitpausetime = 9-var(5) && random < 500
projanim = 10117+ifelse(random<500,1,0)
postype = p2
offset = -8,-50
velocity = 8,-3
ignorehitpause = 1
projsprpriority = 2
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = movehit > 0 && p2movetype = H && hitpausetime = 9-var(5) && random < 500
projanim = 10117+ifelse(random<500,1,0)
postype = p2
offset = -8,-50
velocity = 8,-1.5
ignorehitpause = 1
projsprpriority = 2
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = movehit > 0 && p2movetype = H && hitpausetime = 9-var(5) && random < 500
projanim = 10117+ifelse(random<500,1,0)
postype = p2
offset = -8,-50
velocity = 8.5,-1
ignorehitpause = 1
projsprpriority = 2
projremovetime = 6
projedgebound = 210

[State 240, 3]
type = ChangeState
triggerall = var(55) = 1
triggerall = movehit > 0
triggerall = animtime <= -19
triggerall = numprojID(7000) = 0
trigger1 = p2bodydist X <= 35
trigger1 = random <= 999
trigger1 = var(14) > 0
trigger2 = var(58) = 1 && random < 100
value = 1020

[State 240, 3]
type = ChangeState
triggerall = var(58) > 2 || var(58) < 1
triggerall = moveguarded > 0
triggerall = animtime <= -19
triggerall = var(55) = 1
trigger1 = random <= 80
value = 299

[State 240, 3]
type = ChangeState
triggerall = var(58) > 2 || var(58) < 1
triggerall = animtime <= -19
triggerall = movehit > 0
triggerall = var(55) = 1
triggerall = power >= 2000 + var(20)*100
triggerall = var(14) < 1 && var(3) < 1
triggerall = p2bodydist Y >= -30
triggerall = var(16) < 1
trigger1 = power >= 2000 + var(20)*100
trigger1 = p2life >= 450
trigger1 = random <= 200
trigger2 = power >= 3000 + var(20)*100
trigger2 = p2life >= 450
trigger2 = random <= 800
trigger3 = p2life - life >= 100
trigger3 = p2life >= 450
trigger3 = random <= 900
value = 2500

[State 240, 3]
type = ChangeState
triggerall = var(58) > 2 || var(58) < 1
triggerall = animtime <= -19
triggerall = movehit > 0
triggerall = var(55) = 1
triggerall = var(14) < 1
triggerall = power >= 1000 + var(20)*100 || var(3) > 0
triggerall = p2bodydist Y >= -30
triggerall = var(16) < 1
trigger1 = power >= 1200 + var(20)*100 || (var(3) > 0 && power >= 200 + var(20)*100 && var(3) < 256)
trigger1 = p2life >= 180
trigger1 = random <= 200-ifelse(var(3)>256,100,0)
trigger2 = power >= 3000 + var(20)*100 || (var(3) > 0 && power >= 2000 + var(20)*100 && var(3) < 256)
trigger2 = p2life >= 180
trigger2 = random <= 800-ifelse(var(3)>256,400,0)
trigger3 = p2life - life >= 100
trigger3 = p2life >= 180
trigger3 = random <= 900-ifelse(var(3)>256,450,0)
value = 2000

[State 240, 4]
type = ChangeState
trigger1 = var(58) > 2 || var(58) < 1
trigger1 = var(55) = 1
trigger1 = animtime = -19
trigger1 = movecontact = 0
trigger1 = p2bodydist X > -50 && p2bodydist X < 51
trigger1 = p2movetype = A
trigger1 = random <= 450
value = 1030

[State 240, 4]
type = ChangeState
trigger1 = var(58) > 2 || var(58) < 1
trigger1 = var(55) = 1
trigger1 = p2bodydist X > -50 && p2bodydist X < 51
trigger1 = animtime = -19
trigger1 = movecontact = 0
trigger1 = p2movetype = A
trigger1 = random <= 450
value = 1040

[State 240, 4]
type = ChangeState
triggerall = var(58) > 1 || var(58) < 1
triggerall = var(55) = 1
triggerall = animtime = -19
triggerall = p2statetype != L   
triggerall = p2stateno != 5050
trigger1 = movecontact > 0
trigger1 = random <= 300
trigger2 = movecontact = 0
trigger2 = p2bodydist X < 0
trigger2 = random <= 900
value = 4333

[State 240, 3]
type = ChangeState
triggerall = var(58) > 1 || var(58) < 1
triggerall = var(55) = 1
triggerall = animtime <= -19
trigger1 = movecontact > 0
value = 520

[State 240, 3]
type = ChangeState
triggerall = var(58) > 2 || var(58) < 1
triggerall = var(55) = 1
triggerall = numprojID(7000) = 0
trigger1 = animtime = -19
trigger1 = movecontact = 0
trigger1 = random <= 300
value = 1000

[State 245, 2]
type = ChangeState
trigger1 = var(58) > 1 || var(58) < 1
trigger1 = p2name != "BigWomen"
trigger1 = p2name != "Madgear"
trigger1 = p2name != "DARK WARRIOR2"
trigger1 = p2name != "Onslaught"
trigger1 = p2name != "CADILLACS"
trigger1 = p2name != "Apocalypse"
trigger1 = var(55) = 1
trigger1 = AnimTime = 0
trigger1 = p2statetype != A
trigger1 = p2statetype != L
trigger1 = p2movetype != H
trigger1 = p2stateno != 140
trigger1 = enemynear,stateno != 130 || (enemynear,stateno = 130 && enemynear,prevstateno != 150 && enemynear,prevstateno != 152)
trigger1 = p2bodydist Y >= -5 && p2bodydist X > -36
trigger1 = p2bodydist X <= 5
trigger1 = random <= 800
value = 3000

[State 240,3]
type = ChangeState
value = 1301
triggerall = var(55) = 1
triggerall = AnimTime = 0
triggerall = P2bodydist X <= 50
triggerall = backedgedist > 100
triggerall = P2movetype = A
trigger1 = random <= 250

[State 240,3]
type = ChangeState
value = 1300
triggerall = var(55) = 1
triggerall = AnimTime = 0
triggerall = P2bodydist X <= 50 && p2bodydist X >= -50
triggerall = backedgedist <= 100
triggerall = P2movetype = A
trigger1 = random <= 250

[State 240,3]
type = ChangeState
value = 225
triggerall = var(55) = 1
triggerall = AnimTime = 0
triggerall = P2bodydist X <= 25
trigger1 = p2statetype = A
trigger1 = random <= 250

[State 240,3]
type = ChangeState
value = 220
triggerall = var(55) = 1
triggerall = AnimTime = 0
triggerall = P2bodydist X > 25
triggerall = P2bodydist X < 75
trigger1 = p2statetype != A
trigger1 = random <= 250

[State 240,3]
type = ChangeState
value = 4000
trigger1 = var(58) > 1 || var(58) < 1
trigger1 = var(55) = 1
trigger1 = AnimTime = 0
trigger1 = P2bodydist X >= 75
trigger1 = p2statetype != L
trigger1 = p2stateno != 5050
trigger1 = random <= 250

[State 240,3]
type = ChangeState
value = 4333
trigger1 = var(58) > 1 || var(58) < 1
trigger1 = p2statetype != L
trigger1 = p2stateno != 5050
trigger1 = var(55) = 1
trigger1 = AnimTime = 0
trigger1 = P2bodydist X >= 75
trigger1 = random <= 250

[State 240, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------
;STAND_Y (close)
[Statedef 245]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
facep2 = 1
anim = 200

[State 1405, 0]
type = varrandom
trigger1 = time = 0
v = 4
range = 2

[State 1405, 0]
type = varrandom
trigger1 = time = 0
v = 5
range = 1

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 0]
type = varset
trigger1 = time = 0 || animtime = 0
var(18) = 0

[State 230, 0]
type = varset
trigger1 = var(55) = 0
trigger1 = time > 0
trigger1 = command = "ucut_y"
var(18) = 1

[State 230, 0]
type = varset
trigger1 = var(55) = 0
trigger1 = time > 0
trigger1 = command = "ucut_z"
var(18) = 2

[State 230, 0]
type = varset
trigger1 = var(55) = 0
trigger1 = time > 0
trigger1 = command = "c"
trigger1 = command = "holdfwd"
trigger1 = command != "holddown" && command != "holdup"
trigger2 = var(55) = 1
trigger2 = time = 2
trigger2 = random <= 100
trigger3 = var(55) = 1
trigger3 = time = 3
trigger3 = p2statetype = C
trigger3 = random <= 800
var(18) = 3

[State 230, 0]
type = varset
trigger1 = var(55) = 0
trigger1 = time > 0
trigger1 = command = "a"
trigger1 = command = "holdfwd"
trigger1 = command != "holddown" && command != "holdup"
trigger2 = var(18) != 3
trigger2 = var(55) = 1 && var(58) > 1
trigger2 = movehit > 0
trigger2 = time = 4
trigger2 = p2statetype != A
trigger2 = var(14) < 1
trigger2 = (p2bodydist X <= 9 && random <= 400-ifelse(var(58)=1,300,0)) || (p2bodydist X > 9 && p2bodydist X <= 17 && random <= 300-ifelse(var(58)=1,225,0))
var(18) = 4

[State 230, 0]
type = ChangeState
value = 1040
trigger1 = var(18) = 1 && time <= 7 && time >= 6
trigger1 = var(55) = 0

[State 230, 0]
type = ChangeState
value = 1050
trigger1 = var(18) = 2 && time <= 7 && time >= 6
trigger1 = power >= 500 + var(20)*100
trigger1 = var(16) < 1 && var(3) < 1
trigger1 = var(55) = 0
trigger1 = var(14) < 1

[State 230, 0]
type = ChangeState
value = 216
trigger1 = var(18) = 3 && time = 7 && var(55) = 0

[State 230, 0]
type = ChangeState
value = 217
trigger1 = var(18) = 4 && time <= 7 && time >= 6

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && (time < 3 || time >= 13)
value = ,AA,AP

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time >= 3 && time < 13
value = SCA

[State 230, 0]
type = varset
trigger1 = animelem = 5,3
var(38) = 0
          
[State 230, 1]
type = PlaySnd
trigger1 = animelem = 1
value = s3,0

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 1
value = s3,6
channel = 1

[State 245, 2]
type = HitDef
trigger1 = AnimElem = 4 && var(5) = 0
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = S, NA
damage   = 81
guardflag = MA
animtype = hard
pausetime = 10,12
sparkno = s10005
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),2
guardsound = s27,3
ground.type = high
air.type = low
getpower = 95,95
givepower = 21,21
ground.slidetime = 19
ground.hittime  = 19
guard.slidetime = 28-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,13,0)
guard.hittime  = 28-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,13,0)
ground.cornerpush.veloff = -12.5
air.cornerpush.veloff = -12.5
guard.cornerpush.veloff = -12.5
guard.velocity = -10.3
ground.velocity = -10.3
air.velocity = -3.5,-4.8
airguard.velocity = -3
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
[State 245, 2]
type = HitDef
triggerall = AnimElem = 4 && var(5) = 0
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = S, SA
damage   = 81
guardflag = MA
animtype = heavy
pausetime = 10,12
sparkno = s10006
getpower = 95,95
givepower = 21,21
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),2
guardsound = s27,3
ground.type = high
air.type = low
ground.slidetime = 18
ground.hittime  = 18
guard.slidetime = 30-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,14,0)
guard.hittime  = 30-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,14,0)
ground.cornerpush.veloff = -12.5
air.cornerpush.veloff = -12.5
guard.cornerpush.veloff = -12.5
guard.velocity = -10.3
ground.velocity = -10.3
air.velocity = -3.5,-4.8
airguard.velocity = -3     
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0

[State 245, 2]
type = HitDef
trigger1 = AnimElem = 4 && var(5) = 1
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = S, NA
damage   = 81
guardflag = MA
animtype = hard
pausetime = 10,12
sparkno = s10005
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),2
guardsound = s27,3
ground.type = low
getpower = 95,95
givepower = 21,21
ground.slidetime = 19
ground.hittime  = 19
guard.slidetime = 28-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,13,0)
guard.hittime  = 28-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,13,0)
ground.cornerpush.veloff = -12.5
air.cornerpush.veloff = -12.5
guard.cornerpush.veloff = -12.5
guard.velocity = -10.3
ground.velocity = -10.3
air.velocity = -3.5,-4.8
airguard.velocity = -3     
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
[State 245, 2]
type = HitDef
triggerall = AnimElem = 4 && var(5) = 1
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = S, SA
damage   = 81
guardflag = MA
animtype = heavy
pausetime = 10,12
sparkno = s10006
getpower = 95,95
givepower = 21,21
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),2
guardsound = s27,3
ground.type = low
ground.slidetime = 18
ground.hittime  = 18
guard.slidetime = 30-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,14,0)
guard.hittime  = 30-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,14,0)
ground.cornerpush.veloff = -12.5
air.cornerpush.veloff = -12.5
guard.cornerpush.veloff = -12.5
guard.velocity = -10.3
ground.velocity = -10.3
air.velocity = -3.5,-4.8
airguard.velocity = -3     
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0

[State 245, 2]
type = HitDef
trigger1 = movecontact = 0
trigger1 = AnimElem = 5
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = S, NA
damage   = 81
guardflag = MA
animtype = heavy
pausetime = 12,12
sparkno = s10005
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-72+ceil(p2bodydist Y/2);-92
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),2
guardsound = s27,3
getpower = 95,95
givepower = 21,21
ground.type = high
air.type = low
ground.slidetime = 19
ground.hittime  = 19
guard.slidetime = 28-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,13,0)
guard.hittime  = 28-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,13,0)
ground.cornerpush.veloff = -13
air.cornerpush.veloff = -13
guard.cornerpush.veloff = -13
guard.velocity = -9
ground.velocity = -9  
air.velocity = -3.5,-4.8
airguard.velocity = -3     
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0

[State 245, 2]
type = HitDef
triggerall = movecontact = 0
triggerall = AnimElem = 5
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = S, SA
damage   = 81
guardflag = MA
animtype = heavy
pausetime = 12,12
sparkno = s10006
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-72+ceil(p2bodydist Y/2);-92
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),2
guardsound = s27,3
ground.type = high
air.type = low
ground.slidetime = 21
ground.hittime  = 21
guard.slidetime = 30-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,14,0)
guard.hittime  = 30-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,14,0)
getpower = 95,95
givepower = 21,21
ground.cornerpush.veloff = -13
air.cornerpush.veloff = -13
guard.cornerpush.veloff = -13
guard.velocity = -9
ground.velocity = -9  
air.velocity = -3.5,-4.8
airguard.velocity = -3     
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0

[State 240, 3]
type = ChangeState
trigger1 = var(58) > 2 || var(58) < 1
trigger1 = movehit > 0
trigger1 = var(55) = 1
trigger1 = var(14) < 1 && var(16) < 1
trigger1 = p2life >= 300
trigger1 = p2statetype != A
trigger1 = power >= 3000 + var(20)*100 && var(3) < 1
trigger1 = animtime <= -20 && random < 250
value = 1990

[State 240, 3]
type = ChangeState
triggerall = var(58) > 2 || var(58) < 1
triggerall = movehit > 0
triggerall = var(55) = 1
triggerall = var(14) < 1
triggerall = p2bodydist Y >= -30
triggerall = var(16) < 1
triggerall = (power >= 3000 + var(20)*100 && var(3) < 1) || (power >= 1000 + var(20)*100 && var(3) > 0)
triggerall = animtime <= -20
trigger1 = p2life >= 690
trigger1 = random <= 200
trigger2 = p2life - life >= 500
trigger2 = p2life >= 690
trigger2 = random <= 900
value = 2400

[State 245, 2]
type = ChangeState
triggerall = var(55) = 1
triggerall = movehit > 0
triggerall = animtime <= -20
triggerall = numprojID(7000) = 0
trigger1 = random <= 999
trigger1 = var(14) > 0
trigger2 = var(58) = 1 && random < 100
trigger3 = var(58) != 1 && roundstate = 3 && random < 500
value = 1020

[State 245, 2]
type = ChangeState
trigger1 = var(55) = 1
trigger1 = moveguarded > 0
trigger1 = time = 7
trigger1 = var(18) = 3
value = 216

[State 245, 2]
type = ChangeState
triggerall = var(18) != 3 || moveguarded = 0
triggerall = var(55) = 1 && var(58) > 1 && var(18) != 4
triggerall = movecontact > 0
triggerall = animtime <= -20
triggerall = p2statetype != A
triggerall = var(14) < 1
trigger1 = p2bodydist X <= 9
trigger1 = random <= 550
trigger2 = p2bodydist X > 9
trigger2 = p2bodydist X <= 13
trigger2 = random <= 500
value = 235

[State 240, 3]
type = ChangeState
triggerall = var(58) > 2 || var(58) < 1
triggerall = movehit > 0 && var(18) != 4
triggerall = var(55) = 1
triggerall = var(14) < 1 && var(3) < 1
triggerall = p2bodydist Y >= -30
triggerall = var(16) < 1
triggerall = power >= 2000 + var(20)*100
triggerall = animtime <= -20
trigger1 = p2life >= 450
trigger1 = random <= 200
trigger2 = power >= 3000 + var(20)*100
trigger2 = p2life >= 450
trigger2 = random <= 800
trigger3 = p2life - life >= 200
trigger3 = p2life >= 450
trigger3 = random <= 800
value = 2500

[State 240, 3]
type = ChangeState
triggerall = var(58) > 2 || var(58) < 1
triggerall = power >= 1000 + var(20)*100 || var(3) > 0
triggerall = var(55) = 1 && var(18) != 4
triggerall = var(14) < 1
triggerall = var(16) < 1
triggerall = movehit > 0
triggerall = animtime <= -20
triggerall = p2bodydist Y >= -5
triggerall = p2bodydist X <= 19 && p2bodydist X > -5
trigger1 = power >= 1200 + var(20)*100 || (var(3) > 0 && power >= 200 + var(20)*100 && var(3) < 256)
trigger1 = p2life >= 180
trigger1 = random <= 200
trigger2 = power >= 3000 + var(20)*100 || (var(3) > 0 && power >= 2000 + var(20)*100 && var(3) < 256)
trigger2 = p2life >= 180
trigger2 = random <= 800
trigger3 = power >= 1000 + var(20)*100 || var(3) > 0
trigger3 = p2life - life >= 200
trigger3 = p2life >= 180
trigger3 = random <= 800
value = 2600

[State 240, 3]
type = ChangeState
triggerall = var(58) > 2 || var(58) < 1
triggerall = movehit > 0 && var(18) != 4
triggerall = var(55) = 1
triggerall = power >= 1000 + var(20)*100 || var(3) > 0
triggerall = var(14) < 1
triggerall = var(16) < 1
triggerall = p2bodydist Y >= -30
triggerall = animtime <= -20
trigger1 = power >= 1200 + var(20)*100 || (var(3) > 0 && power >= 200 + var(20)*100 && var(3) < 256)
trigger1 = p2life >= 180
trigger1 = random <= 200-ifelse(var(3)>256,100,0)
trigger2 = power >= 3000 + var(20)*100 || (var(3) > 0 && power >= 2000 + var(20)*100 && var(3) < 256)
trigger2 = p2life >= 180
trigger2 = random <= 800-ifelse(var(3)>256,400,0)
trigger3 = power >= 1000 + var(20)*100 || var(3) > 0
trigger3 = p2life - life >= 200
trigger3 = p2life >= 180
trigger3 = random <= 800-ifelse(var(3)>256,450,0)
value = 2000

[State 245, 2]
type = ChangeState
triggerall = var(18) != 3
triggerall = var(55) = 1
triggerall = moveguarded > 0
triggerall = animtime <= -20
trigger1 = random <= 800
trigger1 = var(14) < 1
trigger2 = p2statetype = A
trigger2 = p2bodydist Y > -30
trigger2 = random <= 300
value = 510

[State 245, 2]
type = ChangeState
triggerall = var(18) != 3 || moveguarded = 0
triggerall = var(55) = 1 && var(18) != 4
triggerall = movecontact > 0
triggerall = animtime <= -20
triggerall = var(58) > 1 || var(58) < 1
trigger1 = random <= 600
trigger1 = var(14) < 1
trigger2 = p2statetype = A
trigger2 = random <= 600
value = 520

[State 245, 2]
type = ChangeState
trigger1 = var(58) > 1 || var(58) < 1
trigger1 = p2statetype != L   
trigger1 = p2stateno != 5050
trigger1 = var(55) = 1 && var(18) != 4
trigger1 = movehit > 0 && random < 200
trigger1 = animtime <= -20
trigger1 = var(14) < 1
value = 4333
[State 245, 2]
type = ChangeState
trigger1 = var(58) > 1 || var(58) < 1
trigger1 = p2statetype != L   
trigger1 = p2stateno != 5050
trigger1 = var(55) = 1 && var(18) != 4
trigger1 = movehit > 0 && random < 200
trigger1 = animtime <= -20
trigger1 = var(14) < 1
value = 4733

[State 245, 2]
type = ChangeState
trigger1 = p2statetype != L   
trigger1 = p2stateno != 5050
trigger1 = var(18) != 3
trigger1 = var(55) = 1 && random < 200
trigger1 = moveguarded > 0
trigger1 = animtime <= -20
trigger1 = p2bodydist X <= 16
value = 4000

[State 245, 2]
type = ChangeState
triggerall = var(18) != 3
triggerall = var(55) = 1 && var(3) < 1
triggerall = moveguarded > 0
triggerall = animtime <= -20
triggerall = numprojID(7000) = 0
triggerall = p2bodydist X > 16
trigger1 = var(58) > 1 || var(58) < 1
trigger2 = var(58) = 1 && random < 200
value = 1000

[State 245, 2]
type = ChangeState
trigger1 = p2statetype != L
trigger1 = p2name != "BigWomen"
trigger1 = p2name != "CADILLACS"
trigger1 = p2name != "Madgear"
trigger1 = p2name != "DARK WARRIOR2"
trigger1 = p2name != "Onslaught"
trigger1 = p2name != "Apocalypse"
trigger1 = var(55) = 1
trigger1 = animtime = 0
trigger1 = p2movetype != H
trigger1 = p2stateno != 140
trigger1 = enemynear,stateno != 130 || (enemynear,stateno = 130 && enemynear,prevstateno != 150 && enemynear,prevstateno != 152)
trigger1 = p2bodydist X <= 5+ifelse(var(58)=1,20,0) && p2bodydist X > -36
trigger1 = p2bodydist Y >= -5
trigger1 = random < 900-ifelse(var(58)=1,700,0)
value = 3000+ifelse(var(58)=1,200,0)

[State 245, 2]
type = ChangeState
trigger1 = var(55) = 1
trigger1 = animtime = 0
trigger1 = p2bodydist Y < -10
trigger1 = p2bodydist X <= 30
trigger1 = random <= 200
value = 105

[State 245, 2]
type = ChangeState
trigger1 = var(55) = 1
trigger1 = p2bodydist X > -50
trigger1 = animtime = 0
trigger1 = p2bodydist Y != 0
trigger1 = p2bodydist X <= 40
trigger1 = random <= 200
value = 1030

[State 245, 2]
type = ChangeState
trigger1 = p2bodydist X > -50
trigger1 = var(58) > 1 || var(58) < 1
trigger1 = var(55) = 1
trigger1 = animtime = 0
trigger1 = p2bodydist Y != 0
trigger1 = p2bodydist X <= 40
trigger1 = random <= 200
value = 1040

[State 245, 2]
type = ChangeState
value = 1050
trigger1 = var(58) > 2 || var(58) < 1
trigger1 = var(55) = 1 && var(3) < 1
trigger1 = p2statetype != L   
trigger1 = var(16) < 1
trigger1 = var(14) < 1
trigger1 = statetype != A
trigger1 = ctrl
trigger1 = p2bodydist X > -50
trigger1 = p2bodydist X <= 40
trigger1 = p2bodydist Y >= -10
trigger1 = p2movetype = A
trigger1 = animtime = 0
trigger1 = random <= 200
trigger1 = power >= 500 + var(20)*100

[State 245, 2]
type = ChangeState
trigger1 = p2statetype != L   
trigger1 = p2stateno != 5050
trigger1 = var(55) = 1
trigger1 = animtime = 0
trigger1 = random <= 300
value = 4000

[State 245, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------
;STAND_Z
[Statedef 250]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
sprpriority = 1
anim = 250

[State 140, 1]
type = varset
trigger1 = Time = 0
var(18) = 0

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && (time < 8 || time >= 14)
value = ,AA,AP

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time >= 8 && time < 14
value = SCA

[State 230, 0]
type = varset
trigger1 = animelem = 5
var(38) = 0
          
[State 230, 1]
type = stopSnd
trigger1 = animelem = 3
channel = 1

[State 230, 1]
type = posadd
trigger1 = animelem = 1
trigger2 = animelem = 2
x = 10

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 3
value = s3,0

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 3
value = s4,9
channel = 1

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 3 && random < 500
value = s3,6
channel = 1

[State 250, 3]
type = HitDef
trigger1 = AnimElem = 4
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = S, NA
damage    = 52
animtype  = hard
guardflag = MA
pausetime = 12,12
sparkno = s10020
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57
hitsound   = s4,5
guardsound = s27,3
getpower = 95,95
givepower = 21,21
ground.type = low
ground.slidetime = 18
ground.hittime  = 18
guard.slidetime = 22-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,10,0)
guard.hittime  = 22-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,10,0)
ground.velocity = -9
guard.velocity = -9
ground.cornerpush.veloff = -12
air.cornerpush.veloff = -12
guard.cornerpush.veloff = -12
air.velocity = -3.5,-4.8
airguard.velocity = -3     
fall.recover = 1

[State 250, 3]
type = HitDef
triggerall = AnimElem = 4
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = S, SA
damage    = 52
animtype  = hard
guardflag = MA
pausetime = 12,12
sparkno = s10020
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57
hitsound   = s4,4
guardsound = s27,3
getpower = 95,95
givepower = 21,21
ground.type = low
ground.slidetime = 18
ground.hittime  = 18
guard.slidetime = 23-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,11,0)
guard.hittime  = 23-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,11,0)
ground.cornerpush.veloff = -12
air.cornerpush.veloff = -12
guard.cornerpush.veloff = -12
ground.velocity = -9
guard.velocity = -9
air.velocity = -3.5,-4.8
airguard.velocity = -3     
fall.recover = 1

[State 1000, 4]
type = Helper
trigger1 = movehit > 0
trigger1 = var(14) > 0 || var(16) > 0
name = "e"
ignorehitpause = 1
persistent = 0
pos = -10,-65
postype = p2
stateno = 10090
ownpal = 1

[State 240, 3]
type = ChangeState
triggerall = var(58) > 2 || var(58) < 1
triggerall = movehit > 0
triggerall = var(55) = 1
triggerall = var(14) < 1
triggerall = p2bodydist Y >= -30
triggerall = p2bodydist X <= 30
triggerall = var(16) < 1
triggerall = (power >= 3000 + var(20)*100 && var(3) < 1) || (power >= 1000 + var(20)*100 && var(3) > 0)
trigger1 = p2life >= 690
trigger1 = random <= 200
trigger2 = p2life - life >= 500
trigger2 = p2life >= 690
trigger2 = random <= 900
value = 2400

[State 240, 3]
type = ChangeState
trigger1 = var(55) = 1
trigger1 = movehit > 0
trigger1 = numprojID(7000) = 0
trigger1 = p2bodydist X <= 50
trigger1 = random <= 999
trigger1 = var(14) > 0
value = 1020

[State 250, 4]
type = ChangeState
trigger1 = var(58) > 2 || var(58) < 1
trigger1 = moveguarded > 0
trigger1 = var(55) = 1
trigger1 = random <= 80
value = 299

[State 250, 4]
type = ChangeState
triggerall = var(58) > 2 || var(58) < 1
triggerall = movehit > 0
triggerall = var(55) = 1
triggerall = p2bodydist Y >= -30
triggerall = power >= 2000 + var(20)*100
triggerall = var(14) < 1 && var(3) < 1
triggerall = var(16) < 1
trigger1 = power >= 2000 + var(20)*100
trigger1 = p2life >= 450
trigger1 = random <= 200
trigger2 = power >= 3000 + var(20)*100
trigger2 = p2life >= 450
trigger2 = random <= 800
trigger3 = p2life - life >= 100
trigger3 = p2life >= 450
trigger3 = random <= 900
value = 2500

[State 250, 4]
type = ChangeState
triggerall = var(58) > 2 || var(58) < 1
triggerall = movehit > 0
triggerall = var(55) = 1
triggerall = var(14) < 1 && var(3) < 1
triggerall = power >= 1500 + var(20)*100
triggerall = p2bodydist Y >= -30
triggerall = var(16) < 1
trigger1 = power < 3000 + var(20)*100
trigger1 = p2life > 310
trigger1 = random <= 200
trigger2 = power >= 3000 + var(20)*100
trigger2 = p2life > 310
trigger2 = random <= 800
trigger3 = p2life - life >= 100
trigger3 = p2life > 310
trigger3 = random <= 900
value = 1994

[State 250, 4]
type = ChangeState
triggerall = var(58) > 2 || var(58) < 1
triggerall = movehit > 0
triggerall = var(55) = 1
triggerall = var(14) < 1
triggerall = power >= 1000 + var(20)*100 || var(3) > 0
triggerall = p2bodydist Y >= -30
triggerall = var(16) < 1
trigger1 = power >= 1200 + var(20)*100 || (var(3) > 0 && power >= 200 + var(20)*100)
trigger1 = p2life >= 180
trigger1 = random <= 200
trigger2 = power >= 3000 + var(20)*100 || (var(3) > 0 && power >= 2000 + var(20)*100)
trigger2 = p2life >= 180
trigger2 = random <= 800
trigger3 = p2life - life >= 100
trigger3 = p2life >= 180
trigger3 = random <= 900
value = 2000

[State 250, 4]
type = ChangeState
trigger1 = var(55) = 1
trigger1 = p2statetype != L   
trigger1 = p2stateno != 5050
trigger1 = moveguarded > 0
trigger1 = random <= 300
value = 4333

[State 250, 4]
type = ChangeState
trigger1 = var(55) = 1
trigger1 = moveguarded > 0
value = 510

[State 250, 4]
type = ChangeState
trigger1 = var(55) = 1
trigger1 = movehit > 0
value = 520

[State 250, 4]
type = PosAdd
Trigger1 = Animelem = 8
x = -3

[State 250, 4]
type = PosAdd
Trigger1 = AnimTime = 0
x = 5

[State 250, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;----------------------------------------
[Statedef 251]
type    = S
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 251

[State 1405, 0]
type = varrandom
trigger1 = time = 0
v = 4
range = 2

[State 140, 1]
type = varset
trigger1 = Time = 0
var(18) = 0

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && (time < 11 || time >= 17)
value = ,AA,AP

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time >= 11 && time < 17
value = SCA

[State 230, 0]
type = varset
trigger1 = animelem = 6
var(38) = 0
          
[State 260, 1]
type = sprpriority
trigger1 = animelem = 2
value = 1

[State 260, 1]
type = HitBy
trigger1 = animtime < -22
value = SCA,AT

[State 230, 1]
type = posadd
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
x = 10

[State 230, 1]
type = posadd
trigger1 = animelem = 4
x = 7

[State 230, 1]
type = stopSnd
trigger1 = animelem = 4
channel = 1

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 4
value = s3,0

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 4
value = s14,0
channel = 1

[State 250, 3]
type = HitDef
trigger1 = AnimElem = 5
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = S, NA
damage    = 52
animtype  = hard
guardflag = MA
pausetime = 12,12
sparkno = s10005
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),2
guardsound = s27,3
ground.type = low
getpower = 95,95
givepower = 21,21
ground.slidetime = 15
ground.hittime  = 15
guard.slidetime = 19-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,9,0)
guard.hittime  = 19-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,9,0)
ground.velocity = -9
guard.velocity = -9
ground.cornerpush.veloff = -12
air.cornerpush.veloff = -12
guard.cornerpush.veloff = -12
air.velocity = -3.5,-4.8
airguard.velocity = -3     
fall.recover = 1

[State 250, 3]
type = HitDef
trigger1 = AnimElem = 5
trigger1 = var(14) > 0
attr = S, SA
damage    = 52
animtype  = hard
guardflag = MA
pausetime = 12,12
sparkno = s10006
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57
getpower = 95,95
givepower = 21,21
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),2
guardsound = s27,3
ground.type = low
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 21-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,10,0)
guard.hittime  = 21-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,10,0)
ground.cornerpush.veloff = -12
air.cornerpush.veloff = -12
guard.cornerpush.veloff = -12
ground.velocity = -9
guard.velocity = -9
air.velocity = -3.5,-4.8
airguard.velocity = -3     
fall.recover = 1

[State 650, 2]
type = HitDef
trigger1 = AnimElem = 5
trigger1 = var(16) > 0
attr = A, SA
damage   = 52
animtype = dup
guardflag = HA
pausetime = 12,12
sparkno = s10006
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),2
guardsound = s27,3
ground.type = high
air.type = high
priority = 5,HIT
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 17-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,8,0)
guard.hittime  = 17-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,8,0)
getpower = 0,0
givepower = 21,21
guard.velocity = -12
ground.velocity = -6.3,-7
air.velocity = -6.3,-7 
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 36

[State 240, 3]
type = ChangeState
triggerall = var(14) > 0
triggerall = var(55) = 1
triggerall = movehit > 0
triggerall = animtime <= -9
triggerall = numprojID(7000) = 0
trigger1 = p2bodydist X <= 50
trigger1 = random <= 999
value = 1020

[State 250, 4]
type = ChangeState
triggerall = var(58) > 2 || var(58) < 1
triggerall = var(14) > 0
triggerall = moveguarded > 0
triggerall = var(55) = 1
trigger1 = random <= 80
value = 299

[State 250, 4]
type = ChangeState
trigger1 = var(14) > 0
trigger1 = var(55) = 1
trigger1 = p2statetype != L   
trigger1 = p2stateno != 5050
trigger1 = moveguarded > 0
trigger1 = random <= 300
value = 4333

[State 250, 4]
type = ChangeState
triggerall = var(14) > 0
triggerall = var(55) = 1
trigger1 = moveguarded > 0
value = 510

[State 250, 4]
type = ChangeState
triggerall = var(14) > 0
triggerall = var(55) = 1
trigger1 = movehit > 0
value = 520

[State 250, 4]
type = PosAdd
Trigger1 = Animelem = 8
x = -3

[State 250, 4]
type = PosAdd
Trigger1 = AnimTime = 0
x = 7

[State 250, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------
; CROUCH_A
[Statedef 400]
type    = C
movetype= A
physics = C
juggle  = 8
ctrl = 0
velset = 0,0
anim = 400
facep2 = 1

[State 1405, 0]
type = varrandom
trigger1 = time = 0
v = 4
range = 2

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && (time < 5 || time >= 8)
value = ,AA,AP

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time >= 5 && time < 8
value = SCA

[State 230, 0]
type = varset
trigger1 = animelem = 4
var(38) = 0
          
[State 236, 1]
type = Varset
trigger1 = animelem = 1 || animtime = 0
var(18) = 0

[State 236, 1]
type = Varset
trigger1 = animelem = 1
var(5) = 0

[State 260, 7]
type = varset
trigger1 = var(55) = 0
trigger1 = animTime > -15 
trigger1 = command = "a"
trigger1 = command = "holddown"
var(18) = 1

[State 260, 7]
type = ChangeState
value = 400
trigger1 = var(55) = 0
trigger1 = movecontact = 0
trigger1 = animTime > -8
trigger1 = var(18) = 1

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 3
value = s27,0

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 1
trigger1 = Random < 900
value = s14,0
channel = 1

[State 400, 2]
type = HitDef
trigger1 = AnimElem = 4
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = C, NA
animtype = light
damage    = 30
guardflag = LA
pausetime = 7,9
sparkno = s10004
guard.sparkno = s10007
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),0
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),5
guardsound = s27,3
ground.type = Low
getpower = 56,56
givepower = 21,21
guard.velocity = -7.8
ground.slidetime = 9
ground.hittime  = 9
guard.slidetime = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,4,0)
guard.hittime  = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,4,0)
ground.velocity = -7
air.velocity = -3,-4
ground.cornerpush.veloff = -9.5
guard.cornerpush.veloff = -9
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0

[State 400, 2]
type = HitDef
triggerall = AnimElem = 4
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = C, SA
animtype = medium
damage    = 30
guardflag = LA
pausetime = 11,11
sparkno = s10005
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),0
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),5
guardsound = s27,3
getpower = 56,56
givepower = 21,21
ground.type = Low
guard.velocity = -7.8
ground.slidetime = 19
ground.hittime  = 19
guard.slidetime = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,4,0)
guard.hittime  = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,4,0)
ground.velocity = -7
air.velocity = -3,-4
ground.cornerpush.veloff = -9.5
guard.cornerpush.veloff = -9
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0

[State 400, 3]
type = varset
trigger1 = movehit > 0 && p2bodydist X < 21
trigger1 = var(55) = 1 && time > 5 && var(5) != 2
var(5) = 1
persistent = 0

[State 400, 3]
type = varset
trigger1 = movehit > 0 && p2bodydist X > 20 && p2bodydist X < 25
trigger1 = var(55) = 1 && time > 5 && var(5) != 1
var(5) = 2
persistent = 0

[State 400, 3]
type = ChangeState
value = 430
trigger1 = var(55) = 1 && time > 6 && var(5) = 1
trigger1 = var(58) > 1 || var(58) < 0

[State 400, 3]
type = ChangeState
value = 400
trigger1 = var(55) = 1 && time > 7 && var(5) = 2
trigger1 = var(58) > 1 || var(58) < 0

[State 400, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1
;---------------------------------------
;CROUCH_C
[Statedef 420]
type    = C
movetype= A
physics = S
juggle  = 8
ctrl = 0
velset = 0,0
anim = 420

[State 1405, 0]
type = varrandom
trigger1 = time = 0
v = 4
range = 2

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && (time < 5 || time >= 11)
value = ,AA,AP

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time >= 5 && time < 11
value = SCA

[State 230, 0]
type = varset
trigger1 = animelem = 3,3
var(38) = 0
          
[State 230, 1]
type = PlaySnd
trigger1 = animelem = 2
value = s27,0

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 1
value = s3,6
channel = 1

[State 420, 2]
type = HitDef
trigger1 = AnimElem = 3
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = S, NA
damage   = 110    
guardflag = LA
pausetime = 12,12
sparkno = s10005
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-40
getpower = 95,95
givepower = 21,21
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),8
guardsound = s27,3
priority = 4,hit
ground.type = Trip
ground.slidetime = 6
ground.hittime  = 25
guard.slidetime = 46-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,22,0)
guard.hittime = 46-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,22,0)
ground.velocity = -2.2,-7.5
guard.velocity = -11.5
ground.cornerpush.veloff = -12
guard.cornerpush.veloff = -18.2
air.velocity = -2.2,-7.5  
airguard.velocity = -3   
yaccel = .5
palfx.time = 1
palfx.add = 0,0,0
fall = 1

[State 420, 2]
type = HitDef
triggerall = AnimElem = 3
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = S, SA
damage   = 110     
guardflag = LA
pausetime = 12,12
sparkno = s10006
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-40
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),8
guardsound = s27,3
priority = 4,hit
ground.type = Trip
getpower = 95,95
givepower = 21,21
ground.slidetime = 8
ground.hittime  = 27
guard.slidetime = 48-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,23,0)
guard.hittime = 48-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,23,0)
ground.velocity = -2.2,-7.5
guard.velocity = -11.5
ground.cornerpush.veloff = -12
guard.cornerpush.veloff = -18.2
air.velocity = -2.2,-7.5  
airguard.velocity = -3   
yaccel = .5
palfx.time = 1
palfx.add = 0,0,0
fall = 1

[State 420, 5]
type = posadd
trigger1 = AnimElem = 10
x = 8
[State 420, 5]
type = posadd
trigger1 = AnimElem = 11
x = 9
[State 420, 5]
type = posadd
trigger1 = AnimElem = 12
x = 3

[State 420, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1
;-------------------------------------
; CROUCH_X
[Statedef 430]
number = 6
type    = C
movetype= A
physics = C
juggle  = 8
ctrl = 0
velset = 0,0
anim = 430
facep2 = 1

[State 1405, 0]
type = varrandom
trigger1 = time = 0
v = 4
range = 2

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && (time < 5 || time >= 9)
value = ,AA,AP

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time >= 5 && time < 9
value = SCA

[State 230, 0]
type = varset
trigger1 = animelem = 3,1
var(38) = 0
          
[State 230, 1]
type = PlaySnd
trigger1 = animelem = 1
value = s3,0

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 1
trigger1 = Random < 900
value = s14,0
channel = 1

[State 230, 0]
type = varset
trigger1 = time = 0 || animtime = 0
var(18) = 0

[State 230, 0]
type = varset
trigger1 = var(55) = 0
trigger1 = time > 0
trigger1 = command != "holdback"
trigger1 = command = "Fireball_x" && command != "hold_a" && command != "hold_b" && command != "hold_y"
var(18) = 1

[State 230, 0]
type = varset
trigger1 = var(55) = 0
trigger1 = time > 0
trigger1 = command != "holdback"
trigger1 = command = "Fireball_z" && command != "hold_a" && command != "hold_b" && command != "hold_y"
var(18) = 2

[State 230, 0]
type = ChangeState
value = 1000
trigger1 = var(18) = 1 && time < 10 && time > 6 && var(55) = 0

[State 230, 0]
type = ChangeState
value = 1020
trigger1 = var(18) = 2 && time < 10 && time > 6 && var(55) = 0

[State 430, 2]
type = HitDef
trigger1 = AnimElem = 3
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = S, NA
animtype = light
damage    = 38
guardflag = MA
pausetime = 7,9
sparkno = s10004
guard.sparkno = s10007
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-35
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),9
guardsound = s27,3
getpower = 56,56
givepower = 21,21
ground.type = Low
ground.slidetime = 7
ground.hittime  = 7
guard.slidetime = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,4,0)
guard.hittime  = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,4,0)
guard.velocity = -7.5
ground.velocity = -7.5
air.velocity = -3,-4
ground.cornerpush.veloff = -9
guard.cornerpush.veloff = -8.5
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0

[State 430, 2]
type = HitDef
triggerall = AnimElem = 3
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = S, SA
animtype = medium
damage    = 38
guardflag = MA
pausetime = 10,11
sparkno = s10005
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-35
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),9
guardsound = s27,3
getpower = 56,56
givepower = 21,21
ground.type = Low
ground.slidetime = 7
ground.hittime  = 7
guard.slidetime = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,4,0)
guard.hittime  = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,4,0)
guard.velocity = -7.5
ground.velocity = -7.5
air.velocity = -3,-4
ground.cornerpush.veloff = -9
guard.cornerpush.veloff = -8.5
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0

[State 400, 3]
type = changestate
triggerall = movehit > 0
triggerall = var(55) = 1 && time > 6
triggerall = var(58) > 2 || var(58) < 0
trigger1 = p2bodydist X < 29 && p2bodydist X > 20 && random < 500
trigger2 = p2bodydist X < 21 && random < 800
value = 235

[State 240, 3]
type = ChangeState
triggerall = var(58) > 2 || var(58) < 1
triggerall = movehit > 0
triggerall = var(55) = 1
triggerall = power >= 2000 + var(20)*100
triggerall = var(14) < 1 && var(3) < 1
triggerall = p2bodydist Y >= -30
triggerall = var(16) < 1
trigger1 = power >= 2000 + var(20)*100
trigger1 = p2life >= 450
trigger1 = random <= 200
trigger2 = power >= 3000 + var(20)*100
trigger2 = p2life >= 450
trigger2 = random <= 800
trigger3 = p2life - life >= 100
trigger3 = p2life >= 450
trigger3 = random <= 900
value = 2500

[State 240, 3]
type = ChangeState
triggerall = var(58) > 2 || var(58) < 1
triggerall = movehit > 0
triggerall = var(55) = 1
triggerall = var(14) < 1
triggerall = power >= 1000 + var(20)*100 || var(3) > 0
triggerall = p2bodydist Y >= -30
triggerall = var(16) < 1
trigger1 = power >= 1200 + var(20)*100 || (var(3) > 0 && power >= 200 + var(20)*100 && var(3) < 256)
trigger1 = p2life >= 180
trigger1 = random <= 200
trigger2 = power >= 3000 + var(20)*100 || (var(3) > 0 && power >= 2000 + var(20)*100 && var(3) < 256)
trigger2 = p2life >= 180
trigger2 = random <= 800
trigger3 = p2life - life >= 100
trigger3 = p2life >= 180
trigger3 = random <= 900
value = 2000

[state 400, 3]
type = ChangeState
value = 510
trigger1 = var(55) = 1 && movehit > 0
trigger1 = var(58) > 2 || var(58) < 0
trigger1 = random <= 800

[State 430, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1
;-------------------------------------
; CROUCH_Z
[Statedef 450]
type    = C
movetype= A
physics = C
juggle  = 8
ctrl = 0
velset = 0,0
anim = 450
sprpriority = 1

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && (time < 7 || time >= 12)
value = ,AA,AP

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time >= 7 && time < 12
value = SCA

[State 230, 0]
type = varset
trigger1 = animelem = 5,2
var(38) = 0
          
[State 230, 1]
type = PlaySnd
trigger1 = animelem = 4
value = s3,0

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 4
value = s3,6
channel = 1

[State 450, 2]
type = HitDef
trigger1 = AnimElem = 5 && var(14) < 1 && var(16) < 1
attr = S, NA
damage   = 86   
animtype = Hard
guardflag = MA
pausetime = 12,12
sparkno = s10013
guard.sparkno = s10010
sparkxy = 13-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-60
hitsound   = s3,4
getpower = 95,95
givepower = 21,21
guardsound = s27,3
ground.type = high
ground.slidetime = 16
ground.hittime  = 16
guard.slidetime = 26-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,12,0)
guard.hittime  = 26-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,12,0)
ground.cornerpush.veloff = -14
air.cornerpush.veloff = -14
guard.cornerpush.veloff = -14
ground.velocity = -10    
guard.velocity = -10    
air.type = Low
air.animtype = Back
air.velocity = -3.5,-5  
airguard.velocity = -2.5      
palfx.time = 1
palfx.add = 0,0,0

[State 450, 2]
type = HitDef
trigger1 = AnimElem = 5
trigger1 = var(14) > 0 || var(16) > 0
attr = S, SA
damage   = 86   
animtype = Hard
guardflag = MA
pausetime = 12,12
sparkno = s10013
guard.sparkno = s10010
sparkxy = 13-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-60
hitsound   = s3,4
getpower = 95,95
givepower = 21,21
guardsound = s27,3
ground.type = high
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 27-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,13,0)
guard.hittime  = 27-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,13,0)
ground.cornerpush.veloff = -14
air.cornerpush.veloff = -14
guard.cornerpush.veloff = -14
ground.velocity = -10    
guard.velocity = -10    
air.type = Low
air.animtype = Back
air.velocity = -3.5,-5  
airguard.velocity = -2.5      
palfx.time = 1
palfx.add = 0,0,0

[State 3000]
type = projectile
trigger1 = movehit > 0 && p2movetype = H
projanim = 10003
offset = 55,-60
projremovetime = 14
projsprpriority = 2
ignorehitpause = 1
persistent = 0
projedgebound = 210

[State 230, 0]
type = varrandom
trigger1 = animelem = 3
v = 5
range = 3

[State 1300, 5]
type = projectile
trigger1 = movehit > 0 && p2movetype = H && hitpausetime = 9-var(5) && random < 500
projanim = 10117+ifelse(random<500,1,0)
offset = 55,-60
velocity = 1,-8
ignorehitpause = 1
projsprpriority = 2
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = movehit > 0 && p2movetype = H && hitpausetime = 9-var(5) && random < 500
projanim = 10117+ifelse(random<500,1,0)
offset = 55,-60
velocity = 2,-7.5
ignorehitpause = 1
projsprpriority = 2
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = movehit > 0 && p2movetype = H && hitpausetime = 9-var(5) && random < 500
projanim = 10117+ifelse(random<500,1,0)
offset = 55,-60
velocity = 3,-7
ignorehitpause = 1
projsprpriority = 2
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = movehit > 0 && p2movetype = H && hitpausetime = 9-var(5) && random < 500
projanim = 10117+ifelse(random<500,1,0)
offset = 55,-60
velocity = 4,-6.5
ignorehitpause = 1
projsprpriority = 2
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = movehit > 0 && p2movetype = H && hitpausetime = 9-var(5) && random < 500
projanim = 10117+ifelse(random<500,1,0)
offset = 55,-60
velocity = 5,-6
ignorehitpause = 1
projsprpriority = 2
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = movehit > 0 && p2movetype = H && hitpausetime = 9-var(5) && random < 500
projanim = 10117+ifelse(random<500,1,0)
offset = 55,-60
velocity = 6,-5
ignorehitpause = 1
projsprpriority = 2
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = movehit > 0 && p2movetype = H && hitpausetime = 9-var(5) && random < 500
projanim = 10117+ifelse(random<500,1,0)
offset = 55,-60
velocity = 7,-4
ignorehitpause = 1
projsprpriority = 2
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = movehit > 0 && p2movetype = H && hitpausetime = 9-var(5) && random < 500
projanim = 10117+ifelse(random<500,1,0)
offset = 55,-60
velocity = 8,-3
ignorehitpause = 1
projsprpriority = 2
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = movehit > 0 && p2movetype = H && hitpausetime = 9-var(5) && random < 500
projanim = 10117+ifelse(random<500,1,0)
offset = 55,-60
velocity = 8,-1.5
ignorehitpause = 1
projsprpriority = 2
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = movehit > 0 && p2movetype = H && hitpausetime = 9-var(5) && random < 500
projanim = 10117+ifelse(random<500,1,0)
offset = 55,-60
velocity = 8.5,-1
ignorehitpause = 1
projsprpriority = 2
projremovetime = 6
projedgebound = 210

[State 240, 3]
type = ChangeState
triggerall = var(55) = 1
triggerall = movehit > 0
triggerall = animtime >= -20
triggerall = animtime <= -17
triggerall = numprojID(7000) = 0
trigger1 = random <= 999
trigger1 = var(14) > 0
value = 1020

[State 240, 3]
type = ChangeState
triggerall = var(58) > 2 || var(58) < 1
triggerall = moveguarded > 0
triggerall = var(55) = 1
trigger1 = random <= 80
value = 299

[State 240, 3]
type = ChangeState
triggerall = var(58) > 2 || var(58) < 1
triggerall = movehit > 0
triggerall = var(55) = 1
triggerall = power >= 2000 + var(20)*100
triggerall = var(14) < 1 && var(3) < 1
triggerall = p2bodydist Y >= -30
triggerall = var(16) < 1
trigger1 = power >= 2000 + var(20)*100
trigger1 = p2life >= 450
trigger1 = random <= 200
trigger2 = power >= 3000 + var(20)*100
trigger2 = p2life >= 450
trigger2 = random <= 800
trigger3 = p2life - life >= 100
trigger3 = p2life >= 450
trigger3 = random <= 900
value = 2500

[State 240, 3]
type = ChangeState
triggerall = var(58) > 2 || var(58) < 1
triggerall = movehit > 0
triggerall = var(55) = 1
triggerall = var(14) < 1
triggerall = power >= 1000 + var(20)*100 || var(3) > 0
triggerall = p2bodydist Y >= -30
triggerall = var(16) < 1
trigger1 = power >= 1200 + var(20)*100 || (var(3) > 0 && power >= 200 + var(20)*100 && var(3) < 256)
trigger1 = p2life >= 180
trigger1 = random <= 200-ifelse(var(3)>256,100,0)
trigger2 = power >= 3000 + var(20)*100 || (var(3) > 0 && power >= 2000 + var(20)*100 && var(3) < 256)
trigger2 = p2life >= 180
trigger2 = random <= 800-ifelse(var(3)>256,400,0)
trigger3 = p2life - life >= 100
trigger3 = p2life >= 180
trigger3 = random <= 900-ifelse(var(3)>256,450,0)
value = 2000

[State 240, 4]
type = ChangeState
trigger1 = var(55) = 1
trigger1 = p2bodydist X > -50 && p2bodydist X < 51
trigger1 = animtime = -16
trigger1 = movecontact = 0
trigger1 = p2movetype = A
trigger1 = random <= 450
value = 1030

[State 240, 4]
type = ChangeState
trigger1 = var(58) > 1 || var(58) < 1
trigger1 = p2bodydist X > -50 && p2bodydist X < 51
trigger1 = var(55) = 1
trigger1 = animtime = -16
trigger1 = movecontact = 0
trigger1 = p2movetype = A
trigger1 = random <= 450
value = 1040

[State 240, 4]
type = ChangeState
triggerall = var(55) = 1
triggerall = p2statetype != L   
triggerall = p2stateno != 5050
trigger1 = moveguarded > 0
trigger1 = random <= 300
trigger2 = animtime = -17
trigger2 = movecontact = 0
trigger2 = p2bodydist X < 0
trigger2 = random <= 900
value = 4333

[State 240, 3]
type = ChangeState
trigger1 = var(55) = 1
trigger1 = movecontact > 0
trigger1 = random <= 999-ifelse(var(58)=1,799,0)
value = 520

[State 240, 3]
type = ChangeState
trigger1 = var(55) = 1
trigger1 = numprojID(7000) = 0
trigger1 = animtime = -17
trigger1 = movecontact = 0
value = 1000

[State 450, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1
;------------------------------------------
;JUMP_A
[Statedef 600]
type    = A
movetype= A
physics = A
juggle  = 8
ctrl = 0
anim = 600

[State 1405, 0]
type = varrandom
trigger1 = time = 0
v = 4
range = 2

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && (time < 4 || time >= 11)
value = ,AA,AP

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time >= 4 && time < 11
value = SCA

[State 230, 0]
type = varset
trigger1 = animelem = 2,4
var(38) = 0
          
[State 50, 1]
type = changeanim
trigger1 = prevstateno = 2041
trigger1 = time = 0
trigger1 = var(18) = 1
value = 601

[State 40, 0]
type = VarSet
trigger1 = animelem = 1
var(6) = 0

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 1
value = s27,0

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 1
trigger1 = Random < 900
value = s14,0
channel = 1

[State 600, 2]
type = HitDef
trigger1 = AnimElem = 2
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = A, NA
animtype = light
damage   = 46
guardflag = HA
pausetime = 7,9
sparkno = s10004
guard.sparkno = s10007
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),5
guardsound = s1,0
ground.type = low
getpower = 56,56
givepower = 21,21
ground.slidetime = 8
ground.hittime  = 8
guard.slidetime = 8-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,3,0)
guard.hittime = 8-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,3,0)
ground.velocity = -5.6
air.velocity = -3,-4
airguard.velocity = -3     
guard.velocity = -5.6
ground.cornerpush.veloff = -6
guard.cornerpush.veloff = -6
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0

[State 600, 2]
type = HitDef
triggerall = AnimElem = 2
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = A, SA
animtype = medium
damage   = 46
guardflag = HA
pausetime = 10,10
sparkno = s10005
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),5
guardsound = s1,0
ground.type = low
getpower = 56,56
givepower = 21,21
ground.slidetime = 18
ground.hittime  = 18
guard.slidetime = 18-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,8,0)
guard.hittime = 18-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,8,0)
ground.velocity = -5.6
air.velocity = -3,-4
airguard.velocity = -3     
guard.velocity = -5.6
ground.cornerpush.veloff = -6
guard.cornerpush.veloff = -6
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0

; Jumping back light kick
[Statedef 602]
type = A
physics = A
movetype = A
ctrl = 0
juggle = 8
anim = 611

[State 1405, 0]
type = varrandom
trigger1 = time = 0
v = 4
range = 2

[State 140, 1]
type = varset
trigger1 = Time = 0
var(18) = 0

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time < 2
value = ,AA,AP

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time >= 2
value = SCA

[State 230, 0]
type = varset
trigger1 = animelem = 2,6
var(38) = 0
          
[State 1000, 1]
type = varset
trigger1 = animelem = 1
var(34) = 1

[State 512, 2]
type = VelSet
trigger1 = animelem = 1
x = -7
y = -5    

[State 512, 2]
type = Velmul
trigger1 = 1
x = .99

[State 512, 2]
type = VelAdd
trigger1 = 1
y = .3

[State 230, 1] 
type = PlaySnd
trigger1 = animelem = 1,1
value = s27,0

[State 230, 2]      
type = PlaySnd
trigger1 = animelem = 1,1
value = s14,0
channel = 1

[State 610, 2]
type = HitDef
trigger1 = AnimElem = 2
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = A, NA
animtype = hard
damage   = 51
guardflag = HA
pausetime = 10,12
sparkno = s10005
guard.sparkno = s10010
priority = 4,hit
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-42
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),8
guardsound = s27,3
getpower = 95,95
givepower = 21,21
ground.type = low
ground.slidetime = 15
ground.hittime  = 15
guard.slidetime = 20-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,9,0)
guard.hittime  = 20-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,9,0)
ground.velocity = -9
air.velocity = -2.5,-4
airguard.velocity = -3.3     
fall.recover = 1
air.fall = 1
fall.recovertime = 30                        
palfx.time = 1
palfx.add = 0,0,0

[State 610, 2]
type = HitDef
triggerall = AnimElem = 2
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = A, SA
animtype = hard
damage   = 51
guardflag = HA
pausetime = 10,12
sparkno = s10006
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-52
priority = 4,hit
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),8
guardsound = s27,3
ground.type = low
getpower = 95,95
givepower = 21,21
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 22-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,10,0)
guard.hittime  = 22-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,10,0)
ground.velocity = -9
air.velocity = -2.5,-4
airguard.velocity = -3.3     
fall.recover = 1
air.fall = 1
fall.recovertime = 30                        
palfx.time = 1
palfx.add = 0,0,0
;-----------------------------------------
;JUMP_B Over
[Statedef 612]
type    = A
movetype= A
physics = A
juggle  = 8
ctrl = 0
anim = 612

[State 1405, 0]
type = varrandom
trigger1 = time = 0
v = 4
range = 2

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && (time < 1 || time >= 12)
value = ,AA,AP

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time >= 1 && time < 12
value = SCA

[State 230, 0]
type = varset
trigger1 = animelem = 3,1
var(38) = 0
          
[State 1000, 1]
type = varset
trigger1 = animelem = 1
var(34) = 1

[State 1000, 1]
type = varset
trigger1 = animelem = 4
var(34) = 0

[State 50, 1]
type = changeanim
trigger1 = prevstateno = 2041
trigger1 = time = 0
trigger1 = var(18) = 1
value = 613

[State 40, 0]
type = VarSet
trigger1 = animelem = 1
var(6) = 0

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 1
value = s27,0

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 2
value = s14,0
channel = 1

[State 610, 2]
type = HitDef
trigger1 = AnimElem = 2
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = A, NA
animtype = hard
damage   = 51
guardflag = HA
pausetime = 10,12
sparkno = s10005
guard.sparkno = s10010
priority = 4,hit
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-42
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),8
guardsound = s27,3
getpower = 95,95
givepower = 21,21
ground.type = low
ground.slidetime = 15
ground.hittime  = 15
guard.slidetime = 20-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,9,0)
guard.hittime  = 20-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,9,0)
ground.velocity = -9
air.velocity = -2.5,-4
airguard.velocity = -3.3     
fall.recover = 1
air.fall = 1
fall.recovertime = 30
palfx.time = 1
palfx.add = 0,0,0

[State 610, 2]
type = HitDef
triggerall = AnimElem = 2
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = A, SA
animtype = hard
damage   = 51
guardflag = HA
pausetime = 10,12
sparkno = s10006
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-52
priority = 4,hit
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),8
guardsound = s27,3
ground.type = low
getpower = 95,95
givepower = 21,21
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 22-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,10,0)
guard.hittime  = 22-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,10,0)
ground.velocity = -9
air.velocity = -2.5,-4
airguard.velocity = -3.3     
fall.recover = 1
air.fall = 1
fall.recovertime = 30                        
palfx.time = 1
palfx.add = 0,0,0
;----------------------------------------
;JUMP_C
[Statedef 620]
type    = A
movetype= A
physics = A
juggle  = 8
ctrl = 0
anim = 620

[State 1405, 0]
type = varrandom
trigger1 = time = 0
v = 4
range = 2

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && (time < 5 || time >= 13)
value = ,AA,AP

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time >= 5 && time < 13
value = SCA

[State 230, 0]
type = varset
trigger1 = animelem = 5,2
var(38) = 0
          
[State 50, 1]
type = changeanim
trigger1 = prevstateno = 2041
trigger1 = time = 0
trigger1 = var(18) = 1
value = 621

[State 40, 0]
type = VarSet
trigger1 = animelem = 1
var(6) = 0

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 4
value = s27,0

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 4
value = s3,6
channel = 1

[State 620, 2]
type = HitDef
trigger1 = var(14) < 1 && var(16) < 1
trigger1 = AnimElem = 4 
attr = A, NA
animtype  = Med
damage    = 71
guardflag = HA
getpower = 95,95
givepower = 21,21
pausetime = 12,12
sparkno = s10005
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57+ifelse(p2bodydist Y > 0,0,ceil(p2bodydist Y/5))
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),8
guardsound = s1,0
ground.type = low
ground.slidetime = 10
ground.hittime  = 11
guard.slidetime = 11-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,5,0)
guard.hittime = 11-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,5,0)
ground.velocity = -8
ground.cornerpush.veloff = -7
guard.cornerpush.veloff = -7
air.velocity = -3,-4.8
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0

[State 620, 2]
type = HitDef
trigger1 = var(14) > 0 || var(16) > 0
trigger1 = AnimElem = 4 
attr = A, SA
animtype  = Hard
damage    = 71
guardflag = HA
pausetime = 12,12
sparkno = s10006
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57+ifelse(p2bodydist Y > 0,0,ceil(p2bodydist Y/5))
getpower = 95,95
givepower = 21,21
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),8
guardsound = s1,0
ground.type = low
ground.slidetime = 12
ground.hittime  = 13
guard.slidetime = 13-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,6,0)
guard.hittime = 13-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,6,0)
ground.velocity = -8
ground.cornerpush.veloff = -7
guard.cornerpush.veloff = -7
air.velocity = -3,-4.8
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
;------------------------------------
;JUMP_X
[Statedef 630]
type    = A
movetype= A
physics = A
juggle  = 8
ctrl = 0
anim = 630

[State 1405, 0]
type = varrandom
trigger1 = time = 0
v = 4
range = 2

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && (time < 3 || time >= 15)
value = ,AA,AP

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time >= 3 && time < 15
value = SCA

[State 230, 0]
type = varset
trigger1 = animelem = 5
var(38) = 0
          
[State 50, 1]
type = changeanim
trigger1 = prevstateno = 2041
trigger1 = time = 0
trigger1 = var(18) = 1
value = 631

[State 40, 0]
type = VarSet
trigger1 = animelem = 1
var(6) = 0

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 1
value = s3,0

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 1
trigger1 = Random < 900
value = s14,0
channel = 1

[State 630, 2]
type = HitDef
trigger1 = AnimElem = 2
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = A, NA
animtype = light
damage   = 50
guardflag = HA
pausetime = 7,9
sparkno = s10004
guard.sparkno = s10007
sparkxy = 5-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-47
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),9
guardsound = s1,0
ground.type = low
getpower = 56,56
givepower = 21,21
ground.slidetime = 10
ground.hittime  = 10
guard.slidetime = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,4,0)
guard.hittime = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,4,0)
ground.velocity = -5.5  
air.velocity = -3,-4
airguard.velocity = -3     
guard.velocity = -5.5
ground.cornerpush.veloff = -6
guard.cornerpush.veloff = -6
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0

[State 630, 2]
type = HitDef
triggerall = AnimElem = 2
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = A, SA
animtype = medium
damage   = 50
guardflag = HA
pausetime = 10,10
sparkno = s10005
guard.sparkno = s10010
sparkxy = 5-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-47
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),9
guardsound = s1,0
ground.type = low
getpower = 56,56
givepower = 21,21
ground.slidetime = 19
ground.hittime  = 19
guard.slidetime = 19-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,9,0)
guard.hittime = 19-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,9,0)
ground.velocity = -5.5  
air.velocity = -3,-4
airguard.velocity = -3     
guard.velocity = -5.5
ground.cornerpush.veloff = -6
guard.cornerpush.veloff = -6
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
;-------------------------------------
;JUMP_Y
[Statedef 640]
type    = A
movetype= A
physics = A
juggle  = 8
ctrl = 0
anim = 640

[State 1405, 0]
type = varrandom
trigger1 = time = 0
v = 4
range = 2

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && (time < 8 || time >= 14)
value = ,AA,AP

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time >= 8 && time < 14
value = SCA

[State 230, 0]
type = varset
trigger1 = animelem = 5,3
var(38) = 0
          
[State 50, 1]
type = changeanim
trigger1 = prevstateno = 2041
trigger1 = Time = 0
trigger1 = var(18) = 1
value = 641

[State 40, 0]
type = VarSet
trigger1 = animelem = 1
var(6) = 0

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 4
value = s3,0

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 4
value = s3,6
channel = 1

[State 640, 2]
type = HitDef
trigger1 = AnimElem = 5
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = A, NA
damage   = 73
animtype = medium
guardflag = HA
pausetime = 12,12
sparkno = s10005
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-37
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),2
guardsound = s1,0
getpower = 95,95
givepower = 21,21
ground.type = low
ground.slidetime = 12
ground.hittime  = 12
guard.slidetime = 12-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,5,0)
guard.hittime = 12-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,5,0)
ground.velocity = -8  
ground.cornerpush.veloff = -7
guard.cornerpush.veloff = -7
air.velocity = -3.5,-5 
airguard.velocity = -3.3     
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0

[State 640, 2]
type = HitDef
triggerall = AnimElem = 5
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = A, SA
damage   = 73
animtype = hard
guardflag = HA
pausetime = 12,12
sparkno = s10006
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-37
hitsound   = s(ifelse(var(4)=0,3,ifelse(var(4)=1,23,24))),2
guardsound = s1,0
getpower = 95,95
givepower = 21,21
ground.type = low
ground.slidetime = 14
ground.hittime  = 14
guard.slidetime = 14-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,6,0)
guard.hittime = 14-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,6,0)
ground.velocity = -8  
ground.cornerpush.veloff = -7
guard.cornerpush.veloff = -7
air.velocity = -3.5,-5
airguard.velocity = -3.3     
fall.recover = 1
palfx.time = 1
palfx.add = 0,0,0
;--------------------------------------
;JUMP_Z
[Statedef 650]
type    = A
movetype= A
physics = A
juggle  = 9
ctrl = 0
anim = 650

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && (time < 11 || time >= 17)
value = ,AA,AP

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time >= 11 && time < 17
value = SCA

[State 230, 0]
type = varset
trigger1 = animelem = 6
var(38) = 0
          
[State 50, 1]
type = changeanim
trigger1 = prevstateno = 2041
trigger1 = Time = 0
trigger1 = var(18) = 1
value = 651

[State 40, 0]
type = hitby
trigger1 = var(16) < 1 || var(38) = 0
trigger1 = animelem = 4, >= 0
trigger1 = animelem = 5, < 0
value = SCA,AT

[State 40, 0]
type = VarSet
trigger1 = animelem = 1
var(6) = 0

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 3,6
value = s3,0

[State 230, 2]
type = PlaySnd
trigger1 = animelem = 3,6
trigger1 = random <= 900
value = s22,0
channel = 1

[State 650, 2]
type = HitDef
trigger1 = AnimElem = 5
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = A, NA
damage   = 110
animtype = heavy
guardflag = HA
pausetime = 12,12
sparkno = s10005
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57
hitsound   = s5,4
guardsound = s27,3
ground.type = high
priority = 4,HIT
getpower = 83,83
givepower = 21,21
ground.slidetime = 25
ground.hittime  = 25
guard.slidetime = 25-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,12,0)
guard.hittime = 25-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,12,0)
guard.velocity = -16
ground.velocity = -5,-7
air.velocity = -5,-7 
guard.cornerpush.veloff = -14
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 36
palfx.time = 1
palfx.add = 0,0,0

[State 650, 2]
type = HitDef
triggerall = AnimElem = 5
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = A, SA
damage   = 110
animtype = dup
guardflag = HA
pausetime = 12,12
sparkno = s10006
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57
hitsound   = s5,4
guardsound = s27,3
ground.type = high
priority = 4,HIT
ground.slidetime = 27
ground.hittime  = 27
guard.slidetime = 27-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,13,0)
guard.hittime = 27-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,13,0)
getpower = 83,83
givepower = 21,21
guard.velocity = -16
ground.velocity = -5.6,-7
air.velocity = -5.6,-7 
guard.cornerpush.veloff = -14
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 36
palfx.time = 1
palfx.add = 0,0,0
;----------------------------------
; jump_Z (during guard)
[Statedef 651]
type = S
physics = S
ctrl = 0
velset = 0,0

[State 261, 0]
type = varadd
trigger1 = time = 0
var(20) = 10
[State 261, 0]
type = varadd
trigger1 = time = 0 && var(3) > 0
var(2) = -1000

[State 261, 0]
type = varadd
trigger1 = time = 0     
var(28) = -4

[State 261, 0]
type = pause
trigger1 = time = 0
time = 5

[State 261, 0]
type = pause
trigger1 = time = 1     
time = 2
movetime = 2

[State 261, 1]
type = Explod
trigger1 = Time = 0
anim = 930
pos = 10,-85
postype = p1
sprpriority = 2
pausemovetime = 9999
supermove = 1
ontop = 1

[State 266, 2]
type = notHitBy
trigger1 = 1   
value = SCA,AT

[State 266, 3] 
type = EnvColor
Trigger1 = Time = 0
value = 230,230,230
under = 1
time = 2

[State 261, 0]
type = velset
trigger1 = time = 2     
x = -2
y = -3

[State 266, 4] 
type = ChangeState
trigger1 = Time = 2
value = 652
;------------------------------------
[Statedef 652]
type    = A
movetype= A
physics = A
juggle  = 9
ctrl = 0
anim = 652

[State 266, 2]
type = notHitBy
trigger1 = 1   
value = SCA

[State 230, 1]
type = PlaySnd
trigger1 = Time = 6
value = s3,0

[State 230, 2]
type = PlaySnd
trigger1 = time = 6
trigger1 = random <= 900
value = s22,0
channel = 1

[State 650, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = A, SA
damage   = 50
animtype = heavy
guardflag = HA
pausetime = 12,12
sparkno = s10005
guard.sparkno = s10010
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57
hitsound   = s5,4
guardsound = s27,3
ground.type = high
air.type = high
priority = 5,HIT
getpower = 0,0
givepower = 21,21
ground.slidetime = 26
ground.hittime  = 26
guard.slidetime = 26-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,12,0)
guard.hittime = 26-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,12,0)
guard.velocity = -16
ground.velocity = -5,-7
air.velocity = -5,-7 
guard.cornerpush.veloff = -14
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 36

[State 650, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1
;--------------------------------------
;yamibarai_X
[Statedef 1000]
type    = S
movetype= A
physics = S
poweradd= 39
ctrl = 0
anim = 1000
facep2 = 1
velset = 0,0
sprpriority = 0

[State 1000, 4]
type = Helper
trigger1 = time = 0
name = "n2"
pos = 25,0
stateno = 2011
[State 1000, 4]
type = Helper
trigger1 = time = 0
name = "n2"
pos = 150,0
stateno = 2011

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1
value = ,AA,AP

[State 230, 0]
type = varset
trigger1 = animelem = 4
var(38) = 0
          
[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 1

[State 1000, 1]
type = varset
trigger1 = time = 9
var(34) = 0

[State 1000, 1]
type = posset
trigger1 = pos y != 0
y = 0

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 2
value = s4,0
channel = 1
[State 1020, 1]
type = PlaySnd
trigger1 = animelem = 3
value = s26,2
channel = 1

[State 1300, 5]
type = projectile
trigger1 = animelem = 3
projanim = 1001
offset = 0,0
projsprpriority = 1
projremovetime = 23
projedgebound = 210

[State 1000, 2]
type = PlaySnd
trigger1 = Time = 9
value = s19,1

[State 1000, 4]
type = Projectile
trigger1 = time = 9
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = SC, SP
damage = 87, 10
projanim = 1005
projsprpriority = 3
projshadow = -1
priority = 5,Hit
projID = 7000
offset = 38,35
velocity = 3.7,0;3.65
; HitDef part of projectile info
animtype = heavy         
getpower = 72,72
givepower = 21,21
guardflag = M
pausetime = 0,8
guard.pausetime = 0,10
ground.slidetime = 18
ground.hittime  = 19
guard.slidetime = 30-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,14,0)
guard.hittime  = 30-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,14,0)
ground.velocity = -10.9
air.animtype = Back
air.velocity = -4.5,-6.5
air.juggle = 9
palfx.time = 27
palfx.add = 48,0,168
palfx.mul = 166,166,166
palfx.sinadd = 96,96,96,17
palfx.color = 0 
palfx.invertall = 1 
sparkno = s10006
guard.sparkno = s10015
sparkxy = 15,-80
hitsound   = s4,1
persistent = 0
ground.type = Low
air.fall = 1
fall.recover = 1
fall.recovertime = 34
yaccel = .5

[State 1000, 4]
type = Projectile
triggerall = time = 9
trigger1 = var(14) > 0
trigger2 = var(16) > 0
projanim = 1005
projsprpriority = 3
attr = SC, SP
damage = 104-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,17,0),12-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,2,0)
projshadow = -1
priority = 5,Hit
projID = 7000
offset = 38, 35    
getpower = 72,72
givepower = 21,21
velocity = 3.7,0
; HitDef part of projectile info
animtype = heavy         
guardflag = M
pausetime = 0,8
guard.pausetime = 0,10
ground.slidetime = 19
ground.hittime  = 20
guard.slidetime = 31-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,15,0)
guard.hittime  = 31-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,15,0)
ground.velocity = -10.9
air.animtype = dup
air.velocity = -4.5,-6.5
air.juggle = 9
palfx.time = 28
sparkno = s9241
guard.sparkno = s10015
sparkxy = 15,-80
hitsound   = s4,1
persistent = 0
ground.type = Low
air.type = Low                
palfx.add = 48,0,168
palfx.mul = 166,166,166
palfx.sinadd = 96,96,96,17
palfx.color = 0 
palfx.invertall = 1 
air.fall = 1
fall.recover = 1
fall.recovertime = 34
yaccel = .5

[State 1000, 4]
type = Helper
trigger1 = time = 9
name = "proj"
pos = 38,36  
stateno = 1001
ownpal = 1

[State 1000, 6]
type = ChangeState
trigger1 = var(55) = 1
trigger1 = p2statetype != L   
trigger1 = p2stateno != 5050
trigger1 = random <= 100
trigger1 = AnimTime = 0
value = 4333

[State 1000, 6]
type = ChangeState
trigger1 = p2statetype != L   
trigger1 = p2stateno != 5050
trigger1 = var(55) = 1
trigger1 = random <= 100
trigger1 = AnimTime = 0
value = 4000

[State 1000, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;--------------------------------------
[Statedef 1001]
type    = S
movetype= I
physics = N
velset = 3.7,0
anim = 12362
sprpriority = 1

[State 1000, 4]
type = projectile
trigger1 = timemod = 6,0
trigger1 = time > 5
offset = 0,0  
projanim = 1006
projremovetime = 11
projsprpriority = 1

[State 1000, 4]
type = destroyself
trigger1 = time > 0
trigger1 = parent, numprojID(7000) = 0
;------------------------------------
;Yamibarai_Z
[Statedef 1020]
type    = S
movetype= A
physics = S
poweradd= 39
ctrl = 0
anim = 1000
facep2 = 1
velset = 0,0
sprpriority = 0

[State 1000, 4]
type = Helper
trigger1 = time = 0
name = "n2"
pos = 25,0
stateno = 2011
[State 1000, 4]
type = Helper
trigger1 = time = 0
name = "n2"
pos = 150,0
stateno = 2011

[State 230,0]
type = varset
trigger1 = var(55) = 1 && var(3) > 0 && var(50) = 0 && time = 0
trigger1 = prevstateno = 301 || prevstateno = 1037 || prevstateno = 1038 || prevstateno = 4600 || prevstateno = 4611
var(50) = 16

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1
value = ,AA,AP

[State 230, 0]
type = varset
trigger1 = animelem = 4
var(38) = 0
          
[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 1

[State 1000, 1]
type = varset
trigger1 = time = 9
var(34) = 0

[State 1020, 1]
type = posset
trigger1 = pos y != 0
y = 0

[State 1020, 1]
type = VelSet
trigger1 = Time = 0
trigger1 = Vel X > 0
x = 0

[State 1020, 1]
type = PlaySnd
trigger1 = animelem = 2
value = s4,0
channel = 1
[State 1020, 1]
type = PlaySnd
trigger1 = animelem = 3
value = s26,2
channel = 1

[State 1300, 5]
type = projectile
trigger1 = animelem = 3
projanim = 1001
offset = 0,0
projsprpriority = 1
projremovetime = 23
projedgebound = 210

[State 1020, 2]
type = PlaySnd
trigger1 = Time = 9
value = s19,1

[State 1020, 4]
type = Projectile
trigger1 = time = 9
trigger1 = var(14) < 1
trigger1 = var(16) < 1
projanim = 1005
projsprpriority = 3
projID = 7000
offset = 38, 35
velocity = 5.8,0
; HitDef part of projectile info
attr = SC, SP
damage   = 87,10
animtype = heavy 
guardflag = M
pausetime = 0,8
guard.pausetime = 0,10
priority = 5,Hit
guard.sparkno = s10015
sparkno = s10006
getpower = 72,72
givepower = 21,21
sparkxy = 15,-80
hitsound   = s4,1
persistent = 0
ground.type = Low
ground.slidetime = 18
ground.hittime  = 19
guard.slidetime = 30-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,14,0)
guard.hittime  = 30-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,14,0)
ground.velocity = -10.9
air.animtype = Back
air.velocity = -4.5,-6.5
air.juggle = 9
palfx.time = 27
palfx.add = 48,0,168
palfx.mul = 166,166,166
palfx.sinadd = 96,96,96,17
palfx.color = 0 
palfx.invertall = 1 
air.fall = 1
fall.recover = 1
fall.recovertime = 34
yaccel = .5

[State 1020, 4]
type = Projectile
triggerall = time = 9
trigger1 = var(14) > 0
trigger2 = var(16) > 0
projanim = 1005
projsprpriority = 3
projID = 7000
offset = 38,35
velocity = 5.8,0
; HitDef part of projectile info
attr = SC, SP
damage = 104-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,17,0),12-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,2,0)
animtype = heavy 
guardflag = M
pausetime = 0,8
guard.pausetime = 0,10
priority = 5,Hit
guard.sparkno = s10015
sparkno = s9241
getpower = 72,72
givepower = 21,21
sparkxy = 15,-80
hitsound   = s4,1
persistent = 0
ground.type = Low
air.type = Low                
ground.slidetime = 19
ground.hittime  = 20
guard.slidetime = 31-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,15,0)
guard.hittime  = 31-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,15,0)
ground.velocity = -10.9
air.animtype = dup
air.velocity = -4.5,-6.5
air.juggle = 9
palfx.time = 28
palfx.add = 48,0,168
palfx.mul = 166,166,166
palfx.sinadd = 96,96,96,17
palfx.color = 0 
palfx.invertall = 1 
air.fall = 1
fall.recover = 1
fall.recovertime = 34
yaccel = .5

[State 1000, 4]
type = Helper
trigger1 = time = 9
name = "proj"
pos = 38,36  
stateno = 1002
ownpal = 1

[State 1000, 6]
type = ChangeState
trigger1 = p2statetype != L   
trigger1 = p2stateno != 5050
trigger1 = var(55) = 1
trigger1 = random <= 100
trigger1 = AnimTime = 0
value = 4333

[State 1000, 6]
type = ChangeState
trigger1 = p2statetype != L   
trigger1 = p2stateno != 5050
trigger1 = var(55) = 1
trigger1 = random <= 100
trigger1 = AnimTime = 0
value = 4000

[State 1020, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------
[Statedef 1002]
type    = S
movetype= I
physics = N
velset = 5.8,0
anim = 12362
sprpriority = 1

[State 1000, 4]
type = projectile
trigger1 = timemod = 6,0
trigger1 = time > 5
offset = 0,0  
projanim = 1006
projremovetime = 11
projsprpriority = 1

[State 1000, 4]
type = destroyself
trigger1 = time > 0
trigger1 = parent, numprojID(7000) = 0

; Throw c Attempt
[Statedef 1500]
type = S
movetype = A
physics = S
anim = 1402
velset = 0,0
ctrl = 0

[State 0, 1]
type = varset
trigger1 = time = 0
var(33) = 0

[State 5040, 1]
type = nothitby
trigger1 = time = 0
value = SCA

[State 850, 1]
type = HitDef
trigger1 = p2stateno != 150 && p2stateno != 151 && p2stateno != 152
trigger1 = p2stateno != 153 && p2stateno != 140 
trigger1 = p2stateno != 130 && p2stateno != 131 
trigger1 = AnimElem = 1
attr = S, NT
priority = 4, miss
hitflag = M
sparkno = -1
id = 1500
snap = 20,0
hitonce = 1
p1stateno = 1505
p2stateno = 1501
p2facing = 1
hitsound = -1
fall.yvelocity = -3

[State 850, 2]
type = ChangeState
trigger1 = AnimTime = 0
trigger1 = p2bodydist X <= 25 && p2bodydist X >= -57
value = 225

[State 850, 2]
type = ChangeState
trigger1 = AnimTime = 0
trigger1 = p2bodydist X > 25 || p2bodydist X < -57
value = 220

; Throw c sucess
[Statedef 1505]
type = S
movetype = A
physics = S
anim = 1500

[State 7102, 1]
type = changeState
triggerall = time = 2
trigger1 = numtarget(1500) > 0 && target(1500),stateno != 1501
trigger2 = numtarget(1500) = 0
value = 0
ctrl = 1

[State 1505, 0]
type = hitvelset
trigger1 = time = 0 || time = 1
x = 0

[State 1505, 0]
type = varset
trigger1 = time = 0
var(17) = 0

[State 1405, 0]
type = varset
trigger1 = time = 0
var(24) = 0

[State 1505, 0]
type = sprpriority
trigger1 = 1
value = -2

[State 1505, 1]
type = varset
trigger1 = var(55) = 0 && var(14) < 1 && var(16) < 1 && var(59) > -2
trigger1 = time > 2
trigger1 = command = "ay"
trigger1 = (var(53) = 0 && power >= 1000 + var(20)*100) || (var(53) = 1 && power >= 2000 + var(20)*100 && var(14) < 1 && var(16) < 1)
trigger1 = numhelper(8301) < 1
trigger1 = (var(53) = 0 && var(56) > 0) || var(53) = 1
var(17) = 1

[State 1505, 1]
type = varset
trigger1 = var(55) = 1 && var(14) < 1 && var(16) < 1
trigger1 = numhelper(8301) < 1 && var(59) >= 0
trigger1 = power >= 2000 + var(20)*100 && var(53) = 0
trigger1 = time = 56
trigger1 = p2life <= 380
trigger1 = random <= 500
var(17) = 1

[State 1006, 6]
type = Helper
trigger1 = (var(53) = 0 && power >= 1000 + var(20)*100) || (var(53) = 1 && power >= 2000 + var(20)*100 && var(14) < 1 && var(16) < 1)
trigger1 = numhelper(8301) < 1
trigger1 = var(17) = 1
trigger1 = (var(53) = 0 && var(56) > 0) || var(53) = 1
ID = 8301
name = "x"
pos = 0,0  
stateno = 8308

[State 123, 2]
type = varset
trigger1 = time = 0
var(4) = 0
[State 123, 2]
type = varset
trigger1 = numtarget(1500) > 0
trigger1 = time = 0 && target(1500),const(size.head.pos.y)>-60 && target(1500),const(size.head.pos.y)<0
var(4) = 1

[State 1051, 2]
type = TargetBind
trigger1 = numtarget(1500) > 0
trigger1 = time = 0 && target(1500),name != "spider-man"
pos = 18+ifelse((target(1500),const(size.head.pos.x))<0,(target(1500),const(size.head.pos.x)),0),0
id = 1500

[State 1051, 2]
type = TargetBind
trigger1 = numtarget(1500) > 0 && var(4) = 1
trigger1 = animelem = 8
pos = 17+ifelse(var(4)=1,(target(1500),const(size.head.pos.x)),0)+ifelse((target(1500),const(size.head.pos.x))<0,(target(1500),const(size.head.pos.x)),0),0+ifelse(var(4)=1,-60-(target(1500),const(size.head.pos.y)),0)
id = 1500

[State 1051, 2]
type = TargetBind
trigger1 = numtarget(1500) > 0
trigger1 = time = 0 && target(1500),name = "spider-man"
pos = -12,0
id = 1500
[State 1051, 2]
type = TargetBind
triggerall = animelem = 8 && numtarget(1500) > 0
trigger1 = target(1500),name = "ryuzito de souza" || target(1500),name = "pocket ryu"
pos = 21,-40
id = 1500

[State 1000, 4]
type = Helper
trigger1 = animelem = 10
name = "c-C"
pos = 23,-10
stateno = 8307

[State 3000]
type = projectile
trigger1 = AnimElem = 12
projanim = 10214
offset = 11,-79
sprpriority = 2
projremovetime = 19
projedgebound = 210
[State 3000]
type = projectile
trigger1 = AnimElem = 12
projanim = 923
offset = -3,-25
projsprpriority = 2
projremovetime = 13
projedgebound = 210

[State 1051, 1]
type = Turn
Trigger1 = Animelem = 8

[State 3000];2k
type = playsnd
trigger1 = AnimElem = 12
value = s21,0
channel = 1

[State 3000];2k1
type = playsnd
trigger1 = AnimElem = 11
value = s6,3
channel = 1

[State 3000]
type = playsnd
trigger1 = AnimElem = 12
value = s3,4

[State 3000]
type = playsnd
trigger1 = AnimElem = 8
value = s9,6

[State 3000]
type = targetlifeadd
trigger1 = AnimElem = 12
trigger1 = var(14) < 1
trigger1 = var(16) < 1
value = -135
id = 1500
[State 3000]
type = targetlifeadd
triggerall = AnimElem = 12
trigger1 = var(14) > 0
trigger2 = var(16) > 0
value = -162
id = 1500

[State 3000]
type = velset
trigger1 = Animelem = 2
x = 11 

[State 3000]
type = velset
trigger1 = Animelem = 6
x = 0

[State 3000]
type = projectile
trigger1 = time = 46
projanim = 10002
offset = 10, -65
projsprpriority = 2
projremovetime = 9
projedgebound = 210
[State 3000]
type = projectile
trigger1 = time = 48
projanim = 10002
offset = -15, -80
projsprpriority = 2
projremovetime = 9
projedgebound = 210
[State 3000]
type = projectile
trigger1 = time = 50
projanim = 10002
offset = -45, -87
projsprpriority = 2
projremovetime = 9
projedgebound = 210
[State 3000]
type = projectile
trigger1 = time = 52
projanim = 10002
offset = -83, -82
projsprpriority = 2
projremovetime = 9
projedgebound = 210

[State 1020, 6]
type = projectile
trigger1 = AnimElem = 8
projanim = 10001
offset = 16,-45
projsprpriority = -1
projremovetime = 19
projedgebound = 210

[State 860,9]
type = ChangeState
trigger1 = animtime = 0
trigger1 = var(55) = 1
trigger1 = var(58) > 2 || var(58) < 0
trigger1 = numhelper(8301) > 0
trigger1 = random <= 990
value = 107

[State 7102, 1]
type = SelfState
trigger1 = time = 90
value = 0 
ctrl = 1
[State 860,15]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

; Thrown by Throw C
[Statedef 1501]
type = S
movetype = H
physics = S
velset = 0,0
ctrl = 0

[State 1531, 5]
type = defencemulSet
trigger1 = 1
value = 1

[State 5100, 11]
type = PosFreeze
trigger1 = time < 41

[State 1501, 0]
type = Width
trigger1 = 1
edge = 2,28             

[State 7102, 1]
type = posset
trigger1 = time = 1
trigger1 = p2stateno != 1505
trigger2 = time = 50
y = 0
[State 7102, 1]
type = SelfState
trigger1 = time = 1
trigger1 = p2stateno != 1505
trigger2 = time = 50
value = 0 
ctrl = 1

[State 870, 1]
type = ChangeAnim2
trigger1 = Time = 0
value = 1501

[State 706, 4]
type = velset
trigger1 = Animtime = 0
x = 4.7
y = -6.5

[State 706, 4]
type = changeState
trigger1 = Animtime = 0
value = 1406
;-----------------------------------
; Throw Z Attempt
[Statedef 1400]
type = S
movetype = A
physics = S
anim = 1402
velset = 0,0
ctrl = 0

[State 0, 1]
type = varset
trigger1 = time = 0
var(33) = 0

[State 5040, 1]
type = nothitby
trigger1 = time = 0
value = SCA

[State 850, 1]
type = HitDef
trigger1 = p2stateno != 150 && p2stateno != 151 && p2stateno != 152
trigger1 = p2stateno != 153 && p2stateno != 140 
trigger1 = p2stateno != 130 && p2stateno != 131 
trigger1 = AnimElem = 1
attr = S, NT
hitflag = M
priority = 4, miss
id = 1400
sparkno = -1
snap = 20,0
hitonce = 1
p1stateno = 1405
p2stateno = 1401
p2facing = 1
fall.yvelocity = -3

[State 850, 2]
type = ChangeState
trigger1 = AnimTime = 0
trigger1 = p2bodydist X <= 25 && p2bodydist X >= -57
value = 245

[State 850, 2]
type = ChangeState
trigger1 = AnimTime = 0
trigger1 = p2bodydist X > 25 || p2bodydist X < -57
value = 240

; Throw Z sucess
[Statedef 1405]
type = S
movetype = A
physics = S
anim = 1400

[State 7102, 1]
type = changeState
triggerall = time = 2
trigger1 = numtarget(1400) > 0 && target(1400),stateno != 1401
trigger2 = numtarget(1400) = 0
value = 0
ctrl = 1

[State 1505, 0]
type = hitvelset
trigger1 = time = 0 || time = 1
x = 0

[State 1405, 0]
type = varset
trigger1 = time = 0
var(17) = 0

[State 1405, 0]
type = varrandom
trigger1 = time = 0
v = 18
range = 2

[State 1405, 0]
type = varset
trigger1 = time = 0
var(24) = 0

[State 1405, 0]
type = width
trigger1 = animtime < 0
value = 12

[State 1405, 1]
type = varset
trigger1 = var(55) = 0 && var(14) < 1 && var(16) < 1 && var(59) > -2
trigger1 = time > 2
trigger1 = command = "ay"
trigger1 = (var(53) = 0 && power >= 1000 + var(20)*100) || (var(53) = 1 && power >= 2000 + var(20)*100 && var(14) < 1 && var(16) < 1)
trigger1 = numhelper(8301) < 1
trigger1 = (var(53) = 0 && var(56) > 0) || var(53) = 1
var(17) = 1

[State 1405, 1]
type = varset
trigger1 = var(55) = 1 && var(14) < 1 && var(16) < 1
trigger1 = numhelper(8301) < 1 && var(59) >= 0
trigger1 = power >= 2000 + var(20)*100 && var(53) = 0
trigger1 = time = 54
trigger1 = p2life <= 380
trigger1 = random <= 500
var(17) = 1

[State 1006, 6]
type = Helper
trigger1 = (var(53) = 0 && power >= 1000 + var(20)*100) || (var(53) = 1 && power >= 2000 + var(20)*100 && var(14) < 1 && var(16) < 1)
trigger1 = numhelper(8301) < 1
trigger1 = var(17) = 1
trigger1 = (var(53) = 0 && var(56) > 0) || var(53) = 1
ID = 8301
name = "x"
pos = 0,0  
stateno = 8308

[State 1405, 1]
type = Posadd
trigger1 = time = 0
x = 10

[State 123, 2]
type = varset
trigger1 = time = 0
var(4) = 0
[State 123, 2]
type = varset
trigger1 = numtarget(1400) > 0
trigger1 = time = 0 && target(1400),const(size.head.pos.y)>-60 && target(1400),const(size.head.pos.y)<0
var(4) = 1

[State 1051, 2]
type = TargetBind
trigger1 = numtarget(1400) > 0
trigger1 = time <= 30 && target(1400),name != "spider-man" && target(1400),name != "ryuzito de souza"
trigger1 = target(1400),name != "pocket ryu"
pos = 13+ifelse(var(4)=1,(target(1400),const(size.head.pos.x)),0)+ifelse((target(1400),const(size.head.pos.x))<0,(target(1400),const(size.head.pos.x)),0),0+ifelse(var(4)=1,-60-(target(1400),const(size.head.pos.y)),0)
id = 1400

[State 1051, 2]
type = TargetBind
trigger1 = numtarget(1400) > 0
trigger1 = time <= 30 && target(1400),name = "spider-man"
pos = -7,0
id = 1400
[State 1051, 2]
type = TargetBind
triggerall = time <= 30 && numtarget(1400) > 0
trigger1 = target(1400),name = "ryuzito de souza" || target(1400),name = "pocket ryu"
pos = 13,-40
id = 1400

[State 3000]
type = targetlifeadd
trigger1 = AnimElem = 5
trigger1 = var(14) < 1
trigger1 = var(16) < 1
value = -134
id = 1400
kill = 0
[State 3000]
type = targetlifeadd
triggerall = AnimElem = 5
trigger1 = var(14) > 0
trigger2 = var(16) > 0
value = -161
id = 1400
kill = 0

[State 1000, 4]
type = Helper
trigger1 = animelem = 3
name = "c-Y"
pos = 23,-10
stateno = 8304

[State 3000]
type = projectile
trigger1 = AnimElem = 5
projanim = 9999
offset = 7,-58
projsprpriority = 2
projremovetime = 16
projedgebound = 210

[State 3000]
type = playsnd
trigger1 = time = 5
value = s14,0
channel = 1
[State 3000]
type = playsnd
trigger1 = animelem = 5
value = s26,5
channel = 1

[State 3000]
type = playsnd
trigger1 = AnimElem = 5 && var(18) = 0
value = s1,9
[State 3000]
type = playsnd
trigger1 = AnimElem = 5 && var(18) = 1
value = s4,7
[State 3000]
type = playsnd
trigger1 = AnimElem = 5 && var(18) = 2
value = s5,6

[State 3000]
type = projectile
trigger1 = time = 36
projanim = 10002
offset = 10, -65
projsprpriority = 2
projremovetime = 9
projedgebound = 210
[State 3000]
type = projectile
trigger1 = time = 38
projanim = 10002
offset = -15, -80
projsprpriority = 2
projremovetime = 9
projedgebound = 210
[State 3000]
type = projectile
trigger1 = time = 40
projanim = 10002
offset = -45, -87
projsprpriority = 2
projremovetime = 9
projedgebound = 210
[State 3000]
type = projectile
trigger1 = time = 42
projanim = 10002
offset = -83, -82
projsprpriority = 2
projremovetime = 9
projedgebound = 210

[State 860,9]
type = ChangeState
trigger1 = animtime = 0
trigger1 = var(55) = 1
trigger1 = var(58) > 2 || var(58) < 0
trigger1 = numhelper(8301) > 0
trigger1 = random <= 990
value = 107

[State 7102, 1]
type = SelfState
trigger1 = time = 80
value = 0 
ctrl = 1
[State 860,15]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

; Thrown by Throw Z
[Statedef 1401]
type = S
movetype = H
physics = S
velset = 0,0
ctrl = 0

[State 1531, 5]
type = defencemulSet
trigger1 = 1
value = 1

[State 5100, 11]
type = PosFreeze
trigger1 = time < 31

[State 7102, 1]
type = posset
trigger1 = time = 1
trigger1 = p2stateno != 1405
trigger2 = time = 40
y = 0
[State 7102, 1]
type = SelfState
trigger1 = time = 1
trigger1 = p2stateno != 1405
trigger2 = time = 40
value = 0 
ctrl = 1

[State 870, 1]
type = ChangeAnim2
trigger1 = Time = 0
value = 1401

[State 706, 4]
type = velset
trigger1 = Animtime = 0
x = -3.9
y = -8

[State 706, 4]
type = changeState
trigger1 = Animtime = 0
value = 1406
;------------------------------------
; HITA_FALL (knocked up, falling)
[Statedef 1406]
type    = A
movetype= H
physics = N

[State 1531, 5]
type = defencemulSet
trigger1 = 1
value = 1

[State 531, 1]
type = nothitby
trigger1 = 1
value = ,AA,AP

[State 1531, 5]
type = posadd
trigger1 = time = 0
y = -10

[State 325, 0]
type = changeanim
trigger1 = time = 0
value = 5050

[State 5050, 2] 
type = ChangeAnim
trigger1 = anim = [5050,5059]
trigger1 = Vel Y >= ifelse(anim = 5050, 1, -2)
trigger1 = SelfAnimExist(anim+10)
value = anim+10
persistent = 0

[State 5050, 3] 
type = posAdd
trigger1 = time = 0
trigger1 = vel x < 0
x = -10

[State 5050, 3] 
type = posAdd
trigger1 = time = 0
trigger1 = vel x > 0
x = 10

[State 5050, 3] 
type = VelAdd
trigger1 = prevstateno != 1501
y = 0.35
[State 5050, 3] 
type = VelAdd
trigger1 = prevstateno = 1501
y = 0.4

[State 5050, 4]
type = selfState
triggerall = Vel Y > 0
triggerall = Pos Y >= -20
triggerall = (prevstateno != 1401 && alive) || (prevstateno = 1401 && life > 1)
trigger1 = Command = "recovery"
trigger2 = Command = "dodge"
value = 5201

[State 5050, 5]
type = lifeadd
trigger1 = Vel Y > 0 && prevstateno = 1401
trigger1 = Pos Y >= 0;ifelse((anim = [5051,5059]) || (anim = [5061,5069]), 0, 25)
value = -1

[State 5050, 6]
type = changestate
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0;ifelse((anim = [5051,5059]) || (anim = [5061,5069]), 0, 25)
value = 1408

; HIT_BOUNCE (hit ground)
[Statedef 1408]
type    = L
movetype= H
physics = N

[State 5100, Var] 
type = VarSet
trigger1 = Time = 0
sysvar(1) = floor(vel y)

[State 5100, 2] 
type = ChangeAnim
triggerall = time = 0
trigger1 = (anim != [5051,5059]) && (anim != [5061,5069])
trigger2 = !SelfAnimExist(5100 + (anim % 10))
value = 5100

[State 5100, 3] 
type = ChangeAnim
trigger1 = time = 0
trigger1 = (anim = [5051,5059]) || (anim = [5061,5069])
trigger1 = SelfAnimExist(5100 + (anim % 10))
value = 5100 + (anim % 10)

[State 5000, 1]
type = changeanim
trigger1 = time > 0 && life <= 0
value = anim
elem = animelemno(-1)

[State 5100, 4]
type = PosSet
trigger1 = Time = 0
y = 0

[State 5100, 6] 
type = VelMul
trigger1 = Time = 0
x = 0.75

[State 5100, 8]
type = GameMakeAnim
trigger1 = Time = 1
value = 60 + (sysvar(1) > 5) + (sysvar(1) > 14)
pos = 0, 0
under = sysvar(1) <= 10

[State 5100, 10]
type = PlaySnd
trigger1 = Time = 0
value = F7,0

[State 5100, 11]
type = PosFreeze
trigger1 = 1

[State 5100, 12]
type = posadd
trigger1 = life <= 0 && time%2 = 0 && vel x < 0
x = 1
[State 5100, 12]
type = posadd
trigger1 = life <= 0 && time%2 = 1 && vel x < 0
x = -1

[State 5100, 12]
type = ChangeState
trigger1 = time = 3 && (life > 0 || vel x >= 0)
trigger2 = Time = 10 && life <= 0 && vel x < 0
value = 1409

[State 5100, 13]
type = ForceFeedback
trigger1 = Time = 0
waveform = sinesquare
ampl = 128,-3,-.2,.005
time = 20
;-------------------------------------
; HIT_BOUNCE (bounce into air)
[Statedef 1409]
type    = L
movetype= H
physics = N

[State 5100, 1]
type = VelSet
trigger1 = Time = 0
y = -4

[State 5101, 1] 
type = ChangeAnim
triggerall = time = 0
trigger1 = anim != [5101,5109]
trigger2 = !SelfAnimExist(5160 + (anim % 10))
value = 5160

[State 5101, 2] 
type = ChangeAnim
triggerall = time = 0
trigger1 = anim = [5101,5109]
trigger1 = SelfAnimExist(5160 + (anim % 10))
value = 5160 + (anim % 10)

[State 5101, 4]
type = PosSet
trigger1 = Time = 0
y = 20

[State 5101, 5] 
type = VelAdd
trigger1 = 1
y = .4

[State 5101, 6] 
trigger1 = time > 6
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 12
type = selfstate
value = 5110
;-----------------------------------------
; ONI YAKI X (start)
[Statedef 1030]
type    = S
movetype= A
physics = S
poweradd= 83
ctrl = 0
juggle = var(44)
anim = 1030
facep2 = 1
velset = 0,0
sprpriority = 0

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 1

[state 210, 0]
type = NotHitBy
trigger1 = time < 5
trigger2 = time > 4 && var(16) > 0 && var(38) = 1
value = SCA

;[state 210, 0]
;type = HitBy
;trigger1 = time >= 5 && time <= 6
;trigger1 = var(16) < 1 || var(38) = 0
;value = SCA,SA,HA,AP

[State 210, 0]
type = PlaySnd
trigger1 = Time = 1
value = s4,3
;freqmul = 1.0
channel = 1
[State 210, 0]
type = PlaySnd
trigger1 = animelem = 4
value = s26,6
channel = 1

[State 210, 1]
type = PlaySnd
trigger1 = movehit > 0
value = s4,1
ignorehitpause = 1
persistent = 0

[State 210, 1]
type = Posadd
trigger1 = animelem = 4
x = 1

[State 210, 2]
type = Varset
trigger1 = AnimElem = 1
var(5) = 1

[State 210, 2]
type = Varset
trigger1 = movecontact > 0
var(44) = 9
ignorehitpause = 1

[State 210, 2]
type = HitDef
trigger1 = AnimElem = 4
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = A, SA
animtype  = hard
damage    = 83,10
guardflag = M
hitflag = MAF
pausetime = 12,12
guard.pausetime = 12,14
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-35
guard.sparkno = s10111
sparkno = s10006
priority = 4,hit 
hitsound = S3,2 
getpower = 58,58
givepower = 21,21
guardsound = s1,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
guard.slidetime = 15-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,7,0)
guard.hittime = 15-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,7,0)
ground.velocity = -1.8,-11.5
guard.velocity = -3
air.velocity = -1.8, -11.5
fall = 1
air.fall = 1
fall.recover = 1
fall.recovertime = 53
palfx.time = 55
palfx.add = 48,0,168
palfx.mul = 166,166,166
palfx.sinadd = 96,96,96,17
palfx.color = 0      
palfx.invertall = 1
yaccel = .53

[State 210, 2]
type = HitDef
triggerall = AnimElem = 4
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = A, SA
animtype  = dup
damage    = 83,10
guardflag = M
hitflag = MAF
pausetime = 12,12
guard.pausetime = 12,14
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-35
guard.sparkno = s10111
sparkno = s9241
priority = 4, Hit 
hitsound = S3,2 
getpower = 58,58
givepower = 21,21
guardsound = s1,0
ground.type = Low
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 17-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,8,0)
guard.hittime = 17-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,8,0)
ground.velocity = -1.8,-11.5   
guard.velocity = -3   
air.velocity = -1.8, -11.5
fall = 1
air.fall = 1
fall.recover = 1
fall.recovertime = 54
palfx.time = 56
palfx.add = 48,0,168
palfx.mul = 166,166,166
palfx.sinadd = 96,96,96,17
palfx.color = 0 
palfx.invertall = 1 
yaccel = .53

[State 7200, 7]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 450
trigger1 = p2movetype = H
anim = 3100
ID = 3100
sprpriority = 5
postype = p2
pos = -20,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7200, 8]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 500
trigger1 = p2movetype = H
anim = 3110
ID = 3100
sprpriority = 5
postype = p2
pos = -20,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7200, 9]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 650
trigger1 = p2movetype = H
anim = 3120
ID = 3100
sprpriority = 5
postype = p2
pos = -20,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7200, 10]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 700
trigger1 = p2movetype = H
anim = 3130
ID = 3100
sprpriority = 5
postype = p2
pos = -20,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7200, 11]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 700
trigger1 = p2movetype = H
anim = 3140
ID = 3100
sprpriority = 5
postype = p2
pos = -20,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7200, 12]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 700
trigger1 = p2movetype = H
anim = 3150
ID = 3100
sprpriority = 5
postype = p2
pos = -20,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 210, 2]
type = Varset
trigger1 = movehit > 0
var(5) = 0

[State 210, 2]
type = changestate
trigger1 = animtime = 0
value = 1038

[Statedef 1038]   ;
type    = S
movetype= A
physics = S
ctrl = 0
juggle = var(44)
anim = 1038

;[State 230, 1]
;type = nothitby
;trigger1 = var(16) > 0 && var(38) = 1
;value = SCA

;[state 210, 0]
;type = HitBy
;trigger1 = var(16) < 1 || var(38) = 0
;value = SCA,SA,HA,AP

[state 210, 0]
type = posAdd
trigger1 = AnimElem = 1
x = 16

[State 1000, 4]
type = Helper
trigger1 = time = 0
name = "n2"
pos = 0,0  
stateno = 1033

[State 210, 2]
type = Varset
trigger1 = movecontact > 0
var(44) = 9
ignorehitpause = 1

[State 210, 1]
type = PlaySnd
trigger1 = movehit > 0
trigger1 = var(5) = 1
value = s4,1
ignorehitpause = 1
persistent = 0

[State 210, 2]
type = HitDef
trigger1 = AnimElem = 1
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = A, SA
animtype  = hard
damage    = ifelse(var(5)=1,83,29),10
guardflag = M
hitflag = MAF
pausetime = 12,12
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-60+ceil(p2bodydist Y/5)
guard.sparkno = s10111
sparkno = s10006
getpower = 58,58
givepower = 21,21
priority = 4, Hit
hitsound = S(ifelse(var(5)=1,3,4)),ifelse(var(5)=1,2,1)
guardsound = s1,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
guard.slidetime = 15-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,7,0)
guard.hittime = 15-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,7,0)
ground.velocity = -1.8,-11.5    
guard.velocity = -3   
air.velocity = -1.8, -11.5
fall = 1
air.fall = 1
fall.recover = 1
fall.recovertime = 53
palfx.time = 55
palfx.add = 48,0,168
palfx.mul = 166,166,166
palfx.sinadd = 96,96,96,17
palfx.color = 0 
palfx.invertall = 1 
yaccel = .53

[State 210, 2]
type = HitDef
triggerall = AnimElem = 1
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = A, SA
animtype  = dup
damage    = ifelse(var(5)=1,83,29),10
guardflag = M
hitflag = MAF
pausetime = 12,12
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-60+ceil(p2bodydist Y/5)
guard.sparkno = s10111
sparkno = s9241
getpower = 58,58
givepower = 21,21
priority = 4, Hit
hitsound = S(ifelse(var(5)=1,3,4)),ifelse(var(5)=1,2,1)
guardsound = s1,0
ground.type = Low
ground.slidetime = 17
ground.hittime  = 17
guard.slidetime = 17-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,8,0)
guard.hittime = 17-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,8,0)
ground.velocity = -1.8,-11.5    
guard.velocity = -3   
air.velocity = -1.8, -11.5
fall = 1
air.fall = 1
fall.recover = 1
fall.recovertime = 54
palfx.time = 56
palfx.add = 48,0,168
palfx.mul = 166,166,166
palfx.sinadd = 96,96,96,17
palfx.color = 0 
palfx.invertall = 1 
yaccel = .53

[State 7200, 7]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 450
trigger1 = p2movetype = H
anim = 3100
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7200, 8]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 500
trigger1 = p2movetype = H
anim = 3110
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7200, 9]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 650
trigger1 = p2movetype = H
anim = 3120
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7200, 10]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 700
trigger1 = p2movetype = H
anim = 3130
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7200, 11]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 700
trigger1 = p2movetype = H
anim = 3140
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7200, 12]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 700
trigger1 = p2movetype = H
anim = 3150
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 210, 2]
type = Varadd
trigger1 = movehit > 0 
persistent = 0
var(5) = -1

[State 265, 7]
type = ChangeState
trigger1 = var(58) > 2 || var(58) < 0
trigger1 = var(55) = 1
trigger1 = time = 1 && moveguarded > 0 && var(3) > 0
value = 1020

[State 210, 3]
type = ChangeState
trigger1 = AnimTime = 0 
value = 1031

[Statedef 1033] ;helper
type    = A
movetype= A
physics = N
anim = 1033

[State 5050, 6]
type = nothitby
trigger1 = 1
value = SCA

[State 5050, 6]
type = turn
trigger1 = parent,facing != facing

[State 5050, 6]
type = playerpush
trigger1 = 1
value = 1

[State 5050, 6]
type = width
trigger1 = 1
value = 10,10

[State 5050, 6]
type = posadd
trigger1 = facing = 1
x = -(pos x - parent,pos x) 

[State 5050, 6]
type = posadd
trigger1 = facing = -1
x = pos x - parent,pos x 

[State 5050, 6]
type = destroyself
trigger1 = parent, stateno != 1038 && parent, stateno != 1037 && parent, stateno != 1050
trigger2 = parent, stateno = 1050 && parent, time > 10
;------------------------------------
; ONI YAKI X (rising)
[Statedef 1031]
type    = A
movetype= A
physics = N
ctrl = 0
juggle = var(44)
anim = 1031
  
;[State 230, 1]
;type = nothitby
;trigger1 = var(16) > 0 && var(38) = 1 && time >= 8
;value = ,AA,AP

;[State 230, 1]
;type = nothitby
;trigger1 = var(16) > 0 && var(38) = 1 && time < 8
;value = SCA

;[state 210, 0]
;type = NotHitBy
;trigger1 = time = 0
;trigger1 = var(16) < 1 || var(38) = 0
;value = A
;time = 0

[State 230, 0]
type = varset
trigger1 = animelem = 2,2
var(38) = 0
          
[State 1000, 1]
type = varset
trigger1 = time = 8
var(34) = 0

[State 210, 2]
type = Varadd
trigger1 = movehit > 0 
persistent = 0
var(5) = -1

[state 210, 0]
type = posAdd
trigger1 = AnimElem = 1
x = 32

[State 210, 1]
type = PlaySnd
trigger1 = Time = 0 && var(5) = 1
value = s6,1
[State 210, 1]
type = PlaySnd
trigger1 = Time = 0 && var(5) = 1
value = s27,1

[State 1300, 5]        ;ºÒ²É ¹Ø
type = projectile
trigger1 = AnimElem = 1
projanim = 1035
offset = 0,0
projsprpriority = 3
projremovetime = 34
projedgebound = 210

[State 210, 2]
type = HitDef
trigger1 = AnimElem = 1
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = A, SA
animtype  = hard
damage    = ifelse(var(5)=1,83,ifelse(var(5)=0,29,14)),10
guardflag = M
hitflag = MAF
pausetime = 12,12
getpower = 58,58
givepower = 21,21
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-40+ceil(p2bodydist Y/3)
guard.sparkno = s10012
sparkno = s10016
priority = 4, Hit
hitsound = S(ifelse(var(5)=1,3,ifelse(var(5)=0,4,3))),ifelse(var(5)=1,2,ifelse(var(5)=0,1,2))
guardsound = s1,0
ground.type = Low
ground.slidetime = 45   
ground.hittime  = 45   
guard.slidetime = 45-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,22,0)
guard.hittime = 45-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,22,0)
ground.velocity = -1.8,-11.5
air.velocity = -1.8, -11.5
guard.cornerpush.veloff = -17
ground.cornerpush.veloff = 0
guard.velocity = -11
fall = 1
air.fall = 1
fall.recover = 1
fall.recovertime = 53
palfx.time = 55
palfx.add = 48,0,168
palfx.mul = 166,166,166
palfx.sinadd = 96,96,96,17
palfx.color = 0 
palfx.invertall = 1 
yaccel = .53

[State 210, 2]
type = HitDef
triggerall = AnimElem = 1
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = A, SA
animtype  = dup
damage    = ifelse(var(5)=1,83,ifelse(var(5)=0,29,14)),10
guardflag = M
hitflag = MAF
pausetime = 12,12
getpower = 58,58
givepower = 21,21
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-40+ceil(p2bodydist Y/3)
guard.sparkno = s10012
sparkno = s9248
priority = 4, Hit
hitsound = S(ifelse(var(5)=1,3,ifelse(var(5)=0,4,3))),ifelse(var(5)=1,2,ifelse(var(5)=0,1,2))
guardsound = s1,0
ground.type = Low
ground.slidetime = 47   
ground.hittime  = 47   
guard.slidetime = 47-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,23,0)
guard.hittime = 47-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,23,0)
ground.velocity = -1.8,-11.5
air.velocity = -1.8, -11.5
guard.cornerpush.veloff = -17
ground.cornerpush.veloff = 0
guard.velocity = -11
fall = 1
air.fall = 1
fall.recover = 1
fall.recovertime = 54
palfx.time = 56
palfx.add = 48,0,168
palfx.mul = 166,166,166
palfx.sinadd = 96,96,96,17
palfx.color = 0 
palfx.invertall = 1 
yaccel = .53

[State 7200, 7]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 450 && time < 9
trigger1 = p2movetype = H
anim = 3100
ID = 3100
sprpriority = 5
postype = p2
pos = -20,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7200, 8]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 500 && time < 9
trigger1 = p2movetype = H
anim = 3110
ID = 3100
sprpriority = 5
postype = p2
pos = -20,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7200, 9]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 650 && time < 9
trigger1 = p2movetype = H
anim = 3120
ID = 3100
sprpriority = 5
postype = p2
pos = -20,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7200, 10]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 700 && time < 9
trigger1 = p2movetype = H
anim = 3130
ID = 3100
sprpriority = 5
postype = p2
pos = -20,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7200, 11]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 700 && time < 9
trigger1 = p2movetype = H
anim = 3140
ID = 3100
sprpriority = 5
postype = p2
pos = -20,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7200, 12]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 700 && time < 9
trigger1 = p2movetype = H
anim = 3150
ID = 3100
sprpriority = 5
postype = p2
pos = -20,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 210, 3]
type = Velset
trigger1 = time = 0
x = 0
y = -5.5

[State 210, 3]
type = VelAdd
trigger1 = 1
y = .53

[State 210, 2]
type = HitDef
triggerall = AnimElem = 2
triggerall = Var(5) = 1
triggerall = movecontact = 0
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = A, SA
animtype  = hard
damage    = 83,10  
guardflag = M
hitflag = MAF
pausetime = 12,12
guard.sparkno = s10012
sparkno = s10016
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-40+ceil(p2bodydist Y/3)
priority = 4, Hit
hitsound = S3,2 
guardsound = s1,0
getpower = 58,58
givepower = 21,21
ground.type = Low
ground.slidetime = 45  
ground.hittime  = 45  
guard.slidetime = 45-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,22,0)
guard.hittime = 45-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,22,0)
ground.velocity = -1.8,-11.5
air.velocity = -1.8, -11.5
guard.cornerpush.veloff = -17
ground.cornerpush.veloff = 0
guard.velocity = -11
fall = 1
air.fall = 1
fall.recover = 1
fall.recovertime = 53
palfx.time = 55
palfx.add = 48,0,168
palfx.mul = 166,166,166
palfx.sinadd = 96,96,96,17
palfx.color = 0 
palfx.invertall = 1 
yaccel = .53

[State 210, 2]
type = HitDef
triggerall = AnimElem = 2
triggerall = Var(5) = 1
triggerall = movecontact = 0
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = A, SA
animtype  = dup
damage    = 83,10
guardflag = M
hitflag = MAF
pausetime = 12,12
guard.sparkno = s10012
sparkno = s9248
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-40+ceil(p2bodydist Y/3)
priority = 4, Hit
hitsound = S3,2 
guardsound = s1,0
getpower = 58,58
givepower = 21,21
ground.type = Low
ground.slidetime = 47  
ground.hittime  = 47  
guard.slidetime = 47-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,23,0)
guard.hittime = 47-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,23,0)
ground.velocity = -1.8,-11.5
air.velocity = -1.8, -11.5
guard.cornerpush.veloff = -17
ground.cornerpush.veloff = 0
guard.velocity = -11
fall = 1
air.fall = 1
fall.recover = 1
fall.recovertime = 54
palfx.time = 56
palfx.add = 48,0,168
palfx.mul = 166,166,166
palfx.sinadd = 96,96,96,17
palfx.color = 0 
palfx.invertall = 1 
yaccel = .53

[State 1300, 5]     ;ºÒ²É À§
type = projectile
trigger1 = AnimElem = 5
projanim = 1036
offset = 0,0
projsprpriority = 0
projremovetime = 31
projedgebound = 210
                  
[state 1300,5]
type = helper
id = 8301
stateno = 8301
ownpal = 1
name = "iori's shadow"
triggerall = p2statetype != L && var(59) >= 0
triggerall = (var(53) = 0 && power >= 1000 + var(20)*100) || (var(53) = 1 && power >= 2000 + var(20)*100 && var(14) < 1 && var(16) < 1)
triggerall = var(55) = 1
triggerall = (var(53) = 0 && var(56) > 0) || var(53) = 1
triggerall = numhelper(8301) < 1
triggerall = Pos Y >= -15
triggerall = p2bodydist X <= 99
triggerall = Vel Y > 0
trigger1 = moveguarded > 0
trigger1 = random <= 400
trigger2 = p2movetype != H
trigger2 = random <= 400

[State 209, 1]
type = ChangeState
trigger1 = time >= 18
value = 1032
;-----------------------------------
; ONI YAKI X (landing)
[Statedef 1032]
type    = S
movetype= I
physics = S
poweradd= 0
anim = 1034
ctrl = 0
velset = 0,0

[State 140, 1]
type = varset
trigger1 = Time = 0
var(18) = 0

[State 52, 3]
type = PosSet
trigger1 = Vel Y = 0
y = 0

[State 7800, 3]
type = BGPalfx
trigger1 = var(4) = 2 && prevstateno = 7101 && animtime < -2
ignorehitpause = 1
supermove = 1
time = 2
mul = 158,158,158
invertall = 1

[State 8160, 17]
type = Explod
trigger1 = NumExplod(3140) < 7 && prevstateno = 7101 && Random < 300 && p2movetype = H
anim = 3140
ID = 3140
sprpriority = 5
postype = p2
pos = 0,-20
random = 100,70
ignorehitpause = 1
ownpal = 1

[State 8160, 18]
type = Explod
trigger1 = NumExplod(3140) < 7 && prevstateno = 7101 && Random < 300 && p2movetype = H
anim = 3150
ID = 3140
sprpriority = 5
postype = p2
pos = 0,-20
random = 100,70
ignorehitpause = 1
ownpal = 1

[State 210, 3]
type = ChangeState
value = 105
triggerall = var(55) = 1
triggerall = animtime = 0
triggerall = NumHelper(8301) = 0
trigger1 = frontedgedist <= 35
trigger1 = p2stateno = 5050 || p2stateno = 5101 || p2stateno = 5201 || p2stateno = 5200
trigger1 = roundstate != 3

[State 210, 3]
type = ChangeState
trigger1 = animtime = 0 && command = "holdup" && var(55) = 0
value = 40

[State 210, 3]
type = ChangeState
trigger1 = animtime = 0 && command != "holdup" && var(55) = 0
trigger2 = animtime = 0 && var(55) = 1
trigger2 = NumHelper(8301) != 0 || frontedgedist > 35 || (p2stateno != 5050 && p2stateno != 5101 && p2stateno != 5201 && p2stateno != 5200) || roundstate = 3
value = 0
ctrl = 1
;---------------------------------
; ONI YAKI Y (start)
[Statedef 1040]
type    = S
movetype= A
physics = S
poweradd= 83
ctrl = 0
juggle = var(44)
anim = 1039
facep2 = 1
velset = 0,0
sprpriority = 0

[State 230,0]
type = varset
trigger1 = var(55) = 1 && var(3) > 0 && var(50) = 0 && time = 0
trigger1 = prevstateno = 4611 || prevstateno = 4111
var(50) = 16

[State 230, 0]
type = varset
trigger1 = time = 0
var(38) = 1

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 1

[State 210, 1]
type = varset
trigger1 = time = 0
var(18) = 0

[State 210, 2]
type = Varset
trigger1 = time = 0
var(5) = 1

[State 210, 2]
type = Varset
trigger1 = movehit > 0
trigger1 = time = 7
var(5) = 0

[State 210, 2]
type = Varset
triggerall = movecontact > 0
trigger1 = numtarget(1040) > 0
trigger1 = target(1040),stateno != 5020
trigger2 = numtarget(1040) = 0
var(44) = 9
ignorehitpause = 1

[State 210, 2]
type = Varset
trigger1 = movecontact > 0 && numtarget(1040) > 0
trigger1 = target(1040),stateno = 5020
var(44) = 16
ignorehitpause = 1

[state 1040, 1]
type = NotHitBy
trigger1 = time < 5
trigger2 = time >= 5 && time <= 6
trigger2 = var(16) < 1 || var(38) = 0
trigger2 = movecontact = 0
trigger3 = time >= 5 && time <= 6
trigger3 = var(16) > 0 && var(38) = 1
value = SCA
ignorehitpause = 1

[state 210, 0]
type = HitBy
trigger1 = time >= 5 && time <= 6
trigger1 = var(16) < 1 || var(38) = 0
trigger1 = movecontact > 0
value = SCA,SA,HA,AP
ignorehitpause = 1

[State 210, 1]
type = Posadd
trigger1 = animelem = 4
x = 1

[State 210, 1]
type = varset
trigger1 = prevstateno = 245
var(18) = 3

[State 210, 0]
type = PlaySnd
trigger1 = Time = 1
value = s4,3
channel = 1
[State 210, 0]
type = PlaySnd
trigger1 = animelem = 4
value = s26,6
channel = 1

[State 210, 1]
type = PlaySnd
trigger1 = movehit > 0
value = s4,1
ignorehitpause = 1
persistent = 0

[State 210, 2]
type = HitDef
triggerall = AnimElem = 4
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = A, SA
ID = 1040
animtype  = h
damage    = 82,10
guardflag = M
hitflag = MAF
pausetime = 12,12
guard.pausetime = 12,14
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-35
guard.sparkno = s10111
getpower = 58,58
givepower = 21,21
sparkno = s10006
priority = 7, Hit
hitsound = S3,2
guardsound = s1,0
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.slidetime = 18-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,8,0)
guard.hittime = 18-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,8,0)
ground.velocity = 0
ground.cornerpush.veloff = -1
air.cornerpush.veloff = -1
guard.cornerpush.veloff = -3
air.velocity = -4.5,-7.5
air.fall = 1
fall.recover = 1
fall.recovertime = 41
palfx.time = 43
palfx.add = 48,0,168
palfx.mul = 166,166,166
palfx.sinadd = 96,96,96,17
palfx.color = 0 
palfx.invertall = 1 
yaccel = .53

[State 210, 2]
type = HitDef
triggerall = AnimElem = 4
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = A, SA
ID = 1040
animtype  = h
air.animtype  = dup
damage    = 82,10
guardflag = M
hitflag = MAF
pausetime = 12,12
guard.pausetime = 12,14
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-35
guard.sparkno = s10111
getpower = 58,58
givepower = 21,21
sparkno = s9241
priority = 7, Hit
hitsound = S3,2
guardsound = s1,0
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.slidetime = 18-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,8,0)
guard.hittime = 18-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,8,0)
ground.velocity = 0
ground.cornerpush.veloff = -1
air.cornerpush.veloff = -1
guard.cornerpush.veloff = -3
air.velocity = -4.5,-7.5
air.fall = 1
fall.recover = 1
fall.recovertime = 41
palfx.time = 43
palfx.add = 48,0,168
palfx.mul = 166,166,166
palfx.sinadd = 96,96,96,17
palfx.color = 0 
palfx.invertall = 1 
yaccel = .53

[State 7200, 7]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 450
trigger1 = p2movetype = H
anim = 3100
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7200, 8]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 500
trigger1 = p2movetype = H
anim = 3110
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7200, 9]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 650
trigger1 = p2movetype = H
anim = 3120
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7200, 10]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 700
trigger1 = p2movetype = H
anim = 3130
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7200, 11]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 700
trigger1 = p2movetype = H
anim = 3140
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7200, 12]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 700
trigger1 = p2movetype = H
anim = 3150
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 209, 1]
type = ChangeState
trigger1 = animtime = 0
value = 1037

[Statedef 1037]    ;
type    = S
movetype= A
physics = S
ctrl = 0
juggle = var(44)
anim = 1037

[state 1040, 1]
type = changeanim
trigger1 = time = 0 && var(18) = 3
value = 1042

[State 325,8]
type = Varset
trigger1 = time = 0
var(18) = 0

[State 325,8]
type = Varset
triggerall = time = 1 && p2life > 15
trigger1 = (var(3) < 1 && power >= 2000 + var(20)*100 && random < 300) || (var(3) < 1 && power >= 3000 + var(20)*100)
trigger2 = var(3) > 0 && var(3) < 140 && power >= 1000 + var(20)*100
var(18) = 1

[State 210, 1]
type = PlaySnd
trigger1 = movehit > 0 && var(5) = 1
value = s4,1
ignorehitpause = 1
persistent = 0

[state 1040, 1]
type = NotHitBy
triggerall = time < 3
trigger1 = var(16) < 1 || var(38) = 0
trigger1 = movecontact = 0
trigger2 = var(16) > 0 && var(38) = 1
value = SCA
ignorehitpause = 1

[state 210, 0]
type = HitBy
trigger1 = time < 3
trigger1 = var(16) < 1 || var(38) = 0
trigger1 = movecontact > 0
value = SCA,SA,HA,AP
ignorehitpause = 1

[State 210, 2]
type = Varset
triggerall = movecontact > 0
trigger1 = numtarget(1037) > 0
trigger1 = target(1037),stateno != 5020 && target(1037),stateno != 5030
trigger2 = numtarget(1037) = 0
var(44) = 9
ignorehitpause = 1

[State 210, 2]
type = Varset
trigger1 = movecontact > 0 && numtarget(1037) > 0
trigger1 = target(1037),stateno = 5020 || target(1037),stateno = 5030
var(44) = 16
ignorehitpause = 1

[state 1040, 2]
type = posAdd
trigger1 = time = 0
x = 16

[State 1000, 4]
type = Helper
trigger1 = time = 0
name = "n2"
pos = 0,0  
stateno = 1033

[State 210, 2]
type = HitDef
trigger1 = AnimElem = 1
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = A, SA
ID = 1037
animtype  = h
damage    = ifelse(var(5)=1,82,30),10
guardflag = M
hitflag = MAF
pausetime = 12,12
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-60+ceil(p2bodydist Y/5)
guard.sparkno = s10111
getpower = 58,58
givepower = 21,21
sparkno = s10006
priority = 7, Hit
hitsound = s(ifelse(var(5)=1,3,4)),ifelse(var(5)=1,2,1)
guardsound = s1,0
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.slidetime = 18-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,8,0)
guard.hittime = 18-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,8,0)
ground.velocity = 0
air.velocity = -4.5,-7.5
air.fall = 1
fall.recover = 1
fall.recovertime = 41
palfx.time = 43
palfx.add = 48,0,168
palfx.mul = 166,166,166
palfx.sinadd = 96,96,96,17
palfx.color = 0 
palfx.invertall = 1 
yaccel = .53

[State 210, 2]
type = HitDef
triggerall = AnimElem = 1
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = A, SA
ID = 1037
animtype  = h
air.animtype  = dup
damage    = ifelse(var(5)=1,82,30),10
guardflag = M
hitflag = MAF
pausetime = 12,12
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-60+ceil(p2bodydist Y/5)
guard.sparkno = s10111
getpower = 58,58
givepower = 21,21
sparkno = s9241
priority = 7, Hit
hitsound = s(ifelse(var(5)=1,3,4)),ifelse(var(5)=1,2,1)
guardsound = s1,0
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.slidetime = 18-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,8,0)
guard.hittime = 18-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,8,0)
ground.velocity = 0
air.velocity = -4.5,-7.5
air.fall = 1
fall.recover = 1
fall.recovertime = 41
palfx.time = 43
palfx.add = 48,0,168
palfx.mul = 166,166,166
palfx.sinadd = 96,96,96,17
palfx.color = 0 
palfx.invertall = 1 
yaccel = .53

[State 210, 2]
type = Varadd
trigger1 = movehit > 0
trigger1 = time = 3
persistent = 0
var(5) = -1

[State 7200, 7]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 450
trigger1 = p2movetype = H
anim = 3100
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7200, 8]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 500
trigger1 = p2movetype = H
anim = 3110
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7200, 9]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 650
trigger1 = p2movetype = H
anim = 3120
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7200, 10]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 700
trigger1 = p2movetype = H
anim = 3130
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7200, 11]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 700
trigger1 = p2movetype = H
anim = 3140
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7200, 12]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 700
trigger1 = p2movetype = H
anim = 3150
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 201, 1]
type = ChangeState
value = 2599
trigger1 = var(55) = 1 && var(14) > 0
trigger1 = movehit > 0 && time > 0 && p2statetype != A

[State 265, 7]
type = varset
trigger1 = var(58) > 2 || var(58) < 0
trigger1 = var(55) = 1 && var(14) < 1 && var(16) < 1 && p2statetype != A
trigger1 = time = 1 && movehit > 0 && var(18) = 1 && var(45) = 0
var(45) = 15
ignorehitpause = 1
persistent = 0

[State 265, 7]
type = ChangeState
trigger1 = var(58) > 2 || var(58) < 0
trigger1 = var(55) = 1 && var(14) < 1 && var(16) < 1 && p2statetype != A
trigger1 = time = 1 && movehit > 0 && var(18) = 1
value = 1998+ifelse(var(3)>0&&power>=2000+var(20)*100&&random<500,402,0)

[State 265, 7]
type = ChangeState
trigger1 = var(58) > 2 || var(58) < 0
trigger1 = var(55) = 1
trigger1 = time = 1 && movehit > 0 && p2statetype != A
trigger1 = var(3) > 384 || (var(3) < 257 && var(3) > 0 && power < 1000 + var(20)*100)
value = 4733

[State 265, 7]
type = ChangeState
trigger1 = var(58) > 2 || var(58) < 0
trigger1 = var(55) = 1 && random < 500
trigger1 = time = 1 && movehit > 0 && var(3) > 256 && var(3) < 385
value = 520
[State 265, 7]
type = ChangeState
trigger1 = var(58) > 2 || var(58) < 0
trigger1 = var(55) = 1
trigger1 = time = 1 && movehit > 0 && var(3) > 0 && var(3) < 385
value = 510

[State 265, 7]
type = ChangeState
trigger1 = var(58) > 2 || var(58) < 0
trigger1 = var(55) = 1
trigger1 = time = 1 && moveguarded > 0 && var(3) > 0
value = 1020

[State 209, 1]
type = ChangeState
trigger1 = animtime = 0
value = 1041

; ONI YAKI Y (rising)
[Statedef 1041]
type    = A
movetype= A
physics = N
ctrl = 0
juggle = var(44)
anim = 1041

[State 210, 1]
type = PlaySnd
trigger1 = movehit > 0 && var(5) != 0 && hitpausetime = 11
value = s4,1
ignorehitpause = 1
persistent = 0

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time >= 14
value = ,AA,AP

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time < 14
value = SCA

[State 230, 0]
type = varset
trigger1 = animelem = 3
var(38) = 0

[State 1000, 1]
type = varset
trigger1 = time = 14
var(34) = 0

[state 210, 0]
type = posAdd
trigger1 = time = 0
x = 32

[State 210, 2]
type = HitDef
trigger1 = Animelem = 1
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = A, SA
animtype  = hard
damage    = ifelse(var(5)=1,82,ifelse(var(5)=0,30,15)),10
guardflag = M
hitflag = MAF
pausetime = 12,12
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-40+ceil(p2bodydist Y/3);-60
guard.sparkno = s10012
sparkno = s10016
getpower = 58,58
givepower = 21,21
priority = 7, Hit
hitsound = s(ifelse(var(5)=0,4,3)),ifelse(var(5)=0,1,2)
guardsound = s1,0
ground.type = Low
ground.slidetime = 45
ground.hittime  = 45
guard.slidetime = 45-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,22,0)
guard.hittime = 45-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,22,0)
guard.velocity = -11
ground.velocity = -1.8,-11.5    
air.velocity = -1.8, -11.5
guard.cornerpush.veloff = -17
ground.cornerpush.veloff = 0
fall = 1
air.fall = 1
fall.recover = 1
fall.recovertime = 53
palfx.time = 55
palfx.add = 48,0,168
palfx.mul = 166,166,166
palfx.sinadd = 96,96,96,17
palfx.color = 0 
palfx.invertall = 1 
yaccel = .53

[State 210, 2]
type = HitDef
triggerall = Animelem = 1
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = A, SA
animtype  = d
damage    = ifelse(var(5)=1,82,ifelse(var(5)=0,30,15)),10
guardflag = M
hitflag = MAF
pausetime = 12,12
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-40+ceil(p2bodydist Y/3)
guard.sparkno = s10012
sparkno = s9248
getpower = 58,58
givepower = 21,21
priority = 7, Hit
hitsound = s(ifelse(var(5)=0,4,3)),ifelse(var(5)=0,1,2)
guardsound = s1,0
ground.type = Low
ground.slidetime = 47
ground.hittime  = 47
guard.slidetime = 47-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,23,0)
guard.hittime = 47-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,23,0)
guard.velocity = -11
ground.velocity = -1.8,-11.5    
air.velocity = -1.8, -11.5
guard.cornerpush.veloff = -17
ground.cornerpush.veloff = 0
fall = 1
air.fall = 1
fall.recover = 1
fall.recovertime = 54
palfx.time = 56
palfx.add = 48,0,168
palfx.mul = 166,166,166
palfx.sinadd = 96,96,96,17
palfx.color = 0 
palfx.invertall = 1 
yaccel = .53

[State 210, 2]
type = HitDef
triggerall = Animelem = 2
triggerall = var(5) = 1
triggerall = movecontact = 0
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = A, SA
animtype  = heavy
damage    = 82,10  
guardflag = M
hitflag = MAF
pausetime = 12,12
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-40+ceil(p2bodydist Y/3)
guard.sparkno = s10012
sparkno = s10016
getpower = 58,58
givepower = 21,21
priority = 6, Hit
hitsound = S4,1
guardsound = s1,0
ground.type = Low
ground.slidetime = 45
ground.hittime  = 45
guard.slidetime = 45-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,22,0)
guard.hittime = 45-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,22,0)
guard.velocity = -11
ground.velocity = -1.8,-11.5    
air.velocity = -1.8, -11.5
guard.cornerpush.veloff = -17
ground.cornerpush.veloff = 0
fall = 1
air.fall = 1
fall.recover = 1
fall.recovertime = 53
palfx.time = 55
palfx.add = 48,0,168
palfx.mul = 166,166,166
palfx.sinadd = 96,96,96,17
palfx.color = 0 
palfx.invertall = 1 
yaccel = .53

[State 210, 2]
type = HitDef
triggerall = Animelem = 2
triggerall = var(5) = 1
triggerall = movecontact = 0
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = A, SA
animtype  = d
damage    = 82,10  
guardflag = M
hitflag = MAF
pausetime = 12,12
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-40+ceil(p2bodydist Y/3)
guard.sparkno = s10012
sparkno = s9248
getpower = 58,58
givepower = 21,21
priority = 6, Hit
hitsound = S4,1
guardsound = s1,0
ground.type = Low
ground.slidetime = 47
ground.hittime  = 47
guard.slidetime = 47-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,23,0)
guard.hittime = 47-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,23,0)
guard.velocity = -11
ground.velocity = -1.8,-11.5    
air.velocity = -1.8, -11.5
guard.cornerpush.veloff = -17
ground.cornerpush.veloff = 0
fall = 1
air.fall = 1
fall.recover = 1
fall.recovertime = 54
palfx.time = 56
palfx.add = 48,0,168
palfx.mul = 166,166,166
palfx.sinadd = 96,96,96,17
palfx.color = 0 
palfx.invertall = 1 
yaccel = .53

[State 7200, 7]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 450
trigger1 = p2movetype = H
trigger1 = time < 16
anim = 3100
ID = 3100
sprpriority = 5
postype = p2
pos = -20,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7200, 8]
type = Explod
trigger1 = movehit > 0
trigger1 = time < 16
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 500
trigger1 = p2movetype = H
anim = 3110
ID = 3100
sprpriority = 5
postype = p2
pos = -20,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7200, 9]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = time < 16
trigger1 = Random < 650
trigger1 = p2movetype = H
anim = 3120
ID = 3100
sprpriority = 5
postype = p2
pos = -20,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7200, 10]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = time < 16
trigger1 = Random < 700
trigger1 = p2movetype = H
anim = 3130
ID = 3100
sprpriority = 5
postype = p2
pos = -20,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7200, 11]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 700
trigger1 = p2movetype = H
anim = 3140
ID = 3100
sprpriority = 5
postype = p2
pos = -20,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7200, 12]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 700
trigger1 = p2movetype = H
anim = 3150
ID = 3100
sprpriority = 5
postype = p2
pos = -20,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 210, 2]
type = Varadd
trigger1 = movehit > 0
persistent = 0
var(5) = -1

[State 210, 1]
type = PlaySnd
trigger1 = Time = 0 && var(5) = 1
value = s6,1
[State 210, 1]
type = PlaySnd
trigger1 = Time = 0 && var(5) = 1
value = s27,1

[State 1300, 5]
type = projectile
trigger1 = time = 0
projanim = 1035
offset = 0,0
projsprpriority = 3
projremovetime = 34
projedgebound = 210

[State 1300, 5]
type = projectile
trigger1 = AnimElem = 5
projanim = 1036
offset = 0,0
projsprpriority = 0
projremovetime = 31
projedgebound = 210

[State 210, 3]
type = Velset
trigger1 = time = 0
x = 0
y = -9.2

[State 210, 3]
type = VelAdd
trigger1 = 1
y = .49

[state 1300,5]
type = helper
id = 8301
stateno = 8301
ownpal = 1
name = "iori's shadow"
triggerall = p2statetype != L && var(59) >= 0
triggerall = (var(53) = 0 && power >= 1000 + var(20)*100) || (var(53) = 1 && power >= 2000 + var(20)*100 && var(14) < 1 && var(16) < 1)
triggerall = var(55) = 1
triggerall = (var(53) = 0 && var(56) > 0) || var(53) = 1
triggerall = numhelper(8301) < 1
triggerall = time = 21
triggerall = p2bodydist X <= 99
trigger1 = moveguarded > 0
trigger1 = random <= 400
trigger2 = p2movetype != H
trigger2 = random <= 400

[State 209, 1]
type = ChangeState
trigger1 = time >= 35
value = 1032
;-----------------------------------------
; ONI YAKI Z (start)
[Statedef 1050]
type    = S
movetype= A
physics = S
ctrl = 0
juggle = var(44)
anim = 1032
facep2 = 1
velset = 0,0
sprpriority = 0

[State 260, 3] 
type = Afterimage
trigger1 = Time = 0
time = 2
paladd = 84,60,164
length = 8
FrameGap = 4
Trans = Add1

[State 3000, 2]
type = AfterImagetime
trigger1 = time%2 = 0 && time < 16
time = 2

[State 1000, 1]
type = statetypeset
trigger1 = time = 10
value = A
physics = N

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 0

[State 210, 2]
type = attackmulset
trigger1 = var(3) < 1
value = 1.0
[State 210, 2]
type = attackmulset
trigger1 = var(3) > 0
value = 1.0;0.7

[State 210, 2]
type = Varset
trigger1 = time = 0
var(5) = 1

[State 210, 2]
type = Varset
trigger1 = movehit > 0
trigger1 = time = 7
var(5) = 0

[State 1050, 0]
type = varadd
triggerall = time = 0
trigger1 = prevstateno != 510 && prevstateno != 511 && prevstateno != 516 && prevstateno != 520
trigger2 = var(33) = 5
var(20) = 5
[State 261, 0]
type = varadd
triggerall = time = 0 && var(3) > 0
trigger1 = prevstateno != 510 && prevstateno != 511 && prevstateno != 516 && prevstateno != 520
trigger2 = var(33) = 5
var(2) = -500

[State 1050, 0]
type = varadd
trigger1 = time = 0 && var(33) != 5
trigger1 = prevstateno = 510 || prevstateno = 511 || prevstateno = 516 || prevstateno = 520
var(20) = 10
[State 261, 0]
type = varadd
trigger1 = time = 0 && var(33) != 5 && var(3) > 0
trigger1 = prevstateno = 510 || prevstateno = 511 || prevstateno = 516 || prevstateno = 520
var(2) = -1000

[State 261, 1]
type = Explod
trigger1 = Time = 0 && var(33) != 5
trigger1 = prevstateno = 510 || prevstateno = 511 || prevstateno = 516 || prevstateno = 520
anim = 930
pos = 10,-70
postype = p1
sprpriority = 2
pausemovetime = 9999
supermove = 1
ontop = 1

[State 261, 3] 
type = EnvColor
trigger1 = Time = 0 && var(33) != 5
trigger1 = prevstateno = 510 || prevstateno = 511 || prevstateno = 516 || prevstateno = 520
value = 230,230,230
under = 1
time = 1

[State 210, 1]
type = PlaySnd
trigger1 = time < 8
trigger1 = movehit > 0
value = s4,1
ignorehitpause = 1
persistent = 0

[state 1050, 1]
type = NotHitBy
trigger1 = time < 30
value = SCA

[State 210, 1]
type = Posadd
trigger1 = animelem = 4
x = 1

[state 1050, 2]
type = posAdd
trigger1 = AnimElem = 5
x = 16

[State 1000, 4]
type = Helper
trigger1 = time = 7
name = "n2"
pos = 0,0  
stateno = 1033

[State 210, 0]
type = PlaySnd
trigger1 = Time = 1
value = s4,3
channel = 1
[State 210, 0]
type = PlaySnd
trigger1 = animelem = 4
value = s26,6
channel = 1

[State 210, 2]
type = HitDef
trigger1 = AnimElem = 4
attr = A, SA
animtype  = hard
damage    = 83,10
guardflag = M
hitflag = MAF
pausetime = 12,12
guard.pausetime = 12,14
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-35
guard.sparkno = s10111
sparkno = s10006
getpower = 0,0
givepower = 21,21
guard.sparkno = -1
priority = 7, Hit
hitsound = S3,2
guardsound = s1,0
ground.type = Low
ground.cornerpush.veloff = -1
air.cornerpush.veloff = -1
guard.cornerpush.veloff = -3
ground.slidetime = 15
ground.hittime  = 15
guard.slidetime = 15-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,7,0)
guard.hittime = 15-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,7,0)
ground.velocity = -4,-11.5   
air.velocity = -3,-11.5
fall = 1
air.fall = 1
fall.recover = 1
fall.recovertime = 53
palfx.time = 55
palfx.add = 48,0,168
palfx.mul = 166,166,166
palfx.sinadd = 96,96,96,17
palfx.color = 0 
palfx.invertall = 1 
yaccel = .53

[State 210, 2]
type = movehitreset
trigger1 = AnimElem = 5

[State 210, 2]
type = HitDef
trigger1 = AnimElem = 5 && p2life > 0
attr = A, SA
animtype  = hard
damage    = ifelse(var(5)=1,83,30),10
guardflag = M
hitflag = MAF
pausetime = 12,12
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-60+ceil(p2bodydist Y/5)
guard.sparkno = s10111
sparkno = s10006
getpower = 0,0
givepower = 21,21
guard.sparkno = -1
priority = 7, Hit
hitsound = S3,2 
guardsound = s1,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
guard.slidetime = 15-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,7,0)
guard.hittime = 15-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,7,0)
ground.cornerpush.veloff = 0
air.cornerpush.veloff = -3
guard.cornerpush.veloff = -3
ground.velocity = -3,-11.5   
guard.velocity = -3   
air.velocity = -3,-11.5
fall = 1
air.fall = 1
fall.recover = 1
fall.recovertime = 53
palfx.time = 55
palfx.add = 48,0,168
palfx.mul = 166,166,166
palfx.sinadd = 96,96,96,17
palfx.color = 0 
palfx.invertall = 1 
yaccel = .53

[State 210, 2]
type = Varadd
trigger1 = movehit > 0
trigger1 = time = 10
persistent = 0
var(5) = -1

[State 7200, 7]
type = Explod
trigger1 = time < 10
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 450
trigger1 = p2movetype = H
anim = 3100
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7200, 8]
type = Explod
trigger1 = time < 10
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 500
trigger1 = p2movetype = H
anim = 3110
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7200, 9]
type = Explod
trigger1 = time < 10
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 650
trigger1 = p2movetype = H
anim = 3120
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7200, 10]
type = Explod
trigger1 = time < 10
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 700
trigger1 = p2movetype = H
anim = 3130
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7200, 11]
type = Explod
trigger1 = time < 10
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 700
trigger1 = p2movetype = H
anim = 3140
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7200, 12]
type = Explod
trigger1 = time < 10
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 700
trigger1 = p2movetype = H
anim = 3150
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

; ONI YAKI Z (rising)

[state 210, 0]
type = posAdd
trigger1 = AnimElem = 6
x = 32

[State 210, 2]
type = HitDef
trigger1 = AnimElem = 6 && p2life > 0
attr = A, SA
animtype  = hard
damage    = ifelse(var(5)=1,83,ifelse(var(5)=0,30,15)),10
guardflag = M
hitflag = MAF
pausetime = 12,12
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-40+ceil(p2bodydist Y/3)
sparkno = s10016
guard.sparkno = s10012
priority = 7, Hit
hitsound = s4,1
guardsound = s1,0
ground.cornerpush.veloff = -1
air.cornerpush.veloff = -1
guard.cornerpush.veloff = -17
getpower = 0,0
givepower = 21,21
ground.type = Low
ground.slidetime = 45
ground.hittime  = 45
guard.slidetime = 45-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,22,0)
guard.hittime = 45-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,22,0)
guard.velocity = -11
ground.velocity = -2.2,-11.5    
air.velocity = -2.2,-11
fall = 1
air.fall = 1
fall.recover = 1
fall.recovertime = 53
palfx.time = 55
palfx.add = 48,0,168
palfx.mul = 166,166,166
palfx.sinadd = 96,96,96,17
palfx.color = 0 
palfx.invertall = 1 
yaccel = .53

[State 210, 2]
type = HitDef
trigger1 = AnimElem = 7
trigger1 = var(5) = 1
trigger1 = movecontact = 0
attr = A, SA
animtype  = hard
damage    = 83,10
guardflag = M
hitflag = MAF
pausetime = 12,12
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-40+ceil(p2bodydist Y/3)
sparkno = s10016
getpower = 0,0
givepower = 21,21
guard.sparkno = s10012
priority = 7, Hit
hitsound = s4,1
guardsound = s1,0
ground.cornerpush.veloff = -1
air.cornerpush.veloff = -1
guard.cornerpush.veloff = -17
ground.type = Low
ground.slidetime = 45
ground.hittime  = 45
guard.slidetime = 45-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,22,0)
guard.hittime = 45-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,22,0)
guard.velocity = -11
ground.velocity = -2.2,-11.5    
air.velocity = -2.2,-11
fall = 1
air.fall = 1
fall.recover = 1
fall.recovertime = 53
palfx.time = 55
palfx.add = 48,0,168
palfx.mul = 166,166,166
palfx.sinadd = 96,96,96,17
palfx.color = 0 
palfx.invertall = 1 
yaccel = .53

[State 210, 2]
type = Varadd
trigger1 = movehit > 0
trigger1 = time > 10
persistent = 0
var(5) = -1

[State 210, 1]
type = PlaySnd
trigger1 = time = 10 && var(5) = 1
trigger2 = animelem = 13
value = s6,1
[State 210, 1]
type = PlaySnd
trigger1 = time = 10 && var(5) = 1
trigger2 = animelem = 13
value = s27,1

[State 210, 1]
type = PlaySnd
trigger1 = movehit > 0 && var(5) = 1
trigger1 = time > 7 && time < 10
value = s4,1
ignorehitpause = 1
persistent = 0
[State 210, 1]
type = PlaySnd
trigger1 = movehit > 0 && var(5) = 1
trigger1 = time >=10 && time < 19
value = s3,2
ignorehitpause = 1
persistent = 0

[State 7260, 6]
type = Explod
trigger1 = time >= 10
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 3
trigger1 = Random < 450
trigger1 = Time < 19
trigger1 = p2movetype = H
anim = 3100
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7260, 7]
type = Explod
trigger1 = time >= 10
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 3
trigger1 = Random < 500
trigger1 = Time < 19
trigger1 = p2movetype = H
anim = 3110
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7260, 8]
type = Explod
trigger1 = time >= 10
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 3
trigger1 = Random < 650
trigger1 = Time < 19
trigger1 = p2movetype = H
anim = 3120
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7260, 9]
type = Explod
trigger1 = time >= 10
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 2
trigger1 = Random < 700
trigger1 = Time < 19
trigger1 = p2movetype = H
anim = 3130
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7260, 10]
type = Explod
trigger1 = time >= 10
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 3
trigger1 = Random < 700
trigger1 = p2movetype = H
anim = 3140
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7260, 11]
type = Explod
trigger1 = time >= 10
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 4
trigger1 = Random < 700
trigger1 = p2movetype = H
anim = 3150
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[state 1300,5]
type = helper
id = 8301
stateno = 8301
ownpal = 1
name = "iori's shadow"
triggerall = p2statetype != L && var(59) >= 0
triggerall = (var(53) = 0 && power >= 1000 + var(20)*100) || (var(53) = 1 && power >= 2000 + var(20)*100 && var(14) < 1 && var(16) < 1)
triggerall = var(55) = 1
triggerall = (var(53) = 0 && var(56) > 0) || var(53) = 1
triggerall = numhelper(8301) < 1
triggerall = time = 31
triggerall = p2bodydist X <= 99
trigger1 = moveguarded > 0
trigger1 = random <= 400
trigger2 = p2movetype != H
trigger2 = random <= 400

[State 210, 2]
type = movehitreset
trigger1 = AnimElem = 12

[State 210, 2]
type = HitDef
trigger1 = AnimElem = 12 && p2life > 0
attr = A, SA
animtype  = hard
damage    = ifelse(var(5)=1,83,ifelse(var(5)=0,30,15)),5
guardflag = M
hitflag = MAF
pausetime = 12,12
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-70+ceil(p2bodydist Y/5)
sparkno = s10006
guard.sparkno = s10012
getpower = 0,0
givepower = 21,21
priority = 7, Hit
hitsound = S3,2
guardsound = s1,0
ground.type = Low
ground.slidetime = 45
ground.hittime  = 45
guard.slidetime = 45-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,22,0)
guard.hittime = 45-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,22,0)
ground.velocity = -2.2,-11.5   
guard.velocity = -3   
air.velocity = -2.2, -11.5
fall = 1
air.fall = 1
fall.recover = 1
fall.recovertime = 61
palfx.time = 63
palfx.add = 48,0,168
palfx.mul = 166,166,166
palfx.sinadd = 96,96,96,17
palfx.color = 0 
palfx.invertall = 1 
yaccel = .53

[State 210, 2]
type = Varadd
trigger1 = movehit > 0
trigger1 = time = 22
persistent = 0
var(5) = -1

[State 210, 2]
type = HitDef
trigger1 = AnimElem = 13 && p2life > 0
attr = A, SA
animtype  = hard
damage    = ifelse(var(5)=1,83,ifelse(var(5)=0,30,15)),5
guardflag = M
hitflag = MAF
pausetime = 12,12
guard.pausetime = 12,12
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-55+ceil(p2bodydist Y/3)
guard.sparkno = s10012
sparkno = s10006
getpower = 0,0
givepower = 21,21
priority = 7, Hit
hitsound = S4,1
guardsound = s1,0
ground.type = Low
ground.slidetime = 45
ground.hittime  = 45
guard.slidetime = 45-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,22,0)
guard.hittime = 45-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,22,0)
guard.velocity = -11
ground.velocity = -2.2,-11.5   
air.velocity = -2.2, -11.5
ground.cornerpush.veloff = 0
fall = 1
air.fall = 1
fall.recover = 1
fall.recovertime = 62
palfx.time = 64
palfx.add = 48,0,168
palfx.mul = 166,166,166
palfx.sinadd = 96,96,96,17
palfx.color = 0 
palfx.invertall = 1 
yaccel = .53

[State 210, 2]
type = HitDef
trigger1 = AnimElem = 14
trigger1 = Var(5) = 1
trigger1 = movecontact = 0
attr = A, SA
animtype  = hard
damage    = 83,5  
guardflag = M
hitflag = MAF
pausetime = 12,12
guard.sparkno = s10012
sparkno = s10006
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-43+ceil(p2bodydist Y/3)
priority = 7, Hit
hitsound = S3,2 
getpower = 0,0
givepower = 21,21
guardsound = s1,0
ground.type = Low
ground.slidetime = 45  
ground.hittime  = 45  
guard.slidetime = 45-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,22,0)
guard.hittime = 45-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,22,0)
ground.velocity = -2.2,-11.5
air.velocity = -2.2, -11.5
guard.velocity = -11
ground.cornerpush.veloff = 0
fall = 1
air.fall = 1
fall.recover = 1
fall.recovertime = 61
palfx.time = 63
palfx.add = 48,0,168
palfx.mul = 166,166,166
palfx.sinadd = 96,96,96,17
palfx.color = 0 
palfx.invertall = 1 
yaccel = .53

[State 7200, 7]
type = Explod
trigger1 = time >= 19
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 450
trigger1 = time <= 31
trigger1 = p2movetype = H
anim = 3100
ID = 3100
sprpriority = 5
postype = p2
pos = -20,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7200, 8]
type = Explod
trigger1 = time >= 19
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 500
trigger1 = time <= 31
trigger1 = p2movetype = H
anim = 3110
ID = 3100
sprpriority = 5
postype = p2
pos = -20,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7200, 9]
type = Explod
trigger1 = time >= 19
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 650
trigger1 = time <= 31
trigger1 = p2movetype = H
anim = 3120
ID = 3100
sprpriority = 5
postype = p2
pos = -20,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7200, 10]
type = Explod
trigger1 = time >= 19
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 700
trigger1 = time <= 31
trigger1 = p2movetype = H
anim = 3130
ID = 3100
sprpriority = 5
postype = p2
pos = -20,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7200, 11]
type = Explod
trigger1 = time >= 19
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 700
trigger1 = p2movetype = H
anim = 3140
ID = 3100
sprpriority = 5
postype = p2
pos = -20,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7200, 12]
type = Explod
trigger1 = time >= 19
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 700
trigger1 = p2movetype = H
anim = 3150
ID = 3100
sprpriority = 5
postype = p2
pos = -20,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 1300, 5]
type = projectile
trigger1 = animelem = 6
projanim = 1035
offset = 0,0
projsprpriority = 3
projremovetime = 34
projedgebound = 210

[State 1300, 5]
type = projectile
trigger1 = AnimElem = 10
projanim = 1036
offset = 0,0
projsprpriority = 0
projremovetime = 31
projedgebound = 210

[State 1300, 5]
type = projectile
trigger1 = AnimElem = 13
projanim = 1035
offset = 0,0
projsprpriority = 3
projremovetime = 34
projedgebound = 210

[State 1300, 5]
type = projectile
trigger1 = AnimElem = 17
projanim = 1036
offset = 0,0
projsprpriority = 0
projremovetime = 31
projedgebound = 210

[State 210, 3]
type = Velset
trigger1 = time = 10
x = 0
y = -9.4

[State 210, 3]
type = VelAdd
trigger1 = time >= 10
y = .49

[State 209, 1]
type = ChangeState
trigger1 = time >= 46
value = 1032

; Aoi hana
[Statedef 510]
type = S
physics = N
movetype = A
ctrl = 0
poweradd = 95
anim = 510
juggle = 8
facep2 = 1
velset = 0,0
sprpriority = 0

[State 5050, 6]
type = width
trigger1 = 1
value = 5

[State 230, 0]
type = varset
trigger1 = time = 0
var(18) = 0
[State 230, 0]
type = varset
trigger1 = time = 0
trigger1 = var(50) > 0
trigger1 = prevstateno = 4600 || prevstateno = 4611
var(18) = 1
[State 230, 0]
type = assertspecial
trigger1 = var(18) = 1
flag = nojugglecheck

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230,0]
type = varset
trigger1 = var(55) = 1 && var(3) > 0 && var(50) = 0 && time = 0
trigger1 = prevstateno = 4611 || prevstateno = 1037 || prevstateno = 4111
var(50) = 16

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && (time < 8 || time >= 14)
value = ,AA,AP

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time >= 8 && time < 14
value = SCA

[State 230, 0]
type = varset
trigger1 = animelem = 5,3 && var(5) = 0
var(38) = 0
          
[State 230, 0]
type = varset
trigger1 = animelem = 5, >= 4 && var(5) = 0
var(38) = 0
          
[State 230, 0]
type = varset
trigger1 = animelem = 5, >= 4 && var(5) = 1
var(38) = 1
          
[State 100, 4]
type = Helper
trigger1 = time = 0
name = "n3"
pos = 0,0  
stateno = 517

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 1

[State 1000, 1]
type = varset
trigger1 = time = 12
var(34) = 0

[State 100, 1]
type = varset
trigger1 = time = 0
var(10) = 8

[State 100, 1]
type = varset
triggerall = movehit > 0 && numtarget(510) > 0
trigger1 = target(510),stateno = 5020
trigger1 = (target(510),prevstateno = 5020 && target(510),gethitvar(fall) = 1) || target(510),prevstateno = 5030 || target(510),prevstateno = 5050 || target(510),prevstateno = 3010
trigger2 = target(510),stateno = 5000
trigger2 = target(510),gethitvar(yvel) != 0
trigger3 = target(510),stateno = 5020
trigger3 = var(1)=1000 || var(1)=500 || var(1)=750 || var(1)=667
var(10) = 0
ignorehitpause = 1

[State 100, 1]
type = varset
triggerall = movehit > 0 && numtarget(510) > 0
trigger1 = target(510),stateno = 5020
trigger1 = (target(510),prevstateno = 5020 && target(510),gethitvar(fall) = 1) || target(510),prevstateno = 5030 || target(510),prevstateno = 5050 || target(510),prevstateno = 3010
trigger2 = target(510),stateno = 5000
trigger2 = target(510),gethitvar(yvel) != 0
var(44) = 0
ignorehitpause = 1

[State 514, 2]
type = VarSet
trigger1 = time = 0
var(9) = 0

[State 510, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = s5,0
channel = 1

[State 510, 1]
type = PlaySnd
trigger1 = AnimElem = 4
value = s5,3

[State 510, 2]
type = VelSet
trigger1 = AnimElem = 1
x = 7.1

[State 510, 2]
type = StatetypeSet
trigger1 = AnimElem = 3,=1
physics = S

[State 510, 2]
type = VelSet
trigger1 = AnimElem = 3,=1
x = 4     

[State 265, 7]
type = ChangeState
trigger1 = var(58) > 2 || var(58) < 0
trigger1 = var(55) = 1 && p2dist y > -5
trigger1 = time = 9 && movehit > 0
trigger1 = var(3) > 256 || (var(3) < 257 && var(3) > 0 && power < 1000 + var(20)*100)
value = 4733

[State 510, 3]
type = HitDef
trigger1 = AnimElem = 3
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = S, SA
id = 510
animtype = hard
damage = 35,10    
guardflag = MA
pausetime = 7,9
getpower = 55,55
sparkno = s10006
guard.sparkno = s10111
sparkxy = 0-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-62
hitsound = s3,2
guardsound = s1,0
priority = 4,hit
ground.type = High
air.type = low
ground.slidetime = 16
ground.hittime = 16
guard.slidetime = 16-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,7,0)
guard.hittime = 16-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,7,0)
guard.velocity = -10 
ground.velocity = -10 
air.velocity = -4,-4.3
airguard.velocity = -4
air.fall = 1
fall.recover = 1
fall.recovertime = 38
palfx.time = 1
palfx.add = 0,0,0
fall.yvelocity = -3.6

[State 510, 3]
type = HitDef
triggerall = AnimElem = 3
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = S, SA
id = 510
animtype = hard
air.animtype = dup
damage = 35,10    
guardflag = MA
pausetime = 12,12
sparkno = s9241
guard.sparkno = s10111
sparkxy = 0-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-62
getpower = 55,55
hitsound = s3,2
guardsound = s1,0
priority = 4,hit
ground.type = High
air.type = low
ground.slidetime = 18
ground.hittime = 18
guard.slidetime = 18-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,8,0)
guard.hittime = 18-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,8,0)
guard.velocity = -10 
ground.velocity = -10 
air.velocity = -4,-4.3
airguard.velocity = -4
air.fall = 1
fall.recover = 1
fall.recovertime = 38
palfx.time = 1
palfx.add = 0,0,0
fall.yvelocity = -3.6

[State 325,8]
type = Varset
triggerall = time > 1
triggerall = time < 30
triggerall = var(55) = 0
trigger1 = command = "3p1_x"
trigger2 = command = "3p1_z"
persistent = 0
var(5) = 1

;[State 325,8]
;type = ChangeState
;value = 1040
;triggerall = var(55) = 1 && time = 9 && movehit > 0 && p2statetype !=A && var(16) < 1 && p2bodydist X < 1 && p2bodydist X > -5
;triggerall = var(58) > 2 || var(58) < 0
;trigger1 = var(14) > 0 && random <= 500
;trigger2 = var(14) < 1 && power >= 2000 + var(20)*100 && random < 500

[State 325,8]
type = Varset
triggerall = var(55) = 1
trigger1 = movehit > 0
trigger1 = p2statetype != A
trigger1 = time >= 11
trigger1 = random <= 999
trigger2 = moveguarded > 0
trigger2 = random < 200
trigger2 = time = 19
trigger3 = p2bodydist X < -40
trigger3 = frontedgedist >= 20
trigger3 = movecontact = 0
trigger3 = time = 14
trigger4 = p2bodydist X >= -40
trigger4 = movecontact = 0
trigger4 = random < 700
trigger4 = time = 14
trigger5 = moveguarded > 0
trigger5 = (p2statetype != A && random < 151) || (P2statetype = A && random < 500)
trigger5 = time = 11
trigger6 = movehit > 0
trigger6 = p2statetype = A
trigger6 = time >= 21
trigger6 = random <= 999
trigger7 = moveguarded > 0
trigger7 = time = 14
trigger7 = random <= 250
var(5) = 1

[State 325, 8]
type = ChangeState
triggerall = var(5) = 1
trigger1 = time > 8 && movecontact = 0
trigger2 = time > 9 && movecontact > 0
value = 511

;[State 240, 3]
;type = ChangeState
;trigger1 = var(55) = 1
;trigger1 = numprojID(7000) = 0
;trigger1 = time > 8 && time < 24 && p2dist X < -39
;trigger1 = random <= 500
;value = 1000

;[State 240, 3]
;type = ChangeState
;trigger1 = var(55) = 1
;trigger1 = numprojID(7000) = 0
;trigger1 = time > 8 && time < 24 && p2dist X < -39
;value = 1020

[State 325,8]
type = Varset
trigger1 = time = 0 
var(5) = 0

[State 325, 8]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;------------------------------------
; 3 time punch-light-2nd punch
[Statedef 511]
type = S
physics = N
movetype = A
ctrl = 0
anim = 511
juggle = var(10)

[State 5050, 6]
type = posadd
trigger1 = animtime = 0
x = 3

[State 5050, 6]
type = width
trigger1 = 1
value = 5

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && (time < 7 || time >= 13)
value = ,AA,AP

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time >= 7 && time < 13
value = SCA

[State 230, 0]
type = varset
trigger1 = animelem = 5,3 && var(5) = 0
var(38) = 0
          
[State 230, 0]
type = varset
trigger1 = animelem = 5, >= 4 && var(5) = 0
var(38) = 0
          
[State 230, 0]
type = varset
trigger1 = animelem = 5, >= 4 && var(5) = 1
var(38) = 1
          
[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 1

[State 100, 1]
type = varset
trigger1 = movehit > 0
var(10) = 0
ignorehitpause = 1

[State 100, 1]
type = varset
trigger1 = time = 0
var(4) = 0

[State 100, 1]
type = varset
trigger1 = movehit > 0
trigger1 = numtarget(511) > 0
trigger1 = target(511),stateno = 5000
var(4) = 1
ignorehitpause = 1
persistent = 0

[State 1000, 1]
type = varset
trigger1 = time = 11
var(34) = 0

[State 325,8]
type = Varset
trigger1 = time = 0
var(5) = 0

[State 230, 0]
type = varset
trigger1 = movehit > 0
var(44) = 0
ignorehitpause = 1

[State 511, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = s5,1
channel = 1

[State 511, 1]
type = PlaySnd
trigger1 = AnimElem = 4
value = s5,3

[State 511, 2]
type = VelSet
trigger1 = AnimElem = 1
x = 10

[State 511, 2]
type = StatetypeSet
trigger1 = AnimElem = 4,=1
physics = S

[State 511, 2]
type = VelSet
trigger1 = AnimElem = 4,=1
x = 3       

[State 516, 3]
type = HitDef
trigger1 = AnimElem = 2
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = S, SA
ID = 511
animtype = heavy
damage = 35,10        
guardflag = MA
pausetime = 7,9
sparkno = s10006
guard.sparkno = s10111
sparkxy = 0-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-62+ceil(p2bodydist Y/5)
guardsound = s1,0
hitsound = s3,2
priority = 4,hit
ground.type = low
getpower = 55,55
ground.slidetime = 23
ground.hittime = 22
guard.slidetime = 22-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,10,0)
guard.hittime = 22-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,10,0)
guard.velocity = -10
ground.velocity = -4.5,-7
air.velocity = -4,-6
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -13.3
airguard.velocity = -4     
fall = 1
air.fall = 1
fall.recover = 1
fall.recovertime = 38
palfx.time = 1
palfx.add = 0,0,0
fall.yvelocity = -3.6
yaccel = .45

[State 516, 3]
type = HitDef
triggerall = AnimElem = 2
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = S, SA
ID = 511
air.animtype = dup
animtype = heavy
damage = 35,10        
guardflag = MA
pausetime = 10,12
guard.pausetime = 12,12
sparkno = s9241
guard.sparkno = s10111
sparkxy = 0-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-62+ceil(p2bodydist Y/5)
hitsound = s3,2
guardsound = s1,0
priority = 4,hit
ground.type = low
getpower = 55,55
ground.slidetime = 25
ground.hittime = 24
guard.slidetime = 24-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,11,0)
guard.hittime = 24-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,11,0)
guard.velocity = -10
ground.velocity = -4.5,-7
air.velocity = -4,-6
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -13.3
airguard.velocity = -4     
fall = 1
air.fall = 1
fall.recover = 1
fall.recovertime = 38
palfx.time = 1
palfx.add = 0,0,0
fall.yvelocity = -3.6
yaccel = .45

[State 325,8]
type = Varset
triggerall = time > 1
triggerall = time < 30
triggerall = var(55) = 0
trigger1 = command = "3p1_x"
trigger2 = command = "3p1_z"
persistent = 0
var(5) = 2

[State 325,8]
type = Varset
trigger1 = time = 1
var(18) = 0

[State 325,8]
type = Varset
triggerall = time = 2 && p2life > 42 && p2dist y > -5
trigger1 = (var(3) < 1 && power >= 2000 + var(20)*100 && random < 300) || (var(3) < 1 && power >= 3000 + var(20)*100)
trigger2 = var(3) > 0 && var(3) < 300 && power >= 1000 + var(20)*100
var(18) = 1

[State 265, 7]
type = varset
trigger1 = var(58) > 2 || var(58) < 0
trigger1 = var(55) = 1 && var(14) < 1 && var(16) < 1 && p2bodydist Y > -5
trigger1 = time = 8 && movehit > 0 && var(18) = 1
var(45) = 15

[State 265, 7]
type = ChangeState
trigger1 = var(58) > 2 || var(58) < 0
trigger1 = var(55) = 1 && var(14) < 1 && var(16) < 1 && p2bodydist Y > -5
trigger1 = time = 8 && movehit > 0 && var(18) = 1
value = 1998

;[State 265, 7]
;type = ChangeState
;trigger1 = var(55) = 1 && var(3) < 1
;trigger1 = var(58) > 2 || var(58) < 0
;trigger1 = time = 8 && movehit > 0 && p2dist X >= -39
;trigger1 = random <= 150 && frontedgedist > 150
;value = 1030

;[State 265, 7]
;type = ChangeState
;trigger1 = var(58) > 2 || var(58) < 0
;trigger1 = var(55) = 1 && var(3) < 1
;trigger1 = time = 8 && movehit > 0 && p2dist X >= -39
;trigger1 = random <= 150 && frontedgedist > 150
;value = 1040

;[State 265, 7]
;type = ChangeState
;trigger1 = var(58) > 2 || var(58) < 0
;trigger1 = var(55) = 1 && p2stateno = 5000
;trigger1 = time = 8 && movehit > 0 && p2dist X >= -39
;trigger1 = random <= 150
;value = 4833

[State 325,8]
type = varset
triggerall = var(55) = 1
trigger1 = movehit > 0
trigger1 = time >= 10
trigger1 = p2bodydist Y > -10
trigger1 = random <= 999
trigger2 = moveguarded > 0
trigger2 = random <= 100
trigger2 = time = 18
trigger3 = p2bodydist X < -40
trigger3 = frontedgedist >= 20
trigger3 = movecontact = 0
trigger3 = time = 13
trigger3 = random < 510
trigger4 = p2bodydist X >= -40
trigger4 = movecontact = 0
trigger4 = time = 13
trigger4 = random < 700
trigger5 = moveguarded > 0
trigger5 = random < 400
trigger5 = time = 12
trigger6 = movehit > 0
trigger6 = time > 16
trigger6 = p2bodydist Y <= -10
trigger6 = (enemynear,vel y >= -1 && p2bodydist Y >= -50) || (enemynear,vel y >= 0 && p2bodydist Y < -50)
trigger6 = random <= 999
var(5) = 2

[State 325, 8]
type = ChangeState
triggerall = var(5) = 2
trigger1 = time > 7 && movecontact = 0
trigger2 = time > 8 && movecontact > 0
value = 514

;[State 240, 3]
;type = ChangeState
;trigger1 = var(55) = 1
;trigger1 = var(58) > 2 || var(58) < 0
;trigger1 = numprojID(7000) = 0
;trigger1 = time > 7 && time < 23 && p2dist X < -39
;trigger1 = random <= 500
;value = 1000

;[State 240, 3]
;type = ChangeState
;trigger1 = var(55) = 1
;trigger1 = var(58) > 2 || var(58) < 0
;trigger1 = numprojID(7000) = 0
;trigger1 = time > 7 && time < 23 && p2dist X < -39
;value = 1020

[State 511, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------
; 3 time punch-HEAVY-3rd punch
[Statedef 512]
type = A
physics = N
movetype = A
ctrl = 0
anim = 512
juggle = var(10)
velset = 0,0

[State 3000, 2]
type = width
trigger1 = 1
value = 5

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time < 13
value = ,AA,AP

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time >= 13
value = SCA

[State 230, 0]
type = varset
trigger1 = animelem = 4,7
var(38) = 0
          
[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 1

[State 100, 4]
type = Helper
trigger1 = time = 0
name = "n3"
pos = 0,0  
stateno = 517

[State 325,8]
type = Varset
trigger1 = time >= 0
var(5) = 0

[State 512, 1];only 2k
type = PlaySnd
trigger1 = AnimElem = 2
value = s5,2
channel = 1

[State 512, 1];only 2k1
type = PlaySnd
trigger1 = AnimElem = 2
value = s3,1
channel = 1

[State 512, 1]
type = PlaySnd
trigger1 = AnimElem = 3,3
value = s5,3

[State 512, 1]
type = Posadd
trigger1 = AnimElem = 2
x = -17

[State 512, 2]
type = VelSet
trigger1 = animelem = 3
x = 7;5.95
y = -7;-8.3

[State 512, 2]
type = VelAdd
trigger1 = animelem = 3,>=0
y = .64

[State 1002, 4]
type = Targetstate
trigger1 = movehit > 0 && numtarget(512) > 0
trigger1 = target(512),statetype = A
trigger1 = HitPauseTime = 1
trigger1 = var(14) < 1
trigger1 = var(16) < 1
value = 1021
id = 512
ignorehitpause = 1
persistent = 0

[State 1002, 4]
type = Targetstate
triggerall = movehit > 0 && numtarget(512) > 0
triggerall = target(512),statetype = A
triggerall = HitPauseTime = 1
trigger1 = var(14) > 0
trigger2 = var(16) > 0
value = 1024
id = 512
ignorehitpause = 1
persistent = 0

[State 1002, 4]
type = Targetstate
trigger1 = movehit > 0 && numtarget(512) > 0
trigger1 = target(512),statetype = C
trigger1 = HitPauseTime = 1
trigger1 = var(14) < 1
trigger1 = var(16) < 1
value = 1019
id = 512
ignorehitpause = 1
persistent = 0

[State 1002, 4]
type = Targetstate
trigger1 = movehit > 0 && numtarget(512) > 0
trigger1 = target(512),statetype = S
trigger1 = HitPauseTime = 1
trigger1 = var(14) < 1
trigger1 = var(16) < 1
value = 1011
ignorehitpause = 1
id = 512
persistent = 0

[State 1002, 4]
type = Targetstate
triggerall = movehit > 0 && numtarget(512) > 0
triggerall = target(512),statetype = C
triggerall = HitPauseTime = 1
trigger1 = var(14) > 0
trigger2 = var(16) > 0
value = 1012
ignorehitpause = 1
persistent = 0
id = 512

[State 1002, 4]
type = Targetstate
triggerall = movehit > 0 && numtarget(512) > 0
triggerall = target(512),statetype = S
triggerall = HitPauseTime = 1
trigger1 = var(14) > 0
trigger2 = var(16) > 0
value = 1015
ignorehitpause = 1
persistent = 0
id = 512

[State 517, 3]
type = HitDef
trigger1 = AnimElem = 1
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = A, SA
animtype = light
air.animtype = hard
damage = 85,10
id = 512
guardflag = HA
pausetime = 4,3
guard.pausetime = 4,4
sparkno = s10006
guard.sparkno = s10111
sparkxy = 0-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-40
hitsound = s1,5
guardsound = s1,0
priority = 4,hit
ground.type = low
getpower = 55,55
ground.slidetime = 30
ground.hittime = 30
guard.slidetime = 35-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,17,0)
guard.hittime = 35-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,17,0)
air.velocity = -7,-6.3
ground.velocity = -16
guard.velocity = -15
guard.cornerpush.veloff = -20
airguard.velocity = -7,-4
yaccel = .6
p2facing = 1
air.fall = 1
fall.recover = 0
palfx.time = 1
palfx.add = 0,0,0
fall.yvelocity = 0

[State 517, 3]
type = HitDef
triggerall = AnimElem = 1
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = A, SA
animtype = Hard
air.animtype = d
damage = 85,10
guardflag = HA
id = 512
pausetime = 4,3
guard.pausetime = 4,4
sparkno = s9241
guard.sparkno = s10111
sparkxy = 0-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-40
hitsound = s1,5
guardsound = s1,0
priority = 4,hit
ground.type = high
getpower = 55,55
air.type = low
ground.slidetime = 32
ground.hittime = 32
guard.slidetime = 37-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,18,0)
guard.hittime = 37-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,18,0)
air.velocity = -7,-6.3
ground.velocity = -16
guard.velocity = -15
guard.cornerpush.veloff = -20
airguard.velocity = -7,-4
yaccel = .6
p2facing = 1
air.fall = 1
fall.recover = 0
palfx.time = 1
palfx.add = 0,0,0
fall.yvelocity = 0

[State 512, 4]
type = ChangeState
trigger1 = animtime = 0 
value = 513
;-------------------------------------
; 3 time punch-HEAVY-3rd punch land
[Statedef 513]
type = S
physics = S
movetype = I
ctrl = 0
anim = 513
velset = 0,0

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 0

[State 512, 4]
type = Posset
trigger1 = time = 0
y = 0

[state 1300,5]
type = helper
id = 8301
stateno = 8301
ownpal = 1
name = "iori's shadow"
triggerall = p2statetype != L && var(59) >= 0
triggerall = (var(53) = 0 && power >= 1000 + var(20)*100) || (var(53) = 1 && power >= 2000 + var(20)*100 && var(14) < 1 && var(16) < 1)
triggerall = var(55) = 1
triggerall = (var(53) = 0 && var(56) > 0) || var(53) = 1
triggerall = numhelper(8301) < 1
triggerall = p2bodydist X <= 69
triggerall = random <= 250
triggerall = moveguarded > 0 || p2movetype != H
trigger1 = time = 8
trigger2 = time = 5

[State 512, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[Statedef 517] ;helper
type    = A
movetype= A
physics = N
anim = 1333

[State 5050, 6]
type = playerpush
trigger1 = 1
value = 1

[State 5050, 6]
type = nothitby
trigger1 = 1
value = SCA

[State 5050, 6]
type = turn
trigger1 = parent,facing != facing

[State 5050, 6]
type = posadd
trigger1 = facing = 1
x = -(pos x - parent,pos x) 

[State 5050, 6]
type = posadd
trigger1 = facing = -1
x = pos x - parent,pos x 

[State 5050, 6]
type = destroyself
trigger1 = parent,stateno != 512 && parent,stateno != 510 && parent,stateno != 520
trigger1 = parent,stateno != 511 && parent,stateno != 516 && parent,stateno != 514

;3 HIT PUNCH LIGHT 3RD
[Statedef 514]
type = A
physics = N
movetype = A
ctrl = 0
anim = 514
juggle = var(10)
velset = 0,0

[State 3000, 2]
type = width
trigger1 = 1
value = 5

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time < 13
value = ,AA,AP

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time >= 13
value = SCA

[State 230, 0]
type = varset
trigger1 = animelem = 4
var(38) = 0
          
[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 1

[State 100, 4]
type = Helper
trigger1 = time = 0
name = "n3"
pos = 0,0  
stateno = 517

[State 325,8]
type = Varset
trigger1 = time >= 0
var(5) = 0

[State 512, 1];only 2k
type = PlaySnd
trigger1 = AnimElem = 2
value = s5,2
channel = 1

[State 512, 1];only 2k1
type = PlaySnd
trigger1 = AnimElem = 2
value = s3,1
channel = 1

[State 514, 1]
type = PlaySnd
trigger1 = AnimElem = 3,3
value = s5,3

[State 512, 1]
type = Posadd
trigger1 = AnimElem = 2
x = -17

[State 514, 2]
type = VelSet
trigger1 = animelem = 3
x = 6.5;5.5   
y = -5;-7.24

[State 514, 2]
type = VelAdd
trigger1 = animelem = 3,>=0
y = .6;.7

[State 1002, 4]
type = Targetstate
trigger1 = movehit > 0 && numtarget(514) > 0
trigger1 = target(514),statetype = A
trigger1 = HitPauseTime = 1
trigger1 = var(14) < 1
trigger1 = var(16) < 1
value = 1021
ignorehitpause = 1
id = 514
persistent = 0

[State 1002, 4]
type = Targetstate
triggerall = movehit > 0 && numtarget(514) > 0
triggerall = target(514),statetype = A
triggerall = HitPauseTime = 1
trigger1 = var(14) > 0
trigger2 = var(16) > 0
value = 1024
ignorehitpause = 1
id = 514
persistent = 0

[State 1002, 4]
type = Targetstate
trigger1 = movehit > 0 && numtarget(514) > 0
trigger1 = target(514),statetype = C
trigger1 = HitPauseTime = 1
trigger1 = var(14) < 1
trigger1 = var(16) < 1
value = 1019
ignorehitpause = 1
id = 514
persistent = 0

[State 1002, 4]
type = Targetstate
triggerall = movehit > 0 && numtarget(514) > 0
triggerall = target(514),statetype = S
triggerall = HitPauseTime = 1
trigger1 = var(14) > 0
trigger2 = var(16) > 0
value = 1015
id = 514
ignorehitpause = 1
persistent = 0

[State 1002, 4]
type = Targetstate
trigger1 = movehit > 0 && numtarget(514) > 0
trigger1 = target(514),statetype = S
trigger1 = HitPauseTime = 1
trigger1 = var(14) < 1
trigger1 = var(16) < 1
value = 1011
ignorehitpause = 1
id = 514
persistent = 0

[State 1002, 4]
type = Targetstate
triggerall = movehit > 0 && numtarget(514) > 0
triggerall = target(514),statetype = C
triggerall = HitPauseTime = 1
trigger1 = var(14) > 0
trigger2 = var(16) > 0
value = 1012
ignorehitpause = 1
id = 514
persistent = 0

[State 517, 3]
type = HitDef
trigger1 = AnimElem = 1
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = A, SA
animtype = light
air.animtype = hard
damage = 85,10
guardflag = HA
pausetime = 4,3
guard.pausetime = 4,4
sparkno = s10006
id = 514
guard.sparkno = s10111
sparkxy = 0-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-40
hitsound = s1,5
guardsound = s1,0
ground.type = low
priority = 4,hit
getpower = 55,55
ground.slidetime = 20
ground.hittime = 20
guard.slidetime = 26-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,12,0)
guard.hittime = 26-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,12,0)
air.velocity = -6,-6
ground.velocity = -13
guard.velocity = -16
airguard.velocity = -5,-4
guard.cornerpush.veloff = -20
yaccel = .6
p2facing = 1
air.fall = 1
fall.recover = 0
palfx.time = 1
palfx.add = 0,0,0
fall.yvelocity = 0

[State 517, 3]
type = HitDef
triggerall = AnimElem = 1
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = A, SA
animtype = Hard
air.animtype = d
damage = 85,10
guardflag = HA
pausetime = 4,3
guard.pausetime = 4,4
sparkno = s9241
id = 514
guard.sparkno = s10111
sparkxy = 0-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-40
hitsound = s1,5
guardsound = s1,0
ground.type = high
getpower = 55,55
air.type = low
priority = 4,hit
ground.slidetime = 22
ground.hittime = 22
guard.slidetime = 28-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,13,0)
guard.hittime = 28-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,13,0)
air.velocity = -6,-6
ground.velocity = -13
guard.velocity = -16
airguard.velocity = -5,-4
guard.cornerpush.veloff = -20
yaccel = .6
p2facing = 1
air.fall = 1
fall.recover = 0
palfx.time = 1
palfx.add = 0,0,0
fall.yvelocity = 0

[State 514, 4]
type = ChangeState
trigger1 = animtime = 0 
value = 515
;------------------------------------
; 3 time punch-light-3rd punch land
[Statedef 515]
type = S
physics = S
movetype = I
ctrl = 0
anim = 515
velset = 0,0

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 0

[State 515, 4]
type = Posadd
trigger1 = time = 0
x = 5

[State 515, 4]
type = Posset
trigger1 = time = 0
y = 0

[state 1300,5]
type = helper
id = 8301
stateno = 8301
ownpal = 1
name = "iori's shadow"
triggerall = p2statetype != L && var(59) >= 0
triggerall = (var(53) = 0 && power >= 1000 + var(20)*100) || (var(53) = 1 && power >= 2000 + var(20)*100 && var(14) < 1 && var(16) < 1)
triggerall = var(55) = 1
triggerall = (var(53) = 0 && var(56) > 0) || var(53) = 1
triggerall = numhelper(8301) < 1
triggerall = time = 7
triggerall = frontedgedist <= 99
triggerall = p2bodydist X <= 69
trigger1 = moveguarded > 0
trigger1 = random <= 300
trigger2 = p2movetype != H
trigger2 = random <= 300

[State 515, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;------------------------------------
; 3 time punch-middle-2nd punch
[Statedef 516]
type = S
physics = N
movetype = A
ctrl = 0
anim = 516
juggle = var(10)

[State 5050, 6]
type = posadd
trigger1 = animtime = 0
x = 3

[State 5050, 6]
type = width
trigger1 = 1
value = 5

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && (time < 11 || time >= 17)
value = ,AA,AP

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time >= 11 && time < 17
value = SCA

[State 230, 0]
type = varset
trigger1 = animelem = 5,3 && var(5) = 0
var(38) = 0
          
[State 230, 0]
type = varset
trigger1 = animelem = 5, >= 4 && var(5) = 0
var(38) = 0
          
[State 230, 0]
type = varset
trigger1 = animelem = 5, >= 4 && var(5) = 1
var(38) = 1
          
[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 1

[State 100, 1]
type = varset
trigger1 = movehit > 0
var(10) = 0
ignorehitpause = 1

[State 100, 1]
type = varset
trigger1 = time = 0
var(4) = 0

[State 100, 1]
type = varset
trigger1 = movehit > 0
trigger1 = numtarget(516) > 0
trigger1 = target(516),stateno = 5000
var(4) = 1
ignorehitpause = 1
persistent = 0

[State 1000, 1]
type = varset
trigger1 = time = 15
var(34) = 0

[State 325,8]
type = Varset
trigger1 = time = 0
var(5) = 0

[State 230, 0]
type = varset
trigger1 = movehit > 0
var(44) = 0
ignorehitpause = 1

[State 516, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = s5,1
channel = 1

[State 516, 1]
type = PlaySnd
trigger1 = AnimElem = 4
value = s5,3

[State 516, 2]
type = VelSet
trigger1 = AnimElem = 1
x = 7.6

[State 520, 2]
type = StatetypeSet
trigger1 = AnimElem = 4
physics = S

[State 516, 2]
type = VelSet
trigger1 = AnimElem = 4
x = 3

[State 516, 3]
type = HitDef
trigger1 = AnimElem = 2
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = S, SA
ID = 516
animtype = heavy
damage = 35,10
guardflag = MA
pausetime = 10,12
guard.pausetime = 12,12
sparkno = s10006
guard.sparkno = s10111
sparkxy = 0-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-62+ceil(p2bodydist Y/5)
hitsound = s3,2
guardsound = s1,0
priority = 4,hit
ground.type = low
getpower = 55,55
ground.slidetime = 24
ground.hittime = 23
guard.slidetime = 23-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,11,0)
guard.hittime = 23-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,11,0)
guard.velocity = -11
ground.velocity = -4.5,-7
air.velocity = -4,-6
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -18.6
airguard.velocity = -4     
fall = 1
air.fall = 1
fall.recover = 1
fall.recovertime = 41
palfx.time = 1
palfx.add = 0,0,0
fall.yvelocity = -3.6
yaccel = .45

[State 516, 3]
type = HitDef
triggerall = AnimElem = 2
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = S, SA
ID = 516
animtype = heavy
air.animtype = dup
damage = 35,10
guardflag = MA
pausetime = 10,12
guard.pausetime = 12,12
sparkno = s9241
guard.sparkno = s10111
sparkxy = 0-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-62+ceil(p2bodydist Y/5)
hitsound = s3,2
guardsound = s1,0
getpower = 55,55
priority = 4,hit
ground.type = low
ground.slidetime = 26
ground.hittime = 25
guard.slidetime = 25-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,12,0)
guard.hittime = 25-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,12,0)
guard.velocity = -11
ground.velocity = -4.5,-7
air.velocity = -4,-6
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -18.6
airguard.velocity = -4     
fall = 1
air.fall = 1
fall.recover = 1
fall.recovertime = 41
palfx.time = 1
palfx.add = 0,0,0
fall.yvelocity = -3.6
yaccel = .45

[State 325,8]
type = Varset
triggerall = time > 1
triggerall = time < 35
triggerall = var(55) = 0
trigger1 = command = "3p1_x"
trigger2 = command = "3p1_z"
persistent = 0
var(5) = 2

[State 325,8]
type = Varset
trigger1 = time = 1
var(18) = 0

[State 325,8]
type = Varset
triggerall = time = 2 && p2life > 42 && p2dist y > -5
trigger1 = (var(3) < 1 && power >= 2000 + var(20)*100 && random < 300) || (var(3) < 1 && power >= 3000 + var(20)*100)
trigger2 = var(3) > 0 && var(3) < 300 && power >= 1000 + var(20)*100
var(18) = 1

[State 265, 7]
type = varset
trigger1 = var(58) > 2 || var(58) < 0
trigger1 = var(55) = 1 && var(14) < 1 && var(16) < 1 && p2bodydist Y > -5
trigger1 = time = 12 && movehit > 0 && var(18) = 1
var(45) = 15

[State 265, 7]
type = ChangeState
trigger1 = var(58) > 2 || var(58) < 0
trigger1 = var(55) = 1 && var(14) < 1 && var(16) < 1 && p2bodydist Y > -5
trigger1 = time = 12 && movehit > 0 && var(18) = 1
value = 1998

;[State 265, 7]
;type = ChangeState
;trigger1 = var(55) = 1 && var(3) < 1
;trigger1 = var(58) > 2 || var(58) < 0
;trigger1 = time = 12 && movehit > 0 && p2dist X >= -39
;trigger1 = random <= 150 && frontedgedist > 150
;value = 1030

;[State 265, 7]
;type = ChangeState
;trigger1 = var(58) > 2 || var(58) < 0
;trigger1 = var(55) = 1 && var(3) < 1
;trigger1 = time = 12 && movehit > 0 && p2dist X >= -39
;trigger1 = random <= 150 && frontedgedist > 150
;value = 1040

;[State 265, 7]
;type = ChangeState
;trigger1 = var(58) > 2 || var(58) < 0
;trigger1 = var(55) = 1 && p2stateno = 5000 && var(3) < 1
;trigger1 = time = 12 && movehit > 0 && p2dist X >= -39
;trigger1 = random <= 150
;value = 4833

[State 325,8]
type = varset
triggerall = var(55) = 1
trigger1 = movehit > 0
trigger1 = p2bodydist Y > -10
trigger1 = time >= 14
trigger1 = random <= 999
trigger2 = moveguarded > 0
trigger2 = random < 300
trigger2 = time = 22
trigger3 = p2bodydist X < -40
trigger3 = frontedgedist >= 20
trigger3 = movecontact = 0
trigger3 = time = 17
trigger3 = random < 510
trigger4 = p2bodydist X >= -40
trigger4 = movecontact = 0
trigger4 = random < 700
trigger4 = time = 17
trigger5 = movehit > 0
trigger5 = p2bodydist Y <= -10
trigger5 = enemynear,vel y >= -2
trigger5 = time > 18
trigger6 = moveguarded > 0
trigger6 = time = 14
trigger6 = random < 301
var(5) = 2

[State 325, 8]
type = ChangeState
triggerall = var(5) = 2
trigger1 = time > 11 && movecontact = 0
trigger2 = time > 12 && movecontact > 0
value = 512

;[State 240, 3]
;type = ChangeState
;trigger1 = var(55) = 1
;trigger1 = var(58) > 2 || var(58) < 0
;trigger1 = numprojID(7000) = 0
;trigger1 = time > 11 && time < 27 && p2dist X < -39
;trigger1 = random <= 500
;value = 1000

;[State 240, 3]
;type = ChangeState
;trigger1 = var(55) = 1
;trigger1 = var(58) > 2 || var(58) < 0
;trigger1 = numprojID(7000) = 0
;trigger1 = time > 11 && time < 27 && p2dist X < -39
;value = 1020

[State 516, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

; Aoi hana
[Statedef 520]
type = S
physics = N
movetype = A
ctrl = 0
poweradd = 95
anim = 520
juggle = 8
facep2 = 1
velset = 0,0
sprpriority = 0

[State 5050, 6]
type = width
trigger1 = 1
value = 5

[State 230, 0]
type = varset
trigger1 = time = 0
var(18) = 0
[State 230, 0]
type = varset
trigger1 = time = 0
trigger1 = var(50) > 0
trigger1 = prevstateno = 4600 || prevstateno = 4611
var(18) = 1
[State 230, 0]
type = assertspecial
trigger1 = var(18) = 1
flag = nojugglecheck

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230,0]
type = varset
trigger1 = var(55) = 1 && var(3) > 0 && var(50) = 0 && time = 0
trigger1 = prevstateno = 4611 || prevstateno = 1037 || prevstateno = 4111
var(50) = 16

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && (time < 11 || time >= 17)
value = ,AA,AP

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time >= 11 && time < 17
value = SCA

[State 230, 0]
type = varset
trigger1 = animelem = 5,3 && var(5) = 0
var(38) = 0
          
[State 230, 0]
type = varset
trigger1 = animelem = 5, >= 4 && var(5) = 0
var(38) = 0
          
[State 230, 0]
type = varset
trigger1 = animelem = 5, >= 4 && var(5) = 1
var(38) = 1
          
[State 100, 4]
type = Helper
trigger1 = time = 0
name = "n3"
pos = 0,0  
stateno = 517

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 1

[State 1000, 1]
type = varset
trigger1 = time = 15
var(34) = 0

[State 520, 0]
type = VarSet
trigger1 = time = 0
var(9) = 0

[State 100, 1]
type = varset
trigger1 = time = 0
var(10) = 8

[State 100, 1]
type = varset
triggerall = movehit > 0 && numtarget(520) > 0
trigger1 = target(520),stateno = 5020
trigger1 = (target(520),prevstateno = 5020 && target(520),gethitvar(fall) = 1) || target(520),prevstateno = 5030 || target(520),prevstateno = 5050 || target(520),prevstateno = 3010
trigger2 = target(520),stateno = 5000
trigger2 = target(520),gethitvar(yvel) != 0
trigger3 = target(520),stateno = 5020
trigger3 = var(1)=1000 || var(1)=500 || var(1)=750 || var(1)=667
var(10) = 0
ignorehitpause = 1

[State 230, 0]
type = varset
triggerall = movehit > 0 && numtarget(520) > 0
trigger1 = target(520),stateno = 5020
trigger1 = (target(520),prevstateno = 5020 && target(520),gethitvar(fall) = 1) || target(520),prevstateno = 5030 || target(520),prevstateno = 5050 || target(520),prevstateno = 3010
trigger2 = target(520),stateno = 5000
trigger2 = target(520),gethitvar(yvel) != 0
var(44) = 0
ignorehitpause = 1

[State 520, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = s5,0
channel = 1

[State 520, 1]
type = PlaySnd
trigger1 = AnimElem = 4
value = s5,3

[State 520, 2]
type = VelSet
trigger1 = AnimElem = 1
x = 8.8

[State 520, 2]
type = StatetypeSet
trigger1 = AnimElem = 3
physics = S       

[State 520, 2]
type = VelSet
trigger1 = AnimElem = 3
x = 5       

[State 265, 7]
type = ChangeState
trigger1 = var(58) > 2 || var(58) < 0
trigger1 = var(55) = 1 && p2dist y > -5
trigger1 = time = 12 && movehit > 0
trigger1 = var(3) > 256 || (var(3) < 257 && var(3) > 0 && power < 1000 + var(20)*100)
value = 4733

[State 520, 3]
type = HitDef
trigger1 = AnimElem = 3
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = S, SA
id = 520
animtype = heavy
damage = 35,10
guardflag = MA
pausetime = 12,12
sparkno = s10006
guard.sparkno = s10111
sparkxy = 0-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-62
hitsound = s3,2
guardsound = s1,0
priority = 4,hit
ground.type = High
air.type = low
ground.slidetime = 21
ground.hittime = 21
guard.slidetime = 25-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,12,0)
guard.hittime = 25-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,12,0)
getpower = 55,55
guard.velocity = -11
ground.velocity = -11
air.velocity = -4,-4.3
airguard.velocity = -4
air.fall = 1
fall.recover = 1
fall.recovertime = 41
palfx.time = 1
palfx.add = 0,0,0
fall.yvelocity = -3.6

[State 520, 3]
type = HitDef
triggerall = AnimElem = 3
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = S, SA
id = 520
animtype = heavy
air.animtype = dup
damage = 35,10
guardflag = MA
pausetime = 12,12
sparkno = s9241
guard.sparkno = s10111
sparkxy = 0-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-62
hitsound = s3,2
guardsound = s1,0
getpower = 55,55
priority = 4,hit
ground.type = High
air.type = low
ground.slidetime = 21
ground.hittime = 21
guard.slidetime = 27-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,13,0)
guard.hittime = 27-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,13,0)
guard.velocity = -11
ground.velocity = -11
air.velocity = -4,-4.3
airguard.velocity = -4
air.fall = 1
fall.recover = 1
fall.recovertime = 41
palfx.time = 1
palfx.add = 0,0,0
fall.yvelocity = -3.6

[State 325,8]
type = Varset
triggerall = time > 1
triggerall = time < 35
triggerall = var(55) = 0
trigger1 = command = "3p1_z"
trigger2 = command = "3p1_x"
persistent = 0
var(5) = 1

;[State 325,8]
;type = ChangeState
;value = 1040
;triggerall = var(55) = 1 && time = 12 && movehit > 0 && p2statetype !=A && var(16) < 1 && p2bodydist X < 1 && p2bodydist X > -5 && frontedgedist < 70
;triggerall = var(58) > 2 || var(58) < 0
;triggerall = var(3) < 1
;trigger1 = var(14) > 0 && random <= 500
;trigger2 = var(14) < 1 && power >= 2000 + var(20)*100 && random < 500

[State 325,8]
type = varset
triggerall = var(55) = 1
trigger1 = movehit > 0
trigger1 = p2statetype != A
trigger1 = time >= 14
trigger1 = random <= 999
trigger2 = moveguarded > 0
trigger2 = random < 200
trigger2 = time = 25
trigger3 = p2bodydist X < -40
trigger3 = frontedgedist >= 20
trigger3 = movecontact = 0
trigger3 = time = 17
trigger4 = p2bodydist X >= -40
trigger4 = movecontact = 0
trigger4 = random < 700
trigger4 = time = 17
trigger5 = movehit > 0
trigger5 = p2statetype = A
trigger5 = time >= 25
trigger6 = moveguarded > 0
trigger6 = (p2statetype != A && random < 151) || (P2statetype = A && random < 500)
trigger6 = time = 14
trigger7 = moveguarded > 0
trigger7 = time = 17
trigger7 = random <= 250
var(5) = 1

[State 325, 8]
type = ChangeState
triggerall = var(5) = 1
trigger1 = time > 11 && movecontact = 0
trigger2 = time > 12 && movecontact > 0
value = 516

[State 325,8]
type = Varset
trigger1 = time = 0 
persistent = 0
var(5) = 0

;[State 240, 3]
;type = ChangeState
;trigger1 = var(55) = 1
;trigger1 = numprojID(7000) = 0
;trigger1 = time > 11 && time < 27 && p2dist X < -39
;trigger1 = random <= 500
;value = 1000

;[State 240, 3]
;type = ChangeState
;trigger1 = var(55) = 1
;trigger1 = numprojID(7000) = 0
;trigger1 = time > 11 && time < 27 && p2dist X < -39
;value = 1020

[State 325, 8]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;-----------------------------------
; Scorch A (start)
[Statedef 299]
type    = S
movetype= A
physics = S
poweradd= 83
ctrl = 0
anim = 298
facep2 = 1
velset = 0,0
sprpriority = 0

[State 522, 1]
type = PlaySnd
trigger1 = AnimElem = 4
value = s26,4
channel = 1

[State 230,0]
type = varset
trigger1 = var(55) = 1 && var(3) > 0 && var(50) = 0 && time = 0
trigger1 = prevstateno = 4611
var(50) = 16

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 1

[State 1000, 1]
type = varset
trigger1 = time = 0
var(18) = 0

[State 1000, 1]
type = varset
trigger1 = time = 1
trigger1 = prevstateno = 511 || prevstateno = 516
var(18) = 1

[State 7100, 1]
type = PosAdd
trigger1 = AnimElem = 1
trigger2 = AnimElem = 2
x = 12
[State 7100, 1]
type = PosAdd
trigger1 = AnimElem = 3
trigger2 = AnimElem = 4
x = 13

[State 5040, 1]
type = nothitby
trigger1 = 1
value = SCA

[State 210, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 300
;------------------------------------
; Scorch
[Statedef 300]
type = a
physics = n
movetype = A
ctrl = 0                
anim = 303

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time > 2
value = ,AA,AP
[State 5040, 1]
type = nothitby
trigger1 = time < 3
value = SCA

[State 325,8]
type = Varset
trigger1 = time >= 0
var(5) = 0

[State 522, 2]
type = VelSet
trigger1 = animelem = 2
x = 2.9
y = -3

[State 52, 2]
type = VelAdd
trigger1 = time >= 3
y = .45

[State 522, 4]
type = ChangeState
trigger1 = time = 13
value = 301
;------------------------------------
; scorch land
[Statedef 301]
type = S
physics = S
movetype = A
ctrl = 0
anim = 301
juggle = 8
velset = 0,0

[State 1000, 4]
type = Helper
trigger1 = time = 0
name = "n2"
pos = 25,0
stateno = 2011

[State 230, 1]
type = assertspecial
trigger1 = var(18) = 1
flag = nojugglecheck

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time > 2 && time < 8
value = SCA

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && (time <= 2 || time >= 8)
value = ,AA,AP

[State 230, 0]
type = varset
trigger1 = animelem = 2,1
var(38) = 0
          
[State 1000, 1]
type = varset
trigger1 = time = 6
var(34) = 0

[State 522, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = s6,0
channel = 1

[State 522, 1]
type = posadd
trigger1 = AnimElem = 2
trigger2 = animelem = 3
x = 18

[State 522, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = s7,8

[State 1300, 5]
type = projectile
trigger1 = AnimElem = 1
projanim = 302
offset = 9,7
projsprpriority = 2
projremovetime = 14
projedgebound = 210

[State 210, 1]
type = PlaySnd
trigger1 = movehit > 0
value = s4,1
ignorehitpause = 1
persistent = 0

[State 522, 3]
type = HitDef
trigger1 = AnimElem = 1
trigger1 = var(14) < 1
trigger1 = var(16) < 1
attr = A, SA
animtype = hard
damage = 76,10
guardflag = MA
pausetime = 12,12
sparkno = s10006
guard.sparkno = s10111
priority = 5, Hit 
sparkxy = 0-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-55
hitsound = s3,2
guardsound = s1,0
getpower = 72,72
givepower = 21,21
ground.type = low
air.velocity = -4.5,-4.3
ground.slidetime = 24
ground.hittime = 24
guard.slidetime = 38-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,18,0)
guard.hittime = 38-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,18,0)
ground.velocity = -13
guard.velocity = -13
ground.cornerpush.veloff = -20
air.cornerpush.veloff = -20
guard.cornerpush.veloff = -20
palfx.time = 36
palfx.add = 48,0,168
palfx.mul = 166,166,166
palfx.sinadd = 96,96,96,17
palfx.color = 0 
palfx.invertall = 1 
air.fall = 1
fall.recovertime = 38

[State 522, 3]
type = HitDef
triggerall = AnimElem = 1
trigger1 = var(14) > 0
trigger2 = var(16) > 0
attr = A, SA
animtype = hard
air.animtype = dup
damage = 76,10
guardflag = MA
pausetime = 12,12
sparkno = s9241
guard.sparkno = s10111
priority = 5, Hit 
sparkxy = 0-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-55
getpower = 72,72
givepower = 21,21
hitsound = s3,2
guardsound = s1,0
ground.type = low
air.velocity = -4.5,-4.3
ground.slidetime = 26
ground.hittime = 26
guard.slidetime = 40-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,19,0)
guard.hittime = 40-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,19,0)
ground.velocity = -13
guard.velocity = -13
ground.cornerpush.veloff = -20
air.cornerpush.veloff = -20
guard.cornerpush.veloff = -20
palfx.time = 38
palfx.add = 48,0,168
palfx.mul = 166,166,166
palfx.sinadd = 96,96,96,17
palfx.color = 0 
palfx.invertall = 1 
air.fall = 1
fall.recovertime = 38

[State 7110, 8]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 4
trigger1 = Random < 700
trigger1 = p2movetype = H && time < 6
anim = 3100
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7110, 9]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 4
trigger1 = Random < 650
trigger1 = p2movetype = H && time < 6
anim = 3110
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7110, 10]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 4
trigger1 = Random < 600
trigger1 = p2movetype = H && time < 6
anim = 3120
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7110, 11]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 4
trigger1 = Random < 550
trigger1 = p2movetype = H && time < 6
anim = 3130
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7110, 12]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 4
trigger1 = Random < 500
trigger1 = p2movetype = H && animtime < -8
anim = 3140
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 7110, 13]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 4
trigger1 = Random < 500
trigger1 = p2movetype = H && animtime < -8
anim = 3150
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
pausemovetime = 9999
ignorehitpause = 1
ownpal = 1

[State 301, 4]
type = Posset
trigger1 = time = 0
y = 0

[State 265, 7]
type = ChangeState
trigger1 = var(58) > 2 || var(58) < 0
trigger1 = var(55) = 1
trigger1 = time = 4 && movehit > 0 && var(3) > 0 && random < 500
value = 4733

[State 523, 4]
type = ChangeState
triggerall = time = [4,8]
triggerall = var(58) > 1 || var(58) < 1
trigger1 = movecontact > 0
trigger1 = var(55) = 0
trigger1 = command = "3p1_x"
;trigger2 = moveguarded > 0
;trigger2 = var(55) = 1
;trigger2 = random < 100
;trigger3 = movehit > 0
;trigger3 = var(55) = 1
;trigger3 = random <= 500
value = 510

[State 523, 4]
type = ChangeState
triggerall = time = [4,8]
triggerall = var(58) > 1 || var(58) < 1
trigger1 = movecontact > 0
trigger1 = var(55) = 0
trigger1 = command = "3p1_z"
trigger2 = movehit > 0
trigger2 = var(55) = 1
trigger3 = moveguarded > 0
trigger3 = var(55) = 1
trigger3 = random < 100
value = 520

[State 265, 7]
type = ChangeState
trigger1 = var(58) > 2 || var(58) < 0
trigger1 = var(55) = 1
trigger1 = time = 4 && moveguarded > 0 && var(3) > 0
value = 1020

[State 523, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;-------------------------------------
; Scorch C (start)
[Statedef 305]
type    = S
movetype= A
physics = S
poweradd= 83
ctrl = 0
anim = 299
facep2 = 1
velset = 0,0
sprpriority = 0

[State 522, 1]
type = PlaySnd
trigger1 = AnimElem = 4
value = s26,4
channel = 1

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 1

[State 1000, 1]
type = varset
trigger1 = time = 0
var(18) = 0
[State 1000, 1]
type = varset
trigger1 = time = 1
trigger1 = prevstateno = 511 || prevstateno = 516
var(18) = 1

[State 7100, 1]
type = PosAdd
trigger1 = AnimElem = 1
trigger2 = AnimElem = 2
x = 12
[State 7100, 1]
type = PosAdd
trigger1 = AnimElem = 3
trigger2 = AnimElem = 4
x = 13

[State 5040, 1]
type = nothitby
trigger1 = animtime < 0
value = SCA

[State 210, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 306
;---------------------------------------
; Scorch
[Statedef 306]
type = a
physics = n
movetype = A
ctrl = 0                
anim = 300

[State 230, 1]
type = varset
trigger1 = time = 0 && prevstateno != 307
var(4) = 0
[State 230, 1]
type = varadd
trigger1 = time > 0
var(4) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1
value = ,AA,AP

[State 325,8]
type = Varset
trigger1 = 1
var(5) = 0

[State 522, 2]
type = VelSet
trigger1 = var(4) = 3
x = 4.48
y = -4.7

[State 52, 2]
type = VelAdd
trigger1 = var(4) >= 3 && prevstateno != 307
trigger2 = time > 0 && prevstateno = 307
y = .5

[State 522, 4]
type = Changeanim
trigger1 = var(4) >= 0 && var(4) < 3
value = 300
elem = 1
[State 522, 4]
type = Changeanim
trigger1 = var(4) >= 3 && var(4) < 6
value = 300
elem = 2
[State 522, 4]
type = Changeanim
trigger1 = var(4) >= 6 && var(4) < 9
value = 300
elem = 3
[State 522, 4]
type = Changeanim
trigger1 = var(4) >= 9 && var(4) < 12
value = 300
elem = 4
[State 522, 4]
type = Changeanim
trigger1 = var(4) >= 12
value = 300
elem = 5

[State 1000, 2]
type = ReversalDef
trigger1 = prevstateno != 307 || (prevstateno = 307 && time > 0)
reversal.attr = SCA,AA,AP
hitflag = MAFDP
pausetime = 0,10
p1stateno = 307
sparkno = -1

[State 522, 4]
type = ChangeState
trigger1 = var(4) >= 19
value = 301
;---------------------------------------
; Scorch(guard point)
[Statedef 307]
type = a
physics = n
movetype = A
ctrl = 0                
anim = 300

[State 181, 2]
type = PlaySnd
trigger1 = time = 0
value = s1,0
channel = 9

[State 1300, 5]
type = projectile
trigger1 = time = 0 && numprojid(10011) < 2
projanim = 10011
projid = 10011
offset = 25-ifelse(p2bodydist X <= 20 && p2bodydist X >= -5,20-p2bodydist X,ifelse(p2bodydist X < -5,25,0)),-40+ifelse(p2bodydist y < 0 && p2bodydist y > -75,ceil(p2bodydist Y/1.5),ifelse(p2bodydist y <= -75,-50,0))
ignorehitpause = 1
projsprpriority = 3
projremovetime = 11
projedgebound = 210

[State 230, 1]
type = nothitby
trigger1 = time < 8
value = SCA

[State 325,8]
type = Varset
trigger1 = 1
var(5) = 0

[State 522, 2]
type = posfreeze
trigger1 = 1

[State 522, 4]
type = Changeanim
trigger1 = var(4) >= 0 && var(4) < 3
value = 300
elem = 1
[State 522, 4]
type = Changeanim
trigger1 = var(4) >= 3 && var(4) < 6
value = 300
elem = 2
[State 522, 4]
type = Changeanim
trigger1 = var(4) >= 6 && var(4) < 9
value = 300
elem = 3
[State 522, 4]
type = Changeanim
trigger1 = var(4) >= 9 && var(4) < 12
value = 300
elem = 4
[State 522, 4]
type = Changeanim
trigger1 = var(4) >= 12
value = 300
elem = 5

[State 522, 4]
type = ChangeState
trigger1 = time >= 8
value = 306
;------------------------------------
; Cototsuki negative
[Statedef 4333]
type    = S
movetype= A
physics = S
ctrl = 0
poweradd = 95
anim = 4125
facep2 = 1
velset = 0,0
sprpriority = 0

[State 230, 0]
type = changestate
trigger1 = time = 0 && var(55) = 1 && random < 500
value = 4733

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1
value = ,AA,AP

[State 230, 0]
type = varset
trigger1 = time = 35
var(38) = 0

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 1

[State 0, 1]
type = posset
trigger1 = pos y != 0
y = 0

[State 100, 1]
type = statetypeset
trigger1 = time = 5
physics = N

[State 1050, 1]
type = velset
trigger1 = time > 4
x = 9       

[State 522, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = s15,0
channel = 1

[State 522, 1]
type = PlaySnd
trigger1 = AnimElem = 3
value = s1,6

[State 1050, 3]
type = ChangeState
Trigger1 = Time = 38
value = 102

[State 1050, 3]
type = ChangeState
trigger1 = time > 4
Trigger1 = p2dist X <= 93
Trigger1 = p2dist X > -45
value = 4111

; Cototsuki negative
[Statedef 4000]
type    = S
movetype= A
physics = S
ctrl = 0
poweradd = 95
anim = 4100
facep2 = 1
velset = 0,0
sprpriority = 0

[State 230, 0]
type = changestate
trigger1 = time = 0 && var(55) = 1 && random < 500
value = 4400

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1
value = ,AA,AP

[State 230, 0]
type = varset
trigger1 = time = 20
var(38) = 0

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 1

[State 0, 1]
type = posset
trigger1 = pos y != 0
y = 0

[State 100, 1]
type = statetypeset
trigger1 = time = 4
physics = N

[State 1050, 1]
type = velset
trigger1 = time > 3
x = 8      

[State 522, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = s15,0
channel = 1

[State 522, 1]
type = PlaySnd
trigger1 = AnimElem = 3
value = s1,6

[State 1050, 3]
type = ChangeState
Trigger1 = Time = 23
value = 102

[State 1050, 3]
type = ChangeState
trigger1 = time > 3
Trigger1 = p2dist X <= 93
Trigger1 = p2dist X > -45
value = 4100

[Statedef 4100]
type    = S
movetype= A
physics = N
ctrl = 0
juggle = 8
anim = 4000
velset = 7

[State 3000, 2]
type = varset
trigger1 = time = 0
var(44) = 0

[State 325,8]
type = Varset
trigger1 = time = 0
var(4) = 0
[State 325,8]
type = Varset
trigger1 = time > 1 && command = "Fireball_x"
var(4) = 1
[State 325,8]
type = Varset
trigger1 = time > 1 && command = "Fireball_z"
var(4) = 2
[State 325,8]
type = Varset
trigger1 = time > 1 && command = "ucut_x"
var(4) = 3
[State 325,8]
type = Varset
trigger1 = time > 1 && command = "ucut_y"
var(4) = 4
[State 325,8]
type = Varset
trigger1 = time > 1 && command = "3p1_x"
var(4) = 5
[State 325,8]
type = Varset
trigger1 = time > 1 && command = "3p1_z"
var(4) = 6
[State 325,8]
type = Varset
trigger1 = time > 1 && command = "scorch_a"
var(4) = 7
[State 325,8]
type = Varset
trigger1 = time > 1 && command = "scorch_c"
var(4) = 8
[State 325,8]
type = Varset
trigger1 = time > 1 && (command = "qcfqcb_x" || command = "qcfqcb_y" || command = "qcfqcb_x2" || command = "qcfqcb_y2")
var(4) = 9
[State 325,8]
type = Varset
trigger1 = time > 1 && command = "qcfqcb_z"
var(4) = 10

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && (time < 7 || time >= 16)
value = ,AA,AP

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time >= 7 && time < 16
value = SCA

[State 230, 0]
type = varset
trigger1 = animelem = 5,6
var(38) = 0

[State 1000, 1]
type = varset
trigger1 = animelem = 6
var(34) = 0

[State 0, 1]
type = posset
trigger1 = pos y != 0
y = 0

[State 1050, 3]
type = ChangeState
trigger1 = movecontact > 0
value = 4002

[State 1050, 2]
type = HitDef
Trigger1 = AnimElem = 1
Trigger1 = var(14) < 1
Trigger1 = var(16) < 1
attr = S, SA
animtype = Hard
damage = 60,10
guardsound = s1,4 
Guardflag = MA
pausetime = 10,11
hitsound = s4,5
sparkno = s10021
getpower = 58,58
givepower = 21,21
guard.sparkno = s10009
sparkxy = 0-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-50
priority = 5,hit
ground.type = High
air.type = Low
ground.slidetime = 20
ground.hittime = 16
guard.slidetime = 20-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,9,0)
guard.hittime = 20-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,9,0)
ground.velocity = -4
air.velocity = -5,-4
airguard.velocity = -3,-3.1
p2facing = 1
air.fall = 1
palfx.time = 1
palfx.add = 0,0,0

[State 1050, 2]
type = HitDef
Triggerall = AnimElem = 1
Trigger1 = var(14) > 0
Trigger2 = var(16) > 0
attr = S, SA
animtype = Hard
air.animtype = dup
damage = 60,10
guardsound = s1,4
Guardflag = MA
pausetime = 10,11
hitsound = s4,4
sparkno = s10021
getpower = 58,58
givepower = 21,21
guard.sparkno = s10009
sparkxy = 0-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-50
priority = 5,hit
ground.type = High
air.type = Low
ground.slidetime = 22
ground.hittime = 18
guard.slidetime = 22-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,10,0)
guard.hittime = 22-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,10,0)
ground.velocity = -4
air.velocity = -5,-4
airguard.velocity = -3,-3.1
p2facing = 1
air.fall = 1
palfx.time = 1
palfx.add = 0,0,0

[State 1000, 4]
type = Helper
trigger1 = movehit > 0
trigger1 = var(14) > 0 || var(16) > 0
name = "e"
ignorehitpause = 1
persistent = 0
pos = -30,-78
postype = p2
stateno = 10090
ownpal = 1

[State 1050, 3]
type = velmul
Trigger1 = 1
x = 0.94
[State 1050, 3]
type = posadd
Trigger1 = animelem = 8
x = 15

[State 1050, 3]
type = ChangeState
triggerall = AnimTime = 0
triggerall = var(55) = 1
triggerall = p2bodydist X <= 50 && p2bodydist X > -50
trigger1 = p2movetype = A
trigger1 = random <= 300
trigger2 = random <= 50
value = 1030

[State 1050, 3]
type = ChangeState
trigger1 = var(58) > 1 || var(58) < 1
trigger1 = AnimTime = 0
trigger1 = var(55) = 1
trigger1 = p2bodydist X > -50
trigger1 = p2bodydist X <= 50
trigger1 = p2movetype = A
trigger1 = random <= 300
value = 1040

[State 1050, 3]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1
;-----------------------------------------
; Choke Grab attempt
[Statedef 4111]
type    = S
movetype= A
physics = N
ctrl = 0
juggle = 8
anim = 4000
velset = 8.5

[State 3000, 2]
type = varset
trigger1 = time = 0
var(44) = 0

[State 325,8]
type = Varset
trigger1 = time = 0
var(4) = 0
[State 325,8]
type = Varset
trigger1 = time > 1 && command = "Fireball_x"
var(4) = 1
[State 325,8]
type = Varset
trigger1 = time > 1 && command = "Fireball_z"
var(4) = 2
[State 325,8]
type = Varset
trigger1 = time > 1 && command = "ucut_x"
var(4) = 3
[State 325,8]
type = Varset
trigger1 = time > 1 && command = "ucut_y"
var(4) = 4
[State 325,8]
type = Varset
trigger1 = time > 1 && command = "3p1_x"
var(4) = 5
[State 325,8]
type = Varset
trigger1 = time > 1 && command = "3p1_z"
var(4) = 6
[State 325,8]
type = Varset
trigger1 = time > 1 && command = "scorch_a"
var(4) = 7
[State 325,8]
type = Varset
trigger1 = time > 1 && command = "scorch_c"
var(4) = 8
[State 325,8]
type = Varset
trigger1 = time > 1 && (command = "qcfqcb_x" || command = "qcfqcb_y" || command = "qcfqcb_x2" || command = "qcfqcb_y2")
var(4) = 9
[State 325,8]
type = Varset
trigger1 = time > 1 && command = "qcfqcb_z"
var(4) = 10

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && (time < 7 || time >= 16)
value = ,AA,AP

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time >= 7 && time < 16
value = SCA

[State 230, 0]
type = varset
trigger1 = animelem = 5,6
var(38) = 0

[State 1000, 1]
type = varset
trigger1 = animelem = 6
var(34) = 0

[State 1050, 3]
type = ChangeState
Trigger1 = movecontact > 0
value = 4002

[State 1050, 2]
type = HitDef
Trigger1 = AnimElem = 1
Trigger1 = var(14) < 1
Trigger1 = var(16) < 1
attr = S, SA
animtype = Hard
damage = 60,10
guardsound = s1,4
Guardflag = MA
pausetime = 10,11
hitsound = s4,5
sparkno = s10021
guard.sparkno = s10009
sparkxy = 0-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-50
priority = 5,hit
getpower = 58,58
givepower = 21,21
ground.type = High
air.type = Low
ground.slidetime = 20
ground.hittime = 16
guard.slidetime = 20-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,9,0)
guard.hittime = 20-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,9,0)
ground.velocity = -4
air.velocity = -5,-4
airguard.velocity = -3,-3.1
p2facing = 1
air.fall = 1
palfx.time = 1
palfx.add = 0,0,0

[State 1050, 2]
type = HitDef
Triggerall = AnimElem = 1
Trigger1 = var(14) > 0
Trigger2 = var(16) > 0
attr = S, SA
animtype = Hard
air.animtype = dup
damage = 60,10
guardsound = s1,4
Guardflag = MA
pausetime = 10,11
hitsound = s4,4
getpower = 58,58
givepower = 21,21
sparkno = s10021
guard.sparkno = s10009
sparkxy = 0-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-50
priority = 5,hit
ground.type = High
air.type = Low
ground.slidetime = 22
ground.hittime = 18
guard.slidetime = 22-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,10,0)
guard.hittime = 22-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,10,0)
ground.velocity = -4
air.velocity = -5,-4
airguard.velocity = -3,-3.1
p2facing = 1
air.fall = 1
palfx.time = 1
palfx.add = 0,0,0

[State 1000, 4]
type = Helper
trigger1 = movehit > 0
trigger1 = var(14) > 0 || var(16) > 0
name = "e"
ignorehitpause = 1
persistent = 0
pos = -30,-78
postype = p2
stateno = 10090
ownpal = 1

[State 265, 7]
type = ChangeState
trigger1 = var(58) > 2 || var(58) < 0
trigger1 = var(55) = 1 && random < 333
trigger1 = movehit > 0 && var(3) > 256
value = 520
[State 265, 7]
type = ChangeState
trigger1 = var(58) > 2 || var(58) < 0
trigger1 = var(55) = 1 && random < 500
trigger1 = movehit > 0 && var(3) > 256
value = 510
[State 265, 7]
type = ChangeState
trigger1 = var(58) > 2 || var(58) < 0
trigger1 = movehit > 0
trigger1 = var(55) = 1 && (var(3) > 256 || (var(3) < 257 && var(3) > 0))
value = 1040

[State 1050, 3]
type = velmul
Trigger1 = 1
x = 0.94
[State 1050, 3]
type = posadd
Trigger1 = animelem = 8
x = 15

[State 1050, 3]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1
;-------------------------------------
; Choke Grab success
[Statedef 4002]
type    = S
movetype= A
physics = S
ctrl = 0
anim = 4002
Velset = 0,0

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 0]
type = varset
trigger1 = animelem = 4
var(38) = 0

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1
value = ,AA,AP

[State 230, 0]
type = varset
trigger1 = animelem = 4
var(34) = 0

[State 1022, 7]
type = Posadd
trigger1 = animelem = 1
x = 11
[State 1022, 7]
type = Posadd
trigger1 = animelem = 6
x = 5
[State 1022, 7]
type = Posadd
trigger1 = animelem = 7
x = 16

[State 1300, 3]
type = targetbind
trigger1 = movehit > 0
trigger1 = time >= 10
trigger1 = time <= 13
pos = 83,0
id = 4002
ignorehitpause = 1
[State 1300, 3]
type = targetbind
trigger1 = movehit > 0
trigger1 = time >= 14
trigger1 = time <= 30
pos = 83,0
id = 4002
ignorehitpause = 1

[State 1203, 1]
type = Width
trigger1 = time > 9 && time < 14 && movehit > 0
edge = 80,0
ignorehitpause = 1

[State 522, 1]
type = velset
trigger1 = animelem = 3
x = 0

[State 522, 1]
type = PlaySnd
trigger1 = time = 31
value = s4,8

[State 1300, 5]
type = projectile
trigger1 = time = 33
projanim = 10080
offset = 80,-24
projsprpriority = 6
projremovetime = 35
projedgebound = 210

[State 522, 1]
type = PlaySnd
trigger1 = movehit > 0
value = s15,1
channel = 6
ignorehitpause = 1
persistent = 0

[State 8160, 13]
type = Explod
trigger1 = Time >= 33
trigger1 = Time <= 34
trigger1 = NumExplod(8150) < 6
anim = 3100
ID = 8150
sprpriority = 5
pos = 83,-10
random = 60,40
ignorehitpause = 1
ownpal = 1

[State 8160, 14]
type = Explod
trigger1 = Time >= 33
trigger1 = Time <= 34
trigger1 = NumExplod(3100) < 5
anim = 3110
ID = 3100
sprpriority = 5
pos = 83,-10
random = 60,40
ignorehitpause = 1
ownpal = 1

[State 8160, 15]
type = Explod
trigger1 = Time >= 33
trigger1 = Time <= 34
anim = 3120
sprpriority = 5
pos = 83,-10
random = 60,40
ignorehitpause = 1
ownpal = 1

[State 8160, 16]
type = Explod
trigger1 = Time >= 33
trigger1 = Time <= 34
anim = 3130
sprpriority = 5
pos = 83,-10
random = 60,40
ignorehitpause = 1
ownpal = 1

[State 8160, 17]
type = Explod
trigger1 = Time >= 33
trigger1 = Time <= 34
trigger1 = NumExplod(3100) < 6
anim = 3140
ID = 3100
sprpriority = 5
pos = 83,-10
random = 60,40
ignorehitpause = 1
ownpal = 1

[State 8160, 18]
type = Explod
trigger1 = Time >= 33
trigger1 = Time <= 34
trigger1 = NumExplod(3100) < 6
anim = 3150
ID = 3100
sprpriority = 5
pos = 83,-10
random = 60,40
ignorehitpause = 1
ownpal = 1

[State 3060, 1]
type = HitDef
trigger1 = AnimElem = 2 && p2life > 0
attr = S, SA
id = 4002
animtype = h
damage = 0
guardflag = MA
pausetime = 2,2
guard.pausetime = 20,15
priority = 6,miss
sparkno = -1
getpower = 58,58
givepower = 21,21
guardsound = s1,4
guard.sparkno = s10009
sparkxy = -15-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-45
hitonce = 1
ground.type = Low
ground.slidetime = 25
ground.hittime = 25
guard.slidetime = 38-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,18,0)
guard.hittime = 38-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,18,0)
guard.velocity = -9.2
airguard.velocity = -5,-2.9
p2facing = 1

[State 1221, 4]
type = targetlifeadd
Triggerall = time = 33
trigger1 = var(14) < 1
trigger1 = var(16) < 1
value = -90
id = 4002
[State 1221, 4]
type = targetlifeadd
Triggerall = time = 33
trigger1 = var(14) > 0
trigger2 = var(16) > 0
value = -108
id = 4002

[State 1221, 4]
type = targetstate
Trigger1 = Time > 9 && time < 14 && movehit > 0 && numtarget(4002) > 0
value = 4005
id = 4002
ignorehitpause = 1

[State 1051, 5]
type = Changestate
Triggerall = animelem = 4
trigger1 = movecontact = 0
trigger2 = numtarget(4002) > 0
trigger2 = target(4002),stateno != 4005
trigger3 = numtarget(4002) = 0
value = 4003

[State 1203, 5]
type = Envshake
trigger1 = movehit > 0
trigger1 = animelem = 5
time = 10
freq = 170
ampl = -4
persistent = 0
ignorehitpause = 1

[State 1051, 5]
type = Changestate
Trigger1 = AnimTime = 0
value = 0
ctrl = 1
;--------------------------------------
; Choke Grab(2nd) miss
[Statedef 4003]
type    = S
movetype= A
physics = S
ctrl = 0
anim = 4003
Velset = 0,0

[State 9001, 1]
type = varset
trigger1 = Time = 0
var(34) = 0

[State 1022, 7]
type = Posadd
trigger1 = animelem = 6
x = 16

[State 1051, 5]
type = Changestate
Trigger1 = AnimTime = 0
value = 0
ctrl = 1
;------------------------------------
; Catch by Choke Grab
[Statedef 4005]
type    = S
movetype= H
physics = S
velset = 0,0,0
ctrl = 0

[State 1531, 5]
type = defencemulSet
trigger1 = 1
value = 1

;[State 7102, 1]
;type = changeanim
;trigger1 = time = 2
;trigger1 = p2stateno != 4002
;value = 5170 

;[State 7102, 1]
;type = SelfState
;trigger1 = time = 2
;trigger1 = p2stateno != 4002
;value = 5110 

[State 4005, 0]
type = ChangeAnim2
Trigger1 = Time = 0
value = 4111

[State 4005, 2]
type = posset
Trigger1 = time = 0
y = 0

[State 3305, 2]
type = PalFX
trigger1 = time = 19
time = 9
add = 48,0,168
mul = 166,166,166
sinadd = 96,96,96,12
color = 0
invertall = 1

[State 1221, 4]
type = changestate
Trigger1 = Time = 20
value = 4008
ctrl = 0
;------------------------------------
; Choke Grab attempt
[Statedef 4833]
type    = S
movetype= A
physics = S
ctrl = 0
poweradd = 95
anim = 4500
facep2 = 1
velset = 0,0

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1
value = ,AA,AP

[State 230, 0]
type = varset
trigger1 = time = 35
var(38) = 0

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 1

[State 0, 1]
type = posset
trigger1 = pos y != 0
y = 0

[State 100, 1]
type = statetypeset
trigger1 = time = 6
physics = N

[State 1050, 1]
type = velset
trigger1 = time > 5
x = 9       

[State 522, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = s15,0
channel = 1

[State 1050, 3]
type = ChangeState
Trigger1 = Time = 38
value = 102

[State 1050, 3]
type = ChangeState
trigger1 = time > 5
Trigger1 = p2dist X <= 88
Trigger1 = p2dist X > -15 
value = 4611

; Choke Grab attempt
[Statedef 4500]
type    = S
movetype= A
physics = S
ctrl = 0
poweradd = 95
anim = 4500
facep2 = 1
velset = 0,0

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1
value = ,AA,AP

[State 230, 0]
type = varset
trigger1 = time = 20
var(38) = 0

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 1

[State 0, 1]
type = posset
trigger1 = pos y != 0
y = 0

[State 100, 1]
type = statetypeset
trigger1 = time = 6
physics = N

[State 1050, 1]
type = velset
trigger1 = time > 5
x = 8      

[State 522, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = s15,0
channel = 1

[State 1050, 3]
type = ChangeState
Trigger1 = Time = 23
value = 102

[State 1050, 3]
type = ChangeState
trigger1 = time > 5
Trigger1 = p2dist X <= 79 
Trigger1 = p2dist X > -15 
value = 4600
;-------------------------------------
; Cototsuki negative
[Statedef 4733]
type    = S
movetype= A
physics = S
ctrl = 0
poweradd = 95
anim = 4500
facep2 = 1
velset = 0,0

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230,0]
type = varset
trigger1 = var(55) = 1 && var(3) > 0 && var(50) = 0 && time = 0
trigger1 = prevstateno = 510 || prevstateno = 520 || prevstateno = 1037 || prevstateno = 301 || prevstateno = 511 || prevstateno = 516
var(50) = 16

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1
value = ,AA,AP

[State 230, 0]
type = varset
trigger1 = time = 35
var(38) = 0

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 1

[State 0, 1]
type = posset
trigger1 = pos y != 0
y = 0

[State 100, 1]
type = statetypeset
trigger1 = time = 6
physics = N

[State 1050, 1]
type = velset
trigger1 = time > 5
x = 9       

[State 522, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = s15,0
channel = 1

[State 1050, 3]
type = ChangeState
Trigger1 = Time = 38
value = 102

[State 1050, 3]
type = ChangeState
trigger1 = time > 5
Trigger1 = p2dist X <= 88
Trigger1 = p2dist X > -15 
value = 4611

; Cototsuki negative
[Statedef 4400]
type    = S
movetype= A
physics = S
ctrl = 0
poweradd = 95
anim = 4500
facep2 = 1
velset = 0,0

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1
value = ,AA,AP

[State 230, 0]
type = varset
trigger1 = time = 20
var(38) = 0

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 1

[State 0, 1]
type = posset
trigger1 = pos y != 0
y = 0

[State 100, 1]
type = statetypeset
trigger1 = time = 6
physics = N

[State 1050, 1]
type = velset
trigger1 = time > 5
x = 8      

[State 522, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = s15,0
channel = 1

[State 1050, 3]
type = ChangeState
Trigger1 = Time = 23
value = 102

[State 1050, 3]
type = ChangeState
trigger1 = time > 5
Trigger1 = p2dist X <= 79 
Trigger1 = p2dist X > -15 
value = 4600

[Statedef 4600]
type    = S
movetype= A
physics = N
ctrl = 0
juggle = var(10)
anim = 4611
velset = 7.5

[State 3000, 2]
type = varset
trigger1 = time = 0 && prevstateno != 4400
var(5) = 0
[State 3000, 2]
type = varset
trigger1 = time = 0 && prevstateno = 4400
var(5) = 10

[State 3000, 2]
type = varset
trigger1 = time = 0
var(44) = 0

[State 325,8]
type = Varset
trigger1 = time = 0
var(4) = 0
[State 325,8]
type = Varset
trigger1 = time > 1 && command = "Fireball_x"
var(4) = 1
[State 325,8]
type = Varset
trigger1 = time > 1 && command = "Fireball_z"
var(4) = 2
[State 325,8]
type = Varset
trigger1 = time > 1 && command = "ucut_x"
var(4) = 3
[State 325,8]
type = Varset
trigger1 = time > 1 && command = "ucut_y"
var(4) = 4
[State 325,8]
type = Varset
trigger1 = time > 1 && command = "3p1_x"
var(4) = 5
[State 325,8]
type = Varset
trigger1 = time > 1 && command = "3p1_z"
var(4) = 6
[State 325,8]
type = Varset
trigger1 = time > 1 && command = "scorch_a"
var(4) = 7
[State 325,8]
type = Varset
trigger1 = time > 1 && command = "scorch_c"
var(4) = 8
[State 325,8]
type = Varset
trigger1 = time > 1 && (command = "qcfqcb_x" || command = "qcfqcb_y" || command = "qcfqcb_x2" || command = "qcfqcb_y2")
var(4) = 9
[State 325,8]
type = Varset
trigger1 = time > 1 && command = "qcfqcb_z"
var(4) = 10

[State 3000, 2]
type = width
trigger1 = 1
value = 5

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && (time < 8 || time >= 16)
value = ,AA,AP

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time >= 8 && time < 16
value = SCA

[State 230, 0]
type = varset
trigger1 = animelem = 5,5
var(38) = 0

[State 1000, 1]
type = varset
trigger1 = animelem = 6
var(34) = 0

[State 0, 1]
type = posset
trigger1 = pos y != 0
y = 0

[State 1050, 3]
type = ChangeState
trigger1 = movecontact > 0
value = 4502

[State 1050, 2]
type = HitDef
Trigger1 = AnimElem = 1
Trigger1 = var(14) < 1
Trigger1 = var(16) < 1
attr = S, SA
animtype = Hard
damage = 40+var(5),10
guardsound = s1,0 
Guardflag = MA
pausetime = 6,13;7
hitsound = s3,2
sparkno = s10066
getpower = 58,58
givepower = 21,21
guard.sparkno = s10113
sparkxy = 0-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-50
priority = 5,hit
ground.type = Low
ground.slidetime = 20
ground.hittime = 20
guard.slidetime = 20-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,9,0)
guard.hittime = 20-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,9,0)
ground.velocity = -8
guard.velocity = 0
air.velocity = -7,-4
airguard.velocity = -3,-3.1
p2facing = 1
air.fall = 1
palfx.time = 1
palfx.add = 0,0,0

[State 1050, 2]
type = HitDef
Triggerall = AnimElem = 1
Trigger1 = var(14) > 0
Trigger2 = var(16) > 0
attr = S, SA
animtype = Hard
air.animtype = dup
damage = 40+var(5),10
guardsound = s1,0
Guardflag = MA
pausetime = 6,7;13
hitsound = s3,2
sparkno = s9245
getpower = 58,58
givepower = 21,21
guard.sparkno = s10113
sparkxy = 0-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-50
priority = 5,hit
ground.type = Low
ground.slidetime = 22
ground.hittime = 22
guard.slidetime = 22-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,10,0)
guard.hittime = 22-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,10,0)
ground.velocity = -8
guard.velocity = 0
air.velocity = -7,-4
airguard.velocity = -3,-3.1
p2facing = 1
air.fall = 1
palfx.time = 1
palfx.add = 0,0,0

[State 1050, 3]
type = velmul
Trigger1 = 1
x = 0.94
[State 1050, 3]
type = posadd
Trigger1 = animelem = 8
x = 15

[State 1050, 3]
type = ChangeState
triggerall = AnimTime = 0
triggerall = var(55) = 1
triggerall = p2bodydist X <= 50 && p2bodydist X > -50
trigger1 = p2movetype = A
trigger1 = random <= 300
trigger2 = random <= 50
value = 1030

[State 1050, 3]
type = ChangeState
trigger1 = var(58) > 1 || var(58) < 1
trigger1 = AnimTime = 0
trigger1 = var(55) = 1
trigger1 = p2bodydist X <= 50 && p2bodydist X > -50
trigger1 = p2movetype = A
trigger1 = random <= 300
value = 1040

[State 1050, 3]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1
;-------------------------------------
; Choke Grab attempt
[Statedef 4611]
type    = S
movetype= A
physics = N
ctrl = 0
juggle = var(10)
anim = 4611
velset = 8

[State 3000, 2]
type = varset
trigger1 = time = 0 && prevstateno != 4733
var(5) = 0
[State 3000, 2]
type = varset
trigger1 = time = 0 && prevstateno = 4733
var(5) = 10

[State 3000, 2]
type = varset
trigger1 = time = 0
var(44) = 0

[State 325,8]
type = Varset
trigger1 = time = 0
var(4) = 0
[State 325,8]
type = Varset
trigger1 = time > 1 && command = "Fireball_x"
var(4) = 1
[State 325,8]
type = Varset
trigger1 = time > 1 && command = "Fireball_z"
var(4) = 2
[State 325,8]
type = Varset
trigger1 = time > 1 && command = "ucut_x"
var(4) = 3
[State 325,8]
type = Varset
trigger1 = time > 1 && command = "ucut_y"
var(4) = 4
[State 325,8]
type = Varset
trigger1 = time > 1 && command = "3p1_x"
var(4) = 5
[State 325,8]
type = Varset
trigger1 = time > 1 && command = "3p1_z"
var(4) = 6
[State 325,8]
type = Varset
trigger1 = time > 1 && command = "scorch_a"
var(4) = 7
[State 325,8]
type = Varset
trigger1 = time > 1 && command = "scorch_c"
var(4) = 8
[State 325,8]
type = Varset
trigger1 = time > 1 && (command = "qcfqcb_x" || command = "qcfqcb_y" || command = "qcfqcb_x2" || command = "qcfqcb_y2")
var(4) = 9
[State 325,8]
type = Varset
trigger1 = time > 1 && command = "qcfqcb_z"
var(4) = 10

[State 325,8]
type = Varset
trigger1 = time = 0
var(18) = 0

[State 325,8]
type = Varset
trigger1 = time = 12 && p2life > 140
trigger1 = var(3) > 0 && var(3) < 136 && power >= 1000 + var(20)*100
var(18) = 1

[State 265, 7]
type = varset
trigger1 = var(58) > 2 || var(58) < 0
trigger1 = var(55) = 1 && var(14) < 1 && var(16) < 1 && p2statetype != A
trigger1 = time = 12 && movehit > 0 && var(18) = 1 && var(45) = 0
var(45) = 15
ignorehitpause = 1
persistent = 0

[State 265, 7]
type = ChangeState
trigger1 = var(58) > 2 || var(58) < 0
trigger1 = var(55) = 1 && var(14) < 1 && var(16) < 1 && p2statetype != A
trigger1 = time = 12 && movehit > 0 && var(18) = 1
value = 1998

[State 3000, 2]
type = width
trigger1 = 1
value = 5

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && (time < 8 || time >= 16)
value = ,AA,AP

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time >= 8 && time < 16
value = SCA

[State 230, 0]
type = varset
trigger1 = animelem = 5,5
var(38) = 0

[State 1000, 1]
type = varset
trigger1 = animelem = 6
var(34) = 0

[State 265, 7]
type = ChangeState
trigger1 = var(58) > 2 || var(58) < 0
trigger1 = var(55) = 1 && random < 333
trigger1 = movehit > 0 && var(3) > 384
value = 299
[State 265, 7]
type = ChangeState
trigger1 = var(58) > 2 || var(58) < 0
trigger1 = var(55) = 1 && random < 333
trigger1 = movehit > 0 && var(3) > 256
value = 520
[State 265, 7]
type = ChangeState
trigger1 = var(58) > 2 || var(58) < 0
trigger1 = var(55) = 1 && random < 333
trigger1 = movehit > 0 && var(3) > 256
value = 510
[State 265, 7]
type = ChangeState
trigger1 = var(58) > 2 || var(58) < 0
trigger1 = movehit > 0
trigger1 = var(55) = 1 && (var(3) > 256 || (var(3) < 257 && var(3) > 0))
value = 1040

[State 1050, 3]
type = ChangeState
Trigger1 = movecontact > 0
value = 4502

[State 1050, 2]
type = HitDef
Trigger1 = AnimElem = 1
Trigger1 = var(14) < 1
Trigger1 = var(16) < 1
attr = S, SA
animtype = Hard
damage = 40+var(5),10
guardsound = s1,0
Guardflag = MA
pausetime = 6,13;7
hitsound = s3,2
sparkno = s10066
guard.sparkno = s10113
sparkxy = 0-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-50
priority = 5,hit
getpower = 58,58
givepower = 21,21
ground.type = Low
ground.slidetime = 20
ground.hittime = 20
guard.slidetime = 20-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,9,0)
guard.hittime = 20-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,9,0)
ground.velocity = -8
guard.velocity = 0
air.velocity = -7,-4
airguard.velocity = -3,-3.1
p2facing = 1
air.fall = 1
palfx.time = 1
palfx.add = 0,0,0

[State 1050, 2]
type = HitDef
Triggerall = AnimElem = 1
Trigger1 = var(14) > 0
Trigger2 = var(16) > 0
attr = S, SA
animtype = Hard
air.animtype = dup
damage = 40+var(5),10
guardsound = s1,0
Guardflag = MA
pausetime = 6,7;13
hitsound = s3,2
getpower = 58,58
givepower = 21,21
sparkno = s9245
guard.sparkno = s10113
sparkxy = 0-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-50
priority = 5,hit
ground.type = Low
ground.slidetime = 22
ground.hittime = 22
guard.slidetime = 22-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,10,0)
guard.hittime = 22-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,10,0)
ground.velocity = -8
guard.velocity = 0
air.velocity = -7,-4
airguard.velocity = -3,-3.1
p2facing = 1
air.fall = 1
palfx.time = 1
palfx.add = 0,0,0

[State 1050, 3]
type = velmul
Trigger1 = 1
x = 0.94
[State 1050, 3]
type = posadd
Trigger1 = animelem = 8
x = 15

[State 1050, 3]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1
;-------------------------------------
; Choke Grab success
[Statedef 4502]
type    = S
movetype= A
physics = S
ctrl = 0
anim = 4502
Velset = 0,0

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 0]
type = varset
trigger1 = animelem = 4
var(38) = 0

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1
value = ,AA,AP

[State 230, 0]
type = varset
trigger1 = animelem = 4
var(34) = 0

[State 1300, 3]
type = targetbind
trigger1 = movehit > 0
trigger1 = time >= 7
trigger1 = time <= 9
pos = 83,0
id = 4002
ignorehitpause = 1
[State 1300, 3]
type = targetbind
trigger1 = movehit > 0
trigger1 = time >= 10
trigger1 = time <= 30
pos = 83,0
id = 4002
ignorehitpause = 1

[State 1300, 3]
type = projectile
trigger1 = AnimElem = 5
projanim = 921
postype = p2
offset = 0,10
projsprpriority = -1
projremovetime = 23
projedgebound = 210

[State 1300, 3]
type = projectile
trigger1 = AnimElem = 5
projanim = 922
postype = p2
offset = 0,10
projsprpriority = 3
projremovetime = 19
projedgebound = 210

[State 1203, 1]
type = Width
trigger1 = time > 6 && time < 10 && movehit > 0
edge = 80,0
ignorehitpause = 1

[State 522, 1]
type = velset
trigger1 = animelem = 3
x = 0

[State 1022, 7]
type = Posadd
trigger1 = animelem = 1
x = 11
[State 1022, 7]
type = Posadd
trigger1 = animelem = 6
x = 5
[State 1022, 7]
type = Posadd
trigger1 = animelem = 7
x = 16

[State 522, 1]
type = PlaySnd
trigger1 = time = 40
value = s7,2

[State 522, 1]
type = PlaySnd
trigger1 = animelem = 5
value = s15,1
channel = 6

[State 8160, 13]
type = Explod
trigger1 = Time >= 31
trigger1 = Time <= 43
trigger1 = NumExplod(8150) < 6
trigger1 = Random < 450
anim = 3100
ID = 8150
sprpriority = 5
pos = 88,-10
random = 50,40
ignorehitpause = 1
ownpal = 1

[State 8160, 14]
type = Explod
trigger1 = Time >= 31
trigger1 = Time <= 43
trigger1 = NumExplod(3100) < 5
trigger1 = Random < 400
anim = 3110
ID = 3100
sprpriority = 5
pos = 88,-10
random = 50,40
ignorehitpause = 1
ownpal = 1

[State 8160, 15]
type = Explod
trigger1 = Time >= 31
trigger1 = Time <= 43
trigger1 = NumExplod(3100) < 5
trigger1 = Random < 450
anim = 3120
ID = 3100
sprpriority = 5
pos = 88,-10
random = 50,40
ignorehitpause = 1
ownpal = 1

[State 8160, 16]
type = Explod
trigger1 = Time >= 31
trigger1 = Time <= 43
trigger1 = NumExplod(3100) < 5
trigger1 = Random < 400
anim = 3130
ID = 3100
sprpriority = 5
pos = 88,-10
random = 50,40
ignorehitpause = 1
ownpal = 1

[State 8160, 17]
type = Explod
trigger1 = Time >= 31
trigger1 = Time <= 43
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 600
anim = 3140
ID = 3100
sprpriority = 5
pos = 88,-10
random = 50,40
ignorehitpause = 1
ownpal = 1

[State 8160, 18]
type = Explod
trigger1 = Time >= 31
trigger1 = Time <= 43
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 600
anim = 3150
ID = 3100
sprpriority = 5
pos = 88,-10
random = 50,40
ignorehitpause = 1
ownpal = 1

[State 1203, 5]
type = Envshake
trigger1 = time = 31
time = 30
freq = 255
ampl = -6
persistent = 0
ignorehitpause = 1

[State 3060, 1]
type = HitDef
trigger1 = AnimElem = 2 && var(14) < 1 && var(16) < 1
attr = S, SA
id = 4002
animtype = h
damage = 0
guardflag = MA
pausetime = 0,0
priority = 6,miss
getpower = 58,58
givepower = 21,21
hitsound = s3,2
guardsound = s1,0
sparkno = s10666
guard.sparkno = s10111
sparkxy = -5-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-45
hitonce = 1
ground.type = Low
guard.velocity = -11.2
guard.cornerpush.veloff = -18
ground.slidetime = 25
ground.hittime = 25
guard.slidetime = 37-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,18,0)
guard.hittime = 37-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,18,0)
airguard.velocity = -5,-2.9
p2facing = 1

[State 3060, 1]
type = HitDef
trigger1 = AnimElem = 2 && (var(14) > 0 || var(16) > 0)
attr = S, SA
id = 4002
damage = 0
animtype = h
guardflag = MA
pausetime = 0,0
priority = 6,miss
snap = 83
getpower = 58,58
givepower = 21,21
hitsound = s3,2
guardsound = s1,0
sparkno = s9246
guard.sparkno = s10111
sparkxy = -5-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-45
hitonce = 1
ground.type = Low
guard.velocity = -11.2
guard.cornerpush.veloff = -18
ground.slidetime = 27
ground.hittime = 27
guard.slidetime = 39-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,19,0)
guard.hittime = 39-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,19,0)
airguard.velocity = -5,-2.9
p2facing = 1

[State 1221, 4]
type = targetlifeadd
Triggerall = animelem = 6 && var(5) = 0
trigger1 = var(14) < 1
trigger1 = var(16) < 1
value = -44
id = 4002
[State 1221, 4]
type = targetlifeadd
Triggerall = animelem = 6 && var(5) = 0
trigger1 = var(14) > 0
trigger2 = var(16) > 0
value = -53
id = 4002

[State 1221, 4]
type = targetlifeadd
Triggerall = animelem = 6 && var(5) != 0
trigger1 = var(14) < 1
trigger1 = var(16) < 1
value = -140
id = 4002
[State 1221, 4]
type = targetlifeadd
Triggerall = animelem = 6 && var(5) != 0
trigger1 = var(14) > 0
trigger2 = var(16) > 0
value = -168
id = 4002

[State 1221, 4]
type = targetstate
Trigger1 = Time > 6 && time < 10 && movehit > 0 && numtarget(4002) > 0
value = 4505
id = 4002
ignorehitpause = 1

[State 1051, 5]
type = Changestate
Triggerall = animelem = 4
trigger1 = movecontact = 0
trigger2 = numtarget(4002) > 0
trigger2 = target(4002),stateno != 4505
trigger3 = numtarget(4002) = 0
value = 4503

[State 1203, 5]
type = Envshake
trigger1 = movehit > 0
trigger1 = animelem = 4
time = 10
freq = 170
ampl = -5
persistent = 0
ignorehitpause = 1

[State 1051, 5]
type = Changestate
Trigger1 = AnimTime = 0
value = 0
ctrl = 1
;-------------------------------------
[Statedef 4503]
type    = S
movetype= A
physics = S
ctrl = 0
anim = 4503
Velset = 0,0

[State 9001, 1]
type = varset
trigger1 = Time = 0
var(34) = 0

[State 1022, 7]
type = Posadd
trigger1 = animelem = 5
x = 15

[State 1051, 5]
type = Changestate
Trigger1 = AnimTime = 0
value = 0
ctrl = 1

; Catch by Choke Grab
[Statedef 4505]
type    = S
movetype= H
physics = S
velset = 0,0,0
ctrl = 0

[State 1531, 5]
type = defencemulSet
trigger1 = 1
value = 1

[State 4005, 0]
type = ChangeAnim2
Trigger1 = Time = 0
value = 4113

[State 4005, 2]
type = posset
Trigger1 = time = 0
y = 0
      
[State 3102, 2]
type = palfx
trigger1 = Time = 32
time = 9
add = 48,0,168
mul = 166,166,166
sinadd = 96,96,96,12
color = 0 
invertall = 1 

[State 1221, 3]
type = velset
trigger1 = time = 33
x = -5.5
y = -5.5

[State 1221, 4]
type = changestate
Trigger1 = Time = 33
value = 4008
ctrl = 0
;-----------------------------------------
; kuzkaze (guarded)
[Statedef 2999]
type    = S
movetype= A
physics = S
ctrl = 0
anim = 2999
Velset = 0,0
sprpriority = 0

[State 0, 1]
type = varset
trigger1 = time = 0
var(33) = 0

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time > 0
value = ,AA,AP

[State 5040, 1]
type = nothitby
trigger1 = time = 0
value = SCA

[State 230, 0]
type = varset
trigger1 = animelem = 1,1
var(38) = 0

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 0

[State 1050, 2]
type = HitDef
trigger1 = p2stateno != 140
trigger1 = enemynear,stateno != 130 || (enemynear,stateno = 130 && enemynear,prevstateno != 150 && enemynear,prevstateno != 152)
Trigger1 = AnimElem = 1
attr = S, ST
hitflag = M-
id = 3000
Guardflag =-A
priority = 4, Miss
snap = 40,0
sparkno = -1
hitonce = 1
p2facing = 1
p1stateno = 3002
p2stateno = 3005
p2getp1state = 1

[State 1050, 3]
type = ChangeState
Trigger1 = AnimTime = 0
Trigger1 = Stateno != 3002
value = 3001
;------------------------------------
; kuzkaze
[Statedef 3000]
type    = S
movetype= A
physics = S
ctrl = 0
anim = 3003
facep2 = 1
Velset = 0,0
sprpriority = 0

[State 0, 1]
type = varset
trigger1 = time = 0
var(33) = 0

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1 && time > 0
value = ,AA,AP

[State 5040, 1]
type = nothitby
trigger1 = time = 0
value = SCA

[State 230, 0]
type = varset
trigger1 = animelem = 1,1
var(38) = 0

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 0

[State 1050, 2]
type = HitDef
trigger1 = p2stateno != 140
trigger1 = enemynear,stateno != 130 || (enemynear,stateno = 130 && enemynear,prevstateno != 150 && enemynear,prevstateno != 152)
Trigger1 = AnimElem = 1
attr = S, ST
hitflag = M-
id = 3000
Guardflag =-A
priority = 4, Miss
snap = 40,0
sparkno = -1
hitonce = 1
p2facing = 1
p1stateno = 3002
p2stateno = 3005
p2getp1state = 1

[State 1050, 3]
type = ChangeState
Trigger1 = AnimTime = 0
Trigger1 = Stateno != 3002
value = 3001
;----------------------------------
; Catch success
[Statedef 3002]
type    = S
movetype= A
physics = S
ctrl = 0
anim = 3002
Velset = 0,0

[State 123, 2]
type = varset
trigger1 = time = 0
var(4) = 0
[State 123, 2]
type = varset
trigger1 = numtarget(3000) > 0
trigger1 = time = 0 && target(3000),const(size.head.pos.y)>-70 && target(3000),const(size.head.pos.y)<0
var(4) = 1

[State 123, 2]
type = varset
trigger1 = time = 0
var(6) = 0
[State 123, 2]
type = varset
trigger1 = animtime > -8
trigger1 = var(55) = 0
trigger1 = command = "a"
trigger1 = command != "holddown" && command != "holdup"
var(6) = 1
[State 123, 2]
type = varset
trigger1 = animtime > -8
trigger1 = var(55) = 0
trigger1 = command = "c" && command != "holdfwd"
trigger1 = command != "holddown" && command != "holdup"
var(6) = 2
[State 123, 2]
type = varset
trigger1 = animtime > -8
trigger1 = var(55) = 0
trigger1 = command = "x"
trigger1 = command != "holddown" && command != "holdup"
var(6) = 3
[State 123, 2]
type = varset
trigger1 = animtime > -8
trigger1 = var(55) = 0
trigger1 = command = "y"
trigger1 = command != "holddown" && command != "holdup"
var(6) = 4
[State 123, 2]
type = varset
trigger1 = animtime > -8
trigger1 = var(55) = 0
trigger1 = command = "x"
trigger1 = command = "holdfwd"
trigger1 = command != "holddown" && command != "holdup"
var(6) = 5
[State 123, 2]
type = varset
trigger1 = animtime > -8
trigger1 = var(55) = 0
trigger1 = command = "a"
trigger1 = command = "holdfwd"
trigger1 = command != "holddown" && command != "holdup"
var(6) = 6
[State 123, 2]
type = varset
trigger1 = var(55) = 0
trigger1 = animtime > -8
trigger1 = command = "ab" && command != "holdup"
var(6) = 7
[State 123, 2]
type = varset
trigger1 = animtime > -8
trigger1 = var(55) = 0
trigger1 = command = "c" && command = "holdfwd"
trigger1 = command != "holddown" && command != "holdup"
var(6) = 8

[State 1203, 2]
type = Turn
trigger1 = time = 0
trigger2 = time = 2 && numtarget(3000) > 0
trigger2 = target(3000),stateno != 3005
trigger3 = time = 2 && numtarget(3000) = 0

[State 7102, 1]
type = changeState
trigger1 = time = 2 && numtarget(3000) > 0
trigger1 = target(3000),stateno != 3005
trigger2 = time = 2 && numtarget(3000) = 0
value = 0 
ctrl = 1

[State 1203, 1]
type = Width
trigger1 = time = 0
edge = 10,10

[State 1203, 1]
type = Width
trigger1 = animelem = 11
edge = 31,10

[State 265, 5]
type = PlayerPush
trigger1 = 1
value = 0

[State 522, 1];only 2k
type = PlaySnd
trigger1 = AnimElem = 10
value = s14,1
channel = 1

[State 512, 1];only 2k1
type = PlaySnd
trigger1 = AnimElem = 10
value = s3,1
channel = 1

[State 522, 1]
type = PlaySnd
trigger1 = AnimElem = 10
value = s14,2

[State 3000]
type = projectile
trigger1 = animelem = 1
projanim = 925
offset = -20,0
projsprpriority = 3
projremovetime = 28
projedgebound = 210

[State 3000]
type = playsnd
trigger1 = Time = 0
value = s7,3

[State 901, 1]
type = sprpriority
trigger1 = time > 31
value = 1

[State 901, 1]
type = sprpriority
trigger1 = time <= 31
value = 3

[State 901, 3]
type = TargetBind
trigger1 = numtarget(3000) > 0
trigger1 = target(3000),name != "choi" && target(3000),name != "dark chun-li r"
trigger1 = target(3000),name != "bao" && target(3000),name != "spider-man"
trigger1 = target(3000),name != "Kurenai by Inverse v1.0" && target(3000),name != "kurenai"
trigger1 = target(3000),name != "ryuzito de souza" && target(3000),name != "pocket ryu"
trigger1 = target(3000),name != "Asahi_Sakurai By Toshi"
trigger1 = time >= 0
trigger1 = time <= 9
pos = -30-ifelse(var(4)=1,(target(3000),const(size.head.pos.x)),0),0+ifelse(var(4)=1,-70-(target(3000),const(size.head.pos.y)),0)
id = 3000
[State 901, 4]
type = TargetBind
trigger1 = numtarget(3000) > 0
trigger1 = target(3000),name != "choi" && target(3000),name != "dark chun-li r"
trigger1 = target(3000),name != "bao" && target(3000),name != "spider-man"
trigger1 = target(3000),name != "Kurenai by Inverse v1.0" && target(3000),name != "kurenai"
trigger1 = target(3000),name != "ryuzito de souza" && target(3000),name != "pocket ryu"
trigger1 = target(3000),name != "Asahi_Sakurai By Toshi"
trigger1 = time >= 10
trigger1 = time <= 12
pos = -28-ifelse(var(4)=1,(target(3000),const(size.head.pos.x)),0),0+ifelse(var(4)=1,-72-(target(3000),const(size.head.pos.y)),0)
id = 3000
[State 901, 4]
type = TargetBind
trigger1 = numtarget(3000) > 0
trigger1 = target(3000),name != "choi" && target(3000),name != "dark chun-li r"
trigger1 = target(3000),name != "bao" && target(3000),name != "spider-man"
trigger1 = target(3000),name != "Kurenai by Inverse v1.0" && target(3000),name != "kurenai"
trigger1 = target(3000),name != "ryuzito de souza" && target(3000),name != "pocket ryu"
trigger1 = target(3000),name != "Asahi_Sakurai By Toshi"
trigger1 = time >= 13
trigger1 = time <= 15
pos = -23-ifelse(var(4)=1,(target(3000),const(size.head.pos.x)),0),0+ifelse(var(4)=1,-73-(target(3000),const(size.head.pos.y)),0)
id = 3000
[State 901, 4]
type = TargetBind
trigger1 = numtarget(3000) > 0
trigger1 = target(3000),name != "choi" && target(3000),name != "dark chun-li r"
trigger1 = target(3000),name != "bao" && target(3000),name != "spider-man"
trigger1 = target(3000),name != "Kurenai by Inverse v1.0" && target(3000),name != "kurenai"
trigger1 = target(3000),name != "ryuzito de souza" && target(3000),name != "pocket ryu"
trigger1 = target(3000),name != "Asahi_Sakurai By Toshi"
trigger1 = time >= 16
trigger1 = time <= 19
pos = -19-ifelse(var(4)=1,(target(3000),const(size.head.pos.x)),0),0+ifelse(var(4)=1,-72-(target(3000),const(size.head.pos.y)),0)
id = 3000
[State 901, 5]
type = TargetBind
trigger1 = numtarget(3000) > 0
trigger1 = target(3000),name != "choi" && target(3000),name != "dark chun-li r"
trigger1 = target(3000),name != "bao" && target(3000),name != "spider-man"
trigger1 = target(3000),name != "Kurenai by Inverse v1.0" && target(3000),name != "kurenai"
trigger1 = target(3000),name != "ryuzito de souza" && target(3000),name != "pocket ryu"
trigger1 = target(3000),name != "Asahi_Sakurai By Toshi"
trigger1 = animelem = 5 
pos = -14-ifelse(var(4)=1,(target(3000),const(size.head.pos.x)),0),0+ifelse(var(4)=1,-71-(target(3000),const(size.head.pos.y)),0)
id = 3000
[State 901, 6]
type = TargetBind
trigger1 = numtarget(3000) > 0
trigger1 = target(3000),name != "choi" && target(3000),name != "dark chun-li r"
trigger1 = target(3000),name != "bao" && target(3000),name != "spider-man"
trigger1 = target(3000),name != "Kurenai by Inverse v1.0" && target(3000),name != "kurenai"
trigger1 = target(3000),name != "ryuzito de souza" && target(3000),name != "pocket ryu"
trigger1 = target(3000),name != "Asahi_Sakurai By Toshi"
trigger1 = animelem = 6 
pos = -12-ifelse(var(4)=1,(target(3000),const(size.head.pos.x)),0),0+ifelse(var(4)=1,-71-(target(3000),const(size.head.pos.y)),0)
id = 3000
[State 901, 7]
type = TargetBind
trigger1 = numtarget(3000) > 0
trigger1 = target(3000),name != "choi" && target(3000),name != "dark chun-li r"
trigger1 = target(3000),name != "bao" && target(3000),name != "spider-man"
trigger1 = target(3000),name != "Kurenai by Inverse v1.0" && target(3000),name != "kurenai"
trigger1 = target(3000),name != "ryuzito de souza" && target(3000),name != "pocket ryu"
trigger1 = target(3000),name != "Asahi_Sakurai By Toshi"
trigger1 = animelem = 7 
pos = -12-ifelse(var(4)=1,(target(3000),const(size.head.pos.x)),0),0+ifelse(var(4)=1,-70-(target(3000),const(size.head.pos.y)),0)
id = 3000
[State 901, 8]
type = TargetBind
trigger1 = numtarget(3000) > 0
trigger1 = target(3000),name != "choi" && target(3000),name != "dark chun-li r"
trigger1 = target(3000),name != "bao" && target(3000),name != "spider-man"
trigger1 = target(3000),name != "Kurenai by Inverse v1.0" && target(3000),name != "kurenai"
trigger1 = target(3000),name != "ryuzito de souza" && target(3000),name != "pocket ryu"
trigger1 = target(3000),name != "Asahi_Sakurai By Toshi"
trigger1 = animelem = 8 
pos = -10-ifelse(var(4)=1,(target(3000),const(size.head.pos.x)),0),0+ifelse(var(4)=1,-70-(target(3000),const(size.head.pos.y)),0)
id = 3000
[State 901, 9]
type = TargetBind
trigger1 = numtarget(3000) > 0
trigger1 = target(3000),name != "choi" && target(3000),name != "dark chun-li r"
trigger1 = target(3000),name != "bao" && target(3000),name != "spider-man"
trigger1 = target(3000),name != "Kurenai by Inverse v1.0" && target(3000),name != "kurenai"
trigger1 = target(3000),name != "ryuzito de souza" && target(3000),name != "pocket ryu"
trigger1 = target(3000),name != "Asahi_Sakurai By Toshi"
trigger1 = animelem = 9 
pos = -4-ifelse(var(4)=1,(target(3000),const(size.head.pos.x)),0),0+ifelse(var(4)=1,-70-(target(3000),const(size.head.pos.y)),0)
id = 3000

[State 901, 9]
type = TargetBind
trigger1 = animelem = 10 
trigger1 = target(3000),name != "ryuzito de souza" && target(3000),name != "pocket ryu"
pos = 0,0+ifelse((target(3000),const(size.head.pos.y))>-50&&(target(3000),const(size.head.pos.y))<0,-50-(target(3000),const(size.head.pos.y)),0)
id = 3000

[State 901, 2]
type = TargetBind
triggerall = time = 0
triggerall = numtarget(3000) > 0
trigger1 = target(3000),name = "choi" || target(3000),name = "dark chun-li r"
trigger2 = target(3000),name = "bao"
trigger3 = target(3000),name = "Asahi_Sakurai By Toshi"
pos = -30,-20
id = 3000
[State 901, 3]
type = TargetBind
triggerall = time >= 1
triggerall = time <= 9
triggerall = numtarget(3000) > 0
trigger1 = target(3000),name = "choi" || target(3000),name = "dark chun-li r"
trigger2 = target(3000),name = "bao" || target(3000),name = "spider-man"
trigger3 = target(3000),name = "Asahi_Sakurai By Toshi"
pos = -30,-22
id = 3000
[State 901, 4]
type = TargetBind
triggerall = time >= 10
triggerall = time <= 12
triggerall = numtarget(3000) > 0
trigger1 = target(3000),name = "choi" || target(3000),name = "dark chun-li r"
trigger2 = target(3000),name = "bao"
trigger3 = target(3000),name = "Asahi_Sakurai By Toshi"
pos = -28,-24
id = 3000
[State 901, 4]
type = TargetBind
triggerall = time >= 13
triggerall = time <= 15
triggerall = numtarget(3000) > 0
trigger1 = target(3000),name = "choi" || target(3000),name = "dark chun-li r"
trigger2 = target(3000),name = "bao"
trigger3 = target(3000),name = "Asahi_Sakurai By Toshi"
pos = -23,-25
id = 3000
[State 901, 4]
type = TargetBind
triggerall = time >= 16
triggerall = time <= 19
triggerall = numtarget(3000) > 0
trigger1 = target(3000),name = "choi" || target(3000),name = "dark chun-li r"
trigger2 = target(3000),name = "bao"
trigger3 = target(3000),name = "Asahi_Sakurai By Toshi"
pos = -19,-24
id = 3000
[State 901, 5]
type = TargetBind
triggerall = animelem = 5 
triggerall = numtarget(3000) > 0
trigger1 = target(3000),name = "choi" || target(3000),name = "dark chun-li r"
trigger2 = target(3000),name = "bao"
trigger3 = target(3000),name = "Asahi_Sakurai By Toshi"
pos = -14,-23
id = 3000
[State 901, 6]
type = TargetBind
triggerall = animelem = 6 
triggerall = numtarget(3000) > 0
trigger1 = target(3000),name = "choi" || target(3000),name = "dark chun-li r"
trigger2 = target(3000),name = "bao"
trigger3 = target(3000),name = "Asahi_Sakurai By Toshi"
pos = -12,-23
id = 3000
[State 901, 7]
type = TargetBind
triggerall = animelem = 7 
triggerall = numtarget(3000) > 0
trigger1 = target(3000),name = "choi" || target(3000),name = "dark chun-li r"
trigger2 = target(3000),name = "bao"
trigger3 = target(3000),name = "Asahi_Sakurai By Toshi"
pos = -12,-22
id = 3000
[State 901, 8]
type = TargetBind
triggerall = animelem = 8 
triggerall = numtarget(3000) > 0
trigger1 = target(3000),name = "choi" || target(3000),name = "dark chun-li r"
trigger2 = target(3000),name = "bao"
trigger3 = target(3000),name = "Asahi_Sakurai By Toshi"
pos = -10,-22
id = 3000
[State 901, 9]
type = TargetBind
triggerall = animelem = 9 
triggerall = numtarget(3000) > 0
trigger1 = target(3000),name = "choi" || target(3000),name = "dark chun-li r"
trigger2 = target(3000),name = "bao"
trigger3 = target(3000),name = "Asahi_Sakurai By Toshi"
pos = -4,-22
id = 3000

[State 901, 2]
type = TargetBind
trigger1 = time = 0
trigger1 = numtarget(3000) > 0
trigger1 = target(3000),name = "Kurenai by Inverse v1.0" || target(3000),name = "kurenai"
pos = -20,-10
id = 3000
[State 901, 3]
type = TargetBind
trigger1 = time >= 1
trigger1 = time <= 9
trigger1 = numtarget(3000) > 0
trigger1 = target(3000),name = "Kurenai by Inverse v1.0" || target(3000),name = "kurenai"
pos = -20,-12
id = 3000
[State 901, 4]
type = TargetBind
trigger1 = time >= 10
trigger1 = time <= 12
trigger1 = numtarget(3000) > 0
trigger1 = target(3000),name = "Kurenai by Inverse v1.0" || target(3000),name = "kurenai"
pos = -18,-14
id = 3000
[State 901, 4]
type = TargetBind
trigger1 = time >= 13
trigger1 = time <= 15
trigger1 = numtarget(3000) > 0
trigger1 = target(3000),name = "Kurenai by Inverse v1.0" || target(3000),name = "kurenai"
pos = -13,-15
id = 3000
[State 901, 4]
type = TargetBind
trigger1 = time >= 16
trigger1 = time <= 19
trigger1 = numtarget(3000) > 0
trigger1 = target(3000),name = "Kurenai by Inverse v1.0" || target(3000),name = "kurenai"
pos = -9,-14
id = 3000
[State 901, 5]
type = TargetBind
trigger1 = animelem = 5 
trigger1 = numtarget(3000) > 0
trigger1 = target(3000),name = "Kurenai by Inverse v1.0" || target(3000),name = "kurenai"
pos = -4,-13
id = 3000
[State 901, 6]
type = TargetBind
trigger1 = animelem = 6 
trigger1 = numtarget(3000) > 0
trigger1 = target(3000),name = "Kurenai by Inverse v1.0" || target(3000),name = "kurenai"
pos = -2,-13
id = 3000
[State 901, 7]
type = TargetBind
trigger1 = animelem = 7 
trigger1 = numtarget(3000) > 0
trigger1 = target(3000),name = "Kurenai by Inverse v1.0" || target(3000),name = "kurenai"
pos = -2,-12
id = 3000
[State 901, 8]
type = TargetBind
trigger1 = animelem = 8 
trigger1 = numtarget(3000) > 0
trigger1 = target(3000),name = "Kurenai by Inverse v1.0" || target(3000),name = "kurenai"
pos = -3,-12
id = 3000
[State 901, 9]
type = TargetBind
trigger1 = animelem = 9 
trigger1 = numtarget(3000) > 0
trigger1 = target(3000),name = "Kurenai by Inverse v1.0" || target(3000),name = "kurenai"
pos = 6,-12
id = 3000

[State 901, 2]
type = TargetBind
trigger1 = time = 0
trigger1 = numtarget(3000) > 0
trigger1 = target(3000),name = "spider-man"
pos = -20,-30
id = 3000
[State 901, 4]
type = TargetBind
trigger1 = time >= 10
trigger1 = time <= 12
trigger1 = numtarget(3000) > 0
trigger1 = target(3000),name = "spider-man"
pos = -18,-34
id = 3000
[State 901, 4]
type = TargetBind
trigger1 = time >= 13
trigger1 = time <= 15
trigger1 = numtarget(3000) > 0
trigger1 = target(3000),name = "spider-man"
pos = -13,-35
id = 3000
[State 901, 4]
type = TargetBind
trigger1 = time >= 16
trigger1 = time <= 19
trigger1 = numtarget(3000) > 0
trigger1 = target(3000),name = "spider-man"
pos = -9,-34
id = 3000
[State 901, 5]
type = TargetBind
trigger1 = animelem = 5 
trigger1 = numtarget(3000) > 0
trigger1 = target(3000),name = "spider-man"
pos = -4,-33
id = 3000
[State 901, 6]
type = TargetBind
trigger1 = animelem = 6 
trigger1 = numtarget(3000) > 0
trigger1 = target(3000),name = "spider-man"
pos = -2,-33
id = 3000
[State 901, 7]
type = TargetBind
trigger1 = animelem = 7 
trigger1 = numtarget(3000) > 0
trigger1 = target(3000),name = "spider-man"
pos = -2,-32
id = 3000
[State 901, 8]
type = TargetBind
trigger1 = animelem = 8 
trigger1 = numtarget(3000) > 0
trigger1 = target(3000),name = "spider-man"
pos = -3,-32
id = 3000
[State 901, 9]
type = TargetBind
trigger1 = animelem = 9 
trigger1 = numtarget(3000) > 0
trigger1 = target(3000),name = "spider-man"
pos = 6,-32
id = 3000

[State 901, 2]
type = TargetBind
triggerall = time = 0
triggerall = numtarget(3000) > 0
trigger1 = target(3000),name = "ryuzito de souza" || target(3000),name = "pocket ryu"
pos = -30,-45
id = 3000
[State 901, 3]
type = TargetBind
triggerall = time >= 1
triggerall = time <= 9
triggerall = numtarget(3000) > 0
trigger1 = target(3000),name = "ryuzito de souza" || target(3000),name = "pocket ryu"
pos = -30,-47
id = 3000
[State 901, 4]
type = TargetBind
triggerall = time >= 10
triggerall = time <= 12
triggerall = numtarget(3000) > 0
trigger1 = target(3000),name = "ryuzito de souza" || target(3000),name = "pocket ryu"
pos = -28,-49
id = 3000
[State 901, 4]
type = TargetBind
triggerall = time >= 13
triggerall = time <= 15
triggerall = numtarget(3000) > 0
trigger1 = target(3000),name = "ryuzito de souza" || target(3000),name = "pocket ryu"
pos = -23,-50
id = 3000
[State 901, 4]
type = TargetBind
triggerall = time >= 16
triggerall = time <= 19
triggerall = numtarget(3000) > 0
trigger1 = target(3000),name = "ryuzito de souza" || target(3000),name = "pocket ryu"
pos = -19,-49
id = 3000
[State 901, 5]
type = TargetBind
triggerall = animelem = 5 
triggerall = numtarget(3000) > 0
trigger1 = target(3000),name = "ryuzito de souza" || target(3000),name = "pocket ryu"
pos = -14,-48
id = 3000
[State 901, 6]
type = TargetBind
triggerall = animelem = 6 
triggerall = numtarget(3000) > 0
trigger1 = target(3000),name = "ryuzito de souza" || target(3000),name = "pocket ryu"
pos = -12,-48
id = 3000
[State 901, 7]
type = TargetBind
triggerall = animelem = 7 
triggerall = numtarget(3000) > 0
trigger1 = target(3000),name = "ryuzito de souza" || target(3000),name = "pocket ryu"
pos = -12,-47
id = 3000
[State 901, 8]
type = TargetBind
triggerall = animelem = 8 
triggerall = numtarget(3000) > 0
trigger1 = target(3000),name = "ryuzito de souza" || target(3000),name = "pocket ryu"
pos = -13,-43
id = 3000
[State 901, 9]
type = TargetBind
triggerall = animelem = 9 
triggerall = numtarget(3000) > 0
trigger1 = target(3000),name = "ryuzito de souza" || target(3000),name = "pocket ryu"
pos = -5,-43
id = 3000
[State 901, 9]
type = TargetBind
triggerall = animelem = 10
trigger1 = target(3000),name = "ryuzito de souza" || target(3000),name = "pocket ryu"
pos = 0,-40
id = 3000

[State 123, 2]
type = ChangeState
value = 200
trigger1 = animtime = 0
trigger1 = var(6) = 1
trigger1 = p2bodydist X > 18 || p2bodydist X < -50
[State 123, 2]
type = ChangeState
value = 212
trigger1 = animtime = 0
trigger1 = var(6) = 1
trigger1 = p2bodydist X <= 18 && p2bodydist X >= -50
[State 123, 2]
type = ChangeState
value = 220
trigger1 = animtime = 0
trigger1 = var(6) = 2
trigger1 = P2bodydist X > 25 || p2bodydist X < -57
[State 123, 2]
type = ChangeState
value = 225
trigger1 = animtime = 0
trigger1 = var(6) = 2
trigger1 = P2bodydist X <= 25 && p2bodydist X >= -57
[State 123, 2]
type = ChangeState
value = 202
trigger1 = animtime = 0
trigger1 = var(6) = 3
trigger1 = p2bodydist X <= 18 && p2bodydist X >= -50
[State 123, 2]
type = ChangeState
value = 230
trigger1 = animtime = 0
trigger1 = var(6) = 3
[State 123, 2]
type = ChangeState
value = 240
trigger1 = animtime = 0
trigger1 = var(6) = 4
trigger1 = P2bodydist X > 25 || p2bodydist X < -57
[State 123, 2]
type = ChangeState
value = 245
trigger1 = animtime = 0
trigger1 = var(6) = 4
trigger1 = P2bodydist X <= 25 && p2bodydist X >= -57
[State 123, 2]
type = ChangeState
value = 235
trigger1 = animtime = 0
trigger1 = var(6) = 5
[State 123, 2]
type = ChangeState
value = 215
trigger1 = animtime = 0
trigger1 = var(6) = 6
[State 123, 2]
type = ChangeState
value = 11000
trigger1 = animtime = 0
trigger1 = var(6) = 7
[State 123, 2]
type = ChangeState
value = 218
trigger1 = animtime = 0
trigger1 = var(6) = 8

[State 1051, 3]
type = Changestate
Trigger1 = AnimTime = 0
trigger1 = var(55) = 1
trigger1 = p2statetype != L
trigger1 = p2bodydist X <= 25 && p2bodydist X >= -57
value = 245

[State 1051, 4]
type = Changestate
Trigger1 = AnimTime = 0
trigger1 = var(55) = 1
trigger1 = p2bodydist X > 25 || p2bodydist X < -57
trigger1 = random <= 500
value = 240

[State 1051, 5]
type = Changestate
Trigger1 = AnimTime = 0
trigger1 = var(55) = 1
trigger1 = p2bodydist X > 25
value = 22

[State 1051, 6]
type = Changestate
trigger1 = var(55) = 0
Trigger1 = AnimTime = 0
value = 0
ctrl = 1
;----------------------------------
; Catch Miss
[Statedef 3001]
type    = S
movetype= A
physics = S
ctrl = 0
anim = 3001

[State 522, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = s14,0
channel = 1

[State 265, 7]
type = ChangeState
triggerall = var(55) = 1
triggerall = animtime = 0
triggerall = p2dist X > -50
triggerall = p2bodydist Y >= -40
trigger1 = p2bodydist X <= 50
trigger1 = p2movetype = A
trigger1 = random <= 150
value = 1030

[State 265, 7]
type = ChangeState
triggerall = var(58) > 1 || var(58) < 1
triggerall = var(55) = 1
triggerall = animtime = 0
triggerall = p2dist X > -50
triggerall = p2bodydist Y >= -40
trigger1 = p2bodydist X <= 50
trigger1 = p2movetype = A
trigger1 = random <= 150
value = 1040

[State 265, 7]
type = ChangeState
triggerall = var(58) > 2 || var(58) < 1
triggerall = var(16) < 1
triggerall = var(14) < 1 && var(3) < 1
triggerall = var(55) = 1
triggerall = animtime = 0
triggerall = p2dist X > -50
triggerall = p2bodydist Y >= -40
triggerall = p2bodydist X <= 50
triggerall = random <= 150
trigger1 = p2movetype = A
trigger1 = power >= 500 + var(20)*100
value = 1050

[State 1051, 5]
type = Changestate
Trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Catch by catch
[Statedef 3005]
type    = S
physics = N  
movetype= H
ctrl = 0
velset = 0,0

[State 7102, 1]
type = posset
trigger1 = time = 1
trigger1 = p2stateno != 3002
y = 0 

[State 7102, 1]
type = SelfState
trigger1 = time = 1
trigger1 = p2stateno != 3002
value = 0 
ctrl = 1

[State 910, 1]
type = Changeanim2
trigger1 = time = 0
value = 3005

[State 910, 1]
type = turn
trigger1 = time = 44

[State 910, 2]
type = Velset
trigger1 = time = 44
x = -14.1

[State 910, 2]
type = posset
trigger1 = time = 44
y = 0

[State 910, 3]
type = Velmul
trigger1 = time >= 44
x = .86

[State 901, 4]
type = sprpriority
trigger1 = time > 31
value = 2

[State 901, 5]
type = sprpriority
trigger1 = time <= 31
value = 1

[State 910, 7]
type = Selfstate
trigger1 = animtime = 0
value = 0
ctrl = 1
;--------------------------------------
; kuzkaze
[Statedef 3200]
type    = S
movetype= A
physics = S
ctrl = 0
poweradd = 137
anim = 3000
facep2 = 1
Velset = 0,0
sprpriority = 0

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1
trigger1 = Time > 9 && time != 11
value = ,AA,AP

[State 5040, 1]
type = nothitby
trigger1 = time = 11
value = SCA

[State 230, 0]
type = varset
trigger1 = animelem = 4,1
var(38) = 0

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 1

[State 1000, 1]
type = varset
trigger1 = time = 11
var(34) = 0

[state 3200, 1]
type = NotHitBy
trigger1 = Time < 10
value = SCA

[State 1050, 2]
type = posadd
trigger1 = animelem = 3
x = 14

[State 1050, 2]
type = posadd
trigger1 = animelem = 4
x = 4

[State 1050, 2]
type = HitDef
trigger1 = p2stateno != 140
trigger1 = enemynear,stateno != 130 || (enemynear,stateno = 130 && enemynear,prevstateno != 150 && enemynear,prevstateno != 152)
Trigger1 = AnimElem = 4
attr = S, ST
hitflag = M-
Guardflag =-A
priority = 4, Miss
id = 3000
snap = 40,0
hitonce = 1
sparkno = -1
p2facing = 1
p1stateno = 3002
p2stateno = 3005
p2getp1state = 1

[State 1050, 3]
type = ChangeState
Trigger1 = AnimTime = 0
Trigger1 = Stateno != 3002
value = 3001

[Statedef 3201]  ;(guarded)
type    = S
movetype= A
physics = S
ctrl = 0
poweradd = 137
anim = 3004
Velset = 0,0
sprpriority = 0

[State 230, 0]
type = varset
trigger1 = animelem = 1
var(38) = 1

[State 230, 1]
type = nothitby
trigger1 = var(16) > 0 && var(38) = 1
trigger1 = Time > 9 && time != 11
value = ,AA,AP

[State 5040, 1]
type = nothitby
trigger1 = time = 11
value = SCA

[State 230, 0]
type = varset
trigger1 = animelem = 4,1
var(38) = 0

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 1

[State 1000, 1]
type = varset
trigger1 = time = 11
var(34) = 0

[state 3200, 1]
type = NotHitBy
trigger1 = Time < 10
value = SCA

[State 1050, 2]
type = posadd
trigger1 = animelem = 3
x = 14

[State 1050, 2]
type = posadd
trigger1 = animelem = 4
x = 4

[State 1050, 2]
type = HitDef
trigger1 = p2stateno != 140
trigger1 = enemynear,stateno != 130 || (enemynear,stateno = 130 && enemynear,prevstateno != 150 && enemynear,prevstateno != 152)
Trigger1 = AnimElem = 4
attr = S, ST
hitflag = M-
Guardflag =-A
priority = 4, Miss
id = 3000
snap = 40,0
hitonce = 1
sparkno = -1
p2facing = 1
p1stateno = 3002
p2stateno = 3005
p2getp1state = 1

[State 1050, 3]
type = ChangeState
Trigger1 = AnimTime = 0
trigger1 = stateno != 3002
value = 3001

; Roll fwd
[Statedef 1300]
type = S
physics = N
ctrl = 0
velset = 0,0
anim = 1300

[State 236, 1]
type = turn
trigger1 = time = 0 && p2dist X < 0 && var(55) = 1

[State 236, 1]
type = Varset
trigger1 = time = 0
var(18) = 0

[State 325, 8]
type = Varset
triggerall = var(55) = 0
triggerall = time >= 1
trigger1 = command = "x"
trigger2 = command = "y"
trigger3 = command = "a"
trigger4 = command = "c"
var(18) = 1

[State 260, 1]
type = HitBy
trigger1 = Time >= 0
trigger1 = time <= 24
value = SCA , AT

[State 260, 4]
type = SprPriority
trigger1 = Time = 0
value = -2

[State 260, 5]
type = PlayerPush
trigger1 = 1
value = 0

[State 250, 4] 
type = Afterimage
trigger1 = Time = 1
time = 2
length = 7
PalBright   =   0,  0,  0
PalContrast = 255,255,255
PalAdd      =   0,  0,  0
PalMul      =  1,1,1
FrameGap = 2

[State 3000, 2]
type = AfterImagetime
trigger1 = time%2 = 0 && time < 8
time = 2

[State 260, 6]
type = PosAdd
trigger1 = AnimElem = 6
x = 5

[State 260, 6]
type = PosAdd
trigger1 = AnimElem = 3
trigger2 = AnimElem = 5
x = 10

[State 260, 7]
type = VelSet
trigger1 = AnimElem = 3, 1
x = 4.24

[State 260, 7]
type = PlaySnd
trigger1 = AnimElem = 1
value = s18,0
channel = 1

[State 260, 7]
type = VelSet
trigger1 = AnimElem = 7
x = 0

[State 260, 7]
type = ChangeState
trigger1 = var(55) = 1
trigger1 = AnimTime = 0
trigger1 = p2statetype != L
trigger1 = p2movetype = A
trigger1 = p2bodydist X < 0
trigger1 = p2bodydist X >= -57
trigger1 = random <= 900
value = 245

[State 260, 7]
type = ChangeState
triggerall = var(55) = 1
triggerall = AnimTime = 0
trigger1 = p2movetype = A
trigger1 = p2bodydist X < -57
trigger1 = p2bodydist X >= -82
trigger1 = random <= 900
value = 240

[State 265, 7]
type = ChangeState
triggerall = var(55) = 1
triggerall = p2statetype != L   
triggerall = Time >= 7 
triggerall = time <= 20
triggerall = p2movetype != A
triggerall = p2bodydist Y >= -10
triggerall = p2bodydist X > 1
triggerall = p2bodydist X <= 54
trigger1 = random <= 110
value = 251

[State 265, 7]
type = ChangeState
triggerall = var(55) = 1
triggerall = p2statetype != L   
triggerall = p2movetype != A
triggerall = p2bodydist Y >= -10
triggerall = p2bodydist X > 0
triggerall = p2bodydist X <= 45
trigger1 = time <= 20
trigger1 = time >= 7
trigger1 = random <= 100
value = 251

[State 260, 8]
type = ChangeState
trigger1 = time <= 20
trigger1 = time >= 7
trigger1 = var(18) = 1
value = 251

[State 260, 8]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

; Roll fwd  (during guard)
[Statedef 1304]
type = S
physics = N
ctrl = 0
velset = 0,0
anim = 1304

[State 260, 1]
type = notHitBy
trigger1 = 1
value = SCA, AT

[State 260, 3] 
type = Afterimage
trigger1 = Time = 0 && prevstateno != 1306
time = 2
length = 8
FrameGap = 3
paladd = 80,60,160;100,80,190

[State 3000, 2]
type = AfterImagetime
trigger1 = time%2 = 0 && time < 16 && prevstateno != 1306
time = 2

[State 260, 4]
type = SprPriority
trigger1 = Time = 0
value = -2

[State 260, 5]
type = PlayerPush
trigger1 = 1
value = 0

[State 260, 6]
type = PosAdd
trigger1 = AnimElem = 6
x = 5

[State 260, 6]
type = PosAdd
trigger1 = AnimElem = 3
trigger2 = AnimElem = 5
x = 10

[State 260, 7]
type = VelSet
trigger1 = AnimElem = 3,1 && prevstateno != 1306
x = 4.5
[State 260, 7]
type = VelSet
trigger1 = AnimElem = 3,1 && prevstateno = 1306
x = 4.1

[State 260, 7]
type = PlaySnd
trigger1 = AnimElem = 1
value = s18,0
channel = 1

[State 260, 7]
type = VelSet
trigger1 = AnimElem = 7
x = 0

[State 245, 2]
type = ChangeState
trigger1 = var(58) > 1 || var(58) < 1
trigger1 = p2name != "BigWomen"
trigger1 = p2name != "CADILLACS"
trigger1 = p2name != "Madgear"
trigger1 = p2name != "DARK WARRIOR2"
trigger1 = p2name != "Onslaught"
trigger1 = p2name != "Apocalypse"
trigger1 = var(55) = 1
trigger1 = AnimTime = 0
trigger1 = p2movetype != H
trigger1 = p2stateno != 140
trigger1 = enemynear,stateno != 130 || (enemynear,stateno = 130 && enemynear,prevstateno != 150 && enemynear,prevstateno != 152)
trigger1 = p2statetype != L
trigger1 = p2statetype != A
trigger1 = p2bodydist Y >= -5 && p2bodydist X > -36
trigger1 = p2bodydist X <= 5
trigger1 = random <= 500
value = 3000

[State 260, 7]
type = ChangeState
trigger1 = var(55) = 1
trigger1 = AnimTime = 0
trigger1 = p2statetype != L
trigger1 = p2movetype = A
trigger1 = p2bodydist X < -1
trigger1 = p2bodydist X >= -57
trigger1 = random <= 800
value = 245

[State 260, 7]
type = ChangeState
triggerall = var(55) = 1
triggerall = AnimTime = 0
trigger1 = p2movetype = A
trigger1 = p2bodydist X < -57
trigger1 = p2bodydist X >= -82
trigger1 = random <= 800
value = 240

[State 265, 7]
type = ChangeState
trigger1 = var(55) = 1
trigger1 = animtime = 0
trigger1 = p2bodydist X > -20
trigger1 = p2bodydist Y >= -40
trigger1 = p2bodydist X <= 50
trigger1 = p2movetype = A
trigger1 = random <= 150
value = 1030

[State 265, 7]
type = ChangeState
trigger1 = var(58) > 1 || var(58) < 1
trigger1 = var(55) = 1
trigger1 = animtime = 0
trigger1 = p2bodydist X > -20
trigger1 = p2bodydist Y >= -40
trigger1 = p2bodydist X <= 50
trigger1 = p2movetype = A
trigger1 = random <= 150
value = 1040

[State 265, 7]
type = ChangeState
trigger1 = var(58) > 2 || var(58) < 1
trigger1 = var(16) < 1 && var(3) < 1
trigger1 = var(14) < 1
trigger1 = var(55) = 1
trigger1 = animtime = 0
trigger1 = p2bodydist X > -20
trigger1 = p2bodydist Y >= -40
trigger1 = p2bodydist X <= 50
trigger1 = p2movetype = A
trigger1 = random <= 150
trigger1 = power >= 500 + var(20)*100
value = 1050

[State 260, 7]
type = ChangeState
triggerall = var(55) = 1
triggerall = AnimTime = 0
trigger1 = p2movetype = A
trigger1 = random <= 500
value = 130

[State 260, 7]
type = ChangeState
triggerall = var(55) = 1
triggerall = AnimTime = 0
trigger1 = p2movetype = A
value = 131

[State 260, 8]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

; Roll fwd (during guard start)
[Statedef 1302]
type = S
physics = S
ctrl = 0
velset = 0,0

[State 260, 5]
type = PlayerPush
trigger1 = 1
value = 0

[State 261, 0]
type = varadd
trigger1 = time = 0
var(20) = 10
[State 261, 0]
type = varadd
trigger1 = time = 0 && var(3) > 0
var(2) = -1000

[State 261, 0]
type = varadd
trigger1 = time = 0     
var(28) = -4

[State 261, 0]
type = pause
trigger1 = time = 0
time = 5

[State 261, 0]
type = pause
trigger1 = time = 1
time = 2
movetime = 2

[State 261, 1]
type = Explod
trigger1 = Time = 0
anim = 930
pos = -23,-70
postype = p1
sprpriority = 2
pausemovetime = 9999
supermove = 1
ontop = 1

[State 261, 2]
type = notHitBy
trigger1 = 1     
value = SCA, AT

[State 261, 3] 
type = EnvColor
Trigger1 = Time = 0
value = 230,230,230
under = 1
time = 2

[State 261, 4] 
type = ChangeState
trigger1 = Time = 2
value = 1304
;-------------------------------------
; Roll back (during guard start)
[Statedef 1303]
type = S
physics = S
ctrl = 0
velset = 0,0

[State 260, 5]
type = PlayerPush
trigger1 = 1
value = 0

[State 261, 0]
type = varadd
trigger1 = time = 0
var(20) = 5
[State 261, 0]
type = varadd
trigger1 = time = 0 && var(3) > 0
var(2) = -500

[State 261, 0]
type = varadd
trigger1 = time = 0     
var(28) = -4

[State 261, 0]
type = pause
trigger1 = time = 0
time = 5

[State 261, 0]
type = pause
trigger1 = time = 1     
time = 2
movetime = 2

[State 261, 1]
type = Explod
trigger1 = Time = 0
anim = 930
pos = -23,-70
postype = p1
sprpriority = 2
pausemovetime = 9999
supermove = 1
ontop = 1

[State 266, 2]
type = notHitBy
trigger1 = 1     
value = SCA, AT

[State 266, 3] 
type = EnvColor
Trigger1 = Time = 0
value = 230,230,230
under = 1
time = 2

[State 266, 4] 
type = ChangeState
trigger1 = Time = 2
value = 1299
;-----------------------------------------
; Knockdown (during guard)
[Statedef 1320]
type = S
physics = S
ctrl = 0
velset = 0,0

[State 261, 0]
type = varadd
trigger1 = time = 0
var(20) = 10
[State 261, 0]
type = varadd
trigger1 = time = 0 && var(3) > 0
var(2) = -1000

[State 261, 0]
type = varadd
trigger1 = time = 0     
var(28) = -4

[State 261, 0]
type = pause
trigger1 = time = 0
time = 5

[State 261, 0]
type = pause
trigger1 = time = 1     
time = 2
movetime = 2

[State 261, 1]
type = Explod
trigger1 = Time = 0
anim = 930
pos = 10,-70
postype = p1
sprpriority = 2
pausemovetime = 9999
supermove = 1
ontop = 1

[State 266, 2]
type = notHitBy
trigger1 = 1   
value = SCA, AT

[State 266, 3] 
type = EnvColor
Trigger1 = Time = 0
value = 230,230,230
under = 1
time = 2

[State 266, 4] 
type = ChangeState
trigger1 = Time = 2
value = 11001

; Roll fwd (during attack start)
[Statedef 1306]
type = S
physics = S
ctrl = 0
velset = 0,0

[State 260, 5]
type = PlayerPush
trigger1 = 1
value = 0

[State 261, 0]
type = varadd
trigger1 = time = 0
var(20) = 5
[State 261, 0]
type = varadd
trigger1 = time = 0 && var(3) > 0
var(2) = -500

[State 261, 0]
type = varadd
trigger1 = time = 0     
var(28) = -4

[State 261, 0]
type = pause
trigger1 = time = 0
time = 7
movetime = 7

[State 261, 1]
type = Explod
trigger1 = Time = 0
anim = 930
pos = -23,-70
postype = p1
sprpriority = 2
pausemovetime = 9999
supermove = 1
ontop = 1

[State 261, 2]
type = notHitBy
trigger1 = 1     
value = SCA, AT

[State 261, 3] 
type = EnvColor
Trigger1 = Time = 0
value = 230,230,230
under = 1
time = 2

[State 261, 4] 
type = ChangeState
trigger1 = Time = 0
value = 1304
;--------------------------------------
; Roll back
[Statedef 1301]
type = S
physics = N
ctrl = 0
velset = 0,0
anim = 1301

[State 236, 1]
type = turn
trigger1 = time = 0 && p2dist X < 0 && var(55) = 1

[State 260, 7]
type = PlaySnd
trigger1 = AnimElem = 1
value = s18,0
channel = 1

[State 265, 1]
type = HitBy
trigger1 = Time >= 0      
trigger1 = time <= 24    
value = SCA , AT

[State 250, 4] 
type = Afterimage
trigger1 = Time = 5
time = 2
length = 7
PalBright   =   0,  0,  0
PalContrast = 255,255,255
PalAdd      =   0,  0,  0
PalMul      =  1,1,1
FrameGap = 2

[State 3000, 2]
type = AfterImagetime
trigger1 = time%2 = 0 && time < 12
time = 2

[State 265, 4]
type = SprPriority
trigger1 = Time = 0
value = -2

[State 265, 5]
type = PlayerPush
trigger1 = 1
value = 0

[State 265, 6]
type = PosAdd
trigger1 = AnimElem = 1
x = 5

[State 265, 6]
type = PosAdd
trigger1 = AnimElem = 5
x = -33

[State 265, 6]
type = PosAdd
trigger1 = AnimElem = 2
x = -2

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

[State 265, 6]
type = PosAdd
trigger1 = AnimElem = 7
x = 10

[State 265, 7]
type = VelSet
trigger1 = AnimElem = 5, 1
x = -5.8

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

[State 265, 8]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;-------------------------------------
; Roll back (during guard)
[Statedef 1299]
type = S
physics = N
ctrl = 0
velset = 0,0
anim = 1299

[State 260, 7]
type = PlaySnd
trigger1 = AnimElem = 1
value = s18,0
channel = 1

[State 265, 1]
type = notHitBy
trigger1 = 1
value = SCA, AT

[State 265, 3] 
type = Afterimage
trigger1 = Time = 5
time = 2
length = 7
FrameGap = 3
paladd = 80,60,160

[State 3000, 2]
type = AfterImagetime
trigger1 = time%2 = 0 && time < 22
time = 2

[State 265, 4]
type = SprPriority
trigger1 = Time = 0
value = -2

[State 265, 5]
type = PlayerPush
trigger1 = 1
value = 0

[State 265, 6]
type = PosAdd
trigger1 = AnimElem = 1
x = 5

[State 265, 6]
type = PosAdd
trigger1 = AnimElem = 5
x = -33

[State 265, 6]
type = PosAdd
trigger1 = AnimElem = 2
x = -2

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

[State 265, 6]
type = PosAdd
trigger1 = AnimElem = 7
x = 10

[State 265, 7]
type = VelSet
trigger1 = AnimElem = 5, 1
x = -7.3

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

[State 265, 8]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;--------------------------------------
; Dodge
[Statedef 1305]
type = S
physics = N
ctrl = 0
velset = 0,0
anim = 1305
sprpriority = -2
facep2 = 1

[State 260, 7]
type = varset
trigger1 = time = 0
var(18) = 0

[State 260, 7]
type = varrandom
trigger1 = time = 1 && var(55) = 1
v = 5
range = 1

[State 260, 7]
type = varset
triggerall = var(55) = 0
triggerall = Time > 0
trigger1 = command = "x"
trigger2 = command = "y"
trigger3 = command = "a"
trigger4 = command = "c"
var(18) = 1

[State 260, 7]
type = ChangeState
value = 250
trigger1 = var(55) = 0
trigger1 = Time >= 12 
trigger1 = time <= 24
trigger1 = var(18) = 1

[State 260, 7]
type = PlaySnd
trigger1 = time = 0
value = s18,0
channel = 1

[State 265, 5]
type = PlayerPush
trigger1 = 1
value = 0

[State 265, 1]
type = HitBy
trigger1 = Time >= 0
value = SCA,AT

[State 265, 7]
type = ChangeState
trigger1 = var(58) > 1 || var(58) < 1
trigger1 = p2name != "BigWomen"
trigger1 = p2name != "CADILLACS"
trigger1 = p2name != "Madgear"
trigger1 = p2name != "DARK WARRIOR2"
trigger1 = p2name != "Onslaught"
trigger1 = p2name != "Apocalypse"
trigger1 = var(55) = 1
trigger1 = p2stateno != 150 && p2stateno != 151 && p2stateno != 152
trigger1 = p2stateno != 153 && p2stateno != 131 
trigger1 = p2stateno != 5120 && p2stateno != 132
trigger1 = p2statetype != A
trigger1 = p2statetype != L   
trigger1 = p2movetype != H
trigger1 = p2stateno != 140
trigger1 = enemynear,stateno != 130 || (enemynear,stateno = 130 && enemynear,prevstateno != 150 && enemynear,prevstateno != 152)
trigger1 = statetype != A
trigger1 = moveguarded = 0
trigger1 = statetype = S
trigger1 = time = 35
trigger1 = p2bodydist X >= -36
trigger1 = ctrl
trigger1 = p2bodydist X <= 5
trigger1 = p2bodydist Y >= -5
trigger1 = p2movetype = A
trigger1 = random <= 800
value = 3000

[State 265, 7]
type = ChangeState
triggerall = var(55) = 1
triggerall = p2statetype != L   
triggerall = Time >= 12 
triggerall = time <= 24
triggerall = p2movetype != A
triggerall = p2bodydist Y >= -10
triggerall = p2bodydist X > -10
triggerall = p2bodydist X <= 44
trigger1 = random <= 100
value = 250

[State 265, 7]
type = ChangeState
triggerall = var(55) = 1
triggerall = Time = 35
triggerall = p2bodydist Y >= -60
triggerall = p2statetype != L
trigger1 = p2movetype = A
trigger1 = p2bodydist X < -5
trigger1 = p2bodydist X >= -57
trigger1 = random <= 900
trigger2 = p2movetype != A
trigger2 = p2bodydist X >= 0
trigger2 = p2bodydist X <= 25
value = 245

[State 265, 7]
type = ChangeState
triggerall = var(55) = 1
triggerall = Time = 35
triggerall = p2bodydist Y >= -50
triggerall = random <= 900
trigger1 = p2movetype = A
trigger1 = p2dist X < 0
trigger1 = p2bodydist X > -82
trigger1 = p2bodydist X < -57
trigger2 = p2movetype != A
trigger2 = p2bodydist X > 25
trigger2 = p2bodydist X <= 50
value = 240

[State 265, 7]
type = ChangeState
value = 1030
triggerall = var(55) = 1
triggerall = time = 35
triggerall = p2statetype != L   
trigger1 = p2bodydist X <= 40
trigger1 = p2bodydist X >= 20
trigger1 = p2bodydist Y >= -100
trigger1 = p2movetype = A
trigger1 = random <= 180
trigger2 = p2bodydist X < 20 && p2bodydist X > -50
trigger2 = p2bodydist Y >= -10
trigger2 = p2movetype = A
trigger2 = random <= 180

[State 265, 7]
type = ChangeState
value = 1040
triggerall = var(58) > 1 || var(58) < 1
triggerall = var(55) = 1
triggerall = time = 35
triggerall = p2statetype != L   
triggerall = p2movetype = A
trigger1 = p2bodydist X <= 30 && p2bodydist X > -50
trigger1 = p2bodydist Y >= -10
trigger1 = random <= 200
trigger2 = p2bodydist X <= 60
trigger2 = p2bodydist X > 20
trigger2 = p2bodydist Y >= -100
trigger2 = random <= 200

[State 265, 7]
type = ChangeState
triggerall = var(58) > 2 || var(58) < 1
triggerall = power >= 500 + var(20)*100
triggerall = var(16) < 1
triggerall = time = 35
triggerall = var(55) = 1
triggerall = p2statetype != L   
triggerall = var(14) < 1 && var(3) < 1
triggerall = p2movetype = A
triggerall = p2bodydist X > -50
trigger1 = p2bodydist X <= 35
trigger1 = p2bodydist Y >= -10
trigger1 = power >= 2900 + var(20)*100
trigger1 = random <= 180
trigger2 = p2bodydist X <= 35
trigger2 = p2bodydist Y >= -10
trigger2 = power < 2900
trigger2 = random <= 120
trigger3 = p2bodydist X <= 60
trigger3 = p2bodydist X > 20
trigger3 = p2bodydist Y >= -100
trigger3 = power >= 2900 + var(20)*100
trigger3 = random <= 180
trigger4 = p2bodydist X <= 60
trigger4 = p2bodydist X > 20
trigger4 = p2bodydist Y >= -100
trigger4 = power < 2900
trigger4 = random <= 120
value = 1050

[state 265, 7]
type = ChangeState
value = 1300
triggerall = p2statetype != L   
triggerall = var(55) = 1
triggerall = time = 35
triggerall = p2movetype = A
triggerall = frontedgedist > 80
triggerall = p2bodydist Y >= -40
trigger1 = p2bodydist X <= 50 && p2bodydist X >= -50
trigger1 = random <= 150

[State 265, 7]
type = ChangeState
triggerall = var(16) < 1
triggerall = var(55) = 1
triggerall = time = 35
triggerall = p2bodydist X > 0 && p2bodydist X <= 250
triggerall = p2bodydist Y >= -40
trigger1 = p2bodydist X <= 80
trigger1 = p2movetype = A
trigger1 = random <= 350
trigger2 = p2movetype = A
trigger2 = random <= 500
value = 1305

[State 265, 8]
type = ChangeState
trigger1 = var(5) = 1
trigger1 = var(55) = 1
trigger1 = Time = 35
value = 130

[State 265, 8]
type = ChangeState
trigger1 = var(5) = 0
trigger1 = var(55) = 1
trigger1 = Time = 35
value = 131

[State 265, 9]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
; Guard cancel dash
[Statedef 1307]
type = S
physics = N
ctrl = 0
velset = 0,0
anim = 1307
sprpriority = -2

[State 261, 0]
type = varadd
trigger1 = time = 0 && var(12) = 1
var(20) = 2
[State 261, 0]
type = varadd
trigger1 = time = 0 && var(12) != 1
var(20) = 6
[State 261, 0]
type = poweradd
trigger1 = time < 6 && var(12) = 1
value = -2
[State 261, 0]
type = poweradd
trigger1 = time < 6 && var(12) != 1
value = -1
[State 261, 0]
type = varadd
trigger1 = time = 0 && var(3) > 0 && var(12) = 1
var(2) = -212
[State 261, 0]
type = varadd
trigger1 = time = 0 && var(3) > 0 && var(12) != 1
var(2) = -606

[State 260, 1]
type = notHitBy
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 260, 3] 
type = Afterimage
trigger1 = Time = 2
time = 2
length = 8
FrameGap = 3
paladd = 100,80,190

[state 105, 5]
type = PlaySnd
trigger1 = animelem = 4
value = s2,2

[State 3000, 2]
type = AfterImagetime
trigger1 = time%2 = 0 && time >= 2 && time < 12
time = 2

[State 260, 3] 
type = Afterimage
trigger1 = animelem = 5
time = 0

[State 5210, 1] 
type = PalFX
trigger1 = time%2 = 0 && time < 6
time = 1
add = 255,255,255

[State 260, 7]
type = VelSet
trigger1 = AnimElem = 3
x = 7.8

[State 260, 7]
type = VelSet
trigger1 = AnimElem = 5
x = 0

[State 123, 2]
type = varset
trigger1 = time = 0
var(6) = 0
[State 123, 2]
type = varset
trigger1 = animtime > -8
trigger1 = var(55) = 0
trigger1 = command = "a"
trigger1 = command != "holddown" && command != "holdup"
var(6) = 1
[State 123, 2]
type = varset
trigger1 = animtime > -8
trigger1 = var(55) = 0
trigger1 = command = "c" && command != "holdfwd"
trigger1 = command != "holddown" && command != "holdup"
var(6) = 2
[State 123, 2]
type = varset
trigger1 = animtime > -8
trigger1 = var(55) = 0
trigger1 = command = "x"
trigger1 = command != "holddown" && command != "holdup"
var(6) = 3
[State 123, 2]
type = varset
trigger1 = animtime > -8
trigger1 = var(55) = 0
trigger1 = command = "y"
trigger1 = command != "holddown" && command != "holdup"
var(6) = 4
[State 123, 2]
type = varset
trigger1 = animtime > -8
trigger1 = var(55) = 0
trigger1 = command = "x"
trigger1 = command = "holdfwd"
trigger1 = command != "holddown" && command != "holdup"
var(6) = 5
[State 123, 2]
type = varset
trigger1 = animtime > -8
trigger1 = var(55) = 0
trigger1 = command = "a"
trigger1 = command = "holdfwd"
trigger1 = command != "holddown" && command != "holdup"
var(6) = 6
[State 123, 2]
type = varset
trigger1 = var(55) = 0
trigger1 = animtime > -8
trigger1 = command = "ab" && command != "holdup"
var(6) = 7
[State 123, 2]
type = varset
trigger1 = animtime > -8
trigger1 = var(55) = 0
trigger1 = command = "c" && command = "holdfwd"
trigger1 = command != "holddown" && command != "holdup"
var(6) = 8

[State 123, 2]
type = ChangeState
value = 200
trigger1 = animtime = 0
trigger1 = var(6) = 1
trigger1 = p2bodydist X > 18 || p2bodydist X < -50
[State 123, 2]
type = ChangeState
value = 212
trigger1 = animtime = 0
trigger1 = var(6) = 1
trigger1 = p2bodydist X <= 18 && p2bodydist X >= -50
[State 123, 2]
type = ChangeState
value = 220
trigger1 = animtime = 0
trigger1 = var(6) = 2
trigger1 = P2bodydist X > 25 || p2bodydist X < -57
[State 123, 2]
type = ChangeState
value = 225
trigger1 = animtime = 0
trigger1 = var(6) = 2
trigger1 = P2bodydist X <= 25 && p2bodydist X >= -57
[State 123, 2]
type = ChangeState
value = 202
trigger1 = animtime = 0
trigger1 = var(6) = 3
trigger1 = p2bodydist X <= 18 && p2bodydist X >= -50
[State 123, 2]
type = ChangeState
value = 230
trigger1 = animtime = 0
trigger1 = var(6) = 3
[State 123, 2]
type = ChangeState
value = 240
trigger1 = animtime = 0
trigger1 = var(6) = 4
trigger1 = P2bodydist X > 25 || p2bodydist X < -57
[State 123, 2]
type = ChangeState
value = 245
trigger1 = animtime = 0
trigger1 = var(6) = 4
trigger1 = P2bodydist X <= 25 && p2bodydist X >= -57
[State 123, 2]
type = ChangeState
value = 235
trigger1 = animtime = 0
trigger1 = var(6) = 5
[State 123, 2]
type = ChangeState
value = 215
trigger1 = animtime = 0
trigger1 = var(6) = 6
[State 123, 2]
type = ChangeState
value = 11000
trigger1 = animtime = 0
trigger1 = var(6) = 7
[State 123, 2]
type = ChangeState
value = 218
trigger1 = animtime = 0
trigger1 = var(6) = 8

[State 245, 2]
type = ChangeState
trigger1 = var(58) > 1 || var(58) < 1
trigger1 = p2name != "BigWomen"
trigger1 = p2name != "CADILLACS"
trigger1 = p2name != "Madgear"
trigger1 = p2name != "DARK WARRIOR2"
trigger1 = p2name != "Onslaught"
trigger1 = p2name != "Apocalypse"
trigger1 = var(55) = 1
trigger1 = AnimTime = 0
trigger1 = p2statetype != L
trigger1 = p2movetype != H
trigger1 = p2stateno != 140
trigger1 = enemynear,stateno != 130 || (enemynear,stateno = 130 && enemynear,prevstateno != 150 && enemynear,prevstateno != 152)
trigger1 = p2statetype != A
trigger1 = p2bodydist Y >= -5 && p2bodydist X > -36
trigger1 = p2bodydist X <= 5
trigger1 = random <= 500
value = 3000

[State 260, 7]
type = ChangeState
trigger1 = var(55) = 1
trigger1 = AnimTime = 0
trigger1 = p2statetype != L
trigger1 = p2movetype = A
trigger1 = p2bodydist X < -1
trigger1 = p2bodydist X >= -57
trigger1 = random <= 800
value = 245

[State 260, 7]
type = ChangeState
triggerall = var(55) = 1
triggerall = AnimTime = 0
trigger1 = p2movetype = A
trigger1 = p2bodydist X < -57
trigger1 = p2bodydist X >= -82
trigger1 = random <= 800
value = 240

[State 265, 7]
type = ChangeState
trigger1 = var(55) = 1
trigger1 = animtime = 0
trigger1 = p2bodydist X > -20
trigger1 = p2bodydist Y >= -40
trigger1 = p2bodydist X <= 50
trigger1 = p2movetype = A
trigger1 = random <= 150
value = 1030

[State 265, 7]
type = ChangeState
trigger1 = var(58) > 1 || var(58) < 1
trigger1 = var(55) = 1
trigger1 = animtime = 0
trigger1 = p2bodydist X > -20
trigger1 = p2bodydist Y >= -40
trigger1 = p2bodydist X <= 50
trigger1 = p2movetype = A
trigger1 = random <= 150
value = 1040

[State 265, 7]
type = ChangeState
trigger1 = var(58) > 2 || var(58) < 1
trigger1 = var(16) < 1 && var(3) < 1
trigger1 = var(14) < 1
trigger1 = var(55) = 1
trigger1 = animtime = 0
trigger1 = p2bodydist X > -20
trigger1 = p2bodydist Y >= -40
trigger1 = p2bodydist X <= 50
trigger1 = p2movetype = A
trigger1 = random <= 150
trigger1 = power >= 500 + var(20)*100
value = 1050

[State 260, 7]
type = ChangeState
triggerall = var(55) = 1
triggerall = AnimTime = 0
trigger1 = p2movetype = A
trigger1 = random <= 500
value = 130

[State 260, 7]
type = ChangeState
triggerall = var(55) = 1
triggerall = AnimTime = 0
trigger1 = p2movetype = A
value = 131

[State 260, 8]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;-----------------------------------------
; exceed1
[Statedef 3500]
type    = S
movetype= A
physics = S
ctrl = 0
anim = 3500
facep2 = 1
velset = 0,0
sprpriority = 0

[State 192, 5]
type = PlaySnd
trigger1 = time = 5
value = s25,0
[State 192, 5]
type = PlaySnd
trigger1 = time = 5
value = s25,1
channel = 1

[State 265, 9]
type = varset
trigger1 = Time = 1
var(51) = 1

[State 5040, 1]
type = nothitby
trigger1 = time < 25
value = SCA
ignorehitpause = 1
[State 5040, 1]
type = hitby
trigger1 = time >= 25 && time < 92
value = SCA,AT
ignorehitpause = 1

[State 9001, 1]
type = Explod
trigger1 = Time = 1
anim = 3501
pos = 0,0
postype = left
bindtime = -1
supermovetime = 999
ownpal = 1
sprpriority = -99
[State 1300, 5]
type = projectile
trigger1 = time = 11
projanim = 3502
offset = 14,-84
projsprpriority = 9
projremovetime = 17
projedgebound = 210
supermovetime = 999

[State 4120, 1]
type = SuperPause
trigger1 = time = 0
movetime = 27
p2defmul = 1
time = 27
darken = 0
anim = -1

[State 9001, 3]
type = Envcolor
trigger1 = Time > 0 && time < 29
value = 255,255,255
time = 1
under = 1
[State 9001, 3]
type = Envcolor
trigger1 = Time > 28 && time < 31
value = 0,0,255
time = 1
under = 1

[State 1400,1]
type = ReversalDef
trigger1 = Time >= 0
attr = S, HT
reversal.attr = SCA,AA
hitonce = 1
id = 3500
pausetime = 12,12
sparkno = S10010
p2facing = 1
p1stateno = 3510
p2stateno = 3515

[State 265, 9]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;-----------------------------------------
; exceed1 hit
[Statedef 3510]
type    = S
movetype= A
physics = S
ctrl = 0
velset = 0,0
sprpriority = 1

[State 5040, 1]
type = nothitby
trigger1 = time < 5
value = SCA
ignorehitpause = 1

[State 192, 5]
type = stopSnd
trigger1 = time = 0
channel = 1

[State 1051, 5]
type = Changestate
Triggerall = time = 22
trigger1 = numtarget(3500) > 0
trigger1 = target(3500),stateno != 3515
trigger2 = numtarget(3500) = 0
value = 0
ctrl = 1

[State 192, 5]
type = PlaySnd
trigger1 = time = 30 || time = 83
value = s25,2
[State 192, 5]
type = PlaySnd
trigger1 = time = 129
value = s25,3

[State 9001, 3]
type = turn
trigger1 = time = 2 && p2dist x < 0

[State 9001, 3]
type = width
trigger1 = time < 129
edge = 72

[State 9001, 3]
type = targetbind
trigger1 = time < 128
pos = 56,0
[State 9001, 3]
type = targetbind
trigger1 = time = 129
pos = 72,0

[State 9001, 3]
type = changeanim
trigger1 = time = 2
value = 3510

;[State 9001, 3]
;type = Envcolor
;trigger1 = time = 0
;value = 0,0,0
;time = 1
;under = 1
[State 9001, 3]
type = bgpalfx
trigger1 = time < 29
trigger2 = time >= 33 && time < 53
trigger3 = time >= 57 && time < 82
trigger4 = time >= 85 && time < 128
add = 0,0,0
mul = 0,0,0
time = 1
[State 9001, 3]
type = bgpalfx
trigger1 = time >= 29 && time < 33
trigger2 = time >= 53 && time < 57
trigger3 = time >= 82 && time < 85
add = 255,0,0
mul = 255,0,0
time = 1
[State 9001, 3]
type = bgpalfx
trigger1 = time = 128
add = 255,0,0
mul = 255,0,0
time = 17

[State 5210, 1]
type = PalFX
trigger1 = Time >= 1 && time <= 21
trigger2 = Time >= 40 && time <= 45
trigger3 = Time >= 64 && time <= 69
trigger4 = Time >= 92 && time <= 127
time = 1
mul = 0,0,0
[State 5210, 1] 
type = PalFX
trigger1 = Time >= 22 && time <= 25
trigger2 = Time >= 36 && time <= 39
trigger3 = Time >= 46 && time <= 48
trigger4 = Time >= 60 && time <= 63
trigger5 = Time >= 88 && time <= 91
time = 1
mul = 150,150,150
[State 5210, 1] 
type = PalFX
trigger1 = Time >= 26 && time <= 28
trigger2 = Time >= 33 && time <= 35
trigger3 = Time >= 49 && time <= 52
trigger4 = Time >= 57 && time <= 59
trigger5 = Time >= 85 && time <= 87
time = 1
mul = 225,225,225

[State 3000]
type = targetlifeadd
trigger1 = time = 30 || time = 54
value = -110
id = 3500
kill = 0
[State 3000]
type = targetlifeadd
trigger1 = time = 83
value = -220
id = 3500
kill = 0
[State 3000]
type = targetlifeadd
trigger1 = time = 129
value = -110
id = 3500

[State 1203, 5]
type = Envshake
trigger1 = time >= 129 && time < 148 && time%2 = 1
time = 2
freq = 255
ampl = -8

[State 3000]
type = projectile
trigger1 = time = 30
projanim = 903
offset = 121,13
projsprpriority = 2
projremovetime = 13
projedgebound = 210
[State 3000]
type = projectile
trigger1 = time = 30
projanim = 10014
offset = 107,-41
projsprpriority = 2
projremovetime = 19
projedgebound = 210
[State 3000]
type = projectile
trigger1 = time = 54
projanim = 903
offset = 85,-37
projsprpriority = 2
projremovetime = 13
projedgebound = 210
[State 3000]
type = projectile
trigger1 = time = 54
projanim = 10014
offset = 71,-91
projsprpriority = 2
projremovetime = 19
projedgebound = 210
[State 3000]
type = projectile
trigger1 = time = 83
projanim = 903
offset = 71,-6
projsprpriority = 2
projremovetime = 13
projedgebound = 210
[State 3000]
type = projectile
trigger1 = time = 83
projanim = 10014
offset = 57,-40
projsprpriority = 2
projremovetime = 19
projedgebound = 210

[State 210, 2]
type = PlaySnd
trigger1 = time = 30 || time = 54 || time = 83
value = s3,4

[State 265, 9]
type = ChangeState
trigger1 = AnimTime = 0 && anim = 3510
value = 0
ctrl = 1
;-----------------------------------------
; hit by exceed1
[Statedef 3515]
type    = S
movetype= H
physics = S
ctrl = 0
velset = 0,0
anim = 5010
sprpriority = 0

[State 5040, 1]
type = nothitby
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 1030, 1]
type = playerpush
trigger1 = time < 129
value = 0

[State 5001, 5]
type = DefenceMulSet
trigger1 = 1
value = 1

[State 5210, 1] 
type = PalFX
trigger1 = Time >= 1 && time < 29
trigger2 = Time >= 33 && time < 53
trigger3 = Time >= 33 && time < 53
trigger4 = Time >= 57 && time < 82
trigger5 = Time >= 85 && time < 128
time = 1
mul = 0,0,0

[State 5210, 1] 
type = changeanim
trigger1 = Time < 30
value = 5010
[State 5210, 1] 
type = changeanim
trigger1 = Time = 30 || time = 31
value = 5001
[State 5210, 1] 
type = changeanim
trigger1 = Time >= 32 && time < 54
value = 5002
elem = 2
[State 5210, 1] 
type = changeanim
trigger1 = Time = 54 || time = 55
value = 5011
[State 5210, 1] 
type = changeanim
trigger1 = Time >= 56 && time < 83
value = 5002
elem = 2
[State 5210, 1] 
type = changeanim
trigger1 = Time = 83
value = 5012
[State 5210, 1] 
type = changeanim
trigger1 = Time >= 84 && time < 129
value = 5012
elem = 2

[State 5210, 1] 
type = changeanim
trigger1 = Time = 129 && selfanimexist(5111)
value = 5111
[State 5210, 1] 
type = changeanim
trigger1 = Time = 129 && selfanimexist(5112)
value = 5112
[State 5210, 1] 
type = changeanim
trigger1 = Time = 129 && selfanimexist(5113)
value = 5113
[State 5210, 1] 
type = changeanim
trigger1 = Time = 129
trigger1 = !selfanimexist(5111)
trigger1 = !selfanimexist(5112)
trigger1 = !selfanimexist(5113)
value = 5110

[State 5210, 1] 
type = selfstate
trigger1 = Time = 212 && alive
value = 5120
[State 5210, 1] 
type = selfstate
trigger1 = time = 191 && !alive
value = 5150
;-----------------------------------------
; exceed2
[Statedef 3600]
type    = S
movetype= A
physics = S
ctrl = 0
anim = 3600
facep2 = 1
velset = 0,0
sprpriority = 1

[State 0, 1]
type = varset
trigger1 = time = 0
var(33) = 0

[State 5040, 1]
type = nothitby
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 850, 1]
type = HitDef
trigger1 = AnimElem = 1
attr = S, HP
priority = 7, miss
id = 3600
hitflag = M-
sparkno = -1
snap = 33,0
hitonce = 1
p1stateno = 3610
p2stateno = 3615
p2facing = 1

[State 850, 2]
type = ChangeState
trigger1 = AnimTime = 0 && var(55) != 0
value = 0
ctrl = 1
[State 850, 2]
type = ChangeState
trigger1 = AnimTime = 0 && var(55) = 0
value = 3601
;------exceed2 fail-----------------------
[Statedef 3601]
type    = S
movetype= A
physics = S
ctrl = 0
anim = 3601
velset = 0,0
sprpriority = 1

[State 265, 9]
type = varset
trigger1 = Time = 1
var(51) = 1

[State 192, 5]
type = PlaySnd
trigger1 = time = 5
value = s25,0

[State 9001, 1]
type = Explod
trigger1 = Time = 1
anim = 3501
pos = 0,0
postype = left
bindtime = -1
sprpriority = -99
supermovetime = 999
ownpal = 1
[State 1300, 5]
type = projectile
trigger1 = time = 11
projanim = 3502
offset = 11,-58
projsprpriority = 9
projremovetime = 17
projedgebound = 210
supermovetime = 999

[State 5040, 1]
type = nothitby
trigger1 = time < 28
value = SCA
ignorehitpause = 1

[State 9001, 3]
type = Envcolor
trigger1 = Time > 0 && time < 28
value = 255,255,255
time = 1
under = 1
[State 9001, 3]
type = Envcolor
trigger1 = Time > 27 && time < 30
value = 0,0,255
time = 1
under = 1

[State 4120, 1]
type = SuperPause
trigger1 = time = 0
movetime = 27
p2defmul = 1
time = 27
darken = 0
anim = -1

[State 850, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;------exceed2 success-----------------------
[Statedef 3610]
type    = S
movetype= A
physics = S
ctrl = 0
anim = 3610
velset = 0,0
sprpriority = 1

[State 265, 9]
type = varset
trigger1 = Time = 1
var(51) = 1

[State 9001, 3]
type = width
trigger1 = animelem = 7,>=0 && animelem = 45,<0
edge = 81

[State 192, 5]
type = PlaySnd
trigger1 = time = 5
value = s25,0

[State 192, 5]
type = PlaySnd
trigger1 = time = 46
value = s25,4
[State 192, 5]
type = PlaySnd
trigger1 = time = 58
value = s25,5
[State 192, 5]
type = PlaySnd
trigger1 = time = 131
value = s25,6
channel = 1

[State 1051, 5]
type = posadd
Triggerall = time = 35
trigger1 = numtarget(3600) > 0
trigger1 = target(3600),stateno != 3615
trigger2 = numtarget(3600) = 0
x = -13
[State 1051, 5]
type = Changestate
Triggerall = time = 35
trigger1 = numtarget(3600) > 0
trigger1 = target(3600),stateno != 3615
trigger2 = numtarget(3600) = 0
value = 4003

[State 9001, 1]
type = Explod
trigger1 = Time = 1
anim = 3501
pos = 0,0
postype = left
bindtime = -1
sprpriority = -99
supermovetime = 999
ownpal = 1
[State 1300, 5]
type = projectile
trigger1 = time = 11
projanim = 3502
offset = 11,-58
projsprpriority = 9
projremovetime = 17
projedgebound = 210
supermovetime = 999

[State 9001, 3]
type = Envcolor
trigger1 = Time > 0 && time < 28
value = 255,255,255
time = 1
under = 1
[State 9001, 3]
type = Envcolor
trigger1 = Time > 27 && time < 30
value = 0,0,255
time = 1
under = 1

[State 4120, 1]
type = SuperPause
trigger1 = time = 0
movetime = 27
p2defmul = 1
time = 27
darken = 0
anim = -1

[State 1300, 3]
type = targetbind
trigger1 = time < 28
pos = 33,0
id = 3600
[State 1300, 3]
type = targetbind
trigger1 = time >= 28 && time < 33
pos = 53,0
id = 3600
[State 1300, 3]
type = targetbind
trigger1 = animelem = 9,>=0 && animelem = 10,<0
pos = 72,-56
id = 3600
[State 1300, 3]
type = targetbind
trigger1 = animelem = 10,>=0 && animelem = 11,<0
pos = 77,0
id = 3600
[State 1300, 3]
type = targetbind
trigger1 = animelem = 11,>=0 && animelem = 12,<0
pos = 77,-20
id = 3600
[State 1300, 3]
type = targetbind
trigger1 = animelem = 12,>=0 && animelem = 13,<0
pos = 72,-5
id = 3600
[State 1300, 3]
type = targetbind
trigger1 = animelem = 13,>=0 && animelem = 14,<0
pos = 55,-30
id = 3600
[State 1300, 3]
type = targetbind
trigger1 = animelem = 14,>=0 && animelem = 15,<0
pos = 63,-36
id = 3600
[State 1300, 3]
type = targetbind
trigger1 = animelem = 15,>=0 && animelem = 16,<0
pos = 61,-63
id = 3600
[State 1300, 3]
type = targetbind
trigger1 = animelem = 16,>=0 && animelem = 17,<0
pos = 74,-71
id = 3600
[State 1300, 3]
type = targetbind
trigger1 = animelem = 17,>=0 && animelem = 18,<0
pos = 81,-91
id = 3600
[State 1300, 3]
type = targetbind
trigger1 = animelem = 18,>=0 && animelem = 19,<0
pos = 73,-92
id = 3600
[State 1300, 3]
type = targetbind
trigger1 = animelem = 19,>=0 && animelem = 45,<0
pos = 70,-107
id = 3600

[State 1405, 0]
type = varrandom
trigger1 = time = 40
v = 18
range = 1

[State 1300, 5]
type = projectile
trigger1 = time = 47+var(18)
projanim = 3611+var(18)
offset = 64,0
projsprpriority = 9
projremovetime = 15
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = time = 63+var(18)
projanim = 3613+var(18)
offset = 60,3
projsprpriority = 9
projremovetime = 106-var(18)*2
projedgebound = 210

[State 1203, 5]
type = Envshake
trigger1 = time >= 35 && time < 55 && time%2 = 1
time = 2
freq = 255
ampl = -8

[State 1203, 5]
type = Envshake
trigger1 = time >= 79 && time < 131
trigger1 = time%4 = 3 || time%4 = 0
time = 2
freq = 255
ampl = -2

[State 9001, 3]
type = Envcolor
trigger1 = Time = 82 || Time = 90 || Time = 98 || Time = 102 || Time = 106
trigger2 = Time = 110 || Time = 114 || Time = 118 || Time = 112 || Time = 116
value = 255,255,255
time = 1
under = 1

[State 3000]
type = targetlifeadd
trigger1 = animelem = 10
value = -23
id = 3600
kill = 0
[State 3000]
type = targetlifeadd
trigger1 = time >= 79 && time < 131
value = -9
id = 3600
kill = 0
[State 3000]
type = targetlifeadd
trigger1 = time = 131
value = -9
id = 3600

[State 1300, 5]
type = projectile
trigger1 = time = 137
projanim = 3100
offset = 72,-105
projsprpriority = 10
projremovetime = 32
projedgebound = 210
supermovetime = 999
[State 1300, 5]
type = projectile
trigger1 = time = 137
projanim = 3100
offset = 112,-85
projsprpriority = 10
projremovetime = 32
projedgebound = 210
supermovetime = 999
[State 1300, 5]
type = projectile
trigger1 = time = 137
projanim = 3100
offset = 92,-65
projsprpriority = 10
projremovetime = 32
projedgebound = 210
supermovetime = 999

[State 1300, 5]
type = explod
trigger1 = time >= 134 && time <= 137
trigger1 = NumExplod(3100) < 3
trigger1 = Random < 300
anim = 3100
ID = 3100
sprpriority = 10
pos = 122,-105
random = 100,100
ignorehitpause = 1
ownpal = 1
[State 1300, 5]
type = explod
trigger1 = time >= 134 && time <= 137
trigger1 = NumExplod(3100) < 3
trigger1 = Random < 300
anim = 3120
ID = 3100
sprpriority = 10
pos = 122,-105
random = 100,100
ignorehitpause = 1
ownpal = 1
[State 1300, 5]
type = explod
trigger1 = time >= 134 && time <= 137
trigger1 = NumExplod(3100) < 3
trigger1 = Random < 300
anim = 3130
ID = 3100
sprpriority = 10
pos = 122,-105
random = 100,100
ignorehitpause = 1
ownpal = 1
[State 1300, 5]
type = explod
trigger1 = time >= 134 && time <= 137
trigger1 = NumExplod(3100) < 3
trigger1 = Random < 300
anim = 3140
ID = 3100
sprpriority = 10
pos = 122,-105
random = 100,100
ignorehitpause = 1
ownpal = 1
[State 7200, 12]
type = Explod
trigger1 = time >= 134 && time <= 137
trigger1 = NumExplod(3100) < 3
trigger1 = Random < 300
anim = 3150
ID = 3100
sprpriority = 10
postype = p2
pos = 122,-105
random = 100,100
ownpal = 1

[State 7200, 12]
type = Explod
trigger1 = time >= 137
trigger1 = NumExplod(3150) < 3
trigger1 = Random < 800
trigger1 = p2movetype = H && p2stateno = 3616
anim = 3150
ID = 3150
sprpriority = 10
postype = p2
pos = 0,-30
random = 100,100
ownpal = 1

[State 522, 1]
type = PlaySnd
trigger1 = time = 131
value = s7,2

[State 850, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;-----------------------------------------
; hit by exceed2
[Statedef 3615]
type    = S
movetype= H
physics = N
ctrl = 0
velset = 0,0
anim = 0
sprpriority = 0

[State 1531, 5]
type = defencemulSet
trigger1 = 1
value = 1

[State 850, 2]
type = Changeanim
trigger1 = Time < 1
value = 0
[State 850, 2]
type = Changeanim
trigger1 = Time > 0 && Time < 6
value = 5012
[State 850, 2]
type = Changeanim2
trigger1 = Time = 6
value = 3615

[State 850, 2]
type = Changeanim
trigger1 = Time = 52 && selfanimexist(36159)
value = 36159

[State 3305, 2]
type = PalFX
trigger1 = time = 103
time = 9
add = 48,0,168
mul = 166,166,166
sinadd = 96,96,96,12
color = 0
invertall = 1

[State 5040, 1]
type = nothitby
trigger1 = 1
value = SCA
[State 5040, 1]
type = playerpush
trigger1 = 1
value = 0

[State 850, 2]
type = ChangeState
trigger1 = Time = 104
value = 3616
;------------------------------------
; diag up(hit by exceed2)
[Statedef 3616]
type    = A
movetype= H
physics = N
velset = -6,-11.7
ctrl = 0
anim = 5030
sprpriority = 0

[State 5040, 1]
type = nothitby
trigger1 = 1
value = SCA
[State 1531, 5]
type = defencemulSet
trigger1 = 1
value = 1

[State 1531, 5]
type = posadd
trigger1 = time = 0
x = 15
y = 75

[State 1531, 5]
type = changeanim
trigger1 = time = 0
trigger1 = selfanimexist(5052)
value = 5052

[State 1531, 5]
type = changeanim
trigger1 = vel Y > 0
trigger1 = anim = 5052
trigger1 = selfanimexist(5062)
value = 5062

[State 1531, 5]
type = changeanim
trigger1 = animtime = 0
trigger1 = anim = 5030
value = 5050

[State 5050, 2];Coming down anim
type = ChangeAnim
trigger1 = anim = [5050,5059]
trigger1 = Vel Y >= ifelse(anim = 5050, 1, -2)
trigger1 = SelfAnimExist(anim+10)
value = anim+10
persistent = 0

[State 706, 1]
type = VelAdd
trigger1 = 1
y = .6

[State 3305, 2]
type = PalFX
trigger1 = time = 8 || time = 26
time = 9
add = 96,48,216
mul = 166,166,166
sinadd = 64,64,64,24
color = 0
[State 3305, 2]
type = PalFX
trigger1 = time = 17
time = 9
add = 48,0,168
mul = 166,166,166
sinadd = 96,96,96,12
color = 0
invertall = 1
[State 3305, 2]
type = PalFX
trigger1 = time = 35
time = 4
add = 48,0,168
mul = 166,166,166
sinadd = 96,96,96,12
color = 0
invertall = 1

[State 706, 4]
type = ChangeState
trigger1 = time = 40
value = 3617
;-------------------------------------------------------------
; first bound(hit by exceed2)
[Statedef 3617]
type    = L
movetype= H
physics = N

[State 5040, 1]
type = nothitby
trigger1 = 1
value = SCA
[State 5100, 1]
type = VelSet
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) = 0
trigger1 = vel x > 1
x = 1

[State 5100, EnvShake]
type = FallEnvShake
trigger1 = Time = 0

[State 5100, 2] ;Hit ground anim (normal)
type = ChangeAnim
triggerall = time = 0 && prevstateno != 3618
trigger1 = (anim != [5051,5059]) && (anim != [5061,5069])
trigger2 = !SelfAnimExist(5102)
trigger3 = !SelfAnimExist(5112)
trigger4 = !SelfAnimExist(5162)
value = 5100
[State 5100, 3] ;Hit ground anim (for hit up)
type = ChangeAnim
trigger1 = time = 0 && prevstateno != 3618
trigger1 = (anim = [5051,5059]) || (anim = [5061,5069])
trigger1 = SelfAnimExist(5102)
trigger1 = SelfAnimExist(5112)
trigger1 = SelfAnimExist(5162)
value = 5102

[State 5100, Var] 
type = VarSet
trigger1 = Time = 0
sysvar(1) = 0

[State 5100, 2]
type = ChangeAnim
triggerall = time = 0 && prevstateno = 3618
trigger1 = !SelfAnimExist(5112)
trigger2 = !SelfAnimExist(5102)
trigger3 = !SelfAnimExist(5162)
value = 5100
[State 5100, 3]
type = ChangeAnim
trigger1 = time = 0 && prevstateno = 3618
trigger1 = SelfAnimExist(5112)
trigger1 = SelfAnimExist(5102)
trigger1 = SelfAnimExist(5162)
value = 5112

[State 5100, 4]
type = PosSet
trigger1 = Time = 0
y = 0

[State 5100, 5]
type = VelSet
trigger1 = Time = 0
y = 0

[State 5100, 6] ;Reduce speed
type = VelMul
trigger1 = Time = 0
x = 0.75

[State 5100, 8]
type = GameMakeAnim
trigger1 = Time = 1
value = 60 + (sysvar(1) > 5) + (sysvar(1) > 14)
pos = 0, 0
under = 1

[State 5100, 9]
type = HitFallDamage
trigger1 = Time = 3

[State 5100, 10]
type = PlaySnd
trigger1 = Time = 1
value = F7, (sysvar(1) > 5) + (sysvar(1) > 14)

[State 5100, 11]
type = PosFreeze
trigger1 = 1

[State 5100, 12]
type = ChangeState
trigger1 = Time = 5 && prevstateno != 3618
value = 3618
[State 5100, 12]
type = ChangeState
trigger1 = Time = 5 && prevstateno = 3618
value = 3619

[State 5100, 13]
type = ForceFeedback
trigger1 = Time = 0 && prevstateno != 3618
waveform = sinesquare
ampl = 128,-3,-.2,.005
time = 20
;---------------------------------------------------------------------------
; (bounce into air)
[Statedef 3618]
type    = L
movetype= H
physics = N

[State 5040, 1]
type = nothitby
trigger1 = 1
value = SCA
[State 5101, 1] ;Coming hit ground anim (normal)
type = ChangeAnim
triggerall = time = 0
trigger1 = anim != [5101,5109]
trigger2 = !SelfAnimExist(5162)
trigger3 = !SelfAnimExist(5112)
trigger4 = !SelfAnimExist(5102)
value = 5160

[State 5101, 2] ;Coming hit ground anim (for hit up)
type = ChangeAnim
triggerall = time = 0
trigger1 = anim = 5102
trigger1 = SelfAnimExist(5162)
trigger1 = SelfAnimExist(5112)
trigger1 = SelfAnimExist(5102)
value = 5162

[State 5101, 3]
type = HitFallVel
trigger1 = Time = 0

[State 5101, 4]
type = PosSet
trigger1 = Time = 0
y = 20

[State 5101, 5]
type = Velset
trigger1 = time = 0
y = -5
[State 5101, 5]
type = VelAdd
trigger1 = 1
y = 0.8

[State 5101, 6] ;Hit ground
type = ChangeState
trigger1 = time = 12
value = 3617
;---------------------------------------------------------------------------
; (bounce into air2)
[Statedef 3619]
type    = L
movetype= H
physics = N

[State 5040, 1]
type = nothitby
trigger1 = time < 8
value = SCA
[State 5101, 1]
type = ChangeAnim
triggerall = time = 0
trigger1 = !SelfAnimExist(5162)
trigger2 = !SelfAnimExist(5112)
trigger3 = !SelfAnimExist(5102)
value = 5160

[State 5101, 2]
type = ChangeAnim
trigger1 = SelfAnimExist(5162) && time < 8
trigger1 = SelfAnimExist(5112)
trigger1 = SelfAnimExist(5102)
value = 5162
elem = 3
[State 5101, 2]
type = ChangeAnim
trigger1 = SelfAnimExist(5162) && time < 8 && anim = 5162 && animelem = 1
trigger1 = SelfAnimExist(5112)
trigger1 = SelfAnimExist(5102)
value = 5162
elem = 2

[State 5101, 3]
type = HitFallVel
trigger1 = Time = 0

[State 5101, 4]
type = PosSet
trigger1 = Time = 0
y = 20

[State 5101, 5]
type = VelAdd
trigger1 = 1
y = 0.7

[State 5101, 6] ;Hit ground
type = SelfState
trigger1 = time = 8
value = 5110
;-------------------------------------
; Yaotome
[Statedef 1999]
type    = S
movetype= A
physics = S
ctrl = 0
anim = 1999
facep2 = 1
velset = 0,0
sprpriority = 0

[State 1000, 4]
type = Helper
trigger1 = time = 0
name = "n2"
pos = 250,0  
stateno = 2011

[State 1000, 4]
type = Helper
trigger1 = time = 0
name = "n2"
pos = 125,0  
stateno = 2011

[State 1000, 1]
type = varset
trigger1 = time = 0
var(10) = 8

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 1

[state 1999, 0]
type = playerpush
trigger1 = 1
value = 1

[State 182, 2]
type = NotHitBy
trigger1 = 1
value = SCA

[State 1531, 5]
type = playsnd
trigger1 = time = 0
value = s1,7

[State 2100, 5]
type = Explod
trigger1 = animelem = 3
anim = 12000
sprpriority = -1
pos = 19,-115
bindtime = -1
supermove = 1
ownpal = 1

[State 912, 5]
type = PlaySnd
Trigger1 = Time = 0
value = s7,0
channel = 1

[State 610, 4]
type = ChangeState
trigger1 = animtime = 0
value = 2001

[Statedef 1994]
type    = S
movetype= A
physics = N
ctrl = 0
anim = 1994
facep2 = 1
velset = 0,0
juggle = 8
sprpriority = 0

[State 522, 1]
type = PlaySnd
trigger1 = AnimElem = 7
value = s1,6

[State 182, 2]
type = notHitBy
trigger1 = time < 6
value = SCA

[State 182, 2]
type = HitBy
trigger1 = time > 12
value = SCA,SA,HA,HT,AP

[State 1000, 4]
type = width
trigger1 = time > 12
value = 5,5

[State 1000, 4]
type = Helper
trigger1 = animelem = 6
name = "n3"
pos = 0,0  
stateno = 2003

[State 5210, 1] 
type = PalFX
trigger1 = gametime%2 = 0
time = 1
add = 64,64,64 

[State 1000, 4]
type = Helper
trigger1 = time = 0
name = "n2"
pos = 250,0  
stateno = 2011

[State 1000, 4]
type = Helper
trigger1 = time = 0
name = "n2"
pos = 125,0  
stateno = 2011

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 1

[state 182, 1]
type = varadd
trigger1 = time = 0
var(20) = 15

[State 1000, 1]
type = velset
trigger1 = animelem = 8
x = 24

[state 2000, 0]
type = playerpush
trigger1 = 1
value = 1

[State 912, 5]
type = PlaySnd
Trigger1 = Time = 0
value = s4,6
channel = 1

[State 4000, 1]
type = HitDef
trigger1 = var(5) < 2
attr = SC,HA
damage = 0
animtype = d
sparkno = s10020
guard.sparkno = -1 
sparkxy = 5-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-33
guardflag = M
id = 1994
hitflag = MAF
pausetime = 0,1
guard.pausetime = 0,12
getpower = 0,0
givepower = 21,42
ground.type = low
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = -30
ground.slidetime = 25
ground.hittime = 25
guard.slidetime = 25-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,12,0)
guard.hittime = 25-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,12,0)
guard.velocity = -13
ground.velocity = -6,-5
priority = 7,Hit
hitonce = 1
hitsound = S4,4
guardsound = -1
p2facing = 1
fall.yvelocity = -4.2
palfx.time = 1
palfx.add = 48,0,168
palfx.mul = 166,166,166
palfx.sinadd = 96,96,96,17
palfx.color = 0      
palfx.invertall = 1  
fall = 1
fall.recover = 0                        

[State 182, 2]
type = varset
trigger1 = time = 0
var(5) = 0

[State 182, 2]
type = varadd
trigger1 = movehit > 0
var(5) = 1

[State 182, 2]
type = movehitreset
triggerall = movehit > 0
trigger1 = numtarget(1994) = 0
trigger2 = numtarget(1994) > 0
trigger2 = target(1994),stateno != 5000 && target(1994),stateno != 5020
persistent = 0

[State 182, 2]
type = varset
trigger1 = numtarget(1994) > 0
trigger1 = target(1994),stateno = 5000 || target(1994),stateno = 5020
var(18) = 1

[State 182, 2]
type = varset
trigger1 = numtarget(1994) = 0
trigger2 = numtarget(1994) > 0
trigger2 = target(1994),stateno != 5000 && target(1994),stateno != 5020
var(18) = 0

[State 1002, 4]
type = Targetstate
trigger1 = movehit > 0 && numtarget(1994) > 0
value = 1995
id = 1994
ignorehitpause = 1
persistent = 0

[State 1002, 4]
type = changestate
trigger1 = movehit > 0 && var(18) = 1 && var(5) < 2
trigger2 = movehit > 0 && var(5) > 1
value = 1997
ignorehitpause = 1
persistent = 0

[State 610, 4]
type = ChangeState
trigger1 = animtime = 0 || moveguarded > 0
value = 1996

[Statedef 2100];down after guard
type    = S
movetype= H
physics = N
ctrl = 0
facep2 = 1
velset = 0,0
ctrl = 0
sprpriority = -2

[State 5040, 1]
type = stopsnd
trigger1 = time > 1
channel = 8
ignorehitpause = 1

[State 5040, 1]
type = posset
trigger1 = time = 0
y = 0
ignorehitpause = 1

[State 5040, 1]
type = nothitby
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 150, 1]
type = ChangeAnim
trigger1 = 1
value = 150

[State 150, 1]
type = varset
trigger1 = time = 0 && fvar(12) > -11
fvar(12) = -11
ignorehitpause = 1
[State 150, 1]
type = varset
trigger1 = time = 0 && var(5) < 19
var(5) = 19
ignorehitpause = 1

[State 150, 2]
type = ChangeState
trigger1 = time >= var(4)
value = 2101

[State 150, 3]
type = ForceFeedback
trigger1 = time = 0
waveform = square
time = 3
;---------------(knocked back)
[Statedef 2101]
type    = S
movetype= H
physics = N
anim = 150
velset = fvar(12)
sprpriority = -2

[State 5040, 1]
type = stopsnd
trigger1 = time > 1
channel = 8
ignorehitpause = 1

[State 5040, 1]
type = nothitby
trigger1 = 1
value = SCA

[State 151, 2]
type = VelSet
trigger1 = Time = var(5)
x = 0

[State 5001, 3] 
type = VelMul
trigger1 = 1
x = .85

[State 5210, 1] 
type = PalFX
trigger1 = Time = var(5)-1
time = 1
add = 0,0,0

[State 151, 4]
type = ChangeState
trigger1 = Time >= var(5)
value = 2104
;---------------------------------------------------------------------------
; CGUARDHIT (shaking)
[Statedef 2102]
type    = C
movetype= H
physics = N
velset = 0,0
ctrl = 0
sprpriority = -2

[State 5040, 1]
type = stopsnd
trigger1 = time > 1
channel = 8
ignorehitpause = 1

[State 5040, 1]
type = posset
trigger1 = time = 0
y = 0
ignorehitpause = 1

[State 5040, 1]
type = nothitby
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 152, 1]
type = ChangeAnim
trigger1 = 1
value = 151

[State 150, 1]
type = varset
trigger1 = time = 0 && fvar(12) > -11
fvar(12) = -11
ignorehitpause = 1
[State 150, 1]
type = varset
trigger1 = time = 0 && var(5) < 19
var(5) = 19
ignorehitpause = 1

[State 152, 3]
type = ChangeState
trigger1 = time >= var(4)
value = 2103

[State 152, 4]
type = ForceFeedback
trigger1 = time = 0
waveform = square
time = 4
;---------------------------------------------------------------------------
; CGUARDHIT2 (knocked back)
[Statedef 2103]
type    = C
movetype= H
physics = N
anim = 151
velset = fvar(12)
sprpriority = -2

[State 5040, 1]
type = stopsnd
trigger1 = time > 1
channel = 8
ignorehitpause = 1

[State 5040, 1]
type = nothitby
trigger1 = 1
value = SCA

[State 153, 2]
type = VelSet
trigger1 = Time = var(5)
x = 0

[State 5001, 3] 
type = VelMul
trigger1 = 1
x = .85

[State 5210, 1] 
type = PalFX
trigger1 = Time = var(5)-1
time = 1
add = 0,0,0

[State 153, 4]
type = ChangeState
trigger1 = Time >= var(5)
value = 2104
;---------------------------------------------------------------------------
; DOWN after guard
[Statedef 2104]
type    = S
movetype= H
physics = S
anim = 2100
sprpriority = -2

[State 5040, 1]
type = nothitby
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 5110, 6]
type = PlaySnd
trigger1 = Time = 0
value = s25,7

[State 5210, 1] 
type = PalFX
trigger1 = Time = 0
time = 1
add = 0,0,0

[State 153, 4]
type = statetypeset
trigger1 = animelem = 9
value = L
[State 153, 4]
type = changeanim
trigger1 = time = 61
value = 5111

[State 153, 4]
type = lifeset
trigger1 = time = 61 && life > 0
value = 0
[State 153, 4]
type = changestate
trigger1 = time = 61
value = 5110
;--------------------------------------------------------------
[Statedef 1998]
type    = S
movetype= A
physics = S
ctrl = 0
anim = 1998
facep2 = 1
velset = 0,0
sprpriority = 6

[State 1000, 1]
type = varset
trigger1 = time = 0
trigger1 = prevstateno = 1030 || prevstateno = 1038 || prevstateno = 1037 || prevstateno = 1040
var(10) = 8

[State 1000, 4]
type = sprpriority
trigger1 = animtime = 0
value = 0

[State 1000, 4]
type = Helper
trigger1 = time = 0
name = "n2"
pos = 250,0  
stateno = 2011

[State 1000, 4]
type = Helper
trigger1 = time = 0
name = "n2"
pos = 125,0  
stateno = 2011

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 1

[state 182, 1]
type = varset
trigger1 = time = 0 && var(3) > 0
var(5) = 1
[state 182, 1]
type = varset
trigger1 = time = 0 && var(3) < 1
var(5) = 0

[state 182, 1]
type = varadd
trigger1 = time = 27 && var(5) = 0
var(20) = 20
[state 182, 1]
type = varadd
trigger1 = time = 27 && var(5) = 1
var(20) = 10
[state 182, 1]
type = varset
trigger1 = time = 0 && var(3) > 0
var(3) = 0

[state 2000, 0]
type = playerpush
trigger1 = 1
value = 1

[State 182, 2]
type = NotHitBy
trigger1 = 1
value = SCA

[State 1300, 5]
type = Envcolor
trigger1 = animelem = 1,1
persistent = 0
ignorehitpause = 1
value = 255,255,255
time = 4
under = 1
supermove = 1

[State 1300, 5]
type = Envcolor
trigger1 = animelem = 2,1
persistent = 0
ignorehitpause = 1
value = 0,0,0
time = 23
under = 1
supermove = 1

[State 1531, 5]
type = playsnd
trigger1 = time = 0
value = s1,7

[State 4120, 1]
type = SuperPause
trigger1 = time = 1
movetime = 28
p2defmul = 1
time = 28
darken = 0
anim = -1

[State 2100, 4]
type = Explod
trigger1 = animelem = 3,6
anim = 12000
sprpriority = 7
pos = 13,-114
supermove = 1
bindtime = -1
ownpal = 1

[State 2100, 5]
type = Explod
trigger1 = animelem = 1,3
anim = 1200
sprpriority = -1
pos = 22,-120
supermove = 1
bindtime = -1
ownpal = 1

[State 912, 5]
type = PlaySnd
Trigger1 = Time = 0
value = s7,0
channel = 1

[State 610, 4]
type = ChangeState
trigger1 = animtime = 0
value = 2001
;-----------------------------------------
; Yaotome
[Statedef 2000]
type    = S
movetype= A
physics = S
ctrl = 0
anim = 1998
facep2 = 1
velset = 0,0
sprpriority = 0

[State 1000, 1]
type = varset
triggerall = time = 0
trigger1 = prevstateno != 511 && prevstateno != 516
trigger2 = prevstateno = 511 && var(4) = 1
trigger3 = prevstateno = 516 && var(4) = 1
trigger4 = var(3) < 1
var(10) = 8

[State 1000, 1]
type = varset
trigger1 = time = 0
trigger1 = var(3) > 0
var(10) = 0

[State 1000, 1]
type = varset
trigger1 = var(3) < 1
trigger1 = time = 0
trigger1 = prevstateno = 510 || prevstateno = 520
var(10) = 16

[State 1000, 4]
type = Helper
trigger1 = time = 0
name = "n2"
pos = 250,0  
stateno = 2011

[State 1000, 4]
type = Helper
trigger1 = time = 0
name = "n2"
pos = 125,0  
stateno = 2011

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 1

[state 182, 1]
type = varset
trigger1 = time = 0 && var(3) > 0
var(5) = 1
[state 182, 1]
type = varset
trigger1 = time = 0 && var(3) < 1
var(5) = 0

[state 182, 1]
type = varadd
trigger1 = time = 28 && var(5) = 0
var(20) = 10
[state 182, 1]
type = varset
trigger1 = time = 0 && var(3) > 0
var(3) = 0

[state 2000, 0]
type = playerpush
trigger1 = 1
value = 1

[State 182, 2]
type = NotHitBy
trigger1 = 1
value = SCA

[State 1300, 5]
type = Envcolor
trigger1 = Time = 1
persistent = 0
ignorehitpause = 1
value = 255,255,255
time = 4
under = 1
supermove = 1

[State 1300, 5]
type = Envcolor
trigger1 = Time = 5
persistent = 0
ignorehitpause = 1
value = 0, 0, 0
time = 25
under = 1
supermove = 1

[State 1531, 5]
type = playsnd
trigger1 = time = 0
value = s1,7

[State 4120, 1]
type = SuperPause
trigger1 = time = 1
movetime = 28
p2defmul = 1
time = 28
darken = 0
anim = -1

[State 2100, 4]
type = Explod
trigger1 = animelem = 3,6
anim = 12000
sprpriority = 7
pos = 13,-114
supermove = 1
bindtime = -1
ownpal = 1

[State 2100, 5]
type = Explod
trigger1 = animelem = 1,3
anim = 1200
sprpriority = -1
pos = 22,-120
supermove = 1
bindtime = -1
ownpal = 1

[State 912, 5]
type = PlaySnd
Trigger1 = Time = 0
value = s7,0
channel = 1

[State 610, 4]
type = ChangeState
trigger1 = animtime = 0
value = 2001

[Statedef 2011] ;helper
type    = S
movetype= A
physics = N
ctrl = 0
anim = 2011
velset = 0,0

[State 1000, 4]
type = destroyself
trigger1 = parent,stateno != 2000 && parent,stateno != 1999 && parent,stateno != 2001
trigger1 = parent,stateno != 2010 && parent,stateno != 2500 && parent,stateno != 2501
trigger1 = parent,stateno != 2510 && parent,stateno != 2400 && parent,stateno != 2401
trigger1 = parent,stateno != 2402 && parent,stateno != 6999 && parent,stateno != 7000
trigger1 = parent,stateno != 7001 && parent,stateno != 7003 && parent,stateno != 7011
trigger1 = parent,stateno != 7012 && parent,stateno != 7021 && parent,stateno != 7022
trigger1 = parent,stateno != 1000 && parent,stateno != 1020 && parent,stateno != 1994
trigger1 = parent,numprojid(7000) = 0 && parent,stateno != 301
trigger1 = parent,stateno != 7601 && parent,stateno != 7701 && parent,stateno != 7801
trigger2 = parent,stateno = 1000 && parent,numproj = 0 && parent,time > 9
trigger3 = parent,stateno = 1020 && parent,numproj = 0 && parent,time > 9
trigger4 = parent,stateno = 301 && parent,animelem = 2,>= 0
;----------------------------------
; 8 Maiden Rush (Prepare)
[Statedef 2001]
type     = S
movetype = A
physics  = S
anim = 2001
ctrl = 0
velset = 0,0,0
sprpriority = 0

[State 1000, 4]
type = Helper
trigger1 = time = 0
name = "n3"
pos = 0,0  
stateno = 2003

[state 2001, 0]
type = playerpush
trigger1 = 1
value = 1

[State 182, 2]
type = NotHitBy
trigger1 = animtime < 0
value = SCA

[State 1531, 5]
type = PosFreeze
trigger1 = time >= 0

[State 100, 5]
type = ChangeState
trigger1 = animtime = 0
value = 2010

[Statedef 2003] ;helper
type    = A
movetype= A
physics = N
anim = 2003

[State 5050, 6]
type = playerpush
trigger1 = 1
value = 1

[State 5050, 6]
type = width
trigger1 = 1
value = 20,20

[State 5050, 6]
type = nothitby
trigger1 = 1
value = SCA
[State 5050, 6]
type = turn
trigger1 = parent,facing != facing
[State 5050, 6]
type = bindtoparent
trigger1 = 1
pos = 0,0
[State 5050, 6]
type = destroyself
trigger1 = parent,stateno != 2001 && parent,stateno != 2501 && parent,stateno != 2401 && parent,stateno != 1994
trigger1 = parent,stateno != 2010 && parent,stateno != 2510 && parent,stateno != 2402
;------------------------------------
; 8 Maiden Rush (Dash)
[Statedef 2010]
type    = S
movetype= A
physics = N
juggle  = var(10)
velset = 10,0
ctrl = 0
anim = 2010

[State 3000, 2]
type = width
trigger1 = 1
value = 10

[State 1405, 0]
type = varrandom
trigger1 = time = 0
v = 4
range = 1

[State 3000, 2]
type = AfterImage
trigger1 = Time = 0
time = 2
length = 8
;PalBright   =   0,  0,  0
;PalContrast = 120,120,220
paladd = 84,60,164
;PalAdd      =  10, 10, 25
;PalMul      = .45,.45,.75
TimeGap  = 1
FrameGap = 2
;Trans = add1

[State 3000, 2]
type = AfterImagetime
trigger1 = time%2 = 0
time = 2

;[State 182, 2]
;type = HitBy
;trigger1 = 1
;value = SCA,SA,HA,AP

[State 4000, 1]
type = HitDef
trigger1 = var(5) < 2
attr = SC,HA
damage = 0
animtype = dup
sparkno = s9243
guard.sparkno = s10111 
sparkxy = 0-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-40
guardflag = M
id = 2010
;snap = 0
hitflag = MAF
getpower = 0,0
givepower = 21,21
pausetime = 0,1
guard.pausetime = 0,0
ground.type = low
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = -12
ground.slidetime = 35
ground.hittime = 35
guard.slidetime = 35-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,17,0)
guard.hittime = 35-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,17,0)
guard.velocity = -10
ground.velocity = -6,-5
priority = 4, Hit
hitonce = 1
hitsound = s(ifelse(var(4)=1,3,7)),4
guardsound = s1,0
p2facing = 1
fall = 1
fall.recover = 0                        
fall.yvelocity = -3.6

[State 182, 2]
type = varset
trigger1 = time = 0
var(5) = 0

[State 182, 2]
type = varadd
trigger1 = movehit > 0
var(5) = 1

[State 182, 2]
type = movehitreset
triggerall = movehit > 0
trigger1 = numtarget(2010) = 0
trigger2 = numtarget(2010) > 0
trigger2 = target(2010),stateno != 5000 && target(2010),stateno != 5020
persistent = 0

[State 182, 2]
type = varset
trigger1 = numtarget(2010) > 0
trigger1 = target(2010),stateno = 5000 || target(2010),stateno = 5020
var(18) = 1

[State 182, 2]
type = varset
trigger1 = numtarget(2010) = 0
trigger2 = numtarget(2010) > 0
trigger2 = target(2010),stateno != 5000 && target(2010),stateno != 5020
var(18) = 0

[State 1002, 4]
type = Targetstate
trigger1 = movehit > 0 && numtarget(2010) > 0
value = 9007
id = 2010
ignorehitpause = 1
persistent = 0

[State 1002, 4]
type = changestate
trigger1 = movehit > 0 && var(18) = 1 && var(5) < 2
trigger2 = movehit > 0 && var(5) > 1
value = 2002
ignorehitpause = 1
persistent = 0

[State 1301, 2] 
type = changestate 
trigger1 = time = 25
trigger2 = moveguarded > 0
value = 9004 
;-------------------------------------
; 8 Maiden Rush (g,f)
[Statedef 9004]
type    = S
physics = N
ctrl = 0
anim = 2020
velset = 9,0

[State 7800, 3]
type = BGPalfx
trigger1 = prevstateno = 2510
trigger1 = animtime < -2
ignorehitpause = 1
supermove = 1
time = 2
mul = 158,158,158
invertall = 1

[State 7800, 3]
type = BGPalfx
trigger1 = prevstateno = 2402 && var(12) = 0
trigger1 = animtime < -2
ignorehitpause = 1
supermove = 1
time = 2
add = 358,44,44
mul = 113,0,0
invertall = 1

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 0

[State 182, 2]
type = velmul 
trigger1 = 1
x = 0.93

[State 3000, 2]
type = AfterImage
trigger1 = time = 0
time = 0

[State 52, 3]
type = ChangeState
value = 1050
trigger1 = var(58) > 2 || var(58) < 1
trigger1 = animTime = 0 && p2bodydist X < 51 && p2bodydist X > -50
trigger1 = var(55) = 1 && var(3) < 1
trigger1 = p2movetype = A
trigger1 = random <= 200
trigger1 = power >= 500 + var(20)*100

[State 52, 3]
type = ChangeState
value = 1040
trigger1 = var(58) > 1 || var(58) < 1
trigger1 = animTime = 0 && p2bodydist X < 51 && p2bodydist X > -50
trigger1 = var(55) = 1
trigger1 = p2movetype = A
trigger1 = random <= 200

[State 52, 3]
type = ChangeState
value = 1030
trigger1 = animTime = 0 && p2bodydist X < 51 && p2bodydist X > -50
trigger1 = var(55) = 1
trigger1 = p2movetype = A
trigger1 = random <= 200

[State 52, 4]
type = ChangeState
trigger1 = animTime = 0 
ctrl = 1
value = 0

[Statedef 1996]
type    = S
physics = N
ctrl = 0
anim = 1996
velset = 9,0

[State 5210, 1] 
type = PalFX
trigger1 = gametime%2 = 0
time = 1
add = 64,64,64 

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 0

[State 182, 2]
type = velmul 
trigger1 = 1
x = 0.9

[State 52, 3]
type = ChangeState
value = 1050
trigger1 = var(58) > 2 || var(58) < 1
trigger1 = animTime = 0 && p2bodydist X < 51 && p2bodydist X > -50
trigger1 = var(55) = 1 && var(3) < 1
trigger1 = p2movetype = A
trigger1 = random <= 200
trigger1 = power >= 500 + var(20)*100

[State 52, 3]
type = ChangeState
value = 1040
trigger1 = var(58) > 1 || var(58) < 1
trigger1 = animTime = 0 && p2bodydist X < 51 && p2bodydist X > -50
trigger1 = var(55) = 1
trigger1 = p2movetype = A
trigger1 = random <= 200

[State 52, 3]
type = ChangeState
value = 1030
trigger1 = animTime = 0 && p2bodydist X < 51 && p2bodydist X > -50
trigger1 = var(55) = 1
trigger1 = p2movetype = A
trigger1 = random <= 200

[State 52, 4]
type = ChangeState
trigger1 = animTime = 0 
ctrl = 1
value = 0
;----------------------------------------
; 8 Maiden Rush 
[Statedef 9005]
type    = S
physics = S
ctrl = 0
anim = 9006
velset = -4,0,0

[State 210, 1]
type = AfterImageTime
trigger1 = time = 0
Time = 0

[State 210, 2]
type = PlaySnd
trigger1 = time = 0
value = s21,4

[State 52, 1]
type = VelSet
trigger1 = Time = 0
y = 0

[State 52, 3]
type = PosSet
trigger1 = Time = 0
y = 0

[State 52, 1]
type = Posadd
trigger1 = AnimElem = 4
x = -20

[State 52, 1]
type = VelSet
trigger1 = AnimElem = 4
x = 0

[State 52, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;-------------------------------------
[Statedef 9997]
type     = A
physics  = N
anim = 9997
ctrl = 0
velset = 0,0
sprpriority = 3

[State 5210, 1] 
type = PalFX
trigger1 = timemod = 2,0
time = 2
add = 56,64,16 

[State 5210, 1] 
type = PalFX
trigger1 = timemod = 2,1 && animtime < -3
time = 1
add = 0,0,0 

[State 1000, 4]
type = destroyself
trigger1 = Animtime = 0

[Statedef 9998]
type     = A
physics  = N
anim = 9997
ctrl = 0
velset = 0,0
sprpriority = 6

[State 5210, 1] 
type = PalFX
trigger1 = timemod = 2,0
time = 2
add = 56,64,16 

[State 5210, 1] 
type = PalFX
trigger1 = timemod = 2,1 && animtime < -3
time = 1
add = 0,0,0 

[State 1000, 4]
type = destroyself
trigger1 = Animtime = 0

[Statedef 10070]
type     = A
physics  = N
anim = 10070
ctrl = 0
velset = 0,0
sprpriority = 3

[State 5210, 1] 
type = PalFX
trigger1 = timemod = 2,0
time = 2
add = 56,64,16 

[State 5210, 1] 
type = PalFX
trigger1 = timemod = 2,1 && animtime < -3
time = 1
add = 0,0,0 

[State 1000, 4]
type = destroyself
trigger1 = Animtime = 0

[Statedef 10050]
type     = A
physics  = N
anim = 10050
ctrl = 0
velset = 0,0
sprpriority = 3

[State 5210, 1] 
type = PalFX
trigger1 = timemod = 2,0
time = 2
add = 56,64,16 

[State 5210, 1] 
type = PalFX
trigger1 = timemod = 2,1 && animtime < -3
time = 1
add = 0,0,0 

[State 1000, 4]
type = destroyself
trigger1 = Animtime = 0

[Statedef 10090]
type     = A
physics  = N
anim = 10090
ctrl = 0
velset = 0,0
sprpriority = 3

[State 5210, 1] 
type = PalFX
trigger1 = timemod = 2,0 && time > 3
trigger2 = time = 1
time = 2
add = 255,255,255 

[State 5210, 1] 
type = PalFX
trigger1 = timemod = 2,1 && time > 2 && animtime < -3
time = 1
add = 0,0,0 

[State 1000, 4]
type = destroyself
trigger1 = Animtime = 0
;------------------------------------
; 8 Maiden Rush (Success)
[Statedef 1997]
type     = S
movetype = I
physics  = N
anim = 1997
ctrl = 0
velset = 0,0,0
sprpriority = 2

[State 3000]
type = projectile
trigger1 = AnimElem = 15
projanim = 10040
offset = 24,-78
projsprpriority = 4
projremovetime = 17
projedgebound = 210

[State 3000]
type = projectile
trigger1 = AnimElem = 22
projanim = 10060
offset = -4,-62
projsprpriority = 4
projremovetime = 17
projedgebound = 210

[State 3000]
type = projectile
trigger1 = AnimElem = 29 || AnimElem = 42
projanim = 10030
offset = 45,-63
projsprpriority = 4
projremovetime = 17
projedgebound = 210

[State 3000]
type = projectile
trigger1 = AnimElem = 35
projanim = 10040
offset = 41,-71
projsprpriority = 4
projremovetime = 17
projedgebound = 210

[State 5210, 1] 
type = PalFX
trigger1 = gametime%2 = 0
time = 1
add = 64,64,64 

[State 260, 3] 
type = Afterimage
trigger1 = Time = 0
time = 0

[State 1203, 1]
type = Width
trigger1 = 1
edge = 50,0
        
[State 5210, 1] 
type = PalFX
trigger1 = Time = 0
time = 1
add = 0,0,0 

[State 1300, 5]
type = targetbind
trigger1 = numtarget(1994) > 0
trigger1 = time < 7
pos = 0,0
id = 1994

[State 1300, 5]
type = targetbind
trigger1 = numtarget(1994) > 0
trigger1 = time >= 7
trigger1 = time < 31
pos = 48,0
id = 1994

[State 1300, 5]
type = posfreeze
trigger1 = time < 31

[State 3000]
type = projectile
trigger1 = AnimElem = 5,1
projanim = 10022
offset = 40,-71
projsprpriority = 3
projremovetime = 28
projedgebound = 210

[State 3000]
type = projectile
trigger1 = AnimElem = 8,1
projanim = 10022
offset = 60,-50
projsprpriority = 3
projremovetime = 28
projedgebound = 210

[State 3000]
type = projectile
trigger1 = AnimElem = 56
projanim = 10080
offset = 45,-75
projsprpriority = 7
projremovetime = 35
projedgebound = 210

[State 1000, 4]
type = Helper
trigger1 = AnimElem = 9,1
name = "e"
pos = 44,-69  
stateno = 10050
ownpal = 1

[State 1000, 4]
type = Helper
trigger1 = AnimElem = 15,1
name = "e"
pos = 65,-78  
stateno = 9997
ownpal = 1

[State 1000, 4]
type = Helper
trigger1 = AnimElem = 16,1
name = "e"
pos = 48,-62
stateno = 9997
facing = -1
ownpal = 1

[State 1000, 4]
type = Helper
trigger1 = AnimElem = 25,1
name = "e"
pos = 42,-60
stateno = 9997
facing = -1
ownpal = 1

[State 1000, 4]
type = Helper
trigger1 = AnimElem = 30,1
name = "e"
pos = 52,-34
stateno = 10070
ownpal = 1

[State 1000, 4]
type = Helper
trigger1 = AnimElem = 31,1 || animelem = 36,1 || animelem = 43,1
name = "e"
pos = 45,-58
stateno = 9997
facing = -1
ownpal = 1

[State 1000, 4]
type = Helper
trigger1 = AnimElem = 36,2
name = "e"
pos = 90,-73
stateno = 9997
ownpal = 1

[State 1000, 4]
type = Helper
trigger1 = AnimElem = 4,1
name = "e"
pos = 70,-100
stateno = 10090
ownpal = 1

[State 1000, 4]
type = Helper
trigger1 = AnimElem = 21
name = "e"
pos = 90,-100
stateno = 10090
ownpal = 1

[State 5210, 1] 
type = varrandom
Trigger1 = animelem = 1
Trigger2 = animelem = 7
Trigger3 = animelem = 24
Trigger4 = animelem = 29
Trigger5 = animelem = 35
Trigger6 = animelem = 40
v = 18
range = 2

[State 5210, 1] 
type = varrandom
Trigger1 = animelem = 14
v = 18
range = 11

[State 912, 5]
type = PlaySnd
trigger1 = var(18) >= 0 && var(18) < 3
Trigger1 = animelem = 15
value = s1,4

[State 912, 5]
type = PlaySnd
trigger1 = var(18) > 2 && var(18) < 6
Trigger1 = animelem = 15
value = s4,4

[State 912, 5]
type = PlaySnd
trigger1 = var(18) > 5 && var(18) < 9
Trigger1 = animelem = 15
value = s4,5

[State 912, 5]
type = PlaySnd
trigger1 = var(18) = 9
Trigger1 = animelem = 15
value = s1,9

[State 912, 5]
type = PlaySnd
trigger1 = var(18) = 10
Trigger1 = animelem = 15
value = s4,7

[State 912, 5]
type = PlaySnd
trigger1 = var(18) = 11
Trigger1 = animelem = 15
value = s5,6

[State 912, 5]
type = PlaySnd
triggerall = var(18) = 0
Trigger1 = animelem = 4
Trigger2 = animelem = 8
value = s1,4

[State 912, 5]
type = PlaySnd
triggerall = var(18) = 1
Trigger1 = animelem = 4
Trigger2 = animelem = 8
value = s4,4

[State 912, 5]
type = PlaySnd
triggerall = var(18) = 2
Trigger1 = animelem = 4
Trigger2 = animelem = 8
value = s4,5

[State 912, 5]
type = PlaySnd
triggerall = var(18) = 0
Trigger1 = animelem = 25
Trigger2 = animelem = 30
Trigger3 = animelem = 36
Trigger4 = animelem = 41
value = s1,9

[State 912, 5]
type = PlaySnd
triggerall = var(18) = 1
Trigger1 = animelem = 25
Trigger2 = animelem = 30
Trigger3 = animelem = 36
Trigger4 = animelem = 41
value = s4,7

[State 912, 5]
type = PlaySnd
triggerall = var(18) = 2
Trigger1 = animelem = 25
Trigger2 = animelem = 30
Trigger3 = animelem = 36
Trigger4 = animelem = 41
value = s5,6

[State 1531, 5]
type = varset
trigger1 = numtarget(1994) > 0
trigger1 = AnimElem = 55
var(5) = target(1994),life

[State 1531, 5]
type = targetlifeadd
trigger1 = numtarget(1994) > 0
trigger1 = AnimElem = 56
value = -410
id = 1994

[State 1531, 5]
type = targetlifeadd
trigger1 = numtarget(1994) > 0
trigger1 = target(1994),life > 0
trigger1 = AnimElem = 56,1 && target(1994),const(data.defence) = 100
value = 380
id = 1994

[State 1531, 5]
type = targetlifeadd
trigger1 = numtarget(1994) > 0
trigger1 = target(1994),life <= 0
trigger1 = AnimElem = 56,1 && target(1994),const(data.defence) = 100
value = var(5) - 30
id = 1994

[State 1531, 5]
type = targetlifeadd
trigger1 = numtarget(1994) > 0
trigger1 = target(1994),const(data.defence) = 100
trigger1 = Animtime > -21 && animtime < 0
value = -19
id = 1994

[State 1531, 5]
type = targetpoweradd
triggerall = numtarget(1994) > 0
trigger1 = AnimElem = 5
trigger2 = AnimElem = 10
trigger3 = AnimElem = 17
trigger4 = AnimElem = 25
trigger5 = AnimElem = 32
trigger6 = AnimElem = 37
trigger7 = AnimElem = 44
value = 21
id = 1994

[State 1000, 4]
type = Helper
trigger1 = AnimElem = 56 && random < 500
name = "e"
pos = 56,-84
stateno = 9998
facing = -1
ownpal = 1

[State 1531, 5]
type = PosSet
trigger1 = time = 0
y = 0

[State 210, 1]
type = AfterImageTime
trigger1 = animtime = 0
Time = 0

[State 5100, 10]
type = PlaySnd
trigger1 = animelem = 48,1
value = s5,5

[State 5100, 10]
type = PlaySnd
trigger1 = animelem = 56
value = s4,8

[State 191, 4]
type = EnvShake
Trigger1 = AnimElem = 56
persistent = 0
time = 5
ampl = -5
freq = 255
phase = 10
ignorehitpause = 1

[State 123, 2]
type = varset
trigger1 = time = 0
var(4) = 0
[State 123, 2]
type = varset
trigger1 = numtarget(1994) > 0
trigger1 = animelem = 47 && target(1994),const(size.head.pos.y)>-70 && target(1994),const(size.head.pos.y)<0
var(4) = 1

[State 1300, 5]
type = targetbind
trigger1 = numtarget(1994) > 0
trigger1 = animelem = 48
pos = 33+ifelse((target(1994),const(size.head.pos.x))<0,(target(1994),const(size.head.pos.x)),0),0
id = 1994

[State 1300, 5]
type = targetbind
trigger1 = numtarget(1994) > 0
trigger1 = animelem = 49
pos = 33+ifelse(var(4)=1,(target(1994),const(size.head.pos.x)),0)+ifelse((target(1994),const(size.head.pos.x))<0,(target(1994),const(size.head.pos.x)),0),0+ifelse(var(4)=1,-70-(target(1994),const(size.head.pos.y)),0)
id = 1994

[State 1300, 5]
type = targetbind
triggerall = numtarget(1994) > 0
triggerall = animelem = 49
trigger1 = target(1994),name = "Choi" || target(1994),name = "bao"
trigger2 = target(1994),name = "dark chun-li r"
trigger3 = target(1994),name = "Asahi_Sakurai By Toshi"
pos = 30,-20
id = 1994

[State 1300, 5]
type = targetbind
trigger1 = numtarget(1994) > 0
trigger1 = animelem = 49
trigger1 = target(1994),name = "Kurenai by Inverse v1.0" || target(1994),name = "kurenai"
pos = 20,-10
id = 1994

[State 1300, 5]
type = targetbind
trigger1 = numtarget(1994) > 0
trigger1 = animelem = 49
trigger1 = target(1994),name = "spider-man"
pos = 20,-30
id = 1994
[State 1300, 5]
type = targetbind
trigger1 = numtarget(1994) > 0
trigger1 = animelem = 49
trigger1 = target(1994),name = "ryuzito de souza" || target(1994),name = "pocket ryu"
pos = 30,-50
id = 1994

[State 100, 5]
type = ChangeState
triggerall = time = 1
trigger1 = numtarget(1994) = 0
trigger2 = numtarget(1994) > 0
trigger2 = target(1994),stateno != 1995
value = 2004

[State 8160, 14]
type = Explod
trigger1 = Time > 165
trigger1 = Time < 170
trigger1 = NumExplod(3100) < 5
trigger1 = Random < 700
anim = 3100
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 8160, 14]
type = Explod
trigger1 = Time > 165
trigger1 = Time < 170
trigger1 = NumExplod(3100) < 5
trigger1 = Random < 700
anim = 3110
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 8160, 15]
type = Explod
trigger1 = Time > 166
trigger1 = Time < 170
trigger1 = NumExplod(3100) < 5
trigger1 = Random < 500
anim = 3120
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 8160, 16]
type = Explod
trigger1 = Time > 166
trigger1 = Time < 170
trigger1 = NumExplod(3100) < 5
trigger1 = Random < 500
anim = 3130
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 8160, 17]
type = Explod
trigger1 = Time > 167
trigger1 = NumExplod(3100) < 5
trigger1 = Random < 500
anim = 3140
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 8160, 18]
type = Explod
trigger1 = Time > 167
trigger1 = NumExplod(3100) < 5
trigger1 = Random < 500
anim = 3150
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 100, 5]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;-----------------------------------
; 8 Maiden Rush (Success)
[Statedef 2002]
type     = S
movetype = I
physics  = N
anim = 2002
ctrl = 0
velset = 0,0,0
sprpriority = 2

[State 260, 3] 
type = Afterimage
trigger1 = Time = 0
time = 0

[State 260, 3] 
type = varset
trigger1 = Time = 0
var(18) = 0

[State 260, 3] 
type = varset
trigger1 = Time > 0
trigger1 = command = "316"
var(18) = 1

[State 1203, 1]
type = Width
trigger1 = 1
edge = 50,0
        
[State 5210, 1] 
type = PalFX
trigger1 = Time = 0
time = 1
add = 0,0,0

[State 1300, 5]
type = targetbind
trigger1 = time < 11
pos = 0,0
id = 2010

[State 1300, 5]
type = targetbind
trigger1 = time >= 11
trigger1 = time < 31
pos = 48,0
id = 2010

[State 1300, 5]
type = posfreeze
trigger1 = time < 31

[State 3000]
type = projectile
trigger1 = AnimElem = 17,1
trigger2 = AnimElem = 26,1
trigger3 = AnimElem = 32,1
trigger4 = AnimElem = 37,1
trigger5 = AnimElem = 44,1
projanim = 904
offset = 65,-5
projsprpriority = 2
projremovetime = 7
projedgebound = 210

[State 3000]
type = projectile
trigger1 = AnimElem = 17,1
trigger2 = AnimElem = 26,1
trigger3 = AnimElem = 32,1
trigger4 = AnimElem = 37,1
trigger5 = AnimElem = 44,1
projanim = 10017
offset = 51,-59
projsprpriority = 2
projremovetime = 10
projedgebound = 210

[State 3000]
type = projectile
trigger1 = AnimElem = 6,1
projanim = 9249
offset = 45,-23
projsprpriority = 2
projremovetime = 12
projedgebound = 210

[State 3000]
type = projectile
trigger1 = AnimElem = 9,1
projanim = 9249
offset = 60,-18
projsprpriority = 2
projremovetime = 12
projedgebound = 210

[State 900, 1]
type = EnvColor
trigger1 = AnimElem = 1
trigger2 = AnimElem = 7
trigger3 = AnimElem = 10
trigger4 = AnimElem = 18
trigger5 = AnimElem = 27
trigger6 = AnimElem = 33
trigger7 = AnimElem = 38
trigger8 = AnimElem = 45
value = 255, 255, 255
time = 1
under = 1

[State 912, 5];2k
type = PlaySnd
Trigger1 = animelem = 16
value = s7,6

[State 912, 5];2k1
type = PlaySnd
Trigger1 = animelem = 13
value = s6,4

[State 912, 5];svc
type = PlaySnd
Trigger1 = animelem = 22
value = s26,3

[State 1405, 0]
type = varrandom
trigger1 = AnimElem = 5
trigger2 = AnimElem = 8
trigger3 = AnimElem = 16
trigger4 = AnimElem = 25
trigger5 = AnimElem = 31
trigger6 = AnimElem = 36
trigger7 = AnimElem = 43
v = 5
range = 1

[State 912, 5]
type = PlaySnd
triggerall = var(5) != 1
trigger1 = AnimElem = 6,1
trigger2 = AnimElem = 9,1
trigger3 = AnimElem = 17,1
trigger4 = AnimElem = 26,1
trigger5 = AnimElem = 32,1
trigger6 = AnimElem = 37,1
trigger7 = AnimElem = 44,1
value = s3,4

[State 912, 5]
type = PlaySnd
triggerall = var(5) = 1
trigger1 = AnimElem = 6,1
trigger2 = AnimElem = 9,1
trigger3 = AnimElem = 17,1
trigger4 = AnimElem = 26,1
trigger5 = AnimElem = 32,1
trigger6 = AnimElem = 37,1
trigger7 = AnimElem = 44,1
value = s7,4

[State 1531, 5]
type = HitAdd
trigger1 = AnimElem = 6
trigger2 = AnimElem = 9
trigger3 = AnimElem = 17
trigger4 = AnimElem = 26
trigger5 = AnimElem = 32
trigger6 = AnimElem = 37
trigger7 = AnimElem = 44
value = 1

[State 1531, 5]
type = targetlifeadd
trigger1 = AnimElem = 6,1
trigger2 = AnimElem = 9,1
trigger3 = AnimElem = 17,1
trigger4 = AnimElem = 26,1
trigger5 = AnimElem = 32,1
trigger6 = AnimElem = 37,1
trigger7 = AnimElem = 44,1
value = -21
kill = 0
id = 2010

[State 1531, 5]
type = targetpoweradd
trigger1 = AnimElem = 6,1
trigger2 = AnimElem = 9,1
trigger3 = AnimElem = 17,1
trigger4 = AnimElem = 26,1
trigger5 = AnimElem = 32,1
trigger6 = AnimElem = 37,1
trigger7 = AnimElem = 44,1
value = 21
id = 2010

[State 230, 0]
type = varrandom
trigger1 = time = 31 || time = 49 || time = 61 || time = 71 || time = 85
v = 12
range = 3

[State 1300, 5]
type = projectile
triggerall = random < 500
trigger1 = time = 35+var(12) || time = 53+var(12) || time = 65+var(12)
trigger2 = time = 75+var(12) || time = 89+var(12)
projanim = 10117+ifelse(random<500,1,0)
offset = 51,-59
velocity = 1,-8
ignorehitpause = 1
projsprpriority = 2
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
triggerall = random < 500
trigger1 = time = 35+var(12) || time = 53+var(12) || time = 65+var(12)
trigger2 = time = 75+var(12) || time = 89+var(12)
projanim = 10117+ifelse(random<500,1,0)
offset = 51,-59
velocity = 2,-7.5
ignorehitpause = 1
projsprpriority = 2
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
triggerall = random < 500
trigger1 = time = 35+var(12) || time = 53+var(12) || time = 65+var(12)
trigger2 = time = 75+var(12) || time = 89+var(12)
projanim = 10117+ifelse(random<500,1,0)
offset = 51,-59
velocity = 3,-7
ignorehitpause = 1
projsprpriority = 2
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
triggerall = random < 500
trigger1 = time = 35+var(12) || time = 53+var(12) || time = 65+var(12)
trigger2 = time = 75+var(12) || time = 89+var(12)
projanim = 10117+ifelse(random<500,1,0)
offset = 51,-59
velocity = 4,-6.5
ignorehitpause = 1
projsprpriority = 2
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
triggerall = random < 500
trigger1 = time = 35+var(12) || time = 53+var(12) || time = 65+var(12)
trigger2 = time = 75+var(12) || time = 89+var(12)
projanim = 10117+ifelse(random<500,1,0)
offset = 51,-59
velocity = 5,-6
ignorehitpause = 1
projsprpriority = 2
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
triggerall = random < 500
trigger1 = time = 35+var(12) || time = 53+var(12) || time = 65+var(12)
trigger2 = time = 75+var(12) || time = 89+var(12)
projanim = 10117+ifelse(random<500,1,0)
offset = 51,-59
velocity = 6,-5
ignorehitpause = 1
projsprpriority = 2
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
triggerall = random < 500
trigger1 = time = 35+var(12) || time = 53+var(12) || time = 65+var(12)
trigger2 = time = 75+var(12) || time = 89+var(12)
projanim = 10117+ifelse(random<500,1,0)
offset = 51,-59
velocity = 7,-4
ignorehitpause = 1
projsprpriority = 2
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
triggerall = random < 500
trigger1 = time = 35+var(12) || time = 53+var(12) || time = 65+var(12)
trigger2 = time = 75+var(12) || time = 89+var(12)
projanim = 10117+ifelse(random<500,1,0)
offset = 51,-59
velocity = 8,-3
ignorehitpause = 1
projsprpriority = 2
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
triggerall = random < 500
trigger1 = time = 35+var(12) || time = 53+var(12) || time = 65+var(12)
trigger2 = time = 75+var(12) || time = 89+var(12)
projanim = 10117+ifelse(random<500,1,0)
offset = 51,-59
velocity = 8,-1.5
ignorehitpause = 1
projsprpriority = 2
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
triggerall = random < 500
trigger1 = time = 35+var(12) || time = 53+var(12) || time = 65+var(12)
trigger2 = time = 75+var(12) || time = 89+var(12)
projanim = 10117+ifelse(random<500,1,0)
offset = 51,-59
velocity = 8.5,-1
ignorehitpause = 1
projsprpriority = 2
projremovetime = 6
projedgebound = 210

[State 1531, 5]
type = PosSet
trigger1 = time = 0
y = 0

[State 210, 1]
type = AfterImageTime
trigger1 = animtime = 0
Time = 0

[State 100, 5]
type = ChangeState
triggerall = time = 1
trigger1 = numtarget(2010) > 0
trigger1 = target(2010),stateno != 9007
trigger2 = numtarget(2010) = 0
value = 2004

[State 100, 5]
type = ChangeState
trigger1 = animtime = 0
value = 2019
ctrl = 1

; 8 Maiden Rush (bite)
[Statedef 2019]
type     = S
movetype = I
physics  = N
anim = 2019
ctrl = 0
velset = 0,0,0

[State 1000, 4]
type = Helper
trigger1 = animelem = 7
name = "n2"
pos = 30,0
stateno = 2021

[State 123, 2]
type = varset
trigger1 = time = 0
var(4) = 0
[State 123, 2]
type = varset
trigger1 = numtarget(2010) > 0
trigger1 = time = 0 && target(2010),const(size.head.pos.y)>-70 && target(2010),const(size.head.pos.y)<0
var(4) = 1

[State 260, 3] 
type = varset
trigger1 = command = "316"
var(18) = 1

[State 260, 3] 
type = changestate
trigger1 = power >= 1000 + var(20)*100
trigger1 = var(55) = 0 && var(18) = 1
trigger1 = var(14) < 1 && time > 59
trigger1 = var(16) < 1
value = 2020

[State 260, 3] 
type = changestate
triggerall = power >= 1000 + var(20)*100
triggerall = var(58) > 2 || var(58) < 0
triggerall = var(14) < 1 && var(55) = 1
triggerall = var(16) < 1
trigger1 = time = 60 && frontedgedist > 72
trigger2 = time = 60 && frontedgedist < 73 && random < 500
trigger3 = animtime = -1 && frontedgedist < 101 && target(2010),life > 0
value = 2020

[State 1300, 5]
type = targetbind
trigger1 = time < 11
pos = 33+ifelse((target(2010),const(size.head.pos.x))<0,(target(2010),const(size.head.pos.x)),0),0
id = 2010
[State 1300, 5]
type = targetbind
trigger1 = animelem = 2
pos = 33+ifelse(var(4)=1,(target(2010),const(size.head.pos.x)),0)+ifelse((target(2010),const(size.head.pos.x))<0,(target(2010),const(size.head.pos.x)),0),0+ifelse(var(4)=1,-70-(target(2010),const(size.head.pos.y)),0)
id = 2010

[State 1300, 5]
type = targetbind
triggerall = animelem = 2
trigger1 = target(2010),name = "Choi" || target(2010),name = "bao"
trigger2 = target(2010),name = "Dark Chun-Li R"
trigger3 = target(2010),name = "Asahi_Sakurai By Toshi"
pos = 30,-20
id = 2010

[State 1300, 5]
type = targetbind
trigger1 = animelem = 2
trigger1 = target(2010),name = "Kurenai by Inverse v1.0" || target(2010),name = "kurenai"
pos = 20,-10
id = 2010

[State 1300, 5]
type = targetbind
trigger1 = animelem = 2
trigger1 = target(2010),name = "spider-man"
pos = 20,-30
id = 2010
[State 1300, 5]
type = targetbind
trigger1 = animelem = 2
trigger1 = target(2010),name = "ryuzito de souza" || target(2010),name = "pocket ryu"
pos = 30,-50
id = 2010

[State 912, 5]
type = PlaySnd
Trigger1 = animelem = 2
value = s7,3

[State 912, 5]
type = PlaySnd
Trigger1 = animelem = 7
value = s7,7
channel = 1
[State 912, 5]
type = PlaySnd
Trigger1 = animelem = 6,10
value = s9,11
channel = 4
[State 912, 5];svc
type = PlaySnd
Trigger1 = animelem = 6,10
value = s26,9
channel = 10

[State 900, 1]
type = EnvColor
trigger1 = animelem = 7
value = 255, 255, 255
under = 1
time = 1

[State 3000]
type = projectile
trigger1 = AnimElem = 2
projanim = 926
offset = 20,0
projsprpriority = 2
projremovetime = 28
projedgebound = 210

[State 912, 5]    ;Äç
type = PlaySnd
Trigger1 = animelem = 7
value = s7,2

[State 1531, 5]
type = targetlifeadd
trigger1 = AnimElem = 7
value = -123
id = 2010

[State 191, 4]
type = EnvShake
Trigger1 = AnimElem = 7
persistent = 0
time = 20
ampl = -5
freq = 255
phase = 10
ignorehitpause = 1

[State 8160, 13]
type = Explod
trigger1 = animelem = 7
anim = 3100
ID = 8150
sprpriority = 5
pos = 40,-70
random = 10,10
ignorehitpause = 1
ownpal = 1
supermove = 1

[State 8160, 13]          
type = Explod
trigger1 = Time > 55
trigger1 = Time < 70
trigger1 = NumExplod(8150) < 5
trigger1 = Random < 800
anim = 3100
ID = 8150
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1
supermove = 1

[State 8160, 14]
type = Explod
trigger1 = Time > 55
trigger1 = Time < 70
trigger1 = NumExplod(3100) < 5
trigger1 = Random < 750
anim = 3110
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1
supermove = 1

[State 8160, 15]
type = Explod
trigger1 = Time > 55
trigger1 = Time < 70
trigger1 = NumExplod(3100) < 5
trigger1 = Random < 700
anim = 3120
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1
supermove = 1

[State 8160, 16]
type = Explod
trigger1 = Time > 55
trigger1 = Time < 70
trigger1 = NumExplod(3100) < 5
trigger1 = Random < 650
anim = 3130
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1
supermove = 1

[State 8160, 17]
type = Explod
trigger1 = Time > 55
trigger1 = NumExplod(3100) < 5
trigger1 = Random < 600
anim = 3140
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1
supermove = 1

[State 8160, 18]
type = Explod
trigger1 = Time > 55
trigger1 = NumExplod(3100) < 5
trigger1 = Random < 550
anim = 3150
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1
supermove = 1

[State 1531, 5]
type = PosSet
trigger1 = time = 0
y = 0

[State 210, 1]
type = AfterImageTime
trigger1 = animtime = 0
Time = 0

[State 100, 5]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

[Statedef 2021];helper
type     = S
movetype = I
physics  = N
anim = 12342
ctrl = 0
velset = 5.2,-7.5

[State 3000]
type = varset
trigger1 = parent,stateno != 2020 && sysvar(1) < 5
trigger2 = time = 0
sysvar(1) = 2
[State 3000]
type = varadd
trigger1 = parent,stateno = 2020
sysvar(1) = 1

[State 3000]
type = velset
trigger1 = parent,movehit > 0
persistent = 0
x = 0
y = 0

[State 3000]
type = posadd
trigger1 = time = 0
x = 10

[State 100, 5]
type = posset
trigger1 = parent,movehit > 0 && pos y > -20
y = -20
persistent = 0

[State 100, 5]
type = posadd
trigger1 = parent,stateno = 2020 && parent,numtarget(2010) > 0
trigger1 = parent,animelem = 14 || parent,animelem = 15
y = -25

[State 100, 5]
type = posadd
trigger1 = parent,stateno = 2020 && parent,numtarget(2010) > 0
trigger1 = parent,animelem = 14,6 || parent,animelem = 15,6
x = 16
y = -8

[State 100, 5]
type = posadd
trigger1 = parent,stateno = 2020 && parent,numtarget(2010) > 0
trigger1 = parent,animelem = 15,8 || parent,animelem = 15,10
x = 8
y = -8

[State 100, 5]
type = velset
trigger1 = parent,time = 131
y = -10

[State 100, 5]
type = velset
trigger1 = parent,time >= 131 && pos y >= 0
y = 0

[State 100, 5]
type = veladd
trigger1 = parent,time >= 131 && pos y < 0
y = 0.5

[State 3000]
type = explod
trigger1 = parent,movehit > 0
anim = 933
postype = p2
facing = -1
pos = -10,13
sprpriority = 7
ownpal = 1
persistent = 0

[State 3000]
type = explod
trigger1 = parent,movehit > 0
anim = 10114
postype = p2
facing = -1
pos = 4,-41
sprpriority = 6
ownpal = 1
persistent = 0

[State 1300, 5]
type = projectile
trigger1 = parent,movehit > 0 && p2movetype = H && sysvar(1) = 14+parent,var(12) && random < 500
projanim = 10117+ifelse(random<500,1,0)
postype = p2
offset = -7,-40
velocity = 1,-8
ignorehitpause = 1
projsprpriority = 7
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = parent,movehit > 0 && p2movetype = H && sysvar(1) = 14+parent,var(12) && random < 500
projanim = 10117+ifelse(random<500,1,0)
postype = p2
offset = -7,-40
velocity = 2,-7.5
ignorehitpause = 1
projsprpriority = 7
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = parent,movehit > 0 && p2movetype = H && sysvar(1) = 14+parent,var(12) && random < 500
projanim = 10117+ifelse(random<500,1,0)
postype = p2
offset = -7,-40
velocity = 3,-7
ignorehitpause = 1
projsprpriority = 7
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = parent,movehit > 0 && p2movetype = H && sysvar(1) = 14+parent,var(12) && random < 500
projanim = 10117+ifelse(random<500,1,0)
postype = p2
offset = -7,-40
velocity = 4,-6.5
ignorehitpause = 1
projsprpriority = 7
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = parent,movehit > 0 && p2movetype = H && sysvar(1) = 14+parent,var(12) && random < 500
projanim = 10117+ifelse(random<500,1,0)
postype = p2
offset = -7,-40
velocity = 5,-6
ignorehitpause = 1
projsprpriority = 7
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = parent,movehit > 0 && p2movetype = H && sysvar(1) = 14+parent,var(12) && random < 500
projanim = 10117+ifelse(random<500,1,0)
postype = p2
offset = -7,-40
velocity = 6,-5
ignorehitpause = 1
projsprpriority = 7
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = parent,movehit > 0 && p2movetype = H && sysvar(1) = 14+parent,var(12) && random < 500
projanim = 10117+ifelse(random<500,1,0)
postype = p2
offset = -7,-40
velocity = 7,-4
ignorehitpause = 1
projsprpriority = 7
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = parent,movehit > 0 && p2movetype = H && sysvar(1) = 14+parent,var(12) && random < 500
projanim = 10117+ifelse(random<500,1,0)
postype = p2
offset = -7,-40
velocity = 8,-3
ignorehitpause = 1
projsprpriority = 7
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = parent,movehit > 0 && p2movetype = H && sysvar(1) = 14+parent,var(12) && random < 500
projanim = 10117+ifelse(random<500,1,0)
postype = p2
offset = -7,-40
velocity = 8,-1.5
ignorehitpause = 1
projsprpriority = 7
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = parent,movehit > 0 && p2movetype = H && sysvar(1) = 14+parent,var(12) && random < 500
projanim = 10117+ifelse(random<500,1,0)
postype = p2
offset = -7,-40
velocity = 8.5,-1
ignorehitpause = 1
projsprpriority = 7
projremovetime = 6
projedgebound = 210

[State 3000]
type = explod
trigger1 = parent,numtarget(2010) > 0
trigger1 = parent,animelem = 13 || parent,animelem = 14,8
anim = 934
postype = p2
facing = -1
pos = -28,8
sprpriority = 2
ownpal = 1

[State 3000]
type = explod
trigger1 = parent,numtarget(2010) > 0
trigger1 = parent,animelem = 13 || parent,animelem = 14,8
anim = 10115
postype = p2
facing = -1
pos = -13,-46
sprpriority = 1
ownpal = 1

[State 1300, 5]
type = projectile
trigger1 = parent,numtarget(2010) > 0 && p2movetype = H && random < 500
trigger1 = sysvar(1) = 50 || sysvar(1) = 60
projanim = 10117+ifelse(random<500,1,0)
postype = p2
offset = 12,-49
remvelocity = 1,-8
ignorehitpause = 1
projsprpriority = 7
projremovetime = 3+parent,var(12)
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = parent,numtarget(2010) > 0 && p2movetype = H && random < 500
trigger1 = sysvar(1) = 50 || sysvar(1) = 60
projanim = 12342
projremanim = 10117+ifelse(random<500,1,0)
postype = p2
offset = 12,-49
remvelocity = 2,-7.5
ignorehitpause = 1
projsprpriority = 7
projremovetime = 3+parent,var(12)
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = parent,numtarget(2010) > 0 && p2movetype = H && random < 500
trigger1 = sysvar(1) = 50 || sysvar(1) = 60
projanim = 12342
projremanim = 10117+ifelse(random<500,1,0)
postype = p2
offset = 12,-49
remvelocity = 3,-7
ignorehitpause = 1
projsprpriority = 7
projremovetime = 3+parent,var(12)
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = parent,numtarget(2010) > 0 && p2movetype = H && random < 500
trigger1 = sysvar(1) = 50 || sysvar(1) = 60
projanim = 12342
projremanim = 10117+ifelse(random<500,1,0)
postype = p2
offset = 12,-49
remvelocity = 4,-6.5
ignorehitpause = 1
projsprpriority = 7
projremovetime = 3+parent,var(12)
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = parent,numtarget(2010) > 0 && p2movetype = H && random < 500
trigger1 = sysvar(1) = 50 || sysvar(1) = 60
projanim = 12342
projremanim = 10117+ifelse(random<500,1,0)
postype = p2
offset = 12,-49
remvelocity = 5,-6
ignorehitpause = 1
projsprpriority = 7
projremovetime = 3+parent,var(12)
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = parent,numtarget(2010) > 0 && p2movetype = H && random < 500
trigger1 = sysvar(1) = 50 || sysvar(1) = 60
projanim = 12342
projremanim = 10117+ifelse(random<500,1,0)
postype = p2
offset = 12,-49
remvelocity = 6,-5
ignorehitpause = 1
projsprpriority = 7
projremovetime = 3+parent,var(12)
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = parent,numtarget(2010) > 0 && p2movetype = H && random < 500
trigger1 = sysvar(1) = 50 || sysvar(1) = 60
projanim = 12342
projremanim = 10117+ifelse(random<500,1,0)
postype = p2
offset = 12,-49
remvelocity = 7,-4
ignorehitpause = 1
projsprpriority = 7
projremovetime = 3+parent,var(12)
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = parent,numtarget(2010) > 0 && p2movetype = H && random < 500
trigger1 = sysvar(1) = 50 || sysvar(1) = 60
projanim = 12342
projremanim = 10117+ifelse(random<500,1,0)
postype = p2
offset = 12,-49
remvelocity = 8,-3
ignorehitpause = 1
projsprpriority = 7
projremovetime = 3+parent,var(12)
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = parent,numtarget(2010) > 0 && p2movetype = H && random < 500
trigger1 = sysvar(1) = 50 || sysvar(1) = 60
projanim = 12342
projremanim = 10117+ifelse(random<500,1,0)
postype = p2
offset = 12,-49
remvelocity = 8,-1.5
ignorehitpause = 1
projsprpriority = 7
projremovetime = 3+parent,var(12)
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = parent,numtarget(2010) > 0 && p2movetype = H && random < 500
trigger1 = sysvar(1) = 50 || sysvar(1) = 60
projanim = 12342
projremanim = 10117+ifelse(random<500,1,0)
postype = p2
offset = 12,-49
remvelocity = 8.5,-1
ignorehitpause = 1
projsprpriority = 7
projremovetime = 3+parent,var(12)
projedgebound = 210

[State 3000]
type = explod
trigger1 = parent,numtarget(2010) > 0
trigger1 = parent,animelem = 14,2 || parent,animelem = 15,2
anim = 934
postype = p2
facing = -1
pos = -28,-2
sprpriority = 2
ownpal = 1

[State 3000]
type = explod
trigger1 = parent,numtarget(2010) > 0
trigger1 = parent,animelem = 14,2 || parent,animelem = 15,2
anim = 10115
postype = p2
facing = -1
pos = -13,-56
sprpriority = 1
ownpal = 1

[State 1300, 5]
type = projectile
trigger1 = parent,numtarget(2010) > 0 && p2movetype = H && random < 500
trigger1 = sysvar(1) = 54 || sysvar(1) = 66
projanim = 12342
projremanim = 10117+ifelse(random<500,1,0)
postype = p2
offset = 12,-59
remvelocity = 1,-8
ignorehitpause = 1
projsprpriority = 7
projremovetime = 3+parent,var(12)
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = parent,numtarget(2010) > 0 && p2movetype = H && random < 500
trigger1 = sysvar(1) = 54 || sysvar(1) = 66
projanim = 12342
projremanim = 10117+ifelse(random<500,1,0)
postype = p2
offset = 12,-59
remvelocity = 2,-7.5
ignorehitpause = 1
projsprpriority = 7
projremovetime = 3+parent,var(12)
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = parent,numtarget(2010) > 0 && p2movetype = H && random < 500
trigger1 = sysvar(1) = 54 || sysvar(1) = 66
projanim = 12342
projremanim = 10117+ifelse(random<500,1,0)
postype = p2
offset = 12,-59
remvelocity = 3,-7
ignorehitpause = 1
projsprpriority = 7
projremovetime = 3+parent,var(12)
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = parent,numtarget(2010) > 0 && p2movetype = H && random < 500
trigger1 = sysvar(1) = 54 || sysvar(1) = 66
projanim = 12342
projremanim = 10117+ifelse(random<500,1,0)
postype = p2
offset = 12,-59
remvelocity = 4,-6.5
ignorehitpause = 1
projsprpriority = 7
projremovetime = 3+parent,var(12)
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = parent,numtarget(2010) > 0 && p2movetype = H && random < 500
trigger1 = sysvar(1) = 54 || sysvar(1) = 66
projanim = 12342
projremanim = 10117+ifelse(random<500,1,0)
postype = p2
offset = 12,-59
remvelocity = 5,-6
ignorehitpause = 1
projsprpriority = 7
projremovetime = 3+parent,var(12)
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = parent,numtarget(2010) > 0 && p2movetype = H && random < 500
trigger1 = sysvar(1) = 54 || sysvar(1) = 66
projanim = 12342
projremanim = 10117+ifelse(random<500,1,0)
postype = p2
offset = 12,-59
remvelocity = 6,-5
ignorehitpause = 1
projsprpriority = 7
projremovetime = 3+parent,var(12)
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = parent,numtarget(2010) > 0 && p2movetype = H && random < 500
trigger1 = sysvar(1) = 54 || sysvar(1) = 66
projanim = 12342
projremanim = 10117+ifelse(random<500,1,0)
postype = p2
offset = 12,-59
remvelocity = 7,-4
ignorehitpause = 1
projsprpriority = 7
projremovetime = 3+parent,var(12)
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = parent,numtarget(2010) > 0 && p2movetype = H && random < 500
trigger1 = sysvar(1) = 54 || sysvar(1) = 66
projanim = 12342
projremanim = 10117+ifelse(random<500,1,0)
postype = p2
offset = 12,-59
remvelocity = 8,-3
ignorehitpause = 1
projsprpriority = 7
projremovetime = 3+parent,var(12)
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = parent,numtarget(2010) > 0 && p2movetype = H && random < 500
trigger1 = sysvar(1) = 54 || sysvar(1) = 66
projanim = 12342
projremanim = 10117+ifelse(random<500,1,0)
postype = p2
offset = 12,-59
remvelocity = 8,-1.5
ignorehitpause = 1
projsprpriority = 7
projremovetime = 3+parent,var(12)
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = parent,numtarget(2010) > 0 && p2movetype = H && random < 500
trigger1 = sysvar(1) = 54 || sysvar(1) = 66
projanim = 12342
projremanim = 10117+ifelse(random<500,1,0)
postype = p2
offset = 12,-59
remvelocity = 8.5,-1
ignorehitpause = 1
projsprpriority = 7
projremovetime = 3+parent,var(12)
projedgebound = 210

[State 3000]
type = explod
trigger1 = parent,numtarget(2010) > 0
trigger1 = parent,animelem = 15,11
anim = 9247
postype = p2
pos = -15,-5
facing = -1
sprpriority = 2
ownpal = 1

[State 3000]
type = explod
trigger1 = parent,numhelper(2702) > 0
trigger1 = parent,var(18) = 1
anim = 9244
postype = p2
pos = 5,0
facing = -1
persistent = 0
sprpriority = 7
ownpal = 1

[State 8160, 13]          
type = Explod
trigger1 = parent,animelem = 15,11
trigger1 = NumExplod(3110) < 3
anim = 3100
ID = 3110
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 8160, 14]
type = Explod
trigger1 = parent,animelem = 15,11
trigger1 = NumExplod(3100) < 3
anim = 3110
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 8160, 15]
type = Explod
trigger1 = parent,animelem = 15,11
trigger1 = NumExplod(3100) < 4
anim = 3120
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 8160, 16]
type = Explod
trigger1 = parent,animelem = 15,11
trigger1 = NumExplod(3100) < 4
anim = 3130
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 8160, 17]
type = Explod
trigger1 = parent,animelem = 15,11
trigger1 = NumExplod(3100) < 4
anim = 3140
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 8160, 18]
type = Explod
trigger1 = parent,animelem = 15,11
trigger1 = NumExplod(3100) < 4
anim = 3150
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 325, 0]
type = veladd
trigger1 = parent,movehit = 0
y = 0.45

[State 1000, 4]
type = destroyself
trigger1 = parent,stateno !=2019 && parent,stateno != 2020
;-----------------------------------
[Statedef 2020];316
type    = S
movetype= A
physics = S
ctrl = 0
anim = 2021
velset = 0,0

[state 100, 5]
type = assertspecial
trigger1 = 1
flag = nojugglecheck

[State 100, 5]
type = ChangeState
trigger1 = animtime = 0
trigger2 = time = 0 && numtarget(2010) = 0
trigger3 = time = 0 && numtarget(2010) > 0
trigger3 = target(2010),life <= 0
value = 0
ctrl = 1

[State 1405, 0]
type = varrandom
trigger1 = time = 0
v = 4
range = 1

[State 230, 0]
type = varrandom
trigger1 = time = 26 || time = 75 || time = 85 || time = 79 || time = 91
v = 12
range = 3

[State 230, 0]
type = hitadd
trigger1 = time = 76 || time = 86 || time = 80 || time = 92 || time = 101
value = 1

[State 1000, 4]
type = varset
trigger1 = time = 0 || animtime = -9
var(18) = 0

[State 1000, 4]
type = stopsnd
trigger1 = time = 15
channel = 10

[State 1000, 4]
type = playsnd
trigger1 = time = 0
value = s2,6
channel = 4

[State 1000, 4]
type = playsnd
trigger1 = animelem = 9
value = s2,7
channel = 1

[State 1000, 4];svc
type = playsnd
trigger1 = movehit > 0
value = s26,7
channel = 1
ignorehitpause = 1
persistent = 0

[State 1000, 4];svc
type = playsnd
trigger1 = animelem = 18
value = s26,8
channel = 1

[State 1000, 4]
type = Helper
trigger1 = animelem = 29
name = "fin"
pos = 62,-21  
stateno = 2703
sprpriority = 4
ownpal = 1
ID = 2702

[State 9001, 2]
type = Pause
triggerall = numtarget(2010) > 0
trigger1 = time >= 131 && time <= 147
trigger2 = time >= 181 && time <= 192 && var(18) = 1
time = 1

[State 1300, 5]
type = explod
trigger1 = animelem = 20
anim = 833
pos = 0,0
id = 1311
postype = p1
sprpriority = 2
ownpal = 1

[State 191, 4]
type = EnvShake
Trigger1 = AnimElem = 1
persistent = 0
time = 0
ignorehitpause = 1

[State 1203, 5]
type = Envshake
trigger1 = movehit > 0
time = 20
freq = 255
ampl = -4
persistent = 0
ignorehitpause = 1

[State 1203, 5]
type = Envshake
trigger1 = animelem = 15,11
time = 20
freq = 255
ampl = -4
persistent = 0
ignorehitpause = 1

[State 1531, 5]
type = playsnd
trigger1 = animelem = 2
value = s1,8

[State 7800, 3]
type = sprpriority
trigger1 = animelem = 2,1
value = 6

[State 7800, 3]
type = sprpriority
trigger1 = time > 29 && time < 157
value = 1

[State 7800, 3]
type = sprpriority
trigger1 = time > 156
value = 0

[State 2100, 4]
type = Explod
trigger1 = animelem = 2,12
anim = 12000
sprpriority = 7
pos = 26,-109
supermove = 1
ownpal = 1

[State 2100, 5]
type = Explod
trigger1 = animelem = 2,2
anim = 1200
sprpriority = -1
pos = 39,-102
supermove = 1
ownpal = 1

[State 7800, 3]
type = BGPalfx
trigger1 = 1
ignorehitpause = 1
supermove = 1
time = 2
mul = 158,158,158
invertall = 1

[State 1300, 5]
type = Envcolor
trigger1 = animelem = 2
persistent = 0
ignorehitpause = 1
value = 255,255,255
time = 4
under = 1
supermove = 1

[State 1300, 5]
type = Envcolor
trigger1 = animelem = 2,4
persistent = 0
ignorehitpause = 1
value = 0,0,0
time = 24
under = 1
supermove = 1

[State 4120, 1]
type = SuperPause
trigger1 = animelem = 2
movetime = 29
p2defmul = 1
time = 29
darken = 0
anim = -1

[state 182, 1]
type = varadd
trigger1 = time = 29
var(20) = 10

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 1

[State 1000, 1]
type = varset
trigger1 = animelem = 39
var(34) = 0

[State 1000, 1]
type = posadd
trigger1 = animelem = 1
x = 20

[State 4000, 1]
type = HitDef
trigger1 = animelem = 8
attr = S,HT
damage = 0
animtype = h
sparkno = -1
sparkxy = 0-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-45
chainID = 2010
ID = 2010
hitflag = MAFD
pausetime = 0,29
getpower = 0,0
givepower = 21,21
ground.type = low
priority = 7, Hit
hitsound = -1;s(ifelse(var(4)=1,3,7)),4
p2facing = 1
fall = 1
fall.recover = 0                        
palfx.time = 1
palfx.add = 0,0,0
fall.yvelocity = -3.6

[State 1405, 0]
type = varrandom
Trigger1 = animelem = 12
Trigger2 = animelem = 14
Trigger3 = animelem = 14,6
Trigger4 = animelem = 15
Trigger5 = animelem = 15,9
v = 5
range = 1

[State 1002, 4]
type = playsnd
trigger1 = numtarget(2010) > 0 && var(5) = 1
trigger1 = animelem = 13 || animelem = 14,2 || animelem = 14,8 || animelem = 15,2 || animelem = 15,11
value = s3,4

[State 1002, 4]
type = playsnd
trigger1 = numtarget(2010) > 0 && var(5) != 1
trigger1 = animelem = 13 || animelem = 14,2 || animelem = 14,8 || animelem = 15,2 || animelem = 15,11
value = s7,4

[State 3000]
type = targetlifeadd
trigger1 = animelem = 13 || animelem = 14,2 || animelem = 14,8 || animelem = 15,2 || animelem = 15,11
value = -18
id = 2010
kill = 0

[State 3000]
type = targetpoweradd
trigger1 = animelem = 13 || animelem = 14,2 || animelem = 14,8 || animelem = 15,2
value = 21
id = 2010

[State 1002, 4]
type = Targetstate
trigger1 = movehit > 0 && numtarget(2010) > 0
value = 2025
id = 2010
ignorehitpause = 1
persistent = 0

[State 900, 1]
type = EnvColor
trigger1 = movehit > 0 && time > 38 && numtarget(2010) > 0
value = 255, 255, 255
time = 2
under = 1
persistent = 0

[State 900, 1]
type = EnvColor
trigger1 = AnimElem = 16,1
value = 255, 255, 255
time = 2
under = 1

[State 100, 5]
type = ChangeState
trigger1 = animelem = 8,6 && movehit = 0
value = 2022

[Statedef 2022];fail
type    = S
movetype= A
physics = S
ctrl = 0
anim = 2024

[State 7800, 3]
type = BGPalfx
trigger1 = animtime < -2
ignorehitpause = 1
supermove = 1
time = 2
mul = 158,158,158
invertall = 1

[State 7800, 3]
type = BGPalfx
trigger1 = animtime = -2
ignorehitpause = 1
supermove = 1
time = 1
mul = 158,158,158
invertall = 1

[State 1000, 4]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1
;-------------------------------------
[Statedef 2025]
type    = A
movetype= H
physics = N
velset = 0,0

[State 1531, 5]
type = defencemulSet
trigger1 = 1
value = 1

[State 3305, 2]
type = PalFX
trigger1 = time = 63
time = 9
add = 48,0,168
mul = 166,166,166
sinadd = 96,96,96,12
color = 0
invertall = 1

[State 100, 5]
type = posset
trigger1 = time = 28 && pos y > -15
y = -15

[State 100, 5]
type = posadd
trigger1 = time = 41 || time = 53
y = -25

[State 100, 5]
type = posadd
trigger1 = time = 47 || time = 59
x = -16
y = -8

[State 100, 5]
type = posadd
trigger1 = time = 61 || time = 63
x = -8
y = -8

[State 100, 5]
type = nothitby
trigger1 = 1
value = SCA

[State 100, 5]
type = changeanim
trigger1 = time < 28
value = anim
elem = animelemno(-1)

[State 100, 5]
type = Changeanim2
trigger1 = time = 28
value = 2025

[State 100, 5]
type = Changeanim
trigger1 = time >= 40
value = 5012
elem = 2

[State 100, 5]
type = Changestate
trigger1 = time = 64
value = 2026

[Statedef 2026];----------------
type    = A
movetype= H
physics = N
ctrl = 0
anim = 5030
sprpriority = 0

[State 1531, 5]
type = defencemulSet
trigger1 = 1
value = 1

[State 100, 5]
type = nothitby
trigger1 = time < 66
value = SCA

[State 3305, 2]
type = PalFX
trigger1 = time = 8 || time = 26 || time = 44 || time = 62
time = 9
add = 96,48,216
mul = 166,166,166
sinadd = 64,64,64,24
color = 0

[State 3305, 2]
type = PalFX
trigger1 = time = 17 || time = 35 || time = 53
time = 9
add = 48,0,168
mul = 166,166,166
sinadd = 96,96,96,12
color = 0
invertall = 1

[State 3305, 2]
type = PalFX
trigger1 = time = 71
time = 7
add = 48,0,168
mul = 166,166,166
sinadd = 96,96,96,12
color = 0
invertall = 1

[State 1531, 5]
type = changeanim
trigger1 = time < 29
value = 5030

[State 1531, 5]
type = changeanim
trigger1 = time = 29
trigger1 = selfanimexist(5062)
trigger1 = selfanimexist(5063)
value = 5030

[State 100, 5]
type = velset
trigger1 = time = 29
y = -10

[State 100, 5]
type = veladd
trigger1 = time >= 29
y = 0.5

[State 1531, 5]
type = changeanim
trigger1 = time = 29
trigger1 = selfanimexist(5052)
value = 5052

[State 1531, 5]
type = changeanim
trigger1 = time = 29
trigger1 = selfanimexist(5053)
value = 5053

[State 1531, 5]
type = changeanim
trigger1 = vel Y > 0
trigger1 = anim = 5052
trigger1 = selfanimexist(5062)
value = 5062

[State 1531, 5]
type = changeanim
trigger1 = vel Y > 0
trigger1 = anim = 5053
trigger1 = selfanimexist(5063)
value = 5063

[State 1531, 5]
type = changeanim
trigger1 = animtime = 0
trigger1 = anim = 5030
value = 5050

[State 5050, 2];Coming down anim
type = ChangeAnim
trigger1 = anim = [5050,5059]
trigger1 = Vel Y >= ifelse(anim = 5050, 1, -2)
trigger1 = SelfAnimExist(anim+10)
value = anim+10
persistent = 0

[State 1021, 5]
type = Changestate
trigger1 = selfanimexist(5102)
trigger1 = selfanimexist(5162)
trigger1 = selfanimexist(5112)
trigger1 = time > 3
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 3011

[State 3010, 12]
type = SelfState
trigger1 = time > 3
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100
;----------------------------------
; 8 Maiden Rush (fail)
[Statedef 2004]
type     = S
movetype = A
physics  = N
anim = 2004
ctrl = 0
velset = 0,0
sprpriority = 0

[State 100, 5]
type = stopsnd
trigger1 = time = 0
channel = 1

[State 100, 5]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

[Statedef 1992]
type     = S
movetype = H
physics  = N
ctrl = 0
velset = 0,0,0

[State 1531, 5]
type = defencemulSet
trigger1 = 1
value = 1

[State 1531, 5]
type = PosSet
trigger1 = time = 0
y = 0

[State 1531, 5]
type = ChangeAnim2
trigger1 = time = 0
value = 1992

[State 1531, 5]
type = statetypeset
trigger1 = anim = 1992 && animtime = 0
value = A

[state 8301, 0]
type = nothitby
trigger1 = 1
value = SCA

[State 325, 0]
type = Posfreeze
trigger1 = anim = 1992 && animtime < 0

[State 325, 0]
type = posadd
trigger1 = anim = 1992 && animtime = 0
x = -10

[State 325, 0]
type = velset
trigger1 = anim = 1992 && animtime = 0
x = -4.8
y = -8.5

[State 325, 0]
type = velset
trigger1 = time = 73 && life <= 0
x = -5.7

[State 325, 0]
type = varset
trigger1 = time = 0
sysvar(3) = 0

[State 325, 0]
type = varset
trigger1 = time >= 66 && time <= 67 && life <= 0
sysvar(3) = 1

[State 3305, 5]
type = posfreeze
trigger1 = anim != 1992 && time < 73 && time > 65 && sysvar(3) = 1

[State 3305, 6]
type = changeanim
trigger1 = anim != 1992 && time < 73 && time > 65 && sysvar(3) = 1
value = anim

[State 3305, 2]
type = PalFX
trigger1 = time = 65 || time = 83
time = 9
add = 48,0,168
mul = 166,166,166
sinadd = 96,96,96,12
color = 0
invertall = 1

[State 3305, 2]
type = PalFX
trigger1 = time = 74 || (time = 92 && sysvar(3) = 1)
time = 9
add = 96,48,216
mul = 166,166,166
sinadd = 64,64,64,24
color = 0

[State 3305, 2]
type = palfx
trigger1 = time = 92 && sysvar(3) != 1
time = 8
add = 96,48,216
mul = 166,166,166
sinadd = 64,64,64,24
color = 0

[State 3305, 2]
type = PalFX
trigger1 = time = 101 && sysvar(3) = 1
time = 5
add = 48,0,168
mul = 166,166,166
sinadd = 96,96,96,12
color = 0
invertall = 1

[State 325, 0]
type = veladd
trigger1 = anim != 1992 && sysvar(3) != 1
trigger2 = anim != 1992 && sysvar(3) = 1 && time > 72
y = 0.5

[State 325, 0]
type = changeanim
trigger1 = anim = 1992 && animtime = 0
value = 5050

[State 5050, 2];Coming down anim
type = ChangeAnim
trigger1 = anim = [5050,5059]
trigger1 = Vel Y >= ifelse(anim = 5050, 1, -2)
trigger1 = SelfAnimExist(anim+10)
value = anim+10
persistent = 0

[State 2206, 2]
type = ChangeState
triggerall = time > 58
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 6100
;----------------------------------
; Getting hit by (Bite)
[Statedef 9011]
type     = S
movetype = H
physics  = N
ctrl = 0
velset = 0,0,0

[State 1531, 5]
type = defencemulSet
trigger1 = 1
value = 1

[State 1531, 5]
type = PosSet
trigger1 = time = 0
y = 0

[State 1531, 5]
type = ChangeAnim2
trigger1 = time = 0
value = 9011

[State 1531, 5]
type = statetypeset
trigger1 = time = 57
value = A

[state 8301, 0]
type = nothitby
trigger1 = time < 57
value = SCA

[state 8301, 0]
type = nothitby
trigger1 = time > 56
value = ,AA,AP,NT,ST

[State 325, 0]
type = Posfreeze
trigger1 = time <= 56

[State 325, 0]
type = posadd
trigger1 = time = 57
x = -10

[State 325, 0]
type = velset
trigger1 = time = 57
x = -4.7
y = -7.5

[State 3305, 2]
type = PalFX
trigger1 = time = 56 || time = 74
time = 9
add = 48,0,168
mul = 166,166,166
sinadd = 96,96,96,12
color = 0
invertall = 1

[State 3305, 2]
type = PalFX
trigger1 = time = 65
time = 9
add = 96,48,216
mul = 166,166,166
sinadd = 64,64,64,24
color = 0

[State 3305, 2]
type = palfx
trigger1 = time = 83
time = 7
add = 96,48,216
mul = 166,166,166
sinadd = 64,64,64,24
color = 0

[State 325, 0]
type = veladd
trigger1 = time >= 57
y = 0.45

[State 325, 0]
type = changeanim
trigger1 = time = 57
value = 5050

[State 5050, 2];Coming down anim
type = ChangeAnim
trigger1 = anim = [5050,5059]
trigger1 = Vel Y >= ifelse(anim = 5050, 1, -2)
trigger1 = SelfAnimExist(anim+10)
value = anim+10
persistent = 0

[State 2206, 2]
type = ChangeState
triggerall = time > 58
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 6100

; 8 Maiden Rush (HIT BY)
[Statedef 9007]
type     = S
movetype = H
physics  = N
ctrl = 0
velset = 0,0

[State 1531, 5]
type = defencemulSet
trigger1 = 1
value = 1

;[State 9007, 1]
;type = posadd
;trigger1 = time = 1
;trigger1 = p2stateno != 2002
;x = -40

;[State 2406, 1]
;type = SelfState
;trigger1 = time = 1
;trigger1 = p2stateno != 2002
;value = 5000

[State 1531, 5]
type = nothitby
trigger1 = 1
value = SCA

[State 1531, 5]
type = playerpush
trigger1 = 1
value = 0

[State 1531, 5]
type = posfreeze
trigger1 = 1

[State 5210, 1] 
type = PalFX
trigger1 = Time = 0
time = 1
add = 0,0,0 

[State 1531, 5]
type = PosSet
trigger1 = time = 0
y = 0

[State 1531, 5]
type = ChangeAnim2
trigger1 = time = 0
value = 9888

[State 1531, 5]
type = ChangeAnim
trigger1 = time = 17
value = 5011

[State 1531, 5]
type = ChangeAnim
trigger1 = time = 11
value = 5001

[State 1531, 5]
type = ChangeAnim
trigger1 = time = 33 || time = 73
value = 5002

[State 1531, 5]
type = ChangeAnim
trigger1 = time = 51 || time = 63 || time = 87
value = 5012

[State 1531, 5]
type = ChangeAnim
trigger1 = anim = 5011 && animtime = 0
value = 5016

[State 1531, 5]
type = ChangeAnim
trigger1 = anim = 5001 && animtime = 0
value = 5006

[State 1531, 5]
type = ChangeAnim
trigger1 = anim = 5002 && animtime = 0
value = 5007

[State 1531, 5]
type = ChangeAnim
trigger1 = anim = 5012 && animtime = 0
value = 5017

[State 1531, 5]
type = ChangeAnim2
trigger1 = anim = 5006 && animelem = 3
trigger2 = anim = 5007 && animelem = 4
value = 9007

[State 1531, 5]
type = ChangeAnim2
trigger1 = anim = 5016 && animelem = 3
trigger2 = anim = 5017 && animelem = 5
value = 9008

[State 1531, 5]
type = ChangeState
trigger1 = time = 97
value = 9011

[Statedef 1995];-------(hit by 95)
type     = S
movetype = H
physics  = N
ctrl = 0
velset = 0,0

[State 1531, 5]
type = defencemulSet
trigger1 = 1
value = 1

[State 3305, 2]
type = PalFX
trigger1 = timemod = 18,0 && time < 91
time = 9
add = 48,0,168
mul = 166,166,166
sinadd = 96,96,96,12
color = 0
invertall = 1

[State 3305, 2]
type = PalFX
trigger1 = timemod = 18,9 && time < 91
time = 9
add = 96,48,216
mul = 166,166,166
sinadd = 64,64,64,24
color = 0

[State 3305, 2]
type = palfx
trigger1 = time = 99
time = 1
add = 96,48,216
mul = 166,166,166
sinadd = 64,64,64,24
color = 0

[State 1531, 5]
type = nothitby
trigger1 = 1
value = SCA

[State 1531, 5]
type = playerpush
trigger1 = 1
value = 0

[State 1531, 5]
type = posfreeze
trigger1 = time < 30

[State 1531, 5]
type = PosSet
trigger1 = time = 0
y = 0

[State 1531, 5]
type = ChangeAnim2
trigger1 = time = 0
value = 1995

[State 1531, 5]
type = ChangeAnim2
trigger1 = time = 7
value = 1993

[State 1531, 5]
type = ChangeAnim2
trigger1 = time = 43
value = 1993
elem = 4

[State 1531, 5]
type = ChangeAnim2
trigger1 = time = 53
value = 1995
elem = 5

[State 1531, 5]
type = ChangeAnim
trigger1 = time = 31 || time = 77 || time = 97
value = 5002

[State 1531, 5]
type = ChangeAnim
trigger1 = time = 19 || time = 63 || time = 87
value = 5012

[State 1531, 5]
type = ChangeAnim
trigger1 = anim = 5011 && animtime = 0
value = 5016

[State 1531, 5]
type = ChangeAnim
trigger1 = anim = 5001 && animtime = 0
value = 5006

[State 1531, 5]
type = ChangeAnim
trigger1 = anim = 5002 && animtime = 0
value = 5007

[State 1531, 5]
type = ChangeAnim
trigger1 = anim = 5012 && animtime = 0
value = 5017

[State 1531, 5]
type = ChangeAnim2
trigger1 = anim = 5006 && animelem = 3
trigger2 = anim = 5007 && animelem = 4
trigger3 = time = 95
value = 9007

[State 1531, 5]
type = ChangeAnim2
trigger1 = anim = 5016 && animelem = 3
trigger2 = anim = 5017 && animelem = 5
trigger3 = time = 85
value = 9008

[State 1531, 5]
type = ChangeState
trigger1 = time = 101
value = 1992
;-----------------------------------
; 8 Maiden Rush (falling lv2)
[Statedef 9009]
type    = A
movetype= H
physics = N

[State 1531, 5]
type = defencemulSet
trigger1 = 1
value = 1

[state 8301, 0]
type = nothitby
trigger1 = 1
value = SCA

[State 325, 0]
type = Posfreeze
trigger1 = time = 0

[State 325, 0]
type = posadd
trigger1 = time = 1
x = -10

[State 325, 0]
type = velset
trigger1 = time = 1
x = -4.7
y = -7.5

[State 3305, 2]
type = PalFX
trigger1 = time = 0 || time = 18
time = 9
add = 96,48,216
mul = 166,166,166
sinadd = 64,64,64,24
color = 0

[State 3305, 2]
type = PalFX
trigger1 = time = 9
time = 9
add = 48,0,168
mul = 166,166,166
sinadd = 96,96,96,12
color = 0
invertall = 1

[State 3305, 2]
type = palfx
trigger1 = time = 27
time = 7
add = 48,0,168
mul = 166,166,166
sinadd = 96,96,96,12
color = 0
invertall = 1

[State 325, 0]
type = veladd
trigger1 = time > 0
y = 0.45

[State 325, 0]
type = changeanim
trigger1 = time = 0
value = 5050

[State 5050, 2];Coming down anim
type = ChangeAnim
trigger1 = anim = [5050,5059]
trigger1 = Vel Y >= ifelse(anim = 5050, 1, -2)
trigger1 = SelfAnimExist(anim+10)
value = anim+10
persistent = 0

[State 2206, 2]
type = ChangeState
triggerall = time > 17
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 6100
;---------------------------------
; Yaotome
[Statedef 2500]
type    = S
movetype= A
physics = S
ctrl = 0
anim = 2000
facep2 = 1
velset = 0,0
sprpriority = 0

[State 1000, 4]
type = Helper
trigger1 = time = 0
name = "n2"
pos = 250,0  
stateno = 2011

[State 1000, 4]
type = Helper
trigger1 = time = 0
name = "n2"
pos = 125,0  
stateno = 2011

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 1

[state 2500, 0]
type = varadd
trigger1 = time = 28
var(20) = 20

[state 2500, 0]
type = playerpush
trigger1 = 1
value = 1

[State 182, 2]
type = NotHitBy
trigger1 = 1
value = SCA

[State 7800, 3]
type = BGPalfx
trigger1 = time >= 0
ignorehitpause = 1
supermove = 1
time = 2
mul = 158,158,158
invertall = 1

[State 1300, 5]
type = Envcolor
trigger1 = Time = 1
persistent = 0
ignorehitpause = 1
value = 255,255,255
time = 4
under = 1
supermove = 1

[State 1300, 5]
type = Envcolor
trigger1 = Time = 5
persistent = 0
ignorehitpause = 1
value = 0, 0, 0
time = 25
under = 1
supermove = 1

[State 1531, 5]
type = playsnd
trigger1 = time = 0
value = s1,8

[State 4120, 1]
type = SuperPause
trigger1 = time = 1
movetime = 28
p2defmul = 1
time = 28
darken = 0
anim = -1

[State 2100, 4]
type = Explod
trigger1 = animelem = 3,6
anim = 12001
sprpriority = 7
pos = 13,-114
supermove = 1
bindtime = -1
ownpal = 1

[State 2100, 5]
type = Explod
trigger1 = animelem = 1,3
anim = 1201
sprpriority = -1
pos = 22,-120
supermove = 1
bindtime = -1
ownpal = 1

[State 912, 5]
type = PlaySnd
Trigger1 = Time = 0
value = s7,5
channel = 1

[State 610, 4]
type = ChangeState
trigger1 = animtime = 0
value = 2501
;------------------------------------
; 8 Maiden Rush (Prepare)
[Statedef 2501]
type     = S
movetype = A
physics  = S
anim = 2001
ctrl = 0
velset = 0,0,0

[State 1000, 4]
type = Helper
trigger1 = time = 0
name = "n3"
pos = 0,0  
stateno = 2003

[State 7800, 3]
type = BGPalfx
trigger1 = time >= 0
ignorehitpause = 1
supermove = 1
time = 2
mul = 158,158,158
invertall = 1

[state 2501, 0]
type = playerpush
trigger1 = 1
value = 1

[State 182, 2]
type = NotHitBy
trigger1 = animtime < 0
value = SCA

[State 1531, 5]
type = PosFreeze
trigger1 = time >= 0

[State 100, 5]
type = ChangeState
trigger1 = animtime = 0
value = 2510
;------------------------------------
; 8 Maiden Rush (Lunge)
[Statedef 2510]
type    = S
movetype= A
physics = N
juggle  = 8
velset = 10,0
ctrl = 0
anim = 2010

[State 3000, 2]
type = width
trigger1 = 1
value = 10

[State 1405, 0]
type = varrandom
trigger1 = time = 0
v = 4
range = 1

[State 7800, 3]
type = BGPalfx
trigger1 = time >= 0
ignorehitpause = 1
supermove = 1
time = 2
mul = 158,158,158
invertall = 1

[State 3000, 2]
type = AfterImage
trigger1 = Time = 0
time = 2
length = 8
paladd = 84,60,164
TimeGap  = 1
FrameGap = 2

[State 3000, 2]
type = AfterImagetime
trigger1 = time%2 = 0
time = 2

;[State 182, 2]
;type = notHitBy
;trigger1 = time < 1
;value = SCA

;[State 182, 2]
;type = HitBy
;trigger1 = time > 0
;value = SCA,SA,HA,AP

[State 4000, 1]
type = HitDef
trigger1 = var(5) < 2
attr = SC,HA
p2facing = 1
animtype = dup
sparkno = s10026
id = 2510
guardflag = M
guard.sparkno = s10111 
sparkxy = 0-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-40
getpower = 0,0
givepower = 21,21
pausetime = 0,1
guard.pausetime = 0,0
hitflag = MAF
priority = 4, Hit
hitonce = 1
hitsound = s(ifelse(var(4)=1,3,7)),4
ground.type = low 
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = -12
ground.slidetime = 35
ground.hittime = 35
guard.slidetime = 35-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,17,0)
guard.hittime = 35-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,17,0)
guard.velocity = -10
ground.velocity = -6,-5
guardsound = s1,0
p2facing = 1
fall = 1
fall.recover = 0                        
fall.yvelocity = -3.6

[State 182, 2]
type = varset
trigger1 = time = 0
var(5) = 0

[State 182, 2]
type = varadd
trigger1 = movehit > 0
var(5) = 1

[State 182, 2]
type = movehitreset
triggerall = movehit > 0
trigger1 = numtarget(2510) = 0
trigger2 = numtarget(2510) > 0
trigger2 = target(2510),stateno != 5000 && target(2510),stateno != 5020
persistent = 0

[State 182, 2]
type = varset
trigger1 = numtarget(2510) > 0
trigger1 = target(2510),stateno = 5000 || target(2510),stateno = 5020
var(18) = 1

[State 182, 2]
type = varset
trigger1 = numtarget(2510) = 0
trigger2 = numtarget(2510) > 0
trigger2 = target(2510),stateno != 5000 && target(2510),stateno != 5020
var(18) = 0

[State 1002, 4]
type = Targetstate
trigger1 = movehit > 0 && numtarget(2510) > 0
value = 9507
id = 2510
ignorehitpause = 1
persistent = 0

[State 1002, 4]
type = changestate
trigger1 = movehit > 0 && var(18) = 1 && var(5) < 2
trigger2 = movehit > 0 && var(5) > 1
value = 2502
ignorehitpause = 1
persistent = 0

[State 1301, 2] 
type = changestate 
trigger1 = time = 25
trigger2 = moveguarded > 0
value = 9004 
;------------------------------------
; 8 Maiden Rush (Success)
[Statedef 2502]
type     = S
movetype = I
physics  = N
anim = 2502
ctrl = 0
velset = 0,0,0

[State 260, 3] 
type = Afterimage
trigger1 = Time = 0
time = 0

[State 1203, 1]
type = Width
trigger1 = 1
edge = 50,0
        
[State 5210, 1] 
type = PalFX
trigger1 = Time = 0
time = 1
add = 0,0,0 

[State 1300, 5]
type = targetbind
trigger1 = time < 11
pos = 0,0
id = 2510

[State 1300, 5]
type = targetbind
trigger1 = time >= 11
trigger1 = time < 31
pos = 48,0
id = 2510

[State 1300, 5]
type = posfreeze
trigger1 = time < 31

[State 7800, 3]
type = BGPalfx
trigger1 = time >= 0
ignorehitpause = 1
supermove = 1
time = 2
mul = 158,158,158
invertall = 1

[State 100, 5]
type = ChangeState
triggerall = time = 1
trigger1 = numtarget(2510) > 0
trigger1 = target(2510),stateno != 9507
trigger2 = numtarget(2510) = 0
value = 2004

[State 3000]
type = projectile
trigger1 = AnimElem = 17,1
trigger2 = AnimElem = 26,1
trigger3 = AnimElem = 32,1
trigger4 = AnimElem = 37,1
trigger5 = AnimElem = 44,1
projanim = 10014
offset = 51,-59
projsprpriority = 2
projremovetime = 19
projedgebound = 210

[State 3000]
type = projectile
trigger1 = AnimElem = 17,1
trigger2 = AnimElem = 26,1
trigger3 = AnimElem = 32,1
trigger4 = AnimElem = 37,1
trigger5 = AnimElem = 44,1
projanim = 903
offset = 65,-5
projsprpriority = 2
projremovetime = 13
projedgebound = 210

[State 3000]
type = projectile
trigger1 = AnimElem = 6,1
projanim = 9244
offset = 45,-23
projsprpriority = 2
projremovetime = 22
projedgebound = 210

[State 3000]
type = projectile
trigger1 = AnimElem = 9,1
projanim = 9244
offset = 60,-18
projsprpriority = 2
projremovetime = 22
projedgebound = 210

[State 900, 1]
type = EnvColor
trigger1 = AnimElem = 1
trigger2 = AnimElem = 7
trigger3 = AnimElem = 10
trigger4 = AnimElem = 18
trigger5 = AnimElem = 27
trigger6 = AnimElem = 33
trigger7 = AnimElem = 38
trigger8 = AnimElem = 45
value = 255, 255, 255
time = 1
under = 1

[State 912, 5]
type = PlaySnd
Trigger1 = animelem = 19
value = s7,1
channel = 4

[State 1405, 0]
type = varrandom
trigger1 = AnimElem = 5
trigger2 = AnimElem = 8
trigger3 = AnimElem = 16
trigger4 = AnimElem = 25
trigger5 = AnimElem = 31
trigger6 = AnimElem = 36
trigger7 = AnimElem = 43
v = 5
range = 1

[State 912, 5]
type = PlaySnd
triggerall = var(5) != 1
trigger1 = AnimElem = 6,1
trigger2 = AnimElem = 9,1
trigger3 = AnimElem = 17,1
trigger4 = AnimElem = 26,1
trigger5 = AnimElem = 32,1
trigger6 = AnimElem = 37,1
trigger7 = AnimElem = 44,1
value = s3,4

[State 912, 5]
type = PlaySnd
triggerall = var(5) = 1
trigger1 = AnimElem = 6,1
trigger2 = AnimElem = 9,1
trigger3 = AnimElem = 17,1
trigger4 = AnimElem = 26,1
trigger5 = AnimElem = 32,1
trigger6 = AnimElem = 37,1
trigger7 = AnimElem = 44,1
value = s7,4

[State 1531, 5]
type = HitAdd
trigger1 = AnimElem = 6
trigger2 = AnimElem = 9
trigger3 = AnimElem = 17
trigger4 = AnimElem = 26
trigger5 = AnimElem = 32
trigger6 = AnimElem = 37
trigger7 = AnimElem = 44
value = 1

[State 1531, 5]
type = targetlifeadd
trigger1 = AnimElem = 6,1
trigger2 = AnimElem = 9,1
trigger3 = AnimElem = 17,1
trigger4 = AnimElem = 26,1
trigger5 = AnimElem = 32,1
trigger6 = AnimElem = 37,1
trigger7 = AnimElem = 44,1
value = -21
kill = 0
id = 2510

[State 1531, 5]
type = targetpoweradd
trigger1 = AnimElem = 6,1
trigger2 = AnimElem = 9,1
trigger3 = AnimElem = 17,1
trigger4 = AnimElem = 26,1
trigger5 = AnimElem = 32,1
trigger6 = AnimElem = 37,1
trigger7 = AnimElem = 44,1
value = 21
id = 2510

[State 230, 0]
type = varrandom
trigger1 = time = 31 || time = 49 || time = 61 || time = 71 || time = 85
v = 12
range = 3

[State 1300, 5]
type = projectile
triggerall = random < 500
trigger1 = time = 35+var(12) || time = 53+var(12) || time = 65+var(12)
trigger2 = time = 75+var(12) || time = 89+var(12)
projanim = 10117+ifelse(random<500,1,0)
offset = 51,-59
velocity = 1,-8
ignorehitpause = 1
projsprpriority = 2
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
triggerall = random < 500
trigger1 = time = 35+var(12) || time = 53+var(12) || time = 65+var(12)
trigger2 = time = 75+var(12) || time = 89+var(12)
projanim = 10117+ifelse(random<500,1,0)
offset = 51,-59
velocity = 2,-7.5
ignorehitpause = 1
projsprpriority = 2
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
triggerall = random < 500
trigger1 = time = 35+var(12) || time = 53+var(12) || time = 65+var(12)
trigger2 = time = 75+var(12) || time = 89+var(12)
projanim = 10117+ifelse(random<500,1,0)
offset = 51,-59
velocity = 3,-7
ignorehitpause = 1
projsprpriority = 2
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
triggerall = random < 500
trigger1 = time = 35+var(12) || time = 53+var(12) || time = 65+var(12)
trigger2 = time = 75+var(12) || time = 89+var(12)
projanim = 10117+ifelse(random<500,1,0)
offset = 51,-59
velocity = 4,-6.5
ignorehitpause = 1
projsprpriority = 2
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
triggerall = random < 500
trigger1 = time = 35+var(12) || time = 53+var(12) || time = 65+var(12)
trigger2 = time = 75+var(12) || time = 89+var(12)
projanim = 10117+ifelse(random<500,1,0)
offset = 51,-59
velocity = 5,-6
ignorehitpause = 1
projsprpriority = 2
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
triggerall = random < 500
trigger1 = time = 35+var(12) || time = 53+var(12) || time = 65+var(12)
trigger2 = time = 75+var(12) || time = 89+var(12)
projanim = 10117+ifelse(random<500,1,0)
offset = 51,-59
velocity = 6,-5
ignorehitpause = 1
projsprpriority = 2
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
triggerall = random < 500
trigger1 = time = 35+var(12) || time = 53+var(12) || time = 65+var(12)
trigger2 = time = 75+var(12) || time = 89+var(12)
projanim = 10117+ifelse(random<500,1,0)
offset = 51,-59
velocity = 7,-4
ignorehitpause = 1
projsprpriority = 2
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
triggerall = random < 500
trigger1 = time = 35+var(12) || time = 53+var(12) || time = 65+var(12)
trigger2 = time = 75+var(12) || time = 89+var(12)
projanim = 10117+ifelse(random<500,1,0)
offset = 51,-59
velocity = 8,-3
ignorehitpause = 1
projsprpriority = 2
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
triggerall = random < 500
trigger1 = time = 35+var(12) || time = 53+var(12) || time = 65+var(12)
trigger2 = time = 75+var(12) || time = 89+var(12)
projanim = 10117+ifelse(random<500,1,0)
offset = 51,-59
velocity = 8,-1.5
ignorehitpause = 1
projsprpriority = 2
projremovetime = 6
projedgebound = 210
[State 1300, 5]
type = projectile
triggerall = random < 500
trigger1 = time = 35+var(12) || time = 53+var(12) || time = 65+var(12)
trigger2 = time = 75+var(12) || time = 89+var(12)
projanim = 10117+ifelse(random<500,1,0)
offset = 51,-59
velocity = 8.5,-1
ignorehitpause = 1
projsprpriority = 2
projremovetime = 6
projedgebound = 210

[State 1531, 5]
type = PosSet
trigger1 = time = 0
y = 0

[State 210, 1]
type = AfterImageTime
trigger1 = animtime = 0
Time = 0

[State 100, 5]
type = ChangeState
trigger1 = animtime = 0
value = 2512
ctrl = 1
;-----------------------------------
; 8 Maiden Rush (Biting)
[Statedef 2512]
type     = S
movetype = I
physics  = N
anim = 9511
ctrl = 0
velset = 0,0,0

[State 123, 2]
type = varset
trigger1 = time = 0
var(4) = 0
[State 123, 2]
type = varset
trigger1 = numtarget(2510) > 0
trigger1 = time = 0 && target(2510),const(size.head.pos.y)>-70 && target(2510),const(size.head.pos.y)<0
var(4) = 1

[State 1300, 5]
type = targetbind
trigger1 = time < 11
pos = 33+ifelse((target(2510),const(size.head.pos.x))<0,(target(2510),const(size.head.pos.x)),0),0
id = 2510

[State 1300, 5]
type = targetbind
trigger1 = animelem = 2
pos = 33+ifelse(var(4)=1,(target(2510),const(size.head.pos.x)),0)+ifelse((target(2510),const(size.head.pos.x))<0,(target(2510),const(size.head.pos.x)),0),0+ifelse(var(4)=1,-70-(target(2510),const(size.head.pos.y)),0)
id = 2510

[State 1300, 5]
type = targetbind
triggerall = animelem = 2
trigger1 = target(2510),name = "Choi" || target(2510),name = "bao"
trigger2 = target(2510),name = "Dark Chun-Li R"
trigger3 = target(2510),name = "Asahi_Sakurai By Toshi"
pos = 30,-20
id = 2510

[State 1300, 5]
type = targetbind
trigger1 = animelem = 2
trigger1 = target(2510),name = "Kurenai by Inverse v1.0" || target(2510),name = "kurenai"
pos = 20,-10
id = 2510

[State 1300, 5]
type = targetbind
trigger1 = animelem = 2
trigger1 = target(2510),name = "spider-man"
pos = 20,-30
id = 2510
[State 1300, 5]
type = targetbind
trigger1 = animelem = 2
trigger1 = target(2510),name = "ryuzito de souza" || target(2510),name = "pocket ryu"
pos = 30,-50
id = 2510

[State 900, 1]
type = EnvColor
trigger1 = animelem = 15
value = 255, 255, 255
under = 1
time = 1

[State 7800, 3]
type = BGPalfx
trigger1 = time >= 0
ignorehitpause = 1
supermove = 1
time = 2
mul = 158,158,158
invertall = 1

[State 3000]
type = projectile
trigger1 = AnimElem = 2
projanim = 926
offset = 20,0
projsprpriority = 2
projremovetime = 28
projedgebound = 210

[State 912, 5]
type = PlaySnd
Trigger1 = animelem = 2
value = s7,3

[State 8160, 13]
type = projectile
trigger1 = Time = 28
trigger2 = Time = 48
trigger3 = Time = 68
trigger4 = Time = 88
trigger5 = Time = 108
projanim = 3100
projsprpriority = 7
offset = 31,-73
ignorehitpause = 1
projremovetime = 32
projedgebound = 210

[State 8160, 13]
type = projectile
trigger1 = Time = 28
trigger2 = Time = 48
trigger3 = Time = 68
trigger4 = Time = 88
trigger5 = Time = 108
projanim = 3100
projsprpriority = 6
offset = 28,-59
ignorehitpause = 1
projremovetime = 32
projedgebound = 210

[State 8160, 13]
type = projectile
trigger1 = Time = 28
trigger2 = Time = 48
trigger3 = Time = 68
trigger4 = Time = 88
trigger5 = Time = 108
projanim = 3110
projsprpriority = 5
offset = 30,-43
ignorehitpause = 1
projremovetime = 26
projedgebound = 210

[State 8160, 13]
type = projectile
trigger1 = Time = 28
trigger2 = Time = 48
trigger3 = Time = 68
trigger4 = Time = 88
trigger5 = Time = 108
projanim = 3110
projsprpriority = 5
offset = 63,-67
ignorehitpause = 1
projremovetime = 26
projedgebound = 210

[State 8160, 13]
type = projectile
trigger1 = Time = 28
trigger2 = Time = 48
trigger3 = Time = 68
trigger4 = Time = 88
trigger5 = Time = 108
projanim = 3120
projsprpriority = 3
offset = 45,-28
ignorehitpause = 1
projremovetime = 13
projedgebound = 210
        
[State 8160, 13]
type = projectile
trigger1 = Time = 28
trigger2 = Time = 48
trigger3 = Time = 68
trigger4 = Time = 88
trigger5 = Time = 108
projanim = 3120
projsprpriority = 4
offset = 63,-38
ignorehitpause = 1
projremovetime = 13
projedgebound = 210

[State 8160, 13]
type = projectile
trigger1 = Time = 28
trigger2 = Time = 48
trigger3 = Time = 68
trigger4 = Time = 88
trigger5 = Time = 108
projanim = 3120
projsprpriority = 4
offset = 40,-94
ignorehitpause = 1
projremovetime = 13
projedgebound = 210
         
[State 912, 5]
type = PlaySnd
trigger1 = Time = 28
trigger2 = Time = 48
trigger3 = Time = 68
trigger4 = Time = 88
trigger5 = Time = 108
value = s4,1

[State 912, 5]   
type = PlaySnd
trigger1 = AnimElem = 15
value = s7,2

[State 912, 5]   
type = PlaySnd
trigger1 = AnimElem = 15
value = s3,10
channel = 4

[State 900, 1]
type = EnvColor
trigger1 = Time = 28
trigger2 = Time = 48
trigger3 = Time = 68
trigger4 = Time = 88
trigger5 = Time = 108
trigger6 = AnimElem = 15
value = 255, 255, 255
under = 1
time = 1

[State 1531, 5]
type = targetlifeadd
trigger1 = Time = 28
trigger2 = Time = 48
trigger3 = Time = 68
trigger4 = Time = 88
trigger5 = Time = 108
value = -40
kill = 0
id = 2510

[State 1531, 5]
type = targetlifeadd
trigger1 = AnimElem = 15
value = -153
id = 2510

[State 1531, 5]         
type = envshake
trigger1 = Time = 28 
trigger2 = Time = 48
trigger3 = Time = 68
trigger4 = Time = 88
trigger5 = Time = 108
time = 17  
ampl = -5
freq = 255
phase = 10

[State 1531, 5]
type = envshake
trigger1 = animelem = 15
persistent = 0
time = 20
ampl = -5
freq = 255
phase = 10
ignorehitpause = 1

[State 8160, 13]
type = Explod
trigger1 = animelem = 15
anim = 3100
ID = 8150
sprpriority = 5
pos = 40,-70
random = 10,10
ignorehitpause = 1
ownpal = 1

[State 8160, 13]          
type = Explod
trigger1 = Time > 136
trigger1 = Time < 151
trigger1 = NumExplod(8150) < 6
trigger1 = Random < 800
anim = 3100
ID = 8150
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 8160, 14]
type = Explod
trigger1 = Time > 136
trigger1 = Time < 151
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 750
anim = 3110
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 8160, 15]
type = Explod
trigger1 = Time > 136
trigger1 = Time < 151
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 700
anim = 3120
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 8160, 16]
type = Explod
trigger1 = Time > 136
trigger1 = Time < 151
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 650
anim = 3130
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 8160, 17]
type = Explod
trigger1 = Time > 136
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 600
anim = 3140
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 8160, 18]
type = Explod
trigger1 = Time > 136
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 550
anim = 3150
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 100, 5]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;-----------------------------------
; 8 Maiden Rush (HIT BY)
[Statedef 9507]
type     = S
movetype = H
physics  = N
ctrl = 0
velset = 0,0,0

[State 1531, 5]
type = defencemulSet
trigger1 = 1
value = 1

[State 1531, 5]
type = nothitby
trigger1 = 1
value = SCA

[State 1531, 5]
type = playerpush
trigger1 = 1
value = 0

[State 1531, 5]
type = posfreeze
trigger1 = 1

[State 5210, 1] 
type = PalFX
trigger1 = Time = 0
time = 1
add = 0,0,0 

[State 1531, 5]
type = PosSet
trigger1 = time = 0
y = 0

[State 1531, 5]
type = ChangeAnim2
trigger1 = time = 0
value = 9888

[State 1531, 5]
type = ChangeAnim2
trigger1 = time = 97
value = 9088

[State 1531, 5]
type = ChangeAnim
trigger1 = time = 17
value = 5011

[State 1531, 5]
type = ChangeAnim
trigger1 = time = 11
value = 5001

[State 1531, 5]
type = ChangeAnim
trigger1 = time = 33 || time = 73
value = 5002

[State 1531, 5]
type = ChangeAnim
trigger1 = time = 51 || time = 63 || time = 87
value = 5012

[State 1531, 5]
type = ChangeAnim
trigger1 = anim = 5011 && animtime = 0
value = 5016

[State 1531, 5]
type = ChangeAnim
trigger1 = anim = 5001 && animtime = 0
value = 5006

[State 1531, 5]
type = ChangeAnim
trigger1 = anim = 5002 && animtime = 0
value = 5007

[State 1531, 5]
type = ChangeAnim
trigger1 = anim = 5012 && animtime = 0
value = 5017

[State 1531, 5]
type = ChangeAnim2
trigger1 = anim = 5006 && animelem = 3
trigger2 = anim = 5007 && animelem = 4
value = 9007

[State 1531, 5]
type = ChangeAnim2
trigger1 = anim = 5016 && animelem = 3
trigger2 = anim = 5017 && animelem = 5
value = 9008

[State 3305, 2]
type = palfx
trigger1 = time = 234
time = 2
add = 48,0,168
mul = 166,166,166
sinadd = 64,64,64,17
color = 0 
invertall = 1 

[State 1531, 5]
type = ChangeState
trigger1 = time = 235
value = 9009
;----------------------------------
; HIT_BOUNCE (hit ground)
[Statedef 6100]
type    = L
movetype= H
physics = N

[State 5100, 1]
type = ChangeAnim
trigger1 = Time = 0
value = 5100

[State 5100, 1]
type = PosSet
trigger1 = Time = 0
y = 0

[State 5100, 2]
type = VelSet
trigger1 = Time = 0
y = 0

[State 5100, 3] 
type = VelMul
trigger1 = Time = 0
x = 0.75

[State 5100, 4]
type = GameMakeAnim
trigger1 = Time = 1
value = 61
pos = -5,0
under = 1

[State 5100, 5]
type = HitFallDamage
trigger1 = Time = 3

[State 5100, 5]
type = PlaySnd
trigger1 = Time = 1
value = F7, 0 

[State 5100, 6]
type = PosFreeze
trigger1 = Time >= 0

[State 5100, 7]
type = SelfState
trigger1 = Time = 3
value = 5101

[State 5100, 8]
type = ForceFeedback
trigger1 = Time = 0
waveform = sinesquare
ampl = 255,-3,-.2,.005
time = 20
;------------------------------------
; Yaotome
[Statedef 2400]
type    = S
movetype= A
physics = S
ctrl = 0
anim = 2400
facep2 = 1
velset = 0,0
sprpriority = 0

[State 1000, 4]
type = Helper
trigger1 = time = 0
name = "n2"
pos = 250,0  
stateno = 2011

[State 1000, 4]
type = Helper
trigger1 = time = 0
name = "n2"
pos = 125,0  
stateno = 2011

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 1

[state 2400, 0]
type = varset
trigger1 = time = 0
trigger1 = prevstateno != 510 && prevstateno != 511
trigger1 = prevstateno != 516 && prevstateno != 520
trigger1 = prevstateno != 1030 && prevstateno != 1037 && prevstateno != 1038 && prevstateno != 1040
trigger1 = prevstateno != 4600 && prevstateno != 4611 && prevstateno != 4100 && prevstateno != 4111
var(4) = 0
[state 2400, 0]
type = varset
triggerall = time = 0
trigger1 = prevstateno = 510 || prevstateno = 511
trigger2 = prevstateno = 516 || prevstateno = 520
trigger3 = prevstateno = 1030 || prevstateno = 1037 || prevstateno = 1038 || prevstateno = 1040
trigger4 = prevstateno = 4600 || prevstateno = 4611 || prevstateno = 4100 || prevstateno = 4111
var(4) = 1

[state 2400, 0]
type = varset
trigger1 = time = 0 && var(3) < 1
var(12) = 0
[state 2400, 0]
type = varset
trigger1 = time = 0 && var(3) > 0
var(12) = 1
[state 2400, 0]
type = varset
trigger1 = time = 0 && var(3) > 0
var(3) = 0

[State 260, 3]
type = playsnd
trigger1 = Time = 0 && var(12) = 1
value = s9,2
channel = 1

[state 2400, 0]
type = varadd
trigger1 = time = 28 && var(12) = 0
var(20) = 30
[state 2400, 0]
type = varadd
trigger1 = time = 28 && var(12) = 1
var(20) = 10+var(4)*10

[state 2400, 0]
type = playerpush
trigger1 = 1
value = 1

[State 182, 2]
type = NotHitBy
trigger1 = 1
value = SCA

[State 7800, 3]
type = BGPalfx
trigger1 = time > 18 && var(12) = 0
ignorehitpause = 1
supermove = 1
time = 2
add = 358,44,44
mul = 113,0,0
invertall = 1

[State 1300, 5]
type = Envcolor
trigger1 = Time = 1
persistent = 0
ignorehitpause = 1
value = 255,255,255
time = 4
under = 1
supermove = 1

[State 1300, 5]
type = Envcolor
trigger1 = Time = 5
persistent = 0
ignorehitpause = 1
value = 0, 0, 0
time = 25
under = 1
supermove = 1

[State 1531, 5]
type = playsnd
trigger1 = time = 0 && var(12) = 1
value = s1,8
[State 1531, 5]
type = playsnd
trigger1 = time = 0 && var(12) != 1
value = s9,1

[State 4120, 1]
type = SuperPause
trigger1 = time = 1
movetime = 30
p2defmul = 1
darken = 0
time = 30
anim = -1

[State 2100, 4]
type = Explod
trigger1 = time = 13 && var(12) = 0
anim = 12002
sprpriority = 7
pos = -24,-86
supermove = 1
bindtime = -1
ownpal = 1
[State 2100, 5]
type = Explod
trigger1 = time = 3 && var(12) = 0
anim = 1202
sprpriority = -1
pos = -11,-92
supermove = 1
bindtime = -1
ownpal = 1

[State 2100, 4]
type = Explod
trigger1 = time = 13 && var(12) = 1
anim = 12001
sprpriority = 7
pos = -24,-86
supermove = 1
bindtime = -1
ownpal = 1
[State 2100, 5]
type = Explod
trigger1 = time = 3 && var(12) = 1
anim = 1201
sprpriority = -1
pos = -11,-92
supermove = 1
bindtime = -1
ownpal = 1

[State 610, 4]
type = ChangeState
trigger1 = animtime = 0
value = 2401
;-----------------------------------
; 8 Maiden Rush (Prepare)
[Statedef 2401]
type     = S
movetype = A
physics  = S
anim = 2001
ctrl = 0
velset = 0,0,0

[State 1000, 4]
type = Helper
trigger1 = time = 0
name = "n3"
pos = 0,0  
stateno = 2003

[state 2401, 0]
type = playerpush
trigger1 = 1
value = 1

[State 182, 2]
type = NotHitBy
trigger1 = 1
value = SCA

[State 7800, 3]
type = BGPalfx
trigger1 = time >= 0 && var(12) = 0
ignorehitpause = 1
supermove = 1
time = 2
add = 358,44,44
mul = 113,0,0
invertall = 1

[State 1531, 5]
type = PosFreeze
trigger1 = time >= 0

[State 100, 5]
type = ChangeState
trigger1 = animtime = 0
value = 2402
;-------------------------------------
; 8 Maiden Rush (Lunge)
[Statedef 2402]
type    = S
movetype= A
physics = N
juggle  = 8
velset = 10,0
ctrl = 0
anim = 2010

[State 3000, 2]
type = width
trigger1 = 1
value = 10

[State 1405, 0]
type = varrandom
trigger1 = time = 0
v = 4
range = 1

[State 3000, 2]
type = AfterImage
trigger1 = Time = 0
time = 2
length = 8
paladd = 84,60,164
TimeGap  = 1
FrameGap = 2

[State 3000, 2]
type = AfterImagetime
trigger1 = time%2 = 0
time = 2

[State 7800, 3]
type = BGPalfx
trigger1 = time >= 0 && var(12) = 0
ignorehitpause = 1
supermove = 1
time = 2
add = 358,44,44
mul = 113,0,0
invertall = 1

[State 182, 2]
type = NotHitBy
trigger1 = Time < 1
value = SCA

[State 182, 2]
type = HitBy
trigger1 = time > 0
value = SCA,SA,HA,AP

[State 4000, 1]
type = HitDef
trigger1 = var(5) < 2
attr = SC,HA
p2facing = 1
animtype = dup
sparkno = -1
getpower = 0,0
givepower = 21,21
pausetime = 0,1
guard.pausetime = 0,0
guard.sparkno = s10111
sparkxy = 0-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-40
guardflag = M
hitflag = MAF
id = 2402
hitsound = s(ifelse(var(4)=1,3,7)),4
priority = 7, Hit
ground.type = low 
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = -12
ground.slidetime = 35
ground.hittime = 35
guard.slidetime = 35-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,17,0)
guard.hittime = 35-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,17,0)
guard.velocity = -10
ground.velocity = -6,-5
;snap = 5
hitonce = 1
guardsound = s1,0
p2facing = 1
fall = 1
fall.recover = 0                        
fall.yvelocity = -3.6

[State 182, 2]
type = varset
trigger1 = time = 0
var(5) = 0

[State 182, 2]
type = varadd
trigger1 = movehit > 0
var(5) = 1

[State 182, 2]
type = varset
trigger1 = numtarget(2402) > 0
trigger1 = target(2402),stateno = 5000 || target(2402),stateno = 5020
var(18) = 1

[State 182, 2]
type = varset
trigger1 = numtarget(2402) = 0
trigger2 = numtarget(2402) > 0
trigger2 = target(2402),stateno != 5000 && target(2402),stateno != 5020
var(18) = 0

[State 1300, 5]
type = projectile
trigger1 = movehit > 0 && var(18) = 0 && var(5) < 2
projanim = 9243
offset = 62,-40
ignorehitpause = 1
projsprpriority = 3
projremovetime = 12
projedgebound = 210

[State 182, 2]
type = movehitreset
triggerall = movehit > 0
trigger1 = numtarget(2402) = 0
trigger2 = numtarget(2402) > 0
trigger2 = target(2402),stateno != 5000 && target(2402),stateno != 5020
persistent = 0

[State 1002, 4]
type = Targetstate
trigger1 = movehit > 0 && numtarget(2402) > 0 && var(12) = 0
value = 2406
id = 2402
ignorehitpause = 1
persistent = 0
[State 1002, 4]
type = Targetstate
trigger1 = movehit > 0 && numtarget(2402) > 0 && var(12) = 1
value = 2416
id = 2402
ignorehitpause = 1
persistent = 0

[State 1002, 4]
type = changestate
trigger1 = movehit > 0 && var(18) = 1 && var(5) < 2
trigger2 = movehit > 0 && var(5) > 1
value = 2403
ignorehitpause = 1
persistent = 0

[State 1301, 2] 
type = changestate 
trigger1 = time = 25
trigger2 = moveguarded > 0
value = 9004 
;-------------------------------------
; 8 Maiden Rush (Success)
[Statedef 2403]
type     = S
movetype = I
physics  = N
anim = 2401
ctrl = 0
velset = 0,0,0

[State 260, 3]
type = changeanim
trigger1 = Time = 0 && var(12) = 1
value = 2411

[State 260, 3]
type = Afterimage
trigger1 = Time = 0
time = 0

[State 5210, 1]
type = PalFX
trigger1 = Time = 0
time = 1
add = 0,0,0 

[State 1300, 5]
type = posadd
trigger1 = time = 0
x = 5

[State 1300, 5]
type = width
trigger1 = time < 34
value = 40,0

[State 1300, 5]
type = targetbind
trigger1 = time < 34 && var(12) = 0
pos = 0,0
id = 2402
[State 1300, 5]
type = targetbind
trigger1 = time = 34 && var(12) = 0
pos = 42,0
id = 2402
[State 1300, 5]
type = targetbind
trigger1 = time < 36 && var(12) = 1
pos = 0,0
id = 2402
[State 1300, 5]
type = targetbind
trigger1 = time = 36 && var(12) = 1
pos = 42,0
id = 2402

[State 1300, 5]
type = posfreeze
trigger1 = time < 31

[State 1300, 5]
type = projectile
trigger1 = time = 0
projanim = 9241
offset = 25,-36
ignorehitpause = 1
projsprpriority = 3
projremovetime = 22
projedgebound = 210

[State 100, 5]
type = ChangeState
triggerall = time = 1
trigger1 = numtarget(2402) > 0 && var(12) = 0
trigger1 = target(2402),stateno != 2406
trigger2 = numtarget(2402) = 0
trigger3 = numtarget(2402) > 0 && var(12) = 1
trigger3 = target(2402),stateno != 2416
value = 2004

[State 210, 2]
type = PlaySnd
trigger1 = time = 0 && var(12) = 0
value = s16,0
channel = 1

[State 7800, 3]
type = BGPalfx
trigger1 = time >= 0 && var(12) = 0
ignorehitpause = 1
supermove = 1
time = 2
add = 358,44,44
mul = 113,0,0
invertall = 1

[State 210, 2]
type = PlaySnd
trigger1 = animElem = 28 && var(12) = 0
value = s16,1

[State 3000]
type = projectile
trigger1 = AnimElem = 3
projanim = 903
offset = 56,-18
projsprpriority = 2
projremovetime = 13
projedgebound = 210
[State 3000]
type = projectile
trigger1 = AnimElem = 3 && var(12) = 1
projanim = 10014
offset = 42,-72
projsprpriority = 2
projremovetime = 19
projedgebound = 210
[State 3000]
type = projectile
trigger1 = AnimElem = 3 && var(12) = 0
projanim = 9999
offset = 32,-25
projsprpriority = 2
projremovetime = 16
projedgebound = 210

[State 3000]
type = projectile
triggerall = var(12) = 0
trigger1 = AnimElem = 8
trigger2 = AnimElem = 15
projanim = 10000
offset = 27,-5
projsprpriority = 2
projremovetime = 16
projedgebound = 210
[State 3000]
type = projectile
triggerall = var(12) = 0
trigger1 = AnimElem = 12
trigger2 = AnimElem = 19
projanim = 9999
offset = -27,10
projsprpriority = 2
projremovetime = 16
projedgebound = 210
[State 3000]
type = projectile
trigger1 = AnimElem = 24 && var(12) = 0
projanim = 10000
offset = 27,-9
projsprpriority = 2
projremovetime = 16
projedgebound = 210
[State 3000]
type = projectile
trigger1 = AnimElem = 24 && var(12) = 0
projanim = 9999
offset = -28,25
projsprpriority = 2
projremovetime = 16
projedgebound = 210

[State 3000]
type = projectile
trigger1 = AnimElem = 8
trigger2 = AnimElem = 15 && var(12) = 0
projanim = 903
offset = 32,22
projsprpriority = 2
projremovetime = 13
projedgebound = 210
[State 3000]
type = projectile
trigger1 = AnimElem = 8 && var(12) = 1
projanim = 10014
offset = 18,-32
projsprpriority = 2
projremovetime = 19
projedgebound = 210
[State 3000]
type = projectile
trigger1 = AnimElem = 12 && var(12) = 1
projanim = 903
offset = -20,22
projsprpriority = 2
projremovetime = 13
projedgebound = 210
[State 3000]
type = projectile
trigger1 = AnimElem = 12 && var(12) = 0
trigger2 = AnimElem = 19 && var(12) = 0
projanim = 923
offset = -40,22
projsprpriority = 2
projremovetime = 13
projedgebound = 210
[State 3000]
type = projectile
trigger1 = AnimElem = 12 && var(12) = 1
projanim = 10014
offset = -34,-32
projsprpriority = 2
projremovetime = 19
projedgebound = 210
[State 3000]
type = projectile
trigger1 = animelem = 17 && var(12) = 1
trigger2 = AnimElem = 24 && var(12) = 0
projanim = 903
offset = 32,18
projsprpriority = 2
projremovetime = 13
projedgebound = 210
[State 3000]
type = projectile
trigger1 = AnimElem = 17 && var(12) = 1
projanim = 10014
offset = 18,-36
projsprpriority = 2
projremovetime = 19
projedgebound = 210
[State 3000]
type = projectile
trigger1 = AnimElem = 17 && var(12) = 1
projanim = 903
offset = -22,34
projsprpriority = 2
projremovetime = 13
projedgebound = 210
[State 3000]
type = projectile
trigger1 = AnimElem = 24 && var(12) = 0
projanim = 923
offset = -42,34
projsprpriority = 2
projremovetime = 13
projedgebound = 210
[State 3000]
type = projectile
trigger1 = AnimElem = 17 && var(12) = 1
projanim = 10014
offset = -36,-20
projsprpriority = 2
projremovetime = 19
projedgebound = 210

[State 3000]
type = playsnd
trigger1 = AnimElem = 17 && var(12) = 1
value = s9,4

[State 210, 2]
type = PlaySnd
triggerall = var(12) = 0
trigger1 = AnimElem = 3
trigger2 = AnimElem = 8
trigger3 = AnimElem = 12
trigger4 = AnimElem = 15
trigger5 = AnimElem = 19
trigger6 = AnimElem = 24
value = s3,4
[State 210, 2]
type = PlaySnd
triggerall = var(12) = 1
trigger1 = AnimElem = 3
trigger2 = AnimElem = 8
trigger3 = AnimElem = 12
trigger4 = AnimElem = 17
value = s3,4

[State 900, 1]         
type = EnvColor
triggerall = var(12) = 0
trigger1 = animelem = 1
trigger2 = AnimElem = 3
trigger3 = AnimElem = 8
trigger4 = AnimElem = 12
trigger5 = AnimElem = 15
trigger6 = AnimElem = 19
trigger7 = AnimElem = 24
value = 255, 255, 255
time = 1
under = 1

[State 1531, 5]
type = targetlifeadd
triggerall = var(12) = 0
trigger1 = AnimElem = 3
trigger2 = AnimElem = 8
trigger3 = AnimElem = 12
trigger4 = AnimElem = 15
trigger5 = AnimElem = 19
value = -57
kill = 0
id = 2402
[State 1531, 5]
type = targetlifeadd
trigger1 = var(12) = 0
trigger1 = AnimElem = 24
value = -111
kill = 0
id = 2402

[State 1531, 5]
type = targetlifeadd
triggerall = var(12) = 1
trigger1 = AnimElem = 8
trigger2 = AnimElem = 12
value = -47
kill = 0
id = 2402
[State 1531, 5]
type = targetlifeadd
trigger1 = var(12) = 1
trigger1 = AnimElem = 17
value = -81
kill = 0
id = 2402

[State 1531, 5]
type = PosSet
trigger1 = time = 0
y = 0

[State 100, 5]
type = ChangeState
trigger1 = animtime = 0
value = 2404
;-------------------------------------
; 8 Maiden Rush (Biting)
[Statedef 2404]
type     = S
movetype = I
physics  = N
anim = 2404
ctrl = 0
velset = 0,0,0

[State 3000]
type = projectile
triggerall = var(12) = 0
trigger1 = time = 16
trigger2 = time = 38
trigger3 = time = 79
projanim = 10002
offset = 20, -10
projsprpriority = 2
projremovetime = 9
projedgebound = 210
[State 3000]
type = projectile
triggerall = var(12) = 0
trigger1 = time = 18
trigger2 = time = 40
trigger3 = time = 81
projanim = 10002
offset = 40, -20
projsprpriority = 2
projremovetime = 9
projedgebound = 210
[State 3000]
type = projectile
triggerall = var(12) = 0
trigger1 = time = 20
trigger2 = time = 42
trigger3 = time = 83
projanim = 10002
offset = 55, -27
projsprpriority = 2
projremovetime = 9
projedgebound = 210
[State 3000]
type = projectile
triggerall = var(12) = 0
trigger1 = time = 22
trigger2 = time = 44
trigger3 = time = 85
projanim = 10002
offset = 70, -32
projsprpriority = 2
projremovetime = 9
projedgebound = 210

[State 3000]
type = projectile
triggerall = var(12) = 0
trigger1 = time = 16
trigger2 = time = 38
trigger3 = time = 79
projanim = 10002
offset = -20, -10
projsprpriority = 2
projremovetime = 9
projedgebound = 210
[State 3000]
type = projectile
triggerall = var(12) = 0
trigger1 = time = 18
trigger2 = time = 40
trigger3 = time = 81
projanim = 10002
offset = -40, -20
projsprpriority = 2
projremovetime = 9
projedgebound = 210
[State 3000]
type = projectile
triggerall = var(12) = 0
trigger1 = time = 20
trigger2 = time = 42
trigger3 = time = 83
projanim = 10002
offset = -55, -27
projsprpriority = 2
projremovetime = 9
projedgebound = 210
[State 3000]
type = projectile
triggerall = var(12) = 0
trigger1 = time = 22
trigger2 = time = 44
trigger3 = time = 85
projanim = 10002
offset = -70, -32
projsprpriority = 2
projremovetime = 9
projedgebound = 210

[State 3000]
type = projectile
trigger1 = time = 87 && var(12) = 0
projanim = 10002
offset = -85, -37
projsprpriority = 2
projremovetime = 9
projedgebound = 210
[State 3000]
type = projectile
trigger1 = time = 87 && var(12) = 0
projanim = 10002
offset = 85, -37
projsprpriority = 2
projremovetime = 9
projedgebound = 210

[State 3000]
type = projectile
trigger1 = time = 89 && var(12) = 0
projanim = 10002
offset = -100,-40
projsprpriority = 2
projremovetime = 9
projedgebound = 210
[State 3000]
type = projectile
trigger1 = time = 89 && var(12) = 0
projanim = 10002
offset = 100,-40
projsprpriority = 2
projremovetime = 9
projedgebound = 210

[State 7800, 3]
type = BGPalfx
trigger1 = time >= 0 && var(12) = 0
ignorehitpause = 1
supermove = 1
time = 2
add = 358,44,44
mul = 113,0,0
invertall = 1

[State 210, 2]
type = PlaySnd
trigger1 = animelem = 23 && var(12) = 0
value = s16,0

[State 912, 5]
type = PlaySnd
trigger1 = AnimElem = 9
trigger2 = AnimElem = 18
value = s9,0
[State 912, 5]
type = PlaySnd
trigger1 = AnimElem = 27
value = s7,2

[State 1300, 3]
type = projectile
trigger1 = AnimElem = 9
trigger2 = AnimElem = 18
trigger3 = AnimElem = 27
projanim = 921
postype = p2
offset = -40,10
projsprpriority = -1
projremovetime = 23
projedgebound = 210
[State 1300, 3]
type = projectile
trigger1 = AnimElem = 9
trigger2 = AnimElem = 18
trigger3 = AnimElem = 27
projanim = 922
postype = p2
offset = -40,10
projsprpriority = 3
projremovetime = 19
projedgebound = 210

[State 900, 1]
type = EnvColor
trigger1 = AnimElem = 9
trigger2 = AnimElem = 18
trigger3 = AnimElem = 27
value = 255, 255, 255
under = 1
time = 1

[State 1531, 5]
type = targetlifeadd
triggerall = var(12) = 0
trigger1 = AnimElem = 9
trigger2 = AnimElem = 18
value = -98
kill = 0
id = 2402
[State 1531, 5]
type = targetlifeadd
triggerall = var(12) = 0
trigger1 = AnimElem = 27
trigger2 = AnimElem = 27,4
value = -64
id = 2402

[State 1531, 5]
type = targetlifeadd
triggerall = var(12) = 1
trigger1 = AnimElem = 9
trigger2 = AnimElem = 18
value = -83
kill = 0
id = 2402
[State 1531, 5]
type = targetlifeadd
trigger1 = var(12) = 1
trigger1 = AnimElem = 27
value = -159
id = 2402

[State 1531, 5]
type = envshake
trigger1 = AnimElem = 9
trigger2 = AnimElem = 18
time = 10
ampl = -8
freq = 40
phase = 2

[State 1531, 5]
type = envshake
trigger1 = AnimElem = 27
persistent = 0
time = 30
ampl = -5
freq = 255
phase = 10

[State 8160, 13]
type = Explod
trigger1 = Time > 78
trigger1 = Time < 90
trigger1 = NumExplod(8150) < 6
trigger1 = Random < 350
anim = 3100
ID = 8150
sprpriority = 5
postype = p2
pos = 0,-20
random = 100,70
ignorehitpause = 1
ownpal = 1

[State 8160, 14]
type = Explod
trigger1 = Time > 78
trigger1 = Time < 90
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 700
anim = 3110
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-20
random = 100,70
ignorehitpause = 1
ownpal = 1

[State 8160, 15]
type = Explod
trigger1 = Time > 78
trigger1 = Time < 90
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 600
anim = 3120
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-20
random = 100,70
ignorehitpause = 1
ownpal = 1

[State 8160, 16]
type = Explod
trigger1 = Time > 78
trigger1 = Time < 90
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 600
anim = 3130
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-20
random = 100,70
ignorehitpause = 1
ownpal = 1

[State 8160, 17]
type = Explod
trigger1 = Time > 78
trigger1 = Time < 90
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 500
anim = 3140
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-20
random = 100,70
ignorehitpause = 1
ownpal = 1

[State 8160, 18]
type = Explod
trigger1 = Time > 78
trigger1 = Time < 90
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 500
anim = 3150
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-20
random = 100,70
ignorehitpause = 1
ownpal = 1

[State 100, 5]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;----------------------------------------
; 8 Maiden Rush (HIT BY)
[Statedef 2406]
type     = S
movetype = H
physics  = N
ctrl = 0
velset = 0,0,0

[State 1531, 5]
type = defencemulSet
trigger1 = 1
value = 1

[State 5210, 1] 
type = PalFX
trigger1 = Time = 0
time = 1
add = 0,0,0 

[State 1531, 5]
type = PosSet
trigger1 = time = 0
y = 0

[State 1531, 5]
type = ChangeAnim2
trigger1 = time = 0
value = 2406

[State 1221, 3]
type = velset
trigger1 = AnimTime = 0
x = -5.5
y = -5.5

[State 3305, 2]
type = PalFX
trigger1 = time = 313
time = 9
add = 48,0,168
mul = 166,166,166
sinadd = 96,96,96,12
color = 0
invertall = 1

[State 1221, 4]
type = nothitby
Trigger1 = AnimTime = 0
value = SCA
time = 35

[State 1221, 4]
type = changeState
Trigger1 = AnimTime = 0
value = 2408
ctrl = 0
;----------------------------------------
; Hit by MAX
[Statedef 2416]
type     = S
movetype = H
physics  = N
ctrl = 0
velset = 0,0,0

[State 1531, 5]
type = defencemulSet
trigger1 = 1
value = 1

[State 5210, 1] 
type = PalFX
trigger1 = Time = 0
time = 1
add = 0,0,0 

[State 1531, 5]
type = PosSet
trigger1 = time = 0
y = 0

[State 1531, 5]
type = ChangeAnim2
trigger1 = time = 0
value = 2416

[State 1221, 3]
type = velset
trigger1 = AnimTime = 0
x = -5.5
y = -4.5

[State 3305, 2]
type = PalFX
trigger1 = animtime = -1
time = 9
add = 48,0,168
mul = 166,166,166
sinadd = 96,96,96,12
color = 0
invertall = 1

[State 1221, 4]
type = nothitby
Trigger1 = AnimTime = 0
value = SCA
time = 35

[State 1221, 4]
type = changeState
Trigger1 = AnimTime = 0
value = 2226
ctrl = 0
;--------------------------------------
; HIT_BOUNCE (into air)
[Statedef 2407]
type    = L
movetype= H
physics = N

[State 5100, 1]
type = VelSet
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) = 0
trigger1 = vel x > 1
x = 1

[State 5100, EnvShake]
type = FallEnvShake
trigger1 = Time = 0

[State 5100, Var] 
type = VarSet
trigger1 = Time = 0
sysvar(1) = floor(vel y)

[State 5100, 2] 
type = ChangeAnim
triggerall = time = 0
trigger1 = (anim != [5051,5059]) && (anim != [5061,5069])
trigger2 = !SelfAnimExist(5100 + (anim % 10))
value = 5100

[State 5100, 3] 
type = ChangeAnim
trigger1 = time = 0
trigger1 = (anim = [5051,5059]) || (anim = [5061,5069])
trigger1 = SelfAnimExist(5100 + (anim % 10))
value = 5100 + (anim % 10)

[State 5100, 4]
type = PosSet
trigger1 = Time = 0
y = 0

[State 5100, 5]
type = VelSet
trigger1 = Time = 0
y = 0

[State 5100, 6] 
type = VelMul
trigger1 = Time = 0
x = 0.75

[State 5100, 8]
type = GameMakeAnim
trigger1 = Time = 1
value = 60 + (sysvar(1) > 5) + (sysvar(1) > 14)
pos = 0, 0
under = sysvar(1) <= 10

[State 5100, 9]
type = HitFallDamage
trigger1 = Time = 3

[State 5100, 10]
type = PlaySnd
trigger1 = Time = 1
value = F7, (sysvar(1) > 5) + (sysvar(1) > 14)

[State 5100, 11]
type = PosFreeze
trigger1 = 1

[State 5100, 12]
type = changeState
trigger1 = AnimTime = 0
value = 2409

[State 5100, 13]
type = ForceFeedback
trigger1 = Time = 0
waveform = sinesquare
ampl = 128,-3,-.2,.005
time = 20
;-------------------------------------
; HIT_BOUNCE (ground)
[Statedef 2408]
type    = L
movetype= H
physics = N

[State 1531, 5]
type = defencemulSet
trigger1 = 1
value = 1

[State 5101, 1] 
type = turn
trigger1 = time = 0

[State 5101, 1] 
type = posadd
trigger1 = time = 0
x = -25

[State 3305, 2]
type = PalFX
trigger1 = time = 3
time = 9
add = 96,48,216
mul = 166,166,166
sinadd = 64,64,64,24
color = 0

[State 3305, 2]
type = PalFX
trigger1 = time = 12
time = 8
add = 48,0,168
mul = 166,166,166
sinadd = 96,96,96,12
color = 0
invertall = 1

[State 5101, 1] 
type = ChangeAnim
triggerall = time = 0
trigger1 = anim != [5101,5109]
trigger2 = !SelfAnimExist(5160 + (anim % 10))
value = 5160

[State 5101, 2] 
type = ChangeAnim
triggerall = time = 0
trigger1 = anim = [5101,5109]
trigger1 = SelfAnimExist(5160 + (anim % 10))
value = 5160 + (anim % 10)

[State 5101, 4]
type = PosSet
trigger1 = Time = 0
y = 8

[State 5101, 5] 
type = VelAdd
trigger1 = 1
y = .48

[State 5101, 6] 
type = changeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 2407
;------------------------------------
; HIT_BOUNCE
[Statedef 2409]
type    = L
movetype= H
physics = N

[State 5101, 1] 
type = ChangeAnim
triggerall = time = 0
trigger1 = anim != [5101,5109]
trigger2 = !SelfAnimExist(5160 + (anim % 10))
value = 5160

[State 5101, 2] 
type = ChangeAnim
triggerall = time = 0
trigger1 = anim = [5101,5109]
trigger1 = SelfAnimExist(5160 + (anim % 10))
value = 5160 + (anim % 10)

[State 5101, 4]
type = velSet
trigger1 = Time = 0
y = -4.5

[State 5101, 4]
type = PosSet
trigger1 = Time = 0
y = 20

[State 5101, 5] 
type = VelAdd
trigger1 = 1
y = .55

[State 5101, 6] 
type = selfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 12
value = 5110
;------------------------------------
; HIT_BOUNCE (bounce into air)
[Statedef 4008]
type    = L
movetype= H
physics = N

[State 1221, 3]
type = velset
trigger1 = time = 0 && prevstateno != 4005
x = -5
y = -5
[State 1221, 3]
type = velset
trigger1 = time = 0 && prevstateno = 4005
x = -3
y = -7.5

[State 1531, 5]
type = defencemulSet
trigger1 = 1
value = 1

[State 325, 0]
type = varset
trigger1 = time = 0 && prevstateno != 4005
sysvar(3) = 0
[State 325, 0]
type = varset
trigger1 = time = 0 && prevstateno = 4005
sysvar(3) = 1

[State 3305, 2]
type = PalFX
trigger1 = time = 8
time = 9
add = 96,48,216
mul = 166,166,166
sinadd = 64,64,64,24
color = 0

[State 3305, 2]
type = PalFX
trigger1 = time = 17 && prevstateno != 4005
time = 6
add = 48,0,168
mul = 166,166,166
sinadd = 96,96,96,12
color = 0
invertall = 1
[State 3305, 2]
type = PalFX
trigger1 = time = 17 && prevstateno = 4005
time = 9
add = 48,0,168
mul = 166,166,166
sinadd = 96,96,96,12
color = 0
invertall = 1

[State 3305, 2]
type = PalFX
trigger1 = time = 26 && prevstateno = 4005
time = 5
add = 96,48,216
mul = 166,166,166
sinadd = 64,64,64,24
color = 0

[State 5101, 1]
type = posadd
trigger1 = time = 0 && prevstateno != 4005
x = 30
[State 5101, 1]
type = posadd
trigger1 = time = 0 && prevstateno = 4005
x = 40

[State 5101, 1]
type = nothitby
trigger1 = 1
value = SCA

[State 5101, 1] 
type = ChangeAnim
triggerall = time = 0
trigger1 = anim != [5101,5109]
trigger2 = !SelfAnimExist(5160 + (anim % 10))
value = 5160

[State 5101, 2] 
type = ChangeAnim
triggerall = time = 0
trigger1 = anim = [5101,5109]
trigger1 = SelfAnimExist(5160 + (anim % 10))
value = 5160 + (anim % 10)

[State 5101, 4]
type = PosSet
trigger1 = Time = 0
y = 20
[State 1221, 3]
type = posadd
trigger1 = time = 0 && prevstateno = 4005
y = -20

[State 5101, 5] 
type = VelAdd
trigger1 = 1 && prevstateno != 4005
y = .4
[State 5101, 5] 
type = VelAdd
trigger1 = 1 && prevstateno = 4005
y = .5

[State 5101, 6] 
type = changeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 20
value = 4009
;-------------------------------------
; HIT_BOUNCE (hit ground)
[Statedef 4009]
type    = L
movetype= H
physics = N

[State 5101, 1]
type = nothitby
trigger1 = 1
value = SCA

[State 5100, 1]
type = VelSet
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) = 0
trigger1 = vel x > 1
x = 1

[State 5100, EnvShake]
type = FallEnvShake
trigger1 = Time = 0

[State 5100, Var] 
type = VarSet
trigger1 = Time = 0
sysvar(1) = floor(vel y)

[State 5100, 2] 
type = ChangeAnim
triggerall = time = 0
trigger1 = (anim != [5051,5059]) && (anim != [5061,5069])
trigger2 = !SelfAnimExist(5100 + (anim % 10))
value = 5100

[State 5100, 3] 
type = ChangeAnim
trigger1 = time = 0
trigger1 = (anim = [5051,5059]) || (anim = [5061,5069])
trigger1 = SelfAnimExist(5100 + (anim % 10))
value = 5100 + (anim % 10)

[State 5100, 4]
type = PosSet
trigger1 = Time = 0
y = 0

[State 5100, 5]
type = VelSet
trigger1 = Time = 0
y = 0

[State 5100, 6] 
type = VelMul
trigger1 = Time = 0
x = 0.75

[State 5100, 8]
type = GameMakeAnim
trigger1 = Time = 1
value = 60 + (sysvar(1) > 5) + (sysvar(1) > 14)
pos = 0, 0
under = sysvar(1) <= 10

[State 5100, 9]
type = HitFallDamage
trigger1 = Time = 3

[State 5100, 10]
type = PlaySnd
trigger1 = Time = 1
value = F7, (sysvar(1) > 5) + (sysvar(1) > 14)

[State 5100, 11]
type = PosFreeze
trigger1 = 1

[State 5100, 12]
type = changeState
trigger1 = AnimTime = 0
value = 4010

[State 5100, 13]
type = ForceFeedback
trigger1 = Time = 0
waveform = sinesquare
ampl = 128,-3,-.2,.005
time = 20
;-----------------------------------
; HIT_BOUNCE (bounce into air)
[Statedef 4010]
type    = L
movetype= H
physics = N

[State 1221, 3]
type = velset
trigger1 = time = 0 && sysvar(3) != 1
x = -4
y = -5
[State 1221, 3]
type = velset
trigger1 = time = 0 && sysvar(3) = 1
x = -2
y = -5

[State 5101, 1]
type = nothitby
trigger1 = 1
value = SCA

[State 5101, 1] 
type = ChangeAnim
triggerall = time = 0
trigger1 = anim != [5101,5109]
trigger2 = !SelfAnimExist(5160 + (anim % 10))
value = 5160

[State 5101, 2] 
type = ChangeAnim
triggerall = time = 0
trigger1 = anim = [5101,5109]
trigger1 = SelfAnimExist(5160 + (anim % 10))
value = 5160 + (anim % 10)

[State 5101, 4]
type = PosSet
trigger1 = Time = 0
y = 20

[State 5101, 5] 
type = VelAdd
trigger1 = sysvar(3) != 1
y = .75
[State 5101, 5] 
type = VelAdd
trigger1 = sysvar(3) = 1
y = .5
[State 5101, 6] 
type = nothitby
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 20
trigger1 = time > 9 && sysvar(3) = 1
trigger2 = time = 10 && sysvar(3) != 1
value = SCA
time = 1

[State 5101, 6] 
type = selfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 20
trigger1 = time > 9 && sysvar(3) = 1
trigger2 = time = 10 && sysvar(3) != 1
value = 5110

;darkness Scorch(c)
[Statedef 2599]
type    = S
movetype= A
physics = S
ctrl = 0
anim = 798
facep2 = 1
velset = 0,0
sprpriority = 0

[State 1300, 5]
type = helper
trigger1 = animelem = 1
stateno = 2702
pos = 25,-23    

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 1

[State 7000, 0]
type = posset
trigger1 = time = 0
trigger1 = pos y != 0
y = 0

[State 1300, 5]
type = projectile
trigger1 = animelem = 3,1
projanim = 1001
offset = 0,0
projsprpriority = 1
projremovetime = 23
projedgebound = 210

[State 7000, 0]
type = nothitby
trigger1 = 1
value = SCA

[State 1531, 5]
type = playsnd
trigger1 = animelem = 1
value = s1,7

[State 2100, 5]
type = Explod
trigger1 = time = 1
anim = 12000
sprpriority = -1
pos = -25,-101
supermove = 1
bindtime = -1
ownpal = 1

[State 210, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 2700
;-------------------------------------
;max2
[Statedef 2219]
type    = S
movetype= A
physics = N
ctrl = 0
anim = 2219
facep2 = 1
velset = 0,0
sprpriority = 0

[state 182, 1]
type = varset
trigger1 = time = 29
var(20) = 10
[state 182, 1]
type = varset
trigger1 = time = 0
var(3) = 0

[State 1022, 7]
type = Posadd
trigger1 = animelem = 16
x = 16
[State 1022, 7]
type = Posadd
trigger1 = animelem = 17
x = 5

[State 1300, 5]
type = Envcolor
trigger1 = Time = 0
persistent = 0
ignorehitpause = 1
value = 255,255,255
time = 4
under = 1
supermove = 1
[State 1300, 5]
type = Envcolor
trigger1 = Time = 4
persistent = 0
ignorehitpause = 1
value = 0, 0, 0
time = 24
under = 1
supermove = 1

[State 1531, 5]
type = playsnd
trigger1 = time = 0
value = s9,1
[State 50, 4]
type = PlaySnd
trigger1 = animelem = 7
value = s2,3

[State 4120, 1]
type = SuperPause
trigger1 = time = 0
movetime = 28
p2defmul = 1
time = 29
darken = 0
anim = -1

[State 2100, 4]
type = Explod
trigger1 = time = 12
anim = 12002
sprpriority = 7
pos = -17,-79
supermove = 1
bindtime = -1
ownpal = 1

[State 2100, 5]
type = Explod
trigger1 = time = 2
anim = 1202
sprpriority = -1
pos = -5,-85
supermove = 1
bindtime = -1
ownpal = 1

[State 2100, 5]
type = statetypeset
trigger1 = animelem = 6
value = A

[State 2100, 5]
type = velset
trigger1 = animelem = 6
x = 13
y = -8
[State 2100, 5]
type = veladd
trigger1 = time > 26 && time < 46
y = .8
[State 2100, 5]
type = velset
trigger1 = animelem = 11
x = 0
y = 0
[State 2100, 5]
type = posset
trigger1 = animelem = 11
y = 0
[State 5040, 1]
type = nothitby
trigger1 = animtime < 0
value = SCA

[State 260, 3] 
type = Afterimage
trigger1 = time = 25
time = 2
length = 7
FrameGap = 2
paladd = 80,60,160
[State 3000, 2]
type = AfterImagetime
trigger1 = time%2 = 0 && time > 25 && time < 46
time = 2
[State 260, 3] 
type = Afterimage
trigger1 = time = 46
time = 0

[State 260, 3]
type = width
trigger1 = time > 45 && time < 72
value = 25

[State 3060, 1]
type = HitDef
trigger1 = AnimElem = 11
trigger1 = p2stateno != 7605 && p2stateno != 7705 && p2stateno != 7805
attr = S, HT
id = 2219
animtype = h
damage = 0
hitflag = M
guardflag = -1
pausetime = 0,0
getpower = 0,0
givepower = 0,0
priority = 7,miss
sparkno = -1
sparkxy = -15-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-45
hitonce = 1
p1stateno = 2220
p2stateno = 2225
ground.type = high
p2facing = 1

[State 3060, 1]
type = HitDef
trigger1 = AnimElem = 11
trigger1 = p2stateno = 7605 || p2stateno = 7705 || p2stateno = 7805
attr = S, HT
id = 2219
animtype = h
damage = 0
hitflag = MA
guardflag = -1
pausetime = 0,0
getpower = 0,0
givepower = 0,0
priority = 7,miss
sparkno = -1
sparkxy = -15-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-45
hitonce = 1
p1stateno = 2220
p2stateno = 2225
ground.type = high
p2facing = 1

[State 240, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[State 240, 4]
type = Changeanim
trigger1 = Time = 0 && prevstateno = 2220
value = 2219
elem = 12
;-------------------------------------
[Statedef 2220];max2 success
type    = S
movetype= A
physics = N
ctrl = 0
anim = 2220
velset = 0,0
sprpriority = 1

[State 7800, 3]
type = BGPalfx
trigger1 = animtime < -2
ignorehitpause = 1
supermove = 1
time = 2
add = 358,44,44
mul = 113,0,0
invertall = 1

[State 1022, 7]
type = Posadd
trigger1 = animelem = 5
x = 16

[State 100, 5]
type = ChangeState
triggerall = time = 1
trigger1 = numtarget(2219) > 0
trigger1 = target(2219),stateno != 2225
trigger2 = numtarget(2219) = 0
value = 2219

[State 260, 3]
type = width
trigger1 = time = [0,119]
value = 60

[State 2, 2]
type = varset
trigger1 = time = 0
var(4) = 0

[State 2, 2]
type = varset
triggerall = time = 1 && numtarget(2219) > 0
trigger1 = target(2219),name = "Kyo kusanagi"
trigger2 = target(2219),name = "neoKyo"
trigger3 = target(2219),Name = "Kyo98"
trigger4 = target(2219),name = "Kyo mk-2"
trigger5 = target(2219),Name = "Kyo99"
trigger6 = target(2219),Name = "Kyo2k"
trigger7 = target(2219),name = "Kyo2000"
trigger8 = target(2219),name = "kyo00"
trigger9 = target(2219),Name = "Kyo2k1"
trigger10 = target(2219),name = "Kyo2001"
trigger11 = target(2219),name = "kyo01"
trigger12 = target(2219),Name = "Kyo2k2"
trigger13 = target(2219),name = "Kyo2002"
trigger14 = target(2219),name = "kyo02"
trigger15 = target(2219),name = "kyo_svc"
trigger16 = target(2219),name = "kyo_svc"
trigger17 = target(2219),name = "kyo'94"
trigger18 = target(2219),name = "kyo'94"
trigger19 = target(2219),Name = "R_kyo"
trigger20 = target(2219),name = "kyo03"
trigger21 = target(2219),name = "kyo2003"
trigger22 = target(2219),name = "kyo2k3"
var(4) = 1

[State 912, 5]
type = PlaySnd
trigger1 = animelem = 3 && var(4) = 0
value = s9,3
channel = 1
[State 912, 5]
type = PlaySnd
trigger1 = animelem = 3 && var(4) = 1
value = s27,7
[State 912, 5]
type = PlaySnd
trigger1 = time = 75 && var(4) = 1
value = s9,2
channel = 1

[State 912, 5]
type = PlaySnd
trigger1 = time = 95
value = s7,2
[State 912, 5]
type = PlaySnd
trigger1 = time = 96
value = s19,2
volume = 255

[State 192, 4]
type = explod
trigger1 = time = 96
anim = 7630
pos = 108,3
sprpriority = 3
persistent = 0
ownpal = 1

[State 1531, 5]
type = envshake
trigger1 = time = 95
persistent = 0
time = 30
ampl = -5
freq = 255
phase = 10

[State 912, 5]
type = targetlifeadd
trigger1 = time = 98
value = -460
id = 2219

[State 1300, 3]
type = targetbind
trigger1 = time = [0,2]
pos = 60,-57
id = 2219
ignorehitpause = 1

[State 1300, 3]
type = targetbind
trigger1 = time = 3
pos = 58,0
id = 2219
ignorehitpause = 1

[State 8160, 13]
type = Explod
trigger1 = Time >= 95
trigger1 = Time <= 107
trigger1 = NumExplod(8150) < 6
trigger1 = Random < 450
anim = 3100
ID = 8150
sprpriority = 5
pos = 75,-5
random = 120,40
ignorehitpause = 1
ownpal = 1

[State 8160, 14]
type = Explod
trigger1 = Time >= 95
trigger1 = Time <= 107
trigger1 = NumExplod(3100) < 5
trigger1 = Random < 400
anim = 3110
ID = 3100
sprpriority = 5
pos = 75,-5
random = 120,40
ignorehitpause = 1
ownpal = 1

[State 8160, 15]
type = Explod
trigger1 = Time >= 95
trigger1 = Time <= 107
trigger1 = NumExplod(3100) < 5
trigger1 = Random < 450
anim = 3120
ID = 3100
sprpriority = 5
pos = 75,-5
random = 120,40
ignorehitpause = 1
ownpal = 1

[State 8160, 16]
type = Explod
trigger1 = Time >= 95
trigger1 = Time <= 107
trigger1 = NumExplod(3100) < 5
trigger1 = Random < 400
anim = 3130
ID = 3100
sprpriority = 5
pos = 75,-5
random = 120,40
ignorehitpause = 1
ownpal = 1

[State 8160, 17]
type = Explod
trigger1 = Time >= 95
trigger1 = Time <= 107
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 600
anim = 3140
ID = 3100
sprpriority = 5
pos = 75,-5
random = 120,40
ignorehitpause = 1
ownpal = 1

[State 8160, 18]
type = Explod
trigger1 = Time >= 95
trigger1 = Time <= 107
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 600
anim = 3150
ID = 3100
sprpriority = 5
pos = 75,-5
random = 120,40
ignorehitpause = 1
ownpal = 1

[State 240, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;----------------------------------
; Getting hit by max2
[Statedef 2225]
type     = L
movetype = H
physics  = N
ctrl = 0
velset = 0,0

[State 1531, 5]
type = defencemulSet
trigger1 = 1
value = 1

[State 1221, 4]
type = changeanim2
Trigger1 = Time = 0
value = 2225

[State 3305, 2]
type = PalFX
trigger1 = animtime = -1
time = 9
add = 48,0,168
mul = 166,166,166
sinadd = 96,96,96,12
color = 0
invertall = 1

[State 1221, 4]
type = changestate
Trigger1 = animTime = 0
value = 2226
ctrl = 0
;------------------------------------
[Statedef 2226];into air
type    = L
movetype= H
physics = N

[State 1531, 5]
type = turn
trigger1 = time = 0 && prevstateno = 2416

[State 1221, 3]
type = velset
trigger1 = time = 0 && prevstateno != 2416
x = -4.5
y = -8.4
[State 1221, 3]
type = velset
trigger1 = time = 0 && prevstateno = 2416
x = 4.5
y = -8.4
[State 1221, 3]
type = posadd
trigger1 = time = 0 && prevstateno = 2416
x = -30

[State 1531, 5]
type = defencemulSet
trigger1 = 1
value = 1

[State 3305, 2]
type = PalFX
trigger1 = time = 8
time = 9
add = 96,48,216
mul = 166,166,166
sinadd = 64,64,64,24
color = 0

[State 3305, 2]
type = PalFX
trigger1 = time = 17
time = 9
add = 48,0,168
mul = 166,166,166
sinadd = 96,96,96,12
color = 0
invertall = 1

[State 325, 0]
type = changeanim
trigger1 = time = 0
value = 5050

[State 5101, 1]
type = posadd
trigger1 = time = 0
x = 10

[State 5101, 1]
type = nothitby
trigger1 = 1
value = SCA

[State 5101, 5] 
type = VelAdd
trigger1 = 1
y = .6

[State 5101, 6] 
type = changeState
trigger1 = time = 26 && prevstateno != 2416
value = 4009
[State 5101, 6] 
type = changeState
trigger1 = time = 26 && prevstateno = 2416
value = 2407
;-------------------------------------
;darkness Scorch
[Statedef 2600]
type    = S
movetype= A
physics = S
ctrl = 0
anim = 800
facep2 = 1
velset = 0,0
sprpriority = 0

[State 1300, 5]
type = helper
trigger1 = animelem = 1
stateno = 2702
pos = 25,-23    

[state 182, 1]
type = varset
trigger1 = time = 0 && var(3) > 0
var(5) = 1
[state 182, 1]
type = varset
trigger1 = time = 0 && var(3) < 1
var(5) = 0

[state 182, 1]
type = varadd
trigger1 = time = 16 && var(5) = 0
var(20) = 10
[state 182, 1]
type = varset
trigger1 = time = 0 && var(3) > 0
var(3) = 0

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 1

[State 7000, 0]
type = posset
trigger1 = time = 0
trigger1 = pos y != 0
y = 0

[State 1300, 5]
type = projectile
trigger1 = animelem = 3,1
projanim = 1001
offset = 0,0
projsprpriority = 1
projremovetime = 23
projedgebound = 210

[State 7000, 0]
type = nothitby
trigger1 = 1
value = SCA

[State 1531, 5]
type = playsnd
trigger1 = animelem = 1,2
value = s1,7

[State 1300, 5]
type = Envcolor
trigger1 = animelem = 1,2
persistent = 0
ignorehitpause = 1
value = 255,255,255
time = 4
under = 1
supermove = 1

[State 1300, 5]
type = Envcolor
trigger1 = animelem = 2
persistent = 0
ignorehitpause = 1
value = 0,0,0
time = 24
under = 1
supermove = 1

[State 4120, 1]
type = superPause
trigger1 = animelem = 1,2
movetime = 13
p2defmul = 1
time = 28
anim = -1

[State 2100, 4]
type = Explod
trigger1 = time = 14
anim = 12000
sprpriority = 2
pos = -25,-101
supermove = 1
ownpal = 1

[State 2100, 5]
type = Explod
trigger1 = time = 4
anim = 1200
sprpriority = -1
pos = -15,-103
supermove = 1
ownpal = 1

[State 210, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 2700

[Statedef 2609]  ; y(c)
type    = S
movetype= A
physics = S
ctrl = 0
anim = 799
facep2 = 1
velset = 0,0
sprpriority = 0

[State 1300, 5]
type = helper
trigger1 = animelem = 1
stateno = 2702
pos = 25,-23    

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 1

[State 7000, 0]
type = posset
trigger1 = time = 0
trigger1 = pos y != 0
y = 0

[State 1300, 5]
type = projectile
trigger1 = animelem = 3,1
projanim = 1001
offset = 0,0
projsprpriority = 1
projremovetime = 23
projedgebound = 210

[State 7000, 0]
type = nothitby
trigger1 = 1
value = SCA

[State 1531, 5]
type = playsnd
trigger1 = animelem = 1
value = s1,7

[State 2100, 5]
type = Explod
trigger1 = time = 1
anim = 12000
sprpriority = -1
pos = -25,-101
supermove = 1
bindtime = -1
ownpal = 1

[State 210, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 2700

[Statedef 2610]  ; y
type    = S
movetype= A
physics = S
ctrl = 0
anim = 801
facep2 = 1
velset = 0,0
sprpriority = 0

[State 1300, 5]
type = helper
trigger1 = animelem = 1
stateno = 2702
pos = 25,-23    

[state 182, 1]
type = varset
trigger1 = time = 0 && var(3) > 0
var(5) = 1
[state 182, 1]
type = varset
trigger1 = time = 0 && var(3) < 1
var(5) = 0

[state 182, 1]
type = varadd
trigger1 = time = 17 && var(5) = 0
var(20) = 10
[state 182, 1]
type = varset
trigger1 = time = 0 && var(3) > 0
var(3) = 0

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 1

[State 7000, 0]
type = posset
trigger1 = time = 0
trigger1 = pos y != 0
y = 0

[State 1300, 5]
type = projectile
trigger1 = animelem = 3,1
projanim = 1001
offset = 0,0
projsprpriority = 1
projremovetime = 23
projedgebound = 210

[State 7000, 0]
type = nothitby
trigger1 = 1
value = SCA

[State 1531, 5]
type = playsnd
trigger1 = animelem = 1,3
value = s1,7

[State 1300, 5]
type = Envcolor
trigger1 = animelem = 1,3
persistent = 0
ignorehitpause = 1
value = 255,255,255
time = 4
under = 1
supermove = 1

[State 1300, 5]
type = Envcolor
trigger1 = animelem = 2
persistent = 0
ignorehitpause = 1
value = 0,0,0
time = 24
under = 1
supermove = 1

[State 4120, 1]
type = SuperPause
trigger1 = animelem = 1,3
movetime = 13
p2defmul = 1
time = 28
anim = -1

[State 2100, 4]
type = Explod
trigger1 = time = 15
anim = 12000
sprpriority = 2
pos = -25,-101
supermove = 1
ownpal = 1

[State 2100, 5]
type = Explod
trigger1 = time = 5
anim = 1200
sprpriority = -1
pos = -15,-103
supermove = 1
ownpal = 1

[State 210, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 2700

[Statedef 2700] ;attack
type    = S
movetype= A
physics = S
ctrl = 0
anim = 802

[State 1000, 1]
type = varset
trigger1 = time = 26 || animelem = 34
var(34) = 0

[State 1000, 1]
type = varset
trigger1 = time = 33
var(34) = 1

[State 5040, 1]
type = nothitby
trigger1 = time <= 6
value = SCA

[State 210, 3]
type = varset
trigger1 = time = 0 || animtime = -9
var(18) = 0

[State 210, 3]
type = varset
trigger1 = projcontact2700 = 1 
var(18) = 1

[State 210, 3]
type = playsnd
trigger1 = time = 0
value = s8,3
channel = 1

[State 210, 3]
type = playsnd
trigger1 = animelem = 24
value = s8,4
channel = 1

[State 522, 1]
type = PlaySnd
trigger1 = animelem = 2
trigger2 = animelem = 9
value = s6,1
[State 522, 1];svc
type = PlaySnd
trigger1 = animelem = 1
trigger2 = animelem = 8
value = s27,1

[State 9001, 2]
type = Pause
trigger1 = p2movetype = H
trigger1 = projhit2701 = 1,< 70
trigger1 = time >= 50 && time <= 61
time = 1

[State 1000, 4]
type = Projectile
trigger1 = animelem = 2
attr = SC,HP
projanim = 807
projRemoveTime = 14
projpriority = 99
offset = 0,0    

[State 9001, 3]
type = Envcolor
trigger1 = projhit2700 = 1 || projhit2701 = 1
value = 255,255,255
time = 1
under = 1

[State 1000, 4]
type = projectile
trigger1 = animelem = 2
attr = SC,HP
projanim = 804
projRemoveTime = 19
projhitanim = 804
projsprpriority = 4
projID = 2700
offset = 0,0    
damage = 92,10
priority = 7,Hit
animtype = hard         
guardflag = M
pausetime = 0,12
getpower = 0,0
givepower = 21,21
ground.slidetime = 24 
ground.hittime  = 24  
guard.slidetime = 30-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,14,0)
guard.hittime  = 30-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,14,0)
ground.velocity = 0
air.animtype = d
air.velocity = -1,-2
air.juggle = 8
palfx.time = 36
palfx.add = 48,0,168
palfx.mul = 166,166,166
palfx.sinadd = 96,96,96,17
palfx.color = 0 
palfx.invertall = 1 
sparkno = s9241
guard.sparkno = s10111
sparkxy = 79,-40
ground.type = Low                
air.fall = 1                            
fall.recover = 0

[State 1300, 5]
type = projectile
trigger1 = animelem = 9
projanim = 809
offset = 3,0
projremovetime = 4
projsprpriority = -1

[State 1000, 4]
type = Projectile
trigger1 = animelem = 9
attr = SC,HP
projanim = 808
projRemoveTime = 20
projpriority = 99
offset = 0,0    

[State 1000, 4]
type = Projectile
trigger1 = animelem = 9 && var(18) = 1
attr = SC,HP
projanim = 805
projRemoveTime = 33
projhitanim = 805
projsprpriority = 4
projID = 2701
offset = 3,0    
damage = 92,10
animtype = d
guardflag = M
pausetime = 0,14
getpower = 0,0
givepower = 21,21
ground.slidetime = 31
ground.hittime  = 31
guard.slidetime = 31-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,15,0)
guard.hittime = 31-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,15,0)
ground.velocity = 0,-11.5
air.velocity = 0,-11.5
palfx.time = 60  
palfx.add = 48,0,168
palfx.mul = 166,166,166
palfx.sinadd = 96,96,96,17
palfx.color = 0 
palfx.invertall = 1 
sparkno = s9241
guard.sparkno = s10111
sparkxy = 79,-40
yaccel = .5
hitsound   = s4,1
ground.type = Low                
fall = 1                            
fall.recover = 1
fall.recovertime = 59

[State 1000, 4]
type = Projectile
trigger1 = animelem = 9 && var(18) = 0
attr = SC,HP
projanim = 805
projRemoveTime = 33
projhitanim = 805
projsprpriority = 4
projID = 2701
offset = 3,0    
damage = 92,10
animtype = d
guardflag = M
pausetime = 0,14
getpower = 0,0
givepower = 21,21
ground.slidetime = 31
ground.hittime  = 31
guard.slidetime = 31-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,15,0)
guard.hittime = 31-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,15,0)
ground.velocity = 0,-11.5
air.velocity = 0,-11.5
air.juggle = 5
palfx.time = 60  
palfx.add = 48,0,168
palfx.mul = 166,166,166
palfx.sinadd = 96,96,96,17
palfx.color = 0 
palfx.invertall = 1 
sparkno = s9241
guard.sparkno = s10111
sparkxy = 79,-40
hitsound   = s4,1
ground.type = Low                
yaccel = .5
fall = 1                            
fall.recover = 1
fall.recovertime = 59

[State 1300, 5]
type = projectile
trigger1 = animelem = 12 && var(18) = 1
projanim = 810
offset = 65,-23    
projsprpriority = 3
projremovetime = 54
projedgebound = 210

[State 1000, 4]
type = Helper
trigger1 = animelem = 24
name = "fin"
pos = 65,-23  
stateno = 2701
ownpal = 1
id = 2702

[State 1300, 5]
type = explod
trigger1 = animelem = 14
anim = 803
pos = 0,0
id = 1311
postype = p1
sprpriority = 2
ownpal = 1

[State 210, 3]
type = ChangeState
trigger1 = Animelem = 12
trigger1 = var(18) = 0
value = 2710

[State 210, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[Statedef 2701] ;attack
type    = S
movetype= A
ctrl = 0
anim = 811
sprpriority = 4

[State 7000, 7]
type = changeanim
trigger1 = animtime = 0
value = 12362

[State 7000, 7]
type = Explod
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 600 && time < 50
trigger1 = movehit > 0
trigger1 = p2movetype = H
anim = 3100
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7000, 8]
type = Explod
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 600 && time < 50
trigger1 = movehit > 0
trigger1 = p2movetype = H
anim = 3110
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7000, 9]
type = Explod
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 600 && time < 50
trigger1 = movehit > 0
trigger1 = p2movetype = H
anim = 3120
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7000, 10]
type = Explod
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 500
trigger1 = movehit > 0
trigger1 = p2movetype = H
anim = 3130
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7000, 11]
type = Explod
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 500
trigger1 = movehit > 0
trigger1 = p2movetype = H
anim = 3140
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7000, 12]
type = Explod
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 500
trigger1 = movehit > 0
trigger1 = p2movetype = H
anim = 3150
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 1203, 5]
type = Envshake
trigger1 = time = 8
time = 21
freq = 255
ampl = -6
ignorehitpause = 1

[State 9001, 3]
type = Envcolor
trigger1 = movehit > 0
value = 255,255,255
persistent = 0
time = 1
under = 1

[State 9001, 2]
type = Pause
trigger1 = p2movetype = H
trigger1 = movehit > 0
trigger1 = time >= 25 && time <= 36
time = 1

[State 1203, 5]
type = playsnd
trigger1 = time = 1
value = s8,5

[State 1000, 4]
type = Projectile
trigger1 = time = 0
attr = SC,HP
projanim = 814
projRemoveTime = 29
projpriority = 99
offset = 0,0    

[State 1002, 4]
type = Targetstate
trigger1 = movehit > 0
value = 2705
persistent = 0
ignorehitpause = 1
id = 2702

[State 3000]
type = explod
trigger1 = movehit > 0
anim = 9244
postype = p2
pos = 5,-10
facing = -1
persistent = 0
sprpriority = 6
ownpal = 1

[State 1000, 4]
type = hitdef
trigger1 = time = 0
attr = C,HP
ID = 2702
damage = 96,10
priority = 7,Hit
animtype = d         
guardflag = M
pausetime = 0,12
getpower = 0,0
givepower = 21,21
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
ground.slidetime = 30
ground.hittime  = 30
guard.slidetime = 30-ifelse((root,var(1))=1000||(root,var(1))=500||(root,var(1))=750||(root,var(1))=667,14,0)
guard.hittime = 30-ifelse((root,var(1))=1000||(root,var(1))=500||(root,var(1))=750||(root,var(1))=667,14,0)
ground.velocity = -2,-15
guard.velocity = -12
air.velocity = -2,-14
palfx.time = 60
palfx.add = 48,0,168
palfx.mul = 166,166,166
palfx.sinadd = 96,96,96,17
palfx.color = 0 
palfx.invertall = 1 
sparkno = -1
guard.sparkno = s10111
p2facing = 1
sparkxy = 3-ifelse((root,var(1))=1000||(root,var(1))=500||(root,var(1))=750||(root,var(1))=667,16,0),-30
guardsound = s1,0
ground.type = Low                
fall = 1                            
fall.recover = 0
yaccel = .6
fall.yvelocity = -3.6

[State 1300, 5]
type = projectile
trigger1 = time = 29
projanim = 813
offset = 0,0    
projsprpriority = 4
projremovetime = 11
projedgebound = 210

[State 1300, 5]
type = statetypeset
trigger1 = time = 40
movetype = I

[State 1000, 4]
type = destroyself
trigger1 = time = 79

[Statedef 2703] ;attack
type    = S
movetype= A
ctrl = 0
anim = 2022

[State 1000, 4]
type = sprpriority
trigger1 = 1
value = 5

[State 1000, 4]
type = parentvarset
trigger1 = movehit > 0
var(18) = 1
ignorehitpause = 1
persistent = 0

[State 7000, 7]
type = changeanim
trigger1 = animtime = 0
value = 12362

[State 7000, 7]
type = Explod
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 600 && time < 66
trigger1 = movehit > 0
trigger1 = p2movetype = H
anim = 3100
ID = 3100
sprpriority = 6
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7000, 8]
type = Explod
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 600 && time < 66
trigger1 = movehit > 0
trigger1 = p2movetype = H
anim = 3110
ID = 3100
sprpriority = 6
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7000, 9]
type = Explod
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 600 && time < 66
trigger1 = movehit > 0
trigger1 = p2movetype = H
anim = 3120
ID = 3100
sprpriority = 6
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7000, 10]
type = Explod
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 500
trigger1 = movehit > 0
trigger1 = p2movetype = H
anim = 3130
ID = 3100
sprpriority = 6
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7000, 11]
type = Explod
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 500
trigger1 = movehit > 0
trigger1 = p2movetype = H
anim = 3140
ID = 3100
sprpriority = 6
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7000, 12]
type = Explod
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 500
trigger1 = movehit > 0
trigger1 = p2movetype = H
anim = 3150
ID = 3100
sprpriority = 6
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 1203, 5]
type = Envshake
trigger1 = time = 0
time = 34
freq = 255
ampl = -5
ignorehitpause = 1

[State 9001, 3]
type = Envcolor
trigger1 = movehit > 0
value = 255,255,255
persistent = 0
time = 1
under = 1

[State 9001, 2]
type = Pause
trigger1 = p2movetype = H
trigger1 = movehit > 0
trigger1 = time >= 20 && time <= 31
time = 1

[State 1203, 5]
type = playsnd
trigger1 = time = 1
value = s7,2

[State 1000, 4]
type = Projectile
trigger1 = time = 0
attr = SC,HP
projanim = 2023
projRemoveTime = 21
projpriority = 99
offset = 0,0    

[State 1002, 4]
type = Targetstate
trigger1 = movehit > 0
value = 2706
persistent = 0
ignorehitpause = 1
id = 2702

[State 1000, 4]
type = hitdef
trigger1 = time = 0
attr = C,HP
ID = 2702
damage = 120,10
priority = 7,Hit
animtype = d         
guardflag = M
pausetime = 1,12
getpower = 0,0
givepower = 21,21
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
ground.slidetime = 30 
ground.hittime  = 30  
guard.slidetime = 30-ifelse((root,var(1))=1000||(root,var(1))=500||(root,var(1))=750||(root,var(1))=667,14,0)
guard.hittime = 30-ifelse((root,var(1))=1000||(root,var(1))=500||(root,var(1))=750||(root,var(1))=667,14,0)
ground.velocity = -2,-15
guard.velocity = -12
air.velocity = -2,-14
palfx.time = 68
palfx.add = 48,0,168
palfx.mul = 166,166,166
palfx.sinadd = 96,96,96,17
palfx.color = 0 
palfx.invertall = 1 
sparkno = -1
guard.sparkno = s10111
p2facing = 1
sparkxy = 3-ifelse((root,var(1))=1000||(root,var(1))=500||(root,var(1))=750||(root,var(1))=667,16,0),-30
guardsound = s1,0
ground.type = Low                
fall = 1                            
fall.recover = 0
yaccel = .6
fall.yvelocity = -3.6

[State 1300, 5]
type = projectile
trigger1 = time = 20
projanim = 813
offset = 0,0    
projsprpriority = 4
projremovetime = 11
projedgebound = 210

[State 1300, 5]
type = statetypeset
trigger1 = time = 31
movetype = I

[State 1000, 4]
type = destroyself
trigger1 = time = 78

[Statedef 2702]
type    = S
movetype= A
ctrl = 0
anim = 844

[State 1000, 4]
type = bindtoparent
trigger1 = 1
pos = 25,-23

[State 1000, 4]
type = destroyself
trigger1 = time = 110
trigger2 = parent,stateno != 2700 && parent,stateno != 2710 && parent,stateno != 2599 && parent,stateno != 2600 && parent,stateno != 2609 && parent,stateno != 2610

[Statedef 2705]
type = A
movetype = H
physics = N
ctrl = 0
anim = 5030

[State 3010, 1]
type = DefenceMulSet
trigger1 = time = 0
value = 1

[State 3010, 1]
type = nothitby
trigger1 = 1
value = SCA

[State 3305, 2]
type = PalFX
trigger1 = time = 0 || time = 18 || time = 36
time = 9
add = 48,0,168
mul = 166,166,166
sinadd = 96,96,96,12
color = 0
invertall = 1

[State 3305, 2]
type = PalFX
trigger1 = time = 9 || time = 27 || time = 45
time = 9
add = 96,48,216
mul = 166,166,166
sinadd = 64,64,64,24
color = 0

[State 3305, 2]
type = PalFX
trigger1 = time = 54
time = 7
add = 48,0,168
mul = 166,166,166
sinadd = 96,96,96,12
color = 0
invertall = 1

[State 3010, 7]
type = posfreeze
trigger1 = time < 12

[State 3010, 6]
type = ForceFeedBack
trigger1 = time = 12
time = 1
waveform = square

[State 3010, 7]
type = posadd
trigger1 = time = 12
y = -10

[State 3010, 9]
type = ChangeAnim2
trigger1 = time = 12
value = 3010

[State 3010, 10]
type = HitVelSet
trigger1 = time = 0
persistent = 0
x = 1
y = 1

[State 3010, 11]
type = VelAdd
trigger1 = time >= 12
y = 0.6

[State 3010, 4]
type = EnvShake
trigger1 = time > 3
trigger1 = pos y >= 5
trigger1 = vel y > 0
time = 20
ampl = 2
freq = 255

[State 1021, 5]
type = Changestate
trigger1 = Anim = 3010
trigger1 = selfanimexist(5102)
trigger1 = selfanimexist(5162)
trigger1 = selfanimexist(5112)
trigger1 = time > 3
trigger1 = pos y >= 5
trigger1 = vel y > 0
value = 3011

[State 3010, 12]
type = SelfState
trigger1 = Anim = 3010
trigger1 = time > 3
trigger1 = (Vel Y > 0) && (Pos Y >= 5)
value = 5100

[Statedef 2706]
type = A
movetype = H
physics = N
ctrl = 0
anim = 5030

[State 3010, 1]
type = DefenceMulSet
trigger1 = time = 0
value = 1

[State 3010, 1]
type = nothitby
trigger1 = 1
value = SCA

[State 3305, 2]
type = PalFX
trigger1 = time = 0 || time = 18 || time = 36 || time = 54
time = 9
add = 48,0,168
mul = 166,166,166
sinadd = 96,96,96,12
color = 0
invertall = 1

[State 3305, 2]
type = PalFX
trigger1 = time = 9 || time = 27 || time = 45
time = 9
add = 96,48,216
mul = 166,166,166
sinadd = 64,64,64,24
color = 0

[State 3305, 2]
type = PalFX
trigger1 = time = 63
time = 4
add = 96,48,216
mul = 166,166,166
sinadd = 64,64,64,24
color = 0

[State 3010, 7]
type = posfreeze
trigger1 = time < 12

[State 3010, 6]
type = ForceFeedBack
trigger1 = time = 12
time = 1
waveform = square

[State 3010, 7]
type = posadd
trigger1 = time = 12
y = -10

[State 3010, 9]
type = ChangeAnim
trigger1 = time < 12
trigger1 = selfanimexist(5050)
value = 5050

[State 3010, 9]
type = ChangeAnim2
trigger1 = time = 12
value = 3010

[State 3010, 10]
type = HitVelSet
trigger1 = time = 0
persistent = 0
x = 1
y = 1

[State 3010, 11]
type = VelAdd
trigger1 = time >= 12
y = 0.6

[State 3010, 4]
type = EnvShake
trigger1 = time > 3
trigger1 = pos y >= 5
trigger1 = vel y > 0
time = 20
ampl = 2
freq = 255

[State 1021, 5]
type = Changestate
trigger1 = Anim = 3010
trigger1 = selfanimexist(5102)
trigger1 = selfanimexist(5162)
trigger1 = selfanimexist(5112)
trigger1 = time > 3
trigger1 = pos y >= 5
trigger1 = vel y > 0
value = 3011

[State 3010, 12]
type = SelfState
trigger1 = Anim = 3010
trigger1 = time > 3
trigger1 = (Vel Y > 0) && (Pos Y >= 5)
value = 5100

[Statedef 2710]    ;fail
type    = S
movetype= A
physics = S
ctrl = 0
anim = 806

[State 1000, 4]
type = Helper
trigger1 = projhit2701 = 1
name = "pause"
pos = 0,0  
stateno = 2711
persistent = 0

[State 9001, 3]
type = Envcolor
trigger1 = projhit2701 = 1
value = 255,255,255
time = 1
under = 1

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 0

[State 210, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[Statedef 2711]
type    = A
movetype= A
physics = N
ctrl = 0
anim = 12342

[State 9001, 2]
type = pause
trigger1 = gametime%3 = 0
trigger1 = time >= 12
time = 1

[State 9001, 2]
type = destroyself
trigger1 = time >= 24
;--------------------------------------
; Scorch DM (start,counter)
[Statedef 6999]
type    = S
movetype= A
physics = S
juggle  = 0
ctrl = 0
anim = 6999
facep2 = 1
velset = 0,0
sprpriority = 0

[State 1000, 4]
type = Helper
trigger1 = time = 0
name = "n2"
pos = 250,0  
stateno = 2011

[State 1000, 4]
type = Helper
trigger1 = time = 0
name = "n2"
pos = 125,0
stateno = 2011

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 1

[State 7000, 0]
type = posset
trigger1 = time = 0
trigger1 = pos y != 0
y = 0

[State 7000, 0]
type = nothitby
trigger1 = animtime < 0
value = SCA

[State 7100, 1]
type = PosAdd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3
x = 12
[State 7100, 1]
type = PosAdd
trigger1 = AnimElem = 4
trigger2 = AnimElem = 5
x = 13

[State 1531, 5]
type = playsnd
trigger1 = animelem = 2
value = s1,7

[State 1531, 5]
type = PosFreeze
trigger1 = time >= 0

[State 1531, 5]
type = PlaySnd
trigger1 = AnimElem = 3
value = s17,0
channel = 1

[State 2100, 5]
type = Explod
trigger1 = animelem = 1
anim = 12000
sprpriority = 4
pos = -5,-79
supermove = 1
bindtime = -1
ownpal = 1

[State 210, 3]
type = ChangeState
trigger1 = var(55) = 0
trigger1 = AnimTime = 0
trigger1 = command = "hold_a"
value = 7003

[State 210, 3]
type = ChangeState
trigger1 = var(55) = 1
trigger1 = AnimTime = 0
trigger1 = p2bodydist X < 2
trigger1 = p2bodydist X > -10
trigger1 = random <= 500
value = 7003

[State 210, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 7001
;-------------------------------------
; Scorch DM (start)
[Statedef 7000]
type    = S
movetype= A
physics = S
juggle  = 0
ctrl = 0
anim = 7000
facep2 = 1
velset = 0,0
sprpriority = 0

[State 1000, 4]
type = Helper
trigger1 = time = 0
name = "n2"
pos = 250,0  
stateno = 2011

[State 1000, 4]
type = Helper
trigger1 = time = 0
name = "n2"
pos = 125,0  
stateno = 2011

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 1

[state 182, 1]
type = varset
trigger1 = time = 0 && var(3) > 0
var(5) = 1
[state 182, 1]
type = varset
trigger1 = time = 0 && var(3) < 1
var(5) = 0

[state 182, 1]
type = varadd
trigger1 = time = 6 && var(5) = 0
var(20) = 10
[state 182, 1]
type = varset
trigger1 = time = 0 && var(3) > 0
var(3) = 0

[State 7000, 0]
type = nothitby
trigger1 = animelem = 5,<0
value = SCA

[State 7100, 1]
type = PosAdd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3
x = 12
[State 7100, 1]
type = PosAdd
trigger1 = AnimElem = 4
trigger2 = AnimElem = 5
x = 13

[State 1300, 5]
type = Envcolor
trigger1 = animelem = 2
ignorehitpause = 1
value = 255,255,255
time = 3
under = 1
supermove = 1

[State 1300, 5]
type = Envcolor
trigger1 = animelem = 2,3
ignorehitpause = 1
value = 0, 0, 0
time = 24
under = 1
supermove = 1

[State 1531, 5]
type = playsnd
trigger1 = animelem = 2
value = s1,7

[State 1531, 5]
type = PosFreeze
trigger1 = time >= 0

[State 1531, 5]
type = PlaySnd
trigger1 = AnimElem = 3
value = s17,0
channel = 1

[State 4120, 1]
type = SuperPause
trigger1 = animelem = 2
movetime = 27
p2defmul = 1
time = 27
anim = -1

[State 2100, 4]
type = Explod
trigger1 = time = 0
anim = 12010
sprpriority = 7
pos = -5,-79
supermove = 1
bindtime = -1
ownpal = 1

[State 2100, 5]
type = Explod
trigger1 = time = 0
anim = 1210
sprpriority = -1
pos = -5,-79
supermove = 1
bindtime = -1
ownpal = 1

[State 210, 3]
type = ChangeState
trigger1 = var(55) = 0
trigger1 = AnimTime = 0
trigger1 = command = "hold_a"
value = 7003

[State 210, 3]
type = ChangeState
trigger1 = var(55) = 1
trigger1 = AnimTime = 0
trigger1 = p2bodydist X < 2
trigger1 = p2bodydist X > -10
trigger1 = random <= 500
value = 7003

[State 210, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 7001
;----------------------------------
; Scorch
[Statedef 7001]
type = a
physics = n
movetype = A
ctrl = 0                
anim = 7001
juggle = 8

[State 230, 1]
type = varset
trigger1 = time = 0 && prevstateno != 7004
var(12) = 0
[State 230, 1]
type = varadd
trigger1 = time > 0
var(12) = 1

[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 0 && var(12) < 3
value = 7001
elem = 1
[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 3 && var(12) < 8
value = 7001
elem = 2
[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 8 && var(12) < 14
value = 7001
elem = 3
[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 14 && var(12) < 15
value = 7001
elem = 4
[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 15 && var(12) < 16
value = 7001
elem = 5
[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 16
value = 7001
elem = 6

[State 522, 2]
type = VelSet
trigger1 = var(12) = 3
x = 8
y = -6.5

[State 52, 2]
type = VelAdd
trigger1 = var(12) >= 3
y = .51

[State 1300, 5]
type = projectile
trigger1 = var(12) = 15
projanim = 302
offset = 15,0
projsprpriority = 2
projremovetime = 14
projedgebound = 210

[State 522, 1]
type = PlaySnd
trigger1 = var(12) = 15
value = s6,1
[State 522, 1];svc
type = PlaySnd
trigger1 = var(12) = 15
value = s27,2

[State 182, 2]
type = varset
trigger1 = var(12) = 0
var(4) = 0

[State 182, 2]
type = varset
trigger1 = moveguarded > 0
var(4) = 1
ignorehitpause = 1
persistent = 0

[State 1000, 2]
type = ReversalDef
trigger1 = prevstateno != 7004 || (prevstateno = 7004 && time > 0)
trigger1 = var(12) < 15
reversal.attr = SCA,AA,AP
hitflag = MAFDP
pausetime = 0,10
p1stateno = 7004
sparkno = -1

[State 522, 3]
type = HitDef
trigger1 = var(5) < 2 && var(4) = 0 && var(12) >= 15
attr = SA,HA
animtype = hard
id = 7001
guardflag = H
getpower = 0,0
givepower = 21,21
pausetime = 4,8
guard.pausetime = 0,8
sparkno = s10006
guard.sparkno = s10111
sparkxy = 0-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-40
hitsound = s3,2
;snap = 0,-41
guardsound = s1,0
priority = 7,hit
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
ground.type = low
ground.slidetime = 30
ground.hittime = 30
guard.slidetime = 30-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,14,0)
guard.hittime = 30-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,14,0)
guard.velocity = -7 
air.velocity = -5,-3
hitonce = 1
p2facing = 1
fall = 1
kill = 0

[State 900, 1]
type = EnvColor
trigger1 = movehit > 0 && var(12) >= 15
value = 255, 255, 255
time = 1
under = 1
persistent = 0
ignorehitpause = 1

[State 182, 2]
type = varset
trigger1 = var(12) = 0
var(5) = 0

[State 182, 2]
type = varadd
triggerall = var(12) >= 15
trigger1 = movehit > 0
var(5) = 1

[State 182, 2]
type = movehitreset
triggerall = var(12) >= 15
triggerall = movehit > 0
trigger1 = numtarget(7001) = 0
trigger2 = numtarget(7001) > 0
trigger2 = target(7001),stateno != 5000 && target(7001),stateno != 5010 && target(7001),stateno != 5020
persistent = 0

[State 182, 2]
type = varset
triggerall = var(12) >= 15
trigger1 = numtarget(7001) > 0
trigger1 = target(7001),stateno = 5000 || target(7001),stateno = 5020 || target(7001),stateno = 5010
var(18) = 1
ignorehitpause = 1

[State 182, 2]
type = varset
triggerall = var(12) >= 15
trigger1 = numtarget(7001) = 0
trigger2 = numtarget(7001) > 0
trigger2 = target(7001),stateno != 5000 && target(7001),stateno != 5020 && target(7001),stateno != 5010
var(18) = 0
ignorehitpause = 1

[State 1002, 4]
type = Targetstate
triggerall = var(12) >= 15
trigger1 = movehit > 0 && numtarget(7001) > 0
value = 6993
id = 7001
ignorehitpause = 1
persistent = 0

[State 1002, 4]
type = changestate
triggerall = var(12) >= 15
trigger1 = movehit > 0 && var(18) = 1 && var(5) < 2
trigger2 = movehit > 0 && var(5) > 1
value = 7100
ignorehitpause = 1
persistent = 0

[State 522, 4]
type = ChangeState
trigger1 = var(12) >= 27
value = 7002
;----------------------------------
; Scorch(guard point)
[Statedef 7004]
type = a
physics = n
movetype = A
ctrl = 0                
anim = 7001
juggle = 8

[State 181, 2]
type = PlaySnd
trigger1 = time = 0
value = s1,0
channel = 9

[State 1300, 5]
type = projectile
trigger1 = time = 0 && numprojid(10011) < 2
projanim = 10011
projid = 10011
offset = 25-ifelse(p2bodydist X <= 20 && p2bodydist X >= -5,20-p2bodydist X,ifelse(p2bodydist X < -5,25,0)),-40+ifelse(p2bodydist y < 0 && p2bodydist y > -75,ceil(p2bodydist Y/1.5),ifelse(p2bodydist y <= -75,-50,0))
ignorehitpause = 1
projsprpriority = 3
projremovetime = 11
projedgebound = 210

[State 522, 2]
type = posfreeze
trigger1 = 1

[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 0 && var(12) < 3
value = 7001
elem = 1
[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 3 && var(12) < 8
value = 7001
elem = 2
[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 8 && var(12) < 14
value = 7001
elem = 3
[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 14 && var(12) < 15
value = 7001
elem = 4
[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 15 && var(12) < 16
value = 7001
elem = 5
[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 16
value = 7001
elem = 6

[State 230, 1]
type = nothitby
trigger1 = time < 8
value = SCA

[State 522, 4]
type = ChangeState
trigger1 = time >= 8
value = 7001
;----------------------------------
; Scorch(guard point)
[Statedef 7005]
type = a
physics = n
movetype = A
ctrl = 0                
anim = 7005
juggle = 8

[State 181, 2]
type = PlaySnd
trigger1 = time = 0
value = s1,0
channel = 9

[State 1300, 5]
type = projectile
trigger1 = time = 0 && numprojid(10011) < 2
projanim = 10011
projid = 10011
offset = 25-ifelse(p2bodydist X <= 20 && p2bodydist X >= -5,20-p2bodydist X,ifelse(p2bodydist X < -5,25,0)),-40+ifelse(p2bodydist y < 0 && p2bodydist y > -75,ceil(p2bodydist Y/1.5),ifelse(p2bodydist y <= -75,-50,0))
ignorehitpause = 1
projsprpriority = 3
projremovetime = 11
projedgebound = 210

[State 522, 2]
type = posfreeze
trigger1 = 1

[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 0 && var(12) < 3
value = 7005
elem = 1
[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 3 && var(12) < 7
value = 7005
elem = 2
[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 7 && var(12) < 11
value = 7005
elem = 3
[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 11 && var(12) < 12
value = 7005
elem = 4
[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 12
value = 7005
elem = 5

[State 230, 1]
type = nothitby
trigger1 = time < 8
value = SCA

[State 522, 4]
type = ChangeState
trigger1 = time >= 8
value = 7003
;----------------------------------
; Scorch(guard point)
[Statedef 7006]
type = a
physics = n
movetype = A
ctrl = 0                
anim = 7011
juggle = 8

[State 181, 2]
type = PlaySnd
trigger1 = time = 0
value = s1,0
channel = 9

[State 1300, 5]
type = projectile
trigger1 = time = 0 && numprojid(10011) < 2
projanim = 10011
projid = 10011
offset = 25-ifelse(p2bodydist X <= 20 && p2bodydist X >= -5,20-p2bodydist X,ifelse(p2bodydist X < -5,25,0)),-40+ifelse(p2bodydist y < 0 && p2bodydist y > -75,ceil(p2bodydist Y/1.5),ifelse(p2bodydist y <= -75,-50,0))
ignorehitpause = 1
projsprpriority = 3
projremovetime = 11
projedgebound = 210

[State 522, 2]
type = posfreeze
trigger1 = 1

[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 0 && var(12) < 3
value = 7011
elem = 1
[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 3 && var(12) < 5
value = 7011
elem = 2
[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 5 && var(12) < 8
value = 7011
elem = 3
[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 8 && var(12) < 11
value = 7011
elem = 4
[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 11 && var(12) < 15
value = 7011
elem = 5
[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 15 && var(12) < 16
value = 7011
elem = 6
[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 16
value = 7011
elem = 7

[State 230, 1]
type = nothitby
trigger1 = time < 8
value = SCA

[State 522, 4]
type = ChangeState
trigger1 = time >= 8
value = 7012
;----------------------------------
; Scorch(guard point)
[Statedef 7007]
type = a
physics = n
movetype = A
ctrl = 0                
anim = 7003
juggle = 8

[State 181, 2]
type = PlaySnd
trigger1 = time = 0
value = s1,0
channel = 9

[State 1300, 5]
type = projectile
trigger1 = time = 0 && numprojid(10011) < 2
projanim = 10011
projid = 10011
offset = 25-ifelse(p2bodydist X <= 20 && p2bodydist X >= -5,20-p2bodydist X,ifelse(p2bodydist X < -5,25,0)),-40+ifelse(p2bodydist y < 0 && p2bodydist y > -75,ceil(p2bodydist Y/1.5),ifelse(p2bodydist y <= -75,-50,0))
ignorehitpause = 1
projsprpriority = 3
projremovetime = 11
projedgebound = 210

[State 7800, 3]
type = BGPalfx
trigger1 = var(12) >= 0
ignorehitpause = 1
supermove = 1
time = 2
mul = 158,158,158
invertall = 1

[State 522, 2]
type = posfreeze
trigger1 = 1

[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 0 && var(12) < 3
value = 7003
elem = 1
[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 3 && var(12) < 9
value = 7003
elem = 2
[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 9 && var(12) < 15
value = 7003
elem = 3
[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 15 && var(12) < 16
value = 7003
elem = 4
[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 16
value = 7003
elem = 5

[State 230, 1]
type = nothitby
trigger1 = time < 8
value = SCA

[State 522, 4]
type = ChangeState
trigger1 = time >= 8
value = 7022
;----------------------------------
[Statedef 6993]
type = a
physics = n
movetype = H
ctrl = 0                

[State 5040, 1]
type = nothitby
trigger1 = 1
value = SCA
[State 5040, 1]
type = playerpush
trigger1 = 1
value = 0

[State 7001, 0]
type = changeanim
trigger1 = 1
value = anim
elem = animelemno(0)

[State 7001, 0]
type = changestate
trigger1 = time = 3
value = 7102
;----------------------------------
[Statedef 6994]
type = a
physics = n
movetype = H
ctrl = 0                

[State 5040, 1]
type = nothitby
trigger1 = 1
value = SCA
[State 5040, 1]
type = playerpush
trigger1 = 1
value = 0

[State 7001, 0]
type = changeanim
trigger1 = 1
value = anim
elem = animelemno(0)

[State 7001, 0]
type = changestate
trigger1 = time = 3
value = 7112
;----------------------------------
[Statedef 6995]
type = a
physics = n
movetype = H
ctrl = 0                

[State 5040, 1]
type = nothitby
trigger1 = 1
value = SCA
[State 5040, 1]
type = playerpush
trigger1 = 1
value = 0

[State 7001, 0]
type = changeanim
trigger1 = 1
value = anim
elem = animelemno(0)

[State 7001, 0]
type = changestate
trigger1 = time = 3
value = 7122
;------------------------------------
; Scorch(l)
[Statedef 7003]
type = a
physics = n
movetype = A
ctrl = 0                
anim = 7005
juggle = 8

[State 230, 1]
type = varset
trigger1 = time = 0 && prevstateno != 7005
var(12) = 0
[State 230, 1]
type = varadd
trigger1 = time > 0
var(12) = 1

[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 0 && var(12) < 3
value = 7005
elem = 1
[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 3 && var(12) < 7
value = 7005
elem = 2
[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 7 && var(12) < 11
value = 7005
elem = 3
[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 11 && var(12) < 12
value = 7005
elem = 4
[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 12
value = 7005
elem = 5

[State 522, 2]
type = VelSet
trigger1 = var(12) = 3
x = 6.1
y = -4.4

[State 52, 2]
type = VelAdd
trigger1 = var(12) >= 3
y = .5

[State 1300, 5]
type = projectile
trigger1 = var(12) = 11
projanim = 302
offset = 13,-1
projsprpriority = 2
projremovetime = 14
projedgebound = 210

[State 522, 1]
type = PlaySnd
trigger1 = var(12) = 11
value = s6,1
[State 522, 1];svc
type = PlaySnd
trigger1 = var(12) = 11
value = s27,2

[State 182, 2]
type = varset
trigger1 = var(12) = 0
var(4) = 0

[State 182, 2]
type = varset
trigger1 = moveguarded > 0
var(4) = 1
ignorehitpause = 1
persistent = 0

[State 1000, 2]
type = ReversalDef
trigger1 = prevstateno != 7005 || (prevstateno = 7005 && time > 0)
trigger1 = var(12) < 11
reversal.attr = SCA,AA,AP
hitflag = MAFDP
pausetime = 0,10
p1stateno = 7005
sparkno = -1

[State 522, 3]
type = HitDef
trigger1 = var(5) < 2 && var(4) = 0 && var(12) >= 11
attr = SA, HA
animtype = hard
guardflag = H
getpower = 0,0
givepower = 21,21
pausetime = 4,8
guard.pausetime = 0,8
id = 7001
sparkno = s10006
guard.sparkno = s10111
sparkxy = 0-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-40
;snap = 0,-66
hitsound = s3,2
guardsound = s1,0
priority = 7, Hit
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
ground.type = low
ground.slidetime = 30
ground.hittime = 30
guard.slidetime = 30-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,14,0)
guard.hittime = 30-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,14,0)
guard.velocity = -7 
air.velocity = -5,-3
hitonce = 1
p2facing = 1
fall = 1
kill = 0

[State 900, 1]
type = EnvColor
trigger1 = movehit > 0 && var(12) >= 11
value = 255, 255, 255
time = 1
under = 1
persistent = 0
ignorehitpause = 1

[State 182, 2]
type = varset
trigger1 = var(12) = 0
var(5) = 0

[State 182, 2]
type = varadd
triggerall = var(12) >= 11
trigger1 = movehit > 0
var(5) = 1

[State 182, 2]
type = movehitreset
triggerall = var(12) >= 11
triggerall = movehit > 0
trigger1 = numtarget(7001) = 0
trigger2 = numtarget(7001) > 0
trigger2 = target(7001),stateno != 5000 && target(7001),stateno != 5020 && target(7001),stateno != 5010
persistent = 0

[State 182, 2]
type = varset
triggerall = var(12) >= 11
trigger1 = numtarget(7001) > 0
trigger1 = target(7001),stateno = 5000 || target(7001),stateno = 5020 || target(7001),stateno = 5010
var(18) = 1

[State 182, 2]
type = varset
triggerall = var(12) >= 11
trigger1 = numtarget(7001) = 0
trigger2 = numtarget(7001) > 0
trigger2 = target(7001),stateno != 5000 && target(7001),stateno != 5020 && target(7001),stateno != 5010
var(18) = 0

[State 1002, 4]
type = Targetstate
triggerall = var(12) >= 11
trigger1 = movehit > 0 && numtarget(7001) > 0
value = 7102
id = 7001
persistent = 0

[State 1002, 4]
type = changestate
triggerall = var(12) >= 11
trigger1 = movehit > 0 && var(18) = 1 && var(5) < 2
trigger2 = movehit > 0 && var(5) > 1
value = 7100
persistent = 0

[State 522, 4]
type = ChangeState
trigger1 = var(12) >= 19
value = 7002
;------------------------------------
; scorch land
[Statedef 7002]
type = S
physics = N
movetype = A
ctrl = 0
anim = 7002
velset = 0,0,0

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 0

[State 301, 4]
type = Posset
trigger1 = time = 0
y = 0

[State 522, 1]
type = posadd
trigger1 = AnimElem = 1
trigger2 = animelem = 2
x = 18

[State 523, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------
; scorch sucess
[Statedef 7100]
type = A
physics = N
movetype = A
ctrl = 0
anim = 7100
velset = 0,0
sprpriority = 2

[State 5040, 1]
type = nothitby
trigger1 = 1
value = SCA
ignorehitpause = 1
[State 5040, 1]
type = playerpush
trigger1 = 1
value = 0
ignorehitpause = 1

[State 5210, 1] 
type = PalFX
trigger1 = Time = 0
time = 1
add = 0,0,0 

[State 1531, 5]
type = Playsnd
trigger1 = animelem = 6
value = s9,0

[State 1531, 5]
type = Posadd
trigger1 = animelem = 2
x = 22
y = -4
[State 1531, 5]
type = Posadd
trigger1 = animelem = 3
trigger2 = animelem = 4
x = 16
[State 1531, 5]
type = Posadd
trigger1 = animelem = 5
x = 8
[State 1531, 5]
type = Posadd
trigger1 = animelem = 10
trigger2 = animelem = 11
x = 16

[State 240, 3]
type = Width
trigger1 = animelem = 1
value = 50
[State 240, 3]
type = Width
trigger1 = animelem = 2
value = 66
[State 240, 3]
type = Width
trigger1 = animelem = 3
value = 82
[State 240, 3]
type = Width
trigger1 = animelem = 12
value = 52

[State 1531, 5]
type = Envshake
trigger1 = AnimElem = 5
time = 20
freq = 255
ampl = -5
persistent = 0
ignorehitpause = 1

[State 1300, 3]
type = Explod
trigger1 = AnimElem = 6
anim = 921
facing = -1
pos = 53,10
shadow = 68,68,68
ownpal = 1

[State 1300, 3]
type = Explod
trigger1 = AnimElem = 6
anim = 922
facing = -1
pos = 53,10
shadow = 68,68,68
sprpriority = 3
ownpal = 1

[State 1531, 5]
type = PlaySnd
trigger1 = AnimElem = 12
value = s17,1
channel = 1

[State 3000]
type = projectile
trigger1 = AnimElem = 19
trigger2 = AnimElem = 22
trigger3 = AnimElem = 25
trigger4 = AnimElem = 28
projanim = 9244
offset = 55+ceil(time-64),-80-ceil(time-64)
projsprpriority = 6
projremovetime = 22
projedgebound = 210

[State 900, 1]
type = EnvColor
trigger1 = AnimElem = 19
trigger2 = AnimElem = 22
trigger3 = AnimElem = 25
trigger4 = AnimElem = 28
value = 255, 255, 255
time = 1
under = 1

[State 900, 1]
type = targetlifeadd
trigger1 = animelem = 6
value = -121
id = 7001
kill = 0

[State 900, 1]
type = targetlifeadd
trigger1 = AnimElem = 19
value = -104
id = 7001
kill = 0

[State 900, 1]
type = targetlifeadd
trigger1 = AnimElem = 22
trigger2 = AnimElem = 25
trigger3 = AnimElem = 28
value = -15
id = 7001

[State 900, 1]
type = targetpoweradd
trigger1 = AnimElem = 19
trigger2 = AnimElem = 22
trigger3 = AnimElem = 25
trigger4 = AnimElem = 28
value = 21
id = 7001

[State 900b, 1]
type = hitadd
trigger1 = AnimElem = 19
trigger2 = AnimElem = 22
trigger3 = AnimElem = 25
trigger4 = AnimElem = 28
value = 1

[State 900, 1]
type = Playsnd
trigger1 = AnimElem = 19
value = s9,8

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 1
pos = 0,-66
id = 7001

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 2, >= 0
trigger1 = AnimElem = 3, < 0
pos = 0,-39
id = 7001

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 3, >= 0
trigger1 = AnimElem = 4, < 0
pos = 59,-11
id = 7001

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 4, >= 0
trigger1 = AnimElem = 5, < 0
pos = 53,0
id = 7001

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 5, >= 0
trigger1 = AnimElem = 7, < 0
pos = 41, 0
id = 7001

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 7, >= 0
trigger1 = AnimElem = 8, < 0
pos = 36,-3
id = 7001

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 8, >= 0
trigger1 = AnimElem = 9, < 0
pos = 29,-2
id = 7001

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 9
pos = 42,5
id = 7001

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 10, >= 0
trigger1 = AnimElem = 11, < 0
pos = 24,-41
id = 7001

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 11, >= 0
trigger1 = AnimElem = 12, < 0
pos = 26,-70
id = 7001

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 12, >= 0
trigger1 = AnimElem = 13, < 0
pos = 23,-99
id = 7001

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 13, >= 0
trigger1 = AnimElem = 14, < 0
pos = 17,-94
id = 7001

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 14, >= 0
trigger1 = AnimElem = 15, < 0
pos = -10,-100
id = 7001

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 15, >= 0
trigger1 = AnimElem = 16, < 0
pos = -20,-88
id = 7001

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 16, >= 0
trigger1 = AnimElem = 17, < 0
pos = -22,-82
id = 7001

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 17
pos = -7,-97
id = 7001

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 18
pos = 21,-95
id = 7001

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 19
pos = 35,-125
id = 7001

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 20
pos = 35,-90
id = 7001

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 20, 1
pos = 35,-95
id = 7001

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 21
pos = 35,-100
id = 7001

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 22
pos = 50,-45
id = 7001

[State 3000]
type = projectile
trigger1 = AnimElem = 28
projanim = 2107
offset = 64,-98
projsprpriority = 4
projremovetime = 28
projedgebound = 210

[State 8160, 13]
type = Explod
trigger1 = Time > 64
trigger1 = Time < 68
trigger1 = NumExplod(8150) < 4
trigger1 = Random < 450
anim = 3100
ID = 8150
sprpriority = 5
pos = 40,-70
random = 80,70
ignorehitpause = 1
ownpal = 1

[State 8160, 14]
type = Explod
trigger1 = Time > 64
trigger1 = Time < 68
trigger1 = NumExplod(3100) < 5
trigger1 = Random < 400
anim = 3110
ID = 3100
sprpriority = 5
pos = 40,-70
random = 80,80
ignorehitpause = 1
ownpal = 1

[State 8160, 15]
type = Explod
trigger1 = Time > 64
trigger1 = Time < 68
trigger1 = NumExplod(3100) < 5
trigger1 = Random < 450
anim = 3120
ID = 3100
sprpriority = 5
pos = 40,-70
random = 80,80
ignorehitpause = 1
ownpal = 1

[State 8160, 16]
type = Explod
trigger1 = Time > 64
trigger1 = Time < 68
trigger1 = NumExplod(3100) < 5
trigger1 = Random < 400
anim = 3130
ID = 3100
sprpriority = 5
pos = 40,-70
random = 80,80
ignorehitpause = 1
ownpal = 1

[State 8160, 17]
type = Explod
trigger1 = Time > 64
trigger1 = Time < 68
trigger1 = NumExplod(3140) < 5
trigger1 = Random < 500
anim = 3140
ID = 3140
sprpriority = 5
pos = 40,-70
random = 80,80
ignorehitpause = 1
ownpal = 1

[State 8160, 18]
type = Explod
trigger1 = Time > 64
trigger1 = Time < 68
trigger1 = NumExplod(3140) < 5
trigger1 = Random < 500
anim = 3150
ID = 3140
sprpriority = 5
pos = 40,-70
random = 80,80
ignorehitpause = 1
ownpal = 1

[State 8160, 13]
type = Explod
trigger1 = Time > 67
trigger1 = Time < 92
trigger1 = NumExplod(8150) < 4
trigger1 = Random < 450 && p2movetype = H
anim = 3100
ID = 8150
sprpriority = 5
postype = p2
pos = 0,-40
random = 100,90
ignorehitpause = 1
ownpal = 1

[State 8160, 14]
type = Explod
trigger1 = Time > 67
trigger1 = Time < 92
trigger1 = NumExplod(3100) < 5
trigger1 = Random < 400 && p2movetype = H
anim = 3110
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-40
random = 100,90
ignorehitpause = 1
ownpal = 1

[State 8160, 15]
type = Explod
trigger1 = Time > 67
trigger1 = Time < 92
trigger1 = NumExplod(3100) < 5
trigger1 = Random < 450 && p2movetype = H
anim = 3120
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-40
random = 100,90
ignorehitpause = 1
ownpal = 1

[State 8160, 16]
type = Explod
trigger1 = Time > 67
trigger1 = Time < 92
trigger1 = NumExplod(3100) < 5
trigger1 = Random < 400 && p2movetype = H
anim = 3130
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-40
random = 100,90
ignorehitpause = 1
ownpal = 1

[State 8160, 17]
type = Explod
trigger1 = Time > 67
trigger1 = NumExplod(3140) < 5
trigger1 = Random < 500 && p2movetype = H
anim = 3140
ID = 3140
sprpriority = 5
postype = p2
pos = 0,-40
random = 100,90
ignorehitpause = 1
ownpal = 1

[State 8160, 18]
type = Explod
trigger1 = Time > 67
trigger1 = NumExplod(3140) < 5
trigger1 = Random < 500 && p2movetype = H
anim = 3150
ID = 3140
sprpriority = 5
postype = p2
pos = 0,-40
random = 100,90
ignorehitpause = 1
ownpal = 1

[State 1300, 5]
type = projectile
trigger1 = AnimElem = 19
projanim = 1035
offset = 0,0
projsprpriority = 4
projremovetime = 34
projedgebound = 210

[State 210, 3]
type = Velset
trigger1 = AnimElem = 12
y = -3;4

[State 210, 3]
type = Velset
trigger1 = AnimElem = 19
y = -1

[State 301, 4]
type = Posset
trigger1 = time = 0
y = 0

[State 100, 5]
type = ChangeState
triggerall = time = 1
trigger1 = numtarget(7001) > 0
trigger1 = target(7001),stateno != 7102
trigger2 = numtarget(7001) = 0
value = 7002

[State 523, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 7101
;-----------------------------------
; scorch thrown
[Statedef 7102]
type = A
physics = N
movetype = H
velset = 0,0

[State 1531, 5]
type = nothitby
trigger1 = 1
value = SCA

[State 1531, 5]
type = assertspecial
trigger1 = 1
flag = noshadow

;[State 1531, 5]
;type = posadd
;trigger1 = time = 1
;trigger1 = p2stateno != 7100
;x = -51
;y = -39

[State 1531, 5]
type = defencemulSet
trigger1 = 1
value = 1

[State 5210, 1] 
type = PalFX
trigger1 = Time = 0
time = 1
add = 0,0,0 

[state 8301, 0]
type = sprpriority
trigger1 = animelem = 8
trigger2 = time = 61
value = 3

[state 8301, 0]
type = sprpriority
trigger1 = anim = 7132
trigger1 = animelem = 2
value = 1

[state 8301, 0]
type = sprpriority
trigger1 = animelem = 11
value = 0

;[State 7102, 1]
;type = turn
;trigger1 = time = 1
;trigger1 = p2stateno != 7100

;[State 7102, 1]
;type = changeanim
;trigger1 = time = 1
;trigger1 = p2stateno != 7100
;value = 5100 

;[State 7102, 1]
;type = SelfState
;trigger1 = time = 1
;trigger1 = p2stateno != 7100
;value = 5100 

[State 3305, 2]
type = PalFX
trigger1 = time = 63
time = 9
add = 48,0,168
mul = 166,166,166
sinadd = 96,96,96,12
color = 0
invertall = 1

[State 3305, 2]
type = PalFX
trigger1 = time = 72
time = 9
add = 96,48,216
mul = 166,166,166
sinadd = 64,64,64,24
color = 0

[State 1531, 5]
type = ChangeAnim2
trigger1 = time = 0
value = 7102

[State 1531, 5]
type = ChangeAnim
trigger1 = anim = 7102
trigger1 = animelem = 8
trigger1 = selfanimexist(5111)
value = 5111

[State 1531, 5]
type = ChangeAnim2
trigger1 = time = 46
value = 7132

[State 1531, 5]
type = turn
trigger1 = anim = 7132 && animtime = 0

[State 1531, 5]
type = changeanim
trigger1 = anim = 7132 && animtime = 0
trigger1 = selfanimexist(5052)
trigger1 = !selfanimexist(5053)
value = 5052

[State 1531, 5]
type = changeanim
trigger1 = anim = 7132 && animtime = 0
trigger1 = selfanimexist(5053)
value = 5053

[State 1531, 5]
type = changeanim
trigger1 = anim = 7132 && animtime = 0
trigger1 = !selfanimexist(5052)
trigger1 = !selfanimexist(5053)
value = 5030

[State 1531, 5]
type = changeanim
trigger1 = anim = 5052 || anim = 5053 || anim = 5030
value = anim

[State 1531, 5]
type = posadd
trigger1 = time = 70 || time = 73 || time = 76 || time = 79
x = 10
y = -5

[State 706, 4]
type = ChangeState
trigger1 = time = 79
value = 7103
;------------------------------------
; scorch thrown(Falling)
[Statedef 7103]
type    = A
movetype= H
physics = N
velset = 5,-8
ctrl = 0
anim = 5030
sprpriority = 0

[State 1531, 5]
type = posfreeze
trigger1 = time < 5

[State 1531, 5]
type = defencemulSet
trigger1 = 1
value = 1

[State 3305, 2]
type = PalFX
trigger1 = time = 2 || time = 20
time = 9
add = 48,0,168
mul = 166,166,166
sinadd = 96,96,96,12
color = 0
invertall = 1
[State 3305, 2]
type = PalFX
trigger1 = time = 11 || time = 29
time = 9
add = 96,48,216
mul = 166,166,166
sinadd = 64,64,64,24
color = 0
[State 3305, 2]
type = PalFX
trigger1 = time = 38
time = 8
add = 48,0,168
mul = 166,166,166
sinadd = 96,96,96,12
color = 0
invertall = 1

[State 1531, 5]
type = changeanim
trigger1 = time = 0
trigger1 = selfanimexist(5052)
value = 5052

[State 1531, 5]
type = changeanim
trigger1 = time = 0
trigger1 = selfanimexist(5053)
value = 5053

[State 1531, 5]
type = changeanim
trigger1 = vel Y > 0
trigger1 = anim = 5052
trigger1 = selfanimexist(5062)
value = 5062

[State 1531, 5]
type = changeanim
trigger1 = vel Y > 0
trigger1 = anim = 5053
trigger1 = selfanimexist(5063)
value = 5063

[State 1531, 5]
type = changeanim
trigger1 = animtime = 0
trigger1 = anim = 5030
value = 5050

[State 5050, 2];Coming down anim
type = ChangeAnim
trigger1 = anim = [5050,5059]
trigger1 = Vel Y >= ifelse(anim = 5050, 1, -2)
trigger1 = SelfAnimExist(anim+10)
value = anim+10
persistent = 0

[State 706, 1]
type = VelAdd
trigger1 = Time > 2
y = .45

[State 706, 4]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= -10
value = 5100
;-----------------------------------
; scorch sucess
[Statedef 7101]
type = A
physics = N
movetype = A
ctrl = 0
anim = 7101
velset = 0,0

[State 816, 1]
type = varset
trigger1 = time = 0 && prevstateno = 7100
var(4) = 0
[State 816, 1]
type = varset
trigger1 = time = 0 && prevstateno = 7111
var(4) = 1
[State 816, 1]
type = varset
trigger1 = time = 0 && prevstateno = 7222
var(4) = 2

[State 9001, 2]
type = Pause
trigger1 = time < 3 && prevstateno = 7222
time = 1

[State 3000]
type = projectile
trigger1 = time = 0 && prevstateno = 7222
projanim = 10006
offset = 80,-115
projsprpriority = 5
projremovetime = 14
projedgebound = 210

[State 900, 1]
type = hitadd
trigger1 = time = 1 && prevstateno = 7222
value = 1
[State 900, 1]
type = targetpoweradd
trigger1 = time = 1 && prevstateno = 7222
value = 21
id = 7022

[State 7800, 3]
type = BGPalfx
trigger1 = var(4) = 2
ignorehitpause = 1
supermove = 1
time = 2
mul = 158,158,158
invertall = 1

[State 8160, 17]
type = Explod
trigger1 = NumExplod(3140) < 7
trigger1 = Random < 300 && p2movetype = H
anim = 3140
ID = 3140
sprpriority = 5
postype = p2
pos = 0,-20
random = 100,70
ignorehitpause = 1
ownpal = 1
[State 8160, 18]
type = Explod
trigger1 = NumExplod(3140) < 7
trigger1 = Random < 300 && p2movetype = H
anim = 3150
ID = 3140
sprpriority = 5
postype = p2
pos = 0,-20
random = 100,70
ignorehitpause = 1
ownpal = 1

[State 210, 3]
type = changeanim
trigger1 = time = 0 && prevstateno = 7111
value = 7101
elem = 2
[State 210, 3]
type = changeanim
trigger1 = time = 0 && prevstateno = 7222
value = 7103

[State 210, 3]
type = Veladd
trigger1 = Time >= 0
y = .55

[State 523, 4]
type = ChangeState
trigger1 = var(4) = 0 && time = 15
trigger2 = var(4) = 1 && time = 17
trigger3 = var(4) != 0 && var(4) != 1 && time = 24
value = 1032
;---------------------------------
; Scorch DM (start)
[Statedef 7011]
type    = S
movetype= A
physics = S
juggle  = 0
ctrl = 0
anim = 7010
facep2 = 1
velset = 0,0
sprpriority = 0

[State 1000, 4]
type = Helper
trigger1 = time = 0
name = "n2"
pos = 250,0  
stateno = 2011
[State 1000, 4]
type = Helper
trigger1 = time = 0
name = "n2"
pos = 125,0
stateno = 2011

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 1

[state 7000, 0]
type = varadd
trigger1 = time = 6
var(20) = 20

[State 7000, 0]
type = nothitby
trigger1 = animtime < 0
value = SCA

[State 7100, 1]
type = PosAdd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3
x = 12
[State 7100, 1]
type = PosAdd
trigger1 = AnimElem = 4
trigger2 = AnimElem = 5
x = 13

[State 1300, 5]
type = Envcolor
trigger1 = Time = 1
persistent = 0
ignorehitpause = 1
value = 255,255,255
time = 4
under = 1
supermove = 1

[State 1300, 5]
type = Envcolor
trigger1 = Time = 5
persistent = 0
ignorehitpause = 1
value = 0, 0, 0
time = 23
under = 1
supermove = 1

[State 1531, 5]
type = playsnd
trigger1 = animelem = 2
value = s1,8

[State 1531, 5]
type = PosFreeze
trigger1 = time >= 0

[State 1531, 5]
type = PlaySnd
trigger1 = AnimElem = 3
value = s17,0
channel = 1

[State 4120, 1]
type = SuperPause
trigger1 = animelem = 2
movetime = 27
p2defmul = 1
time = 27
anim = -1

[State 2100, 4]
type = Explod
trigger1 = time = 0
anim = 12011
sprpriority = 7
pos = -5,-79
supermove = 1
bindtime = -1
ownpal = 1

[State 2100, 5]
type = Explod
trigger1 = time = 0
anim = 1211
sprpriority = -1
pos = -5,-79
supermove = 1
bindtime = -1
ownpal = 1

[State 210, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 7012
;-----------------------------------
; Scorch
[Statedef 7012]
type = a
physics = n
movetype = A
ctrl = 0                
anim = 7011
juggle = 8

[State 230, 1]
type = varset
trigger1 = time = 0 && prevstateno != 7006
var(12) = 0
[State 230, 1]
type = varadd
trigger1 = time > 0
var(12) = 1

[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 0 && var(12) < 3
value = 7011
elem = 1
[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 3 && var(12) < 5
value = 7011
elem = 2
[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 5 && var(12) < 8
value = 7011
elem = 3
[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 8 && var(12) < 11
value = 7011
elem = 4
[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 11 && var(12) < 15
value = 7011
elem = 5
[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 15 && var(12) < 16
value = 7011
elem = 6
[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 16
value = 7011
elem = 7

[State 522, 2]
type = VelSet
trigger1 = var(12) = 3
x = 8
y = -6.5

[State 52, 2]
type = VelAdd
trigger1 = var(12) >= 3
y = .51

[State 1300, 5]
type = projectile
trigger1 = var(12) = 15
projanim = 302
offset = 15,0
projsprpriority = 2
projremovetime = 14
projedgebound = 210

[State 522, 1]
type = PlaySnd
trigger1 = var(12) = 15
value = s6,1
[State 522, 1];svc
type = PlaySnd
trigger1 = var(12) = 15
value = s27,2

[State 182, 2]
type = varset
trigger1 = var(12) = 0
var(4) = 0

[State 182, 2]
type = varset
trigger1 = moveguarded > 0
var(4) = 1
ignorehitpause = 1
persistent = 0

[State 1000, 2]
type = ReversalDef
trigger1 = prevstateno != 7006 || (prevstateno = 7006 && time > 0)
trigger1 = var(12) < 15
reversal.attr = SCA,AA,AP
hitflag = MAFDP
pausetime = 0,10
p1stateno = 7006
sparkno = -1

[State 522, 3]
type = HitDef
trigger1 = var(5) < 2 && var(4) = 0 && var(12) >= 15
attr = SA,HA
animtype = hard
guardflag = H
getpower = 0,0
givepower = 21,21
pausetime = 4,8
guard.pausetime = 0,8
sparkno = s10006
guard.sparkno = s10111
id = 7012
;snap = 0,-41
priority = 7, Hit
sparkxy = 0-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-40
hitsound = s3,2
guardsound = s1,0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
ground.type = low
ground.slidetime = 30
ground.hittime = 30
guard.slidetime = 30-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,14,0)
guard.hittime = 30-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,14,0)
guard.velocity = -7
air.velocity = -5,-3
hitonce = 1
p2facing = 1
fall = 1
kill = 0

[State 900, 1]
type = EnvColor
trigger1 = movehit > 0 && var(12) >= 15
value = 255, 255, 255
time = 1
under = 1
persistent = 0
ignorehitpause = 1

[State 182, 2]
type = varset
trigger1 = var(12) = 0
var(5) = 0

[State 182, 2]
type = varadd
triggerall = var(12) >= 15
trigger1 = movehit > 0
var(5) = 1

[State 182, 2]
type = movehitreset
triggerall = var(12) >= 15
triggerall = movehit > 0
trigger1 = numtarget(7012) = 0
trigger2 = numtarget(7012) > 0
trigger2 = target(7012),stateno != 5000 && target(7012),stateno != 5020 && target(7012),stateno != 5010
persistent = 0

[State 182, 2]
type = varset
triggerall = var(12) >= 15
trigger1 = numtarget(7012) > 0
trigger1 = target(7012),stateno = 5000 || target(7012),stateno = 5020 || target(7012),stateno = 5010
var(18) = 1
ignorehitpause = 1

[State 182, 2]
type = varset
triggerall = var(12) >= 15
trigger1 = numtarget(7012) = 0
trigger2 = numtarget(7012) > 0
trigger2 = target(7012),stateno != 5000 && target(7012),stateno != 5020 && target(7012),stateno != 5010
var(18) = 0
ignorehitpause = 1

[State 1002, 4]
type = Targetstate
triggerall = var(12) >= 15
trigger1 = movehit > 0 && numtarget(7012) > 0
value = 6994
id = 7012
ignorehitpause = 1
persistent = 0

[State 1002, 4]
type = changestate
triggerall = var(12) >= 15
trigger1 = movehit > 0 && var(18) = 1 && var(5) < 2
trigger2 = movehit > 0 && var(5) > 1
value = 7111
ignorehitpause = 1
persistent = 0

[State 522, 4]
type = ChangeState
trigger1 = var(12) >= 27
value = 7002
;--------------------------------
; scorch sucess
[Statedef 7111]
type = A
physics = N
movetype = A
ctrl = 0
anim = 7111
velset = 0,0
sprpriority = 2

[State 5040, 1]
type = nothitby
trigger1 = 1
value = SCA
ignorehitpause = 1
[State 5040, 1]
type = playerpush
trigger1 = 1
value = 0
ignorehitpause = 1

[State 5210, 1] 
type = PalFX
trigger1 = Time = 0
time = 1
add = 0,0,0 

[State 1531, 5]
type = Playsnd
trigger1 = animelem = 6
value = s9,0

[State 1531, 5]
type = Posadd
trigger1 = animelem = 2
x = 22
y = -4
[State 1531, 5]
type = Posadd
trigger1 = animelem = 3
trigger2 = animelem = 4
x = 16
[State 1531, 5]
type = Posadd
trigger1 = animelem = 5
x = 8
[State 1531, 5]
type = Posadd
trigger1 = animelem = 10
trigger2 = animelem = 11
x = 16

[State 240, 3]
type = Width
trigger1 = animelem = 1
value = 50
[State 240, 3]
type = Width
trigger1 = animelem = 2
value = 66
[State 240, 3]
type = Width
trigger1 = animelem = 3
value = 82
[State 240, 3]
type = Width
trigger1 = animelem = 12
value = 52

[State 1531, 5]
type = Envshake
trigger1 = AnimElem = 5
time = 20
freq = 255
ampl = -5
persistent = 0
ignorehitpause = 1

[State 1300, 3]
type = Explod
trigger1 = AnimElem = 6
anim = 921
facing = -1
pos = 53,10
shadow = 68,68,68
ownpal = 1

[State 1300, 3]
type = Explod
trigger1 = AnimElem = 6
anim = 922
facing = -1
pos = 53,10
shadow = 68,68,68
sprpriority = 3
ownpal = 1

[State 1531, 5]
type = PlaySnd
trigger1 = AnimElem = 12
value = s17,1
channel = 1

[State 900, 1]
type = EnvColor
trigger1 = AnimElem = 19
trigger2 = AnimElem = 22
trigger3 = AnimElem = 25
trigger4 = AnimElem = 28
trigger5 = AnimElem = 30
trigger6 = AnimElem = 32
trigger7 = AnimElem = 35
value = 255, 255, 255
time = 1
under = 1

[State 3000]
type = projectile
trigger1 = AnimElem = 19
trigger2 = AnimElem = 22
trigger3 = AnimElem = 25
trigger4 = AnimElem = 28
trigger5 = AnimElem = 30
trigger6 = AnimElem = 32
trigger7 = AnimElem = 35
projanim = 9244
offset = 55+ceil((time-82)/2),-80-ceil((time-82)/2)
projsprpriority = 6
projremovetime = 22
projedgebound = 210

[State 900, 1]
type = targetlifeadd
trigger1 = animelem = 6
value = -219
kill = 0
id = 7012

[State 900, 1]
type = targetlifeadd
trigger1 = AnimElem = 19
value = -191
kill = 0
id = 7012

[State 900, 1]
type = targetlifeadd
trigger1 = AnimElem = 22
trigger2 = AnimElem = 25
trigger3 = AnimElem = 28
trigger4 = AnimElem = 30
trigger5 = AnimElem = 32
trigger6 = AnimElem = 35
value = -15
id = 7012

[State 900, 1]
type = targetpoweradd
trigger1 = AnimElem = 19
trigger2 = AnimElem = 22
trigger3 = AnimElem = 25
trigger4 = AnimElem = 28
trigger5 = AnimElem = 30
trigger6 = AnimElem = 32
trigger7 = AnimElem = 35
value = 21
id = 7012

[State 900, 1]
type = hitadd
trigger1 = AnimElem = 19
trigger2 = AnimElem = 22
trigger3 = AnimElem = 25
trigger4 = AnimElem = 28
trigger5 = AnimElem = 30
trigger6 = AnimElem = 32
trigger7 = AnimElem = 35
value = 1

[State 900, 1]
type = Playsnd
trigger1 = AnimElem = 19
value = s9,8

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 1
pos = 0,-66
id = 7012

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 2, >= 0
trigger1 = AnimElem = 3, < 0
pos = 0,-39
id = 7012

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 3, >= 0
trigger1 = AnimElem = 4, < 0
pos = 59,-11
id = 7012

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 4, >= 0
trigger1 = AnimElem = 5, < 0
pos = 53, 0
id = 7012

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 5, >= 0
trigger1 = AnimElem = 7, < 0
pos = 41, 0
id = 7012

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 7, >= 0
trigger1 = AnimElem = 8, < 0
pos = 36,-3
id = 7012

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 8, >= 0
trigger1 = AnimElem = 9, < 0
pos = 29,-2
id = 7012

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 9
pos = 42,5
id = 7012

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 10, >= 0
trigger1 = AnimElem = 11, < 0
pos = 24,-41
id = 7012

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 11, >= 0
trigger1 = AnimElem = 12, < 0
pos = 26,-70
id = 7012

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 12, >= 0
trigger1 = AnimElem = 13, < 0
pos = 23,-99
id = 7012

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 13, >= 0
trigger1 = AnimElem = 14, < 0
pos = 17,-94
id = 7012

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 14, >= 0
trigger1 = AnimElem = 15, < 0
pos = -10,-100
id = 7012

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 15, >= 0
trigger1 = AnimElem = 16, < 0
pos = -20,-88
id = 7012

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 16, >= 0
trigger1 = AnimElem = 17, < 0
pos = -22,-82
id = 7012

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 17
pos = -7,-97
id = 7012

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 18
pos = 21,-95
id = 7012

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 19
pos = 35,-125
id = 7012

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 20
pos = 35,-90
id = 7012

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 20, 1
pos = 35,-95
id = 7012

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 21
pos = 35,-100
id = 7012

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 22
pos = 50,-45
id = 7012

[State 3000]
type = projectile
trigger1 = AnimElem = 33
projanim = 2107
offset = 64,-98
projsprpriority = 4
projremovetime = 28
projedgebound = 210

[State 8160, 13]
type = Explod
trigger1 = Time > 86
trigger1 = Time < 90
trigger1 = NumExplod(8150) < 4
trigger1 = Random < 450
anim = 3100
ID = 8150
sprpriority = 5
pos = 40,-70
random = 80,70
ignorehitpause = 1
ownpal = 1

[State 8160, 14]
type = Explod
trigger1 = Time > 86
trigger1 = Time < 90
trigger1 = NumExplod(3100) < 5
trigger1 = Random < 400
anim = 3110
ID = 3100
sprpriority = 5
pos = 40,-70
random = 80,80
ignorehitpause = 1
ownpal = 1

[State 8160, 15]
type = Explod
trigger1 = Time > 86
trigger1 = Time < 90
trigger1 = NumExplod(3100) < 5
trigger1 = Random < 450
anim = 3120
ID = 3100
sprpriority = 5
pos = 40,-70
random = 80,80
ignorehitpause = 1
ownpal = 1

[State 8160, 16]
type = Explod
trigger1 = Time > 86
trigger1 = Time < 90
trigger1 = NumExplod(3100) < 5
trigger1 = Random < 400
anim = 3130
ID = 3100
sprpriority = 5
pos = 40,-70
random = 80,80
ignorehitpause = 1
ownpal = 1

[State 8160, 17]
type = Explod
trigger1 = Time > 86
trigger1 = Time < 90
trigger1 = NumExplod(3140) < 5
trigger1 = Random < 500
anim = 3140
ID = 3140
sprpriority = 5
pos = 40,-70
random = 80,80
ignorehitpause = 1
ownpal = 1

[State 8160, 18]
type = Explod
trigger1 = Time > 86
trigger1 = Time < 90
trigger1 = NumExplod(3140) < 5
trigger1 = Random < 500
anim = 3150
ID = 3140
sprpriority = 5
pos = 40,-70
random = 80,80
ignorehitpause = 1
ownpal = 1

[State 8160, 13]
type = Explod
trigger1 = Time > 89
trigger1 = Time < 119
trigger1 = NumExplod(8150) < 4
trigger1 = Random < 450 && p2movetype = H
anim = 3100
ID = 8150
sprpriority = 5
postype = p2
pos = 0,-40
random = 100,90
ignorehitpause = 1
ownpal = 1

[State 8160, 14]
type = Explod
trigger1 = Time > 89
trigger1 = Time < 119
trigger1 = NumExplod(3100) < 5
trigger1 = Random < 400 && p2movetype = H
anim = 3110
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-40
random = 100,90
ignorehitpause = 1
ownpal = 1

[State 8160, 15]
type = Explod
trigger1 = Time > 89
trigger1 = Time < 119
trigger1 = NumExplod(3100) < 5
trigger1 = Random < 450 && p2movetype = H
anim = 3120
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-40
random = 100,90
ignorehitpause = 1
ownpal = 1

[State 8160, 16]
type = Explod
trigger1 = Time > 89
trigger1 = Time < 119
trigger1 = NumExplod(3100) < 5
trigger1 = Random < 400 && p2movetype = H
anim = 3130
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-40
random = 100,90
ignorehitpause = 1
ownpal = 1

[State 8160, 17]
type = Explod
trigger1 = Time > 89
trigger1 = NumExplod(3140) < 5
trigger1 = Random < 500 && p2movetype = H
anim = 3140
ID = 3140
sprpriority = 5
postype = p2
pos = 0,-40
random = 100,90
ignorehitpause = 1
ownpal = 1

[State 8160, 18]
type = Explod
trigger1 = Time > 89
trigger1 = NumExplod(3140) < 5
trigger1 = Random < 500 && p2movetype = H
anim = 3150
ID = 3140
sprpriority = 5
postype = p2
pos = 0,-40
random = 100,90
ignorehitpause = 1
ownpal = 1

[State 1300, 5]
type = projectile
trigger1 = AnimElem = 19
projanim = 1035
offset = 0,0
projsprpriority = 4
projremovetime = 34
projedgebound = 210

[State 210, 3]
type = Velset
trigger1 = AnimElem = 12
y = -5;4.5

[State 210, 3]
type = Velset
trigger1 = AnimElem = 19
y = -1.5

[State 210, 3]
type = Veladd
trigger1 = AnimElem = 33, >= 0
y = .06

[State 301, 4]
type = Posset
trigger1 = time = 0
y = 0

[State 100, 5]
type = ChangeState
triggerall = time = 1
trigger1 = numtarget(7012) > 0
trigger1 = target(7012),stateno != 7112
trigger2 = numtarget(7012) = 0
value = 7002

[State 523, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 7101
;------------------------------------
; scorch thrown
[Statedef 7112]
type = A
physics = N
movetype = H
velset = 0,0

[State 1531, 5]
type = nothitby
trigger1 = 1
value = SCA

[State 1531, 5]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 1531, 5]
type = defencemulSet
trigger1 = 1
value = 1

[State 5210, 1] 
type = PalFX
trigger1 = Time = 0
time = 1
add = 0,0,0 

[state 8301, 0]
type = sprpriority
trigger1 = animelem = 8
trigger2 = time = 79
value = 3

[state 8301, 0]
type = sprpriority
trigger1 = anim = 7132
trigger1 = animelem = 2
value = 1

[state 8301, 0]
type = sprpriority
trigger1 = animelem = 11
value = 0

[State 3305, 2]
type = PalFX
trigger1 = time = 81 || time = 99
time = 9
add = 48,0,168
mul = 166,166,166
sinadd = 96,96,96,12
color = 0
invertall = 1

[State 3305, 2]
type = PalFX
trigger1 = time = 90
time = 9
add = 96,48,216
mul = 166,166,166
sinadd = 64,64,64,24
color = 0

[State 1531, 5]
type = ChangeAnim2
trigger1 = time = 0
value = 7112

[State 1531, 5]
type = ChangeAnim
trigger1 = anim = 7112
trigger1 = animelem = 8
trigger1 = selfanimexist(5111)
value = 5111

[State 1531, 5]
type = ChangeAnim2
trigger1 = time = 63 || time = 64
value = 7132

[State 1531, 5]
type = turn
trigger1 = anim = 7132 && animtime = 0

[State 1531, 5]
type = changeanim
trigger1 = anim = 7132 && animtime = 0
trigger1 = selfanimexist(5052)
trigger1 = !selfanimexist(5053)
value = 5052

[State 1531, 5]
type = changeanim
trigger1 = anim = 7132 && animtime = 0
trigger1 = selfanimexist(5053)
value = 5053

[State 1531, 5]
type = changeanim
trigger1 = anim = 7132 && animtime = 0
trigger1 = !selfanimexist(5052)
trigger1 = !selfanimexist(5053)
value = 5030

[State 1531, 5]
type = changeanim
trigger1 = anim = 5052 || anim = 5053 || anim = 5030
value = anim

[State 1531, 5]
type = posadd
trigger1 = time = 88 || time = 91 || time = 94 || time = 97
trigger2 = time = 100 || time = 103 || time = 106
x = 6
y = -3

[State 706, 4]
type = ChangeState
trigger1 = Time = 106
value = 7113
;--------------------------------------
; scorch thrown(Falling)
[Statedef 7113]
type    = A
movetype= H
physics = N
velset = 5,-8
ctrl = 0
anim = 5030
sprpriority = 0

[State 1531, 5]
type = posfreeze
trigger1 = time < 5

[State 1531, 5]
type = defencemulSet
trigger1 = 1
value = 1

[State 3305, 2]
type = PalFX
trigger1 = time = 11 || time = 29
time = 9
add = 48,0,168
mul = 166,166,166
sinadd = 96,96,96,12
color = 0
invertall = 1

[State 3305, 2]
type = PalFX
trigger1 = time = 2 || time = 20 || time = 38
time = 9
add = 96,48,216
mul = 166,166,166
sinadd = 64,64,64,24
color = 0

[State 3305, 2]
type = PalFX
trigger1 = time = 47
time = 2
add = 48,0,168
mul = 166,166,166
sinadd = 96,96,96,12
color = 0
invertall = 1

[State 1531, 5]
type = changeanim
trigger1 = time = 0
trigger1 = selfanimexist(5052)
value = 5052

[State 1531, 5]
type = changeanim
trigger1 = time = 0
trigger1 = selfanimexist(5053)
value = 5053

[State 1531, 5]
type = changeanim
trigger1 = vel Y > 0
trigger1 = anim = 5052
trigger1 = selfanimexist(5062)
value = 5062

[State 1531, 5]
type = changeanim
trigger1 = vel Y > 0
trigger1 = anim = 5053
trigger1 = selfanimexist(5063)
value = 5063

[State 1531, 5]
type = changeanim
trigger1 = animtime = 0
trigger1 = anim = 5030
value = 5050

[State 5050, 2];Coming down anim
type = ChangeAnim
trigger1 = anim = [5050,5059]
trigger1 = Vel Y >= ifelse(anim = 5050, 1, -2)
trigger1 = SelfAnimExist(anim+10)
value = anim+10
persistent = 0

[State 706, 1]
type = VelAdd
trigger1 = Time > 2
y = .45

[State 706, 4]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= -10
value = 5100
;--------------------------------
; Scorch DM (start)
[Statedef 7021]
type    = S
movetype= A
physics = S
juggle  = 0
ctrl = 0
anim = 7004  
facep2 = 1
velset = 0,0
sprpriority = 0

[State 1000, 4]
type = Helper
trigger1 = time = 0
name = "n2"
pos = 250,0  
stateno = 2011

[State 1000, 4]
type = Helper
trigger1 = time = 0
name = "n2"
pos = 125,0  
stateno = 2011

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 1

[state 7000, 0]
type = varadd
trigger1 = time = 29
var(20) = 30

[State 7000, 0]
type = nothitby
trigger1 = animtime < 0
value = SCA

[State 7100, 1]
type = PosAdd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3
x = 12
[State 7100, 1]
type = PosAdd
trigger1 = AnimElem = 4
trigger2 = AnimElem = 5
x = 13

[State 7800, 3]
type = BGPalfx
trigger1 = time >= 0
ignorehitpause = 1
supermove = 1
time = 2
mul = 158,158,158
invertall = 1

[State 1300, 5]
type = Envcolor
trigger1 = Time = 1
persistent = 0
ignorehitpause = 1
value = 255,255,255
time = 4
under = 1
supermove = 1

[State 1300, 5]
type = Envcolor
trigger1 = Time = 5
persistent = 0
ignorehitpause = 1
value = 0, 0, 0
time = 23
under = 1
supermove = 1

[State 1531, 5]
type = playsnd
trigger1 = animelem = 2
value = s9,1

[State 1531, 5]
type = PosFreeze
trigger1 = time >= 0

[State 1531, 5]
type = PlaySnd
trigger1 = AnimElem = 1
value = s17,0
channel = 1

[State 4120, 1]
type = SuperPause
trigger1 = animelem = 2
movetime = 27
p2defmul = 1
time = 27
anim = -1

[State 2100, 4]
type = Explod
trigger1 = time = 0
anim = 12012
sprpriority = 7
pos = -5,-79
supermove = 1
bindtime = -1
ownpal = 1

[State 2100, 5]
type = Explod
trigger1 = time = 0
anim = 1212
sprpriority = -1
pos = -5,-79
supermove = 1
bindtime = -1
ownpal = 1

[State 210, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 7022
;----------------------------------
; Scorch
[Statedef 7022]
type = a
physics = n
movetype = A
ctrl = 0                
anim = 7003
juggle = 8

[State 230, 1]
type = varset
trigger1 = time = 0 && prevstateno != 7007
var(12) = 0
[State 230, 1]
type = varadd
trigger1 = time > 0
var(12) = 1

[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 0 && var(12) < 3
value = 7003
elem = 1
[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 3 && var(12) < 9
value = 7003
elem = 2
[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 9 && var(12) < 15
value = 7003
elem = 3
[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 15 && var(12) < 16
value = 7003
elem = 4
[State 522, 4]
type = Changeanim
trigger1 = var(12) >= 16
value = 7003
elem = 5

[State 7800, 3]
type = BGPalfx
trigger1 = var(12) >= 0
ignorehitpause = 1
supermove = 1
time = 2
mul = 158,158,158
invertall = 1

[State 522, 2]
type = VelSet
trigger1 = var(12) = 3
x = 8
y = -6.5

[State 52, 2]
type = VelAdd
trigger1 = var(12) >= 3
y = .51

[State 1300, 5]
type = projectile
trigger1 = var(12) = 15
projanim = 302
offset = 15,0
projsprpriority = 2
projremovetime = 14
projedgebound = 210

[State 522, 1]
type = PlaySnd
trigger1 = var(12) = 15
value = s6,1
[State 522, 1];svc
type = PlaySnd
trigger1 = var(12) = 15
value = s27,2

[State 182, 2]
type = varset
trigger1 = var(12) = 0
var(4) = 0

[State 182, 2]
type = varset
trigger1 = moveguarded > 0
var(4) = 1
ignorehitpause = 1
persistent = 0

[State 1000, 2]
type = ReversalDef
trigger1 = prevstateno != 7007 || (prevstateno = 7007 && time > 0)
trigger1 = var(12) < 15
reversal.attr = SCA,AA,AP
hitflag = MAFDP
pausetime = 0,10
p1stateno = 7007
sparkno = -1

[State 522, 3]
type = HitDef
trigger1 = var(5) < 2 && var(4) = 0 && var(12) >= 15
attr = SA,HA
animtype = hard
guardflag = H
getpower = 0,0
givepower = 21,21
pausetime = 4,8
guard.pausetime = 0,8
id = 7022
;snap = 0,-41
sparkno = s10006
guard.sparkno = s10111
sparkxy = 0-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-40
hitsound = s3,2
guardsound = s1,0
priority = 7, Hit
ground.slidetime = 30
ground.hittime = 30
guard.slidetime = 30-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,14,0)
guard.hittime = 30-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,14,0)
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
ground.type = low
guard.velocity = -7
air.velocity = -5,-3
hitonce = 1
p2facing = 1
fall = 1
kill = 0

[State 900, 1]
type = EnvColor
trigger1 = movehit > 0 && var(12) >= 15
value = 255, 255, 255
time = 1
under = 1
persistent = 0
ignorehitpause = 1

[State 182, 2]
type = varset
trigger1 = var(12) = 0
var(5) = 0

[State 182, 2]
type = varadd
triggerall = var(12) >= 15
trigger1 = movehit > 0
var(5) = 1

[State 182, 2]
type = movehitreset
triggerall = var(12) >= 15
triggerall = movehit > 0
trigger1 = numtarget(7022) = 0
trigger2 = numtarget(7022) > 0
trigger2 = target(7022),stateno != 5000 && target(7022),stateno != 5020 && target(7022),stateno != 5010
persistent = 0

[State 182, 2]
type = varset
triggerall = var(12) >= 15
trigger1 = numtarget(7022) > 0
trigger1 = target(7022),stateno = 5000 || target(7022),stateno = 5020 || target(7022),stateno = 5010
var(18) = 1
ignorehitpause = 1

[State 182, 2]
type = varset
triggerall = var(12) >= 15
trigger1 = numtarget(7022) = 0
trigger2 = numtarget(7022) > 0
trigger2 = target(7022),stateno != 5000 && target(7022),stateno != 5020 && target(7022),stateno != 5010
var(18) = 0
ignorehitpause = 1

[State 1002, 4]
type = Targetstate
triggerall = var(12) >= 15
trigger1 = movehit > 0 && numtarget(7022) > 0
value = 6995
id = 7022
ignorehitpause = 1
persistent = 0

[State 1002, 4]
type = changestate
triggerall = var(12) >= 15
trigger1 = movehit > 0 && var(18) = 1 && var(5) < 2
trigger2 = movehit > 0 && var(5) > 1
value = 7222
ignorehitpause = 1
persistent = 0

[State 522, 4]
type = ChangeState
trigger1 = var(12) >= 27
value = 7023
;------------------------------------
; scorch land
[Statedef 7023]
type = S
physics = N
movetype = A
ctrl = 0
anim = 7002
velset = 0,0,0

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 0

[State 301, 4]
type = Posset
trigger1 = time = 0
y = 0

[State 522, 1]
type = posadd
trigger1 = AnimElem = 1
trigger2 = animelem = 2
x = 18

[State 7800, 3]
type = BGPalfx
trigger1 = animtime < -2
ignorehitpause = 1
supermove = 1
time = 2
mul = 158,158,158
invertall = 1

[State 523, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------
; scorch sucess
[Statedef 7222]
type = A
physics = N
movetype = A
ctrl = 0
anim = 7222
velset = 0,0
sprpriority = 2

[State 5040, 1]
type = nothitby
trigger1 = 1
value = SCA
ignorehitpause = 1
[State 5040, 1]
type = playerpush
trigger1 = 1
value = 0
ignorehitpause = 1

[State 5210, 1] 
type = PalFX
trigger1 = Time = 0
time = 1
add = 0,0,0 

[State 1531, 5]
type = Playsnd
trigger1 = animelem = 6
value = s9,0

[State 1531, 5]
type = Posadd
trigger1 = animelem = 2
x = 22
y = -4
[State 1531, 5]
type = Posadd
trigger1 = animelem = 3
trigger2 = animelem = 4
x = 16
[State 1531, 5]
type = Posadd
trigger1 = animelem = 5
x = 8
[State 1531, 5]
type = Posadd
trigger1 = animelem = 10
trigger2 = animelem = 11
x = 16
[State 1531, 5]
type = Posadd
trigger1 = animelem = 12
y = 1

[State 240, 3]
type = Width
trigger1 = animelem = 1
value = 50
[State 240, 3]
type = Width
trigger1 = animelem = 2
value = 66
[State 240, 3]
type = Width
trigger1 = animelem = 3
value = 82
[State 240, 3]
type = Width
trigger1 = animelem = 12
value = 52

[State 1531, 5]
type = Envshake
trigger1 = AnimElem = 5
time = 20
freq = 255
ampl = -5
persistent = 0
ignorehitpause = 1

[State 7800, 3]
type = BGPalfx
trigger1 = time >= 0
ignorehitpause = 1
supermove = 1
time = 2
mul = 158,158,158
invertall = 1

[State 1300, 3]
type = Explod
trigger1 = AnimElem = 6
anim = 921
facing = -1
pos = 53,10
shadow = 68,68,68
ownpal = 1

[State 1300, 3]
type = Explod
trigger1 = AnimElem = 6
anim = 922
facing = -1
pos = 53,10
shadow = 68,68,68
sprpriority = 3
ownpal = 1

[State 1531, 5]
type = PlaySnd
trigger1 = AnimElem = 12
value = s17,1
channel = 1

[State 900, 1]
type = EnvColor
trigger1 = AnimElem = 26
trigger2 = AnimElem = 27,1
trigger3 = AnimElem = 30
trigger4 = AnimElem = 32
trigger5 = AnimElem = 34
value = 255, 255, 255
time = 1
under = 1

[State 900, 1]
type = targetlifeadd
trigger1 = animelem = 6
value = -200
kill = 0
id = 7022

[State 900, 1]
type = targetlifeadd
trigger1 = AnimElem = 25,1
value = -260
kill = 0
id = 7022

[State 900, 1]
type = targetlifeadd
trigger1 = AnimElem = 26
trigger2 = AnimElem = 29
trigger3 = AnimElem = 30,1
trigger4 = AnimElem = 32
trigger5 = AnimElem = 33,1
value = -20
id = 7022
[State 900, 1]
type = targetlifeadd
trigger1 = Animtime = 0
value = -150
id = 7022

[State 900, 1]
type = targetpoweradd
trigger1 = AnimElem = 26
trigger2 = AnimElem = 29
trigger3 = AnimElem = 30,1
trigger4 = AnimElem = 32
trigger5 = AnimElem = 33,1
value = 21
id = 7022

[State 900, 1]
type = hitadd
trigger1 = AnimElem = 26
trigger2 = AnimElem = 29
trigger3 = AnimElem = 30,1
trigger4 = AnimElem = 32
trigger5 = AnimElem = 33,1
value = 1

[State 900, 1]
type = Playsnd
trigger1 = AnimElem = 25,1
value = s9,8

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 1
pos = 0,-66
id = 7022

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 2, >= 0
trigger1 = AnimElem = 3, < 0
pos = 0,-39
id = 7022

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 3, >= 0
trigger1 = AnimElem = 4, < 0
pos = 59,-11
id = 7022

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 4, >= 0
trigger1 = AnimElem = 5, < 0
pos = 53, 0
id = 7022

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 5, >= 0
trigger1 = AnimElem = 7, < 0
pos = 41, 0
id = 7022

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 7, >= 0
trigger1 = AnimElem = 8, < 0
pos = 36,-3
id = 7022

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 8, >= 0
trigger1 = AnimElem = 9, < 0
pos = 29,-2
id = 7022

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 9
pos = 42,5
id = 7022

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 10, >= 0
trigger1 = AnimElem = 11, < 0
pos = 24,-41
id = 7022

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 11, >= 0
trigger1 = AnimElem = 12, < 0
pos = 26,-70
id = 7022

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 12, >= 0
trigger1 = AnimElem = 13, < 0
pos = 30,-125
id = 7022

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 13, >= 0
trigger1 = AnimElem = 14, < 0
pos = -3,-127
id = 7022

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 14, >= 0
trigger1 = AnimElem = 15, < 0
pos = -23,-120
id = 7022

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 15, >= 0
trigger1 = AnimElem = 16, < 0
pos = -20,-120
id = 7022

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 16, >= 0
trigger1 = AnimElem = 17, < 0
pos = -20,-120
id = 7022

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 17, >= 0
trigger1 = AnimElem = 18, < 0
pos = -2,-102
id = 7022

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 18, >= 0
trigger1 = AnimElem = 19, < 0
pos = 30,-125
id = 7022

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 19, >= 0
trigger1 = AnimElem = 20, < 0
pos = -3,-127
id = 7022

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 20, >= 0
trigger1 = AnimElem = 21, < 0
pos = -23,-120
id = 7022

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 21, >= 0
trigger1 = AnimElem = 22, < 0
pos = -20,-120
id = 7022

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 22, >= 0
trigger1 = AnimElem = 23, < 0
pos = -20,-120
id = 7022

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 23, >= 0
trigger1 = AnimElem = 24, < 0
pos = -2,-102
id = 7022

[State 1531, 5]
type = Targetbind
trigger1 = AnimElem = 24
pos = 0,-50
id = 7022

[State 9001, 2]
type = Pause
trigger1 = Time >= 94 && time < 103
time = 1

[State 3000]
type = projectile
trigger1 = AnimElem = 25,1
projanim = 9249
offset = 34,-90
projsprpriority = 5
projremovetime = 12
projedgebound = 210
[State 3000]
type = projectile
trigger1 = AnimElem = 28
projanim = 10006
offset = 34,-110
projsprpriority = 2
projremovetime = 14
projedgebound = 210
[State 3000]
type = projectile
trigger1 = AnimElem = 29,1
projanim = 9249
offset = 52,-85
projsprpriority = 5
projremovetime = 12
projedgebound = 210
[State 3000]
type = projectile
trigger1 = AnimElem = 31,1
projanim = 9249
offset = 52,-90
projsprpriority = 5
projremovetime = 12
projedgebound = 210
[State 3000]
type = projectile
trigger1 = AnimElem = 32,1
projanim = 2107
offset = 70,-129
projsprpriority = 5
projremovetime = 28
projedgebound = 210
[State 3000]
type = projectile
trigger1 = AnimElem = 33,1
projanim = 9249
offset = 80,-95
projsprpriority = 6
projremovetime = 12
projedgebound = 210

[State 8160, 13]
type = Explod
trigger1 = animelem = 29,> 0
trigger1 = NumExplod(8150) < 4
trigger1 = Random < 450
anim = 3100
ID = 8150
sprpriority = 5
pos = 80,-95
random = 80,110
ignorehitpause = 1
ownpal = 1

[State 8160, 14]
type = Explod
trigger1 = animelem = 29,> 0
trigger1 = NumExplod(3100) < 5
trigger1 = Random < 400
anim = 3110
ID = 3100
sprpriority = 5
pos = 80,-95
random = 80,110
ignorehitpause = 1
ownpal = 1

[State 8160, 15]
type = Explod
trigger1 = animelem = 29,> 0
trigger1 = NumExplod(3100) < 5
trigger1 = Random < 450
anim = 3120
ID = 3100
sprpriority = 5
pos = 80,-95
random = 80,80
ignorehitpause = 1
ownpal = 1

[State 8160, 16]
type = Explod
trigger1 = animelem = 29,> 0
trigger1 = NumExplod(3100) < 5
trigger1 = Random < 400
anim = 3130
ID = 3100
sprpriority = 5
pos = 80,-95
random = 80,80
ignorehitpause = 1
ownpal = 1

[State 8160, 17]
type = Explod
trigger1 = animelem = 29,> 0
trigger1 = NumExplod(3140) < 5
trigger1 = Random < 500
anim = 3140
ID = 3140
sprpriority = 5
pos = 80,-95
random = 80,80
ignorehitpause = 1
ownpal = 1

[State 8160, 18]
type = Explod
trigger1 = animelem = 29,> 0
trigger1 = NumExplod(3140) < 5
trigger1 = Random < 500
anim = 3150
ID = 3140
sprpriority = 5
pos = 80,-95
random = 80,80
ignorehitpause = 1
ownpal = 1

[State 1300, 5]
type = projectile
trigger1 = AnimElem = 12
trigger2 = AnimElem = 18,1
trigger3 = AnimElem = 24,1
projanim = 1035
offset = 0,0
projsprpriority = 4
projremovetime = 34
projedgebound = 210
[State 1300, 5]
type = projectile
trigger1 = AnimElem = 16,1
trigger2 = AnimElem = 22,1
projanim = 1036
offset = 0,0
projsprpriority = 4
projremovetime = 31
projedgebound = 210

[State 210, 3]
type = Velset
trigger1 = AnimElem = 12
y = -5

[State 210, 3]
type = Velset
trigger1 = AnimElem = 24
y = -1.5

[State 301, 4]
type = Posset
trigger1 = time = 0
y = 0

[State 100, 5]
type = ChangeState
triggerall = time = 1
trigger1 = numtarget(7022) > 0
trigger1 = target(7022),stateno != 7122
trigger2 = numtarget(7022) = 0
value = 7023

[State 523, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 7101
;----------------------------------
; scorch thrown
[Statedef 7122]
type = A
physics = N
movetype = H
velset = 0,0

[State 1531, 5]
type = nothitby
trigger1 = 1
value = SCA

[State 1531, 5]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 1531, 5]
type = defencemulSet
trigger1 = 1
value = 1

[State 5210, 1] 
type = PalFX
trigger1 = Time = 0
time = 1
add = 0,0,0 

[state 8301, 0]
type = sprpriority
trigger1 = animelem = 8 && anim != 7142
trigger2 = anim = 7142 && animelem = 4
value = 3

[state 8301, 0]
type = sprpriority
trigger1 = anim = 7142
trigger1 = animelem = 2
value = 1

[state 8301, 0]
type = sprpriority
trigger1 = anim = 7142
trigger1 = animelem = 5 || animelem = 11
value = 1
[state 8301, 0]
type = sprpriority
trigger1 = anim = 7142
trigger1 = animelem = 9 || animelem = 15
value = 3
[state 8301, 0]
type = sprpriority
trigger1 = time = 88
value = -1

[State 3305, 2]
type = PalFX
trigger1 = time = 87
time = 5
add = 48,0,168
mul = 166,166,166
sinadd = 96,96,96,12
color = 0
invertall = 1
[State 3305, 2]
type = PalFX
trigger1 = time = 103 || time = 121
time = 9
add = 48,0,168
mul = 166,166,166
sinadd = 96,96,96,12
color = 0
invertall = 1
[State 3305, 2]
type = PalFX
trigger1 = time = 94 || time = 112
time = 9
add = 96,48,216
mul = 166,166,166
sinadd = 64,64,64,24
color = 0

[State 1531, 5]
type = ChangeAnim2
trigger1 = time = 0
value = 7122

[State 1531, 5]
type = ChangeAnim
trigger1 = anim = 7122
trigger1 = animelem = 8
trigger1 = selfanimexist(5111)
value = 5111

[State 1531, 5]
type = ChangeAnim2
trigger1 = time = 48
value = 7142

[State 1531, 5]
type = changeanim
trigger1 = anim = 7142 && animtime = 0
value = 5050

[State 1531, 5]
type = changeanim
trigger1 = anim = 5050
value = anim

[State 1531, 5]
type = posadd
trigger1 = time >= 84 && time < 88
x = -6
y = -5
[State 1531, 5]
type = posadd
trigger1 = time = 96 || time = 97 || time = 100 || time = 101
x = -13
y = -7
[State 1531, 5]
type = velset
trigger1 = 1
x = 0
y = 0

[State 706, 4]
type = ChangeState
trigger1 = Time = 122
value = 7123
;-----------------------------------
; scorch thrown(Falling)
[Statedef 7123]
type    = A
movetype= H
physics = N
velset = -5,-7
ctrl = 0
anim = 5050
sprpriority = 0

[State 1531, 5]
type = defencemulSet
trigger1 = 1
value = 1

[State 3305, 2]
type = PalFX
trigger1 = time = 8 || time = 26
time = 9
add = 96,48,216
mul = 166,166,166
sinadd = 64,64,64,24
color = 0
[State 3305, 2]
type = PalFX
trigger1 = time = 17
time = 9
add = 48,0,168
mul = 166,166,166
sinadd = 96,96,96,12
color = 0
invertall = 1
[State 3305, 2]
type = PalFX
trigger1 = time = 35
time = 8
add = 48,0,168
mul = 166,166,166
sinadd = 96,96,96,12
color = 0
invertall = 1

[State 1531, 5]
type = changeanim
trigger1 = vel Y > 0
trigger1 = anim != 5062
trigger1 = selfanimexist(5062)
value = 5062

[State 5050, 2];Coming down anim
type = ChangeAnim
trigger1 = anim = [5050,5059]
trigger1 = Vel Y >= ifelse(anim = 5050, 1, -2)
trigger1 = SelfAnimExist(anim+10)
value = anim+10
persistent = 0

[State 706, 1]
type = VelAdd
trigger1 = 1
y = .55

[State 706, 4]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= -10
value = 5100
;-------------------------------------
; shadow attack
[Statedef 8300]
type    = S
movetype= A
physics = N
ctrl = 0
anim = 8301
velset = 0,0,0
facep2 = 1

[State 260, 1]
type = HitBy
trigger1 = Time >= 0
trigger1 = time <= 25                 
value = SCA,AT

[State 1531, 5]
type = PosFreeze
trigger1 = time >= 0

[State 522, 1]
type = PlaySnd
trigger1 = AnimElem = 2
value = s6,0
channel = 1

[State 1006, 6]
type = Helper
trigger1 = time = 0
id = 8301
name = "Iori's shadow"
pos = 0,0  
stateno = 8301
ownpal = 1

[state 8300, 10]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1
;----------------------------------------
; shadow
[Statedef 8301]
type    = A
movetype= A
physics = N
juggle = 0
anim = 8300
velset = 13.5,-6
facep2 = 1

[state 2, 1]
type = playsnd
trigger1 = time = 0
value = s2,3

[state 8302, 0]
type = posadd
trigger1 = time = 0
x = -255

[state 8301, 0]
type = veladd
trigger1 = 1
y = 0.43

[state 8302, 0]
type = parentvarset
trigger1 = time = 0 && parent,var(53) = 0
var(37) = 2

[state 8302, 0]
type = parentvaradd
trigger1 = time = 0 && parent,var(53) = 1
var(20) = 10
[state 8302, 0]
type = parentvaradd
trigger1 = time = 0 && parent,var(53) = 1 && parent,var(3) > 0
var(2) = -1000

[state 8301, 0]
type = posset
trigger1 = time = 0
y = -10

[state 8300, 10]
type = changestate
trigger1 = animtime = 0
value = 8306
;-------------------------------------
; shadow - H
[Statedef 8306]
type    = A
movetype= A
physics = N
juggle = 0
anim = 8308
sprpriority = -1

[State 1203, 5]
type = varset
trigger1 = time = 0
var(42) = 0

[State 1203, 5]
type = varset
trigger1 = time = 0
var(43) = 0

[State 1203, 5]
type = varadd
trigger1 = var(42) > 0 && numtarget(8306) > 0
var(42) = -1
ignorehitpause = 1

[State 1203, 5]
type = varadd
trigger1 = var(43) > 0 && numtarget(8306) > 0
var(43) = -1
ignorehitpause = 1

[State 1203, 5]
type = varset
trigger1 = movehit > 0
var(42) = 44
persistent = 0
ignorehitpause = 1

[State 1203, 5]
type = varset
trigger1 = moveguarded > 0
var(43) = 32
persistent = 0
ignorehitpause = 1

[State 1203, 5]
type = Envshake
trigger1 = movehit > 0
time = 20
freq = 255
ampl = -2
persistent = 0
ignorehitpause = 1

[State 210, 2]
type = veladd
trigger1 = movehit > 0 && numtarget(8306) = 0
trigger2 = movehit > 0 && var(42) = 0
trigger3 = movecontact = 0
trigger4 = moveguarded > 0 && var(43) = 0
trigger5 = moveguarded > 0 && numtarget(8306) = 0
y = 0.43

[State 210, 2]
type = posfreeze
trigger1 = movehit > 0 && numtarget(8306) > 0
trigger1 = var(42) > 0
trigger2 = moveguarded > 0 && numtarget(8306) > 0
trigger2 = var(43) > 0

[State 210, 2]
type = Velset
trigger1 = frontedgedist < 6
x = 0

[State 210, 2]
type = Velset
trigger1 = frontedgedist > 5
x = 13.5

[State 200, 3]
type = HitDef
trigger1 = animelem = 1
ID = 8306
attr = A,SP
damage    = 55,10            
guardflag = MA             
animtype = med
hitflag = MAF
priority = 5                  
pausetime = 12,44
guard.pausetime = 12,32
sparkno = s10006
guard.sparkno = s10010
sparkxy = 10-ifelse((root,var(1))=1000||(root,var(1))=500||(root,var(1))=750||(root,var(1))=667,16,0),-33
hitsound   = s3,8
guardsound = s1,0
ground.type = High
ground.slidetime = 20           
ground.hittime  = 20      
guard.slidetime = 20-ifelse((root,var(1))=1000||(root,var(1))=500||(root,var(1))=750||(root,var(1))=667,9,0)
guard.hittime = 20-ifelse((root,var(1))=1000||(root,var(1))=500||(root,var(1))=750||(root,var(1))=667,9,0)
guard.velocity = -13
p2stateno = 5020
p2getp1state = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
ground.velocity = -5,-4.8
air.type = High                  
air.velocity = -5,-4.3           
fall = 1                        
fall.recover = 1
fall.recovertime = 72

[State 9401, 6]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
stateno = 8310
                
[state 8300, 10]
type = changestate
triggerall = Pos Y >= -20
trigger1 = movehit > 0 && numtarget(8306) = 0
trigger2 = movehit > 0 && var(42) = 0
trigger3 = movecontact = 0
trigger4 = moveguarded > 0 && var(43) = 0
trigger5 = moveguarded > 0 && numtarget(8306) = 0
value = 8302

; shadow - action 2
[Statedef 8302]
type    = A
movetype= A
physics = N
anim = 8302
velset = 0,0
juggle = 0

[State 5040, 1]
type = nothitby
trigger1 = time < 3
value = SCA

[State 5040, 1]
type = statetypeset
trigger1 = animelem = 10
movetype = I

[State 5100, 1]
type = playerpush
trigger1 = 1
value = 0

[State 510, 1]
type = sprpriority
trigger1 = time = 0 || animelem = 9
value = -1

[State 50, 4]
type = PlaySnd
trigger1 = time = 0
value = s2,1

[state 8302, 0]
type = posset
trigger1 = time = 0
trigger2 = animelem = 6
y = 0

[State 522, 1]
type = PlaySnd
trigger1 = AnimElem = 7
value = s7,8

[State 522, 1]
type = PlaySnd
trigger1 = AnimElem = 3
value = s8,6
channel = 5

[State 522, 1]
type = PlaySnd
trigger1 = AnimElem = 18
value = s8,7

[state 8302, 0]
type = velset
trigger1 = time = 7
x = 7
y = -2

[State 210, 2]
type = Velset
trigger1 = time > 6 && time < 17
trigger1 = frontedgedist < 6
x = 0

[State 210, 2]
type = Velset
trigger1 = time > 6 && time < 17
trigger1 = frontedgedist > 5
x = 7

[state 8302, 0]
type = veladd
trigger1 = time > 6 && time < 17
y = .4

[state 8302, 0]
type = velset
trigger1 = time = 17
x = 0
y = 0

[State 1300, 5]
type = explod
trigger1 = AnimElem = 7
anim = 312
pos = -2,5
postype = p1
sprpriority = 2
pausemovetime = 9999
ownpal = 1

[State 210, 1]
type = PlaySnd
trigger1 = movehit > 0
value = s4,1
ignorehitpause = 1
persistent = 0

[State 522, 3]
type = HitDef
trigger1 = AnimElem = 7
trigger1 = p2statetype != L
attr = S, SP
animtype = hard
damage = 45,10
hitflag = MAFD
guardflag = MA
pausetime = 12,12
priority = 5
sparkno = s10006
guard.sparkno = s10111
sparkxy = 0-ifelse((root,var(1))=1000||(root,var(1))=500||(root,var(1))=750||(root,var(1))=667,16,0),-60
hitsound = s3,2
guardsound = s1,0
ground.slidetime = 20
ground.hittime = 20
guard.slidetime = 20-ifelse((root,var(1))=1000||(root,var(1))=500||(root,var(1))=750||(root,var(1))=667,9,0)
guard.hittime = 20-ifelse((root,var(1))=1000||(root,var(1))=500||(root,var(1))=750||(root,var(1))=667,9,0)
air.type = high
ground.cornerpush.veloff = -3
air.cornerpush.veloff = -3
guard.cornerpush.veloff = -3
ground.velocity = -5,-5
air.velocity = -5,-5
ground.type = high
guard.velocity = -13
down.velocity = -4,-5
palfx.time = 46
palfx.add = 48,0,168
palfx.mul = 166,166,166
palfx.sinadd = 96,96,96,17
palfx.color = 0 
palfx.invertall = 1
down.bounce = 1
fall = 1
fall.recover = 1
fall.yvelocity = -3.5
fall.recovertime = 37

[State 522, 3]
type = HitDef
trigger1 = AnimElem = 7
trigger1 = p2statetype = L
attr = S, SP
animtype = hard
damage = 67,10
hitflag = MAFD
guardflag = MA
priority = 5
pausetime = 12,12
sparkno = s10006
guard.sparkno = s10111
sparkxy = 0-ifelse((root,var(1))=1000||(root,var(1))=500||(root,var(1))=750||(root,var(1))=667,16,0),-60
hitsound = s3,2
guardsound = s1,0
air.type = high
ground.slidetime = 20
ground.hittime = 20
guard.slidetime = 20-ifelse((root,var(1))=1000||(root,var(1))=500||(root,var(1))=750||(root,var(1))=667,9,0)
guard.hittime = 20-ifelse((root,var(1))=1000||(root,var(1))=500||(root,var(1))=750||(root,var(1))=667,9,0)
ground.cornerpush.veloff = -3
air.cornerpush.veloff = -3
guard.cornerpush.veloff = -3
ground.velocity = -5,-5
air.velocity = -5,-5
guard.velocity = -13
ground.type = high
down.velocity = -4,-5
palfx.time = 42
palfx.add = 48,0,168
palfx.mul = 166,166,166
palfx.sinadd = 96,96,96,17
palfx.color = 0 
palfx.invertall = 1 
down.bounce = 1
fall = 1
fall.yvelocity = -3.5
fall.recover = 1
fall.recovertime = 37

[State 7110, 8]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 500
trigger1 = p2movetype = H
trigger1 = time < 28
anim = 3100
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7110, 9]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = time < 28
trigger1 = p2movetype = H
trigger1 = Random < 500
anim = 3110
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7110, 10]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 500
trigger1 = p2movetype = H
trigger1 = time < 28
anim = 3120
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7110, 11]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 500
trigger1 = p2movetype = H
trigger1 = time < 28
anim = 3130
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7110, 12]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 500
trigger1 = p2movetype = H
trigger1 = time < 38
anim = 3140
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7110, 13]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 500
trigger1 = p2movetype = H
trigger1 = time < 38
anim = 3150
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 8300, 9]
type = HitOverride
trigger1 = 1
attr = SCA, AA, AT, AP
stateno = 8310

[state 8300, 10]
type = changestate    
trigger1 = animtime = 0
value = 8320
;---------------------------------
; shadow (when throw)
[Statedef 8303]
type    = S
movetype= A
physics = N
anim = 8306
velset = -6,13
ownpal = 1

[State 9401, 6]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
stateno = 8303
                
[state 8301, 0]
type = turn
trigger1 = time = 0

[State 225, 2]
type = HitDef
trigger1 = AnimElem = 1
attr = S,ST
damage   = 20,10  
animtype = Hard
hitflag = MAFD
guardflag = MA
pausetime = 12,12
sparkno = s10006
guard.sparkno = s10010
sparkxy = 10-ifelse((root,var(1))=1000||(root,var(1))=500||(root,var(1))=750||(root,var(1))=667,16,0),-32
hitsound   = s5,4
guardsound = S1,0
ground.type = low
ground.slidetime = 15
ground.hittime = 15
guard.slidetime = 15-ifelse((root,var(1))=1000||(root,var(1))=500||(root,var(1))=750||(root,var(1))=667,7,0)
guard.hittime = 15-ifelse((root,var(1))=1000||(root,var(1))=500||(root,var(1))=750||(root,var(1))=667,7,0)
ground.velocity = -1.5,-13
air.velocity = -1.5,-13
airguard.velocity = -3.5
p2stateno = 3010
palfx.time = 1
palfx.add = 0,0,0
fall = 1
fall.recover = 0
yaccel = .5

[state 8300, 10]
type = changestate
trigger1 = pos y > -10
value = 8305
;------------------------------------
[Statedef 8304];Y
type    = A
movetype= I
physics = N
anim = 12342

[State 210, 2]
type = velset
trigger1 = time = 14
x = 4.2
y = -8

[State 210, 2]
type = velset
trigger1 = time = 60
y = 0

[State 210, 2]
type = velset
trigger1 = time = 82
x = 0

[State 210, 2]
type = Varset
trigger1 = time = 0
var(35) = 0

[State 210, 2]
type = Varset
trigger1 = time = 0
var(36) = 0

[State 210, 2]
type = Varset
trigger1 = parent, var(17) = 1
var(35) = 1

[State 210, 2]
type = Varadd
trigger1 = var(35) = 1
var(36) = 1

[State 106, 6]
type = Helper
trigger1 = var(36) = 10
trigger1 = frontedgedist > 50 || parentdist X > 59
ID = 8301
name = "Iori's shadow"
pos = 190,-200  
stateno = 8303
ownpal = 1

[State 106, 6]
type = Helper
trigger1 = var(36) = 10 && frontedgedist < 51 && parentdist X < 60
ID = 8301
name = "Iori's shadow"
pos = 170,-200  
stateno = 8303
ownpal = 1

[State 210, 2]
type = Velset
trigger1 = frontedgedist < 6 && time < 82 && time > 13
x = 0

[State 210, 2]
type = Velset
trigger1 = frontedgedist > 5 && time < 82 && time > 13
x = 4.2

[State 210, 2]
type = Veladd
trigger1 = time < 60 && time > 13
y = .35

[state 8300, 10]
type = destroyself
trigger1 = p2stateno != 1401 && p2stateno != 1501 && p2stateno != 1406
trigger1 = p2stateno != 1408 && p2stateno != 1409 && p2stateno != 5110
trigger1 = var(35) = 0
trigger2 = var(36) = 10
trigger3 = parent,stateno = 1405 && parent,time = 0 && var(35) = 0
trigger4 = parent,stateno = 1505 && parent,time = 0 && var(35) = 0
;-----------------------------------
[Statedef 8307];C
type    = A
movetype= I
physics = N
anim = 12342

[State 210, 2]
type = velset
trigger1 = time = 14
x = 5.5
y = -6

[State 210, 2]
type = velset
trigger1 = time = 49
y = 0

[State 210, 2]
type = velset
trigger1 = time = 71
x = 0

[State 210, 2]
type = Varset
trigger1 = time = 0
var(35) = 0

[State 210, 2]
type = Varset
trigger1 = time = 0
var(36) = 0

[State 210, 2]
type = Varset
trigger1 = parent, var(17) = 1
var(35) = 1

[State 210, 2]
type = Varadd
trigger1 = var(35) = 1
var(36) = 1

[State 106, 6]
type = Helper
trigger1 = var(36) = 10
trigger1 = frontedgedist > 50 || parentdist X > 59
ID = 8301              
name = "Iori's shadow"
pos = 190,-200  
stateno = 8303
ownpal = 1

[State 106, 6]
type = Helper
trigger1 = var(36) = 10 && frontedgedist < 51 && parentdist X < 60
ID = 8301
name = "Iori's shadow"
pos = 185,-200  
stateno = 8303
ownpal = 1

[State 210, 2]
type = Velset
trigger1 = frontedgedist < 6 && time < 71 && time > 13
x = 0

[State 210, 2]
type = Velset
trigger1 = frontedgedist > 5 && time < 71 && time > 13
x = 5.5

[State 210, 2]
type = Veladd
trigger1 = time < 49 && time > 13
y = .35

[state 8300, 10]
type = destroyself
trigger1 = p2stateno != 1401 && p2stateno != 1501 && p2stateno != 1406
trigger1 = p2stateno != 1408 && p2stateno != 1409 && p2stateno != 5110
trigger1 = var(35) = 0
trigger2 = var(36) = 10
trigger3 = parent,stateno = 1405 && parent,time = 0 && var(35) = 0
trigger4 = parent,stateno = 1505 && parent,time = 0 && var(35) = 0
;---------------------------------
[Statedef 8308];x
type    = A
movetype= I
physics = N
anim = 12342
               
[state 182, 1]
type = parentvaradd
trigger1 = time = 0 && parent,var(53) = 0
var(20) = 10
[state 182, 1]
type = parentvaradd
trigger1 = time = 0 && parent,var(53) = 0 && parent,var(3) > 0
var(2) = -1000

[state 182, 1]
type = parentvaradd
trigger1 = time = 0 && parent,var(53) = 1
var(20) = 20
[state 182, 1]
type = parentvaradd
trigger1 = time = 0 && parent,var(53) = 1 && parent,var(3) > 0
var(2) = -2000

[state 8302, 0]
type = parentvarset
trigger1 = time = 0 && parent,var(53) = 0
var(37) = 2
         
[state 8300, 10]
type = destroyself
trigger1 = parent,numhelper(8301) > 1 || time = 90
;--------------------------------
[Statedef 8305]
type    = S
movetype= A
physics = S
juggle  = 6
anim = 8307
velset = 0,0
ownpal = 1

[State 225, 3]
type = posset
trigger1 = time = 0
y = 0

[State 225, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 8320
;----------------------------------------
; shadow get hurt
[Statedef 8310]
type    = A
movetype= H
physics = N
anim = 8310
facep2 = 1
velset = 0,0
sprpriority = -1

[State 0, 1]
type = stopsnd
trigger1 = time = 0
channel = 5

[State 5050, 3] 
type = Velset
trigger1 = time = 12
x = -5
y = -8.3

[State 5050, 3] 
type = Veladd
trigger1 = time >= 12
y = .6

[State 5050, 6]
type = ChangeState
trigger1 = pos y > 0
trigger1 = time >= 20
value = 8311 
;----------------------------------
[Statedef 8311]
type    = A
movetype= H
physics = N
anim = 8311
velset = 0,0

[State 505, 3] 
type = posadd
trigger1 = animelem = 8
x = -10

[State 505, 3] 
type = Velset
trigger1 = animelem = 2
x = -4
y = -6

[State 505, 3] 
type = Veladd
trigger1 = time > 3 && time < 14
y = 1.1

[State 505, 3] 
type = posadd
trigger1 = animelem = 3
x = -1

[State 505, 3]
type = Velset
trigger1 = animelem = 3
x = 0
y = 0

[State 505, 3] 
type = posset
trigger1 = time = 0 || animelem = 3
y = 0

[State 510, 8]
type = GameMakeAnim
trigger1 = animelem = 1 || animelem = 3
value = 61 
pos = -5,0
under = 1

[State 103, 4]
type = PlaySnd
trigger1 = animelem = 1 || animelem = 3
value = F7,0 

[State 5050, 6]
type = ChangeState
trigger1 = animtime = 0
value = 8320 
;---------------------------------------
[Statedef 8320]      
type    = S
movetype= I
physics = N
anim = 8312  
ownpal = 1
velset = -19,-19

[State 8310, 1]
type = changeanim
trigger1 = time = 0
trigger1 = prevstateno = 8305
value = 8313

[State 8310, 1]
type = playsnd
trigger1 = time = 0
value = s2,3

[State 8310, 10]
type = destroyself
trigger1 = backedgedist < -30
;----------------------------------
; auto dist attack
[Statedef 8314]
type    = A
movetype= A
physics = N
anim = 12352

[State 210, 2]
type = HitDef
trigger1 = animelem = 1
attr = A,HT
guard.sparkno = -1
sparkno = -1
ground.type = low
fall = 1
fall.recover = 0

[State 5050, 6]
type = destroyself
trigger1 = p2statetype = S
;------------------------------------
;bright(win)
[Statedef 8315]
type    = A
movetype= I
physics = N
anim = 12362

[State 1300, 5]
type = pause
triggerall = time = 0
trigger1 = parent,stateno = 1030 || parent,stateno = 1031 || parent,stateno = 1037 || parent,stateno = 1038
trigger2 = parent,stateno = 1040 || parent,stateno = 1041 || parent,stateno = 1050 || parent,stateno = 301
trigger3 = parent,numhelper(8301) > 0
trigger3 = helper(8301),movecontact > 0 && helper(8301),stateno = 8302
trigger4 = parent,ProjHit = 1, < 2
time = 5
movetime = 5

[State 1300, 5]
type = Envcolor
trigger1 = time < 10
trigger1 = Timemod = 2,0
ignorehitpause = 1
value = 255,255,255
time = 2
under = 1

[State 1300, 5]
type = Envcolor
trigger1 = time < 10
trigger1 = Timemod = 2,1
ignorehitpause = 1
value = 255,0,0
time = 2
under = 1

[State 1300, 5]
type = Envcolor
trigger1 = time = 10
ignorehitpause = 1
value = 255,255,255
time = 1
under = 1

;bright(x)
[Statedef 8317]
type    = A
movetype= I
physics = N
anim = 12362

[State 5050, 6]
type = destroyself
trigger1 = time = 9999

;armor life
[Statedef 8316]
type    = S
physics = N
anim = 12342

[State 8316, 2]
type = parentvarset
triggerall = parent, var(30) = 1
trigger1 = parent, var(16) > 0
trigger1 = parent, life < 999
trigger1 = parent, var(26) < 999
trigger2 = parent, var(16) < 1
var(30) = 2

[State 8316, 2]
type = destroyself
trigger1 = parent, var(30) = 2
;-----------------------------------
; 98 dm
[Statedef 7599]
type    = S
movetype= A
physics = S
ctrl = 0
anim = 7600
sprpriority = -1
facep2 = 1
velset = 0,0
sprpriority = 0

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 1

[State 7601, 0]
type = Varset
trigger1 = Time = 0
var(18) = 0

[State 610, 3]
type = ChangeState
triggerall = var(55) = 1
triggerall = time >= 20
trigger1 = random <= 20
trigger2 = p2movetype = A || enemynear,vel x > 0
trigger2 = p2bodydist X <= 200
trigger2 = random <= 500
trigger3 = p2bodydist X <= 100
trigger3 = random <= 300
value = 7601

[State 610, 4]
type = ChangeState
triggerall = var(55) = 0
trigger1 = time >= 20
trigger1 = command != "hold_x"
trigger1 = command != "hold_y"
value = 7601

[State 610, 4]
type = changestate
trigger1 = var(18) = 1
value = 7601

[State 7000, 0]
type = posset
trigger1 = time = 0
trigger1 = pos y != 0
y = 0

[State 182, 2]
type = NotHitBy
trigger1 = Time <= 20
value = SCA

[State 192, 4]
type = varset
trigger1 = p2dist X < 0
var(4) = 1
[State 192, 4]
type = varset
trigger1 = p2dist X >= 0
var(4) = 0

[State 192, 4]
type = removeexplod
trigger1 = time >= 2 && var(4) = 1
id = 7599

[State 182, 2]
type = turn
trigger1 = p2dist X < 0

[State 1531, 5]
type = playsnd
trigger1 = time = 0
value = s1,7

[State 1531, 5]
type = PosFreeze
trigger1 = time >= 0

[State 4120, 1]
type = playsnd
trigger1 = time = 2
value = s19,0
channel = 1

[State 2100, 5]
type = Explod
trigger1 = animelem = 2
anim = 12000
sprpriority = 4
pos = -17,-90
bindtime = -1
supermove = 1
ownpal = 1

[State 192, 4]
type = explod
trigger1 = AnimElem = 2
trigger2 = time >= 2 && var(4) = 1
anim = 999
removetime = 9999
id = 7599
pos = -64, 7
sprpriority = 0
bindtime = -1       
ownpal = 1

[State 2000, VarAdd]
type = VarAdd
trigger1 = Time = 140
var(18) = 1
;----------------------------------
; 98 dm
[Statedef 7600]
type    = S
movetype= A
physics = S
ctrl = 0
anim = 7600
sprpriority = -1
facep2 = 1
velset = 0,0
sprpriority = 0

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 1

[State 7601, 0]
type = Varset
trigger1 = Time = 0
var(18) = 0

[State 610, 4]
type = ChangeState
triggerall = var(55) = 0
trigger1 = time >= 7
trigger1 = command != "hold_x"
value = 7601

[State 610, 3]
type = ChangeState
triggerall = var(55) = 1
triggerall = time >= 7
trigger1 = random <= 20
trigger2 = p2movetype = A || enemynear,vel x > 0
trigger2 = p2bodydist X <= 200
trigger2 = random <= 500
trigger3 = p2bodydist X <= 100
trigger3 = random <= 300
value = 7601

[State 610, 4]
type = changestate
trigger1 = var(18) = 1
value = 7601

[state 182, 1]
type = varset
trigger1 = time = 0 && var(3) > 0
var(5) = 1
[state 182, 1]
type = varset
trigger1 = time = 0 && var(3) < 1
var(5) = 0

[state 182, 1]
type = varadd
trigger1 = time = 6 && var(5) = 0
var(20) = 10
[state 182, 1]
type = varset
trigger1 = time = 0 && var(3) > 0
var(3) = 0

[State 182, 2]
type = NotHitBy
trigger1 = Time <= 7
value = SCA

[State 192, 4]
type = varset
trigger1 = p2dist X < 0
var(4) = 1
[State 192, 4]
type = varset
trigger1 = p2dist X >= 0
var(4) = 0

[State 192, 4]
type = removeexplod
trigger1 = time >= 2 && var(4) = 1
id = 7599

[State 182, 2]
type = turn
trigger1 = p2dist X < 0

[State 1300, 5]
type = Envcolor
trigger1 = Time = 1
persistent = 0
ignorehitpause = 1
value = 255,255,255
time = 4
under = 1
supermove = 1

[State 1300, 5]
type = Envcolor
trigger1 = Time = 5
persistent = 0
ignorehitpause = 1
value = 0, 0, 0
time = 23
under = 1
supermove = 1

[State 1531, 5]
type = playsnd
trigger1 = time = 0
value = s1,7

[State 1531, 5]
type = PosFreeze
trigger1 = time >= 0

[State 4120, 1]
type = SuperPause
trigger1 = time = 1
movetime = 5
p2defmul = 1
time = 27
anim = -1

[State 4120, 1]
type = playsnd
trigger1 = time = 2
value = s19,0
channel = 1

[State 2100, 4]
type = Explod
trigger1 = time = 0
anim = 12010
sprpriority = 7
pos = -17,-90
supermove = 1
bindtime = -1
ownpal = 1

[State 2100, 5]
type = Explod
trigger1 = time = 0
anim = 1210
sprpriority = -1
pos = -17,-90
supermove = 1
bindtime = -1
ownpal = 1

[State 192, 4]
type = explod
trigger1 = AnimElem = 2
trigger2 = time >= 2 && var(4) = 1
anim = 999
supermove = 1
removetime = 9999
id = 7599
pos = -64, 7
sprpriority = 0
bindtime = -1       
ownpal = 1

[State 2000, VarAdd]
type = VarAdd
trigger1 = Time = 143
var(18) = 1
;----------------------------------
; 98 dm
[Statedef 7601]
type    = S
movetype= A
physics = N
ctrl = 0
anim = 7601 
velset = 0,0
sprpriority = 0

[State 1000, 4]
type = Helper
trigger1 = time = 0
name = "n2"
pos = 25,0
stateno = 2011
[State 1000, 4]
type = Helper
trigger1 = time = 0
name = "n2"
pos = 150,0
stateno = 2011
[State 1000, 1]
type = varset
trigger1 = time = 18
var(34) = 0

[State 236, 1]
type = Varset
trigger1 = time = 0 || animtime = -9
var(18) = 0

[State 236, 1]
type = Varset
trigger1 = time = 0
var(5) = 0

[State 236, 1]
type = Varset
triggerall = time > 16
trigger1 = command = "x"
trigger2 = command = "y"
trigger3 = command = "a"
trigger4 = command = "c"
var(5) = 1

[State 236, 1]
type = Varset
triggerall = time = 12
trigger1 = command = "holdback"
trigger1 = var(55) = 0
trigger2 = var(55) = 1
trigger2 = p2bodydist x <= 200
var(18) = 1

[State 4008,RE]
type = RemoveExplod
trigger1 = Time = 0
ID = 7599

[State 7601, 1]
type = posadd
trigger1 = time >= 13
trigger1 = time <= 17
trigger1 = var(18) = 0
x = 4

[State 1300, 5]
type = projectile
trigger1 = animelem = 3
projanim = 1001
offset = 0,0
projsprpriority = 1
projremovetime = 23
projedgebound = 210

[State 1006, 6]
type = Helper
trigger1 = AnimElem = 4,1
id = 7602
name = "Iori's Powerful Fireball"
pos = 36,35
stateno = 7602
ownpal = 1

[State 192, 4]
type = explod
trigger1 = AnimElem = 1
anim = 999
removetime = 4
id = 7600
pos = -63, -1
sprpriority = 3
bindtime = -1
ownpal = 1

[State 192, 4]
type = explod
trigger1 = AnimElem = 2
anim = 999
removetime = 9
id = 7600
pos = -64, -3
sprpriority = 3
bindtime = -1
ownpal = 1

[State 192, 4]
type = explod
trigger1 = AnimElem = 3
anim = 999
bindtime = -1
removetime = 3
id = 7600
pos = -75, 27
sprpriority = 3
ownpal = 1

[State 192, 4]
type = Explod
trigger1 = animelem = 4
id = 7600
anim = 999
pos = -15,38
bindtime = -1
sprpriority = 4
ownpal = 1
removetime = 4

[State 192, 4]
type = Explod
trigger1 = animelem = 5
id = 7600
anim = 999
pos = -14,20
bindtime = -1
sprpriority = 4
ownpal = 1
removetime = 5

[State 192, 4]
type = Explod
trigger1 = animelem = 6
id = 7600
anim = 999
pos = -18,12
bindtime = -1
sprpriority = 4
ownpal = 1
removetime = 5

[State 192, 4]
type = Explod
trigger1 = animelem = 7
anim = 199
pos = -22,6
sprpriority = 4
ownpal = 1

[State 610, 4]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;-----------------------------------
; Iori's Powerful Stunning Fireball 
[Statedef 7602]
type    = S
movetype= A
physics = S
velset = 3.65,0
anim = 7602
juggle = 9
sprpriority = 13

[State 9401, 6]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
stateno = 7602
                
[State 4120, 1]
type = playsnd
trigger1 = time = 0
value = s19,1

[State 4120, 1]
type = playsnd
trigger1 = time = 36
trigger1 = movecontact = 0
trigger2 = movecontact > 0
trigger3 = parent, var(55) = 0
trigger3 = parent, var(5) = 1
trigger3 = time > 11
trigger4 = time > 11
trigger4 = parent, var(55) = 1
trigger4 = p2bodydist X < 6
trigger4 = p2bodydist X > -25
trigger5 = frontedgedist <= 5
value = s19,2

[State 192, 4]          ;¹ØÆø¹ß
type = projectile
trigger1 = movecontact > 0
projanim = 7603
projsprpriority = 14
offset = 10,-35
projremovetime = 28

[state 7602, 1]
type = playerpush
trigger1 = 1
value = 0

[State 1006, 6]
type = NotHitBy
trigger1 = 1
value = SCA, NP, SP, HP

[State 1006, 6]  ;¹Ù´Ú
type = Helper
trigger1 = movehit > 0
id = 7610
name = "Iori's Powerful Fireball"
postype = p2
pos = 0,0      
stateno = 7610
bindtime = 0
ontop = 1
ownpal = 1

[State 430, 2]
type = HitDef
trigger1 = p2stateno != 5000
trigger1 = p2stateno != 5020
trigger1 = p2stateno != 5030
trigger1 = p2stateno != 5035
trigger1 = p2stateno != 5050
trigger1 = p2stateno != 5071
trigger1 = p2stateno != 3010
attr = C, HP
id = 7600
animtype = hard
numhits = 0
damage    = 0,5
guardflag = M
hitflag = MAP
priority = 7,HIT
pausetime = 0,0
getpower = 0,0
givepower = 21,21
sparkno = -1
sparkxy = 5-ifelse((root,var(1))=1000||(root,var(1))=500||(root,var(1))=750||(root,var(1))=667,16,0),-110
hitsound   = -1
guardsound = -1
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
guard.slidetime = 45-ifelse((root,var(1))=1000||(root,var(1))=500||(root,var(1))=750||(root,var(1))=667,22,0)
guard.hittime  = 45-ifelse((root,var(1))=1000||(root,var(1))=500||(root,var(1))=750||(root,var(1))=667,22,0)
ground.velocity = 0
air.type = High
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.velocity = -1.2,-3
guard.velocity = -11
p2stateno = 7605
palfx.time = 20
palfx.add = 48,0,168
palfx.mul = 166,166,166
palfx.sinadd = 96,96,96,17
palfx.color = 0 
palfx.invertall = 1 

[State 7200, 7]
type = Explod
trigger1 = movehit > 0 && p2movetype = H
anim = 9242
sprpriority = 14
postype = p2
pos = 10,-30
persistent = 0
ignorehitpause = 1
ownpal = 1

[State 7200, 7]
type = Explod
trigger1 = movehit > 0 && p2movetype = H
anim = 3100
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7200, 8]
type = Explod
trigger1 = movehit > 0 && p2movetype = H
anim = 3110
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7200, 9]
type = Explod
trigger1 = movehit > 0 && p2movetype = H
anim = 3120
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7200, 10]
type = Explod
trigger1 = movehit > 0 && p2movetype = H
anim = 3130
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7200, 11]
type = Explod
trigger1 = movehit > 0 && p2movetype = H
anim = 3140
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7200, 12]
type = Explod
trigger1 = movehit > 0 && p2movetype = H
anim = 3150
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 1006, 6]
type = Helper
triggerall = movecontact = 0
trigger1 = time = 36
trigger2 = frontedgedist <= 5
trigger3 = parent, var(55) = 0
trigger3 = parent, var(5) = 1
trigger3 = time > 11
trigger4 = time > 11
trigger4 = parent, var(55) = 1
trigger4 = p2bodydist X < 6
trigger4 = p2dist X > -50
id = 7602
name = "Iori's Powerful Fireball's Lighting"
pos = 20,-69
stateno = 7622
ownpal = 1

[State 1006, 6]
type = Helper
trigger1 = movecontact > 0
id = 7602
name = "Iori's Powerful Fireball's Lighting"
pos = 20,-69
stateno = 7623       
ownpal = 1

[state 5055, 7]
type = velset
trigger1 = time >= 1
x = 4.65

[State 1007, 9]
type = DestroySelf
trigger1 = time = 36
trigger2 = movecontact > 0
trigger3 = frontedgedist <= 5
trigger4 = parent, var(55) = 0
trigger4 = parent, var(5) = 1
trigger4 = time > 11
trigger5 = time > 11
trigger5 = parent, var(55) = 1
trigger5 = p2bodydist X < 6
trigger5 = p2bodydist X > -25
;----------------------------------------
; Iori's Powerful Stunning Fireball Floor
[Statedef 7610]
type    = S
movetype= A
physics = S
velset = 0,0
anim = 12342

[State 1007, 8]
type = posset
trigger1 = 1
y = 0

[State 3410, 1]
type = Explod
trigger1 = time = 0
ID = 7604
anim = 7604
pos = 0,0
bindtime = -1
removetime = -1
ontop = 0
ownpal = 1

[State 3410, 1]
type = removeExplod
trigger1 = p2stateno != 7605
ID = 7604

[State 1007, 9]
type = AssertSpecial
trigger1 = Time = [0,9999]
flag = noshadow

[State 1007, 9]
type = changestate
trigger1 = p2stateno != 7605 && time > 13
value = 7611

[State 1007, 9]
type = destroyself
trigger1 = p2stateno != 7605 && time < 14

[State 1007, 1]
type = posadd
trigger1 = p2life > 0
x = p2dist X
;--------------------------------------
; Iori's Powerful Stunning Fireball Floor(floor remove)
[Statedef 7611]
type    = S
movetype= A
physics = S
velset = 0,0
anim = 12342

[State 3410, 1]
type = Explod
trigger1 = time = 0
anim = 7605
pos = 0,0
ontop = 0
ownpal = 1

[State 1007, 9]
type = AssertSpecial
trigger1 = Time = [0,999999]
flag = noshadow

[State 1007, 9]
type = destroyself
trigger1 = AnimTime = 0
;--------------------------------------
; Iori's Powerful Stunning Fireball Floor(rising)
[Statedef 7622]
type    = S
movetype= A
physics = S
velset = 0,0
anim = 7610
sprpriority = 13
juggle = 9

[State 1007, 9]
type = posadd
trigger1 = time = 0
x = -10

[State 9401, 6]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
stateno = 7622
                
[State 192, 4]
type = projectile
trigger1 = time = 0
projanim = 7603
projsprpriority = 14
offset = 0,34
projremovetime = 28

[State 1006, 6]
type = Helper
trigger1 = movehit > 0
id = 7610
name = "."
postype = p2
pos = 0,0    
stateno = 7610   
bindtime = 0
ontop = 1
persistent = 0
ownpal = 1

[State 1002, 4]
type = Targetstate
trigger1 = movehit > 0
value = 7605
ignorehitpause = 1
id = 7601

[State 430, 2]
type = HitDef
trigger1 = animelem = 1
trigger1 = p2stateno != 5000
trigger1 = p2stateno != 5020
trigger1 = p2stateno != 5030
trigger1 = p2stateno != 5035
trigger1 = p2stateno != 5050
trigger1 = p2stateno != 5071
trigger1 = p2stateno != 3010
id = 7601
attr = C, HP
animtype = hard
numhits = 0
damage    = 20,5
hitflag = MAP
guardflag = M
priority = 7
pausetime = 0,0
getpower = 0,0
givepower = 21,21
sparkno = -1
sparkxy = 5-ifelse((root,var(1))=1000||(root,var(1))=500||(root,var(1))=750||(root,var(1))=667,16,0),-40
hitsound   = -1
guardsound = s1,0
ground.type = high
ground.slidetime = 20
ground.hittime  = 20
guard.slidetime = 45-ifelse((root,var(1))=1000||(root,var(1))=500||(root,var(1))=750||(root,var(1))=667,22,0)
guard.hittime  = 45-ifelse((root,var(1))=1000||(root,var(1))=500||(root,var(1))=750||(root,var(1))=667,22,0)
ground.velocity = 0 
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.velocity = -1.2,-3
guard.velocity = -12
palfx.time = 20
palfx.add = 48,0,168
palfx.mul = 166,166,166
palfx.sinadd = 96,96,96,17
palfx.color = 0 
palfx.invertall = 1 

[State 7200, 7]
type = Explod
trigger1 = movehit > 0 && p2movetype = H
anim = 9242
sprpriority = 14
postype = p2
pos = 10,-30
persistent = 0
ignorehitpause = 1
ownpal = 1

[State 7200, 7]
type = Explod
trigger1 = movehit > 0 && p2movetype = H
trigger1 = NumExplod(3100) < 6
anim = 3100
ID = 3100
sprpriority = 5
postype = p2
pos = -20,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7200, 8]
type = Explod
trigger1 = movehit > 0 && p2movetype = H
trigger1 = NumExplod(3100) < 6
anim = 3110
ID = 3100
sprpriority = 5
postype = p2
pos = -20,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7200, 9]
type = Explod
trigger1 = movehit > 0 && p2movetype = H
trigger1 = NumExplod(3100) < 6
anim = 3120
ID = 3100
sprpriority = 5
postype = p2
pos = -20,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7200, 10]
type = Explod
trigger1 = movehit > 0 && p2movetype = H
trigger1 = NumExplod(3100) < 6
anim = 3130
ID = 3100
sprpriority = 5
postype = p2
pos = -20,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7200, 11]
type = Explod
trigger1 = movehit > 0 && p2movetype = H
trigger1 = NumExplod(3100) < 6
anim = 3140
ID = 3100
sprpriority = 5
postype = p2
pos = -20,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7200, 12]
type = Explod
trigger1 = movehit > 0 && p2movetype = H
trigger1 = NumExplod(3100) < 6
anim = 3150
ID = 3100
sprpriority = 5
postype = p2
pos = -20,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 1007, 9]
type = AssertSpecial
trigger1 = Time = [0,9999]
flag = noshadow

[State 1007, 9]
type = destroyself
trigger1 = AnimTime = 0
;------------------------------------------
; Iori's Powerful Stunning Fireball Floor(rising(h))
[Statedef 7623]
type    = S
movetype= A
physics = S
velset = 0,0
anim = 7610
sprpriority = 13
juggle = 9

[State 1007, 9]
type = posadd
trigger1 = time = 0
x = -10

[State 9401, 6]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
stateno = 7623
                
[state 7602, 0]
type = varset
trigger1 = p2stateno != 7605
trigger2 = p2movetype != I
var(27) = 0

[state 7602, 0]
type = varset
trigger1 = p2stateno = 7605
trigger1 = p2movetype = I
var(27) = 1

[State 1006, 6]
type = Helper
trigger1 = movehit > 0
id = 7610
name = "."
postype = p2
pos = 0,0    
stateno = 7610   
bindtime = 0
ontop = 1
persistent = 0
ownpal = 1

[State 1002, 4]
type = Targetstate
trigger1 = movehit =1
value = 7605
ignorehitpause = 1
id = 7601

[State 430, 2]
type = HitDef
trigger1 = animelem = 1
trigger1 = var(27) = 0  
trigger1 = p2stateno != 5000
trigger1 = p2stateno != 5020
trigger1 = p2stateno != 5030
trigger1 = p2stateno != 5035
trigger1 = p2stateno != 5050
trigger1 = p2stateno != 5071
trigger1 = p2stateno != 3010
id = 7601
attr = C, HP
damage    = 20
hitflag = MAP
guardflag = M
priority = 7
pausetime = 0,0
getpower = 0,0
givepower = 21,21
sparkno = -1
sparkxy = 5-ifelse((root,var(1))=1000||(root,var(1))=500||(root,var(1))=750||(root,var(1))=667,16,0),-40
hitsound   = -1
guardsound = s1,0
ground.type = high
ground.slidetime = 20
ground.hittime  = 20
guard.slidetime = 45-ifelse((root,var(1))=1000||(root,var(1))=500||(root,var(1))=750||(root,var(1))=667,22,0)
guard.hittime  = 45-ifelse((root,var(1))=1000||(root,var(1))=500||(root,var(1))=750||(root,var(1))=667,22,0)
ground.velocity = 0 
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.velocity = -1.2,-3
guard.velocity = -12
palfx.time = 20
palfx.add = 48,0,168
palfx.mul = 166,166,166
palfx.sinadd = 96,96,96,17
palfx.color = 0 
palfx.invertall = 1 

[State 7200, 7]
type = Explod
trigger1 = movehit > 0 && p2movetype = H
anim = 9242
sprpriority = 14
postype = p2
pos = 10,-30
persistent = 0
ignorehitpause = 1
ownpal = 1

[State 7200, 7]
type = Explod
trigger1 = movehit > 0 && p2movetype = H
trigger1 = NumExplod(3100) < 6
anim = 3100
ID = 3100
sprpriority = 5
postype = p2
pos = -20,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7200, 8]
type = Explod
trigger1 = movehit > 0 && p2movetype = H
trigger1 = NumExplod(3100) < 6
anim = 3110
ID = 3100
sprpriority = 5
postype = p2
pos = -20,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7200, 9]
type = Explod
trigger1 = movehit > 0 && p2movetype = H
trigger1 = NumExplod(3100) < 6
anim = 3120
ID = 3100
sprpriority = 5
postype = p2
pos = -20,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7200, 10]
type = Explod
trigger1 = movehit > 0 && p2movetype = H
trigger1 = NumExplod(3100) < 6
anim = 3130
ID = 3100
sprpriority = 5
postype = p2
pos = -20,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7200, 11]
type = Explod
trigger1 = movehit > 0 && p2movetype = H
trigger1 = NumExplod(3100) < 6
anim = 3140
ID = 3100
sprpriority = 5
postype = p2
pos = -20,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7200, 12]
type = Explod
trigger1 = movehit > 0 && p2movetype = H
trigger1 = NumExplod(3100) < 6
anim = 3150
ID = 3100
sprpriority = 5
postype = p2
pos = -20,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 1007, 9]
type = AssertSpecial
trigger1 = Time = [0,9999]
flag = noshadow

[State 1007, 9]
type = destroyself
trigger1 = AnimTime = 0
;------------------------------------
; Iori's Powerful Stunning Fireball Floor2(rising(2))
[Statedef 7624]
type    = S
movetype= A
physics = S
velset = 0,0
anim = 7631
sprpriority = 13
juggle = 9

[State 9401, 6]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
stateno = 7624
                
[State 192, 4]          
type = playsnd
trigger1 = time = 0
value = s19,2

[State 192, 4]
type = projectile
trigger1 = time = 0
projanim = 7603
projsprpriority = 14
offset = 0,34
projremovetime = 28

[state 7602, 0]
type = varset
trigger1 = p2stateno != 7705
trigger2 = p2movetype != I
var(27) = 0

[state 7602, 0]
type = varset
trigger1 = p2stateno = 7705
trigger1 = p2movetype = I
var(27) = 1

[State 1203, 5]
type = movehitreset
trigger1 = time = 0

[State 1203, 5]
type = posadd
trigger1 = time = 0
value = frontedgedist X

[State 1203, 5]
type = Envshake
trigger1 = time = 0
time = 20
freq = 120
ampl = -6
persistent = 0
ignorehitpause = 1

[State 1006, 6]
type = Helper
trigger1 = movehit > 0
id = 7610
name = "."
postype = p2
pos = 0,0    
stateno = 7710   
bindtime = 0
ontop = 1
persistent = 0
ownpal = 1

[State 1002, 4]
type = Targetstate
trigger1 = movehit
value = 7705
ignorehitpause = 1
id = 7601

[State 430, 2]
type = HitDef
trigger1 = animelem = 1
trigger1 = var(27) = 0
trigger1 = p2stateno != 5000
trigger1 = p2stateno != 5020
trigger1 = p2stateno != 5030
trigger1 = p2stateno != 5035
trigger1 = p2stateno != 5050
trigger1 = p2stateno != 5071
trigger1 = p2stateno != 3010
id = 7601
attr = C, HP
animtype = hard
damage    = 20
hitflag = MAP
guardflag = M
priority = 7
pausetime = 0,0
getpower = 0,0
givepower = 21,21
sparkno = -1
sparkxy = 5-ifelse((root,var(1))=1000||(root,var(1))=500||(root,var(1))=750||(root,var(1))=667,16,0),-40
hitsound   = -1
guardsound = s1,0
ground.type = high
ground.slidetime = 20
ground.hittime  = 20
guard.slidetime = 45-ifelse((root,var(1))=1000||(root,var(1))=500||(root,var(1))=750||(root,var(1))=667,22,0)
guard.hittime  = 45-ifelse((root,var(1))=1000||(root,var(1))=500||(root,var(1))=750||(root,var(1))=667,22,0)
ground.velocity = 0 
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.velocity = -1.2,-3
guard.velocity = -12
palfx.time = 20
palfx.add = 48,0,168
palfx.mul = 166,166,166
palfx.sinadd = 96,96,96,17
palfx.color = 0 
palfx.invertall = 1 

[State 7200, 7]
type = Explod
trigger1 = movehit > 0 && p2movetype = H
anim = 9242
sprpriority = 14
postype = p2
pos = 10,-30
persistent = 0
ignorehitpause = 1
ownpal = 1

[State 7200, 7]
type = Explod
trigger1 = movehit > 0 && p2movetype = H
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 450
anim = 3100
ID = 3100
sprpriority = 5
postype = p2
pos = -20,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7200, 8]
type = Explod
trigger1 = movehit > 0 && p2movetype = H
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 500
anim = 3110
ID = 3100
sprpriority = 5
postype = p2
pos = -20,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7200, 9]
type = Explod
trigger1 = movehit > 0 && p2movetype = H
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 650
anim = 3120
ID = 3100
sprpriority = 5
postype = p2
pos = -20,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7200, 10]
type = Explod
trigger1 = movehit > 0 && p2movetype = H
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 700
anim = 3130
ID = 3100
sprpriority = 5
postype = p2
pos = -20,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7200, 11]
type = Explod
trigger1 = movehit > 0 && p2movetype = H
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 700
anim = 3140
ID = 3100
sprpriority = 5
postype = p2
pos = -20,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7200, 12]
type = Explod
trigger1 = movehit > 0 && p2movetype = H
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 700
anim = 3150
ID = 3100
sprpriority = 5
postype = p2
pos = -20,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 1007, 9]
type = AssertSpecial
trigger1 = Time = [0,999999]
flag = noshadow

[State 1007, 9]
type = destroyself
trigger1 = AnimTime = 0

[Statedef 7605]      ;
type = S
physics = N
movetype = I
ctrl = 0
velset = 0,0

[State 1531, 5]
type = varset
trigger1 = time = 0
sysvar(3) = 0

[State 1531, 5]
type = varadd
trigger1 = command = "struggle"
sysvar(3) = 1

[State 1531, 5]
type = defencemulSet
trigger1 = 1
value = 1

[State 3305, 5]
type = ChangeAnim2
Trigger1 = time = 0
value = 7606

[State 3305, 5]
type = statetypeset
trigger1 = time = 0
Trigger1 = pos y != 0
value = A

[State 1007, 9]
type = playerpush
trigger1 = 1
value = 1

[State 3305, 4]
type = nothitby
trigger1 = time >= 220 - sysvar(3)*5
trigger2 = life = 0
value = SCA
time = 50

[State 3305, 4]
type = lifeadd
trigger1 = timemod = 30,0
trigger1 = time >= 1
Trigger1 = time <= 220
value = -15

[State 3305, 2]
type = PalFX
trigger1 = timemod = 18,0
time = 9
add = 48,0,168
mul = 166,166,166
sinadd = 96,96,96,12
color = 0
invertall = 1

[State 3305, 2]
type = PalFX
trigger1 = timemod = 18,9
time = 9
add = 96,48,216
mul = 166,166,166
sinadd = 64,64,64,24
color = 0

[State 3305, 5]
type = velset
Trigger1 = time >= 220 - sysvar(3)*5
trigger2 = life = 0
x = -3.5
y = -4.5

[State 3305, 5]
type = ChangeAnim
Trigger1 = time >= 220 - sysvar(3)*5
trigger2 = life = 0
value = 5050
ctrl = 0

[State 3305, 4]
type = selfstate
trigger1 = time >= 220 - sysvar(3)*5
trigger2 = life = 0
value = 5050
ctrl = 0
;--------------------------------------
; 98 dm
[Statedef 7700]
type    = S
movetype= A
physics = S
ctrl = 0
anim = 7600
sprpriority = -1
facep2 = 1
velset = 0,0
sprpriority = 0

[State 1000, 1]
type = varset
trigger1 = time = 0
var(34) = 1

[State 7601]
type = Varset
trigger1 = Time = 0
var(18) = 0

[State 610, 4]
type = ChangeState
triggerall = var(55) = 0
trigger1 = time >= 7
trigger1 = command != "hold_y"
value = 7701

[State 610, 3]
type = ChangeState
triggerall = var(55) = 1
triggerall = time >= 7
trigger1 = random <= 20
trigger2 = p2movetype = A || enemynear,vel x > 0
trigger2 = random <= 500
trigger3 = p2bodydist X <= 100
trigger3 = random <= 300
value = 7701

[State 610, 4]
type = changestate
trigger1 = var(18) = 1
value = 7701

[state 182, 1]
type = varadd
trigger1 = time = 6
var(20) = 20

[State 182, 2]
type = NotHitBy
trigger1 = Time <= 7
value = SCA

[State 192, 4]
type = varset
trigger1 = p2dist X < 0
var(4) = 1
[State 192, 4]
type = varset
trigger1 = p2dist X >= 0
var(4) = 0

[State 192, 4]
type = removeexplod
trigger1 = time >= 2 && var(4) = 1
id = 7599

[State 182, 2]
type = turn
trigger1 = p2dist X < 0

[State 1300, 5]
type = Envcolor
trigger1 = Time = 1
persistent = 0
ignorehitpause = 1
value = 255,255,255
time = 4
under = 1
supermove = 1

[State 1300, 5]
type = Envcolor
trigger1 = Time = 5
persistent = 0
ignorehitpause = 1
value = 0, 0, 0
time = 23
under = 1
supermove = 1

[State 1531, 5]
type = playsnd
trigger1 = time = 0
value = s1,8

[State 1531, 5]
type = PosFreeze
trigger1 = time >= 0

[State 4120, 1]
type = SuperPause
trigger1 = time = 1
movetime = 5
p2defmul = 1
time = 27
anim = -1

[State 4120, 1]
type = playsnd
trigger1 = time = 2
value = s19,0
channel = 1

[State 2100, 4]
type = Explod
trigger1 = time = 0
anim = 12011
sprpriority = 7
pos = -17,-90
supermove = 1
bindtime = -1
ownpal = 1

[State 2100, 5]
type = Explod
trigger1 = time = 0
anim = 1211
sprpriority = -1
pos = -17,-90
supermove = 1
bindtime = -1
ownpal = 1

[State 192, 4]
type = explod
trigger1 = AnimElem = 2
trigger2 = time >= 2 && var(4) = 1
anim = 988
supermove = 1
removetime = 9999
id = 7599
pos = -64, 7
sprpriority = 3
bindtime = -1       
ownpal = 1

[State 2000, VarAdd]
type = VarAdd
trigger1 = Time = 143
var(18) = 1
;-----------------------------------
; 98 dm
[Statedef 7701]
type    = S
movetype= A
physics = N
ctrl = 0
anim = 7601
velset = 0,0
sprpriority = 0

[State 1000, 4]
type = Helper
trigger1 = time = 0
name = "n2"
pos = 25,0
stateno = 2011
[State 1000, 4]
type = Helper
trigger1 = time = 0
name = "n2"
pos = 150,0
stateno = 2011
[State 1000, 1]
type = varset
trigger1 = time = 18
var(34) = 0

[State 236, 1]
type = Varset
trigger1 = time = 0 || animtime = -9
var(18) = 0

[State 236, 1]
type = Varset
triggerall = time = 12
trigger1 = command = "holdback"
trigger1 = var(55) = 0
trigger2 = var(55) = 1
var(18) = 1

[State 4008,RE]
type = RemoveExplod
trigger1 = Time = 0
ID = 7599

[State 7601, 1]
type = posadd
trigger1 = time >= 13
trigger1 = time <= 17
trigger1 = var(18) = 0
x = 4

[State 1300, 5]
type = projectile
trigger1 = animelem = 3
projanim = 1001
offset = 0,0
projsprpriority = 1
projremovetime = 23
projedgebound = 210

[State 1006, 6]
type = Helper
trigger1 = AnimElem = 4,1
id = 7602
name = "Iori's Powerful Fireball"
pos = 48,-35
stateno = 7702
ownpal = 1
invertall = 1

[State 192, 4]
type = explod
trigger1 = AnimElem = 1
anim = 198
bindtime = -1
removetime = 4
id = 7600
pos = -63, -1
sprpriority = 3
ownpal = 1

[State 192, 4]
type = explod
trigger1 = AnimElem = 2
anim = 198
removetime = 9
bindtime = -1
id = 7600
pos = -64, -3
sprpriority = 3
ownpal = 1

[State 192, 4]
type = explod
trigger1 = AnimElem = 3
anim = 1989
bindtime = -1
removetime = 3
id = 7600
pos = -75, 27
sprpriority = 3
ownpal = 1

[State 192, 4]
type = Explod
trigger1 = animelem = 4
id = 7600
anim = 198
pos = -15,38
bindtime = -1
sprpriority = 4
ownpal = 1
removetime = 4

[State 192, 4]
type = Explod
trigger1 = animelem = 5
id = 7600
anim = 198
pos = -14,20
bindtime = -1
sprpriority = 4
ownpal = 1
removetime = 5

[State 192, 4]
type = Explod
trigger1 = animelem = 6
id = 7600
anim = 198
pos = -18,12
bindtime = -1
sprpriority = 4
ownpal = 1
removetime = 5

[State 192, 4]
type = Explod
trigger1 = animelem = 7
anim = 199
pos = -22,6
sprpriority = 4
ownpal = 1

[State 610, 4]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;----------------------------------
; Iori's Powerful Stunning Fireball
[Statedef 7702]
type    = S
movetype= A
physics = S
anim = 7611
juggle = 9
sprpriority = 13

[State 9401, 6]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
stateno = 7702
                
[State 1006, 6]
type = Helper
trigger1 = movehit > 0
id = 7710
name = "Iori's Powerful Fireball"
postype = p2
pos = 0,0   
stateno = 7710
bindtime = 0
ownpal = 1
persistent = 0

[state 7602, 1]
type = playerpush
trigger1 = 1
value = 0

[State 4120, 1]
type = playsnd
trigger1 = AnimElem = 2
value = s19,2

[State 4120, 1]
type = Envshake
trigger1 = AnimElem = 2
time = 10
freq = 90

[State 1006, 6]
type = NotHitBy
trigger1 = 1
value = SCA, NP, SP, HP

[State 430, 2]
type = HitDef
trigger1 = movehit = 0
trigger1 = p2stateno != 7705
trigger1 = p2stateno != 5000
trigger1 = p2stateno != 5020
trigger1 = p2stateno != 5030
trigger1 = p2stateno != 5035
trigger1 = p2stateno != 5050
trigger1 = p2stateno != 5071
trigger1 = p2stateno != 3010
attr = C,HP
id = 7600
damage   = 10
numhits = 0
guardflag = M
hitflag = MAP
priority = 7
pausetime = 0,0
getpower = 0,0
givepower = 4,4
sparkno = -1
hitsound   = -1
guardsound = -1
guard.sparkno = -1
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
guard.slidetime = 45-ifelse((root,var(1))=1000||(root,var(1))=500||(root,var(1))=750||(root,var(1))=667,22,0)
guard.hittime = 45-ifelse((root,var(1))=1000||(root,var(1))=500||(root,var(1))=750||(root,var(1))=667,22,0)
ground.velocity = -4
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.type = High
air.velocity = -1.2,-3
guard.velocity = -5
p2stateno = 7705
p2getp1state = 1
ignorehitpause = 1
palfx.time = 20
palfx.add = 48,0,168
palfx.mul = 166,166,166
palfx.sinadd = 96,96,96,17
palfx.color = 0 
palfx.invertall = 1 

[State 7200, 7]
type = Explod
trigger1 = movehit > 0
anim = 9242
sprpriority = 14
postype = p2
pos = 10,-30
persistent = 0
ignorehitpause = 1
ownpal = 1

[State 7000, 12]
type = Explod
trigger1 = moveguarded > 0
trigger1 = p2dist X > -30
trigger1 = Animelem = 4
anim = 10011
sprpriority = 3
postype = p2
pos = 0,-40
ignorehitpause = 1
ownpal = 1

[State 7200, 7]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 800
trigger1 = p2bodydist X > -80
anim = 3100
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7200, 8]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 700
trigger1 = p2bodydist X > -80
anim = 3110
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7200, 9]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 600
trigger1 = p2bodydist X > -80
anim = 3120
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7200, 10]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 500
trigger1 = p2bodydist X > -80
anim = 3130
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7200, 11]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 500
trigger1 = p2bodydist X > -80
anim = 3140
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7200, 12]
type = Explod
trigger1 = movehit > 0
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 500
trigger1 = p2bodydist X > -80
anim = 3150
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7000, 12]
type = targetlifeadd
trigger1 = moveguarded > 0
value = -10
persistent = 0

[state 5055, 7]
type = posadd
trigger1 = animtime = 0
trigger1 = moveguarded > 0
x = 39

[State 1006, 6]
type = projectile
trigger1 = animtime = 0
trigger1 = moveguarded > 0
offset = -33,0
projanim = 7607
projremovetime = 17
projsprpriority = 3
projedgebound = 210

[State 1006, 6]
type = projectile
trigger1 = animtime = 0
trigger1 = moveguarded = 0
offset = 7,0
projanim = 7607
projremovetime = 17
projsprpriority = 3
projedgebound = 210

[State 1006, 6]
type = Helper
trigger1 = Animtime = 0
trigger1 = moveguarded = 0
id = 7602
name = "Iori's Powerful Fireball"
pos = 39,0    
stateno = 7702
ownpal = 1
invertall = 1

[State 1007, 9]
type = destroyself
trigger1 = animtime = 0
trigger1 = moveguarded = 0

[State 1007, 9]
type = changestate
triggerall = timemod = 11,0
trigger1 = FrontEdgeDist < -20
trigger2 = time > 400
value = 7624
;-------------------------------
; Iori's Powerful Stunning Fireball Floor
[Statedef 7710]
type    = S
movetype= A
physics = S
velset = 0,0
anim = 12342

[State 1007, 8]
type = posset
trigger1 = 1
y = 0

[State 3410, 1]
type = Explod
trigger1 = time = 0
ID = 7604
anim = 7604
pos = 0,0
bindtime = -1
removetime = -1
ontop = 0
ownpal = 1

[State 3410, 1]
type = removeExplod
trigger1 = p2stateno != 7705
ID = 7604

[state 7602, 1]
type = playerpush
trigger1 = 1
value = 0

[State 1007, 9]
type = AssertSpecial
trigger1 = Time = [0,9999]
flag = noshadow

[State 1007, 9]
type = changestate
trigger1 = p2stateno != 7705 && time > 13
value = 7611

[State 1007, 9]
type = destroyself
trigger1 = p2stateno != 7705 && time < 14

[State 1007, 1]
type = posadd
trigger1 = p2life > 0
x = p2dist X

[Statedef 7705]
type = S
physics = N
movetype = I
ctrl = 0
velset = 0,0

[State 1531, 5]
type = varset
trigger1 = time = 0
sysvar(3) = 0

[State 1531, 5]
type = varadd
trigger1 = command = "struggle"
sysvar(3) = 1

[State 1531, 5]
type = defencemulSet
trigger1 = 1
value = 1

[State 3305, 5]
type = statetypeset
trigger1 = time = 0
Trigger1 = pos y != 0
value = A

[State 3305, 5]
type = ChangeAnim2
Trigger1 = time = 3
value = 7606
ctrl = 0

[State 1007, 9]
type = playerpush
trigger1 = 1
value = 1

[State 3305, 4]
type = nothitby
trigger1 = time >= 305 - sysvar(3)*5
trigger2 = life = 0
ignorehitpause = 1
value = SCA
time = 50

[State 3305, 4]
type = lifeadd
trigger1 = timemod = 30,0
trigger1 = time >= 1
Trigger1 = time <= 300
ignorehitpause = 1
value = -20

[State 3305, 2]
type = PalFX
trigger1 = timemod = 18,0
time = 9
add = 48,0,168
mul = 166,166,166
sinadd = 96,96,96,12
color = 0
invertall = 1

[State 3305, 2]
type = PalFX
trigger1 = timemod = 18,9
time = 9
add = 96,48,216
mul = 166,166,166
sinadd = 64,64,64,24
color = 0

[State 3305, 5]
type = veladd
Trigger1 = time >= 305 - sysvar(3)*5
trigger2 = life = 0
x = -3.5
y = -4.5

[State 3305, 5]
type = ChangeAnim
Trigger1 = time >= 305 - sysvar(3)*5
trigger2 = life = 0
ignorehitpause = 1
value = 5050
ctrl = 0

[State 3305, 4]
type = selfstate
trigger1 = time >= 305 - sysvar(3)*5
trigger2 = life = 0
ignorehitpause = 1
value = 5050
ctrl = 0
;------------------------------------
; JUMP_UP (short)
[Statedef 2041]
type    = A
physics = A
velset = 0,-6.5  
ctrl = 1

[State 2041, 2] 
type = Afterimage
triggerall = Time = 0
trigger1 = var(8) = -2
trigger2 = var(8) = 2
time = 2
length = 7
PalBright   =   0,  0,  0
PalContrast = 200,200,200
PalAdd      =   0,  0,  0
PalMul      =  1,1,1
FrameGap = 3

[State 2041, 2] 
type = Afterimagetime
trigger1 = time%2 = 0 && Time < 8 && (var(8) = -2 || var(8) = 2)
time = 2

[State 2041, -0.1] 
type = VelSet
triggerall = Time = 0
trigger1 = var(55) = 0
trigger1 = command = "holdup"
trigger2 = var(58) > 1 || var(58) < 1
trigger2 = var(55) = 1
trigger2 = var(8) != 1
trigger2 = p2bodydist X <= 200
trigger2 = random <= 500
trigger3 = var(58) > 1 || var(58) < 1
trigger3 = var(55) = 1
trigger3 = var(8) != 1
trigger3 = p2bodydist X > 200
trigger3 = random < 950
trigger4 = var(58) = 1
trigger4 = var(55) = 1
trigger4 = var(8) != 1
trigger4 = random <= 900
y = -8.7

[State 2041, 0.1] 
type = VarSet
trigger1 = Time = 0
var(18) = 0

[State 2041, 0.1] 
type = VarSet
trigger1 = Time = 0
trigger1 = vel y  > -7
var(18) = 1

[State 2041, 0.1]
type = VelSet
trigger1 = Time = 0
trigger1 = Var(8) = 1
x = 3.2

[State 2041, 0.1b]
type = VelSet
trigger1 = Time = 0
trigger1 = Var(8) = 2
x = 4.5

[State 2041, 0.2]
type = VelSet
trigger1 = Time = 0
trigger1 = Var(8) = -1
x = -3.2

[State 2041, 0.2b]
type = VelSet
trigger1 = Time = 0
trigger1 = Var(8) = -2
x = -4.5

[State 2041, 1.1]
type = ChangeAnim
trigger1 = var(55) = 0
trigger1 = Time = 0
trigger1 = command = "holdup"
value = 41

[State 2041, 1.2] 
type = ChangeAnim
triggerall = var(55) = 0
trigger1 = Time = 0
trigger1 = Vel X = 0
trigger1 = command != "holdup"
value = 2042

[State 2041, 2.2] 
type = ChangeAnim
triggerall = var(55) = 0
trigger1 = Time = 0
trigger1 = Vel X > 0
trigger1 = command != "holdup"
value = 2042

[State 2041, 3.1]
type = ChangeAnim
triggerall = var(55) = 0
trigger1 = Time = 0
trigger1 = Vel X < 0
trigger1 = command != "holdup"
value = 2042
            
[State 2041, 2.1]
type = ChangeAnim
triggerall = var(55) = 1
trigger1 = Time = 0
trigger1 = vel Y <= -8
value = 41

[State 2041, 2.2] 
type = ChangeAnim
triggerall = var(55) = 1
trigger1 = Time = 0
trigger1 = vel Y >= -7
value = 2042

[State 236, 1]
type = Varset
triggerall = var(55) = 1
trigger1 = time = 0
trigger1 = vel Y >= -7
var(18) = 1

[state 2, 1]
type = playsnd
trigger1 = time = 0
trigger1 = vel X < 4 && vel X > -4
value = s2,0

[state 2, 1]
type = playsnd
trigger1 = time = 0
trigger1 = vel X > 4 || vel X < -4
value = s2,3

[State 50, 4]
type = Changestate
trigger1 = var(6) = 1
value = 600

[State 50, 4]
type = Changestate
trigger1 = var(6) = 2
value = 620

[State 50, 4]
type = Changestate
trigger1 = var(6) = 3
value = 650

[State 50, 4]
type = Changestate
trigger1 = var(6) = 4
value = 630

[State 50, 4]
type = Changestate
trigger1 = var(6) = 5
value = 640

[State 50, 4]
type = Changestate
trigger1 = var(6) = 6
value = 612

[Statedef 5400]
type    = A
movetype= H
physics = N
anim = 5004
velset = 0,0
facep2 = 1

[State 5300, 1]
type = posadd
trigger1 = timemod = 2,0 && time < 12
x = -1

[State 5300, 1]
type = posadd
trigger1 = timemod = 2,1 && time < 12
x = 1

[State 5300, 1]
type = posfreeze
trigger1 = time < 12

[State 5300, 1]
type = Velset
trigger1 = time = 12
x = -5

[State 5300, 2]
type = ChangeState
trigger1 = time = 12
value = 5401

[State 5300, 3]
type = ForceFeedback
trigger1 = time = 0
time = 12
waveform = sinesquare
ampl = 140

[State 5300, 4]
type = Nothitby
trigger1 = 1
value = SCA

[Statedef 5401]
type    = A
movetype= H
physics = N
anim = 5050

[State 5301, 1]
type = Velset
trigger1 = Time = 0
y = -8.5
persistent = 0

[State 5301, 2]
type = Gravity
trigger1 = 1

[State 5301, 3] 
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 10
value = 5402

[State 5301, 4]
type = Nothitby
trigger1 = 1
value = SCA

[Statedef 5402]
type    = L
movetype= H
physics = N
anim = 5100
velset = 0,0

[State 5302, 1]
type = Velset
trigger1 = animtime = 0 && anim = 5100
x = -4
y = -3.5

[State 5302, 4]
type = posset
trigger1 = animtime = 0 && anim = 5100
y = 20

[State 5302, 3]
type = Changeanim
trigger1 = animtime = 0 && anim = 5100
value = 5160

[State 5302, 4]
type = posset
trigger1 = time = 0
y = 0

[State 5302, 5]
type = PlaySnd
trigger1 = Time = 0
value = F7,0

[State 5302, 6]
type = GameMakeAnim
trigger1 = Time = 0
value = 60
pos = 0,0
under = 1

[State 5302, 7]
type = Gravity
trigger1 = anim = 5160

[State 5302, 8]
type = ChangeState
trigger1 = time > 3
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 15
value = 5303
;--------------------
; Dizzy(shaking)
[Statedef 5300]
type    = A
movetype= H
physics = N
anim = 5004
facep2 = 1

[State 5300, 1]
type = Varset
trigger1 = time = 0
var(18) = 0

[State 5305, 1]
type = varset
trigger1 = time = 0
var(22) = 0

[State 5300, 1]
type = Varset
trigger1 = time = 0
var(21) = 0

[State 5300, 1]
type = Velset
trigger1 = hitshakeover
x = -7

[State 5300, 2]
type = ChangeState
trigger1 = HitShakeOver
value = 5301

[State 5300, 3]
type = ForceFeedback
trigger1 = time = 0
time = 12
waveform = sinesquare
ampl = 140

[State 5300, 4]
type = Nothitby
trigger1 = 1
value = SCA
;-----------------------------
; Dizzy(fall through air)
[Statedef 5301]
type    = A
movetype= H
physics = N
anim = 5050

[State 5301, 1]
type = Veladd
trigger1 = Time = 0
trigger1 = vel y = 0
y = -7

[State 5301, 1]
type = Velmul
trigger1 = vel x < -5
x = .95

[State 5301, 2]
type = Gravity
trigger1 = 1
[State 5301, 2]
type = veladd
trigger1 = 1
y = -0.1

[State 5301, 3] 
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 10
value = 5302

[State 5301, 4]
type = Nothitby
trigger1 = 1
value = SCA

[State 5301, 5]
type = pause
trigger1 = timemod = 2,0
trigger1 = time <= 15
time = 1
;-------------------
; Dizzy(Bounce)
[Statedef 5302]
type    = L
movetype= H
physics = N
anim = 5100
velset = 0,0

[State 5302, 1]
type = Velset
trigger1 = animtime = 0 && anim = 5100
x = -4
y = -3.5

[State 5302, 2]
type = Velmul
trigger1 = timemod = 2,3
trigger1 = time > 3
trigger1 = anim = 5160
x = .98

[State 5302, 4]
type = posset
trigger1 = animtime = 0 && anim = 5100
y = 20

[State 5302, 3]
type = Changeanim
trigger1 = animtime = 0 && anim = 5100
value = 5160

[State 5302, 4]
type = posset
trigger1 = time = 0
y = 0

[State 5302, 5]
type = PlaySnd
trigger1 = Time = 0
value = F7,0

[State 5302, 6]
type = GameMakeAnim
trigger1 = Time = 0
value = 60
pos = 0,0
under = 1

[State 5302, 7]
type = Gravity
trigger1 = anim = 5160
[State 5301, 2]
type = veladd
trigger1 = anim = 5160
y = -0.1

[State 5302, 8]
type = ChangeState
trigger1 = time > 3
trigger1 = Vel Y > 0
trigger1 = Pos Y >= ifelse((anim = [5051,5059]) || (anim = [5061,5069]), 0, 25)
value = 5303
;---------------------
; Dizzy(lie down)
[Statedef 5303]
type    = L
movetype= H
physics = S
anim = 5110

[State 5303, 2]
type = posset
trigger1 = time = 0
y = 0

[State 5303, 2]
type = velset
trigger1 = time = 0
x = -2.5

[State 5303, 2]
type = velset
trigger1 = time = 0
y = 0

[State 5303, 6]
type = PlaySnd
trigger1 = Time = 0
value = F7,0

[State 5303, 7]
type = GameMakeAnim
trigger1 = Time = 0
value = 60
pos = 0, 0
under = 1

[State 5303, 3] 
type = ChangeState
trigger1 = !alive
trigger1 = anim = 5110
value = 5150

[State 5303, 3] 
type = ChangeState
trigger1 = alive
trigger1 = Time = 25
value = 5304

[State 5303, 16]
type = Nothitby
trigger1 = 1
value = SCA
;------------------
; Dizzy(getup)
[Statedef 5304]
type    = L
movetype= I
physics = N
anim = 5120
velset = 0,0

[State 5304, 1]
type = NotHitBy
trigger1 = 1
value = SCA

[State 5305, 4]
type = Playsnd
trigger1 = animtime = 0
value = s0,2

[State 5304, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 5305
ctrl = 0
;------------------------------------
; Dizzy 
[Statedef 5305]
type    = S
movetype= I
physics = S
anim = 5301
ctrl = 0

[State 5305, 1]
type = varadd
trigger1 = time = 0
var(18) = 1

[State 5305, 1]
type = varadd
trigger1 = command = "dizzy1"
trigger2 = command = "dizzy2"
var(22) = 1

[State 5305, 1]
type = ChangeState
triggerall = time > 0
trigger1 = animTime = 0
trigger2 = command = "dizzy1"
trigger3 = command = "dizzy2"
trigger4 = var(55) = 1
trigger4 = time = 2
value = 5306

[State 5305, 1]
type = ChangeState
trigger1 = var(18) > 5
trigger2 = var(18) = 5
trigger2 = var(22) >= 16
value = 0
ctrl = 1

[Statedef 5306]
type    = S
movetype= I
physics = S
anim = 5302
ctrl = 0

[State 5305, 1]
type = varadd
trigger1 = command = "dizzy1"
trigger2 = command = "dizzy2"
var(22) = 1

[State 5305, 1]
type = ChangeState
triggerall = time > 0
trigger1 = animTime = 0
trigger2 = command = "dizzy1"
trigger3 = command = "dizzy2"
trigger4 = var(55) = 1
trigger4 = time = 2
value = 5307

[Statedef 5307]
type    = S
movetype= I
physics = S
anim = 5303
ctrl = 0

[State 5305, 1]
type = varadd
trigger1 = command = "dizzy1"
trigger2 = command = "dizzy2"
var(22) = 1

[State 5305, 1]
type = ChangeState
triggerall = time > 0
trigger1 = animTime = 0
trigger2 = command = "dizzy1"
trigger3 = command = "dizzy2"
trigger4 = var(55) = 1
trigger4 = time = 2
value = 5308

[Statedef 5308]
type    = S
movetype= I
physics = S
anim = 5304
ctrl = 0

[State 5305, 1]
type = varadd
trigger1 = command = "dizzy1"
trigger2 = command = "dizzy2"
var(22) = 1

[State 5305, 1]
type = ChangeState
triggerall = time > 0
trigger1 = animTime = 0
trigger2 = command = "dizzy1"
trigger3 = command = "dizzy2"
trigger4 = var(55) = 1
trigger4 = time = 2
value = 5305
;-----------------------------------
; JUMP_UP
[Statedef 40]
type    = S
physics = S
anim = 40
ctrl = 0
velset = 0,0
facep2 = 1

[State 40, 0]
type = VarSet
trigger1 = Time = 0 && prevstateno != 52
var(6) = 0

[State 40, 0]
type = VarSet
trigger1 = Time = 0
var(8) = 0

[State 40, 2]
type = VarSet
triggerall = var(55) = 0
trigger1 = command = "a"
var(6) = 1

[State 40, 2]
type = VarSet
triggerall = var(55) = 0
trigger1 = command = "c"
var(6) = 2

[State 40, 2]
type = VarSet
triggerall = var(55) = 0
trigger1 = command = "x"
var(6) = 4

[State 40, 2]
type = VarSet
triggerall = var(55) = 0
trigger1 = command = "y"
var(6) = 5

[State 40, 1]
type = VarSet
triggerall = var(55) = 0
trigger1 = command = "ab"
trigger2 = command = "b"
var(6) = 3

[State 40, 1]
type = VarSet
triggerall = var(55) = 0
trigger1 = command = "holdback" && command = "a"
var(6) = 6

[State 40, 0.1]
type = VarSet
triggerall = var(55) = 1
trigger1 = var(8) != 2
var(8) = 1

[State 40, 0.1]
type = VarSet
triggerall = var(55) = 0
trigger1 = command = "holdfwd"
trigger1 = var(8) != 2
var(8) = 1

[State 40, 0.2]
type = VarSet
triggerall = var(55) = 0
trigger1 = command = "holdback"
trigger1 = var(8) != -2
var(8) = -1

[State 40, 0.1b]
type = VarSet
triggerall = Time = 0
triggerall = var(55) = 1
trigger1 = random <= 600
trigger2 = p2stateno != 5120
trigger2 = p2bodydist X > 100
trigger3 = p2stateno = 5120
trigger3 = p2bodydist X < 100 && random < 700
var(8) = 2

[State 40, 0.1b]
type = VarSet
triggerall = Time = 0
triggerall = command = "holdfwd"
triggerall = var(55) = 0
trigger1 = command = "longjump"
trigger2 = prevstateno = 100 
var(8) = 2

[State 40, 0.2b]
type = VarSet
triggerall = var(55) = 0
trigger1 = Time = 0
trigger1 = command = "holdback"
trigger1 = command = "longjump"
var(8) = -2

[State 40, 5]
type = VelSet
trigger1 = AnimTime = 0 || (prevstateno = 52 && time = 3)
x = ifelse(var(8)=0, const(velocity.jump.neu.x), ifelse(var(8)>0, const(velocity.jump.fwd.x), const(velocity.jump.back.x)))
y = const(velocity.jump.y)

[State 40, 4]
type = ChangeState
triggerall = AnimTime = 0 || (prevstateno = 52 && time = 3)
triggerall = var(55) = 0
trigger1 = var(8) != 0
trigger1 = var(8) != 1
trigger1 = var(8) != -1
trigger1 = command = "holdup"
trigger2 = command != "holdup"
value = 2041

[State 40, 4]
type = ChangeState
triggerall = AnimTime = 0 || (prevstateno = 52 && time = 3)
triggerall = var(55) = 1
triggerall = p2stateno != 5120
trigger1 = var(8) = 2
trigger1 = p2bodydist X <= 200
trigger1 = random <= 600-ifelse(var(58)=1,200,0)
trigger2 = var(8) = 1
trigger2 = random <= 400-ifelse(var(58)=1,130,0)
trigger3 = var(8) = 2
trigger3 = p2bodydist X > 200
trigger3 = random < 950-ifelse(var(58)=1,300,0)
value = 2041

[State 40, 6]
type = ChangeState
trigger1 = AnimTime = 0 || (prevstateno = 52 && time = 3)
value = 50
ctrl = 1
;--------------------------------------
; Jump Up
[Statedef 50]
type    = A
physics = A
 
[state 2, 1]
type = playsnd
trigger1 = time = 0
value = s2,0

[State 0, 1]
type = varset
trigger1 = prevstateno = 5020
trigger1 = time = 0
var(25) = 5

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

[State 50, 2]
type = ChangeAnim
triggerall = anim != 41 && anim != 42 && anim != 43 && anim != 2042
trigger1 = Time = 0
value = ifelse((vel x)=0, 41, ifelse((vel x)>0, 42, 43))

[State 50, 3]
type = ChangeAnim
triggerall = anim != 41 && anim != 42 && anim != 43 && anim != 2042
trigger1 = Vel y > -2
trigger1 = SelfAnimExist(anim + 3)
persistent = 0
value = Anim + 3

[State 50, 4]
type = Changestate
trigger1 = var(6) = 1
value = 600

[State 50, 4]
type = Changestate
trigger1 = var(6) = 2
value = 620

[State 50, 4]
type = Changestate
trigger1 = var(6) = 3
value = 650

[State 50, 4]
type = Changestate
trigger1 = var(6) = 4
value = 630

[State 50, 4]
type = Changestate
trigger1 = var(6) = 5
value = 640

[State 50, 4]
type = Changestate
trigger1 = var(6) = 6
value = 612
;--------------------------------------
; Jump Land
[Statedef 52]
type    = S
physics = S
ctrl = 1
anim = 47
velset = 0,0

[State 2041, 2]    
type = Afterimage
trigger1 = Time = 0
time = 0

[State 0, 1]
type = varset
trigger1 = time = 0
var(47) = 0

[State 100, 1]
type = varset
trigger1 = time = 0
var(18) = 1

[State 100, 1]
type = varset
trigger1 = time = 0
var(4) = 0

[State 100, 1]
type = varset
trigger1 = time = 0
trigger1 = facing = 1
var(5) = 1

[State 100, 1]
type = varset
trigger1 = time = 0
trigger1 = facing = -1
var(5) = -1

[State 52, 1]
type = VelSet
trigger1 = Time = 0
y = 0

[State 52, 2]
type = PosSet
trigger1 = Time = 0
y = 0

[State 50, 4]
type = PlaySnd
trigger1 = time = 0
value = s2,1

[State 100, 1]
type = varset
trigger1 = time = 0
trigger1 = command = "holdup"
var(4) = 1

[State 40, 2]
type = VarSet
triggerall = var(55) = 0
trigger1 = command = "a"
var(6) = 1

[State 40, 2]
type = VarSet
triggerall = var(55) = 0
trigger1 = command = "c"
var(6) = 2

[State 40, 2]
type = VarSet
triggerall = var(55) = 0
trigger1 = command = "x"
var(6) = 4

[State 40, 2]
type = VarSet
triggerall = var(55) = 0
trigger1 = command = "y"
var(6) = 5

[State 40, 1]
type = VarSet
triggerall = var(55) = 0
trigger1 = command = "ab"
trigger2 = command = "b"
var(6) = 3

[State 40, 1]
type = VarSet
triggerall = var(55) = 0
trigger1 = command = "holdback" && command = "a"
var(6) = 6

[State 50, 4]
type = Changestate
trigger1 = var(55) = 0
trigger1 = time > 0
trigger1 = command = "holdup" || var(4) = 1
value = 40

[State 52, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;------------------------------------
; Jump Up2
[Statedef 53]
type    = A
physics = A

[State 0, 1]
type = varset
trigger1 = prevstateno = 5020
trigger1 = time = 0
var(25) = 5

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

[State 50, 2]
type = ChangeAnim
trigger1 = Time = 0
value = 51

[State 50, 3]
type = ChangeAnim
trigger1 = Vel y > -2
trigger1 = SelfAnimExist(anim + 3)
persistent = 0
value = Anim + 3

[State 50, 4]
type = Changestate
trigger1 = var(6) = 1
value = 600

[State 50, 4]
type = Changestate
trigger1 = var(6) = 2
value = 620

[State 50, 4]
type = Changestate
trigger1 = var(6) = 3
value = 650

[State 50, 4]
type = Changestate
trigger1 = var(6) = 4
value = 630

[State 50, 4]
type = Changestate
trigger1 = var(6) = 5
value = 640
;----------------------------------
; RUN_FWD
[Statedef 100]
type    = S
physics = N
anim = 100
sprpriority = 0
velset = 0,0

[State 100, 1]
type = ChangeState
trigger1 = time = 0
trigger1 = prevstateno = 100
value = 0
ctrl = 1

[State 236, 1]
type = changestate
trigger1 = time = 0
trigger1 = var(5) != facing
trigger1 = var(18) = 1
trigger1 = prevstateno = 20
value = 105

[State 100, 1]
type = varset
trigger1 = time = 0
trigger1 = facing = 1
var(18) = 1

[State 100, 1]
type = varset
trigger1 = time = 0
trigger1 = facing = -1
var(18) = -1

[State 100, 1]
type = VelSet
trigger1 = time > 3
x = 6

[State 100, 1]
type = ChangeAnim
trigger1 = animTime = 0
value = 101

[State 100, 2]
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 100, 3]
type = ChangeState
triggerall = var(55) = 1 && prevstateno != 1990
triggerall = time >= 11
trigger1 = var(16) >= 30
trigger1 = p2bodydist X <= 100
trigger2 = p2movetype = A
trigger3 = p2bodydist X <= 290
trigger3 = random <= 50
value = 103
ctrl = 1
[State 100, 3]
type = ChangeState
trigger1 = var(55) = 1 && prevstateno = 1990
trigger1 = p2bodydist X < 1
value = 245
[State 100, 3]
type = ChangeState
trigger1 = var(55) = 1 && prevstateno = 1990
trigger1 = time >= 11
trigger1 = p2bodydist X < -20 || p2bodydist Y < -1
value = 103
ctrl = 1

[State 100, 3]
type = ChangeState
triggerall = var(55) = 0
triggerall = time >= 11
trigger1 = command != "holdfwd"
value = 103
ctrl = 1

[State 1500, 2]
type = PlaySnd
trigger1 = AnimElem = 2
trigger1 = anim = 101
value = s1,1

[State 1500, 2]
type = PlaySnd
trigger1 = AnimElem = 6
trigger1 = anim = 101
value = s1,1

[State 1500, 2]
type = PlaySnd
trigger1 = AnimElem = 10
trigger1 = anim = 101
value = s1,2

[State 1500, 2]
type = PlaySnd
trigger1 = AnimElem = 14
trigger1 = anim = 101
value = s1,3

; RUN_BACK2 (land)
[Statedef 106]
type    = S
physics = N
ctrl = 0
anim = 106
velset = 0,0

[State 106, 3]
type = posadd
trigger1 = Time = 0
x = -5

[State 106, 3]
type = PosSet
trigger1 = Time = 0
y = 0

[State 2003, 3]
type = PlaySnd
trigger1 = Time = 0
value = s2,1

[State 105, 3]
type = ChangeState
triggerall = var(55) = 1
triggerall = numprojID(7000) = 0
trigger1 = animtime = 0
trigger1 = p2bodydist X <= 50
trigger1 = p2stateno = 5120
value = 1000

[State 106, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[Statedef 108]
type    = S
physics = N
ctrl = 0
anim = 106
velset = 0,0

[State 106, 3]
type = posadd
trigger1 = Time = 0
x = -5
[State 106, 3]
type = PosSet
trigger1 = Time = 0
y = 0
[State 2003, 3]
type = PlaySnd
trigger1 = Time = 0
value = s2,1
[state 105,1]
type = ChangeState
value = 7021
triggerall = animtime = 0
triggerall = power >= 3000 + var(20)*100
triggerall = var(55) = 1
triggerall = var(14) < 1 && var(3) < 1
triggerall = var(16) < 1
trigger1 = p2bodydist X >= 70
[state 105,1]
type = ChangeState
value = 7011
triggerall = animtime = 0
triggerall = power >= 2000 + var(20)*100
triggerall = var(55) = 1
triggerall = var(14) < 1 && var(3) < 1
triggerall = var(16) < 1
trigger1 = p2bodydist X >= 70
[state 105,1]
type = ChangeState
value = 6999
triggerall = animtime = 0
triggerall = var(55) = 1
triggerall = var(14) > 0
triggerall = var(16) < 1
triggerall = stateno != 6999
trigger1 = p2bodydist X >= 70
[state 105,1]
type = ChangeState
value = 7000
triggerall = animtime = 0
triggerall = power >= 1000 + var(20)*100 || var(3) > 0
triggerall = var(55) = 1
triggerall = var(14) < 1
triggerall = var(16) < 1
trigger1 = p2bodydist X >= 70
[State 106, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

; RUN_BACK
[Statedef 105]
type    = A
physics = A
ctrl = 0
anim = 105
velset = 0,0

[State 236, 1]
type = changestate
trigger1 = var(18) = 1
trigger1 = time = 0
trigger1 = var(5) != facing
trigger1 = prevstateno = 20
value = 100
ctrl = 1

[State 236, 1]
type = Varset
trigger1 = time = 0
var(18) = 0

[State 236, 1]
type = posset
trigger1 = time > 18
y = 0

[State 236, 1]
type = posadd
trigger1 = time < 3
trigger1 = time > 0
y = -1

[State 236, 1]
type = Varset
triggerall = var(55) = 0
trigger1 = command = "holdback" && command = "a"
trigger1 = time <= 8
var(18) = 1

[State 105, 1]
type = posadd
trigger1 = Time = 3
x = -15

[State 105, 1]
type = VelSet
trigger1 = Time = 3
x = const(velocity.run.back.x)
y = const(velocity.run.back.y)

[State 512, 2]
type = ChangeState
trigger1 = time >= 3
trigger1 = time <= 8
trigger1 = var(18) = 1
value = 602

[State 105, 2]
type = VelMul
trigger1 = Time > 8  
x = .87   

[State 105, 2]
type = Veladd
trigger1 = 1
y = -0.1

[state 105, 3]
type = ChangeState
value = 602
triggerall = var(55) = 1
triggerall = AnimElem = 1, >= 1
triggerall = time >= 4
triggerall = time <= 8
trigger1 = p2bodydist X < 0
trigger2 = p2movetype = A
trigger3 = backedgedist < 10

[State 105, 3]
type = ChangeState
trigger1 = animtime = 0
value = 106

[state 105, 5]
type = PlaySnd
trigger1 = time = 3
value = s2,2

; RUN_BACK(ai)
[Statedef 107]
type    = A
physics = A
ctrl = 0
anim = 105

[State 236, 1]
type = posset
trigger1 = time > 18
y = 0
[State 236, 1]
type = posadd
trigger1 = time < 3
trigger1 = time > 0
y = -1
[State 105, 1]
type = posadd
trigger1 = Time = 3
x = -15
[State 105, 1]
type = VelSet
trigger1 = Time = 3
x = const(velocity.run.back.x)
y = const(velocity.run.back.y)
[State 105, 2]
type = VelMul
trigger1 = Time > 8  
x = .87   
[State 105, 3]
type = ChangeState
trigger1 = animtime = 0
value = 108
[State 105, 2]
type = Veladd
trigger1 = 1
y = -0.1

[state 105, 5]
type = PlaySnd
trigger1 = time = 3
value = s2,2

; RUN_FWD STOP
[Statedef 102]
type    = S
physics = N
ctrl = 0
anim = 102

[State 101, 1] 
type = varSet
trigger1 = time = 0
var(34) = 0

[State 101, 1] 
type = VelSet
trigger1 = time = 0
x = 4.6

[State 101, 3]
type = posadd
trigger1 = animelem = 2
x = 9

[State 101, 2] 
type = VelMul
trigger1 = time = 0
x = .60

[State 101, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

; RUN_FWD STOP
[Statedef 103]
type    = S
physics = N
anim = 103
velset = 0,0

[State 101, 3]
type = posadd
trigger1 = animelem = 2
x = 9

[State 101, 3]
type = ChangeState
trigger1 = animTime = 0
value = 0
ctrl = 1

; dash 95
[Statedef 104]
type    = S
physics = N
anim = 104
velset = 0,0
ctrl = 0

[State 236, 1]
type = turn
triggerall = time = 0
trigger1 = prevstateno = 100
trigger1 = var(18) != facing
trigger2 = var(5) != facing
trigger2 = var(18) = 1
trigger2 = prevstateno = 20

[state 105, 5]
type = PlaySnd
trigger1 = animelem = 2
value = s2,2

[State 260, 6]
type = PosAdd
trigger1 = AnimElem = 5
x = 5

[State 260, 6]
type = PosAdd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 4
x = 10

[State 260, 7]
type = VelSet
trigger1 = AnimElem = 2
x = 6.4  

[State 260, 7]
type = VelSet
trigger1 = AnimElem = 7,5
x = 0

[state 260,7]
type = ChangeState
value = 1050
triggerall = var(58) > 2 || var(58) < 1
triggerall = power >= 500 + var(20)*100
triggerall = var(16) < 1 && var(3) < 1
triggerall = var(55) = 1
triggerall = p2statetype != L   
triggerall = var(14) < 1
triggerall = statetype != A
triggerall = p2movetype = A
triggerall = p2bodydist X > -50
trigger1 = p2bodydist X <= 40
trigger1 = p2bodydist Y >= -10
trigger1 = power >= 2900 + var(20)*100
trigger1 = random <= 180
trigger2 = p2bodydist X <= 40
trigger2 = p2bodydist Y >= -10
trigger2 = power < 2900
trigger2 = random <= 120
trigger3 = p2bodydist X <= 50
trigger3 = p2bodydist X > 20
trigger3 = p2bodydist Y >= -100
trigger3 = power >= 2900 + var(20)*100
trigger3 = random <= 180
trigger4 = p2bodydist X <= 50
trigger4 = p2bodydist X > 20
trigger4 = p2bodydist Y >= -100
trigger4 = power < 2900
trigger4 = random <= 120

[state 260,7]
type = ChangeState
value = 1040
triggerall = var(58) > 1 || var(58) < 1
triggerall = var(55) = 1
triggerall = statetype != A
triggerall = p2statetype != L   
triggerall = p2movetype = A
trigger1 = p2bodydist X <= 30 && p2bodydist X > -50
trigger1 = p2bodydist Y >= -10
trigger1 = random <= 200
trigger2 = p2bodydist X <= 50
trigger2 = p2bodydist X > 20
trigger2 = p2bodydist Y >= -100
trigger2 = random <= 200

[state 260,7]
type = ChangeState
value = 1030
triggerall = var(55) = 1
triggerall = statetype != A
triggerall = p2statetype != L   
trigger1 = p2bodydist X <= 40
trigger1 = p2bodydist X >= 20
trigger1 = p2bodydist Y >= -100
trigger1 = p2movetype = A
trigger1 = random <= 180
trigger2 = p2bodydist X < 20 && p2bodydist X > -50
trigger2 = p2bodydist Y >= -10
trigger2 = p2movetype = A
trigger2 = random <= 180
trigger3 = p2bodydist X <= 40
trigger3 = p2bodydist X >= 20
trigger3 = p2bodydist Y >= -20
trigger3 = p2movetype = A || p2movetype = I
trigger3 = random < 75

[state 260,7]
type = ChangeState
value = 3000
triggerall = var(58) > 1 || var(58) < 1
triggerall = p2name != "BigWomen"
triggerall = p2name != "CADILLACS"
triggerall = p2name != "Madgear"
triggerall = p2name != "DARK WARRIOR2"
triggerall = p2name != "Onslaught"
triggerall = p2name != "Apocalypse"
triggerall = var(55) = 1
triggerall = p2stateno != 150 && p2stateno != 151 && p2stateno != 152
triggerall = p2stateno != 153 && p2stateno != 154
triggerall = p2stateno != 131 && p2stateno != 140 && p2stateno != 132
triggerall = p2stateno != 5120 
triggerall = p2statetype != A
triggerall = p2statetype != L   
triggerall = p2movetype != H
triggerall = p2stateno != 140
triggerall = enemynear,stateno != 130 || (enemynear,stateno = 130 && enemynear,prevstateno != 150 && enemynear,prevstateno != 152)
triggerall = statetype != A
triggerall = p2bodydist Y >= -5
triggerall = p2bodydist X <= 5 && p2bodydist X > -36
triggerall = animtime = 0
trigger1 = p2movetype = A
trigger1 = random <= 200
trigger2 = p2movetype != A
trigger2 = random <= 150

[state 260,7]
type = ChangeState
value = 1500
triggerall = var(58) > 1 || var(58) < 1
triggerall = p2statetype != L   
triggerall = var(55) = 1
triggerall = p2bodydist X < 6
triggerall = p2bodydist y >= -10
triggerall = animtime = 0
triggerall = P2movetype != H
trigger1 = random <= 400

[state 260,7]
type = ChangeState
value = 1400
triggerall = var(58) > 1 || var(58) < 1
triggerall = var(55) = 1
triggerall = p2statetype != L   
triggerall = p2bodydist X < 6
triggerall = p2bodydist y >= -10
triggerall = animtime = 0
triggerall = P2movetype != H
trigger1 = random <= 900

[state 260,7]
type = ChangeState
value = 510
triggerall = var(55) = 1
triggerall = p2statetype != L   
triggerall = animelem = 5
triggerall = p2movetype != A
trigger1 = p2bodydist X >= 70
trigger1 = p2bodydist X <= 80
trigger1 = random <= 30

[state 260,7]
type = ChangeState
value = 520
triggerall = var(55) = 1
triggerall = statetype != A
triggerall = p2statetype != L   
triggerall = p2movetype != A
triggerall = animelem = 5
trigger1 = p2bodydist X >= 90
trigger1 = p2bodydist X <= 100
trigger1 = random <= 30

[State 101, 3]
type = ChangeState
trigger1 = animTime = 0
value = 0
ctrl = 1
;--------------------
; 2k2 mode start(c)
[Statedef 1990]
type    = S
movetype= I
physics = S
ctrl = 0
anim = 1991
facep2 = 1
velset = 0,0
sprpriority = 0

[State 5040, 1]
type = nothitby
trigger1 = time = 0
value = SCA

[State 1531, 5]
type = playsnd
trigger1 = time = 0
value = s9,5

[state 182, 1]
type = varadd
trigger1 = time = 0
var(20) = 20

[State 1531, 5]
type = varset
trigger1 = 1
var(3) = 896

[State 1531, 5]
type = varset
trigger1 = time = 0
var(2) = power - var(20)*100

[State 1300, 5]
type = explod
trigger1 = time = 0 && var(53) = 0
trigger1 = var(57) = 1
anim = 840
pos = 0,203
postype = left
id = 840
ignorehitpause = 1
bindtime = -1
supermove = 1
removetime = -1
ontop = 1
ownpal = 1

[State 1300, 5]
type = explod
trigger1 = time = 0 && var(53) = 0
trigger1 = var(57) = 2
anim = 841
pos = -56,203
postype = right
id = 840
ignorehitpause = 1
supermove = 1
bindtime = -1
removetime = -1
ontop = 1
ownpal = 1

[State 1300, 5]
type = explod
trigger1 = time = 0 && var(53) = 0
trigger1 = var(57) = 1
anim = 842
pos = 120,209
postype = left
id = 841
ignorehitpause = 1
bindtime = -1
supermove = 1
removetime = -1
ontop = 1
ownpal = 1

[State 1300, 5]
type = explod
trigger1 = time = 0 && var(53) = 0
trigger1 = var(57) = 2
anim = 843
pos = -120,209
postype = right
id = 841
ignorehitpause = 1
supermove = 1
bindtime = -1
removetime = -1
ontop = 1
ownpal = 1

[State 1300, 5]
type = explod
trigger1 = time = 0 && var(53) = 1
trigger1 = var(57) = 1
anim = 840
pos = 0,227
postype = left
id = 840
ignorehitpause = 1
bindtime = -1
supermove = 1
removetime = -1
ontop = 1
ownpal = 1

[State 1300, 5]
type = explod
trigger1 = time = 0 && var(53) = 1
trigger1 = var(57) = 2
anim = 841
pos = -56,227
postype = right
id = 840
ignorehitpause = 1
supermove = 1
bindtime = -1
removetime = -1
ontop = 1
ownpal = 1

[State 1300, 5]
type = explod
trigger1 = time = 0 && var(53) = 1
trigger1 = var(57) = 1
anim = 842
pos = 120,233
postype = left
id = 841
ignorehitpause = 1
bindtime = -1
supermove = 1
removetime = -1
ontop = 1
ownpal = 1

[State 1300, 5]
type = explod
trigger1 = time = 0 && var(53) = 1
trigger1 = var(57) = 2
anim = 843
pos = -120,233
postype = right
id = 841
ignorehitpause = 1
supermove = 1
bindtime = -1
removetime = -1
ontop = 1
ownpal = 1

[State 610,3]
type = ChangeState
value = 2219
trigger1 = command = "max2" && life <= 250
trigger1 = command != "holdback"
trigger1 = power >= 1000 + var(20)*100
trigger1 = var(55) = 0
[State 610,3]
type = ChangeState
value = 2600
trigger1 = command = "3207x"
trigger1 = command != "holdback"
trigger1 = var(55) = 0
[State 610,3]
type = ChangeState
value = 2610
trigger1 = command = "3207y"
trigger1 = command != "holdback"
trigger1 = var(55) = 0
[State 610,3]
type = ChangeState
value = 7600
trigger1 = command != "holdback"
trigger1 = command = "qcbqcb_x" || command = "qcbqcb_y"
trigger1 = var(55) = 0
trigger1 = NumHelper(7602) < 1
[State 610,3]
type = ChangeState
value = 7000
trigger1 = command != "holdback"
trigger1 = command = "qcfqcf_a" || command = "qcfqcf_b"
trigger1 = var(55) = 0
[State 610,3]
type = ChangeState
value = 2400
trigger1 = command = "qcfqcb_z"
trigger1 = command != "holdfwd"
trigger1 = power >= 1000 + var(20)*100
trigger1 = var(55) = 0
[State 610,3]
type = ChangeState
value = 2000
trigger1 = command != "holdfwd"
trigger1 = command = "qcfqcb_x" || command = "qcfqcb_y"
trigger1 = var(55) = 0
[State 610,3]
type = ChangeState
value = 4400
trigger1 = command = "QCB_a2"
trigger1 = command != "holdfwd"
trigger1 = var(55) = 0
[State 610,3]
type = ChangeState
value = 4733
trigger1 = command = "QCB_c2"
trigger1 = command != "holdfwd"
trigger1 = var(55) = 0
[State 610,3]
type = ChangeState
value = 299
trigger1 = command = "scorch_a"
trigger1 = command != "holdback"
trigger1 = var(55) = 0
[State 610,3]
type = ChangeState
value = 305
trigger1 = command = "scorch_c"
trigger1 = command != "holdback"
trigger1 = var(55) = 0
[State 610,3]
type = ChangeState
value = 2999
trigger1 = command = "QCF_a"
trigger1 = command != "holdback"
trigger1 = var(55) = 0
[State 610,3]
type = ChangeState
value = 3201
trigger1 = command = "QCF_c"
trigger1 = command != "holdback"
trigger1 = var(55) = 0
[State 610,3]
type = ChangeState
value = 1050
trigger1 = command = "ucut_z"
trigger1 = command != "holdback"
trigger1 = power >= 500 + var(20)*100
trigger1 = var(55) = 0
[State 610,3]
type = ChangeState
value = 1030
trigger1 = command = "ucut_x"
trigger1 = command != "holdback"
trigger1 = var(55) = 0
[State 610,3]
type = ChangeState
value = 1040
trigger1 = command = "ucut_y"
trigger1 = command != "holdback"
trigger1 = var(55) = 0
[State 610,3]
type = ChangeState
value = 510
trigger1 = command = "3p1_x"
trigger1 = var(55) = 0
[State 610,3]
type = ChangeState
value = 520
trigger1 = command = "3p1_z"
trigger1 = var(55) = 0
[State 610,3]
type = ChangeState
value = 4000
trigger1 = command = "QCB_a"
trigger1 = command != "holdfwd"
trigger1 = var(55) = 0
[State 610,3]
type = ChangeState
value = 4333
trigger1 = command = "QCB_c"
trigger1 = command != "holdfwd"
trigger1 = var(55) = 0
[State 610,3]
type = ChangeState
value = 1000
trigger1 = command = "Fireball_x"
trigger1 = command != "holdback"
trigger1 = var(55) = 0
trigger1 = numprojID(7000) = 0
[State 610,3]
type = ChangeState
value = 1020
trigger1 = command = "Fireball_z"
trigger1 = command != "holdback"
trigger1 = var(55) = 0
trigger1 = numprojID(7000) = 0

[State 240, 3]
type = ChangeState
trigger1 = var(55) = 1 && prevstateno = 245
value = 100
ctrl = 0

[State 610, 4]
type = ChangeState
trigger1 = time > 0
value = 0
ctrl = 1
;--------------------
; 2k2 mode start
[Statedef 1991]
type    = S
movetype= I
physics = S
ctrl = 0
anim = 1991
facep2 = 1
velset = 0,0
sprpriority = 0

[State 5040, 1]
type = nothitby
trigger1 = animtime < 0
value = ,AT

[State 1531, 5]
type = playsnd
trigger1 = time = 0
value = s1,7

[state 182, 1]
type = varadd
trigger1 = time = 0
var(20) = 10

[State 191, 4]
type = EnvShake
Trigger1 = AnimElem = 1
persistent = 0
time = 14
ampl = -3
freq = 255
phase = 10
ignorehitpause = 1

[State 1531, 5]
type = varset
trigger1 = 1
var(3) = 896

[State 1531, 5]
type = varset
trigger1 = time = 0
var(2) = power - var(20)*100

[State 2100, 5]
type = Explod
trigger1 = animelem = 1
anim = 12000
sprpriority = -1
pos = 19,-115
bindtime = -1
supermove = 1
ownpal = 1

[State 912, 5]
type = PlaySnd
Trigger1 = Time = 0
value = s3,6
channel = 1

[State 1300, 5]
type = explod
trigger1 = animelem = 1 && var(53) = 0
trigger1 = var(57) = 1
anim = 840
pos = 0,203
postype = left
id = 840
ignorehitpause = 1
bindtime = -1
supermove = 1
removetime = -1
ontop = 1
ownpal = 1

[State 1300, 5]
type = explod
trigger1 = animelem = 1 && var(53) = 0
trigger1 = var(57) = 2
anim = 841
pos = -56,203
postype = right
id = 840
ignorehitpause = 1
supermove = 1
bindtime = -1
removetime = -1
ontop = 1
ownpal = 1

[State 1300, 5]
type = explod
trigger1 = animelem = 1 && var(53) = 0
trigger1 = var(57) = 1
anim = 842
pos = 120,209
postype = left
id = 841
ignorehitpause = 1
bindtime = -1
supermove = 1
removetime = -1
ontop = 1
ownpal = 1

[State 1300, 5]
type = explod
trigger1 = animelem = 1 && var(53) = 0
trigger1 = var(57) = 2
anim = 843
pos = -120,209
postype = right
id = 841
ignorehitpause = 1
supermove = 1
bindtime = -1
removetime = -1
ontop = 1
ownpal = 1

[State 1300, 5]
type = explod
trigger1 = animelem = 1 && var(53) = 1
trigger1 = var(57) = 1
anim = 840
pos = 0,227
postype = left
id = 840
ignorehitpause = 1
bindtime = -1
supermove = 1
removetime = -1
ontop = 1
ownpal = 1

[State 1300, 5]
type = explod
trigger1 = animelem = 1 && var(53) = 1
trigger1 = var(57) = 2
anim = 841
pos = -56,227
postype = right
id = 840
ignorehitpause = 1
supermove = 1
bindtime = -1
removetime = -1
ontop = 1
ownpal = 1

[State 1300, 5]
type = explod
trigger1 = animelem = 1 && var(53) = 1
trigger1 = var(57) = 1
anim = 842
pos = 120,233
postype = left
id = 841
ignorehitpause = 1
bindtime = -1
supermove = 1
removetime = -1
ontop = 1
ownpal = 1

[State 1300, 5]
type = explod
trigger1 = animelem = 1 && var(53) = 1
trigger1 = var(57) = 2
anim = 843
pos = -120,233
postype = right
id = 841
ignorehitpause = 1
supermove = 1
bindtime = -1
removetime = -1
ontop = 1
ownpal = 1

[State 610, 4]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;-------------------------------------
; Counter mode
[Statedef 12000]
type    = S
movetype= A
physics = N
ctrl = 0
velset = 0,0,0
anim = 8305
facep2 = 1
juggle = 9

[State 1300, 5]
type = explod
trigger1 = animelem = 1
trigger1 = var(57) = 1
anim = 821
pos = 4,35
postype = left
id = 816
ignorehitpause = 1
bindtime = -1
supermove = 1
sprpriority = -3
ownpal = 1

[State 1300, 5]
type = explod
trigger1 = animelem = 1
trigger1 = var(57) = 2
anim = 822
pos = -5,35
postype = right
id = 816
ignorehitpause = 1
sprpriority = -3
supermove = 1
bindtime = -1
ownpal = 1

[State 1300, 5]
type = explod
trigger1 = animelem = 1
trigger1 = var(57) = 1
anim = 825
pos = 4,35
postype = left
id = 816
ignorehitpause = 1
bindtime = -1
supermove = 1
sprpriority = -5
ownpal = 1

[State 1300, 5]
type = explod
trigger1 = animelem = 1
trigger1 = var(57) = 2
anim = 825
pos = -73,35
postype = right
id = 816
ignorehitpause = 1
sprpriority = -5
supermove = 1
bindtime = -1
ownpal = 1

[State 1300, 5]
type = explod
trigger1 = animelem = 1
trigger1 = var(57) = 1
anim = 826
pos = 50,48
postype = left
id = 816
ignorehitpause = 1
bindtime = -1
removetime = -1
supermove = 1
sprpriority = -4
ownpal = 1

[State 1300, 5]
type = explod
trigger1 = animelem = 1
trigger1 = var(57) = 2
anim = 826
pos = -71,48
postype = right
id = 816
ignorehitpause = 1
sprpriority = -4
supermove = 1
removetime = -1
bindtime = -1
ownpal = 1

[State 1300, 5]
type = explod
trigger1 = animelem = 1
trigger1 = var(57) = 1
anim = 827
pos = 10,41
postype = left
id = 817
ignorehitpause = 1
bindtime = -1
removetime = -1
supermove = 1
sprpriority = -4
ownpal = 1

[State 1300, 5]
type = explod
trigger1 = animelem = 1
trigger1 = var(57) = 2
anim = 828
pos = -10,41
postype = right
id = 817
ignorehitpause = 1
sprpriority = -4
supermove = 1
removetime = -1
bindtime = -1
ownpal = 1

[State 9401, 6]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
stateno = 5000
                
[State 1300, 5]
type = Envcolor
trigger1 = animelem = 4
persistent = 0
value = 0,0,0
time = 18
under = 1
supermove = 1

[State 9300, 1]
type = SuperPause
trigger1 = animelem = 4
anim = -1
p2defmul = 1
time = 19
movetime = 19

[State 1531, 5]
type = varset
trigger1 = 1
var(14) = 1201

[State 1531, 5]
type = varset
trigger1 = animtime = 0
var(11) = 2

[State 1531, 5]
type = varset
trigger1 = animtime = 0
var(32) = 0

[State 1531, 5]
type = playsnd
trigger1 = animelem = 4
value = s13,0

[State 9300, 4]
type = Nothitby
trigger1 = 1
Value = SCA

[State 2100, 4]
type = Explod
trigger1 = animelem = 4
anim = 911
sprpriority = 2
postype = p1
pos = 10,0
supermove = 1
ownpal = 1

[State 420, 2]
type = HitDef
trigger1 = AnimElem = 1
attr = S, HA
id = 12000
damage   = 0
guardflag = -1
pausetime = 12,14
sparkno = s10006
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57
hitsound   = s3,2
ground.type = high
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
ground.velocity = -10,-6
air.velocity = -10,-6
p2facing = 1
yaccel = 1
fall = 1
fall.recover = 0
fall.yvelocity = 0

[State 1002, 4]
type = Targetstate
trigger1 = movehit > 0 && numtarget(12000) > 0
value = 12001
id = 12000
ignorehitpause = 1
persistent = 0

[State 2000, 5]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

[Statedef 12001];------------------
type    = A
movetype= H
physics = N
ctrl = 0

[State 5030, 1]
type = changeanim
trigger1 = time < 14
value = 5050

[State 5030, 1]
type = VelAdd
trigger1 = time > 13
y = 0.6

[State 5030, 1]
type = posfreeze
trigger1 = time < 14

[State 5030, 1]
type = changeanim
trigger1 = time > 13 && vel y >= 0 && selfanimexist(5102) && selfanimexist(5112) && selfanimexist(5062)
value = 5062
persistent = 0

[State 5030, 2]
type = VelSet
trigger1 = Time = 0
x = -7
y = -7
[State 5030, 2]
type = VelSet
trigger1 = vel x > 0
x = -7

[State 5050, 6]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= ifelse((anim = [5051,5059]) || (anim = [5061,5069]), 0, 25)
value = 12002

[Statedef 12002];------------------
type    = A
movetype= H
physics = N
ctrl = 0
velset = -4,0

[State 5100, 10]
type = PlaySnd
trigger1 = Time = 1
value = F7, 1

[State 5030, 1]
type = changeanim
trigger1 = time < 12 && selfanimexist(5102) && selfanimexist(5112)
value = 5102
[State 5030, 1]
type = changeanim
triggerall = time = 0
trigger1 = !selfanimexist(5102)
trigger2 = !selfanimexist(5112)
value = 5100
[State 5030, 1]
type = changeanim
trigger1 = time = 12 && selfanimexist(5102) && selfanimexist(5112)
value = 5112
[State 5030, 1]
type = posadd
trigger1 = time = 12 && selfanimexist(5102) && selfanimexist(5112)
x = -20

[State 5030, 1]
type = width
trigger1 = time < 12 && selfanimexist(5102) && selfanimexist(5112)
value = 0,20

[State 5030, 2]
type = velmul
trigger1 = Time < 12
x = 0.98

[State 5030, 2]
type = posset
trigger1 = Time = 0
y = 0

[State 5050, 6]
type = selfState
trigger1 = time = 12
value = 5110
ctrl = 0
;-------------------------------------
; Armor mode
[Statedef 13000]
type    = S
physics = N  
movetype= A 
ctrl = 0
velset = 0,0,0
anim = 8305
facep2 = 1
juggle = 9

[State 1000, 4]
type = Helper
trigger1 = time = 0
pos = 0,0
id = 8333
stateno = 8333
supermovetime = 99
ownpal = 1

[State 1300, 5]
type = explod
trigger1 = animelem = 1
trigger1 = var(57) = 1
anim = 815
pos = 4,35
postype = left
id = 815
ignorehitpause = 1
bindtime = -1
supermove = 1
sprpriority = -3
ownpal = 1

[State 1300, 5]
type = explod
trigger1 = animelem = 1
trigger1 = var(57) = 2
anim = 816
pos = -5,35
postype = right
id = 815
ignorehitpause = 1
sprpriority = -3
supermove = 1
bindtime = -1
ownpal = 1

[State 1300, 5]
type = explod
trigger1 = animelem = 1
trigger1 = var(57) = 1
anim = 819
pos = 4,35
postype = left
id = 815
ignorehitpause = 1
bindtime = -1
supermove = 1
sprpriority = -5
ownpal = 1

[State 1300, 5]
type = explod
trigger1 = animelem = 1
trigger1 = var(57) = 2
anim = 819
pos = -73,35
postype = right
id = 815
ignorehitpause = 1
sprpriority = -5
supermove = 1
bindtime = -1
ownpal = 1

[State 1300, 5]
type = explod
trigger1 = animelem = 1
trigger1 = var(57) = 1
anim = 820
pos = 50,48
postype = left
id = 815
ignorehitpause = 1
bindtime = -1
removetime = -1
supermove = 1
sprpriority = -4
ownpal = 1

[State 1300, 5]
type = explod
trigger1 = animelem = 1
trigger1 = var(57) = 2
anim = 820
pos = -71,48
postype = right
id = 815
ignorehitpause = 1
sprpriority = -4
supermove = 1
removetime = -1
bindtime = -1
ownpal = 1

[State 1300, 5]
type = explod
trigger1 = animelem = 1
trigger1 = var(57) = 1
anim = 829
pos = 10,41
postype = left
id = 817
ignorehitpause = 1
bindtime = -1
removetime = -1
supermove = 1
sprpriority = -4
ownpal = 1

[State 1300, 5]
type = explod
trigger1 = animelem = 1
trigger1 = var(57) = 2
anim = 830
pos = -10,41
postype = right
id = 817
ignorehitpause = 1
sprpriority = -4
supermove = 1
removetime = -1
bindtime = -1
ownpal = 1

[State 9401, 6]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
stateno = 5000
                
[State 1300, 5]
type = Envcolor
trigger1 = animelem = 4
value = 0,0,0
time = 18
under = 1
supermove = 1

[State 9300, 1]
type = SuperPause
trigger1 = animelem = 4
anim = -1
p2defmul = 1
time = 19
movetime = 19

[State 1531, 5]
type = playsnd
trigger1 = animelem = 4
value = s13,0

[State 1020, 6]
type = Explod
trigger1 = animelem = 4
anim = 910
postype = p1
pos = 0,0
sprpriority = 3
supermove = 1
ownpal = 1

[State 1020, 6]
type = Explod
trigger1 = animelem = 4,16
anim = 912
postype = p1
pos = 0,0
sprpriority = -1
supermove = 1
ownpal = 1

[State 9300, 4]
type = Nothitby
trigger1 = 1
Value = SCA

[State 9300, 5]
type = Varset
trigger1 = 1
var(16) = 961

[State 9300, 5]
type = Varset
trigger1 = time = 0
var(30) = 0

;[State 9300, 2]
;type = varset
;trigger1 = animtime = 0
;trigger1 = life >= 1000
;var(30) = 1

;[State 9300, 2]
;type = lifeadd
;trigger1 = animtime = 0
;trigger1 = life >= 1000
;value = -1

[State 1000, 4]
type = Helper
trigger1 = animtime = 0
trigger1 = var(30) = 1
name = "l"
pos = 0,0  
stateno = 8316

[State 420, 2]
type = HitDef
trigger1 = AnimElem = 1
attr = S, HA
damage   = 0
id = 12000
guardflag = -1
pausetime = 12,14
sparkno = s10006
sparkxy = 10-ifelse(var(1)=1000||var(1)=500||var(1)=750||var(1)=667,16,0),-57
hitsound   = s3,2
ground.type = high
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
ground.velocity = -10,-6
air.velocity = -10,-6
p2facing = 1
yaccel = 1
fall = 1
fall.recover = 0
fall.yvelocity = 0

[State 1002, 4]
type = Targetstate
trigger1 = movehit > 0 && numtarget(12000) > 0
value = 12001
id = 12000
ignorehitpause = 1
persistent = 0

[State 9300, 7]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

; Power charge (initiate)
[Statedef 1309]
type = S
movetype = I
physics = S
anim = 1309
juggle = 0   
velset = 0
ctrl = 0

[State 700, 1]
type = PlaySnd
trigger1 = Time = 1
value = s20,5
channel = 1

[State 700, 1]
type = PlaySnd
trigger1 = Time = 1
value = s20,0

[State 700, 3]
type = ChangeState
trigger1 = var(55) = 0
trigger1 = command != "hold_x" || command != "hold_a" || command != "hold_y"
trigger1 = command != "hold_z"
trigger2 = command = "holdfwd" && command = "holdback" && command = "holdup" && command = "holddown"
value = 0
ctrl = 1

[State 700, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 1310

; Power charge (charging)
[Statedef 1310]
type = S
movetype = I
physics = S
juggle = 0    

[State 705, 1]
type = changeanim
trigger1 = anim != 1310
value = 1310

[State 705, 1]
type = varset
trigger1 = time = 0 && prevstateno != 1310
var(4) = 0

[State 705, 1]
type = varadd
trigger1 = time > 0
var(4) = 1

[State 705, 1]
type = PowerAdd
trigger1 = time > 0
value = 6

[State 700, 1]
type = PlaySnd
trigger1 = var(4) = 21
value = s20,6
channel = 1

[State 700, 1]
type = PlaySnd
trigger1 = var(4) = 8
value = s20,1

[State 700, 1]
type = PlaySnd
trigger1 = var(4) = 16
value = s20,2

[State 700, 1]
type = PlaySnd
trigger1 = var(4) = 24
value = s20,3

[State 700, 1]
type = PlaySnd
trigger1 = var(4) = 32
value = s20,4

[State 700, 1]
type = PlaySnd
trigger1 = var(4) = 57
value = s20,7
channel = 1

[State 700, 1]
type = PlaySnd
trigger1 = var(4) = 91
value = s20,8
channel = 1

[State 705, 2]
type = Explod
trigger1 = var(4)%12 = 0
anim = 1311
ID = 1311
sprpriority = 3
postype = p1
pos = 0,0
bindtime = -1
ownpal = 1

[State 705, 3]
type = ChangeState
triggerall = var(55) = 1
trigger1 = power >= 3000 + var(20)*100
trigger2 = p2bodydist X <= 115
trigger2 = p2statetype != L && p2movetype != H && p2stateno != 7605 && p2stateno != 7705 && p2stateno != 7805
trigger3 = winko = 1
trigger4 = p2movetype = A
value = 1311
ctrl = 0
          
[State 705, 3]
type = ChangeState
trigger1 = time > 0 && var(55) = 0
trigger1 = command = "holdfwd" && command = "holdback" && command = "holdup" && command = "holddown"
value = 1311
ctrl = 0

[State 705, 3]
type = ChangeState
triggerall = var(55) = 0 && time > 0
triggerall = power < 3000 + var(20)*100
trigger1 = command = "hold_x" && command = "hold_a" && command = "hold_y"
trigger2 = command = "hold_z"
value = 1310

[State 705, 3]
type = ChangeState
trigger1 = time > 0 && var(55) = 0
value = 1311
ctrl = 0

; Power charge (End)
[Statedef 1311]
type = S
movetype = I
physics = S
anim = 1308
velset = 0
ctrl = 0
        
[State 700, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[Statedef 9887];---------- win sound helper x
type = S
physics = S
sprpriority = 0
anim = 12342

[State 0, 1]
type = destroyself
trigger1 = time = 9999
[Statedef 9888];---------- win sound helper 1
type = S
physics = S
sprpriority = 0
anim = 12342

[State 0, 1]
type = playsnd
trigger1 = time = 0
value = s9,9
[Statedef 9889];---------- win sound helper 2
type = S
physics = S
sprpriority = 0
anim = 12342

[State 0, 1]
type = playsnd
trigger1 = time = 0
value = s9,10
;---------------------------------------------------------------------------
; Initialize (at the start of the round)
[Statedef 5900]
type = S

[State 5900, 1] ;Clear all int variables
type = VarRangeSet
trigger1 = var(1) != 1000 && var(1) != 500 && var(1) != 750 && var(1) != 667
trigger1 = roundno = 1
trigger2 = var(1) = 1000 || var(1) = 500 || var(1) = 750 || var(1) = 667
trigger2 = roundsexisted = 0
trigger2 = time = 0
value = 0

[State 5900, 2] ;Clear all float variables
type = VarRangeSet
trigger1 = var(1) != 1000 && var(1) != 500 && var(1) != 750 && var(1) != 667
trigger1 = roundno = 1
trigger2 = var(1) = 1000 || var(1) = 500 || var(1) = 750 || var(1) = 667
trigger2 = roundsexisted = 0
trigger2 = time = 0
fvalue = 0

[State 5900, 3] ;Intro
type = ChangeState
trigger1 = roundno = 1
value = 190

;----------------------------------------------------------------
; States that are always checked (use -2) : 
;----------------------------------------------------------------
[Statedef -2]

[State -2, 0];ai start
type = Helper
trigger1 = NumHelper(999) = 0
trigger1 = RoundState = 2
trigger1 = ctrl 
name = "AI Trigger"
id = 999
pos = 1000,1000
stateno = 1234
keyctrl = 1

[State -2, 0]  ;ai start
type = varset
triggerall = var(55) = 0
triggerall = var(58) < 0 || var(58) > 0
triggerall = stateno = 0 || stateno = 120 || stateno = 130 || stateno = 140 || stateno = 5120 || stateno = 150 || stateno = 151
trigger1 = command = "AI1"
trigger2 = command = "AI2"
trigger3 = command = "AI3"
trigger4 = command = "AI4"
trigger5 = command = "AI5"
trigger6 = command = "AI6"
trigger7 = command = "AI7"
trigger8 = command = "AI8"
trigger9 = command = "AI9"
trigger10 = command = "AI10"
trigger11 = command = "AI11"
trigger12 = command = "AI12"
trigger13 = command = "AI13"
trigger14 = command = "AI14"
trigger15 = command = "AI15"
trigger16 = command = "AI16"
trigger17 = command = "AI17"
trigger18 = command = "AI18"
trigger19 = command = "AI19"
trigger20 = command = "AI20"
trigger21 = command = "AI21"
trigger22 = command = "AI22"
trigger23 = command = "AI23"
trigger24 = command = "AI24"
trigger25 = command = "AI25"
trigger26 = command = "AI26"
trigger27 = command = "AI27"
trigger28 = command = "AI28"
trigger29 = command = "AI29"
trigger30 = command = "AI30"
trigger31 = command = "AI31"
trigger32 = command = "AI32"
trigger33 = command = "AI33"
trigger34 = command = "AI34"
trigger35 = command = "AI35"
var(55) = 1

[State -2, 1]
type = varset
trigger1 = roundstate = 0
var(1) = life

[State 1300, 5]
type = explod
trigger1 = numexplod(998) < 2
trigger1 = !alive
anim = 12342
pos = 0,0
id = 998
ignorehitpause = 1
bindtime = -1
removetime = -1

[State -3, 1];lose
type = PlaySnd
trigger1 = numexplod(998) = 1
value = s26,0
channel = 8
persistent = 0
ignorehitpause = 1

[State -3, 1]
type = PlaySnd
triggerall = Time = 1
triggerall = alive
triggerall = Random <= 700
triggerall = GetHitVar(hitcount) <= 1
trigger1 = stateno = 5000
trigger1 = anim = 5000
trigger2 = stateno = 5000
trigger2 = anim = 5010
trigger3 = stateno = 5010
trigger3 = anim = 5020 
trigger4 = stateno = 5020
trigger4 = anim = 5000 
trigger5 = stateno = 5020
trigger5 = anim = 5010 
value = s11,1
channel = 3

[State -3, 1]
type = PlaySnd
triggerall = Time = 1
triggerall = alive
triggerall = Random <= 700
triggerall = GetHitVar(hitcount) <= 1
trigger1 = stateno = 5000
trigger1 = anim = 5001
trigger2 = stateno = 5000
trigger2 = anim = 5011
trigger3 = stateno = 5010
trigger3 = anim = 5021
trigger4 = stateno = 5020
trigger4 = anim = 5001 
trigger5 = stateno = 5020
trigger5 = anim = 5011 
value = s11,3
channel = 3

[State -3, 1.4]
type = PlaySnd
triggerall = Time = 1
triggerall = alive
triggerall = Random <= 700
triggerall = var(16) < 1
triggerall = GetHitVar(hitcount) <= 1
trigger1 = stateno = 5000
trigger1 = anim = 5002
trigger2 = stateno = 5000
trigger2 = anim = 5012
trigger3 = stateno = 5010
trigger3 = anim = 5022 
trigger4 = stateno = 5020
trigger4 = anim = 5002 
trigger5 = stateno = 5020
trigger5 = anim = 5012 
value = s11,4
ignorehitpause = 1
channel = 3

[State -3, 1]
type = PlaySnd
triggerall = Time = 1
triggerall = alive
trigger1 = stateno = 5100
value = s11,2
channel = 3

[State -2, 11]
type = PlaySnd
triggerall = random < 500
triggerall = stateno = 5035
trigger1 = anim = 5035
trigger1 = time = 0
value = s11,2
channel = 3

[State -2, 11]
type = PlaySnd
triggerall = random < 700
triggerall = stateno = 5070
triggerall = UniqHitCount <= 1
triggerall = GetHitVar(hitcount) <= 1
triggerall = alive
trigger1 = time = 1
value = s11,2
channel = 3

[State -3, 1]
type = PlaySnd
trigger1 = numtarget(1400) > 0
trigger1 = target(1400),stateno = 1408 && target(1400),time = 1
trigger1 = target(1400),life <= 0
value = s9,9
persistent = 0

[State -3, 1]
type = assertspecial
trigger1 = anim = 5500
flag = noshadow
supermove = 1
pausemovetime = 9999
ignorehitpause = 1

[State -3, 1]
type = helper
triggerall = winko = 1 && numhelper(9888) < 1
triggerall = (numtarget(1400) < 1 && numtarget(1500) < 1) || (numtarget(1400) > 0 && target(1400),stateno != 1406 && target(1400),stateno != 1408) || (numtarget(1500) > 0 && target(1500),stateno != 1406)
trigger1 = (stateno = 400 || stateno = 420 || stateno = 430 || stateno = 450) && movehit > 0
trigger2 = (stateno = 220 || stateno = 225 || stateno = 240 || stateno = 245) && movehit > 0
trigger3 = (stateno = 200 || stateno = 212 || stateno = 230 || stateno = 202) && movehit > 0
trigger4 = (stateno = 600 || stateno = 620 || stateno = 630 || stateno = 640) && movehit > 0
trigger5 = (stateno = 650 || stateno = 652 || stateno = 11000 || stateno = 11001) && movehit > 0
trigger6 = (stateno = 215 || stateno = 216 || stateno = 235 || stateno = 236) && movehit > 0
trigger7 = (stateno = 250 || stateno = 251 || stateno = 217 || stateno = 4111) && movehit > 0
trigger8 = (stateno = 612 || stateno = 611 || stateno = 4100 || stateno = 218) && movehit > 0
trigger9 = stateno = 1501 || stateno = 1401
trigger10 = (stateno = 510 || stateno = 511 || stateno = 512 || stateno = 514) && movehit > 0
trigger11 = (stateno = 516 || stateno = 520 || stateno = 4600 || stateno = 4611) && movehit > 0
trigger12 = numhelper(8301) > 0
trigger12 = helper(8301),movecontact > 0 && (helper(8301),stateno = 8306 || helper(8301),stateno = 8303)
stateno = 9888
id = 9888
ignorehitpause = 1
[State -3, 1]
type = helper
triggerall = winko = 1 && numhelper(9888) < 1
triggerall = (numtarget(1400) < 1 && numtarget(1500) < 1) || (numtarget(1400) > 0 && target(1400),stateno != 1406 && target(1400),stateno != 1408) || (numtarget(1500) > 0 && target(1500),stateno != 1406)
trigger1 = (stateno = 1030 || stateno = 1031 || stateno = 1037 || stateno = 1038) && movehit > 0
trigger2 = (stateno = 1040 || stateno = 1041 || stateno = 1050 || stateno = 301) && movehit > 0
trigger3 = stateno = 2020 && numhelper(2702) > 0
trigger3 = helper(2702),movehit > 0
trigger4 = numhelper(8301) > 0
trigger4 = helper(8301),movecontact > 0 && helper(8301),stateno = 8302
trigger5 = ProjHit = 1, < 2
trigger6 = projhit2701 = 1,< 70
stateno = 9889
id = 9888
ignorehitpause = 1
[State -3, 1]
type = helper
trigger1 = winko = 1 && numhelper(9888) < 1
stateno = 9887
id = 9888
ignorehitpause = 1

[State 7000, 7]    ;Bbl
type = Explod
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 250
trigger1 = ProjHit7000 = 1, < 15 || projhit2700 = 1,< 5 || projhit2701 = 1,< 5
trigger1 = p2movetype = H
anim = 3100
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7000, 8]   ;Bbs
type = Explod
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 300
trigger1 = ProjHit7000 = 1, < 15 || projhit2700 = 1,< 5 || projhit2701 = 1,< 5
trigger1 = p2movetype = H
anim = 3110
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7000, 9]     ;be
type = Explod
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 450
trigger1 = ProjHit7000 = 1, < 15 || projhit2700 = 1,< 5 || projhit2701 = 1,< 5
trigger1 = p2movetype = H
anim = 3120
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7000, 10]    ;Be
type = Explod
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 500
trigger1 = ProjHit7000 = 1, < 15 || projhit2700 = 1,< 5 || projhit2701 = 1,< 5
trigger1 = p2movetype = H
anim = 3130
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7000, 11]   ;p
type = Explod
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 500
trigger1 = ProjHit7000 = 1, < 15 || projhit2700 = 1,< 35 || projhit2701 = 1,< 35
trigger1 = p2movetype = H
anim = 3140
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State 7000, 12]    ;bes
type = Explod
trigger1 = NumExplod(3100) < 6
trigger1 = Random < 500
trigger1 = ProjHit7000 = 1, < 15 || projhit2700 = 1,< 35 || projhit2701 = 1,< 35
trigger1 = p2movetype = H
anim = 3150
ID = 3100
sprpriority = 5
postype = p2
pos = 0,-50
random = 100,100
ignorehitpause = 1
ownpal = 1

[State -2, 3]
type = varset
trigger1 = projhit7000 = 1
var(7) = 24
ignorehitpause = 1

[State -2, 3]
type = varadd
trigger1 = var(7) > 0
var(7) = -1
ignorehitpause = 1

[State -2, 3]
type = varadd
trigger1 = var(39) > 0
var(39) = -1
ignorehitpause = 1

[State -2, 3]  
type = pause
triggerall = p2movetype = H
trigger1 = var(7) = 1 || var(7) = 3 || var(7) = 5 || var(7) = 7 || var(7) = 9 || var(7) = 11
trigger2 = var(7) = 13 || var(7) = 15 || var(7) = 17 || var(7) = 19 || var(7) = 21 || var(7) = 23
time = 1

[State -2, 3]
type = poweradd
trigger1 = var(20) > 0 && stateno != 1994
value = -100
ignorehitpause = 1

[State -2, 3]
type = varadd
trigger1 = var(20) > 0 && stateno != 1994
var(20) = -1
ignorehitpause = 1

[State -2, 3]      ;3RD HIT
type = Explod
triggerall = var(9) = 0 && numexplod(921) = 0
trigger1 = numtarget(512) > 0
trigger1 = target(512),stateno = 1022 && target(512),movetype = H
trigger2 = numtarget(514) > 0
trigger2 = target(514),stateno = 1022 && target(514),movetype = H
trigger3 = numtarget(215) > 0
trigger3 = target(215),stateno = 1022 && target(215),movetype = H
anim = 921
ID = 921
postype = p2
pos = -15,30   
sprpriority = 0
shadow = 0  
ownpal = 1
[State -2, 3]
type = Explod
triggerall = var(9) = 0 && numexplod(922) = 0
trigger1 = numtarget(512) > 0
trigger1 = target(512),stateno = 1022 && target(512),movetype = H
trigger2 = numtarget(514) > 0
trigger2 = target(514),stateno = 1022 && target(514),movetype = H
trigger3 = numtarget(215) > 0
trigger3 = target(215),stateno = 1022 && target(215),movetype = H
anim = 922
ID = 922
postype = p2
pos = -15,30    
sprpriority = 2
shadow = 0
ownpal = 1

[State -2, 3]      ;3RD HIT
type = Explod
triggerall = var(9) = 0 && numexplod(921) = 0
trigger1 = numtarget(512) > 0
trigger1 = target(512),stateno = 1025 && target(512),movetype = H
trigger2 = numtarget(514) > 0
trigger2 = target(514),stateno = 1025 && target(514),movetype = H
trigger3 = numtarget(215) > 0
trigger3 = target(215),stateno = 1025 && target(215),movetype = H
anim = 921
ID = 921
postype = p2
pos = -15,10   
sprpriority = 0
shadow = 0  
ownpal = 1
[State -2, 3]
type = Explod
triggerall = var(9) = 0 && numexplod(922) = 0
trigger1 = numtarget(512) > 0
trigger1 = target(512),stateno = 1025 && target(512),movetype = H
trigger2 = numtarget(514) > 0
trigger2 = target(514),stateno = 1025 && target(514),movetype = H
trigger3 = numtarget(215) > 0
trigger3 = target(215),stateno = 1025 && target(215),movetype = H
anim = 922
ID = 922
postype = p2
pos = -15,10    
sprpriority = 2
shadow = 0
ownpal = 1

[State -2, 3]      ;3RD HIT GROUND
type = Explod
triggerall = numexplod(921) = 0
trigger1 = numtarget(512) > 0
trigger1 = target(512),statetype = L && target(512),movetype = H
trigger1 = target(512),stateno = 1016 || target(512),stateno = 1014 || ((target(512),stateno = 1013 || target(512),stateno = 1027) && target(512),anim != 5102)
trigger2 = numtarget(514) > 0
trigger2 = target(514),statetype = L && target(514),movetype = H
trigger2 = target(514),stateno = 1016 || target(514),stateno = 1014 || ((target(514),stateno = 1013 || target(514),stateno = 1027) && target(514),anim != 5102)
trigger3 = numtarget(215) > 0
trigger3 = target(215),statetype = L && target(215),movetype = H
trigger3 = target(215),stateno = 1016 || target(215),stateno = 1014 || ((target(215),stateno = 1013 || target(215),stateno = 1027) && target(215),anim != 5102)
anim = 921
ID = 921
postype = p2
persistent = 0
pos = 0,6   
sprpriority = 0
shadow = 0  
ownpal = 1
[State -2, 3]
type = Explod
triggerall = numexplod(922) = 0
trigger1 = numtarget(512) > 0
trigger1 = target(512),statetype = L && target(512),movetype = H
trigger1 = target(512),stateno = 1016 || target(512),stateno = 1014 || ((target(512),stateno = 1013 || target(512),stateno = 1027) && target(512),anim != 5102)
trigger2 = numtarget(514) > 0
trigger2 = target(514),statetype = L && target(514),movetype = H
trigger2 = target(514),stateno = 1016 || target(514),stateno = 1014 || ((target(514),stateno = 1013 || target(514),stateno = 1027) && target(514),anim != 5102)
trigger3 = numtarget(215) > 0
trigger3 = target(215),statetype = L && target(215),movetype = H
trigger3 = target(215),stateno = 1016 || target(215),stateno = 1014 || ((target(215),stateno = 1013 || target(215),stateno = 1027) && target(215),anim != 5102)
anim = 922
ID = 922
postype = p2
pos = 0,6    
sprpriority = 2
shadow = 0   
ownpal = 1

[State -2, 3]      ;3RD HIT GROUND
type = Explod
triggerall = numexplod(921) = 0
trigger1 = numtarget(512) > 0
trigger1 = target(512),statetype = L && target(512),movetype = H
trigger1 = (target(512),stateno = 1013 || target(512),stateno = 1027) && target(512),anim = 5102
trigger2 = numtarget(514) > 0
trigger2 = target(514),statetype = L && target(514),movetype = H
trigger2 = (target(514),stateno = 1013 || target(514),stateno = 1027) && target(514),anim = 5102
trigger3 = numtarget(215) > 0
trigger3 = target(215),statetype = L && target(215),movetype = H
trigger3 = (target(215),stateno = 1013 || target(215),stateno = 1027) && target(215),anim = 5102
anim = 921
ID = 921
postype = p2
persistent = 0
pos = -25,6   
sprpriority = 0
shadow = 0  
ownpal = 1
[State -2, 3]
type = Explod
triggerall = numexplod(922) = 0
trigger1 = numtarget(512) > 0
trigger1 = target(512),statetype = L && target(512),movetype = H
trigger1 = (target(512),stateno = 1013 || target(512),stateno = 1027) && target(512),anim = 5102
trigger2 = numtarget(514) > 0
trigger2 = target(514),statetype = L && target(514),movetype = H
trigger2 = (target(514),stateno = 1013 || target(514),stateno = 1027) && target(514),anim = 5102
trigger3 = numtarget(215) > 0
trigger3 = target(215),statetype = L && target(215),movetype = H
trigger3 = (target(215),stateno = 1013 || target(215),stateno = 1027) && target(215),anim = 5102
anim = 922
ID = 922
postype = p2
pos = -25,6    
sprpriority = 2
shadow = 0   
ownpal = 1

[State -2, 4]
type = VarSet
trigger1 = numtarget(512) > 0
trigger1 = target(512),movetype = H
trigger1 = target(512),stateno = 1022 || target(512),stateno = 1025
trigger2 = numtarget(514) > 0
trigger2 = target(514),movetype = H
trigger2 = target(514),stateno = 1022 || target(514),stateno = 1025
trigger3 = numtarget(215) > 0
trigger3 = target(215),movetype = H
trigger3 = target(215),stateno = 1022 || target(215),stateno = 1025
var(9) = 1

[State -2, 17]
type = RemoveExplod
trigger1 = numexplod(1311) > 0
trigger1 = stateno != 1310 && stateno != 2700 && stateno != 2020
trigger1 = stateno != 1309 && stateno != 1311 && stateno != 1312
ID = 1311

[State -2, 17]
type = RemoveExplod
triggerall = numexplod(7599) > 0
trigger1 = stateno != 7599 && stateno != 7600 && stateno != 7700 && stateno != 7800
trigger2 = movetype = H
ID = 7599

[State -2, 2]
type = varset
trigger1 = roundstate = 0 
trigger1 = facing = 1
var(57) = 1

[State -2, 2] 
type = varset
trigger1 = roundstate = 0
trigger1 = facing = -1
var(57) = 2

[State -2, 2]
type = varset
triggerall = roundstate = 0 
trigger1 = p2name = "Kyo kusanagi" || p4name = "Kyo kusanagi"
trigger2 = p2name = "neoKyo" || p4name = "neoKyo"
trigger3 = p2Name = "Kyo98" || p4Name = "Kyo98"
trigger4 = p2name = "Kyo mk-2" || p4name = "Kyo mk-2"
trigger5 = p2Name = "Kyo99" || p4Name = "Kyo99"
trigger6 = P2Name = "Kyo2k" || P4Name = "Kyo2k"
trigger7 = p2name = "Kyo2000" || p4name = "Kyo2000"
trigger8 = p2name = "kyo00" || p4name = "kyo00"
trigger9 = P2Name = "Kyo2k1" || P4Name = "Kyo2k1"
trigger10 = p2name = "Kyo2001" || p4name = "Kyo2001"
trigger11 = p2name = "kyo01" || p4name = "kyo01"
trigger12 = P2Name = "Kyo2k2" || P4Name = "Kyo2k2"
trigger13 = p2name = "Kyo2002" || p4name = "Kyo2002"
trigger14 = p2name = "kyo02" || p4name = "kyo02"
trigger15 = p2name = "kyo_svc" || p2name = "svckyo"
trigger16 = p4name = "kyo_svc" || p4name = "svckyo"
trigger17 = p2name = "kyo'94" || p2name = "kyo'95"
trigger18 = p4name = "kyo'94" || p4name = "kyo'95"
trigger19 = P2Name = "R_kyo" || P4Name = "R_kyo"
trigger20 = p2name = "kyo03" || p4name = "kyo03"
trigger21 = p2name = "kyo2003" || p4name = "kyo2003"
trigger22 = p2name = "kyo2k3" || p4name = "kyo2k3"
var(52) = 1

[State -2, 2]
type = varset
triggerall = var(59) <= 0 && var(53) != 1
triggerall = time = 1
trigger1 = stateno = [181,199]
trigger2 = teammode = turns
trigger2 = roundno != 1
trigger2 = stateno = 5900
var(53) = 1

[State -2, 2]
type = varset
trigger1 = roundstate = 1 || roundstate = 0
trigger1 = var(54) = 0 && command = "holddown" && stateno != 0
var(53) = 1

[State -2, 2]
type = varset
trigger1 = roundstate = 1 || roundstate = 0
trigger1 = command = "holdup" && var(54) = 0 && stateno != 0 && var(59) > -2
var(53) = 0

[State -2, 2]
type = varset
trigger1 = roundstate = 0
trigger1 = var(54) = 0
var(56) = 3

[State -2, 2]
type = varset
trigger1 = roundstate = 2
trigger1 = var(53) = 1
var(56) = 0

[State -2, 2] 
type = varset
trigger1 = roundstate = 2
var(54) = 1
persistent = 0

[State -2, 2]
type = varset
trigger1 = var(16) > 0
trigger1 = stateno != 150 && stateno != 151 && stateno != 152 && stateno != 155
trigger1 = stateno != 153 && stateno != 154 && stateno != 130
trigger1 = stateno != 131 && stateno != 120 && stateno != 132
trigger1 = stateno != 5000 && stateno != 5020 && stateno != 5070
var(26) = life 

[State -2, 2]
type = lifeadd
trigger1 = var(30) = 2
value = 1

[State -2, 2]
type = varset
trigger1 = var(30) = 2
var(30) = 0

[State -2, 2]
type = varset
triggerall = var(34) = 1
trigger1 = movetype = I
trigger2 = movetype = H
trigger2 = time = 2
var(34) = 0

[State -2, 2]
type = varset
triggerall = var(38) = 1
trigger1 = movetype = I
trigger1 = time = 1
trigger2 = movetype = H
trigger2 = time = 2
var(38) = 0

[State -3, 1]; ST
type = explod
trigger1 = var(57) = 1 && var(53) = 0
trigger1 = numexplod(908) = 0
ignorehitpause = 1
anim = 908
id = 908
pos = 0,216
postype = left
facing = 1
ontop = 1
bindtime = -1
ownpal = 1

[State -3, 1]     
type = explod
trigger1 = var(57) = 2 && var(53) = 0
trigger1 = numexplod(908) = 0
ignorehitpause = 1
anim = 909
id = 908
pos = -59,216
postype = right
facing = 1
ontop = 1
bindtime = -1
ownpal = 1

[State -4, 1]
type = AfterImage
trigger1 = movetype = H
trigger1 = Time = 0
time = 0

[State -4, 1]
type = varset
trigger1 = stateno != 516 && stateno != 511 && stateno != 1038 && stateno != 510
trigger1 = stateno != 1030 && stateno != 1040 && stateno != 1037 && stateno != 520
trigger1 = stateno != 4600 && stateno != 4611 && stateno != 4100 && stateno != 4111
var(44) = 9

[State -4, 1]
type = nothitby
trigger1 = stateno = 5200
value = SCA

[State -4, 1]
type = DisplayToClipboard
trigger1 = 1
text="fedist = %d  p2bodydist X = %d  p2bodydist Y = %d  mhit = %d  pr=%d"
params = floor(frontedgedist),floor(p2bodydist X),floor(p2bodydist Y),floor(movehit),floor(prevstateno)
ignorehitpause = 1

[State -4, 1]
type = appendToClipboard
trigger1 = 1
text="\nbedist = %d  p2dist X = %d  p2dist Y = %d  var1 = %d  power = %d"
params = floor(backedgedist),floor(p2dist X),floor(p2dist Y),floor(var(1)),floor(power)
ignorehitpause = 1

[State -4, 1]
type = removeexplod
trigger1 = numexplod(815) > 0
trigger1 = var(16) < 1
id = 815

[State -4, 1]
type = playsnd
trigger1 = projguarded7000 =1
trigger2 = projguarded2700 =1
trigger3 = projguarded2701 =1
value = s1,0
ignorehitpause = 1
[State -4, 1];svc
type = playsnd
trigger1 = projhit7000 =1
value = s27,4
ignorehitpause = 1

[State -4, 1]
type = removeexplod
trigger1 = numexplod(816) > 0
trigger1 = var(14) < 1
id = 816

[State -4, 1]
type = removeexplod
trigger1 = numexplod(840) > 0
trigger1 = var(3) < 1
id = 840
[State -4, 1]
type = removeexplod
trigger1 = numexplod(841) > 0
trigger1 = var(3) < 1
id = 841

[State -4, 1]
type = removeexplod
trigger1 = var(14) = 0 || var(16) = 0
trigger2 = var(16) = -1 && var(14) = -1
trigger2 = stateno != 12000 && stateno != 13000 && numexplod(817) > 0
id = 817

[State -4, 2]; ST bomb
type = explod
trigger1 = var(57) = 1 && var(53) = 0
trigger1 = var(56) > 0
trigger1 = numexplod(6) = 0
ignorehitpause = 1
anim = 906
id = 6
pos = 34,234
postype = left
facing = 1
ontop = 1
supermove = 1
bindtime = -1
ownpal = 1

[State -4, 2]     
type = explod
trigger1 = var(57) = 2 && var(53) = 0
trigger1 = var(56) > 0
trigger1 = numexplod(6) = 0
ignorehitpause = 1
anim = 906
id = 6
pos = -35,234
postype = right
facing = -1
ontop = 1
supermove = 1
bindtime = -1
ownpal = 1

[State -4, 2]
type = explod
trigger1 = var(57) = 1 && var(53) = 0
trigger1 = var(56) > 1
trigger1 = numexplod(66) = 0
ignorehitpause = 1
anim = 906
id = 66
pos = 42,234
postype = left
facing = 1
ontop = 1
supermove = 1
bindtime = -1
ownpal = 1

[State -4, 2]     
type = explod
trigger1 = var(57) = 2 && var(53) = 0
trigger1 = var(56) > 1
trigger1 = numexplod(66) = 0
ignorehitpause = 1
anim = 906
id = 66
pos = -43,234
postype = right
facing = -1
ontop = 1
supermove = 1
bindtime = -1
ownpal = 1

[State -4, 2]
type = explod
trigger1 = var(57) = 1 && var(53) = 0
trigger1 = var(56) > 2
trigger1 = numexplod(666) = 0
ignorehitpause = 1
anim = 906
id = 666
pos = 50,234
postype = left
facing = 1
ontop = 1
supermove = 1
bindtime = -1
ownpal = 1

[State -4, 2]     
type = explod
trigger1 = var(57) = 2 && var(53) = 0
trigger1 = var(56) > 2
trigger1 = numexplod(666) = 0
ignorehitpause = 1
anim = 906
id = 666
pos = -51,234
postype = right
facing = -1
ontop = 1
supermove = 1
bindtime = -1
ownpal = 1

[State -4, 1]
type = removeexplod
trigger1 = numexplod(6) > 0
trigger1 = var(56) < 1 || var(53) = 1
id = 6

[State -4, 1]
type = removeexplod
trigger1 = numexplod(66) > 0
trigger1 = var(56) < 2 || var(53) = 1
id = 66

[State -4, 1]
type = removeexplod
trigger1 = numexplod(666) > 0
trigger1 = var(56) < 3 || var(53) = 1
id = 666

[state -4, 2]
type = varadd
trigger1 = var(37) = 2
var(56) = -1

[State -4, 1]
type = removeexplod
trigger1 = var(53) = 1
id = 908

[State -4, 1]
type = removeexplod
trigger1 = var(53) = 1
id = 909

[State -4, 2]
type = explod
trigger1 = var(57) = 1 && var(53) = 0
trigger1 = var(56) = 0 && var(37) = 1
trigger1 = numexplod(7) = 0
ignorehitpause = 1
id = 7
anim = 907
pos = 34,234
postype = left
facing = 1
ontop = 1
supermove = 1
bindtime = -1
ownpal = 1

[State -4, 2]     
type = explod
trigger1 = var(57) = 2 && var(53) = 0
trigger1 = var(56) = 0 && var(37) = 1
trigger1 = numexplod(7) = 0
ignorehitpause = 1
anim = 907
pos = -35,234
id = 7
postype = right
facing = -1
ontop = 1
supermove = 1
bindtime = -1
ownpal = 1

[State -4, 2]
type = explod
trigger1 = var(57) = 1 && var(53) = 0
trigger1 = var(56) = 1 && var(37) = 1
trigger1 = numexplod(77) = 0
ignorehitpause = 1
anim = 907
pos = 42,234
id = 77
postype = left
facing = 1
ontop = 1
supermove = 1
bindtime = -1
ownpal = 1

[State -4, 2]     
type = explod
trigger1 = var(57) = 2 && var(53) = 0
trigger1 = var(56) = 1 && var(37) = 1
trigger1 = numexplod(77) = 0
ignorehitpause = 1
anim = 907
pos = -43,234
postype = right
id = 77
facing = -1
ontop = 1
supermove = 1
bindtime = -1
ownpal = 1

[State -4, 2]
type = explod
trigger1 = var(57) = 1 && var(53) = 0
trigger1 = var(56) = 2 && var(37) = 1
trigger1 = numexplod(777) = 0
ignorehitpause = 1
anim = 907
pos = 50,234
postype = left
id = 777
facing = 1
ontop = 1
supermove = 1
bindtime = -1
ownpal = 1

[State -4, 2]     
type = explod
trigger1 = var(57) = 2 && var(53) = 0
trigger1 = var(56) = 2 && var(37) = 1
trigger1 = numexplod(777) = 0
ignorehitpause = 1
anim = 907
pos = -51,234
postype = right
id = 777
facing = -1
ontop = 1
supermove = 1
bindtime = -1
ownpal = 1

[state -4, 2]
type = varadd
trigger1 = var(37) > 0
var(37) = -1

[State -4, 1]
type = removeexplod
trigger1 = numexplod(6) > 0 || var(53) = 1
id = 7

[State -4, 1]
type = removeexplod
trigger1 = numexplod(66) > 0 || var(53) = 1
id = 77

[State -4, 1]
type = removeexplod
trigger1 = numexplod(666) > 0 || var(53) = 1
id = 777

[State -4, 2];ST bomb x
type = explod
trigger1 = var(57) = 1
trigger1 = numexplod(6) = 0 && numexplod(7) = 0 && var(53) = 0
ignorehitpause = 1
anim = 913
id = 913
pos = 34,234
postype = left
facing = 1
ontop = 1
supermove = 1
bindtime = -1
ownpal = 1

[State -4, 2]     
type = explod
trigger1 = var(57) = 2
trigger1 = numexplod(6) = 0 && numexplod(7) = 0 && var(53) = 0
ignorehitpause = 1
anim = 913
id = 913
pos = -35,234
postype = right
facing = -1
ontop = 1
supermove = 1
bindtime = -1
ownpal = 1

[State -4, 2]
type = explod
trigger1 = var(57) = 1
trigger1 = numexplod(66) = 0 && numexplod(77) = 0 && var(53) = 0
ignorehitpause = 1
anim = 913
id = 913
pos = 42,234
postype = left
facing = 1
ontop = 1
supermove = 1
bindtime = -1
ownpal = 1

[State -4, 2]     
type = explod
trigger1 = var(57) = 2
trigger1 = numexplod(66) = 0 && numexplod(77) = 0 && var(53) = 0
ignorehitpause = 1
anim = 913
id = 913
pos = -43,234
postype = right
facing = -1
ontop = 1
supermove = 1
bindtime = -1
ownpal = 1

[State -4, 2]
type = explod
trigger1 = var(57) = 1
trigger1 = numexplod(666) = 0 && numexplod(777) = 0 && var(53) = 0
ignorehitpause = 1
anim = 913
id = 913
pos = 50,234
postype = left
facing = 1
ontop = 1
supermove = 1
bindtime = -1
ownpal = 1

[State -4, 2]     
type = explod
trigger1 = var(57) = 2
trigger1 = numexplod(666) = 0 && numexplod(777) = 0 && var(53) = 0
ignorehitpause = 1
anim = 913
id = 913
pos = -51,234
postype = right
facing = -1
ontop = 1
supermove = 1
bindtime = -1
ownpal = 1

[State -4, 1]
type = removeexplod
trigger1 = var(53) = 1
id = 913

[State -4, 1]   ;fury
type = explod
trigger1 = life <= 250
trigger1 = life > 0
trigger1 = p2life > 0
trigger1 = numexplod(123) = 0
trigger1 = var(57) = 1
ignorehitpause = 1
anim = 123
id = 123
pos = 16,17
facing = 1
postype = left
bindtime = -1
ownpal = 1
sprpriority = -9

[State -4, 1]    
type = explod
trigger1 = life <= 250
trigger1 = life > 0
trigger1 = p2life > 0
trigger1 = numexplod(123) = 0
trigger1 = var(57) = 2
ignorehitpause = 1
anim = 123
id = 123
pos = -17,17
facing = -1
postype = right
bindtime = -1
ownpal = 1
sprpriority = -9

[State -2, 1]
type = StopSnd
trigger1 = movetype = H && time = 1 && stateno != [150,155]
channel = 1
[State -2, 1]
type = StopSnd
trigger1 = movetype = H && time = 1 && stateno != [150,155]
channel = 6
[State -2, 1]
type = StopSnd
trigger1 = time = 0
trigger1 = stateno != 195
channel = 7

;[State -2, 6]
;type = selfstate
;triggerall = movetype = H && alive
;trigger1 = p2bodydist Y <= -999
;trigger2 = p2bodydist Y >= 999
;value = 0
;ctrl = 1

;[State -2, 6]
;type = Helper
;triggerall = numhelper(8314) < 1
;trigger1 = p2bodydist Y <= -830
;trigger2 = p2bodydist Y >= 780
;id = 8314
;name = "at"
;pos = 0,0  
;stateno = 8314
;ownpal = 1

[State -2, 6]
type = Helper
triggerall = numhelper(8315) < 1
triggerall = winko > 0
triggerall = p2life <= 0
triggerall = stateno != 400 && stateno != 420 && stateno != 430 && stateno != 450
triggerall = stateno != 220 && stateno != 225 && stateno != 240 && stateno != 245
triggerall = stateno != 200 && stateno != 212 && stateno != 230 && stateno != 202
triggerall = stateno != 600 && stateno != 620 && stateno != 630 && stateno != 640
triggerall = stateno != 650 && stateno != 652 && stateno != 11000 && stateno != 11001
triggerall = stateno != 215 && stateno != 216 && stateno != 235 && stateno != 236
triggerall = stateno != 250 && stateno != 251 && stateno != 217 && stateno != 1401
triggerall = stateno != 612 && stateno != 611 && stateno != 1501 && stateno != 218
triggerall = stateno != 1997
triggerall = stateno != 4100 && stateno != 4111 && stateno != 4002
triggerall = (numtarget(1400) < 1 && numtarget(1500) < 1) || (numtarget(1400) > 0 && target(1400),stateno != 1406 && target(1400),stateno != 1408) || (numtarget(1500) > 0 && target(1500),stateno != 1406)
trigger1 = ProjHit = 1, < 2 || numhelper(7610) > 0 || numhelper(7710) > 0 || numhelper(7810) > 0
trigger2 = stateno = 1030 || stateno = 1031 || stateno = 1037 || stateno = 1038
trigger3 = stateno = 1040 || stateno = 1041 || stateno = 1050
trigger4 = stateno = 510 || stateno = 511 || stateno = 512 || stateno = 514
trigger5 = stateno = 516 || stateno = 520
trigger6 = stateno = 4502 || stateno = 2020 || stateno = 301
trigger7 = stateno = 2019 || stateno = 2512 || stateno = 2404
trigger8 = stateno = 7100 || stateno = 7111 || stateno = 7222 || stateno = 2700
trigger9 = stateno = 4600 || stateno = 4611 || stateno = 2220
trigger10 = numhelper(8301) > 0
trigger10 = helper(8301),movecontact > 0 && helper(8301),stateno = 8302
ignorehitpause = 1
id = 8315
name = "b"
pos = 0,0  
stateno = 8315

[State -2, 6]
type = Helper
trigger1 = numhelper(8315) < 1
trigger1 = winko > 0
trigger1 = p2life <= 0
ignorehitpause = 1
id = 8315
name = "b"
pos = 0,0  
stateno = 8317
; dizzy mode  --------------
[State -2, 2]
type = Varadd
trigger1 = var(21) > 0
var(21) = -1
ignorehitpause = 1

[State -2, 2]
type = Varadd
triggerall = Time = 1
triggerall = var(16) < 1
triggerall = UniqHitCount <= 1
triggerall = GetHitVar(hitcount) <= 3
triggerall = prevstateno != 5305 && prevstateno != 5306 && prevstateno != 5307 && prevstateno != 5308
trigger1 = stateno = 5000
trigger1 = anim = 5000
trigger2 = stateno = 5000
trigger2 = anim = 5010
trigger3 = stateno = 5010
trigger3 = anim = 5020 
var(21) = 60
persistent = 0
ignorehitpause = 1

[State -2, 2]
type = Varadd
triggerall = Time = 1
triggerall = UniqHitCount <= 1
triggerall = GetHitVar(hitcount) <= 3
triggerall = var(16) < 1
triggerall = prevstateno != 5305 && prevstateno != 5306 && prevstateno != 5307 && prevstateno != 5308
trigger1 = stateno = 5000
trigger1 = anim = 5001
trigger2 = stateno = 5000
trigger2 = anim = 5011
trigger3 = stateno = 5010
trigger3 = anim = 5021
var(21) = 100
persistent = 0
ignorehitpause = 1

[State -2, 2]
type = Varadd
triggerall = Time = 1
triggerall = UniqHitCount <= 1
triggerall = GetHitVar(hitcount) <= 3
triggerall = var(16) < 1
triggerall = prevstateno != 5305 && prevstateno != 5306 && prevstateno != 5307 && prevstateno != 5308
trigger1 = stateno = 5000
trigger1 = anim = 5002
trigger2 = stateno = 5000
trigger2 = anim = 5012
trigger3 = stateno = 5010
trigger3 = anim = 5022 
var(21) = 140
persistent = 0
ignorehitpause = 1

[State -2, 2]
type = Varadd
triggerall = Time = 1
triggerall = var(16) < 1
triggerall = UniqHitCount <= 1
triggerall = GetHitVar(hitcount) <= 3
triggerall = prevstateno != 5305 && prevstateno != 5306 && prevstateno != 5307 && prevstateno != 5308
trigger1 = gethitvar(animtype) = 0 
trigger1 = stateno = 5020
trigger1 = anim = 5004 
var(21) = 60
persistent = 0
ignorehitpause = 1

[State -2, 2]
type = Varadd
triggerall = Time = 1
triggerall = var(16) < 1
triggerall = UniqHitCount <= 1
triggerall = GetHitVar(hitcount) <= 3
triggerall = prevstateno != 5305 && prevstateno != 5306 && prevstateno != 5307 && prevstateno != 5308
trigger1 = gethitvar(animtype) = 1 || gethitvar(animtype) = 3
trigger1 = stateno = 5020
trigger1 = anim = 5004 
var(21) = 100
persistent = 0
ignorehitpause = 1

[State -2, 2]
type = Varadd
triggerall = Time = 1
triggerall = var(16) < 1
triggerall = UniqHitCount <= 1
triggerall = GetHitVar(hitcount) <= 3
triggerall = prevstateno != 5305 && prevstateno != 5306 && prevstateno != 5307 && prevstateno != 5308
trigger1 = gethitvar(animtype) = 2 || gethitvar(animtype) = 4 || gethitvar(animtype) = 5
trigger1 = stateno = 5020
trigger1 = anim = 5004 
var(21) = 140
persistent = 0
ignorehitpause = 1

[State -2, 2]
type = ChangeState
trigger1 = var(21) >= 1000
value = 5300
ctrl = 0
ignorehitpause = 1

; guard crush
[State -2, 3]
type = Varset
trigger1 = var(28) < 0
var(28) = 0
ignorehitpause = 1

[State -2, 3]
type = Varset
trigger1 = var(28) > 33
var(28) = 33
ignorehitpause = 1

[State -2, 3]
type = Varset
triggerall = time = 0
triggerall = stateno = 150 || stateno = 152
trigger1 = GetHitVar(hitshaketime) <= 3
trigger2 = GetHitVar(xvel) > -3 && GetHitVar(xvel) <= 0
var(29) = 0
ignorehitpause = 1

[State -2, 3]
type = Varset
triggerall = GetHitVar(hitshaketime) > 3
triggerall = GetHitVar(xvel) <= -3 || GetHitVar(xvel) > 0
triggerall = time = 0
trigger1 = stateno = 150
trigger2 = stateno = 152
var(29) = 1
ignorehitpause = 1

[State -2, 3]
type = Varadd
triggerall = stateno != 150 && stateno != 151 && stateno != 152
triggerall = stateno != 153 && stateno != 154 && stateno != 130
triggerall = stateno != 131 && stateno != 155 && stateno != 132
triggerall = time = 1
trigger1 = movetype = H
trigger2 = movetype = A
var(28) = -1
ignorehitpause = 1

[State -2, 3]
type = Varadd
triggerall = GetHitVar(slidetime) + GetHitVar(hittime) > 35
triggerall = GetHitVar(hitshaketime) = 0
triggerall = var(29) = 1
triggerall = p2statetype != A
triggerall = var(16) < 1
trigger1 = stateno = 150
trigger2 = stateno = 152
trigger3 = stateno = 154
var(28) = 3
ignorehitpause = 1

[State -2, 3]
type = Varadd
triggerall = GetHitVar(slidetime) + GetHitVar(hittime) <= 35
triggerall = GetHitVar(slidetime) + GetHitVar(hittime) > 25
triggerall = GetHitVar(hitshaketime) = 0
triggerall = p2statetype != A
triggerall = var(29) = 1
triggerall = var(16) < 1
trigger1 = stateno = 150
trigger2 = stateno = 152
trigger3 = stateno = 154
var(28) = 2
ignorehitpause = 1

[State -2, 3]
type = Varadd
triggerall = GetHitVar(slidetime) + GetHitVar(hittime) <= 25
triggerall = GetHitVar(hitshaketime) = 0
triggerall = p2statetype != A
triggerall = var(29) = 1
triggerall = var(16) < 1
trigger1 = stateno = 150
trigger2 = stateno = 152
trigger3 = stateno = 154
var(28) = 1
ignorehitpause = 1

[State -2, 3]
type = Varadd
triggerall = GetHitVar(slidetime) + GetHitVar(hittime) > 25
triggerall = GetHitVar(hitshaketime) = 0
triggerall = p2statetype = A
triggerall = var(29) = 1
triggerall = var(16) < 1
trigger1 = stateno = 150
trigger2 = stateno = 152
trigger3 = stateno = 154
var(28) = 3
ignorehitpause = 1

[State -2, 3]
type = Varadd
triggerall = GetHitVar(slidetime) + GetHitVar(hittime) <= 25
triggerall = GetHitVar(slidetime) + GetHitVar(hittime) > 20
triggerall = GetHitVar(hitshaketime) = 0
triggerall = p2statetype = A
triggerall = var(29) = 1
triggerall = var(16) < 1
trigger1 = stateno = 150
trigger2 = stateno = 152
trigger3 = stateno = 154
var(28) = 2
ignorehitpause = 1

[State -2, 3]
type = Varadd
triggerall = GetHitVar(slidetime) + GetHitVar(hittime) <= 20
triggerall = GetHitVar(hitshaketime) = 0
triggerall = p2statetype = A
triggerall = var(29) = 1
triggerall = var(16) < 1
trigger1 = stateno = 150
trigger2 = stateno = 152
trigger3 = stateno = 154
var(28) = 1
ignorehitpause = 1

[State -2, 3]
type = ChangeState
triggerall = var(28) >= 33
triggerall = time = 0
trigger1 = stateno = 150
trigger2 = stateno = 152
value = 9001
ctrl = 0
ignorehitpause = 1

; Counter & Armor & 2k2 mode  ---------------
[State -2, 15]
type = Varadd
trigger1 = var(14) >= 0 && p2life > 0
var(14) = -1
ignorehitpause = 1

[State -2, 15]
type = Varadd
trigger1 = var(16) >= 0 && p2life > 0
var(16) = -1
ignorehitpause = 1

[State -2, 15]
type = Varset
trigger1 = var(3) != -128 && var(3) <= 0 && var(50) = 0
var(3) = -128
ignorehitpause = 1
[State -2, 15]
type = Varadd
trigger1 = var(3) > 0 && gametime%5 > 0
var(3) = -1
ignorehitpause = 1

[State -4, 1]
type = explod
trigger1 = var(14) = 0
trigger1 = var(57) = 1
anim = 823
pos = 4,35
postype = left
ignorehitpause = 1
persistent = 0
bindtime = -1
supermove = 1
sprpriority = -3
ownpal = 1

[State -4, 1]
type = explod
trigger1 = var(14) = 0
trigger1 = var(57) = 2
anim = 824
pos = -5,35
postype = right
ignorehitpause = 1
sprpriority = -3
persistent = 0
supermove = 1
bindtime = -1
ownpal = 1

[State -4, 1] 
type = modifyexplod
trigger1 = numexplod(817) > 0 && var(14) > 0
id = 817
scale = var(14)/1201.0,1
ignorehitpause = 1

[State -4, 1] 
type = modifyexplod
trigger1 = numexplod(817) > 0 && var(16) > 0
id = 817
scale = var(16)/961.0,1
ignorehitpause = 1

[State -4, 1] 
type = modifyexplod
trigger1 = numexplod(841) > 0 && var(3) > 0
id = 841
scale = var(3)/896.0,1
ignorehitpause = 1

[State -2, 15]
type = AttackMulSet
triggerall = stateno != [1999,2020]
triggerall = stateno != [6999,7103]   
triggerall = stateno != [7599,7630]
triggerall = stateno != [2600,2700]
triggerall = stateno != [3500,3610]
trigger1 = var(14) > 0
trigger2 = var(16) > 0
value = 1.2

[State -2, 15]
type = AttackMulSet
trigger1 = var(14) < 1
trigger1 = var(16) < 1
trigger2 = stateno = [1999,2020]
trigger3 = stateno = [6999,7103]
trigger4 = stateno = [7599,7630]
trigger5 = stateno = [2600,2700]
trigger6 = stateno = [3500,3610]
value = 1

[State -2, 15]
type = Varset
trigger1 = var(11) = 2
trigger1 = var(14) > 0
var(19) = 0
ignorehitpause = 1

[State -2, 15]
type = Varset
trigger1 = var(11) = 3
trigger1 = var(14) > 0
var(19) = 1
ignorehitpause = 1

[State -2, 15]
type = Varset
trigger1 = var(19) = 0
trigger1 = var(14) > 0
var(11) = 3
ignorehitpause = 1

[State -2, 15]
type = Varset
trigger1 = var(19) = 1
trigger1 = var(14) > 0
var(11) = 2
ignorehitpause = 1

[State -2, 15]
type = Varadd
trigger1 = var(14) > 0
trigger1 = stateno != 12000
var(32) = var(11)
ignorehitpause = 1

[State -2, 15]
type = Powerset
trigger1 = Var(14) > 0
trigger1 = stateno != 12000
value = 3000 - var(32)
ignorehitpause = 1

[State -2, 15]
type = Powerset
trigger1 = Var(16) > 0
trigger1 = stateno != 13000
value = var(16) * 3 +50
ignorehitpause = 1

[State -2, 15]
type = Powerset
trigger1 = Var(3) > 0 && var(20) = 0
value = var(2)
ignorehitpause = 1

[State -2, 15]
type = Powerset
trigger1 = Var(14) = 0
trigger2 = Var(16) = 0
value = 0
ignorehitpause = 1

[State -2, 16]
type = PalFX
trigger1 = (GameTime%2)=0
trigger1 = Var(14) > 0
time = 1
add = 190,63,35;220,72,40
ignorehitpause = 1

[State -2, 17]
type = PalFX
trigger1 = (GameTime%2)=0
trigger1 = var(25) = 0
trigger1 = Var(16) > 0
trigger1 = var(39) = 0 || movecontact = 0 || life = 0
time = 1
add = 190,140,27;200,152,32
ignorehitpause = 1

[State -2, 17]
type = PalFX
trigger1 = (GameTime%2)=0
trigger1 = Var(3) > 0
time = 1
add = 120,100,40
ignorehitpause = 1

[State -2, 1]
type = varadd
trigger1 = var(25) > 0
var(25) = -1
ignorehitpause = 1

[State -2, 1]
type = PalFX
trigger1 = var(25) > 0
trigger1 = var(16) > 0
time = 2
add = 256,256,256
ignorehitpause = 1

[State -2, 1]
type = varadd
trigger1 = var(45) > 0
var(45) = -1
ignorehitpause = 1
[State -2, 1]
type = varadd
trigger1 = var(50) > 0
var(50) = -1
ignorehitpause = 1

[State -2, 1]
type = PalFX
trigger1 = var(45) > 0 && gametime%2 = 0
time = 1
add = 255,255,255 
ignorehitpause = 1
[State -2, 1]
type = PalFX
trigger1 = var(50) > 6 && gametime%2 = 0
time = 1
add = 255,255,255 
ignorehitpause = 1

[State -2, 1];force 
type = PalFX
triggerall = alive
trigger1 = numhelper(8333) = 1 && movetype = A
trigger1 = helper(8333),prevstateno = 5020 || helper(8333),prevstateno = 5070
trigger1 = helper(8333),time = 0
trigger2 = var(39) > 0
time = 1
add = 255,255,255 
ignorehitpause = 1

[State -2, 1]
type = varset
trigger1 = numhelper(8333) = 1 && movetype = A
trigger1 = helper(8333),prevstateno = 5020 || helper(8333),prevstateno = 5070
trigger1 = helper(8333),time = 1
var(39) = 0

[State -2, 1]
type = nothitby
trigger1 = var(40) > 0 && movetype = A
value2 = SCA
time = 15

[State -2, 1]
type = varset
trigger1 = numhelper(8333) = 1 && movetype = A
trigger1 = helper(8333),prevstateno = 5020 || helper(8333),prevstateno = 5070
trigger1 = helper(8333),time = 0
trigger1 = var(38) = 0
var(31) = 1
ignorehitpause = 1

[State -2, 1]
type = varset
trigger1 = numhelper(8333) = 1 && movetype = A
trigger1 = helper(8333),prevstateno = 5020 || helper(8333),prevstateno = 5070
trigger1 = helper(8333),time = 1
trigger1 = var(31) = 1
var(40) = 0
ignorehitpause = 1

[State -2, 1]
type = nothitby
trigger1 = numhelper(8333) = 1 && movetype = A
trigger1 = helper(8333),prevstateno = 5020 || helper(8333),prevstateno = 5070
trigger1 = helper(8333),time = 1
trigger1 = var(31) = 1
value2 = SCA
time = 0
ignorehitpause = 1

[State -2, 1]
type = varadd
trigger1 = var(40) > 0
var(40) = -1

[State -2, 1]
type = varadd
trigger1 = numhelper(8333) = 1 && movetype = A
trigger1 = helper(8333),prevstateno = 5020 || helper(8333),prevstateno = 5070
trigger1 = helper(8333),time = 1
trigger1 = var(31) > 0
var(31) = -1
ignorehitpause = 1

[State -2, 1] 
type = lifeadd
trigger1 = numhelper(8333) = 1 && movetype = A
trigger1 = helper(8333),prevstateno = 5020 || helper(8333),prevstateno = 5070
trigger1 = helper(8333),time = 0 && var(31) = 0
value = -(helper(8333),gethitvar(damage))
ignorehitpause = 1

[State 20, 1]
type = changestate
trigger1 = life = 0 && movetype = A && var(16) > 0
value = 5400
ignorehitpause = 1

[State -2, 1] 
type = pause
trigger1 = life > 0 && movetype = A && numhelper(8333) = 1
trigger1 = helper(8333),prevstateno = 5020 || helper(8333),prevstateno = 5070
trigger1 = helper(8333),time = 1
time = 8

[State -2, 1] 
type = pause
trigger1 = life <= 0 && movetype = A && numhelper(8333) = 1
trigger1 = helper(8333),prevstateno = 5020 || helper(8333),prevstateno = 5070
trigger1 = helper(8333),time = 1
time = 8
ignorehitpause = 1

[State -4, 1]    ;input -8
type = varset
triggerall = animtime = -8
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 1996
trigger3 = stateno = 510 || stateno = 511 || stateno = 1305 || stateno = 2019
trigger4 = stateno = 515 || stateno = 105 || stateno = 4006 || stateno = 4003
trigger5 = stateno = 4002 || stateno = 215 || stateno = 216 || stateno = 5120
trigger6 = stateno = 2512 || stateno = 2404 || stateno = 1304 || stateno = 1299
trigger7 = stateno = 1300 || stateno = 1301 || stateno = 3002 || stateno = 1405
trigger8 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 1505
trigger9 = stateno = 8300 || stateno = 9004 || stateno = 11000 || stateno = 2700
trigger10 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 400
trigger11 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 420
trigger12 = stateno = 11001 || stateno = 220 || stateno = 240 || stateno = 202
trigger13 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 245
trigger14 = stateno = 430 || stateno = 200 || stateno = 450 || stateno = 236
trigger15 = stateno = 230 || stateno = 212 || stateno = 235 || stateno = 2710
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1997
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
var(33) = 0

[State -4, 1]    
type = varset
triggerall = var(55) = 0
triggerall = command = "Fireball_x" && command != "hold_a" && command != "hold_b" && command != "hold_y"
triggerall = command != "holdback"
triggerall = animtime > -8 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 1997
trigger3 = stateno = 510 || stateno = 511 || stateno = 1305 || stateno = 2019
trigger4 = stateno = 515 || stateno = 105 || stateno = 4006 || stateno = 4003
trigger5 = stateno = 4002 || stateno = 215 || stateno = 216 || stateno = 5120
trigger6 = stateno = 2512 || stateno = 2404 || stateno = 1304 || stateno = 1299
trigger7 = stateno = 1300 || stateno = 1301 || stateno = 3002 || stateno = 1405
trigger8 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 1505
trigger9 = stateno = 8300 || stateno = 9004 || stateno = 11000 || stateno = 2700
trigger10 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 400
trigger11 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 420
trigger12 = stateno = 11001 || stateno = 220 || stateno = 240 || stateno = 202
trigger13 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 245
trigger14 = stateno = 430 || stateno = 200 || stateno = 450 || stateno = 236
trigger15 = stateno = 230 || stateno = 212 || stateno = 235 || stateno = 2710
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
var(33) = 1

[State -4, 1]    
type = varset
triggerall = var(55) = 0
triggerall = command = "Fireball_z" && command != "hold_a" && command != "hold_b" && command != "hold_x"
triggerall = command != "holdback"
triggerall = animtime > -8 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 1997
trigger3 = stateno = 510 || stateno = 511 || stateno = 1305 || stateno = 2019
trigger4 = stateno = 515 || stateno = 105 || stateno = 4006 || stateno = 4003
trigger5 = stateno = 4002 || stateno = 215 || stateno = 216 || stateno = 5120
trigger6 = stateno = 2512 || stateno = 2404 || stateno = 1304 || stateno = 1299
trigger7 = stateno = 1300 || stateno = 1301 || stateno = 3002 || stateno = 1405
trigger8 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 1505
trigger9 = stateno = 8300 || stateno = 9004 || stateno = 11000 || stateno = 2700
trigger10 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 400
trigger11 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 420
trigger12 = stateno = 11001 || stateno = 220 || stateno = 240 || stateno = 202
trigger13 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 245
trigger14 = stateno = 430 || stateno = 200 || stateno = 450 || stateno = 236
trigger15 = stateno = 230 || stateno = 212 || stateno = 235 || stateno = 2710
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
var(33) = 2

[State -4, 1]    
type = varset
triggerall = var(55) = 0
triggerall = numhelper(8301) < 1
triggerall = var(56) > 0
triggerall = animtime > -8 && movetype != H
triggerall = command = "ay" || (command = "holddown" && command = "z")
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 1997
trigger3 = stateno = 510 || stateno = 511 || stateno = 1305 || stateno = 2019
trigger4 = stateno = 515 || stateno = 105 || stateno = 4006 || stateno = 4003
trigger5 = stateno = 4002 || stateno = 215 || stateno = 216 || stateno = 5120
trigger6 = stateno = 2512 || stateno = 2404 || stateno = 1304 || stateno = 1299
trigger7 = stateno = 1300 || stateno = 1301 || stateno = 3002 || stateno = 1405
trigger8 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 1505
trigger9 = stateno = 8300 || stateno = 9004 || stateno = 11000 || stateno = 2700
trigger10 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 400
trigger11 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 420
trigger12 = stateno = 11001 || stateno = 220 || stateno = 240 || stateno = 202
trigger13 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 245
trigger14 = stateno = 430 || stateno = 200 || stateno = 450 || stateno = 236
trigger15 = stateno = 230 || stateno = 212 || stateno = 235 || stateno = 2710
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
var(33) = 25
                 
[State -4, 1]    
type = varset
triggerall = var(55) = 0
triggerall = animtime > -8 && movetype != H
triggerall = (command = "dodge" || command = "b") && command = "holdback"
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 1997
trigger3 = stateno = 510 || stateno = 511 || stateno = 1305 || stateno = 2019
trigger4 = stateno = 515 || stateno = 105 || stateno = 4006 || stateno = 4003
trigger5 = stateno = 4002 || stateno = 215 || stateno = 216 || stateno = 5120
trigger6 = stateno = 2512 || stateno = 2404 || stateno = 1304 || stateno = 1299
trigger7 = stateno = 1300 || stateno = 1301 || stateno = 3002 || stateno = 1405
trigger8 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 1505
trigger9 = stateno = 8300 || stateno = 9004 || stateno = 11000 || stateno = 2700
trigger10 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 400
trigger11 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 420
trigger12 = stateno = 11001 || stateno = 220 || stateno = 240 || stateno = 202
trigger13 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 245
trigger14 = stateno = 430 || stateno = 200 || stateno = 450 || stateno = 236
trigger15 = stateno = 230 || stateno = 212 || stateno = 235 || stateno = 2710
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
var(33) = 26
                 
[State -4, 1]    
type = varset
triggerall = var(55) = 0
triggerall = animtime > -8 && movetype != H
triggerall = (command = "dodge" || command = "b") && command != "holdback" && command != "holdfwd" && command != "holddown"
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 1997
trigger3 = stateno = 510 || stateno = 511 || stateno = 1305 || stateno = 2019
trigger4 = stateno = 515 || stateno = 105 || stateno = 4006 || stateno = 4003
trigger5 = stateno = 4002 || stateno = 215 || stateno = 216 || stateno = 5120
trigger6 = stateno = 2512 || stateno = 2404 || stateno = 1304 || stateno = 1299
trigger7 = stateno = 1300 || stateno = 1301 || stateno = 3002 || stateno = 1405
trigger8 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 1505
trigger9 = stateno = 8300 || stateno = 9004 || stateno = 11000 || stateno = 2700
trigger10 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 400
trigger11 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 420
trigger12 = stateno = 11001 || stateno = 220 || stateno = 240 || stateno = 202
trigger13 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 245
trigger14 = stateno = 430 || stateno = 200 || stateno = 450 || stateno = 236
trigger15 = stateno = 230 || stateno = 212 || stateno = 235 || stateno = 2710
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
var(33) = 27
                 
[State -4, 1]    
type = varset
triggerall = var(55) = 0
triggerall = animtime > -8 && movetype != H
triggerall = (command = "dodge" || command = "b") && command = "holdfwd"
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 1997
trigger3 = stateno = 510 || stateno = 511 || stateno = 1305 || stateno = 2019
trigger4 = stateno = 515 || stateno = 105 || stateno = 4006 || stateno = 4003
trigger5 = stateno = 4002 || stateno = 215 || stateno = 216 || stateno = 5120
trigger6 = stateno = 2512 || stateno = 2404 || stateno = 1304 || stateno = 1299
trigger7 = stateno = 1300 || stateno = 1301 || stateno = 3002 || stateno = 1405
trigger8 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 1505
trigger9 = stateno = 8300 || stateno = 9004 || stateno = 11000 || stateno = 2700
trigger10 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 400
trigger11 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 420
trigger12 = stateno = 11001 || stateno = 220 || stateno = 240 || stateno = 202
trigger13 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 245
trigger14 = stateno = 430 || stateno = 200 || stateno = 450 || stateno = 236
trigger15 = stateno = 230 || stateno = 212 || stateno = 235 || stateno = 2710
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
var(33) = 28
                 
[State -4, 1]    
type = varset
triggerall = var(55) = 0
triggerall = command = "ucut_x" && command != "hold_a" && command != "hold_b" && command != "hold_y"
triggerall = animtime > -8 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 1997
trigger3 = stateno = 510 || stateno = 511 || stateno = 1305 || stateno = 2019
trigger4 = stateno = 515 || stateno = 105 || stateno = 4006 || stateno = 4003
trigger5 = stateno = 4002 || stateno = 215 || stateno = 216 || stateno = 5120
trigger6 = stateno = 2512 || stateno = 2404 || stateno = 1304 || stateno = 1299
trigger7 = stateno = 1300 || stateno = 1301 || stateno = 3002 || stateno = 1405
trigger8 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 1505
trigger9 = stateno = 8300 || stateno = 9004 || stateno = 11000 || stateno = 2700
trigger10 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 400
trigger11 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 420
trigger12 = stateno = 11001 || stateno = 220 || stateno = 240 || stateno = 202
trigger13 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 245
trigger14 = stateno = 430 || stateno = 200 || stateno = 450 || stateno = 236
trigger15 = stateno = 230 || stateno = 212 || stateno = 235 || stateno = 2710
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
var(33) = 3
 
[State -4, 1]    
type = varset
triggerall = var(55) = 0
triggerall = command = "ucut_y" && command != "hold_a" && command != "hold_b" && command != "hold_x"
triggerall = animtime > -8 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 1997
trigger3 = stateno = 510 || stateno = 511 || stateno = 1305 || stateno = 2019
trigger4 = stateno = 515 || stateno = 105 || stateno = 4006 || stateno = 4003
trigger5 = stateno = 4002 || stateno = 215 || stateno = 216 || stateno = 5120
trigger6 = stateno = 2512 || stateno = 2404 || stateno = 1304 || stateno = 1299
trigger7 = stateno = 1300 || stateno = 1301 || stateno = 3002 || stateno = 1405
trigger8 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 1505
trigger9 = stateno = 8300 || stateno = 9004 || stateno = 11000 || stateno = 2700
trigger10 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 400
trigger11 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 420
trigger12 = stateno = 11001 || stateno = 220 || stateno = 240 || stateno = 202
trigger13 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 245
trigger14 = stateno = 430 || stateno = 200 || stateno = 450 || stateno = 236
trigger15 = stateno = 230 || stateno = 212 || stateno = 235 || stateno = 2710
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
var(33) = 4

[State -4, 1]    
type = varset
triggerall = var(55) = 0 && var(3) < 1
triggerall = command = "ucut_z" && command != "hold_a" && command != "hold_b"
triggerall = power >= 500 + var(20)*100
triggerall = var(16) < 1 && var(14) < 1
triggerall = animtime > -8 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 1997
trigger3 = stateno = 510 || stateno = 511 || stateno = 1305 || stateno = 2019
trigger4 = stateno = 515 || stateno = 105 || stateno = 4006 || stateno = 4003
trigger5 = stateno = 4002 || stateno = 215 || stateno = 216 || stateno = 5120
trigger6 = stateno = 2512 || stateno = 2404 || stateno = 1304 || stateno = 1299
trigger7 = stateno = 1300 || stateno = 1301 || stateno = 3002 || stateno = 1405
trigger8 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 1505
trigger9 = stateno = 8300 || stateno = 9004 || stateno = 11000 || stateno = 2700
trigger10 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 400
trigger11 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 420
trigger12 = stateno = 11001 || stateno = 220 || stateno = 240 || stateno = 202
trigger13 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 245
trigger14 = stateno = 430 || stateno = 200 || stateno = 450 || stateno = 236
trigger15 = stateno = 230 || stateno = 212 || stateno = 235 || stateno = 2710
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
var(33) = 5

[State -4, 1]    
type = varset
triggerall = var(55) = 0
triggerall = command = "3p1_x" && command != "hold_a" && command != "hold_b" && command != "hold_y"
triggerall = animtime > -8 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 1997
trigger3 = stateno = 510 || stateno = 511 || stateno = 1305 || stateno = 2019
trigger4 = stateno = 515 || stateno = 105 || stateno = 4006 || stateno = 4003
trigger5 = stateno = 4002 || stateno = 215 || stateno = 216 || stateno = 5120
trigger6 = stateno = 2512 || stateno = 2404 || stateno = 1304 || stateno = 1299
trigger7 = stateno = 1300 || stateno = 1301 || stateno = 3002 || stateno = 1405
trigger8 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 1505
trigger9 = stateno = 8300 || stateno = 9004 || stateno = 11000 || stateno = 2700
trigger10 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 400
trigger11 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 420
trigger12 = stateno = 11001 || stateno = 220 || stateno = 240 || stateno = 202
trigger13 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 245
trigger14 = stateno = 430 || stateno = 200 || stateno = 450 || stateno = 236
trigger15 = stateno = 230 || stateno = 212 || stateno = 235 || stateno = 2710
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
var(33) = 6

[State -4, 1]    
type = varset
triggerall = var(55) = 0
triggerall = command = "3p1_z" && command != "hold_a" && command != "hold_b" && command != "hold_x"
triggerall = animtime > -8 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 1997
trigger3 = stateno = 510 || stateno = 511 || stateno = 1305 || stateno = 2019
trigger4 = stateno = 515 || stateno = 105 || stateno = 4006 || stateno = 4003
trigger5 = stateno = 4002 || stateno = 215 || stateno = 216 || stateno = 5120
trigger6 = stateno = 2512 || stateno = 2404 || stateno = 1304 || stateno = 1299
trigger7 = stateno = 1300 || stateno = 1301 || stateno = 3002 || stateno = 1405
trigger8 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 1505
trigger9 = stateno = 8300 || stateno = 9004 || stateno = 11000 || stateno = 2700
trigger10 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 400
trigger11 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 420
trigger12 = stateno = 11001 || stateno = 220 || stateno = 240 || stateno = 202
trigger13 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 245
trigger14 = stateno = 430 || stateno = 200 || stateno = 450 || stateno = 236
trigger15 = stateno = 230 || stateno = 212 || stateno = 235 || stateno = 2710
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
var(33) = 7
 
[State -4, 1]    
type = varset
triggerall = var(55) = 0
triggerall = command = "QCF_a" && command != "hold_a" && command != "hold_b" && command != "hold_y"
triggerall = command != "holdback"
triggerall = animtime > -8 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 1997
trigger3 = stateno = 510 || stateno = 511 || stateno = 1305 || stateno = 2019
trigger4 = stateno = 515 || stateno = 105 || stateno = 4006 || stateno = 4003
trigger5 = stateno = 4002 || stateno = 215 || stateno = 216 || stateno = 5120
trigger6 = stateno = 2512 || stateno = 2404 || stateno = 1304 || stateno = 1299
trigger7 = stateno = 1300 || stateno = 1301 || stateno = 3002 || stateno = 1405
trigger8 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 1505
trigger9 = stateno = 8300 || stateno = 9004 || stateno = 11000 || stateno = 2700
trigger10 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 400
trigger11 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 420
trigger12 = stateno = 11001 || stateno = 220 || stateno = 240 || stateno = 202
trigger13 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 245
trigger14 = stateno = 430 || stateno = 200 || stateno = 450 || stateno = 236
trigger15 = stateno = 230 || stateno = 212 || stateno = 235 || stateno = 2710
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
var(33) = 8

[State -4, 1]    
type = varset
triggerall = var(55) = 0
triggerall = command = "QCF_c" && command != "hold_a" && command != "hold_b" && command != "hold_x"
triggerall = command != "holdback"
triggerall = animtime > -8 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 1997
trigger3 = stateno = 510 || stateno = 511 || stateno = 1305 || stateno = 2019
trigger4 = stateno = 515 || stateno = 105 || stateno = 4006 || stateno = 4003
trigger5 = stateno = 4002 || stateno = 215 || stateno = 216 || stateno = 5120
trigger6 = stateno = 2512 || stateno = 2404 || stateno = 1304 || stateno = 1299
trigger7 = stateno = 1300 || stateno = 1301 || stateno = 3002 || stateno = 1405
trigger8 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 1505
trigger9 = stateno = 8300 || stateno = 9004 || stateno = 11000 || stateno = 2700
trigger10 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 400
trigger11 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 420
trigger12 = stateno = 11001 || stateno = 220 || stateno = 240 || stateno = 202
trigger13 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 245
trigger14 = stateno = 430 || stateno = 200 || stateno = 450 || stateno = 236
trigger15 = stateno = 230 || stateno = 212 || stateno = 235 || stateno = 2710
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
var(33) = 9

[State -4, 1]    
type = varset
triggerall = var(55) = 0
triggerall = command = "scorch_a" && command != "hold_x" && command != "hold_b" && command != "hold_y"
triggerall = command != "holdback"
triggerall = animtime > -8 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 1997
trigger3 = stateno = 510 || stateno = 511 || stateno = 1305 || stateno = 2019
trigger4 = stateno = 515 || stateno = 105 || stateno = 4006 || stateno = 4003
trigger5 = stateno = 4002 || stateno = 215 || stateno = 216 || stateno = 5120
trigger6 = stateno = 2512 || stateno = 2404 || stateno = 1304 || stateno = 1299
trigger7 = stateno = 1300 || stateno = 1301 || stateno = 3002 || stateno = 1405
trigger8 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 1505
trigger9 = stateno = 8300 || stateno = 9004 || stateno = 11000 || stateno = 2700
trigger10 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 400
trigger11 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 420
trigger12 = stateno = 11001 || stateno = 220 || stateno = 240 || stateno = 202
trigger13 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 245
trigger14 = stateno = 430 || stateno = 200 || stateno = 450 || stateno = 236
trigger15 = stateno = 230 || stateno = 212 || stateno = 235 || stateno = 2710
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
var(33) = 10
 
[State -4, 1]    
type = varset
triggerall = var(55) = 0
triggerall = command = "scorch_c" && command != "hold_x" && command != "hold_a" && command != "hold_y"
triggerall = command != "holdback"
triggerall = animtime > -8 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 1997
trigger3 = stateno = 510 || stateno = 511 || stateno = 1305 || stateno = 2019
trigger4 = stateno = 515 || stateno = 105 || stateno = 4006 || stateno = 4003
trigger5 = stateno = 4002 || stateno = 215 || stateno = 216 || stateno = 5120
trigger6 = stateno = 2512 || stateno = 2404 || stateno = 1304 || stateno = 1299
trigger7 = stateno = 1300 || stateno = 1301 || stateno = 3002 || stateno = 1405
trigger8 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 1505
trigger9 = stateno = 8300 || stateno = 9004 || stateno = 11000 || stateno = 2700
trigger10 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 400
trigger11 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 420
trigger12 = stateno = 11001 || stateno = 220 || stateno = 240 || stateno = 202
trigger13 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 245
trigger14 = stateno = 430 || stateno = 200 || stateno = 450 || stateno = 236
trigger15 = stateno = 230 || stateno = 212 || stateno = 235 || stateno = 2710
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
var(33) = 11

[State -4, 1]    
type = varset
triggerall = var(55) = 0
triggerall = command = "QCB_a" && command != "hold_x" && command != "hold_b" && command != "hold_y"
triggerall = command != "holdfwd"
triggerall = animtime > -8 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 1997
trigger3 = stateno = 510 || stateno = 511 || stateno = 1305 || stateno = 2019
trigger4 = stateno = 515 || stateno = 105 || stateno = 4006 || stateno = 4003
trigger5 = stateno = 4002 || stateno = 215 || stateno = 216 || stateno = 5120
trigger6 = stateno = 2512 || stateno = 2404 || stateno = 1304 || stateno = 1299
trigger7 = stateno = 1300 || stateno = 1301 || stateno = 3002 || stateno = 1405
trigger8 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 1505
trigger9 = stateno = 8300 || stateno = 9004 || stateno = 11000 || stateno = 2700
trigger10 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 400
trigger11 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 420
trigger12 = stateno = 11001 || stateno = 220 || stateno = 240 || stateno = 202
trigger13 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 245
trigger14 = stateno = 430 || stateno = 200 || stateno = 450 || stateno = 236
trigger15 = stateno = 230 || stateno = 212 || stateno = 235 || stateno = 2710
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
var(33) = 12

[State -4, 1]    
type = varset
triggerall = var(55) = 0
triggerall = command = "QCB_c" && command != "hold_x" && command != "hold_a" && command != "hold_y"
triggerall = command != "holdfwd"
triggerall = animtime > -8 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 1997
trigger3 = stateno = 510 || stateno = 511 || stateno = 1305 || stateno = 2019
trigger4 = stateno = 515 || stateno = 105 || stateno = 4006 || stateno = 4003
trigger5 = stateno = 4002 || stateno = 215 || stateno = 216 || stateno = 5120
trigger6 = stateno = 2512 || stateno = 2404 || stateno = 1304 || stateno = 1299
trigger7 = stateno = 1300 || stateno = 1301 || stateno = 3002 || stateno = 1405
trigger8 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 1505
trigger9 = stateno = 8300 || stateno = 9004 || stateno = 11000 || stateno = 2700
trigger10 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 400
trigger11 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 420
trigger12 = stateno = 11001 || stateno = 220 || stateno = 240 || stateno = 202
trigger13 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 245
trigger14 = stateno = 430 || stateno = 200 || stateno = 450 || stateno = 236
trigger15 = stateno = 230 || stateno = 212 || stateno = 235 || stateno = 2710
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
var(33) = 13

[State -4, 1]    
type = varset
triggerall = var(55) = 0
triggerall = command = "QCB_a2" && command != "hold_x" && command != "hold_b" && command != "hold_y"
triggerall = command != "holdfwd"
triggerall = animtime > -8 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 1997
trigger3 = stateno = 510 || stateno = 511 || stateno = 1305 || stateno = 2019
trigger4 = stateno = 515 || stateno = 105 || stateno = 4006 || stateno = 4003
trigger5 = stateno = 4002 || stateno = 215 || stateno = 216 || stateno = 5120
trigger6 = stateno = 2512 || stateno = 2404 || stateno = 1304 || stateno = 1299
trigger7 = stateno = 1300 || stateno = 1301 || stateno = 3002 || stateno = 1405
trigger8 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 1505
trigger9 = stateno = 8300 || stateno = 9004 || stateno = 11000 || stateno = 2700
trigger10 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 400
trigger11 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 420
trigger12 = stateno = 11001 || stateno = 220 || stateno = 240 || stateno = 202
trigger13 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 245
trigger14 = stateno = 430 || stateno = 200 || stateno = 450 || stateno = 236
trigger15 = stateno = 230 || stateno = 212 || stateno = 235 || stateno = 2710
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
var(33) = 30

[State -4, 1]    
type = varset
triggerall = var(55) = 0
triggerall = command = "QCB_c2" && command != "hold_x" && command != "hold_a" && command != "hold_y"
triggerall = command != "holdfwd"
triggerall = animtime > -8 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 1997
trigger3 = stateno = 510 || stateno = 511 || stateno = 1305 || stateno = 2019
trigger4 = stateno = 515 || stateno = 105 || stateno = 4006 || stateno = 4003
trigger5 = stateno = 4002 || stateno = 215 || stateno = 216 || stateno = 5120
trigger6 = stateno = 2512 || stateno = 2404 || stateno = 1304 || stateno = 1299
trigger7 = stateno = 1300 || stateno = 1301 || stateno = 3002 || stateno = 1405
trigger8 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 1505
trigger9 = stateno = 8300 || stateno = 9004 || stateno = 11000 || stateno = 2700
trigger10 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 400
trigger11 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 420
trigger12 = stateno = 11001 || stateno = 220 || stateno = 240 || stateno = 202
trigger13 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 245
trigger14 = stateno = 430 || stateno = 200 || stateno = 450 || stateno = 236
trigger15 = stateno = 230 || stateno = 212 || stateno = 235 || stateno = 2710
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
var(33) = 31

[State -4, 1]    
type = varset
triggerall = var(55) = 0 && command != "hold_a" && command != "hold_b"
triggerall = command = "qcfqcb_x" || command = "qcfqcb_x2"
triggerall = (power >= 1000 + var(20)*100 && var(14) < 1) || var(14) > 0 || var(3) > 0
triggerall = command != "holdfwd"
triggerall = var(16) < 1
triggerall = animtime > -8 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 1997
trigger3 = stateno = 510 || stateno = 511 || stateno = 1305 || stateno = 2019
trigger4 = stateno = 515 || stateno = 105 || stateno = 4006 || stateno = 4003
trigger5 = stateno = 4002 || stateno = 215 || stateno = 216 || stateno = 5120
trigger6 = stateno = 2512 || stateno = 2404 || stateno = 1304 || stateno = 1299
trigger7 = stateno = 1300 || stateno = 1301 || stateno = 3002 || stateno = 1405
trigger8 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 1505
trigger9 = stateno = 8300 || stateno = 9004 || stateno = 11000 || stateno = 2700
trigger10 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 400
trigger11 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 420
trigger12 = stateno = 11001 || stateno = 220 || stateno = 240 || stateno = 202
trigger13 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 245
trigger14 = stateno = 430 || stateno = 200 || stateno = 450 || stateno = 236
trigger15 = stateno = 230 || stateno = 212 || stateno = 235 || stateno = 2710
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
var(33) = 14

[State -4, 1]    
type = varset
triggerall = var(55) = 0 && command != "hold_a" && command != "hold_b"
triggerall = command = "qcfqcb_y" || command = "qcfqcb_y2"
triggerall = (power >= 2000 + var(20)*100 && var(14) < 1) || var(14) > 0 || var(3) > 0
triggerall = command != "holdfwd"
triggerall = var(16) < 1
triggerall = animtime > -8 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 1997
trigger3 = stateno = 510 || stateno = 511 || stateno = 1305 || stateno = 2019
trigger4 = stateno = 515 || stateno = 105 || stateno = 4006 || stateno = 4003
trigger5 = stateno = 4002 || stateno = 215 || stateno = 216 || stateno = 5120
trigger6 = stateno = 2512 || stateno = 2404 || stateno = 1304 || stateno = 1299
trigger7 = stateno = 1300 || stateno = 1301 || stateno = 3002 || stateno = 1405
trigger8 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 1505
trigger9 = stateno = 8300 || stateno = 9004 || stateno = 11000 || stateno = 2700
trigger10 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 400
trigger11 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 420
trigger12 = stateno = 11001 || stateno = 220 || stateno = 240 || stateno = 202
trigger13 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 245
trigger14 = stateno = 430 || stateno = 200 || stateno = 450 || stateno = 236
trigger15 = stateno = 230 || stateno = 212 || stateno = 235 || stateno = 2710
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
var(33) = 15
 
[State -4, 1]    
type = varset
triggerall = var(55) = 0 && command != "hold_a" && command != "hold_b"
triggerall = command = "qcfqcb_z" || command = "qcfqcb_z2"
triggerall = (power >= 3000 + var(20)*100 && var(3) < 1) || (power >= 1000 + var(20)*100 && var(3) > 0)
triggerall = command != "holdfwd"
triggerall = var(16) < 1 && var(14) < 1
triggerall = animtime > -8 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 1997
trigger3 = stateno = 510 || stateno = 511 || stateno = 1305 || stateno = 2019
trigger4 = stateno = 515 || stateno = 105 || stateno = 4006 || stateno = 4003
trigger5 = stateno = 4002 || stateno = 215 || stateno = 216 || stateno = 5120
trigger6 = stateno = 2512 || stateno = 2404 || stateno = 1304 || stateno = 1299
trigger7 = stateno = 1300 || stateno = 1301 || stateno = 3002 || stateno = 1405
trigger8 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 1505
trigger9 = stateno = 8300 || stateno = 9004 || stateno = 11000 || stateno = 2700
trigger10 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 400
trigger11 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 420
trigger12 = stateno = 11001 || stateno = 220 || stateno = 240 || stateno = 202
trigger13 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 245
trigger14 = stateno = 430 || stateno = 200 || stateno = 450 || stateno = 236
trigger15 = stateno = 230 || stateno = 212 || stateno = 235 || stateno = 2710
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
var(33) = 16
 
[State -4, 1]    
type = varset
triggerall = var(55) = 0
triggerall = command = "qcbqcb_x" && command != "hold_a" && command != "hold_b"
triggerall = (power >= 1000 + var(20)*100 && var(14) < 1) || var(14) > 0 || var(3) > 0
triggerall = command != "holdback"
triggerall = var(16) < 1
triggerall = NumHelper(7602) < 1
triggerall = animtime > -8 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 1997
trigger3 = stateno = 510 || stateno = 511 || stateno = 1305 || stateno = 2019
trigger4 = stateno = 515 || stateno = 105 || stateno = 4006 || stateno = 4003
trigger5 = stateno = 4002 || stateno = 215 || stateno = 216 || stateno = 5120
trigger6 = stateno = 2512 || stateno = 2404 || stateno = 1304 || stateno = 1299
trigger7 = stateno = 1300 || stateno = 1301 || stateno = 3002 || stateno = 1405
trigger8 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 1505
trigger9 = stateno = 8300 || stateno = 9004 || stateno = 11000 || stateno = 2700
trigger10 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 400
trigger11 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 420
trigger12 = stateno = 11001 || stateno = 220 || stateno = 240 || stateno = 202
trigger13 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 245
trigger14 = stateno = 430 || stateno = 200 || stateno = 450 || stateno = 236
trigger15 = stateno = 230 || stateno = 212 || stateno = 235 || stateno = 2710
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
var(33) = 17

[State -4, 1]    
type = varset
triggerall = var(55) = 0
triggerall = command = "qcbqcb_y" && command != "hold_a" && command != "hold_b"
triggerall = command != "holdback"
triggerall = (power >= 2000 + var(20)*100 && var(14) < 1) || var(14) > 0 || var(3) > 0
triggerall = var(16) < 1
triggerall = NumHelper(7602) < 1
triggerall = animtime > -8 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 1997
trigger3 = stateno = 510 || stateno = 511 || stateno = 1305 || stateno = 2019
trigger4 = stateno = 515 || stateno = 105 || stateno = 4006 || stateno = 4003
trigger5 = stateno = 4002 || stateno = 215 || stateno = 216 || stateno = 5120
trigger6 = stateno = 2512 || stateno = 2404 || stateno = 1304 || stateno = 1299
trigger7 = stateno = 1300 || stateno = 1301 || stateno = 3002 || stateno = 1405
trigger8 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 1505
trigger9 = stateno = 8300 || stateno = 9004 || stateno = 11000 || stateno = 2700
trigger10 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 400
trigger11 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 420
trigger12 = stateno = 11001 || stateno = 220 || stateno = 240 || stateno = 202
trigger13 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 245
trigger14 = stateno = 430 || stateno = 200 || stateno = 450 || stateno = 236
trigger15 = stateno = 230 || stateno = 212 || stateno = 235 || stateno = 2710
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
var(33) = 18
 
[State -4, 1]    
type = varset
triggerall = var(55) = 0 && command != "hold_x" && command != "hold_y"
triggerall = command = "qcfqcf_a"; || command = "qcfqcf_a2"
triggerall = command != "holdback"
triggerall = (power >= 1000 + var(20)*100 && var(14) < 1) || var(14) > 0 || var(3) > 0
triggerall = var(16) < 1
triggerall = animtime > -8 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 1997
trigger3 = stateno = 510 || stateno = 511 || stateno = 1305 || stateno = 2019
trigger4 = stateno = 515 || stateno = 105 || stateno = 4006 || stateno = 4003
trigger5 = stateno = 4002 || stateno = 215 || stateno = 216 || stateno = 5120
trigger6 = stateno = 2512 || stateno = 2404 || stateno = 1304 || stateno = 1299
trigger7 = stateno = 1300 || stateno = 1301 || stateno = 3002 || stateno = 1405
trigger8 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 1505
trigger9 = stateno = 8300 || stateno = 9004 || stateno = 11000 || stateno = 2700
trigger10 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 400
trigger11 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 420
trigger12 = stateno = 11001 || stateno = 220 || stateno = 240 || stateno = 202
trigger13 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 245
trigger14 = stateno = 430 || stateno = 200 || stateno = 450 || stateno = 236
trigger15 = stateno = 230 || stateno = 212 || stateno = 235 || stateno = 2710
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
var(33) = 20                       
 
[State -4, 1]    
type = varset
triggerall = var(55) = 0 && command != "hold_x" && command != "hold_y"
triggerall = command = "qcfqcf_b"; || command = "qcfqcf_b2"
triggerall = command != "holdback"
triggerall = (power >= 2000 + var(20)*100 && var(14) < 1) || var(14) > 0 || var(3) > 0
triggerall = var(16) < 1
triggerall = animtime > -8 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 1997
trigger3 = stateno = 510 || stateno = 511 || stateno = 1305 || stateno = 2019
trigger4 = stateno = 515 || stateno = 105 || stateno = 4006 || stateno = 4003
trigger5 = stateno = 4002 || stateno = 215 || stateno = 216 || stateno = 5120
trigger6 = stateno = 2512 || stateno = 2404 || stateno = 1304 || stateno = 1299
trigger7 = stateno = 1300 || stateno = 1301 || stateno = 3002 || stateno = 1405
trigger8 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 1505
trigger9 = stateno = 8300 || stateno = 9004 || stateno = 11000 || stateno = 2700
trigger10 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 400
trigger11 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 420
trigger12 = stateno = 11001 || stateno = 220 || stateno = 240 || stateno = 202
trigger13 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 245
trigger14 = stateno = 430 || stateno = 200 || stateno = 450 || stateno = 236
trigger15 = stateno = 230 || stateno = 212 || stateno = 235 || stateno = 2710
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
var(33) = 21                       

[State -4, 1]    
type = varset
triggerall = var(55) = 0 && command != "hold_x" && command != "hold_y"
triggerall = command = "qcfqcf_c"; || command = "qcfqcf_c2"
triggerall = command != "holdback"
triggerall = power >= 3000 + var(20)*100 && var(14) < 1
triggerall = var(16) < 1
triggerall = animtime > -8 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 1997
trigger3 = stateno = 510 || stateno = 511 || stateno = 1305 || stateno = 2019
trigger4 = stateno = 515 || stateno = 105 || stateno = 4006 || stateno = 4003
trigger5 = stateno = 4002 || stateno = 215 || stateno = 216 || stateno = 5120
trigger6 = stateno = 2512 || stateno = 2404 || stateno = 1304 || stateno = 1299
trigger7 = stateno = 1300 || stateno = 1301 || stateno = 3002 || stateno = 1405
trigger8 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 1505
trigger9 = stateno = 8300 || stateno = 9004 || stateno = 11000 || stateno = 2700
trigger10 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 400
trigger11 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 420
trigger12 = stateno = 11001 || stateno = 220 || stateno = 240 || stateno = 202
trigger13 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 245
trigger14 = stateno = 430 || stateno = 200 || stateno = 450 || stateno = 236
trigger15 = stateno = 230 || stateno = 212 || stateno = 235 || stateno = 2710
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
var(33) = 22
                 
[State -4, 1]    
type = varset
triggerall = var(55) = 0 && command != "hold_a" && command != "hold_b" && command != "hold_y"
triggerall = command = "3207x"; || command = "3207x2"
triggerall = command != "holdback" && command != "hold_y"
triggerall = animtime > -8 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 1997
trigger3 = stateno = 510 || stateno = 511 || stateno = 1305 || stateno = 2019
trigger4 = stateno = 515 || stateno = 105 || stateno = 4006 || stateno = 4003
trigger5 = stateno = 4002 || stateno = 215 || stateno = 216 || stateno = 5120
trigger6 = stateno = 2512 || stateno = 2404 || stateno = 1304 || stateno = 1299
trigger7 = stateno = 1300 || stateno = 1301 || stateno = 3002 || stateno = 1405
trigger8 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 1505
trigger9 = stateno = 8300 || stateno = 9004 || stateno = 11000 || stateno = 2700
trigger10 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 400
trigger11 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 420
trigger12 = stateno = 11001 || stateno = 220 || stateno = 240 || stateno = 202
trigger13 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 245
trigger14 = stateno = 430 || stateno = 200 || stateno = 450 || stateno = 236
trigger15 = stateno = 230 || stateno = 212 || stateno = 235 || stateno = 2710
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
var(33) = 23
                 
[State -4, 1]    
type = varset
triggerall = var(55) = 0 && command != "hold_a" && command != "hold_b" && command != "hold_x"
triggerall = command = "3207y"; || command = "3207y2"
triggerall = command != "holdback" && command != "hold_x"
triggerall = animtime > -8 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 1997
trigger3 = stateno = 510 || stateno = 511 || stateno = 1305 || stateno = 2019
trigger4 = stateno = 515 || stateno = 105 || stateno = 4006 || stateno = 4003
trigger5 = stateno = 4002 || stateno = 215 || stateno = 216 || stateno = 5120
trigger6 = stateno = 2512 || stateno = 2404 || stateno = 1304 || stateno = 1299
trigger7 = stateno = 1300 || stateno = 1301 || stateno = 3002 || stateno = 1405
trigger8 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 1505
trigger9 = stateno = 8300 || stateno = 9004 || stateno = 11000 || stateno = 2700
trigger10 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 400
trigger11 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 420
trigger12 = stateno = 11001 || stateno = 220 || stateno = 240 || stateno = 202
trigger13 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 245
trigger14 = stateno = 430 || stateno = 200 || stateno = 450 || stateno = 236
trigger15 = stateno = 230 || stateno = 212 || stateno = 235 || stateno = 2710
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
var(33) = 24
                 
[State -4, 1]    
type = varset
triggerall = var(55) = 0 && command != "hold_x" && command != "hold_y"
triggerall = command = "qcbqcb_a" || command = "qcbqcb_b"
triggerall = command != "holdback"
triggerall = power >= 1500 + var(20)*100 && var(14) < 1
triggerall = var(16) < 1 && var(3) < 1
triggerall = animtime > -8 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 1997
trigger3 = stateno = 510 || stateno = 511 || stateno = 1305 || stateno = 2019
trigger4 = stateno = 515 || stateno = 105 || stateno = 4006 || stateno = 4003
trigger5 = stateno = 4002 || stateno = 215 || stateno = 216 || stateno = 5120
trigger6 = stateno = 2512 || stateno = 2404 || stateno = 1304 || stateno = 1299
trigger7 = stateno = 1300 || stateno = 1301 || stateno = 3002 || stateno = 1405
trigger8 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 1505
trigger9 = stateno = 8300 || stateno = 9004 || stateno = 11000 || stateno = 2700
trigger10 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 400
trigger11 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 420
trigger12 = stateno = 11001 || stateno = 220 || stateno = 240 || stateno = 202
trigger13 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 245
trigger14 = stateno = 430 || stateno = 200 || stateno = 450 || stateno = 236
trigger15 = stateno = 230 || stateno = 212 || stateno = 235 || stateno = 2710
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
var(33) = 29
                 
[State -4, 1]    
type = varset
triggerall = var(55) = 0 && command != "hold_a" && command != "hold_b"
triggerall = command = "max2" && life <= 250
triggerall = command != "holdback"
triggerall = power >= 1000 + var(20)*100 && var(3) > 0
triggerall = animtime > -8 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 1997
trigger3 = stateno = 510 || stateno = 511 || stateno = 1305 || stateno = 2019
trigger4 = stateno = 515 || stateno = 105 || stateno = 4006 || stateno = 4003
trigger5 = stateno = 4002 || stateno = 215 || stateno = 216 || stateno = 5120
trigger6 = stateno = 2512 || stateno = 2404 || stateno = 1304 || stateno = 1299
trigger7 = stateno = 1300 || stateno = 1301 || stateno = 3002 || stateno = 1405
trigger8 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 1505
trigger9 = stateno = 8300 || stateno = 9004 || stateno = 11000 || stateno = 2700
trigger10 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 400
trigger11 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 420
trigger12 = stateno = 11001 || stateno = 220 || stateno = 240 || stateno = 202
trigger13 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 245
trigger14 = stateno = 430 || stateno = 200 || stateno = 450 || stateno = 236
trigger15 = stateno = 230 || stateno = 212 || stateno = 235 || stateno = 2710
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
var(33) = 32
                 
[State -4, 1]    
type = varset
triggerall = var(55) = 0 && var(14) < 1 && var(16) < 1
triggerall = command != "holdfwd" && var(51) = 0 && life <= 500
triggerall = command = "exceed" && command != "hold_a" && command != "hold_b"
triggerall = animtime > -8 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 1997
trigger3 = stateno = 510 || stateno = 511 || stateno = 1305 || stateno = 2019
trigger4 = stateno = 515 || stateno = 105 || stateno = 4006 || stateno = 4003
trigger5 = stateno = 4002 || stateno = 215 || stateno = 216 || stateno = 5120
trigger6 = stateno = 2512 || stateno = 2404 || stateno = 1304 || stateno = 1299
trigger7 = stateno = 1300 || stateno = 1301 || stateno = 3002 || stateno = 1405
trigger8 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 1505
trigger9 = stateno = 8300 || stateno = 9004 || stateno = 11000 || stateno = 2700
trigger10 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 400
trigger11 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 420
trigger12 = stateno = 11001 || stateno = 220 || stateno = 240 || stateno = 202
trigger13 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 245
trigger14 = stateno = 430 || stateno = 200 || stateno = 450 || stateno = 236
trigger15 = stateno = 230 || stateno = 212 || stateno = 235 || stateno = 2710
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
var(33) = 33

[State -4, 1]    
type = varset
triggerall = var(55) = 0 && var(14) < 1 && var(16) < 1
triggerall = command != "holdfwd" && var(51) = 0 && life <= 500
triggerall = command = "exceed2" && command != "hold_x" && command != "hold_y"
triggerall = animtime > -8 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 1997
trigger3 = stateno = 510 || stateno = 511 || stateno = 1305 || stateno = 2019
trigger4 = stateno = 515 || stateno = 105 || stateno = 4006 || stateno = 4003
trigger5 = stateno = 4002 || stateno = 215 || stateno = 216 || stateno = 5120
trigger6 = stateno = 2512 || stateno = 2404 || stateno = 1304 || stateno = 1299
trigger7 = stateno = 1300 || stateno = 1301 || stateno = 3002 || stateno = 1405
trigger8 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 1505
trigger9 = stateno = 8300 || stateno = 9004 || stateno = 11000 || stateno = 2700
trigger10 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 400
trigger11 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 420
trigger12 = stateno = 11001 || stateno = 220 || stateno = 240 || stateno = 202
trigger13 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 245
trigger14 = stateno = 430 || stateno = 200 || stateno = 450 || stateno = 236
trigger15 = stateno = 230 || stateno = 212 || stateno = 235 || stateno = 2710
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
var(33) = 34

[State -4, 1]
type = changestate
triggerall = var(33) = 1
triggerall = animtime = 0 && movetype != H && numprojID(7000) = 0
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 510
trigger3 = stateno = 515 || stateno = 4006 || stateno = 511 || stateno = 2700
trigger4 = stateno = 4002 || stateno = 4003 || stateno = 5120 || stateno = 1997
trigger5 = stateno = 1305 || stateno = 2019 || stateno = 2512 || stateno = 2404
trigger6 = stateno = 1304 || stateno = 1299 || stateno = 1300 || stateno = 1301
trigger7 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 3002
trigger8 = stateno = 8300 || stateno = 11001 || stateno = 220 || stateno = 2710
trigger9 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 1405
trigger10 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 1505
trigger11 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 9004
trigger12 = stateno = 430 || stateno = 200 || stateno = 11000 || stateno = 400
trigger13 = stateno = 420 || stateno = 450 || stateno = 230 || stateno = 212 
trigger14 = stateno = 240 || stateno = 202 || stateno = 245 || stateno = 106
trigger15 = stateno = 235 || stateno = 236 || stateno = 215 || stateno = 216
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
value = 1000

[State -4, 1]    
type = changestate
triggerall = var(33) = 2
triggerall = animtime = 0 && movetype != H && numprojID(7000) = 0
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 510
trigger3 = stateno = 515 || stateno = 4006 || stateno = 511 || stateno = 2700
trigger4 = stateno = 4002 || stateno = 4003 || stateno = 5120 || stateno = 1997
trigger5 = stateno = 1305 || stateno = 2019 || stateno = 2512 || stateno = 2404
trigger6 = stateno = 1304 || stateno = 1299 || stateno = 1300 || stateno = 1301
trigger7 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 3002
trigger8 = stateno = 8300 || stateno = 11001 || stateno = 220 || stateno = 2710
trigger9 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 1405
trigger10 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 1505
trigger11 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 9004
trigger12 = stateno = 430 || stateno = 200 || stateno = 11000 || stateno = 400
trigger13 = stateno = 420 || stateno = 450 || stateno = 230 || stateno = 212 
trigger14 = stateno = 240 || stateno = 202 || stateno = 245 || stateno = 106
trigger15 = stateno = 235 || stateno = 236 || stateno = 215 || stateno = 216
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
value = 1020

[State -4, 1]    
type = changestate
triggerall = var(33) = 3
triggerall = animtime = 0 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 510
trigger3 = stateno = 515 || stateno = 4006 || stateno = 511 || stateno = 2700
trigger4 = stateno = 4002 || stateno = 4003 || stateno = 5120 || stateno = 1997
trigger5 = stateno = 1305 || stateno = 2019 || stateno = 2512 || stateno = 2404
trigger6 = stateno = 1304 || stateno = 1299 || stateno = 1300 || stateno = 1301
trigger7 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 3002
trigger8 = stateno = 8300 || stateno = 11001 || stateno = 220 || stateno = 2710
trigger9 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 1405
trigger10 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 1505
trigger11 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 9004
trigger12 = stateno = 430 || stateno = 200 || stateno = 11000 || stateno = 400
trigger13 = stateno = 420 || stateno = 450 || stateno = 230 || stateno = 212 
trigger14 = stateno = 240 || stateno = 202 || stateno = 245 || stateno = 106
trigger15 = stateno = 235 || stateno = 236 || stateno = 215 || stateno = 216
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
value = 1030

[State -4, 1]    
type = changestate
triggerall = var(33) = 4
triggerall = animtime = 0 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 510
trigger3 = stateno = 515 || stateno = 4006 || stateno = 511 || stateno = 2700
trigger4 = stateno = 4002 || stateno = 4003 || stateno = 5120 || stateno = 1997
trigger5 = stateno = 1305 || stateno = 2019 || stateno = 2512 || stateno = 2404
trigger6 = stateno = 1304 || stateno = 1299 || stateno = 1300 || stateno = 1301
trigger7 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 3002
trigger8 = stateno = 8300 || stateno = 11001 || stateno = 220 || stateno = 2710
trigger9 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 1405
trigger10 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 1505
trigger11 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 9004
trigger12 = stateno = 430 || stateno = 200 || stateno = 11000 || stateno = 400
trigger13 = stateno = 420 || stateno = 450 || stateno = 230 || stateno = 212 
trigger14 = stateno = 240 || stateno = 202 || stateno = 245 || stateno = 106
trigger15 = stateno = 235 || stateno = 236 || stateno = 215 || stateno = 216
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
value = 1040

[State -4, 1]    
type = changestate
triggerall = var(33) = 5 && var(3) < 1
triggerall = animtime = 0 && movetype != H
triggerall = power >= 500 + var(20)*100
triggerall = var(16) < 1 && var(14) < 1
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 510
trigger3 = stateno = 515 || stateno = 4006 || stateno = 511 || stateno = 2700
trigger4 = stateno = 4002 || stateno = 4003 || stateno = 5120 || stateno = 1997
trigger5 = stateno = 1305 || stateno = 2019 || stateno = 2512 || stateno = 2404
trigger6 = stateno = 1304 || stateno = 1299 || stateno = 1300 || stateno = 1301
trigger7 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 3002
trigger8 = stateno = 8300 || stateno = 11001 || stateno = 220 || stateno = 2710
trigger9 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 1405
trigger10 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 1505
trigger11 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 9004
trigger12 = stateno = 430 || stateno = 200 || stateno = 11000 || stateno = 400
trigger13 = stateno = 420 || stateno = 450 || stateno = 230 || stateno = 212 
trigger14 = stateno = 240 || stateno = 202 || stateno = 245 || stateno = 106
trigger15 = stateno = 235 || stateno = 236 || stateno = 215 || stateno = 216
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
value = 1050

[State -4, 1]    
type = changestate
triggerall = var(33) = 6
triggerall = animtime = 0 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 510
trigger3 = stateno = 515 || stateno = 4006 || stateno = 511 || stateno = 2700
trigger4 = stateno = 4002 || stateno = 4003 || stateno = 5120 || stateno = 1997
trigger5 = stateno = 1305 || stateno = 2019 || stateno = 2512 || stateno = 2404
trigger6 = stateno = 1304 || stateno = 1299 || stateno = 1300 || stateno = 1301
trigger7 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 3002
trigger8 = stateno = 8300 || stateno = 11001 || stateno = 220 || stateno = 2710
trigger9 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 1405
trigger10 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 1505
trigger11 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 9004
trigger12 = stateno = 430 || stateno = 200 || stateno = 11000 || stateno = 400
trigger13 = stateno = 420 || stateno = 450 || stateno = 230 || stateno = 212 
trigger14 = stateno = 240 || stateno = 202 || stateno = 245 || stateno = 106
trigger15 = stateno = 235 || stateno = 236 || stateno = 215 || stateno = 216
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
value = 510

[State -4, 1]    
type = changestate
triggerall = var(33) = 7
triggerall = animtime = 0 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 510
trigger3 = stateno = 515 || stateno = 4006 || stateno = 511 || stateno = 2700
trigger4 = stateno = 4002 || stateno = 4003 || stateno = 5120 || stateno = 1997
trigger5 = stateno = 1305 || stateno = 2019 || stateno = 2512 || stateno = 2404
trigger6 = stateno = 1304 || stateno = 1299 || stateno = 1300 || stateno = 1301
trigger7 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 3002
trigger8 = stateno = 8300 || stateno = 11001 || stateno = 220 || stateno = 2710
trigger9 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 1405
trigger10 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 1505
trigger11 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 9004
trigger12 = stateno = 430 || stateno = 200 || stateno = 11000 || stateno = 400
trigger13 = stateno = 420 || stateno = 450 || stateno = 230 || stateno = 212 
trigger14 = stateno = 240 || stateno = 202 || stateno = 245 || stateno = 106
trigger15 = stateno = 235 || stateno = 236 || stateno = 215 || stateno = 216
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
value = 520

[State -4, 1]    
type = changestate
triggerall = var(33) = 8
triggerall = animtime = 0 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 510
trigger3 = stateno = 515 || stateno = 4006 || stateno = 511 || stateno = 2700
trigger4 = stateno = 4002 || stateno = 4003 || stateno = 5120 || stateno = 1997
trigger5 = stateno = 1305 || stateno = 2019 || stateno = 2512 || stateno = 2404
trigger6 = stateno = 1304 || stateno = 1299 || stateno = 1300 || stateno = 1301
trigger7 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 3002
trigger8 = stateno = 8300 || stateno = 11001 || stateno = 220 || stateno = 2710
trigger9 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 1405
trigger10 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 1505
trigger11 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 9004
trigger12 = stateno = 430 || stateno = 200 || stateno = 11000 || stateno = 400
trigger13 = stateno = 420 || stateno = 450 || stateno = 230 || stateno = 212 
trigger14 = stateno = 240 || stateno = 202 || stateno = 245 || stateno = 106
trigger15 = stateno = 235 || stateno = 236 || stateno = 215 || stateno = 216
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
value = 3000

[State -4, 1]    
type = changestate
triggerall = var(33) = 9
triggerall = animtime = 0 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 510
trigger3 = stateno = 515 || stateno = 4006 || stateno = 511 || stateno = 2700
trigger4 = stateno = 4002 || stateno = 4003 || stateno = 5120 || stateno = 1997
trigger5 = stateno = 1305 || stateno = 2019 || stateno = 2512 || stateno = 2404
trigger6 = stateno = 1304 || stateno = 1299 || stateno = 1300 || stateno = 1301
trigger7 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 3002
trigger8 = stateno = 8300 || stateno = 11001 || stateno = 220 || stateno = 2710
trigger9 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 1405
trigger10 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 1505
trigger11 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 9004
trigger12 = stateno = 430 || stateno = 200 || stateno = 11000 || stateno = 400
trigger13 = stateno = 420 || stateno = 450 || stateno = 230 || stateno = 212 
trigger14 = stateno = 240 || stateno = 202 || stateno = 245 || stateno = 106
trigger15 = stateno = 235 || stateno = 236 || stateno = 215 || stateno = 216
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
value = 3200

[State -4, 1]    
type = changestate
triggerall = var(33) = 10
triggerall = animtime = 0 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 510
trigger3 = stateno = 515 || stateno = 4006 || stateno = 511 || stateno = 2700
trigger4 = stateno = 4002 || stateno = 4003 || stateno = 5120 || stateno = 1997
trigger5 = stateno = 1305 || stateno = 2019 || stateno = 2512 || stateno = 2404
trigger6 = stateno = 1304 || stateno = 1299 || stateno = 1300 || stateno = 1301
trigger7 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 3002
trigger8 = stateno = 8300 || stateno = 11001 || stateno = 220 || stateno = 2710
trigger9 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 1405
trigger10 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 1505
trigger11 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 9004
trigger12 = stateno = 430 || stateno = 200 || stateno = 11000 || stateno = 400
trigger13 = stateno = 420 || stateno = 450 || stateno = 230 || stateno = 212 
trigger14 = stateno = 240 || stateno = 202 || stateno = 245 || stateno = 106
trigger15 = stateno = 235 || stateno = 236 || stateno = 215 || stateno = 216
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
value = 299

[State -4, 1]    
type = changestate
triggerall = var(33) = 11
triggerall = animtime = 0 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 510
trigger3 = stateno = 515 || stateno = 4006 || stateno = 511 || stateno = 2700
trigger4 = stateno = 4002 || stateno = 4003 || stateno = 5120 || stateno = 1997
trigger5 = stateno = 1305 || stateno = 2019 || stateno = 2512 || stateno = 2404
trigger6 = stateno = 1304 || stateno = 1299 || stateno = 1300 || stateno = 1301
trigger7 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 3002
trigger8 = stateno = 8300 || stateno = 11001 || stateno = 220 || stateno = 2710
trigger9 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 1405
trigger10 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 1505
trigger11 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 9004
trigger12 = stateno = 430 || stateno = 200 || stateno = 11000 || stateno = 400
trigger13 = stateno = 420 || stateno = 450 || stateno = 230 || stateno = 212 
trigger14 = stateno = 240 || stateno = 202 || stateno = 245 || stateno = 106
trigger15 = stateno = 235 || stateno = 236 || stateno = 215 || stateno = 216
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
value = 305

[State -4, 1]    
type = changestate
triggerall = var(33) = 30
triggerall = animtime = 0 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 510
trigger3 = stateno = 515 || stateno = 4006 || stateno = 511 || stateno = 2700
trigger4 = stateno = 4002 || stateno = 4003 || stateno = 5120 || stateno = 1997
trigger5 = stateno = 1305 || stateno = 2019 || stateno = 2512 || stateno = 2404
trigger6 = stateno = 1304 || stateno = 1299 || stateno = 1300 || stateno = 1301
trigger7 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 3002
trigger8 = stateno = 8300 || stateno = 11001 || stateno = 220 || stateno = 2710
trigger9 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 1405
trigger10 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 1505
trigger11 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 9004
trigger12 = stateno = 430 || stateno = 200 || stateno = 11000 || stateno = 400
trigger13 = stateno = 420 || stateno = 450 || stateno = 230 || stateno = 212 
trigger14 = stateno = 240 || stateno = 202 || stateno = 245 || stateno = 106
trigger15 = stateno = 235 || stateno = 236 || stateno = 215 || stateno = 216
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
value = 4400

[State -4, 1]    
type = changestate
triggerall = var(33) = 31
triggerall = animtime = 0 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 510
trigger3 = stateno = 515 || stateno = 4006 || stateno = 511 || stateno = 2700
trigger4 = stateno = 4002 || stateno = 4003 || stateno = 5120 || stateno = 1997
trigger5 = stateno = 1305 || stateno = 2019 || stateno = 2512 || stateno = 2404
trigger6 = stateno = 1304 || stateno = 1299 || stateno = 1300 || stateno = 1301
trigger7 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 3002
trigger8 = stateno = 8300 || stateno = 11001 || stateno = 220 || stateno = 2710
trigger9 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 1405
trigger10 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 1505
trigger11 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 9004
trigger12 = stateno = 430 || stateno = 200 || stateno = 11000 || stateno = 400
trigger13 = stateno = 420 || stateno = 450 || stateno = 230 || stateno = 212 
trigger14 = stateno = 240 || stateno = 202 || stateno = 245 || stateno = 106
trigger15 = stateno = 235 || stateno = 236 || stateno = 215 || stateno = 216
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
value = 4733

[State -4, 1]    
type = changestate
triggerall = var(33) = 12 || var(33) = 30
triggerall = animtime = 0 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 510
trigger3 = stateno = 515 || stateno = 4006 || stateno = 511 || stateno = 2700
trigger4 = stateno = 4002 || stateno = 4003 || stateno = 5120 || stateno = 1997
trigger5 = stateno = 1305 || stateno = 2019 || stateno = 2512 || stateno = 2404
trigger6 = stateno = 1304 || stateno = 1299 || stateno = 1300 || stateno = 1301
trigger7 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 3002
trigger8 = stateno = 8300 || stateno = 11001 || stateno = 220 || stateno = 2710
trigger9 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 1405
trigger10 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 1505
trigger11 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 9004
trigger12 = stateno = 430 || stateno = 200 || stateno = 11000 || stateno = 400
trigger13 = stateno = 420 || stateno = 450 || stateno = 230 || stateno = 212 
trigger14 = stateno = 240 || stateno = 202 || stateno = 245 || stateno = 106
trigger15 = stateno = 235 || stateno = 236 || stateno = 215 || stateno = 216
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
value = 4000

[State -4, 1]    
type = changestate
triggerall = var(33) = 13 || var(33) = 31
triggerall = animtime = 0 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 510
trigger3 = stateno = 515 || stateno = 4006 || stateno = 511 || stateno = 2700
trigger4 = stateno = 4002 || stateno = 4003 || stateno = 5120 || stateno = 1997
trigger5 = stateno = 1305 || stateno = 2019 || stateno = 2512 || stateno = 2404
trigger6 = stateno = 1304 || stateno = 1299 || stateno = 1300 || stateno = 1301
trigger7 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 3002
trigger8 = stateno = 8300 || stateno = 11001 || stateno = 220 || stateno = 2710
trigger9 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 1405
trigger10 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 1505
trigger11 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 9004
trigger12 = stateno = 430 || stateno = 200 || stateno = 11000 || stateno = 400
trigger13 = stateno = 420 || stateno = 450 || stateno = 230 || stateno = 212 
trigger14 = stateno = 240 || stateno = 202 || stateno = 245 || stateno = 106
trigger15 = stateno = 235 || stateno = 236 || stateno = 215 || stateno = 216
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
value = 4333

[State -4, 1]    
type = changestate
triggerall = var(33) = 14 || var(33) = 15
triggerall = animtime = 0 && movetype != H && var(14) > 0
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 510
trigger3 = stateno = 515 || stateno = 4006 || stateno = 511 || stateno = 2700
trigger4 = stateno = 4002 || stateno = 4003 || stateno = 5120 || stateno = 1997
trigger5 = stateno = 1305 || stateno = 2019 || stateno = 2512 || stateno = 2404
trigger6 = stateno = 1304 || stateno = 1299 || stateno = 1300 || stateno = 1301
trigger7 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 3002
trigger8 = stateno = 8300 || stateno = 11001 || stateno = 220 || stateno = 2710
trigger9 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 1405
trigger10 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 1505
trigger11 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 9004
trigger12 = stateno = 430 || stateno = 200 || stateno = 11000 || stateno = 400
trigger13 = stateno = 420 || stateno = 450 || stateno = 230 || stateno = 212 
trigger14 = stateno = 240 || stateno = 202 || stateno = 245 || stateno = 106
trigger15 = stateno = 235 || stateno = 236 || stateno = 215 || stateno = 216
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
value = 1999

[State -4, 1]    
type = changestate
triggerall = var(33) = 14 || (var(33) = 15 && var(3) > 0)
triggerall = power >= 1000 + var(20)*100 || var(3) > 0
triggerall = animtime = 0 && movetype != H && var(14) < 1 && var(16) < 1
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 510
trigger3 = stateno = 515 || stateno = 4006 || stateno = 511 || stateno = 2700
trigger4 = stateno = 4002 || stateno = 4003 || stateno = 5120 || stateno = 1997
trigger5 = stateno = 1305 || stateno = 2019 || stateno = 2512 || stateno = 2404
trigger6 = stateno = 1304 || stateno = 1299 || stateno = 1300 || stateno = 1301
trigger7 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 3002
trigger8 = stateno = 8300 || stateno = 11001 || stateno = 220 || stateno = 2710
trigger9 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 1405
trigger10 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 1505
trigger11 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 9004
trigger12 = stateno = 430 || stateno = 200 || stateno = 11000 || stateno = 400
trigger13 = stateno = 420 || stateno = 450 || stateno = 230 || stateno = 212 
trigger14 = stateno = 240 || stateno = 202 || stateno = 245 || stateno = 106
trigger15 = stateno = 235 || stateno = 236 || stateno = 215 || stateno = 216
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
value = 2000

[State -4, 1]    
type = changestate
triggerall = var(33) = 15 
triggerall = power >= 2000 + var(20)*100
triggerall = animtime = 0 && movetype != H && var(14) < 1 && var(16) < 1 && var(3) < 1
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 510
trigger3 = stateno = 515 || stateno = 4006 || stateno = 511 || stateno = 2700
trigger4 = stateno = 4002 || stateno = 4003 || stateno = 5120 || stateno = 1997
trigger5 = stateno = 1305 || stateno = 2019 || stateno = 2512 || stateno = 2404
trigger6 = stateno = 1304 || stateno = 1299 || stateno = 1300 || stateno = 1301
trigger7 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 3002
trigger8 = stateno = 8300 || stateno = 11001 || stateno = 220 || stateno = 2710
trigger9 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 1405
trigger10 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 1505
trigger11 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 9004
trigger12 = stateno = 430 || stateno = 200 || stateno = 11000 || stateno = 400
trigger13 = stateno = 420 || stateno = 450 || stateno = 230 || stateno = 212 
trigger14 = stateno = 240 || stateno = 202 || stateno = 245 || stateno = 106
trigger15 = stateno = 235 || stateno = 236 || stateno = 215 || stateno = 216
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
value = 2500

[State -4, 1]    
type = changestate
triggerall = var(33) = 16 
triggerall = (power >= 3000 + var(20)*100 && var(3) < 1) || (power >= 1000 + var(20)*100 && var(3) > 0)
triggerall = animtime = 0 && movetype != H && var(14) < 1 && var(16) < 1
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 510
trigger3 = stateno = 515 || stateno = 4006 || stateno = 511 || stateno = 2700
trigger4 = stateno = 4002 || stateno = 4003 || stateno = 5120 || stateno = 1997
trigger5 = stateno = 1305 || stateno = 2019 || stateno = 2512 || stateno = 2404
trigger6 = stateno = 1304 || stateno = 1299 || stateno = 1300 || stateno = 1301
trigger7 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 3002
trigger8 = stateno = 8300 || stateno = 11001 || stateno = 220 || stateno = 2710
trigger9 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 1405
trigger10 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 1505
trigger11 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 9004
trigger12 = stateno = 430 || stateno = 200 || stateno = 11000 || stateno = 400
trigger13 = stateno = 420 || stateno = 450 || stateno = 230 || stateno = 212 
trigger14 = stateno = 240 || stateno = 202 || stateno = 245 || stateno = 106
trigger15 = stateno = 235 || stateno = 236 || stateno = 215 || stateno = 216
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
value = 2400

[State -4, 1]    
type = changestate
triggerall = var(33) = 17 || var(33) = 18
triggerall = animtime = 0 && movetype != H && var(14) > 0
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 510
trigger3 = stateno = 515 || stateno = 4006 || stateno = 511 || stateno = 2700
trigger4 = stateno = 4002 || stateno = 4003 || stateno = 5120 || stateno = 1997
trigger5 = stateno = 1305 || stateno = 2019 || stateno = 2512 || stateno = 2404
trigger6 = stateno = 1304 || stateno = 1299 || stateno = 1300 || stateno = 1301
trigger7 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 3002
trigger8 = stateno = 8300 || stateno = 11001 || stateno = 220 || stateno = 2710
trigger9 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 1405
trigger10 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 1505
trigger11 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 9004
trigger12 = stateno = 430 || stateno = 200 || stateno = 11000 || stateno = 400
trigger13 = stateno = 420 || stateno = 450 || stateno = 230 || stateno = 212 
trigger14 = stateno = 240 || stateno = 202 || stateno = 245 || stateno = 106
trigger15 = stateno = 235 || stateno = 236 || stateno = 215 || stateno = 216
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
value = 7599

[State -4, 1]    
type = changestate
triggerall = var(33) = 17 || (var(33) = 18 && var(3) > 0)
triggerall = power >= 1000 + var(20)*100 || var(3) > 0
triggerall = animtime = 0 && movetype != H && var(14) < 1 && var(16) < 1
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 510
trigger3 = stateno = 515 || stateno = 4006 || stateno = 511 || stateno = 2700
trigger4 = stateno = 4002 || stateno = 4003 || stateno = 5120 || stateno = 1997
trigger5 = stateno = 1305 || stateno = 2019 || stateno = 2512 || stateno = 2404
trigger6 = stateno = 1304 || stateno = 1299 || stateno = 1300 || stateno = 1301
trigger7 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 3002
trigger8 = stateno = 8300 || stateno = 11001 || stateno = 220 || stateno = 2710
trigger9 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 1405
trigger10 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 1505
trigger11 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 9004
trigger12 = stateno = 430 || stateno = 200 || stateno = 11000 || stateno = 400
trigger13 = stateno = 420 || stateno = 450 || stateno = 230 || stateno = 212 
trigger14 = stateno = 240 || stateno = 202 || stateno = 245 || stateno = 106
trigger15 = stateno = 235 || stateno = 236 || stateno = 215 || stateno = 216
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
value = 7600

[State -4, 1]    
type = changestate
triggerall = var(33) = 18 
triggerall = power >= 2000 + var(20)*100
triggerall = animtime = 0 && movetype != H && var(14) < 1 && var(16) < 1 && var(3) < 1
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 510
trigger3 = stateno = 515 || stateno = 4006 || stateno = 511 || stateno = 2700
trigger4 = stateno = 4002 || stateno = 4003 || stateno = 5120 || stateno = 1997
trigger5 = stateno = 1305 || stateno = 2019 || stateno = 2512 || stateno = 2404
trigger6 = stateno = 1304 || stateno = 1299 || stateno = 1300 || stateno = 1301
trigger7 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 3002
trigger8 = stateno = 8300 || stateno = 11001 || stateno = 220 || stateno = 2710
trigger9 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 1405
trigger10 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 1505
trigger11 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 9004
trigger12 = stateno = 430 || stateno = 200 || stateno = 11000 || stateno = 400
trigger13 = stateno = 420 || stateno = 450 || stateno = 230 || stateno = 212 
trigger14 = stateno = 240 || stateno = 202 || stateno = 245 || stateno = 106
trigger15 = stateno = 235 || stateno = 236 || stateno = 215 || stateno = 216
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
value = 7700

[State -4, 1]    
type = changestate
triggerall = var(33) = 20 || var(33) = 21
triggerall = animtime = 0 && movetype != H && var(14) > 0
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 510
trigger3 = stateno = 515 || stateno = 4006 || stateno = 511 || stateno = 2700
trigger4 = stateno = 4002 || stateno = 4003 || stateno = 5120 || stateno = 1997
trigger5 = stateno = 1305 || stateno = 2019 || stateno = 2512 || stateno = 2404
trigger6 = stateno = 1304 || stateno = 1299 || stateno = 1300 || stateno = 1301
trigger7 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 3002
trigger8 = stateno = 8300 || stateno = 11001 || stateno = 220 || stateno = 2710
trigger9 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 1405
trigger10 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 1505
trigger11 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 9004
trigger12 = stateno = 430 || stateno = 200 || stateno = 11000 || stateno = 400
trigger13 = stateno = 420 || stateno = 450 || stateno = 230 || stateno = 212 
trigger14 = stateno = 240 || stateno = 202 || stateno = 245 || stateno = 106
trigger15 = stateno = 235 || stateno = 236 || stateno = 215 || stateno = 216
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
value = 6999

[State -4, 1]    
type = changestate
triggerall = var(33) = 20 || (var(33) = 21 && var(3) > 0)
triggerall = power >= 1000 + var(20)*100 || var(3) > 0
triggerall = animtime = 0 && movetype != H && var(14) < 1 && var(16) < 1
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 510
trigger3 = stateno = 515 || stateno = 4006 || stateno = 511 || stateno = 2700
trigger4 = stateno = 4002 || stateno = 4003 || stateno = 5120 || stateno = 1997
trigger5 = stateno = 1305 || stateno = 2019 || stateno = 2512 || stateno = 2404
trigger6 = stateno = 1304 || stateno = 1299 || stateno = 1300 || stateno = 1301
trigger7 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 3002
trigger8 = stateno = 8300 || stateno = 11001 || stateno = 220 || stateno = 2710
trigger9 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 1405
trigger10 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 1505
trigger11 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 9004
trigger12 = stateno = 430 || stateno = 200 || stateno = 11000 || stateno = 400
trigger13 = stateno = 420 || stateno = 450 || stateno = 230 || stateno = 212 
trigger14 = stateno = 240 || stateno = 202 || stateno = 245 || stateno = 106
trigger15 = stateno = 235 || stateno = 236 || stateno = 215 || stateno = 216
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
value = 7000

[State -4, 1]    
type = changestate
triggerall = var(33) = 21 
triggerall = power >= 2000 + var(20)*100
triggerall = animtime = 0 && movetype != H && var(14) < 1 && var(16) < 1 && var(3) < 1
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 510
trigger3 = stateno = 515 || stateno = 4006 || stateno = 511 || stateno = 2700
trigger4 = stateno = 4002 || stateno = 4003 || stateno = 5120 || stateno = 1997
trigger5 = stateno = 1305 || stateno = 2019 || stateno = 2512 || stateno = 2404
trigger6 = stateno = 1304 || stateno = 1299 || stateno = 1300 || stateno = 1301
trigger7 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 3002
trigger8 = stateno = 8300 || stateno = 11001 || stateno = 220 || stateno = 2710
trigger9 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 1405
trigger10 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 1505
trigger11 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 9004
trigger12 = stateno = 430 || stateno = 200 || stateno = 11000 || stateno = 400
trigger13 = stateno = 420 || stateno = 450 || stateno = 230 || stateno = 212 
trigger14 = stateno = 240 || stateno = 202 || stateno = 245 || stateno = 106
trigger15 = stateno = 235 || stateno = 236 || stateno = 215 || stateno = 216
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
value = 7011

[State -4, 1]    
type = changestate
triggerall = var(33) = 22 
triggerall = power >= 3000 + var(20)*100
triggerall = animtime = 0 && movetype != H && var(14) < 1 && var(16) < 1 && var(3) < 1
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 510
trigger3 = stateno = 515 || stateno = 4006 || stateno = 511 || stateno = 2700
trigger4 = stateno = 4002 || stateno = 4003 || stateno = 5120 || stateno = 1997
trigger5 = stateno = 1305 || stateno = 2019 || stateno = 2512 || stateno = 2404
trigger6 = stateno = 1304 || stateno = 1299 || stateno = 1300 || stateno = 1301
trigger7 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 3002
trigger8 = stateno = 8300 || stateno = 11001 || stateno = 220 || stateno = 2710
trigger9 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 1405
trigger10 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 1505
trigger11 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 9004
trigger12 = stateno = 430 || stateno = 200 || stateno = 11000 || stateno = 400
trigger13 = stateno = 420 || stateno = 450 || stateno = 230 || stateno = 212 
trigger14 = stateno = 240 || stateno = 202 || stateno = 245 || stateno = 106
trigger15 = stateno = 235 || stateno = 236 || stateno = 215 || stateno = 216
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
value = 7021

[State -4, 1]    
type = changestate
triggerall = var(33) = 23 && command != "hold_y"
triggerall = power >= 1000 + var(20)*100 && var(14) < 1 && var(16) < 1
triggerall = animtime = 0 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 510
trigger3 = stateno = 515 || stateno = 4006 || stateno = 511 || stateno = 2700
trigger4 = stateno = 4002 || stateno = 4003 || stateno = 5120 || stateno = 1997
trigger5 = stateno = 1305 || stateno = 2019 || stateno = 2512 || stateno = 2404
trigger6 = stateno = 1304 || stateno = 1299 || stateno = 1300 || stateno = 1301
trigger7 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 3002
trigger8 = stateno = 8300 || stateno = 11001 || stateno = 220 || stateno = 2710
trigger9 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 1405
trigger10 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 1505
trigger11 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 9004
trigger12 = stateno = 430 || stateno = 200 || stateno = 11000 || stateno = 400
trigger13 = stateno = 420 || stateno = 450 || stateno = 230 || stateno = 212 
trigger14 = stateno = 240 || stateno = 202 || stateno = 245 || stateno = 106
trigger15 = stateno = 235 || stateno = 236 || stateno = 215 || stateno = 216
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
value = 2600

[State -4, 1]    
type = changestate
triggerall = var(33) = 24 && command != "hold_x"
triggerall = power >= 1000 + var(20)*100 && var(14) < 1 && var(16) < 1
triggerall = animtime = 0 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 510
trigger3 = stateno = 515 || stateno = 4006 || stateno = 511 || stateno = 2700
trigger4 = stateno = 4002 || stateno = 4003 || stateno = 5120 || stateno = 1997
trigger5 = stateno = 1305 || stateno = 2019 || stateno = 2512 || stateno = 2404
trigger6 = stateno = 1304 || stateno = 1299 || stateno = 1300 || stateno = 1301
trigger7 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 3002
trigger8 = stateno = 8300 || stateno = 11001 || stateno = 220 || stateno = 2710
trigger9 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 1405
trigger10 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 1505
trigger11 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 9004
trigger12 = stateno = 430 || stateno = 200 || stateno = 11000 || stateno = 400
trigger13 = stateno = 420 || stateno = 450 || stateno = 230 || stateno = 212 
trigger14 = stateno = 240 || stateno = 202 || stateno = 245 || stateno = 106
trigger15 = stateno = 235 || stateno = 236 || stateno = 215 || stateno = 216
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
value = 2610

[State -4, 1]    
type = changestate
triggerall = var(33) = 23
triggerall = var(14) > 0
triggerall = animtime = 0 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 510
trigger3 = stateno = 515 || stateno = 4006 || stateno = 511 || stateno = 2700
trigger4 = stateno = 4002 || stateno = 4003 || stateno = 5120 || stateno = 1997
trigger5 = stateno = 1305 || stateno = 2019 || stateno = 2512 || stateno = 2404
trigger6 = stateno = 1304 || stateno = 1299 || stateno = 1300 || stateno = 1301
trigger7 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 3002
trigger8 = stateno = 8300 || stateno = 11001 || stateno = 220 || stateno = 2710
trigger9 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 1405
trigger10 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 1505
trigger11 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 9004
trigger12 = stateno = 430 || stateno = 200 || stateno = 11000 || stateno = 400
trigger13 = stateno = 420 || stateno = 450 || stateno = 230 || stateno = 212 
trigger14 = stateno = 240 || stateno = 202 || stateno = 245 || stateno = 106
trigger15 = stateno = 235 || stateno = 236 || stateno = 215 || stateno = 216
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
value = 2599

[State -4, 1]    
type = changestate
triggerall = var(33) = 24
triggerall = var(14) > 0
triggerall = animtime = 0 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 510
trigger3 = stateno = 515 || stateno = 4006 || stateno = 511 || stateno = 2700
trigger4 = stateno = 4002 || stateno = 4003 || stateno = 5120 || stateno = 1997
trigger5 = stateno = 1305 || stateno = 2019 || stateno = 2512 || stateno = 2404
trigger6 = stateno = 1304 || stateno = 1299 || stateno = 1300 || stateno = 1301
trigger7 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 3002
trigger8 = stateno = 8300 || stateno = 11001 || stateno = 220 || stateno = 2710
trigger9 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 1405
trigger10 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 1505
trigger11 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 9004
trigger12 = stateno = 430 || stateno = 200 || stateno = 11000 || stateno = 400
trigger13 = stateno = 420 || stateno = 450 || stateno = 230 || stateno = 212 
trigger14 = stateno = 240 || stateno = 202 || stateno = 245 || stateno = 106
trigger15 = stateno = 235 || stateno = 236 || stateno = 215 || stateno = 216
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
value = 2609

[State -4, 1]    
type = changestate
triggerall = var(33) = 25 
triggerall = numhelper(8301) < 1
triggerall = var(56) > 0
triggerall = animtime = 0 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 510
trigger3 = stateno = 515 || stateno = 4006 || stateno = 511 || stateno = 2700
trigger4 = stateno = 4002 || stateno = 4003 || stateno = 5120 || stateno = 1997
trigger5 = stateno = 1305 || stateno = 2019 || stateno = 2512 || stateno = 2404
trigger6 = stateno = 1304 || stateno = 1299 || stateno = 1300 || stateno = 1301
trigger7 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 3002
trigger8 = stateno = 8300 || stateno = 11001 || stateno = 220 || stateno = 2710
trigger9 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 1405
trigger10 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 1505
trigger11 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 9004
trigger12 = stateno = 430 || stateno = 200 || stateno = 11000 || stateno = 400
trigger13 = stateno = 420 || stateno = 450 || stateno = 230 || stateno = 212 
trigger14 = stateno = 240 || stateno = 202 || stateno = 245 || stateno = 106
trigger15 = stateno = 235 || stateno = 236 || stateno = 215 || stateno = 216
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
value = 8300

[State -4, 1]
type = changestate
triggerall = var(33) = 26 
triggerall = animtime = 0 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 510
trigger3 = stateno = 515 || stateno = 4006 || stateno = 511 || stateno = 2700
trigger4 = stateno = 4002 || stateno = 4003 || stateno = 5120 || stateno = 1997
trigger5 = stateno = 1305 || stateno = 2019 || stateno = 2512 || stateno = 2404
trigger6 = stateno = 1304 || stateno = 1299 || stateno = 1300 || stateno = 1301
trigger7 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 3002
trigger8 = stateno = 8300 || stateno = 11001 || stateno = 220 || stateno = 2710
trigger9 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 1405
trigger10 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 1505
trigger11 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 9004
trigger12 = stateno = 430 || stateno = 200 || stateno = 11000 || stateno = 400
trigger13 = stateno = 420 || stateno = 450 || stateno = 230 || stateno = 212 
trigger14 = stateno = 240 || stateno = 202 || stateno = 245 || stateno = 106
trigger15 = stateno = 235 || stateno = 236 || stateno = 215 || stateno = 216
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
value = 1301

[State -4, 1]
type = changestate
triggerall = var(33) = 27 
triggerall = animtime = 0 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 510
trigger3 = stateno = 515 || stateno = 4006 || stateno = 511 || stateno = 2700
trigger4 = stateno = 4002 || stateno = 4003 || stateno = 5120 || stateno = 1997
trigger5 = stateno = 1305 || stateno = 2019 || stateno = 2512 || stateno = 2404
trigger6 = stateno = 1304 || stateno = 1299 || stateno = 1300 || stateno = 1301
trigger7 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 3002
trigger8 = stateno = 8300 || stateno = 11001 || stateno = 220 || stateno = 2710
trigger9 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 1405
trigger10 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 1505
trigger11 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 9004
trigger12 = stateno = 430 || stateno = 200 || stateno = 11000 || stateno = 400
trigger13 = stateno = 420 || stateno = 450 || stateno = 230 || stateno = 212 
trigger14 = stateno = 240 || stateno = 202 || stateno = 245 || stateno = 106
trigger15 = stateno = 235 || stateno = 236 || stateno = 215 || stateno = 216
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
value = 1305

[State -4, 1]
type = changestate
triggerall = var(33) = 28 
triggerall = animtime = 0 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 510
trigger3 = stateno = 515 || stateno = 4006 || stateno = 511 || stateno = 2700
trigger4 = stateno = 4002 || stateno = 4003 || stateno = 5120 || stateno = 1997
trigger5 = stateno = 1305 || stateno = 2019 || stateno = 2512 || stateno = 2404
trigger6 = stateno = 1304 || stateno = 1299 || stateno = 1300 || stateno = 1301
trigger7 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 3002
trigger8 = stateno = 8300 || stateno = 11001 || stateno = 220 || stateno = 2710
trigger9 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 1405
trigger10 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 1505
trigger11 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 9004
trigger12 = stateno = 430 || stateno = 200 || stateno = 11000 || stateno = 400
trigger13 = stateno = 420 || stateno = 450 || stateno = 230 || stateno = 212 
trigger14 = stateno = 240 || stateno = 202 || stateno = 245 || stateno = 106
trigger15 = stateno = 235 || stateno = 236 || stateno = 215 || stateno = 216
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
value = 1300

[State -4, 1]
type = changestate
triggerall = var(33) = 29 
triggerall = animtime = 0 && movetype != H
triggerall = power >= 1500 + var(20)*100 && var(14) < 1
triggerall = var(16) < 1 && var(3) < 1
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 510
trigger3 = stateno = 515 || stateno = 4006 || stateno = 511 || stateno = 2700
trigger4 = stateno = 4002 || stateno = 4003 || stateno = 5120 || stateno = 1997
trigger5 = stateno = 1305 || stateno = 2019 || stateno = 2512 || stateno = 2404
trigger6 = stateno = 1304 || stateno = 1299 || stateno = 1300 || stateno = 1301
trigger7 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 3002
trigger8 = stateno = 8300 || stateno = 11001 || stateno = 220 || stateno = 2710
trigger9 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 1405
trigger10 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 1505
trigger11 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 9004
trigger12 = stateno = 430 || stateno = 200 || stateno = 11000 || stateno = 400
trigger13 = stateno = 420 || stateno = 450 || stateno = 230 || stateno = 212 
trigger14 = stateno = 240 || stateno = 202 || stateno = 245 || stateno = 106
trigger15 = stateno = 235 || stateno = 236 || stateno = 215 || stateno = 216
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
value = 1994

[State -4, 1]
type = changestate
triggerall = var(33) = 32 && life <= 250
triggerall = power >= 1000 + var(20)*100 && var(3) > 0
triggerall = animtime = 0 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 1997
trigger3 = stateno = 510 || stateno = 511 || stateno = 1305 || stateno = 2019
trigger4 = stateno = 515 || stateno = 105 || stateno = 4006 || stateno = 4003
trigger5 = stateno = 4002 || stateno = 215 || stateno = 216 || stateno = 5120
trigger6 = stateno = 2512 || stateno = 2404 || stateno = 1304 || stateno = 1299
trigger7 = stateno = 1300 || stateno = 1301 || stateno = 3002 || stateno = 1405
trigger8 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 1505
trigger9 = stateno = 8300 || stateno = 9004 || stateno = 11000 || stateno = 2700
trigger10 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 400
trigger11 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 420
trigger12 = stateno = 11001 || stateno = 220 || stateno = 240 || stateno = 202
trigger13 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 245
trigger14 = stateno = 430 || stateno = 200 || stateno = 450 || stateno = 236
trigger15 = stateno = 230 || stateno = 212 || stateno = 235 || stateno = 2710
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
value = 2219
                 
[State -4, 1]
type = changestate
triggerall = var(33) = 33
triggerall = var(55) = 0 && var(14) < 1 && var(16) < 1
triggerall = var(51) = 0 && life <= 500
triggerall = animtime = 0 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 1997
trigger3 = stateno = 510 || stateno = 511 || stateno = 1305 || stateno = 2019
trigger4 = stateno = 515 || stateno = 105 || stateno = 4006 || stateno = 4003
trigger5 = stateno = 4002 || stateno = 215 || stateno = 216 || stateno = 5120
trigger6 = stateno = 2512 || stateno = 2404 || stateno = 1304 || stateno = 1299
trigger7 = stateno = 1300 || stateno = 1301 || stateno = 3002 || stateno = 1405
trigger8 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 1505
trigger9 = stateno = 8300 || stateno = 9004 || stateno = 11000 || stateno = 2700
trigger10 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 400
trigger11 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 420
trigger12 = stateno = 11001 || stateno = 220 || stateno = 240 || stateno = 202
trigger13 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 245
trigger14 = stateno = 430 || stateno = 200 || stateno = 450 || stateno = 236
trigger15 = stateno = 230 || stateno = 212 || stateno = 235 || stateno = 2710
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
value = 3500

[State -4, 1]
type = changestate
triggerall = var(33) = 34
triggerall = var(55) = 0 && var(14) < 1 && var(16) < 1
triggerall = var(51) = 0 && life <= 500
triggerall = animtime = 0 && movetype != H
trigger1 = stateno = 1000 || stateno = 1020 || stateno = 1032 || stateno = 102
trigger2 = stateno = 520 || stateno = 516 || stateno = 4001 || stateno = 1997
trigger3 = stateno = 510 || stateno = 511 || stateno = 1305 || stateno = 2019
trigger4 = stateno = 515 || stateno = 105 || stateno = 4006 || stateno = 4003
trigger5 = stateno = 4002 || stateno = 215 || stateno = 216 || stateno = 5120
trigger6 = stateno = 2512 || stateno = 2404 || stateno = 1304 || stateno = 1299
trigger7 = stateno = 1300 || stateno = 1301 || stateno = 3002 || stateno = 1405
trigger8 = stateno = 104 || stateno = 251 || stateno = 301 || stateno = 1505
trigger9 = stateno = 8300 || stateno = 9004 || stateno = 11000 || stateno = 2700
trigger10 = stateno = 7601 || stateno = 7701 || stateno = 7801 || stateno = 400
trigger11 = stateno = 7002 || stateno = 7023 || stateno = 513 || stateno = 420
trigger12 = stateno = 11001 || stateno = 220 || stateno = 240 || stateno = 202
trigger13 = stateno = 250 || stateno = 225 || stateno = 3001 || stateno = 245
trigger14 = stateno = 430 || stateno = 200 || stateno = 450 || stateno = 236
trigger15 = stateno = 230 || stateno = 212 || stateno = 235 || stateno = 2710
trigger16 = stateno = 195 || stateno = 5201 || stateno = 4100 || stateno = 4111
trigger17 = stateno = 217 || stateno = 2020 || stateno = 2022 || stateno = 1996
trigger18 = stateno = 2004 || stateno = 1991 || stateno = 2219 || stateno = 2200
trigger19 = stateno = 218 || stateno = 3500 || stateno = 4502 || stateno = 4503
trigger20 = stateno = 4611 || stateno = 4600 || stateno = 3601 || stateno = 3610
trigger21 = stateno = 3510 || stateno = 1307
value = 3600
