

;VARIABLES
;var(0)-var(5): Temp
;var(6);combo chain 
;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); escolhe anim foto
;var(19)-var(21);hit type combo
;var(22) - modo sense
;var(23) - contador
;var(24) - boolean efeito
;var(25)-var(27);hitcount
;var(28),  Helper, earth quake
;var(29),launcher reset
;
;
;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);cajun explosion
;var(38);Ricochet Slash
;var(39);speed dance
;var(40) web refill;
;var(41) dano do estilingue;
;var(42)  web refill; capsula
;var(43) - var(48); run
;var(44) - 10 bullets
;var(45) - mini contador, pra diminuir o tempo do spider sense
;var(46) - boolean contador gambiarra
;var(49); Kyuukouka Dance
;var(50);- power dance
;var(51) - special to hyper states
;var(52) - damage to super armor
;var(54) - flight mode
;var(55) - Super Armor
;var(56);  sos condition
;var(57); 
;var(58); remember ai for next round
;var(59); ai activate

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

;fvar(0) - fvar(5) ; Temp

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


[Data]
;Amount of life to start with

life = 1000
attack = 100
defence = 100
fall.defence_up = 50
liedown.time = 60
airjuggle = 15
sparkno = 7200
guard.sparkno = 7300
KO.echo = 0
volume = 255
IntPersistIndex = 29
FloatPersistIndex = 19

[Size]
xscale = 1    ;Horizontal scaling factor.
yscale = 1          ;Vertical scaling factor.
ground.back = 38    ;Player width (back, ground)
ground.front = 38   ;Player width (front, ground)
air.back = 30  ;Player width (back, air)
air.front = 30  ;Player width (front, air)
height = 50          ;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 = 31,-35 ;Approximate position of head
mid.pos = 0,-25   ;Approximate position of midsection
shadowoffset = 0   ;Number of pixels to vertically offset the shadow
draw.offset = 0,0    ;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

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

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


[State 170]
type = null;ChangeState
trigger1 = Time = 0 && random < 400
value = 172

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


[State 170]
type = null;PlaySnd
trigger1 = Time = 7
value = 170,4



[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 172]
type = NotHitBy
trigger1 = 1
value = SCA

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

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

[Statedef 173]
type = S
ctrl = 0
velset = 0,0
anim = 9800

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

[State 173]
type = PlaySnd
trigger1 = Time = 0
value = 170,0

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

[State 173]
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 = Win  && var(40)=0
value = 186

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

[State 180]
type = ChangeState
trigger1 = Time >= 1
trigger1 = WinKO
value = 181+ifelse(matchover, random%5, random%4)

;;;;24 - i won?
;21 - surprise party?
;20 - happen
;;;;19 - day job
;;;;18 - i won, fear me
;;;;17 - common u can do better
;16 - sad desculpa
;15 - smell old chees
;;;;182 - 0 - foto
;194 - 0 - spider sense

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

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

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

[state 189]
type = PlaySnd
trigger1 = Time = 1
value = 181,0

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

;---------------------------------------------------------------------------
; Win pose 1 - Win KO
[Statedef 185]
type = S
ctrl = 0
anim = 185
velset = 0,0
sprpriority = 0

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

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

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 4
x = 0
y = -9

[State 3510, branco]
type = helper
trigger1 = AnimElem = 5
ID = 3516
pos = 0,0
postype = p2
stateno = 3516
supermovetime = 9999
helpertype = normal
name = "Branco"
ownpal = 0
keyctrl = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = 7710,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = 1450,2

[State 0, Explod]
type = Explod
trigger1 = animelem = 5
anim = 187
ID = 187
pos = 150,100
postype = left;,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -1
sprpriority = 10
ownpal = 1
removeongethit = 1


[State 0, Explod]
type = Explod
trigger1 = animelem = 4
anim = 186
ID = 186
pos = 150,130
postype = left;,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -1
sprpriority = 6
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
trigger1 = animelem = 4
anim = 186
ID = 186
pos = 150,130
postype = left;,right
facing = -1
vfacing = 1
bindtime = 1
removetime = -1
sprpriority = 6
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
trigger1 = animelem = 4
anim = 186
ID = 186
pos = 150,137
postype = left;,right
facing = 1
vfacing = -1
bindtime = 1
removetime = -1
sprpriority = 6
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
trigger1 = animelem = 4
anim = 186
ID = 186
pos = 150,137
postype = left;,right
facing = -1
vfacing = -1
bindtime = 1
removetime = -1
sprpriority = 6
ownpal = 1
removeongethit = 1

[State 172, bgpalfx]
type = bgpalfx
trigger1 = animelem = 3
invertall = 0
add = -255,-255,-255
sinadd = -50,-50,-50;,80
color = 0
time = 245

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 5
value = 3001,0

[State 185]
type = AssertSpecial
trigger1 = Time < 245
flag = roundnotover


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

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

[State 172, bgpalfx]
type = bgpalfx
trigger1 = animelem = 3
invertall = 1
add = 150,110,10
sinadd = -50,-50,-50,80
color = 0
time = 10

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = 121,23

[State 185]
type = AssertSpecial
trigger1 = Time < 245
flag = roundnotover

[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
trigger1 = Time = 30
value = 121,24

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


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

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

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


[State 182]
type = PlaySnd
trigger1 = AnimElem = 2
value = 121,18


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


[Statedef 184]
type = S
ctrl = 0
physics = N
anim = 182
sprpriority = 0
;facep2 = 1
velset = 0,0

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


[State 184]
type = PlaySnd
trigger1 = AnimElem = 2
value = 121,17


[State 184]
type = AssertSpecial
trigger1 = Time < 200
flag = roundnotover


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

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

[State 183]
type = PlaySnd
trigger1 = AnimElem = 1
value = 121,19


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

[State 183]
type = PlaySnd
trigger1 = AnimElem = 7
value = 182,0


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






;---------------------------------------------------------------------------
; Win pose 7- Win KO

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

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


[State 187]
type = Helper
trigger1 = Time = 17
stateno = 6187
id = 6187
ownpal = 1
postype = Front

[State 187]
type = ChangeAnim
trigger1 = AnimElem = 8
value = anim
elem = 4
persistent = 0


[State 187]
type = ChangeAnim
trigger1 = AnimElem = 8
trigger1 = NumHelper(6187)
trigger1 = Helper(6187),ParentDist X > 30
value = anim
elem = 4



[State 187]
type = AssertSpecial
trigger1 = Time < 300
flag = roundnotover


;---------------------------------------------------------------------------
; Win pose 8 Win KO

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

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




[State 188]
type = PosAdd
trigger1 = AnimElemNo(0) = [6,7]
trigger1 = ScreenPos Y > 130
y = -9


[State 188]
type = ChangeAnim
trigger1 = ScreenPos Y < 130
value = anim
elem = 8
persistent = 0


[State 188]
type = PlaySnd
trigger1 = AnimElem = 9
value = 192,0


[State 188]
type = PosAdd
trigger1 = AnimElem = 9
y = 30
persistent = 0

[State 188]
type = AssertSpecial
trigger1 = Time < 240
flag = roundnotover


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

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


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

[State 190, 2]
type = ChangeState
triggerall = Time = 0
trigger1 = (p2name ="Deadpool")
trigger2 = (p2name ="CaptainAmerica")
trigger3 = (p2name ="Elektra")
trigger4 = (p2name ="Ghost Rider")
trigger5 = (p2name ="Iceman")
trigger6 = (p2name ="Human Torch")
trigger7 = (p2name ="Captain America")
trigger8 = (p2name ="Daredevil")
trigger9 = (p2name ="The Joker")
value = 196

[State 191, 3] ;Change to
type = ChangeState
trigger1 = Time = 1; && random < 400
value = 192+random%3


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

[State 196]
type = PlaySnd
triggerall = AnimElem = 1
trigger1 = p2name ="Deadpool"
value = 121,11

[State 196]
type = PlaySnd
triggerall = AnimElem = 1
trigger1 = p2name ="CaptainAmerica"
value = 121,13
[State 196]
type = PlaySnd
triggerall = AnimElem = 1
trigger1 = p2name ="Captain America"
value = 121,13

[State 196]
type = PlaySnd
triggerall = AnimElem = 1
trigger1 = p2name ="Elektra"
value = 121,10

[State 196]
type = PlaySnd
triggerall = AnimElem = 1
trigger1 = p2name ="Ghost Rider"
value = 121,9

[State 196]
type = PlaySnd
triggerall = AnimElem = 1
trigger1 = p2name ="Iceman"
value = 121,8

[State 196]
type = PlaySnd
triggerall = AnimElem = 1
trigger1 = p2name ="Human Torch"
value = 121,7

[State 196]
type = PlaySnd
triggerall = AnimElem = 1
trigger1 = p2name ="Daredevil"
value = 121,12

[State 196]
type = PlaySnd
triggerall = AnimElem = 1
trigger1 = p2name ="The Joker"
value = 121,6


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

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

[State 196]
type = ChangeState
trigger1 = time > 153
value = 199
ctrl = 0

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = 7710,0

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 32
value = 1430,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 33
value = 192,0




[State 0, Explod]
type = Explod
trigger1 = animelem = 21
anim = 190
ID =  190
pos = 26,-195
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
sprpriority = 2

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

[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
value = 199
ctrl = 0

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

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

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 6
value = 121,14

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 10
value = 1430,0

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


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

[State 193]
type = Helper
trigger1 = Time = 0
stateno = 6192
ownpal = 1


[State 193]
type = PosSet
trigger1 = AnimElem = 6
y = -130

[State 193]
type = VelSet
trigger1 = AnimElem = 6
y = 2




[State 193]
type = ChangeAnim
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = anim
elem = 7
persistent = 0


[State 193]
type = VelSet
trigger1 = AnimElem = 7, = 1
x = 0
y = 0
persistent = 0

[State 193]
type = PosSet
trigger1 = AnimElem = 7, = 1
y = 0
persistent = 0

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


[State 193]
type = VelSet
trigger1 = AnimElem = 10
x = 0
y = 0


[State 193]
type = VelSet
trigger1 = abs(Pos X) > abs(fvar(0))
x = 0
persistent = 0

[State 193]
type = PosSet
trigger1 = abs(Pos X) > abs(fvar(0))
x = fvar(0)
persistent = 0



[State 193]
type = PlaySnd
trigger1 = AnimElem = 10
value = 5100,0

[State 52]
type = Explod
trigger1 = AnimElem = 10
anim = 7052
sprpriority = -2
pos = 0,0
ownpal = 1

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

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


[State 193]
type = PalFx
trigger1 = AnimElemNo(0) = 6
time = 1
color = 256
add = -128,-128,-128


[State 193]
type = varset
trigger1 = Time = 0
var(1) = 0


[State 193]
type = PalFx
trigger1 = AnimElemNo(0) = 7
time = 1
color = 256
add = -130+13*var(1),-130+13*var(1),-130+13*var(1)


[State 193]
type = Varadd
trigger1 = AnimElemNo(0) = 7
var(1) = 1


[State 193]
type = PalFx
trigger1 = AnimElem = 6 || AnimElem = 8 || AnimElem = 10
time = 1
color = 256
add = 0,0,0


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





;---------------------------------------------------------------------------
; Introduction 3

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

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

[State 194]
type = PlaySnd
trigger1 = AnimElem = 3
value = 121,5

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

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


;---------------------------------------------------------------------------
; 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] ;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


[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


[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


[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


[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 = 198
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,1

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

[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]
type = null;OffSet
trigger1 = Anim = [20,21]
y = -5

[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 = ChangeAnim 
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]
type = varset
trigger1 = Time = 0
var(1) = random%3



[State 195]
type = PlaySnd
trigger1 = AnimElem = 7
value = 195,var(1)


[State 195]
type = Helper
trigger1 = AnimElem = 7
stateno = 6195
id = 6195
ownpal = 1

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


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

[Statedef 200]
type    = S                      
movetype= A                      
physics = S                      
juggle  = 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
trigger1 = AnimElem = 1
value = 200,0


[State 200]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = S, NA             
damage = 30
animtype = Light                 
guardflag = MA                  
hitflag = MAF                    
priority = 3, Hit                
pausetime = 9,9
sparkno = 0
sparkxy = -10,-50
hitsound = S1,0
guardsound = S4,0                
ground.type = High
ground.slidetime = 15            
ground.hittime  = 10             
ground.velocity = -3  
air.type = High                  
air.velocity = -3         
air.hittime = 12                 


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


[State 200]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 5, >= 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  = 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
trigger1 = AnimElem = 1
value = 210,0

[State 210]
type = HitDef
trigger1 = !var(29)
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = S, NA
animtype  = Medium
damage    = 45
guardflag = MA
pausetime = 9,9
sparkno = 1
sparkxy = -10,-50
hitsound   = S1,1
guardsound = S4,0
ground.type = High
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = 0,-13
air.velocity = 0,-12
p2stateno = 7321


[State 210]
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 210]
type = varset
trigger1 = MoveHit
var(29) = 1
ignorehitpause = 1
persistent = 0


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

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

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




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



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


[State 220]
type = PlaySnd
trigger1 = AnimElem = 3
value = 220,1




[State 220]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = S, NA
animtype  = Hard
damage    = 85
guardflag = MA
pausetime = 5,5
sparkno = 2
sparkxy = -10,-60
hitsound   = S1,2
guardsound = S4,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -10,-5
air.velocity = -10,-5


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


[State 220]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 7, >= 0
var(9) = 1
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  = 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 = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = S, NA
animtype  = Light
damage    = 25
guardflag = MA
pausetime = 9,9
sparkno = 0
sparkxy = -10,-60
hitsound   = S1,4
guardsound = S4,0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -3
air.velocity = -3

[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  = 4
poweradd= 27
ctrl = 0
velset = 0,0
anim = 310
sprpriority = 0
facep2 = 1



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

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


[State 310]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = S, NA
animtype = Medium
damage    = 45
hitflag = MAF
guardflag = MA
pausetime = 9,9
sparkno = 1
sparkxy = -10,-70
hitsound   = S1,5
guardsound = S4,0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = -5
air.velocity = -5



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


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


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


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



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

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


[State 311]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = S, NA
animtype = Medium
damage    = 50
hitflag = MAF
guardflag = MA
pausetime = 9,9
sparkno = 1
sparkxy = -10,-70
hitsound   = S1,5
guardsound = S4,0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = -5
air.velocity = -5


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


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


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

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


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

[State 320]
type = PlaySnd
trigger1 = AnimElem = 3
value = 220,0


[State 320]
type = HitDef
trigger1 = enemynear,statetype != A
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = S, NA
animtype = Hard
damage    = 90
guardflag = MA
pausetime = 5,5
sparkno = 2
sparkxy = -10,-70
hitsound   = S1,6
guardsound = S4,0
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -7
air.velocity = -7


[State 320]
type = Explod
trigger1 = NumTarget(320) && 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 = varset
trigger1 = NumTarget(320) && MoveHit
var(29) = 1
ignorehitpause = 1
persistent = 0

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


[State 320]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 7, >= 0
var(9) = 1
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  = 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 = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = C, NA             
damage = 25
animtype = Light                 
guardflag = MA
hitflag = MAF
priority = 3, Hit                
pausetime = 9,9
sparkno = 0
sparkxy = -10,-10
hitsound = S1,0        
guardsound = S4,0                
ground.type = Low
ground.slidetime = 15            
ground.hittime  = 10             
ground.velocity = -3    
air.velocity = -2

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

[State 400]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 4, >= 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  = 5
poweradd= 27
ctrl = 0
anim = 410
sprpriority = 0
velset = 0,0 
facep2 = 1



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


[State 410]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = C, NA             
damage = 45
animtype = Medium                 
guardflag = MA
hitflag = MAF
priority = 3, Hit                
pausetime = 9,9
sparkno = 1
sparkxy = -10,-50
hitsound = S1,1
guardsound = S4,0                
ground.type = Low
ground.slidetime = 15            
ground.hittime  = 15             
ground.velocity = -5   
air.velocity = -5


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

[State 410]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 6, >= 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  = 6
poweradd= 50
ctrl = 0
anim = 420
sprpriority = 0
velset = 0,0
facep2 = 1

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


[State 420]
type = PlaySnd
trigger1 = AnimElem = 3
value = 220,0


[State 420]
type = HitDef
;trigger1 = !var(29)
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = C, NA
damage    = 80
animtype  = Hard
hitflag = MAF
guardflag = MA
pausetime = 5,5
sparkxy = -10,-40
sparkno = 2
hitsound   = S1,2 
guardsound = S4,0
ground.type = Low;Trip
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -7;0,-13
air.velocity = -7;0,-12

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

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

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


;---------------------------------------------------------------------------
;Crouch Kick
[Statedef 500]
type    = C
movetype= A
physics = C
juggle  = 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 = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = C, NA             
damage = 25
animtype = Light                 
guardflag = MA
hitflag = MAF
priority = 3, Hit                
pausetime = 9,9
sparkno = 0
sparkxy = -10,-10
hitsound = S1,4        
guardsound = S4,0                
ground.type = Low
ground.slidetime = 10            
ground.hittime  = 10             
ground.velocity = -3
air.velocity = -3

[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  = 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
trigger1 = AnimElem = 3
value = 200,0



[State 510]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = C, NA
animtype = Medium
damage    = 45
guardflag = MA
hitflag = MAF
pausetime = 9,9
sparkno = 1
sparkxy = -10,-60
hitsound   = S1,5
guardsound = S4,0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = 0,-7;-5
air.velocity = 0,-5;-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 = 5, >= 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  = 4
poweradd= 50
ctrl = 0
velset = 0,0
anim = 520
sprpriority = 0
facep2 = 1



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


[State 520]
type = PlaySnd
trigger1 = AnimElem = 3
value = 220,0



[State 520]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = C, NA
animtype = Hard
damage    = 75
guardflag = MA
hitflag = MAF
pausetime = 5,5
sparkno = 2
sparkxy = -10,-10
hitsound   = S1,6
guardsound = S4,0
ground.type = Trip
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = 0,-4
air.velocity = 0,-4

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

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

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


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



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


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



[State 521]
type = HitDef
trigger1 = !var(29)
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = C, NA
animtype = Medium
damage    = 50
hitflag = MAF;D
guardflag = M;L
pausetime = 5,5
sparkno = 2
sparkxy = -10,-60
hitsound   = S1,5
guardsound = S4,0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = 0,-13
air.velocity = 0,-12
getpower = 27,14
p2stateno = 7321


[State 521]
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 521]
type = varset
trigger1 = MoveHit
var(29) = 1
ignorehitpause = 1
persistent = 0

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


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

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


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


[State 590]
type = PlaySnd
trigger1 = Time = 4
value = 200,0



[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
persistent = 0

[State 590]
type = HitDef
attr = S, NA
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 90
animtype = Medium
priority  = 5, Hit
guardflag = HA
pausetime = 7,7
sparkxy = -10,-80+floor(P2Dist Y)
hitsound   = S1,2
guardsound = S4,0
sparkno = 2
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -9,0
air.velocity = -7,-3
guard.velocity = -7
airguard.velocity = -7
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State 590]
type = 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 = 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  = 1
poweradd= 13
ctrl = 0
anim = 600
sprpriority = 0
;velset = 0,0
facep2 = 1

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


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

[State 600]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, NA
animtype  = Light
damage    = 20
guardflag = HA
pausetime = 9,9
sparkno = 0
sparkxy = -10,-70+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)

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

[State 600]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 3, >= 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 = 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  = 1
poweradd= 27
ctrl = 0
anim = 610
sprpriority = 0
;velset = 0,0
facep2 = 1


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


[State 610]
type = PlaySnd
trigger1 = Time = 5
value = 210,0



[State 610]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, NA
animtype  = Medium
damage    = 40
guardflag = HA
pausetime = 9,9
sparkno = 1
sparkxy = -10,-70+floor(P2Dist Y)
hitsound   = S1,1
guardsound = S4,0
ground.type = High
air.type = Low
ground.slidetime = 15
ground.hittime  = 30
air.hittime = 30
ground.velocity = -5
air.velocity = -5,-5

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


[State 610]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 6, >= 0
var(9) = 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 = N
juggle  = 1
poweradd= 50
ctrl = 0
anim = 620
sprpriority = 0
;velset = 0,0
facep2 = 1



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

[State 620]
type = PlaySnd
trigger1 = Time = 5
value = 220,0


[State 620]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, NA
animtype  = Hard
damage    = 60
guardflag = HA
pausetime = 5,7;0,17;7,10
sparkno = 2
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 = -9
air.velocity = -7,10
fall = (enemynear,statetype = A)
air.fall = 1
fall.recover =0

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

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

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

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


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

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


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

[State 620]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
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 = var(8) = [-30,10]
trigger1 = random < 300
value = 700
ctrl = 0



[State 631]
type = ChangeState
trigger1 = p2bodydist x < 90
trigger1 = var(8) = [-30,30]
trigger1 = random < 200
value = 710
ctrl = 0


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

[State 631]
type = ChangeState
trigger1 = p2bodydist x < 90
trigger1 = var(8) = [-30,30]
trigger1 = random < 200
value = 610
ctrl = 0


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

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


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

[State 635]
type = VelAdd
trigger1 = anim = 70; && !var(54)
y = 0.4


[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  = 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 = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, NA
animtype  = Light
damage    = 20
guardflag = MA
pausetime = 9,9
sparkno = 0
sparkxy = -10,-70+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)

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


[State 700]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 3, >= 0
var(9) = 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  = 1
poweradd= 27
ctrl = 0
anim = 710
sprpriority = 0
;velset = 0,0
facep2 = 1


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

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

[State 710]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, NA
animtype  = Medium
damage    = 40
guardflag = HA
pausetime = 9,9
sparkno = 1
sparkxy = -10,-90+floor(P2Dist Y)
hitsound   = S1,5
guardsound = S4,0
ground.type = High
air.type = Low
ground.slidetime = 15
ground.hittime  = 30
air.hittime = 30
ground.velocity = -5
air.velocity = -5,-5

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


[State 710]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 7, >= 0
var(9) = 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  = 1
poweradd= 50
ctrl = 0
anim = 720
sprpriority = 0
;velset = 0,0
facep2 = 1


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

[State 720]
type = PlaySnd
trigger1 = Time = 5
value = 220,0


[State 720]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, NA
animtype  = Hard
damage    = 60
guardflag = HA
pausetime = 5,5;0,17;7,10
sparkno = 2
sparkxy = -10,-70+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,10
fall = (enemynear,statetype = A)
air.fall = 1
fall.recover =0

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


[State 720]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 11, >= 0
var(9) = 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

; 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 800]
type    = S
movetype= A
physics = N
juggle  = 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 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
                      ;p2's sprite priority is set to 0 by default
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 = null;VarSet
trigger1 = AnimElem = 5
var(9) = 1
persistent = 0


[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
velset = 0,0
ctrl = 0
sprpriority = 0

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

[State 810]
type = TargetBind
trigger1 = AnimElemNo(0) = 2
pos = 19,-7

[State 810]
type = TargetBind
trigger1 = AnimElemNo(0) = 3
pos = -16,-12

[State 810]
type = TargetBind
trigger1 = AnimElemNo(0) = 4
pos = -52,-30

[State 810]
type = TargetBind
trigger1 = AnimElemNo(0) = 5
pos = -67,-83


[State 810]
type = TargetBind
trigger1 = AnimElemNo(0) = 6
pos = -42,-121

[State 810]
type = TargetBind
trigger1 = AnimElemNo(0) = 7
pos = 49,-95

[State 810]
type = TargetBind
trigger1 = AnimElemNo(0) = 8
pos = 61,-37

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

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

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

[State 810]
type = VelSet
trigger1 = AnimElem = 2
y = -7

[State 810]
type = VelAdd
trigger1 = AnimElem = 2, >= 0
y = 0.2

[State 810]
type = VelAdd
trigger1 = AnimElem = 7, >= 0
y = 0.2

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

[State 810]
type = TargetState
trigger1 = AnimElem = 8, >= 2
value = 823

[State 810]
type = ChangeState
trigger1 = AnimElem = 8, >= 2
value = 813
ctrl = 0



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


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

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

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

[State 811]
type = TargetBind
trigger1 = AnimElemNo(0) = 2
pos = 27,-41

[State 811]
type = TargetBind
trigger1 = AnimElemNo(0) = 3
trigger2 = AnimTime = 0
pos = -41,-57

[State 811]
type = TargetBind
trigger1 = AnimElemNo(0) = 4
pos = 7,-57

[State 811]
type = TargetBind
trigger1 = AnimElemNo(0) = 5
pos = 46,-32

[State 811]
type = TargetBind
trigger1 = AnimElemNo(0) = 6
pos = 59,-20

[State 811]
type = TargetBind
trigger1 = AnimElemNo(0) = 7
pos = 51,-12

[State 811]
type = TargetBind
trigger1 = AnimElemNo(0) = 8
pos = 0,0


[State 811]
type = TargetBind
trigger1 = AnimElemNo(0) = 9
pos = 37,-18

[State 811]
type = TargetBind
trigger1 = AnimElemNo(0) = 10
pos = -49,-44


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

[State 811]
type = TargetLifeAdd
trigger1 = Pos Y > -90
value = -9*var(30)
persistent = 0

[State 811]
type = PowerAdd
trigger1 = Pos Y > -90
value = 50
persistent = 0

[State 811]
type = PlaySnd
trigger1 = Pos Y > -90
value = 220,0
persistent = 0

[State 811]
type = TargetState
trigger1 = Pos Y > -90
value = 823

[State 811]
type = ChangeState
trigger1 = Pos Y > -70
value = 813
ctrl = 0


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


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

[Statedef 812]
type    = S
movetype= A
physics = N
anim = 620
poweradd = 0
juggle  = 0
velset = 0,0
ctrl = 0
sprpriority = 0

[State 812]
type = TargetBind
trigger1 = 1
pos = 63,-73

[State 812]
type = PlaySnd
trigger1 = Time = 7
value = 220,0

[State 812]
type = PlaySnd
trigger1 = AnimElem = 3
value = 1,2


[State 812]
type = Explod
trigger1 = AnimElem = 3
anim = f2
ontop = 1
ownpal = 1
pos = 63,-73


[State 812]
type = TargetLifeAdd
trigger1 = AnimElem = 3
value = -80

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

[State 812]
type = TargetState
trigger1 = AnimElem = 4
value = 823

[State 812]
type = ChangeState
trigger1 = AnimElem = 4
value = 813
ctrl = 0


[State 812]
type = ChangeState
trigger1 = !NumTarget(800)
value = 813
ctrl = 1


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

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

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

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


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

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

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


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

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

[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 = -1

[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 = -13,3
poweradd = 60

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

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

[State 823] ;Hit ground
type = null;ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 824

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

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

[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

[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, 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, Sound]
type = PlaySnd
trigger1 = Time = 0
value = F7,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

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

[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
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 = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1


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

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

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


[State 840]
type = TargetBind
trigger1 = AnimElemNo(0) = 1
pos = 64,-70

[State 840]
type = TargetBind
trigger1 = AnimElemNo(0) = 2
pos = 12,-43

[State 840]
type = TargetBind
trigger1 = AnimElemNo(0) = 3
pos = -9,-83

[State 840]
type = TargetBind
trigger1 = AnimElemNo(0) = 4
pos = -23,-87

[State 840]
type = TargetBind
trigger1 = AnimElemNo(0) = 5
pos = -30,-87

[State 840]
type = TargetBind
trigger1 = AnimElemNo(0) = 6
pos = -95,-83


[State 840]
type = PlaySnd
trigger1 = AnimElem = 6
value = 220,0

[State 840]
type = TargetLifeAdd
trigger1 = AnimElem = 6
value = -90

[State 840]
type = PowerAdd
trigger1 = AnimElem = 6
value = 50

[State 840]
type = TargetState
trigger1 = AnimElem = 6, >= 2
value = 855

[State 840]
type = ChangeState
trigger1 = AnimElem = 6, >= 2
value = 843

[State 840]
type = ChangeState
trigger1 = !NumTarget(800)
value = 843
ctrl = 0



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

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


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

[State 841]
type = TargetBind
trigger1 = AnimElemNo(0) = 1
trigger2 = AnimTime = 0
pos = 12,-1

[State 841]
type = TargetBind
trigger1 = AnimElemNo(0) = 2
pos = 12,-1

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


[State 841]
type = PlaySnd
trigger1 = AnimElem = 1, = 2
value = 220,0
persistent = 0

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


[state 841]
type = Explod
trigger1 = AnimElem = 2
anim = f2
id = 7052
sprpriority = 2
ownpal = 1
pos = 12,-1

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


[State 841]
type = PowerAdd
trigger1 = AnimElem = 3
value = 10

[State 841]
type = TargetState
trigger1 = Time >= 60
value = 855

[State 841]
type = ChangeState
trigger1 = Time >= 60
value = 842

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



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



[State 842]
type = PlaySnd
trigger1 = Time = 3
value = 200,0

[State 842]
type = PlaySnd
trigger1 = Time = 9
value = 220,2


[State 842]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = S, NA
animtype  = Hard
damage    = 10
guardflag = HA
pausetime = 5,7;0,17;7,10
sparkno = 2
sparkxy = -20,-20;+floor(P2Dist Y)
hitsound   = S1,30
guardsound = S4,0
ground.type = High
air.type = Low
ground.slidetime = 15
ground.hittime  = 20
air.hittime = 25
ground.velocity = -15
air.velocity = -7,17
getpower = 10,5   ;uhu




[State 842]
type = ChangeState
trigger1 = AnimElem = 5, >= 0
value = 843



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

[Statedef 843]
type    = S
movetype= I
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
sprpriority = 0

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

;---------------------------------------------------------------------------
;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 = SprPriority
trigger1 = AnimElem = 2
value = 1

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

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


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

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

[State 850]
type = DestroySelf
trigger1 = ishelper



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

[Statedef 851]
type    = S;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 = Turn
trigger1 = 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 = -1

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



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



[State 853]
type = 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 = -15,-5
poweradd = 60
sprpriority = -1


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

[State 855] ;Gravity
type = VelAdd
trigger1 = 1
y = 0.4


[State 855] ;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 = -30,-3
poweradd = 60


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


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

[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] ;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] ;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
velset = 0,0
ctrl = 0
anim = 920
sprpriority = 0



[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 = ChangeAnim
trigger1 = AnimTime = 0
value = 70
persistent = 0

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

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



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

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

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

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

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

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

[State 930]
type = TargetBind
trigger1 = AnimElemNo(0) = 5
pos = -40,-120

[State 930]
type = TargetBind
trigger1 = AnimElemNo(0) = 6
pos = 48,-94

[State 930]
type = TargetBind
trigger1 = AnimElemNo(0) = 7
pos = 55,-74

[State 930]
type = PlaySnd
trigger1 = AnimElem = 7
value = 220,0

[State 930]
type = TargetLifeAdd
trigger1 = AnimElem = 7
value = -90

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


[State 930]
type = TargetState
trigger1 = AnimElem = 7, >= 2
value = 945


[State 930]
type = ChangeState
trigger1 = AnimElem = 7, >= 2
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
velset = 0,0
ctrl = 0
sprpriority = 0

[State 931]
type = TargetBind
trigger1 = AnimElemNo(0) = 1
trigger2 = AnimTime = 0
pos = -41,-57

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

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

[State 931]
type = TargetBind
trigger1 = AnimElemNo(0) = 4
pos = 59,-20

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

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


[State 931]
type = TargetBind
trigger1 = AnimElemNo(0) = 7
pos = 37,-18

[State 931]
type = TargetBind
trigger1 = AnimElemNo(0) = 8
pos = -49,-44


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

[State 931]
type = TargetLifeAdd
trigger1 = AnimElem = 1, = 1
value = -90

[State 931]
type = PowerAdd
trigger1 = AnimElem = 1, = 1
value = 50


[State 931]
type = TargetState
trigger1 = Time >= 4
value = 943

[State 931]
type = ChangeState
trigger1 = Time >= 4
value = 935
ctrl = 0


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


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

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

[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 = F2
ontop = 1
pos = 10,0
ownpal = 1


[State 932]
type = TargetLifeAdd
trigger1 = Time = 0
value = -100

[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
velset = 0,0
ctrl = 0
sprpriority = 2

[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 = 935
;poweradd = 60
juggle  = 0
velset = 0,0
ctrl = 0
sprpriority = 0

[State 935]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 41;70
elem = 4
persistent = 0

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


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


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


;---------------------------------------------------------------------------
;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 = -9,-9
poweradd = 60



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



[State 943] ;Gravity
type = Turn
trigger1 = Time = 0


[State 943] ;Gravity
type = VelSet
trigger1 = Time = 0
x = -9
y = -9

[State 943] ;Gravity
type = VelAdd
trigger1 = 1
y = 0.4

[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 = -4,10
poweradd = 60


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

[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 = -13,9
poweradd = 60



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


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

[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
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
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
velset = 0,0
ctrl = 0
sprpriority = 0

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

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

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

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

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

[State 960]
type = TargetState
trigger1 = AnimElem = 4, >= 3
value = 975

[State 960]
type = ChangeState
trigger1 = AnimElem = 4, >= 3
value = 965

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


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

[Statedef 965]
type    = A
movetype= I
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
sprpriority = 0


[State 965]
type = Turn
trigger1 = AnimElem = 5

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

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

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


[State 965]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
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 = 970

[State 970]
type = SprPriority
trigger1 = AnimElem = 3
value = 1

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


[State 970]
type = DestroySelf
trigger1 = ishelper


;---------------------------------------------------------------------------
;Thrown 
[Statedef 975]
type    = A
movetype= H
physics = N
poweradd = 60


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

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

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

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



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

[State 1320]
type = VelAdd
trigger1 = anim = 70; && !var(54)
y = 0.4


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

;---------------------------------------------------------------------------
;Flight
[Statedef 1330]
type    = A
movetype= I
physics = N
juggle  = 3
poweradd= 20
ctrl = 0
velset = 0,-4
anim = 1330
sprpriority = 2


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


[State 1330]
type = VarSet
trigger1 = Time = 0
var(54) = 1

[State 1330]
type = ChangeState
trigger1 = AnimTime = 0 && var(54) >= 1
value = 1335
ctrl = 0


;---------------------------------------------------------------------------
;Flight Cancel
[Statedef 1331]
type    = A
movetype= I
physics = N
juggle  = 3
poweradd= 20
ctrl = 0
velset = 0,0
;anim = 70
sprpriority = 2


[State 1331]
type = ChangeAnim
trigger1 = Time = 0
value = 70



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


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



[State 1331]
type = CtrlSet
trigger1 = Time = 1
value = 1


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


;---------------------------------------------------------------------------
;Flight End
[Statedef 1332]
type    = A
movetype= I
physics = A
juggle  = 3
;poweradd= 40
ctrl = 1
velset = 0,0
;anim = 1332
sprpriority = 2


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

[State 1332]
type = ChangeAnim
trigger1 = Time = 0
value = 70

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


;---------------------------------------------------------------------------
;Flight after S Jump
[Statedef 1333]
type    = S
physics = S
anim = 40
ctrl = 0
sprpriority = 1

[State 1333]
type = PlaySnd
trigger1 = Time = 1
value = 7710,0
channel = 1

[State 1333]
type = Explod
trigger1 = Time = 1
anim = 7055
ownpal = 1

[State 1333]
type = Explod
trigger1 = Time = 1
anim = 7055
facing = -1
ownpal = 1

[State 1333]
type = Explod
trigger1 = Time = 1
anim = 7022
sprpriority = 4
ownpal = 1

[State 1333, 1]
type = VarSet
trigger1 = Time = 0
sysvar(1) = 0

[State 1333, 2]
type = VarSet
trigger1 = command = "holdfwd"
sysvar(1) = 1

[State 1333, 3]
type = VarSet
trigger1 = command = "holdback"
sysvar(1) = -1

[State 1333, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 1334
ctrl = 0


;---------------------------------------------------------------------------
; Super Jump Up
[Statedef 1334]
type    = A
physics = N

[State 1334, 4]
type = VelSet
trigger1 = Time = 0
y = -15;-13

[State 1334, 4]
type = VelAdd
trigger1 = 1
y = 0.35;0.4



[State 1334]
type = veladd
triggerall = vel x <= 4
trigger1 = var(59)
trigger1 = p2bodydist x >= 0
persistent = 4
x = .9


[State 1334]
type = veladd
triggerall = vel x >= -4
trigger1 = var(59) 
trigger1 = p2bodydist x <= 0
persistent = 4
x = -.9

[State 1334]
type = Explod
trigger1 = Time%4 = 0
trigger1 = Time >= 4
trigger1 = Vel Y < 0
anim = 7056
pos = 0,0
random = 50,0
ontop = 1

[State 1334]
type = Explod
trigger1 = Time%2 = 0
trigger1 = Time >= 12
trigger1 = Vel Y < 0
anim = 7057+random%3
pos = 0,0
random = 60,0
ontop = 1


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

[State 1334, 3]
type = ChangeAnim
trigger1 = Vel y > -4
trigger1 = SelfAnimExist(anim + 3)
persistent = 0
value = Anim + 3

[State 1334]
type = turn
trigger1 = p2dist x < -5


[State 1334]
type = ChangeState
trigger1 = Vel Y > -1
value = 1330

;---------------------------------------------------------------------------
; Flight
[Statedef 1335]
type    = A
physics = N
anim = 1331
velset = 0,0
movetype= I
sprpriority = 2
ctrl = 1




[State 1335]
type = Turn
trigger1 = FrontEdgeDist < 15
trigger2 = enemy(0),facing = facing
trigger2 = Time%4 = 0


[State 1335]
type = PosAdd
trigger1 = Pos Y > -10
y = -4

[State 1335]
type = VarSet
trigger1 = 1
sysvar(1) = 0


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

[State 1335]
type = null;ChangeAnim
trigger1 = Anim = [41,43]
persistent = 0
value = Anim + 3

[State 1335]
type = VarSet
trigger1 = p2bodydist x != 0
var(1) = ifelse((p2bodydist y/p2bodydist x = [0.4,0.8]),1,0)


[State 1335]
type = ChangeState
trigger1 = var(59) 
trigger1 = !var(1)
trigger1 = p2bodydist x > 200
value = 1340


[State 1335]
type = ChangeState
trigger1 = var(59) 
trigger1 = !var(1)
trigger1 = p2bodydist x < 70
value = ifelse(BackEdgeDist > 70,1345,1340)

[State 1335]
type = ChangeState
trigger1 = var(59) 
trigger1 = !var(1)
trigger1 = p2bodydist y < 170;240
value = 1342


[State 1335]
type = ChangeState
trigger1 = var(59) 
trigger1 = !var(1)
trigger1 = p2bodydist y > 240;480
value = 1344


[State 1335]
type = VarSet
trigger1 = command = "holdfwd"
trigger1 = command != "holdup"
trigger1 = command != "holddown"
trigger2 = var(59) 
trigger2 = !var(1)
trigger2 = p2bodydist x > 200
sysvar(1) = 1


[State 1335]
type = VarSet
trigger1 = command = "holdback"
trigger1 = command != "holdup"
trigger1 = command != "holddown"
trigger2 = var(59) 
trigger2 = !var(1)
trigger2 = p2bodydist x < 70
sysvar(1) = -1


[State 1335, 3]
type = VarSet
trigger1 = command = "holdfwd"
trigger1 = command = "holdup"
sysvar(1) = 2


[State 1335, 3]
type = VarSet
trigger1 = command = "holdback"
trigger1 = command = "holdup"
sysvar(1) = -2



[State 1335, 3]
type = VarSet
trigger1 = command != "holdfwd"
trigger1 = command != "holdback"
trigger1 = command = "holdup"
trigger2 = var(59)
trigger2 = !var(1)
trigger2 = p2bodydist y < 170
sysvar(1) = 3

[State 1335, 3]
type = VarSet
trigger1 = command = "holddown"
trigger1 = command != "holdfwd"
trigger1 = command != "holdback"
trigger2 = var(59)
trigger2 = !var(1)
trigger2 = p2bodydist y > 240
sysvar(1) = -3



[State 1335, 3]
type = VarSet
trigger1 = command = "holdfwd"
trigger1 = command = "holddown"
sysvar(1) = 4

[State 1335, 3]
type = VarSet
trigger1 = command = "holddown"
trigger1 = command = "holdback"
sysvar(1) = -4

[State 1335]
type = VarSet
trigger1 = command = "x" && command = "y"
var(1) = 4

[State 1335]
type = ChangeAnim
triggerall = anim != 1340
trigger1 = sysvar(1) = 1
value = 1340

[State 1335]
type = ChangeAnim
triggerall = anim != 1341
trigger1 = sysvar(1) = -1
value = 1341


[State 1335]
type = ChangeAnim
triggerall = anim != 1340
trigger1 = sysvar(1) = 2
value = 1340

[State 1335]
type = ChangeAnim
triggerall = anim != 1341
trigger1 = sysvar(1) = -2
value = 1341


[State 1335]
type = ChangeAnim
triggerall = anim != 1342
trigger1 = sysvar(1) = 3
value = 1342


[State 1335]
type = ChangeAnim
triggerall = anim != 1342
trigger1 = sysvar(1) = -3
value = 1342


[State 1335]
type = ChangeAnim
triggerall = anim != 1340
trigger1 = sysvar(1) = 4
value = 1340

[State 1335]
type = ChangeAnim
triggerall = anim != 1341
trigger1 = sysvar(1) = -4
value = 1341


[State 1335]
type = VelSet
trigger1 = sysvar(1) = 0
y = 0
x = 0

[State 1335]
type = VelSet
trigger1 = sysvar(1) = 1
x = 4
y = 0

[State 1335]
type = VelSet
trigger1 = sysvar(1) = -1
x = -4
y = 0

[State 1335]
type = VelSet
trigger1 = sysvar(1) = 2
x = 4
y = -5+5*(ScreenPos Y < 120)



[State 1335]
type = VelSet
trigger1 = sysvar(1) = -2
x = -4
y = -5+5*(ScreenPos Y < 120)




[State 1335]
type = VelSet
trigger1 = sysvar(1) = 3
y = -5+5*(ScreenPos Y < 120)
x = 0


[State 1335]
type = VelSet
trigger1 = sysvar(1) = -3
y = 5-5*(Pos Y > -20)
x = 0


[State 1335]
type = VelSet
trigger1 = sysvar(1) = 4
y = 5-5*(Pos Y > -20)
x = 4


[State 1335]
type = VelSet
trigger1 = sysvar(1) = -4
y = 5-5*(Pos Y > -20)
x = -4

[State 1335]
type = ChangeAnim
triggerall = anim != 1331
trigger1 = sysvar(1) = 0
value = 1331

[State 1335]
type = ChangeState
trigger1 = var(54) = 0
value = 1331
ctrl = 0




;----------------------------------------------------------
; Air Dash Forward
[Statedef 1340]
type    = A
physics = N
anim = 1340
sprpriority = 0
velset = 0,0
ctrl = 1



[State 1000, gastateia]
type = VarAdd
triggerall = var(40) > 0
trigger1 = animelem = 1
v = 40
value = -2


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



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

[State 1340]
type = PlaySnd
trigger1 = AnimElem = 6
value = 0,2


[State 1340]
type = PosAdd
trigger1 = AnimElem = 2
x = -1
y = -7


[State 1340]
type = PosAdd
trigger1 = AnimElem = 3
x = -6
y = -6

[State 1340]
type = PosAdd
trigger1 = AnimElem = 4
x = -3
y = -3


[State 1340]
type = PosAdd
trigger1 = AnimElem = 5
x = -3
y = -3

[State 1340]
type = PosAdd
trigger1 = AnimElem = 6
x = -3
y = -3

[State 1340]
type = PosAdd
trigger1 = AnimElem = 7
x = 1
y = 1

[State 1340]
type = PosAdd
trigger1 = AnimElem = 8
x = 1
y = 1

[State 1340]
type = PosAdd
trigger1 = AnimElem = 9
x = 1
y = 1

[State 1340]
type = PosAdd
trigger1 = AnimElem = 10
x = 2
y = 2

[State 1340]
type = PosAdd
trigger1 = AnimElem = 11
x = 1
y = 1

[State 1340]
type = PosAdd
trigger1 = AnimElem = 12
x = 2
y = 2

[State 1340]
type = PosAdd
trigger1 = AnimElem = 13
x = 7
y = 7

[State 1340]
type = PosAdd
trigger1 = AnimElem = 14
x = 2
y = 4

[State 1340]
type = PosAdd
trigger1 = AnimElem = 15
x = 5
y = 5


[State 1340]
type = PosAdd
trigger1 = AnimElem = 16
x = 4
y = 4

[State 1340]
type = PosAdd
trigger1 = AnimElem = 17
x = 5
y = 5

[State 1340]
type = PosAdd
trigger1 = AnimElem = 18
x = 6
y = 4


[State 1340]
type = PosAdd
trigger1 = AnimElem = 19
x = 19
y = 5

[State 1340]
type = PosAdd
trigger1 = AnimElem = 20
x = 24
y = 0

[State 1340]
type = PosAdd
trigger1 = AnimElem = 21
x = 12
y = 0

[State 1340]
type = PosAdd
trigger1 = AnimElem = 22
x = 12
y = 0

[State 1340]
type = PosAdd
trigger1 = AnimElem = 23
x = 14
y = 0

[State 1340]
type = PosAdd
trigger1 = AnimElem = 24
x = 12
y = 0

[State 1340]
type = PosAdd
trigger1 = AnimElem = 25
x = 32
y = 0

[State 1340]
type = PosAdd
trigger1 = AnimElem = 26
x = 13
y = -3

[State 1340]
type = PosAdd
trigger1 = AnimElem = 27
x = 11
y = -5

[State 1340]
type = PosAdd
trigger1 = AnimElem = 28
x = 10
y = -10

[State 1340]
type = PosAdd
trigger1 = AnimElem = 29
x = 8
y = -10

[State 1340]
type = PosAdd
trigger1 = AnimElem = 30
x = 24
y = 3

;[State 1340] ;Prevent from turning
;type = AssertSpecial
;trigger1 = 1
;flag = NoAutoTurn

;[State 1340]
;type = CtrlSet
;trigger1 = Time = 4
;value = 1


[State 1340]
type = ChangeState
trigger1 = AnimTime = 0
value = 511
persistent = 0

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


[Statedef 1350]
type    = A
physics = A
anim = 1350
sprpriority = 0
velset = 0, 0

[State 0, VelSet]
type = VelSet
trigger1 = timemod = 4,2 && (animelem = 1 || animelem = 2 || animelem = 3)
y = -0.2

[State 1000, gastateia]
type = VarAdd
triggerall = var(40) > 0
trigger1 = animelem = 3
v = 40
value = -2

[State 1340]
type = PlaySnd
trigger1 = animelem = 3
value = 1540,0

[State 1340]
type = PlaySnd
trigger1 = animelem = 4
value = 7710,0

[State 0, VelSet]
type = VelSet
trigger1 =  animelem = 4
x = -9
y = -8

[State 100, 1] ;Prevent run from canceling into walk
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 100, 2] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn


[State 0, Explod]
type = Explod
trigger1 = animelem = 3
anim = 1351
ID = 1351
pos = -65,-98
postype = p1
facing = 1
vfacing = 1
bindtime = -1
removetime = 11
scale = 1,1
sprpriority = -1
removeongethit = 0

[State 0, Explod]
type = Explod
trigger1 = animelem = 4
anim = 1352
ID = 1352
pos = -55,-90
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = 12
scale = 1,1
sprpriority = -1
removeongethit = 0



[State 100, 10]
type = ChangeState
trigger1 = AnimTime = 0
value = 50

[Statedef 1360]
type    = A
physics = A
anim = 1360
sprpriority = 0
velset = 0, 0

[State 0, VelSet]
type = VelSet
triggerall = prevstateno !=3604
trigger1 = timemod = 4,2 && (animelem = 1 || animelem = 2)
y = -0.2

[State 0, VelSet]
type = VelSet
triggerall = prevstateno =3604
trigger1 = timemod = 4,2 && (animelem = 1 || animelem = 2)
y = -0.3

[State 1000, gastateia]
type = VarAdd
triggerall = var(40) > 0 && prevstateno !=3604
trigger1 = animelem = 2
v = 40
value = -2

[State 1340]
type = PlaySnd
trigger1 = animelem = 2
value = 1540,0

[State 1340]
type = PlaySnd
trigger1 = animelem = 3
value = 7710,0

[State 0, VelSet]
type = VelSet
triggerall = prevstateno !=3604
trigger1 =  animelem = 3
y = ifelse(pos y > -80,-16,-14)

[State 0, VelSet]
type = VelSet
triggerall = prevstateno =3604
trigger1 =  animelem = 3
y = -12

[State 100, 1] ;Prevent run from canceling into walk
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 100, 2] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn


[State 0, Explod]
type = Explod
trigger1 = animelem = 2
anim = 1361
ID = 1361
pos = 10,-150
postype = p1
facing = 1
vfacing = 1
bindtime = -1
removetime = 9
scale = 1,1
sprpriority = -1
removeongethit = 0

[State 0, Explod]
type = Explod
trigger1 = animelem = 3
anim = 1362
ID = 1362
pos = 10,-150
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = 12
scale = 1,1
sprpriority = -1
removeongethit = 0



[State 100, 10]
type = ChangeState
trigger1 = AnimTime = 0
value = 50

;---------------------------------------------------------------------------
;Warp Top Left
[Statedef 1400]
type    = U
movetype= I
physics = N
juggle  = 3
poweradd= 10
ctrl = 0
velset = 0,0
anim = 1400
sprpriority = 0


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


[State 1400]
type = PosSet
trigger1 = AnimElem = 12, = 6
y = -100

[State 1400]
type = PosSet
trigger1 = Pos X != -100
trigger1 = AnimElem = 12, >= 7
x = -100

[State 1400]
type = Turn
trigger1 = AnimElem = 12, = 7
trigger1 = p2bodydist x < -5

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

[State 1400]
type = PlaySnd
trigger1 = AnimElem = 7
value = 1400,1

[State 1400]
type = PlaySnd
trigger1 = AnimElem = 13
value = 1400,2


[State 1400]
type = Helper
trigger1 = AnimElem = 12, = 7
stateno = 21400
ownpal = 1

[State 1405]
type = Helper
trigger1 = AnimElem = 12, = 7
stateno = 21410
ownpal = 1


[State 1400]
type = Helper
trigger1 = AnimElem = 12, = 7
stateno = 21415
ownpal = 1

[State 1400]
type = Helper
trigger1 = AnimElem = 12, = 7
stateno = 21425
ownpal = 1

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

[State 1400]
type = VelAdd
trigger1 = Anim = 70
y = 0.4


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

[State 1400]
type = CtrlSet
trigger1 = Anim = 70
value = 1


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


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

[State 1400]
type = Helper
trigger1 = Time = 0
stateno = 21401

[State 1400]
type = ChangeState
trigger1 = var(4)
value = var(4)
ctrl = 0




;---------------------------------------------------------------------------
;Warp Top Middle
[Statedef 1405]
type    = U
movetype= I
physics = N
juggle  = 3
poweradd= 10
ctrl = 0
velset = 0,0
anim = 1400
sprpriority = 0


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


[State 1405]
type = PosSet
trigger1 = AnimElem = 12, = 6
y = -100

[State 1405]
type = PosSet
trigger1 = Pos X != -100
trigger1 = AnimElem = 12, >= 7
x = -100

[State 1405]
type = Turn
trigger1 = AnimElem = 12, = 7
trigger1 = p2bodydist x < -5

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

[State 1405]
type = PlaySnd
trigger1 = AnimElem = 7
value = 1400,1

[State 1405]
type = PlaySnd
trigger1 = AnimElem = 13
value = 1400,2


[State 1405]
type = Helper
trigger1 = AnimElem = 12, = 7
stateno = 21400
ownpal = 1


[State 1405]
type = null;Helper
trigger1 = AnimElem = 9
stateno = 21405
ownpal = 1


[State 1405]
type = Helper
trigger1 = AnimElem = 12, = 7
stateno = 21410
ownpal = 1


[State 1405]
type = Helper
trigger1 = AnimElem = 12, = 7
stateno = 21415
ownpal = 1

[State 1405]
type = Helper
trigger1 = AnimElem = 12, = 7
stateno = 21425
ownpal = 1

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

[State 1405]
type = VelAdd
trigger1 = Anim = 70
y = 0.4


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

[State 1405]
type = CtrlSet
trigger1 = Anim = 70
value = 1


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


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

[State 1405]
type = Helper
trigger1 = Time = 0
stateno = 21401

[State 1405]
type = ChangeState
trigger1 = var(4)
value = var(4)
ctrl = 0





;---------------------------------------------------------------------------
;Warp Top Right
[Statedef 1410]
type    = U
movetype= I
physics = N
juggle  = 3
poweradd= 10
ctrl = 0
velset = 0,0
anim = 1400
sprpriority = 0


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


[State 1410]
type = PosSet
trigger1 = AnimElem = 12, = 6
y = -100

[State 1410]
type = PosSet
trigger1 = Pos X != 100
trigger1 = AnimElem = 12, >= 7
x = 100

[State 1410]
type = Turn
trigger1 = AnimElem = 12, = 7
trigger1 = p2bodydist x < -5

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

[State 1410]
type = PlaySnd
trigger1 = AnimElem = 7
value = 1400,1

[State 1410]
type = PlaySnd
trigger1 = AnimElem = 13
value = 1400,2


[State 1410]
type = Helper
trigger1 = AnimElem = 12, = 7
stateno = 21400
ownpal = 1


[State 1410]
type = null;Helper
trigger1 = AnimElem = 9
stateno = 21405
ownpal = 1


[State 1405]
type = Helper
trigger1 = AnimElem = 12, = 7
stateno = 21410
ownpal = 1


[State 1410]
type = Helper
trigger1 = AnimElem = 12, = 7
stateno = 21415
ownpal = 1


[State 1410]
type = null;Helper
trigger1 = AnimElem = 9
stateno = 21420
ownpal = 1


[State 1410]
type = Helper
trigger1 = AnimElem = 12, = 7
stateno = 21425
ownpal = 1





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

[State 1410]
type = VelAdd
trigger1 = Anim = 70
y = 0.4


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

[State 1410]
type = CtrlSet
trigger1 = Anim = 70
value = 1


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



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

[State 1410]
type = Helper
trigger1 = Time = 0
stateno = 21401

[State 1410]
type = ChangeState
trigger1 = var(4)
value = var(4)
ctrl = 0





;---------------------------------------------------------------------------
;Warp Bottom Left
[Statedef 1415]
type    = U
movetype= I
physics = N
juggle  = 3
poweradd= 10
ctrl = 0
velset = 0,0
anim = 1400
sprpriority = 0


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


[State 1415]
type = PosSet
trigger1 = AnimElem = 12, = 6
y = 0

[State 1415]
type = PosSet
trigger1 = Pos X != -100
trigger1 = AnimElem = 12, >= 7
x = -100

[State 1415]
type = Turn
trigger1 = AnimElem = 12, = 7
trigger1 = p2bodydist x < -5

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

[State 1415]
type = PlaySnd
trigger1 = AnimElem = 7
value = 1400,1

[State 1415]
type = PlaySnd
trigger1 = AnimElem = 13
value = 1400,2


[State 1415]
type = Helper
trigger1 = AnimElem = 12, = 7
stateno = 21400
ownpal = 1


[State 1415]
type = null;Helper
trigger1 = AnimElem = 9
stateno = 21405
ownpal = 1


[State 1405]
type = Helper
trigger1 = AnimElem = 12, = 7
stateno = 21410
ownpal = 1


[State 1415]
type = Helper
trigger1 = AnimElem = 12, = 7
stateno = 21415
ownpal = 1


[State 1415]
type = null;Helper
trigger1 = AnimElem = 9
stateno = 21420
ownpal = 1


[State 1415]
type = Helper
trigger1 = AnimElem = 12, = 7
stateno = 21425
ownpal = 1





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

[State 1415]
type = VelAdd
trigger1 = Anim = 70
y = 0.4


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

[State 1415]
type = CtrlSet
trigger1 = Anim = 70
value = 1


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



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

[State 1415]
type = Helper
trigger1 = Time = 0
stateno = 21401


[State 1415]
type = ChangeState
trigger1 = var(4) = [1443,1444]
value = 1442
ctrl = 0


[State 1415]
type = ChangeState
trigger1 = var(4) = 1445
value = 1446
ctrl = 0

[State 1415]
type = ChangeState
trigger1 = var(4)
value = var(4)
ctrl = 0





;---------------------------------------------------------------------------
;Warp Bottom Middle
[Statedef 1420]
type    = U
movetype= I
physics = N
juggle  = 3
poweradd= 10
ctrl = 0
velset = 0,0
anim = 1400
sprpriority = 0


[State 1420]
type = PosSet
trigger1 = AnimElem = 12, = 6
y = 0

[State 1420]
type = PosSet
trigger1 = Pos X != -100
trigger1 = AnimElem = 12, >= 7
x = -100

[State 1420]
type = Turn
trigger1 = AnimElem = 12, = 7
trigger1 = p2bodydist x < -5

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

[State 1420]
type = PlaySnd
trigger1 = AnimElem = 7
value = 1400,1

[State 1420]
type = PlaySnd
trigger1 = AnimElem = 13
value = 1400,2


[State 1420]
type = Helper
trigger1 = AnimElem = 12, = 7
stateno = 21400
ownpal = 1


[State 1420]
type = null;Helper
trigger1 = AnimElem = 9
stateno = 21405
ownpal = 1


[State 1420]
type = Helper
trigger1 = AnimElem = 12, = 7
stateno = 21410
ownpal = 1


[State 1420]
type = Helper
trigger1 = AnimElem = 12, = 7
stateno = 21415
ownpal = 1


[State 1420]
type = null;Helper
trigger1 = AnimElem = 9
stateno = 21420
ownpal = 1


[State 1420]
type = Helper
trigger1 = AnimElem = 12, = 7
stateno = 21425
ownpal = 1





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

[State 1420]
type = VelAdd
trigger1 = Anim = 70
y = 0.4


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

[State 1420]
type = CtrlSet
trigger1 = Anim = 70
value = 1


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



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

[State 1420]
type = Helper
trigger1 = Time = 0
stateno = 21401


[State 1420]
type = ChangeState
trigger1 = var(4) = [1443,1444]
value = 1442
ctrl = 0


[State 1420]
type = ChangeState
trigger1 = var(4) = 1445
value = 1446
ctrl = 0

[State 1420]
type = ChangeState
trigger1 = var(4)
value = var(4)
ctrl = 0




;---------------------------------------------------------------------------
;Warp Bottom Right
[Statedef 1425]
type    = U
movetype= I
physics = N
juggle  = 3
poweradd= 10
ctrl = 0
velset = 0,0
anim = 1400
sprpriority = 0


[State 1425]
type = PosSet
trigger1 = AnimElem = 12, = 6
y = 0

[State 1425]
type = PosSet
trigger1 = Pos X != 100
trigger1 = AnimElem = 12, >= 7
x = 100

[State 1425]
type = Turn
trigger1 = AnimElem = 12, = 7
trigger1 = p2bodydist x < -5

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

[State 1425]
type = PlaySnd
trigger1 = AnimElem = 7
value = 1400,1

[State 1425]
type = PlaySnd
trigger1 = AnimElem = 13
value = 1400,2


[State 1425]
type = Helper
trigger1 = AnimElem = 12, = 7
stateno = 21400
ownpal = 1


[State 1425]
type = null;Helper
trigger1 = AnimElem = 9
stateno = 21405
ownpal = 1


[State 1405]
type = Helper
trigger1 = AnimElem = 12, = 7
stateno = 21410
ownpal = 1


[State 1425]
type = Helper
trigger1 = AnimElem = 12, = 7
stateno = 21415
ownpal = 1


[State 1425]
type = null;Helper
trigger1 = AnimElem = 9
stateno = 21420
ownpal = 1


[State 1425]
type = Helper
trigger1 = AnimElem = 12, = 7
stateno = 21425
ownpal = 1





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

[State 1425]
type = VelAdd
trigger1 = Anim = 70
y = 0.4


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

[State 1425]
type = CtrlSet
trigger1 = Anim = 70
value = 1


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



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

[State 1425]
type = Helper
trigger1 = Time = 0
stateno = 21401



[State 1425]
type = ChangeState
trigger1 = var(4) = [1443,1444]
value = 1442
ctrl = 0


[State 1425]
type = ChangeState
trigger1 = var(4) = 1445
value = 1446
ctrl = 0


[State 1425]
type = ChangeState
trigger1 = var(4)
value = var(4)
ctrl = 0




;---------------------------------------------------------------------------
;esquiva
[Statedef 900]
type    = S
movetype= A
physics = N
juggle  = 3
ctrl = 0
velset = 0,0
anim = 900
sprpriority = 0

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


[state 1101, twister]
type = afterimage
trigger1 = time = 0
time = 10
length = 12
palbright = 30,30,30
palcontrast = 120,120,220
;paladd = 200, 249, 39
paladd = 10,10,25
palmul = .65,.65,.75
framegap = 5
trans = add   ;"none","add1","sub"


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

[Statedef 901]
type    = A
movetype= A
physics = A
juggle  = 3
ctrl = 0
anim = 901
sprpriority = 0

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

[State 0, VelSet]
type = VelSet
trigger1 = timemod = 4,2 ;&& (animelem = 1 || animelem = 2 || animelem = 3)
y = -0.1

[state 1101, twister]
type = afterimage
trigger1 = time = 0
time = 26
length = 12
palbright = 30,30,30
palcontrast = 120,120,220
;paladd = 200, 249, 39
paladd = 10,10,25
palmul = .65,.65,.75
framegap = 5
trans = add     ;"none","add1","sub"

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


;---------------------------------------------------------------------------
;Web Ball
;fail state stand
[Statedef 178]
type    = S
movetype= A
physics = N
juggle  = 3
ctrl = 0
velset = 0,0
anim = 172
sprpriority = 0

[State 172, bgpalfx]
type = bgpalfx
trigger1 = animelem = 6
invertall = 1
add = 150,110,10
sinadd = -50,-50,-50,80
color = 0
time = 10

[State 172, PlaySnd]
type = PlaySnd
trigger1 = animelem = 6
value = 121,25



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

[Statedef 179]
type    = U
physics = A
juggle  = 3
ctrl = 0
velset = 0,0
anim = 173
sprpriority = 0
facep2 = 1

[State 173, bgpalfx]
type = bgpalfx
trigger1 = animelem = 4
invertall = 1
add = 150,110,10
sinadd = -50,-50,-50,80
color = 0
time = 10

[State 173, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = 121,25



;[State 1470]
;type = ChangeState
;trigger1 = AnimTime = 0
;v;alue = 0
;ctrl = 1



[Statedef 1000]
type    = S
movetype= A
physics = N
juggle  = 3
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1000
sprpriority = 0
facep2 = 1



[State 1470]
type = ChangeState
trigger1 = AnimTime = 0
value = 1001



[Statedef 1001]
type    = S
movetype= A
physics = N
juggle  = 3
ctrl = 0
velset = 0,0
anim = 1001
sprpriority = 0
facep2 = 1
poweradd= 5



[State 1470]
type = PlaySnd
trigger1 = AnimElem = 5
value = 1450,0


[State 1470]
type = PlaySnd
trigger1 = AnimElem = 8
value = 1450,1

[State 0, PlaySnd]
type = PlaySnd
trigger1 =  animelem = 1 || animelem = 3
value = 1450,1


[State 1000,gastateia]
type = VarAdd
triggerall = var(40) > 0
trigger1 = animelem = 1 || animelem = 3
v = 40
value = -1

[State 0, Projectile]
type = Projectile
trigger1 =  animelem = 1 || animelem = 3
ProjID = 1003
projanim = 1003
projhitanim = 1004
projremanim =  1004
projcancelanim = 1004
projscale = 1,1
projremove = 1
projremovetime = -1
velocity = (9 - random/500),0
velmul = 1
projhits = 1
projsprpriority = 3
offset = ifelse((animelem = 1), 5,8),ifelse((animelem = 1), -40,-45)
postype = p1         ;p2,front,back,left,right
attr = S,SP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = light          ;light,medium,hard,back,up,diagup
air.animtype = light
;fall.animtype = Back
priority = 4,Hit   ;Hit,Miss,Dodge
damage = 15,1
pausetime = 0,0
;guard.pause,0
sparkno = -1
guard.sparkno = -1
hitsound = 1450,3
guardsound = 1450,3
ground.type = High      ;Low,Trip,None
ground.hit = 10
air.hittime = 10
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -1,0
air.velocity = -2,0
sprpriority = 1

[State 1470]
type = ChangeState
trigger1 =  var(40) = 0
value = 178

[State 1000, contador]
type = VarAdd
trigger1 = animelem = 3
v = 44
value = -2

[State 1470]
type = ChangeState
trigger1 = AnimTime = 0 && command != "holdx" && command != "holdy" && command != "holdz"
trigger2 =  var(40) <= 0
trigger3 =  var(44) <= 0
trigger4 = AnimTime = 0 && var(59) && random < 600;saida da IA do web bullet
value = 1002




[State 1470]
type = ChangeState
trigger1 = AnimTime = 0 && (command = "holdx" ||command = "holdy" || command = "holdz" )
value = 1001






[Statedef 1002]
type    = S
movetype= A
physics = N
juggle  = 3
ctrl = 0
velset = 0,0
anim = 1002
sprpriority = 0
facep2 = 1

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






[Statedef 1010]
type    = A
physics = A
juggle  = 3
ctrl = 0
velset = 0,0
anim = 1008
sprpriority = 0
facep2 = 1
poweradd= 60

[State 0, VelSet]
type = VelSet
trigger1 = timemod = 4,2 && (animelem = 1 || animelem = 2 || animelem = 3)
y = -0.3

[State 1000,gastateia]
type = VarAdd
triggerall = var(40) > 0
trigger1 = animelem = 6
v = 40
value = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 =  animelem = 6
value = 1450,1

[State 0, Projectile]
type = Projectile
trigger1 =  animelem = 6
ProjID = 1005
projanim = 1005
projhitanim = 1007
projremanim =  1006
projcancelanim = 1006
projscale = 1,1
projremove = 1
projremovetime = -1
velocity = 10,10
velmul = 1
projhits = 1
projsprpriority = 3
offset = 5, -40
postype = p1         ;p2,front,back,left,right
attr = S,SP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAFD
guardflag = L        ;HLA
animtype = light          ;light,medium,hard,back,up,diagup
air.animtype = light
;fall.animtype = Back
priority = 4,Hit   ;Hit,Miss,Dodge
damage = 15,1
pausetime = 0,0
;guard.pause,0
sparkno = -1
guard.sparkno = -1
hitsound = 1450,3
guardsound = 1450,3
ground.type = High      ;Low,Trip,None
ground.hit = 10
air.hittime = 10
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -1,0
air.velocity = -2,0
sprpriority = 1


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

[Statedef 1100]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 90
ctrl = 0
velset = 0,0
anim = 1100
sprpriority = 3
facep2 = 1

[State 100] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn


[State 0, Explod]
type = Explod
trigger1 = animelem = 3
anim = 1101
ID = 1101
pos = 58,-8
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = 17
scale = 1,1
sprpriority = -2
removeongethit = 1

[State 0, Explod]
type = Explod
trigger1 = animelem = 6
anim = 1102
ID = 1102
pos = 25,-17
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = 5
scale = 1,1
sprpriority = -2
removeongethit = 1


[State 0, Explod]
type = Explod
trigger1 = animelem = 7
anim = 1102
ID = 1102
pos = 0,-10
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = 5
scale = 1,1
sprpriority = -2
removeongethit = 1


[State 0, Explod]
type = Explod
trigger1 = animelem = 8
anim = 1102
ID = 11082
pos = -5,-8
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = -1
scale = 1,1
sprpriority = -2
removeongethit = 1


[State 1000, gastateia]
type = VarAdd
triggerall = var(40) > 0
trigger1 = animelem = 3
v = 40
value = -5

[State 0, PlaySnd]
type = PlaySnd
trigger1 =  animelem = 3
value = 1540,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 =  animelem = 6
value = 121,1

[State 0, PlaySnd]
type = PlaySnd
trigger1 =  time = 100
value = 121,22



[State 1000, damageHoldSling]
type = VarAdd
trigger1 = time = 60
v = 41
value = 50

[State 1000, damageHoldSling]
type = VarAdd
trigger1 = time = 100
v = 41
value = 50

[State 1000, damageHoldSling]
type = VarAdd
trigger1 = time = 150
v = 41
value = 50




[State 220]
type = ChangeState
triggerall = AnimTime = 0
trigger1 = command != "holdc" && command != "holda" && command != "holdb"
trigger2 = var(59) && time > 100
value = 1106



[Statedef 1106]
type    = A
movetype= A
physics = N
juggle  = 3
ctrl = 0
velset = 16,-6
anim = 1106
sprpriority = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 =  time = 0
value = 100,6

[State 100] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn


[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =  1
id =   11081

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =  1
id =   11082
;ignorehitpause =
;persistent =



[State 0, VelSet]
type = VelSet
trigger1 =  animelem = 1
x = 15
y = -6
;ignorehitpause =
;persistent =
[State 0, VelSet]
type = VelSet
trigger1 =  animelem = 2
x = 20
y = -2

[State 0, VelSet]
type = VelSet
trigger1 =  animelem = 3
x = 15
y = -1

[State 220]
type = HitDef
trigger1 = time = 0
attr = S, NA
animtype  = Hard
damage    = 120 + var(41)
guardflag = MA
pausetime = 7,7
sparkno = 3
sparkxy = -10,-40
hitsound   = S1,2
guardsound = S4,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -10,-5
air.velocity = -10,-5
getpower = 50,25
fall = 1
air.fall = 1
p1stateno = 511


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


[Statedef 511]
type    = A
movetype= A
physics = A
juggle  = 10
ctrl = 0
anim = 1105
sprpriority = 2
velset = 6,-6

[State 501, 1]
type = PosAdd
trigger1 = AnimElem = 1
x = 6 *(ifelse(prevstateno = 720,-0.5,1))
y = -6

[State 501, 2]
type = VelSet
trigger1 = AnimElem = 2
x = 6 *(ifelse(prevstateno = 720,-0.5,1))
y = -6

[State 501, 4]
type = PosAdd
trigger1 = AnimElem = 3
x = 6 *(ifelse(prevstateno = 720,-0.5,1))
y = -6

[State 501, 3]
type = VelSet
trigger1 = AnimElem = 4
x = 6 *(ifelse(prevstateno = 720,-0.5,1))
y = -6

[State 511, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 50

[Statedef 1200]
type    = A
movetype= A
physics = A
juggle  = 1
anim = 1200
sprpriority = 0
velset = 0, 0
poweradd = 50

[State 0, VelSet]
type = VelSet
trigger1 = timemod = 4,2 && animelem != 11
y = -0.3

[State 1340]
type = PlaySnd
trigger1 = animelem = 3
value = 1540,0

[State 1000, gastateia]
type = VarAdd
triggerall = var(40) > 0
trigger1 = animelem = 3
v = 40
value = -2


[State 100, 1] ;Prevent run from canceling into walk
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 100, 2] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn




[State 210]
type = HitDef
attr = C, ST
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 10
animtype = Medium
priority  = 5, Hit
hitflag = MAFD
guardflag = L
pausetime = 0,0
sparkxy = -1
hitsound   = S1,1
guardsound = S4,0
sparkno = -1
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -1,-9
air.velocity = -1,-9
fall = 1
air.fall = 1
all.recover = 0
p1stateno = 1210
p2stateno = 1220

;os = -10,-100
[State 0, Projectile]
type = Projectile
trigger1 =  animelem = 11
ProjID = 1005
projanim = 1240
projhitanim = 1230
projremanim =  1006
projcancelanim = 1006
projscale = 1,1
projremove = 1
projremovetime = -1
velocity = 10,10
velmul = 1
projhits = 1
projsprpriority = 3
offset = 25,-90
postype = p1         ;p2,front,back,left,right
attr = S,SP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = light          ;light,medium,hard,back,up,diagup
air.animtype = light
;fall.animtype = Back
priority = 4,Hit   ;Hit,Miss,Dodge
damage = 15,1
pausetime = 0,0
;guard.pause,0
sparkno = -1
guard.sparkno = -1
hitsound = 0,0
guardsound = 0,0
ground.type = High      ;Low,Trip,None
ground.hit = 10
air.hittime = 10
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -1,0
air.velocity = -2,0
sprpriority = 1



[State 100, 10]
type = ChangeState
trigger1 = AnimTime = 0
value = 50

[Statedef 1210]
type    = A
movetype= A
physics = N
juggle  = 1
anim = 1210
sprpriority = 0
velset = 0, 0

[State 1340]
type = PlaySnd
trigger1 = time = 0
value = 7710,0

[State 0, Explod]
type = Explod
trigger1 =  time = 0
anim =  1230
ID = 1230
pos = -10,-100
postype = p1 ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 8
scale = 1,1
sprpriority = 4



[State 0, VelSet]
type = VelSet
trigger1 = time = 5
x = 10
y = 8



[State 1480]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, NA
animtype  = Hard
damage    = 80
guardflag = HA
pausetime = 5,7;0,17;7,10
sparkno = 2
sparkxy = -20,-70+floor(P2Dist Y)
hitsound   = S1,2
guardsound = S4,0
ground.type = High
air.type = Low
ground.slidetime = 15
ground.hittime  = 30
air.hittime = 35
ground.velocity = -9
air.velocity = -7,17
fall.recover =0
p1stateno = 511


[State 100, 10]
type = ChangeState
trigger1 = AnimTime = 0
value = 50

[Statedef 1220]
type    = A
movetype= H
physics = N
anim = 1220
sprpriority = 0
velset = 0, 0

[State 0, VelSet]
type = VelSet
trigger1 = time = 5
x = 2;5
y = 2;-5
;ignorehitpause =
;persistent =


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


[State 100, 10]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1
;------------- fraco

[Statedef 1201]
type    = A
movetype= A
physics = A
juggle  = 5
anim = 1201
sprpriority = 0
velset = 0, 0
poweradd = 50

[State 0, VelSet]
type = VelSet
trigger1 = timemod = 4,2 && animelem != 8 && animelem != 9 && animelem != 10
y = -0.3

[State 1340]
type = PlaySnd
trigger1 = animelem = 3
value = 1540,0

[State 1000, gastateia]
type = VarAdd
triggerall = var(40) > 0
trigger1 = animelem = 3
v = 40
value = -2


[State 100, 1] ;Prevent run from canceling into walk
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 100, 2] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn




[State 210]
type = HitDef
attr = C, ST
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 10
animtype = Medium
priority  = 5, Hit
hitflag = MAFD
guardflag = L
pausetime = 0,0
sparkxy = -1
hitsound   = S1,1
guardsound = S4,0
sparkno = -1
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -1,-9
air.velocity = -1,-9
fall = 1
air.fall = 1
all.recover = 0
p1stateno = 1211
p2stateno = 1221

;os = -10,-100
[State 0, Projectile]
type = Projectile
trigger1 =  animelem = 8
ProjID = 1005
projanim = 1241
projhitanim = 1231
projremanim =  1009
projcancelanim = 1009
projscale = 1,1
projremove = 1
projremovetime = -1
velocity = 0,10;10
velmul = 1
projhits = 1
projsprpriority = 3
offset = 15,-30
postype = p1         ;p2,front,back,left,right
attr = S,SP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = light          ;light,medium,hard,back,up,diagup
air.animtype = light
;fall.animtype = Back
priority = 4,Hit   ;Hit,Miss,Dodge
damage = 15,1
pausetime = 0,0
;guard.pause,0
sparkno = -1
guard.sparkno = -1
hitsound = 0,0
guardsound = 0,0
ground.type = High      ;Low,Trip,None
ground.hit = 10
air.hittime = 10
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -1,0
air.velocity = -2,0
sprpriority = 1


[State 100, 10]
type = ChangeState
trigger1 = AnimTime = 0
value = 50

[Statedef 1211]
type    = A
movetype= A
physics = N
juggle  = 1
anim = 1211
sprpriority = 0
velset = 0, 0

[State 1340]
type = PlaySnd
trigger1 = time = 0
value = 7710,0

[State 0, Explod]
type = Explod
trigger1 =  time = 0
anim =  1231
ID = 1231
pos = 15,-30
postype = p1 ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 8
scale = 1,1
sprpriority = 4



[State 0, VelSet]
type = VelSet
trigger1 = time = 5
;x = -10
y = 8



[State 1480]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, NA
animtype  = Hard
damage    = 80
guardflag = HA
pausetime = 5,7;0,17;7,10
sparkno = 2
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 = -9
air.velocity = -7,17
fall = (enemynear,statetype = A)
air.fall = 1
fall.recover =0
p1stateno = 511


[State 100, 10]
type = ChangeState
trigger1 = AnimTime = 0
value = 50

[Statedef 1221]
type    = A
movetype= H
physics = N
anim = 1221
sprpriority = 0
velset = 0, 0

[State 0, VelSet]
type = VelSet
trigger1 = time = 5
;x = 2;5
y = -2;-5
;ignorehitpause =
;persistent =


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


[State 100, 10]
type = ChangeState
trigger1 = time = 20
value = 50
ctrl = 1

;----forte
[Statedef 1202]
type    = A
movetype= A
physics = A
juggle  = 1
anim = 1202
sprpriority = 0
velset = 0, 0
poweradd = 50

[State 0, VelSet]
type = VelSet
trigger1 = timemod = 4,2 && animelem != 15
y = -0.3

[State 1340]
type = PlaySnd
trigger1 = animelem = 3
value = 1540,0

[State 1000, gastateia]
type = VarAdd
triggerall = var(40) > 0
trigger1 = animelem = 3
v = 40
value = -2


[State 100, 1] ;Prevent run from canceling into walk
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 100, 2] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn




[State 210]
type = HitDef
attr = C, ST
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 10
animtype = Medium
priority  = 5, Hit
hitflag = MAFD
guardflag = L
pausetime = 0,0
sparkxy = -1
hitsound   = S1,1
guardsound = S4,0
sparkno = -1
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -1,-9
air.velocity = -1,-9
fall = 1
air.fall = 1
all.recover = 0
p1stateno = 1212
p2stateno = 1222

;os = -10,-100
[State 0, Projectile]
type = Projectile
trigger1 =  animelem = 15
ProjID = 1005
projanim = 1242
projhitanim = 1232
projremanim =  1004
projcancelanim = 1004
projscale = 1,1
projremove = 1
projremovetime = -1
velocity = 10,0;10
velmul = 1
projhits = 1
projsprpriority = 3
offset = 45,-90
postype = p1         ;p2,front,back,left,right
attr = S,SP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = light          ;light,medium,hard,back,up,diagup
air.animtype = light
;fall.animtype = Back
priority = 4,Hit   ;Hit,Miss,Dodge
damage = 15,1
pausetime = 0,0
;guard.pause,0
sparkno = -1
guard.sparkno = -1
hitsound = 0,0
guardsound = 0,0
ground.type = High      ;Low,Trip,None
ground.hit = 10
air.hittime = 10
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -1,0
air.velocity = -2,0
sprpriority = 1



[State 100, 10]
type = ChangeState
trigger1 = AnimTime = 0
value = 50

[Statedef 1212]
type    = A
movetype= A
physics = N
juggle  = 1
anim = 1212
sprpriority = 0
velset = 2, 0

[State 1340]
type = PlaySnd
trigger1 = time = 0
value = 7710,0

[State 0, Explod]
type = Explod
trigger1 =  time = 0
anim =  1232
ID = 1232
pos = 10,-80
postype = p1 ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 8
scale = 1,1
sprpriority = 4



[State 0, VelSet]
type = VelSet
trigger1 = time = 5
x = 12;10
;y = 8



[State 1480]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, NA
animtype  = Hard
damage    = 80
guardflag = HA
pausetime = 5,7;0,17;7,10
sparkno = 2
sparkxy = -20,-50
hitsound   = S1,2
guardsound = S4,0
ground.type = High
air.type = Low
ground.slidetime = 15
ground.hittime  = 20
air.hittime = 25
ground.velocity = -9
air.velocity = -5,5

[State 100, 10]
type = ChangeState
trigger1 = AnimTime = 0
value = 50

[Statedef 1222]
type    = A
movetype= H
physics = N
anim = 1222
sprpriority = 0
velset = 0, 0

[State 0, VelSet]
type = VelSet
trigger1 = time = 5
x = 2;5
;y = -5
;ignorehitpause =
;persistent =


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


[State 100, 10]
type = ChangeState
trigger1 = time = 20
value = 50
ctrl = 1




;---------------------------------------------------------------------------
;Spider Sting
[Statedef 1480]
type    = U
movetype= A
physics = N
juggle  = 3
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1480;+(StateType = A)
sprpriority = 0
facep2 = 1

[State 1480]
type = PlaySnd
trigger1 = AnimElem = 3
value = 0,2

[State 1480]
type = HitDef
attr = SA, SA
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 80,5
animtype = Medium
priority  = 5, Hit
guardflag = HA
pausetime = 5,3
sparkxy = -10,-70+floor(P2Dist Y)
hitsound   = S1,1
guardsound = S4,0
sparkno = 2
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -1,-9
air.velocity = -1,-9
fall = 1
air.fall = 1
all.recover = 0

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



[State 1480]
type = Velset
trigger1 = AnimElem = 5
x = 3
y = -7


[State 1480]
type = Velset
trigger1 = AnimElem = 8
x = 0



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

[State 1480]
type = VelAdd
trigger1 = AnimElem = 5 >= 0
y = 0.4


[State 1480]
type = ChangeState
triggerall = MoveContact
trigger1 = !var(59)
trigger1 = command = "x" || command = "y" || command = "z"
trigger2 = var(59) && random < 200
value = 1481
ctrl = 0


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


[State 1480]
type = ChangeState
trigger1 = Time >= 60 && StateType = A
value = 1320
ctrl = 0

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



;---------------------------------------------------------------------------
;Spider Sting 2
[Statedef 1481]
type    = U
movetype= A
physics = N
juggle  = 3
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1481;+(StateType = A)
sprpriority = 0
facep2 = 1

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


[State 1481]
type = PlaySnd
trigger1 = AnimElem = 5
value = 220,0

[State 1481]
type = HitDef
attr = A, SA
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 60,5
animtype = Medium
priority  = 5, Hit
guardflag = HA
pausetime = 5,7
sparkxy = -10,-70+floor(P2Dist Y)
hitsound   = S1,2
guardsound = S4,0
sparkno = 2
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -9
air.velocity = -7,17
fall = 1
air.fall = 1
all.recover = 0

[State 1481]
type = VarAdd
trigger1 = AnimElem = 8, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0

[State 1481]
type = Velset
trigger1 = AnimElem = 5
x = 3
y = -7

[State 1481]
type = VelSet
trigger1 = P2bodydist x < 20
x = 0.5

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

[State 1481]
type = VelAdd
trigger1 = AnimElem = 5 >= 0
y = 0.4

[State 1481]
type = VelAdd
trigger1 = AnimElem = 9 >= 0
y = 0.3

[State 1481]
type = ChangeState
trigger1 = Time >= 57 && StateType = A
value = 1320
ctrl = 0

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


;---------------------------------------------------------------------------
;Spider Sting
[Statedef 1490]
type    = U
movetype= A
physics = N
juggle  = 3
poweradd= 70
ctrl = 0
velset = 0,0
anim = 1490;+(StateType = A)
sprpriority = 0
facep2 = 1

[State 1490]
type = PlaySnd
trigger1 = AnimElem = 3
value = 0,2

[State 1490]
type = HitDef
attr = SA, SA
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 87,5
animtype = Medium
priority  = 5, Hit
guardflag = HA
pausetime = 5,3
sparkxy = -10,-70+floor(P2Dist Y)
hitsound   = S1,1
guardsound = S4,0
sparkno = 2
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -1,-9
air.velocity = -1,-9
fall = 1
air.fall = 1
all.recover = 0

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



[State 1490]
type = Velset
trigger1 = AnimElem = 5
x = 5
y = -9


[State 1490]
type = Velset
trigger1 = AnimElem = 8
x = 0



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

[State 1490]
type = VelAdd
trigger1 = AnimElem = 5 >= 0
y = 0.4

[State 1490]
type = ChangeState
triggerall = MoveContact
trigger1 = !var(59)
trigger1 = command = "x" || command = "y" || command = "z"
trigger2 = var(59) && random < 200
value = 1481
ctrl = 0


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


[State 1490]
type = ChangeState
trigger1 = Time >= 60 && StateType = A
value = 1320
ctrl = 0

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


;---------------------------------------------------------------------------
;Spider Sting
[Statedef 1500]
type    = U
movetype= A
physics = N
juggle  = 3
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1500;+(StateType = A)
sprpriority = 0
facep2 = 1

[State 1500]
type = PlaySnd
trigger1 = AnimElem = 3
value = 0,2


[State 1500]
type = HitDef
attr = SA, SA
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 90,5
animtype = Medium
priority  = 5, Hit
guardflag = HA
pausetime = 5,3
sparkxy = -10,-70+floor(P2Dist Y)
hitsound   = S1,1
guardsound = S4,0
sparkno = 2
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -1,-9
air.velocity = -1,-9
fall = 1
air.fall = 1
all.recover = 0

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

[State 1500]
type = Velset
trigger1 = AnimElem = 5
x = 7
y = -9


[State 1500]
type = Velset
trigger1 = AnimElem = 8
x = 0

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

[State 1500]
type = VelAdd
trigger1 = AnimElem = 5 >= 0
y = 0.4

[State 1500]
type = ChangeState
triggerall = MoveContact
trigger1 = !var(59)
trigger1 = command = "x" || command = "y" || command = "z"
trigger2 = var(59) && random < 200
value = 1481
ctrl = 0


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


[State 1500]
type = ChangeState
trigger1 = Time >= 60 && StateType = A
value = 1320
ctrl = 0

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



;---------------------------------------------------------------------------
;Web Swing
[Statedef 1510]
type    = U
movetype= A
physics = N
juggle  = 3
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1515;+(StateType = A)
sprpriority = 0
facep2 = 1

[State 1000, gastateia]
type = VarAdd
triggerall = var(40) > 0
trigger1 = animelem = 2
v = 40
value = -3

[State 1510]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1540,0

[State 1510]
type = PlaySnd
trigger1 = AnimElem = 11
value = 0,2

[State 1510]
type = HitDef
attr = SA, SA
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 80,5
animtype = Medium
priority  = 5, Hit
guardflag = HA
pausetime = 7,3
sparkxy = -10,-70+floor(P2Dist Y)
hitsound   = S1,5
guardsound = S4,0
sparkno = 2
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -5,-7
air.velocity = -5,-7
fall = 1
air.fall = 1
all.recover = 0

[State 1510]
type = VarAdd
trigger1 = AnimElem = 32, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0


[State 1510]
type = Varset
trigger1 = Time = 0 && StateType != A
var(0) = 0

[State 1510]
type = Varset
trigger1 = Time = 0 && StateType = A
var(0) = 1


[State 1510]
type = Varset
trigger1 = Time = 0
var(2) = 1510

[State 1510]
type = VelSet
trigger1 = Time = 0
x = -1
y = -4


[State 1510]
type = VelSet
trigger1 = AnimElem = 2
x = 0
y = 0

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


[State 1510]
type = ChangeState
trigger1 = AnimTime = 0
value = 511

[State 1510]
type = PosAdd
trigger1 = AnimElem = 7
x = -7
y = 9

[State 1510]
type = PosAdd
trigger1 = AnimElem = 8
x = 13
y = -11

[State 1510]
type = PosAdd
trigger1 = AnimElem = 9
x = -6
y = -7

[State 1510]
type = PosAdd
trigger1 = AnimElem = 10
x = 3
y = 3

[State 1510]
type = PosAdd
trigger1 = AnimElem = 11
x = 4
y = 4

[State 1510]
type = PosAdd
trigger1 = AnimElem = 12
x = 5
y = 5

[State 1510]
type = PosAdd
trigger1 = AnimElem = 13
x = 3
y = 3

[State 1510]
type = PosAdd
trigger1 = AnimElem = 14
x = 4
y = 4

[State 1510]
type = PosAdd
trigger1 = AnimElem = 15
x = 6
y = 6

[State 1510]
type = PosAdd
trigger1 = AnimElem = 16
x = 7
y = 5

[State 1510]
type = PosAdd
trigger1 = AnimElem = 17
x = 9
y = 3

[State 1510]
type = PosAdd
trigger1 = AnimElem = 18
x = 9
y = 5

[State 1510]
type = PosAdd
trigger1 = AnimElem = 19
x = 11
y = 1

[State 1510]
type = PosAdd
trigger1 = AnimElem = 20
x = 12
y = 0

[State 1510]
type = PosAdd
trigger1 = AnimElem = 21
x = 12
y = 0


[State 1510]
type = PosAdd
trigger1 = AnimElem = 22
x = 12
y = 0

[State 1510]
type = PosAdd
trigger1 = AnimElem = 23
x = 10
y = 0

[State 1510]
type = PosAdd
trigger1 = AnimElem = 24
x = 10
y = 0


[State 1510]
type = PosAdd
trigger1 = AnimElem = 25
x = 12
y = 0


[State 1510]
type = PosAdd
trigger1 = AnimElem = 26
x = 12
y = 0


[State 1510]
type = PosAdd
trigger1 = AnimElem = 27
x = 11
y = -1

[State 1510]
type = PosAdd
trigger1 = AnimElem = 28
x = 9
y = -3

[State 1510]
type = PosAdd
trigger1 = AnimElem = 29
x = 12
y = -6

[State 1510]
type = PosAdd
trigger1 = AnimElem = 30
x = 6
y = -6

[State 1510]
type = PosAdd
trigger1 = AnimElem = 31
x = 8
y = -8

[State 1510]
type = PosAdd
trigger1 = AnimElem = 32
x = 5
y = 5

[State 1510]
type = PosAdd
trigger1 = AnimElem = 33
x = 1
y = -1


;---------------------------------------------------------------------------
;Web Swing
[Statedef 1520]
type    = U
movetype= A
physics = N
juggle  = 3
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1516;+(StateType = A)
sprpriority = 0
facep2 = 1

[State 1000, gastateia]
type = VarAdd
triggerall = var(40) > 0
trigger1 = animelem = 2
v = 40
value = -3

[State 1510]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1540,0

[State 1520]
type = PlaySnd
trigger1 = AnimElem = 11
value = 0,2

[State 1520]
type = HitDef
attr = SA, SA
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 80,5
animtype = Medium
priority  = 5, Hit
guardflag = HA
pausetime = 7,3
sparkxy = -10,-70+floor(P2Dist Y)
hitsound   = S1,5
guardsound = S4,0
sparkno = 2
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -5,-7
air.velocity = -5,-7
fall = 1
air.fall = 1
all.recover = 0

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


[State 1520]
type = Varset
trigger1 = Time = 0 && StateType != A
var(0) = 0

[State 1520]
type = Varset
trigger1 = Time = 0 && StateType = A
var(0) = 1


[State 1520]
type = Varset
trigger1 = Time = 0
var(2) = 1520

[State 1520]
type = VelSet
trigger1 = Time = 0
x = -1
y = -4


[State 1520]
type = VelSet
trigger1 = AnimElem = 2
x = 0
y = 0

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

[State 1510]
type = ChangeState
trigger1 = AnimTime = 0
value = 511



[State 1520]
type = PosAdd
trigger1 = AnimElem = 8
x = -6
y = 7

[State 1520]
type = PosAdd
trigger1 = AnimElem = 9
x = 14
y = -10

[State 1520]
type = PosAdd
trigger1 = AnimElem = 10
x = -5
y = -6

[State 1520]
type = PosAdd
trigger1 = AnimElem = 11
x = 2
y = 2

[State 1520]
type = PosAdd
trigger1 = AnimElem = 12
x = 3
y = 3

[State 1520]
type = PosAdd
trigger1 = AnimElem = 13
x = 4
y = 4

[State 1520]
type = PosAdd
trigger1 = AnimElem = 14
x = 5
y = 5

[State 1520]
type = PosAdd
trigger1 = AnimElem = 15
x = 4
y = 4

[State 1520]
type = PosAdd
trigger1 = AnimElem = 16
x = 6
y = 6

[State 1520]
type = PosAdd
trigger1 = AnimElem = 17
x = 5
y = 6

[State 1520]
type = PosAdd
trigger1 = AnimElem = 18
x = 9
y = 3

[State 1520]
type = PosAdd
trigger1 = AnimElem = 19
x = 9
y = 3

[State 1520]
type = PosAdd
trigger1 = AnimElem = 20
x = 9
y = 3

[State 1520]
type = PosAdd
trigger1 = AnimElem = 21
x = 12
y = 0

[State 1520]
type = PosAdd
trigger1 = AnimElem = 22
x = 12
y = 0

[State 1520]
type = PosAdd
trigger1 = AnimElem = 23
x = 12
y = 0

[State 1520]
type = PosAdd
trigger1 = AnimElem = 24
x = 14
y = 0

[State 1520]
type = PosAdd
trigger1 = AnimElem = 25
x = 12
y = 0

[State 1520]
type = PosAdd
trigger1 = AnimElem = 26
x = 10
y = 0

[State 1520]
type = PosAdd
trigger1 = AnimElem = 27
x = 12
y = 0

[State 1520]
type = PosAdd
trigger1 = AnimElem = 28
x = 16
y = 0

[State 1520]
type = PosAdd
trigger1 = AnimElem = 29
x = 14
y = -2

[State 1520]
type = PosAdd
trigger1 = AnimElem = 30
x = 9
y = -3

[State 1520]
type = PosAdd
trigger1 = AnimElem = 31
x = 12
y = -4

[State 1520]
type = PosAdd
trigger1 = AnimElem = 32
x = 8
y = -8

[State 1520]
type = PosAdd
trigger1 = AnimElem = 33
x = 8
y = -7

[State 1520]
type = PosAdd
trigger1 = AnimElem = 34
x = -8
y = -8

[State 1520]
type = PosAdd
trigger1 = AnimElem = 35
x = 1
y = -1

;---------------------------------------------------------------------------
;Web Swing
[Statedef 1530]
type    = U
movetype= A
physics = N
juggle  = 3
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1517;+(StateType = A)
sprpriority = 0
facep2 = 1

[State 1000, gastateia]
type = VarAdd
triggerall = var(40) > 0
trigger1 = animelem = 2
v = 40
value = -3

[State 1510]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1540,0

[State 1530]
type = PlaySnd
trigger1 = AnimElem = 11
value = 0,2

[State 1530]
type = HitDef
attr = SA, SA
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 80,5
animtype = Medium
priority  = 5, Hit
guardflag = HA
pausetime = 7,3
sparkxy = -10,-70+floor(P2Dist Y)
hitsound   = S1,5
guardsound = S4,0
sparkno = 2
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -5,-7
air.velocity = -5,-7
fall = 1
air.fall = 1
all.recover = 0

[State 1530]
type = VarAdd
trigger1 = AnimElem = 32, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0

[State 1530]
type = Varset
trigger1 = Time = 0 && StateType != A
var(0) = 0

[State 1530]
type = Varset
trigger1 = Time = 0 && StateType = A
var(0) = 1


[State 1530]
type = Varset
trigger1 = Time = 0
var(2) = 1530

[State 1530]
type = VelSet
trigger1 = Time = 0
x = -1
y = -4

[State 1530]
type = VelSet
trigger1 = AnimElem = 2
x = 0
y = 0

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

[State 1510]
type = ChangeState
trigger1 = AnimTime = 0
value = 511

[State 1530]
type = PosAdd
trigger1 = AnimElem = 9
x = -4
y = 6

[State 1530]
type = PosAdd
trigger1 = AnimElem = 10
x = 12
y = -10

[State 1530]
type = PosAdd
trigger1 = AnimElem = 11
x = -6
y = -8

[State 1530]
type = PosAdd
trigger1 = AnimElem = 12
x = 3
y = 3

[State 1530]
type = PosAdd
trigger1 = AnimElem = 13
x = 3
y = 3

[State 1530]
type = PosAdd
trigger1 = AnimElem = 14
x = 3
y = 3

[State 1530]
type = PosAdd
trigger1 = AnimElem = 15
x = 4
y = 4

[State 1530]
type = PosAdd
trigger1 = AnimElem = 16
x = 5
y = 5

[State 1530]
type = PosAdd
trigger1 = AnimElem = 17
x = 4
y = 4

[State 1530]
type = PosAdd
trigger1 = AnimElem = 18
x = 6
y = 6

[State 1530]
type = PosAdd
trigger1 = AnimElem = 19
x = 6
y = 6

[State 1530]
type = PosAdd
trigger1 = AnimElem = 20
x = 9
y = 3

[State 1530]
type = PosAdd
trigger1 = AnimElem = 21
x = 12
y = 4

[State 1530]
type = PosAdd
trigger1 = AnimElem = 22
x = 9
y = 3

[State 1530]
type = PosAdd
trigger1 = AnimElem = 23
x = 12
y = 0

[State 1530]
type = PosAdd
trigger1 = AnimElem = 24
x = 16
y = 0

[State 1530]
type = PosAdd
trigger1 = AnimElem = 25
x = 12
y = 0

[State 1530]
type = PosAdd
trigger1 = AnimElem = 26
x = 14
y = 0

[State 1530]
type = PosAdd
trigger1 = AnimElem = 27
x = 12
y = 0

[State 1530]
type = PosAdd
trigger1 = AnimElem = 28
x = 14
y = 0

[State 1530]
type = PosAdd
trigger1 = AnimElem = 29
x = 12
y = 0

[State 1530]
type = PosAdd
trigger1 = AnimElem = 30
x = 16
y = 0

[State 1530]
type = PosAdd
trigger1 = AnimElem = 31
x = 14
y = -2

[State 1530]
type = PosAdd
trigger1 = AnimElem = 32
x = 12
y = -4

[State 1530]
type = PosAdd
trigger1 = AnimElem = 33
x = 12
y = -4

[State 1530]
type = PosAdd
trigger1 = AnimElem = 34
x = 8
y = -8

[State 1530]
type = PosAdd
trigger1 = AnimElem = 35
x = -8
y = -8

[State 1530]
type = PosAdd
trigger1 = AnimElem = 36
x = 4
y = -4

[State 1530]
type = PosAdd
trigger1 = AnimElem = 37
x = 0
y = -1


;---------------------------------------------------------------------------
;Web Throw
[Statedef 1540]
type    = U
movetype= A
physics = N
juggle  = 3
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1540;+(StateType = A)
sprpriority = 2
facep2 = 1


[State 1000, gastateia]
type = VarAdd
triggerall = var(40) > 0
trigger1 = animelem = 5
v = 40
value = -2


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


[State 1540]
type = Helper
trigger1 = AnimElem = 5
stateno = 21540
id = 21540
pos = 77,-54
ownpal = 1
persistent = 0


[State 1540]
type = ChangeAnim
trigger1 = AnimElem = 7 && Time < 47
value = anim
elem = 5


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


[State 1540]
type = ChangeState
trigger1 = Numhelper(21540)
trigger1 = Helper(21540), MoveHit
value = 21560
ctrl = 0

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


;---------------------------------------------------------------------------
;Web Throw
[Statedef 1550]
type    = U
movetype= A
physics = N
juggle  = 3
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1550;+(StateType = A)
sprpriority = 2
facep2 = 1


[State 1000, gastateia]
type = VarAdd
triggerall = var(40) > 0
trigger1 = animelem = 5
v = 40
value = -2


[State 1550]
type = PlaySnd
trigger1 = AnimElem = 4
value = 1540,0


[State 1550]
type = Helper
trigger1 = AnimElem = 5
stateno = 21541
id = 21540
pos = 62,-87
ownpal = 1
persistent = 0


[State 1550]
type = ChangeAnim
trigger1 = AnimElem = 7 && Time < 47
value = anim
elem = 5


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


[State 1550]
type = ChangeState
trigger1 = Numhelper(21540)
trigger1 = Helper(21540), MoveHit
value = 21580
ctrl = 0

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

;---------------------------------------------------------------------------
;Web Throw
[Statedef 1560]
type    = U
movetype= A
physics = N
juggle  = 3
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1560;+(StateType = A)
sprpriority = 2
facep2 = 1


[State 1000, gastateia]
type = VarAdd
triggerall = var(40) > 0
trigger1 = animelem = 5
v = 40
value = -2


[State 1560]
type = PlaySnd
trigger1 = AnimElem = 4
value = 1540,0


[State 1560]
type = Helper
trigger1 = AnimElem = 5
stateno = 21542
id = 21540
pos = 15,-107
ownpal = 1
persistent = 0


[State 1560]
type = ChangeAnim
trigger1 = AnimElem = 7 && Time < 47
value = anim
elem = 5


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


[State 1560]
type = ChangeState
trigger1 = Numhelper(21540)
trigger1 = Helper(21540), MoveHit
value = 21585
ctrl = 0

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

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

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 4
x = 20
y = 0

[State 1340]
type = PlaySnd
trigger1 = animelem = 4
value = 0,2

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 5
x = 17
y = 0

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 6
x = 0
y = 0

[State 0, Explod]
type = Explod
trigger1 =  animelem = 4
anim = 1601
ID = 1601
pos = 130,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
sprpriority = 2


[State 1600]
type = HitDef
;trigger1 = !var(29)
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = C, NA
damage    = 65
animtype  = Hard
hitflag = MAF
guardflag = MA
pausetime = 7,7
sparkno = 1
sparkxy = -10,-10
hitsound   = S1,6
guardsound = S4,0
ground.type = Trip
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = 0,-4
air.velocity = 0,-4

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


[StateDef 1900]
type = S
movetype = H
physics = S
anim = 1900
ctrl = 0
velset = 0,0
poweradd = 70

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 5
value = 1450,3



[State 1000, gastateia]
type = VarAdd
triggerall = var(40) > 0
trigger1 = animelem = 2
v = 40
value = -5

 [state 4000, gethit]
type = hitoverride
triggerall = p2bodydist x > 0
trigger1 = time > 9
attr = SCA,NA,SA,HA,NP,SP,HP;,NT,ST,HT
stateno = 1903

[State 1020, changestate]
type = ChangeState
triggerall = !var(59)
triggerall = time > 15
trigger1 = AnimTime = 0
trigger2 = command = "a"
trigger3 = command = "b"
trigger4 = command = "c"
trigger5 = command = "start"
value = 1901
ctrl = 1

[State 1020, changestate]
type = ChangeState
triggerall = time > 15
trigger1 = command = "x"
trigger2 = command = "y"
trigger3 = command = "z"
trigger4 = var(59) && enemynear, movetype !=A && p2bodydist x < 80
value = 1906
ctrl = 0

[StateDef 1901]
type = S
movetype = H
physics = S
anim = 1901
ctrl = 0
velset = 0,0
sprpriority = 0

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

[State 0, Explod]
type = Explod
trigger1 =  animelem = 1
anim = 1904
ID = 1904
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
sprpriority = 2

[State 1020, changestate]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[StateDef 1902]
type = A
movetype = A
physics = N
anim = 1902
ctrl = 0
velset = 0,0
sprpriority = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animtime = 0
value = 0,0

[State 0, Explod]
type = Explod
trigger1 =  AnimTime = 0
anim = 1905
ID = 1905
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
sprpriority = 2

[State 100, 10]
type = ChangeState
trigger1 = AnimTime = 0
value = 511

[StateDef 1903]
type = A
movetype = A
physics = N
anim = 1903
ctrl = 0
velset = 0,0
sprpriority = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 2
value = 121,0

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = 7710,0


[State 0, SuperPause]
type = SuperPause
trigger1 = time = 2
time = 12
anim = -1
sound = -1
darken = 0
pausebg = 0

[State 1480]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, NA
animtype  = Hard
damage    = 140
guardflag = HA
pausetime = 5,7;0,17;7,10
sparkno = 3
sparkxy = -20,-70+floor(P2Dist Y)
hitsound   = S1,2
guardsound = S4,0
ground.type = High
air.type = Low
ground.slidetime = 15
ground.hittime  = 30
air.hittime = 35
ground.velocity = -12, -4
air.velocity = -12,-5
fall.recover =0
fall = 1
air.fall = 1

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 3
x = 14
y = -3

[State 0, VelAdd]
type = VelAdd
triggerall = animelem = 3
trigger1 = vel y < 2
y = 0.4

[State 0, VelAdd]
type = VelAdd
triggerall = animelem = 3
trigger1 = vel x < 12
x = 1
;ignorehitpause =
;persistent =


[State 1020, changestate]
type = ChangeState
trigger1 = time > 25
value = 1902
ctrl = 1


[StateDef 1906]
type = S
movetype = A
physics = S
anim = 1906
ctrl = 0
velset = 0,0
sprpriority = 0

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = 220,0

[State 1480]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = S, NA
animtype  = Hard
damage    = 90
guardflag = HA
pausetime = 5,7;0,17;7,10
sparkno = 2
sparkxy = -20,-70+floor(P2Dist Y)
hitsound   = S1,2
guardsound = S4,0
ground.type = High
air.type = Low
ground.slidetime = 15
ground.hittime  = 30
air.hittime = 35
ground.velocity = -7, -3
air.velocity = -7,-3
fall.recover =0
fall = 1
air.fall = 1


[State 1020, changestate]
type = ChangeState
trigger1 = animtime = 0
value = 1901
ctrl = 1



;---------------------------------------------------------------------------
;Maximum Spider

[Statedef 3000]
type    = U
movetype= A
physics = N
juggle  = 4
velset = 0,0
anim = 3000;+10*(StateType = A)
ctrl = 0
sprpriority = 0
;facep2 = 1


[State 3000]
type = PosSet
trigger1 = Anim = 3000
x = -130*facing

[State 3000]
type = Explod
trigger1 = AnimElem = 1 && StateType != A
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1

[State 3410]
type = Helper
trigger1 = time = 5
stateno = 33120
ownpal = 1

[State 3000]
type = SuperPause
trigger1 = Time = 5
pos = 10,-60
sound = -1;S3000,3
poweradd = -1000
time = 60
movetime = 60
unhittable = 1
darken = 0


;about 8 ticks before 3110
[State 3000]
type = Helper
trigger1 = Time = 6
stateno = 33117
supermovetime = 9999
pausemovetime = 9999
pos = 0,-200
ownpal = 1
postype = back
size.xscale = 1
size.yscale = 1

[State 3000]
type = Helper
trigger1 = Time = 14
stateno = 33110
id = 33110
supermovetime = 9999
pausemovetime = 9999
pos = -24,-64
ownpal = 1

[State 3000]
type = varset
trigger1 = Time = 0
var(4) = 0

[State 3000]
type = ChangeState
trigger1 = AnimTime = 0
value = 3001
ctrl = 0


;---------------------------------------------------------------------------
;Maximum Spider
[Statedef 3001]
type    = U
movetype= A
physics = N
juggle  = 1
;poweradd=
velset = 0,0
;anim = var(4)
ctrl = 0
sprpriority = 0
facep2 = 1
movehitpersist = 1

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

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

[State 3001]
type = Helper
trigger1 = Time = 0
stateno = 33120
ownpal = 1

[State 3001]
type = VarSet
trigger1 = Time = 0
trigger1 = Pos X = Enemynear,Pos X
fvar(1) = (Pos Y -  (enemynear,Pos Y))


[State 3001]
type = VarSet
trigger1 = Time = 0
trigger1 = Pos X != Enemynear,Pos X
fvar(1) = facing*((Pos Y - (enemynear,Pos Y))/(Pos X - (enemynear,Pos X)))


[State 3001]
type = VarSet
trigger1 = Time = 0 && fvar(1) = 0
fvar(1) = 1

[State 3001]
type = VelSet
trigger1 = Time = 0
x = 18


[State 3001]
type = VelSet
trigger1 = Time = 0
y = (Vel X)*fvar(1)


[State 3001]
type = VelSet
trigger1 = Time = 0 && Vel Y > 18
y = 18


[State 3001]
type = VelSet
trigger1 = Time = 0 && Vel Y < -18
y = -18

[State 3001]
type = VelSet
trigger1 = Time = 0 && abs(Vel Y) = 18
x = floor(Vel Y/(fvar(1)))


[State 3001]
type = VelSet
trigger1 = Time = 0 && Vel X = 0
x = 1



[State 3001]
type = ChangeAnim
trigger1 = Time = 0
value = 3001+floor(((atan(((Vel Y))/(Vel X)))*(360/(2*pi))+90)/20)



[State 3001]
type = HitDef
attr = A, HA
trigger1 = var(4) < 6
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 45
animtype = Medium
priority  = 5, Hit
hitflag = MAFD
guardflag = MA
pausetime = 3,1
sparkxy = -10,-70+floor(P2Dist Y)
hitsound   = S1,5
guardsound = S4,0
sparkno = 3
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = 9,-7
air.velocity = 9,-7
fall = 1
air.fall = 1
all.recover = 1
getpower = 0


[State 3001]
type = HitDef
attr = A, HA
trigger1 = var(4) >= 6
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 45
animtype = Medium
priority  = 5, Hit
guardflag = HA
pausetime = 1,1
sparkxy = -10,-70+floor(P2Dist Y)
hitsound   = S1,6
guardsound = S4,0
sparkno = 3
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -30,-9
air.velocity = -30,-9
getpower = 0
fall = 1
air.fall = 1
all.recover = 1
p2stateno = 9020

[State 3001]
type = varadd
trigger1 = MoveHit
var(4) = 1
persistent = 0

[State 3001]
type = ChangeAnim
trigger1 = Anim != [3010,3013]
trigger1 = MoveHit && FrontEdgeDist < 15
value = 3010
persistent = 0


[State 3001]
type = ChangeAnim
trigger1 = Anim != [3010,3013]
trigger1 = MoveHit && ScreenPos Y < 80 && Vel Y < 0
value = 3013
persistent = 0

[State 3001]
type = ChangeAnim
trigger1 = Anim != [3010,3013]
trigger1 = MoveHit && ScreenPos Y > 240 && Vel Y > 0
value = 3012
persistent = 0

[State 3001]
type = VelSet
trigger1 = Anim = [3010,3013]
x = 0
y = 0




[State 3001]
type = Turn
trigger1 = Anim = [3010,3013]
trigger1 = p2bodydist x < 0
persistent = 0

[State 3001]
type = ChangeState
trigger1 = Anim = [3010,3013]
trigger1 = AnimTime = 0
value = 3001
ctrl = 0


[State 3001]
type = ChangeState
trigger1 = MoveGuarded
trigger2 = var(4) > 7
value = 3018
ctrl = 0

[State 3001]
type = ChangeState
trigger1 = !MoveContact && Anim = [3001,3009]
trigger1 = FrontEdgeDist < 15 || ScreenPos Y > 320+abs(p2dist y) || ScreenPos Y < -abs(p2dist y)
value = 3018
ctrl = 0

[State 3001]
type = ChangeState
trigger1 = !MoveContact
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0



;---------------------------------------------------------------------------
;Maximum Spider Start

[Statedef 3010]
type    = U
movetype= A
physics = N
juggle  = 4
velset = 0,0
ctrl = 0
sprpriority = 0
facep2 = 1

[State 3010]
type = ChangeAnim
trigger1 = Time = 0
value = 43

[State 3010]
type = Explod
trigger1 = AnimElem = 1 && StateType != A
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1


[State 3010]
type = VelSet
trigger1 = Time = 0
x = -3-(BackEdgeDist)*0.03
y = -8-(BackEdgeDist)*0.01

[State 3010]
type = VelAdd
trigger1 = 1
y = 0.3

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


[State 3010]
type = ChangeState
trigger1 = BackEdgeDist < 15 && Pos Y < -80
value = 3000
ctrl = 0

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


;---------------------------------------------------------------------------
;Maximum Spider End
[Statedef 3018]
type    = A
movetype= I
physics = A
juggle  = 1
;poweradd=
velset = -2,-3
anim = 43
ctrl = 0
sprpriority = 0
facep2 = 1

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

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

[Statedef 3039]
type    = S
movetype= A
physics = N
juggle  = 4
velset = 0,0
anim = 3039
ctrl = 0
sprpriority = 0
;facep2 = 1


[State 3040]
type = Explod
trigger1 = AnimElem = 1 && StateType != A
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1

[State 3410]
type = Helper
trigger1 = time = 17
stateno = 33120
ownpal = 1

[State 3040]
type = SuperPause
trigger1 = Time = 17
pos = 10,-60
sound = -1;S3000,3
poweradd = -1000
time = 60
movetime = 60
unhittable = 1
darken = 0


;about 8 ticks before 3110
[State 3040]
type = Helper
trigger1 = Time = 18
stateno = 33117
supermovetime = 9999
pausemovetime = 9999
pos = 0,-200
ownpal = 1
postype = back
size.xscale = 1
size.yscale = 1

[State 3040]
type = Helper
trigger1 = Time = 26
stateno = 33110
id = 33110
supermovetime = 9999
pausemovetime = 9999
pos = 17,-87
ownpal = 1



[State 3040]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,1


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


[State 3040]
type = VelSet
trigger1 = Time = 0
x = 0
y = 0

[State 3040]
type = ChangeState
trigger1 = animtime = 0
value = 3041
ctrl = 0

;---------------------------------------------------------------------------
;Ultimate Web Throw

[Statedef 3040]
type    = S
movetype= A
physics = N
juggle  = 4
velset = 0,0
anim = 3040
ctrl = 0
sprpriority = 0
;facep2 = 1


[State 3040]
type = Explod
trigger1 = AnimElem = 1 && StateType != A
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1

[State 3410]
type = Helper
trigger1 = time = 17
stateno = 33120
ownpal = 1

[State 3040]
type = SuperPause
trigger1 = Time = 17
pos = 10,-60
sound = -1;S3000,3
poweradd = -1000
time = 60
movetime = 60
unhittable = 1
darken = 0

;about 8 ticks before 3110
[State 3040]
type = Helper
trigger1 = Time = 18
stateno = 33117
supermovetime = 9999
pausemovetime = 9999
pos = 0,-200
ownpal = 1
postype = back
size.xscale = 1
size.yscale = 1

[State 3040]
type = Helper
trigger1 = Time = 26
stateno = 33110
id = 33110
supermovetime = 9999
pausemovetime = 9999
pos = 17,-87
ownpal = 1

[State 3040]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,1

[State 3040]
type = VelSet
trigger1 = Time = 0
x = -1
y = -9

[State 3040]
type = VelAdd
trigger1 = Time < 15
y = 0.3

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


[State 3040]
type = VelSet
trigger1 = Time = 15
x = 0
y = 0

[State 3040]
type = ChangeState
trigger1 = AnimTime = 0
value = 3041
ctrl = 0


;---------------------------------------------------------------------------
;Ultimate Web Throw
[Statedef 3041]
type    = A
movetype= A
physics = N
juggle  = 1
;poweradd=
velset = 0,0
anim = 3041
ctrl = 0
sprpriority = 2
;facep2 = 1

[State 3410]
type = Helper
trigger1 = time = 0
stateno = 33120
ownpal = 1

[State 1000, gastateia]
type = VarAdd
triggerall = var(40) > 0
trigger1 = animelem = 4
v = 40
value = -10

[State 3041]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,1

[State 3041]
type = PlaySnd
trigger1 = Time = 4
value = 1540,0


[State 3041]
type = Helper
trigger1 = AnimElem = 3
stateno = 23040
id = 23040
ownpal = 1
pos = 57,-42


[State 3041]
type = ChangeState
trigger1 = Numhelper(23040)
trigger1 = Helper(23040), MoveHit
value = 23050
ctrl = 0


[State 3041]
type = ChangeState
trigger1 = Time >= 60
value = 3049
ctrl = 0





;---------------------------------------------------------------------------
;Ultimate Web Throw End
[Statedef 3049]
type    = A
movetype= I
physics = N
juggle  = 1
;poweradd=
velset = -2,-4
;anim = 3049
ctrl = 0
sprpriority = 0
;facep2 = 1

[State 3049]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 41
elem = 7
persistent = 0

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


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


[Statedef 3100]
type    = S
movetype= A
physics = N
juggle  = 4
velset = 0,0
anim = 3100
ctrl = 0
sprpriority = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 18
value = 194,0

[State 3410]
type = Helper
trigger1 = time = 0
stateno = 33120
ownpal = 1


[State 3040]
type = Explod
trigger1 = AnimElem = 1 && StateType != A
anim = 7023
ontop = 1
ownpal = 1

[State 0, VarSet]
type = VarSet
trigger1 = Time = 17
v = 22
value = 1

[State 3040]
type = SuperPause
trigger1 = Time = 17
pos = 10,-60
sound = -1;S3000,3
poweradd = -1000
time = 60
movetime = 60
unhittable = 1
darken = 0

;about 8 ticks before 3110
[State 3000]
type = Helper
trigger1 = Time = 6
stateno = 33117
supermovetime = 9999
pausemovetime = 9999
pos = 0,-200
ownpal = 1
postype = back
size.xscale = 1
size.yscale = 1

[State 3000]
type = Helper
trigger1 = Time = 14
stateno = 33110
id = 33110
supermovetime = 9999
pausemovetime = 9999
pos = -24,-64
ownpal = 1




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


[Statedef 3200]
type    = S
movetype= A
physics = N
juggle  = 4
velset = 0,0
anim = 3200
ctrl = 0
sprpriority = 0
;facep2 = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = 121,0


[State 3040]
type = Explod
trigger1 = AnimElem = 1 && StateType != A
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1

[State 0, VarSet]
type = VarSet
trigger1 = Time = 17
v = 42
value = 1

[State 3410]
type = Helper
trigger1 = time = 17
stateno = 33120
ownpal = 1

[State 0, VarAdd]
type = VarAdd
triggerall = var(40) < 100
trigger1 =  Time > 17 && timemod = 4,2
v = 40
value = 5
;ignorehitpause =
;persistent =


[State 3040]
type = SuperPause
trigger1 = Time = 17
pos = 10,-60
sound = -1;S3000,3
poweradd = -1000
time = 60
movetime = 60
unhittable = 1
darken = 0

;about 8 ticks before 3110
[State 3000]
type = Helper
trigger1 = Time = 6
stateno = 33117
supermovetime = 9999
pausemovetime = 9999
pos = 0,-200
ownpal = 1
postype = back
size.xscale = 1
size.yscale = 1

[State 3000]
type = Helper
trigger1 = Time = 14
stateno = 33110
id = 33110
supermovetime = 9999
pausemovetime = 9999
pos = -24,-64
ownpal = 1




[State 3040]
type = ChangeState
trigger1 = AnimTime = 0 && var(40) >= 100
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;Crawler Assault

[Statedef 3400]
type    = S
movetype= A
physics = N
juggle  = 4
velset = 0,0
anim = 3400
ctrl = 0
sprpriority = 0
facep2 = 1


[State 3400]
type = Explod
trigger1 = AnimElem = 1 && StateType != A
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1

[State 3410]
type = Helper
trigger1 = time = 12
stateno = 33120
ownpal = 1

[State 3400]
type = SuperPause
trigger1 = Time = 12
pos = 10,-60
sound = -1;S3400,3
poweradd = -1000
time = 60
movetime = 60
unhittable = 1
darken = 0


;about 8 ticks before 3110
[State 3400]
type = Helper
trigger1 = Time = 13
stateno = 33117
supermovetime = 9999
pausemovetime = 9999
pos = 0,-200
ownpal = 1
postype = back
size.xscale = 1
size.yscale = 1

[State 3400]
type = Helper
trigger1 = Time = 21
stateno = 33110
id = 33110
supermovetime = 9999
pausemovetime = 9999
pos = 2,-57
ownpal = 1



[State 3400]
type = PlaySnd
trigger1 = Time = 4
value = 220,0


[State 3400]
type = ChangeState
trigger1 = AnimTime = 0
value = 3401
ctrl = 0


;---------------------------------------------------------------------------
;Crawler Assault
[Statedef 3401]
type    = S
movetype= A
physics = N
juggle  = 1
;poweradd=
velset = 0,0
anim = 620
ctrl = 0
sprpriority = 0
facep2 = 1



[State 3401]
type = Helper
trigger1 = Time = 0
stateno = 33120
ownpal = 1

[State 3401]
type = Offset
trigger1 = 1
value = 16,16


[State 3401]
type = AfterImage
trigger1 = Time = 0
time = 27
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 3401]
type = ChangeAnim
trigger1 = Time = 2
value = anim
elem = 2
persistent = 0

[State 3401]
type = VelSet
trigger1 = AnimElem = 1
x = 5

[State 3401]
type = HitDef
attr = S, HA
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 20,5
animtype = Hard
priority  = 5, Hit
guardflag = MA
pausetime = 5,5
sparkxy = -20,-50
hitsound   = S1,6
guardsound = S4,0
sparkno = 1
ground.type = Low
ground.slidetime = 15
ground.hittime  = 25
ground.velocity = 0,0
air.velocity = 0,0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
airguard.velocity = -5
guard.velocity = -5
getpower = 0

[State 3401]
type = ChangeState
trigger1 = MoveHit
trigger1 = !HitPauseTime
trigger2 = AnimElem = 4
value = stateno + 1


[State 3401]
type = ChangeState
trigger1 = Time >= 27
value = 3419
ctrl = 0



;---------------------------------------------------------------------------
;Crawler Assault 2
[Statedef 3402]
type    = S
movetype= A
physics = N
juggle  = 1
;poweradd=
velset = 3,0
anim = 610
ctrl = 0
sprpriority = 0
facep2 = 1

[State 3402]
type = Helper
trigger1 = Time = 0
stateno = 33120
ownpal = 1


[State 3402]
type = Offset
trigger1 = 1
value = 8,16


[State 3402]
type = AfterImage
trigger1 = Time = 0
time = 27
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 3401]
type = ChangeAnim
trigger1 = Time = 2
value = anim
elem = 2
persistent = 0

[State 3402]
type = Velset
trigger1 = P2BodyDist X <= 0
x = 0.5

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

[State 3402]
type = HitDef
attr = S, HA
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 20,5
animtype = Hard
priority  = 5, Hit
guardflag = MA
pausetime = 5,5
sparkxy = -10,-70
hitsound   = S1,0
guardsound = S4,0
sparkno = 1
ground.type = High
ground.slidetime = 15
ground.hittime  = 25
ground.velocity = -2,0
air.velocity = 0,0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
airguard.velocity = -5
guard.velocity = -5
getpower = 0



[State 3402]
type = ChangeState
trigger1 = MoveHit
trigger1 = !HitPauseTime
trigger2 = AnimElem = 4
value = stateno + 1


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


;---------------------------------------------------------------------------
;Crawler Assault 3
[Statedef 3403]
type    = S
movetype= A
physics = N
juggle  = 1
;poweradd=
velset = 3,0
anim = 620
ctrl = 0
sprpriority = 0
facep2 = 1

[State 3403]
type = Helper
trigger1 = Time = 0
stateno = 33120
ownpal = 1


[State 3403]
type = Offset
trigger1 = 1
value = 16,16



[State 3403]
type = AfterImage
trigger1 = Time = 0
time = 27
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 3403]
type = Velset
trigger1 = P2BodyDist X <= 0
x = 0.5

[State 3403]
type = ChangeAnim
trigger1 = Time = 2
value = anim
elem = 2
persistent = 0


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

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


[State 3403]
type = HitDef
attr = S, HA
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 20,5
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 5,5
sparkxy = -10,-60
hitsound   = S1,1
guardsound = S4,0
sparkno = 1
ground.type = Low
ground.slidetime = 15
ground.hittime  = 25
ground.velocity = -2,0
air.velocity = 0,0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
airguard.velocity = -5
guard.velocity = -5
getpower = 0



[State 3403]
type = ChangeState
trigger1 = MoveHit
trigger1 = !HitPauseTime
trigger2 = AnimElem = 4
value = stateno + 1


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


;---------------------------------------------------------------------------
;Crawler Assault 4
[Statedef 3404]
type    = S
movetype= A
physics = N
juggle  = 1
;poweradd=
velset = 3,0
anim = 210
ctrl = 0
sprpriority = 0
facep2 = 1

[State 3404]
type = Helper
trigger1 = Time = 0
stateno = 33120
ownpal = 1


[State 3404]
type = AfterImage
trigger1 = Time = 0
time = 27
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 3404]
type = Velset
trigger1 = P2BodyDist X <= 0
x = 0.5


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

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


[State 3404]
type = HitDef
attr = S, HA
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 20,5
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 5,5
sparkxy = -10,-70
hitsound   = S1,1
guardsound = S4,0
sparkno = 1
ground.type = High
ground.slidetime = 15
ground.hittime  = 25
ground.velocity = -2,0
air.velocity = 0,0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
airguard.velocity = -5
guard.velocity = -5
getpower = 0


[State 3404]
type = ChangeState
trigger1 = MoveHit
trigger1 = !HitPauseTime
trigger2 = AnimElem = 4
value = stateno + 1


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



;---------------------------------------------------------------------------
;Crawler Assault 5
[Statedef 3405]
type    = S
movetype= A
physics = N
juggle  = 1
;poweradd=
velset = 3,0
anim = 210
ctrl = 0
sprpriority = 0
facep2 = 1

[State 3405]
type = Helper
trigger1 = Time = 0
stateno = 33120
ownpal = 1


[State 3405]
type = AfterImage
trigger1 = Time = 0
time = 27
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 3405]
type = Velset
trigger1 = P2BodyDist X <= 0
x = 0.5


[State 3405]
type = ChangeAnim
trigger1 = Time = 2
value = anim
elem = 2
persistent = 0

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

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


[State 3405]
type = HitDef
attr = S, HA
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 20,5
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 5,5
sparkxy = -10,-60
hitsound   = S1,1
guardsound = S4,0
sparkno = 2
ground.type = High
ground.slidetime = 15
ground.hittime  = 25
ground.velocity = -2,0
air.velocity = 0,0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
airguard.velocity = -5
guard.velocity = -5
getpower = 0


[State 3405]
type = ChangeState
trigger1 = MoveHit
trigger1 = !HitPauseTime
trigger2 = AnimElem = 5
value = stateno + 1


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




;---------------------------------------------------------------------------
;Crawler Assault 6
[Statedef 3406]
type    = S
movetype= A
physics = N
juggle  = 1
;poweradd=
velset = 3,0
anim = 310
ctrl = 0
sprpriority = 0
facep2 = 1

[State 3406]
type = Helper
trigger1 = Time = 0
stateno = 33120
ownpal = 1


[State 3406]
type = AfterImage
trigger1 = Time = 0
time = 27
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 3406]
type = Velset
trigger1 = P2BodyDist X <= 0
x = 0.5



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

[State 3406]
type = PlaySnd
trigger1 = AnimElem = 2
value = 220,0


[State 3406]
type = HitDef
attr = S, HA
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 20,5
animtype = Hard
priority  = 5, Hit
guardflag = MA
pausetime = 5,5
sparkxy = -10,-70
hitsound   = S1,6
guardsound = S4,0
sparkno = 1
ground.type = High
ground.slidetime = 15
ground.hittime  = 25
ground.velocity = -2,0
air.velocity = 0,0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
airguard.velocity = -5
guard.velocity = -5
getpower = 0



[State 3406]
type = ChangeState
trigger1 = MoveHit
trigger1 = !HitPauseTime
trigger2 = AnimElem = 6
value = stateno + 1


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


;---------------------------------------------------------------------------
;Crawler Assault 7
[Statedef 3407]
type    = S
movetype= A
physics = N
juggle  = 1
;poweradd=
velset = 3,0
anim = 320
ctrl = 0
sprpriority = 0
facep2 = 1

[State 3407]
type = Helper
trigger1 = Time = 0
stateno = 33120
ownpal = 1


[State 3407]
type = AfterImage
trigger1 = Time = 0
time = 27
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 3407]
type = Velset
trigger1 = P2BodyDist X <= 0
x = 0.5


[State 3407]
type = ChangeAnim
trigger1 = Time = 2
value = anim
elem = 2
persistent = 0


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


[State 3407]
type = HitDef
attr = S, HA
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 20,5
animtype = Hard
priority  = 5, Hit
guardflag = MA
pausetime = 5,5
sparkxy = -10,-70
hitsound   = S1,6
guardsound = S4,0
sparkno = 1
ground.type = Low
ground.slidetime = 15
ground.hittime  = 25
ground.velocity = -2,0
air.velocity = 0,0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
airguard.velocity = -5
guard.velocity = -5
getpower = 0


[State 3407]
type = ChangeState
trigger1 = MoveHit
trigger1 = !HitPauseTime
trigger2 = AnimElem = 5
value = stateno + 1


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


;---------------------------------------------------------------------------
;Crawler Assault 8
[Statedef 3408]
type    = S
movetype= A
physics = N
juggle  = 1
;poweradd=
velset = 3,0
anim = 311
ctrl = 0
sprpriority = 0
facep2 = 1


[State 3408]
type = Helper
trigger1 = Time = 0
stateno = 33120
ownpal = 1


[State 3408]
type = AfterImage
trigger1 = Time = 0
time = 27
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 3408]
type = Velset
trigger1 = P2BodyDist X <= 0
x = 0.5


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


[State 3408]
type = HitDef
attr = S, HA
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 20,5
animtype = Hard
priority  = 5, Hit
guardflag = MA
pausetime = 5,5
sparkxy = -10,-50
hitsound   = S1,5
guardsound = S4,0
sparkno = 1
ground.type = High
ground.slidetime = 15
ground.hittime  = 25
ground.velocity = -2,0
air.velocity = 0,0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
airguard.velocity = -5
guard.velocity = -5
getpower = 0


[State 3408]
type = ChangeState
trigger1 = MoveHit
trigger1 = !HitPauseTime
trigger2 = AnimElem = 5
value = stateno + 1


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


;---------------------------------------------------------------------------
;Crawler Assault 9
[Statedef 3409]
type    = S
movetype= A
physics = N
juggle  = 1
;poweradd=
velset = 3,0
anim = 520
ctrl = 0
sprpriority = 0
facep2 = 1

[State 3409]
type = Helper
trigger1 = Time = 0
stateno = 33120
ownpal = 1


[State 3409]
type = AfterImage
trigger1 = Time = 0
time = 27
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 3409]
type = Velset
trigger1 = P2BodyDist X <= 0
x = 0.5


[State 3409]
type = ChangeAnim
trigger1 = Time = 0
value = anim
elem = 2
persistent = 0


[State 3409]
type = PlaySnd
trigger1 = AnimElem = 3
value = 220,0


[State 3409]
type = HitDef
attr = S, HA
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 20,5
animtype = Hard
priority  = 5, Hit
guardflag = MA
pausetime = 5,5
sparkxy = -10,-10
hitsound   = S1,6
guardsound = S4,0
sparkno = 1
ground.type = Low
ground.slidetime = 15
ground.hittime  = 25
ground.velocity = -2,0
air.velocity = 0,0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
airguard.velocity = -5
guard.velocity = -5
getpower = 0


[State 3409]
type = ChangeState
trigger1 = MoveHit
trigger1 = !HitPauseTime
trigger2 = AnimElem = 5
value = stateno + 1

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


;---------------------------------------------------------------------------
;Crawler Assault 10
[Statedef 3410]
type    = S
movetype= A
physics = N
juggle  = 1
;poweradd=
velset = 3,0
anim = 420
ctrl = 0
sprpriority = 0
facep2 = 1

[State 3410]
type = Helper
trigger1 = Time = 0
stateno = 33120
ownpal = 1


[State 3410]
type = AfterImage
trigger1 = Time = 0
time = 27
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 3410]
type = Velset
trigger1 = P2BodyDist X <= 0
x = 0.5


[State 3410]
type = ChangeAnim
trigger1 = Time = 0
value =anim
elem = 2
persistent = 0


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


[State 3410]
type = HitDef
attr = S, HA
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 20,5
animtype = Hard
priority  = 5, Hit
guardflag = MA
pausetime = 5,5
sparkxy = -10,-40
hitsound   = S1,6
guardsound = S4,0
sparkno = 1
ground.type = Low
ground.slidetime = 15
ground.hittime  = 25
ground.velocity = -2,0
air.velocity = 0,0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
airguard.velocity = -5
guard.velocity = -5
getpower = 0

[State 3410]
type = ChangeState
trigger1 = MoveHit
trigger1 = !HitPauseTime
trigger2 = AnimElem = 4
value = stateno + 1


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


;---------------------------------------------------------------------------
;Crawler Assault 11
[Statedef 3411]
type    = S
movetype= A
physics = N
juggle  = 1
;poweradd=
velset = 3,0
anim = 410
ctrl = 0
sprpriority = 0
facep2 = 1


[State 3411]
type = Helper
trigger1 = Time = 0
stateno = 33120
ownpal = 1


[State 3411]
type = AfterImage
trigger1 = Time = 0
time = 27
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 3411]
type = Velset
trigger1 = P2BodyDist X <= 0
x = 0.5



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


[State 3411]
type = HitDef
attr = S, HA
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 120,5
animtype = Hard
priority  = 5, Hit
guardflag = MA
pausetime = 5,5
sparkxy = -10,-70
hitsound   = S1,6
guardsound = S4,0
sparkno = 1
ground.type = High
ground.slidetime = 15
ground.hittime  = 25
ground.velocity = -8,-5
air.velocity = -8,-5
airguard.velocity = -5
guard.velocity = -5
fall = 1
air.fall = 1
getpower = 0



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


;---------------------------------------------------------------------------
;Crawler Assault 12
[Statedef 3412]
type    = S
movetype= A
physics = N
juggle  = 1
;poweradd=
velset = 7,0
anim = 3401
ctrl = 0
sprpriority = 0
facep2 = 1


[State 3412]
type = Helper
trigger1 = Time = 0
stateno = 33120
ownpal = 1


[State 3412]
type = AfterImage
trigger1 = Time = 0
time = 27
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 3412]
type = Velset
trigger1 = P2BodyDist X <= 0
x = 0.5


[State 3412]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = S, HT          ;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 = 810
p2stateno = 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 3412]
type = ChangeState
trigger1 = Time >= 27
value = 3419
ctrl = 0





;---------------------------------------------------------------------------
;Crawler Assault End
[Statedef 3419]
type    = S
movetype= I
physics = S
juggle  = 1
;poweradd=
velset = 0,0
;anim = 3001
ctrl = 0
sprpriority = 0
;facep2 = 1


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



;one for j.j.
[Statedef 3500]
type    = S
movetype= A
physics = N
juggle  = 4
velset = 0,0
anim = 3500
poweradd= 100
ctrl = 0
sprpriority = 0
facep2 = 1

[State 3410]
type = Helper
trigger1 = time = 12
stateno = 33120
ownpal = 1


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

;teste de variavel 18
;[State 0, VarSet]
;type = VarSet
;trigger1 =  time = 0
;v = 18    ;fv = 10
;value = 3


[State 3400]
type = SuperPause
trigger1 = time = 12
pos = 10,-60
sound = -1;S3400,3
poweradd = -1000
time = 60
movetime = 60
unhittable = 1
darken = 0


;about 8 ticks before 3110
[State 3400]
type = Helper
trigger1 = Time = 13
stateno = 33117
supermovetime = 9999
pausemovetime = 9999
pos = 0,-200
ownpal = 1
postype = back
size.xscale = 1
size.yscale = 1

[State 3400]
type = Helper
trigger1 = Time = 21
stateno = 33110
id = 33110
supermovetime = 9999
pausemovetime = 9999
pos = 2,-57
ownpal = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = 182,0

[State 3510, branco]
type = helper
trigger1 = AnimElem = 5
ID = 3515
pos = 0,0
postype = p2
stateno = 3515
supermovetime = 9999
helpertype = normal
name = "Branco"
ownpal = 0
keyctrl = 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 = 3510       ;On success, changes to state 810
p2stateno = 3520 + var(18)       ;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 = 3500

[State 3400]
type = PlaySnd
trigger1 = Time = 4
value = 220,0

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

[Statedef 3510]
type    = S
movetype= I
physics = N
anim = 3510
poweradd = 60
juggle  = 0
velset = 0,0
ctrl = 0
sprpriority = 0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 181,2

[State 1000, gastateia]
type = VarAdd
trigger1 = animelem = 1
v = 40
value = -5

[State 0, PosSet]
type = PosSet
trigger1 = AnimElem = 2
x = 10
;ignorehitpause =
;persistent =

[State 0, TargetBind]
type = TargetBind
trigger1 = AnimElem = 2
pos = 50,0



[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 0
value = 3510 + var(18)

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3
trigger3 = AnimElem = 4
trigger4 = AnimElem = 5
value = 182,0

[State 3510, branco]
type = helper
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3
trigger3 = AnimElem = 4
trigger4 = AnimElem = 5
ID = 3515
pos = 0,0
postype = p2
stateno = 3515
supermovetime = 9999
helpertype = normal
name = "Branco"
ownpal = 0
keyctrl = 0

[State 0, Explod]
type = Explod
trigger1 = AnimElem = 1 && facing = 1
anim = 3517
ID =  3517 ;()
pos = 20,160
postype = left
facing = 1
vfacing = 1
bindtime = 1
removetime = 116
scale = 1,1
sprpriority = -2
ontop = 1
shadow = 0,0,0
ownpal = 0
removeongethit = 0

[State 0, Explod]
type = Explod
trigger1 = AnimElem = 1 && facing = -1
anim = 3517
ID =  3517 ;()
pos = -20,160
postype = right
facing = -1
vfacing = 1
bindtime = 1
removetime = 116
scale = 1,1
sprpriority = -2
ontop = 1
shadow = 0,0,0
ownpal = 0
removeongethit = 0
;ignorehitpause =
;persistent =

[State 3510]
type = TargetLifeAdd
trigger1 = Animtime = 0
value = -220
kill = 1
absolute = 1

[State 0, Explod]
type = Explod
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3
trigger3 = AnimElem = 4
trigger4 = AnimElem = 5
anim = ifelse((AnimElem = 5),3530+var(18),3516)
ID =  3516 ;()
pos = (ifelse((facing = 1),-20,20)),-80
postype = p1  ;p2,front,back,left,right
facing = ifelse((AnimElem = 5)&& (facing = 1),1,-1)
vfacing = 1
bindtime = 1
removetime = 1
scale = 1,1
sprpriority = 10
ontop = 1
shadow = 0,0,0
ownpal = 0
removeongethit = 0




[State 4001, palfx]
type = palfx
trigger1 = (AnimElem = 5)
add = 10,10,10
sinadd = -50,-50,-50
color = 0
time = 79

[State 4001, bgpalfx]
type = bgpalfx
trigger1 =(AnimElem = 5)
invertall = 0
add = 100,100,100
sinadd = -50,-50,-50
color = 0
time = 79

[State 3400]
type = SuperPause
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3
trigger3 = AnimElem = 4
trigger4 = AnimElem = 5
time = 79
anim = -1
movetime = 79
unhittable = 1
darken = 0






[State 3510]
type = ChangeState
trigger1 = Animtime = 0
value = 105
ctrl = 0


[Statedef 3515]
ctrl = 0
anim = 3515

[State 3515, Assert]
type = AssertSpecial
trigger1 =1
flag = NoFG
flag2 = NoBarDisplay
flag3 = GlobalNoShadow


[State 3515, PalFX]
type = AllPalFX
trigger1 = Time >= 0
time = 1
color = 256-(time*4)
add = 130+(time*18), 130+(time*18), 130+(time*18)
ignorehitpause = 1

[State 3515, 1]
type = DestroySelf
trigger1 = Time >= 15


[Statedef 3516]
ctrl = 0
anim = 3515

[State 3515, Assert]
type = AssertSpecial
trigger1 =1
flag = NoFG
flag2 = NoBarDisplay
flag3 = GlobalNoShadow


[State 3515, PalFX]
type = AllPalFX
trigger1 = Time >= 0
time = 1
color = 0+(time*4)
add = 130-(time*18), 130-(time*18), 130-(time*18)
ignorehitpause = 1

[State 3515, 1]
type = DestroySelf
trigger1 = Time >= 15

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

[State 3520]
type = ChangeAnim
trigger1 = Time = 0
value = 5300

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

[State 3520]
type = ChangeAnim2
trigger1 = Time = 80
value = 3520

[State 4001, palfx]
type = palfx
trigger1 = anim!=5300&&(AnimElem = 4)
add = 10,10,10
sinadd = -50,-50,-50
color = 0
time = 1

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

[State 3520]
type = SelfState
trigger1 = animtime = 0 && anim != 5300
value = 5050

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

[State 3520]
type = ChangeAnim
trigger1 = Time = 0
value = 5300

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

[State 3520]
type = ChangeAnim2
trigger1 = Time = 80
value = 3521

[State 4001, palfx]
type = palfx
trigger1 = anim!=5300&&(AnimElem = 4)
add = 10,10,10
sinadd = -50,-50,-50
color = 0
time = 1

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

[State 3521]
type = SelfState
trigger1 = animtime = 0 && anim != 5300
value = 5050

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

[State 3520]
type = ChangeAnim
trigger1 = Time = 0
value = 5300

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

[State 3520]
type = ChangeAnim2
trigger1 = Time = 80
value = 3522

[State 4001, palfx]
type = palfx
trigger1 = anim!=5300&&(AnimElem = 4)
add = 10,10,10
sinadd = -50,-50,-50
color = 0
time = 1

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

[State 3522]
type = SelfState
trigger1 = animtime = 0 && anim != 5300
value = 5050

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

[State 3520]
type = ChangeAnim
trigger1 = Time = 0
value = 5300

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

[State 3520]
type = ChangeAnim2
trigger1 = Time = 80
value = 3523

[State 4001, palfx]
type = palfx
trigger1 = anim!=5300&&(AnimElem = 4)
add = 10,10,10
sinadd = -50,-50,-50
color = 0
time = 1

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

[State 3523]
type = SelfState
trigger1 = animtime = 0 && anim != 5300
value = 5050



[Statedef 3600]
type    = A
movetype= A
physics = N
juggle  = 1
velset = 0,0
anim = 3600
poweradd= 100
ctrl = 0
sprpriority = 0
facep2 = 1

[State 1000, gastateia]
type = VarAdd
trigger1 = animelem = 4
v = 40
value = -3

[State 1340]
type = PlaySnd
trigger1 = animelem = 2
trigger2 = animelem = 3
trigger3 = animelem = 4
trigger4 = animelem = 5
value = 121,0

[State 1340]
type = PlaySnd
trigger1 = animelem = 7
value = 7710,0

[State 105]
type = VelSet
trigger1 = AnimElem = 7
x = 7
y = -6

[State 105]
type = VelAdd
trigger1 = AnimElem = 7, >= 0
y = 0.3

[State 3600, ChangeState]
type = ChangeState
triggerall =  time > 21
trigger1 = p2bodydist X < 10 || pos y > -6
value =  3601
;anim =
;ignorehitpause =
;persistent =
[Statedef 3601]
type    = U
movetype= A
physics = N
juggle  = 1
ctrl = 0
anim = 3601
sprpriority = 0

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

[State 620]
type = PlaySnd
trigger1 = Time = 5
value = 210,0


[State 620]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, NA
animtype  = Hard
damage    = 150,2
guardflag = HA
pausetime = 5,7;0,17;7,10
sparkno = 3
sparkxy = 20,-50;+floor(P2Dist Y)
hitsound   = S1,2
guardsound = S4,0
ground.type = High
air.type = Low
ground.slidetime = 15
ground.hittime  = 30
air.hittime = 45
ground.velocity = -15,-2
air.velocity = -15,5
fall = 1
air.fall = 1
fall.recover =0

[State 0, Explod]
type = Explod
trigger1 = animelem = 6 ;&& hitcount = 0
anim = 3603
ID = 3603
pos = 10,-30
postype = p1  ;p2,front,back,left,right
removetime = 12
scale = 1,1
sprpriority = 2
removeongethit = 1




[State 107]
type = PosSet
trigger1 =  pos y > -6
y = 0

[State 620]
type = ChangeState
trigger1 = pos y > -6
value = 50

[State 620]
type = ChangeState
trigger1 = animtime = 0 ;&& hitcount != 1
value = 50


[Statedef 3602]
type    = S
movetype= A
physics = S
juggle  = 1
ctrl = 0
vel = 0,0
anim = 3602
sprpriority = 0

[State 3410]
type = Helper
trigger1 = time = 0
stateno = 33120
ownpal = 1


[State 0, Explod]
type = Explod
trigger1 = animelem = 2
anim = 3603
ID = 3603
pos = 5,-35
postype = p1  ;p2,front,back,left,right
removetime = 12
scale = 1,1
sprpriority = 2
removeongethit = 1


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

[Statedef 3604]
type    = A
movetype= A
physics = N
juggle  = 1
ctrl = 0
vel = 0,0
anim = 3604
sprpriority = 0

[State 3410]
type = Helper
trigger1 = time = 0
stateno = 33120
ownpal = 1


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

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 3
x = 0
y = -4


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

[State 620]
type = PlaySnd
trigger1 = Time = 5
value = 220,0


[State 620]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, NA
animtype  = Hard
damage    = 150
guardflag = HA
pausetime = 5,7;0,17;7,10
sparkno = S8220
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  = 50
air.hittime = 55
ground.velocity = 0,-13
air.velocity = 0,-12
fall = 1
air.fall = 1
fall.recover =0
p2stateno = 7321

[State 0, Explod]
type = Explod
trigger1 = animelem = 4
anim = 3603
ID = 3603
pos = 0,-130
bindtime = -1
postype = p1  ;p2,front,back,left,right
removetime = 12
scale = 1,1
sprpriority = 2
removeongethit = 1

;[State 620]
;type = VelAdd
;trigger1 = Pos Y < 0; && !var(54)
;trigger2 = Animelem = 4
;y = 0.3

[State 3408]
type = AfterImage
trigger1 = time = 0
time = 15
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 7711, 1]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0

[State 620]
type = ChangeState
trigger1 = animtime = 0 && command = "holdup"
value = 7710
ctrl = 1

[State 620]
type = ChangeState
trigger1 = animtime = 0 && command != "holdup"
value = 7710
ctrl = 1


[Statedef 3605]
type    = S
movetype= A
physics = N
juggle  = 1
ctrl = 0
vel = 0,0
anim = 3605
sprpriority = 0

[State 3410]
type = Helper
trigger1 = time = 0
stateno = 33120
ownpal = 1


[State 3408]
type = AfterImage
trigger1 = time = 0
time = 20
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 0, VelSet]
type = VelSet
trigger1 = animelem = 1
x = 0
y = 0


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

[State 620]
type = PlaySnd
trigger1 = Time = 5
value = 220,0

[State 1560]
type = Helper
trigger1 = AnimElem = 2
helpertype = player
postype = p1
stateno = 3606
id = 3606
pos = 15,-30
ownpal = 1
persistent = 0

[State 0, Explod]
type = Explod
trigger1 = Numhelper(3606)
trigger1 = Helper(3606), MoveHit
anim = 3608
ID = 3608
pos = 10,-27
postype = p1;,front,back,left,right
removetime = 8
scale = 1,1
sprpriority = 2


[State 3606]
type = ChangeState
trigger1 = Numhelper(3606)
trigger1 = Helper(3606), MoveHit
value = 3607
ctrl = 0



[State 0, Explod]
type = Explod
trigger1 = animelem = 5
anim = 3603
ID = 3603
pos = 10,-27
postype = p1  ;p2,front,back,left,right
removetime = 12
scale = 1,1
sprpriority = 2
removeongethit = 1

;[State 620]
;type = VelAdd
;trigger1 = Pos Y < 0; && !var(54)
;trigger2 = Animelem = 4
;y = 0.3

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

[Statedef 3606]
type = A
movetype = A
physics = N
;anim = 21540
ctrl = 0
sprpriority = -1
velset = 0,0
hitcountpersist = 1

[State 3606]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 3606
value = 3606


[State 3606]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 3606]
type = HitBy
trigger1 = 1
value = SCA,AP

[State 3606]
type = HitOverride
trigger1 = 1
stateno = 21549
attr = SCA,AP
slot = 0
time = -1


[State 3606]
type = HitDef
attr = SA, SP
trigger1 = Time < 12
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 4*(Root,var(30)),floor(Root,var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 0,7
sparkxy = 10,-30
hitsound   = S1450,2
guardsound = S4,0
sparkno = -1
guard.sparkno = S8430
ground.type = High
ground.slidetime = 10
ground.hittime  = 40
ground.velocity = 10,-6
air.hittime = 40
air.velocity = 10,-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 = 1
;p1stateno = 3604




[State 3606]
type = VelSet
trigger1 = Time = 9
x = 7

[State 3606]
type = DestroySelf
trigger1 = hitcount = 1
trigger2 = ScreenPos Y < -100
trigger3 = Time > 20


[Statedef 3607]
type = A
movetype = A
physics = N
anim = 3607
ctrl = 0
sprpriority = 1
velset = 0,0
hitcountpersist = 1

[State 3410]
type = Helper
trigger1 = time = 0
stateno = 33120
ownpal = 1

[State 3607, ChangeState]
type = ChangeState
trigger1 = p2bodydist X < 30
value =  3604

[State 0, Explod]
type = Explod
trigger1 = time > 30
anim = 3603
ID = 3603
pos = 10,-27
postype = p1  ;p2,front,back,left,right
removetime = 12
scale = 1,1
sprpriority = 2
removeongethit = 1

[State 3607, ChangeState]
type = ChangeState
trigger1 = time > 30
value =  0
ctrl = 1



[Statedef 3900]
type    = S
movetype= A
physics = S
anim = 3900
velset = 0,0
sprpriority = -2
ctrl = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 16
value = 181,1

[State 3410]
type = Helper
trigger1 = time = 0
stateno = 33120
ownpal = 1


[State 3040]
type = Explod
trigger1 = AnimElem = 1 && StateType != A
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1


[State 3040]
type = SuperPause
trigger1 = animelem = 2
pos = 10,-60
sound = -1;S3000,3
poweradd = -1000
time = 60
movetime = 60
unhittable = 1
darken = 0

;about 8 ticks before 3110
[State 3000]
type = Helper
trigger1 = Time = 6
stateno = 33117
supermovetime = 9999
pausemovetime = 9999
pos = 0,-200
ownpal = 1
postype = back
size.xscale = 1
size.yscale = 1

[State 3000]
type = Helper
trigger1 = Time = 14
stateno = 33110
id = 33110
supermovetime = 9999
pausemovetime = 9999
pos = -24,-64
ownpal = 1




[State 1000, gastateia]
type = VarAdd
trigger1 = animelem = 4
v = 40
value = -3

 [State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = 1450,1

[State 4000, 8]
type = Projectile
trigger1 = AnimElem = 8
ProjID = 3901
projanim = 3901
projhitanim = 3902
projremanim = 3902
projcancelanim = 3902
velocity = 10,0
offset = 0,-45
; HitDef
attr = S,SP
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = medium
priority = 4,Hit   ;Hit,Miss,Dodge
damage = 10,5
pausetime = 4,4
sparkno = -1
guard.sparkno = -1
hitsound = S1450,2
guardsound = S1450,2
ground.type = Low
ground.slidetime = 8
ground.hittime  = 8
ground.velocity = -6,0
air.velocity = -2,-2
p1stateno = 3910
p2stateno = 3920


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

[Statedef 3910]
type    = S
movetype= A
physics = S
anim = 3910
velset = 0,0
sprpriority = 8

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
trigger2 = animelem = 4
value = 7710,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = 1540,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 12
trigger2 = animelem = 22
trigger3 = animelem = 34
trigger4 = animelem = 42
value = 1,1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 9
trigger2 = animelem = 16
trigger3 = animelem = 28
trigger4 = animelem = 38
trigger5 = animelem = 48
trigger6 = animelem = 53
trigger7 = animelem = 60
value = 1,2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 67
value = 1,3

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 63
value = 220,0
channel = -1

[State 0, PosAdd]
type = Posset
trigger1 = animelem = 3
x = enemynear, pos x + ifelse(facing=1,-70,70)
y = 0
;ignorehitpause =
;persistent =
[State 7130, Combo]
type = HitAdd
trigger1 = animelem = 9
trigger2 = animelem = 12
trigger3 = animelem = 16
trigger4 = animelem = 22
trigger5 = animelem = 28
trigger6 = animelem = 34
trigger7 = animelem = 38
trigger8 = animelem = 42
trigger9 = animelem = 48
trigger10 = animelem = 53
trigger11 = animelem = 60
trigger12 = animelem = 67
value = 1


[State 0, Explod]
type = Explod
trigger1 = animelem = 9
anim = F1
ID = 0
pos = 55,-78
postype = p1
bindtime = 1
removetime = -2
sprpriority = 10

[State 0, Explod]
type = Explod
trigger1 = animelem = 12
anim = F1
ID = 0
pos = 60,-52
postype = p1
bindtime = 1
removetime = -2
sprpriority = 10

[State 0, Explod]
type = Explod
trigger1 = animelem = 16
anim = F1
ID = 0
pos = 55,-70
postype = p1
bindtime = 1
removetime = -2
sprpriority = 10

[State 0, Explod]
type = Explod
trigger1 = animelem = 22
anim = F1
ID = 0
pos = 60,-80
postype = p1
bindtime = 1
removetime = -2
sprpriority = 10

[State 0, Explod]
type = Explod
trigger1 = animelem = 28
anim = F1
ID = 0
pos = 70,-70
postype = p1
bindtime = 1
removetime = -2
sprpriority = 10

[State 0, Explod]
type = Explod
trigger1 = animelem = 34
anim = F1
ID = 0
pos = 70,-70
postype = p1
bindtime = 1
removetime = -2
sprpriority = 10

[State 0, Explod]
type = Explod
trigger1 = animelem = 38
anim = F1
ID = 0
pos = 65,-60
postype = p1
bindtime = 1
removetime = -2
sprpriority = 10

[State 0, Explod]
type = Explod
trigger1 = animelem = 42
anim = F1
ID = 0
pos = 70,-65
postype = p1
bindtime = 1
removetime = -2
sprpriority = 10

[State 0, Explod]
type = Explod
trigger1 = animelem = 48
anim = F1
ID = 0
pos = 70,-70
postype = p1
bindtime = 1
removetime = -2
sprpriority = 10

[State 0, Explod]
type = Explod
trigger1 = animelem = 53
anim = F1
ID = 0
pos = 80,-70
postype = p1
bindtime = 1
removetime = -2
sprpriority = 10

[State 0, Explod]
type = Explod
trigger1 = animelem = 60
anim = F1
ID = 0
pos = 65,-70
postype = p1
bindtime = 1
removetime = -2
sprpriority = 10

[State 0, Explod]
type = Explod
trigger1 = animelem = 67
anim = F2
ID = 0
pos = 90,-70
postype = p1
bindtime = 1
removetime = -2
sprpriority = 10



[State 0, Explod]
type = Explod
trigger1 = animelem = 2
anim = 3905
ID = 3905
pos = 0,0
postype = p1
bindtime = 1
removetime = 20
sprpriority = 0
vel = 0,-15

[State 0, Explod]
type = Explod
trigger1 = animelem = 4
anim = 3906
ID = 3906
pos = 0,-200
postype = p1
bindtime = 1
removetime = 20
sprpriority = 0
vel = 0,10

[State 0, Explod]
type = Explod
trigger1 = animelem = 1
anim = 3903
ID = 3903
pos = 0,-45
postype = p2
bindtime = -1
removetime = 35
sprpriority = 3

[State 0, Explod]
type = Explod
trigger1 = time = 35
anim = 3907
ID = 3907
pos = 0,0
postype = p2
bindtime = -1
removetime = -2
sprpriority = -3

[State 0, Explod]
type = Explod
trigger1 = animelem = 67
anim = 3908
ID = 3908
pos = 0,-55
postype = p2
bindtime = 1
removetime = -2
sprpriority = -3

[State 0, Explod]
type = Explod
trigger1 = animelem = 67
anim = 3911
ID = 3911
pos = 0,-55
facing = -1
postype = p2
bindtime = 1
removetime = -2
sprpriority = 3

[State 0, Explod]
type = Explod
trigger1 = time = 35
anim = 3909
ID = 3909
pos = 0,0
postype = p2
bindtime = -1
removetime = 205
sprpriority = 3

[State 0, Explod]
type = Explod
trigger1 = time = 15
anim = 3904
ID = 3904
pos = 0,-50
postype = p2
bindtime = -1
removetime = 20
sprpriority = -3


[State 1000, gastateia]
type = VarAdd
trigger1 = animelem = 4
v = 40
value = -2




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




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

[State 0, ChangeState]
type = selfState
triggerall = p2stateno != 3910
trigger1 = time = 2
value = 5100
ctrl = 0


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


[State 0, LifeAdd]
type = LifeAdd
trigger1 = animelem = 2
trigger2 = animelem = 5
trigger3 = animelem = 9
trigger4 = animelem = 12
trigger5 = animelem = 15
trigger6 = animelem = 19
trigger7 = animelem = 22
trigger8 = animelem = 26
trigger9 = animelem = 30
trigger10 = animelem = 35
trigger11 = animelem = 40
;trigger12 = animelem = 60
value = -9
kill = 0
absolute = 1


[State 810, TargetBind]
type = posadd ;pos 0
trigger1 = time = 0
x = 10



[State 810, TargetBind]
type = posadd ;pos 0
trigger1 = time = 35
x = 0
y = -60

[State 810, TargetBind]
type = posadd  ;pos 0 - 1
trigger1 = time = 67
trigger2 = time = 90
trigger3 = time = 183
x = -26
y = 2

[State 810, TargetBind]
type = posadd ;pos 1 - 2
trigger1 = time = 70
trigger2 = time = 93
trigger3 = time = 106
trigger4 = time = 125
trigger5 = time = 138
trigger6 = time = 186
trigger7 = time = 198
trigger8 = time = 210
x = -23
y = -9

[State 810, TargetBind]
type = posadd ;pos 2 - 3
trigger1 = time = 73
trigger2 = time = 96
trigger3 = time = 109
trigger4 = time = 128
trigger5 = time = 141
trigger6 = time = 189
trigger7 = time = 201
trigger8 = time = 213
x = -11
y = -6
;;---testes

[State 810, TargetBind]
type = posadd  ;pos 3 - 2
trigger1 = time = 84
trigger2 = time = 99
trigger3 = time = 119
trigger4 = time = 132
trigger5 = time = 173
trigger6 = time = 192
trigger7 = time = 204
trigger8 = time = 216
x = 11
y = 6

[State 810, TargetBind]
type = posadd  ;pos 2 - 1
trigger1 = time = 102
trigger2 = time = 122
trigger3 = time = 135
trigger4 = time = 176
trigger5 = time = 195
trigger6 = time = 207
x = 23
y = 9

[State 810, TargetBind]
type = posadd  ;pos 2 - 0
trigger1 = time = 87
trigger2 = time = 219
x = 49
y = 7

[State 810, TargetBind]
type = posadd  ;pos 1 - 0
trigger1 = time = 179
x = 26
y = -2

[State 0, TargetState]
type = changestate
trigger1 = time = 240
value = 3921



[Statedef 3921]
type    = A
movetype= H
physics = N
velset = -15,-5
sprpriority = 0

[State 0, LifeAdd]
type = LifeAdd
trigger1 = time = 0
value = -120
kill = 1
absolute = 1

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

[State 816, PosAdd]
type = PosAdd
trigger1 = Time = 0
Y = 45

[State 816, VelAdd]
type = VelAdd
trigger1 = Time >= 1
Y = 0.5

[State 816, SelfState]
type = SelfState
trigger1 = (Pos Y >= 0) && (Vel Y > 0)
value = 5100
ctrl = 0





;---------------------------------------------------------------------------
; Hyper Spark Helper
[Statedef 33110]
type    = S
movetype= I
physics = N
juggle  = 5
;poweradd= 65
ctrl = 0
velset = 0,0
anim = 32701
sprpriority = 4

[State 33110]
type = PlaySnd
trigger1 = Time = 0
value = 3000,3

[State 33110]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = Parent,MoveType = H

;---------------------------------------------------------------------------
; Hyper Portrait Helper
[Statedef 33117]
type    = S
movetype= I
physics = N
juggle  = 5
;poweradd= 65
ctrl = 0
velset = 0,0
anim = 9800;32717
sprpriority = -2


[State 33117]
type = AssertSpecial 
trigger1 = anim = 9800;32717
flag = noBG 
flag2 = nobardisplay
flag3 = noFG 
ignorehitpause = 1

[State 33117]
type = VarSet
trigger1 = Time = 0
var(1) = random%2

[State 33117]
type  = Explod 
trigger1 = Time = 0 && facing = 1
anim = 32718 ;+  ifelse((root,stateno = 3000)||(root,stateno = 3200)||(root,stateno = 3100)||(root,stateno = 3400),1,0)
postype = left;back
ID = 32717 
sprpriority = -2
removetime = 7
pos = 0,0
scale = 1,1
bindtime = 5
facing = 1
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999
supermove = 9999
pausemove = 9999

[State 33117]
type  = Explod 
trigger1 = Time = 0 && facing = -1
anim = 32718 ;+  ifelse((root,stateno = 3000)||(root,stateno = 3200)||(root,stateno = 3100)||(root,stateno = 3400),1,0)
postype = right;back
ID = 32717 
sprpriority = -2
removetime = 7
pos = 0,0
scale = 1,1
bindtime = 5
facing = -1
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999
supermove = 9999
pausemove = 9999

[State 33117]
type= Modifyexplod
trigger1 = Numexplod(32717) && Time <= 6
ID = 32717
scale = 1.3-(.13*(time)),1.3-(.13*(time))

[State 33117]
type  = Explod 
trigger1 = Time = 7 && facing = 1
anim = 32718 ;+  ifelse((root,stateno = 3000)||(root,stateno = 3200)||(root,stateno = 3100)||(root,stateno = 3400),1,0)
postype = left;back
ID = 32717 
sprpriority = -2
removetime = 55
pos = 0,0
scale = 1,1
;bindtime = -1
facing = 1
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999
supermove = 9999
pausemove = 9999
vel = -0.2

[State 33117]
type  = Explod 
trigger1 = Time = 7 && facing = -1
anim = 32718 ;+  ifelse((root,stateno = 3000)||(root,stateno = 3200)||(root,stateno = 3100)||(root,stateno = 3400),1,0)
postype = right;back
ID = 32717 
sprpriority = -2
removetime = 55
pos = 0,0
scale = 1,1
;bindtime = -1
facing = -1
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999
supermove = 9999
pausemove = 9999
vel = 0.2


[State 33117]
type = RemoveExplod
trigger1 = Time > 17
trigger1 = NumHelper(33110) = 0
trigger2 = Parent,MoveType = H
id = 32717

[State 33117]
type = DestroySelf
trigger1 = Time > 17
trigger1 = NumHelper(33110) = 0
trigger2 = Parent,MoveType = H


;---------------------------------------------------------------------------
; Hyper Bg
[Statedef 33120]
physics = N
anim = 9800
sprpriority = -3



[State 33120]
type = VarSet
trigger1 = Time = 0
var(3) = Root,Stateno


[State 33120]
type = AssertSpecial 
trigger1 = anim = 9800
flag = noBG 
flag2 = noFG 
;flag3 = nobardisplay
ignorehitpause = 1


[State 33120]
type  = Explod 
triggerall = Time = 0
trigger1 = p2life > 0
anim = 32711
postype = left
ID = 32710 
sprpriority = -4
removetime = -1
pos = 0,0
scale = 1.3,1.3
bindtime = -1
;facing=1
ignorehitpause=1
supermovetime=9999
pausemovetime=9999
supermove = 9999
pausemove = 9999





[State 33120] 
type = RemoveExplod 
triggerall = Numexplod(32710)
;trigger1 = Root, stateno != var(3)
trigger1 = p2life = 0
trigger2 = Root,MoveType != A
trigger3 = root, stateno = 3910 && root, animelem = 5

[State 33120] 
type = Destroyself 
triggerall = Numexplod(32710)= 0
triggerall = Time > 7
;trigger1 = Root, stateno != var(3)
trigger1 = Root,MoveType != A
trigger2 = root, stateno = 3910 && root, animelem = 5

[State 33120]
type = ChangeState
trigger1 = p2life = 0
trigger2 = roundstate = 3
value = 33121

;---------------------------------------------------------------------------
; Hyper KO Bg
[Statedef 33121]
physics = N
anim = 9800
sprpriority = -3




[State 33121]
type = AssertSpecial 
trigger1 = anim = 9800
flag = noBG 
flag2 = nobardisplay
flag3 = noFG 
ignorehitpause = 1

[State 33121]
type  = Explod 
triggerall = Time = 0
trigger1 = p2life <= 0
anim = 32715
postype = left
ID = 32715 
sprpriority = -4
pos = 0,0
scale = 1,1
bindtime = -1
removetime = -2
ignorehitpause=1
supermovetime=9999
pausemovetime=9999
supermove = 9999
pausemove = 9999

[State 33121]
type = null;PlaySnd
trigger1 = Time = 1
value = 8000,1
channel = 1

[State 33121] 
type = Destroyself 
trigger1 = roundstate = 4
trigger2 = Root,stateno = [180,189]
trigger3 = Time = 48

;---------------------------------------------------------------------------------------
;dizzy
[Statedef 5300]
type    = S
movetype= H
physics = N
juggle  = 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  = 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))



;------------------------------------------------------------------------------------------------------------
;Stand Spark Helper
[Statedef 6000]
type = S
movetype = I
physics = N
anim = 6000+random%6
ctrl = 0
sprpriority = 2
velset = 0,0



[State 6000]
type = varset
trigger1 = Time = 0
var(2) = parent,stateno

[State 6000]
type = varset
trigger1 = Time = 0
var(1) = random%4

[State 6000]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = Parent,Stateno != var(2)


[State 6000]
type = BindToParent
trigger1 = var(1) = 0
pos = 4,-103


[State 6000]
type = BindToParent
trigger1 = var(1) = 1
pos = 20,-50

[State 6000]
type = BindToParent
trigger1 = var(1) = 2
pos = -34,-90

[State 6000]
type = BindToParent
trigger1 = var(1) = 3
pos = -17,-45


;------------------------------------------------------------------------------------------------------------
;Guard Shield Helper
[Statedef 6120]
type = S
movetype = I
physics = N
anim = 6120 + (Parent,StateType = C) + 2*(Parent,StateType = A)
ctrl = 0
sprpriority = 2
velset = 0,0


[State 6120]
type = Turn
trigger1 = AnimElem = 4, < 0
trigger1 = facing!= parent,facing

[State 6120]
type = ChangeAnim
trigger1 = AnimElem = 4
value = anim
elem = 3


[State 6120]
type = ChangeAnim
trigger1 = Parent,Anim = [140,142]
trigger2 = (Parent,Anim != [120,155])
value = anim
elem = 4
persistent = 0

[State 6120]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = NumHelper(6120) = 2

[State 6120]
type = BindToParent
trigger1 = AnimElemNo(0) = [1,4]
pos = 0,0


;------------------------------------------------------------------------------------------------------------
;Guard Push Shield Helper
[Statedef 6125]
type = S
movetype = I
physics = N
anim = 27610 + 5*(Parent,StateType = C) + 10*(Parent,StateType = A)
ctrl = 0
sprpriority = 2
velset = 0,0

[State 6125]
type = Turn
trigger1 = AnimElem = 5, < 0
trigger1 = facing!= parent,facing

[State 6125]
type = ChangeAnim
trigger1 = AnimTime = 0 && Anim = 27610
value = 6120
elem = 5
persistent = 0


[State 6125]
type = ChangeAnim
trigger1 = AnimTime = 0 && Anim = 27615
value = 6121
elem = 5
persistent = 0


[State 6125]
type = ChangeAnim
trigger1 = AnimTime = 0 && Anim = 27620
value = 6122
elem = 5
persistent = 0

[State 6125]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = NumHelper(6120) = 2

[State 6125]
type = BindToParent
trigger1 = Parent,Stateno = [7610,7620]
pos = 0,0




;------------------------------------------------------------------------------------------------------------
;Win 3 Helper
[Statedef 6183]
type = S
movetype = I
physics =N
anim = 6183
ctrl = 0
sprpriority = -1
velset = 0,0



[State 6183]
type = varset
trigger1 = Time = 0
var(2) = parent,stateno


[State 6183]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 6183]
type = ChangeAnim
trigger1 = AnimElem = 3
value = anim


[State 6183]
type = ChangeAnim
trigger1 = Parent,AnimElem = 21
value = anim
elem = 3


[State 6183]
type = PlaySnd
trigger1 = AnimElem = 3, = 1
value = 182,0


[State 6183]
type = DestroySelf
trigger1 = parent,stateno != var(2)




;------------------------------------------------------------------------------------------------------------
;Intro Helper
[Statedef 6192]
type = S
movetype = I
physics =N
anim = 6192
ctrl = 0
sprpriority = -1
velset = 0,0


[State 6192]
type = ChangeAnim
trigger1 = ParentDist Y < -90
value = anim
elem = 2
persistent = 0

[State 6192]
type = null;Turn
trigger1 = Parent,Facing != Facing

[State 6192]
type = DestroySelf
trigger1 = Parent,AnimElem = 8
trigger2 = parent,stateno != [192,199]


[State 6192]
type = null;BindToParent
trigger1 = 1




;------------------------------------------------------------------------------------------------------------
;Intro Helper
[Statedef 6193]
type = S
movetype = I
physics =N
anim = 6193
ctrl = 0
sprpriority = -1
velset = 0,0



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

[State 6193]
type = VelSet
trigger1 = Time = 0
x = -2
y = -8

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


[State 6193]
type = PlaySnd
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 192,1
persistent = 0

[State 6193]
type = VelSet
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
y = -5
persistent = 0



[State 6193]
type = DestroySelf
trigger1 = parent,stateno != [192,199]


[State 6193]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 6194


;------------------------------------------------------------------------------------------------------------
;Intro Helper
[Statedef 6194]
type = S
movetype = I
physics =N
anim = 6194
ctrl = 0
sprpriority = -1
velset = 0,0


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

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

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



[State 6194]
type = DestroySelf
trigger1 = parent,stateno != [192,199]
trigger2 = Time >= 60

[State 6194]
type = AssertSpecial
trigger1 = Time >= 30 && Time%2 = 0
flag = invisible


;------------------------------------------------------------------------------------------------------------
;Taunt Helper
[Statedef 6195]
type = S
movetype = I
physics =N
anim = 6195+parent,var(1) - 20*(parent,facing = -1)
ctrl = 0
sprpriority = 1
velset = 0,0



[State 6195]
type = Turn
trigger1 = Time = 0
trigger1 = parent,facing = -1

[State 6195]
type = DestroySelf
trigger1 = Parent,Stateno != 195
trigger2 = Parent,AnimElem = 8



[State 6195]
type = BindToParent
trigger1 = parent,facing
pos = 100,0

[State 6195]
type = BindToParent
trigger1 = parent,facing = -1
pos = 20,0

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



;------------------------------------------------------------------------------------------------------------
;Stand Strong Punch Helper
[Statedef 6220]
type = S
movetype = I
physics =N
anim = 6220
ctrl = 0
sprpriority = 3
velset = 0,0



[State 6620]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 6220]
type = DestroySelf
trigger1 = Parent,Stateno != 220
trigger2 = AnimTime = 0

[State 6620]
type = BindToParent
trigger1 = 1
pos = 0,0


;------------------------------------------------------------------------------------------------------------
;Stand Strong Punch Helper
[Statedef 6221]
type = S
movetype = I
physics =N
anim = 6221
ctrl = 0
sprpriority = 3
velset = 0,0



[State 6621]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 6221]
type = DestroySelf
trigger1 = Parent,Stateno != 220
trigger2 = AnimTime = 0

[State 6621]
type = BindToParent
trigger1 = 1
pos = 0,0



;------------------------------------------------------------------------------------------------------------
;Stand Strong Punch Helper
[Statedef 6222]
type = S
movetype = I
physics =N
anim = 6222
ctrl = 0
sprpriority = 3
velset = 0,0



[State 6622]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 6222]
type = DestroySelf
trigger1 = AnimTime = 0

[State 6620]
type = BindToParent
trigger1 = Time < 2
pos = 0,0


;------------------------------------------------------------------------------------------------------------
;Air Strong Punch Helper
[Statedef 6620]
type = A
movetype = A
physics = N
;anim = 6620
ctrl = 0
sprpriority = 2
velset = 0,0
;hitcountpersist = 1

[State 6620]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 6620
value = 6620


[State 6620]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 6620]
type = HitBy
trigger1 = 1
value = SCA,AP

[State 6620]
type = HitOverride
trigger1 = 1
stateno = 6629
attr = SCA,AP
slot = 0
time = -1


[State 6420]
type = HitDef
attr = A, SP
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 8*(Root,var(30)),floor(Root,var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 0,7
sparkxy = -10,-10
hitsound   = S1,1
guardsound = S4,0
sparkno = 2
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -9
air.velocity = -15,-1;-7,17
fall = (enemynear,statetype = A)
air.fall = 1
fall.recover =0
;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 = 2


[State 6620]
type = null;ChangeState
trigger1 = var(0) < 1 || hitcount > 2
value = 6629
ignorehitpause  = 1

[State 6620]
type = ChangeState;DestroySelf
trigger1 = MoveContact
value = 6629
ignorehitpause = 1

[State 6620]
type = ChangeState;DestroySelf
trigger1 = MoveReversed
ignorehitpause = 1
value = 6629


[State 6620]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = Parent,stateno != 620


[State 6620]
type = BindToParent
trigger1 = 1
pos = 114,-97


;------------------------------------------------------------------------------------------------------------
;Beam End
[Statedef 6629] 
type = A
movetype = I
physics = N
;anim = 6620
ctrl = 0
sprpriority = 1
velset = 0,0
movehitpersist = 1
hitcountpersist = 1

[State 6629]
type = null;Explod
trigger1 = Time < 2
anim = 7410
ignorehitpause = 1
pos = 0,0
random = 20,20
;postype = p1
ownpal = 1
ontop = 1
;bindtime = 0
;vel = -1+random%2,-2+random%3
;accel = 0,0.3


[State 6629]
type = AssertSpecial
trigger1 = 1
flag = noshadow



[State 6629]
type = DestroySelf
trigger1 = AnimTime = 0

[State 6629]
type = BindToParent
trigger1 = 1
pos = 114,-97



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


[State 6810]
type = Varset
trigger1 = Time = 0
var(1) = parent,stateno

[State 6810]
type = null;ChangeAnim
trigger1 = AnimTime = 0 && Anim = 6810
value = 6810
persistent = 0


[State 6810]
type = AssertSpecial
trigger1 = 1
flag = noshadow



[State 6810]
type = DestroySelf
trigger1 = Parent,stateno != var(1)
trigger2 = AnimTime = 0

[State 6810]
type = BindToParent
trigger1 = 1




[State 6810]
type = null;ChangeAnim
trigger1 = Parent,HitPauseTime
value = anim
elem = AnimElemNo(0)



;------------------------------------------------------------------------------------------------------------
;Air Throw Helper
[Statedef 6930]
type = S
movetype = I
physics =N
anim = 6930
ctrl = 0
sprpriority = 2
velset = 0,0


[State 6930]
type = Varset
trigger1 = Time = 0
var(1) = parent,anim

[State 6930]
type = null;ChangeAnim
trigger1 = AnimTime = 0 && Anim = 6810
value = 6810
persistent = 0


[State 6930]
type = AssertSpecial
trigger1 = 1
flag = noshadow



[State 6930]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = Parent,Anim != var(1)


[State 6930]
type = BindToParent
trigger1 = 1
pos = 0,0



[State 6930]
type = null;ChangeAnim
trigger1 = Parent,HitPauseTime
value = anim
elem = AnimElemNo(0)



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

;------------------------------------------------------------------------------------------------------------
;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 = 0
facep2 = 1


;[State 7610]
;type = Helper
;trigger1 = Time = 0
;stateno = 6125
;id = 6120
;ownpal = 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
trigger1 = Time = 0
value = 210,0

[State 7610, Spark]
type = Explod
trigger1 = AnimElem = 2;Time = 0
anim = 7020
postype = p1
pos = 90,-60
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 = 0
facep2 = 1


;[State 7615]
;type = Helper
;trigger1 = Time = 0
;stateno = 6125
;id = 6120
;ownpal = 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
trigger1 = Time = 0
value = 210,0

[State 7615, Spark]
type = Explod
trigger1 = AnimElem = 2;Time = 0
anim = 7020
postype = p1
pos = 73,-31
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 = 0
facep2 = 1


;[State 7620]
;type = Helper
;trigger1 = Time = 0
;stateno = 6125
;id = 6120
;ownpal = 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
trigger1 = Time = 0
value = 210,0

[State 7620, Spark]
type = Explod
trigger1 = AnimElem = 2;Time = 0
anim = 7020
postype = p1
pos = 67,-85
ownpal = 1
vel = 0,0
;scale = 0.5,0.5
ignorehitpause = 1
sprpriority = 4

[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 = Explod
trigger1 = Time = 1
anim = 7055
ownpal = 1

[State 7710]
type = Explod
trigger1 = Time = 1
anim = 7055
facing = -1
ownpal = 1

[State 7710]
type = Explod
trigger1 = Time = 1
anim = 7022
sprpriority = 4
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 = -16

[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 = 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 7711]
type = Explod
trigger1 = Time%2 = 0
trigger1 = Time >= 12
trigger1 = Vel Y < 0
anim = 7057+random%3
pos = 0,0
random = 60,0
ontop = 1
ownpal = 1

[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 > -4
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]
type = Explod
trigger1 = Time = 1
anim = 7055
ownpal = 1


[State 7720]
type = Explod
trigger1 = Time = 1
anim = 7055
facing = -1
ownpal = 1


[State 7720]
type = Explod
trigger1 = Time = 1
anim = 7022
sprpriority = 4
ownpal = 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, 4]
type = null;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 7720, 4]
type = null;VelSet
trigger1 = AnimTime = 0
x = (P2Dist X)*0.07
y = (P2Dist Y)*0.07

[State 7720, 5]
type = null;VelSet
trigger1 = AnimTime = 0
trigger1 = prevstateno = 100 ;RUN_FWD
trigger1 = sysvar(1) = 1
x = const(velocity.runjump.fwd.x)

[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 = null;VelSet
trigger1 = 1;Time = 0
y = -11


[State 7721, 4]
type = VelSet
trigger1 = Time = 0
y = -15;-13

[State 7721, 4]
type = VelAdd
trigger1 = 1
y = 0.35;0.4



[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,4]
type = null;VelAdd
triggerall = command = "holdfwd"
trigger1 = sysvar(1) = 1
trigger1 = vel X <=4
trigger2 = sysvar(1) = -1
trigger2 = Vel X <= -.4
x = .2

[State 7721,5]
type = null;VelAdd
triggerall = command = "holdback"
trigger1 = sysvar(1) = -1
trigger1 = Vel X >= -4
trigger2 = sysvar(1) = 1
trigger2 = Vel X >= .4
x = -.2

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


[State 7721]
type = 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 7721]
type = Explod
trigger1 = Time%2 = 0
trigger1 = Time >= 12
trigger1 = Vel Y < 0
anim = 7057+random%3
pos = 0,0
random = 60,0
ontop = 1
ownpal = 1

[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 > -4
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,-7
ctrl = 1
velset = 0,0

[State 0, PlaySnd]
type = PlaySnd
triggerall = prevstateno != 7731
triggerall = prevstateno != 7732
trigger1 = time = 0
value = 1430,0

[State 7740, loclcamera]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,floor(pos y)
;ignorehitpause =
;persistent =


[State 0, VelSet]
type = VelSet
trigger1 = command = "holdfwd" && time > 20
x = 6
y = -5

[State 0, VelSet]
type = VelSet
trigger1 = command = "holdup"
y = -4


[State 0, VelSet]
type = VelSet
trigger1 = command = "holddown"
y = 8

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = command = "holdup" && anim !=  7732
value =7732

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = command = "holddown" && anim !=  7731
value =7731

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = command != "holddown" && command != "holdup"
value =7730

[State 0, ChangeAnim]
type = ChangeState
trigger1 = command = "a" || command = "b"; && command = "c"
value =7731

[State 0, ChangeAnim]
type = ChangeState
trigger1 = command = "x" || command = "y"; && command = "c"
value =7732

[State 0, ChangeAnim]
type = ChangeState
trigger1 = command = "c"; && command = "c"
value =7733

[State 0, ChangeAnim]
type = ChangeState
trigger1 = command = "z"; && command = "c"
value =7734

[State 0, VelSet]
type = VelSet
trigger1 = anim = 7730
y = 0

[State 0, PosAdd]
type = PosAdd
trigger1 = 1
x = -1*(backedgebodydist)

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =  vel x != 0
statetype = A       ;S,A,C,L
movetype = I        ;I,A,H
physics = A         ;A,C,S,N

[State 600, EndState]
type = Changeanim
trigger1 =  vel x != 0
value = 7735
ctrl = 1

[State 0, VelSet]
type = VelSet
trigger1 = anim = 7735
x = 5
y = -8

[State 600, EndState]
type = ChangeState
trigger1 = anim = 7735
trigger2 = (pos y > -5); && prevstateno != 105
value = 50
ctrl = 1

[Statedef 7731]
type    = A
movetype= H
physics = N
velset = 0,0
anim = 7733

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

[State 7740, loclcamera]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,floor(pos y)

[State 600]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, NA
animtype  = Light
damage    = 20
guardflag = HA
pausetime = 3,3
sparkno = 1
sparkxy = -10,-50
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, EndState]
type = ChangeState
trigger1 = animtime = 0
value = 7730
ctrl = 1

[Statedef 7732]
type    = A
movetype= H
physics = N
velset = 0,0
anim = 7734

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

[State 7740, loclcamera]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,floor(pos y)

[State 600]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, NA
animtype  = Light
damage    = 35
guardflag = HA
pausetime = 7,7
sparkno = 1
sparkxy = -10,-85
hitsound   = S1,0
guardsound = S4,0
ground.type = High
air.type = Low
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -7,-4
air.velocity = -9,-9
getpower = 13,7

[State 600, EndState]
type = ChangeState
trigger1 = animtime = 0
value = 7730
ctrl = 1

[Statedef 7733]
type    = A
movetype= H
physics = N
velset = 0,0
anim = 7736

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = 7710,0

[State 0, VelSet]
type = VelSet
trigger1 =animelem = 3
x = 11
y = -2

 [State 7740, loclcamera]
type = ScreenBound
trigger1 = animelem !=3
value = 0
movecamera = 0,floor(pos y)

[State 600]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, NA
animtype  = Light
damage    = 60
guardflag = HA
pausetime = 7,7
sparkno = 2
sparkxy = -10,-70
hitsound   = S1,0
guardsound = S4,0
ground.type = High
air.type = Low
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -10
air.velocity = -10,-5
getpower = 13,7

[State 600, EndState]
type = ChangeState
trigger1 = animtime = 0
value = 50

[Statedef 7734]
type    = A
movetype= H
physics = N
velset = 0,0
anim = 7737

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = 7710,0

 [State 7740, loclcamera]
type = ScreenBound
trigger1 = animelem !=4
value = 0
movecamera = 0,floor(pos y)

[State 0, VelSet]
type = VelSet
trigger1 =animelem = 4
x = 10
y = -6

[State 600]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, NA
animtype  = Light
damage    = 60
guardflag = HA
pausetime = 7,7
sparkno = 2
sparkxy = -10,-70
hitsound   = S1,0
guardsound = S4,0
ground.type = High
air.type = Low
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -10
air.velocity = -10,-5
getpower = 13,7

[State 600, EndState]
type = ChangeState
trigger1 = animtime = 0
value = 511



;---------------------------------------------------------------------------
; Flying to End of Screen
[Statedef 7740]
type    = A
movetype= A
physics = N
velset = 0,0
anim = 7740

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 1430,0


[State 3200, assertspecial]
type = assertspecial
trigger1 = stateno = 7740
flag = nobardisplay
ignorehitpause = 1

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

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = command != "holdfwd" && command != "holdback"
value =7740

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = command = "holdfwd" && anim !=  7741
value =7741

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = command = "holdback" && anim !=  7742
value =7742

[State 0, VelSet]
type = VelSet
trigger1 = command = "holdfwd"
x = 3

[State 0, VelSet]
type = VelSet
trigger1 = command = "holdback"
x = -3


[State 7740]
type = changeState
trigger1 = command = "holddown" && var(40)> 1
value = 7745

[State 7740]
type = changeState
trigger1 = command = "holdup" && time > 30
value = 50
ctrl = 1

[State 7740]
type = changeState
trigger1 = command = "holddown" && var(40)<= 1
value = 50
ctrl = 1



[Statedef 7745]
type    = A
movetype= H
physics = N
velset = 0,0
anim = 7745

[State 0, VelSet]
type = VelSet
trigger1 = command = "holddown"
y = 5

[State 1000, gastateia]
type = VarAdd
triggerall = var(40) > 0
trigger1 = time = 0
v = 40
value = -2

[State 0, VelSet]
type = VelSet
trigger1 = command != "holddown"
y = 0


[State 7740]
type = SelfState
trigger1 = command = "holdup" || command = "holdfwd" || command = "holdback"
trigger2 = (pos y > -20)
value = 7746

[Statedef 7746]
type    = A
movetype= H
physics = N
velset = 0,0
anim = 7746

[State 7740]
type = changeState
trigger1 = animtime = 0
value = 50
ctrl = 1



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

;---------------------------------------------------------------------------
; Wall Hit Helper
[Statedef 7750]
type    = A
movetype= H
physics = N
velset = 0,0
anim = 9800

[State 7750]
type = explod
trigger1 = Time = 1
trigger1 = enemynear,screenpos x < 150
anim = 7024
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

[State 7750]
type = explod
trigger1 = Time = 1
trigger1 = enemynear,screenpos x > 150
anim = 7024
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

[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 = explod
trigger1 = Time = 1
anim = 7052;7510
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



;---------------------------------------------------------------------------
; 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  = 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 = 7800
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 >= 18
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 >= 18
trigger2 = BackEdgeBodyDist <= 10
value = 11
ctrl = 1

[State 7801]
type = ChangeState
trigger1 = !alive
value = 5050


;---------------------------------------------------------------------------
;Roll Recovery End

[Statedef 7802]
type    = S
movetype= I
physics = N
ctrl = 1
anim = 5120
sprpriority = 0
velset = 0,0



[State 7802]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 7802]
type = null;ChangeAnim
trigger1 = Time = 0 && Anim != 5120
value = 5120


[State  7802]
type = ChangeState
trigger1 = AnimTime = 0
;trigger2 = FrontEdgeBodyDist <= 10
value = 0
ctrl = 1

[State 7802]
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]
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 = 0
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,420))


[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  = 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 = 2
sparkxy = -10,-70               
hitsound = S1,30                
guardsound = S4,0               
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  = 4
poweradd= 40
ctrl = 0
velset = 0,0
anim = 8016
sprpriority = 0
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 = 7,7
sparkno = 2
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  = 4
poweradd= 40
ctrl = 0
velset = 0,0
anim = 8017
sprpriority = 0
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
trigger1 = Time = 7
value = 220,0

[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 = 7,7
sparkno = 2
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  = 4
poweradd= 40
ctrl = 0
velset = 0,0
anim = 8018
sprpriority = 0
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 = 6
y = 9


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

[State 8018]
type = PlaySnd
trigger1 = Time = 5
value = 200,0


[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 = 7,7
sparkno = 2
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
p1stateno = 511
;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
[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


;------------------------------------------------------------------------------------------
; Hit by  - shaking from the hit
; (a custom gethit state)

[Statedef 9020]
type    = A
movetype= H
physics = N
velset = 0,0

[State 9020, Anim] ;Custom animation
type = null;ChangeAnim2
trigger1 = 1
value = 5012


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


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

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



[State 5050, 2] ; anim for trip
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(groundtype) = 3
trigger1 = SelfAnimExist(5070)
value = 5070


[State 9020, State]
type = 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 9020, State]
type = AfterImageTime
trigger1 = 1
time = 2

[State 9020, State]
type = ChangeState
trigger1 = HitShakeOver = 1
value = 9030

;----------------------------------------------------------------------
; Hit by - flying through the air
; (a custom gethit state)
[Statedef 9030]
type    = A
movetype= H
physics = N


[State 9030]
type = 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 9030]
type = AfterImageTime
trigger1 = 1
time = 2

[State 9030, Velocity]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 9030, Gravity]
type = VelAdd
trigger1 = 1
y = .39

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

[State 9030, Hit wall]
type = ChangeState
;triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist <= 20
trigger2 = FrontEdgeBodyDist <= 20
value = 9027


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

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


[State 5050, 2] ;Coming down anim for trip
type = ChangeAnim
trigger1 = anim = 5070
trigger1 = Vel Y >= 0
trigger1 = SelfAnimExist(anim-10) || SelfAnimExist(5071)
value = ifelse(SelfAnimExist(5071),5071,anim-10)
persistent = 0


[State 5035, 3]
type = null;ChangeState
triggerall = !HitFall
trigger1 = HitOver  ;Hit is over
trigger2 = AnimTime = 0 ;Animation over
trigger3 = Vel Y > 0    ;Hit ground
trigger3 = Pos Y >= 10  ;.
trigger4 = Time = 0     ;No transition anim
trigger4 = Anim != 5035 ;.
value = 5040 ;HITA_RECOV

[State 5050, 4] ;Recover near ground
type = null;SelfState
triggerall = Vel Y > 0
triggerall = Pos Y >= -20
triggerall = alive
triggerall = CanRecover
trigger1 = 1;Command = "recovery"
value = 5200 ;HITFALL_RECOVER

[State 5050, 5]; Recover in mid air
type = null;ChangeState
triggerall = Vel Y > -1
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5210 ;HITFALL_AIRRECOVER

[State 9030, Hit ground]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= ifelse((anim = [5051,5059]) || (anim = [5061,5071]), 0, 25)
value = 5100 ;HIT_BOUNCE

;-----------------------------------------------------------------------------------------------------
; Hit by  - hit wall
; (a custom gethit state)
[Statedef 9027]
type    = A
movetype= H
physics = N

[State 9027, Turn]
type = Turn
trigger1 = (Time = 0) && (FrontEdgeBodyDist <= 30)

[State 9027]
type = EnvShake
trigger1 = time = 0
time = 30
freq = 100
ampl = -10
phase = 10

[State 9027, Pos]
type = PosAdd
trigger1 = Time = 0
x = 15 - BackEdgeBodyDist

[State 9027, Stop moving]
type = PosFreeze
trigger1 = 1
x = 1
y = 1

[State 9027, No scroll]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 0,0

[State 9027, Spark]
type = null;Explod
trigger1 = Time = 0
anim = F72
pos = 0, floor (screenpos y) - 50
postype = back
sprpriority = 3

[State 9027, Anim]
type = ChangeAnim2
trigger1 = Time = 0
value = 825

[State 9027, Sound]
type = null;PlaySnd
trigger1 = Time = 0
value = F7,0

[State 9027, State]
type = ChangeState
trigger1 = Time = 5
value = 9028

;----------------------------------------------------------------
; Hit by  - bounce off wall
; (a custom gethit state)
[Statedef 9028]
type    = A
movetype= H
physics = N


[State 9028, 1]
type = NotHitBy
trigger1 = 1
value = , NA, NP

[State 9028, Vel Y]
type = VelSet
trigger1 = Time = 0
y = -2

[State 9028, Vel X]
type = VelSet
trigger1 = Time = 0
x = 2


[State 9028, Turn]
type = null;Turn
trigger1 = (Time = 0) && (BackEdgeDist < 30)

[State 9028, Gravity]
type = VelAdd
trigger1 = 1
y = .39

[State 9028, Anim 5050] ;Self falling animation
type = ChangeAnim
trigger1 = Time = 0
trigger1 = !SelfAnimExist(5052)
value = 5050

[State 9028, Anim 5052] ;Self falling animation (diagup type)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = SelfAnimExist(5052)
value = 5052

[State 9028, Anim 5060] ;Coming down - normal
type = ChangeAnim
trigger1 = Vel Y > -2
trigger1 = Anim = 5050
trigger1 = SelfAnimExist(5060)
persistent = 0
value = 5060

[State 9028, Anim 5062] ;Coming down - diagup type
type = ChangeAnim
trigger1 = Vel Y > -2
trigger1 = Anim = 5052
trigger1 = SelfAnimExist(5062)
persistent = 0
value = 5062

[State 9028, Hit ground]
type = SelfState
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 5100


;------------------------------------------------------------------------------------------------------------
;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,movetype = h && (parent,anim != [4900,5300]))
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,movetype = h && (parent,anim != [4900,5300]))
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






;---------------------------------------------------------------------------
;Warp Top Left Helper
[Statedef 21400]
type    = U
movetype= A
physics = N
juggle  = 3
poweradd= 0
ctrl = 0
velset = 0,0
anim = 1401
sprpriority = -1


[State 21400]
type = PosSet
trigger1 = Time = 0
y = -100

[State 21400]
type = PosSet
trigger1 = Pos X != -100
x = -100

[State 21400]
type = Turn
trigger1 = Time = 0
trigger1 = p2bodydist x < -5

[State 21400]
type = DestroySelf
trigger1 = AnimTime = 0




;---------------------------------------------------------------------------
;Warp Top Left Helper var
[Statedef 21401]
type    = U
movetype= I
physics = N
juggle  = 3
poweradd= 0
ctrl = 0
velset = 0,0
anim = 9800
sprpriority = -1


[State 21401]
type = varset
trigger1 = Time = 0
var(1) = parent,stateno



[State 21401]
type = DestroySelf
trigger1 = parent,stateno != var(1)


[State 21401]
type = BindToParent
trigger1 = 1


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

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



[State 21401]
type = VarSet
triggerall = !parent,var(59)
triggerall = parent,AnimElem = 13, >= 0
trigger1 = parent,command = "holdx" || parent,command = "holdy" || parent,command = "holdz"
trigger2 = parent,command = "holda" || parent,command = "holdb" || parent,command = "holdc"
var(2) = 1

[State 21401]
type = VarSet
triggerall = !parent,var(59)
triggerall = parent,AnimElem = 13, >= 0
trigger1 = parent,command = "holdfwd"
trigger1 = parent,command != "holdup"
trigger1 = parent,command != "holddown"
var(3) = 1


[State 21401]
type = VarSet
triggerall = !parent,var(59)
triggerall = AnimElem = 13, >= 0
trigger1 = parent,command = "holdback"
trigger1 = parent,command != "holdup"
trigger1 = parent,command != "holddown"
var(3) = -1


[State 21401]
type = VarSet
triggerall = !parent,var(59)
triggerall = parent,AnimElem = 13, >= 0
trigger1 = parent,command = "holdfwd" && parent,command = "holdup"
var(3) = 2

[State 21401]
type = VarSet
triggerall = !parent,var(59)
triggerall = parent,AnimElem = 13, >= 0
trigger1 = parent,command = "holdback" && parent,command = "holdup"
var(3) = -2


[State 21401]
type = VarSet
triggerall = !parent,var(59)
triggerall = parent,AnimElem = 13, >= 0
trigger1 = parent,command != "holdfwd"
trigger1 = parent,command != "holdback"
trigger1 = parent,command = "holdup"
var(3) = 3


[State 21401]
type = VarSet
triggerall = !parent,var(59)
triggerall = parent,AnimElem = 13, >= 0
trigger1 = parent,command = "holddown"
trigger1 = parent,command != "holdfwd"
trigger1 = parent,command != "holdback"
var(3) = -3

[State 21401]
type = VarSet
triggerall = !parent,var(59)
triggerall = parent,AnimElem = 13, >= 0
trigger1 = parent,command = "holdfwd" && parent,command= "holddown"
var(3) = 4


[State 21401]
type = VarSet
triggerall = !parent,var(59)
triggerall = parent,AnimElem = 13, >= 0
trigger1 = parent,command = "holddown" && parent,command = "holdback"
var(3) = -4


;Forward
[State 21401]
type = ParentVarSet
trigger1 = var(2)
trigger1 = var(3) = 1
trigger2 = parent,var(59) && random < 100
trigger2 = parent,var(8) = [-30,30]
trigger2 = parent,p2bodydist x = [10,120]
var(4) = 1442

;Back
[State 21401]
type = ParentVarSet
trigger1 = var(2)
trigger1 = var(3) = -1
trigger2 = parent,var(59) && random < 100
trigger2 = parent,var(8) = [-30,30]
trigger2 = parent,p2bodydist x = [-120,-10]
var(4) = 1446

;Up Forward
[State 21401]
type = ParentVarSet
trigger1 = var(2)
trigger1 = var(3) = 2
trigger2 = parent,var(59) && random < 100
;trigger2 = var(8) = [-30,30]
trigger2 = parent,p2bodydist x = [10,120]
trigger2 = parent,p2bodydist y/parent,p2bodydist x = [-1.3,-0.7]
var(4) = 1441

;Up Backward
[State 21401]
type = ParentVarSet
trigger1 = var(2)
trigger1 = var(3) = -2
trigger2 = parent,var(59) && random < 100
;trigger2 = var(8) = [-30,30]
trigger2 = parent,p2bodydist x = [-120,-10]
trigger2 = parent,p2bodydist y/parent,p2bodydist x = [0.7,1.3]
var(4) = 1447

;Up
[State 21401]
type = ParentVarSet
trigger1 = var(2)
trigger1 = var(3) = 3
trigger2 = parent,var(59) && random < 100
;trigger2 = var(8) = [-30,30]
trigger2 = parent,p2bodydist x = [-30,30]
trigger2 = parent,p2bodydist y = [-50,-200]
var(4) = 1440

;Down
[State 21401]
type = ParentVarSet
trigger1 = var(2)
trigger1 = var(3) = -3
trigger2 = var(59) && random < 100
;trigger2 = var(8) = [-30,30]
trigger2 = parent,p2bodydist x = [-30,30]
trigger2 = parent,p2bodydist y = [200,50]
var(4) = 1444


;Forward Down
[State 21401]
type = ParentVarSet
trigger1 = var(2)
trigger1 = var(3) = 4
trigger2 = var(59) && random < 100
;trigger2 = var(8) = [-30,30]
trigger2 = parent,p2bodydist x = [10,200]
trigger2 = parent,p2bodydist y/parent,p2bodydist x = [0.7,1.3]
var(4) = 1443

;Back Down
[State 21401]
type = ParentVarSet
trigger1 = var(2)
trigger1 = var(3) = -4
trigger2 = var(59) && random < 100
;trigger2 = var(8) = [-30,30]
trigger2 = parent,p2bodydist x = [-200,-10]
trigger2 = parent,p2bodydist y/parent,p2bodydist x = [-1.3,-0.7]
var(4) = 1445

;---------------------------------------------------------------------------
;Warp Top Middle Helper
[Statedef 21405]
type    = U
movetype= A
physics = N
juggle  = 3
poweradd= 0
ctrl = 0
velset = 0,0
anim = 1401
sprpriority = 2

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

[State 21405]
type = Turn
trigger1 = Time = 0
trigger1 = p2bodydist x < -5

[State 21405]
type = Width
trigger1 = Time = 0
edge = 150,150


[State 21405]
type = PosSet
trigger1 = Time = 0
y = -100


[State 21405]
type = DestroySelf
trigger1 = AnimTime = 0


;---------------------------------------------------------------------------
;Warp Top Right Helper
[Statedef 21410]
type    = U
movetype= A
physics = N
juggle  = 3
poweradd= 0
ctrl = 0
velset = 0,0
anim = 1401
sprpriority = -1

[State 21410]
type = PosSet
trigger1 = Time = 0
y = -100

[State 1410]
type = PosSet
trigger1 = Pos X != 100
x = 100


[State 21410]
type = Turn
trigger1 = Time = 0
trigger1 = p2bodydist x < -5


[State 21410]
type = DestroySelf
trigger1 = AnimTime = 0




;---------------------------------------------------------------------------
;Warp Bottom Left Helper
[Statedef 21415]
type    = U
movetype= A
physics = N
juggle  = 3
poweradd= 0
ctrl = 0
velset = 0,0
anim = 1401
sprpriority = -1


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

[State 21415]
type = PosSet
trigger1 = Pos X != -100
x = -100

[State 21415]
type = Turn
trigger1 = Time = 0
trigger1 = p2bodydist x < -5

[State 21415]
type = DestroySelf
trigger1 = AnimTime = 0




;---------------------------------------------------------------------------
;Warp Bottom Middle Helper
[Statedef 21420]
type    = U
movetype= A
physics = N
juggle  = 3
poweradd= 0
ctrl = 0
velset = 0,0
anim = 1401
sprpriority = 2


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

[State 21420]
type = Turn
trigger1 = Time = 0
trigger1 = p2bodydist x < -5

[State 21420]
type = Width
trigger1 = Time = 0
edge = 150,150


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


[State 21420]
type = DestroySelf
trigger1 = AnimTime = 0

;---------------------------------------------------------------------------
;Warp Bottom Right Helper
[Statedef 21425]
type    = U
movetype= A
physics = N
juggle  = 3
poweradd= 0
ctrl = 0
velset = 0,0
anim = 1401
sprpriority = -1



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

[State 21425]
type = PosSet
trigger1 = Pos X != 100
x = 100

[State 21425]
type = Turn
trigger1 = Time = 0
trigger1 = p2bodydist x < -5


[State 21425]
type = DestroySelf
trigger1 = AnimTime = 0



;------------------------------------------------------------------------------------------------------------
;Web Ball Helper
[Statedef 21450]
type = U
movetype = A
physics = N
;anim = 21450
ctrl = 0
sprpriority = 2
velset = 0,0
;hitcountpersist = 1

[State 21450]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 21450
value = 21450


[State 21450]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 21450]
type = HitBy
trigger1 = 1
value = SCA,AP


[State 21450]
type = HitOverride
trigger1 = 1
stateno = 21459
attr = SCA,AP
slot = 0
time = -1


[State 21450]
type = VarSet
trigger1 = Time = 0 && Parent,stateno = 1450
var(1) = 30

[State 21450]
type = VarSet
trigger1 = Time = 0 && Parent,stateno = 1460
var(1) = 60

[State 21450]
type = VarSet
trigger1 = Time = 0 && Parent,stateno = 1470
var(1) = 120

[State 21450]
type = VelSet
trigger1 = Time = 0
x = 7



[State 21450]
type = HitDef
attr = S, SP
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 8*(Root,var(30)),floor(Root,var(30)/2)
animtype = Light
priority  = 5, Hit
guardflag = MA
pausetime = 0,7
sparkxy = -10,-10
hitsound   = S1450,2
guardsound = S4,0
sparkno = 2
ground.type = High
ground.slidetime = 10
ground.hittime  = 25
ground.velocity = 0
air.velocity = 0
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 = 1
;air.fall = 1
;fall.recover = 0
;fall.animtype = Up
;p2stateno = 9020
getpower = 50,25
;palfx.time = 1
;palfx.add = 256,256,256
sprpriority = 2
p1stateno = 21460
p2stateno = 21470
id = 21450

[State 21450]
type = null;ChangeState
trigger1 = var(0) < 1 || hitcount > 2
trigger2 = Time > 50
value = 21459
ignorehitpause  = 1


[State 21450]
type = ChangeState;DestroySelf
trigger1 = MoveGuarded
ignorehitpause = 1
value = 21459



[State 21450]
type = ChangeState;DestroySelf
trigger1 = MoveReversed
ignorehitpause = 1
value = 21459


[State 21450]
type = DestroySelf
trigger1 = FrontEdgeDist < -100
trigger2 = Time > 240



;------------------------------------------------------------------------------------------------------------
;Web Ball Air Helper
[Statedef 21451]
type = U
movetype = A
physics = N
;anim = 21451
ctrl = 0
sprpriority = 2
velset = 0,0
;hitcountpersist = 1

[State 21451]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 21451
value = 21451


[State 21451]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 21451]
type = HitBy
trigger1 = 1
value = SCA,AP


[State 21451]
type = HitOverride
trigger1 = 1
stateno = 21458
attr = SCA,AP
slot = 0
time = -1


[State 21451]
type = VarSet
trigger1 = Time = 0 && Parent,stateno = 1451
var(1) = 30

[State 21451]
type = VarSet
trigger1 = Time = 0 && Parent,stateno = 1461
var(1) = 60

[State 21451]
type = VarSet
trigger1 = Time = 0 && Parent,stateno = 1471
var(1) = 120

[State 21451]
type = VelSet
trigger1 = Time = 0
x = 7
y = 7


[State 21451]
type = HitDef
attr = S, SP
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 8*(Root,var(30)),floor(Root,var(30)/2)
animtype = Light
priority  = 5, Hit
guardflag = MA
pausetime = 0,7
sparkxy = -10,-10
hitsound   = S1450,2
guardsound = S4,0
sparkno =2
ground.type = High
ground.slidetime = 10
ground.hittime  = 25
ground.velocity = 0
air.velocity = 0
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 = 1
;air.fall = 1
;fall.recover = 0
;fall.animtype = Up
;p2stateno = 9020
getpower = 50,25
;palfx.time = 1
;palfx.add = 256,256,256
sprpriority = 2
p1stateno = 21460
p2stateno = 21470
id = 21450

[State 21451]
type = null;ChangeState
trigger1 = var(0) < 1 || hitcount > 2
trigger2 = Time > 50
value = 21458
ignorehitpause  = 1


[State 21451]
type = ChangeState;DestroySelf
trigger1 = MoveGuarded
ignorehitpause = 1
value = 21458



[State 21451]
type = ChangeState;DestroySelf
trigger1 = MoveReversed
ignorehitpause = 1
value = 21458


[State 21451]
type = ChangeState
trigger1 = Pos Y >= -20
trigger1 = Vel Y > 0
value = 21457

[State 21451]
type = DestroySelf
trigger1 = FrontEdgeDist < -100
trigger2 = Time > 240


;------------------------------------------------------------------------------------------------------------
;Web Ball End
[Statedef 21457]
type = S
movetype = I
physics = N
anim = 21457
ctrl = 0
sprpriority = 2
;velset = 0,0
;movehitpersist = 1
;hitcountpersist = 1
velset = 0,0

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

[State 21457]
type = AssertSpecial
trigger1 = 1
flag = noshadow



[State 21457]
type = DestroySelf
trigger1 = AnimTime = 0


;------------------------------------------------------------------------------------------------------------
;Web Ball End
[Statedef 21458]
type = S
movetype = I
physics = N
anim = 21458
ctrl = 0
sprpriority = 2
;velset = 0,0
;movehitpersist = 1
;hitcountpersist = 1
velset = 0,0


[State 21458]
type = AssertSpecial
trigger1 = 1
flag = noshadow



[State 21458]
type = DestroySelf
trigger1 = AnimTime = 0


;------------------------------------------------------------------------------------------------------------
;Web Ball End
[Statedef 21459]
type = S
movetype = I
physics = N
anim = 21459
ctrl = 0
sprpriority = 2
;velset = 0,0
;movehitpersist = 1
;hitcountpersist = 1
velset = 0,0


[State 21459]
type = AssertSpecial
trigger1 = 1
flag = noshadow



[State 21459]
type = DestroySelf
trigger1 = AnimTime = 0



;---------------------------------------------------------------------------
; Web Trap

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


[State 21460]
type = PosSet
trigger1 = Time = 0
y = enemynear,pos y
x = enemynear,pos x

[State 21460]
type = null;Explod
trigger1 = Time = 0
anim = 7515
ontop = 1
ownpal = 1
pos = 77,-62

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

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



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


[State 21460]
type = null;AngleDraw
trigger1 = 1
value = 0


[State 21460]
type = TargetBind
trigger1 = 1
pos = 0,0


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


[State 21460]
type = PosSet
trigger1 = Pos Y >= 0 && Vel Y > 0
y = 0

[State 21460]
type = VelSet
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
y = 0



[State 21460]
type = TargetState
trigger1 = Time >= var(1)
value = 21475

[State 21460]
type = ChangeState
trigger1 = Time >= var(1)
value = 21465
ctrl = 0



[State 21460]
type = ChangeState
trigger1 = !NumTarget(21450)
value = 21465
ctrl = 1



;------------------------------------------------------------------------------------------------------------
;Web Trap End
[Statedef 21465]
type = S
movetype = I
physics = N
anim = 21478
ctrl = 0
sprpriority = 2
;velset = 0,0
;movehitpersist = 1
;hitcountpersist = 1
velset = 0,0


[State 21465]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 21465]
type = PlaySnd
trigger1 = Time = 0
value = 1450,3



[State 21465]
type = DestroySelf
trigger1 = AnimTime = 0


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

[Statedef 21470]
type    = S
movetype= H
physics = N
velset = 0,0
sprpriority = -1

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

[State 21470]
type = null;SprPriority
trigger1 = AnimElem = 2
value = -1



[State 21470]
type = ChangeAnim2
trigger1 = Time = 0
value = 5000


[State 21470]
type = AssertSpecial
trigger1 = Time > 4
flag = invisible

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

[State 21470]
type = null;PalFx
trigger1 = AnimElemNo(0) = [4,7]
color = 0
time = 15
add = 64,-128,64

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


[State 21470]
type = DestroySelf
trigger1 = ishelper

;---------------------------------------------------------------------------
;Trap By Web

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



[State 21475]
type = null;ChangeAnim2
trigger1 = Time = 0
value = 823

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

[State 21475]
type = null;VelSet
trigger1 = Time = 0
x = -13
y = -5

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


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


[State 21475]
type = null;ChangeState
;triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist <= 10
trigger2 = FrontEdgeBodyDist <= 10
value = 9027


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


[State 21475]
type = SelfState
trigger1 = Time > 1
value = 5000
ctrl = 1


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


[State 21475] ;Hit ground
type = null;ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 824



;------------------------------------------------------------------------------------------------------------
;Web Cord Helper
[Statedef 21510]
type = S
movetype = I
physics =N
anim = 1525 + (Parent,var(2) = 1520) + 2*(Parent,var(2) = 1530)
ctrl = 0
sprpriority = -1
velset = 0,0


[State 21510]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 21510]
type = AssertSpecial
trigger1 = Time%2 = 0
flag = invisible

[State 21510]
type = DestroySelf
trigger1 = AnimTime = 0




;------------------------------------------------------------------------------------------------------------
;Web Throw Helper
[Statedef 21540]
type = A
movetype = A
physics = N
;anim = 21540
ctrl = 0
sprpriority = 1
velset = 0,0
hitcountpersist = 1

[State 21540]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 21540
value = 21540


[State 21540]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 21540]
type = HitBy
trigger1 = 1
value = SCA,AP

[State 21540]
type = HitOverride
trigger1 = 1
stateno = 21549
attr = SCA,AP
slot = 0
time = -1


[State 21540]
type = HitDef
attr = SA, SP
trigger1 = Time < 12
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 4*(Root,var(30)),floor(Root,var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 0,7
sparkxy = -10,-50+floor(P2Dist Y)
hitsound   = S1450,2
guardsound = S4,0
sparkno = 2
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -9
air.velocity = -9
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = 0
sprpriority = 1
p1stateno = 21560
p2stateno = 21570
id = 21540

[State 21540]
type = VelSet
trigger1 = Time = 13
x = 7


[State 21540]
type = HitDef
attr = SA, SP
trigger1 = Time > 12
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 4*(Root,var(30)),floor(Root,var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 0,7
sparkxy = -10,-50+floor(P2Dist Y)
hitsound   = S1450,2
guardsound = S4,0
sparkno =2
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -9
air.velocity = -9
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = 0
sprpriority = 1

[State 21540]
type = null;ChangeState
trigger1 = var(0) < 1 || hitcount > 2
value = 21549
ignorehitpause  = 1

[State 21540]
type = ChangeState;DestroySelf
trigger1 = MoveContact
value = 21549
ignorehitpause = 1


[State 21540]
type = ChangeState;DestroySelf
trigger1 = MoveReversed
ignorehitpause = 1
value = 21549

[State 21540]
type = DestroySelf
trigger1 = FrontEdgeDist < -100
trigger2 = ScreenPos Y < -100
trigger3 = Time > 240


;------------------------------------------------------------------------------------------------------------
;Web Throw Helper
[Statedef 21541]
type = A
movetype = A
physics = N
;anim = 21560
ctrl = 0
sprpriority = 1
velset = 0,0
hitcountpersist = 1

[State 21541]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 21560
value = 21560


[State 21541]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 21541]
type = HitBy
trigger1 = 1
value = SCA,AP

[State 21541]
type = HitOverride
trigger1 = 1
stateno = 21549
attr = SCA,AP
slot = 0
time = -1


[State 21541]
type = HitDef
attr = SA, SP
trigger1 = Time < 12
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 4*(Root,var(30)),floor(Root,var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 0,7
sparkxy = -10,-50+floor(P2Dist Y)
hitsound   = S1450,2
guardsound = S4,0
sparkno = 2
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -9
air.velocity = -9
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = 0
sprpriority = 1
p1stateno = 21580
p2stateno = 21590
id = 21540

[State 21541]
type = VelSet
trigger1 = Time = 13
x = 7
y = -6

[State 21541]
type = HitDef
attr = SA, SP
trigger1 = Time > 12
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 4*(Root,var(30)),floor(Root,var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 0,7
sparkxy = -10,-50+floor(P2Dist Y)
hitsound   = S1450,2
guardsound = S4,0
sparkno = 2
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -9
air.velocity = -9
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = 0
sprpriority = 1

[State 21541]
type = null;ChangeState
trigger1 = var(0) < 1 || hitcount > 2
value = 21549
ignorehitpause  = 1

[State 21541]
type = ChangeState;DestroySelf
trigger1 = MoveContact
value = 21549
ignorehitpause = 1


[State 21541]
type = ChangeState;DestroySelf
trigger1 = MoveReversed
ignorehitpause = 1
value = 21549

[State 21541]
type = DestroySelf
trigger1 = FrontEdgeDist < -100
trigger2 = ScreenPos Y < -100
trigger3 = Time > 240


;------------------------------------------------------------------------------------------------------------
;Web Throw Helper
[Statedef 21542]
type = A
movetype = A
physics = N
;anim = 21580
ctrl = 0
sprpriority = 1
velset = 0,0
hitcountpersist = 1

[State 21542]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 21580
value = 21580


[State 21542]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 21542]
type = HitBy
trigger1 = 1
value = SCA,AP

[State 21542]
type = HitOverride
trigger1 = 1
stateno = 21549
attr = SCA,AP
slot = 0
time = -1


[State 21542]
type = HitDef
attr = SA, SP
trigger1 = Time < 12
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 4*(Root,var(30)),floor(Root,var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 0,7
sparkxy = -10,-50+floor(P2Dist Y)
hitsound   = S1450,2
guardsound = S4,0
sparkno = 2
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -9
air.velocity = -9
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = 0
sprpriority = 1
p1stateno = 21585
p2stateno = 21595
id = 21540

[State 21542]
type = VelSet
trigger1 = Time = 13
y = -7

[State 21542]
type = HitDef
attr = SA, SP
trigger1 = Time > 12
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 4*(Root,var(30)),floor(Root,var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 0,7
sparkxy = -10,-50+floor(P2Dist Y)
hitsound   = S1450,2
guardsound = S4,0
sparkno = 2
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -9
air.velocity = -9
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = 0
sprpriority = 1

[State 21542]
type = null;ChangeState
trigger1 = var(0) < 1 || hitcount > 2
value = 21549
ignorehitpause  = 1

[State 21542]
type = ChangeState;DestroySelf
trigger1 = MoveContact
value = 21549
ignorehitpause = 1


[State 21542]
type = ChangeState;DestroySelf
trigger1 = MoveReversed
ignorehitpause = 1
value = 21549

[State 21542]
type = DestroySelf
trigger1 = FrontEdgeDist < -100
trigger2 = ScreenPos Y < -100
trigger3 = Time > 240


;------------------------------------------------------------------------------------------------------------
;Web Throw End
[Statedef 21549] 
type = A
movetype = I
physics = N
;anim = 21549
ctrl = 0
sprpriority = 1
;velset = 0,0
movehitpersist = 1



[State 21549]
type = ChangeAnim
trigger1 = Time = 0
value = Anim+AnimElemNo(0)



[State 21549]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 21549]
type = DestroySelf
trigger1 = AnimTime = 0



;---------------------------------------------------------------------------
; Web Trap

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

[State 21560]
type = BindToParent
trigger1 = 1


[State 21560]
type = NotHitBy
trigger1 = isHelper
value = SCA


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



[State 21560]
type = TargetBind
trigger1 = AnimElemNo(0) = 1
pos = 236,-53

[State 21560]
type = TargetBind
trigger1 = AnimElemNo(0) = 2
pos = 236,-53

[State 21560]
type = TargetBind
trigger1 = AnimElemNo(0) = 3
pos = 219,-63

[State 21560]
type = TargetBind
trigger1 = AnimElemNo(0) = 4
pos = 219,-68

[State 21560]
type = TargetBind
trigger1 = AnimElemNo(0) = 5
pos = 218,-70


[State 21560]
type = TargetBind
trigger1 = AnimElemNo(0) = 6
pos = 198,-77

[State 21560]
type = TargetState
trigger1 = AnimTime = 0
value = 21572

[State 21560]
type = ChangeState
trigger1 = AnimTime = 0
value = 21562
ctrl = 0



[State 21560]
type = ChangeState
triggerall = isHelper
trigger1 = !NumTarget(21540)
trigger2 = Parent,Stateno != 21560
value = 21565
ctrl = 1

[State 21560]
type = ChangeState
trigger1 = !isHelper
trigger1 = NumHelper(21540)
trigger1 = !Helper(21540),NumTarget(21540)
value = 0
ctrl = 1


;---------------------------------------------------------------------------
; Web Trap

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

[State 21561]
type = BindToParent
trigger1 = 1

[State 21561]
type = NotHitBy
trigger1 = isHelper
value = SCA

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

[State 21561]
type = TargetBind
trigger1 = AnimElemNo(0) = 1
pos = 97,-86

[State 21561]
type = TargetBind
trigger1 = AnimElemNo(0) = 2
pos = -3,-73

[State 21561]
type = TargetBind
trigger1 = AnimElemNo(0) = 3
pos = -107,-83

[State 21561]
type = TargetBind
trigger1 = AnimElemNo(0) = 4
pos = -153,-97

[State 21561]
type = TargetBind
trigger1 = AnimElemNo(0) = 5
pos = -106,-114

[State 21561]
type = TargetBind
trigger1 = AnimElemNo(0) = 6
pos = -5,-118

[State 21561]
type = TargetBind
trigger1 = AnimElemNo(0) = 7
pos = 102,-117

[State 21561]
type = TargetBind
trigger1 = AnimElemNo(0) = 8
pos = 149,-98


[State 21561]
type = TargetBind
trigger1 = AnimElemNo(0) = 9
trigger2 = AnimTime = 0
pos = 97,-86

[State 21561]
type = TargetBind
trigger1 = AnimElemNo(0) = 10
pos = -3,-73

[State 21561]
type = TargetBind
trigger1 = AnimElemNo(0) = 11
pos = -107,-83

[State 21561]
type = TargetBind
trigger1 = AnimElemNo(0) = 12
pos = -153,-97

[State 21561]
type = TargetBind
trigger1 = AnimElemNo(0) = 13
pos = -106,-114

[State 21561]
type = TargetBind
trigger1 = AnimElemNo(0) = 14
pos = -5,-118

[State 21561]
type = TargetBind
trigger1 = AnimElemNo(0) = 15
pos = 102,-117

[State 21561]
type = TargetBind
trigger1 = AnimElemNo(0) = 16
pos = 149,-98


[State 21561]
type = PlaySnd
trigger1 = AnimElem = 2 || AnimElem = 10
value = 1540,2

[State 21561]
type = varset
trigger1 = Time = 0
var(1) = 0

[State 21561]
type = varadd
trigger1 = AnimElem = 15
var(1) = 1

[State 21561]
type = TargetState
trigger1 = AnimElem = 15 && var(1) > 2
value = 21572

[State 21561]
type = ChangeState
trigger1 = AnimElem = 15 && var(1) > 2
value = 21562
ctrl = 0



[State 21561]
type = ChangeState
triggerall = isHelper
trigger1 = !NumTarget(21540)
trigger2 = Parent,Stateno != 21561
value = 21565

[State 21561]
type = ChangeState
trigger1 = !isHelper
trigger1 = NumHelper(21540)
trigger1 = !Helper(21540),NumTarget(21540)
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Web Trap

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

[State 21562]
type = BindToParent
trigger1 = 1

[State 21562]
type = NotHitBy
trigger1 = isHelper
value = SCA



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

[State 21562]
type = TargetBind
trigger1 = AnimElemNo(0) = 1
pos = 154,-67

[State 21562]
type = TargetBind
trigger1 = AnimElemNo(0) = 2
pos = 50,-49

[State 21562]
type = TargetBind
trigger1 = AnimElemNo(0) = 3
pos = -39,-41


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


[State 21562]
type = PlaySnd
trigger1 = AnimElem = 3
value = 1540,2


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

[State 21562]
type = TargetLifeAdd
trigger1 = AnimElem = 5 && IsHelper
value = -10*(root,var(30))


[State 21562]
type = PowerAdd
trigger1 = AnimElem = 5 && IsHelper
value = 50


[State 21562]
type = Explod
trigger1 = AnimElem = 5, = 1
anim = 21554
;bindtime = -1
postype = p1
ontop = 1
ownpal = 1
vel = -9,1
pos = -54,-50

[State 21562]
type = TargetState
trigger1 = AnimElem = 5, >= 1
value = 21575

[State 21562]
type = ChangeState
trigger1 = AnimElem = 5, >= 1
value = 21565
ctrl = 0



[State 21562]
type = ChangeState
triggerall = isHelper
trigger1 = !NumTarget(21540)
trigger2 = Parent,Stateno != 21562
value = 21565

[State 21562]
type = ChangeState
trigger1 = !isHelper
trigger1 = NumHelper(21540)
trigger1 = !Helper(21540),NumTarget(21540)
value = 0
ctrl = 1

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

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


[State 21565]
type = Turn
trigger1 = AnimElem = 8
trigger1 = facing = enemy,facing

[State 21565]
type = Turn
trigger1 = BackEdgeDist < -10
trigger1 = facing = enemy,facing
persistent = 0

[State 21565]
type = AssertSpecial
trigger1 = IsHelper
flag = invisible



[State 21565]
type = DestroySelf
trigger1 = Time > 7 && IsHelper 

[State 21565]
type = ChangeState
trigger1 = AnimTime = 0
trigger2 = BackEdgeDist < -70
value = 0
ctrl = 1


;---------------------------------------------------------------------------
;Stick to Web

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


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


[State 21570]
type = Turn
trigger1 = facing = enemynear,facing
trigger1 = Time = 0



[State 21570]
type = ChangeAnim2
trigger1 = Time = 0
value = 1545

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


[State 21570]
type = DestroySelf
trigger1 = ishelper



;---------------------------------------------------------------------------
;Stick to Web

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


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


[State 21571]
type = Turn
trigger1 = facing = enemynear,facing
trigger1 = Time = 0



[State 21571]
type = ChangeAnim2
trigger1 = Time = 0
value = 1547


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


[State 21571]
type = DestroySelf
trigger1 = ishelper



;---------------------------------------------------------------------------
;Stick to Web

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



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


[State 21572]
type = Turn
trigger1 = facing = enemynear,facing
trigger1 = Time = 0


[State 21572]
type = ChangeAnim2
trigger1 = Time = 0
value = 1547


[State 21572]
type = Turn
trigger1 = AnimElem = 5;facing = enemynear,facing


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


[State 21572]
type = DestroySelf
trigger1 = ishelper


;---------------------------------------------------------------------------
;Thrown by Web Throw

[Statedef 21575]
type    = A
movetype= H
physics = N
velset = -15,-5
poweradd = 60



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

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


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


[State 21575]
type = 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 21575] ;Hit ground
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;Hit ground



;---------------------------------------------------------------------------
; Web Trap

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

[State 21580]
type = BindToParent
trigger1 = 1


[State 21580]
type = NotHitBy
trigger1 = isHelper
value = SCA



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



[State 21580]
type = TargetBind
trigger1 = AnimElemNo(0) = 1
pos = 181,-183

[State 21580]
type = TargetBind
trigger1 = AnimElemNo(0) = 2
pos = 183,-180

[State 21580]
type = TargetBind
trigger1 = AnimElemNo(0) = 3
pos = 173,-162

[State 21580]
type = TargetBind
trigger1 = AnimElemNo(0) = 4
pos = 164,-149

[State 21580]
type = TargetBind
trigger1 = AnimElemNo(0) = 5
pos = 167,-148


[State 21580]
type = TargetBind
trigger1 = AnimElemNo(0) = 6
pos = 167,-146

[State 21580]
type = TargetBind
trigger1 = AnimElemNo(0) = 7
pos = 159,-137

[State 21580]
type = TargetState
trigger1 = AnimTime = 0
value = 21572

[State 21580]
type = ChangeState
trigger1 = AnimTime = 0
value = 21562
ctrl = 0



[State 21580]
type = ChangeState
triggerall = isHelper
trigger1 = !NumTarget(21540)
trigger2 = Parent,Stateno != 21580
value = 21565
ctrl = 1

[State 21580]
type = ChangeState
trigger1 = !isHelper
trigger1 = NumHelper(21540)
trigger1 = !Helper(21540),NumTarget(21540)
value = 0
ctrl = 1


;---------------------------------------------------------------------------
; Web Trap

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

[State 21585]
type = BindToParent
trigger1 = 1

[State 21585]
type = NotHitBy
trigger1 = isHelper
value = SCA



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



[State 21585]
type = TargetBind
trigger1 = AnimElemNo(0) = 1
pos = 18,-228

[State 21585]
type = TargetBind
trigger1 = AnimElemNo(0) = 2
pos = 10,-225

[State 21585]
type = TargetBind
trigger1 = AnimElemNo(0) = 3
pos = 8,-217

[State 21585]
type = TargetBind
trigger1 = AnimElemNo(0) = 4
pos = 67,-173

[State 21585]
type = TargetBind
trigger1 = AnimElemNo(0) = 5
pos = 92,-167


[State 21585]
type = TargetBind
trigger1 = AnimElemNo(0) = 6
pos = 104,-159

[State 21585]
type = TargetBind
trigger1 = AnimElemNo(0) = 7
pos = 123,-147


[State 21585]
type = TargetBind
trigger1 = AnimElemNo(0) = 8
pos = 122,-139



[State 21585]
type = TargetState
trigger1 = AnimTime = 0
value = 21572

[State 21585]
type = ChangeState
trigger1 = AnimTime = 0
value = 21562
ctrl = 0



[State 21585]
type = ChangeState
triggerall = isHelper
trigger1 = !NumTarget(21540)
trigger2 = Parent,Stateno != 21585
value = 21565
ctrl = 1

[State 21585]
type = ChangeState
trigger1 = !isHelper
trigger1 = NumHelper(21540)
trigger1 = !Helper(21540),NumTarget(21540)
value = 0
ctrl = 1


;---------------------------------------------------------------------------
;Stick to Web

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


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


[State 21590]
type = Turn
trigger1 = facing = enemynear,facing
trigger1 = Time = 0



[State 21590]
type = ChangeAnim2
trigger1 = Time = 0
value = 1555


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

[State 21590]
type = null;PalFx
trigger1 = AnimElemNo(0) = [4,7]
color = 0
time = 15
add = 64,-128,64

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


[State 21590]
type = DestroySelf
trigger1 = ishelper



;---------------------------------------------------------------------------
;Stick to Web

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


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


[State 21595]
type = Turn
trigger1 = facing = enemynear,facing
trigger1 = Time = 0



[State 21595]
type = ChangeAnim2
trigger1 = Time = 0
value = 1565


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

[State 21595]
type = null;PalFx
trigger1 = AnimElemNo(0) = [4,7]
color = 0
time = 15
add = 64,-128,64

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


[State 21595]
type = DestroySelf
trigger1 = ishelper

;------------------------------------------------------------------------------------------------------------
;Psi Thrust Helper
[Statedef 23000]
type = S
movetype = I
physics = N
;anim = 23000
ctrl = 0
sprpriority = 3
velset = 0,0
;hitcountpersist = 1


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


[State 23000]
type = varset
trigger1 = Time = 0
var(1) = parent,stateno

[State 23000]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 9800
value = 9800


[State 23000]
type = DestroySelf
trigger1 = parent,stateno != var(1)


[State 23000]
type = BindToParent
trigger1 = 1



[State 23000]
type = VarSet
trigger1 = Time = 0
var(3) = 1



[State 23000]
type = VarSet
trigger1 = !parent,var(59)
trigger1 = parent,command = "holdfwd"
trigger1 = parent,command != "holdup"
trigger1 = parent,command != "holddown"
var(3) = 1


[State 23000]
type = VarSet
trigger1 = !parent,var(59)
trigger1 = parent,command = "holdback"
trigger1 = parent,command != "holdup"
trigger1 = parent,command != "holddown"
var(3) = -1


[State 23000]
type = VarSet
trigger1 = !parent,var(59)
trigger1 = parent,command = "holdfwd" && parent,command = "holdup"
var(3) = 2

[State 23000]
type = VarSet
trigger1 = !parent,var(59)
trigger1 = parent,command = "holdback" && parent,command = "holdup"
var(3) = -2


[State 23000]
type = VarSet
trigger1 = !parent,var(59)
trigger1 = parent,command != "holdfwd"
trigger1 = parent,command != "holdback"
trigger1 = parent,command = "holdup"
var(3) = 3


[State 23000]
type = VarSet
trigger1 = !parent,var(59)
trigger1 = parent,command = "holddown"
trigger1 = parent,command != "holdfwd"
trigger1 = parent,command != "holdback"
var(3) = -3

[State 23000]
type = VarSet
trigger1 = !parent,var(59)
trigger1 = parent,command = "holdfwd" && parent,command = "holddown"
var(3) = 4


[State 23000]
type = VarSet
trigger1 = !parent,var(59)
trigger1 = parent,command = "holddown" && parent,command = "holdback"
var(3) = -4


;Forward
[State 23000]
type = ParentVarSet
trigger1 = !parent,var(59)
trigger1 = var(3) = 1
trigger2 = parent,var(59)
trigger2 = parent,var(8) = [-30,30]
trigger2 = parent,p2bodydist x = [10,270]
var(4) = 3001


;Back
[State 23000]
type = ParentVarSet
trigger1 = var(3) = -1
trigger2 = parent,var(59)
trigger2 = parent,var(8) = [-30,30]
trigger2 = parent,p2bodydist x = [-320,-10]
var(4) = 3005


;Up Forward
[State 23000]
type = ParentVarSet
trigger1 = var(3) = 2
trigger2 = parent,var(59)
;trigger2 = var(8) = [-30,30]
trigger2 = parent,p2bodydist x = [10,320]
trigger2 = parent,p2bodydist y/parent,p2bodydist x = [-1.3,-0.7]
var(4) = 3002

;Up Backward
[State 23000]
type = ParentVarSet
trigger1 = var(3) = -2
trigger2 = parent,var(59)
;trigger2 = var(8) = [-30,30]
trigger2 = parent,p2bodydist x = [-320,-10]
trigger2 = parent,p2bodydist y/parent,p2bodydist x = [0.7,1.3]
var(4) = 3004

;Up
[State 23000]
type = ParentVarSet
trigger1 = var(3) = 3
trigger2 = parent,var(59)
;trigger2 = var(8) = [-30,30]
trigger2 = parent,p2bodydist x = [-30,30]
trigger2 = parent,p2bodydist y = [-50,-300]
var(4) = 3003

;Down
[State 23000]
type = ParentVarSet
trigger1 = var(3) = -3
trigger2 = parent,var(59)
;trigger2 = var(8) = [-30,30]
trigger2 = parent,p2bodydist x = [-30,30]
trigger2 = parent,p2bodydist y = [300,50]
var(4) = 3007


;Forward Down
[State 23000]
type = ParentVarSet
trigger1 = var(3) = 4
trigger2 = parent,var(59)
;trigger2 = var(8) = [-30,30]
trigger2 = parent,p2bodydist x = [10,300]
trigger2 = parent,p2bodydist y/parent,p2bodydist x = [0.7,1.3]
var(4) = 3008

;Back Down
[State 23000]
type = ParentVarSet
trigger1 = var(3) = -4
trigger2 = parent,var(59)
;trigger2 = var(8) = [-30,30]
trigger2 = parent,p2bodydist x = [-300,-10]
trigger2 = parent,p2bodydist y/parent,p2bodydist x = [-1.3,-0.7]
var(4) = 3006





;------------------------------------------------------------------------------------------------------------
;Web Helper
[Statedef 23040]
type = S
movetype = A
physics = N
;anim = 23040
ctrl = 0
sprpriority = 1
velset = 0,0
hitcountpersist = 1


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

[State 23040]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 23040
value = 23040

[State 23040]
type = AssertSpecial
trigger1 = 1
flag = noshadow


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



[State 23040]
type = HitBy
trigger1 = 1
value = SCA,AP

[State 23040]
type = HitOverride
trigger1 = 1
stateno = 23040
attr = SCA,AP
slot = 0
time = -1

 

[State 23040]
type = HitDef
attr = SA, HP
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 4*(Root,var(30)),floor(root,var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = MA
hitflag = MAFD
pausetime = 0,0
sparkxy = -10,-40 + floor(P2Dist Y)
hitsound   = S1450,2
guardsound = S4,0
sparkno = 2
ground.type = Low
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -5
air.velocity = -5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = 0
sprpriority = 1
;p2stateno = 9020
p1stateno = 23050
p2stateno = 23060
id = 23041

[State 23040]
type = ChangeState
trigger1 = AnimElem = 6
value = 23049
ctrl = 0



[State 23040]
type = BindToParent
trigger1 = 1
pos = 57,-42

;------------------------------------------------------------------------------------------------------------
;Web Helper End
[Statedef 23049]
type = U
movetype = I
physics = N
;anim = 23009
ctrl = 0
sprpriority = 1
velset = 0,0
;hitcountpersist = 1

[State 23049]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 23049]
type = AssertSpecial
trigger1 = Time%2 = 0
flag = invisible


[State 23049]
type = DestroySelf
trigger1 = AnimTime = 0


;---------------------------------------------------------------------------
; Web Trap

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

[State 3410]
type = Helper
trigger1 = time = 0
stateno = 33120
ownpal = 1



[State 23050]
type = BindToParent
trigger1 = 1

[State 23050]
type = Explod
trigger1 = Time = 0 && !isHelper
anim = 23041
ontop = 1
pos = 57,-42

[State 23050]
type = NotHitBy
trigger1 = isHelper
value = SCA



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



[State 23050]
type = TargetBind
trigger1 = AnimElemNo(0) = 1
pos = 136,28

[State 23050]
type = TargetBind
trigger1 = AnimElemNo(0) = 2
pos = 55,30

[State 23050]
type = TargetBind
trigger1 = AnimElemNo(0) = 3
pos = 32,39

[State 23050]
type = TargetBind
trigger1 = AnimElemNo(0) = 4
pos = -5,40

[State 23050]
type = TargetBind
trigger1 = AnimElemNo(0) = 5
pos = -19,40


[State 23050]
type = TargetBind
trigger1 = AnimElemNo(0) = 6
pos = -45,18

[State 23050]
type = TargetBind
trigger1 = AnimElemNo(0) = 7
pos = -71,17

[State 23050]
type = TargetBind
trigger1 = AnimElemNo(0) = 8
pos = -104,8

[State 23050]
type = TargetBind
trigger1 = AnimElemNo(0) = 9
pos = -116,-6

[State 23050]
type = TargetBind
trigger1 = AnimElemNo(0) = 10
pos = -138,-28

[State 23050]
type = TargetBind
trigger1 = AnimElemNo(0) = 11
pos = -142,-35


[State 23050]
type = TargetBind
trigger1 = AnimElemNo(0) = 12
pos = -126,-65

[State 23050]
type = TargetBind
trigger1 = AnimElemNo(0) = 13
pos = -128,-87

[State 23050]
type = TargetBind
trigger1 = AnimElemNo(0) = 14
pos = -129,-101

[State 23050]
type = TargetState
trigger1 = AnimTime = 0
value = 23061

[State 23050]
type = ChangeState
trigger1 = AnimTime = 0
value = 23051
ctrl = 0



[State 23050]
type = ChangeState
triggerall = ishelper
trigger1 = !NumTarget(23041)
trigger2 = parent,stateno != 23050
value = 23055
ctrl = 1

[State 23050]
type = ChangeState
trigger1 = !isHelper
trigger1 = NumHelper(23040)
trigger1 = !Helper(23040),NumTarget(23041)
value = 635
ctrl = 1

[State 23050]
type = ChangeState
trigger1 = !isHelper
trigger1 = !NumHelper(23040)
value = 23055
ctrl = 0

;---------------------------------------------------------------------------
; Web Trap

[Statedef 23051]
type    = A
movetype= A
physics = N
anim = 3051
;poweradd = 60
juggle  = 0
velset = 1,0.5
ctrl = 0
sprpriority = 0

[State 23051]
type = BindToParent
trigger1 = 1

[State 3410]
type = Helper
trigger1 = time = 0
stateno = 33120
ownpal = 1

[State 23051]
type = NotHitBy
trigger1 = isHelper
value = SCA



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



[State 23051]
type = TargetBind
trigger1 = AnimElemNo(0) = 1
trigger2 = AnimTime = 0
pos = -127,-110

[State 23051]
type = TargetBind
trigger1 = AnimElemNo(0) = 2
pos = -127,-123

[State 23051]
type = TargetBind
trigger1 = AnimElemNo(0) = 3
pos = -85,-136

[State 23051]
type = TargetBind
trigger1 = AnimElemNo(0) = 4
pos = -64,-162

[State 23051]
type = TargetBind
trigger1 = AnimElemNo(0) = 5
pos = -48,-175

[State 23051]
type = TargetBind
trigger1 = AnimElemNo(0) = 6
pos = -26,-181

[State 23051]
type = TargetBind
trigger1 = AnimElemNo(0) = 7
pos = -5,-182

[State 23051]
type = TargetBind
trigger1 = AnimElemNo(0) = 8
pos = 28,-165


[State 23051]
type = TargetBind
trigger1 = AnimElemNo(0) = 9
pos = 47,-164

[State 23051]
type = TargetBind
trigger1 = AnimElemNo(0) = 10
pos = 70,-162

[State 23051]
type = TargetBind
trigger1 = AnimElemNo(0) = 11
pos = 90,-156

[State 23051]
type = TargetBind
trigger1 = AnimElemNo(0) = 12
pos = 135,-118

[State 23051]
type = TargetBind
trigger1 = AnimElemNo(0) = 13
pos = 126,-88

[State 23051]
type = TargetBind
trigger1 = AnimElemNo(0) = 14
pos = 127,-73

[State 23051]
type = TargetBind
trigger1 = AnimElemNo(0) = 15
pos = 132,-51

[State 23051]
type = TargetBind
trigger1 = AnimElemNo(0) = 16
pos = 131,-37

[State 23051]
type = TargetBind
trigger1 = AnimElemNo(0) = 17
pos = 118,-7

[State 23051]
type = TargetBind
trigger1 = AnimElemNo(0) = 18
pos = 69,17

[State 23051]
type = TargetBind
trigger1 = AnimElemNo(0) = 19
pos = 51,31

[State 23051]
type = TargetBind
trigger1 = AnimElemNo(0) = 20
pos = 30,37

[State 23051]
type = TargetBind
trigger1 = AnimElemNo(0) = 21
pos = 6,38

[State 23051]
type = TargetBind
trigger1 = AnimElemNo(0) = 22
pos = -39,41

[State 23051]
type = TargetBind
trigger1 = AnimElemNo(0) = 23
pos = -73,16

[State 23051]
type = TargetBind
trigger1 = AnimElemNo(0) = 24
pos = -93,9


[State 23051]
type = TargetBind
trigger1 = AnimElemNo(0) = 25
pos = -120,-11

[State 23051]
type = TargetBind
trigger1 = AnimElemNo(0) = 26
pos = -138,-28

[State 23051]
type = TargetBind
trigger1 = AnimElemNo(0) = 27
pos = -144,-42

[State 23051]
type = TargetBind
trigger1 = AnimElemNo(0) = 28
pos = -125,-57

[State 23051]
type = TargetBind
trigger1 = AnimElemNo(0) = 29
pos = -124,-71

[State 23051]
type = TargetBind
trigger1 = AnimElemNo(0) = 30
pos = -129,-94



[State 23051]
type = PlaySnd
trigger1 = AnimElem = 2 || AnimElem = 12 || AnimElem = 22
value = 0,0;1540,2

[State 23051]
type = varset
trigger1 = Time = 0
var(1) = 0

[State 23051]
type = varadd
trigger1 = AnimElem = 17
var(1) = 1

[State 23051]
type = TargetState
trigger1 = AnimElem = 18 && var(1) > 1
value = 23062

[State 23051]
type = ChangeState
trigger1 = AnimElem = 18 && var(1) > 1
value = 23052
ctrl = 0



[State 23051]
type = ChangeState
triggerall = ishelper
trigger1 = !NumTarget(23041)
trigger2 = parent,stateno != 23051
value = 23055
ctrl = 1

[State 23051]
type = ChangeState
trigger1 = !isHelper
trigger1 = NumHelper(23040)
trigger1 = !Helper(23040),NumTarget(23041)
value = 635
ctrl = 1

[State 23051]
type = ChangeState
trigger1 = !isHelper
trigger1 = !NumHelper(23040)
value = 23055
ctrl = 0

;---------------------------------------------------------------------------
; Web Trap

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

[State 23052]
type = BindToParent
trigger1 = 1

[State 3410]
type = Helper
trigger1 = time = 0
stateno = 33120
ownpal = 1

[State 23052]
type = NotHitBy
trigger1 = isHelper
value = SCA



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



[State 23052]
type = TargetBind
trigger1 = AnimElemNo(0) = 1
pos = 39,26

[State 23052]
type = TargetBind
trigger1 = AnimElemNo(0) = 2
pos = 21,39

[State 23052]
type = TargetBind
trigger1 = AnimElemNo(0) = 3
pos = 1,44

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

[State 23052]
type = TargetBind
trigger1 = AnimElemNo(0) = 5
pos = -62,11


[State 23052]
type = TargetBind
trigger1 = AnimElemNo(0) = 6
pos = -81,13

[State 23052]
type = TargetBind
trigger1 = AnimElemNo(0) = 7
pos = -106,10

[State 23052]
type = TargetBind
trigger1 = AnimElemNo(0) = 8
pos = -125,3

[State 23052]
type = TargetBind
trigger1 = AnimElemNo(0) = 9
pos = -131,-51

[State 23052]
type = TargetBind
trigger1 = AnimElemNo(0) = 10
pos = -150,-69

[State 23052]
type = TargetBind
trigger1 = AnimElemNo(0) = 11
pos = -158,-85


[State 23052]
type = TargetBind
trigger1 = AnimElemNo(0) = 12
pos = -158,-98

[State 23052]
type = TargetBind
trigger1 = AnimElemNo(0) = 13
pos = -71,-107

[State 23052]
type = TargetBind
trigger1 = AnimElemNo(0) = 14
pos = -59,-138

[State 23052]
type = TargetBind
trigger1 = AnimElemNo(0) = 15
pos = -23,-179

[State 23052]
type = TargetBind
trigger1 = AnimElemNo(0) = 16
pos = 24,-184

[State 23052]
type = TargetBind
trigger1 = AnimElemNo(0) = 17
pos = 77,-129

[State 23052]
type = TargetBind
trigger1 = AnimElemNo(0) = 18
pos = 121,-119

[State 23052]
type = TargetBind
trigger1 = AnimElemNo(0) = 19
pos = 164,-84

[State 23052]
type = TargetBind
trigger1 = AnimElemNo(0) = 20
pos = 177,-32

[State 23052]
type = TargetBind
trigger1 = AnimElemNo(0) = 21
pos = 167,12


[State 23052]
type = PlaySnd
trigger1 = AnimElem = 4
value = 1540,2


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

[State 23052]
type = TargetLifeAdd
trigger1 = AnimElem = 20 && IsHelper
value = -150

[State 23052]
type = PowerAdd
trigger1 = AnimElem = 20
value = 50


[State 23052]
type = Explod
trigger1 = AnimElem = 6, = 1
anim = 21554
;bindtime = -1
postype = p1
ontop = 1
ownpal = 1
vel = -9,1
pos = -54,-50

[State 23052]
type = TargetState
trigger1 = AnimTime = 0
value = 23065

[State 23052]
type = ChangeState
trigger1 = AnimTime = 0
value = 23055
ctrl = 0



[State 23052]
type = ChangeState
triggerall = ishelper
trigger1 = !NumTarget(23041)
trigger2 = parent,stateno != 23052
value = 23055
ctrl = 1

[State 23052]
type = ChangeState
trigger1 = !isHelper
trigger1 = NumHelper(23040)
trigger1 = !Helper(23040),NumTarget(23041)
value = 635
ctrl = 1


[State 23052]
type = ChangeState
trigger1 = !isHelper
trigger1 = !NumHelper(23040)
value = 23055
ctrl = 0

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

[Statedef 23055]
type    = A
movetype= I
physics = A
anim = 3049
;poweradd = 60
juggle  = 0
velset = -2,-7
ctrl = 0
sprpriority = 0

[State 3410]
type = Helper
trigger1 = time = 0
stateno = 33120
ownpal = 1


[State 23055]
type = AssertSpecial
trigger1 = IsHelper
flag = invisible



[State 23055]
type = DestroySelf
trigger1 = Time > 17 && IsHelper 

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


;---------------------------------------------------------------------------
;Stick to Web

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


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


[State 23060]
type = Turn
trigger1 = facing = enemynear,facing
trigger1 = Time = 0



[State 23060]
type = ChangeAnim2
trigger1 = Time = 0
value = 3060


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

[State 23060]
type = null;PalFx
trigger1 = AnimElemNo(0) = [4,7]
color = 0
time = 15
add = 64,-128,64

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

[State 23060]
type = 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 = 60


[State 23060]
type = DestroySelf
trigger1 = ishelper



;---------------------------------------------------------------------------
;Stick to Web

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


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


[State 23061]
type = Turn
trigger1 = facing = enemynear,facing
trigger1 = Time = 0



[State 23061]
type = ChangeAnim2
trigger1 = Time = 0
value = 3061


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

[State 23061]
type = null;PalFx
trigger1 = AnimElemNo(0) = [4,7]
color = 0
time = 15
add = 64,-128,64


[State 23061]
type = 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 = 60

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


[State 23061]
type = DestroySelf
trigger1 = ishelper



;---------------------------------------------------------------------------
;Stick to Web

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


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


[State 23062]
type = Turn
trigger1 = facing = enemynear,facing
trigger1 = Time = 0



[State 23062]
type = ChangeAnim2
trigger1 = Time = 0
value = 3062


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

[State 23062]
type = null;PalFx
trigger1 = AnimElemNo(0) = [4,7]
color = 0
time = 15
add = 64,-128,64

[State 23062]
type = 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 = 60

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


[State 23062]
type = DestroySelf
trigger1 = ishelper



;---------------------------------------------------------------------------
;Thrown by Web Throw

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



[State 23065]
type = ChangeAnim2
trigger1 = Time = 0
value = 3063

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

[State 23065]
type = null;VelSet
trigger1 = Time = 0
x = -13
y = -5

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


[State 23065]
type = null;ScreenBound
trigger1 = 1
;trigger1 = BackEdgeBodyDist < 65
;trigger2 = FrontEdgeBodyDist < 65
value = 0
movecamera = 1,1



[State 23065]
type = 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 23065]
type = null;ChangeState
trigger1 = BackEdgeBodyDist <= 0
trigger2 = FrontEdgeBodyDist <= 0
value = 9027



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


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


[State 23065] ;Hit ground
type = null;ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 824

;------------------------------------------------------------------------------------------------------------
;Bomb Explod Helper on Ground
[Statedef 23125]
type = A
movetype = A
physics = N
;anim = 23125
ctrl = 0
sprpriority = 2
velset = 0,0

[State 23125]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 23125
value = 23125

[State 23125]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 23125]
type = PlaySnd
trigger1 = Time = 1
value = 32720


[State 23125]
type = HitBy
trigger1 = 1
value = SCA,AP

[State 23125]
type = HitOverride
trigger1 = 1
stateno = 23125
attr = SCA,AP
slot = 0
time = -1


[State 23125]
type = HitDef
attr = A, HP
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 21*(Root,var(30)),Root,var(30)
animtype = Large
priority  = 5, Hit
guardflag = MA
pausetime = 0,7
sparkxy = -10,-40
hitsound   = S8,0
guardsound = S4,0
sparkno = 2
ground.type = High
ground.slidetime = 10
ground.hittime  = 25
ground.velocity = -8,-7
air.velocity = -8,-7
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
getpower = 0
palfx.time = 1
palfx.add = 256,256,256
envshake.time = 30
envshake.freq = 100
envshake.ampl = -10
envshake.phase = 10


[State 23125]
type = DestroySelf
trigger1 = AnimTime = 0



;------------------------------------------------------------------------------------------------------------
;Blood Spit
[Statedef 28103]
type = A
movetype = I
physics = N
anim = 8103
ctrl = 0
sprpriority = 4
velset = 0,0


[State 28103]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 28103]
type = VelSet
trigger1 = Time = 0 && parent,anim = 8108
x = 2+random%2
y = 1+random%2


[State 28103]
type = VelSet
trigger1 = Time = 0 && parent,anim = 8109
x = 4+random%2
y = -3-random%2


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

[State 28103]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 28104



;------------------------------------------------------------------------------------------------------------
;Blood Spit
[Statedef 28104]
type = S
movetype = I
physics = N
anim = 8104
ctrl = 0
sprpriority = 4
velset = 0,0


[State 28103]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 28104]
type = DestroySelf
trigger1 = AnimTime = 0


;------------------------------------------------------------------------------------------------------------
;Blood Spit
[Statedef 28108]
type = S
movetype = I
physics = N
anim = 8108+random%2
ctrl = 0
sprpriority = 5
velset = 0,0


[State 28108]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 28108]
type = Helper
trigger1 = AnimElem = 2 && Anim = 8108
stateno = 28103
pos = 56,28


[State 28108]
type = Helper
trigger1 = AnimElem = 2 && Anim = 8109
stateno = 28103
pos = 56,-28

[State 28108]
type = null;Turn
trigger1 = root,facing != facing


[State 28108]
type = BindToTarget
trigger1 = Root,Var(10)
id = Root,var(10)
pos = -100,0,mid


[State 28108]
type = DestroySelf
trigger1 = AnimTime = 0



;------------------------------------------------------------------------------------------------------------
;Blood Spit
[Statedef 28109]
type = S
movetype = I
physics = N
anim = 8108+random%2
ctrl = 0
sprpriority = 5
velset = 0,0


[State 28109]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 28109]
type = Helper
trigger1 = AnimElem = 2 && Anim = 8108
stateno = 28103
pos = 56,28


[State 28109]
type = Helper
trigger1 = AnimElem = 2 && Anim = 8109
stateno = 28103
pos = 56,-28

[State 28109]
type = null;Turn
trigger1 = root,facing != facing


[State 28109]
type = null;BindToParent
trigger1 = 1

[State 28109]
type = DestroySelf
trigger1 = AnimTime = 0



;-----------------------------------------------------------------
; Override common states (use same number to override) :
;-----------------------------------------------------------------



;-----------------------------------------------------------------
; States that are always executed (use statedef -2)
;-----------------------------------------------------------------

;-----------------------------------------------------------------
; States that are executed when in se
