;胜利姿势定义------------------------------------------------------------
[Statedef 180]
type = S
velset = 0

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

[State 180, 5]
type = ChangeState
trigger1 = !WinPerfect
trigger1 = Var(1) = 0
value = 181

[State 180, 5]
type = ChangeState
trigger1 = !WinPerfect
trigger1 = Var(1) = 1
value = 182

[State 180, 6]
type = ChangeState
trigger1 = !WinPerfect
trigger1 = Var(1) = 2
value = 183

[State 180, 6]
type = ChangeState
trigger1 = WinPerfect
value = 184

;胜利姿势1----------------------------------------------------------------
[Statedef 181]
type = S
ctrl = 0
anim = 181
velset = 0,0
sprpriority = 3

[State Hit Spark]
type = Explod
trigger1 = time = 70
id = 6003
anim = 6003
pos = 39,-96
mask=0
sprpriority = 7
ownpal = 1
facing = 1
ignorehitpause = 1
persistent = 0
postype = p1

[State 181, 1]
type = playsnd
trigger1 = Time = 0
value = 0,7

[State 181, 1]
type = playsnd
trigger1 = animelem = 6,=29
value = 0,8

[State 181, 1]
type = playsnd
trigger1 = time = 70
value = 3,2

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

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

;胜利姿势2----------------------------------------------------------------
[Statedef 182]
type = S
ctrl = 0
anim = 182
velset = 0,0
sprpriority = 3

[State 181, 1]
type = playsnd
trigger1 = animelem = 9,=0
value = 0,10

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

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

;胜利姿势3----------------------------------------------------------------
[Statedef 183]
type = S
ctrl = 0
anim = 183
velset = 0,0
sprpriority = 3

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

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

;胜利姿势4----------------------------------------------------------------
[Statedef 184]
type = S
ctrl = 0
anim = 184
velset = 0,0
sprpriority = 3

[State 183, 1]
type = playsnd
trigger1 = time = 20
value = 0,17

[State 183, 1]
type = playsnd
trigger1 = time = 0
value = 3,0

[State 183, 1]
type = playsnd
trigger1 = time = 0
value = 3,1

[State Hit Spark]
type = Explod
trigger1 = time = 20
anim = 6412
pos = 0,-60
sprpriority = 7
ownpal = 1
facing = 1
ignorehitpause = 1
persistent = 0
postype = p1

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

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

;----------------------------------------------------------------------------
;开场姿势1
;----------------------------------------------------------------------------

[Statedef 191]
type = S
ctrl = 0
;anim = 190
velset = 0,0

[State 191, 2]
type = ChangeState
trigger1 = Time = 0
trigger1 = random = [0,333]
value = 192

[State 191, 2]
type = ChangeState
trigger1 = Time = 0
trigger1 = random = [334,666]
value = 193

[State 191, 1]
type = ChangeAnim
trigger1 = RoundState = 0
value = 190

[State 191, 1]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State Hit Spark]
type = Explod
trigger1 = time = 150
id = 6000
anim = 6000
pos = 0,0
mask=0
sprpriority = 1
ownpal = 1
facing = 1
ignorehitpause = 1
persistent = 0
postype = p1

[State Hit Spark]
type = Explod
trigger1 = time > 160
trigger1 = numexplod(6000) = 0
id = 6001
anim = 6001
pos = 0,0
mask=0
sprpriority = 1
ownpal = 1
facing = 1
ignorehitpause = 1
persistent = 0
postype = p1

[State 191, 3] 
type = playsnd
trigger1 = time = 190
value = 3,0

[State 191, 3] 
type = playsnd
trigger1 = time = 190
value = 3,1

[State 191, 2]
type = Changeanim
trigger1 = anim = 190
trigger1 = AnimTime = 0
value = 9998

[State 191, 2]
type = Changeanim
trigger1 = time > 160
trigger1 = numexplod(6000) = 0
value = 191
persistent = 0

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

;开场姿势2----------------------------------------------------------------
[Statedef 192]
type = S
ctrl = 0
anim=192
velset = 0,0

[State 191, 1]
type = ChangeAnim
trigger1 = RoundState = 0
value = 192

[State 191, 1]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State Hit Spark]
type = Explod
trigger1 = time = 0
id = 6002
anim = 6002
pos = -13,0
sprpriority = 0
mask=0
ownpal = 1
facing = 1
ignorehitpause = 1
persistent = 0
postype = p1

[State 191, 3] 
type = playsnd
trigger1 = time = 30
value = 3,0

[State 191, 3] 
type = playsnd
trigger1 = time = 30
value = 3,1

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

;开场姿势3----------------------------------------------------------------
[Statedef 193]
type = S
ctrl = 0
anim=193
velset = 0,0

[State 191, 1]
type = playsnd
trigger1 = RoundState = 0
trigger1 = time = 10
value = 0,6

[State 191, 1]
type = ChangeAnim
trigger1 = RoundState = 0
value = 193

[State 191, 1]
type = AssertSpecial
trigger1 = 1
flag = Intro

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

;----------------------------------------------------------------------------
;挑衅
;----------------------------------------------------------------------------
[Statedef 195]
type = S
ctrl = 0
anim = 195
velset = 0,0
movetype = I
physics = S
sprpriority = 2

[State 195, 0]
type = PlaySnd
trigger1 = AnimElem = 4
value = 0,9

[State 195, 1]
type = CtrlSet
trigger1 = Time = 33
value = 1

[State 195, 2]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

;----------------------------------------------------------------------------
;站立A
;----------------------------------------------------------------------------
[Statedef 200]
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 200
facep2 = 1

[State 200, 4]
type = ChangeState
trigger1 = P2dist X <= 56 && Time = 0
value = 205

[State 200, movetype]
type = StateTypeSet
trigger1 = AnimElem = 3
movetype = I

[State 200, 0]
type = varrandom
trigger1 = time = 0
v = 40
range = 2

[State 200, 1]
type = HitDef
triggerall = (var(13) = 0 || var(37) = 1)
trigger1 = 1
persistent = 0
attr = S, NA
damage = 44
animtype = Light
guardflag = M
getpower = 50,10
pausetime = var(10),var(11)
guard.pausetime = var(10),var(15)
sparkno = s6000999
guard.sparkno = s6005999
sparkxy = -10,ifelse(P2statetype = A,-84,ifelse(P2statetype = C,-63,-79))
hitsound = s2,0
guardsound = s1, 7
ground.type = High
air.type = High
ground.slidetime = 10
ground.hittime  = var(34)
ground.velocity = ifelse(var(41)=0,fvar(1),ifelse(var(41)=1,fvar(2),fvar(2))),0
air.velocity = fvar(10),fvar(11)
airguard.velocity = -3.6,-2
guard.slidetime = 10
guard.hittime  = var(29)
guard.velocity = ifelse(var(41)=0,fvar(1)*fvar(15),ifelse(var(41)=1,fvar(2)*fvar(15),fvar(2)*fvar(15)))
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = fvar(12)

[State Hit Spark]
type = Explod
trigger1 = MoveContact = 1
id = 6200
anim = ifelse(MoveHit = 1,6200,6201)
pos = Ceil(ifelse((P2Dist x> 16 && P2Dist x< 63),var(28),ifelse(P2Dist x<= 16,16,63))),Ceil(fvar(38))
sprpriority = 9
ownpal = 1
facing = 1
ignorehitpause = 1
persistent = 0
postype = p1

[State Hit Spark Y var 1 ]
type = varset
trigger1 = 1
var(26) = Ceil(ifelse(	P2statetype=C,-74,(-72-(pos y))))
ignorehitpause = 1

[State Hit Spark Y var 2 ]
type = varset
trigger1 = 1
var(25) = Ceil(ifelse((var(26) > -86 && var(26) < -71),var(26),ifelse(var(26)<= -96,-96-(pos y),-81-(pos y))) + var(32))
ignorehitpause = 1

[State Hit Spark Y var 3 ]
type = varset
trigger1 = 1
fvar(38) = ifelse((var(25) > -86 && var(25) < -71),var(25),ifelse(var(25)<= -86,-86,-71))
ignorehitpause = 1

[State 200, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 1,0

[State 200, 0]
type = varrandom
trigger1 = time = 0
v = 42
range = 2

[State 200, 2]
type = PlaySnd
trigger1 = time = 1
trigger1 = var(42) = 0
value = 0,0

[State 200, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;----------------------------------------------------------------------------
;站立A近身
;----------------------------------------------------------------------------

[Statedef 205]
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 205
facep2 = 1

[State 200, movetype]
type = StateTypeSet
trigger1 = AnimElem = 3
movetype = I

[State 205, 1]
type = HitDef
triggerall = (var(13) = 0 || var(37) = 1)
trigger1 = 1
persistent = 0
attr = S, NA
damage = 39
animtype = Light
guardflag = M
getpower = 50,10
pausetime = var(10),var(11)
guard.pausetime = var(10),var(15)
sparkno = s6000999
guard.sparkno = s6005999
sparkxy = -10,ifelse(P2statetype = A,-109,ifelse(P2statetype = C,-108,-108))
hitsound = s2,0
guardsound = s1,7
ground.type = High
ground.slidetime = 10
ground.hittime  = var(34)
ground.velocity = ifelse(var(41)=0,fvar(1),ifelse(var(41)=1,fvar(2),fvar(2))),0
air.velocity = fvar(10),fvar(11)
airguard.velocity = -3.6,-2
guard.slidetime = 10
guard.hittime  = var(29)
guard.velocity = ifelse(var(41)=0,fvar(1)*fvar(15),ifelse(var(41)=1,fvar(2)*fvar(15),fvar(2)*fvar(15)))
air.type = High                        
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = fvar(12)

[State Hit Spark]
type = Explod
trigger1 = MoveContact = 1
id = 6200
anim = ifelse(MoveHit = 1,6200,6201)
pos = Ceil(ifelse((P2Dist x> 12 && P2Dist x< 59),var(28),ifelse(P2Dist x<= 12,12,59))),Ceil(fvar(38))
sprpriority = 9
ownpal = 1
facing = 1
ignorehitpause = 1
persistent = 0
postype = p1

[State Hit Spark Y var 1 ]
type = varset
trigger1 = 1
var(26) = Ceil(ifelse(	P2statetype=C,-74,(-82-(pos y))		))
ignorehitpause = 1

[State Hit Spark Y var 2 ]
type = varset
trigger1 = 1
var(25) = Ceil(ifelse((var(26) > -86 && var(26) < -71),var(26),ifelse(var(26)<= -86,-86-(pos y),-71-(pos y))) + var(32))
ignorehitpause = 1

[State Hit Spark Y var 3 ]
type = varset
trigger1 = 1
fvar(38) = ifelse((var(25) > -86 && var(25) < -71),var(25),ifelse(var(25)<= -86,-86,-71))
ignorehitpause = 1

[State 200, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 1,0

[State 200, 0]
type = varrandom
trigger1 = time = 0
v = 42
range = 2

[State 200, 2]
type = PlaySnd
trigger1 = time = 1
trigger1 = var(42) = 0
value = 0,0

[State 200, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;----------------------------------------------------------------------------
;站立C
;----------------------------------------------------------------------------

[Statedef 210]
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 210
facep2 = 1

[State 210, 4]
type = ChangeState
trigger1 = P2dist X <= 56 && Time = 0
value = 215

[State 210, movetype]
type = StateTypeSet
trigger1 = AnimElem = 7
movetype = I

[State 215, 2]
type = HitDef
triggerall = (var(13) = 0 || var(37) = 1)
trigger1 = 1
persistent = 0
attr = S, NA
animtype  = Hard
damage    = 93
guardflag = M
getpower = 100,20
pausetime = var(45),var(46)
guard.pausetime = var(45),var(47)
sparkno = s6001999
guard.sparkno = s6006999
sparkxy = -10,ifelse(P2statetype = A,-97,ifelse(P2statetype = C,-52,-80))
hitsound = s2,6
guardsound = s1,7
ground.type = High
ground.slidetime = 18
ground.hittime  = var(35)
ground.velocity = ifelse(var(41)=0,fvar(3),ifelse(var(41)=1,fvar(4),fvar(4))),0
air.velocity = fvar(10),fvar(11)
airguard.velocity = -3.6,-2
guard.slidetime = 18
guard.hittime  = var(31)
guard.velocity = ifelse(var(41)=0,fvar(3)*fvar(15),ifelse(var(41)=1,fvar(4)*fvar(15),fvar(4)*fvar(15)))
air.type = High
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = fvar(12)

[State Hit Spark]
type = Explod
trigger1 = MoveContact = 1
id = 6202
anim = ifelse(MoveHit = 1,6202,6203)
pos = Ceil(ifelse((P2Dist x> 12 && P2Dist x< 74),var(28),ifelse(P2Dist x<= 12,12,74))),Ceil(fvar(38))
sprpriority = 9
ownpal = 1
facing = 1
ignorehitpause = 1
persistent = 0
postype = p1

[State Hit Spark Y var 1 ]
type = varset
trigger1 = 1
var(26) = Ceil(ifelse(	P2statetype=C,-48,(-64-(pos y))		))
ignorehitpause = 1

[State Hit Spark Y var 2 ]
type = varset
trigger1 = 1
var(25) = Ceil(ifelse((var(26) > -68 && var(26) < -45),var(26),ifelse(var(26)<= -68,-68-(pos y),-45-(pos y))) + var(32))
ignorehitpause = 1

[State Hit Spark Y var 3 ]
type = varset
trigger1 = 1
fvar(38) = ifelse((var(25) > -68 && var(25) < -45),var(25),ifelse(var(25)<= -68,-68,-45))
ignorehitpause = 1

[State 210, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = 1,0

[State 210, 0]
type = varrandom
trigger1 = time = 0
v = 42
range = 2

[State 200, 2]
type = PlaySnd
trigger1 = time = 2
trigger1 = var(42) = 0
value = 0,1

[State 200, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;----------------------------------------------------------------------------
;站立C近身
;----------------------------------------------------------------------------
[Statedef 215]
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 215
facep2 = 1
sprpriority = 1

[State 215, movetype]
type = StateTypeSet
trigger1 = AnimElem = 7
movetype = I

[State 215, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = 1,0

[State 215, 0]
type = varrandom
trigger1 = time = 0
v = 42
range = 2

[State 215, 2]
type = PlaySnd
trigger1 = time = 2
trigger1 = var(42) = 0
value = 0,1

[State 215, 0]
type = varrandom
trigger1 = time = 0 || movehit = 1
v = 40
range = 2

[State 215, 2]
type = HitDef
triggerall = (var(13) = 0 || var(37) = 1)
trigger1 = 1
persistent = 0
attr = S, NA
animtype  = Hard
damage    = 93
guardflag = M
getpower = 100,20
pausetime = var(45),var(46)
guard.pausetime = var(45),var(47)
sparkno = s6001999
guard.sparkno = s6006999
sparkxy = -10,ifelse(P2statetype = A,-97,ifelse(P2statetype = C,-52,-80))
hitsound = s2,6
guardsound = s1,7
ground.type = High
ground.slidetime = 18
ground.hittime  = var(35)
ground.velocity = ifelse(var(41)=0,fvar(3),ifelse(var(41)=1,fvar(4),fvar(4))),0
air.velocity = fvar(10),fvar(11)
airguard.velocity = -3.6,-2
guard.slidetime = 18
guard.hittime  = var(31)
guard.velocity = ifelse(var(41)=0,fvar(3)*fvar(15),ifelse(var(41)=1,fvar(4)*fvar(15),fvar(4)*fvar(15)))
air.type = High
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = fvar(12)

[State Hit Spark]
type = Explod
trigger1 = MoveContact = 1
id = 6202
anim = ifelse(MoveHit = 1,6202,6203)
pos = Ceil(ifelse((P2Dist x> 29 && P2Dist x< 56),var(28),ifelse(P2Dist x<= 29,29,56))),Ceil(fvar(38))
sprpriority = 9
ownpal = 1
facing = 1
ignorehitpause = 1
persistent = 0
postype = p1

[State Hit Spark Y var 1 ]
type = varset
trigger1 = 1
var(26) = Ceil(ifelse(	P2statetype=C,-42,(-70-(pos y))		))
ignorehitpause = 1

[State Hit Spark Y var 2 ]
type = varset
trigger1 = 1
var(25) = Ceil(ifelse((var(26) > -74 && var(26) < -35),var(26),ifelse(var(26)<= -74,-74-(pos y),-35-(pos y))) + var(32))
ignorehitpause = 1

[State Hit Spark Y var 3 ]
type = varset
trigger1 = 1
fvar(38) = ifelse((var(25) > -74 && var(25) < -35),var(25),ifelse(var(25)<= -74,-74,-35))
ignorehitpause = 1

[State 215, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;----------------------------------------------------------------------------
;站立B
;----------------------------------------------------------------------------

[Statedef 230]
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 230
facep2 = 1

[State 230, 4]
type = ChangeState
trigger1 = P2dist X <= 58 && Time = 0
value = 235

[State 230, movetype]
type = StateTypeSet
trigger1 = AnimElem = 3
movetype = I

[State 230, 2]
type = HitDef
triggerall = (var(13) = 0 || var(37) = 1)
trigger1 = 1
persistent = 0
attr = S, NA
animtype  = Light
damage    = 44
guardflag = M
getpower = 50,10
pausetime = var(10),var(11)
guard.pausetime = var(10),var(15)
sparkno = s6000999
guard.sparkno = s6005999
sparkxy = -10,ifelse(P2statetype = A,-83,ifelse(P2statetype = C,-62,-78))
hitsound = s2,0
guardsound = s1,7
ground.type = Low
ground.slidetime = 10
ground.hittime  = var(34)
ground.velocity = ifelse(var(41)=0,fvar(1),ifelse(var(41)=1,fvar(2),fvar(2))),0
air.velocity = fvar(10),fvar(11)
airguard.velocity = -3.6,-2
guard.slidetime = 10
guard.hittime  = var(29)
guard.velocity = ifelse(var(41)=0,fvar(1)*fvar(15),ifelse(var(41)=1,fvar(2)*fvar(15),fvar(2)*fvar(15)))
air.type = Low                        
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = fvar(12)

[State Hit Spark]
type = Explod
trigger1 = MoveContact = 1
id = 6200
anim = ifelse(MoveHit = 1,6200,6201)
pos = Ceil(ifelse((P2Dist x> -19 && P2Dist x< 74),var(28),ifelse(P2Dist x<= -19,-19,74))),Ceil(fvar(38))
sprpriority = 9
ownpal = 1
facing = 1
ignorehitpause = 1
persistent = 0
postype = p1

[State Hit Spark Y var 1 ]
type = varset
trigger1 = 1
var(26) = Ceil(ifelse(	P2statetype=C,-56,(-37-(pos y))		))
ignorehitpause = 1

[State Hit Spark Y var 2 ]
type = varset
trigger1 = 1
var(25) = Ceil(ifelse((var(26) > -64 && var(26) < -34),var(26),ifelse(var(26)<= -64,-64-(pos y),-34-(pos y))) + var(32))
ignorehitpause = 1

[State Hit Spark Y var 3 ]
type = varset
trigger1 = 1
fvar(38) = ifelse((var(25) > -64 && var(25) < -34),var(25),ifelse(var(25)<= -64,-64,-34))
ignorehitpause = 1

[State 230, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = 1,1

[State 200, 0]
type = varrandom
trigger1 = time = 0
v = 42
range = 2

[State 200, 2]
type = PlaySnd
trigger1 = time = 2
trigger1 = var(42) = 1
value = 0,0

[State 230, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;----------------------------------------------------------------------------
;站立B近身
;----------------------------------------------------------------------------
[Statedef 235]
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 235
facep2 = 1

[State 235, movetype]
type = StateTypeSet
trigger1 = AnimElem = 4
movetype = I

[State 235, 2]
type = HitDef
triggerall = (var(13) = 0 || var(37) = 1)
trigger1 = 1
persistent = 0
attr = S, NA
animtype  = Light
damage    = 44
guardflag = M
getpower = 50,10
pausetime = var(10),var(11)
guard.pausetime = var(10),var(15)
sparkno = s6000999
guard.sparkno = s6005999
sparkxy = -30,ifelse(P2statetype = A,-58,ifelse(P2statetype = C,-32,-48))
hitsound = s2,0
guardsound = s1,7
ground.type = Low
ground.slidetime = 10
ground.hittime  = var(34)
ground.velocity = ifelse(var(41)=0,fvar(1),ifelse(var(41)=1,fvar(2),fvar(2))),0
air.velocity = fvar(10),fvar(11)
airguard.velocity = -3.6,-2
guard.slidetime = 10
guard.hittime  = var(29)
guard.velocity = ifelse(var(41)=0,fvar(1)*fvar(15),ifelse(var(41)=1,fvar(2)*fvar(15),fvar(2)*fvar(15)))
air.type = Low                        
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = fvar(12)

[State Hit Spark]
type = Explod
trigger1 = MoveContact = 1
id = 6200
anim = ifelse(MoveHit = 1,6200,6201)
pos = Ceil(ifelse((P2Dist x> -21 && P2Dist x< 58),var(28),ifelse(P2Dist x<= -21,-21,58))),Ceil(fvar(38))
sprpriority = 9
ownpal = 1
facing = 1
ignorehitpause = 1
persistent = 0
postype = p1

[State Hit Spark Y var 1 ]
type = varset
trigger1 = 1
var(26) = Ceil(ifelse(	P2statetype=C,-36,(-44-(pos y))		))
ignorehitpause = 1

[State Hit Spark Y var 2 ]
type = varset
trigger1 = 1
var(25) = Ceil(ifelse((var(26) > -70 && var(26) < -25),var(26),ifelse(var(26)<= -70,-70-(pos y),-25-(pos y))) + var(32))
ignorehitpause = 1

[State Hit Spark Y var 3 ]
type = varset
trigger1 = 1
fvar(38) = ifelse((var(25) > -70 && var(25) < -25),var(25),ifelse(var(25)<= -70,-70,-25))
ignorehitpause = 1

[State 235, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = 1,1

[State 200, 0]
type = varrandom
trigger1 = time = 0
v = 42
range = 2

[State 200, 2]
type = PlaySnd
trigger1 = time = 2
trigger1 = var(42) = 1
value = 0,0

[State 235, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;----------------------------------------------------------------------------
;站立D
;----------------------------------------------------------------------------

[Statedef 240]
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 240
facep2 = 1

[State 240, 4]
type = ChangeState
trigger1 = P2dist X <= 54 && Time = 0
value = 245

[State 240, movetype]
type = StateTypeSet
trigger1 = AnimElem = 5
movetype = I

[State 240, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = 1,1

[State 210, 0]
type = varrandom
trigger1 = time = 0
v = 42
range = 2

[State 210, 2]
type = PlaySnd
trigger1 = time = 2
trigger1 = var(42) = 0
value = 0,1

[State 240, 0]
type = varrandom
trigger1 = time = 0
v = 40
range = 2

[State 240, 2]
type = HitDef
triggerall = (var(13) = 0 || var(37) = 1)
trigger1 = 1
persistent = 0
attr = S, NA
animtype  = Hard
damage    = 113
guardflag = M
getpower = 100,20
pausetime = var(45),var(46)
guard.pausetime = var(45),var(47)
sparkno = s6001999
guard.sparkno = s6006999
sparkxy = -10,ifelse(P2statetype = A,-108,ifelse(P2statetype = C,-108,-108))
hitsound = s2,9
guardsound = s1,7
ground.type = high
ground.slidetime = 18
ground.hittime  = var(35)
ground.velocity = ifelse(var(41)=0,fvar(3),ifelse(var(41)=1,fvar(4),fvar(4))),0
air.velocity = fvar(10),fvar(11)
airguard.velocity = -3.6,-2
guard.slidetime = 18
guard.hittime  = var(31)
guard.velocity = ifelse(var(41)=0,fvar(3)*fvar(15),ifelse(var(41)=1,fvar(4)*fvar(15),fvar(4)*fvar(15)))
air.type = high
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = fvar(12)

[State Hit Spark]
type = Explod
trigger1 = MoveContact = 1
id = 6202
anim = ifelse(MoveHit = 1,6202,6203)
pos = Ceil(ifelse((P2Dist x> 34 && P2Dist x< 105),var(28),ifelse(P2Dist x<= 34,34,105))),Ceil(fvar(38))
sprpriority = 9
ownpal = 1
facing = 1
ignorehitpause = 1
persistent = 0
postype = p1

[State Hit Spark Y var 1 ]
type = varset
trigger1 = 1
var(26) = Ceil(ifelse(	P2statetype=C,-38,(-82-(pos y))		))
ignorehitpause = 1

[State Hit Spark Y var 2 ]
type = varset
trigger1 = 1
var(25) = Ceil(ifelse((var(26) > -86 && var(26) < -55),var(26),ifelse(var(26)<= -86,-86-(pos y),-55-(pos y))) + var(32))
ignorehitpause = 1

[State Hit Spark Y var 3 ]
type = varset
trigger1 = 1
fvar(38) = ifelse((var(25) > -86 && var(25) < -55),var(25),ifelse(var(25)<= -86,-86,-55))
ignorehitpause = 1

[State 240, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;----------------------------------------------------------------------------
;站立D近身
;----------------------------------------------------------------------------
[Statedef 245]
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 245
facep2 = 1

[State 245, movetype]
type = StateTypeSet
trigger1 = AnimElem = 5
movetype = I

[State 245, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = 1,1

[State 210, 0]
type = varrandom
trigger1 = time = 0
v = 42
range = 2

[State 210, 2]
type = PlaySnd
trigger1 = time = 2
trigger1 = var(42) = 1
value = 0,1

[State 245, 2]
type = HitDef
triggerall = (var(13) = 0 || var(37) = 1)
trigger1 = 1
persistent = 0
attr = S, NA
animtype  = Hard
damage    = 103
guardflag = M
getpower = 100,20
pausetime = var(45),var(46)
guard.pausetime = var(45),var(47)
sparkno = s6001999
guard.sparkno = s6006999
sparkxy = -20,ifelse(P2statetype = A,-52,ifelse(P2statetype = C,-32,-48))
hitsound = s2,9
guardsound = s1,7
ground.type = High
ground.slidetime = 18
ground.hittime  = var(35)
ground.velocity = ifelse(var(41)=0,fvar(3),ifelse(var(41)=1,fvar(4),fvar(4))),0
air.velocity = fvar(10),fvar(11)
airguard.velocity = -3.6,-2
guard.slidetime = 18
guard.hittime  = var(31)
guard.velocity = ifelse(var(41)=0,fvar(3)*fvar(15),ifelse(var(41)=1,fvar(4)*fvar(15),fvar(4)*fvar(15)))
air.type = High
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = fvar(12)

[State Hit Spark]
type = Explod
trigger1 = MoveContact = 1
id = 6202
anim = ifelse(MoveHit = 1,6202,6203)
pos = Ceil(ifelse((P2Dist x> 12 && P2Dist x< 54),var(28),ifelse(P2Dist x<= 12,12,54))),Ceil(fvar(38))
sprpriority = 9
ownpal = 1
facing = 1
ignorehitpause = 1
persistent = 0
postype = p1

[State Hit Spark Y var 1 ]
type = varset
trigger1 = 1
var(26) = Ceil(ifelse(	P2statetype=C,-68,(-102-(pos y))		))
ignorehitpause = 1

[State Hit Spark Y var 2 ]
type = varset
trigger1 = 1
var(25) = Ceil(ifelse((var(26) > -132 && var(26) < -48),var(26),ifelse(var(26)<= -132,-132-(pos y),-48-(pos y))) + var(32))
ignorehitpause = 1

[State Hit Spark Y var 3 ]
type = varset
trigger1 = 1
fvar(38) = ifelse((var(25) > -132 && var(25) < -48),var(25),ifelse(var(25)<= -132,-132,-48))
ignorehitpause = 1

[State 245, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;----------------------------------------------------------------------------
;站立CD
;----------------------------------------------------------------------------
[Statedef 250]
type=S
movetype=A
physics=S
velset = 0,0
ctrl=0
anim=250
facep2 = 1
juggle = 1

[State 250, movetype]
type = StateTypeSet
trigger1 = AnimElem = 4
movetype = I

[State 250, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = 1,1

[State 250, 0]
type=PlaySnd
trigger1 = time = 2
value= 0,ifelse(Random < 500,1,2)

[State 250, 2]
type = HitDef
triggerall = (var(13) = 0 || var(37) = 1)
trigger1 = 1
persistent = 0
attr = S, NA
animtype  = Hard
damage    = 142
guardflag = M
getpower = 100,20
pausetime = var(45),var(46)
guard.pausetime = var(45),var(47)
sparkno = s6001999
guard.sparkno = s6006999
sparkxy = -10,ifelse(P2statetype = A,-76,ifelse(P2statetype = C,-56,-48))
hitsound   = s1,8
guardsound = s1,7
ground.type = High
fall = 1
ground.slidetime = 22
ground.hittime  = var(35)+4
ground.velocity = fvar(10),fvar(11)
air.velocity = fvar(10),fvar(11)
airguard.velocity = -3.6,-2
guard.slidetime = 22
guard.hittime  = var(31)+4
guard.velocity = (ifelse(var(41)=0,fvar(5)*fvar(15),ifelse(var(41)=1,fvar(6)*fvar(15),fvar(6)*fvar(15))))
air.type = High
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = fvar(12)

[State Hit Spark]
type = Explod
trigger1 = MoveContact = 1
id = 6202
anim = ifelse(MoveHit = 1,6202,6203)
pos = Ceil(ifelse((P2Dist x> 25 && P2Dist x< 51),var(28),ifelse(P2Dist x<= 25,25,51))),Ceil(fvar(38))
sprpriority = 9
ownpal = 1
facing = 1
ignorehitpause = 1
persistent = 0
postype = p1

[State Hit Spark Y var 1 ]
type = varset
trigger1 = 1
var(26) = Ceil(ifelse(	P2statetype=C,-36,(-92-(pos y))		))
ignorehitpause = 1

[State Hit Spark Y var 2 ]
type = varset
trigger1 = 1
var(25) = Ceil(ifelse((var(26) > -89 && var(26) < -37),var(26),ifelse(var(26)<= -89,-89-(pos y),-37-(pos y))) + var(32))
ignorehitpause = 1

[State Hit Spark Y var 3 ]
type = varset
trigger1 = 1
fvar(38) = ifelse((var(25) > -89 && var(25) < -37),var(25),ifelse(var(25)<= -89,-89,-37))
ignorehitpause = 1

[State 250, 0]
type = varset
trigger1 = movehit
var(13) = 1
ignorehitpause = 1
persistent = 0

[State 250, 4]
type=ChangeState
trigger1=AnimTime = 0
value=0
ctrl=1

;----------------------------------------------------------------------------
;防守反击CD
;----------------------------------------------------------------------------
[Statedef 260]
type=S
movetype=A
physics=S
velset = 0,0
poweradd=-1000
ctrl=0
anim=260
facep2 = 1
juggle = 1

[State 250, movetype]
type = StateTypeSet
trigger1 = AnimElem = 5
movetype = I

[State 260,0]
type = NotHitBy
trigger1 = time = 0
value = SCA
time = 14

[State 260, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = 1,1

[State 250, 0]
type=PlaySnd
trigger1 = time = 2
value= 0,ifelse(Random < 500,1,2)

[State 260, 2]
type = HitDef
triggerall = (var(13) = 0 || var(37) = 1)
trigger1 = 1
persistent = 0
attr = S, NA
animtype  = Hard
damage    = 39
guardflag = M
getpower = 100,20
pausetime = var(45),var(46)
guard.pausetime = var(45),var(47)
sparkno = s6001999
guard.sparkno = s6006999
sparkxy = 0,0
hitsound   = s1,8
guardsound = s1,7
ground.type = High
fall = 1
ground.slidetime = 22
ground.hittime  = var(35)+4
ground.velocity = fvar(10),fvar(11)
air.velocity = fvar(10),fvar(11)
airguard.velocity = -3.6,-2
guard.slidetime = 22
guard.hittime  = var(31)+4
guard.velocity = (ifelse(var(41)=0,fvar(5)*fvar(15),ifelse(var(41)=1,fvar(6)*fvar(15),fvar(6)*fvar(15))))
air.type = High
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = fvar(12)
kill = 0

[State Hit Spark]
type = Explod
trigger1 = AnimElem = 2
id = 6204
anim = 6204
pos = 13,-67
sprpriority = 9
ownpal = 1
facing = 1
ignorehitpause = 1
persistent = 0
postype = p1

[State Hit Spark]
type = Explod
trigger1 = MoveContact = 1
id = 6202
anim = ifelse(MoveHit = 1,6202,6203)
pos = Ceil(ifelse((P2Dist x> 25 && P2Dist x< 51),var(28),ifelse(P2Dist x<= 25,25,51))),Ceil(fvar(38))
sprpriority = 9
ownpal = 1
facing = 1
ignorehitpause = 1
persistent = 0
postype = p1

[State Hit Spark Y var 1 ]
type = varset
trigger1 = 1
var(26) = Ceil(ifelse(	P2statetype=C,-36,(-92-(pos y))		))
ignorehitpause = 1

[State Hit Spark Y var 2 ]
type = varset
trigger1 = 1
var(25) = Ceil(ifelse((var(26) > -89 && var(26) < -37),var(26),ifelse(var(26)<= -89,-89-(pos y),-37-(pos y))) + var(32))
ignorehitpause = 1

[State Hit Spark Y var 3 ]
type = varset
trigger1 = 1
fvar(38) = ifelse((var(25) > -89 && var(25) < -37),var(25),ifelse(var(25)<= -89,-89,-37))
ignorehitpause = 1

[State 260, 0]
type = varset
trigger1 = movehit
var(13) = 1
ignorehitpause = 1
persistent = 0

[State 260, 4]
type=ChangeState
trigger1=AnimTime = 0
value=0
ctrl=1

;----------------------------------------------------------------------------
;蹲下A
;----------------------------------------------------------------------------
[Statedef 400]
type    = C
movetype= A
physics = C
velset = 0,0
ctrl = 0
anim = 400
facep2 = 1

[State 400, movetype]
type = StateTypeSet
trigger1 = AnimElem = 3
movetype = I

[State 400, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = 1,0

[State 200, 0]
type = varrandom
trigger1 = time = 0
v = 42
range = 2

[State 210, 2]
type = PlaySnd
trigger1 = time = 2
trigger1 = var(42) = 1
value = 0,0

[State 400, 2]
type = HitDef
triggerall = (var(13) = 0 || var(37) = 1)
trigger1 = 1
persistent = 0
attr = C, NA
damage = 30
animtype  = Light
guardflag = M
getpower = 50,10
pausetime = var(10),var(11)
guard.pausetime = var(10),var(15)
sparkno = s6000999
guard.sparkno = s6005999
sparkxy = -10,ifelse(P2statetype = A,-60,ifelse(P2statetype = C,-56,-48))
hitsound = s2,0
guardsound = s1,7
ground.type = Low
ground.slidetime = 10
ground.hittime  = var(34)
ground.velocity = ifelse(var(41)=0,fvar(1),ifelse(var(41)=1,fvar(2),fvar(2))),0
air.velocity = fvar(10),fvar(11)
airguard.velocity = -3.6,-2
guard.slidetime = 10
guard.hittime  = var(29)
guard.velocity = ifelse(var(41)=0,fvar(1)*fvar(15),ifelse(var(41)=1,fvar(2)*fvar(15),fvar(2)*fvar(15)))
air.type = Low                        
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = fvar(12)

[State Hit Spark]
type = Explod
trigger1 = MoveContact = 1
id = 6200
anim = ifelse(MoveHit = 1,6200,6201)
pos = Ceil(ifelse((P2Dist x> 4 && P2Dist x< 69),var(28),ifelse(P2Dist x<= 4,4,69))),Ceil(fvar(38))
sprpriority = 9
ownpal = 1
facing = 1
ignorehitpause = 1
persistent = 0
postype = p1

[State Hit Spark Y var 1 ]
type = varset
trigger1 = 1
var(26) = Ceil(ifelse(	P2statetype=C,-56,(-44-(pos y))		))
ignorehitpause = 1

[State Hit Spark Y var 2 ]
type = varset
trigger1 = 1
var(25) = Ceil(ifelse((var(26) > -64 && var(26) < -41),var(26),ifelse(var(26)<= -64,-64-(pos y),-41-(pos y))) + var(32))
ignorehitpause = 1

[State Hit Spark Y var 3 ]
type = varset
trigger1 = 1
fvar(38) = ifelse((var(25) > -64 && var(25) < -41),var(25),ifelse(var(25)<= -64,-64,-41))
ignorehitpause = 1

[State 400, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;----------------------------------------------------------------------------
;蹲下C
;----------------------------------------------------------------------------
[Statedef 410]
type    = C
movetype= A
physics = C
velset = 0,0
ctrl = 0
anim = 410
facep2 = 1

[State 410, movetype]
type = StateTypeSet
trigger1 = AnimElem = 8
movetype = I

[State 410, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = 1,0

[State 210, 0]
type = varrandom
trigger1 = time = 0
v = 42
range = 2

[State 210, 2]
type = PlaySnd
trigger1 = time = 2
trigger1 = var(42) = 1
value = 0,1

[State 410, 2]
type = HitDef
triggerall = (var(13) = 0 || var(37) = 1)
trigger1 = 1
persistent = 0
attr = C, NA
damage    = 103
animtype  = Hard
guardflag = M
getpower = 100,20
pausetime = var(45),var(46)
guard.pausetime = var(45),var(47)
sparkno = s6001999
guard.sparkno = s6006999
sparkxy = -10,ifelse(P2statetype = A,-122,ifelse(P2statetype = C,-49,-48))
hitsound = s2,6
guardsound = s1,7
ground.type = Low
ground.slidetime = 18
ground.hittime  = var(35)
ground.velocity = ifelse(var(41)=0,fvar(3),ifelse(var(41)=1,fvar(4),fvar(4))),0
air.velocity = fvar(10),fvar(11)
airguard.velocity = -3.6,-2
guard.slidetime = 18
guard.hittime  = var(31)
guard.velocity = ifelse(var(41)=0,fvar(3)*fvar(15),ifelse(var(41)=1,fvar(4)*fvar(15),fvar(4)*fvar(15)))
air.type = Low   
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = fvar(12)

[State Hit Spark]
type = Explod
trigger1 = MoveContact = 1
id = 6202
anim = ifelse(MoveHit = 1,6202,6203)
pos = Ceil(ifelse((P2Dist x> 45 && P2Dist x< 96),var(28),ifelse(P2Dist x<= 45,45,96))),Ceil(fvar(38))
sprpriority = 9
ownpal = 1
facing = 1
ignorehitpause = 1
persistent = 0
postype = p1

[State Hit Spark Y var 1 ]
type = varset
trigger1 = 1
var(26) = Ceil(ifelse(	P2statetype=C,-58,(-44-(pos y))		))
ignorehitpause = 1

[State Hit Spark Y var 2 ]
type = varset
trigger1 = 1
var(25) = Ceil(ifelse((var(26) > -65 && var(26) < -39),var(26),ifelse(var(26)<= -65,-65-(pos y),-39-(pos y))) + var(32))
ignorehitpause = 1

[State Hit Spark Y var 3 ]
type = varset
trigger1 = 1
fvar(38) = ifelse((var(25) > -65 && var(25) < -39),var(25),ifelse(var(25)<= -65,-65,-39))
ignorehitpause = 1

[State 410, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;----------------------------------------------------------------------------
;蹲下B
;----------------------------------------------------------------------------
[Statedef 430]
type    = C
movetype= A
physics = C
velset = 0,0
ctrl = 0
anim = 430
facep2 = 1

[State 430, movetype]
type = StateTypeSet
trigger1 = AnimElem = 3
movetype = I

[State 430, 2]
type = HitDef
triggerall = (var(13) = 0 || var(37) = 1)
trigger1 = 1
persistent = 0
attr = C, NA
damage    = 30
animtype  = Light
guardflag = L
getpower = 50,10
pausetime = var(10),var(11)
guard.pausetime = var(10),var(15)
sparkno = s6000999
guard.sparkno = s6005999
sparkxy = -10,ifelse(P2statetype = A,-12,ifelse(P2statetype = C,-12,-12))
hitsound = s2,0
guardsound = s1,7
ground.type = Low
ground.slidetime = 10
ground.hittime  = var(34)
ground.velocity = ifelse(var(41)=0,fvar(1),ifelse(var(41)=1,fvar(2),fvar(2))),0
air.velocity = fvar(10),fvar(11)
airguard.velocity = -3.6,-2
guard.slidetime = 10
guard.hittime  = var(29)
guard.velocity = ifelse(var(41)=0,fvar(1)*fvar(15),ifelse(var(41)=1,fvar(2)*fvar(15),fvar(2)*fvar(15)))
air.type = Low
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = fvar(12)

[State Hit Spark]
type = Explod
trigger1 = MoveContact = 1
id = 6200
anim = ifelse(MoveHit = 1,6200,6201)
pos = Ceil(ifelse((P2Dist x> 12 && P2Dist x< 75),var(28),ifelse(P2Dist x<= 12,12,75))),Ceil(fvar(38))
sprpriority = 9
ownpal = 1
facing = 1
ignorehitpause = 1
persistent = 0
postype = p1

[State Hit Spark Y var 1 ]
type = varset
trigger1 = 1
var(26) = Ceil(ifelse(	P2statetype=C,-10,(-10-(pos y))		))
ignorehitpause = 1

[State Hit Spark Y var 2 ]
type = varset
trigger1 = 1
var(25) = Ceil(ifelse((var(26) > -27 && var(26) < -1),var(26),ifelse(var(26)<= -27,-27-(pos y),-1-(pos y))) + var(32))
ignorehitpause = 1

[State Hit Spark Y var 3 ]
type = varset
trigger1 = 1
fvar(38) = ifelse((var(25) > -27 && var(25) < -1),var(25),ifelse(var(25)<= -27,-27,-1))
ignorehitpause = 1

[State 430, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = 1,0

[State 200, 0]
type = varrandom
trigger1 = time = 0
v = 42
range = 2

[State 200, 2]
type = PlaySnd
trigger1 = time = 2
trigger1 = var(42) = 1
value = 0,0

[State 430, 3]
type = ChangeState 
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;----------------------------------------------------------------------------
;蹲下D
;----------------------------------------------------------------------------
[Statedef 440]
type    = C
movetype= A
physics = C
velset = 0,0
ctrl = 0
anim = 440
facep2 = 1
juggle = 1

[State 440, movetype]
type = StateTypeSet
trigger1 = AnimElem = 5
movetype = I

[State 440, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = 1,1

[State 210, 0]
type = varrandom
trigger1 = time = 0
v = 42
range = 2

[State 200, 2]
type = PlaySnd
trigger1 = time = 2
trigger1 = var(42) = 1
value = 0,1

[State 440, 3]
type = HitDef
triggerall = (var(13) = 0 || var(37) = 1)
trigger1 = 1
persistent = 0
attr = C, NA
damage    = 113
guardflag = L
getpower = 100,20
pausetime = var(45),var(46)
guard.pausetime = var(45),var(47)
sparkno = s6001999
guard.sparkno = s6006999
sparkxy = -10,ifelse(P2statetype = A,-46,ifelse(P2statetype = C,-32,-48))
hitsound = s2,9
guardsound = s1,7
ground.type = Trip
ground.slidetime = 18
ground.hittime  = var(35)
ground.velocity = fvar(20),fvar(11)
air.velocity = fvar(20),fvar(11)
airguard.velocity = -3.6,-2
guard.slidetime = 18
guard.hittime  = var(31)
guard.velocity = ifelse(var(41)=0,fvar(3)*fvar(15),ifelse(var(41)=1,fvar(4)*fvar(15),fvar(4)*fvar(15)))
fall = 1
air.type = High
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = fvar(12)

[State Hit Spark]
type = Explod
trigger1 = MoveContact = 1
id = 6202
anim = ifelse(MoveHit = 1,6202,6203)
pos = Ceil(ifelse((P2Dist x> 12 && P2Dist x< 100),var(28),ifelse(P2Dist x<= 12,12,100))),Ceil(fvar(38))
sprpriority = 9
ownpal = 1
facing = 1
ignorehitpause = 1
persistent = 0
postype = p1

[State Hit Spark Y var 1 ]
type = varset
trigger1 = 1
var(26) = Ceil(ifelse(	P2statetype=C,-12,(-12-(pos y))		))
ignorehitpause = 1

[State Hit Spark Y var 2 ]
type = varset
trigger1 = 1
var(25) = Ceil(ifelse((var(26) > -24 && var(26) < -1),var(26),ifelse(var(26)<= -24,-24-(pos y),-1-(pos y))) + var(32))
ignorehitpause = 1

[State Hit Spark Y var 3 ]
type = varset
trigger1 = 1
fvar(38) = ifelse((var(25) > -24 && var(25) < -1),var(25),ifelse(var(25)<= -24,-24,-1))
ignorehitpause = 1

[State 440, 0]
type = varset
trigger1 = movehit
var(13) = 1
ignorehitpause = 1
persistent = 0

[State 440, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;----------------------------------------------------------------------------
;空中A
;----------------------------------------------------------------------------
[Statedef 600]
type    = A
movetype= A
physics = A
anim = 600
ctrl = 0

[State 640, movetype]
type = StateTypeSet
trigger1 = AnimElem = 3 
movetype = I

[State 600, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = 1,0

[State 200, 0]
type = varrandom
trigger1 = time = 0
v = 42
range = 2

[State 200, 2]
type = PlaySnd
trigger1 = time = 2
trigger1 = var(42) = 1
value = 0,0

[State 600, 2]
type = HitDef
triggerall = (var(13) = 0 || var(37) = 1)
trigger1 = 1
persistent = 0
attr = A, NA
damage = 50
animtype = Medium
guardflag = H
getpower = 50,10
pausetime = var(45),var(46)
guard.pausetime = var(45),var(47)
sparkno = s6000999
guard.sparkno = s6005999
sparkxy = -10,ifelse(P2statetype = A,-75,ifelse(P2statetype = C,-55,-55))
hitsound = s2,0
guardsound = s1,7
ground.type = Low
ground.slidetime = 10
ground.hittime  = var(34)
ground.velocity = ifelse(var(41)=0,fvar(1),ifelse(var(41)=1,fvar(2),fvar(2))),0
air.velocity = fvar(10),fvar(11)
airguard.velocity = -3.6,-2
guard.slidetime = 10
guard.hittime  = var(29)
guard.velocity = ifelse(var(41)=0,fvar(1)*fvar(15),ifelse(var(41)=1,fvar(2)*fvar(15),fvar(2)*fvar(15)))
air.type = Low                        
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = fvar(12)

[State Hit Spark]
type = Explod
trigger1 = MoveContact = 1
id = 6200
anim = ifelse(MoveHit = 1,6200,6201)
pos = Ceil(ifelse((P2Dist x> 18 && P2Dist x< 62),var(28),ifelse(P2Dist x<= 18,18,62))),Ceil(fvar(38))
sprpriority = 9
ownpal = 1
facing = 1
ignorehitpause = 1
persistent = 0
postype = p1

[State Hit Spark Y var 1 ]
type = varset
trigger1 = 1
var(26) = Ceil(ifelse(	P2statetype=C,-75,(-102-(pos y))		))
ignorehitpause = 1

[State Hit Spark Y var 2 ]
type = varset
trigger1 = 1
var(25) = Ceil(ifelse((var(26) > -88 && var(26) < -57),var(26),ifelse(var(26)<= -88,-88-(pos y),-57-(pos y))) + var(32))
ignorehitpause = 1

[State Hit Spark Y var 3 ]
type = varset
trigger1 = 1
fvar(38) = ifelse((var(25) > -88 && var(25) < -57),var(25),ifelse(var(25)<= -88,-88,-57))
ignorehitpause = 1

;----------------------------------------------------------------------------
;空中C
;----------------------------------------------------------------------------
[Statedef 610]
type    = A
movetype= A
physics = A
anim = 610
ctrl = 0

[State 610, movetype]
type = StateTypeSet
trigger1 = AnimElem = 3
movetype = I

[State 610, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = 1,0

[State 210, 0]
type = varrandom
trigger1 = time = 0
v = 42
range = 2

[State 200, 2]
type = PlaySnd
trigger1 = time = 2
trigger1 = var(42) = 1
value = 0,1

[State 610, 3]
type = HitDef
triggerall = (var(13) = 0 || var(37) = 1)
trigger1 = 1
persistent = 0
attr = A, NA
damage = 103
guardflag = H
animtype = Medium
getpower = 100,20
pausetime = var(45),var(46)
guard.pausetime = var(45),var(47)
sparkno = s6001999
guard.sparkno = s6006999
sparkxy = -10,ifelse(P2statetype = A,-82,ifelse(P2statetype = C,-58,-72))
hitsound = s2,6
guardsound = s1,7
ground.type = Low
ground.slidetime = 10
ground.hittime  = var(34)
ground.velocity = ifelse(var(41)=0,fvar(1),ifelse(var(41)=1,fvar(2),fvar(2))),0
air.velocity = fvar(10),fvar(11)
airguard.velocity = -3.6,-2
guard.slidetime = 18
guard.hittime  = var(31)
guard.velocity = ifelse(var(41)=0,fvar(3)*fvar(15),ifelse(var(41)=1,fvar(4)*fvar(15),fvar(4)*fvar(15)))
air.type = Low
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = fvar(12)

[State Hit Spark]
type = Explod
trigger1 = MoveContact = 1
id = 6202
anim = ifelse(MoveHit = 1,6202,6203)
pos = Ceil(ifelse((P2Dist x> -46 && P2Dist x< 46),var(28),ifelse(P2Dist x<= -46,-46,46))),Ceil(fvar(38))
sprpriority = 9
ownpal = 1
facing = 1
ignorehitpause = 1
persistent = 0
postype = p1

[State Hit Spark Y var 1 ]
type = varset
trigger1 = 1
var(26) = Ceil(ifelse(	P2statetype=C,-70,(-93-(pos y))		))
ignorehitpause = 1

[State Hit Spark Y var 2 ]
type = varset
trigger1 = 1
var(25) = Ceil(ifelse((var(26) > -108 && var(26) < -77),var(26),ifelse(var(26)<= -108,-108-(pos y),-77-(pos y))) + var(32))
ignorehitpause = 1

[State Hit Spark Y var 3 ]
type = varset
trigger1 = 1
fvar(38) = ifelse((var(25) > -108 && var(25) < -77),var(25),ifelse(var(25)<= -108,-108,-77))
ignorehitpause = 1

;----------------------------------------------------------------------------
;空中B
;----------------------------------------------------------------------------
[Statedef 630]
type    = A
movetype= A
physics = A
anim = 630
ctrl = 0

[State 640, movetype]
type = StateTypeSet
trigger1 = AnimElem = 3
movetype = I

[State 630, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = 1,1

[State 200, 0]
type = varrandom
trigger1 = time = 0
v = 42
range = 2

[State 200, 2]
type = PlaySnd
trigger1 = time = 2
trigger1 = var(42) = 0
value = 0,0

[State 630, 2]
type = HitDef
triggerall = (var(13) = 0 || var(37) = 1)
trigger1 = 1
persistent = 0
attr = A, NA
damage = 32
guardflag = H
animtype = Medium
getpower = 50,10
pausetime = var(45),var(46)
guard.pausetime = var(45),var(47)
sparkno = s6000999
guard.sparkno = s6005999
sparkxy = -10,ifelse(P2statetype = A,-79,ifelse(P2statetype = C,-58,-79))
hitsound = s2,0
guardsound = s1,7
ground.type = Low
ground.slidetime = 10
ground.hittime  = var(34)
ground.velocity = ifelse(var(41)=0,fvar(1),ifelse(var(41)=1,fvar(2),fvar(2))),0
air.velocity = fvar(10),fvar(11)
airguard.velocity = -3.6,-2
guard.slidetime = 10
guard.hittime  = var(29)
guard.velocity = ifelse(var(41)=0,fvar(1)*fvar(15),ifelse(var(41)=1,fvar(2)*fvar(15),fvar(2)*fvar(15)))
air.type = Low                        
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = fvar(12)

[State Hit Spark]
type = Explod
trigger1 = MoveContact = 1
id = 6200
anim = ifelse(MoveHit = 1,6200,6201)
pos = Ceil(ifelse((P2Dist x> -47 && P2Dist x< 58),var(28),ifelse(P2Dist x<= -47,-47,58))),Ceil(fvar(38))
sprpriority = 9
ownpal = 1
facing = 1
ignorehitpause = 1
persistent = 0
postype = p1

[State Hit Spark Y var 1 ]
type = varset
trigger1 = 1
var(26) = Ceil(ifelse(	P2statetype=C,-69,(-50-(pos y))		))
ignorehitpause = 1

[State Hit Spark Y var 2 ]
type = varset
trigger1 = 1
var(25) = Ceil(ifelse((var(26) > -80 && var(26) < -44),var(26),ifelse(var(26)<= -80,-80-(pos y),-44-(pos y))) + var(32))
ignorehitpause = 1

[State Hit Spark Y var 3 ]
type = varset
trigger1 = 1
fvar(38) = ifelse((var(25) > -80 && var(25) < -44),var(25),ifelse(var(25)<= -80,-80,-44))
ignorehitpause = 1

;----------------------------------------------------------------------------
;空中D
;----------------------------------------------------------------------------
[Statedef 640]
type    = A
movetype= A
physics = A
anim = 640
ctrl = 0

[State 640, movetype]
type = StateTypeSet
trigger1 = AnimElem = 4
movetype = I

[State 640, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = 1,1

[State 210, 0]
type = varrandom
trigger1 = time = 0
v = 42
range = 2

[State 210, 2]
type = PlaySnd
trigger1 = time = 2
trigger1 = var(42) = 1
value = 0,1

[State 640, 3]
type = HitDef
triggerall = (var(13) = 0 || var(37) = 1)
trigger1 = 1
persistent = 0
attr = A, NA
damage = 103
guardflag = H
animtype = Medium
getpower = 100,20
pausetime = var(45),var(46)
guard.pausetime = var(45),var(47)
sparkno = s6001999
guard.sparkno = s6006999
sparkxy = -10,ifelse(P2statetype = A,-79,ifelse(P2statetype = C,-59,-59))
hitsound = s2,9
guardsound = s1,7
ground.type = Low
ground.slidetime = 10
ground.hittime  = var(34)
ground.velocity = ifelse(var(41)=0,fvar(1),ifelse(var(41)=1,fvar(2),fvar(2))),0
air.velocity = fvar(10),fvar(11)
airguard.velocity = -3.6,-2
guard.slidetime = 18
guard.hittime  = var(31)
guard.velocity = ifelse(var(41)=0,fvar(3)*fvar(15),ifelse(var(41)=1,fvar(4)*fvar(15),fvar(4)*fvar(15)))
air.type = Low                        
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = fvar(12)

[State Hit Spark]
type = Explod
trigger1 = MoveContact = 1
id = 6202
anim = ifelse(MoveHit = 1,6202,6203)
pos = Ceil(ifelse((P2Dist x> -14 && P2Dist x< 52),var(28),ifelse(P2Dist x<= -14,-14,52))),Ceil(fvar(38))
sprpriority = 9
ownpal = 1
facing = 1
ignorehitpause = 1
persistent = 0
postype = p1

[State Hit Spark Y var 1 ]
type = varset
trigger1 = 1
var(26) = Ceil(ifelse(	P2statetype=C,-42,(-50-(pos y))		))
ignorehitpause = 1

[State Hit Spark Y var 2 ]
type = varset
trigger1 = 1
var(25) = Ceil(ifelse((var(26) > -71 && var(26) < -35),var(26),ifelse(var(26)<= -71,-71-(pos y),-35-(pos y))) + var(32))
ignorehitpause = 1

[State Hit Spark Y var 3 ]
type = varset
trigger1 = 1
fvar(38) = ifelse((var(25) > -71 && var(25) < -35),var(25),ifelse(var(25)<= -71,-71,-35))
ignorehitpause = 1

;----------------------------------------------------------------------------
;空中CD
;----------------------------------------------------------------------------
[Statedef 650]
type=A
movetype=A
physics=A
anim = 650
ctrl=0
juggle = 1

[State 650, movetype]
type = StateTypeSet
trigger1 = AnimElem = 6
movetype = I

[State 250, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = 1,1

[State 650, 1]
type=PlaySnd
trigger1 = time = 2
value=0,ifelse(Random < 500 , 1 , 2)

[State 650, 3]
type=HitDef
triggerall = (var(13) = 0 || var(37) = 1)
trigger1 = 1
persistent = 0
attr=A, NA
damage = 113
animtype=Hard
guardflag=M
getpower = 100,20
pausetime = var(45),var(46)
guard.pausetime = var(45),var(47)
sparkno = s6001999
guard.sparkno = s6006999
sparkxy = -10,ifelse(P2statetype = A,-76,ifelse(P2statetype = C,-82,-82))
hitsound= s1,8
guardsound= s1,7
ground.type=High
ground.slidetime = 22
ground.hittime  = var(35)+4
ground.velocity = fvar(10),fvar(11)
air.velocity = fvar(10),fvar(11)
airguard.velocity = -3.6,-2
guard.slidetime = 22
guard.hittime  = var(31)+4
guard.velocity = (ifelse(var(41)=0,fvar(5)*fvar(15),ifelse(var(41)=1,fvar(6)*fvar(15),fvar(6)*fvar(15))))
fall=1
air.type = High                        
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = fvar(12)

[State Hit Spark]
type = Explod
trigger1 = MoveContact = 1
id = 6202
anim = ifelse(MoveHit = 1,6202,6203)
pos = Ceil(ifelse((P2Dist x> 4 && P2Dist x< 67),var(28),ifelse(P2Dist x<= 4,4,67))),Ceil(fvar(38))
sprpriority = 9
ownpal = 1
facing = 1
ignorehitpause = 1
persistent = 0
postype = p1

[State Hit Spark Y var 1 ]
type = varset
trigger1 = 1
var(26) = Ceil(ifelse(	P2statetype=C,-67,(-70-(pos y))		))
ignorehitpause = 1

[State Hit Spark Y var 2 ]
type = varset
trigger1 = 1
var(25) = Ceil(ifelse((var(26) > -100 && var(26) < -60),var(26),ifelse(var(26)<= -100,-100-(pos y),-60-(pos y))) + var(32))
ignorehitpause = 1

[State Hit Spark Y var 3 ]
type = varset
trigger1 = 1
fvar(38) = ifelse((var(25) > -100 && var(25) < -60),var(25),ifelse(var(25)<= -100,-100,-60))
ignorehitpause = 1

[State 650, 0]
type = varset
trigger1 = movehit > 0
var(13) = 1
ignorehitpause = 1
persistent = 0

;----------------------------------------------------------------------------
;突进(连续中)
;----------------------------------------------------------------------------
[Statedef 700]
type=S
movetype=A
physics=S
anim = 700
poweradd= 200
ctrl=0
juggle = 7

[state 700]
type = nothitby
trigger1 = Time <= 12
value = SCA

[state 700]
type = hitby
trigger1 = Time <= 12
value = SCA, ST, HT, NT

[State 700, 3]
type = Afterimage
trigger1 = Time = 0
time = 9
length = 9
PalBright   =   0,  0,  0
PalContrast = 128,128,128
PalAdd      =   0,  0,  0
PalMul      =  1,1,1
FrameGap = 3
Trans = Add1

[State 700, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 5
movetype = I

[State 700, velset]
type = velset
trigger1 = time>=0 && time<=9
x=2

[State 700, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = 1,4

[State 700, 1]
type=PlaySnd
trigger1 = time = 2
value=0,ifelse(Random < 500 , 1 , 2)

[State 700, 2]
type = HitDef
trigger1 = animelem = 4,=1
persistent = 0
attr = S, NA
animtype  = Hard
damage    = 73
guardflag = M
getpower = 300,150
pausetime = var(45),var(46)
guard.pausetime = var(45),var(47)
sparkno = s6001999
guard.sparkno = s6006999
sparkxy = -10,ifelse(P2statetype = A,-108,ifelse(P2statetype = C,-108,-108))
hitsound = s2,9
guardsound = s1,7
ground.type = high
ground.slidetime = 18
ground.hittime  = var(35)
ground.velocity = ifelse(var(41)=0,fvar(3),ifelse(var(41)=1,fvar(4),fvar(4))),0
air.velocity = fvar(10),fvar(11)
airguard.velocity = -3.6,-2
guard.slidetime = 18
guard.hittime  = var(31)
guard.velocity = ifelse(var(41)=0,fvar(3)*fvar(15),ifelse(var(41)=1,fvar(4)*fvar(15),fvar(4)*fvar(15)))
air.type = high
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = fvar(12)

[State Hit Spark]
type = Explod
trigger1 = MoveContact = 1
id = 6202
anim = ifelse(MoveHit = 1,6202,6203)
pos = Ceil(ifelse((P2Dist x> 28 && P2Dist x< 79),var(28),ifelse(P2Dist x<= 28,28,79))),Ceil(fvar(38))
sprpriority = 9
ownpal = 1
facing = 1
ignorehitpause = 1
persistent = 0
postype = p1

[State Hit Spark Y var 1 ]
type = varset
trigger1 = 1
var(26) = Ceil(ifelse(	P2statetype=C,-61,(-61-(pos y))		))
ignorehitpause = 1

[State Hit Spark Y var 2 ]
type = varset
trigger1 = 1
var(25) = Ceil(ifelse((var(26) > -87 && var(26) < -1),var(26),ifelse(var(26)<= -87,-87-(pos y),-1-(pos y))) + var(32))
ignorehitpause = 1

[State Hit Spark Y var 3 ]
type = varset
trigger1 = 1
fvar(38) = ifelse((var(25) > -87 && var(25) < -1),var(25),ifelse(var(25)<= -87,-87,-1))
ignorehitpause = 1

[State 700,changestate ]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;----------------------------------------------------------------------------
;突进
;----------------------------------------------------------------------------
[Statedef 710]
type=S
movetype=A
physics=S
anim = 710
poweradd= 200
ctrl=0
juggle = 7

[State 710, 3]
type = Afterimage
trigger1 = Time = 0
time = 9
length = 9
PalBright   =   0,  0,  0
PalContrast = 128,128,128
PalAdd      =   0,  0,  0
PalMul      =  1,1,1
FrameGap = 3
Trans = Add1

[state 700]
type = hitby
trigger1 = Time <= 12
value = SCA, ST, HT, NT

[State 700, velset]
type = velset
trigger1 = time>=0 && time<=9
x=2

[State 700, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 5
movetype = I

[State 700, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = 1,4

[State 700, 1]
type=PlaySnd
trigger1 = time = 2
value=0,ifelse(Random < 500 , 1 , 2)

[State 700, 2]
type = HitDef
trigger1 = animelem = 4,=1
persistent = 0
attr = S, NA
animtype  = Hard
damage    = 93
guardflag = M
getpower = 300,150
pausetime = var(45),var(46)
guard.pausetime = var(45),var(47)
sparkno = s6001999
guard.sparkno = s6006999
sparkxy = -10,ifelse(P2statetype = A,-108,ifelse(P2statetype = C,-108,-108))
hitsound = s2,9
guardsound = s1,7
ground.type = high
ground.slidetime = 18
ground.hittime  = var(35)
ground.velocity = ifelse(var(41)=0,fvar(3),ifelse(var(41)=1,fvar(4),fvar(4))),0
air.velocity = fvar(10),fvar(11)
airguard.velocity = -3.6,-2
guard.slidetime = 18
guard.hittime  = var(31)
guard.velocity = ifelse(var(41)=0,fvar(3)*fvar(15),ifelse(var(41)=1,fvar(4)*fvar(15),fvar(4)*fvar(15)))
air.type = high
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = fvar(12)

[State Hit Spark]
type = Explod
trigger1 = MoveContact = 1
id = 6202
anim = ifelse(MoveHit = 1,6202,6203)
pos = Ceil(ifelse((P2Dist x> 28 && P2Dist x< 79),var(28),ifelse(P2Dist x<= 28,28,79))),Ceil(fvar(38))
sprpriority = 9
ownpal = 1
facing = 1
ignorehitpause = 1
persistent = 0
postype = p1

[State Hit Spark Y var 1 ]
type = varset
trigger1 = 1
var(26) = Ceil(ifelse(	P2statetype=C,-61,(-61-(pos y))		))
ignorehitpause = 1

[State Hit Spark Y var 2 ]
type = varset
trigger1 = 1
var(25) = Ceil(ifelse((var(26) > -87 && var(26) < -1),var(26),ifelse(var(26)<= -87,-87-(pos y),-1-(pos y))) + var(32))
ignorehitpause = 1

[State Hit Spark Y var 3 ]
type = varset
trigger1 = 1
fvar(38) = ifelse((var(25) > -87 && var(25) < -1),var(25),ifelse(var(25)<= -87,-87,-1))
ignorehitpause = 1

[State 700,changestate ]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;----------------------------------------------------------------------------
;挣脱技
;----------------------------------------------------------------------------
[Statedef 750]
type=A
movetype=I
physics=N
anim = 750
poweradd= -500
ctrl=0
juggle = 10

[State 750,PosFreeze]
type = PosFreeze
trigger1 = 1

[State 750,PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0

[State 750,playsnd]
type = playsnd
trigger1 = time = 1
value = 3,6

[State 750,playsnd]
type = playsnd
trigger1 = time = 0
value = 0,13

[State 750,helper]
type = Helper
trigger1 = time = 0
name = "6407"
pos = 0,0
postype = p1
sprpriority = 9999
stateno = 760
helpertype = normal
keyctrl = 0
bindtime = -1
persistent = 0
ignorehitpause = 1

[State 750,nothitby]
type = nothitby
trigger1 = 1
value = SCA

[State 750,changestate]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;----------------------------------------------------------------------------
;挣脱技helper
;----------------------------------------------------------------------------
[Statedef 760]
type=A
movetype=A
physics=N
anim = 6407
ctrl=0

[State 760, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 3
movetype = I

[State 760, HitDef]
type = HitDef
triggerall = (var(13) = 0 || var(37) = 1)
trigger1 = 1
persistent = 0
attr = S, HA
damage = 30
animtype = Heavy
guardflag = M
getpower = 150,100
pausetime = 0,13
guard.pausetime = 0,11
sparkno = s6000999
guard.sparkno = s6005999
sparkxy = -10,ifelse(P2statetype = A,-84,ifelse(P2statetype = C,-63,-79))
hitsound = s1,8
guardsound = s1, 7
ground.type = High
air.type = High
ground.slidetime = 22
ground.hittime  = 36
ground.velocity = -6.64,-9.09
air.velocity = -6.64,-9.09
airguard.velocity = -3.6,-2
fall=1
fall.recover = 0
guard.slidetime = 22
guard.hittime  = 36
guard.velocity = 17.2
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = 0.523

[State Hit Spark]
type = Explod
trigger1 = MoveContact = 1
id = 6202
anim = ifelse(MoveHit = 1,6202,6206)
pos = Ceil(ifelse((P2Dist x> -100 && P2Dist x< 100),Ceil(P2dist x),ifelse(P2Dist x<= -100,-100,100))),Ceil(fvar(38))
sprpriority = 9
ownpal = 1
facing = 1
ignorehitpause = 1
persistent = 0
postype = p1

[State Hit Spark Y var 1 ]
type = varset
trigger1 = 1
var(26) = Ceil(ifelse(	P2statetype=C,-37,(-80-(pos y))		))
ignorehitpause = 1

[State Hit Spark Y var 2 ]
type = varset
trigger1 = 1
var(25) = Ceil(ifelse((var(26) > -159 && var(26) < 22),var(26),ifelse(var(26)<= -159,-159-(pos y),22-(pos y))) + var(32))
ignorehitpause = 1

[State Hit Spark Y var 3 ]
type = varset
trigger1 = 1
fvar(38) = ifelse((var(25) > -159 && var(25) < 22),var(25),ifelse(var(25)<= -159,-159,22))
ignorehitpause = 1

[State 760]
type = DestroySelf
trigger1 = animtime = 0

;----------------------------------------------------------------------------
;挣脱技(空中)
;----------------------------------------------------------------------------
[Statedef 770]
type=A
movetype=I
physics=N
anim = 780
poweradd= -500
ctrl=0
juggle = 10

[State 750,PlayerPush]
type = PlayerPush
trigger1 = time<=36
value = 0

[State 750,PosFreeze]
type = PosFreeze
trigger1 = time<=36

[State 750,playsnd]
type = playsnd
trigger1 = time = 1
value = 3,6

[State 750,playsnd]
type = playsnd
trigger1 = time = 0
value = 0,13

[State 750,helper]
type = Helper
trigger1 = time = 3
name = "6407"
pos = 0,0
postype = p1
sprpriority = 9999
stateno = 760
helpertype = normal
keyctrl = 0
persistent = 0
ignorehitpause = 1

[State 750,nothitby]
type = nothitby
trigger1 = time >= 0
value = SCA

[state 780,velset]
type = velset
trigger1 = time = [0,2]
y = -10

[state 780,velset]
type = velset
trigger1 = time = [3,36]
y = 0

[state 780,velset]
type = velset
trigger1 = time >36
x = 0
y = 8

[State 780, 6]
type = changestate
trigger1 = pos y >-4
trigger1 = vel y >0
value = 0
ctrl = 1

;----------------------------------------------------------------------------
;前AB滚
;----------------------------------------------------------------------------
[Statedef 900]
type = S
movetype = I
physics = S
poweradd = 200
ctrl = 0
velset = 0,0
anim = 900
facep2 = 1

[State 900, 4]
type = SprPriority
trigger1 = Time = 0
value = -2

[State 900,0]
type = NotHitBy
trigger1 = Time = 0
time = 25
value = SCA

[State 900,1]
type = HitBy
trigger1 = Time = 0
value = SCA, NT, ST, HT
time = 25

[State 900, 2]
type = PlaySnd
trigger1 = Time = 0
value = 0,3

[State 900,2]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 900,3]
type = posadd
trigger1 = time = [6,24]
x = 5

[State 900, 3]
type = Afterimage
trigger1 = Time = 0
time = 13
length = 9
PalBright   =   0,  0,  0
PalContrast = 128,128,128
PalAdd      =   0,  0,  0
PalMul      =  1,1,1;.9, .9, .9
FrameGap = 3
Trans = Add1

[State 900, Afterimage]
type = AfterImagetime
trigger1 = time%2 = 0 && time <=12
time = 2

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

;----------------------------------------------------------------------------
;前冲AB滚
;----------------------------------------------------------------------------
[Statedef 910]
type = S
movetype = I
physics = S
poweradd = 300
ctrl = 0
velset = 0,0
anim = 900
facep2 = 1

[State 910, 4]
type = SprPriority
trigger1 = Time = 0
value = -2

[State 910,0]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 28

[State 910,1]
type = HitBy
trigger1 = Time = 0
value = SCA, NT, ST, HT
time = 28

[State 910, 2]
type = PlaySnd
trigger1 = Time = 0
value = 0,3

[State 910,2]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 910,3]
type = posadd
trigger1 = time = [6,24]
x = 7

;[State 910,9]
;type = AfterImage
;trigger1 = Time = 0
;time = 12
;length = 15
;palbright = 40,40,40
;palcontrast = 250,250,250
;palpostbright = -80,-80,-80
;timegap = 1
;flamegap = 1
;trans = add1

[State 910, 3]
type = Afterimage
trigger1 = Time = 0
time = 13
length = 9
PalBright   =   0,  0,  0
PalContrast = 128,128,128
PalAdd      =   0,  0,  0
PalMul      =  1,1,1;.9, .9, .9
FrameGap = 3
Trans = Add1

[State 910, Afterimage]
type = AfterImagetime
trigger1 = time%2 = 0 && time <=12
time = 2

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

;----------------------------------------------------------------------------
;防御中AB滚
;----------------------------------------------------------------------------
[Statedef 920]
type = S
movetype = I
physics = S
ctrl = 0
anim = 920
velset = 0,0
poweradd=-1000
facep2 = 1

[State 920, 4]
type = SprPriority
trigger1 = Time = 0
value = -2

[State 900,0]
type = NotHitBy
trigger1 = Time = 0
time = 32
value = SCA

[State Hit Spark]
type = Explod
trigger1 = AnimElem = 2
id = 6204
anim = 6204
pos = 5,-55
sprpriority = 9
ownpal = 1
facing = 1
ignorehitpause = 1
persistent = 0
postype = p1

;[State 920,1]
;type = HitBy
;trigger1 = Time >= 0
;value = SCA, NT, ST, HT

[State 920, 2]
type = PlaySnd
trigger1 = Time = 0
value = 0,3

[State 920,2]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 920,3]
type = posadd
trigger1 = time = [11,29]
x = 5

[State 92AfterImage]
type = AfterImage
trigger1 = time = 0
time = 32
length = 8
palcolor = 256
palinvertall = 0
palbright = 20,20,30
palcontrast = 100,100,220
palpostbright = 0, 0, 0
paladd = 10,10,45
palmul = .65,.65,.85
timegap = 1
framegap = 2
trans = add1

[State 920, Afterimage]
type = AfterImagetime
trigger1 = time%2 = 0 && time <=31
time = 2

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

;----------------------------------------------------------------------------
;防御中AB滚
;----------------------------------------------------------------------------
[Statedef 930]
type = S
movetype = I
physics = S
ctrl = 0
anim = 930
velset = 0,0
poweradd=-1000
facep2 = 1

[State 930, 4]
type = SprPriority
trigger1 = Time = 0
value = -2

[State 900,0]
type = NotHitBy
trigger1 = Time = 0
time = 32
value = SCA

[State 930,PosFreeze]
type = PosFreeze
trigger1 = Time >= 1 && Time <= 11

[State 930, 0]
type = Envcolor
trigger1 = Time = 0
persistent = 0
ignorehitpause = 1
value = 255, 255, 255
time = 4
under = 1
supermove = 1

[State 930, 2]
type = PlaySnd
trigger1 = Time = 0
value = 0,3

[State 930,2]
type = PlayerPush
trigger1 = Time >= 0
value = 0

;[State 930,3]
;type = VelSet
;trigger1 = time = 12
;x = 5.2

;[State 930,4]
;type = VelSet
;trigger1 = time = 29
;x = 0

[State 930,3]
type = posadd
trigger1 = time = 12 || time = 17 || time = 22 || time = 27
x = 6

[State 930,3]
type = posadd
trigger1 = time = 13 || time = 14 || time = 15 || time = 16 || time = 18 || time = 19 || time = 20 || time = 21
trigger2 = time = 23 || time = 24 || time = 25 || time = 26 || time = 28
x = 5

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

;----------------------------------------------------------------------------
;AB滚（向后）
;----------------------------------------------------------------------------
[Statedef 950]
type = S
movetype = I
physics = S
poweradd = 200
ctrl = 0
velset = 0,0
anim = 950
facep2 = 1

[State 950, 4]
type = SprPriority
trigger1 = Time = 0
value = -2

[State 910,0]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 28

[State 910,1]
type = HitBy
trigger1 = Time = 0
value = SCA, NT, ST, HT
time = 28

[State 950, 2]
type = PlaySnd
trigger1 = Time = 0
value = 0,3

[State 950,2]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 950,3]
type = posadd
trigger1 = time = [6,24]
x = -5

;[State 950,9]
;type = AfterImage
;trigger1 = Time = 0
;time = 12
;length = 15
;palbright = 40,40,40
;palcontrast = 250,250,250
;palpostbright = -80,-80,-80
;timegap = 1
;flamegap = 1
;trans = add1

[State 950, 3]
type = Afterimage
trigger1 = Time = 0
time = 13
length = 9
PalBright   =   0,  0,  0
PalContrast = 128,128,128
PalAdd      =   0,  0,  0
PalMul      =  1,1,1;.9, .9, .9
FrameGap = 3
Trans = Add1

[State 950, Afterimage]
type = AfterImagetime
trigger1 = time%2 = 0 && time <=12
time = 2

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

;----------------------------------------------------------------------------
;防御中AB滚（向后）
;----------------------------------------------------------------------------
[Statedef 960]
type = S
movetype = I
physics = S
ctrl = 0
anim = 960
velset = 0,0
poweradd=ifelse(var(20)=0,-1000,300)
facep2 = 1

[State 960, 4]
type = SprPriority
trigger1 = Time = 0
value = -2

[State 900,0]
type = NotHitBy
trigger1 = Time = 0
time = ifelse(var(20)=0,28,36)
value = SCA

;[State 960,1]
;type = HitBy
;trigger1 = Time >= 0
;value = SCA, NT, ST, HT

[State 960, 2]
type = PlaySnd
trigger1 = Time = 0
value = 0,3

[State Hit Spark]
type = Explod
trigger1 = AnimElem = 2
id = 6204
anim = 6204
pos = 5,-55
sprpriority = 9
ownpal = 1
facing = 1
ignorehitpause = 1
persistent = 0
postype = p1

[State 960,2]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 960,3]
type = posadd
trigger1 = time = [11,29]
x = -5

[State 960,AfterImage]
type = AfterImage
trigger1 = time = 0
time = 32
length = 8
palcolor = 256
palinvertall = 0
palbright = 20,20,30
palcontrast = 100,100,220
palpostbright = 0, 0, 0
paladd = 10,10,45
palmul = .65,.65,.85
timegap = 1
framegap = 2
trans = add1

[State 920, Afterimage]
type = AfterImagetime
trigger1 = time%2 = 0 && time <=31
time = 2

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

;----------------------------------------------------------------------------
;沙鹰(站)
;----------------------------------------------------------------------------
[Statedef 1000]
type    = S
movetype= A
physics = S
juggle = 10
velset = 0,0
poweradd= 100
ctrl = 0
anim = 1000
facep2 = 1

[State 1000,Explod]
type = Explod
trigger1 = animelem = 5
id = 6003
anim = 6003
pos = 39,-96
mask=0
sprpriority = 7
ownpal = 1
facing = 1
ignorehitpause = 1
persistent = 0
postype = p1

[State 1000]
type = StateTypeSet
trigger1 = AnimElem = 6
movetype = I

[State 1000,PosFreeze]
type = PosFreeze
trigger1 = 1

[State 210, 2]
type = PlaySnd
trigger1 = animelem = 5
value = 3,2

[State 245, 2]
type = HitDef
triggerall = (var(13) = 0 || var(37) = 1)
trigger1 = 1
persistent = 0
attr = S, NA
animtype  = Hard
damage    = 90,15
guardflag = M
getpower = 100,150
pausetime = var(45),var(46)
guard.pausetime = var(45),var(47)
sparkno = s6001999
guard.sparkno = s6006999
sparkxy = -20,ifelse(P2statetype = A,-52,ifelse(P2statetype = C,-32,-48))
hitsound = s1,8
guardsound = s1,24
ground.type = High
ground.slidetime = 18
ground.hittime  = var(35)
ground.velocity = ifelse(var(41)=0,fvar(3)+6,ifelse(var(41)=1,fvar(4)+6,fvar(4)+6)),0
air.velocity = fvar(10),fvar(11)
airguard.velocity = -3.6,-2
guard.slidetime = 18
guard.hittime  = var(31)
guard.velocity = ifelse(var(41)=0,fvar(3)*fvar(15),ifelse(var(41)=1,fvar(4)*fvar(15),fvar(4)*fvar(15)))
air.type = High
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = fvar(12)

[State Hit Spark]
type = Explod
trigger1 = MoveContact = 1
id = 6207
anim = ifelse(MoveHit = 1,6207,6206)
pos = Ceil(ifelse((P2Dist x> 0 && P2Dist x< 120),var(28),ifelse(P2Dist x<= 0,0,120))),Ceil(fvar(38))
sprpriority = 9
ownpal = 1
facing = 1
ignorehitpause = 1
persistent = 0
postype = p1

[State Hit Spark Y var 1 ]
type = varset
trigger1 = 1
var(26) = Ceil(ifelse(	P2statetype=C,-68,(-102-(pos y))		))
ignorehitpause = 1

[State Hit Spark Y var 2 ]
type = varset
trigger1 = 1
var(25) = Ceil(ifelse((var(26) > -132 && var(26) < -48),var(26),ifelse(var(26)<= -132,-132-(pos y),-48-(pos y))) + var(32))
ignorehitpause = 1

[State Hit Spark Y var 3 ]
type = varset
trigger1 = 1
fvar(38) = ifelse((var(25) > -132 && var(25) < -48),var(25),ifelse(var(25)<= -132,-132,-48))
ignorehitpause = 1

[State 245, 4]
type = ChangeState
triggerall = MoveContact
trigger1 = command = "1000"
trigger1 = animelem = 6,>=0
trigger1 = animelem = 8,<=3
value = 1020

[State 245, 4]
type = ChangeState
triggerall = MoveContact
trigger1 = command = "1010"
trigger1 = animelem = 6,>=0
trigger1 = animelem = 8,<=3
value = 1030

[State 245, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;----------------------------------------------------------------------------
;沙鹰(蹲)
;----------------------------------------------------------------------------
[Statedef 1010]
type    = S
movetype= A
physics = S
velset = 0,0
poweradd= 100
ctrl = 0
juggle = 10
anim = 1010
facep2 = 1

[State 1000,Explod]
type = Explod
trigger1 = animelem = 5
id = 6003
anim = 6003
pos = 39,-59
mask=0
sprpriority = 7
ownpal = 1
facing = 1
ignorehitpause = 1
persistent = 0
postype = p1

[State 1000]
type = StateTypeSet
trigger1 = AnimElem = 6
movetype = I

[State 1000,PosFreeze]
type = PosFreeze
trigger1 = 1

[State 210, 2]
type = PlaySnd
trigger1 = animelem = 5
value = 3,2

[State 245, 2]
type = HitDef
triggerall = (var(13) = 0 || var(37) = 1)
trigger1 = 1
persistent = 0
attr = S, NA
animtype  = Hard
damage    = 90,15
guardflag = L
getpower = 100,150
pausetime = var(45),var(46)
guard.pausetime = var(45),var(47)
sparkno = s6001999
guard.sparkno = s6006999
sparkxy = -20,ifelse(P2statetype = A,-52,ifelse(P2statetype = C,-32,-48))
hitsound = s1,8
guardsound = s1,24
ground.type = High
ground.slidetime = 18
ground.hittime  = var(35)
ground.velocity = ifelse(var(41)=0,fvar(3)+6,ifelse(var(41)=1,fvar(4)+6,fvar(4)+6)),0
air.velocity = fvar(10),fvar(11)
airguard.velocity = -3.6,-2
guard.slidetime = 18
guard.hittime  = var(31)
guard.velocity = ifelse(var(41)=0,fvar(3)*fvar(15),ifelse(var(41)=1,fvar(4)*fvar(15),fvar(4)*fvar(15)))
air.type = High
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = fvar(12)

[State Hit Spark]
type = Explod
trigger1 = MoveContact = 1
id = 6207
anim = ifelse(MoveHit = 1,6207,6206)
pos = Ceil(ifelse((P2Dist x> 0 && P2Dist x< 120),var(28),ifelse(P2Dist x<= 0,0,120))),Ceil(fvar(38))
sprpriority = 9
ownpal = 1
facing = 1
ignorehitpause = 1
persistent = 0
postype = p1

[State Hit Spark Y var 1 ]
type = varset
trigger1 = 1
var(26) = Ceil(ifelse(	P2statetype=C,-59,(-59-(pos y))		))
ignorehitpause = 1

[State Hit Spark Y var 2 ]
type = varset
trigger1 = 1
var(25) = Ceil(ifelse((var(26) > -132 && var(26) < -48),var(26),ifelse(var(26)<= -132,-132-(pos y),-48-(pos y))) + var(32))
ignorehitpause = 1

[State Hit Spark Y var 3 ]
type = varset
trigger1 = 1
fvar(38) = ifelse((var(25) > -132 && var(25) < -48),var(25),ifelse(var(25)<= -132,-132,-48))
ignorehitpause = 1

[State 245, 4]
type = ChangeState
triggerall = MoveContact
trigger1 = command = "1000"
trigger1 = animelem = 6,>=0
trigger1 = animelem = 8,<=3
value = 1020

[State 245, 4]
type = ChangeState
triggerall = MoveContact
trigger1 = command = "1010"
trigger1 = animelem = 6,>=0
trigger1 = animelem = 8,<=3
value = 1030

[State 245, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;----------------------------------------------------------------------------
;沙鹰(站)连续
;----------------------------------------------------------------------------
[Statedef 1020]
type    = S
movetype= A
physics = S
juggle = 10
velset = 0,0
poweradd= 100
ctrl = 0
anim = 1000
facep2 = 1

[State 1000,Explod]
type = Explod
trigger1 = animelem = 5
id = 6003
anim = 6003
pos = 39,-96
mask=0
sprpriority = 7
ownpal = 1
facing = 1
ignorehitpause = 1
persistent = 0
postype = p1

[State 1000]
type = StateTypeSet
trigger1 = AnimElem = 6
movetype = I

[State 1000,PosFreeze]
type = PosFreeze
trigger1 = 1

[State 210, 2]
type = PlaySnd
trigger1 = animelem = 5
value = 3,2

[State 245, 2]
type = HitDef
triggerall = (var(13) = 0 || var(37) = 1)
trigger1 = 1
persistent = 0
attr = S, NA
animtype  = Hard
damage    = 90,15
guardflag = M
getpower = 100,150
pausetime = var(45),var(46)
guard.pausetime = var(45),var(47)
sparkno = s6001999
guard.sparkno = s6006999
sparkxy = -20,ifelse(P2statetype = A,-52,ifelse(P2statetype = C,-32,-48))
hitsound = s1,8
guardsound = s1,24
ground.type = High
ground.slidetime = 18
ground.hittime  = var(35)
ground.velocity = ifelse(var(41)=0,fvar(3)+6,ifelse(var(41)=1,fvar(4)+6,fvar(4)+6)),0
air.velocity = fvar(10),fvar(11)
airguard.velocity = -3.6,-2
guard.slidetime = 18
guard.hittime  = var(31)
guard.velocity = ifelse(var(41)=0,fvar(3)*fvar(15),ifelse(var(41)=1,fvar(4)*fvar(15),fvar(4)*fvar(15)))
air.type = High
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = fvar(12)

[State Hit Spark]
type = Explod
trigger1 = MoveContact = 1
id = 6207
anim = ifelse(MoveHit = 1,6207,6206)
pos = Ceil(ifelse((P2Dist x> 0 && P2Dist x< 120),var(28),ifelse(P2Dist x<= 0,0,120))),Ceil(fvar(38))
sprpriority = 9
ownpal = 1
facing = 1
ignorehitpause = 1
persistent = 0
postype = p1

[State Hit Spark Y var 1 ]
type = varset
trigger1 = 1
var(26) = Ceil(ifelse(	P2statetype=C,-68,(-102-(pos y))		))
ignorehitpause = 1

[State Hit Spark Y var 2 ]
type = varset
trigger1 = 1
var(25) = Ceil(ifelse((var(26) > -132 && var(26) < -48),var(26),ifelse(var(26)<= -132,-132-(pos y),-48-(pos y))) + var(32))
ignorehitpause = 1

[State Hit Spark Y var 3 ]
type = varset
trigger1 = 1
fvar(38) = ifelse((var(25) > -132 && var(25) < -48),var(25),ifelse(var(25)<= -132,-132,-48))
ignorehitpause = 1

[State 245, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;----------------------------------------------------------------------------
;沙鹰(蹲)连续
;----------------------------------------------------------------------------
[Statedef 1030]
type    = S
movetype= A
physics = S
velset = 0,0
juggle = 10
poweradd= 100
ctrl = 0
anim = 1010
facep2 = 1

[State 1000,Explod]
type = Explod
trigger1 = animelem = 5
id = 6003
anim = 6003
pos = 39,-59
mask=0
sprpriority = 7
ownpal = 1
facing = 1
ignorehitpause = 1
persistent = 0
postype = p1

[State 1000]
type = StateTypeSet
trigger1 = AnimElem = 6
movetype = I

[State 1000,PosFreeze]
type = PosFreeze
trigger1 = 1

[State 210, 2]
type = PlaySnd
trigger1 = animelem = 5
value = 3,2

[State 245, 2]
type = HitDef
triggerall = (var(13) = 0 || var(37) = 1)
trigger1 = 1
persistent = 0
attr = S, NA
animtype  = Hard
damage    = 90,15
guardflag = L
getpower = 100,150
pausetime = var(45),var(46)
guard.pausetime = var(45),var(47)
sparkno = s6001999
guard.sparkno = s6006999
sparkxy = -20,ifelse(P2statetype = A,-52,ifelse(P2statetype = C,-32,-48))
hitsound = s1,8
guardsound = s1,24
ground.type = High
ground.slidetime = 18
ground.hittime  = var(35)
ground.velocity = ifelse(var(41)=0,fvar(3)+6,ifelse(var(41)=1,fvar(4)+6,fvar(4)+6)),0
air.velocity = fvar(10),fvar(11)
airguard.velocity = -3.6,-2
guard.slidetime = 18
guard.hittime  = var(31)
guard.velocity = ifelse(var(41)=0,fvar(3)*fvar(15),ifelse(var(41)=1,fvar(4)*fvar(15),fvar(4)*fvar(15)))
air.type = High
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = fvar(12)

[State Hit Spark]
type = Explod
trigger1 = MoveContact = 1
id = 6207
anim = ifelse(MoveHit = 1,6207,6206)
pos = Ceil(ifelse((P2Dist x> 0 && P2Dist x< 120),var(28),ifelse(P2Dist x<= 0,0,120))),Ceil(fvar(38))
sprpriority = 9
ownpal = 1
facing = 1
ignorehitpause = 1
persistent = 0
postype = p1

[State Hit Spark Y var 1 ]
type = varset
trigger1 = 1
var(26) = Ceil(ifelse(	P2statetype=C,-59,(-59-(pos y))		))
ignorehitpause = 1

[State Hit Spark Y var 2 ]
type = varset
trigger1 = 1
var(25) = Ceil(ifelse((var(26) > -132 && var(26) < -48),var(26),ifelse(var(26)<= -132,-132-(pos y),-48-(pos y))) + var(32))
ignorehitpause = 1

[State Hit Spark Y var 3 ]
type = varset
trigger1 = 1
fvar(38) = ifelse((var(25) > -132 && var(25) < -48),var(25),ifelse(var(25)<= -132,-132,-48))
ignorehitpause = 1

[State 245, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;----------------------------------------------------------------------------
;祝福
;----------------------------------------------------------------------------
[Statedef 1050]
type    = S
movetype= I
physics = S
velset = 0,0
poweradd= 200
ctrl = 0
anim = 1050
facep2 = 1

[State 1050,PlaySnd]
type = PlaySnd
trigger1 = time = 12
value = 0,12

[State 1050,Helper]
type = Helper
trigger1 = time = 12
name = "H1"
ID = 1050
pos = 15,-82
postype = p1
sprpriority = 9999
stateno = 1051
helpertype = normal
keyctrl = 0
persistent = 0
ignorehitpause = 1
ownpal = 1

[State 1050,Helper]
type = Helper
trigger1 = time = 12
name = "H4"
ID = 1050
pos = 15,-88
postype = p1
sprpriority = 9999
stateno = 1054
helpertype = normal
keyctrl = 0
persistent = 0
ignorehitpause = 1
ownpal = 1

[State 10050, 4]
type = varset
trigger1 = time = 0
var(26) = 0

[State 10050, 4]
type = varset
trigger1 = P2statetype = C
trigger1 = 1
var(26) = 30 + floor(p2bodydist y)

[State 10050, 4]
type = varset
trigger1 = 1
trigger1 = P2statetype != C
var(26) = floor(p2bodydist y)

[State 1000,PosFreeze]
type = PosFreeze
trigger1 = 1

[State 245, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;----------------------------------------------------------------------------
;祝福helper1
;----------------------------------------------------------------------------
[Statedef 1051]
type    = A
movetype= A
physics = N
velset = 0,0
ctrl = 0

[State 1051, 1]
type = VarRandom
trigger1 = Time = 0
v = 1
range = 0,3

[State 1051, 5]
type = Changeanim
trigger1 = time = 0
value = ifelse(var(1)=0,6402,ifelse(var(1)=1,6403,ifelse(var(1)=2,6404,6405)))

[State 1051, velset]
type = velset
trigger1 = 1
x = 2
y = 0.3

[State 1051, HitDef]
type = HitDef
trigger1 = 1
persistent = 0
attr = S, HA
damage = 60,10
animtype = Heavy
guardflag = L
getpower = 150,100
pausetime = 0,13
guard.pausetime = 0,11
sparkno = s6207999
guard.sparkno = s6206999
hitsound = s1,25
guardsound = s1, 24
ground.type = High
air.type = High
ground.slidetime = 24
ground.hittime  = 36
ground.velocity = -4.64,-8.09
air.velocity = -4.64,-8.09
airguard.velocity = -3.6,-2
fall=1
fall.recover = 0
guard.slidetime = 22
guard.hittime  = 36
guard.velocity = -17.2
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = 0.523

[State 3000,Explod]
type = Explod
trigger1 = movecontact
anim = ifelse(movehit,6207,6206)
pos = 0,0
sprpriority = 7
ownpal = 1
ignorehitpause = 1
bindtime = -1
supermovetime = -1
persistent = 0
postype = p1

[State 1051,DestroySelf]
type = DestroySelf
trigger1 = time = 180
trigger2 = MoveContact
trigger3 = MoveReversed

;----------------------------------------------------------------------------
;祝福helper4
;----------------------------------------------------------------------------
[Statedef 1054]
type    = A
movetype= A
physics = N
velset = 0,0
ctrl = 0

[State 1051, 5]
type = Changeanim
trigger1 = time = 0
value = ifelse(var(1)=0,6402,ifelse(var(1)=1,6403,ifelse(var(1)=2,6404,6405)))

[State 1051, velset]
type = velset
trigger1 = 1
x = 2
y = -0.3

[State 1051, HitDef]
type = HitDef
trigger1 = 1
persistent = 0
attr = S, HA
damage = 60,10
animtype = Heavy
guardflag = M
getpower = 150,100
pausetime = 0,13
guard.pausetime = 0,11
sparkno = s6207999
guard.sparkno = s6206999
sparkxy = -10,parent,var(26)
hitsound = s1,25
guardsound = s1, 24
ground.type = High
air.type = High
ground.slidetime = 24
ground.hittime  = 36
ground.velocity = -4.64,-8.09
air.velocity = -4.64,-8.09
airguard.velocity = -3.6,-2
fall=1
fall.recover = 0
guard.slidetime = 22
guard.hittime  = 36
guard.velocity = -17.2
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = 0.523

[State 3000,Explod]
type = Explod
trigger1 = movecontact
anim = ifelse(movehit,6207,6206)
pos = 0,0
sprpriority = 7
ownpal = 1
ignorehitpause = 1
bindtime = -1
supermovetime = -1
persistent = 0
postype = p1

[State 1051,DestroySelf]
type = DestroySelf
trigger1 = time = 180
trigger2 = MoveContact
trigger3 = MoveReversed

;----------------------------------------------------------------------------
;小祝福
;----------------------------------------------------------------------------
[Statedef 1060]
type    = S
movetype= I
physics = S
velset = 0,0
poweradd= 200
ctrl = 0
anim = 1050
facep2 = 1

[State 1060,PlaySnd]
type = PlaySnd
trigger1 = time = 12
value = 0,ifelse(random<100,12,9999)

[State 1060,间隔Helper]
type = Helper
trigger1 = time = 11
pos = 15,-82
ID = 1062
postype = p1
sprpriority = 9999
stateno = 1062
helpertype = normal
keyctrl = 0
persistent = 0
ignorehitpause = 1
ownpal = 1

[State 1060,攻击Helper]
type = Helper
trigger1 = time = 12
pos = 15,-82
ID = 1061
postype = p1
sprpriority = 9999
stateno = 1061
helpertype = normal
keyctrl = 0
persistent = 0
ignorehitpause = 1
ownpal = 1

[State 1060, 4]
type = varset
trigger1 = time = 0
var(26) = 0

[State 1060, 4]
type = varset
trigger1 = P2statetype = C
var(26) = 30 + floor(p2bodydist y)

[State 1060, 4]
type = varset
trigger1 = P2statetype != C
var(26) = floor(p2bodydist y)

[State 1000,PosFreeze]
type = PosFreeze
trigger1 = 1

[State 245, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;----------------------------------------------------------------------------
;小祝福helper1
;----------------------------------------------------------------------------
[Statedef 1061]
type    = A
movetype= A
physics = N
velset = 0,0
ctrl = 0

[State 1051, 5]
type = VarRandom
trigger1 = time = 0
v = 1
range = 0,4

[State 1051, 5]
type = Changestate
trigger1 = var(1) = 4
value = 1063

[State 1060, 4]
type = VarRandom
trigger1 = time = 0
v = 17
range = 0,1

[State 1060, 4]
type = varset
trigger1 = time = 0
fvar(17) = pi/2

[State 1060, 4]
type = varadd
trigger1 = time >= 0
fv = 17
value = pi/36

[State 1060, 4]
type = varset
trigger1 = time%5 = 0
fvar(18) = random*4/999+1

[State 1060, velset]
type = velset
trigger1 = 1
x = fvar(18)
y = ifelse(var(17)=0,3*sin(fvar(17)),3*sin(fvar(17)+pi))

[State 1051, 5]
type = Changeanim
trigger1 = time = 0
value = ifelse(var(1)=0,6402,ifelse(var(1)=1,6403,ifelse(var(1)=2,6404,6405)))

[State 1051, HitDef]
type = HitDef
trigger1 = 1
persistent = 0
attr = S, HA
damage = 70,10
animtype = Heavy
guardflag = M
getpower = 150,100
pausetime = 0,13
guard.pausetime = 0,11
sparkno = s6207999
guard.sparkno = s6206999
sparkxy = -10,parent,var(26)
hitsound = s1,25
guardsound = s1, 24
ground.type = High
air.type = High
ground.slidetime = 17
ground.hittime  = 20
ground.velocity = -4.64
air.velocity = -4.64,-8.09
airguard.velocity = -3.6,-2
guard.slidetime = 22
guard.hittime  = 36
guard.velocity = -17.2
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = 0.523

[State 3000,Explod]
type = Explod
trigger1 = movecontact
anim = ifelse(movehit,6207,6206)
pos = 0,0
sprpriority = 7
ownpal = 1
ignorehitpause = 1
bindtime = -1
supermovetime = -1
persistent = 0
postype = p1

[State 1051,DestroySelf]
type = DestroySelf
trigger1 = time = 360
trigger2 = MoveContact
trigger3 = MoveReversed

;----------------------------------------------------------------------------
;小祝福间隔helper1
;----------------------------------------------------------------------------
[Statedef 1062]
type    = A
movetype= I
physics = N
velset = 0,0
ctrl = 0
anim = 9998

[State 1051, velset]
type = velset
trigger1 = 1
x = 2
y = 0

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

[State 3002, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0

[State 1051,DestroySelf]
type = DestroySelf
trigger1 = time = 60
trigger2 = MoveContact
trigger3 = MoveReversed

;----------------------------------------------------------------------------
;小祝福爱心helper
;----------------------------------------------------------------------------
[Statedef 1063]
type    = A
movetype= A
physics = N
velset = 0,0
anim = 6416
ctrl = 0

[State 1060, 4]
type = VarRandom
trigger1 = time = 0
v = 17
range = 0,1

[State 1060, 4]
type = varset
trigger1 = time = 0
fvar(17) = pi/2

[State 1060, 4]
type = varadd
trigger1 = time >= 0
fv = 17
value = pi/36

[State 1060, 4]
type = varset
trigger1 = time%5 = 0
fvar(18) = random*4/999+1

[State 1060, velset]
type = velset
trigger1 = 1
x = fvar(18)
y = ifelse(var(17)=0,3*sin(fvar(17)),3*sin(fvar(17)+pi))

[State 1051, HitDef]
type = HitDef
trigger1 = time%15 = 0
attr = S, HA
damage = 30,10
animtype = Heavy
guardflag = M
getpower = 40,10
pausetime = 0,13
guard.pausetime = 0,11
sparkno = s6207
guard.sparkno = s6206
sparkxy = -10,parent,var(26)
hitsound = s1,25
guardsound = s1, 24
ground.type = High
air.type = High
ground.slidetime = 22
ground.hittime  = 36
ground.velocity = -4.64,-8.09
air.velocity = -4.64,-8.09
airguard.velocity = -3.6,-2
fall=1
fall.recover = 0
guard.slidetime = 22
guard.hittime  = 36
guard.velocity = -17.2
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = 0.523
palfx.time = 90
palfx.mul = 255,161,243
palfx.add = 150,20,139
palfx.sinadd = 100,100,100,16

[State 1051,DestroySelf]
type = DestroySelf
trigger1 = time = 360

;----------------------------------------------------------------------------
;半月斩
[Statedef 1100]
type    = S
movetype= A
physics = S
velset = 0,0
poweradd= 200
ctrl = 0
juggle = 7
anim = 1100

[State 1000,PosFreeze]
type = PosFreeze
trigger1 = 1

[State 1100, movetype]
type = StateTypeSet
trigger1 = AnimElem = 5
movetype = I

[State 1100, playsnd]
type = playsnd
trigger1 = AnimElem = 2
value = 3,5

[State 1100, playsnd]
type = playsnd
trigger1 = AnimElem = 2
value = 1,15

[State Hit Spark]
type = Explod
trigger1 = time = 4
id = 6406
anim = 6406
pos = 0,0
sprpriority = -1
ownpal = 1
facing = 1
ignorehitpause =0
persistent = 0
postype = p1

[State 1100, HitDef]
type=HitDef
trigger1 = animelem = 2,=1 
persistent = 0
attr=A, HA
priority = 999999,hit
damage = 80,10
animtype=Hard
guardflag=M
getpower = 300,100
pausetime = var(45),var(46)
guard.pausetime = var(45),var(47)
sparkno = s6205
guard.sparkno = s6206
sparkxy = -2,ifelse(P2statetype = A,-76,ifelse(P2statetype = C,-82,-82))
hitsound= s21,1
guardsound= s1,24
ground.type=High
ground.slidetime = 22
ground.hittime  = var(35)
ground.velocity = 0,fvar(11)-6
air.velocity = 0,fvar(11)-6
airguard.velocity = -3.6,-2
guard.slidetime = 22
guard.hittime  = var(31)+4
guard.velocity = (ifelse(var(41)=0,fvar(5)*fvar(15),ifelse(var(41)=1,fvar(6)*fvar(15),fvar(6)*fvar(15))))
fall=1
fall.recover = 0
air.type = High                        
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = fvar(12)

[State 1100, 3]
type=HitDef
trigger1 = animelem = 4,=1 
persistent = 0
attr=A, HA
priority = 999999,hit
damage = 80,10
animtype=Hard
guardflag=M
getpower = 300,100
pausetime = var(45),var(46)
guard.pausetime = var(45),var(47)
sparkno = s6205
guard.sparkno = s6206
sparkxy = -10,ifelse(P2statetype = A,-100,ifelse(P2statetype = C,-82,-82))
hitsound= s21,1
guardsound= s1,24
ground.type=High
ground.slidetime = 22
ground.hittime  = var(35)+4
ground.velocity = fvar(10),fvar(11)
air.velocity = fvar(10),fvar(11)
airguard.velocity = -3.6,-2
guard.slidetime = 22
guard.hittime  = var(31)+4
guard.velocity = (ifelse(var(41)=0,fvar(5)*fvar(15),ifelse(var(41)=1,fvar(6)*fvar(15),fvar(6)*fvar(15))))
fall=1
fall.recover = 0
air.type = High                        
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = fvar(12)

[State 1100, 1]
type = ReversalDef
trigger1 = animelem = 1,=0
trigger2 = animelem = 2,=0 
trigger3 = animelem = 4,=0 
reversal.attr = SCA, NA, SA, HA, NT, ST, HT, NP, SP, HP, AA, AT, AP
sparkno = -1
sparkxy = 0,0
hitflag = MAF
pausetime = 5,10
hitsound = 1,7
p2stateno = 6999

[state 1100,nothitby]
type = nothitby
trigger1 = time <= 19
value = SCA

[State 1100, 6]
type = ChangeState
trigger1 = animtime = 0
value = 1110

;----------------------------------------------------------------------------
;半月落地
[Statedef 1110]
type    = S
movetype= I
physics = S
velset = 0,0
ctrl = 0
anim = 1110

[State 1110,PosFreeze]
type = PosFreeze
trigger1 = 1

[State 1110, playsnd]
type = playsnd
trigger1 = time = 0
value = 1,5

[State 1110, 6]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

;----------------------------------------------------------------------------
;空中半月斩
[Statedef 1150]
type    = A
movetype= A
physics = A
velset = 0,0
poweradd= 200
ctrl = 0
juggle = 7
anim = 1150

[State 1000,PosFreeze]
type = PosFreeze
trigger1 = time <= 19

[State 1100, movetype]
type = StateTypeSet
trigger1 = AnimElem = 5
movetype = I

[State 1100, playsnd]
type = playsnd
trigger1 = AnimElem = 2
value = 3,5

[State 1100, playsnd]
type = playsnd
trigger1 = AnimElem = 2
value = 1,15

[State Hit Spark]
type = Explod
trigger1 = time = 4
id = 6406
anim = 6406
pos = 0,0
sprpriority = -1
ownpal = 1
facing = 1
ignorehitpause =0
persistent = 0
postype = p1

[State 1100, HitDef]
type=HitDef
trigger1 = animelem = 2,=1
persistent = 0
attr=A, HA
priority = 999999,hit
damage = 80,10
animtype=Hard
guardflag=M
getpower = 300,100
pausetime = var(45),var(46)
guard.pausetime = var(45),var(47)
sparkno = s6205
guard.sparkno = s6206
sparkxy = -2,ifelse(P2statetype = A,-76,ifelse(P2statetype = C,-82,-82))
hitsound= s21,1
guardsound= s1,24
ground.type=High
ground.slidetime = 22
ground.hittime  = var(35)
ground.velocity = 0,fvar(11)-6
air.velocity = 0,fvar(11)-6
airguard.velocity = -3.6,-2
guard.slidetime = 22
guard.hittime  = var(31)+4
guard.velocity = (ifelse(var(41)=0,fvar(5)*fvar(15),ifelse(var(41)=1,fvar(6)*fvar(15),fvar(6)*fvar(15))))
fall=1
fall.recover = 0
air.type = High                        
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = fvar(12)

[State 1100, 3]
type=HitDef
trigger1 = animelem = 4,=1
persistent = 0
attr=A, HA
priority = 999999,hit
damage = 80,10
animtype=Hard
guardflag=M
getpower = 300,100
pausetime = var(45),var(46)
guard.pausetime = var(45),var(47)
sparkno = s6205
guard.sparkno = s6206
sparkxy = -10,ifelse(P2statetype = A,-100,ifelse(P2statetype = C,-82,-82))
hitsound= s21,1
guardsound= s1,24
ground.type=High
ground.slidetime = 22
ground.hittime  = var(35)+4
ground.velocity = fvar(10),fvar(11)
air.velocity = fvar(10),fvar(11)
airguard.velocity = -3.6,-2
guard.slidetime = 22
guard.hittime  = var(31)+4
guard.velocity = (ifelse(var(41)=0,fvar(5)*fvar(15),ifelse(var(41)=1,fvar(6)*fvar(15),fvar(6)*fvar(15))))
fall=1
fall.recover = 0
air.type = High                        
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = fvar(12)

[State 1100, 1]
type = ReversalDef
trigger1 = animelem = 1,=0
trigger2 = animelem = 2,=0 
trigger3 = animelem = 4,=0 
reversal.attr = SCA, NA, SA, HA, NT, ST, HT, NP, SP, HP, AA, AT, AP
sparkno = -1
sparkxy = 0,0
hitflag = MAF
pausetime = 5,10
hitsound = 1,7
p2stateno = 6999

[state 1100,nothitby]
type = nothitby
trigger1 = time <= 19
value = SCA

[state 1100,velset]
type = velset
trigger1 = time =20
x = -3
y = -2

[state 1100,velset]
type = velset
trigger1 = time =21
x = -3
y = -1.5

[state 1100,velset]
type = velset
trigger1 = time =22
x = -3
y = -1

[state 1100,velset]
type = velset
trigger1 = time =23
x = -3
y = -0.5

[state 1100,velset]
type = velset
trigger1 = time =24
x = -3
y = 0

[state 1100,velset]
type = velset
trigger1 = time =25
x = -3
y = .5

[state 1100,velset]
type = velset
trigger1 = time =26
x = -3
y = 1

[state 1100,velset]
type = velset
trigger1 = time =27
x = -3
y = 1.5

[state 1100,velset]
type = velset
trigger1 = time =28
x = -3
y = 2

[State 1100, 6]
type = ChangeState
trigger1 = pos y >= -4
value = 1110

;----------------------------------------------------------------------------
;白鹭飞翔
[Statedef 1200]
type    = S
movetype= I
physics = S
velset = 0,0
poweradd= 300
ctrl = 0
anim = 1200

[State 1200,PosFreeze]
type = PosFreeze
trigger1 = 1

[State 1200, movetype]
type = StateTypeSet
trigger1 = AnimElem = 2,=0
movetype = A

[State 1200, movetype]
type = StateTypeSet
trigger1 = AnimElem = 2,=1
movetype = I

[State 1200 , 1]
type = HitDef
triggerall = var(5)<=0
trigger1= P2Dist x <= 80
trigger1= AnimElem = 1,=0
trigger1 = P2StateNo != [150,155]
trigger1 = P2StateNo != [40,49]
trigger1 = P2StateNo != 50 && 52
trigger1 = p2statetype != A
numhits = 0
attr = S, HT
getpower = 300,100
guard.dist = 0
priority = 7, Miss
sparkno = -1
p2facing = 1
p1stateno = 1210
p2stateno = 1220
p2getp1state = 1
Palfx.time = 1

[State 1200, playsnd]
type = playsnd
trigger1 = AnimElem = 3
value = 0,0

[State 1200, playsnd]
type = playsnd
trigger1 = AnimElem = 3
value = 1,10

[State 1200, NotHitBy]
type = NotHitBy
trigger1 = time <= 6
value = SCA

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

;----------------------------------------------------------------------------
;白鹭飞翔P1状态
[Statedef 1210]
type    = S
movetype= I
physics = N
velset = 0,0
ctrl = 0
anim = 1210

[State 1210, 1]
type = Targetbind
trigger1 = animelem = 2,>=0
trigger1 = animelem = 2,<=8
pos = 65,-44

[State Hit Spark]
type = Explod
trigger1 = animelem = 2,=0
id = 6209
anim = 6209
pos = 61,-133
sprpriority = 9
ownpal = 1
facing = 1
ignorehitpause = 1
persistent = 0
postype = p1

[State 1200, playsnd]
type = playsnd
trigger1 = animelem = 2,=0
value = 1,9

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

[State 1200, playsnd]
type = playsnd
trigger1 = AnimElem = 2
value = 1,10

[State 1200,PosFreeze]
type = PosFreeze
trigger1 = 1

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

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

;----------------------------------------------------------------------------
;白鹭飞翔P2状态
[Statedef 1220]
type    = A
movetype= H
physics = N
velset = 0,0
ctrl = 0

[State 1220,ChangeAnim]
type = ChangeAnim2
trigger1 = time = 0
value = 1220

[State 1240,0]
type = NotHitBy
trigger1 = 1
value = SCA

[State 1220, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 1230

;----------------------------------------------------------------------------
;白鹭飞翔P2状态
[Statedef 1230]
type    = A
movetype= H
physics = N
velset = 0,0
ctrl = 0

[State 1230,ChangeAnim]
type = ChangeAnim2
trigger1 = time = 0
value = 1230

[State 1230, 2]
type = velset
trigger1 = time = [0,2]
x = 0
y = -10

[State 1230, 2]
type = veladd
trigger1 = 1
y = 0.5

[State 1230, ChangeState]
type = ChangeState
trigger1 = pos Y >= -4
trigger1 = vel Y > 0
value = 1240

;----------------------------------------------------------------------------
;白鹭飞翔P2状态落地
[Statedef 1240]
type = A
movetype = H
physics = N
velset = 0, 0

[State 1230, 2]
type = lifeadd
trigger1 = time = 0
value = -90

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

[State 1240, Shake]
type = EnvShake
trigger1 = Time = 0
time = 10
ampl = -4

[State 1240,0]
type = NotHitBy
trigger1 = 1
value = SCA

[State 1240, 2]
type = PosSet
trigger1 = Time = 0
y = 0

[State Hit Spark]
type = Explod
trigger1 = time = 0
id = 6208
anim = 6208
pos = 0,0
sprpriority = 0
ownpal = 1
facing = 1
ignorehitpause = 1
persistent = 0
postype = p1

[State 1240,ChangeAnim]
type = ChangeAnim
trigger1 = time = 0
value = 5100

[State 1240,ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 1250

;--------------------------------------------------------------
[Statedef 1250]
type = A
movetype = H
physics = N
velset = 0, 0

[State 1250,0]
type = NotHitBy
trigger1 = 1
value = SCA

[State 1250,ChangeAnim]
type = ChangeAnim
trigger1 = time = 0
value = 5160

[State 1250,VelSet]
type = VelSet
trigger1 = Time = 0
x = -1.6
y = -5.4

[State 1250,VelAdd]
type = VelAdd
trigger1 = 1
y = .6

[State 1250,SelfState]
type = SelfState
trigger1 = Pos Y >= -8 && Vel Y > 0
value = 5110

;----------------------------------------------------------------------------
;???
;----------------------------------------------------------------------------
[Statedef 3600]
ctrl = 0
anim = 3600

[State 3600, 1]
type = Pause
trigger1 = time = [13,24]
time = 1

[State 3600, 2]
type = DestroySelf
trigger1 = time = 24|roundstate != 2

;----------------------------------------------------------------------------
;落地火花？？
;----------------------------------------------------------------------------
[Statedef 3605]
ctrl = 0
anim = 3600

[State 3605, 2]
type = PlaySnd
trigger1 = AnimElem = 1
value = 1,12

[State 3605, GrabSpark]
type = Explod
trigger1 = time = 0
id = 1596
anim = 1596
pos = 0,0
sprpriority = 3
ownpal = 1
removeongethit = 1
removetime = 23
postype = P2
persistent = 0
ignorehitpause = 1

[State 3605, GrabSpark]
type = Explod
trigger1 = time = 0
id = 1597
anim = 1597
pos = 0,0
sprpriority = -2
ownpal = 1
removeongethit = 1
removetime = 23
postype = P2
persistent = 0
ignorehitpause = 1

[State 3605, 2]
type = DestroySelf
trigger1 = time = 24
ignorehitpause = 1

;----------------------------------------------------------------------------
;??
;----------------------------------------------------------------------------
[Statedef 3610]
ctrl = 0
anim = 3600

[State 3610, 1]
type = Pause
trigger1 = time = [0,12]
time = 1
ignorehitpause = 1

[State 3610, 2]
type = DestroySelf
trigger1 = time = 12|roundstate != 2
ignorehitpause = 1

;----------------------------------------------------------------------------
;???
;----------------------------------------------------------------------------
[Statedef 5900]
type = S

[State 5900, 1]
type = VarRangeSet
trigger1 = roundno = 1
first = 0
last = 16
value = 0

[State 5900, 1]
type = VarRangeSet
trigger1 = roundno = 1
first = 18
last = 59
value = 0

;[State 5900, 1] ;Clear all int variables 农府胶函脚葛靛促澜扼款靛鳖瘤蜡瘤
;type = VarRangeSet
;trigger1 = roundno = 1
;value = 0

[State 5900, 2] ;Clear all float variables
type = VarRangeSet
trigger1 = roundno = 1
fvalue = 0

[State 5900, 3] ;Intro
type = ChangeState
trigger1 = roundno = 1
value = 191

;[State 5900, 3]
;type = ChangeState
;trigger1 = roundno >= 2
;value = 193


;----------------------------------------------------------------------------
;落地AB翻滚
;----------------------------------------------------------------------------
[Statedef 5200]
type = S
movetype = I
physics = S
anim = 5200
poweradd=ifelse(var(20)=0,0,300)
facep2 = 1

[State 5200, 4]
type = SprPriority
trigger1 = Time = 0
value = -2

[State 5200,0]
type = NotHitBy
trigger1 = 1
value = SCA

[State 5200, 2]
type = PlaySnd
trigger1 = Time = 0
value = 0,3

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

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

[State 5200,2]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 5200,2]
type = Posadd
trigger1 = Time = 0
x = -10;抗螟荐摹

[State 5200,2]
type = Posadd
trigger1 = Time = 1
x = -8

[State 5200,2]
type = Posadd
trigger1 = Time = [2,3]
x = -6

[State 5200,2]
type = Posadd
trigger1 = Time = 4
x = -4

[State 5200,2]
type = Posadd
trigger1 = Time = [5,6]
x = -3

[State 5200,2]
type = Posadd
trigger1 = Time = [7,9]
x = -2

[State 5200,2]
type = Posadd
trigger1 = Time = [10,12]
trigger2 = Time = 14
trigger3 = Time = 16
trigger4 = Time = 20
x = -1

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

;----------------------------------------------------------------------------
;States that are always executed (use statedef -2)
;----------------------------------------------------------------------------
[Statedef -2]
[State -2, 1]
type = helper
trigger1 = winko && Numhelper(5600) = 0 && Stateno = [900,4999]
helpertype = normal
id = 5600
pos = 1000,1000
name = "KO"
stateno = 5600
keyctrl = 0
ignorehitpause = 1
persistent = 0

[State -2, 2]
type = helper
trigger1 = winko && Numhelper(5600) = 0 && Stateno = [0,899]
helpertype = normal
id = 5600
pos = 1000,1000
name = "KO"
stateno = 5650
keyctrl = 0
persistent = 0

[State -2, 2]
type = helper
trigger1 = winko && Numhelper(5610) = 0 && matchover
helpertype = normal
id = 5610
pos = 1000,1000
name = "KO"
stateno = 5610
keyctrl = 0
persistent = 0

[State -2, 2]
type = varset
trigger1 = roundstate = 0 
var(52) = 1

;----------------------------------------------------------------------------
;var(13)
;----------------------------------------------------------------------------
[State -2, var(13)]
type = varset
trigger1 = ((StateNo = [200,249]) || (StateNo = [400,439]) || (StateNo = [600,649])) && movehit = 1 && P2statetype = A
var(13) = 1
ignorehitpause = 1

[State -2, var(13)]
type = VarSet
trigger1 = p2stateno = 5110 || p2stateno = 5045
trigger2 = p2stateno = [0,199]
var(13) = 0
ignorehitpause = 1

[State -2, var(16)]
type = VarSet
trigger1 = p2stateno = 5110
trigger2 = p2stateno = 0
var(16) = 0
ignorehitpause = 1

[State -3, 0]
type = VarSet
trigger1 = p2stateno = 5000
trigger2 = p2stateno = 5010
v = 7
value = 0

;----------------------------------------------------------------------------
;Sorrow edge' Throw limitter
;----------------------------------------------------------------------------
;Modified it a bit for special throws
[State -2, throwa]
type = VarSet
trigger1 = MoveGuarded
trigger2 = (StateNo = [600,699]) && MoveContact
trigger3 = (StateNo = [600,699]) && MoveGuarded
;trigger4 = P2StateNo = 5120
var(5) = 21	;15
ignorehitpause = 1 

[State -2, throwb]
type = VarAdd
trigger1 = var(5) >= 1
var(5) = -1
ignorehitpause = 1

[State -2, throwa]
type = VarSet
trigger1 = (StateNo != [600,699]) && MoveHit
var(5) = 0
ignorehitpause = 1 

;Modified it a bit for special throws 具矫肺 勉眠绰措瘤傈侩
[State -2, throwa]
type = VarSet
triggerall = fvar(23) >= 2 && statetype != A
trigger1 = MoveGuarded
trigger2 = MoveContact
trigger3 = MoveGuarded
var(14) = 23
ignorehitpause = 1

[State -2, throwb]
type = VarAdd
trigger1 = var(14) >= 1
var(14) = -1
ignorehitpause = 1

;----------------------------------------------------------------------------
;??
;----------------------------------------------------------------------------
[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

;----------------------------------------------------------------------------
;counter
;----------------------------------------------------------------------------
[State -2, Player 1 Setting]
type = VarSet
trigger1 = Facing = 1 && roundstate = 0
var(36) = 1

[State -2, Player 2 Setting]
type = VarSet
trigger1 = Facing = -1 && roundstate = 0
var(36) = 2

[State -2, Counter Hit Envcolor]
type = EnvColor
trigger1 = NumExplod(8004) = 0 && !Win = 1 && var(38) = 1 && movehit = 1
value = 255,255,255
persistent = 0
time = 1
ignorehitpause = 1
under = 1

[State -2, Counter hit Logo (Player 1)]
type = Explod
triggerall = var(36) = 1 && NumExplod(8004) = 0 && !Win = 1 && var(38) = 1 
trigger1 = stateno < 800 && movehit > 0
trigger2 = stateno >= 900 && movehit > 0
trigger3 = projhittime(0) >= 0 && projhittime(0) <= 10
anim = 8004
ID = 8004
pos = -1,75
postype = left
sprpriority = 5
removetime = 42
ontop = 1
shadow = 0,0,0
ownpal = 1
bindtime = -1
ignorehitpause = 1

[State -2, Counter hit Logo (Player 2)]
type = Explod
triggerall = var(36) = 2 && NumExplod(8004) = 0 && !Win = 1 && var(38) = 1 
trigger1 = stateno < 800 && movehit > 0
trigger2 = stateno >= 900 && movehit > 0
trigger3 = projhittime(0) >= 0 && projhittime(0) <= 10
anim = 8005
ID = 8004
pos = 1,75
postype = right
sprpriority = 5
removetime = 42
ontop = 1
shadow = 0,0,0
ownpal = 1
bindtime = -1
ignorehitpause = 1

[State -2, Counter hit varset (P2Attack setting)]
type = Varset
trigger1 = P2movetype = A && var(37) != -1 && !win = 1 && p2life != 0
var(37) = 1
ignorehitpause = 1

[State -2, Counter hit varset (P2Attack setting)]
type = Varset
trigger1 = P2movetype = A && var(38) != -1 && !win = 1 && p2life != 0
var(38) = 1
ignorehitpause = 1

[State -2, Counter hit varset (P2Attack setting)]
type = Varset
trigger1 = p2stateno = 5110
trigger2 = p2stateno = 0
trigger3 = NumExplod(8004) = 1
;trigger3 = var(38) = 1 && movehit > 0
var(38) = 0
ignorehitpause = 1

[State -2, var(37)]
type = VarSet
trigger1 = p2stateno = 5110
trigger2 = p2stateno = 0
trigger3 = fvar(22) = 1 && movehit = 1
var(37) = 0
ignorehitpause = 1

[State -2, Counter Hit Envcolor]
type = VarSet
trigger1 = NumExplod(8004) = 1 && var(23) = 1
fvar(22) = 1
ignorehitpause = 1

[State -2, var(37)]
type = VarSet
trigger1 = p2stateno = 5110
trigger2 = p2stateno = 0
fvar(22) = 0
ignorehitpause = 1

[State -2, Counter hit varset (P2Attack setting)]
type = Varset
trigger1 = P2movetype = A && var(39) != -1 && !win = 1 && p2life != 0
var(39) = 1
ignorehitpause = 1

[State -2, Counter hit varset (P2Attack setting)]
type = Varset
trigger1 = P2movetype != A && var(39) != -1
trigger2 = NumExplod(8004) = 1
var(39) = 0
ignorehitpause = 1

[State -2, 15]
type = AttackMulSet
trigger1 = var(39) = 1
value = 1.3

;----------------------------------------------------------------------------
;States that are executed when in self's state file (use statedef -3)
;----------------------------------------------------------------------------
[Statedef -3]
[state -3, stopsound]
type = stopsnd
trigger1 = stateno = 3010
trigger2 = stateno = 3030
trigger3 = stateno = 3040
trigger4 = movetype = H
trigger5 = stateno = 3070
trigger6 = stateno = 3080
channel = 4

[state -3, stopsound]
type = stopsnd
trigger1 = stateno != 100 && stateno != 1400 && stateno != 1450 && stateno != 1500 && stateno != 1550 && stateno != 1600
trigger1 = stateno != 3200 && stateno != 3250 && stateno != 3300
trigger2 = movetype = H
channel = 5

;----------------------------------------------------------------------------
;States that are executed when in self's state file (use statedef -3)
;----------------------------------------------------------------------------
[State -2]
type = Helper
triggerall = numhelper(3600) = 0
trigger1 = projhit3390 = 1
ID = 3600
stateno = 3600
ownpal = 1
ignorehitpause = 1

[State -2]
type = Helper
triggerall = numhelper(3610) = 0
trigger1 = MoveHit = 1 && stateno = 30100
trigger2 = MoveHit = 1 && stateno = 30300
trigger3 = MoveHit = 1 && stateno = 30400
trigger4 = MoveHit = 1 && stateno = 30700
trigger5 = MoveHit = 1 && stateno = 30800
trigger6 = MoveHit = 1 && stateno = 31300
trigger7 = MoveHit = 1 && stateno = 31400 && AnimElem = 3, <= 2
ID = 3610
stateno = 3610
ownpal = 1
ignorehitpause = 1

[State -2]
type = Helper
triggerall = P2movetype = H
triggerall = numhelper(3605) = 0
trigger1 = P2StateNo = 887
ID = 3605
stateno = 3605
ownpal = 1
ignorehitpause = 1

;----------------------------------------------------------------------------
;States that are executed when in self's state file (use statedef -3)
;----------------------------------------------------------------------------
[State -2, 15]
type = EnvColor
trigger1 = projhit3190 = 1
time = 1
value = 255,255,255
under = 1
ignorehitpause = 1
persistent = 0

;----------------------------------------------------------------------------
;States that are executed when in self's state file (use statedef -3)
;----------------------------------------------------------------------------
[State -3, 1]
type = PlaySnd
triggerall = Time = 1
triggerall = alive
triggerall = Random <= 700
;triggerall = UniqHitCount <= 1
;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 = 0,4
channel = 3

[State -3, 1]
type = PlaySnd
triggerall = Time = 1
triggerall = alive
triggerall = Random <= 700
;triggerall = UniqHitCount <= 1
;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 = 0,4
volume = 50
channel = 3

[State -3, 1.4]
type = PlaySnd
triggerall = Time = 1
triggerall = alive
triggerall = Random <= 700
;triggerall = var(16) < 1
;triggerall = UniqHitCount <= 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 = 0,5
ignorehitpause = 1
channel = 3


;----------------------------------------------------------------------------
;States that are executed when in self's state file (use statedef -3)
;----------------------------------------------------------------------------
[State -2, Width]
type = width
trigger1 = stateno =[0,9000]
edge = 9,9

[State -2, var(41)]
type = Varadd
trigger1 = (enemynear,backedgedist < 10) && (enemynear,FrontEdgeBodyDist > 200)
trigger2 = (enemynear,FrontEdgeBodyDist < 13) && (enemynear,backedgedist > 200)
var(41) = 1

[State -2, var(41)]
type = Varset
trigger1 = var(41) >= 3
var(41) = 3

[State -2, var(41)]
type = VarSet
trigger1 = (enemynear,backedgedist > 9) && (enemynear,FrontEdgeBodyDist > 200)
trigger2 = (enemynear,FrontEdgeBodyDist > 12) && (enemynear,backedgedist > 200)
var(41) = 0

[State -2, ANIM3]
type = VarSet
trigger1 = stateno != 2045
var(30) = 3
ignorehitpause = 1

[State -2, ANIM2]
type = VarSet
trigger1 = stateno != 2041 && vel x != 0
var(30) = 2
ignorehitpause = 1

[State -2, ANIM1]
type = VarSet
trigger1 = stateno != 2041 && vel x = 0
var(30) = 1
ignorehitpause = 1

;----------------------------------------------------------------------------
;States that are executed when in self's state file (use statedef -3)
;----------------------------------------------------------------------------
[State -2, fvar(21)]
type = Varadd
trigger1 = statetype != A;	pos y = 0
fvar(21) = 1

[State -2, fvar(21)]
type = Varset
trigger1 = fvar(21) >= 60
fvar(21) = 3

[State -2, fvar(21)]
type = VarSet
trigger1 = statetype = A
trigger2 = stateno = [200,9999]
fvar(21) = 0

;----------------------------------------------------------------------------
;States that are executed when in self's state file (use statedef -3)
;----------------------------------------------------------------------------
[State -2, 15]
type = Velset
triggerall = (statetype != A && P2statetype != A) && var(41) >= 1
triggerall = (ProjContactTime(0) = -1 || ProjContactTime(0) >= 30)
triggerall = ((P2stateno = [5000,5029]) || (P2stateno = [4000,4029]) || (P2stateno = [120,159]))
trigger1 = target,Vel x
x = ((((target,Vel x)*ifelse(fvar(21)>=1,0.6,1))*ifelse((P2stateno = [120,159]) && var(41) >= 1,1.2,1))*ifelse(target,Vel x>0,-1,1))
persistent = 0
ignorehitpause = 1

[State -2, 15]
type = Velset
triggerall = (statetype != A && P2statetype != A) && var(41) >= 1
triggerall = (ProjContactTime(0) = -1 || ProjContactTime(0) >= 30)
triggerall = ((P2stateno = [5000,5029]) || (P2stateno = [4000,4029]) || (P2stateno = [120,159]))
trigger1 = target,GetHitVar(xvel) = 0
trigger2 = target,GetHitVar(yvel) != 0 && movecontact = 1
x = 0
persistent = 0
ignorehitpause = 1

;----------------------------------------------------------------------------
;States that are executed when in self's state file (use statedef -3)
;----------------------------------------------------------------------------
[State -2]
type = varset
trigger1 = ((StateNo = [200,209]) || (StateNo = [230,239]) || (StateNo = [400,409]) || (StateNo = [430,439]))
fvar(23) = 1
ignorehitpause = 1

[State -2]
type = varset
triggerall = statetype != A
trigger1 = ((StateNo = [210,219]) || (StateNo = [240,249]) || (StateNo = [410,419]) || (StateNo = [440,449]))
trigger2 = ((StateNo = [450,459]) || (StateNo = [700,999]))
trigger3 = (StateNo = [1000,9999]) && movecontact = 1
fvar(23) = 2
ignorehitpause = 1

[State -2]
type = varset
trigger1 = (StateNo = [250,269]) && movecontact = 1
trigger2 = (StateNo = [650,659]) && movecontact = 1
fvar(23) = 3
ignorehitpause = 1

;----------------------------------------------------------------------------
;States that are executed when in self's state file (use statedef -3)
;----------------------------------------------------------------------------
[State -2]
type = varset
trigger1 = (P2StateNo = [200,209]) || (P2StateNo = [230,239]) || (P2StateNo = [400,409]) || (P2StateNo = [430,439])
trigger2 = (P2StateNo = [600,609]) || (P2StateNo = [630,639])
var(54) = 1
ignorehitpause = 1

[State -2]
type = varset
trigger1 = (P2StateNo = [210,219]) || (P2StateNo = [240,249]) || (P2StateNo = [410,419]) || (P2StateNo = [440,449])
trigger2 = (P2StateNo = [250,269]) || (P2StateNo = [450,459]) || (P2StateNo = [700,999])
trigger3 = (P2StateNo = [610,619]) || (P2StateNo = [640,649]) || (P2StateNo = [650,659])
var(54) = 2
ignorehitpause = 1

[State -2]
type = varset
trigger1 = P2StateNo = [1000,9999]
var(54) = 3
ignorehitpause = 1

;----------------------------------------------------------------------------
;States that are executed when in self's state file (use statedef -3)
;----------------------------------------------------------------------------
[State -2, 1]
type = DisplayToClipboard
trigger1 = 1
text="P2Dist x = %d pos y = %d fvar(39) = %d var(0) = %d"
params = floor(P2Dist x),floor(pos y),floor(fvar(39)),floor(var(0))
ignorehitpause = 1

;----------------------------------------------------------------------------
;States that are executed when in self's state file (use statedef -3)
;----------------------------------------------------------------------------
[state -2]
type = varset
trigger1 = 1
fvar(1) = -5;-4.72

[state -2]
type = varset
trigger1 = 1
fvar(2) = -5.6	;-8

[state -2]
type = varset
trigger1 = 1
fvar(3) = -11 ;-10.46

[state -2]
type = varset
trigger1 = 1
fvar(4) = -13;-10.2

[state -2]
type = varset
trigger1 = 1
fvar(5) = -14.4

[state -2]
type = varset
trigger1 = 1
fvar(6) = -17.2

[state -2]
type = varset
trigger1 = 1
fvar(7) = -6

[state -2]
type = varset
trigger1 = 1
fvar(8) = -18

[state -2]
type = varset
trigger1 = 1
fvar(9) = -24

[state -2]
type = varset
trigger1 = 1
fvar(10) = -4.64

[state -2]
type = varset
trigger1 = 1
fvar(11) = -8.09

[state -2]
type = varset
trigger1 = 1
fvar(24) = -6.34

[state -2]
type = varset
trigger1 = 1
fvar(25) = -8.78

[state -2]
type = varset
trigger1 = 1
fvar(26) = -6.34

[state -2]
type = varset
trigger1 = 1
fvar(27) = -8.78

[state -2]
type = varset
trigger1 = 1
fvar(28) = 0.48

[state -2]
type = varset
trigger1 = 1
fvar(29) = -2.09

[state -2]
type = varset
trigger1 = 1
fvar(30) = -13.91

[state -2]
type = varset
trigger1 = 1
fvar(31) = 0.602

[state -2]
type = varset
trigger1 = 1
fvar(12) = 0.523

[state -2]
type = varset
trigger1 = 1
fvar(13) = -2.48

[state -2]
type = varset
trigger1 = 1
fvar(14) = -11.56

[state -2]
type = varset
trigger1 = 1
fvar(20) = -1.76

[state -2]
type = varset
trigger1 = 1
fvar(34) = -6

[state -2]
type = varset
trigger1 = 1
fvar(35) = 8

[state -2]
type = varset
trigger1 = 1
fvar(15) = 1;1.2

[state -2]
type = varset
trigger1 = 1
fvar(16) = 0

[state -2]
type = varset
trigger1 = 1
var(45) = 10

[state -2]
type = varset
trigger1 = 1
var(46) = 13;-ifelse(((statetype != A && P2statetype != A) && var(41) >= 1),1,0)

[state -2]
type = varset
trigger1 = 1
var(47) = 11;-ifelse(((statetype != A && P2statetype != A) && var(41) >= 1),1,0)

[state -2]
type = varset
trigger1 = 1
var(10) = 6

[state -2]
type = varset
trigger1 = 1
var(11) = 8;-ifelse(((statetype != A && P2statetype != A) && var(41) >= 1),1,0)

[state -2]
type = varset
trigger1 = 1
var(15) = 7;-ifelse(((statetype != A && P2statetype != A) && var(41) >= 1),1,0)

[state -2]
type = varset
trigger1 = 1
var(34) = 8;+ifelse(((statetype != A && P2statetype != A) && var(41) >= 1),1,0)

[state -2]
type = varset
trigger1 = 1
var(35) = 16;+ifelse(((statetype != A && P2statetype != A) && var(41) >= 1),1,0)

[state -2]
type = varset
trigger1 = 1
var(29) = (8*2);+ifelse(((statetype != A && P2statetype != A) && var(41) >= 1),1,0)

[state -2]
type = varset
trigger1 = 1
var(31) = (16*2);+ifelse(((statetype != A && P2statetype != A) && var(41) >= 1),1,0)

[state -2]
type = varset
trigger1 = 1
var(28) = Ceil(P2dist x);+((hitcount-1)*8)	;P2dist x-target,Const(size.head.pos.x)
ignorehitpause = 1

[state -2]
type = varset
trigger1 = 1
var(32) = Ceil(ifelse(P2statetype != A,0,(enemyNear,pos y+32)))	; 
ignorehitpause = 1

[state -2]
type = varadd
trigger1 = stateno=1100 && movehit
trigger2 = stateno=1150 && movehit
var(33) = 300	; 
ignorehitpause = 1

[state -2]
type = varadd
trigger1 = var(33) > 0
var(33) = -1	; 
ignorehitpause = 1

[state -2]
type = varset
trigger1 = var(33) <= 0
var(33) = 0	; 
ignorehitpause = 1

;=====================================
[state -2]
type = varadd
trigger1 = helper(1051),movehit
trigger2 = helper(1054),movehit
var(40) = 60	; 
ignorehitpause = 1

[state -2]
type = varadd
trigger1 = var(33) > 0
var(40) = -1	; 
ignorehitpause = 1

[state -2]
type = varset
trigger1 = var(33) <= 0
var(40) = 0	; 
ignorehitpause = 1
