;***************************************************************************
;===========================================================================
;---------------------------------------------------------------------------
[Statedef -2]; 常時監視ステート
;---------------------------------------------------------------------------
;===========================================================================
;***************************************************************************
[State -2]
type = poweradd
trigger1 = (GameTime%10) = 0
trigger1 = 1
ignorehitpause = 0
value = 5

[State -2, 音を鳴らす]
type = PlaySnd
TriggerAll=var(25) != 1
triggerall = (!ishelper)
trigger1 = 1;←　1=BGM流す、0=流さない
value = 20002, 0
channel = 6
lowpriority = 6
volume = 255
loop = 1

[State -2]
type = assertspecial
triggerall = palno = 12
trigger1 = var(36) = 1
flag = NoMusic
ignorehitpause = 1
supermovetime = 99999999999999999999
pausemovetime = 99999999999999999999


;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;Config
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------

;12P AI ON-OFF
[State 1]
type = varset
trigger1 = !ishelper && palno = 12
value = 1
v = 30
trigger1 = 0          ;1on 0off
ignorehitpause = 1

;12P 変数リセットスイッチ。
;ONにすると不具合が出る可能性があります
;ONにしても強さ的にはさほどかわりません
[State 1]
type = varset
trigger1 = palno = 12
fv = 37
value = 0        ;1on 0off

;12P 「光を降らす」にヘルパー当身改(トムスイッチ)付加
;ほぼすべてのヘルパーに対応していますが完璧ではありません。バグが出る場合はOFFにしてください
[State 1]
type = varset
trigger1 = !ishelper
trigger1 = palno = 12
fv = 38
value = 1        ;1〜2on 0off

;value = 1       タイプA  バグは少なめだが殺傷力は比較的低い
;value = 2       タイプB  タイプAよりバグは多いが殺傷力は高め

;12P パッチ有効スイッチ
;ONにすると即死耐性、Playerヘルパーに惑わされないなどの性能が追加されます
;元の宇宙意思を楽しみたいという方はOFFにしてください
[state ]
type = varset
trigger1 = !ishelper
trigger1 = palno = 12
v = 33
value = 1      ;1on 0off

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

;再現P2BodyDist
[state ]
type=null
triggerall=var(33)
trigger1=fvar(1):=0||1
trigger1=fvar(2):=(!enemynear,alive&&numenemy=2)||1
trigger1=statetype!=a&&enemynear(ceil(fvar(2))),statetype!=a&&(pos x<enemynear(ceil(fvar(2))),pos x&&enemynear(ceil(fvar(2))),facing=-1||enemynear(ceil(fvar(2))),pos x<pos x&&enemynear(ceil(fvar(2))),facing=1)&&facing=1
trigger2=statetype!=a&&enemynear(ceil(fvar(2))),statetype!=a&&(pos x<enemynear(ceil(fvar(2))),pos x&&enemynear(ceil(fvar(2))),facing=-1||enemynear(ceil(fvar(2))),pos x<pos x&&enemynear(ceil(fvar(2))),facing=1)
trigger3=statetype!=a&&enemynear(ceil(fvar(2))),statetype!=a&&(pos x<enemynear(ceil(fvar(2))),pos x&&enemynear(ceil(fvar(2))),facing!=-1||enemynear(ceil(fvar(2))),pos x<pos x&&enemynear(ceil(fvar(2))),facing!=1)&&facing=1
trigger4=statetype!=a&&enemynear(ceil(fvar(2))),statetype!=a&&(pos x<enemynear(ceil(fvar(2))),pos x&&enemynear(ceil(fvar(2))),facing!=-1||enemynear(ceil(fvar(2))),pos x<pos x&&enemynear(ceil(fvar(2))),facing!=1)
trigger5=statetype=a&&enemynear(ceil(fvar(2))),statetype!=a&&(pos x<enemynear(ceil(fvar(2))),pos x&&enemynear(ceil(fvar(2))),facing=-1||enemynear(ceil(fvar(2))),pos x<pos x&&enemynear(ceil(fvar(2))),facing=1)&&facing=1
trigger6=statetype=a&&enemynear(ceil(fvar(2))),statetype!=a&&(pos x<enemynear(ceil(fvar(2))),pos x&&enemynear(ceil(fvar(2))),facing=-1||enemynear(ceil(fvar(2))),pos x<pos x&&enemynear(ceil(fvar(2))),facing=1)
trigger7=statetype=a&&enemynear(ceil(fvar(2))),statetype!=a&&(pos x<enemynear(ceil(fvar(2))),pos x&&enemynear(ceil(fvar(2))),facing!=-1||enemynear(ceil(fvar(2))),pos x<pos x&&enemynear(ceil(fvar(2))),facing!=1)&&facing=1
trigger8=statetype=a&&enemynear(ceil(fvar(2))),statetype!=a&&(pos x<enemynear(ceil(fvar(2))),pos x&&enemynear(ceil(fvar(2))),facing!=-1||enemynear(ceil(fvar(2))),pos x<pos x&&enemynear(ceil(fvar(2))),facing!=1)
trigger9=statetype!=a&&enemynear(ceil(fvar(2))),statetype=a&&(pos x<enemynear(ceil(fvar(2))),pos x&&enemynear(ceil(fvar(2))),facing=-1||enemynear(ceil(fvar(2))),pos x<pos x&&enemynear(ceil(fvar(2))),facing=1)&&facing=1
trigger10=statetype!=a&&enemynear(ceil(fvar(2))),statetype=a&&(pos x<enemynear(ceil(fvar(2))),pos x&&enemynear(ceil(fvar(2))),facing=-1||enemynear(ceil(fvar(2))),pos x<pos x&&enemynear(ceil(fvar(2))),facing=1)
trigger11=statetype!=a&&enemynear(ceil(fvar(2))),statetype=a&&(pos x<enemynear(ceil(fvar(2))),pos x&&enemynear(ceil(fvar(2))),facing!=-1||enemynear(ceil(fvar(2))),pos x<pos x&&enemynear(ceil(fvar(2))),facing!=1)&&facing=1
trigger12=statetype!=a&&enemynear(ceil(fvar(2))),statetype=a&&(pos x<enemynear(ceil(fvar(2))),pos x&&enemynear(ceil(fvar(2))),facing!=-1||enemynear(ceil(fvar(2))),pos x<pos x&&enemynear(ceil(fvar(2))),facing!=1)
trigger13=statetype=a&&enemynear(ceil(fvar(2))),statetype=a&&(pos x<enemynear(ceil(fvar(2))),pos x&&enemynear(ceil(fvar(2))),facing=-1||enemynear(ceil(fvar(2))),pos x<pos x&&enemynear(ceil(fvar(2))),facing=1)&&facing=1
trigger14=statetype=a&&enemynear(ceil(fvar(2))),statetype=a&&(pos x<enemynear(ceil(fvar(2))),pos x&&enemynear(ceil(fvar(2))),facing=-1||enemynear(ceil(fvar(2))),pos x<pos x&&enemynear(ceil(fvar(2))),facing=1)
trigger15=statetype=a&&enemynear(ceil(fvar(2))),statetype=a&&(pos x<enemynear(ceil(fvar(2))),pos x&&enemynear(ceil(fvar(2))),facing!=-1||enemynear(ceil(fvar(2))),pos x<pos x&&enemynear(ceil(fvar(2))),facing!=1)&&facing=1
trigger16=statetype=a&&enemynear(ceil(fvar(2))),statetype=a&&(pos x<enemynear(ceil(fvar(2))),pos x&&enemynear(ceil(fvar(2))),facing!=-1||enemynear(ceil(fvar(2))),pos x<pos x&&enemynear(ceil(fvar(2))),facing!=1)
trigger1=fvar(1):=ifelse(pos x<enemynear(ceil(fvar(2))),pos x,-1,1)*enemynear(ceil(fvar(2))),const(size.ground.front)+enemynear(ceil(fvar(2))),pos x-(pos x+const(size.ground.front))||1
trigger2=fvar(1):=pos x-const(size.ground.front)-(ifelse(pos x<enemynear(ceil(fvar(2))),pos x,-1,1)*enemynear(ceil(fvar(2))),const(size.ground.front)+enemynear(ceil(fvar(2))),pos x)||1
trigger3=fvar(1):=ifelse(pos x<enemynear(ceil(fvar(2))),pos x,-1,1)*enemynear(ceil(fvar(2))),const(size.ground.back)+enemynear(ceil(fvar(2))),pos x-(pos x+const(size.ground.front))||1
trigger4=fvar(1):=pos x-const(size.ground.front)-(ifelse(pos x<enemynear(ceil(fvar(2))),pos x,-1,1)*enemynear(ceil(fvar(2))),const(size.ground.back)+enemynear(ceil(fvar(2))),pos x)||1
trigger5=fvar(1):=ifelse(pos x<enemynear(ceil(fvar(2))),pos x,-1,1)*enemynear(ceil(fvar(2))),const(size.ground.front)+enemynear(ceil(fvar(2))),pos x-(pos x+const(size.air.front))||1
trigger6=fvar(1):=pos x-const(size.air.front)-(ifelse(pos x<enemynear(ceil(fvar(2))),pos x,-1,1)*enemynear(ceil(fvar(2))),const(size.ground.front)+enemynear(ceil(fvar(2))),pos x)||1
trigger7=fvar(1):=ifelse(pos x<enemynear(ceil(fvar(2))),pos x,-1,1)*enemynear(ceil(fvar(2))),const(size.ground.back)+enemynear(ceil(fvar(2))),pos x-(pos x+const(size.air.front))||1
trigger8=fvar(1):=pos x-const(size.air.front)-(ifelse(pos x<enemynear(ceil(fvar(2))),pos x,-1,1)*enemynear(ceil(fvar(2))),const(size.ground.back)+enemynear(ceil(fvar(2))),pos x)||1
trigger9=fvar(1):=ifelse(pos x<enemynear(ceil(fvar(2))),pos x,-1,1)*enemynear(ceil(fvar(2))),const(size.air.front)+enemynear(ceil(fvar(2))),pos x-(pos x+const(size.ground.front))||1
trigger10=fvar(1):=pos x-const(size.ground.front)-(ifelse(pos x<enemynear(ceil(fvar(2))),pos x,-1,1)*enemynear(ceil(fvar(2))),const(size.air.front)+enemynear(ceil(fvar(2))),pos x)||1
trigger11=fvar(1):=ifelse(pos x<enemynear(ceil(fvar(2))),pos x,-1,1)*enemynear(ceil(fvar(2))),const(size.air.back)+enemynear(ceil(fvar(2))),pos x-(pos x+const(size.ground.front))||1
trigger12=fvar(1):=pos x-const(size.ground.front)-(ifelse(pos x<enemynear(ceil(fvar(2))),pos x,-1,1)*enemynear(ceil(fvar(2))),const(size.air.back)+enemynear(ceil(fvar(2))),pos x)||1
trigger13=fvar(1):=ifelse(pos x<enemynear(ceil(fvar(2))),pos x,-1,1)*enemynear(ceil(fvar(2))),const(size.air.front)+enemynear(ceil(fvar(2))),pos x-(pos x+const(size.air.front))||1
trigger14=fvar(1):=pos x-const(size.air.front)-(ifelse(pos x<enemynear(ceil(fvar(2))),pos x,-1,1)*enemynear(ceil(fvar(2))),const(size.air.front)+enemynear(ceil(fvar(2))),pos x)||1
trigger15=fvar(1):=ifelse(pos x<enemynear(ceil(fvar(2))),pos x,-1,1)*enemynear(ceil(fvar(2))),const(size.air.back)+enemynear(ceil(fvar(2))),pos x-(pos x+const(size.air.front))||1
trigger16=fvar(1):=pos x-const(size.air.front)-(ifelse(pos x<enemynear(ceil(fvar(2))),pos x,-1,1)*enemynear(ceil(fvar(2))),const(size.air.back)+enemynear(ceil(fvar(2))),pos x)||1

[state ]
type=null
triggerall=ishelper
trigger1=fvar(1):=0||1
trigger1=fvar(2):=(!enemynear,alive&&numenemy=2)||1
trigger1=statetype!=a&&enemynear(ceil(fvar(2))),statetype!=a&&(pos x<enemynear(ceil(fvar(2))),pos x&&enemynear(ceil(fvar(2))),facing=-1||enemynear(ceil(fvar(2))),pos x<pos x&&enemynear(ceil(fvar(2))),facing=1)&&facing=1
trigger2=statetype!=a&&enemynear(ceil(fvar(2))),statetype!=a&&(pos x<enemynear(ceil(fvar(2))),pos x&&enemynear(ceil(fvar(2))),facing=-1||enemynear(ceil(fvar(2))),pos x<pos x&&enemynear(ceil(fvar(2))),facing=1)
trigger3=statetype!=a&&enemynear(ceil(fvar(2))),statetype!=a&&(pos x<enemynear(ceil(fvar(2))),pos x&&enemynear(ceil(fvar(2))),facing!=-1||enemynear(ceil(fvar(2))),pos x<pos x&&enemynear(ceil(fvar(2))),facing!=1)&&facing=1
trigger4=statetype!=a&&enemynear(ceil(fvar(2))),statetype!=a&&(pos x<enemynear(ceil(fvar(2))),pos x&&enemynear(ceil(fvar(2))),facing!=-1||enemynear(ceil(fvar(2))),pos x<pos x&&enemynear(ceil(fvar(2))),facing!=1)
trigger5=statetype=a&&enemynear(ceil(fvar(2))),statetype!=a&&(pos x<enemynear(ceil(fvar(2))),pos x&&enemynear(ceil(fvar(2))),facing=-1||enemynear(ceil(fvar(2))),pos x<pos x&&enemynear(ceil(fvar(2))),facing=1)&&facing=1
trigger6=statetype=a&&enemynear(ceil(fvar(2))),statetype!=a&&(pos x<enemynear(ceil(fvar(2))),pos x&&enemynear(ceil(fvar(2))),facing=-1||enemynear(ceil(fvar(2))),pos x<pos x&&enemynear(ceil(fvar(2))),facing=1)
trigger7=statetype=a&&enemynear(ceil(fvar(2))),statetype!=a&&(pos x<enemynear(ceil(fvar(2))),pos x&&enemynear(ceil(fvar(2))),facing!=-1||enemynear(ceil(fvar(2))),pos x<pos x&&enemynear(ceil(fvar(2))),facing!=1)&&facing=1
trigger8=statetype=a&&enemynear(ceil(fvar(2))),statetype!=a&&(pos x<enemynear(ceil(fvar(2))),pos x&&enemynear(ceil(fvar(2))),facing!=-1||enemynear(ceil(fvar(2))),pos x<pos x&&enemynear(ceil(fvar(2))),facing!=1)
trigger9=statetype!=a&&enemynear(ceil(fvar(2))),statetype=a&&(pos x<enemynear(ceil(fvar(2))),pos x&&enemynear(ceil(fvar(2))),facing=-1||enemynear(ceil(fvar(2))),pos x<pos x&&enemynear(ceil(fvar(2))),facing=1)&&facing=1
trigger10=statetype!=a&&enemynear(ceil(fvar(2))),statetype=a&&(pos x<enemynear(ceil(fvar(2))),pos x&&enemynear(ceil(fvar(2))),facing=-1||enemynear(ceil(fvar(2))),pos x<pos x&&enemynear(ceil(fvar(2))),facing=1)
trigger11=statetype!=a&&enemynear(ceil(fvar(2))),statetype=a&&(pos x<enemynear(ceil(fvar(2))),pos x&&enemynear(ceil(fvar(2))),facing!=-1||enemynear(ceil(fvar(2))),pos x<pos x&&enemynear(ceil(fvar(2))),facing!=1)&&facing=1
trigger12=statetype!=a&&enemynear(ceil(fvar(2))),statetype=a&&(pos x<enemynear(ceil(fvar(2))),pos x&&enemynear(ceil(fvar(2))),facing!=-1||enemynear(ceil(fvar(2))),pos x<pos x&&enemynear(ceil(fvar(2))),facing!=1)
trigger13=statetype=a&&enemynear(ceil(fvar(2))),statetype=a&&(pos x<enemynear(ceil(fvar(2))),pos x&&enemynear(ceil(fvar(2))),facing=-1||enemynear(ceil(fvar(2))),pos x<pos x&&enemynear(ceil(fvar(2))),facing=1)&&facing=1
trigger14=statetype=a&&enemynear(ceil(fvar(2))),statetype=a&&(pos x<enemynear(ceil(fvar(2))),pos x&&enemynear(ceil(fvar(2))),facing=-1||enemynear(ceil(fvar(2))),pos x<pos x&&enemynear(ceil(fvar(2))),facing=1)
trigger15=statetype=a&&enemynear(ceil(fvar(2))),statetype=a&&(pos x<enemynear(ceil(fvar(2))),pos x&&enemynear(ceil(fvar(2))),facing!=-1||enemynear(ceil(fvar(2))),pos x<pos x&&enemynear(ceil(fvar(2))),facing!=1)&&facing=1
trigger16=statetype=a&&enemynear(ceil(fvar(2))),statetype=a&&(pos x<enemynear(ceil(fvar(2))),pos x&&enemynear(ceil(fvar(2))),facing!=-1||enemynear(ceil(fvar(2))),pos x<pos x&&enemynear(ceil(fvar(2))),facing!=1)
trigger1=fvar(1):=ifelse(pos x<enemynear(ceil(fvar(2))),pos x,-1,1)*enemynear(ceil(fvar(2))),const(size.ground.front)+enemynear(ceil(fvar(2))),pos x-(pos x+const(size.ground.front))||1
trigger2=fvar(1):=pos x-const(size.ground.front)-(ifelse(pos x<enemynear(ceil(fvar(2))),pos x,-1,1)*enemynear(ceil(fvar(2))),const(size.ground.front)+enemynear(ceil(fvar(2))),pos x)||1
trigger3=fvar(1):=ifelse(pos x<enemynear(ceil(fvar(2))),pos x,-1,1)*enemynear(ceil(fvar(2))),const(size.ground.back)+enemynear(ceil(fvar(2))),pos x-(pos x+const(size.ground.front))||1
trigger4=fvar(1):=pos x-const(size.ground.front)-(ifelse(pos x<enemynear(ceil(fvar(2))),pos x,-1,1)*enemynear(ceil(fvar(2))),const(size.ground.back)+enemynear(ceil(fvar(2))),pos x)||1
trigger5=fvar(1):=ifelse(pos x<enemynear(ceil(fvar(2))),pos x,-1,1)*enemynear(ceil(fvar(2))),const(size.ground.front)+enemynear(ceil(fvar(2))),pos x-(pos x+const(size.air.front))||1
trigger6=fvar(1):=pos x-const(size.air.front)-(ifelse(pos x<enemynear(ceil(fvar(2))),pos x,-1,1)*enemynear(ceil(fvar(2))),const(size.ground.front)+enemynear(ceil(fvar(2))),pos x)||1
trigger7=fvar(1):=ifelse(pos x<enemynear(ceil(fvar(2))),pos x,-1,1)*enemynear(ceil(fvar(2))),const(size.ground.back)+enemynear(ceil(fvar(2))),pos x-(pos x+const(size.air.front))||1
trigger8=fvar(1):=pos x-const(size.air.front)-(ifelse(pos x<enemynear(ceil(fvar(2))),pos x,-1,1)*enemynear(ceil(fvar(2))),const(size.ground.back)+enemynear(ceil(fvar(2))),pos x)||1
trigger9=fvar(1):=ifelse(pos x<enemynear(ceil(fvar(2))),pos x,-1,1)*enemynear(ceil(fvar(2))),const(size.air.front)+enemynear(ceil(fvar(2))),pos x-(pos x+const(size.ground.front))||1
trigger10=fvar(1):=pos x-const(size.ground.front)-(ifelse(pos x<enemynear(ceil(fvar(2))),pos x,-1,1)*enemynear(ceil(fvar(2))),const(size.air.front)+enemynear(ceil(fvar(2))),pos x)||1
trigger11=fvar(1):=ifelse(pos x<enemynear(ceil(fvar(2))),pos x,-1,1)*enemynear(ceil(fvar(2))),const(size.air.back)+enemynear(ceil(fvar(2))),pos x-(pos x+const(size.ground.front))||1
trigger12=fvar(1):=pos x-const(size.ground.front)-(ifelse(pos x<enemynear(ceil(fvar(2))),pos x,-1,1)*enemynear(ceil(fvar(2))),const(size.air.back)+enemynear(ceil(fvar(2))),pos x)||1
trigger13=fvar(1):=ifelse(pos x<enemynear(ceil(fvar(2))),pos x,-1,1)*enemynear(ceil(fvar(2))),const(size.air.front)+enemynear(ceil(fvar(2))),pos x-(pos x+const(size.air.front))||1
trigger14=fvar(1):=pos x-const(size.air.front)-(ifelse(pos x<enemynear(ceil(fvar(2))),pos x,-1,1)*enemynear(ceil(fvar(2))),const(size.air.front)+enemynear(ceil(fvar(2))),pos x)||1
trigger15=fvar(1):=ifelse(pos x<enemynear(ceil(fvar(2))),pos x,-1,1)*enemynear(ceil(fvar(2))),const(size.air.back)+enemynear(ceil(fvar(2))),pos x-(pos x+const(size.air.front))||1
trigger16=fvar(1):=pos x-const(size.air.front)-(ifelse(pos x<enemynear(ceil(fvar(2))),pos x,-1,1)*enemynear(ceil(fvar(2))),const(size.air.back)+enemynear(ceil(fvar(2))),pos x)||1

[state ]
type=null
triggerall=var(33)
trigger1=fvar(7):=0||1
trigger1=pos x<enemynear(ceil(fvar(2))),pos x&&facing=1||enemynear(ceil(fvar(2))),pos x<pos x&&facing=1
trigger2=pos x<enemynear(ceil(fvar(2))),pos x&&facing=-1||enemynear(ceil(fvar(2))),pos x<pos x&&facing=-1
trigger1=fvar(7):=enemy,pos x-pos x
trigger2=fvar(7):=pos x-enemy,pos x

[state ]
type=null
triggerall=var(33)
trigger1=fvar(7):=0||1
trigger1=pos x<enemynear(ceil(fvar(2))),pos x&&facing=1||enemynear(ceil(fvar(2))),pos x<pos x&&facing=1
trigger2=pos x<enemynear(ceil(fvar(2))),pos x&&facing=-1||enemynear(ceil(fvar(2))),pos x<pos x&&facing=-1
trigger1=fvar(7):=enemy,pos x-pos x
trigger2=fvar(7):=pos x-enemy,pos x

[state ]
type=varset
trigger1=var(33)
trigger1=palno!=12
var(33)=0

[state ]
type=varset
trigger1=var(33)
trigger2=ishelper
fvar(3)=enemynear(ceil(fvar(2))),pos y-pos y

[state ]
type=displaytoclipboard
trigger1=!ishelper
text ="P2Bodydist%d,E=%d,%d,p2dist=%d,p2dist=%d"
params=ceil(fvar(1)),ceil(fvar(2)),ceil(fvar(3)),ceil(fvar(7)),ceil(p2dist x)

[state ]
type=displaytoclipboard
trigger1=ishelper
text ="stateno=%d,Time=%d,dist x=%d,dist y=%d,E=%d"
params=var(31),var(32),ceil(fvar(1)),ceil(fvar(3)),ceil(fvar(2))

[state ]
type=screenbound
trigger1=ishelper
value=0
ignorehitpause=1

[state ]
type=null
triggerall=ishelper
triggerall=!var(31)
trigger1=var(31):=288888*ishelper(288888)
trigger2=var(31):=1065*ishelper(1050)+11100*ishelper(11100)+11122*ishelper(11122)
trigger3=var(31):=ifelse(root,stateno=11500,11502,11599)*ishelper(11500)+11130*ishelper(11601)+11131*ishelper(11602)
trigger4=var(31):=11502*(ishelper(11500)||ishelper(11501))+11508*ishelper(11502)+11509*ishelper(11509)
trigger5=var(31):=1412*ishelper(1400)+22121*ishelper(22121)+2320*ishelper(2320)
trigger6=var(31):=2401*ishelper(2401)+22220*ishelper(2100)+22221*ishelper(2101)+22229*ishelper(2102)
trigger7=var(31):=22101*ishelper(22101)

[state ]
type=selfstate
trigger1=ishelper
trigger1=var(31)
value=var(31)

[state ]
type=assertspecial
trigger1=var(33)
flag=noautoturn

;============================================================================

[state -2, a];右向き設定
type = varset
trigger1 = var(10) = 0
trigger1 = facing = 1
v = 10
value = 1

[state -2, a];左向き設定
type = varset
trigger1 = var(10) = 0
trigger1 = facing = -1
v = 10
value = 2

[State -2, 1]
type = stopSnd
trigger1 = stateno != 100
channel = 1

[state a]
type = removeexplod
trigger1 = movetype = H
id = 2200


[state a]
type = stopsnd
trigger1 = movetype = H
channel = 3

[state a]
type = stopsnd
trigger1 = stateno != 1055
channel = 5

[State -2, 3]
type = stopSnd
trigger1 = MoveType = H
channel = 2

[State -2, 4]
type = varadd
trigger1 = 1
v = 15
value = -1

[state a]
type = varset
trigger1 = movetype = H
v = 13
value = 0

[State 180, 1]
type = VarRandom
trigger1 = 1
v = 6
range = 0,2

[state -2, a]
type = varset
trigger1 = palno = 1
trigger2 = palno = 2
trigger3 = palno = 3
trigger4 = palno = 4
trigger5 = palno = 5
trigger6 = palno = 6
v = 1
value = 0

[state -2, a]
type = varset
trigger1 = palno = 7
trigger2 = palno = 8
trigger3 = palno = 9
trigger4 = palno = 10
trigger5 = palno = 11
trigger6 = palno = 12
v = 1
value = 1

[state -2, a]
type = varadd
trigger1 = 1
persistent = 0
ignorehitpause = 1
v = 4
value = -1

[state -2, a]
type = pause
trigger1 = var(4) >= 1
trigger1 = gametime % 2
persistent = 0
ignorehitpause = 1
time = 1

[state a];
type = removeexplod
trigger1 = MoveType = H
id = 185

[State 1]
type = removeexplod
trigger1 = MoveType = H
ID = 1470

[State -2 ,a]
type = removeexplod
trigger1 = MoveType = H
ID = 4000

[state -2 ,a]
type = removeexplod
trigger1 = MoveType = H
id = 4200

[state a]
type = removeexplod
trigger1 = MoveType = H
id = 1655

[state a]
type = removeexplod
trigger1 = MoveType = H
id = 1860

[state a]
type = stopsnd
trigger1 = MoveType = H
channel = 1

;***************************************************************************
;===========================================================================
;特殊
;===========================================================================
;***************************************************************************

[State a]
type = Explod
triggerall = anim = 0
triggerall = time >= 15
trigger1 = (GameTime%8) = 1
anim = 22131
sprpriority = 10
postype = p1
pos = var(50),var(51)
bindtime = 1
under = 0
ownpal = 1
persistent = 1
ignorehitpause = 1
vel = 0,-3
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State -1]
type = Explod
triggerall = !ishelper
triggerall = anim = 0
triggerall = time >= 1
trigger1 = numexplod(10017) = 0
anim = 10017
id = 10017
sprpriority = 0
postype = p1
pos = -4,-35
bindtime = -1
under = 0
ownpal = 1
Trans = add
scale = 0.7,0.7
removetime = -1
ignorehitpause = 1
[State 0]
type = RemoveExplod
triggerall = !ishelper
trigger1 = anim != 0
ID = 10017
ignorehitpause = 1

[State -1]
type = Explod
triggerall = !ishelper
triggerall = anim = 0
triggerall = time >= 1
trigger1 = numexplod(10016) = 0
anim = 10016
id = 10016
sprpriority = 0
postype = p1
pos = -4,-30
bindtime = -1
under = 0
ownpal = 1
Trans = sub
scale = 0.73,0.73
removetime = -1
ignorehitpause = 1
[State 0]
type = RemoveExplod
triggerall = !ishelper
trigger1 = anim != 0
ID = 10016
ignorehitpause = 1

[State -1]
type = Explod
triggerall = !ishelper
triggerall = anim = 0
triggerall = time >= 1
trigger1 = numexplod(10020) = 0
anim = 10019
id = 10020
sprpriority = 0
postype = p1
pos = -5,-90
bindtime = -1
under = 0
ownpal = 1
Trans = add
scale = 0.4,0.4
removetime = -1
ignorehitpause = 1
[State 0]
type = RemoveExplod
triggerall = !ishelper
trigger1 = anim != 0
ID = 10020
ignorehitpause = 1


[State -1]
type = Explod
triggerall = !ishelper
triggerall = anim = 0
triggerall = time >= 1
trigger1 = numexplod(10019) = 0
anim = 10019
id = 10019
sprpriority = 0
postype = p1
pos = -5,-90
bindtime = -1
under = 0
ownpal = 1
Trans = sub
scale = 0.41,0.41
removetime = -1
ignorehitpause = 1
[State 0]
type = RemoveExplod
triggerall = !ishelper
trigger1 = anim != 0
ID = 10019
ignorehitpause = 1

[State -1]
type = Explod
triggerall = !ishelper
triggerall = anim = 0
triggerall = time >= 1
trigger1 = numexplod(10018) = 0
anim = 10018
id = 10018
sprpriority = 0
postype = p1
pos = -5,-90
bindtime = -1
under = 0
ownpal = 1
Trans = add
scale = 0.7,0.7
removetime = -1
ignorehitpause = 1
[State 0]
type = RemoveExplod
triggerall = !ishelper
trigger1 = anim != 0
ID = 10018
ignorehitpause = 1

[State -1]
type = Explod
triggerall = !ishelper
triggerall = anim = 0
triggerall = time >= 1
trigger1 = numexplod(13334) = 0
anim = 28000
id = 13334
sprpriority = 0
postype = p1
pos = -5,0
bindtime = -1
under = 0
ownpal = 1
Trans = sub
scale = 0.6,0.14
removetime = -1
ignorehitpause = 1
[State 0]
type = RemoveExplod
triggerall = !ishelper
trigger1 = anim != 0
ID = 13334
ignorehitpause = 1

[State -1]
type = Explod
triggerall = !ishelper
triggerall = anim = 0
triggerall = time >= 1
trigger1 = numexplod(13333) = 0
anim = 28000
id = 13333
sprpriority = 0
postype = p1
pos = -5,0
bindtime = -1
under = 0
ownpal = 1
Trans = add
scale = 1.0,0.2
removetime = -1
ignorehitpause = 1
[State 0]
type = RemoveExplod
triggerall = !ishelper
trigger1 = anim != 0
ID = 13333
ignorehitpause = 1

[State -1]
type = Explod
triggerall = anim = 0
triggerall = time >= 15
trigger1 = (GameTime%20) = 1
anim = 22123
id = 22123
sprpriority = 99
postype = p1
pos = 0,-85
bindtime = -1 
under = 0
ownpal = 1
persistent = 0
ignorehitpause = 0
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State -1]
type = Explod
triggerall = anim = 0
triggerall = time >= 15
trigger1 = (GameTime%35) = 1
anim = 22123
id = 22123
sprpriority = 99
postype = p1
pos = 20,-60
bindtime = -1
under = 0
ownpal = 1
persistent = 0
ignorehitpause = 0
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State -1]
type = Explod
triggerall = anim = 0
triggerall = time >= 15
trigger1 = (GameTime%30) = 1
anim = 22123
id = 22123
sprpriority = 99
postype = p1
pos = -20,-40
bindtime = -1
under = 0
ownpal = 1
persistent = 0
ignorehitpause = 0
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State -1]
type = Explod
triggerall = anim = 0
triggerall = time >= 15
trigger1 = (GameTime%40) = 1
anim = 22122
id = 22123
sprpriority = 99
postype = p1
pos = -10,-10
bindtime = -1
under = 0
ownpal = 1
persistent = 0
ignorehitpause = 0
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State -1]
type = Explod
triggerall = anim = 0
triggerall = time >= 15
trigger1 = (GameTime%46) = 1
anim = 22122
id = 22123
sprpriority = 99
postype = p1
pos = -10,-10
bindtime = -1
under = 0
ownpal = 1
persistent = 0
ignorehitpause = 0
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State -1]
type = Explod
triggerall = anim = 0
triggerall = time >= 15
trigger1 = (GameTime%49) = 1
anim = 22122
id = 22123
sprpriority = 99
postype = p1
pos = 0,-30
bindtime = -1
under = 0
ownpal = 1
persistent = 0
ignorehitpause = 0
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State -1]
type = Explod
triggerall = anim = 0
triggerall = time >= 15
trigger1 = (GameTime%46) = 1
anim = 22124
id = 22123
sprpriority = 99
postype = p1
pos = 10,-10
bindtime = -1 
under = 0
ownpal = 1
persistent = 0
ignorehitpause = 0
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State -1]
type = Explod
triggerall = anim = 0
triggerall = time >= 15
trigger1 = (GameTime%38) = 1
anim = 22124
id = 22123
sprpriority = 99
postype = p1
pos = 10,-10
bindtime = -1
under = 0
ownpal = 1
persistent = 0
ignorehitpause = 0
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State -1]
type = Explod
triggerall = anim = 0
triggerall = time >= 15
trigger1 = (GameTime%42) = 1
anim = 22124
id = 22123
sprpriority = 99
postype = p1
pos = 0,-30
bindtime = -1
under = 0
ownpal = 1
persistent = 0
ignorehitpause = 0
SuperMoveTime = 9999999
PauseMoveTime = 9999999

;---------------------
[State -1]
type = Projectile
triggerall = anim = 0
triggerall = time >= 15
trigger1 = (GameTime%2) = 1
attr = S, SA
projanim = 3459
projhitanim = -1
projid = 3459
projpriority = 999999999
projsprpriority = 1
;projedgebound = 220
projremove = 1
projremovetime = 4
postype = p1
offset = 0,0
velocity = 0
animtype  = Light
damage    = 0,0
getpower = 0,0
givepower = 0,0
guardflag = 
hitflag = MAFD
pausetime = 2,8
sparkno = -1
sparkxy = -15,-77
hitsound   = -1
guard.sparkno = -1;s7011
guardsound = -1
ground.type = low
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -2
air.velocity = -2,-1

;---------------------------------------------------------------------------
;エフェクトランダム変数
;---------------------------------------------------------------------------

[State 1]
type = varrandom
trigger1 = 1
range = -55,55
v = 50

[State 1]
type = varrandom
trigger1 = 1
range = 0,-60
v = 51

[State 1]
type = varrandom
trigger1 = 1
range = -40,-130
v = 53

[State 1]
type = varrandom
trigger1 = 1
range = -75,75
v = 52

[State -2]
type = Varset
trigger1 = stateno != 22077
var(40) = 0

[State -2]
Type = VarSet
trigger1 = 1
var(35) = 0
IgnoreHitPause = 1

[State -2]
Type = VarSet
trigger1 = Random <= 300
var(35) = 1
IgnoreHitPause = 1

[State -2]
Type = VarSet
trigger1 = Random <= 300
var(35) = 2
IgnoreHitPause = 1

[State -2]
Type = VarSet
trigger1 = Random <= 300
var(35) = 3
IgnoreHitPause = 1

;---------------------------------------------------------------------------
;時間カウント
;---------------------------------------------------------------------------

[state a]
type = varadd
triggerall = palno = 12
trigger1 = roundstate = 2
v = 54
value = 1
IgnoreHitPause = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State a]
type = varset
triggerall = palno = 12
trigger1 = roundstate != 2
trigger2 = roundstate = 2 && fvar(32) != 1
trigger3 = roundstate = 2 && fvar(32)!= 0 && var(54)>=6700
v = 54
value = ((roundstate=2&&fvar(32)!=1)*5800)
IgnoreHitPause = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[state 1]
type = varset
trigger1 = palno=12&&fvar(38)=2&&stateno!=22050
fv = 18
value = 0
ignorehitpause = 1
pausemovetime = 9999999
supermovetime = 9999999

[state 1]
type = varset
trigger1 = palno=12&&(stateno=22100||enemy,numprojid(96968484321)>=1||RoundState!=2)
fv = 19
value = (stateno!=22100)*RoundState=2
ignorehitpause = 1
pausemovetime = 9999999
supermovetime = 9999999

[state 1]
type = varset
trigger1 = palno=12&&numtarget
trigger1 = target,ishelper=0
fv = 20
value = (RoundState<=2)
ignorehitpause = 1
pausemovetime = 9999999
supermovetime = 9999999

[State 1] 
type = varset
triggerall = palno = 12
trigger1 = RoundState = 2 && (GameTime%50) = 1
trigger2 = RoundState != 2
fv = 22
value = 0+((RoundState = 2)*enemy,life)
ignorehitpause = 1
SuperMoveTime = 999999
PauseMoveTime = 999999

[State 1] 
type = varset
triggerall = palno = 12 && var(54) < 5700
trigger1 = RoundState = 2 && (GameTime%55) = 1
trigger1 = fvar(22) != 0 && enemy,life >= fvar(22)
trigger2 = fvar(22) != 0 && enemy,life < fvar(22)
trigger3 = RoundState != 2
fv = 23
value = IfElse((RoundState = 2),IfElse((fvar(22) != 0 && enemy,life < fvar(22)),0,1),0)
ignorehitpause = 1
SuperMoveTime = 999999
PauseMoveTime = 999999

[state 1]
type = varadd
trigger1 = palno = 12 && roundstate = 2 && fvar(23) = 1 && var(54) < 5700
fv = 24
value = 1+((enemy,life>=enemy,lifemax&&enemy,power>=enemy,powermax)*80)
ignorehitpause = 1
SuperMoveTime = 999999
PauseMoveTime = 999999

[State 1]
type = varset
triggerall = palno = 12
trigger1 = roundstate != 2 || fvar(23) = 0 || numtarget || var(54) >= 5700
fv = 24
value = 0
ignorehitpause = 1
SuperMoveTime = 999999
PauseMoveTime = 999999

[state -2]
type = varset
trigger1 = palno = 12 && RoundState <= 2 && anim = 0 && ctrl = 0 && var(54) <= 40
trigger1 =  enemynear,movetype=A&&(enemynear,numproj>=1||enemynear,numhelper>=1)||enemynear,anim!=0&&ifelse(var(33),fvar(1),p2bodydist x) <= 60||enemynear,vel x != 0
trigger2 = palno = 12 && RoundState>=3
fv = 25
value = (RoundState<=2)
ignorehitpause = 1
pausemovetime = 9999999
supermovetime = 9999999

[state -1]
type = varset
triggerall =palno=12
trigger1 = var(29) >= 1
trigger2 = roundstate != 2
trigger3 = life>=lifemax
fv = 26
value = 0
ignorehitpause = 1
supermovetime = 99999999
pausemovetime = 99999999

[state -1]
type = varset
trigger1 =palno=12&&(fvar(28)!=[0,2])
fv = 28
value = 0
ignorehitpause = 1
supermovetime = 99999999
pausemovetime = 99999999

[state -1]
type = varset
trigger1 =palno=12&&fvar(28)!=0&&(fvar(24)>=2150&&var(54)>=2150||fvar(25)=1||fvar(29)!=0&&RoundState<=2&&var(54)<=40&&random<=100)
fv = 28
value = 0
ignorehitpause = 1
supermovetime = 99999999
pausemovetime = 99999999

[state -1]
type = varset
trigger1 =palno=12&&roundstate>=3&&(drawgame||lose||win)
fv = 29
value = (!win)
ignorehitpause = 1
supermovetime = 99999999
pausemovetime = 99999999

[State 1]
type = varset
triggerall = !ishelper && palno = 12
trigger1 = roundno = 1 && roundstate < 2
trigger2 = roundstate >= 2 && var(3) != gametime
fv = 32
value = 1-(roundstate>=2&& var(3)!=gametime)
ignorehitpause = 1
SuperMoveTime = 999999
PauseMoveTime = 999999

[State 1]
type = varset
triggerall = !ishelper && palno = 12
trigger1 = numexplod(2211325)
fv = 32
value = 0
ignorehitpause = 1
SuperMoveTime = 999999
PauseMoveTime = 999999

[State 1]
type = varset
triggerall = !ishelper
trigger1 = palno = 12 && (GameTime%20) = 1
fv = 35
value = power
ignorehitpause = 1
SuperMoveTime = 999999
PauseMoveTime = 999999

[State 1]
type = varset
triggerall = !ishelper
triggerall = numhelper(288888)=1
trigger1 = palno=12&&(helper(288888),stateno=288889)&&enemy,numhelper>=2&&enemy,movetype=A
fv = 36
value = enemy,stateno
ignorehitpause = 1
SuperMoveTime = 999999
PauseMoveTime = 999999

;---------------------------------------------------------------------------
;技ダメージ倍率
;---------------------------------------------------------------------------

[State -2] ;パワーアップ中
type = varset 
trigger1 = var(29) >= 1
var(39) = 3-(palno=12)

[State -2] ;通常
type = varset 
trigger1 = var(29) <= 1
var(39) = 1

[state a]
type = varadd
trigger1 = 1
v = 29
value = -1

[state a]
type = varset
trigger1 = palno != 12 && roundstate != 2
v = 29
value = 0


;---------------------------------------------------------------------------
;キー判別
;---------------------------------------------------------------------------

[state a]
type = varset
trigger1 = command = "holdup"
v = 56
value = 2

[state a]
type = varset
trigger1 = command = "holddown"
v = 56
value = 3

[state a]
type = varset
trigger1 = command != "holddown"
trigger1 = command != "holdup"
v = 56
value = 0

[state -2]
type = varset
trigger1 = 1
fv = 33
value = (projhit22183=1)

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

[State -1]
type = Explod
triggerall = alive = 1 && !ishelper
triggerall = statetype != C
triggerall = MoveType != H
triggerall = stateno != [190,192]
triggerall = stateno != 22050
triggerall = stateno != [170,171]
trigger1 = (GameTime%30) = 1
anim = 8200
id = 8200
sprpriority = 1
postype = p1
pos = 0,-50
bindtime = -1
supermove = 1
under = 1
ownpal = 1

[State a] 
type = Afterimage
triggerall = palno = 12 || ishelper(12)
trigger1 = TIME = 1
trans = add
PalContrast =  0, 0, 250
PalBright = 255,70,70
time    =  -1
length  = 30
TimeGap = 1

[State a]
type = EnvColor
trigger1 = projhit1050 = 1
persistent = 0
ignorehitpause = 1
time = 1
value = 255,255,255
under = 1

[State 1000, 9]
type = Envcolor
trigger1 = projHit22079 = 1 
ignorehitpause = 1
value = 255, 255, 255
time = 1
under = 5
supermove = 1

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

[State 1000, 5]
type = Explod
trigger1 = Projhit3459 = 1 || Projhit35904 = 1 || Projhit22519 = 1
anim = 22109 + var(35)
sprpriority = 6
postype = p2
pos = 0,-60
bindtime = -1
ignorehitpause =0
under = 0
ownpal = 1
PauseMoveTime = 9999999

[State 1000, 5]
type = Explod
trigger1 = ProjHit20000 = 1 || projhit22182 = 1 || projhit22183 = 1
anim = 22109 + var(35)
sprpriority = 100
postype = p2
pos = 0,-60
bindtime = -1
ignorehitpause =0
under = 0
ownpal = 1
PauseMoveTime = 9999999

[State 1000, 5]
type = Explod
trigger1 = ProjHit22079 = 1
anim = 22109 + var(35)
sprpriority = 100
postype = p2
pos = 0,-60
bindtime = -1
ignorehitpause =0
under = 0
ownpal = 1
PauseMoveTime = 9999999

[State 1000, 5]
type = Explod
trigger1 = ProjGuarded22079 = 1
anim = 22113
sprpriority = 100
postype = p2
pos = 0,-60
bindtime = -1
ignorehitpause =0
under = 0
ownpal = 1
PauseMoveTime = 9999999

[State 1000, 5]
type = Explod
trigger1 = !ishelper&&palno=12&&roundstate>=2
trigger1 = fvar(32)!=1
trigger1 = !numexplod(2211325)
anim = 0
id=2211325
removetime = -1
sprpriority = 100
postype = left
pos = 0,10000
bindtime = 1
ignorehitpause =1
under = 0
ownpal = 1
PauseMoveTime = 9999999

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

[State -1]
type = palfx
trigger1 = var(29) >= 1
time = 1
add = 60,60,60
color = 1
ignorehitpause = 1

[State -2]
type = EnvColor
trigger1 = projhit35900 = 1
persistent = 0
ignorehitpause = 1
time = 2
value = 255,255,255
under = 1
invertall = 1

[State -2]
type = PlaySnd
trigger1 = projhit22182 = 1 || projhit22183 = 1
value = 2300,2

[State -2]
type = PosSet
triggerall = RoundState = 2
trigger1 = stateno = [0,12]
trigger1 = floor(Pos Y) < -20
y = 0

[State -2]
type = SelfState
trigger1 = ishelper
value = 169992
ignorehitpause = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State -1]
type = CtrlSet
trigger1 = !ishelper && stateno = (104005 || 104006 || 103999 || 104000 || 104001 || 104004) && ctrl = 1
value = 0

[State 1]
type = poweradd
triggerall = roundstate = 2 && var(1)!=1
trigger1 = (GameTime%4) = 1
value =2+((life<lifemax/4)*(powermax/1000))
ignorehitpause = 1
supermovetime = 99999999
pausemovetime = 99999999

[state a]
type = powerset
triggerall = palno = 12
trigger1 = var(54) >= 5700 || fvar(24)>=2150&&var(54)>=2150
value = (Const(data.power))
ignorehitpause = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[state -1]
type = powerset
triggerall = !ishelper
trigger1 = palno=12&&!(stateno=2300||stateno =2400||stateno=22075||stateno=2999||stateno=3250||stateno=2200||stateno=11000||stateno=19400)&&fvar(35)-power>=1
value = ceil(fvar(35)-power)
ignorehitpause = 1
supermovetime = 99999999
pausemovetime = 99999999

[State a]
type = PalFX
triggerall = palno = 12
triggerall = var(54) >= 5700 || fvar(24)>=2150&&var(54)>=2150
trigger1 = (GameTime%2) = 1
time = 1
add = 255-((fvar(24)>=2150)*100),100,100+((fvar(24)>=2150)*100)
ignorehitpause = 1

[State 1]
type = targetLifeAdd
triggerall = palno = 12 && numtarget
trigger1 = stateno = 22050 || stateno = 2205 && time >= 20
value = -99999999999
absolute = 1

[state a]
type = targetlifeadd
trigger1 = numtarget
trigger1 = projhit22079 >= 1
value = Ceil(-0.003 * enemy,Const(data.life))
absolute = 1

[State 22121,1]
type = targetlifeadd
trigger1 = numtarget
trigger1 = projhit35902 >= 1
value = (Ceil(-0.005 * enemy,Const(data.life))) * var(39)
ignorehitpause = 1
absolute = 1

[State -2]
type = targetLifeAdd
triggerall = palno = 12 && numtarget
trigger1 = enemy,life <= (Ceil(0.3 * enemy,Const(data.life)))
value = -99999999999
ignorehitpause = 1
absolute = 1

[State -2]
type = targetpowerAdd
triggerall = palno = 12 && numtarget
trigger1 = enemy,life <= (Ceil(0.3 * enemy,Const(data.life)))
value = -(Ceil(1 * enemy,Const(data.power)))
ignorehitpause = 1

[State 1]
type = Targetlifeadd
trigger1 = numtarget && numhelper(2401)
trigger1 = helper(2401),stateno=2410&&helper(2401),animtime = 0
value = Ceil(-0.35 * enemy,Const(data.life)) - 1
ignorehitpause = 1
absolute = 1

[State -2]
type = StateTypeSet
triggerall = var(1) = 1
trigger1 = stateno = [40,52]
MoveType = I

[State -2]
type = screenbound
trigger1 = ishelper
value = 0
movecamera = 0

[State -2]
type = NotHitBy
triggerall = var(1) = 1
triggerall = stateno = [40,52]
trigger1 = time = 0
value = SCA,AA,AT,AP
Time = 25

[State -2]
type = NotHitBy
triggerall = palno = 12
trigger1 = RoundState != 2 || RoundState=2&&var(54)<=100
trigger2 = fvar(32) != 1
value = SCA

[State -2]
type = Trans
trigger1 = palno = 12 && !ishelper && fvar(32) != 1
trans = sub
alpha = 50,230

[State -2]
Type = LifeSet
triggerall = palno = 12 && alive
trigger1 = var(29) >= 1
trigger2 = fvar(32) != 1
trigger3 = roundstate < 2
trigger4 = var(30)=0&&fvar(26)<=36&&life<=1
trigger5 = var(30)!=0&&fvar(26)<=88&&fvar(28)=0&&life<=1
trigger6 = var(30)!=0&&fvar(28)=0&&roundstate>=3
Value = lifemax
IgnoreHitPause = 1

[State -2]
Type = LifeSet
triggerall = var(1) = 1 && palno != 12 && alive
trigger1 = var(29) >= 1
Value = ceil(fvar(39))
IgnoreHitPause = 1

[State -2]
type = attackMulSet
trigger1 = 1
value = 1+((var(29)>=1)*(2-(palno=12)))
ignorehitpause = 1

[State -2]
type = defenceMulSet
trigger1 = var(1) != 1
value = 1.2
ignorehitpause = 1

[State -2]
type = AssertSpecial
trigger1 = var(1) = 1 || var(1) != 1 && var(29) >= 1
flag = NoStandGuard
flag2 = NoCrouchGuard
flag3 = NoairGuard

[State -2]
type = assertspecial
trigger1 = palno = 12 && !ishelper && fvar(32) != 1
flag = timerfreeze
ignorehitpause = 1
pausemovetime = 999999999999999
supermovetime = 999999999999999

[State -2]
type = PlayerPush
triggerall = palno = 12
trigger1 = var(29) >= 1
value = 0

[State 1]
type = ChangeState
triggerall = var(1) = 1
trigger1 = !alive && stateno = [5000,5050]
value = 10380

[state a]
type = targetstate
trigger1 = numtarget
trigger1 = enemy,alive = 0 && enemy,statetype = S
value = 10380

[state a]
type = targetstate
trigger1 = numtarget
trigger1 = stateno = 22050 && enemy,alive = 0
value = 104010

[state 1]
type = targetstate
triggerall = palno = 12 && numtarget
trigger1 = (target,stateno != [49000,49100]) && stateno = 22050 && time >= 150
value = 49000

[State 1]
type = Targetstate
trigger1 = numhelper(2401) && numtarget
trigger1 = helper(2401),stateno=2410&&helper(2401),animtime = 0
value = 2416

[State 1]
type = HitOverride
triggerall = alive && var(1) = 1
triggerall = statetype != A
trigger1 = 1
time = 1
attr = SCA, NA, SA, HA, NT,ST,HT, NP, SP, HP,AA,AT,AP
stateno = 10051
ignorehitpause = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State 1]
type = HitOverride
triggerall = alive && var(1) = 1
triggerall = var(29) <= 1
triggerall = statetype = A
trigger1 = 1
time = 1
attr = SCA, NA, SA, HA, NT,ST,HT, NP, SP, HP,AA,AT,AP
stateno = 38853
ignorehitpause = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State 1]
type = HitOverride
triggerall = alive && var(1) = 1
triggerall = var(29) <= 1
triggerall = stateno = 40 || stateno = 52
trigger1 = 1
time = 1
attr = SCA, NA, SA, HA, NT,ST,HT, NP, SP, HP,AA,AT,AP
stateno = 38852
ignorehitpause = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State 1]
type = HitOverride
triggerall = alive && var(1) = 1
triggerall = var(29) >= 1
triggerall = stateno = 40 || stateno = 52
trigger1 = 1
time = 1
attr = SCA, NA, SA, HA, NT,ST,HT, NP, SP, HP,AA,AT,AP
stateno = 18000
ignorehitpause = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State 1]
type = HitOverride
triggerall = alive && var(1) = 1
triggerall = var(29) >= 1
triggerall = statetype = A
trigger1 = 1
time = 1
attr = SCA, NA, SA, HA, NT,ST,HT, NP, SP, HP,AA,AT,AP
stateno = 18000
ignorehitpause = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State -1]
type = helper
triggerall = palno=12&&(stateno=22050&&time<150)&&!ishelper&&fvar(32)!=0&&fvar(38)!=0
trigger1 = numhelper(169992)=0&&enemy,numprojid(169994)>=1
id = 169992
persistent = 0
name = "g orochi"
pos = 0,0
postype = P1
stateno = 169992
helpertype = player
keyctrl = 0
ownpal = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

;常時ヘルパかき消し当身ヘルパ
[State -2]
type = helper
triggerall = !var(33)
trigger1 = numhelper(288888)=0
id = 288888
persistent = 0
name = "godfild"
pos = 0,0
postype = P1
stateno = 288888
helpertype = normal
keyctrl = 0
ownpal = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State -2]
type = helper
triggerall = var(33)
trigger1 = numhelper(288888)=0
id = 288888
persistent = 0
name = "godfild"
pos = 0,0
postype = P1
stateno = 288888
helpertype = player
keyctrl = 0
ownpal = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999


