;======================================================================
; Bender by Warner

;===========================================================================
[Data]
life = 1000
power = 3000
attack = 110
defence = 120
fall.defence_up = 50
liedown.time = 50
airjuggle = 15
sparkno = 2
guard.sparkno = 40
KO.echo = 0
volume = -10
IntPersistIndex = 60
FloatPersistIndex = 40

[Size]
xscale = 1
yscale = 1
ground.back = 15 
ground.front = 16
air.back = 12
air.front = 12
height = 60
attack.dist = 160
attack.width = 4,4   
proj.dist = 90
proj.attack.dist = 90 
proj.doscale = 0
head.pos = 1, -83
mid.pos = 1, -53
shadowoffset = 0
draw.offset = 0,0

[Velocity]
walk.fwd = 3.2
walk.back = -2.7
run.fwd = 6
run.back = -8,-3
jump.neu = 0,-9.0
jump.back = -3.7
jump.fwd = 3.2
runjump.fwd = 4.4
runjump.back = -4.4
airjump.neu = 0, -8.9
airjump.fwd = 2.5
airjump.back = -2.55

[Movement]
airjump.num = 0
airjump.height = 35
yaccel = .44
stand.friction = .5
crouch.friction = .5
air.friction = .82

;------------------------------------------------------------------
; RUN_FWD
[Statedef 100]
type    = S
physics = S
anim = 100
sprpriority = 1

[State 100, 1]
type = VelSet
trigger1 = 1
x = const(velocity.run.fwd.x)

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

[State 3000, Ground Flash2]
type = Explod
trigger1 = AnimElem = 1
anim = 6666
ID = 8400
postype = P1
pos = -2,0
sprpriority = 3
ownpal = 1
scale = .5,.2
supermovetime = 0

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

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

[State 100, 4]
type = ChangeState
trigger1 = command != "holdfwd"
value = 0
;----------------------------------------------------------------------
;RUN_BACK
[Statedef 105]
type    = A
physics = A
ctrl = 0
anim = 105
sprpriority = 1

[State 105, VelSet]
type = VelSet
trigger1 = Time = 2
x = -10
y = const(velocity.run.back.y)

[State 105, ChangeState]
type = ChangeState
trigger1 = Time > 15
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 106


;---------------------------------------------------------------------------------------------
;RUN_BACK
[Statedef 106]
type    = S
physics = S
ctrl = 0
anim = 106
sprpriority = 1

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

[State 106, posset]
type = posset
trigger1 = time = 0
y = 0

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


[State 106, VelSet]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------------------------
;Win Poses

[Statedef 180]
type = S

[State 180, 1]
type = VarRandom
trigger1 = Time = 0
v = 1
range = 0,700

[State 180, 2]
type = ChangeState
trigger1 = Var(1) = [0,100]
value = 181

[State 180, 3]
type = ChangeState
trigger1 = Var(1) = [101,200]
value = 182

[State 180, 4]
type = ChangeState
trigger1 = Var(1) = [201,300]
value = 183

[State 180, 5]
type = ChangeState
trigger1 = Var(1) = [301,400]
value = 184

[State 180, 5]
type = ChangeState
trigger1 = Var(1) = [401,600]
value = 185

[State 180, 5]
type = ChangeState
trigger1 = Var(1) = [401,700]
value = 186
;------------------------------------------------------------------
;Win Pose 1

[Statedef 181]
type = S
movetype = I
physics = S
ctrl = 0
anim = 181
velset = 0,0

[State 181, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 3
value = 180,0

[State 181, AssertSpecial]
type = AssertSpecial
trigger1 = Time = [0,386]
flag = RoundNotOver

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

;---------------------------------------------------------------------------------------------
;Win Pose 2

[Statedef 182]
type = S
movetype = I
physics = S
ctrl = 0
anim = 182
velset = 0,0

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

[State 182, PlaySnd1]
type = PlaySnd
trigger1 =  AnimElem = 19
value = 180,1

[State 182, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;---------------------------------------------------------------------------------------------
;Win Pose 3

[Statedef 183]
type = S
movetype = I
physics = S
ctrl = 0
anim = 183
velset = 0,0

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

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

;---------------------------------------------------------------------------------------------
;Win Pose 4

[Statedef 184]
type = S
movetype = I
physics = S
ctrl = 0
anim = 184
velset = 0,0

[State 184, PlaySnd0]
type = PlaySnd
trigger1 =  AnimElem = 3
value = 20,7

[State 184, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 11
value = 184,0

[State 185, stand]
type = Explod
trigger1 = AnimElem = 8
persistent = 0
anim = 1184
postype = p1
pos = 0, 0
sprpriority = 2

[state 184, 1]
type = assertspecial
trigger1 = time < 250
flag = roundnotover

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


;-----------------------------------------------------------------
;win pose 5
[Statedef 185]
type = S
ctrl = 0

[State 181, 1]
type = NotHitBy
trigger1 = 1
value = SCA

[State 185, stand]
type = Explod
trigger1 = Time = 0
persistent = 0
anim = 2
postype = p1
pos = 0, 0

[State 185,1]
type = AssertSpecial
trigger1 = time < 140
flag = roundnotover

[State 185, distance X_right]
type = varset
trigger1 = facing = 1
trigger1 = time = 0
var(20) = floor(ifelse((enemy,facing = -1),(enemy,FrontEdgeDist - BackEdgeDist),(enemy,BackEdgeDist - BackEdgeDist)))

[State 185, distance X_left]
type = varset
trigger1 = facing = -1
trigger1 = time = 0
var(20) = floor(ifelse((enemy,facing = 1),(FrontEdgeDist - enemy,BackEdgeDist),(FrontEdgeDist - enemy,FrontEdgeDist)))

[State 185, time for distance]
type = varset
trigger1 = time = 0
var(21) = floor(var(20)/30)

[State 185, run_anim]
type = changeanim
trigger1 = time = 0
value = ifelse( (var(21) >= 0), 20, 105 )

[State 185, run]
type = velset
trigger1 = time = 0
x = var(21)

[State 185, stop]
type = velset
trigger1 = time = 30
x = 0

[State 185, anim]
type = changeanim
trigger1 = time = 30
value = ifelse( (var(21) >= 0), 185, 181 )


[State 200,PlaySnd]
type = PlaySnd
trigger1 = Time = 73
value = 180, 1
channel = 0

[State 185, 0]
type = null;Explod
triggerall = anim= 185
trigger1 = animelem = 5
anim = F1
pos = ifelse( (anim=185), 40, -40), -1
random = 5, 5
sprpriority = -1
;------------------------------------------------------------------
;Win Pose 6

[Statedef 186]
type = S
movetype = I
physics = S
ctrl = 0
anim = 186
velset = 0,0
sprpriority = 2

[State 186, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 33,1

[State 186, AssertSpecial]
type = AssertSpecial
trigger1 = Time = [0,250]
flag = RoundNotOver

[State 186, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;----------------------------------------------------------------
;Introductions

[Statedef 190]
type = S

[State 190,especial]
type = ChangeState
trigger1 = p2name = "Turanga Leela"  ; by warner
trigger2 = p4name = "Turanga Leela"
value = 198

[State 190,especial2]
type = ChangeState
trigger1 = palno = 2
value = 1198

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

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

[State 190, 3]
type = ChangeState
trigger1 = Var(1) = [21,40]
value = 192

[State 190, 4]
type = ChangeState
trigger1 = Var(1) = [41,60]
value = 194

[State 190, 5]
type = ChangeState
trigger1 = Var(1) = [61,80]
value = 196

[State 190, 6]
type = ChangeState
trigger1 = Var(1) = [81,100]
value = 197


;---------------------------------------------------------------------------------------------
;Intro1
[Statedef 191]
type = S
movetype = I
physics = N
ctrl = 0
anim = 190
velset = 0,0
spriority = 0

[State 0, VarSet]
type = VarRandom
trigger1 = time =0
v = 1
range = 6,8

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 191, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 2
value = 20,4
channel = 0

[State 191, PlaySnd2]
type = PlaySnd
trigger1 =  AnimElem = 24
value = 20,5
channel = 0

[State 191, 0]
type = Explod
trigger1 = animelem = 24
anim = 191
pos = 0,0
sprpriority = -1

[State 190, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 193



;---------------------------------------------------------------------------------------------
;Intro2
[Statedef 192]
type = S
movetype = I
physics = N
ctrl = 0
anim = 192
velset = 0,0


[State 0, VarSet]
type = VarRandom
trigger1 = time =0
v = 1
range = 6,8

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 192, PlaySnd2]
type = PlaySnd
trigger1 =  AnimElem = 2
value = 500,3
channel = 0

[State 192, PlaySnd2]
type = PlaySnd
trigger1 =  AnimElem = 7
value = 20,6
channel = 0

[State 192, 0]
type = Explod
trigger1 = animelem = 1
anim = 193
pos = 0,0
sprpriority = -1

[State 220, Sound1]
type = PlaySnd
trigger1 = AnimElem = 25
value = 3001,2

[State 220, Sound2]
type = PlaySnd
trigger1 = AnimElem = 32
value = 8600,0


[State 190, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 193


;-----------------------------------------------
[Statedef 193]; Move around before match
type = S
physics =S
sprpriority = 0

[State 0]
type = varset
trigger1 = time = 1
var(50) = 0

[State 0]
type = posset
trigger1 = 1
y = 0

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

[State 20, 1]
type = VelSet
trigger1 = command = "holdfwd"
x = 2.4

[State 20, 2]
type = VelSet
trigger1 = command = "holdback"
x = -2.0

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

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

[State 2]
type = ChangeAnim
trigger1 = command != "holdback"
trigger1 = command != "holdfwd"
trigger1 = Anim != 0
value = 0

[State 20, 2]
type = VelSet
trigger1 = command != "holdback"
trigger1 = command != "holdfwd"
x = 0

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

[State F]
type = posset
trigger1 = roundstate = 2
trigger1 = var(9) != 0
x = var(9)

[State F]
type = varset
trigger1 = roundstate = 2
var(9) = 0

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

;---------------------------------------------------------------------------------------------
;Intro1
[Statedef 194]
type = S
movetype = I
physics = N
ctrl = 0
anim = 194
velset = 0,0
spriority = 2

[State 0, VarSet]
type = VarRandom
trigger1 = time =0
v = 1
range = 6,8

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 191, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 8
value = 32,6

[State 191, PlaySnd2]
type = PlaySnd
trigger1 =  AnimElem = 10
value = 32,5
channel = 0

[State 191, 0]
type = Explod
trigger1 = animelem = 1
anim = 94
pos = 60,0
sprpriority = -1

[State 194, Pó]
type = Explod
trigger1 = AnimElem = 22
anim = 8510
ID = 8510
postype = P1
pos = 0,0
sprpriority = 1
ownpal = 1


[State 220, Sound1]
type = PlaySnd
trigger1 = AnimElem = 22
value = 8100,0

[State 190, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 193
;---------------------------------------------------------------------------------------------
;Intro especial
[Statedef 198]
type = S
movetype = I
physics = N
ctrl = 0
anim = 198
velset = 0,0
spriority = 0


[State 198, 2]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 191, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 199,0
channel = 0

[State 191, PlaySnd2]
type = PlaySnd
trigger1 =  AnimElem = 24
value = 0,0
channel = 0

[State 191, 0]
type = Explod
trigger1 = animelem = 1
anim = 199
pos = -106,0
sprpriority = 4
shadow = -1,0,0

[State 190, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 193

;---------------------------------------------------------------------------------------------
;Intro especial2
[Statedef 1198]
type = S
movetype = I
physics = N
ctrl = 0
anim = 1195
velset = 0,0
spriority = 0


[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 191, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 4
value = 33,0
channel = 0

[State 191, PlaySnd2]
type = PlaySnd
trigger1 =  AnimElem = 24
value = 0,0
channel = 0



[State 190, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 193

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

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

[State 195, VarSet]
type = VarRandom
trigger1 = time =0
v = 28
range = 6,8

[State 195, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 3
value = 195,0
channel = 0

[State 195, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;--------------------------------------------------------------------
;Intro1
[Statedef 196]
type = S
movetype = I
physics = N
ctrl = 0
anim = 196
velset = 0,0
spriority = 1


[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 191, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 11
value = F5,2;24,2
channel = 0

[State 191, PlaySnd2]
type = PlaySnd
trigger1 =  AnimElem = 12
value = 33,6
channel = 0

[State 191, PlaySnd3]
type = PlaySnd
trigger1 =  AnimElem = 14
value = 8889,1
channel = 0

[State 196, 0]
type = Explod
trigger1 = animelem = 13
anim = 1197
pos = 0,0
sprpriority = 4

[State 196, 1]
type = Explod
trigger1 = animelem = 13
anim = 1196
pos = 0,0
sprpriority = 2


[State 190, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 193
;--------------------------------------------------------------------
;Intro1
[Statedef 197]
type = S
movetype = I
physics = N
ctrl = 0
anim = 197
velset = 0,0
spriority = 1


[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 191, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 2
value = 33,5
channel = 0


[State 191, PlaySnd3]
type = PlaySnd
trigger1 =  AnimElem = 6
value = 8889,1
channel = 0

[State 196, 0]
type = Explod
trigger1 = animelem = 5
anim = 1197
pos = 0,0
sprpriority = 4

[State 196, 1]
type = Explod
trigger1 = animelem = 5
anim = 1196
pos = 0,0
sprpriority = 2


[State 197, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 193
;---------------------------------------------------------------------------
;Basic Attacks
;---------------------------------------------------------------------------

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

[Statedef 200]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
anim = 200
poweradd = 15
sprpriority = 2

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

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

[State 200, HitDef]
type = HitDef
trigger1 = time=0
attr = S,NA
damage = 15,1
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 5,5
sparkno = 1;s7770
sparkxy = -10, -65
guard.sparkno = s6767
hitsound = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -3
air.type = Low
air.hittime = 15
air.velocity = -6,-5
envshake.time = 1
envshake.ampl = 1

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

;-----------------------------------------------------------------
; Standing Light Punch2

[Statedef 201]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
anim = 201
poweradd = 15
sprpriority = 2

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

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

[State 201, HitDef]
type = HitDef
trigger1 = time=0
attr = S,NA
damage = 18,2
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 6,6
sparkno = 1;s7770
sparkxy = -10, -65
guard.sparkno = s6767
hitsound = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -4
air.type = Low
air.hittime = 15
air.velocity = -6,-5
envshake.time = 1
envshake.ampl = 1

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

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

; Standing Medium Punch

[Statedef 210]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
anim = 210
poweradd = 35
sprpriority = 2

[State 210, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

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

[State 210, PlaySnd2]
type = PlaySnd
trigger1 =  AnimElem = 7
trigger2 =  AnimElem = 10
trigger3 =  AnimElem = 13
trigger4 =  AnimElem = 16
trigger5 =  AnimElem = 19
value = 500,3

[State 210, HitDef]
type = HitDef
trigger1 = hitcount < 8
trigger1 = moveguarded < 1
attr = S,NA
damage = 10,4
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 4,8
sparkno = 2;s7771
sparkxy = -10,-60
guard.sparkno = s6767
hitsound = 5,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -6
air.type = Low
air.hittime = 15
air.velocity = -6,-5
envshake.time = 1
envshake.ampl = 1

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

;---------------------------------------------------------------------------
; Close Medium Punch

[Statedef 211]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
anim = 211
poweradd = 35
sprpriority = 2

[State 211, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

[State 211, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,1

[State 211, HitDef]
type = HitDef
trigger1 = AnimElem = 5
attr = S,NA
damage = 25,1
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 13,14
sparkno = 2;s7771
sparkxy = -10,-60
guard.sparkno = s6767
hitsound = 5,1
guardsound = 6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -3
air.type = Low
air.hittime = 15
air.velocity = -6,-5
envshake.time = 1
envshake.ampl = 1

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

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

[Statedef 220]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
anim = 220
poweradd = 55
sprpriority = 2

[State 220, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

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

[State 220, PlaySnd1]
type = PlaySnd
trigger1 =  AnimElem = 6
value = 500,3

[State 220, PlaySnd2]
type = PlaySnd
trigger1 =  AnimElem = 9
value = 500,2

[State 220, HitDef]
type = HitDef
trigger1 = AnimElem = 8
attr = S,NA
damage = 35,1
animtype = High
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 13,14
sparkno = 3;s7772
sparkxy = -10, -60
guard.sparkno = s6767
hitsound = 5,4
guardsound = 6,0
ground.type = High
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -10
air.type = Low
air.hittime = 18
air.velocity = -6,-7
envshake.time = 15           
envshake.ampl = 7
envshake.freq = 160

[State 220, Pó]
type = Explod
trigger1 = AnimElem = 9
anim = 8510
ID = 8510
postype = P1
pos = 100,10
sprpriority = -1
ownpal = 1
scale = .6, .5

[State 220, Sound1]
type = PlaySnd
trigger1 = AnimElem = 12
value = 3001,2

[State 220, Shake Screen]
type = EnvShake
trigger1 = AnimElem = 9
time = 10     
ampl = 4     
freq = 180   

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

;---------------------------------------------------------------------------
; Close Heavy Punch

[Statedef 221]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
anim = 221
poweradd = 55
sprpriority = 2

[State 221, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

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

[State 221, PlaySnd2]
type = PlaySnd
trigger1 =  AnimElem = 4
value = 20,0

[State 221, HitDef]
type = HitDef
trigger1 = AnimElem = 6
attr = S,NA
damage = 35,1
animtype = High
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 5,5
sparkno = 3;s7772
sparkxy = -10, -85
guard.sparkno = s6767
hitsound = 5,4
guardsound = 6,0
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -10
air.type = Low
air.hittime = 18
air.velocity = -6,-7
envshake.time = 2
envshake.ampl = 2

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

;---------------------------------------------------------------------------------------------
;Standing light kick

[Statedef 230]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
anim = 230
poweradd = 15
sprpriority = 2

[State 230, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 2
value = 33,3


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

[State 230, HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = S,NA
damage = 15,1
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 13,14
sparkno = 0; s7770
sparkxy = -10, -25
guard.sparkno = s6767
hitsound = 5,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 10
ground.hittime = 10
ground.velocity = -3,0
air.type = Low
air.hittime = 3
air.velocity = -5,0

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

;---------------------------------------------------------------------------------------------
;Standing medium kick

[Statedef 240]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
anim = 240
poweradd = 35
sprpriority = 2

[State 240, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

[State 240, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,1

[State 240, PlaySnd2]
type = PlaySnd
trigger1 =  AnimElem = 2
value = 200,0

[State 240, HitDef]
type = HitDef
trigger1 = AnimElem = 4
attr = S,NA
damage = 35,1
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 13,14
sparkno = 1;s7771
sparkxy = -10,-48
guard.sparkno = s6767
hitsound = 5,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime = 12
ground.velocity = -5,0
air.type = Low
air.hittime = 5
air.velocity = -5,0

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

;---------------------------------------------------------------------------------------------
;Close standing medium Kick

[Statedef 241]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
anim = 241
poweradd = 35
sprpriority = 2

[State 241, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

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

[State 241, HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = S,NA
damage = 35,1
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 13,14
sparkno = 2;s7771
sparkxy = -10,-55
guard.sparkno = s6767
hitsound = 5,1
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime = 12
ground.velocity = -5,0
air.type = Low
air.hittime = 5
air.velocity = -5,0

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

;---------------------------------------------------------------------------------------------
;Standing strong Kick

[Statedef 250]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
anim = 250
poweradd = 55
sprpriority = 2

[State 250, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

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

[State 250, PlaySnd2]
type = PlaySnd
trigger1 =  AnimElem = 3
value = 20,0

[State 250, HitDef]
type = HitDef
trigger1 = Animelem = 5
attr = S,NA
damage = 55,1
animtype = High
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 8,8
sparkno = 2;s7772
sparkxy = -10, -70
guard.sparkno = s6767
hitsound = 5,4
guardsound = 6,0
ground.type = High
ground.slidetime = 13
ground.hittime = 13
ground.velocity = -8,0
air.type = Low
air.hittime = 5
air.velocity = -7,0

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

;---------------------------------------------------------------------------------------------
;Close standing strong Kick

[Statedef 251]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
anim = 251
poweradd = 55
sprpriority = 2

[State 251, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

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

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

[State 251, HitDef]
type = HitDef
trigger1 = AnimElem = 3
attr = S,NA
damage = 45,1
animtype = High
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 13,14
sparkno = 2;s7772
sparkxy = -10, -70
guard.sparkno = s6767
hitsound = 5,4
guardsound = 6,0
ground.type = High
ground.slidetime = 13
ground.hittime = 13
ground.velocity = -8,0
air.type = Low
air.hittime = 5
air.velocity = -7,0

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

;---------------------------------------------------------------------------------------------
;Crouching light punch

[Statedef 400]
type    = C
movetype= A
physics = C
juggle  = 4
ctrl = 0
anim = 400
poweradd = 15
sprpriority = 2

[State 400, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

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

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

[State 400, HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = C,NA
damage = 15,1
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 13,14
sparkno = 0;s7770
sparkxy = -10, -40
guard.sparkno = s6767
hitsound = 5,0
guardsound = 6,0
ground.type = Low
ground.slidetime = 10
ground.hittime = 10
ground.velocity = -3,0
air.type = Low
air.hittime = 3
air.velocity = -5,0

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

;---------------------------------------------------------------------------------------------
;Crouching medium punch

[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 4
ctrl = 0
anim = 410
poweradd = 35
sprpriority = 2

[State 410, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

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

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

[State 410, HitDef]
type = HitDef
trigger1 = AnimElem = 3
attr = C,NA
damage = 35,1
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 13,14
sparkno = 1;s7771
sparkxy = -10,-42
guard.sparkno = s6767
hitsound = 5,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime = 12
ground.velocity = -5,0
air.type = Low
air.hittime = 5
air.velocity = -5,0

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

;---------------------------------------------------------------------------------------------
;Crouching strong punch

[Statedef 420]
type    = C
movetype= A
physics = C
juggle  = 4
ctrl = 0
anim = 420
poweradd = 55
sprpriority = 2


[State 420, PlaySnd2]
type = PlaySnd
trigger1 =  AnimElem = 3
value = 20,2

[State 420, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

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

[State 420, HitDef]
type = HitDef
trigger1 = AnimElem = 5
attr = C,NA
damage = 45,1
animtype = up
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 14,12
sparkno = 2;s7772
sparkxy = -10, -56
guard.sparkno = s6767
hitsound = 5,4
ground.type = Low
ground.slidetime = 30
ground.hittime  = 40
ground.velocity = -10, -1
air.velocity = -10,-1
airguard.velocity = -6,0
yaccel = 0.39+(enemynear,const(movement.yaccel)/2)

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

;---------------------------------------------------------------------------------------------
;Crouching light kick

[Statedef 430]
type    = C
movetype= A
physics = C
juggle  = 4
ctrl = 0
anim = 430
poweradd = 15
sprpriority = 2

[State 430, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

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

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

[State 430, HitDef]
type = HitDef
trigger1 = AnimElem = 3
attr = C,NA
damage = 15,1
animtype = Light
hitflag = MA
guardflag = L
priority = 4, Hit
pausetime = 13,14
sparkno = 1;s7770
sparkxy = -10, -20
guard.sparkno = s6767
hitsound = 5,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 10
ground.hittime = 10
ground.velocity = -3,0
air.type = Low
air.hittime = 3
air.velocity = -5,0

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

;---------------------------------------------------------------------------------------------
;Crouching medium kick

[Statedef 440]
type    = C
movetype= A
physics = C
juggle  = 4
ctrl = 0
anim = 440
poweradd = 35
sprpriority = 2

[State 440, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

[State 440, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,1

[State 440, PlaySnd2]
type = PlaySnd
trigger1 =  AnimElem = 5
value = 20,1

[State 440, HitDef]
type = HitDef
trigger1 = AnimElem = 9
attr = C,NA
damage = 35,1
animtype = Medium
hitflag = MA
guardflag = L
priority = 4, Hit
pausetime = 5,5
sparkno = 2;s7771
sparkxy = -10,-80
guard.sparkno = s6767
hitsound = 5,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime = 12
ground.velocity = -5,0
air.type = Low
air.hittime = 5
air.velocity = -5,0

[State 440, HitDef2]
type = HitDef
trigger1 = AnimElem = 10
trigger2 = AnimElem = 11
attr = C,NA
damage = 25,1
animtype = Medium
hitflag = MA
guardflag = L
priority = 4, Hit
pausetime = 5,5
sparkno = 2;s7771
sparkxy = -10,-40
guard.sparkno = s6767
hitsound = 5,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime = 12
ground.velocity = -5,0
air.type = Low
air.hittime = 5
air.velocity = -5,0

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

;---------------------------------------------------------------------------------------------
;Crouching strong kick

[Statedef 450]
type    = C
movetype= A
physics = C
juggle  = 4
ctrl = 0
anim = 450
poweradd = 55
sprpriority = 2

[State 450, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

[State 450, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
trigger2 =  AnimElem = 6
value = 8400,2

[State 450, PlaySnd2]
type = PlaySnd
trigger1 =  AnimElem = 4
value = 20,1

[State 450, HitDef]
type = HitDef
trigger1 = Animelem = 5
attr = C,NA
damage = 45,1
animtype = High
hitflag = MA
guardflag = L
priority = 4, Hit
pausetime = 13,14
sparkno = 3;s7772
sparkxy = -10, -30
guard.sparkno = s6767
hitsound = 5,4
guardsound = 6,0
ground.type = trip
ground.slidetime = 13
ground.hittime = 13
ground.velocity = -5,-2
air.type = Low
air.hittime = 5
air.velocity = -7,3
fall = 1
[State 450, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------------------------
;Jumping light punch

[Statedef 600]
type    = A
movetype= A
physics = A
juggle  = 2
ctrl = 0
anim = 600
poweradd = 15
sprpriority = 2

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

[State 600, PlaySnd2]
type = PlaySnd
trigger1 =  AnimElem = 3
value = 20,1

[State 600, HitDef]
type = HitDef
trigger1 = AnimElem = 4
attr = A,NA
damage = 15,1
animtype = Light
guardflag = HA
priority = 4, Hit
pausetime = 13,14
sparkno = 2;s7770
sparkxy = -10, -23
guard.sparkno = s6767
hitsound = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 25
ground.velocity = -6
air.fall = 0
air.velocity = -3.2, -10.5

[State 600, 3]
type = CtrlSet
trigger1 = Time = 17
value = 1

;---------------------------------------------------------------------------------------------
;Jumping medium punch cuchillo

[Statedef 610]
type    = A
movetype= A
physics = A
juggle  = 4
ctrl = 0
anim = 610 
poweradd = 35
sprpriority = 2

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

[State 610, HitDef]
type = HitDef
trigger1 = AnimElem = 6
attr = A,NA
damage = 35,1
animtype = medium
guardflag = HA
priority = 4, Hit
pausetime = 13,14
sparkno = 2;s7771
sparkxy = -5,-5
guard.sparkno = s6767
hitsound = 5,1
guardsound = 6,0
ground.type = High
ground.slidetime = 25
ground.hittime  = 20
ground.velocity = -8
air.fall = 0
air.velocity = -3.2, -7.5


;---------------------------------------------------------------------------------------------
;Jumping strong punch

[Statedef 620]
type    = A
movetype= A
physics = A
juggle  = 4
ctrl = 0
anim = 620;IfElse(Vel X = 0,620,621)
poweradd = 55
sprpriority = 2

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

[State 620, PlaySnd2]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 20,3

[State 620, HitDef]
type = HitDef
trigger1 = AnimElem = 7
attr = A,NA
damage = 45,1
animtype = High
guardflag = HA
priority = 4, Hit
pausetime = 13,14
sparkno = 3;s7772
sparkxy = -10, -20
guard.sparkno = s6767
hitsound = 5,4
guardsound = 6,0
ground.type = High
ground.slidetime = 18
ground.hittime  = 25
ground.velocity = -10
air.velocity = -12,10
air.hittime = 25
air.fall = 1

;-----------------------------------------------------------------
;Jumping light kick

[Statedef 630]
type    = A
movetype= A
physics = A
juggle  = 4
ctrl = 0
anim = 630
poweradd = 15
sprpriority = 2

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

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

[State 630, HitDef]
type = HitDef
trigger1 = AnimElem = 3
attr = A,NA
damage = 18,1
animtype = Light
guardflag = HA
priority = 4, Hit
pausetime = 13,14
sparkno = 0;s7770
sparkxy = -10, -13
guard.sparkno = s6767
hitsound = 5,3
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -6
air.fall = 0
air.velocity = -3.2, -10.5
air.hittime = 25


;---------------------------------------------------------------------------------------------
;Jumping medium kick

[Statedef 640]
type    = A
movetype= A
physics = A
juggle  = 4
ctrl = 0
anim = 640
poweradd = 35
sprpriority = 2

[State 640, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 3
value = 500,4

[State 640, HitDef]
type = HitDef
trigger1 = hitcount < 5
trigger1 = moveguarded < 1
attr = A,NA
damage = 15,1
animtype = Medium
guardflag = HA
priority = 4, Hit
pausetime = 3,4
sparkno = 2;s7771
sparkxy = -10,-10
guard.sparkno = s6767
hitsound = 5,1
guardsound = 6,0
ground.type = High
ground.slidetime = 2
ground.hittime  = 15
ground.velocity = -8
air.fall = 0
air.velocity = -3.2, -7.5
air.hittime = 25


;---------------------------------------------------------------------------------------------
;Jumping strong kick

[Statedef 650]
type    = A
movetype= A
physics = A
juggle  = 4
ctrl = 0
anim = 650
poweradd = 55
sprpriority = 2

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

[State 420, PlaySnd2]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 20,3

[State 650, HitDef]
type = HitDef
trigger1 = AnimElem = 9
attr = A,NA
damage = 45,1
animtype = High
guardflag = HA
priority = 4, Hit
pausetime = 13,14
sparkno = 3;s7772
sparkxy = -10, -13
guard.sparkno = s6767
hitsound = 5,4
guardsound = 6,0
ground.type = High
ground.slidetime = 18
ground.hittime  = 12
ground.velocity = -10
air.velocity = -12,10
air.fall = 1
air.hittime = 25
fall = 1
fall.recovertime = 40     
yaccel = 4  

;----------------------------------------------------------------------
;doblando

[Statedef 800]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 800
sprpriority = 2

; Notes: The '-' symbol in the hitflag field means that it only affects
;   players who are not in a hit state. This prevents KFM 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, 1]
type = HitDef
Trigger1 = Time = 0
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
sprpriority = 1       ;Draw in front of p2
;p1facing = ifelse (command = "holdfwd", -1, 1) ;Turn if holding forwards
p2facing = 1          ;Force p2 to face KFM
p1stateno = 810       ;On success, KFM changes to state 810
p2stateno = 820       ;If hit, p2 changes to state 820 in KFM's cns
guard.dist = 0        ;This prevents p2 from going into a guard state if close
fall = 1              ;Force p2 into falling down

[State 800, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Kung Fu Throw - Throwing the opponent
; Description: In this state, KFM throws the opponent by binding him to
;     various offsets based on his current frame of animation. For
;     example, [State 810, Bind 1] binds the opponent to an offset of
;     28 pixels in front of KFM. That puts him around where KFM's hand
;     is at. Is is important to keep the opponent bound using a
;     TargetBind controller at all times, until you let him go. This
;     is especially important if your player has a Clsn2 box that
;     allows him to get hit while throwing someone. Each time a player
;     gets hit, all his bound targets will be set to a fall state. If
;     the opponent is not bound, then he might get stuck in his thrown
;     state when his attacker is knocked out of the throw halfway.
; Notes: There is a TargetLifeAdd controller to decrease the opponent's
;     life, and a TargetState controller to change his state to a
;     falling state when KFM lets go of him.
[Statedef 810]
type    = S
movetype= A
physics = N
anim = 810
poweradd = 60

[State 810, Grab Sound]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1, 1


[State 810, Width 2-11]
type = Width
trigger1 = AnimElemTime(1) >= 0 && AnimElemTime(12) < 0
edge = 40,0


[State 810,4]
type = TargetBind
trigger1 = AnimElem = 1
pos = 31,0;+der

[State 810, Hurt 11]
type = TargetLifeAdd
trigger1 = AnimElem = 5
value = -40

[State 810, Hurt 11]
type = TargetLifeAdd
trigger1 = AnimElem = 13
value = -56


[State 810, 12]
type = PlaySnd
trigger1 = AnimElem = 3
trigger2 = AnimElem = 8
value = 24,1


[State 810,explod]
type = Explod
trigger1 = AnimElem = 5
trigger2 = AnimElem = 11
anim = F2
pos = 110, -65
postype = p1
sprpriority = -1
ownpal = 1
scale = 1.5,1.5

[State 810,explod]
type = Explod
trigger1 = AnimElem = 3
anim = 822
id = 822
pos = 0,0
postype = p1
sprpriority = 2
ownpal = 1


[state 810, envshake]
type = envshake
trigger1 = animelem = 13
time = 10
ampl = 9


[State 810, 12]
type = PlaySnd
trigger1 = animelem = 5
trigger2 = AnimElem = 11
value = 24,2


[State 810, Throw 11]
type = TargetState
trigger1 = AnimElem = 14
value = 821



[State 810, State End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1



;---------------------------------------------------------------------------
;Thrown by Kung Fu Throw
; (a custom gethit state)
; Description: This is the state that the opponent changes to after being
;     hit by KFM's throw HitDef. The important thing here is to use a
;     ChangeAnim2 controller. The difference between ChangeAnim2 and
;     ChangeAnim is that ChangeAnim2 changes the player's animation to
;     an action in the AIR file of the attacker (in this case, kfm.air),
;     whereas ChangeAnim always changes the player to an action in his
;     own AIR file. Look at Action 820 in kfm.air for some extra
;     comments.
[Statedef 820]
type    = A
movetype= H
physics = N
velset = 0,0

[State 820, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 820

;---------------------------------------------------------------------------
;Thrown by Kung Fu Throw - thrown into the air
; (a custom gethit state)
; Description: This state has the opponent flying through the air and
;     falling down onto the ground. The SelfState controller sets the
;     opponent back using to his own state file when he his the ground.
;     Controllers 821,2 and 821,3 allow the opponent to recover by
;     hitting his recovery command when he is falling.
[Statedef 821]
type    = A
movetype= H
physics = N
velset = -3.8,-7
poweradd = 40


[State 821, 1] ;Gravity
type = VelAdd
Trigger1 = 1
y = .5;mas rapido y


[State 821, 4] ;Hit ground
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5050 ;Hit ground
;----------------------------------------------------------------------
;Super Moves

;---------------------------------------------------------------------------------------------
;Special1_X

[Statedef 1000]
type    = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
poweradd = 0
anim = 1000
ctrl = 0
sprpriority = 2

[State 220, Pó]
type = Explod
trigger1 = AnimElem = 5
anim = 8510
ID = 8510
postype = P1
pos = 20,10
sprpriority = -1
ownpal = 1
scale = .4, .7

[State 220, Pó2]
type = Explod
trigger1 = AnimElem = 5
anim = 8510
ID = 8510
postype = P1
pos = 34,2
sprpriority = -1
ownpal = 1
scale = .35, .5

[State 1000, 3]
type = HitDef
trigger1 = AnimElem = 13
trigger2 = AnimElem = 14
trigger3 = AnimElem = 15
trigger4 = AnimElem = 17
attr = S, SA
animtype  = Up
damage    = 20, 4
priority  = 5
guardflag = MA
pausetime = 5,5
sparkxy = 2,-110
hitsound   = 5,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 18
ground.velocity = -1,-10.5
guard.velocity = -6
air.velocity = -1,-8.5
airguard.velocity = -4,-4.5
p2facing = 1
fall = 1
fall.recovertime = 50
;yaccel = .6

[State 1000, 4]
type = HitDef
trigger1 = AnimElem = 12
attr = S, SA
animtype  = Up
damage    = 30, 4
priority  = 5
guardflag = MA
pausetime = 2,2
sparkno = 1
sparkxy = 2,-60
hitsound   = 5,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 5
ground.hittime  = 18
ground.velocity = -1,-8.5
guard.velocity = -6
air.velocity = -1,-8.5
airguard.velocity = -4,-4.5
p2facing = 1
fall = 1
fall.recovertime = 50
;yaccel = .6

[State 220, Pó3]
type = Explod
trigger1 = AnimElem = 18
anim = 8510
ID = 8510
postype = P1
pos = 75,10
sprpriority = -1
ownpal = 1
scale = .45, .7

[State 220, Pó4]
type = Explod
trigger1 = AnimElem = 18
anim = 8510
ID = 8510
postype = P1
pos = 110,8
sprpriority = -1
ownpal = 1
scale = .42, .68

[State 1020, PlaySnd1]
type = PlaySnd
trigger1 =  AnimElem = 4
trigger2 =  AnimElem = 19
value = 1100,1

[State 1020, PlaySnd2]
type = PlaySnd
trigger1 =  AnimElem = 5
trigger2 =  AnimElem = 11
value = 1010,1

[State 1000, Fim]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------------------------
;Special1_y

[Statedef 1001]
type    = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
poweradd = 0
anim = 1001
ctrl = 0
sprpriority = 2

[State 1001, Pó]
type = Explod
trigger1 = AnimElem = 5
anim = 8510
ID = 8510
postype = P1
pos = 20,10
sprpriority = -1
ownpal = 1
scale = .4, .7

[State 1001, Pó2]
type = Explod
trigger1 = AnimElem = 5
anim = 8510
ID = 8510
postype = P1
pos = 34,2
sprpriority = -1
ownpal = 1
scale = .35, .5

[State 1001, 3]
type = HitDef
trigger1 = AnimElem = 13
trigger2 = AnimElem = 14
trigger3 = AnimElem = 15
trigger4 = AnimElem = 17
attr = S, SA
animtype  = Up
damage    = 20, 4
priority  = 5
guardflag = MA
pausetime = 5,5
sparkxy = 2,-110
hitsound   = 5,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 18
ground.velocity = -1,-10.5
guard.velocity = -6
air.velocity = -1,-8.5
airguard.velocity = -4,-4.5
p2facing = 1
fall = 1
fall.recovertime = 50
;yaccel = .6

[State 1001, 4]
type = HitDef
trigger1 = AnimElem = 12
attr = S, SA
animtype  = Up
damage    = 30, 4
priority  = 5
guardflag = MA
pausetime = 2,2
sparkno = 1
sparkxy = 2,-60
hitsound   = 5,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 5
ground.hittime  = 18
ground.velocity = -1,-8.5
guard.velocity = -6
air.velocity = -1,-8.5
airguard.velocity = -4,-4.5
p2facing = 1
fall = 1
fall.recovertime = 50
;yaccel = .6

[State 1001, Pó3]
type = Explod
trigger1 = AnimElem = 18
anim = 8510
ID = 8510
postype = P1
pos = 130,10
sprpriority = -1
ownpal = 1
scale = .45, .7

[State 1001, Pó4]
type = Explod
trigger1 = AnimElem = 18
anim = 8510
ID = 8510
postype = P1
pos = 165,8
sprpriority = -1
ownpal = 1
scale = .42, .68

[State 1001, PlaySnd1]
type = PlaySnd
trigger1 =  AnimElem = 4
trigger2 =  AnimElem = 19
value = 1100,1

[State 1001, PlaySnd2]
type = PlaySnd
trigger1 =  AnimElem = 5
trigger2 =  AnimElem = 11
value = 1010,1

[State 1001, Fim]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------------------------
;Special1_z

[Statedef 1002]
type    = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
poweradd = 0
anim = 1002
ctrl = 0
sprpriority = 2

[State 1002, Pó]
type = Explod
trigger1 = AnimElem = 5
anim = 8510
ID = 8510
postype = P1
pos = 20,10
sprpriority = -1
ownpal = 1
scale = .4, .7

[State 1002, Pó2]
type = Explod
trigger1 = AnimElem = 5
anim = 8510
ID = 8510
postype = P1
pos = 34,2
sprpriority = -1
ownpal = 1
scale = .35, .5

[State 1002, 3]
type = HitDef
trigger1 = AnimElem = 13
trigger2 = AnimElem = 14
trigger3 = AnimElem = 15
trigger4 = AnimElem = 17
attr = S, SA
animtype  = Up
damage    = 20, 4
priority  = 5
guardflag = MA
pausetime = 5,5
sparkxy = 2,-110
hitsound   = 5,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 18
ground.velocity = -1,-10.5
guard.velocity = -6
air.velocity = -1,-8.5
airguard.velocity = -4,-4.5
p2facing = 1
fall = 1
fall.recovertime = 50
;yaccel = .6

[State 1002, 4]
type = HitDef
trigger1 = AnimElem = 12
attr = S, SA
animtype  = Up
damage    = 30, 4
priority  = 5
guardflag = MA
pausetime = 2,2
sparkno = 1
sparkxy = 2,-60
hitsound   = 5,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 5
ground.hittime  = 18
ground.velocity = -1,-8.5
guard.velocity = -6
air.velocity = -1,-8.5
airguard.velocity = -4,-4.5
p2facing = 1
fall = 1
fall.recovertime = 50
;yaccel = .6

[State 1002, Pó3]
type = Explod
trigger1 = AnimElem = 18
anim = 8510
ID = 8510
postype = P1
pos = 200,10
sprpriority = -1
ownpal = 1
scale = .45, .7

[State 1001, Pó4]
type = Explod
trigger1 = AnimElem = 18
anim = 8510
ID = 8510
postype = P1
pos = 235,8
sprpriority = -1
ownpal = 1
scale = .42, .68

[State 1002, PlaySnd1]
type = PlaySnd
trigger1 =  AnimElem = 4
trigger2 =  AnimElem = 19
value = 1100,1

[State 1001, PlaySnd2]
type = PlaySnd
trigger1 =  AnimElem = 5
trigger2 =  AnimElem = 11
value = 1010,1

[State 1002, Fim]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------------------------
;Special2_c fuego

[Statedef 1010]
type    = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
poweradd = 0
anim = 1010
ctrl = 0
sprpriority = 2

[State 1020, PlaySnd1]
type = PlaySnd
trigger1 =  AnimElem = 8
value = 20,8

[State 1020, PlaySnd2]
type = PlaySnd
trigger1 =  AnimElem = 1
trigger2 =  AnimElem = 13
value = 3001,2

[State 1010]
type = HitDef
attr = S, SA
trigger1 =  AnimElem = 12
trigger2 =  AnimElem = 13
trigger3 =  AnimElem = 14
trigger4 =  AnimElem = 15
trigger5 =  AnimElem = 16
trigger6 =  AnimElem = 17
trigger7 =  AnimElem = 18
trigger8 =  AnimElem = 19
trigger9 =  AnimElem = 20
trigger10 =  AnimElem = 21
damage = 10,5
animtype = Medium
priority  = 5, Hit
guardflag = MA
hitflag = MAFD
pausetime = 4,4
sparkxy = -10,-78
hitsound   = 5,1
guardsound = S4,0
sparkno = -1
ground.type = Low
ground.slidetime = 5
ground.hittime  = 8
ground.velocity = 1,-2
air.velocity = -1,-3
air.fall = 1
fall.animtype = Hard
fall.recover = 0
palfx.time = 10
palfx.invertall = 1
palfx.color = 0
palfx.add = 192,32,0
palfx.sinadd = 0,32,0,4
fall.recover = 0

[State 1010]
type = HitDef
attr = S, SA
trigger1 = AnimElem = 22
trigger2 = AnimElem = 23
damage = 20,5
animtype = Medium
priority  = 5, Hit
guardflag = MA
hitflag = MAFD
pausetime = 4,4
sparkxy = -10,-78
hitsound   = 5,1
guardsound = S4,0
sparkno = -1
ground.type = Low
ground.slidetime = 5
ground.hittime  = 8
ground.velocity = -4,-2
air.velocity = -2,-3
air.fall = 1
fall.animtype = Hard
fall.recover = 0
palfx.time = 10
palfx.invertall = 1
palfx.color = 0
palfx.add = 192,32,0
palfx.sinadd = 0,32,0,4
p2stateno = 7601 
fall = 1

[State 1020, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 11
value = 1010,0
channel = 0

[State 1010, Fim]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------------------------
;Special1_a

[Statedef 1020]
type    = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
poweradd = 0
anim = 1020
ctrl = 0
sprpriority = 2

[State 1020, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 4
trigger2 =  AnimElem = 7
trigger3 =  AnimElem = 10
trigger4 =  AnimElem = 13
trigger5 =  AnimElem = 16
trigger6 =  AnimElem = 19
trigger7 =  AnimElem = 22
trigger8 =  AnimElem = 25
trigger9 =  AnimElem = 28
trigger10 =  AnimElem = 31
trigger11 =  AnimElem = 33
value = 500,3

[State 1020]
type = HitDef
attr = S, SA
trigger1 =  AnimElem = 4
trigger2 =  AnimElem = 7
trigger3 =  AnimElem = 11
trigger4 =  AnimElem = 15
trigger5 =  AnimElem = 16
trigger6 =  AnimElem = 19
trigger7 =  AnimElem = 23
trigger8 =  AnimElem = 24
trigger9 =  AnimElem = 27
trigger10 =  AnimElem = 28
trigger11 =  AnimElem = 31
trigger12 =  AnimElem = 35
damage = 16,5
animtype = Medium
priority  = 5, Hit
guardflag = MA
hitflag = MAFD
pausetime = 2,2
sparkxy = -10,-65
hitsound   = 5,1
guardsound = S4,0
sparkno = 2
ground.type = Low
ground.slidetime = 15
ground.hittime  = 8
ground.velocity = 8,-2
air.velocity = -2,-3
air.fall = 1
fall.animtype = Hard
fall.recover = 0
fall =1

[State 1020, Fim]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------------------------
;Special2_b
[Statedef 1100]
type    = S
movetype= A
physics = S
ctrl = 0
juggle  = 4
poweradd= 110
velset = 0,0
anim = 1100
ctrl = 0
sprpriority = 2

[State 1100, 1]
type = PlaySnd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 21
value = 3001, 2

[State 1100, 2]
type = PlaySnd
trigger1 = AnimElem = 8
value = 20, 3

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

[State 1100, 4]
type = PlaySnd
trigger1 = AnimElem = 15
value = 8000, 4

[State 1100]
type = HitDef
attr = S, SA
trigger1 =  AnimElem = 11
trigger2 =  AnimElem = 12
trigger3 =  AnimElem = 13
trigger4 =  AnimElem = 14
trigger5 =  AnimElem = 15
damage = 16,5
animtype = Medium
priority  = 5, Hit
guardflag = MA
hitflag = MAFD
pausetime = 2,2
sparkxy = -10,-65
hitsound   = 5,1
guardsound = S4,0
sparkno = 2
ground.type = Low
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -4,-2
air.velocity = -1.5,-3
air.fall = 1
air.hittime = 12 
fall.animtype = Hard
fall.recover = 0
fall =1

[State 1100, Pó]
type = Explod
trigger1 = AnimElem = 15
anim = 8510
ID = 8510
postype = P1
pos = 128,0
sprpriority = -1
ownpal = 1
scale = .75, .7

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


;----------------------------------------------------------------
;Hypers
;-------------------------------------------------------------------
;------------------------------------------------------------------
;Hyper1 auto lobo

[Statedef 3000]
type    = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
poweradd = 0
anim = 3000
ctrl = 0
sprpriority = -1

[State 3000, Hyper Portrait]
type = explod
trigger1 = time = 0
anim = 1088
postype = back
sprpriority = -3
supermovetime = -1
removetime = 90
pos = 20,0
bindtime = -1
scale = .5,.5
removeongethit = 1

[State 3000, assertspecial]
type = assertspecial
trigger1 = time = [0,240]
flag = noBG
flag2 = noFG
ignorehitpause = 1

[State 3000, SuperPause]
type = SuperPause
trigger1 = AnimElem = 11
Time = 80
pos = 9999,-9951
sound = 8889,0
poweradd = -2000
movetime = 48

[State 3000, HyperBg]
type = Explod
trigger1 = time = 2
anim = 749
pos = 0,-1
sprpriority = -4
postype = front
bindtime = -1
removetime = 220
removeongethit = 1
facing = ifelse(Facing = -1, -1, 1)
supermovetime = 99999999
pausemovetime = 99999999
shadow = 68,68,68
ownpal = 1

;[State 3000, Super B]
;type = BGPalFX
;trigger1 = 1
;color = 0
;time = 1
;ignorehitpause = 1

[State 3000, Hyper Explode]
type = Explod
trigger1 = time = 15;AnimElem = 1
anim = 4532
postype = p1
pos = 19,-80
ownpal = 1
sprpriority = 5
supermovetime = 40

[State 3000, Hyper Circle]
type = Explod
trigger1 = Time = 30
anim = 4533
postype = p1
pos = 19,-80
ownpal = 1
sprpriority = 5
supermovetime = 40

[State 3000, som]
type = PlaySnd
trigger1 = Time = 4
value = 183,0

[State 3000, som]
type = PlaySnd
trigger1 = Time = 2
value = 32,2

[State 3000, som2]
type = PlaySnd
trigger1 = Time = 2
value = 10,0
channel = 0

[State 3000, Ground Flash]
type = Explod
trigger1 = AnimElem = 40
trigger2 = AnimElem = 42
trigger3 = AnimElem = 45
trigger4 = AnimElem = 48
anim = 6666
ID = 8400
postype = P1
pos = -40,0
sprpriority = 3
ownpal = 1
scale = .8,.5
supermovetime = 0

[State 3000, Ground Flash2]
type = Explod
trigger1 = AnimElem = 41
trigger2 = AnimElem = 43
trigger3 = AnimElem = 46
trigger4 = AnimElem = 50
trigger5 = AnimElem = 52
trigger6 = AnimElem = 54
trigger7 = AnimElem = 56
trigger8 = AnimElem = 58
anim = 6666
ID = 8400
postype = P1
pos = -40,4
sprpriority = 3
ownpal = 1
scale = .8,.2
supermovetime = 0

[State 1060, 3]
type = PosAdd
trigger1 = AnimElem = 42
trigger2 = AnimElem = 43
trigger3 = AnimElem = 44
trigger4 = AnimElem = 45
trigger5 = AnimElem = 46
trigger6 = AnimElem = 50
trigger7 = AnimElem = 55
x = 45

[State 1220, Shake Screen]
type = EnvShake
trigger1 = AnimElem = 39
time = 8
ampl = 3
freq = 170

[State 1020, Blink Yellow]
type = PalFX
trigger1 = AnimElem = 36
time = 10
add = 32,16,0
sinadd = 64,32,5,3

[State 3000, Pó]
type = Explod
trigger1 = AnimElem = 80
anim = 8510
ID = 8510
postype = P1
pos = 0,0
sprpriority = -1
ownpal = 1
scale = .8, .8

[State 3000, HitDef]
type = HitDef
trigger1 = AnimElem = 37
trigger2 = AnimElem = 38
trigger3 = AnimElem = 39
trigger4 = AnimElem = 40
trigger5 = AnimElem = 41
attr = S,HA
damage = 8,1
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 13,14
sparkno = 1
sparkxy = -10, -60
guard.sparkno = s6767
hitsound = 5,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 10
ground.hittime = 10
ground.velocity = -3,0
air.type = Low
air.hittime = 3
air.velocity = -5,0
sprpriority = -1

[State 1220, 2]
type = HitDef
trigger1 = AnimElem = 42
trigger2 = AnimElem = 44
trigger3 = AnimElem = 45
trigger4 = AnimElem = 46
trigger5 = AnimElem = 47
trigger6 = AnimElem = 49
trigger7 = AnimElem = 51
trigger8 = AnimElem = 53
trigger9 = AnimElem = 55
trigger10 = AnimElem = 57
trigger11 = AnimElem = 57
trigger12 = AnimElem = 60
attr = S, HA
animtype  = Hard
damage    = 20, 9
getpower  = 0
priority  = 5
guardflag = MA
pausetime = 3,5
sparkno = 3
sparkxy = 0,-65
hitsound   = 5,4
guardsound = 6,0
ground.type = Low
ground.slidetime = 40
ground.hittime  = 30
ground.velocity = -40
guard.velocity = -9
air.velocity = -5,-5
airguard.velocity = -5,-5
envshake.time = 10           
envshake.ampl = 4
envshake.freq = 160
air.fall = 1
sprpriority = -1
fall.animtype = Hard    ;Show "hard" animtype when hit for a fall
yaccel = .4                 ;Fall faster
fall = 1

[State 3000, 4]
type = SprPriority
trigger1 = AnimElem = 80
value = 2

[State 3000, End]
type = ChangeState
trigger1 = animtime=0
trigger1 = BackEdgeBodyDist > -1
value = 0
ctrl = 1

;---------------------------------------------------------------------------------------------
;Hyper2 hasta la vista

[Statedef 3100]
type    = S
movetype= A
physics = S
velset = 0,0
poweradd = 0
anim = 3100
ctrl = 0
sprpriority = 2

[State 3000, Hyper Portrait]
type = explod
trigger1 = time = 0
anim = 1080
postype = back
sprpriority = -3
supermovetime = -1
removetime = 60
pos = 0,0
bindtime = -1
removeongethit = 1

[State 3000, assertspecial]
type = assertspecial
trigger1 = time = [0,160]
flag = noBG
flag2 = noFG
ignorehitpause = 1

[State 3100, SuperPause]
type = SuperPause
trigger1 = AnimElem = 11
Time = 30
pos = -5,-93
sound = s8889,0
poweradd = -1000
;movetime = 50

[State 3050, Pause]
type = Pause
trigger1 = AnimElem = 11
time = 90
movetime = 90

[State 3100, HyperBg]
type = Explod
trigger1 = time = 38
anim = 750
pos = 0,-1
sprpriority = -4
postype = front
bindtime = -1
removetime = 145
removeongethit = 1
facing = ifelse(Facing = -1, -1, 1)
supermovetime = 99999999
pausemovetime = 99999999
shadow = 68,68,68
ownpal = 1

[State 3100, Hyper Explode]
type = Explod
trigger1 = time = 15
anim = 4532
postype = p1
pos = 19,-80
ownpal = 1
sprpriority = 5
supermovetime = 40

[State 3100, Hyper Circle]
type = Explod
trigger1 = AnimElem = 31
anim = 3103
postype = p1
pos = 0,0
ownpal = 1
sprpriority = 5


[State 3100, Sound]
type = PlaySnd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 44
value = 3001,2

[State 3100, Sound1]
type = PlaySnd
trigger1 = AnimElem = 12
value = 3001,0

[State 3100, Ground Flash]
type = Explod
trigger1 = animelem = 31
anim = 3167
ID = 8400
postype = P1
pos = 48,-70
sprpriority = -1
ownpal = 1
supermovetime = 0
scale = .35,.8
[State 3100, Ground Flash2]
type = Explod
trigger1 = animelem = 31
anim = 3166
ID = 6667;8400
postype = P1
pos = 48,-62
sprpriority = -1
ownpal = 1
supermovetime = 0
scale = .35,.6

[State 3100, Sound2]
type = PlaySnd
trigger1 = AnimElem = 31
value = 3001,1


[State 1220, 2]
type = HitDef
trigger1 = AnimElem = 31
trigger2 = AnimElem = 32
trigger3 = AnimElem = 33
trigger4 = AnimElem = 34
trigger5 = AnimElem = 35
trigger6 = AnimElem = 36
attr = S, HA
animtype  = Hard
damage    = 180, 30
getpower  = 0
priority  = 5
guardflag = MA
pausetime = 3,5
sparkno = s3102
sparkxy = 5,-70
hitsound = s3002, 0
guardsound = 6,0
palfx.time = 35
palfx.add = 150,30,150
ground.type = Low
ground.slidetime = 2
ground.hittime  = 15
ground.velocity = -1
air.velocity = -2.2,-3.2
envshake.time = 25           
envshake.ampl = 7
envshake.freq = 176   
fall = 1
P2facing = 1
p2stateno = 7600

[State 3100, effect1]
type = EnvColor
trigger1 = MoveHit = 1
value = 255,255,210
ignorehitpause = 1
under = 1

[State 3100, End]
type = ChangeState
trigger1 = statetype != A
trigger1 = animtime=0
;trigger1 = BackEdgeBodyDist > -1
value = 0
ctrl = 1

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

;Hyper3 shanta

[Statedef 3200]
type    = S
movetype= A
physics = S
velset = 0,0
poweradd = 0
anim = 3200
ctrl = 0
sprpriority = -1

[State 3000, Hyper ]
type = explod
trigger1 = time = 0
anim = 3201
sprpriority = -1
removetime = 22
pos = 0,0

[State 3000, Hyper 2]
type = explod
trigger1 = Animelem = 118
anim = 3202
sprpriority = -1
removetime = 42
pos = 0,0


[State 3000, assertspecial]
type = assertspecial
trigger1 = time = [0,270]
flag = noBG
flag2 = noFG
flag3 = nobardisplay
ignorehitpause = 1


[State 3100, SuperPause]
type = SuperPause
trigger1 = AnimElem = 1
Time = 30
pos = -2,-110
sound = s8889,0
poweradd = -3000



[State 3100, Hyper Explode]
type = Explod
trigger1 = time = 15
anim = 4532
postype = p1
pos = 19,-80
ownpal = 1
sprpriority = 5
supermovetime = 40


[State 3100, Sound]
type = PlaySnd
trigger1 = AnimElem = 6
value = 180,1

[State 3100, Sound1]
type = PlaySnd
trigger1 = AnimElem = 7
value = 24,0

[State 3100, Gun Flash]
type = Explod
trigger1 = animelem = 8
trigger2 = AnimElem = 12
trigger3 = AnimElem = 36
trigger4 = AnimElem = 40
trigger5 = AnimElem = 64
trigger6 = AnimElem = 68
trigger7 = AnimElem = 92
trigger8 = AnimElem = 96
anim = 3203
ID = 3203
postype = P1
pos = 54,-93
sprpriority = 2
ownpal = 1
supermovetime = 0

[State 3100, Gun Flash2]
type = Explod
trigger1 = animelem = 16
trigger2 = AnimElem = 44
trigger3 = AnimElem = 72
trigger4 = AnimElem = 100
anim = 3203
ID = 3203
postype = P1
pos = 54,-60
sprpriority = 2
ownpal = 1
supermovetime = 0

[State 3100, Gun Flash3]
type = Explod
trigger1 = animelem = 20
trigger2 = AnimElem = 24
trigger3 = AnimElem = 48
trigger4 = AnimElem = 52
trigger5 = AnimElem = 76
trigger6 = AnimElem = 80
trigger7 = AnimElem = 104
trigger8 = AnimElem = 108
anim = 3203
ID = 3203
postype = P1
pos = 54,-80
sprpriority = 2
ownpal = 1
supermovetime = 0

[State 3100, Gun Flash4]
type = Explod
trigger1 = animelem = 28
trigger2 = AnimElem = 32
trigger3 = AnimElem = 56
trigger4 = AnimElem = 60
trigger5 = AnimElem = 84
trigger6 = AnimElem = 88
trigger7 = AnimElem = 112
trigger8 = AnimElem = 116
anim = 3203
ID = 3203
postype = P1
pos = 54,-120
sprpriority = 2
ownpal = 1
supermovetime = 0


[State 3100, Sound2]
type = PlaySnd
trigger1 = AnimElem = 31
value = 3001,1

[State 3100, Flash]
type = Explod
trigger1 = animelem = 8
anim = 3204
ID = 3204
postype = P1
pos = 0,0
sprpriority = 5
ownpal = 1
supermovetime = 0

[State 1220, 2]
type = HitDef
trigger1 = AnimElem = 8
trigger2 = AnimElem = 12
trigger3 = AnimElem = 16
trigger4 = AnimElem = 20
trigger5 = AnimElem = 24
trigger6 = AnimElem = 28
trigger7 = AnimElem = 32
trigger8 = AnimElem = 36
trigger9 = AnimElem = 40
trigger10 = AnimElem = 44
trigger11 = AnimElem = 48
trigger12 = AnimElem = 52
trigger13 = AnimElem = 56
trigger14 = AnimElem = 60
trigger15 = AnimElem = 64
trigger16 = AnimElem = 68
trigger17 = AnimElem = 72
trigger18 = AnimElem = 76
trigger19 = AnimElem = 80
trigger20 = AnimElem = 84
trigger21 = AnimElem = 88
trigger22 = AnimElem = 92
trigger23 = AnimElem = 96
trigger24 = AnimElem = 100
trigger25 = AnimElem = 104
attr = S, HA
animtype  = Hard
damage    = 10, 4
getpower  = 0
priority  = 5
guardflag = MA
pausetime = 1,2
sparkno = 2
sparkxy = 10,-60
hitsound = s8600, 0
guardsound = 6,0
sprpriority = -1
palfx.time = 35
palfx.add = 150,130,150
ground.type = Low
ground.slidetime = 2
ground.hittime  = 15
ground.velocity = -1
air.velocity = -2.2,-3.2 
P2facing = 1
[State 1220, 3]
type = HitDef
trigger1 = AnimElem = 108
trigger2 = AnimElem = 112
trigger3 = AnimElem = 116
attr = S, HA
animtype  = Hard
damage    = 12, 6
getpower  = 0
priority  = 5
guardflag = MA
pausetime = 1,2
sparkno = 2
sparkxy = 5,-60
hitsound = s8600, 0
guardsound = 6,0
sprpriority = -1
palfx.time = 35
palfx.add = 150,130,150
ground.type = Low
ground.slidetime = 2
ground.hittime  = 15
ground.velocity = -1
air.velocity = -2.2,-3.2 
fall = 1
P2facing = 1

[State 3000, Hyper 3]
type = explod
trigger1 = Animelem = 5
anim = 3205
sprpriority = 2
pos = 0,50
bindtime = -1
removeongethit = 1

[State 3100, effect1]
type = EnvColor
trigger1 = MoveHit = 1
value = 255,255,210
ignorehitpause = 1
under = 1

[State 3100, End]
type = ChangeState
trigger1 = animtime=0
value = 0
ctrl = 1


;---------------------------------------------------------------------------------------------
;Hyper4 bender el volteado

[Statedef 3300]
type    = S
movetype= A
physics = N
juggle  = 1
velset = 0,0
poweradd = 0
anim = 3300
ctrl = 0
sprpriority = -1

[State 3300, Hyper Portrait]
type = explod
trigger1 = time = 0
anim = 1082
postype = back
sprpriority = -3
supermovetime = -1
removetime = 60
pos = 0,0
bindtime = -1
removeongethit = 1


[State 3300, assertspecial]
type = assertspecial
trigger1 = time = [0,40]
flag = noBG
flag2 = noFG
flag3 = unguardable
ignorehitpause = 1

[State 3300, SuperPause]
type = SuperPause
trigger1 = AnimElem = 1
Time = 16
pos = -5,-95
sound = s8889,0
poweradd = -1000
;movetime = 40

[State 3300, HyperBg]
type = Explod
trigger1 = AnimElem = 1
anim = 751
pos = 0,-1
sprpriority = -4
postype = front
bindtime = -1
removetime = 235
removeongethit = 1
facing = ifelse(Facing = -1, -1, 1)
supermovetime = 99999999
pausemovetime = 99999999
shadow = 68,68,68
scale = .82,1
ownpal = 1
[State 3300, HyperBg2]
type = Explod
trigger1 = AnimElem = 1
anim = 752
pos = 1,0
sprpriority = -3
postype = front
bindtime = -1
removetime = 235
removeongethit = 1
facing = ifelse(Facing = -1, -1, 1)
supermovetime = 99999999
pausemovetime = 99999999
shadow = 68,68,68
scale = .82,1
ownpal = 1

[State 3300, Hyper Explode]
type = Explod
trigger1 = time = 15;AnimElem = 1
anim = 4532
postype = p1
pos = 19,-80
ownpal = 1
sprpriority = 5
supermovetime = 40

[State 3300, Hyper Circle]
type = Explod
trigger1 = Time = 30
anim = 4533
postype = p1
pos = 19,-80
ownpal = 1
sprpriority = 5
supermovetime = 40

[State 3300, som1]
type = PlaySnd
trigger1 = AnimElem = 2
value = 32,1
channel = 0

[State 3300, som2]
type = PlaySnd
trigger1 = AnimElem = 105
value = 32,0
channel = 0

[State 3300, som3]
type = PlaySnd
trigger1 = AnimElem = 128
value = 32,3
channel = 0

[State 3300, Ground Flash]
type = Explod
trigger1 = AnimElem = 11
anim = 6666
ID = 8400
postype = P1
pos = -10,0
sprpriority = 3
ownpal = 1
scale = .8,.8
supermovetime = 0

[State 3300, Ground Flash2]
type = Explod
trigger1 = AnimElem = 21
trigger2 = AnimElem = 33
trigger3 = AnimElem = 46
trigger4 = AnimElem = 50
trigger5 = AnimElem = 62
trigger6 = AnimElem = 74
trigger7 = AnimElem = 86
trigger8 = AnimElem = 92
anim = 6666
ID = 8400
postype = P1
pos = -10,2
sprpriority = 3
ownpal = 1
scale = .4,.3
supermovetime = 0

[State 1060, 3]
type = PosAdd
trigger1 = AnimElem = 10
trigger2 = AnimElem = 18
trigger3 = AnimElem = 24
trigger4 = AnimElem = 30
trigger5 = AnimElem = 36
trigger6 = AnimElem = 42
trigger7 = AnimElem = 48
x = 25

[State 1060, 32]
type = PosAdd
trigger1 = AnimElem = 52
trigger2 = AnimElem = 58
trigger3 = AnimElem = 64
trigger4 = AnimElem = 70
trigger5 = AnimElem = 76
trigger6 = AnimElem = 82
trigger7 = AnimElem = 88
x = 16

[State 1060, 33]
type = PosAdd
trigger1 = AnimElem = 90
trigger2 = AnimElem = 91
trigger3 = AnimElem = 92
trigger4 = AnimElem = 93
trigger5 = AnimElem = 94
trigger6 = AnimElem = 95
trigger7 = AnimElem = 96
trigger8 = AnimElem = 97
trigger9 = AnimElem = 98
trigger10 = AnimElem = 99
trigger11 = AnimElem = 100
trigger12 = AnimElem = 102
x = -10

[State 1220, Shake Screen]
type = EnvShake
trigger1 = AnimElem = 9
time = 8
ampl = 3
freq = 170

[State 3000, Pó]
type = Explod
trigger1 = AnimElem = 103
anim = 8510
ID = 8510
postype = P1
pos = 0,0
sprpriority = -1
ownpal = 1
scale = .8, .8

[State 3000, HitDef]
type = HitDef
attr = S,HA
trigger1 = AnimElem = 7
trigger2 = AnimElem = 10
trigger3 = AnimElem = 14
trigger4 = AnimElem = 17
trigger5 = AnimElem = 21
trigger6 = AnimElem = 24
trigger7 = AnimElem = 28
trigger8 = AnimElem = 31
trigger9 = AnimElem = 35
trigger10 = AnimElem = 38
trigger11 = AnimElem = 42
trigger12 = AnimElem = 45
trigger13 = AnimElem = 49
trigger14 = AnimElem = 52
trigger15 = AnimElem = 56
trigger16 = AnimElem = 59
trigger17 = AnimElem = 63
trigger18 = AnimElem = 66
trigger19 = AnimElem = 70
trigger20 = AnimElem = 73
trigger21 = AnimElem = 77
trigger22 = AnimElem = 80
trigger23 = AnimElem = 84
trigger24 = AnimElem = 87
damage = 8,2
animtype = Hard
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 3,2
sparkno = 2
sparkxy = -10, -60
guard.sparkno = s6767
hitsound = 5,3
guardsound = 6,0
ground.type = High
ground.slidetime = 4
ground.hittime = 14
ground.velocity = 1,0
air.type = High
air.hittime = 3
air.velocity = -5,0 
;fall = 1

[State 1220, 2]
type = HitDef
trigger1 = AnimElem = 90
trigger2 = AnimElem = 91
trigger3 = AnimElem = 92
trigger4 = AnimElem = 93
trigger5 = AnimElem = 94
trigger6 = AnimElem = 95
trigger7 = AnimElem = 96
trigger8 = AnimElem = 97
trigger9 = AnimElem = 98
trigger10 = AnimElem = 99
trigger11 = AnimElem = 100
trigger12 = AnimElem = 102
attr = S, HA
animtype  = Hard
damage    = 12, 3
getpower  = 0
priority  = 5
guardflag = MA
hitflag = MAFD
pausetime = 4,5
sparkno = 3
sparkxy = 0,-65
hitsound   = 5,4
guardsound = 6,0
ground.type = Low
ground.slidetime = 40
ground.hittime  = 30
ground.velocity = -40
guard.velocity = -9
air.velocity = -5,-5
airguard.velocity = -5,-5
envshake.time = 10           
envshake.ampl = 7
envshake.freq = 176
air.fall = 1
fall.animtype = Hard    
fall = 1

[State 3000, End]
type = ChangeState
trigger1 = animtime=0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Choque electrico
[Statedef 7600]
type = A
physics = N
movetype = H
velset = 0,0
ctrl = 0
anim = 5030
juggle = 0

[State 7600, Shock]
type = ChangeAnim
trigger1 = AnimExist(7696)
trigger1 = Anim != 7696
value = 7696

[State 7600, Fau-Shock]
type = Palfx
trigger1 = !AnimExist(7696) && TimeMod = 3, 1
time = 2
mul = 199,198,226

[State 7600, Fau-Shock]
type = Palfx
trigger1 = !AnimExist(7696) && TimeMod = 4, 2
time = 3
mul = 50,26,50

[State 7600, No hit]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 7600, Fall Back]
type = velset
trigger1 = Time = 40
x = -4.5
y = -6.4

[State 7600, Fall Back]
type = gravity
trigger1 = Time >= 40

[State 7600, Change]
type = Selfstate
trigger1 = Pos Y > 0
value = 5100

;---------------------------------------------------------------------------
; quemada
[Statedef 7601]
type = A
physics = N
movetype = H
velset = 0,0
ctrl = 0
anim = 7697
juggle = 0

[State 7601, burn]
type = ChangeAnim
trigger1 = AnimExist(7697)
trigger1 = Anim != 7697
value = 7697

[State 7601, Fau-burn]
type = Palfx
trigger1 = !AnimExist(7697) && TimeMod = 3, 1
time = 2
mul = 199,198,226

[State 7601, Fau-burned]
type = Palfx
trigger1 = !AnimExist(7697) && TimeMod = 4, 2
time = 3
mul = -50,-26,-50

[State 7601, No hit]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 7601, Fall Back]
type = velset
trigger1 = Time = 30
x = -4.5
y = -6.4

[State 7601, Fall Back]
type = gravity
trigger1 = Time >= 30

[State 7601, Change]
type = Selfstate
trigger1 = Pos Y > 0
value = 5100
;---------------------------------------------------------------------------------------------
;Beginning of the super jump
[Statedef 7000]
type = S
physics = S
anim = 40
ctrl = 0
sprpriority = 1

[State 7000, VarSet]
type = VarSet
trigger1 = Time = 0
v = 11
value = 0

[State 7000, VarSet]
type = VarSet
trigger1 = command = "holdfwd"
v = 11
value = 1

[State 7000, VarSet]
type = VarSet
trigger1 = command = "holdback"
v = 11
value = -1

[State 7000, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 7001
ctrl = 1



;---------------------------------------------------------------------------------------------
;Super Jump

[Statedef 7001]
type = A
physics = A
ctrl = 1
anim = 41
velset = 0,-16.3

[State 7001, VelAdd]
type = VelAdd
triggerall = Vel X >= -2
trigger1 = command = "holdback"
trigger1 = Anim != 43
x = -0.1

[State 7001, VelAdd]
type = VelAdd
triggerall = Vel X <= 2.5
trigger1 = command = "holdfwd"
trigger1 = Anim != 42
x = 0.25

[State 7001, VelSet]
type = VelSet
trigger1 = Anim = 42
trigger1 = Time = [0,5]
x = 4

[State 7001, VelSet]
type = VelSet
trigger1 = Anim = 43
trigger1 = Time = [0,5]
x = -3.5

[State 7001, ChangeAnim]
type = ChangeAnim
trigger1 = Var(11) = 0
trigger1 = Time = [0,4]
value = 48

[State 7001, ChangeAnim]
type = ChangeAnim
trigger1 = Var(11) = 1
trigger1 = Time = [0,4]
value = 42

[State 7001, ChangeAnim]
type = ChangeAnim
trigger1 = Var(11) = -1
trigger1 = Time = [0,4]
value = 43

[State 7001, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = 9999,5

[State 7001, Explod]
type = Explod
trigger1 = Time = 0
ID = 474
anim = 6669
postype = p1
pos = 12, 60
bindtime = 1
removetime = -2
ownpal = 1
sprpriority = 2
scale = 1.20 - (time * 0.15), 1.54 - (time * 0.15) 

[State 7001, explod]
type = Explod
trigger1 = Time = 0
ID = 474
anim = 6699
postype = p1
pos = 5, 60
bindtime = 1
removetime = -2
ownpal = 1
sprpriority = 2
scale = 1.20 - (time * 0.15), 1.54 - (time * 0.15) 

[State 7001, explod]
type = Explod
trigger1 = Time = 0
ID = 474
anim = 9006
postype = p1
pos = 0, 20
bindtime = 1
removetime = -2
ownpal = 1
sprpriority = 2
scale = 2, 2
 
[State 7001, Variavelzinha muito útil]
type = VarSet
trigger1 = Time = 0
v = 12
value = 1

;---------------------------------------------------------------------------------------------
;Super Jump

[Statedef 7002]
type    = A
physics = A
ctrl = 1

[State 7005, Vel]
type = VelAdd
triggerall = Vel X >= -2
trigger1 = command = "holdback"
trigger1 = Anim != 43
x = -0.1

[State 7005, Vel]
type = VelAdd
triggerall = Vel X <= 2.5
trigger1 = command = "holdfwd"
trigger1 = Anim != 42
x = 0.25


;-----------------------------------------------------
[Statedef -3]

[State -3, Landing Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 52 ;Jump land
trigger2 = stateno = 106 ;Run-back land
value = 8100, 0

[State 8510, Explode]
type = Explod
trigger1 = Stateno = 52 && time = 1
trigger2 = Stateno = 240 && animelem = 8
trigger3 = Stateno = 1102 && time = 1
trigger4 = Stateno = 1112 && time = 1
trigger5 = Stateno = 1122 && time = 1
trigger6 = Stateno = 106 && time = 1
trigger7 = Stateno = 352 && AnimElemTime(2) = 1
anim = 8510
ID = 8510
postype = P1
pos = 0,4
sprpriority = -1
ownpal = 1
scale = 1.2, 1.2

[State -3, 2]
type = PlaySnd
triggerall = Time = 1
triggerall = Life
triggerall = random % 10 > 5
trigger1 = stateno = 5000 || stateno = 5020
trigger1 = anim != 5000 && anim != 5010
trigger2 = stateno = 5010
trigger2 = anim != 5020
value = 11,1
channel = 0
ignorehitpause = 1
volume = 255

[State -3, 2]
type = PlaySnd
triggerall = Time = 1
triggerall = Life
triggerall = random % 10 > 5
trigger1 = stateno = 5000 || stateno = 5020
trigger1 = anim != 5000 && anim != 5010
trigger2 = stateno = 5010
trigger2 = anim != 5020
value = 11,2
channel = 0
ignorehitpause = 1
volume = 255

[State -3, 3]
type = PlaySnd
trigger1 = Time = 3
trigger1 = anim = 9108107
value = 33, 4


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

;--------------------------------------------------------
; States that are always executed (use statedef -2)
;---------------------------------------------------------------------------
[Statedef -2]

; Misc SCtrls Section ==================================================
[State -2, Lie Down Snd]
type = PlaySnd
trigger1 = Time = 1
trigger1 = anim = 5300
value = 32,9
channel = 0

[State -2, quemado]
type = PlaySnd
trigger1 = Time = 1
trigger1 = anim = 9108120
value = 32,4

[State -2, quemado2]
type = PlaySnd
trigger1 = Time = 1
trigger1 = anim = 7697
value = 32,7

[State -2, electrocutado]
type = PlaySnd
trigger1 = Time = 1
trigger1 = anim = 7696
value = 32,8

[State -2, frio]
type = PlaySnd
trigger1 = Time = 1
trigger1 = anim = 7990
value = 32,9

[State -2, aplastado]
type = PlaySnd
trigger1 = Time = 1
trigger1 = anim = 7689
value = 32,7

[State -2, humo]
type = PlaySnd
trigger1 = Time = 2
trigger1 = anim = 7100
value = 8700,0

[State -2, partido]
type = PlaySnd
trigger1 = Time = 1
trigger1 = anim = 9108108
value = 32,7

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


