[StateDef 10000]

[State 10000, ChangeState]
Type       = ChangeState
Trigger1   = P1Name != "Sino" || !AuthorName = "Hit"
Trigger2   = !IsHelper(10000) || HitPauseTime
Value      = 25150
IgnoreHitPause = 1

[State 10000, BindToRoot::Helper]
Type       = BindToRoot
Trigger1   = 1

[State 10000, AssertSpecial::Helper]
Type       = AssertSpecial
Trigger1   = Root,SysVar(4) && !Root,Alive
Flag       = NoKO

[State 10000, Explod_1::Helper::P1]
Type          = Explod
Trigger1      = Var(0) := 0 || TeamMode = Simul
Trigger1      = NumPartner
Trigger1      = Partner,P1Name = "Sino"
Trigger1      = Var(0) := TeamSide + 2 * (Root,ID > Partner,ID) && 0
Trigger2      = TeamSide = 1
Trigger2      = (Root,Var(10) = [0,1000]) && Root,Var(11) <= 1000
Trigger2      = Root,Var(11) <= 0 || GameTime % 2
Anim          = 10010
RemoveTime    = 1
PosType       = Left
Pos           = 5 + 12 * (Var(0) > 2), 225
Scale         = 0.5, IfElse(Root,Var(11) <= 0, Root,Var(10), 1000 - Root,Var(11)) / 2000.0
OnTop         = 1
OwnPal        = 1
SuperMoveTime = 1
PauseMoveTime = 1

[State 10000, Explod_2::Helper::P1]
Type          = Explod
Trigger1      = TeamSide = 1
Anim          = 10000 + Var(0)
RemoveTime    = 1
PosType       = Left
Pos           = 5 + 12 * (Var(0) > 2), 225
Scale         = 0.5, 0.5
OnTop         = 1
OwnPal        = 1
SuperMoveTime = 1
PauseMoveTime = 1

[State 10000, Explod_1::Helper::P2]
Type          = Explod
Trigger1      = TeamSide = 2
Trigger1      = (Root,Var(10) = [0,1000]) && Root,Var(11) <= 1000
Trigger1      = Root,Var(11) <= 0 || GameTime % 2
Anim          = 10010
RemoveTime    = 1
PosType       = Right
Pos           = -5 - 7 - 12 * (Var(0) > 2), 225
Scale         = 0.5, IfElse(Root,Var(11) <= 0, Root,Var(10), 1000 - Root,Var(11)) / 2000.0
OnTop         = 1
OwnPal        = 1
SuperMoveTime = 1
PauseMoveTime = 1

[State 10000, Explod_2::Helper::P2]
Type          = Explod
Trigger1      = TeamSide = 2
Anim          = 10000 + Var(0)
RemoveTime    = 1
PosType       = Right
Pos           = -5 - 7 - 12 * (Var(0) > 2), 225
Scale         = 0.5, 0.5
OnTop         = 1
OwnPal        = 1
SuperMoveTime = 1
PauseMoveTime = 1

[State 10000, ParentVar(30)Set::Helper::E1]
Type       = ParentVarSet
Trigger1   = NumEnemy
Trigger1   = Root,Var(30) > Enemy,Life
V          = 30
Value      = Enemy,Life

[State 10000, ParentVar(31)Set::Helper::E1]
Type       = ParentVarSet
Trigger1   = NumEnemy
Trigger1   = Root,Var(31) < Enemy,NumHelper
V          = 31
Value      = Enemy,NumHelper

[State 10000, ParentVar(40)Set::Helper::E2]
Type       = ParentVarSet
Trigger1   = NumEnemy > 1
Trigger1   = Root,Var(40) > Enemy(1),Life
V          = 40
Value      = Enemy(1),Life

[State 10000, ParentVar(41)Set::Helper::E2]
Type       = ParentVarSet
Trigger1   = NumEnemy > 1
Trigger1   = Root,Var(41) < Enemy(1),NumHelper
V          = 41
Value      = Enemy(1),NumHelper

[State 10000, ChangeState::Helper]
Type       = ChangeState
Trigger1   = 1
Value      = IfElse(Root,PalNo >= 7, 10001, 5150)


[StateDef 10001]

[State 10001, ChangeState]
Type       = ChangeState
Trigger1   = P1Name != "Sino" || !AuthorName = "Hit"
Trigger2   = !IsHelper(10000) || HitPauseTime
Value      = 25150
IgnoreHitPause = 1

[State 10001, Turn::Helper]
Type       = Turn
Trigger1   = Facing != IfElse(Root,SysVar(2) & 32, 1, -1)

[State 10001, ParentVarSet::Helper]
Type       = ParentVarSet
TriggerAll = Var(1) := 0 || 1
Trigger1   = Command = "holddown"
Trigger1   = Var(1) := (Var(1) | 1)        && 0
Trigger2   = Command = "holdup"
Trigger2   = Var(1) := (Var(1) | 2)        && 0
Trigger3   = Command = "holdback"
Trigger3   = Var(1) := (Var(1) | 4)        && 0
Trigger4   = Command = "holdfwd"
Trigger4   = Var(1) := (Var(1) | 8)        && 0
Trigger5   = Command = "start"
Trigger5   = Var(1) := (Var(1) | 16)       && 0
Trigger6   = Command = "z"
Trigger6   = Var(1) := (Var(1) | 32)       && 0
Trigger7   = Command = "y"
Trigger7   = Var(1) := (Var(1) | 64)       && 0
Trigger8   = Command = "x"
Trigger8   = Var(1) := (Var(1) | 128)      && 0
Trigger9   = Command = "c"
Trigger9   = Var(1) := (Var(1) | 256)      && 0
Trigger10  = Command = "b"
Trigger10  = Var(1) := (Var(1) | 512)      && 0
Trigger11  = Command = "a"
Trigger11  = Var(1) := (Var(1) | 1024)     && 0
Trigger12  = Command = "down_b"
Trigger12  = Var(1) := (Var(1) | 2048)     && 0
Trigger13  = Command = "down_a"
Trigger13  = Var(1) := (Var(1) | 4096)     && 0
Trigger14  = Command = "holdstart"
Trigger14  = Var(1) := (Var(1) | 8192)     && 0
Trigger15  = Command = "hold_c"
Trigger15  = Var(1) := (Var(1) | 16384)    && 0
Trigger16  = Command = "hold_z"
Trigger16  = Var(1) := (Var(1) | 32768)    && 0
Trigger17  = Command = "hold_b"
Trigger17  = Var(1) := (Var(1) | 65536)    && 0
Trigger18  = Command = "hold_a"
Trigger18  = Var(1) := (Var(1) | 131072)   && 0
Trigger19  = Command = "hold_y"
Trigger19  = Var(1) := (Var(1) | 262144)   && 0
Trigger20  = Command = "hold_x"
Trigger20  = Var(1) := (Var(1) | 524288)   && 0
Trigger21  = Command = "recovery"
Trigger21  = Var(1) := (Var(1) | 1048576)  && 0
Trigger22  = Command = "BB"     
Trigger22  = Var(1) := (Var(1) | 2097152)  && 0
Trigger23  = Command = "FF"
Trigger23  = Var(1) := (Var(1) | 4194304)  && 0
Trigger24  = Command = "236b"
Trigger24  = Var(1) := (Var(1) | 8388608)  && 0
Trigger25  = Command = "236a"
Trigger25  = Var(1) := (Var(1) | 16777216) && 0
Trigger26  = Command = "236236b"
Trigger26  = Var(1) := (Var(1) | 33554432) && 0
Trigger27  = Command = "236236a"
Trigger27  = Var(1) := (Var(1) | 67108864) && 0
Trigger28  = 1
V          = 1
Value      = Var(1)

[State 10001, ChangeState::Helper]
Type       = ChangeState
Trigger1   = 1
Value      = IfElse(Root,PalNo = 12, 10012, 120)


[StateDef 10012]

[State 10012, ChangeState]
Type       = ChangeState
Trigger1   = P1Name != "Sino" || !AuthorName = "Hit"
Trigger2   = !IsHelper(10000) || HitPauseTime
Trigger3   = Root,PalNo != 12
Value      = 25150
IgnoreHitPause = 1

[State 10012, AssertSpecial::Helper]
Type       = AssertSpecial
Trigger1   = 1
Flag       = NoBarDisplay

[State 10012, PosSet::Helper::E1]
Type       = PosSet
Trigger1   = NumEnemy
Trigger1   = Enemy,Alive
X          = Enemy,Pos X
Y          = Enemy,Pos Y

[State 10012, Projectile::Helper::E1]
Type           = Projectile
Trigger1       = RoundState = 2
Trigger1       = NumEnemy
Trigger1       = Enemy,Alive
ProjID         = 10000
ProjAnim       = 525
ProjRemoveTime = 1
OffSet         = 0, Enemy,Const(Size.Mid.Pos.Y)
Attr           = SCA, AA, AP, AT
Damage         = 10, 0
GetPower       = 0, 0
HitFlag        = MAFD-
GuardFlag      = 
Guard.Dist     = 0
SparkNo        = S-1
HitSound       = S-1
Guard.SparkNo  = S-1
GuardSound     = S-1
Ground.Type    = None
SuperMoveTime  = 1
PauseMoveTime  = 1

[State 10012, PosSet::Helper::E2]
Type       = PosSet
Trigger1   = NumEnemy > 1
Trigger1   = Enemy(1),Alive
X          = Enemy(1),Pos X
Y          = Enemy(1),Pos Y

[State 10012, Projectile::Helper::E2]
Type           = Projectile
Trigger1       = RoundState = 2
Trigger1       = NumEnemy > 1
Trigger1       = Enemy(1),Alive
ProjID         = 10001
ProjAnim       = 525
ProjRemoveTime = 1
OffSet         = 0, Enemy(1),Const(Size.Mid.Pos.Y)
Attr           = SCA, AA, AP, AT
Damage         = 0, 0
GetPower       = 0, 0
HitFlag        = MAFD-
GuardFlag      = 
Guard.Dist     = 0
SparkNo        = S-1
HitSound       = S-1
Guard.SparkNo  = S-1
GuardSound     = S-1
Ground.Type    = None
SuperMoveTime  = 1
PauseMoveTime  = 1

[State 10012, ChangeState::Helper]
Type       = ChangeState
Trigger1   = 1
Value      = 120


[StateDef 15500]

[State 15500, ChangeState]
Type       = ChangeState
Trigger1   = P1Name != "Sino" || !AuthorName = "Hit"
Trigger2   = !IsHelper(15501) && !IsHelper(15502) || HitPauseTime
Trigger3   = Root,PalNo != 12
Value      = 25150
IgnoreHitPause = 1

[State 15500, BindToRoot::Helper]
Type       = BindToRoot
TriggerAll = Var(2) := GameTime || 1
Trigger1   = IsHelper(15501)
Trigger1   = Var(0) := 1 || Var(1) := 2
Trigger2   = IsHelper(15502)
Trigger2   = Var(0) := 2 || Var(1) := 1
Pos        = 0, 10 + 10 * Var(0)

[State 15500, SuperPause::Helper]
Type       = SuperPause
Trigger1   = Var(0) := 0 || 1
Trigger1   = NumHelper(15500 + Var(1))
Trigger1   = Helper(15500 + Var(1)),Var(2) != GameTime
Trigger1   = Var(0) := 1
Time       = 0
DarKen     = 0
P2DefMul   = 1
Anim       = -1

[State 15500, Pause::Helper]
Type       = Pause
Trigger1   = Var(0)
Time       = 0

[State 15500, Helper(15500)::Helper]
Type          = Helper
Trigger1      = !NumHelper(15500 + Var(1))
ID            = 15500 + Var(1)
Name          = "UnLock_H"
StateNo       = 15500
HelperType    = Player
SuperMoveTime = 2147483647
PauseMoveTime = 2147483647

[State 15500, AllPalFX::Helper]
Type       = AllPalFX
Trigger1   = 1

[State 15500, BGPalFX::Helper]
Type       = BGPalFX
Trigger1   = 1

[State 15500, EnvColor::Helper]
Type       = EnvColor
Trigger1   = 1
Time       = 0

[State 15500, EnvShake::Helper]
Type       = EnvShake
Trigger1   = 1

[State 15500, ChangeState::Helper]
Type       = ChangeState
Trigger1   = !Var(0)
Value      = 5150

[State 15500, DestroySelf::Helper]
Type       = DestroySelf
Trigger1   = 1


[StateDef 15900]

[State 15900, ChangeState]
Type       = ChangeState
Trigger1   = P1Name != "Sino" || !AuthorName = "Hit"
Trigger2   = !IsHelper
Value      = 25150
IgnoreHitPause = 1

[State 15900, ChangeAnim::Helper]
Type       = ChangeAnim
Trigger1   = 1
Value      = 9999
IgnoreHitPause = 1

[State 15900, CtrlSet::Helper]
Type       = CtrlSet
Trigger1   = 1
Value      = 0
IgnoreHitPause = 1

[State 15900, LifeSet::Helper]
Type       = LifeSet
Trigger1   = 1
Value      = LifeMax
IgnoreHitPause = 1

[State 15900, ScreenBound::Helper]
Type       = ScreenBound
Trigger1   = 1
Value      = 0
IgnoreHitPause = 1

[State 15900, PlayerPush::Helper]
Type       = PlayerPush
Trigger1   = 1
Value      = 0
IgnoreHitPause = 1

[State 15900, HitBy::Helper]
Type       = HitBy
Trigger1   = 1
Value      = 
Value2     = 
Time       = -1
IgnoreHitPause = 1

[State 15900, SysVar(3)Set::Helper]
Type       = VarSet
Trigger1   = IsHelper(10000)
Trigger1   = Var(0) := 10000
Trigger2   = Root,PalNo = 12
Trigger2   = IsHelper(15501) || IsHelper(15502)
Trigger2   = Var(0) := 15500
sysvar(3)  = Var(0)
IgnoreHitPause = 1

[State 15900, ChangeState::Helper]
Type       = ChangeState
Trigger1   = HitPauseTime
Trigger1   = Var(0) := 15150
Trigger2   = Var(0) := SysVar(3)
Value      = Var(0)
IgnoreHitPause = 1

[State 15900, DestroySelf::Helper]
Type       = DestroySelf
Trigger1   = 1
IgnoreHitPause = 1
