;Var(0)  = ジャストディフェンス硬直時間
;Var(1)  = 
;Var(2)  = 斬りヒット用
;Var(3)  = ジャンプ管理1（距離）
;Var(4)  = ジャンプ管理2（高さ）
;Var(5)  = 強弱管理
;Var(6)  = 
;Var(7)  = Cグルーヴパワー量による攻撃力変動
;Var(8)  = 残りライフ量による攻撃力変動
;Var(9)  = 相手残りライフ量による攻撃力変動
;Var(10) = ブロッキング前入力
;Var(11) = ブロッキング下入力
;Var(12) = モード判定用
;Var(13) = 瞬獄殺KO判定用
;Var(14) = SグルーヴパワーMAX残り時間
;Var(15) = NグルーヴパワーMAX残り時間
;Var(16) = オリコン残り時間
;Var(17) = オリコン時ヒット数用
;Var(18) = オリコンOn/Off
;Var(19) = オリコン時残りゲージ量
;Var(20) = グルーヴ判定
;Var(21) = KグルーヴパワーMAXによる攻撃力変動
;Var(22) = 強制fall=0時juggle判別用
;Var(23) = 追い討ち用
;Var(24) = グルーヴによるパワー増加量変動
;Var(25) = ジャストディフェンス入力
;Var(26) = 前ラウンド勝敗判定
;Var(27) = KOボイス判定
;Var(28) =
;Var(29) =
;Var(30) =
;Var(31) = Kグルーヴライフ残量によるパワー増加量変動
;Var(32) = roundstate3時間経過
;Var(33) = 　　　　使用済み
;Var(34) = 前ブロッキング入力後ニュートラルに戻したか否か
;Var(35) = 下ブロッキング入力後ニュートラルに戻したか否か
;Var(36) = Hit判定
;Var(37) = gethitvar(hitshaketime)
;Var(38) = カウンターヒットエフェクト表示位置（X軸）（攻撃）
;Var(39) = カウンターヒットエフェクト表示位置（Y軸）（攻撃）
;Var(40) = コンボ制限用1
;Var(41) = カウンターヒット用
;Var(42) = コンボ制限用2
;Var(43) = Kグルーヴ怒りMAX中判定
;Var(44) = 残像再発生用
;Var(45) = 食らい判定再出現用
;var(46) = GetHitVar(damage)
;Var(47) = MAXヒット数
;Var(48) = プレイヤー状態
;Var(49) = 相手状態
;Var(50) = グルーヴポイント
;var(51) = ラウンド開始からの経過時間
;Var(52) = キャラ判別
;var(53) = 相手ライフ（ダメージ前）
;var(54) = コンプリートボーナス用
;var(55) = コンプリートボーナス用2
;var(56) = matchover時間経過
;var(57) = 相手動作によるゲージ消去判定
;Var(58) = ファーストストライク判定
;Var(59) = AI判定

;fvar(0)  = コンボ補正
;fvar(1)  = ガード中State判定
;fvar(2)  = 投げ抜け判定
;fvar(3)  = グルーヴポイント表示On/Off
;fvar(4)  = 
;fvar(5)  = ボーナスメッセージアイコン表示一段目有無
;fvar(6)  = ボーナスメッセージアイコン表示二段目有無
;fvar(7)  = ボーナスメッセージアイコン表示三段目有無
;fvar(8)  = アイコン種類
;fvar(9)  = フィニッシュヒット判定
;fvar(10) = 攻撃力補正
;fvar(11) = roundState4経過時間
;fvar(12) = ライフ
;fvar(13) = KグルーヴパワーMAX残り時間
;fvar(14) = パーフェクト判定
;fvar(15) = カウンターヒットメッセージ用
;fvar(16) = DoubleRes設定（ゲージのみ）
;fvar(17) = 　　　　使用済み
;fvar(18) = 
;fvar(19) = KOボイス種類判定
;fvar(20) = やられ時にゲージ消去をする相手動作の判定
;fvar(21) = パワー溜まった時の音用
;fvar(22) = リバーサル判定用1
;fvar(23) = リバーサル判定用2
;fvar(24) = GP表示背景色変化用
;fvar(25) = 燃焼、感電エフェクト用
;fvar(26) = 空中コンボ用
;fvar(27) = 
;fvar(28) = 
;fvar(29) = 斬りヒット用
;fvar(30) = 斬りヒット用
;fvar(31) = 斬りヒット用
;fvar(32) = 
;fvar(33) = 
;fvar(34) = 
;fvar(35) = 
;fvar(36) = 強制停止中ガード不能時間
;fvar(37) = メッセージアイコンの表示Y座標補正
;fvar(38) = 空中復帰誘導
;fvar(39) = ゲームシステム判別

[Data]
life = 1000
attack = 100
defence = 100
fall.defence_up = 50
liedown.time = 60
airjuggle = 15
sparkno = 2
guard.sparkno = 40
KO.echo = 0
volume = 100
IntPersistIndex = 0
FloatPersistIndex = 0

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

[Velocity]
walk.fwd  = 2.67		;前進の速度
walk.back = -2		;後退の速度
run.fwd  = 4.93, 0		;前ダッシュの速度（ホップする時はyを-にする）
run.back = -4.8,-4.5		;後ダッシュの速度（ホップする時はyを-にする）
jump.neu = 0,-9.2		;垂直ジャンプの速度
jump.back = -3.78		;後ジャンプの速度
jump.fwd = 3.66		;前ジャンプの速度
runjump.back = -5.81,-9.4	;後ダッシュしながらのジャンプ速度(オプション)
runjump.fwd = 5.04,-9.4	;前ダッシュしながらのジャンプ速度(オプション)
airjump.neu = 0,-6.5		;２段ジャンプ以降の垂直ジャンプの速度(オプション)
airjump.back = -2.8		;２段ジャンプ以降の後ジャンプの速度(オプション)
airjump.fwd = 2.8		;２段ジャンプ以降の前ジャンプの速度

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

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

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

[State 0, 2]
type = Changeanim
triggerall = var(12)
trigger1 = Anim != 1 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 1

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

;---------------------------------------------------------------------------
;歩き
[Statedef 20]
type    = S
physics = S
sprpriority = 0
ctrl = 1

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

[State 20, 2]
type = VelSet
trigger1 = command = "holdback" && !var(59)
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

;---------------------------------------------------------------------------
;歩き（CPU）
[Statedef 21]
type    = S
physics = N
sprpriority = 0
ctrl = 0
velset = 0,0

[State 20, 1]
type = VelSet
trigger1 = time = 0
x = ifelse(random%10<=3&&P2bodydist x<50,const(velocity.walk.back.x),const(velocity.walk.fwd.x))

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

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

[State 20, 4]
type = changestate
trigger1 = time > 20
trigger1 = P2bodydist x <= 50 && anim = 20
trigger2 = inguarddist
trigger3 = roundstate != 2
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;ジャンプ開始
[Statedef 40]
type    = S
physics = S
anim = ifelse((!var(20) || var(20) = 1),40,50)
ctrl = 0
velset = 0,0

[State 40, HitBy]
type = HitBy
trigger1 = 1
value = SCA, NA,SA,HA,NP,SP,HP

[State 40, Dust]
type = Helper
trigger1 = AnimTime = 0
id = 8020
name = "jump Effect"
pos = 0,0
postype = P1
stateno = 8020
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
;pausemovetime = 99999999999999
supermovetime = 99999999999999

[State 40, 1]
type = VarSet
triggerall = !var(59)
trigger1 = Time = 0
sysvar(1) = command = "holdfwd"-command = "holdback"

[State 40, 1]
type = VarSet
triggerall = PrevStateNo != 100 && PrevStateNo != 101
triggerall = var(59) = 1
trigger1 = Random = [0,80]
sysvar(1) = 0

[State 40, 2]
type = VarSet
triggerall = PrevStateNo != 100 && PrevStateNo != 101
triggerall = var(59) = 1
trigger1 = Random = [81,750]
sysvar(1) = 1

[State 40, 3]
type = VarSet
triggerall = PrevStateNo != 100 && PrevStateNo != 101
triggerall = var(59) = 1
trigger1 = Random = [751,999]
sysvar(1) = -1

[State 40, 4]
type = VarSet
trigger1 = Time = 0
var(3) = 0

[State 40, 4]
type = VarSet
triggerall = Time = 0
triggerall = !var(59)
trigger1 = (PrevStateNo = 100 || PrevStateNo = 101) && sysvar(1) = 1
trigger2 = Command = "longjump"
trigger3 = Command = "longjump" && Command = "holdfwd"
trigger4 = Command = "longjump" && Command = "holdback"
var(3) = 1

[State 40, 4]
type = VarSet
triggerall = var(59) = 1
triggerall = Time = 0
trigger1 = PrevStateNo = 100 || PrevStateNo = 101
trigger2 = Random = [0,420]
var(3) = 1

[State 40, 4]
type = VarSet
trigger1 = Time = 0
var(4) = 0

[State 40, 5]
type = VarSet
triggerall = !var(59)
triggerall = var(20) = 2 || var(20) = 3 || var(20) = 4 || var(20) = 5 || var(20) = 6
trigger1 = command != "holdup"
var(4) = 1

[State 40, 5]
type = VarSet
triggerall = var(59) = 1
triggerall = var(20) = 2 || var(20) = 3 || var(20) = 4 || var(20) = 5 || var(20) = 6
trigger1 = Random = [0,130]
var(4) = 1

[State 40, 6]
type = VelSet
trigger1 = AnimTime = 0
trigger1 = !Var(3)
x = ifelse(!sysvar(1), 0, ifelse(sysvar(1)=1, const(velocity.jump.fwd.x), const(velocity.jump.back.x)))

[State 40, 7]
type = VelSet
trigger1 = AnimTime = 0
trigger1 = Var(3)
x = ifelse(!sysvar(1), 0, ifelse(sysvar(1)=1, const(velocity.runjump.fwd.x), const(velocity.runjump.back.x)))

[State 40, 8]
type = VelSet
trigger1 = AnimTime = 0
trigger1 = !Var(4)
y = ifelse(Var(3) && !SysVar(1), const(velocity.jump.y)*1.15, const(velocity.jump.y))

[State 40, 9]
type = VelSet
trigger1 = AnimTime = 0
trigger1 = Var(4)
y = ifelse(Var(3) && !SysVar(1), const(velocity.jump.y)*1.15*.75, const(velocity.jump.y)*.75)

[State 52, Effect]
type = PlaySnd
trigger1 = AnimTime = 0
value = 40, var(3)
channel = 20

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

;---------------------------------------------------------------------------
;ジャンプ
[Statedef 50]
type    = A
physics = N

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

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

[State 50, 2]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = Var(4)
value = ifelse((vel x)=0, 51, ifelse((vel x)>0, 52, 53))

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

[State 50, AfterImage]
type = AfterImage
triggerall = !var(16)
trigger1 = Time = 0
trigger1 = Var(3)
time = 20
PalBright = 1,1,1
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = .5,.5,.5
length = 9
trans = add1
TimeGap  = 2
FrameGap = 4

[State -3, Variable Height]
type = PlayerPush
triggerall = statetype=A && movetype!=H && numenemy
triggerall = p2bodydist x = [-(enemynear,const(size.ground.back) + enemynear,const(size.ground.front)), 0]
trigger1 = p2statetype=S
trigger1 = p2dist y >= (enemynear,const(size.height) - 12); Value depends on each char
trigger2 = p2statetype=C
trigger2 = p2dist y >= (enemynear,const(size.height) - 28); Value depends on each char
trigger3 = p2statetype=L
trigger3 = p2dist y >= 12
value=0
ignorehitpause=1

[State 4030, Gravity]
type = Gravity
trigger1 = 1

[State 4030, ChangeState]
type = ChangeState
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 52

;---------------------------------------------------------------------------
;ジャンプ着地
[Statedef 52]
type    = S
physics = S
ctrl = 0
anim = ifelse(var(4),57,47)
velset = 0,0

[State 1000, Spark]
type = Explod
trigger1 = Time = 0
Anim = 8030
pos = 0, 0
postype = p1
ownpal = 1
sprpriority = -3
;pausemovetime = -1
supermovetime = -1
scale = .5,.5

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

[State 52, 3]
type = CtrlSet
triggerall = prevstateno != [600,799]
trigger1 = Time = 1
value = 1

[State 52, Effect]
type = PlaySnd
trigger1 = Time = 0
value = 52, 0
channel = 20

[State 52, RemoveAfterImage]
type = AfterImageTime
triggerall = !var(16)
trigger1 = Time = 0
time = 0

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

;------------------------------------------------------------------------------------------
;ラン
[Statedef 100]
type    = S
physics = S
anim = 100
velset = 0,0
ctrl = 0

[State 1000, Spark]
type = Explod
trigger1 = Time = 0
Anim = 8040
pos = 0, 0
postype = p1
ownpal = 1
sprpriority = 3
;pausemovetime = -1
supermovetime = -1
scale = .5,.5

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

[State 100, 2]
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 100, 3]
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 100, 4]
type = ChangeState
triggerall = !var(59)
trigger1 = command = "holdup"
value = 40

[State 100, Effect]
type = PlaySnd
trigger1 = time = 1
value = 100,0
channel = 18

[State 100, Effect]
type = PlaySnd
trigger1 = AnimElemTime(3) = 0
value = 100,1
channel = 19

[State 100, Effect]
type = PlaySnd
trigger1 = AnimElemTime(6) = 0
value = 100,2
channel = 20

[State 100, 5]
type = ChangeState
triggerall = !var(59)
triggerall = AnimElemTime(2) >= 1
trigger1 = command != "holdfwd"
value = 101
ctrl = 1

[State 100, 5]
type = ChangeState
triggerall = var(59)
triggerall = AnimElemTime(2) >= 1
trigger1 = P2BodyDist X <= 45 && Random <= 700
trigger2 = P2MoveType = A && Random <= 500 && P2BodyDist X <= 70
trigger3 = roundState != 2
value = 101
ctrl = 1

;---------------------------------------------------------------------------
;ラン停止
[Statedef 101]
type = S
physics = N
ctrl = 0
anim = 101

[State 100, 4]
type = ChangeState
triggerall = !var(59)
trigger1 = command = "holdup"
value = 40

[State 100, 1]
type = VelMul
trigger1 = 1
x = .9

[State 100, 1]
type = VelSet
trigger1 = animtime = 0
x = 0

[State 100, Effect]
type = PlaySnd
trigger1 = AnimElem = 1
value = 100,3
channel = 20

[State 101, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;ステップ
[Statedef 102]
type    = A
physics = N
ctrl = 0
anim = 102
velset = 0,0

[State 52, Effect]
type = PlaySnd
trigger1 = Time = 1
value = 100, 0
channel = 20

[State 1000, Spark]
type = Explod
trigger1 = Time = 0
Anim = 8040
pos = 0, 0
postype = p1
ownpal = 1
sprpriority = 3
;pausemovetime = -1
supermovetime = -1
scale = .5,.5

[State 105, 1]
type = VelSet
trigger1 = AnimElem = 2
x = 7.76

[State 105, 1]
type = VelMul
trigger1 = AnimElemTime(2) > 0
x = .98

[State 105, 3]
type = ChangeState
trigger1 = animtime = 0
value = 103

;---------------------------------------------------------------------------
;ステップ着地
[Statedef 103]
type    = S
physics = N
ctrl = 1
anim = 103
velset = 0,0

[State 1000, Spark]
type = Explod
trigger1 = time = 0
Anim = 8030
pos = 0, 0
postype = p1
ownpal = 1
sprpriority = -3
;pausemovetime = -1
supermovetime = -1
scale = .5,.5

[State 52, Effect]
type = PlaySnd
trigger1 = Time = 0
value = 100, 1
channel = 20

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

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

;---------------------------------------------------------------------------
;バックステップ
[Statedef 105]
type    = A
physics = N
ctrl = 0
anim = 105
velset = 0,0

[State 52, Effect]
type = PlaySnd
trigger1 = Time = 1
value = 105, 0
channel = 20

[State 1000, Spark]
type = Explod
trigger1 = Time = 0
Anim = 8040
pos = 0, 0
postype = p1
ownpal = 1
sprpriority = 3
;pausemovetime = -1
supermovetime = -1
scale = .5,.5

[State 105, 1]
type = VelSet
trigger1 = AnimElem = 2
x = -5.41

[State 105, 1]
type = VelMul
trigger1 = AnimElemTime(2) > 0
x = .98

[State 105, 3]
type = ChangeState
trigger1 = animtime = 0
value = 106

;---------------------------------------------------------------------------
;バックステップ（着地）
[Statedef 106]
type    = S
physics = S
ctrl = 0
anim = 106
velset = 0,0

[State 1000, Spark]
type = Explod
trigger1 = Time = 0
Anim = 8030
pos = 0, 0
postype = p1
ownpal = 1
sprpriority = -3
;pausemovetime = -1
supermovetime = -1
scale = .5,.5

[State 52, Effect]
type = PlaySnd
trigger1 = Time = 0
value = 52, 0
channel = 20

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

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

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

;---------------------------------------------------------------------------
; GUARD (start)
[Statedef 120]
type = U    ;Leave state type unchanged
physics = U ;Leave physics unchanged
ctrl = !var(59)

[State 120, 1]
type = ChangeAnim
trigger1 = Time = 0
value = 120 + (statetype = C) + (statetype = A)*2

[State 120, 2]
type = StateTypeSet
trigger1 = Time = 0 && statetype = S
physics = S

[State 120, 3]
type = StateTypeSet
trigger1 = Time = 0 && statetype = C
physics = C

[State 120, 4]
type = StateTypeSet
trigger1 = Time = 0 && statetype = A
physics = A

[State 120, Hi to Lo]
type = StateTypeSet
trigger1 = !var(59)
trigger1 = statetype = S && command = "holddown"
trigger2 = var(59)
trigger2 = statetype = S && P2statetype = C
trigger3 = var(59)
trigger3 = statetype = S
trigger3 = P2bodydist x > 100
statetype = C
physics = C

[State 120, Lo to Hi]
type = StateTypeSet
trigger1 = !var(59)
trigger1 = statetype = C && command != "holddown"
trigger2 = var(59)
trigger2 = statetype = C && P2statetype = S
trigger2 = P2bodydist x <= 100
trigger2 = random < 200
trigger3 = var(59)
trigger3 = statetype = C && P2statetype = A
trigger3 = P2bodydist x <= 100
statetype = S
physics = S

[State 120, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 130 + (statetype = C) + (statetype = A)*2

[State 120, Stop Guarding]
type = ChangeState
trigger1 = !var(59)
trigger1 = command != "holdback"
trigger2 = var(59)
trigger2 = time > 10
trigger2 = random < 100
trigger3 = !inguarddist
value = 140

;---------------------------------------------------------------------------
; STAND GUARD (guarding)
[Statedef 130]
type    = S
physics = S

[State 130, 1]
type = ChangeAnim
trigger1 = Anim != 130
value = 130

[State 130, Hi to Lo]
type = ChangeState
trigger1 = !var(59)
trigger1 = command = "holddown"
trigger2 = var(59)
trigger2 = P2statetype = C
trigger3 = var(59)
trigger3 = statetype = S
trigger3 = P2bodydist x > 100
value = 131

[State 130, Stop Guarding]
type = ChangeState
trigger1 = !var(59)
trigger1 = command != "holdback"
trigger2 = var(59)
trigger2 = time > 10
trigger2 = random < 100
trigger3 = !inguarddist
value = 140

;---------------------------------------------------------------------------
; CROUCH GUARD (guarding)
[Statedef 131]
type    = C
physics = C

[State 131, 1]
type = ChangeAnim
trigger1 = Anim != 131
value = 131

[State 131, Lo to Hi]
type = ChangeState
trigger1 = !var(59)
trigger1 = command != "holddown"
trigger2 = var(59)
trigger2 = P2statetype = S
trigger2 = P2bodydist x <= 100
trigger2 = random < 200
trigger3 = var(59)
trigger3 = P2statetype = A
trigger3 = P2bodydist x <= 100
value = 130

[State 131, Stop Guarding]
type = ChangeState
trigger1 = !var(59)
trigger1 = command != "holdback"
trigger2 = var(59)
trigger2 = time > 10
trigger2 = random < 100
trigger3 = !inguarddist
value = 140

;---------------------------------------------------------------------------
; AIR GUARD (guarding)
[Statedef 132]
type    = A
physics = N

[State 132, 1]
type = ChangeAnim
trigger1 = Anim != 132
value = 132

[State 132, 2]
type = VelAdd
trigger1 = 1
y = Const(movement.yaccel)

[State 132, 3]
type = VarSet
trigger1 = 1
sysvar(0) = (pos y >= 0) && (vel y > 0)

[State 132, 4]
type = VelSet
trigger1 = sysvar(0)
y = 0

[State 132, 5]
type = PosSet
trigger1 = sysvar(0)
y = 0

[State 132, 6]
type = ChangeState
triggerall = sysvar(0)
triggerall = inguarddist
trigger1 = !var(59)
trigger1 = command = "holdback"
trigger2 = var(59)
value = 130

[State 132, 7]
type = ChangeState
trigger1 = sysvar(0)
value = 52

[State 132, Stop Guarding]
type = ChangeState
trigger1 = !var(59)
trigger1 = command != "holdback"
trigger2 = var(59)
trigger2 = time > 10
trigger2 = random < 100
trigger3 = !inguarddist
value = 140

;---------------------------------------------------------------------------
; GUARD (end)
[Statedef 140]
type = U    ;Leave state type unchanged
physics = U ;Leave physics unchanged
ctrl = 1

[State 140, 1]
type = ChangeAnim
trigger1 = Time = 0
value = 140 + (statetype = C) + (statetype = A)*2

[State 140, 2]
type = StateTypeSet
trigger1 = Time = 0 && statetype = S
physics = S

[State 140, 3]
type = StateTypeSet
trigger1 = Time = 0 && statetype = C
physics = C

[State 140, 4]
type = StateTypeSet
trigger1 = Time = 0 && statetype = A
physics = A

[State 140, Hi to Lo]
type = StateTypeSet
trigger1 = !var(59)
trigger1 = statetype = S && command = "holddown"
trigger2 = var(59)
trigger2 = statetype = S && P2statetype = C
trigger3 = var(59)
trigger3 = statetype = S
trigger3 = P2bodydist x > 100
statetype = C
physics = C

[State 140, Lo to Hi]
type = StateTypeSet
trigger1 = !var(59)
trigger1 = statetype = C && command != "holddown"
trigger2 = var(59)
trigger2 = statetype = C && P2statetype = S
trigger2 = P2bodydist x <= 100
trigger2 = random < 200
trigger3 = var(59)
trigger3 = statetype = C && P2statetype = A
trigger3 = P2bodydist x <= 100
statetype = S
physics = S

;---------------------------------------------------------------------------
; SGUARDHIT (shaking)
[Statedef 150]
type    = S
movetype= H
physics = N
velset = 0,0

[State 150, 1]
type = ChangeAnim
trigger1 = 1
value = 150

[State 150, 2]
type = ChangeState
trigger1 = !var(59)
trigger1 = HitShakeOver
value = 151 + 2*(command = "holddown")

[State 150, 2]
type = ChangeState
trigger1 = var(59)
trigger1 = HitShakeOver
value = 151 + 2*(P2statetype = C || P2bodydist x > 100)

[State 150, Hi to Lo]
type = StateTypeSet
trigger1 = !var(59)
trigger1 = statetype = S && command = "holddown"
trigger2 = var(59)
trigger2 = statetype = S && P2statetype = C
trigger3 = var(59)
trigger3 = statetype = S
trigger3 = P2bodydist x > 100
statetype = C
physics = C

[State 150, Lo to Hi]
type = StateTypeSet
trigger1 = !var(59)
trigger1 = statetype = C && command != "holddown"
trigger2 = var(59)
trigger2 = statetype = C && P2statetype = S
trigger2 = P2bodydist x <= 100
trigger2 = random < 200
trigger3 = var(59)
trigger3 = statetype = C && P2statetype = A
trigger3 = P2bodydist x <= 100
statetype = S
physics = S

[State 150, 3]
type = ForceFeedback
trigger1 = time = 0
waveform = square
time = 3

;---------------------------------------------------------------------------
; SGUARDHIT2 (knocked back)
[Statedef 151]
type    = S
movetype= H
physics = S
anim = 150

[State 151, 1]
type = HitVelSet
trigger1 = Time = 0
x = 1

[State 151, 2]
type = VelSet
trigger1 = Time = GetHitVar(slidetime)
trigger2 = HitOver
x = 0

[State 151, 3]
type = CtrlSet
trigger1 = Time = GetHitVar(ctrltime)
value = 1

[State 151, Hi to Lo]
type = StateTypeSet
trigger1 = !var(59)
trigger1 = statetype = S && command = "holddown"
trigger2 = var(59)
trigger2 = statetype = S && P2statetype = C
trigger3 = var(59)
trigger3 = statetype = S
trigger3 = P2bodydist x > 100
statetype = C
physics = C

[State 151, Lo to Hi]
type = StateTypeSet
trigger1 = !var(59)
trigger1 = statetype = C && command != "holddown"
trigger2 = var(59)
trigger2 = statetype = C && P2statetype = S
trigger2 = P2bodydist x <= 100
trigger2 = random < 200
trigger3 = var(59)
trigger3 = statetype = C && P2statetype = A
trigger3 = P2bodydist x <= 100
statetype = S
physics = S

[State 151, 4]
type = ChangeState
trigger1 = HitOver
value = 130
ctrl = 1

;---------------------------------------------------------------------------
; CGUARDHIT (shaking)
[Statedef 152]
type    = C
movetype= H
physics = N
velset = 0,0

[State 152, 1]
type = ChangeAnim
trigger1 = 1
value = 151

[State 152, 3]
type = ChangeState
trigger1 = !var(59)
trigger1 = HitShakeOver
value = 151 + 2*(command = "holddown")

[State 152, 3]
type = ChangeState
trigger1 = var(59)
trigger1 = HitShakeOver
value = 153;1 + 2*(P2statetype = C || P2bodydist x > 100)

[State 152, Hi to Lo]
type = StateTypeSet
trigger1 = !var(59)
trigger1 = statetype = S && command = "holddown"
trigger2 = var(59)
trigger2 = statetype = S && P2statetype = C
trigger3 = var(59)
trigger3 = statetype = S
trigger3 = P2bodydist x > 100
statetype = C
physics = C

[State 152, Lo to Hi]
type = StateTypeSet
trigger1 = !var(59)
trigger1 = statetype = C && command != "holddown"
trigger2 = var(59)
trigger2 = statetype = C && P2statetype = S
trigger2 = P2bodydist x <= 100
trigger2 = random < 200
trigger3 = var(59)
trigger3 = statetype = C && P2statetype = A
trigger3 = P2bodydist x <= 100
statetype = S
physics = S

[State 152, 4]
type = ForceFeedback
trigger1 = time = 0
waveform = square
time = 4

;---------------------------------------------------------------------------
; CGUARDHIT2 (knocked back)
[Statedef 153]
type    = C
movetype= H
physics = C
anim = 151

[State 153, 1]
type = HitVelSet
trigger1 = Time = 0
x = 1

[State 153, 2]
type = VelSet
trigger1 = Time = GetHitVar(slidetime)
trigger2 = HitOver
x = 0

[State 153, 3]
type = CtrlSet
trigger1 = Time = GetHitVar(ctrltime)
value = 1

[State 153, Hi to Lo]
type = StateTypeSet
trigger1 = !var(59)
trigger1 = statetype = S && command = "holddown"
trigger2 = var(59)
trigger2 = statetype = S && P2statetype = C
trigger3 = var(59)
trigger3 = statetype = S
trigger3 = P2bodydist x > 100
statetype = C
physics = C

[State 153, Lo to Hi]
type = StateTypeSet
trigger1 = !var(59)
trigger1 = statetype = C && command != "holddown"
trigger2 = var(59)
trigger2 = statetype = C && P2statetype = S
trigger2 = P2bodydist x <= 100
trigger2 = random < 200
trigger3 = var(59)
trigger3 = statetype = C && P2statetype = A
trigger3 = P2bodydist x <= 100
statetype = S
physics = S

[State 153, 4]
type = ChangeState
trigger1 = HitOver
value = 131
ctrl = 1

;---------------------------------------------------------------------------
; AGUARDHIT (shaking)
[Statedef 154]
type    = A
movetype= H
physics = N
velset = 0,0

[State 154, 1]
type = ChangeAnim
trigger1 = 1
value = 152

[State 154, 2]
type = ChangeState
trigger1 = HitShakeOver
value = 155 ;AGUARDHIT2

[State 154, 3]
type = ForceFeedback
trigger1 = time = 0
waveform = square
time = 4

;---------------------------------------------------------------------------
; AGUARDHIT2 (knocked away)
[Statedef 155]
type    = A
movetype= H
physics = N
anim = 152

[State 155, 1]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 155, 2]
type = VelAdd
trigger1 = 1
y = Const(movement.yaccel)

[State 155, 3]
type = CtrlSet
trigger1 = Time = GetHitVar(ctrltime)
value = 1

[State 155, 4]
type = VarSet
trigger1 = 1
sysvar(0) = (pos y >= 0) && (vel y > 0)

[State 155, 5]
type = VelSet
trigger1 = sysvar(0)
y = 0

[State 155, 6]
type = PosSet
trigger1 = sysvar(0)
y = 0

[State 155, 6]
type = ChangeState
triggerall = sysvar(0)
triggerall = inguarddist
trigger1 = !var(59)
trigger1 = command = "holdback"
trigger2 = var(59)
value = 130

[State 155, 7]
type = ChangeState
trigger1 = sysvar(0)
value = 52

;---------------------------------------------------------------------------
; タイムオーバー負け
[Statedef 170]
type = S
ctrl = 0
anim = 170
velset = 0,0

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

;---------------------------------------------------------------------------
; タイムオーバー引き分け
[Statedef 175]
type = S
ctrl = 0
anim = 170
velset = 0,0

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

;---------------------------------------------------------------------------
;勝利ポーズ分岐
[Statedef 180]
type = S
ctrl = 0
velset = 0,0

[State 180,0]
type = Changestate
trigger1 = Time = 0
trigger1 = Prevstateno = 3311 || Prevstateno = 3321
value = prevstateno+1

[State 180, 1]
type = ChangeState
triggerall = var(12)
trigger1 = time = 0
value = 183+(random%4)

[State 180, 1]
type = ChangeState
triggerall = !var(12)
trigger1 = time = 0
value = 181+(random%2)

;---------------------------------------------------------------------------
;勝ちポーズ1（覇王丸）
[Statedef 181]
type = S
physics = S
ctrl = 0
velset = 0,0
anim = 180+(facing=1&&Pos X > 0)+(facing=-1&&Pos X < 0)

[State 181, 2]
type = PlaySnd
trigger1 = AnimElem = 1
value = 180, 0
channel = 0

[State 181, 2]
type = PlaySnd
trigger1 = AnimElem = 20
value = 180, 1
channel = 0

[State 181, 2]
type = PlaySnd
trigger1 = AnimElem = 3
value = 3, 10

[State 181, 2]
type = PlaySnd
trigger1 = AnimElem = 9
value = 180, 2

[State 181, 2]
type = PlaySnd
trigger1 = AnimElem = 15
value = 180, 3

[State 181, 2]
type = PlaySnd
trigger1 = AnimElem = 17
value = 180, 4

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

;---------------------------------------------------------------------------
;勝ちポーズ2（覇王丸）
[Statedef 182]
type = S
physics = S
ctrl = 0
velset = 0,0
anim = 182

[State 181, 2]
type = PlaySnd
trigger1 = AnimElem = 1
value = 180, 1
channel = 0

[State 181, 2]
type = PlaySnd
trigger1 = AnimElem = 1
trigger2 = AnimElem = 12
value = 3, 12
channel = 1

[State 181, 2]
type = PlaySnd
trigger1 = AnimElem = 25
value = 180, 4

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

;---------------------------------------------------------------------------
;勝ちポーズ1（羅刹丸）
[Statedef 183]
type = S
physics = S
ctrl = 0
velset = 0,0
anim = 183

[State 181, 2]
type = PlaySnd
trigger1 = AnimElem = 8
value = 195, 10
channel = 0

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

;---------------------------------------------------------------------------
;勝ちポーズ2（羅刹丸）
[Statedef 184]
type = S
physics = S
ctrl = 0
velset = 0,0
anim = 184

[State 181, 2]
type = PlaySnd
trigger1 = AnimElem = 1
value = 182, 10
channel = 0

[State 181, 2]
type = PlaySnd
trigger1 = AnimElem = 16
value = 182, 11
channel = 0

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

;---------------------------------------------------------------------------
;勝ちポーズ3（羅刹丸）
[Statedef 185]
type = S
physics = S
ctrl = 0
velset = 0,0
anim = 185

[State 181, 2]
type = PlaySnd
trigger1 = AnimElem = 1
value = 185, 10
channel = 0

[State 181, 2]
type = PlaySnd
trigger1 = AnimElem = 6
value = 185, 11
channel = 0

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

;---------------------------------------------------------------------------
;勝ちポーズ4（羅刹丸）
[Statedef 186]
type = S
physics = S
ctrl = 0
velset = 0,0
anim = 186

[State 181, 2]
type = PlaySnd
trigger1 = AnimElem = 1
value = 183, 10+(random%4)
channel = 0

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

;---------------------------------------------------------------------------
;イントロ（分岐）
[Statedef 190]
type = S
ctrl = 0
anim = 0
velset = 0,0

[State -2, 3]
type = ChangeState
trigger1 = var(12)
value = 194

[State -2, 3]
type = ChangeState
trigger1 = var(33)
value = 193

[State 190, 1]
type = ChangeState
trigger1 = Time = 0
value = 191+(random%2)

;---------------------------------------------------------------------------
;イントロ（通常1）
[Statedef 191]
type = S
ctrl = 0
anim = 190
velset = 0,0

[State 181, 2]
type = PlaySnd
trigger1 = AnimElem = 6
value = 190, 0
channel = 0

[State 181, 2]
type = PlaySnd
trigger1 = AnimElem = 14
value = 190, 1
channel = 0

[State 190, 2]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 190, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------
;イントロ（通常2）
[Statedef 192]
type = S
physics = N
ctrl = 0
anim = 191
velset = 0,0

[State 190, 2]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 1000, Voice]
type = PlaySnd
trigger1 = AnimElem = 2
value = 191, 0
channel = 0

[State 1000, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------
;イントロ（対鬼、武器持ち女性）
[Statedef 193]
type = S
ctrl = 0
anim = 192
velset = 0,0

[State 190, 2]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 1000, Voice]
type = PlaySnd
trigger1 = AnimElem = 2
value = 192, var(33)=2
channel = 0

[State 1000, Voice]
type = PlaySnd
trigger1 = AnimElem = 36
value = 192, 2

[State 190, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------
;イントロ（羅刹丸）
[Statedef 194]
type = S
ctrl = 0
anim = 193+(random%2)
velset = 0,0

[State 190, 2]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 1000, Voice]
type = PlaySnd
trigger1 = time = 60
value = 193, 10
channel = 0

[State 190, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------
;挑発
[Statedef 195]
type = S
ctrl = 0
anim = ifelse(var(12),196,195)
velset = 0,0
movetype = I
physics = S
poweradd = -500

 [State 195]
type = LifeAdd
trigger1 = time = 1
value = 150

[State 220, Position]
type = PosSet
trigger1 = Time = 0
y = 0

[State 181, 2]
type = PlaySnd
triggerall = !var(12)
trigger1 = AnimElem = 1
value = 195, 0
channel = 0

[State 181, 2]
type = PlaySnd
triggerall = var(12)
trigger1 = AnimElem = 8
value = 195, 10
channel = 0

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

;---------------------------------------------------------------------------
;立ち弱パンチ
[Statedef 200]
type    = S
movetype = A
physics = S
juggle = 8
velset = 0,0
ctrl = 0
anim = 200
poweradd = 0

[State 220, Position]
type = PosSet
trigger1 = AnimElem = 1
y = 0

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

[State 200, Voice]
type = PlaySnd
trigger1 = AnimElem = 1 && Random <= 500
value = 0, (random%2)+var(12)
channel = 0

[State 0]
type = changeanim
triggerall = var(2)
trigger1 = AnimElemTime(5) = 0
value = anim
elem = 4
persistent = 1

[State 400, Helper]
type = Helper
trigger1 = AnimElem = 2
stateno = 7000
ownpal = 1

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 5
movetype = I

[State 200, 1]
type = Hitdef
trigger1 = AnimElem = 2
attr = S, NA
hitflag = MAF
guardflag = M
animtype = Light
air.animtype = back
fall.animtype = back
priority = 3,Hit
damage = ceil(ifelse((28*fvar(10))<7,7,(28*fvar(10))))
pausetime = 0,ceil(9*(2-(var(16)>0))/2)
sparkno = S8700+(random%64)
guard.sparkno = S8100
sparkxy = -20, -67
hitsound = S2, 10
guardsound = S1, 0
ground.type = High
air.type = High
ground.slidetime = 10+(var(41)*2)
ground.hittime = 10+(var(41)*2)
air.hittime = 10+(var(41)*2)
guard.ctrltime = 11
ground.velocity = -6*(2-(var(16)>0))/2
guard.velocity = -5*(2-(var(16)>0))/2
air.velocity = -6.4, -4.8
airguard.velocity = -4,-1
ground.cornerpush.veloff = .00000001 
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = 70*(1000+var(24))/1000*!(var(15)||var(16)),35*(1000+var(24))/1000*!(var(15)||var(16))
givepower = 35, 35
persistent = 0
air.fall = 1
fall.recover = !var(16)
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
yaccel = .5
nochainID = var(40)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(38) = -20

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(39) = -67

[State 200, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;遠距離立ち中パンチ
[Statedef 210]
type    = S
movetype = A                
physics = S                    
juggle = 8
velset = 0,0
ctrl = 0
anim = 210
poweradd = 17*(1000+var(24))/1000*!(var(15)||var(16))

[State 220, Position]
type = PosSet
trigger1 = AnimElem = 1
y = 0

[State 210, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = 3, 11
channel = 1

[State 210, Voice]
type = PlaySnd
trigger1 = AnimElem = 1 && Random <= 500
value = 0, (random%2)+var(12)+1
channel = 0

[State 0]
type = changeanim
triggerall = var(2)
trigger1 = AnimElemTime(6) = 0
value = anim
elem = 5
persistent = 1

[State 210, Helper]
type = Helper
trigger1 = AnimElem = 2
stateno = 7000
ownpal = 1

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 6
movetype = I

[State 210, 1]
type = Hitdef
trigger1 = AnimElem = 2
attr = S, NA
hitflag = MAF
guardflag = M
animtype = Medium
air.animtype = back
fall.animtype = back
priority = 4,Hit
damage = ceil(ifelse((70*fvar(10))<7,7,(70*fvar(10))))
pausetime = 0,ceil(11*(2-(var(16)>0))/2)
sparkno = S8700+(random%64)
guard.sparkno = S8100
sparkxy = -20, -63
hitsound = S2, 11
guardsound = S1, 0
ground.type = Low
air.type = Low
ground.slidetime = 14+(var(41)*3)
ground.hittime = 14+(var(41)*3)
air.hittime = 14+(var(41)*3)
guard.ctrltime = 14
ground.velocity = -8*(2-(var(16)>0))/2
guard.velocity = -6.8*(2-(var(16)>0))/2
air.velocity = -6.4, -4.8
airguard.velocity = -5.33,-1
ground.cornerpush.veloff = .00000001
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = ifelse(var(17),70,143)*(1000+var(24))/1000*!(var(15)||var(16)),35*(1000+var(24))/1000*!(var(15)||var(16))
givepower = 35, 35
persistent = 0
air.fall = 1
fall.recover = !var(16)
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
yaccel = .5
nochainID = var(40)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(38) = -20

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(39) = -63

[State 210, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;近距離立ち中パンチ
[Statedef 211]
type    = S
movetype = A
physics = S
juggle = 8
velset = 0,0
ctrl = 0
anim = 211
poweradd = 17*(1000+var(24))/1000*!(var(15)||var(16))

[State 220, Position]
type = PosSet
trigger1 = AnimElem = 1
y = 0

[State 210, 1]
type = PlaySnd
trigger1 = AnimElem = 2
value = 3, 11
channel = 1

[State 210, Voice]
type = PlaySnd
triggerall = prevstateno != 830
trigger1 = AnimElem = 2 && Random <= 500
value = 0, (random%2)+var(12)+1
channel = 0

[State 0]
type = changeanim
triggerall = var(2)
trigger1 = AnimElemTime(8) = 0
value = anim
elem = 7
persistent = 1

[State 210, Helper]
type = Helper
trigger1 = AnimElem = 2
stateno = 7000
ownpal = 1

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 8
movetype = I

[State 210, 1]
type = Hitdef
trigger1 = AnimElem = 3
attr = S, NA
hitflag = MAF
guardflag = M
animtype = Medium
air.animtype = back
fall.animtype = back
priority = 4,Hit
damage = ceil(ifelse((77*fvar(10))<7,7,(77*fvar(10))))
pausetime = 0,ceil(11*(2-(var(16)>0))/2)
sparkno = S8700+(random%64)
guard.sparkno = S8100
sparkxy = -10, -52
hitsound = S2, 11
guardsound = S1, 0
ground.type = Low
air.type = Low
ground.slidetime = 14+(var(41)*3)
ground.hittime = 14+(var(41)*3)
air.hittime = 14+(var(41)*3)
guard.ctrltime = 14
ground.velocity = -8*(2-(var(16)>0))/2
guard.velocity = -6.8*(2-(var(16)>0))/2
air.velocity = -4, -5.25
airguard.velocity = -5.33,-1
ground.cornerpush.veloff = .00000001
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = ifelse(var(17),70,143)*(1000+var(24))/1000*!(var(15)||var(16)),35*(1000+var(24))/1000*!(var(15)||var(16))
givepower = 35, 35
persistent = 0
air.fall = 1
fall.recover = !var(16)
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
yaccel = .5
nochainID = var(40)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(38) = -10

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(39) = -84

[State 210, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;遠距離立ち強パンチ
[Statedef 220]
type    = S
movetype = A
physics = S
juggle = 8
ctrl = 0
velset = 0,0
anim = 220
poweradd = 17*(1000+var(24))/1000*!(var(15)||var(16))

[State 220, Position]
type = PosSet
trigger1 = AnimElem = 1
y = 0

[State 3001, Width]
type = Width
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3
trigger3 = AnimElem = 5
player = 9,0

[State 3001, Width]
type = Width
trigger1 = animelem = 10
player = 0,3

[State 3001, Width]
type = Width
trigger1 = animelem = 11
player = 0,9

[State 3001, Width]
type = Width
trigger1 = animelem = 13
player = 0,15

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3
trigger3 = AnimElem = 5
x = 24

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 4
x = 12

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 10
x = -18

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 11
x = -24

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 12
x = -12

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 13
x = -30

[State 220, Effect]
type = PlaySnd
trigger1 = AnimElem = 3
value = 3, 12
channel = 1

[State 220, Voice]
type = PlaySnd
trigger1 = AnimElem = 4 && Random <= 500
value = 0, (random%2)+var(12)+1
channel = 0

[State 0]
type = changeanim
triggerall = var(2)
trigger1 = AnimElemTime(8) = 0
value = anim
elem = 7
persistent = 1

[State 220, Helper]
type = Helper
trigger1 = AnimElem = 5
stateno = 7000
ownpal = 1

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 8
movetype = I

[State 220, 1]
type = Hitdef
trigger1 = AnimElem = 5
attr = S, NA
hitflag = MAF
guardflag = M
animtype = Heavy
air.animtype = back
fall.animtype = back
priority = 5,Hit
damage = 90
pausetime = 0,ceil(17*(2-(var(16)>0))/2)
sparkno = S8700+(random%64)
guard.sparkno = S8100
sparkxy = -20, -55
hitsound = S2, 12
guardsound = S1, 0
ground.type = Low
air.type = Low
ground.slidetime = 29+(var(41)*6)
ground.hittime = 29+(var(41)*6)
air.hittime = 29+(var(41)*6)
guard.ctrltime = 17
ground.velocity = -10*(2-(var(16)>0))/2
guard.velocity = -8.5*(2-(var(16)>0))/2
air.velocity = -8, -5
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = .00000001
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = ifelse(var(17),70,214)*(1000+var(24))/1000*!(var(15)||var(16)),35*(1000+var(24))/1000*!(var(15)||var(16))
givepower = 35, 35                
persistent = 0
air.fall = 1
fall.recover = !var(16)
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
yaccel = .5
nochainID = var(40)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(38) = -20

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(39) = -55

[State 220, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;近距離立ち強パンチ
[Statedef 221]
type    = S
movetype = A
physics = S
juggle = 8
ctrl = 0
velset = 0,0
anim = 221
poweradd = 17*(1000+var(24))/1000*!(var(15)||var(16))

[State 220, Position]
type = PosSet
trigger1 = AnimElem = 1
y = 0

[State 3001, VarSet]
type = VarSet
trigger1 = time = 0
var(6) = 0

[State 220, Effect]
type = PlaySnd
trigger1 = AnimElem = 3
value = 3, 12
channel = 1

[State 220, Voice]
type = PlaySnd
trigger1 = AnimElem = 3 && Random <= 500
value = 0, (random%2)+var(12)+1
channel = 0

[State 0]
type = changeanim
triggerall = var(2)
trigger1 = AnimElemTime(9) = 0
value = anim
elem = 8
persistent = 1

[State 220, Helper]
type = Helper
trigger1 = AnimElem = 3
stateno = 7000
ownpal = 1

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 9
movetype = I

[State 220, 1]
type = Hitdef
trigger1 = AnimElem = 4
attr = S, NA
hitflag = MAF
guardflag = M
animtype = Heavy
air.animtype = back
fall.animtype = back
priority = 5,Hit
damage = ceil(ifelse((ifelse(var(16),91,126)*fvar(10))<7,7,(ifelse(var(16),91,126)*fvar(10))))
pausetime = 0,ceil(15*(2-(var(16)>0))/2)
sparkno = S8700+(random%64)
guard.sparkno = S8100
sparkxy = -10, -51
hitsound = S2, 12
guardsound = S1, 0
ground.type = Low
air.type = Low
ground.slidetime = 28+(var(41)*4)
ground.hittime = 28+(var(41)*4)
air.hittime = 28+(var(41)*4)
guard.ctrltime = 17
ground.velocity = -10*(2-(var(16)>0))/2
guard.velocity = -8.5*(2-(var(16)>0))/2
air.velocity = -4, -5.25
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = .00000001
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = ifelse(var(17),70,214)*(1000+var(24))/1000*!(var(15)||var(16)),35*(1000+var(24))/1000*!(var(15)||var(16))
givepower = 35, 35                
persistent = 0
air.fall = 1
fall.recover = !var(16)
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
yaccel = .5
nochainID = var(40)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(38) = -10

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(39) = -51

[State 3001, VarSet]
type = VarSet
triggerall = !var(59)
trigger1 = !var(6)
trigger1 = command = "z"
trigger1 = animelemtime(4) > 0
trigger1 = var(36) = [1,2]
var(6) = 1
ignorehitpause = 1

[State 3001, VarSet]
type = VarSet
triggerall = var(59)
trigger1 = !var(6)
trigger1 = animelemtime(4) > 0
trigger1 = var(36) = [1,2]
trigger1 = enemynear,statetype != A
var(6) = 1
ignorehitpause = 1

[State 220, 3]
type = ChangeState
trigger1 = var(12)
trigger1 = animelemtime(9) > 0
trigger1 = animelemtime(10) < 0
trigger1 = var(6) = 1
value = 300

[State 220, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;立ち弱キック
[Statedef 230]
type    = S
movetype = A
physics = S
juggle = 8
velset = 0,0
ctrl = 0
anim = 230
poweradd = 0

[State 220, Position]
type = PosSet
trigger1 = AnimElem = 1
y = 0

[State 230, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = 3, 3
channel = 1

[State 230, Voice]
type = PlaySnd
trigger1 = AnimElem = 1 && Random <= 500
value = 0, (random%2)+var(12)
channel = 0

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 3
movetype = I

[State 230, 1]
type = Hitdef
trigger1 = AnimElem = 2
attr = S, NA
hitflag = MAF
guardflag = M
animtype = Light
air.animtype = back
fall.animtype = back
priority = 3,Hit
damage = ceil(ifelse((21*fvar(10))<7,7,(21*fvar(10))))
pausetime = ceil(9*(2-(var(16)>0))/2),ceil(9*(2-(var(16)>0))/2)
sparkno = S8200+(random%8)
guard.sparkno = S8100
sparkxy = -10, -10
hitsound = S2, 3
guardsound = S1, 0
ground.type = Low
air.type = High
ground.slidetime = 10+(var(41)*2)
ground.hittime = 10+(var(41)*2)
air.hittime = 10+(var(41)*2)
guard.ctrltime = 11
ground.velocity = -6*(2-(var(16)>0))/2
guard.velocity = -5*(2-(var(16)>0))/2
air.velocity = -8, -5
airguard.velocity = -4,-1
ground.cornerpush.veloff = -8.4*(2-(var(16)>0))/2
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = 70*(1000+var(24))/1000*!(var(15)||var(16)),35*(1000+var(24))/1000*!(var(15)||var(16))
givepower = 35, 35                                  
persistent = 0
air.fall = 1
fall.recover = !var(16)
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
yaccel = .5
nochainID = var(40)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(38) = -10

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(39) = -10

[State 230, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;遠距離立ち中キック
[Statedef 240]
type    = S
movetype = A
physics = S
juggle = 8
velset = 0,0
ctrl = 0
anim = 240
poweradd = 17*(1000+var(24))/1000*!(var(15)||var(16))

[State 220, Position]
type = PosSet
trigger1 = AnimElem = 1
y = 0

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 1
trigger2 = AnimElem = 3
x = 8

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 2
x = 16

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 6
x = -8

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 7
trigger2 = AnimElem = 8
x = -12

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

[State 240, Voice]
type = PlaySnd
trigger1 = AnimElem = 2 && Random <= 500
value = 0, (random%2)+var(12)+1
channel = 0

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 5
movetype = I

[State 240, 1]
type = Hitdef
trigger1 = AnimElem = 3
attr = S, NA
hitflag = MAF
guardflag = M
animtype = Medium
air.animtype = back
fall.animtype = back
priority = 4,Hit
damage = ceil(ifelse((63*fvar(10))<7,7,(63*fvar(10))))
pausetime = ceil(11*(2-(var(16)>0))/2),ceil(11*(2-(var(16)>0))/2)
sparkno = S8200+(random%8)
guard.sparkno = S8100
sparkxy = -20, -77
hitsound = S2, 4
guardsound = S1, 0
ground.type = High
air.type = High
ground.slidetime = 14+(var(41)*3)
ground.hittime = 14+(var(41)*3)
air.hittime = 14+(var(41)*3)
guard.ctrltime = 14
ground.velocity = -8*(2-(var(16)>0))/2
guard.velocity = -6.8*(2-(var(16)>0))/2
air.velocity = -6.4, -4.8
airguard.velocity = -5.33,-1
ground.cornerpush.veloff = -11.2*(2-(var(16)>0))/2
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = ifelse(var(17),70,143)*(1000+var(24))/1000*!(var(15)||var(16)),35*(1000+var(24))/1000*!(var(15)||var(16))
givepower = 35, 35
persistent = 0
air.fall = 1
fall.recover = !var(16)
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
yaccel = .5
nochainID = var(40)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(38) = -20

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(39) = -77

[State 240, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;近距離立ち中キック
[Statedef 241]
type    = S
movetype = A
physics = S
juggle = 8
velset = 0,0
ctrl = 0
anim = 241
poweradd = 17*(1000+var(24))/1000*!(var(15)||var(16))

[State 220, Position]
type = PosSet
trigger1 = AnimElem = 1
y = 0

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 1
x = 8

[State 220, Position]
type = PosAdd
trigger1 = AnimTime = 0
x = -8

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

[State 240, Voice]
type = PlaySnd
trigger1 = AnimElem = 1 && Random <= 500
value = 0, (random%2)+var(12)+1
channel = 0

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 3
movetype = I

[State 240, 1]
type = Hitdef
trigger1 = AnimElem = 2
attr = S, NA
hitflag = MAF
guardflag = M
animtype = Medium
air.animtype = back
fall.animtype = back
priority = 4,Hit
damage = ceil(ifelse((56*fvar(10))<7,7,(56*fvar(10))))
pausetime = ceil(11*(2-(var(16)>0))/2),ceil(11*(2-(var(16)>0))/2)
sparkno = S8200+(random%8)
guard.sparkno = S8100
sparkxy = -10, -18
hitsound = S2, 4
guardsound = S1, 0
ground.type = Low
air.type = Low
ground.slidetime = 14+(var(41)*3)
ground.hittime = 14+(var(41)*3)
air.hittime = 14+(var(41)*3)
guard.ctrltime = 14
ground.velocity = -8*(2-(var(16)>0))/2
guard.velocity = -6.8*(2-(var(16)>0))/2
air.velocity = -6.4, -4.8
airguard.velocity = -5.33,-1
ground.cornerpush.veloff = -11.2*(2-(var(16)>0))/2
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = ifelse(var(17),70,143)*(1000+var(24))/1000*!(var(15)||var(16)),35*(1000+var(24))/1000*!(var(15)||var(16))
givepower = 35, 35
persistent = 0
air.fall = 1
fall.recover = !var(16)
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
yaccel = .5
nochainID = var(40)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(38) = -10

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(39) = -18

[State 240, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;遠距離立ち強キック
[Statedef 250]
type    = S
movetype = A
physics = S
juggle = 8
ctrl = 0
velset = 0,0
anim = 250
poweradd = 17*(1000+var(24))/1000*!(var(15)||var(16))

[State 220, Position]
type = PosSet
trigger1 = AnimElem = 1
y = 0

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3
x = 12

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 6
x = 8

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 7
x = 16

[State 250, Effect]
type = PlaySnd
trigger1 = AnimElem = 3
value = 3, 5
channel = 1

[State 250, Voice]
type = PlaySnd
triggerall = prevstateno != 830
trigger1 = AnimElem = 3 && Random <= 500
value = 0, (random%2)+var(12)+1
channel = 0

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 5
movetype = I

[State 250, 1]
type = Hitdef
trigger1 = AnimElem = 4
attr = S, NA
hitflag = MAF
guardflag = M
animtype = Heavy
air.animtype = back
fall.animtype = back
priority = 5,Hit
damage = ceil(ifelse((84*fvar(10))<7,7,(84*fvar(10))))
pausetime = ceil(13*(2-(var(16)>0))/2),ceil(13*(2-(var(16)>0))/2)
sparkno = S8200+(random%8)
guard.sparkno = S8100
sparkxy = -20, -55
hitsound = S2, 5
guardsound = S1, 0
ground.type = Low
air.type = High
ground.slidetime = 17+(var(41)*4)
ground.hittime = 17+(var(41)*4)
air.hittime = 17+(var(41)*4)
guard.ctrltime = 17
ground.velocity = -10*(2-(var(16)>0))/2
guard.velocity = -8.5*(2-(var(16)>0))/2
air.velocity = -4, -5.25
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = -14*(2-(var(16)>0))/2
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = ifelse(var(17),70,214)*(1000+var(24))/1000*!(var(15)||var(16)),35*(1000+var(24))/1000*!(var(15)||var(16))
givepower = 35, 35              
persistent = 0
air.fall = 1
fall.recover = !var(16)
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
yaccel = .5
nochainID = var(40)

[State 250, 1]
type = Hitdef
triggerall = prevstateno = 830
trigger1 = AnimElem = 4
attr = S, NA
hitflag = MAF
guardflag = M
animtype = Heavy
air.animtype = back
fall.animtype = back
priority = 5,Hit
damage = ceil(ifelse((84*fvar(10))<7,7,(84*fvar(10))))
pausetime = ceil(13*(2-(var(16)>0))/2),ceil(13*(2-(var(16)>0))/2)
sparkno = S8200+(random%8)
guard.sparkno = S8100
sparkxy = -20, -55
hitsound = S2, 5
guardsound = S1, 0
ground.type = Low
air.type = High
ground.slidetime = 17+(var(41)*4)
ground.hittime = 17+(var(41)*4)
air.hittime = 17+(var(41)*4)
guard.ctrltime = 17
ground.velocity = -8,-5
guard.velocity = -8.5*(2-(var(16)>0))/2
air.velocity = -8,-5
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -11.9*(2-(var(16)>0))/2
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = ifelse(var(17),70,214)*(1000+var(24))/1000*!(var(15)||var(16)),35*(1000+var(24))/1000*!(var(15)||var(16))
givepower = 35, 35              
persistent = 0
fall = 1
air.fall = 1
fall.recover = !var(16)
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
yaccel = .5
nochainID = var(40)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(38) = -20

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(39) = -55

[State 250, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;近距離立ち強キック
[Statedef 251]
type    = S
movetype = A
physics = S
juggle = 8
ctrl = 0
velset = 0,0
anim = 251
poweradd = 17*(1000+var(24))/1000*!(var(15)||var(16))

[State 220, Position]
type = PosSet
trigger1 = AnimElem = 1
y = 0

[State 250, Effect]
type = PlaySnd
trigger1 = AnimElem = 2
value = 3, 5
channel = 1

[State 250, Voice]
type = PlaySnd
trigger1 = AnimElem = 2 && Random <= 500
value = 0, (random%2)+var(12)+1
channel = 0

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 5
movetype = I

[State 250, 1]
type = Hitdef
trigger1 = AnimElem = 3
attr = S, NA
hitflag = MAF
guardflag = M
animtype = Heavy
air.animtype = back
fall.animtype = back
priority = 5,Hit
damage = ceil(ifelse((91*fvar(10))<7,7,(91*fvar(10))))
pausetime = ceil(13*(2-(var(16)>0))/2),ceil(13*(2-(var(16)>0))/2)
sparkno = S8200+(random%8)
guard.sparkno = S8100
sparkxy = -10, -93
hitsound = S2, 5
guardsound = S1, 0
ground.type = High
air.type = High
ground.slidetime = 17+(var(41)*4)
ground.hittime = 17+(var(41)*4)
air.hittime = 17+(var(41)*4)
guard.ctrltime = 17
ground.velocity = -10*(2-(var(16)>0))/2
guard.velocity = -8.5*(2-(var(16)>0))/2
air.velocity = -4, -5.25
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = -14*(2-(var(16)>0))/2
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = ifelse(var(17),70,214)*(1000+var(24))/1000*!(var(15)||var(16)),35*(1000+var(24))/1000*!(var(15)||var(16))
givepower = 35, 35              
persistent = 0
air.fall = 1
fall.recover = !var(16)
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
yaccel = .5
nochainID = var(40)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(38) = -10

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(39) = -93

[State 250, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;しゃがみ弱パンチ
[Statedef 400]
type    = C
movetype = A
physics = C
juggle = 8
ctrl = 0
anim = 400
poweradd = 0
velset = 0,0

[State 220, Position]
type = PosSet
trigger1 = AnimElem = 1
y = 0

[State 400, Effect]
type = PlaySnd
trigger1 = AnimElem = 1
value = 3, 10
channel = 1

[State 400, Voice]
type = PlaySnd
trigger1 = AnimElem = 1 && Random <= 500
value = 0, (random%2)+var(12)
channel = 0

[State 0]
type = changeanim
triggerall = var(2)
trigger1 = AnimElemTime(5) = 0
value = anim
elem = 4
persistent = 1

[State 400, Helper]
type = Helper
trigger1 = AnimElem = 2
stateno = 7000
ownpal = 1

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 5
movetype = I

[State 400, 1]
type = Hitdef
trigger1 = AnimElem = 2
attr = C, NA
hitflag = MAF
guardflag = M
animtype = Light
air.animtype = back
fall.animtype = back
priority = 3,Hit
damage = ceil(ifelse((28*fvar(10))<7,7,(28*fvar(10))))
pausetime = 0,ceil(9*(2-(var(16)>0))/2)
sparkno = S8700+(random%64)
guard.sparkno = S8100
sparkxy = -20, -49
hitsound = S2, 10
guardsound = S1, 0
ground.type = Low
air.type = Low
ground.slidetime = 10+(var(41)*2)
ground.hittime = 10+(var(41)*2)
air.hittime = 10+(var(41)*2)
guard.ctrltime = 11
ground.velocity = -6*(2-(var(16)>0))/2
guard.velocity = -5*(2-(var(16)>0))/2
air.velocity = -8, -5
airguard.velocity = -4,-1
ground.cornerpush.veloff = .00000001
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = 70*(1000+var(24))/1000*!(var(15)||var(16)),35*(1000+var(24))/1000*!(var(15)||var(16))
givepower = 35, 35
persistent = 0
air.fall = 1
fall.recover = !var(16)
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
yaccel = .5
nochainID = var(40)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(38) = -20

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(39) = -49

[State 400, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
;しゃがみ中パンチ
[Statedef 410]
type    = C
movetype = A
physics = C
juggle = 8
ctrl = 0
anim = 410
poweradd = 17*(1000+var(24))/1000*!(var(15)||var(16))
velset = 0,0

[State 220, Position]
type = PosSet
trigger1 = AnimElem = 1
y = 0

[State 410, Effect]
type = PlaySnd
trigger1 = AnimElem = 2
value = 3, 11
channel = 1

[State 410, Voice]
type = PlaySnd
trigger1 = AnimElem = 2 && Random <= 500
value = 0, (random%2)+var(12)+1
channel = 0

[State 0]
type = changeanim
triggerall = var(2)
trigger1 = AnimElemTime(6) = 0
value = anim
elem = 5
persistent = 1

[State 210, Helper]
type = Helper
trigger1 = AnimElem = 2
stateno = 7000
ownpal = 1

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 6
movetype = I

[State 410, 2]
type = Hitdef
trigger1 = AnimElem = 3
attr = C, NA
hitflag = MAF
guardflag = L
animtype = Medium
air.animtype = back
fall.animtype = back
priority = 4,Hit
damage = ceil(ifelse((70*fvar(10))<7,7,(70*fvar(10))))
pausetime = 0,ceil(11*(2-(var(16)>0))/2)
sparkno = S8700+(random%64)
guard.sparkno = S8100
sparkxy = -10, -10
hitsound = S2, 11
guardsound = S1, 0
ground.type = Low
air.type = Low
ground.slidetime = 14+(var(41)*3)
ground.hittime = 14+(var(41)*3)
air.hittime = 14+(var(41)*3)
guard.ctrltime = 14
ground.velocity = -8*(2-(var(16)>0))/2
guard.velocity = -6.8*(2-(var(16)>0))/2
air.velocity = -8, -5
airguard.velocity = -5.33,-1
ground.cornerpush.veloff = .00000001
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = ifelse(var(17),70,143)*(1000+var(24))/1000*!(var(15)||var(16)),35*(1000+var(24))/1000*!(var(15)||var(16))
givepower = 35, 35
persistent = 0
air.fall = 1
fall.recover = !var(16)
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
yaccel = .5
nochainID = var(40)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(38) = -10

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(39) = -10

[State 410, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
;しゃがみ強パンチ
[Statedef 420]
type    = C
movetype = A
physics = C
juggle = 8
ctrl = 0
anim = 420
poweradd = 17*(1000+var(24))/1000*!(var(15)||var(16))
velset = 0,0

[State 220, Position]
type = PosSet
trigger1 = AnimElem = 1
y = 0

[State 3001, VarSet]
type = VarSet
trigger1 = time = 0
var(6) = 0

[State 420, Effect]
type = PlaySnd
trigger1 = AnimElem = 2
value = 3, 12
channel = 1

[State 420, Voice]
type = PlaySnd
trigger1 = AnimElem = 2 && Random <= 500
value = 0, (random%2)+var(12)+1
channel = 0

[State 0]
type = changeanim
triggerall = var(2)
trigger1 = AnimElemTime(6) = 0
value = anim
elem = 5
persistent = 1

[State 420, Helper]
type = Helper
trigger1 = time = 1
stateno = 7000
ownpal = 1

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 6
movetype = I

[State 420, 1]
type = Hitdef
trigger1 = AnimElem = 2
attr = C, NA
hitflag = MAF
guardflag = M
animtype = Heavy
air.animtype = up
fall.animtype = up
priority = 5,Hit
damage = 80
pausetime = 0,ceil(13*(2-(var(16)>0))/2)
sparkno = S8700+(random%64)
guard.sparkno = S8100
sparkxy = -10, -28
hitsound = S2, 12
guardsound = S1, 0
ground.type = Low
air.type = Low
ground.slidetime = 17+(var(41)*4)
ground.hittime = 17+(var(41)*4)
air.hittime = 17+(var(41)*4)
guard.ctrltime = 17
ground.velocity = -10*(2-(var(16)>0))/2
guard.velocity = -8.5*(2-(var(16)>0))/2
air.velocity = -3, -8
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = .00000001
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = ifelse(var(17),70,214)*(1000+var(24))/1000*!(var(15)||var(16)),35*(1000+var(24))/1000*!(var(15)||var(16))
givepower = 35, 35
persistent = 0
air.fall = 1
fall.recover = !var(16)
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
yaccel = .5
nochainID = var(40)

[State 420, 1]
type = Hitdef
trigger1 = var(36) != [1,2]
trigger1 = AnimElem = 3
attr = C, NA
hitflag = MAF
guardflag = M
animtype = Heavy
air.animtype = up
fall.animtype = up
priority = 5,Hit
damage = ceil(ifelse((63*fvar(10))<7,7,(63*fvar(10))))
pausetime = 0,ceil(13*(2-(var(16)>0))/2)
sparkno = S8700+(random%64)
guard.sparkno = S8100
sparkxy = -10, -91
hitsound = S2, 12
guardsound = S1, 0
ground.type = Low
air.type = Low
ground.slidetime = 17+(var(41)*4)
ground.hittime = 17+(var(41)*4)
air.hittime = 17+(var(41)*4)
guard.ctrltime = 17
ground.velocity = -10*(2-(var(16)>0))/2
guard.velocity = -8.5*(2-(var(16)>0))/2
air.velocity = -3, -8
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = .00000001
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = ifelse(var(17),70,214)*(1000+var(24))/1000*!(var(15)||var(16)),35*(1000+var(24))/1000*!(var(15)||var(16))
givepower = 35, 35
persistent = 0
air.fall = 1
fall.recover = !var(16)
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
yaccel = .5
nochainID = var(40)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(38) = -10

[State 3001, VarSet]
type = VarSet
trigger1 = AnimElem = 2 || AnimElem = 3
ignorehitpause = 1
var(39) = ifelse((AnimElem = 2),-28,-91)

[State 3001, VarSet]
type = VarSet
triggerall = !var(59)
trigger1 = !var(6)
trigger1 = command = "z"
trigger1 = animelemtime(4) > 0
trigger1 = var(36) = [1,2]
var(6) = 1
ignorehitpause = 1

[State 3001, VarSet]
type = VarSet
triggerall = var(59)
trigger1 = !var(6)
trigger1 = animelemtime(4) > 0
trigger1 = var(36) = [1,2]
trigger1 = enemynear,statetype != A
var(6) = 1
ignorehitpause = 1

[State 220, 3]
type = ChangeState
trigger1 = var(12)
trigger1 = animelemtime(6) > 0
trigger1 = animelemtime(7) < 0
trigger1 = var(6) = 1
value = 310

[State 420, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
;しゃがみ弱キック
[Statedef 430]
type    = C
movetype = A
physics = C
juggle = 8
ctrl = 0
anim = 430
poweradd = 0
velset = 0,0

[State 220, Position]
type = PosSet
trigger1 = AnimElem = 1
y = 0

[State 430, Effect]
type = PlaySnd
trigger1 = AnimElem = 1
value = 3, 3
channel = 1

[State 430, Voice]
type = PlaySnd
trigger1 = AnimElem = 1 && Random <= 500
value = 0, (random%2)+var(12)
channel = 0

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 4
movetype = I

[State 430, 2]
type = Hitdef
trigger1 = AnimElem = 2
attr = C, NA
hitflag = MAF
guardflag = L
animtype = Light
air.animtype = back
fall.animtype = back
priority = 3,Hit
damage = ceil(ifelse((21*fvar(10))<7,7,(21*fvar(10))))
pausetime = ceil(9*(2-(var(16)>0))/2),ceil(9*(2-(var(16)>0))/2)
sparkno = S8200+(random%8)
guard.sparkno = S8100
sparkxy = -10, -6
hitsound = S2, 3
guardsound = S1, 0
ground.type = Low
air.type = High
ground.slidetime = 10+(var(41)*2)
ground.hittime = 10+(var(41)*2)
air.hittime = 10+(var(41)*2)
guard.ctrltime = 11
ground.velocity = -6*(2-(var(16)>0))/2
guard.velocity = -5*(2-(var(16)>0))/2
air.velocity = -8, -5
airguard.velocity = -4,-1
ground.cornerpush.veloff = -8.4*(2-(var(16)>0))/2
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = 70*(1000+var(24))/1000*!(var(15)||var(16)),35*(1000+var(24))/1000*!(var(15)||var(16))
givepower = 35, 35
air.fall = 1
fall.recover = !var(16)
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
yaccel = .5
nochainID = var(40)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(38) = -10

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(39) = -6

[State 403, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
;しゃがみ中キック
[Statedef 440]
type    = C                      
movetype = A
physics = C                    
juggle = 8
velset = 0,0
ctrl = 0
anim = 440
poweradd = 17*(1000+var(24))/1000*!(var(15)||var(16))

[State 220, Position]
type = PosSet
trigger1 = AnimElem = 1
y = 0

[State 440, Effect]
type = PlaySnd
trigger1 = AnimElem = 1
value = 3, 4
channel = 1

[State 440, Voice]
type = PlaySnd
trigger1 = AnimElem = 1 && Random <= 500
value = 0, (random%2)+var(12)+1
channel = 0

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 4
movetype = I

[State 440, 1]
type = Hitdef
trigger1 = AnimElem = 2
attr = C, NA
hitflag = MAF
guardflag = L
animtype = Medium
air.animtype = back
fall.animtype = back
priority = 5,Hit
damage = ceil(ifelse((49*fvar(10))<7,7,(49*fvar(10))))
pausetime = ceil(11*(2-(var(16)>0))/2),ceil(11*(2-(var(16)>0))/2)
sparkno = S8200+(random%8)
guard.sparkno = S8100
sparkxy = -10, -6
hitsound = S2, 4
guardsound = S1, 0
ground.type = Low
air.type = High
ground.slidetime = 14+(var(41)*3)
ground.hittime = 14+(var(41)*3)
air.hittime = 14+(var(41)*3)
guard.ctrltime = 14
ground.velocity = -8*(2-(var(16)>0))/2
guard.velocity = -6.8*(2-(var(16)>0))/2
air.velocity = -8, -5
airguard.velocity = -5.33,-1
ground.cornerpush.veloff = -11.2*(2-(var(16)>0))/2
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = ifelse(var(17),70,143)*(1000+var(24))/1000*!(var(15)||var(16)),35*(1000+var(24))/1000*!(var(15)||var(16))
givepower = 35, 35
persistent = 0
air.fall = 1
fall.recover = !var(16)
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
yaccel = .5
nochainID = var(40)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(38) = -10

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(39) = -6

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

;---------------------------------------------------------------------------
;しゃがみ強キック
[Statedef 450]
type    = C
movetype = A
physics = N
juggle = 8
ctrl = 0
anim = 450
poweradd = 17*(1000+var(24))/1000*!(var(15)||var(16))
velset = 0,0

[State 3001, Width]
type = Width
trigger1 = 1
edge = 5,0

[State 220, Position]
type = PosSet
trigger1 = AnimElem = 1
y = 0

[State 810, Velocity]
type = VelSet
trigger1 = AnimElem = 5
x = 8

[State 810, Velocity]
type = VelSet
trigger1 = AnimElem = 8
x = 0

[State 450, Effect]
type = PlaySnd
trigger1 = AnimElem = 4
value = 3, 5
channel = 1

[State 450, Voice]
type = PlaySnd
trigger1 = AnimElem = 4 && Random <= 500
value = 0, (random%2)+var(12)+1
channel = 0

[State 450, Effect]
type = PlaySnd
trigger1 = AnimElem = 5
value = 100, 10

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 7
movetype = I

[State 450, 1]
type = Hitdef
trigger1 = AnimElem = 5
attr = C, NA
hitflag = MAF
guardflag = L
animtype = Heavy
air.animtype = back
fall.animtype = back
priority = 5,Hit
damage = ceil(ifelse((77*fvar(10))<7,7,(77*fvar(10))))
pausetime = ceil(13*(2-(var(16)>0))/2),ceil(13*(2-(var(16)>0))/2)
sparkno = S8200+(random%8)
guard.sparkno = S8100
sparkxy = -20, -10
hitsound = S2, 5
guardsound = S1, 0
ground.type = Trip
air.type = High
ground.slidetime = 17+(var(41)*4)
guard.slidetime = 17+(var(41)*4)
ground.hittime = 17+(var(41)*4)
air.hittime = 17
guard.ctrltime = 17
ground.velocity = -.7,-6.25
guard.velocity = -8.5*(2-(var(16)>0))/2
air.velocity = -.7,-6.25
airguard.velocity = -6.67,-1
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -11.9*(2-(var(16)>0))/2
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = ifelse(var(17),70,214)*(1000+var(24))/1000*!(var(15)||var(16)),35*(1000+var(24))/1000*!(var(15)||var(16))
givepower = 35, 35          
yaccel = .5
air.fall = 1
fall = 1
fall.recover = 0
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
nochainID = var(40)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(38) = -20

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(39) = -10

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

;---------------------------------------------------------------------------
;ジャンプ弱パンチ
[Statedef 600]
type    = A
movetype = A
physics = N
juggle = 8
ctrl = 0
anim = 600
poweradd = 0

[State 3001, Width]
type = Width
trigger1 = 1
edge = 5,0

[State 600, Effect]
type = PlaySnd
trigger1 = AnimElem = 2
value = 3, 10
channel = 1

[State 600, Voice]
type = PlaySnd
trigger1 = AnimElem = 2 && Random <= 500
value = 0, (random%2)+var(12)
channel = 0

[State 410, Helper]
type = Helper
trigger1 = AnimElem = 2
stateno = 7000
ownpal = 1

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 7
movetype = I

[State 600, 2]
type = Hitdef
trigger1 = AnimElem = 3
attr = A, NA
hitflag = MAF
guardflag = HA
animtype = Light
air.animtype = back
fall.animtype = back
priority = 3,Hit
damage = ceil(ifelse((42*fvar(10))<7,7,(42*fvar(10))))
pausetime = ceil(9*(2-(var(16)>0))/2),ceil(9*(2-(var(16)>0))/2)
sparkno = S8700+(random%64)
guard.sparkno = S8100
sparkxy = -10, -75
hitsound = S2, 10
guardsound = S1, 0
ground.type = High
ground.slidetime = 9+(var(41)*2)
ground.hittime = 9+(var(41)*2)
air.hittime = 9+(var(41)*2)
guard.ctrltime = 12
ground.velocity = -3*(2-(var(16)>0))/2
guard.velocity = -5.33*(2-(var(16)>0))/2
air.velocity = -4, -5.25
airguard.velocity = -4,-1
ground.cornerpush.veloff = -4.2*(2-(var(16)>0))/2
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = 70*(1000+var(24))/1000*!(var(15)||var(16)),35*(1000+var(24))/1000*!(var(15)||var(16))
givepower = 35, 35
persistent = 0
air.fall = 1
fall.recover = !var(16)
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
yaccel = .5
nochainID = var(40)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(38) = -10

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(39) = -75

[State 4030, Gravity]
type = Gravity
trigger1 = 1

[State 4030, ChangeState]
type = ChangeState
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 52

;---------------------------------------------------------------------------
;ジャンプ中パンチ
[Statedef 610]
type    = A
movetype = A
physics = N
juggle = 8
ctrl = 0
anim = 610
poweradd = 17*(1000+var(24))/1000*!(var(15)||var(16))

[State 3001, Width]
type = Width
trigger1 = 1
edge = 5,0

[State 610, Effect]
type = PlaySnd
trigger1 = AnimElem = 1
value = 3, 11
channel = 1

[State 610, Voice]
type = PlaySnd
trigger1 = AnimElem = 1 && Random <= 500
value = 0, (random%2)+var(12)+1
channel = 0

[State 0]
type = changeanim
triggerall = var(2)
trigger1 = AnimElemTime(6) = 0
value = anim
elem = 5
persistent = 1

[State 410, Helper]
type = Helper
trigger1 = time = 1
stateno = 7000
ownpal = 1

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 6
movetype = I

[State 610, 2]
type = Hitdef
trigger1 = AnimElem = 2
attr = A, NA
hitflag = MAF
guardflag = HA
animtype = Medium
air.animtype = back
fall.animtype = back
priority = 4,Hit
damage = ceil(ifelse((70*fvar(10))<7,7,(70*fvar(10))))
pausetime = 0,ceil(11*(2-(var(16)>0))/2)
sparkno = S8700+(random%64)
guard.sparkno = S8100
sparkxy = -10, -59
hitsound = S2, 11
guardsound = S1, 0
ground.type = High
ground.slidetime = 12+(var(41)*3)
ground.hittime = 12+(var(41)*3)
air.hittime = 12+(var(41)*3)
guard.ctrltime = 15
ground.velocity = -4*(2-(var(16)>0))/2
guard.velocity = -5.33*(2-(var(16)>0))/2
air.velocity = -4, -5.25
airguard.velocity = -5.33,-1
ground.cornerpush.veloff = .00000001
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = ifelse(var(17),70,143)*(1000+var(24))/1000*!(var(15)||var(16)),35*(1000+var(24))/1000*!(var(15)||var(16))
givepower = 35, 35
persistent = 0
air.fall = 1
fall.recover = !var(16)
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
yaccel = .5
nochainID = var(40)

[State 650, HitPause]
type = PosFreeze
trigger1 = var(2)
ignorehitpause = 1

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(38) = -10

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(39) = -59

[State 4030, Gravity]
type = Gravity
trigger1 = !var(2)

[State 4030, ChangeState]
type = ChangeState
triggerall = !var(2)
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 52

;---------------------------------------------------------------------------
;ジャンプ強パンチ
[Statedef 620]
type    = A
movetype = A
physics = N
juggle = 8
ctrl = 0
anim = 620
poweradd = 17*(1000+var(24))/1000*!(var(15)||var(16))

[State 3001, Width]
type = Width
trigger1 = 1
edge = 5,0

[State 620, Effect]
type = PlaySnd
trigger1 = AnimElem = 3
value = 3, 12
channel = 1

[State 620, Voice]
type = PlaySnd
trigger1 = AnimElem = 3 && Random <= 500
value = 0, (random%2)+var(12)+1
channel = 0

[State 0]
type = changeanim
triggerall = var(2)
trigger1 = AnimElemTime(7) = 0
value = anim
elem = 6
persistent = 1

[State 420, Helper]
type = Helper
trigger1 = AnimElem = 2
stateno = 7000
ownpal = 1

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 7
movetype = I

[State 620, 1]
type = Hitdef
trigger1 = AnimElem = 4
attr = A, NA
hitflag = MAF
guardflag = HA
animtype = Heavy
air.animtype = back
fall.animtype = back
priority = 5,Hit
damage = ceil(ifelse((112*fvar(10))<7,7,(112*fvar(10))))
pausetime = 0,ceil(13*(2-(var(16)>0))/2)
sparkno = S8700+(random%64)
guard.sparkno = S8100
sparkxy = -10, -25
hitsound = S2, 12
guardsound = S1, 0
ground.type = High
ground.slidetime = 12+(var(41)*4)
ground.hittime = 12+(var(41)*4)
air.hittime = 12+(var(41)*4)
guard.ctrltime = 20
ground.velocity = -5*(2-(var(16)>0))/2
guard.velocity = -9.33*(2-(var(16)>0))/2
air.velocity = -8, -5
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = .00000001
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = ifelse(var(17),70,214)*(1000+var(24))/1000*!(var(15)||var(16)),35*(1000+var(24))/1000*!(var(15)||var(16))
givepower = 35, 35    
persistent = 0
air.fall = 1
fall.recover = !var(16)
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
yaccel = .5
nochainID = var(40)

[State 650, HitPause]
type = PosFreeze
trigger1 = var(2)
ignorehitpause = 1

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(38) = -10

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(39) = -25

[State 4030, Gravity]
type = Gravity
trigger1 = !var(2)

[State 4030, ChangeState]
type = ChangeState
triggerall = !var(2)
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 52

;---------------------------------------------------------------------------
;ジャンプ弱キック
[Statedef 630]
type    = A
movetype = A
physics = N
juggle = 8
ctrl = 0
anim = 630
poweradd = 0

[State 3001, Width]
type = Width
trigger1 = 1
edge = 5,0

[State 630, Effect]
type = PlaySnd
trigger1 = AnimElem = 1
value = 3, 3
channel = 1

[State 630, Voice]
type = PlaySnd
trigger1 = AnimElem = 1 && Random <= 500
value = 0, (random%2)+var(12)
channel = 0

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 7
movetype = I

[State 630, 1]
type = Hitdef
trigger1 = AnimElem = 2
attr = A, NA
hitflag = MAF
guardflag = HA
animtype = Light
air.animtype = back
fall.animtype = back
priority = 3,Hit
damage = ceil(ifelse((35*fvar(10))<7,7,(35*fvar(10))))
pausetime = ceil(9*(2-(var(16)>0))/2),ceil(9*(2-(var(16)>0))/2)
sparkno = S8200+(random%8)
guard.sparkno = S8100
sparkxy = -10, -82
hitsound = S2, 3
guardsound = S1, 0
ground.type = High
ground.slidetime = 9+(var(41)*2)
ground.hittime = 9+(var(41)*2)
air.hittime = 9+(var(41)*2)
guard.ctrltime = 12
ground.velocity = -3*(2-(var(16)>0))/2
guard.velocity = -5.33*(2-(var(16)>0))/2
air.velocity = -4, -5.25
airguard.velocity = -4,-1
ground.cornerpush.veloff = -4.2*(2-(var(16)>0))/2
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = 70*(1000+var(24))/1000*!(var(15)||var(16)),35*(1000+var(24))/1000*!(var(15)||var(16))
givepower = 35, 35
persistent = 0
air.fall = 1
fall.recover = !var(16)
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
yaccel = .5
nochainID = var(40)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(38) = -10

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(39) = -82

[State 4030, Gravity]
type = Gravity
trigger1 = 1

[State 4030, ChangeState]
type = ChangeState
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 52

;---------------------------------------------------------------------------
;ジャンプ中キック
[Statedef 640]
type    = A
movetype = A
physics = N
juggle = 8
ctrl = 0
anim = 640
poweradd = 17*(1000+var(24))/1000*!(var(15)||var(16))

[State 3001, Width]
type = Width
trigger1 = 1
edge = 5,0

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

[State 601, Voice]
type = PlaySnd
trigger1 = AnimElem = 2 && Random <= 500
value = 0, (random%2)+var(12)+1
channel = 0

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 5
movetype = I

[State 640, 1]
type = Hitdef
trigger1 = AnimElem = 3
attr = A, NA
hitflag = MAF
guardflag = HA
animtype = Medium
air.animtype = back
fall.animtype = back
priority = 4,Hit
damage = ceil(ifelse((49*fvar(10))<7,7,(49*fvar(10))))
pausetime = ceil(11*(2-(var(16)>0))/2),ceil(11*(2-(var(16)>0))/2)
sparkno = S8200+(random%8)
guard.sparkno = S8100
sparkxy = -10, -56
hitsound = S2, 4
guardsound = S1, 0
ground.type = High
ground.slidetime = 12+(var(41)*3)
ground.hittime = 12+(var(41)*3)
air.hittime = 12+(var(41)*3)
guard.ctrltime = 15
ground.velocity = -4*(2-(var(16)>0))/2
guard.velocity = -5.33*(2-(var(16)>0))/2
air.velocity = -4, -5.25
airguard.velocity = -5.33,-1
ground.cornerpush.veloff = -5.6*(2-(var(16)>0))/2
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = ifelse(var(17),70,143)*(1000+var(24))/1000*!(var(15)||var(16)),35*(1000+var(24))/1000*!(var(15)||var(16))
givepower = 35, 35
persistent = 0
air.fall = 1
fall.recover = !var(16)
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
yaccel = .5
nochainID = var(40)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(38) = -10

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(39) = -56

[State 4030, Gravity]
type = Gravity
trigger1 = 1

[State 4030, ChangeState]
type = ChangeState
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 52

;----------------------------------------------------------------------------
;ジャンプ強キック
[Statedef 650]
type    = A
movetype = A
physics = N
juggle = 8
ctrl = 0
anim = 650
poweradd = 17*(1000+var(24))/1000*!(var(15)||var(16))

[State 3001, Width]
type = Width
trigger1 = 1
edge = 5,0

[State 650, Effect]
type = PlaySnd
trigger1 = AnimElem = 2
value = 3, 5
channel = 1

[State 650, Voice]
type = PlaySnd
trigger1 = AnimElem = 2 && Random <= 500
value = 0, (random%2)+var(12)+1
channel = 0

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 5
movetype = I

[State 650, 1]
type = Hitdef
trigger1 = AnimElem = 3
attr = A, NA
hitflag = MAF
guardflag = HA
animtype = Heavy
air.animtype = back
fall.animtype = back
priority = 5,Hit
damage = ceil(ifelse((77*fvar(10))<7,7,(77*fvar(10))))
pausetime = ceil(13*(2-(var(16)>0))/2),ceil(13*(2-(var(16)>0))/2)
sparkno = S8200+(random%8)
guard.sparkno = S8100
sparkxy = -10, -56
hitsound = S2, 5
guardsound = S1, 0
ground.type = High
ground.slidetime = 12+(var(41)*4)
ground.hittime = 12+(var(41)*4)
air.hittime = 12+(var(41)*4)
guard.ctrltime = 20
ground.velocity = -5*(2-(var(16)>0))/2
guard.velocity = -9.33*(2-(var(16)>0))/2
air.velocity = -8, -5
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = -7*(2-(var(16)>0))/2
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = ifelse(var(17),70,214)*(1000+var(24))/1000*!(var(15)||var(16)),35*(1000+var(24))/1000*!(var(15)||var(16))
givepower = 35, 35
air.fall = 1
fall.recover = !var(16)
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
yaccel = .5
nochainID = var(40)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(38) = -10

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(39) = -56

[State 4030, Gravity]
type = Gravity
trigger1 = 1

[State 4030, ChangeState]
type = ChangeState
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 52

;---------------------------------------------------------------------------
;牙突
[Statedef 300]
type    = S
movetype = A                
physics = S                    
juggle = 8
velset = 0,0
ctrl = 0
anim = 210
poweradd = 17*(1000+var(24))/1000*!(var(15)||var(16))

[State 220, Position]
type = PosSet
trigger1 = AnimElem = 1
y = 0

[State 210, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = 3, 11
channel = 1

[State 210, Voice]
type = PlaySnd
trigger1 = AnimElem = 1 && Random <= 500
value = 0, (random%2)+var(12)+1
channel = 0

[State 0]
type = changeanim
triggerall = var(2)
trigger1 = AnimElemTime(6) = 0
value = anim
elem = 5
persistent = 1

[State 210, Helper]
type = Helper
trigger1 = AnimElem = 2
stateno = 7000
ownpal = 1

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 6
movetype = I

[State 210, 1]
type = Hitdef
trigger1 = AnimElem = 2
attr = S, NA
hitflag = MAF
guardflag = M
animtype = Medium
air.animtype = back
fall.animtype = back
priority = 4,Hit
damage = ceil(ifelse((21*fvar(10))<7,7,(21*fvar(10))))
pausetime = 0,ceil(11*(2-(var(16)>0))/2)
sparkno = S8700+(random%64)
guard.sparkno = S8100
sparkxy = -20, -63
hitsound = S2, 11
guardsound = S1, 0
ground.type = Low
air.type = Low
ground.slidetime = 14+(var(41)*3)
ground.hittime = 14+(var(41)*3)
air.hittime = 14+(var(41)*3)
guard.ctrltime = 14
ground.velocity = -8*(2-(var(16)>0))/2
guard.velocity = -6.8*(2-(var(16)>0))/2
air.velocity = -6.4, -4.8
airguard.velocity = -5.33,-1
ground.cornerpush.veloff = .00000001
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = ifelse(var(17),70,143)*(1000+var(24))/1000*!(var(15)||var(16)),35*(1000+var(24))/1000*!(var(15)||var(16))
givepower = 35, 35
persistent = 0
air.fall = 1
fall.recover = !var(16)
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
yaccel = .5
nochainID = var(40)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(38) = -20

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(39) = -63

[State 210, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;飛燕
[Statedef 310]
type    = S
movetype = A
physics = S
juggle = 8
ctrl = 0
velset = 0,0
anim = 310
poweradd = 17*(1000+var(24))/1000*!(var(15)||var(16))

[State 220, Position]
type = PosSet
trigger1 = AnimElem = 1
y = 0

[State 3001, Width]
type = Width
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3
trigger3 = AnimElem = 5
player = 9,0

[State 3001, Width]
type = Width
trigger1 = animelem = 10
player = 0,3

[State 3001, Width]
type = Width
trigger1 = animelem = 11
player = 0,9

[State 3001, Width]
type = Width
trigger1 = animelem = 13
player = 0,15

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3
trigger3 = AnimElem = 5
x = 24

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 4
x = 12

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 10
x = -18

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 11
x = -24

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 12
x = -12

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 13
x = -30

[State 220, Effect]
type = PlaySnd
trigger1 = AnimElem = 3
value = 3, 12
channel = 1

[State 220, Voice]
type = PlaySnd
trigger1 = AnimElem = 4 && Random <= 500
value = 0, (random%2)+var(12)+1
channel = 0

[State 0]
type = changeanim
triggerall = var(2)
trigger1 = AnimElemTime(8) = 0
value = anim
elem = 7
persistent = 1

[State 220, Helper]
type = Helper
trigger1 = AnimElem = 5
stateno = 7000
ownpal = 1

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 8
movetype = I

[State 220, 1]
type = Hitdef
trigger1 = AnimElem = 5
attr = S, NA
hitflag = MAF
guardflag = M
animtype = Heavy
air.animtype = back
fall.animtype = back
priority = 5,Hit
damage = ceil(ifelse((63*fvar(10))<7,7,(63*fvar(10))))
pausetime = 0,ceil(17*(2-(var(16)>0))/2)
sparkno = S8700+(random%64)
guard.sparkno = S8100
sparkxy = -20, -55
hitsound = S2, 12
guardsound = S1, 0
ground.type = Low
air.type = Low
ground.slidetime = 28+(var(41)*6)
ground.hittime = 28+(var(41)*6)
air.hittime = 28+(var(41)*6)
guard.ctrltime = 28
ground.velocity = -8, -5
guard.velocity = -8.5*(2-(var(16)>0))/2
air.velocity = -8, -5
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = .00000001
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = ifelse(var(17),70,214)*(1000+var(24))/1000*!(var(15)||var(16)),35*(1000+var(24))/1000*!(var(15)||var(16))
givepower = 35, 35                
persistent = 0
fall = 1
fall.recover = 0
air.fall = 1
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
yaccel = .5
nochainID = var(40)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(38) = -20

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(39) = -55

[State 220, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

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

[State 3001, Width]
type = Width
trigger1 = 1
edge = 5,0

[State 810, Voice]
type = Playsnd
triggerall = !var(12)
trigger1 = animelem = 1
value = 800,random%2
channel = 0

[State 810, Voice]
type = Playsnd
triggerall = var(12)
trigger1 = animelem = 1
value = 800*(random%2=0),10
channel = 0

[State 810, Voice]
type = Playsnd
trigger1 = time = 1
value = 800,50

[State 810, Velocity]
type = VelSet
trigger1 = AnimElem = 2
x = 5.7

[State 810, Velocity]
type = VelSet
trigger1 = AnimElem = 9
x = 0

[State 810, HitBy]
type = HitBy
trigger1 = time <= 20
value = SCA, NT,ST,HT

[State 810, Push]
type = PlayerPush
trigger1 = AnimElemTime(2) > 0
value = 0

[State 810, AfterImage]
type = Afterimage
triggerall = !var(16)
trigger1 = AnimElem = 3
time = 15
length = 10
FrameGap = 3
PalBright = 1,1,1
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = .5,.5,.5
trans = add1

[State 810, StateChange]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;ガードキャンセル移動（前）
[Statedef 810]
type = S
physics = N
movetype =  I
ctrl = 0
velset = 0,0
poweradd = -1000

[State 180, 1]
type = VarAdd
trigger1 = time = 0
var(50)=500
ignorehitpause = 1

[State 902, Shock]
type = PalFX
trigger1 = Time = 0
time = 2
invertall = 1
mul = 0,0,0

[State 1100, Effect]
type = PlaySnd
trigger1 = Time = 1
value = 810,0
channel = 1

[State -3,Super]
type = Helper
trigger1 = Time = 0
id = 8070
name = "GUARD CANCEL"
pos = 10,-ifelse(PrevStateNo = 152,40,80)
postype = P1
stateno = 8070
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 7
supermovetime = 99999999999999
persistent = 0
size.xscale = 1
size.yscale = 1

[State 0]
type = pause
trigger1 = time = 1
time = 6
movetime = 6

[State 3001, Width]
type = Width
trigger1 = 1
edge = 5,0

[State 220, Position]
type = PosSet
trigger1 = Time = 0
y = 0

[State 190, 4]
type = ChangeAnim
trigger1 = time <= 12
value = anim

[State 190, 4]
type = ChangeAnim
trigger1 = time = 13
value = 800

[State 810, Voice]
type = Playsnd
triggerall = !var(12)
triggerall = anim = 800
trigger1 = animelem = 1
value = 800,random%2
channel = 0

[State 810, Voice]
type = Playsnd
triggerall = var(12)
triggerall = anim = 800
trigger1 = animelem = 1
value = 800*(random%2=0),10
channel = 0

[State 810, Voice]
type = Playsnd
triggerall = anim = 800
trigger1 = animelem = 1
value = 800,50

[State 810, Velocity]
type = VelSet
triggerall = anim = 800
trigger1 = AnimElem = 2
x = 5.7

[State 810, Velocity]
type = VelSet
triggerall = anim = 800
trigger1 = AnimElem = 9
x = 0

[State 810, HitBy]
type = HitBy
trigger1 = time <= 32
value = SCA, NT,ST,HT

[State 810, Push]
type = PlayerPush
triggerall = anim = 800
trigger1 = AnimElemTime(2) > 0
value = 0

[State 810, AfterImage]
type = Afterimage
triggerall = anim = 800
trigger1 = AnimElem = 3
time = 15
length = 10
FrameGap = 3
PalBright = 1,1,1
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = .5,.5,.5
trans = add1

[State 810, StateChange]
type = ChangeState
triggerall = anim = 800
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;ガードキャンセル移動（後）
[Statedef 820]
type = A
physics = N
ctrl = 0
poweradd = -1000
velset = 0,0

[State 180, 1]
type = VarAdd
trigger1 = time = 0
var(50)=-1000
ignorehitpause = 1

[State 902, Shock]
type = PalFX
trigger1 = Time = 0
time = 2
invertall = 1
mul = 0,0,0

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

[State 1100, Effect]
type = PlaySnd
trigger1 = Time = 1
value = 810,0
channel = 1

[State -3,Super]
type = Helper
trigger1 = Time = 0
id = 8070
name = "GUARD CANCEL"
pos = 10,-ifelse(PrevStateNo = 152,40,80)
postype = P1
stateno = 8070
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 7
supermovetime = 99999999999999
persistent = 0
size.xscale = 1
size.yscale = 1

[State 0]
type = pause
trigger1 = time = 1
time = 6
movetime = 6

[State 220, Position]
type = PosSet
trigger1 = Time = 0
y = 0

[State 3001, Width]
type = Width
trigger1 = 1
edge = 1,0

[State 190, 4]
type = ChangeAnim
trigger1 = time <= 12
value = anim

[State 190, 4]
type = ChangeAnim
trigger1 = time = 13
value = 105

[State 800, AfterImage]
type = Afterimage
triggerall = anim = 105
trigger1 = AnimElem = 2
time = 22
length = 10
FrameGap = 3
PalBright = 1,1,1
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = .5,.5,.5
trans = add1

[State 52, Effect]
type = PlaySnd
triggerall = anim = 105
trigger1 = AnimElem = 1
value = 40, 0
channel = 20

[State 1000, Spark]
type = Explod
triggerall = anim = 105
trigger1 = AnimElem = 1
Anim = 8040
pos = 0, 0
postype = p1
ownpal = 1
sprpriority = 3
;pausemovetime = -1
supermovetime = -1
scale = .5,.5

[State 105, 1]
type = VelSet
triggerall = anim = 105
trigger1 = AnimElem = 2
x = -5.41

[State 105, 1]
type = VelMul
triggerall = anim = 105
trigger1 = AnimElemTime(2) > 0
x = .98

[State 105, 3]
type = ChangeState
triggerall = anim = 105
trigger1 = animtime = 0
value = 106

;---------------------------------------------------------------------------
;避け
[Statedef 830]
type = S
physics = S
movetype =  I
anim = 830
ctrl = 0
velset = 0,0

[State 220, Position]
type = PosSet
trigger1 = AnimElem = 1
y = 0

[State 400, Effect]
type = PlaySnd
trigger1 = AnimElem = 1
value = 3, 0
channel = 1

[State 400, Voice]
type = PlaySnd
triggerall = !var(12)
trigger1 = AnimElem = 1
value = 800, 1
channel = 0

[State 400, Voice]
type = PlaySnd
triggerall = var(12)
trigger1 = AnimElem = 1
value = 800, 10
channel = 0

[State 810, Push]
type = PlayerPush
trigger1 = 1
value = 0

[State 800, HitBy]
type = HitBy
trigger1 = 1
value = SCA, NT,ST,HT

[State 800, AfterImage]
type = Afterimage
triggerall = !var(16)
trigger1 = AnimElem = 1
time = 26
length = 10
FrameGap = 6
PalBright = 1,1,1
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = .5,.5,.5
trans = add1

[State 800, StateChange]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;------------------------------------------------------------------------------------------
;パワー溜め
[Statedef 850]
type = S
physics = S
movetype= I
anim = ifelse(var(12),855,850)
ctrl = 0
velset = 0,0

[State 820, Voice]
type = Playsnd
trigger1 = time = 1
value = 850,var(12)=10
channel = 0

[State 820, PowerAdd]
type = PowerAdd
triggerall = Anim = 850 || Anim = 855
trigger1 = 1
value = ((time+10)/10)*(1+(var(20)=3))

[State 820, Anim]
type = ChangeAnim
triggerall = !var(59)
trigger1 = (Command != "chargec" || Command != "chargez") || ((power >= 1000 && var(20) = 3) || (power >= 3000 && var(20) = 6))
value = 851
persistent = 0

[State 704, 8]
type = ChangeAnim
triggerall = (var(20) = 3 && !var(14)) || var(20) = 6
triggerall = Time >= 2
triggerall = var(59)
trigger1 = P2MoveType = A && P2bodydist X <= 190
trigger2 = P2bodydist X <= 60 && enemynear,statetype != L
trigger3 = ((power >= 1000 && var(20) = 3) || (power >= 3000 && var(20) = 6))
trigger4 = win
trigger5 = enemynear,numproj
trigger6 = inguarddist
trigger7 = time > 20
trigger7 = random%60=5
value = anim + 1
persistent = 0

[State 820, Voice]
type = Stopsnd
trigger1 = Anim = 851 || Anim = 856
channel = 0
persistent = 0

[State 3001, Super]
type = Helper
trigger1 = !NumHelper(8500)
trigger1 = Time = 1
id = 8500
name = "Charge"
pos = 0,0
postype = P1
stateno = 8500
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
size.xscale = 1
size.yscale = 1

[State 1850, ctrlset]
type = ctrlset
triggerall = !ctrl
trigger1 = Anim = 851 || Anim = 856
value = 1

[State 820, StateChange]
type = ChangeState
trigger1 = (Anim = 851 || Anim = 856) && AnimTime = 0
value = 0
ctrl = 1

;------------------------------------------------------------------------------------------
;パワーMAX発動
[Statedef 860]
type = S
physics = S
movetype= I
anim = ifelse(var(12),865,860)
ctrl = 0
velset = 0,0

[State 860, 1]
type = Explod
trigger1 = Time = 6
anim = 8415
pos = 0,-60
postype = p1
bindtime = -1
sprpriority = 4
ontop = 0
ownpal = 1
scale = .5,.5
;pausemovetime = 99999999999999
supermovetime = 99999999999999

[State 860, 2]
type = Playsnd
trigger1 = time = 6
value = 6000, 10

[State 860, 2]
type = Playsnd
triggerall = !var(12)
trigger1 = time = 6
value = 0, 2
channel = 0

[State 860, 2]
type = Playsnd
triggerall = var(12)
trigger1 = time = 6
value = 860, 10
channel = 0

[State 860, 4]
type = PowerAdd
trigger1 = time = 6
value = -1000

[State 860, 5]
type = Varset
trigger1 = time = 6
var(15) = 675

[State 3001, Super]
type = Helper
trigger1 = time = 6
id = 6170
name = "n_gauge"
pos = 0,0
postype = P1
stateno = 6170
helpertype = normal
keyctrl = 0
ownpal = 1
pausemovetime = 99999999999999
supermovetime = 99999999999999
facing = facing*ifelse(teamside=1,1,-1)

[State 1850, ctrlset]
type = ctrlset
trigger1 = time = 16
value = 1

[State 860, 6]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

;------------------------------------------------------------------------------------------
;オリコン発動（地上）
[Statedef 870]
type = S
physics = S
movetype = A
anim = 870
ctrl = 0
velset = 0,0

[State 3000, Superpause]
type = SuperPause
trigger1 = Time = 4
time = 37
movetime = 37
anim = -1
sound = -1
pos = 0,0
darken = 0
p2defmul = 1
poweradd = 0
unhittable = 0

[State 3000, Super]
type = Helper
trigger1 = Time = 4
persistent = 0
id = 8080
name = "oricom"
pos = 0,-60
postype = P1
stateno = 8080
helpertype = normal
supermove = 1
keyctrl = 0
ownpal = 1
ignorehitpause = 1
;pausemovetime = 99999999999999
supermovetime = 99999999999999

[State 3000, VarSet]
type = VarSet
triggerall = Time = 4
trigger1 = enemynear,stateno != [120,155]
trigger1 = !(enemynear,authorname = "warusaki3" && enemynear,fvar(39) = 1)
trigger1 = !(enemynear,authorname = "H”" && enemynear,fvar(39) = 1)
trigger1 = !(enemynear,authorname = "mouser" && enemynear,name = "Hibiki Takane")
trigger2 = enemynear,authorname = "warusaki3" && enemynear,fvar(39) = 1 && ((enemynear,stateno != [120,155]) && (enemynear,stateno != [4100,4120]))
trigger3 = enemynear,authorname = "H”" && enemynear,fvar(39) = 1 && ((enemynear,stateno != [120,155]) && (enemynear,stateno != [4400,4405]))
trigger4 = enemynear,authorname = "mouser" && enemynear,name = "Hibiki Takane" && ((enemynear,stateno != [120,155]) && (enemynear,stateno != [4100,4120]))
fvar(36) = 37

[State 860, 2]
type = Playsnd
triggerall = !var(12)
trigger1 = time = 4
value = 0, 3
channel = 0

[State 860, 2]
type = Playsnd
triggerall = var(12)
trigger1 = time = 4
value = 185, 10
channel = 0

[State 3000, AfterImage]
type = AfterImage
trigger1 = time = 4
time = 9999
TimeGap  = 3
FrameGap = 4
length = 10
PalBright = 1,1,1
PalContrast = 0, 100, 150
PalAdd = 0,0,0
PalMul = .5,.5,.5
trans = add1

[State 860, 5]
type = Varset
trigger1 = AnimTime = 0
var(16) = 334

[State 860, 5]
type = Varset
trigger1 = time = 0
var(18) = 1

[State 860, 5]
type = Varset
trigger1 = AnimTime = 0
var(19) = 3000

[State 7000,Muteki]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 50

[State -2, 1]
type = Poweradd
trigger1 = AnimTime = 0
value = -3000
ignorehitpause = 1

[State 860, 6]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

;------------------------------------------------------------------------------------------
;オリコン発動（空中）
[Statedef 875]
type = A
movetype = A
physics = N
anim = 875
ctrl = 0

[State 7050,PosFreeze]
type = PosFreeze
trigger1 = 1

[State 3000, Superpause]
type = SuperPause
trigger1 = Time = 4
time = 37
movetime = 37
anim = -1
sound = -1
pos = 0,0
darken = 0
p2defmul = 1
poweradd = 0
unhittable = 0

[State 3000, Super]
type = Helper
trigger1 = Time = 4
persistent = 0
id = 8080
name = "oricom"
pos = 0,-60
postype = P1
stateno = 8080
helpertype = normal
supermove = 1
keyctrl = 0
ownpal = 1
ignorehitpause = 1
;pausemovetime = 99999999999999
supermovetime = 99999999999999

[State 3000, VarSet]
type = VarSet
triggerall = Time = 4
trigger1 = enemynear,stateno != [120,155]
trigger1 = !(enemynear,authorname = "warusaki3" && enemynear,fvar(39) = 1)
trigger1 = !(enemynear,authorname = "H”" && enemynear,fvar(39) = 1)
trigger1 = !(enemynear,authorname = "mouser" && enemynear,name = "Hibiki Takane")
trigger2 = enemynear,authorname = "warusaki3" && enemynear,fvar(39) = 1 && ((enemynear,stateno != [120,155]) && (enemynear,stateno != [4100,4120]))
trigger3 = enemynear,authorname = "H”" && enemynear,fvar(39) = 1 && ((enemynear,stateno != [120,155]) && (enemynear,stateno != [4400,4405]))
trigger4 = enemynear,authorname = "mouser" && enemynear,name = "Hibiki Takane" && ((enemynear,stateno != [120,155]) && (enemynear,stateno != [4100,4120]))
fvar(36) = 37

[State 860, 2]
type = Playsnd
triggerall = !var(12)
trigger1 = time = 4
value = 0, 3
channel = 0

[State 860, 2]
type = Playsnd
triggerall = var(12)
trigger1 = time = 4
value = 185, 10
channel = 0

[State 3000, AfterImage]
type = AfterImage
trigger1 = time = 4
time = 9999
TimeGap  = 3
FrameGap = 4
length = 10
PalBright = 1,1,1
PalContrast = 0, 100, 150
PalAdd = 0,0,0
PalMul = .5,.5,.5
trans = add1

[State 860, 5]
type = Varset
trigger1 = AnimTime = 0
var(16) = 334

[State 860, 5]
type = Varset
trigger1 = time = 0
var(18) = 1

[State 860, 5]
type = Varset
trigger1 = AnimTime = 0
var(19) = 3000

[State 7000,Muteki]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 50

[State -2, 1]
type = Poweradd
trigger1 = AnimTime = 0
value = -3000
ignorehitpause = 1

[State 1850, 9]
type = changestate
trigger1 = AnimTime = 0
value = 876

;------------------------------------------------------------------------------------------
;オリコン発動（空中）（終了）
[Statedef 876]
type = A
movetype = I
physics = N
anim = 4030
ctrl = 1

[State 903, Vel]
type = Gravity
trigger1 = 1

[State 1100, ChangeState]
type = ChangeState
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 52

;---------------------------------------------------------------------------
;投げ（掴みモーション）
[Statedef 900]
type    = S
movetype = A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = ifelse(Command = "z"||(var(59)&&(random%2=0)), 900, 910)
poweradd = 89*(1000+var(24))/1000*!(var(15)||var(16))

[State 900, 1]
type = HitDef
triggerall = Anim = 900
triggerall = P2MoveType != H
triggerall = P2StateNo != [150,155]
triggerall = P2bodydist X = [-const(size.ground.front),22]
trigger1 = AnimElem = 2
attr = S, NT
hitflag = M-
priority = 3, Miss
sparkno = -1
p1facing = ifelse(command = "holdfwd", 1, -1)
p2facing = 1
p1stateno = 901
p2stateno = 909
guard.dist = 0
numhits = 0
nochainID = var(40)

[State 900, 1]
type = HitDef
triggerall = Anim = 910
triggerall = P2MoveType != H
triggerall = P2StateNo != [150,155]
triggerall = P2bodydist X = [-const(size.ground.front),22]
trigger1 = AnimElem = 2
attr = S, NT
hitflag = M-
priority = 3, Miss
sparkno = -1
p1facing = ifelse(command = "holdfwd", 1, -1)
p2facing = 1
p1stateno = 911
p2stateno = 919
guard.dist = 0
numhits = 0
nochainID = var(40)

[State 900, 1]
type = HitDef
triggerall = Anim = 900
triggerall = P2StateNo != [150,155]
triggerall = P2bodydist X = [-const(size.ground.front),22]
triggerall = var(16)
trigger1 = AnimElem = 2
attr = S, NT
hitflag = MF
priority = 3, Miss
sparkno = -1
p1facing = ifelse(command = "holdfwd", 1, -1)
p2facing = 1
p1stateno = 901
p2stateno = 909
guard.dist = 0
numhits = 0
nochainID = var(40)

[State 900, 1]
type = HitDef
triggerall = Anim = 910
triggerall = P2StateNo != [150,155]
triggerall = P2bodydist X = [-const(size.ground.front),22]
triggerall = var(16)
trigger1 = AnimElem = 2
attr = S, NT
hitflag = MF
priority = 3, Miss
sparkno = -1
p1facing = ifelse(command = "holdfwd", 1, -1)
p2facing = 1
p1stateno = 911
p2stateno = 919
guard.dist = 0
numhits = 0
nochainID = var(40)

[State 901, Effect]
type = PlaySnd
triggerall = !var(12)
trigger1 = AnimElem = 3
value = 900, 1
channel = 1

[State 901, Effect]
type = PlaySnd
triggerall = var(12)
trigger1 = AnimElem = 3
value = 0, 10
channel = 1

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 3
movetype = I

[State 900, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;横投げ
[Statedef 901]
type    = S
movetype =  A
physics = N
velset = 0,0

[State 10000, 1]
type = VarSet
trigger1 = Time = 0
fvar(2) = 0

[State 10000, 1]
type = VarSet
triggerall = Time < 7 && !fvar(2)
triggerall = Target,Command = "holdfwd" || Target,Command = "holdback"
trigger1 = Target,Command = "y" || Target,Command = "z"
trigger2 = Target,Command = "b" || Target,Command = "c"
fvar(2) = 1

[State 810,TargetBind]
type = TargetBind
trigger1 = Time < 7 && fvar(2)
pos = 40, 0

[State 810,TargetBind]
type = ChangeState
trigger1 = Time < 7 && fvar(2)
value = 950

[State 1201, 2]
type = Playerpush
trigger1 = 1
value = 0

[State 901, Throw]
type = TargetState
trigger1 = Time = 0
value = 905

[State 820, Anim]
type = ChangeAnim
trigger1 = Time = 0
value = 901
persistent = 0

[State 3001, Width]
type = Width
trigger1 = animelemtime(7) < 0
edge = 45,45

[State 3001, Width]
type = Width
trigger1 = animelem = 7
edge = 75,0

[State 901, Effect]
type = PlaySnd
trigger1 = AnimElem = 1
value = 900, 0
channel = 1

[State 901, Effect]
type = PlaySnd
trigger1 = AnimElem = 6
value = 0, 3+var(12)
channel = 0

[State 901, Effect]
type = PlaySnd
trigger1 = AnimElem = 6
value = 5100, 1

[State 901, Effect]
type = PlaySnd
trigger1 = AnimElem = 7
value = 2, 5

[State 1000, Spark]
type = Explod
trigger1 = AnimElem = 7
Anim = 8030
pos = 80, 0
postype = p1
ownpal = 1
sprpriority = -3
;pausemovetime = -1
supermovetime = -1
scale = .5,.5

[State 1000, Spark]
type = Explod
trigger1 = AnimElem = 7
Anim = 8310
pos = 80, 5
postype = p1
ownpal = 1
sprpriority = -3
;pausemovetime = -1
supermovetime = -1
scale = .5,.5

[State 903, EnvShake]
type = EnvShake
trigger1 = AnimElem = 7
time = 20
ampl = 5

[State 901,1]
type = TargetBind
trigger1 = animelem = 1
pos = -59,0
time = -1

[State 901,1]
type = TargetBind
trigger1 = animelem = 2
pos = -46,-84
time = -1

[State 901,1]
type = TargetBind
trigger1 = animelem = 3
pos = -36,-84
time = -1

[State 901,1]
type = TargetBind
trigger1 = animelem = 4
pos = -12,-84
time = -1

[State 901,1]
type = TargetBind
trigger1 = animelem = 5
pos = 10,-78
time = -1

[State 901,1]
type = TargetBind
trigger1 = animelem = 6
pos = 24, -78
time = -1

[State 901,1]
type = TargetBind
trigger1 = animelem = 7
pos = 80, -5
time = -1

[State 901,1]
type = TargetBind
trigger1 = animelem = 8
pos = 80, 0
time = 1

[State 3001, Add Hits!]
type = HitAdd
trigger1 = AnimElem = 8
value = 1

[State -2, Combo]
type = VarAdd
trigger1 = AnimElem = 8
var(17) = 1
ignorehitpause = 1

[State 180, 1]
type = VarAdd
trigger1 = AnimElem = 8
var(50)=500
ignorehitpause = 1
persistent = 1

[State 180, 1]
type = VarAdd
triggerall = var(17) >= 2
trigger1 = AnimElem = 8
var(50)=ifelse(var(17)<6,2000,500)
ignorehitpause = 1
persistent = 1

[State 901, Hurt]
type = TargetLifeAdd
trigger1 = AnimElem = 8
value = ceil(ifelse((-133*fvar(10))>-7,-7,(-133*fvar(10))))

[State 901, Hurt]
type = TargetPowerAdd
trigger1 = AnimElem = 8
value = 35

[State 901, State End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;横投げ（相手）
[Statedef 905]
type    = A
movetype =  H
physics = N
velset = 0,0
sprpriority = -1

[State 1201, screenbound]
type = screenbound
trigger1 = anim = 905
value = 1

[State 902, 1]
type = ChangeAnim2
trigger1 = Time = 0
value = 905

[State 1300,Turn]
type = Turn
trigger1 = anim = 905 && animtime = 0

[State 902, 1]
type = ChangeAnim
trigger1 = anim = 905 && animtime = 0
value = 5080

[State 902, 1]
type = ChangeAnim
trigger1 = Time = 44
value = 5110

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

[State 3110, ChangeState]
type = SelfState
trigger1 = Time >= 90
value = ifelse(alive, 5120, 5150)

;---------------------------------------------------------------------------
;横投げ（相手）2
[Statedef 909]
type    = A
movetype =  H
physics = N
velset = 0,0
ctrl = 0

[State 1205, ChangeState]
type = selfstate
trigger1 = Time > 5
value = 5100

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

;---------------------------------------------------------------------------
;頭砕き
[Statedef 911]
type    = S
movetype =  A
physics = N
velset = 0,0

[State 10000, 1]
type = VarSet
trigger1 = Time = 0
fvar(2) = 0

[State 10000, 1]
type = VarSet
triggerall = Time < 4 && !fvar(2)
triggerall = Target,Command = "holdfwd" || Target,Command = "holdback"
trigger1 = Target,Command = "y" || Target,Command = "z"
trigger2 = Target,Command = "b" || Target,Command = "c"
fvar(2) = 1

[State 810,TargetBind]
type = TargetBind
trigger1 = Time < 4 && fvar(2)
pos = 30, 0

[State 810,TargetBind]
type = ChangeState
trigger1 = Time < 4 && fvar(2)
value = 950

[State 1201, 2]
type = Playerpush
trigger1 = 1
value = 0

[State 901, Throw]
type = TargetState
trigger1 = Time = 0
value = 915

[State 820, Anim]
type = ChangeAnim
trigger1 = Time = 0
value = 911
persistent = 0

[State 3001, Width]
type = Width
trigger1 = animelemtime(8) < 0
edge = 45,0

[State 3001, Width]
type = Width
trigger1 = animelemtime(8) = 0
edge = 75,0

[State 901, Effect]
type = PlaySnd
trigger1 = AnimElem = 1
value = 900, 0
channel = 1

[State 901, Effect]
type = PlaySnd
trigger1 = AnimElem = 6
value = 0, 2+var(12)
channel = 0

[State 901, Effect]
type = PlaySnd
trigger1 = AnimElem = 6
value = 3, 2
channel = 1

[State 901, Effect]
type = PlaySnd
trigger1 = AnimElem = 8
value = 2, 2

[State 901, Effect]
type = PlaySnd
trigger1 = AnimElemTime(8) = 1
value = 2, 2

[State 1100, Fire1]
type = Explod
trigger1 = AnimElemTime(8) = 1
Anim = 8200+(random%8)
pos = 30,-40
postype = p1
ownpal = 1
ignorehitpause = 1
bindtime = 1
removeongethit = 1
ontop = 1

[State 901,1]
type = TargetBind
trigger1 = animelem = 1
pos = 59,0
time = -1

[State 901,1]
type = TargetBind
trigger1 = animelem = 2
pos = 50,-90
time = -1

[State 901,1]
type = TargetBind
trigger1 = animelem = 8
pos = 50, 0
time = 1

[State 3001, Add Hits!]
type = HitAdd
trigger1 = AnimElemTime(8) = 1
value = 1

[State -2, Combo]
type = VarAdd
trigger1 = AnimElemTime(8) = 1
var(17) = 1
ignorehitpause = 1

[State 180, 1]
type = VarAdd
trigger1 = AnimElemTime(8) = 1
var(50)=500
ignorehitpause = 1
persistent = 1

[State 180, 1]
type = VarAdd
triggerall = var(17) >= 2
trigger1 = AnimElemTime(8) = 1
var(50)=ifelse(var(17)<6,2000,500)
ignorehitpause = 1
persistent = 1

[State 901, Hurt]
type = TargetLifeAdd
trigger1 = AnimElemTime(8) = 1
value = ceil(ifelse((-147*fvar(10))>-7,-7,(-147*fvar(10))))

[State 901, Hurt]
type = TargetPowerAdd
trigger1 = AnimElemTime(8) = 1
value = 35

[State 901, State End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;頭砕き（相手）
[Statedef 915]
type    = A
movetype =  H
physics = N
velset = 0,0
sprpriority = -1

[State 1201, screenbound]
type = screenbound
trigger1 = 1
value = 1

[State 902, 1]
type = ChangeAnim2
trigger1 = Time = 0
value = 915

[State 901, State End]
type = ChangeState
trigger1 = AnimTime = 0
value = 916

;---------------------------------------------------------------------------
;頭砕き（相手）2
[Statedef 916]
type    = A
movetype =  H
physics = N
sprpriority = -1
velset = 0,7.5

[State 1201, screenbound]
type = screenbound
trigger1 = 1
value = 1

[State 2601, ChangeAnim]
type = ChangeAnim
trigger1 = time = 0
value = 5070

[State 2601, EnvShake]
type = EnvShake
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
time = 20

[State 2601, Vel]
type = VelAdd
trigger1 = 1
y = .49

[State 903, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA

[State 2601, SelfState]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100

;---------------------------------------------------------------------------
;頭砕き（相手）3
[Statedef 919]
type    = A
movetype =  H
physics = N
velset = 0,0
ctrl = 0

[State 1205, ChangeState]
type = selfstate
trigger1 = Time > 5
value = 5100

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

;---------------------------------------------------------------------------
;奥義　旋風裂斬
[Statedef 1000]
type = S
movetype = A
physics = S
poweradd = -100
velset = 0,0
ctrl = 0

[State 1000, Position]
type = PosSet
trigger1 = AnimElem = 1
y = 0

[State 1000, VarSet]
type = VarSet
triggerall = !var(59)
trigger1 = Time = 0
var(5) = ifelse(Command = "旋風裂斬1", 0, ifelse(Command = "旋風裂斬2", 1, 2))

[State 1000, VarSet]
type = VarSet
triggerall = !var(59)
triggerall = fvar(29)
trigger1 = Time = 0
var(5) = ifelse((ceil(fvar(29))&2**11),0,ifelse((ceil(fvar(29))&2**12),1,2))

[State 1000, VarSet]
type = VarSet
triggerall = var(59)
trigger1 = Time = 0
var(5) = random%3

[State 1000, ChangeAnim]
type = ChangeAnim
Trigger1 = Time = 0
value = ifelse(!var(5), 1000, ifelse(var(5) = 1, 1010, 1020))

[State 3001, Width]
type = Width
trigger1 = AnimElem = 15
trigger2 = AnimElem = 17
player = 0,9

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 6
trigger2 = AnimElem = 8
trigger3 = AnimElem = 9
x = 16

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 7
trigger2 = AnimElem = 10
x = 8

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 15
trigger2 = AnimElem = 17
x = -24

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 16
x = -16

[State 1000, Voice]
type = PlaySnd
triggerall = var(12)
trigger1 = AnimElem = 1
value = 1000, var(12)
channel = 0

[State 1000, Voice]
type = PlaySnd
triggerall = !var(12)
trigger1 = AnimElem = 3
value = 1000, var(12)
channel = 0

[State 1000, Voice]
type = PlaySnd
trigger1 = AnimElem = 4
value = 3, 12

[State 1000,Super]
type = Helper
trigger1 = AnimElem = 7
id = 7300
name = "senpu"
pos = 45,0
postype = P1
stateno = 7300
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1

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

;---------------------------------------------------------------------------
;奥義　旋風裂斬（飛び道具）
[Statedef 7300]
type = S
movetype = I
physics = N
ctrl = 0
velset = 0,0
anim = 7300
sprpriority = 4

[State 9000, Assert]
type = null;AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1005, trans]
type=trans
trigger1=1
trans=addalpha
alpha=256,256
ignorehitpause=1

[State 3001, VarSet]
type = VarSet
trigger1 = time = 0
ignorehitpause = 1
var(5) = parent,var(5)

[State 3001, VarSet]
type = VarSet
trigger1 = time = 0
ignorehitpause = 1
var(12) = parent,var(12)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(15) = parent,var(15)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(16) = parent,var(16)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(17) = parent,var(17)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(24) = parent,var(24)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(41) = parent,var(41)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
fvar(10) = parent,fvar(10)

[State 1100, Velocity]
type = VelSet
trigger1 = time = 1
x = 3.375 + (var(5)*1.6875)

[State 1100, Velocity]
type = VelAdd
triggerall = var(12)
trigger1 = time >= 1
y = -.075*(var(5)+1)

[State 1000, Voice]
type = PlaySnd
trigger1 = time = 0
value = 1000, 1
channel = 0

[State -2, VoicePos]
type=sndpan
trigger1=1
channel=0
pan=0
ignorehitpause=1

[State -3, Blocking5]
type = ParentVarAdd
trigger1 = root,projhittime(1005) = 1
fvar(26) = 1
persistent = 0

[State -3, Blocking5]
type = VarSet
trigger1 = root,projhittime(1005) = 1
var(4) = 1
persistent = 0

[State 1000, Proj]
type = Projectile
triggerall = !var(12)
trigger1 = time = 1
projanim = 7350
Projhitanim = -1
Projremanim = -1
projcancelanim = -1
offset = 0, 0
projpriority = 1
projsprpriority = 4
velocity = vel X, vel Y
attr = S, SP
damage=30,10
animtype = Heavy
air.animtype = diugup
hitflag = MAF
guardflag = MA
pausetime = 4,ceil(9*(2-parent,var(18))/2)
sparkno = S8210+(random%8)
guard.sparkno = S8105
sparkxy = 0, -40
hitsound = S2,15
guardsound = S1,1
ground.type = Low
ground.slidetime = 18
ground.hittime = 18
air.hittime = 18
guard.ctrltime = 18
ground.velocity = -1, -10.5
guard.velocity = -8
air.velocity = -1, -10.5
airguard.velocity = -5.33,-1
fall = 1
fall.recover = 0
air.fall = 1
yaccel = .49
air.juggle = ifelse(root,var(45)||root,var(22)=-1||root,var(23)=1,0,8)
envshake.time = 8
envshake.ampl = 2
ProjID = 1005
getpower = 0
givepower = 40, 60
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
forcestand = 1
nochainID = root,var(40)

[State 1000, Proj]
type = Projectile
triggerall = var(12)
trigger1 = time = 1
projanim = 7350
Projhitanim = -1
Projremanim = -1
projcancelanim = -1
projremovetime = 24+(var(5)*8)
offset = 0, 0
projpriority = 1
projsprpriority = 4
velocity = vel X, vel Y
attr = S, SP
damage=40,0
animtype = Heavy
air.animtype = diugup
hitflag = MAF
guardflag = MA
pausetime = 4,ceil(9*(2-parent,var(18))/2)
sparkno = S8210+(random%8)
guard.sparkno = S8105
sparkxy = 0, -40
hitsound = S2,15
guardsound = S1,1
ground.type = Low
ground.slidetime = 18
ground.hittime = 18
air.hittime = 18
guard.ctrltime = 18
ground.velocity = -1, -10.5-var(5)
guard.velocity = -8
air.velocity = -1, -10.5-var(5)
airguard.velocity = -5.33,-1
fall = 1
fall.recover = 0
air.fall = 1
yaccel = .49
air.juggle = ifelse(root,var(45)||root,var(22)=-1||root,var(23)=1,0,8)
envshake.time = 8
envshake.ampl = 2
ProjID = 1005
getpower = 0
givepower = 40, 60
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
forcestand = 1
fall.damage = ceil(ifelse(((56+(var(5)*7))*fvar(10))<7,7,((56+(var(5)*7))*fvar(10))))
accel = 0,-.075*(var(5)+1)
nochainID = root,var(40)

[State 3001, VarSet]
type = VarSet
trigger1 = var(1) = 4
ignorehitpause = 1
var(1) = 0

[State 3001, VarSet]
type = VarSet
trigger1 = root,ProjContactTime(1005) = 1
ignorehitpause = 1
var(1) = 1

[State 3001, VarSet]
type = VarAdd
trigger1 = var(1)
ignorehitpause = 1
var(1) = 1

[State 1000, 0]
type = PosFreeze
trigger1 = var(1)
value = 1
ignorehitpause = 1
persistent = 1

[State -3, Blocking5]
type = helper
triggerall = root,fvar(8) = 1 || root,fvar(8) = -2
trigger1 = root,projhittime(1005) = 1
id = 8130
name = "COUNTER HIT EFFECT"
pos = 0,-40
postype = P1
stateno = 8130
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 99999
supermovetime = 99999
size.xscale = 1
size.yscale = 1

[State 4110, DestroySelf]
type = DestroySelf
triggerall = time > 1
trigger1 = FrontEdgeDist <= -40 && !var(1)

[State 900, 4]
type = ChangeState
triggerall = var(12)
trigger1 = time = 24+(var(5)*8)
value = 7306

[State 900, 4]
type = ChangeState
triggerall = time > 1
trigger1 = !root,NumProjID(1005)
value = 7305

;---------------------------------------------------------------------------
;奥義　旋風裂斬（飛び道具）（消滅）
[Statedef 7305]
type = S
movetype = I
physics = N
ctrl = 0
velset = 0,0

[State -3, Blocking5]
type = helper
triggerall = !NumHelper(8130)
triggerall = root,fvar(8) = 1 || root,fvar(8) = -2
trigger1 = root,projhittime(1005) = 1
id = 8130
name = "COUNTER HIT EFFECT"
pos = 0,0
postype = P1
stateno = 8130
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 99999
supermovetime = 99999
size.xscale = 1
size.yscale = 1

[State 1100, Voice]
type = PlaySnd
triggerall = !parent,var(36)
trigger1 = time = 1
value = 1, 1

[State 902, Shock]
type = PalFX
trigger1 = 1
time = 1
add = -time*20,-time*20,-time*20

[State 4110, DestroySelf]
type = DestroySelf
trigger1 = time = 12

;---------------------------------------------------------------------------
;奥義　旋風裂斬（飛び道具）（消滅2）
[Statedef 7306]
type = S
movetype = I
physics = N
ctrl = 0
velset = 0,0

[State 902, Shock]
type = PalFX
trigger1 = 1
time = 1
add = -time*20,-time*20,-time*20

[State 4110, DestroySelf]
type = DestroySelf
trigger1 = time = 12

;---------------------------------------------------------------------------
;奥偽　旋風烈斬
[Statedef 1050]
type = S
movetype = A
physics = S
velset = 0,0
ctrl = 0

[State 1000, Position]
type = PosSet
trigger1 = AnimElem = 1
y = 0

[State 1000, VarSet]
type = VarSet
triggerall = !var(59)
trigger1 = Time = 0
var(5) = ifelse(Command = "旋風波1", 0, ifelse(Command = "旋風波2", 1, 2))

[State 1000, VarSet]
type = VarSet
triggerall = !var(59)
triggerall = fvar(29)
trigger1 = Time = 0
var(5) = ifelse((ceil(fvar(29))&2**8),0,ifelse((ceil(fvar(29))&2**9),1,2))

[State 1000, VarSet]
type = VarSet
triggerall = var(59)
trigger1 = Time = 0
var(5) = random%3

[State 1000, VarSet]
type = VarSet
triggerall = var(59)
trigger1 = enemynear,movetype = H
trigger1 = Time = 0
var(5) = 0

[State 1000, ChangeAnim]
type = ChangeAnim
Trigger1 = Time = 0
value = ifelse(!var(5), 1050, ifelse(var(5) = 1, 1060, 1070))

[State 1000, Voice]
type = PlaySnd
trigger1 = AnimElem = 3
value = 1050, 0
channel = 0

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

;------------------------------------------------------------------------------------------
;奥義　弧月斬
[Statedef 1100]
type    = S
movetype = A
physics = N
juggle = 8
ctrl = 0
poweradd = 70*(1000+var(24))/1000*!(var(15)||var(16))
velset = 0,0

[State 3001, Width]
type = Width
trigger1 = 1
edge = 5,0

[State 1100, VarSet]
type = VarSet
triggerall = !var(59)
trigger1 = Time = 0
var(5) = ifelse(Command = "弧月斬1", 0, ifelse(Command = "弧月斬2", 1, 2))

[State 1000, VarSet]
type = VarSet
triggerall = !var(59)
triggerall = fvar(29)
trigger1 = Time = 0
var(5) = ifelse((ceil(fvar(29))&2**20),0,ifelse((ceil(fvar(29))&2**21),1,2))

[State 1000, VarSet]
type = VarSet
triggerall = var(59)
trigger1 = Time = 0
var(5) = random%3

[State 1000, VarSet]
type = VarSet
triggerall = var(59)
trigger1 = enemynear,movetype = H
trigger1 = Time = 0
var(5) = 2

[State 902, 1]
type = ChangeAnim
Trigger1 = Time = 0
value = 1100

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 10
movetype = I

[State 220, Position]
type = PosSet
trigger1 = Time = 0
y = 0

[State 1100, Voice]
type = PlaySnd
trigger1 = AnimElem = 1
value = 1100,0
channel = 0

[State 52, Effect]
type = PlaySnd
trigger1 = AnimElem = 2
value = 3, 12

[State 52, Effect]
type = PlaySnd
trigger1 = AnimElem = 3
value = 1100, 1

[State 52, Effect]
type = PlaySnd
trigger1 = AnimElem = 8
value = 40, 1

[State 1100, StateType]
type = StateTypeSet
trigger1 = AnimElem = 8
StateType = A
physics = N

[State 1100, Velocity]
type = VelSet
trigger1 = AnimElem = 1
x = .5*(var(5)+1)

[State 1100, Velocity]
type = VelSet
trigger1 = AnimElem = 8
x = 4.5+(2*var(5))
y = -9-(var(5)*2)

[State 1100, Gravity]
type = VelMul
trigger1 = AnimElemTime(8) > 0
x = .8

[State 1100, Gravity]
type = Veladd
trigger1 = AnimElemTime(8) > 0
y = .55

[State 3001, Super]
type = Helper
trigger1 = AnimElem = 8
id = 8020
name = "jump Effect"
pos = 0,0
postype = P1
stateno = 8020
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
;pausemovetime = 99999999999999
supermovetime = 99999999999999

[State 420, Helper]
type = Helper
trigger1 = AnimElem = 2
stateno = 7400
ownpal = 1

[State 420, Helper]
type = Helper
trigger1 = AnimElem = 6
stateno = 7401
ownpal = 1

[State 1100, HitDef]
type = HitDef
trigger1 = AnimElem = 3
attr = S, SA
animtype  = Heavy
air.animtype = Back
damage=ceil(ifelse(((ifelse(!var(5),98,ifelse(Var(5)=1,63,70)))*fvar(10))<7,7,((ifelse(!var(5),98,ifelse(Var(5)=1,63,70)))*fvar(10)))),ceil(ifelse((70*fvar(10)/8)<7,7,(70*fvar(10)/8)))
priority = 7, Hit
hitflag = MAF
guardflag = M
pausetime = ceil(13*(2-(var(16)>0))/2),ceil(13*(2-(var(16)>0))/2)
sparkno = S8800+(random%64)
guard.sparkno = S8105
sparkxy = -10, -35
hitsound = S2,12
guardsound = S1,0
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
guard.ctrltime = 20
ground.velocity = -1.5,-10.5
guard.velocity = -8
air.velocity = -1.5,-10.5
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -11.2
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
envshake.time = 10
envshake.ampl = 3
fall = 1
fall.recover = 0
air.fall = 1
yaccel = .5
persistent = 0
getpower = ifelse(var(17),70,143)*(1000+var(24))/1000*!(var(15)||var(16)),35*(1000+var(24))/1000*!(var(15)||var(16))
givepower = 35, 35
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
forcestand = 1
nochainID = var(40)

[State 1100, HitDef]
type = HitDef
triggerall = var(36) != [1,2]
trigger1 = AnimElem = 4
attr = S, SA
animtype  = Heavy
air.animtype = Back
damage=ceil(ifelse((49*fvar(10))<7,7,(49*fvar(10)))),ceil(ifelse((49*fvar(10)/8)<7,7,(49*fvar(10)/8)))
priority = 7, Hit
hitflag = MAF
guardflag = M
pausetime = ceil(13*(2-(var(16)>0))/2),ceil(13*(2-(var(16)>0))/2)
sparkno = S8800+(random%64)
guard.sparkno = S8105
sparkxy = -10, -115
hitsound = S2,12
guardsound = S1,0
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
guard.ctrltime = 20
ground.velocity = -1.5,-10.5
guard.velocity = -8
air.velocity = -1.5,-10.5
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -11.2
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
envshake.time = 10
envshake.ampl = 3
fall = 1
fall.recover = 0
air.fall = 1
yaccel = .5
persistent = 0
getpower = ifelse(var(17),70,143)*(1000+var(24))/1000*!(var(15)||var(16)),35*(1000+var(24))/1000*!(var(15)||var(16))
givepower = 35, 35
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
forcestand = 1
nochainID = var(40)

[State 1100, HitDef]
type = HitDef
triggerall = var(5) || var(36) != [1,2]
trigger1 = AnimElem = 8
attr = A, SA
animtype  = Heavy
air.animtype = Back
damage=ceil(ifelse(((ifelse(var(5),42,63))*fvar(10))<7,7,((ifelse(var(5),42,63))*fvar(10)))),ceil(ifelse(((ifelse(var(5),42,63))*fvar(10)/8)<7,7,((ifelse(var(5),42,63))*fvar(10)/8)))
priority = 7, Hit
hitflag = MAF
guardflag = MA
pausetime = ceil(13*(2-(var(16)>0))/2),ceil(13*(2-(var(16)>0))/2)
sparkno = S8800+(random%64)
guard.sparkno = S8105
sparkxy = -10, -92
hitsound = S2,12
guardsound = S1,0
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
guard.ctrltime = 20
ground.velocity = -1.5,-10.5
guard.velocity = -8
air.velocity = -1.5,-10.5
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -11.2
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
envshake.time = 10
envshake.ampl = 3
fall = 1
fall.recover = 0
air.fall = 1
yaccel = .5
persistent = 0
getpower = ifelse(var(17),70,143)*(1000+var(24))/1000*!(var(15)||var(16)),35*(1000+var(24))/1000*!(var(15)||var(16))
givepower = 35, 35
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
forcestand = 1
nochainID = var(40)

[State 1100, HitDef]
type = HitDef
triggerall = !var(36) = [1,2]
trigger1 = AnimElem = 9
attr = A, SA
animtype  = Heavy
air.animtype = Back
damage=ceil(ifelse((42*fvar(10))<7,7,(42*fvar(10)))),ceil(ifelse((42*fvar(10)/8)<7,7,(42*fvar(10)/8)))
priority = 7, Hit
hitflag = MAF
guardflag = MA
pausetime = ceil(13*(2-(var(16)>0))/2),ceil(13*(2-(var(16)>0))/2)
sparkno = S8800+(random%64)
guard.sparkno = S8105
sparkxy = -10, -135
hitsound = S2,12
guardsound = S1,0
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
guard.ctrltime = 20
ground.velocity = -1.5,-10.5
guard.velocity = -8
air.velocity = -1.5,-10.5
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -11.2
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
envshake.time = 10
envshake.ampl = 3
fall = 1
fall.recover = 0
air.fall = 1
yaccel = .5
persistent = 0
getpower = ifelse(var(17),70,143)*(1000+var(24))/1000*!(var(15)||var(16)),35*(1000+var(24))/1000*!(var(15)||var(16))
givepower = 35, 35
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
forcestand = 1
nochainID = var(40)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(38) = -10

[State 3001, VarSet]
type = VarSet
trigger1 = animelem = 3
ignorehitpause = 1
var(39) = -35

[State 3001, VarSet]
type = VarSet
trigger1 = animelem = 4
ignorehitpause = 1
var(39) = -115

[State 3001, VarSet]
type = VarSet
trigger1 = animelem = 8
ignorehitpause = 1
var(39) = -92

[State 3001, VarSet]
type = VarSet
trigger1 = animelem = 9
ignorehitpause = 1
var(39) = -135

[State 1100, ChangeState]
type = ChangeState
triggerall = Pos Y >= 0 && Vel Y > 0
trigger1 = AnimElemTime(8) > 0
value = 1105

;---------------------------------------------------------------------------
;奥義　弧月斬（着地）
[Statedef 1105]
type    = S
physics = S
ctrl = 0
anim = 1105
velset = 0,0

[State 1000, Spark]
type = Explod
trigger1 = Time = 1
Anim = 8030
pos = 0, 0
postype = p1
ownpal = 1
sprpriority = -3
;pausemovetime = -1
supermovetime = -1
scale = .5,.5

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

[State 52, Effect]
type = PlaySnd
trigger1 = Time = 0
value = 52, 0
channel = 20

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

;---------------------------------------------------------------------------
;奥義　弧月斬（エフェクト）1
[Statedef 7400]
type = S
movetype = I
physics = N
anim = 7400
ctrl = 0
sprpriority = 5

[State 7000, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 1000, 0]
type = BindToRoot
trigger1 = 1
pos = 0,0

[State 0]
type = changeanim
trigger1 = parent,stateno = 1100 & parent,animelemtime(2) >= 0
trigger1 = parent,stateno = 1100 & parent,animelemtime(3) < 0
value = anim
elem = 1
persistent = 1

[State 0]
type = changeanim
trigger1 = parent,stateno = 1100 & parent,animelemtime(3) >= 0
trigger1 = parent,stateno = 1100 & parent,animelemtime(4) < 0
value = anim
elem = 2
persistent = 1

[State 0]
type = changeanim
trigger1 = parent,stateno = 1100 & parent,animelemtime(4) >= 0
trigger1 = parent,stateno = 1100 & parent,animelemtime(5) < 0
value = anim
elem = 3
persistent = 1

[State 0]
type = changeanim
trigger1 = parent,stateno = 1100 & parent,animelemtime(5) >= 0
trigger1 = parent,stateno = 1100 & parent,animelemtime(6) < 0
value = anim
elem = 4
persistent = 1

[State 0]
type = changeanim
trigger1 = parent,stateno = 1100 & parent,animelemtime(6) >= 0
trigger1 = parent,stateno = 1100 & parent,animelemtime(7) < 0
value = anim
elem = 5
persistent = 1

[State 0]
type = changeanim
trigger1 = parent,stateno = 1100 & parent,animelemtime(7) >= 0
trigger1 = parent,stateno = 1100 & parent,animelemtime(8) < 0
value = anim
elem = 6
persistent = 1

[State 7000, End]
type = DestroySelf
trigger1 = parent,stateno = 1100 & parent,animelemtime(8) = 0
trigger2 = parent,time = 1

;---------------------------------------------------------------------------
;奥義　弧月斬（エフェクト）2
[Statedef 7401]
type = S
movetype = I
physics = N
anim = 7401
ctrl = 0
velse = 0,0
sprpriority = 5

[State 7000, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 7000, End]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = parent,time = 1

;------------------------------------------------------------------------------------------
;奥義　烈震斬
[Statedef 1200]
type    = S
movetype = A
physics = S
juggle = 8
ctrl = 0
poweradd = 70*(1000+var(24))/1000*!(var(15)||var(16))
velset = 0,0

[State 3001, Width]
type = Width
trigger1 = 1
edge = 5,0

[State 1100, VarSet]
type = VarSet
triggerall = !var(59)
trigger1 = Time = 0
var(5) = ifelse(Command = "烈震斬1", 0, ifelse(Command = "烈震斬2", 1, 2))

[State 1000, VarSet]
type = VarSet
triggerall = !var(59)
triggerall = fvar(29)
trigger1 = Time = 0
var(5) = ifelse((ceil(fvar(29))&2**14),0,ifelse((ceil(fvar(29))&2**15),1,2))

[State 1000, VarSet]
type = VarSet
triggerall = var(59)
trigger1 = Time = 0
var(5) = random%2

[State 1000, ChangeAnim]
type = ChangeAnim
Trigger1 = Time = 0
value = ifelse(!var(5), 1200, ifelse(var(5) = 1, 1210, 1220))

[State 220, Position]
type = PosSet
trigger1 = Time = 0
y = 0

[State 1100, Voice]
type = PlaySnd
trigger1 = AnimElem = 8
value = 1200,0
channel = 0

[State 52, Effect]
type = PlaySnd
trigger1 = AnimElem = 2
value = 40, 1

[State 52, Effect]
type = PlaySnd
trigger1 = AnimElem = 3
value = 100, 0

[State 1100, StateType]
type = StateTypeSet
trigger1 = AnimElem = 3
StateType = A
physics = N

[State 1100, Velocity]
type = VelSet
trigger1 = AnimElem = 3
x = 3.5+(var(5)*1.5)
y = -4-var(5)

[State 1100, Gravity]
type = Veladd
trigger1 = AnimElemTime(3) > 0
y = .55

[State 1100, ChangeState]
type = ChangeState
triggerall = Pos Y >= 0 && Vel Y > 0
trigger1 = AnimElemTime(3) > 0
value = 1201

;---------------------------------------------------------------------------
;奥義　烈震斬（攻撃）
[Statedef 1201]
type    = S
movetype = A
physics = S
juggle = 8
ctrl = 0
anim = 1201
velset = 0,0

[State 3001, Width]
type = Width
trigger1 = time = 0
edge = 40,0

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 5
movetype = I

[State 1000, Spark]
type = Explod
trigger1 = Time = 0
Anim = 8030
pos = 0, 0
postype = p1
ownpal = 1
sprpriority = -3
;pausemovetime = -1
supermovetime = -1
scale = .5,.5

[State 1000, Spark]
type = Explod
trigger1 = Time = 0
Anim = 7500
pos = 55, 0
postype = p1
ownpal = 1
bindtime = 1
sprpriority = 3

[State 1000, Spark]
type = Explod
trigger1 = Time = 0
Anim = 7501
pos = 55, 0
postype = p1
ownpal = 1
bindtime = 1
sprpriority = 3

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

[State 52, Effect]
type = PlaySnd
trigger1 = Time = 0
value = 1200, 1

[State 903, EnvShake]
type = EnvShake
trigger1 = Time = 0
time = 20
ampl = 5

[State 1100, HitDef]
type = HitDef
trigger1 = time = 1
attr = S, SA
animtype  = Heavy
air.animtype = Back
damage=ceil(ifelse(((84+(var(5)*7))*fvar(10))<7,7,((84+(var(5)*7))*fvar(10)))),ceil(ifelse(((84+(var(5)*7))*fvar(10)/8)<7,7,((84+(var(5)*7))*fvar(10)/8)))
priority = 7, Hit
hitflag = MAF
guardflag = H
pausetime = ceil(13*(2-(var(16)>0))/2),ceil(13*(2-(var(16)>0))/2)
sparkno = S8800+(random%64)
guard.sparkno = S8105
sparkxy = -20, -5
hitsound = S2,12
guardsound = S1,0
ground.type = Trip
ground.slidetime = 20
ground.hittime  = 20
guard.ctrltime = 20
ground.velocity = -1.5,10
guard.velocity = -8
air.velocity = -1.5,10
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = -11.2
envshake.time = 20
envshake.ampl = 5
fall = 1
fall.recover = 0
air.fall = 1
yaccel = .5
persistent = 0
getpower = ifelse(var(17),70,143)*(1000+var(24))/1000*!(var(15)||var(16)),35*(1000+var(24))/1000*!(var(15)||var(16))
givepower = 35, 35
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
forcestand = 1
nochainID = var(40)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(38) = -20

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(39) = -5

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

;------------------------------------------------------------------------------------------
;剛破
[Statedef 1300]
type    = S
movetype = A
physics = N
juggle = 8
ctrl = 0
poweradd = 70*(1000+var(24))/1000*!(var(15)||var(16))
velset = 0,0

[State 3001, Width]
type = Width
trigger1 = 1
edge = 5,0

[State 1100, VarSet]
type = VarSet
triggerall = !var(59)
trigger1 = Time = 0
var(5) = ifelse(Command = "剛破1", 0, ifelse(Command = "剛破2", 1, 2))

[State 1000, VarSet]
type = VarSet
triggerall = !var(59)
triggerall = fvar(29)
trigger1 = Time = 0
var(5) = ifelse((ceil(fvar(29))&2**17),0,ifelse((ceil(fvar(29))&2**18),1,2))

[State 1000, VarSet]
type = VarSet
triggerall = var(59)
trigger1 = Time = 0
var(5) = random%2

[State 1000, VarSet]
type = VarSet
triggerall = var(59)
trigger1 = enemynear,movetype = H
trigger1 = Time = 0
var(5) = 1

[State 902, 1]
type = ChangeAnim
Trigger1 = Time = 0
value = ifelse(!var(5), 1300, ifelse(var(5) = 1, 1310, 1320))

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 5
movetype = I

[State 220, Position]
type = PosSet
trigger1 = Time = 0
y = 0

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3
x = 8

[State 1100, Voice]
type = PlaySnd
trigger1 = AnimElem = 3
value = 1300,10
channel = 0

[State 52, Effect]
type = PlaySnd
trigger1 = AnimElem = 3
value = 100, 10

[State 1100, Velocity]
type = VelSet
trigger1 = AnimElem = 3
x = 10+(var(5)*2)

[State 1100, Velocity]
type = VelSet
trigger1 = AnimElem = 6
x = 0

[State 1100, Gravity]
type = VelMul
trigger1 = AnimElemTime(3) > 0
x = .92

[State 1100, HitDef]
type = HitDef
trigger1 = AnimElem = 4
attr = S, SA
animtype  = Heavy
air.animtype = Back
damage=ceil(ifelse(((49+(var(5)*7))*fvar(10))<7,7,((49+(var(5)*7))*fvar(10)))),ceil(ifelse(((49+(var(5)*7))*fvar(10)/8)<7,7,((49+(var(5)*7))*fvar(10)/8)))
priority = 7, Hit
hitflag = MAF
guardflag = M
pausetime = ceil(13*(2-(var(16)>0))/2),ceil(13*(2-(var(16)>0))/2)
sparkno = S8210+(random%8)
guard.sparkno = S8105
sparkxy = -10, -35
hitsound = S2,2
guardsound = S1,0
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
guard.ctrltime = 20
ground.velocity = -2.5,-9
guard.velocity = -8
air.velocity = -2.5,-9
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -11.2
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
envshake.time = 15
envshake.ampl = 5
fall = 1
fall.recover = 0
air.fall = 1
yaccel = .5
persistent = 0
getpower = ifelse(var(17),70,143)*(1000+var(24))/1000*!(var(15)||var(16)),35*(1000+var(24))/1000*!(var(15)||var(16))
givepower = 35, 35
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
forcestand = 1
nochainID = var(40)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(38) = -10

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(39) = -35

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

;---------------------------------------------------------------------------
;旋風波
[Statedef 1400]
type = S
movetype = A
physics = S
poweradd = 70*(1000+var(24))/1000*!(var(15)||var(16))
velset = 0,0
ctrl = 0

[State 1000, Position]
type = PosSet
trigger1 = AnimElem = 1
y = 0

[State 1000, VarSet]
type = VarSet
triggerall = !var(59)
trigger1 = Time = 0
var(5) = ifelse(Command = "旋風波1", 0, ifelse(Command = "旋風波2", 1, 2))

[State 1000, VarSet]
type = VarSet
triggerall = !var(59)
triggerall = fvar(29)
trigger1 = Time = 0
var(5) = ifelse((ceil(fvar(29))&2**8),0,ifelse((ceil(fvar(29))&2**9),1,2))

[State 1000, VarSet]
type = VarSet
triggerall = var(59)
trigger1 = Time = 0
var(5) = ifelse(numtarget,random%2,random%3)

[State 1000, ChangeAnim]
type = ChangeAnim
Trigger1 = Time = 0
value = ifelse(!var(5), 1400, ifelse(var(5) = 1, 1410, 1420))

[State 1000, Voice]
type = PlaySnd
trigger1 = AnimElem = 6
value = 1400, 10
channel = 0

[State 1000, Voice]
type = PlaySnd
trigger1 = AnimElem = 5
value = 3, 12

[State 1000, Voice]
type = PlaySnd
trigger1 = AnimElem = 6
value = 1400, 0

[State 420, Helper]
type = Helper
trigger1 = AnimElem = 5
stateno = 7440
ownpal = 1

[State 1000,Super]
type = Helper
trigger1 = AnimElem = 6
id = 7600
name = "senpuha"
pos = 50,0
postype = P1
stateno = 7600
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1

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

;---------------------------------------------------------------------------
;旋風波（飛び道具）
[Statedef 7600]
type = S
movetype = I
physics = N
ctrl = 0
velset = 0,0
anim = 6900
sprpriority = 4

[State 3001, VarSet]
type = VarSet
trigger1 = time = 0
ignorehitpause = 1
var(5) = parent,var(5)

[State 3001, VarSet]
type = VarSet
trigger1 = time = 0
ignorehitpause = 1
var(12) = parent,var(12)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(15) = parent,var(15)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(16) = parent,var(16)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(17) = parent,var(17)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(24) = parent,var(24)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(41) = parent,var(41)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
fvar(10) = parent,fvar(10)

[State 1100, Velocity]
type = PosAdd
trigger1 = time = 2
trigger2 = time = 6
trigger3 = time = 10
x = 10*(var(5)+1)

[State 1000, Spark]
type = Explod
trigger1 = Time = 0
Anim = 7600
pos = 0, 5
postype = p1
ownpal = 1
bindtime = 1
sprpriority = 3
scale = .5,.5

[State 1000, Spark]
type = Explod
trigger1 = Time = 4
Anim = 7600
pos = 0, 0
postype = p1
ownpal = 1
bindtime = 1
sprpriority = 3
scale = .5,.5

[State 1000, Spark]
type = Explod
trigger1 = Time = 8
Anim = 7600
pos = 0, -5
postype = p1
ownpal = 1
bindtime = 1
sprpriority = 3
scale = .5,.5

[State -3, Blocking5]
type = ParentVarAdd
trigger1 = root,projhittime(1405) = 1
fvar(26) = 1
persistent = 0

[State -3, Blocking5]
type = VarSet
trigger1 = root,projhittime(1405) = 1
var(4) = 1
persistent = 0

[State 1000, Proj]
type = Projectile
trigger1 = time = 2
trigger2 = time = 6
trigger3 = time = 10
projanim = 7650
Projhitanim = -1
Projremanim = -1
projcancelanim = -1
Projremovetime = 4
offset = 0, 0
projpriority = 1
projsprpriority = 4
velocity = vel X, vel Y
attr = S, SP
damage=ceil(ifelse((14*fvar(10))<7,7,(14*fvar(10)))),ceil(ifelse((14*fvar(10)/8)<7,7,(14*fvar(10)/8)))
animtype = Heavy
air.animtype = Back
hitflag = MAF
guardflag = MA
pausetime = 4,ceil(9*(2-parent,var(18))/2)
sparkno = S8210+(random%8)
guard.sparkno = S8105
sparkxy = 0, -15
hitsound = S2,15
guardsound = S1,1
ground.type = Low
ground.slidetime = 18
ground.hittime = 18
air.hittime = 18
guard.ctrltime = 18
ground.velocity = -8,0
guard.velocity = -8
air.velocity = -4.5, -6
airguard.velocity = -5.33,-1
fall = 0
fall.recover = 0
air.fall = 1
yaccel = .49
air.juggle = ifelse(root,var(45)||root,var(22)=-1||root,var(23)=1,0,8)
envshake.time = 8
envshake.ampl = 2
ProjID = 1405
getpower = ifelse(var(17),70,143)*(1000+var(24))/1000*!(var(15)||var(16)),35*(1000+var(24))/1000*!(var(15)||var(16))
givepower = 35, 35
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
forcestand = 1
nochainID = root,var(40)

[State -3, Blocking5]
type = helper
triggerall = root,fvar(8) = 1 || root,fvar(8) = -2
trigger1 = root,projhittime(1405) = 1
id = 8130
name = "COUNTER HIT EFFECT"
pos = 0,-15
postype = P1
stateno = 8130
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 99999
supermovetime = 99999
size.xscale = 1
size.yscale = 1

[State 4110, DestroySelf]
type = DestroySelf
triggerall = time > 11
trigger1 = !root,NumProjID(1405)

;---------------------------------------------------------------------------
;旋風波（エフェクト）1
[Statedef 7440]
type = S
movetype = I
physics = N
anim = 7400
ctrl = 0
sprpriority = 5

[State 7000, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 1000, 0]
type = BindToRoot
trigger1 = 1
pos = 0,0

[State 0]
type = changeanim
trigger1 = parent,stateno = 1400 & parent,animelemtime(5) >= 0
trigger1 = parent,stateno = 1400 & parent,animelemtime(6) < 0
value = anim
elem = 1
persistent = 1

[State 0]
type = changeanim
trigger1 = parent,stateno = 1400 & parent,animelemtime(6) >= 0
trigger1 = parent,stateno = 1400 & parent,animelemtime(7) < 0
value = anim
elem = 2
persistent = 1

[State 7000, End]
type = DestroySelf
trigger1 = parent,stateno = 1400 & parent,animelemtime(7) = 0
trigger2 = parent,time = 1
trigger3 = root,movetype = H

;---------------------------------------------------------------------------
;凪刃
[Statedef 1500]
type = S
movetype = A
physics = S
poweradd = 70*(1000+var(24))/1000*!(var(15)||var(16))
velset = 0,0
ctrl = 0

[State 1000, Position]
type = PosSet
trigger1 = AnimElem = 1
y = 0

[State 1100, VarSet]
type = VarSet
triggerall = !var(59)
trigger1 = Time = 0
var(5) = ifelse(Command = "弧月斬1", 0, ifelse(Command = "弧月斬2", 1, 2))

[State 1000, VarSet]
type = VarSet
triggerall = !var(59)
triggerall = fvar(29)
trigger1 = Time = 0
var(5) = ifelse((ceil(fvar(29))&2**20),0,ifelse((ceil(fvar(29))&2**21),1,2))

[State 1000, VarSet]
type = VarSet
triggerall = var(59)
trigger1 = Time = 0
var(5) = random%3

[State 1000, ChangeAnim]
type = ChangeAnim
Trigger1 = Time = 0
value = ifelse(!var(5), 1500, ifelse(var(5) = 1, 1510, 1520))

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 3
movetype = I

[State 1000, Voice]
type = PlaySnd
trigger1 = AnimElem = 1
value = 1500, 10
channel = 0

[State 1000, Voice]
type = PlaySnd
trigger1 = AnimElem = 2
value = 3, 0

[State 1000, ChangeState]
type = ChangeState
trigger1 = animelemtime(2) >= 0
trigger1 = animelemtime(3) < 0
trigger1 = p2bodydist x < 50
trigger1 = abs(p2bodydist y) < 30
value = 1501

[State 1035, 2]
type = ReversalDef
trigger1 = animelemtime(2) >= 0
trigger1 = animelemtime(3) < 0
attr = S, SA
reversal.attr = SCA, NA, SA, HA
guard.dist = 0
pausetime = 0,0
sparkno = -1
p1stateno = 1501

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

;------------------------------------------------------------------------------------------
;凪刃（攻撃）
[Statedef 1501]
type    = S
movetype = A
physics = S
juggle = 8
ctrl = 0
velset = 0,0

[State 3001, Width]
type = Width
trigger1 = 1
edge = 5,0

[State 902, 1]
type = ChangeAnim
Trigger1 = Time = 0
value = 1501

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 7
movetype = I

[State 220, Position]
type = PosSet
trigger1 = Time = 0
y = 0

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

[State 52, Effect]
type = PlaySnd
trigger1 = AnimElem = 1
value = 3, 12

[State 52, Effect]
type = PlaySnd
trigger1 = AnimElem = 3
value = 1100, 1

[State 1100, StateType]
type = StateTypeSet
trigger1 = AnimElem = 5
StateType = A
physics = N

[State 1100, Velocity]
type = VelSet
trigger1 = AnimElem = 5
y = -4-(var(5)*.5)

[State 1100, Gravity]
type = Veladd
trigger1 = AnimElemTime(5) > 0
y = .4

[State 420, Helper]
type = Helper
trigger1 = AnimElem = 3
stateno = 7401
ownpal = 1

[State 1100, HitDef]
type = HitDef
trigger1 = AnimElem = 4
attr = S, SA
animtype  = Heavy
air.animtype = Back
damage=ceil(ifelse(((49+(var(5)*7))*fvar(10))<7,7,((49+(var(5)*7))*fvar(10)))),ceil(ifelse(((49+(var(5)*7))*fvar(10)/8)<7,7,((49+(var(5)*7))*fvar(10)/8)))
priority = 7, Hit
hitflag = MAF
guardflag = M
pausetime = ceil(8*(2-(var(16)>0))/2),ceil(9*(2-(var(16)>0))/2)
sparkno = S8800+(random%64)
guard.sparkno = S8105
sparkxy = -10, -45
hitsound = S2,12
guardsound = S1,0
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
guard.ctrltime = 20
ground.velocity = -1.5,-10.5
guard.velocity = -8
air.velocity = -1.5,-10.5
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -11.2
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
envshake.time = 10
envshake.ampl = 3
fall = 1
fall.recover = 0
air.fall = 1
yaccel = .5
persistent = 0
getpower = ifelse(var(17),70,143)*(1000+var(24))/1000*!(var(15)||var(16)),35*(1000+var(24))/1000*!(var(15)||var(16))
givepower = 35, 35
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
forcestand = 1
nochainID = var(40)

[State 1100, HitDef]
type = HitDef
trigger1 = AnimElem = 5
attr = A, SA
animtype  = Heavy
air.animtype = Back
damage=ceil(ifelse((21*fvar(10))<7,7,(21*fvar(10)))),ceil(ifelse((21*fvar(10)/8)<7,7,(21*fvar(10)/8)))
priority = 7, Hit
hitflag = MAF
guardflag = MA
pausetime = ceil(8*(2-(var(16)>0))/2),ceil(9*(2-(var(16)>0))/2)
sparkno = S8800+(random%64)
guard.sparkno = S8105
sparkxy = -10, -95
hitsound = S2,12
guardsound = S1,0
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
guard.ctrltime = 20
ground.velocity = -1.5,-10.5
guard.velocity = -8
air.velocity = -1.5,-10.5
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -11.2
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
envshake.time = 10
envshake.ampl = 3
fall = 1
fall.recover = 0
air.fall = 1
yaccel = .5
persistent = 0
getpower = ifelse(var(17),70,143)*(1000+var(24))/1000*!(var(15)||var(16)),35*(1000+var(24))/1000*!(var(15)||var(16))
givepower = 35, 35
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
forcestand = 1
nochainID = var(40)

[State 1100, HitDef]
type = HitDef
trigger1 = AnimElem = 6
attr = A, SA
animtype  = Heavy
air.animtype = Back
damage=ceil(ifelse((14*fvar(10))<7,7,(14*fvar(10)))),ceil(ifelse((14*fvar(10)/8)<7,7,(14*fvar(10)/8)))
priority = 7, Hit
hitflag = MAF
guardflag = MA
pausetime = ceil(8*(2-(var(16)>0))/2),ceil(9*(2-(var(16)>0))/2)
sparkno = S8800+(random%64)
guard.sparkno = S8105
sparkxy = -10, -95
hitsound = S2,12
guardsound = S1,0
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
guard.ctrltime = 20
ground.velocity = -1.5,-10.5
guard.velocity = -8
air.velocity = -1.5,-10.5
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -11.2
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
envshake.time = 10
envshake.ampl = 3
fall = 1
fall.recover = 0
air.fall = 1
yaccel = .5
persistent = 0
getpower = ifelse(var(17),70,143)*(1000+var(24))/1000*!(var(15)||var(16)),35*(1000+var(24))/1000*!(var(15)||var(16))
givepower = 35, 35
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
forcestand = 1
nochainID = var(40)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(38) = -10

[State 3001, VarSet]
type = VarSet
trigger1 = animelem = 4
ignorehitpause = 1
var(39) = -45

[State 3001, VarSet]
type = VarSet
trigger1 = animelem = 5
ignorehitpause = 1
var(39) = -95

[State 1100, ChangeState]
type = ChangeState
triggerall = Pos Y >= 0 && Vel Y > 0
trigger1 = AnimElemTime(5) > 0
value = 1105

;---------------------------------------------------------------------------
;死祟
[Statedef 1600]
type = S
movetype = A
physics = S
anim = 1600
velset = 0,0
ctrl = 0

[State 1000, Position]
type = PosSet
trigger1 = AnimElem = 1
y = 0

[State 1000, Voice]
type = PlaySnd
trigger1 = AnimElem = 3
value = 183, 12
channel = 0

[State 1000, Voice]
type = PlaySnd
trigger1 = AnimElem = 3
value = 2, 12

[State 1000, Spark]
type = Explod
trigger1 = AnimElem = 3
Anim = 7800
pos = 0, 0
postype = p1
ownpal = 1
bindtime = 1
sprpriority = 3

[State 901, Hurt]
type = LifeAdd
trigger1 = AnimElem = 3
value = -250
kill = 0

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

;------------------------------------------------------------------------------------------
;斬鋼閃
[Statedef 1700]
type    = S
movetype = A
physics = N
juggle = 8
ctrl = 0
velset = 0,0
anim = 1700
poweradd = 70*(1000+var(24))/1000*!(var(15)||var(16))

[State 220, Position]
type = PosSet
trigger1 = Time = 0
y = 0

[State 0]
type = changeanim
triggerall = var(2)
trigger1 = AnimElemTime(16) = 0
value = anim
elem = 15
persistent = 1

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 14
movetype = I

[State 3001, Width]
type = Width
trigger1 = AnimElem = 10
trigger2 = AnimElem = 11
trigger3 = AnimElem = 13
player = 9,0

[State 3001, Width]
type = Width
trigger1 = animelem = 18
player = 0,3

[State 3001, Width]
type = Width
trigger1 = animelem = 19
player = 0,9

[State 3001, Width]
type = Width
trigger1 = animelem = 21
player = 0,15

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 10
trigger2 = AnimElem = 11
trigger3 = AnimElem = 13
x = 24

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 12
x = 12

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 18
x = -18

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 19
x = -24

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 20
x = -12

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 21
x = -30

[State 1100, Voice]
type = PlaySnd
trigger1 = AnimElem = 1
value = 0,0
channel = 0

[State 1100, Voice]
type = PlaySnd
trigger1 = AnimElem = 12
value = 1200,0
channel = 0

[State 1100, Voice]
type = PlaySnd
trigger1 = AnimElem = 7
value = 1100,1

[State 1100, Voice]
type = PlaySnd
trigger1 = AnimElem = 12
value = 3,12

[State 52, Effect]
type = PlaySnd
trigger1 = animelemtime(11) = 4
value = 3200, 2

[State 52, Effect]
type = PlaySnd
triggerall = var(36) = 1 && !var(2)
trigger1 = AnimElem = 16
value = 3200, 3

[State 1000, Spark]
type = Explod
trigger1 = AnimElem = 13
Anim = 7750
pos = 0, 0
postype = p1
ownpal = 1
bindtime = -1
sprpriority = 3
removeongethit = 1

[State 1000, Spark]
type = Explod
trigger1 = AnimElem = 7
Anim = 7751
pos = 0, 0
postype = p1
ownpal = 1
bindtime = -1
sprpriority = -1
removeongethit = 1

[State 1100, HitDef]
type = HitDef
trigger1 = AnimElem = 13
attr = S, SA
animtype  = Heavy
air.animtype = diugup
damage=120,20
priority = 7, Hit
hitflag = MAF
guardflag = M
pausetime = 0,17
sparkno = S8900+(random%64)
guard.sparkno = S8105
sparkxy = -30, -45
hitsound = S2,12
guardsound = S1,0
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
guard.ctrltime = 20
ground.velocity = -15,-7.5
guard.velocity = -8
air.velocity = -15,-7.5
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
envshake.time = 25
envshake.ampl = 8
fall = 1
fall.recover = 0
air.fall = 1
yaccel = .5
persistent = 1
getpower = ifelse(var(17),70,143)*(1000+var(24))/1000*!(var(15)||var(16)),35*(1000+var(24))/1000*!(var(15)||var(16))
givepower = 35, 35
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
forcestand = 1
nochainID = var(40)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(38) = -30

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(39) = -45

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

;------------------------------------------------------------------------------------------
;酒攻撃
[Statedef 1800]
type    = S
movetype = A
physics = N
juggle = 8
ctrl = 0
velset = 0,0
anim = 1800
poweradd = 70*(1000+var(24))/1000*!(var(15)||var(16))

[State 220, Position]
type = PosSet
trigger1 = Time = 0
y = 0

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 9
movetype = I

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 3
trigger2 = AnimElem = 4
trigger3 = AnimElem = 7
x = 8

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 10
trigger2 = AnimElem = 11
trigger3 = AnimElem = 12
x = -8

[State 1100, Voice]
type = PlaySnd
trigger1 = AnimElem = 6
value = 800,0
channel = 0

[State 1100, Voice]
type = PlaySnd
trigger1 = AnimElem = 6
value = 3,5

[State 1100, HitDef]
type = HitDef
trigger1 = AnimElem = 7
attr = S, SA
animtype = Heavy
air.animtype = Back
damage=ceil(ifelse((77*fvar(10))<7,7,(77*fvar(10)))),ceil(ifelse((77*fvar(10)/8)<7,7,(77*fvar(10)/8)))
priority  = 7, Hit
hitflag = MAFP
guardflag = M
pausetime = ceil(13*(2-(var(16)>0))/2),ceil(13*(2-(var(16)>0))/2)
sparkno = S8210+(random%8)
guard.sparkno = S8105
sparkxy = -20, -55
hitsound = S2,2
guardsound = S1,0
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
guard.ctrltime = 20
ground.velocity = -6,-7.5
guard.velocity = -8
air.velocity = -6,-7.5
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -11.2
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
envshake.time = 10
envshake.ampl = 3
fall = 1
fall.recover = 0
air.fall = 1
yaccel = .49
persistent = 0
getpower = ifelse(var(17),70,143)*(1000+var(24))/1000*!(var(15)||var(16)),35*(1000+var(24))/1000*!(var(15)||var(16))
givepower = 35, 35
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
forcestand = 1
nochainID = var(40)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(38) = -20

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(39) = -55

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

;------------------------------------------------------------------------------------------
;ガードキャンセル攻撃（修羅）
[Statedef 2800]
type    = S
movetype = A
physics = N
juggle = 8
ctrl = 0
velset = 0,0

[State 180, 1]
type = VarAdd
trigger1 = time = 0
var(50)=1000
ignorehitpause = 1

[State 860, 4]
type = PowerAdd
triggerall = !var(20) || var(20) = 4 || var(20) = 6
trigger1 = time = 0
value = -1000

[State 860, 4]
type = PowerAdd
triggerall = var(20) = 1
trigger1 = time = 0
value = -1500

[State 860, 4]
type = VarSet
triggerall = var(20) = 3
trigger1 = time = 0
var(14) = 0

[State 860, 4]
type = PowerAdd
triggerall = var(20) = 3
trigger1 = time = 0
value = -3000

[State 902, Shock]
type = PalFX
trigger1 = Time = 0
time = 2
invertall = 1
mul = 0,0,0

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

[State 1100, Effect]
type = PlaySnd
trigger1 = Time = 1
value = 810,0
channel = 1

[State -3,Super]
type = Helper
trigger1 = Time = 0
id = 8070
name = "GUARD CANCEL"
pos = 10,-ifelse(PrevStateNo = 152,40,80)
postype = P1
stateno = 8070
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 7
supermovetime = 99999999999999
persistent = 0
size.xscale = 1
size.yscale = 1

[State 0]
type = pause
trigger1 = time = 1
time = 6
movetime = 6

[State 220, Position]
type = PosSet
trigger1 = Time = 0
y = 0

[State 3001, Width]
type = Width
trigger1 = 1
edge = 1,0
player = 5,5

[State 190, 4]
type = ChangeAnim
trigger1 = time <= 12
value = anim

[State 190, 4]
type = ChangeAnim
trigger1 = time = 13
value = 2800

[State 105, 1]
type = statetypeset
triggerall = anim = 2800
trigger1 = AnimElem = 10
movetype = I

[State 1100, Voice]
type = PlaySnd
triggerall = anim = 2800
trigger1 = AnimElem = 1
value = 1100,0
channel = 0

[State 52, Effect]
type = PlaySnd
triggerall = anim = 2800
trigger1 = AnimElem = 2
value = 3, 12

[State 52, Effect]
type = PlaySnd
triggerall = anim = 2800
trigger1 = AnimElem = 3
value = 1100, 1

[State 52, Effect]
type = PlaySnd
triggerall = anim = 2800
trigger1 = AnimElem = 8
value = 40, 1

[State 1100, StateType]
type = StateTypeSet
triggerall = anim = 2800
trigger1 = AnimElem = 8
StateType = A
physics = N

[State 1100, Velocity]
type = VelSet
triggerall = anim = 2800
trigger1 = AnimElem = 1
x = 1

[State 1100, Velocity]
type = VelSet
triggerall = anim = 2800
trigger1 = AnimElem = 8
x = 6.5
y = -11

[State 1100, Gravity]
type = VelMul
triggerall = anim = 2800
trigger1 = AnimElemTime(8) > 0
x = .8

[State 1100, Gravity]
type = Veladd
triggerall = anim = 2800
trigger1 = AnimElemTime(8) > 0
y = .55

[State 3001, Super]
type = Helper
triggerall = anim = 2800
trigger1 = AnimElem = 8
id = 8020
name = "jump Effect"
pos = 0,0
postype = P1
stateno = 8020
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
;pausemovetime = 99999999999999
supermovetime = 99999999999999

[State 420, Helper]
type = Helper
triggerall = anim = 2800
trigger1 = AnimElem = 2
stateno = 7410
ownpal = 1

[State 420, Helper]
type = Helper
triggerall = anim = 2800
trigger1 = AnimElem = 6
stateno = 7401
ownpal = 1

[State 1100, HitDef]
type = HitDef
triggerall = anim = 2800
trigger1 = AnimElem = 3
attr = S, SA
animtype  = Heavy
air.animtype = diugup
damage=ceil(ifelse((28*fvar(10))<7,7,(28*fvar(10)))),ceil(ifelse((28*fvar(10)/8)<7,7,(28*fvar(10)/8)))
priority = 7, Hit
hitflag = MAF
guardflag = M
pausetime = ceil(13*(2-(var(16)>0))/2),ceil(13*(2-(var(16)>0))/2)
sparkno = S8800+(random%64)
guard.sparkno = S8105
sparkxy = -10, -35
hitsound = S2,12
guardsound = S1,0
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
guard.ctrltime = 20
ground.velocity = -1.5,-10.5
guard.velocity = -8
air.velocity = -1.5,-10.5
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -11.2
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
envshake.time = 10
envshake.ampl = 3
fall = 1
fall.recover = 0
air.fall = 1
yaccel = .5
persistent = 0
getpower = 0,0
givepower = 35, 35
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
forcestand = 1
kill = 0
nochainID = var(40)

[State 1100, HitDef]
type = HitDef
triggerall = anim = 2800
triggerall = var(36) != [1,2]
trigger1 = AnimElem = 4
attr = S, SA
animtype = Heavy
air.animtype = diugup
damage=ceil(ifelse((28*fvar(10))<7,7,(28*fvar(10)))),ceil(ifelse((28*fvar(10)/8)<7,7,(28*fvar(10)/8)))
priority = 7, Hit
hitflag = MAF
guardflag = M
pausetime = ceil(13*(2-(var(16)>0))/2),ceil(13*(2-(var(16)>0))/2)
sparkno = S8800+(random%64)
guard.sparkno = S8105
sparkxy = -10, -115
hitsound = S2,12
guardsound = S1,0
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
guard.ctrltime = 20
ground.velocity = -1.5,-10.5
guard.velocity = -8
air.velocity = -1.5,-10.5
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -11.2
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
envshake.time = 10
envshake.ampl = 3
fall = 1
fall.recover = 0
air.fall = 1
yaccel = .5
persistent = 0
getpower = 0,0
givepower = 35, 35
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
forcestand = 1
kill = 0
nochainID = var(40)

[State 1100, HitDef]
type = HitDef
triggerall = anim = 2800
trigger1 = AnimElem = 8
attr = A, SA
animtype = Heavy
air.animtype = diugup
damage=ceil(ifelse((14*fvar(10))<7,7,(14*fvar(10)))),ceil(ifelse((14*fvar(10)/8)<7,7,(14*fvar(10)/8)))
priority = 7, Hit
hitflag = MAF
guardflag = MA
pausetime = ceil(13*(2-(var(16)>0))/2),ceil(13*(2-(var(16)>0))/2)
sparkno = S8800+(random%64)
guard.sparkno = S8105
sparkxy = -10, -92
hitsound = S2,12
guardsound = S1,0
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
guard.ctrltime = 20
ground.velocity = -1.5,-10.5
guard.velocity = -8
air.velocity = -1.5,-10.5
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -11.2
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
envshake.time = 10
envshake.ampl = 3
fall = 1
fall.recover = 0
air.fall = 1
yaccel = .5
persistent = 0
getpower = 0,0
givepower = 35, 35
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
forcestand = 1
kill = 0
nochainID = var(40)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(38) = -10

[State 3001, VarSet]
type = VarSet
triggerall = anim = 2800
trigger1 = animelem = 3
ignorehitpause = 1
var(39) = -35

[State 3001, VarSet]
type = VarSet
triggerall = anim = 2800
trigger1 = animelem = 4
ignorehitpause = 1
var(39) = -115

[State 3001, VarSet]
type = VarSet
triggerall = anim = 2800
trigger1 = animelem = 8
ignorehitpause = 1
var(39) = -92

[State 1100, ChangeState]
type = ChangeState
triggerall = anim = 2800
triggerall = Pos Y >= 0 && Vel Y > 0
trigger1 = AnimElemTime(8) > 0
value = 1105

;---------------------------------------------------------------------------
;ガードキャンセル攻撃（エフェクト）1
[Statedef 7410]
type = S
movetype = I
physics = N
anim = 7400
ctrl = 0
sprpriority = 5

[State 7000, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 1000, 0]
type = BindToRoot
trigger1 = 1
pos = 0,0

[State 0]
type = changeanim
trigger1 = parent,stateno = 2800 & parent,animelemtime(2) >= 0
trigger1 = parent,stateno = 2800 & parent,animelemtime(3) < 0
value = anim
elem = 1
persistent = 1

[State 0]
type = changeanim
trigger1 = parent,stateno = 2800 & parent,animelemtime(3) >= 0
trigger1 = parent,stateno = 2800 & parent,animelemtime(4) < 0
value = anim
elem = 2
persistent = 1

[State 0]
type = changeanim
trigger1 = parent,stateno = 2800 & parent,animelemtime(4) >= 0
trigger1 = parent,stateno = 2800 & parent,animelemtime(5) < 0
value = anim
elem = 3
persistent = 1

[State 0]
type = changeanim
trigger1 = parent,stateno = 2800 & parent,animelemtime(5) >= 0
trigger1 = parent,stateno = 2800 & parent,animelemtime(6) < 0
value = anim
elem = 4
persistent = 1

[State 0]
type = changeanim
trigger1 = parent,stateno = 2800 & parent,animelemtime(6) >= 0
trigger1 = parent,stateno = 2800 & parent,animelemtime(7) < 0
value = anim
elem = 5
persistent = 1

[State 0]
type = changeanim
trigger1 = parent,stateno = 2800 & parent,animelemtime(7) >= 0
trigger1 = parent,stateno = 2800 & parent,animelemtime(8) < 0
value = anim
elem = 6
persistent = 1

[State 7000, End]
type = DestroySelf
trigger1 = parent,stateno = 2800 & parent,animelemtime(8) = 0
trigger2 = parent,time = 1
trigger3 = root,movetype = H

;------------------------------------------------------------------------------------------
;ガードキャンセル攻撃（羅刹丸）
[Statedef 2900]
type    = S
movetype = A
physics = N
juggle = 8
ctrl = 0
velset = 0,0

[State 180, 1]
type = VarAdd
trigger1 = time = 0
var(50)=1000
ignorehitpause = 1

[State 860, 4]
type = PowerAdd
triggerall = !var(20) || var(20) = 4 || var(20) = 6
trigger1 = time = 0
value = -1000

[State 860, 4]
type = PowerAdd
triggerall = var(20) = 1
trigger1 = time = 0
value = -1500

[State 860, 4]
type = VarSet
triggerall = var(20) = 3
trigger1 = time = 0
var(14) = 0

[State 860, 4]
type = PowerAdd
triggerall = var(20) = 3
trigger1 = time = 0
value = -3000

[State 902, Shock]
type = PalFX
trigger1 = Time = 0
time = 2
invertall = 1
mul = 0,0,0

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

[State 1100, Effect]
type = PlaySnd
trigger1 = Time = 1
value = 810,0
channel = 1

[State -3,Super]
type = Helper
trigger1 = Time = 0
id = 8070
name = "GUARD CANCEL"
pos = 10,-ifelse(PrevStateNo = 152,40,80)
postype = P1
stateno = 8070
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 7
supermovetime = 99999999999999
persistent = 0
size.xscale = 1
size.yscale = 1

[State 0]
type = pause
trigger1 = time = 1
time = 6
movetime = 6

[State 220, Position]
type = PosSet
trigger1 = Time = 0
y = 0

[State 3001, Width]
type = Width
trigger1 = 1
edge = 1,0
player = 5,5

[State 190, 4]
type = ChangeAnim
trigger1 = time <= 12
value = anim

[State 190, 4]
type = ChangeAnim
trigger1 = time = 13
value = 2900

[State 105, 1]
type = statetypeset
triggerall = anim = 2900
trigger1 = AnimElem = 5
movetype = I

[State 220, Position]
type = PosAdd
triggerall = anim = 2900
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3
x = 8

[State 1100, Voice]
type = PlaySnd
triggerall = anim = 2900
trigger1 = AnimElem = 3
value = 1300,10
channel = 0

[State 52, Effect]
type = PlaySnd
triggerall = anim = 2900
trigger1 = AnimElem = 3
value = 100, 10

[State 1100, Velocity]
type = VelSet
triggerall = anim = 2900
trigger1 = AnimElem = 3
x = 9.5

[State 1100, Velocity]
type = VelSet
triggerall = anim = 2900
trigger1 = AnimElem = 6
x = 0

[State 1100, Gravity]
type = VelMul
triggerall = anim = 2900
trigger1 = AnimElemTime(3) > 0
x = .95

[State 1100, HitDef]
type = HitDef
triggerall = anim = 2900
trigger1 = AnimElem = 4
attr = S, SA
animtype  = Heavy
air.animtype = diugup
damage=ceil(ifelse((42*fvar(10))<7,7,(42*fvar(10)))),ceil(ifelse((42*fvar(10)/8)<7,7,(42*fvar(10)/8)))
priority = 7, Hit
hitflag = MAF
guardflag = M
pausetime = ceil(13*(2-(var(16)>0))/2),ceil(13*(2-(var(16)>0))/2)
sparkno = S8210+(random%8)
guard.sparkno = S8105
sparkxy = -10, -35
hitsound = S2,2
guardsound = S1,0
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
guard.ctrltime = 20
ground.velocity = -2.5,-9
guard.velocity = -8
air.velocity = -2.5,-9
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -11.2
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
envshake.time = 15
envshake.ampl = 5
fall = 1
fall.recover = 0
air.fall = 1
yaccel = .5
persistent = 0
getpower = ifelse(var(17),70,143)*(1000+var(24))/1000*!(var(15)||var(16)),35*(1000+var(24))/1000*!(var(15)||var(16))
givepower = 35, 35
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
forcestand = 1
air.cornerpush.veloff = 0
kill = 0
nochainID = var(40)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(38) = -10

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(39) = -35

[State 1100, ChangeState]
type = ChangeState
triggerall = anim = 2900
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;------------------------------------------------------------------------------------------
;秘奥義　天覇封神斬
[Statedef 3000]
type    = S
movetype = A
physics = N
juggle = 8
ctrl = 0
velset = 0,0

[State 220, Position]
type = PosSet
trigger1 = Time = 0
y = 0

[State 1100, VarSet]
type = VarSet
triggerall = !var(59)
triggerall = !var(15) && !var(16)
triggerall = !var(20) || var(20) = 6
trigger1 = Time = 0
var(5) = ifelse((Command = "天覇封神斬2" && Power >= 2000) || (Command = "天覇封神斬3" && (Power = [2000,3000))), 1, ifelse(Command = "天覇封神斬3" && Power >= 3000, 2, 0))

[State 1100, VarSet]
type = VarSet
triggerall = !var(59)
triggerall = !var(15) && !var(16)
triggerall = !var(20) || var(20) = 6
triggerall = fvar(29)
trigger1 = Time = 0
var(5) = ifelse(ceil(fvar(29))&2**27 && Power >= 3000, 2 , ifelse((ceil(fvar(29))&2**26 && Power >= 2000) || (ceil(fvar(29))&2**26 && (Power = [2000,3000))), 1, 0))

[State 1100, VarSet]
type = VarSet
triggerall = var(59)
triggerall = !var(15) && !var(16)
triggerall = !var(20) || var(20) = 6
triggerall = !var(17)
trigger1 = Time = 0
var(5) = ifelse(power>=2000&&P2movetype=A, floor(power*.001)-1, random%(1+(power>=2000)))

[State 1100, VarSet]
type = VarSet
triggerall = var(59)
triggerall = !var(15) && !var(16)
triggerall = !var(20) || var(20) = 6
triggerall = var(17)
trigger1 = Time = 0
var(5) = ifelse((floor(power*.001)-(P2life<150)-(P2life<300)-1)<0,0,floor(power*.001)-(P2life<150)-(P2life<300)-1)

[State 1100, VarSet]
type = VarSet
triggerall = !var(15) && !var(16)
triggerall = var(20) = 1 || (var(20) = 3 && (100*life/const(data.life))>30) || (var(20) = 3 && (100*life/const(data.life))<=30 && !var(14)) || var(20) = 4 
trigger1 = Time = 0
var(5) = 0

[State 1100, VarSet]
type = VarSet
triggerall = !var(15) && !var(16)
triggerall = var(20) = 2 || (var(20) = 3 && (100*life/const(data.life))<=30 && var(14)) || var(20) = 5
trigger1 = Time = 0
var(5) = 2

[State 1100, VarSet]
type = VarSet
triggerall = var(15)
trigger1 = Time = 0
var(5) = 2

[State 1100, VarSet]
type = VarSet
triggerall = var(16)
trigger1 = Time = 0
var(5) = 0

[State 902, 1]
type = ChangeAnim
Trigger1 = Time = 0
value = ifelse(!var(5), 3000, ifelse(var(5)=1, 3010, 3020))

[State 170, 1]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = ifelse(!var(5), 53, ifelse(var(5) = 1, 59, 64))

[State 3000, Superpause]
type = SuperPause
trigger1 = Time = 4
time = 50+(var(5)*2)
movetime = 50+(var(5)*2)
anim = -1
sound = -1
pos = 0,0
darken = 0
p2defmul = 1
poweradd = 0
unhittable = 0

[State 3000, VarSet]
type = VarSet
triggerall = Time = 4
trigger1 = enemynear,stateno != [120,155]
trigger1 = !(enemynear,authorname = "warusaki3" && enemynear,fvar(39) = 1)
trigger1 = !(enemynear,authorname = "H”" && enemynear,fvar(39) = 1)
trigger1 = !(enemynear,authorname = "mouser" && enemynear,name = "Hibiki Takane")
trigger2 = enemynear,authorname = "warusaki3" && enemynear,fvar(39) = 1 && ((enemynear,stateno != [120,155]) && (enemynear,stateno != [4100,4120]))
trigger3 = enemynear,authorname = "H”" && enemynear,fvar(39) = 1 && ((enemynear,stateno != [120,155]) && (enemynear,stateno != [4400,4405]))
trigger4 = enemynear,authorname = "mouser" && enemynear,name = "Hibiki Takane" && ((enemynear,stateno != [120,155]) && (enemynear,stateno != [4100,4120]))
fvar(36) = 50+(var(5)*2)

[State 860, 4]
type = PowerAdd
triggerall = !var(15) && !var(16)
triggerall = !var(20) || var(20) = 6
trigger1 = time = 0
value = ifelse(!var(5), -1000, ifelse(var(5) = 1, -2000, -3000))

[State 860, 4]
type = PowerAdd
triggerall = !var(15) && !var(16)
triggerall = var(20) = 4
trigger1 = time = 0
value = -1000

[State 860, 4]
type = PowerAdd
triggerall = !var(15) && !var(16)
triggerall = var(20) = 1
trigger1 = time = 0
value = -1500

[State 860, 4]
type = PowerAdd
triggerall = !var(15) && !var(16)
triggerall = var(20) = 2 || (var(20) = 3 && (100*life/const(data.life))>30) || (var(20) = 3 && (100*life/const(data.life))<=30 && var(14)) || var(20) = 5
trigger1 = time = 0
value = -3000

[State 860, 4]
type = PowerAdd
triggerall = var(16)
trigger1 = time = 0
value = -3000

[State 860, 4]
type = PowerAdd
triggerall = var(15)
trigger1 = time = 0
value = -1000

[State 860, 5]
type = Varset
trigger1 = time = 0
fvar(13) = 0

[State 860, 5]
type = Varset
trigger1 = time = 0
var(14) = 0

[State 860, 5]
type = Varset
trigger1 = time = 0
var(15) = 0

[State 860, 5]
type = Varset
trigger1 = time = 0
var(16) = 0

[State 3000, AfterImage]
type = AfterImage
triggerall = !var(18) && prevstateno != [3000,3999]
trigger1 = time = 4
time = 999
TimeGap  = 3
FrameGap = 4
length = 10
PalBright = 1,1,1
PalContrast = ifelse(!var(5), 256, ifelse(var(5) = 1, 50, 150)),ifelse(!var(5), 256, ifelse(var(5) = 1, 50, 50)),ifelse(!var(5), 256, ifelse(var(5) = 1, 150, 50))
PalAdd = 0,0,0
PalMul = 1,1,1
trans = add1

[State 3001, Super]
type = Helper
trigger1 = Time = 2
id = 8000
name = "Super"
pos = -50,-80
postype = P1
stateno = ifelse((var(20)=[3,5]),8010,8000)
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
;pausemovetime = 999999
supermovetime = 999999
size.xscale = 1
size.yscale = 1

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 25 && !var(5)
trigger2 = AnimElem = 31 && var(5) = 1
trigger3 = AnimElem = 37 && var(5) = 2
movetype = I

[State 3001, Width]
type = Width
trigger1 = 1
edge = 5,0

[State 1100, Voice]
type = PlaySnd
trigger1 = time = 3
value = 3000,0
channel = 0

[State 1100, Voice]
type = PlaySnd
trigger1 = AnimElem = 2
value = 3000,1
channel = 0

[State 52, Effect]
type = PlaySnd
trigger1 = AnimElem = 3
trigger2 = AnimElem = 8
trigger3 = AnimElem = 14
trigger4 = AnimElem = 20 && var(5)
trigger5 = AnimElem = 26 && var(5) = 2
trigger6 = AnimElem = 19 && !var(5)
trigger7 = AnimElem = 25 && var(5) = 1
trigger8 = AnimElem = 32 && var(5) = 2
value = 1100, 1

[State 52, Effect]
type = PlaySnd
trigger1 = AnimElem = 21 && !var(5)
trigger2 = AnimElem = 27 && var(5) = 1
trigger3 = AnimElem = 33 && var(5) = 2
value = 40, 1

[State 1100, StateType]
type = StateTypeSet
trigger1 = AnimElem = 21 && !var(5)
trigger2 = AnimElem = 27 && var(5) = 1
trigger3 = AnimElem = 33 && var(5) = 2
StateType = A
physics = N

[State 1100, Velocity]
type = VelSet
trigger1 = AnimElem = 2
x = 2

[State 1100, Velocity]
type = VelSet
trigger1 = AnimElem = 21 && !var(5)
trigger2 = AnimElem = 27 && var(5) = 1
trigger3 = AnimElem = 33 && var(5) = 2
x = 8
y = -12-(var(5)*1.5)

[State 1100, Gravity]
type = VelMul
trigger1 = AnimElemTime(21) > 0 && !var(5)
trigger2 = AnimElemTime(27) > 0 && var(5) = 1
trigger3 = AnimElemTime(33) > 0 && var(5) = 2
x = .85

[State 1100, Gravity]
type = Veladd
trigger1 = AnimElemTime(21) > 0 && !var(5)
trigger2 = AnimElemTime(27) > 0 && var(5) = 1
trigger3 = AnimElemTime(33) > 0 && var(5) = 2
y = .55

[State 3001, Super]
type = Helper
trigger1 = AnimElem = 21 && !var(5)
trigger2 = AnimElem = 27 && var(5) = 1
trigger3 = AnimElem = 33 && var(5) = 2
id = 8020
name = "jump Effect"
pos = 0,0
postype = P1
stateno = 8020
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
;pausemovetime = 99999999999999
supermovetime = 99999999999999

[State 420, Helper]
type = Helper
trigger1 = AnimElem = 2
stateno = 7420
ownpal = 1
supermovetime = 20

[State 420, Helper]
type = Helper
trigger1 = AnimElem = 7
stateno = 7421
ownpal = 1

[State 420, Helper]
type = Helper
trigger1 = AnimElem = 13
stateno = 7422
ownpal = 1

[State 420, Helper]
type = Helper
trigger1 = AnimElem = 19 && var(5)
stateno = 7423
ownpal = 1

[State 420, Helper]
type = Helper
trigger1 = AnimElem = 25 && var(5) = 2
stateno = 7424
ownpal = 1

[State 420, Helper]
type = Helper
trigger1 = AnimElem = 18 && !var(5)
trigger2 = AnimElem = 24 && var(5) = 1
trigger3 = AnimElem = 30 && var(5) = 2
stateno = 7425
ownpal = 1

[State 420, Helper]
type = Helper
trigger1 = AnimElem = 21 && !var(5)
trigger2 = AnimElem = 27 && var(5) = 1
trigger3 = AnimElem = 33 && var(5) = 2
stateno = 7401
ownpal = 1

[State 1100, HitDef]
type = HitDef
trigger1 = AnimElem = 3
trigger2 = AnimElem = 9
trigger3 = AnimElem = 15
trigger4 = AnimElem = 21 && var(5)
trigger5 = AnimElem = 27 && var(5) = 2
attr = S, HA
animtype  = Heavy
air.animtype = Back
damage=ceil(ifelse(((ifelse(var(5)=2,28,21))*fvar(10))<7,7,((ifelse(var(5)=2,28,21))*fvar(10)))),ceil(ifelse(((ifelse(var(5)=2,28,21))*fvar(10)/8)<7,7,((ifelse(var(5)=2,28,21))*fvar(10)/8)))
priority = 7, Hit
hitflag = MAF
guardflag = M
pausetime = 3,2
sparkno = S8900+(random%64)
guard.sparkno = S8105
sparkxy = -20, -55
hitsound = S2,12
guardsound = S1,0
ground.type = Low
ground.slidetime = 33
ground.hittime  = 33
guard.ctrltime = 20
ground.velocity = 0
guard.velocity = 0
air.velocity = -4,-7.5
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
envshake.time = 12
envshake.ampl = 4
fall = 0
fall.recover = 0
air.fall = 1
yaccel = .5
persistent = 1
getpower = 0,0
givepower = 35, 35
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
forcestand = 1
nochainID = var(40)

[State 1100, HitDef]
type = HitDef
trigger1 = AnimElem = 4
trigger2 = AnimElem = 10
trigger3 = AnimElem = 16
trigger4 = AnimElem = 22 && var(5)
trigger5 = AnimElem = 28 && var(5) = 2
attr = S, HA
animtype  = Heavy
air.animtype = Back
damage=ceil(ifelse(((ifelse(var(5)=2,21,14))*fvar(10))<7,7,((ifelse(var(5)=2,21,14))*fvar(10)))),ceil(ifelse(((ifelse(var(5)=2,21,14))*fvar(10)/8)<7,7,((ifelse(var(5)=2,21,14))*fvar(10)/8)))
priority = 7, Hit
hitflag = MAF
guardflag = M
pausetime = 3,2
sparkno = S8900+(random%64)
guard.sparkno = S8105
sparkxy = -20, -100
hitsound = S2,12
guardsound = S1,0
ground.type = High
ground.slidetime = 33
ground.hittime  = 33
guard.ctrltime = 20
ground.velocity = 0
guard.velocity = 0
air.velocity = -4,-7.5
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
envshake.time = 12
envshake.ampl = 4
fall = 0
fall.recover = 0
air.fall = 1
yaccel = .5
persistent = 1
getpower = 0,0
givepower = 35, 35
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
forcestand = 1
nochainID = var(40)

[State 1100, HitDef]
type = HitDef
trigger1 = AnimElem = 20 && !var(5)
trigger2 = AnimElem = 26 && var(5) = 1
trigger3 = AnimElem = 32 && var(5) = 2
attr = S, HA
animtype  = Heavy
air.animtype = Up
damage=ceil(ifelse(((ifelse(!var(5),28,ifelse(var(5)=1,56,49)))*fvar(10))<7,7,((ifelse(!var(5),28,ifelse(var(5)=1,56,49)))*fvar(10)))),ceil(ifelse((49*fvar(10)/8)<7,7,(49*fvar(10)/8)))
priority = 7, Hit
hitflag = MAF
guardflag = M
pausetime = 3,2
sparkno = S8900+(random%64)
guard.sparkno = S8105
sparkxy = -20, -55
hitsound = S2,12
guardsound = S1,0
ground.type = Low
ground.slidetime = 33
ground.hittime  = 33
guard.ctrltime = 20
ground.velocity = 0
guard.velocity = -8
air.velocity = -4,-7.5
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -11.2
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
envshake.time = 12
envshake.ampl = 4
fall = 0
fall.recover = 0
air.fall = 1
yaccel = .5
persistent = 0
getpower = 0,0
givepower = 35, 35
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
forcestand = 1
nochainID = var(40)

[State 1100, HitDef]
type = HitDef
trigger1 = AnimElem = 21 && !var(5)
trigger2 = AnimElem = 27 && var(5) = 1
trigger3 = AnimElem = 33 && var(5) = 2
attr = A, HA
animtype  = Heavy
air.animtype = Up
damage=ceil(ifelse(((ifelse(var(5),42,14))*fvar(10))<7,7,((ifelse(var(5),42,14))*fvar(10)))),ceil(ifelse(((ifelse(var(5),42,14))*fvar(10)/8)<7,7,((ifelse(var(5),42,14))*fvar(10)/8)))
priority = 7, Hit
hitflag = MAF
guardflag = M
pausetime = 3,2
sparkno = S8900+(random%64)
guard.sparkno = S8105
sparkxy = -20, -95
hitsound = S2,12
guardsound = S1,0
ground.type = Low
ground.slidetime = 33
ground.hittime  = 33
guard.ctrltime = 20
ground.velocity = -1.5,-10.5
guard.velocity = -8
air.velocity = -1.5,-10.5
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -11.2
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
envshake.time = 10
envshake.ampl = 3
fall = 1
fall.recover = 0
air.fall = 1
yaccel = .5
persistent = 0
getpower = 0,0
givepower = 35, 35
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
forcestand = 1
nochainID = var(40)

[State 1100, HitDef]
type = HitDef
trigger1 = AnimElem = 22 && !var(5)
trigger2 = AnimElem = 28 && var(5) = 1
trigger3 = AnimElem = 34 && var(5) = 2
attr = A, HA
animtype  = Heavy
air.animtype = Up
damage=ceil(ifelse(((ifelse(var(5),35,14))*fvar(10))<7,7,((ifelse(var(5),35,14))*fvar(10)))),ceil(ifelse(((ifelse(var(5),35,14))*fvar(10)/8)<7,7,((ifelse(var(5),35,14))*fvar(10)/8)))
priority = 7, Hit
hitflag = MAF
guardflag = M
pausetime = 3,2
sparkno = S8900+(random%64)
guard.sparkno = S8105
sparkxy = -20, -115
hitsound = S2,12
guardsound = S1,0
ground.type = Low
ground.slidetime = 33
ground.hittime  = 33
guard.ctrltime = 20
ground.velocity = -1.5,-10.5
guard.velocity = -8
air.velocity = -1.5,-10.5
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -11.2
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
envshake.time = 10
envshake.ampl = 3
fall = 1
fall.recover = 0
air.fall = 1
yaccel = .5
persistent = 0
getpower = 0,0
givepower = 35, 35
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
forcestand = 1
nochainID = var(40)

[State 1100, HitDef]
type = HitDef
trigger1 = AnimElem = 29 && var(5) = 1
trigger2 = AnimElem = 35 && var(5) = 2
attr = A, HA
animtype  = Heavy
air.animtype = Up
damage=ceil(ifelse(((ifelse(var(5)=1,35,21))*fvar(10))<7,7,((ifelse(var(5)=1,35,21))*fvar(10)))),ceil(ifelse(((ifelse(var(5)=1,35,21))*fvar(10)/8)<7,7,((ifelse(var(5)=1,35,21))*fvar(10)/8)))
priority = 7, Hit
hitflag = MAF
guardflag = M
pausetime = 3,2
sparkno = S8900+(random%64)
guard.sparkno = S8105
sparkxy = -20, -115
hitsound = S2,12
guardsound = S1,0
ground.type = Low
ground.slidetime = 33
ground.hittime  = 33
guard.ctrltime = 20
ground.velocity = -1.5,-10.5
guard.velocity = -8
air.velocity = -1.5,-10.5
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -11.2
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
envshake.time = 10
envshake.ampl = 3
fall = 1
fall.recover = 0
air.fall = 1
yaccel = .5
persistent = 0
getpower = 0,0
givepower = 35, 35
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
forcestand = 1
nochainID = var(40)

[State 1100, HitDef]
type = HitDef
trigger1 = AnimElem = 36 && var(5) = 2
attr = A, HA
animtype  = Heavy
air.animtype = Up
damage=ceil(ifelse((14*fvar(10))<7,7,(14*fvar(10)))),ceil(ifelse((14*fvar(10)/8)<7,7,(14*fvar(10)/8)))
priority = 7, Hit
hitflag = MAF
guardflag = M
pausetime = 3,2
sparkno = S8900+(random%64)
guard.sparkno = S8105
sparkxy = -20, -115
hitsound = S2,12
guardsound = S1,0
ground.type = Low
ground.slidetime = 33
ground.hittime  = 33
guard.ctrltime = 20
ground.velocity = -1.5,-10.5
guard.velocity = -8
air.velocity = -1.5,-10.5
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -11.2
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
envshake.time = 10
envshake.ampl = 3
fall = 1
fall.recover = 0
air.fall = 1
yaccel = .5
persistent = 0
getpower = 0,0
givepower = 35, 35
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
forcestand = 1
nochainID = var(40)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(38) = -20

[State 3001, VarSet]
type = VarSet
trigger1 = AnimElem = 3
trigger2 = AnimElem = 9
trigger3 = AnimElem = 15
trigger4 = AnimElem = 21 && var(5)
trigger5 = AnimElem = 27 && var(5) = 2
trigger6 = AnimElem = 20 && !var(5)
trigger7 = AnimElem = 26 && var(5) = 1
trigger8 = AnimElem = 32 && var(5) = 2
ignorehitpause = 1
var(39) = -55

[State 3001, VarSet]
type = VarSet
trigger1 = AnimElem = 4
trigger2 = AnimElem = 10
trigger3 = AnimElem = 16
trigger4 = AnimElem = 22 && var(5)
trigger5 = AnimElem = 28 && var(5) = 2
ignorehitpause = 1
var(39) = -100

[State 3001, VarSet]
type = VarSet
trigger1 = AnimElem = 21 && !var(5)
trigger2 = AnimElem = 27 && var(5) = 1
trigger3 = AnimElem = 33 && var(5) = 2
ignorehitpause = 1
var(39) = -95

[State 3001, VarSet]
type = VarSet
trigger1 = AnimElem = 22 && !var(5)
trigger2 = AnimElem = 28 && var(5) = 1
trigger3 = AnimElem = 34 && var(5) = 2
ignorehitpause = 1
var(39) = -115

[State 1100, ChangeState]
type = ChangeState
triggerall = Pos Y >= 0 && Vel Y > 0
trigger1 = AnimElemTime(21) > 0 && !var(5)
trigger2 = AnimElemTime(27) > 0 && var(5) = 1
trigger3 = AnimElemTime(33) > 0 && var(5) = 2
value = 3005

;---------------------------------------------------------------------------
;秘奥義　天覇封神斬（着地）
[Statedef 3005]
type    = S
physics = S
ctrl = 0
anim = 3005
velset = 0,0

[State 1000, Spark]
type = Explod
trigger1 = Time = 1
Anim = 8030
pos = 0, 0
postype = p1
ownpal = 1
sprpriority = -3
;pausemovetime = -1
supermovetime = -1
scale = .5,.5

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

[State 52, Effect]
type = PlaySnd
trigger1 = Time = 0
value = 52, 0
channel = 20

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

;---------------------------------------------------------------------------
;秘奥義　天覇封神斬（エフェクト）1
[Statedef 7420]
type = S
movetype = I
physics = N
anim = 7400
ctrl = 0
sprpriority = 5

[State 7000, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 1000, 0]
type = BindToRoot
trigger1 = 1
pos = 0,0

[State 0]
type = changeanim
trigger1 = parent,stateno = 3000 & parent,animelemtime(2) >= 0
trigger1 = parent,stateno = 3000 & parent,animelemtime(3) < 0
value = anim
elem = 1
persistent = 1

[State 0]
type = changeanim
trigger1 = parent,stateno = 3000 & parent,animelemtime(3) >= 0
trigger1 = parent,stateno = 3000 & parent,animelemtime(4) < 0
value = anim
elem = 2
persistent = 1

[State 0]
type = changeanim
trigger1 = parent,stateno = 3000 & parent,animelemtime(4) >= 0
trigger1 = parent,stateno = 3000 & parent,animelemtime(5) < 0
value = anim
elem = 3
persistent = 1

[State 0]
type = changeanim
trigger1 = parent,stateno = 3000 & parent,animelemtime(5) >= 0
trigger1 = parent,stateno = 3000 & parent,animelemtime(6) < 0
value = anim
elem = 4
persistent = 1

[State 0]
type = changeanim
trigger1 = parent,stateno = 3000 & parent,animelemtime(6) = 0
value = anim
elem = 5
persistent = 1

[State 7000, End]
type = DestroySelf
trigger1 = anim = 7400 && animtime = 0
trigger2 = parent,time = 1

;---------------------------------------------------------------------------
;秘奥義　天覇封神斬（エフェクト）2
[Statedef 7421]
type = S
movetype = I
physics = N
anim = 7401
ctrl = 0
sprpriority = 5

[State 7000, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 1000, 0]
type = BindToRoot
trigger1 = 1
pos = 0,0

[State 0]
type = changeanim
trigger1 = parent,stateno = 3000 & parent,animelemtime(7) >= 0
trigger1 = parent,stateno = 3000 & parent,animelemtime(8) < 0
value = anim
elem = 1
persistent = 1

[State 0]
type = changeanim
trigger1 = parent,stateno = 3000 & parent,animelemtime(8) >= 0
trigger1 = parent,stateno = 3000 & parent,animelemtime(9) < 0
value = anim
elem = 2
persistent = 1

[State 0]
type = changeanim
trigger1 = parent,stateno = 3000 & parent,animelemtime(9) >= 0
trigger1 = parent,stateno = 3000 & parent,animelemtime(10) < 0
value = anim
elem = 3
persistent = 1

[State 0]
type = changeanim
trigger1 = parent,stateno = 3000 & parent,animelemtime(10) >= 0
trigger1 = parent,stateno = 3000 & parent,animelemtime(11) < 0
value = anim
elem = 4
persistent = 1

[State 0]
type = changeanim
trigger1 = parent,stateno = 3000 & parent,animelemtime(11) = 0
value = anim
elem = 5
persistent = 1

[State 7000, End]
type = DestroySelf
trigger1 = anim = 7401 && animtime = 0
trigger2 = parent,time = 1

;---------------------------------------------------------------------------
;秘奥義　天覇封神斬（エフェクト）3
[Statedef 7422]
type = S
movetype = I
physics = N
anim = 7401
ctrl = 0
sprpriority = 5

[State 7000, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 1000, 0]
type = BindToRoot
trigger1 = 1
pos = 0,0

[State 0]
type = changeanim
trigger1 = parent,stateno = 3000 & parent,animelemtime(13) >= 0
trigger1 = parent,stateno = 3000 & parent,animelemtime(14) < 0
value = anim
elem = 1
persistent = 1

[State 0]
type = changeanim
trigger1 = parent,stateno = 3000 & parent,animelemtime(14) >= 0
trigger1 = parent,stateno = 3000 & parent,animelemtime(15) < 0
value = anim
elem = 2
persistent = 1

[State 0]
type = changeanim
trigger1 = parent,stateno = 3000 & parent,animelemtime(15) >= 0
trigger1 = parent,stateno = 3000 & parent,animelemtime(16) < 0
value = anim
elem = 3
persistent = 1

[State 0]
type = changeanim
trigger1 = parent,stateno = 3000 & parent,animelemtime(16) >= 0
trigger1 = parent,stateno = 3000 & parent,animelemtime(17) < 0
value = anim
elem = 4
persistent = 1

[State 0]
type = changeanim
trigger1 = parent,stateno = 3000 & parent,animelemtime(17) = 0
value = anim
elem = 5
persistent = 1

[State 7000, End]
type = DestroySelf
trigger1 = anim = 7401 && animtime = 0
trigger2 = parent,time = 1

;---------------------------------------------------------------------------
;秘奥義　天覇封神斬（エフェクト）4
[Statedef 7423]
type = S
movetype = I
physics = N
anim = 7401
ctrl = 0
sprpriority = 5

[State 7000, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 1000, 0]
type = BindToRoot
trigger1 = 1
pos = 0,0

[State 0]
type = changeanim
trigger1 = parent,stateno = 3000 & parent,animelemtime(19) >= 0
trigger1 = parent,stateno = 3000 & parent,animelemtime(20) < 0
value = anim
elem = 1
persistent = 1

[State 0]
type = changeanim
trigger1 = parent,stateno = 3000 & parent,animelemtime(20) >= 0
trigger1 = parent,stateno = 3000 & parent,animelemtime(21) < 0
value = anim
elem = 2
persistent = 1

[State 0]
type = changeanim
trigger1 = parent,stateno = 3000 & parent,animelemtime(21) >= 0
trigger1 = parent,stateno = 3000 & parent,animelemtime(22) < 0
value = anim
elem = 3
persistent = 1

[State 0]
type = changeanim
trigger1 = parent,stateno = 3000 & parent,animelemtime(22) >= 0
trigger1 = parent,stateno = 3000 & parent,animelemtime(23) < 0
value = anim
elem = 4
persistent = 1

[State 0]
type = changeanim
trigger1 = parent,stateno = 3000 & parent,animelemtime(23) = 0
value = anim
elem = 5
persistent = 1

[State 7000, End]
type = DestroySelf
trigger1 = anim = 7401 && animtime = 0
trigger2 = parent,time = 1

;---------------------------------------------------------------------------
;秘奥義　天覇封神斬（エフェクト）5
[Statedef 7424]
type = S
movetype = I
physics = N
anim = 7401
ctrl = 0
sprpriority = 5

[State 7000, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 1000, 0]
type = BindToRoot
trigger1 = 1
pos = 0,0

[State 0]
type = changeanim
trigger1 = parent,stateno = 3000 & parent,animelemtime(25) >= 0
trigger1 = parent,stateno = 3000 & parent,animelemtime(26) < 0
value = anim
elem = 1
persistent = 1

[State 0]
type = changeanim
trigger1 = parent,stateno = 3000 & parent,animelemtime(26) >= 0
trigger1 = parent,stateno = 3000 & parent,animelemtime(27) < 0
value = anim
elem = 2
persistent = 1

[State 0]
type = changeanim
trigger1 = parent,stateno = 3000 & parent,animelemtime(27) >= 0
trigger1 = parent,stateno = 3000 & parent,animelemtime(28) < 0
value = anim
elem = 3
persistent = 1

[State 0]
type = changeanim
trigger1 = parent,stateno = 3000 & parent,animelemtime(28) >= 0
trigger1 = parent,stateno = 3000 & parent,animelemtime(29) < 0
value = anim
elem = 4
persistent = 1

[State 0]
type = changeanim
trigger1 = parent,stateno = 3000 & parent,animelemtime(29) = 0
value = anim
elem = 5
persistent = 1

[State 7000, End]
type = DestroySelf
trigger1 = anim = 7401 && animtime = 0
trigger2 = parent,time = 1

;---------------------------------------------------------------------------
;秘奥義　天覇封神斬（エフェクト）6
[Statedef 7425]
type = S
movetype = I
physics = N
anim = 7401
ctrl = 0
sprpriority = 5

[State 7000, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 1000, 0]
type = BindToRoot
trigger1 = 1
pos = 0,0

[State 0]
type = changeanim
trigger1 = !root,var(5)
trigger1 = parent,stateno = 3000 & parent,animelemtime(18) >= 0
trigger1 = parent,stateno = 3000 & parent,animelemtime(19) < 0
trigger2 = root,var(5) = 1
trigger2 = parent,stateno = 3000 & parent,animelemtime(24) >= 0
trigger2 = parent,stateno = 3000 & parent,animelemtime(25) < 0
trigger3 = root,var(5) = 2
trigger3 = parent,stateno = 3000 & parent,animelemtime(30) >= 0
trigger3 = parent,stateno = 3000 & parent,animelemtime(31) < 0
value = anim
elem = 1
persistent = 1

[State 0]
type = changeanim
trigger1 = !root,var(5)
trigger1 = parent,stateno = 3000 & parent,animelemtime(19) >= 0
trigger1 = parent,stateno = 3000 & parent,animelemtime(20) < 0
trigger2 = root,var(5) = 1
trigger2 = parent,stateno = 3000 & parent,animelemtime(25) >= 0
trigger2 = parent,stateno = 3000 & parent,animelemtime(26) < 0
trigger3 = root,var(5) = 2
trigger3 = parent,stateno = 3000 & parent,animelemtime(31) >= 0
trigger3 = parent,stateno = 3000 & parent,animelemtime(32) < 0
value = anim
elem = 2
persistent = 1

[State 0]
type = changeanim
trigger1 = !root,var(5)
trigger1 = parent,stateno = 3000 & parent,animelemtime(20) >= 0
trigger1 = parent,stateno = 3000 & parent,animelemtime(21) < 0
trigger2 = root,var(5) = 1
trigger2 = parent,stateno = 3000 & parent,animelemtime(26) >= 0
trigger2 = parent,stateno = 3000 & parent,animelemtime(27) < 0
trigger3 = root,var(5) = 2
trigger3 = parent,stateno = 3000 & parent,animelemtime(32) >= 0
trigger3 = parent,stateno = 3000 & parent,animelemtime(33) < 0
value = anim
elem = 3
persistent = 1

[State 7000, End]
type = DestroySelf
trigger1 = !root,var(5)
trigger1 = parent,stateno = 3000 & parent,animelemtime(21) = 0
trigger2 = root,var(5) = 1
trigger2 = parent,stateno = 3000 & parent,animelemtime(27) = 0
trigger3 = root,var(5) = 2
trigger3 = parent,stateno = 3000 & parent,animelemtime(33) = 0
trigger4 = parent,time = 1

;------------------------------------------------------------------------------------------
;秘奥義　天覇断空烈斬
[Statedef 3100]
type    = S
movetype = A
physics = N
juggle = 8
ctrl = 0
velset = 0,0

[State 220, Position]
type = PosSet
trigger1 = Time = 0
y = 0

[State 1100, VarSet]
type = VarSet
triggerall = !var(59)
triggerall = !var(15) && !var(16)
triggerall = !var(20) || var(20) = 6
trigger1 = Time = 0
var(5) = ifelse((Command = "天覇封神斬2" && Power >= 2000) || (Command = "天覇封神斬3" && (Power = [2000,3000))), 1, ifelse(Command = "天覇封神斬3" && Power >= 3000, 2, 0))

[State 1100, VarSet]
type = VarSet
triggerall = !var(59)
triggerall = !var(15) && !var(16)
triggerall = !var(20) || var(20) = 6
triggerall = fvar(29)
trigger1 = Time = 0
var(5) = ifelse(ceil(fvar(29))&2**27 && Power >= 3000, 2 , ifelse((ceil(fvar(29))&2**26 && Power >= 2000) || (ceil(fvar(29))&2**27 && (Power = [2000,3000))), 1, 0))

[State 1100, VarSet]
type = VarSet
triggerall = var(59)
triggerall = !var(15) && !var(16)
triggerall = !var(20) || var(20) = 6
triggerall = !var(17)
trigger1 = Time = 0
var(5) = ifelse(power>=2000&&P2movetype=A, floor(power*.001)-1, random%(1+(power>=2000)))

[State 1100, VarSet]
type = VarSet
triggerall = var(59)
triggerall = !var(15) && !var(16)
triggerall = !var(20) || var(20) = 6
triggerall = var(17)
trigger1 = Time = 0
var(5) = ifelse((floor(power*.001)-(P2life<150)-(P2life<300)-1)<0,0,floor(power*.001)-(P2life<150)-(P2life<300)-1)

[State 1100, VarSet]
type = VarSet
triggerall = !var(15) && !var(16)
triggerall = var(20) = 1 || (var(20) = 3 && (100*life/const(data.life))>30) || (var(20) = 3 && (100*life/const(data.life))<=30 && !var(14)) || var(20) = 4 
trigger1 = Time = 0
var(5) = 0

[State 1100, VarSet]
type = VarSet
triggerall = !var(15) && !var(16)
triggerall = var(20) = 2 || (var(20) = 3 && (100*life/const(data.life))<=30 && var(14)) || var(20) = 5
trigger1 = Time = 0
var(5) = 2

[State 1100, VarSet]
type = VarSet
triggerall = var(15)
trigger1 = Time = 0
var(5) = 2

[State 1100, VarSet]
type = VarSet
triggerall = var(16)
trigger1 = Time = 0
var(5) = 0

[State 902, 1]
type = ChangeAnim
Trigger1 = Time = 0
value = 3100

[State 170, 1]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = ifelse(!var(5), 53, ifelse(var(5) = 1, 59, 64))

[State 3000, Superpause]
type = SuperPause
trigger1 = Time = 4
time = 50+(var(5)*2)
movetime = 50+(var(5)*2)
anim = -1
sound = -1
pos = 0,0
darken = 0
p2defmul = 1
poweradd = 0
unhittable = 0

[State 3000, VarSet]
type = VarSet
triggerall = Time = 4
trigger1 = enemynear,stateno != [120,155]
trigger1 = !(enemynear,authorname = "warusaki3" && enemynear,fvar(39) = 1)
trigger1 = !(enemynear,authorname = "H”" && enemynear,fvar(39) = 1)
trigger1 = !(enemynear,authorname = "mouser" && enemynear,name = "Hibiki Takane")
trigger2 = enemynear,authorname = "warusaki3" && enemynear,fvar(39) = 1 && ((enemynear,stateno != [120,155]) && (enemynear,stateno != [4100,4120]))
trigger3 = enemynear,authorname = "H”" && enemynear,fvar(39) = 1 && ((enemynear,stateno != [120,155]) && (enemynear,stateno != [4400,4405]))
trigger4 = enemynear,authorname = "mouser" && enemynear,name = "Hibiki Takane" && ((enemynear,stateno != [120,155]) && (enemynear,stateno != [4100,4120]))
fvar(36) = 50+(var(5)*2)

[State 860, 4]
type = PowerAdd
triggerall = !var(15) && !var(16)
triggerall = !var(20) || var(20) = 6
trigger1 = time = 0
value = ifelse(!var(5), -1000, ifelse(var(5) = 1, -2000, -3000))

[State 860, 4]
type = PowerAdd
triggerall = !var(15) && !var(16)
triggerall = var(20) = 4
trigger1 = time = 0
value = -1000

[State 860, 4]
type = PowerAdd
triggerall = !var(15) && !var(16)
triggerall = var(20) = 1
trigger1 = time = 0
value = -1500

[State 860, 4]
type = PowerAdd
triggerall = !var(15) && !var(16)
triggerall = var(20) = 2 || (var(20) = 3 && (100*life/const(data.life))>30) || (var(20) = 3 && (100*life/const(data.life))<=30 && var(14)) || var(20) = 5
trigger1 = time = 0
value = -3000

[State 860, 4]
type = PowerAdd
triggerall = var(16)
trigger1 = time = 0
value = -3000

[State 860, 4]
type = PowerAdd
triggerall = var(15)
trigger1 = time = 0
value = -1000

[State 860, 5]
type = Varset
trigger1 = time = 0
fvar(13) = 0

[State 860, 5]
type = Varset
trigger1 = time = 0
var(14) = 0

[State 860, 5]
type = Varset
trigger1 = time = 0
var(15) = 0

[State 860, 5]
type = Varset
trigger1 = time = 0
var(16) = 0

[State 3000, AfterImage]
type = AfterImage
triggerall = !var(18) && prevstateno != [3000,3999]
trigger1 = time = 4
time = 999
TimeGap  = 3
FrameGap = 4
length = 10
PalBright = 1,1,1
PalContrast = ifelse(!var(5), 256, ifelse(var(5) = 1, 50, 150)),ifelse(!var(5), 256, ifelse(var(5) = 1, 50, 50)),ifelse(!var(5), 256, ifelse(var(5) = 1, 150, 50))
PalAdd = 0,0,0
PalMul = 1,1,1
trans = add1

[State 3001, Super]
type = Helper
trigger1 = Time = 2
id = 8000
name = "Super"
pos = -40,-80
postype = P1
stateno = ifelse((var(20)=[3,5]),8010,8000)
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
;pausemovetime = 999999
supermovetime = 999999
size.xscale = 1
size.yscale = 1

[State 0]
type = changeanim
triggerall = var(2)
trigger1 = AnimElemTime(8) = 0
value = anim
elem = 7
persistent = 1

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 6
movetype = I

[State 1100, Voice]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1300, 10
channel = 0

[State 52, Effect]
type = PlaySnd
trigger1 = AnimElem = 3
value = 1100, 1

[State 420, Helper]
type = Helper
trigger1 = AnimElem = 3
stateno = 7430
ownpal = 1
supermovetime = 20

[State 1100, HitDef]
type = HitDef
trigger1 = AnimElem = 4
attr = S, HA
animtype  = Heavy
air.animtype = Up
damage=ceil(ifelse(((49+(var(5)*7))*fvar(10))<7,7,((49+(var(5)*7))*fvar(10)))),0
priority = 7, Hit
hitflag = MAF
guardflag = M
pausetime = 0,13
sparkno = S8900+(random%64)
guard.sparkno = S8105
sparkxy = -20, -55
hitsound = S2,12
guardsound = S1,0
ground.type = Low
ground.slidetime = 33
ground.hittime  = 33
guard.ctrltime = 20
ground.velocity = 0,-12.5-var(5)
guard.velocity = -8
air.velocity = 0,-12.5-var(5)
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = .00000001
air.cornerpush.veloff = 0
envshake.time = 12
envshake.ampl = 4
fall = 1
fall.recover = 0
air.fall = 1
yaccel = .5
persistent = 0
getpower = 0,0
givepower = 35, 35
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
forcestand = 1
kill = 0
p2facing = 1
snap = 50,0
nochainID = var(40)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(38) = -20

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(39) = -45

[State 901, Throw]
type = TargetState
trigger1 = time > 1 && var(36) = 1 && numtarget
value = 3820
ignorehitpause = 0
persistent = 0

[State 52, 4]
type = ChangeState
trigger1 = AnimElemTime(8) = 8+var(5)
trigger1 = var(36) = 1 && numtarget
trigger1 = !var(2)
value = 3101

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

;---------------------------------------------------------------------------
;秘奥義　天覇断空烈斬（追撃）1
[Statedef 3101]
type    = S
movetype = A
physics = N
juggle = 0
ctrl = 0
anim = 3101

[State 52, Effect]
type = PlaySnd
trigger1 = AnimElem = 2
value = 40, 1

[State 1100, StateType]
type = StateTypeSet
trigger1 = AnimElem = 2
StateType = A
physics = N

[State 1100, Velocity]
type = VelSet
trigger1 = AnimElem = 2
y = -11-(var(5)*1.5)

[State 1100, Velocity]
type = VelSet
trigger1 = AnimElem = 4
y = 0

[State 1100, Gravity]
type = Veladd
trigger1 = AnimElemTime(2) > 0
trigger1 = AnimElemTime(4) < 0
y = .49

[State 1100, Gravity]
type = Veladd
trigger1 = AnimElemTime(12) > 0
y = .66

[State 3001, Super]
type = Helper
trigger1 = AnimElem = 2
id = 8020
name = "jump Effect"
pos = 0,0
postype = P1
stateno = 8020
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
;pausemovetime = 99999999999999
supermovetime = 99999999999999

[State 620, Effect]
type = PlaySnd
trigger1 = AnimElem = 3
value = 3, 12
channel = 1

[State 620, Voice]
type = PlaySnd
trigger1 = AnimElem = 1
value = 3100, 10
channel = 0

[State 620, Voice]
type = PlaySnd
trigger1 = AnimElem = 14
value = 3100, 11
channel = 0

[State 0]
type = changeanim
triggerall = var(2)
trigger1 = AnimElemTime(7) = 0
value = anim
elem = 6
persistent = 1

[State 420, Helper]
type = Helper
trigger1 = AnimElemTime(2) = 18
stateno = 7000
ownpal = 1

[State 620, 1]
type = Hitdef
trigger1 = AnimElem = 4
attr = A, HA
hitflag = MAF
guardflag = HA
animtype = Heavy
air.animtype = back
fall.animtype = back
priority = 5,Hit
damage=ceil(ifelse(((70+(var(5)*7))*fvar(10))<7,7,((70+(var(5)*7))*fvar(10)))),ceil(ifelse(((70+(var(5)*7))*fvar(10)/8)<7,7,((70+(var(5)*7))*fvar(10)/8)))
pausetime = 0,13
sparkno = S8900+(random%64)
guard.sparkno = S8100
sparkxy = -10, -25
hitsound = S2, 12
guardsound = S1, 0
ground.type = High
ground.slidetime = 33
ground.hittime = 33
air.hittime = 33
guard.ctrltime = 20
ground.velocity = 0,10
guard.velocity = -8
air.velocity = 0,10
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = .00000001
air.cornerpush.veloff = 0
envshake.time = 12
envshake.ampl = 4
getpower = 0,0
givepower = 35, 35    
persistent = 0
fall = 1
air.fall = 1
fall.recover = 0
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
yaccel = .5
kill = 0

[State 650, HitPause]
type = PosFreeze
trigger1 = var(2)
ignorehitpause = 1

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(38) = -10

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(39) = -25

[State 901, Throw]
type = TargetState
trigger1 = time > 1 && var(36) = 1 && numtarget
value = 3820
ignorehitpause = 0
persistent = 0

[State 4030, ChangeState]
type = ChangeState
triggerall = !var(2)
trigger1 = AnimElemTime(12) > 0
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 3102

;---------------------------------------------------------------------------
;秘奥義　天覇断空烈斬（追撃）2
[Statedef 3102]
type    = S
movetype = A
physics = S
juggle = 0
ctrl = 0
anim = 3102
velset = 0,0

[State 1000, Spark]
type = Explod
trigger1 = Time = 0
Anim = 8030
pos = 0, 0
postype = p1
ownpal = 1
sprpriority = -3
;pausemovetime = -1
supermovetime = -1
scale = .5,.5

[State 1000, Spark]
type = Explod
trigger1 = Time = 0
Anim = 7500
pos = 55, 0
postype = p1
ownpal = 1
bindtime = 1
sprpriority = 3
scale = 2,2

[State 1000, Spark]
type = Explod
trigger1 = Time = 0
Anim = 7501
pos = 55, 0
postype = p1
ownpal = 1
bindtime = 1
sprpriority = 3
scale = 2,2

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

[State 52, Effect]
type = PlaySnd
trigger1 = Time = 0
value = 1200, 1

[State 52, Effect]
type = PlaySnd
trigger1 = Time = 0
value = 3200, 3

[State 903, EnvShake]
type = EnvShake
trigger1 = Time = 0
time = 20
ampl = 5

[State 0]
type = changeanim
triggerall = var(2)
trigger1 = AnimElemTime(7) = 0
value = anim
elem = 6
persistent = 1

[State 1100, HitDef]
type = HitDef
trigger1 = time = 1 && var(5) = 2
attr = S, HA
animtype  = Heavy
air.animtype = Back
damage=ceil(ifelse((63*fvar(10))<7,7,(77*fvar(10)))),ceil(ifelse((77*fvar(10)/8)<7,7,(77*fvar(10)/8)))
priority = 7, Hit
hitflag = MAFD
guardflag = HA
pausetime = 6,6
sparkno = S8900+(random%64)
guard.sparkno = S8105
sparkxy = -20, -5
hitsound = S2,12
guardsound = S1,0
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
guard.ctrltime = 20
ground.velocity = -5.5,-6.5
guard.velocity = -8
air.velocity = -5.5,-6.5
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = .00000001
air.cornerpush.veloff = 0
envshake.time = 12
envshake.ampl = 3
fall = 1
fall.recover = 0
air.fall = 1
yaccel = .5
persistent = 0
getpower = 0,0
givepower = 35, 35
givepower = 35, 35
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
forcestand = 1
;kill = 0
p2stateno = 3880

[State 1100, HitDef]
type = HitDef
trigger1 = animelem = 2 && var(5) = 2
attr = S, HA
animtype  = Heavy
air.animtype = Back
damage=ceil(ifelse((63*fvar(10))<7,7,(70*fvar(10)))),ceil(ifelse((70*fvar(10)/8)<7,7,(70*fvar(10)/8)))
priority = 7, Hit
hitflag = MAFD
guardflag = HA
pausetime = 6,6
sparkno = S8900+(random%64)
guard.sparkno = S8105
sparkxy = -20, -5
hitsound = S2,12
guardsound = S1,0
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
guard.ctrltime = 20
ground.velocity = -5.5,-6.5
guard.velocity = -8
air.velocity = -5.5,-6.5
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = .00000001
air.cornerpush.veloff = 0
envshake.time = 12
envshake.ampl = 3
fall = 1
fall.recover = 0
air.fall = 1
yaccel = .5
persistent = 0
getpower = 0,0
givepower = 35, 35
givepower = 35, 35
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
forcestand = 1
;kill = 0
p2stateno = 3880

[State 1100, HitDef]
type = HitDef
trigger1 = time = 1 && var(5) = 1
trigger2 = animelem = 3 && var(5) = 2
attr = S, HA
animtype  = Heavy
air.animtype = Back
damage=ceil(ifelse(((77-(var(5)*7))*fvar(10))<7,7,((77-(var(5)*7))*fvar(10)))),ceil(ifelse(((77-(var(5)*7))*fvar(10)/8)<7,7,((77-(var(5)*7))*fvar(10)/8)))
priority = 7, Hit
hitflag = MAFD
guardflag = HA
pausetime = 6,6
sparkno = S8900+(random%64)
guard.sparkno = S8105
sparkxy = -20, -5
hitsound = S2,12
guardsound = S1,0
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
guard.ctrltime = 20
ground.velocity = -5.5,-6.5
guard.velocity = -8
air.velocity = -5.5,-6.5
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = .00000001
air.cornerpush.veloff = 0
envshake.time = 12
envshake.ampl = 3
fall = 1
fall.recover = 0
air.fall = 1
yaccel = .5
persistent = 0
getpower = 0,0
givepower = 35, 35
givepower = 35, 35
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
forcestand = 1
;kill = 0
p2stateno = 3880

[State 1100, HitDef]
type = HitDef
trigger1 = animelem = 2 && var(5) = 1
trigger2 = animelem = 4 && var(5) = 2
attr = S, HA
animtype  = Heavy
air.animtype = Back
damage=ceil(ifelse(((70-(var(5)*7))*fvar(10))<7,7,((70-(var(5)*7))*fvar(10)))),ceil(ifelse(((70-(var(5)*7))*fvar(10)/8)<7,7,((70-(var(5)*7))*fvar(10)/8)))
priority = 7, Hit
hitflag = MAFD
guardflag = HA
pausetime = 6,6
sparkno = S8900+(random%64)
guard.sparkno = S8105
sparkxy = -20, -5
hitsound = S2,12
guardsound = S1,0
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
guard.ctrltime = 20
ground.velocity = -5.5,-6.5
guard.velocity = -8
air.velocity = -5.5,-6.5
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = .00000001
air.cornerpush.veloff = 0
envshake.time = 12
envshake.ampl = 3
fall = 1
fall.recover = 0
air.fall = 1
yaccel = .5
persistent = 0
getpower = 0,0
givepower = 35, 35
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
forcestand = 1
;kill = 0
p2stateno = 3880

[State 1100, HitDef]
type = HitDef
trigger1 = time = 1 && !var(5)
trigger2 = animelem = 3 && var(5) = 1
trigger3 = animelem = 5 && var(5) = 2
attr = S, HA
animtype  = Heavy
air.animtype = Back
damage=ceil(ifelse(((56-(var(5)*7))*fvar(10))<7,7,((56-(var(5)*7))*fvar(10)))),ceil(ifelse(((56-(var(5)*7))*fvar(10)/8)<7,7,((56-(var(5)*7))*fvar(10)/8)))
priority = 7, Hit
hitflag = MAFD
guardflag = HA
pausetime = 0,ceil(13*(2-(var(16)>0))/2)
sparkno = S8900+(random%64)
guard.sparkno = S8105
sparkxy = -20, -5
hitsound = S2,12
guardsound = S1,0
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
guard.ctrltime = 20
ground.velocity = -5.5,-6.5
guard.velocity = -8
air.velocity = -5.5,-6.5
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = .00000001
air.cornerpush.veloff = 0
envshake.time = 20
envshake.ampl = 6
fall = 1
fall.recover = 0
air.fall = 1
yaccel = .5
persistent = 0
getpower = 0,0
givepower = 35, 35
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
forcestand = 1

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(38) = -20

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(39) = -5

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

;---------------------------------------------------------------------------
;秘奥義　天覇断空烈斬（エフェクト）1
[Statedef 7430]
type = S
movetype = I
physics = N
anim = 7400
ctrl = 0
sprpriority = 5

[State 7000, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 1000, 0]
type = BindToRoot
trigger1 = 1
pos = 0,0

[State 0]
type = changeanim
trigger1 = parent,stateno = 3100 & parent,animelemtime(3) >= 0
trigger1 = parent,stateno = 3100 & parent,animelemtime(4) < 0
value = anim
elem = 1
persistent = 1

[State 0]
type = changeanim
trigger1 = parent,stateno = 3100 & parent,animelemtime(4) >= 0
trigger1 = parent,stateno = 3100 & parent,animelemtime(5) < 0
value = anim
elem = 2
persistent = 1

[State 0]
type = changeanim
trigger1 = parent,stateno = 3100 & parent,animelemtime(5) >= 0
trigger1 = parent,stateno = 3100 & parent,animelemtime(6) < 0
value = anim
elem = 3
persistent = 1

[State 0]
type = changeanim
trigger1 = parent,stateno = 3100 & parent,animelemtime(6) >= 0
trigger1 = parent,stateno = 3100 & parent,animelemtime(7) < 0
value = anim
elem = 4
persistent = 1

[State 0]
type = changeanim
trigger1 = parent,stateno = 3100 & parent,animelemtime(7) = 0
value = anim
elem = 5
persistent = 1

[State 7000, End]
type = DestroySelf
trigger1 = anim = 7400 && animtime = 0
trigger2 = parent,time = 1

;------------------------------------------------------------------------------------------
;天覇凄煌斬
[Statedef 3200]
type    = S
movetype = A
physics = N
juggle = 8
ctrl = 0
velset = 0,0

[State 220, Position]
type = PosSet
trigger1 = Time = 0
y = 0

[State 1100, VarSet]
type = VarSet
trigger1 = Time = 0
var(5) = 2

[State 902, 1]
type = ChangeAnim
Trigger1 = Time = 0
value = 3200

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

[State 3000, Superpause]
type = SuperPause
trigger1 = Time = 4
time = 50+(var(5)*2)
movetime = 50+(var(5)*2)
anim = -1
sound = -1
pos = 0,0
darken = 0
p2defmul = 1
poweradd = 0
unhittable = 0

[State 3000, VarSet]
type = VarSet
triggerall = Time = 4
trigger1 = enemynear,stateno != [120,155]
trigger1 = !(enemynear,authorname = "warusaki3" && enemynear,fvar(39) = 1)
trigger1 = !(enemynear,authorname = "H”" && enemynear,fvar(39) = 1)
trigger1 = !(enemynear,authorname = "mouser" && enemynear,name = "Hibiki Takane")
trigger2 = enemynear,authorname = "warusaki3" && enemynear,fvar(39) = 1 && ((enemynear,stateno != [120,155]) && (enemynear,stateno != [4100,4120]))
trigger3 = enemynear,authorname = "H”" && enemynear,fvar(39) = 1 && ((enemynear,stateno != [120,155]) && (enemynear,stateno != [4400,4405]))
trigger4 = enemynear,authorname = "mouser" && enemynear,name = "Hibiki Takane" && ((enemynear,stateno != [120,155]) && (enemynear,stateno != [4100,4120]))
fvar(36) = 50+(var(5)*2)

[State 860, 4]
type = PowerAdd
triggerall = !var(15) && !var(16)
triggerall = !var(20) || var(20) = 2 || var(20) = 6 || (var(20) = 3 && (100*life/const(data.life))<=30 && var(14)) || var(20) = 5
trigger1 = time = 0
value = -3000

[State 860, 4]
type = PowerAdd
triggerall = var(15)
trigger1 = time = 0
value = -1000

[State 860, 5]
type = Varset
trigger1 = time = 0
fvar(13) = 0

[State 860, 5]
type = Varset
trigger1 = time = 0
var(14) = 0

[State 860, 5]
type = Varset
trigger1 = time = 0
var(15) = 0

[State 860, 5]
type = Varset
trigger1 = time = 0
var(16) = 0

[State 3000, AfterImage]
type = AfterImage
triggerall = !var(18) && prevstateno != [3000,3999]
trigger1 = Time = 4
time = 999
TimeGap  = 3
FrameGap = 4
length = 10
PalBright = 1,1,1
PalContrast =  150,50,50
PalAdd = 0,0,0
PalMul = 1,1,1
trans = add1

[State 3001, Super]
type = Helper
trigger1 = Time = 2
id = 8000
name = "Super"
pos = 25,-64
postype = P1
stateno = ifelse((var(20)=[3,5]),8010,8000)
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
;pausemovetime = 999999
supermovetime = 999999
size.xscale = 1
size.yscale = 1

[State 0]
type = changeanim
triggerall = var(2)
trigger1 = AnimElemTime(16) = 0
value = anim
elem = 15
persistent = 1

[State 105, 1]
type = statetypeset
trigger1 = AnimElem = 14
movetype = I

[State 3001, Width]
type = Width
trigger1 = AnimElem = 10
trigger2 = AnimElem = 11
trigger3 = AnimElem = 13
player = 9,0

[State 3001, Width]
type = Width
trigger1 = animelem = 18
player = 0,3

[State 3001, Width]
type = Width
trigger1 = animelem = 19
player = 0,9

[State 3001, Width]
type = Width
trigger1 = animelem = 21
player = 0,15

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 10
trigger2 = AnimElem = 11
trigger3 = AnimElem = 13
x = 24

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 12
x = 12

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 18
x = -18

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 19
x = -24

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 20
x = -12

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 21
x = -30

[State 1100, Voice]
type = PlaySnd
trigger1 = AnimElem = 4
value = 3200,0
channel = 0

[State 1100, Voice]
type = PlaySnd
trigger1 = AnimElem = 5
value = 3200,1
channel = 0

[State 52, Effect]
type = PlaySnd
trigger1 = animelemtime(11) = 4
value = 3200, 2

[State 52, Effect]
type = PlaySnd
triggerall = var(36) = 1 && !var(2)
trigger1 = AnimElem = 16
value = 3200, 3

[State 1000, Spark]
type = Explod
trigger1 = animelemtime(11) = 4
Anim = 7700
pos = 0, 0
postype = p1
ownpal = 1
bindtime = -1
sprpriority = 3
removeongethit = 1

[State 1000, Spark]
type = Explod
trigger1 = animelemtime(11) = 4
Anim = 7701
pos = 0, 0
postype = p1
ownpal = 1
bindtime = -1
sprpriority = 3
removeongethit = 1

[State 1100, HitDef]
type = HitDef
trigger1 = AnimElem = 13
attr = S, HA
animtype  = Heavy
air.animtype = diugup
damage=ceil(ifelse((469*fvar(10))<7,7,(469*fvar(10)))),ceil(ifelse((469*fvar(10)/8)<7,7,(469*fvar(10)/8)))
priority = 7, Hit
hitflag = MAF
guardflag = M
pausetime = 0,17
sparkno = S8900+(random%64)
guard.sparkno = S8105
sparkxy = -30, -45
hitsound = S2,12
guardsound = S1,0
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
guard.ctrltime = 20
ground.velocity = -15,-7.5
guard.velocity = -8
air.velocity = -15,-7.5
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
envshake.time = 25
envshake.ampl = 8
fall = 1
fall.recover = 0
air.fall = 1
yaccel = .5
persistent = 1
getpower = 0,0
givepower = 35, 35
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
forcestand = 1
nochainID = var(40)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(38) = -30

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(39) = -45

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

;---------------------------------------------------------------------------
;天覇凄煌斬（エフェクト）1
[Statedef 7700]
type = S
movetype = I
physics = N
anim = 7700
ctrl = 0
sprpriority = 5

[State 7000, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 1000, 0]
type = BindToRoot
trigger1 = 1
pos = 0,0

[State 0]
type = changeanim
trigger1 = parent,stateno = 3200 & parent,animelemtime(17) < 0
trigger1 = animelem = 9
value = anim
elem = 7
persistent = 1

[State 0]
type = changeanim
trigger1 = parent,stateno = 3200 & parent,animelemtime(17) = 0
value = anim
elem = 9
persistent = 1

[State 7000, End]
type = DestroySelf
trigger1 = anim = 7700 && animtime = 0
trigger2 = parent,time = 1
trigger3 = root,movetype = H

;---------------------------------------------------------------------------
;天覇凄煌斬（エフェクト）1
[Statedef 7701]
type = S
movetype = I
physics = N
anim = 7701
ctrl = 0
sprpriority = 5

[State 7000, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 1000, 0]
type = BindToRoot
trigger1 = 1
pos = 0,0

[State 0]
type = changeanim
trigger1 = parent,stateno = 3200 & parent,animelemtime(12) < 0
value = anim
elem = 1
persistent = 1

[State 0]
type = changeanim
trigger1 = parent,stateno = 3200 & parent,animelemtime(12) >= 0
trigger1 = parent,stateno = 3200 & parent,animelemtime(13) < 0
value = anim
elem = 2
persistent = 1

[State 7000, End]
type = DestroySelf
trigger1 = parent,stateno = 3200 & parent,animelemtime(13) = 0
trigger2 = parent,time = 1
trigger3 = root,movetype = H

;---------------------------------------------------------------------------
;絶命奥義
[Statedef 3300]
type    = S
movetype = A
physics = N
juggle = 8
velset = 0,0
ctrl = 0

[State 220, Position]
type = PosSet
trigger1 = Time = 0
y = 0

[State 1100, VarSet]
type = VarSet
trigger1 = Time = 0
var(5) = 2

[State 902, 1]
type = ChangeAnim
Trigger1 = Time = 0
value = ifelse(var(12),3350,3300)

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

[State 3000, Superpause]
type = SuperPause
trigger1 = Time = 4
time = 50+(var(5)*2)
movetime = 50+(var(5)*2)
anim = -1
sound = -1
pos = 0,0
darken = 0
p2defmul = 1
poweradd = 0
unhittable = 0

[State 3000, VarSet]
type = VarSet
triggerall = Time = 4
trigger1 = enemynear,stateno != [120,155]
trigger1 = !(enemynear,authorname = "warusaki3" && enemynear,fvar(39) = 1)
trigger1 = !(enemynear,authorname = "H”" && enemynear,fvar(39) = 1)
trigger1 = !(enemynear,authorname = "mouser" && enemynear,name = "Hibiki Takane")
trigger2 = enemynear,authorname = "warusaki3" && enemynear,fvar(39) = 1 && ((enemynear,stateno != [120,155]) && (enemynear,stateno != [4100,4120]))
trigger3 = enemynear,authorname = "H”" && enemynear,fvar(39) = 1 && ((enemynear,stateno != [120,155]) && (enemynear,stateno != [4400,4405]))
trigger4 = enemynear,authorname = "mouser" && enemynear,name = "Hibiki Takane" && ((enemynear,stateno != [120,155]) && (enemynear,stateno != [4100,4120]))
fvar(36) = 50+(var(5)*2)

[State 860, 4]
type = PowerAdd
triggerall = !var(15) && !var(16)
triggerall = !var(20) || var(20) = 2 || var(20) = 6 || (var(20) = 3 && (100*life/const(data.life))<=30 && var(14)) || var(20) = 5
trigger1 = time = 0
value = -3000

[State 860, 4]
type = PowerAdd
triggerall = var(15)
trigger1 = time = 0
value = -1000

[State 860, 5]
type = Varset
trigger1 = time = 0
fvar(13) = 0

[State 860, 5]
type = Varset
trigger1 = time = 0
var(14) = 0

[State 860, 5]
type = Varset
trigger1 = time = 0
var(15) = 0

[State 860, 5]
type = Varset
trigger1 = time = 0
var(16) = 0

[State 3000, AfterImage]
type = AfterImage
triggerall = !var(18) && prevstateno != [3000,3999]
trigger1 = Time = 4
time = 999
TimeGap  = 3
FrameGap = 4
length = 10
PalBright = 1,1,1
PalContrast =  150,50,50
PalAdd = 0,0,0
PalMul = 1,1,1
trans = add1

[State 3001, Super]
type = Helper
trigger1 = Time = 2
id = 8000
name = "Super"
pos = ifelse(var(12),1,-16),ifelse(var(12),-60,-45)
postype = P1
stateno = ifelse((var(20)=[3,5]),8010,8000)
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
;pausemovetime = 999999
supermovetime = 999999
size.xscale = 1
size.yscale = 1

[State 3001, Width]
type = Width
trigger1 = 1
edge = 1,0
player = 10,15

[State 1100, Voice]
type = PlaySnd
trigger1 = time = 4 && !var(12)
value = 180,0
channel = 0

[State 1100, Voice]
type = PlaySnd
trigger1 = time = 4 && var(12)
value = 1300,10
channel = 0

[State 1100, Voice]
type = PlaySnd
trigger1 = AnimElem = 11 && !var(12)
trigger2 = AnimElem = 6 && var(12)
value = 100,0

[State 1100, Voice]
type = PlaySnd
trigger1 = AnimElem = 13 && !var(12)
trigger2 = AnimElem = 8 && var(12)
value = 100,1

[State 1100, Voice]
type = PlaySnd
trigger1 = AnimElem = 16 && !var(12)
trigger2 = AnimElem = 11 && var(12)
value = 52,0

[State 1100, Velocity]
type = VelSet
trigger1 = AnimElem = 12 && !var(12)
trigger2 = AnimElem = 7 && var(12)
x = 7.5

[State 1100, Velocity]
type = VelSet
trigger1 = AnimElem = 19 && !var(12)
trigger2 = AnimElem = 14 && var(12)
x = 0

[State 1100, Velocity]
type = VelMul
trigger1 = AnimElemTime(16) > 0 && !var(12)
trigger2 = AnimElemTime(11) > 0 && var(12)
x = .92

[State 1000, Spark]
type = Explod
trigger1 = AnimElem = 12 && !var(12)
trigger2 = AnimElem = 7 && var(12)
Anim = 8040
pos = 0, 0
postype = p1
ownpal = 1
sprpriority = 3
;pausemovetime = -1
supermovetime = -1
scale = .5,.5

[State 1100, HitDef]
type = HitDef
trigger1 = AnimElem = 12 && !var(12)
trigger2 = AnimElem = 7 && var(12)
attr = S, HA
animtype = Heavy
air.animtype = Back
damage = 0,0
priority = 7, Hit
hitflag = MAF
guardflag = M
pausetime = 2,17
sparkno = S8220+(random%8)
guard.sparkno = S8105
sparkxy = -10, -50
hitsound = S2,2
guardsound = S1,0
ground.type = Low
ground.slidetime = 36
ground.hittime = 36
guard.ctrltime = 36
ground.velocity = 0
guard.velocity = -8
air.velocity = -4.5,-6
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -11.2
airguard.cornerpush.veloff = 0
envshake.time = 12
envshake.ampl = 3
fall = 0
fall.recover = 0
air.fall = 1
yaccel = .5
persistent = 1
getpower = 0,0
givepower = 35, 35
palfx.time = 12*var(41)
palfx.add = 255,255,255
palfx.mul = 128,128,128
forcestand = 1
nochainID = var(40)

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(38) = -10

[State 3001, VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
var(39) = -50

[State 901,1]
type = TargetBind
trigger1 = time > 1 && var(36) = 1 && numtarget
pos = 30, 0
time = -1

[State 901, Throw]
type = TargetState
trigger1 = time > 1 && var(36) = 1 && numtarget
value = 3305
ignorehitpause = 1
persistent = 0

[State 1100, ChangeState]
type = ChangeState
triggerall = var(36) = 1 && numtarget
trigger1 = AnimElemTime(7) > 0
value = 3301
ignorehitpause = 1
persistent = 0

[State 1100, ChangeState]
type = ChangeState
triggerall = var(36) = 2 || (var(36) = 1 && !numtarget)
trigger1 = AnimElemTime(7) > 0
value = 3303
ignorehitpause = 1
persistent = 0

[State 1100, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

;------------------------------------------------------------------------------------------
;絶命奥義（成功）
[Statedef 3301]
type    = A
movetype = A
physics = N
anim = 3301
ctrl = 0
velset = 0,0

[State 1000, 0]
type = TargetFacing
trigger1 = time = 0
value = -1

[State 220, Position]
type = PosSet
trigger1 = AnimElem = 1
y = 0

[State 52, Effect]
type = PlaySnd
trigger1 = AnimElem = 1
value = 800, var(12)
channel = 0

[State 3001, Super]
type = Helper
trigger1 = AnimElem = 2
id = 8020
name = "jump Effect"
pos = 0,0
postype = P1
stateno = 8020
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
;pausemovetime = 99999999999999
supermovetime = 99999999999999

[State 1100, Velocity]
type = VelSet
trigger1 = AnimElem = 2
x = ifelse(((-80*facing)-pos x)*.05*facing>-2,-2,((-80*facing)-pos x)*.05*facing)
y = -5

[State 1100, Gravity]
type = Veladd
trigger1 = animelemtime(2) > 0
y = .5

[State 1201, screenbound]
type = screenbound
trigger1 = 1
value = 1
movecamera = 0,0

[State 1100, ChangeState]
type = ChangeState
triggerall = animelemtime(2) > 0
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 3302

;------------------------------------------------------------------------------------------
;絶命奥義（成功）（一閃）
[Statedef 3302]
type    = S
movetype = A
physics = N
anim = 3302
ctrl = 0
velset = 0,0

[State 220, Position]
type = PosSet
trigger1 = AnimElem = 1
y = 0

[State 1100, ChangeState]
type = ChangeState
triggerall = time = 0
trigger1 = target,life < (385*fvar(10))
value = 3310+var(12)

[STate 901,1]
type = targetstate
trigger1 = animelem = 3
value = 3306

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

[State 52, Effect]
type = PlaySnd
trigger1 = Time = 0
value = 52, 0
channel = 20

[State 1100, Voice]
type = PlaySnd
trigger1 = AnimElem = 2
value = 100,10

[State 1100, Voice]
type = PlaySnd
trigger1 = AnimElem = 3
value = 3200,2

[State 52, Effect]
type = PlaySnd
trigger1 = AnimElem = 3
value = 2, 12

[State 52, Effect]
type = PlaySnd
triggerall = !var(12)
trigger1 = AnimElem = 3
value = 180, 1
channel = 0

[State 52, Effect]
type = PlaySnd
triggerall = var(12)
trigger1 = AnimElem = 3
value = 185, 10
channel = 0

[State 52, Effect]
type = PlaySnd
triggerall = var(12)
trigger1 = AnimElemTime(5) = 70
value = 185, 11
channel = 0

[State 1000, Spark]
type = Explod
trigger1 = Time = 0
Anim = 8030
pos = 0, 0
postype = p1
ownpal = 1
sprpriority = -3
;pausemovetime = -1
supermovetime = -1
scale = .5,.5

[State 1000, Spark]
type = Explod
trigger1 = AnimElem = 2
Anim = 8040
pos = 0, 0
postype = p1
ownpal = 1
sprpriority = 3
;pausemovetime = -1
supermovetime = -1
scale = .5,.5

[State 1000, Spark]
type = Explod
trigger1 = AnimElem = 3
Anim = 7030
pos = 0, 0
postype = p1
ownpal = 1
sprpriority = 3
bindtime = -1

[State 1000, Spark]
type = Explod
trigger1 = AnimElem = 3
Anim = 8900+(random%64)
pos = 60, -50
postype = p1
ownpal = 1
ontop = 1
pausemovetime = 99999999999999
supermovetime = 99999999999999

[State 1100, Velocity]
type = VelSet
trigger1 = AnimElem = 2
x = 8

[State 1100, Gravity]
type = VelMul
trigger1 = animelemtime(3) > 0
x = .95

[State 1201, screenbound]
type = screenbound
trigger1 = 1
value = 1
movecamera = 0,0

[State 903, EnvShake]
type = EnvShake
trigger1 = AnimElem = 3
time = 45
ampl = 9

[State 3001, Add Hits!]
type = HitAdd
trigger1 = AnimElem = 3
value = 1

[State -2, Combo]
type = VarAdd
trigger1 = AnimElem = 3
var(17) = 1
ignorehitpause = 1

[State 180, 1]
type = VarAdd
trigger1 = AnimElem = 3
var(50)=500
ignorehitpause = 1
persistent = 1

[State 180, 1]
type = VarAdd
triggerall = var(17) >= 2
trigger1 = AnimElem = 3
var(50)=ifelse(var(17)<6,2000,500)
ignorehitpause = 1
persistent = 1

[State 901, Hurt]
type = TargetLifeAdd
trigger1 = AnimElem = 3
value = ceil(ifelse((-385*fvar(10))>-7,-7,(-385*fvar(10))))

[State 901, Hurt]
type = TargetPowerAdd
trigger1 = AnimElem = 3
value = 35

[State 1100, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;絶命奥義（ガード）
[Statedef 3303]
type    = A
physics = N
ctrl = 0
anim = 3303
velset = 0,0

[State 3001, Super]
type = Helper
trigger1 = AnimElem = 1
id = 8020
name = "jump Effect"
pos = 0,0
postype = P1
stateno = 8020
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
;pausemovetime = 99999999999999
supermovetime = 99999999999999

[State 105, 1]
type = VelSet
trigger1 = AnimElem = 1
x = -4
y = -4.5

[State 105, 1]
type = VelAdd
trigger1 = AnimElemTime(1) > 0
y = .65

[State 105, 3]
type = ChangeState
trigger1 = AnimElemTime(1) > 0
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 3304

;---------------------------------------------------------------------------
;絶命奥義（着地）
[Statedef 3304]
type    = S
physics = S
ctrl = 0
velset = 0,0
anim = 3304

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

[State 52, Effect]
type = PlaySnd
trigger1 = Time = 0
value = 52, 0
channel = 20

[State 1000, Spark]
type = Explod
trigger1 = Time = 0
Anim = 8030
pos = 0, 0
postype = p1
ownpal = 1
sprpriority = -3
;pausemovetime = -1
supermovetime = -1
scale = .5,.5

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

;---------------------------------------------------------------------------
;絶命奥義（相手）1
[Statedef 3305]
type = S
movetype = H
physics = S
ctrl = 0
velset = 0,0

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

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

[State 3003, ChangeAnim]
type = ChangeAnim
trigger1 = !HitShakeOver
value = 5002

[State 3003, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 5002 && animtime = 0
value = 5007

[State 1201, screenbound]
type = screenbound
trigger1 = 1
value = 0

[State 105, 1]
type = VelSet
trigger1 = HitShakeOver
x = -pos x*.125*facing
persistent = 0

[State 105, 1]
type = PosSet
triggerall = HitShakeOver
trigger1 = vel x < 0 && pos x < 0 && facing = 1
trigger2 = vel x >= 0 && pos x >= 0 && facing = 1
trigger3 = vel x < 0 && pos x >= 0 && facing = -1
trigger4 = vel x >= 0 && pos x < 0 && facing = -1
x = 0

[State 105, 1]
type = VelSet
triggerall = HitShakeOver
trigger1 = vel x < 0 && pos x < 0 && facing = 1
trigger2 = vel x >= 0 && pos x >= 0 && facing = 1
trigger3 = vel x < 0 && pos x >= 0 && facing = -1
trigger4 = vel x >= 0 && pos x < 0 && facing = -1
x = 0

;---------------------------------------------------------------------------
;絶命奥義（相手）2
[Statedef 3306]
type = S
movetype = H
physics = S
velset = 0,0
ctrl = 0

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

[State 906, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0

[State 3003, ChangeAnim]
type = ChangeAnim
triggerall = Time < 60 && SelfAnimExist(5950)
trigger1 = AuthorName = "Tin" || AuthorName = "Mouser" || AuthorName = "H”" || AuthorName = "adamskie" 
trigger2 = AuthorName = "M.M.R." || AuthorName = "ryokucha" || AuthorName = "Bad Darkness" || AuthorName = "Third"
trigger3 = AuthorName = "CAMRAT Type KOF" || AuthorName = "keyu" || AuthorName = "Warusaki3"
trigger4 = AuthorName = "NHK" || AuthorName = "Nyankoro" || AuthorName = "Nyan☆Kiryu"
trigger5 = AuthorName = "aoao" || AuthorName = "SUMI" || AuthorName = "Mr.X-file"
trigger6 = AuthorName = "laiso_7" || AuthorName = "yu-go" || AuthorName = "MEKA"
trigger7 = AuthorName = "CROSS†CAT" || AuthorName = "CrossCat"
value = 5950

[State 3003, ChangeAnim]
type = ChangeAnim2
trigger1 = Time < 60 && anim != 5950
value = 3305

[State 3003, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 3305 && animtime = 0
value = 5080

[State 3003, ChangeAnim]
type = ChangeState
trigger1 = anim = 5950 && AnimElemTime(AnimElemNo(0)+1)=0
trigger2 = anim = 5080 && AnimElemTime(AnimElemNo(0)+1)=0
value = 3307

;---------------------------------------------------------------------------
;絶命奥義（相手）3
[Statedef 3307]
type = L
movetype = H
physics = N
velset = 0,0
ctrl = 0

[State 906, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0

[State 3450,1]
type = ChangeAnim
triggerall = Anim != 5950
trigger1 = time = 0
value = 5110+(SelfAnimExist(5112)*2)

[State 1100, turn]
type = turn
triggerall = Time = 40
trigger1 = Name = "cvszangief" && AuthorName = "warusaki3"
trigger2 = Name = "cvszangief_normal" && AuthorName = "warusaki3"
trigger3 = Name = "cvszangief_ex" && AuthorName = "warusaki3"
trigger4 = Name = "raiden" && AuthorName = "H”"

[State 3002, ChangeAnim]
type = SelfState
trigger1 = Time = 40
value = ifelse(alive, 5120, 5150)

;------------------------------------------------------------------------------------------
;絶命奥義　天覇凄煌斬
[Statedef 3310]
type    = S
movetype = A
physics = N
anim = 3310
ctrl = 0
velset = 0,0

[State 220, Position]
type = PosSet
trigger1 = AnimElem = 1
y = 0

[STate 901,1]
type = targetstate
trigger1 = animelem = 16
value = 3315

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 13
trigger2 = AnimElem = 14
trigger3 = AnimElem = 16
x = 24

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 15
x = 12

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 20
x = -18

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 21
x = -24

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 22
x = -12

[State 220, Position]
type = PosAdd
trigger1 = AnimElem = 23
x = -30

[State 52, Effect]
type = PlaySnd
trigger1 = Time = 0
value = 52, 0
channel = 20

[State 1100, Voice]
type = PlaySnd
trigger1 = AnimElem = 1
value = 3200,0
channel = 0

[State 1100, Voice]
type = PlaySnd
trigger1 = AnimElem = 11
value = 3200,1
channel = 0

[State 52, Effect]
type = PlaySnd
trigger1 = animelemtime(14) = 4
value = 3200, 2

[State 52, Effect]
type = PlaySnd
trigger1 = AnimElem = 16
value = 3200, 3

[State 52, Effect]
type = PlaySnd
trigger1 = AnimElem = 16
value = 2, 12

[State 1000, Spark]
type = Explod
trigger1 = Time = 0
Anim = 8030
pos = 0, 0
postype = p1
ownpal = 1
sprpriority = -3
;pausemovetime = -1
supermovetime = -1
scale = .5,.5

[State 1000, Spark]
type = Explod
trigger1 = AnimElem = 16
Anim = 8900+(random%64)
pos = 60, -50
postype = p1
ownpal = 1
ontop = 1
pausemovetime = 99999999999999
supermovetime = 99999999999999

[State 1000, Spark]
type = Explod
trigger1 = animelemtime(14) = 4
Anim = 7710
pos = 0, 0
postype = p1
ownpal = 1
bindtime = -1
sprpriority = 3
removeongethit = 1

[State 1000, Spark]
type = Explod
trigger1 = animelemtime(14) = 4
Anim = 7711
pos = 0, 0
postype = p1
ownpal = 1
bindtime = -1
sprpriority = 3
removeongethit = 1

[State 1201, screenbound]
type = screenbound
trigger1 = 1
value = 1
movecamera = 0,0

[State 903, EnvShake]
type = EnvShake
trigger1 = AnimElem = 16
time = 60
ampl = 12

[State 3001, Add Hits!]
type = HitAdd
trigger1 = AnimElem = 16
value = 1

[State -2, Combo]
type = VarAdd
trigger1 = AnimElem = 16
var(17) = 1
ignorehitpause = 1

[State 180, 1]
type = VarAdd
trigger1 = AnimElem = 16
var(50)=500
ignorehitpause = 1
persistent = 1

[State 180, 1]
type = VarAdd
triggerall = var(17) >= 2
trigger1 = AnimElem = 16
var(50)=ifelse(var(17)<6,2000,500)
ignorehitpause = 1
persistent = 1

[State 901, Hurt]
type = TargetLifeAdd
trigger1 = AnimElem = 16
value = -999999

[State 901, Hurt]
type = TargetPowerAdd
trigger1 = AnimElem = 16
value = 35

[State 1100, ChangeState]
type = ChangeState
trigger1 = roundstate > 2
trigger1 = AnimElem = 24
value = 3311

[State 1100, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;絶命奥義　天覇凄煌斬（終了）（KO時1）
[Statedef 3311]
type    = S
movetype = I
physics = S
ctrl = 1
anim = 3311

[State 1100, Voice]
type = PlaySnd
trigger1 = time = 1
value = 180,1
channel = 0

[State 1100, Voice]
type = PlaySnd
trigger1 = time = 1
value = 2000,0

[State 3810,5]
type = Changestate
trigger1 = p2movetype = A
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;絶命奥義　天覇凄煌斬（終了）（KO時2）
[Statedef 3312]
type    = S
physics = S
ctrl = 0
velset = 0,0

[State 184,3]
type = Assertspecial
trigger1 = Time <= 150
flag = roundnotover

;---------------------------------------------------------------------------
;絶命奥義　天覇凄煌斬（相手）
[Statedef 3315]
type    = A
movetype =  H
physics = N
velset = 0,0
sprpriority = -1

[State 1201, screenbound]
type = screenbound
trigger1 = 1
value = 1

[State 902, 1]
type = ChangeAnim
trigger1 = Time < 20
value = 5002

[State 902, 1]
type = ChangeAnim
trigger1 = anim = 5002 && AnimTime = 0
value = 5050

[State 5050, 2] ;Coming down anim
type = ChangeAnim
trigger1 = anim = [5050,5059]
trigger1 = Vel Y >= 1
trigger1 = SelfAnimExist(anim+10)
value = anim+10
persistent = 0

[State 105, 1]
type = VelSet
trigger1 = time = 0
x = -2
y = -1

[State 105, 1]
type = VelAdd
trigger1 = 1
y = .02

[State 105, 1]
type = VelAdd
trigger1 = time > 100
y = .45

[State 901, State End]
type = SelfState
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 5100

;------------------------------------------------------------------------------------------
;絶命奥義　臓腑抉り
[Statedef 3320]
type    = S
movetype = A
physics = N
anim = 3320
ctrl = 0
velset = 0,0

[State 220, Position]
type = PosSet
trigger1 = AnimElem = 1
y = 0

[STate 901,1]
type = targetstate
trigger1 = animelem = 5
value = 3325

[State 810,TargetBind]
type = TargetBind
trigger1 = animelem = 6
pos = 40, 0
time = 1

[State 105, 1]
type = VelSet
trigger1 = AnimElem = 5
x = 9

[State 105, 1]
type = VelSet
trigger1 = AnimElem = 6
x = 0

[State 105, 1]
type = VelMul
trigger1 = 1
x = .92

[State 52, Effect]
type = PlaySnd
trigger1 = Time = 0
value = 52, 0
channel = 20

[State 52, Effect]
type = PlaySnd
trigger1 = AnimElemTime(5) = 4
value = 2, 2

[State 52, Effect]
type = PlaySnd
trigger1 = AnimElem = 11
trigger2 = AnimElem = 25
trigger3 = AnimElem = 28
value = 2, 12

[State 1100, Voice]
type = PlaySnd
trigger1 = AnimElem = 13
value = 3300,10
channel = 0

[State 1100, Voice]
type = PlaySnd
trigger1 = AnimElemTime(27) = 10
value = 3300,11
channel = 0

[State 1000, Spark]
type = Explod
trigger1 = Time = 0
Anim = 8030
pos = 0, 0
postype = p1
ownpal = 1
sprpriority = -3
;pausemovetime = -1
supermovetime = -1
scale = .5,.5

[State 1000, Spark]
type = Explod
trigger1 = AnimElemTime(5) = 4
Anim = 8220+(random%8)
pos = 40, -40
postype = p1
ownpal = 1
ontop = 1
pausemovetime = 99999999999999
supermovetime = 99999999999999

[State 1000, Spark]
type = Explod
trigger1 = AnimElem = 25
Anim = 7900
pos = 0, 0
postype = p1
ownpal = 1
sprpriority = 3
ID = 7900

[State 1100, ChangeState]
type = ChangeState
trigger1 = roundstate > 2
trigger1 = AnimElem = 38
value = 3321

[State 1000, Spark]
type = RemoveExplod
trigger1 = AnimElem = 38
ID = 7900

[State 1201, screenbound]
type = screenbound
trigger1 = 1
value = 1
movecamera = 0,0

[State 903, EnvShake]
type = EnvShake
trigger1 = AnimElemTime(5) = 4
trigger2 = AnimElem = 11
trigger3 = AnimElem = 25
trigger4 = AnimElem = 28
time = 12
ampl = 5

[State 3001, Add Hits!]
type = HitAdd
trigger1 = AnimElemTime(5) = 4
trigger2 = AnimElem = 11
trigger3 = AnimElem = 25
value = 1

[State -2, Combo]
type = VarAdd
trigger1 = AnimElemTime(5) = 4
trigger2 = AnimElem = 11
trigger3 = AnimElem = 25
var(17) = 1
ignorehitpause = 1

[State 180, 1]
type = VarAdd
trigger1 = AnimElemTime(5) = 4
trigger2 = AnimElem = 11
trigger3 = AnimElem = 25
var(50)=500
ignorehitpause = 1
persistent = 1

[State 180, 1]
type = VarAdd
triggerall = var(17) >= 2
trigger1 = AnimElemTime(5) = 4
trigger2 = AnimElem = 11
trigger3 = AnimElem = 25
var(50)=ifelse(var(17)<6,2000,500)
ignorehitpause = 1
persistent = 1

[State 901, Hurt]
type = TargetLifeAdd
trigger1 = AnimElem = 25
value = -999999

[State 901, Hurt]
type = TargetPowerAdd
trigger1 = AnimElem = 25
value = 35

[State 1100, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;絶命奥義　臓腑抉り（終了）（KO時1）
[Statedef 3321]
type    = S
movetype = I
physics = S
ctrl = 1
anim = 3321

[State 3810,5]
type = Changestate
trigger1 = p2movetype = A
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;絶命奥義　臓腑抉り（終了）（KO時2）
[Statedef 3322]
type    = S
physics = S
ctrl = 0
velset = 0,0

[State 184,3]
type = Assertspecial
trigger1 = Time <= 100
flag = roundnotover

;---------------------------------------------------------------------------
;絶命奥義　臓腑抉り（相手）1
[Statedef 3325]
type = S
movetype = H
physics = N
velset = 0,0
ctrl = 0

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

[State 906, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0

[State 105, 1]
type = VelSet
trigger1 = anim = 3325 && AnimElem = 4
x = -2

[State 105, 1]
type = VelSet
trigger1 = vel x > -.5
x = 0

[State 105, 1]
type = VelMul
trigger1 = 1
x = .98

[State 3003, ChangeAnim]
type = ChangeAnim2
trigger1 = time = 0
value = 3325

[State 3003, ChangeAnim]
type = ChangeAnim
triggerall = Anim = 3325 && AnimTime = 0 && SelfAnimExist(5950)
trigger1 = AuthorName = "Tin" || AuthorName = "Mouser" || AuthorName = "H”" || AuthorName = "adamskie" 
trigger2 = AuthorName = "M.M.R." || AuthorName = "ryokucha" || AuthorName = "Bad Darkness" || AuthorName = "Third"
trigger3 = AuthorName = "CAMRAT Type KOF" || AuthorName = "keyu" || AuthorName = "Warusaki3"
trigger4 = AuthorName = "NHK" || AuthorName = "Nyankoro" || AuthorName = "Nyan☆Kiryu"
trigger5 = AuthorName = "aoao" || AuthorName = "SUMI" || AuthorName = "Mr.X-file"
trigger6 = AuthorName = "laiso_7" || AuthorName = "yu-go" || AuthorName = "MEKA"
trigger7 = AuthorName = "CROSS†CAT" || AuthorName = "CrossCat"
value = 5950

[State 3003, ChangeAnim]
type = ChangeAnim2
trigger1 = Anim = 3325 && AnimTime = 0 && anim != 5950
value = 3305

[State 3003, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 3305 && animtime = 0
value = 5080

[State 3003, ChangeAnim]
type = ChangeState
trigger1 = anim = 5950 && AnimElemTime(AnimElemNo(0)+1)=0
trigger2 = anim = 5080 && AnimElemTime(AnimElemNo(0)+1)=0
value = 3307

;---------------------------------------------------------------------------
; HITA_SHAKE
[Statedef 3820]
type    = A
movetype= H
physics = N
velset = 0,0

[State 5020, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = ifelse((GetHitVar(airtype) = 1),5000,5010) + GetHitVar(animtype)

[State 5020, 2] ;Anim for HIT_BACK
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5030

[State 5020, 3] ;Anim for HIT_UP/HIT_DIAGUP (only if it exists)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) ;5051 - 4 + type

[State 5020, 4] ;Freeze anim
type = ChangeAnim
trigger1 = Time > 0
value = anim

[State 5020, 5]
type = ChangeState
trigger1 = HitShakeOver
value = 3830

;---------------------------------------------------------------------------
; HITA_UP (initial going up)
[Statedef 3830]
type    = A
movetype= H
physics = N
ctrl = 0

[State 5030, 1]
type = VelAdd;Gravity
trigger1 = 1
y = GetHitVar(yaccel)

[State 5030, 2]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 5030, 4]
type = ChangeState
trigger1 = HitOver
trigger2 = Vel Y > 0 ;Hit ground
trigger2 = Pos Y >= 10  ;.
value = 3850 ;HITA_FALL

[State 5030, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 3835 ;HITA_UP (transition)

;---------------------------------------------------------------------------
; HITA_UP_T (transition)
[Statedef 3835]
type    = A
movetype= H
physics = N

[State 5035, 1]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = SelfAnimExist(5035)
trigger1 = Anim != [5051,5059] ;Not if in hit up anim
trigger1 = Anim != 5090 ;Not if hit off ground anim
value = 5035

[State 5035, 2]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5035, 4]
type = ChangeState
trigger1 = HitOver  ;Hit is over
trigger2 = AnimTime = 0 ;Anim is over
trigger3 = Vel Y > 0 ;Hit ground
trigger3 = Pos Y >= 10  ;.
trigger4 = Time = 0  ;No transition anim
trigger4 = Anim != 5035 ;.
value = 3850 ;HITA_FALL

;---------------------------------------------------------------------------
; HITA_FALL (knocked up, falling)
[Statedef 3850]
type    = A
movetype= H
physics = N

[State 5050, 1] ;Change anim when done with transition
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = Anim = 5035
trigger2 = Time = 0  ;If no transition anim
trigger2 = Anim != 5035
trigger2 = (Anim != [5051, 5059]) && (Anim != [5061, 5069])
trigger2 = Anim != 5090 ;Not if hit off ground anim
value = 5050

[State 5050, 2] ;Coming down anim
type = ChangeAnim
trigger1 = anim = [5050,5059]
trigger1 = Vel Y >= ifelse(anim = 5050, 1, -2)
trigger1 = SelfAnimExist(anim+10)
value = anim+10
persistent = 0

[State 5050, 3] ;Gravity
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5050, 6]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= ifelse((anim = [5051,5059]) || (anim = [5061,5069]), 0, 25)
value = 3900 ;HIT_BOUNCE

;---------------------------------------------------------------------------
; HITL_SHAKE
[Statedef 3880]
type    = L
movetype= H
physics = N
velset = 0,0

[State 5080, 1] ;Set default anim
type = VarSet
trigger1 = time = 0
sysvar(2) = ifelse(GetHitVar(yvel) = 0, 5080, 5090)

[State 5080, 2]
type = VarAdd
trigger1 = time = 0
trigger1 = (anim = [5081,5089]) || (anim = [5111,5119])
trigger1 = SelfAnimExist(sysvar(2) + (anim % 10))
sysvar(2) = anim % 10

[State 5080, 3] ;If 5090 doesn't exist, default to 5030
type = VarSet
trigger1 = time = 0
trigger1 = sysvar(2) = 5090
trigger1 = !SelfAnimExist(5090)
sysvar(2) = 5030

[State 5080, 3] ;Freeze
type = ChangeAnim
trigger1 = 1
value = sysvar(2)

[State 5080, 4]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0
value = 3881 ;HITL_SLIDE

[State 5080, 5]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) != 0
value = 3830 ;HITA_UP

;---------------------------------------------------------------------------
; HITL_SLIDE
[Statedef 3881]
type    = L
movetype= H
physics = C

[State 5081, 1]
type = HitVelSet
trigger1 = Time = 0
x = 1

[State 5081, 2]
type = VelSet
trigger1 = HitOver
x = 0

[State 5081, 3] ;Don't show hit ground frame
type = VarSet
trigger1 = Time = 0
sysvar(0) = 1

[State 5081, 4]
type = ChangeState
trigger1 = HitOver
value = 3910 ;HIT_LIEDOWN

;---------------------------------------------------------------------------
; HIT_BOUNCE (hit ground)
[Statedef 3900]
type    = L
movetype= H
physics = N

[State 5100, 1]
type = VelSet
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) = 0
trigger1 = vel x > 1
x = 1

[State 5100, EnvShake]
type = FallEnvShake
trigger1 = Time = 0

[State 5100, Var] ;Save fall velocity
type = VarSet
trigger1 = Time = 0
sysvar(1) = floor(vel y)

[State 5100, 2] ;Hit ground anim (normal)
type = ChangeAnim
triggerall = time = 0
trigger1 = (anim != [5051,5059]) && (anim != [5061,5069])
trigger2 = !SelfAnimExist(5100 + (anim % 10))
value = 5100

[State 5100, 3] ;Hit ground anim (for hit up)
type = ChangeAnim
trigger1 = time = 0
trigger1 = (anim = [5051,5059]) || (anim = [5061,5069])
trigger1 = SelfAnimExist(5100 + (anim % 10))
value = 5100 + (anim % 10)

[State 5100, 4]
type = PosSet
trigger1 = Time = 0
y = 0

[State 5100, 5]
type = VelSet
trigger1 = Time = 0
y = 0

[State 5100, 6] ;Reduce speed
type = VelMul
trigger1 = Time = 0
x = 0.75

[State 5100, 7]
type = ChangeState
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) = 0
value = 3910 ;HIT_LIEDOWN

[State 5100, 8]
type = GameMakeAnim
trigger1 = Time = 1
value = 60 + (sysvar(1) > 5) + (sysvar(1) > 14)
pos = 0, 0
under = sysvar(1) <= 14

[State 5100, 9]
type = HitFallDamage
trigger1 = Time = 3

[State 5100, 10]
type = PlaySnd
trigger1 = Time = 1
value = F7, (sysvar(1) > 5) + (sysvar(1) > 14)

[State 5100, 11]
type = PosFreeze
trigger1 = 1

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

;---------------------------------------------------------------------------
; HIT_BOUNCE (bounce into air)
[Statedef 3901]
type    = L
movetype= H
physics = N

[State 5101, 1] ;Coming hit ground anim (normal)
type = ChangeAnim
triggerall = time = 0
trigger1 = anim != [5101,5109]
trigger2 = !SelfAnimExist(5160 + (anim % 10))
value = 5160

[State 5101, 2] ;Coming hit ground anim (for hit up)
type = ChangeAnim
triggerall = time = 0
trigger1 = anim = [5101,5109]
trigger1 = SelfAnimExist(5160 + (anim % 10))
value = 5160 + (anim % 10)

[State 5101, 3]
type = HitFallVel
trigger1 = Time = 0

[State 5101, 4]
type = PosSet
trigger1 = Time = 0
y = 20

[State 5101, 5] ;Acceleration
type = VelAdd
trigger1 = 1
y = .4

[State 5101, 6] ;Hit ground
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 12
type = ChangeState
value = 3910

;---------------------------------------------------------------------------
; HIT_LIEDOWN
[Statedef 3910]
type    = L
movetype= H
physics = N

[State 5110, EnvShake]
type = FallEnvShake
trigger1 = Time = 0

[State 5110, 1] ;For hit up/up-diag type (from state 5081)
type = ChangeAnim
persistent = 0
trigger1 = SelfAnimExist(5110 + (anim % 10))
trigger1 = anim = [5081,5089]
value = 5110 + (anim % 10)

[State 5110, 2] ;Hit ground anim (normal)
type = ChangeAnim
triggerall = time = 0
triggerall = anim != [5110,5119] ;Not already changed anim
trigger1 = anim != [5161,5169]
trigger2 = !SelfAnimExist(5170 + (anim % 10))
value = 5170

[State 5110, 3] ;Hit ground anim (for hit up)
type = ChangeAnim
triggerall = time = 0
triggerall = anim != [5110,5119] ;Not already changed anim
trigger1 = anim = [5161,5169]
trigger1 = SelfAnimExist(5170 + (anim % 10))
value = 5170 + (anim % 10)

[State 5110, 4]
type = HitFallDamage
trigger1 = Time = 0

[State 5110, 5]
type = PosSet
trigger1 = Time = 0
y = 0

[State 5110, Var] ;Get fall velocity
type = VarSet
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) != 0
sysvar(1) = floor(vel y)

[State 5110, 6]
type = PlaySnd
trigger1 = Time = 0
trigger1 = !SysVar(0)
value = F7, (sysvar(1) > 5) + (sysvar(1) > 14)

[State 5110, 7]
type = GameMakeAnim
trigger1 = Time = 0
trigger1 = !SysVar(0)
value = 60 + (sysvar(1) > 5) + (sysvar(1) > 14)
pos = 0, 0
under = sysvar(1) <= 14

[State 5110, 8]
type = VelSet
trigger1 = Time = 0
y = 0

[State 5110, 9] ;For hit up type
type = ChangeAnim
persistent = 0
triggerall = anim = [5171,5179]
triggerall = SelfAnimExist(5110 + (anim % 10))
trigger1 = AnimTime = 0
trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground anim
value = 5110 + (anim % 10)

[State 5110, 10] ;For normal
type = ChangeAnim
persistent = 0
triggerall = Anim != [5111,5119]
trigger1 = AnimTime = 0
trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground frame
value = 5110

[State 5110, 11] ;If just died
type = SelfState
triggerall = !alive
trigger1 = AnimTime = 0
trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground frame
trigger3 = Anim = [5110,5119]
value = 5150

[State 5110, 11] ;If just died
type = SelfState
trigger1 = time = 70
value = 5120

[State 5110, 12]
type = VarSet
trigger1 = SysVar(0)
trigger1 = Time = 0
sysvar(0) = 0

[State 5110, 13] ;Friction
type = VelMul
trigger1 = 1
x = 0.85

;---------------------------------------------------------------------------
;斬撃エフェクト
[Statedef 7000]
type = S
movetype = I
physics = N
anim = 6900
ctrl = 0
sprpriority = 5

[State 7000, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 7000, ChangeAnim]
type = ChangeAnim
triggerall = Time = 0
trigger1 = parent,StateNo = 200
value = 7000

[State 7000, ChangeAnim]
type = ChangeAnim
triggerall = Time = 0
trigger1 = parent,StateNo = 210
trigger2 = parent,StateNo = 300
value = 7010

[State 7000, ChangeAnim]
type = ChangeAnim
triggerall = Time = 0
trigger1 = parent,StateNo = 211
value = 7011

[State 7000, ChangeAnim]
type = ChangeAnim
triggerall = Time = 0
trigger1 = parent,StateNo = 220
trigger2 = parent,StateNo = 310
value = 7020

[State 7000, ChangeAnim]
type = ChangeAnim
triggerall = Time = 0
trigger1 = parent,StateNo = 221
value = 7021

[State 7000, ChangeAnim]
type = ChangeAnim
triggerall = Time = 0
trigger1 = parent,StateNo = 400
value = 7100

[State 7000, ChangeAnim]
type = ChangeAnim
triggerall = Time = 0
trigger1 = parent,StateNo = 410
value = 7110

[State 7000, ChangeAnim]
type = ChangeAnim
triggerall = Time = 0
trigger1 = parent,StateNo = 420
value = 7120

[State 7000, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = parent,StateNo = 600
value = 7200

[State 7000, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = parent,StateNo = 610
value = 7210

[State 7000, ChangeAnim]
type = ChangeAnim
triggerall = Time = 0
trigger1 = parent,StateNo = 620
trigger2 = parent,StateNo = 3101
value = 7220

[State 7000, Bind]
type = BindToParent
trigger1 = 1
pos = 0,0

[State 7000, End]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = parent,time = 1
trigger3 = root,movetype = H

;---------------------------------------------------------------------------
;ヒットウェイト
[Statedef 8200]
type = A
movetype = I
physics = N
anim = 6900

[State 8200, Hit Wait]
type = pause
triggerall = roundstate = 2
trigger1 = Time%4!=0
time = 1

[State 8200, DestroySelf]
type = DestroySelf
trigger1 = time = 16

;---------------------------------------------------------------------------
;ブロッキング（立ち）
[Statedef 4000]
type = S
movetype = I
physics = S
ctrl = 0
velset = 0,0
anim = 4000

[State 4000, VarAdd]
type = VarAdd
trigger1 = time = 0
var(50)=2000
ignorehitpause = 1

[State 4000, PowerAdd]
type = PowerAdd
trigger1 = time = 0
value = 300

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

[State 4000, PalFX]
type = PalFX
trigger1 = animelemtime(2)>=0 && animelemtime(3)<0
time = 1
add = 80,80,255

[State 4000, PlaySnd];ガード音
type = PlaySnd
trigger1 = Time = 0
value = 4000,0

[State 4000, PlaySnd];声
type = PlaySnd
trigger1 = Time = 0
value = 0,var(12)

[State 4000, Explod];エフェクト
type = Explod
trigger1 = Time = 0
anim = 8065
pos = 35,-68
sprpriority = 3
ownpal = 1
scale = .5,.5
pausemovetime = 15
supermovetime = 99999999999999
ignorehitpause = 1

[State 4000, Pause]
type = Pause
trigger1 = time = 1
time = 14
movetime = 14

[State 4000, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;ブロッキング（屈）
[Statedef 4010]
type = C
movetype = I
physics = C
ctrl = 0
velset = 0,0
anim = 4010

[State 4010, VarAdd]
type = VarAdd
trigger1 = time = 0
var(50)=2000
ignorehitpause = 1

[State 4010, PowerAdd]
type = PowerAdd
trigger1 = time = 0
value = 300

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

[State 4010, PalFX]
type = PalFX
trigger1 = animelemtime(2)>=0 && animelemtime(3)<0
time = 1
add = 80,80,255

[State 4010, PlaySnd];ガード音
type = PlaySnd
trigger1 = Time = 0
value = 4000,0

[State 4010, PlaySnd];声
type = PlaySnd
trigger1 = Time = 0
value = 0,var(12)

[State 4010, Explod];エフェクト
type = Explod
trigger1 = Time = 0
anim = 8065
pos = 18,-27
sprpriority = 3
ownpal = 1
scale = .5,.5
pausemovetime = 15
supermovetime = 99999999999999
ignorehitpause = 1

[State 4010, Pause]
type = Pause
trigger1 = time = 1
time = 14
movetime = 14

[State 4010, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
;ブロッキング（空中）
[Statedef 4020]
type = A
movetype = I
physics = N
ctrl = 0
anim = 4020
velset = 0,0

[State 4020, VarAdd]
type = VarAdd
trigger1 = time = 0
var(50)=2000
ignorehitpause = 1

[State 4020, PowerAdd]
type = PowerAdd
trigger1 = time = 0
value = 300

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

[State 4020, PalFX]
type = PalFX
trigger1 = animelemtime(2)>=0 && animelemtime(3)<0
time = 1
add = 80,80,255

[State 4020, PlaySnd];ガード音
type = PlaySnd
trigger1 = Time = 0
value = 4000,0

[State 4020, PlaySnd];声
type = PlaySnd
trigger1 = Time = 0
value = 0,var(12)

[State 4020, Explod];エフェクト
type = Explod
trigger1 = Time = 0
anim = 8065
pos = 31,-57
sprpriority = 3
ownpal = 1
scale = .5,.5
pausemovetime = 15
supermovetime = 99999999999999
ignorehitpause = 1

[State 4020, Pause]
type = Pause
trigger1 = time = 1
time = 14
movetime = 14

[State 4020, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 4030

;---------------------------------------------------------------------------
;空中ブロッキング後
[Statedef 4030]
type = A
physics = N
velset = 0,-4
ctrl = 1
anim = 4030

[State 4030, Gravity]
type = Gravity
trigger1 = 1

[State 4030, ChangeState]
type = ChangeState
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 52

;---------------------------------------------------------------------------
;上段ジャストディフェンス
[Statedef 4100]
type = S
movetype = I
physics = S
anim = 4100
velset = 0,0
ctrl = 0

[State 4100, VarAdd]
type = VarAdd
trigger1 = time = 0
var(50)=2000
ignorehitpause = 1

[State 4100, PowerAdd]
type = PowerAdd
triggerall = var(20)=6
trigger1 = time = 0
value = 107*!(var(15)||var(16))*(10+var(31))/10

[State 860, VarAdd]
type = VarAdd
triggerall = var(20)=5
trigger1 = time = 0
fvar(13) = 600*ifelse((var(43)||var(15)||var(16)),0,1)*(10+var(31))/10

[State 4100, LifeAdd]
type = LifeAdd
trigger1 = Time = 0
value = ifelse(var(46),ceil(var(46)*.5),7)

[State 4100, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA

[State 4100, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = 4100,0

[State 4100, PlaySnd];声
type = Playsnd
trigger1 = Time = 0
value = 0,var(12)

[State 4100, Pause]
type = Pause
trigger1 = time = 1
time = 3

[State 4100, Explod];エフェクト
type = Explod
trigger1 = Time = 0
anim = 8060
pos = 0,-55
sprpriority = 3
ownpal = 1
scale = .5,.5
pausemovetime = 4
supermovetime = 99999999999999
ignorehitpause = 1

[State 4100, PalFX]
type = PalFX
trigger1 = Time = 0
time = 5
add = 190,190,228
mul = 190,190,228
sinadd = 190,190,228,-100

[State 4100, ChangeState] 
type = ChangeState 
trigger1 = time > 1
trigger1 = var(0) <= 2
value = 130 
ctrl = 1

;---------------------------------------------------------------------------
;下段ジャストディフェンス
[Statedef 4110]
type = C
movetype = I
physics = C
anim = 4110
velset = 0,0
ctrl = 0

[State 4110, VarAdd]
type = VarAdd
trigger1 = time = 0
var(50)=2000
ignorehitpause = 1

[State 4110, PowerAdd]
type = PowerAdd
triggerall = var(20)=6
trigger1 = time = 0
value = 107*!(var(15)||var(16))*(10+var(31))/10

[State 4110, VarAdd]
type = VarAdd
triggerall = var(20)=5
trigger1 = time = 0
fvar(13) = 600*ifelse((var(43)||var(15)||var(16)),0,1)*(10+var(31))/10

[State 4110, LifeAdd]
type = LifeAdd
trigger1 = Time = 0
value = ifelse(var(46),ceil(var(46)*.5),7)

[State 4110, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA

[State 1211, PlaySnd] 
type = PlaySnd
trigger1 = Time = 0 
value = 4100,0

[State 4110, PlaySnd];声
type = PlaySnd
trigger1 = Time = 0
value = 0,var(12)

[State 4110, Pause]
type = Pause
trigger1 = time = 1
time = 3

[State 4110, Explod];エフェクト
type = Explod
trigger1 = Time = 0
anim = 8060
pos = 0,-35
sprpriority = 3
ownpal = 1
scale = .5,.5
pausemovetime = 4
supermovetime = 99999999999999
ignorehitpause = 1

[State 4110, PalFX]
type = PalFX
trigger1 = Time = 0
time = 5
add = 190,190,228
mul = 190,190,228
sinadd = 190,190,228,-100

[State 4110, ChangeState] 
type = ChangeState 
trigger1 = time > 1
trigger1 = var(0) <= 2
value = 131 
ctrl = 1

;---------------------------------------------------------------------------
;空中ジャストディフェンス
[Statedef 4120] 
type = A
movetype = I
physics = N
anim = 4120
velset = 0,0
ctrl = 0

[State 4120, VarAdd]
type = VarAdd
trigger1 = time = 0
var(50)=2000
ignorehitpause = 1

[State 4120, PowerAdd]
type = PowerAdd
triggerall = var(20)=6
trigger1 = time = 0
value = 107*!(var(15)||var(16))*(10+var(31))/10

[State 4120, VarAdd]
type = VarAdd
triggerall = var(20)=5
trigger1 = time = 0
fvar(13) = 600*ifelse((var(43)||var(15)||var(16)),0,1)*(10+var(31))/10

[State 4120, LifeAdd]
type = LifeAdd
trigger1 = Time = 0
value = ifelse(prevstateno=5020,ceil(var(46)*.067),ifelse(var(46),ceil(var(46)*.5),7))

[State 4120, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA

[State 4120, PlaySnd] 
type = PlaySnd
trigger1 = Time = 0
value = 4100,0

[State 4120, PlaySnd];声
type = PlaySnd
trigger1 = Time = 0
value = 0,var(12)

[State 4120, Pause]
type = Pause
trigger1 = time = 1
time = 3

[State 4120, Explod];エフェクト
type = Explod
trigger1 = Time = 0
anim = 8060
pos = 13,-93
sprpriority = 3
ownpal = 1
scale = .5,.5
pausemovetime = 4
supermovetime = 99999999999999
ignorehitpause = 1

[State 4120, PalFX]
type = PalFX
trigger1 = Time = 0
time = 5
add = 190,190,228
mul = 190,190,228
sinadd = 190,190,228,-100

[State 4120, ChangeState] 
type = ChangeState 
trigger1 = time > 1
trigger1 = var(0) <= 2
value = 4130

;---------------------------------------------------------------------------
;空中ジャストディフェンス後
[Statedef 4130]
type = A
physics = N
velset = -1.5,-5.3
ctrl = 1
anim = 4030

[State 4030, Gravity]
type = Gravity
trigger1 = 1

[State 4030, ChangeState]
type = ChangeState
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 52

;---------------------------------------------------------------------------
; HITA_RECOV (recovering in air, not falling)
[Statedef 840]
type    = A
movetype= H
physics = N

[State 1000, 0]
type = HitFallSet
trigger1 = time = 0
value = 0

[State 5040, 1]
type = SelfState
trigger1 = time = 0
value = 5040

;---------------------------------------------------------------------
; 投げ抜け（byH"さん）
;------------------------ 自分側
[Statedef 950]
type = S
movetype = I
physics = N
anim = 5945
ctrl = 0
velset = -3, 0

[State 810,TargetBind]
type = TargetState
trigger1 = Time = 0
value = 955

[State 812, 1];エフェクト
type = Explod
trigger1 = Time = 0
ignorehitpause = 1
persistent = 0
anim = 8600
pos = 0, -60
sprpriority = 2
ownpal = 1
;pausemovetime = 99999999999999
supermovetime = 99999999999999
scale = .5,.5

[State 3010,PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1,=3
value = 810,0

[State 3010,PlaySnd]
type = PlaySnd
triggerall = var(12)
trigger1 = AnimElem = 1,=3
value = 5000,11

[State 3010,PlaySnd]
type = PlaySnd
triggerall = !var(12)
trigger1 = AnimElem = 1,=3
value = 5940,0

[State 810,NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA

[State 194, PosSet]
type = PosSet
trigger1 = Time = 0
y = 0

[State 105, VelMul]
type = VelMul
trigger1 = 1
x = .95

[State 4100,4]
type = PlayerPush
trigger1 = P2BodyDist X < 0
value = 0

[State 105,End]
type = ChangeState
trigger1 = Time >= 32
value = 0
ctrl = 1

;------------------------ 相手側
[Statedef 955]
type = S
movetype = I
physics = N
ctrl = 0
velset = -3, 0
facing = enemy,facing

[State 810,NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA

[State 1040,ChangeAnim]
type = ChangeAnim
triggerall = Time = 0 && SelfAnimExist(5940)
trigger1 = authorname = "H”" || authorname = "M.M.R." || authorname = "Mouser" || authorname = "CAMRAT Type KOF"
trigger2 = authorname = "Tin" || authorname = "Nyankoro" || authorname = "ryokucha"
trigger3 = authorname = "Third" || authorname = "adamskie" || authorname = "Bad Darkness" || authorname = "Warusaki3"
trigger4 = AuthorName = "NHK" || AuthorName = "Nyankoro" || AuthorName = "Nyan☆Kiryu"
trigger5 = AuthorName = "aoao" || AuthorName = "Mr.X-file"
trigger6 = AuthorName = "laiso_7" || AuthorName = "yu-go" || AuthorName = "MEKA"
trigger7 = AuthorName = "CROSS†CAT" || AuthorName = "CrossCat"
value = 5940

[State 1040,ChangeAnim]
type = ChangeAnim
triggerall = Time = 0 && SelfAnimExist(5910) && !SelfAnimExist(5940)
trigger1 = authorname = "H”" || authorname = "M.M.R." || authorname = "Mouser" || authorname = "CAMRAT Type KOF"
trigger2 = authorname = "Tin" || authorname = "Nyankoro" || authorname = "ryokucha"
trigger3 = authorname = "Third" || authorname = "adamskie" || authorname = "Bad Darkness" || authorname = "Warusaki3"
trigger4 = AuthorName = "NHK" || AuthorName = "Nyankoro" || AuthorName = "Nyan☆Kiryu"
trigger5 = AuthorName = "aoao" || AuthorName = "Mr.X-file"
trigger6 = AuthorName = "laiso_7" || AuthorName = "yu-go" || AuthorName = "MEKA"
trigger7 = AuthorName = "CROSS†CAT" || AuthorName = "CrossCat"
value = 5910

[State 820,ChangeAnim2]
type = ChangeAnim
trigger1 = Time = 0 && anim != 5940 && anim != 5910
value = 5007

[State 194, PosSet]
type = PosSet
trigger1 = Time = 0
y = 0

[State 105, VelMul]
type = VelMul
trigger1 = 1
x = .95

[State 4100,4]
type = PlayerPush
trigger1 = P2BodyDist X < 0
value = 0

[State 105,End]
type = SelfState
trigger1 = Time >= 29
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;削りKO
[Statedef 5950]
physics = S
movetype = H
ctrl = 0
velset = 0,0

[State 860, 4]
type = NotHitBy
trigger1 = 1
value = SCA

[State 190, 4]
type = ChangeAnim
trigger1 = !HitOver
value = ifelse(fvar(1)=0,5010,5020)

[State 190, 4]
type = ChangeAnim
trigger1 = HitOver
value = 5950
persistent = 0

[State 1100, ChangeState]
type = ChangeState
trigger1 = Animelem = 10
value = 5150

;---------------------------------------------------------------------------
; HIT_FALLRECOVER (on the ground)
[Statedef 5201]
type    = S
movetype= I
physics = N
anim = 5200
ctrl = 0
velset = 0,0

[State 5201, 1] ;Turn if not facing opponent
type = Turn
trigger1 = Time = 0
trigger1 = p2dist X < -5

[State 5201, 3]
type = PosSet
trigger1 = Time = 0
y = 0

[State 5201, 2]
type = VelSet
trigger1 = Time = 0
x = -6

[State 5201, 2]
type = VelSet
trigger1 = vel X > -.1
x = 0

[State 5201, 2]
type = VelMul
trigger1 = 1
x = .95

[State 1000, Spark]
type = Explod
trigger1 = Time = 1
Anim = 8030
pos = 0, 0
postype = p1
ownpal = 1
sprpriority = -3
;pausemovetime = -1
supermovetime = -1
scale = .5,.5

[State 52, Effect]
type = PlaySnd
trigger1 = Time = 1
value = 52, 0

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

[State 5201, 5] ;Blink white
type = PalFX
trigger1 = Time = 0
time = 3
add = 128,128,128 ;256,256,256

[State 5900, 3] ;Intro
type = ChangeState
trigger1 = animTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Initialize (at the start of the round)
[Statedef 5900]
type = S

[State 5900,1]
type=Changeanim
trigger1 = var(12)
trigger1=Anim!=1
value=1

[State 5900, 3] ;Intro
type = ChangeState
trigger1 = roundno = 1
value = 190

;---------------------------------------------------------------------------
[Statedef -2]

;config呼び出し
[State 3001, Super]
type = Helper
triggerall = !NumHelper(10000)
trigger1 = roundsexisted <= 0
trigger1 = roundstate = 0
id = 10000
name = "config"
pos = -300,0
postype = Left
stateno = 10000
helpertype = normal
keyctrl = 0
pausemovetime = 99999999999999
supermovetime = 99999999999999

;グルーヴセレクト
[state 190, groove]
type = helper
triggerall = time = 0
triggerall = roundstate = 0
triggerall = roundsexisted <= 0
trigger1 = numpartner
trigger1 = ID>partner,ID
trigger1 = !partner,authorname = "warusaki3"
trigger1 = !(partner,authorname = "mouser" && partner,name = "Hibiki Takane")
trigger1 = !partner,authorname = "H”"
trigger1 = !partner,authorname = "Jesuszilla"
trigger2 = numpartner
trigger2 = ID<partner,ID
trigger3 = !numpartner
ID = 6000
stateno = 6000
postype = p1
pos = 0,-15
name = "groove"
pausemovetime = 99999999999999
supermovetime = 99999999999999

[state 190, groove]
type = helper
triggerall = time = 0
triggerall = roundstate = 0
triggerall = roundsexisted <= 0
trigger1 = numpartner
trigger1 = ID>partner,ID
trigger1 = !partner,authorname = "warusaki3"
trigger1 = !(partner,authorname = "mouser" && partner,name = "Hibiki Takane")
trigger1 = !partner,authorname = "H”"
trigger1 = !partner,authorname = "Jesuszilla"
trigger2 = numpartner
trigger2 = ID<partner,ID
trigger3 = !numpartner
ID = 6050
stateno = 6050
postype = p1
pos = 0,0
name = "Up-Arrow"
keyctrl = 1
ownpal = 1
pausemovetime = 99999999999999
supermovetime = 99999999999999

[state 190, groove]
type = helper
triggerall = time = 0
triggerall = roundstate = 0
triggerall = roundsexisted <= 0
trigger1 = numpartner
trigger1 = ID>partner,ID
trigger1 = !partner,authorname = "warusaki3"
trigger1 = !(partner,authorname = "mouser" && partner,name = "Hibiki Takane")
trigger1 = !partner,authorname = "H”"
trigger1 = !partner,authorname = "Jesuszilla"
trigger2 = numpartner
trigger2 = ID<partner,ID
trigger3 = !numpartner
ID = 6050
stateno = 6055
postype = p1
pos = 0,0
name = "Down-Arrow"
keyctrl = 1
ownpal = 1
pausemovetime = 99999999999999
supermovetime = 99999999999999

;グルーヴポイント用ヘルパー
[State 3001, Super]
type = Helper
triggerall = numenemy
triggerall = !fvar(3)
triggerall = !NumHelper(6500) && !NumHelper(6000)
trigger1 = numpartner
trigger1 = ID>partner,ID
trigger1 = !partner,authorname = "warusaki3"
trigger1 = !(partner,authorname = "mouser" && partner,name = "Hibiki Takane")
trigger1 = !partner,authorname = "H”"
trigger1 = !partner,authorname = "Jesuszilla"
trigger2 = numpartner
trigger2 = ID<partner,ID
trigger3 = !numpartner
id = 6500
name = "groove point"
pos = 0,300
postype = Left
stateno = 6500
helpertype = normal
keyctrl = 0
ownpal = 1
pausemovetime = 99999999999999
supermovetime = 99999999999999

;AI判別
[State -2, 3]
type = VarSet
trigger1 = IsHomeTeam && Roundstate = 0 && Pos X > 0
var(59) = 1

[State 20, 4]
type = AssertSpecial
trigger1 = var(59)
flag = nowalk

;モード判定
[State -2, 3]
type = VarSet
trigger1 = name = "cvshaohmaru" && PalNo = [7,12]
trigger2 = name = "cvshaohmaru_ex"
var(12) = 10

;特殊キャラフラグ他
[State 5900, Var]
type = VarSet
trigger1 = roundState = 0
var(33) = 0

[State -2, 1]
type = VarSet
triggerall = roundState <= 2
trigger1 = P2Name = "cvsgouki" || P4Name = "cvsgouki"
trigger2 = P2Name = "cvsgouki_normal" || P4Name = "cvsgouki_normal"
trigger3 = P2Name = "cvsgouki_ex" || P4Name = "cvsgouki_ex"
trigger4 = P2Name = "gouki" || P4Name = "gouki"
trigger5 = P2Name = "Shin Gouki" || P4Name = "Shin Gouki"
trigger6 = P2Name = "Tin's S_Gouki" || P4Name = "Tin's S_Gouki"
trigger7 = P2Name = "Gouki by M.M.R." || P4Name = "Gouki by M.M.R."
trigger8 = P2Name = "SF3Gouki" || P4Name = "SF3Gouki"
trigger9 = P2Name = "svcgouki" || P4Name = "svcgouki"
trigger10 = P2Name = "zankuro" || P4Name = "zankuro"

trigger11 = P2Name = "Jubei Yamada" || P4Name = "Jubei Yamada"
trigger12 = P2Name = "ONI" || P4Name = "ONI"
trigger13 = P2Name = "Oboro Bishamon" || P4Name = "Oboro Bishamon"
trigger14 = P2Name = "Bishamon" || P4Name = "Bishamon"
trigger15 = P2Name = "ogre" || P4Name = "ogre"
trigger16 = P2Name = "dio" || P4Name = "dio"
trigger17 = P2Name = "Shadow DIO" || P4Name = "Shadow DIO"
trigger18 = P2Name = "Dio Brendo" || P4Name = "Dio Brendo"
trigger19 = P2Name = "Demitri" || P4Name = "Demitri"
trigger20 = P2Name = "oni chizuru" || P4Name = "oni chizuru"

trigger21 = P2Name = "Magneto(MC2)" || P4Name = "Magneto(MC2)"
trigger22 = P2Name = "Kyo_ONI" || P4Name = "Kyo_ONI"
var(33) = 1

[State -2, 1]
type = VarSet
triggerall = roundState <= 2
trigger1 = P2Name = "Hibiki Takane" || P4Name = "Hibiki Takane"
trigger2 = P2Name = "cvsnakoruru" || P4Name = "cvsnakoruru"
trigger3 = P2Name = "Tin's Linn_Kurosawa" || P4Name = "Tin's Linn_Kurosawa"
trigger4 = P2Name = "Tin's Shiki" || P4Name = "Tin's Shiki"
trigger5 = P2Name = "Benten" || P4Name = "Benten"
trigger6 = P2Name = "Charlotte" || P4Name = "Charlotte"
trigger7 = P2Name = "Mai Kawasumi EX" || P4Name = "Mai Kawasumi EX"
trigger8 = P2Name = "hibiki" || P4Name = "hibiki"
trigger9 = P2Name = "Hibiki_Takane" || P4Name = "Hibiki_Takane"
trigger10 = P2Name = "Hikaru" || P4Name = "Hikaru"

trigger11 = P2Name = "IROHA" || P4Name = "IROHA"
trigger12 = P2Name = "Janne Dulk" || P4Name = "Janne Dulk"
trigger13 = P2Name = "kinu" || P4Name = "kinu"
trigger14 = P2Name = "Kohaku" || P4Name = "Kohaku"
trigger15 = P2Name = "Kohaku By Toshi" || P4Name = "Kohaku By Toshi"
trigger16 = P2Name = "kurenai" || P4Name = "kurenai"
trigger17 = P2Name = "linn kurosawa" || P4Name = "linn kurosawa"
trigger18 = P2Name = "Lt. Kurosawa" || P4Name = "Lt. Kurosawa"
trigger19 = P2Name = "lyris" || P4Name = "lyris"
trigger20 = P2Name = "May" || P4Name = "May"

trigger21 = P2Name = "Mina" || P4Name = "Mina"
trigger22 = P2Name = "nakoruruss0" || P4Name = "nakoruruss0"
trigger23 = P2Name = "natsume" || P4Name = "natsume"
trigger24 = P2Name = "NewAkari" || P4Name = "NewAkari"
trigger25 = P2Name = "Rasyouzin Miduki" || P4Name = "Rasyouzin Miduki"
trigger26 = P2Name = "Reika Murasame" || P4Name = "Reika Murasame"
trigger27 = P2Name = "Rera" || P4Name = "Rera"
trigger28 = P2Name = "rimururu" || P4Name = "rimururu"
trigger29 = P2Name = "SAKURA SHINGOUJI" || P4Name = "SAKURA SHINGOUJI"
trigger30 = P2Name = "Suzu  Fujibayashi" || P4Name = "Suzu  Fujibayashi"

trigger31 = P2Name = "Suzu" || P4Name = "Suzu"
trigger32 = P2Name = "SHIKI" || P4Name = "SHIKI"
trigger33 = P2Name = "svcathena" || P4Name = "svcathena"
trigger34 = P2Name = "Ukyo Kuonji" || P4Name = "Ukyo Kuonji"
trigger35 = P2Name = "yagumo" || P4Name = "yagumo"
trigger36 = P2Name = "Yuki By Third" || P4Name = "Yuki By Third"
trigger37 = P2Name = "A.B.A" || P4Name = "A.B.A"
trigger38 = P2Name = "nakoruru" || P4Name = "nakoruru"
trigger39 = P2Name = "cham cham" || P4Name = "cham cham"

trigger40 = P2Name = "Senna_Kyoudou" || P4Name = "Senna_Kyoudou"
trigger41 = P2Name = "senna kyoudou" || P4Name = "senna kyoudou"

var(33) = 2

;チームモードイントロ判定（自分交代時）
[State -3, Turns Mode Intro]
type = ChangeState
trigger1 = roundsexisted <= 0
trigger1 = roundState = 0
trigger1 = time = 0
value = 190

;チームモードイントロ判定（相手交代時）
[State -3, Turns Mode Intro]
type = ChangeState
triggerall = roundState = 0
triggerall = numenemy
triggerall = enemynear,roundsexisted <= 0
triggerall = time = 0
triggerall = !var(12)
trigger1 = var(33)
value = 190

;崩れダウン音
[State -3, Bounding Sound]
type = PlaySnd
triggerall = anim = 5950
trigger1 = Animelem = 6
value = 5100,0

[State -3, Bounding Sound]
type = PlaySnd
triggerall = anim = 5950
trigger1 = Animelem = 3
value = 52,0

[State -3, Bounding Sound]
type = PlaySnd
triggerall = anim = 5950 && roundState = 2
triggerall = random%2 = 0
trigger1 = Animelemtime(1) = 2
value = 5000, 1
channel = 0

;投げ抜け成功時ボイス
[State 3010,PlaySnd]
type = PlaySnd
triggerall = !var(12)
trigger1 = stateno = 955 && movetype != H
trigger1 = AnimElem = 1,=3
value = 5940,0

[State 3010,PlaySnd]
type = PlaySnd
triggerall = var(12)
trigger1 = stateno = 955 && movetype != H
trigger1 = AnimElem = 1,=3
value = 5000,11

;鍔鳴り
[State -3, Bounding Sound]
type = PlaySnd
triggerall = anim = 0
trigger1 = Animelem = 4
value = 2000,0

;ガード音追加
[State 5900, 3];剣
type = VarSet
triggerall = moveguarded
triggerall = numtarget
trigger1 = target,name = "Tin's Kibagami"
trigger2 = target,name = "Tin's Shiki"
trigger3 = target,name = "YUNFEI"
trigger4 = target,name = "AMAKUSA SHIRO TOKISADA"
trigger5 = target,name = "Apocalypse"
trigger6 = target,name = "Arthur"
trigger7 = target,name = "Major D.Schaefer"
trigger8 = target,name = "Axl Low"
trigger9 = target,name = "Baiken"
trigger10 = target,name = "Dr.baldhead"

trigger11 = target,name = "basara"
trigger12 = target,name = "Benten"
trigger13 = target,name = "Oboro Bishamon"
trigger14 = target,name = "Bishamon"
trigger15 = target,name = "blackpolnareff"
trigger16 = target,name = "Charlotte"
trigger17 = target,name = "Chipp Zanuff"
trigger18 = target,name = "CLESS ALVEIN"
trigger19 = target,name = "nakoruru"
trigger20 = target,name = "Donovan"

trigger21 = target,name = "Foxy"
trigger22 = target,name = "galford"
trigger23 = target,name = "Kibagami Genjuro"
trigger24 = target,name = "GUNDAM HEAVY ARMS"
trigger25 = target,name = "God Gundam"
trigger26 = target,name = "GUNDAM EPYON"
trigger27 = target,name = "Hattori Hanzo"
trigger28 = target,name = "Haohmaru"
trigger29 = target,name = "Hikaru" && target,authorname = "Nyan☆Kiryu"
trigger30 = target,name = "Strider Hiryu"

trigger31 = target,name = "Janne Dulk"
trigger32 = target,name = "Yagyu Jubei"
trigger33 = target,name = "Kanzaki Juzo"
trigger34 = target,name = "kaede"
trigger35 = target,name = "Kaede by Ribeiro"
trigger36 = target,name = "Shinnosuke Kagami"
trigger37 = target,name = "Shinnosuke Kagami By Third"
trigger38 = target,name = "Karasu"
trigger39 = target,name = "Kazama Kazuki"
trigger40 = target,name = "Kenshin"

trigger41 = target,name = "khan"
trigger42 = target,name = "Kojiroh Sanada by MAPPY"
trigger43 = target,name = "Kouryu By Third"
trigger44 = target,name = "KY KISKE"
trigger45 = target,name = "Kyle Dunamis"
trigger46 = target,name = "lion"
trigger47 = target,name = "lyris"
trigger48 = target,name = "Sentinel"
trigger49 = target,name = "MANJIMARU"
trigger50 = target,name = "MASTER GUNDAM"

trigger51 = target,name = "May"
trigger52 = target,name = "Mazinger Z"
trigger53 = target,name = "Mercurius"
trigger54 = target,name = "Minakata Moriya"
trigger55 = target,name = "Moriya Minakata"
trigger56 = target,name = "Mukuro by MAPPY"
trigger57 = target,name = "Musashi Akatsuki By Third"
trigger58 = target,name = "nakoruruss0"
trigger59 = target,name = "Reika Murasame"
trigger60 = target,name = "Rera"

trigger61 = target,name = "RID"
trigger62 = target,name = "rimururu"
trigger63 = target,name = "SAKURA SHINGOUJI"
trigger64 = target,name = "Gundam Sandrock"
trigger65 = target,name = "sazabi"
trigger66 = target,name = "Setsuna"
trigger67 = target,name = "Shining Gundam"
trigger68 = target,name = "Shenlong"
trigger69 = target,name = "Shikyoh BY M@PPY"
trigger70 = target,name = "Silver Samurai"

trigger71 = target,name = "Slash v2.0 by Inverse"
trigger72 = target,name = "Sodom by Splode"
trigger73 = target,name = "Sodom with Samurai Sword"
trigger74 = target,name = "Kazama Sogetsu"
trigger75 = target,name = "Sol Badguy"
trigger76 = target,name = "SETA SOUJIRO"
trigger77 = target,name = "SHIKI"
trigger78 = target,name = "Zechs Marquise"
trigger79 = target,name = "TamTam"
trigger80 = target,name = "Testament"

trigger81 = target,name = "VAYEATE"
trigger82 = target,name = "washizuka"
trigger83 = target,name = "Wing Gundam"
trigger84 = target,name = "WINGGUNDAM ZERO"
trigger85 = target,name = "Yoshitora Tokugawa"
trigger86 = target,name = "Yuki By Third"
trigger87 = target,name = "Yukimura Sanada"
trigger88 = target,name = "zankuro"
trigger89 = target,name = "zantetsu"
trigger90 = target,name = "chaka"

trigger91 = target,name = "Faust"
trigger92 = target,name = "Hayato"
trigger93 = target,name = "ROBO-Ky"
trigger94 = target,name = "Sankuro Yorozu"
trigger95 = target,name = "cvshaohmaru"
trigger96 = target,name = "gg_venom"
trigger97 = target,name = "cvshayato"
trigger98 = target,name = "cvsnakoruru"
trigger99 = target,name = "Predetor Warrior"
trigger100 = target,name = "AXL"

trigger101 = target,name = "svcathena"
trigger102 = target,name = "N.Sieger"
trigger103 = target,name = "Shigen Naoe"
trigger104 = target,name = "War Machine"
trigger105 = target,name = "Iron Man"
trigger106 = target,name = "Sol=Badguy"
trigger107 = target,name = "A.B.A"
trigger108 = target,name = "Ichigo"
trigger109 = target,name = "order-Sol=Badguy"
trigger110 = target,name = "Ky=kiske"

trigger111 = target,name = "cvshaohmaru_normal"
trigger112 = target,name = "cvshaohmaru_ex"
trigger113 = target,name = "cvssieger"

var(30) = 2
ignorehitpause = 1

[State 5900, 3];鞘
type = VarSet
triggerall = moveguarded
triggerall = numtarget
trigger1 = target,name = "Amano by Luchini"
trigger2 = target,name = "Anji Mito"
trigger3 = target,name = "Billy Kane"
trigger4 = target,name = "CHAM0731"
trigger5 = target,name = "Chester"
trigger6 = target,name = "Hibiki Takane"
trigger7 = target,name = "Kafuin Gaira"
trigger8 = target,name = "GAMBIT by CAMRAT"
trigger9 = target,name = "Hayate"
trigger10 = target,name = "hibiki"

trigger11 = target,name = "Hibiki_Takane"
trigger12 = target,name = "Hikaru" && target,authorname = "Nyankoro"
trigger13 = target,name = "Hon Fu"
trigger14 = target,name = "JOHNNY"
trigger15 = target,name = "Tatewaki Kuno"
trigger16 = target,name = "KUROKO"
trigger17 = target,name = "kusaregedo"
trigger18 = target,name = "Senryo Kyoshiro"
trigger19 = target,name = "Genryusai Maki"
trigger20 = target,name = "Mina"

trigger21 = target,name = "Mr. Big"
trigger22 = target,name = "NewAkari"
trigger23 = target,name = "Caffeine Nicotine"
trigger24 = target,name = "Genbu Okina"
trigger25 = target,name = "Rasyouzin Miduki"
trigger26 = target,name = "Rolento Schugerg"
trigger27 = target,name = "Shizumaru"
trigger28 = target,name = "sokaku.m"
trigger29 = target,name = "Tachibana Ukyo"
trigger30 = target,name = "Wan-Fu"

trigger31 = target,name = "Yumeji Kurokouchi"
trigger32 = target,name = "cvseagle"
trigger33 = target,name = "cvsrolent"
trigger34 = target,name = "cvskuroko"
trigger35 = target,name = "cham cham"
trigger36 = target,name = "Senna_Kyoudou"
trigger37 = target,name = "senna kyoudou"

var(30) = 3
ignorehitpause = 1

[State 5900, 3];爪
type = VarSet
triggerall = moveguarded
triggerall = numtarget
trigger1 = target,name = "Balrog by M.M.R."
trigger2 = target,name = "CHOI BOUNGE"
trigger3 = target,name = "Wolverine"
trigger4 = target,name = "cvsbalrog"
trigger5 = target,name = "kunagi tenrou"

var(30) = 4
ignorehitpause = 1

[State -3, Bounding Sound]
type = PlaySnd
triggerall = var(30)
trigger1 = stateno = 200
trigger2 = stateno = 210
trigger3 = stateno = 211
trigger4 = stateno = 220
trigger5 = stateno = 221
trigger6 = stateno = 300
trigger7 = stateno = 310
trigger8 = stateno = 400
trigger9 = stateno = 410
trigger10 = stateno = 420
trigger11 = stateno = 600
trigger12 = stateno = 610
trigger13 = stateno = 620
trigger14 = stateno = 1100
trigger15 = stateno = 1200
trigger16 = stateno = 1501
trigger17 = stateno = 1700
trigger18 = stateno = 3000
trigger19 = stateno = 3100
trigger20 = stateno = 3101
trigger21 = stateno = 3102
trigger22 = stateno = 3200
value = 1, var(30)
ignorehitpause = 1

[State 5900, 3]
type = VarSet
trigger1 = var(30)
var(30) = 0
ignorehitpause = 1

;先行入力処理
;===========================================================================
;---------------------------------------------------------------------------
[State 3001, VarSet]
type = VarAdd
triggerall = var(2) > 0
trigger1 = !(ceil(fvar(29))&2**0)
trigger1 = command = "x"
fvar(29) = 2**0

[State 3001, VarSet]
type = VarAdd
triggerall = var(2) > 0
trigger1 = !(ceil(fvar(29))&2**1)
trigger1 = command = "y"
fvar(29) = 2**1

[State 3001, VarSet]
type = VarAdd
triggerall = var(2) > 0
trigger1 = !(ceil(fvar(29))&2**2)
trigger1 = command = "z"
fvar(29) = 2**2

[State 3001, VarSet]
type = VarAdd
triggerall = var(2) > 0
trigger1 = !(ceil(fvar(29))&2**3)
trigger1 = command = "a"
fvar(29) = 2**3

[State 3001, VarSet]
type = VarAdd
triggerall = var(2) > 0
trigger1 = !(ceil(fvar(29))&2**4)
trigger1 = command = "b"
fvar(29) = 2**4

[State 3001, VarSet]
type = VarAdd
triggerall = var(2) > 0
trigger1 = !(ceil(fvar(29))&2**5)
trigger1 = command = "c"
fvar(29) = 2**5

[State -2]
type = VarAdd
triggerall = var(2) > 0
trigger1 = !(ceil(fvar(29))&2**6)
trigger1 = command = "start"
fvar(29) = 2**6

[State 3001, VarSet]
type = VarAdd
triggerall = var(2) > 0
trigger1 = !(ceil(fvar(29))&2**7)
trigger1 = command = "recovery"
fvar(29) = 2**7

;---------------------------------------------------------------------------
;奥偽　旋風烈斬
[State -2]
type = VarAdd
triggerall = var(2) > 0
trigger1 = !(ceil(fvar(29))&2**8)
trigger1 = command = "旋風波1"
fvar(29) = 2**8

[State -2]
type = VarAdd
triggerall = var(2) > 0
trigger1 = !(ceil(fvar(29))&2**9)
trigger1 = command = "旋風波2"
fvar(29) = 2**9

[State -2]
type = VarAdd
triggerall = var(2) > 0
trigger1 = !(ceil(fvar(29))&2**10)
trigger1 = command = "旋風波3"
fvar(29) = 2**10

;---------------------------------------------------------------------------
;奥義　旋風裂斬
[State -2]
type = VarAdd
triggerall = var(2) > 0
trigger1 = !(ceil(fvar(29))&2**11)
trigger1 = command = "旋風裂斬1"
fvar(29) = 2**11

[State -2]
type = VarAdd
triggerall = var(2) > 0
trigger1 = !(ceil(fvar(29))&2**12)
trigger1 = command = "旋風裂斬2"
fvar(29) = 2**12

[State -2]
type = VarAdd
triggerall = var(2) > 0
trigger1 = !(ceil(fvar(29))&2**13)
trigger1 = command = "旋風裂斬3"
fvar(29) = 2**13

;---------------------------------------------------------------------------
;奥義　烈震斬
[State -2]
type = VarAdd
triggerall = var(2) > 0
trigger1 = !(ceil(fvar(29))&2**14)
trigger1 = command = "烈震斬1"
fvar(29) = 2**14

[State -2]
type = VarAdd
triggerall = var(2) > 0
trigger1 = !(ceil(fvar(29))&2**15)
trigger1 = command = "烈震斬2"
fvar(29) = 2**15

[State -2]
type = VarAdd
triggerall = var(2) > 0
trigger1 = !(ceil(fvar(29))&2**16)
trigger1 = command = "烈震斬3"
fvar(29) = 2**16

;---------------------------------------------------------------------------
;剛破
[State -2]
type = VarAdd
triggerall = var(2) > 0
trigger1 = !(ceil(fvar(29))&2**17)
trigger1 = command = "剛破1"
fvar(29) = 2**17

[State -2]
type = VarAdd
triggerall = var(2) > 0
trigger1 = !(ceil(fvar(29))&2**18)
trigger1 = command = "剛破2"
fvar(29) = 2**18

[State -2]
type = VarAdd
triggerall = var(2) > 0
trigger1 = !(ceil(fvar(29))&2**19)
trigger1 = command = "剛破3"
fvar(29) = 2**19

;---------------------------------------------------------------------------
;奥義　弧月斬
[State -2]
type = VarAdd
triggerall = var(2) > 0
trigger1 = !(ceil(fvar(29))&2**20)
trigger1 = command = "弧月斬1"
fvar(29) = 2**20

[State -2]
type = VarAdd
triggerall = var(2) > 0
trigger1 = !(ceil(fvar(29))&2**21)
trigger1 = command = "弧月斬2"
fvar(29) = 2**21

[State -2]
type = VarAdd
triggerall = var(2) > 0
trigger1 = !(ceil(fvar(29))&2**22)
trigger1 = command = "弧月斬3"
fvar(29) = 2**22

;---------------------------------------------------------------------------
;死祟
[State -2]
type = VarAdd
triggerall = var(2) > 0
trigger1 = !(ceil(fvar(29))&2**23)
trigger1 = command = "死祟"
fvar(29) = 2**23

;---------------------------------------------------------------------------
;斬鋼閃
[State -2]
type = VarAdd
triggerall = var(2) > 0
trigger1 = !(ceil(fvar(29))&2**24)
trigger1 = command = "斬鋼閃"
fvar(29) = 2**24

;===========================================================================
;---------------------------------------------------------------------------
;秘奥義　天覇封神斬
[State -2]
type = VarAdd
triggerall = var(2) > 0
trigger1 = !(ceil(fvar(29))&2**25)
trigger1 = command = "天覇封神斬1"
fvar(29) = 2**25

[State -2]
type = VarAdd
triggerall = var(2) > 0
trigger1 = !(ceil(fvar(29))&2**26)
trigger1 = command = "天覇封神斬2"
fvar(29) = 2**26

[State -2]
type = VarAdd
triggerall = var(2) > 0
trigger1 = !(ceil(fvar(29))&2**27)
trigger1 = command = "天覇封神斬3"
fvar(29) = 2**27

;---------------------------------------------------------------------------
;天覇凄煌斬
[State -2]
type = VarAdd
triggerall = var(2) > 0
trigger1 = !(ceil(fvar(29))&2**28)
trigger1 = command = "天覇凄煌斬"
fvar(29) = 2**28

;---------------------------------------------------------------------------
;絶命奥義
[State -2]
type = VarAdd
triggerall = var(2) > 0
trigger1 = !(ceil(fvar(29))&2**29)
trigger1 = command = "絶命奥義"
fvar(29) = 2**29

;---------------------------------------------------------------------------
;===========================================================================

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

;斬りのヒットポーズ処理
[State -2, CornerPush]
type = VarAdd
trigger1 = var(2) > 0
var(2) = -1

;弱
[State -2, CornerPush]
type = VarSet
triggerall = movecontact
triggerall = time > 1
trigger1 = stateno = 200
trigger2 = stateno = 400
var(2) = ceil(9*(2-(var(16)>0))/2)
ignorehitpause = 1

[State 400, CornerPush]
type = VarSet
triggerall = movecontact
triggerall = time > 1
trigger1 = stateno = 200
trigger2 = stateno = 400
fvar(31) = 6*(2-(var(16)>0))/2
ignorehitpause = 0

;中
[State -2, CornerPush]
type = VarSet
triggerall = movecontact
triggerall = time > 1
trigger1 = stateno = 210
trigger2 = stateno = 211
trigger3 = stateno = 410
trigger4 = stateno = 610
trigger5 = stateno = 300
var(2) = ceil(11*(2-(var(16)>0))/2)
ignorehitpause = 1

[State 210, CornerPush]
type = VarSet
triggerall = movecontact
triggerall = time > 1
trigger1 = stateno = 210
trigger2 = stateno = 211
trigger3 = stateno = 410
trigger4 = stateno = 300
fvar(31) = 11.2*(2-(var(16)>0))/2
ignorehitpause = 0

[State 610, CornerPush]
type = VarSet
triggerall = movecontact
triggerall = time > 1
trigger1 = stateno = 610
fvar(31) = 5.6*(2-(var(16)>0))/2
ignorehitpause = 0

;強
[State -2, CornerPush]
type = VarSet
triggerall = movecontact
triggerall = time > 1
trigger1 = stateno = 420
trigger2 = stateno = 620
var(2) = ceil(13*(2-(var(16)>0))/2)
ignorehitpause = 1

[State 220, CornerPush]
type = VarSet
triggerall = movecontact
triggerall = time > 1
trigger1 = stateno = 420
fvar(31) = 14*(2-(var(16)>0))/2
ignorehitpause = 0

[State 220, CornerPush]
type = VarSet
triggerall = movecontact
triggerall = time > 1
trigger1 = stateno = 620
fvar(31) = 7*(2-(var(16)>0))/2
ignorehitpause = 0

;強2
[State -2, CornerPush]
type = VarSet
triggerall = movecontact
triggerall = time > 1
trigger1 = stateno = 220
trigger2 = stateno = 221
trigger3 = stateno = 310
var(2) = ceil(17*(2-(var(16)>0))/2)
ignorehitpause = 1

[State 220, CornerPush]
type = VarSet
triggerall = movecontact
triggerall = time > 1
trigger1 = stateno = 220
trigger2 = stateno = 221
trigger3 = stateno = 310
fvar(31) = 14*(2-(var(16)>0))/2
ignorehitpause = 0

;強3
[State -2, CornerPush]
type = VarSet
triggerall = movecontact
triggerall = time > 1
trigger1 = stateno = 221
var(2) = ceil(15*(2-(var(16)>0))/2)
ignorehitpause = 1

[State 220, CornerPush]
type = VarSet
triggerall = movecontact
triggerall = time > 1
trigger1 = stateno = 221
fvar(31) = 14*(2-(var(16)>0))/2
ignorehitpause = 0

;天覇断空裂斬
[State -2, CornerPush]
type = VarSet
triggerall = movecontact
triggerall = time > 1
trigger1 = stateno = 3100
trigger2 = stateno = 3101
trigger3 = stateno = 3102 && !var(5)
trigger4 = stateno = 3102 && animelemtime(3) > 0 && var(5) = 1
trigger5 = stateno = 3102 && animelemtime(5) > 0 && var(5) = 2
var(2) = ceil(13*(2-(var(16)>0))/2)
ignorehitpause = 1
persistent = 0

[State 220, CornerPush]
type = VarSet
triggerall = movecontact
triggerall = time > 1
trigger1 = stateno = 3100
trigger2 = stateno = 3102 && !var(5)
trigger3 = stateno = 3102 && animelemtime(3) > 0 && var(5) = 1
trigger4 = stateno = 3102 && animelemtime(5) > 0 && var(5) = 2
fvar(31) = 11.2
ignorehitpause = 0
persistent = 0

[State 220, CornerPush]
type = VarSet
triggerall = movecontact
triggerall = time > 1
trigger1 = stateno = 3101
fvar(31) = 7
ignorehitpause = 0
persistent = 0

;天覇凄煌斬
[State -2, CornerPush]
type = VarSet
triggerall = movecontact
triggerall = time > 1
trigger1 = stateno = 1700
trigger2 = stateno = 3200
var(2) = ceil(17*(2-(var(16)>0))/2)
ignorehitpause = 1
persistent = 0

[State 220, CornerPush]
type = VarSet
triggerall = movecontact
triggerall = time > 1
trigger1 = stateno = 1700
trigger2 = stateno = 3200
fvar(31) = 11.2
ignorehitpause = 0
persistent = 0

;斬りのコーナープッシュ処理
[State -2, CornerPush]
type = VarSet
trigger1 = NumTarget
trigger1 = target,statetype = A
trigger2 = movetype = H
fvar(31) = 0

[State -2, CornerPush]
type = VarSet
trigger1 = !var(2) && fvar(31) < .1
fvar(31) = 0

[State -2, CornerPush]
type = PosAdd
trigger1 = !var(2) && fvar(31)
trigger1 = !NumHelper(8000)
trigger1 = numtarget
trigger1 = target,BackEdgeBodyDist <= 5 || target,FrontEdgeBodyDist <= 5
x = -fvar(31)

[State -2, CornerPush]
type = VarSet
trigger1 = !var(2) && fvar(31)
trigger1 = !NumHelper(8000)
fvar(31) = fvar(31)*.75

;ヒットウェイト
[State -2, CornerPush]
type = VarSet
triggerall = movetype != H
trigger1 = time = 1
fvar(17) = stateno

[State 3001, Super]
type = Helper
triggerall = roundstate = 2
triggerall = movehit
triggerall = !var(16)
trigger1 = fvar(17) = 220
trigger2 = fvar(17) = 221
trigger3 = fvar(17) = 310
trigger4 = fvar(17) = 1700
trigger5 = fvar(17) = 3200
id = 8200
name = "slow"
pos = -300,0
postype = P1
stateno = 8200
helpertype = normal
keyctrl = 0
ignorehitpause = 1

;竜巻発生
[State 1000, Spark]
type = Explod
trigger1 = numenemy && numtarget
trigger1 = projhittime(1005) = 1
Anim = 7305
id = 7305
pos = 0,0
postype = P2
ownpal = 1
sprpriority = 3
scale = 1,1.5

[State 1000, Spark]
type = Explod
trigger1 = stateno = 3100 && movehit && numtarget
Anim = 7305
id = 7305
pos = 50,0
postype = P1
ownpal = 1
sprpriority = 3
scale = 1.5,2
supermovetime = 10

[State -3, Bounding Sound]
type = PlaySnd
trigger1 = stateno = 3100 && movehit && numtarget
value = 1000,1

;相手ダウン音
[State -3, Bounding Sound]
type = PlaySnd
triggerall = numtarget
trigger1 = target,stateno = 3900 && target,time = 1
trigger2 = target,stateno = 3910 && target,time = 1
value = 5100,0

;ラウンド開始時音楽消去
[State 3105, AssertSpecial]
type = AssertSpecial
triggerall = roundno = 1
trigger1 = roundState < 2
flag = NoMusic

;パーフェクト判定
[State -2, Combo]
type = VarSet
triggerall = roundState = 2
trigger1 = fvar(12) - Life > 0
fvar(14) = 1
ignorehitpause = 1

;ラウンド勝敗判定
[State -2, 1]
type = VarSet
trigger1 = Win
var(26) = 1

[State -2, 1]
type = VarSet
trigger1 = Lose
var(26) = 2

[State -2, 1]
type = VarSet
trigger1 = Lose || DrawGame
var(54) = 1

[State -2,KO]
type = Varadd
trigger1 = matchover
ignorehitpause = 1
var(56) = 1

[State -2,KO]
type = Varset
trigger1 = !matchover
ignorehitpause = 1
var(56) = 0

[State 180, 1]
type = VarAdd
triggerall = var(56) = 1
trigger1 = !var(54)
var(55)=1
ignorehitpause = 1
persistent = 0

[State 180, 1]
type = VarSet
trigger1 = var(54)
var(55)=0
ignorehitpause = 1

;状態判定
[State -2, 1]
type = VarSet
triggerall = movetype != H && roundState = 2
trigger1 = (stateno = [0,189]) && !var(18)
var(48) = 0

[State -2, 1]
type = VarSet
triggerall = movetype != H && roundState = 2
trigger1 = (stateno = [200,999]) && !var(18)
var(48) = 1

[State -2, 1]
type = VarSet
triggerall = movetype != H && roundState = 2
trigger1 = (stateno = [190,199]) && !var(18)
trigger2 = (stateno = [1000,2999]) && !var(18)
var(48) = 2

[State -2, 1]
type = VarSet
trigger1 = projhittime(1005) = 1
trigger2 = projhittime(1405) = 1
var(48) = 2

[State -2, 1]
type = VarSet
triggerall = movetype != H && roundState = 2
trigger1 = ((stateno = [3000,3999]) && var(5)!=2) || var(18)
var(48) = 3

[State -2, 1]
type = VarSet
triggerall = movetype != H && roundState = 2
trigger1 = (stateno = [3000,3999]) && var(5) = 2
var(48) = 4

[State -2, 1]
type = VarSet
triggerall = P2movetype != H && roundState = 2
trigger1 = P2stateno = [0,189]
var(49) = 0

[State -2, 1]
type = VarSet
triggerall = P2movetype != H && roundState = 2
trigger1 = P2stateno = [200,999]
var(49) = 1

[State -2, 1]
type = VarSet
triggerall = P2movetype != H && roundState = 2
trigger1 = P2stateno = [190,199]
trigger2 = P2stateno = [1000,2999]
var(49) = 2

[State -2, 1]
type = VarSet
triggerall = P2movetype != H && roundState = 2
trigger1 = P2stateno = [3000,3999]
var(49) = 3

;グルーヴゲージ表示
[State 3001, Super]
type = Helper
triggerall = !NumHelper(6100) && !NumHelper(6000)
triggerall = numenemy
trigger1 = numpartner
trigger1 = ID>partner,ID
trigger1 = !partner,authorname = "warusaki3"
trigger1 = !(partner,authorname = "mouser" && partner,name = "Hibiki Takane")
trigger1 = !partner,authorname = "H”"
trigger1 = !partner,authorname = "Jesuszilla"
trigger2 = numpartner
trigger2 = ID<partner,ID
trigger3 = !numpartner
id = 6100
name = "gauge"
pos = 0,300
postype = P1
stateno = 6100+(var(20)*10)
helpertype = normal
keyctrl = 0
ownpal = 1
pausemovetime = 99999999999999
supermovetime = 99999999999999
facing = facing*ifelse(teamside=1,1,-1)

;SグルーヴパワーMAXシステム
[State -2, 1]
type = VarSet
triggerall = var(20) = 3
trigger1 = !var(14)
trigger1 = roundState >= 2
trigger1 = Power >= 1000
var(14) = 750

[State -2, 1]
type = PowerSet
trigger1 = var(14) = 750
value = 0
ignorehitpause = 1

[State -2, 1]
type = PowerSet
trigger1 = var(14) = 1
value = 0
ignorehitpause = 1

[State 200, 3]
type = Playsnd
trigger1 = var(14) = 750
value = 6000,10

[State -2, 1]
type = Varadd
trigger1 = var(14)
var(14) = -1
ignorehitpause = 1

;Kグルーヴ怒りゲージシステム
[State -2, Combo]
type = VarAdd
triggerall = var(20) = 5
triggerall = !var(43)
triggerall = roundState = 2
triggerall = fvar(13) < 7200
triggerall = stateno != [120,159]
trigger1 = fvar(12) - Life > 0
fvar(13) = ceil((fvar(12)-Life)*14*(10+var(31))/10)
ignorehitpause = 1

[State -2, 1]
type = VarSet
trigger1 = fvar(13) > 7200
fvar(13) = 7200

[State -2, 1]
type = VarSet
trigger1 = fvar(13) = 7200
var(43) = 1

[State -2, 1]
type = VarSet
trigger1 = fvar(13) <= 1 && ((stateno != [3000,3999]) || roundState != 2)
var(43) = 0

[State 860, 1]
type = Explod
trigger1 = fvar(13) = 7200 && !NumExplod(8420)
anim = 8420
pos = 0,-70
postype = p1
ontop = 0
ownpal = 1
id = 8420
persistent = 0
;pausemovetime = 99999999999999
supermovetime = 99999999999999
scale = .5,.5

[State 200, 3]
type = Playsnd
trigger1 = fvar(13) = 7200
value = 6000,11

[State -2, 1]
type = Poweradd
trigger1 = fvar(13) = 7200
value = -3000
ignorehitpause = 1

[State -2, 1]
type = Varadd
triggerall = var(20) = 5
triggerall = var(43)
trigger1 = fvar(13) > 0
fvar(13) = -7.2
ignorehitpause = 1

[State -2, 1]
type = PalFX
triggerall = var(20) = 5
trigger1 = fvar(13) && var(43)
Time = 1
mul = 230,ceil(152-abs(76*sin(gametime*.05))),ceil(128-abs(64*sin(gametime*.05)))
ignorehitpause = 1
persistent = 0

[State -2, 1]
type = DefenceMulSet
trigger1 = fvar(13) && var(43)
value = .775

;NグルーヴMAX発動
[State -2, 1]
type = Varadd
trigger1 = var(15)
var(15) = -1
ignorehitpause = 1

[State -2, 1]
type = PalFX
triggerall = var(20) = 4 || var(20) = 6
trigger1 = (GameTime%2)=0
trigger1 = var(15)
time = 1
add = 128,128,0
ignorehitpause = 1

;パワー溜まった時の音
[State -2, PlaySnd]
type = PlaySnd
triggerall = roundState = 2
trigger1 = (floor(power*.001) - floor(fvar(21)*.001) > 0) && (!var(20) || var(20) = 4 || var(20) = 6)
trigger2 = (floor(power/1500) - floor(fvar(21)/1500) > 0) && var(20) = 2
trigger3 = (floor(power/3000) - floor(fvar(21)/3000) > 0) && var(20) = 3
value = 6000,ifelse(var(20)=6,10,ifelse(var(20)=4,13,12))
ignorehitpause = 1

[State -2, 1]
type = VarSet
trigger1 = 1
fvar(21) = power
ignorehitpause = 1

;オリコン
[State -2, 1]
type = Varadd
triggerall = roundState = 2
trigger1 = var(16)
var(16) = -1
ignorehitpause = 1

[State -2, 1]
type = VarSet
trigger1 = MoveType = H
var(16) = 0

[State -2, 1]
type = VarSet
trigger1 = !var(16) && ctrl
trigger2 = LoseKO
var(18) = 0

[State -2, 1]
type = Varadd
trigger1 = var(16)
var(19) = -9
ignorehitpause = 1

[State -2, 1]
type = PowerSet
triggerall = var(18)
trigger1 = MoveType = H
value = var(19)/2

[State -3, Kill Juggle Checking]
type = assertspecial
trigger1 = var(18)
trigger1 = P2MoveType = H && P2StateType = A
flag = nojugglecheck

[State -3, No Blocking]
type = assertspecial
trigger1 = var(16)
flag = nostandguard
flag2 = nocrouchguard
flag3 = noairguard

;コンボダメージ
[State -2, PowerReset]
type = VarSet
trigger1 = P2movetype != H
var(53) = P2life

[State 3001, Super]
type = Helper
triggerall = numenemy
triggerall = roundState = 2
triggerall = (var(53)-P2life)>250
trigger1 = !NumHelper(6800)&&!var(52)
trigger2 = !NumHelper(6800)&&var(52)=1&&!enemynear,NumHelper(6800)
id = 6800
name = "naration_1"
pos = 0,300
postype = Left
stateno = 6803
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
persistent = 0
pausemovetime = 99999999999999

;グルーヴポイント初期数値＆時間による減少
[State -2, PowerReset]
type = VarSet
triggerall = MatchNo = 1
triggerall = RoundNo = 1
trigger1 = roundState = 0
var(50) = 100000

[State -2, PowerReset]
type = VarSet
trigger1 = var(50) > 9999999
var(50) = 9999999
persistent = 1

[State -2, PowerReset]
type = VarSet
trigger1 = var(50) < -9999999
var(50) = -9999999
persistent = 1

[State -2, PowerReset]
type = VarAdd
trigger1 = roundState = 2
var(51) = 1
persistent = 1

[State -2, PowerReset]
type = VarAdd
triggerall = roundState = 2
triggerall = var(50) = [-9999999,9999999]
trigger1 = var(51) >= 600
trigger1 = gametime%60 = 0
var(50) = -500
persistent = 1

[State 3001, Super]
type = Helper
triggerall = !var(58)
triggerall = numenemy
triggerall = roundState = 2
triggerall = var(51) = 400
trigger1 = !NumHelper(6800)&&!var(52)
trigger2 = !NumHelper(6800)&&var(52)=1&&!enemynear,NumHelper(6800)
id = 6800
name = "naration_1"
pos = 0,300
postype = Left
stateno = 6800
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
persistent = 0
pausemovetime = 99999999999999

;時間停止によるガード不能
[State -2, PowerReset]
type = VarAdd
trigger1 = fvar(36) > 0
fvar(36) = -1

[State 3000, preventguard]
type = AssertSpecial
trigger1 = fvar(36) > 0
flag = unguardable

;空中コンボ制限
[State -2, PowerReset]
type = VarSet
trigger1 = P2MoveType != H
trigger2 = numtarget
trigger2 = target,statetype = S
trigger3 = numtarget
trigger3 = target,statetype = C
trigger4 = var(18)
trigger5 = var(22) = -1
trigger6 = var(23) = 1
trigger7 = var(45) > 0
fvar(26) = 0
ignorehitpause = 1

[State -2, PowerReset]
type = VarAdd
triggerall = movehit
triggerall = numtarget
trigger1 = P2MoveType = H && P2stateType = A
trigger2 = target,gethitvar(yvel) && target,stateType != A
trigger3 = target,gethitvar(fall)
fvar(26) = 1
ignorehitpause = 1

[State -3, Kill Juggle Checking]
type = assertspecial
triggerall = P2MoveType = H && P2stateType = A
trigger1 = stateno = 3000 && animelemtime(7) < 0 && fvar(26) < 4
trigger2 = stateno = 3000 && !var(5) && animelemtime(7) > 0 && fvar(26) < 6
trigger3 = stateno = 3000 && var(5) = 1 && animelemtime(7) > 0 && fvar(26) < 7
trigger4 = stateno = 3000 && var(5) = 2 && animelemtime(7) > 0 && fvar(26) < 8
flag = nojugglecheck

;食らい判定復活用
[State -2, PowerReset]
type = VarSet
triggerall = var(45) > 0
trigger1 = movehit
trigger2 = projhit = 1
var(45) = -1
ignorehitpause = 1

[State -2, PowerReset]
type = VarSet
trigger1 = var(45)
trigger1 = P2MoveType != H
trigger2 = var(45) = -1
trigger2 = ctrl
var(45) = 0
ignorehitpause = 1

[State -2, PowerReset]
type = VarSet
triggerall = var(20) = 2 || var(20) = 6
triggerall = (prevstateno=[195,196]) || (prevstateno=[1000,2999])
triggerall = time = 1
triggerall = P2MoveType = H && P2stateType = A
trigger1 = stateno=3000
trigger2 = stateno=3100
trigger3 = stateno=3200
trigger4 = stateno=3300
var(45) = 1
ignorehitpause = 1

[State -2, PowerReset]
type = VarSet
triggerall = prevstateno=[3000,3999]
triggerall = time = 1
triggerall = P2MoveType = H && P2stateType = A
trigger1 = stateno=195
trigger2 = stateno=1000
trigger3 = stateno=1050
trigger4 = stateno=1100
trigger5 = stateno=1200
trigger6 = stateno=1300
trigger7 = stateno=1400
trigger8 = stateno=1500
trigger9 = stateno=1600
trigger10 = stateno=1700
trigger11 = stateno=1800
trigger12 = stateno=3000
trigger13 = stateno=3100
trigger14 = stateno=3200
var(45) = 1
ignorehitpause = 1

[State -3, Kill Juggle Checking]
type = assertspecial
trigger1 = var(45) > 0
flag = nojugglecheck

;追い討ち
[State -2, Combo]
type = VarSet
triggerall = var(23) = 1
trigger1 = movehit
trigger2 = projhit = 1
var(23) = 2
ignorehitpause = 1

[State -2, Combo]
type = VarSet
trigger1 = p2movetype != H
trigger2 = var(45) = 1
trigger3 = var(16)
var(23) = 0
ignorehitpause = 1

[State -2, Combo]
type = VarSet
triggerall = !var(23)
trigger1 = movehit
trigger1 = stateno = 1300
trigger2 = movehit
trigger2 = stateno = 1501 && animelemtime(6) > 0
trigger3 = numtarget
trigger3 = projhit1005 = 1
trigger3 = var(12)
var(23) = 1
ignorehitpause = 1

[State -3, Kill Juggle Checking]
type = assertspecial
trigger1 = var(23) = 1
flag = nojugglecheck

;強制fall=0時juggle判別用
[State -2, PowerReset]
type = null;VarSet
trigger1 = !numtarget
var(22) = 0

[State 901, Throw]
type = null;VarSet
triggerall = numtarget
trigger1 = movehit || projhit = 1
trigger1 = target,gethitvar(fall)
trigger2 = target,statetype != S && target,statetype != C
var(22) = 1
ignorehitpause = 1

[State -3, Kill Juggle Checking]
type = null;VarSet
triggerall = numtarget
trigger1 = var(22)
trigger1 = !target,gethitvar(hitshaketime)
trigger1 = target,statetype = S || target,statetype = C
var(22) = -1

[State -3, Kill Juggle Checking]
type = null;assertspecial
trigger1 = var(22) = -1
flag = nojugglecheck

;コンボ制限
[State -3, VarSet]
type = VarSet
trigger1 = P2MoveType != H
trigger2 = numtarget
trigger2 = target,statetype = S
trigger3 = numtarget
trigger3 = target,statetype = C
trigger4 = var(18)
trigger5 = var(22) = -1
trigger6 = var(23) = 1
trigger7 = var(45) > 0
var(40) = -1

[State -3, VarSet]
type = VarSet
trigger1 = P2MoveType != H
trigger2 = numtarget
trigger2 = target,statetype = S
trigger3 = numtarget
trigger3 = target,statetype = C
trigger4 = var(18)
trigger5 = var(22) = -1
trigger6 = var(23) = 1
trigger7 = var(45) > 0
var(42) = -1
ignorehitpause = 1

[State -3, VarSet]
type = VarSet
triggerall = var(40) = -1
triggerall = numtarget
triggerall = movehit || projhit = 1
trigger1 = target,gethitvar(yvel)
trigger2 = target,gethitvar(fall)
var(40) = 1
ignorehitpause = 1

[State -3, VarSet]
type = VarSet
triggerall = var(42) = -1
triggerall = numtarget
triggerall = movehit || projhit = 1
trigger1 = target,gethitvar(yvel)
trigger2 = target,gethitvar(fall)
var(42) = 1
ignorehitpause = 1

[State -3, VarSet]
type = VarSet
triggerall = var(40) = 1
trigger1 = (stateno = [195,799]) && time = 1
trigger2 = stateno = 900 && time = 1
trigger3 = stateno = 1000 && time = 1
trigger4 = stateno = 1050 && time = 1
trigger5 = stateno = 1100 && time = 1
trigger6 = stateno = 1200 && time = 1
trigger7 = stateno = 1300 && time = 1
trigger8 = stateno = 1400 && time = 1
trigger9 = stateno = 1500 && time = 1
trigger10 = stateno = 1600 && time = 1
trigger11 = stateno = 1700 && time = 1
trigger12 = stateno = 1800 && time = 1
trigger13 = stateno = 3000 && (time = 1 || animelem = 7 || animelem = 13 || animelem = 19)
trigger14 = stateno = 3000 && var(5) && animelem = 25
trigger15 = stateno = 3000 && var(5)=2 && animelem = 31
trigger16 = stateno = 3100 && time = 1
trigger17 = stateno = 3200 && time = 1
trigger18 = stateno = 3300 && time = 1
var(40) = 0
ignorehitpause = 1

[State -3, VarSet]
type = VarSet
trigger1 = !var(42)
var(40) = 0
ignorehitpause = 1

[State -3, Kill Juggle Checking]
type = VarSet
triggerall = !var(42)
trigger1 = stateno = 3000 && animelemtime(7) < 0 && fvar(26) < 4
trigger2 = stateno = 3000 && !var(5) && animelemtime(7) > 0 && fvar(26) < 6
trigger3 = stateno = 3000 && var(5) = 1 && animelemtime(7) > 0 && fvar(26) < 7
trigger4 = stateno = 3000 && var(5) = 2 && animelemtime(7) > 0 && fvar(26) < 8
var(40) = 1
ignorehitpause = 1

[State -3, VarSet]
type = VarSet
trigger1 = !var(40)
var(42) = 0
ignorehitpause = 1

;空中復帰誘導
[State -2, PowerReset]
type = VarSet
triggerall = movetype != H
trigger1 = !NumTarget
trigger2 = P2MoveType != H
trigger3 = movehit
trigger4 = projhit = 1
trigger5 = numtarget
trigger5 = !target,gethitvar(fall)
fvar(38) = 0
ignorehitpause = 1

[State -2, PowerReset]
type = VarSet
triggerall = fvar(38) != 2
triggerall = (stateno = [200,799])
trigger1 = stateno != 310
trigger1 = stateno != 450
trigger1 = !(stateno = 250 && prevstateno = 830)
fvar(38) = 1
ignorehitpause = 1

[State -2, PowerReset]
type = VarSet
triggerall = fvar(38) = 1
triggerall = !var(16)
trigger1 = movehit
fvar(38) = 2
ignorehitpause = 1

[State 901, Throw]
type = TargetState
triggerall = Numtarget
triggerall = fvar(38) = 2
trigger1 = target,stateno = 5050 && target,alive
value = 840
ignorehitpause = 1

;ガード＆ダメージ判定
[State 180, 1]
type = VarSet
trigger1 = 1
fvar(4) = 0
ignorehitpause = 1

[State 180, 1]
type = VarSet
triggerall = stateno != [120,159]
trigger1 = fvar(12) - Life > 0
fvar(4) = 1
ignorehitpause = 1

[State 180, 1]
type = VarSet
triggerall = stateno = 150 || stateno = 152 || stateno = 154
trigger1 = time = 1
fvar(4) = 2
ignorehitpause = 1

;ガード時グルーヴポイント増減
[State 180, 1]
type = VarAdd
triggerall = roundstate = 2
triggerall = stateno = 150 || stateno = 152 || stateno = 154
trigger1 = time = 1
trigger1 = Var(25) > 6
var(50)=50
ignorehitpause = 1

[State 180, 1]
type = VarAdd
triggerall = roundstate = 2
triggerall = stateno = 150 || stateno = 152 || stateno = 154
trigger1 = time = 1
trigger1 = Var(25) <= 6
var(50)=ifelse((enemynear,hitdefattr=SCA,NA,NP,NT),101,ifelse((enemynear,hitdefattr=SCA,SA,SP,ST),201,301))
ignorehitpause = 1

;食らい時グルーヴポイント増減
[State 180, 1]
type = VarAdd
triggerall = roundstate = 2
triggerall = movetype = H
triggerall = stateno != [120,159]
trigger1 = fvar(12) - Life > 0
var(50)=ifelse((enemynear,stateno=[195,999]),-500,ifelse((enemynear,stateno=[1000,2999]),-300,-200))
ignorehitpause = 1

[State -2, Combo]
type = VarSet
trigger1 = 1
fvar(12) = life
ignorehitpause = 1

;リバーサル判定1
[State 180, 1]
type = VarSet
trigger1 = movetype = H
fvar(22) = 2
ignorehitpause = 1

[State 180, 1]
type = VarSet
triggerall = ctrl
trigger1 = fvar(22) = 2
fvar(22) = 1
ignorehitpause = 1

[State 180, 1]
type = VarAdd
trigger1 = fvar(22) = 1
fvar(23) = 1
ignorehitpause = 1

;ボーナスメッセージアイコン表示
[State 180, 1]
type = VarSet
trigger1 = 1
fvar(8) = -1
ignorehitpause = 1

[State 180, 1]
type = VarSet
triggerall = Time = 1
triggerall = movetype != H
trigger1 = stateno = 4000
trigger2 = stateno = 4010
trigger3 = stateno = 4020
fvar(8) = 0
ignorehitpause = 1

[State 180, 1]
type = VarSet
triggerall = var(41)
triggerall = p2movetype = H
trigger1 = (stateno != [900,999])
trigger1 = movehit
trigger2 = projhit = 1
fvar(8) = 1
ignorehitpause = 1

[State 180, 1]
type = VarSet
triggerall = !var(58)
triggerall = p2movetype = H
trigger1 = (stateno != [900,999])
trigger1 = movehit
trigger2 = projHit = 1
trigger3 = stateno = 901 && animelem = 8 && movetype != H
trigger4 = stateno = 911 && AnimElemTime(8) = 1 && movetype != H
fvar(8) = ifelse(var(41),-2,2)
ignorehitpause = 1

[State 180, 1]
type = VarSet
triggerall = Time = 1
triggerall = movetype != H
trigger1 = stateno = 810
fvar(8) = 3
ignorehitpause = 1

[State 180, 1]
type = VarSet
triggerall = Time = 1
triggerall = movetype != H
trigger1 = stateno = 2800
trigger2 = stateno = 2900
fvar(8) = 4
ignorehitpause = 1

[State 180, 1]
type = VarSet
triggerall = Time = 1
triggerall = movetype != H
trigger1 = stateno = 820
fvar(8) = 5
ignorehitpause = 1

[State 180, 1]
type = VarSet
triggerall = Time = 1
triggerall = movetype != H
trigger1 = stateno = 4100
trigger2 = stateno = 4110
trigger3 = stateno = 4120
fvar(8) = 6
ignorehitpause = 1

[State 180, 1]
type = VarSet
triggerall = Time = 1
trigger1 = stateno = 5201
trigger2 = stateno = 5210
trigger3 = stateno = 955 && movetype != H
fvar(8) = 9
ignorehitpause = 1

[State 180, 1]
type = VarSet
triggerall = Time = 1
triggerall = fvar(23)
triggerall = movetype != H
triggerall = stateno != [2800,2999]
trigger1 = stateno = 195
trigger2 = stateno = [1000,3999]
fvar(8) = 10
ignorehitpause = 1

[State 3001, Super]
type = Helper
triggerall = fvar(5)
triggerall = fvar(6)
triggerall = fvar(7)
triggerall = !NumHelper(6600)
trigger1 = !fvar(8)
trigger2 = fvar(8) = [3,6]
id = 6600
name = "Guard"
pos = 0,0
postype = P1
stateno = 6630
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
facing = facing*ifelse(teamside=1,1,-1)

[State 3001, Super]
type = Helper
triggerall = fvar(5)
triggerall = fvar(6)
triggerall = fvar(7)
triggerall = !NumHelper(6600)
trigger1 = !fvar(8)
trigger2 = fvar(8) = [3,6]
id = 6600
name = "Guard"
pos = 0,0
postype = P1
stateno = 6620
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
facing = facing*ifelse(teamside=1,1,-1)

[State 3001, Super]
type = Helper
triggerall = fvar(5)
triggerall = !fvar(6)
triggerall = !NumHelper(6600)
trigger1 = !fvar(8)
trigger2 = fvar(8) = [3,6]
id = 6600
name = "Guard"
pos = 0,0
postype = P1
stateno = 6610
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
facing = facing*ifelse(teamside=1,1,-1)

[State 3001, Super]
type = Helper
triggerall = !fvar(5)
triggerall = !NumHelper(6600)
trigger1 = !fvar(8)
trigger2 = fvar(8) = [3,6]
id = 6600
name = "Guard"
pos = 0,0
postype = P1
stateno = 6600
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
facing = facing*ifelse(teamside=1,1,-1)

[State 3001, Super]
type = Helper
triggerall = fvar(5)
triggerall = fvar(6)
triggerall = fvar(7)
triggerall = !NumHelper(6602)
triggerall = roundstate = 2
trigger1 = fvar(8) = -2 || fvar(8) = 2
id = 6602
name = "First Attack"
pos = 0,0
postype = P1
stateno = 6632
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
facing = facing*ifelse(teamside=1,1,-1)

[State 3001, Super]
type = Helper
triggerall = fvar(5)
triggerall = fvar(6)
triggerall = !fvar(7)
triggerall = !NumHelper(6602)
triggerall = roundstate = 2
trigger1 = fvar(8) = -2 || fvar(8) = 2
id = 6602
name = "First Attack"
pos = 0,0
postype = P1
stateno = 6622
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
facing = facing*ifelse(teamside=1,1,-1)

[State 3001, Super]
type = Helper
triggerall = fvar(5)
triggerall = !fvar(6)
triggerall = !NumHelper(6602)
triggerall = roundstate = 2
trigger1 = fvar(8) = -2 || fvar(8) = 2
id = 6602
name = "First Attack"
pos = 0,0
postype = P1
stateno = 6612
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
facing = facing*ifelse(teamside=1,1,-1)

[State 3001, Super]
type = Helper
triggerall = !fvar(5)
triggerall = !NumHelper(6602)
triggerall = roundstate = 2
trigger1 = fvar(8) = -2 || fvar(8) = 2
id = 6602
name = "First Attack"
pos = 0,0
postype = P1
stateno = 6602
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
facing = facing*ifelse(teamside=1,1,-1)

[State 3001, Super]
type = Helper
triggerall = fvar(5)
triggerall = fvar(6)
triggerall = fvar(7)
triggerall = !NumHelper(6601)
trigger1 = fvar(8) = 1 || fvar(8) = -2
id = 6601
name = "Counter Hit"
pos = 0,0
postype = P1
stateno = 6631
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
facing = facing*ifelse(teamside=1,1,-1)

[State 3001, Super]
type = Helper
triggerall = fvar(5)
triggerall = fvar(6)
triggerall = !fvar(7)
triggerall = !NumHelper(6601)
trigger1 = fvar(8) = 1 || fvar(8) = -2
id = 6601
name = "Counter Hit"
pos = 0,0
postype = P1
stateno = ifelse(!var(58),6631,6621)
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
facing = facing*ifelse(teamside=1,1,-1)

[State 3001, Super]
type = Helper
triggerall = fvar(5)
triggerall = !fvar(6)
triggerall = !NumHelper(6601)
trigger1 = fvar(8) = 1 || fvar(8) = -2
id = 6601
name = "Counter Hit"
pos = 0,0
postype = P1
stateno = ifelse(!var(58),6621,6611)
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
facing = facing*ifelse(teamside=1,1,-1)

[State 3001, Super]
type = Helper
triggerall = !fvar(5)
triggerall = !NumHelper(6601)
trigger1 = fvar(8) = 1 || fvar(8) = -2
id = 6601
name = "Counter Hit"
pos = 0,0
postype = P1
stateno = ifelse(!var(58),6611,6601)
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
facing = facing*ifelse(teamside=1,1,-1)

[State 3001, Super]
type = Helper
triggerall = fvar(5)
triggerall = fvar(6)
triggerall = fvar(7)
triggerall = !NumHelper(6603)
trigger1 = fvar(8) = [7,9]
id = 6603
name = "Tech Hit"
pos = 0,0
postype = P1
stateno = 6633
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
facing = facing*ifelse(teamside=1,1,-1)

[State 3001, Super]
type = Helper
triggerall = fvar(5)
triggerall = fvar(6)
triggerall = !fvar(7)
triggerall = !NumHelper(6603)
trigger1 = fvar(8) = [7,9]
id = 6603
name = "Tech Hit"
pos = 0,0
postype = P1
stateno = 6623
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
facing = facing*ifelse(teamside=1,1,-1)

[State 3001, Super]
type = Helper
triggerall = fvar(5)
triggerall = !fvar(6)
triggerall = !NumHelper(6603)
trigger1 = fvar(8) = [7,9]
id = 6603
name = "Tech Hit"
pos = 0,0
postype = P1
stateno = 6613
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
facing = facing*ifelse(teamside=1,1,-1)

[State 3001, Super]
type = Helper
triggerall = !fvar(5)
triggerall = !NumHelper(6603)
trigger1 = fvar(8) = [7,9]
id = 6603
name = "Tech Hit"
pos = 0,0
postype = P1
stateno = 6603
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
facing = facing*ifelse(teamside=1,1,-1)

[State 3001, Super]
type = Helper
triggerall = fvar(5)
triggerall = fvar(6)
triggerall = fvar(7)
triggerall = !NumHelper(6604)
trigger1 = fvar(8) = 10
id = 6604
name = "Reversal"
pos = 0,0
postype = P1
stateno = 6634
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
facing = facing*ifelse(teamside=1,1,-1)

[State 3001, Super]
type = Helper
triggerall = fvar(5)
triggerall = fvar(6)
triggerall = !fvar(7)
triggerall = !NumHelper(6604)
trigger1 = fvar(8) = 10
id = 6604
name = "Reversal"
pos = 0,0
postype = P1
stateno = 6624
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
facing = facing*ifelse(teamside=1,1,-1)

[State 3001, Super]
type = Helper
triggerall = fvar(5)
triggerall = !fvar(6)
triggerall = !NumHelper(6604)
trigger1 = fvar(8) = 10
id = 6604
name = "Reversal"
pos = 0,0
postype = P1
stateno = 6614
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
facing = facing*ifelse(teamside=1,1,-1)

[State 3001, Super]
type = Helper
triggerall = !fvar(5)
triggerall = !NumHelper(6604)
trigger1 = fvar(8) = 10
id = 6604
name = "Reversal"
pos = 0,0
postype = P1
stateno = 6604
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
facing = facing*ifelse(teamside=1,1,-1)

;投げぬけ・受身GPボーナス
[State 180, 1]
type = VarAdd
trigger1 = fvar(8) = 9
var(50)=500
ignorehitpause = 1

;リバーサルボーナス
[State 180, 1]
type = VarAdd
trigger1 = fvar(8) = 10
var(50) = 2000
ignorehitpause = 1

[State 180, 1]
type = VarSet
trigger1 = fvar(23) = 3
trigger2 = (stateno = [1000,3999]) && time = 1
fvar(22) = 0
ignorehitpause = 1

[State 180, 1]
type = VarSet
trigger1 = fvar(23) = 3
trigger2 = (stateno = [1000,3999]) && time = 1
fvar(23) = 0
ignorehitpause = 1

;フィニッシュヒット判定
[State 180, 1]
type = VarSet
triggerall = alive
trigger1 = var(48) = [0,1]
fvar(9) = 1
ignorehitpause = 1

[State 180, 1]
type = VarSet
triggerall = alive
trigger1 = var(48) = 2
fvar(9) = 5
ignorehitpause = 1

[State 180, 1]
type = VarSet
triggerall = alive
trigger1 = var(48) = 3 || var(48) = 4
fvar(9) = 6+((var(20)=[3,5])*5)
ignorehitpause = 1

[State 180, 1]
type = VarSet
trigger1 = !numtarget
fvar(15) = 0
ignorehitpause = 1

[State 180, 1]
type = VarSet
trigger1 = var(48) = 2 && var(49) = 3 && (fvar(8) = 1 || fvar(8) = -2)
trigger2 = var(48) = 3 && var(49) = 3
trigger3 = var(48) = 4 && var(49) = [2,3]
trigger4 = var(18) && var(49) = 3
fvar(15) = 1
ignorehitpause = 1

[State 180, 1]
type = VarSet
triggerall = alive
trigger1 = fvar(15) = 1
fvar(9) = 12
ignorehitpause = 1

[State 180, 1]
type = VarSet
triggerall = alive
trigger1 = var(18)
fvar(9) = 3
ignorehitpause = 1

[State 3001, Super]
type = Helper
triggerall = fvar(5)
triggerall = fvar(6)
triggerall = fvar(7)
triggerall = !NumHelper(6700)
triggerall = winKO
triggerall = alive
trigger1 = !var(32)
id = 6700
name = "Finish Hit"
pos = 0,0
postype = P1
stateno = 6730
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
facing = facing*ifelse(teamside=1,1,-1)

[State 3001, Super]
type = Helper
triggerall = fvar(5)
triggerall = fvar(6)
triggerall = !fvar(7)
triggerall = !NumHelper(6700)
triggerall = winKO
triggerall = alive
trigger1 = !var(32)
id = 6700
name = "Finish Hit"
pos = 0,0
postype = P1
stateno = 6720
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
facing = facing*ifelse(teamside=1,1,-1)

[State 3001, Super]
type = Helper
triggerall = fvar(5)
triggerall = !fvar(6)
triggerall = !NumHelper(6700)
triggerall = winKO
triggerall = alive
trigger1 = !var(32)
id = 6700
name = "Finish Hit"
pos = 0,0
postype = P1
stateno = 6710
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
facing = facing*ifelse(teamside=1,1,-1)

[State 3001, Super]
type = Helper
triggerall = !fvar(5)
triggerall = !NumHelper(6700)
triggerall = winKO
triggerall = alive
trigger1 = !var(32)
id = 6700
name = "Finish Hit"
pos = 0,0
postype = P1
stateno = 6700
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
facing = facing*ifelse(teamside=1,1,-1)

[State 3001, Super]
type = Helper
triggerall = fvar(5)
triggerall = fvar(6)
triggerall = fvar(7)
triggerall = !NumHelper(6704)
triggerall = win
triggerall = alive
trigger1 = var(56) = 5
trigger1 = fvar(14) = 1
trigger1 = !var(54)
id = 6704
name = "Complete"
pos = 0,0
postype = P1
stateno = 6734
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
facing = facing*ifelse(teamside=1,1,-1)

[State 3001, Super]
type = Helper
triggerall = fvar(5)
triggerall = fvar(6)
triggerall = !fvar(7)
triggerall = !NumHelper(6704)
triggerall = win
triggerall = alive
trigger1 = var(56) = 5
trigger1 = fvar(14) = 1
trigger1 = !var(54)
id = 6704
name = "Complete"
pos = 0,0
postype = P1
stateno = 6724
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
facing = facing*ifelse(teamside=1,1,-1)

[State 3001, Super]
type = Helper
triggerall = fvar(5)
triggerall = !fvar(6)
triggerall = !NumHelper(6704)
triggerall = win
triggerall = alive
trigger1 = var(56) = 5
trigger1 = fvar(14) = 1
trigger1 = !var(54)
id = 6704
name = "Complete"
pos = 0,0
postype = P1
stateno = 6714
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
facing = facing*ifelse(teamside=1,1,-1)

[State 3001, Super]
type = Helper
triggerall = !fvar(5)
triggerall = !NumHelper(6704)
triggerall = win
triggerall = alive
trigger1 = var(56) = 5
trigger1 = fvar(14) = 1
trigger1 = !var(54)
id = 6704
name = "Complete"
pos = 0,0
postype = P1
stateno = 6704
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
facing = facing*ifelse(teamside=1,1,-1)

[State 3001, Super]
type = Helper
triggerall = !fvar(5)
triggerall = !fvar(3)
triggerall = win
triggerall = alive
trigger1 = fvar(11) = 1
id = 6701
name = "Vital"
pos = 0,0
postype = P1
stateno = 6701
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
facing = facing*ifelse(teamside=1,1,-1)

[State 3001, Super]
type = Helper
triggerall = !fvar(6)
triggerall = !fvar(3)
triggerall = win
triggerall = alive
trigger1 = fvar(11) = 1
trigger1 = !fvar(14)
id = 6702
name = "Perfect"
pos = 0,0
postype = P1
stateno = 6712
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
facing = facing*ifelse(teamside=1,1,-1)

[State 3001, Super]
type = Helper
triggerall = !fvar(6)
triggerall = !fvar(3)
triggerall = win
triggerall = alive
trigger1 = fvar(11) = 1
trigger1 = fvar(14) = 1
id = 6703
name = "Max Combo"
pos = 0,0
postype = P1
stateno = 6713
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
facing = facing*ifelse(teamside=1,1,-1)

[State 3001, Super]
type = Helper
triggerall = !fvar(7)
triggerall = !fvar(3)
triggerall = win
triggerall = alive
trigger1 = fvar(11) = 1
trigger1 = !fvar(14)
id = 6703
name = "Max Combo"
pos = 0,0
postype = P1
stateno = 6723
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
facing = facing*ifelse(teamside=1,1,-1)

;燃焼、感電エフェクト継続処理
[State -2, Combo]
type = VarSet
trigger1 = fvar(25)
fvar(25) = 0
ignorehitpause = 1

[State -2, Combo]
type = VarSet
trigger1 = movehit || projhit = 1
fvar(25) = -1
ignorehitpause = 1

[State -2, Combo]
type = VarSet
triggerall = p2movetype = H
trigger1 = projhit4005 = 1
fvar(25) = 1
ignorehitpause = 1

[State -2, Combo]
type = VarSet
triggerall = p2movetype = H
trigger1 = projhit4005 = 1
fvar(25) = 2
ignorehitpause = 1

[State -2, Combo]
type = VarSet
triggerall = p2movetype = H
trigger1 = projhit4005 = 1
fvar(25) = 3
ignorehitpause = 1

[State -2, Combo]
type = VarSet
triggerall = p2movetype = H
trigger1 = projhit4005 = 1
fvar(25) = 4
ignorehitpause = 1

[State -2, Combo]
type = VarSet
triggerall = p2movetype = H
trigger1 = projhit4005 = 1
fvar(25) = 5
ignorehitpause = 1

[State -2, Combo]
type = VarSet
triggerall = p2movetype = H
trigger1 = projhit4005 = 1
fvar(25) = 6
ignorehitpause = 1

;燃焼エフェクト発生（ダウン）
[State 3001, Super]
type = Helper
triggerall = !NumHelper(8300)
trigger1 = fvar(25) = 1 || fvar(25) = 5
id = 8300
name = "FireEffect_Down"
pos = 0,0
postype = P2
stateno = 8300
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1

;燃焼エフェクト発生（のけぞり）
[State 3001, Super]
type = Helper
triggerall = !NumHelper(8300)
trigger1 = fvar(25) = 2 || fvar(25) = 6
id = 8300
name = "FireEffect_KnockBack"
pos = 0,0
postype = P2
stateno = 8301
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1

;感電エフェクト発生（ダウン）
[State 3001, Super]
type = Helper
triggerall = !NumHelper(8300)
trigger1 = fvar(25) = 3
id = 8300
name = "SparkEffect_KnockBack"
pos = 0,0
postype = P2
stateno = 8305
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1

;感電エフェクト発生（のけぞり）
[State 3001, Super]
type = Helper
triggerall = !NumHelper(8300)
trigger1 = fvar(25) = 4
id = 8300
name = "SparkEffect_Down"
pos = 0,0
postype = P2
stateno = 8306
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1

;カウンターヒットエフェクト発生
[State -3, Blocking5]
type = helper
trigger1 = fvar(8) = 1 || fvar(8) = -2
trigger1 = projHit = 0
id = 8130
name = "COUNTER HIT EFFECT"
pos = Ceil(enemy,Const(size.ground.front)+var(38)),Ceil(Pos Y-enemy,Pos Y+var(39))
postype = P2
stateno = 8130
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 99999
supermovetime = 99999
size.xscale = 1
size.yscale = 1

;ヒット管理
[State -2, Combo]
type = VarSet
trigger1 = numenemy
trigger1 = enemy,MoveType != H
var(17) = 0
ignorehitpause = 1

[State -2, Combo]
type = VarAdd
trigger1 = (stateno != [900,999])
trigger1 = movehit
trigger2 = projHit = 1
var(17) = 1
ignorehitpause = 1

[State 3001, Super]
type = Helper
triggerall = numenemy
triggerall = roundState = 2
triggerall = (var(17) = 5 && !var(18)) || (var(17) = 10 && var(18))
trigger1 = !NumHelper(6800)&&!var(52)
trigger2 = !NumHelper(6800)&&var(52)=1&&!enemynear,NumHelper(6800)
id = 6800
name = "naration_3"
pos = 0,0
postype = P1
stateno = 6802
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
persistent = 0
pausemovetime = 99999999999999

[State 180, 1];ファーストストライク判別
type = VarAdd
trigger1 = fvar(8) = -2 || fvar(8) = 2
var(50) = 5000
ignorehitpause = 1

[State 3001, Super]
type = Helper
triggerall = numenemy
triggerall = roundstate = 2
triggerall = var(51) < 400
triggerall = (!NumHelper(6800)&&!var(52)) || (!NumHelper(6800)&&var(52)=1&&!enemynear,NumHelper(6800))
trigger1 = fvar(8) = -2 || fvar(8) = 2
id = 6800
name = "naration_2"
pos = 0,300
postype = Left
stateno = 6801
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
persistent = 0
pausemovetime = 99999999999999

[State -2, Combo]
type = VarSet
trigger1 = fvar(8) = -2 || fvar(8) = 2
trigger2 = MoveType = H && (stateno != [150,159]) && (stateno != [4100,4199])
var(58) = 1
ignorehitpause = 1
persistent = 0

[State 180, 1];ヒットボーナス
type = VarAdd
triggerall = roundState = 2
trigger1 = moveguarded
trigger2 = projGuarded = 1
var(50)=ifelse((hitdefattr=SCA,NA,NP,NT),-50,ifelse((hitdefattr=SCA,SA,SP,ST),-30,-20))
ignorehitpause = 1
persistent = 1

[State 180, 1]
type = VarAdd
triggerall = roundState = 2
triggerall = !var(41)
triggerall = p2movetype = H
trigger1 = (stateno != [900,999])
trigger1 = movehit
trigger2 = projHit = 1
var(50)=500
ignorehitpause = 1
persistent = 1

[State 180, 1]
type = VarAdd
triggerall = roundState = 2
triggerall = var(41)
triggerall = p2movetype = H
trigger1 = (stateno != [900,999])
trigger1 = movehit
trigger2 = projHit = 1
var(50)=ifelse((hitdefattr=SCA,NA,NP,NT),1001,ifelse((hitdefattr=SCA,SA,SP,ST),3001,5001))
ignorehitpause = 1
persistent = 1

[State 180, 1]
type = VarAdd
triggerall = roundState = 2
triggerall = var(41)
triggerall = p2movetype = H
trigger1 = (stateno != [900,999])
trigger1 = movehit
trigger2 = projHit = 1
var(50)=1000
ignorehitpause = 1
persistent = 1

[State -2, Combo];MAXコンボ数判別
type = VarSet
trigger1 = P2MoveType = H
trigger1 = var(47) < var(17)
var(47) = var(17)
ignorehitpause = 1
persistent = 1

[State 180, 1];コンボボーナス
type = VarAdd
triggerall = roundState = 2
triggerall = var(17) >= 2
trigger1 = (stateno != [900,999])
trigger1 = movehit
trigger2 = projHit = 1
var(50)=ifelse(var(17)<6,2000,500)
ignorehitpause = 1
persistent = 1

[State -2, Combo]
type = VarSet
trigger1 = movehit
trigger2 = projHit = 1
var(36) = ifelse(movehit,1,3)
ignorehitpause = 1

[State -2, Combo]
type = VarSet
trigger1 = moveguarded
trigger2 = projGuarded = 1
var(36) = ifelse(moveguarded,2,4)
ignorehitpause = 1

[State -2, Combo]
type = VarSet
triggerall = Time = 1
trigger1 = stateno != 1105
trigger1 = stateno != 3005
var(36) = 0
ignorehitpause = 1

[State -2, Combo]
type = VarSet
trigger1 = 1
fvar(24) = 0
ignorehitpause = 1

[State -2, Combo]
type = VarSet
trigger1 = movehit
trigger2 = projHit = 1
fvar(24) = ifelse(movehit,1,3)
ignorehitpause = 1

[State -2, Combo]
type = VarSet
trigger1 = moveguarded
trigger2 = projGuarded = 1
fvar(24) = ifelse(moveguarded,2,4)
ignorehitpause = 1

[State -2, MoveContact]
type = MoveHitReset
trigger1 = MoveContact
ignorehitpause = 1

;パワー増加量判定
[State -2, PowerReset]
type = VarSet
trigger1 = !var(20)
var(24) = 0

[State -2, PowerReset]
type = VarSet
trigger1 = var(20) = 1
var(24) = 167

[State -2, PowerReset]
type = VarSet
trigger1 = var(20) = 2
var(24) = -125

[State -2, PowerReset]
type = VarSet
trigger1 = var(20) = 4
var(24) = -222

[State -2, PowerReset]
type = VarSet
trigger1 = var(20) = 6
var(24) = -360

[State -2, PowerReset]
type = VarSet
trigger1 = var(20) = 3 || var(20) = 5
var(24) = -1000

[State -2, PowerReset2]
type = VarSet
triggerall = roundState = 2
trigger1 = (100*life/const(data.life))<=100
trigger1 = (100*life/const(data.life))>30
var(31) = 0

[State -2, PowerReset3]
type = VarSet
triggerall = roundState = 2
trigger1 = (100*life/const(data.life))<=30
trigger1 = (100*life/const(data.life))>15
var(31) = 2

[State -2, PowerReset4]
type = VarSet
triggerall = roundState = 2
trigger1 = (100*life/const(data.life))<=15
trigger1 = (100*life/const(data.life))>0
var(31) = 4

[State -2, PowerReset]
type = VarSet
triggerall = roundState = 2
trigger1 = 1
var(46) = gethitvar(damage)

;攻撃力変動判定
[State -2, PowerReset]
type = VarSet
triggerall = !var(20) || var(20) = 6
triggerall = !var(18)
triggerall = roundState = 2
trigger1 = power = [0,999]
var(7) = 0

[State -2, PowerReset]
type = VarSet
triggerall = var(20) != 0 && var(20) != 6
trigger1 = roundState = 2
var(7) = 0

[State -2, PowerReset]
type = VarSet
triggerall = !var(20) || var(20) = 6
triggerall = !var(18)
triggerall = roundState = 2
trigger1 = power = [1000,1999]
var(7) = 1

[State -2, PowerReset]
type = VarSet
triggerall = !var(20) || var(20) = 6
triggerall = !var(18)
triggerall = roundState = 2
trigger1 = power = [2000,2999]
var(7) = 2

[State -2, PowerReset]
type = VarSet
triggerall = !var(20) || var(20) = 6
triggerall = !var(18)
triggerall = roundState = 2
trigger1 = power >= 3000
var(7) = 5

[State -2, PowerReset]
type = VarSet
triggerall = roundState = 2
trigger1 = (100*life/const(data.life))<=100
trigger1 = (100*life/const(data.life))>30
var(8) = 0

[State -2, PowerReset2]
type = VarSet
triggerall = roundState = 2
trigger1 = (100*life/const(data.life))<=30
trigger1 = (100*life/const(data.life))>15
var(8) = 5

[State -2, PowerReset3]
type = VarSet
triggerall = roundState = 2
trigger1 = (100*life/const(data.life))<=15
trigger1 = (100*life/const(data.life))>0
var(8) = 10

[State -2, PowerReset4]
type = VarSet
triggerall = roundState = 2
trigger1 = (100*enemy,life/enemy,const(data.life))<=100
trigger1 = (100*enemy,life/enemy,const(data.life))>30
var(9) = 0

[State -2, PowerReset5]
type = VarSet
triggerall = roundState = 2
trigger1 = (100*enemy,life/enemy,const(data.life))<=30
trigger1 = (100*enemy,life/enemy,const(data.life))>15
var(9) = -10

[State -2, PowerReset6]
type = VarSet
triggerall = roundState = 2
trigger1 = (100*enemy,life/enemy,const(data.life))<=15
trigger1 = (100*enemy,life/enemy,const(data.life))>0
var(9) = -25

[State -2, PowerReset]
type = VarSet
triggerall = var(20) = 5
triggerall = roundState = 2
trigger1 = var(43)
var(21) = ifelse((stateno = [195,999]),35,ifelse((stateno = [1000,2999]),30,10))

[State -2, PowerReset]
type = VarSet
triggerall = var(20) = 5
triggerall = roundState = 2
trigger1 = !var(43)
var(21) = 0

[State -2, PowerReset]
type = VarSet
triggerall = var(20) != 5
triggerall = roundState = 2
trigger1 = 1
var(21) = 0

[State -2, 1]
type = VarSet
trigger1 = P2movetype != H
var(17) = 0

[State -2]
type = VarSet
trigger1 = var(17) < 10
trigger1 = var(18)
trigger1 = stateno = [0, 2999]
fvar(0) = (10-var(17))*.1*.72
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = var(17) >= 10
trigger1 = var(18)
trigger1 = stateno = [0, 2999]
fvar(0) = .072
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = var(18)
trigger1 = stateno = [3000, 3999]
fvar(0) = .8
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = !var(18)
trigger1 = var(17) = [6,29]
trigger1 = stateno = [0, 2999]
fvar(0) = (24-(var(17)-5))*.0417
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = !var(18)
trigger1 = var(17) > 30
trigger1 = stateno = [0, 2999]
fvar(0) = .0417
ignorehitpause = 1

[State -2]
type = VarSet
triggerall = !var(18)
trigger1 = var(17) <= 5
trigger2 = stateno = [3000, 3999]
fvar(0) = 1
ignorehitpause = 1

[State -2]
type = VarSet
trigger1 = 1
fvar(10) = (100+var(7))*.01*(100+var(8))*.01*(100+var(9))*.01*(100+var(21))*.01*(100+((var(14)>0)*15))*.01*(100+ ((var(15)>0)*20))*.01*(10+(var(41)*2))*.1*fvar(0)
ignorehitpause = 1

;カウンターヒット
[State -2, PowerReset]
type = VarSet
trigger1 = P2MoveType = A
var(41) = 1

[State -2, PowerReset]
type = VarSet
trigger1 = P2MoveType != A
var(41) = 0

;地上受身可能判定
[State -2, PowerReset]
type = VarSet
trigger1 = StateNo = 5000 || StateNo = 5010 || StateNo = 5020 || StateNo = 5070 || StateNo = 5080
trigger1 = time = 0
trigger1 = P2stateno = [3000,3999]
var(1) = 1

[State -2, PowerReset]
type = VarSet
trigger1 = StateNo = 5000 || StateNo = 5010 || StateNo = 5020 || StateNo = 5070 || StateNo = 5080
trigger1 = time = 0
trigger1 = P2stateno != [3000,3999]
trigger2 = movetype != H
var(1) = 0

;振り向き
[State 1300,Turn]
type = Turn
triggerall = P2Dist X < 0
trigger1 = prevstateno = 52
trigger1 = stateno = [1000,3999]
trigger1 = time = 1
ignorehitpause = 1

;削りKO移行
[State -2, 3] 
type = ChangeState
trigger1 = !alive
trigger1 = prevstateno = 130 || prevstateno = 131 || prevstateno = [150,153]
trigger1 = stateno = [5000,5050]
value = 5950

[State -2,KO]
type = Varset
triggerall = stateno = [120,159]
trigger1 = StateType = S
ignorehitpause = 1
fvar(1) = 0

[State -2,KO]
type = Varset
triggerall = stateno = [120,159]
trigger1 = StateType = C
ignorehitpause = 1
fvar(1) = 1

[State -2,KO]
type = Varset
triggerall = stateno = [120,159]
trigger1 = StateType = A
ignorehitpause = 1
fvar(1) = 2

;ブロッキング入力
[State -2, Blocking-1]
type = VarSet
trigger1 = var(10) >= 20
trigger2 = (stateno = [4000,4020]) && time = 1
var(34) = 0

[State -2, Blocking-1]
type = VarSet
trigger1 = var(10) >= 20
trigger2 = (stateno = [4000,4020]) && time = 1
var(10) = 0

[State -2, Blocking-1]
type = VarAdd
trigger1 = var(10)
var(10) = 1
ignorehitpause = 1

[State -2, Blocking-1]
type = VarSet
triggerall = !var(59)
triggerall = !var(10)
triggerall = var(20) = 2 || var(20) = 6
trigger1 = command = "block" && command != "holddown"&& Command != "holdup"
var(10) = 1

[State -2, Blocking-1]
type = VarSet
trigger1 = var(10) = [1,4]
trigger1 = command != "holdfwd" && Command != "holdback" && command != "holdup" && Command != "holddown"
var(34) = 1

[State -2, Blocking-12
type = VarSet
trigger1 = var(11) >= 20
trigger2 = (stateno = [4000,4020]) && time = 1
var(35) = 0

[State -2, Blocking-2]
type = VarSet
trigger1 = var(11) >= 20
trigger2 = (stateno = [4000,4020]) && time = 1
var(11) = 0

[State -2, Blocking-2]
type = VarAdd
trigger1 = var(11)
var(11) = 1
ignorehitpause = 1

[State -2, Blocking-2]
type = VarSet
triggerall = !var(59)
triggerall = !var(11)
triggerall = var(20) = 2 || var(20) = 6
trigger1 = command = "block2" && command != "holdfwd"&& Command != "holdback"
var(11) = 1

[State -2, Blocking-2]
type = VarSet
trigger1 = var(11) = [1,4]
trigger1 = command != "holdfwd" && Command != "holdback" && command != "holdup" && Command != "holddown"
var(35) = 1

;上段ブロッキング移行
[State -2, 4000] 
type = HitOverride
triggerall = var(20) = 2 || var(20) = 6
triggerall = statetype != A && ctrl
trigger1 = (var(10) = [1,4]) && !var(59)
trigger2 = (var(10) = [5,8]) && var(34) && !var(59)
trigger3 = Random <= 150 && var(59)
slot = 0
stateno = 4000
attr = SA, AA, AP
time = 1

;下段ブロッキング移行
[State -2, 4010]
type = HitOverride
triggerall = var(20) = 2 || var(20) = 6
triggerall = statetype != A && ctrl
trigger1 = (var(11) = [1,4]) && !var(59)
trigger2 = (var(11) = [5,8]) && var(35) && !var(59)
trigger3 = Random <= 150 && var(59)
slot = 0
stateno = 4010
attr = C, AA, AP
time = 1

;空中ブロッキング移行
[State -2, 4020]
type = HitOverride
triggerall = !var(4)
triggerall = var(20) = 2 || var(20) = 6
triggerall = statetype = A && ctrl
trigger1 = (var(10) = [1,4]) && !var(59)
trigger2 = (var(10) = [5,8]) && var(34) && !var(59)
trigger3 = Random <= 150 && var(59)
slot = 0
stateno = 4020
attr = SCA, AA, AP
time = 1

;ジャストディフェンス入力
[State -2, 46]
type = VarSet
trigger1 = roundstate = 0
var(25) = -1

[State -2, 47]
type = VarAdd
trigger1 = var(25) >= 0
var(25) = 1
ignorehitpause = 1

[State -2, 46]
type = VarSet
triggerall = var(25) > 12
triggerall = var(20) = 5 || var(20) = 6
trigger1 = command != "holdback"
var(25) = -1

[State -2, 46]
type = VarSet
triggerall = var(25) = -1
triggerall = var(20) = 5 || var(20) = 6
triggerall = stateno != [140,159]
trigger1 = command = "back"
trigger2 = command = "downback"
var(25) = 0

[State -2, 46]
type = VarSet
triggerall = var(25) = [0,6]
triggerall = var(20) = 5 || var(20) = 6
trigger1 = command != "holdback"
var(25) = 7

[State -2, 46]
type = VarSet
triggerall = var(20) = 5 || var(20) = 6
trigger1 = stateno = 4100 || stateno = 4110 || stateno = 4120
var(25) = -1

;ジャストディフェンス硬直時間
[State 180, 1]
type = VarAdd
trigger1 = var(0)
var(0) = -1
ignorehitpause = 1

[State 180, 1]
type = VarSet
trigger1 = time = 0
var(0) = GetHitVar(hitshaketime)
ignorehitpause = 1

;上段ジャストディフェンス移行
[State -2, 3] 
type = ChangeState
triggerall = var(20) = 5 || var(20) = 6
triggerall = stateno = 150
triggerall = time = 0
trigger1 = (var(25) = [0,6]) && !var(59)
trigger2 = Random <= 250 && var(59) && prevstateno != [140,159]
value = 4100

;下段ジャストディフェンス移行
[State -2, 3]
type = ChangeState
triggerall = var(20) = 5 || var(20) = 6
triggerall = stateno = 152
triggerall = time = 0
trigger1 = (var(25) = [0,6]) && !var(59)
trigger2 = Random <= 250 && var(59) && prevstateno != [140,159]
value = 4110

;空中ジャストディフェンス移行
[State -2, 3]
type = HitOverride
triggerall = var(20) = 5 || var(20) = 6
triggerall = stateno = 120 && statetype = A
triggerall = !var(4)
trigger1 = (var(25) = [0,6]) && !var(59)
trigger2 = Random <= 250 && var(59) && prevstateno != [140,159]
slot = 0
stateno = 4120
attr = SCA, AA, AP
time = 1

;KO後AI暴れ防止
[State -2,AI]
type = Varset
trigger1 = roundState = 3
trigger1 = var(59) = 1
ignorehitpause = 1
var(59) = 2

[State -2,AI]
type = Varset
trigger1 = roundState = 1
trigger1 = var(59) = 2
ignorehitpause = 1
var(59) = 1

;KO時ボイス
[State -2,AI]
type = Varset
trigger1 = 1
ignorehitpause = 1
fvar(19) = 0

[State -2,AI]
type = Varset
trigger1 = anim = 5950 || stateno = 5950
ignorehitpause = 1
fvar(19) = 1

[State -2,AI]
type = Varset
trigger1 = movetype != H
trigger1 = roundState = 2
ignorehitpause = 1
var(37) = 0

[State -2,AI]
type = Varset
trigger1 = StateNo = 5000 || StateNo = 5010 || StateNo = 5020 || StateNo = 5070 || StateNo = 5080
trigger1 = roundState = 2
trigger1 = time = 0
ignorehitpause = 1
var(37) = gethitvar(hitshaketime)

[State -2, KO]
type = PlaySnd
triggerall = roundstate = [2,3]
trigger1 = !fvar(19) && !fvar(20)
trigger1 = Var(27) = ifelse(!var(37),1,ifelse(var(37)>20,20,var(37)))
trigger2 = !fvar(19) && fvar(20)
trigger2 = Var(27) = 12
ignorehitpause = 1
value = 110, var(12)

[State -2, KO]
type = PlaySnd
triggerall = roundstate = [2,3]
triggerall = fvar(19)
triggerall = !alive
trigger1 = anim = 5950 && animelemtime(1) = 2
ignorehitpause = 1
value = 5950, var(12)

[State -2,KO]
type = Varadd
trigger1 = !alive
ignorehitpause = 1
var(27) = 1

[State -2,KO]
type = Varset
trigger1 = alive
ignorehitpause = 1
var(27) = 0

;KO時演出
[State -2, HyperComboFinish]
type = Helper
triggerall = roundstate >= 2
triggerall = WinKo && !var(32)
trigger1 = stateno = [3000, 3999]
trigger2 = Var(18)
trigger3 = fvar(9)=12
ID = 9000
stateno = ifelse(fvar(9)=12,9020,ifelse((var(20)=[3,5]),9010,9000))
postype = left
pos = -50,0
pausemovetime = 999999
supermovetime = 999999
ignorehitpause = 1
ownpal = 1

[State -2, HyperComboFinish]
type = PlaySnd
triggerall = roundstate >= 2
trigger1 = WinKo && !var(32)
value = 9000,0
ignorehitpause = 1

[State 9020, PlaySnd]
type = PlaySnd
triggerall = roundstate >= 2
trigger1 = WinKo && !var(32)
trigger1 = fvar(9)=12
value = 9000,4
ignorehitpause = 1

[State -2, HyperComboFinish]
type = pause
triggerall = roundstate >= 2
trigger1 = WinKo && !var(32)
time = 10
ignorehitpause = 1

[State -2,KO]
type = Varadd
trigger1 = roundstate = 3
ignorehitpause = 1
var(32) = 1

[State -2,KO]
type = Varset
trigger1 = roundstate = 0
ignorehitpause = 1
var(32) = 0

[State -2,KO]
type = Varadd
trigger1 = roundstate = 4
ignorehitpause = 1
fvar(11) = 1

[State -2,KO]
type = Varset
trigger1 = roundstate = 0
ignorehitpause = 1
fvar(11) = 0

;エフェクト除去
[State 3000, Explod]
type = RemoveExplod
trigger1 = stateno = 3100 && time = 1
id = 7500

[State 3000, Explod]
type = RemoveExplod
trigger1 = stateno != 3101
id = 7501

[State 3000, Explod]
type = RemoveExplod
trigger1 = stateno != 3101
id = 7502

;残像消去
[State -2]
type = AfterImageTime
triggerall = !var(16)
trigger1 = MoveType = H
trigger2 = StateNo = [0,49]
trigger3 = StateNo = [100,189]
trigger4 = StateNo = 195
trigger5 = StateNo = [200,799]
trigger6 = StateNo = [850,859]
trigger7 = StateNo = [900,1799]
time = 0

;ラウンド開始時等パワーリセット等
[State -2, 1]
type = PowerSet
triggerall = roundState = 0
trigger1 = fvar(13) || var(18)
trigger2 = var(20) = 3
value = 0

[State -2, 1]
type = PowerSet
triggerall = roundState = 0
triggerall = var(20) = 5
trigger1 = var(26) = 2
value = 0

[State -2, 1]
type = VarSet
trigger1 = roundState = 0 && (var(43) || var(26) = 2) && roundno != 1
trigger2 = roundState = 0 && roundno = 1
fvar(13) = 0

[State -2, 1]
type = VarSet
trigger1 = roundState = 0
var(14) = 0

[State -2, 1]
type = VarSet
trigger1 = roundState = 0
var(15) = 0

[State -2, 1]
type = VarSet
trigger1 = roundState = 0
var(16) = 0

[State -2, 1]
type = VarSet
trigger1 = roundState = 0
var(18) = 0

[State -2, 1]
type = VarSet
trigger1 = matchover
var(30) = 0

[State -2, 1]
type = VarSet
trigger1 = roundState = 0 && roundno = 1
var(43) = 0

[State -2, 1]
type = VarSet
trigger1 = roundState = 0
var(47) = 0

[State -2, 1]
type = VarSet
trigger1 = roundState = 0
var(51) = 0

[State -2, 1]
type = VarSet
trigger1 = roundState = 0
var(52) = 0

[State -2, 1]
type = VarSet
trigger1 = roundState = 0 && roundno = 1
var(54) = 0

[State -2, 1]
type = VarSet
trigger1 = roundState = 0
var(58) = 0

[State -2, 1]
type = VarSet
trigger1 = roundState = 0
fvar(5) = 0

[State -2, 1]
type = VarSet
trigger1 = roundState = 0
fvar(6) = 0

[State -2, 1]
type = VarSet
trigger1 = roundState = 0
fvar(7) = 0

[State -2, 1]
type = VarSet
trigger1 = roundState = 0 && roundno = 1
fvar(13) = 0

[State -2, 1]
type = VarSet
trigger1 = roundState = 0
fvar(14) = 0

[State -2, 1]
type = PalFX
trigger1 = roundState = 0
Time = 1
add   = 0,0,0
ignorehitpause = 1

;原作判別
[State -2, 1]
type = VarSet
trigger1 = 1
fvar(39) = 1;CAPCOM VS SNK 2

;キャラ判別
[State -2, 1]
type = VarSet
triggerall = numenemy
triggerall = roundState = 2
trigger1 = enemy,authorname = "warusaki3" && enemy,fvar(39) = 1
trigger2 = enemy,authorname = "H”" && enemy,fvar(39) = 1
trigger3 = enemy,authorname = "mouser" && (P2Name = "Hibiki Takane" || P4Name = "Hibiki Takane")
var(52) = 1

;やられ時にゲージ消去する相手動作の判定
[State -2, 1]
type = VarSet
trigger1 = 1
fvar(20) = 0

[State -2, 1]
type = VarSet
triggerall = numenemy
trigger1 = (enemynear,authorname="warusaki3"&&enemynear,fvar(39)=1&&enemynear,var(13))
trigger2 = (enemynear,authorname="SUMI"&&enemynear,name="Destrudo Ryu"&&enemynear,var(16)=1)
fvar(20) = 1

;製作用関数表示
[State -2, DEBUG]
trigger1 = 1
type = DisplayToClipboard
ignorehitpause = 1
text = "Groove VAR = %d Parry= %d JD =%d Parry = %d Oricom = %d \n "
params = ceil(fvar(32)), var(17), var(5) ,life, NumHelper(8200)

[Statedef -3]

[State -3, Bounding Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = StateNo = 5100 || StateNo = 5110
value = 5100, 0
channel = 20

[State -3, GetHurt Sound]
type = PlaySnd
triggerall = Random < 500
triggerall = Time = 1
triggerall = alive
trigger1 = StateNo = 5000 || StateNo = 5010 || StateNo = 5020 || StateNo = 5070 || StateNo = 5080 || StateNo = 5100
value = 5000, ifelse(StateNo = 5100 || GetHitVar(animtype) = 2, 2, ifelse(GetHitVar(animtype) = 1, 1, 0))+var(12)
channel = 10

[State 3000, Voice]
type = PlaySnd
triggerall = var(12)
triggerall = Time = 1
trigger1 = StateNo = 5201 || StateNo = 5210
value = 5200,10
channel = 0

[State 3000, Voice]
type = PlaySnd
triggerall = !var(12)
triggerall = Time = 1
trigger1 = StateNo = 5201 || StateNo = 5210
value = 800,1
channel = 0

[State 820, Voice]
type = Stopsnd
trigger1 = StateNo = 5000 || StateNo = 5010 || StateNo = 5020 || StateNo = 5070 || StateNo = 5080 || StateNo = 5100
trigger2 = StateNo = [150,159]
channel = 0
