;================================================================================
; SPECIALS
;================================================================================
;Monster Lariat
[Statedef 1000]
type    = S
movetype= A
physics = N
poweradd= 109
ctrl = 0
velset = 0
sprpriority = 2
juggle = 8
facep2 = 1
;=======================================;Button Check
[State 1000, VarSet]
type = VarSet
trigger1 = !time
var(5) = ifelse((helper(10371), var(3) = [1,3]),0,1) 
[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = ifelse(var(5)=0,1000,1010)
;=======================================;Variables
;=======================================;Animations/Statetypes
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 1000 || anim = 1010
value = anim+1
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime || animelemtime(1)>0 && P2bodydist X <= 48 
trigger1 = anim = 1001 || anim = 1011
value = anim+1
[State 1500, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1002 && animelem = 5
trigger2 = anim = 1012 && animelem = 5
movetype = I
;=======================================; Vels && Movement
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1001 && animelem = 1
trigger2 = anim = 1011 && animelem = 1
x = ifelse(anim=1001,6,8)

[State 1300, PosAdd]
type = PosAdd
trigger1 = anim = 1002 && animelem = 1
trigger2 = anim = 1012 && animelem = 1
x = ifelse(anim=1002,6,8)

[State 1500, VelMul] 
type = VelMul
trigger1 = anim = 1002 && animelemtime(1)> 0
trigger2 = anim = 1012 && animelemtime(1)> 0
x = 0.920822143554688

[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1002 && animelem = 5
trigger2 = anim = 1012 && animelem = 7
x = 0
;=======================================;Effects
[State 3303, Explod]
type = Explod
trigger1 = anim = 1000 && animelem = 1
trigger2 = anim = 1010 && animelem = 1
anim = 12004
pos = -24,0
postype = p1  ;p2,front,back,left,right
sprpriority = 3
ownpal = 1
facing = 1
persistent = 0
persistent = 0
[State 3000, EnvShake]
type = EnvShake
trigger1 = anim = 1001 || anim = 1011
trigger1 = animelem = 2
trigger2 = anim = 1001 || anim = 1011
trigger2 = animelem = 6
trigger3 = anim = 1002 || anim = 1012
trigger3 = animelem = 4
time = 4
freq = 180
ampl = -4
[State 300, Land]
type = PlaySnd
trigger1 = anim = 1001 || anim = 1011
trigger1 = animelem = 2
trigger2 = anim = 1001 || anim = 1011
trigger2 = animelem = 6
trigger3 = anim = 1002 || anim = 1012
trigger3 = animelem = 4
channel = 4
value = 2+(var(32)*10),9
[State 5100, 10]
type = PlaySnd
trigger1 = anim = 1002 || anim = 1012
trigger1 = animelem = 1
value = 3+(var(32)*2),8-(var(32)*2)

[State 200, snd]
type=playsnd
trigger1 = anim = 1002 || anim = 1012
trigger1 = animelem = 1
value=200,5
channel=0  
;=======================================;HitDef
[State 1035, 9]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = anim = 1002
trigger1 = AnimElemtime(4) >= 0 && Animelemtime(5) < 0
attr = S, SA    
animtype = hard 
damage = floor(33*ifelse(var(56),1.25,1)),8
guardflag = M   
hitflag = MAF  
hitsound = s3+(var(32)*2),9
guardsound = s3+(var(32)*2), 12              
sparkno = s17002+(var(31)*10000)
sparkxy = -10, -101   
guard.sparkno = s17502+(var(31)*10000)   
priority = 5, Hit                                          
pausetime = 25, 26
guard.pausetime = 12,12
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 24                                                                  
ground.velocity = 0,6
guard.velocity = -11.1796875
ground.type = low
air.type = High
air.velocity = 0,10
air.hittime = 2
air.juggle = 0
getpower = 47,47
givepower = 16,16
p2stateno = 10160
fall = 1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = 0.5
persistent = 0
fall.xvelocity = -2*(p2statetype=A)
fall.yvelocity = -2-(p2statetype=A)*4 
id = 1000
;nochainid = 1000
envshake.ampl = -4      
envshake.freq = 180
envshake.time = 14 

[State 1035, 9]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = anim = 1012
trigger1 = AnimElemtime(4) >= 0 && Animelemtime(5) < 0
attr = S, SA    
animtype = hard 
damage = floor(125*ifelse(var(56),1.25,1)),8
guardflag = M   
hitflag = MAF  
hitsound = s3+(var(32)*2),9
guardsound = s3+(var(32)*2), 12              
sparkno = s17002+(var(31)*10000)
sparkxy = -10, -101 
guard.sparkno = s17502+(var(31)*10000)   
priority = 5, Hit                                          
pausetime = 25, 26
guard.pausetime = 12,12
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 24                                                                  
ground.velocity = 0,6
guard.velocity = -11.1796875
ground.type = low
air.type = High
air.velocity = 0,10
air.hittime = 2
air.juggle = 0
getpower = 47,47
givepower = 16,16
p2stateno = 10160
fall = 1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = 0.5
persistent = 0
fall.xvelocity = -2*(p2statetype=A)
fall.yvelocity = -2-(p2statetype=A)*4 
id = 1000
;nochainid = 1000
envshake.ampl = -4      
envshake.freq = 180
envshake.time = 14 
;=======================================;End
[State 220,2]
type = ChangeState
triggerall = anim = 1002 || anim = 1012
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;MONSTER LARIAT GET HIT~
[Statedef 10160]
type    = A
movetype= H
physics = N
ctrl = 0

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

[State 1040, go]
type = PosAdd
Trigger1 = vel y > -20
Trigger1 = !time
y = -40
ignorehitpause = 1   
  
[State 1250, ChangeAnim]
type = ChangeAnim
trigger1 = !hitshakeover;
value = 5030
 
[State 5030, 2]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1
 
[State 1107, PosFreeze]
type = PosFreeze
trigger1 = 1
value = 1
 
[State 5030, 4]
type = ChangeState
trigger1 = HitShakeOver
trigger2 = Vel Y > 0    ;Hit ground
trigger2 = Pos Y >= 10  ;.
value = 10161

[Statedef 10161]
type    = A
movetype= H
physics = N

[State 1040, go]
type = PosAdd
Trigger1 = !time
x = 20
ignorehitpause = 1   

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

[State 5050, 1] ;Change anim when done with transition
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = Anim = 5035
trigger2 = Time = 0     ;If no transition anim
trigger2 = Anim != 5035
trigger2 = (Anim != [5051, 5059]) && (Anim != [5061, 5069]) 
trigger2 = Anim != 5090 ;Not if hit off ground anim
value = 5050

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

[State 5050, 2] ;Coming down anim
type = ChangeAnim
trigger1 = anim = [105050,105059]
trigger1 = Vel Y >= ifelse(anim = 105050, 1, -2)
trigger1 = SelfAnimExist(anim+10)
value = anim+10
persistent = 0

[State 5050, 6]
type = ChangeState
trigger1 = Vel Y + Pos Y >= 0
value = 10162

;---------------------------------------------------------------------------
; HIT_BOUNCE (hit ground)
[Statedef 10162]
type    = L
movetype= H
physics = N

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

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

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

[State 3000, EnvShake]
type = EnvShake
trigger1 = Time = 0
time = 14
freq = 180
ampl = -4
persistent = 0

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

[State 5100, 2] ;Hit ground anim (normal)
type = ChangeAnim2
trigger1 = !time
value = 10062
[State 5100, 2] ;Hit ground anim (normal)
type = ChangeAnim
trigger1 = !time
trigger1 = SelfAnimExist(5430)
value = 5430
[State 5100, 2] ;Hit ground anim (normal)
type = ChangeAnim
triggerall = Name = "cvsfelicia" && authorname = "Jesuszilla"
trigger1 = !time
value = 5100

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

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

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

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

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

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

[State 5100, 12]
type = ChangeState
trigger1 = time = 5
value = stateno + 101

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

;---------------------------------------------------------------------------
; HIT_BOUNCE (bounce into air)
[Statedef 10263]
type    = L
movetype= H
physics = N

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

[State 5101, 1] ;Coming hit ground anim (normal)
type = ChangeAnim
trigger1 = animtime = 0
value = 5160

[State 1207, VelSet]
type = VelSet
triggerall = numenemy
trigger1 = time = 0
x = 0
y = -5.375

[State 5101, 4]
type = PosSet
trigger1 = !time
y = 0

[State 5101, 5] ;Acceleration
type = VelAdd
trigger1 = time > 0
y = 0.625

[State 5101, 6] ;Hit ground
trigger1 = time > 0
trigger1 = Vel Y + Pos Y >= 0
type = ChangeState
value = stateno-100
;================================================================================
;Shootdown Backbreaker
;================================================================================
[Statedef 1100]
type    = A
movetype= A
physics = N
poweradd= 109
ctrl = 0
velset = 0
sprpriority = 2
juggle = 8
facep2 = 1

[State 1000, VarSet]
type = VarSet
trigger1 = !time
var(5) = ifelse((helper(10371), var(3) = [1,3]),0,1) 

[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = ifelse(var(5)=0,1100,1110)
;=======================================;Animations and Statetype
[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = !animtime
trigger1 = anim = 1100 || anim = 1110
value = anim +1 
;=======================================; Vels && Movement
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1100 || anim = 1110
trigger1 = animelem = 1
x = ifelse(anim=1100,2.5,6)
y = -6.625
[State 1300, VelAdd]
type = VelAdd
trigger1 = anim = 1100 && animelemtime(1) > 0
trigger2 = anim = 1101 && animelemtime(1) > 0
trigger3 = anim = 1110 && animelemtime(1) > 0
trigger4 = anim = 1111 && animelemtime(1) > 0
y = 0.375
;=======================================;Effects
[State -2, Afterimage Remover]
type = AfterImageTime
trigger1 = !time
time = 0

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

[State 40, PlaySnd]
type = PlaySnd
trigger1 = anim = 1100 || anim = 1110
trigger1 = animelem = 1
value = 12,4
;=======================================;Hitdefs
[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
Trigger1 = anim = 1100
Trigger1 = animelemtime(4)>= 0
Trigger2 = anim = 1110
Trigger2 = animelemtime(4)>= 0 
attr = A, ST          
hitflag = AF        
priority = 1, Miss   
sparkno = -1         
p1sprpriority = 1                     
p1facing = 1
p2facing = 1          
p1stateno = 1102
p2stateno = 1104
ground.velocity = 0,0
guard.dist = 0       
fall = 1              
ID = 1100
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 1000, 6]
type = ChangeState
triggerall = statetype = A
trigger1 = Vel Y + Pos Y >= 0
value = stateno+1
ctrl = 0
;================================================================================
;Shootdown Backbreaker Landing
;================================================================================
[Statedef 1101]
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 0, EnvShake]
type = EnvShake
trigger1 = animelem = 1
time = 14
ampl = -4
freq = 180
[State 3303, Explod]
type = Explod
trigger1 = animelem = 1
anim = 12000
pos = 0,0
id = 12000
postype = p1  ;p2,front,back,left,right
sprpriority = 0
ownpal = 1
persistent = 0
[State 300, Land]
type = PlaySnd
trigger1 = animelem = 1
value = 2+(var(32)*10),9
;=======================================;End
[State 220,2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;================================================================================
;"BACK......
;================================================================================
[StateDef 1102]
type = A
MoveType = A
Physics = N
VelSet = 0,0
Anim = 1103
SprPriority = 0
ctrl = 0
;=======================================;Binds/Width
[State 801, fat]
type = Width
trigger1 = animelem = 1
edge = 56,40
[State 810, target]
type = targetbind
trigger1 = animelemtime(1) >= 0 && animelemtime(3) < 0
pos = 81, -121
ID = 1100
[State 810, target]
type = targetbind
trigger1 = animelemtime(3) >= 0 && animelemtime(4) < 0
pos = 40, -123
ID = 1100
[State 810, target]
type = targetbind
trigger1 = animelemtime(4) >= 0 && animelemtime(5) < 0
pos = 11, -154
ID = 1100
[State 810, target]
type = targetbind
trigger1 = animelemtime(5) >= 0 && animelemtime(6) < 0
pos = 5, -155
ID = 1100
[State 810, target]
type = targetbind
trigger1 = animelemtime(6) >= 0 && animelemtime(7) < 0
pos = 2, -168
ID = 1100
[State 810, target]
type = targetbind
trigger1 = animelemtime(7) >= 0 && animelemtime(8) < 0
pos = 15, -189
ID = 1100
[State 810, target]
type = targetbind
trigger1 = animelemtime(8) >= 0
pos = 2, -200
ID = 1100
;=======================================;Vels and Movement
[State 1030, 1]
type = VelSet
trigger1 = animelem = 1
X = 0
[State 1030, 1]
type = VelAdd
trigger1 = animelemtime(2) > 0 
Y = 0.375
;=======================================;Effects
[State 805, hitspark]
type = Explod
trigger1 = animelem = 1
anim = 20001
pos = 80, -108
postype = p1
SprPriority = 0
ownpal = 1
supermovetime = 999
pausemovetime = 999
[State 5100, Grabsnd]
type = PlaySnd
trigger1 = animelem = 1
value = 2+(var(32)*10), 0
[State 200, snd]
type=playsnd
trigger1 = animelem = 1
value=200,6
channel=0  

[State 10900, VarSet]
type = VarSet
trigger1 = !time
var(16) = 0
;=======================================;End
[State 801, 10]
type = ChangeState
Triggerall = animelemtime(1) > 0 
trigger1 = Vel Y + Pos Y >= 0
value = stateno + 1
;================================================================================
;".....BREAKERRRRR"
;================================================================================
[StateDef 1103]
type = s
MoveType = A
Physics = N
VelSet = 0,0
SprPriority = 0
ctrl = 0
;=======================================;Animations and Statetype
[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 1105
;=======================================;Movements
[State 852, PosSet]
type = PosSet
trigger1 = !time
y = 0
;=======================================;Effects
[State 220, Explod]
type = Explod
Trigger1 = animelem = 1
anim = 17002+(var(31)*10000)
pos = -8, -130
postype = p1  ;p2,front,back,left,right
facing = -1
bindtime = 1
removetime = -2
sprpriority = 4
ownpal = 1
removeongethit = 0
ignorehitpause = 1
persistent = 1

[State 1201, HitAdd]
type = HitAdd
Trigger1 = animelem = 1
value = 1

[State 0, EnvShake]
type = EnvShake
trigger1 = animelem = 1
time = 14
ampl = -4
freq = 180

[State 5100, Grabsnd]
type = PlaySnd
trigger1 = animelem = 1
value = 1000, 0

[State 200, Sound]
type = Playsnd
trigger1 = animelem = 10
value = 2+(var(32)*10),10

[State 200, Sound]
type = Playsnd
trigger1 = animelem = 1
value = 3+(var(32)*2),7
[State 300, Land]
type = PlaySnd
trigger1 = animelem = 1
value = 2+(var(32)*10),9
[State 3303, Explod]
type = Explod
trigger1 = animelem = 1
anim = 12001+(var(31)*10000)
pos = -4,0
postype = p1  ;p2,front,back,left,right
sprpriority = 2
ownpal = 1
persistent = 0
[State 3303, Explod]
type = Explod
trigger1 = animelem = 1
anim = 12002+(var(31)*10000)
pos = -4,0
postype = p1  ;p2,front,back,left,right
sprpriority = 0
ownpal = 1
persistent = 0
;=======================================;Damage
[State 801, Damage]
Type = TargetLifeAdd
trigger1 = animelem = 1
value = ((ifelse(var(51),-180,-225))+(var(23)*150))-(var(5)*20)
;=======================================;Binds/Width
[State 801, fly p2]
type = TargetState
trigger1 = animelem = 1
value = 1106
ID = 1100
ignorehitpause = 1
[State 810, bind]
type = TargetBind
trigger1 = animelemtime(1) >= 0 && animelemtime(2) < 0
pos = 9, -100
ID = 1100
[State 810, bind]
type = TargetBind
trigger1 = animelemtime(2) >= 0 && animelemtime(3) < 0
pos = 9, -116
ID = 1100
[State 810, bind]
type = TargetBind
trigger1 = animelemtime(3) >= 0 && animelemtime(5) < 0
pos = 9, -122
ID = 1100
[State 810, bind]
type = TargetBind
trigger1 = animelemtime(5) >= 0 && animelemtime(6) < 0
pos = 17, -126
ID = 1100
[State 810, bind]
type = TargetBind
trigger1 = animelemtime(6) >= 0 && animelemtime(7) < 0
pos = 17, -138
ID = 1100
[State 810, bind]
type = TargetBind
trigger1 = animelemtime(7) >= 0 && animelemtime(8) < 0
pos = 12, -84
ID = 1100
[State 810, bind]
type = TargetBind
trigger1 = animelemtime(8) >= 0 && animelemtime(9) < 0
pos = 24, -94
ID = 1100
[State 810, bind]
type = TargetBind
trigger1 = animelemtime(9) >= 0 && animelemtime(10) < 0
pos = 96, -112
ID = 1100
[State 810, bind]
type = TargetBind
trigger1 = animelemtime(10) >= 0 && animelemtime(10) < 1
pos = 102, -118
ID = 1100

[State 801, Width]
type = Width
trigger1 = animelem = 10
edge = 128,
;=======================================;End
[State 801, 10]
type = ChangeState
Trigger1 = animtime = 0
value = 0
ctrl = 1 
;================================================================================
;Shootdown Backbreaker Get Hits
;================================================================================
;=======================================;Grabbed in Air
[StateDef 1104]
Type = A
MoveType =  H
VelSet = 0, 0
sprpriority = 1
Ctrl = 0
;=======================================;Animations
[State 9] 
type = ChangeAnim2
trigger1 = !time
value = 1107
;=======================================;ScreenBound
;=======================================;End
[State 811, 2]
type = SelfState
trigger1 = time = 1000
value = 5050
;=======================================;Land
[StateDef 1105]
Type = A
MoveType =  H
VelSet = 0, 0
sprpriority = 1
Ctrl = 0
;=======================================;Animations
[State 9] 
type = ChangeAnim2
trigger1 = !time
value = 1108
;=======================================;ScreenBound
;=======================================;End
[State 811, 2]
type = SelfState
trigger1 = time = 1000
value = 5050
;=======================================;Thrown
[StateDef 1106]
Type = A
MoveType =  H
Physics = N
VelSet = 0, 0
sprpriority = 1 
Ctrl = 0

[State 811, Anim]
Type = ChangeAnim2
Trigger1 = !Time
Value = 1109

[State 811, Anim]
Type = ChangeState
Trigger1 = !animtime
Value = stateno+1

[StateDef 1107]
Type = A
MoveType =  H
Physics = N
sprpriority = 1 
Ctrl = 0

[State 811, Anim]
Type = ChangeAnim
Trigger1 = !time
Value = 5050

[State 0, StartVels]
type = VelSet
trigger1 = time = 0
x = -3
y = -5.5

[State 0, Gravity]
type = Veladd
trigger1 = time > 0
y = .5

[State 0, EnvShake]
type = EnvShake
trigger1 = Vel Y > 0
trigger1 = Vel Y + Pos y >= 0
time = 14
ampl = -4
freq = 180

[State 0, GoToBounce]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Vel Y + Pos y >= 0
value = 5100

;Giant Palm Bomber
[Statedef 1200]
type    = S
movetype= A
physics = N
poweradd= 109
ctrl = 0
velset = 0
sprpriority = 2
juggle = 8
facep2 = 1
;=======================================;Button Check
[State 1000, VarSet]
type = VarSet
trigger1 = !time
var(5) = ifelse((helper(10371), var(0) = [1,3]),0,1) 
;=======================================;Animations/Statetypes
[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = ifelse(var(5)=0,1200,1210)
;=======================================;Effects
[State 0, EnvShake]
type = EnvShake
trigger1 = animelem = 6
time = 14
ampl = -4
freq = 180
[State 5100, 10]
type = PlaySnd
trigger1 = animelem = 5
value = 3+(var(32)*2),8-(var(32)*2)
[State 3303, Explod]
type = Explod
trigger1 = animelem = 6
anim = 12000
pos = 0,0
id = 12000
postype = p1  ;p2,front,back,left,right
sprpriority = 0
ownpal = 1
persistent = 0
[State 300, Land]
type = PlaySnd
trigger1 = animelem = 6
value = 2+(var(32)*10),9
[State 300, Land]
type = PlaySnd
trigger1 = animelem = 6
value = 1000,2
[State 200, snd]
type=playsnd
trigger1 = animelem = 1
value=200,7
channel=0  
;=======================================;Movement
[State 1040, go]
type = PosAdd
Trigger1 = animelem = 3
Trigger2 = animelem = 5
x = 5
[State 1040, go]
type = PosAdd
Trigger1 = animelem = 4
x = 10
;=======================================;Helper
[State 1000: Helper]
type = helper
trigger1 = animelemtime(6) = 0
helpertype = Normal
id = 1205
pos = 0, 0
postype = p1
facing = 1
stateno = 1205
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 0
;=======================================;Hitdef
[State 210, 1]
type = HitDef
Triggerall = anim = 1200
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(6) >= 0 && animelemtime(7) < 0
attr = S, NA
damage = floor(66*ifelse(var(56),1.25,1)),8
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-92
hitsound = s3+(var(32)*2),9
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 5, Hit
ground.type = high
pausetime = 6,24
guard.pausetime = 6,12
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = 0
air.type = High
air.velocity = -4.5,-7;.25
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
air.fall = 1
fall.recover = 1
fall.recovertime = 120
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = 0.5
persistent = 0

[State 210, 1]
type = HitDef
Triggerall = anim = 1210
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(6) >= 0 && animelemtime(7) < 0
attr = S, NA
damage = floor(66*ifelse(var(56),1.25,1)),8
sparkno = s17002+(var(31)*10000)
sparkxy = -10,-92
hitsound = s3+(var(32)*2),9
guardsound = s3+(var(32)*2),13
guard.sparkno = s17502+(var(31)*10000)
animtype = Hard
air.animtype = back
guardflag = M
hitflag = MAF
priority = 5, Hit
ground.type = high
pausetime = 6,24
guard.pausetime = 6,12
ground.slidetime = 17
ground.hittime = 16
guard.hittime = 16
guard.slidetime = 17
guard.ctrltime = 28
ground.velocity = 0
air.type = High
air.velocity = -4.5,-7;.25
air.hittime = 13
air.juggle = 0
getpower = 94,94
givepower = 16,16
air.fall = 1
fall.recover = 1
fall.recovertime = 120
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = 0.5
persistent = 0
;=======================================;End
[State 1000, 6]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

;Projectile Shield
[Statedef 1205]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, 0
ownpal = 1
sprpriority = 0
anim = 1205

[State 9100,BindToRoot]
type = BindToRoot
trigger1 = 1
pos = 0,0

[State 1000, projs only]
type = HitBy
trigger1 = 1
value = SCA, NP, SP, HP
ignorehitpause = 1

[State 10012, DMs]
type = HitOverride
trigger1 = !time
attr = SCA, AA, AP, AT
stateno = stateno
time = -1
slot = 2
ignorehitpause = 1

[State 10002, DestroySelf]
type = DestroySelf
trigger1 = root,stateno != 1200
trigger2 = root,stateno = 1200 && root,animelem = 7
ignorehitpause = 1
;================================================================================
;Ultra Throw
;================================================================================
[Statedef 1300]
type    = S
movetype= A
physics = N
poweradd= 109
ctrl = 0
velset = 0
sprpriority = 2
juggle = 8
facep2 = 1
;=======================================;Animations/Statetypes
[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 1300
;=======================================;Movement
[State 1040, go]
type = PosAdd
Trigger1 = animelem = 3
x = 5
[State 1040, go]
type = PosAdd
Trigger1 = animelem = 4
Trigger2 = animelem = 5
x = 10
;=======================================;Effects
[State 200, snd]
type=playsnd
trigger1 = animelem = 2
value=199,0
channel=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
Trigger1 = animelem = 1
attr = S, ST          
hitflag = M         
priority = 1, Miss   
sparkno = -1         
p1sprpriority = 1                     
p1facing = 1
p2facing = 1          
p1stateno = 1301
p2stateno = 1302
ground.velocity = 0,0
guard.dist = 0       
fall = 1              
ID = 1000
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 1000, 6]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;Ultra Throw Success
[StateDef 1301]
type    = S
MoveType = A
VelSet = 0,0
Anim = 1301
SprPriority = 1
ctrl = 0

[State 805, hitspark]
type = Explod
trigger1 = animelem = 1
anim = 20001
pos = 55, -92
postype = p1
SprPriority = 0
ownpal = 1
supermovetime = 999
pausemovetime = 999

[State 0, Explod]
type = Explod
trigger1 = animelem = 13
anim = 1004
ID = 1004
pos = 0,0
postype = p1  
bindtime = -1
removeongethit = 1
sprpriority = 3
ignorehitpause = 0
ownpal = 1

[State 200, snd]
type=playsnd
trigger1= animelem=1
value=200,10
channel=0   

[State 5100, 10]
type = PlaySnd
trigger1 = animelem = 1
value = 2+(var(32)*10), 1
[State 200, Sound]
type = Playsnd
trigger1 = animelem = 6
value = 2+(var(32)*10),10

[State 200, snd]
type=playsnd
trigger1 = animelem = 1
value=200,8
channel=0  

[State 801, Width]
type = Width
trigger1 = animelem = 1
edge = 64,
[State 801, Width]
type = Width
trigger1 = animelem = 7
edge = 128,

[State 810, bind]
type = TargetBind
trigger1 = animelemtime(1)>= 0 && animelemtime(2) < 0
pos = 24, 0
[State 810, bind]
type = TargetBind
trigger1 = animelemtime(2)>= 0 && animelemtime(3) < 0
pos = -44, 0
[State 810, bind]
type = TargetBind
trigger1 = animelemtime(3)>= 0 && animelemtime(4) < 0
pos = -52, 0
[State 810, bind]
type = TargetBind
trigger1 = animelemtime(4)>= 0 && animelemtime(5) < 0
pos = -60, -80
[State 810, bind]
type = TargetBind
trigger1 = animelemtime(5)>= 0 && animelemtime(6) < 0
pos = -60, -120
[State 810, bind]
type = TargetBind
trigger1 = animelemtime(6)>= 0 && animelemtime(7) < 0
pos = 38, -142
[State 810, bind]
type = TargetBind
trigger1 = animelemtime(7)>= 0 && animelemtime(7) < 1
pos = 72, -70

[State 1031, 0]
type = SprPriority
trigger1 = animelem = 7
value = -1

[State 801, 10]
type = ChangeState
Trigger1 = animtime = 0
value = 0
ctrl = 1 
;================================================================================
[StateDef 1302]
Type = A
MoveType =  H
VelSet = 0, 0
sprpriority = 0
Ctrl = 0
;=======================================;Animations
[State 9] 
type = ChangeAnim2
trigger1 = !time
persistent = 0
value = 1302
;=======================================;ScreenBound
[State 811]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,0
;=======================================;End
[State 820, 2];
type = ChangeState
trigger1 = animtime = 0
value = 1303
;Fly to wall...or don't
[Statedef 1303]
type    = A
movetype= H
physics = N
;=======================================;Animations
[State 10900, Anim];Custom animation
type = ChangeAnim
trigger1 = selfanimexist(5900)
trigger1 = !time
value = 5900
[State 10900, Anim];No Custom animation
type = ChangeAnim2
trigger1 = !selfanimexist(5900)
trigger1 = !time
value = 10900
;=======================================;ScreenBound
[State 811]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,0
;=======================================;Movements
[State 10900, 1]
type = VelSet
trigger1 = time = 0
x = -9
y = -5
[State 10900, VelAdd]
type = VelAdd
trigger1 = time > 0
y = .5
;=======================================;End
[State 10900, Hit wall]
type = ChangeState
trigger1 = BackEdgeBodyDist <= 24
trigger2 = FrontEdgeBodyDist <= 24
value = stateno+1
[State 10900, Hit ground];
type = ChangeState
trigger1 = Vel Y + Pos Y >= 0
value = 10091
;Rebound
[Statedef 1304]
type    = A
movetype= H
physics = N
;=======================================;Damage
[State 811, Anim]
Type = LifeAdd
Trigger1 = !time 
value = -25
;=======================================;Animations
[State 10900, Anim]
type = ChangeAnim
trigger1 = time < 9
value = 5030
[State 10900, Anim]
type = ChangeAnim
trigger1 = time = 9
value = 5050
;=======================================;Movements
[State 10900, Turn]
type = Turn
trigger1 = !time
[State 10900, VelSet]
type = VelSet
trigger1 = !time 
y = - 7.5
[State 10900, VelAdd]
type = VelAdd
trigger1 = time > 0
y = .5

[State 10900, VelSet]
type = VelSet
trigger1 = time < 14 
x = -4

[State 10900, VelSet]
type = VelSet
trigger1 = time = 14 
x = -3
[State 10900, VelSet]
type = VelMul
trigger1 = time > 14 
x = 0.9375
;=======================================;End
[State 10900, 2]
type = SelfState
Triggerall = time > 1
trigger1 = Vel Y + Pos Y >= 0
value = 5100
;Moonsault Press 
[Statedef 1400]
type    = S
movetype= A
physics = N
poweradd= 109
ctrl = 0
velset = 0
sprpriority = 2
juggle = 8
facep2 = 1
;=======================================;Movement
[State 1040, go]
type = PosAdd
Trigger1 = animelem = 3
x = 5
[State 1040, go]
type = PosAdd
Trigger1 = animelem = 4
Trigger2 = animelem = 5
x = 10
;=======================================;Variables
[State 1000, VarSet]
type = VarSet
trigger1 = !time
var(5) = ifelse((helper(10371), var(0) = [1,3]),0,1) 
;=======================================;Animations/Statetypes
[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = ifelse(var(5)=0,1400,1410)
;=======================================;Effects
[State 200, snd]
type=playsnd
trigger1 = animelem = 2
value=199,0
channel=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
Trigger1 = animelem = 1
attr = S, ST          
hitflag = M         
priority = 1, Miss   
sparkno = -1         
p1sprpriority = 1                     
p1facing = 1
p2facing = 1          
p1stateno = 1401
p2stateno = 1403
ground.velocity = 0,0
guard.dist = 0       
fall = 1              
ID = 1400
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 1000, 6]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;Moonsault Press Success
[StateDef 1401]
type    = S
MoveType = A
Physics = N
VelSet = 0,0
Anim = 1401
SprPriority = 1
ctrl = 0
;=======================================;Animations/Statetypes
[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 1401 && animtime = 0
value = anim+1

[State 1300, ChangeAnim]
type = StateTypeSet
trigger1 = anim = 1401 && animelem = 8
Statetype = A
;=======================================;Binds/Width
[State 801, Width]
type = Width
trigger1 = animelem = 1
edge = 56,40
[State 810, target]
type = targetbind
trigger1 = anim = 1401
trigger1 = animelemtime(1) >= 0 && animelemtime(2) < 0
pos = 44, 0
ID = 1400
[State 810, target]
type = targetbind
trigger1 = anim = 1401
trigger1 = animelemtime(2) >= 0 && animelemtime(3) < 0
pos = 20, 0
ID = 1400
[State 810, target]
type = targetbind
trigger1 = anim = 1401
trigger1 = animelemtime(3) >= 0 && animelemtime(4) < 0
pos = -20, 0
ID = 1400
[State 810, target]
type = targetbind
trigger1 = anim = 1401
trigger1 = animelemtime(4) >= 0 && animelemtime(5) < 0
pos = -4, 0
ID = 1400
[State 810, target]
type = targetbind
trigger1 = anim = 1401
trigger1 = animelemtime(5) >= 0 && animelemtime(6) < 0
pos = -12, -8
ID = 1400
[State 810, target]
type = targetbind
trigger1 = anim = 1401
trigger1 = animelemtime(6) >= 0 && animelemtime(7) < 0
pos = -12, -16
ID = 1400
[State 810, target]
type = targetbind
trigger1 = anim = 1401
trigger1 = animelemtime(7) >= 0 && animelemtime(8) < 0
pos = -28, -80
ID = 1400
[State 810, target]
type = targetbind
trigger1 = anim = 1401
trigger1 = animelemtime(8) >= 0 && animelemtime(9) < 0
pos = -1, -156
ID = 1400
[State 810, target]
type = targetbind
trigger1 = anim = 1401
trigger1 = animelemtime(9) >= 0 && animelemtime(10) < 0
pos = 22, -153
ID = 1400
[State 810, target]
type = targetbind
triggerall = anim = 1401
trigger1 = animelemtime(10) >= 0 && animelemtime(11) < 0
trigger2 = animelemtime(16) >= 0 && animelemtime(17) < 0
pos = -1, -130
ID = 1400
[State 810, target]
type = targetbind
triggerall = anim = 1401
trigger1 = animelemtime(11) >= 0 && animelemtime(12) < 0
trigger2 = animelemtime(17) >= 0 && animelemtime(18) < 0
pos = -12, -130
ID = 1400
[State 810, target]
type = targetbind
triggerall = anim = 1401
trigger1 = animelemtime(12) >= 0 && animelemtime(13) < 0
trigger2 = animelemtime(18) >= 0 && animelemtime(19) < 0
pos = -52, -130
ID = 1400
[State 810, target]
type = targetbind
triggerall = anim = 1401
trigger1 = animelemtime(13) >= 0 && animelemtime(14) < 0
trigger2 = animelemtime(19) >= 0 && animelemtime(20) < 0
pos = -38, -130
ID = 1400
[State 810, target]
type = targetbind
triggerall = anim = 1401
trigger1 = animelemtime(14) >= 0 && animelemtime(15) < 0
trigger2 = animelemtime(20) >= 0 && animelemtime(21) < 0
pos = 10, -130
ID = 1400
[State 810, target]
type = targetbind
triggerall = anim = 1401
trigger1 = animelemtime(15) >= 0 && animelemtime(16) < 0
trigger2 = animelemtime(21) >= 0 && animelemtime(21) < 2
pos = 20, -130
ID = 1400

[State 810, target]
type = targetbind
triggerall = anim = 1402
trigger1 = animelemtime(1) >= 0 && animelemtime(2) < 0
pos = 12, -108
ID = 1400
[State 810, target]
type = targetbind
triggerall = anim = 1402
trigger1 = animelemtime(2) >= 0 && animelemtime(3) < 0
pos = -2, -120
ID = 1400
[State 810, target]
type = targetbind
triggerall = anim = 1402
trigger1 = animelemtime(3) >= 0 && animelemtime(4) < 0
pos = -22, -126
ID = 1400
[State 810, target]
type = targetbind
triggerall = anim = 1402
trigger1 = animelemtime(4) >= 0 && animelemtime(5) < 0
pos = -36, -120
ID = 1400
[State 810, target]
type = targetbind
triggerall = anim = 1402
trigger1 = animelemtime(5) >= 0 && animelemtime(6) < 0
pos = -35, -120
ID = 1400
[State 810, target]
type = targetbind
triggerall = anim = 1402
trigger1 = animelemtime(6) >= 0 && animelemtime(7) < 0
pos = -55, -80
ID = 1400
[State 810, target]
type = targetbind
triggerall = anim = 1402
trigger1 = animelemtime(7) >= 0 && animelemtime(8) < 0
pos = -45, -60
ID = 1400
[State 810, target]
type = targetbind
triggerall = anim = 1402
trigger1 = animelemtime(8) >= 0 && animelemtime(9) < 0
pos = -12, -44
ID = 1400
[State 810, target]
type = targetbind
triggerall = anim = 1402
trigger1 = animelemtime(9) >= 0 && animelemtime(10) < 0
pos = 12, -45
ID = 1400
[State 810, target]
type = targetbind
triggerall = anim = 1402
trigger1 = animelemtime(10) >= 0 && animelemtime(11) < 0
pos = 26, -58
ID = 1400
[State 810, target]
type = targetbind
triggerall = anim = 1402
trigger1 = animelemtime(11) >= 0 && animelemtime(12) < 0
pos = 26, -10
ID = 1400
[State 810, target]
type = targetbind
triggerall = anim = 1402
trigger1 = animelemtime(12) >= 0
pos = 26, -20
ID = 1400
;=======================================;Priority
[State 1031, 0]
type = SprPriority
trigger1 = anim = 1401 
trigger1 = animelem = 7
trigger2 = anim = 1401 
trigger2 = animelem = 13
trigger3 = anim = 1401 
trigger3 = animelem = 19
value = -2
[State 1031, 0]
type = SprPriority
trigger1 = anim = 1401 
trigger1 = animelem = 10
trigger2 = anim = 1401 
trigger2 = animelem = 15
trigger3 = anim = 1401 
trigger3 = animelem = 21
value = 1
;=======================================;Movement
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1401 
trigger1 = animelem = 8
x = -1.691650390625
y = -8.2578125
[State 1300, VelAdd]
type = VelAdd
trigger1 = anim = 1401 && animelemtime(8) > 0
y = 0.2421875
[State 1300, VelMul]
type = VelMul
trigger1 = anim = 1401 && animelemtime(8) > 0
x = 0.8458251953125

[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1402 
trigger1 = animelem = 1
y = -1.17578125
[State 1300, VelAdd]
type = VelAdd
trigger1 = anim = 1402 && animelemtime(1) > 0
y = 0.30078125
;=======================================;Effects
[State 3303, Layer~]
type = Explod
trigger1 = anim = 1401 
trigger1 = animelem = 1
anim = 1409
pos = 0,0
postype = p1  ;p2,front,back,left,right
sprpriority = 2
ownpal = 1
persistent = 0
bindtime = -1
[State 805, hitspark]
type = Explod
trigger1 = anim = 1401 
trigger1 = animelem = 1
anim = 20001
pos = 45, -83
postype = p1
SprPriority = 0
ownpal = 1
supermovetime = 999
pausemovetime = 999
[State 5100, Grabsnd]
type = PlaySnd
trigger1 = anim = 1401 
trigger1 = animelem = 1
value = 2+(var(32)*10), 0

[State 200, snd]
type=playsnd
trigger1 = anim = 1401 
trigger1 = animelem = 1
value=200,9
channel=0  

[State 40, PlaySnd]
type = PlaySnd
trigger1 = anim = 1401 
trigger1 = animelem = 6
value = 12,4

[State 200, Sound]
type = Playsnd
triggerall = anim = 1401 
trigger1 = animelem = 12
trigger2 = animelem = 18
value = 2+(var(32)*10),10
channel = 4
;=======================================;End
[State 801, 10]
type = ChangeState
Triggerall = anim = 1402
Triggerall = animelemtime(1) > 0 
trigger1 = Vel Y + Pos Y >= 0
value = stateno + 1
;================================================================================
;Moonsault Press Landing
;================================================================================
[StateDef 1402]
type = s
MoveType = A
Physics = N
VelSet = 0,0
SprPriority = 0
ctrl = 0
;=======================================;Animations and Statetype
[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 1403
[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 1403 || anim = 1404
trigger1 = animtime = 0
value = anim + 1
;=======================================;Binds/Width
[State 801, Width]
type = Width
trigger1 = anim = 1403
trigger1 = animelem = 1
edge = 64,64
[State 801, fly p2]
type = TargetState
trigger1 = anim = 1403
trigger1 = animelem = 1
value = 1404
ignorehitpause = 1
ID = 1400
[State 810, target]
type = targetbind
trigger1 = anim = 1403
trigger1 = animelemtime(1) >= 0 && animelemtime(1) < 3
pos = 8, 0
ID = 1400
;=======================================;Damage
[State 801, Damage]
Type = TargetLifeAdd
trigger1 = anim = 1403
trigger1 = animelem = 1
value = ((ifelse(var(51),-225,-220))+(var(23)*90))-(var(5)*60)
ID = 1400
;=======================================;Movements
[State 852, PosSet]
type = PosSet
trigger1 = !time
y = 0

[State 852, PosAdd]
type = PosAdd
triggerall = anim = 1404
trigger1 = animelem = 8
trigger2 = animelem = 9
trigger3 = animelem = 10
trigger4 = animelem = 11
trigger5 = animelem = 12
x = -16
;=======================================;Effects
[State 1201, HitAdd]
type = HitAdd
trigger1 = anim = 1403
Trigger1 = animelem = 1
value = 1

[State 0, EnvShake]
type = EnvShake
trigger1 = anim = 1403
trigger1 = animelem = 1
time = 30
ampl = -4
freq = 180

[State 5100, Grabsnd]
type = PlaySnd
trigger1 = anim = 1403
trigger1 = animelem = 1
value = 1000, 0
[State 5100, Grabsnd]
type = PlaySnd
trigger1 = anim = 1403
trigger1 = animelem = 1
value = 1000, 1

[State 200, snd]
type=playsnd
trigger1 = anim = 1403
trigger1 = animelem = 1
value=200,10
channel=0  

[State 200, Sound]
type = Playsnd
trigger1 = anim = 1403
trigger1 = animelem = 1
value = 3+(var(32)*2),3
[State 300, Land]
type = PlaySnd
trigger1 = anim = 1403
trigger1 = animelem = 1
value = 2+(var(32)*10),9
[State 3303, Explod]
type = Explod
trigger1 = anim = 1403
trigger1 = animelem = 1
anim = 12001+(var(31)*10000)
pos = 0,0
postype = p1  ;p2,front,back,left,right
sprpriority = 2
ownpal = 1
persistent = 0
[State 3303, Explod]
type = Explod
trigger1 = anim = 1403
trigger1 = animelem = 1
anim = 12002+(var(31)*10000)
pos = 0,0
postype = p1  ;p2,front,back,left,right
sprpriority = 0
ownpal = 1
persistent = 0

[State -3, hop]
type = PlaySnd
trigger1 = anim = 1404
trigger1 = animelem = 8
value = 2+(var(32)*10),12

[State -3, land]
type = PlaySnd
trigger1 = anim = 1405
trigger1 = animelem = 1
value =  2+(var(32)*10),2
;=======================================;Damage

;=======================================;Binds/Width

;=======================================;End
[State 801, 10]
type = ChangeState
trigger1 = anim = 1405
Trigger1 = animtime = 0
value = 0
ctrl = 1 

[StateDef 1403]
Type = A
MoveType =  H
VelSet = 0, 0
sprpriority = -1 
Ctrl = 0

[State 811, Anim]
Type = ChangeAnim2
Trigger1 = !time 
value = 1406
[State 811, Anim]
Type = ChangeAnim2
Trigger1 = anim = 1406 && animtime = 0 
value = 1407

[State 820, 2]
type = ChangeState
Trigger1 = time = 600
value = stateno+1
[StateDef 1404]
Type = A
MoveType =  H
VelSet = 0, 0
sprpriority = -1 
Ctrl = 0

[State 811, Anim]
Type = ChangeAnim2
Trigger1 = !time 
value = 1408

[State 5110, 11] ;If just died
type = SelfState
triggerall = !alive
trigger1 = AnimTime = 0
value = 5150

[State 5110, 11] ;If just died
type = SelfState
trigger1 = AnimTime = 0
value = 5120

;Meat Squasher
[Statedef 1500]
type    = S
movetype= A
physics = N
poweradd= 109
ctrl = 0
velset = 0
sprpriority = 2
juggle = 8
facep2 = 1
;=======================================;Button Check
[State 1000, VarSet]
type = VarSet
trigger1 = !time
var(5) = ifelse((helper(10371), var(3) = [1,3]),0,1) 
[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = ifelse(var(5)=0,1500,1510)
;=======================================;Variables
;=======================================;Animations/Statetypes
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 1500 || anim = 1510
value = anim+1
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime || animelemtime(1)>2 && P2bodydist X <= 16 
trigger1 = anim = 1501 || anim = 1511
value = anim+1
[State 1500, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1502 && animelem = 1
trigger2 = anim = 1512 && animelem = 1
movetype = I
;=======================================; Vels && Movement
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1501 && animelem = 1
trigger2 = anim = 1511 && animelem = 1
x = 4

[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1502 && animelem = 1
trigger2 = anim = 1512 && animelem = 1
x = 0
;=======================================;Effects
[State 3303, Explod]
type = Explod
trigger1 = anim = 1500 && animelem = 1
trigger2 = anim = 1510 && animelem = 1
anim = 12004
pos = -24,0
postype = p1  ;p2,front,back,left,right
sprpriority = 3
ownpal = 1
facing = 1
persistent = 0
persistent = 0
[State 3000, EnvShake]
type = EnvShake
trigger1 = anim = 1501 || anim = 1511
trigger1 = animelem = 2
trigger2 = anim = 1501 || anim = 1511
trigger2 = animelem = 6
trigger3 = anim = 1512 
trigger3 = animelem = 10
time = 4
freq = 180
ampl = -4
[State 300, Land]
type = PlaySnd
trigger1 = anim = 1501 || anim = 1511
trigger1 = animelem = 2
trigger2 = anim = 1501 || anim = 1511
trigger2 = animelem = 6
trigger3 = anim = 1512 
trigger3 = animelem = 10
channel = 4
value = 2+(var(32)*10),9

[State 200, snd]
type=playsnd
triggerall = anim = 1502 || anim = 1512
trigger1 = animelem = 1
value=199,0
channel=0  
;=======================================;HitDef
 [State 11040, 1]
type = HitDef
Trigger1 = anim = 1501 || anim = 1511
triggerall = p2stateno != 40 && p2stateno !=52 ; Cannot grab during jump start / jump land
triggerall = var(19) = 0 ; Opponent isn't in guarding state
Trigger1 = animelemtime(1) >= 1
attr = S, ST          
hitflag = M         
priority = 1, Miss   
sparkno = -1         
p1sprpriority = 1                     
p1facing = 1
p2facing = 1          
p1stateno = 1501
p2stateno = 1520
ground.velocity = 0,0
guard.dist = 0       
fall = 1              
ID = 1500
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
triggerall = anim = 1502 || anim = 1512
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;Meat Squasher Success
[Statedef 1501]
type    = S
movetype= A
physics = N
poweradd= 109
ctrl = 0
velset = 0
sprpriority = 2
juggle = 8
facep2 = 1
;=======================================;Animations/Statetypes
[State 1300, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 1503
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = !animtime
trigger1 = anim = 1503 || anim = 1504 || anim = 1506
value = anim+1
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = anim = 1505 && animelemtime(1) > 0
trigger1 = FrontEdgeBodyDist <= 40
trigger2 = time >=200
value = anim+1
[State 1300, ChangeAnim]
type = ChangeAnim
triggerall = anim = 1507 && animelemtime(1) > 0
trigger1 = FrontEdgeBodyDist <= 0 || !animtime
value = anim+1
;=======================================;Binds/Width/Damage
[State 801, Width]
type = Width
trigger1 = anim = 1503
trigger1 = animelem = 1
edge = 56,40
;1503

[State 810, bind]
type = TargetBind
trigger1 = !time
ID = 1500
pos = 57, -102
ignorehitpause = 1

[State 810, bind]
type = TargetBind
triggerall = anim = 1503
trigger1 = animelem = 1
trigger2 = animelemtime(1) >= 0 && animelemtime(3) < 0
ID = 1500
pos = 57, -102
ignorehitpause = 0
[State 810, bind]
type = TargetBind
triggerall = anim = 1503
trigger1 = animelemtime(3) >= 0 && animelemtime(4) < 0
ID = 1500
pos = 19, -134
[State 810, bind]
type = TargetBind
triggerall = anim = 1503
trigger1 = animelemtime(4) >= 0 && animelemtime(5) < 0
ID = 1500
pos = 19, -136
[State 810, bind]
type = TargetBind
triggerall = anim = 1503
trigger1 = animelemtime(5) >= 0 && animelemtime(6) < 0
ID = 1500
pos = 26, -141
[State 810, bind]
type = TargetBind
triggerall = anim = 1503
trigger1 = animelemtime(6) >= 0 && animelemtime(6) < 3
ID = 1500
pos = 32, -146

[State 810, bind]
type = TargetBind
triggerall = anim = 1504
trigger1 = animelemtime(1) >= 0 && animelemtime(2) < 0
ID = 1500
pos = -20, -130
[State 810, bind]
type = TargetBind
triggerall = anim = 1504
trigger1 = animelemtime(2) >= 0 && animelemtime(3) < 0
ID = 1500
pos = 16, -120
[State 810, bind]
type = TargetBind
triggerall = anim = 1504
trigger1 = animelemtime(3) >= 0 && animelemtime(3) < 3
ID = 1500
pos = 52, -132

[State 810, bind]
type = TargetBind
triggerall = anim = 1505
trigger1 = animelemtime(1) >= 0 && animelemtime(2) < 0
trigger2 = animelemtime(3) >= 0 && animelemtime(4) < 0
trigger3 = animelemtime(5) >= 0 && animelemtime(6) < 0
trigger4 = animelemtime(7) >= 0 && animelemtime(8) < 0
trigger5 = animelemtime(9) >= 0 && animelemtime(10) < 0
trigger6 = animelemtime(11) >= 0 && animelemtime(12) < 0
trigger7 = animelemtime(13) >= 0 && animelemtime(14) < 0
trigger8 = animelemtime(15) >= 0 && animelemtime(16) < 0
trigger9 = animelemtime(17) >= 0 && animelemtime(18) < 0
trigger10 = animelemtime(19) >= 0 && animelemtime(20) < 0
trigger11 = animelemtime(21) >= 0 && animelemtime(22) < 0
trigger12 = animelemtime(23) >= 0 && animelemtime(23) < 3
ID = 1500
pos = 50, -184

[State 810, bind]
type = TargetBind
triggerall = anim = 1505
trigger1 = animelemtime(2) >= 0 && animelemtime(3) < 0
trigger2 = animelemtime(4) >= 0 && animelemtime(5) < 0
trigger3 = animelemtime(6) >= 0 && animelemtime(7) < 0
trigger4 = animelemtime(8) >= 0 && animelemtime(9) < 0
trigger5 = animelemtime(10) >= 0 && animelemtime(11) < 0
trigger6 = animelemtime(12) >= 0 && animelemtime(13) < 0
trigger7 = animelemtime(14) >= 0 && animelemtime(15) < 0
trigger8 = animelemtime(16) >= 0 && animelemtime(17) < 0
trigger9 = animelemtime(18) >= 0 && animelemtime(19) < 0
trigger10 = animelemtime(20) >= 0 && animelemtime(21) < 0
trigger11 = animelemtime(22) >= 0 && animelemtime(23) < 0
ID = 1500
pos = 50, -188

[State 810, bind]
type = TargetBind
triggerall = anim = 1506
trigger1 = animelemtime(1) >= 0 && animelemtime(1) < 4
ID = 1500
pos = 18, -172

[State 810, bind]
type = TargetBind
triggerall = anim = 1507
trigger1 = animelemtime(1) >= 0 && animelemtime(3) < 3
ID = 1500
pos = 12, -67

[State 801, fly p2]
type = TargetState
trigger1 = anim = 1504
trigger1 = animelemno(0) = 1
value = 1521
ignorehitpause = 1
persistent = 0
ID = 1500
[State 801, fly p2]
type = TargetState
trigger1 = anim = 1505
value = 1522
ignorehitpause = 1
persistent = 0
ID = 1500
[State 801, fly p2]
type = TargetState
trigger1 = anim = 1506
value = 1523
ignorehitpause = 1
persistent = 0
ID = 1500
[State 801, fly p2]
type = TargetState
trigger1 = anim = 1507
value = 1524
ignorehitpause = 1
persistent = 0
ID = 1500
[State 801, fly p2]
type = TargetState
trigger1 = anim = 1508
value = 1525
ignorehitpause = 1
persistent = 0
ID = 1500

[State 801, Damage]
Type = TargetLifeAdd
trigger1 = anim = 1508 && animelem = 1
value = (ifelse(var(51),-90,-120))+(var(23)*30)
ID = 1500
absolute = 1
;=======================================;Variables


;=======================================; Vels && Movement
[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1505 && animelem = 1
trigger2 = anim = 1507 && animelem = 1
x = 8
[State 1300, PosAdd]
type = PosAdd
trigger1 = anim = 1505 && animelem = 1
x = 8

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

[State 1023, Air]
type = StateTypeSet
trigger1 = anim = 1508
trigger1 = AnimElem = 2
statetype = A
physics = N

[State 1300, VelSet]
type = VelSet
trigger1 = anim = 1508 && animelem = 2
x = -4
y = -4.5

[State 1300, VelAdd]
type = VelAdd
trigger1 = anim = 1508 && animelemtime(2) > 0
y = 0.5

;=======================================;Effects
[State 805, Grab Spark]
type = Explod
trigger1 = anim = 1503
trigger1 = animelem = 1
anim = 20001
pos = 58, -88
postype = p1
SprPriority = -1
ownpal = 1
supermovetime = 999
pausemovetime = 999
persistent = 0
[State 5100, Grabsnd]
type = PlaySnd
trigger1 = anim = 1503
trigger1 = animelem = 1
value = 2+(var(32)*10), 0

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

[State 200, snd]
type=playsnd
trigger1 = anim = 1503
trigger1 = animelem = 1
value=200,11
channel=0  

[State 3000, EnvShake]
type = EnvShake
triggerall = anim = 1505
trigger1 = animelem = 3
trigger2 = animelem = 7
trigger3 = animelem = 11
trigger4 = animelem = 15
trigger5 = animelem = 19
trigger6 = animelem = 23
time = 4
freq = 180
ampl = -4
[State 300, Land]
type = PlaySnd
triggerall = anim = 1505
trigger1 = animelem = 3
trigger2 = animelem = 7
trigger3 = animelem = 11
trigger4 = animelem = 15
trigger5 = animelem = 19
trigger6 = animelem = 23
channel = 4
value = 2+(var(32)*10),9

[State 40, PlaySnd]
type = PlaySnd
triggerall = anim = 1507
trigger1 = animelem = 1
value = 12,4

[State 1201, HitAdd]
type = HitAdd
trigger1 = anim = 1508 && animelem = 1
value = 1

[State 0, EnvShake]
type = EnvShake
trigger1 = anim = 1508 && animelem = 1
time = 14
ampl = -4
freq = 180

[State 200, Sound]
type = Playsnd
trigger1 = anim = 1508 && animelem = 1
value = 3+(var(32)*2),3
[State 200, Sound]
type = Playsnd
trigger1 = anim = 1508 && animelem = 1
value = 3+(var(32)*2),7
[State 200, Sound]
type = Playsnd
trigger1 = anim = 1508 && animelem = 1
value = 2+(var(32)*10),9

[State 220, Explod]
type = Explod
trigger1 = anim = 1508 && animelem = 1
anim = 17002+(var(31)*10000)
pos = 16, -144
postype = p1  ;p2,front,back,left,right
facing = -1
bindtime = 1
removetime = -2
sprpriority = 4
ownpal = 1
removeongethit = 0
ignorehitpause = 1
persistent = 1
;=======================================;HitDef
 
;=======================================;End
[State 1000, 6]
type = ChangeState
triggerall = statetype = A
trigger1 = Vel Y + Pos Y >= 0
value = stateno+1
ctrl = 0
;================================================================================
;Meat Squasher Landing
;================================================================================
[Statedef 1502]
type = S
movetype = I
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority = 2
;=======================================;Animations
[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 1509
;=======================================;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 0, EnvShake]
type = EnvShake
trigger1 = animelem = 1
time = 14
ampl = -4
freq = 180
[State 3303, Explod]
type = Explod
trigger1 = animelem = 1
anim = 12000
pos = 0,0
id = 12000
postype = p1  ;p2,front,back,left,right
sprpriority = 0
ownpal = 1
persistent = 0
[State 300, Land]
type = PlaySnd
trigger1 = animelem = 1
value = 2+(var(32)*10),9
;=======================================;End
[State 220,2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;================================================================================
;Meat Squasher Get Hits
;================================================================================
[StateDef 1520]
Type = A
MoveType =  H
VelSet = 0, 0
sprpriority = -1 
Ctrl = 0
;=======================================;Animations
[State 9] 
type = ChangeAnim2
trigger1 = !time
persistent = 0
value = 1520
;=======================================;ScreenBound
[State 811]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,0
;=======================================;Safety
[State 820, 2];Escape if throw breaks
type = SelfState
trigger1 = time = 800
value = 5050
;=======================================;End
[StateDef 1521]
Type = A
MoveType =  H
VelSet = 0, 0
sprpriority = -1 
Ctrl = 0
;=======================================;Animations
[State 9] 
type = ChangeAnim2
trigger1 = !time
persistent = 0
value = 1521
;=======================================;ScreenBound
[State 811]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,0
;=======================================;Safety
[State 820, 2];Escape if throw breaks
type = SelfState
trigger1 = time = 800
value = 5050
;=======================================;End
[StateDef 1522]
Type = A
MoveType =  H
VelSet = 0, 0
sprpriority = -1 
Ctrl = 0
;=======================================;Animations
[State 9] 
type = ChangeAnim2
trigger1 = !time
persistent = 0
value = 1522
;=======================================;ScreenBound
[State 811]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,0
;=======================================;Safety
[State 820, 2];Escape if throw breaks
type = SelfState
trigger1 = time = 800
value = 5050
;=======================================;End
[StateDef 1523]
Type = A
MoveType =  H
VelSet = 0, 0
sprpriority = -1 
Ctrl = 0
;=======================================;Animations
[State 9] 
type = ChangeAnim2
trigger1 = !time
persistent = 0
value = 1523
;=======================================;ScreenBound
[State 811]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,0
;=======================================;Safety
[State 820, 2];Escape if throw breaks
type = SelfState
trigger1 = time = 800
value = 5050
;=======================================;End
[StateDef 1524]
Type = A
MoveType =  H
VelSet = 0, 0
sprpriority = -1 
Ctrl = 0
;=======================================;Animations
[State 9] 
type = ChangeAnim2
trigger1 = !time
persistent = 0
value = 1524
;=======================================;ScreenBound
[State 811]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,0
;=======================================;Safety
[State 820, 2];Escape if throw breaks
type = SelfState
trigger1 = time = 800
value = 5050
;=======================================;End
;----------------------------------------------------------------------
[StateDef 1525]
Type = A
MoveType =  H
Physics = N
VelSet = 0, 0
sprpriority = 1 
Ctrl = 0
;=======================================;ScreenBound/HitBy
[State 811]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,0
[State 811]
type = Nothitby ;HMMMMMMM
trigger1 = 1
value = SCA
;=======================================;Animations
[State 811, Anim]
Type = ChangeAnim
Trigger1 = Time = 13
Trigger2 = anim = 5030 && time < 21
Value = 5030
[State 811, Anim]
Type = ChangeAnim
Trigger1 = time = 21
Value = 5050
;=======================================;Movements
[State 1040, go]
type = PosAdd
Trigger1 = !time
y = -1
[State 903, VelSet]
type = VelSet
trigger1 = time = 13
x = -11.375
y = -6.5
[State 903, VelSet]
type = VelMul
trigger1 = time > 13 && time < 21
x = 0.8125
[State 1040, go]
type = VelAdd
trigger1 = time > 13
y = 0.5
;=======================================;End
[State 811, 2]
type = SelfState
Trigger1 = vel y > 0 && pos y >= 0
value = 5100