[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.7
walk.back = -3.7
run.fwd  = 8, 0
run.back = -8,-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 = 1		;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=362
value=362

[State 180, 1]
type = ChangeState
trigger1 =prevstateno!=362
value = 181

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

[State 0, Explod]
type = Explod
triggerall = Anim = 182
trigger1 = animelem=3
anim = 1820
ID = 1820
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = 2
ownpal = 1
removeongethit = 1

[State 0, EnvShake]
type = EnvShake
triggerall = anim = 182
trigger1 = animelem=4
time = 20
freq = 50
ampl = -2
;phase = 90
;ignorehitpause =
;persistent =

[State 801, Grab Sound]
type = PlaySnd
triggerall = anim = 182
trigger1 = animelem=4
value = s181, 0

[State 801, Grab Sound]
type = PlaySnd
triggerall = anim = 182
trigger1 = animelem=3
value = s181, 1

[State 0, Explod]
type = Explod
triggerall = anim = 182
trigger1 = animelem=4
anim = 8030
ID = 8030
pos = -36,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove = 99999
pausemove = 99999
scale = .5,.5
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
;ignorehitpause =
;persistent =

[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
triggerall = enemy, name = "Perfect Weapon MB-02"
trigger1 = numenemy
value = 19400

[State 190, (With Angel Ryu) vs. Shinny]
type = ChangeState
triggerall = teammode = simul
triggerall = enemy,teammode = single
trigger1 = p2name = "Shin_Ogre"
trigger1 = enemy,authorname="Drednot37 & ch3eky"
trigger1 = p3name = "MvC2 Angel Ryu"
value = 19500

[State 190, vs. Shinny]
type = ChangeState
triggerall = teammode = single
triggerall = enemy,teammode = single
trigger1 = p2name = "Shin_Ogre"
trigger1 = enemy,authorname="Drednot37 & ch3eky"
value = 19500

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

[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
[Statedef 191]
type = S
ctrl = 0
anim = 191
velset = 0,0

[State 0, Explod]
type = Explod
trigger1 = !time
anim = 1910
ID = 1910
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -2
scale = 1,1
sprpriority = 3
ownpal = 1
removeongethit = 1

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

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

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

[State 190, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 22
;---------------------------------------------------------------------------
; Introduction
[Statedef 192]
type = S
ctrl = 0
anim = 190
velset = 0,0

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

[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
[Statedef 193]
type = S
ctrl = 0
anim = 193
velset = 0,0

[State 801, Grab Sound]
type = PlaySnd
trigger1 = animelem=5
value = s3, 3

[State 801, Grab Sound]
type = PlaySnd
trigger1 = animelem=7
value = s181, 0

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

[State 0, EnvShake]
type = EnvShake
trigger1 = animelem=7
time = 20
freq = 50
ampl = -2
;phase = 90
;ignorehitpause =
;persistent =

[State 0, Explod]
type = Explod
trigger1 = animelem=7
anim = 8030
ID = 8030
pos = -7,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove = 99999
pausemove = 99999
scale = .5,.5
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
;ignorehitpause =
;persistent =

[State 0, Explod]
type = Explod
trigger1 = !time
anim = 37901
ID = 37901
pos = 10,-117
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -2
scale = .4,.4
sprpriority = 4
supermove = 1
pausemove = 1
ownpal = 1
removeongethit = 1
;ignorehitpause =
;persistent =

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

[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
[Statedef 194]
type = S
ctrl = 0
anim = 194
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 = AnimElemTime(2) = 1
value = S2000,4

[State 0, Explod]
type = Explod
trigger1 = !time
anim = 1940
ID = 1940
pos = 0,0
postype = p1  ;p2,front,back,left,right
removetime = -2
scale = 1.2,1.2
sprpriority = -1
ownpal = 1
removeongethit = 1
;ignorehitpause =
;persistent =


[State 190, 4] ;Change to stand state
type = ChangeState
trigger1 = AnimTime = 0
value = 22

;---------------------------------------------------------------------------
; vs. Sagat (MB-02)
[Statedef 19400]
type = S
ctrl = 0
anim = 19400
velset = 0,0

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

[State 0, Explod]
type = Explod
trigger1 = AnimElem = 5
anim = 19490
ID = 19490
pos = 0,20
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -2
sprpriority = 3
ownpal = 1
removeongethit = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 5
value = S4000,3

[State 190, 4] ;Change to stand state
type = ChangeState
trigger1 = AnimTime = 0
value = 22

;==========<INTRO vs Shinny>==========
[Statedef 19500]
type=S
physics=N
anim=19500
sprpriority=0

[State 368, intro]
type=assertspecial
trigger1= 1
flag=intro
flag2=nomusic

[State 368, camera]
type=helper
trigger1= !numhelper(7650)
helpertype=normal
stateno=7650
ID=7650
name="Camera"
postype=p1

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

[State 368, vel]
type=posset
trigger1= !time
x=-240*facing

[State 368, vel]
type=velset
trigger1= !time
x=6

[State 368, snd]
type=playsnd
trigger1= !time
value=1100,1

[State 368, anim]
type=changeanim
trigger1= animelemtime(2)<0 && p2dist x<=60
value=19500
elem=2

[State 368, snd]
type=playsnd
trigger1= animelem=2
value=3,0
channel=0

[State 368, vel]
type=velset
trigger1= animelemtime(2)>=0 && animelemtime(3)<0
x=0

[State 368, pos]
type=posset
trigger1= animelemtime(2)>=0 && animelemtime(3)<0
x=-30*facing

[State 368, fadeout]
type=allpalfx
trigger1= animelemtime(2)=10
time=20
sinadd=-255,-255,-255,80

[State 368, black]
type=envcolor
trigger1= animelemtime(2)>=30 && animelemtime(3)<0
time=2
value=0,0,0

[State 368, assert]
type=assertspecial
trigger1= animelemtime(2)>=30 && animelemtime(3)<0
flag=nobardisplay

[State 368, hitsnd]
type=playsnd
trigger1= animelemtime(2)>=30 && animelemtime(3)<0
trigger1= (animelemtime(2)%8)=1
value=1,2+(random%3)

[State 368, sparks]
type=explod
trigger1= animelemtime(2)>=30 && animelemtime(3)<0
trigger1= (animelemtime(2)%8)=1
anim=8105
ID=7000
sprpriority=5
postype=p2
pos=0,-70
random=60,60
facing=-1
ownpal=1
ontop=1
pausemovetime=300
supermovetime=300

[State 368, shake]
type=envshake
trigger1= animelemtime(2)>=30 && animelemtime(3)<0
trigger1= (animelemtime(2)%8)=1
time=2
freq=90
ampl=-3

[State 368, anim]
type=changeanim
trigger1= animelemtime(2)>=72 && animelemtime(3)<0
value=19500
elem=3

;[State 192, snd]
;type=playsnd
;trigger1= animelem=3
;value=2,1

[State 368, vel]
type=velset
trigger1= animelem=3
x=-6

[State 368, pos]
type=posset
trigger1= animelemtime(3)>=0 && (helper(7650),rootdist x<=0)
x=ceil(helper(7650),pos x)

[State 368, vel]
type=velset
trigger1= animelemtime(3)>=0 && (helper(7650),rootdist x<=0)
x=0

[State 368, end]
type=changestate
trigger1= !animtime
value=0
;---------------------------------------------------------------------------
; Taunt
[Statedef 195]
type = S
ctrl = 0
anim = 196 ;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 0, Explod]
type = Explod
trigger1 = animelem=3
anim = 1960
ID = 1960
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = -1
removetime = -2
scale = 1,1
sprpriority = 2
ownpal = 1
removeongethit = 1

[State 801, Grab Sound]
type = PlaySnd
triggerall = anim = 196
trigger1 = animelem=4
value = s181, 0

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

[State 0, Explod]
type = Explod
triggerall = anim = 196
trigger1 = animelem=4
anim = 8030
ID = 8030
pos = -36,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove = 99999
pausemove = 99999
scale = .5,.5
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
;ignorehitpause =
;persistent =

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 4
statetype = S       ;S,A,C,L
movetype = A        ;I,A,H
physics = S         ;A,C,S,N
;ignorehitpause =
;persistent =

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 5
statetype = S       ;S,A,C,L
movetype = I        ;I,A,H
physics = S         ;A,C,S,N
;ignorehitpause =
;persistent =

[State 0, EnvShake]
type = EnvShake
triggerall = anim = 196
trigger1 = animelem=4
time = 20
freq = 50
ampl = -2
;phase = 90
;ignorehitpause =
;persistent =

[State 225, hit]
type=hitdef
trigger1=animelem=4
attr=S,NA
damage=5,0
animtype=Hard
guardflag=MA
hitflag=MAFD
priority=4,Hit
pausetime=4,4
sparkno=s8200+(random%8)
guard.sparkno=s8100
sparkxy=-10,-55
hitsound=s1,6
guardsound=s2,0
ground.type=High
ground.slidetime=16
ground.hittime=16
ground.velocity=-3,-5
air.type=Low
air.hittime=12
air.velocity=-3,-4
air.cornerpush.veloff=0
yaccel=.5
persistent=0
fall = 1
palfx.time= 15
palfx.add = 45,30,45
palfx.mul = 256,256,256
palfx.sinadd = -20,-20,-20,5
envshake.time = 9
envshake.ampl = 3
getpower=0

[State 195, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
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 = time = 1
value = S3,5
volume = 0
channel = -1

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

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

;---------------------------------------------------------------------------
; Throw Forward - Tombstone
[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 = time = 1
value = S3,5
volume = 0
channel = -1

[State 800, 1]
type = HitDef
Trigger1 = Time = 0
attr = S, NT
hitflag = M-
priority = 1, Miss
sparkno = -1
sparkxy = -13, -72
hitsound = -1
numhits = 0
sprpriority = 1
p1facing = ifelse (command = "holdfwd", 1, -1)
p2facing = 1
p1stateno = 856
p2stateno = 5057
p2getp1state = 1
guard.dist = 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 = time >= 0
value = SCA
time = 1

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

[State 920, CloseRH]
type = PlaySNd
trigger1 = time = 0
value = 4,8
channel = 0

[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 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 15
value = S3,3
volume = 0
channel = 0

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

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

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

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

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

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

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

[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 = s1100, 10

[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  = 5
poweradd=  0
ctrl = 0
anim = 805

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

[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 = S1100,10
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 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 = S3,3
volume = 0
channel = -1

[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 210, 3]
type = sprpriority
trigger1 = AnimElem = 4
value = 0

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

[State 210, 3]
type = TargetLifeAdd
trigger1 = AnimElem = 2
value = -20

[State 1531, 5]
type = HitAdd
trigger1 = AnimElem = 2
value = 1

[State 200, 4]
type = Explod
trigger1 = AnimElem = 2
persistent = 0
anim = 8200+(random%8)
pos = 10,10
postype = p2
supermove = 1
sprpriority = 2
bindtime = 1
ignorehitpause = 1
ownpal = 1

[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 3545, 1]
type = ChangeAnim2
trigger1 = time = 0
value = 845

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

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

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

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

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

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

[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

;---------------------------------------------------------------------------
;Jikogu Fuusha - P1 b
[Statedef 841]
type    = S
movetype= I
physics = N
velset = 0,0
ctrl = 0
anim = 851
poweradd = 0
sprpriority = 2

[State 841, TargetState]
type = TargetState
trigger1 = Time = 0
value = 843

[State 841, TargetBind 1]
type = TargetBind
trigger1 = (AnimElemTime(1) >= 0) && (AnimElemTime(2) < 0)
pos = -45,-26

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

[State 841, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = AnimElemTime(1) = 0
value = -80

[State 841, EnvShake]
type = EnvShake
trigger1 = AnimElemTime(1) = 0
time = 24
freq = 80
ampl = -8

[State 841, Hiua!!!]
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = S3,3

[State 841, PlaySnd]
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = S1,6

[State 0, HitAdd]
type = HitAdd
trigger1 = AnimElemTime(1) = 0
value = 1

[State 200, 4]
type = Explod
trigger1 = AnimElem = 1
persistent = 0
anim = 8200+(random%8)
pos = -10,10
postype = p2
supermove = 1
sprpriority = 2
bindtime = 1
ignorehitpause = 1
ownpal = 1

[State 841, ChangeState]
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 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 843, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 856

[State 843, VelSet]
type = VelSet
trigger1 = AnimTime = 0
x = -9
y = -11

[State 843, PosAdd]
type = PosAdd
trigger1 = AnimTime = 0
x = -9
y = 16

[State 843, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 844

;---------------------------------------------------------------------------
;Jikogu Fuusha - p2 C
[Statedef 844]
type    = A
movetype= H
physics = N
velset = 6,-4

;[State 844, ChangeAnim 1]
;type = ChangeAnim
;trigger1 = Time = 0
;value = 5050

;[State 844, ChangeAnim 2]
;type = ChangeAnim
;trigger1 = (Anim = [5050,5059]) && (Vel Y >= ifelse(anim = 5050, 1, -2)) && (SelfAnimExist(Anim+10))
;value = Anim+10
;persistent = 0

;[State 844, VelAdd]
;type = VelAdd
;trigger1 = 1
;y = GetHitVar(yaccel)

[State 844, SelfState]
type = SelfState
trigger1 = !time;(Pos Y >= 0) && (Vel Y > 0)
value = 5050

;---------------------------------------------------------------------------
; Air Throw: Rolling Slam
[Statedef 845]
type    = A
movetype= A
physics = A
juggle  = 1
poweradd=  0
ctrl = 0
anim = 805

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

[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 = S1100,10
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
;==========<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, 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,-55
ownpal=1
persistent=0
supermovetime=9999

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

;--------------------------------------------------------------------
;Alpha Counter Shoryuuken
[StateDef 1103]
type = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 1100
poweradd=45

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

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = S1000,1
channel = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 1100
trigger1 = animelem = 2
value = S1100,9
channel = -1

[State 0, Explod]
type = Explod
trigger1= anim = 1100
trigger1 = animelem =1
anim = 1190
ID = 1190
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = 2
supermove = 9999999999
pausemove = 9999999999
scale = 1,1
sprpriority = 5
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause = 0
;persistent =

[State 0, Explod]
type = Explod
trigger1= anim = 1100
trigger1 = animelem =2
anim = 1191
ID = 1190
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = 999999
supermove = 9999999999
pausemove = 9999999999
scale = 1,1
sprpriority = 5
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause = 0
;persistent =

[State 0, Explod]
type = Explod
trigger1= anim = 1100
trigger1 = animelem =3
anim = 1192
ID = 1190
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = 999999
supermove = 9999999999
pausemove = 9999999999
scale = 1,1
sprpriority = 5
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause = 0
;persistent =

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = animelemtime(4) = 0
id = 1190
;ignorehitpause =
;persistent =

[State 0, Explod]
type = Explod
trigger1= anim = 1100
trigger1 = animelem =4
anim = 1193
ID = 1190
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = 999999
supermove = 9999999999
pausemove = 9999999999
scale = 1,1
sprpriority = 5
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause = 0
;persistent =

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = anim !=1100
id = 1190
;ignorehitpause =
;persistent =

[State 0, Explod]
type = Explod
trigger1= anim = 1105 ;&& animtime = 1
;trigger1 = animelem =1
anim = 1194
ID = 1192
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove = 9999999999
pausemove = 9999999999
scale = 1,1
sprpriority = 5
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause = 0
persistent = 0

[State 0, Explod]
type = Explod
;trigger1= anim = 1100
triggerall = movehit
trigger1 = animelemtime(2) = 1
trigger2 = animelemtime(3) = 1
trigger3 = animelemtime(4) = 1
anim = 1195
ID = 1195
pos = -23,-60
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove = 9999999999
pausemove = 9999999999
scale = 1.1,1.1
sprpriority = 5
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause = 1
persistent = 0

[State 0, Explod]
type = Explod
trigger1= anim = 1100
trigger1 = animelem =4
anim = 7023
ID = 7023
pos = 10,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove = 9999999999
pausemove = 9999999999
scale = .5,.5
sprpriority = 5
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
;ignorehitpause = 0
;persistent =

[State 210, hit]
type=hitdef
trigger1=animelem=2
attr=S,NA
damage=30,0
animtype=Hard
guardflag=M
hitflag=MAF
priority=4,Hit
pausetime=10,10
sparkno=s8210+(random%8)
guard.sparkno=s8105
sparkxy=-10,-40
hitsound=s1,6
guardsound=s2,0
ground.type = Low
air.type = low
ground.slidetime = 20
ground.hittime  = 20
guard.ctrltime = 20
ground.velocity = -1,-11
guard.velocity = -9
air.velocity = -2,-11
envshake.time = 10
envshake.ampl = 3
fall = 1
fall.recover = 0
air.fall = 1
air.recover = 0
yaccel = .5
persistent = 1
forcestand = 1
getpower=50
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -5
airguard.cornerpush.veloff = 0


[State 210, hit]
type=hitdef
trigger1=animelem=3
attr=S,NA
damage=30,0
animtype=Hard
guardflag=M
hitflag=MAF
priority=4,Hit
pausetime=10,10
sparkno=s8210+(random%8)
guard.sparkno=s8105
sparkxy=-10,-60
hitsound=s1,6
guardsound=s2,0
ground.type = Low
air.type = low
ground.slidetime = 20
ground.hittime  = 20
guard.ctrltime = 20
ground.velocity = -1,-11
guard.velocity = -9
air.velocity = -0,-10
envshake.time = 10
envshake.ampl = 3
fall = 1
fall.recover = 0
air.fall = 1
air.recover = 0
yaccel = .5
persistent = 1
forcestand = 1
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -5
airguard.cornerpush.veloff = 0
getpower=50

[State 210, hit]
type=hitdef
trigger1=animelem=4
attr=S,NA
damage=30,0
animtype=Hard
guardflag=M
hitflag=MAF
priority=4,Hit
pausetime=10,10
sparkno=s8210+(random%8)
guard.sparkno=s8105
sparkxy=-10,-71
hitsound=s1,6
guardsound=s2,0
ground.type = high
air.type = High
ground.slidetime = 20
ground.hittime  = 20
guard.ctrltime = 20
ground.velocity = -2,-11
guard.velocity = -9
air.velocity = -2,-11
envshake.time = 10
envshake.ampl = 3
fall = 1
fall.recover = 0
air.fall = 1
air.recover = 0
yaccel = .5
persistent = 1
forcestand = 1
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -5
airguard.cornerpush.veloff = 0
getpower=50

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

[State 0, VelSet]
type = VelSet
trigger1 = anim = 1105
x = 0

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

[State 0, Gravity]
type = Gravity
trigger1 = time >= 8

[State 1000, end]
type = ChangeAnim
trigger1 = Vel Y >= 0
trigger1 = animelemtime(4) >= 1
value = 1105

[State 105, 3]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
trigger1 = anim = 1105
value =1110

;---------------------------------------------------------------------------
; Alpha Counter Kick
[Statedef 451]
type    = C
movetype= A
physics = C
juggle  = 1
poweradd= 60
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 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1 && random <= 700
value = S3,2
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

;--------------------------------------------------------------------
;Combo Breaker Shoryuuken
[StateDef 1104]
type = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 1100
poweradd=-1000

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S7051,25
channel = -1

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = S1000,1
channel = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 1100
trigger1 = animelem = 2
value = S1100,9
channel = -1

[State 0, Explod]
type = Explod
trigger1= anim = 1100
trigger1 = animelem =1
anim = 1190
ID = 1190
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = 2
supermove = 9999999999
pausemove = 9999999999
scale = 1,1
sprpriority = 5
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause = 0
;persistent =

[State 0, Explod]
type = Explod
trigger1= anim = 1100
trigger1 = animelem =2
anim = 1191
ID = 1190
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = 999999
supermove = 9999999999
pausemove = 9999999999
scale = 1,1
sprpriority = 5
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause = 0
;persistent =

[State 0, Explod]
type = Explod
trigger1= anim = 1100
trigger1 = animelem =3
anim = 1192
ID = 1190
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = 999999
supermove = 9999999999
pausemove = 9999999999
scale = 1,1
sprpriority = 5
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause = 0
;persistent =

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = animelemtime(4) = 0
id = 1190
;ignorehitpause =
;persistent =

[State 0, Explod]
type = Explod
trigger1= anim = 1100
trigger1 = animelem =4
anim = 1193
ID = 1190
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = 999999
supermove = 9999999999
pausemove = 9999999999
scale = 1,1
sprpriority = 5
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause = 0
;persistent =

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = anim !=1100
id = 1190
;ignorehitpause =
;persistent =

[State 0, Explod]
type = Explod
trigger1= anim = 1105 ;&& animtime = 1
;trigger1 = animelem =1
anim = 1194
ID = 1192
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove = 9999999999
pausemove = 9999999999
scale = 1,1
sprpriority = 5
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause = 0
persistent = 0

[State 0, Explod]
type = Explod
;trigger1= anim = 1100
triggerall = movehit
trigger1 = animelemtime(2) = 1
trigger2 = animelemtime(3) = 1
trigger3 = animelemtime(4) = 1
anim = 1195
ID = 1195
pos = -23,-60
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove = 9999999999
pausemove = 9999999999
scale = 1.1,1.1
sprpriority = 5
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause = 1
persistent = 0

[State 0, Explod]
type = Explod
trigger1= anim = 1100
trigger1 = animelem =4
anim = 7023
ID = 7023
pos = 10,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove = 9999999999
pausemove = 9999999999
scale = .5,.5
sprpriority = 5
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
;ignorehitpause = 0
;persistent =

[State 210, hit]
type=hitdef
trigger1=!time
attr=S,NA
damage=90,5
animtype=Hard
guardflag=M
hitflag=MAF
priority=4,Hit
pausetime=30,30
sparkno=s8210+(random%8)
guard.sparkno=s8105
sparkxy=-10,-71
hitsound=s1,6
guardsound=s2,0
ground.type = high
air.type = High
ground.slidetime = 20
ground.hittime  = 20
guard.ctrltime = 20
ground.velocity = -2,-15
guard.velocity = -9
air.velocity = -2,-15
envshake.time = 10
envshake.ampl = 3
fall = 1
fall.recover = 0
air.fall = 1
air.recover = 0
yaccel = .5
persistent = 1
forcestand = 1
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -5
airguard.cornerpush.veloff = 0
getpower=0

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

[State 0, VelSet]
type = VelSet
trigger1 = anim = 1105
x = 0

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

[State 0, Gravity]
type = Gravity
trigger1 = time >= 8

[State 1000, end]
type = ChangeAnim
trigger1 = Vel Y >= 0
trigger1 = animelemtime(4) >= 1
value = 1105

[State 105, 3]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
trigger1 = anim = 1105
value =1110

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




;------------------
; XOR Method's HitPauseTime Helper State

[StateDef 9743]
type = S
movetype = I
physics = N
anim = 9741
ctrl = 0

[State 9743, Safety]; Just in case your opponent is very poorly coded.
type = SelfState
trigger1 = !IsHelper
value = 0

[State 9743, HitPauseTime]
type = VarSet
trigger1 = !(Parent,HitPauseTime)
trigger2 = (GameTime>Parent,var(57))
var(1) = Parent,HitPauseTime

[State 9742, Goodbye]
type = DestroySelf
trigger1 = (Parent,var(59) = 1)
trigger2 = !(Parent,Alive)
trigger3 = (RoundState != 2)

;==================================================================================
;==================================================================================
;==================================================================================

;---------------------------------------------------------------------------
; Override common states (use same number to override) :
;---------------------------------------------------------------------------

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

;==================================================================================
;======| RELACIONADO À AI - AI RELATED |===========================================
;==================================================================================

; Within StateDef -2, none of your own AI-related code should be placed
; above these next two controllers.

[State -2, StopAI]
type = VarSet
triggerall = (var(59) > 0)
trigger1 = (RoundState != 2)
trigger2 = !Alive
var(59) = -2
IgnoreHitPause = 1

; This controller is optional.  It allows you treat the AI flag as a boolean
; value rather than an integer value, letting you trigger your AI directives
; with "var(0)" instead of "var(59)>0", and letting you make moves usable only
; by humans by using "!var(0)" instead of "var(59)<1", thus slightly improving
; the size and efficiency of your code.
; Another benefit is that it makes it much easier for users to disable your AI,
; if they so choose.
[State -2, Simplifier]
type = VarSet
trigger1 = (var(59) = 1)
trigger2 = (var(0):=0)
var(0) = 1	; Another option is to replace 1 with something like MatchNo, if
		; you want to design your AI to have varying levels of difficulty.
IgnoreHitPause = 1

[State -2, varKOsnd]
type=varset
trigger1=alive&&var(18)>0
trigger2=!alive&&var(18)<2
var(18)=ifelse(alive,0,var(8)+1)
ignorehitpause=1

[State -2, KOsnd]
type=playsnd
trigger1=!alive&&var(18)=1
trigger1=var(18):=2
value=5500,0;ifelse((var(1)=2),2,1)+2*(stateno=5130)
ignorehitpause=1
persistent=0

;---------------------------------------------------
[State -2, Hyper Combo Finish!!]
type = Helper
triggerall = NumHelper(9999) <= 0
triggerall = NumHelper(7610) <= 0
triggerall = (stateno = [3000,3599]) || (stateno = [3700,3799]) || (stateno = [3900,3999])
triggerall = roundstate = 3
trigger1 = Winko
helpertype = normal
name = "HyperFinish"
ID = 9999
stateno = 9999
ownpal = 1
supermovetime = 9999
pausemovetime = 9999
ignorehitpause = 1

[State -2, Fffffinish!!]
type = Helper
triggerall = NumHelper(9998) <= 0
triggerall = NumHelper(9999) <= 0
triggerall = NumHelper(7610) <= 0
triggerall = stateno != [3000,3999]
triggerall = roundstate = 3
trigger1 = Winko
helpertype = normal
name = "Finish"
ID = 9998
stateno = 9998
ownpal = 1
supermovetime = 9999
pausemovetime = 9999
ignorehitpause = 1

;------------------------------------------------------
;signs

[State -2, VS_Combo]
type = VarSet
trigger1 = var(28) >= 3
trigger2 = var(28)=-1 && (movehit || p2stateno = [5000,5899]);p2stateno = 6300 || p2movetype = H);p2stateno = [5000,5899])
var(29) = 1+(var(28)>4)+(var(28)>5)+(var(28)>7)+(var(28)>9)+(var(28)>29)+(var(28)>49)+(var(28)>69)-(var(28)=-1)
ignorehitpause = 1

[State -2, Danger]
type = VarSet
trigger1 = var(30) !=1 && roundstate=2 && life = [1,250]
var(29) = 9
ignorehitpause = 1

; sound First attack
[State -2, First Attack]
type = PlaySnd
triggerall = var(28)=-1
triggerall = NumExplod(8701) = 0
trigger1 = var(28)=-1 && (movehit || p2stateno = [5000,5899]);p2stateno = 6300 || p2movetype = H);p2stateno = [5000,5899])
persistent = 0
value = 7050,0
volume=255
ignorehitpause = 1

; Telop sound
[State -2, Combo Sound]
type = PlaySnd
trigger1 = NumExplod(8701) = 0
trigger1 = var(28)=0 && var(29)!=0
persistent = 0;1
value = 7051,var(29)
volume=255
ignorehitpause = 1

[State -2, Left]
type = explod
trigger1 = var(28)=0 && var(29)!=0
trigger2 = var(28)=-1 && (movehit || p2stateno = [5000,5899]);p2stateno = 6300 ||p2movetype = H);p2stateno = [5000,5899])
triggerall = TeamSide = 1 && NumExplod(8701) = 0
anim = (7250 + var(29))
ID = 8701
postype = left
pos = 3,80
ontop = 1
bindtime = -1
removetime = 60
ownpal = 1
supermovetime = 60
pausemovetime = 60
scale = 0.5,0.5
persistent = 0
ignorehitpause = 1

[State -2, Right]
type = explod
trigger1 = var(28)=0 && var(29)!=0
trigger2 = var(28)=-1 && (movehit || p2stateno = [5000,5899]);p2stateno = 6300 ||p2movetype = H);p2stateno = [5000,5899])
triggerall = TeamSide = 2 && NumExplod(8701) = 0
anim = (7350+ var(29));8011;8720;
ID = 8701
postype = right
pos = -10,80;130;82
ontop = 1
bindtime = -1
removetime = 60;90
ownpal = 1
supermovetime = 60;90
pausemovetime = 60;90
scale = 0.5,0.5
persistent = 0;1
ignorehitpause = 1

[State -2, VS_Combo]
type = VarAdd
trigger1 = enemynear, time = 0
trigger1 = enemynear, Hitshakeover = 0
trigger1 = p2stateno = [5000,5899];p2stateno = 6300 || p2movetype = H;p2stateno = [5000,5899]
trigger2 = var(28)=-1 && (movehit || p2stateno = [5000,5899]);p2stateno = 6300 || p2movetype = H);p2stateno = [5000,5899])
var(28) = 1 + (var(28)=-1)
ignorehitpause = 1

[State -2, VS_Combo]
type = VarSet
trigger1 = var(28)!=-1 && (p2movetype!=H || enemynear, ctrl)
trigger2 = var(28)=-1 && movetype = H;p2stateno = [5000,5899])
var(28) = 0 - (roundstate<2)
ignorehitpause = 1

[State -2, VS_Combo]
type = VarSet
triggerall = numexplod(8701)!=0
trigger1 = var(28)=0
var(29) = 0
ignorehitpause = 1

[State -2, Score]
type = Varadd
trigger1 = enemynear, time=0
trigger1 = enemynear, Hitshakeover=0
trigger1 = moveguarded || p2stateno = 6300 || p2movetype = H;p2stateno = [5000,5899])
trigger2 = var(28)=-1 && (movehit || p2stateno = 6300 || p2movetype = H);p2stateno = [5000,5899])
trigger3 = roundstate=4 && time=0 && stateno = [180,189]
var(21) = ceil(stateno/50)*var(28) + (life)*(roundstate=4) + (moveguarded)
ignorehitpause = 1

[State -2, Normalize Score]
type = Varset
triggerall = numpartner=1
trigger1 = var(21)< partner, var(21)
var(21) = partner, var(21)

[State -2, Is Danger]
type = VarSet
trigger2 = var(30) = 0 && life <= 250
trigger1 = var(30) = 1 && roundstate!=2
var(30) = (roundstate>1)
ignorehitpause = 1

[State -2, Is First Attack p3]
type = VarSet
triggerall = numpartner=1
trigger1 = partner, movehit
trigger1 = partner, var(28) != -1
var(28) = 0
ignorehitpause = 1

[State -2, AssertSpecial]
type = AssertSpecial
triggerall = roundno = 1
trigger1 = roundstate < 2
flag = nomusic

[State -2, Combo VarAdd]
type = VarAdd
trigger1 = (hitpausetime = 1) && (P2Movetype = H) && (MoveHit)
trigger2 = ProjHitTime(0) = 1
v = 20
value = 1
ignorehitpause = 1

[State -2, VarSet]
type = VarSet
trigger1 = P2Movetype != H
v = 20
value = 0

[State -2, Clipboard]
type = DisplayToClipboard
trigger1 = 1
text = "Counter = %d"
params = Var(20)

;-----------------------------------------------------------------------------
;Combos do less damage
[State -2, Attack MulSet 1]
type = AttackMulSet
triggerall = stateno = [3000,3999]
trigger2 = hitdefattr = SCA, HA, HP
trigger1 = Var(20) >= 0
value = 1

[State -2, Attack MulSet 1]
type = AttackMulSet
triggerall = stateno < 3000
trigger1 = Var(20) <= 0
value = 1

[State -2, Attack MulSet 2]
type = AttackMulSet
triggerall = stateno < 3000
trigger1 = Var(20) = [1,4]
value = 0.7

[State -2, Attack MulSet 3]
type = AttackMulSet
triggerall = stateno < 3000
trigger1 = Var(20) = [5,8]
value = 0.5

[State -2, Attack MulSet 4]
type = AttackMulSet
triggerall = stateno < 3000
trigger1 = Var(20) > 8
value = 0.3

[State -2, DefenceMulSet]
type = DefenceMulSet
triggerall = enemy, name = "Perfect Weapon MB-02"
trigger1 = !time
value = .1
;ignorehitpause =
;persistent =


;==================================================================================
;==================================================================================
;==================================================================================


;---------------------------------------------------------------------------
; States that are executed when in self's state file (use statedef -3)
;---------------------------------------------------------------------------

[Statedef -3]

[State -3, Trans]
type = Trans
triggerall = stateno != [190,193]
triggerall = stateno != 5150
trigger1 = gametime%(60) = 1
trigger2 = gametime%(80) = 1
trans = add1

[State -3, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != [1100,1155]
id = 1190
;ignorehitpause =
;persistent =

[State -3, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != [1100,1155]
id = 1192
;ignorehitpause =
;persistent =

[State -3, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != [3100,3199]
id = 3190
;ignorehitpause =
;persistent =

[State -3, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != [3100,3199]
id = 3191
;ignorehitpause =
;persistent =


;==================================================================================
;======| RELACIONADO À AI - AI RELATED |===========================================
;==================================================================================


; According to Roque, this method works in Linux Mugen version 2002.04.14,
; whereas the old humanly-impossible commands method does not.
; It is very important that this controller NOT be moved to State -2.
; Note that this part won't work if AI.Cheat is turned off in mugen.cfg.
;[State -3, XOR]
;type = VarSet
;triggerall = var(59)!=1
;triggerall = (var(57) = GameTime-1)
;triggerall = NumHelper(9743)
;triggerall = !(Helper(9743),var(1))
;trigger1 = (command = "a") ^^ (command = "a2")
;trigger2 = (command = "b") ^^ (command = "b2")
;trigger3 = (command = "c") ^^ (command = "c2")
;trigger4 = (command = "x") ^^ (command = "x2")
;trigger5 = (command = "y") ^^ (command = "y2")
;trigger6 = (command = "z") ^^ (command = "z2")
;trigger7 = (command = "start") ^^ (command = "start2")
;trigger8 = (command = "holda") ^^ (command = "holda2")
;trigger9 = (command = "holdb") ^^ (command = "holdb2")
;trigger10 = (command = "holdc") ^^ (command = "holdc2")
;trigger11 = (command = "holdx") ^^ (command = "holdx2")
;trigger12 = (command = "holdy") ^^ (command = "holdy2")
;trigger13 = (command = "holdz") ^^ (command = "holdz2")
;trigger14 = (command = "holdstart") ^^ (command = "holdstart2")
;trigger15 = (command = "holdfwd") ^^ (command = "holdfwd2")
;trigger16 = (command = "holdback") ^^ (command = "holdback2")
;trigger17 = (command = "holdup") ^^ (command = "holdup2")
;trigger18 = (command = "holddown") ^^ (command = "holddown2")
;trigger19 = (command = "recovery") ^^ (command = "recovery2")
;Add more as desired. (See my notes in the CMD.)
;var(59) = 1

; It is very important that this controller NOT be moved to State -2, as putting
; it there would defeat the entire purpose of the controller, allowing the
; helper method or the XOR method to erroneously set the AI variable.
; And within State -3, don't put any ChangeState controllers before this
; controller, lest you unnecessarily delay your character's AI activation.
[State -3, GameTimeVar]
type = VarSet
trigger1 = 1
var(57) = GameTime
IgnoreHitPause = 1

; Within StateDef -3, none of your own AI-related code should come after the code
; provided here (and putting it before the code is also generally a bad idea).
; It's better to use State -1 (or, in special circumstances, State -2) instead.

;==================================================================================
;==================================================================================
;==================================================================================
[State -3,Slow]
type = Pause
trigger1 = stateno = 3501
trigger1 = (GameTime%1) = 0
trigger1 = roundstate = 2
;trigger1 =  Movehit = 1
;trigger2 = stateno = 3501
;trigger2 = (GameTime%1) = 0
;trigger2 = roundstate = 2
;trigger3 = (GameTime%1) = 0
;trigger3 = roundstate = 2
;trigger3 = stateno = 3500
;trigger3 = movehit
;trigger2 =  Movehit = 1
time = 2
movetime = 0
ignorehitpause = 1

;Ths controller plays a sound everytime the player lands from a jump, or
;from a back-dash.
[State -3, Landing Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 52 ;Jump land
trigger2 = stateno = 106 ;Run-back land
trigger3 = stateno = 101
trigger4 = stateno = [900,901]
value = s100,0

[State -3, Landing Sound]
type = PlaySnd
triggerall = Time = 1
;trigger1 = stateno = 100 ;Jump land
trigger1 = stateno = 105 ;Run-back land
value = s100,1

[State -3, Landing Anim]
type = Explod
triggerall = Time = 1
trigger1 = stateno = 52 ;Jump land
trigger2 = stateno = 106
trigger3 = stateno = 101
trigger4 = stateno = 1110
anim = 7503
ID = 8030
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove = 9999
pausemove = 9999
scale = .6,.6
sprpriority = -1
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause =1
persistent =0

[State -3, AfterImagePersist]
type=afterimagetime
trigger1=stateno=[1600,1603] ;&& time <= 80
trigger2=stateno=[3100,3102]
trigger3=stateno=3000 && anim = 3000
trigger4=stateno=3005 && statetype = A && (time >=80) ;numhelper(3090)=0
trigger5=stateno=3201
trigger6=stateno=1290
trigger7=stateno=1092
trigger8=stateno=3210 && statetype = A
trigger9=stateno=3600
trigger10=stateno=3491
trigger11=stateno=3492
trigger12=stateno=3495
trigger13=stateno=[3200,3205]
trigger14=stateno=[3300,3305]
trigger15=stateno=[3400,3455]
trigger16=stateno=[3900,3905]
trigger17=stateno=19500
trigger17=animelemtime(2)<0
;trigger13=stateno=3500 && anim = 3500
time=2


[State -3, StopSnd]
type = StopSnd
trigger1 = anim != 3400
trigger2 = movetype = H
channel = 15
ignorehitpause = 1

[State -3, StopSnd]
type = StopSnd
trigger1 = anim != 3400
trigger2 = movetype = H
channel = 16
ignorehitpause = 1

[State -3, StopSnd]
type = StopSnd
trigger1 = anim != 3400
trigger2 = movetype = H
channel = 17
ignorehitpause = 1

[State -3, StopSnd]
type = StopSnd
trigger1 = movetype = H
trigger2 = stateno != [3000,3999]
channel = 15
ignorehitpause = 1

[State -3, StopSnd]
type = StopSnd
trigger1 =  movetype = H
channel = 14
ignorehitpause = 1

[State -3, AfterImageTime]
type = AfterImageTime
trigger1 = numhelper(7005)=1
time = 0
ignorehitpause = 1
;persistent =  0

;------------------------------------------------------------------------------------------------------
;wall hit
[state 5100,2]
type = explod
triggerall = stateno!=0
triggerall = stateno!=3005
triggerall = stateno!=3000
triggerall = stateno!=1000
triggerall = stateno!=1005
triggerall = stateno!=1010
triggerall = stateno!=50
;triggerall = stateno!=[5000,5999]
;triggerall = movetype ! =H
triggerall = var(42)
triggerall = enemynear,stateno != [120,159]
trigger1 = enemynear,movetype = h
trigger1 = enemynear,backedgedist <= 15
trigger1 = enemynear,statetype = a
trigger1 = enemynear,vel x < 0
anim = 7024
pos = (enemy,const(size.mid.pos.x))-20,(target,const(size.mid.pos.y))
postype = p2
scale = 0.6,0.52
sprpriority = 3
bindtime = 1
facing = -1
removetime = -2
id = 7024
shadow = 0,0,0
ownpal = 1
;removeongethit = 1
;ignorehitpause = 1
;vel = -2,0
;accel = -0.1,0

[state 5100,2]
type = explod
triggerall = stateno!=0
triggerall = stateno!=3005
triggerall = stateno!=3000
triggerall = stateno!=1000
triggerall = stateno!=1005
triggerall = stateno!=1010
triggerall = stateno!=50
;triggerall = stateno!=[5000,5999]
;triggerall = movetype ! =H
triggerall = var(42)
triggerall = enemynear,stateno != [120,159]
trigger1 = enemynear,movetype = h
trigger1 = enemynear,backedgedist <= 15
trigger1 = enemynear,statetype = a
trigger1 = enemynear,vel x < 0
anim = 7024
pos = (enemy,const(size.mid.pos.x))-20,(target,const(size.mid.pos.y))
postype = p2
sprpriority = -3
bindtime = 1
facing = -1
scale = 0.6,0.52
removetime = -2
id = 7024
shadow = -1
ownpal = 1
;removeongethit = 1
;ignorehitpause = 1
;vel = -2,0
;accel = -0.1,0

[state 5100,2]
type = playsnd
triggerall = stateno!=0
triggerall = stateno!=3005
triggerall = stateno!=3000
triggerall = stateno!=1000
triggerall = stateno!=1005
triggerall = stateno!=1010
triggerall = stateno!=50
;triggerall = stateno!=[5000,5999]
;triggerall = movetype ! =H
triggerall = var(42)
triggerall = numenemy
triggerall = enemynear,stateno != [120,159]
trigger1 = stateno != 4003
trigger1 = enemynear,movetype = h
trigger1 = enemynear,backedgedist < 15
trigger1 = enemynear,statetype = a
trigger1 = enemynear,vel x < 0
persistent = 0
value = 7000,2
channel = 4
volume = 255

[state 200, 3]
type = varset
;triggerall = stateno!=[5000,5999]
;triggerall = movetype ! =H
triggerall = var(42)
triggerall = numenemy
trigger1 = enemynear,movetype = h
trigger1 = enemynear,backedgedist < 15
trigger1 = enemynear,statetype = a
trigger1 = enemynear,vel x < 0
v = 42
value = 0

[state -3, 2];combo hosei
type = varset
trigger1 = 1
v = 24
value = var(22)

[state -3, 2];combo hosei
type = varset
trigger1 = 1
v = 22
value = var(25)+hitcount

[state -3, 2];combo hosei
type = varset
trigger1 = enemynear,movetype != H
v = 25
value = 0

;***************
[state -3, 2];combo
type = varset
trigger1 = var(22)>var(24)
v = 42
value = 1

[State -3, VarSet]
type = VarSet
trigger1 = stateno != [3000,3999]
;trigger1 = animtime = 0
v = 45   ;fv = 10
value = 0

[State -3, Explod]
type = Explod
triggerall = numexplod(3792)=0
trigger1 = p2stateno = 3497
trigger2 = p2stateno = 34970
trigger3 = p2stateno = 34971
trigger4 = p2stateno = 3498
trigger5 = p2stateno = 34980
trigger6 = p2stateno = 34981
anim = 3792
ID = 3792
pos = 0,-50
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove = 999
pausemove = 999
scale = 1,1.5
sprpriority = 5
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
;ignorehitpause =
persistent =  1

[State -3, RemoveExplod]
type = RemoveExplod
trigger1 = p2movetype != H
id =  3792
;ignorehitpause =
;persistent =

; Wall Jump Var
[State -3, Wall Jump Var]
type = VarSet
trigger1 = statetype = S
trigger1 = var(23) = 1
v = 23
value = 0
