;Hitsparks = [0,3]
;Wallhit = F70
;guard.sparkno = 40
;launch = F4444 (C,HK)
;hyper background = F750
;hyper ground flash = F6666
;hyper spark = F100
;recovery roll =  checked
;normal throw = checked (F, HP)
;Dash FX = F2222
;Super Jump = F9995
;5300,5500,7696

[Data]
life = 1000			;Amount of life to start with
attack = 100		;attack power (more is stronger)
defence = 100		;defensive power (more is stronger)
fall.defence_up = 50	;Percentage to increase defense everytime player is knocked down
liedown.time = 15		;Time which player lies down for, before getting up
airjuggle = 15		;Number of points for juggling
sparkno = 1			;Default hit spark number for HitDefs
guard.sparkno = 40	;Default guard spark number
KO.echo = 0			;1 to enable echo on KO
volume = 255			;Volume offset (negative for softer)
IntPersistIndex = 20	;Variables with this index and above will not have their values
FloatPersistIndex = 40  ;reset to 0 between rounds or matches. There are 60 int variables,

[Size]
xscale = 1
yscale = 1
ground.back = 20
ground.front = 20
air.back = 18
air.front = 22
z.width = 3
height = 60
attack.width = 4,4
attack.dist = 160
proj.attack.dist = 90
proj.doscale = 0
head.pos = 10, -65
mid.pos = 10, -40
draw.offset=0,0 		;Player drawing offset in pixels (x, y)

[Velocity]
walk.fwd = 3.6
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		;Number of air jumps allowed (opt)
airjump.height = 35	;Minimum distance from ground before you can air jump (opt)
yaccel = .49		;Vertical acceleration
stand.friction = .80	;Friction coefficient when standing
crouch.friction = .80	;Friction coefficient when crouching

;---------------------------------------------------------------------------
; Format:
; [Statedef STATENO]
; type = ?      S/C/A/L  stand/crouch/air/liedown
; movetype = ?  I/A/H    idle/attack/gethit
; physics = ?   S/C/A/N  stand/crouch/air/none
; juggle = ?             air juggle points move requires
;
; [State STATENO, ?]     ? - any number you choose
; type = ?
; ...

;---------------------------------------------------------------------------
; Lose by Time Over
; CNS difficulty: basic
[Statedef 170]
type = S
ctrl = 0
anim = 170
velset = 0,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = S3,6
volume = 0
channel = 5

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

;---------------------------------------------------------------------------
; Win state decider
[Statedef 180]
type = S

[state 180,1]
type = varrandom
trigger1 = time = 0
v = 2
range = 1,6

[State 180,8]
type = ChangeState
trigger1 = var(2) = 1
value = 181

[State 180,9]
type = ChangeState
trigger1 = var(2) = 2
value = 182

[State 180,10]
type = ChangeState
trigger1 = var(2) = 3
value = 181

[State 180,11]
type = ChangeState
trigger1 = var(2) = 4
value = 182

[State 180,12]
type = ChangeState
trigger1 = var(2) = 5
value = 181

[State 180,13]
type = ChangeState
trigger1 = var(2) = 6
value = 182
;---------------------------------------------------------------------------
; Win pose 1
[Statedef 181]
type = S
ctrl = 0
anim = 180
velset = 0,0

[State 181, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = 24,11

[State 181, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;---------------------------------------------------------------------------
; Win pose 2
[Statedef 182]
type = S
ctrl = 0
anim = 181
velset = 0,0

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

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

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

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

;---------------------------------------------------------------------------
Introduction Select
[Statedef 191]
type = S
ctrl = 0
velset = 0,0

[State 190, Life is Empty]
type = LifeSet
trigger1 = TeamSide = 2
value = 1

[state 191,1]
type = varrandom
trigger1 = time = 0
v = 2
range = 1,6

[State 191,8]
type = ChangeState
trigger1 = TeamSide = 1
value = 194

[State 191,9]
type = ChangeState
trigger1 = TeamSide = 2
value = 192

;----------------------------------------------------------
; Intro1
[Statedef 192]
type = S
ctrl = 0
anim = 193
velset = 0,0,0

[State 191, Ready]
type = null;Explod
trigger1 = time = 15
anim =199
ID = 199
pos = 0,0
postype = left  ;p2,front,back,left,right
bindtime = 1
removetime = -2
scale = 1,1
sprpriority = 10
ownpal = 1
removeongethit = 0


[State 192, Explod 1]
type = Explod
Trigger1 = Time = 0
anim = 192
id = 192
removetime = 64
ontop = 0
pos = 0,0
vel = 0,0
bindtime = -1
postype = p1

[State 192, Explod 2]
type = Explod
Trigger1 = Time = 0
anim = 194
id = 194
removetime = 250
ontop = 0
pos = 0,0
vel = 0,0
bindtime = -1
postype = p1

[State 192, 1]
type = PlaySnd
trigger1 = Time = 0
value = 5,3

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 100
value = 24,9
volume = 0
channel = 0

[State 192, 0]
type = AssertSpecial
trigger1 = Time = [0,250]
flag = Intro

[State 192,11]
type = ChangeState
trigger1 = AnimTime = 0
value = 199
ctrl = 0
;--------------------------
;Intro2
[Statedef 194]
type = S
physics = N
ctrl = 0
anim = 190

[State 0, Explod]
type = Explod
trigger1 = anim = 191
trigger1 = numexplod (2201) = 0
anim =      2201
ID =  2201
pos = 10,-20
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -1
supermove
pausemove
scale = 1,1
sprpriority = 0
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 0
persistent = 0

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = anim = 191
trigger1 = animelem >=2
id = 2201

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 34
value = S199,0
channel = -1

[State 191, Explod]
type = Explod
trigger1 = time = 0
anim =2200
ID = 2200
pos = 0,675
postype = p1  ;p2,front,back,left,right
bindtime = 1
removetime = -2
scale = 1,.7
sprpriority = 5
ontop = 1
ownpal = 1
removeongethit = 0

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

[State 191, VelSet]
type = VelSet
trigger1 = anim = 190
trigger1 = time = 10
x = 0
y = 15

[State 191, VelSet]
type = VelSet
trigger1 = Pos Y >= 0
y = 0

[State 191, PosSet]
type = PosSet
trigger1 = time = 0
y = -600

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Anim = 190
trigger1 = Pos Y >= 0
trigger1 = Vel Y >= 0
value = 191

[State 191, PalFXWiz]
type = PalFX
triggerall = Anim = 191
trigger1 = AnimElemTime(1) = 0
time = 20
add = 100,100,180
mul = 256,256,256
sinadd = -80,-80,-80,20
invertall = 0
color = 0

[State 191, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = Intro
ignorehitpause = 1

[State 191, AssertSpecial]
type = AssertSpecial
trigger1 = anim=190
flag = globalnoshadow
ignorehitpause = 1


[State 192,11]
type = ChangeState
trigger1 = AnimTime = 0 && Anim = 191
value = 199
ctrl = 0

;---------------------------------------------------------------------------
; Taunt
[Statedef 195]
type = S
ctrl = 0
anim = 195
velset = 0,0
movetype = I
physics = S
juggle = 1
sprpriority = 2

[State 0, PlaySnd]
type = null;PlaySnd
trigger1 = time = 1
value = S50,1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = 24,3
volume = 0
channel = 0

[State 0, PowerAdd]
type = PowerAdd
trigger1 = time = 0
value = 100

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

;-----------------------------------------------
; NEW Move around before match
[Statedef 199]
type = S
physics =S
sprpriority = 0
Anim = 0

[State 190, Lifebar Sound]
type = PlaySnd
value = S11,3
trigger1 = TeamSide = 2
trigger1 = time = 0
channel = 5

[State -2, Stop Lifebar sound]
type = StopSnd
trigger1 = time = 110
channel = 5

[State 190, LifeBar]
type = LifeAdd
trigger1 = TeamSide = 2
trigger1 = Time < 260
value = 10

[State 0, NotHitBy]
type = NotHitBy
trigger1 = time = 0
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 1

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

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

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


;---------------------------------------------------------------------------
; Standing Light Punch
[Statedef 200]
type    = S				;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A				;Move-type: A-attack, I-idle, H-gethit
physics = S				;Physics: S-stand, C-crouch, A-air
juggle  = 4				;Number of air juggle points move takes
;velset = 0,0			;Set velocity (x,y) (Def: no change)
ctrl = 0				;Set ctrl (Def: no change)
anim = 200				;Change animation (Def: no change)
poweradd =15			;Power to add (Def: 0)
sprpriority = 2			;Set layering priority to 2 (in front)

[State 0, VelAdd]
type = Velset
triggerall = prevstateno != 100
trigger1 = time = 0
x = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S0,4
volume = 0
channel = -1

[State 0, PlaySnd]
type = null;PlaySnd
trigger1 = time = 1
value = 24,0
volume = 0
channel = 0

[State 200, hit]
type=hitdef
trigger1=!time
attr=S,NA
damage=15,1
animtype=Light
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=6,6
sparkno=0
;guard.sparkno=s8105
sparkxy = -10, -45		;X-offset for the "hit spark" rel. to p2,
hitsound = s1,5			;Sound to play on hit
guardsound = s2,0
ground.type=High
ground.slidetime=10
ground.hittime=10
ground.velocity=-2
ground.cornerpush.veloff=-4
air.cornerpush.veloff=-4
air.type=Low
air.hittime=8
air.velocity=-5,-7
;yaccel=.5
persistent=0
envshake.time = 1
envshake.ampl = 1

[State 200, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Standing Medium Punch
[Statedef 210]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 35
ctrl = 0
;velset = 0,0
anim = 210

[State 0, VelAdd]
type = Velset
triggerall = prevstateno != 100
trigger1 = time = 0
x = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S0,1
volume = 0
channel = -1


[State 0, PlaySnd]
type = null;PlaySnd
trigger1 = time = 1
value = 24,1
volume = 0
channel = 0

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = anim = 210 && AnimElemTime(6) < 0
trigger1 = movecontact = 1
value = anim
elem = (animelemno(0))+1
ignorehitpause = 1

[State 210, hit]
type=hitdef
trigger1=!time
attr=S,NA
damage=35,1
animtype=Medium
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=8,8
sparkno=0
;guard.sparkno=S8105
sparkxy=-15,-50
hitsound=s1,4
guardsound=s2,0
ground.type=High
ground.slidetime=12
ground.hittime=12
ground.velocity=-3
air.type=Low
air.hittime=12
air.velocity=-5,-7
ground.cornerpush.veloff=-6
air.cornerpush.veloff=-6
;yaccel=.5
persistent=0
envshake.time = 2
envshake.ampl = 2

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

;---------------------------------------------------------------------------
; Standing Strong Punch
;Launcher
[Statedef 220]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 55
ctrl = 0
;velset = 0,0
anim = 220

[State 0, VelAdd]
type = Velset
triggerall = prevstateno != 100
trigger1 = time = 0
x = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S0,5
volume = 0
channel = -1

[State 0, PlaySnd]
type = null;PlaySnd
trigger1 = time = 1
value = 24,2
volume = 0
channel = 0

[State 0, VelSet]
type = VelSet
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(4) < 0
x = 1

[State 220, hit]
type=hitdef
trigger1=!time
attr=S,NA
damage= 45,1
animtype=Hard
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=13,14
sparkno=0
;guard.sparkno=S8105
sparkxy=-15,-55
hitsound=s1,3
guardsound=s2,0
ground.type=High
ground.slidetime=16
ground.hittime=16
ground.velocity = 0,-11
air.type=Low
air.hittime=30
air.velocity=0,-11
ground.cornerpush.veloff=-2
air.cornerpush.veloff=-2
fall.recover = 0

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

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

;[State 0, TargetState]
;type = TargetState
;triggerall = anim = 220
;trigger1 = movehit
;value = 5051
;persistent = 0
;ignorehitpause = 1

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

;---------------------------------------------------------------------------
; Standing Light Kick
[Statedef 230]
type    = S
movetype= A
physics = S
juggle  = 1
poweradd= 15
ctrl = 0
;velset = 0,0
anim = 230

[State 0, VelAdd]
type = Velset
triggerall = prevstateno != 100
trigger1 = time = 0
x = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S0,4
volume = 0
channel = -1


[State 0, PlaySnd]
type = null;PlaySnd
trigger1 = time = 1
value = 24,0
volume = 0
channel = 0

[State 230, hit]
type=hitdef
trigger1 =time = 0
attr=S,NA
damage=25,1
animtype=Light
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=8,8
sparkno=0
;guard.sparkno=S8105
sparkxy=-15,-27
hitsound=s1,2
guardsound=s2,0
ground.type=Low
ground.slidetime=12
ground.hittime=12
ground.velocity=-2
ground.cornerpush.veloff=-4
air.cornerpush.veloff=-4
air.type=Low
air.hittime=10
air.velocity=-5,-7
yaccel=.5
persistent=0

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

;---------------------------------------------------------------------------
; Standing Medium Kick
[Statedef 240]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 35
ctrl = 0
velset = 0,0
anim = 240

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S0,1
volume = 0
channel = -1

[State 0, PlaySnd]
type = null;PlaySnd
trigger1 = time = 1
value = 24,1
volume = 0
channel = 0

[State 0, PosAdd]
type = PosAdd
trigger1 = AnimElem = 2
x = 15

[State 220, hit]
type=hitdef
trigger1=!time
attr=S,NA
damage=35,1
animtype=Medium
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=8,8
sparkno=0
;guard.sparkno=S8105
sparkxy = -20,-50
hitsound=s1,0
guardsound=s2,0
ground.type=High
ground.slidetime=14
ground.hittime=14
ground.velocity=-3
air.hittime = 12
ground.cornerpush.veloff=-5
air.cornerpush.veloff=-5
air.type=Low
air.velocity=-5,-7

[State 240, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Standing Strong Kick
[Statedef 250]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd=55
ctrl = 0
;velset = 0,0
anim = 250

;[State 0, VelAdd]
;type = Velset
;triggerall = prevstateno != 100
;trigger1 = time = 0
;x = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = S0,5
volume = 0
channel = -1

[State 0, PlaySnd]
type = null;PlaySnd
trigger1 = time = 1
value = 24,2
volume = 0
channel = 0

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = anim = 250 && AnimElemTime(7) < 0
trigger1 = movecontact = 1
value = anim
elem = (animelemno(0))+1
ignorehitpause = 1


[State 210, hit]
type=hitdef
trigger1=!time
attr=S,NA
damage=35,1
animtype=Hard
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=8,8
sparkno=0
;guard.sparkno=S8105
sparkxy=-15,-25
hitsound=s1,6
guardsound=s2,0
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=-10
air.type=Low
air.hittime=15
air.velocity=-5,-7
ground.cornerpush.veloff=-12
air.cornerpush.veloff=-12
persistent=0

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

;---------------------------------------------------------------------------
;Tech Hitted
[Statedef 345]
type    = S				;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= I				;Move-type: A-attack, I-idle, H-gethit
physics = S				;Physics: S-stand, C-crouch, A-air
juggle  = 0				;Number of air juggle points move takes
velset = -2,0			;Set velocity (x,y) (Def: no change)
ctrl = 0
anim = 345				;Set ctrl (Def: no change)
poweradd = 0			;Power to add (Def: 0)
sprpriority = 2	;Set layering priority to 2 (in front)

[State 0, EnvShake]
type = EnvShake
;trigger1 = enemynear,life >0
trigger1 = time = 0
time = 15
freq = 60
ampl = -4

[State 0, EnvColor]
type = EnvColor
trigger1 = !time
value = 255,255,255
time = 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S5000,3
channel = 5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S2,3
volume = 0
channel = -1

[State 3805, end]
type=selfstate
trigger1 = animtime =0
value=0
ctrl=1

;---------------------------------------------------------------------------
;Tech Hitted
[Statedef 346]
type    = A				;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= I				;Move-type: A-attack, I-idle, H-gethit
physics = A				;Physics: S-stand, C-crouch, A-air
juggle  = 0				;Number of air juggle points move takes
velset = -2,-8			;Set velocity (x,y) (Def: no change)
ctrl = 0
anim = 346				;Set ctrl (Def: no change)
poweradd = 0			;Power to add (Def: 0)
sprpriority = 2	;Set layering priority to 2 (in front)

[State 0, EnvShake]
type = EnvShake
;trigger1 = enemynear,life >0
trigger1 = time = 0
time = 15
freq = 60
ampl = -4

[State 0, EnvColor]
type = EnvColor
trigger1 = !time
value = 255,255,255
time = 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S5000,3
channel = 5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S2,3
volume = 0
channel = -1

[State 3805, end]
type=selfstate
trigger1 = animtime =0
value=50
ctrl=1

;---------------------------------------------------------------------------
;Tech Hitted Low
[Statedef 347]
type    = C				;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= I				;Move-type: A-attack, I-idle, H-gethit
physics = C				;Physics: S-stand, C-crouch, A-air
juggle  = 0				;Number of air juggle points move takes
velset = -2,0			;Set velocity (x,y) (Def: no change)
ctrl = 0
anim = 347				;Set ctrl (Def: no change)
poweradd = 0			;Power to add (Def: 0)
sprpriority = 2	;Set layering priority to 2 (in front)

[State 0, EnvShake]
type = EnvShake
;trigger1 = enemynear,life >0
trigger1 = time = 0
time = 15
freq = 60
ampl = -4

[State 0, EnvColor]
type = EnvColor
trigger1 = !time
value = 255,255,255
time = 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S5000,3
channel = 5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S2,3
volume = 0
channel = -1

[State 3805, end]
type=selfstate
trigger1 = animtime =0
value=11
ctrl=1

;---------------------------------------------------------------------------
; Crouching Light Punch
[Statedef 400]
type    = C
movetype= A
physics = C
juggle  = 4
poweradd= 15
ctrl = 0
anim = 400

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S0,4
volume = 0
channel = -1


[State 0, PlaySnd]
type = null;PlaySnd
trigger1 = time = 1
value = 24,0
volume = 0
channel = 0

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = anim = 400 && AnimElemTime(5) < 0
trigger1 = movecontact = 1
value = anim
elem = (animelemno(0))+1
ignorehitpause = 1

[State 400, hit]
type=hitdef
trigger1=time = 0
attr=C,NA
damage=15,1
animtype=Light
guardflag=MA
hitflag=MAF
priority=2,Hit
pausetime=13,14
sparkno=0
;guard.sparkno=S8105
sparkxy=-10,-30
hitsound=s1,5
guardsound=s2,0
ground.type=Low
ground.slidetime=10
ground.hittime=10
ground.velocity=-2
ground.cornerpush.veloff=-4
air.cornerpush.veloff=-4
air.type=Low
air.hittime=10
air.velocity=-5,-7

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

;---------------------------------------------------------------------------
; Crouching Medium Punch
[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 4
poweradd= 35
ctrl = 0
anim = 410

[State 0, VelAdd]
type = Velset
triggerall = prevstateno != 100
trigger1 = time = 0
x = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S0,1
volume = 0
channel = -1

[State 0, PlaySnd]
type = null;PlaySnd
trigger1 = time = 1
value = 24,1
volume = 0
channel = 0

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = anim = 410 && AnimElemTime(5) < 0
trigger1 = movecontact = 1
value = anim
elem = (animelemno(0))+1
ignorehitpause = 1

[State 410, hit]
type=hitdef
trigger1=time=0
attr=C,NA
damage=35,1
animtype=Medium
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=13,14
sparkno=0
;guard.sparkno=S8105
sparkxy=-15,-35
hitsound=s1,4
guardsound=s2,0
ground.type=High
ground.slidetime=13
ground.hittime=13
ground.velocity=-3
air.type=Low
air.hittime=12
air.velocity=-5,-7
ground.cornerpush.veloff=-6
air.cornerpush.veloff=-6

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

;---------------------------------------------------------------------------
; Crouching Strong Punch
[Statedef 420]
type    = C
movetype= A
physics = C
juggle  = 4
poweradd= 35
ctrl = 0
anim = 420

[State 0, VelAdd]
type = Velset
triggerall = prevstateno != 100
trigger1 = time = 0
x = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S0,5
volume = 0
channel = -1

[State 0, PlaySnd]
type = null;PlaySnd
trigger1 = time = 1
value = 24,2
volume = 0
channel = 0

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = anim = 420 && AnimElemTime(5) < 0
trigger1 = movecontact = 1
value = anim
elem = (animelemno(0))+1
ignorehitpause = 1

[State 0, PosAdd]
type = PosAdd
trigger1 = AnimElemTime(5) < 0
x = 1

[State 420, hit]
type=hitdef
trigger1=time=0
attr=C,NA
damage=45,1
animtype=Hard
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=10,12
sparkno=0
;guard.sparkno=S8105
sparkxy=-10,-25
hitsound=s1,6
guardsound=s2,0
ground.type=Low
ground.slidetime=16
ground.hittime=16
ground.velocity = -12,0
air.type=Low
air.hittime=12
air.velocity=-8,-5
ground.cornerpush.veloff=-10
air.cornerpush.veloff=-10


[State 420, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1
;---------------------------------------------------------------------------
; Opponent Launched
[Statedef 5051]
type    = A
movetype= H
physics = N
velset = 0, 0
ctrl = 0

[State 5051, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 5051

[State 5051, VelSet]
type = VelSet
trigger1 = AnimElem = 2
y = ifelse(pos y <=-30,-11,-15)

[State 5051, PlaySnd]
type = VelAdd
trigger1 = AnimElem = 2,>= 0
y = .44

[State 5051, ChangeState]
type = SelfState
triggerall = alive = 1
trigger1 = Time > 27
trigger1 = Vel Y >= 0
value = 5040
ctrl = 1

[State 5051, ChangeState]
type = SelfState
triggerall = !alive
trigger1 = Time > 27
trigger1 = Vel Y >= 0
value = 5050
;---------------------------------------------------------------------------
; Crouching Light Kick
[Statedef 430]
type    = C
movetype= A
physics = C
juggle  = 4
poweradd= 15
ctrl = 0
anim = 430

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S0,4
volume = 0
channel = -1


[State 0, PlaySnd]
type = null;PlaySnd
trigger1 = time = 1
value = 24,0
volume = 0
channel = 0

[State 245, hit]
type=hitdef
trigger1=time = 0
attr=C,NA
damage=15,1
animtype=Light
guardflag=L
hitflag=MAF
priority=4,Hit
pausetime=13,14
sparkno=0
;guard.sparkno=S8105
sparkxy=-10,-5
hitsound=s1,2
guardsound=s2,0
ground.type=Low
ground.slidetime=10
ground.hittime=10
ground.velocity=-2
ground.cornerpush.veloff=-4
air.cornerpush.veloff=-4
air.type=Low
air.hittime=12
air.velocity=-5,-7
down.velocity=-2,-2

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

;---------------------------------------------------------------------------
; Crouching Medium Kick
[Statedef 440]
type    = C
movetype= A
physics = C
juggle  = 4
poweradd= 35
ctrl = 0
anim = 440

;[State 0, VelAdd]
;type = Velset
;triggerall = prevstateno != 100
;trigger1 = time = 0
;x = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S0,5
volume = 0
channel = -1

[State 0, PlaySnd]
type = null;PlaySnd
trigger1 = time = 1
value = 24,1
volume = 0
channel = 0

[State 0, NotHitBy]
type = NotHitBy
trigger1 = prevstateno = 750
value = SCA
time = 1

[State 250, hit]
type=hitdef
trigger1=time = 0
attr=C,NA
damage=35,1
animtype=Medium
guardflag=L
hitflag=MAF
priority=3,Hit
pausetime=2,14
sparkno=0
;guard.sparkno=S8105
sparkxy=-15,-40
hitsound=s1,0
guardsound=s2,0
ground.type=Low
ground.slidetime=15
ground.hittime=15
ground.velocity=-8
air.type=Low
air.hittime=12
air.velocity=-4,-5
ground.cornerpush.veloff=-6
air.cornerpush.veloff=-6
down.velocity=-3,-3

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

;---------------------------------------------------------------------------
; Crouch Strong Kick
[Statedef 450]
type    = C
movetype= A
physics = C
juggle  = 4
poweradd= 55
ctrl = 0
anim = 450

[State 0, VelAdd]
type = Velset
triggerall = prevstateno != 100
trigger1 = time = 0
x = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S0,1
volume = 0
channel = -1

[State 0, PlaySnd]
type = null;PlaySnd
trigger1 = time = 1
value = 24,2
volume = 0
channel = 0

[State 255, hit]
type=hitdef
trigger1=time = 0
attr=C,NA
damage=45,1
animtype=Heavy
guardflag=MAL
hitflag=MA
priority=4,Hit
pausetime=13,14
sparkno=0
;guard.sparkno=S8105
sparkxy=-15,-5
hitsound=s1,3
guardsound=s2,0
ground.type=Trip
ground.slidetime=16
ground.hittime=16
ground.velocity=-3.33,-3.85
air.type=Low
air.hittime=12
air.velocity=-3.33,-3.85
air.cornerpush.veloff=0
down.velocity=-4,-4
fall=1

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

;---------------------------------------------------------------------------
; Jump Light Punch
[Statedef 600]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 15
ctrl = 0
anim = 600

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S0,4
volume = 0
channel = -1


[State 0, PlaySnd]
type = null;PlaySnd
trigger1 = time = 1
value = 24,0
volume = 0
channel = 0

[State 600, hit]
type=hitdef
trigger1=time = 0
attr=A,NA
damage=15,1
animtype=Light
guardflag=HA
hitflag=MAF
priority=4,Hit
pausetime=7,7
sparkno=0
;guard.sparkno=S8105
sparkxy=-10,-60
hitsound=s1,5
guardsound=s2,0
ground.type=High
ground.slidetime=9
ground.hittime=12
ground.velocity=-3
air.type=Low
air.velocity = -.5,((vel y)-.2)

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelemtime(5) >=0
statetype = A       ;S,A,C,L
movetype = I        ;I,A,H
physics = A         ;A,C,S,N

[State 0, CtrlSet]
type = CtrlSet
trigger1 = animelemtime(5) >=0
value = 1

;---------------------------------------------------------------------------
; Jump Medium Punch
[Statedef 610]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 35
ctrl = 0
anim = 610

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 3
value = S0,1
volume = 0
channel = -1

[State 0, PlaySnd]
type = null;PlaySnd
trigger1 = time = 1
value = 24,1
volume = 0
channel = 0

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = anim = 610 && AnimElemTime(6) < 0
trigger1 = movecontact = 1
value = anim
elem = (animelemno(0))+1
ignorehitpause = 1

[State 265, hit]
type=hitdef
trigger1= time = 0
attr=A,NA
damage=35,1
animtype=Medium
guardflag=HA
hitflag=MAF
priority=4,Hit
pausetime=10,11
sparkno=0
;guard.sparkno=S8105
sparkxy=-15,-70
hitsound=s1,4
guardsound=s2,0
ground.type=High
ground.slidetime=11
ground.hittime=14
ground.velocity=-5
air.type=Low
air.velocity = -1,((vel y)-.2)

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelemtime(9) >=0
statetype = A       ;S,A,C,L
movetype = I        ;I,A,H
physics = A         ;A,C,S,N

[State 0, CtrlSet]
type = CtrlSet
trigger1 = animelemtime(9) >=0
value = 1
;---------------------------------------------------------------------------
; Jump Strong Punch
[Statedef 620]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 55
ctrl = 0
anim = 620

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 6
value = S0,5
volume = 0
channel = -1

[State 0, PlaySnd]
type = null;PlaySnd
trigger1 = time = 1
value = 24,2
volume = 0
channel = 0

[State 620, hit]
type=hitdef
trigger1=AnimElem=5
trigger2=AnimElem=7
trigger3=AnimElem=9
trigger4=AnimElem=11
attr=A,NA
damage=10,1
animtype=Hard
guardflag=HA
hitflag=MAF
priority=5,Hit
pausetime=2,2
sparkno=0
;guard.sparkno=S8105
sparkxy=-15,-60
hitsound=s1,6
guardsound=s2,0
ground.type=High
ground.slidetime=12
ground.hittime=16
ground.velocity=-7
air.type=high
air.velocity = -1,((vel y)-.2)
fall.yvelocity = 0
air.fall=1
fall.recover=0

[State 620, hit]
type=hitdef
trigger1=AnimElem=13
attr=A,NA
damage=10,1
animtype=Hard
guardflag=HA
hitflag=MAF
priority=5,Hit
pausetime=12,12
sparkno=0
;guard.sparkno=S8105
sparkxy=-15,-60
hitsound=s1,6
guardsound=s2,0
ground.type=High
ground.slidetime=12
ground.hittime=16
ground.velocity=-7
air.type=high
air.velocity = -1,15
fall.yvelocity = 0
air.fall=1
fall.recover=0

[State 0, ScreenBound]
type = ScreenBound
triggerall = time <= 45
trigger1 = movehit
trigger1 = (p2stateno = [5050,5199])
value = 1
movecamera = 1,0

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelemtime(18) >=0
statetype = A       ;S,A,C,L
movetype = I        ;I,A,H
physics = A         ;A,C,S,N

[State 0, CtrlSet]
type = CtrlSet
trigger1 = animelemtime(18) >=0
value = 1

;---------------------------------------------------------------------------
; Jump Light Kick
[Statedef 630]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 15
ctrl = 0
anim = 630

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S0,4
volume = 0
channel = -1


[State 0, PlaySnd]
type = null;PlaySnd
trigger1 = time = 1
value = 24,0
volume = 0
channel = 0

[State 630, hit]
type=hitdef
trigger1=time = 0
attr=A,NA
damage=15,1
animtype=Light
guardflag=HA
hitflag=MAF
priority=4,Hit
pausetime=7,7
sparkno=0
;guard.sparkno=S8105
sparkxy=-15,-50
hitsound=s1,2
guardsound=s2,0
ground.type=High
ground.slidetime=9
ground.hittime=12
ground.velocity=-3
air.type=Low
air.velocity=-1,((vel y)-.2)

[State 0, CtrlSet]
type = CtrlSet
trigger1 = animelemtime(6) >=0
value = 1
;---------------------------------------------------------------------------
; Jump Medium Kick
[Statedef 640]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 55
ctrl = 0
anim = 640

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S0,1
volume = 0
channel = -1

[State 0, PlaySnd]
type = null;PlaySnd
trigger1 = time = 1
value = 24,1
volume = 0
channel = 0

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = anim = 640 && AnimElemTime(6) < 0
trigger1 = movecontact = 1
value = anim
elem = (animelemno(0))+1
ignorehitpause = 1

[State 640, hit]
type=hitdef
trigger1=time = 0
attr=A,NA
damage=45,1
animtype=Medium
guardflag=HA
hitflag=MAF
priority=4,Hit
pausetime=10,11
sparkno=0
;guard.sparkno=S8105
sparkxy=-15,-60
hitsound=s1,0
guardsound=s2,0
ground.type=High
ground.slidetime=11
ground.hittime=14
ground.velocity=-5
air.type=Low
air.velocity=-1.5,((vel y)-.2)

[State 0, CtrlSet]
type = CtrlSet
trigger1 = animelemtime(8) >=0
value = 1
;---------------------------------------------------------------------------
; Jump Strong Kick
[Statedef 650]
type    = A
movetype= A
physics = A
juggle  = 5
poweradd= 55
ctrl = 0
anim = 650

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S0,5
volume = 0
channel = -1

[State 0, PlaySnd]
type = null;PlaySnd
trigger1 = time = 1
value = 24,2
volume = 0
channel = 0

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = anim = 650 && AnimElemTime(6) < 0
trigger1 = movecontact = 1
value = anim
elem = (animelemno(0))+1
ignorehitpause = 1

[State 650, hit]
type=hitdef
trigger1=time = 0
attr=A,NA
damage=60,1
animtype=Hard
guardflag=HA
hitflag=MAF
priority=5,Hit
pausetime=12,12
sparkno=0
;;guard.sparkno=S8105
sparkxy=-15,-25
hitsound=s1,3
guardsound=s2,0
ground.type=High
ground.slidetime=12
ground.hittime=16
ground.velocity=-7
air.type=Low
air.velocity = -8,8
air.fall=1
fall.recover=0

[State 0, CtrlSet]
type = CtrlSet
trigger1 = animelemtime(9) >=0
value = 1

;-------------Dodge------------
[Statedef 700]
type=S
physics=S
movetype=I
anim=700
velset=0,0
ctrl=0
sprpriority=-1

[State 915, Dodge]
type=playsnd
trigger1= animelem=1
value=3,0
channel=0

[State 915, playerpush]
type = playerpush
trigger1 = 1
value = 0

[State 915, Hit By]
type=hitby
trigger1 = 1
value = SCA,AT
time = 1

[State 915, attack]
type = changestate
trigger1 = var(59)<=0 && (time=[15,25])
trigger1 = command="x" || command="y" || command="z" || command="a" || command="b" || command="c"
value= ifelse((command="x" || command="y" || command="z"),210,220)

[State 915, attack]
type = changestate
trigger1 = var(59)>=1 && (time=[15,25]) && (p2dist x=[0,60]) && p2movetype!=A
value = ifelse(random<500,210,220)

[State 700, CtrlSet]
type = CtrlSet
trigger1 = animelem >= 3
value = 1

[State 915, end]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Throw Forward - Attempt
[Statedef 800]
type    = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 800
p2facing = 1
facep2 = 1
sprpriority = 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S0,5
volume = 0
channel = -1

[State 800, 1]
type = HitDef
Trigger1 = Time = 0
attr = S, NT
hitflag = M-
priority = 1, Miss
sparkno = -1
sparkxy = -13, -72
hitsound = S4,0
sprpriority = 1
p1facing = ifelse (command = "holdback", -1, 1)
p2facing = 1
animtype=Hard
p1stateno = 801
p2stateno = 810
fall.yvelocity = 0
guard.dist = 0
fall = 1
fall.recover = 0

[State 0, VarSet]
type = VarSet
trigger1 = AnimTime = 0
v = 35    ;fv = 10
value = 0

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

;---------------------------------------------------------------------------
; Throw - Mega Punch
[Statedef 801]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 801
sprpriority = 1

[State 0, Width]
type = Width
trigger1 = animelemtime(6) < 0
value = 20,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem=2
value = S3,0
volume = 0
channel = 5

[State 0, TargetBind2]
type = TargetBind
trigger1 = AnimElem=1
pos = 60,0

[State 0, TargetBind2]
type = TargetBind
trigger1 = AnimElem=2
pos = 35,0

[State 0, TargetBind2]
type = TargetBind
trigger1 = AnimElem=3
pos = 45,0

[State 0, NotHitBy]
type = NotHitBy
trigger1 = animelemtime(6) < 0
value = SCA

[State 225, hit]
type=hitdef
trigger1=!time
attr=S,NT
damage=120,0
animtype=Hard
guardflag=MA
hitflag=MAF+
priority=4,Hit
pausetime=5,5
sparkno=0
;guard.sparkno=S8105
sparkxy=-15,-55
hitsound=s1,3
guardsound=s2,0
ground.type=High
ground.slidetime=16
ground.hittime=16
ground.velocity = -1,-15
air.type=Low
air.hittime=12
air.velocity=-1,-15
ground.cornerpush.veloff=-2
air.cornerpush.veloff=-2
yaccel=.9
persistent=0
fall = 1
fall.recover = 0
fall.yvelocity = 0
envshake.time = 12
envshake.ampl = 3
getpower=0

[State 800, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1
;-------------------------------------------
[Statedef 810]
type = A
movetype = H
physics = N
sprpriority = 2

[State 3400, Tech Hit!]
type = null;SelfState
trigger1 = alive
trigger1 = time = [1,9]
trigger1 = CanRecover
trigger1 = Command = "x" || Command = "y" || Command = "z" || Command = "a" || Command = "b" || Command = "c"
value = 5210

[State 925, 1]
type = screenbound
trigger1 = 1
value = 0
movecamera = 1,0

[State 0, NotHitBy]
type = HitBy
trigger1 = 1
value = S,NT
time = 1

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

[State 925, 1]
type = ChangeAnim2
trigger1 = time = 0
value = 810

[State 926, 4]
type = SelfState
trigger1 = time >= 35
value = 0
ctrl = 1



;---------------------------------------------------------------------------
; roll recovery
[Statedef 900]
type    = S				;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= I				;Move-type: A-attack, I-idle, H-gethit
physics = N				;Physics: S-stand, C-crouch, A-air
juggle  = 0				;Number of air juggle points move takes
velset = 0,0			;Set velocity (x,y) (Def: no change)
ctrl = 0				;Set ctrl (Def: no change)
anim = 900				;Change animation (Def: no change)
poweradd = 20			;Power to add (Def: 0)
sprpriority = 1			;Set layering priority to 2 (in front)

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S100,4
volume = 0
channel = -1

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

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 1
x =7.5
y = 0
;ignorehitpause =
;persistent =

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

[State 5700, VarSet]
type = VarSet
trigger1 = Time = 0
var(22) = 0

[State 200, 5]
type = ChangeState
trigger1 = AnimTime = 0
trigger2 = FrontEdgeBodyDist <= 10
value = 11
ctrl = 1
;---------------------------------------------------------------------------
; roll recovery
[Statedef 901]
type    = S				;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= I				;Move-type: A-attack, I-idle, H-gethit
physics = N				;Physics: S-stand, C-crouch, A-air
juggle  = 0				;Number of air juggle points move takes
velset = 0,0			;Set velocity (x,y) (Def: no change)
ctrl = 0				;Set ctrl (Def: no change)
anim = 901				;Change animation (Def: no change)
poweradd = 20			;Power to add (Def: 0)
sprpriority = 1		;Set layering priority to 2 (in front)

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S100,4
volume = 0
channel = -1

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

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

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

[State 5700, VarSet]
type = VarSet
trigger1 = Time = 0
var(22) = 0

[State 200, 5]
type = ChangeState
trigger1 = AnimTime = 0
trigger2 = backEdgeBodyDist <= 10
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; Stand Dodge
[Statedef 700]
type    = S				;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= I				;Move-type: A-attack, I-idle, H-gethit
physics = S				;Physics: S-stand, C-crouch, A-air
juggle  = 0				;Number of air juggle points move takes
velset = 0,0			;Set velocity (x,y) (Def: no change)
ctrl = 0				;Set ctrl (Def: no change)
anim = 700				;Change animation (Def: no change)
poweradd = 0			;Power to add (Def: 0)
sprpriority = -1			;Set layering priority to 2 (in front)

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

[State 0, HitBy]
type = HitBy
trigger1 = 1
value = SCA,AT

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
value = S3,2
volume = 0
channel = 5

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

;---------------------------------------------------------------------------
; Forward Dodge
[Statedef 701]
type    = S				;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= I				;Move-type: A-attack, I-idle, H-gethit
physics = N				;Physics: S-stand, C-crouch, A-air
juggle  = 0				;Number of air juggle points move takes
velset = 0,0			;Set velocity (x,y) (Def: no change)
ctrl = 0				;Set ctrl (Def: no change)
anim = 701				;Change animation (Def: no change)
poweradd = 0			;Power to add (Def: 0)
sprpriority = -1			;Set layering priority to 2 (in front)


[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = S3,2
volume = 0
channel = 5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = S100,6
volume = 0
channel = -1

[State 700, Width]
type = Width
trigger1 = 1
edge = 5,0

[State 700, Velocity]
type = VelSet
trigger1 = AnimElem = 2
x = 6.6

[State 700, Velocity]
type = VelSet
trigger1 = AnimElem = 7
x = 0

[State 700, HitBy]
type = HitBy
trigger1 = time <= 20
value = SCA;, NT,ST,HT

[State 700, Push]
type = PlayerPush
trigger1 = AnimElemTime(2) > 0
value = 0

[State 700, AfterImage]
type = Afterimage
trigger1 = AnimElem = 3
time = 15
length = 10
FrameGap = 5
PalBright = 1,1,1
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = .5,.5,.5
trans = add1

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

;---------------------------------------------------------------------------
; Backward Dodge
[Statedef 702]
type    = S				;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= I				;Move-type: A-attack, I-idle, H-gethit
physics = N				;Physics: S-stand, C-crouch, A-air
juggle  = 0				;Number of air juggle points move takes
velset = 0,0			;Set velocity (x,y) (Def: no change)
ctrl = 0				;Set ctrl (Def: no change)
anim = 702				;Change animation (Def: no change)
poweradd = 0			;Power to add (Def: 0)
sprpriority = -1			;Set layering priority to 2 (in front)

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = S3,2
volume = 0
channel = 5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = S100,6
volume = 0
channel = -1

[State 701, Width]
type = Width
trigger1 = 1
edge = 5,0

[State 701, Velocity]
type = VelSet
trigger1 = AnimElem = 2
x = -6.6

[State 701, Velocity]
type = VelSet
trigger1 = AnimElem = 7
x = 0

[State 701, HitBy]
type = HitBy
trigger1 = time <= 20
value = SCA;, NT,ST,HT

[State 701, Push]
type = PlayerPush
trigger1 = AnimElemTime(2) > 0
value = 0

[State 701, AfterImage]
type = Afterimage
trigger1 = AnimElem = 3
time = 15
length = 10
FrameGap = 5
PalBright = 1,1,1
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = .5,.5,.5
trans = add1


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

;---------------------------------------------------------------------------
; roll recovery Dodge
[Statedef 703]
type    = S				;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= I				;Move-type: A-attack, I-idle, H-gethit
physics = N				;Physics: S-stand, C-crouch, A-air
juggle  = 0				;Number of air juggle points move takes
velset = 0,0			;Set velocity (x,y) (Def: no change)
ctrl = 0				;Set ctrl (Def: no change)
anim = 703				;Change animation (Def: no change)
poweradd = 0			;Power to add (Def: 0)
sprpriority = 1			;Set layering priority to 2 (in front)

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

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 1
x = 4
y = 0
;ignorehitpause =
;persistent =

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

[State 200, 5]
type = ChangeState
trigger1 = AnimTime = 0
trigger2 = FrontEdgeBodyDist <= 10
value = 11
ctrl = 1

;---------<PARRY>----------
;---STANDING---
[Statedef 790]
type=S
physics=S
movetype=I
anim=165
velset=0,0
ctrl=0
sprpriority=2
poweradd=100

[State 700, hb]
type=hitby
trigger1=1
value=SCA,AT
time=1

[State 700, stop]
type=posfreeze
trigger1=1
value=1

[State 700, pause]
type=pause
trigger1=!time
time=15
movetime=15
endcmdbuftime=15
pausebg=0

[State 700, pause]
type=pause
trigger1= !time && numenemy
trigger1= (enemynear,movehit=1)
time= ifelse((enemynear,hitpausetime=[0,15]), 15-(enemynear,hitpausetime), 0)
movetime= ifelse((enemynear,hitpausetime=[0,15]), 15-(enemynear,hitpausetime), 0)
endcmdbuftime= ifelse((enemynear,hitpausetime=[0,15]), 15-(enemynear,hitpausetime), 0)
pausebg=0

[State 700, blueflash]
type=palfx
trigger1= !time
add=0,50,255
sinadd=0,-50,-255,60
time=15

[State 700, snd]
type=playsnd
trigger1= !time
value=2,3

[State 700, spark]
type=explod
trigger1= animelem=1
anim=8065
ID=8065
sprpriority=5
postype=p1
pos=45,-63
pausemovetime=60
ownpal=1
scale=.5,.5

[State 700, nowalk]
type=assertspecial
trigger1=1
flag=nowalk

[State 700, end]
type=changestate
trigger1= !animtime
value=0
ctrl=1


;---CROUCHING---
[Statedef 791]
type=C
physics=C
movetype=I
anim=166
velset=0,0
ctrl=0
sprpriority=2
poweradd=100

[State 701, hb]
type=hitby
trigger1=1
value=SCA,AT
time=1

[State 701, stop]
type=posfreeze
trigger1=1
value=1

[State 701, pause]
type=pause
trigger1=!time
time=15
movetime=15
endcmdbuftime=15
pausebg=0

[State 701, pause]
type=pause
trigger1= !time && numenemy
trigger1= (enemynear,movehit=1)
time= ifelse((enemynear,hitpausetime=[0,15]), 15-(enemynear,hitpausetime), 0)
movetime= ifelse((enemynear,hitpausetime=[0,15]), 15-(enemynear,hitpausetime), 0)
endcmdbuftime= ifelse((enemynear,hitpausetime=[0,15]), 15-(enemynear,hitpausetime), 0)
pausebg=0

[State 701, blueflash]
type=palfx
trigger1= !time
add=0,50,255
sinadd=0,-50,-255,60
time=15

[State 700, snd]
type=playsnd
trigger1= !time
value=2,3

[State 700, spark]
type=explod
trigger1= animelem=1
anim=8065
ID=8065
sprpriority=5
postype=p1
pos=25,-22
pausemovetime=60
ownpal=1
scale=.5,.5

[State 701, nowalk]
type=assertspecial
trigger1=1
flag=nowalk

[State 701, end]
type=changestate
trigger1= !animtime
value=11
ctrl=1


;---AERIAL---
[Statedef 792]
type=A
physics=A
movetype=I
anim=167
ctrl=0
sprpriority=2
poweradd=100

[State 702, hb]
type=hitby
trigger1=time<15
value=SCA,AT
time=1

[State 702, pause]
type=pause
trigger1=!time
time=15
movetime=15
endcmdbuftime=15
pausebg=0

[State 702, pause]
type=pause
trigger1= !time && numenemy
trigger1= (enemynear,movehit=1)
time= ifelse((enemynear,hitpausetime=[0,15]), 15-(enemynear,hitpausetime), 0)
movetime= ifelse((enemynear,hitpausetime=[0,15]), 15-(enemynear,hitpausetime), 0)
endcmdbuftime= ifelse((enemynear,hitpausetime=[0,15]), 15-(enemynear,hitpausetime), 0)
pausebg=0

[State 702, sts]
type=statetypeset
trigger1= time<15
physics=N

[State 702, stop]
type=posfreeze
trigger1= time<15
value=1

[State 702, vel]
type=velset
trigger1= time=15
x=ifelse(vel x>2,2,ifelse(vel x<-2,-2,vel x))
y=ifelse(vel y<-2,vel y,-2)

[State 702, sts]
type=statetypeset
trigger1= time>=15
physics=A

[State 702, ctrl]
type=ctrlset
trigger1= time>=15
value=1

[State 702, blueflash]
type=palfx
trigger1= !time
add=0,64,255
sinadd=0,-64,-255,60
time=15

[State 700, snd]
type=playsnd
trigger1= !time
value=2,3

[State 700, spark]
type=explod
trigger1= animelem=1
anim=8065
ID=8065
sprpriority=5
postype=p1
pos=45,-80
pausemovetime=60
ownpal=1
scale=.5,.5

[State 702, asserts]
type=assertspecial
trigger1= 1
flag=noairguard

[State 702, ctrl]
type=ctrlset
trigger1= time>10
value=1

;==========<ZERO COUNTER>==========
[Statedef 750]
type=S
physics=S
movetype=I
anim=750
ctrl=0
velset=0,0
poweradd=-1000
sprpriority=2

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

[State 750, strengthvar]
type=varset
trigger1=!time&&var(59)<=0
var(10)=ifelse((command="bdx"||command="bdy"||command="bdz"),1,2)
ignorehitpause=1

[State 750, strengthvar (AI)]
type=varset
trigger1=!time&&var(59)=1
var(10)=1
ignorehitpause=1

[State 750, snd]
type=playsnd
trigger1=time = 0
value=2,3
channel=0

[State 750, superpause]
type=superpause
trigger1=!time
time=20
movetime=20
anim=-1
sound=s-1,0
p2defmul=1
darken=0

[State 3000, carga]
type=helper
trigger1=time = 0
helpertype=normal
stateno=9750
ID=9750
name="fx"
postype=p1
pos = 15,-45
ownpal=1
persistent=0
supermovetime=9999

[State 750, end]
type=changestate
trigger1=time>=20
value=ifelse(var(10)=1,1002,450)

;==========<ZERO COUNTER>==========
[Statedef 751]
type=A
physics=N
movetype=I
anim=751
ctrl=0
velset=0,0
poweradd=-1000
sprpriority=2

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

[State 750, strengthvar]
type=varset
trigger1=!time&&var(59)<=0
var(10)=ifelse((command="bdx"||command="bdy"||command="bdz"),1,2)
ignorehitpause=1

[State 750, strengthvar (AI)]
type=varset
trigger1=!time&&var(59)=1
var(10)=1
ignorehitpause=1

[State 750, snd]
type=playsnd
trigger1=time = 0
value=2,3
channel=0

[State 750, superpause]
type=superpause
trigger1=!time
time=20
movetime=20
anim=-1
sound=s-1,0
p2defmul=1
darken=0

[State 3000, carga]
type=helper
trigger1=time = 0
helpertype=normal
stateno=9750
ID=9750
name="fx"
postype=p1
pos = 15,-50
ownpal=1
persistent=0
supermovetime=9999

[State 750, end]
type=changestate
trigger1=time>=20
value=ifelse(var(10)=1,1012,650)

;;-----------------------------
; Charge
[Statedef 950]
type    = S				;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= I				;Move-type: A-attack, I-idle, H-gethit
physics = S				;Physics: S-stand, C-crouch, A-air
juggle  = 1				;Number of air juggle points move takes
velset = 0,0			;Set velocity (x,y) (Def: no change)
ctrl = 0				;Set ctrl (Def: no change)
anim = 950				;Change animation (Def: no change)
poweradd = 0			;Power to add (Def: 0)
sprpriority = 2			;Set layering priority to 2 (in front)

[State 820, PowerAdd]
type = PowerAdd
triggerall = Anim = 950
trigger1 = 1
value = 2* ((time+12)/12)

[State 820, Anim]
type = ChangeAnim
triggerall=var(59)<=0
;triggerall = Time >= 4
trigger1 = (Command != "chargey" || Command != "chargeb") || (power >= 3000)
value = 951
persistent = 0

[State 740, fx]
type=helper
trigger1=anim=950&&!numhelper(7240)&&animelem =2
helpertype=normal
stateno=7240
ID=7240
name="Power Charge"
postype=p1
ownpal=1
persistent=0

[State 820, StateChange]
type = ChangeState
trigger1 = anim = 951 && AnimTime = 0
value = 0
ctrl = 1

;Um Furacão Pequeno (Frente)
[Statedef 1000]
type = S
movetype = A
physics = S
anim = 1000
juggle = 1
velset = 0
ctrl = 0

[State 1000, sonido]
type = PlaySnd
trigger1 = AnimElem = 2
value = 72,0

[State 1000, sonido]
type = PlaySnd
trigger1 = AnimElem = 1
value = 24,1;24,5

[State 1000, GP]
trigger1 = AnimElem = 6
type = HitDef
attr = A, SP
guardflag = MA
damage = 1,1
animtype = Light
sparkno=2
;guard.sparkno=s8105
sparkxy = -10, -45		;X-offset for the "hit spark" rel. to p2,
hitsound = s1,5
ground.type = High
ground.slidetime = 10
ground.hittime  = 12
ground.velocity = -3
air.velocity = -1.2,-2

[State 1000, GP]
trigger1 = AnimElem = 7
type = HitDef
attr = A, SP
guardflag = MA
damage = 1,1
animtype = Light
sparkno=2
;guard.sparkno=s8105
sparkxy = -10, -45		;X-offset for the "hit spark" rel. to p2,
hitsound = s1,5
ground.type = High
ground.slidetime = 10
ground.hittime  = 12
ground.velocity = -3
air.velocity = -1.2,-2

[State 1003, Helper]
type = helper
trigger1 = animelem = 8
ID = 1004
pos = 0,0
postype = p1
stateno = 1008
helpertype = normal
ownpal = 1
keyctrl = 0

;[State 1000, HD]
;trigger1 = AnimElem = 8
;type = Projectile
;attr = S, SP
;ignorehitpause = 1
;projanim = 1010
;offset = 0,0
;velocity = 6
;damage = 50,1
;animtype = Hard
;guardflag = MA
;pausetime = 0,0
;sparkxy = 50,-45
;sparkno=2
;hitsound = s1,5			;Sound to play on hit
;guardsound = s2,0
;ground.type = High
;ground.slidetime = 14
;ground.hittime  = 16
;ground.velocity = -4
;air.velocity = -2.5,-5
;projremove = 1


[State 1000, CS]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;----------------------------------------------------------------------
;Um Furacao Pequeno para Cima
[Statedef 1001]
type = S
movetype = A
physics = S
anim = 1000
juggle = 1
velset = 0
ctrl = 0

[State 1001, sonido]
type = PlaySnd
trigger1 = AnimElem = 2
value = 72,0

[State 1000, sonido]
type = PlaySnd
trigger1 = AnimElem = 1
value = 24,1;24,5

[State 1001, GP]
trigger1 = AnimElem = 6
type = HitDef
attr = A, SP
guardflag = MA
damage = 1,1
animtype = Light
sparkno=2
;guard.sparkno=s8105
sparkxy = -10, -45		;X-offset for the "hit spark" rel. to p2,
hitsound = s1,5
ground.type = High
ground.slidetime = 10
ground.hittime  = 12
ground.velocity = -3
air.velocity = -1.2,-2

[State 1001, GP]
trigger1 = AnimElem = 7
type = HitDef
attr = A, SP
guardflag = MA
damage = 1,1
animtype = Light
sparkno=2
;guard.sparkno=s8105
sparkxy = -10, -45		;X-offset for the "hit spark" rel. to p2,
hitsound = s1,5
ground.type = High
ground.slidetime = 10
ground.hittime  = 12
ground.velocity = -3
air.velocity = -1.2,-2

[State 1001, Helper]
type = helper
trigger1 = animelem = 8
ID = 1002
pos = 0,0
postype = p1
stateno = 1002
helpertype = normal
ownpal = 1
keyctrl = 0

[State 1001, CS]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;----------------------------------
;Helper - Pequeno Tornado para cima
[Statedef 1002]
type = A
movetype = A
physics = N
velset = 6,0
anim = 1010
ctrl = 0

[State 1002, Avanza  y va poco a poco hacia arriba]
type = VelAdd
trigger1 = Time >= 5
y = -.2

[State 0, Explod]
type = Explod
trigger1 = time%4=0
anim = 1012
ID = 1012
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause =1


[State 1002, 7]
type = HitDef
trigger1 = Time = 0
attr = A,SP
hitflag = MA
guardflag = MA
damage = 50,0
sparkxy = 50,-45
sparkno=2
;guard.sparkno= s8105
hitsound = s1,5			;Sound to play on hit
guardsound = s2,0
pausetime = 1,0
ground.type = High
ground.slidetime = 14
ground.hittime  = 16
ground.velocity = -4
air.velocity = -2.5,-5

[State 1002, DestroySelf]
type = DestroySelf
trigger1 = MoveContact
trigger2 = time = 150

;------------------------------------------
;Pequeno Tornado para Baixo
[Statedef 1003]
type = S
movetype = A
physics = S
anim = 1000
juggle = 1
velset = 0
ctrl = 0

[State 1003, sonido]
type = PlaySnd
trigger1 = AnimElem = 2
value = 72,0

[State 1000, sonido]
type = PlaySnd
trigger1 = AnimElem = 1
value = 24,1;24,5

[State 1003, GP]
trigger1 = AnimElem = 6
type = HitDef
attr = A, SP
guardflag = MA
damage = 1,1
animtype = Light
sparkno=2
;guard.sparkno=s8105
sparkxy = -10, -45		;X-offset for the "hit spark" rel. to p2,
hitsound = s1,5
ground.type = High
ground.slidetime = 10
ground.hittime  = 12
ground.velocity = -3
air.velocity = -1.2,-2

[State 1003, GP]
trigger1 = AnimElem = 7
type = HitDef
attr = A, SP
guardflag = MA
damage = 1,1
animtype = Light
sparkno=2
;guard.sparkno=s8105
sparkxy = -10, -45		;X-offset for the "hit spark" rel. to p2,
hitsound = s1,5
ground.type = High
ground.slidetime = 10
ground.hittime  = 12
ground.velocity = -3
air.velocity = -1.2,-2

[State 1003, Helper]
type = helper
trigger1 = animelem = 8
ID = 1004
pos = 0,0
postype = p1
stateno = 1004
helpertype = normal
ownpal = 1
keyctrl = 0

[State 1003, CS]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;--------------------------------
;Helper - Tornado para Baixo
[Statedef 1004]
type = A
movetype = A
physics = N
velset = 6,0
anim = 1010
ctrl = 0

[State 1004, Avanza  y va poco a poco hacia arriba]
type = VelAdd
trigger1 = Time >= 5
y = .2

[State 0, VelSet]
type = VelSet
trigger1 = Pos Y>=25
y = 0
ignorehitpause = 1

[State 0, Explod]
type = Explod
trigger1 = time%4=0
anim = 1012
ID = 1012
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause =1



[State 1004, 7]
type = HitDef
trigger1 = Time = 0
attr = A,SP
hitflag = MA
guardflag = MA
damage = 50,0
sparkno=2
;guard.sparkno= s8105
sparkxy = 50,-45
hitsound = s1,5			;Sound to play on hit
guardsound = s2,0
pausetime = 1,0
ground.type = High
ground.slidetime = 14
ground.hittime  = 16
ground.velocity = -4
air.velocity = -2.5,-5

[State 1002, DestroySelf]
type = DestroySelf
trigger1 = MoveContact
trigger2 = time = 150
;-------------------------------------------------------------------
;Um Furacão Pequeno (Frente) - no Ar
[Statedef 1005]
type = S
movetype = A
physics = S
anim = 1001
juggle = 1
velset = 0
ctrl = 0


[State 1400, Quieto parao]
type = VelSet
trigger1 = Time = 0
y = 0
x = 0

[State 1005, sonido]
type = PlaySnd
trigger1 = AnimElem = 2
value = 72,0

[State 1005, sonido]
type = PlaySnd
trigger1 = AnimElem = 1
value = 24,5


[State 1005, GP]
trigger1 = AnimElem = 6
type = HitDef
attr = A, SP
guardflag = MA
damage = 1,1
animtype = Light
sparkno=2
;guard.sparkno=s8105
sparkxy = -10, -45		;X-offset for the "hit spark" rel. to p2,
hitsound = s1,5
ground.type = High
ground.slidetime = 10
ground.hittime  = 12
ground.velocity = -3
air.velocity = -1.2,-2

[State 1005, GP]
trigger1 = AnimElem = 7
type = HitDef
attr = A, SP
guardflag = MA
damage = 1,1
animtype = Light
sparkno=2
;guard.sparkno=s8105
sparkxy = -10, -45		;X-offset for the "hit spark" rel. to p2,
hitsound = s1,5
ground.type = High
ground.slidetime = 10
ground.hittime  = 12
ground.velocity = -3
air.velocity = -1.2,-2

[State 1005, HD]
trigger1 = AnimElem = 8
type = Projectile
attr = S, SP
ignorehitpause = 1
projanim = 1010
offset = 0,-25
velocity = 6
damage = 50,1
animtype = Hard
guardflag = MA
pausetime = 0,0
sparkxy = 50,-45
sparkno=2
;guard.sparkno= s8105
hitsound = s1,5			;Sound to play on hit
guardsound = s2,0
ground.type = High
ground.slidetime = 14
ground.hittime  = 16
ground.velocity = -4
air.velocity = -2.5,-5
projremove = 1

[State 1005, CS]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1
;----------------------------------------------------------------------
;Um Furacao Pequeno para Cima (no ar)
[Statedef 1006]
type = A
movetype = A
physics = S
anim = 1001
juggle = 1
velset = 0
ctrl = 0


[State 1400, Quieto parao]
type = VelSet
trigger1 = Time = 0
y = 0
x = 0

[State 1006, sonido]
type = PlaySnd
trigger1 = AnimElem = 2
value = 72,0

[State 1006, sonido]
type = PlaySnd
trigger1 = AnimElem = 1
value = 24,5

[State 1006, GP]
trigger1 = AnimElem = 6
type = HitDef
attr = A, SP
guardflag = MA
damage = 1,1
animtype = Light
sparkno=2
;guard.sparkno=s8105
sparkxy = -10, -45		;X-offset for the "hit spark" rel. to p2,
hitsound = s1,5
ground.type = High
ground.slidetime = 10
ground.hittime  = 12
ground.velocity = -3
air.velocity = -1.2,-2

[State 1006, GP]
trigger1 = AnimElem = 7
type = HitDef
attr = A, SP
guardflag = MA
damage = 1,1
animtype = Light
sparkno=2
;guard.sparkno=s8105
sparkxy = -10, -45		;X-offset for the "hit spark" rel. to p2,
hitsound = s1,5
ground.type = High
ground.slidetime = 10
ground.hittime  = 12
ground.velocity = -3
air.velocity = -1.2,-2

[State 1006, Helper]
type = helper
trigger1 = animelem = 8
ID = 1002
pos = 0,-25
postype = p1
stateno = 1002
helpertype = normal
ownpal = 1
keyctrl = 0

[State 1006, CS]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1
;------------------------------------------
;Pequeno Tornado para Baixo (no ar)
[Statedef 1007]
type = S
movetype = A
physics = S
anim = 1001
juggle = 1
velset = 0
ctrl = 0


[State 1400, Quieto parao]
type = VelSet
trigger1 = Time = 0
y = 0
x = 0

[State 1006, sonido]
type = PlaySnd
trigger1 = AnimElem = 2
value = 72,0

[State 1006, sonido]
type = PlaySnd
trigger1 = AnimElem = 1
value = 24,5

[State 1006, GP]
trigger1 = AnimElem = 6
type = HitDef
attr = A, SP
guardflag = MA
damage = 1,1
animtype = Light
sparkno=2
;guard.sparkno=s8105
sparkxy = -10, -45		;X-offset for the "hit spark" rel. to p2,
hitsound = s1,5
ground.type = High
ground.slidetime = 10
ground.hittime  = 12
ground.velocity = -3
air.velocity = -1.2,-2

[State 1006, GP]
trigger1 = AnimElem = 7
type = HitDef
attr = A, SP
guardflag = MA
damage = 1,1
animtype = Light
sparkno=2
;guard.sparkno=s8105
sparkxy = -10, -45		;X-offset for the "hit spark" rel. to p2,
hitsound = s1,5
ground.type = High
ground.slidetime = 10
ground.hittime  = 12
ground.velocity = -3
air.velocity = -1.2,-2

[State 1006, Helper]
type = helper
trigger1 = animelem = 8
ID = 1004
pos = 0,-25
postype = p1
stateno = 1004
helpertype = normal
ownpal = 1
keyctrl = 0

[State 1006, CS]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1

;--------------------------------
;Helper - Tornado reto
[Statedef 1008]
type = A
movetype = A
physics = N
velset = 6,0
anim = 1010
ctrl = 0

[State 0, Explod]
type = Explod
trigger1 = time%4=0
anim = 1012
ID = 1012
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause =1



[State 1004, 7]
type = HitDef
trigger1 = Time = 0
attr = A,SP
hitflag = MA
guardflag = MA
damage = 50,0
sparkno=2
;guard.sparkno= s8105
sparkxy = 50,-45
hitsound = s1,5			;Sound to play on hit
guardsound = s2,0
pausetime = 1,0
ground.type = High
ground.slidetime = 14
ground.hittime  = 16
ground.velocity = -4
air.velocity = -2.5,-5

[State 1002, DestroySelf]
type = DestroySelf
trigger1 = MoveContact
trigger2 = time = 150
;-------------------------------------------------------------------
; Tornado Spin
[StateDef 1100]
type = A
movetype= A
physics = N
juggle  = 2
velset = 0,0
ctrl = 0
anim = 1100
poweradd = 80
sprpriority = 2

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = anim != 1400
trigger1 = pos y <= -10
value = 1400

[State 0, PlaySnd]
type = null;PlaySnd
trigger1 = AnimElem = 3
value = 24,4
volume = 0
channel = 5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = S5,1
volume = 0
channel = -1
persistent=0

[State 0, Helper]
type = Helper
triggerall = numhelper(1100)<=1
;triggerall = anim = 1100
trigger1 = animelem = 4
helpertype = normal ;player
name = "Tornado"
ID = 1100
stateno = 1190
pos = 30,0
postype = p1    ;p2,front,back,left,right
keyctrl = 0
ownpal = 1

[State 0, Helper2]
type = Helper
triggerall = numhelper(1100)<=1
;triggerall = anim = 1100
trigger1 = animelem = 4
helpertype = normal ;player
name = "Tornado2"
ID = 1100
stateno = 1191
pos = -30,0
postype = p1    ;p2,front,back,left,right
keyctrl = 0
ownpal = 1

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = anim = 1100
trigger1 = animelemtime(4) >= 0
trigger1 = numhelper(1100) = 0
value = 1101

[State 1000, end]
type = ChangeState
trigger1 = AnimTime = 0
trigger1 = anim = 1101
trigger2 = time = 60
trigger2 = anim = 1400
value = 50
ctrl = 1

;-------------------------------------------------------------------
; Tornado Push
[StateDef 1200]
type = S
movetype = A
physics = S
anim = 1200
juggle = 1
velset = 0
ctrl = 0

[State 0, Explod]
type = Explod
trigger1 = !time
anim = 7023
ID = 7023
pos = -20,0
postype = p1  ;p2,front,back,left,right
bindtime = 1
removetime = -2
supermovetime = 9999
pausemovetime = 9999
scale = .5,.5
sprpriority = -1
ownpal = 1
removeongethit = 0

[State 222, sonido]
type = PlaySnd
trigger1 = time = 1
value = 24,8



[State 222, Seno1]
type = Helper
trigger1 = Time = 2
trigger1 = NumHelper(1201) < 1
helpertype = normal
postype = p1
pos = 0,0
ID = 1201
stateno = 1201
ownpal = 1

[State 222, Seno2]
type = Helper
trigger1 = Time = 7
trigger1 = NumHelper(1201) < 2
helpertype = normal
postype = p1
pos = 0,0
ID = 1201
stateno = 1201
ownpal = 1

[State 222, Seno3]
type = Helper
trigger1 = Time = 12
trigger1 = NumHelper(1201) < 3
helpertype = normal
postype = p1
pos = 0,0
ID = 1201
stateno = 1201
ownpal = 1

[State 222, Seno4]
type = Helper
trigger1 = Time = 17
trigger1 = NumHelper(1201) < 4
helpertype = normal
postype = p1
pos = 0,0
ID = 1201
stateno = 1201
ownpal = 1

[State 222, Seno5]
type = Helper
trigger1 = Time = 23
trigger1 = NumHelper(1201) < 5
helpertype = normal
postype = p1
pos = 0,0
ID = 1201
stateno = 1201
ownpal = 1

[State 222, Seno6]
type = Helper
trigger1 = Time = 30
trigger1 = NumHelper(1201) < 6
helpertype = normal
postype = p1
pos = 0,0
ID = 1201
stateno = 1201
ownpal = 1

[State 222, CS]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;-----------------------------------------------------------------------
;Helper - Ventos giratorios
[Statedef 1201]
type = A
movetype = A
physics = N
velset = 0,0
anim = 1201
ctrl = 0
sprpriority = 1


[State 1201, Movimiento senosoidal]
type = VelSet
trigger1 = 1
x = 5
y = COS(time*0.05)

[State 1201, Pupita]
type = HitDef
trigger1 = time = 1
attr = A,NP
hitflag = MA-
guardflag = A
damage = 17,0
sparkxy = 50,-45
sparkno=2
;guard.sparkno= s8105
hitsound = s1,5			;Sound to play on hit
guardsound = s2,0
ground.slidetime = 4
ground.hittime  = 4
ground.velocity = -2
air.velocity = -2,-2
givepower = 3,2

[State 1201, DestroySelf]
type = DestroySelf
trigger1 = time = 64
;----------------------------------------------------------------
;Lanças 4 pequenos Furacões
;Pose
[Statedef 1300]
type = S
movetype = A
physics = N
anim = 1300
velset = 0,0
ctrl = 0

[State 1300, Sound]
type = playsnd
trigger1 = AnimElem = 3
value = 72,0

[State 1300, Torbellino 1 de 4]
type = Helper
trigger1 = AnimElem = 3
trigger1 = NumHelper(1302) < 6
helpertype = normal
ID = 1302
postype = p1
stateno = 1302
ownpal = 1

[State 1300, Torbellino 2 de 4]
type = Helper
trigger1 = AnimElem = 3
trigger1 = NumHelper(1302) < 6
helpertype = normal
ID = 1302
postype = p1
stateno = 1302
ownpal = 1

[State 1300, Sound]
type = playsnd
trigger1 = AnimElem = 4
value = 73,0

[State 1300, Torbellino 3 de 4]
type = Helper
trigger1 = AnimElem = 4
trigger1 = NumHelper(1302) < 6
helpertype = normal
ID = 1302
postype = p1
stateno = 1302
ownpal = 1

[State 1300, Torbellino 4 de 4]
type = Helper
trigger1 = AnimElem = 4
trigger1 = NumHelper(1302) < 6
helpertype = normal
ID = 1302
postype = p1
stateno = 1302
ownpal = 1

[State 489, CS]
type = ChangeState
trigger1 = AnimTime = 0
value = 1301

;-------------------------------------------------
;Pose y vuelta a la normalidad
[Statedef 1301]
type = S
movetype = A
physics = N
anim = 1301
velset = 0,0
ctrl = 0

[State 490, Mover los torbellinos]
type = VarAdd
trigger1 = Var(36) = 1
trigger1 = PrevStateNo = 1300
trigger1 = Time = 0
v = 35
value = 1

[State 490, volvemos a la normalidad]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------
;Helper - Pequenos Tornados
[Statedef 1302]
type = A
movetype = A
physics = N
velset = 0,0
anim = 1010
ctrl = 0

[State 0, Explod]
type = Explod
trigger1 = time%4=0
anim = 1012
ID = 1012
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause =1


[State 1302, ChangeAnim]
type = ChangeAnim
triggerall = anim != 1011
trigger1 = time = 70
value = 1011

[State 1302, Variable Vertical]
type = VarRandom
trigger1 = Time = 0
v = 32
range = -87,2

[State 1302, Variable Horizontal]
type = VarRandom
trigger1 = Time = 0
v = 33
range = 7,37

[State 1302, Avanzan un poquito]
type = VelSet
trigger1 = Time = 1
x = 3
y = Var(32)/10

[State 1302, Stop]
type = VelSet
trigger1 = Var(33) < 25
trigger1 = Time = [Var(33),66]
trigger2 = Var(33) >= 25
trigger2 = Time = [Var(33)/2,66]
x = 0
y = 0

[State 1302, Avanza poco a poco y hacen pupita]
type = VelSet
trigger1 = Vel X < 3.2
trigger1 = Time >= 48
x = 5.4
y = 3.2

[State 1302, 7]
type = HitDef
trigger1 = Time = 0
attr = A,NP
hitflag = MA-
guardflag = A
damage = 20,1
sparkno=2
;guard.sparkno=s8105
sparkxy = 50,-45		;X-offset for the "hit spark" rel. to p2,
hitsound = s1,5
ground.slidetime = 4
ground.hittime  = 4
ground.velocity = -2
air.velocity = -2,-2
getpower = -5,-3
givepower = 3,2

[State 0, VelSet]
type = VelSet
trigger1 = Pos Y>=25
y = 0
ignorehitpause = 1

[State 1302, DestroySelf]
type = DestroySelf
trigger1 = MoveContact
trigger2 = anim = 1011 && animtime = 0


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

;Lançando 6 pequenos tornados
;Pose
[Statedef 1303]
type = S
movetype = A
physics = N
anim = 1302
velset = 0,0
ctrl = 0

[State 0, Explod]
type = Explod
trigger1 = !time
anim = 7023
ID = 7023
pos = -20,0
postype = p1  ;p2,front,back,left,right
bindtime = 1
removetime = -2
supermovetime = 9999
pausemovetime = 9999
scale = .5,.5
sprpriority = -1
ownpal = 1
removeongethit = 0

[State 1303, Sound]
type = playsnd
trigger1 = AnimElem = 3
value = 72,0

[State 1303, Torbellino 1 de 6]
type = Helper
trigger1 = AnimElem = 3
trigger1 = NumHelper(1305) < 6
helpertype = normal
ID = 1305
postype = p1
stateno = 1305
ownpal = 1

[State 1303, Torbellino 2 de 6]
type = Helper
trigger1 = AnimElem = 3
trigger1 = NumHelper(1305) < 6
helpertype = normal
ID = 1305
postype = p1
stateno = 1305
ownpal = 1

[State 1303, Sound]
type = playsnd
trigger1 = AnimElem = 5
value = 73,0

[State 1303, Torbellino 3 de 6]
type = Helper
trigger1 = AnimElem = 5
trigger1 = NumHelper(1305) < 6
helpertype = normal
ID = 1305
postype = p1
stateno = 1305
ownpal = 1

[State 1303, Torbellino 4 de 6]
type = Helper
trigger1 = AnimElem = 5
trigger1 = NumHelper(1305) < 6
helpertype = normal
ID = 1305
postype = p1
stateno = 1305
ownpal = 1

[State 1303, Sound]
type = playsnd
trigger1 = AnimElem = 7
value = 73,0

[State 1303, Torbellino 5 de 6]
type = Helper
trigger1 = AnimElem = 7
trigger1 = NumHelper(1305) < 6
helpertype = normal
ID = 1305
postype = p1
stateno = 1305
ownpal = 1

[State 1303, Torbellino 6 de 6]
type = Helper
trigger1 = AnimElem = 7
trigger1 = NumHelper(1305) < 6
helpertype = normal
ID = 1305
postype = p1
stateno = 1305
ownpal = 1

[State 89, CS]
type = ChangeState
trigger1 = AnimTime = 0
value = 1304
;----------------------------------------------
;Pose y vuelta a la normalidad
[Statedef 1304]
type = S
movetype = A
physics = N
anim = 1301
velset = 0,0
ctrl = 0

[State 90, Mover los torbellinos]
type = VarAdd
trigger1 = Var(37) = 1
trigger1 = PrevStateNo = 1303
trigger1 = Time = 0
v = 34
value = 1

[State 90, volvemos a la normalidad]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;--------------------------------------------
;Los torbellinos hacen pupita
[Statedef 1305]
type = A
movetype = A
physics = N
velset = 0,0
anim = 1010
ctrl = 0

[State 0, Explod]
type = Explod
trigger1 = time%4=0
anim = 1012
ID = 1012
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause =1

[State 1305, ChangeAnim]
type = ChangeAnim
triggerall = anim != 1011
trigger1 = time = 70
value = 1011

[State 1305, Variable Vertical]
type = VarRandom
trigger1 = Time = 0
v = 32
range = -87,2

[State 1305, Variable Horizontal]
type = VarRandom
trigger1 = Time = 0
v = 33
range = 7,37

[State 1305, Avanzan un poquito]
type = VelSet
trigger1 = Time = 1
x = 3
y = Var(32)/10

[State 1305, Stop]
type = VelSet
trigger1 = Var(33) < 25
trigger1 = Time = [Var(33),66]
trigger2 = Var(33) >= 25
trigger2 = Time = [Var(33)/2,66]
x = 0
y = 0

[State 1305, Avanza poco a poco y hacen pupita]
type = VelAdd
trigger1 = Vel X < 3.2
trigger1 = Time >= 48
x = 3.1

[State 1305, 7]
type = HitDef
trigger1 = Time = 0
attr = A,NP
hitflag = MA-
guardflag = A
damage = 20,1
sparkno=2
;guard.sparkno=s8105
sparkxy = 50,-45		;X-offset for the "hit spark" rel. to p2,
hitsound = s1,5
ground.slidetime = 4
ground.hittime  = 4
ground.velocity = -2
air.velocity = -2,-2
getpower = -5,-3
givepower = 3,2

[State 1302, DestroySelf]
type = DestroySelf
trigger1 = MoveContact
trigger2 = anim = 1011 && animtime = 0
;--------------------------------------------------------
;Aspirando lixo
[Statedef 1400]
type = S
movetype = A
anim = 1100
ctrl = 0

[State 1400, Quieto parao]
type = VelSet
trigger1 = Time = 0
y = 0
x = 0

[State 1400, sonido]
type = PlaySnd
trigger1 = time = 1
value = 24,7

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

[State 1400, Chatarra1]
type = Helper
trigger1 = Time = 1
helpertype = normal
postype = p1
pos = -270,-10
ID = 1500
stateno = 1500
ownpal = 1

[State 1400, Chatarra2]
type = Helper
trigger1 = Time = 1
helpertype = normal
postype = p1
pos = -270,70
ID = 1501
stateno = 1501
ownpal = 1

[State 1400, Chatarra3]
type = Helper
trigger1 = Time = 1
helpertype = normal
postype = p1
pos = -10,-170
ID = 1506
stateno = 1506
ownpal = 1

[State 1400, Chatarra4]
type = Helper
trigger1 = Time = 1
helpertype = normal
postype = p1
pos = -310,-170
ID = 1505
stateno = 1505
ownpal = 1

[State 1400, Chatarra5]
type = Helper
trigger1 = Time = 1
helpertype = normal
postype = p1
pos = 270,-10
ID = 1504
stateno = 1504
ownpal = 1

[State 1400, Chatarra6]
type = Helper
trigger1 = Time = 1
helpertype = normal
postype = p1
pos = 270,-170
ID = 1503
stateno = 1503
ownpal = 1

[State 1400, Chatarra7]
type = Helper
trigger1 = Time = 1
helpertype = normal
postype = p1
pos = 30,150
ID = 1502
stateno = 1502
ownpal = 1

[State 1400, CS]
type = changestate
trigger1 = time = 130
ctrl = 1
value = 50
;-----------------------------------------------------------------
;Helper1 Viene
[Statedef 1500]
type = A
movetype = A
anim = 1500
sprpriority = 3

[State 1500, AS]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1500, HD]
trigger1 = Time = 0
type = HitDef
attr = A, SP
guardflag = MA
damage = 15,1
animtype = Medium
pausetime = 0,0
sparkxy = 50,-45
sparkno=2
;guard.sparkno= s8105
hitsound = s1,5			;Sound to play on hit
guardsound = s2,0
ground.type = High
ground.slidetime = 1
ground.hittime  = 1
ground.velocity = -2
air.velocity = -1.2,-3
getpower = -40,-12
givepower = 5,3

[State 1500, Override]
type = HitOverride
trigger1 = Time = 0
trigger1 = Var(37) >= 10
attr = SCA, NT, ST, HT, NA, SA, HA,NP,SP,HP
stateno = 1594
time = -1

[State 1500, Override2]
type = HitOverride
trigger1 = Time = 0
trigger1 = Var(37) < 10
attr = SCA, NT, ST, HT, NA, SA, HA,NP,SP,HP
stateno = 1594
time = -1

[State 1500, 1]
type = HitBy
trigger1 = AnimTime > 1
value = SCA, NT, ST, HT, NA, SA, HA, NP, SP, HP
stateno = 1593
ctrl = 0

[State 1500, VS]
type = VelSet
trigger1 = Time = 0
x = 2.7
y = .1

[State 1002, DestroySelf]
type = DestroySelf
trigger1 = MoveContact


[State 1500, CS]
type = changestate
trigger1 = RootDist X = 0
ctrl = 1
value = 1510
;--------------------------------------------------------

;Helper1 Circula
[Statedef 1510]
type = A
movetype = A
anim = 1510
sprpriority = 3

[State 1510, B2P]
type = BindToParent
trigger1 = Anim = 1510
pos = 0,7
facing = 1

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

[State 1510, AS]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1510, HD]
trigger1 = Time = 0
type = HitDef
attr = A, SP
guardflag = MA
damage = 15,1
animtype = Medium
pausetime = 0,0
sparkxy = 50,-45
sparkno=2
;guard.sparkno= s8105
hitsound = s1,5			;Sound to play on hit
guardsound = s2,0
ground.type = High
ground.slidetime = 1
ground.hittime  = 1
ground.velocity = -2
air.velocity = -1.2,-3
getpower = -40,-12
givepower = 5,3

[State 1002, DestroySelf]
type = DestroySelf
trigger1 = MoveContact


[State 1510, CS]
type = changestate
trigger1 = Time = 298
trigger2 = root,stateno = [3000,3300]
ctrl = 1
value = 1520
;-----------------------------------------------
;Helper1 Se larga
[Statedef 1520]
type = A
movetype = A
anim = 1520
sprpriority = 3

[State 1520, AS]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1520, HD]
trigger1 = Time = 0
type = HitDef
attr = A, SP
guardflag = MA
damage = 15,1
animtype = Medium
pausetime = 0,0
sparkxy = 50,-45
sparkno=2
;guard.sparkno= s8105
hitsound = s1,5			;Sound to play on hit
guardsound = s2,0
ground.type = High
ground.slidetime = 1
ground.hittime  = 1
ground.velocity = -2
air.velocity = -1.2,-3
getpower = -40,-12
givepower = 5,3

[State 1520, VS]
type = VelSet
trigger1 = Time = 0
x = 3.4
y = 2.2

[State 1520, DS]
type = DestroySelf
trigger1 = MoveContact
trigger2 = Time >= 90

;-----------------------------------------------------
;Helper2 Viene
[Statedef 1501]
type = A
movetype = A
anim = 1501
sprpriority = 3

[State 1501, AS]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1501, HD]
trigger1 = Time = 0
type = HitDef
attr = A, SP
guardflag = MA
damage = 15,1
animtype = Medium
pausetime = 0,0
sparkxy = 50,-45
sparkno=2
;guard.sparkno= s8105
hitsound = s1,5			;Sound to play on hit
guardsound = s2,0
ground.type = High
ground.slidetime = 1
ground.hittime  = 1
ground.velocity = -2
air.velocity = -1.2,-3
getpower = -40,-12
givepower = 5,3

[State 1501, VS]
type = VelSet
trigger1 = Time = 0
x = 2.7
y = -.7

[State 1501, Override]
type = HitOverride
trigger1 = Time = 0
trigger1 = Var(37) >= 10
attr = SCA, NT, ST, HT, NA, SA, HA,NP,SP,HP
stateno = 1594
time = -1

[State 1501, Override2]
type = HitOverride
trigger1 = Time = 0
trigger1 = Var(37) < 10
attr = SCA, NT, ST, HT, NA, SA, HA,NP,SP,HP
stateno = 1594
time = -1

[State 1501, 1]
type = HitBy
trigger1 = AnimTime > 1
value = SCA, NT, ST, HT, NA, SA, HA, NP, SP, HP
stateno = 1593
ctrl = 0

[State 1002, DestroySelf]
type = DestroySelf
trigger1 = MoveContact


[State 1501, CS]
type = changestate
trigger1 = time = 20;RootDist X = 0
ctrl = 1
value = 1511
;----------------------------------------------------------------------
;Helper2 Circula
[Statedef 1511]
type = A
movetype = A
anim = 1511
sprpriority = 3

[State 1511, B2P]
type = BindToParent
trigger1 = Anim = 1511
pos = 0,7
facing = 1

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

[State 1511, AS]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1511, HD]
trigger1 = Time = 0
type = HitDef
attr = A, SP
guardflag = MA
damage = 15,1
animtype = Medium
pausetime = 0,0
sparkxy = 50,-45
sparkno=2
;guard.sparkno= s8105
hitsound = s1,5			;Sound to play on hit
guardsound = s2,0
ground.type = High
ground.slidetime = 1
ground.hittime  = 1
ground.velocity = -2
air.velocity = -1.2,-3
getpower = -40,-12
givepower = 5,3


[State 1002, DestroySelf]
type = DestroySelf
trigger1 = MoveContact


[State 1511, CS]
type = changestate
trigger1 = Time = 298
trigger2 = root,stateno = [3000,3300]
ctrl = 1
value = 1521
;----------------------------------------------------------------------
;Helper2 Se larga
[Statedef 1521]
type = A
movetype = A
anim = 1521
sprpriority = 3

[State 1521, AS]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1521, HD]
trigger1 = Time = 0
type = HitDef
attr = A, SP
guardflag = MA
damage = 15,1
animtype = Medium
pausetime = 0,0
sparkxy = 50,-45
sparkno=2
;guard.sparkno= s8105
hitsound = s1,5			;Sound to play on hit
guardsound = s2,0
ground.type = High
ground.slidetime = 1
ground.hittime  = 1
ground.velocity = -2
air.velocity = -1.2,-3
getpower = -40,-12
givepower = 5,3

[State 1521, VS]
type = VelSet
trigger1 = Time = 0
x = -3.7
y = -2.2

[State 1002, DestroySelf]
type = DestroySelf
trigger1 = MoveContact
trigger2 = Time >= 90
;---------------------------------------------------

;Helper3 Viene
[Statedef 1506]
type = A
movetype = A
anim = 1506
sprpriority = 3

[State 1506, AS]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1506, VS]
type = VelSet
trigger1 = Time = 0
x = .1
y = 1.7

[State 1506, HD]
trigger1 = Time = 0
type = HitDef
attr = A, SP
guardflag = MA
damage = 15,1
animtype = Medium
pausetime = 0,0
sparkxy = 50,-45
sparkno=2
;guard.sparkno= s8105
hitsound = s1,5			;Sound to play on hit
guardsound = s2,0
ground.type = High
ground.slidetime = 1
ground.hittime  = 1
ground.velocity = -2
air.velocity = -1.2,-3
getpower = -40,-12
givepower = 5,3

[State 1506, Override]
type = HitOverride
trigger1 = Time = 0
trigger1 = Var(37) >= 10
attr = SCA, NT, ST, HT, NA, SA, HA,NP,SP,HP
stateno = 1594
time = -1

[State 1506, Override2]
type = HitOverride
trigger1 = Time = 0
trigger1 = Var(37) < 10
attr = SCA, NT, ST, HT, NA, SA, HA,NP,SP,HP
stateno = 1594
time = -1

[State 1506, 1]
type = HitBy
trigger1 = AnimTime > 1
value = SCA, NT, ST, HT, NA, SA, HA, NP, SP, HP
stateno = 1593
ctrl = 0

[State 1002, DestroySelf]
type = DestroySelf
trigger1 = MoveContact


[State 1506, CS]
type = changestate
trigger1 = RootDist Y <= 0
ctrl = 1
value = 1516
;----------------------------------------------------------------------
;Helper3 Circula
[Statedef 1516]
type = A
movetype = A
anim = 1516
sprpriority = 3

[State 1516, B2P]
type = BindToParent
trigger1 = Anim = 1516
pos = 0,7
facing = 1

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

[State 1516, AS]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1516, HD]
trigger1 = Time = 0
type = HitDef
attr = A, SP
guardflag = MA
damage = 15,1
animtype = Medium
pausetime = 0,0
sparkxy = 50,-45
sparkno=2
;guard.sparkno= s8105
hitsound = s1,5			;Sound to play on hit
guardsound = s2,0
ground.type = High
ground.slidetime = 1
ground.hittime  = 1
ground.velocity = -2
air.velocity = -1.2,-3
getpower = -40,-12
givepower = 5,3


[State 1002, DestroySelf]
type = DestroySelf
trigger1 = MoveContact


[State 1516, CS]
type = changestate
trigger1 = Time = 298
trigger2 = root,stateno = [3000,3300]
ctrl = 1
value = 1526
;------------------------------------------------------------------------------
;Helper3 Se larga
[Statedef 1526]
type = A
movetype = A
anim = 1526
sprpriority = 3

[State 1526, AS]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1526, HD]
trigger1 = Time = 0
type = HitDef
attr = A, SP
guardflag = MA
damage = 15,1
animtype = Medium
pausetime = 0,0
sparkxy = 50,-45
sparkno=2
;guard.sparkno= s8105
hitsound = s1,5			;Sound to play on hit
guardsound = s2,0
ground.type = High
ground.slidetime = 1
ground.hittime  = 1
ground.velocity = -2
air.velocity = -1.2,-3
getpower = -40,-12
givepower = 5,3

[State 1526, VS]
type = VelSet
trigger1 = Time = 0
x = 2.2
y = 5


[State 1002, DestroySelf]
type = DestroySelf
trigger1 = MoveContact
trigger2 = Time >= 90
;-----------------------------------------------------------------------

;Helper4 Viene
[Statedef 1505]
type = A
movetype = A
anim = 1505
sprpriority = 3

[State 1505, AS]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1505, VS]
type = VelSet
trigger1 = Time = 0
x = 3.1
y = 1.7

[State 1505, HD]
trigger1 = Time = 0
type = HitDef
attr = A, SP
guardflag = MA
damage = 15,1
animtype = Medium
pausetime = 0,0
sparkxy = 50,-45
sparkno=2
;guard.sparkno= s8105
hitsound = s1,5			;Sound to play on hit
guardsound = s2,0
ground.type = High
ground.slidetime = 1
ground.hittime  = 1
ground.velocity = -2
air.velocity = -1.2,-3
getpower = -40,-12
givepower = 5,3

[State 1505, Override]
type = HitOverride
trigger1 = Time = 0
trigger1 = Var(37) >= 10
attr = SCA, NT, ST, HT, NA, SA, HA,NP,SP,HP
stateno = 1594
time = -1

[State 1505, Override2]
type = HitOverride
trigger1 = Time = 0
trigger1 = Var(37) < 10
attr = SCA, NT, ST, HT, NA, SA, HA,NP,SP,HP
stateno = 1594
time = -1

[State 1505, 1]
type = HitBy
trigger1 = AnimTime > 1
value = SCA, NT, ST, HT, NA, SA, HA, NP, SP, HP
stateno = 1593
ctrl = 0

[State 1002, DestroySelf]
type = DestroySelf
trigger1 = MoveContact


[State 1505, CS]
type = changestate
trigger1 = RootDist Y <= 0
ctrl = 1
value = 1515
;----------------------------------------------------------------
;Helper4 Circula
[Statedef 1515]
type = A
movetype = A
anim = 1515
sprpriority = 3

[State 1515, B2P]
type = BindToParent
trigger1 = Anim = 1515
pos = 0,7
facing = 1

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

[State 1515, AS]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1515, HD]
trigger1 = Time = 0
type = HitDef
attr = A, SP
guardflag = MA
damage = 15,1
animtype = Medium
pausetime = 0,0
sparkxy = 50,-45
sparkno=2
;guard.sparkno= s8105
hitsound = s1,5			;Sound to play on hit
guardsound = s2,0
ground.type = High
ground.slidetime = 1
ground.hittime  = 1
ground.velocity = -2
air.velocity = -1.2,-3
getpower = -40,-12
givepower = 5,3


[State 1002, DestroySelf]
type = DestroySelf
trigger1 = MoveContact


[State 1515, CS]
type = changestate
trigger1 = Time = 298
trigger2 = root,stateno = [3000,3300]
ctrl = 1
value = 1525
;-----------------------------------------------------------------
;Helper4 Se larga
[Statedef 1525]
type = A
movetype = A
anim = 1525
sprpriority = 3

[State 1525, AS]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1525, HD]
trigger1 = Time = 0
type = HitDef
attr = A, SP
guardflag = MA
damage = 15,1
animtype = Medium
pausetime = 0,0
sparkxy = 50,-45
sparkno=2
;guard.sparkno= s8105
hitsound = s1,5			;Sound to play on hit
guardsound = s2,0
ground.type = High
ground.slidetime = 1
ground.hittime  = 1
ground.velocity = -2
air.velocity = -1.2,-3
getpower = -40,-12
givepower = 5,3

[State 1525, VS]
type = VelSet
trigger1 = Time = 0
x = 3.5
y = -1.1


[State 1002, DestroySelf]
type = DestroySelf
trigger1 = MoveContact
trigger2 = Time >= 90

;----------------------------------------------------------------------------------------
;Helper5 Viene
[Statedef 1504]
type = A
movetype = A
anim = 1504
sprpriority = 3

[State 1504, AS]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1504, HD]
trigger1 = Time = 0
type = HitDef
attr = A, SP
guardflag = MA
damage = 15,1
animtype = Medium
pausetime = 0,0
sparkxy = 50,-45
sparkno=2
;guard.sparkno= s8105
hitsound = s1,5			;Sound to play on hit
guardsound = s2,0
ground.type = High
ground.slidetime = 1
ground.hittime  = 1
ground.velocity = -2
air.velocity = -1.2,-3
getpower = -40,-12
givepower = 5,3

[State 1504, VS]
type = VelSet
trigger1 = Time = 0
x = -2.7
y = .1

[State 1504, Override]
type = HitOverride
trigger1 = Time = 0
trigger1 = Var(37) >= 10
attr = SCA, NT, ST, HT, NA, SA, HA,NP,SP,HP
stateno = 1594
time = -1

[State 1504, Override2]
type = HitOverride
trigger1 = Time = 0
trigger1 = Var(37) < 10
attr = SCA, NT, ST, HT, NA, SA, HA,NP,SP,HP
stateno = 1594
time = -1

[State 1504, 1]
type = HitBy
trigger1 = AnimTime > 1
value = SCA, NT, ST, HT, NA, SA, HA, NP, SP, HP
stateno = 1593
ctrl = 0

[State 1002, DestroySelf]
type = DestroySelf
trigger1 = MoveContact


[State 1504, CS]
type = changestate
trigger1 = RootDist X = 0
ctrl = 1
value = 1514
;-------------------------------------------------------------------
;Helper5 Circula
[Statedef 1514]
type = A
movetype = A
anim = 1514
sprpriority = 3

[State 1514, B2P]
type = BindToParent
trigger1 = Anim = 1514
pos = 0,7
facing = 1

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

[State 1514, AS]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1514, HD]
trigger1 = Time = 0
type = HitDef
attr = A, SP
guardflag = MA
damage = 15,1
animtype = Medium
pausetime = 0,0
sparkxy = 50,-45
sparkno=2
;guard.sparkno= s8105
hitsound = s1,5			;Sound to play on hit
guardsound = s2,0
ground.type = High
ground.slidetime = 1
ground.hittime  = 1
ground.velocity = -2
air.velocity = -1.2,-3
getpower = -40,-12
givepower = 5,3


[State 1002, DestroySelf]
type = DestroySelf
trigger1 = MoveContact


[State 1514, CS]
type = changestate
trigger1 = Time = 298
trigger2 = root,stateno = [3000,3300]
ctrl = 1
value = 1524
;------------------------------------------------------------------------------------
;Helper5 Se larga
[Statedef 1524]
type = A
movetype = A
anim = 1524
sprpriority = 3

[State 1524, AS]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1524, HD]
trigger1 = Time = 0
type = HitDef
attr = A, SP
guardflag = MA
damage = 15,1
animtype = Medium
pausetime = 0,0
sparkxy = 50,-45
sparkno=2
;guard.sparkno= s8105
hitsound = s1,5			;Sound to play on hit
guardsound = s2,0
ground.type = High
ground.slidetime = 1
ground.hittime  = 1
ground.velocity = -2
air.velocity = -1.2,-3
getpower = -40,-12
givepower = 5,3

[State 1524, VS]
type = VelSet
trigger1 = Time = 0
x = 3.7
y = -1.37


[State 1002, DestroySelf]
type = DestroySelf
trigger1 = MoveContact
trigger2 = Time >= 90

;------------------------------------------------------------------------------
;Helper6 Viene
[Statedef 1503]
type = A
movetype = A
anim = 1503
sprpriority = 3

[State 1503, AS]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1503, HD]
trigger1 = Time = 0
type = HitDef
attr = A, SP
guardflag = MA
damage = 15,1
animtype = Medium
pausetime = 0,0
sparkxy = 50,-45
sparkno=2
;guard.sparkno= s8105
hitsound = s1,5			;Sound to play on hit
guardsound = s2,0
ground.type = High
ground.slidetime = 1
ground.hittime  = 1
ground.velocity = -2
air.velocity = -1.2,-3
getpower = -40,-12
givepower = 5,3

[State 1503, VS]
type = VelSet
trigger1 = Time = 0
x = -2.7
y = 1.7

[State 1503, Override]
type = HitOverride
trigger1 = Time = 0
trigger1 = Var(37) >= 10
attr = SCA, NT, ST, HT, NA, SA, HA,NP,SP,HP
stateno = 1594
time = -1

[State 1503, Override2]
type = HitOverride
trigger1 = Time = 0
trigger1 = Var(37) < 10
attr = SCA, NT, ST, HT, NA, SA, HA,NP,SP,HP
stateno = 1594
time = -1

[State 1503, 1]
type = HitBy
trigger1 = AnimTime > 1
value = SCA, NT, ST, HT, NA, SA, HA, NP, SP, HP
stateno = 1593
ctrl = 0

[State 1002, DestroySelf]
type = DestroySelf
trigger1 = MoveContact


[State 1503, CS]
type = changestate
trigger1 = time = 20;RootDist X = 0
ctrl = 1
value = 1513
;------------------------------------------------------------------------------
;Helper6 Circula
[Statedef 1513]
type = A
movetype = A
anim = 1513
sprpriority = 3

[State 1513, B2P]
type = BindToParent
trigger1 = Anim = 1513
pos = 0,7
facing = 1

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

[State 1513, AS]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1513, HD]
trigger1 = Time = 0
type = HitDef
attr = A, SP
guardflag = MA
damage = 15,1
animtype = Medium
pausetime = 0,0
sparkxy = 50,-45
sparkno=2
;guard.sparkno= s8105
hitsound = s1,5			;Sound to play on hit
guardsound = s2,0
ground.type = High
ground.slidetime = 1
ground.hittime  = 1
ground.velocity = -2
air.velocity = -1.2,-3
getpower = -40,-12
givepower = 5,3


[State 1002, DestroySelf]
type = DestroySelf
trigger1 = MoveContact


[State 1513, CS]
type = changestate
trigger1 = Time = 298
trigger2 = root,stateno = [3000,3300]
ctrl = 1
value = 1523
;------------------------------------------------------------------------------------
;Helper6 Se larga
[Statedef 1523]
type = A
movetype = A
anim = 1523
sprpriority = 3

[State 1523, AS]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1523, HD]
trigger1 = Time = 0
type = HitDef
attr = A, SP
guardflag = MA
damage = 15,1
animtype = Medium
pausetime = 0,0
sparkxy = 50,-45
sparkno=2
;guard.sparkno= s8105
hitsound = s1,5			;Sound to play on hit
guardsound = s2,0
ground.type = High
ground.slidetime = 1
ground.hittime  = 1
ground.velocity = -2
air.velocity = -1.2,-3
getpower = -40,-12
givepower = 5,3

[State 1523, VS]
type = VelSet
trigger1 = Time = 0
x = -3.6
y = 2.2


[State 1002, DestroySelf]
type = DestroySelf
trigger1 = MoveContact
trigger2 = Time >= 90
;-------------------------------------------------------------------------------------------

;Helper7 Viene
[Statedef 1502]
type = A
movetype = A
anim = 1502
sprpriority = 3

[State 1502, AS]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1502, VS]
type = VelSet
trigger1 = Time = 0
x = -.3
y = -1.5

[State 1502, HD]
trigger1 = Time = 0
type = HitDef
attr = A, SP
guardflag = MA
damage = 15,1
animtype = Medium
pausetime = 0,0
sparkxy = 50,-45
sparkno=2
;guard.sparkno= s8105
hitsound = s1,5			;Sound to play on hit
guardsound = s2,0
ground.type = High
ground.slidetime = 1
ground.hittime  = 1
ground.velocity = -2
air.velocity = -1.2,-3
getpower = -40,-12
givepower = 5,3

[State 1502, Override]
type = HitOverride
trigger1 = Time = 0
trigger1 = Var(37) >= 10
attr = SCA, NT, ST, HT, NA, SA, HA,NP,SP,HP
stateno = 1594
time = -1

[State 1502, Override2]
type = HitOverride
trigger1 = Time = 0
trigger1 = Var(37) < 10
attr = SCA, NT, ST, HT, NA, SA, HA,NP,SP,HP
stateno = 1594
time = -1

[State 1502, 1]
type = HitBy
trigger1 = AnimTime > 1
value = SCA, NT, ST, HT, NA, SA, HA, NP, SP, HP
stateno = 1593
ctrl = 0

[State 1002, DestroySelf]
type = DestroySelf
trigger1 = MoveContact


[State 1502, CS]
type = changestate
trigger1 = RootDist Y >= 0
ctrl = 1
value = 1512
;---------------------------------------------------------------------------------------
;Helper7 Circula
[Statedef 1512]
type = A
movetype = A
anim = 1512
sprpriority = 3

[State 1512, B2P]
type = BindToParent
trigger1 = Anim = 1512
pos = 0,7
facing = 1

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

[State 1512, AS]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1512, HD]
trigger1 = Time = 0
type = HitDef
attr = A, SP
guardflag = MA
damage = 15,1
animtype = Medium
pausetime = 0,0
sparkxy = 50,-45
sparkno=2
;guard.sparkno= s8105
hitsound = s1,5			;Sound to play on hit
guardsound = s2,0
ground.type = High
ground.slidetime = 1
ground.hittime  = 1
ground.velocity = -2
air.velocity = -1.2,-3
getpower = -40,-12
givepower = 5,3


[State 1002, DestroySelf]
type = DestroySelf
trigger1 = MoveContact


[State 1512, CS]
type = changestate
trigger1 = Time = 298
trigger2 = root,stateno = [3000,3300]
ctrl = 1
value = 1522
;---------------------------------------------------------------------------------------
;Helper7 Se larga
[Statedef 1522]
type = A
movetype = A
anim = 1522
sprpriority = 3

[State 1522, AS]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1522, HD]
trigger1 = Time = 0
type = HitDef
attr = A, SP
guardflag = MA
damage = 15,1
animtype = Medium
pausetime = 0,0
sparkxy = 50,-45
sparkno=2
;guard.sparkno= s8105
hitsound = s1,5			;Sound to play on hit
guardsound = s2,0
ground.type = High
ground.slidetime = 1
ground.hittime  = 1
ground.velocity = -2
air.velocity = -1.2,-3
getpower = -40,-12
givepower = 5,3

[State 1522, VS]
type = VelSet
trigger1 = Time = 0
x = -1.3
y = -2.4


[State 1002, DestroySelf]
type = DestroySelf
trigger1 = MoveContact
trigger2 = Time >= 90
=------------------------------------------------------------------------------------------
;Remover 1 - Los copio de Elecman que pa eso es mio xD
[Statedef 1593]
type = A
movetype = A
velset = 0,0
ctrl = 0
anim = 704

[State 1593, SP]
type = sprpriority
trigger1 = Time = 0
value = -4

[State 1593, VS]
Type = Varset
trigger1 = Time = 0
var(37) = 0

[State 1593, Override]
type = HitOverride
trigger1 = Time = 0
attr = SCA, NT, ST, HT, NA, SA, HA,NP,SP,HP
stateno = 1594
time = -1
;-----------------------------------------------------------------------
;Remover 2
[Statedef 1594]
type = A
movetype = A
velset = 0,0
ctrl = 0
anim = 1594

[State 1594, Sound]
type = playsnd
trigger1 = animelem = 1
value = 7777,0

[State 1594 ,7]
type = ChangeState
trigger1 = time = 10
value = 1599

;Remover (y 3)
[Statedef 1599]
type = A
movetype = A
velset = 0,0
ctrl = 0
anim = 706

[State 1599, DS]
type = DestroySelf
trigger1 = Time = 1
;----------------------------------------------------------------------------
; Patadón
[Statedef 1600]
type = A
movetype = A
physics = A
anim = 1600
ctrl = 0

[State 1000, sonido]
type = PlaySnd
trigger1 = AnimElem = 1
value = 24,6

[State 83, sonido]
type = PlaySnd
trigger1 = AnimElem = 1
value = S0,5

[State 83, 1]
type = VelAdd
trigger1 = time <= 10
x = 1.7
y = 1.4

[State 83, AftImg]
type = AfterImage
trigger1 = time = 1
time = 12
FrameGap = 2
length = 10
PalBright = 0,0,0
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = 1,1,1
Trans = Add1

[State 83, 1]
type = Hitdef
trigger1 = time = 1
trigger2 = time = 5
attr = S, NA
damage = 70
animtype = Medium
guardflag = MAF
sparkno=2
;guard.sparkno=S8105
sparkxy=-15,-25
hitsound=s1,3
guardsound=s2,0
pausetime = 3,1
ground.hittime = 12
ground.type = High
ground.slidetime = 40
ground.velocity X = -2
air.velocity = -3, -3
getpower = 30,25
givepower  = 20,18
fall = 1


[State 83, 3]
type = changestate
trigger1 = animtime = 0
ctrl = 1
value = 50

;---------------------------------------------------------------------------
;Stand Slide
[Statedef 1610]
type    = C
movetype= A
physics = N
juggle  = 4
ctrl = 0
anim = 1610
poweradd = 25

[State 0, VelAdd]
type = Velset
triggerall = prevstateno != 100
trigger1 = time = 0
x = 0

[State 0, VelSet]
type = VelSet
trigger1 = time=8
x = 11
ignorehitpause = 1

[State 1800, VelAdd]
type = VelAdd
trigger1 = time > 8
x = -.3

[State 1800, VelSet]
type = VelSet
trigger1 = time>=36
x = 0

[State 1800, Explod]
type = Explod
triggerall = time = [7,28]
trigger1 = (time%3)=1
anim = F120
ID = 8020
pos = -20,0
postype = p1  ;p2,front,back,left,right
bindtime = 1
vel = -2,0
accel = -.5,0
removetime = -2
supermovetime=9999
pausemovetime=9999
scale = const(size.xscale),const(size.yscale)
sprpriority = -1
ownpal = 1
removeongethit = 0
ignorehitpause=0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S0,1
volume = 0
channel = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = 24,2
volume = 0
channel = 0

[State 255, hit]
type=hitdef
trigger1=time = 0
attr=C,SA
damage=60,10
animtype=Heavy
guardflag=MAL
hitflag=MAF
priority=4,Hit
pausetime=13,14
sparkno=2
;guard.sparkno=S8105
sparkxy=-15,-5
hitsound=s1,3
guardsound=s2,0
ground.type=Trip
ground.slidetime=16
ground.hittime=16
ground.velocity=-3.33,-3.85
air.type=Low
air.hittime=12
air.velocity=-3.33,-3.85
air.cornerpush.veloff=0
down.velocity=-4,-4
fall=1


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

;---------------------------------------------------------------------------
; Air Man Typhoon
[Statedef 1700]
type = S
movetype = A
physics = S
;anim = 1700
velset = 0,0
poweradd = 100
ctrl = 0

[State 1000, sonido]
type = PlaySnd
trigger1 = !time
value = 24,6

[State 0, Explod]
type = Explod
trigger1 = !time
anim = 7023
ID = 7023
pos = -20,0
postype = p1  ;p2,front,back,left,right
bindtime = 1
removetime = -2
supermovetime = 9999
pausemovetime = 9999
scale = .5,.5
sprpriority = -1
ownpal = 1
removeongethit = 0

[State 1700, ChangeAnim]
type = ChangeAnim
trigger1 = !Time && Anim != StateNo
value = StateNo


[State 1700, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2, = 0
value = 10,1
channel = 0

[State 1700, Helper]
type = Helper
trigger1 = time = 17
trigger2 = time = 23
stateno = 1701
postype = p1
pos = 0,20
bindtime = 1
ownpal = 1
name = "Typhoon"
id = 1701

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

;---------------------------------------------------------------------------
; Typhoon X Projectile
[Statedef 1701]
type = A
movetype = A
physics = N
sprpriority = 2
ctrl = 0

[State 1701, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

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



[State 1701, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0

[State 1701, PosAdd]
type = PosAdd
trigger1 = !(Time%7)
x = 64


[State 1701, ChangeAnim]
type = ChangeAnim
trigger1 = !(Time%7)
value = 1701

[State 1701, Explod]
type = Explod
trigger1 = !(Time%7)
anim = 1701
sprpriority = 2
postype = p1
pos = 0,0
bindtime = 1
id = 1701
name = "Typhoon"

[State 1701, HitDef]
type = HitDef
trigger1 = p2statetype != L
trigger1 = !time
attr = S, SP
animtype = Hard
damage = 50,0
sprpriority = 2
hitflag = MAF
guardflag = MA
pausetime = 2,2
sparkxy = 50,-45
sparkno=2
;guard.sparkno= s8105
hitsound = s1,5			;Sound to play on hit
guardsound = s2,0
ground.type = Low
ground.slidetime = 24
ground.hittime = 21
ground.velocity = -24
guard.slidetime = 12
guard.hittime = 12
air.velocity = -4,-5
airguard.velocity = -6
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
air.fall = 1
fall.recovertime = 13

[State 1701, HitDef]
type = HitDef
trigger1 = p2statetype = L
trigger1 = !time
attr = S, SP
animtype = Hard
damage = 50,0
sprpriority = 2
hitflag = MAF
guardflag = MA
pausetime = 2,9
sparkxy = 50,-45
sparkno=2
;guard.sparkno= s8105
hitsound = s1,5			;Sound to play on hit
guardsound = s2,0
ground.type = Low
down.velocity = -8
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State 1701, HitDef]
type = HitDef
trigger1 = p2statetype = L
trigger1 = !time
attr = S, SP
animtype = Hard
damage = 50,0
sprpriority = 2
hitflag = MAF
guardflag = MA
pausetime = 2,9
sparkxy = 50,-45
sparkno= -1
;guard.sparkno= s8105
hitsound = s1,5			;Sound to play on hit
guardsound = s2,0
ground.type = Low
down.velocity = -8
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State 1701, ParentVarAdd]
type = ParentVarAdd
trigger1 = HitCount = 1
var(9) = 1
persistent = 0

[State 1701, ParentVarAdd]
type = ParentVarAdd
trigger1 = HitCount = 2
var(9) = 1
persistent = 0

[State 1701, ParentVarAdd]
type = ParentVarAdd
trigger1 = HitCount = 3
var(9) = 1
persistent = 0

[State 1701, ParentVarAdd]
type = ParentVarAdd
trigger1 = HitCount = 4
var(9) = 1
persistent = 0

[State 1701, ParentVarAdd]
type = ParentVarAdd
trigger1 = HitCount = 5
var(9) = 1
persistent = 0

[State 1701, VarSet]
type = VarSet
trigger1 = MoveHit
var(59) = 15
persistent = 0
ignorehitpause = 1

[State 1701, VarAdd]
type = VarAdd
trigger1 = var(59) > 0
var(59) = -1
ignorehitpause = 1

[State 1701, ParentVarSet]
type = ParentVarSet
trigger1 = Random < 100
trigger1 = var(59)
var(39) = 1
persistent = 0
ignorehitpause = 1

[State 1701, DestroySelf]
type = DestroySelf
trigger1 = Time = 49

;---------------------------------------------------------------------------
;Flash Kick
[Statedef 1850]
type = A
movetype = A
physics = A
anim = 1850
velset = 2,-11
poweradd = 100
ctrl = 0

[State 1850, Explod]
type = Explod
trigger1 = time = 0
anim = 1701
ID = 1701
pos = 0,0
vel = 2,0
postype = p1  ;p2,front,back,left,right
bindtime = 1
removetime = -2
scale = 1,1
sprpriority = 0
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 0

[State 1850, HitDef]
type = HitDef
trigger1 = !time
attr = S, SA
animtype = Hard
damage = 50,0
sprpriority = 2
hitflag = MA
guardflag = MA
pausetime = 2,9
sparkxy = 10,-45
sparkno=2
;guard.sparkno= s8105
hitsound = s1,4			;Sound to play on hit
guardsound = s2,0
ground.type = Low
ground.slidetime = 17
ground.hittime = 21
ground.velocity = -2,-11
guard.slidetime = 12
guard.hittime = 12
air.velocity = -4,-5
airguard.velocity = -2,-11
fall = 1
air.fall = 1
fall.recovertime = 13

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

;---------------------------------------------------------------------------
; Hyper 1 - Typhoon Spin
[Statedef 3000]
type    = S
movetype= A
physics = S
juggle  = 0
poweradd= 0
ctrl = 0
velset = 0,0
anim = 3000

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

[State 0, VarSet]
type = VarSet
trigger1 = time = 0
v = 45
value = 1

[State 0, AfterImage]
type = AfterImage
trigger1 = animelem = 2
time = 2
length = 15
framegap = 4
trans = add1
PalContrast = 150,50,70

[State 0, NotHitBy]
type = NotHitBy
triggerall = anim = 3000
trigger1 = time <= 55
value = SCA
time = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 50
value = 24,4
channel = 5

[State 0, SuperPause]
type = SuperPause
triggerall = anim = 3000
trigger1 = time = 1
time = 50
anim = -1
;sound = s3,0
pos = 9999999999999999,9999999999
movetime = 50
darken = 1
p2defmul = 1
poweradd = -1000
unhittable = 1

[State 3100, assertspecial]
type = assertspecial
trigger1 = 1
flag = noBG
flag2 = noFG
ignorehitpause = 1

[State 3100, Sound]
type = PlaySnd
trigger1 = Time = 12
value = s7001,1

[State 3100, Hyper Explode]
type = Explod
trigger1 = time = 0
anim = F100
ID = 4530
postype = p1
bindtime = -1
pos = 10,-45
ownpal = 1
sprpriority = 5
scale = 2,2
supermovetime = 99999999
pausemovetime = 99999999

[State 3100, Ground Flash]
type = Explod
trigger1 = time = 35
anim = F6666
ID = 4540
bindtime = -1
postype = P1
pos = -120,0
ownpal = 1
removetime = -2
sprpriority = 5
scale = 2,2
removeongethit = 1
supermovetime = 99999999
pausemovetime = 99999999

[State 3000, RRM HyperBg Screen Pack High Res]
type = explod
trigger1 = time = 40
anim = F750
id = 750
postype=left
pos = 0,0
scale = .5,.5
sprpriority = -2
bindtime = -1
removetime = -1
removeongethit = 1
supermovetime = 99999999
pausemovetime = 99999999

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

[State 205, hit]
type=hitdef
triggerall = time < 98
trigger1=(time%3)=1
attr=S,HA
damage=21,2
animtype=Heavy
guardflag=MA
hitflag=MAF
priority=3,Hit
pausetime=3,3
sparkno=3
;guard.sparkno=S8105
sparkxy=-10,ceil((enemynear,const(size.mid.pos.y))+(p2dist Y))
hitsound=s1,6
guardsound=s2,0
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=ifelse(p2bodydist X >= 30, 3, -3),-4
air.type=Low
air.hittime=18
air.velocity=ifelse(p2bodydist X >= 30, 3, -3),-4
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
yaccel=.5
envshake.time = 3
envshake.ampl = 2
getpower=0

[State 205, hit]
type=hitdef
trigger1 = time = 99
attr=S,HA
damage=25,2
animtype=Heavy
guardflag=MA
hitflag=MAF
priority=3,Hit
pausetime=12,12
sparkno=3
;guard.sparkno=S8105
sparkxy=-10,ceil((enemynear,const(size.mid.pos.y))+(p2dist Y))
hitsound=s1,6
guardsound=s2,0
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=-8,-12
air.type=Low
air.hittime=18
air.velocity=-8,-12
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
yaccel=.5
fall = 1
envshake.time = 12
envshake.ampl = 2
getpower=0

[State 0, Helper]
type = Helper
triggerall = numhelper(3000)=0&&anim=3000
trigger1 = AnimElem=9
helpertype = normal ;player
name = "Typhoon"
ID = 3000
pos = 0,-20
stateno = 3090
postype = p1    ;p2,front,back,left,right
keyctrl = 0
ownpal = 1

[State 0, Helper]
type = Helper
triggerall = anim = 3000
trigger1 = AnimElem=10
helpertype = normal ;player
name = "Mini Typhoon"
ID = 3095
stateno = 3095
pos = 0,-80
postype = p1
keyctrl = 0
ownpal = 0

[State 0, Helper]
type = Helper
triggerall = anim = 3000
trigger1 = AnimElem=11
helpertype = normal ;player
name = "Mini Typhoon"
ID = 3095
stateno = 3095
pos = 0,-160
postype = p1
keyctrl = 0
ownpal = 0

[State 0, Helper]
type = Helper
triggerall = anim = 3000
trigger1 = AnimElem=12
helpertype = normal ;player
name = "Mini Typhoon"
ID = 3095
stateno = 3095
pos = 0,-220
postype = p1
keyctrl = 0
ownpal = 0

[State 0, Helper]
type = Helper
triggerall = anim = 3000
trigger1 = AnimElem=13
helpertype = normal ;player
name = "Mini Typhoon"
ID = 3095
stateno = 3095
pos = 0,-300
postype = p1
keyctrl = 0
ownpal = 0

[State 0, Helper]
type = Helper
triggerall = anim = 3000
trigger1 = AnimElem=14
helpertype = normal ;player
name = "Mini Typhoon"
ID = 3095
stateno = 3095
pos = 0,-380
postype = p1
keyctrl = 0
ownpal = 0

[State 0, PlayerPush]
type = PlayerPush
trigger1 = Anim = 3000
trigger1 = animelemtime(9)>=0
value = 0

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = anim != 3001
trigger1 = time >= 100
value = 3001

[State 220, 5]
type = ChangeState
triggerall = anim = 3001
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Hyper 2 - Typhoon Spin (No ar)
[Statedef 3002]
type    = A
movetype= A
physics = S
juggle  = 0
poweradd= 0
ctrl = 0
velset = 0,0
anim = 3002

[State 3100, Sound]
type = PlaySnd
trigger1 = Time = 12
value = s7001,1

[State 3100, Hyper Explode]
type = Explod
trigger1 = time = 0
anim = F100
ID = 4530
postype = p1
bindtime = -1
pos = 10,-45
ownpal = 1
sprpriority = 5
scale = 2,2
supermovetime = 99999999
pausemovetime = 99999999

[State 0, VarSet]
type = VarSet
trigger1 = time = 0
v = 45   ;fv = 10
value = 1

[State 0, AfterImage]
type = AfterImage
trigger1 = animelem = 2
time = 2
length = 15
framegap = 4
trans = add1 ;"none","add1","sub"
PalContrast = 150,50,70

[State 0, NotHitBy]
type = NotHitBy
triggerall = anim = 3002
trigger1 = time <= 55
value = SCA
time = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 50
value = 24,4
channel = 5

[State 0, SuperPause]
type = SuperPause
triggerall = anim = 3002
trigger1 = time = 1
time = 50
anim = -1
;sound = s3,0
pos = 9999999999999999,9999999999
movetime = 50
darken = 1
p2defmul = 1
poweradd = -1000
unhittable = 1

[State 3000, RRM HyperBg Screen Pack High Res]
type = explod
trigger1 = time = 0
anim = 9998
id = 750
postype=left
pos = 0,0
scale = 1,1
sprpriority = -3
bindtime = -1
removetime = -1
removeongethit = 1
supermovetime = 99999999
pausemovetime = 99999999

[State 3000, RRM HyperBg Screen Pack High Res]
type = explod
trigger1 = time = 40
anim = F750
id = 750
postype=left
pos = 0,0
scale = .5,.5
sprpriority = -2
bindtime = -1
removetime = -1
removeongethit = 1
supermovetime = 99999999
pausemovetime = 99999999

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

[State 1400, Quieto parao]
type = VelSet
trigger1 = Time = 0
y = 0
x = 0

[State 205, hit]
type=hitdef
triggerall = time < 98
trigger1=(time%3)=1
attr=S,HA
damage=21,2
animtype=Heavy
guardflag=MA
hitflag=MAF
priority=3,Hit
pausetime=3,3
sparkno=3
;guard.sparkno=S8105
sparkxy=-10,ceil((enemynear,const(size.mid.pos.y))+(p2dist Y))
hitsound=s1,6
guardsound=s2,0
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=ifelse(p2bodydist X >= 30, 3, -3),-4
air.type=Low
air.hittime=18
air.velocity=ifelse(p2bodydist X >= 30, 3, -3),-4
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
yaccel=.5
envshake.time = 3
envshake.ampl = 2
getpower=0

[State 205, hit]
type=hitdef
trigger1 = time = 99
attr=S,HA
damage=25,2
animtype=Heavy
guardflag=MA
hitflag=MAF
priority=3,Hit
pausetime=12,12
sparkno=3
;guard.sparkno=S8105
sparkxy=-10,ceil((enemynear,const(size.mid.pos.y))+(p2dist Y))
hitsound=s1,6
guardsound=s2,0
ground.type=High
ground.slidetime=18
ground.hittime=18
ground.velocity=-8,-12
air.type=Low
air.hittime=18
air.velocity=-8,-12
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
yaccel=.5
fall = 1
envshake.time = 12
envshake.ampl = 2
getpower=0

[State 0, Helper2]
type = Helper
triggerall = numhelper(3092)=0&&anim=3002
trigger1 = AnimElem=9
helpertype = normal ;player
name = "Typhoon2"
ID = 3092
pos = 0,60
stateno = 3092
postype = p1    ;p2,front,back,left,right
keyctrl = 0
ownpal = 1

[State 0, Helper2]
type = Helper
triggerall = anim = 3002
trigger1 = AnimElem=10
helpertype = normal ;player
name = "Mini Typhoon"
ID = 3097
stateno = 3097
pos = 0,0
postype = p1
keyctrl = 0
ownpal = 0

[State 0, Helper2]
type = Helper
triggerall = anim = 3002
trigger1 = AnimElem=11
helpertype = normal ;player
name = "Mini Typhoon"
ID = 3097
stateno = 3097
pos = 0,-80
postype = p1
keyctrl = 0
ownpal = 0

[State 0, Helper2]
type = Helper
triggerall = anim = 3002
trigger1 = AnimElem=12
helpertype = normal ;player
name = "Mini Typhoon"
ID = 3097
stateno = 3097
pos = 0,-140
postype = p1
keyctrl = 0
ownpal = 0

[State 0, Helper]
type = Helper
triggerall = anim = 3002
trigger1 = AnimElem=13
helpertype = normal ;player
name = "Mini Typhoon"
ID = 3097
stateno = 3097
pos = 0,-220
postype = p1
keyctrl = 0
ownpal = 0

[State 0, Helper]
type = Helper
triggerall = anim = 3002
trigger1 = AnimElem=14
helpertype = normal ;player
name = "Mini Typhoon"
ID = 3097
stateno = 3097
pos = 0,-300
postype = p1
keyctrl = 0
ownpal = 0

[State 0, PlayerPush]
type = PlayerPush
trigger1 = Anim = 3002
trigger1 = animelemtime(9)>=0
value = 0

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = anim != 3003
trigger1 = time >= 100
value = 3003

[State 3002, 5]
type = ChangeState
triggerall = anim = 3003
trigger1 = AnimTime = 0
value = 50
ctrl = 1
;--------------------------------------------------------------------------------------
;Hyper 3 - Air Man no Furacão
[Statedef 3100]
type = S
movetype = A
physics = S
anim = 3100
juggle = 1
velset = 0
ctrl = 0

[State 0, SuperPause]
type = SuperPause
trigger1 = animelem = 1
time = 45
movetime = 45
anim = -1
;sound = s3,0
pos = 0,ceil(-50*const(size.yscale))
darken = 1
p2defmul = 1
poweradd = -1000
ignorehitpause = 1

[State 3100, assertspecial]
type = assertspecial
trigger1 = 1
flag = noBG
flag2 = noFG
ignorehitpause = 1

[State 3100, Sound]
type = PlaySnd
trigger1 = Time = 12
value = s7001,1

[State 3100, Hyper Explode]
type = Explod
trigger1 = time = 0
anim = F100
ID = 4530
postype = p1
bindtime = -1
pos = 10,-45
ownpal = 1
sprpriority = 5
scale = 2,2
supermovetime = 99999999
pausemovetime = 99999999

[State 3100, Ground Flash]
type = Explod
trigger1 = time = 45
anim = F6666
ID = 4540
bindtime = -1
postype = P1
pos = -120,0
ownpal = 1
removetime = -2
sprpriority = 5
scale = 2,2
removeongethit = 1
supermovetime = 99999999
pausemovetime = 99999999

[State 3000, RRM HyperBg Screen Pack High Res]
type = explod
trigger1 = time = 45
anim = F750
id = 750
postype=left
pos = 0,0
scale = .5,.5
sprpriority = -2
bindtime = -1
removetime = -1
removeongethit = 1
supermovetime = 99999999
pausemovetime = 99999999

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

[State 1000, sonido]
type = PlaySnd
trigger1 = time = 7
value = 24,6


[State 1000, sonido]
type = PlaySnd
trigger1 = time = 1
value = 3,3


[State 3100, CS]
type = ChangeState
trigger1 = Time = 55
value = 3101
ctrl = 1

;------------------------------------------------------
;Furacão andando
[Statedef 3101]
type = S
movetype = A
physics = N
anim = 3101
;velset = 4,0
ctrl = 0

[State 3000, joystick]
type = explod
trigger1 = time = 1
anim = 3102
postype = back
sprpriority = 10
supermovetime = -1
removetime = 135
pos = 160,70
bindtime = -1
removeongethit = 1
ignorehitpause = 1
scale = .5,.5

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


[State 3101, Sound]
type = playsnd
trigger1 = Time = 1
value = 50,0


[State 3101, HD]
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
trigger5 = animelem = 5
trigger6 = animelem = 6
trigger7 = animelem = 7
trigger8 = animelem = 8
trigger9 = animelem = 9
trigger10 = animelem = 10
trigger11 = animelem = 11
trigger12 = animelem = 12
trigger13 = animelem = 13
trigger14 = animelem = 14
trigger15 = animelem = 15
trigger16 = animelem = 16
trigger17 = animelem = 17
trigger18 = animelem = 18
trigger19 = animelem = 19
trigger20 = animelem = 20
trigger21 = animelem = 21
trigger22 = animelem = 22
trigger23 = animelem = 23
trigger24 = animelem = 24
trigger25 = animelem = 25
trigger26 = animelem = 26
trigger27 = animelem = 27
trigger28 = animelem = 28
trigger29 = animelem = 29
trigger30 = animelem = 30
trigger31 = animelem = 31
trigger32 = animelem = 32
trigger33 = animelem = 33
trigger34 = animelem = 34
trigger35 = animelem = 35
trigger36 = animelem = 36
trigger37 = animelem = 37
trigger38 = animelem = 38
trigger39 = animelem = 39
trigger40 = animelem = 40
trigger41 = animelem = 41
trigger42 = animelem = 42
trigger43 = animelem = 43
trigger44 = animelem = 44
trigger45 = animelem = 45
type = HitDef
attr = A, SP
animtype = up
guardflag = M
hitflag = MAFD
sparkxy=-10,ceil((enemynear,const(size.mid.pos.y))+(p2dist Y))
damage = 12,1
pausetime = 0,0
sparkno=3
;guard.sparkno=S8105
sparkxy= 0,0
hitsound=s1,6
guardsound=s2,0
ground.type = High
ground.slidetime = 14
ground.hittime  = 16
ground.velocity = 0,-3
air.velocity = -3,-3

[State 3101, VelAdd]
type = VelAdd
triggerall = Vel X >= -2
trigger1 = command = "holdback"
x = -0.2

[State 3101, VelAdd]
type = VelAdd
triggerall = Vel X <= 2.5
trigger1 = command = "holdfwd"
x = 0.2

[State 3101, CS]
type = ChangeState
trigger1 = AnimTime = 0
trigger2 = Time >= 148
value = 0
ctrl = 1
;-----------------------------------------------------------------
;Hyper 4 - Parte A
[Statedef 3200]
type     = S
movetype = A
physics  = S
juggle   = 0
velset   = 0,0
anim     = 3200
ctrl     = 0
sprpriority = 2

[State -2, 0]
type = varset
trigger1 = fvar(1) != 1
fvar(1) = .85
ignorehitpause = 1

[State 0, SuperPause]
type = SuperPause
trigger1 = time = 1
time = 45
movetime = 45
anim = -1
sound = s24,2
pos = 0,ceil(-50*const(size.yscale))
darken = 1
p2defmul = 1
poweradd = -1000
ignorehitpause = 1

[State 3100, assertspecial]
type = assertspecial
trigger1 = 1
flag = noBG
flag2 = noFG
ignorehitpause = 1

[State 3100, Sound]
type = PlaySnd
trigger1 = Time = 12
value = s7001,1

[State 3100, Hyper Explode]
type = Explod
trigger1 = time = 0
anim = F100
ID = 4530
postype = p1
bindtime = -1
pos = 10,-45
ownpal = 1
sprpriority = 5
scale = 2,2
supermovetime = 99999999
pausemovetime = 99999999

[State 3100, Ground Flash]
type = Explod
trigger1 = time = 35
anim = F6666
ID = 4540
bindtime = -1
postype = P1
pos = -120,0
ownpal = 1
removetime = -2
sprpriority = 5
scale = 2,2
removeongethit = 1
supermovetime = 99999999
pausemovetime = 99999999

[State 3000, RRM HyperBg Screen Pack High Res]
type = explod
trigger1 = time = 40
anim = F750
id = 750
postype=left
pos = 0,0
scale = .5,.5
sprpriority = -2
bindtime = -1
removetime = -1
removeongethit = 1
supermovetime = 99999999
pausemovetime = 99999999

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


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

[State 3200, 6]
type = NotHitBy
trigger1 = AnimElemtime(1) >= 1 && AnimElemTime(3) < 0
value = SCA

[State 3200, 7]
type = HitBy
trigger1 = AnimElemTime(3) >= 2 && AnimElemTime(28) < 0
value = SCA,HA

[State 3200, 9]
type = PlayerPush
trigger1 = AnimElemTime(3) >= 2 && AnimElemTime(30) < 0
value = 0
ignorehitpause = 1


[State 3200, 19]
type = Playsnd
trigger1 = AnimElemTime(3) = 2
value = s5,3
channel = 3

[State 3200, 10]
type = Projectile
trigger1 = AnimElemtime(3) = 2
attr = S,HA
animtype  = up
getpower = 0
givepower = 0
damage  = ceil(25*fvar(1)),23
priority = 7
offset = 0,0
velocity = 0,0
accel = 0,0
projID = 3202
projanim = 3202
projhitanim = -1
projshadow = 0,0,0
projhits = 10
projpriority  = 30
projsprpriority = 4
projremove = 0
projremovetime = 33
projedgebound = 40
projstagebound = 40
projheightbound = -240,1
projmisstime = 2
hitflag = MAFP
guardflag = MA
pausetime = 0,30
sparkxy = ceil(-8*const(size.xscale)),ceil(-46*const(size.yscale))
sparkno=3
;guard.sparkno=S8105
hitsound=s1,6
guardsound=s2,0
ground.type = High
ground.slidetime = 35
ground.hittime  = 35
air.hittime = 35
guard.hittime = 30
guard.ctrltime = 30
ground.velocity = -1,-6.5
air.velocity = -1,-6.5
air.juggle = 1
fall.xvelocity = -8
fall.yvelocity = -8
fall = 1
fall.recover = 0
fall.recovertime = 0
envshake.time = 18
envshake.ampl = 12
envshake.freq = 125

[State 3200, 14]
type = VelSet
trigger1 = AnimElemTime(29) = 0
x = 0
y = -18

[State 3200, 15]
type = StateTypeSet
trigger1 = AnimElemTime(29) = 0
StateType = A
physics = N

[State 3200, 16]
type = ScreenBound
trigger1 = AnimElemTime(29) >= 0
value = 0

[State 3200, 17]
type = VelAdd
trigger1 = AnimElemTime(29) = 0
y = -5

[State 3200, 18]
type = explod
trigger1 = AnimElemTime(28) = 0
anim = 7022
id = 7022
postype = p1
pos = ceil(-8*const(size.xscale)),0
sprpriority = 3
ownpal = 1
bindtime = 1
persistent = 0
removeongethit = 1
scale = .77*const(size.xscale),.77*const(size.yscale)

[State 3200, 19]
type = Playsnd
trigger1 = AnimElemTime(28) = 0
value = s100,4
channel = 3

[State 3200, 20]
type = NotHitBy
trigger1 = AnimElemTime(29) >= 0 && AnimElemTime(30) < 10
value = SCA

[State 3200, 21]
type = ChangeState
trigger1 = AnimElemTime(30) = 10
value = 3201
ctrl = 0
;--------------------------------------------------------------------
;Hyper 4 - Parte B
[Statedef 3201]
type     = A
movetype = A
physics  = A
juggle   = 0
velset   = 0,0
anim     = 3201
ctrl     = 0
sprpriority = 1

[State 3201, 1]
type = Velset
trigger1 = AnimElemTime(1) >= 0 && AnimElemTime(2) < 0
y = 23

[State 3201, 2]
type = VelAdd
trigger1 = AnimElemTime(1) >= 0 && AnimElemTime(2) < 0
y = 20


[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 20
value = 24,12
channel = 5


[State 3201, 4]
type = helper
helpertype = Normal
trigger1 = AnimElem = 2
Persistent = 0
stateno = 3202
ID = 3202
pos = ceil(7*const(size.xscale)),ceil(-27*const(size.yscale))
postype = p1
keyctrl = 0
ownpal = 1


[State 3201, 6]
type = NotHitBy
trigger1 = AnimElemTime(1) >= 0 && AnimElemTime(5) < 0
value = SCA


[State 3201, 7]
type = VelMul
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(3) < 0
y = .1

[State 3201, 8]
type = Velset
trigger1 = AnimElem = 4
x = -5.5
y = -6.5


[State 3201, 9]
type = VelMul
trigger1 = AnimElemTime(4) < 0
x = .87

[State 3201, 10]
type = VarSet
trigger1 = !time
var(5) = 1
ignorehitpause = 1

;---------------------------------------------------------------------------
; Hyper 4 - Parte C
[Statedef 3202]
type = A
movetype= A
physics = N
velset = 0,9.5
ctrl = 0
anim = 3203
sprpriority = 4

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

[State 3202, 2]
type = VelAdd
trigger1 = 1
y = .75

[State 3202, 3]
type = explod
trigger1 = !Time
anim = 3204
id = 3204
postype = p1
pos = 0,0
sprpriority = 4
ontop = 1
ownpal = 1
bindtime = -1
persistent = 0
removeongethit = 0
scale = 1*const(size.xscale),1*const(size.yscale)

[State 3202, 4]
type = hitdef
trigger1 = !time
attr = A,HP
animtype  = hard
getpower = 0,0
givepower = 0,0
damage = ceil(90*root,fvar(1)),20
priority = 7,hit
hitflag = MAFDP
guardflag = HA
pausetime = 0,35
sparkno=3
;guard.sparkno=S8105
hitsound=s1,6
guardsound=s2,0
sparkxy = 0,0
ground.type = High
ground.slidetime = 60
ground.hittime  = 60
air.hittime = 60
guard.hittime = 55
guard.ctrltime = 55
ground.velocity = -2,7.5
air.velocity = -2,6.5
yaccel = .85
air.juggle = 1
fall.xvelocity = -8
fall.yvelocity = -3.5
fall = 1
fall.recover = 0
fall.recovertime = 0
envshake.time = 18
envshake.ampl = 12
envshake.freq = 120

[State 3202, Counter_2]
type = ParentVarSet
triggerall = NumTarget
trigger1 = MoveHit = 1 && NumEnemy
var(17) = Target,ID
ignorehitpause = 1
persistent = 1

[State 3202, 8]
type = ChangeState
triggerall = isHelper
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 3203
;--------------------------------------------
;Hyper 4 - Final
[Statedef 3203]
type = S
movetype= I
physics = N
ctrl = 0
anim = 3205
velset = 0,0
sprpriority = 4


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

[State 3203, 3]
type = EnvShake
trigger1 = !time
time = 25

[State 3203, 4]
type = DestroySelf
triggerall = isHelper
trigger1 = Animtime = 0
;--------------------------------------------
;Power Set # 4
[Statedef 1350]
type = S
ctrl = 0
anim = 3300
velset = 0,0
movetype = I
physics = S

[State 1000, sonido]
type = PlaySnd
trigger1 = AnimElem = 11
trigger2 = AnimElem = 15
trigger3 = AnimElem = 19
trigger4 = AnimElem = 23
value = 72,0

[State 3300,3]
type = helper
trigger1 = animelem = 3
helpertype = normal
ID = 1351
pos = -30, -60
postype = back
stateno = 1351
helpertype = normal
name = "Tornadoman"
ownpal = 1
facing = 1
keyctrl = 0

[State 3300, 1]
type = PlaySnd
trigger1 = animelem = 3
value = 3, 1

[State 3300,3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Tornado Man (Aparecendo)
[Statedef 1351]
type    = S
movetype= A
physics = N
juggle  = 1
velset = 10,4
poweradd = 0
anim = 3301
ctrl = 0
sprpriority = 100

[State 3301, 1]
type = HitOverride
trigger1 = 1
attr = SCA, AA, AT, AP
stateno = 1354
time = -1
forceair = 1

[State 0, VelAdd]
type = VelAdd
trigger1 = 1
y = 0.25

[State 3301,3]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 1352
;---------------------------------------------------------------------------
;Tornado Man atacando
[Statedef 1352]
type    = S
movetype= A
physics = N
juggle  = 1
velset = 0,0
poweradd = 0
anim = 3302
poweradd = 0
sprpriority = 2

[state 3302,4]
type = posset
trigger1 = time = 1
y = 0

[State 3302, 5]
type = HitOverride
trigger1 = 1
attr = SCA, AA, AT, AP
stateno = 3304
time = -1
forceair = 1


[State 3302, HD]
trigger1 = AnimElem = 3
trigger2 = AnimElem = 5
trigger3 = AnimElem = 7
type = Projectile
attr = S, SP
ignorehitpause = 1
projanim = 3305
offset = 0,0
velocity = 6
damage = 30,1
animtype = Hard
guardflag = MA
pausetime = 0,0
sparkxy = 50,-45
sparkno=3
;guard.sparkno= s8105
hitsound = s1,5			;Sound to play on hit
guardsound = s2,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 6
ground.velocity = -2
air.velocity = -1.5,-3
ownpal=1

[State 3302, 2]
trigger1 = AnimElem = 3
trigger2 = AnimElem = 5
trigger3 = AnimElem = 7
type = Projectile
attr = S, SP
ignorehitpause = 1
projanim = 3305
ProjID = 3305
offset = 0,0
velocity = 6,-6
damage = 30,1
animtype = Hard
guardflag = MA
pausetime = 0,0
sparkxy = 50,-45
sparkno=3
;guard.sparkno= s8105
hitsound = s1,5			;Sound to play on hit
guardsound = s2,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 6
ground.velocity = -2
air.velocity = -1.5,-3
ownpal=1

[State 1702,13]
type = ChangeState
trigger1 = AnimTime = 0
value = 1353
;---------------------------------------------------------------------------
; Tornado Man (Saindo)
[Statedef 1353]
type    = S
movetype= A
physics = N
juggle  = 1
anim = 3303
ctrl = 0
sprpriority = 100

[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 2
x = -10
y = -6

[state 1703,1]
type = NotHitBy
trigger1 = Time >= 0
value = SCA, AA, AP, AT, NA, NP, NT, SA, SP, ST, HA, HP, HT
time = 2
ignorehitpause = 1

[State 0, VelAdd]
type = VelAdd
trigger1 = 1
y = 0.25

[State 1703,4]
type = Destroyself
trigger1 = time = 22
;---------------------------------------------------------------------------
; Tornado Man (Apanhando)
[Statedef 1354]
type    = S
movetype= A
physics = N
juggle  = 1
velset = -10,-6
poweradd = 0
anim = 3304
ctrl = 0
sprpriority = 100

[state 3304,1]
type = nothitby
trigger1 = Time >= 0
value = SCA, AA, AP, AT, NA, NP, NT, SA, SP, ST, HA, HP, HT
time = 2
ignorehitpause = 1


[State 3304, VelAdd]
type = VelAdd
trigger1 = 1
y = 0.25

[State 3304, DestroySelf]
type = DestroySelf
trigger1 = BackEdgeDist < -25


;==========<ZERO COUNTER>==========
[Statedef 9750]
type=A
physics=N
movetype=I
anim=8070
ctrl=0
velset=0,0
poweradd=0
sprpriority=4

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


[State 0, PalFX]
type = PalFX
trigger1 = 1
time = 1
add = 0-(time*20),0-(time*20),0-(time*20)
;mul = 256,256,256
;sinadd = 0,0,0,10
invertall = 0
color = 256
;ignorehitpause =
;persistent =

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time >=15
trigger2 = parent,movetype = H
;ignorehitpause =
;persistent =

;========================<FIRE>=============================
[Statedef 9995]
physics=N
velset=0,0
anim=9741
sprpriority=4

[State 1195, assert]
type=assertspecial
trigger1= 1
flag=noshadow
ignorehitpause=1

[State 1195, flames]
type=explod
trigger1= 1
anim=9995
ID=9995
sprpriority=5
postype=p2
vel=-.2,-.75
pos=(enemynear,const(size.mid.pos.x)),(enemynear,const(size.mid.pos.y))+(ifelse((enemynear,statetype != A),-5,10))
random=40,40;40,40;50,40
removetime=-2
scale=(.3-(.001*time)),(.3-(.001*time))
ownpal=0

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = 1
ID = 9995
trans=addalpha
alpha=220,256

[State 7180, pos]
type=posadd
trigger1= 1
x=ceil(p2dist x)
y=ceil(p2dist y)

[State 7180, end]
type=destroyself
trigger1= time>=(ifelse(enemynear,statetype != A ,20,120))
trigger2= enemynear,ctrl || (enemynear,movetype!=H) || (enemynear,statetype=L)
;------------------------------
[Statedef 1190]
type = A
movetype = A
physics = N
ctrl = 0
;anim = 1190
sprpriority = 5
;velset = ifelse(parent,var(10) = 2,6,ifelse(parent,var(10) = 1,8,4)),ifelse(parent,var(10) = 2,-4,ifelse(parent,var(10) = 1,-2,0))
juggle = 0

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

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !time && anim != stateno
value = stateno

[State 0, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AP,AT
stateno = 1190

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

[State 0, VelSet]
type = VelSet
trigger1 = 1
x = 12*-(cos(time/4))

[State 0, SprPriority]
type = SprPriority
trigger1 = Vel X <= 0
value = 4
ignorehitpause = 1

[State 0, SprPriority]
type = SprPriority
trigger1 = Vel X > 0
value = -1
ignorehitpause = 1

[State 901:projectile]
type = hitdef
trigger1 = (Time%7)=1
sparkxy = -10,0
animtype = hard
attr = A,SP
priority = 3
damage = ceil(15*root,fvar(10)),1
guardflag = MA
hitflag = MAF
pausetime = 0,2
sparkno = 2
;guard.sparkno = s8105
hitsound = s1,6
guardsound = s2,0
ground.type = low
air.type = low
ground.slidetime = 16
ground.hittime = 16
ground.velocity = ifelse(vel X >= 0,-5, -5),-5
air.hittime = 15
air.velocity = ifelse(vel X >= 0,-5, -5),-5
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
yaccel = .5

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 901:playerpush]
type = PlayerPush
trigger1 = 1
value = 0
persistent = 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = movecontact
trigger2 = frontedgedist <= -70
;id =  1090

[State 901:destroyself]
type = destroyself
trigger1 = animtime=0
trigger2 = frontedgedist <= -70

;------------------------------
[Statedef 1191]
type = A
movetype = A
physics = N
ctrl = 0
;anim = 1190
sprpriority = 5
;velset = ifelse(parent,var(10) = 2,6,ifelse(parent,var(10) = 1,8,4)),ifelse(parent,var(10) = 2,-4,ifelse(parent,var(10) = 1,-2,0))
juggle = 0

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

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !time && anim != stateno-1
value = stateno-1

[State 0, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AP,AT
stateno = 1191

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

[State 0, VelSet]
type = VelSet
trigger1 = 1
x = -12*-(cos(time/4))

[State 0, SprPriority]
type = SprPriority
trigger1 = Vel X <= 0
value = 4
ignorehitpause = 1

[State 0, SprPriority]
type = SprPriority
trigger1 = Vel X > 0
value = -1
ignorehitpause = 1

[State 901:projectile]
type = hitdef
trigger1 = (Time%7)=1
sparkxy = -10,ceil((enemynear,const(size.mid.pos.y)))+ceil((p2dist Y))
animtype = hard
attr = A,SP
priority = 3
damage = ceil(15*root,fvar(10)),1
guardflag = MA
hitflag = MAF
pausetime = 0,2
sparkno = 2
;guard.sparkno = s8105
hitsound = s1,6
guardsound = s2,0
ground.type = low
air.type = low
ground.slidetime = 16
ground.hittime = 16
ground.velocity = ifelse(vel X >= 0,-5, -5),-5
air.hittime = 15
air.velocity = ifelse(vel X >= 0,-5, -5),-5
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
yaccel = .5

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 901:playerpush]
type = PlayerPush
trigger1 = 1
value = 0
persistent = 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = movecontact
trigger2 = frontedgedist <= -70
;id =  1090

[State 901:destroyself]
type = destroyself
trigger1 = animtime=0
trigger2 = frontedgedist <= -70
;------------------------------------------------------------------------
[Statedef 1192]
type = S
movetype = A
physics = N
ctrl = 0
anim = 1190
sprpriority = 4
velset = 0
juggle = 0

[State 0, BindToParent]
type = BindToParent
trigger1 = 1
time = 1
facing = 1
pos = 0,0

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 901:playerpush]
type = PlayerPush
trigger1 = 1
value = 0
persistent = 1

[State 901: NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 1
value = SCA,AA,AT
ignorehitpause = 1

[State 0, AfterImageTime]
type = AfterImageTime
trigger1 = parent,anim !=1192
time = 0
;ignorehitpause =
;persistent =

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = parent,anim !=1192
;trigger2 = animtime=0

[State 901:destroyself]
type = destroyself
trigger1 = parent,anim !=1192;numhelper(1000)=0
;trigger2 = animtime=0

;------------------------------
[Statedef 1290]
type = A
movetype = A
physics = N
ctrl = 0
anim = 1292
sprpriority = 5
velset = ifelse(parent,var(10) = 2,3,ifelse(parent,var(10) = 1,2,1)),0
juggle = 3

[State 0, Explod]
type = Explod
trigger1 = !time&&!prevstateno
anim = 1290
ID = 1290
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -1
scale = .5,.5
sprpriority = 4
ownpal = 0
removeongethit = 0

[State 901:projectile]
type = hitdef
trigger1 = (time%5)=1
sparkxy = -10,0
animtype = hard
attr = A,SP
priority = 3
damage = ceil(20*root,fvar(10)),1
guardflag = MA
hitflag = MAF
pausetime = 4,4
sparkno = 0
guard.sparkno = s8105
hitsound = s1,6
guardsound = s2,0
ground.type = low
air.type = low
ground.slidetime = 16
ground.hittime = 16
ground.velocity = -6,0
air.hittime = 15
air.velocity = -6,-2.5
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
yaccel = .5

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 901:playerpush]
type = PlayerPush
trigger1 = 1
value = 0
persistent = 1

[State 0, VelAdd]
type = VelAdd
trigger1 = 1
x = .15

[State 1005, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,AA,AP,AT
stateno=1290
ignorehitpause=1

[State 1005, hitby]
type=hitby
trigger1=1
time=-1
value=SCA,AP
ignorehitpause=1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = frontedgedist <= -70
;id =  1090

[State 901:destroyself]
type = changestate
trigger1 = frontedgedist <= -70
value = 1291
;---------------------------------------------------------------------------;
[Statedef 1291]
type = S
movetype = I
physics = S
juggle = 1
ctrl = 0
velset = 0,0
anim=9741
sprpriority = 4
poweradd = 0

[State 0, Explod]
type = Explod
trigger1 = !time&&!prevstateno
anim = 1291
ID = 1291
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -2
scale = .5,.5
sprpriority = 4
ownpal = 0
removeongethit = 0

[State 1001]
type = assertspecial
trigger1 = 1
flag = noshadow

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

[State 707]
type= PlayerPush
trigger1= 1
value= 0
persistent= 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = time >= 8
id = 1291

[State 1002]
type = Destroyself
trigger1 = time >= 8

;---------------------------------------------------------------------------;
[Statedef 3090]
type = A
movetype = I
physics = N
juggle = 0
ctrl = 0
anim = 3090
velset = 0,0
poweradd = 0
sprpriority=4

[State 0, SprPriority]
type = SprPriority
trigger1 = 1
value = 4

[State 0, BindToParent]
type = BindToParent
trigger1 = 1
pos = 0,-20

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S5,3
volume = 0
channel = -1

[State 1001]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = parent,movetype = H
trigger2 = parent,stateno != 3000
trigger3 = parent,anim=3001

[State 1002]
type = ChangeState
trigger1 = parent,movetype = H
trigger2 = parent,stateno != 3000
trigger3 = parent,anim=3001
value = 3091
;---------------------------------------------------------------------------;
[Statedef 3091]
type = A
movetype = I
physics = N
juggle = 0
ctrl = 0
anim = 3091
velset = 0,0
poweradd = 0
sprpriority=4

[State 0, SprPriority]
type = SprPriority
trigger1 = 1
value = 4

[State 0, BindToParent]
type = BindToParent
trigger1 = 1
pos = 0,-20

[State 1001]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = animtime=0

[State 1002]
type = DestroySelf
trigger1 = animtime=0

;---------------------------------------------------------------------------;
[Statedef 3095]
type = A
movetype = I
physics = N
juggle = 0
ctrl = 0
anim = 3095
velset = 0,0
poweradd = 0
sprpriority=4

[State 0, SprPriority]
type = SprPriority
trigger1 = 1
value = 4

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S5,4
volume = 0
channel = -1

[State 1001]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = parent,movetype = H
trigger2 = parent,stateno != 3000
trigger3 = parent,anim=3001

[State 1002]
type = ChangeState
trigger1 = parent,movetype = H
trigger2 = parent,stateno != 3000
trigger3 = parent,anim=3001
value = 3096
;---------------------------------------------------------------------------;
[Statedef 3096]
type = A
movetype = I
physics = N
juggle = 0
ctrl = 0
anim = 3096
velset = 0,0
poweradd = 0
sprpriority=4

[State 0, SprPriority]
type = SprPriority
trigger1 = 1
value = 4

[State 0, BindToParent]
type = BindToParent
trigger1 = 1
pos = 0,-20

[State 1001]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = animtime=0

[State 1002]
type = DestroySelf
trigger1 = animtime=0
;---------------------------------------------------------------------------;
[Statedef 3092]
type = A
movetype = I
physics = N
juggle = 0
ctrl = 0
anim = 3090
velset = 0,0
poweradd = 0
sprpriority=4

[State 0, SprPriority]
type = SprPriority
trigger1 = 1
value = 4

[State 0, BindToParent]
type = BindToParent
trigger1 = 1
pos = 0,-20

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S5,3
volume = 0
channel = -1

[State 1001]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = parent,movetype = H
trigger2 = parent,stateno != 3002
trigger3 = parent,anim=3003

[State 1002]
type = ChangeState
trigger1 = parent,movetype = H
trigger2 = parent,stateno != 3002
trigger3 = parent,anim=3003
value = 3093
;---------------------------------------------------------------------------;
[Statedef 3093]
type = A
movetype = I
physics = N
juggle = 0
ctrl = 0
anim = 3091
velset = 0,0
poweradd = 0
sprpriority=4

[State 0, SprPriority]
type = SprPriority
trigger1 = 1
value = 4

[State 0, BindToParent]
type = BindToParent
trigger1 = 1
pos = 0,-20

[State 1001]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = animtime=0

[State 1002]
type = DestroySelf
trigger1 = animtime=0

;---------------------------------------------------------------------------;
[Statedef 3097]
type = A
movetype = I
physics = N
juggle = 0
ctrl = 0
anim = 3095
velset = 0,0
poweradd = 0
sprpriority=4

[State 0, SprPriority]
type = SprPriority
trigger1 = 1
value = 4

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S5,4
volume = 0
channel = -1

[State 1001]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = parent,movetype = H
trigger2 = parent,stateno != 3002
trigger3 = parent,anim=3003

[State 1002]
type = ChangeState
trigger1 = parent,movetype = H
trigger2 = parent,stateno != 3002
trigger3 = parent,anim=3003
value = 3098
;---------------------------------------------------------------------------;
[Statedef 3098]
type = A
movetype = I
physics = N
juggle = 0
ctrl = 0
anim = 3096
velset = 0,0
poweradd = 0
sprpriority=4

[State 0, SprPriority]
type = SprPriority
trigger1 = 1
value = 4

[State 0, BindToParent]
type = BindToParent
trigger1 = 1
pos = 0,-20

[State 1001]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = animtime=0

[State 1002]
type = DestroySelf
trigger1 = animtime=0


;------------------------------------------------------------------------
[Statedef 7005]
type = S
movetype = I
physics = N
ctrl = 0
anim = 9741
sprpriority = 5
juggle = 0

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = nobardisplay

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 901:playerpush]
type = PlayerPush
trigger1 = 1
value = 0
persistent = 1

[State 901: NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 1
value = SCA,AA,AT
ignorehitpause = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S7001,1
volume = 255
channel = 15

[State 0, EnvColor]
type = BGPalFX
trigger1 = time <= 50
add = -200,-200,-200
time = 1


[State 0, Helper]
type = Helper
trigger1 = (time = 0) && (parent,stateno=3400)
helpertype = normal ;player
name = "portraitlvl3"
ID = 7006
stateno = 7006
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermove = 99999
pausemove = 99999
supermovetime=9999

[State 0, Explod]
type = Explod
trigger1 = time =0
anim = 7005
ID =  7000
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove =999999
pausemove =999999
supermovetime=9999
scale = 1,1
sprpriority = 4
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
triggerall = parent,stateno !=3400
trigger1 = time =0
anim = 7009
ID =  7009
pos = 73,133
postype = back ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 5
vel = 0,0
accel = 0,0
random = 0,0
removetime = 10
supermove =999999
pausemove =999999
scale = .5,.5
sprpriority = -3
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
triggerall= parent,stateno !=3400
trigger1 = time =10
anim = 7009
ID =  7010
pos = 73,133
postype = back ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 5
vel = -.15,0
accel = 0,0
random = 0,0
removetime = 50
supermove =999999
pausemove =999999
scale = 1,1
sprpriority = -3
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1

[State 4300, shrink]
type=modifyexplod
trigger1=numexplod(7009) && time <=10
ID=7009
scale = 3-(.21*(time)),3-(.21*(time))

[State 4300, shrink]
type=modifyexplod
trigger1=numexplod(7009) && time >10
ID=7010
scale = 1,1

[State 4300, circle]
type=explod
trigger1=time = 28
anim=7007
ID=7007
sprpriority=5
postype=p1
ownpal = 1
removetime=30
supermovetime=300

[State 4300, shrink]
type=modifyexplod
trigger1=numexplod(7007)
ID=7007
scale = .5+(.04*(time-28)),.5+(.04*(time-28))

[State 4300, circle]
type=explod
trigger1=time = 20
anim=7008
ID=7008
sprpriority=5
postype=p1
ownpal = 1
removetime=30
supermovetime=300

[State 4300, shrink]
type=modifyexplod
trigger1=numexplod(7008)
ID=7008
scale = .5+(.08*(time-20)),.5+(.08*(time-20))

[State -3, StopSnd]
type = StopSnd
trigger1 = time >=50
trigger2 = parent,movetype=H
channel = 15
ignorehitpause = 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = time >=50
trigger2 = parent,movetype=H

[State 901:destroyself]
type = destroyself
trigger1 = time >=50
trigger2 = parent,movetype=H
;------------------------------------------------------------------------
[Statedef 7006]
type = S
movetype = I
physics = N
ctrl = 0
anim = 9741
sprpriority = 5
juggle = 0

[State 0, BindToParent]
type = BindToParent
trigger1 = 1
time = 2
;facing = 0
;pos = 0,0
;ignorehitpause =
;persistent =

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = nobardisplay

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 901:playerpush]
type = PlayerPush
trigger1 = 1
value = 0
persistent = 1

[State 901: NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 1
value = SCA,AA,AT
ignorehitpause = 1

[State 0, Explod]
type = Explod
trigger1 = time =0
anim = 7010
ID =  7010
pos = 160,119
postype = back ;p2,front,back,left,right
facing = ifelse((root,facing= 1),1,-1)
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove =999999
pausemove =999999
scale = 1,1
sprpriority = -5
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 1

[State 4300, shrink]
type=modifyexplod
trigger1=numexplod(7010) && time <=8
ID=7010
scale = .5,.5;2-(.145*(time)),2-(.145*(time))

[State 4300, shrink]
type=modifyexplod
trigger1=numexplod(7010) && time = [9,40]
ID=7010
scale = .5,.5

[State 4300, shrink]
type=modifyexplod
trigger1=numexplod(7010) && time >40
ID=7010
scale = .5+(.16*(time-40)),.5+(.16*(time-40))

[State 0, PalFX]
type = PalFX
trigger1=numexplod(7010) && time <=20
time = 1
add = 255-(10*(time)),255-(10*(time)),255-(10*(time))

[State 0, PalFX]
type = PalFX
trigger1=numexplod(7010) && time >40
time = 1
add = 0-(10*(time-40)),0-(10*(time-40)),0-(10*(time-40))

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = time >=50
trigger2 = root,movetype=H

[State 901:destroyself]
type = destroyself
trigger1 = time >=50
trigger2 = root,movetype=H
;========================<KANJI B.G.>=============================
[Statedef 7610]
physics=N
velset=0,0
anim=9741

[State 7610, assert]
type=assertspecial
trigger1=time<120
flag=nomusic

[State 7610, snd]
type=playsnd
trigger1=!time
value=7610,0

[State 7610, black]
type=bgpalfx
trigger1=time<120
time=2
add=-255,-255,-255

[State 7610, black]
type=bgpalfx
trigger1=time=120
time=60
add=-255,-255,-255
sinadd=255,255,255,240

[State 7610, fade]
type=palfx
trigger1=time=120
time=60
sinadd=-255,-255,-255,240

[State 7610, kanji]
type=explod
trigger1=!time
anim=7610
ID=7610
sprpriority=-5
postype=left
pos=160,120
scale=.5,.5
bindtime=-1

[State 7610, shrink]
type=modifyexplod
trigger1=time<6
ID=7610
scale=(5.5-time),(5.5-time)

[State 7610, shrink]
type=modifyexplod
trigger1=time>=6
ID=7610
scale=.5,.5

[State 7610, flamebg]
type=explod
trigger1=!time
anim=7611
ID=7611
sprpriority=5
postype=left
pos=0,0
bindtime=-1
removetime=-1
pausemovetime=300
supermovetime=300

;[State 9999, PlaySnd]
;type = PlaySnd
;triggerall = roundstate = 4
;trigger1 = root,stateno = 362
;trigger2 = root,stateno = [382,383]
;value = s9999,0
;ignorehitpause = 1
;volume = 255
;persistent = 0
;abspan = 1

[State 7610, assert]
type=assertspecial
trigger1=1
flag=invisible
flag2=nobardisplay
ignorehitpause=1

[State 7610, assert]
type=assertspecial
trigger1=time<120
flag=noFG
ignorehitpause=1

[State 7610, safety]
type=removeexplod
trigger1=time>=180

[State 7610, end]
type=destroyself
trigger1=time>=180
;========================<CAMERA CONTROL>=============================
[Statedef 7650]
physics=N
velset=0,0
anim=9741
[State 7650, bound]
type=screenbound
trigger1= 1
value=0
movecamera=1,1
[State 7650, end]
type=destroyself
trigger1= roundstate=2
;---------------------------------------------------------
;hyper bg
[Statedef 7021]
physics = N
anim = 9741
sprpriority = -3

[State 0, PalFXWiz]
type = PalFX
trigger1 = root, stateno = [3400,3405]
trigger1 = time = 0
time =  99999
add = 20,20,20
invertall = 0
color = 0

[State 0, PalFXWiz]
type = PalFX
trigger1 = root, stateno = [3300,3305]
trigger1 = time = 0
time =  99999
add = 0,-100,0
invertall = 0
color = 0

[State 0, PalFXWiz]
type = PalFX
trigger1 = root, stateno = [3200,3205]
trigger1 = time = 0
time =  99999
add = 30,-150,-150
invertall = 0
color = 0

[State 0, PalFXWiz]
type = PalFX
trigger1 = root, stateno = [3100,3105]
trigger1 = time = 0
time =  99999
add =  -150,30,-150
invertall = 0
color = 0

[State 7020, 9]
type = AssertSpecial
trigger1 = 1
flag = noFG
ignorehitpause = 1

[State 7020, 9]
type   = Explod
trigger1 = numexplod(7021)=0
anim = F750
postype = left
ID = 7021
sprpriority = -2
removetime = -2
pos = 0,0;160,0
scale = .5,.5
bindtime = -1
facing=1
ignorehitpause=1
supermovetime=9999
pausemovetime=9999
supermove = 9999
pausemove = 9999

[State 8500, 7]
Type = RemoveExplod
trigger1 = root, movetype = H
trigger2 = root, var(45)=0;stateno!=3000
trigger3 = numhelper(9998) = 1
trigger4 = numhelper(9999) = 1
trigger5 = numhelper(7005) = 1

[State 8500, 7]
Type = destroyself
trigger1 = root, movetype = H
trigger2 = root, var(45)=0
trigger3 = numhelper(9998) = 1
trigger4 = numhelper(9999) = 1
trigger5 = numhelper(7005) = 1

;---------------------------------------------------------
;hyper bg
[Statedef 7022]
physics = N
anim = 9741
sprpriority = -3

[State 0, Trans]
type = Trans
trigger1 = 1
trans = Add

[State 0, PalFX]
type = PalFX
trigger1 = 1
time = 1
add = 0-(time*4),0-(time*4),0-(time*4)
;mul = 256,256,256
;sinadd = 0,0,0,10
invertall = 0
color = 256
;ignorehitpause =
;persistent =

[State 7020, 9]
type = AssertSpecial
trigger1 = 1;1
flag = noFG
ignorehitpause = 1

[State 7020, 9]
type   = Explod
triggerall = p2life >0
trigger1 = numexplod(7021)=0
anim = F750
postype = left
ID = 7021
sprpriority = -5
supermovetime = 1
removetime = -2
pos = 160,0
scale = .5,.5;0.642,1
bindtime = -1
facing=1
ignorehitpause=1
supermovetime=9999
pausemovetime=9999
supermove = 9999
pausemove = 9999
ownpal=0

[State 7020, 9] ;animação de fundo
type  = Explod
triggerall = p2life >0
trigger1 = numexplod(7022)=0
anim = 70210
postype = right
ID = 7022
sprpriority = -5
supermovetime = 1
removetime = -2
pos = -160,0
scale = .5,.5;0.642,1
bindtime = -1
facing=-1
ignorehitpause=1
supermovetime=9999
pausemovetime=9999
supermove = 9999
pausemove = 9999
ownpal=0

;[State 8500, 7]
;Type = RemoveExplod
;trigger1 = root, movetype = H
;trigger2 = root, var(45)=0;stateno!=3000
;trigger3 = p2life <= 0
;triggerall = root, var(9)<=0
;triggerall = anim=8500
;trigger1 = root, stateno!=3000
;trigger1 = root, stateno!=3100
;trigger1 = root, stateno!=[3000,3604]
;trigger2 = anim=8500 && roundstate=3

[State 8500, 7]
Type = Destroyself
trigger1 = time >=40
;trigger2 = root, var(45)=0;stateno!=3000
;trigger3 = p2life <= 0
;triggerall = root, var(9)<=0
;triggerall = anim=8500
;trigger1 = root, stateno!=3000
;trigger1 = root, stateno!=3100
;trigger1 = root, stateno!=[3000,3604]
;trigger2 = anim=8500 && roundstate=3

;------------------------------------
[StateDef 9741]
type = S
movetype = I
physics = N
anim = 9741
ctrl = 0

[State 9741, Safety]; Just in case your opponent is very poorly coded.
type = SelfState
trigger1 = !IsHelper
value = 0

[State 9741, PauseCheck]
type = VarSet
trigger1 = (GameTime>(Parent,var(59)))
trigger2 = !(Parent,Alive)
trigger3 = (RoundState != 2)
trigger4 = Parent,var(59)
trigger5 = (var(3):=0)
var(2) = (var(3):=1)+(var(4):=0)

[State 9741, Facing]
type = Turn
trigger1 = (var(9):=(Facing != Parent,Facing))

[State 9741, DirTurnOnAI]
type = ParentVarSet
triggerall = !var(3)
triggerall = !var(9)
trigger1 = (Parent,command = "holdfwd")
trigger2 = (Parent,command = "holdback")
trigger3 = (Parent,command = "holdup")
trigger4 = (Parent,command = "holddown")
trigger5 = !(var(4):=1)
var(59) = var(4)

[State 9741, DirTurnOffAI]
type = ParentVarSet
triggerall = !var(3)
triggerall = Parent,var(59)
trigger1 = (command = "holdfwd")
trigger1 = (Parent,command = "holdfwd")
trigger2 = (command = "holdback")
trigger2 = (Parent,command = "holdback")
trigger3 = (command = "holdup")
trigger3 = (Parent,command = "holdup")
trigger4 = (command = "holddown")
trigger4 = (Parent,command = "holddown")
var(59) = (var(4):=0)

[State 9741, ButtonTurnOnAI]
type = ParentVarSet
triggerall = var(1)
triggerall = !var(2)
trigger1 = (Parent,command = "a")
trigger2 = (Parent,command = "b")
trigger3 = (Parent,command = "c")
trigger4 = (Parent,command = "x")
trigger5 = (Parent,command = "y")
trigger6 = (Parent,command = "z")
trigger7 = (Parent,command = "start")
var(59) = 1

[State 9741, ButtonTurnOffAI]
type = ParentVarSet
triggerall = !var(2)
trigger1 = (command = "a")
trigger1 = (Parent,command = "a")
trigger2 = (command = "b")
trigger2 = (Parent,command = "b")
trigger3 = (command = "c")
trigger3 = (Parent,command = "c")
trigger4 = (command = "x")
trigger4 = (Parent,command = "x")
trigger5 = (command = "y")
trigger5 = (Parent,command = "y")
trigger6 = (command = "z")
trigger6 = (Parent,command = "z")
trigger7 = (command = "start")
trigger7 = (Parent,command = "start")
var(59) = -1

[State 9741, UnPauseCheck]
type = VarSet
triggerall = var(2)
trigger1 = (Parent,command = "a")
trigger2 = (Parent,command = "b")
trigger3 = (Parent,command = "c")
trigger4 = (Parent,command = "x")
trigger5 = (Parent,command = "y")
trigger6 = (Parent,command = "z")
trigger7 = (Parent,command = "start")
trigger8 = (var(2) = 2)
trigger8 = (var(2):=0)
var(2) = 2

[State 9741, Goodbye]
type = DestroySelf
triggerall = (var(1):=1)
trigger1 = Parent,var(59)
trigger2 = !(Parent,Alive)
trigger3 = (RoundState != 2)


;------------------
; AI Activation Helper State - Compatibly Partnered Version
;
; var(1) - First tick dir activation prevention
; var(2) - Used for pause/superpause and custom state check, basically.
; var(3) - (Super/)Pause & custom state-triggered dir detection disabler.
; var(4) - Hitpause check.
; var(5) - No button on previous tick.
; var(6) - Any dir on this tick.
; var(7) - Any button on this tick.
; var(8) - Matching partner button detected.
; var(9) - AutoTurn bug fixer.
; parent's var(57) - Parent's GameTime var, for pause and custom state check.
; parent's var(59) - Parent's primary AI variable.
;
; The code in this state is mostly simply copy/pasteable.
; But if you're using different indices for the parent's variables,
; or if you change your character's basic commands' names, you'll
; of course need to change the code in this state accordingly.

[StateDef 9742]
type = S
movetype = I
physics = N
anim = 9741
ctrl = 0

[State 9742, Safety]; Just in case your opponent is very poorly coded.
type = SelfState
trigger1 = !IsHelper
value = 0

[State 9742, PauseCheck]
type = VarSet
trigger1 = (GameTime>Parent,var(57))
trigger2 = !(Parent,Alive)
trigger3 = (RoundState != 2)
trigger4 = Parent,var(59)
trigger5 = (var(3):=0)
var(2) = (var(3):=1)

[State 9742, Facing]
type = Turn
trigger1 = (var(9):=(Facing != Parent,Facing))

[State 9742, ParentDirCheck]
type = VarSet
trigger1 = (Parent,command = "holdfwd")
trigger2 = (Parent,command = "holdback")
trigger3 = (Parent,command = "holdup")
trigger4 = (Parent,command = "holddown")
trigger5 = (var(6):=0)
var(6) = 1

[State 9742, ParentButtonCheck]
type = VarSet
trigger1 = (Parent,command = "a")
trigger2 = (Parent,command = "b")
trigger3 = (Parent,command = "c")
trigger4 = (Parent,command = "x")
trigger5 = (Parent,command = "y")
trigger6 = (Parent,command = "z")
trigger7 = (Parent,command = "start")
trigger8 = (var(7):=0)
var(7) = 1

[State 9742, SameButtonCheck]
type = VarSet
triggerall = var(7)
triggerall = !var(2)
triggerall = NumPartner
trigger1 = (Parent,command = "a")
trigger1 = (Partner,command = "a")
trigger2 = (Parent,command = "b")
trigger2 = (Partner,command = "b")
trigger3 = (Parent,command = "c")
trigger3 = (Partner,command = "c")
trigger4 = (Parent,command = "x")
trigger4 = (Partner,command = "x")
trigger5 = (Parent,command = "y")
trigger5 = (Partner,command = "y")
trigger6 = (Parent,command = "z")
trigger6 = (Partner,command = "z")
trigger7 = (Parent,command = "start")
trigger7 = (Partner,command = "start")
trigger8 = (var(15):=0)
var(15) = 1

[State 9742, DirTurnOnAI]
type = ParentVarSet
trigger1 = var(1)
trigger1 = var(6)
trigger1 = !var(3)
trigger1 = !var(4)
trigger1 = !var(16)
var(59) = 1

[State 9742, DirTurnOffAI]
type = ParentVarSet
triggerall = var(6)
triggerall = !var(3)
triggerall = Parent,var(59)
trigger1 = (command = "holdfwd")
trigger1 = (Parent,command = "holdfwd")
trigger2 = (command = "holdback")
trigger2 = (Parent,command = "holdback")
trigger3 = (command = "holdup")
trigger3 = (Parent,command = "holdup")
trigger4 = (command = "holddown")
trigger4 = (Parent,command = "holddown")
var(59) = 0

[State 9742, ButtonTurnOnAI]
type = ParentVarSet
trigger1 = var(5)
trigger1 = var(7)
trigger1 = !var(2)
trigger1 = !var(15)
var(59) = 1

[State 9742, ButtonTurnOffAI]
type = ParentVarSet
triggerall = var(7)
triggerall = !var(2)
triggerall = !var(15)
trigger1 = (command = "a")
trigger1 = (Parent,command = "a")
trigger2 = (command = "b")
trigger2 = (Parent,command = "b")
trigger3 = (command = "c")
trigger3 = (Parent,command = "c")
trigger4 = (command = "x")
trigger4 = (Parent,command = "x")
trigger5 = (command = "y")
trigger5 = (Parent,command = "y")
trigger6 = (command = "z")
trigger6 = (Parent,command = "z")
trigger7 = (command = "start")
trigger7 = (Parent,command = "start")
var(59) = -1

[State 9742, UnPauseCheck]
type = VarSet
triggerall = var(2)
triggerall = !var(4)
trigger1 = var(7)
trigger2 = (var(2) = 2)
trigger2 = (var(2):=0)
var(2) = 2

[State 9742, Goodbye]
type = DestroySelf
trigger1 = Parent,var(59)
trigger2 = !(Parent,Alive)
trigger3 = (RoundState != 2)

[State 9742, HitPauseCheck]
type = VarSet
trigger1 = var(6)
trigger2 = var(7)
trigger3 = !(Parent,HitPauseTime)
var(4) = Parent,HitPauseTime

[State 9742, Delay]
type = VarSet
trigger1 = (var(1):=1)
var(5) = !var(7)
;-------------------------------------------
; Ffffffinish!!
[StateDef 9998]
type    = A
movetype= I
physics = N
ctrl = 0
anim = 9741

[State 9999, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = s9999,2
ignorehitpause = 1
volume = -255
abspan = 1

[State 9999, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = s9999,3
ignorehitpause = 1
volume = 255
abspan = 1

[State 9999, PlaySnd]
type = PlaySnd
trigger1 = root,stateno = [180,185]
value = s9999,0
ignorehitpause = 1
volume = 255
persistent = 0
abspan = 1

[State 9999, Short Pause]
type = Pause
trigger1 = Time = 1
time = 60
movetime = 0
ignorehitpause = 1

[State 9999, Explod]
type = Explod
trigger1 = time = 0
anim = 9997
postype = back  ;p2,front,back,left,right
pos = 0,240
bindtime = -1
removetime = -2
supermovetime = 9999
pausemovetime = 9999
ontop = 1
ownpal = 1
removeongethit = 0
;ignorehitpause =
;persistent =

;-------------------------------------------
; Hyper Combo Finish!!
[StateDef 9999]
type    = A
movetype= I
physics = N
ctrl = 0
anim = 9741

[State 9999, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = s9999,4
volume = 255
ignorehitpause = 1
abspan = 1

[State 9999, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = s9999,5
volume = 0
ignorehitpause = 1
abspan = 1

[State 9999, PlaySnd]
type = PlaySnd
trigger1 = root,stateno = [180,185]
value = s9999,0
ignorehitpause = 1
volume = 255
persistent = 0
abspan = 1

[State 9999, Explod]
type = Explod
trigger1 = time = 0
anim = 9999
id = 9999
postype = left  ;p2,front,back,left,right
bindtime = -1
removetime = -2
scale = 1,1
facing = 1
supermovetime = 9999
pausemovetime = 9999
sprpriority = -5
ownpal = 1
removeongethit = 0
;ignorehitpause =
;persistent =

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = parent, movetype = H
id = 9999




;==================================================================================
;======| RELACIONADO À AI - AI RELATED |===========================================
;==================================================================================

; (Credit to ANMC, Bagaliao, and FlowaGirl for the basic helper method concept.)
;
;------------------
; AI Activation Helper State - Primary Version
; (Credit to YongMing for the basic HitPause bugfix concept.)
;
; var(1) - First tick button activation prevention.
; var(2) - Used for pause/superpause and custom state check, basically.
; var(3) - (Super/)Pause & custom state-triggered dir detection disabler.
; var(4) - Persistent direction command detection enabler (due to 2002.04.14).
; var(9) - AutoTurn bug fixer.
; parent's var(57) - Parent's GameTime var, for pause and custom state check.
; parent's var(59) - Parent's primary AI variable.
;
; The code in this state is mostly simply copy/pasteable.
; But if you're using different indices for the parent's variables,
; or if you change your character's basic commands' names, you'll
; of course need to change the code in this state accordingly.

[StateDef 9741]
type = S
movetype = I
physics = N
anim = 9741
ctrl = 0

[State 9741, Safety]; Just in case your opponent is very poorly coded.
type = SelfState
trigger1 = !IsHelper
value = 0

[State 9741, PauseCheck]
type = VarSet
trigger1 = (GameTime>(Parent,var(57)))
trigger2 = !(Parent,Alive)
trigger3 = (RoundState != 2)
trigger4 = Parent,var(59)
trigger5 = (var(3):=0)
var(2) = (var(3):=1)+(var(4):=0)

[State 9741, Facing]
type = Turn
trigger1 = (var(9):=(Facing != Parent,Facing))

[State 9741, DirTurnOnAI]
type = ParentVarSet
triggerall = !var(3)
triggerall = !var(9)
trigger1 = (Parent,command = "holdfwd")
trigger2 = (Parent,command = "holdback")
trigger3 = (Parent,command = "holdup")
trigger4 = (Parent,command = "holddown")
trigger5 = !(var(4):=1)
var(59) = var(4)

[State 9741, DirTurnOffAI]
type = ParentVarSet
triggerall = !var(3)
triggerall = Parent,var(59)
trigger1 = (command = "holdfwd")
trigger1 = (Parent,command = "holdfwd")
trigger2 = (command = "holdback")
trigger2 = (Parent,command = "holdback")
trigger3 = (command = "holdup")
trigger3 = (Parent,command = "holdup")
trigger4 = (command = "holddown")
trigger4 = (Parent,command = "holddown")
var(59) = (var(4):=0)

[State 9741, ButtonTurnOnAI]
type = ParentVarSet
triggerall = var(1)
triggerall = !var(2)
trigger1 = (Parent,command = "a")
trigger2 = (Parent,command = "b")
trigger3 = (Parent,command = "c")
trigger4 = (Parent,command = "x")
trigger5 = (Parent,command = "y")
trigger6 = (Parent,command = "z")
trigger7 = (Parent,command = "start")
var(59) = 1

[State 9741, ButtonTurnOffAI]
type = ParentVarSet
triggerall = !var(2)
trigger1 = (command = "a")
trigger1 = (Parent,command = "a")
trigger2 = (command = "b")
trigger2 = (Parent,command = "b")
trigger3 = (command = "c")
trigger3 = (Parent,command = "c")
trigger4 = (command = "x")
trigger4 = (Parent,command = "x")
trigger5 = (command = "y")
trigger5 = (Parent,command = "y")
trigger6 = (command = "z")
trigger6 = (Parent,command = "z")
trigger7 = (command = "start")
trigger7 = (Parent,command = "start")
var(59) = -1

[State 9741, UnPauseCheck]
type = VarSet
triggerall = var(2)
trigger1 = (Parent,command = "a")
trigger2 = (Parent,command = "b")
trigger3 = (Parent,command = "c")
trigger4 = (Parent,command = "x")
trigger5 = (Parent,command = "y")
trigger6 = (Parent,command = "z")
trigger7 = (Parent,command = "start")
trigger8 = (var(2) = 2)
trigger8 = (var(2):=0)
var(2) = 2

[State 9741, Goodbye]
type = DestroySelf
triggerall = (var(1):=1)
trigger1 = Parent,var(59)
trigger2 = !(Parent,Alive)
trigger3 = (RoundState != 2)


;------------------
; AI Activation Helper State - Compatibly Partnered Version
;
; var(1) - First tick dir activation prevention
; var(2) - Used for pause/superpause and custom state check, basically.
; var(3) - (Super/)Pause & custom state-triggered dir detection disabler.
; var(4) - Hitpause check.
; var(5) - No button on previous tick.
; var(6) - Any dir on this tick.
; var(7) - Any button on this tick.
; var(8) - Matching partner button detected.
; var(9) - AutoTurn bug fixer.
; parent's var(57) - Parent's GameTime var, for pause and custom state check.
; parent's var(59) - Parent's primary AI variable.
;
; The code in this state is mostly simply copy/pasteable.
; But if you're using different indices for the parent's variables,
; or if you change your character's basic commands' names, you'll
; of course need to change the code in this state accordingly.

[StateDef 9742]
type = S
movetype = I
physics = N
anim = 9741
ctrl = 0

[State 9742, Safety]; Just in case your opponent is very poorly coded.
type = SelfState
trigger1 = !IsHelper
value = 0

[State 9742, PauseCheck]
type = VarSet
trigger1 = (GameTime>Parent,var(57))
trigger2 = !(Parent,Alive)
trigger3 = (RoundState != 2)
trigger4 = Parent,var(59)
trigger5 = (var(3):=0)
var(2) = (var(3):=1)

[State 9742, Facing]
type = Turn
trigger1 = (var(9):=(Facing != Parent,Facing))

[State 9742, ParentDirCheck]
type = VarSet
trigger1 = (Parent,command = "holdfwd")
trigger2 = (Parent,command = "holdback")
trigger3 = (Parent,command = "holdup")
trigger4 = (Parent,command = "holddown")
trigger5 = (var(6):=0)
var(6) = 1

[State 9742, ParentButtonCheck]
type = VarSet
trigger1 = (Parent,command = "a")
trigger2 = (Parent,command = "b")
trigger3 = (Parent,command = "c")
trigger4 = (Parent,command = "x")
trigger5 = (Parent,command = "y")
trigger6 = (Parent,command = "z")
trigger7 = (Parent,command = "start")
trigger8 = (var(7):=0)
var(7) = 1

[State 9742, SameButtonCheck]
type = VarSet
triggerall = var(7)
triggerall = !var(2)
triggerall = NumPartner
trigger1 = (Parent,command = "a")
trigger1 = (Partner,command = "a")
trigger2 = (Parent,command = "b")
trigger2 = (Partner,command = "b")
trigger3 = (Parent,command = "c")
trigger3 = (Partner,command = "c")
trigger4 = (Parent,command = "x")
trigger4 = (Partner,command = "x")
trigger5 = (Parent,command = "y")
trigger5 = (Partner,command = "y")
trigger6 = (Parent,command = "z")
trigger6 = (Partner,command = "z")
trigger7 = (Parent,command = "start")
trigger7 = (Partner,command = "start")
trigger8 = (var(15):=0)
var(15) = 1

[State 9742, DirTurnOnAI]
type = ParentVarSet
trigger1 = var(1)
trigger1 = var(6)
trigger1 = !var(3)
trigger1 = !var(4)
trigger1 = !var(9)
var(59) = 1

[State 9742, DirTurnOffAI]
type = ParentVarSet
triggerall = var(6)
triggerall = !var(3)
triggerall = Parent,var(59)
trigger1 = (command = "holdfwd")
trigger1 = (Parent,command = "holdfwd")
trigger2 = (command = "holdback")
trigger2 = (Parent,command = "holdback")
trigger3 = (command = "holdup")
trigger3 = (Parent,command = "holdup")
trigger4 = (command = "holddown")
trigger4 = (Parent,command = "holddown")
var(59) = 0

[State 9742, ButtonTurnOnAI]
type = ParentVarSet
trigger1 = var(5)
trigger1 = var(7)
trigger1 = !var(2)
trigger1 = !var(15)
var(59) = 1

[State 9742, ButtonTurnOffAI]
type = ParentVarSet
triggerall = var(7)
triggerall = !var(2)
triggerall = !var(8)
trigger1 = (command = "a")
trigger1 = (Parent,command = "a")
trigger2 = (command = "b")
trigger2 = (Parent,command = "b")
trigger3 = (command = "c")
trigger3 = (Parent,command = "c")
trigger4 = (command = "x")
trigger4 = (Parent,command = "x")
trigger5 = (command = "y")
trigger5 = (Parent,command = "y")
trigger6 = (command = "z")
trigger6 = (Parent,command = "z")
trigger7 = (command = "start")
trigger7 = (Parent,command = "start")
var(59) = -1

[State 9742, UnPauseCheck]
type = VarSet
triggerall = var(2)
triggerall = !var(4)
trigger1 = var(7)
trigger2 = (var(2) = 2)
trigger2 = (var(2):=0)
var(2) = 2

[State 9742, Goodbye]
type = DestroySelf
trigger1 = Parent,var(59)
trigger2 = !(Parent,Alive)
trigger3 = (RoundState != 2)

[State 9742, HitPauseCheck]
type = VarSet
trigger1 = var(6)
trigger2 = var(7)
trigger3 = !(Parent,HitPauseTime)
var(4) = Parent,HitPauseTime

[State 9742, Delay]
type = VarSet
trigger1 = (var(1):=1)
var(5) = !var(7)


;------------------
; XOR Method's HitPauseTime Helper State

[StateDef 9743]
type = S
movetype = I
physics = N
anim = 9741
ctrl = 0

[State 9743, Safety]; Just in case your opponent is very poorly coded.
type = SelfState
trigger1 = !IsHelper
value = 0

[State 9743, HitPauseTime]
type = VarSet
trigger1 = !(Parent,HitPauseTime)
trigger2 = (GameTime>Parent,var(57))
var(1) = Parent,HitPauseTime

[State 9742, Goodbye]
type = DestroySelf
trigger1 = (Parent,var(59) = 1)
trigger2 = !(Parent,Alive)
trigger3 = (RoundState != 2)
;==================================================================================
;==================================================================================
;==================================================================================


;---------------------------------------------------------------------------
; Override common states (use same number to override) :
;---------------------------------------------------------------------------

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

; **IMPORTANT NOTE**
; YOU WON'T HAVE TO WORRY FOR THE AI ACTIVATION OR VARIABLE.
; IT IS ALREADY CODED HERE, ALL YOU HAVE TO DO, IS MAKE AI CODES
; IN THE COMMAND FILE

[State -2, Starting Lifebar]
type = LifeAdd
triggerall = stateno = 0
trigger1 = prevstateno = [190, 194]
trigger2 = prevstateno = [196, 199]
Value = 1001

[State -2, VarSet]
type = VarSet
trigger1 = roundstate < 2
v = 16
value = 1

[State -2, NotHitBy]
type = NotHitBy
triggerall = movetype = A
trigger1 = prevstateno = 700
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 1

[State -2, Stop Lifebar sound]
type = StopSnd
triggerall = stateno = 0
trigger1 = prevstateno = [190, 194]
trigger2 = prevstateno = [196, 199]
channel = 5

;==================================================================================
;======| RELACIONADO À AI - AI RELATED |===========================================
;==================================================================================

; Within StateDef -2, none of your own AI-related code should be placed
; above these next two controllers.

[State -2, StopAI]
type = VarSet
triggerall = (var(59) > 0)
trigger1 = (RoundState != 2)
trigger2 = !Alive
var(59) = -2
IgnoreHitPause = 1

; This controller is optional.  It allows you treat the AI flag as a boolean
; value rather than an integer value, letting you trigger your AI directives
; with "var(0)" instead of "var(59)>0", and letting you make moves usable only
; by humans by using "!var(0)" instead of "var(59)<1", thus slightly improving
; the size and efficiency of your code.
; Another benefit is that it makes it much easier for users to disable your AI,
; if they so choose.
[State -2, Simplifier]
type = VarSet
trigger1 = (var(59) = 1)
trigger2 = (var(0):=0)
var(0) = 1	; Another option is to replace 1 with something like MatchNo, if
		; you want to design your AI to have varying levels of difficulty.
IgnoreHitPause = 1

[State -2, varKOsnd]
type=varset
trigger1=alive&&var(18)>0
trigger2=!alive&&var(18)<2
var(18)=ifelse(alive,0,var(18)+1)
ignorehitpause=1

[State -3, GetHit Snd]
type=playsnd
triggerall=alive&&time=1
triggerall=stateno=5000||stateno=5010
trigger1=gethitvar(animtype)>=2&&random<500
trigger2=gethitvar(animtype)=1&&random<375
trigger3=gethitvar(animtype)=0&&random<250
value=s5000,(0+(random%4));*10,ceil(random/200)
channel=5
ignorehitpause=1

[State -3, GetHit Snd]
type=playsnd
triggerall=alive&&time=1
trigger1=(stateno=5000||stateno=5010)&&numenemy
trigger1=gethitvar(fall)||(enemynear,hitdefattr=SCA,SA,HA)
trigger2=(stateno=5020||stateno=5070||stateno=5080)
trigger3=(stateno=5050||stateno=5100)&&(prevstateno!=[5000,5199])
value=s5000,(0+(random%4));*10,ceil(random/200)
channel=5
ignorehitpause=1

[State -2, KOsnd]
type=playsnd
trigger1=!alive&&var(18)=1
trigger1=var(18):=2
value=5500,0;ifelse((var(1)=2),2,1)+2*(stateno=5130)
ignorehitpause=1
persistent=0

[State -2, RemoveExplod]
type = RemoveExplod
triggerall = numexplod(750)>=1
trigger1 =stateno != [3000,3999]
id = 750
ignorehitpause =1
persistent = 1

;---------------------------------------------------
[State -2, Hyper Combo Finish!!]
type = null;Helper
triggerall = NumHelper(9999) <= 0
triggerall = NumHelper(7610) <= 0
triggerall = (stateno = [3000,3499]) ;|| (stateno = [3700,3799]) || (stateno = [3900,3949])
triggerall = roundstate = 3
trigger1 = Winko
helpertype = normal
name = "HyperFinish"
ID = 9999
stateno = 9999
ownpal = 1
supermovetime = 9999
pausemovetime = 9999
ignorehitpause = 1

[State -2, Fffffinish!!]
type = null;Helper
triggerall = NumHelper(9998) <= 0
triggerall = NumHelper(9999) <= 0
triggerall = NumHelper(7610) <= 0
triggerall = stateno != [3000,3999]
triggerall = roundstate = 3
trigger1 = Winko
helpertype = normal
name = "Finish"
ID = 9998
stateno = 9998
ownpal = 1
supermovetime = 9999
pausemovetime = 9999
ignorehitpause = 1

[State -2, Plane Destroyed]
type = null;Helper
triggerall = prevstateno = 3201
triggerall = numhelper(3290) = 0
trigger1 = movetype = H
helpertype = normal
name = "Plane Destroyed"
ID = 3290
stateno = 3290
ownpal = 1

; Combo Messages and Score control =====================================
;>3 Yes
;>4 Good
;>5 Great
;>7 Very Good
;>9 Wonderful
;>11 Fantastic
;>14 Monster
;>20 Marvelous

[State -2, VS_Combo]
type = VarSet
trigger1 = var(28) >= 3
trigger2 = var(28)=-1 && (movehit || p2stateno = 6300 || p2stateno = [5000,5899])
var(29) = 1+(var(28)>3)+(var(28)>4)+(var(28)>6)+(var(28)>8)+(var(28)>10)+(var(28)>13)+(var(28)>19)-(var(28)=-1)
ignorehitpause = 1

[State -2, Danger]
type = VarSet
trigger1 = var(30) !=1 && roundstate=2 && life = [1,250]
var(29) = 9
ignorehitpause = 1

[State -2, First Attack]
type = PlaySnd
triggerall = var(28)=-1
triggerall = NumExplod(8701) = 0
trigger1 = var(28)=-1 && (movehit || p2stateno = 6300 || p2stateno = [5000,5899])
persistent = 0
value = 230,0
volume=255
ignorehitpause = 1

[State -2, Combo Sound]
type = PlaySnd
trigger1 = NumExplod(8701) = 0
trigger1 = var(28)=0 && var(29)!=0
persistent = 0;1
value = 230,var(29)
volume=255
ignorehitpause = 1

[State -2, Left]
type = explod
trigger1 = var(28)=0 && var(29)!=0
trigger2 = var(28)=-1 && (movehit || p2stateno = 6300 || p2stateno = [5000,5899])
triggerall = TeamSide = 1 && NumExplod(8701) = 0
anim = f8000 + (var(29))
ID = 8701
postype = left
pos = 1,69
ontop = 1
bindtime = -1
removetime = 60
supermovetime = 60
pausemovetime = 60
scale = 0.5,0.5
persistent = 0
ignorehitpause = 1

[State -2, Right]
type = explod
trigger1 = var(28)=0 && var(29)!=0
trigger2 = var(28)=-1 && (movehit || p2stateno = 6300 || p2stateno = [5000,5899])
triggerall = TeamSide = 2 && NumExplod(8701) = 0
anim = f8100+ (var(29))
ID = 8701
postype = right
pos = -3,69
ontop = 1
bindtime = -1
removetime = 60
supermovetime = 60
pausemovetime = 60
scale = 0.5,0.5
persistent = 0;1
ignorehitpause = 1

[State -2, VS_Combo]
type = VarAdd
trigger1 = enemynear, time = 0
trigger1 = enemynear, Hitshakeover = 0
trigger1 = p2stateno = 6300 || p2stateno = [5000,5899]
trigger2 = var(28)=-1 && (movehit || p2stateno = 6300 || p2stateno = [5000,5899])
var(28) = 1 + (var(28)=-1)
ignorehitpause = 1

[State -2, VS_Combo]
type = VarSet
trigger1 = var(28)!=-1 && (p2movetype!=H || enemynear, ctrl)
trigger2 = var(28)=-1 && stateno = [5000,5899]
var(28) = 0 - (roundstate<2)
ignorehitpause = 1

[State -2, VS_Combo]
type = VarSet
triggerall = numexplod(8701)!=0
trigger1 = var(28)=0
var(29) = 0
ignorehitpause = 1

[State -2, Score]
type = Varadd
trigger1 = enemynear, time=0
trigger1 = enemynear, Hitshakeover=0
trigger1 = moveguarded || p2stateno = 6300 || p2stateno = [5000,5899]
trigger2 = var(28)=-1 && (movehit || p2stateno = 6300 || p2stateno = [5000,5899])
trigger3 = roundstate=4 && time=0 && stateno = [180,189]
var(21) = ceil(stateno/50)*var(28) + (life)*(roundstate=4) + (moveguarded)
ignorehitpause = 1

[State -2, Normalize Score]
type = Varset
triggerall = numpartner=1
trigger1 = var(21)< partner, var(21)
var(21) = partner, var(21)

[State -2, Is Danger]
type = VarSet
trigger2 = var(30) = 0 && life <= 250
trigger1 = var(30) = 1 && roundstate!=2
var(30) = (roundstate>1)
ignorehitpause = 1

[State -2, Is First Attack p3]
type = VarSet
triggerall = numpartner=1
trigger1 = partner, movehit
trigger1 = partner, var(28) != -1
var(28) = 0
ignorehitpause = 1

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

[State -2, Charge Helper]
type = Helper
triggerall = var(20) = 2
trigger1 = numhelper(1590) = 0 && var(31) >= 20
type = normal
name = "Charge FX"
ID = 1590
postype = p1
stateno = 1590
ownpal = 1

[State -2, Charge]
type = VarAdd
triggerall = var(20) = 2
triggerall = command = "holdz" && var(31) < 900;2700 ;9000
trigger1 = stateno != 225 && stateno != 625
v = 31
value = 1
ignorehitpause = 1

[State -2, VarSet Charge Used]
type = VarSet
triggerall = var(20) = 2
triggerall = stateno != 225 && stateno != 625
trigger1 = command = "endz" && stateno != [200,1299]
trigger1 = ctrl = 0
trigger2 = stateno = [180,194]
trigger3 = stateno = [3000,3500]
v = 31
value = 0
ignorehitpause = 1

[State -2, VarSet Charge End]
type = Varset
triggerall = var(20) = 2
triggerall = stateno != 225 && stateno != 625
trigger1 = command = "z" || roundstate!=2
v = 31
value = 0
ignorehitpause = 1

[State -2, VarSet Charge End]
type = Varset
triggerall = var(20) = 2
triggerall = stateno = 225 && animelemtime(9) = 0|| stateno = 625 && animelemtime(9) = 0
triggerall = stateno != 225 || stateno != 625
trigger1 = command != "holdz" || command = "endz" || command = "z"
v = 31
value = 0
ignorehitpause = 1

[State -2, VarSet]
type = VarSet
triggerall = var(20) = 2
triggerall = (stateno = [200,220]) || (stateno = [230,620]) || (stateno = [630,1999])
triggerall = !movecontact
trigger1 = command != "holdz" || command = "endz" || command = "z"
v = 31
value = 0
ignorehitpause = 1

[State -2, VarSet]
type = VarSet
trigger1 = var(20) != 2
trigger2 = prevstateno=225 || prevstateno=625
trigger2 = movetype=H
v = 31
value = 0
ignorehitpause = 1

[State 0, ChangeState]
type = null;ChangeState
triggerall = var(20) = 2
triggerall = var(31) >= 90
;triggerall = (stateno = [200,220]) || (stateno = [230,450]) ||(stateno = [1000,1999])
triggerall = animtime = 0
triggerall = statetype != A
trigger1 = command != "holdz" || command = "endz" || command = "z"
value = 225
ctrl = 0

[State 0, ChangeState]
type = null;ChangeState
triggerall = var(20) = 2
triggerall = var(31) >= 90
;triggerall = (stateno = [200,220]) || (stateno = [230,450]) ||(stateno = [1000,1999])
triggerall = animtime = 0
triggerall = statetype = A
trigger1 = command != "holdz" || command = "endz" || command = "z"
value = 625
ctrl = 0

[state -2, Charge Sound]
type = playsnd
triggerall = var(20) = 2
trigger1 = var(31) = 90
value = S5,8
channel = 6

[state -2,Charge Sound End]
type = stopsnd
triggerall = var(20) = 2
trigger1 = var(31) = 0
channel = 6

[state -2, Start Charge FX1]
type = PalFx
triggerall = var(20) = 2
triggerall = var(31) = [20, 89]
trigger1 = time % 56 = [12,15]
add = 160,160,160
time = 1

[state -2, Start Charge FX2]
type = PalFx
triggerall = var(20) = 2
triggerall = var(31) = [20, 89]
trigger1 = time % 56 = [8,11]
trigger2 = time % 56 = [16,19]
add = 120,120,120
time = 1

[state -2, Start Charge FX3]
type = PalFx
triggerall = var(20) = 2
triggerall = var(31) = [20, 89]
trigger1 = time % 56 = [4,7]
trigger2 = time % 56 = [20,23]
add = 80,80,80
time = 1

[state -2, Start Charge FX4]
type = PalFx
triggerall = var(20) = 2
triggerall = var(31) = [20, 89]
trigger1 = time % 56 = [0,3]
trigger2 = time % 56 = [24,27]
add = 40,40,40
time = 1

[state -2, Start Charge FX5]
type = PalFx
triggerall = var(20) = 2
triggerall = var(31) = [20, 89]
trigger1 = time % 56 = [32,35]
trigger2 = time % 56 = [48,51]
add = -40,-40,-40
time = 1

[state -2, Start Charge FX6]
type = PalFx
triggerall = var(20) = 2
triggerall = var(31) = [20, 89]
trigger1 = time % 56 = [36,39]
trigger2 = time % 56 = [44,47]
add = -80,-80,-80
time = 1

[state -2, Start Charge FX7]
type = PalFx
triggerall = var(20) = 2
triggerall = var(31) = [20, 89]
trigger1 = time % 56 = [40,43]
add = -120,-120,-120
time = 1

[state -2, Level 1 Charge FX1]
type = PalFx
triggerall = var(20) = 2
triggerall = var(31) = [90, 179]
trigger1 = time % 42 = [12,15]
add = 160,160,160
time = 1

[state -2, Level 1 Charge FX2]
type = PalFx
triggerall = var(20) = 2
triggerall = var(31) = [90, 179]
trigger1 = time % 42 = [8,11]
trigger2 = time % 42 = [16,19]
add = 120,120,120
time = 1

[state -2, Level 1 Charge FX3]
type = PalFx
triggerall = var(20) = 2
triggerall = var(31) = [90, 179]
trigger1 = time % 42 = [4,7]
trigger2 = time % 42 = [20,23]
add = 80,80,80
time = 1

[state -2, Level 1 Charge FX4]
type = PalFx
triggerall = var(20) = 2
triggerall = var(31) = [90, 179]
trigger1 = time % 42 = [0,3]
trigger2 = time % 42 = [24,27]
add = 40,40,40
time = 1

[state -2, Level 1 Charge FX5]
type = PalFx
triggerall = var(20) = 2
triggerall = var(31) = [90, 179]
trigger1 = time % 42 = [32,35]
trigger2 = time % 42 = [48,51]
add = -40,-40,-40
time = 1

[state -2, Level 1 Charge FX6]
type = PalFx
triggerall = var(20) = 2
triggerall = var(31) = [90, 179]
trigger1 = time % 42 = [36,39]
trigger2 = time % 42 = [44,47]
add = -80,-80,-80
time = 1

[state -2, Level 1 Charge FX7]
type = PalFx
triggerall = var(20) = 2
triggerall = var(31) = [90, 179]
trigger1 = time % 42 = [40,43]
add = -120,-120,-120
time = 1

[state -2, Level 2 Charge FX1]
type = PalFx
triggerall = var(20) = 2
triggerall = var(31) = [180,359]
trigger1 = time % 28 = [0,1]
add = 70,-8,-74
time = 1
color = 0
ignorehitpause = 1

[state -2, Level 2 Charge FX2]
type = PalFx
triggerall = var(20) = 2
triggerall = var(31) = [180,359]
trigger1 = time % 28 = [2,3]
trigger2 = time % 28 = [26,27]
add = 102,24,-74
time = 1
color = 0
ignorehitpause = 1

[state -2, Level 2 Charge FX3]
type = PalFx
triggerall = var(20) = 2
triggerall = var(31) = [180,359]
trigger1 = time % 28 = [4,5]
trigger2 = time % 28 = [24,25]
add = 134,56,-74
time = 1
color = 0
ignorehitpause = 1

[state -2, Level 2 Charge FX4]
type = PalFx
triggerall = var(20) = 2
triggerall = var(31) = [180,359]
trigger1 = time % 28 = [6,7]
trigger2 = time % 28 = [22,23]
add = 166,88,-74
time = 1
color = 0
ignorehitpause = 1

[state -2, Level 2 Charge FX5]
type = PalFx
triggerall = var(20) = 2
triggerall = var(31) = [180,359]
trigger1 = time % 28 = [8,9]
trigger2 = time % 28 = [20,21]
add = 166,104,-58
time = 1
color = 0
ignorehitpause = 1

[state -2, Level 2 Charge FX6]
type = PalFx
triggerall = var(20) = 2
triggerall = var(31) = [180,359]
trigger1 = time % 28 = [10,11]
trigger2 = time % 28 = [18,19]
add = 166,120,-42
time = 1
ignorehitpause = 1
color = 0

[state -2, Level 2 Charge FX7]
type = PalFx
triggerall = var(20) = 2
triggerall = var(31) = [180,359]
trigger1 = time % 28 = [12,13]
trigger2 = time % 28 = [16,17]
add = 166,136,-26
time = 1
ignorehitpause = 1
color = 0

[state -2, Level 2 Charge FX8]
type = PalFx
triggerall = var(20) = 2
triggerall = var(31) = [180,359]
trigger1 = time % 28 = [14,15]
add = 166,152,-10
ignorehitpause = 1
color = 0
time = 1

[state -2, Level 3 Charge FX1]
type = PalFx
triggerall = var(20) = 2
triggerall = var(31) >= 360
trigger1 = time % 14 = [0,1]
add = 70,-8,74
time = 1
color = 0
ignorehitpause = 1

[state -2, Level 3 Charge FX2]
type = PalFx
triggerall = var(20) = 2
triggerall = var(31) >= 360
trigger1 = time % 14 = [2,3]
trigger2 = time % 14 = [26,27]
add = 102,24,126
time = 1
color = 0
ignorehitpause = 1

[state -2, Level 3 Charge FX3]
type = PalFx
triggerall = var(20) = 2
triggerall = var(31) >= 360
trigger1 = time % 14 = [4,5]
trigger2 = time % 14 = [24,25]
add = 134,56,128
time = 1
color = 0
ignorehitpause = 1

[state -2, Level 3 Charge FX4]
type = PalFx
triggerall = var(20) = 2
triggerall = var(31) >= 360
trigger1 = time % 14 = [6,7]
trigger2 = time % 14 = [22,23]
add = 166,88,170
time = 1
color = 0
ignorehitpause = 1

[state -2, Level 3 Charge FX5]
type = PalFx
triggerall = var(20) = 2
triggerall = var(31) >= 360
trigger1 = time % 14 = [8,9]
trigger2 = time % 14 = [20,21]
add = 166,104,170
time = 1
color = 0
ignorehitpause = 1

[state -2, Level 3 Charge FX6]
type = PalFx
triggerall = var(20) = 2
triggerall = var(31) >= 360
trigger1 = time % 14 = [10,11]
trigger2 = time % 14 = [18,19]
add = 166,120,170
time = 1
ignorehitpause = 1
color = 0

[state -2, Level 3 Charge FX7]
type = PalFx
triggerall = var(20) = 2
triggerall = var(31) >= 360
trigger1 = time % 14 = [12,13]
trigger2 = time % 14 = [16,17]
add = 166,136,170
time = 1
ignorehitpause = 1
color = 0

[state -2, Level 3 Charge FX8]
type = PalFx
triggerall = var(20) = 2
triggerall = var(31) >= 360
trigger1 = time % 14 = [14,15]
add = 166,152,170
ignorehitpause = 1
color = 0
time = 1
;------------------------------
[state -2, Glow Evil FX1]
type = PalFx
triggerall = var(35) = 1
trigger1 = time % 14 = [0,1]
add = 0,-200,-200
time = 1
color = 0
ignorehitpause = 1

[state -2, Glow Evil FX2]
type = PalFx
triggerall = var(35) = 1
trigger1 = time % 14 = [2,3]
trigger2 = time % 14 = [26,27]
add = 30,-170,-170
time = 1
color = 0
ignorehitpause = 1

[state -2, Glow Evil FX3]
type = PalFx
triggerall = var(35) = 1
trigger1 = time % 14 = [4,5]
trigger2 = time % 14 = [24,25]
add = 60,-140,-140
time = 1
color = 0
ignorehitpause = 1

[state -2, Glow Evil FX4]
type = PalFx
triggerall = var(35) = 1
trigger1 = time % 14 = [6,7]
trigger2 = time % 14 = [22,23]
add = 90,-110,-110
time = 1
color = 0
ignorehitpause = 1

[state -2, Glow Evil FX5]
type = PalFx
triggerall = var(35) = 1
trigger1 = time % 14 = [8,9]
trigger2 = time % 14 = [20,21]
add = 120,-80,-80
time = 1
color = 0
ignorehitpause = 1

[state -2, Glow Evil FX6]
type = PalFx
triggerall = var(35) = 1
trigger1 = time % 14 = [10,11]
trigger2 = time % 14 = [18,19]
add = 150,-50,-50
time = 1
ignorehitpause = 1
color = 0

[state -2, Glow Evil FX7]
type = PalFx
triggerall = var(35) = 1
trigger1 = time % 14 = [12,13]
trigger2 = time % 14 = [16,17]
add = 180,-20,-20
time = 1
ignorehitpause = 1
color = 0

[state -2, Glow Evil FX8]
type = PalFx
triggerall = var(35) = 1
trigger1 = time % 14 = [14,15]
add = 220,10,10
ignorehitpause = 1
color = 0
time = 1

[State -2, Clipboard]
type = DisplayToClipboard
trigger1 = 1
text = "damage=%f||AI?=%d||Weapon=%d||ChargeLv.=%d||Combo=%d"
params = fVar(10), Var(59), var(16), var(31), Var(28);p2bodydist X

[State -2, Damage based on hits]
type=varset
trigger1= numenemy
fvar(12)=enemynear,gethitvar(hitcount)
ignorehitpause=1

[State -2, Reset var when the opponent recovers]
type=varset
trigger1= numenemy
trigger1= (enemynear,movetype!=H)
trigger2= !numenemy
fvar(12)=1

[State -2, Dampener]
type=varset
trigger1=stateno!= [3000,3999]
fvar(10)= ifelse(fvar(12)=0, 1, ifelse(fvar(12)=1, 1, .85**fvar(12)))
ignorehitpause=1

[State -2, Dampener]
type=varset
trigger1=stateno = [3000,3999]
fvar(10)= ifelse(fvar(12)=0, 1, ifelse(fvar(12)=1, 1, .95**fvar(12)))
ignorehitpause=1

[State -2, Dampener itself]
type=attackmulset
trigger1= 1
value=fvar(10)
ignorehitpause=1
;==================================================================================
;==================================================================================
;==================================================================================


;---------------------------------------------------------------------------
; States that are executed when in self's state file (use statedef -3)
;---------------------------------------------------------------------------

[Statedef -3]

[State -3, VarAdd]
type = VarAdd
trigger1 = (HitPauseTime = 1) && (P2MoveType = H) && (MoveHit = 1) && (StateNo < 3000)
trigger2 = ProjHitTime(0) = 1
v = 21
value = 1
ignorehitpause = 1

[State -3, VarReset]
type = VarSet
trigger1 = P2MoveType != H
v = 21
value = 0

[State -3, AttackMulSet]
type = AttackMulSet
trigger1 = StateNo >= 3000
value = 1

[State -3, AttackMulSet]
type = AttackMulSet
triggerall = StateNo < 3000
trigger1 = Var(21) <= 1
value = 1

[State -3, AttackMulSet]
type = AttackMulSet
triggerall = StateNo < 3000
trigger1 = Var(21) = 2
value = 0.8

[State -3, AttackMulSet]
type = AttackMulSet
triggerall = StateNo < 3000
trigger1 = Var(21) = 3
value = 0.6

[State -3, AttackMulSet]
type = AttackMulSet
triggerall = StateNo < 3000
trigger1 = Var(21) = 4
value = 0.4

[State -3, AttackMulSet]
type = AttackMulSet
triggerall = StateNo < 3000
trigger1 = Var(21) >= 5
value = .2

[State -3, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != [1100,1155]
id = 1100
;ignorehitpause =
;persistent =

[State -3, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != [1100,1155]
id = 1192
;ignorehitpause =
;persistent =

[State -3, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != [3100,3199]
id = 3190
;ignorehitpause =
;persistent =

[State -3, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != [3100,3199]
id = 3191
;ignorehitpause =
;persistent =


;==================================================================================
;======| RELACIONADO À AI - AI RELATED |===========================================
;==================================================================================


; Kamek and Luchini appear to have been the first ones to use the IsHomeTeam AI activation concept.
; Feel free to move this controller to your character's intro state for slightly better efficiency.
[State -3, SetAI]
type = VarSet
triggerall = !RoundState
triggerall = IsHomeTeam
trigger1 = (TeamSide = 2)
trigger2 = (MatchNo > 1)
var(59) = 1

; Feel free to move this controller to your character's intro state for slightly better efficiency.
; Note that it may give P2 a slight unfair advantage in simul team vs mode, so you
; may want to disable it.  But then, since when has Mugen been about fairness? =P
[State -3, Unfair]; Is this reliable?
type = VarSet
trigger1 = !RoundState
trigger1 = (var(59) != 1)
trigger1 = NumPartner
trigger1 = (ID > Partner,ID)
trigger1 = (TeamSide = 2)
var(59) = 1

[State -3, AI Helper (Compatibly Partnered Version)]
type = Helper
trigger1 = !var(59)
trigger1 = !NumHelper(9742)
trigger1 = (RoundState = 2)
trigger1 = Alive
trigger1 = NumPartner
trigger1 = Partner,SelfAnimExist(9741)
HelperType = normal
name = "AI Helper (Simul Version)"
ID = 9742
pos = 9999999,99999
StateNo = 9742
KeyCtrl = 1
PauseMoveTime = 999999999
SuperMoveTime = 999999999

; If you want to use the Guard mode, Dummy mode, Distance, or Button jam dummy control
; options in Training mode without activating the dummy's AI while working on your
; character, then all you need to do is temporarily disable this controller.
; Or, if you want to permanently disable this controller in Training mode,
; then you could use the Training mode detection code available on my site
; ( http://www.shinmugen.net/winane/ ), and then just add a "(var(59)&63)>30"
; triggerall to this controller.
[State -3, AI Helper]
type = Helper
triggerall = !var(59)
triggerall = !NumHelper(9741)
triggerall = (RoundState = 2)
triggerall = Alive
trigger1 = !NumPartner
trigger2 = !(Partner,SelfAnimExist(9741))
HelperType = normal
name = "AI Helper"
ID = 9741
pos = 9999999,99999
StateNo = 9741
KeyCtrl = 1
PauseMoveTime = 999999999
SuperMoveTime = 999999999

[State -3, TurnBackOnAI]
type = VarSet
trigger1 = (var(59) = -2)
trigger1 = (RoundState = 2)
trigger1 = Alive
var(59) = 1

[State -3, HitPauseTime Helper]
type = Helper
triggerall = var(59)!=1
triggerall = !NumHelper(9743)
triggerall = (RoundState = 2)
triggerall = Alive
trigger1 = (MatchNo = 1)
trigger2 = NumPartner
trigger2 = (ID > Partner,ID)
HelperType = normal
name = "HitPauseTime"
ID = 9743
pos = 9999999,99999
StateNo = 9743
PauseMoveTime = 999999999
SuperMoveTime = 999999999

; According to Roque, this method works in Linux Mugen version 2002.04.14,
; whereas the old humanly-impossible commands method does not.
; It is very important that this controller NOT be moved to State -2.
; Note that this part won't work if AI.Cheat is turned off in mugen.cfg.
;[State -3, XOR]
;type = VarSet
;triggerall = var(59)!=1
;triggerall = (var(57) = GameTime-1)
;triggerall = NumHelper(9743)
;triggerall = !(Helper(9743),var(1))
;trigger1 = (command = "a") ^^ (command = "a2")
;trigger2 = (command = "b") ^^ (command = "b2")
;trigger3 = (command = "c") ^^ (command = "c2")
;trigger4 = (command = "x") ^^ (command = "x2")
;trigger5 = (command = "y") ^^ (command = "y2")
;trigger6 = (command = "z") ^^ (command = "z2")
;trigger7 = (command = "start") ^^ (command = "start2")
;trigger8 = (command = "holda") ^^ (command = "holda2")
;trigger9 = (command = "holdb") ^^ (command = "holdb2")
;trigger10 = (command = "holdc") ^^ (command = "holdc2")
;trigger11 = (command = "holdx") ^^ (command = "holdx2")
;trigger12 = (command = "holdy") ^^ (command = "holdy2")
;trigger13 = (command = "holdz") ^^ (command = "holdz2")
;trigger14 = (command = "holdstart") ^^ (command = "holdstart2")
;trigger15 = (command = "holdfwd") ^^ (command = "holdfwd2")
;trigger16 = (command = "holdback") ^^ (command = "holdback2")
;trigger17 = (command = "holdup") ^^ (command = "holdup2")
;trigger18 = (command = "holddown") ^^ (command = "holddown2")
;trigger19 = (command = "recovery") ^^ (command = "recovery2")
;Add more as desired. (See my notes in the CMD.)
;var(59) = 1

; It is very important that this controller NOT be moved to State -2, as putting
; it there would defeat the entire purpose of the controller, allowing the
; helper method or the XOR method to erroneously set the AI variable.
; And within State -3, don't put any ChangeState controllers before this
; controller, lest you unnecessarily delay your character's AI activation.
[State -3, GameTimeVar]
type = VarSet
trigger1 = 1
var(57) = GameTime
IgnoreHitPause = 1

; Within StateDef -3, none of your own AI-related code should come after the code
; provided here (and putting it before the code is also generally a bad idea).
; It's better to use State -1 (or, in special circumstances, State -2) instead.

;==================================================================================
;==================================================================================
;==================================================================================

;Ths controller plays a sound everytime the player lands from a jump, or
;from a back-dash.
[State -3, Landing Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 52 ;Jump land
trigger2 = stateno = 106 ;Run-back land
trigger3 = stateno = 101
trigger4 = stateno = [900,901]
value = s100,0

[State -3, Landing Anim]
type = Explod
triggerall = Time = 1
trigger1 = stateno = 52 ;Jump land
trigger2 = stateno = 106
trigger3 = stateno = 101
anim = 7503
ID = 8030
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove = 9999
pausemove = 9999
scale = .6,.6
sprpriority = -1
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause =1
persistent =0

[State -3, AfterImagePersist]
type=afterimagetime
;trigger1=stateno=[1600,1602]
;trigger2=stateno=[1900,1903] ;&& time <= 80
trigger1=stateno=[3000,3005]
trigger2=stateno=[3400,3404]
time=2

[State -3, StopSnd]
type = StopSnd
trigger1 = movetype = H
trigger2 = stateno != [3000,3999]
channel = 15
ignorehitpause = 1

[State -3, AfterImageTime]
type = AfterImageTime
trigger1 = numhelper(7005)=1
time = 0
ignorehitpause = 1
;persistent =  0

;------------------------------------------------------------------------------------------------------
;wall hit
[state 5100,2]
type = explod
triggerall = numtarget
triggerall = stateno!=0
triggerall = stateno!=3005
triggerall = stateno!=3000
triggerall = stateno!=1000
triggerall = stateno!=1005
triggerall = stateno!=1010
triggerall = stateno!=50
;triggerall = stateno!=[5000,5999]
;triggerall = movetype ! =H
triggerall = var(42)
triggerall = enemynear,stateno != [120,159]
trigger1 = enemynear,movetype = h
trigger1 = enemynear,backedgedist <= 15
trigger1 = enemynear,statetype = a
trigger1 = enemynear,vel x < 0
anim = F70
pos = (enemy,const(size.mid.pos.x))-20,(target,const(size.mid.pos.y))
postype = p2
scale = 1,1
sprpriority = 3
bindtime = 1
facing = -1
removetime = -2
id = 7024
shadow = 0,0,0
ownpal = 1
;removeongethit = 1
;ignorehitpause = 1
;vel = -2,0
;accel = -0.1,0

[state 5100,2]
type = explod
triggerall = numtarget
triggerall = stateno!=0
triggerall = stateno!=3005
triggerall = stateno!=3000
triggerall = stateno!=1000
triggerall = stateno!=1005
triggerall = stateno!=1010
triggerall = stateno!=50
;triggerall = stateno!=[5000,5999]
;triggerall = movetype ! =H
triggerall = var(42)
triggerall = enemynear,stateno != [120,159]
trigger1 = enemynear,movetype = h
trigger1 = enemynear,backedgedist <= 15
trigger1 = enemynear,statetype = a
trigger1 = enemynear,vel x < 0
anim = F70
pos = (enemy,const(size.mid.pos.x))-20,(target,const(size.mid.pos.y))
postype = p2
sprpriority = -3
bindtime = 1
facing = -1
scale = 1,1
removetime = -2
id = 7024
shadow = -1
ownpal = 1
;removeongethit = 1
;ignorehitpause = 1
;vel = -2,0
;accel = -0.1,0

[state 5100,2]
type = playsnd
triggerall = numtarget
triggerall = stateno!=0
triggerall = stateno!=3005
triggerall = stateno!=3000
triggerall = stateno!=1000
triggerall = stateno!=1005
triggerall = stateno!=1010
triggerall = stateno!=50
;triggerall = stateno!=[5000,5999]
;triggerall = movetype ! =H
triggerall = var(42)
triggerall = numenemy
triggerall = enemynear,stateno != [120,159]
trigger1 = stateno != 4003
trigger1 = enemynear,movetype = h
trigger1 = enemynear,backedgedist < 15
trigger1 = enemynear,statetype = a
trigger1 = enemynear,vel x < 0
persistent = 0
value = 7000,2
channel = 4
volume = 255

[state 200, 3]
type = varset
;triggerall = stateno!=[5000,5999]
;triggerall = movetype ! =H
triggerall = var(42)
triggerall = numenemy
trigger1 = enemynear,movetype = h
trigger1 = enemynear,backedgedist < 15
trigger1 = enemynear,statetype = a
trigger1 = enemynear,vel x < 0
v = 42
value = 0

[state -3, 2];combo hosei
type = varset
trigger1 = 1
v = 24
value = var(22)

[state -3, 2];combo hosei
type = varset
trigger1 = 1
v = 22
value = var(25)+hitcount

[state -3, 2];combo hosei
type = varset
trigger1 = enemynear,movetype != H
v = 25
value = 0

;***************
[state -3, 2];combo
type = varset
trigger1 = var(22)>var(24)
v = 42
value = 1

[State -3, VarSet]
type = VarSet
trigger1 = stateno != [3000,3999]
;trigger1 = animtime = 0
v = 45   ;fv = 10
value = 0
