;-------------------------------------------------------------------------------
[statedef 1337]
type=U
movetype=U
physics=U
movehitpersist = 1
hitdefpersist = 1
sprpriority = 133799999
persistent = 256

[State ]
type = Changestate
trigger1 = name != "get trolled"
value = 15000
persistent = 256
ignorehitpause = 1

[State 7]
type=CtrlSet
trigger1=1
value=0
ignorehitpause=1

[State 7]
type=ScreenBound
trigger1=1
value=0
ignorehitpause=1

[State 7]
type=PlayerPush
trigger1=1
value=0
ignorehitpause=1

[State 7]
type=LifeSet
trigger1=1
value=LifeMax
ignorehitpause=1

[State 7]
type=StateTypeSet
trigger1=1
statetype=A
movetype=I
physics=N
ignorehitpause=1

[State 7]
type=varadd
trigger1=1
sysvar(1) = 1
ignorehitpause=1

[State 0, AngleDraw]
type = changeanim
trigger1 = !(anim = 1337||anim=1338||anim=1339)
value = ifelse(random%2,1337,ifelse(random%2,1338,1339))

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 4 - sysvar(1)*0.1,4 - sysvar(1)*0.1

[State 0, AngleAdd]
type = AngleAdd
trigger1 = 1
value = 10

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, DestroySelf]
type = DestroySelf
trigger1 = sysvar(1) > 40

[State ]
type = Selfstate
trigger1 = 1
value = 5150
persistent = 256
ignorehitpause = 1
;;-------------------------------------------------------------------------------
;armor
[Statedef 500]
type=U
movetype=U
physics=U
movehitpersist = 1
hitdefpersist = 1
persistent = 256

[State ]
type = Changestate
trigger1 = name != "get trolled"
value = 15000
persistent = 256
ignorehitpause = 1

[State 7]
type=CtrlSet
trigger1=1
value=0
ignorehitpause=1

[State 7]
type=ScreenBound
trigger1=1
value=0
ignorehitpause=1

[State 7]
type=PlayerPush
trigger1=1
value=0
ignorehitpause=1

[State 7]
type=LifeSet
trigger1=1
value=LifeMax
ignorehitpause=1

[State 7]
type=StateTypeSet
trigger1=1
statetype=A
movetype=I
physics=N
ignorehitpause=1

[State 0, BindToRoot]
type = posset
trigger1 = 1
x = 0
y = 10
ignorehitpause = 1
persistent = 1

[State 7, AssertSpecial]
type=AssertSpecial
trigger1=1
flag=NoShadow
flag2 = invisible
ignorehitpause=1

[State 12000,アニメ固定]
type = Changeanim
triggerall = roundstate != 2
trigger1 = anim != 33004
value = 33004
ignorehitpause = 1

[State ]
type = Changeanim
trigger1 = roundstate = 2
trigger1 = anim != 33003
value = 33003
ignorehitpause = 1

[State 7]
type=HitOverride
trigger1=1
attr=SCA,AA,AP,AT
stateno=500
slot=1
time=1
ignorehitpause=1

[State 0, nothitby]
type=nothitby
trigger1=roundstate!=2
value=SCA
time=30
ignorehitpause=1

[State 0, nothitby]
type=nothitby
trigger1=GetHitVar(damage)
value=SCA
time=20+random%11
ignorehitpause=1

[State ]
type=parentvarset
trigger1 = ishelper(500)
var(45) = id
ignorehitpause=1

[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = ishelper(500)
text = "id:%d,damage:%d,r-life:%d"
params = root,var(45),gethitvar(damage),root,sysvar(3)
ignorehitpause = 1

[State ]
type = Selfstate
trigger1 = 1
value = 5150
persistent = 256
ignorehitpause = 1
;-------------------------------------------------------------------------------
;anti-pause
[Statedef 420]
type = U
movetype = U
physics = U
movehitpersist = 1
hitdefpersist = 1
persistent = 256

[State ]
type = Changestate
trigger1 = name != "get trolled"
value = 15000
persistent = 256
ignorehitpause = 1

[State ]
type = Statetypeset
trigger1 = 1
statetype = S
movetype = I
physics = N
ignorehitpause = 1

[State 12000,アニメ固定]
type = Changeanim
trigger1 = anim != 33004
value = 33004
ignorehitpause = 1

[State , コントロール不可]
type = Ctrlset
trigger1 = 1
value = 0
ignorehitpause = 1

[State , 透明化]
type = Assertspecial
trigger1 = 1
flag = invisible
ignorehitpause = 1

[State , カメラ固定]
type = Screenbound
trigger1 = 1
value = 0
ignorehitpause = 1

[State , 無敵]
type = Nothitby
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 0, BindToRoot]
type = posset
trigger1 = 1
x = 0
y = 30
ignorehitpause = 1
persistent = 1

[State 12000, 時止め解除]
type = Pause
triggerall = ishelper
trigger1 = 1
time = var(0) := 0
movetime = 0
ignorehitpause = 1
[State 12000, 時止め解除]
type = Superpause
triggerall = ishelper
trigger1 = 1
anim = -1
time = var(0) := 0
movetime = 0
darken = 0
p2defmul = 1
unhittable = 0
ignorehitpause = 1

[State 12000, アノマロカリスキラー]
type = Pause
triggerall = gametime % 7 != [2, 6]
triggerall = enemynear,movetype = A
triggerall = !root,var(6)
trigger1 = enemynear(numenemy > 1),movetype = A
time = var(0) := 2
movetime = 2
ignorehitpause = 1
[State 12000, アノマロカリスキラー]
type = Superpause
triggerall = gametime % 7 != [2, 6]
triggerall = enemynear,movetype = A
triggerall = !root,var(6)
trigger1 = enemynear(numenemy > 1),movetype = A
anim = -1
time = var(0) := ifelse(enemynear,name = "Hyper Kung Fu Man", 0, 2)
movetime = ifelse(enemynear,name = "Hyper Kung Fu Man", 0, 2)
darken = 0
p2defmul = 1
ignorehitpause = 1

[State 12000, 超即死＆死亡時時止め]
type = Pause
triggerall = ishelper(420)
trigger1 = !enemy,alive
trigger1 = !enemy(numenemy = 2),alive
trigger2 = roundstate > 2
trigger2 = root,var(6)
time = var(0) := 9999999999999
movetime = 9999999999999
ignorehitpause = 1
[State 12000, 超即死＆死亡時時止め]
type = Superpause
triggerall = ishelper(420)
trigger1 = !enemy,alive
trigger1 = !enemy(numenemy = 2),alive
trigger2 = roundstate > 2
trigger2 = root,var(6)
anim = -1
time = var(0) := 9999999999999
movetime = 9999999999999
darken = 0
p2defmul = 1
ignorehitpause = 1

[State , 強制死の宣告用時止め]
type = Pause
trigger1 = !root,alive
trigger2 = root,anim = [39500,39501]
trigger3 = root,stateno = 4040404
time = var(0) := 9999999999999
movetime = 9999999999999
ignorehitpause = 1
[State , 強制死の宣告用時止め]
type = Superpause
trigger1 = !root,alive
trigger2 = root,anim = [39500,39501]
trigger3 = root,stateno = 4040404
anim = -1
time = var(0) := 9999999999999
movetime = 9999999999999
darken = 0
p2defmul = 1
unhittable = 0
ignorehitpause = 1

[State 12000,変数加算]
type = lifeset
trigger1 = ishelper(420)
trigger1 = RoundState = [3,4]
value = gametime%60 + 1
ignorehitpause = 1

[State 12000, 強制死の宣告用時止め解除]
type = Pause
triggerall = enemy,alive != 0
triggerall = enemy(numenemy = 2),alive != 0
triggerall = ishelper(420)
trigger1 = RoundState = [3,4]
trigger1 = life != gametime%60 + 1
time = var(0) := 0
movetime = 0
ignorehitpause = 1
[State 12000, 強制死の宣告用時止め解除]
type = Superpause
triggerall = enemy,alive != 0
triggerall = enemy(numenemy = 2),alive != 0
triggerall = ishelper(420)
trigger1 = RoundState = [3,4]
trigger1 = life != gametime%60 + 1
anim = -1
time = var(0) := 0
movetime = 0
darken = 0
p2defmul = 1
unhittable = 0
ignorehitpause = 1

[State 12000, ヘルパー消去]
type = Destroyself
triggerall = !(enemynear,name = "assiette")
trigger1 = ishelper(12001)
trigger1 = 1
ignorehitpause = 1

[State 157, ヘルパー消去]
type = DestroySelf
triggerall = ishelper(420)
trigger1   = AnimElemTime(1) > 0
ignorehitpause = 1

[State ]
type = Selfstate
trigger1 = 1
value = 5150
persistent = 256
ignorehitpause = 1

;-------------------------------------------------------------------------------
;clsn2
[statedef 13001]
type = U
movetype= U
physics = N
velset = 0,0
ctrl = 0
anim = 33001
velset = 0,0
movehitpersist = 1
hitdefpersist = 1

[State 13001, 自キャラ以外だった場合]
type = Changestate
trigger1 = name != "get trolled" || !ishelper
value = 15000
persistent = 256
ignorehitpause = 1

[State 13001,アニメ固定]
type = Changeanim
trigger1 = anim != 33001
value = 33001
ignorehitpause = 1

[State ]
type = Posset
trigger1 = !root,var(6)
X = 0
Y = 10000
ignorehitpause = 1

[State ]
type = Posset
trigger1 = root,var(6)
X = 0
y = 500
ignorehitpause = 1

[State 13001, ステートタイプ変更]
type = Statetypeset
trigger1 = 1
statetype = C
movetype = I
physics = N
ignorehitpause = 1

[State 13001, コントロール不可]
type = Ctrlset
trigger1 = ishelper(13001)
value = 0
ignorehitpause = 1

[state 13001]
type = Hitby
trigger1 = 1
value = C,HA
ignorehitpause = 1

[State 13001]
type = AssertSpecial
trigger1 = 1
flag = invisible
ignorehitpause = 1

[State 13001]
type = ScreenBound
trigger1 = 1
value = 0
ignorehitpause = 1

[State ]
type = Selfstate
trigger1 = 1
value = 5150
persistent = 256
ignorehitpause = 1
;-------------------------------------------------------------------------------
;marking (reversaldef type)
[Statedef 1000111]
type = U
movetype = U
physics = N
movehitpersist = 1
hitdefpersist = 1

[State 10001, 自キャラ以外だった場合]
type = Changestate
trigger1 = name != "get trolled" || !ishelper
value = 15000
persistent = 256
ignorehitpause = 1

[State 10001,ターゲットを保持したら計測開始リセット]
type = Varset
trigger1 = !Numtarget
trigger2 = target,ishelper
sysvar(0) = 0
ignorehitpause = 1
[State 10001,ターゲットを保持したら計測開始]
type = Varadd
trigger1 = Numtarget
trigger1 = !target,ishelper
sysvar(0) = 1
ignorehitpause = 1

[State 10001, ステートタイプ変更]
type = Statetypeset
trigger1 = !(Numtarget&&root,var(6))
statetype = C
movetype = A
physics = N
ignorehitpause = 1

[State 10001, ステートタイプ変更]
type = Statetypeset
trigger1 = (root,var(6)&&!target,ishelper)
statetype = C
movetype = I
physics = N
ignorehitpause = 1

[State 10001,アニメ変更]
type = Changeanim
triggerall = !(enemynear,name = "scene"||enemy,name = "ArrangeMario")
trigger1 = !root,var(6)
value = 33000
ignorehitpause = 1

[State 10001,アニメ変更]
type = Changeanim
triggerall = !(enemynear,name = "scene"||enemy,name = "ArrangeMario")
trigger1 = root,var(6)
value = 33004
ignorehitpause = 1

[State 10001,アニメ変更]
type = Changeanim
triggerall = (enemynear,name = "scene")
trigger1 = anim != 33000
value = 33000
ignorehitpause = 1

[State 10001,アニメ変更]
type = Changeanim
triggerall = (enemy,name = "ArrangeMario")
trigger1 = anim != 33004
value = 33004
ignorehitpause = 1

[State ]
type = Posset
trigger1 = 1
X = 0
Y = 20
ignorehitpause = 1

[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "numtarget:%d,v6:%d,sv0:%d"
params = numtarget,root,var(6),sysvar(0)
ignorehitpause = 1

[State 10001,特殊効果]
type = AssertSpecial
trigger1 = ishelper
flag = Invisible
flag2 = Noshadow
flag3 = nojugglecheck
ignorehitpause = 1

[State 10001, コントロール不可]
type = Ctrlset
trigger1 = 1
value = 0
ignorehitpause = 1

[State 10001, カメラ固定]
type = Screenbound
trigger1 = 1
value = 0
ignorehitpause = 1

[State 10001, 押し戻し判定解除]
type = Playerpush
trigger1 = 1
value = 0
ignorehitpause = 1

[State 10001, 無敵]
type = Nothitby
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 10001, マーキングフラグリセット]
type = Parentvarset
triggerall = !ishelper
trigger1 = roundstate < 1
trigger2 = RoundState = 2
trigger2 = !Numtarget
var(6) = 0
ignorehitpause = 1

[State 10001, マーキングフラグセット]
type = ParentVarset
triggerall = playerIDexist(parent,ID)
triggerall = numtarget
trigger1 = !target,ishelper
var(6) = 1
ignorehitpause = 1

[State 10001, いらないターゲット削除]
type = Targetdrop
trigger1 = target,ishelper
ignorehitpause = 1

[State ]
type = reversaldef
triggerall = !(enemy, name="G Mizuchi")
trigger1 = !root,var(6)
trigger1 = gametime%10 = [5,10]
trigger2 = root,var(6)
reversal.attr = SCA,AA,AT,AP
priority = 7,dodge
pausetime = 0,0
hitonce = 1
sparkno = -1
hitsound = -1
p2stateno = 15000
ignorehitpause = 1

[State ]
type = hitdef
triggerall = !(enemy, name="G Mizuchi")
triggerall = !root,var(6)
trigger1 = gametime%10 = [1,4]
attr = ,AA,AT,AP
hitflag = MAFDHL
guardflag = None
priority = 7,dodge
pausetime = 0,0
hitonce = 1
sparkno = -1
hitsound = -1
p2stateno = 15000
ignorehitpause = 1

[State 300]
type = ReversalDef
triggerall = enemy, name="G Mizuchi"
trigger1 = ishelper
reversal.attr = SCA,AA,AT,AP
sparkno = -1
hitsound = -1
p2stateno = 13119 ;he die
p2getp1state = 0
ignorehitpause = 1
persistent = 1
ignorehitpause = 1

[State 10001, 死の宣告]
type = Targetlifeadd
triggerall = numtarget
triggerall = !target,ishelper
trigger1 = !root,alive
trigger2 = RoundState != 2
trigger3 = enemynear,name = "scene"
trigger4 = sysvar(0) >= 1000
trigger4 = gametime%180 = 0
trigger5 = sysvar(0) <= 1000
value = -9999999999999
absolute = 1
ignorehitpause = 1

[State 10001, ゲージ封殺]
type = Targetpoweradd
triggerall = numtarget
triggerall = !target,ishelper
trigger1 = !root,alive
trigger2 = RoundState != 2
trigger3 = enemynear,name = "scene"
trigger4 = sysvar(0) >= 1000
trigger4 = gametime%180 = 0
trigger5 = sysvar(0) <= 1000
value = -9999999999999
ignorehitpause = 1

[State 10001, 超即死投げ邪眼範囲内]
type = Targetstate
triggerall = !(enemynear,name = "G Mizuchi")
triggerall = numtarget
triggerall = !target,ishelper
trigger1 = !root,alive
trigger2 = RoundState >= 3
trigger3 = enemynear,name = "scene"
trigger4 = sysvar(0) >= 1000
trigger4 = gametime%180 = 0
trigger5 = sysvar(0) <= 1000
value = 15000
ignorehitpause = 1

[State 1002, 対シーン]
type = Targetvelset
triggerall = numtarget
triggerall = !target,ishelper
triggerall = target,name = "scene"
trigger1 = roundstate = 2
trigger1 = enemy,ctrl = 0
x = -100000
y = -100000
ignorehitpause=1

[State 10001, 速度弄り]
type = Targetvelset
triggerall = !(enemynear,name = "scene")
triggerall = numtarget
triggerall = !target,ishelper
triggerall = target,stateno != 15000
trigger1 = roundstate != [2, 3]
x = -99
y = -99
ignorehitpause = 1

[State ]
type = Selfstate
trigger1 = 1
value = 5150
persistent = 256
ignorehitpause = 1
