;----------- Sound-----------
[statedef 3]
physics = N
velset = 0,0
anim = 4446
sprpriority = 4




[State a]
type = playsnd
trigger1 = time = 0
value = 25,25


[State 9957, end]
type=destroyself
trigger1= enemy,stateno != 1252

;-----------Aura-----------
[statedef 160]
physics = N
velset = 0,0
anim = 4446
sprpriority = 4

[State 1000, 5]
type = Explod
trigger1 = time = 0
anim = 161
id = 161
sprpriority = 6
postype = p1
pos = 0,20
removetime = -1
bindtime = -1
supermove = 1
scale = 0.6,0.6
under = 0
ownpal = 1
pausemovetime = 9999999
supermovetime = 9999999

[State 1000, 5]
type = Explod
trigger1 = time = 0
anim = 162
id = 162
sprpriority = 6
postype = p1
pos = 50,10
removetime = -1
bindtime = -1
supermove = 1
scale = 0.5,0.5
under = 0
ownpal = 1
pausemovetime = 9999999
supermovetime = 9999999

[State 1000, 5]
type = Explod
trigger1 = time = 0
anim = 160
id = 160
sprpriority = 6
postype = p1
pos = -50,10
removetime = -1
bindtime = -1
supermove = 1
scale = 0.5,0.5
under = 0
ownpal = 1
pausemovetime = 9999999
supermovetime = 9999999

[State 1000, 5]
type = Explod
trigger1 = time = 0
anim = 163
id = 163
sprpriority = -1
postype = p1
pos = 25,-10
removetime = -1
bindtime = -1
supermove = 1
scale = 0.4,0.4
under = 0
ownpal = 1
pausemovetime = 9999999
supermovetime = 9999999

[State 1000, 5]
type = Explod
trigger1 = time = 0
anim = 164
id = 164
sprpriority = -1
postype = p1
pos = -25,-10
removetime = -1
bindtime = -1
supermove = 1
scale = 0.4,0.4
under = 0
ownpal = 1
pausemovetime = 9999999
supermovetime = 9999999



;----------------Lsphere
[State 1000, 5]
type = null;Explod
trigger1 = (time > 0) && (time%4 = 0)
anim = 1518
id = 161
sprpriority = 6
postype = p1
pos = 0,20
bindtime = 1
supermove = 1
scale = 0.6,0.6
under = 0
Vel = -4+random%8,-5+Random%10
ownpal = 1
pausemovetime = 9999999
supermovetime = 9999999

[State 1000, 5]
type = null;Explod
trigger1 = (time > 0) && (time%4 = 0)
anim = 1518
id = 163
sprpriority = 6
postype = p1
pos = 50,10
bindtime = 1
supermove = 1
scale = 0.5,0.5
under = 0
Vel = -4+random%8,-5+Random%10
ownpal = 1
pausemovetime = 9999999
supermovetime = 9999999

[State 1000, 5]
type = null;Explod
trigger1 = (time > 0) && (time%4 = 0)
anim = 1518
id = 162
sprpriority = 6
postype = p1
pos = -50,10
bindtime = 1
supermove = 1
scale = 0.5,0.5
under = 0
Vel = -4+random%8,-5+Random%10
ownpal = 1
pausemovetime = 9999999
supermovetime = 9999999

[State 1000, 5]
type = null;Explod
trigger1 = (time > 0) && (time%4 = 0)
anim = 1518
id = 160
sprpriority = -1
postype = p1
pos = 25,-10
bindtime = 1
supermove = 1
scale = 0.4,0.4
under = 0
Vel = -4+random%8,-5+Random%10
ownpal = 1
pausemovetime = 9999999
supermovetime = 9999999

[State 1000, 5]
type = null;Explod
trigger1 = (time > 0) && (time%4 = 0)
anim = 1518
id = 164
sprpriority = -1
postype = p1
pos = -25,-10
bindtime = 1
supermove = 1
scale = 0.4,0.4
under = 0
Vel = -4+random%8,-5+Random%10
ownpal = 1
pausemovetime = 9999999
supermovetime = 9999999


[state vel]
type = velset
trigger1 = RootDist x > 4 && RootDist x < 130
x = 3.4
[state vel]
type = velset
trigger1 = RootDist x < -4 && RootDist x > -130
x = -3.4
[state vel]
type = velset
trigger1 = RootDist x <= 4 && RootDist x >= -4
x = 0

[state vel]
type = velset
trigger1 = RootDist x >= 130
x = 14.4
[state vel]
type = velset
trigger1 = RootDist x <= -130
x = -14.4

[state vel]
type = velset
trigger1 = RootDist y < 74 && RootDist y >= -10
y = -3.4
[state vel]
type = velset
trigger1 = RootDist y > 78 && RootDist y < 150
y = 3.4
[state vel]
type = velset
trigger1 = RootDist y <= 78 && RootDist y >= 74
y = 0

[state vel]
type = velset
trigger1 = RootDist y < -10
y = -13.4
[state vel]
type = velset
trigger1 = RootDist y > 150
y = 13.4

;--------回り込み----------------------
[Statedef 700]
type     = S
movetype = I
physics  = S
velset   = 0,0
anim     = 700
ctrl     = 0

[State 200, 2]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 3,10
channel = 4

[State 700, 残像]
type = null;AfterImage
trigger1 = AnimElem = 1
time = 26
length = 6      ;残像の表示時間
timegap = 2     ;時間差
framegap = 4    ;フレーム差
palbright = 1, 1, 1
palcontrast = 128, 128, 128
paladd = 0, 0, 0
palmul = 1, 1, 1
trans = Add1

[State 700, 非無敵] ;地上投げ属性は回避できない
type = HitBy
trigger1 = AnimElem = 8, <= 0
value = SC, NT, ST, HT    ;立S、屈C、空A , 通常N、必殺S、超必H ＋ 攻撃A、投げT、飛び道具Pで記述

[State 1];無敵の状態を作る
type = NotHitBy
trigger1 = Animelem = 8,<= 0
value =  SCA

[State 700, 移動量]
type = VelSet
trigger1 = AnimElemTime(2) >= 0
x = 6

[State 700, 移動終了]
type = VelSet
trigger1 = AnimElem = 8, >= 0
x = 0

[State 700, 相手と重なった場合]
type = PlayerPush
trigger1 = AnimElemTime(2) > 0
value = 0

[State 700, 終了]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;--------後転移動-------------------------------
[Statedef 710]
type     = S
movetype = I
physics  = S
velset   = 0,0
anim     = 710
ctrl     = 0

[State 200, 2]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 3,10
channel = 4

[State 710, 残像]
type = null;AfterImage
trigger1 = AnimElem = 1
time = 26
length = 7
timeGap = 2
frameGap = 4
palBright = 0, 0, 0
palContrast = 128, 128, 128
palAdd = 0, 0, 0
palMul = 1, 1, 1	
trans = Add1

[State 710, 非無敵]
type = HitBy
trigger1 = AnimElem = 10, <= 0
value = SC, NT, ST, HT

[State 1];無敵の状態を作る
type = NotHitBy
trigger1 = Animelem = 10,<= 0
value =  SCA

[State 710, 移動量]
type = VelSet
trigger1 = AnimElemTime(2) > 0
x = -6

[State 710, 移動終了]
type = VelSet
trigger1 = AnimElem = 9, >= 0
x = 0

[State 710, 相手と重なった時の処理]
type = PlayerPush
trigger1 = AnimElemTime(8) > 0
value = 0

[State 710, 終了]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1


;------------------------------------------------------------------
;ガードキャンセル前転
[Statedef 720]
type     = S
movetype = I
physics  = S
velset   = 0,0
anim     = 700
poweradd = -1000
ctrl     = 0

[State 1990, 一瞬止まる]
type = Pause
trigger1 = Time = 0
time = 8
pausemovetime = 16

[State 1990, 一瞬光る]
type = Envcolor
trigger1 = Time = 0
value = 255, 255, 255
time = 1
under = 1
supermove = 1
persistent = 0
ignorehitpause = 1

[State 200, 2]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 3,3
channel = 4

[State 700, 残像]
type = AfterImage
trigger1 = AnimElem = 1
time = 26
length = 6      ;残像の表示時間
timegap = 2     ;時間差
framegap = 4    ;フレーム差
palbright = 1, 1, 1
palcontrast = 128, 128, 128
paladd = 0, 0, 0
palmul = 1, 1, 1
trans = Add1

[State 1];無敵の状態を作る
type = NotHitBy
trigger1 = Animelem = 7,<= 0
value =  SCA;,NA,ST,HP

[State 700, 移動量]
type = VelSet
trigger1 = AnimElemTime(2) >= 0
x = 6

[State 700, 移動終了]
type = VelSet
trigger1 = AnimElem = 8, >= 0
x = 0

[State 700, 相手と重なった場合]
type = PlayerPush
trigger1 = AnimElemTime(2) > 0
value = 0

[State 700, 終了]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;--------------------------------------------------------------------------------------
;ガードキャンセル後転
[Statedef 730]
type     = S
movetype = I
physics  = S
velset   = 0,0
anim     = 710
poweradd = -1000
ctrl     = 0

[State 1990, 一瞬止まる]
type = Pause
trigger1 = Time = 0
time = 8
pausemovetime = 16

[State 1990, 一瞬光る]
type = Envcolor
trigger1 = Time = 0
value = 255, 255, 255
time = 1
under = 1
supermove = 1
persistent = 0
ignorehitpause = 1

[State 200, 2]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 3,3
channel = 4

[State 710, 残像]
type = AfterImage
trigger1 = AnimElem = 1
time = 26
length = 7
timeGap = 2
frameGap = 4
palBright = 0, 0, 0
palContrast = 128, 128, 128
palAdd = 0, 0, 0
palMul = 1, 1, 1	
trans = Add1

[State 1];無敵の状態を作る
type = NotHitBy
trigger1 = Animelem = 7,<= 0
value =  SCA;,NA,ST,HP


[State 710, 移動量]
type = VelSet
trigger1 = AnimElemTime(2) > 0
x = -6

[State 710, 移動終了]
type = VelSet
trigger1 = AnimElem = 8, >= 0
x = 0

[State 710, 相手と重なった時の処理]
type = PlayerPush
trigger1 = AnimElemTime(8) > 0
value = 0

[State 710, 終了]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;-----------------------------------------------------------
;ガードキャンセルぶっとばし攻撃
[Statedef 255]
type     = S
movetype = A
physics  = C
juggle   = 14
ctrl     = 0
anim     = 245
poweradd = -1000
sprpriority = 2

[State 3000, 無敵]
type = NotHitBy
trigger1 = time = 0
value = SCA
time = 15
;value = SCA,NAP,SAP,HAP

[State 700, 非無敵] ;地上投げ属性は回避できない
type = HitBy
trigger1 = time = 0
value = SC, NT, ST, HT    ;立S、屈C、空A , 通常N、必殺S、超必H ＋ 攻撃A、投げT、飛び道具Pで記述
time = 15

[State 1990, 一瞬止まる]
type = Pause
trigger1 = Time = 0
time = 3
pausemovetime = 16

[State 1990, 一瞬光る]
type = Envcolor
trigger1 = Time = 0
value = 255, 255, 255
time = 1
under = 1
supermove = 1
persistent = 0
ignorehitpause = 1

[State 650, 2]
type = PlaySnd
trigger1 = Time = 0
value = 0,3
channel = 0



[State 800, 2.1]
type = Projectile
trigger1 = (p2stateno != [5020,5040])  
trigger1 = p2stateno != [154,155]
trigger1 = AnimElem = 5
projanim = 247
projremovetime = 20
projpriority = 99
projsprpriority = 5
offset = 60, 0
postype = p1
attr = S, NA
damage = 98,0
hitflag = MAF
guardflag = MA
animtype = Hard
ground.animtype = low
pausetime = 12,12
sparkxy = -10,-76
sparkno = s4010
guard.sparkno = S10150
hitsound = s4,4
guardsound = s4,9
ground.velocity = -4,-9
air.velocity = -4,-6
guard.velocity = -11
fall = 1
fall.recovertime = 35
guard.velocity = -12
getpower = 184,184
givepower = 21,21
fall.yvelocity = -3.4
guard.pausetime = 12,12
guard.slidetime = 15
guard.hittime = 30
guard.ctrltime = 15
yaccel = .55
ground.cornerpush.veloff = -12
air.cornerpush.veloff = 0
guard.cornerpush.veloff = -12

[state explod]
type = explod
trigger1 = animelem = 5
postype = p1
pos = 60,10
ownpal = 1
anim = 1251
scale = 0.5,0.5
persistent = 1
sprpriority = -1
supermove = 0

[state explod]
type = explod
trigger1 = animelem = 5
postype = p1
pos = 60,0
ownpal = 1
anim = 246
scale = 0.4,0.7
persistent = 1
sprpriority = 5
supermove = 0

[state snd]
type =playsnd
trigger1 = animelem = 5
value = s21, 2

[State 1011, 2]
type = EnvShake
trigger1 = animelem = 5
time = 25
ampl = 10
freq = 90
phase = 90
ignorehitpause = 1

[State 245, ステート変更]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1


;------------------------------------------------------------

;-----------------------------------------------------------------------------
[Statedef -2];常時監視ステート(相手に行動を制御されても関係無く常に実行される)
;-----------------------------------------------------------------------------
;先行入力時間
[State -2, uketuke]
type = VarSet
triggerall = var(0) = 0
triggerall = var(59) = 0
trigger1 = command = "start"
trigger2 = command = "c"
trigger3 = command = "b"
trigger4 = command = "a"
trigger5 = command = "y"
trigger6 = command = "x"
trigger7 = command = "z"
trigger8 = command = "x" && command = "holdfwd"
trigger9 = command = "z" && command = "holdfwd"
trigger10 = command = "yamibarai2"
trigger11 = command = "yamibarai1"
trigger12 = command = "kuzukaze"
trigger13 = command = "kotozuki2"
trigger14 = command = "kotozuki1"
trigger16 = command = "aoi"
trigger17 = command = "oniyaki2"
trigger18 = command = "oniyaki1"
trigger19 = command = "saika1"
trigger20 = command = "saika2"
trigger21 = command = "yaotome2"
trigger22 = command = "yaotome1"
;trigger22 = command = "jingi"
var(0) = 6
ignorehitpause = 1



;タイムカウント
[state -2]
type = varadd
trigger1 = var(0) > 0 ;1
v = 0
value = -1
ignorehitpause = 0

[State -2]
Type = VarSet
trigger1 = RoundState != 0
var(36) = 0
IgnoreHitPause = 1

[State -2]
Type = VarSet
trigger1 = RoundState != 0
trigger1 = Random <= 300
var(36) = 1
IgnoreHitPause = 1

[State -2]
Type = VarSet
trigger1 = RoundState != 0
trigger1 = Random <= 300
var(36) = 2
IgnoreHitPause = 1


[State 0, ]
type = ChangeState
trigger1 = ctrl = 1
trigger1 = statetype != A
trigger1 = screenpos x != [-10,330]
value = 1255
ignorehitpause = 1

[State 0, ]
type = ScreenBound
trigger1 = p2stateno = [1252,1255]
trigger2 = p2stateno = [10555,10556] 
trigger3 = stateno = [10101,10103]
trigger4 = stateno = 20002 && animelemtime(62) >= 0
trigger5 = stateno = [5510,5511]
value = 0
ignorehitpause = 1

[State 3202,9916]
type = Explod
trigger1= projhit8007 = 1
anim = 10105
sprpriority = 2
postype = p2
pos = (target,const(size.mid.pos.x)),(target,const(size.mid.pos.y))
ownpal = 1
scale = 0.4,0.4

[State 3202,9916]
type = Explod
trigger1= projhit8007 = 1
anim = 10104
sprpriority = 2
postype = p2
pos = (target,const(size.mid.pos.x)),(target,const(size.mid.pos.y))
ownpal = 1

[State a]
type = playsnd
trigger1= projhit8007 = 1
freqmul = .75 + (random/2000.0)
value = 25,0

[State 1011, 2]
type = EnvShake
trigger1= projhit8007 = 1
time = 3
ampl = 10
freq = 90
phase = 90
ignorehitpause = 1

[State 1300, 5]
type = Envcolor
trigger1= projhit8007 = 1
persistent = 1
ignorehitpause = 1
value = 255, 255, 255
time = 1
under = 1

[state hitless]
type = hitadd
trigger1 = projhit1513 = 1
value = -1

[State 3202,9916]
type = Explod
trigger1= projhit1133 = 1
anim = 10105
sprpriority = 4
postype = p2
pos = (target,const(size.mid.pos.x)),(target,const(size.mid.pos.y))
ownpal = 1
scale = 0.3,0.3

[State 3202,9916]
type = Explod
trigger1= projhit1133 = 1
anim = 1441
sprpriority = 2
postype = p2
pos = (target,const(size.mid.pos.x)),(target,const(size.mid.pos.y))
ownpal = 1
random = 240,160
facing = ifelse(random<500,-1,1)

[State a]
type = playsnd
trigger1= projhit1133 = 1
value = 25,0
volume = 255

[State 1011, 2]
type = EnvShake
trigger1= projhit1133 = 1
time = 3
ampl = 10
freq = 90
phase = 90
ignorehitpause = 1

[State 1300, 5]
type = Envcolor
trigger1= projhit1133 = 1
persistent = 1
ignorehitpause = 1
value = 255, 255, 255
time = 1
under = 1

[State 3202,9916]
type = Explod
trigger1= projhit12222 = 1
anim = 10105
sprpriority = 4
postype = p2
pos = (target,const(size.mid.pos.x)),(target,const(size.mid.pos.y))
ownpal = 1
scale = 0.5,0.5

[State 3202,9916]
type = Explod
trigger1= projhit12222 = 1
anim = 10104
sprpriority = 4
postype = p2
pos = (target,const(size.mid.pos.x)),(target,const(size.mid.pos.y))
ownpal = 1


[State 3202,9916]
type = Explod
trigger1= projhit12222 = 1
anim = 10103
sprpriority = 4
postype = p2
pos = (target,const(size.mid.pos.x)),(target,const(size.mid.pos.y))
ownpal = 1
scale = 0.5,0.5

[State a]
type = playsnd
trigger1= projhit12222 = 1
value = 25,2
volume = 255

[State 3202,9916]
type = Explod
trigger1= projhit1199 = 1
anim = 10105
sprpriority = 4
postype = p2
pos = (target,const(size.mid.pos.x)),(target,const(size.mid.pos.y))
ownpal = 1
scale = 0.5,0.5

[State 3202,9916]
type = Explod
trigger1= projhit1199 = 1
anim = 10302
sprpriority = 9
postype = p2
pos = (target,const(size.mid.pos.x)),(target,const(size.mid.pos.y))
ownpal = 1
random = 240,160
facing = ifelse(random<500,-1,1)

[State a]
type = playsnd
trigger1= projhit1199 = 1
value = 25,0
volume = 255

[State 1011, 2]
type = EnvShake
trigger1= projhit1199 = 1
time = 3
ampl = 10
freq = 90
phase = 90
ignorehitpause = 1

[State 1300, 5]
type = Envcolor
trigger1= projhit1199 = 1
persistent = 1
ignorehitpause = 1
value = 255, 255, 255
time = 1
under = 1


[State 3202,9916]
type = Explod
trigger1= projhit20001 = 1
trigger2 = projhit248 = 1
anim = 11000 + random%2
sprpriority = 6
postype = p2
pos = (target,const(size.mid.pos.x)),(target,const(size.mid.pos.y))
ownpal = 1

[State a]
type = playsnd
trigger1= projhit248 = 1
value = 25,21
volume = 255

[State 1300, 5]
type = Envcolor
trigger1= projhit20001 = 1
persistent = 1
ignorehitpause = 1
value = 255, 255, 255
time = 1
under = 1



[State 4305, flames]
type=helper
trigger1= projhit12005 && numtarget && numhelper(2103)!=1
trigger1= !(target,time) && (target,movetype=H)
helpertype=normal
stateno=2103
ID=2103
name="ice"
postype=p2
bindtime=1000
ownpal=1
size.ground.front=0
size.ground.back=0
ignorehitpause=1
persistent=0

[State 4305, flames]
type=helper
trigger1= enemy,stateno =1252 && numhelper(3)!=1
helpertype=normal
stateno=3
ID=3
name="snd"
postype=p2
bindtime=1000
ownpal=1
size.ground.front=0
size.ground.back=0
ignorehitpause=1
persistent=0


[State 3202,9916]
type = Explod
trigger1= projhit12223 = 1
anim = 10105
sprpriority = 9
postype = p2
pos = (target,const(size.mid.pos.x)),(target,const(size.mid.pos.y))
ownpal = 1
scale = 0.4,0.4

[State 3202,9916]
type = Explod
trigger1= projhit12223 = 1
anim = 10103
sprpriority = 9
postype = p2
pos = (target,const(size.mid.pos.x)),(target,const(size.mid.pos.y))
ownpal = 1

[State 3202,9916]
type = Explod
trigger1= projhit12223 = 1
anim = 11000 + random%2
sprpriority = 9
postype = p2
pos = (target,const(size.mid.pos.x)),(target,const(size.mid.pos.y))
ownpal = 1


[State a]
type = playsnd
trigger1= projhit12223 = 1
value = 44,1

[State 1011, 2]
type = EnvShake
trigger1= projhit12223 = 1
time = 3
ampl = 10
freq = 90
phase = 90
ignorehitpause = 1

[State 1300, 5]
type = Envcolor
trigger1= projhit12223 = 1
persistent = 1
ignorehitpause = 1
value = 255, 255, 255
time = 1
under = 1

[state 5235]
type = nothitby
triggerall = p2name = "MasterGoDken"
trigger1 = anim != 0
value = SCA, NA, SA, HA, NT,ST,HT, NP, SP, HP

[state 5235]
type = nothitby
triggerall = p2name = "MasterGodRyu"
trigger1 = anim != 0
value = SCA, NA, SA, HA, NT,ST,HT, NP, SP, HP

[state 5235]
type = nothitby
triggerall = p2name = "EvilGuile"
trigger1 = anim != 0
value = SCA, NA, SA, HA, NT,ST,HT, NP, SP, HP

[state 5235]
type = nothitby
triggerall = p2name = "ETK Akuma"
trigger1 = anim != 0
value = SCA, NA, SA, HA, NT,ST,HT, NP, SP, HP
;-----------------------------------------------------------------------------
;先行入力(通常技(特殊技）２、（超）必殺技１）
;---------------------------------------------------------------------------
;挑発
[State -2]
type = VarSet
triggerall = var(0) > 0
trigger1 = command = "start"
var(1) = 195

[state -2, yaccel]
type = varset
trigger1 = fvar(11) != enemynear,const(movement.yaccel)
trigger1 = enemynear,stateno != [5000,5210]
trigger1 = enemynear,statetype = A
FV = 11
value = enemynear,const(movement.yaccel)
ignorehitpause = 1

[state -2, yaccel]
type = varset
trigger1 = fvar(11) != 0.5
trigger1 = enemynear,stateno = [5000,5210]
trigger1 = enemynear,statetype = A
FV = 11
value = 0.5
ignorehitpause = 1

[state -2, yaccel]
type = varset
trigger1 = fvar(11) != 0
trigger1 = enemynear,statetype != A
FV = 11
value = 0
ignorehitpause = 1

;-----------------------------------------------------

[State 3202,9916]
type = null;Explod
triggerall = anim = 0
triggerall = animelemtime(3) >= 0
triggerall = numexplod(6162) = 0
trigger1= time%25 = 0
anim = 4449
id =6162
sprpriority = 10
postype = p1
pos = 0,0
facing = ifelse(random<500,-1,1)
scale = 0.7, 0.8
ownpal = 1

[State 3202,rocks]
type = null;Explod
triggerall = numhelper(12005) = 0
triggerall = anim = 0
trigger1= time%3 = 0
anim = 8030+Random%7
sprpriority = -3+random%6
postype = p1
pos = -20+random%40,0
Facing = 1-(Random<500)*2
VFacing = 1-(Random<500)*2
Vel = -2+random%4,-7-Random/333.
scale = 1.1, 1.1
ownpal = 1


[State 3202,9916]
type = Explod
triggerall = numhelper(12005) = 0
triggerall = anim = 0
trigger1= time%3 = 0
anim = 1518;8030+Random%7
sprpriority = -3+random%6
postype = p1
pos = -20+random%40,0-random%50
Facing = 1-(Random<500)*2
VFacing = 1-(Random<500)*2
Vel = 0,-4-random/333.
scale = 1.1, 1.1
ownpal = 1

[State 3202,9916]
type = null;Explod
triggerall = anim = 0
triggerall = animelemtime(3) >= 0
trigger1= time%6 = 0
anim = 8009
id =6161
sprpriority = 9
postype = p1
pos = -32,-74
ownpal = 1
scale = 0.4,0.4

[State 3202,9916]
type = null;Explod
triggerall = anim = 0
triggerall = animelemtime(3) >= 0
trigger1= time%20 = 0
anim = 1516
id =6161
sprpriority = 9
postype = p1
pos = -32,-74
ownpal = 1
scale = 0.6,0.6


[State 3202,9916]
type = null;Explod
triggerall = anim = 0
triggerall = animelemtime(3) >= 0
trigger1= time%16 = 0
anim = 4447
id =4447
sprpriority = 9
postype = p1
pos = 34,-79
ownpal = 1
scale = 0.6,0.6

[State 3202,9916]
type = null;Explod
triggerall = numhelper(12005) = 0
triggerall = anim = 0
triggerall = animelemtime(3) >= 0
trigger1= time%10 = 0
anim = 6612
id =6161
sprpriority = -2
postype = p1
pos = 0,10
scale = 1, 0.8
ownpal = 1


[state ee]
type = modifyexplod
triggerall = anim = 0
trigger1 = animelem = 3
trigger2 = animelem = 8
postype = p1
pos = 34,-79
id = 4447

[state ee]
type = modifyexplod
triggerall = anim = 0
trigger1 = animelem = 4
trigger2 = animelem = 5
trigger2 = animelem = 6
trigger2 = animelem = 7
postype = p1
pos = 34,-81
id = 4447

[state 22]
type = removeexplod
trigger1 = anim != 0
id = 6161

[state 22]
type = removeexplod
trigger1 = anim != 0
id = 4447

[state 22]
type = removeexplod
trigger1 = anim != 0
id = 6162

[State 3010, 弾]
Type = Helper
triggerall = numhelper(160) = 0
trigger1 = time = 0
StateNo = 160
ID = 160
Name = "aura"
Pos = 0,-50
PosType = P1
Ownpal = 1
Size.XScale = 1
Size.YScale = 1
IgnoreHitPause = 1
Persistent = 1


;--------------------------------------------------------------
;通常技

[State -2, VarSet]
type = VarSet
triggerall = var(0) > 0
trigger1 = command = "c"
var(2) = 6

[State -2, VarSet]
type = VarSet
triggerall = var(0) > 0
trigger1 = command = "b"
var(2) = 5

[State -2, VarSet]
type = VarSet
triggerall = var(0) > 0
trigger1 = command = "a"
var(2) = 4

[State -2, VarSet]
type = VarSet
triggerall = var(0) > 0
trigger1 = command = "y"
var(2) = 3

[State -2, VarSet]
type = VarSet
triggerall = var(0) > 0
trigger1 = command = "x"
var(2) = 2

[State -2, VarSet]
type = VarSet
triggerall = var(0) > 0
trigger1 = command = "z"
var(2) = 1

;--------------------------------------------------------------
;特殊技
;夢弾
[State -2, VarSetYUme]
type = VarSet
triggerall = var(0) > 0
trigger1 = command = "x"
trigger1 = command = "holdfwd"
var(2) = 435

;--------------------------------------------------------------
;轟斧
[State -2, VarSetgoufu]
type = VarSet
triggerall = var(0) > 0
trigger1 = command = "z" 
trigger1 = command = "holdfwd"
var(2) = 215

;---------------------------------------------------------------------------
;闇払い
[State -2]
type = VarSet
triggerall = var(0) > 0
trigger1 = command = "yamibarai2"
var(1) = 1550

[State -2]
type = VarSet
triggerall = var(0) > 0
trigger1 = command = "yamibarai1"
var(1) = 1500

;---------------------------------------------------------------------------
;屑風
[State -2]
type = VarSet
triggerall = var(0) > 0
trigger1 = command = "kuzukaze"
var(1) = 1400

;---------------------------------------------------------------------------
;琴月
[State -2]
type = VarSet
triggerall = var(0) > 0
trigger1 = command = "kotozuki2"
var(1) = 1350

[State -2]
type = VarSet
triggerall = var(0) > 0
trigger1 = command = "kotozuki1"
var(1) = 1300

;---------------------------------------------------------------------------
;葵花

[State -2]
type = VarSet
triggerall = var(0) > 0
trigger1 = command = "aoi"
var(1) = 1200

;---------------------------------------------------------------------------
;鬼焼き
[State -2]
type = VarSet
triggerall = var(0) > 0
trigger1 = command = "oniyaki2"
var(1) = 1100

[State -2]
type = VarSet
triggerall = var(0) > 0
trigger1 = command = "oniyaki1"
var(1) = 1000

;---------------------------------------------------------------------------
;サイカ
[State -2]
type = VarSet
triggerall = var(0) > 0
trigger1 = command = "saika1"
var(1) = 2100

;サイカ
[State -2]
type = VarSet
triggerall = var(0) > 0
trigger1 = command = "saika2"
var(1) = 2110


;---------------------------------------------------------------------------
;八稚女
[State -2]
type = VarSet
triggerall = var(0) > 0
trigger1 = command = "yaotome2"
var(1) = 2001

[State -2]
type = VarSet
triggerall = var(0) > 0
trigger1 = command = "yaotome1"
var(1) = 2000

;---------------------------------------------------------------------------
;三神器之弐
;[State -2]
;type = null;VarSet
;triggerall = var(0) > 0
;trigger1 = command = "jingi"
;var(1) = 2200

;---------------------------------------------------------------------------
[State -2]
type = VarSet
trigger1 = var(1)
trigger1 = !var(0)
var(1) = 0

[State -2]
type = VarSet
trigger1 = var(2)
trigger1 = !var(0)
var(2) = 0

;==============================================================================
;デバック用
[State -2]
type = DisplayToClipBoard
trigger1 = 1
text = "P2BodyDist X: %d | P2BodyDist Y: %d | Pos X: %d | Pos Y: %d \n"
params	= floor(P2BodyDist X),ceil(P2BodyDist Y),ceil(Pos X),ceil(Pos Y)
ignorehitpause = 1

;==============================================================================
;スーパーキャンセル判定
[State -2, 0]
type = VarSet
trigger1    = stateno = 1100 && movehit = 1
;trigger2    = stateno = 2100 && movehit = 1
var(11) = 1

[State -2, 1]
type = VarSet
trigger1    = p2movetype != H
;trigger1    = P2bodydist Y = 0
var(11)     = 0

;----------------------------------------------
;ドリームキャンセル判定
[State -2, 0]
type = null;VarSet
trigger1   = stateno = 2002 ;&& Movehit = 1
;trigger1   = 
var(12) = 1
ignorehitpause = 0

[State -2, 1]
type = VarSet
trigger1    = stateno = 2200 && AnimElem = 6
trigger2    = stateno = 2201 && AnimElem = 61
trigger3    = movetype = H
var(12)     = 0
ignorehitpause = 0

;==============================================================================
;ダメージ補正
[state -2]
type = varset
trigger1 = 1
Trigger2 = RoundState = 0
trigger3 = P2MoveType != H
trigger4 = P2stateno = [120,155]
;trigger2 = enemy,gethitvar(hitcount) = 0
fvar(0) = 1.0

[state -2]
type = varset
trigger1 = P2MoveType = H
trigger1 = enemy,gethitvar(hitcount) > 2
fvar(0) = abs((100.0-(25.0+(enemy,gethitvar(hitcount)/2.0)*5.0))/100.0)
IgnoreHitPause = 1

[state -2]
type = attackmulset
trigger1 = 1
value = fvar(0)

;--------------------------------------------------------
;ネバリ補正（根性値）
[State -2]
Type = DefenceMulSet
Triggerall = gethitvar(hitcount) > 0
Trigger1 = 1
IgnoreHitPause = 1
Value = FVar(1)+(ifelse((GetHitVar(HitCount)/10 < 1.0), GetHitVar(HitCount)/10, 0))

[State -2]
Type = VarSet
Triggerall = (1000*life/const(data.life)) > 750
Trigger1 = 1
IgnoreHitPause = 1
FV = 1
Value = 1

[State -2]
Type = VarSet
Triggerall = (1000*life/const(data.life)) = [151,750]
Trigger1 = 1
IgnoreHitPause = 1
FV = 1
Value = 0.75

[State -2]
Type = VarSet
Triggerall = (1000*life/const(data.life)) < 151
Trigger1 = 1
IgnoreHitPause = 1
FV = 1
Value = 0.5
;==============================================================================
;---端でめくらないように-----
[State -2, 100]
type = Width
trigger1 = p2Dist X >= 0
edge = 3,-3

[State -2, 100]
type = Width
trigger1 = p2Dist X < 0
edge = -3,3
;==============================================================================
;----ダッシュの音止め-------------
[State -2, 1]
type = stopSnd
trigger1 = stateno != 100 
channel = 1

[State -2, 1]
type = stopSnd
trigger1 = stateno != 1255 
channel = 2

;---攻撃音止め----
[State -2, 3]
type = stopSnd
trigger1 = MoveType = H
channel = 4

;---挑発音止め----
[State -2, 3]
type = stopSnd
trigger1 = stateno = 197
trigger1 = stateno != 197
channel = 4

;---ダメージボイス----
;地上やられ
[State -2,PlaySnd]
type =PlaySnd
triggerall = Alive && Random%2 = 0
triggerall = Time = 1
triggerall = (StateNo = 5000 || StateNo = 5010 || StateNo = 5020)
trigger1 = GethitVar(animtype)=[0,2]
value = 5000,ifelse((GethitVar(animtype)=[0,1]),0||1,3)
channel = 10
volume = 255

;地上吹き飛びやられ
[State -2,PlaySnd]
type =PlaySnd
triggerall = Alive && Random%2 = 0
triggerall = Time = 1
triggerall = (StateNo = 5000 || StateNo = 5010 || StateNo = 5020)
trigger1 = GethitVar(animtype)=[0,2]
value = 5000,ifelse((GethitVar(animtype)=[4,5]),1,3)
channel = 10
volume = 255

;空中やられ
[State -2,PlaySnd]
type =PlaySnd
triggerall = Alive && Random%2 = 0
triggerall = Time = 1
triggerall = (StateNo = 5000 || StateNo = 5010 || StateNo = 5020)
trigger1 = GethitVar(animtype)=[0,2]
value = 5000,ifelse((GethitVar(airtype)=[0,1]),0||1,4)
channel = 10
volume = 255

;空中吹き飛びやられ
[State -2,PlaySnd]
type =PlaySnd
triggerall = Alive && Random%2 = 0
triggerall = Time = 1
triggerall = (StateNo = 5000 || StateNo = 5010 || StateNo = 5020)
trigger1 = GethitVar(animtype)=[0,2]
value = 5000,ifelse((GethitVar(airtype)=[4,5]),3,4)
channel = 10
volume = 255

;--------------------------------------------------------
;生存判定
[State -2]
type = Varset
trigger1 = alive
var(4) = 0
ignorehitpause = 1

[State -2]
type = Varset
trigger1 = !alive && var(4)!= 2
var(4) = 1
ignorehitpause = 1

[State -2]
type = Varset
trigger1 = !alive && var(4)= 1 && time=2
var(4) = 2
ignorehitpause = 1

;KOダメージボイス
[State -2,PlaySnd]
type =PlaySnd
trigger1 = roundstate = 3
trigger1 = !alive && var(4) = 1 && time = 1
value = 5100,0
channel = 11
volume = 255

;--------------------------------------------------------
;相手キャラ判定
[State -2]
type = null;Varset
triggerall = time = 0
triggerall = RoundState = 1
trigger1 = (P2Name = "kyoXI" || P4Name = "kyoXI") && EnemyNear,AuthorName = "beppu"
trigger2 = (P2Name = "kyo99" || P4Name = "kyo99") && EnemyNear,AuthorName = "beppu"
trigger3 = (P2Name = "kyonbc" || P4Name = "kyonbc") && EnemyNear,AuthorName = "beppu"
trigger4 = (P2Name = "kyoXI_EX" || P4Name = "kyoXI_EX") && EnemyNear,AuthorName = "beppu"
trigger5 = (P2Name = "kyoAkof" || P4Name = "kyoAkof")  && EnemyNear,AuthorName = "beppu"
var(58) = 1

[State -2]
type = null;Varset
triggerall = var(58) = 1
triggerall = RoundState = 1
trigger1 = (P2Name != "kyoXI" || P4Name != "kyoXI") ;&& EnemyNear,AuthorName = "beppu"
trigger2 = (P2Name != "kyo99" || P4Name != "kyo99") ;&& EnemyNear,AuthorName = "beppu"
trigger3 = (P2Name != "kyonbc" || P4Name != "kyonbc") ;&& EnemyNear,AuthorName = "beppu"
trigger4 = (P2Name != "kyoXI_EX" || P4Name != "kyoXI_EX") ;&& EnemyNear,AuthorName = "beppu"
trigger5 = (P2Name != "kyoAkof" || P4Name != "kyoAkof")  ;&& EnemyNear,AuthorName = "beppu"
var(58) = 0

;---------------------------------------------------------------------------------
[Statedef -3];常時監視ステート(p2statenoなどで相手に行動を制御された時は実行しない)
;---------------------------------------------------------------------------------

[State QS]
type=varset
trigger1 = gethitvar(damage)
var(29) = 1


;------------------------------------------------------------------------
;-------------- Generated by Fighter Factory -------------

;--------------------- Variable List ----------------------

; Var(0) - StateDef 
; Var(1) - StateDef 1000, 1100, 1200, 1201, 1250, 1260, 1300, 1350, 1400, 1500, 1501, 1550, 2000, 2001, 2100, 2200
; Var(2) - StateDef , 200, 201, 210, 211, 230, 231, 240, 241, 400, 410, 430, 440, 600, 610, 630, 640, 245, 650, 215, 216, 435, 436, 635
; Var(4) - StateDef 
; Var(8) - StateDef 40
; Var(11) - StateDef 1101, 2005, 2002, 2100, 2201
; Var(12) - StateDef 2005, 2002, 2201
; Var(58) - StateDef 191, 192

;--------------------- Float Variable List ----------------------

; fVar(0) - StateDef 
; fVar(1) - StateDef 
