;================================================================================
;Gadou Shokouken
;================================================================================
[Statedef 3000]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
poweradd=  ifelse(var(51),0,-1000)     
ctrl = 0
anim = 3000
sprpriority = 2
;=======================================;Superpause and Effects
[State 300, End MAXMODE]
type = VarSet
trigger1 = !time
var(51) = 0
ignorehitpause = 1

[State 2000, VarSet]
type = VarSet
trigger1 = time = 0 ;Superpause tick error fix.
var(6) = 30

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 0
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 220,0,10;255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 1
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State 1000: Helper]
type = Helper
triggerall = var(31) = 0
trigger1 = !numhelper(40000)
trigger1 = prevstateno = [1000,1500]
helpertype = Normal
name = "SuperCancel"
id = 40000
pos = 0, 0 ;50
postype = left
facing = 1
stateno = 40000
keyctrl = 0
ownpal = 1
ontop = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
ignorehitpause = 1
persistent = 0

[State 2010, AssertSpecial]
type = AssertSpecial
trigger1 = time = [1,30]
flag = noBG
flag2 = noFG

[State 13000, EnvColor]
type = EnvColor
trigger1 = time = 1
value = 255,255,255
time = 4
under = 1
ignorehitpause = 1
persistent = 0

[State 2010, Pause]
Type = SuperPause
Trigger1 = time = 1
Time = 28
movetime = 28
anim = -1
sound = s3+(var(32)*2),10
Pos = 14, -88
Darken = 0
UnHittAble = 1
p2defmul = 1

[State 6001, pause]
type = Explod
trigger1 = time = 1
anim = 15200-(var(31)*200)
pos = 0,-85
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = -2
ownpal = 1
[State 6001, pause]
type = Explod
trigger1 = time = 1
anim = 15201-(var(31)*200)
pos = 0,-85
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = 4
ownpal = 1

[State 2000, 0]
type = NotHitBy
trigger1 = 1
value = SCA
;=======================================;Variables
[State 1000, VarSet]
type = VarSet
trigger1 = !time
var(5) = ifelse((helper(10371), var(0) = [1,3]),0,1) 
[State 1000, VarSet]
type = VarSet
trigger1 = !time
var(22) = 0
;=======================================;Effects
[State 200, snd]
type=playsnd
trigger1= animelem=1 
value=200,33
channel=0 
;=======================================;Go to Charge or Fire
[State 1001, end]
type = ChangeState
trigger1 = !var(5) && command = "hold_x"  
trigger2 = var(5) && command = "hold_y"
triggerall = AnimTime = 0
value = 3001
[State 1001, end]
type = ChangeState
triggerall = command != "hold_x" || command != "hold_y"
trigger1 = AnimTime = 0
value = 3002
;================================================================================
;Gadou Shokouken Charge
;================================================================================
[StateDef 3001]
type = S
MoveType = A
VelSet = 0, 0
Anim = 3001
SprPriority = 2 
ctrl=0
;=======================================;Variables
[State 1000, VarSet]
type = VarSet
trigger1 = time = 15
var(22) = 1
[State 1000, VarSet]
type = VarSet
trigger1 = time = 61
var(22) = 2
;=======================================;FIRE
[State 1001, end]
type = ChangeState
trigger1 = !var(5) && command != "hold_x"
trigger2 = var(5) && command != "hold_y"
trigger3 = animtime = 0
value = 3002
;================================================================================
;Gadou Shokouken Fire
;================================================================================
[StateDef 3002]
type = s
MoveType = A
VelSet = 0, 0
Anim = 3002
SprPriority = 2 
ctrl=0
;=======================================;Variables
[State 1000, VarSet]
type = VarSet
trigger1 = !time
var(15) = ifelse(var(22)=0,3,2)
;=======================================;Effects
[State 1050, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1 
value = 200,34
channel = 0
[State 3303, Explod]
type = Explod
trigger1 = animelem = 2
anim = 12004+ifelse(var(22)=2,2,0) 
pos = -24,0
postype = p1  ;p2,front,back,left,right
sprpriority = 3
ownpal = 1
ignorehitpause = 1
[State 1050, PlaySnd]
type = PlaySnd
trigger1 = animelemtime(2) = 1
value = 1000,13
;=======================================;Helpers
[State 1000: Helper]
type = Helper
trigger1 = animelemtime(2) = 1
helpertype = Normal
name = "Gadou Shokouken"
id = 3005
pos = 48, -80 ;50
postype = p1
facing = 1
stateno = 3005+var(22) 
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
;=======================================;End
[State 1001, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;================================================================================
;Level 1 Gadou Shokouken
;================================================================================
[Statedef 3005]
type = A
movetype = A
physics = N
ctrl = 0
ownpal = 1
sprpriority = 4
;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time 
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = 3015
;=======================================;
;=======================================;Movement
[State 1050, VelSet]
type = VarSet
trigger1 = !time && !prevstateno
var(15) = root,var(15)
[State 1050, VelSet]
type = VelSet
trigger1 = time = 1
x = var(15)
;=======================================;Animations
[State 1000, Anim]
Type = ChangeAnim
Trigger1 = !Time && !prevstateno 
Value = 3005
ignorehitpause = 1
;=======================================;Projectile Properties
[State -2, Damage Dampener]; Scaling in action
type= attackmulset
trigger1= 1
value= ifelse(root,var(51),0.63,1)
ignorehitpause= 1

[State 1000, projs only]
type = HitBy
trigger1 = 1
value = SCA, NP, SP, HP
ignorehitpause = 1
[State 10012, override]
type = HitOverride
trigger1 = !time
attr = SCA, AA, AP, AT
stateno = 3005
time = -1
ignorehitpause = 1
slot = 2 ;Apparently omitting this makes the whole thing just....not work.....

[State -2, Juggle Killer]
type = ParentVarSet
trigger1 = movehit && P2Statetype = A
trigger1 = var(18) > 1
var(16) = 60
ignorehitpause = 1
persistent = 0
[State -2, Juggle Killer]
type = ParentVarSet
trigger1 = movehit && P2Statetype = A
trigger1 = var(18) = 1
var(16) = ifelse(root,var(51),60,0)
ignorehitpause = 1
persistent = 0
[State -2, Air Limiter]
type = ParentvarSet
trigger1 = MoveContact && NumTarget
var(40) = 1
ignorehitpause = 1
persistent = 0
[State -2, FlagHitToParent]
type = ParentVarSet
trigger1 = MoveHit && NumTarget
var(58) = 20
ignorehitpause = 1
persistent = 0
[State -2, VarSet]
type = ParentVarSet
trigger1 = MoveContact && NumTarget
var(9) = 1
persistent = 0
ignorehitpause=1

[State -2, VarSet];Counter Hit Reset
type = ParentVarSet
trigger1 = root,var(57) >= 22 
var(57) = 0
ignorehitpause = 1

[State -2, DTC]
type = DisplayToClipboard
trigger1 = 1
text = "Hits = %d"
params = Var(18)
;=====================;Multihit Projectile Properties
[State 1015, VarSet]
type = VarSet
trigger1 = !time && !prevstateno
var(18) = 1
[State 1015, VarSet]
type = VarAdd
trigger1 = !time && prevstateno
var(18) = -1
ignorehitpause = 1
persistent = 0

[State 1005, End]
type=changeState
trigger1 = movecontact 
trigger2 = var(18) <= 0
value= ifelse(var(18)=0,3008,stateno)
;=====================;Timer Projectile Properties
[State -2, juggle decreasing]
type = varSet
trigger1 = !time && !prevstateno
var(19) = 20
ignorehitpause = 0

[State -2, juggle decreasing]
type = varSet
trigger1 = var(19)>0
var(19) = var(19)-1
ignorehitpause = 0
;=======================================;Effects
[State 1000, Sound]
type = PlaySnd
trigger1 = MoveContact && NumTarget
value = 3+(root,var(32)*2),ifelse(MoveHit,9,13)
persistent = 0
ignorehitpause = 1

[State 3000, ContactSpark]
type = Explod
trigger1 = MoveContact && NumTarget
anim = (ifelse(MoveHit,(17002+(root,var(31)*10001)),(17502+(root,var(31)*10000))))
ID = 1000
pos = 22 ,0
postype = p1
facing = 1
bindtime = 1
removetime = -2
sprpriority = 8
shadow = 0,0,0
ownpal = 1
persistent = 0
ignorehitpause = 1

[State 13000, EnvColor]
type = EnvColor
trigger1 = numtarget(3000) && movehit
value = 255,255,255
time = 1
under = 1
ignorehitpause = 1
persistent = 0

[State -2, Helper]
type = Helper
trigger1 = !numhelper(50000) && !numhelper(50001)
trigger1 = WinKO
helpertype = normal
name = "K.O."
ID = 50001
stateno = 50000
pos = 160,120
postype = left    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

[State 1050, Trans]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 166,94
ignorehitpause = 1
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999999
length = 12
palbright = 12,12,12;,136
palcontrast = 120,120,120;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
;=======================================;Hitdefs
[State 210, 1]
type = HitDef
triggerall = var(18) = 1
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,3])
attr = S, HP
damage = floor(208*ifelse(root,var(56),1.25,1)),8 ;225
animtype = U
air.animtype = U
ground.type = Low
guardflag = M
hitflag = MAF
priority = 5, Hit
sparkno = -1
sparkxy = 0, -80
hitsound = -1
guardsound = -1
guard.sparkno = -1
pausetime = 1,15
guard.pausetime = 1,15
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
persistent = 0
fall = 1
fall.recover = 1
fall.recovertime = 120
hitonce = 1
id = 3000
p1sprpriority = 4
p2stateno = 10400
;=======================================;End
[State 1000, DestroySelf]
type = DestroySelf
triggerall = time > 1
trigger1 = FrontEdgeDist <= -40
[State 1005, End]
type=changeState
trigger1= movecontact
trigger2=var(19) = 0
value=3008
persistent = 0
;=======================================;Recovery for target
[State -2, P2 Safe Fall]
type = TargetState
trigger1 = NumTarget = 1
trigger1 = Target, command = "recovery"
trigger1 = Target, pos y >= -30 && Target, vel y > 0
trigger1 = Target, Alive && Target, HitFall && Target, GetHitVar(fall.recover)
trigger1 = Target, StateNo = 5030 || Target, StateNo = 5035 || Target, StateNo = 5050 || Target, StateNo = 5071
value = 5205
ignoreHitPause = 1
;================================================================================
;Level 2 Gadou Shokouken
;================================================================================
[Statedef 3006]
type = A
movetype = A
physics = N
ctrl = 0
ownpal = 1
sprpriority = 4
;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time 
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = 3016
;=======================================;
;=======================================;Movement
[State 1050, VelSet]
type = VarSet
trigger1 = !time && !prevstateno
var(15) = root,var(15)
[State 1050, VelSet]
type = VelSet
trigger1 = time = 1
x = var(15)
;=======================================;Animations
[State 1000, Anim]
Type = ChangeAnim
Trigger1 = !Time && !prevstateno 
Value = 3005
ignorehitpause = 1
;=======================================;Projectile Properties
[State -2, Damage Dampener]; Scaling in action
type= attackmulset
trigger1= 1
value= ifelse(root,var(51),0.63,1)
ignorehitpause= 1

[State 1000, projs only]
type = HitBy
trigger1 = 1
value = SCA, NP, SP, HP
ignorehitpause = 1
[State 10012, override]
type = HitOverride
trigger1 = !time
attr = SCA, AA, AP, AT
stateno = 3005
time = -1
ignorehitpause = 1
slot = 2

[State -2, Juggle Killer]
type = ParentVarSet
trigger1 = movehit && P2Statetype = A
trigger1 = var(18) > 1
var(16) = 60
ignorehitpause = 1
persistent = 0
[State -2, Juggle Killer]
type = ParentVarSet
trigger1 = movehit && P2Statetype = A
trigger1 = var(18) = 1
var(16) = ifelse(root,var(51),60,20)
ignorehitpause = 1
persistent = 0
[State -2, Air Limiter]
type = ParentvarSet
trigger1 = MoveContact && NumTarget
var(40) = 1
ignorehitpause = 1
persistent = 0
[State -2, FlagHitToParent]
type = ParentVarSet
trigger1 = MoveHit && NumTarget
var(58) = 20
ignorehitpause = 1
persistent = 0
[State -2, VarSet]
type = ParentVarSet
trigger1 = MoveContact && NumTarget
var(9) = 1
persistent = 0
ignorehitpause=1

[State -2, VarSet];Counter Hit Reset
type = ParentVarSet
trigger1 = root,var(57) >= 22 
var(57) = 0
ignorehitpause = 1

[State -2, DTC]
type = DisplayToClipboard
trigger1 = 1
text = "Hits = %d"
params = Var(18)

;=====================;Multihit Projectile Properties
[State 1015, VarSet]
type = VarSet
trigger1 = !time && !prevstateno
var(18) = 3
[State 1015, VarSet]
type = VarAdd
trigger1 = !time && prevstateno
var(18) = -1
ignorehitpause = 1
persistent = 0

[State 1005, End]
type=changeState
trigger1 = movecontact 
trigger2 = var(18) <= 0
value= ifelse(var(18)=0,stateno+2,stateno)
;=====================;Timer Projectile Properties
[State -2, juggle decreasing]
type = varSet
trigger1 = !time && !prevstateno
var(19) = 60
ignorehitpause = 0

[State -2, juggle decreasing]
type = varSet
trigger1 = var(19)>0
var(19) = var(19)-1
ignorehitpause = 0
;=======================================;Effects
[State 1000, Sound]
type = PlaySnd
trigger1 = MoveContact && NumTarget
value = 3+(root,var(32)*2),ifelse(MoveHit,9,13)
persistent = 0
ignorehitpause = 1
channel = 4

[State 3000, ContactSpark]
type = Explod
trigger1 = MoveContact && NumTarget
anim = (ifelse(MoveHit,(17002+(root,var(31)*10001)),(17502+(root,var(31)*10000))))
ID = 1000
pos = 22 ,0
postype = p1
facing = 1
bindtime = 1
removetime = -2
sprpriority = 8
shadow = 0,0,0
ownpal = 1
persistent = 0
ignorehitpause = 1

[State 13000, EnvColor]
type = EnvColor
trigger1 = numtarget(3000) && movehit
value = 255,255,255
time = 1
under = 1
ignorehitpause = 1
persistent = 0

[State -2, Helper]
type = Helper
trigger1 = !numhelper(50000) && !numhelper(50001)
trigger1 = WinKO
helpertype = normal
name = "K.O."
ID = 50001
stateno = 50000
pos = 160,120
postype = left    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

[State 1005, PROJECTILE ACTIVE]
type = VarSet
trigger1 = !time 
var(20) = 1
[State 1050, Trans]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 166,94
ignorehitpause = 1
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999999
length = 12
palbright = 12,12,12;,136
palcontrast = 120,120,120;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
;=======================================;Hitdefs
[State 210, 1]
type = HitDef
triggerall = var(18) = 3
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,3])
attr = S, HP
damage = floor(116*ifelse(root,var(56),1.25,1)),8 ;225
animtype = U
air.animtype = U
ground.type = Low
guardflag = M
hitflag = MAF
priority = 5, Hit
sparkno = -1
sparkxy = 0, -80
hitsound = -1
guardsound = -1
guard.sparkno = -1
pausetime = 2,15
guard.pausetime = 2,15
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
persistent = 0
fall = 1
fall.recover = 1
fall.recovertime = 120
hitonce = 1
id = 3000
p1sprpriority = 4
p2stateno = 10400
[State 210, 1]
type = HitDef
triggerall = var(18) = 2
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,3])
attr = S, HP
damage = floor(66*ifelse(root,var(56),1.25,1)),8 ;225
animtype = U
air.animtype = U
ground.type = Low
guardflag = M
hitflag = MAF
priority = 5, Hit
sparkno = -1
sparkxy = 0, -80
hitsound = -1
guardsound = -1
guard.sparkno = -1
pausetime = 2,15
guard.pausetime = 2,15
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
persistent = 0
fall = 1
fall.recover = 1
fall.recovertime = 120
hitonce = 1
id = 3000
p1sprpriority = 4
p2stateno = 10400
[State 210, 1]
type = HitDef
triggerall = var(18) = 1
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,3])
attr = S, HP
damage = floor(58*ifelse(root,var(56),1.25,1)),8 ;225
animtype = U
air.animtype = U
ground.type = Low
guardflag = M
hitflag = MAF
priority = 5, Hit
sparkno = -1
sparkxy = 0, -80
hitsound = -1
guardsound = -1
guard.sparkno = -1
pausetime = 1,15
guard.pausetime = 1,15
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
persistent = 0
fall = 1
fall.recover = 1
fall.recovertime = 120
hitonce = 1
id = 3000
p1sprpriority = 4
p2stateno = 10400
;=======================================;End
[State 1000, DestroySelf]
type = DestroySelf
triggerall = time > 1
trigger1 = FrontEdgeDist <= -40
[State 1005, End]
type=changeState
trigger1= movecontact
trigger2=var(19) = 0
value=3008
persistent = 0
;=======================================;Recovery for target
[State -2, P2 Safe Fall]
type = TargetState
trigger1 = NumTarget = 1
trigger1 = Target, command = "recovery"
trigger1 = Target, pos y >= -30 && Target, vel y > 0
trigger1 = Target, Alive && Target, HitFall && Target, GetHitVar(fall.recover)
trigger1 = Target, StateNo = 5030 || Target, StateNo = 5035 || Target, StateNo = 5050 || Target, StateNo = 5071
value = 5205
ignoreHitPause = 1
;================================================================================
;Level 3 Gadou Shokouken
;================================================================================
[Statedef 3007]
type = A
movetype = A
physics = N
ctrl = 0
ownpal = 1
sprpriority = 4
;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time 
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = 3017
;=======================================;
;=======================================;Movement
[State 1050, VelSet]
type = VarSet
trigger1 = !time && !prevstateno
var(15) = root,var(15)
[State 1050, VelSet]
type = VelSet
trigger1 = time = 1
x = var(15)
;=======================================;Animations
[State 1000, Anim]
Type = ChangeAnim
Trigger1 = !Time && !prevstateno 
Value = 3005
ignorehitpause = 1
;=======================================;Projectile Properties
[State -2, Damage Dampener]; Scaling in action
type= attackmulset
trigger1= 1
value= ifelse(root,var(51),0.63,1)
ignorehitpause= 1

[State 1000, projs only]
type = HitBy
trigger1 = 1
value = SCA, NP, SP, HP
ignorehitpause = 1
[State 10012, override]
type = HitOverride
trigger1 = !time
attr = SCA, AA, AP, AT
stateno = 3005
time = -1
ignorehitpause = 1
slot = 2

[State -2, Juggle Killer]
type = ParentVarSet
trigger1 = movehit && P2Statetype = A
trigger1 = var(18) > 1
var(16) = 60
ignorehitpause = 1
persistent = 0
[State -2, Juggle Killer]
type = ParentVarSet
trigger1 = movehit && P2Statetype = A
trigger1 = var(18) = 1
var(16) = ifelse(root,var(51),60,600)
ignorehitpause = 1
persistent = 0
[State -2, Air Limiter]
type = ParentvarSet
trigger1 = MoveContact && NumTarget
var(40) = 1
ignorehitpause = 1
persistent = 0
[State -2, FlagHitToParent]
type = ParentVarSet
trigger1 = MoveHit && NumTarget
var(58) = 20
ignorehitpause = 1
persistent = 0
[State -2, VarSet]
type = ParentVarSet
trigger1 = MoveContact && NumTarget
var(9) = 1
persistent = 0
ignorehitpause=1

[State -2, VarSet];Counter Hit Reset
type = ParentVarSet
trigger1 = root,var(57) >= 22 
var(57) = 0
ignorehitpause = 1

[State -2, DTC]
type = DisplayToClipboard
trigger1 = 1
text = "Hits = %d"
params = Var(18)

;=====================;Multihit Projectile Properties
[State 1015, VarSet]
type = VarSet
trigger1 = !time && !prevstateno
var(18) = 5
[State 1015, VarSet]
type = VarAdd
trigger1 = !time && prevstateno
var(18) = -1
ignorehitpause = 1
persistent = 0

[State 1005, End]
type=changeState
trigger1 = movecontact 
trigger2 = var(18) <= 0
value= ifelse(var(18)=0,stateno+1,stateno)
;=====================;Timer Projectile Properties
[State -2, juggle decreasing]
type = varSet
trigger1 = !time && !prevstateno
var(19) = 80
ignorehitpause = 0

[State -2, juggle decreasing]
type = varSet
trigger1 = var(19)>0
var(19) = var(19)-1
ignorehitpause = 0
;=======================================;Effects
[State 1000, Sound]
type = PlaySnd
trigger1 = MoveContact && NumTarget
value = 3+(root,var(32)*2),ifelse(MoveHit,9,13)
persistent = 0
ignorehitpause = 1
channel = 4

[State 3000, ContactSpark]
type = Explod
trigger1 = MoveContact && NumTarget
anim = (ifelse(MoveHit,(17002+(root,var(31)*10001)),(17502+(root,var(31)*10000))))
ID = 1000
pos = 22 ,0
postype = p1
facing = 1
bindtime = 1
removetime = -2
sprpriority = 8
shadow = 0,0,0
ownpal = 1
persistent = 0
ignorehitpause = 1

[State 13000, EnvColor]
type = EnvColor
trigger1 = numtarget(3000) && movehit
value = 255,255,255
time = 1
under = 1
ignorehitpause = 1
persistent = 0

[State -2, Helper]
type = Helper
trigger1 = !numhelper(50000) && !numhelper(50001)
trigger1 = WinKO
helpertype = normal
name = "K.O."
ID = 50001
stateno = 50000
pos = 160,120
postype = left    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

[State 1050, Trans]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 166,94
ignorehitpause = 1
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999999
length = 12
palbright = 12,12,12;,136
palcontrast = 120,120,120;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
;=======================================;Hitdefs
[State 210, 1]
type = HitDef
triggerall = var(18) = 5
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,3])
attr = S, HP
damage = floor(116*ifelse(root,var(56),1.25,1)),8 ;225
animtype = U
air.animtype = U
ground.type = Low
guardflag = M
hitflag = MAF
priority = 5, Hit
sparkno = -1
sparkxy = 0, -80
hitsound = -1
guardsound = -1
guard.sparkno = -1
pausetime = 2,15
guard.pausetime = 2,15
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
persistent = 0
fall = 1
fall.recover = 1
fall.recovertime = 120
hitonce = 1
id = 3000
p1sprpriority = 4
p2stateno = 10400
[State 210, 1]
type = HitDef
triggerall = var(18) = 4
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,3])
attr = S, HP
damage = floor(66*ifelse(root,var(56),1.25,1)),8 ;225
animtype = U
air.animtype = U
ground.type = Low
guardflag = M
hitflag = MAF
priority = 5, Hit
sparkno = -1
sparkxy = 0, -80
hitsound = -1
guardsound = -1
guard.sparkno = -1
pausetime = 2,15
guard.pausetime = 2,15
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
persistent = 0
fall = 1
fall.recover = 1
fall.recovertime = 120
hitonce = 1
id = 3000
p1sprpriority = 4
p2stateno = 10400

[State 210, 1]
type = HitDef
triggerall = var(18) = 3
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,3])
attr = S, HP
damage = floor(58*ifelse(root,var(56),1.25,1)),8 ;225
animtype = U
air.animtype = U
ground.type = Low
guardflag = M
hitflag = MAF
priority = 5, Hit
sparkno = -1
sparkxy = 0, -80
hitsound = -1
guardsound = -1
guard.sparkno = -1
pausetime = 2,15
guard.pausetime = 2,15
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
persistent = 0
fall = 1
fall.recover = 1
fall.recovertime = 120
hitonce = 1
id = 3000
p1sprpriority = 4
p2stateno = 10400

[State 210, 1]
type = HitDef
triggerall = var(18) = 2
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,3])
attr = S, HP
damage = floor(33*ifelse(root,var(56),1.25,1)),8 ;225
animtype = U
air.animtype = U
ground.type = Low
guardflag = M
hitflag = MAF
priority = 5, Hit
sparkno = -1
sparkxy = 0, -80
hitsound = -1
guardsound = -1
guard.sparkno = -1
pausetime = 1,15
guard.pausetime = 1,15
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
persistent = 0
fall = 1
fall.recover = 1
fall.recovertime = 120
hitonce = 1
id = 3000
p1sprpriority = 4
p2stateno = 10400

[State 210, 1]
type = HitDef
triggerall = var(18) = 1
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,3])
attr = S, HP
damage = floor(33*ifelse(root,var(56),1.25,1)),8 ;225
animtype = Hard
air.animtype = back
ground.type = Low
guardflag = M
hitflag = MAF
priority = 5, Hit
sparkno = -1
sparkxy = 0, -80
hitsound = -1
guardsound = -1
guard.sparkno = -1
pausetime = 1,15
guard.pausetime = 1,15
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -15.75,-4.5
guard.velocity = -11.1796875
air.type = High
air.velocity = -15.75,-4.5
air.hittime = 13
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
persistent = 0
fall = 1
fall.recover = 1
fall.recovertime = 120
hitonce = 1
id = 3001
p1sprpriority = 4
fall.envshake.time = 14
fall.envshake.freq = 180
fall.envshake.ampl = -4
p2stateno = 10900
;=======================================;End
[State 1000, DestroySelf]
type = DestroySelf
triggerall = time > 1
trigger1 = FrontEdgeDist <= -40
[State 1005, End]
type=changeState
trigger1= movecontact
trigger2=var(19)=0
value=3008
persistent = 0
;=======================================;Recovery for target
[State -2, P2 Safe Fall]
type = TargetState
trigger1 = NumTarget = 1
trigger1 = Target, command = "recovery"
trigger1 = Target, pos y >= -30 && Target, vel y > 0
trigger1 = Target, Alive && Target, HitFall && Target, GetHitVar(fall.recover)
trigger1 = Target, StateNo = 5030 || Target, StateNo = 5035 || Target, StateNo = 5050 || Target, StateNo = 5071
value = 5205
ignoreHitPause = 1
;================================================================================
;Gadou Shokouken Projectile Disperse
;================================================================================
[Statedef 3008]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
anim = 3006 
sprpriority = 4
;=======================================;Projectile Properties
[State 1005, PROJECTILE ACTIVE]
type = VarSet
trigger1 = !time 
var(20) = 1
[State 1050, Trans]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 166,94
ignorehitpause = 1
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999999
length = 12
palbright = 12,12,12;,136
palcontrast = 120,120,120;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
;=======================================;End
[State 10002, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0 && numtarget = 0
;=======================================;Recovery for target
[State -2, P2 Safe Fall]
type = TargetState
trigger1 = NumTarget = 1
trigger1 = Target, command = "recovery"
trigger1 = Target, pos y >= -30 && Target, vel y > 0
trigger1 = Target, Alive && Target, HitFall && Target, GetHitVar(fall.recover)
trigger1 = Target, StateNo = 5030 || Target, StateNo = 5035 || Target, StateNo = 5050 || Target, StateNo = 5071
value = 5205
ignoreHitPause = 1
;================================================================================
;Level 1 Gadou Shokouken REFLECTED
;================================================================================
[Statedef 3015]
type = A
movetype = A
physics = N
ctrl = 0
ownpal = 1
sprpriority = 4
;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time 
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = 3005
;=======================================;
;=======================================;Movement
[State 1050, VelSet]
type = VelSet
trigger1 = time = 1
x = var(15)
;=======================================;Animations
[State 1000, Anim]
Type = ChangeAnim
Trigger1 = !Time && !prevstateno 
Value = 3005
ignorehitpause = 1
;=======================================;Projectile Properties
[State -2, Damage Dampener]; Scaling in action
type= attackmulset
trigger1= 1
value= ifelse(root,var(51),0.63,1)
ignorehitpause= 1

[State 1000, projs only]
type = HitBy
trigger1 = 1
value = SCA, NP, SP, HP
ignorehitpause = 1
[State 10012, override]
type = HitOverride
trigger1 = !time
attr = SCA, AA, AP, AT
stateno = 3015
time = -1
ignorehitpause = 1
slot = 2

[State -2, Juggle Killer]
type = ParentVarSet
trigger1 = movehit && P2Statetype = A
trigger1 = var(18) > 1
var(16) = 60
ignorehitpause = 1
persistent = 0
[State -2, Juggle Killer]
type = ParentVarSet
trigger1 = movehit && P2Statetype = A
trigger1 = var(18) = 1
var(16) = ifelse(root,var(51),60,0)
ignorehitpause = 1
persistent = 0
[State -2, Air Limiter]
type = ParentvarSet
trigger1 = MoveContact && NumTarget
var(40) = 1
ignorehitpause = 1
persistent = 0
[State -2, FlagHitToParent]
type = ParentVarSet
trigger1 = MoveHit && NumTarget
var(58) = 20
ignorehitpause = 1
persistent = 0
[State -2, VarSet]
type = ParentVarSet
trigger1 = MoveContact && NumTarget
var(9) = 1
persistent = 0
ignorehitpause=1

[State -2, VarSet];Counter Hit Reset
type = ParentVarSet
trigger1 = root,var(57) >= 22 
var(57) = 0
ignorehitpause = 1

[State -2, DTC]
type = DisplayToClipboard
trigger1 = 1
text = "Hits = %d"
params = Var(18)
;=====================;Multihit Projectile Properties
[State 1015, VarSet]
type = VarSet
trigger1 = !time 
var(18) = 1
[State 1015, VarSet]
type = VarAdd
trigger1 = !time && prevstateno = 3015
var(18) = -1
ignorehitpause = 1
persistent = 0

[State 1005, End]
type=changeState
trigger1 = movecontact 
trigger2 = var(18) <= 0
value= ifelse(var(18)=0,3008,stateno)
;=====================;Timer Projectile Properties
[State -2, juggle decreasing]
type = varSet
trigger1 = !time && !prevstateno
var(19) = 20
ignorehitpause = 0

[State -2, juggle decreasing]
type = varSet
trigger1 = var(19)>0
var(19) = var(19)-1
ignorehitpause = 0
;=======================================;Effects
[State 1000, Sound]
type = PlaySnd
trigger1 = MoveContact && NumTarget
value = 3+(root,var(32)*2),ifelse(MoveHit,9,13)
persistent = 0
ignorehitpause = 1

[State 3000, ContactSpark]
type = Explod
trigger1 = MoveContact && NumTarget
anim = (ifelse(MoveHit,(17002+(root,var(31)*10001)),(17502+(root,var(31)*10000))))
ID = 1000
pos = 22 ,0
postype = p1
facing = 1
bindtime = 1
removetime = -2
sprpriority = 8
shadow = 0,0,0
ownpal = 1
persistent = 0
ignorehitpause = 1

[State 13000, EnvColor]
type = EnvColor
trigger1 = numtarget(3000) && movehit
value = 255,255,255
time = 1
under = 1
ignorehitpause = 1
persistent = 0

[State -2, Helper]
type = Helper
trigger1 = !numhelper(50000) && !numhelper(50001)
trigger1 = WinKO
helpertype = normal
name = "K.O."
ID = 50001
stateno = 50000
pos = 160,120
postype = left    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

[State 1050, Trans]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 166,94
ignorehitpause = 1
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999999
length = 12
palbright = 12,12,12;,136
palcontrast = 120,120,120;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
;=======================================;Hitdefs
[State 210, 1]
type = HitDef
affectteam = F
triggerall = var(18) = 1
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,3])
attr = S, HP
damage = floor(208*ifelse(root,var(56),1.25,1)),8 ;225
animtype = U
air.animtype = U
ground.type = Low
guardflag = M
hitflag = MAF
priority = 5, Hit
sparkno = -1
sparkxy = 0, -80
hitsound = -1
guardsound = -1
guard.sparkno = -1
pausetime = 1,15
guard.pausetime = 1,15
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
persistent = 0
fall = 1
fall.recover = 1
fall.recovertime = 120
hitonce = 1
p1sprpriority = 4
p2stateno = 10400
;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
id = sysvar(0)
;=======================================;

;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;FOR REFLECTOR / ??????????HELPER?	;
;sysvar(0) = 262144                     ;
;=======================================;
[State 1007, Turn]
type = Turn
Trigger1 = !Time && prevstateno != stateno
[State 1206, ChangeState]
type = ChangeState
trigger1 = var(54)
trigger1 = root,NumProjID(262144)
value = sysvar(1)
ctrl = 0
ignorehitpause = 1
;=======================================;End
[State 1000, DestroySelf]
type = DestroySelf
triggerall = time > 1
trigger1 = FrontEdgeDist <= -40
[State 1005, End]
type=changeState
trigger1= movecontact
trigger2=var(19) = 0
value=3008
persistent = 0
;=======================================;Recovery for target
[State -2, P2 Safe Fall]
type = TargetState
trigger1 = NumTarget = 1
trigger1 = Target, command = "recovery"
trigger1 = Target, pos y >= -30 && Target, vel y > 0
trigger1 = Target, Alive && Target, HitFall && Target, GetHitVar(fall.recover)
trigger1 = Target, StateNo = 5030 || Target, StateNo = 5035 || Target, StateNo = 5050 || Target, StateNo = 5071
value = 5205
ignoreHitPause = 1
;================================================================================
;Level 2 Gadou Shokouken REFLECTED
;================================================================================
[Statedef 3016]
type = A
movetype = A
physics = N
ctrl = 0
ownpal = 1
sprpriority = 4
;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time 
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = 3006
;=======================================;
;=======================================;Movement
[State 1050, VelSet]
type = VarSet
trigger1 = !time && !prevstateno
var(15) = root,var(15)
[State 1050, VelSet]
type = VelSet
trigger1 = time = 1
x = var(15)
;=======================================;Animations
[State 1000, Anim]
Type = ChangeAnim
Trigger1 = !Time && !prevstateno 
Value = 3005
ignorehitpause = 1
;=======================================;Projectile Properties
[State -2, Damage Dampener]; Scaling in action
type= attackmulset
trigger1= 1
value= ifelse(root,var(51),0.63,1)
ignorehitpause= 1

[State 1000, projs only]
type = HitBy
trigger1 = 1
value = SCA, NP, SP, HP
ignorehitpause = 1
[State 10012, override]
type = HitOverride
trigger1 = !time
attr = SCA, AA, AP, AT
stateno = 3005
time = -1
ignorehitpause = 1
slot = 2

[State -2, Juggle Killer]
type = ParentVarSet
trigger1 = movehit && P2Statetype = A
trigger1 = var(18) > 1
var(16) = 60
ignorehitpause = 1
persistent = 0
[State -2, Juggle Killer]
type = ParentVarSet
trigger1 = movehit && P2Statetype = A
trigger1 = var(18) = 1
var(16) = ifelse(root,var(51),60,20)
ignorehitpause = 1
persistent = 0
[State -2, Air Limiter]
type = ParentvarSet
trigger1 = MoveContact && NumTarget
var(40) = 1
ignorehitpause = 1
persistent = 0
[State -2, FlagHitToParent]
type = ParentVarSet
trigger1 = MoveHit && NumTarget
var(58) = 20
ignorehitpause = 1
persistent = 0
[State -2, VarSet]
type = ParentVarSet
trigger1 = MoveContact && NumTarget
var(9) = 1
persistent = 0
ignorehitpause=1

[State -2, VarSet];Counter Hit Reset
type = ParentVarSet
trigger1 = root,var(57) >= 22 
var(57) = 0
ignorehitpause = 1

[State -2, DTC]
type = DisplayToClipboard
trigger1 = 1
text = "Hits = %d"
params = Var(18)

;=====================;Multihit Projectile Properties
[State 1015, VarSet]
type = VarSet
trigger1 = !time && prevstateno != 3016
var(18) = 3
[State 1015, VarSet]
type = VarAdd
trigger1 = !time && prevstateno = 3016
var(18) = -1
ignorehitpause = 1
persistent = 0

[State 1005, End]
type=changeState
trigger1 = movecontact 
trigger2 = var(18) <= 0
value= ifelse(var(18)=0,3008,stateno)
;=====================;Timer Projectile Properties
[State -2, juggle decreasing]
type = varSet
trigger1 = !time && !prevstateno
var(19) = 60
ignorehitpause = 0

[State -2, juggle decreasing]
type = varSet
trigger1 = var(19)>0
var(19) = var(19)-1
ignorehitpause = 0
;=======================================;Effects
[State 1000, Sound]
type = PlaySnd
trigger1 = MoveContact && NumTarget
value = 3+(root,var(32)*2),ifelse(MoveHit,9,13)
persistent = 0
ignorehitpause = 1
channel = 4

[State 3000, ContactSpark]
type = Explod
trigger1 = MoveContact && NumTarget
anim = (ifelse(MoveHit,(17002+(root,var(31)*10001)),(17502+(root,var(31)*10000))))
ID = 1000
pos = 22 ,0
postype = p1
facing = 1
bindtime = 1
removetime = -2
sprpriority = 8
shadow = 0,0,0
ownpal = 1
persistent = 0
ignorehitpause = 1

[State 13000, EnvColor]
type = EnvColor
trigger1 = numtarget(3000) && movehit
value = 255,255,255
time = 1
under = 1
ignorehitpause = 1
persistent = 0

[State -2, Helper]
type = Helper
trigger1 = !numhelper(50000) && !numhelper(50001)
trigger1 = WinKO
helpertype = normal
name = "K.O."
ID = 50001
stateno = 50000
pos = 160,120
postype = left    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

[State 1005, PROJECTILE ACTIVE]
type = VarSet
trigger1 = !time 
var(20) = 1
[State 1050, Trans]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 166,94
ignorehitpause = 1
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999999
length = 12
palbright = 12,12,12;,136
palcontrast = 120,120,120;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
;=======================================;Hitdefs
[State 210, 1]
type = HitDef
affectteam = F
triggerall = var(18) = 3
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,3])
attr = S, HP
damage = floor(116*ifelse(root,var(56),1.25,1)),8 ;225
animtype = U
air.animtype = U
ground.type = Low
guardflag = M
hitflag = MAF
priority = 5, Hit
sparkno = -1
sparkxy = 0, -80
hitsound = -1
guardsound = -1
guard.sparkno = -1
pausetime = 2,15
guard.pausetime = 2,15
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
persistent = 0
fall = 1
fall.recover = 1
fall.recovertime = 120
hitonce = 1
id = sysvar(0)
p1sprpriority = 4
p2stateno = 10400
[State 210, 1]
type = HitDef
affectteam = F
triggerall = var(18) = 2
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,3])
attr = S, HP
damage = floor(66*ifelse(root,var(56),1.25,1)),8 ;225
animtype = U
air.animtype = U
ground.type = Low
guardflag = M
hitflag = MAF
priority = 5, Hit
sparkno = -1
sparkxy = 0, -80
hitsound = -1
guardsound = -1
guard.sparkno = -1
pausetime = 2,15
guard.pausetime = 2,15
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
persistent = 0
fall = 1
fall.recover = 1
fall.recovertime = 120
hitonce = 1
id = sysvar(0)
p1sprpriority = 4
p2stateno = 10400
[State 210, 1]
type = HitDef
affectteam = F
triggerall = var(18) = 1
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,3])
attr = S, HP
damage = floor(58*ifelse(root,var(56),1.25,1)),8 ;225
animtype = U
air.animtype = U
ground.type = Low
guardflag = M
hitflag = MAF
priority = 5, Hit
sparkno = -1
sparkxy = 0, -80
hitsound = -1
guardsound = -1
guard.sparkno = -1
pausetime = 1,15
guard.pausetime = 1,15
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
persistent = 0
fall = 1
fall.recover = 1
fall.recovertime = 120
hitonce = 1
p1sprpriority = 4
p2stateno = 10400
;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
id = sysvar(0)
;=======================================;

;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;FOR REFLECTOR / ??????????HELPER?	;
;sysvar(0) = 262144                     ;
;=======================================;
[State 1007, Turn]
type = Turn
Trigger1 = !Time && prevstateno != stateno
[State 1206, ChangeState]
type = ChangeState
trigger1 = var(54)
trigger1 = root,NumProjID(262144)
value = sysvar(1)
ctrl = 0
ignorehitpause = 1
;=======================================;
[State 1411, Collision]
type = VarSet
trigger1 = movecontact ;&& numtarget
var(54) = 1
persistent = 0
ignorehitpause=1
;=======================================;End
[State 1000, DestroySelf]
type = DestroySelf
triggerall = time > 1
trigger1 = FrontEdgeDist <= -40
[State 1005, End]
type=changeState
trigger1= movecontact
trigger2=var(19) = 0
value=3008
persistent = 0
;=======================================;Recovery for target
[State -2, P2 Safe Fall]
type = TargetState
trigger1 = NumTarget = 1
trigger1 = Target, command = "recovery"
trigger1 = Target, pos y >= -30 && Target, vel y > 0
trigger1 = Target, Alive && Target, HitFall && Target, GetHitVar(fall.recover)
trigger1 = Target, StateNo = 5030 || Target, StateNo = 5035 || Target, StateNo = 5050 || Target, StateNo = 5071
value = 5205
ignoreHitPause = 1
;================================================================================
;Level 3 Gadou Shokouken REFLECTED
;================================================================================
[Statedef 3017]
type = A
movetype = A
physics = N
ctrl = 0
ownpal = 1
sprpriority = 4
;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time 
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = 3007
;=======================================;
;=======================================;Movement
[State 1050, VelSet]
type = VarSet
trigger1 = !time && !prevstateno
var(15) = root,var(15)
[State 1050, VelSet]
type = VelSet
trigger1 = time = 1
x = var(15)
;=======================================;Animations
[State 1000, Anim]
Type = ChangeAnim
Trigger1 = !Time && !prevstateno 
Value = 3005
ignorehitpause = 1
;=======================================;Projectile Properties
[State -2, Damage Dampener]; Scaling in action
type= attackmulset
trigger1= 1
value= ifelse(root,var(51),0.63,1)
ignorehitpause= 1

[State 1000, projs only]
type = HitBy
trigger1 = 1
value = SCA, NP, SP, HP
ignorehitpause = 1
[State 10012, override]
type = HitOverride
trigger1 = !time
attr = SCA, AA, AP, AT
stateno = 3005
time = -1
ignorehitpause = 1
slot = 2

[State -2, Juggle Killer]
type = ParentVarSet
trigger1 = movehit && P2Statetype = A
trigger1 = var(18) > 1
var(16) = 60
ignorehitpause = 1
persistent = 0
[State -2, Juggle Killer]
type = ParentVarSet
trigger1 = movehit && P2Statetype = A
trigger1 = var(18) = 1
var(16) = ifelse(root,var(51),60,600)
ignorehitpause = 1
persistent = 0
[State -2, Air Limiter]
type = ParentvarSet
trigger1 = MoveContact && NumTarget
var(40) = 1
ignorehitpause = 1
persistent = 0
[State -2, FlagHitToParent]
type = ParentVarSet
trigger1 = MoveHit && NumTarget
var(58) = 20
ignorehitpause = 1
persistent = 0
[State -2, VarSet]
type = ParentVarSet
trigger1 = MoveContact && NumTarget
var(9) = 1
persistent = 0
ignorehitpause=1

[State -2, VarSet];Counter Hit Reset
type = ParentVarSet
trigger1 = root,var(57) >= 22 
var(57) = 0
ignorehitpause = 1

[State -2, DTC]
type = DisplayToClipboard
trigger1 = 1
text = "Hits = %d"
params = Var(18)

;=====================;Multihit Projectile Properties
[State 1015, VarSet]
type = VarSet
trigger1 = !time && prevstateno != 3017
var(18) = 5
[State 1015, VarSet]
type = VarAdd
trigger1 = !time && prevstateno = 3017
var(18) = -1
ignorehitpause = 1
persistent = 0

[State 1005, End]
type=changeState
trigger1 = movecontact 
trigger2 = var(18) <= 0
value= ifelse(var(18)=0,3008,stateno)
;=====================;Timer Projectile Properties
[State -2, juggle decreasing]
type = varSet
trigger1 = !time && !prevstateno
var(19) = 80
ignorehitpause = 0

[State -2, juggle decreasing]
type = varSet
trigger1 = var(19)>0
var(19) = var(19)-1
ignorehitpause = 0
;=======================================;Effects
[State 1000, Sound]
type = PlaySnd
trigger1 = MoveContact && NumTarget
value = 3+(root,var(32)*2),ifelse(MoveHit,9,13)
persistent = 0
ignorehitpause = 1
channel = 4

[State 3000, ContactSpark]
type = Explod
trigger1 = MoveContact && NumTarget
anim = (ifelse(MoveHit,(17002+(root,var(31)*10001)),(17502+(root,var(31)*10000))))
ID = 1000
pos = 22 ,0
postype = p1
facing = 1
bindtime = 1
removetime = -2
sprpriority = 8
shadow = 0,0,0
ownpal = 1
persistent = 0
ignorehitpause = 1

[State 13000, EnvColor]
type = EnvColor
trigger1 = numtarget(3000) && movehit
value = 255,255,255
time = 1
under = 1
ignorehitpause = 1
persistent = 0

[State -2, Helper]
type = Helper
trigger1 = !numhelper(50000) && !numhelper(50001)
trigger1 = WinKO
helpertype = normal
name = "K.O."
ID = 50001
stateno = 50000
pos = 160,120
postype = left    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

[State 1050, Trans]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 166,94
ignorehitpause = 1
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999999
length = 12
palbright = 12,12,12;,136
palcontrast = 120,120,120;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
;=======================================;Hitdefs
[State 210, 1]
type = HitDef
affectteam = F
triggerall = var(18) = 5
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,3])
attr = S, HP
damage = floor(116*ifelse(root,var(56),1.25,1)),8 ;225
animtype = U
air.animtype = U
ground.type = Low
guardflag = M
hitflag = MAF
priority = 5, Hit
sparkno = -1
sparkxy = 0, -80
hitsound = -1
guardsound = -1
guard.sparkno = -1
pausetime = 2,15
guard.pausetime = 2,15
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
persistent = 0
fall = 1
fall.recover = 1
fall.recovertime = 120
hitonce = 1
id = sysvar(0)
p1sprpriority = 4
p2stateno = 10400
[State 210, 1]
type = HitDef
affectteam = F
triggerall = var(18) = 4
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,3])
attr = S, HP
damage = floor(66*ifelse(root,var(56),1.25,1)),8 ;225
animtype = U
air.animtype = U
ground.type = Low
guardflag = M
hitflag = MAF
priority = 5, Hit
sparkno = -1
sparkxy = 0, -80
hitsound = -1
guardsound = -1
guard.sparkno = -1
pausetime = 2,15
guard.pausetime = 2,15
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
persistent = 0
fall = 1
fall.recover = 1
fall.recovertime = 120
hitonce = 1
id = sysvar(0)
p1sprpriority = 4
p2stateno = 10400

[State 210, 1]
type = HitDef
affectteam = F
triggerall = var(18) = 3
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,3])
attr = S, HP
damage = floor(58*ifelse(root,var(56),1.25,1)),8 ;225
animtype = U
air.animtype = U
ground.type = Low
guardflag = M
hitflag = MAF
priority = 5, Hit
sparkno = -1
sparkxy = 0, -80
hitsound = -1
guardsound = -1
guard.sparkno = -1
pausetime = 2,15
guard.pausetime = 2,15
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
persistent = 0
fall = 1
fall.recover = 1
fall.recovertime = 120
hitonce = 1
id = sysvar(0)
p1sprpriority = 4
p2stateno = 10400

[State 210, 1]
type = HitDef
affectteam = F
triggerall = var(18) = 2
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,3])
attr = S, HP
damage = floor(33*ifelse(root,var(56),1.25,1)),8 ;225
animtype = U
air.animtype = U
ground.type = Low
guardflag = M
hitflag = MAF
priority = 5, Hit
sparkno = -1
sparkxy = 0, -80
hitsound = -1
guardsound = -1
guard.sparkno = -1
pausetime = 1,15
guard.pausetime = 1,15
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
persistent = 0
fall = 1
fall.recover = 1
fall.recovertime = 120
hitonce = 1
id = sysvar(0)
p1sprpriority = 4
p2stateno = 10400

[State 210, 1]
type = HitDef
affectteam = F
triggerall = var(18) = 1
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,3])
attr = S, HP
damage = floor(33*ifelse(root,var(56),1.25,1)),8 ;225
animtype = Hard
air.animtype = back
ground.type = Low
guardflag = M
hitflag = MAF
priority = 5, Hit
sparkno = -1
sparkxy = 0, -80
hitsound = -1
guardsound = -1
guard.sparkno = -1
pausetime = 1,15
guard.pausetime = 1,15
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -15.75,-4.5
guard.velocity = -11.1796875
air.type = High
air.velocity = -15.75,-4.5
air.hittime = 13
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
persistent = 0
fall = 1
fall.recover = 1
fall.recovertime = 120
hitonce = 1
p1sprpriority = 4
fall.envshake.time = 14
fall.envshake.freq = 180
fall.envshake.ampl = -4
p2stateno = 10900
;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
id = sysvar(0)
;=======================================;

;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;?????????????                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / ?????              	;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;FOR REFLECTOR / ??????????HELPER?	;
;sysvar(0) = 262144                     ;
;=======================================;
[State 1007, Turn]
type = Turn
Trigger1 = !Time && prevstateno != stateno
[State 1206, ChangeState]
type = ChangeState
trigger1 = var(54)
trigger1 = root,NumProjID(262144)
value = sysvar(1)
ctrl = 0
ignorehitpause = 1
;=======================================;
[State 1411, Collision]
type = VarSet
trigger1 = movecontact ;&& numtarget
var(54) = 1
persistent = 0
ignorehitpause=1
;=======================================;End
[State 1000, DestroySelf]
type = DestroySelf
triggerall = time > 1
trigger1 = FrontEdgeDist <= -40
[State 1005, End]
type=changeState
trigger1= movecontact
trigger2=var(19)=0
value=3008
persistent = 0
;=======================================;Recovery for target
[State -2, P2 Safe Fall]
type = TargetState
trigger1 = NumTarget = 1
trigger1 = Target, command = "recovery"
trigger1 = Target, pos y >= -30 && Target, vel y > 0
trigger1 = Target, Alive && Target, HitFall && Target, GetHitVar(fall.recover)
trigger1 = Target, StateNo = 5030 || Target, StateNo = 5035 || Target, StateNo = 5050 || Target, StateNo = 5071
value = 5205
ignoreHitPause = 1
;================================================================================
;Hishou Burai Ken
;================================================================================
[Statedef 3100]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
poweradd= ifelse(var(51),0,-1000)     
ctrl = 0
anim = 3100
sprpriority = 2
;=======================================;Superpause and Effects
[State 300, End MAXMODE]
type = VarSet
trigger1 = !time
var(51) = 0
ignorehitpause = 1

[State 2000, VarSet]
type = VarSet
trigger1 = time = 0 ;Superpause tick error fix.
var(6) = 30

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 0
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 220,0,10;255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 1
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State 1000: Helper]
type = Helper
triggerall = var(31) = 0
trigger1 = !numhelper(40000)
trigger1 = prevstateno = [1000,1500]
helpertype = Normal
name = "SuperCancel"
id = 40000
pos = 0, 0 ;50
postype = left
facing = 1
stateno = 40000
keyctrl = 0
ownpal = 1
ontop = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
ignorehitpause = 1
persistent = 0

[State 2010, AssertSpecial]
type = AssertSpecial
trigger1 = time = [1,30]
flag = noBG
flag2 = noFG

[State 13000, EnvColor]
type = EnvColor
trigger1 = time = 1
value = 255,255,255
time = 4
under = 1
ignorehitpause = 1
persistent = 0

[State 2010, Pause]
Type = SuperPause
Trigger1 = time = 1
Time = 28
movetime = 28
anim = -1
sound = s3+(var(32)*2),10
Pos = 14, -88
Darken = 0
UnHittAble = 1
p2defmul = 1

[State 6001, pause]
type = Explod
trigger1 = time = 1
anim = 15200-(var(31)*200)
pos = -12,-85
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = -2
ownpal = 1
[State 6001, pause]
type = Explod
trigger1 = time = 1
anim = 15201-(var(31)*200)
pos = -12,-85
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = 4
ownpal = 1
;=======================================;Hamburger! MUTEKI!
[State 2000, 0]
type = NotHitBy
trigger1 = anim = 3100
trigger2 = anim = 3100 && animelemtime(5) < 0
value = SCA
;=======================================;Variables
[State 1000, VarSet]
type = VarSet
trigger1 = !time
var(5) = ifelse((helper(10371), var(0) = [1,3]),0,1) 
;=======================================;Animations
[State 1000, Anim]
Type = ChangeAnim
Triggerall = animtime = 0
trigger1 = anim = 3100 || anim = 3101 || anim = 3102  
Value = anim+1
ignorehitpause = 1
[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 3102 || anim = 3103
Statetype = A 
;=======================================; Vels && Movement
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 3102 && animelem = 1
y = -6
[State 1300, VelAdd]
type = VelAdd
trigger1 = anim = 3102 && animelemtime(1) > 0
y = 0.5
;=======================================;Effects
[State 200, snd]
type=playsnd
trigger1 = anim = 3100
trigger1= animelem=1 
value=200,18
channel=0 
[State 200, snd]
type=playsnd
trigger1 = anim = 3101
trigger1= animelem=1 
value=200,19
[State 200, snd]
type=playsnd
trigger1 = anim = 3102
trigger1= animelem=1 
value=200,21

[State 200, Punch Attempt Sound]
type = Playsnd
triggerall = anim = 3101
trigger1= animelem=1 
trigger2= animelem=7 
trigger3= animelem=13 
trigger4= animelem=19 
trigger5= animelem=25 
trigger6= animelem=28 
trigger7= animelem=32 
trigger8= animelem=39
value = 3+(var(32)*2),2
channel = 4

[State 200, snd]
type=playsnd
triggerall = anim = 3102
trigger1= animelem=1 
value=1000,5

[State 3035, 1]
type = AfterImage
trigger1 = anim = 3101
trigger1 = AnimElem = 1, =4
time = 999
length = 4
timegap = 2
framegap = 1
palbright = 0,0,32
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1
palcolor = 0
trans = add1
;=======================================;Hitdefs
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 3101
trigger1 = AnimElemtime(4) >= 0 && animelemtime(5) < 0
attr = S, HA
damage = floor(58*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 1, 3
guard.pausetime = 1,2
sparkno = s17002+(var(31)*10001)
sparkxy = -20, -44
hitsound = s3+(var(32)*2),1+((random%4)*2)
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = Low
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = 0
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
id = 3100
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
air.fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 3101
trigger1 = AnimElemtime(8) >= 0 && animelemtime(9) < 0
attr = S, HA
damage = floor(41*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 1, 3
guard.pausetime = 1,2
sparkno = s17002+(var(31)*10001)
sparkxy = -20, -60
hitsound = s3+(var(32)*2),1+((random%4)*2)
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = Low
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = 0
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
id = 3100
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
air.fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 3101
trigger1 = AnimElemtime(14) >= 0 && animelemtime(15) < 0
attr = S, HA
damage = floor(33*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 1, 3
guard.pausetime = 1,2
sparkno = s17002+(var(31)*10001)
sparkxy = -20, -44
hitsound = s3+(var(32)*2),1+((random%4)*2)
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = Low
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = 0
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
id = 3100
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
air.fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 3101
trigger1 = AnimElemtime(21) >= 0 && animelemtime(22) < 0
attr = S, HA
damage = floor(16*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 1, 3
guard.pausetime = 1,2
sparkno = s17002+(var(31)*10001)
sparkxy = -20, -80
hitsound = s3+(var(32)*2),1+((random%4)*2)
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = 0
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
id = 3100
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
air.fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 3101
trigger1 = AnimElemtime(26) >= 0 && animelemtime(27) < 0
attr = S, HA
damage = floor(16*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 1, 3
guard.pausetime = 1,2
sparkno = s17002+(var(31)*10001)
sparkxy = -20, -12
hitsound = s3+(var(32)*2),1+((random%4)*2)
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = low
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = 5.796875
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
id = 3100
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
air.fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 3101
trigger1 = AnimElemtime(30) >= 0 && animelemtime(31) < 0
attr = S, HA
damage = floor(16*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 1, 3
guard.pausetime = 1,2
sparkno = s17002+(var(31)*10001)
sparkxy = -20, -60
hitsound = s3+(var(32)*2),1+((random%4)*2)
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = 0
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
id = 3100
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
air.fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 3101
trigger1 = AnimElemtime(35) >= 0 && animelemtime(36) < 0
attr = S, HA
damage = floor(16*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 1, 3
guard.pausetime = 1,2
sparkno = s17002+(var(31)*10001)
sparkxy = -20, -84
hitsound = s3+(var(32)*2),1+((random%4)*2)
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = 0
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
id = 3100
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
air.fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 3101
trigger1 = AnimElemtime(41) >= 0 && animelemtime(42) < 0
attr = S, HA
damage = floor(16*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 1, 3
guard.pausetime = 1,2
sparkno = s17002+(var(31)*10001)
sparkxy = -20, -73
hitsound = s3+(var(32)*2),1+((random%4)*2)
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = 0
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
id = 3100
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
air.fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 3101
trigger1 = AnimElem = 43
attr = S, HA
damage = floor(16*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 16, 16
guard.pausetime = 16,16
sparkno = s17002+(var(31)*10001)
sparkxy = -20, -92
hitsound = s3+(var(32)*2),9
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = low
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = 0
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
id = 3100
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
air.fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = anim = 3102 && animelem = 1
attr = A, HA
damage = floor(25*ifelse(var(56),1.25,1)),8
animtype = Up
air.animtype = Up
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 16, 16
guard.pausetime = 16,16
sparkno = s17002+(var(31)*10001)
sparkxy = -20,-108
hitsound = s2, 13
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
p2stateno = 10030
envshake.ampl = -4      
envshake.freq = 180
envshake.time = 14 
id = 3100
persistent = 0
;=======================================;End
[State 1000, 6]
type = ChangeState
triggerall = statetype = A
trigger1 = Vel Y + Pos Y >= 0
value = stateno+1
ctrl = 0
;================================================================================
;Hishou Burai Ken Landing
;================================================================================
[Statedef 3101]
type = S
movetype = I
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority = 2
;=======================================;Animations
[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = anim+1
;=======================================;Movements
[State 852, PosSet]
type = PosSet
trigger1 = !time
y = 0
;=======================================;Effects
[State -3, land]
type = PlaySnd
trigger1 = !time
value =  (2+(var(32)*10))+var(41),2
[State -3, AfterImage Persist]
type = AfterImageTime
trigger1 = !time
time = 1
;=======================================;End
[State 220,2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;================================================================================
;Chouhatsu Densetsu
;================================================================================
[Statedef 3200]
type    = S
movetype= I
physics = N
juggle  = 0
velset = 0,0
poweradd= ifelse(var(51),0,-1000)     
ctrl = 0
anim = 3200
sprpriority = 2
;=======================================;Superpause and Effects
[State 300, End MAXMODE]
type = VarSet
trigger1 = !time
var(51) = 0
ignorehitpause = 1

[State 2000, VarSet]
type = VarSet
trigger1 = time = 0 ;Superpause tick error fix.
var(6) = 30

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 0
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 220,0,10;255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 1
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State 1000: Helper]
type = Helper
triggerall = var(31) = 0
trigger1 = !numhelper(40000)
trigger1 = prevstateno = [1000,1500]
helpertype = Normal
name = "SuperCancel"
id = 40000
pos = 0, 0 ;50
postype = left
facing = 1
stateno = 40000
keyctrl = 0
ownpal = 1
ontop = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
ignorehitpause = 1
persistent = 0

[State 2010, AssertSpecial]
type = AssertSpecial
trigger1 = time = [1,30]
flag = noBG
flag2 = noFG

[State 13000, EnvColor]
type = EnvColor
trigger1 = time = 1
value = 255,255,255
time = 4
under = 1
ignorehitpause = 1
persistent = 0

[State 2010, Pause]
Type = SuperPause
Trigger1 = time = 1
Time = 28
movetime = 28
anim = -1
sound = s3+(var(32)*2),10
Pos = 14, -88
Darken = 0
UnHittAble = 1
p2defmul = 1

[State 6001, pause]
type = Explod
trigger1 = time = 1
anim = 15200-(var(31)*200)
pos = -15,-80
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = -2
ownpal = 1
[State 6001, pause]
type = Explod
trigger1 = time = 1
anim = 15201-(var(31)*200)
pos = -15,-80
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = 4
ownpal = 1
;=======================================;NotHitBy
[State 2000, 0]
type = NotHitBy
trigger1 = anim = 3200
value = SCA
;=======================================;Variables
[State 1000, VarSet]
type = VarSet
trigger1 = !time
var(5) = ifelse((helper(10371), var(0) = [1,3]),0,1) 
;=======================================;Animations
[State 1000, Anim]
Type = ChangeAnim
Triggerall = animtime = 0
trigger1 = anim = 3200 || anim = 3201 || anim = 3202 || anim = 3203 || anim = 3204 
trigger2 = anim = 3205 || anim = 3206 || anim = 3207 || anim = 3208 || anim = 3209 
trigger3 = anim = 3210 || anim = 3211 || anim = 3212 || anim = 3213 || anim = 3214     
Value = anim+1
ignorehitpause = 1
[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 3215
Statetype = A 
;=======================================; Vels && Movement
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 3202 && animelem = 1
trigger2 = anim = 3205 && animelem = 1
trigger3 = anim = 3208 && animelem = 1
trigger4 = anim = 3210 && animelem = 1
trigger5 = anim = 3213 && animelem = 1
x = 4

[State 1300, VelSet]
type = VelSet
trigger1 = anim = 3203 && animelem = 1
trigger2 = anim = 3206 && animelem = 1
trigger3 = anim = 3209 && animelem = 1
trigger4 = anim = 3211 && animelem = 1
trigger5 = anim = 3214 && animelem = 1
x = 0

[State 1300, VelSet]
type = VelSet
trigger1 = anim = 3215 && animelem = 1
x = 4
y = -7.5
[State 1300, VelAdd]
type = VelAdd
trigger1 = anim = 3215 && animelemtime(1) > 0
y = 0.5

[State 1300, Turn]
type = Turn
triggerall = p2dist X < 0
triggerall = (enemynear,facing = 1 && facing = 1) || (enemynear,facing = -1 && facing = -1)
trigger1 = anim = 3203 && animelem = 1
trigger2 = anim = 3206 && animelem = 1
trigger3 = anim = 3209 && animelem = 1
trigger4 = anim = 3211 && animelem = 1
trigger5 = anim = 3214 && animelem = 1

[State 750, Push]
type = PlayerPush
trigger1 = anim = 3202 
trigger2 = anim = 3205 
trigger3 = anim = 3208
trigger4 = anim = 3210
trigger5 = anim = 3213
trigger6 = anim = 3215
value = 0
;=======================================;Effects
[State 200, snd]
type=playsnd
trigger1 = anim = 3200
trigger1= animelem=1 
value=200,22
channel=0 
[State 200, snd]
type=playsnd
trigger1 = anim = 3203
trigger1= animelem=3 
value=200,23
[State 200, snd]
type=playsnd
trigger1 = anim = 3206
trigger1= animelem=3 
value=200,24
[State 200, snd]
type=playsnd
trigger1 = anim = 3209
trigger1= animelem=3 
value=200,25
[State 200, snd]
type=playsnd
trigger1 = anim = 3211
trigger1= animelem=3 
value=200,26
[State 200, snd]
type=playsnd
trigger1 = anim = 3214
trigger1= animelem=3 
value=200,27
[State 200, snd]
type=playsnd
trigger1 = anim = 3215
trigger1= animelem=1 
value=200,28

[State 300, 0]
type = PlaySnd
trigger1 = anim = 3201
trigger1 = animelem = 1
trigger2 = anim = 3204
trigger2 = animelem = 1
trigger3 = anim = 3207
trigger3 = animelem = 1
trigger4 = anim = 3209
trigger4 = animelem = 13
trigger5 = anim = 3212
trigger5 = animelem = 1
value = 1000,9

[State 200, snd]
type=playsnd
trigger1 = anim = 3215
trigger1= animelem=1 
value=2+(var(32)*10),4
;=======================================;End
[State 1000, 6]
type = ChangeState
triggerall = statetype = A
trigger1 = Vel Y + Pos Y >= 0
value = stateno+1
ctrl = 0
;================================================================================
;Chouhatsu Densetsu Landing
;================================================================================
[Statedef 3201]
type = S
movetype = I
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority = 2
;=======================================;Animations
[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = anim+1
[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 3216 && animtime = 0
value = anim+1
;=======================================;Movements
[State 1300, Turn]
type = Turn
triggerall = p2dist X < 0
triggerall = (enemynear,facing = 1 && facing = 1) || (enemynear,facing = -1 && facing = -1)
trigger1 = !time
[State 852, PosSet]
type = PosSet
trigger1 = !time
y = 0
;=======================================;Effects
[State -3, land]
type = PlaySnd
trigger1 = !time
value =  (2+(var(32)*10))+var(41),2
[State 200, snd]
type=playsnd
trigger1 = anim = 3217
trigger1= animelem=3 
value=200,29
;=======================================;POWER UP!
[State -2, Helper]
type = Helper
triggerall = !numhelper(70001) && !numhelper(70002)
trigger1 = Anim = 3217 && AnimTime = 0
helpertype = normal
name = "MAX"
ID = 70001
stateno = 70001
pos = 160,120
postype = left    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1
[State 200, snd]
type=poweradd 
trigger1 = Anim = 3217 && AnimTime = 0
value= 5000
;=======================================;End
[State 220,2]
type = ChangeState
trigger1 = Anim = 3217 && AnimTime = 0
value = 0
ctrl = 1
;================================================================================
;SDM Hishou Burai Ken
;================================================================================
[Statedef 3300]
type    = S                      
movetype= A                    
physics = N                     
juggle  = 0             
ctrl = 0                       
poweradd=  ifelse(var(51),-1000,-3000)                       
sprpriority = 2 
velset=0,0
facep2 = 1
;================================================================================;Superpause and Effects
[State 300, End MAXMODE]
type = VarSet
trigger1 = !time
var(51) = 0
ignorehitpause = 1

[State 2000, VarSet]
type = VarSet
trigger1 = time = 0 ;Superpause tick error fix.
var(6) = 30

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 0
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 220,0,10;255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 1
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State 1000: Helper]
type = Helper
triggerall = var(31) = 0
trigger1 = !numhelper(40000)
trigger1 = prevstateno = [1000,1500]
helpertype = Normal
name = "SuperCancel"
id = 40000
pos = 0, 0 ;50
postype = left
facing = 1
stateno = 40000
keyctrl = 0
ownpal = 1
ontop = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
ignorehitpause = 1
persistent = 0

[State 2010, AssertSpecial]
type = AssertSpecial
trigger1 = time = [1,30]
flag = noBG
flag2 = noFG

[State 13000, EnvColor]
type = EnvColor
trigger1 = time = 1
value = 255,255,255
time = 4
under = 1
ignorehitpause = 1
persistent = 0

[State 2010, Pause]
Type = SuperPause
Trigger1 = time = 1
Time = 28
movetime = 28
anim = -1
sound = s3,11+(var(32)*6)
Pos = 14, -88
Darken = 0
UnHittAble = 1
poweradd = 0
p2defmul = 1

[State 6001, pause]
type = Explod
trigger1 = time = 1
anim = 15300-(var(31)*200)
pos = -12,-85
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = -2
ownpal = 1
[State 6001, pause]
type = Explod
trigger1 = time = 1
anim = 15301-(var(31)*200)
pos = -12,-85
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = 4
ownpal = 1

[State 2000, 0]
type = NotHitBy
trigger1 = anim = 3300 
trigger2 = anim = 3301 && animelemtime(2) < 0
value = SCA
;================================================================================;Animations and Statetype
[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 3300
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = animtime = 0
trigger1 = anim = 3300 || anim = 3301
value = anim+1

[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 3302 && animelem = 1
Movetype = I 
;=======================================;Effects
[State 1050, PlaySnd]
type = PlaySnd
trigger1 = anim = 3300
trigger1 = animelem = 1
value = 200,43
channel = 0

[State 3303, Explod]
type = Explod
trigger1 = anim = 3301
trigger1 = animelem = 1
anim = 12004 
pos = -24,0
postype = p1  ;p2,front,back,left,right
sprpriority = 3
ownpal = 1
ignorehitpause = 1

[State 3303, Explod]
type = Explod
trigger1 = anim = 3302
trigger1 = animelem = 1
anim = 12001+(var(31)*10000)
pos = 0,0
postype = p1
sprpriority = 2
ownpal = 1
persistent = 0

[State 3303, Explod]
type = Explod
trigger1 = anim = 3302
trigger1 = animelem = 1
anim = 12002+(var(31)*10000)
pos = 0,0
postype = p1
sprpriority = 0
ownpal = 1
persistent = 0

[State 300, Land]
type = PlaySnd
trigger1 = anim = 3302
trigger1 = animelem = 1
value = 2+(var(32)*10),9
persistent = 0

[State 3000, EnvShake]
type = EnvShake
trigger1 = anim = 3302
trigger1 = animelem = 1
time = 14
freq = 180
ampl = -6
persistent = 0

[State 3035, 1]
type = AfterImage
trigger1 = anim = 3301
trigger1 = AnimElem = 1, =4
time = 999
length = 4
timegap = 2
framegap = 1
palbright = 0,0,32
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1
palcolor = 0
trans = add1

[State -3, AfterImage Persist]
type = AfterImageTime
trigger1 = anim = 3302
trigger1 = animelem = 1
time = 1
;=======================================; Vels && Movement
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 3301 && animelem = 1
x = 6

[State 1300, VelSet]
type = VelSet
trigger1 = anim = 3302 && animelem = 1
x = 0
;=======================================;Hitdef
[State 210, 1]
type = HitDef
trigger1 = anim = 3301
trigger1 = animelemtime(1) >= 0 && animelemtime(3) < 0
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 30
attr = S, HA
damage = 0,0
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
sparkno = s17002+(var(31)*10001)
sparkxy = -20, -64
hitsound = s3+(var(32)*2),3
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = Low
pausetime = 3,13
guard.pausetime = 3,12
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 24
ground.velocity = -4.5,-7
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
fall.yvelocity = -3
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = 0.5
air.fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
id = 3300

[State 1000, 7]
type = ChangeState
trigger1 = movehit && numtarget(3300)
value = 3301
ignorehitpause = 1
;================================================================================;End
[State 220,2]
type = ChangeState
trigger1 = Anim = 3302 && AnimTime = 0
value = 0
ctrl = 1
;================================================================================
;SDM Hishou Burai Ken Success
;================================================================================
[StateDef 3301]
type = s
MoveType = A
physics = N
VelSet = 0, 0
Anim = 3303
SprPriority = 2 
ctrl=0
;=======================================;Throw Mechanics
[State 801, Width]
type = Width
trigger1 = !Time
edge = 64,
[State 811]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,0
;=======================================;Binds && TargetStates
[State 801, fat]
type = Width
triggerall = anim = 3303 
trigger1 = animelemtime(1) >= 0 && animelemtime(68) < 0
edge = 80
[State 3020, bind]
type = TargetBind
triggerall = anim = 3303 
trigger1 = animelemtime(1) >= 0 && animelemtime(68) < 0
pos = 60, 0
ignorehitpause = 1

[State 801, fly p2]
type = TargetState
triggerall = anim = 3303 
trigger1 = animelem = 1
value = 4101
ignorehitpause = 1
[State 801, high]
type = TargetState
triggerall = anim = 3303 
trigger1 = animelemtime(9) = 2
trigger2 = animelemtime(12) = 2
trigger3 = animelemtime(45) = 2
trigger4 = animelemtime(54) = 2
trigger5 = animelemtime(59) = 2
trigger6 = animelemtime(67) = 2
value = 4100
ignorehitpause = 1
[State 801, low]
type = TargetState
triggerall = anim = 3303 
trigger1 = animelemtime(4) = 2
trigger2 = animelemtime(20) = 2
trigger3 = animelemtime(26) = 2
trigger4 = animelemtime(32) = 2
trigger5 = animelemtime(50) = 2
trigger6 = animelemtime(65) = 2
value = 4101
ignorehitpause = 1
;=======================================;Damage & Hits
[State 1201, HitAdd]
type = TargetLifeAdd
triggerall = anim = 3303 
trigger1 = animelemtime(4) = 0
trigger2 = animelemtime(9) = 0
trigger3 = animelemtime(12) = 0
trigger4 = animelemtime(20) = 0
trigger5 = animelemtime(26) = 0
trigger6 = animelemtime(32) = 0
trigger7 = animelemtime(45) = 0
trigger8 = animelemtime(50) = 0
trigger9 = animelemtime(54) = 0
trigger10 = animelemtime(59) = 0
trigger11 = animelemtime(65) = 0
trigger12 = animelemtime(67) = 0
value = -16
kill = 0

[State 1201, HitAdd]
type = HitAdd
triggerall = anim = 3303 
trigger1 = animelemtime(4) = 0
trigger2 = animelemtime(9) = 0
trigger3 = animelemtime(12) = 0
trigger4 = animelemtime(20) = 0
trigger5 = animelemtime(26) = 0
trigger6 = animelemtime(32) = 0
trigger7 = animelemtime(45) = 0
trigger8 = animelemtime(50) = 0
trigger9 = animelemtime(54) = 0
trigger10 = animelemtime(59) = 0
trigger11 = animelemtime(65) = 0
trigger12 = animelemtime(67) = 0
value = 1
;=======================================;Effects
[State 3200, AfterImageTime]
type = AfterImageTime
trigger1 = !time
time = 1

[State 3035, 1]
type = AfterImage
trigger1 = anim = 3304
trigger1 = AnimElem = 1, =4
time = 999
length = 4
timegap = 2
framegap = 1
palbright = 0,0,32
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1
palcolor = 0
trans = add1

[State 0, Explod];High
type = Explod
triggerall = anim = 3303 
trigger1 = animelemtime(9) = 0
trigger2 = animelemtime(12) = 0
trigger3 = animelemtime(45) = 0
trigger4 = animelemtime(54) = 0
trigger5 = animelemtime(59) = 0
trigger6 = animelemtime(67) = 0
anim = 17002+(var(31)*10001)
pos = 50,-88
postype = p1  
facing = 1
sprpriority = 3
[State 0, Explod];Mid
type = Explod
triggerall = anim = 3303 
trigger1 = animelemtime(4) = 2
trigger2 = animelemtime(20) = 2
trigger3 = animelemtime(26) = 0
anim = 17002+(var(31)*10001)
pos = 50,-48
postype = p1  
facing = 1
sprpriority = 3
[State 0, Explod];Low
type = Explod
triggerall = anim = 3303 
trigger1 = animelemtime(32) = 0
trigger2 = animelemtime(50) = 2
anim = 17002+(var(31)*10001)
pos = 50,-16
postype = p1  
facing = 1
sprpriority = 3

[State 13000, EnvColor]
type = EnvColor
triggerall = anim = 3303 
trigger1 = animelemtime(4) = 2
trigger2 = animelemtime(9) = 2
trigger3 = animelemtime(12) = 2
trigger4 = animelemtime(20) = 2
trigger5 = animelemtime(26) = 2
trigger6 = animelemtime(32) = 2
trigger7 = animelemtime(45) = 2
trigger8 = animelemtime(50) = 2
trigger9 = animelemtime(54) = 2
trigger10 = animelemtime(59) = 2
trigger11 = animelemtime(65) = 2
trigger12 = animelemtime(67) = 2
value = 248,248,248
time = 1
under = 1
ignorehitpause = 1
persistent = 1

[State 5100, 10]
type = PlaySnd
triggerall = anim = 3303 
trigger1 = animelemtime(4) = 0
trigger2 = animelemtime(9) = 0
trigger3 = animelemtime(12) = 0
trigger4 = animelemtime(20) = 0
trigger5 = animelemtime(26) = 0
trigger6 = animelemtime(32) = 0
trigger7 = animelemtime(45) = 0
trigger8 = animelemtime(50) = 0
trigger9 = animelemtime(54) = 0
trigger10 = animelemtime(59) = 0
trigger11 = animelemtime(65) = 0
trigger12 = animelemtime(67) = 0
value = 3+(var(32)*2),1+((random%4)*2)
channel = 4

[State 13000, EnvColor]
type = EnvColor
triggerall = anim = 3303 
trigger1 = numhelper
trigger1 = helper(247), var(1)=1
value = 248,248,248
time = 1
under = 1
ignorehitpause = 1
persistent = 1

[State 1050, PlaySnd]
type = PlaySnd
trigger1 = anim = 3303
trigger1 = animelem = 1
value = 200,19

[State 1050, PlaySnd]
type = PlaySnd
triggerall = anim = 3303
trigger1 = animelem = 60
value = 200,20
channel = 0

[State 1050, PlaySnd]
type = PlaySnd
trigger1 = anim = 3304
trigger1 = animelemtime(1) = 1
value = 2+(var(32)*10),12
;=======================================;Hitdef
[State 210, 1]
type = HitDef
triggerall = anim = 3303 
trigger1 = animelemtime(41)>= 0 && animelemtime(42) < 0
attr = S, HA
damage = floor(16*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 4, Hit
sparkno = s17002+(var(31)*10001)
sparkxy = -10, -92
hitsound = s3+(var(32)*2),9
guardsound = s3+(var(32)*2), 13
guard.sparkno = s17502+(var(31)*10000)
ground.type = low
pausetime = 16,16
guard.pausetime = 0,13
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 16
guard.ctrltime = 24
ground.velocity = -11.1796875
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
fall.yvelocity = -3
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = 0.5
air.fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0
p2stateno = 4105
kill = 0
ID = 3300
;================================================================================;Animations and Statetype
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = animtime = 0
trigger1 = anim = 3303 
value = anim+1

[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 3304
StateType = A
;=======================================; Vels && Movement
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 3304 && animelem = 1
y = -4
x = -10
[State 1300, VelAdd]
type = VelAdd
trigger1 = anim = 3304 && animelemtime(1) > 0
y = 0.5625  
[State 1300, VelMul]
type = VelMul
trigger1 = anim = 3304 && animelemtime(1) > 0
x = 0.9375
;=======================================;End
[State 1000, 6]
type = ChangeState
triggerall = statetype = A
trigger1 = Vel Y + Pos Y >= 0
value = stateno+1
ctrl = 0
;================================================================================
;SDM Hishou Burai Ken Land and Gadou Shokouken/If missed...GO FOR IT!!
;================================================================================
[StateDef 3302]
type = s
MoveType = A
VelSet = 0, 0
Anim = 3305
SprPriority = 2 
ctrl=0
;=======================================;Variables
[State 1000, VarSet]
type = VarSet
trigger1 = !time
var(15) = 4
;=======================================;Effects
[State 3200, AfterImageTime]
type = AfterImageTime
trigger1 = !time
time = 1
[State -3, land]
type = PlaySnd
trigger1 = !time
value =  (2+(var(32)*10))+var(41),2

[State 3303, Explod]
type = Explod
trigger1 = anim = 3308 && animelem =2
anim = 12004
pos = -24,0
postype = p1  ;p2,front,back,left,right
sprpriority = 3
ownpal = 1
persistent = 0
ignorehitpause = 1

[State 3035, 1]
type = AfterImage
trigger1 = anim = 3307
trigger1 = AnimElem = 1, =4
time = 999
length = 4
timegap = 2
framegap = 1
palbright = 0,0,32
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1
palcolor = 0
trans = add1

[State 3303, Explod]
type = Explod
triggerall = anim = 3305
trigger1 = animelem = 10
anim = 12006
pos = -24,0
postype = p1  ;p2,front,back,left,right
sprpriority = 3
ownpal = 1
ignorehitpause = 1
[State 1050, PlaySnd]
type = PlaySnd
triggerall = anim = 3305
trigger1 = animelemtime(10) = 1
value = 1000,13

[State 1050, PlaySnd]
type = PlaySnd
triggerall = anim = 3305
trigger1 = animelem = 1
value = 200,31
channel = 0

[State 1050, PlaySnd]
type = PlaySnd
triggerall = anim = 3307
trigger1 = animelem = 2
value = 200,45
channel = 0
persistent = 0

[State 1050, PlaySnd]
type = PlaySnd
triggerall = anim = 3309
trigger1 = animelem = 4
value = 200,47
channel = 0
persistent = 0

[State 200, snd]
type=playsnd
triggerall = anim = 3309
trigger1 = animelem = 4
value=1000,5
;=======================================;Helpers
[State 1000: Helper]
type = Helper
triggerall = anim = 3305
trigger1 = animelemtime(10) = 1
helpertype = Normal
name = "SDM Gadou Shokouken"
id = 3305
pos = 48, -80 ;50
postype = p1
facing = 1
stateno = 3320
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
;================================================================================;Animations and Statetype
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = animtime = 0  
triggerall = anim = 3305
trigger1 = numtarget(3300) 
trigger1 = target(3300),stateno = 4107
value = anim+2

[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = animtime = 0  
triggerall = anim = 3305
trigger1 = numtarget(3300)
trigger1 = target(3300),stateno != 4107
trigger2 = numtarget(3300) = 0
value = anim+1

[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = animtime = 0  
trigger1 = anim = 3307 || anim = 3309 || anim = 3310
value = anim+1

[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 3308
trigger1 = p2dist x <= 30
value = anim+1

[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 3310 || anim = 3311
Statetype = A 
;=======================================; Vels && Movement
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 3308 && animelem = 1
x = 6

[State 1300, VelSet]
type = VelSet
trigger1 = anim = 3309 && animelem = 1
x = 0

[State 1300, VelSet]
type = VelSet
trigger1 = anim = 3310 && animelem = 1
y = -6
[State 1300, VelAdd]
type = VelAdd
trigger1 = anim = 3310 && animelemtime(1) > 0
y = 0.5

[State 852, PosSet]
type = PosSet
trigger1 = !time
y = 0
;=======================================;End
[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
triggerall = anim = 3309
trigger1 = AnimElem = 5
attr = S, HA
damage = floor(58*ifelse(var(56),1.25,1)),8
animtype = Hard
air.animtype = back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 16, 16
guard.pausetime = 16,16
sparkno = s17002+(var(31)*10001)
sparkxy = -20, -92
hitsound = s3+(var(32)*2),9
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = low
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = 0
fall.yvelocity = -2.5
guard.velocity = -14.90625
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
id = 3100
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
air.fall = 1
fall.recover = 1
fall.recovertime = 120
persistent = 0

[State 210, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = anim = 3310 && animelem = 1
attr = A, HA
damage = floor(58*ifelse(var(56),1.25,1)),8
animtype = Up
air.animtype = Up
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 16, 16
guard.pausetime = 16,16
sparkno = s17002+(var(31)*10001)
sparkxy = -20,-108
hitsound = s2, 13
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -2,-17.25
guard.velocity = -14.90625
air.type = High
air.velocity = -2,-17.25
air.hittime = 13
air.juggle = 0
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 1
fall.recovertime = 120
p2stateno = 10030
envshake.ampl = -4      
envshake.freq = 180
envshake.time = 14 
id = 3100
persistent = 0
;=======================================;End
[State 1000, 6]
type = ChangeState
triggerall = statetype = A
trigger1 = Vel Y + Pos Y >= 0
value = stateno+1
ctrl = 0

[State 220,2]
type = ChangeState
trigger1 = anim = 3306
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;================================================================================
;SDM Hishou Burai Ken Landing
;================================================================================
[Statedef 3303]
type = S
movetype = I
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority = 2
;=======================================;Animations
[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = anim+1
;=======================================;Movements
[State 852, PosSet]
type = PosSet
trigger1 = !time
y = 0
;=======================================;Effects
[State 3200, AfterImageTime]
type = AfterImageTime
trigger1 = !time
time = 1
[State -3, land]
type = PlaySnd
trigger1 = !time
value =  (2+(var(32)*10))+var(41),2
;=======================================;End
[State 220,2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;================================================================================
;SDM Gadou Shokouken
;================================================================================
[Statedef 3320]
type = A
movetype = A
physics = N
ctrl = 0
ownpal = 1
sprpriority = 4
;=======================================;Movement
[State 1050, VelSet]
type = VarSet
trigger1 = !time && !prevstateno
var(15) = root,var(15)
[State 1050, VelSet]
type = VelSet
trigger1 = time = 1
x = var(15)
;=======================================;Animations
[State 1000, Anim]
Type = ChangeAnim
Trigger1 = !Time && !prevstateno 
Value = 3005
ignorehitpause = 1
;=======================================;Projectile Properties
[State -2, Damage Dampener]; Scaling in action
type= attackmulset
trigger1= 1
value= ifelse(root,var(51),0.63,1)
ignorehitpause= 1

[State 1000, projs only]
type = HitBy
trigger1 = 1
value = SCA, NP, SP, HP
ignorehitpause = 1
[State 10012, override]
type = HitOverride
trigger1 = !time
attr = SCA, AA, AP, AT
stateno = 3005
time = -1
ignorehitpause = 1

[State -2, Juggle Killer]
type = ParentVarSet
trigger1 = movehit && P2Statetype = A
trigger1 = var(18) > 1
var(16) = 60
ignorehitpause = 1
persistent = 0
[State -2, Juggle Killer]
type = ParentVarSet
trigger1 = movehit && P2Statetype = A
trigger1 = var(18) = 1
var(16) = ifelse(root,var(51),60,0)
ignorehitpause = 1
persistent = 0
[State -2, Air Limiter]
type = ParentvarSet
trigger1 = MoveContact && NumTarget
var(40) = 1
ignorehitpause = 1
persistent = 0
[State -2, FlagHitToParent]
type = ParentVarSet
trigger1 = MoveHit && NumTarget
var(58) = 20
ignorehitpause = 1
persistent = 0
[State -2, VarSet]
type = ParentVarSet
trigger1 = MoveContact && NumTarget
var(9) = 1
persistent = 0
ignorehitpause=1

[State -2, VarSet];Counter Hit Reset
type = ParentVarSet
trigger1 = root,var(57) >= 22 
var(57) = 0
ignorehitpause = 1

[State -2, DTC]
type = DisplayToClipboard
trigger1 = 1
text = "Hits = %d"
params = Var(18)
;=====================;Multihit Projectile Properties
[State 1015, VarSet]
type = VarSet
trigger1 = !time && !prevstateno
var(18) = 1
[State 1015, VarSet]
type = VarAdd
trigger1 = !time && prevstateno
var(18) = -1
ignorehitpause = 1
persistent = 0

[State 1005, End]
type=changeState
trigger1 = movecontact 
trigger2 = var(18) <= 0
value= ifelse(var(18)=0,3008,stateno)
;=====================;Timer Projectile Properties
[State -2, juggle decreasing]
type = varSet
trigger1 = !time && !prevstateno
var(19) = 28
ignorehitpause = 0

[State -2, juggle decreasing]
type = varSet
trigger1 = var(19)>0
var(19) = var(19)-1
ignorehitpause = 0
;=======================================;Effects
[State 1000, Sound]
type = PlaySnd
trigger1 = MoveContact && NumTarget
value = 3+(root,var(32)*2),ifelse(MoveHit,9,13)
persistent = 0
ignorehitpause = 1

[State 3000, ContactSpark]
type = Explod
trigger1 = MoveContact && NumTarget
anim = (ifelse(MoveHit,(17002+(root,var(31)*10001)),(17502+(root,var(31)*10000))))
ID = 1000
pos = 22 ,0
postype = p1
facing = 1
bindtime = 1
removetime = -2
sprpriority = 8
shadow = 0,0,0
ownpal = 1
persistent = 0
ignorehitpause = 1

[State 13000, EnvColor]
type = EnvColor
trigger1 = numtarget(3000) && movehit
value = 255,255,255
time = 1
under = 1
ignorehitpause = 1
persistent = 0

[State -2, Helper]
type = Helper
trigger1 = !numhelper(50000) && !numhelper(50001)
trigger1 = WinKO
helpertype = normal
name = "K.O."
ID = 50001
stateno = 50000
pos = 160,120
postype = left    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

[State 1050, Trans]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 166,94
ignorehitpause = 1
[State 65000: AfterImage]
type = AfterImage
trigger1 = (!Time)
time = 9999999
length = 12
palbright = 12,12,12;,136
palcontrast = 120,120,120;,136
paladd = 0,0,0
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1
[State 7001, Assert]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
;=======================================;Hitdefs
[State 210, 1]
type = HitDef
triggerall = var(18) = 1
triggerall = root,var(40) < 1 || root,var(57) > 0 || root,var(16) > 0
trigger1 = (animelemno(0) = [1,3])
attr = S, HP
damage = floor(225*ifelse(root,var(56),1.25,1)),8 ;225
animtype = U
air.animtype = U
ground.type = Low
guardflag = M
hitflag = MAF
priority = 5, Hit
sparkno = -1
sparkxy = 0, -80
hitsound = -1
guardsound = -1
guard.sparkno = -1
pausetime = 1,15
guard.pausetime = 1,15
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = -4.5,-7
guard.velocity = -11.1796875
air.type = High
air.velocity = -4.5,-7
air.hittime = 13
getpower = 0,0
givepower = 16,16
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
persistent = 0
fall = 1
fall.recover = 1
fall.recovertime = 120
hitonce = 1
id = 3000
p1sprpriority = 4
p2stateno = 10400
;=======================================;End
[State 1000, DestroySelf]
type = DestroySelf
triggerall = time > 1
trigger1 = FrontEdgeDist <= -40
[State 1005, End]
type=changeState
trigger1= movecontact
trigger2=var(19) = 0
value=3008
persistent = 0
;=======================================;Recovery for target
[State -2, P2 Safe Fall]
type = TargetState
trigger1 = NumTarget = 1
trigger1 = Target, command = "recovery"
trigger1 = Target, pos y >= -30 && Target, vel y > 0
trigger1 = Target, Alive && Target, HitFall && Target, GetHitVar(fall.recover)
trigger1 = Target, StateNo = 5030 || Target, StateNo = 5035 || Target, StateNo = 5050 || Target, StateNo = 5071
value = 5205
ignoreHitPause = 1
;================================================================================
;Auto Combo Get Hits
;================================================================================
[Statedef 4100]
type = S
physics = N
movetype = H
ctrl = 0
velset = 0,0
facep2 = 1
[State 2000, 0]
type = HitBy
trigger1 = 1
value = SCA,HA
[State 0, HitFallSet]
type = HitFallSet
trigger1 = 1
value = 0
[State 0, PosSet]
type = posset
trigger1 = time = 0
y = 0
[State 3100, 2]
type = Velset
trigger1 = 1;!gethitvar(isbound)
x = 0
[State 0, ChangeAnim2]
type = ChangeAnim
trigger1 = time = 0
value = 5002
[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 5002 && !animtime
value = 5007
[State 0, ChangeAnim2]
type = SelfState
trigger1 = time = 100
value = 0
ctrl = 1
[Statedef 4101]
type = S
physics = N
movetype = H
ctrl = 0
velset = 0,0
facep2 = 1
[State 2000, 0]
type = HitBy
trigger1 = 1
value = SCA,HA
[State 0, HitFallSet]
type = HitFallSet
trigger1 = 1
value = 0
[State 0, PosSet]
type = posset
trigger1 = time = 0
y = 0
[State 3100, 2]
type = Velset
trigger1 = 1;!gethitvar(isbound)
x = 0
[State 0, ChangeAnim2]
type = ChangeAnim
trigger1 = time = 0
value = 5012
[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 5012 && !animtime
value = 5017
[State 0, ChangeAnim2]
type = SelfState
trigger1 = time = 100
value = 0
ctrl = 1

; Stand get-hit (shaking)
[Statedef 4105]
type    = S
movetype= H
physics = N
velset = 0,0

[State 5000, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = ifelse((GetHitVar(groundtype) = 1),5000,5010) + GetHitVar(animtype)

[State 5000, 2] ;Anim for HIT_BACK
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5030

[State 5000, 3] ;Anim for HIT_UP/HIT_DIAGUP (only if it exists)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) ;5051 - 4 + type

[State 5000, 4] ;Freeze anim
type = ChangeAnim
trigger1 = Time > 0
value = anim

[State 5000, 5] ;State type gets set to aerial if getting hit up
type = StateTypeSet
trigger1 = Time = 0
trigger1 = GetHitVar(yvel) != 0 || GetHitVar(fall)
trigger2 = Pos Y != 0
statetype = a

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

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

[State 5000, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5012
trigger2 = anim = 5002
trigger3 = anim = 5030
persistent = 0
time = 15
waveform = sinesquare
ampl = 140

[State 5000, 6]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0 && !GetHitVar(fall)
value = 4106
;---------------------------------------------------------------------------
; Stand get-hit (knocked back)
[Statedef 4106]
type    = S
movetype= H
physics = S

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

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

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

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

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

[State 5001, 6]
type = ChangeState
trigger1 = HitOver
value = 4107

[StateDef 4107]
type = s
MoveType = H
VelSet = 0, 0
Anim = 5300
SprPriority = 2 
ctrl=0

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

[State 2000, 0]
type = HitBy
trigger1 = 1
value = SCA,HA,HP

[State 1001, end]
type = SelfState
trigger1 = time = 700
value = 0
ctrl = 1 

;================================================================================
;Otoko Michi
;================================================================================
[Statedef 3400]
type    = S                      
movetype= A                    
physics = N                     
juggle  = 0             
ctrl = 0                       
poweradd=  ifelse(var(51),-1000,-3000)                       
sprpriority = 2 
velset=0,0
facep2 = 1
;================================================================================;Superpause and Effects
[State 300, End MAXMODE]
type = VarSet
trigger1 = !time
var(51) = 0
ignorehitpause = 1

[State 2000, VarSet]
type = VarSet
trigger1 = time = 0 ;Superpause tick error fix.
var(6) = 30

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 0
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 220,0,10;255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State -2, PalFX]
type = PalFX
triggerall = var(31) = 1
trigger1 = prevstateno = [1000,1500]
trigger1 = time < 17
time = 1
add = 255,255,255
sinadd = 0,0,0
invertall = 0
color = 256
ignorehitpause = 1
persistent = 2

[State 1000: Helper]
type = Helper
triggerall = var(31) = 0
trigger1 = !numhelper(40000)
trigger1 = prevstateno = [1000,1500]
helpertype = Normal
name = "SuperCancel"
id = 40000
pos = 0, 0 ;50
postype = left
facing = 1
stateno = 40000
keyctrl = 0
ownpal = 1
ontop = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
ignorehitpause = 1
persistent = 0

[State 2010, AssertSpecial]
type = AssertSpecial
trigger1 = time = [1,30]
flag = noBG
flag2 = noFG

[State 13000, EnvColor]
type = EnvColor
trigger1 = time = 1
value = 255,255,255
time = 4
under = 1
ignorehitpause = 1
persistent = 0

[State 2010, Pause]
Type = SuperPause
trigger1 = time = 1
Time = 28
movetime = 28
anim = -1
sound = s3,11+(var(32)*4)
Pos = 14, -88
Darken = 0
UnHittAble = 1
p2defmul = 1

[State 6001, pause]
type = Explod
trigger1 = time = 1
anim = 15400+(var(31)*100)
pos = -12,-85
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = -2
ownpal = 1
[State 6001, pause]
type = Explod
trigger1 = time = 1
anim = 15401+(var(31)*100)
pos = -12,-85
postype = p1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
supermove = 1
removetime = 28
sprpriority = 4
ownpal = 1

[State -2, Helper]
type = Helper
triggerall = !numhelper(40001)
trigger1 = time = 29
helpertype = normal
name = "HSDM"
ID = 40001
stateno = 40001
pos = 160,120
postype = left    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

[State -2, Helper]
type = Helper
triggerall = !numhelper(40003)
trigger1 = time = 13
helpertype = normal
name = "H.Port"
ID = 40003
stateno = 40003
pos = 160,120
postype = left    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1
ignorehitpause = 1

[State 2000, 0]
type = NotHitBy
trigger1 = anim = 3400 || anim = 3401
value = SCA
;================================================================================;Animations and Statetype
[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 3400
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = animtime = 0
trigger1 = anim = 3400 || anim = 3401
value = anim+1

[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 3402 && animelem = 1
Movetype = I 
;=======================================;Effects
[State 200, snd]
type=playsnd
trigger1 = anim = 3400
trigger1= animelem=1 
value=200,31
channel=0 
;=======================================; Vels && Movement
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 3401 && animelem = 1
x = 3.5

[State 1300, VelSet]
type = VelSet
trigger1 = anim = 3402 && animelem = 1
x = 0
;=======================================;Hitdef
[State 11040, 1]
type = HitDef
triggerall = p2stateno != 40 && p2stateno !=52 ; Cannot grab during jump start / jump land
triggerall = var(19) = 0 ; Opponent isn't in guarding state
triggerall = anim = 3401
Trigger1 = animelem = 1
attr = S, ST          
hitflag = M         
priority = 1, Miss   
sparkno = -1         
p1sprpriority = 1                     
p1facing = 1
p2facing = 1          
p1stateno = 3401
p2stateno = 3403
ground.velocity = 0,0
guard.dist = 0       
fall = 1              
ID = 3400
numhits=0
air.animtype = back
fall.xvelocity = -2.5
fall.yvelocity = -4
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
;================================================================================;End
[State 220,2]
type = ChangeState
trigger1 = Anim = 3402 && AnimTime = 0
value = 0
ctrl = 1
;================================================================================
;Otoko Michi Success (I DID IT, FATHER)
;================================================================================
[Statedef 3401]
type    = S
movetype= A
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
sprpriority = 2
;=======================================;Throw Mechanics
[State 801, Width]
type = Width
trigger1 = !Time
edge = 64,
[State 811]
type = ScreenBound
trigger1 = anim = 3403
value = 1
movecamera = 1,0
;=======================================;Binds
[State 810, bind]
type = TargetBind
trigger1 = anim = 3403 
trigger1 = animelemtime(1) >= 0 && animelemtime(3) < 0
ID = 3400
pos = 68, 0
[State 810, bind]
type = TargetBind
trigger1 = anim = 3403 
trigger1 = animelemtime(3) >= 0 && animelemtime(4) < 0
ID = 3400
pos = 60, 0
[State 810, bind]
type = TargetBind
trigger1 = anim = 3403 
trigger1 = animelemtime(4) >= 0 && animelemtime(5) < 0
ID = 3400
pos = 56, 0
[State 810, bind]
type = TargetBind
trigger1 = anim = 3403 
trigger1 = animelemtime(5) >= 0 && animelemtime(6) < 0
ID = 3400
pos = 40, 0
[State 810, bind]
type = TargetBind
trigger1 = anim = 3403 
trigger1 = animelemtime(6) >= 0 && animelemtime(7) < 0
ID = 3400
pos = 20, 0
[State 810, bind]
type = TargetBind
trigger1 = anim = 3403 
trigger1 = animelemtime(7) >= 0 && animelemtime(8) < 0
ID = 3400
pos = 7, 0
;=======================================;Damage/TargetStates
[State 801, Damage]
Type = TargetLifeAdd
Trigger1 = animelem = 8
value = -550
ID = 3400
absolute = 1
[State 801, Damage]
Type = LifeAdd
Trigger1 = animelem = 8
value = -1000
absolute = 1
kill = 0
;================================================================================;Animations and Statetype
[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 3403

[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = animtime = 0
trigger1 = anim = 3403 || anim = 3404
value = anim+1

[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 3404 || anim = 3405
StateType = A
;=======================================; Vels && Movement
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 3404 && animelem = 1
x = -4.5
y = -12
[State 1300, VelAdd]
type = VelAdd
trigger1 = anim = 3404 && animelemtime(1) > 0
trigger2 = anim = 3405 && animelemtime(1) >= 0
y = 0.5
;=======================================;Effects
[State 805, Grab Spark]
type = Explod
trigger1 = anim = 3403
trigger1 = animelem = 2
anim = 20001
pos = 83, -43
postype = p1
SprPriority = 0
ownpal = 1
supermovetime = 999
pausemovetime = 999
[State 5100, Grabsnd]
type = PlaySnd
trigger1 = anim = 3403
trigger1 = animelem = 2
value = 2+(var(32)*10), 1
[State 5100, Boom]
type = PlaySnd
trigger1 = anim = 3403
trigger1 = animelem = 8
value = 4,3
[State 200, OYAJI]
type=playsnd
trigger1 = anim = 3403
trigger1= animelem=5 
value=200,32
channel=0 

[State 13000, EnvColor]
type = EnvColor
trigger1 = anim = 3403
Trigger1 = animelemtime(8) = 1
value = 255,255,255
time = 1
under = 1
ignorehitpause = 1
persistent = 0

[State 220, Explod]
type = Explod
trigger1 = anim = 3403
Trigger1 = animelem = 8
anim = 12515
pos = 0, -80
postype = p1  ;p2,front,back,left,right
facing = -1
bindtime = 1
removetime = -2
sprpriority = 4
ownpal = 1
removeongethit = 0
ignorehitpause = 1
persistent = 1

[State 920, 1]
type = SprPriority
trigger1 = anim = 3403
trigger1 = animelem = 6
value = -2

[State 3000, EnvShake]
type = EnvShake
trigger1 = anim = 3403
Trigger1 = animelem = 8
time = 14
freq = 180
ampl = -6
persistent = 0

[State 1000: Helper]
type = helper
triggerall = !NumHelper(12506)
triggerall = numhelper(247)
trigger1 = time > 74
helpertype = Normal
name = "Normal Expl"
id = 12506
pos = 0, 0 ;50
postype = p2
facing = 1
stateno = 12506
keyctrl = 0
ownpal = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
persistent = 0
ignorehitpause = 1
size.shadowoffset = target,ID
[State 1000: Helper]
type = helper
triggerall = !NumHelper(12507)
triggerall = numhelper(247)
trigger1 = time > 74
helpertype = Normal
name = "Pyro Expl"
id = 12507
pos = 0, 0 ;50
postype = p2
facing = 1
stateno = 12507
keyctrl = 0
ownpal = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
persistent = 0
ignorehitpause = 1
size.shadowoffset = target,ID
[State 1000: Helper]
type = helper
triggerall = !NumHelper(12508)
triggerall = numhelper(247)
trigger1 = time > 74
helpertype = Normal
name = "Multi Small Expl"
id = 12508
pos = 0, 0 ;50
postype = p2
facing = 1
stateno = 12508
keyctrl = 0
ownpal = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
persistent = 0
ignorehitpause = 1
size.shadowoffset = target,ID
[State 1000: Helper]
type = helper
triggerall = !NumHelper(12509)
triggerall = numhelper(247)
trigger1 = time > 74
helpertype = Normal
name = "Small Expl"
id = 12509
pos = 0, 0 ;50
postype = p2
facing = 1
stateno = 12509
keyctrl = 0
ownpal = 1
supermovetime = 9999999999999999
pausemovetime = 9999999999999999
persistent = 0
ignorehitpause = 1
size.shadowoffset = target,ID
;=======================================;End
[State 1000, 6]
type = ChangeState
triggerall = statetype = A
trigger1 = Vel Y + Pos Y >= 0
value = stateno+1
ctrl = 0
;================================================================================
;Otoki Michi Landing
;================================================================================
[Statedef 3402]
type = S
movetype = I
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority = 1
;=======================================;Animations
[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = anim+1
;=======================================;Movements
[State 852, PosSet]
type = PosSet
trigger1 = !time
y = 0
;=======================================;Effects
[State 811]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,0
[State 3303, Explod]
type = Explod
trigger1 = !time
anim = 12001+(var(31)*10000)
pos = 0,0
postype = p1
sprpriority = 2
ownpal = 1
persistent = 0

[State 3303, Explod]
type = Explod
trigger1 = !time
anim = 12002+(var(31)*10000)
pos = 0,0
postype = p1
sprpriority = 0
ownpal = 1
persistent = 0

[State 300, Land]
type = PlaySnd
trigger1 = !time
value = 2+(var(32)*10),9
persistent = 0

[State 3000, EnvShake]
type = EnvShake
trigger1 = !time
time = 14
freq = 180
ampl = -6
persistent = 0
;=======================================;End
[State 220,2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;================================================================================
;Otoko Michi Get Hits
;================================================================================
[StateDef 3403]
Type = A
MoveType =  H
VelSet = 0, 0
sprpriority = -1 
Ctrl = 0
;=======================================;Animations
[State 9] 
type = ChangeAnim2
trigger1 = !time
persistent = 0
value = 3407
;=======================================;ScreenBound
[State 811]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,0
;=======================================;End
[State 820, 2];
type = ChangeState
trigger1 = animtime = 0
value = 3404
;================================================================================
[StateDef 3404]
Type = A
MoveType =  H
sprpriority = -1 
Ctrl = 0
;=======================================;ScreenBound/HitBy
[State 245]
type = Nothitby
trigger1 = 1
value = SCA
;=======================================;Animations
[State 5050, 2] ;Coming down anim
type = ChangeAnim
trigger1 = anim = [5050,5059]
trigger1 = Vel Y >= ifelse(anim = 5050, 1, -2);ifelse(anim = 5050, Const720p(4), Const720p(-8))
trigger1 = SelfAnimExist(anim+10)
value = anim+10
persistent = 0

[State 811, Anim]
Type = ChangeAnim
Trigger1 = time < 26
Value = ifelse(SelfAnimExist(5051),5051,5030)
[State 811, Anim]
Type = ChangeAnim
Trigger1 = time = 26
Value = ifelse(SelfAnimExist(5061),5061,5050)
;=======================================;Movements
[State 1040, go]
type = PosAdd
Trigger1 = !time
y = -1
[State 903, VelSet]
type = VelSet
trigger1 = time = 0
x = -1.5
y = -12
[State 1040, go]
type = VelAdd
trigger1 = time > 0
y = 0.5
;=======================================;Effects
[State -2, PalFX]
type = PalFX
trigger1 = !time 
time = 55
add = 231,79,0
sinadd = 40,30,0,10
invertall = 0
color = 128 
ignorehitpause = 1
persistent = 2
;=======================================;End
[State 3000, EnvShake]
type = EnvShake
Trigger1 = vel y > 0 && pos y >= 0
time = 14
freq = 180
ampl = -6
persistent = 0

[State 811, 2]
type = SelfState
Trigger1 = vel y > 0 && pos y >= 0
value = 5100

