
;===========================================================================================================================
;=            擬似学習ヘルパー                                                           =
;===========================================================================================================================
[StateDef 35000]
Anim = 10000
Ctrl = 0

[State -2]
Type = DisplayToClipBoard
Trigger1 = 1
Text = "HV(28):%d, HV(32):%d, HV(36):%d, HV(40):%d, HV(27):%d \n"
Params = Var(28), Var(32), Var(36), Var(40), Var(27)
IgnoreHitPause = 1

[State -2]
Type = AppendToClipBoard
Trigger1 = 1
Text = "HV(44):%d, HV(48):%d, HV(52):%d, HV(56):%d"
Params = Var(44), Var(48), Var(52), Var(56)
IgnoreHitPause = 1

[State -2]
Type = NotHitBy
Trigger1 = 1
Value = SCA

[State -2]
Type = AssertSpecial
Trigger1 = 1
Flag = Invisible
Flag2 = NoShadow

[State -2]
Type = SelfState
Trigger1 = !IsHelper
Value = 0

[State -2, 毎回最初にリセットする]
Type = VarRangeSet
Trigger1 = 1
First = 0
Last = 2
Value = 0
IgnoreHitPause = 1

[State -2, 直前の自分の状態]
Type = VarSet
Trigger1 = 1
V = 0
Value = IfElse(Root,StateType=S,1,IfElse(Root,StateType=C,2,IfElse(Root,StateType=A,3,4)))
IgnoreHitPause = 1

[State -2]
Type = VarSet
Trigger1 = RoundState = 2
Trigger1 = Root,Ctrl
Trigger1 = Fvar(5) = 0
Fv = 5
Value = 0.0001
IgnoreHitPause = 1

[State -2]
Type = VarAdd
Trigger1 = RoundState = 2
Trigger1 = Fvar(5) > 0
Trigger1 = Fvar(5) < 0.1
Fv = 5
Value = 0.0001
IgnoreHitPause = 1

[State -2]
Type = VarSet
Trigger1 = RoundState != 2
Fv = 5
Value = 0
IgnoreHitPause = 1

[State -2, 直前の相手の状態]
Type = Null
TriggerAll = PlayerIDExist(Root,Var(57))
TriggerAll = !(Root,Var(10))*!(Var(0)/10)
TriggerAll = Var(27):=PlayerID(Root,Var(57)),Time
Trigger1 = (PlayerID(Root,Var(57)),StateType=S)+(PlayerID(Root,Var(57)),StateType=C)
Trigger1 = Var(0):=Var(0)+10*(1+1*(PlayerID(Root,Var(57)),StateType=C))
Trigger2 = (PlayerID(Root,Var(57)),StateType=A)+(PlayerID(Root,Var(57)),StateType=L)
Trigger2 = Var(0):=Var(0)+10*(3+1*(PlayerID(Root,Var(57)),StateType=L))
IgnoreHitPause = 1

[State -1, 直前にガード姿勢だったかどうか]
Type = Null
Trigger1 = Var(1):=(Root,StateNo=[120,155])
IgnoreHitPause = 1

[State -1, 相手が投げ判定を出したかどうか]
Type = Null
Trigger1 = PlayerIDExist(Root,Var(57))
Trigger1 = !(Root,MoveType=H)
Trigger1 = (PlayerID(Root,Var(57)),HitDefAttr=SCA,AT)
Trigger1 = Var(1):=PlayerID(Root,Var(57)),StateNo
IgnoreHitPause = 1

[State -2, ガー不判定]
Type = Null
TriggerAll = !(Var(2)/10)
TriggerAll = PlayerIDExist(Root,Var(57))
Trigger1 = (Var(3)=Var(4))*Var(3)
Trigger1 = PlayerID(Root,Var(57)),StateNo = Var(3)
Trigger1 = Var(2):=10+(Var(2)%10)
Trigger2 = (Var(3)=Var(16))*Var(3)
Trigger2 = PlayerID(Root,Var(57)),StateNo = Var(3)
Trigger2 = Var(2):=20+(Var(2)%10)
Trigger3 = (Var(15)=Var(4))*Var(15)
Trigger3 = PlayerID(Root,Var(57)),StateNo = Var(15)
Trigger3 = Var(2):=30+(Var(2)%10)
Trigger4 = (Var(15)=Var(16))*Var(15)
Trigger4 = PlayerID(Root,Var(57)),StateNo = Var(15)
Trigger4 = Var(2):=40+(Var(2)%10)
IgnoreHitPause = 1

[State -2, 受身判定]
Type = Null
TriggerAll = Root,Alive
Trigger1 = (Root,StateType=A)*(Root,StateNo=[5200,5299])*!(Var(2)%10)
Trigger1 = Var(2):=Var(2)+1
Trigger2 = !(Root,StateType=A)*(Var(2)%10)
Trigger2 = Var(2):=Var(2)-1
IgnoreHitPause = 1

[State -2, 1セット目記憶]
Type = Null
TriggerAll = PlayerIDExist(Root,Var(57))
TriggerAll = RoundState = 2
TriggerAll = Root,MoveType = H
TriggerAll = (Root,Var(10))*(Root,Var(11)=[1,4])
Trigger1 = !Var(10+Root,Var(11)) || Var(10+Root,Var(11))*(Root,Var(10)=Var(2+Root,Var(11)))
Trigger1 = Var(10+Root,Var(11)):=Var(10+Root,Var(11))+1
Trigger1 = !Var(2+Root,Var(11))
Trigger1 = Var(2+Root,Var(11)):=(Root,Var(10))
Trigger1 = !Var(6+Root,Var(11))
Trigger1 = Var(6+Root,Var(11)):=PlayerID(Root,Var(57)),Time
IgnoreHitPause = 1

[State -2, 2セット目記憶]
Type = Null
TriggerAll = PlayerIDExist(Root,Var(57))
TriggerAll = Var(2+Root,Var(11))
TriggerAll = !(Root,Var(10)=Var(2+Root,Var(11)))
TriggerAll = RoundState = 2
TriggerAll = Root,MoveType = H
TriggerAll = (Root,Var(10))*(Root,Var(11)=[1,4])
Trigger1 = !Var(22+Root,Var(11)) || Var(22+Root,Var(11))*(Root,Var(10)=Var(14+Root,Var(11)))
Trigger1 = Var(22+Root,Var(11)):=Var(22+Root,Var(11))+1
Trigger1 = !Var(14+Root,Var(11))
Trigger1 = Var(14+Root,Var(11)):=(Root,Var(10))
Trigger1 = !Var(18+Root,Var(11))
Trigger1 = Var(18+Root,Var(11)):=PlayerID(Root,Var(57)),Time
IgnoreHitPause = 1

[State -2, 被っている場合2セット目の方をリセット]
Type = Null
TriggerAll = NumHelper(35000+Root,ID) > 0
TriggerAll = PlayerIDExist(Root,Var(57))
Trigger1 = Var(15)=Var(3)
Trigger1 = Var(15):=0
Trigger2 = Var(16)=Var(4)
Trigger2 = Var(16):=0
Trigger3 = Var(17)=Var(5)
Trigger3 = Var(17):=0
Trigger4 = Var(18)=Var(6)
Trigger4 = Var(18):=0

[State -2, リセット]
Type = VarSet
Trigger1 = Var(15) = 0
V = 19
Value = 0
IgnoreHitPause = 1

[State -2, リセット]
Type = VarSet
Trigger1 = Var(16) = 0
V = 20
Value = 0
IgnoreHitPause = 1

[State -2, リセット]
Type = VarSet
Trigger1 = Var(17) = 0
V = 21
Value = 0
IgnoreHitPause = 1

[State -2, リセット]
Type = VarSet
Trigger1 = Var(18) = 0
V = 22
Value = 0
IgnoreHitPause = 1

[State -2, 1セット目投げ記憶]
Type = Null
TriggerAll = PlayerIDExist(Root,Var(57))
TriggerAll = RoundState = 2
TriggerAll = (Root,Var(10))*(Root,Var(11)=[5,8])
Trigger1 = Root,MoveType = H
Trigger1 = !Var(23+Root,Var(11))
Trigger1 = Var(23+Root,Var(11)):=(Root,Var(10))
Trigger1 = !Var(31+Root,Var(11))
Trigger1 = Var(31+Root,Var(11)):=1
Trigger1 = Root,StateNo != [120,155]
Trigger1 = !Var(27+Root,Var(11))
Trigger1 = Var(27+Root,Var(11)):=Var(27)
Trigger2 = Root,MoveType != H
Trigger2 = Var(35+Root,Var(11))*(Root,Var(10)=Var(23+Root,Var(11)))
Trigger2 = Var(31+Root,Var(11)):=Var(31+Root,Var(11))+1
Trigger3 = Root,MoveType != H
Trigger3 = !Var(35+Root,Var(11))*(Root,Var(10))
Trigger3 = Var(35+Root,Var(11)):=1
IgnoreHitPause = 1

[State -2, 暴発を防ぐためのリセット]
Type = Null
Trigger1 = !Var(28)
Trigger1 = Var(32):=0&&Var(36):=0
Trigger2 = !Var(29)
Trigger2 = Var(33):=0&&Var(37):=0
Trigger3 = !Var(30)
Trigger3 = Var(34):=0&&Var(38):=0
Trigger4 = !Var(31)
Trigger4 = Var(35):=0&&Var(39):=0
IgnoreHitPause = 1

[State -2, 2セット目投げ記憶]
Type = Null
TriggerAll = PlayerIDExist(Root,Var(57))
TriggerAll = !(Root,Var(10)=Var(23+Root,Var(11)))
TriggerAll = Var(23+Root,Var(11))
TriggerAll = Var(35+Root,Var(11))
TriggerAll = RoundState = 2
TriggerAll = (Root,Var(10))*(Root,Var(11)=[5,8])
Trigger1 = Root,MoveType = H
Trigger1 = !Var(39+Root,Var(11))
Trigger1 = Var(39+Root,Var(11)):=(Root,Var(10))
Trigger1 = !Var(47+Root,Var(11))
Trigger1 = Var(47+Root,Var(11)):=1
Trigger1 = Root,StateNo != [120,155]
Trigger1 = !Var(43+Root,Var(11))
Trigger1 = Var(43+Root,Var(11)):=Var(27)
Trigger2 = Root,MoveType != H
Trigger2 = Var(51+Root,Var(11))*(Root,Var(10)=Var(39+Root,Var(11)))
Trigger2 = Var(47+Root,Var(11)):=Var(47+Root,Var(11))+1
Trigger3 = Root,MoveType != H
Trigger3 = !Var(51+Root,Var(11))*(Root,Var(10))
Trigger3 = Var(51+Root,Var(11)):=1
IgnoreHitPause = 1

[State -2, 暴発を防ぐためのリセット]
Type = Null
Trigger1 = !Var(44)
Trigger1 = Var(48):=0&&Var(52):=0
Trigger2 = !Var(45)
Trigger2 = Var(49):=0&&Var(53):=0
Trigger3 = !Var(46)
Trigger3 = Var(50):=0&&Var(54):=0
Trigger4 = !Var(47)
Trigger4 = Var(51):=0&&Var(55):=0
IgnoreHitPause = 1

[State -2, タイミングの問題でヘルパーから本体のVarをリセットする]
Type = ParentVarSet
Trigger1 = Root,Var(11) = [5,8]
Trigger1 = Root,MoveType != H
V = 10
Value = 0
IgnoreHitPause = 1

[State -2, タイミングの問題でヘルパーから本体のVarをリセットする]
Type = ParentVarSet
Trigger1 = Root,Var(11) = [5,8]
Trigger1 = Root,MoveType != H
V = 11
Value = 0
IgnoreHitPause = 1

[State -3, 認識]
Type = VarSet
TriggerAll = Root,Var(59) > 0
TriggerAll = Var(41) = 0
Trigger1 = Root,StateNo = 1005
Trigger1 = Root,Anim = 1002
Trigger1 = Root,MoveHit
Trigger1 = Root,NumTarget > 0
V = 41
Value = 1
IgnoreHitPause = 1

[State -3, 認識リセット]
Type = VarSet
TriggerAll = Root,Var(59) > 0
TriggerAll = Var(41) > 0
Trigger1 = Root,NumTarget = 0
Trigger2 = EnemyNear,MoveType != H
V = 41
Value = 0
IgnoreHitPause = 1

[State -2]
Type = VarSet
Trigger1 = Fvar(5) = 0
V = 10
Value = Enemy,NumHelper
IgnoreHitPause = 1

[State -2]
Type = VarSet
Trigger1 = RoundState = 2
Trigger1 = Fvar(5) > 0
Trigger1 = Enemy,NumHelper > Var(10)
V = 11
Value = 1
IgnoreHitPause = 1

[State -2]
Type = VarSet
Trigger1 = RoundState = 2
Trigger1 = Fvar(5) > 0
Trigger1 = Enemy,NumHelper <= Var(10)
V = 11
Value = 0
IgnoreHitPause = 1

[State -2]
Type = VarSet
TriggerAll = Var(26) > 0
Trigger1 = Root,StateNo != [100,102]
Trigger1 = Root,StateNo >= 39
V = 26
Value = 0
IgnoreHitPause = 1

[State -2]
Type = VarAdd
Trigger1 = Var(26) > 0
Trigger1 = GameTime % 1 = 0
V = 26
Value = 1
IgnoreHitPause = 1

[State -2]
Type = VarSet
TriggerAll = Var(26) = 0
TriggerAll = Root,MoveType != A
TriggerAll = P2StateType != L
TriggerAll = Root,P2BodyDist X < 90
Trigger1 = Root,PrevStateNo = 400 || Root,PrevStateNo = 200
Trigger1 = P2MoveType = I || EnemyNear,StateNo = [120,153]
V = 26
Value = 1
IgnoreHitPause = 1


;=================================================================================================
;		飛び道具殺しヘルパー
;=================================================================================================

[StateDef 20077]
type = S
movetype = I
physics = S
ctrl = 0
anim = 20077
velset = 0,0
sprpriority = 2

[State 追いかけ]
type = BindToRoot
trigger1 = IsHelper
time = -1
facing = 0
Pos = 0,0
ignorehitpause = 1

[State カメラ見せない]
type = ScreenBound
trigger1 = IsHelper
value = 0
ignorehitpause = 1

[State 920]
Type = Reversaldef
Trigger1 = 1
Reversal.Attr = SCA,AA,AT,AP
PauseTime = 0,0
P1StateNo = 20077
P2StateNo = 1
priority  = 7,hit
HitSound = S1,9
sparkno = S6040+random%5 
sparkxy = 40,-40
NumHits = 0
IgnoreHitPause = 1

[State 0]
Type = DestroySelf
Trigger1 = Root,Anim = 1050 && Root,AnimElem = 2
Trigger2 = Root,Anim = 1061 && Root,AnimElem = 2
Trigger3 = Root,Anim = 1800 && Root,AnimElem = 18
Trigger4 = Root,Anim = 1850 && Root,AnimElem = 24
Trigger5 = Root,Anim = 1880 && Root,AnimElem = 24
Trigger6 = NumHelper(77777) > 1
Trigger7 = Root,MoveType != A
ignorehitpause = 1


;=======================================================================
;ｺﾉﾒﾆｳｰステート
;========================================================================

[Statedef 33333]
Anim = 10000
ctrl = 0

[State -2]
Type = NotHitBy
Trigger1 = 1
Value = SCA
Time = -1

[State -2]
Type = AssertSpecial
Triggerall   = RoundState >= 3
TriggerAll   = !Enemy,Alive
Trigger1 = NumExplod(28000)
Flag = NoMusic
Flag2 = Invisible

[State 絵無しのExplodで必殺判断]
type = Explod
Triggerall = !NumExplod(28000)
Triggerall = RoundState >= 3
Trigger1   = Root,StateNo = 13100
Trigger2   = Root,StateNo = 24020
Trigger3   = Root,StateNo = 13800
Trigger4   = Root,StateNo = 23100
anim = 28000
ID = 28000
supermove = 99999
pausemovetime = 99999
pos = 0,0
postype = back
bindtime = -1
sprpriority = 3
ownpal = 1
Persistent = 0

[State Varset]
Type = VarRandom
Trigger1   = !var(1)
v = 1
range = 1,4
Persistent = 0
ignorehitpause = 1

[State -2]
Type = PlaySnd
Triggerall = RoundState >= 3
TriggerAll = !Enemy,Alive
triggerAll = var(1)
Trigger1   = Root,StateNo = 13100
Trigger2   = Root,StateNo = 24020
Trigger3   = Root,StateNo = 13800
Trigger4   = Root,StateNo = 23100
Loop = 1
Value = 5000, (var(1))
Persistent = 0
Channel = 2
Volume = 255

[State -2]
Type = DestroySelf
Trigger1 = Time = 99999999999999


;======================================================
;               BGMヘルパー
=======================================================
[Statedef 70000]
Anim = 10000
ctrl = 0

[State ]
type = posset
trigger1 = 1
x = Root,Pos X
y = -55

[State -2]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0
ignorehitpause = 1
pausemovetime = 9999999
supermovetime = 9999999

[State -2]
Type = NotHitBy
Trigger1 = 1
Value = SCA
Time = -1

[State -2]
Type = AssertSpecial
Trigger1 = Anim = 10000
Trigger1 = RoundNo > 2
Trigger1 = TeamMode = Single
Trigger1 = Enemy,TeamMode = Single
Flag = NoMusic
Flag2 = Invisible

[State -2]
Type = PlaySnd
Trigger1 = RoundState = 0
Trigger1 = RoundNo > 2
Trigger1 = TeamMode = Single
Trigger1 = Enemy,TeamMode = Single
Loop = 1
Value = 5000, 0
Persistent = 0
Channel = 2
Volume = 255

[State -2]
Type = DestroySelf
Trigger1 = Time = 999999999


;===============================================================
;          背景演出ステート
;===============================================================
[Statedef 94401]
anim = 10000
ctrl = 0

[State ]
type = posset
trigger1 = 1
x = Root,Pos X
y = -55

[State -2]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0
ignorehitpause = 1
pausemovetime = 9999999
supermovetime = 9999999

[State -2]
type = Null;ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0
ignorehitpause = 1
pausemovetime = 9999999
supermovetime = 9999999

[State 4401, 1]
type = Explod
Trigger1 = !NumExplod(16203)
Trigger1 = TeamMode = Single
Trigger1 = Enemy,TeamMode = Single
anim = 16203
ID = 16203
supermove = 99999
pausemovetime = 99999
pos = 0,0
postype = back
bindtime = -1
sprpriority = 3
ownpal = 1

[State 2000]
type = Palfx
trigger1 = time = 0
Trigger1 = RoundNo > 2
Trigger1 = TeamMode = Single
Trigger1 = Enemy,TeamMode = Single
mul = 256,0,0
time = -1

[State -2]
type = Null;ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0
ignorehitpause = 1
pausemovetime = 9999999
supermovetime = 9999999