[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 = 30		;Time which player lies down for, before getting up
airjuggle = 15		;Number of points for juggling
sparkno = 2			;Default hit spark number for HitDefs
guard.sparkno = 40	;Default guard spark number
KO.echo = 0			;1 to enable echo on KO
volume = 128			;Volume offset (negative for softer)
IntPersistIndex = 31	;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 = 17
ground.front = 24
air.back = 13
air.front = 20
z.width = 3
height = 60
attack.width = 4,4
attack.dist = 160
proj.attack.dist = 90
proj.doscale = 0
head.pos = 15, -60
mid.pos = 6, -40
draw.offset=0,1 		;Player drawing offset in pixels (x, y)

[Velocity]
walk.fwd  = 4
walk.back = -3.5
run.fwd  = 8, -3
run.back = -7,-3
jump.neu = 0,-9.5
jump.back = -4.5
jump.fwd = 4.5
runjump.back = -7,-10
runjump.fwd = 7,-10
airjump.neu = 0,-7.5
airjump.back = -4.5
airjump.fwd = 4.5

[Movement]
airjump.num = 0		;Number of air jumps allowed (opt)
airjump.height = 35	;Minimum distance from ground before you can air jump (opt)
yaccel = .49		;Vertical acceleration
stand.friction = .85	;Friction coefficient when standing
crouch.friction = .82	;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 = 2
value = S3,16
volume = 255
channel = 5

;---------------------------KO FX--------------------------
[State 5150,assertspecial]
type = assertspecial
;triggerall = matchover
trigger1 = time >= 53
flag = invisible
flag2 = noshadow

[state 5150,palfx]
type = palfx
trigger1 = time = [43,44]
add = 50,50,50
time = 1

[state 5150,palfx]
type = palfx
trigger1 = time = [45,46]
add = 100,100,100
time = 1

[state 5150,palfx]
type = palfx
trigger1 = time = [47,48]
add = 150,150,150
time = 1

[state 5150,palfx]
type = palfx
trigger1 = time = [49,50]
add = 200,200,200
time = 1

[state 5150,palfx]
type = palfx
trigger1 = time = [51,52]
add = 250,250,250
time = 1

[State 5150,kofx]
type = Explod
trigger1 = time = 53
anim = 5999
id = 5999
postype = p1
pos = ceil(const(size.mid.pos.x)*const(size.xscale)),ceil(-5+const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = 0, -2
removetime = 300
removeongethit = 1

[State 5150,kofx]
type = Explod
trigger1 = time = 53
anim = 5999
id = 5999
postype = p1
pos = ceil(-3+const(size.mid.pos.x)*const(size.xscale)),ceil(-3+const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = -1.5, -1.5
removetime = 300
removeongethit = 1

[State 5150,kofx]
type = Explod
trigger1 = time = 53
anim = 5999
id = 5999
postype = p1
pos = ceil(-5+const(size.mid.pos.x)*const(size.xscale)),ceil(const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = -2, 0
removetime = 300
removeongethit = 1

[State 5150,kofx]
type = Explod
trigger1 = time = 53
anim = 5999
id = 5999
postype = p1
pos = ceil(-3+const(size.mid.pos.x)*const(size.xscale)),ceil(3+const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = -1.5, 1.5
removetime = 300
removeongethit = 1

[State 5150,kofx]
type = Explod
trigger1 = time = 53
anim = 5999
id = 5999
postype = p1
pos = ceil(const(size.mid.pos.x)*const(size.xscale)),ceil(5+const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = 0, 2
removetime = 300
removeongethit = 1

[State 5150,kofx]
type = Explod
trigger1 = time = 53
anim = 5999
id = 5999
postype = p1
pos = ceil(3+const(size.mid.pos.x)*const(size.xscale)),ceil(3+const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = 1.5, 1.5
removetime = 300
removeongethit = 1

[State 5150,kofx]
type = Explod
trigger1 = time = 53
anim = 5999
id = 5999
postype = p1
pos = ceil(5+const(size.mid.pos.x)*const(size.xscale)),ceil(const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = 2, 0
removetime = 300
removeongethit = 1

[State 5150,kofx]
type = Explod
trigger1 = time = 53
anim = 5999
id = 5999
postype = p1
pos = ceil(3+const(size.mid.pos.x)*const(size.xscale)),ceil(-3+const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = 1.5, -1.5
removetime = 300
removeongethit = 1

[State 5150,kofx]
type = Explod
trigger1 = time = 53
anim = 5999
id = 5999
postype = p1
pos = ceil(const(size.mid.pos.x)*const(size.xscale)),ceil(const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = -0.5, -1
removetime = 300
removeongethit = 1

[State 5150,kofx]
type = Explod
trigger1 = time = 53
anim = 5999
id = 5999
postype = p1
pos = ceil(const(size.mid.pos.x)*const(size.xscale)),ceil(const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = -1, -0.5
removetime = 300
removeongethit = 1

[State 5150,kofx]
type = Explod
trigger1 = time = 53
anim = 5999
id = 5999
postype = p1
pos = ceil(const(size.mid.pos.x)*const(size.xscale)),ceil(const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = -0.5, 1
removetime = 300
removeongethit = 1

[State 5150,kofx]
type = Explod
trigger1 = time = 53
anim = 5999
id = 5999
postype = p1
pos = ceil(const(size.mid.pos.x)*const(size.xscale)),ceil(const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = -1, 0.5
removetime = 300
removeongethit = 1

[State 5150,kofx]
type = Explod
trigger1 = time = 53
anim = 5999
id = 5999
postype = p1
pos = ceil(const(size.mid.pos.x)*const(size.xscale)),ceil(const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = 0.5, 1
removetime = 300
removeongethit = 1

[State 5150,kofx]
type = Explod
trigger1 = time = 53
anim = 5999
id = 5999
postype = p1
pos = ceil(const(size.mid.pos.x)*const(size.xscale)),ceil(const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = 1, 0.5
removetime = 300
removeongethit = 1

[State 5150,kofx]
type = Explod
trigger1 = time = 53
anim = 5999
id = 5999
postype = p1
pos = ceil(const(size.mid.pos.x)*const(size.xscale)),ceil(const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = 0.5, -1
removetime = 300
removeongethit = 1

[State 5150,kofx]
type = Explod
trigger1 = time = 53
anim = 5999
id = 5999
postype = p1
pos = ceil(const(size.mid.pos.x)*const(size.xscale)),ceil(const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = 1, -0.5
removetime = 300
removeongethit = 1

[state 5150,snd]
type = playsnd
trigger1 = time = 53
value = 5500,1

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

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

[State 180, winSGS]
type=changestate
trigger1=prevstateno=340
value=340

[State 0, ChangeState]
type = ChangeState
trigger1 =prevstateno!=340
value = ifelse(matchover, 185, 181+(random%2))

;---------------------------------------------------------------------------
; Win pose 1 (peace Signs)
[Statedef 181]
type = S
ctrl = 0
anim = 180+(random%2)
velset = 0,0

[State 0, PlaySnd]
type = PlaySnd
triggerall = anim = 180
trigger1 = animelem = 3
value = S3,23
volume = 255
channel = 5

[State 0, PlaySnd]
type = PlaySnd
triggerall = anim = 181
trigger1 = animelem = 3
value = S3,19
volume = 255
channel = 5
[State 0, PlaySnd]
type = PlaySnd
triggerall = anim = 181
trigger1 = animelem = 9
value = S3,20+(random%3)
volume = 255
channel = 5

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = time <= 180
flag = roundnotover

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

;---------------------------------------------------------------------------
; Win pose 1 (peace Signs)
[Statedef 182]
type = S
ctrl = 0
anim = 182
velset = 0,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 8
value = S3,17
volume = 255
channel = 5

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = time <= 180
flag = roundnotover

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

;---------------------------------------------------------------------------
; Win pose (Match Over and Win)
[Statedef 185]
type = S
ctrl = 0
;anim = 185
velset = 0,0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = time < 360
flag = roundnotover

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time >= 180
trigger1 = anim != 185
value = 185

[State 0, PlaySnd]
type = PlaySnd
triggerall = anim != 185
trigger1 = time = 10
value = S185,0
volume = 255
channel = -1

[State 0, PlaySnd]
type = PlaySnd
triggerall = anim = 185
trigger1 = animelem = 3
value = S3,23
volume = 255
channel = 5

[State 0, PlaySnd]
type = PlaySnd
triggerall = anim = 185
trigger1 = animelem = 5
value = S199,1
volume = 255
channel = -1

[State 0, PalFXWiz]
type = PalFX
triggerall = anim = 185
trigger1 = animelemtime(4)>=55&&AnimElemTime(4)<=59
time = 1
add = 60,60,60
[State 0, PalFXWiz]
type = PalFX
triggerall = anim = 185
trigger1 = animelemtime(4)>=60&&AnimElemTime(4)<=64
time = 1
add = 120,120,120
[State 0, PalFXWiz]
type = PalFX
triggerall = anim = 185
trigger1 = animelemtime(4)>=65&&AnimElemTime(4)<=69
time = 1
add = 180,180,180
[State 0, PalFXWiz]
type = PalFX
triggerall = anim = 185
trigger1 = animelemtime(4)=70
time = 1
add = 255,255,255

[State 0, VelSet]
type = VelSet
triggerall = anim = 185
trigger1 = animelemtime(5)>=0
y = -15

[State 0, ScreenBound]
type = ScreenBound
triggerall = anim = 185
trigger1 = animelemtime(5)>=0
value = 0
movecamera = 1,0

[State 0, AssertSpecial]
type = AssertSpecial
triggerall = anim = 185
trigger1 = animelemtime(5)>=0
flag = noshadow

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

;---------------------------------------------------------------------------
; Introduction
[Statedef 190]
type = S
ctrl = 0
anim = 9741
velset = 0,0

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

[State 190, 1]
type = ChangeState
trigger1 = ishometeam
trigger1 = TeamSide = 2
trigger2 = !ishometeam
trigger2 = TeamSide = 1
trigger2 = matchno=1
value = 193;+(random%2)

[State 190, 1] ;Freeze animation until PreIntro is over
type = ChangeState
trigger1 = time = 0
;trigger1 = var(10)=0
value = 191

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

[State 190, 4] ;Change to stand state
type = ChangeState
trigger1 = AnimTime = 0
value = 22
;---------------------------------------------------------------------------
; Introduction
[Statedef 191]
type = S
ctrl = 0
anim = 190;+(random%2)
velset = 0,0

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

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

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

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

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

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

[State 191, VelSet]
type = VelSet
trigger1 = time >= 15
x = 0
y = 15

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

;---------------------------------------------------------------------------
; Introduction
[Statedef 192]
type = S
ctrl = 0
anim = 191;+(random%2)
velset = 0,0

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

[State 0, PlaySnd]
type = PlaySnd
triggerall = Anim=191
trigger1 = AnimElem=2
value = S3,24
volume = 255
channel = 5

[State 191, VelSet]
type = VelSet
trigger1 = !time
y = 0

[State 0, PalFXWiz]
type = PalFX
trigger1 = time <= 30
time = 1
add = 255,255,255
[State 0, PalFXWiz]
type = PalFX
trigger1 = time = [31,35]
time = 1
add = 180,180,180
[State 0, PalFXWiz]
type = PalFX
trigger1 = time = [36,40]
time = 1
add = 120,120,120
[State 0, PalFXWiz]
type = PalFX
trigger1 = time = [41,45]
time = 1
add = 60,60,60

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time <= 35
trigger1 = (time%11)=1
value = S10,21
volume = 255
channel = 5

[State 0, Explod]
type = Explod
triggerall = numexplod(192)=0
trigger1 = !time
anim = 192
ID = 190
postype = p1  ;p2,front,back,left,right
bindtime = -1
pos = 0,ceil(-25*(const(size.yscale)))
removetime = -2
scale = const(size.xscale),const(size.yscale)
sprpriority = 5
ownpal = 1
removeongethit = 1

[State 190, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 22
;---------------------------------------------------------------------------
; Introduction
[Statedef 193]
type = S
ctrl = 0
anim = 190;+(random%2)
velset = 0,0

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

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

[State 191, Ready]
type = 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 191, Explod]
type = Explod
trigger1 = time = 125
anim =8320
ID = 8320
pos = 0,655
postype = p1  ;p2,front,back,left,right
bindtime = 1
removetime = -2
scale = 1,.7
sprpriority = 5
ontop = 1
ownpal = 1
removeongethit = 0

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

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

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

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

[State 191, VelSet]
type = VelSet
trigger1 = time = 125
x = 0
y = 15

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

;---------------------------------------------------------------------------
; Introduction
[Statedef 194]
type = S
ctrl = 0
anim = 193;+(random%2)
velset = 0,0

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

[State 0, PlaySnd]
type = PlaySnd
triggerall = Anim=193
trigger1 = AnimElem=2
value = S3,24
volume = 255
channel = 5

[State 191, VelSet]
type = VelSet
trigger1 = !time
y = 0

[State 0, PalFXWiz]
type = PalFX
trigger1 = time <= 75
time = 1
add = 255,255,255
[State 0, PalFXWiz]
type = PalFX
trigger1 = time = [76,80]
time = 1
add = 180,180,180
[State 0, PalFXWiz]
type = PalFX
trigger1 = time = [81,85]
time = 1
add = 120,120,120
[State 0, PalFXWiz]
type = PalFX
trigger1 = time = [86,90]
time = 1
add = 60,60,60

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time <= 70
trigger1 = (time%11)=1
value = S10,21
volume = 255
channel = 5

[State 0, Explod]
type = Explod
triggerall = numexplod(194)=0
trigger1 = !time
anim = 194
ID = 194
postype = p1  ;p2,front,back,left,right
bindtime = -1
pos = 0,ceil(-25*(const(size.yscale)))
removetime = -2
scale = const(size.xscale),const(size.yscale)
sprpriority = 5
ownpal = 1
removeongethit = 1

[State 190, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 22
;---------------------------------------------------------------------------
; Taunt
[Statedef 195]
type = S
ctrl = 0
anim = 195
velset = 0,0
movetype = I
physics = S
juggle = 1
sprpriority = 2

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

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

[State 195, 2]
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
;---------------------------------------------------------------------------
; Throw Forward - Attempt
[Statedef 800]
type    = S
movetype= A
physics = S
juggle  = 0
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 = -10, -48
hitsound = S1,16
sprpriority = 1
p1facing = ifelse (command = "holdfwd", -1, 1)
p2facing = 1
p1stateno = 801
p2stateno = 805
guard.dist = 0
fall.recover=0
fall = 1

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

;-------------------------------
[Statedef 801]
type = S
movetype = A
physics = S
anim = 801
velset = 0,0
sprpriority = 2

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

[State 3400, ENEMY ESCAPES!!]
type = null;ChangeState
trigger1 = (time <= 10) && (numtarget = 0)
value = 345
ctrl = 0

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = S3,1;+(random%3)
volume = 255
channel = 5

[State 0, TargetBind]
type = TargetBind
trigger1 = AnimElemTime(1)>=0&&AnimElemTime(2)<0
pos = 50,-40
[State 0, TargetBind]
type = TargetBind
trigger1 = AnimElemTime(2)>=0&&AnimElemTime(3)<0
pos = 55,-60
[State 0, TargetBind]
type = TargetBind
trigger1 = AnimElemTime(3)=0&&AnimElemTime(4)<0
pos = 50,-60
[State 0, TargetBind]
type = TargetBind
trigger1 = AnimElemTime(4)=0&&AnimElemTime(5)<0
pos = 35,-70
[State 0, TargetBind]
type = TargetBind
trigger1 = AnimElemTime(5)=0&&AnimElemTime(6)<0
pos = 20,-55
[State 0, TargetBind]
type = TargetBind
trigger1 = AnimElemTime(6)=0&&AnimElemTime(7)<0
pos = -40,-5

[State 0, Turn]
type = Turn
trigger1 = animelem=9

[State 0, Width]
type = Width
trigger1 = animelemtime(9)<0
value = 50,50
[State 0, Width]
type = Width
trigger1 = animelemtime(9)>=0&&animelemtime(10)<0
value = 25,25

[State 0, Explod]
type = Explod
triggerall = numtarget
trigger1 = animelem=7
anim = 8030
ID = 8030
pos = 0,0
postype = p2
bindtime = 1
removetime = -2
supermovetime=9999
pausemove=9999
scale = enemynear,const(size.xscale),enemynear,const(size.yscale)
sprpriority = -1
ownpal = 1
removeongethit = 0
ignorehitpause = 1

[State 0, EnvShake]
type = EnvShake
triggerall = numtarget
trigger1 = animelem=7
time = 10
freq = 60
ampl = 5

[State 0, PlaySnd]
type = PlaySnd
triggerall = numtarget
trigger1 = animelem=7
value = S181,0
volume = 128
channel = -1

[State 0, TargetLifeAdd]
type = TargetLifeAdd
triggerall = numtarget
trigger1 = AnimElem=7
value = ceil(-95*fvar(10))
kill = 1

[State 920, 9]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;-------------------------------------------
[Statedef 805]
type = A
movetype = H
physics = N
velset = 0,0
sprpriority = 0

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

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

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

[State 0, Turn]
type = Turn
trigger1 =animtime=0

[State 0, VelSet]
type = VelSet
trigger1 = animtime=0
x = -5

[State 0, SelfState]
type = SelfState
trigger1 = AnimTime = 0
value = 5100
ctrl = 0

;---------------------------------------------------------------------------
; Air Throw Forward - Attempt
[Statedef 810]
type    = A
movetype= A
physics = A
juggle  = ifelse((prevstateno = [600,699]), 0, 7)
ctrl = 0
anim = 810
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 = A, NT
hitflag = AF
priority = 1, Miss
sparkno = -1
sparkxy = -10, -64
hitsound = S1,16
sprpriority = 1
p1facing = ifelse (command = "holdfwd", -1, 1)
p2facing = 1
p1stateno = 811
p2stateno = 815
guard.dist = 0
yaccel = .65
fall.yvelocity=0
fall.recover=0
fall = 1

[State 0, ChangeAnim]
type = ChangeAnim
triggerall=anim=810
trigger1 = animtime=0
elem=6
value = 44

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = anim=44
movetype = I

[State 7001, VelAdd]
type = VelAdd
triggerall=var(11)=1&&anim=44
trigger1 = Vel X >= -2.5
trigger1 = command = "holdback"
x = -.5

[State 7001, VelAdd]
type = VelAdd
triggerall=var(11)=1&&anim=44
trigger1 = Vel X <= 2.5
trigger1 = command = "holdfwd"
x = .5

[State 0, VelMul]
type = VelMul
trigger1=var(11)=1&&anim=44
x = .95

[State 0, CtrlSet]
type = CtrlSet
trigger1 = anim=44
value = 1

;-------------------------------
[Statedef 811]
type = A
movetype = A
physics = N
anim = 811
sprpriority = 2

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

[State 0, PosFreeze]
type = PosFreeze
trigger1 = time <= 15
value = 1

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

[State 0, VelAdd]
type = VelAdd
trigger1 = time >= 15
y = const(movement.yaccel)

[State 0, PosSet]
type = PosSet
trigger1 = vel Y >= 0
trigger1 = pos Y >= 24
y = 24

[State 0, VelSet]
type = VelSet
trigger1 = vel Y >= 0
trigger1 = pos Y >= 24
x = 0
y = 0

[State 920, 0]
type = NotHitBy
trigger1 = anim = 811
value = SCA

[State 3400, ENEMY ESCAPES!!]
type = null;ChangeState
trigger1 = (time <= 10) && (numtarget = 0)
value = 345
ctrl = 0

[State 0, TargetBind]
type = TargetBind
triggerall = anim = 811
trigger1 = AnimElemTime(1)>=0&&AnimElemTime(2)<0
pos = 50,-64
[State 0, TargetBind]
type = TargetBind
triggerall = anim = 811
trigger1 = AnimElemTime(2)>=0&&AnimElemTime(3)<0
pos = 55,-84
[State 0, TargetBind]
type = TargetBind
triggerall = anim = 811
trigger1 = AnimElemTime(3)>=0&&AnimElemTime(4)<0
pos = 50,-84
[State 0, TargetBind]
type = TargetBind
triggerall = anim = 811
trigger1 = AnimElemTime(4)>=0&&AnimElemTime(6)<0
pos = 35,-94
[State 0, TargetBind]
type = TargetBind
triggerall = anim = 811
trigger1 = AnimElemTime(5)>=0&&AnimElemTime(6)<0
pos = 20,-79
[State 0, TargetBind]
type = TargetBind
triggerall = anim = 811
trigger1 = AnimElemTime(6)>=0
pos = -10,-40

[State 0, Width]
type = Width
trigger1 = anim = 811
value = 50,50

[State 0, ChangeState]
type = ChangeState
triggerall = animelemtime(6)>=2
trigger1 = Vel Y >= 0
trigger1 = Pos Y >= 0
value = 812

;-------------------------------
[Statedef 812]
type = S
movetype = A
physics = S
anim = 812
sprpriority = 2

[State 0, TargetState]
type = TargetState
trigger1 = !time
value = 816

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

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

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

[State 0, TargetBind]
type = TargetBind
trigger1 = AnimElemTime(1)=0
time=1
pos = 40,-5

[State 0, Turn]
type = Turn
trigger1 = !time

[State 0, Width]
type = Width
trigger1 = 1
value = 25,25

[State 0, Explod]
type = Explod
trigger1 = numtarget
trigger1 = animelem=1
anim = 8030
ID = 8030
pos = 0,0
postype = p2
bindtime = 1
removetime = -2
supermovetime=9999
pausemove=9999
scale = enemynear,const(size.xscale),enemynear,const(size.yscale)
sprpriority = -1
ownpal = 1
removeongethit = 0
ignorehitpause = 1

[State 0, EnvShake]
type = EnvShake
trigger1 = numtarget
trigger1 = animelem=1
time = 10
freq = 60
ampl = 5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = numtarget
trigger1 = animelem=1
value = S181,0
volume = 128
channel = -1

[State 0, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = numtarget
trigger1 = AnimElem=1
value = ceil(-48*fvar(10))
kill = 1

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

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

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

;-------------------------------------------
[Statedef 815]
type = A
movetype = H
physics = N
velset = 0,0
sprpriority = 0

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

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

;-------------------------------------------
[Statedef 816]
type = A
movetype = H
physics = N
sprpriority = 0

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

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

[State 925, 1]
type = ChangeAnim2
trigger1 = time = 0
value = 805
elem = 6

[State 0, Turn]
type = Turn
trigger1 = time >= 2

[State 0, VelSet]
type = VelSet
trigger1 = time >= 2
x = -2
y = -7.5

[State 0, SelfState]
type = SelfState
trigger1 = time >= 2
value = 5050
ctrl = 0

;---------------------------------------------------------------------------
; Throw Forward - Attempt
[Statedef 820]
type    = S
movetype= A
physics = S
juggle  = 0
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 = -10, -48
hitsound = S1,16
sprpriority = 1
p1facing = ifelse (command = "holdfwd", -1, 1)
p2facing = 1
p1stateno = 821
p2stateno = 825
ground.velocity = 15,-9
air.velocity = 15,-9
yaccel = .65
guard.dist = 0

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

;-------------------------------
[Statedef 821]
type = S
movetype = A
physics = S
anim = 801
velset = 0,0
sprpriority = 2

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

[State 3400, ENEMY ESCAPES!!]
type = null;ChangeState
trigger1 = (time <= 10) && (numtarget = 0)
value = 345
ctrl = 0

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = S3,1+(random%3)
volume = 255
channel = 5

[State 0, TargetBind]
type = TargetBind
trigger1 = AnimElemTime(1)>=0&&AnimElemTime(2)<0
pos = 50,-40
[State 0, TargetBind]
type = TargetBind
trigger1 = AnimElemTime(2)>=0&&AnimElemTime(3)<0
pos = 55,-60
[State 0, TargetBind]
type = TargetBind
trigger1 = AnimElemTime(3)=0&&AnimElemTime(4)<0
pos = 50,-60
[State 0, TargetBind]
type = TargetBind
trigger1 = AnimElemTime(4)=0&&AnimElemTime(5)<0
pos = 35,-70
[State 0, TargetBind]
type = TargetBind
trigger1 = AnimElemTime(5)=0&&AnimElemTime(6)<0
pos = 20,-55
[State 0, TargetBind]
type = TargetBind
trigger1 = AnimElemTime(6)=0
pos = -40,-45

[State 0, Turn]
type = Turn
trigger1 = animelem=9

[State 0, Width]
type = Width
trigger1 = animelemtime(9)<0
value = 50,50
[State 0, Width]
type = Width
trigger1 = animelemtime(9)>=0&&animelemtime(10)<0
value = 25,25

[State 0, TargetLifeAdd]
type = TargetLifeAdd
triggerall = numtarget
trigger1 = AnimElem=6
value = ceil(-95*fvar(10))
kill = 1

[State 920, 9]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;-------------------------------------------
[Statedef 825]
type = A
movetype = H
physics = N
velset = 0,0
sprpriority = 0

[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 = anim=806
value = 0
movecamera = 0,0

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

[State 0, Turn]
type = Turn
trigger1 = time = 30

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

[State 5050, 1]
type = ChangeAnim
trigger1 = selfanimexist(5050)
trigger1 = time > 30
value = 5050

[State 5050, 1]
type = ChangeAnim2
trigger1 = !selfanimexist(5050)
trigger1 = time > 30
value = 806
elem = 6

[State 0, VelSet]
type = VelSet
trigger1 = Time = 30
x = -15
y = -12

[State 0, VelAdd]
type = VelAdd
trigger1 = time >= 30
y = .65

[State 0, PosAdd]
type = PosAdd
;triggerall = Vel Y >= 0
trigger1 = Time = 30
y = -const(size.mid.pos.y)

[State 0, ChangeState]
type = ChangeState
trigger1 = backedgebodydist <= 15
trigger1 = time >= 30
trigger1 = pos Y <= -60
value = 826

[State 0, SelfState]
type = SelfState
triggerall = backedgebodydist > 15
trigger1 = Vel Y >= 0
trigger1 = Time >= 30;Pos Y >= (const(size.mid.pos.y)/2)
value = 5040

;-------------------------------------------
[Statedef 826]
type = A
movetype = H
physics = N
velset = 0,0
sprpriority = 0

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

[State 0, Turn]
type = Turn
trigger1 = AnimTime = 0

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

[State 0, VelSet]
type = VelSet
trigger1 = animtime=0
x = -3.25
y = -9

[State 0, Explod]
type = Explod
trigger1 = !time
anim = F72
pos = 0,floor(ScreenPos Y)-50
postype = Back
sprpriority = 3

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = F7,2
channel = -1
freqmul = 1.0

[State 0, EnvShake]
type = EnvShake
trigger1 = !time
time = 15
ampl = -5

[State 0, SelfState]
type = SelfState
trigger1 = animtime = 0
value = 5050

;---------------------------------------------------------------------------
; roll recovery
[Statedef 900]
type    = L				;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 = 2
value = S100,4
volume = 0
channel = -1

[State 0, PlayerPush]
type = PlayerPush
trigger1 = time = [3,24]
value = 0

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

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 9
physics = C

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

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

[State 0, Explod]
type = Explod
triggerall = time = [3,24]
trigger1 = (time%3)=1
anim = 8025
ID = 8025
pos = -35,0
postype = p1
bindtime = 1
random = 0,0
removetime = -2
supermovetime=9999
pausemovetime=9999
scale = const(size.xscale)/2,const(size.yscale)/2
sprpriority = -1

[State 0, Landing Sound]
type = PlaySnd
trigger1 = animelem=14
value = s100,0

[State 0, Landing Anim]
type = Explod
trigger1 = animelem=14
anim = 7503
ID = 8030
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1
removetime = -2
supermove = 9999
pausemove = 9999
scale = .6,.6
sprpriority = -1
ownpal = 1
removeongethit = 0
ignorehitpause =1
persistent =0

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

[State 0, ChangeAnim]
type = ChangeState
trigger1 = animelemtime(2)>=0&&AnimElemTime(9)<0
trigger1 = FrontEdgeBodyDist <= 10
trigger2 = command = "holddown"
trigger2 = animelem = 9
value = 11
ctrl = 1
;---------------------------------------------------------------------------
; roll recovery
[Statedef 901]
type    = L				;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 = 2
value = S100,4
volume = 0
channel = -1

[State 0, PlayerPush]
type = PlayerPush
trigger1 = time = [3,24]
value = 0

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

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 9
physics = C

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

[State 0, Explod]
type = Explod
triggerall = time = [3,24]
trigger1 = (time%3)=1
anim = 8025
ID = 8025
pos = 35,0
postype = p1
bindtime = 1
random = 0,0
removetime = -2
supermovetime=9999
pausemovetime=9999
scale = const(size.xscale)/2,const(size.yscale)/2
sprpriority = -1

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

[State 0, Landing Sound]
type = PlaySnd
trigger1 = animelem=14
value = s100,0

[State 0, Landing Anim]
type = Explod
trigger1 = animelem=14
anim = 7503
ID = 8030
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1
removetime = -2
supermove = 9999
pausemove = 9999
scale = .6,.6
sprpriority = -1
ownpal = 1
removeongethit = 0
ignorehitpause =1
persistent =0

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

[State 0, ChangeAnim]
type = ChangeState
trigger1 = animelemtime(2)>=0&&AnimElemTime(9)<0
trigger1 = BackEdgeBodyDist <= 10
trigger2 = command = "holddown"
trigger2 = animelem = 9
value = 11
ctrl = 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=s3,0
p2defmul=1
darken=0

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

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

;==========<ZERO COUNTER>==========
[Statedef 751]
type=A
physics=N
movetype=I
anim=751
ctrl=0
velset=0,0
poweradd=-500
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=s3,0
p2defmul=1
darken=0

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

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

;;-----------------------------
; 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
ctrl = 0				;Set ctrl (Def: no change)
anim = 950				;Change animation (Def: no change)
poweradd = 0			;Power to add (Def: 0)
sprpriority = -1			;Set layering priority to 2 (in front)

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

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

[State 0, PalFX]
type = PalFX
trigger1 = time = [2,3]
trigger2 = time = [23,24]
time = 2
add = 15,15,15
[State 0, PalFX]
type = PalFX
trigger1 = time = [4,5]
trigger2 = time = [21,22]
time = 2
add = 30,30,30
[State 0, PalFX]
type = PalFX
trigger1 = time = [6,7]
trigger2 = time = [19,20]
time = 2
add = 45,45,45
[State 0, PalFX]
type = PalFX
trigger1 = time = [8,9]
trigger2 = time = [16,18]
time = 2
add = 60,60,60
[State 0, PalFX]
type = PalFX
trigger1 = time = [10,11]
trigger2 = time = [14,15]
time = 2
add = 75,75,75
[State 0, PalFX]
type = PalFX
trigger1 = time = [12,13]
time = 2
add = 90,90,90

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

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

[State 0, PlaySnd]
type = PlaySnd
triggerall = random <= 600
trigger1 = time=1
value = S3,0
volume = 255
channel = -1

[State 0, AfterImage]
type = Afterimage
trigger1 = !time
time = 26
length = 10
FrameGap = 6
PalContrast = 128,128,128
trans = add1

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

;;-----------------------------
; Charge
[Statedef 951]
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  = 1				;Number of air juggle points move takes
ctrl = 0				;Set ctrl (Def: no change)
anim = 951				;Change animation (Def: no change)
poweradd = 0			;Power to add (Def: 0)
sprpriority = ifelse(facing=1, -1, 5)

[State 0, HitBy]
type = HitBy
trigger1 = time <= 20
value = SCA,AT

[State 0, PlayerPush]
type = PlayerPush
trigger1 = time >= 3
value = 0

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

[State 0, PalFX]
type = PalFX
trigger1 = time = [2,3]
trigger2 = time = [23,24]
time = 2
add = 15,15,15
[State 0, PalFX]
type = PalFX
trigger1 = time = [4,5]
trigger2 = time = [21,22]
time = 2
add = 30,30,30
[State 0, PalFX]
type = PalFX
trigger1 = time = [6,7]
trigger2 = time = [19,20]
time = 2
add = 45,45,45
[State 0, PalFX]
type = PalFX
trigger1 = time = [8,9]
trigger2 = time = [16,18]
time = 2
add = 60,60,60
[State 0, PalFX]
type = PalFX
trigger1 = time = [10,11]
trigger2 = time = [14,15]
time = 2
add = 75,75,75
[State 0, PalFX]
type = PalFX
trigger1 = time = [12,13]
time = 2
add = 90,90,90

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

[State 0, PlaySnd]
type = PlaySnd
triggerall = random <= 600
trigger1 = time=1
value = S3,0
volume = 255
channel = -1

[State 0, VelSet]
type = VelSet
trigger1 = AnimElem=3
x = 6.8

[State 0, VelSet]
type = VelSet
trigger1 = AnimElem=9
x = 0

[State 0, CtrlSet]
type = CtrlSet
trigger1 = AnimElem=9
value = 1

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

[State 0, AfterImage]
type = Afterimage
trigger1 = AnimElem=2
time = 18
length = 10
FrameGap = 6
PalContrast = 128,128,128
trans = add1

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

;;-----------------------------
; Charge
[Statedef 955]
type    = A				;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  = 1				;Number of air juggle points move takes
ctrl = 0				;Set ctrl (Def: no change)
anim = 955				;Change animation (Def: no change)
poweradd = 0			;Power to add (Def: 0)
sprpriority = -1			;Set layering priority to 2 (in front)

[State 0, HitBy]
type = HitBy
trigger1 = Time <= 22
value = SCA,AT

[State 0, PlayerPush]
type = PlayerPush
trigger1 = animelemtime(10)<0
value = 0

[State 0, VelAdd]
type = VelAdd
trigger1 = 1
y = .3

[State 0, PalFX]
type = PalFX
trigger1 = time = [2,3]
trigger2 = time = [23,24]
time = 2
add = 15,15,15
[State 0, PalFX]
type = PalFX
trigger1 = time = [4,5]
trigger2 = time = [21,22]
time = 2
add = 30,30,30
[State 0, PalFX]
type = PalFX
trigger1 = time = [6,7]
trigger2 = time = [19,20]
time = 2
add = 45,45,45
[State 0, PalFX]
type = PalFX
trigger1 = time = [8,9]
trigger2 = time = [16,18]
time = 2
add = 60,60,60
[State 0, PalFX]
type = PalFX
trigger1 = time = [10,11]
trigger2 = time = [14,15]
time = 2
add = 75,75,75
[State 0, PalFX]
type = PalFX
trigger1 = time = [12,13]
time = 2
add = 90,90,90

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

[State 0, PlaySnd]
type = PlaySnd
triggerall = random <= 600
trigger1 = time=1
value = S3,0
volume = 255
channel = -1

[State 0, AfterImage]
type = Afterimage
trigger1 = !time
time = 22
length = 10
FrameGap = 6
PalContrast = 128,128,128
trans = add1

[State 0, SprPriority]
type = SprPriority
trigger1 = AnimElem=10
value = 2

[State 0, ChangeState]
type = ChangeState
trigger1 = AnimElem=12
value = 51
ctrl = 1

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

;==================================================================================
;======| 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)
;==================================================================================
;==================================================================================
;==================================================================================
