
[Statedef -2]

[State -2,AILv設定]
type=VarSet
triggerall=!ishelper
trigger1=RoundState=[1,2]
trigger1=var(59)
var(9)=1

;詳しくは説明書にある設定からどうぞ
;デフォルトだとAILvは1になっています
;基本的に1が一番弱く、5が一番強いです（動き的にはあまり変わりはない）
;簡易AIですのであまり期待しないでください


[State -2,パワーゲージ自動回復]
type=Varset
triggerall=!ishelper
trigger1=Roundstate=1
trigger2=Roundstate=2
var(8)=0;(0〜10)

;0以上の数字を入れると自動的にパワーゲージが回復するようになります
;基本的にゲージ技への依存度が結構高いので必然的に強くなりますよ！
;目安としては最大値を10として扱います


[State -2,援軍を使用するか否か]
type=VarSet
trigger1=!ishelper
var(21)=1

;0だと援軍を使用しません
;1だと援軍を使用します。（デフォルト）

[State -2,神威ノ奔流ヒット後に追撃で飛び道具を使うか]
type=Varset
trigger1=!ishelper
var(23)=1

;0だと追撃で鉄槌を使用せず近接攻撃を仕掛けます
;1だと空中にいる相手に飛び道具でぶつけて大ダメージを狙います


[State -2,食らいキャンセルガードを適用するか]
type=VarSet
trigger1=!ishelper
var(47)=1

;var(47)=1で起動します（デフォルト）
;var(47)=0で起動しません
;連続で相手の攻撃が30ヒットすると食らい抜けを行います
;永久対策になるので狂相手ならONでもいいと思います








[State -2,割合ダメージ]
type=AttackMulSet
triggerall=numenemy
trigger1=enemynear,const(data.defence)>100
trigger2=enemynear,lifemax>1000
value=ceil(0.00001*ifelse(enemynear,const(data.defence)>100,enemynear,const(data.defence),100)*ifelse(enemynear,lifemax>1000,enemynear,lifemax,1000))
ignorehitpause=1

[State -2,ガード不能命令]
type=null;AssertSpecial
trigger1=1
flag=NoStandGuard
flag2=NoCrouchGuard
flag3=NoAirGuard

[State -2,試合外はNOKO]
type=assertspecial
triggerall=!ishelper
trigger1=Roundstate!=2
flag=noko
ignorehitpause=1

;=====================================
;デバッグ用記述
;=====================================
[State -2]
type=Displaytoclipboard
trigger1=!ishelper
text="Guard:%d Enemylife:%d nage:%d AILv:%d"
params=var(47),var(19),var(2),var(9)
ignorehitpause=1

;======================================
;======================================
;AIレベル表示
;======================================
;======================================
[State -2,AI表記-1P側]
type=Explod
triggerall=!ishelper
triggerall=TeamSide=1
trigger1=RoundState=2
trigger1=!numexplod(9672)
anim=9672
id=9672
sprpriority=5
postype=left
pos=6,230
supermove=1
bindtime=-1
pausemovetime=99999999
supermovetime=99999999
scale=0.5,0.5
ignorehitpause=1
[State -2,AI表記-Lv1]
type=Explod
triggerall=!ishelper
triggerall=TeamSide=1
trigger1=RoundState=2
trigger1=!numexplod(9673)
trigger1=var(9)=1
anim=9673
id=9673
sprpriority=5
postype=left
pos=19,228
supermove=1
bindtime=-1
pausemovetime=99999999
supermovetime=99999999
scale=0.4,0.4
ignorehitpause=1
[State -2,AI表記-Lv2]
type=Explod
triggerall=!ishelper
triggerall=TeamSide=1
trigger1=RoundState=2
trigger1=!numexplod(9674)
trigger1=var(9)=2
anim=9674
id=9674
sprpriority=5
postype=left
pos=19,228
supermove=1
bindtime=-1
pausemovetime=99999999
supermovetime=99999999
scale=0.4,0.4
ignorehitpause=1
[State -2,AI表記-Lv3]
type=Explod
triggerall=!ishelper
triggerall=TeamSide=1
trigger1=RoundState=2
trigger1=!numexplod(9675)
trigger1=var(9)=3
anim=9675
id=9675
sprpriority=5
postype=left
pos=19,228
supermove=1
bindtime=-1
pausemovetime=99999999
supermovetime=99999999
scale=0.4,0.4
ignorehitpause=1
[State -2,AI表記-Lv4]
type=Explod
triggerall=!ishelper
triggerall=TeamSide=1
trigger1=RoundState=2
trigger1=!numexplod(9676)
trigger1=var(9)=4
anim=9676
id=9676
sprpriority=5
postype=left
pos=19,228
supermove=1
bindtime=-1
pausemovetime=99999999
supermovetime=99999999
scale=0.4,0.4
ignorehitpause=1
[State -2,AI表記-Lv5]
type=Explod
triggerall=!ishelper
triggerall=TeamSide=1
trigger1=RoundState=2
trigger1=!numexplod(9677)
trigger1=var(9)=5
anim=9677
id=9677
sprpriority=5
postype=left
pos=19,228
supermove=1
bindtime=-1
pausemovetime=99999999
supermovetime=99999999
scale=0.4,0.4
ignorehitpause=1
[State -2,AI表記-2P側]
type=Explod
triggerall=!ishelper
triggerall=TeamSide=2
trigger1=RoundState=2
trigger1=!numexplod(9672)
anim=9672
id=9672
sprpriority=5
postype=right
pos=-30,230
supermove=1
bindtime=-1
pausemovetime=99999999
supermovetime=99999999
scale=0.5,0.5
ignorehitpause=1
[State -2,AI表記-Lv1]
type=Explod
triggerall=!ishelper
triggerall=TeamSide=2
trigger1=RoundState=2
trigger1=!numexplod(9673)
trigger1=var(9)=1
anim=9673
id=9673
sprpriority=5
postype=right
pos=-29,228
supermove=1
bindtime=-1
pausemovetime=99999999
supermovetime=99999999
scale=0.4,0.4
ignorehitpause=1
[State -2,AI表記-Lv2]
type=Explod
triggerall=!ishelper
triggerall=TeamSide=2
trigger1=RoundState=2
trigger1=!numexplod(9674)
trigger1=var(9)=2
anim=9674
id=9674
sprpriority=5
postype=right
pos=-29,228
supermove=1
bindtime=-1
pausemovetime=99999999
supermovetime=99999999
scale=0.4,0.4
ignorehitpause=1
[State -2,AI表記-Lv3]
type=Explod
triggerall=!ishelper
triggerall=TeamSide=2
trigger1=RoundState=2
trigger1=!numexplod(9675)
trigger1=var(9)=3
anim=9675
id=9675
sprpriority=5
postype=right
pos=-29,228
supermove=1
bindtime=-1
pausemovetime=99999999
supermovetime=99999999
scale=0.4,0.4
ignorehitpause=1
[State -2,AI表記-Lv4]
type=Explod
triggerall=!ishelper
triggerall=TeamSide=2
trigger1=RoundState=2
trigger1=!numexplod(9676)
trigger1=var(9)=4
anim=9676
id=9676
sprpriority=5
postype=right
pos=-19,228
supermove=1
bindtime=-1
pausemovetime=99999999
supermovetime=99999999
scale=0.4,0.4
ignorehitpause=1
[State -2,AI表記-Lv5]
type=Explod
triggerall=!ishelper
triggerall=TeamSide=2
trigger1=RoundState=2
trigger1=!numexplod(9677)
trigger1=var(9)=5
anim=9677
id=9677
sprpriority=5
postype=right
pos=-16,228
supermove=1
bindtime=-1
pausemovetime=99999999
supermovetime=99999999
scale=0.4,0.4
ignorehitpause=1

;======================================
;残像
;======================================

[State ]
type=AfterImage
trigger1=time%3=0
time=61
palbright=0,0,0
palcontrast=156,156,256
paladd=12,10,15
palmul=1.0,1.0,1.0
length=10
framegap=1
timegap=1
persistent=0
ignorehitpause=1

;======================================
;======================================
;AI及びシステム
;======================================
;======================================

[state -2, ステートを奪われている時間計測-初期化]
type=Varset
triggerall=!ishelper
trigger1=roundstate=2
trigger1=ctrl=1
var(2)=0
[state -2, ステートを奪われている時間計測-実行]
type=Varadd
triggerall=!ishelper
triggerall=roundstate=2
trigger1=movetype=H
trigger1=stateno!=[5000,5500]
var(2)=1

[State -2,敵ライフ測定]
type=Varset
triggerall=!ishelper
trigger1=Roundstate=2
var(19)=Enemynear,life

[State -2,相手起き上がり時無敵]
type=NotHitBy
trigger1=p2stateno=5120
trigger1=enemynear,AnimTime=-1
value=SCA,AA,AT,AP
time=20
ignorehitpause=1
[State -2, ガード中投げ無敵]
type=NotHitBy
triggerall=!ishelper
trigger1=(StateNo=[130,140))||(StateNo=(140,160))
value=,AT
time=1
ignorehitpause=1
[State -2,ヒット数が上限を超えると無敵]
type=NotHitBy
triggerall=!ishelper
trigger1=Hitcount>=30
value=SCA
time=5
ignorehitpause=1
[State -2,ゼーレが場に出ている、もしくは相手が食らい状態だと無敵]
type=NotHitby
triggerall=!ishelper
trigger1=numhelper(31003100)
trigger2=Enemynear,Movetype=H
value=SCA
time=1
ignorehitpause=1

[State -2]
type=LifeAdd
triggerall=!ishelper
trigger1=GetHitVar(damage)=Life
trigger1=GetHitVar(damage)>=100
value=1
kill=1
ignorehitpause=1

[State -2,ゲジマシ]
type=Poweradd
trigger1=!ishelper
value=var(8)+1
ignorehitpause=1

[State -2,被弾時ゲージ回復]
type=Poweradd
trigger1=!ishelper
trigger1=Gethitvar(damage)
value=gethitvar(damage)*Random%60
ignorehitpause=1

[state -2]
type=null;Helper
triggerall=!ishelper
trigger1=!numhelper(112233)
trigger1=Roundstate<4 
stateno=112233
name="reversal"
id=112233
pos=0,0
postype=p1 
keyctrl=0
ownpal=1
helpertype=player
supermovetime=9999999999999
pausemovetime=9999999999999
ignorehitpause=1

[State -2]
type=Selfstate
triggerall=!time 
trigger1=ishelper(112233)
value=112233
ignorehitpause=1

[State -2]
type=Selfstate
trigger1=ishelper(20000)
trigger1=stateno!=20000
value=20000
ignorehitpause=1

[State -2, 300以上のダメージ感知、もしくは拘束時間が長すぎるとガードステートへ移行]
type=SelfState
triggerall=!ishelper
triggerall=alive
triggerall=movetype=H
trigger1=GetHitVar(damage)>300
trigger2=var(2)=1200
value=130
ignorehitpause=1

[State -2, スイッチON時、ヒット数30越えでガードステートへ移行]
type=SelfState
triggerall=!ishelper
triggerall=alive
triggerall=movetype=H
triggerall=var(47)=1
trigger1=GetHitVar(hitcount)>=30
value=130
ignorehitpause=1

;---------------------------------------------------------------------------
[Statedef -3]

[State -3]
type=RemoveExplod
trigger1=StateNo != 220
id=6050

[State -3]
type=RemoveExplod
trigger1=StateNo != 225
id=6051

[State -3]
type=RemoveExplod
trigger1=StateNo != 230
id=6052

[State -3]
type=RemoveExplod
trigger1=StateNo != 420
id=6053

[State -3]
type=RemoveExplod
trigger1=StateNo != 430
id=6054

[State -3]
type=RemoveExplod
trigger1=StateNo != 620
trigger2=StateType != A
id=6055

[State -3]
type=RemoveExplod
trigger1=StateNo != 630
trigger2=StateType != A
id=6056

[State -3]
type=StopSnd
trigger1=movetype=H
channel=4

[State -3]
type=PlaySnd
triggerall=time=1
trigger1=Stateno=50
value=1,2

[State -3]
type=PlaySnd
triggerall=time=1
trigger1=Stateno=100
value=1,1

[State -3]
type=PlaySnd
triggerall=time=1
trigger1=Stateno=105
value=1,1

[State -3]
type=PlaySnd
triggerall=time=1
trigger1=Stateno=52
value=1,3

[State -3]
type=StopSnd
trigger1=Movetype=H
channel=0

[State -3]
type=StopSnd
trigger1=stateno=[1,194]
trigger2=stateno=[196,9999]
channel=3

[State -3]
type=RemoveExplod
trigger1=StateNo != 3300
id=6110

[State -3]
Type=Helper
Trigger1=!NumHelper(20000)
Trigger1=!var(59)&&Alive&&RoundState=2&&((PrevStateNo=[191,193])||PrevStateNo=5900)&&StateNo=0&&Ctrl
HelperType=Normal
Name="AI"
StateNo=20000
ID=20000
Pos=9999,9999
KeyCtrl=1
PauseMoveTime=2147483647
SuperMoveTime=2147483647

[State -3]
type=VarSet
triggerall=!var(59)
triggerall=RoundState=[1,2]
triggerall=StateNo != [6000,6500]
trigger1=Command="AI0"
trigger2=Command="AI1"
trigger3=Command="AI2"
trigger4=Command="AI3"
trigger5=Command="AI4"
trigger6=Command="AI5"
trigger7=Command="AI6"
trigger8=Command="AI7"
trigger9=Command="AI8"
trigger10=Command="AI9"
trigger11=Command="AI10"
trigger12=Command="AI11"
trigger13=Command="AI12"
trigger14=Command="AI13"
trigger15=Command="AI14"
trigger16=Command="AI15"
trigger17=Command="AI16"
trigger18=Command="AI17"
trigger19=Command="AI18"
trigger20=Command="AI19"
trigger21=Command="AI20"
trigger22=Command="AI21"
trigger23=Command="AI22"
trigger24=Command="AI23"
trigger25=Command="AI24"
trigger26=Command="AI25"
trigger27=Command="AI26"
trigger28=Command="AI27"
trigger29=Command="AI28"
trigger30=Command="AI29"
trigger31=Command="AI30"
trigger32=Command="AI31"
trigger33=Command="AI32"
trigger34=Command="AI33"
trigger35=Command="AI34"
trigger36=Command="AI35"
trigger37=Command="AI36"
trigger38=Command="AI37"
trigger39=Command="AI38"
trigger40=Command="AI39"
trigger41=Command="AI40"
trigger42=Command="AI41"
trigger43=Command="AI42"
trigger44=Command="AI43"
trigger45=Command="AI44"
trigger46=Command="AI45"
trigger47=Command="AI46"
trigger48=Command="AI47"
trigger49=Command="AI48"
trigger50=Command="AI49"
trigger51=Command="AI50"
trigger52=numhelper(20000)
trigger52=helper(20000),var(59)
var(59)=1




