
;--------------------------------------------------
[StateDef 0]
Type = S
Physics = S
SprPriority = 0

;-------------------------------------------------------------------------
;Stuff found in the base character that remains sort of unused but required. Don't touch that !
[State 0, 1]
type = ChangeAnim
TriggerAll = !Var(30) ;<-- If the move failed to kill the enemy, the normal stand anim will be played
trigger1 = Anim != 0 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 0
     
[State 0, 2]
Type = ChangeState
Trigger1 = Var(30) ;<-- If the move killed the enemy, the win anim will be played
Trigger1 = Anim != 302
Value = 302

[State 0, VelSet]
Type = VelSet
Trigger1 = Time = 0
Y = 0

[State 0, VelSet]
Type = VelSet
Trigger1 = Abs(Vel X) < 2
Trigger2 = Time = 4
X = 0

[State 0, ChangeState]
Type = ChangeState
Trigger1 = !Alive
Value = 5050

[State 0, NotHitBy];奐愴慜峌寕杊巭
Type = NotHitBy
Trigger1 = RoundState < 2
Value = SCA
Time = 30

;---------- 抧忋偵栠偡
; 偙傟偑傞偲懠僉儍儔偲偺晄嬶崌偑傞偺偱晄巊梡
[State 0, PosSet]
Type = Null;PosSet
Trigger1 = Time = 0
Y = 0

;---------- 堎忢僿儖僷乕嶍彍
[State 0, DestroySelf]
Type = DestroySelf
Trigger1 = IsHelper

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;	[杮懱]偟傖偑傓乮AI梡偵偪傚偭偲夵憿乯
;--------------------------------------------------
[StateDef 10]
Type = C
Physics = C
VelSet = 0, 0

[State 10, ChangeState]
Type = ChangeState
trigger1 = prevstateno = 0
Trigger1 = time = 0
Value = 10
ctrl = 1

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;	[杮懱]偟傖偑傒乮AI梡偵偪傚偭偲夵憿乯
;--------------------------------------------------
[StateDef 11]
Type = C
Physics = C
SprPriority = 0

[State 11, ChangeAnim]
Type = ChangeAnim
Trigger1 = Var(49) = 0
Trigger1 = Time = 0
Value = 0

[State 11, ChangeAnim]
Type = ChangeAnim
Trigger1 = Var(49) = 1
Trigger1 = Anim != 0
Value = 0

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;	[杮懱]棫偮乮AI梡偵偪傚偭偲夵憿乯
;--------------------------------------------------
[StateDef 12]
Type = S
Physics = S

[State 12, ChangeState]
Type = ChangeState
Trigger1 = time = 0
Value = 0
ctrl = 1

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;	[杮懱]曕偒乮AI梡偵偪傚偭偲夵憿乯
;--------------------------------------------------
[StateDef 20]
Type = S
Physics = S
SprPriority = 0

[State 20, VelSet]
Type = VelSet
Trigger1 = 1
X = IfElse((Command="holdback"), Const(Velocity.Walk.Back.X), Const(Velocity.Walk.Fwd.X))

[State 20, ChangeAnim]
Type = ChangeAnim
TriggerAll = Vel X < 0
Trigger1 = Anim != 21
Value = 21

[State 20, ChangeAnim]
Type = ChangeAnim
Trigger1 = Vel X = 0
Trigger1 = Anim != 0
Value = 0

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;	[杮懱]僕儍儞僾乮弨旛乯
;--------------------------------------------------
[StateDef 40]
Type = S
Physics = S
Ctrl = 0
SprPriority = 1

[State 10, ChangeState]
Type = ChangeState
Trigger1 = time = 0
Value = 0
ctrl = 1

[State 40, VarSet]
Type = VarSet
Trigger1 = Time = 0
sysvar(1) = 0

[State 40, VarSet]
Type = VarSet
Trigger1 = Command = "holdfwd"
sysvar(1) = 1

[State 40, VarSet]
Type = VarSet
Trigger1 = Command = "holdback"
sysvar(1) = -1

[State 40, VelSet]
Type = VelSet
Trigger1 = AnimTime = 0
X = IfElse(SysVar(1)=0, Const(Velocity.Jump.Neu.X), IfElse(SysVar(1)=1, Const(Velocity.Jump.Fwd.X), Const(Velocity.Jump.Back.X)))
Y = Const(Velocity.Jump.Y)

[State 40, ChangeState]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 50
Ctrl = 1

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;	[杮懱]僕儍儞僾乮忋徃乯
;--------------------------------------------------
[StateDef 50]
Type    = A
Physics = A

[State 50, VarSet]
Type = VarSet
Trigger1 = Time = 0
sysvar(1) = 0

[State 50, ChangeAnim]
Type = ChangeAnim
Trigger1 = Time = 0
Value = IfElse((Vel X)=0, 41, IfElse((Vel X)>0, 42, 43))

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;	[杮懱]僕儍儞僾乮壓崀乯
;--------------------------------------------------
[StateDef 51]
Type    = A
Physics = A

[State 51, Null]
Type = Null
Trigger1 = 1

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;	[杮懱]拝抧
;--------------------------------------------------
[StateDef 52]
Type = S
Physics = S
Ctrl = 0
Anim = 47
VelSet = 0, 0

[State 52, PosSet]
Type = PosSet
Trigger1 = Time = 0
Y = 0

[State 52, Turn]
Type = Turn
Trigger1 = Time = 1
Trigger1 = P2Dist X < -5

[State 52, PlaySnd]
Type = PlaySnd
Trigger1 = Time = 0
Value = S100,19
Channel = 6

[State 52, CtrlSet]
Type = CtrlSet
Trigger1 = Time = 1
Value = 1

[State 52, ChangeState]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 0
Ctrl = 1

[StateDef 100]
Type = C
Physics = C
VelSet = 0, 0

[State 10, ChangeState]
Type = ChangeState
Trigger1 = time = 0
Value = 0
ctrl = 1

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;	[杮懱]僈乕僪乮奐巒乯
;--------------------------------------------------
[StateDef 120]
Type = U
Physics = U

[State 120, ChangeAnim]
Type = ChangeAnim
Trigger1 = Time = 0
Value = 120 + (StateType = C) + (StateType = A)*2

[State 120, StateTypeSet]
Type = StateTypeSet
Trigger1 = Time = 0 && StateType = S
Physics = S

[State 120, StateTypeSet]
Type = StateTypeSet
Trigger1 = Time = 0 && StateType = C
Physics = C

[State 120, StateTypeSet]
Type = StateTypeSet
Trigger1 = Time = 0 && StateType = A
Physics = A

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
[State 120, Hi to Lo]
Type = StateTypeSet
Trigger1 = Var(49) = 0;		AI僗僀僢僠OFF
Trigger1 = StateType = S && Command = "holddown"
StateType = C
Physics = C

[State 120, Lo to Hi]
Type = StateTypeSet
Trigger1 = Var(49) = 0;		AI僗僀僢僠OFF
Trigger1 = StateType = C && Command != "holddown"
StateType = S
Physics = S

[State 120, Hi to Lo]
Type = StateTypeSet
Trigger1 = Var(49) = 1;		AI僗僀僢僠ON
Trigger1 = Var(28) = 1
Trigger1 = StateType != A
StateType = C
Physics = C

[State 120, Lo to Hi]
Type = StateTypeSet
Trigger1 = Var(49) = 1;		AI僗僀僢僠ON
Trigger1 = Var(28) = 0
Trigger1 = StateType != A
StateType = S
Physics = S
;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭

[State 120, ChangeState]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 130 + (StateType = C) + (StateType = A)*2

[State 120, ChangeState]
Type = ChangeState
Trigger1 = Command != "holdback"
Trigger2 = !InGuardDist
Value = 140

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;	[杮懱]棫偪僈乕僪乮僈乕僪拞乯
;--------------------------------------------------
[StateDef 130]
Type = S
Physics = S

[State 130, ChangeAnim]
Type = ChangeAnim
Trigger1 = Anim != 130
Value = 130

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
[State 130, Hi to Lo]
Type = ChangeState
Trigger1 = Var(49) = 0;		AI僗僀僢僠OFF
Trigger1 = Command = "holddown"
Value = 131

[State 130, Hi to Lo]
Type = ChangeState
Trigger1 = Var(49) = 1;		AI僗僀僢僠ON
Trigger1 = Var(28) = 1
Value = 131
;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭

[State 130, ChangeState]
Type = ChangeState
Trigger1 = Command != "holdback"
Trigger2 = !InGuardDist
Value = 140

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;	[杮懱]偟傖偑傒僈乕僪乮僈乕僪拞乯
;--------------------------------------------------
[StateDef 131]
Type = C
Physics = C

[State 131, ChangeAnim]
Type = ChangeAnim
Trigger1 = Anim != 131
Value = 131

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
[State 131, Lo to Hi]
Type = ChangeState
Trigger1 = Var(49) = 0;		AI僗僀僢僠OFF
Trigger1 = Command != "holddown"
Value = 130

[State 131, Lo to Hi]
Type = ChangeState
Trigger1 = Var(49) = 1;		AI僗僀僢僠ON
Trigger1 = Var(28) = 0
Value = 130
;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭

[State 131, ChangeState]
Type = ChangeState
Trigger1 = Command != "holdback"
Trigger2 = !InGuardDist
Value = 140

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;	[杮懱]嬻拞僈乕僪乮僈乕僪拞乯
;--------------------------------------------------
[StateDef 132]
Type = A
Physics = N

[State 132, ChangeAnim]
Type = ChangeAnim
Trigger1 = Anim != 132
Value = 132

[State 132, VelAdd]
Type = VelAdd
Trigger1 = 1
Y = Const(Movement.YAccel)

[State 132, VarSet]
Type = VarSet
Trigger1 = 1
sysvar(0) = (Pos Y >= 0) && (Vel Y > 0)

[State 132, VelSet]
Type = VelSet
Trigger1 = SysVar(0)
Y = 0

[State 132, PosSet]
Type = PosSet
Trigger1 = SysVar(0)
Y = 0

[State 132, ChangeState]
Type = ChangeState
Trigger1 = SysVar(0)
Trigger1 = Command = "holdback"
Trigger1 = InGuardDist
Value = 130

[State 132, ChangeState]
Type = ChangeState
Trigger1 = SysVar(0)
Value = 52

[State 132, Stop Guarding]
Type = ChangeState
Trigger1 = Command != "holdback"
Trigger2 = !InGuardDist
Value = 140

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;	[杮懱]僈乕僪乮廔椆乯
;--------------------------------------------------
[StateDef 140]
Type = U
Physics = U
Ctrl = 1

[State 140, ChangeAnim]
Type = ChangeAnim
Trigger1 = Time = 0
Value = 140 + (StateType = C) + (StateType = A)*2

[State 140, StateTypeSet]
Type = StateTypeSet
Trigger1 = Time = 0 && StateType = S
Physics = S

[State 140, StateTypeSet]
Type = StateTypeSet
Trigger1 = Time = 0 && StateType = C
Physics = C

[State 140, StateTypeSet]
Type = StateTypeSet
Trigger1 = Time = 0 && StateType = A
Physics = A

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
[State 140, Hi to Lo]
Type = StateTypeSet
Trigger1 = Var(49) = 0;		AI僗僀僢僠OFF
Trigger1 = StateType = S && Command = "holddown"
StateType = C
Physics = C

[State 140, Lo to Hi]
Type = StateTypeSet
Trigger1 = Var(49) = 0;		AI僗僀僢僠OFF
Trigger1 = StateType = C && Command != "holddown"
StateType = S
Physics = S

[State 140, Hi to Lo]
Type = StateTypeSet
Trigger1 = Var(49) = 1;		AI僗僀僢僠ON
Trigger1 = Var(28) = 1
Trigger1 = StateType != A
StateType = C
Physics = C

[State 140, Lo to Hi]
Type = StateTypeSet
Trigger1 = Var(49) = 1;		AI僗僀僢僠ON
Trigger1 = Var(28) = 0
Trigger1 = StateType != A
StateType = S
Physics = S
;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭

;--------------------僈乕僪屻偵嬻拞偱嵞峴摦壜擻偵偡傞張棟
[State 140, ChangeAnim]
Type = ChangeAnim
Trigger1 = StateType = A
Trigger1 = Anim = 142
Trigger1 = AnimTime = 0
Value = 41
Elem = 11

[State 140, ChangeState]
Type = ChangeState
Trigger1 = Anim = 41
Value = 51
Ctrl = 1
;--------------------

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;	[杮懱]棫偪僈乕僪乮僸僢僩峝捈拞乯
;--------------------------------------------------
[StateDef 150]
Type = S
MoveType= H
Physics = N
VelSet = 0,0

[State 150, ChangeAnim]
Type = ChangeAnim
Trigger1 = 1
Value = 150

[State 150, ChangeState]
Type = ChangeState
Trigger1 = HitShakeOver
Value = 151 + 2*(Command = "holddown")

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
[State 150, Hi to Lo]
Type = StateTypeSet
Trigger1 = Var(49) = 0;		AI僗僀僢僠OFF
Trigger1 = StateType = S && Command = "holddown"
StateType = C
Physics = C

[State 150, Lo to Hi]
Type = StateTypeSet
Trigger1 = Var(49) = 0;		AI僗僀僢僠OFF
Trigger1 = StateType = C && Command != "holddown"
StateType = S
Physics = S

[State 150, Hi to Lo]
Type = StateTypeSet
Trigger1 = Var(49) = 1;		AI僗僀僢僠ON
Trigger1 = Var(28) = 1
StateType = C
Physics = C

[State 150, Lo to Hi]
Type = StateTypeSet
Trigger1 = Var(49) = 1;		AI僗僀僢僠ON
Trigger1 = Var(28) = 0
StateType = S
Physics = S
;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;	[杮懱]棫偪僈乕僪乮嬄偗斀傝乯
;--------------------------------------------------
[StateDef 151]
Type = S
MoveType= H
Physics = S
Anim = 150

[State 151, HitVelSet]
Type = HitVelSet
Trigger1 = Time = 0
X = 1

[State 151, VelSet]
Type = VelSet
Trigger1 = Time = GetHitVar(SlideTime)
Trigger2 = HitOver
X = 0

[State 151, 3]
Type = CtrlSet
Trigger1 = Time = GetHitVar(CtrlTime)
Value = 1

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
[State 151, Hi to Lo]
Type = StateTypeSet
Trigger1 = Var(49) = 0;		AI僗僀僢僠OFF
Trigger1 = StateType = S && Command = "holddown"
StateType = C
Physics = C

[State 151, Lo to Hi]
Type = StateTypeSet
Trigger1 = Var(49) = 0;		AI僗僀僢僠OFF
Trigger1 = StateType = C && Command != "holddown"
StateType = S
Physics = S

[State 151, Hi to Lo]
Type = StateTypeSet
Trigger1 = Var(49) = 1;		AI僗僀僢僠ON
Trigger1 = Var(28) = 1
StateType = C
Physics = C

[State 151, Lo to Hi]
Type = StateTypeSet
Trigger1 = Var(49) = 1;		AI僗僀僢僠ON
Trigger1 = Var(28) = 0
StateType = S
Physics = S
;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭

[State 151, ChangeState]
Type = ChangeState
Trigger1 = HitOver
Value = 130
Ctrl = 1

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;	[杮懱]偟傖偑傒僈乕僪乮僸僢僩峝捈拞乯
;--------------------------------------------------
[StateDef 152]
Type = C
MoveType= H
Physics = N
VelSet = 0,0

[State 152, ChangeAnim]
Type = ChangeAnim
Trigger1 = 1
Value = 151

[State 152, ChangeState]
Type = ChangeState
Trigger1 = HitShakeOver
Value = 151 + 2*(Command = "holddown")

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
[State 152, Hi to Lo]
Type = StateTypeSet
Trigger1 = Var(49) = 0;		AI僗僀僢僠OFF
Trigger1 = StateType = S && Command = "holddown"
StateType = C
Physics = C

[State 152, Lo to Hi]
Type = StateTypeSet
Trigger1 = Var(49) = 0;		AI僗僀僢僠OFF
Trigger1 = StateType = C && Command != "holddown"
StateType = S
Physics = S

[State 152, Hi to Lo]
Type = StateTypeSet
Trigger1 = Var(49) = 1;		AI僗僀僢僠ON
Trigger1 = Var(28) = 1
StateType = C
Physics = C

[State 152, Lo to Hi]
Type = StateTypeSet
Trigger1 = Var(49) = 1;		AI僗僀僢僠ON
Trigger1 = Var(28) = 0
StateType = S
Physics = S
;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;	[杮懱]偟傖偑傒僈乕僪乮嬄偗斀傝乯
;--------------------------------------------------
[StateDef 153]
Type = C
MoveType= H
Physics = C
Anim = 151

[State 153, HitVelSet]
Type = HitVelSet
Trigger1 = Time = 0
X = 1

[State 153, VelSet]
Type = VelSet
Trigger1 = Time = GetHitVar(SlideTime)
Trigger2 = HitOver
X = 0

[State 153, CtrlSet]
Type = CtrlSet
Trigger1 = Time = GetHitVar(CtrlTime)
Value = 1

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
[State 153, Hi to Lo]
Type = StateTypeSet
Trigger1 = Var(49) = 0;		AI僗僀僢僠OFF
Trigger1 = StateType = S && Command = "holddown"
StateType = C
Physics = C

[State 153, Lo to Hi]
Type = StateTypeSet
Trigger1 = Var(49) = 0;		AI僗僀僢僠OFF
Trigger1 = StateType = C && Command != "holddown"
StateType = S
Physics = S

[State 153, Hi to Lo]
Type = StateTypeSet
Trigger1 = Var(49) = 1;		AI僗僀僢僠ON
Trigger1 = Var(28) = 1
StateType = C
Physics = C

[State 153, Lo to Hi]
Type = StateTypeSet
Trigger1 = Var(49) = 1;		AI僗僀僢僠ON
Trigger1 = Var(28) = 0
StateType = S
Physics = S
;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭

[State 153, ChangeState]
Type = ChangeState
Trigger1 = HitOver
Value = 131
Ctrl = 1

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;	[杮懱]嬻拞僈乕僪乮僸僢僩峝捈拞乯
;--------------------------------------------------
[StateDef 154]
Type = A
MoveType= H
Physics = N
VelSet = 0,0

[State 154, ChangeAnim]
Type = ChangeAnim
Trigger1 = 1
Value = 152

[State 154, ChangeState]
Type = ChangeState
Trigger1 = HitShakeOver
Value = 155

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;	[杮懱]嬻拞僈乕僪乮嬄偗斀傝乯
;--------------------------------------------------
[StateDef 155]
Type = A
MoveType= H
Physics = N
Anim = 152

[State 155, HitVelSet]
Type = HitVelSet
Trigger1 = Time = 0
X = 1
Y = 1

[State 155, VelAdd]
Type = VelAdd
Trigger1 = 1
Y = Const(Movement.YAccel)

[State 155, CtrlSet]
Type = CtrlSet
Trigger1 = Time = GetHitVar(CtrlTime)
Value = 1

;--------------------僈乕僪屻偵嬻拞偱嵞峴摦壜擻偵偡傞張棟
[State 155, ChangeAnim]
Type =ChangeAnim
Trigger1 = Time = GetHitVar(CtrlTime)
Value = 41
Elem = 11

[State 155, ChangeState]
Type = ChangeState
Trigger1 = Anim = 41
Value = 51
Ctrl = 1
;--------------------

[State 155, VarSet]
Type = VarSet
Trigger1 = 1
sysvar(0) = (Pos Y >= 0) && (Vel Y > 0)

[State 155, VelSet]
Type = VelSet
Trigger1 = SysVar(0)
Y = 0

[State 155, PosSet]
Type = PosSet
Trigger1 = SysVar(0)
Y = 0

[State 155, ChangeState]
Type = ChangeState
Trigger1 = SysVar(0)
Trigger1 = Command = "holdback"
Trigger1 = InGuardDist
Value = 130

[State 155, ChangeState]
Type = ChangeState
Trigger1 = SysVar(0)
Value = 52

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;	[杮懱]僞僀儉僆乕僶乕晧偗
;--------------------------------------------------
[StateDef 170]
Type = S
MoveType = I
Physics = S
Ctrl = 0
VelSet = 0, 0

[State 170, ChangeAnim]
Type = ChangeAnim
Trigger1 = Time = 0
Trigger1 = SelfAnimExist(170)
Value = 170

[State 170, ChangeAnim]
Type = ChangeAnim
Trigger1 = Anim != 0
Trigger1 = Anim != 170
Value = 0

[State 170, NotHitBy]
Type = NotHitBy
Trigger1 = 1
Value = SCA
Time = 1

[State 170, VarSet];攕杒敾掕僼儔僌
Type = VarSet
Trigger1 = Lose
V = 51
Value = 1

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;	[杮懱]僞僀儉僆乕僶乕堷偒暘偗
;--------------------------------------------------
[StateDef 175]
Type = S
MoveType = I
Physics = S
Ctrl = 0
VelSet = 0, 0

[State 175, ChangeAnim]
Type = ChangeAnim
Trigger1 = Anim != 0
Value = 0

[State 175, NotHitBy]
Type = NotHitBy
Trigger1 = 1
Value = SCA
Time = 1

;--------------------------------------------------
;Winpose
[StateDef 180]
Type = S
MoveType = I
Physics = S
Ctrl = 0
VelSet = 0, 0

[State 180, ChangeAnim]
Type = ChangeAnim
Trigger1 = Anim = 0
Value = 0

[State 180, ChangeState]
Type = ChangeState
Trigger1 = Time = 0
Trigger1 = MatchOver = 0
Value = 300

[State 180, ChangeState2]
Type = ChangeState
Trigger1 = Time = 0
Trigger1 = MatchOver = 1
Value = 301

[State 180, ChangeState3]
Type = ChangeState
Trigger1 = Var(30)
Value = 302
;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;	[杮懱]彑棙乮彑偪戜帉昞帵乯
;--------------------------------------------------
[StateDef 181]
Type = S
MoveType = I
Physics = S
Ctrl = 0
VelSet = 0, 0

[State 181, NotHitBy]
Type = NotHitBy
Trigger1 = 1
Value = SCA
Time = 1

[State 181, AssertSpecial]
Type = AssertSpecial
Trigger1 = Time < 240
Flag = RoundNotOver

[State 181, AssertSpecial]
Type = AssertSpecial
Trigger1 = Time >= 10
Flag = NoBarDisplay
Flag2 = NoFG

[State 181, Explod];棫偪奊乮僒僽乯侾俹懁
Type = Explod
Trigger1 = Time = 10
Trigger1 = TeamSide = 1
Anim = 20010
ID = 20010
Pos = 5, 160
PosType = Left
SprPriority = 996
Facing = 1
BindTime = -1
OnTop = 0
OwnPal = 1
RemoveTime = -1
Scale = 0.5, 0.5

[State 181, Explod];棫偪奊乮僒僽乯俀俹懁
Type = Explod
Trigger1 = Time = 10
Trigger1 = TeamSide = 2
Anim = 20010
ID = 20010
Pos = 315, 160
PosType = Left
SprPriority = 996
Facing = -1
BindTime = -1
OnTop = 0
OwnPal = 1
RemoveTime = -1
Scale = 0.5, 0.5

[State 181, Explod];棫偪奊乮儊僀儞乯侾俹懁乮殅徫乯
Type = Explod
TriggerAll = Time = 10
TriggerAll = TeamSide = 1
Trigger1 = Var(45) = 3
Trigger2 = Var(45) = 11
Anim = 20000
ID = 20000
Pos = 5, 160
PosType = Left
SprPriority = 997
Facing = 1
BindTime = -1
OnTop = 0
OwnPal = 1
RemoveTime = -1
Scale = 0.5, 0.5

[State 181, Explod];棫偪奊乮儊僀儞乯侾俹懁乮愲岥乯
Type = Explod
TriggerAll = Time = 10
TriggerAll = TeamSide = 1
Trigger1 = Var(45) = 2
Trigger2 = Var(45) = 12
Trigger3 = Var(45) = 20
Anim = 20001
ID = 20000
Pos = 5, 160
PosType = Left
SprPriority = 997
Facing = 1
BindTime = -1
OnTop = 0
OwnPal = 1
RemoveTime = -1
Scale = 0.5, 0.5

[State 181, Explod];棫偪奊乮儊僀儞乯侾俹懁乮徫傒乯
Type = Explod
TriggerAll = Time = 10
TriggerAll = TeamSide = 1
Trigger1 = Var(45) = 1
Trigger2 = Var(45) = 10
Trigger3 = Var(45) = 14
Anim = 20002
ID = 20000
Pos = 5, 160
PosType = Left
SprPriority = 997
Facing = 1
BindTime = -1
OnTop = 0
OwnPal = 1
RemoveTime = -1
Scale = 0.5, 0.5

[State 181, Explod];棫偪奊乮儊僀儞乯侾俹懁乮崲榝乯
Type = Explod
TriggerAll = Time = 10
TriggerAll = TeamSide = 1
Trigger1 = Var(45) = 30
Anim = 20003
ID = 20000
Pos = 5, 160
PosType = Left
SprPriority = 997
Facing = 1
BindTime = -1
OnTop = 0
OwnPal = 1
RemoveTime = -1
Scale = 0.5, 0.5

[State 181, Explod];棫偪奊乮儊僀儞乯俀俹懁乮殅徫乯
Type = Explod
TriggerAll = Time = 10
TriggerAll = TeamSide = 2
Trigger1 = Var(45) = 3
Trigger2 = Var(45) = 11
Anim = 20000
ID = 20000
Pos = 315, 160
PosType = Left
SprPriority = 997
Facing = -1
BindTime = -1
OnTop = 0
OwnPal = 1
RemoveTime = -1
Scale = 0.5, 0.5

[State 181, Explod];棫偪奊乮儊僀儞乯俀俹懁乮愲岥乯
Type = Explod
TriggerAll = Time = 10
TriggerAll = TeamSide = 2
Trigger1 = Var(45) = 2
Trigger2 = Var(45) = 12
Trigger3 = Var(45) = 20
Anim = 20001
ID = 20000
Pos = 315, 160
PosType = Left
SprPriority = 997
Facing = -1
BindTime = -1
OnTop = 0
OwnPal = 1
RemoveTime = -1
Scale = 0.5, 0.5

[State 181, Explod];棫偪奊乮儊僀儞乯俀俹懁乮徫傒乯
Type = Explod
TriggerAll = Time = 10
TriggerAll = TeamSide = 2
Trigger1 = Var(45) = 1
Trigger2 = Var(45) = 10
Trigger3 = Var(45) = 14
Anim = 20002
ID = 20000
Pos = 315, 160
PosType = Left
SprPriority = 997
Facing = -1
BindTime = -1
OnTop = 0
OwnPal = 1
RemoveTime = -1
Scale = 0.5, 0.5

[State 181, Explod];棫偪奊乮儊僀儞乯俀俹懁乮崲榝乯
Type = Explod
TriggerAll = Time = 10
TriggerAll = TeamSide = 2
Trigger1 = Var(45) = 30
Anim = 20003
ID = 20000
Pos = 315, 160
PosType = Left
SprPriority = 997
Facing = -1
BindTime = -1
OnTop = 0
OwnPal = 1
RemoveTime = -1
Scale = 0.5, 0.5

[State 181, Explod];儊僢僙乕僕僂傿儞僪僂
Type = Explod
Trigger1 = Time = 10
Anim = 20100
ID = 20100
Pos = 18, 199
PosType = Left
SprPriority = 998
Facing = 1
BindTime = -1
OnTop = 0
OwnPal = 1
RemoveTime = -1
Scale = 0.5*571/50, 0.0

[State 181, ModifyExplod];僂傿儞僪僂戝偒偝曄壔
type = ModifyExplod
Trigger1 = NumExplod(20100) > 0
Trigger1 = Time = [10,30]
ID = 20100
Scale = 0.5*571/50, 0.5*((Time-10)*0.05)

[State 181, Explod];儊僢僙乕僕
Type = Explod
Trigger1 = Time = 30
Anim = 20200+Var(45)
ID = 20200
Pos = 18, 180
PosType = Left
SprPriority = 999
Facing = 1
BindTime = -1
OnTop = 0
OwnPal = 1
RemoveTime = -1
Scale = 0.5, 0.5

; preintro
[Statedef 190]
type = S
ctrl = 0
velset = 0,0

[State 190, 1]
type = ChangeAnim
trigger1 = SelfAnimExist(190)
value = 190

[State 190, 2] ;Go straight to intro.
type = ChangeState
trigger1 = Time = 0
value = 191

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;	[杮懱]僀儞僩儘慖戰
;--------------------------------------------------

;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;	[杮懱]僀儞僩儘侾丂棫偪偺傒
;--------------------------------------------------
[StateDef 191]
Type = S
Ctrl = 0
Anim = 0

[State 191, AssertSpecial]
Type = AssertSpecial
Trigger1 = 1
Flag = Intro
Flag2 = NoMusic
Flag3 = nobardisplay

[State 191, NotHitBy]
Type = NotHitBy
Trigger1 = 1
Value = SCA
Time = 3

[State 0, Explod]
type = Explod
trigger1 = time = 1
anim = 7000
ID = 7000
pos = 155,125
postype = left  
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = 420
pausemovetime = 999999
scale = 0.70,0.70
sprpriority = 8
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 0

[State 0, Explod]
type = Explod
trigger1 = time = 1
anim = 7001
ID = 7001
pos = 165,225
postype = left  
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = 420
pausemovetime = 999999
scale = 1,1
sprpriority = 9
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S7000,0
volumescale = 100
channel = -1
freqmul = 1.0
loop = 0
pan = 0
abspan = 1

;This plays the static sound
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 420
value = S9002,0
volumescale = 100
channel = -1

;This plays the static animation
[State 0, Explod]
type = Explod
trigger1 = time = 420
anim = 8000
ID = 8000
pos = 160,120
postype = left  
facing = 1
vfacing = 1
bindtime = 32
removetime = 32
pausemovetime = 99999
supermovetime = 99999
scale = 1.1,1.1
sprpriority = 9
ontop = 1
ownpal = 1
removeongethit = 0


[State 191, ChangeState] 
Type = ChangeState
Trigger1 = Time = 500
Value = 0



;仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭
;	[僿儖僷乕]僀儞僩儘俀丂嶲擖
;--------------------------------------------------
[StateDef 193]
Type = S
MoveType = I
Physics = N
VelSet = 0,0

[State 193, ChangeAnim]
Type = ChangeAnim
Trigger1 = Time = 0
Value = 41
Elem = 11

[State 193, NotHitBy]
Type = NotHitBy
Trigger1 = 1
Value = SCA
Time = 3

[State 193, VelSet]
Type = VelSet
Trigger1 = Time = 0
X = 3.5
Y = -6.3

[State 193, Gravity]
Type = Gravity
Trigger1 = 1

[State 193, DestroySelf] 
Type = DestroySelf
Trigger1 = Pos Y >= 0

;-------------------------------------------------------------------------
;This is the Winpose
[StateDef 300]
Type = S
Physics = N
Ctrl = 0

;Invisible helper the prevent the song being played during the pause (7-12p only)
[State 0, Helper]
type = Helper
triggerall = numexplod(40006) = 0
triggerall = palno = [7,12]
trigger1 = time = 1
helpertype = normal ;player
name = "Nothing"
ID = 30220
stateno = 30220
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999
pausemovetime = 999999

;This pauses the game while the static is played
[State 0, Pause]
type = Pause
triggerall = numexplod(40006) = 0
trigger1 = time = 1
time = 32
movetime = 1

;This makes the camera follow her during the teleportation
[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1

;This plays the static sound
[State 0, PlaySnd]
type = PlaySnd
triggerall = numexplod(40006) = 0
trigger1 = time = 0
value = S9002,0
volumescale = 100
channel = -1

[State NoMusicFailSafe] 
type = AssertSpecial 
triggerall = numexplod(40006) = 0
triggerall = palno = [7,12]
trigger1 = time >=1 
flag = nomusic 

;This plays the static animation
[State 0, Explod]
type = Explod
triggerall = numexplod(40006) = 0
trigger1 = time = 0
anim = 8000
ID = 8000
pos = 160,120
postype = left  
facing = 1
vfacing = 1
bindtime = 32
removetime = 32
pausemovetime = 99999
supermovetime = 99999
scale = 1.1,1.1
sprpriority = 9
ontop = 1
ownpal = 1
removeongethit = 0

;This makes Y.A.M.E.T.E invinsible during the duration of the winpose
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = invisible

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

;This is the winpose on MatchOver
[StateDef 301]
Type = S
Physics = N
Ctrl = 0

;Invisible helper the prevent the song being played during the pause (7-12p only)
[State 0, Helper]
type = Helper
triggerall = numexplod(40006) = 0
triggerall = palno = [7,12]
trigger1 = time = 1
helpertype = normal ;player
name = "Nothing"
ID = 30220
stateno = 30220
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999
pausemovetime = 999999

;This pauses the game while the static is played
[State 0, Pause]
type = Pause
triggerall = numexplod(40006) = 0
trigger1 = time = 1
time = 32
movetime = 1

;This makes the camera follow her during the teleportation
[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1

;This plays the static sound
[State 0, PlaySnd]
type = PlaySnd
triggerall = numexplod(40006) = 0
trigger1 = time = 0
value = S9002,0
volumescale = 100
channel = -1

[State NoMusicFailSafe] 
type = AssertSpecial 
triggerall = palno = [7,12]
trigger1 = time >=1 
flag = nomusic 

;This plays the static animation
[State 0, Explod]
type = Explod
triggerall = numexplod(40006) = 0
trigger1 = time = 0
anim = 8000
ID = 8000
pos = 160,120
postype = left  
facing = 1
vfacing = 1
bindtime = 32
removetime = 32
pausemovetime = 99999
supermovetime = 99999
scale = 1.1,1.1
sprpriority = 9
ontop = 1
ownpal = 1
removeongethit = 0

;This makes Y.A.M.E.T.E invinsible during the duration of the winpose
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = invisible

;This displays a nice recognizable message if you're a Varghskelethor fan if she wins the match PROTIP: I am one
[State 0, Explod]
type = Explod
triggerall = numexplod(40006) = 0
trigger1 = time = 1
anim = 12500
ID = 12500
pos = 60,60
postype = left
facing = 1
vfacing = 1
bindtime = 9999999
vel = 0,0
accel = 0,0
random = 0,0
removetime = 9999999
pausemovetime = 0
scale = 0.5,0.5
sprpriority = 9
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0 
persistent = 1

;This plays some laughing sounds if she wins the match
[State 0, PlaySnd]
type = PlaySnd
triggerall = numexplod(40006) = 0
trigger1 = time = 10
value = S12500,0+random%2
volumescale = 255
channel = -1
freqmul = 1.0
loop = 0
pan = 0

[StateDef 302]
Type = S
Physics = N
Ctrl = 0

;This makes Y.A.M.E.T.E invinsible during the duration of the winpose
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = invisible

;This is the winpose if Y.A.M.E.T.E wins using the desperation attack.
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S21000,3
volumescale = 100
channel = -1
freqmul = 1.0
loop = 0
pan = 0
abspan = 1

[State 0, Explod]
type = Explod
trigger1 = time = 0
anim = 40006
ID = 40006
pos = 160,120
postype = left  
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
pausemovetime = 99999
supermovetime = 99999
scale = 0.45,0.4
sprpriority = 9
ontop = 1
ownpal = 1
removeongethit = 0



;-------------------------------------------------------------------------------
;Super Armor Meat and Potatoes - Super Armor coding by Brergrsart
[Statedef 1006]
type = U
movetype = I
physics = N
;anim = 10060 ;This is the anim of the super armor (MUST have blue hitboxes). If you want it to simply copy the root's animation, keep this commented.
ctrl = 0

;This controller copies the animation of the root. This is best used if you are keeping this super armor on while going through multiple states.
;Delete this if you uncommented above.
[State 0, ChangeAnim] 
type = ChangeAnim
trigger1 = selfanimexist(root,anim)
elem = root,animelemno(0)
value = root,anim

;The helper will be invisible so you're not seeing double (Though you still will if you're drunk enough).
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = invisible

;This makes sure the super armor stays on you if your character goes off screen.
[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0

;If this helper is hit (Which it should, as your root will be "invincible" while this helper exists, as you will see below)
[State 0, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
stateno = 1007
time = 1
forceair = 0
ignorehitpause = 1

;This makes the helper follow the root to the ends of the earth.
[State 0, BindToRoot]
type = BindToRoot
trigger1 = 1
time = 1
pos = 0,0
ignorehitpause = 1

;IF YOU'RE DEAD, AND I'M YOU IN THE FUTURE, THEN I'M... Oh no.
[State 0, DestroySelf]
type = DestroySelf
trigger1 = root, life <= 0

;-------------------------------------------------------------------------------
;Super Armor's Big Oof
[Statedef 1007]
type = U
movetype = H
physics = N
;anim = 10060 Same deal as above.
ctrl = 0

;This protects the super armor while it is calculating damage. See final Changestate for more details.
[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 2

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

[State 0, BindToRoot]
type = BindToRoot
trigger1 = 1
time = 1
facing = 1
pos = 0,0
ignorehitpause = 1

;This tells the player how much damage they should take.
[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = time = 0
fv = 12
value = gethitvar(damage)

;Optional - This Playsnd triggers when you get hit, so you can make a clunking or, my favorite, grunting sound on hit.
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
trigger1 = gethitvar(damage)
value = S11,1

;YOU'VE KILLED ME...!
[State 0, DestroySelf]
type = DestroySelf
trigger1 = root, life <= 0
;Good.

;Afer a period of time, go back to the previous state.
[State 0, ChangeState]
type = ChangeState
trigger1 = time >= 10
value = 1006
ctrl = 0

