; _________________________________________
;|  Pheromosa by Vorse_Raidier                |
; ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
;==============================================================================================
;========================================<SPECIAL MOVES>========================================
;==============================================================================================

;---------------------------------------------------------------------------

;move list

;sword dance
;Rapin spin = air grab

;sword dance (or quiver dance)
;rapid spin (air grab) 
;quick guard (counter)
;stomp, 
;low kick, 
;dbl kick (anti air), 
;tri kick, 
;high jump kick (this might be a hyper). 
;close combat (this might be a hyper)
;drill run
;feint 
;bug bite being a vore move
;Hyperbeam! (this is hyper).cuz mugen loves lasers!
;bugbuzz    (this is hyper)
;Dynamax   (this is hyper)
;low sweep
;chop
;aglity
;leer
;Substitute
;Giga Impact  (this is hyper)
;ice beam     (this might be a hyper)
;blizzard     (this is hyper)

;low sweep
[Statedef 1800]
type    = C
movetype= A
physics = C
juggle  = 0
ctrl = 0
;velset = 0,0
anim = 1055
facep2 = 1
sprpriority = 2
;poweradd = 20

[State 0, AfterImage]
type = AfterImage
trigger1 =animelemtime(2) >= 0
time = 3
length = 3


;whoosh
[State 40, Snd]
type = playsnd
trigger1 =  animelemtime(2) = 0
value = 1, 17


[State 8100, Dust]
type = explod
trigger1 = time%2 = 1
trigger1 = animelem = 2
trigger1 = VEL X >= 5
anim = 8100
sprpriority = 3
postype = p1
pos = 0, ceil(pos y)
scale = 0.5, 0.5
pausemovetime = -1
supermovetime = -1
ownpal = 1

[State 8100, Dust]
type = explod
trigger1 = animelem = 2
trigger1 = !time || time = 2 || time = 6
anim = 8101
sprpriority = 3
postype = p1
scale = 0.5, 0.5
pausemovetime = -1
supermovetime = -1
ownpal = 1


[State 40, Dust]
type = null;helper
trigger1 = animelem = 2
trigger1 = VEL X >= 5
stateno = 8100
ID = 8100
name = "Jump Dust"
postype = p1
ownpal = 1


[State 0, VelAdd]
type = Veladd
trigger1 = animelemtime(2) = [1,5]
x = 8


[State 0, VelAdd]
type = VelAdd
trigger1 = animelemtime(3) >= 1
trigger1 = vel x >= 0
x = -2



[State 0, VelAdd]
type = Velset
trigger1 = vel x < 0
x = 0

[State 0, HitDef]
type = HitDef
trigger1 = !time
attr=C,SA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag=MAF        ;HLAFD+-
guardflag=L         ;HLA
animtype=Medium          ;light,medium,hard,back,up,diagup
priority=8,Hit   ;Hit,Miss,Dodge
damage = ifelse((var(9) || !var(13)),2 ,1) * ifelse(floor(fvar(11) * 40) <= 20, 10, floor(fvar(11) * 40)), 5
pausetime =0,2
guard.pausetime = 7,8
ground.hittime = 30 + 5 * var(9)
sparkno = -1
guard.sparkno = -1
sparkxy = 16,-40
hitsound = S0,8
guardsound = S0,10
ground.type = Low
ground.slidetime = 25
guard.slidetime = 15 
guard.hittime = 24
air.hittime = 24
yaccel = .333
ground.velocity=-2,0
air.velocity=0,-3
guard.velocity=-2
airguard.velocity =-2, -3
airguard.ctrlTime=12
ground.type=Low
air.type=Low
fall=0
fall.recover=0


[State 1200, PlayerPush]
type = PlayerPush
triggerall =animelemtime(12)<0
trigger1=movehit=1
trigger2=numenemy 
trigger2=enemynear,statetype=L
value = 0
ignorehitpause =1


[State 0, TargetState]
type = TargetState
triggerall = NumTarget
triggerall = movehit
triggerall = AnimElemTime(2) >= 0 && AnimElemTime(2) <= 8
trigger1= enemynear,statetype!=L
trigger1= !var(16)
value = 482


[State 0, Turn]
type = Turn
trigger1 = time=[0,1]
trigger1 = p2dist x<-5


[State 240, Time Offset]
    type = VarSet
    trigger1 = moveContact = 1
    var(11) = Time
    ignorehitpause = 1
    persistent = 0

    [State 250, Play Anim]
    type = ChangeAnim
    triggerall = AnimElemTime(2) >= 0 && AnimElemTime(3) <= 3
    trigger1 = hitPauseTime = [2,5 - (18 - Var(11))]
    value = anim
    elem = 3
    ignorehitpause = 1




[State 215]
type = ChangeState
trigger1 = animtime = 0
value = 11
ctrl = 1
   
[Statedef 482, launcher]
type    = A
movetype= H
physics = N
facep2 = 1

[State 0, VelSet]
type = VelSet
trigger1 = time = 0
y = -8

[State 52, 1]
type = Veladd
trigger1 = time = 0
y = -.7

[State 52, 1]
type = Veladd
trigger1 = time = 1
y = -1

[State 0, VelSet]
type = VelSet
trigger1 = 1
x = .8


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

[State 52, 2]
type = Veladd
trigger1 =  1
y = .85

[State 52, 2]
type = null;Veladd
trigger1 =  time >=3
y = .25

[state 5050, Change Animation]
type = changeanim
trigger1 = !animtime && anim = 5035
trigger2 = !time && anim != 5035
trigger2 = (anim != [5051, 5059]) && (anim != [5061, 5069]) && anim != [5090, 5099]
value = 5050

[state 5050, Change Animation]
type = changeanim
trigger1 = anim = [5050, 5059]
trigger1 = vel y >= cond(anim = 5050, const720p(4), const720p(-8))
trigger1 = selfanimexist(anim + 10)
value = anim + 10
persistent = 0


[state 5050, End State]
type = changestate
trigger1 = vel y > 0
trigger1 = pos y >= cond((anim = [5051, 5059]) || (anim = [5061, 5069]), 0, const(movement.air.gethit.groundlevel))
value = 5100



[State 1830]
type = SelfState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 5100

;lunge
[Statedef 1900]
type    = S
movetype= A
physics = S
ctrl = 0
velset = 0,0
anim = 3010
facep2 = 1
sprpriority = 2


[State 0, AfterImage]
type = AfterImage
trigger1 =animelemtime(1) >= 0
time = 3
length = 2

[State 0, VarSet]
type = VarSet
trigger1 = time = 0
v = 14   
value = 1

[State 0, Turn]
type = Turn
triggerall = ailevel && numenemy
trigger1 = (P2Dist X < 5) 

[State 0, Turn]
type = Turn
triggerall = !ailevel 
trigger1 = command = "holdback"


;whoosh
[State 40, Snd]
type = playsnd
trigger1 =  animelemtime(1) = 0
value = 1, 17

[State 8100, Dust]
type = explod
trigger1 = !time
anim = 8100
sprpriority = 3
postype = p1
pos = 0, ceil(pos y)
scale = 0.5, 0.5
pausemovetime = -1
supermovetime = -1
ownpal = 1

[State 8100, Dust]
type = explod
trigger1 = !time || time = 2 || time = 6
anim = 8101
sprpriority = 3
postype = p1
scale = 0.5, 0.5
pausemovetime = -1
supermovetime = -1
ownpal = 1


[State 40, Dust]
type = null;helper
trigger1 = time = 0
stateno = 8100
ID = 8100
name = "Jump Dust"
postype = p1
ownpal = 1

[state 950, Air Dash Smoke]
type = helper
trigger1 = !animelemtime(2)
trigger1 = VEL X >= 5
helpertype = normal
name = "Air Dash Smoke"
ID = 952
stateno = 952
postype = P1
ownpal = 1
keyctrl = 0
size.xscale = 1.0
size.yscale = 1.0
supermovetime = 65536
pausemovetime = 65536

[State 0, VelAdd]
type = Veladd
trigger1 = anim = 3010
x = 5

[State 240, Hit]
type=hitdef
trigger1=!time
trigger1 = numexplod(808) = 0
attr = S,SA
hitflag = MAFD
guardflag = MA
damage = ceil(ifelse(fvar(11)*50<45,45, fvar(11)*50)), 0
getpower = 10, 10
givepower = 0, 0
guardsound = s0,10
guard.sparkno = -1 + 0 * (var(34) := 8000)
sparkxy =-10 + 0 * (var(35) := 75), var(36) := -75
animtype = hard
air.animtype = Back
fall.animtype = Back
ground.type = high
air.type = Low


[State 0, HitBy]
type = notHitBy
trigger1 = movehit
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 1
ignorehitpause = 1


[State 0, TargetState]
type = TargetState
triggerall = NumTarget;()
trigger1 = movehit
value =801

[State 0, ChangeState]
type = ChangeState
trigger1 = movehit
value =810
ctrl = 0
ignorehitpause = 1

[State 0, VelAdd]
type = VelAdd
trigger1 = anim = 3011
trigger1 = vel x >= 0
x = -15

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = anim = 3010
trigger1 = animtime = 0
trigger2 = moveguarded
value = 3011

[State 0, VelAdd]
type = Velset
trigger1 = vel x < 0
x = 0

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 3011
movetype = I        ;I,A,H

[State 1100, ChangeState]
type = ChangeState
triggerall = anim = 3011
trigger1 = animtime = 0
value = 0
ctrl = 1




;new low sweep
[Statedef 1300]
type     = C
movetype = A
physics  = C
juggle   = 8
poweradd = 100
ctrl     = 0
velset   = 0,0
anim     = 1300
sprpriority = 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
trigger2 = animelem = 4
value = S5,5
[State 0, PlaySnd]
type = PlaySnd
triggerall = fvar(9) =0
trigger1 = animelem = 3
value = S100,15
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = S10,14

[State 210, 2]
type = HitDef
trigger1 = time = 0
attr = C, NA
animtype  = light
damage    = ifelse(var(9)>0,120,60)
hitflag = M
guardflag = L
pausetime = 10,15
getpower = 100,50
givepower = 10,10
sparkno = s4102+random%2
guard.sparkno = s4203
sparkxy = -10,-12
hitsound   = s1,5
guardsound = s2,1
ground.type = Low
ground.slidetime = 12
ground.hittime  = 16
ground.velocity = -5.5
air.velocity = -2.5,-4
forcenofall = 1
p1stateno = 1301

[State 440, 3]
type = HitDef
trigger1 = p2stateno = [1570,1574]
trigger1 = Time = 0
attr = C, SA
damage = ifelse(var(9)>0,160,80)
hitflag = MAFD
guardflag = 
pausetime = 10,15
sparkno = s4102+random%2
guard.sparkno = s4203
sparkxy = -10,-12
hitsound   = s1,5
guardsound = s2,1
ground.type = Low
ground.slidetime = 12
ground.hittime  = 16
ground.velocity = -5.5
air.velocity = -2.5,-4
forcenofall = 1
p1stateno = 1301


[State 0, PosAdd]
type = Posset
trigger1 = time = 0
y = 0
[State 0, PosAdd]
type = PosAdd
trigger1 = animelem = 1 |animelem = 3 |animelem = 4
x = 5
[State 0, PosAdd]
type = PosAdd
trigger1 = animelem = 2  |animelem = 11
x = 10
[State 0, PosAdd]
type = PosAdd
trigger1 = animelem = 15
x = 20

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 4
x = 15
[State 0, VelSet]
type = VelSet
trigger1 = animelemtime(5)>=0 &&  animelemtime(9)<0 
x = 15

[State 106, 3]
type = MakeDust
trigger1 = AnimElem = 4
trigger2 = AnimElem = 15
trigger3 = AnimElemtime(4)>0 && AnimElemtime(15)<0
trigger3 = gametime%5 = 0
pos = 0, 0
spacing = 1

[State 5110, 7]
type = Explod
trigger1 = animelem = 4
anim = 4030
pos =90, -5
sprpriority = 9
scale = 0.6,0.6
ownpal = 1
removeongethit = 1
bindtime = -1
;supermove = 10
removetime = 13
id = 1300


[State 0, Turn]
type = Turn
trigger1 = time=[0,1]
trigger1 = p2dist x<-5

[State 215]
type = ChangeState
trigger1 = animtime = 0
value = 11
ctrl = 1
;==================================

;==================================

;P2 Lying flat on the ground
[Statedef 1310]
type = A
movetype = H
physics = N
sprpriority = -9

[State 0, CtrlSet]
type = CtrlSet
trigger1 = 1
value = 0
ignorehitpause = 1

[State 1010, 1]
type = VelSet
trigger1 = Time = 0
x = 0
y = 0

[State 1010, 4]
type = ChangeAnim2
Trigger1 = 1
value = 6000

[State 1010, 5]
type = ChangeState
trigger1 = Hitshakeover = 1
value = 1311
;==================================

;P2 Thrown flat
[Statedef 1311]
type = A
movetype = H
physics = N
ctrl = 0
sprpriority = -9

[State 0, VelSet]
type = VelSet
trigger1 = time=0
y = -3.5
[State 0, VelSet]
type = VelSet
trigger1 = time=0
x = ifelse(enemynear,facing = facing,2,-2)

[state 1521,傾僯儊曄峏2]
type = Changeanim2
trigger1 = time = 0
value = 5410

[state 1521,廳椡]
type = Veladd
trigger1 = 1
y = 0.33

[state 1521, 平躺]
type = Changeanim2
trigger1 = vel y > 0
persistent = 0
value = 5050

[State 1011, 2]
type = EnvShake
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
time = 10
ampl = 4
freq = 90
phase = 90
ignorehitpause = 1

[state 1521,?僂儞]
type = Selfstate
trigger1 = pos y >= 0
trigger1 = vel y > 0
value = 5100





















;After Throw
[StateDef 1016]
type = A
physics = N
moveType = H
ctrl = 0
velSet = -1.5,-11.5
sprPriority = 0

[State 1016, ChangeAnim]
type = ChangeAnim
trigger1 = !Time && SelfAnimExist(5061)
value = 5061

[State 1016, ChangeAnim]
type = ChangeAnim
trigger1 = !Time && !SelfAnimExist(5061)
value = 5050

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

[State 1016, VelAdd]
type = VelAdd
Trigger1 = 1
y = 0.49

[State 1016, EnvShake]
type = EnvShake
trigger1 = pos y > -vel y
time = 14
ampl = -4
freq = 120

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

[State 1016, End]
type = SelfState
trigger1 = pos y > -vel y
value = 5100

;Bounce Dive Kick
[Statedef 1201]
type    = A
movetype= A
physics = N
velset = 0,-10
facep2 = 1
anim = 1352
ctrl = 0

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

[State 1820,Pos]
type = PosFreeze
trigger1 = AnimElem = 1


[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = s1,17
channel = 3

[State 0, Explod]
type = Explod
trigger1 = animelem = 4
anim = 1501
ID = 1411
pos =10,-70
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 9999
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = -5
ontop = 0
ownpal = 0
removeongethit = 1
ignorehitpause = 1
trans = add

[State 1051, 1] ;Gravity
type = Velset
trigger1 = animelem >= 3
x = 25
y = 15

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


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

[state 240, 2]
type = hitdef
trigger1 = time = 0
trigger1 = !movecontact || !movereversed
attr = A, SA
animtype  = light
damage    = ceil(ifelse(fvar(11) * 45< 7, 15, fvar(11) * 45)), 15
getpower = ifelse(!var(13),floor(fvar(11) * 100),floor(fvar(11) * 72))*!var(20), floor(fvar(11) * 0)
hitFlag = mafd
guarDFlag = ha
pausetime = 6,6
hitsound = S2,7
guardsound = S0,8
sparkno = s6026
;guard.sparkno = s6000
sparkxy = -10,-10
ground.type = high
ground.slidetime = 15
ground.hittime  = 40
ground.type = high
ground.velocity = -9;,-6
air.velocity = -5,-9
fall = ifelse(var(13) >= 2,1,0)
air.fall = 1
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0



[State 0, ChangeState]
type = ChangeState
triggerall = !ailevel
trigger1 = movecontact 
trigger1 = command = "b"
trigger1 = numexplod(12251) = 0
value =1225
ctrl = 0

[State 0, Explod]
type = Explod
trigger1 = time = 0
anim = 1
ID = 10161
pos =0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 9999
removetime = 9999
pausemovetime = 0
scale = 1,1
sprpriority = -5
ontop = 0
ownpal = 0
removeongethit = 1
ignorehitpause = 1
trans = add




[State 1051, 2] 
type = ChangeState
trigger1 = (Vel Y > 0) && (Pos Y >= 0)
value = ifelse(movecontact,52,1202)
ctrl = 1
;---------------------------------------------------------
; Taxes
[statedef 1202]
type    = s
movetype= I
physics = s
velset = 0,0
;ctrl = 0

[state 200, 1]
type = posset
trigger1 = 1
y = 0



;damage on miss
[State 0, LifeAdd]
type = null;LifeAdd
trigger1 = !numexplod(1777)
trigger1 = time = 0
value = 0
kill = 1
absolute = 0


[state 52, 1]
type = changeanim
trigger1 = time = 0
value = 1201

[state 52, playsnd]
type = playsnd
trigger1 = animelem = 1
value = s0,16
channel = 0

[state 52, Dust]
type = null;explod
trigger1 = time = 2
anim = 6007
id = 6007
postype = p1
pos = 0,0
ownpal = 1
bindtime = 1
sprpriority = -2
persistent = 0
removeongethit = 0


[state 52, 5]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1
;-------------------------------------------------------------------------------------
; Taxes
[statedef 1203]
type    = s
movetype= I
physics = s
ctrl = 0

[state 200, 1]
type = velset
trigger1 = p2dist x > 5
x = 20

[State 0, VelAdd]
type = Velset
trigger1 = 1
y = 0


[state 52, 1]
type = changeanim
trigger1 = time = 0
value = 1201

[state 52, playsnd]
type = playsnd
trigger1 = animelem = 1
value = s0,16
channel = 0

[state 52, Dust]
type = explod
trigger1 = time = 2
anim = 6007
id = 6007
postype = p1
pos = 0,0
ownpal = 1
bindtime = 1
sprpriority = -2
persistent = 0
removeongethit = 0


[state 52, 5]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;-------------------------------------------------------------------------------------------------------------------------------------------------------------------------









;-------------------------------------------------------------------------------
[Statedef 1260, ]
type    = A
movetype= H
physics = N
velset = 0,0
facep2 = 1

[State 2120]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,0

[State 52, 1]
type = VelSet
trigger1 = time = 5
x = 0
y = 11.5

[State 52, 2]
type = Veladd
trigger1 = time >= 10
y = .25

[State 810,]
type = EnvShake
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
ampl = 10
freq = 120
time = 10

[State 1830]
type = ChangeAnim2
Trigger1 = Time = 0
value = 5030

[State 1830]
type = changestate
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 1262


;-------------------------------------------------------------------------------
[Statedef 1262, Fly Press up]
type    = A
movetype= H
physics = N
facep2 = 1

[State 2120]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,0

[State 52, 1]
type = VelSet
trigger1 = time = 5
;x = -.5
y = -2.5

[State 52, 2]
type = Veladd
trigger1 = time >= 5
y = .425

[State 1830]
type = ChangeAnim2
Trigger1 = Time = 0
value = 1261

[State 1830]
type = SelfState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 5100




[Statedef 1270, 620 target]
type    = A
movetype= H
physics = N
facep2 = 1

[State 2120]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,0

[State 52, 1]
type = Veladd
trigger1 =1
x = .2
y = 11.5

[State 52, 2]
type = Veladd
trigger1 = time >= 10
y = .5

[State 810,]
type = EnvShake
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
ampl = 10
freq = 120
time = 10





[State 1830]
type = ChangeAnim2
Trigger1 = Time = 0
value = 5040

[State 1830]
type = changestate
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 1271

;-------------------------------------------------------------------------------
[Statedef 1271, H Fly grounded]
type    = L
movetype= H
physics = N

[State 5100, 2004.04.14 behavior]
type = null;VelSet
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) = 0
trigger1 = vel x < -1
x = -1



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

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

[State 1830]
type = ChangeAnim2
Trigger1 = Time = 0
value = 1260

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

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

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


[State 5100, 8]
type = GameMakeAnim
triggerall = anim = [5101,5102]
trigger1 = Time = 1
value = 61
pos = 0, 0
under = 1

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

[State 5100, PalFX]
type = PalFX
trigger1 = time = 0
time = 1

;;========================================================
;;=================================================Crater
[State 1000, EnvShake]
type = EnvShake
trigger1 = (sysvar(1) > 14)
trigger1 = time = 0
time = 10
freq = 100
ampl = -2


;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
[State 1000, Pause]
type = null
Pause
triggerall = RoundState = 2
trigger1 = (sysvar(1) > 14)
trigger1 = time = [0,1]
time = 1
movetime = 1
ignorehitpause = 1



;;--------------------------------------------
;-------------------------------------------




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

[State 5100, 14]
type = ChangeState
trigger1 = time = 1
value = 1272

[State 5100, 15]
type = NotHitBy
trigger1 = 1
value = SCA

[State 5100, 16]
type = ForceFeedback
trigger1 = Time = 0
waveform = sinesquare
ampl = 128,-3,-.2,.005
time = 20

;-------------------------------------------------------------------------------
[Statedef 1272, H Fly Press up]
type    = A
movetype= H
physics = N
velset = 0,0
facep2 = 1

[State 2120]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,0

[State 52, 1]
type = VelSet
trigger1 = time = 1
x = -.5
y = -9

[State 52, 2]
type = Veladd
trigger1 = time >= 3
y = .425

[State 1830]
type = ChangeAnim2
Trigger1 = Time = 0
value = 1261

[State 1830]
type = SelfState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 5100








;----------Wolfbane target----------
;-------------------------------------------------------------------------------
[Statedef 1280,H FLY pressed down]
type    = A
movetype= H
physics = N
velset = 0,0
facep2 = 1

[State 2120]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,0

[State 52, 1]
type = VelSet
trigger1 =1
x = 0
y = 11.5

[State 52, 2]
type = Veladd
trigger1 = time >= 10
y = .5

[State 810,]
type = EnvShake
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
ampl = 5
freq = 60
time = 5





[State 1830]
type = ChangeAnim2
Trigger1 = Time = 0
value = 5040

[State 1830]
type = changestate
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 1281

;-------------------------------------------------------------------------------
[Statedef 1281, H Fly grounded]
type    = L
movetype= H
physics = N

[State 5100, 2004.04.14 behavior]
type = null;VelSet
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) = 0
trigger1 = vel x < -1
x = -1


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


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

[State 1830]
type = ChangeAnim2
Trigger1 = Time = 0
value = 1260

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

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

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


[State 5100, 8]
type = GameMakeAnim
triggerall = anim = [5101,5102]
trigger1 = Time = 1
value = 61
pos = 0, 0
under = 1

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

[State 5100, PalFX]
type = PalFX
trigger1 = time = 0
time = 1

;;========================================================
;;=================================================Crater


;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
[State 1000, Pause]
type = null
Pause
triggerall = RoundState = 2
trigger1 = (sysvar(1) > 14)
trigger1 = time = [0,1]
time = 1
movetime = 1
ignorehitpause = 1



;;--------------------------------------------
;-------------------------------------------




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

[State 5100, 14]
type = ChangeState
trigger1 = time = 1
value = 1282

[State 5100, 15]
type = NotHitBy
trigger1 = 1
value = SCA

[State 5100, 16]
type = ForceFeedback
trigger1 = Time = 0
waveform = sinesquare
ampl = 128,-3,-.2,.005
time = 20

;-------------------------------------------------------------------------------
[Statedef 1282, H Fly Press up]
type    = A
movetype= H
physics = N
velset = 0,0
facep2 = 1

[State 2120]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,0

[State 52, 1]
type = VelSet
trigger1 = time = 5
x = -1
y = -9

[State 52, 2]
type = Veladd
trigger1 = time >= 5
y = .425

[State 1830]
type = ChangeAnim2
Trigger1 = Time = 0
value = 1261

[State 1830]
type = SelfState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 5100


























;-------------------------------------------------------------------------------------------------------------------------------------
;Double Kick
[Statedef 1625]
type    = S
movetype= A
physics = N
juggle  = 0
ctrl = 0
velset = 0,0
anim = 1026
facep2 = 1
sprpriority = 2
;poweradd = 20

[State 0, Explod]
type = Explod
trigger1 = time = 0
anim = 1
ID =16251 
pos = 0,0
postype = p1  ;p2,front,back,left,right
removetime = 99999
removeongethit = 1



;ha
[State 40, Snd]
type = playsnd
trigger1 =  animelemtime(2) = 0
value = 12,random%3


;whoosh
[State 40, Snd]
type = playsnd
trigger1 =  animelemtime(5) = 0
trigger2 =  animelemtime(12) = 0
value = 0, 3


[State 920]
type = Posset
trigger1 = time = 0
y = 0

[State 920]
type = velset
trigger1 = AnimElemTime(2) >= 0
trigger1 = AnimElemTime(6) <= 2
trigger2 = AnimElemTime(8) >= 0
trigger2 = AnimElemTime(14) <= 2
x = 8    


    [State 250, Time Offset]
    type = VarSet
    trigger1 = moveContact = 1
    var(11) = Time
    ignorehitpause = 1
    persistent = 0
    [State 250, Play Anim]
    type = ChangeAnim
    triggerall = AnimElemTime(6) >= 0 && AnimElemTime(7) <= 0
    trigger1 = hitPauseTime = [10,8 - (2 - Var(11))]
    value = anim
    elem = 7
    ignorehitpause = 1

    [State 250, Time Offset]
    type = VarSet
    trigger1 = moveContact = 1
    var(11) = Time
    ignorehitpause = 1
    persistent = 0
    [State 250, Play Anim]
    type = ChangeAnim
    triggerall = AnimElemTime(13) >= 0 && AnimElemTime(14) <= 0
    trigger1 = hitPauseTime = [10,27 - (2 - Var(11))]
    value = anim
    elem = 14
    ignorehitpause = 1





[State 0, 1]
type = Explod
trigger1 = animelem = 2
trigger2 = animelem = 11
anim = 627
pos = 0,-8
postype = p1
bindtime = -1
ID = 627
sprpriority = 5
removeongethit = 1
ignorehitpause = 0
ontop = 1
ownpal = 1 
scale = 1,1
trans = add
ignorehitpause =1

[State 0, Explod]
type = Explod
triggerall = 0
trigger1 = animelem = 3
trigger2 = animelem = 12
anim = 332
ID = 1625
pos = 60,-65
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 9999
removetime = -2
pausemovetime = 0
scale = .5,1.15
sprpriority = 0
ontop = 1
ownpal = 0
removeongethit = 1



[State 920, StateType]
type = StateTypeSet
trigger1 = AnimElemTime(2) >= 0
trigger1 = AnimElemTime(15) <= 0
trigger2 = AnimElemTime(16) >= 0
trigger2 = AnimElemTime(18) <= 4
StateType = A


[State 920, StateType]
type = StateTypeSet
trigger1 = AnimElem = 1
trigger2 = AnimElemTime(16) = 1
trigger3 = AnimElemTime(19) = 0
StateType = S


[State 615, ƒqƒbƒg’è‹`]
type = HitDef
trigger1 = animelem = 6;9
attr = S, SA
damage = ceil(ifelse(fvar(11) * 20 < 10, 10, fvar(11) * 20)), 10  ;add bouns to Counter hit
priority = 4,Hit
getpower =floor(fvar(11) * 40), 0
givepower = floor(fvar(11) * 20),0
animtype = hard
air.animtype = back
hitflag = MAF
guardflag = H
pausetime = 8,10
ground.type = High
ground.slidetime = 35
ground.hittime = 45
guard.hittime = 35
guard.slidetime = 15
guard.ctrltime = 35
ground.velocity = -12.0;*const(size.xscale)
guard.velocity = -12.0;*const(size.xscale)
air.velocity = -15,5;*const(size.xscale),5.0;*const(size.yscale)
air.type = high
air.hittime = 250
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
fall = 0
fall.recover = 0
air.fall = 1
down.bounce = 1
P2facing = 1
envshake.time = 5
envshake.freq = 60
envshake.ampl = 1
yaccel = .60*const(size.yscale)
fall.recovertime = 120
hitsound = s0,7
guardsound = s0,10
sparkno = -1 + 0*(var(33):=8012)
guard.sparkno = -1 + 0*(var(34):=8000)
sparkxy = -10 + 0*(var(35):=81), var(36):=-85

[State 615, ƒqƒbƒg’è‹`]
type = HitDef
trigger1 = animelem = 13;18
attr = S, SA
damage = ceil(ifelse(fvar(11) * 20 < 10, 10, fvar(11) * 20)), 10  ;add bouns to Counter hit
priority = 4,Hit
getpower =floor(fvar(11) * 40), 0
givepower = floor(fvar(11) * 20),0
animtype = hard
air.animtype = back
hitflag = MAF
guardflag = H
pausetime = 10,7
ground.type = High
ground.slidetime = 35
ground.hittime = 25
guard.hittime = 7
guard.slidetime = 15
guard.ctrltime = 7
ground.velocity = -12.0;*const(size.xscale)
guard.velocity = -12.0;*const(size.xscale)
air.velocity = -15,5;*const(size.xscale),5.0;*const(size.yscale)
air.type = high
air.hittime = 250
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
fall = 0
fall.recover = 0
air.fall = 1
down.bounce = 1
P2facing = 1
envshake.time = 5
envshake.freq = 60
envshake.ampl = 1
yaccel = .60*const(size.yscale)
fall.recovertime = 120
hitsound = s0,7
guardsound = s0,10
sparkno = -1 + 0*(var(33):=8012)
guard.sparkno = -1 + 0*(var(34):=8000)
sparkxy = -10 + 0*(var(35):=81), var(36):=-85



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











[statedef 5300, stunlock]
type = U
movetype = H
physics = N
ctrl = 0
anim = 5000
velset = 0,0

[state 5300, air]
type = veladd
trigger1 = statetype = A && pos y < 0
y = 20

[state 5300, airtype]
type = statetypeset
trigger1 = pos y < 0 && statetype != A
statetype = A

[state 5300, stopvel]
type = velset
trigger1 = pos y >= 0 || statetype = S
trigger1 = vel y != 0
y = 0

[state 5300, stand]
type = statetypeset
trigger1 = pos y >= 0 && statetype != S
statetype = S

[state 5300, end]
type = selfstate
trigger1 = time >= 30
trigger1 = statetype = S
value = 0
ctrl = 1
;----------------------------------------------------------------------------------------------------------------------
;----------------------------------------------------------------------------------------------------

;---------------------------------------------------------------------------
;spin attempt
[Statedef 1700]
type = S
physics = S
moveType = A
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = 20
facep2 = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S10,0
channel = 1


[State 220, Anim]
type=changeanim
trigger1=!time
value=725


[State 0, ReversalDef]
type = ReversalDef
trigger1 = !time
reversal.attr = SCA,AT
pausetime = 0,0
sparkno = S8360
sparkxy = 25,-90 
hitsound = S0,24
p1stateno = 2901
;ignorehitpause = 1

[State 0, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA,AP
stateno = 2901
time = 1

[State 0, Explod]
type = Explod
trigger1 = command = "z"
trigger1 = power >= 1000
anim = 1
ID = 17251
pos = 0,0
postype = p1  
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = 80
pausemovetime = 0
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 1


[State 0, ChangeState]
type = ChangeState
;trigger1 = animelem >= 3
trigger1 = numexplod(17251)
value =2900
ctrl = 0



[State 220,Posset]
type=posset
trigger1=!time
y=0

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


;Special 1
[Statedef 1050]
type=S
physics=S
movetype=A
ctrl=0
velset=0,0
sprpriority=1
poweradd=72*!var(20)
facep2=1

[state 1000,Posset]
type=posset
trigger1=!time
y=0

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

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

[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = !Time
value = ifElse(var(10) = 0, 1000, ifElse(var(10) = 1, 1010, 1020))

[State 1000, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = 1000,0
channel = 0

[State 1000, PlaySnd]
type = PlaySnd
trigger1 = animelem = 7
value = 1000,1
channel = 1

[State 1200, Hit]
type=hitdef
trigger1= !var(16) && (var(15)<15 || var(20))
trigger1= !Time
ID = 1200
attr = S,SA
hitflag = HAF
guardflag = M
damage = ceil(ifElse(fvar(11) * ifElse(var(10) = 2, 112, ifElse(var(10), 105, 98)) < 7, 7, fvar(11) * ifElse(var(10) = 2, 112, ifElse(var(10), 105, 98)))), 7
getpower = ifelse(!var(13), 216, 72)*!var(20), 36*!var(20)
givepower = 36, 36
pausetime = ifelse(var(20), 6, 12), ifelse(var(20), 6, 12)
guard.pausetime = ifelse(var(20), 6, 12), ifelse(var(20), 6, 12)
animtype = Hard
air.animtype = back
fall.animtype = back
ground.type = Low
air.type = Low
ground.hittime = 18
ground.slidetime = 18
guard.hittime = 18
air.hittime = 120
ground.velocity = ifelse(var(20), -3.61, -6.89), 0
ground.cornerpush.veloff = 0
guard.velocity = ifelse(var(20), -3.61, -6.89)
guard.cornerpush.veloff = 0
air.velocity = -3, -4
air.cornerPush.velOff = 0
yaccel = .45
fall = 1
air.fall = 1
fall.recover = 0
fall.recovertime = 120
forcestand = 1
hitsound = -1 + 0*(var(31):=2)
guardsound = -1 + 0*(var(32):=0)
sparkno = -1 + 0*(var(33):=8013)
guard.sparkno = -1 + 0*(var(34):=8001)
sparkxy = -10 + 0*(var(35):=92), var(36):=-77
palfx.time = 12*var(9)
palfx.add = 255,255,255
palfx.sinadd= -255,-255,-255,48

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

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

;---------------------------------------------------------------------------
;EX Special 1
[Statedef 1075]
type=S
physics=S
movetype=A
ctrl=0
velset=0,0
sprpriority=1
poweradd=-500
facep2=1


[State 1050, MAX Timer Drain]
type = VarAdd
trigger1 = !Time
trigger1 = var(53) > 0
var(53) = -500




[State 1050, Anim]
type=changeanim
trigger1=!time
value=1050

[State 1050,Posset]
type=posset
trigger1=!time
y=0

[State 1050, Button Detect]
type = VarSet
trigger1 = !Time
var(10) = 3

[State 1050, Custom Combo Juggle Points Reset]
type = varset
trigger1 = !time && var(20)
var(15) = 0
ignorehitpause = 1

[State 1050, CC Reset]
type = palfx
trigger1 = !time
trigger1 = var(20) := -1
time = 1

[State 1050, ExFX]
type = varset
trigger1 = !time
var(25) = 44

[State 1050, ExFX]
type = explod
trigger1 = !time
anim = 8210
sprpriority = 3
postype = p1
pos = -31, -86
scale = 0.5, 0.5
pausemovetime = -1
supermovetime = -1
ownpal = 1
Id=13
[State 1050, ExFX]
type = playsnd
trigger1 = !time
value = 0, 1000
channel = 1

[State 1050, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = 1000,0
channel = 0

[State 1050, PlaySnd]
type = PlaySnd
trigger1 = animelem = 7
value = 1000,1
channel = 1

;---------------------------------------------------------------------------------------------------------------------------------------------------------
; High Kick
[Statedef 1200]
type = S
movetype =A 
physics = S
ctrl = 0
velset = 0,0
anim = 1350
poweradd = 0

[State 0, Explod]
type = Explod
trigger1 = animelem = 4
anim = 1500
ID = 1410
pos = -10,-10
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 9999
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = 5
ontop = 1
ownpal = 0
removeongethit = 1
ignorehitpause = 1
trans = add

[State 0, Explod]
type = Explod
trigger1 = animelem = 4
anim = 12000
ID = 1410
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
pausemovetime = 0
scale = 1.25,1.25
sprpriority = 5
ontop = 1
ownpal = 0
removeongethit = 1
ignorehitpause = 1
trans = add


[state 200, 1]
type = playsnd
trigger1 = animelem = 2
value = 12,random%3
channel = 1


[State 810, •¨—“I‚ÈƒLƒƒƒ‰‚Ì•]
type = Width
trigger1 = 1
edge = 40,0

[State 170, –³“G]
type = NotHitBy
trigger1 = AnimElemtime(4) < 0
value = SCA

[State 40, Dust]
type =null; helper
trigger1 =  animelemtime(3) = 0
stateno = 8100
ID = 8100
name = "Jump Dust"
postype = p1
ownpal = 1



[State 1000, ]
type = Velset
trigger1 = p2dist x > 50
trigger1 = AnimElemtime(4) >= 0 && AnimElemtime(6) <= 0
x = 15

[State 1000, ]
type = Velset
trigger1 = AnimElem = 4
y = -12

[State 1000, ]
type = Veladd
trigger1 = AnimElemtime(4) >= 0
y = .54

[State 1000, ]
type = null;Posadd
trigger1 = AnimElem = 1
x = 10

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
value = S2,5
channel = 3



[State 6000, 3]
type = StateTypeSet
trigger1 = AnimElem = 4
statetype = A



[State 200, ƒqƒbƒg’è‹`]
type = HitDef
trigger1 = !time
attr = A, SA
damage = ifelse(var(9),2,1*ceil(ifelse(fvar(11)*80<40, 40, fvar(11)*80))),10
getpower = 60,20
givepower = 40,15
animtype = up
guardflag = M
hitflag = MAF
getpower = 50
priority = 3, Hit
pausetime = 12, 13
ground.type = High
ground.slidetime = 20
ground.hittime  = 21
ground.velocity = -4.7,-8.4
air.type = High
air.velocity = -6,-2.5
air.hittime = 250
yaccel = .42
fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
hitsound = s0,8
guardsound = s0,10
sparkno = -1 + 0*(var(33):=8012)
guard.sparkno = -1 + 0*(var(34):=8000)
sparkxy = -10 + 0*(var(35):=64), var(36):=-80
palfx.time = 12*var(9)
palfx.add = 255,255,255
palfx.sinadd= -255,-255,-255,48

[State 1000, to dbl kick]
type = ChangeState
triggerall = movehit && numexplod(12251) = 0
trigger1 =!ailevel
trigger1 = command = "b"
trigger2 = AILevel && NumEnemy
trigger2 = Random < (50 + 250 * ifelse( (AILevel ** 2 / 64.0) <= .6 , .6, (AILevel ** 2 / 64.0)) )
trigger2 = numexplod(12251) = 0
trigger2 =  (P2Dist y = [-50,50]) 
value = 1225


[State 1000, to dive kick]
type = ChangeState
triggerall = movecontact && numexplod(10161) = 0
trigger1 =!ailevel
trigger1 = command = "QCF_x"
trigger2 = ailevel && numenemy
trigger2 = numexplod(10161) = 0  
trigger2 = (p2dist y = [0,200]) && random < (150 * ifelse( (AILevel ** 2 / 64.0) <= .6 , .6, (AILevel ** 2 / 64.0)))
value = 1201


[State 1000, to hyper dive kick]
type = ChangeState
triggerall = movehit && power >= 3000
trigger1 =!ailevel
trigger1 = command = "QCF_y"
trigger2 = ailevel && numenemy
trigger2 = (p2dist y = [0,200]) && random < (150 * ifelse( (AILevel ** 2 / 64.0) <= .6 , .6, (AILevel ** 2 / 64.0)))
value = 17800


[State 1000, ƒXƒe[ƒg•ÏX]
type = ChangeState
triggerall = movehit 
trigger1 = command = "x+y"
trigger1 = !ailevel
trigger2 = ailevel && numenemy
trigger2 = numexplod(10161) || numexplod(12251) || p2life <= 75
trigger2 = p2bodydist y < -10 
trigger2 = Random < (50 + 150 * ifelse( (AILevel ** 2 / 64.0) <= .6 , .6, (AILevel ** 2 / 64.0)) ) || numexplod(12251) 
value = 2100


[State 1000, ƒXƒe[ƒg•ÏX]
type = ChangeState
triggerall = AnimElemtime(10) >= 0
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 1202


;---------------------------------------------------------------------------------------------------------------------------------------------------------
; High dbl Kick
[Statedef 1225]
type = A
movetype =A 
physics = n
ctrl = 0
anim = 1375
poweradd = 0


[state 200, 1]
type = playsnd
trigger1 = animelem = 2
value = 12,random%3
channel = 1


[State 810, •¨—“I‚ÈƒLƒƒƒ‰‚Ì•]
type = Width
trigger1 = 1
edge = 40,0


[State 1000, ]
type = Velset
trigger1 = !movecontact
trigger1 = p2dist x > 50
trigger1 = AnimElemtime(1) >= 0 && AnimElemtime(5) <= 0
x = 10

[State 0, 1]
type = Explod
trigger1 = Animelem = 2
trigger1 = anim = 1375
trigger2 = Animelemtime(1) = 1
trigger2 = anim = 1376
anim = 455
pos = 0,-15
postype = p1
bindtime = -1
ID = 455
sprpriority = 5
removeongethit = 1
ignorehitpause = 0
ontop = 1
ownpal = 1 
trans = add
scale =1.25,1.25
sprpriority = 5 * -(anim != 1375) 
ontop = 1 *(anim != 1375) 
ownpal = 0
removeongethit = 1


[State 1000, ]
type = Velset
trigger1 = !movecontact
trigger1 = p2dist x = [0,50]
trigger1 = AnimElemtime(1) >= 0 && AnimElemtime(5) <= 0
x = 7


[state -2]
type = VelSet
;triggerall = anim = 1375
Trigger1 = AnimElem = 1
y = -3.75

[state -2]
type = VelAdd
triggerall = anim = 1375
Trigger1 = AnimElem = 1, > 0
y = .1 + -ceil((pos y/200))



[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
value = S2,5
channel = 3


[State 200, ƒqƒbƒg’è‹`]
type = HitDef
triggerall = anim = 1375
trigger1 = !time
attr = A, SA
damage = ceil(ifelse(fvar(11)*45<30, 30, fvar(11)*45)),30
getpower = 60,20
givepower = 40,15
animtype = up
guardflag = M
hitflag = MAF
getpower = 50
priority = 3, Hit
pausetime = 12, 13
ground.type = High
ground.slidetime = 20
ground.hittime  = 21
ground.velocity = -4.7,-8.4
air.type = High
air.velocity = -6,-2.5
air.hittime = 250
yaccel = .42
fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
hitsound = s0,7
guardsound = s0,10
sparkno = -1 + 0*(var(33):=8012)
guard.sparkno = -1 + 0*(var(34):=8000)
sparkxy = -10 + 0*(var(35):=145), var(36):=-95
palfx.time = 12*var(9)
palfx.add = 255,255,255
palfx.sinadd= -255,-255,-255,48

[State 200, ƒqƒbƒg’è‹`]
type = HitDef
triggerall = anim = 1376
trigger1 = animelem = 3
attr = A, SA
damage = ceil(ifelse(fvar(11)*45<30, 30, fvar(11)*45)),40
getpower = 60,20
givepower = 40,15
animtype = up
guardflag = M
hitflag = MAF
getpower = 50
priority = 7, Hit
pausetime = 12, 13
ground.type = High
ground.slidetime = 20
ground.hittime  = 21
ground.velocity = -8.4,-8.4
air.type = High
air.velocity = -8,-1
air.hittime = 444
yaccel = .55
fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
hitsound = s0,7
guardsound = s0,10
sparkno = -1 + 0*(var(33):=8012)
guard.sparkno = -1 + 0*(var(34):=8000)
sparkxy = -10 + 0*(var(35):=145), var(36):=-95
palfx.time = 12*var(9)
palfx.add = 255,255,255
palfx.sinadd= -255,-255,-255,48

[State 0, TargetState]
type = TargetState
triggerall = NumTarget;()
trigger1 = movehit 
value = 1226

[State 0, TargetBind]
type = TargetBind
trigger1 =  anim = 1375
trigger1 =  movehit 
time = 1
id = -1
pos = 110,-20


[State 0, Explod]
type = Explod
trigger1 = movehit && numexplod(12251) = 0
anim = 1
ID = 12251
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = 9999
pausemovetime = 9999
scale = 1,1
removeongethit = 1

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = anim = 1375
trigger1 = animtime = 0
value = 1376

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1376
physics = A         ;A,C,S,N

[State 1000, to dive kick]
type = ChangeState
triggerall = movecontact && numexplod(10161) = 0
trigger1 =!ailevel
trigger1 = command = "QCF_x"
trigger1 = command != "QCB_x"
trigger2 = ailevel && numenemy
trigger2 = anim = 1376 && animelem >= 3
trigger2 = numexplod(10161) = 0  
trigger2 = (p2dist y = [0,200]) && random < (150 * ifelse( (AILevel ** 2 / 64.0) <= .6 , .6, (AILevel ** 2 / 64.0)))
value = 1201

[State 1000, to ex drill kick]
type = ChangeState
triggerall = movecontact 
trigger1 =!ailevel
trigger1 = command = "QCB_x"
trigger2 = ailevel && numenemy
trigger2 = power >= 2000
trigger2 = anim = 1376 && animelem >= 4 && numexplod(12251) 
trigger2 =  (P2Dist y = [-40,0]) && (P2Dist x = [0,165]) 
trigger2 = Random < (150+333 * ifelse( (AILevel ** 2 / 64.0) <= .6 , .6, (AILevel ** 2 / 64.0)) )
value = 1725

[State 1000, to hyper dive kick]
type = ChangeState
triggerall = movecontact && power >= 3000
trigger1 =!ailevel
trigger1 = command = "QCF_y"
trigger2 = ailevel && numenemy
trigger2 = (p2dist y = [0,200]) && random < (150 * ifelse( (AILevel ** 2 / 64.0) <= .6 , .6, (AILevel ** 2 / 64.0)))
value = 17800



[State 640, End]
type=changestate
triggerall = anim = 1376
trigger1= animtime=0
value=50
ctrl = 1

[State 1000, ƒXƒe[ƒg•ÏX]
type = ChangeState
;triggerall = AnimElemtime(10) >= 0
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 1202


[Statedef 1226, air tri kick target]
type    = A
movetype= H
physics = n
velset = -7,-2

[State 0, VelSet]
type = Veladd
trigger1 = time = 0
y = -.25


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

[State 0, VelSet]
type =null; Velset
trigger1 = TIME = 0
trigger1 = backedgedist >= 50 
x = -7

[State 0, VelSet]
type = Velset
trigger1 = backedgedist < 10
x = 0

[State 0, VelAdd]
type = VelAdd
trigger1 = time >= 0
y = .40
persistent = 1
ignorehitpause = 1

[State 1830]
type = ChangeAnim2
Trigger1 = Time = 0
value = 5060



[State 1830]
type = changestate
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 1262

;---------------------------------------------------------------------------------------------------------------------------------------------------------
; Drill ex Kick
[Statedef 1725]
type = A
movetype =A 
physics = n
ctrl = 0
anim = 1378
poweradd = -2000



[State PlaySnd]
type = PlaySnd
trigger1 = Animelem = 1
value = s1,29
channel = 4


[State 1050, ExFX]
type = varset
trigger1 = !time
var(25) = 44

[State 810, •¨—“I‚ÈƒLƒƒƒ‰‚Ì•]
type = Width
trigger1 = 1
edge = 40,0

[State 0, 1]
type = Explod
trigger1 = Animelem = 3
anim = 1379
pos = 100,-100
postype = p1
bindtime = -1
removetime = 42
ID = 1379
sprpriority = 5
removeongethit = 1
ignorehitpause = 0
ontop = 1
ownpal = 1 
trans = add
scale =1.0,1.0
sprpriority = 5  



[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
value = S7,12
channel = 3

[State 200, ƒqƒbƒg’è‹`]
type = HitDef
trigger1=  !(time%3) && hitcount<=13 
attr = A, SA
damage = ceil(ifelse(fvar(11) * 21 < 0, 8, fvar(11) * 21)),5
getpower = 5,2
givepower = 2,3
animtype = up
guardflag = M
hitflag = MAF
priority = 3, Hit
pausetime = 5, 2
ground.type = High
ground.slidetime = 20
ground.hittime  = 21
ground.velocity = -2,-3
air.type = High
air.velocity = -2,-4
air.hittime = 250
yaccel = .333
fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
hitsound = s0,7
guardsound = s0,10
sparkno = -1 + 0*(var(33):=8012)
guard.sparkno = -1 + 0*(var(34):=8000)
sparkxy = -10 + 0*(var(35):=145), var(36):=-95
palfx.time = 12*var(9)
palfx.add = 255,255,255
palfx.sinadd= -255,-255,-255,48

[State 0, TargetState]
type = TargetState
triggerall = NumTarget;()
trigger1 = movehit 
value = 1226

[State 0, TargetBind]
type = TargetBind
trigger1 =  movehit 
time = 1
id = -1
pos = 110,-20


[State 650, VelSet]
type = VelSet
trigger1 = animelem = 2
x = 12
y = -8

[State 650, 1]
type = VelAdd
Trigger1 = 1
y = .4



[State 1000, to dive kick]
type = ChangeState
triggerall = movecontact && numexplod(10161) = 0
trigger1 =!ailevel
trigger1 = command = "QCF_x"
trigger2 = ailevel && numenemy
trigger2 = anim = 1376 && movehit
trigger2 = numexplod(10161) = 0  
trigger2 = (p2dist y = [0,200]) && random < (150 * ifelse( (AILevel ** 2 / 64.0) <= .6 , .6, (AILevel ** 2 / 64.0)))
value = 1201



[State 1000, ƒXƒe[ƒg•ÏX]
type = ChangeState
triggerall = movehit 
trigger1 = ailevel && numenemy
trigger1 = hitcount  >=13 
trigger1 = numexplod(10161) || numexplod(12251) || p2life <= 75
trigger1 = p2bodydist y < -10 
trigger1 = Random < (50 + 150 * ifelse( (AILevel ** 2 / 64.0) <= .6 , .6, (AILevel ** 2 / 64.0)) ) || numexplod(12251) 
value = cond(power >= 3000|| (power >=1000 && p2life <= 250),21000,2100)


[State 1000, to hyper dive kick]
type = ChangeState
triggerall = movecontact && power >= 3000
trigger1 =!ailevel
trigger1 = command = "QCF_y"
trigger2 = ailevel && numenemy
trigger2 = (p2dist y = [0,200]) && random < (150 * ifelse( (AILevel ** 2 / 64.0) <= .6 , .6, (AILevel ** 2 / 64.0)))
value = 17800


[State 1000, ƒXƒe[ƒg•ÏX]
type = ChangeState
triggerall = movehit 
trigger1 = command = "z"
trigger1 = !ailevel
value = cond(power >= 3000|| (power >=1000 && p2life <= 250),21000,2100)


[State 1000, ƒXƒe[ƒg•ÏX]
type = ChangeState
triggerall = movehit 
trigger1 = command = "x+a"
trigger1 = !ailevel
value = 2100

[State 1000, ƒXƒe[ƒg•ÏX]
type = ChangeState
triggerall = movehit 
trigger1 = ailevel && numenemy
trigger1 = numexplod(10161) || numexplod(12251) || p2life <= 75
trigger1 = p2bodydist y < -10 
trigger1 = Random < (50 + 150 * ifelse( (AILevel ** 2 / 64.0) <= .6 , .6, (AILevel ** 2 / 64.0)) ) || numexplod(12251) 
value = 2100


[State 640, End]
type=changestate
trigger1= animtime=0
value=50
ctrl = 1

[State 640, End]
type=changestate
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 1203


;---------------------------------------------------------------------------------------------------------------------------------------------------------
; Luxurious Kick
[Statedef 2100]
type     = a
movetype = A
physics  = u
velset   = 0,0
anim     = 2100
ctrl     = 0
sprpriority = 2

[State 0, NotHitBy]
type = NotHitBy
trigger1 = movehit
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 1
ignorehitpause = 1



[State 0, Explod]
type = Explod
trigger1 = animelem = 2
anim = 1410
ID = 1410
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 9999
removetime = -2
pausemovetime = 0
scale = 1.25,1.25
sprpriority = 5
ontop = 1
ownpal = 0
removeongethit = 1
ignorehitpause = 1
trans = add


[state 200, 1]
type = playsnd
trigger1 = animelem = 2
value = 12,random%3
channel = 1


[State 810, •¨—“I‚ÈƒLƒƒƒ‰‚Ì•]
type = Width
trigger1 = 1
edge = 40,0

[State 170, –³“G]
type = NotHitBy
trigger1 = AnimElemtime(6) < 0
value = SCA


[State 1000, ]
type =Velset
trigger1 = p2dist x >= 50 || movecontact
;AnimElemtime(4) >= 0 && AnimElemtime(6) <= 0
x = 8

[State 1000, ]
type = Velset
trigger1 = time = 0;AnimElem = 4
y = -12

[State 1000, ]
type = Veladd
trigger1 = time >= 1; AnimElemtime(4) >= 0
y = .54

[State 1000, ]
type = Posadd
trigger1 = AnimElem = 1
x = 10

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
value = S2,5
channel = 3


[State 200, ƒqƒbƒg’è‹`]
type = HitDef
trigger1 = !time
attr = A, NT
damage = ceil(ifelse(fvar(11)*80<40, 40, fvar(11)*80)),10
getpower = 60,20
givepower = 40,15
animtype = up
guardflag = 
hitflag = AF
getpower = 50
priority = 7, miss
pausetime = 15, 18
ground.type = High
ground.slidetime = 20
ground.hittime  = 21
ground.velocity = -5,-6.2
air.type = High
air.velocity = -3,-15;-4.7,-8.4
air.hittime = 12
yaccel = .42
fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
hitsound = 0,19
guardsound = 0,18
sparkno = -1 + 0*(var(33):=8012)
guard.sparkno = -1 + 0*(var(34):=8000)
sparkxy = -10 + 0*(var(35):=64), var(36):=-80
palfx.time = 12*var(9)
palfx.add = 255,255,255
palfx.sinadd= -255,-255,-255,48
kill = 1

[State 0, TargetState]
type = TargetState
triggerall = movehit
triggerall = !ishelper
trigger1 = animelem = 2 
value = 2112

[State 0, TargetState]
type = TargetState
triggerall = movehit
triggerall = !ishelper
trigger1 = animelem = 4
value = 2113

[State 0, TargetState]
type = TargetState
triggerall = movehit
triggerall = !ishelper
trigger1 = animelem = 6
value = 2114

[State 0, TargetState]
type = TargetState
triggerall = movehit
triggerall = !ishelper
trigger1 = animelem = 8
value = 2115

[State 0, TargetBind]
type = TargetBind
triggerall = movehit
triggerall = !ishelper
trigger1 = animelem = 2
time =2
id = -1
pos = 83,-24

[State 0, TargetBind]
type = TargetBind
triggerall = movehit
triggerall = !ishelper
trigger1 = animelem = 3
time = 2
id = -1
pos = 83,-24

[State 0, TargetBind]
type = TargetBind
triggerall = movehit
triggerall = !ishelper
trigger1 = animelem = 4
time = 2
id = -1
pos = 48,-187

[State 0, TargetBind]
type = TargetBind
triggerall = movehit
triggerall = !ishelper
trigger1 = animelem = 5
time = 2
id = -1
pos = -2,-189

[State 0, TargetBind]
type = TargetBind
triggerall = movehit
triggerall = !ishelper
trigger1 = animelem = 6
time = 2
id = -1
pos = -80,-150


[State 0, TargetBind]
type = TargetBind
triggerall = movehit
triggerall = !ishelper
trigger1 = animelem = 7
time = 2
id = -1
pos = -95,-95


[State 0, TargetBind]
type = TargetBind
triggerall = movehit
triggerall = !ishelper
trigger1 = animelem = 8
time = 2
id = -1
pos = 0,0


[State 0, ChangeState]
type = ChangeState
triggerall = numtarget
triggerall = target,stateno= [2112,2115]
trigger1 = animelem >= 8
trigger2 = Vel Y > 0 && Pos Y >= 0
value = 2101
ctrl = 0


[State 1000, ƒXƒe[ƒg•ÏX]
type = ChangeState
triggerall = AnimElemtime(10) >= 0
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 1202

;-------------------------------------------------------------------------------------------------------------------------------------------------------------------
; Luxurious Kick going down with target
[Statedef 2101]
type     = u
movetype = A
physics  = u
velset   = 0,0
anim     = 2105
ctrl     = 0
sprpriority = 2


[State 170, –³“G]
type = NotHitBy
trigger1 = 1
value = SCA

[State 1000, ]
type = Veladd
trigger1 = 1
y = .54


[State 0, TargetState]
type = TargetState
triggerall = !ishelper
trigger1 = 1
value = 2115


[State 0, TargetBind]
type = TargetBind
triggerall = !ishelper
trigger1 = 1
time = 2
pos = 0,0
ignorehitpause = 1

[State 1000, ƒXƒe[ƒg•ÏX]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= 0
trigger2 = Pos Y >= -50
value = 2106
ignorehitpause = 1


;----------------------------------------------------------------------------------------------------------------------------

; Lux landed
[statedef 2106]
type    = u
movetype= A
physics = n
velset = 0,0
ctrl = 0

[state 200, 1]
type = posset
trigger1 = 1
y = 0

[State 0, TargetBind]
type = TargetBind
triggerall = !ishelper
trigger1 = time= 0
time = 1
pos = 0,0
ignorehitpause = 1


[State 0, TargetState]
type = TargetState
triggerall = !ishelper
trigger1 = time = 0
value = 2116
ignorehitpause = 1

[State 0, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = time = 0
value = -ceil(ifelse(fvar(11)*100<30, 30, fvar(11)*100))
kill = 1
ignorehitpause = 1

[State 0, PowerAdd]
type = PowerAdd
trigger1 = time = 0
value = 100

[State 0, heavy Ground Impact Dust]
type = null;Helper
trigger1= animelem =1
stateNo = 8112
ID = 8112
name = "Heavy Ground Impact Dust"
posType = P1
facing = -1
pos = 0,20
ownPal = 0
ignorehitpause=1
persistent = 0
scale = 1,1

[state 52, 1]
type = changeanim
trigger1 = time = 0
value = 2106

[state 52, playsnd]
type = null;playsnd
trigger1 = animelem = 1
value = s1,5
channel = 3

[State 0, EnvShake]
type = EnvShake
trigger1 = time = 0
time = 5
freq = 60
ampl = -8
 

[state 52, Dust]
type = explod
trigger1 = time = 2
anim = 6007
id = 6007
postype = p1
pos = 0,0
ownpal = 1
bindtime = 1
sprpriority = -2
persistent = 0
removeongethit = 0

[State 0, Hitspark Explod]
type = Explod
trigger1 = animelem= 1
anim = (var(33):=8011)
pos = 0,-10
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 5
vel = 0,0
accel = 0,0
random = 0,0
removetime = 5
pausemovetime = 0
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0


[state 52, 5]
type = changestate
trigger1 = animtime = 0
value = 2107
ctrl = 0
ignorehitpause =0

;jump back 
[Statedef 2107]
type = S
physics = N
movetype = I
anim = 53
ctrl = 0
velset = 0, 0
sprpriority = 1

[State 715, Push]
type = playerpush
trigger1 = 1
value = 0
ignoreHitPause = 1


[State 715, HB]
type = hitby
trigger1 = 1
value = SCA
time = 1

[State 715, Snd]
type = playsnd
trigger1 = !time
value = 4,0
channel = 0

[State 715, Snd]
type = playsnd
trigger1 = !time
value = 110,0
channel = 1

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem <= 2
statetype = A       ;S,A,C,L
movetype = I        ;I,A,H
physics = a         ;A,C,S,N

[State 0, Gravity]
type = Gravity
trigger1 =  animelemtime(2) < 15


[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 3
statetype = s       ;S,A,C,L
movetype = I        ;I,A,H
physics = s         ;A,C,S,N


[State 810, Velocity]
type = VelSet
trigger1 = AnimElem = 1
x = -11.25
y= -8.0


[State 0, PosSet]
type = PosSet
trigger1 = AnimElem = 3
trigger1 = time >=10
y = 0

[State 715, End]
type = changestate
trigger1 = Vel Y > 0 && Pos Y >= 0
trigger1 = time >=5
value = 0
ctrl = 1

[Statedef 2112, lux Target 1]
type = A
movetype = H
physics = N
velset = 0,0
ctrl = 0
sprpriority = -1

[State 820, 2]
type = null;SelfState
trigger1 = !gethitvar(isbound) 
value = 5050

[State 0, StopSnd]
type = StopSnd
trigger1 = 1
channel = 0
ignorehitpause =1 


[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0 
value = 2112

[Statedef 2113, lux Target 2]
type = A
movetype = H
physics = N
velset = 0,0
ctrl = 0
sprpriority = -1

[State 820, 2]
type =null; SelfState
trigger1 =!gethitvar(isbound) 
value = 5050
[State 0, StopSnd]
type = StopSnd
trigger1 = 1
channel = 0
 ignorehitpause =1

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0 
value = 2113

[Statedef 2114, lux Target 3]
type = A
movetype = H
physics = N
velset = 0,0
ctrl = 0
sprpriority = -1

[State 820, 2]
type = null;SelfState
trigger1 = !gethitvar(isbound) 
value = 5050

[State 0, StopSnd]
type = StopSnd
trigger1 = 1
channel = 0
ignorehitpause =1 

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0 
value = 2114

[Statedef 2115, lux Target 4]
type = A
movetype = H
physics = N
velset = 0,0
ctrl = 0
sprpriority = -1

[State 820, 2]
type = SelfState
trigger1 = !gethitvar(isbound) 
value = 5050

[State 0, StopSnd]
type = StopSnd
trigger1 = 1
channel = 0
ignorehitpause =1

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0 
value = 2115
ignorehitpause =1

[Statedef 2116, lux Target 5]
type = A
movetype = H
physics = N
velset = 0,0
ctrl = 0
sprpriority = -1

[State 820, 2]
type = SelfState
trigger1 = time >= 15
value = 5050


[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0 
value = 2116


;----------------------------------------------------------------------------------------------------------------------------------------------------------
;PUNCH ZERO COUNTER 
[STATEDEF 2900]
type = S
physics = N
movetype = A
ctrl = 0
velset = 0, 0
sprpriority = 1
faceP2 = 1
poweradd = -1000

[State 220, Anim]
type=changeanim
trigger1=!time
value=2900

[State 220,Posset]
type=posset
trigger1=!time
y=0

[State 0, Helper]
type = Helper
trigger1 = animelemtime(1)=0
trigger1 = numhelper(37499) = 0
helpertype = normal ;player
name = "tornado guard"
ID = 37499
stateno =37499 
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 9999
pausemovetime = 9999




[State 810, Velocity]
type = VelSet
trigger1 = command = "holdfwd" 
x = const(velocity.walk.fwd.x)

[State 810, Velocity]
type = VelSet
trigger1 = command = "holdback" 
x = const(velocity.walk.back.x)


[State 440, Hit]
type=hitdef
;trigger1= !var(16) && var(15)<1
trigger1= !time && !numexplod(14801)
ID = 480
attr = C,NA
hitflag = MAF
guardflag = M
damage = ceil(ifelse(fvar(11)*40<20, 20, fvar(11)*40)), 0
getpower = ifelse(var(9), 80, 30)*!var(20), 36*!var(20)
givepower = 30, 30
pausetime = 8,8
guard.pausetime = 8,4
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = Trip
air.type = Trip
ground.hittime = 18 + 4*var(9)
ground.slidetime = 18 + 4*var(9)
guard.hittime = 4
air.hittime = 120
ground.velocity = -.5, -15
ground.cornerPush.velOff = 0
guard.velocity = -5.25
guard.cornerPush.velOff = 0
air.velocity = -.5, -15
air.cornerPush.velOff = 0
yAccel = 0.338
fall = 1
fall.recover = 1
fall.recoverTime = 120
hitsound = s0,7
guardsound = s0,10
sparkno = -1 + 0*(var(33):=8012)
guard.sparkno = -1 + 0*(var(34):=8000)
sparkxy = -10 + 0*(var(35):=120), var(36):=-50
palfx.time = 12*var(9)
palfx.add = 255,255,255
palfx.sinadd= -255,-255,-255,48


[State 0, VarAdd]
type = VarAdd
trigger1 = movehit = 1
v =    44
value = 1

[STATE 2900,WIDTH]
type = Width
trigger1 = 1
edge = 30,0


[STATE 2900,NOT HIT BY]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1



[State 220, 5]
type = ChangeState
trigger1 = time >= 25;!AnimTime
value = 0
ctrl = 1


;----------------------------------------------------------------------------------------------------------------------------------------------------------
;PUNCH ZERO COUNTER 
[STATEDEF 2901]
type = S
physics = N
movetype = A
ctrl = 0
velset = 0, 0
sprpriority = 1
poweradd = 0
faceP2 = 1


[State 0, Helper]
type = Helper
trigger1 = time = 1
trigger1 = numhelper(37499) = 0
helpertype = normal ;player
name = "tornado guard"
ID = 37499
stateno =37499 
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 9999
pausemovetime = 9999



[State 220, Anim]
type=changeanim
trigger1=!time
value=2901

[State 220,Posset]
type=posset
trigger1=!time
y=0


[State 810, Velocity]
type = VelSet
trigger1 = command = "holdfwd" 
x = const(velocity.walk.fwd.x)

[State 810, Velocity]
type = VelSet
trigger1 = command = "holdback" 
x = const(velocity.walk.back.x)


[State 440, Hit]
type=hitdef
;trigger1= !var(16) && var(15)<1
trigger1= !time && !numexplod(14801)
ID = 480
attr = C,NA
hitflag = MAF
guardflag = M
damage = ceil(ifelse(fvar(11)*40<20, 20, fvar(11)*40)), 0
getpower = ifelse(var(9), 80, 30)*!var(20), 36*!var(20)
givepower = 30, 30
pausetime = 8,8
guard.pausetime = 8,4
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = Trip
air.type = Trip
ground.hittime = 18 + 4*var(9)
ground.slidetime = 18 + 4*var(9)
guard.hittime = 4
air.hittime = 120
ground.velocity = -.5, -15
ground.cornerPush.velOff = 0
guard.velocity = -5.25
guard.cornerPush.velOff = 0
air.velocity = -.5, -15
air.cornerPush.velOff = 0
yAccel = 0.338
fall = 1
fall.recover = 1
fall.recoverTime = 120
hitsound = s0,7
guardsound = s0,10
sparkno = -1 + 0*(var(33):=8012)
guard.sparkno = -1 + 0*(var(34):=8000)
sparkxy = -10 + 0*(var(35):=120), var(36):=-50
palfx.time = 12*var(9)
palfx.add = 255,255,255
palfx.sinadd= -255,-255,-255,48


[State 0, VarAdd]
type = VarAdd
trigger1 = movehit = 1
v =    44
value = 1

[STATE 2900,WIDTH]
type = Width
trigger1 = 1
edge = 30,0


[STATE 2900,NOT HIT BY]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1


[State 220, 5]
type = ChangeState
trigger1 = time >= 16;!AnimTime
value = 0
ctrl = 1







 



;PUNCH ZERO COUNTER with Card Barrier (cancelled)
[STATEDEF 2905]
type = S
physics = N
movetype = A
ctrl = 0
velset = 0, 0
sprpriority = 1
poweradd = 0
faceP2 = 1

[STATE 2900,POSSET]
type=posset
trigger1=!time
y=0

[STATE 2900,ANIM]
type=changeanim
trigger1=!time
value=2905


[State 0, Helper]
type = Helper
trigger1 = Animelem = 3
name = "Card Blades"
ID = 7400
stateno = 7400
pos =-10,-50 ;100,-150
postype = p2    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale =1.0 
size.yscale = 1.0
ignorehitpause = 1
;persistent = 



[STATE 2900,NOT HIT BY]
type = NotHitBy
trigger1 = Anim = 2905
;trigger1 = AnimElemNo(0) = [1,4]
value = SCA
time = 1



[STATE 2900,IDLE]
type = StateTypeSet
trigger1 = AnimElemTime(4) >= 0
moveType = I

[STATE 2900,CHANGE STATE]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
 








;---------------------------------------------------------------------------
;Hit by SolarBlast! (the go flying away part) 
[Statedef 2961]
type    = A
movetype= H
physics = N
velset = 0,0

[State 3006, flying velocity]
type = VelSet
trigger1 = Time = 0
x = -10
y = -3

[State 3006, animation pull]
type = ChangeAnim
trigger1 = SelfAnimExist(5035)
trigger1 = Anim = 5030 && AnimTime = 0
value = 5035

[State 3006, animation pull]
type = ChangeAnim
trigger1 = SelfAnimExist(5050)
trigger1 = Anim = 5035 && AnimTime = 0
value = 5050

[State 3006, flying velocity]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 3006, push]
type = PlayerPush
trigger1 = 1
value = 0

[State 3006, release]
type = SelfState
trigger1 = (Vel y > 0) && (Pos y >= 25)
value = 5100


;special hurt sate for CK 253
[Statedef 4120]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = 1
facep2 = 1

[state -2]
type = ChangeAnim2
Trigger1 = Time=0
value = 4120

[state -2]
type = ChangeAnim2
Trigger1 = !HitShakeOver
Trigger1 = Time > 0
value = 4120

[state -2]
type = HitVelSet
TriggerAll = HitShakeOver
Trigger1   = Vel Y = 0
Trigger1   = AnimElem = 1,=1
Trigger2   = Time = 0
x = 1
y = 1

[state -2]
type = VelAdd
TriggerAll = HitShakeOver
Trigger1   = Vel Y != 0
Trigger2   = Time >= 120
Trigger2   = Vel Y = 0
y = GetHitVar(yaccel)

[state -2]
type = ChangeAnim2
Trigger1 = Vel Y > 0
Trigger1 = Pos Y < 0
Trigger1 = Anim=4120
value = 4130

[state -2]
type = ScreenBound
Trigger1 = 1
value = 1
movecamera = 1,0

[state -2]
Type = DefenceMulSet
Trigger1 = 1
value = 1

[State AngleDraw]
type = AngleDraw
trigger1 = HitShakeOver
scale = 1,1
value = 15 * time

[state -2] 
type = changestate
Trigger1 = Vel Y > 0 && Pos Y >= 0
value = 5100

 ;Hurt by empowered kick 1
[Statedef 1665]
type = A
movetype= H
physics = N
velset = 0,0
ctrl = 0

[State 0, HitFallSet]
type = HitFallSet
trigger1 = 1
value = 1
ignorehitpause = 1

[State 0, HitBy]
type = HitBy
trigger1 = 1
value = SCA,AA,AT,AP
ignorehitpause = 1

[State 0, HitBy]
type = HitBy
trigger1 = 1
value2 = SCA,AA,AT,AP
ignorehitpause = 1

[State 9000, 1]
type = turn
trigger1 = frontedgedist <= 0

[State 9000, 1]
type = ScreenBound
trigger1 = 1
movecamera = 1,0

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

[State 0, PosAdd]
type = PosAdd
trigger1 = time = 0
y = -20

[State 1021,0]
type = velset
trigger1 = HitShakeOver
x = -13
y = -.333

[State 840, 2]
type = afterimage
trigger1 = time = 5
time = 13
length = 3
PalBright   =   0,  0,  0
PalContrast = 255,255,255
PalAdd      =   0,  0,  0
PalMul      =  1,1,1
FrameGap = 2
ignorehitpause = 1

[State 821, 4]
type = changeanim2
trigger1 = !time
value = 4120

[State 0, AngleDraw]
type = AngleDraw
trigger1 = HitShakeOver
value = 20*time

[State 1026, Hit wall]
type = ChangeState
trigger1 = BackEdgeBodyDist <= 5
trigger2 = time >= 300
value = 1666
;-------------------------------------------------------------------------------
;Hurt by empowered kick 2
[Statedef 1666]
type = A
movetype= H
physics = N
velset = 0,0
ctrl = 0

[State 0, LifeAdd]
type = LifeAdd
trigger1 = time = 0
trigger1 = PrevStateNo = 2110
value = -50
kill = 1
absolute = 0
persistent = 0

[State 0, PalFX]
type = PalFX
trigger1 = time = 0
trigger1 = PrevStateNo = 2110
time = 50
add = 80,80,80
sinadd = 100,100,100,10
invertall = 1
color = 128
persistent = 0

[State 0, AngleDraw]
type = AngleDraw
trigger1 = time = 0
value = 1

[State 0, HitFallSet]
type = HitFallSet
trigger1 = 1
value = 1
ignorehitpause = 1

[State 0, HitBy]
type = HitBy
trigger1 = 1
value = SCA,AA,AT,AP
ignorehitpause = 1

[State 0, HitBy]
type = HitBy
trigger1 = 1
value2 = SCA,AA,AT,AP
ignorehitpause = 1

[State 1000, Pause]
type = Pause
trigger1 = time = [0,13]
time = 2

[State 1000, EnvColor]
type = EnvColor
trigger1 = time = 0
value = 128, 128, 128
time = 1
under = 1

[State 1000, EnvShake]
type = EnvShake
trigger1 = time = 0
time = 50
freq = 100
ampl = -10

[State 1000, ScreenBound]
type = ScreenBound
trigger1 = 1
movecamera = 1,0

[State 1000, Turn]
type = turn
trigger1 = time = 0

[State 1000, VelSet]
type = VelSet
trigger1 = time > 5&& time < 10
x = -5.2
y = -10.2

[State 1027, PlaySound]
type = PlaySnd
trigger1 = Time = 5
value = F5,5

[State 1027, PlaySound]
type = PlaySnd
trigger1 = Time = 0
value = F7,2

[State 821, 4]
type = changeanim
trigger1 = time = 0
trigger1 = selfAnimExist(5052)
value = 5052

[State 821, 4]
type = changeanim
trigger1 = time = 15
trigger1 = selfAnimExist(5062)
value = 5062

[State 821, 1]
type = VelAdd
Trigger1 = time > 8
y = .55
x = .05

[State 821, 4]
type = changeState
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 5101;5100










