
;---------------------------------------------------------------------------
; 常時監視ステート（いつでも実行する）
;---------------------------------------------------------------------------
[statedef -2]

[State -2, nomusic]
type = AssertSpecial
trigger1 = var(59) = 1
trigger1 = roundno > 1
flag = nomusic
supermovetime = 9999999
pausemovetime = 9999999

[state -2,デストロイセルフ];元締めが死んだらヘルパーは消える
type=destroyself
TriggerAll = PalNo >= 11
triggerall=ishelper(1666661)
trigger1=StateNo!=[0,240];;trigger1=StateNo!=[200,240]
;trigger2=StateNo!=[0,3]
;trigger3=StateNo!=[170,191]
supermovetime=99999999999
pausemovetime = 9999999999

[State -2]
type = null;ChangeAnim
trigger1 = ishelper(1666661)
value = 0

[State -2]
Type = null;AfterImage
trigger1 = roundstate = 2
Trigger1 = alive
Time = -1
Trans = Add
length   = 12
timegap  = 1
framegap = 1
PalBright = 60,60,55
PalContrast = 105,105,70
PalAdd = 0,0,0
PalMul = 0.75,0.75,0.7
SuperMoveTime = 999999
PauseMoveTime = 999999

[State -2, 2]
type = nothitby
trigger1 = roundstate != 2
trigger2 = !enemy,alive
value = SCA,AA,AT,AP

[state -2]
type = posset
trigger1 = roundstate = [0,2]
y = -50

[State -2, 2]
type = assertspecial
trigger1 = !ishelper
flag = invisible
flag2 = nokoslow

[State -2, 2]
type = assertspecial
trigger1 = !ishelper
trigger1 = RoundNo > 1
trigger1 = enemynear,name = "syugosya_emiya"
flag = timerfreeze

[State -2, 2]
type = ctrlset
trigger1 = roundstate = 2
trigger1 = !ishelper
value = 0
ignorehitpause = 1

[State -2, 2];無敵
type = nothitby
Trigger1 = PalNo != 6
trigger1 = helper(1666661),time <= 30
trigger1 = helper(1666661),stateno != 200
trigger1 = !ishelper
value = SCA,AA,AT,AP

[State -2, 2];アーマー
type = null;HitOverride
Trigger1 = root,PalNo != 6
trigger1 = ishelper(1666661);1
attr = SCA,AA,AT,AP
slot = 1
stateno = 1
time = 100

[State -2, 2];アーマー
type = null;HitOverride
Trigger1 = root,PalNo <= 6
attr = SCA,AA,AT,AP
slot = 1
stateno = 1
time = 100

[State -2, 2];本体
type = selfstate
triggerall = !ishelper
trigger1 = P2life = 0 && P2stateno = 5150
trigger2 = P2life = 0 && P2stateno = 12345
trigger3 = P2life = 0 && P2stateno = 1000044
value = 0
ctrl = 0

[State -2, 2];本体
type = selfstate
trigger1 = (stateno != [0,1]) && stateno != 5150
trigger1 = !ishelper
value = 0
ctrl = 0

[State -2, 2];でばぐ
type = null;selfstate
trigger1 = roundstate >= 3
;trigger1 = stateno != 230;適宜
trigger1 = !ishelper
;trigger1 = 0;1
value = 0
ctrl = 0

[State -2, 2];変化
type = selfstate
trigger1 = roundstate = 2
trigger1 = root,life >= lifemax*0.8;lifemaxは5000だから0.8かけて現在4000以上なら
trigger1 = (stateno != [200,240]) && stateno != 1;(stateno != [200,230])は単なるデバッグ用
trigger1 = ishelper
value = 200
ctrl = 0

[State -2, 2];変化
type = selfstate
trigger1 = roundstate = 2
trigger1 = root,life >= lifemax*0.6;lifemaxは5000だから0.6かけて現在3000以上なら
trigger1 = root,life <= lifemax*0.8;さらに0.8かけより小さいことで4000以下、つまり[3000,4000]と同義
trigger1 = stateno = 200 || stateno = 1
trigger1 = ishelper
value = 210
ctrl = 0

[State -2, 2];変化
type = selfstate
trigger1 = roundstate = 2
trigger1 = root,life >= lifemax*0.4;lifemaxは5000だから0.4かけて現在2000以上なら
trigger1 = root,life <= lifemax*0.6;さらに0.6かけより小さいことで3000以下、つまり[2000,3000]と同義
trigger1 = stateno = 210 || stateno = 1
trigger1 = ishelper
value = 220
ctrl = 0

[State -2, 2];変化
type = selfstate
trigger1 = roundstate = 2
trigger1 = root,life >= lifemax*0.2;lifemaxは5000だから0.2かけて現在1000以上なら
trigger1 = root,life <= lifemax*0.4;さらに0.6かけより小さいことで2000以下、つまり[1000,2000]と同義
trigger1 = stateno = 220 || stateno = 1
trigger1 = ishelper
value = 230
ctrl = 0

[State -2, 2];変化
type = selfstate
trigger1 = roundstate = 2
trigger1 = root,life <= lifemax*0.2;lifemaxは5000だから0.2かけて現在1000以下なら
trigger1 = stateno = 230 || stateno = 1
trigger1 = ishelper
;trigger2 = roundstate = 2
;trigger2 = Palno > 10
;trigger2 = (stateno != [200,240]) && stateno != 1;(stateno != [200,230])は単なるデバッグ用
;trigger2 = ishelper
value = 240
ctrl = 0

[State -2, 2];アーマー
type = null;HitOverride
Trigger1 = PalNo != 6
trigger1 = ishelper(1666661);1
attr = SCA,AA,AT,AP
slot = 2
stateno = 1
time = 100

[State -2, 2];アーマー
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
slot = 2
stateno = 1
time = 100

[State -2]
type = ReversalDef
Trigger1 = root,PalNo >= 7
trigger1 = ishelper(1666661)
reversal.attr = SCA,AT,AA,AP
hitflag = M-
priority = 7
pausetime = 0,5
numhits = 0
sparkno = -1
hitsound = -1
ignorehitpause = 1
supermovetime = 9999999
pausemovetime = 9999999

[State -2]
type = targetstate
Trigger1 = root,PalNo >= 7
Trigger1 = ishelper(1666661)
value = 1000044

[State -2]
type = null;AssertSpecial
trigger1 = !enemy,alive
flag = noko
ignorehitpause = 1
SuperMoveTime = -1
PauseMoveTime = -1

[State -2]
type = AssertSpecial
TriggerAll = PalNo = 10
Trigger1 = !Win && !Lose && !DrawGame
Trigger2 = P2Life != 0
flag = noko
ignorehitpause = 1
SuperMoveTime = -1
PauseMoveTime = -1

;[State -2]
;Type = LifeSet
;TriggerAll = PalNo = 10
;Trigger1 = RoundState >= 3
;Trigger2 = Win || Lose || DrawGame
;Value = LifeMax
;ignorehitpause = 1
;SuperMoveTime = -1
;PauseMoveTime = -1

[State -2]
Type = LifeSet
Trigger1 = PalNo = 10
Trigger1 = !Win && !Lose && !DrawGame
Value = 0
ignorehitpause = 1
SuperMoveTime = -1
PauseMoveTime = -1

[State -2]
Type = LifeSet
Trigger1 = PalNo = 11
Value = enemynear,life+1
ignorehitpause = 1
SuperMoveTime = -1
PauseMoveTime = -1

[State -2]
Type = LifeSet
;Trigger1 = PalNo != 6
Trigger1 = enemynear,lifemax = 1000
Trigger1 = PalNo = 12
Trigger1 = RoundState != 2
Trigger1 = enemynear,life < 900
Value = enemynear,life+1
ignorehitpause = 1
SuperMoveTime = -1
PauseMoveTime = -1

[State -2,lifeset];ステート奪いでは倒せないように。
type = lifeSet
triggerAll = Palno >= 11
triggerAll = RoundNo > 1
trigger1 = var(59) = 1
trigger1 = stateno = 5150
trigger1 = var(20) != 200
;trigger2 = roundstate != 2
;trigger2 = alive
value=lifemax 
ignorehitpause = 1
supermovetime = 9999999
sausemovetime = 9999999

;[State -2]
;Type = null;LifeSet
;TriggerAll = PalNo > 10
;Trigger1 = !Win && !Lose && !DrawGame
;Value = 0
;ignorehitpause = 1
;SuperMoveTime = -1
;PauseMoveTime = -1

[State -2, 7]
type = VarAdd
trigger1 = stateno = 5150
trigger1 = var(20)= [0,100]
var(20) = 1

[State -2]
type = AssertSpecial
TriggerAll = PalNo > 10
triggerAll = RoundNo > 1
trigger1 = var(59) = 1
trigger1 = var(20) != 200
trigger1 = enemy,alive = 1
;trigger1 = P2life != 0
flag = noko
ignorehitpause = 1
SuperMoveTime = -1
PauseMoveTime = -1

[State -2]
type = assertspecial
triggerAll = Palno != 6
TriggerAll = PalNo < 11
triggerAll = RoundNo > 1
trigger1 = var(59) = 1
trigger1 = var(20) != 100
trigger1 = enemy,alive = 1
trigger1 = P2life != 0
flag = noko
ignorehitpause = 1
pausemovetime = 9999999
supermovetime = 9999999

[State -2,lifeset];ステート奪いでは倒せないように。
type = lifeSet
triggerAll = Palno != 6
triggerAll = RoundNo > 1
trigger1 = var(59) = 1
trigger1 = stateno = 5150
trigger1 = var(20) != 200
;trigger2 = roundstate != 2
;trigger2 = alive
value=lifemax 
ignorehitpause = 1
supermovetime = 9999999
sausemovetime = 9999999

[State -2,608];６０８氏型ステート抜け。比較的自然に抜ける。これを記述する前にガードステートをmovetype=Iにしましょう
type = SelfState
triggerAll = Palno != 6
triggerAll = RoundNo > 1
trigger1 = var(59) = 1
trigger1 = alive
trigger1 = stateno = 5150
trigger1 = var(20)!= 200
;trigger1 = P2life != 0
;trigger1 = !enemy,alive
value = PrevStateno
ignorehitpause = 1
pausemovetime = 9999999
supermovetime = 9999999

[State -2, 2]
type = nothitby
trigger1 = ishelper
value = SCA,AA,AT,AP

[state -2,6P専用]
type = lifeadd
triggerAll = Palno = 6
triggerAll = RoundNo > 1
trigger1 = var(59) = 1
trigger1 = gametime%5 = 0
trigger1 = alive
value = lifemax/1000

[state -2,鬼畜モード専用]
type = lifeadd
TriggerAll = PalNo < 6
trigger1 = var(59) = 1
trigger1 = gametime%5 = 0
trigger1 = alive
value = lifemax/500

[state -2,鬼畜モード専用]
type = lifeadd
triggerAll = Palno > 6
triggerAll = Palno != 10
trigger1 = var(59) = 1
trigger1 = gametime%5 = 0
trigger1 = alive
value = lifemax/400

[State -2, 天元突破]
Type = Helper
Trigger1 = root,PalNo >= 7
trigger1 = var(59) = 1
trigger1 = roundstate = 2
trigger1 = alive
trigger1 = numhelper(6000) = 0
Stateno = 6000
ID = 6000
helpertype = normal
Name = "tengentoppa"
Pos = -90,-40
PosType = P1
Ownpal = 1
Keyctrl = 0
SprPriority = 8
IgnoreHitPause = 1
Persistent = 1
SuperMoveTime = 0
PauseMoveTime = 0
size.xscale = 1
size.yscale = 1

[state -2,デストロイセルフ];元締めが死んだらヘルパーは消える
type=destroyself
triggerall=ishelper(5000)
trigger1=StateNo!=5000
supermovetime=99999999999
pausemovetime = 9999999999

[State -2, 陣]
type = null;Helper
trigger1 = alive
trigger1 = numhelper(2666662) = 0
stateno = 1111
ID = 2666662
helpertype = normal
name = "jin"
pos = 0,-45
postype = p1
keyctrl = 0
ownpal = 1
ignorehitpause = 1
supermovetime = 0
pausemovetime = 0
size.xscale = 1.1
size.yscale = 1.1

[state -2,デストロイセルフ];元締めが死んだらヘルパーは消える
type=destroyself
triggerall=ishelper(2666662)
trigger1=StateNo!=1111
supermovetime=99999999999
pausemovetime = 9999999999

[State -2, 陣]
type = Helper
trigger1 = alive
trigger1 = numhelper(2666663) = 0
stateno = 1112
ID = 2666663
helpertype = normal
name = "jin1"
pos = 0,-45
postype = p1
keyctrl = 0
ownpal = 1
ignorehitpause = 1
supermovetime = 0
pausemovetime = 0
size.xscale = 1.05;0.1
size.yscale = 1.05;0.75

[state -2,デストロイセルフ];元締めが死んだらヘルパーは消える
type=destroyself
triggerall=ishelper(2666663)
trigger1=StateNo!=1112
supermovetime=99999999999
pausemovetime = 9999999999

[State -2, 陣]
type = Helper
trigger1 = alive
trigger1 = numhelper(2666664) = 0
stateno = 1113
ID = 2666664
helpertype = normal
name = "jin2"
pos = 0,-45
postype = p1
keyctrl = 0
ownpal = 1
ignorehitpause = 1
supermovetime = 0
pausemovetime = 0
size.xscale = 1.3;0.75
size.yscale = 1.3;0.75

[state -2,デストロイセルフ];元締めが死んだらヘルパーは消える
type=destroyself
triggerall=ishelper(2666664)
trigger1=StateNo!=1113
supermovetime=99999999999
pausemovetime = 9999999999

[State -2, 陣]
type = Helper
trigger1 = alive
trigger1 = numhelper(2666665) = 0
stateno = 1114
ID = 2666665
helpertype = normal
name = "jin3"
pos = 0,-45
postype = p1
keyctrl = 0
ownpal = 1
ignorehitpause = 1
supermovetime = 0
pausemovetime = 0
size.xscale = 1.3;0.75
size.yscale = 1.3;0.75

[state -2,デストロイセルフ];元締めが死んだらヘルパーは消える
type=destroyself
triggerall=ishelper(2666665)
trigger1=StateNo!=1114
supermovetime=99999999999
pausemovetime = 9999999999

[State -2, 鬼畜]
type = Helper
trigger1 = roundstate = 2
trigger1 = alive
trigger1 = numhelper(666) = 0
trigger1 = var(1) = 0
stateno = 666
ID = 666
helpertype = normal
name = "shiki"
pos = 0,-100
postype = p1
keyctrl = 0
ownpal = 1
ignorehitpause = 1
supermovetime = 0
pausemovetime = 0
size.xscale = 1
size.yscale = 1

[state -2,デストロイセルフ];元締めが死んだらヘルパーは消える
type=destroyself
triggerall=ishelper(666)
trigger1=StateNo!=666
supermovetime=99999999999
pausemovetime = 9999999999

[State -2, 鬼畜]
type = Helper
trigger1 = roundstate = 2
trigger1 = alive
trigger1 = numhelper(667) = 0
trigger1 = var(1) = 1
stateno = 1666
ID = 667
helpertype = normal
name = "shiki"
pos = 0,-100
postype = p1
keyctrl = 0
ownpal = 1
ignorehitpause = 1
supermovetime = 0
pausemovetime = 0
size.xscale = 1
size.yscale = 1

[state -2,デストロイセルフ];元締めが死んだらヘルパーは消える
type=destroyself
triggerall=ishelper(667)
trigger1=StateNo!=1666
supermovetime=99999999999
pausemovetime = 9999999999

[State -2, 鬼畜]
type = Helper
trigger1 = roundstate = 2
trigger1 = alive
trigger1 = numhelper(11000) = 0
trigger1 = var(1) = 0
stateno = 11000
ID = 11000
helpertype = normal
name = "nanaya2"
pos = 0,-40
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
ignorehitpause = 1
supermovetime = 0
pausemovetime = 0
size.xscale = 1
size.yscale = 1

[state -2,デストロイセルフ];元締めが死んだらヘルパーは消える
type=destroyself
triggerall=ishelper(11000)
trigger1=StateNo!=11000
supermovetime=99999999999
pausemovetime = 9999999999

[State -2, 鬼畜]
type = Helper
trigger1 = roundstate = 2
trigger1 = alive
trigger1 = numhelper(11001) = 0
trigger1 = var(1) = 1
stateno = 12000
ID = 11001
helpertype = normal
name = "nanaya2"
pos = 0,-40
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
ignorehitpause = 1
supermovetime = 0
pausemovetime = 0
size.xscale = 1
size.yscale = 1

[state -2,デストロイセルフ];元締めが死んだらヘルパーは消える
type=destroyself
triggerall=ishelper(11001)
trigger1=StateNo!=12000
supermovetime=99999999999
pausemovetime = 9999999999

[State -2, 鬼畜]
type = Helper
trigger1 = alive
trigger1 = numhelper(1000) = 0
stateno = 1000
ID = 1000
helpertype = normal
name = "jin"
pos = 0,-45
postype = p1
keyctrl = 0
facing = 1
ownpal = 1
ignorehitpause = 1
supermovetime = 0
pausemovetime = 0
size.xscale = 1
size.yscale = 1

[state -2,デストロイセルフ];元締めが死んだらヘルパーは消える
type=destroyself
triggerall=ishelper(1000)
trigger1=StateNo!=1000
supermovetime=99999999999
pausemovetime = 9999999999

[State -1]
Type = Helper
trigger1 = roundstate = 2
trigger1 = alive
trigger1 = numhelper(3960) = 0
Stateno = 3960
ID = 3960
Pos = 0,-45
PosType = P1
Ownpal = 1
Keyctrl = 0
IgnoreHitPause = 1
Persistent = 4
Size.XScale = 1
Size.YScale = 1

[state -2,デストロイセルフ];元締めが死んだらヘルパーは消える
type=destroyself
triggerall=ishelper(3960)
trigger1=StateNo!=3960
supermovetime=99999999999
pausemovetime = 9999999999

[State -2, 鬼畜]
type = Helper
trigger1 = roundstate = 2
trigger1 = alive
trigger1 = numhelper(777) = 0
trigger1 = var(1) = 0
stateno = 666
ID = 777
helpertype = normal
name = "shiki"
pos = 0,50
postype = p1
keyctrl = 0
ownpal = 1
ignorehitpause = 1
supermovetime = 0
pausemovetime = 0
size.xscale = 1
size.yscale = 1

[state -2,デストロイセルフ];元締めが死んだらヘルパーは消える
type=destroyself
triggerall=ishelper(777)
trigger1=StateNo!=666
supermovetime=99999999999
pausemovetime = 9999999999

[State -2, 鬼畜]
type = Helper
trigger1 = roundstate = 2
trigger1 = alive
trigger1 = numhelper(778) = 0
trigger1 = var(1) = 1
stateno = 1666
ID = 778
helpertype = normal
name = "shiki"
pos = 0,50
postype = p1
keyctrl = 0
ownpal = 1
ignorehitpause = 1
supermovetime = 0
pausemovetime = 0
size.xscale = 1
size.yscale = 1

[state -2,デストロイセルフ];元締めが死んだらヘルパーは消える
type=destroyself
triggerall=ishelper(778)
trigger1=StateNo!=1666
supermovetime=99999999999
pausemovetime = 9999999999

[State -2, ナイフ]
Type = Helper
trigger1 = var(50) = 1
trigger1 = roundstate = 2
trigger1 = alive
trigger1 = numhelper(2964) = 0
Stateno = 32964
ID = 2964
Name = "OTAM"
Pos = 0,-65
PosType = P1
Ownpal = 1
Keyctrl = 0
SprPriority = 8
IgnoreHitPause = 1
Persistent = 1
SuperMoveTime = 0
PauseMoveTime = 0
size.xscale = 0.5
size.yscale = 0.5

[State -2, ナイフ]
Type = Helper
trigger1 = Palno >= 7
trigger1 = roundstate = 2
trigger1 = alive
trigger1 = numhelper(2965) = 0
trigger1 = RoundNo > 1
trigger2 = Palno >= 10
trigger2 = roundstate = 2
trigger2 = alive
trigger2 = numhelper(2965) = 0
Stateno = 32964
ID = 2965
Name = "Helper"
Pos = 0,-65
PosType = P2
Ownpal = 1
Keyctrl = 0
SprPriority = 8
IgnoreHitPause = 1
Persistent = 1
SuperMoveTime = 0
PauseMoveTime = 0
size.xscale = 0.5
size.yscale = 0.5

[State -2, 鬼畜]
type = selfstate
trigger1 = 1
trigger1 = var(3) >= 10
value = 2
ctrl = 0

[State -2, 鬼畜]
type = nothitby
trigger1 = stateno = 2
value = SCA,AA,AT,AP

[State -2, 鬼畜]
type = AttackMulSet
trigger1 = roundstate = 2
trigger1 = stateno = 200
value = 2

[State -2, 鬼畜]
type = AttackMulSet
trigger1 = roundstate = 2
trigger1 = stateno = 210
value = 3

[State -2, 鬼畜]
type = AttackMulSet
trigger1 = roundstate = 2
trigger1 = stateno = 220
value = 4

[State -2, 鬼畜]
type = AttackMulSet
trigger1 = roundstate = 2
trigger1 = stateno = 230
value = 5

[State -2, 鬼畜]
type = AttackMulSet
trigger1 = roundstate = 2
trigger1 = stateno = 240
value = 6

[State -2]
Type     = VarAdd
Trigger1 = 1
V        = 34
Value    = 1
IgnoreHitPause = 1
SuperMoveTime = 9999
PauseMoveTime = 9999

[State -2]
Type     = VarSet
Trigger1 = 1
V        = 35
Value    = 90*Cos(Var(34)*0.075)

[State -2]
Type     = VarSet
Trigger1 = 1
V        = 36
Value    = 90*Sin(Var(34)*0.075)

[State -2]
Type     = VarSet
Trigger1 = 1
V        = 30
Value    = 4*Cos(Var(34)*0.2)

[State -2]
Type     = VarSet
Trigger1 = 1
V        = 31
Value    = 4*Sin(Var(34)*0.2)

;変数リセットスイッチ
[state -2]
type = varset
trigger1 = Palno != 6
trigger1 = !ishelper
v = 50
value = 1               ;0 OFF 1 ON
ignorehitpause = 1
pausemovetime = 9999999
supermovetime = 9999999


;変数リセットスイッチ
[state -2]
type = varset
trigger1 = !ishelper
v = 7
value = 1               ;0 OFF 1 ON
ignorehitpause = 1
pausemovetime = 9999999
supermovetime = 9999999

;---------------------------------------------------------------------------
; 常時監視ステート（いつでも実行する）
;---------------------------------------------------------------------------
[statedef -3]

[State -3]
type = AssertSpecial
TriggerAll = PalNo = 10
Trigger1 = !Win && !Lose && !DrawGame
Trigger2 = P2Life != 0
flag = noko
ignorehitpause = 1
SuperMoveTime = -1
PauseMoveTime = -1

[State -3]
Type = LifeSet
TriggerAll = PalNo = 10
Trigger1 = RoundState >= 3
Trigger2 = Win || Lose || DrawGame
Value = LifeMax
ignorehitpause = 1
SuperMoveTime = -1
PauseMoveTime = -1

[State -3]
Type = null;LifeSet
TriggerAll = PalNo = 12
Trigger1 = RoundState >= 3
Trigger2 = Win || Lose || DrawGame
Value = LifeMax
ignorehitpause = 1
SuperMoveTime = -1
PauseMoveTime = -1

[State -3]
Type = LifeSet
TriggerAll = PalNo = 10
Trigger1 = !Win && !Lose && !DrawGame
Value = 0
ignorehitpause = 1
SuperMoveTime = -1
PauseMoveTime = -1

[State -3];gametime計測
type = varset 
trigger1 = 1
v = 10
value = gametime 
ignorehitpause = 1
superMoveTime = 999999999
pauseMoveTime = 999999999

[State -3, stopsnd]
type = Helper
trigger1 = alive
trigger1 = numhelper(37564) = 0;へるぱがないときに
name = "Playsnd"          ;ヘルパーの名前
stateno = 37564       ;ヘルパーが最初に行くステート
ID = 37564            ;ヘルパーのＩＤナンバー
helpertype = normal  ;ヘルパーの属性：画面スクロールの影響を受けるか否かを決める
pos = 0,0      ;ヘルパーの出現位置
postype = p1         ;ヘルパーの最初に出る軸位置の属性（Explodのpostypeと書き方は同じだが効果が少し違う）
facing = 1
supermovetime = 99999999
pausemovetime = 99999999
keyctrl = 0          ;ヘルパーがコントロール可能かどうか（0=操作不可・1=操作可能）
ownpal = 1           ;ヘルパーが(PalFXなどで)本体の色が変わった時に一緒に変わるかどうか（Explodのownpalと一緒）

[State -3, ヘルパーを出す]
type = Helper
trigger1 = alive
trigger1 = !ishelper
trigger1 = numhelper(1666661) = 0
stateno = 0
ID = 1666661
helpertype = player
name = "HONTAI"
pos = 0,0
postype = p1
keyctrl = 0
ownpal = 1
ignorehitpause = 1
supermovetime = 0
pausemovetime = 0
sprpriority = 3
size.xscale = 1
size.yscale = 1

[state -2,デストロイセルフ];元締めが死んだらヘルパーは消える
type=destroyself
TriggerAll = PalNo >= 11
triggerall=ishelper(1666661)
trigger1=StateNo!=[0,240];trigger1=StateNo!=[200,240]
;trigger2=StateNo!=[0,3]
;trigger3=StateNo!=[170,191]
supermovetime=99999999999
pausemovetime = 9999999999

[State -3, ヘルパー消える]
type = destroyself
trigger1 = root,alive = 0
trigger1 = ishelper
;trigger2 = !ishelper(1666661)

[State -3, 2]
type = nothitby
trigger1 = ishelper
value = SCA,AA,AT,AP

[State -3, 2]
type = ctrlset
trigger1 = roundstate = 2
value = 0
ignorehitpause = 1

[State -3,ガンダム最大パワー]
type = helper
trigger1 = Palno >= 7
trigger1 = numhelper(20000) = 0
trigger1 = alive
stateno = 20000
ID = 20000
helpertype = normal
name = "VGUN"
pos = 0, 50
postype = P1
facing = 1
supermovetime = 210000000
pausemovetime = 210000000
scale = 2, 2
sprpriority = 2
ownpal = 1

[State -3,背景を変えざるを得ない];符の一宣言
type = Explod
trigger1 = var(59) = 1
trigger1 = numexplod(15) = 0
trigger1 = roundno > 1
trigger1 = alive
anim = 15
ID = 15
pos = 0, 0
postype = back
facing = 1
vfacing = 1
bindtime = -1
vel = 0, 0
accel = 0, 0
random = 0, 0
removetime = -1
supermovetime = 210000000
pausemovetime = 210000000
scale = 1.01,1.01
sprpriority = -5
ontop = 0
shadow = 0, 0, 0
ownpal = 1
removeongethit = 0


[State -3, 鬼畜]
type = Helper
trigger1 = root,Palno = 11
trigger1 = (enemynear,name!="ONI-MIKO-REIMU")
trigger1 = alive
trigger1 = numhelper(10235) = 0
stateno = 10235
ID = 10235
name = "ONIMIKOREIMU"
pos = 0,-50
postype = p1
keyctrl = 0
facing = 1
ownpal = 0
ignorehitpause = 1
supermovetime = 999999
pausemovetime = 999999
size.xscale = 1
size.yscale = 1

[State -3, 2]
type = ctrlset
trigger1 = roundstate = 3
trigger1 = alive
value = 1
ignorehitpause = 1

[State -3, 2];振り向きの巻
type = turn
trigger1 = P2bodydist X <= -20

[State -3, 2]
type = assertspecial
trigger1 = 1
flag = nostandguard
flag2 = nocrouchguard
flag3 = noairguard

[State -3, 2]
type = playerpush
trigger1 = 1
value = 0

[State -3, 4] ;Are you dead?
type = ChangeState
trigger1 = !alive
trigger1 = !ishelper
trigger1 = stateno != 5150
value = 5150
persistent = 0

[State -3, 2];アーマー
type = HitOverride
Trigger1 = root,PalNo != 6
trigger1 = ishelper(1666661);1
attr = SCA,AA,AT,AP
slot = 1
stateno = 1
time = 100

[State -3, 2];アーマー
type = null;HitOverride
Trigger1 = root,PalNo = 6
trigger1 = 1
attr = SCA,AA,AT,AP
slot = 1
stateno = 1
time = 100

[State -3, 2];アーマー
type = HitOverride
Trigger1 = root,PalNo != 6
trigger1 = ishelper(1666661);1
attr = SCA,AA,AT,AP
slot = 2
stateno = 1
time = 100

[State -3, 2];アーマー
type = null;HitOverride
Trigger1 = root,PalNo = 6
trigger1 = 1
attr = SCA,AA,AT,AP
slot = 2
stateno = 1
time = 100

[State -3, 2];luna
type = varset
trigger1 = Palno != 6
v = 2
value = 1

;---config---
;コンフィグ

[State -3, 2];れいむとまりさのグラ変更 １だと七夜になります
type = VarSet
trigger1 = 1
v = 1
value = 1
