[Statedef -2]
;-----------------------------------------------------------------------
; OPTION
;AIスイッチ
[State -1]
type = VarSet
trigger1=command="ai01"|command="ai02"|command="ai03"|command="ai04"|command="ai05"|command="ai06"|command="ai07"|command="ai08"|command="ai09"
trigger2=command="ai11"|command="ai12"|command="ai13"|command="ai14"|command="ai15"|command="ai16"|command="ai17"|command="ai18"|command="ai19"
trigger3=command="ai21"|command="ai22"|command="ai23"|command="ai24"|command="ai25"|command="ai26"|command="ai27"|command="ai28"|command="ai29"
trigger4=command="ai31"|command="ai32"|command="ai33"|command="ai34"|command="ai35"|command="ai36"|command="ai37"|command="ai38"|command="ai39"
trigger5=command="ai41"|command="ai42"|command="ai43"|command="ai44"|command="ai45"|command="ai46"|command="ai47"|command="ai48"|command="ai49"||var(59)
trigger6=command="ai41"|command="ai42"|command="ai43"|command="ai44"|command="ai45"|command="ai46"|command="ai47"|command="ai48"|command="ai49"||command="ai50"
trigger7=0 ;常時AI onスイッチ 1で常時AI　0で人操作可能　AI戦させる場合は必ず1にする事。
var(59) = 8 ; AILv 1-10まで Def 8
;Lvは1-10まで。
;1-3 ガード無し、超必殺技はぶっぱでしか使わない。
;4-7 そこそこ強い、コンボを落とす可能性あり。起き攻めをしない。カーズド・インフェルニティは使用しない。
;8-10 対AI想定 
;-----------------------------------------------------------------------
; 使い魔ブラッド(斧)常時召喚ありかなしか
; デフォ　無し
[State ]
type = varset
trigger1 = !Ishelper && !(var(0)&4) && !sysvar(0)
trigger1 = 0 ;ここの数字を変更 1であり 0で無し
var(0)=(var(0)|4)
Ignorehitpause=1
;-----------------------------------------------------------------------
; 使い魔シャドウ(犬)常時召喚ありかなしか
; デフォ　無し
[State ]
type = varset
trigger1 = !Ishelper && !(var(0)&8) && !sysvar(0)
trigger1 = 0 ;ここの数字を変更 1であり 0で無し
var(0)=(var(0)|8)
Ignorehitpause=1



;-----------------------------------------------------------------------
; 設定ここまで ここから先は弄らない事
;-----------------------------------------------------------------------
[State ]
type = varset
trigger1 = !Ishelper && !(sysvar(0)&1)
trigger1 = 0
sysvar(0)=(sysvar(0)|1)
Ignorehitpause=1
;-----------------------------------------------------------------------
[State ]
type=assertspecial
trigger1=!Ishelper&&(var(10)-(var(10)&1023)&2**18-1)/1024 > 0 || sysvar(0)
trigger2=Ishelper
trigger2=(root,var(10)-(root,var(10)&1023)&2**18-1)/1024 > 0 && !root,sysvar(0)
flag=unguardable
Ignorehitpause=1
[State ]
type=Superpause
triggerall=Numenemy&&Ishelper
triggerall=Root,Sysvar(0)
trigger1=!Enemy,Alive&&!Enemy(Numenemy>1),Alive
time=2**31-1
movetime=2**31-1
anim=-1
darken=0
p2defmul=1
Ignorehitpause=1
[State ]
type=pause
triggerall=Numenemy&&Ishelper
triggerall=Root,Sysvar(0)
trigger1=!Enemy,Alive&&!Enemy(Numenemy>1),Alive
time=2**31-1
movetime=2**31-1
ignorehitpause=1
[State ]
type=Selfstate
trigger1=Ishelper(31010)+Ishelper(31020)+Ishelper(31030)+Ishelper(31040)+Ishelper(31050)+Ishelper(31060)+Ishelper(31070)+Ishelper(31080)+Ishelper(31090)+Ishelper(31100)+Ishelper(31110)+Ishelper(31120)+Ishelper(31130)
trigger2=Ishelper(31140)+Ishelper(31150)+Ishelper(31160)+Ishelper(31170)+Ishelper(31180)+Ishelper(31190)+Ishelper(31200)+Ishelper(31210)+Ishelper(31220)+Ishelper(31230)+Ishelper(31240)+Ishelper(31250)
value=Ifelse(Hitpausetime>0,26492,31010)
persistent=256
ignorehitpause=1
[State ]
type=Selfstate
trigger1=Ishelper
value=5900
persistent=256
Ignorehitpause=1
;-----------------------------------------------------------------------
;本体
[State ]
type=stopSnd
trigger1=stateno!=100&&!ishelper
channel=1
[State ]
type=varadd
trigger1=!sysvar(0)&&!ishelper
v=15
value=-1
[State ]
type=Removeexplod
trigger1=Anim!=400
ID=405
;-----------------------------------------------------------------------
; ボスモード判定
[State ]
type=varset
triggerall=!ishelper
trigger1=palno>=7||Sysvar(0)
trigger1=!var(0)||!(var(0)&1)
var(0)=var(0)|1
Ignorehitpause=1
;-----------------------------------------------------------------------
; CtrlFlag
[State ]
type=Null
triggerall=!ishelper
trigger1=!(var(0)&2)
trigger1=Ctrl||Gethitvar(damage)||Movetype=H||!numexplod(9600)
trigger1=var(0):=var(0)+2&&0
trigger2=Roundstate!=2&&(var(0)&2)
trigger2=var(0):=var(0)-2
Ignorehitpause=1
;-----------------------------------------------------------------------
; Helper1
[state ]
type=Helper
triggerall=!ishelper
trigger1=Numhelper(9600)=0&&!sysvar(0)
ID=9600
Stateno=9600
Name="Effect"
Helpertype=Player
Ownpal=1
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[State ]
type=Helper
triggerall=!ishelper
triggerall=Numhelper(9650)=0&&!sysvar(0)
trigger1=(var(1)&1023)>0
trigger2=(var(10)-(var(10)&1023)&2**18-1)/1024>0
ID=9650
Stateno=9650
Name="Marking"
Helpertype=Player
Ownpal=1
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[State ]
type=Helper
triggerall=!ishelper
triggerall=Numhelper(9700)=0&&!sysvar(0)
trigger1=Palno=12
ID=9700
Stateno=9700
Name="Projectile"
Helpertype=Player
Ownpal=1
Pausemovetime=2**31-1
Supermovetime=2**31-1
size.xscale=0
size.yscale=0
Ignorehitpause=1
[State ]
type=Helper
triggerall=!ishelper
triggerall=Numhelper(8000)=0&&!sysvar(0)&&RoundState=2
trigger1=(var(0)&4)
ID=8000
Stateno=1110
Name="Axe"
Ownpal=1
Ignorehitpause=1
[State ]
type=Helper
triggerall=!ishelper
triggerall=Numhelper(8100)=0&&!sysvar(0)&&RoundState=2
trigger1=(var(0)&8)
ID=8100
Stateno=1412
Name="Shadow"
Ownpal=1
Ignorehitpause=1
;-----------------------------------------------------------------------
;状態異常判定
;memo
;mugen | 返 | 正
;2**18 = 1048576 = 2**20
;2**23 = 1073741824 = 2**30
[State ]
type=varadd
trigger1=!Ishelper&&!sysvar(0)&&roundstate=2&&Anim!=3105&&(var(10)&1023)>0&&var(10)>0
var(10)=-1
Ignorehitpause=1
[State ]
type=varadd
trigger1=!Ishelper&&!sysvar(0)&&roundstate=2&&Anim!=3105&&(var(10)-(var(10)&1023)&2**18-1)/1024>0&&var(10)>0
var(10)=-1024
Ignorehitpause=1
[State ]
type=Null
triggerall=!Ishelper&&!sysvar(0)
trigger1=roundstate=2&&(Projhittime(3110)=[0,1])
trigger1=var(10):=var(10)+(600-(var(10)&1023))||1
trigger1=var(10):=var(10)+(600-((var(10)-(var(10)&1023)&2**18-1)/1024))*1024&&0
Ignorehitpause=1
[State ]
type=null
triggerall=!Ishelper&&!sysvar(0)
trigger1=roundstate!=2
trigger1=var(10):=0
Ignorehitpause=1
;-----------------------------------------------------------------------
;ダメージ補正
;-----------------------------------------------------------------------
[State ]
type = varset
triggerall=!ishelper
trigger1 =  !sysvar(0) 
fvar(0) = 1.0
[State ]
type = varset
triggerall=!ishelper
trigger1 =  !sysvar(0)  && Numenemy
trigger1 = enemynear,movetype = H && enemynear,gethitvar(hitcount) > 1
trigger1 = fvar(0) > 0
fvar(0) = ((100.0-((enemy,gethitvar(hitcount))*5.0))/100.0)
[State ]
type = varset
triggerall=!ishelper
trigger1 =  !sysvar(0) &&fvar(0) <= 0.2
fvar(0) = 0.2
[State ]
type = varset
triggerall=!ishelper
trigger1 =  !sysvar(0) && fvar(0) <= 0.5 && Stateno = [2000,3999]
fvar(0) = 0.5
[State ]
type = varset
triggerall=!ishelper
trigger1 = !sysvar(0) && Palno = 12
fvar(0) = fvar(0)*1.5
[State ]
type = attackmulset
triggerall=!ishelper
trigger1 =  !sysvar(0)
value = fvar(0)

;-----------------------------------------------------------------------
;( ﾟдﾟ )彡そう！
;-----------------------------------------------------------------------
[State ]
type=Turn
triggerall=Time=1&&!Sysvar(0)
triggerall=P2dist X<-5
trigger1=Stateno=[200,440]
trigger2=Stateno=1000
trigger3=Stateno=1050
trigger4=Stateno=[1600,1601]
trigger5=Stateno=[1700,1701]
trigger6=Stateno=1800
;-----------------------------------------------------------------------
;根性値
;-----------------------------------------------------------------------
[State ]
type = Defencemulset
trigger1 = (var(0)&1)
value = .75-.25*(palno=12)
[State ]
type = Defencemulset
trigger1 = Life < (Lifemax/10)*4
value = .75-.25*(Life < (Lifemax/10)*1.5) * IFelse((var(0)&1),.75-.25*(palno=12),1)
;-----------------------------------------------------------------------
; ダメージボイス
;-----------------------------------------------------------------------
[State ]
type = PlaySnd
triggerall = !ishelper
triggerall = Alive
triggerall = Time = 1
triggerall = StateNo = 5000 || StateNo = 5010 || StateNo = 5020
trigger1 = GethitVar(animtype)=[0,1]
value = 5000,Random%2 + 2*(GethitVar(animtype)=1)
channel = 2
volume=255
[State ]
type = PlaySnd
triggerall = !ishelper
triggerall = Alive
triggerall = Time = 1
triggerall = StateNo = 5000 || StateNo = 5010 || StateNo = 5020
trigger1 = GethitVar(animtype)>=2
value = 5000,4+Random%2 + 2*(GethitVar(animtype)>2)
channel = 2
volume=255
[State ]
type = playsnd
triggerall = !ishelper
trigger1 = Alive && Random%2 = 0
trigger1 = Numexplod(9600) = 0
trigger1 = Life < var(19)
value = 5000,0+random%2+2*((life-var(10))/5>5)+2*((life-var(10))/5>10)+2*((life-var(10))/5>20)
channel = 2
volume=255
[State ]
type = playsnd
triggerall = !ishelper
trigger1 = !Alive && var(19)
value = 11,1+random%2
channel = 2
volume=255
;-----------------------------------------------------------------------
;特殊カラーの強化
;-----------------------------------------------------------------------
[State ]
type = Poweradd
triggerall=!ishelper
trigger1 = Palno=11 && !sysvar(0)
value=PowerMax
Ignorehitpause=1
[State ]
type = Poweradd
triggerall=!ishelper
trigger1 = Palno=12 && !sysvar(0)
value=2
Ignorehitpause=1
;-----------------------------------------------------------------------
;Nothitby
;-----------------------------------------------------------------------
[State ]
type = NotHitBy
triggerall=!ishelper
trigger1 = Palno=12 && !sysvar(0)
value2 = ,AP
time = -1
Ignorehitpause=1
[State ]
type = NotHitBy
triggerall=!ishelper
trigger1 = (RoundState != 2 || !Alive)&& Numexplod(9600)
trigger2 = !Ctrl && Stateno = 0
value = SCA
time = 1
Ignorehitpause=1
;-----------------------------------------------------------------------
; Sysvar(0)
[State ]
type=statetypeset
trigger1=sysvar(0)&&!Ishelper
movetype=a
ignorehitpause=1
[State ]
type=Pause
trigger1=sysvar(0)&&!Ishelper
time=2**31-1
movetime=2**31-1
ignorehitpause=1
[State ]
type=SuperPause
trigger1=sysvar(0)&&!Ishelper
time=2**31-1
movetime=2**31-1
anim=-1
darken=0
p2defmul=1
ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(30000)=0&&sysvar(0)&&!Ishelper
ID=30000
Stateno=30000
Name="Wissen"
Helpertype=Player
Ownpal=1
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(30100)=0&&sysvar(0)&&!Ishelper
ID=30100
Stateno=30100
Name="Pain"
Helpertype=Player
Ownpal=1
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(30200)=0&&sysvar(0)&&!Ishelper
ID=30200
Stateno=30200
Name="Chronus"
Helpertype=Player
Ownpal=1
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
;---------------------------------------------------------------------------------
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31010)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31000
Stateno=31000
Name="Parent"
Helpertype=Player
Ownpal=1
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31010)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31901
Stateno=31900
Name="catastrophe1-H"
Helpertype=Player
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31020)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31000
Stateno=31000
Name="Parent"
Helpertype=Player
Ownpal=1
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31020)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31902
Stateno=31900
Name="catastrophe2-H"
Helpertype=Player
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31030)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31000
Stateno=31000
Name="Parent"
Helpertype=Player
Ownpal=1
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31030)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31903
Stateno=31900
Name="catastrophe3-H"
Helpertype=Player
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31040)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31000
Stateno=31000
Name="Parent"
Helpertype=Player
Ownpal=1
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31040)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31904
Stateno=31900
Name="catastrophe4-H"
Helpertype=Player
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31050)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31000
Stateno=31000
Name="Parent"
Helpertype=Player
Ownpal=1
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31050)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31905
Stateno=31900
Name="catastrophe5-H"
Helpertype=Player
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31060)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31000
Stateno=31000
Name="Parent"
Helpertype=Player
Ownpal=1
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31060)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31906
Stateno=31900
Name="catastrophe6-H"
Helpertype=Player
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31070)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31000
Stateno=31000
Name="Parent"
Helpertype=Player
Ownpal=1
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31070)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31907
Stateno=31900
Name="catastrophe7-H"
Helpertype=Player
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31080)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31000
Stateno=31000
Name="Parent"
Helpertype=Player
Ownpal=1
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31080)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31908
Stateno=31900
Name="catastrophe8-H"
Helpertype=Player
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31090)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31000
Stateno=31000
Name="Parent"
Helpertype=Player
Ownpal=1
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31090)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31909
Stateno=31900
Name="catastrophe9-H"
Helpertype=Player
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31100)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31000
Stateno=31000
Name="Parent"
Helpertype=Player
Ownpal=1
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31100)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31911
Stateno=31900
Name="catastrophe10-H"
Helpertype=Player
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31110)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31000
Stateno=31000
Name="Parent"
Helpertype=Player
Ownpal=1
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31110)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31911
Stateno=31900
Name="catastrophe11-H"
Helpertype=Player
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31120)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31000
Stateno=31000
Name="Parent"
Helpertype=Player
Ownpal=1
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31120)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31912
Stateno=31900
Name="catastrophe12-H"
Helpertype=Player
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31130)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31000
Stateno=31000
Name="Parent"
Helpertype=Player
Ownpal=1
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31130)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31913
Stateno=31900
Name="catastrophe13-H"
Helpertype=Player
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31140)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31000
Stateno=31000
Name="Parent"
Helpertype=Player
Ownpal=1
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31140)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31914
Stateno=31900
Name="catastrophe14-H"
Helpertype=Player
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31150)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31000
Stateno=31000
Name="Parent"
Helpertype=Player
Ownpal=1
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31150)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31915
Stateno=31900
Name="catastrophe15-H"
Helpertype=Player
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31160)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31000
Stateno=31000
Name="Parent"
Helpertype=Player
Ownpal=1
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31160)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31916
Stateno=31900
Name="catastrophe16-H"
Helpertype=Player
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31170)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31000
Stateno=31000
Name="Parent"
Helpertype=Player
Ownpal=1
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31170)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31917
Stateno=31900
Name="catastrophe17-H"
Helpertype=Player
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31180)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31000
Stateno=31000
Name="Parent"
Helpertype=Player
Ownpal=1
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31180)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31918
Stateno=31900
Name="catastrophe18-H"
Helpertype=Player
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31190)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31000
Stateno=31000
Name="Parent"
Helpertype=Player
Ownpal=1
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31190)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31919
Stateno=31900
Name="catastrophe19-H"
Helpertype=Player
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31200)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31000
Stateno=31000
Name="Parent"
Helpertype=Player
Ownpal=1
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31200)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31920
Stateno=31900
Name="catastrophe20-H"
Helpertype=Player
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31210)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31000
Stateno=31000
Name="Parent"
Helpertype=Player
Ownpal=1
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31210)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31921
Stateno=31900
Name="catastrophe21-H"
Helpertype=Player
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31220)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31000
Stateno=31000
Name="Parent"
Helpertype=Player
Ownpal=1
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31220)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31922
Stateno=31900
Name="catastrophe22-H"
Helpertype=Player
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31230)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31000
Stateno=31000
Name="Parent"
Helpertype=Player
Ownpal=1
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31230)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31923
Stateno=31900
Name="catastrophe23-H"
Helpertype=Player
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31240)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31000
Stateno=31000
Name="Parent"
Helpertype=Player
Ownpal=1
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31240)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31924
Stateno=31900
Name="catastrophe24-H"
Helpertype=Player
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31250)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31000
Stateno=31000
Name="Parent"
Helpertype=Player
Ownpal=1
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(31250)=0&&sysvar(0)&&Numhelper(39000)=0&&(var(0)&32)
ID=31925
Stateno=31900
Name="catastrophe25-H"
Helpertype=Player
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
;---------------------------------------------------------------------------------
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(37000)=0&&(var(0)&32)&&sysvar(0)
ID=37000
Stateno=37000
Name="Gethit-Last"
Helpertype=Player
Ownpal=1
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(38000)=0&&(var(0)&32)&&sysvar(0)
ID=38000
Stateno=38000
Name="Last2"
Helpertype=Player
Ownpal=1
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
[state ]
type=Helper
trigger1=!Ishelper&&Numhelper(39000)=0&&(var(0)&32)&&sysvar(0)
ID=39000
Stateno=39000
Name="Last"
Helpertype=Player
Ownpal=1
Pausemovetime=2**31-1
Supermovetime=2**31-1
Ignorehitpause=1
;-----------------------------------------------------------------------
;処理
;-----------------------------------------------------------------------
[State ]
type=HitBy
trigger1=sysvar(0)&&!Ishelper
value=
time=-1
IGnorehitpause=1
[State ]
type=HitBy
trigger1=sysvar(0)&&!Ishelper&&0
value2=
time=-1
IGnorehitpause=1
[State ]
type=Hitoverride
trigger1=sysvar(0)&&!Ishelper
attr=SCA,AA,AP,AT
Stateno=Stateno
Time=-1
IGnorehitpause=1
[State ]
type=Hitoverride
trigger1=sysvar(0)&&!Ishelper
attr=SCA,AA,AP,AT
Stateno=Stateno
Time=-1
Slot=Random%8
IGnorehitpause=1
[State ]
type=Screenbound
trigger1=sysvar(0)&&!Ishelper
value=0
IGnorehitpause=1
[State ]
type=PlayerPush
trigger1=sysvar(0)&&!Ishelper
value=0
IGnorehitpause=1
[State ]
type=Assertspecial
trigger1=sysvar(0)&&!Ishelper
flag=nowalk
flag2=noautoturn
flag3=noshadow
IGnorehitpause=1
[State ]
type=ctrlset
triggerall=Roundstate>1&&(var(0)&2)&&sysvar(0)&&!Ishelper
trigger1=var(9)=0||(var(9)=[10,12])||var(9)=20||var(9)=50
value=1
ignorehitpause=1
[State ]
type=turn
triggerall=roundstate>1&&!ishelper&&numenemy&&Sysvar(0)&&statetype!=A
trigger1=ctrl
trigger1=(enemynear(Numenemy>1&&!enemynear,alive&&RoundState<3),pos X-pos X)*facing<=-5
ignorehitpause=1
[State ]
type=Null
triggerall=roundstate>1&&!ishelper&&Sysvar(0)
trigger1=var(0):=var(0)+1*!(var(0)&1)*((ctrl||Roundstate<2)&&facing=1)||1
trigger1=var(0):=var(0)-(var(0)&1)*((ctrl||Roundstate<2)&&facing!=1)||1
ignorehitpause=1
;-----------------------------------------------------------------------
;-2ラスト
;-----------------------------------------------------------------------
[State ]
type = Varset
trigger1 =  !sysvar(0)&&!Ishelper
var(19)=(Life + (!Life)) *Alive
Ignorehitpause=1
;-----------------------------------------------------------------------
;-2 スイッチオン
;-----------------------------------------------------------------------

[State ]
type=Null
trigger1=var(8):=sysvar(2)||var(9):=sysvar(3)||1
IGnorehitpause=1
;-----------------------------------------------------------------------
; Life処理
;-----------------------------------------------------------------------
[State ]
type=VarSet
trigger1=sysvar(4)<1&&RoundState<2&&sysvar(0)&&!Ishelper
sysvar(4)=Lifemax
Ignorehitpause=1
[State ]
type=Hitfallset
trigger1=sysvar(0)&&!Ishelper
Ignorehitpause=1
[State ]
type=Lifeset
trigger1=sysvar(0)&&!Ishelper
value=Lifemax;sysvar(4)
Ignorehitpause=1
[State ]
type=Lifeset
trigger1=sysvar(0)&&!Ishelper&&Life<1
trigger1=!(sysvar(0)&2)
value=1
Ignorehitpause=1
[State ]
type=Null
trigger1=var(8):=var(8)+1||1
Ignorehitpause=1
[State ]
type=velset
trigger1=sysvar(0)&&!Ishelper
x=fvar(0)
y=fvar(1)
Ignorehitpause=1
[State ]
type=Selfstate
triggerall=sysvar(0)&&!Ishelper
trigger1=Hitpausetime>0
value=134217726
Ignorehitpause=1
[State ]
type=Selfstate
triggerall=sysvar(0)&&!Ishelper
trigger1=stateno!=var(9)||!numexplod(9600)
value=var(9)
Ignorehitpause=1
;---------------------------------------------------------------------------
[Statedef -3]
[State ]
type=Explod
trigger1=!Ishelper
ID=9600
anim=8888
removetime=1
supermove=1
pausemovetime=2
ignorehitpause=1
[State ]
type=Varrangeset
triggerall=!Ishelper
trigger1=Roundsexisted=0&&Stateno=5900
value=0
Ignorehitpause=1
[State ]
type=Varrangeset
triggerall=!Ishelper
trigger1=Roundsexisted=0&&Stateno=5900
fvalue=0
Ignorehitpause=1
;-----------------------------------------------------------------------
; ハイジャンプ処理
;-----------------------------------------------------------------------
[State ]
type = varset
triggerall =  !sysvar(0)&&!Ishelper
trigger1 = stateno = 10
trigger1 = time = 0
trigger2 = stateno = 100
v = 15
value = 20

[State ]
type = varset
triggerall =  !sysvar(0)&&!Ishelper
trigger1 = stateno = 52
trigger1 = time = 0
v = 15
value = 0

[State ]
type = varset
triggerall =  !sysvar(0)&&!Ishelper
trigger1 = stateno = 40
trigger1 = command != "holdup"
v = 16
value = 1

[State ]
type = varset
triggerall =  !sysvar(0)&&!Ishelper
trigger1 = stateno = 40
trigger1 = command = "holdup"
v = 16
value = 0

[State ]
type = AfterImage
triggerall =  !sysvar(0)&&!Ishelper
triggerall = !ishelper
trigger1 = var(15) >= 1
trigger1 = stateno = 50 && Time = 1
time = 25
trans = add1
length = 4
timeGap = 3
frameGap = 1
palBright = 0, 0, 0
palContrast = 128, 128, 128
palAdd = 0, 0, 0
palMul = 1, 1, 1

[State SS Flag]
type=Null
triggerall=Numenemy && !Ishelper
trigger1=(var(0)&32)&&!Numhelper&&Roundstate<2
trigger1=var(0):=(var(0)-32)&&0
trigger2=!(var(0)&32)&&Numhelper+Enemy,Numhelper+Enemy(numenemy>1),Numhelper=0&&!Numpartner
trigger2=var(0):=(var(0)|32)
trigger3=NumPartner
trigger3=!(var(0)&32)&&Numhelper+Enemy,Numhelper+Enemy(numenemy>1),Numhelper+Partner,Numhelper=0
trigger3=var(0):=(var(0)|32)
Ignorehitpause=1
[State ]
type=varset
triggerall=Numenemy && !Ishelper
trigger1=(Var(0)&128)
trigger1=Numhelper(31250)=0
var(0)=var(0)-128
Ignorehitpause=1
[State ]
type=varset
triggerall=!(Var(0)&128)&&!Ishelper
triggerall=numhelper(31901)*numhelper(31902)*numhelper(31903)*numhelper(31904)*numhelper(31905)*numhelper(31906)*numhelper(31907)*numhelper(31908)*numhelper(31909)*numhelper(31910)*numhelper(31911)
triggerall=numhelper(31912)*numhelper(31913)*numhelper(31914)*numhelper(31915)*numhelper(31916)*numhelper(31917)*numhelper(31918)*numhelper(31919)*numhelper(31920)*numhelper(31921)*numhelper(31922)
triggerall=numhelper(31923)*numhelper(31924)*numhelper(31925)
trigger1=(helper(31901),ID%256=[30,60])*(helper(31902),ID%256=[30,60])*(helper(31903),ID%256=[30,60])*(helper(31904),ID%256=[30,60])*(helper(31905),ID%256=[30,60])*(helper(31906),ID%256=[30,60])
trigger1=(helper(31907),ID%256=[30,60])*(helper(31908),ID%256=[30,60])*(helper(31909),ID%256=[30,60])*(helper(31910),ID%256=[30,60])*(helper(31911),ID%256=[30,60])*(helper(31912),ID%256=[30,60])
trigger1=(helper(31913),ID%256=[30,60])*(helper(31914),ID%256=[30,60])*(helper(31915),ID%256=[30,60])*(helper(31916),ID%256=[30,60])*(helper(31917),ID%256=[30,60])*(helper(31918),ID%256=[30,60])
trigger1=(helper(31919),ID%256=[30,60])*(helper(31920),ID%256=[30,60])*(helper(31921),ID%256=[30,60])*(helper(31922),ID%256=[30,60])*(helper(31923),ID%256=[30,60])*(helper(31924),ID%256=[30,60])
trigger1=(helper(31925),ID%256=[30,60])
var(0)=(var(0)|128)
Ignorehitpause=1
[State ]
type=varset
triggerall=Numenemy && !Ishelper
trigger1=Stateno=5900&&RoundState<2
sysvar(3)=5900
Ignorehitpause=1
[State ]
type=ChangeState
triggerall=Numenemy && !Ishelper
trigger1=Stateno=5900&&RoundState<2
value=var(9):=5900+(var(8):=0)
Ignorehitpause=1
[State ]
type=Displaytoclipboard
trigger1=!Ishelper&&1;AI debug
text="Dist,%d,%d"
params=floor(P2bodydist X),floor(P2bodydist Y)
IGnorehitpause=1
