;-----------------------------------------------------------------------------
[Statedef -2]
;-----------------------------------------------------------------------
; OPTION
;AIXCb`
[State -1]
ignorehitpause = 1
type = VarSet
triggerall=numexplod(9601)>1 ;\j~
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=Numhelper(9601)
trigger7=helper(9601),var(59)>0
trigger8=0 ;펞AI onXCb` 1ŏ펞AI@0Ől\ 
var(59) = 8	; AILv 1-8 
;Ȃ̂6ȉ͂ ܂ςȂB
;-----------------------------------------------------------------------------
[State ];JbgC̗L
type = Null
trigger1 = 1; 1ŃJbgCL 0ŃJbgC
trigger1 = var(0):=(var(0)|4)
Ignorehitpause = 1
;-----------------------------------------------------------------------------
[State ];GtFNgJ[
type = Null
trigger1 = 1 || var(30):=0;R
trigger1 = 1 || var(31):=256;G
trigger1 = 1 || var(32):=0;B
Ignorehitpause = 1

;-----------------------------------------------------------------------------
; ܂
;-----------------------------------------------------------------------------
[State ]
type = Null
trigger1 = Palno%6 = 0
trigger1 = var(0):=(var(0)|1)
Ignorehitpause = 1

[State ]
type = RemoveExplod
trigger1 = Anim != 0
ID = 1

[State ]
type = AfterImagetime
trigger1 = Movetype = H
time = 0

;---------------------------------------------------------------------------------
; ␳
;---------------------------------------------------------------------------------
[State ]
type=varset
trigger1=!Ishelper
fvar(0)=1.0
Ignorehitpause=1
[State ]
type=varset
trigger1=!Ishelper&&!Numtarget
fvar(1)=0
Ignorehitpause=1
[State ]
type=varadd
triggerall=!Ishelper&&Numtarget
trigger1=Movehit=1
trigger2=projhitid(2100)=1
fvar(1)=1
[State ]
type=varset
triggerall=!Ishelper
trigger1=Stateno != [2000,3999]
fvar(2)=0
Ignorehitpause=1
[State ]
type=varset
triggerall=!Ishelper
trigger1=Stateno = [2000,3999]
trigger1=PrevStateno = [1000,1999]
fvar(2)=0.1
Ignorehitpause=1
[State ]
type=varset
triggerall=!Ishelper
trigger1=Stateno = [2000,3999]
trigger1=PrevStateno = [2000,3999]
trigger1=Stateno%10=0
fvar(2)=0.2
Ignorehitpause=1
[State ]
type=varset
triggerall=!Ishelper
triggerall=numenemy
trigger1=EnemyNear,movetype=H
trigger1=EnemyNear,gethitvar(hitcount)>1
fvar(0)=1.0 - (0.05*fvar(1))
Ignorehitpause=1
[State ]
type=varset
triggerall=!Ishelper
trigger1=fvar(0)<0.1
fvar(0)=0.1
Ignorehitpause=1
[State ]
type=varset
trigger1=!Ishelper
trigger1=fvar(0)<0.5
trigger1=Stateno=[2000,4000]
fvar(0)=0.5
Ignorehitpause=1
[State ]
type=varset
triggerall=!Ishelper
trigger1=Stateno=[2400,2410]
trigger2=Stateno=[2500,2510]
fvar(0)=1
Ignorehitpause=1
[State ]
type=varset
trigger1=!Ishelper
fvar(0)=fvar(0)-fvar(2)
Ignorehitpause=1
[State ]
type=varset
trigger1=!Ishelper
fvar(0)=fvar(0)*.8
Ignorehitpause=1
[State ]
type=varset
trigger1=!Ishelper
trigger1=Palno=12
fvar(0)=1
Ignorehitpause=1
[State ]
type=varset
trigger1=!Ishelper
trigger1=(var(0)&1)
fvar(0)=fvar(0)*1.25
Ignorehitpause=1
[State ]
type=attackmulset
trigger1=!Ishelper
value=fvar(0)
Ignorehitpause=1
;---------------------------------------------------------------------------------
; l
;---------------------------------------------------------------------------------

[State ]
type=defencemulset
trigger1=!Ishelper
trigger1=(var(0)&1)
value=0.5
Ignorehitpause=1
[State ]
type=defencemulset
trigger1=!Ishelper
trigger1=Life<Lifemax/ifelse((var(0)&1),4,8)
value=(0.8-0.2*(Life<Lifemax/10))*Ifelse((var(0)&1),0.5,1)
Ignorehitpause=1

;-----------------------------------------------------------------------
; _[W{CX
;-----------------------------------------------------------------------
[State ]
type = PlaySnd
triggerall = !ishelper
triggerall = Alive
triggerall = Time = 1 && Random%2
triggerall = StateNo = 5000 || StateNo = 5010 || StateNo = 5020
trigger1 = GethitVar(animtype)=[0,2]
value = 5000,(GethitVar(animtype)>=1) + (GethitVar(animtype)>1)
channel = 2
volume=255
[State ]
type = PlaySnd
triggerall = !ishelper
triggerall = Alive
triggerall = Time = 1 && Random%2
triggerall = StateNo = 5000 || StateNo = 5010 || StateNo = 5020
trigger1 = GethitVar(animtype)>=3
value = 5001,Random%4
channel = 2
volume=255
[State ]
type = playsnd
triggerall = !ishelper
trigger1 = Alive && Random%5 = 0
trigger1 = Numexplod(9600) = 0
trigger1 = var(19) - Life > 5
value = 5001,Random%4
channel = 2
volume=255
;--------------------------------------------------------------------------------
; S
;--------------------------------------------------------------------------------
[State ]
type = null
trigger1 = Alive 
trigger1 = var(0):=(var(0)|2)-2
[State ]
type = Playsnd
trigger1 = !Alive && !(var(0)&2)
trigger1 = var(0):=(var(0)|2) || 1
value = 11,Ifelse(Stateno=5400,4,1+Random%3)
;-----------------------------------------------------------------------
; {X[hQ[W
[State ]
type=Poweradd
triggerall=RoundState=2&&!Ishelper
trigger1=power>var(18) && (var(0)&1)
value=floor((power-var(18))*0.8)
ignorehitpause=1
;-----------------------------------------------------------------------
; 12P 
;-----------------------------------------------------------------------
[State ]
type=Poweradd
triggerall=RoundState=2&&!Ishelper
trigger1=Palno=12
value=5
ignorehitpause=1
;-----------------------------------------------------------------------
[State ]
type=Lifeadd
triggerall=Palno=12&&RoundState=2&&!Ishelper
trigger1=GameTime%10=0 && Life < Lifemax / 4
trigger2=var(16) - Life > (Lifemax / 8) * 7
value=2
ignorehitpause=1
;-----------------------------------------------------------------------
;-2Xg
;-----------------------------------------------------------------------
[State ]
type = Varset
trigger1 = !Ishelper
trigger1 = Movetype!=H
trigger1 = Numexplod(9600)
var(16)=Life
Ignorehitpause=1
[State ]
type = Varset
trigger1 = !Ishelper
trigger1 = Movetype!=H
trigger1 = Numexplod(9600)
var(17)=(Life + (!Life)) *Alive
Ignorehitpause=1
[State ]
type = Varset
trigger1 = !Ishelper
var(18)=Power
Ignorehitpause=1
[State ]
type = Varset
trigger1 = !Ishelper
var(19)=(Life + (!Life)) *Alive
Ignorehitpause=1
;---------------------------------------------------------------------------------
[Statedef -3]
;---------------------------------------------------------------------------------
; Xe[gD抴mpexplod
[State ]
type=Explod
trigger1=!Ishelper
ID=9600
anim=8888
removetime=1
supermove=1
pausemovetime=2
ignorehitpause=1
; Xe[gD抴mpexplod2
[State ]
type=Explod
trigger1=!Ishelper
ID=9601
anim=8888
removetime=2
supermove=1
pausemovetime=2
ignorehitpause=1
;---------------------------------------------------------------------------------
; JVarZbg
[State ]
type = VarRangeSet
trigger1 = roundsexisted = 0 && !Ishelper
trigger1 = Stateno = 5900
value = 0

[State ]
type = VarRangeSet
trigger1 = roundsexisted = 0 && !Ishelper
trigger1 = Stateno = 5900
fvalue = 0

[state ]
type=velmul
trigger1=abs(vel x)>2 && StateType != A && Movetype != H
x=.95
[state ]
type=velmul
trigger1=Movetype = H && Statetype != A && Statetype != L
x=.85
;-----------------------------------------------------------------------
; nCWv
;-----------------------------------------------------------------------
[State ];AI̎ :=ł
type = varset
triggerall =  !Ishelper && !var(59)
trigger1 = stateno = 10
trigger1 = time = 0
trigger2 = stateno = [100,101]
var(15)=10
[State ]
type=varadd
triggerall = !Ishelper && !var(59)
trigger1 = Stateno != 40
var(15)=-1
[State ]
type = varset
triggerall =  !Ishelper && !var(59)
trigger1 = stateno = 40
trigger1 = command != "holdup"
var(16)=1
[State ]
type = varset
triggerall =  !Ishelper && !var(59)
trigger1 = stateno = 40
trigger1 = command = "holdup"
var(16)=0

[State ]
type=offset
trigger1 = 1
y = -5
;---------------------------------------------------------------------------------
:TargetState ; Fall=1ŒʏZ ̋
;---------------------------------------------------------------------------------
[State ]
type = TargetState
triggerall = NumTarget
trigger1 = (Stateno = [200,245]) || (Stateno = [400,430]) || (Stateno = [600,640])
trigger1 = Target,hitfall
trigger1 = Target,Stateno =[5000,5050]
trigger1 = MoveHit = 1
value = 5250
;---------------------------------------------------------------------------------
:Wv\j~
;---------------------------------------------------------------------------------
[State ]
type = SelfState
trigger1 = !Ishelper && Alive && Time = 0
trigger1 = Stateno = 40
value = 0
ctrl = 1
;---------------------------------------------------------------------------------
:莀S
;---------------------------------------------------------------------------------
[State ]
type = SelfState
trigger1 = !Ishelper && !Alive && (stateno=[5000,5030]) && Pos Y >= -10
trigger1 = PrevStateno = [130,155]
value = 5400

