;---------------------------------------------------------------------------
; Initialize (at the start of the round)
[Statedef 5900]
type = S


[State 5900, 1]
type = VarRangeSet
trigger1 = !RoundsExisted
first = 0
last = 8
value = 0

[State 5900, 1]
type = VarRangeSet
trigger1 = !RoundsExisted
first = 10
last = 59
value = 0

[State 5900, 2] ;Clear all float variables
type = VarRangeSet
trigger1 = !RoundsExisted
fvalue = 0

[State 5900, MugenVersion]
type = VarSet
trigger1 = 1
var(55) = 2
;2 = 04.14.2002+
;5 = Unfixed 04.14.2001
;6 = 11.14.2001, 11.01.2001, & fixed 04.14.2001

[State 5900, 3] ;Intro for round 1
type = ChangeState
trigger1 = roundno = 1
value = 190

[Statedef 1106];
type    = A
movetype= H
physics = N
velset = 0,0;-13,-.5

[State 1021,0]
type = turn
Trigger1 = frontedgedist <= 0
value = 1

[State 1021,0]
type = velset
trigger1 = time = 1
x = -13
y = -.6

[State 840, 2]
type = afterimage
trigger1 = time = 5
time = 13
length = 3
PalBright   =   0,  0,  0
PalContrast = 255,255,255
PalAdd      =   0,  0,  0
PalMul      =  1,1,1
FrameGap = 2
ignorehitpause = 1

[State 9000, 1]
type = ScreenBound
trigger1 = 1
movecamera = 1,0

[State 821, 1]
type = VelAdd
Trigger1 = time > 4
y = .14

[State 820, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 911

[state 190]
type = changestate
Trigger1 = backedgedist <= 0
Trigger2 = frontedgedist <= 0
value = 11065

[Statedef 11065];2
type    = A
movetype= H
physics = N
velset = 4.5,-12.7

[State 820, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 912


[State 9000, 1]
type = turn
trigger1 = time = 0
value = 1

[State 821, 1]
type = VelAdd
Trigger1 = time > 3
y = .5
x = .05

[State 821, 4]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100

[Statedef 7300]
type = A
physics = N
movetype = A
velset = 4,-5
anim = 7300
ctrl = 0
poweradd = -1000

[State 7300, FX]
type = PlaySnd
trigger1 = AnimElem = 1
value = 1,4
volume = 0

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



[State 7300, 4]
type = Changestate
trigger1 = animtime = 0
value = 7305
ctrl = 0


;-------------------------------------------
;DIVE 
[Statedef 7305]
type = A
physics = N
movetype = A
velset = 13,7
anim = 7305
ctrl = 0

[State 7305, FX]
type = PlaySnd
trigger1 = AnimElem = 1
value = 26,1
volume = 50



[State 7305, Gravity]
type = veladd
trigger1 = time > 0
y = 2



[State 7305, 3]
type = HitDef
trigger1 = AnimElem = 1
attr = A, SA
animtype = HARD
damage = 25,5
hitflag = MAFD
guardflag = MA
pausetime = 12,22
sparkno = S6003
guard.sparkno = S6014
sparkxy = -10,-35
hitsound = S0,2
guardsound = S2,0
ground.type = low
ground.slidetime = 29
ground.hittime = 29
ground.velocity = -10
air.velocity = -2,-10
air.hittime = 35
down.velocity = -2,-10
airguard.velocity = -3,-1.5
guard.velocity = -9
ground.cornerpush.veloff = -10
air.cornerpush.veloff = -6
guard.cornerpush.veloff = -10
air.fall = 1
fall.recovertime = 35
getpower = 50,20
givepower = 50,20
p2getp1stateno = 1
yaccel = .53

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


[State 7305, 4]
type = Changestate
trigger1 = pos y >= 0 && vel y > 0
value = 7310
ctrl = 0
;-------------------------------------------
;-------------------------------------------
;Land
[Statedef 7310]
type = S
physics = N
movetype = A
velset = 0,0
anim = 7310
ctrl = 0
;facep2 = 1


[State 7310, 1]
type = VelSet
trigger1 = Time = 0
y = 0

[State 7310, 2]
type = PosSet
trigger1 = Time = 0
y = 0

;Play sound when landing
[State 7310, 3]
type = PlaySnd
trigger1 = Time = 0
value = 1,5
channel = 13
volume = 60

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


[State 7310, END]
type = changestate
trigger1 = animtime = 0
value = 7311
ctrl = 0


[Statedef 7311]
type     = S
movetype = A
physics  = S
juggle   = 1
poweradd = 50
velset   = 0,0
anim     = 7311
ctrl     = 0
sprpriority = 1


[State 1000, 炷]
type = PlaySnd
trigger1 = AnimElem = 4
value = s10,200
channel = 10



[state 1000, ]
type = posadd
trigger1 = AnimElem = 3
x = 12

[state 1000, ]
type = posadd
trigger1 = AnimElem = 4
x = 16

[state 1000, ]
type = posadd
trigger1 = AnimElem = 5
x = 24

[state 1000, ]
type = posadd
trigger1 = AnimElem = 11
trigger2 = AnimElem = 12
x = 8

[State 1000, qbg]
type = HitDef
trigger1 = AnimElem = 7
attr = S, SA
damage    = 36,10
getpower  = 54,54
givepower = 10,10
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 12,12
sparkno = s6003
guard.sparkno = s6014
sparkxy = -32, -39
hitsound = s0,2
guardsound = s2,0
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -7
air.velocity = -4,-4
air.type = High
air.hittime = 12
air.fall = 1
fall.recover = 0

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


[State 1000, XegύX]
type = ChangeState
trigger1 = AnimTime = 0
value = 7312

[Statedef 7312]
type     = S
movetype = A
physics  = S
juggle   = 1
poweradd = 50
velset   = 0,0
anim     = 7312
ctrl     = 0
sprpriority = 2



[State 1000, 炷]
type = PlaySnd
trigger1 = AnimElem = 4
value = s10,210
channel = 10



[state 1001, ]
type = posadd
trigger1 = AnimElem = 2
x = 22

[state 1001, ]
type = posadd
trigger1 = AnimElem = 3
trigger2 = AnimElem = 4
trigger3 = AnimElem = 5
x = 8

[State 1000, qbg]
type = HitDef
trigger1 = AnimElem = 6
attr = S, SA
damage    = 36,10
getpower  = 54,54
givepower = 10,10
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 12,12
sparkxy = -24, -57
sparkno = s6003
guard.sparkno = s6014
hitsound = s0,2
guardsound = s2,0
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -7
air.velocity = -4,-4
air.type = High
air.hittime = 12
air.fall = 1
fall.recover = 0

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


[State 1000, XegύX]
type = ChangeState
trigger1 = AnimTime = 0
value = 7313

;---------------------------------------------------------------------------
;RrlVOi

[Statedef 7313]
type     = S
movetype = A
physics  = S
juggle   = 1
poweradd = 50
velset   = 0,0
anim     = 7313
ctrl     = 0
sprpriority = 3


[state 1002, ]
type = posadd
trigger1 = AnimElem = 2
x = 16

[state 1002, ]
type = posadd
trigger1 = AnimElem = 4
x = 16

[state 1002, ]
type = posadd
trigger1 = AnimElem = 7
x = 12

[State 1000, 炷]
type = PlaySnd
trigger1 = AnimElem = 7
value = s10,310
channel = 10

[State 1000, qbg]
type = HitDef
trigger1 = AnimElem = 7
attr = S, SA
damage    = 0
getpower  = 0
givepower = 0
animtype  = hard
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 0,0
guard.pausetime = 12,12
sparkxy = -24, -57
sparkno = s6003
guard.sparkno = s6014
hitsound = s0,2
guardsound = s2,0
ground.type = low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -1,-8
air.velocity = -1,-8
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
fall = 1
fall.recover = 0
p2facing = 1
p2stateno = 7330

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



[State 1000, XegύX]
type = ChangeState
trigger1 = AnimTime = 0
value = 7320

[State 1000, XegύX]
type = ChangeState
trigger1 = movehit
value = 7315

[Statedef 7315]
type = S
physics = N
movetype = A
velset = 0,0
anim = 7315
ctrl = 0


[State 7315, FX]
type = PlaySnd
trigger1 = AnimElem = 1
value = 26,3
volume = 50

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


[State 7315, Hit]
type = HitDef
trigger1 = AnimElem = 6
attr = S, SA
hitflag = MAF
animtype = Hard
damage = 75,5
guardflag = MA
pausetime = 43,44
sparkno = S6003
guard.sparkno = S6014
sparkxy = -10,-65
hitsound = S10,3
guardsound = S2,0
ground.type = High
ground.velocity = -0,-12
air.velocity = -0,-12
airguard.velocity = -3.5,-4
ground.slidetime = 17
ground.hittime = 17
guard.velocity = -12
getpower  = 60,20
givepower = 60,20
fall = 1
id = 1
guard.ctrltime = 22
palfx.time = 55
palfx.add = 40,-70,-200
palfx.sinadd = 40,30,0,10
palfx.color = 0
palfx.invertall = 1
envshake.time = 30
envshake.freq = 90
envshake.ampl = -3
envshake.phase = -2
p2getp1stateno = 1
p2stateno = 7330
yaccel = .55



[State 7315, END]
type = changestate
trigger1 = animtime = 0
value = 8350
ctrl = 0


;-----------------------------------------------
; TAUNT
[Statedef 7320]
type = S
physics = N
movetype = I
velset = 0,0
anim = 7320
ctrl = 0
poweradd = 500

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


[State 7305, FX]
type = PlaySnd
trigger1 = AnimElem = 1
value = 10,8
volume = 50

[State 7320, End]
type = Changestate
trigger1 = animtime = 0
value = 8350
ctrl = 0

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

;JUMP OUT START
[Statedef 8350]
type = S
physics = N
movetype = I
velset = 0,0
anim = 8350
ctrl = 0

[State 7350, End]
type = Changestate
trigger1 = animtime = 0
value = 7355
ctrl = 0
;-----------------------------------------------
;JUMP OUT
[Statedef 7355]
type = A
physics = N
movetype = I
velset = 0,0
anim = 7355
ctrl = 0

[State 7355, FX]
type = PlaySnd
trigger1 = AnimElem = 1
value = 1,4
volume = 0

[State 7355, Vel]
type = velset
trigger1 = animelem = 2
y = -11
x = -9

[State 7355, END]
type = destroyself
trigger1 = time = 30



































[Statedef 7330]
type    = A
movetype= H
physics = N
velset = 0,0

[State 1030, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = ifelse((GetHitVar(airtype) = 1),5000,5010) + GetHitVar(animtype)

[State 1030, 2] ;Anim for HIT_BACK
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5030

[State 1030, 3] ;Anim for HIT_UP/HIT_DIAGUP (only if it exists)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) ;5051 - 4 + type

[State 1030, 4] ;Freeze anim
type = ChangeAnim
trigger1 = Time > 0
value = anim

[State 1030, 5]
type = ChangeState
trigger1 = HitShakeOver
value = 7331

[State 1030, FFB Light]
type = ForceFeedback
trigger1 = anim = 5000
trigger2 = anim = 5010
persistent = 0
time = 6
waveform = square

[State 1030, FFB Medium]
type = ForceFeedback
trigger1 = anim = 5001
trigger2 = anim = 5011
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3

[State 1030, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5012
trigger2 = anim = 5002
trigger3 = anim = 5030
trigger4 = anim = [5051,5059]
persistent = 0
time = 15
waveform = sinesquare
ampl = 140

;---------------------------------------------------------------------------
; HITA_UP (initial going up)
[Statedef 7331]
type    = A
movetype= H
physics = N
ctrl = 0

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

[State 1031, 2]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 1031, 4]
type = ChangeState
triggerall = HitFall
trigger1 = HitOver
trigger2 = Vel Y > 0    ;Hit ground
trigger2 = Pos Y >= 10  ;.
value = 7333 ;HITA_FALL

[State 1031, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 7332 ;HITA_UP (transition)

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

;---------------------------------------------------------------------------
; HITA_UP_T (transition)
[Statedef 7332]
type    = A
movetype= H
physics = N

[State 1032, 1]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = SelfAnimExist(5035)
trigger1 = Anim != [5051,5059] ;Not if in hit up anim
trigger1 = Anim != 5090 ;Not if hit off ground anim
value = 5035

[State 1032, 2]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 1032, 4]
type = ChangeState
triggerall = HitFall
trigger1 = HitOver  ;Hit is over
trigger2 = AnimTime = 0 ;Anim is over
trigger3 = Vel Y > 0    ;Hit ground
trigger3 = Pos Y >= 10  ;.
trigger4 = Time = 0     ;No transition anim
trigger4 = Anim != 5035 ;.
value = 7333 ;HITA_FALL

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

; HITA_FALL (knocked up, falling)
[Statedef 7333]
type    = A
movetype= I
physics = N

[State 1033, 1] ;Change anim when done with transition
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = Anim = 5035
trigger2 = Time = 0     ;If no transition anim
trigger2 = Anim != 5035
trigger2 = (Anim != [5051, 5059]) && (Anim != [5061, 5069])
trigger2 = Anim != 5090 ;Not if hit off ground anim
value = 5050

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

[State 1033, 3] ;Gravity
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 1033, 4] ;Recover near ground
type = SelfState
triggerall = Vel Y > 0
triggerall = Pos Y >= -20
triggerall = alive
trigger1 = Command = "recovery"
value = 5200 ;HITFALL_RECOVER

[State 1033, 6]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= ifelse((anim = [5051,5059]) || (anim = [5061,5069]), 0, 0)
value = 5100 ;HIT_BOUNCE

[Statedef 30000]
anim=30000;Ȃɂ?Ȃ?ł?????Ă?SRȂ
ctrl=0

[State -3]
type = turn
Trigger1 = facing*root,facing < 0

[State 20000]
type=selfstate
trigger1=!ishelper
value=0

[State 10000]
type=varset
trigger1=command="up"&&root,command="up"
trigger2=command="down"&&root,command="down"
trigger3=command="back"&&root,command="back"
trigger4=command="fwd"&&root,command="fwd"
trigger5=command="a"&&root,command="a"
trigger6=command="b"&&root,command="b"
trigger7=command="c"&&root,command="c"
trigger8=command="x"&&root,command="x"
trigger9=command="y"&&root,command="y"
trigger10=command="z"&&root,command="z"
trigger11=command="s"&&root,command="s"
var(59)=-1

[State 10000]
Type = DestroySelf
triggerAll = isHelper
Trigger1 = root,var(59)||var(59)=-1
trigger2=command="up"&&root,command="up"
trigger3=command="down"&&root,command="down"
trigger4=command="back"&&root,command="back"
trigger5=command="fwd"&&root,command="fwd"
trigger6=command="a"&&root,command="a"
trigger7=command="b"&&root,command="b"
trigger8=command="c"&&root,command="c"
trigger9=command="x"&&root,command="x"
trigger10=command="y"&&root,command="y"
trigger11=command="z"&&root,command="z"
trigger12=command="s"&&root,command="s"

[State 10000]
type=varset
triggerall=var(59)!=-1
trigger1=root,command="up"
trigger2=root,command="down"
trigger3=root,command="back"
trigger4=root,command="fwd"
trigger5=root,command="a"
trigger6=root,command="b"
trigger7=root,command="c"
trigger8=root,command="x"
trigger9=root,command="y"
trigger10=root,command="z"
trigger11=root,command="s"
trigger12 = (Command = "AI0")||(Command = "AI1")||(Command = "AI2")||(Command = "AI3")||(Command = "AI4")
trigger13 = (Command = "AI5")||(Command = "AI6")||(Command = "AI7")||(Command = "AI8")||(Command = "AI9")
trigger14 = (Command = "AI10")||(Command = "AI11")||(Command = "AI12")||(Command = "AI13")||(Command = "AI14")
trigger15 = (Command = "AI15")||(Command = "AI16")||(Command = "AI17")||(Command = "AI18")||(Command = "AI19")
trigger16 = (Command = "AI20")
var(59)=1
