
[statedef -2]

[state ];常時AIスイッチ
type = varset
trigger1 = name ="Crazy-Catastrophe"
trigger1 = !ishelper
var(51)= 1 ; 0でOFF　それ以外で常時AI

[state ];裏 BGMスイッチ
type = varset
trigger1 = name ="Crazy-Catastrophe"
trigger1 = !ishelper
var(11)= 1 ; 0でOFF　それ以外で曲を流す





































;ここから先は弄らんでくだされ
;--------------------------------------------------------------------
[state ];行動制限
type = varset
triggerall = numhelper(5150)>0
triggerall = ishelper(5150)
trigger1 = roundstate!=2
trigger2 = helper(5150),var(8)=0
sysvar(3)=9999
[state ];行動制限解除
type = varset
triggerall = numhelper(5150)>0
triggerall = ishelper(5150)
trigger1 = roundstate=2
trigger1 = helper(5150),var(8)=1 ;行動許可
trigger1 = helper(5150),stateno=0 ;ニュートラル状態
sysvar(3)=0

[state ];裏の条件
type = varset
triggerall = name ="Crazy-Catastrophe"
trigger1 = roundstate =0 && numhelper(5150)>0
trigger1 = !ishelper
v = 59
value := 0

[state ];裏の条件
type = varset
triggerall = name ="Crazy-Catastrophe"
trigger1 = !ishelper
trigger1 = roundstate >0 && numhelper(5150)=0
trigger2 = palno=12
v = 59
value := 9999

[state ];裏 攻撃Lv引継ぎ
type = varset
triggerall = name ="Crazy-Catastrophe"
trigger1 = !ishelper
trigger1 = var(59)=9999
trigger1 = roundstate>=2
v = 50
value = var(5)

[state ];裏 攻撃Lv引継ぎ
type = varset
triggerall = name ="Crazy-Catastrophe"
trigger1 = !ishelper
trigger1 = var(59)=9999
trigger1 = roundstate=0
trigger1 = roundno>1
v = 5
value = var(50)-1

[state ];完全論外化スイッチ
type = varset
triggerall = name ="Crazy-Catastrophe"
trigger1 = !ishelper
trigger1 = var(59)=9999 ;裏です
trigger1 = roundstate>2
trigger1 = LOSE ;ま、負けた！？この私が…この、この私が…！！
var(58)=963852741

[State ];一度滅ぼしたくらいでいい気になるな！
type = AssertSpecial
triggerall = name ="Crazy-Catastrophe"
triggerall = RoundNo>1 ;２試合目以降
trigger1 = !ishelper
trigger1 = var(58)!=0
trigger2 = ishelper
trigger2 = root,var(58)!=0
flag = NOKO
flag2 = intro
flag3 = roundnotover

[State ];時間鈍化
type = assertspecial
triggerall = name ="Crazy-Catastrophe"
trigger1 = var(59)=9999
trigger1 = gametime%4
trigger2 = palno=11
trigger2 = gametime%600
trigger3 = var(49)!=0 ;専用対策中
trigger4 = var(58)!=0 ;論外モード
trigger5 = ishelper
trigger5 = root,var(58)!=0
flag = timerfreeze

[State ];時間鈍化解除
type = assertspecial
trigger1 = name !="Crazy-Catastrophe"
trigger1 = !ishelper
trigger1 = gametime%1
flag = timerfreeze

[state ]
type = envshake
trigger1 = numhelper(5150)>0
trigger1 = helper(5150),stateno!=194
time = 1
freq = 0
ampl = 0
phase = 0
ignorehitpause = 1

[state ]
type = AllPalFX
trigger1 = numhelper(5150)>0
trigger1 = helper(5150),stateno!=2000
trigger1 = helper(5150),stateno!=4501
time = 1
add = 0,0,0
mul = 256,256,256
sinadd = 0,0,0,0
invertall = 0
color = 256

[state ];敵Ctrl計測
type = varset
trigger1 = numhelper(5150)>0
trigger1 = ishelper(5150)
trigger1 = numenemy>0
var(0)=enemy,ctrl

[state ];フライング対策 行動許可
type = varset
triggerall = numhelper(5150)>0
triggerall = ishelper(5150)
trigger1 = numenemy>0
trigger1 = helper(5150),var(0)!=0
trigger2 = numhelper(1)>0
trigger2 = helper(1),gethitvar(damage) ;攻撃を受けた
trigger3 = helper(5150),stateno=0 ;ニュートラル状態
trigger3 = time>=1000 ;時間経過で解除
trigger4 = roundstate=2
trigger4 = helper(5150),var(59)=0 ;AIOFF
var(8)=1

[state ];時間計測用
type = varset
triggerall = name ="Crazy-Catastrophe"
trigger1 = !ishelper
trigger1 = roundstate<=1
v = 2
value = gametime

[state ];gametime計測
type = varset
triggerall = name ="Crazy-Catastrophe"
trigger1 = !ishelper
v = 3
value = gametime

[state ];試合時間
type = varset
triggerall = name ="Crazy-Catastrophe"
trigger1 = !ishelper
trigger1 = roundstate<=3
v = 4
value = var(3)-var(2)

[State ];時止め無視
type = pause
triggerall = name ="Crazy-Catastrophe"
triggerall = !LOSE
trigger1 = roundstate=0 || roundstate>=3&&!WIN
trigger1 = !ishelper
trigger2 = roundstate=0
trigger2 = ishelper
trigger2 = !ishelper(112233);時止め解除以外のヘルパーに適応
trigger2 = numhelper(5150)>0
trigger2 = helper(5150),stateno!=[190,195]
trigger2 = helper(5150),stateno!=19000 ;VS鬼巫女
time = 2147483647
movetime = 2147483647
UnHittable = 0
ignorehitpause = 1

[State ];時止め無視
type = superpause
triggerall = name ="Crazy-Catastrophe"
triggerall = !LOSE
trigger1 = roundstate=0 || roundstate>=3&&!WIN
trigger1 = !ishelper
trigger2 = roundstate=0
trigger2 = ishelper
trigger2 = !ishelper(112233);時止め解除以外のヘルパーに適応
trigger2 = numhelper(5150)>0
trigger2 = helper(5150),stateno!=[190,195]
trigger2 = helper(5150),stateno!=19000 ;VS鬼巫女
anim = -1
time = 2147483647
movetime = 2147483647
UnHittable = 0
darken = 0
ignorehitpause = 1

[state ];動かんといて
type = ctrlset
trigger1 = 1
value = 0

[State ];無意味にターゲットを持たないこと
type = targetdrop
triggerall = numtarget>0
triggerall = ishelper(5150)
trigger1 = stateno=[0,40]
trigger2 = roundstate!=2
ignorehitpause = 1

[state ];追従
type = posset
triggerall = name ="Crazy-Catastrophe"
trigger1 = numhelper(5150)>0
trigger1 = !ishelper
x = helper(5150),pos X
y = helper(5150),pos Y

[state ];地面に立ってろ
type = posset
triggerall = name ="Crazy-Catastrophe"
trigger1 = var(59)=9999 ;裏
trigger1 = !ishelper
trigger1 = roundstate>=3
y = 0

[state ];一応
type=selfstate
triggerall = name ="Crazy-Catastrophe"
trigger1 = !ishelper
trigger1 = var(59)!=9999
trigger2 = ishelper(3)&&stateno!=5150
trigger3 = ishelper(2222)&&stateno!=5150
trigger4 = ishelper(4200)&&stateno!=5150
value=5150
ignorehitpause=1

[State ];おお蛟よ…死亡条件を満たすとは何事じゃ…
type = SelfState
triggerall = name ="Crazy-Catastrophe"
triggerall = ishelper(5150)
trigger1 = root,sysvar(4)=5150
trigger1 = stateno!=5150
value = 5150

[state ]
type = changeanim
triggerall = name ="Crazy-Catastrophe"
trigger1 = !ishelper
trigger1 = var(59)!=9999
value = 9999

[state ]
type = changeanim
triggerall = name ="Crazy-Catastrophe"
trigger1 = !ishelper
trigger1 = var(59)=9999
trigger1 = roundstate = 0
value = 9999

[state ]
type = DisplayToClipboard
triggerall = name ="Crazy-Catastrophe"
trigger1 = ishelper
trigger1 = numenemy>0
text="e-life:%d, e-state:%d, e-anim:%d, e-helper:%d, helper:%d"
params=(enemynear,life),(enemynear,stateno),(enemynear,anim),(enemynear,numhelper),(numhelper)
ignorehitpause=1

[state ]
type=AppendToClipboard
triggerall = name ="Crazy-Catastrophe"
trigger1 = ishelper
trigger1 = numhelper(5150)>0
trigger1 = ishelper(5150)
text="\n E-Dist X %f,E-Dist Y %f,hit %d,ctrl %d,AI %d"
params= (helper(5150),fvar(0)),(helper(5150),fvar(1)),(root,sysvar(3)),(helper(5150),sysvar(3)),(helper(5150),var(59))
ignorehitpause=1

[state ]
type = nothitby
triggerall = name ="Crazy-Catastrophe"
trigger1 = !ishelper
trigger2 = ishelper(5150)
value = SCA,AA,AT,AP
time = -1
ignorehitpause = 1

[state ];コラコラ押すな押すな
type = PlayerPush
triggerall = name ="Crazy-Catastrophe"
trigger1 = !ishelper
trigger2 = ishelper(5150) ;本体ヘルパー
trigger3 = ishelper(1)    ;被弾ヘルパー
trigger4 = ishelper(1400) ;陰瘴雲
value = 0

[State ];勝手にガードすんな
type = assertspecial
triggerall = name ="Crazy-Catastrophe"
trigger1 = !ishelper
flag = nostandguard
flag2 = nocrouchguard
flag3 = noairguard
ignorehitpause = 1

[State ]
type = assertspecial
triggerall = name ="Crazy-Catastrophe"
trigger1 = !ishelper
trigger1 = var(59)!=9999
flag = invisible
flag2 = noautoturn
flag3 = nokoslow
ignorehitpause = 1

[State ]
type = assertspecial
trigger1 = name ="Crazy-Catastrophe"
flag = noautoturn
flag2 = nowalk
ignorehitpause = 1

[state ];敵の距離 X
type = varset
triggerall = name ="Crazy-Catastrophe"
triggerall = numenemy>0
trigger1 = numenemy = 1
trigger2 = numenemy = 2
trigger2 = enemynear(0),alive
fvar(0) = abs(pos x - enemynear,pos x)*ifelse(frontedgedist<ifelse((facing=enemynear,facing),(enemynear,frontedgedist),(enemynear,backedgedist)),-1,1)
ignorehitpause = 1

[state ];敵の距離 X
type = varset
triggerall = name ="Crazy-Catastrophe"
triggerall = numenemy>0
trigger1 = numenemy = 2
trigger1 = !enemynear(0),alive
fvar(0) = abs(pos x - enemynear(1),pos x)*ifelse(frontedgedist<ifelse((facing=enemynear(1),facing),(enemynear(1),frontedgedist),(enemynear(1),backedgedist)),-1,1)
ignorehitpause = 1

[state ];敵の距離 Y
type = varset
triggerall = name ="Crazy-Catastrophe"
triggerall = numenemy>0
trigger1 = numenemy = 1
trigger2 = numenemy = 2
trigger2 = enemynear(0),alive
fvar(1) = (enemynear,pos y) - pos y
ignorehitpause = 1

[state ];敵の距離 Y
type = varset
triggerall = name ="Crazy-Catastrophe"
triggerall = numenemy>0
trigger1 = numenemy = 2
trigger1 = !enemynear(0),alive
fvar(1) = (enemynear(1),pos y) - pos y
ignorehitpause = 1

;ヘルパー保護
[state ];ヘルパーアーマー
type=selfstate
triggerall = name ="Crazy-Catastrophe"
triggerall = numhelper(1)>0
trigger1 = ishelper(1)
value=9999
ignorehitpause=1

[state ];妨害ヘルパー(反壁)
type=selfstate
triggerall = name ="Crazy-Catastrophe"
triggerall = numhelper(2)>0
trigger1 = ishelper(2)
value=8888
ignorehitpause=1

[state ];妨害ヘルパー(死誘)
type=selfstate
triggerall = name ="Crazy-Catastrophe"
triggerall = numhelper(3)>0
trigger1 = ishelper(3)
value=5150
ignorehitpause=1

[state ];proj-hit
type=selfstate
triggerall = name ="Crazy-Catastrophe"
triggerall = numhelper(2222)>0
trigger1 = ishelper(2222)
value=5150
ignorehitpause=1

[state ];konsen-hit
type=selfstate
triggerall = name ="Crazy-Catastrophe"
triggerall = numhelper(2223)>0
trigger1 = ishelper(2223)
value=5150
ignorehitpause=1

[state ];当身ヘルパー(無の光)
type=selfstate
triggerall = name ="Crazy-Catastrophe"
triggerall = numhelper(3000)>0
trigger1 = ishelper(3000)
value=3000
ignorehitpause=1

[state ];当身ヘルパー(オーバーデス)
type=selfstate
triggerall = name ="Crazy-Catastrophe"
triggerall = numhelper(3001)>0
trigger1 = ishelper(3001)
value=3001
ignorehitpause=1

[state ];文字
type=selfstate
triggerall = name ="Crazy-Catastrophe"
triggerall = numhelper(4200)>0
trigger1 = ishelper(4200)
value=5150
ignorehitpause=1

[state ];紋章「雷」
type=selfstate
triggerall = name ="Crazy-Catastrophe"
triggerall = numhelper(1100)>0
trigger1 = ishelper(1100)
value=1101
ignorehitpause=1

[state ];紋章「斬」
type=selfstate
triggerall = name ="Crazy-Catastrophe"
triggerall = numhelper(1300)>0
trigger1 = ishelper(1300)
value=1301
ignorehitpause=1

[state ];陰瘴雲
type=selfstate
triggerall = name ="Crazy-Catastrophe"
triggerall = numhelper(1400)>0
trigger1 = ishelper(1400)
value=1401
ignorehitpause=1

[state ];陰戒屠紋１
type=selfstate
triggerall = name ="Crazy-Catastrophe"
triggerall = numhelper(7001)>0
trigger1 = ishelper(7001)
value=7001
ignorehitpause=1

[state ];陰戒屠紋２
type=selfstate
triggerall = name ="Crazy-Catastrophe"
triggerall = numhelper(7002)>0
trigger1 = ishelper(7002)
value=7002
ignorehitpause=1

[state ];七色の大罪
type=selfstate
triggerall = name ="Crazy-Catastrophe"
triggerall = numhelper(7701)>0
trigger1 = ishelper(7701)
value=7701
ignorehitpause=1
[state ];七色の大罪 効果１ 超即死当身
type=selfstate
triggerall = name ="Crazy-Catastrophe"
triggerall = numhelper(7702)>0
trigger1 = ishelper(7702)
value=7702
ignorehitpause=1
[state ];七色の大罪 効果２ 変数書き換え
type=selfstate
triggerall = name ="Crazy-Catastrophe"
triggerall = numhelper(7703)>0
trigger1 = ishelper(7703)
value=7703
ignorehitpause=1
[state ];七色の大罪 効果３ 凍結超即死当身
type=selfstate
triggerall = name ="Crazy-Catastrophe"
triggerall = numhelper(7704)>0
trigger1 = ishelper(7704)
value=7704
ignorehitpause=1
[state ];七色の大罪 効果５ Hitdef小ダメージ＆落下即死
type=selfstate
triggerall = name ="Crazy-Catastrophe"
triggerall = numhelper(7705)>0
trigger1 = ishelper(7705)
value=7705
ignorehitpause=1
[state ];七色の大罪 効果６ Hitdef大ダメージ＆超長時間硬直
type=selfstate
triggerall = name ="Crazy-Catastrophe"
triggerall = numhelper(7706)>0
trigger1 = ishelper(7706)
value=7706
ignorehitpause=1

[state ];混線
type=selfstate
triggerall = name ="Crazy-Catastrophe"
triggerall = numhelper(214748364)>0
trigger1 = ishelper(214748364)
value=214748364
ignorehitpause=1

[state ];混線-食らい
type=selfstate
triggerall = name ="Crazy-Catastrophe"
triggerall = numhelper(214748365)>0
trigger1 = ishelper(214748365)
value=214748365
ignorehitpause=1

[state ];Hitdef
type=selfstate
triggerall = name ="Crazy-Catastrophe"
triggerall = numhelper(123)>0
trigger1 = ishelper(123)
value=123
ignorehitpause=1

[state ];Hitdef 判定-極小 割合ダメージ半分
type=selfstate
triggerall = name ="Crazy-Catastrophe"
triggerall = numhelper(7777)>0
trigger1 = ishelper(7777)
value=7777
ignorehitpause=1
[state ];Hitdef 判定-小 割合ダメージ1%
type=selfstate
triggerall = name ="Crazy-Catastrophe"
triggerall = numhelper(7778)>0
trigger1 = ishelper(7778)
value=7778
ignorehitpause=1
[state ];Hitdef 判定-中 オーバーフロー＆アンダーフロー
type=selfstate
triggerall = name ="Crazy-Catastrophe"
triggerall = numhelper(7779)>0
trigger1 = ishelper(7779)
value=7779
ignorehitpause=1

[state ];時止め解除
type=selfstate
triggerall = name ="Crazy-Catastrophe"
triggerall = numhelper(112233)>0
trigger1 = ishelper(112233)
value=5150
ignorehitpause=1

[state ];ヘルパー独占
type=selfstate
triggerall = name ="Crazy-Catastrophe"
triggerall = numhelper(58)>0
trigger1 = ishelper(58)
value=5150
ignorehitpause=1

[state ];記憶
type=selfstate
triggerall = name ="Crazy-Catastrophe"
triggerall = numhelper(987654321)>0
trigger1 = ishelper(987654321)
value=987654321
ignorehitpause=1

[state ];記憶２
type=selfstate
triggerall = name ="Crazy-Catastrophe"
triggerall = numhelper(444555666)>0
trigger1 = ishelper(444555666)
value=444555666
ignorehitpause=1


[State ];ランダムボイス
type = VarRandom
triggerall = name ="Crazy-Catastrophe"
trigger1 = numhelper(5150)>0
trigger1 = ishelper(5150)
v = 4
range = 0,2

[State ];賽銭箱の幅
type = VarRandom
triggerall = name ="Crazy-Catastrophe"
trigger1 = numhelper(5150)>0
trigger1 = ishelper(5150)
v = 6
range = 20,115

[State ];タミフルライフ
type = VarRandom
triggerall = name ="Crazy-Catastrophe"
trigger1 = numhelper(5150)>0
trigger1 = ishelper(5150)
v = 7
range = 1,999

[State ];死亡演出分岐
type = VarRandom
triggerall = name ="Crazy-Catastrophe"
trigger1 = numhelper(5150)>0
trigger1 = ishelper(5150)
trigger1 = helper(5150),stateno!=5150
v = 10
range = 0,1
