; Omega Inarabbita - Extras
;---------------------------------------------------------------------------
; Judge Introduction
[Statedef 192]
type = S
velset = 0,0
ctrl = 0

[State 190, Intro]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 190, Helper]
type = Helper
trigger1 = NumHelper(197) = 0
trigger1 = Time <= 0
helpertype = normal
name = "Mysterious Rock"
size.ground.back = 0
size.ground.front = 0
size.air.back = 0
size.air.front = 0
id = 197
pos = 0, ceil(-75 * Const(size.yscale))
postype = P1
stateno = 197
keyctrl = 0

[State 190, 0]
type = VarSet
trigger1 = Time <= 0
v = 4
value = 0

[State 190, 0]
type = VarAdd
trigger1 = Var(4) < 5
v = 4
value = 1

[State 190, PlaySnd]
type = PlaySnd
trigger1 = Var(4) = 1
value = 1, 20
channel = 10
Loop = 1

[State 190, Anim]
type = ChangeAnim
trigger1 = Time <= 0
trigger1 = Anim != 192
value = 192

[State 190, EnvShake]
type = EnvShake
trigger1 = Time = 100
time = 100
freq = 100
ampl = -5
phase = 5

[State 190, Sound]
type = PlaySnd
trigger1 = Time = 100
value = 5, 5
channel = 3
loop = 1

[State 190, Explod]
type = Explod
trigger1 = Time = 100
trigger1 = NumExplod(266) <= 0
ignorehitpause = 1
sprpriority = 10
supermovetime = -1
pausemovetime = -1
removeongethit = 1
removetime = -1
scale = const(size.xscale) * 2, const(size.yscale)
trans = addalpha
alpha = 200,200
bindtime = -1
postype = P1
ownpal = 1
ontop = 1
anim = 266
pos = ceil(-35 * const(size.xscale) * 2),0
id = 266

[State 190, 0]
type = VarSet
trigger1 = Time = 100
v = 11
value = 100

[State 190, 0]
type = VarSet
trigger1 = Time = 100
v = 12
value = 200

[State 190, 0]
type = VarSet
trigger1 = Time = 100
v = 13
value = 250

[State 190, PalFX]
type = PalFX
trigger1 = Time >= 100
trigger1 = Time < 105
time = 2
add = Var(11)/2,Var(12)/2,Var(13)/2
mul = Var(11)/2,Var(12)/2,Var(13)/2

[State 190, PalFX]
type = PalFX
trigger1 = Time >= 105
trigger1 = Time < 200
time = 2
invertall = 1
add = Var(11),Var(12),Var(13)

[State 190, 1]
type = VarAdd
trigerall = Var(11) <= 250
trigger1 = Time >= 110
trigger1 = Time < 200
v = 11
value = 10

[State 190, 1]
type = VarAdd
trigerall = Var(12) <= 250
trigger1 = Time >= 110
trigger1 = Time < 200
v = 12
value = 10

[State 190, 1]
type = VarAdd
trigerall = Var(13) <= 250
trigger1 = Time >= 110
trigger1 = Time < 200
v = 13
value = 10

[State 190, Helper]
type = Helper
trigger1 = NumHelper(191) = 0
trigger1 = Time = 130
helpertype = normal
name = "Transform Light"
size.ground.back = 0
size.ground.front = 0
size.air.back = 0
size.air.front = 0
id = 193
pos = 0, 0
postype = P1
stateno = 193
keyctrl = 0

[State 190, RemoveExplod]
type = RemoveExplod
trigger1 = Time > 150
trigger1 = NumHelper(191) <= 0
persistent = 0
id = 266

[State 190, Sound]
type = StopSnd
trigger1 = Time > 150
trigger1 = NumHelper(191) <= 0
persistent = 0
channel = 3

[State 190, Anim]
type = ChangeAnim
trigger1 = Time = 180
value = 190

[State 190, 0]
type = VarSet
trigger1 = Time = 180
v = 11
value = 250

[State 190, 1]
type = VarAdd
triggerall = Var(11) > 0
trigger1 = Time >= 180
trigger1 = Time <= 250
v = 11
value = -10

[State 190, PalFX]
type = PalFX
trigger1 = Time >= 180
trigger1 = Time < 250
time = 2
add = Var(11),Var(11),Var(11)

[State 190, Anim]
type = ChangeAnim
trigger1 = Time = 300
value = 191

[State 190, Sound]
type = PlaySnd
trigger1 = Time = 300
trigger2 = Anim = 191
trigger2 = AnimElem = 1
value = 10, 20
channel = 0

[State 190, State]
type = ChangeState
trigger1 = Anim = 191
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------
; Transform Light
[Statedef 193]
sprpriority = 10
anim = 193
ctrl = 0

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

[State 190, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 190, SprPriority]
type = SprPriority
trigger1 = 1
value = 10

[State 190, BindToRoot]
type = BindToRoot
trigger1 = 1
facing = 1
pos = 0,ceil(-15 * const(size.yscale))
time = 1

[State 190, AssertSpecial]
type = AssertSpecial
trigger1 = Time <= 0
flag = Invisible

[State 190, AngleDraw]
type = AngleDraw
trigger1 = Time <= 0
ignorehitpause = 1
scale = 0,0

[State 190, VarSet]
type = VarSet
trigger1 = Time <= 0
fv = 0
value = 0

[State 190, Sound]
type = PlaySnd
trigger1 = Time = 10
persistent = 0
value = 1, 10

[State 190, VarAdd]
type = VarAdd
triggerall = TimeMod = 2,0
triggerall = FVar(0) < 1
trigger1 = Time > 0
trigger1 = Time < 50
fv = 0
value = 0.05

[State 190, PalFX]
type = BGPalFX
trigger1 = Time > 0
trigger1 = Time < 50
trigger1 = TimeMod = 4,0
time = 2
add = 50,50,50

[State 190, VarAdd]
type = VarAdd
triggerall = FVar(0) > 0
trigger1 = Time > 50
trigger1 = Time < 100
fv = 0
value = -0.04

[State 190, 0]
type = VarSet
trigger1 = Time = 50
v = 0
value = 250

[State 190, 1]
type = AllPalFX
trigger1 = Time >= 50
trigger1 = Time <= 100
time = 1
add = var(0),Var(0),Var(0)

[State 190, 1]
type = VarAdd
trigger1 = Time >= 50
trigger1 = Time <= 100
trigger1 = Var(0) > 0
v = 0
value = -10

[State 190, AngleDraw]
type = AngleDraw
trigger1 = TimeMod = 2,0
ignorehitpause = 1
scale = FVar(0)/1.05, FVar(0)/1.05

[State 190, AngleDraw]
type = AngleDraw
trigger1 = 1
ignorehitpause = 1
scale = FVar(0), FVar(0)

[State 190, Sound]
type = PlaySnd
trigger1 = Time > 100
trigger2 = RoundState >= 2
trigger3 = FVar(0) < 0
trigger3 = Time > 0
persistent = 0
value = 1, 11
channel = 2

[State 190, Destroy]
type = DestroySelf
trigger1 = Time > 100
trigger2 = RoundState >= 2
trigger3 = FVar(0) < 0
trigger3 = Time > 0

;---------------------------------------------------------------------------
; Mysterious Rock
[Statedef 197]
sprpriority = 20
velset = 0, 0.5 * Const(size.yscale)
anim = 197
ctrl = 0

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

[State 197, SprPriority]
type = SprPriority
trigger1 = 1
ignorehitpause = 1
value = 20

[State 197, Helper]
type = Helper
trigger1 = NumHelper(198) <= 0
helpertype = normal
name = "Shine"
size.ground.back = 0
size.ground.front = 0
size.air.back = 0
size.air.front = 0
id = 198
pos = 0, 0
postype = P1
stateno = 198
keyctrl = 0

[State 197, Helper]
type = Helper
trigger1 = NumHelper(199) <= 0
helpertype = normal
name = "Aura Glow"
size.ground.back = 0
size.ground.front = 0
size.air.back = 0
size.air.front = 0
id = 199
pos = 0, 0
postype = P1
stateno = 199
keyctrl = 0
ownpal = 1

[State 197, BindToRoot]
type = BindToRoot
trigger1 = Time <= 0
trigger1 = Root, Facing = 1
facing = 1
pos = 0, ceil(-75 * Const(size.yscale))
time = 1

[State 197, BindToRoot]
type = BindToRoot
trigger1 = Time <= 0
trigger1 = Root, Facing = -1
facing = -1
pos = 0, ceil(-75 * Const(size.yscale))
time = 1

[State 197, 1]
type = VelSet
trigger1 = 1
y = 0.5 * Const(size.yscale)

[State 197, Destroy]
type = DestroySelf
triggerall = Time > 0
trigger1 = Pos Y >= Root, Pos Y -15 * Const(size.yscale)
trigger2 = RoundState >= 2

;---------------------------------------------------------------------------
; Mysterious Rock Shine
[Statedef 198]
sprpriority = 25
anim = 198
ctrl = 0

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

[State 198, SprPriority]
type = SprPriority
trigger1 = 1
ignorehitpause = 1
value = 25

[State 198, BindToParent]
type = BindToParent
trigger1 = Parent, Facing = 1
facing = 1
pos = 0, 0
time = 1

[State 198, BindToParent]
type = BindToParent
trigger1 = Parent, Facing = -1
facing = -1
pos = 0, 0
time = 1

[State 198, Destroy]
type = DestroySelf
trigger1 = NumHelper(197) <= 0
trigger2 = Pos Y >= Root, Pos Y -15 * Const(size.yscale)
trigger3 = RoundState >= 2

;---------------------------------------------------------------------------
; Mysterious Rock Aura Glow
[Statedef 199]
sprpriority = 15
movetype = I
ctrl = 0

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

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

[State 199, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 199, AssertSpecial]
type = AssertSpecial
trigger1 = Time <= 0
trigger2 = !SelfAnimExist(Parent, Anim)
trigger3 = !AnimExist(Parent, Anim)
flag = Invisible

[State 199, SprPriority]
type = SprPriority
trigger1 = 1
value = 15

[State 199, BindToParent]
type = BindToParent
trigger1 = NumHelper(197) > 0
facing = 1
pos = 0,0
time = 1

[State 199, PalFX]
type = PalFX
trigger1 = 1
time = 1
color = 0
add = 255,255,255
mul = 255,255,255

;----- Set Animation -----
[State 199, VarSet]		; Binded Animation Fix
type = VarSet
trigger1 = Parent, HitPauseTime = 0
var(0) = Parent, AnimElemNo(0)

[State 199, Anim]
type = ChangeAnim
triggerall = SelfAnimExist(Parent, Anim)
triggerall = AnimExist(Parent, Anim)
trigger1 = Parent, Anim < 6000
value = Parent, Anim
elem = Var(0)

[State 199, Anim]
type = ChangeAnim
triggerall = SelfAnimExist(Parent, Anim)
triggerall = AnimExist(Parent, Anim)
triggerall = Parent, StateNo >= 2102
triggerall = Parent, StateNo < 2105
triggerall = Parent, HitPauseTime > 0
trigger1 = Parent, AnimElemNo(0) > AnimElemNo(0)
value = Parent, Anim
elem = Parent, AnimElemNo(0)
;-------------------------

;===== Twitch Size X,Y =====
;----- Size X Scale -----
[State 199, VarSet]
type = VarSet
trigger1 = Time <= 0
trigger2 = FVar(0) >= 1.3
fvar(0) = 0.95

[State 199, VarAdd]
type = VarAdd
trigger1 = FVar(0) < 1.3
fvar(0) = 0.1
;-------------------------

;----- Size Y Scale -----
[State 199, VarSet]
type = VarSet
trigger1 = Time <= 0
trigger2 = FVar(1) >= 1.2
fvar(1) = 0.85

[State 199, VarAdd]
type = VarAdd
trigger1 = FVar(1) < 1.2
fvar(1) = 0.1
;-------------------------
;==============================

;----- Size Scale Draw -----
[State 199, AngleDraw]
type = AngleDraw
trigger1 = Time > 0
scale = FVar(0), FVar(1) 
;-------------------------

[State 199, Variables]
type = DisplayToClipboard
trigger1 = 1
text = "Scale X:  %f     Scale Y:  %f"
params = FVar(0), FVar(1)

[State 199, Destroy]
type = DestroySelf
trigger1 = NumHelper(197) <= 0
trigger2 = Pos Y >= Root, Pos Y -15 * Const(size.yscale)
trigger3 = RoundState >= 2

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

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

[State -2, Variables]
type = DisplayToClipboard
trigger1 = 1
text = "Charge X: %d     Charge Y: %d     2nd Shot: %d     Blade: %d \nSuper Mode: %d"
params = Var(30), Var(31), Var(32), Var(35), Var(55)
ignorehitpause = 1

;=========================
;-------------------------
; RAPID FIRE OPTION. DO
; NOT ABUSE THIS FEATURE.
;-------------------------
; 0 Disables rapid fire. 
; 1 Enables rapid fire.
;-------------------------
[State -2, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(3) = 0
;-------------------------
;=========================

;----- Stand Upright -----
[State -2, VarSet]
type = VarSet
trigger1 = StateNo = 194
trigger2 = StateNo = 196
trigger2 = Time > 100
trigger3 = Var(20) < 0
trigger4 = Var(55) > 0
ignorehitpause = 1
var(59) = 0

[State -2, VarSet]
type = VarSet
triggerall = Var(20) >= 0
triggerall = Var(55) <= 0
trigger1 = StateNo = 195
ignorehitpause = 1
var(59) = 1
;-------------------------

;----- Stop Charge -----
[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = PrevStateNo = 196
ignorehitpause = 1

[State -2, Sound]
type = StopSnd
trigger1 = PrevStateNo = 196
channel = 1

[State -2, Sound]
type = StopSnd
trigger1 = PrevStateNo = 196
channel = 3
;-------------------------

;----- No KO Slow -----
[State -2, 1]
type = AssertSpecial
trigger1 = 1
ignorehitpause = 1
flag = NoKOSlow
;--------------------

;----- AfterImage -----
[State -2, AfterImage]
type = AfterImageTime
trigger1 = Vel X >= const(velocity.runjump.fwd.x)
ignorehitpause = 1
time = 2
;--------------------

;--------------------
; Remove Explods
[State -2, RemoveExplod]
type = RemoveExplod
triggerall = NumExplod(110) > 0
trigger1 = MoveType != A
trigger1 = StateNo != 196
ignorehitpause = 1
id = 112

[State -2, RemoveExplod]
type = RemoveExplod
triggerall = NumExplod(111) > 0
trigger1 = MoveType != A
trigger1 = StateNo != 196
ignorehitpause = 1
id = 113

[State -2, RemoveExplod]
type = RemoveExplod
triggerall = NumExplod(266) > 0
trigger1 = MoveType != A
trigger1 = StateNo != 192
trigger1 = StateNo != 196
ignorehitpause = 1
id = 266
;--------------------

;--------------------
; Super Mode
[State -2, VarSet]
type = VarSet
triggerall = Var(55) > 0
trigger1 = AnimElemNo(0) < Var(10) 
var(10) = AnimElemNo(0) - 1

[State -2, VarAdd]
type = VarAdd
triggerall = Var(55) > 0
trigger1 = AnimElemTime(AnimElemNo(0) + 1) < 0
var(10) = 1

[State -2, Speed]
type = ChangeAnim
triggerall = Var(55) > 0
triggerall = MoveType != H
triggerall = SelfAnimExist(Anim)
trigger1 = AnimElemTime(AnimElemNo(0) + 1) < 0
value = Anim
elem = Var(10)

[State -2, PosAdd]
type = PosAdd
trigger1 = Var(55) > 0
trigger1 = MoveType != H
trigger1 = StateNo < 2100
x = Vel X
y = Vel Y

[State -2, VelAdd]
type = VelAdd
triggerall = Var(55) > 0
triggerall = MoveType != H
triggerall = StateNo < 2100
trigger1 = Vel Y != 0
y = .2

[State -2, AttackMulSet]
type = AttackMulSet
trigger1 = Var(55) > 0
ignorehitpause = 1
value = 0.5

[State -2, DefenceMulSet]
type = DefenceMulSet
trigger1 = Var(55) > 0
ignorehitpause = 1
value = 0.5

[State -2, VarAdd]
type = VarAdd
trigger1 = Var(55) > 0
ignorehitpause = 1
var(55) = -1

[State -2, VarSet]
type = VarSet
trigger1 = Var(55) <= 0
trigger1 = NumHelper(995) <= 0
trigger2 = RoundState > 2
trigger2 = PalNo <= 7
ignorehitpause = 1
var(55) = 0
;--------------------

;--------------------
; Player Hit
[State -2, VarSet]
type = VarSet
trigger1 = Var(20) < 0
trigger2 = Var(46) <= 0
trigger3 = Var(46) > 100
ignorehitpause = 1
v = 46
value = 0

[State -2, VarSet]
type = VarSet
triggerall = Var(20) >= 0
trigger1 = MoveType = H
trigger1 = Time > 0
ignorehitpause = 1
v = 46
value = 100

[State -2, VarAdd]
type = VarAdd
triggerall = Var(20) >= 0
trigger1 = StateType != L
trigger1 = MoveType != H
trigger1 = Var(46) > 0
ignorehitpause = 1
v = 46
value = -1

[State -2, NotHitBy]
type = NotHitBy
triggerall = Var(20) >= 0
trigger1 = StateType != L
trigger1 = MoveType != H
trigger1 = Var(46) > 0
ignorehitpause = 1
value = SCA
time = 1

[State -2, PalFX]
type = PalFX
triggerall = Alive
triggerall = Var(20) >= 0
trigger1 = HitShakeOver = 0
trigger1 = MoveType = H
trigger1 = Time <= 0
trigger2 = StateType != L
trigger2 = MoveType != H
trigger2 = GameTime % 4 = 0
trigger2 = Var(46) > 0
ignorehitpause = 1
time = 2
add = 250,250,250
;--------------------

;--------------------
; Armor Code
[State -2, AssertSpecial]
type = AssertSpecial
trigger1 = 1
ignorehitpause = 1
flag = NoStandguard
flag2 = NoCrouchguard
flag3 = NoAirguard

[State -2, Vel X]
type = VarSet
trigger1 = MoveType != H
trigger1 = Time > 0
ignorehitpause = 1
fv = 30
value = Vel X

[State -2, Vel Y]
type = VarSet
trigger1 = MoveType != H
trigger1 = Time > 0
ignorehitpause = 1
fv = 31
value = Vel Y

[State -2, StateNo]
type = VarSet
trigger1 = MoveType != H
trigger1 = Time > 0
ignorehitpause = 1
v = 40
value = StateNo

[State -2, Anim]
type = VarSet
trigger1 = MoveType != H
trigger1 = Time > 0
ignorehitpause = 1
v = 41
value = Anim

[State -2, AnimElemNo]
type = VarSet
trigger1 = MoveType != H
trigger1 = Time > 0
ignorehitpause = 1
v = 42
value = AnimElemNo(0)

[State -2, Ctrl]
type = VarSet
trigger1 = MoveType != H
trigger1 = Time > 0
ignorehitpause = 1
v = 43
value = Ctrl

[State -2, VarSet]
type = VarSet
triggerall = RoundState >= 2
triggerall = MoveType != H
trigger1 = StateTime <= 1
ignorehitpause = 1
var(44) = -1

[State -2, VarAdd]
type = VarAdd
trigger1 = RoundState >= 2
trigger1 = MoveType != H
ignorehitpause = 1
var(44) = 1

[State -2, VarSet]
type = VarSet
trigger1 = Var(20) >= 0
trigger2 = Var(45) <= 0
trigger3 = Var(45) > 100
ignorehitpause = 1
v = 45
value = 0

[State -2, VarSet]
type = VarSet
triggerall = Var(20) < 0
triggerall = Var(45) <= 0
trigger1 = MoveType = H
trigger1 = Time > 0
ignorehitpause = 1
v = 45
value = 100

[State -2, VarAdd]
type = VarAdd
triggerall = Var(20) < 0
trigger1 = StateType != L
trigger1 = MoveType != H
trigger1 = Var(45) > 0
ignorehitpause = 1
v = 45
value = -1

[State -2, NotHitBy]
type = NotHitBy
triggerall = Var(20) < 0
trigger1 = Var(45) > 0
trigger1 = Var(45) <= 80
trigger1 = MoveType != H
ignorehitpause = 1
value = SCA
time = 1

[State -2, HitOverride]
type = HitOverride
triggerall = Var(20) < 0
trigger1 = MoveType = I
trigger2 = StateNo = 2000
attr = SCA, AA, AT, AP
ignorehitpause = 1
stateno = 5000	; Idle Hit
time = 1

[State -2, HitOverride]
type = HitOverride
triggerall = Var(20) < 0
trigger1 = MoveType = A
trigger1 = StateNo != 2000
attr = SCA, AA, AT, AP
ignorehitpause = 1
stateno = 5005	; Attack Hit
time = 1

[State -2, HitOverride]
type = HitOverride
triggerall = Var(20) < 0
trigger1 = MoveType = H
trigger1 = Anim >= 5000
attr = SCA, AA, AT, AP
ignorehitpause = 1
stateno = 5006	; Hit
time = 1

[State -2, PalFX]
type = PalFX
triggerall = Alive
triggerall = Var(20) < 0
trigger1 = HitShakeOver = 0
trigger1 = MoveType = H
trigger1 = Time <= 0
trigger2 = Var(45) > 0
trigger2 = StateType != L
trigger2 = GameTime % 4 = 0
ignorehitpause = 1
time = 2
add = 250,250,250
;--------------------

;--------------------
; Attack identifier
[State -2, VarSet]
type = VarSet
trigger1 = MoveType != A
ignorehitpause = 1
var(1) = 0
;--------------------

;--------------------
; Can't KO CPU from F1
[State -2, VarSet]
type = VarSet
trigger1 = Var(20) < 0
trigger1 = Life > Var(50)
ignorehitpause = 1
var(50) = Life

[State -2, LifeSet]
type = LifeSet
trigger1 = Var(20) < 0
ignorehitpause = 1
value = Var(50)

[State -2, VarAdd]
type = VarAdd
trigger1 = Var(20) < 0
trigger1 = Life <= Var(50)
ignorehitpause = 1
var(50) = (-GetHitVar(Damage))
;--------------------

;--------------------
; AI System
[State -2, AI]
type = Helper
trigger1 = Alive
trigger1 = Life > 0
trigger1 = Var(20) >= 0
trigger1 = NumHelper(6666) = 0
trigger1 = RoundState = 2
trigger1 = PalNo < 7
helpertype = normal
name = "AI Trigger"
pausemovetime = 1000000000
supermovetime = 1000000000
id = 6666
pos = 1000, 1000
stateno = 6666
keyctrl = 1
ownpal = 1
;--------------------

[State -2, State]
type = SelfState
triggerall = Var(20) >= 0
triggerall = StateNo < 5150 || StateNo >= 5160
trigger1 = !Alive
value = 5151

[State -2, State]
type = SelfState
triggerall = Var(20) < 0
triggerall = StateNo < 5150 || StateNo >= 5160
trigger1 = !Alive
value = 5155

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

;-------------------------
; No Music Until The Match.
;-------------------------
[State -3, AssertSpecial]
type = AssertSpecial
trigger1 = RoundNo <= 1
trigger1 = RoundState < 2
trigger2 = RoundsExisted = 0
trigger2 = TeamMode = Turns
trigger2 = RoundState < 2
trigger3 = MatchOver
trigger4 = RoundState > 2
trigger4 = Alive = 0
trigger4 = Lose
flag = NoMusic
;-------------------------

;--------------------
; Stop Sound Loop
[State -2, StopSnd]
type = StopSnd
trigger1 = RoundState >= 2
trigger1 = Var(4) >= 5
channel = 10

[State -2, 0]
type = VarSet
trigger1 = RoundState >= 2
trigger1 = Var(4) >= 5
v = 50
value = 0
;--------------------

;--------------------
; Auto Turn Off
[State -3, 0]
type = AssertSpecial
trigger1 = Var(20) >= 0
flag = NoAutoTurn
ignorehitpause = 1

[State -3, VelSet]
type = VelSet
triggerall = Anim < 5000
triggerall = Var(20) >= 0
triggerall = MoveType != H
triggerall = Command = "holdback"
triggerall = PrevStateNo != 2502
triggerall = StateNo < 1000
triggerall = Anim != 250
triggerall = Anim != 251
triggerall = Anim != 620
triggerall = Anim != 640
trigger1 = Ctrl
trigger1 = StateType != A
trigger1 = Command != "holddown"
trigger1 = Command != "holdfwd"
trigger2 = StateType = A
trigger2 = Command != "holdfwd"
x = -Vel X

[State -3, Turn]
type = Turn
triggerall = Anim < 5000
triggerall = Var(20) >= 0
triggerall = MoveType != H
triggerall = Command = "holdback"
triggerall = PrevStateNo != 2502
triggerall = StateNo < 1000
triggerall = Anim != 250
triggerall = Anim != 251
triggerall = Anim != 620
triggerall = Anim != 640
trigger1 = Ctrl
trigger1 = StateType != A
trigger1 = Command != "holddown"
trigger1 = Command != "holdfwd"
trigger2 = StateType = A
trigger2 = Command != "holdfwd"
;--------------------

;--------------------
; Air Jump Variable
[State -3, VarSet]
type = VarSet
trigger1 = Var(5) > 0
trigger1 = StateType != A
ignorehitpause = 1
var(5) = 0

[State -3, VarSet]
type = VarSet
trigger1 = StateNo = 45
ignorehitpause = 1
var(5) = 1
;--------------------

;--------------------
; AirJump Move
[State -3, 0]
type = VelSet
triggerall = Vel Y < 0
triggerall = Var(20) >= 0
triggerall = StateType = A
triggerall = MoveType != H
triggerall = StateNo >= 40 && StateNo < 100 || StateNo >= 300 && StateNo < 1000
trigger1 = Command != "hold_a"
y = Vel Y / 2

[State -3, VelAdd]
type = VelAdd
triggerall = Vel X < const(velocity.walk.fwd.x)
triggerall = Anim != 640
triggerall = Var(20) >= 0
triggerall = StateType = A
triggerall = MoveType != H
triggerall = Command = "holdfwd"
triggerall = StateNo >= 40 && StateNo < 100 || StateNo >= 300 && StateNo < 1000
trigger1 = MoveType = A
trigger2 = Ctrl
x = .5

[State -3, VelAdd]
type = VelAdd
triggerall = Vel X > 0
triggerall = Anim != 640
triggerall = Var(20) >= 0
triggerall = StateType = A
triggerall = MoveType != H
triggerall = Command != "holdfwd"
triggerall = Command != "holdback"
triggerall = StateNo >= 40 && StateNo < 100 || StateNo >= 300 && StateNo < 1000
trigger1 = MoveType = A
trigger2 = Ctrl
x = -.05

[State -3, VelSet]
type = VelSet
triggerall = Var(20) >= 0
triggerall = StateType = A
triggerall = MoveType != H
trigger1 = Vel Y >= 10
y = 10
;--------------------

