;---------------------------------------------------------------------------
; Standing Light Punch
[Statedef 200]
type    = S				;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A				;Move-type: A-attack, I-idle, H-gethit
physics = S				;Physics: S-stand, C-crouch, A-air
juggle  = 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 = 200				;Change animation (Def: no change)
poweradd =20			;Power to add (Def: 0)
sprpriority = 2			;Set layering priority to 2 (in front)

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

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

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

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

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

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

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

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

[State 205, hit]
type=hitdef
trigger1=!time
attr=S,NA
damage=30,0
animtype=Medium
guardflag=MA
hitflag=MAF
priority=3,Hit
pausetime=10,10
sparkno=s8200+(random%8)
guard.sparkno=s8100
sparkxy=-15,-39
hitsound=s1,4
guardsound=s2,0
ground.type=High
ground.slidetime=12
ground.hittime=12
ground.velocity=-3
air.type=Low
air.hittime=10
air.velocity=-5,-7
ground.cornerpush.veloff=-6
air.cornerpush.veloff=-6
yaccel=.5
persistent=0
envshake.time = 10
envshake.ampl = 2
getpower=0

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

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

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

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

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

[State 0, PosAdd]
type = PosAdd
trigger1 = AnimElemTime(2) = 0
x = 3

[State 0, VelSet]
type = VelSet
trigger1 = (time = [5,17])
x = 1
ignorehitpause = 1

[State 0, PosAdd]
type = PosAdd
trigger1 = AnimTime = 0
x = -3

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

[State 210, hit]
type=hitdef
trigger1=!time
attr=S,NA
damage=50,0
animtype=Hard
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=12,12
sparkno=s8200+(random%8)
guard.sparkno=s8100
sparkxy=-15,-35
hitsound=s1,6
guardsound=s2,0
ground.type=High
ground.slidetime=15
ground.hittime=15
ground.velocity=-10
air.type=Low
air.hittime=12
air.velocity=-5,-7
ground.cornerpush.veloff=-12
air.cornerpush.veloff=-12
yaccel=.5
persistent=0
envshake.time = 12
envshake.ampl = 3
getpower=0

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

;-------------------------------------------------------------------
; R-Buster Shot
[StateDef 225]
type = S
movetype= A
physics = S
juggle  = 2
velset = 0,0
ctrl = 0
anim = 225
poweradd = 60
sprpriority = 2

[State 0, PlaySnd]
type = PlaySnd
triggerall = random <= 600
trigger1 = AnimElem = 6
value = S3,7
volume = 0
channel = 5

[State 0,PalFX]
type = palfx
trigger1 = time = [7,9]
add = 160,160,160
time = 1

[state 210,PalFX]
type = palfx
trigger1 = time = [10,11]
add = 120,120,120
time = 1

[state 210,PalFX]
type = palfx
trigger1 = time = [12,13]
add = 80,80,80
time = 1

[state 210,PalFX]
type = palfx
trigger1 = time = [14,17]
add = 40,40,40
time = 1

[State 0, Helper]
type = Helper
triggerall = var(31) < 90
;triggerall = numhelper(1000) <= 4
trigger1 = AnimElem = 8
helpertype = normal ;player
name = "Shot"
ID = 1000
stateno = 1090
pos = 15,-37
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale=1
size.yscale=1

[State 0, Explod]
type = Explod
trigger1 = AnimElemTime(8) = 0
anim = ifelse((var(31) = [90,179]),1095,ifelse((var(31)=[180,359]),1096,1098))
ID = 225
pos = 35,-39
postype = p1  ;p2,front,back,left,right
bindtime = 1
removetime = -2
scale = 1,1
sprpriority = 5
ownpal = 1
removeongethit = 1
ignorehitpause = 1

[State 0, Helper]
type = Helper
triggerall = var(31) = [90,179]
;triggerall = numhelper(1000) <= 4
trigger1 = AnimElem = 8
helpertype = normal ;player
name = "Shot"
ID = 10000
stateno = 10900
pos = 35,-39
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale=1
size.yscale=1

[State 0, Helper]
type = Helper
triggerall = var(31) = [180,359]
;triggerall = numhelper(1000) <= 4
trigger1 = AnimElem = 8
helpertype = normal ;player
name = "Shot"
ID = 100000
stateno = 109000
pos = 35,-39
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale=1
size.yscale=1

[State 0, Helper]
type = Helper
triggerall = var(31) >= 360
;triggerall = numhelper(1000) <= 4
trigger1 = AnimElem = 8
helpertype = normal ;player
name = "Shot"
ID = 1000000
stateno = 1090000
pos = 35,-39
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale=1
size.yscale=1

[State 0, VarSet]
type = VarSet
trigger1 = AnimElemTime(9) >= 0
v = 31    ;fv = 10
value = 0

[State 1000, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Standing Light Kick
[Statedef 230]
type    = S
movetype= A
physics = S
juggle  = 1
poweradd= 20
ctrl = 0
;velset = 0,0
anim = 230

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

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

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

[State 215, hit]
type=hitdef
trigger1 =time = 0
attr=S,NA
damage=20,0
animtype=Light
guardflag=MA
hitflag=MAF
priority=2,Hit
pausetime=8,8
sparkno=s8200+(random%8)
guard.sparkno=s8100
sparkxy=-15,-15
hitsound=s1,2
guardsound=s2,0
ground.type=Low
ground.slidetime=10
ground.hittime=10
ground.velocity=-2
ground.cornerpush.veloff=-4
air.cornerpush.veloff=-4
air.type=Low
air.hittime=8
air.velocity=-5,-7
yaccel=.5
persistent=0
envshake.time = 9
envshake.ampl = 1
getpower=0

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

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

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

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

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

[State 220, hit]
type=hitdef
trigger1=!time
attr=S,NA
damage=40,0
animtype=Medium
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=10,10
sparkno=s8200+(random%8)
guard.sparkno=s8100
sparkxy = -20,-25
hitsound=s1,0
guardsound=s2,0
ground.type=High
ground.slidetime=12
ground.hittime=12
ground.velocity=-3
air.hittime = 10
ground.cornerpush.veloff=-6
air.cornerpush.veloff=-6
air.type=Low
air.velocity=-5,-7
envshake.time=10
envshake.ampl=2

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

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

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

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

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

[State 225, hit]
type=hitdef
trigger1=!time
attr=S,NA
damage=60,0
animtype=Hard
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=12,12
sparkno=s8200+(random%8)
guard.sparkno=s8100
sparkxy=-15,-30
hitsound=s1,6
guardsound=s2,0
ground.type=High
ground.slidetime=16
ground.hittime=16
ground.velocity = 0,-13.5
air.type=Low
air.hittime=12
air.velocity=-5,-7
ground.cornerpush.veloff=-2
air.cornerpush.veloff=-2
yaccel=.5
persistent=0
envshake.time = 12
envshake.ampl = 3
getpower=0

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

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

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

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

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

[State 230, hit]
type=hitdef
trigger1=time = 0
attr=C,NA
damage=10,0
animtype=Light
guardflag=MA
hitflag=MAF
priority=2,Hit
pausetime=8,8
sparkno=s8200+(random%8)
guard.sparkno=s8100
sparkxy=-10,-20
hitsound=s1,5
guardsound=s2,0
ground.type=Low
ground.slidetime=8
ground.hittime=8
ground.velocity=-2
ground.cornerpush.veloff=-4
air.cornerpush.veloff=-4
air.type=Low
air.hittime=10
air.velocity=-5,-7
yaccel=.5
envshake.time = 9
envshake.ampl = 1
getpower=0

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

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

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

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

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

[State 235, hit]
type=hitdef
trigger1=time=0
attr=C,NA
damage=30,0
animtype=Medium
guardflag=MA
hitflag=MAF
priority=3,Hit
pausetime=10,10
sparkno=s8200+(random%8)
guard.sparkno=s8100
sparkxy=-10,-33
hitsound=s1,4
guardsound=s2,0
ground.type=Low
ground.slidetime=13
ground.hittime=13
ground.velocity=-3
air.type=Low
air.hittime=12
air.velocity=-5,-7
ground.cornerpush.veloff=-6
air.cornerpush.veloff=-6
yaccel=.5
envshake.time = 9
envshake.ampl = 2
getpower=0

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

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

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

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

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

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

[State 240, hit]
type=hitdef
trigger1=time=0
attr=C,NA
damage=50,0
animtype=Hard
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=12,12
sparkno=s8200+(random%8)
guard.sparkno=s8100
sparkxy=-10,-40
hitsound=s1,6
guardsound=s2,0
ground.type=High
ground.slidetime=16
ground.hittime=16
ground.velocity = -8,0
air.type=Low
air.hittime=12
air.velocity=-5,-7
ground.cornerpush.veloff=-10
air.cornerpush.veloff=-10
yaccel=.5
;p2stateno = 5051
envshake.time = 12
envshake.ampl = 3
getpower=0

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

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

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

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

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

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

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

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

[State 245, hit]
type=hitdef
trigger1=time = 0
attr=C,NA
damage=20,0
animtype=Light
guardflag=L
hitflag=MAFD
priority=2,Hit
pausetime=8,8
sparkno=s8200+(random%8)
guard.sparkno=s8100
sparkxy=-10,-20
hitsound=s1,2
guardsound=s2,0
ground.type=Low
ground.slidetime=10
ground.hittime=10
ground.velocity=-2
ground.cornerpush.veloff=-4
air.cornerpush.veloff=-4
air.type=Low
air.hittime=12
air.velocity=-5,-7
down.velocity=-2,-2
yaccel=.5
envshake.time = 9
envshake.ampl = 1
getpower=0

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

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

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

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

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

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

[State 250, hit]
type=hitdef
trigger1=time = 0
attr=C,NA
damage=40,0
animtype=Medium
guardflag=L
hitflag=MAFD
priority=3,Hit
pausetime=10,10
sparkno=s8200+(random%8)
guard.sparkno=s8100
sparkxy=-10,-6
hitsound=s1,0
guardsound=s2,0
ground.type=Low
ground.slidetime=13
ground.hittime=13
ground.velocity=-3
air.type=Low
air.hittime=12
air.velocity=-5,-7
ground.cornerpush.veloff=-6
air.cornerpush.veloff=-6
down.velocity=-3,-3
yaccel=.5
envshake.time = 9
envshake.ampl = 2
getpower=0

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

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

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

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

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

[State 0, NotHitBy]
type = NotHitBy
trigger1 = prevstateno = 750
value = SCA
time = 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,-3
hitsound=s1,6
guardsound=s2,0
ground.type=Trip
ground.slidetime=16
ground.hittime=16
ground.velocity=-1.33,-3.85
air.type=Low
air.hittime=12
air.velocity=-1.33,-3.85
air.cornerpush.veloff=0
down.velocity=-4,-4
getpower=0
yaccel=.5
fall=1
envshake.time = 12
envshake.ampl = 3
getpower=0

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

[State 0, VelMul]
type = VelMul
trigger1 = AnimElemTime(3) >= 0
x = .95

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

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

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

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

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

[State 260, hit]
type=hitdef
trigger1=time = 0
attr=A,NA
damage=25,0
animtype=Light
guardflag=HA
hitflag=MAF
priority=3,Hit
pausetime=8,8
sparkno=s8200+(random%8)
guard.sparkno=s8100
sparkxy=-10,-42
hitsound=s1,5
guardsound=s2,0
ground.type=High
ground.slidetime=9
ground.hittime=12
ground.velocity=-3
air.type=Low
air.velocity = -.5,((vel y)-.2)
getpower=0
envshake.time=9
envshake.ampl=1

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

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

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

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

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

[State 265, hit]
type=hitdef
trigger1= time = 0
attr=A,NA
damage=40,0
animtype=Medium
guardflag=HA
hitflag=MAF
priority=4,Hit
pausetime=10,11
sparkno=s8200+(random%8)
guard.sparkno=s8100
sparkxy=-15,-55
hitsound=s1,4
guardsound=s2,0
ground.type=High
ground.slidetime=11
ground.hittime=14
ground.velocity=-5
air.type=Low
air.velocity = -1,((vel y)-.2)
envshake.time=10
envshake.ampl=2
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

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

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

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

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

[State 270, hit]
type=hitdef
trigger1=time = 0
attr=A,NA
damage=60,0
animtype=Hard
guardflag=HA
hitflag=MAF
priority=5,Hit
pausetime=12,12
sparkno=s8200+(random%8)
guard.sparkno=s8100
sparkxy=-10,-40
hitsound=s1,6
guardsound=s2,0
ground.type=High
ground.slidetime=12
ground.hittime=16
ground.velocity=-7
air.type=high
air.velocity = -1,15
getpower=0
fall.yvelocity = 0
envshake.time=12
envshake.ampl=3
;fall=1
air.fall=1
fall.recover=0

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

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

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

;-------------------------------------------------------------------
; R-Buster Shot (Air)
[StateDef 625]
type = A
movetype= A
physics = N
juggle  = 2
;velset = Vel X/10,Vel Y/10
ctrl = 0
anim = 625
poweradd = 80
sprpriority = 2

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

[State 0, VelMul]
type = VelMul
trigger1 = AnimElemTime(8) < 0
x = .75
y = .75

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

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

[State 0, PlaySnd]
type = PlaySnd
triggerall = random <= 600
trigger1 = AnimElem = 6
value = S3,7
volume = 0
channel = 5

[State 0,PalFX]
type = palfx
trigger1 = time = [7,9]
add = 160,160,160
time = 1

[state 210,PalFX]
type = palfx
trigger1 = time = [10,11]
add = 120,120,120
time = 1

[state 210,PalFX]
type = palfx
trigger1 = time = [12,13]
add = 80,80,80
time = 1

[state 210,PalFX]
type = palfx
trigger1 = time = [14,17]
add = 40,40,40
time = 1

[State 0, Helper]
type = Helper
triggerall = var(31) < 90
;triggerall = numhelper(1000) <= 4
trigger1 = AnimElem = 8
helpertype = normal ;player
name = "Shot"
ID = 1000
stateno = 1090
pos = 19,-45
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale=1
size.yscale=1

[State 0, Helper]
type = Helper
triggerall = var(31) = [90,180]
;triggerall = numhelper(1000) <= 4
trigger1 = AnimElem = 8
helpertype = normal ;player
name = "Shot"
ID = 10000
stateno = 10900
pos = 41,-47
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale=1
size.yscale=1

[State 0, Helper]
type = Helper
triggerall = var(31) = [181,360]
;triggerall = numhelper(1000) <= 4
trigger1 = AnimElem = 8
helpertype = normal ;player
name = "Shot"
ID = 100000
stateno = 109000
pos = 41,-47
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale=1
size.yscale=1

[State 0, Helper]
type = Helper
triggerall = var(31) > 360
;triggerall = numhelper(1000) <= 4
trigger1 = AnimElem = 8
helpertype = normal ;player
name = "Shot"
ID = 1000000
stateno = 1090000
pos = 41,-47
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale=1
size.yscale=1

[State 0, VarSet]
type = VarSet
trigger1 = AnimElemTime(9) >= 0
v = 31    ;fv = 10
value = 0

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

[State 0, CtrlSet]
type = CtrlSet
trigger1 = AnimElemTime(20) = 0
value = 1
;---------------------------------------------------------------------------
; Jump Light Kick
[Statedef 630]
type    = A
movetype= A
physics = A
juggle  = 1
poweradd= 20
ctrl = 0
anim = 630

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

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

[State 275, hit]
type=hitdef
trigger1=time = 0
attr=A,NA
damage=25,0
animtype=Light
guardflag=HA
hitflag=MAF
priority=3,Hit
pausetime=8,8
sparkno=s8200+(random%8)
guard.sparkno=s8100
sparkxy=-15,-33
hitsound=s1,2
guardsound=s2,0
ground.type=High
ground.slidetime=9
ground.hittime=12
ground.velocity=-3
air.type=Low
air.velocity=-1,((vel y)-.2)
getpower=0
envshake.time=9
envshake.ampl=1

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

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

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

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

[State 280, hit]
type=hitdef
trigger1=time = 0
attr=A,NA
damage=40,0
animtype=Medium
guardflag=HA
hitflag=MAF
priority=4,Hit
pausetime=10,11
sparkno=s8200+(random%8)
guard.sparkno=s8100
sparkxy=-15,-30
hitsound=s1,0
guardsound=s2,0
ground.type=High
ground.slidetime=11
ground.hittime=14
ground.velocity=-5
air.type=Low
air.velocity=-1.5,((vel y)-.2)
getpower=0
envshake.time=9
envshake.ampl=2

[State 0, CtrlSet]
type = CtrlSet
trigger1 = animelemtime(13) >=0
value = 1
;---------------------------------------------------------------------------
; Jump Strong Kick
[Statedef 650]
type    = A
movetype= A
physics = A
juggle  = 1
poweradd= 60
ctrl = 0
anim = ifelse(command = "holdup", 655, 650)

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

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

[State 0, PlaySnd]
type = PlaySnd
triggerall = anim = 655
trigger1 = AnimElem = 3
value = S3,1
volume = 0
channel = 5

[State 0, NotHitBy]
type = NotHitBy
trigger1 = prevstateno = 751
trigger1 = animelemtime(7) < 0
value = SCA
time = 1

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

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

[State 285, hit]
type=hitdef
triggerall = anim = 650
trigger1=time = 0
attr=A,NA
damage=60,0
animtype=Hard
guardflag=HA
hitflag=MAF
priority=5,Hit
pausetime=12,12
sparkno=s8200+(random%8)
guard.sparkno=s8100
sparkxy=-15,-27
hitsound=s1,6
guardsound=s2,0
ground.type=High
ground.slidetime=12
ground.hittime=16
ground.velocity=-7
air.type=Low
air.velocity = -8,8
getpower=0
envshake.time=12
envshake.ampl=3
;fall=1
air.fall=1
fall.recover=0

[State 285, hit]
type=hitdef
triggerall = anim = 655
trigger1=time = 0
attr=A,NA
damage=65,0
animtype=Hard
guardflag=HA
hitflag=MAF
priority=5,Hit
pausetime=12,12
sparkno=s8200+(random%8)
guard.sparkno=s8100
sparkxy=-15,-45
hitsound=s1,6
guardsound=s2,0
ground.type=High
ground.slidetime=12
ground.hittime=16
ground.velocity=-7
air.type=Low
air.velocity = -4,12
getpower=0
envshake.time=12
envshake.ampl=3
;fall=1
air.fall=1
fall.recover=0

[State 0, CtrlSet]
type = CtrlSet
trigger1 = anim = 650
trigger1 = animelemtime(8) >=0
trigger2 = anim = 655
trigger2 = animelemtime(10) >=0
value = 1

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

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

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

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

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

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

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