; これはカンフーマンのＣＮＳファイルです。
; コメントを参考にしてＣＮＳを理解してください

; これはKFMの定数と状態のファイルです。
; 絶対記入し、削除はしないでください。
[Data]
  ;体力ゲージの初期値
life = 1000
power =5000	
  ;攻撃力（これ以上に設定すると強くなる）
attack = 100
  ;防御力（これ以上に設定すると強くなる）
defence = 100
  ;コンボをくらっている時にあがる防御力
fall.defence_up = 50
  ;倒れてから起上がるまでのフレーム数
liedown.time = 60
  ;空中でどれだけコンボが繋がるか（高くすると無限コンボになるので注意）
airjuggle = 15
  ;hitdefで設定していない時の基本ヒットスパークナンバー
sparkno = -1
  ;設定してない時のガードナンバー
guard.sparkno = -1
  ;KOした時に声にエコーをかけるか（１でＯＮ）
KO.echo = 0
 volume = 200
  IntPersistIndex = 0
FloatPersistIndex = 0

[Size]
xscale = 1           ;水平方向の縮尺（通常１）
yscale = 1         ;垂直方向の縮尺（通常１）
ground.back = 13     ;キャラの幅(後方,地上)
ground.front = 13    ;キャラの幅(前方,地上)
air.back = 12        ;キャラの幅(後方,空中)
air.front = 12       ;キャラの幅(前方,空中)
height = 60          ;キャラの高さ
attack.dist = 160    ;攻撃をした時相手がガード体制に入る最低距離
proj.attack.dist = 90;攻撃をした時相手がガード体制に入る最低距離（飛び道具）
proj.doscale = 0     ;上で設定した縮尺を飛び道具にも適用するか（１でＯＮ）   
head.pos = -0, -95   ;頭の大体の座標
mid.pos = -3, -59    ;体の中心の大体の座標
shadowoffset = 0     ;影の垂直方向のオフセット
draw.offset = 0,0    ;使用しない

[Velocity]
walk.fwd  = 2.67      ;前進の速度
walk.back = -2.43     ;後退の速度
run.fwd  = 6.6, 0    ;前ダッシュの速度（ホップする時はyを-にする）
run.back = -6.6,0 ;後ダッシュの速度（ホップする時はyを-にする）
jump.neu = 0,-9.4    ;垂直ジャンプの速度
jump.back = -2.55    ;後ジャンプの速度
jump.fwd = 2.5       ;前ジャンプの速度
runjump.back = -2.55,-9.4 ;後ダッシュしながらのジャンプ速度(オプション)
runjump.fwd = 2.5,-9.4      ;前ダッシュしながらのジャンプ速度(オプション)
airjump.neu = 0,-8.1      ;２段ジャンプ以降の垂直ジャンプの速度(オプション)
airjump.back = -2.55      ;２段ジャンプ以降の後ジャンプの速度(オプション)
airjump.fwd = 2.5         ;２段ジャンプ以降の前ジャンプの速度

[Movement]
airjump.num = 0      ;空中でジャンプする回数
airjump.height = 3  ;空中でジャンプする最低限の高さ
yaccel = .55        ;重力
stand.friction = .85  ;立ち状態の摩擦係数
crouch.friction = .82 ;屈み状態の摩擦係数


;---------------------------------------------------------------------------
; Variable usage:
; This is a record of the variables that KFM uses. Keeping a record of your
; variable usage helps you avoid careless mistakes later.
; var(1)  - Used in kfm.cmd for combo condition (updated every tick)
; var(2)  - Used in Kung Fu Throw (state 800) to remember if fwd was being
;           held (remembered from state 800 through state 810).


;---------------------------------------------------------------------------
; Lose by Time Over
; CNS difficulty: basic
; CNS レベル: 基本
[Statedef 170]
type = S
ctrl = 0
anim = 170
velset = 0,0

[State 170, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

;---------------------------------------------------------------------------
; Win state decider
; CNS difficulty: basic
; CNS レベル: 基本
[Statedef 180]
type = S

[state 180,特殊セリフ]
type=changestate
trigger1= MatchOver 
trigger1= var(42)>0
value=183


[state 180,梨2]
type=changestate
triggerALL = palno = [1,6]
triggerall=numhelper(1400)
trigger1=helper(1400),stateno=[15000,15150]
trigger1=time=0
value=185



[state 180,梨]
type=changestate
triggerALL = palno = [1,6]
triggerall=!numhelper(1400)
trigger1=time=0
trigger1=random<575
trigger2= var(42)=4
trigger2= MatchOver 
value=184



[state 180,汎用]
type=changestate
triggerall=time=0
trigger1=numhelper(1300)
trigger2=numhelper(1400)
trigger3=numhelper(1500)
value=182

[state 180,汎用]
type=changestate
trigger1=time=0
value=181+random%2



;---------------------------------------------------------------------------
; Win pose 1 - Bow
; CNS difficulty: basic
; CNS レベル: 基本
[Statedef 181]
type = S
ctrl = 0
anim = 181
velset = 0,0

;---------------------[ヘルパー]
[state a];勝利画面
type = Helper
triggerall=!numhelper(1300)
triggerall=!numhelper(1400)
triggerall=!numhelper(1500)
trigger1 = matchover = 1
trigger1 = time = 219
id = 8500
name = "g"
sprpriority = 1
pos = 0,0
postype = p1
stateno = 8500
helpertype = normal
pausemovetime = 999999
keyctrl = 1 
ownpal = 1

[State 181, 0]
type = AssertSpecial
trigger1 = Time = [0,220]
flag = RoundNotOver


[state 181,]
type=playsnd
trigger1=animelemtime(5)=0
value=180,0
channel=0

[State 181, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;---------------------------------------------------------------------------
; Win pose 1 - Bow
; CNS difficulty: basic
; CNS レベル: 基本
[Statedef 182]
type = S
ctrl = 0
anim = 182
velset = 0,0


[State 191, 1] ;Freeze animation until PreIntro is over
type = ChangeAnim
triggerall= numhelper(1400)
triggerall= helper(1400),stateno = 10180
trigger1 = Anim != 185
value = 185

;---------------------[ヘルパー]
[state a];勝利画面
type = Helper
triggerall=!numhelper(1300)
triggerall=!numhelper(1400)
triggerall=!numhelper(1500)
trigger1 = matchover = 1
trigger1 = time = 519
id = 8500
name = "g"
sprpriority = 1
pos = 0,0
postype = p1
stateno = 8500
helpertype = normal
pausemovetime = 999999
keyctrl = 1 
ownpal = 1


[state a];勝利画面(紫紀)
type = Helper
triggerall= numhelper(1400)
triggerall = teammode = single || teammode = turns 
trigger1 = matchover = 1
trigger1 = time = 219
id = 8500
name = "g"
sprpriority = 1
pos = 0,0
postype = p1
stateno = 8500
helpertype = normal
pausemovetime = 999999
keyctrl = 1 
ownpal = 1

[state a];勝利画面(BIG)
type = Helper
triggerall = teammode = single || teammode = turns 
triggerall= numhelper(1500)
triggerall =!numhelper(1400)
trigger1 = matchover = 1
trigger1 = time = 219
id = 8500
name = "g"
sprpriority = 1
pos = 0,0
postype = p1
stateno = 8500
helpertype = normal
pausemovetime = 999999
keyctrl = 1 
ownpal = 1

[State 181, 0]
type = AssertSpecial
trigger1 = Time = [0,520]
flag = RoundNotOver

[state 181,]
type=playsnd
triggerall=!numhelper(1400)
triggerall=numhelper(1300)
triggerall=!numhelper(1500)
trigger1=animelemtime(1)=0
value=180,2
channel=0

[state 181,]
type=playsnd
triggerall=!numhelper(1400)
triggerall=numhelper(1500)
trigger1=animelemtime(1)=0
value=180,3
channel=0

[state 181,]
type=playsnd
triggerall=numhelper(1400)
trigger1=animelemtime(1)=0
value=180,4
channel=0

[state 181,]
type=playsnd
triggerall=!numhelper(1300)
triggerall=!numhelper(1400)
triggerall=!numhelper(1500)
trigger1=animelemtime(1)=0
value=180,1
channel=0

[State 181, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1


;===========================================================================

;---------------------------------------------------------------------------
; Win 特殊
; CNS difficulty: basic
; CNS レベル: 基本
[Statedef 183]
type = S
ctrl = 0
anim = 182
velset = 0,0


;---------------------[ヘルパー]
[state a];勝利画面
type = Helper
triggerall=!numhelper(1300)
triggerall=!numhelper(1400)
triggerall=!numhelper(1500)
trigger1 = matchover = 1
trigger1 = time = 519
id = 8500
name = "g"
sprpriority = 1
pos = 0,0
postype = p1
stateno = 8500
helpertype = normal
pausemovetime = 999999
keyctrl = 1 
ownpal = 1


[state a];勝利画面(紫紀)
type = Helper
triggerall= numhelper(1400)
triggerall = teammode = single || teammode = turns 
trigger1 = matchover = 1
trigger1 = time = 519
id = 8500
name = "g"
sprpriority = 1
pos = 0,0
postype = p1
stateno = 8500
helpertype = normal
pausemovetime = 999999
keyctrl = 1 
ownpal = 1

[state a];勝利画面(BIG)
type = Helper
triggerall = teammode = single || teammode = turns 
triggerall= numhelper(1500)
triggerall =!numhelper(1400)
trigger1 = matchover = 1
trigger1 = time = 519
id = 8500
name = "g"
sprpriority = 1
pos = 0,0
postype = p1
stateno = 8500
helpertype = normal
pausemovetime = 999999
keyctrl = 1 
ownpal = 1


[State 181, 0]
type = AssertSpecial
trigger1 = Time = [0,520]
flag = RoundNotOver


[state 181,]
type=playsnd
triggerall=time=0
trigger1=var(42)=3
value=190,1
channel=0

[state 181,]
type=playsnd
triggerall=time=0
trigger1=var(42)=4
value=184,1
channel=0

[State 181, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

;===========================================================================

[Statedef 185]
type = S
ctrl = 0
anim = 183
velset = 0,0
sprpriority = 1

[state 2000,効果音]
type=playsnd
trigger1=animelemtime(8)=0
value=3,23

;--------------------------------
[State 3000, Explod];
type = Explod
trigger1 = time=0
anim = 184
ID = 183
pos = 0,0
postype = p1
sprpriority = 3
ownpal = 1					;本体Palの影響を受けない
removeongethit = 1			;攻撃を受けると消滅
;removetime = 30		;消滅までの時間
scale = const(size.xscale),const(size.yscale)

[State 181, 0]
type = AssertSpecial
trigger1 = Time = [0,520]
flag = RoundNotOver


[state 2000,効果音]
type=playsnd
trigger1= var(42)!=4
trigger1=animelemtime(28)=0
value=184,0

[state 2000,効果音]
type=playsnd
trigger1= var(42)=4
trigger1=animelemtime(28)=0
value=184,1

[state 1100,紫紀]
type=null;helper
trigger1=animelemtime(7)=0
name="紫紀"
id=1400
stateno=10184
ownpal=1
pos=20,0
postype=p1


[state a];勝利画面(紫紀)
type = Helper
triggerall= numhelper(1400)
triggerall = teammode = single || teammode = turns 
trigger1 = matchover = 1
trigger1 = time = 519
id = 8500
name = "g"
sprpriority = 1
pos = 0,0
postype = p1
stateno = 8500
helpertype = normal
pausemovetime = 999999
keyctrl = 1 
ownpal = 1



[State 181, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;---------------------------------------------------------------------------
;===========================================================================

[Statedef 184]
type = S
ctrl = 0
anim = 183
velset = 0,0
sprpriority = 1

[state 2000,効果音]
type=playsnd
trigger1=animelemtime(8)=0
value=3,23

;--------------------------------
[State 3000, Explod];
type = Explod
trigger1 = time=0
anim = 184
ID = 183
pos = 0,0
postype = p1
sprpriority = 3
ownpal = 1					;本体Palの影響を受けない
removeongethit = 1			;攻撃を受けると消滅
;removetime = 30		;消滅までの時間
scale = const(size.xscale),const(size.yscale)

[State 181, 0]
type = AssertSpecial
trigger1 = Time = [0,520]
flag = RoundNotOver


[state 2000,効果音]
type=playsnd
trigger1= var(42)!=4
trigger1=animelemtime(28)=0
value=184,0

[state 2000,効果音]
type=playsnd
trigger1= var(42)=4
trigger1=animelemtime(28)=0
value=184,1

[state 1100,紫紀]
type=helper
trigger1=animelemtime(7)=0
name="紫紀"
id=1400
stateno=10184
ownpal=1
pos=20,0
postype=p1
;size.xscale 
;size.yscale
;size.ground.back
;size.ground.front
;size.air.back
;size.air.front
;size.height
;size.head
;size.mid.pos
;size.shadowoffset

[state a];勝利画面(紫紀)
type = Helper
triggerall= numhelper(1400)
triggerall = teammode = single || teammode = turns 
trigger1 = matchover = 1
trigger1 = time = 519
id = 8500
name = "g"
sprpriority = 1
pos = 0,0
postype = p1
stateno = 8500
helpertype = normal
pausemovetime = 999999
keyctrl = 1 
ownpal = 1



[State 181, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;---------------------------------------------------------------------------
;紫紀と
[Statedef 33213]
type = S
ctrl = 0
anim = 33213
velset = 0,0

[State 191, アニメ変更];バトル画面に切り替わった瞬間のフェードインの時、アニメを固定している
type = ChangeAnim
trigger1 = RoundState = 0
value = anim

[State 210, 1]
type = PlaySnd
trigger1 = animelem = 3
value = 190, 14;わかった
channel = 0

[State 191, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 191, 3] ;Change to stand state when done
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;━━━━━━━━━━━━━━━━━━━━━━━
;===========================================================================
;イントロ分岐
[statedef 190]
type=s
ctrl=0
velset=0,0

[state 190,対紫紀]
type=changestate
triggerall=time=0
triggerall = !numpartner
triggerall = enemynear,Name = "shiki_tohno"
trigger1 = enemynear,AuthorName = "チユリ"
trigger2 = enemynear,AuthorName = "チユリ&&エス"
value=33213

[state 190,対ネスツ関係者]
type=changestate
triggerall=time=0
trigger1=enemy,name="Nameless"
value=193

[state 190,対現人鬼]
type=changestate
triggerall=time=0
trigger1 = P2Name = "dio" || P4Name = "dio"
trigger2 = P2Name = "Shadow DIO" || P4Name = "Shadow DIO"
trigger3 = P2Name = "Dio Brendo" || P4Name = "Dio Brendo"
trigger4 = P2Name = "final dio" || P4Name = "final dio"
trigger5 = P2Name = "MURAKUMO"||  P4Name = "MURAKUMO"
trigger6 = P2Name = "Kotiya-Sanae"||  P4Name = "Kotiya-Sanae"
trigger7 = P2Name = "Kaigen Ishima" ||  P4Name = "Kaigen Ishima"
value=191


[state 190,対弾幕キャラ]
type=changestate
triggerall=time=0
trigger1 = P2Name = "Mukuro"|| P4Name = "Mukuro"
trigger2 = P2Name = "Maori"  || P4Name = "Maori" 
trigger3 = P2Name = "cvsjill" || P4Name = "cvsjill" 
trigger4 = P2Name = "Mouri Motonari" || P4Name = "Mouri Motonari"
trigger5 = P2Name = "Captain Commando"||P4Name = "Captain Commando"
trigger6 = P2Name = "vega"||  P4Name = "vega"
trigger6 = EnemyNear,AuthorName = "zy5678 & エス"
trigger7 = P2Name = "JUDA-(NERICYA)" ||  P4Name = "JUDA-(NERICYA)"
trigger8 = P2Name = "SAMCHAY" ||  P4Name = "SAMCHAY"
trigger9 = P2Name = "wind_MCXX" ||  P4Name = "wind_MCXX"
trigger10 = P2Name = "osho_beta" ||  P4Name = "osho_beta" 
trigger11 = P2Name = "Ayu Tukumiya" ||  P4Name = "Ayu Tukumiya" 
trigger11 = EnemyNear,AuthorName = "IYO"  
trigger12 = P2Name = "Haruhi Suzumiya" ||  P4Name = "Haruhi Suzumiya" 	
trigger13 = P2Name = "Abigail"  ||  P4Name =  "Abigail"  
value=191

[state 190,対獅牙]
type=changestate
triggerall=time=0
trigger1=enemy,name="Grappler_Shiki"
value=192

[state 190,対イグニス]
type=null;changestate
triggerall=time=0
trigger1=enemy,name="IGNIZ"
value=10191

[state 190,板割り]
type=null;changestate
triggerall=time=0
trigger1=enemy,name="Kung Fu Man"
trigger2=enemy,authorname="Men'sClub"
trigger3=enemy,name="Rugal2k2"
trigger3=enemy,authorname="GONZO-"
trigger3=enemy,const(data.ko.echo)=1
value=10190

[state 190,汎用]
type=changestate
trigger1=time=0
value=192
triggerall = Numpartner > 0
trigger1 = partner,Name = "shiki_tohno"
trigger1 = partner,AuthorName = "チユリ"

[state 190,汎用]
type=changestate
trigger1=time=0
value=191+random%2

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

;---------------------------------------------------------------------------
; Introduction
; CNS difficulty: basic
; CNS レベル: 基本
[Statedef 191]
type = S
ctrl = 0
anim = 191
velset = 0,0


[state 40,対現人鬼音]
type=playsnd
triggerall= var(42)=4
triggerall=time=10
trigger1 = P2Name = "dio" || P4Name = "dio"
trigger2 = P2Name = "Shadow DIO" || P4Name = "Shadow DIO"
trigger3 = P2Name = "Dio Brendo" || P4Name = "Dio Brendo"
trigger4 = P2Name = "final dio" || P4Name = "final dio"
trigger5 = P2Name = "MURAKUMO"||  P4Name = "MURAKUMO"
trigger6 = P2Name = "Kotiya-Sanae"||  P4Name = "Kotiya-Sanae"
trigger7 = P2Name = "Kaigen Ishima" ||  P4Name = "Kaigen Ishima"
value=191,0

[state 40,対弾幕キャラセリフ]
type=playsnd
triggerall= var(42)!=4
triggerall=time=10
trigger1 = P2Name = "Mukuro"|| P4Name = "Mukuro"
trigger2 = P2Name = "Maori"  || P4Name = "Maori" 
trigger3 = P2Name = "cvsjill" || P4Name = "cvsjill" 
trigger4 = P2Name = "Mouri Motonari" || P4Name = "Mouri Motonari"
trigger5 = P2Name = "Captain Commando"||P4Name = "Captain Commando"
trigger6 = P2Name = "vega"||  P4Name = "vega"
trigger6 = EnemyNear,AuthorName = "zy5678 & エス"
trigger7 = P2Name = "JUDA-(NERICYA)" ||  P4Name = "JUDA-(NERICYA)"
trigger8 = P2Name = "SAMCHAY" ||  P4Name = "SAMCHAY"
trigger9 = P2Name = "wind_MCXX" ||  P4Name = "wind_MCXX"
trigger10 = P2Name = "osho_beta" ||  P4Name = "osho_beta" 
trigger11 = P2Name = "Ayu Tukumiya" ||  P4Name = "Ayu Tukumiya" 
trigger11 = EnemyNear,AuthorName = "IYO"  
trigger12 = P2Name = "Haruhi Suzumiya" ||  P4Name = "Haruhi Suzumiya" 	
trigger13 = P2Name = "Abigail"  ||  P4Name =  "Abigail"  
value=191,1


[state 191,イントロ]
type=assertspecial
trigger1=1
flag=intro

channel=0

[state 1100,shiki]
type=helper
triggerALL = palno = [1,6]
trigger1 = NumHelper(1400) = 0
trigger1=time=0
name="shiki"
id=1400
stateno=10190
ownpal=1
pos=25,0
postype=p1


[State 191, 1] ;Freeze animation until PreIntro is over
type = ChangeAnim
trigger1 = RoundState = 0
value = 192

[State 191, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 191, 3] ;Change to stand state when done
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------
; Introduction
; CNS difficulty: basic
; CNS レベル: 基本
[Statedef 192]
type = S
ctrl = 0
anim = 192
velset = 0,0

[state 1100,グルガン]
type=helper
triggerALL=palno = [1,6]
trigger1=!numhelper(1300)
trigger1=time=0
name="Striker_Glugan"
id=1300
stateno=1350
ownpal=1
pos=0,0
postype=p1

[state 191,イントロ]
type=assertspecial
trigger1=1
flag=intro


[state 40,対弾幕キャラセリフ]
type=playsnd
triggerall=time=1
trigger1 = p2name = "ciel" || p4name = "ciel"
trigger2 = p2name = "CIEL(ELEICIA)" || p4name = "CIEL(ELEICIA)"
trigger3 = p2name = "CHIEL" || p4name = "CHIEL" 
trigger4 = p2name = "Full Armor Ciel" || p4name = "Full Armor Ciel"
value=192,1

[state 40,対弾幕キャラセリフ]
type=playsnd
triggerall=time=100
trigger1=enemy,name="Grappler_Shiki"
value=192,3


[State 191, 1] ;Freeze animation until PreIntro is over
type = ChangeAnim
trigger1 = RoundState = 0
value = 191

[State 191, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 191, 3] ;Change to stand state when done
type = ChangeState
trigger1 = AnimTime = 0
value = 0



;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; Introduction
; CNS difficulty: basic
; CNS レベル: 基本
[Statedef 193]
type = S
ctrl = 0
anim = 190
velset = 0,0

[state 1100,グルガン]
type=helper
triggerALL = palno = [1,6]
trigger1=time=0
name="Striker_Glugan"
id=1300
stateno=1350
ownpal=1
pos=0,0
postype=p1

[state 191,イントロ]
type=assertspecial
trigger1=1
flag=intro



[state 40,ジャンプ音]
type=playsnd
trigger1 = animelem=2
value=190,0




[State 191, 3] ;
type = Changeanim
trigger1 = p2stateno != 0
trigger1 = time<420
value = 190
elem=1 

[State 191, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 191, 3] ;Change to stand state when done
type = ChangeState
trigger1 = AnimTime = 0
value = 0



;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; Taunt
; CNS difficulty: easy
[Statedef 195]
type = S
ctrl = 0
anim = 195
velset = 0,0
movetype = I
physics = S
sprpriority = 2


[state 40,ジャンプ音]
type=playsnd
trigger1 = Time = 0
value=195,0

[State 195, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Stand
[Statedef 0]
type = S
physics = S
sprpriority = 0

[state 0,分身対策]
type=destroyself
trigger1=ishelper

[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 0 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 0

[State 0, 2]
type = VelSet
trigger1 = Time = 0
y = 0

[State 0, 3] ;Stop moving if low velocity or 4 ticks pass
type = VelSet
trigger1 = abs(vel x) < 2
trigger2 = Time = 4
x = 0

[State 0, 4] ;Are you dead?
type = ChangeState
trigger1 = !alive
value = 5050

;---------------------------------------------------------------------------
; Stand to Crouch
[Statedef 10]
type    = C
physics = C
anim = 10

[state 10,ハイジャンプ判定]
type=varset
trigger1=time=0
var(5)=20

[State 10, 1]
type = VelMul
trigger1 = Time = 0
x = .75

[State 10, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 11

;---------------------------------------------------------------------------
; Crouching
[Statedef 11]
type    = C
physics = C
anim = 11
sprpriority = 0

[State 11, 1] ;Change from turning animation
type = ChangeAnim
trigger1 = Anim = 6 && AnimTime = 0
value = 11

;---------------------------------------------------------------------------
; Crouch to Stand
[Statedef 12]
type    = S
physics = S
anim = 12

[State 12, 1]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;------------------------------------------------------------------------------------------------------------------------------------------
; Jump Start
[Statedef 40]
type    = S
physics = S
anim = 40
ctrl = 0
sprpriority = 1

[state 40,小ジャンプ判定]
type=varset
trigger1=!var(59)
trigger1=command!="holdup"
trigger2=var(59)
trigger2=(var(58)=[11,12])||(var(58)=[21,22])||var(58)=[-22,-21]
var(6)=1

[state 40,小ジャンプ消去]
type=varset
trigger1=!var(59)
trigger1=command="holdup"
trigger2=var(59)
trigger2=var(58)!=[11,12]
trigger2=var(58)!=[21,22]
trigger2=var(58)!=[-22,-21]
var(6)=0

[State 40, 1]
type = VarSet
trigger1 = Time = 0
sysvar(1) = 0

[State 40, 2]
type = VarSet
trigger1 = !var(59)
trigger1 = command = "holdfwd"
trigger2 = var(59)
trigger2 = var(58) = [20,23]
sysvar(1) = 1

[State 40, 3]
type = VarSet
trigger1 = !var(59)
trigger1 = command = "holdback"
trigger2 = var(59)
trigger2 = var(58) = [-23,-20]
sysvar(1) = -1

[State 40, 4]
type = VelSet
trigger1 = AnimTime = 0
x = ifelse(sysvar(1)=0, const(velocity.jump.neu.x), ifelse(sysvar(1)=1, const(velocity.jump.fwd.x), const(velocity.jump.back.x)))
y = const(velocity.jump.y)

[state 40,垂直ハイジャンプ]
type=velset
trigger1=sysvar(1)=0
trigger1 = AnimTime = 0
trigger1=var(5)>=1
y=const(velocity.jump.y)*1.5

[state 40,前ハイジャンプ]
type=velset
trigger1=sysvar(1)=1
trigger1 = AnimTime = 0
trigger1=var(5)>=1
x=const(velocity.jump.fwd.x)*2

[state 40,後ろハイジャンプ]
type=velset
trigger1=sysvar(1)=-1
trigger1 = AnimTime = 0
trigger1=var(5)>=1
x=const(velocity.jump.back.x)*2

[state 40,小ジャンプ]
type=veladd
trigger1 = AnimTime = 0
trigger1=var(6)=1
y=-const(velocity.jump.y)/3

[state 40,ハイジャンプ残像]
type=afterimage
trigger1 = AnimTime = 0
trigger1=var(5)>=1
time=10
trans=add1
timegap=1
framegap=2
length=8
palbright=12,12,12
palcontrast=225,225,225
palpostbright=0,0,0
paladd=0,0,0
palmul=1,1,1

[state 40,ジャンプ音]
type=playsnd
trigger1 = AnimTime = 0
value=s40,ifelse(var(5)<=0,0,1)

[State 40, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1

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


;---------------------------------------------------------------------------
; Jump Up
[Statedef 50]
type    = A
physics = A



[State 50, 1]
type = VarSet
trigger1 = Time = 0
sysvar(1) = 0

[State 50, 2]
type = ChangeAnim
trigger1 = Time = 0
value = ifelse((vel x)=0, 41, ifelse((vel x)>0, 42, 43))

[State 50, 3]
type = ChangeAnim
trigger1 = Vel y > -2
trigger1 = SelfAnimExist(anim + 3)
persistent = 0
value = Anim + 3

;---------------------------------------------------------------------------
; Jump Down (empty state for compatibility)
[Statedef 51]
type    = A
physics = A



[State 51, 1]
type = Null
trigger1 = 1

;---------------------------------------------------------------------------
; Jump Land
[Statedef 52]
type    = S
physics = S
ctrl = 0
anim = 47

[state 52,ハイジャンプ消去]
type=varset
trigger1=time=0
var(5)=0

[state 52,着地音]
type=playsnd
trigger1=time=0
value=s40,2

[State 52, 1]
type = VelSet
trigger1 = Time = 0
y = 0

[State 52, 2]
type = PosSet
trigger1 = Time = 0
y = 0

[State 52, 3]
type = CtrlSet
trigger1 = Time = 3
value = 1

[State 52, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Walk
[Statedef 20]
type    = S
physics = S
sprpriority = 0

[State 20, 1]
type = VelSet
trigger1 = !var(59)
trigger1 = command = "holdfwd"
trigger2 = var(59)
trigger2 = var(58) = 2
x = const(velocity.walk.fwd.x)

[State 20, 2]
type = VelSet
trigger1 = !var(59)
trigger1 = command = "holdback"
trigger2 = var(59)
trigger2 = var(58) = -2
x = const(velocity.walk.back.x)

[State 20, 3]
type = ChangeAnim
triggerall = vel x > 0
trigger1 = Anim != 20 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 20

[State 20, 4]
type = ChangeAnim
triggerall = vel x < 0
trigger1 = Anim != 21 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 21

;-------------------------------------------------------------------
;---------------------------------------------------------------------------
; 前ダッシュ
[Statedef 100]
type    = S
physics = S
anim = 100
sprpriority = 1

[state 105,ステップ音]
type=playsnd
trigger1=time=0
value=3,4
volume =-200
[state 100,ハイジャンプ判定]
type=varset
trigger1=1
var(5)=20

[State 100, 1]
type = VelSet
trigger1 = 1
x = const(velocity.run.fwd.x)

[State 100, 2] ;Prevent run from canceling into walk
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 100, 3] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 100, 4]
type = ChangeState
trigger1 = !var(59)
trigger1 = command != "holdfwd"
trigger2 = var(59)
trigger2 = var(58) != 3
value = 0

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; 後ダッシュ
[Statedef 105]
type    = S
physics = S
anim = 105
sprpriority = 1

[state 105,ステップ音]
type=playsnd
trigger1=time=3
value=3,4
volume =-200
[state 100,ハイジャンプ判定]
type=varset
trigger1=1
var(5)=20

[State 100, 1]
type = VelSet
trigger1=animelemtime(2)>0
x = const(velocity.run.back.x)

[State 100, 2] ;Prevent run from canceling into walk
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 100, 3] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 100, 4]
type = ChangeState
trigger1 = !var(59)
trigger1 = command != "holdback"
trigger2 = var(59)
trigger2 = var(58) != 3
value = 0

;---------------------------------------------------------------------------
;------------------
;---------------------------------------------------------------------------
; バックステップ
[Statedef 106]
type    = S
physics = N
ctrl = 0
anim = 106
sprpriority = 1
velset = 0,0

[state 105,空中状態に移行]
type=statetypeset
trigger1=animelemtime(2)=0
value=a

[state 105,バックステップ音]
type=playsnd
trigger1=prevstateno !=105
trigger1=animelemtime(2)=0
value=3,4
volume =-200

[State 105, 1]
type = VelSet
trigger1=animelemtime(2)=0
x = const(velocity.run.back.x)*1.8
y = -4.5

[state 105,重力]
type = veladd
trigger1=animelemtime(2)>=0
y=const(movement.yaccel)

[state 105,減速]
type=velmul
trigger1=1
x=0.96

[State 105, 3]
type = ChangeState
trigger1=animelemtime(2)>=0
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 107

;---------------------------------------------------------------------------
; RUN_BACK2 (land)
[Statedef 107]
type    = S
physics = S
ctrl = 0
anim = 107

[state 106,着地音]
type=playsnd
trigger1=time=0
value=40,2

[State 106, 1]
type = VelSet
trigger1 = Time = 0
y = 0

[State 106, 2]
type = PosSet
trigger1 = Time = 0
y = 0

[State 106, 3]
type = MakeDust
trigger1 = Time = 2
pos = -5,-2
spacing = 1

[State 106, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;===========================================================================
;MAX発動
[statedef 950]
type=s
movetype=i
physics=s
anim=950
ctrl=0
poweradd=-1000

[state 950,声]
type=playsnd
trigger1=time=0
value=0,4
channel=0

[state 950,効果音]
type=playsnd
trigger1=time=0
value=7010,0

[state 950,エフェクト]
type=explod
trigger1=time=0
anim=7011
pos=0,-80
postype=p1
bindtime=-1
ontop=1
ownpal=1

[state 950,MAXタイマーセット]
type=varset
trigger1=time=0
var(1)=900

[state 950,ゲージ量保存]
type=varset
trigger1=time=0
var(2)=power

[state 950,終了]
type=changestate
trigger1=animtime=0
value=0
ctrl=1

;---------------------------------------------------------------------------
;クイックMAX発動
[statedef 951]
type=s
movetype=i
physics=s
ctrl=0
poweradd=-2000

[state 951,効果音]
type=playsnd
trigger1=time=0
value=7010,1

[state 951,エフェクト]
type=explod
trigger1=time=0
anim=7011
pos=0,-80
postype=p1
bindtime=-1
ontop=1
ownpal=1

[state 951,MAXタイマーセット]
type=varset
trigger1=time=0
var(1)=900

[state 951,ゲージ量保存]
type=varset
trigger1=time=0
var(2)=power

[state 951,終了]
type=changestate
trigger1=time=1
value=0
ctrl=1

;===========================================================================
;相手用:きりもみ吹っ飛び(ヒットシェイク)
[statedef 5400]
type=u
movetype=h
physics=n
ctrl=0

[state 5400,相手のアニメ変更]
type=changeanim2
trigger1=1
value=5400

[state 5400,硬直]
type=posfreeze
trigger1=1

[state 5400,吹っ飛び開始]
type=changestate
trigger1=hitshakeover
value=5401

;---------------------------------------------------------------------------
;相手用:きりもみ吹っ飛び
[statedef 5401]
type=a
movetype=h
physics=n
ctrl=0

[state 5401,相手のアニメ変更]
type=changeanim2
trigger1=time=0
value=5400

[state 5401,重力]
type=velset
trigger1=time=0
x=facing*gethitvar(xvel)
y=gethitvar(yvel)

[state 5401,重力]
type=veladd
trigger1=!gethitvar(isbound)
y=gethitvar(yaccel)

[state 5401,ダウン]
type=selfstate
trigger1=pos y>=0
trigger1=vel y>0
value=5100

;===========================================================================
;敵用:ワイヤーダメージ(ヒットシェイク)
[statedef 5410]
type=u
movetype=h
physics=n
ctrl=0
vel=0,0

[state 5410,アニメ変更1]
type=changeanim
trigger1=selfanimexist(5900)
value=5900

[state 5410,アニメ変更2]
type=changeanim2
trigger1=!selfanimexist(5900)
value=5410

[state 5410,硬直]
type=posfreeze
trigger1=1

[state 5410,吹っ飛び開始]
type=changestate
trigger1=hitshakeover
value=5411

;---------------------------------------------------------------------------
;敵用:ワイヤーダメージ(壁まで吹っ飛ぶ)
[statedef 5411]
type=a
movetype=h
physics=n
ctrl=0

[State 4005, push]
type=playerpush
trigger1= 1
value=0
ignorehitpause=1

[state 5411,横にまっすぐ飛ぶ]
type=velset
trigger1=1
x=-10
y=0

[state 5411,カメラ固定]
type=screenbound
trigger1=1
value=0

[state 5411,跳ね返りへ]
type=changestate
trigger1=backedgebodydist<10
trigger2=frontedgebodydist<10
trigger3=time>300
value=5412

;---------------------------------------------------------------------------
;敵用:ワイヤーダメージ(跳ね返る)
[statedef 5412]
type=a
movetype=h
physics=n

[state 5412,反転]
type=turn
trigger1=backedgebodydist<frontedgebodydist
trigger1=time=0

[state 5412,壁ぶつかったときの速度]
type=velset
trigger1=time=0
x=-1
y=-10

[state 5412,アニメ変更]
type=changeanim2
trigger1=time=0
value=5411

[state 5412,重力]
type=veladd
trigger1=1
y=0.4

[state 5412,地面に落下(終了)]
type=selfstate
trigger1=pos y>=0
trigger1=vel y>0
value=5100

;===========================================================================
;敵用:滑りダウン(ヒットシェイク)
[statedef 5420]
type=u
movetype=h
physics=n
ctrl=0
vel=0,0

[state 5420,アニメ変更]
type=changeanim2
trigger1=1
value=5410

[state 5420,硬直]
type=posfreeze
trigger1=1

[state 5420,吹っ飛び開始]
type=changestate
trigger1=hitshakeover
value=5421

;---------------------------------------------------------------------------
;敵用:滑りダウン(吹っ飛び)
[statedef 5421]
type=a
movetype=h
physics=n
sprpriority=1

[state 5421,喰らい速度]
type=hitvelset
trigger1=time=0
x=1
y=1

[state 5421,喰らい重力]
type=veladd
trigger1=1
y=gethitvar(yaccel)

[state 5421,滑り]
type=changestate
trigger1=pos y>=0
trigger1=vel y>0
value=5422

;---------------------------------------------------------------------------
;敵用:滑りダウン(滑り)
[statedef 5422]
type=l
movetype=h
physics=s
sprpriority=1

[state 5422,速度]
type=velmul
trigger1=time=0
x=2
y=0

[state 5422,着地y座標]
type=posset
trigger1=time=0
y=0

[state 5422,アニメ変更]
type=changeanim2
trigger1=time=0
value=5420

[state 5422,砂埃]
type=makedust
trigger1=1
pos=0,0
pos2=-10,0
spacing=3

[state 5422,相手ステートに戻す]
type=selfstate
trigger1=vel x>=0
value=5110

;===========================================================================
;敵用:ガークラ(ヒットシェイク)
[statedef 5430]
type=u
movetype=h
physics=u
ctrl=0
vel=0,0

[state 5430,アニメ変更(空中)]
type=changeanim
triggerall=selfanimexist(5930)
trigger1=statetype=a
value=5930

[state 5430,アニメ変更(しゃがみ)]
type=changeanim
triggerall=selfanimexist(5920)
trigger1=statetype=c
trigger2=statetype=a
trigger2=!selfanimexist(5930)
value=5920

[state 5430,アニメ変更(立ち)]
type=changeanim
triggerall=selfanimexist(5910)
trigger1=statetype=s
trigger2=statetype=c
trigger2=!selfanimexist(5920)
trigger3=statetype=a
trigger3=!selfanimexist(5920)
trigger3=!selfanimexist(5930)
value=5910

[state 5430,アニメ変更(自前のが無い人)]
type=changeanim2
trigger1=!selfanimexist(5910)
trigger1=!selfanimexist(5920)
trigger1=!selfanimexist(5930)
value=ifelse(statetype=c,5431,5430)

[state 5430,硬直]
type=posfreeze
trigger1=1

[state 5430,のけぞり開始]
type=changestate
trigger1=hitshakeover
value=5431

;---------------------------------------------------------------------------
;敵用:ガークラ
[statedef 5431]
type=u
movetype=h
physics=u
ctrl=0

[state 5431,状態]
type=statetypeset
trigger1=time=0
trigger1=statetype=s
physics=s

[state 5431,状態]
type=statetypeset
trigger1=time=0
trigger1=statetype=c
physics=c

[state 5431,状態]
type=statetypeset
trigger1=time=0
trigger1=statetype=a
physics=a

[state 5431,喰らい速度]
type=hitvelset
trigger1=time=0
x=1
y=statetype=a

[state 5431,終了]
type=selfstate
trigger1=time>=30
value=ifelse(statetype=a,50,ifelse(statetype=c,11,0))
ctrl=1


;===========================================================================
;回り込み
[statedef 700]
type=s
movetype=i
physics=s
anim=700
ctrl=0
sprpriority=-1

[state 900,残像]
type=afterimage
trigger1=time=0
time=12
trans=add1
timegap=2
framegap=2
length=6
palbright=12,12,12
palcontrast=225,225,225
palpostbright=0,0,0
paladd=0,0,0
palmul=1,1,1

[state 900,投げ以外無敵]
type=hitby
trigger1=animelemtime(8)<0
value=sca,at

[state 900,声]
type=playsnd
trigger1=animelemtime(2)=0
value=900,0
channel=0

[state 900,滑る]
type=velset
trigger1=animelemno(0)=[2,7]
x=5

[state 900,すり抜け]
type=playerpush
trigger1=1
value=0

[state 900,停止]
type=velset
trigger1=animelemtime(8)=0
x=0

[state 900,終了]
type=changestate
trigger1=animtime=0
value=0
ctrl=1

;---------------------------------------------------------------------------
;ガーキャン回り込み
[statedef 701]
type=s
movetype=i
physics=s
anim=700
ctrl=0
sprpriority=-1
poweradd=-1000

[state 901,画面フラッシュ]
type=envcolor
trigger1=time=0
value=255,255,255
time=5
under=1

[state 901,一瞬停止]
type=pause
trigger1=time=0
time=10

[state 901,ゲージ保存値マイナス]
type=varadd
trigger1=time=0
trigger1=var(1)
var(2)=-1000

[state 901,残像]
type=afterimage
trigger1=time=0
time=12
trans=add1
timegap=2
framegap=2
length=6
palbright=12,12,12
palcontrast=225,225,225
palpostbright=0,0,0
paladd=0,0,0
palmul=1,1,1

[state 901,無敵]
type=nothitby
trigger1=time<10
value=sca

[state 901,投げ以外無敵]
type=hitby
trigger1=animelemtime(8)<0
value=sca,at

[state 901,声]
type=playsnd
trigger1=animelemtime(2)=0
value=900,0
channel=0

[state 901,滑る]
type=velset
trigger1=animelemno(0)=[2,7]
x=5

[state 901,すり抜け]
type=playerpush
trigger1=1
value=0

[state 901,停止]
type=velset
trigger1=animelemtime(8)=0
x=0

[state 901,終了]
type=changestate
trigger1=animtime=0
value=0
ctrl=1

;---------------------------------------------------------------------------
;クイック回り込み
[statedef 702]
type=s
movetype=i
physics=s
anim=700
ctrl=0
sprpriority=-1
poweradd=-1000

[state 902,画面フラッシュ]
type=envcolor
trigger1=time=0
value=255,255,255
time=2
under=1

[state 902,ゲージ保存値マイナス]
type=varadd
trigger1=time=0
trigger1=var(1)
var(2)=-1000

[state 902,残像]
type=afterimage
trigger1=time=0
time=12
trans=add1
timegap=2
framegap=2
length=6
palbright=12,12,12
palcontrast=225,225,225
palpostbright=0,0,0
paladd=0,0,0
palmul=1,1,1

[state 902,投げ以外無敵]
type=hitby
trigger1=animelemtime(8)<0
value=sca,at

[state 902,声]
type=playsnd
trigger1=animelemtime(2)=0
value=900,0
channel=0

[state 902,滑る]
type=velset
trigger1=animelemno(0)=[2,7]
x=5

[state 902,すり抜け]
type=playerpush
trigger1=1
value=0

[state 902,停止]
type=velset
trigger1=animelemtime(8)=0
x=0

[state 902,終了]
type=changestate
trigger1=animtime=0
value=0
ctrl=1

;---------------------------------------------------------------------------
;後ろ回り込み
[statedef 705]
type=s
movetype=i
physics=s
anim=705
ctrl=0
sprpriority=-1

[state 905,残像]
type=afterimage
trigger1=time=0
time=12
trans=add1
timegap=2
framegap=2
length=6
palbright=12,12,12
palcontrast=225,225,225
palpostbright=0,0,0
paladd=0,0,0
palmul=1,1,1

[state 905,投げ以外無敵]
type=hitby
trigger1=animelemtime(8)<0
value=sca,at

[state 905,声]
type=playsnd
trigger1=animelemtime(2)=0
value=900,0
channel=0

[state 905,滑る]
type=velset
trigger1=animelemno(0)=[2,7]
x=-5

[state 905,すり抜け]
type=playerpush
trigger1=1
value=0

[state 905,停止]
type=velset
trigger1=animelemtime(8)=0
x=0

[state 905,終了]
type=changestate
trigger1=animtime=0
value=0
ctrl=1

;---------------------------------------------------------------------------
;ガーキャン後ろ回り込み
[statedef 706]
type=s
movetype=i
physics=s
anim=705
ctrl=0
sprpriority=-1
poweradd=-1000

[state 906,画面フラッシュ]
type=envcolor
trigger1=time=0
value=255,255,255
time=5
under=1

[state 906,一瞬停止]
type=pause
trigger1=time=0
time=10

[state 906,ゲージ保存値マイナス]
type=varadd
trigger1=time=0
trigger1=var(1)
var(2)=-1000

[state 906,残像]
type=afterimage
trigger1=time=0
time=12
trans=add1
timegap=2
framegap=2
length=6
palbright=12,12,12
palcontrast=225,225,225
palpostbright=0,0,0
paladd=0,0,0
palmul=1,1,1

[state 906,無敵]
type=nothitby
trigger1=time<10
value=sca

[state 906,投げ以外無敵]
type=hitby
trigger1=animelemtime(8)<0
value=sca,at

[state 906,声]
type=playsnd
trigger1=animelemtime(2)=0
value=900,0
channel=0

[state 906,滑る]
type=velset
trigger1=animelemno(0)=[2,7]
x=-5

[state 906,すり抜け]
type=playerpush
trigger1=1
value=0

[state 906,停止]
type=velset
trigger1=animelemtime(8)=0
x=0

[state 906,終了]
type=changestate
trigger1=animtime=0
value=0
ctrl=1

; Hit by Kick
[Statedef 246]
type    = A
movetype= H
physics = N
;velset  = -22,0
ctrl    = 0
anim = 5012

[state screenbound activator]
type = PLayerPush
trigger1 = 1
value = 0

[State 246, ChangeAnim for Player 2]
type = null;changeanim2
trigger1 = time = 0
value = 246

[State 246, ChangeAnim for Player 2]
type = Velset
trigger1 = time = 12
x = -10

[State 246, ChangeAnim for Player 2]
type = Velset
trigger1 = time = 0
y = 0
X = 0

[State 265, Change to flying away]
type     = ChangeState
trigger1 = backedgedist <= 5
trigger2=frontedgebodydist<10
value    = 247

[statedef 247]
type = A
movetype = H
Physics = N

[state screenbound activator]
type = PLayerPush
trigger1 = 1
value = 0

[State 1000, Flames]
type = Explod
trigger1 = time = 1
anim = F72
pos = -10,-54
facing = 1
sprpriority = 2
bindtime = 2
supermove = 1
trans = add

[state 940, If you are not Kagami]
type = PlaySnd
trigger1 = time = 1
value = F7,2
persistent = 0







[State 942, 1]
type = null;PosAdd
trigger1 = Time = 0
y = -20

[State 942, 3]
type = VelSet
trigger1 = Time = 0
x = 0
y = 0
z = 0

[State 942, 4]
type = EnvShake
Trigger1 = Time = 0
time = 15
ampl = -3
freq = 90
phase = 90



[State 942, 6]
type = SelfState
trigger1 = Time = 10
value = 5030
;---------------------------------------------------------------------------
;===========================================================================


;---------------------------------------------------------------------------
;パワー溜め/power
[Statedef 290]
type    = S
physics = S
movetype= I
anim = 290
ctrl = 0
velset = 0,0
sprpriority = 2

[State 1]
type = PowerAdd
triggerall = Anim = 290
trigger1 = Anim = 290 && animelem = 4,>=0
value = 1*time/5




[State 0, Explod]
type = Explod
trigger1 = power < 5000
trigger1 = Anim = 290 && animelem = 3
anim = 1430
ID = 290
pos = 0-10,0
postype = p1  ;p2,front,back,left,right
removetime = -1
sprpriority = 3
removeongethit = 1
ignorehitpause = 0
ownpal = 1
pausemovetime = 99999
supermovetime = 99999

[State 0, Explod]
type = Explod
trigger1 = power < 5000
trigger1 = Anim = 290 && animelem = 3
anim = 1440
ID = 290
pos = 15-10,-15
postype = p1  ;p2,front,back,left,right
removetime = -1
sprpriority = -1
removeongethit = 1
ignorehitpause = 0
ownpal = 1
pausemovetime = 99999
supermovetime = 99999


[State 0, Explod]
type = Explod
trigger1 = Anim = 291 && animelem = 1
anim = 1450
ID = 291
pos = -25-10,0
postype = p1  ;p2,front,back,left,right
;removetime = -1
sprpriority = 3
removeongethit = 1
ignorehitpause = 0

[State 0, Explod]
type = Explod
trigger1 = Anim = 291 && animelem =1
anim = 1460
ID = 291
pos = -10-10,-15
postype = p1  ;p2,front,back,left,right
;removetime = -1
sprpriority = -1
removeongethit = 1
ignorehitpause = 0



[state a]
type = removeexplod
trigger1 = Anim = 291 
ID = 290



[state 1]
type = playsnd
trigger1 = Anim = 290 && animelem = 3
value = s4,13
volume = 130


[State 1]
type = PlaySnd
trigger1 = Anim = 290 && animelem = 3
value = s3100,0
volume = 100
channel = 10

[State 1]
type = stopSnd
trigger1 = Anim != 290 
channel = 10



[State 1]
type = Changeanim
trigger1 = !var(59)
trigger1 = (command != "hold_b" || command != "hold_c") || power >= 5000
value = 291
persistent = 0

[State 1]
type = Changeanim
triggerall = var(59)>0
trigger1 = !Teammode = simul
trigger1 = enemynear,movetype=A
trigger2 = Teammode = simul
trigger2 = Partner,Alive = 1
trigger2 = power>=2000||P2bodydist X<80||Partner,movetype = H
Trigger3 = Enemy,NumHelper > 0 && inguarddist || Enemy,NumProj > 0
Trigger3 = enemynear,movetype = A
value = 291
persistent = 0

[State 1]
type = CtrlSet
trigger1 = anim = 291
value = 1

[State 1]
type = ChangeState
trigger1 = Anim = 291 && AnimTime = 0 && var(59)<=0
trigger2 = Anim = 291 && var(59)>0
value = 0
ctrl = 1
;----------------------------------------------------------------------------------

;---------------------------------------------------------------------------
; Override common states (use same number to override) :
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; States that are always executed (use statedef -2)
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; States that are executed when in self's state file (use statedef -3)
;---------------------------------------------------------------------------


