;hitspark = s7700, s7702, s7703
;wall hit = 6777
;launch = 4444 (C, HP)
;hyper background = 32710
;guard push = 7020
;recovery roll = checked
;normal throw = checked (F, HP) air
;5300, 5500

;VARIABLES
;var(0)-var(5): Temp
;var(6);Enemynear Head Pos X
;var(7); Enemynear, head pos y
;var(8);small opponent y dist
;var(9);miss target
;var(10);target hit
;
;var(11),var(12); temp bound states
;-------
;var(13) Combo adder 
;Var(14) number and text decider 
;Var(15) is Danger
;var(16) normalize 
;----------
;var(17);combo conditions
;var(18);ko sound
;var(19)-var(21);hit type combo
;var(22)-var(24);Super Armor (Acey)
;var(25)-var(27);hitcount
;var(28),  Helper, earth quake
;var(29), Red vs Green
;variable below 29 will reset between rounds
;
;
;var(30); p2life /100
;var(31); p1life /100
;var(32); damage dampening
;var(33);enemy(1),life/100
; 
;var(34),max hits light atk
;var(35),max hits medium atk
;var(36);max hits hard atk
;var(37);Gamma Wave Hits
;var(38);dancing swords
;var(39);Gamma Charge
;var(40);Gamma Wave Counter
;var(41);Gamma Wave AI Counter
;var(42);Super Armor
;var(43) - var(48); run
;var(49); Kyuukouka Dance 
;var(50);- Gill resurrect
;var(51) - special to hyper states
;var(52) - damage to super armor
;var(54) - Intro Randomizer
;var(55) - Super Armor
;var(56);  sos condition
;var(57); Kishin Riki
;var(58); remember ai for next round
;var(59); ai activate

;---------------------------------------------------------------------------
;Float Variables

;fvar(0); Temp
;fvar(25); AvX is normal attack
;fvar(26); AvX is special attack
;fvar(27); AvX is hyper attack
;fvar(28); AvX Hitcount
;fvar(29); AvX style OTG
;fvar(30); AvX style hit recognition
;fvar(31); AvX style lie down after hit (30 ticks)

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


[Data]
;Amount of life to start with

life = 1000
;attack power (more is stronger)

attack = 90
;defensive power (more is stronger)

defence = 100
;Percentage to increase defense everytime player is knocked down
fall.defence_up = 50
;Time which player lies down for, before getting up
liedown.time = 60
;Number of points for juggling
airjuggle = 15
;Default hit spark number for HitDefs
sparkno = 2;7200
;Default guard spark number
guard.sparkno = 40;7300
;1 to enable echo on KO
KO.echo = 0
;Volume offset (negative for softer)
volume = 255 
;Variables with this index and above will not have their values
;reset to 0 between rounds or matches. There are 60 int variables,
;indexed from 0 to 59, and 40 float variables, indexed from 0 to 39.
;If omitted, then it defaults to 60 and 40 for integer and float
;variables repectively, meaning that none are persistent, i.e. all
;are reset. If you want your variables to persist between matches,
;you need to override state 5900 from common1.cns.
IntPersistIndex = 29
FloatPersistIndex = 19

[Size]
xscale = 1    ;Horizontal scaling factor.
yscale = 1          ;Vertical scaling factor.
ground.back = 40    ;Player width (back, ground)
ground.front = 40   ;Player width (front, ground)
air.back = 30  ;Player width (back, air)
air.front = 30  ;Player width (front, air)
height = 150          ;Height of player (for opponent to jump over)
attack.dist = 160    ;Default attack distance
proj.attack.dist = 90 ;Default attack distance for projectiles
proj.doscale = 0     ;Set to 1 to scale projectiles too
head.pos = 48,-150 ;Approximate position of head
mid.pos = 0,-70   ;Approximate position of midsection
shadowoffset = 0   ;Number of pixels to vertically offset the shadow
draw.offset = 0,8    ;Player drawing offset in pixels (x, y)

[Velocity]
walk.fwd  = 3    ;Walk forward
walk.back = -2.7     ;Walk backward
run.fwd  = 8,-5   ;Run forward (x, y)
run.back = -8,-4.8 ;Hop backward (x, y)
jump.neu = 0,-10    ;Neutral jumping velocity (x, y)
jump.back = -2.55    ;Jump back Speed (x, y)
jump.fwd = 3.5       ;Jump forward Speed (x, y)
runjump.back = -2.55,-8.1 ;Running jump speeds (opt)
runjump.fwd = 4,-8.1     ;.
airjump.neu = 0,-8.1     ;.
airjump.back = -2.55      ;Air jump speeds (opt)
airjump.fwd = 3.5         ;.

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

[Quotes]
victory1 = "Who's next?"
victory2 = "That's right, keep making me angry."

;---------------------------------------------------------------------------
; Lose by Time Over

[Statedef 170]
type = S
ctrl = 0
anim = 171
velset = 0,0

[State 170]
type = PosSet
trigger1 = Time = 0
y = 0

[State 170]
type = PlaySnd
triggerall = var(29) = 0
trigger1 = Time = 7
value = 170,random%2
Channel = 0

[State 170]
type = NotHitBy
trigger1 = 1
value = SCA


;---------------------------------------------------------------------------
; Lose 

[Statedef 172]
type = S
ctrl = 0
velset = 0,0
anim = 172

[State 172]
type = PosSet
trigger1 = Time = 0
y = 0

[State 170]
type = PlaySnd
triggerall = var(29) = 0
trigger1 = Time = 7
value = 170,random%2
Channel = 0

[State 172]
type = NotHitBy
trigger1 = 1
value = SCA

[State 172]
type = CtrlSet
trigger1 = Time = 120
value = 1

;---------------------------------------------------------------------------
; DRAWGAME (Time over)
[Statedef 175]
type = S
ctrl = 0
velset = 0,0

[State 175, 1] ; If no anim, use go to lose state.
type = ChangeState
trigger1 = Time = 0
trigger1 = !SelfAnimExist(175)
value = 170

[State 175, 2]
type = ChangeAnim
trigger1 = Time = 0
value = 175

[State 175, 3]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;---------------------------------------------------------------------------
; Win state decider

[Statedef 180]
type = S
velset = 0,0

[state 180] 
type = AssertSpecial 
trigger1 = Time >= 0 
flag = NoBarDisplay

[State 180, 0]
type = PosSet
trigger1 = Time = 0
y = 0

[State 180]
type = Width
trigger1 = Time = 0
value = 50,50

[State 180]
type = ChangeState
trigger1 = Time >= 1
trigger1 = WinTime
value = 181+random%3

[State 180]
type = ChangeState
trigger1 = Time >= 1
trigger1 = WinKO
value = 181+random%3

;---------------------------------------------------------------------------
; Win pose 1 - Time Over

[Statedef 189]
type = S
ctrl = 0
anim = 181
velset = 0,0
sprpriority = 2

[state 189] 
type = AssertSpecial 
trigger1 = Time >= 0 
flag = NoBarDisplay

[state 189] ;Who's next
type = PlaySnd
triggerall = var(29)=0
trigger1 = Time = 1
value = 181,0
Channel = 0

[state 189] ;Im the strongest
type = PlaySnd
triggerall = var(29)=1
trigger1 = Time = 1
value = 150,9
Channel = 0

[State 189]
type = AssertSpecial
trigger1 = Time < 150
flag = roundnotover

;---------------------------------------------------------------------------
; Win pose 1 - Win KO

[Statedef 181]
type = S
ctrl = 0
anim = 181
velset = 0,0
sprpriority = 0

[State 181] 
type = AssertSpecial 
trigger1 = Time >= 0 
flag = NoBarDisplay

[State 181]
type = PlaySnd
triggerall = var(29)=0
trigger1 = AnimElem = 1
value = 181,random%3
persistent = 0
Channel = 0

[State 181];Fight the fights
type = PlaySnd
triggerall = var(29)=1
trigger1 = AnimElem = 1
value = 150,10
persistent = 0
Channel = 0

[State 181]
type = AssertSpecial
trigger1 = Time < 120
flag = roundnotover


;---------------------------------------------------------------------------
; Win pose 2- Win KO

[Statedef 182]
type = S
ctrl = 0
physics = N
anim = 182
sprpriority = 0
facep2 = 1


[State 182] 
type = AssertSpecial 
trigger1 = Time >= 0 
flag = NoBarDisplay

[State 182]
type = PlaySnd
triggerall = var(29)=0
trigger1 = AnimElem = 1
value = 182,random%3
Channel = 0

[State 182];You're weak
type = PlaySnd
triggerall = var(29)=1
trigger1 = AnimElem = 1
value = 150,6
persistent = 0
Channel = 0

[State 182]
type = AssertSpecial
trigger1 = Time < 120
flag = roundnotover


;---------------------------------------------------------------------------
; Win pose 3- Win KO

[Statedef 183]
type = S
ctrl = 0
anim = 183
velset = 0,0
sprpriority = 0

[State 183] 
type = AssertSpecial 
trigger1 = Time >= 0 
flag = NoBarDisplay

[State 183]
type = PlaySnd
triggerall = var(29)=0
trigger1 = AnimElem = 4
value = 183,random%3
persistent = 0
Channel = 0

[State 192];Red Hulk Smash
type = PlaySnd
triggerall = var(29)=1
trigger1 = AnimElem = 1
value = 150,18
Channel = 0

[State 183]
type = AssertSpecial
trigger1 = Time < 120
flag = roundnotover

;---------------------------------------------------------------------------------------------
;Introductions

[Statedef 190]
type = S

[State 192] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro

[State -2, VarSet];Green Hulk Type
type = VarSet
triggerall = palno >6
trigger1 = var(29)!=0
v = 29
value = 0
ignorehitpause = 1

[State -2, VarSet];Red Hulk Type
type = VarSet
triggerall = palno <=6
trigger1 = var(29)!=1
v = 29
value = 1
ignorehitpause = 1

[State 190, 1]
type = VarRandom
trigger1 = Time = 0
v = 54
range = 0,400

[State 190, 2]
type = ChangeState
trigger1 = Var(54) = [0,100]
value = 191

[State 190, 3]
type = ChangeState
trigger1 = Var(54) = [101,200]
value = 192

[State 190, 3]
type = ChangeState
trigger1 = Var(54) = [201,300]
value = 193

[State 190, 3]
type = ChangeState
trigger1 = Var(54) = [301,400]
value = 194

;---------------------------------------------------------------------------------------------
;Intro1 - Start in the middle of transformation
[Statedef 191]
type = S
movetype = I
physics = N
ctrl = 0
anim = 191
velset = 0,0
spriority = 0

[State 191, PlaySnd]
type = PlaySnd
triggerall = var(29) = 1
trigger1 = time = 0
value = S150,29
Channel = 20

[State 191, ChangeAnim]
type = ChangeAnim
triggerall = var(29)= 0
trigger1 = anim != 185
value = 185

[State 192] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 192];Hulk Stop You
type = PlaySnd
triggerall = var(29)=0
trigger1 = AnimElem = 14
value = 15,2
Channel = 20

[State 190, 3]
type = ChangeState
trigger1 = animtime = 0
value = 199

;---------------------------------------------------------------------------
; Intro2 - Fall from sky

[Statedef 192]
type = S
ctrl = 0
physics = N
anim = 192
velset = 0,0
sprpriority = 0

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

[State 192]
type = PosSet
trigger1 = Time = 0
y = -240

[State 192]
type = VelAdd
trigger1 = Pos Y < 0
y = 0.4

[State 192]
type = ChangeAnim
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 6192
persistent = 0

[State 192]
type = VelSet
trigger1 = Anim = 6192
y = 0
persistent = 0

[State 192]
type = PosSet
trigger1 = Anim = 6192
y = 0
persistent = 0

[State 192]
type = PlaySnd
triggerall = var(29)=0
trigger1 = Anim = 6192
value = 52,3
persistent = 0
Channel = 20

[State 192]
type = PlaySnd
triggerall = var(29)=1
trigger1 = Anim = 192
triggerall = pos y > -20
value = 150,15
persistent = 0
Channel = 20

[State 192]
type = Explod
trigger1 = Anim = 6192
anim = 6193
sprpriority = 2
pos = 0,0
ownpal = 1
persistent = 0
facing = -1

[State 192]
type = Explod
trigger1 = Anim = 6192
anim = 6194
sprpriority = -2
pos = 0,0
ownpal = 1
persistent = 0
facing = -1

[State 192]
type = EnvShake
trigger1 = Anim = 6192
time = 12
ampl = 8
persistent = 0

[State 192];Rahh
type = PlaySnd
trigger1 = Anim = 6192 && AnimElem = 2
value = 192,0
Channel = 20

[State 192] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 192]
type = ChangeState
trigger1 = AnimTime = 0 && Anim = 6192
value = 199
ctrl = 0

;---------------------------------------------------------------------------------------------
;Intro3 - Banner to Hulk 1
[Statedef 193]
type = S
movetype = I
physics = N
ctrl = 0
anim = 193
velset = 0,0
spriority = 0

[State 191, PlaySnd]
type = PlaySnd
triggerall = var(29) = 1
trigger1 = time = 0
value = S150,30

[State 191, ChangeAnim]
type = ChangeAnim
triggerall = var(29)=0
trigger1 = anim != 186
value = 186

[State 193] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 193] ;No it's happeneing again
type = PlaySnd
triggerall = var(29)=0
trigger1 = AnimElem = 2
value = 15,1
Channel = 20

[State 193] ;???
type = PlaySnd
triggerall = var(29)=0
trigger1 = AnimElem = 27
value = 15,20
Channel = 20

[State 193];Time for Action
type = PlaySnd
triggerall = var(29)=1
trigger1 = AnimElem = 16
value = 150,8
Channel = 20

[State 193];Grr
type = PlaySnd
triggerall = var(29)=1
trigger1 = AnimElem = 14
value = 150,3
Channel = 20

[State 193, 3]
type = ChangeState
trigger1 = animtime = 0
value = 199

;---------------------------------------------------------------------------------------------
;Intro3 - Banner to Hulk 2
[Statedef 194]
type = S
movetype = I
physics = N
ctrl = 0
anim = 193
velset = 0,0
spriority = 0

[State 191, ChangeAnim]
type = ChangeAnim
triggerall = var(29)=0
trigger1 = anim != 186
value = 186

[State 194] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 194];Not Again
type = PlaySnd
triggerall = var(29)=0
trigger1 = AnimElem = 2
value = 15,3
Channel = 20

[State 194];Hulk stop you
type = PlaySnd
triggerall = var(29)=0
trigger1 = AnimElem = 26
value = 15,2
Channel = 20

[State 194];Youre weak
type = PlaySnd
triggerall = var(29)=1
trigger1 = AnimElem = 20
value = 150,6
Channel = 20

[State 194];Grr
type = PlaySnd
triggerall = var(29)=1
trigger1 = AnimElem = 14
value = 150,3
Channel = 20

[State 194, 3]
type = ChangeState
trigger1 = animtime = 0
value = 199

;---------------------------------------------------------------------------
; Introduction 2

[Statedef 7196]
type = S
ctrl = 0
physics = N
anim = 7196
velset = -3,0
sprpriority = 3

[State 7196]
type = VarSet
trigger1 = Time = 0
fvar(0) = Pos X

[State 7196]
type = PosSet
trigger1 = Time = 0
x = -2*Pos X
y = -100
[State 7196]
type = screenbound
trigger1 = Time >= 0
value = 0
movecamera = 0, 0

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

[State 7196]
type = VelSet
trigger1 = Time = 0
x = -3
y = 3

[State 7196]
type = VelSet
trigger1 = FrontEdgeDist < 70
x = 0

[State 7196]
type = PosSet
trigger1 = Vel X = 0
x = fvar(0)
persistent = 0

[State 7196] ;Freeze animation until PreIntro is over
type = null;ChangeAnim
trigger1 = RoundState = 0
value = 190

[State 7196] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 7196]
type = ChangeAnim
trigger1 = Vel X != 0
trigger1 = AnimElem = 9
value = 196
elem = 4

[State 7196]
type = PlaySnd
trigger1 = Time = 4
value = 3001,0
Channel = 20

[State 7196]
type = null;ChangeState
trigger1 = AnimTime = 0
value = 199
ctrl = 0


[State 7196]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 198
ctrl = 0

;---------------------------------------------------------------------------
; Introduction 

[Statedef 7197]
type = S
ctrl = 0
physics = N
anim = 7198
velset = -3,0
sprpriority = 3

[State 7197]
type = VarSet
trigger1 = Time = 0
fvar(0) = Pos X

[State 7197]
type = VarSet
trigger1 = Time = 0
var(0) = 0

[State 7197]
type = PosSet
trigger1 = Time = 0
x = -2*Pos X
y = -100

[State 7197]
type = Helper
trigger1 = Time = 0
stateno = 6197
ownpal = 1

[State 7197]
type = screenbound
trigger1 = Time >= 0
value = 0
movecamera = 0, 0

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

[State 7197]
type = VelSet
trigger1 = Time = 0
x = -3

[State 7197]
type = Turn
trigger1 = Time = 0

[State 7197]
type = VelSet
trigger1 = FrontEdgeDist < 70
x = 0

[State 7197]
type = PosSet
trigger1 = Vel X = 0
x = fvar(0)
persistent = 0

[State 7197] ;Freeze animation until PreIntro is over
type = null;ChangeAnim
trigger1 = RoundState = 0
value = 190

[State 7197] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 7197]
type = null;ChangeAnim
trigger1 = Vel X = 0
value = 7198
elem = 7
persistent = 0

[State 7197]
type = PlaySnd
trigger1 = Vel X = 0
value = 1550,1
persistent = 0

[State 7197]
type = VelAdd
trigger1 = Vel X = 0 && Pos Y < 0
y = 0.4

[State 7197]
type = null;PlaySnd
trigger1 = Time = 4
value = 3001,0

[State 7197]
type = VarSet
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
var(0) = 1

[State 7197]
type = PosSet
trigger1 = var(0)
y = 0

[State 7197]
type = VelSet
trigger1 = var(0)
y = 0

[State 7197]
type = ChangeAnim
trigger1 = var(0)
value = 7198
elem = 2
persistent = 0

[State 7197]
type = PlaySnd
trigger1 = var(0)
value = 197,0
Channel = 20

[State 7197]
type = Turn
trigger1 = var(0)
persistent = 0

[State 7197]
type = VelSet
trigger1 = var(0)
y = -4
persistent = 0

[State 7197]
type = VarSet
trigger1 = var(0)
var(0) = 0

[State 7197]
type = Explod
trigger1 = AnimElem = 5, = 30
anim = 21541
ontop = 1

[State 7197]
type = PlaySnd
trigger1 = AnimElem = 5, = 30
value = 1550,4
Channel = 20

[State 7197]
type = AssertSpecial
trigger1 = AnimElem = 5, >= 30
flag = invisible

[State 7197]
type = ChangeState
trigger1 = AnimElem = 5, >= 37
value = 199
ctrl = 0

;---------------------------------------------------------------------------
; Introduction 

[Statedef 7198]
type = S
ctrl = 0
physics = N
anim = 9800
velset = 0,0
sprpriority = 3

[State 7198]
type = screenbound
trigger1 = Time >= 0
value = 0
movecamera = 0, 0

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

[State 7198]
type = Explod
trigger1 = Time = 1
anim = 6311
ontop = 1
ownpal = 1
pos = 0,-floor(Pos Y)

[State 7198]
type = Explod
trigger1 = Time = 1
anim = 6311
facing = -1
ontop = 1
ownpal = 1
pos = 0,-floor(Pos Y)

[State 7198]
type = Helper
trigger1 = Time = 2
stateno = 6199
ownpal = 1

[State 7198]
type = PosSet
trigger1 = Time = 4
y = -240

[State 7198]
type = ChangeAnim
trigger1 = Time = 4
value = 7199

[State 7198] ;Freeze animation until PreIntro is over
type = null;ChangeAnim
trigger1 = RoundState = 0
value = 190

[State 7198] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 7198]
type = PlaySnd
trigger1 = Time = 8
value = 198,0
persistent = 0
Channel = 20

[State 7198]
type = VelSet
trigger1 = Pos Y < 0
y = 0.5

[State 7198]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 198
ctrl = 0

;---------------------------------------------------------------------------
; Jump Land
[Statedef 198]
type    = S
physics = S
ctrl = 0
anim = 47
facep2 = 1
movehitpersist = 1

[State 198]
type = null;ChangeAnim
trigger1 = Time = 0
value = ifelse((vel x)=0, 47, ifelse((vel x)>0, 48, 49))

[State 198]
type = VelSet
trigger1 = Time = 0
y = 0

[State 198]
type = PosSet
trigger1 = Time = 0
y = 0

;This controller plays a sound everytime  lands from a jump
[State 198, Landing Sound]
type = PlaySnd
trigger1 = Time = 1
value = 52,2

[State 198]
type = Explod
trigger1 = Time = 1
anim = 7053
sprpriority = -2
pos = 0,10

[State 198]
type = null;EnvShake
trigger1 = Time = 1
time = 8

[State 198]
type = null;CtrlSet
trigger1 = Time = 2
value = 1

[State 198]
type = ChangeState
trigger1 = AnimTime = 0
value = 199
ctrl = 0

;----------------------------------------------- 
[Statedef 199]; Move around before match 
type = S 
physics =S 
sprpriority = 0 
anim = 0
velset = 0,0

[State 199, AvX ChangeState]
type = ChangeState
trigger1 = 1
value = 0
ctrl = 0

[State 199]
type = PosSet 
trigger1 = 1
y = 0 

[State 199]
type = VelSet 
trigger1 = Time = 0 
y = 0

[State 199]
type = VelSet 
trigger1 = command = "holdfwd" 
x = 2.4 

[State 199]
type = VelSet 
trigger1 = command = "holdback" 
x = -2.0 

[State 199]
type = ChangeAnim 
trigger1 = command = "holdfwd" 
trigger1 = Anim != 20
value = 20

[State 199]
type = ChangeAnim 
trigger1 = command = "holdback" 
trigger1 = Anim != 21
value = 21

[State 199]
type = null;ChangeAnim
;triggerall = var(29)=0
trigger1 = command != "holdback" 
trigger1 = command != "holdfwd" 
trigger1 = Anim != 1
value = 1

[State 199]
type = ChangeAnim
triggerall = var(29)=1
trigger1 = command != "holdback"
trigger1 = command != "holdfwd"
trigger1 = Anim != 0
value = 0

[State 199] 
type = VelSet 
trigger1 = command != "holdback" 
trigger1 = command != "holdfwd" 
x = 0 

[State 199]
type = VarSet 
trigger1 = roundstate != 2 
var(1) = floor(pos x) 

[State 199]
type = posset 
trigger1 = roundstate = 2 
trigger1 = var(1) != 0 
x = var(1) 

[State 199]
type = varset 
trigger1 = roundstate = 2 
var(1) = 0 

[State 199]
type = changestate 
trigger1 = ctrl 
value = ifelse((command = "holdfwd") || (command ="holdback"),20,0)


;---------------------------------------------------------------------------
; Taunt

[Statedef 195]
type = S
ctrl = 0
movetype = A
physics = N
poweradd = 50
anim = 195
velset = 0,0
sprpriority = 0

[State 195] ;taunt
type = PlaySnd
triggerall = var(29) = 0
trigger1 = AnimElem = 4
value = 181,1

[State 195] ;You wont win
type = PlaySnd
triggerall = var(29) = 1
trigger1 = AnimElem = 4
value = 150,7

[State 195]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1


;---------------------------------------------------------------------------
; Standing Punch

[Statedef 200]
type    = S                      
movetype= A                      
physics = S                      
juggle = 0;  = 1                      
velset = 0,0                     
ctrl = 0                        
anim = 200
poweradd = 14                   
sprpriority = 0      
facep2 = 1          

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

[State 200]
type = PlaySnd
triggerall = var(29) = 0
trigger1 = AnimElem = 2
value = 200,0

[State 200]
type = PlaySnd
triggerall = var(29) = 1
trigger1 = AnimElem = 2
value = 150,0

[State 200]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = S, NA   
air.cornerpush.veloff = -20
damage = 4*var(30),floor(var(30)/2)
animtype = Light                 
guardflag = MA                  
hitflag = MAF                    
priority = 3, Hit                
pausetime = 13,13
sparkno = 0;s7700
sparkxy = -10,-80
hitsound = S1,0
guardsound = S4,0                
;guard.sparkno = S8430
ground.type = High               
ground.slidetime = 15            
ground.hittime  = 10             
ground.velocity = -3  
air.type = High                  
air.velocity = -3         
air.hittime = 12                 
getpower = 14,7
;fall = 1
;air.fall = 1
;fall.recover =0
;p2stateno = 7740
;air.animtype = back
;air.type = Low
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0


[State 200]
type = VarAdd
trigger1 = MoveContact
var(19) = 1
ignorehitpause = 1
persistent = 0


[State 200]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 4, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0

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





;---------------------------------------------------------------------------
; Stand Medium Punch
[Statedef 210]
type    = S
movetype= A
physics = S
juggle = 0;  = 4
poweradd= 27
ctrl = 0
velset = 0,0
anim = 210
sprpriority = 0
facep2 = 1

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

[State 210]
type = PlaySnd
triggerall = var(29) = 0
trigger1 = AnimElem = 2
value = 210,0

[State 210]
type = PlaySnd
triggerall = var(29) = 1
trigger1 = AnimElem = 2
value = 150,1

[State 210]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = S, NA   
air.cornerpush.veloff = -20

animtype  = Medium
damage    = 7*var(30),floor(var(30)/2)
guardflag = MA
pausetime = 10,10
sparkno = 0;s7700
;guard.sparkno = S8430
sparkxy = -10,-90
hitsound   = S1,1
guardsound = S4,0
ground.type = High
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = -5
air.velocity = -5
getpower = 27,14
;fall.animtype = Up
;fall = 1
;air.fall = 1
;fall.recover =0
;p2stateno = 211
;air.animtype = back
;air.type = Low
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0
;p2stateno = 9020



[State 210]
type = VarAdd
trigger1 = MoveContact
var(20) = 1
ignorehitpause = 1
persistent = 0

[State 210]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 3, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0

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




;---------------------------------------------------------------------------
; Stand  St1rong Punch
[Statedef 220]
type    = S
movetype= A
physics = S
juggle = 0;  = 0
poweradd= 50
ctrl = 0
velset = 0,0
anim = 220
sprpriority = 0
facep2 = 1

[State 9000, Super Armor Save Animation]
type = VarSet
trigger1 = time <= 0
v = 24
value = AnimElemNo(0)
ignorehitpause = 1

[State 220]
type = PlaySnd
triggerall = prevstateno != 9000
trigger1 = AnimElem = 1
value = 0,2

[State 220]
type = PlaySnd
triggerall = prevstateno != 9000
triggerall = var(29) = 0
trigger1 = AnimElem = 1, = 5
value = 220,0

[State 220]
type = PlaySnd
triggerall = prevstateno != 9000
triggerall = var(29) = 1
trigger1 = AnimElem = 1, = 5
value = 150,2

[State 220]
type = HitDef
triggerall = fvar(30) = 0 || fvar(30) = 2
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = S, NA   
air.cornerpush.veloff = -20
animtype  = Hard
damage    = 11*var(30),floor(var(30)/2)
guardflag = MA
pausetime = 10,4
sparkno = 2;s7700
;guard.sparkno = S8430
sparkxy = -10,-50
hitsound   = S1,2
guardsound = S4,0
ground.type = Low
ground.slidetime = 55
ground.hittime  = 15
ground.velocity = 0,-7
air.velocity = 0,-7
getpower = 50,25
fall = 1
air.fall = 1
guard.cornerpush.veloff = -9
p2stateno = 5130
;p2getp1state = 0

[State 220]
type = VarAdd
trigger1 = MoveContact
var(21) = 1
ignorehitpause = 1
persistent = 0

[State 220]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 4, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0

[State 220];AvX Ground Bounce
type = VarSet
triggerall = fvar(30)=0
trigger1 = MoveContact
fv = 30
value = 1
ignorehitpause = 1
persistent = 0

[State 220];AvX Ground Bounce
type = VarSet
triggerall = fvar(30)=2
trigger1 = MoveContact
fv = 30
value = 3
ignorehitpause = 1
persistent = 0

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

;---------------------------------------------------------------------------
;Stand Kick
[Statedef 300]
type    = S
movetype= A
physics = S
juggle = 0;  = 4
poweradd= 13
ctrl = 0
velset = 0,0
anim = 300
sprpriority = 0
facep2 = 1

[State 300]
type = PlaySnd
trigger1 = AnimElem = 1
value = 0,0

[State 300]
type = PlaySnd
triggerall = var(29) = 0
trigger1 = AnimElem = 2
value = 210,0

[State 300]
type = PlaySnd
triggerall = var(29) = 1
trigger1 = AnimElem = 2
value = 150,1

[State 300]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = S, NA   
air.cornerpush.veloff = -20

animtype  = Light
damage    = 4*var(30),floor(var(30)/2)
guardflag = MA
pausetime = 13,13
sparkno = 0;s7700
;guard.sparkno = S8430
sparkxy = -10,-10
hitsound   = S1,4
guardsound = S4,0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -3
air.velocity = -3
getpower = 13,7
;fall = 1
;air.fall = 1
;fall.recover =0
;p2stateno = 9020

[State 300]
type = VarAdd
trigger1 = MoveContact
var(19) = 1
ignorehitpause = 1
persistent = 0


[State 300]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 5, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0

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


;---------------------------------------------------------------------------
;Stand Medium Kick
[Statedef 310]
type    = S
movetype= A
physics = S
juggle = 0;  = 4
poweradd= 27
ctrl = 0
velset = 0,0
anim = 310
sprpriority = 0
facep2 = 1

[State 310]
type = PlaySnd
trigger1 = Time = 1
value = 0,1

[State 310]
type = PlaySnd
triggerall = var(29) = 0
trigger1 = AnimElem = 2
value = 200,0

[State 310]
type = PlaySnd
triggerall = var(29) = 1
trigger1 = AnimElem = 2
value = 150,0

[State 310]
type = null;VarSet
trigger1 = Time = 0
fvar(0) = Pos X


[State 310]
type = null;PosAdd
trigger1 = AnimElem = 1, >= 1
trigger1 = AnimElem = 5, < 0
x = 4

[State 310]
type = null;PosAdd
trigger1 = Pos X > fvar(0)
trigger1 = AnimElemNo(0) = [9,13]
x = -4

[State 310]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = S, NA   
air.cornerpush.veloff = -20

animtype = Medium
damage    = 7*var(30),floor(var(30)/2)
hitflag = MAF
guardflag = MA
pausetime = 13,13
sparkno = 1;s7700
;guard.sparkno = S8430
sparkxy = -10,-80
hitsound   = S1,5
guardsound = S4,0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = -5
air.velocity = -5
getpower = 27,14
;fall = 1
;air.fall = 1
;fall.recover =0
;p2stateno = 9020


[State 310]
type = VarAdd
trigger1 = MoveContact
var(20) = 1
ignorehitpause = 1
persistent = 0


[State 310]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 6, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0


[State 310]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1



;---------------------------------------------------------------------------
;Stand Strong Kick
[Statedef 320]
type    = S
movetype= A
physics = N
juggle = 0;  = 4
poweradd= 50
ctrl = 0
velset = 0,0
anim = 320
sprpriority = 0
facep2 = 1

[State 320]
type = PlaySnd
trigger1 = AnimElem = 4
value = 0,2

[State 320]
type = PlaySnd
triggerall = var(29) = 0
trigger1 = AnimElem = 5
value = 220,0

[State 320]
type = PlaySnd
triggerall = var(29) = 1
trigger1 = AnimElem = 5
value = 150,21


[State 320]
type = null;VarSet
trigger1 = Time = 0
fvar(0) = Pos X


[State 320]
type = null;PosAdd
trigger1 = AnimElem = 1, >= 1
trigger1 = AnimElem = 4, < 0
x = 5

[State 320]
type = null;PosAdd
trigger1 = Pos X > fvar(0)
trigger1 = AnimElemNo(0) = [6,15]
x = -5


[State 320]
type = HitDef
triggerall = fvar(30)<2
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = S, NA   
air.cornerpush.veloff = -20

animtype = Hard
damage    = 11*var(30),floor(var(30)/2)
guardflag = MA
pausetime = 20,7
sparkno = 2;s7700
;guard.sparkno = S8430
sparkxy = -10,-70
hitsound   = S1,6
guardsound = S4,0
ground.type = High
ground.slidetime = 20
ground.hittime  = 15
ground.velocity = -8,-13
air.velocity = -8,-13
getpower = 50,20
;fall = 1
;air.fall = 1
;fall.recover =0
p2stateno = 5045
;p2getp1state = 0


[State 320]
type = null;Explod
trigger1 = MoveHit
anim = 7025
postype = p2
ontop = 1
ownpal = 1
pos = 0,-abs(EnemyNear, const(size.mid.pos.y))
persistent = 0
facing = -1
ignorehitpause = 1

[State 320]
type = VarAdd
trigger1 = MoveContact
var(21) = 1
ignorehitpause = 1
persistent = 0


[State 320]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 11, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0

[State 320];AvX Wall Bounce
type = VarSet
triggerall = fvar(30)=0
trigger1 = MoveContact
fv = 30
value = 2
ignorehitpause = 1
persistent = 0

[State 320];AvX Wall Bounce
type = VarSet
triggerall = fvar(30)=1
trigger1 = MoveContact
fv = 30
value = 3
ignorehitpause = 1
persistent = 0

[State 320]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1


;---------------------------------------------------------------------------
;Crouch Punch
[Statedef 400]
type    = C
movetype= A
physics = C
juggle = 0;  = 5
poweradd= 13
ctrl = 0
anim = 400
sprpriority = 0
velset = 0,0 
facep2 = 1

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

[State 400]
type = PlaySnd
triggerall = var(29) = 0
trigger1 = AnimElem = 1, = 3
value = 210,0

[State 400]
type = PlaySnd
triggerall = var(29) = 1
trigger1 = AnimElem = 1, = 3
value = 150,1

[State 400]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = C, NA             
damage = 4*var(30),floor(var(30)/2)      
animtype = Light                 
hitflag = M
guardflag = L
priority = 3, Hit                
pausetime = 13,13
sparkno = 0;s7700
sparkxy = -10,-30
hitsound = S1,0        
guardsound = S4,0                
;guard.sparkno = S8430
ground.type = Low               
ground.slidetime = 15            
ground.hittime  = 10             
ground.velocity = -3    
getpower = 13,7
;fall = 1
;air.fall = 1
;fall.recover =0
;p2stateno = 9020
;air.animtype = back
;air.type = Low
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0


[State 400]
type = VarAdd
trigger1 = MoveContact
var(19) = 1
persistent = 0


[State 400]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 3, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0

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



;---------------------------------------------------------------------------
;Crouch Medium Punch
[Statedef 410]
type    = C
movetype= A
physics = C
juggle = 0;  = 5
poweradd= 27
ctrl = 0
anim = 410
sprpriority = 0
velset = 0,0 
facep2 = 1

[State 410]
type = PlaySnd
triggerall = var(29) = 0
trigger1 = AnimElem = 1
value = 0,1

[State 410]
type = PlaySnd
triggerall = var(29) = 0
trigger1 = AnimElem = 2
value = 200,0

[State 410]
type = PlaySnd
triggerall = var(29) = 1
trigger1 = AnimElem = 2
value = 150,0

[State 410]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = C, NA             
damage = 7*var(30),floor(var(30)/2)             
animtype = Medium                 
hitflag = MAF
guardflag = MA
priority = 3, Hit                
pausetime = 13,13
sparkno = 1;s7700
sparkxy = -10,-50
hitsound = S1,1
guardsound = S4,0                
;guard.sparkno = S8430
ground.type = Low               
ground.slidetime = 15            
ground.hittime  = 15             
ground.velocity = -5    
;ground.velocity = -1,-9     
air.velocity = -5                    
getpower = 27,14
;fall = 1
;air.fall = 1
;fall.recover =0
;p2stateno = 9020
;air.animtype = back
;air.type = Low
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0

[State 410]
type = VarAdd
trigger1 = MoveContact
var(20) = 1
ignorehitpause = 1
persistent = 0

[State 410]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 4, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0


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

;---------------------------------------------------------------------------
;Crouch Strong Punch

[Statedef 420]
type    = C
movetype= A
physics = C
juggle = 0;  = 6
poweradd= 50
ctrl = 0
anim = 420
sprpriority = 0
velset = 0,0
facep2 = 1

;EoH Launch circle
[State 450, 4]
type = null;Explod
trigger1 = MoveHit
removetime = -2
id = 6003
anim = 4444
persistent = 0
pos = 30,-60
postype = p1
sprpriority = 2
;facing = -1
ownpal = 1
bindtime = 1
;supermove = 1
supermovetime = 0
ontop = 1
ignorehitpause = 1
scale = 2.20, 0.64

[State 420, 5]
type = null;Explod
trigger1 = MoveHit
removetime = -2
id = 6003
anim = 4445
persistent = 0
pos = 30,-60
postype = p1
sprpriority = 2
;facing = -1
ownpal = 1
bindtime = 1
;supermove = 1
supermovetime = 0
ontop = 1
ignorehitpause = 1
scale = 2.20, 0.64

[State 420]
type = PlaySnd
trigger1 = AnimElem = 1
value = 0,2

[State 420]
type = PlaySnd
triggerall = var(29) = 0
trigger1 = AnimElem = 2
value = 220,random%2

[State 420]
type = PlaySnd
triggerall = var(29) = 1
trigger1 = AnimElem = 2
value = 150,22

[State 420]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = C, NA
damage    = 11*var(30),floor(var(30)/2)
animtype  = Hard
hitflag = MAF
guardflag = MA
pausetime = 12,12;7,13
sparkxy = -10,-60
sparkno = 2;s7700
hitsound   = S1,2 
guardsound = S4,0
;guard.sparkno = S8430
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = 0,-13
air.velocity = 0,-12
getpower = 50,20
;fall = 1
;air.fall = 1
;fall.recover =0
;fall.animtype = Hard
p2stateno = 5060
;p2getp1state = 0

[State 420]
type = Explod
trigger1 = MoveHit
anim = 7025
postype = p2
ontop = 1
ownpal = 1
pos = 0,-abs(EnemyNear, const(size.mid.pos.y))
persistent = 0
facing = -1
ignorehitpause = 1


[State 420]
type = VarAdd
trigger1 = MoveContact
var(21) = 1
ignorehitpause = 1
persistent = 0


[State 420]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 6, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0

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


;---------------------------------------------------------------------------
;Crouch Kick
[Statedef 500]
type    = C
movetype= A
physics = C
juggle = 0;  = 5
poweradd= 13
ctrl = 0
anim = 500
sprpriority = 0
velset = 0,0 
facep2 = 1

[State 500]
type = PlaySnd
trigger1 = AnimElem = 1
value = 0,0

[State 500]
type = PlaySnd
triggerall = var(29) = 0
trigger1 = AnimElem = 2
value = 210,0

[State 500]
type = PlaySnd
triggerall = var(29) = 1
trigger1 = AnimElem = 2
value = 150,1

[State 500]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = C, NA             
damage = 4*var(30),floor(var(30)/2)           
animtype = Light                 
guardflag = L                 
hitflag = M
priority = 3, Hit                
pausetime = 13,13
sparkno = 0;s7700
sparkxy = -10,-10
hitsound = S1,4        
guardsound = S4,0                
;guard.sparkno = S8430
ground.type = Low               
ground.slidetime = 10            
ground.hittime  = 10             
ground.velocity = -3
air.velocity = -3
getpower = 13,7
;fall = 1
;air.fall = 1
;fall.recover =0
;p2stateno = 9020
;air.animtype = back
;air.type = Low
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = -2*(enemynear,statetype = L)
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0

[State 500]
type = VarAdd
trigger1 = MoveContact
var(19) = 1
ignorehitpause = 1
persistent = 0


[State 500]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 4, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0

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


;---------------------------------------------------------------------------
;Crouch Medium Kick
[Statedef 510]
type    = C
movetype= A
physics = C
juggle = 0;  = 5
poweradd= 27
ctrl = 0
anim = 510
sprpriority = 0
velset = 0,0 
facep2 = 1

[State 510]
type = PlaySnd
trigger1 = AnimElem = 1
value = 0,1

[State 510]
type = PlaySnd
triggerall = var(29) = 0
trigger1 = AnimElem = 2
value = 200,0

[State 510]
type = PlaySnd
triggerall = var(29) = 1
trigger1 = AnimElem = 2
value = 150,0


[State 510]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = C, NA
animtype = Medium
damage    = 7*var(30),floor(var(30)/2)
hitflag = MAF
guardflag = MA
pausetime = 13,13
sparkno = 1;s7700
;guard.sparkno = S8430
sparkxy = -10,-10
hitsound   = S1,5
guardsound = S4,0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = -5
air.velocity = -5
getpower = 27,14
;fall = 1
;air.fall = 1
;fall.recover =0



[State 510]
type = VarAdd
trigger1 = MoveContact
var(20) = 1
ignorehitpause = 1
persistent = 0


[State 510]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 4, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0

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



;---------------------------------------------------------------------------
;Crouch Strong Kick
[Statedef 520]
type    = C
movetype= A
physics = N
juggle = 0;  = 4
poweradd= 50
ctrl = 0
velset = 0,0
anim = 520
sprpriority = 0
facep2 = 1

[State 520]
type = PlaySnd
trigger1 = AnimElem = 1
value = 0,2

[State 520]
type = PlaySnd
triggerall = var(29) = 0
trigger1 = AnimElem = 2
value = 220,0

[State 520]
type = PlaySnd
triggerall = var(29) = 1
trigger1 = AnimElem = 2
value = 150,21

[State 520]
type = HitDef
triggerall = fvar(30)<2
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = C, NA
animtype = Hard
damage    = 11*var(30),floor(var(30)/2)
hitflag = MAF
guardflag = MA
pausetime = 13,13
sparkno = 2;s7700
;guard.sparkno = S8430
sparkxy = -10,-50
hitsound   = S1,6
guardsound = S4,0
ground.type = Low;Trip
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -30,-13;0,-4
air.velocity = -30,-13;0,-4
getpower = 50,20
;fall = 1
;air.fall = 1
;fall.recover =0
p2stateno = 5045
;p2getp1state = 0
;p2stateno = 7321


[State 520]
type = VarAdd
trigger1 = MoveContact
var(21) = 1
ignorehitpause = 1
persistent = 0


[State 520]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 4, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0

[State 520];AvX Wall Bounce
type = VarSet
triggerall = fvar(30)=0
trigger1 = MoveContact
fv = 30
value = 2
ignorehitpause = 1
persistent = 0

[State 520];AvX Wall Bounce
type = VarSet
triggerall = fvar(30)=1
trigger1 = MoveContact
fv = 30
value = 3
ignorehitpause = 1
persistent = 0

[State 520]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1


;---------------------------------------------------------------------------
;OverHead Atk
[Statedef 590]
type    = S
movetype= A
physics = N
juggle = 0;  = 3
poweradd= 60
ctrl = 0
velset = 0,0
anim = 590
sprpriority = 0
facep2 = 1


[State 590]
type = PlaySnd
trigger1 = AnimElem = 1
value = 0,1


[State 590]
type = VelSet
trigger1 = AnimElem = 2
x = 3
y = -4

[State 590]
type = VelAdd
trigger1 = Pos Y < 0
y = 0.35


[State 590]
type = StateTypeSet
trigger1 = Pos Y < 0
statetype = A


[State 590]
type = HitDef
attr = S, NA   
air.cornerpush.veloff = -20

trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 7*var(30),floor(var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = HA
pausetime = 13,13
sparkxy = -10,-80+floor(P2Dist Y)
hitsound   = S1,2
guardsound = S4,0
sparkno = 2;s7700
;guard.sparkno = S8430
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -9,0
air.velocity = -7,-3
guard.velocity = -7
airguard.velocity = -7
;fall.xvelocity = -3
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
;fall = 0
;air.fall = 1
;fall.recover = 0
;fall.animtype = Up
;p2stateno = 9020
getpower = 50,25




[State 590]
type = null;VarAdd
trigger1 = !MoveContact
trigger1 = AnimElem = 6, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0

[State 590]
type = ChangeState
trigger1 = AnimTime = 0 && StateType != A
value = 0
ctrl = 1



[State 590]
type = null;ChangeState
trigger1 = AnimTime = 0 && StateType = A
value = 635
ctrl = 0


[State 590]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0

;---------------------------------------------------------------------------
;Air Punch
[Statedef 600]
type    = A
movetype= A
physics = N
juggle = 0;  = 1
poweradd= 13
ctrl = 0
anim = 600
sprpriority = 0
;velset = 0,0
facep2 = 1

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

[State 600]
type = PlaySnd
triggerall = var(29) = 0
trigger1 = Time = 4
value = 210,0

[State 600]
type = PlaySnd
triggerall = var(29) = 1
trigger1 = Time = 4
value = 150,1

[State 600]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, NA
animtype  = Light
damage    = 4*var(30),floor(var(30)/2)
guardflag = HA
pausetime = 10,10
sparkno = 0;s7700
;guard.sparkno = S8430
sparkxy = -10,-90+floor(P2Dist Y)
hitsound   = S1,0
guardsound = S4,0
ground.type = High
air.type = Low
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -3
air.velocity = 0,((vel y)-.2)
getpower = 13,7


[State 600]
type = VarAdd
trigger1 = MoveContact
var(19) = 1
ignorehitpause = 1
persistent = 0

[State 600]
type = null;VarAdd
trigger1 = !MoveContact && AnimElem = 1, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0

[State 600]
type = CtrlSet
trigger1 = Anim = 70
value = 1
persistent = 0

[State 600]
type = VelAdd
trigger1 = Pos Y < 0; && !var(54)
trigger2 = Anim = 70
y = 0.3



[State 600]
type = VelSet
trigger1 = MoveContact && Var(59)
x = (p2bodydist x)*0.03
persistent = 0


[State 600]
type = null;ChangeState
trigger1 = AnimTime = 0 && var(54)
value = 1335
ctrl = 1


[State 600]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 70
persistent = 0

[State 600]
type = StateTypeSet
trigger1 = Anim = 70
movetype = I
persistent = 0

[State 600]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0


;---------------------------------------------------------------------------
;Air Medium Punch
[Statedef 610]
type    = A
movetype= A
physics = N
juggle = 0;  = 1
poweradd= 27
ctrl = 0
anim = 610
sprpriority = 0
;velset = 0,0
facep2 = 1

[State 610, VelSet]
type = VelSet
triggerall = anim = 610
trigger1 = animelem = 2
x = -0.75
y = -2.75

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

[State 610]
type = PlaySnd
triggerall = var(29) = 0
trigger1 = Time = 5
value = 220,random%2

[State 610]
type = PlaySnd
triggerall = var(29) = 1
trigger1 = Time = 5
value = 150,2

[State 610]
type = PlaySnd
trigger1 = Time = 17
value = 620,0

[State 610]
type = Helper
trigger1 = Time = 15
stateno = 6620
ownpal = 1

[State 610]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, NA
animtype  = Hard
damage    = 7*var(30),floor(var(30)/2)
guardflag = HA
pausetime = 12,25
sparkno = 1;s7700
;guard.sparkno = S8430
sparkxy = -10,-70+floor(P2Dist Y)
hitsound   = S1,1
guardsound = S4,0
ground.type = High
air.type = Low
ground.slidetime = 15
ground.hittime  = 25
ground.velocity = -5
air.velocity = 0,((vel y)-.2)
getpower = 27,14

[State 610]
type = VarAdd
trigger1 = MoveContact
var(20) = 1
ignorehitpause = 1
persistent = 0

[State 610]
type = CtrlSet
trigger1 = Anim = 70
value = 1
persistent = 0

[State 610]
type = VelAdd
trigger1 = Pos Y < 0; && !var(54)
trigger2 = Anim = 70
y = 0.3


[State 610]
type = VelSet
trigger1 = MoveContact && Var(59)
x = (p2bodydist x)*0.03
persistent = 0

[State 610]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 70
persistent = 0

[State 610]
type = StateTypeSet
trigger1 = Anim = 70
movetype = I
persistent = 0

[State 610]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0

;---------------------------------------------------------------------------
;Air Strong Punch
[Statedef 620]
type    = A
movetype= A
physics = A
juggle = 0;  = 1
poweradd= 50
;velset = 0,0
ctrl = 0
anim = 620
sprpriority = 0
facep2 = 1

[State 620, VelSet]
type = VelSet
trigger1 =movehit
x = 0

[State 620]
type = PlaySnd

trigger1 = AnimElem = 1
value = 0,2

[State 620]
type = PlaySnd
triggerall = var(29) = 0
trigger1 = AnimElem = 1, = 5
value = 220,random%2

[State 620]
type = PlaySnd
triggerall = var(29) = 1
trigger1 = AnimElem = 1, = 4
value = 150,2

[State 620]
type = HitDef
triggerall = fvar(30) = 0 || fvar(30) = 2
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, NA
animtype  = Hard
damage    = 11*var(30),floor(var(30)/2)
guardflag = HA
pausetime = 5,7
sparkno = 2;s7700
;guard.sparkno = S8430
sparkxy = -20,-70+floor(P2Dist Y)
hitsound   = S1,2
guardsound = S4,0
ground.type = High
;air.type = Low
ground.slidetime = 15
ground.hittime  = 20
air.hittime = 25
ground.velocity = 0,17
air.velocity = 0,17
getpower = 50,20
fall = 1;(enemynear,statetype = A)
air.fall = 1
fall.recover =0
p2stateno = 5130
;p2getp1state = 0

[State 620]
type = HitDef
triggerall = pos y < - 200
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, NA
animtype  = Hard
damage    = 11*var(30),floor(var(30)/2)
guardflag = HA
pausetime = 5,7
sparkno = 0;s7700
;guard.sparkno = S8430
sparkxy = -20,-70+floor(P2Dist Y)
hitsound   = S1,2
guardsound = S4,0
ground.type = High
;air.type = Low
ground.slidetime = 15
ground.hittime  = 20
air.hittime = 25
ground.velocity = 0,17
air.velocity = 0,17
getpower = 50,20
fall = 1;(enemynear,statetype = A)
air.fall = 1
fall.recover =0
;p2stateno = 5130
;p2getp1state = 0

[State 620]
type = VarAdd
trigger1 = MoveContact
var(21) = 1
ignorehitpause = 1
persistent = 0

[State 620]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 4, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0

[State 620];AvX Ground Bounce
type = VarSet
triggerall = fvar(30)=0
trigger1 = MoveContact
fv = 30
value = 1
ignorehitpause = 1
persistent = 0

[State 620];AvX Ground Bounce
type = VarSet
triggerall = fvar(30)=2
trigger1 = MoveContact
fv = 30
value = 3
ignorehitpause = 1
persistent = 0

[State 620]
type = ChangeState
trigger1 = animtime = 0
value = 50
ctrl = 0

;------------------------------------------------------------------------------------------------------------
; Stand to Air transistion
[Statedef 631]
type = A
movetype = A
physics = A
anim = 42
ctrl = 1
sprpriority = 2
;poweradd= 65
velset = (p2bodydist x)*0.03,-7
facep2 = 1


[State 631]
type = StateTypeSet
trigger1 = Pos Y < 0
statetype = A
persistent = 0

[State 631]
type = ChangeState
trigger1 = p2bodydist x < 90
trigger1 = random < 300
value = 700
ctrl = 0

[State 631]
type = ChangeState
trigger1 = p2bodydist x < 90
trigger1 = random < 200
value = 710
ctrl = 0

[State 631]
type = ChangeState
trigger1 = p2bodydist x < 100
trigger1 = random < 100
value = 720
ctrl = 0

[State 631]
type = ChangeState
trigger1 = p2bodydist x < 90
trigger1 = random < 300
value = 600
ctrl = 0

[State 631]
type = ChangeState
trigger1 = p2bodydist x < 100
trigger1 = random < 200
value = 610
ctrl = 0

[State 631]
type = ChangeState
trigger1 = p2bodydist x < 100
trigger1 = random < 100
value = 620
ctrl = 0

[State 631]
type = ChangeState
trigger1 = p2bodydist x < 100
value = 720
ctrl = 0


;------------------------------------------------------------------------------------------------------------
; Air Land
[Statedef 635]
type = A
movetype = I
physics = A
anim = 70
;ctrl = 0
sprpriority = 0
;poweradd= 65
velset = 0,0
facep2 = 1

[State 635]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0


;---------------------------------------------------------------------------
;Air Kick
[Statedef 700]
type    = A
movetype= A
physics = N
juggle = 0;  = 1
poweradd= 13
ctrl = 0
anim = 700
sprpriority = 0
;velset = 0,0
facep2 = 1

[State 700]
type = PlaySnd
trigger1 = Time = 1
value = 0,0

[State 700]
type = PlaySnd
triggerall = var(29) = 0
trigger1 = Time = 4
value = 210,0

[State 700]
type = PlaySnd
triggerall = var(29) = 1
trigger1 = Time = 4
value = 150,1

[State 700]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, NA
animtype  = Light
damage    = 4*var(30),floor(var(30)/2)
guardflag = MA
pausetime = 10,10
sparkno = 0;s7700
;guard.sparkno = S8430
sparkxy = -10,-90+floor(P2Dist Y)
hitsound   = S1,4
guardsound = S4,0
ground.type = High
air.type = Low
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -3
air.velocity = 0,((vel y)-.2)
getpower = 13,7


[State 700]
type = VarAdd
trigger1 = MoveContact
var(19) = 1
ignorehitpause = 1
persistent = 0

[State 700]
type = CtrlSet
trigger1 = Anim = 70
value = 1
persistent = 0

[State 700]
type = VelAdd
trigger1 = Pos Y < 0; && !var(54)
trigger2 = Anim = 70
y = 0.3

[State 700]
type = VelSet
trigger1 = MoveContact && var(59)
x = (p2bodydist x)*0.03
persistent = 0

[State 700]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 70
persistent = 0

[State 700]
type = StateTypeSet
trigger1 = Anim = 70
movetype = I
persistent = 0

[State 700] 
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0

;---------------------------------------------------------------------------
;Air Medium Kick 
[Statedef 710]
type    = A
movetype= A
physics = N
juggle = 0;  = 1
poweradd= 27
ctrl = 0
anim = 710
sprpriority = 0
;velset = 0,0
facep2 = 1

[State 710]
type = PlaySnd
trigger1 = Time = 1
value = 0,1

[State 710]
type = PlaySnd
triggerall = var(29) = 0
trigger1 = Time = 4
value = 200,0

[State 710]
type = PlaySnd
triggerall = var(29) = 1
trigger1 = Time = 4
value = 150,0

[State 710]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, NA
animtype  = Medium
damage    = 7*var(30),floor(var(30)/2)
guardflag = HA
pausetime = 13,13
sparkno = 1;s7700
;guard.sparkno = S8430
sparkxy = -10,-90+floor(P2Dist Y)
hitsound   = S1,5
guardsound = S4,0
ground.type = High
air.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -5
air.velocity = 0,((vel y)-.2)
getpower = 27,14

[State 710]
type = VarAdd
trigger1 = MoveContact
var(20) = 1
ignorehitpause = 1
persistent = 0

[State 710]
type = CtrlSet
trigger1 = Anim = 70
value = 1
persistent = 0

[State 710]
type = VelAdd
trigger1 = Pos Y < 0; && !var(54)
trigger2 = Anim = 70
y = 0.3

[State 710]
type = VelSet
trigger1 = MoveContact && var(59)
x = (p2bodydist x)*0.03
persistent = 0

[State 710]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 70
persistent = 0

[State 710]
type = StateTypeSet
trigger1 = Anim = 70
movetype = I
persistent = 0

[State 710]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0

;---------------------------------------------------------------------------
;Air Strong Kick 
[Statedef 720]
type    = A
movetype= A
physics = N
juggle = 0;  = 1
poweradd= 50
ctrl = 0
anim = 720
sprpriority = 0
;velset = 0,0
facep2 = 1

[State 720]
type = PlaySnd
trigger1 = Time = 1
value = 0,2

[State 720]
type = PlaySnd
triggerall = var(29) = 0
trigger1 = Time = 4
value = 220,random%2

[State 720]
type = PlaySnd
triggerall = var(29) = 1
trigger1 = Time = 4
value = 150,2

[State 720]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, NA
animtype  = Hard
damage    = 11*var(30),floor(var(30)/2)
guardflag = HA
pausetime = 13,13;0,17;7,10
sparkno = 2;s7700
;guard.sparkno = S8430
sparkxy = -10,-90+floor(P2Dist Y)
hitsound   = S1,6;2,4
guardsound = S4,0
ground.type = High
air.type = Low
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -9
air.velocity = -7,17
getpower = 50,20
fall = (enemynear,statetype = A)
air.fall = 1
fall.recover =0
;down.bounce = 1
;fall.xvelocity = -5
;fall.yvelocity = -5
;fall.recovertime = 12
;yaccel = 0.4

[State 720]
type = VarAdd
trigger1 = MoveContact
var(21) = 1
ignorehitpause = 1
persistent = 0

[State 720]
type = CtrlSet
trigger1 = Anim = 70
value = 1
persistent = 0

[State 720]
type = VelAdd
trigger1 = Pos Y < 0; && !var(54)
trigger2 = Anim = 70
y = 0.3

[State 720]
type = VelSet
trigger1 = MoveContact && var(59)
x = (p2bodydist x)*0.03
persistent = 0

[State 720]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 70
persistent = 0

[State 720]
type = StateTypeSet
trigger1 = Anim = 70
movetype = I
persistent = 0

[State 720]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0



;---------------------------------------------------------------------------
; Ground Throw - Attempt
[Statedef 800]
type    = S
movetype= A
physics = N
juggle = 0;  = 0
velset = 0,0
ctrl = 0
anim = 800
sprpriority = 0

[State 800]
type = HitDef
trigger1 = hitcount < 1
attr = S, NT          ;Attributes: Standing, Normal Throw
hitflag = M-          ;Affect only ground people who are not being hit
priority = 1, Miss    ;Throw has low priority, must be miss or dodge type.
sparkno = -1          ;No spark
p1sprpriority = 1     ;Draw p1's sprite in front of p2
p1facing = 1
p2facing = 1          ;Force p2 to face p`
p1stateno = 810       ;On success, changes to state 810
p2stateno = 820       ;If hit, p2 changes to state 820 
guard.dist = 0        ;This prevents p2 from going into a guard state if close
fall = 1              ;Force p2 into falling down
hitsound = S1,9 
id = 800

[State 800]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Throw

[Statedef 810]
type    = S
movetype= A
physics = N
anim = 810
poweradd = 60
juggle = 0;  = 0
velset = 0,0
ctrl = 0
sprpriority = 0

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

[State 810];Bind 1
type = TargetBind
trigger1 = AnimElemNo(0) = 1
pos = -161,-92

[State 810];Bind 2
type = TargetBind
trigger1 = AnimElemNo(0) = 2
pos = -96,-133

[State 810];Bind 3
type = TargetBind
trigger1 = AnimElemNo(0) = 3
pos = 3,-174

[State 810];Bind 4
type = TargetBind
trigger1 = AnimElemNo(0) = 4
pos = 92,-8

[State 810];Bind 5
type = TargetBind
trigger1 = AnimElemNo(0) = 5
pos = 92,-8

[State 810];Bind 5
type = TargetBind
trigger1 = AnimElemNo(0) = 6
pos = 92,-8

[State 810]
type = PlaySnd
trigger1 = AnimElem = 4
value = 5100,4

[State 810]
type = EnvShake
trigger1 = AnimElem = 4
time = 12

[State 810]
type = PlaySnd
triggerall = var(29)=0
trigger1 = AnimElem = 2
value = 220,0

[State 810]
type = PlaySnd
triggerall = var(29)=1
trigger1 = AnimElem = 2
value = 150,25

[State 810]
type = TargetLifeAdd
trigger1 = AnimElem = 4
value = -10*var(30)

[State 810]
type = PowerAdd
trigger1 = AnimElem = 4
value = 50

[State 810]
type = TargetState
trigger1 = AnimElem = 6
value = 823

[State 810]
type = ChangeState
trigger1 = AnimElem = 6
value = 813
ctrl = 0

[State 810]
type = ChangeState
trigger1 = !NumTarget(800)
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Throw End

[Statedef 813]
type    = S
movetype= I
physics = S
juggle = 0;  = 0
velset = 0,0
ctrl = 0
sprpriority = 0

[State 813]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1


;---------------------------------------------------------------------------
;Thrown

[Statedef 820]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = 1

[State 0, Turn]
type = Turn
triggerall = time = 0
trigger1 = ifelse(facing = 1,(enemy, facing = -1),(enemy, facing = 1))

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

[State 820]
type = ChangeAnim2
trigger1 = Time = 0
value = 820

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

[State 820]
type = DestroySelf
trigger1 = ishelper


;---------------------------------------------------------------------------
;Thrown

[Statedef 821]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = -2

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

[State 821]
type = ChangeAnim2
trigger1 = Time = 0
value = 821

[State 821]
type = Turn
trigger1 = facing = enemynear,facing


[State 821]
type = SelfState
trigger1 = !gethitvar(isbound)
value = 5050


[State 821]
type = DestroySelf
trigger1 = ishelper


;---------------------------------------------------------------------------
;Thrown

[Statedef 823]
type    = A
movetype= H
physics = N
;velset = -7,-7
poweradd = 60

[State 823]
type = ChangeAnim2
trigger1 = Time = 0
value = 823

[State 823]
type = VelSet
trigger1 = Time = 0
x = 13
y = -9

[State 823] ;Gravity
type = VelAdd
trigger1 = 1
y = .4

[State 823]
type = ChangeState
;triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist <= 10
trigger2 = FrontEdgeBodyDist <= 10
value = 5047

[State 823] ;Hit ground
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;Hit ground



;---------------------------------------------------------------------------
;Thrown

[Statedef 824]
type    = S
movetype= H
physics = N
velset = -7,0
;poweradd = 60




[State 824]
type = ScreenBound
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist < 65
trigger2 = FrontEdgeBodyDist < 65
value = 0
movecamera = 1,0


[State 824]
type = VelSet
trigger1 = BackEdgeBodyDist < 15
trigger2 = FrontEdgeBodyDist < 15
x = 0



[State 823]
type = SelfState
trigger1 = Time = 120
value = 0
ctrl = 1

;-------------------------------------------------------------------------
;Wall Smack
[Statedef 825]
type = A
movetype = H
physics = N
;velset = 0,0


[State 825, 4]
type = ChangeAnim2
trigger1 = time = 0
trigger1 = Vel Y = 0
value = 827


[State 825, Sound]
type = PlaySnd
trigger1 = Time = 0
value = F7,0

[State 825, Spark]
type = null;Explod
trigger1 = Time = 0
trigger1 = Anim = 827
anim = F72
pos = -20, floor(Pos Y)
sprpriority = 3


[State 825, 5]
type = null;Turn
trigger1 = time = 0

[State 825, 6]
type = VelSet
trigger1 = time = 0
x = ifelse(Vel X < 0,3,-3)
y = -5



[State 825, 7]
type = VelAdd
trigger1 = time >= 0
y = .39


[State 825, 8]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100


;-------------------------------------------------------------------------
;Hit Ground By Throw
[Statedef 826]
type = A
movetype = H
physics = N
velset = 0,0



[State 826, Spark]
type = null;Explod
trigger1 = Time = 0
anim = F62
pos = 0, -30
sprpriority = 3

[State 826, Sound]
type = PlaySnd
trigger1 = Time = 0
value = F7,0

[State 826, 5]
type = null;Turn
trigger1 = time = 0

[State 826, 6]
type = VelSet
trigger1 = time = 0
x = 2.6
;y = -7



[State 826, 7]
type = VelAdd
trigger1 = time >= 0
y = .39



[State 826, 8]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100


;-------------------------------------------------------------------------
;Wall Smack
[Statedef 827]
type = A
movetype = H
physics = N
;velset = 0,0


[State 827, 4]
type = null;ChangeAnim2
trigger1 = time = 0
value = 827


[State 827, Sound]
type = PlaySnd
trigger1 = Time = 0
value = F7,0

[State 827, Spark]
type = null;Explod
trigger1 = Time = 0
anim = F72
pos = 0, floor(Pos Y)
sprpriority = 3


[State 828, 5]
type = null;Turn
trigger1 = time = 0

[State 827, 6]
type = null;VelSet
trigger1 = time = 0
x = ifelse(Vel X < 0,3,-3)




[State 827, 7]
type = VelAdd
trigger1 = time >= 0
y = .39


[State 827, 8]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100



;---------------------------------------------------------------------------
; Toss - Attempt

; Description: Throws are not difficult to make, although then can be
;     tedious at times. Throw attempt states have a HitDef of a
;     special format. The key parameters in a throw are p1stateno
;     and p2stateno. If the HitDef successfully connects, then
;     the attacker will change to the state number specified by
;     p1stateno, and the opponent will be change to the state
;     number assigned to p2stateno. The special thing about p2stateno
;     is that the opponent will be temporarily brought into the
;     attacker's state file. In this case, no matter who the
;     opponent is, he will be taken to state 820 of this file (kfm.cns)
;     and remain here until the end of the throw (look at his debug
;     information when he is being thrown; the text changes to yellow
;     to mean that he is in another player's state file).
[Statedef 830]
type    = S
movetype= A
physics = N
juggle = 0;  = 0
velset = 0,0
ctrl = 0
anim = 800
sprpriority = 0



; Notes: The '-' symbol in the hitflag field means that it only affects
;   players who are not in a hit state. This prevents from combo-ing
;   into the throw. The priority should be set to a low number, such as
;   1 or 2, so that the throw does not take precedence over normal attacks.
;   The type of priority must always be set to "Miss" or "Dodge" for throws,
;   otherwise strange behavior can result.
[State 830]
type = HitDef
trigger1 = hitcount < 1
attr = S, NT          ;Attributes: Standing, Normal Throw
hitflag = M-          ;Affect only ground people who are not being hit
priority = 1, Miss    ;Throw has low priority, must be miss or dodge type.
sparkno = -1          ;No spark
p1sprpriority = 1     ;Draw p1's sprite in front of p2
                      ;p2's sprite priority is set to 0 by default
p1facing = 1
p2facing = 1          ;Force p2 to face p`
p1stateno = 840       ;On success, changes to state 840
p2stateno = 850       ;If hit, p2 changes to state 850
guard.dist = 0        ;This prevents p2 from going into a guard state if close
fall = 1              ;Force p2 into falling down
hitsound = S1,9 
id = 800


[State 830]
type = null;VarSet
trigger1 = AnimElem = 5
var(9) = 1
persistent = 0

[State 830]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1


;---------------------------------------------------------------------------
; Toss

[Statedef 840]
type    = S
movetype= A
physics = N
anim = 840
poweradd = 60
juggle = 0;  = 0
velset = 0,0
ctrl = 0
sprpriority = 0

[State 840]
type = null;Turn
trigger1 = Time = 0

[State 840]
type = null;Explod
trigger1 = Time = 0
anim = 7515
ontop = 1
pos = 85,-137

[State 840]
type = null;PlayerPush
trigger1 = 1
value = 0

[State 840]
type = null;NotHitBy
trigger1 = 1
value = SCA

[State 840];Bind 1
type = TargetBind
trigger1 = AnimElemNo(0) = 1
pos = -59,-67

[State 840];Bind 2
type = TargetBind
trigger1 = AnimElemNo(0) = 2
pos = -59,-68

[State 840];Bind 3
type = TargetBind
trigger1 = AnimElemNo(0) = 3
pos = -58,-69

[State 840];Bind 4
type = TargetBind
trigger1 = AnimElemNo(0) = 4
pos = 51,-17

[State 840]
type = PlaySnd
triggerall = var(29)=0
trigger1 = AnimElem = 3
value = 220,0

[State 840]
type = PlaySnd
triggerall = var(29)=1
trigger1 = AnimElem = 3
value = 150,25


[State 840]
type = VelSet
trigger1 = AnimElem = 3
y = -3


[State 840]
type = VelAdd
trigger1 = Pos Y < 0
y = 0.4

[State 840]
type = StateTypeSet
trigger1 = Pos Y < 0
statetype = A
persistent = 0


[State 840]
type = TargetState
trigger1 = AnimElemNo(0) = 4
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 851

[State 840]
type = ChangeState
trigger1 = AnimElemNo(0) = 4
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 841

[State 840]
type = ChangeState
trigger1 = !NumTarget(800)
value = 0+635*(StateType != A)
ctrl = 1



;---------------------------------------------------------------------------
; Toss

[Statedef 841]
type    = S
movetype= A
physics = N
anim = 841
poweradd = 60
juggle = 0;  = 0
velset = 0,0
ctrl = 0
sprpriority = 0

[State 841]
type = null;Turn
trigger1 = Time = 0

[State 841]
type = null;Explod
trigger1 = Time = 0
anim = 7515
ontop = 1
pos = 85,-137

[State 841]
type = null;PlayerPush
trigger1 = 1
value = 0

[State 841]
type = null;NotHitBy
trigger1 = 1
value = SCA

[State 841];Bind 1
type = TargetBind
trigger1 = AnimElemNo(0) = 1
pos = 41,-7

[State 841];Bind 2
type = TargetBind
trigger1 = AnimElemNo(0) = 2
pos = 42,0


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


[state 841]
type = null;Explod
trigger1 = AnimElem = 1
anim = 7052
id = 7052
sprpriority = -4
ownpal = 1
pos = 42,0

[State 841]
type = EnvShake
trigger1 = AnimElem = 1
time = 12


[State 841]
type = TargetState
trigger1 = Time = 12
value = 859

[State 841]
type = ChangeState
trigger1 = Time = 12
value = 843

[State 841]
type = ChangeState
trigger1 = !NumTarget(800)
value = 0
ctrl = 1



;---------------------------------------------------------------------------
; Toss End

[Statedef 843]
type    = A
movetype= I
physics = A
;anim = 841
;poweradd = 60
juggle = 0;  = 0
;velset = -3,-7
ctrl = 0
sprpriority = 0


[State 843]
type = null;Turn
trigger1 = Time = 0



[State 843]
type = PlayerPush
trigger1 = Time < 20
value = 0

[State 841]
type = VelSet
trigger1 = Time = 0
x = -2
y = -7

[State 843]
type = ChangeAnim
trigger1 = Time = 0
value = 840
elem = 5




[State 843]
type = null;VarAdd
trigger1 = AnimElem = 9, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0

[State 843]
type = null;ChangeState
trigger1 = AnimTime = 0
value = 12
ctrl = 1

[State 843]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0


;---------------------------------------------------------------------------
;Thrown

[Statedef 850]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = -1

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

[State 850]
type = ChangeAnim2
trigger1 = Time = 0
value = 850


[State 850]
type = null;ScreenBound
trigger1 = 1
value = 0
movecamera = 1,0



[State 850]
type = null;Turn
trigger1 = facing = enemynear,facing

[State 850]
type = SelfState
trigger1 = !gethitvar(isbound)
value = 5050


[State 850]
type = DestroySelf
trigger1 = ishelper



;---------------------------------------------------------------------------
;Thrown

[Statedef 851]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = -1

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

[State 851]
type = ChangeAnim2
trigger1 = Time = 0
value = 851


[State 851]
type = null;ScreenBound
trigger1 = 1
value = 0
movecamera = 1,0



[State 851]
type = null;Turn
trigger1 = AnimElem = 2;facing = enemynear,facing


[State 851]
type = SelfState
trigger1 = !gethitvar(isbound)
value = 5050


[State 851]
type = DestroySelf
trigger1 = ishelper


;---------------------------------------------------------------------------
;Thrown

[Statedef 853]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = -2

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

[State 853]
type = ChangeAnim2
trigger1 = Time = 0
value = 853


[State 853]
type = null;Turn
trigger1 = facing = enemynear,facing


[State 853]
type = SelfState
trigger1 = !gethitvar(isbound)
value = 5050


[State 853]
type = DestroySelf
trigger1 = ishelper


;---------------------------------------------------------------------------
;Thrown

[Statedef 855]
type    = A
movetype= H
physics = N
velset = 0,9
poweradd = 60
sprpriority = 4

[State 855]
type = null;ChangeAnim2
Trigger1 = Time = 0
value = 823


[State 855] ;Gravity
type = VelAdd
Trigger1 = 1
y = .4


[State 855]
type = ScreenBound
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist < 65
trigger2 = FrontEdgeBodyDist < 65
value = 1
movecamera = 1,0


[State 855]
type = null;ChangeState
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist <= 20
trigger2 = FrontEdgeBodyDist <= 20
value = 825


[State 855]
type = null;SelfState
trigger1 = BackEdgeBodyDist <= 15
trigger2 = FrontEdgeBodyDist <= 15
value = 5040


[State 855]
type = null;SelfState
trigger1 = Vel Y > 2
value = 5040

[State 8575] ;Hit ground
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;Hit ground
;---------------------------------------------------------------------------
;Thrown

[Statedef 857]
type    = A
movetype= H
physics = N
velset = -11,-10
poweradd = 60


[State 857]
type = ChangeAnim2
Trigger1 = Time = 0
value = 823


[State 857] ;Gravity
type = VelAdd
Trigger1 = 1
y = .4


[State 857]
type = ScreenBound
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist < 65
trigger2 = FrontEdgeBodyDist < 65
value = 1
movecamera = 1,0


[State 857]
type = null;ChangeState
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist <= 20
trigger2 = FrontEdgeBodyDist <= 20
value = 825


[State 857]
type = null;SelfState
trigger1 = BackEdgeBodyDist <= 15
trigger2 = FrontEdgeBodyDist <= 15
value = 5040


[State 857]
type = null;SelfState
trigger1 = Vel Y > 2
value = 5040

[State 857] ;Hit ground
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;Hit ground
;---------------------------------------------------------------------------
;Thrown

[Statedef 858]
type    = A
movetype= H
physics = N
velset = 0,17
poweradd = 60


[State 858]
type = ChangeAnim2
Trigger1 = Time = 0
value = 823


[State 858] ;Gravity
type = VelAdd
Trigger1 = 1
y = .4


[State 858]
type = ScreenBound
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist < 65
trigger2 = FrontEdgeBodyDist < 65
value = 1
movecamera = 1,0


[State 858]
type = null;ChangeState
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist <= 20
trigger2 = FrontEdgeBodyDist <= 20
value = 825


[State 858]
type = null;SelfState
trigger1 = BackEdgeBodyDist <= 15
trigger2 = FrontEdgeBodyDist <= 15
value = 5040


[State 858]
type = null;SelfState
trigger1 = Vel Y > 2
value = 5040

[State 858] ;Hit ground
type = null;SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;Hit ground

[State 858] ;Hit ground
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 859 ;Hit ground

;---------------------------------------------------------------------------
;Thrown

[Statedef 859]
type    = A
movetype= H
physics = N
;velset = -7,-9
poweradd = 60

[State 850]
type = null;Turn
trigger1 = Time = 0


[State 859]
type = ChangeAnim2
trigger1 = Time = 0
value = 823


[State 859]
type = VelSet
trigger1 = Time = 0
x = -5
y = -7

[State 859] ;Gravity
type = VelAdd
Trigger1 = 1
y = .4


[State 859]
type = null;ScreenBound
trigger1 = 1
value = 0
movecamera = 1,0

[State 859]
type = null;ScreenBound
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist < 65
trigger2 = FrontEdgeBodyDist < 65
value = 1
movecamera = 1,0


[State 859]
type = null;ChangeState
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist <= 20
trigger2 = FrontEdgeBodyDist <= 20
value = 825


[State 859]
type = null;SelfState
trigger1 = BackEdgeBodyDist <= 15
trigger2 = FrontEdgeBodyDist <= 15
value = 5040


[State 859]
type = null;SelfState
trigger1 = Vel Y > 2
value = 5040

[State 859] ;Hit ground
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;Hit ground



;---------------------------------------------------------------------------
; Air Throw - Attempt

[Statedef 920]
type    = A
movetype= A
physics = N
juggle = 0;  = 0
velset = 0,0
ctrl = 0
anim = 920
sprpriority = 2



[State 920]
type = HitDef
trigger1 = hitcount < 1
attr = A, NT          ;Attributes: Standing, Normal Throw
hitflag = A-          ;Affect only ground people who are not being hit
priority = 1, Miss    ;Throw has low priority, must be miss or dodge type.
sparkno = -1          ;No spark
p1sprpriority = 1     ;Draw p1's sprite in front of p2
                      ;p2's sprite priority is set to 0 by default
p1facing = 1
p2facing = 1          ;Force p2 to face p`
p1stateno = 930       ;On success, changes to state 940
p2stateno = 940       ;If hit, p2 changes to state 940 
guard.dist = 0        ;This prevents p2 from going into a guard state if close
fall = 1              ;Force p2 into falling down
hitsound = S1,9 
id = 800

[State 920]
type = null;CtrlSet
trigger1 = Time = 16
value = 1


[State 920]
type = null;VarSet
trigger1 = AnimElem = 4
var(9) = 1
persistent = 0


[State 920]
type = VelAdd
trigger1 = Time >= 8; && !var(54)
y = 0.4


[State 920]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 70
persistent = 0


[State 920]
type = null;ChangeAnim
trigger1 = Time = 8
value = ifelse((vel x)=0, 41, ifelse((vel x)>0, 42, 43))
persistent = 0

[State 920]
type = null;ChangeAnim
trigger1 = Vel y > -2
trigger1 = anim = [41,43]
trigger1 = SelfAnimExist(anim + 3)
value = Anim + 3
persistent = 0


[State 920]
type = null;VelAdd
trigger1 = Time >= 7; && !var(54)
y = 0.4


[State 920]
type = null;ChangeState
trigger1 = Time = 8 && var(54)
value = 1335
ctrl = 1

[State 920, 2]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0



;------------------------------------------------------------------------------------------------------------
;Arm  Helper
[Statedef 921]
type = S
movetype = I
physics =N
anim = 931
ctrl = 0
sprpriority = -2
velset = 0,0


[State 921]
type = null;AssertSpecial
trigger1 = 1
flag = noshadow


[State 921]
type = DestroySelf
trigger1 = Parent,Stateno != 930
trigger2 = AnimTime = 0

[State 921]
type = BindToParent
trigger1 = 1

;---------------------------------------------------------------------------
; Air Throw

[Statedef 930]
type    = A
movetype= A
physics = N
anim = 930
poweradd = 60
juggle = 0;  = 0
velset = 0,0
ctrl = 0
sprpriority = 0

[State 930]
type = null;Turn
trigger1 = Time = 0


[State 930]
type = null;Explod
trigger1 = Time = 0
anim = 7515
ontop = 1
pos = 22,-178

[State 930]
type = null;PlayerPush
trigger1 = 1
value = 0

[State 930]
type = null;NotHitBy
trigger1 = 1
value = SCA


[State 930]
type = null;ScreenBound
trigger1 = 1
value = 0
movecamara = 0,0



[State 930]
type = Helper
trigger1 = Time = 0
stateno = 921


[State 930]
type = TargetBind
trigger1 = AnimElemNo(0) = 1
pos = 89,-128


[State 930]
type = TargetBind
trigger1 = AnimElemNo(0) = 2
pos = -67,-178

[State 930]
type = TargetBind
trigger1 = AnimElemNo(0) = 3
pos = 1,-169


[State 930]
type = TargetBind
trigger1 = AnimElemNo(0) = 4
pos = 46,-45


[State 930]
type = TargetLifeAdd
trigger1 = AnimElem = 4
value = -10*var(30)


[State 930]
type = PowerAdd
trigger1 = AnimElem = 4
value = 50

[State 930]
type = TargetState
trigger1 = AnimElem = 4, = 4
value = 945


[State 930]
type = ChangeState
trigger1 = AnimElem = 4, = 4
value = 935
ctrl = 0



[State 930]
type = ChangeState
trigger1 = !NumTarget(800)
value = 935
ctrl = 1


;---------------------------------------------------------------------------
; Air Throw

[Statedef 931]
type    = S
movetype= A
physics = N
anim = 931
;poweradd = 60
juggle = 0;  = 0
velset = 0,0
ctrl = 0
sprpriority = 0

[State 931]
type = null;Turn
trigger1 = Time = 0


[State 931]
type = null;Explod
trigger1 = Time = 0
anim = 7515
ontop = 1
pos = 22,-178

[State 931]
type = null;PlayerPush
trigger1 = 1
value = 0

[State 931]
type = null;NotHitBy
trigger1 = 1
value = SCA


[State 931]
type = null;ScreenBound
trigger1 = Pos Y < -150
value = 0
movecamara = 0,0


[State 931]
type = TargetBind
trigger1 = AnimElemNo(0) = 1
pos = 0,0

[State 931]
type = TargetBind
trigger1 = AnimElemNo(0) = 2
pos = 0,0


[State 931]
type = TargetBind
trigger1 = AnimElemNo(0) = 3
pos = 0,-5


[State 931]
type = TargetBind
trigger1 = AnimElemNo(0) = 4
pos = 0,5


[State 931]
type = TargetBind
trigger1 = AnimElemNo(0) = 5
pos = 0,0

[State 931]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1,5


[State 931]
type = Explod
trigger1 = AnimElem = 2
anim = 8200+random%2
ontop = 1
pos = 0,-5
ownpal = 1



[state 931]
type = null;explod
trigger1 = AnimElem = 3
anim = 7050
postype = p2
pos = 0, 0
sprpriority = -4
ownpal = 1

[state 931]
type = PlaySnd
trigger1 = AnimElem = 3
value = 5100,4

[State 931]
type = EnvShake
trigger1 = AnimElem = 3
time = 8
ampl = -4



[State 931]
type = TargetLifeAdd
trigger1 = AnimElem = 3
value = -10*var(30)

[State 931]
type = PowerAdd
trigger1 = AnimElem = 3
value = 50


[State 931]
type = TargetState
trigger1 = AnimElem = 5
value = 943

[State 931]
type = ChangeState
trigger1 = AnimElem = 5
value = 935
ctrl = 0


[State 931]
type = ChangeState
trigger1 = !NumTarget(800)
value = 935
ctrl = 1


;---------------------------------------------------------------------------
; Air Throw

[Statedef 932]
type    = A
movetype= A
physics = N
anim = 932
;poweradd = 60
juggle = 0;  = 0
velset = 0,0
ctrl = 0
sprpriority = 2

[State 932]
type = null;Turn
trigger1 = Time = 0


[State 932]
type = null;Explod
trigger1 = Time = 0
anim = 7515
ontop = 1
pos = 22,-178

[State 932]
type = null;PlayerPush
trigger1 = 1
value = 0

[State 932]
type = null;NotHitBy
trigger1 = 1
value = SCA


[State 932]
type = TargetBind
trigger1 = AnimElemNo(0) = 1
pos = -1,0



[State 932]
type = ScreenBound
trigger1 = 1
value = 0
movecamara = 0,1

[State 932]
type = PlaySnd
trigger1 = Time = 0
value = 52,4



[State 932]
type = EnvShake
trigger1 = Time = 0
time = 8

[State 932]
type = Explod
trigger1 = Time = 0
anim = 8200+random%2
ontop = 1
pos = 10,0
ownpal = 1


[State 932]
type = TargetLifeAdd
trigger1 = Time = 0
value = -10*var(30)

[State 932]
type = PowerAdd
trigger1 = Time = 0
value = 50

[State 932]
type = TargetState
trigger1 = Time = 12
value = 943

[State 932]
type = ChangeState
trigger1 = Time = 12
value = 935
ctrl = 0


[State 932]
type = ChangeState
trigger1 = !NumTarget(800)
value = 935
ctrl = 1


;---------------------------------------------------------------------------
; Air Throw

[Statedef 933]
type    = A
movetype= A
physics = N
anim = 933
;poweradd = 60
juggle = 0;  = 0
velset = 0,0
ctrl = 0
sprpriority = 2

[State 933]
type = null;Turn
trigger1 = Time = 0


[State 933]
type = null;Explod
trigger1 = Time = 0
anim = 7515
ontop = 1
pos = 22,-178

[State 933]
type = null;PlayerPush
trigger1 = 1
value = 0

[State 933]
type = null;NotHitBy
trigger1 = 1
value = SCA


[State 933]
type = TargetBind
trigger1 = AnimElemNo(0) = 1
pos = 20,-69


[State 933]
type = TargetBind
trigger1 = AnimElemNo(0) = 2
pos = 15,-39


[State 933]
type = TargetLifeAdd
trigger1 = AnimElem = 2, = 3
value = -10*var(30)

[State 933]
type = PowerAdd
trigger1 = AnimElem = 2, = 3
value = 50

[State 933]
type = TargetState
trigger1 = AnimElem = 2, = 3
value = 943

[State 933]
type = ChangeState
trigger1 = AnimElem = 2, = 3
value = 935
ctrl = 0


[State 933]
type = ChangeState
trigger1 = !NumTarget(800)
value = 935
ctrl = 1


;---------------------------------------------------------------------------
; Air Throw End

[Statedef 935]
type    = A
movetype= I
physics = N
;anim = 70
;poweradd = 60
juggle = 0;  = 0
;velset = -3,-7
ctrl = 0
sprpriority = 0



[State 935]
type = PlayerPush
trigger1 = Time < 10
value = 0


[State 935]
type = null;VarSet
trigger1 = var(57)
var(57) = 0
persistent = 0


[State 935]
type = null;AfterImage
trigger1 = !var(57)
time = 0
length = 7
palbright = 30,30,130
palpostbright = 0,0,50
palcontrast =120,120,220
paladd = 0,0,0
palmul = 1,1,1
palcolor = 0
timegap = 2
framegap = 3


[State 935]
type = null;ChangeState
trigger1 = AnimTime = 0 && var(54)
value = 1335
ctrl = 1

[State 935]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 70
persistent = 0

[State 935]
type = VelAdd
trigger1 = 1
y = 0.4


[State 935]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0


;---------------------------------------------------------------------------
;Thrown 

[Statedef 940]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = -1

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


[State 940]
type = ChangeAnim2
trigger1 = Time = 0
value = 940


[State 940]
type = SelfState
trigger1 = !gethitvar(isbound)
value = 5050


[State 940]
type = DestroySelf
trigger1 = ishelper


;---------------------------------------------------------------------------
;Thrown 

[Statedef 941]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = -1

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


[State 941]
type = ChangeAnim2
trigger1 = Time = 0
value = 941

[State 941]
type = SelfState
trigger1 = !gethitvar(isbound)
value = 5050


[State 941]
type = DestroySelf
trigger1 = ishelper



;---------------------------------------------------------------------------
;Thrown 

[Statedef 942]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = 3

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


[State 942]
type = ChangeAnim2
trigger1 = Time = 0
value = 942

[State 942]
type = SelfState
trigger1 = !gethitvar(isbound)
value = 5050


[State 942]
type = DestroySelf
trigger1 = ishelper


;---------------------------------------------------------------------------
;Thrown 
[Statedef 943]
type    = A
movetype= H
physics = N
velset = -13,-7
poweradd = 60



[State 943]
type = ChangeAnim2
trigger1 = Time = 0
value = 823


[State 943] ;Gravity
type = VelAdd
Trigger1 = 1
y = .4


[State 943]
type = ScreenBound
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist < 65
trigger2 = FrontEdgeBodyDist < 65
value = 1
movecamera = 1,0


[State 943]
type = null;SelfState
trigger1 = BackEdgeBodyDist <= 15
trigger2 = FrontEdgeBodyDist <= 15
value = 5040


[State 943]
type = null;SelfState
trigger1 = Vel Y > 2 
value = 5040

[State 943] ;Hit ground
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;Hit ground


;---------------------------------------------------------------------------
;Thrown 
[Statedef 944]
type    = A
movetype= H
physics = N
velset = -1,-12
poweradd = 60



[State 944]
type = null;ChangeAnim2
trigger1 = Time = 0
value = 822


[State 944] ;Gravity
type = VelAdd
Trigger1 = 1
y = .4


[State 944]
type = ScreenBound
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist < 65
trigger2 = FrontEdgeBodyDist < 65
value = 1
movecamera = 1,0


[State 944]
type = null;SelfState
trigger1 = BackEdgeBodyDist <= 15
trigger2 = FrontEdgeBodyDist <= 15
value = 5040


[State 944]
type = null;SelfState
trigger1 = Vel Y > 3
value = 5040

[State 944] ;Hit ground
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;Hit ground



;---------------------------------------------------------------------------
;Thrown 
[Statedef 945]
type    = A
movetype= H
physics = N
velset = 0,9
poweradd = 60



[State 945]
type = null;ChangeAnim2
trigger1 = Time = 0
value = 822


[State 945] ;Gravity
type = VelAdd
trigger1 = 1
y = .4


[State 945]
type = ScreenBound
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist < 65
trigger2 = FrontEdgeBodyDist < 65
value = 1
movecamera = 1,0


[State 945]
type = null;SelfState
trigger1 = BackEdgeBodyDist <= 15
trigger2 = FrontEdgeBodyDist <= 15
value = 5040


[State 945]
type = null;SelfState
trigger1 = Vel Y > 3 
value = 5040

[State 945] ;Hit ground
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;Hit ground


;---------------------------------------------------------------------------
; Air Toss - Attempt

[Statedef 950]
type    = A
movetype= A
physics = N
juggle = 0;  = 0
velset = 0,0
ctrl = 0
anim = 920
sprpriority = 2



[State 950]
type = HitDef
trigger1 = hitcount < 1
attr = A, NT          ;Attributes: Standing, Normal Throw
hitflag = A-          ;Affect only ground people who are not being hit
priority = 1, Miss    ;Throw has low priority, must be miss or dodge type.
sparkno = -1          ;No spark
p1sprpriority = 1     ;Draw p1's sprite in front of p2
                      ;p2's sprite priority is set to 0 by default
p1facing = 1
p2facing = 1          ;Force p2 to face p`
p1stateno = 960       ;On success, changes to state 960
p2stateno = 970       ;If hit, p2 changes to state 970 
guard.dist = 0        ;This prevents p2 from going into a guard state if close
fall = 1              ;Force p2 into falling down
hitsound = S1,9 
id = 800

[State 950]
type = CtrlSet
trigger1 = Time = 10
value = 1

[State 950]
type = ChangeAnim
trigger1 = Time = 8
value = ifelse((vel x)=0, 41, ifelse((vel x)>0, 42, 43))
persistent = 0

[State 950]
type = ChangeAnim
trigger1 = Vel y > -2
trigger1 = anim = [41,43]
trigger1 = SelfAnimExist(anim + 3)
value = Anim + 3
persistent = 0


[State 950]
type = VelAdd
trigger1 = Time >= 7 && !var(54)
y = 0.4


[State 950]
type = ChangeState
trigger1 = Time = 8 && var(54)
value = 1335
ctrl = 1

[State 950, 2]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0


;---------------------------------------------------------------------------
; Air Toss

[Statedef 960]
type    = A
movetype= A
physics = N
anim = 960
poweradd = 60
juggle = 0;  = 0
velset = 0,0
ctrl = 0
sprpriority = 0

[State 960]
type = null;Turn
trigger1 = Time = 0


[State 960];Bind 1
type = TargetBind
trigger1 = AnimElemNo(0) = 1
pos = -59,-67

[State 960];Bind 2
type = TargetBind
trigger1 = AnimElemNo(0) = 2
pos = -59,-68

[State 960];Bind 3
type = TargetBind
trigger1 = AnimElemNo(0) = 3
pos = -58,-69

[State 960];Bind 4
type = TargetBind
trigger1 = AnimElemNo(0) = 4
pos = 51,-17

[State 960]
type = PlaySnd
triggerall = var(29)=0
trigger1 = AnimElem = 3
value = 220,0

[State 960]
type = PlaySnd
triggerall = var(29)=1
trigger1 = AnimElem = 3
value = 150,25


[State 960]
type = VelSet
trigger1 = AnimElem = 3
y = -3


[State 960]
type = VelAdd
trigger1 = Pos Y < 0
y = 0.4

[State 960]
type = StateTypeSet
trigger1 = Pos Y < 0
statetype = A
persistent = 0


[State 960]
type = TargetState
trigger1 = AnimElemNo(0) = 4
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 851

[State 960]
type = ChangeState
trigger1 = AnimElemNo(0) = 4
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 841

[State 960]
type = ChangeState
trigger1 = !NumTarget(800)
value = 0+635*(StateType != A)
ctrl = 1



;---------------------------------------------------------------------------
; Toss Down

[Statedef 963]
type    = A
movetype= A
physics = N
anim = 843
;poweradd = 60
juggle = 0;  = 0
velset = 0,0
ctrl = 0
sprpriority = 2



[State 960, Bind 1]
type = TargetBind
trigger1 = AnimElemNo(0) = [1,3]
pos = 15,-128


[State 960, Bind 2]
type = TargetBind
trigger1 = AnimElemNo(0) = 4
pos = 6,-123


[State 960, Bind 3]
type = TargetBind
trigger1 = AnimElemNo(0) = 5
pos = -17,-10


[State 960]
type = PlaySnd
trigger1 = AnimElem = 4
value = 320,0


[State 960]
type = TargetLifeAdd
trigger1 = AnimElem = 5
value = -10*var(30)

[State 960]
type = PowerAdd
trigger1 = AnimElem = 5
value = 50


[State 960]
type = TargetState
trigger1 = AnimElem = 5
value = 855

[State 960]
type = ChangeState
trigger1 = AnimElem = 5
value = 931
ctrl = 0

[State 960]
type = ChangeState
trigger1 = !NumTarget(950)
value = 931
ctrl = 0


;---------------------------------------------------------------------------
;Thrown

[Statedef 970]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = -1

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

[State 970]
type = ChangeAnim2
trigger1 = Time = 0
value = 850


[State 970]
type = null;ScreenBound
trigger1 = 1
value = 0
movecamera = 1,0



[State 970]
type = null;Turn
trigger1 = facing = enemynear,facing

[State 970]
type = SelfState
trigger1 = !gethitvar(isbound)
value = 5050


[State 970]
type = DestroySelf
trigger1 = ishelper



;---------------------------------------------------------------------------
;Gamma Wave Near
[Statedef 1240]
type    = S
movetype= A
physics = N
juggle = 0;  = 3
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1240
sprpriority = 0
facep2 = 1

[State 1240, ChangeAnim]
type = ChangeAnim
triggerall = var(29) = 1
trigger1 = anim != 1210
value = 1210
ignorehitpause = 1
persistent = 1

[State 1240, Explod]
type = Explod
trigger1 = time = 12
anim = 1200
ID = 1200
pos = 50,-8
removetime = -2
sprpriority = 0
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause = 1

[State 1240, VarAdd]
type = VarAdd
trigger1 = time = 0
v = 40
value = 1

[State 1240]
type = Explod
trigger1 = Time = 0 && StateType = S
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1

[State 1240];Gamma Wave
type = PlaySnd
triggerall = var(29)=0
trigger1 = AnimElem = 1
value = 1240,1

[State 1240];Red Wave
type = PlaySnd
triggerall = var(29)=1
trigger1 = AnimElem = 1
value = 150,17

[State 192];Red Hulk Smash
type = PlaySnd
triggerall = var(29)=1
trigger1 = AnimElem = 13
value = 150,18

[State 1240]
type = PlaySnd
trigger1 = Time = 15 -(3*var(29))
trigger2 = Time = 27 -(3*var(29))
value = 1240,0

[State 1240]
type = Helper
trigger1 = Time = 15 -(3*var(29))
stateno = 21240
id = 21240
ownpal = 1
pos = 52,0

[State 1240]
type = Helper
trigger1 = Time = 21 -(3*var(29))
stateno = 21241
id = 21240
ownpal = 1
pos = 126,0

[State 1240]
type = VarAdd
;trigger1 = !MoveContact
trigger1 = AnimElem = 12, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0

[State 1240, Varset]
type = varset
trigger1 = enemynear,movetype = H
fv = 29
value = 1

[State 1240]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Gamma Wave Mid
[Statedef 1250]
type    = S
movetype= A
physics = N
juggle = 0;  = 3
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1250
sprpriority = 0
facep2 = 1

[State 1240, ChangeAnim]
type = ChangeAnim
triggerall = var(29) = 1
trigger1 = anim != 1210
value = 1210
ignorehitpause = 1
persistent = 1

[State 1240, Explod]
type = Explod
trigger1 = time = 12
anim = 1200
ID = 1200
pos = 50,-8
removetime = -2
sprpriority = 0
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause = 1

[State 1250, VarAdd]
type = VarAdd
trigger1 = time = 0
v = 40
value = 1

[State 1250]
type = Explod
trigger1 = Time = 0 && StateType = S
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1

[State 1250]
type = PlaySnd
triggerall = var(29)=0
trigger1 = AnimElem = 1
value = 1240,1

[State 1250];Red Wave
type = PlaySnd
triggerall = var(29)=1
trigger1 = AnimElem = 1
value = 150,17

[State 1250]
type = PlaySnd
trigger1 = Time = 15 -(3*var(29)); AnimElem = 8
trigger2 = Time = 27 -(3*var(29)) || Time = 39 -(3*var(29))
value = 1240,0

[State 1250]
type = Helper
trigger1 = Time = 15 -(3*var(29))
stateno = 21240
id = 21240
ownpal = 1
pos = 52,0


[State 1250]
type = Helper
trigger1 = Time = 21 -(3*var(29))
stateno = 21240
id = 21240
ownpal = 1
pos = 126,0


[State 1250]
type = Helper
trigger1 = Time = 27 -(3*var(29))
stateno = 21241
id = 21240
ownpal = 1
pos = 198,0


[State 1250]
type = null;HitDef
attr = S, SA
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 2*var(30),floor(var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 3,3
sparkxy = -10,-70+floor(P2Dist Y)
hitsound   = S1,5
guardsound = S4,0
sparkno = 2;s7702
;guard.sparkno = S8430
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -9
air.velocity = -9
;guard.velocity = -9
;airguard.velocity = -9
;fall.xvelocity = -3
;ground.cornerpush.veloff = 0
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0
;fall = 1
;air.fall = 1
;fall.recover = 0
;fall.animtype = Up
;p2stateno = 9020
getpower = 20,10
;palfx.time = 1
;palfx.add = 256,256,256
;sprpriority = 3


[State 1250]
type = VarAdd
;trigger1 = !MoveContact
trigger1 = AnimElem = 12, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0

[State 1250, Varset]
type = varset
trigger1 = enemynear,movetype = H
fv = 29
value = 1

[State 1250]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Gamma Wave Far
[Statedef 1260]
type    = S
movetype= A
physics = N
juggle = 0;  = 3
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1260
sprpriority = 0
facep2 = 1

[State 1240, ChangeAnim]
type = ChangeAnim
triggerall = var(29) = 1
trigger1 = anim != 1210
value = 1210
ignorehitpause = 1
persistent = 1

[State 1240, Explod]
type = Explod
trigger1 = time = 12
anim = 1200
ID = 1200
pos = 50,-8
removetime = -2
sprpriority = 0
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause = 1

[State 1260, VarAdd]
type = VarAdd
trigger1 = time = 0
v = 40
value = 1

[State 1260]
type = Explod
trigger1 = Time = 0 && StateType = S
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1

[State 1260]
type = PlaySnd
triggerall = var(29)=0
trigger1 = AnimElem = 1
value = 1240,1

[State 1260];Red Wave
type = PlaySnd
triggerall = var(29)=1
trigger1 = AnimElem = 1
value = 150,17

[State 1260]
type = PlaySnd
trigger1 = Time = 15 -(3*var(29)); AnimElem = 8
trigger2 = Time = 27 -(3*var(29)) || Time = 39 -(3*var(29)) || Time = 51 -(3*var(29))
value = 1240,0

[State 1260]
type = Helper
trigger1 = Time = 15 -(3*var(29))
stateno = 21240
id = 21240
ownpal = 1
pos = 52,0


[State 1260]
type = Helper
trigger1 = Time = 21 -(3*var(29))
stateno = 21240
id = 21240
ownpal = 1
pos = 126,0


[State 1260]
type = Helper
trigger1 = Time = 27 -(3*var(29))
stateno = 21240
id = 21240
ownpal = 1
pos = 198,0


[State 1260]
type = Helper
trigger1 = Time = 32 -(3*var(29))
stateno = 21241
id = 21240
ownpal = 1
pos = 270,0

[State 1260]
type = null;HitDef
attr = S, SA
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 2*var(30),floor(var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 3,3
sparkxy = -10,-70+floor(P2Dist Y)
hitsound   = S1,5
guardsound = S4,0
sparkno = 2;s7702
;guard.sparkno = S8430
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -9
air.velocity = -9
;guard.velocity = -9
;airguard.velocity = -9
;fall.xvelocity = -3
;ground.cornerpush.veloff = 0
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0
;fall = 1
;air.fall = 1
;fall.recover = 0
;fall.animtype = Up
;p2stateno = 9020
getpower = 20,10
;palfx.time = 1
;palfx.add = 256,256,256
;sprpriority = 3

[State 1260]
type = VarAdd
;trigger1 = !MoveContact
trigger1 = AnimElem = 12, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0

[State 1260, Varset]
type = varset
trigger1 = enemynear,movetype = H
fv = 29
value = 1

[State 1260]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Gamma Tornado
[Statedef 1270]
type    = S
movetype= A
physics = N
juggle = 0;  = 3
poweradd= 50
ctrl = 0
velset = 0,0
anim = 1270
sprpriority = 0

[State 1270]
type = Explod
trigger1 = Time = 0 && StateType = S
anim = 7023
ontop = 1
ownpal = 1

[State 1270]
type = PlaySnd
triggerall = var(29)=0
trigger1 = AnimElem = 2
value = 1270,0

[State 1270];Smash
type = PlaySnd
triggerall = var(29)=1
trigger1 = AnimElem = 1
value = 150,13

[State 1270]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = S, ST          ;Attributes: Standing, Normal Throw
hitflag = M          ;Affect only ground people who are not being hit
priority = 3, Miss    ;Throw has low priority, must be miss or dodge type.
sparkno = -1          ;No spark
p1sprpriority = 1     ;Draw p1's sprite in front of p2
p1facing = 1
p2facing = 1          ;Force p2 to face p`
p1stateno = 21270       ;On success, changes to state 
p2stateno = 21280       ;If hit, p2 changes to state 
guard.dist = 0        ;This prevents p2 from going into a guard state if close
fall = 1              ;Force p2 into falling down
hitsound = S1,9 
id = 800
guardflag = M
guardsound = S4,0

[State 1270]
type = VarAdd
trigger1 = AnimElem = 5, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0

[State 1270]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Gamma Charge H Near
[Statedef 1450]
type    = U
movetype= A
physics = N
juggle = 0;  = 5
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1450
sprpriority = 0
;facep2 = 1

[State 1450]
type = Explod
trigger1 = Time = 0 && StateType = S
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1

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

[State 1450]
type = HitDef
attr = S, SA
triggerall = var(39) <= 3
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = (10-4*(prevstateno = [1450,1530]))*var(30),floor(var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 13,13
sparkxy = -10,-70+floor(P2Dist Y)
hitsound   = S1,30
guardsound = S4,0
sparkno = 2;s7702
;guard.sparkno = S8430
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = 7,-13
air.velocity = 7,-13
;guard.velocity = -9
;airguard.velocity = -9
;fall.xvelocity = -3
;ground.cornerpush.veloff = 0
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0
fall = 1
air.fall = 1
fall.recover = 1
;fall.animtype = Up
;p2stateno = 9020
getpower = 50,25
;palfx.time = 1
;palfx.add = 256,256,256
sprpriority = 2
;p1stateno = 23090
;p2stateno = 23100
;id = 800

[State 1450] ;Gamma Charge
type = PlaySnd
triggerall = var(29)=0
triggerall = prevstateno != [1450,1590]
trigger1 = AnimElem = 2
value = 1450,0

[State 1450] ;Charge
type = PlaySnd
triggerall = var(29)=1
triggerall = prevstateno != [1450,1590]
trigger1 = AnimElem = 2
value = 150,16

[State 1450]
type = PlaySnd
triggerall = var(29)=0
triggerall = prevstateno = [1450,1590]
trigger1 = AnimElem = 2
value = 1500,random%3

[State 1450]
type = PlaySnd
triggerall = var(29)=1
triggerall = prevstateno = [1450,1590]
trigger1 = AnimElem = 2
value = 150,14+random%3


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

[State 1450]
type = Helper
trigger1 = AnimElem = 4
stateno = 21450
ownpal = 1

[State 1450]
type = VelSet
trigger1 = AnimElem = 4
x = 10

[State 1450]
type = StateTypeSet
trigger1 = Pos Y < 0
statetype = A
persistent = 0

[State 1450]
type = ChangeState
trigger1 = Time = 17 && StateType != A
value = 1531
ctrl = 0

[State 1450]
type = ChangeState
trigger1 = Time = 17 && StateType = A
value = 1532
ctrl = 0

;---------------------------------------------------------------------------
;Gamma Charge H Near
[Statedef 1460]
type    = U
movetype= A
physics = N
juggle = 0;  = 5
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1450
sprpriority = 0
;facep2 = 1

[State 1460]
type = Explod
trigger1 = Time = 0 && StateType = S
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1



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

[State 1460]
type = HitDef
attr = S, SA
triggerall = var(39) <= 3
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = (10-4*(prevstateno = [1450,1530]))*var(30),floor(var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 13,13
sparkxy = -10,-70+floor(P2Dist Y)
hitsound   = S1,30
guardsound = S4,0
sparkno = 2;s7702
;guard.sparkno = S8430
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = 7,-13
air.velocity = 7,-13
;guard.velocity = -9
;airguard.velocity = -9
;fall.xvelocity = -3
;ground.cornerpush.veloff = 0
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0
fall = 1
air.fall = 1
fall.recover = 1
;fall.animtype = Up
;p2stateno = 9020
getpower = 50,25
;palfx.time = 1
;palfx.add = 256,256,256
sprpriority = 2
;p1stateno = 23090
;p2stateno = 23100
;id = 800

[State 1460] ;Gamma Charge
type = PlaySnd
triggerall = var(29)=0
triggerall = prevstateno != [1450,1590]
trigger1 = AnimElem = 2
value = 1450,0

[State 1460] ;Charge
type = PlaySnd
triggerall = var(29)=1
triggerall = prevstateno != [1450,1590]
trigger1 = AnimElem = 2
value = 150,16

[State 1460]
type = PlaySnd
triggerall = var(29)=0
triggerall = prevstateno = [1450,1590]
trigger1 = AnimElem = 2
value = 1500,random%3

[State 1460]
type = PlaySnd
triggerall = var(29)=1
triggerall = prevstateno = [1450,1590]
trigger1 = AnimElem = 2
value = 150,14+random%3


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

[State 1460]
type = Helper
trigger1 = AnimElem = 4
stateno = 21450
ownpal = 1


[State 1460]
type = VelSet
trigger1 = AnimElem = 4
x = 11

[State 1470]
type = StateTypeSet
trigger1 = Pos Y < 0
statetype = A
persistent = 0

[State 1460]
type = ChangeState
trigger1 = Time = 24 && StateType != A
value = 1531
ctrl = 0


[State 1460]
type = ChangeState
trigger1 = Time = 24 && StateType = A
value = 1532
ctrl = 0

;---------------------------------------------------------------------------
;Gamma Charge H Far
[Statedef 1470]
type    = U
movetype= A
physics = N
juggle = 0;  = 5
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1450
sprpriority = 0
;facep2 = 1

[State 1470]
type = Explod
trigger1 = Time = 0 && StateType = S
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1


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

[State 1470]
type = HitDef
attr = S, SA
triggerall = var(39) <= 3
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = (10-4*(prevstateno = [1450,1530]))*var(30),floor(var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 13,13
sparkxy = -10,-70+floor(P2Dist Y)
hitsound   = S1,30
guardsound = S4,0
sparkno = 2;s7702
;guard.sparkno = S8430
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = 7,-13
air.velocity = 7,-13
;guard.velocity = -9
;airguard.velocity = -9
;fall.xvelocity = -3
;ground.cornerpush.veloff = 0
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0
fall = 1
air.fall = 1
fall.recover = 1
;fall.animtype = Up
;p2stateno = 9020
getpower = 50,25
;palfx.time = 1
;palfx.add = 256,256,256
sprpriority = 2
;p1stateno = 23090
;p2stateno = 23100
;id = 800

[State 1450] ;Gamma Charge
type = PlaySnd
triggerall = var(29)=0
triggerall = prevstateno != [1450,1590]
trigger1 = AnimElem = 2
value = 1450,0

[State 1450] ;Charge
type = PlaySnd
triggerall = var(29)=1
triggerall = prevstateno != [1450,1590]
trigger1 = AnimElem = 2
value = 150,16

[State 1450]
type = PlaySnd
triggerall = var(29)=0
triggerall = prevstateno = [1450,1590]
trigger1 = AnimElem = 2
value = 1500,random%3

[State 1450]
type = PlaySnd
triggerall = var(29)=1
triggerall = prevstateno = [1450,1590]
trigger1 = AnimElem = 2
value = 150,14+random%3


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

[State 1470]
type = Helper
trigger1 = AnimElem = 4
stateno = 21450
ownpal = 1


[State 1470]
type = VelSet
trigger1 = AnimElem = 4
x = 12


[State 1470]
type = StateTypeSet
trigger1 = Pos Y < 0
statetype = A
persistent = 0

[State 1470]
type = ChangeState
trigger1 = Time = 30 && StateType != A
value = 1531
ctrl = 0


[State 1470]
type = ChangeState
trigger1 = Time = 30 && StateType = A
value = 1532
ctrl = 0


;---------------------------------------------------------------------------
;Gamma Charge UF Near
[Statedef 1480]
type    = U
movetype= A
physics = N
juggle = 0;  = 5
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1480
sprpriority = 0
;facep2 = 1

[State 1480]
type = Explod
trigger1 = Time = 0 && StateType = S
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1



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

[State 1480]
type = HitDef
attr = A, SA
triggerall = var(39) <= 3
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = (10-4*(prevstateno = [1450,1530]))*var(30),floor(var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = HA
pausetime = 13,13
sparkxy = -10,-70+floor(P2Dist Y)
hitsound   = S1,30
guardsound = S4,0
sparkno = 2;s7702
;guard.sparkno = S8430
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -9,-13
air.velocity = -9,-13
;guard.velocity = -9
;airguard.velocity = -9
;fall.xvelocity = -3
;ground.cornerpush.veloff = 0
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0
fall = 1
air.fall = 1
fall.recover = 1
;fall.animtype = Up
;p2stateno = 9020
getpower = 50,25
;palfx.time = 1
;palfx.add = 256,256,256
sprpriority = 2
;p1stateno = 23090
;p2stateno = 23100
;id = 800

[State 1450] ;Gamma Charge
type = PlaySnd
triggerall = var(29)=0
triggerall = prevstateno != [1450,1590]
trigger1 = AnimElem = 2
value = 1450,0

[State 1450] ;Charge
type = PlaySnd
triggerall = var(29)=1
triggerall = prevstateno != [1450,1590]
trigger1 = AnimElem = 2
value = 150,16

[State 1450]
type = PlaySnd
triggerall = var(29)=0
triggerall = prevstateno = [1450,1590]
trigger1 = AnimElem = 2
value = 1500,random%3

[State 1450]
type = PlaySnd
triggerall = var(29)=1
triggerall = prevstateno = [1450,1590]
trigger1 = AnimElem = 2
value = 150,14+random%3

[State 1480]
type = PlaySnd
trigger1 = AnimElem = 3
value = 1450,1


[State 1480]
type = Helper
trigger1 = AnimElem = 3
stateno = 21452
ownpal = 1

[State 1480]
type = VelSet
trigger1 = AnimElem = 3
x = 9
y = -9

[State 1480]
type = StateTypeSet
trigger1 = Pos Y < 0
statetype = A
persistent = 0


[State 1480]
type = VelAdd
trigger1 = Pos Y < 0
y = 0.4


[State 1480]
type = ChangeState
trigger1 = Time = 20 && StateType != A
value = 1531
ctrl = 0


[State 1480]
type = ChangeState
trigger1 = Time = 20 && StateType = A
value = 1532
ctrl = 0


;---------------------------------------------------------------------------
;Gamma Charge UF Mid
[Statedef 1490]
type    = U
movetype= A
physics = N
juggle = 0;  = 5
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1480
sprpriority = 0
;facep2 = 1

[State 1490]
type = Explod
trigger1 = Time = 0 && StateType = S
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1


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

[State 1490]
type = HitDef
attr = A, SA
triggerall = var(39) <= 3
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = (10-4*(prevstateno = [1450,1530]))*var(30),floor(var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = HA
pausetime = 13,13
sparkxy = -10,-70+floor(P2Dist Y)
hitsound   = S1,30
guardsound = S4,0
sparkno = 2;s7702
;guard.sparkno = S8430
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -9,-13
air.velocity = -9,-13
;guard.velocity = -9
;airguard.velocity = -9
;fall.xvelocity = -3
;ground.cornerpush.veloff = 0
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0
fall = 1
air.fall = 1
fall.recover = 1
;fall.animtype = Up
;p2stateno = 9020
getpower = 50,25
;palfx.time = 1
;palfx.add = 256,256,256
sprpriority = 2
;p1stateno = 23090
;p2stateno = 23100
;id = 800

[State 1450] ;Gamma Charge
type = PlaySnd
triggerall = var(29)=0
triggerall = prevstateno != [1450,1590]
trigger1 = AnimElem = 2
value = 1450,0

[State 1450] ;Charge
type = PlaySnd
triggerall = var(29)=1
triggerall = prevstateno != [1450,1590]
trigger1 = AnimElem = 2
value = 150,16

[State 1450]
type = PlaySnd
triggerall = var(29)=0
triggerall = prevstateno = [1450,1590]
trigger1 = AnimElem = 2
value = 1500,random%3

[State 1450]
type = PlaySnd
triggerall = var(29)=1
triggerall = prevstateno = [1450,1590]
trigger1 = AnimElem = 2
value = 150,14+random%3

[State 1490]
type = PlaySnd
trigger1 = AnimElem = 3
value = 1450,1


[State 1490]
type = Helper
trigger1 = AnimElem = 3
stateno = 21452
ownpal = 1

[State 1490]
type = VelSet
trigger1 = AnimElem = 3
x = 11
y = -11

[State 1490]
type = StateTypeSet
trigger1 = Pos Y < 0
statetype = A
persistent = 0


[State 1490]
type = VelAdd
trigger1 = Pos Y < 0
y = 0.4



[State 1490]
type = ChangeState
trigger1 = Time = 27 && StateType != A
value = 01451
ctrl = 0


[State 1490]
type = ChangeState
trigger1 = Time = 27 && StateType = A
value = 1532
ctrl = 0


;---------------------------------------------------------------------------
;Gamma Charge UF Far
[Statedef 1500]
type    = U
movetype= A
physics = N
juggle = 0;  = 5
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1480
sprpriority = 0
;facep2 = 1

[State 1500]
type = Explod
trigger1 = Time = 0 && StateType = S
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1



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

[State 1500]
type = HitDef
attr = A, SA
triggerall = var(39) <= 3
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = (10-4*(prevstateno = [1450,1530]))*var(30),floor(var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = HA
pausetime = 13,13
sparkxy = -10,-70+floor(P2Dist Y)
hitsound   = S1,30
guardsound = S4,0
sparkno = 2;s7702
;guard.sparkno = S8430
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -9,-13
air.velocity = -9,-13
;guard.velocity = -9
;airguard.velocity = -9
;fall.xvelocity = -3
;ground.cornerpush.veloff = 0
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0
fall = 1
air.fall = 1
fall.recover = 1
;fall.animtype = Up
;p2stateno = 9020
getpower = 50,25
;palfx.time = 1
;palfx.add = 256,256,256
sprpriority = 2
;p1stateno = 23090
;p2stateno = 23100
;id = 800

[State 1450] ;Gamma Charge
type = PlaySnd
triggerall = var(29)=0
triggerall = prevstateno != [1450,1590]
trigger1 = AnimElem = 2
value = 1450,0

[State 1450] ;Charge
type = PlaySnd
triggerall = var(29)=1
triggerall = prevstateno != [1450,1590]
trigger1 = AnimElem = 2
value = 150,16

[State 1450]
type = PlaySnd
triggerall = var(29)=0
triggerall = prevstateno = [1450,1590]
trigger1 = AnimElem = 2
value = 1500,random%3

[State 1450]
type = PlaySnd
triggerall = var(29)=1
triggerall = prevstateno = [1450,1590]
trigger1 = AnimElem = 2
value = 150,14+random%3

[State 1500]
type = PlaySnd
trigger1 = AnimElem = 3
value = 1450,1


[State 1500]
type = Helper
trigger1 = AnimElem = 3
stateno = 21452
ownpal = 1

[State 1500]
type = VelSet
trigger1 = AnimElem = 3
x = 13
y = -13

[State 1500]
type = StateTypeSet
trigger1 = Pos Y < 0
statetype = A
persistent = 0


[State 1500]
type = VelAdd
trigger1 = Pos Y < 0
y = 0.4



[State 1500]
type = ChangeState
trigger1 = Time = 30 && StateType != A
value = 1531
ctrl = 0


[State 1500]
type = ChangeState
trigger1 = Time = 30 && StateType = A
value = 1532
ctrl = 0


;---------------------------------------------------------------------------
;Gamma Charge U Near
[Statedef 1510]
type    = U
movetype= A
physics = N
juggle = 0;  = 5
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1510
sprpriority = 0
;facep2 = 1

[State 1510]
type = Explod
trigger1 = Time = 0 && StateType = S
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1

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

[State 1510]
type = HitDef
attr = A, SA
triggerall = var(39) <= 3
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = (10-4*(prevstateno = [1450,1530]))*var(30),floor(var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = HA
pausetime = 13,13
sparkxy = -10,-70+floor(P2Dist Y)
hitsound   = S1,30
guardsound = S4,0
sparkno = 2;s7702
;guard.sparkno = S8430
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -9,-13
air.velocity = -9,-13
;guard.velocity = -9
;airguard.velocity = -9
;fall.xvelocity = -3
;ground.cornerpush.veloff = 0
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0
fall = 1
air.fall = 1
fall.recover = 1
;fall.animtype = Up
;p2stateno = 9020
getpower = 50,25
;palfx.time = 1
;palfx.add = 256,256,256
sprpriority = 2
;p1stateno = 23090
;p2stateno = 23100
;id = 800

[State 1450] ;Gamma Charge
type = PlaySnd
triggerall = var(29)=0
triggerall = prevstateno != [1450,1590]
trigger1 = AnimElem = 2
value = 1450,0

[State 1450] ;Charge
type = PlaySnd
triggerall = var(29)=1
triggerall = prevstateno != [1450,1590]
trigger1 = AnimElem = 2
value = 150,16

[State 1450]
type = PlaySnd
triggerall = var(29)=0
triggerall = prevstateno = [1450,1590]
trigger1 = AnimElem = 2
value = 1500,random%3

[State 1450]
type = PlaySnd
triggerall = var(29)=1
triggerall = prevstateno = [1450,1590]
trigger1 = AnimElem = 2
value = 150,14+random%3

[State 1510]
type = PlaySnd
trigger1 = AnimElem = 3
value = 1450,1


[State 1510]
type = Helper
trigger1 = AnimElem = 3
stateno = 21451
ownpal = 1

[State 1510]
type = VelSet
trigger1 = AnimElem = 3
x = 2
y = -15

[State 1510]
type = StateTypeSet
trigger1 = Pos Y < 0
statetype = A
persistent = 0


[State 1510]
type = VelAdd
trigger1 = Pos Y < 0
y = 0.4


[State 1510]
type = ChangeState
trigger1 = Time = 20 && StateType != A
value = 1531
ctrl = 0


[State 1510]
type = ChangeState
trigger1 = Time = 20 && StateType = A
value = 1532
ctrl = 0


;---------------------------------------------------------------------------
;Gamma Charge U Mid
[Statedef 1520]
type    = U
movetype= A
physics = N
juggle = 0;  = 5
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1510
sprpriority = 0
;facep2 = 1

[State 1520]
type = Explod
trigger1 = Time = 0 && StateType = S
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1


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

[State 1520]
type = HitDef
attr = A, SA
triggerall = var(39) <= 3
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = (10-4*(prevstateno = [1450,1530]))*var(30),floor(var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = HA
pausetime = 13,13
sparkxy = -10,-70+floor(P2Dist Y)
hitsound   = S1,30
guardsound = S4,0
sparkno = 2;s7702
;guard.sparkno = S8430
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -9,-13
air.velocity = -9,-13
;guard.velocity = -9
;airguard.velocity = -9
;fall.xvelocity = -3
;ground.cornerpush.veloff = 0
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0
fall = 1
air.fall = 1
fall.recover = 1
;fall.animtype = Up
;p2stateno = 9020
getpower = 50,25
;palfx.time = 1
;palfx.add = 256,256,256
sprpriority = 2
;p1stateno = 23090
;p2stateno = 23100
;id = 800

[State 1450] ;Gamma Charge
type = PlaySnd
triggerall = var(29)=0
triggerall = prevstateno != [1450,1590]
trigger1 = AnimElem = 2
value = 1450,0

[State 1450] ;Charge
type = PlaySnd
triggerall = var(29)=1
triggerall = prevstateno != [1450,1590]
trigger1 = AnimElem = 2
value = 150,16

[State 1450]
type = PlaySnd
triggerall = var(29)=0
triggerall = prevstateno = [1450,1590]
trigger1 = AnimElem = 2
value = 1500,random%3

[State 1450]
type = PlaySnd
triggerall = var(29)=1
triggerall = prevstateno = [1450,1590]
trigger1 = AnimElem = 2
value = 150,14+random%3

[State 1520]
type = PlaySnd
trigger1 = AnimElem = 3
value = 1450,1


[State 1520]
type = Helper
trigger1 = AnimElem = 3
stateno = 21451
ownpal = 1

[State 1520]
type = VelSet
trigger1 = AnimElem = 3
x = 3
y = -17

[State 1520]
type = StateTypeSet
trigger1 = Pos Y < 0
statetype = A
persistent = 0


[State 1520]
type = VelAdd
trigger1 = Pos Y < 0
y = 0.4


[State 1520]
type = ChangeState
trigger1 = Time = 27 && StateType != A
value = 1531
ctrl = 0


[State 1520]
type = ChangeState
trigger1 = Time = 27 && StateType = A
value = 1532
ctrl = 0


;---------------------------------------------------------------------------
;Gamma Charge U Far
[Statedef 1530]
type    = U
movetype= A
physics = N
juggle = 0;  = 5
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1510
sprpriority = 0
;facep2 = 1

[State 1530]
type = Explod
trigger1 = Time = 0 && StateType = S
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1

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

[State 1530]
type = HitDef
attr = A, SA
triggerall = var(39) <= 3
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = (10-4*(prevstateno = [1450,1530]))*var(30),floor(var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = HA
pausetime = 13,13
sparkxy = -10,-70+floor(P2Dist Y)
hitsound   = S1,30
guardsound = S4,0
sparkno = 2;s7702
;guard.sparkno = S8430
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -9,-13
air.velocity = -9,-13
;guard.velocity = -9
;airguard.velocity = -9
;fall.xvelocity = -3
;ground.cornerpush.veloff = 0
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0
fall = 1
air.fall = 1
fall.recover = 1
;fall.animtype = Up
;p2stateno = 9020
getpower = 50,25
;palfx.time = 1
;palfx.add = 256,256,256
sprpriority = 2
;p1stateno = 23090
;p2stateno = 23100
;id = 800

[State 1450] ;Gamma Charge
type = PlaySnd
triggerall = var(29)=0
triggerall = prevstateno != [1450,1590]
trigger1 = AnimElem = 2
value = 1450,0

[State 1450] ;Charge
type = PlaySnd
triggerall = var(29)=1
triggerall = prevstateno != [1450,1590]
trigger1 = AnimElem = 2
value = 150,16

[State 1450]
type = PlaySnd
triggerall = var(29)=0
triggerall = prevstateno = [1450,1590]
trigger1 = AnimElem = 2
value = 1500,random%3

[State 1450]
type = PlaySnd
triggerall = var(29)=1
triggerall = prevstateno = [1450,1590]
trigger1 = AnimElem = 2
value = 150,14+random%3

[State 1530]
type = PlaySnd
trigger1 = AnimElem = 3
value = 1450,1


[State 1530]
type = Helper
trigger1 = AnimElem = 3
stateno = 21451
ownpal = 1

[State 1530]
type = VelSet
trigger1 = AnimElem = 3
x = 5
y = -19

[State 1530]
type = StateTypeSet
trigger1 = Pos Y < 0
statetype = A
persistent = 0


[State 1530]
type = VelAdd
trigger1 = Pos Y < 0
y = 0.4


[State 1530]
type = ChangeState
trigger1 = Time = 30 && StateType != A
value = 1531
ctrl = 0


[State 1530]
type = ChangeState
trigger1 = Time = 30 && StateType = A
value = 1532
ctrl = 0



;---------------------------------------------------------------------------
;Gamma Charge H  End
[Statedef 1531]
type    = U
movetype= I
physics = S
juggle = 0;  = 3
;poweradd= 60
ctrl = 0
;velset = 0,0
anim = 1451
sprpriority = 0
;facep2 = 1

[State 1531]
type = PlaySnd
trigger1 = Time = 0
value = 100,8


[State 1531]
type = Explod
trigger1 = Time%3 = 0
anim = 7107
pos = 0,0
;random = 0,0
ontop = 1
ownpal = 1



[State 1531]
type = ChangeState
trigger1 = AnimTime = 0
value = 52
ctrl = 0


;------------------------------------------------------------------------------------------------------------
; Gamma Charge U  End
[Statedef 1532]
type = A
movetype = I
physics = A
anim = 1452
ctrl = 0
sprpriority = 0
;poweradd= 65
velset = 0,0
;facep2 = 1


[State 1532]
type = null;StateTypeSet
trigger1 = Pos Y < 0
statetype = A
persistent = 0


[State 1532]
type = CtrlSet
trigger1 = Time = 17
value = 1

[State 1532]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0





;---------------------------------------------------------------------------
;Gamma Charge UB Near
[Statedef 1540]
type    = U
movetype= A
physics = N
juggle = 0;  = 3
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1480
sprpriority = 0
;facep2 = 1


[State 1540]
type = Turn
trigger1 = Time = 0


[State 1540]
type = Explod
trigger1 = Time = 0 && StateType = S
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1



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

[State 1540]
type = HitDef
attr = A, SA
triggerall = var(39) <= 3
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = (10-4*(prevstateno = [1450,1530]))*var(30),floor(var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = HA
pausetime = 13,13
sparkxy = -10,-70+floor(P2Dist Y)
hitsound   = S1,30
guardsound = S4,0
sparkno = 2;s7702
;guard.sparkno = S8430
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -9,-13
air.velocity = -9,-13
;guard.velocity = -9
;airguard.velocity = -9
;fall.xvelocity = -3
;ground.cornerpush.veloff = 0
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0
fall = 1
air.fall = 1
fall.recover = 1
;fall.animtype = Up
;p2stateno = 9020
getpower = 50,25
;palfx.time = 1
;palfx.add = 256,256,256
sprpriority = 2
;p1stateno = 23090
;p2stateno = 23100
;id = 800

[State 1450]
type = PlaySnd
triggerall = var(29)=1
triggerall = prevstateno = [1450,1590]
trigger1 = AnimElem = 2
value = 150,14+random%3


[State 1540]
type = PlaySnd
triggerall = var(29)=0
trigger1 = AnimElem = 2
value = 1500,random%3

[State 1540]
type = PlaySnd
trigger1 = AnimElem = 3
value = 1450,1


[State 1540]
type = Helper
trigger1 = AnimElem = 3
stateno = 21452
ownpal = 1

[State 1540]
type = VelSet
trigger1 = AnimElem = 3
x = 9
y = -9

[State 1540]
type = StateTypeSet
trigger1 = Pos Y < 0
statetype = A
persistent = 0


[State 1540]
type = VelAdd
trigger1 = Pos Y < 0
y = 0.4


[State 1540]
type = ChangeState
trigger1 = Time = 20 && StateType != A
value = 1531
ctrl = 0


[State 1540]
type = ChangeState
trigger1 = Time = 20 && StateType = A
value = 1532
ctrl = 0


;---------------------------------------------------------------------------
;Gamma Charge UB Mid
[Statedef 1550]
type    = U
movetype= A
physics = N
juggle = 0;  = 3
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1480
sprpriority = 0
;facep2 = 1


[State 1550]
type = Turn
trigger1 = Time = 0

[State 1550]
type = Explod
trigger1 = Time = 0 && StateType = S
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1


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

[State 1550]
type = HitDef
attr = A, SA
triggerall = var(39) <= 3
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = (10-4*(prevstateno = [1450,1530]))*var(30),floor(var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = HA
pausetime = 13,13
sparkxy = -10,-70+floor(P2Dist Y)
hitsound   = S1,30
guardsound = S4,0
sparkno = 2;s7702
;guard.sparkno = S8430
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -9,-13
air.velocity = -9,-13
;guard.velocity = -9
;airguard.velocity = -9
;fall.xvelocity = -3
;ground.cornerpush.veloff = 0
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0
fall = 1
air.fall = 1
fall.recover = 1
;fall.animtype = Up
;p2stateno = 9020
getpower = 50,25
;palfx.time = 1
;palfx.add = 256,256,256
sprpriority = 2
;p1stateno = 23090
;p2stateno = 23100
;id = 800

[State 1450]
type = PlaySnd
triggerall = var(29)=1
triggerall = prevstateno = [1450,1590]
trigger1 = AnimElem = 2
value = 150,14+random%3


[State 1550]
type = PlaySnd
triggerall = var(29)=0
trigger1 = AnimElem = 2
value = 1500,random%3

[State 1550]
type = PlaySnd
trigger1 = AnimElem = 3
value = 1450,1


[State 1550]
type = Helper
trigger1 = AnimElem = 3
stateno = 21452
ownpal = 1

[State 1550]
type = VelSet
trigger1 = AnimElem = 3
x = 11
y = -11

[State 1550]
type = StateTypeSet
trigger1 = Pos Y < 0
statetype = A
persistent = 0


[State 1550]
type = VelAdd
trigger1 = Pos Y < 0
y = 0.4



[State 1550]
type = ChangeState
trigger1 = Time = 27 && StateType != A
value = 01451
ctrl = 0


[State 1550]
type = ChangeState
trigger1 = Time = 27 && StateType = A
value = 1532
ctrl = 0


;---------------------------------------------------------------------------
;Gamma Charge UBFar
[Statedef 1560]
type    = U
movetype= A
physics = N
juggle = 0;  = 3
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1480
sprpriority = 0
;facep2 = 1


[State 1560]
type = Turn
trigger1 = Time = 0

[State 1560]
type = Explod
trigger1 = Time = 0 && StateType = S
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1



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

[State 1560]
type = HitDef
attr = A, SA
triggerall = var(39) <= 3
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = (10-4*(prevstateno = [1450,1530]))*var(30),floor(var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = HA
pausetime = 13,13
sparkxy = -10,-70+floor(P2Dist Y)
hitsound   = S1,30
guardsound = S4,0
sparkno = 2;s7702
;guard.sparkno = S8430
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -9,-13
air.velocity = -9,-13
;guard.velocity = -9
;airguard.velocity = -9
;fall.xvelocity = -3
;ground.cornerpush.veloff = 0
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0
fall = 1
air.fall = 1
fall.recover = 1
;fall.animtype = Up
;p2stateno = 9020
getpower = 50,25
;palfx.time = 1
;palfx.add = 256,256,256
sprpriority = 2
;p1stateno = 23090
;p2stateno = 23100
;id = 800

[State 1450]
type = PlaySnd
triggerall = var(29)=1
triggerall = prevstateno = [1450,1590]
trigger1 = AnimElem = 2
value = 150,14+random%3

[State 1560]
type = PlaySnd
triggerall = var(29)=0
trigger1 = AnimElem = 2
value = 1500,random%3

[State 1560]
type = PlaySnd
trigger1 = AnimElem = 3
value = 1450,1


[State 1560]
type = Helper
trigger1 = AnimElem = 3
stateno = 21452
ownpal = 1

[State 1560]
type = VelSet
trigger1 = AnimElem = 3
x = 13
y = -13

[State 1560]
type = StateTypeSet
trigger1 = Pos Y < 0
statetype = A
persistent = 0


[State 1560]
type = VelAdd
trigger1 = Pos Y < 0
y = 0.4



[State 1560]
type = ChangeState
trigger1 = Time = 30 && StateType != A
value = 1531
ctrl = 0


[State 1560]
type = ChangeState
trigger1 = Time = 30 && StateType = A
value = 1532
ctrl = 0




;---------------------------------------------------------------------------
;Gamma Charge B Near
[Statedef 1570]
type    = U
movetype= A
physics = N
juggle = 0;  = 3
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1450
sprpriority = 0
;facep2 = 1

[State 1570]
type = Turn
trigger1 = Time = 0

[State 1570]
type = Explod
trigger1 = Time = 0 && StateType = S
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1


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

[State 1570]
type = HitDef
attr = S, SA
triggerall = var(39) <= 3
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = (10-4*(prevstateno = [1450,1530]))*var(30),floor(var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 13,13
sparkxy = -10,-70+floor(P2Dist Y)
hitsound   = S1,30
guardsound = S4,0
sparkno = 2;s7702
;guard.sparkno = S8430
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = 7,-13
air.velocity = 7,-13
;guard.velocity = -9
;airguard.velocity = -9
;fall.xvelocity = -3
;ground.cornerpush.veloff = 0
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0
fall = 1
air.fall = 1
fall.recover = 1
;fall.animtype = Up
;p2stateno = 9020
getpower = 50,25
;palfx.time = 1
;palfx.add = 256,256,256
sprpriority = 2
;p1stateno = 23090
;p2stateno = 23100
;id = 800

[State 1450]
type = PlaySnd
triggerall = var(29)=1
triggerall = prevstateno = [1450,1590]
trigger1 = AnimElem = 2
value = 150,14+random%3

[State 1570]
type = PlaySnd
triggerall = var(29)=0
trigger1 = AnimElem = 2
value = 1500,random%3


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


[State 1570]
type = Helper
trigger1 = AnimElem = 4
stateno = 21450
ownpal = 1

[State 1570]
type = VelSet
trigger1 = AnimElem = 4
x = 10

[State 1570]
type = StateTypeSet
trigger1 = Pos Y < 0
statetype = A
persistent = 0

[State 1570]
type = ChangeState
trigger1 = Time = 17 && StateType != A
value = 1531
ctrl = 0


[State 1570]
type = ChangeState
trigger1 = Time = 17 && StateType = A
value = 1532
ctrl = 0



;---------------------------------------------------------------------------
;Gamma Charge B Near
[Statedef 1580]
type    = U
movetype= A
physics = N
juggle = 0;  = 3
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1450
sprpriority = 0
;facep2 = 1

[State 1580]
type = Turn
trigger1 = Time = 0

[State 1580]
type = Explod
trigger1 = Time = 0 && StateType = S
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1



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

[State 1580]
type = HitDef
attr = S, SA
triggerall = var(39) <= 3
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = (10-4*(prevstateno = [1450,1530]))*var(30),floor(var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 13,13
sparkxy = -10,-70+floor(P2Dist Y)
hitsound   = S1,30
guardsound = S4,0
sparkno = 2;s7702
;guard.sparkno = S8430
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = 7,-13
air.velocity = 7,-13
;guard.velocity = -9
;airguard.velocity = -9
;fall.xvelocity = -3
;ground.cornerpush.veloff = 0
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0
fall = 1
air.fall = 1
fall.recover = 1
;fall.animtype = Up
;p2stateno = 9020
getpower = 50,25
;palfx.time = 1
;palfx.add = 256,256,256
sprpriority = 2
;p1stateno = 23090
;p2stateno = 23100
;id = 800

[State 1450]
type = PlaySnd
triggerall = var(29)=1
triggerall = prevstateno = [1450,1590]
trigger1 = AnimElem = 2
value = 150,14+random%3

[State 1580]
type = PlaySnd
triggerall = var(29)=0
trigger1 = AnimElem = 2
value = 1500,random%3


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

[State 1580]
type = Helper
trigger1 = AnimElem = 4
stateno = 21450
ownpal = 1


[State 1580]
type = VelSet
trigger1 = AnimElem = 4
x = 11

[State 1590]
type = StateTypeSet
trigger1 = Pos Y < 0
statetype = A
persistent = 0

[State 1580]
type = ChangeState
trigger1 = Time = 24 && StateType != A
value = 1531
ctrl = 0


[State 1580]
type = ChangeState
trigger1 = Time = 24 && StateType = A
value = 1532
ctrl = 0

;---------------------------------------------------------------------------
;Gamma Charge B Far
[Statedef 1590]
type    = U
movetype= A
physics = N
juggle = 0;  = 3
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1450
sprpriority = 0
;facep2 = 1

[State 1590]
type = Turn
trigger1 = Time = 0

[State 1590]
type = Explod
trigger1 = Time = 0 && StateType = S
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1


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

[State 1590]
type = HitDef
attr = S, SA
triggerall = var(39) <= 3
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = (10-4*(prevstateno = [1450,1530]))*var(30),floor(var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 13,13
sparkxy = -10,-70+floor(P2Dist Y)
hitsound   = S1,30
guardsound = S4,0
sparkno = 2;s7702
;guard.sparkno = S8430
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = 7,-13
air.velocity = 7,-13
;guard.velocity = -9
;airguard.velocity = -9
;fall.xvelocity = -3
;ground.cornerpush.veloff = 0
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0
fall = 1
air.fall = 1
fall.recover = 1
;fall.animtype = Up
;p2stateno = 9020
getpower = 50,25
;palfx.time = 1
;palfx.add = 256,256,256
sprpriority = 2
;p1stateno = 23090
;p2stateno = 23100
;id = 800

[State 1450]
type = PlaySnd
triggerall = var(29)=1
triggerall = prevstateno = [1450,1590]
trigger1 = AnimElem = 2
value = 150,14+random%3

[State 1590]
type = PlaySnd
triggerall = var(29)=0
trigger1 = AnimElem = 2
value = 1500,random%3

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

[State 1590]
type = Helper
trigger1 = AnimElem = 4
stateno = 21450
ownpal = 1


[State 1590]
type = VelSet
trigger1 = AnimElem = 4
x = 12


[State 1590]
type = StateTypeSet
trigger1 = Pos Y < 0
statetype = A
persistent = 0

[State 1590]
type = ChangeState
trigger1 = Time = 30 && StateType != A
value = 1531
ctrl = 0


[State 1590]
type = ChangeState
trigger1 = Time = 30 && StateType = A
value = 1532
ctrl = 0


;---------------------------------------------------------------------------
;Gamma Wave

[Statedef 3000]
type    = S
movetype= A
physics = N
juggle = 0;  = 4
velset = 0,0
anim = 3000
poweradd= 0
ctrl = 0
sprpriority = 0
facep2 = 1

[State 3000, AvX No BG]
type = null;assertspecial
trigger1 = time = 7
flag = noBG
flag2 = noFG
flag3 = nobardisplay
ignorehitpause = 1

[State 3000, AvX Super Pause]
type = SuperPause
trigger1 = time = 7
Time = 40
pos = 25,-90
sound = 1500,0
poweradd = -1000
movetime= 40

[State -2, AvX Hyper Background]
type = Helper
triggerall = !numhelper(40001)
trigger1 = time = 7
helpertype = normal
name = "HSDM"
ID = 40001
stateno = 40001
pos = 160,120
postype = left
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 9999
pausemovetime = 9999
ignorehitpause = 1

[State -2, AvX Hyper Portrait]
type = Helper
triggerall = !numhelper(40003)
trigger1 = time = 7
helpertype = normal
name = "H.Port"
ID = 40003
stateno = 40003
pos = 160,120
postype = left
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 9999
pausemovetime = 9999
ignorehitpause = 1

[State -2, AvX Helper]
type = Helper
triggerall = !numhelper(40004)
trigger1 = time = 7
helpertype = normal
name = "Player 1"
ID = 40004
stateno = 40004
pos = 160,120
postype = left
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 9999
pausemovetime = 9999
ignorehitpause = 1

[State 3000, EoH Super Pause]
type = null;SuperPause
trigger1 = Time = 7
anim = -1;S32701
sound = -1;S3000,3
poweradd = -1000
time = 60
movetime = 60
unhittable = 1
darken = 0

[State 3000, EoH AfterImage 1]
type = null;AfterImage
trigger1 = time = 7
trigger1 = power < 1000
time = 2
length = 15
framegap = 4
trans = add1
PalContrast = 50,50,150

[State 3000, EoH AfterImage 2]
type = null;AfterImage
trigger1 = time = 7
trigger1 = power < 2000
trigger1 = power >= 1000
time = 2
length = 15
framegap = 4
trans = add1
PalContrast = 50,150,50

[State 3000, EoH AfterImage 3]
type = null;AfterImage
trigger1 = time = 7
trigger1 = power >= 2000
time = 2
length = 15
framegap = 4
trans = add1
PalContrast = 150,50,50

[State 3000, EoH Hyper Background 1]
type   = null;Explod
triggerall = power < 1000
trigger1 = time = 40
anim = F32710
postype = left
ID = 7021
sprpriority = -10
removetime = -1
pos = 0,0
scale = .5,.5
bindtime = -1
facing=1
ignorehitpause=1
supermovetime=9999
pausemovetime=9999
supermove = 9999
pausemove = 9999

[State 3000, EoH Hyper Background 2]
type   = null;Explod
triggerall = power < 2000
triggerall = power >= 1000
trigger1 = time = 40
anim = F32711
postype = left
ID = 7021
sprpriority = -10
removetime = -1
pos = 0,0
scale = .5,.5
bindtime = -1
facing=1
ignorehitpause=1
supermovetime=9999
pausemovetime=9999
supermove = 9999
pausemove = 9999

[State 3000, EoH Hyper Background 3]
type   = null;Explod
triggerall = power >= 2000
trigger1 = time = 40
anim = F32712
postype = left
ID = 7021
sprpriority = -10
removetime = -1
pos = 0,0
scale = .5,.5
bindtime = -1
facing=1
ignorehitpause=1
supermovetime=9999
pausemovetime=9999
supermove = 9999
pausemove = 9999

;about 8 ticks before 3110
[State 3000]
type = null;Helper
trigger1 = Time = 8
stateno = 33117
supermovetime = 9999
pausemovetime = 9999
pos = 0,-200
ownpal = 1
postype = back
size.xscale = 1
size.yscale = 1

[State 3000]
type = null;Helper
trigger1 = Time = 16
stateno = 33110
id = 33110
supermovetime = 9999
pausemovetime = 9999
pos = 8,-147
ownpal = 1

[State 3000]
type = PlaySnd
triggerall = var(29)=0
trigger1 = Time = 1
value = 3005,0

[State 3000]
type = PlaySnd
triggerall = var(29)=1
trigger1 = Time = 1
value = 150,22

[State 3000]
type = ChangeState
trigger1 = Time = 45
value = 3001
ctrl = 0


;---------------------------------------------------------------------------
;Gamma Wave
[Statedef 3001]
type    = S
movetype= A
physics = N
juggle = 0;  = 1
;poweradd=
velset = 0,0
anim = 3001
ctrl = 0
sprpriority = 0
facep2 = 1

[State 3001, Varset]
type = varset
trigger1 = enemynear,movetype = H
fv = 29
value = 1

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

[State 3001]
type = PlaySnd
trigger1 = var(29)=0
trigger1 = AnimElem = 2
value = 3005,1

[State 3001]
type = PlaySnd
trigger1 = var(29)=1
trigger1 = AnimElem = 2
value = 150,17


[State 3002]
type = Helper
trigger1 = AnimElem = 6
stateno = 21300
id = 21300
ownpal = 1
pos = 56,-12


[State 3001]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1


;---------------------------------------------------------------------------
;Gamma Wave
[Statedef 3002]
type    = S
movetype= A
physics = N
juggle = 0;  = 1
;poweradd=
velset = 0,0
anim = 3002
ctrl = 0
sprpriority = 0
facep2 = 1


[State 3002]
type = null;NotHitBy
trigger1 = 1
value = SCA


[State 3002]
type = null;PlayerPush
trigger1 = 1
value = 0

[State 3002]
type = null;ScreenBound
trigger1 = 1
value = 0
movecamera = 0,1

[State 3002]
type = VelSet
trigger1 = AnimElem = 6
x = 2
y = -15


[State 3002]
type = StateTypeSet
trigger1 = Pos Y < 0
statetype = A
persistent = 0



[State 3002]
type = VelAdd
trigger1 = Pos Y < 0
y = 0.4


[State 3002]
type = HitDef
attr = SA, HA
trigger1 = Time%5 = 0
trigger1 = hitcount < 5
trigger1 = moveguarded < 1
damage = 4*var(30),floor(var(30)/4)
animtype = Medium
priority  = 5, Hit
hitflag = MAFD
guardflag = HA
pausetime = 3,1
sparkxy = -10,-70+floor(P2Dist Y)
hitsound   = S1,5+1*(hitcount > 3)
guardsound = S4,0
sparkno = 3;s7703
;guard.sparkno = S8430
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -1,-10
air.velocity = -1,-10
;guard.velocity = -9
;airguard.velocity = -9
;fall.xvelocity = -3
;ground.cornerpush.veloff = 0
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0
fall = 1
air.fall = 1
fall.recover = 0
;fall.animtype = Up
;p2stateno = 9020
;getpower = 50,25


[State 3002]
type = Varset
trigger1 = time = 0
var(0) = 5

[State 3002]
type = VarAdd
trigger1 = MoveGuarded
var(0) = -1

[State 3002]
type = MoveHitReset
trigger1 = var(0) > 0
trigger1 = MoveGuarded


[State 3002]
type = EnvShake
trigger1 = Time = 0
time = 60
freq = 10
ampl = -4
phase = 4

[State 3002]
type = ChangeState
trigger1 = Time = 40 && StateType = A
value = 3003
ctrl = 0

[State 3002]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0


;---------------------------------------------------------------------------
;Gamma Wave End
[Statedef 3003]
type    = A
movetype= A
physics = N
juggle = 0;  = 1
;poweradd=
;velset = 0,0
anim = 3003
ctrl = 0
sprpriority = 0
facep2 = 1



[State 3003]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 70
persistent = 0


[State 3003]
type = VelAdd
trigger1 = Time >= 12
y = 0.4

[State 3003]
type = null;NotHitBy
trigger1 = 1
value = SCA


[State 3003]
type = null;PlayerPush
trigger1 = 1
value = 0

[State 3003]
type = null;ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0


[State 3002]
type = HitDef
attr = A, HA
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = var(30),floor(var(30)/4)
animtype = Medium
priority  = 5, Hit
hitflag = MAFD
guardflag = HA
pausetime = 13,13
sparkxy = -10,-70+floor(P2Dist Y)
hitsound   = S1,30
guardsound = S4,0
sparkno = 3;s7703
;guard.sparkno = S8430
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -1,-10
air.velocity = -17,-10
;guard.velocity = -9
;airguard.velocity = -9
;fall.xvelocity = -3
;ground.cornerpush.veloff = 0
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0
fall = 1
air.fall = 1
all.recover = 1
;fall.animtype = Up
;p2stateno = 9020
;getpower = 50,25

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




;---------------------------------------------------------------------------
;Gamma Crush

[Statedef 3040]
type    = S
movetype= A
physics = N
juggle = 0;  = 4
velset = 0,0
anim = 3040
poweradd= 0
ctrl = 0
sprpriority = 0
facep2 = 1

[State 3000, AvX No BG]
type = null;assertspecial
trigger1 = time = 7
flag = noBG
flag2 = noFG
flag3 = nobardisplay
ignorehitpause = 1

[State 3000, AvX Super Pause]
type = SuperPause
trigger1 = time = 7
Time = 50
pos = 0,-60
sound = 1500,0
poweradd = -1000
movetime= 50

[State -2, AvX Hyper Background]
type = Helper
triggerall = !numhelper(40001)
trigger1 = time = 7
helpertype = normal
name = "HSDM"
ID = 40001
stateno = 40001
pos = 160,120
postype = left
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 9999
pausemovetime = 9999
ignorehitpause = 1

[State -2, AvX Hyper Portrait]
type = Helper
triggerall = !numhelper(40003)
trigger1 = time = 7
helpertype = normal
name = "H.Port"
ID = 40003
stateno = 40003
pos = 160,120
postype = left
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 9999
pausemovetime = 9999
ignorehitpause = 1

[State -2, AvX Helper]
type = Helper
triggerall = !numhelper(40004)
trigger1 = time = 7
helpertype = normal
name = "Player 1"
ID = 40004
stateno = 40004
pos = 160,120
postype = left
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 9999
pausemovetime = 9999
ignorehitpause = 1

[State 0, PosAdd]
type = PosAdd
trigger1 = time = 0
x = 50
y = 0

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


[State 3040, EoH Super Pause]
type = null;SuperPause
trigger1 = Time = 7
anim = -1;S32701
sound = -1;S3000,3
poweradd = -1000
time = 60
movetime = 60
unhittable = 1
darken = 0

[State 3000, EoH AfterImage 1]
type = null;AfterImage
trigger1 = time = 7
trigger1 = power < 1000
time = 2
length = 15
framegap = 4
trans = add1
PalContrast = 50,50,150

[State 3000, EoH AfterImage 2]
type = null;AfterImage
trigger1 = time = 7
trigger1 = power < 2000
trigger1 = power >= 1000
time = 2
length = 15
framegap = 4
trans = add1
PalContrast = 50,150,50

[State 3000, EoH AfterImage 3]
type = null;AfterImage
trigger1 = time = 7
trigger1 = power >= 2000
time = 2
length = 15
framegap = 4
trans = add1
PalContrast = 150,50,50

[State 3000, EoH Hyper Background 1]
type   = null;Explod
triggerall = power < 1000
trigger1 = time = 40
anim = F32710
postype = left
ID = 7021
sprpriority = -10
removetime = -1
pos = 0,0
scale = .5,.5
bindtime = -1
facing=1
ignorehitpause=1
supermovetime=9999
pausemovetime=9999
supermove = 9999
pausemove = 9999

[State 3000, EoH Hyper Background 2]
type   = null;Explod
triggerall = power < 2000
triggerall = power >= 1000
trigger1 = time = 40
anim = F32711
postype = left
ID = 7021
sprpriority = -10
removetime = -1
pos = 0,0
scale = .5,.5
bindtime = -1
facing=1
ignorehitpause=1
supermovetime=9999
pausemovetime=9999
supermove = 9999
pausemove = 9999

[State 3000, EoH Hyper Background 3]
type   = null;Explod
triggerall = power >= 2000
trigger1 = time = 40
anim = F32712
postype = left
ID = 7021
sprpriority = -10
removetime = -1
pos = 0,0
scale = .5,.5
bindtime = -1
facing=1
ignorehitpause=1
supermovetime=9999
pausemovetime=9999
supermove = 9999
pausemove = 9999

[State 3041]
type = PlaySnd
trigger1 = var(29)=0
trigger1 = AnimElem = 1
value = 3040,0

[State 3041]
type = PlaySnd
trigger1 = var(29)=1
trigger1 = AnimElem = 1
value = 150,18

;about 8 ticks before 3110
[State 3040 EoH ]
type = null;Helper
trigger1 = Time = 8
stateno = 33117
supermovetime = 9999
pausemovetime = 9999
pos = 0,-200
ownpal = 1
postype = back
size.xscale = 1
size.yscale = 1

[State 3040 EoH ]
type = null;Helper
trigger1 = Time = 16
stateno = 33110
id = 33110
supermovetime = 9999
pausemovetime = 9999
pos = 0,-88
ownpal = 1

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

[State 3040]
type = ChangeState
trigger1 = Time = 67
value = 3041
ctrl = 0


;---------------------------------------------------------------------------
;Gamma Crush
[Statedef 3041]
type    = S
movetype= A
physics = N
juggle = 0;  = 1
velset = 0,0
anim = 3041
ctrl = 0
sprpriority = 0
;facep2 = 1
poweradd = 0

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

[State 3041]
type = HitDef
attr = A, HA
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 9*var(30),(2*floor(var(30)/8))
animtype = Medium
priority  = 5, Hit
hitflag = MAFD
guardflag = HA
pausetime = 3,3
sparkxy = -10,-70+floor(P2Dist Y)
hitsound   = S1,1
guardsound = S4,0
sparkno = 3;s7703
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -7,-10
air.velocity = -7,-10
fall = 1
air.fall = 1
fall.recover = 0
getpower = 0

[State 3041, VarSet]
type = VarSet
triggerall = fvar(29)!=1
trigger1 = movehit
fv = 29
value = 1
ignorehitpause = 1

[State 3041]
type = PlaySnd
triggerall = var(29)=0
trigger1 = AnimElem = 3
value = 3040,1

[State 3041]
type = PlaySnd
triggerall = var(29)=1
trigger1 = AnimElem = 3
value = 150,20

[State 3041]
type = VelSet
trigger1 = AnimElem = 3
x = 6
y = -22
persistent = 0


[State 3041]
type = StateTypeSet
trigger1 = Pos y < 0
statetype = A
persistent = 0


[State 3041]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0


[State 3041]
type = ChangeState
trigger1 = ScreenPos Y < -100
trigger2 = Time = 60
value = 3042
ctrl = 0


;---------------------------------------------------------------------------
;Gamma Crush
[Statedef 3042]
type    = A
movetype= A
physics = N
juggle = 0;  = 1
velset = 0,0
anim = 3042
ctrl = 0
sprpriority = 0
;facep2 = 1
poweradd = 0

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

[State 3042]
type = Helper
trigger1 = Time = 0
trigger1 = var(29)=0
stateno = 23040
id = 23040
ownpal = 1

[State 3042]
type = Helper
trigger1 = Time = 0
trigger1 = var(29)=1
stateno = 23042
id = 23042
ownpal = 1

[State 3002]
type = HitDef
attr = A, HA
trigger1 = hitcount < 7
trigger1 = moveguarded < 1
damage = 7*var(30),(5*floor(var(30)/8))
animtype = Medium
priority  = 5, Hit
hitflag = MAFD
guardflag = HA
pausetime = 5,10
sparkxy = -10,-70+floor(P2Dist Y)
hitsound   = S1,1
guardsound = S4,0
sparkno = 3;s7703
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -7,-10
air.velocity = -7,-10
fall = hitcount > 6
air.fall = hitcount > 6
fall.recover = 0
getpower = 0

[State 3042]
type = Varset
trigger1 = time = 0
var(0) = 7

[State 3042]
type = VarAdd
trigger1 = MoveGuarded
var(0) = -1

[State 3042]
type = MoveHitReset
trigger1 = var(0) > 0
trigger1 = MoveGuarded

[State 3042]
type = VelSet
trigger1 = Time = 30
x = (p2bodydist x +1/(p2bodydist x+1))*0.2
y = (p2bodydist y -abs(EnemyNear, const(size.mid.pos.y))+1/(p2bodydist y+1-abs(EnemyNear, const(size.mid.pos.y))))*0.2
persistent = 0

[State 3042]
type = ChangeState
trigger1 = Pos Y >= -50
trigger1 = Vel Y > 0
trigger2 = time > 150
value = 3043
ctrl = 0



;---------------------------------------------------------------------------
;Gamma Crush End
[Statedef 3043]
type    = A
movetype= I
physics = A
juggle = 0;  = 1
;poweradd=
velset = -3,-7
anim = 3043
ctrl = 0
sprpriority = 0
;facep2 = 1


[State 3043]
type = null;NotHitBy
trigger1 = 1
value = SCA


[State 3043]
type = null;PlayerPush
trigger1 = 1
value = 0


[State 3043]
type = EnvShake
trigger1 = pos y > -20;Time = 0
time = 30
freq = 100
ampl = -10
phase = 10

[State 3043]
type = PlaySnd
trigger1 = pos y > -20;Time = 0
value = 5100,4

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


[State 3043]
type = null;PalFx
trigger1 = Time%8 = 0
color = 256
time = 4
add = 255,63,-255

[State 3043]
type = null;AfterImage
trigger1 = time = 0
time = 30
length = 7
palbright = 30,30,130
palpostbright = 0,0,50
palcontrast =120,120,220
paladd = 0,0,0
palmul = 1,1,1
palcolor = 0
timegap = 2
framegap = 3


[State 3043]
type = null;ChangeAnim
trigger1 = AnimTime = 0
value = 41
elem = 5
persistent = 0


[State 3043]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0



;---------------------------------------------------------------------------
;Gamma Quake

[Statedef 3080]
type    = S
movetype= A
physics = N
juggle = 0;  = 4
velset = 0,0
anim = 3080
poweradd= 0
ctrl = 0
sprpriority = 0
facep2 = 1

[State 3000, AvX No BG]
type = null;assertspecial
trigger1 = time = 7
flag = noBG
flag2 = noFG
flag3 = nobardisplay
ignorehitpause = 1

[State 3000, AvX Super Pause]
type = SuperPause
trigger1 = time = 7
Time = 40
pos = -10,-120
sound = 1500,0
poweradd = -1000
movetime= 40

[State -2, AvX Hyper Background]
type = Helper
triggerall = !numhelper(40001)
trigger1 = time = 7
helpertype = normal
name = "HSDM"
ID = 40001
stateno = 40001
pos = 160,120
postype = left
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 9999
pausemovetime = 9999
ignorehitpause = 1

[State -2, AvX Hyper Portrait]
type = Helper
triggerall = !numhelper(40003)
trigger1 = time = 7
helpertype = normal
name = "H.Port"
ID = 40003
stateno = 40003
pos = 160,120
postype = left
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 9999
pausemovetime = 9999
ignorehitpause = 1

[State -2, AvX Helper]
type = Helper
triggerall = !numhelper(40004)
trigger1 = time = 7
helpertype = normal
name = "Player 1"
ID = 40004
stateno = 40004
pos = 160,120
postype = left
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 9999
pausemovetime = 9999
ignorehitpause = 1

[State 3080, EoH Super Pause]
type = null;SuperPause
trigger1 = Time = 4
anim = -1;S32701
sound = -1;S3000,3
poweradd = -1000
time = 60
movetime = 60
unhittable = 1
darken = 0

[State 3000, EoH AfterImage 1]
type = null;AfterImage
trigger1 = time = 4
trigger1 = power < 1000
time = 2
length = 15
framegap = 4
trans = add1
PalContrast = 50,50,150

[State 3000, EoH AfterImage 2]
type = null;AfterImage
trigger1 = time = 4
trigger1 = power < 2000
trigger1 = power >= 1000
time = 2
length = 15
framegap = 4
trans = add1
PalContrast = 50,150,50

[State 3000, EoH AfterImage 3]
type = null;AfterImage
trigger1 = time = 4
trigger1 = power >= 2000
time = 2
length = 15
framegap = 4
trans = add1
PalContrast = 150,50,50

[State 3000, EoH Hyper Background 1]
type   = null;Explod
triggerall = power < 1000
trigger1 = time = 40
anim = F32710
postype = left
ID = 7021
sprpriority = -10
removetime = -1
pos = 0,0
scale = .5,.5
bindtime = -1
facing=1
ignorehitpause=1
supermovetime=9999
pausemovetime=9999
supermove = 9999
pausemove = 9999

[State 3000, EoH Hyper Background 2]
type   = null;Explod
triggerall = power < 2000
triggerall = power >= 1000
trigger1 = time = 40
anim = F32711
postype = left
ID = 7021
sprpriority = -10
removetime = -1
pos = 0,0
scale = .5,.5
bindtime = -1
facing=1
ignorehitpause=1
supermovetime=9999
pausemovetime=9999
supermove = 9999
pausemove = 9999

[State 3000, EoH Hyper Background 3]
type   = null;Explod
triggerall = power >= 2000
trigger1 = time = 40
anim = F32712
postype = left
ID = 7021
sprpriority = -10
removetime = -1
pos = 0,0
scale = .5,.5
bindtime = -1
facing=1
ignorehitpause=1
supermovetime=9999
pausemovetime=9999
supermove = 9999
pausemove = 9999

;about 8 ticks before 3110
[State 3080 EoH ]
type = null;Helper
trigger1 = Time = 5
stateno = 33117
supermovetime = 9999
pausemovetime = 9999
pos = 0,-200
ownpal = 1
postype = back
size.xscale = 1
size.yscale = 1

[State 3080 EoH ]
type = null;Helper
trigger1 = Time = 13
stateno = 33110
id = 33110
supermovetime = 9999
pausemovetime = 9999
pos = -53,-126
ownpal = 1

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

[State 3080]
type = null;AfterImage
trigger1 = time = 0
time = 120
length = 7
palbright = 30,30,130
palpostbright = 0,0,50
palcontrast =120,120,220
paladd = 0,0,0
palmul = 1,1,1
palcolor = 0
timegap = 2
framegap = 3

[State 3080]
type = PlaySnd
triggerall = var(29)=0
trigger1 = Time = 0
value = 3085,0

[State 3080]
type = PlaySnd
triggerall = var(29)=1
trigger1 = Time = 0
value = 150,6

[State 3080]
type = ChangeState
trigger1 = Time = 64
value = 3081
ctrl = 0



;---------------------------------------------------------------------------
;Gamma Quake
[Statedef 3081]
type    = S
movetype= A
physics = N
juggle = 0;  = 1
poweradd= 0
velset = 0,0
anim = 3081
ctrl = 0
sprpriority = 0
facep2 = 1

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

[State 3080]
type = PlaySnd
triggerall = var(29)=0
trigger1 = Time = 0
value = 3085,1

[State 3080]
type = PlaySnd
triggerall = var(29)=1
trigger1 = Time = 0
value = 150,18

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


[State 3081]
type = PlaySnd
trigger1 = AnimElem = 4
value = 3080,2

[State 3081]
type = EnvShake
trigger1 = AnimElem = 4
time = 60
freq = 50
ampl = -7
phase = 7

[State 3081]
type = HitDef
attr = S, HA
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = var(30),floor(var(30)/4)
animtype = Medium
priority  = 5, Hit
guardflag = HA
pausetime = 1,1
sparkxy = -10,-70+floor(P2Dist Y)
hitsound   = S1,5
guardsound = S4,0
sparkno = 3;s7703
;guard.sparkno = S8430
ground.type = Low
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = 0,0
air.velocity = 0,0
getpower = 0

[State 3081]
type = Projectile
trigger1 = AnimElemNo(0) = 4
trigger1 = Time%10 = 0
projid = 3281
projanim = 23080+random%3
projhitanim = 8210+random%2
projremanim = 23050+random%8
;projcancelanim = 21241
projremove = 0;1
projremovetime = 150
remvelocity = 2+random%3,-3-random%4
velocity = 0,9
accel = 0,0.4
projhits = 1
projpriority = 4
projsprpriority = 3
projedgebound = 100
projheightbound = -340,-10
postype = p1;back
offset = 150-random%100,-screenpos y-200
;-----------------------------
attr = S, HP
animtype  = Medium
damage    = 4*var(30),floor(var(30)/4)
hitflag = MAFD
guardflag = MA
pausetime = 0,3
sparkno = 3;s7703
;guard.sparkno = S8430
sparkxy = -10,0
hitsound   = S1,1
guardsound = S4,0
ground.type = High
air.type = Low
ground.slidetime = 15
ground.hittime  = 25
air.hittime = 20
ground.velocity = -1,-4
air.velocity = -1,-4
fall = 1
air.fall = 1
fall.recover =0
color = 0
getpower = 0

[State 3081]
type = Projectile
trigger1 = AnimElemNo(0) = 4
trigger1 = Time%10 = 0
projid = 3282
projanim = 23080+random%3
projhitanim = 8200+random%2
projremanim = 23050+random%8
;projcancelanim = 21241
projremove = 0;1
projremovetime = 150
remvelocity = -2-random%3,-3-random%4
velocity = 0,9
accel = 0,0.4
projhits = 1
projpriority = 4
projsprpriority = 3
projedgebound = 100
projheightbound = -340,-10
postype = p1;back
offset = 150-random%100,-screenpos y-200
;-----------------------------
attr = S, HP
animtype  = Medium
damage    = 4*var(30),floor(var(30)/4)
hitflag = MAFD
guardflag = MA
pausetime = 0,3
sparkno = 3;s7703
;guard.sparkno = S8430
sparkxy = -10,0
hitsound   = S1,1
guardsound = S4,0
ground.type = High
air.type = Low
ground.slidetime = 15
ground.hittime  = 25
air.hittime = 20
ground.velocity = -1,-4
air.velocity = -1,-4
fall = 1
air.fall = 1
fall.recover =0
color = 0
getpower = 0

[State 3081]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Gamma Quake
[Statedef 3083]
type    = A
movetype= A
physics = N
juggle = 0;  = 1
;poweradd=
velset = 0,0
;anim = 3082
ctrl = 0
sprpriority = 0
facep2 = 1


[State 3083]
type = null;NotHitBy
trigger1 = 1
value = SCA


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

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

[State 3083]
type = null;Helper
trigger1 = Time = 0
stateno = 23027
ownpal = 1

[State 3083]
type = VelSet
trigger1 = Time = 0
x = (p2bodydist x)*0.5
y = (p2bodydist y-abs(const(size.mid.pos.y)))*0.5




[State 3083]
type = ChangeAnim
trigger1 = Time = 0
value = 3082+floor(((atan(((Vel Y))/(Vel X +0.0001)))*(360/(2*pi))+90)/20)


[State 3083]
type = HitDef
attr = A, HA
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 4*var(30),floor(var(30)/4)
animtype = Medium
priority  = 5, Hit
guardflag = HA
pausetime = 1,1
sparkxy = -10,-70+floor(P2Dist Y)
hitsound   = S1,5
guardsound = S4,0
sparkno = 3;s7703
;guard.sparkno = S8430
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = 0,-10
air.velocity = 0,-13
air.hittime  = 20
;guard.velocity = -9
;airguard.velocity = -9
;fall.xvelocity = -3
;ground.cornerpush.veloff = 0
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0
fall = 1
air.fall = 1
all.recover = 1
;fall.animtype = Up
;p2stateno = 9020
;getpower = 50,25




[State 3083]
type = ChangeAnim
trigger1 = Anim != [3100,3103]
trigger1 = MoveHit && FrontEdgeDist < 15
value = 3100
persistent = 0

[State 3083]
type = ChangeAnim
trigger1 = Anim != [3100,3103]
trigger1 = MoveHit && ScreenPos Y < 15 && Vel Y < 0
value = 3102
persistent = 0

[State 3083]
type = ChangeAnim
trigger1 = Anim != [3100,3103]
trigger1 = MoveHit && ScreenPos Y > 240 && Vel Y > 0
value = 3103
persistent = 0

[State 3083]
type = VelSet
trigger1 = Anim = [3100,3103]
x = 0
y = 0


[State 3083]
type = Turn
trigger1 = Anim = [3100,3103]
trigger1 = p2bodydist x < 0 && AnimElem = 1


[State 3083]
type = ChangeState
trigger1 = Anim = [3100,3103]
trigger1 = AnimTime = 0
value = 3084
ctrl = 0


[State 3083]
type = ChangeState
trigger1 = MoveGuarded
trigger2 = Time = 60
value = 3089
ctrl = 0

[State 3083]
type = null;ChangeState
trigger1 = !MoveContact && Anim = [3082,3090]
trigger1 = FrontEdgeDist < 15 || ScreenPos Y > 240 || ScreenPos Y < 0
value = 3089
ctrl = 0

[State 3083]
type = ChangeState
trigger1 = !MoveContact
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0




;---------------------------------------------------------------------------
;Killer Bee Assault
[Statedef 3084]
type    = A
movetype= A
physics = N
juggle = 0;  = 1
;poweradd=
velset = 0,0
;anim = 3082
ctrl = 0
sprpriority = 0
facep2 = 1


[State 3084]
type = null;NotHitBy
trigger1 = 1
value = SCA


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

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

[State 3084]
type = null;Helper
trigger1 = Time = 0
stateno = 23027
ownpal = 1

[State 3084]
type = VelSet
trigger1 = Time = 0
x = (p2bodydist x)*0.5
y = (p2bodydist y-abs(const(size.mid.pos.y)))*0.5


[State 3084]
type = ChangeAnim
trigger1 = Time = 0
value = 3082+floor(((atan(((Vel Y))/(Vel X +0.0001)))*(360/(2*pi))+90)/20)


[State 3084]
type = HitDef
attr = A, HA
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 4*var(30),floor(var(30)/4)
animtype = Medium
priority  = 5, Hit
guardflag = HA
pausetime = 1,1
sparkxy = -10,-70+floor(P2Dist Y)
hitsound   = S1,5
guardsound = S4,0
sparkno = 3;s7703
;guard.sparkno = S8430
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = 0,-10
air.velocity = 0,-13
air.hittime  = 20
;guard.velocity = -9
;airguard.velocity = -9
;fall.xvelocity = -3
;ground.cornerpush.veloff = 0
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0
fall = 1
air.fall = 1
all.recover = 1
;fall.animtype = Up
;p2stateno = 9020
;getpower = 50,25




[State 3084]
type = ChangeAnim
trigger1 = Anim != [3100,3103]
trigger1 = MoveHit && FrontEdgeDist < 15
value = 3100
persistent = 0

[State 3084]
type = ChangeAnim
trigger1 = Anim != [3100,3103]
trigger1 = MoveHit && ScreenPos Y < 15 && Vel Y < 0
value = 3102
persistent = 0

[State 3084]
type = ChangeAnim
trigger1 = Anim != [3100,3103]
trigger1 = MoveHit && ScreenPos Y > 240 && Vel Y > 0
value = 3103
persistent = 0

[State 3084]
type = VelSet
trigger1 = Anim = [3100,3103]
x = 0
y = 0


[State 3084]
type = Turn
trigger1 = Anim = [3100,3103]
trigger1 = p2bodydist x < 0 && AnimElem = 1


[State 3084]
type = ChangeState
trigger1 = Anim = [3100,3103]
trigger1 = AnimTime = 0
value = 3085
ctrl = 0


[State 3084]
type = ChangeState
trigger1 = MoveGuarded
trigger2 = Time = 60
value = 3089
ctrl = 0

[State 3084]
type = null;ChangeState
trigger1 = !MoveContact && Anim = [3082,3090]
trigger1 = FrontEdgeDist < 0 || ScreenPos Y > 240 || ScreenPos Y < 0
value = 3089
ctrl = 0

[State 3084]
type = ChangeState
trigger1 = !MoveContact
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0



;---------------------------------------------------------------------------
;Killer Bee Assault
[Statedef 3085]
type    = A
movetype= A
physics = N
juggle = 0;  = 1
;poweradd=
velset = 0,0
;anim = 3082
ctrl = 0
sprpriority = 0
facep2 = 1


[State 3085]
type = null;NotHitBy
trigger1 = 1
value = SCA


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

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

[State 3085]
type = null;Helper
trigger1 = Time = 0
stateno = 23027
ownpal = 1

[State 3085]
type = VelSet
trigger1 = Time = 0
x = (p2bodydist x)*0.5
y = (p2bodydist y-abs(const(size.mid.pos.y)))*0.5



[State 3085]
type = ChangeAnim
trigger1 = Time = 0
value = 3082+floor(((atan(((Vel Y))/(Vel X +0.0001)))*(360/(2*pi))+90)/20)


[State 3085]
type = HitDef
attr = A, HA
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 4*var(30),floor(var(30)/4)
animtype = Medium
priority  = 5, Hit
guardflag = HA
pausetime = 1,1
sparkxy = -10,-70+floor(P2Dist Y)
hitsound   = S1,5
guardsound = S4,0
sparkno = 3;s7703
;guard.sparkno = S8430
ground.type = High
ground.slidetime = 15
ground.hittime  = 70
ground.velocity = 0,-10
air.velocity = 0,-13
air.hittime  = 70
;guard.velocity = -9
;airguard.velocity = -9
;fall.xvelocity = -3
;ground.cornerpush.veloff = 0
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0
fall = 1
air.fall = 1
all.recover = 1
;fall.animtype = Up
;p2stateno = 9020
;getpower = 50,25




[State 3085]
type = ChangeAnim
trigger1 = Anim != [3100,3103]
trigger1 = MoveHit && FrontEdgeDist < 15
value = 3100
persistent = 0

[State 3085]
type = ChangeAnim
trigger1 = Anim != [3100,3103]
trigger1 = MoveHit && ScreenPos Y < 15 && Vel Y < 0
value = 3102
persistent = 0

[State 3085]
type = ChangeAnim
trigger1 = Anim != [3100,3103]
trigger1 = MoveHit && ScreenPos Y > 240 && Vel Y > 0
value = 3103
persistent = 0

[State 3085]
type = VelSet
trigger1 = Anim = [3100,3103]
x = 0
y = 0


[State 3085]
type = Turn
trigger1 = Anim = [3100,3103]
trigger1 = p2bodydist x < 0 && AnimElem = 1


[State 3085]
type = ChangeState
trigger1 = Anim = [3100,3103]
trigger1 = AnimTime = 0
value = 3086
ctrl = 0


[State 3085]
type = ChangeState
trigger1 = MoveGuarded
trigger2 = Time = 60
value = 3089
ctrl = 0

[State 3085]
type = null;ChangeState
trigger1 = !MoveContact && Anim = [3082,3090]
trigger1 = FrontEdgeDist < 0 || ScreenPos Y > 240 || ScreenPos Y < 0
value = 3089
ctrl = 0

[State 3085]
type = ChangeState
trigger1 = !MoveContact
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0




;---------------------------------------------------------------------------
;Killer Bee Assault
[Statedef 3086]
type    = A
movetype= A
physics = N
juggle = 0;  = 1
;poweradd=
velset = 0,0
;anim = 3082
ctrl = 0
sprpriority = 0
facep2 = 1


[State 3086]
type = null;NotHitBy
trigger1 = 1
value = SCA


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

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

[State 3086]
type = null;Helper
trigger1 = Time = 0
stateno = 23027
ownpal = 1

[State 3086]
type = VelSet
trigger1 = Time = 0
x = (p2bodydist x)*0.5
y = (p2bodydist y-abs(const(size.mid.pos.y)))*0.5



[State 3086]
type = ChangeAnim
trigger1 = Time = 0
value = 3082+floor(((atan(((Vel Y))/(Vel X +0.0001)))*(360/(2*pi))+90)/20)


[State 3086]
type = HitDef
attr = A, HA
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 4*var(30),floor(var(30)/4)
animtype = Medium
priority  = 5, Hit
guardflag = HA
pausetime = 0,0
sparkxy = -10,-70+floor(P2Dist Y)
hitsound   = S1,5
guardsound = S4,0
sparkno = 3;s7703
;guard.sparkno = S8430
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = 0,-10
air.velocity = 0,-10
air.hittime  = 20
;guard.velocity = -9
;airguard.velocity = -9
;fall.xvelocity = -3
;ground.cornerpush.veloff = 0
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0
fall = 1
air.fall = 1
all.recover = 1
;fall.animtype = Up
p1stateno = 21640
p2stateno = 21650
;getpower = 50,25
id = 800



[State 3086]
type = ChangeAnim
trigger1 = Anim != [3100,3103]
trigger1 = MoveHit && FrontEdgeDist < 15
value = 3100
persistent = 0

[State 3086]
type = ChangeAnim
trigger1 = Anim != [3100,3103]
trigger1 = MoveHit && ScreenPos Y < 15 && Vel Y < 0
value = 3102
persistent = 0

[State 3086]
type = ChangeAnim
trigger1 = Anim != [3100,3103]
trigger1 = MoveHit && ScreenPos Y > 240 && Vel Y > 0
value = 3103
persistent = 0

[State 3086]
type = VelSet
trigger1 = Anim = [3100,3103]
x = 0
y = 0


[State 3086]
type = Turn
trigger1 = Anim = [3100,3103]
trigger1 = p2bodydist x < 0 && AnimElem = 1


[State 3086]
type = ChangeState
trigger1 = Anim = [3100,3103]
trigger1 = AnimTime = 0
value = 3089
ctrl = 0


[State 3086]
type = ChangeState
trigger1 = MoveGuarded
trigger2 = Time = 60
value = 3089
ctrl = 0


[State 3086]
type = null;ChangeState
trigger1 = !MoveContact && Anim = [3082,3090]
trigger1 = FrontEdgeDist < 0 || ScreenPos Y > 240 || ScreenPos Y < 0
value = 3089
ctrl = 0

[State 3086]
type = ChangeState
trigger1 = !MoveContact
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0

;---------------------------------------------------------------------------
;Killer Bee Assault End
[Statedef 3089]
type    = A
movetype= I
physics = A
juggle = 0;  = 1
;poweradd=
velset = -2,-3
anim = 43
ctrl = 0
sprpriority = 0
facep2 = 1


[State 3089]
type = null;NotHitBy
trigger1 = 1
value = SCA


[State 3089]
type = null;PlayerPush
trigger1 = 1
value = 0

[State 3089]
type = null;ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0


[State 3089]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 70
persistent = 0

[State 3089]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0

;---------------------------------------------------------------------------
;Tactical Advantage

[Statedef 3100]
type    = S
movetype= A
physics = N
juggle = 0;  = 4
velset = 0,0
anim = 3100
poweradd= 0
ctrl = 0
sprpriority = 0
facep2 = 1

[State 3100, AvX No BG]
type = null;assertspecial
trigger1 = time = 7
flag = noBG
flag2 = noFG
flag3 = nobardisplay
ignorehitpause = 1

[State 3100, AvX Super Pause]
type = SuperPause
trigger1 = time = 7
Time = 40
pos = 25,-90
sound = 1500,0
poweradd = -1000
movetime = 40

[State -3100, AvX Hyper Background]
type = Helper
triggerall = !numhelper(40001)
trigger1 = time = 7
helpertype = normal
name = "HSDM"
ID = 40001
stateno = 40001
pos = 160,120
postype = left
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 9999
pausemovetime = 9999
ignorehitpause = 1

[State 3100, AvX Hyper Portrait]
type = Helper
triggerall = !numhelper(40003)
trigger1 = time = 7
helpertype = normal
name = "H.Port"
ID = 40003
stateno = 40003
pos = 160,120
postype = left
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 9999
pausemovetime = 9999
ignorehitpause = 1

[State 3100, AvX Helper]
type = Helper
triggerall = !numhelper(40004)
trigger1 = time = 7
helpertype = normal
name = "Player 1"
ID = 40004
stateno = 40004
pos = 160,120
postype = left
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 9999
pausemovetime = 9999
ignorehitpause = 1

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

[State 3100, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 3110
ctrl = 0

;---------------------------------------------------------------------------
[Statedef 3110]
type    = S
movetype= A
physics = N
juggle = 0;  = 4
velset = 0,0
anim = 3110
poweradd= 0
ctrl = 0
sprpriority = 0
facep2 = 1

[State 3110, PlaySnd]
type = PlaySnd
trigger1 = time = 5
value = S150,27

[State 3110, PlaySnd]
type = PlaySnd
trigger1 = time = 10
value = S150,28
volume = 300

[State 3110, HitDef]
type = HitDef
trigger1 = movehit = 0
attr = S,HA
hitflag = MAF
guardflag = MA
animtype = back
air.animtype = back
damage = 30,7
pausetime = 0, 0
sparkno = 3
sparkxy = 50,-100
hitsound = S1,0
guardsound = S4,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 10
ground.velocity = -4,-3
air.type = High
air.velocity = -4,-2
air.hittime = 12
getpower = 14,7
kill = 0

[State 3110, Shells]
type = Explod
triggerall = time < 70
trigger1 = time%5=4
anim = 3140
ID = 3140
pos = 68,-107
postype = p1
facing = 1
vfacing = 1
bindtime = 1
vel = -5,-7
accel = 0,3
random = 0,0
removetime = 64
supermove
pausemove
scale = .5,.5
sprpriority = 3
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0

[State 3110, Projectile]
type = Projectile
triggerall = time < 60
trigger1 = time%5=4
projanim = 3160
projpriority = 1
projheightbound = -240, 100
projedgebound = 100
projscreenbound = 100
projshadow = -1
offset = 90,-70
velocity = 20
attr = S, HP
damage   = 40,4
animtype = heavy
guardflag = MA
hitflag = MAFDP
pausetime = 10,10
hitsound = 5,0
sparkno = 3
sparkxy = 35,-45
guardsound = 6,0
ground.type = Low
ground.slidetime = 25
ground.hittime  = 25
ground.velocity = -10,-4
air.animtype = Back
air.velocity = -10,-2
air.juggle = 0; = 1
air.fall = 1
down.velocity = -4,-6
down.hittime = 30
down.bounce = 0
getpower = 0
fall = 1

[State 3110, Gun Blast]
type = Helper
triggerall = time < 60
trigger1 = time%5=4
helpertype = normal ;player
name = "Gun Blast"
ID = 3150
stateno = 3150
pos = 127,-102
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0

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

;---------------------------------------------------------
;Gun Blast

[Statedef 3150]
type    = S
movetype= I
physics = N
velset = 0,0
poweradd = 0
anim = 3150
ctrl = 0
sprpriority = 3

[State 3150, AngleSet]
type = AngleDraw
trigger1 = 1
value = 10

[State 3150, Trans]
type = Trans
trigger1 = 1
trans = add

[State 3150, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0

;---------------------------------------------------------------------------
;Red Rage

[Statedef 3500]
type    = S
movetype= A
physics = N
juggle = 0;  = 4
velset = 0,0
anim = 3500
poweradd= 0
ctrl = 0
sprpriority = 0
facep2 = 1

[State 3500, AvX No BG]
type = assertspecial
trigger1 = time = 7
flag = noBG
flag2 = noFG
flag3 = nobardisplay
ignorehitpause = 1

[State 3500, AvX Super Pause]
type = SuperPause
trigger1 = time = 7
Time = 40
pos = 25,-90
sound = 1500,0
poweradd = -1000
movetime = 40

[State 3500, AvX Hyper Background]
type = Helper
triggerall = !numhelper(40001)
trigger1 = time = 7
helpertype = normal
name = "HSDM"
ID = 40001
stateno = 40001
pos = 160,120
postype = left
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 9999
pausemovetime = 9999
ignorehitpause = 1

[State 3500, AvX Hyper Portrait]
type = Helper
triggerall = !numhelper(40003)
trigger1 = time = 7
helpertype = normal
name = "H.Port"
ID = 40003
stateno = 40003
pos = 160,120
postype = left
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 9999
pausemovetime = 9999
ignorehitpause = 1

[State 3500, AvX Helper]
type = Helper
triggerall = !numhelper(40004)
trigger1 = time = 7
helpertype = normal
name = "Player 1"
ID = 40004
stateno = 40004
pos = 160,120
postype = left
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 9999
pausemovetime = 9999
ignorehitpause = 1

[State 3500, sense bar]
type = Explod
triggerall = animelem = 6
trigger1 = numexplod(3301)=0
anim = 3501
id = 3501
pos = ifelse(TeamSide = 1, 1, 319), 240
postype = left
facing = ifelse(TeamSide = 1, 1, -1)
bindtime = -1
removetime = -2
sprpriority = 90
ignorehitpause = 1
ownpal = 1

[State 3500, sense bar]
type = Explod
triggerall = animelem = 6
trigger1 = numexplod(3302)=0
anim = 3502
id = 3502
pos = ifelse(TeamSide = 1, 48, 271), 240
postype = left
facing = 1;ifelse(TeamSide = 1, 1, -1)
bindtime = -1
removetime = -2
sprpriority = 92
ignorehitpause = 1
ownpal = 1

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


;---------------------------------------------------------------------------------------
;dizzy
[Statedef 5300]
type    = S
movetype= H
physics = N
juggle = 0;  = 4
velset = 0,0
anim = 5300
ctrl = 0
sprpriority = 2

[State 5300]
type = PosSet
trigger1 = time = 0
y = 0


[State 5300,e]
type = SelfState; ChangeState
trigger1 = time = 360
value = 0
ctrl = 1


;---------------------------------------------------------------------------------------
;Short Circuit Dizzyness
[Statedef 5301]
type    = S
movetype= H
physics = N
juggle = 0;  = 4
velset = 0,0
anim = 7030+random%3
ctrl = 0
sprpriority = 3


[State 5301]
type = PlaySnd
trigger1 = Time = 0
value = 5300, 0
loop = 1
channel = 4

[State 5301]
type = StopSnd
trigger1 = time = 359
trigger2 = enemy,anim != 5300
channel = 4

[State 5301]
type = DestroySelf
trigger1 = time = 360
trigger2 = enemy,anim != 5300



;------------------------------------------------------------------------------------------------------------
;
[Statedef 5999]
type = S
movetype = I
physics = N
anim = 6000
ctrl = 0
sprpriority = 3
velset = 0,Parent,Vel Y


[State 6003]
type = Varset
trigger1 = Time = 0
var(3) = parent,id

[State 6003]
type = Turn
trigger1 = parent,facing != facing

[State 6003]
type = DestroySelf
trigger1 = !PlayerIDExist(var(3))


[State 6003]
type = BindToParent
trigger1 = PlayerIDExist(var(3))



;------------------------------------------------------------------------------------------------------------
;Ice Helper
[Statedef 6000]
type = S
movetype = I
physics =N
anim = 6000
ctrl = 0
sprpriority = 4
velset = 0,0


[State 6000]
type = BindToParent
trigger1 = parent,facing = 1
pos = 48,-95

[State 6000]
type = BindToParent
trigger1 = parent,facing = -1
pos = 12,-104

[State 6000]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = Parent,Stateno != 0


;------------------------------------------------------------------------------------------------------------
;FlameHelper
[Statedef 6001]
type = S
movetype = I
physics =N
anim = 8051
ctrl = 0
sprpriority = 4
velset = 0,0


[State 6001]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 6001]
type = BindToParent
trigger1 = parent,facing = 1
pos = 12,-104

[State 6001]
type = BindToParent
trigger1 = parent,facing = -1
pos = 48,-95

[State 6001]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = Parent,Stateno != 0


;------------------------------------------------------------------------------------------------------------
;Speak Helper
[Statedef 6010]
type = S
movetype = I
physics =N
anim = 6010+(facing = -1)
ctrl = 0
sprpriority = 4
velset = 0,0


[State 6010]
type = BindToParent
trigger1 = 1

[State 6010]
type = DestroySelf
;trigger1 = AnimTime = 0
trigger1 = parent,stateno != 184



;------------------------------------------------------------------------------------------------------------
;Body helper
[Statedef 6171]
type = S
movetype = I
physics =N
anim = 6171
ctrl = 0
sprpriority = 3
velset = 0,0


[State 6171]
type = varset
trigger1 = Time = 0
var(2) = parent,stateno


[State 6171]
type = null;AssertSpecial
trigger1 = 1
flag = noshadow


[State 6171]
type = BindToParent
trigger1 = 1


[State 6171]
type = DestroySelf
trigger1 = parent,stateno != var(2)




;------------------------------------------------------------------------------------------------------------
;Bison helper
[Statedef 6181]
type = S
movetype = I
physics =N
anim = 6181
ctrl = 0
sprpriority = 3
velset = 0,0


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


[State 6181]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 6181]
type = PosAdd
trigger1 = AnimElemNo(0) = [6,7]
y = cos(Time*pi/60)


[State 6181]
type = DestroySelf
trigger1 = Time = 777


;------------------------------------------------------------------------------------------------------------
;win 2 helper
[Statedef 6184]
type = S
movetype = I
physics =N
anim = 6183+(facing = -1)
ctrl = 0
sprpriority = 3
velset = 0,0


[State 6184]
type = null;Turn
trigger1 = Time = 0


[State 6184]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 6184]
type = BindToParent
trigger1 = Time = 0
trigger1 = parent,facing = 1
pos = -100,-105

[State 6184]
type = BindToParent
trigger1 = Time = 0
trigger1 = parent,facing = -1
pos = -100,-105


[State 6184]
type = DestroySelf
trigger1 = AnimTime = 0



;------------------------------------------------------------------------------------------------------------
;win turtle Helper
[Statedef 6186]
type = S
movetype = I
physics =N
anim = 6174
ctrl = 0
sprpriority = 4
velset = 1,0


[State 6186]
type = AssertSpecial
trigger1 = 1
flag = noshadow



[State 6186]
type = ChangeAnim
trigger1 = ParentDist X <= 40
value = anim


[State 6186]
type = VelSet
trigger1 = Vel X != 0 && ParentDist X <= 40
x = 0

[State 6186]
type = DestroySelf
trigger1 = Time = 777



;------------------------------------------------------------------------------------------------------------
;win turtle Helper
[Statedef 6187]
type = S
movetype = I
physics =N
anim = 6174
ctrl = 0
sprpriority = 4
velset = -1,0


[State 6187]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 6187]
type = Turn
trigger1 = Time = 0


[State 6187]
type = ChangeAnim
trigger1 = ParentDist X < 0
value = anim


[State 6187]
type = VelSet
trigger1 = Vel X != 0 && ParentDist X < 0
x = 0

[State 6187]
type = DestroySelf
trigger1 = Time = 777


;------------------------------------------------------------------------------------------------------------
;intro 8 helper
[Statedef 6189]
type = S
movetype = I
physics =N
anim = 6189
ctrl = 0
sprpriority = 2
velset = 0,0


[State 6189]
type = varset
trigger1 = Time = 0
var(2) = parent,stateno




[State 6189]
type = Sprpriority
trigger1 = AnimElem = 12
value = -1


[State 6189]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 6189]
type = DestroySelf
trigger1 = parent,stateno != var(2)


[State 6189]
type = BindToParent
trigger1 = 1


;------------------------------------------------------------------------------------------------------------
;Coat Helper
[Statedef 6192]
type = S
movetype = I
physics =N
anim = 6192
ctrl = 0
sprpriority = 3
velset = -5,-7




[State 6192]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 6192]
type = VelAdd
trigger1 = 1
y = 0.3



[State 6192]
type = DestroySelf
trigger1 = BackEdgeDist < -100


;------------------------------------------------------------------------------------------------------------
;intro 4 punching bag
[Statedef 6196]
type = S
movetype = I
physics = N
anim = 6196
ctrl = 0
sprpriority = -1
velset = 0,0


[State 6195]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 6195]
type = null;Turn
trigger1 = Parent,Facing != Facing


[State 6195]
type = ChangeAnim
trigger1 = Parent,Anim = 201 && Parent,AnimElem = 3
value = 6196
elem = 2
persistent = 0


[State 6195]
type = ChangeAnim
trigger1 = Parent,Anim = 310 && Parent,AnimElem = 4
value = 6196
elem = 4
persistent = 0


[State 6195]
type = ChangeAnim
trigger1 = Parent,Anim = 312
value = 6196
elem = 3
persistent = 0


[State 6195]
type = ChangeAnim
trigger1 = Parent,Anim = 312 && Parent,AnimElem = 8
value = 6199
persistent = 0


[State 6195]
type = ChangeAnim
trigger1 = Anim = 6196 && AnimTime = 0
value = 6197
persistent = 0



[State 6195]
type = ChangeAnim
trigger1 = Anim = 6197 && AnimTime = 0
value = 6198
persistent = 0

[State 6195]
type = VelSet
trigger1 = Anim = 6198
x = 7
y = -9
persistent = 0


[State 6195]
type = VelSet
trigger1 = Anim = 6199
x = 6
persistent = 0


[State 6195]
type = PlaySnd
trigger1 = Anim = 6199 && Vel X > 0
value = 100,1
persistent = 0


[State 6195]
type = Explod
trigger1 = Anim = 6199 && Vel X > 0
trigger1 = Time%4 = 0
anim = 7107
pos = 0,0
;random = 0,0
ontop = 1


[State 6195]
type = DestroySelf
trigger1 = FrontEdgeDist < -120



;------------------------------------------------------------------------------------------------------------
;intro 3 helper Cult
[Statedef 6196]
type = S
movetype = I
physics = N
anim = 6196
ctrl = 0
sprpriority = -1
velset = 0,0


[State 6196]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 6196]
type = null;Turn
trigger1 = Parent,Facing != Facing


[State 6196]
type = ChangeAnim
trigger1 = Parent,AnimElem = 19, = 17
value = anim
elem = 2
persistent = 0


[State 6194]
type = VelSet
trigger1 = AnimElem = 12
x = -2
persistent = 0

[State 6194]
type = DestroySelf
trigger1 = BackEdgeDist < -120



;------------------------------------------------------------------------------------------------------------
;intro 2 helper
[Statedef 6197]
type = S
movetype = I
physics = N
anim = 6193
ctrl = 0
sprpriority = 4
velset = 0,0


[State 6197]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 6197]
type = Turn
trigger1 = Parent,Facing != Facing

[State 6197]
type = DestroySelf
trigger1 = Time = 700


;------------------------------------------------------------------------------------------------------------
;intro 2 helper
[Statedef 6198]
type = S
movetype = I
physics = N
anim = 6194
ctrl = 0
sprpriority = 0
velset = 0,0


[State 6198]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 6198]
type = Turn
trigger1 = Parent,Facing != Facing

[State 6198]
type = DestroySelf
trigger1 = Time = 700
;------------------------------------------------------------------------------------------------------------
;Cloak
[Statedef 6199]
type = S
movetype = I
physics =N
anim = 6000
ctrl = 0
sprpriority = 1
velset = 0,0



[State 6199]
type = Turn
trigger1 = Parent,Facing != Facing

[State 6199]
type = DestroySelf
trigger1 = parent,stateno != 199

[State 6199]
type = BindToParent
trigger1 = 1
pos = 0,-1


;------------------------------------------------------------------------------------------------------------
;Ice Helper
[Statedef 6220]
type = S
movetype = I
physics =N
anim = 6220+(facing = -1)
ctrl = 0
sprpriority = 4
velset = 0,0


[State 6220]
type = BindToParent
trigger1 = 1
pos = 0,0

[State 6220]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = Parent,Stateno != 220



;------------------------------------------------------------------------------------------------------------
;Ice Helper
[Statedef 6220]
type = S
movetype = I
physics =N
anim = 6220+(facing = -1)
ctrl = 0
sprpriority = 4
velset = 0,0


[State 6220]
type = BindToParent
trigger1 = 1
pos = 0,0

[State 6220]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = Parent,Stateno != 220

;------------------------------------------------------------------------------------------------------------
;Ice Helper
[Statedef 6320]
type = S
movetype = I
physics =N
anim = 6320+(facing = -1)
ctrl = 0
sprpriority = 4
velset = 0,0


[State 6320]
type = BindToParent
trigger1 = 1
pos = 0,0

[State 6320]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = Parent,Stateno != 320


;------------------------------------------------------------------------------------------------------------
;Ice Helper
[Statedef 6420]
type = S
movetype = I
physics =N
anim = 6420+(facing = 1)
ctrl = 0
sprpriority = 4
velset = 0,0


[State 6420]
type = BindToParent
trigger1 = 1
pos = 0,0

[State 6420]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = Parent,Stateno != 420


;------------------------------------------------------------------------------------------------------------
;Ice Helper
[Statedef 6520]
type = S
movetype = I
physics =N
anim = 6520+(facing = -1)
ctrl = 0
sprpriority = 4
velset = 0,0


[State 6520]
type = BindToParent
trigger1 = 1
pos = 0,0

[State 6520]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = Parent,Stateno != 520



;------------------------------------------------------------------------------------------------------------
;Hand Clap Helper
[Statedef 6620]
type = S
movetype = I
physics =N
anim = 6620
ctrl = 0
sprpriority = 4
velset = 0,0


[State 6620]
type = BindToParent
trigger1 = 1
pos = 0,0

[State 6620]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = Parent,Stateno != 610


;------------------------------------------------------------------------------------------------------------
;Ice Helper
[Statedef 6720]
type = S
movetype = I
physics =N
anim = 6720+(facing = 1)
ctrl = 0
sprpriority = 4
velset = 0,0


[State 6720]
type = BindToParent
trigger1 = 1
pos = 0,0

[State 6720]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = Parent,Stateno != 720


;------------------------------------------------------------------------------------------------------------
;Arm Helper
[Statedef 6810]
type = S
movetype = I
physics =N
anim = 6810+(facing = -1)
ctrl = 0
sprpriority = 4
velset = 0,0


[State 6810]
type = BindToParent
trigger1 = 1
pos = 0,0


[State 6810]
type = NotHitBy
trigger1 = 1
value = SCA

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

[State 6810]
type = PlayerPush
trigger1 = 1
value = 1

[State 6810]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = Parent,Stateno != 810


;------------------------------------------------------------------------------------------------------------
;Arm Helper
[Statedef 6840]
type = S
movetype = I
physics =N
anim = 6810+(facing = -1)
ctrl = 0
sprpriority = 4
velset = 0,0


[State 6840]
type = BindToParent
trigger1 = 1
pos = 0,0


[State 6840]
type = NotHitBy
trigger1 = 1
value = SCA

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

[State 6840]
type = PlayerPush
trigger1 = 1
value = 1

[State 6840]
type = DestroySelf
trigger1 = AnimElem = 6
trigger2 = Parent,Stateno != 840

;------------------------------------------------------------------------------------------------------------
;Claw Slash
[Statedef 6935]
type = S
movetype = A
physics =N
anim = 21510
ctrl = 0
sprpriority = 4
velset = 0,0


[State 6935]
type = varset
trigger1 = Time = 0
var(2) = parent,stateno


[State 6935]
type = Helper
trigger1 = AnimElem = 3
stateno = 6936
ownpal = 1


[State 6935]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 6935]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = S, ST          ;Attributes: Standing, Normal Throw
hitflag = MA          ;Affect only ground people who are not being hit
priority = 3, Miss    ;Throw has low priority, must be miss or dodge type.
sparkno = 0;s7700
p1sprpriority = 1     ;Draw p1's sprite in front of p2
                      ;p2's sprite priority is set to 0 by default
p1facing = 1
p2facing = 1          ;Force p2 to face p`
p1stateno = 21510       ;On success, changes to state 
p2stateno = 21520       ;If hit, p2 changes to state 
guard.dist = 0        ;This prevents p2 from going into a guard state if close
fall = 1              ;Force p2 into falling down
hitsound = S1510,1
id = 800
guardflag = M
guardsound = S4,0
;guard.sparkno = S8430
damage = 3*(Root,var(30)),floor(Root,var(30)/2)
sparkxy = -10,-70


[State 6935]
type = DestroySelf
trigger1 = animtime = 0
trigger2 = parent,stateno != var(2)

[State 6935]
type = null;BindToParent
trigger1 = 1



;------------------------------------------------------------------------------------------------------------
;Claw Slash
[Statedef 6936]
type = S
movetype = I
physics =N
anim = 21511
ctrl = 0
sprpriority = 0
velset = 0,0


[State 6936]
type = varset
trigger1 = Time = 0
var(2) = parent,id


[State 6936]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 6936]
type = DestroySelf
trigger1 = animtime = 0
trigger2 = !PlayerIDExist(var(2))

[State 6936]
type = BindToParent
trigger1 = PlayerIDExist(var(2))



;------------------------------------------------------------------------------------------------------------
;Blood Bubble
[Statedef 6937]
type = S
movetype = I
physics =N
anim = 21513
ctrl = 0
sprpriority = 0
velset = 0,0


[State 6937]
type = varset
trigger1 = Time = 0
var(2) = parent,id


[State 6937]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 6937]
type = ChangeAnim
trigger1 = Parent,AnimElemNo(0) != AnimElemNo(0)
value = anim
Parent,AnimElemNo(0)

[State 6937]
type = DestroySelf
trigger1 = animtime = 0
trigger2 = !PlayerIDExist(var(2))

[State 6937]
type = BindToParent
trigger1 = PlayerIDExist(var(2))


;------------------------------------------------------------------------------------------------------------
;Cloak
[Statedef 7003]
type = S
movetype = I
physics =N
anim = 7003
ctrl = 0
sprpriority = 0
velset = 0,0

[State 7003]
type = Turn
trigger1 = Parent,Facing != Facing

[State 7003]
type = DestroySelf
trigger1 = root,anim != 21
trigger1 = root,anim != 3020

[State 7003]
type = BindToParent
trigger1 = 1


;------------------------------------------------------------------------------------------------------------
;Dash Forward Booster Helper
[Statedef 7005]
type = S
movetype = I
physics =N
anim = 6100
ctrl = 0
sprpriority = 0
velset = 0,0


[State 7005]
type = BindToParent
trigger1 = 1


[State 7005]
type = DestroySelf
trigger1 = parent,stateno != 100



;------------------------------------------------------------------------------------------------------------
;Dash Back Booster Helper
[Statedef 7006]
type = S
movetype = I
physics =N
anim = 6105
ctrl = 0
sprpriority = 0
velset = 0,0



[State 7006]
type = BindToParent
trigger1 = 1

[State 7006]
type = DestroySelf
trigger1 = parent,stateno != 105


;------------------------------------------------------------------------------------------------------------
;Explodsion A
[Statedef 7070]
type = S
movetype = I
physics =N
anim = 7070
ctrl = 0
sprpriority = 3
velset = 0,0



[State 7070]
type = AssertSpecial
trigger1 = Time%2 = 0
flag = invisible


[State 7070]
type = DestroySelf
trigger1 = AnimTime = 0



;------------------------------------------------------------------------------------------------------------
;Dust Trail
[Statedef 7106]
type = S
movetype = I
physics =N
anim = 7106
ctrl = 0
sprpriority = 3
velset = 0,0


[State 7106]
type = Varset
trigger1 = Time = 0
var(3) = parent,id


[State 7106]
type = Varset
trigger1 = Time = 0
var(2) = parent,stateno

[State 7106]
type = BindToParent
trigger1 = parent,stateno = var(2)
trigger1 = parent,id = var(3)
pos = -67,-floor(parent,pos y)


[State 7106]
type = DestroySelf
trigger1 = !PlayerIDExist(var(3))
trigger2 = parent,stateno != var(2)





;---------------------------------------------------------------------------
; HITA_UP (initial going up)
[Statedef 7321]
type    = A
movetype= H
physics = N
ctrl = 0

[State 7321]
type = VelAdd;Gravity
trigger1 = 1
y = 0.35;GetHitVar(yaccel)

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

[State 7321]
type = ChangeAnim
trigger1 = Time = 0
value = ifelse(SelfAnimExist(5055),5055,5050)

[State 7321]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 5055
value = ifelse(SelfAnimExist(5051),5051,5050)

[State 7321]
type = SelfState
trigger1 = Vel Y > 2
value = 5040 ;HITA_RECOV
persistent = 0

[State 7321]
type = null;SelfState
;triggerall = HitFall
trigger1 = Vel Y > 1 ;Anim is over
trigger2 = Vel Y > 0    ;Hit ground
trigger2 = Pos Y >= 10  ;.
value = 5050 ;HITA_FALL

[State 7321]
type = null;SelfState
trigger1 = Vel Y > 0 
trigger1 = Pos Y >= 0 
value = 52 

;---------------------------------------------------------------------------------------------
;Beginning of the super jump for AI Launcher
[Statedef 7500]
type = S
physics = S
anim = 40
ctrl = 0
sprpriority = 1

[State 7500, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 7501
ctrl = 1

;---------------------------------------------------------------------------------------------
;Super Jump for AI Launcher

[Statedef 7501]
type = A
physics = A
ctrl = 0
anim = 52
velset = 4,const(velocity.jump.y) - 3

[State 7501, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = 9999,5

[State 0, ChangeState]
type = ChangeState
trigger1 = pos y <= -120
value = 600
ctrl = 0

;---------------------------------------------------------------------------------------------
;Super Jump for AI Launcher

[Statedef 7502]
type = A
physics = A
ctrl = 1

[State 7505, Vel]
type = VelAdd
triggerall = Vel X <= 2.5
trigger1 = command = "holdfwd"
trigger1 = Anim != 42
x = 0.25


;------------------------------------------------------------------------------------------------------------
;Guard Shield
[Statedef 7510]
type = S
movetype = I
physics =N
anim = 7510
ctrl = 0
sprpriority = 4
velset = 0,0

[State 7510]
type = Varset
trigger1 = Time = 0
var(2) = parent,stateno


[State 7510]
type = BindToParent
trigger1 = Parent,Anim = 130
trigger2 = Parent,Anim = 150
pos = 0,0

[State 7510]
type = BindToParent
trigger1 = Parent,Anim = 131
trigger2 = Parent,Anim = 151
pos = 13,18


[State 7510]
type = BindToParent
trigger1 = Parent,Anim = 132
trigger2 = Parent,Anim = 152
pos = 1,-44

[State 7510]
type = DestroySelf
trigger1 = parent,anim != [130,132]
trigger1 = parent,anim != [150,152]



;------------------------------------------------------------------------------------------------------------
;General Explode Helper, No Loop
[Statedef 7555]
type = S
movetype = I
physics = N
anim = Parent,var(15)
ctrl = 0
sprpriority = 4
velset = 0,0

[State 7555]
type = Varset
trigger1 = Time = 0
var(2) = Parent,Anim

[State 7555]
type = BindToParent
trigger1 = 1

[State 7555]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = Parent,Anim != var(2)

;------------------------------------------------------------------------------------------------------------
[Statedef 7600]
type = s
movetype = i
physics = n

[State 7600]
type = AssertSpecial
trigger1 = 1
flag = noshadow
flag2 = invisible

[State 7600]
type = NotHitBy
trigger1 = 1
value = SCA

[State 7600, Dramatic KO Helper]
type = helper
triggerall = (root,alive || enemy,alive)
trigger1 = roundstate = 3 && (root,life <= 0 || enemy,life <= 0)
helpertype = Normal
id = 7601
pos = 0,0
postype = p1
name = "K.O."
stateno = 7601
supermovetime = 9999999999
pausemovetime = 9999999999
persistent = 0
ignorehitpause = 1

;-----------------------------------------------------------------
;Dramatic K.O. Effects
;-----------------------------------------------------------------
[Statedef 7601]
type = s
movetype = i
physics = n



[State 7601]
type = PlaySnd
trigger1 = Time = 0
value = 170,1
ignorehitpause = 1
persistent = 0
pausemovetime = 99999
supermovetime = 99999

[State 7601]
type = AssertSpecial
trigger1 = 1
flag = noshadow
flag2 = invisible
flag3 = nokoslow
ignorehitpause = 1

[State 7601]
type = NotHitBy
trigger1 = 1
value = SCA

[State 7601]
type = Pause
trigger1 = 1
time = 2
ignorehitpause = 1
persistent = 0


[State 7601, DestroySelf]
type = DestroySelf
trigger1 = time >= 2


;--------------------------------------------------------------------------------------------
; Guard Push (stand)
[Statedef 7610]
type    = S
movetype= I
physics = N
poweradd= 0
velset = 10,0
ctrl = 0
anim = 7610
sprpriority = 2
facep2 = 1

[State 7610, VelMul]
type = VelMul
trigger1 = 1
x = 0.75

[State 7610, VelSet]
type = VelSet
trigger1 = Time = 10
x = 0

[State 7610, Width]
type = Width
trigger1 = 1
value = 10,0

[State 7610, NotHitBy]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 23


[State 7610, PosAdd]
type = PosAdd
trigger1 = animelem = 2
x = 30

[State 7610, PlaySnd 2]
type = PlaySnd
triggerall = var(29)=0
trigger1 = Time = 0
value = 220,0

[State 7610]
type = PlaySnd
triggerall = var(29)=1
trigger1 = time = 0
value = 150,25

[State 7610, Spark]
type = Explod
trigger1 = AnimElem = 2;Time = 0
anim = 7020
postype = p1
pos = 38,-89
ownpal = 1
vel = 0,0
scale = 0.5,0.5
ignorehitpause = 1
sprpriority = 5

[State 7610, Guard Push Helper]
type = Helper
trigger1 = AnimElem = 2;Time = 0
helpertype = Normal
name = "GuardPush"
postype = P1
pos = -50,0
stateno = 7611
ownpal = 1
size.height = 200
size.ground.back = 30
size.ground.front = 30

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

;---------------------------------------------------------------------------
; Guard Push (Helper)

[Statedef 7611]
type    = S
movetype= I
physics = N
poweradd= 0
ctrl = 0
anim = Parent,Anim
sprpriority = -4


[State 7611, PlayerPush]
type = AssertSpecial
trigger1 = 1
flag = invisible

[State 7611, PlayerPush]
type = PlayerPush
trigger1 = Time >= 0
value = 1

[State 7611, VelSet 1]
type = VelSet
trigger1 = Time = [0,10]
x = 30

[State 7611, VelSet 2]
type = VelSet
trigger1 = Time = [11,13]
x = 20

[State 7611, VelSet 2]
type = VelSet
trigger1 = Time >= 14
x = 10

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

[State 7611, DestroySelf]
type = DestroySelf
trigger1 = Time >= 18

;---------------------------------------------------------------------------
; Guard Push (Crouching)

[Statedef 7615]
type    = C
movetype= I
physics = N
poweradd= 0
velset = 10,0
ctrl = 0
anim = 7615
sprpriority = 2
facep2 = 1

[State 7615, VelMul]
type = VelMul
trigger1 = 1
x = 0.75

[State 7615, VelSet]
type = VelSet
trigger1 = Time = 10
x = 0

[State 7615, Width]
type = Width
trigger1 = 1
value = 10,0

[State 7615, NotHitBy]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 23


[State 7615, PosAdd]
type = PosAdd
trigger1 = animelem = 2
x = 30

[State 7615, PlaySnd 2]
type = PlaySnd
triggerall = var(29)=0
trigger1 = Time = 0
value = 220,0

[State 7615]
type = PlaySnd
triggerall = var(29)=1
trigger1 = time = 0
value = 150,25

[State 7615, Spark]
type = Explod
trigger1 = AnimElem = 2;Time = 0
anim = 7020
postype = p1
pos = 32,-67
ownpal = 1
vel = 0,0
scale = 0.5,0.5
ignorehitpause = 1
sprpriority = 5

[State 7615, Guard Push Helper]
type = Helper
trigger1 = AnimElem = 2;Time = 0
helpertype = Normal
name = "GuardPush"
postype = P1
pos = -50,0
stateno = 7611
ownpal = 1
size.height = 200
size.ground.back = 30
size.ground.front = 30

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


;---------------------------------------------------------------------------
; Guard Push (Air)

[Statedef 7620]
type    = A
movetype= I
physics = N
poweradd= 0
velset = 10,0
ctrl = 0
anim = 7620
sprpriority = 2
facep2 = 1


[State 7620, VelMul]
type = VelMul
trigger1 = 1
x = 0.75

[State 7620, VelSet]
type = VelSet
trigger1 = Time = 10
x = 0

[State 7620, Width]
type = Width
trigger1 = 1
value = 10,0

[State 7620, NotHitBy]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 23


[State 7620, PosAdd]
type = PosAdd
trigger1 = animelem = 2
x = 30

[State 7620, PlaySnd 2]
type = PlaySnd
triggerall = var(29)=0
trigger1 = Time = 0
value = 220,0

[State 7620]
type = PlaySnd
triggerall = var(29)=1
trigger1 = time = 0
value = 150,25

[State 7620, Spark]
type = Explod
trigger1 = AnimElem = 2;Time = 0
anim = 7020
postype = p1
pos = 62,-130
ownpal = 1
vel = 0,0
scale = 0.5,0.5
ignorehitpause = 1
sprpriority = 7

[State 7620, Guard Push Helper]
type = Helper
trigger1 = AnimElem = 2;Time = 0
helpertype = Normal
name = "GuardPush"
postype = P1
pos = -50,0
stateno = 7622
ownpal = 1
size.height = 200
size.ground.back = 30
size.ground.front = 30

[State 7620, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 7621

;---------------------------------------------------------------------------
; Guard Push (Air - Falling)

[Statedef 7621]
type    = A
movetype= I
physics = A
poweradd= 0
ctrl = 1
anim = 70
sprpriority = 1

[State 7621, ChangeState]
type = ChangeState
trigger1 = Pos Y >= 0
value = 52
ctrl = 0

;---------------------------------------------------------------------------
; Guard Push (Air Helper)

[Statedef 7622]
type    = A
movetype= I
physics = N
poweradd= 0
ctrl = 0
anim = Parent,Anim
sprpriority = -4


[State 7622, PlayerPush]
type = AssertSpecial
trigger1 = 1
flag = invisible

[State 7622, PlayerPush]
type = PlayerPush
trigger1 = Time >= 0
value = 1

[State 7622, VelSet 1]
type = VelSet
trigger1 = Time = [0,10]
x = 30

[State 7622, VelSet 2]
type = VelSet
trigger1 = Time = [11,13]
x = 20

[State 7622, VelSet 2]
type = VelSet
trigger1 = Time >= 14
x = 10

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

[State 7622, DestroySelf]
type = DestroySelf
trigger1 = Time >= 18


;---------------------------------------------------------------------------
; Super Jump Start
[Statedef 7710]
type    = S
physics = S
anim = 40
ctrl = 0
sprpriority = 1

[State 7710]
type = PlaySnd
trigger1 = Time = 1
value = 7710,0
channel = 1

[State 7710]
type = null;Explod
trigger1 = Time = 1
anim = 7055
ownpal = 1

[State 7710]
type = null;Explod
trigger1 = Time = 1
anim = 7055
facing = -1
ownpal = 1

[State 7710, 1]
type = VarSet
trigger1 = Time = 0
sysvar(1) = 0

[State 7710, 2]
type = VarSet
trigger1 = command = "holdfwd"
sysvar(1) = 1

[State 7710, 3]
type = VarSet
trigger1 = command = "holdback"
sysvar(1) = -1

[State 7710, 4]
type = VelSet
trigger1 = AnimTime = 0
x = ifelse(sysvar(1)=0, const(velocity.jump.neu.x), ifelse(sysvar(1)=1, const(velocity.jump.fwd.x), const(velocity.jump.back.x)))
y = const(velocity.jump.y) - 3

[State 7710, 5]
type = null;VelSet
trigger1 = AnimTime = 0
trigger1 = prevstateno = 100 ;RUN_FWD
trigger1 = sysvar(1) = 1
x = const(velocity.runjump.fwd.x)

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

;---------------------------------------------------------------------------
; Super Jump Up
[Statedef 7711]
type    = A
physics = A

[State 7711]
type = VelSet
trigger1 = Time = 0
y = -14

[State 7711,4]
type = VelAdd
triggerall = command = "holdfwd"
;trigger1 = sysvar(1) = 1
trigger1 = vel X <=4
;trigger2 = sysvar(1) = -1
trigger2 = Vel X <= -.4
x = .5

[State 7711,5]
type = VelAdd
triggerall = command = "holdback"
;trigger1 = sysvar(1) = -1
trigger1 = Vel X >= -4
;trigger2 = sysvar(1) = 1
trigger2 = Vel X >= .4
x = -.5

[State 7711, 1]
type = null;ScreenBound
trigger1 = 1
value = 0
movecamera = 0,1


[State 7711]
type = null;Explod
trigger1 = Time%4 = 0
trigger1 = Time >= 4
trigger1 = Vel Y < 0
anim = 7056
pos = 0,0
random = 50,0
ontop = 1
ownpal = 1

[State 7001, Explod]
type = null;Explod
trigger1 = Time = 0
ID = 474
anim = 9995
postype = p1
pos = 0,0
bindtime = 1
removetime = -2
ownpal = 1
sprpriority = 2
scale = .5,.5

[State 7711, 1]
type = null;VarSet
trigger1 = Time = 0
sysvar(1) = 0

[State 7711, 2]
type = ChangeAnim
trigger1 = Time = 0
value = ifelse((vel x)=0, 51, ifelse((vel x)>0, 52, 53))


[State 7711, 3]
type = ChangeAnim
trigger1 = Vel y > -2
trigger1 = SelfAnimExist(anim + 3)
persistent = 0
value = Anim + 3


;---------------------------------------------------------------------------
;AI Super Jump Start
[Statedef 7720]
type    = S
physics = S
anim = 40
ctrl = 0
sprpriority = 1

[State 7720]
type = PlaySnd
trigger1 = Time = 1
value = 7710,0
channel = 1

[State 7720, 1]
type = VarSet
trigger1 = Time = 0
sysvar(1) = 0

[State 7720, 2]
type = VarSet
trigger1 = command = "holdfwd"
sysvar(1) = 1

[State 7720, 3]
type = VarSet
trigger1 = command = "holdback"
sysvar(1) = -1

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

;---------------------------------------------------------------------------
; Super Jump Up
[Statedef 7721]
type    = A
physics = N

[State 7721, 4]
type = VelSet
trigger1 = Time = 0
y = -14

[State 7721, 4]
type = VelAdd
trigger1 = 1
y = 0.35

[State 7721]
type = veladd
triggerall = vel x <= 4
trigger1 = var(59)
trigger1 = p2bodydist x >= 0
persistent = 4
x = .9

[State 7721]
type = veladd
triggerall = vel x >= -4
trigger1 = var(59) 
trigger1 = p2bodydist x <= 0
persistent = 4
x = -.9

[State 7721, 2]
type = ChangeAnim
trigger1 = Time = 0
value = ifelse((vel x)=0, 51, ifelse((vel x)>0, 52, 53))

[State 7721, 3]
type = ChangeAnim
trigger1 = Vel y > -2
trigger1 = SelfAnimExist(anim + 3)
persistent = 0
value = Anim + 3

[State 7721]
type = turn
trigger1 = p2dist x < -5


;---------------------------------------------------------------------------
; Jump Land
[Statedef 7722]
type    = A
physics = A

[State 7722, 2]
type = ChangeAnim
trigger1 = Time = 0
value = ifelse((vel x)=0, 41, ifelse((vel x)>0, 42, 43))

[State 7722, 3]
type = ChangeAnim
trigger1 = Vel y > -2
trigger1 = SelfAnimExist(anim + 3)
persistent = 0
value = Anim + 3

[State 7722]
type = turn
trigger1 = p2dist x < -5



;---------------------------------------------------------------------------
; Triangle Jump 
[Statedef 7730]
type = A
movetype = I
physics = N
anim = 7730
velset = -2*Vel X,-4
ctrl = 0


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

[State 7730]
type = Turn
trigger1 = FrontEdgeBodyDist <= 3

[State 7730]
type = PlaySnd
trigger1 = time = 0
value = 7730, 0

[State 7730]
type = ChangeState
trigger1 = AnimTime = 0
value = 7731



;---------------------------------------------------------------------------
; Triangle Jump End
[Statedef 7731]
type = A
movetype = I
physics = A
;velset = 0, 0
ctrl = 0



[State 7731, 3]
type = ChangeAnim
trigger1 = Time = 0
value = 70


;---------------------------------------------------------------------------
; Flying to End of Screen
[Statedef 7740]
type    = A
movetype= H
physics = N
velset = 0,0
anim = 5010

[State 7740]
type = null;ScreenBound
trigger1 = 1
value = 0

[State 7740]
type = SelfState
trigger1 = Alive = 0
value = 5000

[State 7740]
type = ChangeAnim
trigger1 = Time < 10
value = 5010

[State 7740]
type = null;AfterImage
trigger1 = Time = 5
length = 5
timegap = 1
framegap = 1
PalBright   = 0,0,0
PalContrast = 100,100,100
PalMul      = 1,1,1
trans = Add1
time = 0

[State 7740]
type = null;AfterImageTime
trigger1 = 1
time = 2

[State 7740]
type = ChangeAnim
trigger1 = Time >= 10
value = 5011

[State 7740]
type = HitVelSet
trigger1 = Time = 10
x = 1

[State 7740]
type = ChangeState
triggerall = Time >= 10
trigger1 = BackEdgeBodyDist <= 20
trigger2 = FrontEdgeBodyDist <= 20
value = 7741

[State 7740]
type = SelfState
trigger1 = Time = 150
value = 5000


;---------------------------------------------------------------------------
; Hit Wall or Stop Moving
[Statedef 7741]
type    = A
movetype= H
physics = N
anim = 5010

[State 7741]
type = EnvShake
trigger1 = time = 0
time = 30
freq = 100
ampl = -10
phase = 10

[State 7741]
type = PosAdd
trigger1 = Time = 0
x = 10 - BackEdgeBodyDist

[State 7741]
type = PosFreeze
trigger1 = Time < 10
x = 1
y = 1

[State 7741]
type = ScreenBound
trigger1 = 1
value = 0

[State 7741]
type = null;Explod
trigger1 = time = 0
anim = F72
pos = -30,-50
postype = p1
facing = 1
sprpriority = 3
bindtime = 2
supermove = 1

[State 7741]
type =null; PlaySnd
trigger1 = Time = 0
value = F7,2

[State 7741]
type = LifeAdd
trigger1 = Time = 0
value = -100

[State 7741]
type = ChangeAnim
triggerall = SelfAnimExist(5030)
trigger1 = Time = 10
value = 5030

[State 7741]
type = VelSet
trigger1 = Time = 10
x = 2
y = -4

[State 7741]
type = VelAdd
trigger1 = Time > 10
y = .4

[State 7741]
type = ChangeAnim
triggerall = SelfAnimExist(5035)
trigger1 = Anim = 5030
trigger1 = AnimTime = 0
value = 5035

[State 7741]
type = ChangeAnim
triggerall = SelfAnimExist(5050)
triggerall = AnimTime = 0
trigger1 = Anim = 5030
trigger2 = Anim = 5035
value = 5050

[State 7741]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y > 20
value = 5100 ;Hit ground


;---------------------------------------------------------------------------
; Wall Hit Helper
[Statedef 7750]
type    = A
movetype= H
physics = N
velset = 0,0
anim = 9800

[State 7750]
type = null;explod
trigger1 = Time = 1
trigger1 = enemynear,screenpos x < 150
anim = 6777
id = 7024
pos = 0,floor(enemynear,screenpos y -abs(enemynear,const(size.mid.pos.y)))
postype = left
bindtime = -1
facing = -1
removetime = -2
scale = 1, 1
sprpriority = 4
ownpal = 1
ignorehitpause = 1
persistent = 0
scale = .5,.5

[State 7750]
type = null;explod
trigger1 = Time = 1
trigger1 = enemynear,screenpos x > 150
anim = 6777
id = 7024
pos = 0,floor(enemynear,screenpos y -abs(enemynear,const(size.mid.pos.y)))
postype = right
bindtime = -1
facing = 1
removetime = -2
scale = 1, 1
sprpriority = 4
ownpal = 1
ignorehitpause = 1
persistent = 0
scale = .5,.5

[State 7750]
type = playsnd
trigger1 = Time = 1
value = 825,0
channel = 1
volume = 255
persistent = 0

[State 7750]
type = EnvShake
trigger1 = Time = 1
time = 8
ampl = -8
phase = 10
freq = 100


[State 7750]
type = DestroySelf
trigger1 = enemynear,movetype != H


;---------------------------------------------------------------------------
; Ground Hit Helper
[Statedef 7755]
type    = A
movetype= H
physics = N
velset = 0,0
anim = 9800

[State 7755]
type = null;explod
trigger1 = Time = 1
anim = 7052
id = 7510
postype = p2
pos = 0, floor(-enemynear,pos y - enemynear,vel y)
bindtime = 1
facing = -1
removetime = -2
scale = 1, 1
sprpriority = -4
ownpal = 1
ignorehitpause = 1
persistent = 0


[State 7755]
type = playsnd
trigger1 = Time = 1
value = 5100,4


[State 7755]
type = EnvShake
trigger1 = Time = 1
time = 8
ampl = -8
phase = 10
freq = 100


[State 7755]
type = DestroySelf
trigger1 = enemynear,movetype != H
trigger2 = enemynear,vel y < -5



;---------------------------------------------------------------------------
; Ko Sound Helper
[Statedef 7760]
type    = A
movetype= H
physics = N
velset = 0,0
anim = 9800


[State 7760]
type = playsnd
trigger1 = Time = 1
value = 5500,0
channel = 1
volume = 255
persistent = 0


[State 7760]
type = DestroySelf
trigger1 = Parent,alive



;---------------------------------------------------------------------------------------
;res
[Statedef 7777]
type    = A
movetype= I
physics = A
juggle = 0;  = 4
velset = ifelse(random < 500,3,-3),-13
anim = 43
ctrl = 0
sprpriority = 0


[state 7777]
type = superpause
trigger1 = Time = 0
anim = -1
time = 30
movetime = 30
darken = 0
unhittable = 1

[State 7777]
type = ChangeAnim
trigger1 = Vel Y > 0
value = 46
persistent = 0

[State 7777]
type = LifeAdd
trigger1 = Time = 0
value = 30*var(30)



[State 7777, 1]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 60

[State 7777,e]
type = ChangeState
triggerall = Time >= 32
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
trigger2 = Time = 90
value = 52
ctrl = 0




;---------------------------------------------------------------------------
;Roll Recovery Forward

[Statedef 7800]
type    = S
movetype= I
physics = N
ctrl = 0
;anim = 7801
sprpriority = 0
velset = -7,0

[State 7800]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 7800
value = 7800


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


[State 7800]
type = VelSet
trigger1 = 1
x = 7



[State 7800]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1


[State  7800]
type = ChangeState
trigger1 = prevstateno = 7800
value = 7801
ctrl = 0



[State  7800]
type = ChangeState
trigger1 = Time > 17;AnimTime = 0
trigger2 = FrontEdgeBodyDist <= 10
value = 11
ctrl = 1

[State 7800]
type = ChangeState
trigger1 = !alive
value = 5050

;---------------------------------------------------------------------------
;Roll Recovery Backward

[Statedef 7801]
type    = S
movetype= I
physics = N
ctrl = 0
;anim = 7801
sprpriority = 0
velset = -7,0




[State 7801]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 7801
value = 7801



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


[State 7800]
type = VelSet
trigger1 = 1
x = -7



[State 7801]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1


[State  7801]
type = ChangeState
trigger1 = Time > 17;AnimTime = 0
trigger2 = BackEdgeBodyDist <= 10
value = 11
ctrl = 1

[State 7801]
type = ChangeState
trigger1 = !alive
value = 5050

;---------------------------------------------------------------------------
;Remove Helper

[Statedef 7805]
type    = S
movetype= I
physics = N
ctrl = 0
anim = 9800
sprpriority = 0
velset = 0,0


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

[State 7805]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1


[State  7805]
type = DestroySelf
trigger1 = 1

;-------------------------------------------------------------------------
;Stand by
[Statedef 7827]
type = S
movetype = I
physics = N
velset = 0,0
ctrl = 0
;anim = 9800

[State 7827, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = invisible

[State 7827]
type = PosSet
trigger1 = Time = 0
y = 0

[State 7827]
type = ChangeState
trigger1 = NumEnemy = [1,2]
;trigger1 = Enemy(0),statetype = L || Enemy(0),movetype != H
value = 102


[State 7827]
type = ChangeState
trigger1 = NumEnemy = 2
;trigger1 = Enemy(1),statetype = L || Enemy(1),movetype != H
value = 102



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

;Special reversal
[Statedef 7970]
type = S
movetype = A
physics = S
anim = 7970
ctrl = 0
sprpriority = 2
velset = 0,0


[State 7970]
type = PosSet
trigger1 = Time = 0
y = 0



[State 7970]
type = VarRandom
trigger1 = time = 0
v = 4
range = 1200



[State 7970]
type = VarSet
trigger1 = time = 0
var(3) = 120



[State 7970]
type = ReversalDef
trigger1 = hitcount < 1
reversal.attr = SCA,AA,AT; NA, SA, HA, NT, ST,HT, NP, SP, HP
pausetime = 10,15
sparkno = -1
;p1stateno = ifelse( var(4) < 400,1273, ifelse(var(4) > 800,ifelse(enemy,isHelper,1240+10*(random%3),900),1210))
hitsound = S7970,0
persistent = 0
id = 7970


[State 7970,a]
type = VarSet
trigger1 = var(4) < 400
trigger1 = P2bodydist X < 70
var(3) = ifelse(random < 500,7973,ifelse(random < 500,220,510))


[State 7970,b]
type = VarSet
trigger1 = var(4) = [400,800]
trigger1 = P2bodydist X < 20
trigger1 = NumTarget(7970)
trigger1 = Target(7970),IsHelper < 1
var(3) = 800

[State 7970,c]
type = VarSet
trigger1 = var(4) > 800
trigger1 = power > 1000
trigger1 = P2bodydist X < 200
var(3) = 3000


[State 7970]
type = ChangeState
trigger1 = NumTarget(7970)
value = var(3)
ctrl = 0


[State 7970]
type = PalFX
trigger1 = Time <= 50
trigger1 = Time%2 = 0
time = 1
add = 0,0,128
color = 0
ignorehitpause = 1

[State 7970]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1


;---------------------------------------------------------------------------
; Special reversal punch

[Statedef 7972]
type    = S                     
movetype= A                      
physics = S                      
juggle = 0;  = 1                    
velset = 5,0                    
ctrl = 0                         
anim = 200                      
poweradd = 20                    
sprpriority = 2                  


[State 7972]
type = NotHitBy
trigger1 = 1
value = SCA


[State 7972, 1]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = S, SA                     
damage = 7*var(30), floor(var(30)/2)                   
animtype = Heavy                
guardflag = MA                   
hitflag = MAF                    
priority = 5, Hit               
pausetime = 10,10                
sparkno = 3;s7703
sparkxy = -10,-70               
hitsound = S1,30                
guardsound = S4,0               
;guard.sparkno = S8430
ground.type = High               
ground.slidetime = 10            
ground.hittime  = 10             
ground.velocity = -9,-7           
;airguard.velocity = -4,-3     
air.type = High                  
air.velocity = -9,-7           
air.hittime = 12               
getpower = 85,10
givepower = 40
;p2stateno = 9020
;persistent = 0



[State 7972]
type = PlaySnd
trigger1 = AnimElem = 1
value = 0,0


[State 7972]
type = PalFX
trigger1 = Time <= 30
trigger1 = Time%2 = 0
time = 1
add = 0,0,128
color = 0
ignorehitpause = 1


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

;--------------------------------------------------------------------------------------
[Statedef 7973]
type = S
movetype = I
physics = S
ctrl = 0
sprpriority = 2

[State 7973]
type = AllPalFx
trigger1 = Time = 0
time = 3
add = 256,256,256


[State 7973]
type = ChangeState
trigger1 = Time = 5
value = 7972
ctrl = 0



;---------------------------------------------------------------------------
; Down Kick
[Statedef 8016]
type    = A
movetype= A
physics = N
juggle = 0;  = 4
poweradd= 40
ctrl = 0
velset = 0,0
anim = 8016
sprpriority = 2
facep2 = 1

[State 8016]
type = Turn
trigger1 = Time = 0
trigger1 = FrontEdgeBodyDist <= 5

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



[State 8016]
type = VelSet
trigger1 = AnimElem = 1
x = 3
y = 11


[State 8016]
type = VelAdd
trigger1 = AnimElem = 1, >= 0
y = 0.3


[State 8016]
type = null;PlaySnd
trigger1 = AnimElem = 1
value = 100,4

[State 8016]
type = PlaySnd
trigger1 = Time = 5
value = 187,0

[State 8016, 2]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, SA
animtype  = Medium
damage    = 4*var(30),floor(var(30)/2)
guardflag = HA
pausetime = 13,13
sparkno = 0;s7700
;guard.sparkno = S8430
sparkxy = -10,-64+floor(P2Dist Y)
hitsound   = S1,12
guardsound = S4,0
ground.type = High
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -7,-4
air.velocity = -7,-4
getpower = 13,7
;fall.animtype = Up
;fall = 1
;air.fall = 1
;fall.recover =0
;p2stateno = 211
;air.animtype = back
;air.type = Low
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0
;p2stateno = 9020


[State 8016]
type = VarAdd
trigger1 = MoveContact
var(19) = 1
ignorehitpause = 1
persistent = 0

[State 8016, 3]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0




;---------------------------------------------------------------------------
; Down Kick Medium
[Statedef 8017]
type    = A
movetype= A
physics = N
juggle = 0;  = 4
poweradd= 40
ctrl = 0
velset = 0,0
anim = 8017
sprpriority = 2
facep2 = 1

[State 8017]
type = Turn
trigger1 = Time = 0
trigger1 = FrontEdgeBodyDist <= 5

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



[State 8017]
type = VelSet
trigger1 = AnimElem = 1
x = 5
y = 11


[State 8017]
type = VelAdd
trigger1 = AnimElem = 1, >= 0
y = 0.3

[State 8017]
type = PlaySnd
triggerall = var(29)=0
trigger1 = Time = 7
value = 220,0

[State 8017]
type = PlaySnd
triggerall = var(29)=1
trigger1 = time = 7
value = 150,25

[State 8017]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, SA
animtype  = Medium
damage    = 7*var(30),floor(var(30)/2)
guardflag = HA
pausetime = 13,13
sparkno = 2;s7702
;guard.sparkno = S8430
sparkxy = -10,-64+floor(P2Dist Y)
hitsound   = S1,5
guardsound = S4,0
ground.type = High
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = -7,-4
air.velocity = -7,-4
getpower = 30,15
;fall.animtype = Up
;fall = 1
;air.fall = 1
;fall.recover =0
;p2stateno = 211
;air.animtype = back
;air.type = Low
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0
;p2stateno = 9020


[State 8017]
type = VarAdd
trigger1 = MoveContact
var(20) = 1
ignorehitpause = 1
persistent = 0

[State 8017]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0


;---------------------------------------------------------------------------
; Down Kick Hard
[Statedef 8018]
type    = A
movetype= A
physics = N
juggle = 0;  = 4
poweradd= 40
ctrl = 0
velset = 0,0
anim = 8018
sprpriority = 2
facep2 = 1

[State 8018]
type = Turn
trigger1 = Time = 0
trigger1 = FrontEdgeBodyDist <= 5

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



[State 8018]
type = VelSet
trigger1 = Time = 0
x = 9
y = 11


[State 8018]
type = VelAdd
trigger1 = 1
y = 0.4

[State 8018]
type = PlaySnd
triggerall = var(29)=0
trigger1 = Time = 5
value = 220,0

[State 8018]
type = PlaySnd
triggerall = var(29)=1
trigger1 = time = 5
value = 150,25


[State 8018]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, SA
animtype  = Medium
damage    = 7*var(30),floor(var(30)/2)
guardflag = HA
pausetime = 13,13
sparkno = 3;s7703
;guard.sparkno = S8430
sparkxy = -10,-64+floor(P2Dist Y)
hitsound   = S1,5
guardsound = S4,0
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -7,-4
air.velocity = -7,-4
getpower = 40,14
;fall.animtype = Up
;fall = 1
;air.fall = 1
;fall.recover =0
;p2stateno = 211
;air.animtype = back
;air.type = Low
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0
;p2stateno = 9020


[State 8018]
type = VarAdd
trigger1 = MoveContact
var(21) = 1
ignorehitpause = 1
persistent = 0


[State 8018]
type = VarAdd
trigger1 = !MoveContact && Time >= 22
var(9) = 1
ignorehitpause = 1
persistent = 0


[State 8018]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0



;------------------------------------------------------------------------------------------------------------
;Super Armor (Not used, see state 9000 instead)
[Statedef 8600]
type = U
movetype = I
physics = N
;anim =9800
ctrl = 0
sprpriority = 4
velset = 0,0

[State 8600]
type = PlayerPush
trigger1 = 1
value = 1
ignorehitpause = 1

[State 8600]
type = ChangeAnim
trigger1 = Parent,Anim != Anim
value = Parent,Anim
elem = Parent,AnimElemNo(0)
ignorehitpause = 1

[State 8600]
type = ChangeAnim
trigger1 = Parent,AnimElemNo(0) != AnimElemNo(0)
value = Parent,Anim
elem = Parent,AnimElemNo(0)
ignorehitpause = 1

[State 8600]
type = AssertSpecial
trigger1 = 1
flag = invisible

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

[State 8600]
type = HitOverride
trigger1 = 1
stateno = 8601
attr = SCA,AA,AP,AT
slot = 0
time = -1

[State 8600]
type = null;ParentVarSet
trigger1 = Time = 0
var(55) = 1

[State 8600]
type = BindToParent
trigger1 = 1
ignorehitpause = 1

[State 8600]
type = DestroySelf
trigger1 = Parent,StateType = A || Pos Y < 0

;------------------------------------------------------------------------------------------------------------
;Super Armor End
[Statedef 8601]
type = U
movetype = H
physics = N
;anim = 9800
ctrl = 0
sprpriority = 4
velset = 0,0

[State 8601]
type = PlayerPush
trigger1 = 1
value = 1
ignorehitpause = 1

[State 8601]
type = ChangeAnim
trigger1 = Parent,Anim != Anim
trigger1 = SelfAnimExist(Parent,Anim)
value = Parent,Anim
elem = Parent,AnimElemNo(0)
ignorehitpause = 1

[State 8601]
type = ChangeAnim
trigger1 = Parent,AnimElemNo(0) != AnimElemNo(0)
trigger1 = SelfAnimExist(Parent,Anim)
value = Parent,Anim
elem = Parent,AnimElemNo(0)
ignorehitpause = 1

[State 8601]
type = AssertSpecial
trigger1 = 1
flag = invisible

[State 8601]
type = ParentVarAdd
trigger1 = Time = 0
var(55) = 1

[State 8601]
type = PlaySnd
trigger1 = Time = 0
value = 4,9

[State 8601]
type = ParentVarSet
trigger1 = !var(52)
trigger1 = Parent,Stateno != [120,159]
var(52) = GetHitVar(Damage)

[State 8601]
type = ChangeState 
trigger1 = Time = 0 && parent,var(55) < 2
value = 8600

[State 8601]
type = NotHitBy
trigger1 = parent,var(55) < 2
value = SCA

[State 8601]
type = ParentVarSet
trigger1 = Time = 12
var(55) = 0

[State 8601]
type = DestroySelf
trigger1 = Time = 48

[State 8601]
type = BindToParent
trigger1 = 1
ignorehitpause = 1

;---------------------------------------------------
; Super Armor State
[Statedef 9000]
type = U
movetype = H

[State 4500, PalfX]
type = PalFX
trigger1 = time = 1
add = 164,11,0
mul = 358,256,256
time = 3
ignorehitpause = 1

[State 4500, PalfX]
type = PalFX
trigger1 = time = 5
add = 164,11,0
mul = 358,256,256
time = 3
ignorehitpause = 1

[State 9000, Varadd]
type = Varadd
trigger1 = 1
v = 42
value = 1

[State 9000, b]
type = null;VarSet - moved to 220
trigger1 = time <= 0
v = 24
value = AnimElemNo(0)
ignorehitpause = 1

[State 9000, PosFreeze]
type = PosFreeze
trigger1 = 1
value = 1

[State 9000, ChangeState];Dead
type = ChangeState
trigger1 = Life <= 0
value = ifelse(StateType = A, 5020,5000)

[State 9000, ChangeAnim]
type = ChangeAnim
trigger1 = 1
value = Anim
elem = var(24)

[State 9000, End]
type = ChangeState
triggerall= Life > 0
trigger1 = time >= floor(gethitvar(hittime) * 0.8)
value = var(22)
ctrl = var(23)

[State 9000, End]
type = ChangeState
triggerall= Life > 0
trigger1 = time > 40
value = 0
ctrl = 1

;------------------------------------------------------------------------------------------------------------
;Arm For Stand State
[Statedef 10000]
type = S
movetype = I
physics =N
anim = 10000
ctrl = 0
sprpriority = -1
velset = 0,0


[State 10000]
type = null;SprPriority
trigger1 = Parent,Facing = 1
value = -1
ignorehitpause = 1

[State 10000]
type = SprPriority
trigger1 = 1
value = -1-(Parent,MoveType = H)
ignorehitpause = 1

[State 10000]
type = SprPriority
trigger1 = Parent,Stateno = 220 || Parent,Stateno = 222 || Parent,Stateno = 701
trigger2 = Parent,Stateno = 320 && Parent,AnimElemNo(0) = [11,13]
trigger3 = Parent,Stateno = 620 && Parent,AnimElemNo(0) = [1,5]
trigger4 = Parent,Stateno = 720 && Parent,AnimElemNo(0) = [1,3]
value = 2
ignorehitpause = 1


[State 10000]
type = SprPriority
trigger1 = Parent,Stateno = 520 && Parent,AnimElemNo(0) = [5,10]
trigger2 = Parent,anim = 1571 && Parent,AnimElemNo(0) = [5,10]
trigger3 = Parent,anim = 810 && Parent,AnimElemNo(0) = [6,11]
value = 2
ignorehitpause = 1

[State 10000]
type = SprPriority
trigger1 = Parent,Stateno = 221 && Parent,AnimElemNo(0) = [13,17]
trigger2 = Parent,Stateno = 311 && Parent,AnimElemNo(0) = [2,5]
trigger3 = Parent,Stateno = 312 && Parent,AnimElemNo(0) = [3,14]
trigger4 = Parent,anim = 1570 && Parent,AnimElemNo(0) = [3,14]
value = 2
ignorehitpause = 1


[State 10000]
type = SprPriority
trigger1 = Parent,Stateno = 21270 && Parent,AnimElemNo(0) = [1,5]
trigger2 = Parent,Stateno = 21270 && Parent,AnimElemNo(0) = [15,19]
trigger3 = Parent,Stateno = 21300 && Parent,AnimElemNo(0) = [1,5]
trigger4 = Parent,Stateno = 21300 && Parent,AnimElemNo(0) = [15,19]
value = 2
ignorehitpause = 1

[State 10000]
type = BindToParent
trigger1 = 1
facing = 1
time = -1
ignorehitpause = 1


[State 10000]
type = NotHitBy
trigger1 = 1
value = SCA

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

[State 10000]
type = PlayerPush
trigger1 = 1
value = 1
ignorehitpause = 1

[State 10000]
type = PlayerPush
trigger1 = (Parent,Stateno = [7800,7801])
trigger2 = (Parent,Stateno = 100)
value = 0
ignorehitpause = 1



[State 10000]
type = PlayerPush
trigger1 = Parent,Stateno = 21275 && Parent,StateTime < 20
trigger2 = Parent,Stateno = 21305 && Parent,StateTime < 20
value = 0
ignorehitpause = 1

[State 10000]
type = AssertSpecial
trigger1 = parent,movetype = h
trigger1 = (parent,anim != [4900,5300])
flag = invisible


[State 10000]
type = ChangeAnim
triggerall = Anim != 9800
trigger1 = !SelfAnimExist(Parent,Anim+10000)
value = 9800
trigger2 = Parent,Facing = -1

[State 10000]
type = ChangeAnim
trigger1 = Parent,Anim+10000 != Anim
trigger1 = SelfAnimExist(Parent,Anim+10000)
value = Parent,Anim+10000
elem = Parent,AnimElemNo(0)
ignorehitpause = 1

[State 10000]
type = ChangeAnim
trigger1 = Parent,AnimElemNo(0) != AnimElemNo(0)
trigger1 = SelfAnimExist(Parent,Anim+10000)
value = Parent,Anim+10000
elem = Parent,AnimElemNo(0)
ignorehitpause = 1


[State 10000]
type = null;ChangeAnim
triggerall = Anim != 9800
trigger1 = Parent,var(37)
value = 9800

[State 10000]
type = null;ChangeState
trigger1 = parent,var(57) = 4
value = 10001


;------------------------------------------------------------------------------------------------------------
;Arm Detached
[Statedef 10001]
type = S
movetype = I
physics =N
anim = 10001
ctrl = 0
sprpriority = 3
velset = -2,-7


[State 10001]
type = Varset
trigger1 = time = 0
var(2) = 0

[State 10001]
type = PlaySnd
trigger1 = Time = 0
value = 10000,0

[State 10001]
type = VelAdd
trigger1 = Pos Y < 0
y = 0.4


[State 10001]
type = Velset
trigger1 = FrontEdgeBodyDist <= -5
trigger2 = BackEdgeBodyDist <= -5
x = ifelse(vel x > 0,-Vel X,abs(Vel X))

[State 10001]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 10002


[State 10001]
type = null;Varset
trigger1 = time > 10
trigger1 = RootDist X = [-25,25]
trigger1 = RootDist Y = [-25,60]
var(2) = 4

[State 10001]
type = null;PlaySnd
trigger1 = var(2) = 4
value = 10000,1


[State 10001]
type =  null;ChangeState
trigger1 = var(2) = 4
value = 10000


;------------------------------------------------------------------------------------------------------------
;Arm Detached Land
[Statedef 10002]
type = S
movetype = I
physics =N
;anim = 10001
ctrl = 0
sprpriority = 3
velset = 0,0

[State 10002]
type = PlaySnd
trigger1 = Time = 0
value = 10000,0

[State 10002]
type = Velset
trigger1 = FrontEdgeBodyDist <= -5
trigger2 = BackEdgeBodyDist <= -5
x = ifelse(vel x > 0,-Vel X,abs(Vel X))



[State 10002]
type = VelSet
trigger1 = parent,var(57) != 4
trigger1 = parent,movetype != H
x = (RootDist X)*0.1


[State 10002]
type = Varset
trigger1 = time > 10
trigger1 = parent,var(57) != 4
trigger1 = RootDist X = [-25,25]
trigger1 = RootDist Y = [-25,60]
var(2) = 4


[State 10002]
type = ParentVarset
trigger1 = var(2) = 4
var(57) = 1

[State 10002]
type = PlaySnd
trigger1 = var(2) = 4
value = 10000,1


[State 10002]
type =  ChangeState
trigger1 = var(2) = 4
value = 10000


;------------------------------------------------------------------------------------------------------------
;Gamma Wave Helper
[Statedef 21240]
type = A
movetype = A
physics = N
;anim = 21240
ctrl = 0
sprpriority = 3
velset = 0,0
hitcountpersist = 1

[State 21240]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 21240
value = 21240


[State 21240]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 21240]
type = VelSet
trigger1 = Time = 0
y = -7


[State 21240]
type = VelAdd
trigger1 = Pos Y < 0
y = 0.4


[State 21240]
type = VelSet
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
y = 0

[State 21240]
type = HitBy
trigger1 = 1
value = SCA,AP

[State 21240]
type = HitOverride
trigger1 = 1
stateno = 21249
attr = SCA,AP
slot = 0
time = -1


[State 21240]
type = HitDef
attr = A, SP
;triggerall = parent,fvar(29)=0
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 3*(Root,var(30)),floor(Root,var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = MA
hitflag = MAFD
pausetime = 13,2
sparkxy = -10,-10
hitsound   = S1,1
guardsound = S4,0
sparkno = 2;s7702
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -7,-6
air.velocity = -7,-6
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = 50,25
sprpriority = 3
air.fall = 1
fall = 1
;fall.yvelocity = -4


[State 21240]
type = ChangeState;DestroySelf
trigger1 = MoveContact
value = 21249
ignorehitpause = 1

[State 21240]
type = ChangeState;DestroySelf
trigger1 = MoveReversed
ignorehitpause = 1
value = 21249

[State 21240]
type = DestroySelf
trigger1 = AnimTime = 0

;------------------------------------------------------------------------------------------------------------
;Gamma Wave Helper (last hit)
[Statedef 21241]
type = A
movetype = A
physics = N
;anim = 21240
ctrl = 0
sprpriority = 3
velset = 0,0
hitcountpersist = 1

[State 21241]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 21240
value = 21240


[State 21241]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 21241]
type = VelSet
trigger1 = Time = 0
y = -7


[State 21241]
type = VelAdd
trigger1 = Pos Y < 0
y = 0.4


[State 21241]
type = VelSet
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
y = 0

[State 21241]
type = HitBy
trigger1 = 1
value = SCA,AP

[State 21241]
type = HitOverride
trigger1 = 1
stateno = 21249
attr = SCA,AP
slot = 0
time = -1


[State 21241]
type = HitDef
attr = A, SP
triggerall = parent,fvar(29)=0
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 3*(Root,var(30)),floor(Root,var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = MA
hitflag = MAFD
pausetime = 13,2
sparkxy = -10,-10
hitsound   = S1,1
guardsound = S4,0
sparkno = 2;s7702
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -7,-6
air.velocity = -7,-6
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = 50,25
sprpriority = 3
air.fall = 1
fall = 1
;fall.yvelocity = -9


[State 21241]
type = ChangeState;DestroySelf
trigger1 = MoveContact
value = 21249
ignorehitpause = 1

[State 21241]
type = ChangeState;DestroySelf
trigger1 = MoveReversed
ignorehitpause = 1
value = 21249

[State 21241]
type = DestroySelf
trigger1 = AnimTime = 0


;------------------------------------------------------------------------------------------------------------
;FireBall Helper
[Statedef 21242]
type = A
movetype = A
physics = N
anim = 21240
ctrl = 0
sprpriority = 3
velset = 0,0
;hitcountpersist = 1

[State 21242]
type = null;ChangeAnim
trigger1 = Time = 0 && Anim != 21240
value = 21240


[State 21242]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 21242]
type = VelSet
trigger1 = Time = 0
x = 11
y = 4



[State 21242]
type = VelAdd
trigger1 = Vel Y
y = 0.4

[State 21242]
type = HitBy
trigger1 = 1
value = SCA,AP

[State 21242]
type = HitOverride
trigger1 = 1
stateno = 21249
attr = SCA,AP
slot = 0
time = -1


[State 21242]
type = HitDef
attr = A, SP
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 10*(Root,var(30)),floor(Root,var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 13,13
sparkxy = -10,-10
hitsound   = S1,1
guardsound = S4,0
sparkno = 2;s7702
;guard.sparkno = S8430
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -7
air.velocity = -5
;guard.velocity = -9
;airguard.velocity = -9
;fall.xvelocity = -3
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
;fall = 1
;air.fall = 1
;fall.recover = 0
;fall.animtype = Up
;p2stateno = 9020
getpower = 10,5
;palfx.time = 1
;palfx.add = 256,256,256
sprpriority = 3


[State 21242]
type = null;ChangeState
trigger1 = var(0) < 1 || hitcount > 2
value = 21249
ignorehitpause  = 1

[State 21242]
type = ChangeState;DestroySelf
trigger1 = MoveContact
value = 21249
ignorehitpause = 1

[State 21242]
type = ChangeState;DestroySelf
trigger1 = MoveReversed
ignorehitpause = 1
value = 21249


[State 21242]
type = DestroySelf
trigger1 = FrontEdgeDist < -100
trigger2 = Time > 240


;------------------------------------------------------------------------------------------------------------
;FireBall End
[Statedef 21249] 
type = A
movetype = I
physics = N
;anim = 21249
ctrl = 0
sprpriority = 3
;velset = 0,0
movehitpersist = 1



[State 21249]
type = AssertSpecial
trigger1 = 1
flag = noshadow



[State 21249]
type = VelAdd
trigger1 = Pos Y < 0
y = 0.4


[State 21249]
type = VelSet
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
y = 0

[State 21249]
type = DestroySelf
trigger1 = AnimTime = 0



;------------------------------------------------------------------------------------------------------------
;Kunai Helper
[Statedef 21265]
type = A
movetype = A
physics = N
anim = 21241
ctrl = 0
sprpriority = 3
velset = 0,0
;hitcountpersist = 1

[State 21265]
type = null;ChangeAnim
trigger1 = Time = 0 && Anim != 21241
value = 21241


[State 21265]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 21265]
type = VelSet
trigger1 = Time = 0
x = 3
y = 5


[State 21265]
type = VelAdd
trigger1 = Vel Y
y = 0.4

[State 21265]
type = HitBy
trigger1 = 1
value = SCA,AP

[State 21265]
type = HitOverride
trigger1 = 1
stateno = 21249
attr = SCA,AP
slot = 0
time = -1


[State 21265]
type = HitDef
attr = A, SP
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 7*(Root,var(30)),floor(Root,var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 13,13
sparkxy = -10,-10
hitsound   = S1240,2
guardsound = S4,0
sparkno = 2;s7702
;guard.sparkno = S8430
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -7
air.velocity = -5
;guard.velocity = -9
;airguard.velocity = -9
;fall.xvelocity = -3
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
;fall = 1
;air.fall = 1
;fall.recover = 0
;fall.animtype = Up
;p2stateno = 9020
getpower = 10,5
;palfx.time = 1
;palfx.add = 256,256,256
sprpriority = 3


[State 21265]
type = null;ChangeState
trigger1 = var(0) < 1 || hitcount > 2
value = 21249
ignorehitpause  = 1


[State 21265]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 21249

[State 21265]
type = DestroySelf
trigger1 = MoveContact

[State 21265]
type = DestroySelf
trigger1 = MoveReversed
ignorehitpause = 1


;------------------------------------------------------------------------------------------------------------
;Kunai Helper
[Statedef 21266]
type = A
movetype = A
physics = N
anim = 21242
ctrl = 0
sprpriority = 3
velset = 0,0
;hitcountpersist = 1

[State 21266]
type = null;ChangeAnim
trigger1 = Time = 0 && Anim != 21241
value = 21241


[State 21266]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 21266]
type = VelSet
trigger1 = Time = 0
x = 6
y = 5


[State 21266]
type = VelAdd
trigger1 = Vel Y
y = 0.4

[State 21266]
type = HitBy
trigger1 = 1
value = SCA,AP

[State 21266]
type = HitOverride
trigger1 = 1
stateno = 21249
attr = SCA,AP
slot = 0
time = -1


[State 21266]
type = HitDef
attr = A, SP
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 7*(Root,var(30)),floor(Root,var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 13,13
sparkxy = -10,-10
hitsound   = S1240,2
guardsound = S4,0
sparkno = 2;s7702
;guard.sparkno = S8430
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -7
air.velocity = -5
;guard.velocity = -9
;airguard.velocity = -9
;fall.xvelocity = -3
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
;fall = 1
;air.fall = 1
;fall.recover = 0
;fall.animtype = Up
;p2stateno = 9020
getpower = 10,5
;palfx.time = 1
;palfx.add = 256,256,256
sprpriority = 3


[State 21266]
type = null;ChangeState
trigger1 = var(0) < 1 || hitcount > 2
value = 21249
ignorehitpause  = 1


[State 21266]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 21249

[State 21266]
type = DestroySelf
trigger1 = MoveContact

[State 21266]
type = DestroySelf
trigger1 = MoveReversed
ignorehitpause = 1


;------------------------------------------------------------------------------------------------------------
;Kunai Helper
[Statedef 21267]
type = A
movetype = A
physics = N
anim = 21243
ctrl = 0
sprpriority = 3
velset = 0,0
;hitcountpersist = 1

[State 21267]
type = null;ChangeAnim
trigger1 = Time = 0 && Anim != 21241
value = 21241


[State 21267]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 21267]
type = VelSet
trigger1 = Time = 0
x = 11
y = 4


[State 21267]
type = VelAdd
trigger1 = Vel Y
y = 0.4

[State 21267]
type = HitBy
trigger1 = 1
value = SCA,AP

[State 21267]
type = HitOverride
trigger1 = 1
stateno = 21249
attr = SCA,AP
slot = 0
time = -1


[State 21267]
type = HitDef
attr = A, SP
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 7*(Root,var(30)),floor(Root,var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 13,13
sparkxy = -10,-10
hitsound   = S1240,2
guardsound = S4,0
sparkno = 2;s7702
;guard.sparkno = S8430
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -7
air.velocity = -5
;guard.velocity = -9
;airguard.velocity = -9
;fall.xvelocity = -3
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
;fall = 1
;air.fall = 1
;fall.recover = 0
;fall.animtype = Up
;p2stateno = 9020
getpower = 10,5
;palfx.time = 1
;palfx.add = 256,256,256
sprpriority = 3


[State 21267]
type = null;ChangeState
trigger1 = var(0) < 1 || hitcount > 2
value = 21249
ignorehitpause  = 1


[State 21267]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 21249

[State 21267]
type = DestroySelf
trigger1 = MoveContact

[State 21267]
type = DestroySelf
trigger1 = MoveReversed
ignorehitpause = 1


;---------------------------------------------------------------------------
; Throw

[Statedef 21270]
type    = S
movetype= A
physics = N
anim = 1271
poweradd = 60
juggle = 0;  = 0
velset = 0,0
ctrl = 0
sprpriority = 0

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


[State 21270]
type = null;Explod
trigger1 = Time = 0
anim = 7515
ontop = 1
ownpal = 1
pos = 77,-62

[State 21270]
type = null;PlayerPush
trigger1 = 1
value = 0

[State 21270]
type = null;NotHitBy
trigger1 = 1
value = SCA


[State 21270]
type = ScreenBound
trigger1 = 1
value = 0
movecamara = 0,0


[State 21270]
type = PlaySnd
triggerall = var(29)=0
trigger1 = AnimElem = 11
value = 220,0

[State 21270]
type = PlaySnd
triggerall = var(29)=1
trigger1 = Animelem = 11
value = 150,25

[State 21270]
type = TargetBind
trigger1 = AnimElemNo(0) = 1
pos = 159,-88


[State 21270]
type = TargetBind
trigger1 = AnimElemNo(0) = 2
pos = 133,-135


[State 21270]
type = TargetBind
trigger1 = AnimElemNo(0) = 3
pos = 75,-185


[State 21270]
type = TargetBind
trigger1 = AnimElemNo(0) = 4
pos = 0,-188


[State 21270]
type = TargetBind
trigger1 = AnimElemNo(0) = 5
pos = -67,-160


[State 21270]
type = TargetBind
trigger1 = AnimElemNo(0) = 6
pos = -65,-122

[State 21270]
type = TargetBind
trigger1 = AnimElemNo(0) = 7
pos = -10,-116

[State 21270]
type = TargetBind
trigger1 = AnimElemNo(0) = 8
pos = 68,-105


[State 21270]
type = TargetBind
trigger1 = AnimElemNo(0) = 9
pos = 117,-120


[State 21270]
type = TargetBind
trigger1 = AnimElemNo(0) = 10
pos = 140,-142


[State 21270]
type = Turn
trigger1 = AnimElem = 11


[State 21270]
type = TargetBind
trigger1 = AnimElemNo(0) = 11
pos = -94,-98


[State 21270]
type = TargetBind
trigger1 = AnimElemNo(0) = 12
pos = 105,-162


[State 21270]
type = TargetLifeAdd
trigger1 = AnimElem = 12
value = -15*var(30)

[State 21270]
type = PowerAdd
trigger1 = AnimElem = 12
value = 50


[State 21270]
type = TargetState
trigger1 = AnimElem = 12, = 1
value = 21285


[State 21270]
type = ChangeState
trigger1 = AnimElem = 12, = 1
value = 21275
ctrl = 0




[State 21270]
type = ChangeState
trigger1 = !NumTarget(800)
value = 0
ctrl = 1


;---------------------------------------------------------------------------
; Throw End

[Statedef 21275]
type    = S
movetype= I
physics = N
;anim = 1273
;poweradd = 60
juggle = 0;  = 0
velset = 0,0
ctrl = 0
sprpriority = 0

[State 21275]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1


;---------------------------------------------------------------------------
;Thrown

[Statedef 21280]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = 1

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

[State 21280]
type = ChangeAnim2
trigger1 = Time = 0
value = 1275


[State 21280]
type = Turn
trigger1 = AnimElem = 11


[State 21280]
type = SprPriority
trigger1 = AnimElem = 3
value = -1


[State 21280]
type = SprPriority
trigger1 = AnimElem = 12
value = 1

[State 21280]
type = SelfState
trigger1 = !gethitvar(isbound)
value = 5050

[State 21280]
type = DestroySelf
trigger1 = ishelper


;---------------------------------------------------------------------------
;Thrown 
[Statedef 21285]
type    = A
movetype= H
physics = N
;velset = -9,-3
poweradd = 60



[State 21285]
type = ChangeAnim2
trigger1 = Time = 0
value = 823



[State 21285]
type = null;Turn
trigger1 = Time = 0

[State 21285]
type = VelSet
trigger1 = Time = 0
x = -29
y = -13



[State 21285] ;Gravity
type = VelAdd
trigger1 = 1
y = .4


[State 21285]
type = null;AfterImage
trigger1 = Time = 0
length = 5
timegap = 1
framegap = 1
PalBright   = 0,0,0
PalContrast = 100,100,100
PalMul      = 1,1,1
trans = Add1
time = 30

[State 21285]
type = null;AfterImageTime
trigger1 = 1
time = 2


[State 21285]
type = null;ScreenBound
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist < 65
trigger2 = FrontEdgeBodyDist < 65
value = 1
movecamera = 1,0


[State 21285]
type = ChangeState
trigger1 = BackEdgeBodyDist <= 10
trigger2 = FrontEdgeBodyDist <= 10
value = 5047


[State 21285]
type = null;SelfState
trigger1 = Vel Y > 2 
value = 5040

[State 21285] ;Hit ground
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;Hit ground



;------------------------------------------------------------------------------------------------------------
;Gamma Wave Helper
[Statedef 21300]
type = A
movetype = A
physics = N
;anim = 21300
ctrl = 0
sprpriority = 3
velset = 0,0
;hitcountpersist = 1

[State 0, VarAdd]
type = parentVarAdd
trigger1 = animelem = 1
v = 40
value = 1

[State 21300]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 21300
value = 21300


[State 21300]
type = AssertSpecial
trigger1 = 1
flag = noshadow



[State 21300]
type = PlaySnd
trigger1 = AnimElem = 1
value = 1240,0

[State 21300]
type = VelSet
trigger1 = Time = 0
y = -9


[State 21300]
type = VelAdd
trigger1 = Pos Y < 0
y = 0.4


[State 21300]
type = VelSet
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
y = 0

[State 21300]
type = HitBy
trigger1 = 1
value = SCA,AP

[State 21300]
type = HitOverride
trigger1 = 1
stateno = 21300
attr = SCA,AP
slot = 0
time = -1


[State 21300]
type = HitDef
attr = A, HP
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 2.65*floor((2.5-1.5*(Root,var(37) = [9,18])-2.5*(Root,var(37) > 19))*(Root,var(30))),floor(root,var(30)/8)
animtype = Medium
priority  = 5, Hit
hitflag = MAFD
guardflag = MA
pausetime = 3,3
sparkxy = -10,-10
hitsound   = S1,1
guardsound = S4,0
sparkno = 2;s7702
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -1,-4
air.velocity = -9,-2
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
fall = 1
air.fall = 1
fall.recover = 0
p2stateno = 5045
;p2getp1state = 0
getpower = 50,25
sprpriority = 3

[State 21300]
type = DestroySelf
trigger1 = AnimTime = 0

[State 21300]
type = Helper
triggerall = root,stateno=[3000,3001]
trigger1 = Time = 8 && FrontEdgeDist > -10
stateno = 21300
id = 21300
ownpal = 1
pos = 80,floor(-Pos Y)-12

;------------------------------------------------------------------------------------------------------------
;Gamma Charge Wave Helper
[Statedef 21450]
type = S
movetype = I
physics = N
anim = 21450
ctrl = 0
sprpriority = 3
velset = 0,0


[State 21450]
type = varset
trigger1 = Time = 0
var(2) = parent,stateno

[State 21450]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 21450]
type = Turn
trigger1 = Parent,Facing != Facing


[State 21450]
type = DestroySelf
trigger1 = parent,stateno != var(2)


[State 21450]
type = BindToParent
trigger1 = 1


;------------------------------------------------------------------------------------------------------------
;Gamma Charge Wave Helper
[Statedef 21451]
type = S
movetype = I
physics = N
anim = 21451
ctrl = 0
sprpriority = 3
velset = 0,0


[State 21451]
type = varset
trigger1 = Time = 0
var(2) = parent,stateno

[State 21451]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 21451]
type = Turn
trigger1 = Parent,Facing != Facing


[State 21451]
type = DestroySelf
trigger1 = parent,stateno != var(2)


[State 21451]
type = BindToParent
trigger1 = 1



;------------------------------------------------------------------------------------------------------------
;Gamma Charge Wave Helper
[Statedef 21452]
type = S
movetype = I
physics = N
anim = 21452
ctrl = 0
sprpriority = 3
velset = 0,0


[State 21452]
type = varset
trigger1 = Time = 0
var(2) = parent,stateno

[State 21452]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 21452]
type = Turn
trigger1 = Parent,Facing != Facing


[State 21452]
type = DestroySelf
trigger1 = parent,stateno != var(2)


[State 21452]
type = BindToParent
trigger1 = 1

;------------------------------------------------------------------------------------------------------------
;Meteor Helper
[Statedef 23040]
type = S
movetype = A
physics = N
;anim = 23040
ctrl = 0
sprpriority = -1
velset = 0,0
;hitcountpersist = 1

[State 23040]
type = ChangeAnim
trigger1 =  Anim != 23040
value = 23040

[State 23040]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 23040]
type = ChangeState
trigger1 = Parent,Stateno != 3042
value = 23041

[State 23040]
type = BindToParent
trigger1 = 1


;------------------------------------------------------------------------------------------------------------
;Meteor Helper
[Statedef 23041]
type = S
movetype = I
physics = N
anim = 23046
ctrl = 0
sprpriority = 2
velset = 0,0
;hitcountpersist = 1


[State 23041]
type = AssertSpecial
trigger1 = 1
flag = noshadow
;flag2 = invisible



[State 23041]
type = Explod
trigger1 = Time < 3
anim = 23060+random%8
ownpal = 1
vel = -3-random%3,-5-random%3
removetime = 27
accel = 0,0.3
pos = 60,0

[State 23041]
type = Explod
trigger1 = Time < 3
anim = 23060+random%8
ownpal = 1
vel = 3+random%3,-5-random%3
removetime = 27
accel = 0,0.3
pos = 60,0

[State 23041]
type = Explod
trigger1 = Time < 3
anim = 23060+random%8
ownpal = 1
vel = -3-random%3,1+random%3
removetime = 27
accel = 0,0.3
pos = 60,0

[State 23041]
type = Explod
trigger1 = Time < 3
anim = 23060+random%8
ownpal = 1
vel = 3+random%3,1+random%3
removetime = 27
accel = 0,0.3
pos = 60,0

[State 23041]
type = DestroySelf
trigger1 = AnimTime = 0

;------------------------------------------------------------------------------------------------------------
;Rocket Helper
[Statedef 23042]
type = S
movetype = A
physics = N
;anim = 23040
ctrl = 0
sprpriority = -1
velset = 0,0
;hitcountpersist = 1

[State 23042]
type = ChangeAnim
trigger1 =  Anim != 23041
value = 23041

[State 3252, AngleSet]
type = AngleDraw
trigger1 = 1
value = 45

[State 23042]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 23042]
type = ChangeState
trigger1 = Parent,Stateno != 3042
value = 23043

[State 23042]
type = BindToParent
trigger1 = 1

;------------------------------------------------------------------------------------------------------------
;Meteor Helper
[Statedef 23043]
type = S
movetype = I
physics = N
anim = 9999
ctrl = 0
sprpriority = 2
velset = 0,0

[State 23043, Explod]
type = Explod
trigger1 = time = 0
anim = 23042
ID = 23042
removetime = -2
pausemovetime = 0
scale = 1.5,1.5
shadow = 0,0,0
ownpal = 1

[State 23043]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 23041]
type = DestroySelf
trigger1 = time = 46

;------------------------------------------------------------------------------------------------------------
;Gamma Quake Helper
[Statedef 23080]
type = A
movetype = A
physics = N
anim = 23080
ctrl = 0
sprpriority = 3
velset = 0,0
;hitcountpersist = 1

[State 23080]
type = null;ChangeAnim
trigger1 = Time = 0 && Anim != [23080,23082]
value = 23080+random%3


[State 23080]
type = null;AssertSpecial
trigger1 = 1
flag = noshadow

[State 23080]
type = VelSet
trigger1 = Time = 0
y = 7


[State 23080]
type = VelAdd
trigger1 = Pos Y < 0
y = 0.4

[State 23080]
type = HitBy
trigger1 = 1
value = SCA,AP

[State 23080]
type = HitOverride
trigger1 = 1
stateno = 23080
attr = SCA,AP
slot = 0
time = -1


[State 23080]
type = null;HitDef
attr = S, HP
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 3*(Root,var(30)),floor(Root,var(30)/2)
animtype = Large
priority  = 5, Hit
guardflag = MA
pausetime = 13,13
sparkxy = -10,-10
hitsound   = S1,1
guardsound = S4,0
sparkno = 2;s7702
;guard.sparkno = S8430
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -1,-7
air.velocity = -1,-4
;guard.velocity = -9
;airguard.velocity = -9
;fall.xvelocity = -3
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
fall = 1
air.fall = 1
fall.recover = 0
;fall.animtype = Up
;p2stateno = 9020
getpower = 50,25
;palfx.time = 1
;palfx.add = 256,256,256
sprpriority = 3

[State 23080]
type = null;ChangeState
trigger1 = var(0) < 1 || hitcount > 2
value = 23089
ignorehitpause  = 1

[State 23080]
type = null;ChangeState;DestroySelf
trigger1 = MoveContact
value = 23089
ignorehitpause = 1

[State 23080]
type = ChangeState;DestroySelf
trigger1 = MoveReversed
ignorehitpause = 1
value = 23089


[State 23080]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 23089


[State 23080]
type = null;DestroySelf
trigger1 = AnimTime = 0

[State 23080]
type = null;DestroySelf
trigger1 = FrontEdgeDist < -100
trigger2 = Time > 240


;------------------------------------------------------------------------------------------------------------
;Gamma Quake Helper
[Statedef 23089]
type = A
movetype = I
physics = N
anim = 23050+random%8
ctrl = 0
sprpriority = 3
velset = 0,0
;hitcountpersist = 1

[State 23089]
type = VelSet
trigger1 = Time = 0
x = -2-random%3
y = -3-random%4


[State 23089]
type = VelSet
trigger1 = Time = 0 && random < 500
x = 2+random%3
y = -3-random%4

[State 23089]
type = null;AssertSpecial
trigger1 = 1
flag = noshadow


[State 23089]
type = VelAdd
trigger1 = Pos Y < 0
y = 0.4


[State 23089]
type = DestroySelf
trigger1 = Time = 30

;======================================================
;Avengers Hyper Helpers================================
;======================================================
[Statedef 40001]
anim = 9999

[State 40001, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noBG
flag2 = noFG

[State 40001, Background]
type = Explod
trigger1 = !time
trigger2 = numexplod(15601) = 0
anim = 41500
ID = 15601
pos = 0,0
postype = left  ;p2,front,back,left,right
removetime = -1
pausemovetime = -1
supermovetime = -1
scale = 1,1
sprpriority = -9999
ownpal = 1
ignorehitpause = 1
bindtime = -1

[State 40001, Glass Break]
type = ChangeState
trigger1 = root, stateno !=[3000,4999]
value = stateno+1

[Statedef 40002]
anim = 9999

[State 40002, RemoveExplod]
type = RemoveExplod
trigger1 = !time
id = 15601

[State 40002, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S1500,3
volume = 200

[State 40002, Glass Break]
type = Explod
triggerall = !numexplod(15640)
trigger1 = !time
anim = 41560
ID = 15640
pos = 0,0
postype = left
pausemovetime = -1
supermovetime = -1
removetime = -2
scale = 1,1
sprpriority = -20
ownpal = 1
bindtime = -1
ignorehitpause = 1

[State 40002, DestroySelf]
type = DestroySelf
trigger1 = time = 1

;--AvX Portrait-----
[Statedef 40003]
anim = 9999

[State 40003, P1 BG]
type = Explod
triggerall = !numexplod(15650)
triggerall = teamside = 1
trigger1 = !time
anim = 41550
ID = 15650
pos = 0,abs((240*var(0))-61)
postype = left
pausemovetime = -1
supermovetime = -1
removetime = -2
bindtime = -1
scale = 1,1
sprpriority = -20
ownpal = 1
ignorehitpause = 1
removeongethit = 1

[State 40003, P2 BG]
type = Explod
triggerall = !numexplod(15651)
triggerall = teamside = 2
trigger1 = !time
anim = 41551
ID = 15651
pos = 0,abs((240*var(0))-61)
postype = right
pausemovetime = -1
supermovetime = -1
removetime = -2
bindtime = -1
scale = 1,1
facing = -1
sprpriority = -20
ownpal = 1
ignorehitpause = 1
removeongethit = 1

[State 40003, P1 PORTRAIT]
type = Explod
triggerall = parent,var(29)=1
triggerall = !numexplod(15660)
triggerall = teamside = 1
trigger1 = !time
anim = 15607
ID = 15660
pos = 0,abs((240*var(0))-63)
postype = left
pausemovetime = -1
supermovetime = -1
removetime = -2
bindtime = -1
scale = 1,1
sprpriority = -19
ownpal = 1
ignorehitpause = 1
removeongethit = 1

[State 40003, P2 PORTRAIT]
type = Explod
triggerall = parent,var(29)=1
triggerall = !numexplod(15661)
triggerall = teamside = 2
trigger1 = !time
anim = 15607
ID = 15661
pos = 0,abs((240*var(0))-63)
postype = right
pausemovetime = -1
supermovetime = -1
removetime = -2
bindtime = -1
scale = 1,1
facing = -1
sprpriority = -19
ownpal = 1
ignorehitpause = 1
removeongethit = 1

[State 40003, P1 PORTRAIT]
type = Explod
triggerall = parent,var(29)=0
triggerall = !numexplod(15660)
triggerall = teamside = 1
trigger1 = !time
anim = 15608
ID = 15660
pos = 0,abs((240*var(0))-63)
postype = left
pausemovetime = -1
supermovetime = -1
removetime = -2
bindtime = -1
scale = 1,1
sprpriority = -19
ownpal = 1
ignorehitpause = 1

[State 40003, P2 PORTRAIT]
type = Explod
triggerall = parent,var(29)=0
triggerall = !numexplod(15661)
triggerall = teamside = 2
trigger1 = !time
anim = 15608
ID = 15661
pos = 0,abs((240*var(0))-63)
postype = right
pausemovetime = -1
supermovetime = -1
removetime = -2
bindtime = -1
scale = 1,1
facing = -1
sprpriority = -19
ownpal = 1
ignorehitpause = 1

[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 2
ID = 15650
scale = 1,0.3
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 4
ID = 15650
scale = 1,0.54
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 6
ID = 15650
scale = 1,0.77
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 8
ID = 15650
scale = 1,1
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 56
ID = 15650
scale = 1,0.77
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 57
ID = 15650
scale = 1,0.54
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 58
ID = 15650
scale = 1,0.3
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 59
ID = 15650
scale = 1,1

[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 2
ID = 15651
scale = 1,0.3
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 4
ID = 15651
scale = 1,0.54
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 6
ID = 15651
scale = 1,0.77
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 8
ID = 15651
scale = 1,1
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 56
ID = 15651
scale = 1,0.77
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 57
ID = 15651
scale = 1,0.54
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 58
ID = 15651
scale = 1,0.3
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 59
ID = 15651
scale = 1,1

[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 2
ID = 15660
scale = 1,0.3
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 4
ID = 15660
scale = 1,0.54
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 6
ID = 15660
scale = 1,0.77
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 8
ID = 15660
scale = 1,1
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 56
ID = 15660
scale = 1,0.77
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 57
ID = 15660
scale = 1,0.54
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 58
ID = 15660
scale = 1,0.3
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 59
ID = 15660
scale = 1,1

[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 2
ID = 15661
scale = 1,0.3
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 4
ID = 15661
scale = 1,0.54
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 6
ID = 15661
scale = 1,0.77
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 8
ID = 15661
scale = 1,1
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 56
ID = 15661
scale = 1,0.77
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 57
ID = 15661
scale = 1,0.54
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 58
ID = 15661
scale = 1,0.3
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 59
ID = 15661
scale = 1,1

[State 40003, DestroySelf]
type = DestroySelf
trigger1 = time = 60

[Statedef 40004]
anim = 9999

[State 40001, DestroySelf]
type = DestroySelf
trigger1 = time = 1

;-------------------------------------------------------------------------------
; Pause Menu

[StateDef 40500]
Type = S
Ctrl = 0
Anim = 9999

[State 40500, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "var(0) = %d"
params = var(0)

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

[State 40500, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 9999
value = 9999

[State 40500, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = invisible

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

[State 40500]
type = ChangeState
triggerall = Parent,command != "Taunt"
triggerall = ailevel = 0
trigger1 = Parent,Alive
trigger1 = RoundState = 2
trigger1 = Command = "Pause"
trigger1 = Parent,Command = "Pause"
value = 40501

;-------------------------------------------------------------------------------
[StateDef 40501]
type = S
ctrl = 0

[State 40501, Helper]
type = Helper
trigger1 = time = 0
helpertype = normal ;player
name = "Pause Detector"
ID = 40505
stateno = 40505

[State 40501, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S40500,2

[State 40501, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "var(0) = %d"
params = var(0)

[State 40501, NoFG]
Type = AssertSpecial
Trigger1 = 1
flag = nofg
flag2 = nobardisplay
flag3 = nomusic

[State 40502, PlaySnd]
type = PlaySnd
trigger1 = command = "Down"
trigger2 = command = "Up"
value = S40500,0

[State 40501, VarSet]
type = Varadd
trigger1 = command = "Down"
v = 0
value = 1

[State 40501, VarSet]
type = Varadd
trigger1 = command = "Up"
v = 0
value = -1

[State 40501, VarSet]
type = Varset
triggerall = var(0) > 3
trigger1 = command = "Down"
v = 0
value = 1

[State 40501, VarSet]
type = Varset
triggerall = var(0) < 1
trigger1 = command = "Up"
v = 0
value = 3

[State 40501, Explod]
type = Explod
trigger1 = numexplod(40500) = 0
anim = 40500
ID = 40500
pos = 0,0
postype = left
facing = 1
bindtime = -1
removetime = -1
scale = .5,.5
sprpriority = 9999
ontop = 0
shadow = 0,0,0
ownpal = 1
ignorehitpause = 1

[State 40501, Explod]
type = Explod
triggerall = var(0) = 1
trigger1 = numexplod(40501) = 0
anim = 40501
ID = 40501
pos = 0,0
postype = left
facing = 1
bindtime = -1
removetime = -1
scale = .5,.5
sprpriority = 9999
ontop = 1
shadow = 0,0,0
ownpal = 1
ignorehitpause = 1

[State 40501, Explod]
type = Explod
triggerall = var(0) = 2
trigger1 = numexplod(40502) = 0
anim = 40502
ID = 40502
pos = 0,0
postype = left
facing = 1
bindtime = -1
removetime = -1
scale = .5,.5
sprpriority = 9999
ontop = 1
shadow = 0,0,0
ownpal = 1
ignorehitpause = 1

[State 40501, Explod]
type = Explod
triggerall = var(0) = 3
trigger1 = numexplod(40503) = 0
anim = 40503
ID = 40503
pos = 0,0
postype = left
facing = 1
bindtime = -1
removetime = -1
scale = .5,.5
sprpriority = 9999
ontop = 1
shadow = 0,0,0
ownpal = 1
ignorehitpause = 1

[State 40502, RemoveExplod]
type = RemoveExplod
trigger1 = var(0)!= 1
id = 40501
ignorehitpause = 1

[State 40502, RemoveExplod]
type = RemoveExplod
trigger1 = var(0)!= 2
id = 40502
ignorehitpause = 1

[State 40502, RemoveExplod]
type = RemoveExplod
trigger1 = var(0)!= 3
id = 40503
ignorehitpause = 1

[State 40501, Pause]
type = Pause
trigger1 = 1
time = 10
moveTime = 10

[State 40501]
type = ChangeState
trigger1 = Time >= 6 && Command = "Pause"
trigger2 = ailevel != 0
value = 40502

;-------------------------------------------------------------------------------
[StateDef 40502]
type = S
ctrl = 0

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

[State 40502, RemoveExplod]
type = RemoveExplod
trigger1 = 1
id = 40500
ignorehitpause = 1

[State 40502, RemoveExplod]
type = RemoveExplod
trigger1 = 1
id = 40501
ignorehitpause = 1

[State 40502, RemoveExplod]
type = RemoveExplod
trigger1 = 1
id = 40502
ignorehitpause = 1

[State 40502, RemoveExplod]
type = RemoveExplod
trigger1 = 1
id = 40503
ignorehitpause = 1

[State 40502]
type = Pause
trigger1 = Time = 0
time = 0

[State 40502]
type = BGPalFX
trigger1 = Time = 0
time = 1

[State 40502]
type = ChangeState
trigger1 = Time = 1
value = 40500

;-------------------------------------------------------------------------------
[StateDef 40505]
Type = S
Ctrl = 0
Anim = 9999

[State 40505, DestroySelf]
type = DestroySelf
trigger1 = parent, stateno != 40501
ignorehitpause = 1

