[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 = 58	;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 = 17
air.back = 13
air.front = 13
z.width = 3
height = 60
attack.width = 4,4
attack.dist = 160
proj.attack.dist = 90
proj.doscale = 0
head.pos = -14, -87
mid.pos = -5, -60
draw.offset=0,1 		;Player drawing offset in pixels (x, y)

[Velocity]
walk.fwd  = 4.9
walk.back = -3.9
run.fwd  = 8, 0
run.back = -6,-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 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
triggerall =prevstateno!=340
trigger1 = !time
value = 181

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

[State 0, PlaySnd]
type = PlaySnd
triggerall = anim = 181
trigger1 = AnimElem = 7
value = S3,10
volume = 0

[State 0, PlaySnd]
type = PlaySnd
triggerall = anim = 182
trigger1 = AnimElem = 2
value = S3,11
volume = 0

[State 0, PlaySnd]
type = PlaySnd
triggerall = anim = 183
trigger1 = AnimElem = 2
value = S3,12
volume = 0

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

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

[State 190, 1] ;Freeze animation until PreIntro is over
type = ChangeState
trigger1 = RoundState = 0
value = 191+(random%3)

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

[State 190, 4] ;Change to stand state
type = ChangeState
trigger1 = AnimTime = 0
value = 22
;---------------------------------------------------------------------------
; Introduction :Back Turned
[Statedef 191]
type = S
ctrl = 0
anim = 190
velset = 0,0

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

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

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

;---------------------------------------------------------------------------
; Introduction: I'm gonna kick your...
[Statedef 192]
type = S
ctrl = 0
anim = 191
velset = 0,0

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
trigger2 = AnimElem = 3
trigger3 = animelem = 6
value = S0,0
volume = 0
channel = -1

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

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

;---------------------------------------------------------------------------
; Introduction: Let's Get Up...
[Statedef 193]
type = S
ctrl = 0
anim = 192
velset = 0,0

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

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

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

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

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

[State 801, Grab Sound]
type = PlaySnd
triggerall = anim = 195
trigger1 = animelem=5
value = s3, 10

[State 801, Grab Sound]
type = PlaySnd
triggerall = anim = 196
trigger1 = animelem=1
value = s3, 7

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

;---------------------------------------------------------------------------
; Fake Roll Taunt
[Statedef 197]
type = S
physics = N
movetype = A
ctrl = 0
anim = 197
movetype = I
physics = S
juggle = 1
velset = 7,0
sprpriority = 2

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

[State 801, Grab Sound]
type = PlaySnd
trigger1 = animelem=2
value = s3, 1

[State 801, Grab Sound]
type = PlaySnd
trigger1 = animelem=3
value = s5, 23

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

[State 0, Velset]
type = VelSet
trigger1 = AnimElem = 7
x = -3
y = -3

[State 0, Explod]
type = Explod
trigger1 = AnimElem = 3
anim = 8030
ID = 197
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1
removetime = -2
scale = .7,.7
sprpriority = -1
ownpal = 1
removeongethit = 0

[State 255, hit]
type=hitdef
trigger1=time = 0
attr=C,NA
damage=60,0
animtype=Hard
guardflag=L
hitflag=MAFD
priority=4,Hit
pausetime=12,12
sparkno=s8200+(random%8)
guard.sparkno=s8100
sparkxy=-10,-6
hitsound=s1,6
guardsound=s2,0
ground.type=Trip
ground.slidetime=16
ground.hittime=16
ground.velocity=-1.33,-6.85
air.type=Low
air.hittime=12
air.velocity=-1.33,-6.85
air.cornerpush.veloff=0
down.velocity=-4,-4
getpower=0
yaccel=.5
fall=1
envshake.time = 9
envshake.ampl = 3
getpower=0

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

;---------------------------------------------------------------------------
;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,1
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,1
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,1
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 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 5
value = S3,4
volume = 0
channel = 5

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

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

;---------------------------------------------------------------------------
; Throw Forward - Kick Throw
[Statedef 803]
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 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 5
value = S3,4
volume = 0
channel = 5

[State 800, 1]
type = HitDef
Trigger1 = Time = 0
attr = S, NT
hitflag = M-
priority = 1, Miss
sparkno = -1
sparkxy = -13, -72
hitsound = S5,20
numhits = 0
sprpriority = 1
p1facing = ifelse (command = "holdfwd", 1, -1)
p2facing = 1
p1stateno = 804
p2stateno = 812
p2getp1state = 1
guard.dist = 0
fall = 1

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

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

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

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

[State 0, PlaySnd]
type = PlaySnd
triggerall = Anim = 802
trigger1 = AnimElemTime(3) = 0
trigger2 = AnimElemTime(8) = 0
trigger3 = AnimElemTime(12) = 0
value = S0,5
volume = 0
channel = -1

[State 0, PlaySnd]
type = PlaySnd
triggerall = Anim = 803 || anim = 804
trigger1 = AnimElemTime(2) = 0
trigger2 = AnimElemTime(7) = 0
trigger3 = AnimElemTime(11) = 0
value = S0,5
volume = 0
channel = -1

[State 0, PlaySnd]
type = PlaySnd
triggerall = Anim = 802
trigger1 = AnimElemTime(3) = 0
trigger2 = AnimElemTime(8) = 0
trigger3 = AnimElemTime(12) = 0
value = S3,1
volume = 0
channel = 5

[State 0, PlaySnd]
type = PlaySnd
triggerall = Anim = 803 || anim = 804
trigger1 = AnimElemTime(2) = 0
trigger2 = AnimElemTime(7) = 0
trigger3 = AnimElemTime(11) = 0
value = S3,1
volume = 0
channel = 5

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

[State 0, VarSet]
type = VarSet
trigger1 = !time
v = 8
value = 0

[State 0, VarSet]
type = VarAdd
triggerall = AnimElemTime(11) < 0
trigger1 = command = "a" || command = "b" || command = "c"
trigger2 = var(59) = 1
v = 8
value = 1

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = var(8) >= 10
triggerall = anim = 802
trigger1 = AnimElemTime(11) = 0
value = 803
persistent = 0

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = var(8) >= 20
triggerall = anim = 803
trigger1 = AnimElemTime(11) = 0
value = 804
persistent = 0

[State 920, T1]
type = TargetBind
triggerall = anim = 802
trigger1 = AnimElem = 1
trigger2 = AnimElem = 2
trigger3 = AnimElem = 7
trigger4 = AnimElem = 11
pos = 40, 0
ignorehitpause = 1

[State 920, T1]
type = TargetBind
triggerall = anim = 802
trigger1 = animelem = 3
trigger2 = animelem = 6
trigger3 = animelem = 8
trigger4 = animelem = 10
trigger5 = animelem = 12
pos = 45, -10
ignorehitpause = 1

[State 920, T1]
type = TargetBind
triggerall = anim = 802
trigger1 = animelem = 4
trigger2 = animelem = 5
trigger3 = animelem = 9
pos = 55, -15
ignorehitpause = 1

[State 0, PalFX]
type = PalFX
trigger1 = command = "a" || command = "b" || command = "c"
time = 2
add = 32,32,32
mul = 255,255,255
sinadd = 32,32,32,4
invertall = 0
color = 256

[State 920, T2]
type = TargetBind
triggerall = anim = 803 || anim = 804
trigger1 = AnimElem = 1
trigger2 = AnimElem = 6
trigger3 = AnimElem = 10
pos = 40, 0
ignorehitpause = 1

[State 920, T2]
type = TargetBind
triggerall = anim = 803 || anim = 804
trigger1 = animelem = 2
trigger2 = animelem = 5
trigger3 = animelem = 7
trigger4 = animelem = 9
trigger5 = animelem = 11
pos = 45, -10
ignorehitpause = 1

[State 920, T2]
type = TargetBind
triggerall = anim = 803 || anim = 804
trigger1 = animelem = 3
trigger2 = animelem = 4
trigger3 = animelem = 8
pos = 55, -15
ignorehitpause = 1

[State 220, hit]
type=hitdef
triggerall = anim = 802
trigger1=AnimElem = 4
trigger2=AnimElem = 9
attr=S,NT
damage=20,0
animtype=Medium
guardflag=-
hitflag=MAF+
priority=4,Hit
pausetime=4,4
sparkno=s8200+(random%8)
guard.sparkno=s8100
sparkxy = -30,-50
hitsound=s1,0
guardsound=s2,0
ground.type=High
ground.slidetime=11
ground.hittime=14
ground.velocity=-3
air.type=Low
air.velocity=-3,-2
air.cornerpush.veloff=0
ground.cornerpush.veloff=0
p2stateno = 813
envshake.time=9
envshake.ampl=2

[State 220, hit]
type=hitdef
triggerall = anim = 802
trigger1=AnimElem = 13
attr=S,NT
damage=60,0
animtype=Medium
guardflag=-
hitflag=MAF+
priority=4,Hit
pausetime=8,8
sparkno=s8200+(random%8)
guard.sparkno=s8100
sparkxy = -30,-50
hitsound=s1,6
guardsound=s2,0
ground.type=High
ground.slidetime=11
ground.hittime=14
ground.velocity=-6,-7
air.type=Low
air.velocity=-6,-6
fall = 1
fall.recover = 0
envshake.time=9
envshake.ampl=2

[State 220, hit2]
type=hitdef
triggerall = anim = 803 || anim = 804
trigger1=AnimElem = 3
trigger2=AnimElem = 8
attr=S,NT
damage=20,0
animtype=Medium
guardflag=-
hitflag=MAF+
priority=4,Hit
pausetime=4,4
sparkno=s8200+(random%8)
guard.sparkno=s8100
sparkxy = -30,-50
hitsound=s1,0
guardsound=s2,0
ground.type=High
ground.slidetime=11
ground.hittime=14
ground.velocity=-3
air.type=Low
air.velocity=-3,-2
air.cornerpush.veloff=0
ground.cornerpush.veloff=0
p2stateno = 813
envshake.time=9
envshake.ampl=2

[State 220, hit2]
type=hitdef
triggerall = anim = 803 || anim = 804
trigger1=AnimElem = 12
attr=S,NT
damage=60,0
animtype=Medium
guardflag=-
hitflag=MAF+
priority=4,Hit
pausetime=8,8
sparkno=s8200+(random%8)
guard.sparkno=s8100
sparkxy = -30,-50
hitsound=s1,6
guardsound=s2,0
ground.type=High
ground.slidetime=11
ground.hittime=14
ground.velocity=-6,-7
air.type=Low
air.velocity=-6,-6
fall = 1
fall.recover = 0
envshake.time=9
envshake.ampl=2

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

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

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

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = !time
value = 811

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

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

[State 926, 4]
type = SelfState
trigger1 = time >= 45
value = 0

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

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = !time
value = 812

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

[State 926, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 812
;-------------------------------
[Statedef 801]
type = S
movetype = A
physics = S
anim = 801
velset = 0,0
sprpriority = 2

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

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S3,1
volume = 0
channel = 5

[State 920, 1]
type = screenbound
trigger1 = 1
value = 1
movecamera = 1,1

[State 920, T1]
type = TargetBind
trigger1 = animelemtime(2) < 0
pos = 40, 0

[State 920, Edge]
type = Width
trigger1 = animelemtime(2) >= 0 && animelemtime(12) < 0
edge = 50, 40

[State 920, T2]
type = TargetBind
trigger1 = animelemtime(2) >= 0 && animelemtime(3) < 0
pos = 10, 0

[State 920, T3]
type = targetbind
trigger1 = animelemtime(3) >= 0 && animelemtime(4) < 0
trigger2 = animelemtime(7) >= 0 && animelemtime(8) < 0
trigger3 = animelemtime(11) >= 0 && animelemtime(12) < 0
pos = 0, -60

[State 920, T4]
type = targetbind
trigger1 = animelemtime(4) >= 0 && animelemtime(5) < 0
trigger2 = animelemtime(8) >= 0 && animelemtime(9) < 0
trigger3 = animelemtime(12) >= 0 && animelemtime(13) < 0
pos = -28, -77

[State 920, T5]
type = TargetBind
trigger1 = animelemtime(5) >= 0 && animelemtime(6) < 0
trigger2 = animelemtime(9) >= 0 && animelemtime(10) < 0
trigger3 = animelemtime(13) >= 0 && animelemtime(14) < 0
pos = 10,-5

[State 920, T6]
type = TargetBind
trigger1 = animelemtime(6) >= 0 && animelemtime(7) < 0
trigger2 = animelemtime(14) >= 0 && animelemtime(15) < 0
pos = 25,0

[State 920, 3]
type = VelSet
trigger1 = AnimElem = 3
y = -2.4

[State 920, PosAdd]
type = PosAdd
trigger1 = Time = [23,64]
x = -4

[State 920, 4]
type = VelAdd
trigger1 = time = [29,59]
y = 0.17

[State 920, 6]
type = VelSet
trigger1 = animElem = 15
x = 0
y = 0

[State 920, 7]
type = PosSet
trigger1 = animElem = 15
y = 0

[State 920, 8]
type = envshake
trigger1 = animelem = 15
time = 15
ampl = -2
freq = 120

[State 200, 7]
type = Playsnd
trigger1 = AnimElem = 4 || animelem = 7 || animelem = 11 || animelem = 15
value = 0,4

[State 920, T11]
type = TargetBind
trigger1 = animelemtime(15) >= 00 && animelemtime(16) < 0
pos = -60,-50

[State 920, Target State]
type = TargetState
trigger1 = AnimElem = 16
value = 811

[State 225, hit]
type=hitdef
trigger1=anim=801
attr=S,NT
damage=100,0
animtype=Hard
guardflag=MA
hitflag=MAF+
priority=4,Hit
pausetime=2,2
sparkno=-1;s8200+(random%8)
guard.sparkno=-1;s8100
sparkxy=-10,-55
hitsound=-1;s1,6
guardsound=-1;s2,0
ground.type=High
ground.slidetime=16
ground.hittime=20
ground.velocity=-10
air.type=Low
air.hittime=15
air.velocity=-5,-7
air.cornerpush.veloff=0
yaccel=.5
persistent=0
p2stateno = 811
envshake.time = 9
envshake.ampl = 3
getpower=0

[State 920, Enemy Lose Life]
type = null;targetlifeadd
trigger1 = AnimElem = 16
value = -100

[State 920, Turn]
type = Turn
trigger1 = AnimElem = 20
value = 1

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

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

[State 3400, Tech Hit!]
type = 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 = ,NA,SA,HA,NP,SP,HP,ST,HT
;value2 = S,NA
time = 1

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

[Statedef 811]
type = A
movetype = H
physics = N
sprpriority = 1

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

[State 926, 1]
type = PosAdd
trigger1 = time = 0
y = -10
x = 10

[State 926, 2]
type = VelSet
trigger1 = time = 0
x = 5
y = -3

[State 926, 4]
type = SelfState
trigger1 = time = 4
value = 5050
;---------------------------------------------------------------------------
; Throw Forward
[Statedef 802]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 802
p2facing = 1
facep2 = 1
sprpriority = 3

[State 810, Playerpush]
type = Playerpush
trigger1 = 1
value = 0

[State 1200, 9]
type = Width
trigger1 = animelemtime(2) >= 0
trigger1 = animelemtime(6) < 0
edge = 20,0

[State 801, Grab Sound]
type = PlaySnd
trigger1 = AnimElem = 1
value = s5, 20

[State 801, Throw Sound]
type = PlaySnd
trigger1 = AnimElem = 4
value = s3,0

[State 801, Throw Sound]
type = PlaySnd
trigger1 = AnimElem = 4
value = s0,5

[State 810, Playerpush]
type = Playerpush
trigger1 = 1
value = 0

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

[State 801, Bind 1]
type = TargetBind
trigger1 = AnimElem = 1
pos = 45, 0

[State 801, Bind 1]
type = TargetBind
trigger1 = AnimElem = 2
pos = 18, 0

[State 801, Bind 2-4]
type = TargetBind
trigger1 = AnimElem = 3
pos = -48, -50

[State 801, Bind 5]
type = TargetBind
trigger1 = AnimElem = 4
pos = -80, -65

[State 801, Hurt 11]
type = TargetLifeAdd
trigger1 = p2stateno = 5100
value = -70
persistent = 0

[State 0, EnvShake]
type = EnvShake
trigger1 = p2stateno = 5100
time = 12
freq = 60
ampl = -6
persistent = 0

[State 801, 5]
type = PlaySnd
trigger1 = p2stateno = 5100
value = s1,6
persistent = 0

[State 0, Turn]
type = Turn
Trigger1 = AnimTime = 0
;ignorehitpause =
;persistent =

[State 800, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Air Throw: Slam
[Statedef 855]
type    = A
movetype= A
physics = A
juggle  = 3
poweradd=  0
ctrl = 0
anim = 805

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

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

[State 950, 2]
type = HitDef
trigger1 = !time
trigger2 = p2stateno = 5051
attr = A, NT
p2facing = 1
hitflag = AF
priority = 2, Miss
sparkno = -1
numhits = 0
hitsound = S5,20
p1stateno = 856
p2stateno = 5057
p2getp1state = 1
;air.juggle = 2
fall = 1

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

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

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S4,18
volume = 0
channel = 5

[State 210, 3]
type = posadd
trigger1 = AnimElem = 4
x = 15

[State 210, 3]
type = TargetBind
trigger1 = AnimElem = 1 || animelem = 2
pos = 20,0
time = 4

[State 210, 3]
type = TargetBind
trigger1 = AnimElem = 4
pos = -20,-70
time = 4

[State 210, 3]
type = TargetBind
trigger1 = AnimElem = 5
pos = 0,-80
time = 5

[State 210, 3]
type = TargetBind
trigger1 = AnimElem = 6
pos = 10,-60
time = 99

[State 210, 3]
type = sprpriority
trigger1 = AnimELem = 6
value = -1

[State 210, 3]
type = PosFreeze
trigger1 = time < 10

[State 210, 3]
type = Velset
trigger1 = time = 10
y = -4

[State 210, 3]
type = Velset
trigger1 = time = 10
x = 2.8

[State 210, 3]
type = VelAdd
trigger1 = time > 10
y = 0.44

[State 2206, 2]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 857

[Statedef 857]
type    = S
movetype= A
physics = S
juggle  = 0
poweradd= 0
velset = 0,0
ctrl = 0
anim = 841

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

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

[State 0, Explod]
type = Explod
trigger1 = AnimElem = 2
anim = 8200+(random%8)
pos = 10,10
postype = p2  ;p2,front,back,left,right
bindtime = 1
removetime = -2
scale = 1,1
sprpriority = 5
ownpal = 1
removeongethit = 0

[State 191, 4]
type = EnvShake
Trigger1 = AnimElem = 2,-1
persistent = 0
time = 10
ampl = -5
freq = 100
phase = 10

[State 210, 3]
type = TargetBind
trigger1 = AnimElem = 1
pos = 28,-30
time = 2

[State 210, 3]
type = TargetState
trigger1 = time = 0
value = 5058

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

[State 225, hit]
type=hitdef
trigger1=AnimElem = 3
attr=S,NT
damage=60,0
animtype=Hard
guardflag=MA
hitflag=MAF+
priority=4,Hit
pausetime=2,2
sparkno=-1;s8200+(random%8)
guard.sparkno=-1;s8100
sparkxy=-10,-55
hitsound=-1;s1,6
guardsound=-1;s2,0
ground.type=High
ground.slidetime=16
ground.hittime=20
ground.velocity=-10
air.type=Low
air.hittime=15
air.velocity=-5,-7
air.cornerpush.veloff=0
yaccel=.5
persistent=0
p2stateno = 5059
getpower=0

[State 210, 3]
type = sprpriority
trigger1 = AnimElem = 5
value = 0

[State 210, 3]
type = PosFreeze
trigger1 = time >= 0

[State 210, 3]
type = TargetBind
trigger1 = AnimElem = 2
pos = 30,-20
time = 8

[State 210, 3]
type = posset
trigger1 = animtime = 0
y = 0

[State 2206, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1
;-----------------------------------------------------

[Statedef 5057]
type    = A
movetype= H
physics = N

[State 210, 3]
type = PosFreeze
trigger1 = time <= 10

[State 325, 0]
type = velset
trigger1 = time = 0
x = 0
y = 0

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

[State 3545, 1]
type = ChangeAnim2
trigger1 = time = 0
value = 845

[State 210, 3]
type = sprpriority
trigger1 = time = 0
value = -1

[State 3400, Tech Hit!]
type = 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 210, 3]
type = sprpriority
trigger1 = AnimElem = 4
value = 1

[Statedef 5058]
type    = A
movetype= H
physics = N

[State 325, 0]
type = velset
trigger1 = time = 0
x = 0
y = 0

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

[State 210, 3]
type = ChangeAnim2
trigger1 = time = 0
value = 846

[State 210, 3]
type = sprpriority
trigger1 = time = 0
value = 1

[State 210, 3]
type = PosFreeze
trigger1 = time > 2
trigger1 = time <= 12

[State 210, 3]
type = ChangeState
trigger1 = animtime = 0
value = 5059

[Statedef 5059]
type    = A
movetype= H
physics = N
velset = -6,-4

[State 5050, 1]
type = ChangeAnim
trigger1 = AnimTime = 0
trigger2 = Time = 0
trigger2 = Anim != 5035
value = 5050
persistent = 0

[State 5050, 3]
type = VelAdd
trigger1 = Time >= 0
y = .35

[State 5050, 6]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 25
value = 5100

;---------------------------------------------------------------------------
;Rolling Slam
[Statedef 840]
type    = A
movetype= A
physics = N
ctrl = 0
anim = 850
sprpriority = 2

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S3,1
volume = 0
channel = 5

[State 840, TargetBind 1]
type = TargetBind
trigger1 = Pos Y < 0
pos = 10,0

[State 840, PosFeeze]
type = PosFreeze
trigger1 = AnimElemTime(1) <= 12

[State 4000, 2]
type = VelAdd
trigger1 = Time >= 13
trigger1 = Pos Y < 0
y = const(movement.yaccel)

[State 840, VelSet X]
type = VelSet
trigger1 = AnimElemTime(1) = 12
x = -6

[State 200, 7]
type = Playsnd
trigger1 = animelem = 3 || AnimElem = 5
value = 0,4

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

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

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

[State 920, 1]
type = screenbound
trigger1 = 1
value = 1
movecamera = 1,1

[State 920, T6]
type = TargetBind
trigger1 = animelemtime(1) >= 0 && animelemtime(2) < 0
pos = 25,0

[State 920, 6]
type = VelSet
trigger1 = animElem = 2
x = 0
y = 0

[State 920, 7]
type = PosSet
trigger1 = animElem = 2
y = 0

[State 920, 8]
type = envshake
trigger1 = animelem = 2
time = 15
ampl = -2
freq = 120

[State 200, 7]
type = Playsnd
trigger1 = animelem = 2
value = 0,4

[State 920, T11]
type = TargetBind
trigger1 = animelemtime(2) >= 00 && animelemtime(3) < 0
pos = -60,-50

[State 920, Target State]
type = TargetState
trigger1 = !time
value = 843

[State 225, hit]
type=hitdef
trigger1=anim=851
attr=S,NT
damage=100,0
animtype=Hard
guardflag=MA
hitflag=MAF+
priority=4,Hit
pausetime=2,2
sparkno=-1;s8200+(random%8)
guard.sparkno=-1;s8100
sparkxy=-10,-55
hitsound=-1;s1,6
guardsound=-1;s2,0
ground.type=High
ground.slidetime=16
ground.hittime=20
ground.velocity=-10
air.type=Low
air.hittime=15
air.velocity=-5,-7
air.cornerpush.veloff=0
yaccel=.5
persistent=0
p2stateno = 811
envshake.time = 9
envshake.ampl = 3
getpower=0

[State 920, Enemy Lose Life]
type = null;targetlifeadd
trigger1 = AnimElem = 3
value = -100

[State 920, Turn]
type = Turn
trigger1 = AnimElem = 7
value = 1

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

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

;---------------------------------------------------------------------------
;Jikogu Fuusha - P2 a
[Statedef 842]
type    = A
movetype= H
physics = N
velset = 0,0

[State 3400, Tech Hit!]
type = 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 842, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 855

;---------------------------------------------------------------------------
;Jikogu Fuusha - P2 b
[Statedef 843]
type    = A
movetype= H
physics = N
velset = 0,0

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

[State 842, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 856
;---------------------------------------------------------------------------
; Air Throw: Rolling Slam
[Statedef 845]
type    = A
movetype= A
physics = A
juggle  = 1
poweradd=  0
ctrl = 0
anim = 805

[State 0, VarSet]
type = VarSet
trigger1 = !time
v = 8    ;fv = 10
value = 0

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = S4,20
volume = 0
channel = 5

[State 950, 2]
type = HitDef
trigger1 = !time
trigger2 = p2stateno = 5051
attr = A, NT
p1facing = ifelse(command = "holdback", 1, -1)
p2facing = 1
hitflag = AF
numhits = 0
priority = 2, Miss
sparkno = -1
hitsound = S5,20
p1stateno = 840
p2stateno = 842
p2getp1state = 1
;air.juggle = 2
fall = 1

[State 950, 9]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
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

;---------------------------------------------------------------------------
; roll recovery 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, 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

;---------------------------------------------------------------------------
; roll recovery 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, 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

;---------------------------------------------------------------------------
; 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=-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=s4,20
p2defmul=1
darken=0

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

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

;==========<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=s4,20
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,1152,1220)

;---------------------------------------------------------------------------
; Alpha Counter Kick
[Statedef 451]
type    = C
movetype= A
physics = C
juggle  = 1
poweradd= 0
ctrl = 0
anim = 450

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

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

[State 255, hit]
type=hitdef
trigger1=time = 0
attr=C,NA
damage=60,0
animtype=Hard
guardflag=L
hitflag=MAFD
priority=4,Hit
pausetime=12,12
sparkno=s8200+(random%8)
guard.sparkno=s8100
sparkxy=-10,-6
hitsound=s1,6
guardsound=s2,0
ground.type=Trip
ground.slidetime=16
ground.hittime=16
ground.velocity=-1.33,-6.85
air.type=Low
air.hittime=12
air.velocity=-1.33,-6.85
air.cornerpush.veloff=0
down.velocity=-4,-4
getpower=0
yaccel=.5
fall=1
envshake.time = 9
envshake.ampl = 3
getpower=0

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

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

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