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

;---------------------------------------------------------------------
; 基本設定
[Data]
life = 1000          ; 体力ゲージ、上限値（デフォルト：1000）
power = 5000         ; パワーゲージ、デフォルト：1000
attack = 100         ; 攻撃力（％）
defence = 100        ; 防御力（％）
fall.defence_up = 50 ; 空中コンボ修正率（％）
liedown.time = 16    ; ダウン時間
airjuggle = 150       ; 空中コンボ
sparkno = -1          ; 初期ヒットスパーク番号
guard.sparkno = -1   ; 初期ガードスパーク番号
KO.echo = 0          ; ＫＯボイスエコー（0:OFF、1:ON）
volume = 0         ; キャラボイスボリューム値
IntPersistIndex = 32 ;次のラウンドに持ち越すVarを決める
FloatPersistIndex = 15;次のラウンドに持ち越すfVarを決める

[Size]
xscale = .5          ; 水平サイズ倍率
yscale = .5          ; 垂直サイズ倍率
ground.back = 20     ; キャラ幅（地上、後ろ側）
ground.front = 20    ; キャラ幅（地上、前側）
air.back = 20        ; キャラ幅（空中、後ろ側）
air.front = 20       ; キャラ幅（空中、前側）
z.width = 10         ; キャラ幅（ｚ軸）
height = 50          ; キャラの高さ（ジャンプで飛び越せる高さ）
attack.width = 4,4   ;Default attack width: back, front
attack.dist = 360    ;Default attack distance
proj.attack.dist = 90;Default attack distance for projectiles
proj.doscale = 0     ;Set to 1 to scale projectiles too   
head.pos = 2,-114    ; 頭部座標
mid.pos = -6,-84    ; 体中心部座標
shadowoffset = 0     ; キャラの影・オフセット値

[Velocity]
walk.fwd  = 2.75       ; 前進速度
walk.back = -2.25      ; 後退速度
run.fwd  = 3.8, 0  ; 前ダッシュ速度（y<0の場合、ホップステップ）
run.back = -4.0,-2.95  ; バックステップ速度（y=0の場合、走り）
jump.neu = 0,-11.5    ; 垂直ジャンプ速度
jump.fwd = 3.25        ; 前方ジャンプ速度
jump.back = -3.5      ; 後方ジャンプ速度
runjump.fwd = 3.75,-16.0      ;前方ハイジャンプ
runjump.back = -4.0,-16.0 ;後方ハイジャンプ
airjump.fwd = 6.0    ;前方空中ダッシュ
airjump.back = -6.0  ;後方空中ダッシュ

[Movement]
airjump.num = 0        ; 空中ジャンプ回数
;airjump.height = 35   ; 空中ジャンプ最低高度
yaccel = .56           ; キャラ重力加速度
stand.friction = .85   ; 摩擦係数（立ち状態）
crouch.friction = .82  ; 摩擦係数（しゃがみ状態）


;勝利ポーズ
[statedef 180]
type = S
movetype = I
physics = S
ctrl = 0
velset = 0,0

[state 180]
type = changestate
trigger1 = !time&&var(45)=10000
trigger2 = !time&&numpartner
trigger2 = partner,alive&&((partner,name="Oda Nobunaga"&&partner,authorname="rei"&&matchover)||(partner,name="cvsiori"&&partner,authorname="H”"&&partner,anim=182))
value = 182

[state 180]
type = ChangeAnim
trigger1 = !time
value = 180+random%2

[state 3510]
type = Explod
trigger1 = Anim=180&&AnimElem=8
id = 6700
anim = 6700
pos = -floor(92*const(size.xscale)),-floor(10*const(size.yscale))
postype = p1
ignorehitpause=1
scale = const(size.xscale),const(size.yscale)

[state 180]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&AnimElem=1
value = 10,ifelse(var(45)=10000,109,ifelse(numhelper(8800),108,ifelse(matchover&&random<500,107,ifelse(random%2=0,94,106))))
channel = 1

;天は我に屈した…
[state 180]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&AnimElem=1&&!numenemy
trigger1 = var(10) := floor(591*(TicksPerSecond/60))
value = 10,194
channel = 1
;9.848sec

;心の眼を開かぬ者に…誠の強さなど語れぬわ！
[state 190]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&AnimElem=1 && fvar(11)=1 && !(var(45)=10000||numhelper(8800)||matchover)
trigger1 = var(10) := floor(340*(TicksPerSecond/60))
value = 10,95
channel = 1
;5.658sec

;わが進軍こそ未来を拓く…うぬら武田には…
[state 190]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&AnimElem=1 && fvar(11)=2 && !(var(45)=10000||numhelper(8800)||matchover)
trigger1 = var(10) := floor(406*(TicksPerSecond/60))
value = 10,96
channel = 1
;6.758sec

;さらばだ…わが友よ
[state 190]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&AnimElem=1 && fvar(11)=3 && !(var(45)=10000||numhelper(8800)||matchover)
trigger1 = var(10) := floor(190*(TicksPerSecond/60))
value = 10,97
channel = 1
;3.156sec

;我求めるは大儀なす力…夜郎自大の謀りなど・・・
[state 190]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&AnimElem=1 && fvar(11)=6 && !(var(45)=10000||numhelper(8800)||matchover)
trigger1 = var(10) := floor(509*(TicksPerSecond/60))
value = 10,98
channel = 1
;8.471sec

;駒を生かすは将の器…貴様の兵は…
[state 190]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&AnimElem=1 && fvar(11)=7 && !(var(45)=10000||numhelper(8800)||matchover)
trigger1 = var(10) := floor(422*(TicksPerSecond/60))
value = 10,99
channel = 1
;7.023sec

;魔は滅せり！
[state 190]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&AnimElem=1 && fvar(11)=8 && !(var(45)=10000||numhelper(8800)||matchover)
trigger1 = var(10) := floor(158*(TicksPerSecond/60))
value = 10,100
channel = 1
;2.631sec

;神仏の加護など不要！この国は我が護る！
[state 190]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&AnimElem=1 && fvar(11)=4 && !(var(45)=10000||numhelper(8800)||matchover)
trigger1 = var(10) := floor(377*(TicksPerSecond/60))
value = 10,101
channel = 1
;6.269sec

;魔に魅入られし魂…哀れなり
[state 190]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&AnimElem=1 && fvar(11)=5 && !(var(45)=10000||numhelper(8800)||matchover)
trigger1 = var(10) := floor(275*(TicksPerSecond/60))
value = 10,102
channel = 1
;4.582sec

;この国の未来は、我が双肩にあり！
[state 190]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&AnimElem=1 && fvar(11)=10 && !(var(45)=10000||numhelper(8800)||matchover)
trigger1 = var(10) := floor(245*(TicksPerSecond/60))
value = 10,103
channel = 1
;4.083sec

;大儀なすには…竜は小さすぎる
[state 190]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&AnimElem=1 && fvar(11)=11 && !(var(45)=10000||numhelper(8800)||matchover)
trigger1 = var(10) := floor(261*(TicksPerSecond/60))
value = 10,104
channel = 1
;4.344sec

;大儀なすには…竜は小さすぎる
[state 190]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&AnimElem=1 && fvar(11)=12 && !(var(45)=10000||numhelper(8800)||matchover)
trigger1 = var(10) := floor(261*(TicksPerSecond/60))
value = 10,105
channel = 1
;4.344sec

[state 180]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 1,1

;==WIN
[state -2]
type = Helper
triggerall = time=270 && matchover
trigger1 = !numpartner
trigger2 = numpartner
trigger2 = (ID-partner,ID)>0 && (partner,authorname="rei"||partner,authorname="gal129")&&partner,fvar(39)=7
id = 8600
stateno=8600
pos = 0,0
postype = back
ownpal = 1
facing=facing
pausemovetime=999999
supermovetime=999999

;==PERFECT
[state -2]
type = Helper
triggerall = time=240 && !matchover && WinPerfect
trigger1 = !numpartner
trigger2 = numpartner
trigger2 = (ID-partner,ID)>0 && (partner,authorname="rei"||partner,authorname="gal129")&&partner,fvar(39)=7
id = 8650
stateno=8650
pos = 0,0
postype = back
ownpal = 1
facing=facing
pausemovetime=999999
supermovetime=999999

[state 180]
type = AssertSpecial
trigger1 = ifelse(matchover,time<600,ifelse(!numenemy,1,time<420||var(10)!=0))
trigger2 = numpartner&&time<500&&anim=182
trigger2 = partner,alive&&var(45)!=10000
flag = roundnotover

;勝利ポーズ2
[statedef 182]
type = S
movetype = I
physics = S
ctrl = 1
velset = 0,0

[state 181]
type = CtrlSet
trigger1 = roundstate=4
value = 0

[state 182]
type = ChangeAnim
trigger1 = !time&&Anim!=182
value = 182

;フハハハハハ…
[state 180]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&AnimElem=1&&numpartner&&anim=182&&var(45)!=10000
trigger1 = var(10) := floor((204+180+ifelse(matchover,160,0))*(TicksPerSecond/60))
value = 10,155
channel = 1

;余の怒りに…天もひるんでおるわ！
[state 190]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&AnimElem=4
trigger1 = var(10) := floor((204+180+ifelse(matchover,160,0))*(TicksPerSecond/60))
value = 10,109
channel = 1
;3.399sec

[state 180]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 1,1

;==WIN
[state -2]
type = Helper
triggerall = time=270 && matchover
trigger1 = !numpartner
trigger2 = numpartner
trigger2 = (ID-partner,ID)>0 && (partner,authorname="rei"||partner,authorname="gal129")&&partner,fvar(39)=7
id = 8600
stateno=8600
pos = 0,0
postype = back
ownpal = 1
facing=facing
pausemovetime=999999
supermovetime=999999

;==PERFECT
[state -2]
type = Helper
triggerall = time=240 && !matchover && WinPerfect
trigger1 = !numpartner
trigger2 = numpartner
trigger2 = (ID-partner,ID)>0 && (partner,authorname="rei"||partner,authorname="gal129")&&partner,fvar(39)=7
id = 8650
stateno=8650
pos = 0,0
postype = back
ownpal = 1
facing=facing
pausemovetime=999999
supermovetime=999999

[state 180]
type = AssertSpecial
trigger1 = roundstate=4&&var(10)!=0
trigger2 = numpartner&&time<500&&var(45)!=10000
trigger2 = partner,alive
flag = roundnotover

;イントロ
[statedef 190]
type = S
ctrl = 0
velset = 0,0
anim = 190

;援軍ゲージ、一撃ゲージMAXに
[State 5900, 1] ;Clear all int variables
type = VarSet
trigger1 = roundsexisted = 0 && !time && command="holdup" && command="hold_s"
var(43) = 100000

[State 5900, 1] ;Clear all int variables
type = VarSet
trigger1 = roundsexisted = 0 && !time && command="holdup" && command="hold_s"
var(42) = 200

[State 5900, 1] ;Clear all int variables
type = VarSet
trigger1 = roundsexisted = 0 && !time && command="holdup" && command="hold_s"
var(41) = 200

[State 5900, 1] ;Clear all int variables
type = VarSet
trigger1 = roundsexisted = 0 && !time && command="holdup" && command="hold_s"
var(40) = 1

[state 5900]
type = VarSet
trigger1 = roundsexisted = 0 && !time && command="holdup" && command="hold_s"
fvar(15) = 1.00

[state 190]
type = ChangeAnim
trigger1 = Anim=190&&((enemynear,stateno!=[190,199])||teamside=1||(Time>=600&&enemynear,name!="Oda Nobunaga"))&&time>=60
value = 191

[state 190]
type = AssertSpecial
trigger1 = 1
flag = Intro

[state 190]
type = PlaySND
trigger1 = Anim=190&&AnimElem=2
value = 30,8

[state 190]
type = PlaySND
trigger1 = Anim=191&&AnimElem=3
value = 30,8

[state 190]
type = EnvShake
trigger1 = Anim=191&&AnimElem=3
time = 8
ampl = 4

[state 801]
type = Explod
trigger1 = Anim=190&&AnimElem=1
id = 6000
anim = 6000
pos = floor(100*const(size.xscale)),-floor(220*const(size.yscale))
postype = p1
scale = const(size.xscale)*1.5,const(size.yscale)*2
ownpal = 1
sprpriority = 4
removetime=-1
pausemovetime=999
supermovetime=999
persistent=0

[state 801]
type = Explod
trigger1 = Anim=190&&AnimElem=1
id = 6000
anim = 6000
pos = -floor(40*const(size.xscale)),-floor(220*const(size.yscale))
postype = p1
scale = const(size.xscale)*1.5,const(size.yscale)*2
ownpal = 1
sprpriority = 4
removetime=-1
pausemovetime=999
supermovetime=999
persistent=0

[state 801]
type = RemoveExplod
trigger1 = Anim=191&&AnimElem=1
id = 6000

[state 801]
type = Explod
trigger1 = Anim=191&&AnimElem=1
id = 6005
anim = 6005
pos = floor(100*const(size.xscale)),-floor(220*const(size.yscale))
postype = p1
scale = const(size.xscale)*1.5,const(size.yscale)*2
ownpal = 1
sprpriority = 4
pausemovetime=999
supermovetime=999
persistent=0

[state 801]
type = Explod
trigger1 = Anim=191&&AnimElem=1
id = 6005
anim = 6005
pos = -floor(40*const(size.xscale)),-floor(220*const(size.yscale))
postype = p1
scale = const(size.xscale)*1.5,const(size.yscale)*2
ownpal = 1
sprpriority = 4
pausemovetime=999
supermovetime=999
persistent=0

[state 190]
type = varadd
trigger1 = animelemtime(5)>0&&!var(10)&&var(7)
var(7) = -1

[state 190]
type = varset
trigger1 = animelemtime(5)>0&&!var(10)&&!var(7)
var(7) = 30
persistent=0

;小童が…
[state 190]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&Anim=191 && AnimElem=5 && fvar(11)=1
trigger1 = var(10) := floor(237*(TicksPerSecond/60))
value = 10,83
channel = 1
;3.937sec

;武田の飼い犬が！…
[state 190]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&Anim=191 && AnimElem=5 && fvar(11)=2
trigger1 = var(10) := floor(316*(TicksPerSecond/60))
value = 10,84
channel = 1
;5.256sec

;ふ！道化には…
[state 190]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&Anim=191 && AnimElem=5 && fvar(11)=3
trigger1 = var(10) := floor(189*(TicksPerSecond/60))
value = 10,85
channel = 1
;3.138sec

;餓鬼が鬼を…
[state 190]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&Anim=191 && AnimElem=5 && fvar(11)=6
trigger1 = var(10) := floor(385*(TicksPerSecond/60))
value = 10,86
channel = 1
;6.403sec

;策など…
[state 190]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&Anim=191 && AnimElem=5 && fvar(11)=7
trigger1 = var(10) := floor(311*(TicksPerSecond/60))
value = 10,87
channel = 1
;5.170sec

;は！山猿が…
[state 190]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&Anim=191 && AnimElem=5 && fvar(11)=8
trigger1 = var(10) := floor(307*(TicksPerSecond/60))
value = 10,88
channel = 1
;5.114sec

;軍神よ！最上の…
[state 190]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&Anim=191 && AnimElem=5 && fvar(11)=4
trigger1 = var(10) := floor(254*(TicksPerSecond/60))
value = 10,89
channel = 1
;4.230sec

;我に歯向かうか市よ…
[state 190]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&Anim=191 && AnimElem=5 && fvar(11)=5
trigger1 = var(10) := floor(403*(TicksPerSecond/60))
value = 10,90
channel = 1
;6.707sec

;余に歯向かう…
[state 190]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&Anim=191 && AnimElem=5 && fvar(11)=10
trigger1 = var(10) := floor(338*(TicksPerSecond/60))
value = 10,91
channel = 1
;5.619sec

;竜の右目…
[state 190]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&Anim=191 && AnimElem=5 && fvar(11)=11
trigger1 = var(10) := floor(364*(TicksPerSecond/60))
value = 10,92
channel = 1
;6.066sec

;豊臣の猿回し…
[state 190]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&Anim=191 && AnimElem=5 && fvar(11)=12
trigger1 = var(10) := floor(402*(TicksPerSecond/60))
value = 10,93
channel = 1
;6.690sec

[state 190]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&Anim=191 && AnimElem=5
trigger1 = var(10) := floor(ifelse(var(50)%2=0,266,773)*(TicksPerSecond/60))
value = 10,ifelse(var(50)%2=0,0,82)
channel = 1
;4.423sec
;12.869sec

[state 190]
type = ChangeAnim
trigger1 = Anim!=0&&Anim!=190&&AnimTime=0
value = 0

[state 190]
type = ChangeState
trigger1 = Anim=0 && !var(10) && !var(7)
value = 0
[state 190]
type = ChangeState
trigger1 = ishelper(1)
trigger1 = Anim=0 && !root,var(10) && !root,var(7)
value = 0

;挑発
[statedef 195]
type = S
movetype=I
physics = S
ctrl = 0
velset = 0,0
anim = 195
movehitpersist=1

[state 200]
type = VarSet
trigger1 = !time&&P2dist X<0&&(prevstateno=52||((prevstateno=[200,1999])&&fvar(10)<=0))
fvar(9) = -fvar(9)

[state 200]
type = Turn
trigger1 = !time&&P2dist X<0&&(prevstateno=52||(prevstateno=[200,1999]))

;援軍ヒットキャンセル
[state 100]
type = Helper
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
id = 7710
stateno = 7710
pos = 0,const(size.mid.pos.y)
postype = P1
pausemovetime=20
supermovetime=20
ignorehitpause=1

;援軍ヒットキャンセル
[state 100]
type = VarSet
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
fvar(5) = 0

;援軍ヒットキャンセル
[state 100]
type = VarSet
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
var(15) = 0

;援軍ヒットキャンセル
[state 100]
type = MoveHitReset
trigger1 = !time

[state 195]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&AnimElem=1
value = 10,55
channel = 1

[state 195]
type = PlaySND
trigger1 = AnimElem=8
value = 30,16

[state 195]
type = PlaySND
trigger1 = AnimElem=13
value = 30,17

[state 801]
type = Explod
trigger1 = AnimElem=13
id = 196
anim = 196
pos = 0,0
postype = p1
scale = const(size.xscale),const(size.yscale)
ownpal = 1
sprpriority = 1

[state 195]
type = ChangeState
trigger1 = AnimTime=0
value = 0
ctrl = 1

;立ち弱
[statedef 200]
type = S
movetype=A
physics = S
ctrl = 0
velset = ifelse(fvar(9)&&prevstateno!=2000&&fvar(10)>=30,fvar(9),0),0
movehitpersist=1

[state 200]
type = VarSet
trigger1 = !time&&P2dist X<0&&(prevstateno=52||((prevstateno=[200,1999])&&fvar(10)<=0))
fvar(9) = -fvar(9)

[state 200]
type = Turn
trigger1 = !time&&P2dist X<0&&(prevstateno=52||(prevstateno=[200,1999]))

;最大慣性速度
[state -2]
type = varset
trigger1 = !time&&(prevstateno=[100,101])
fvar(9) = ifelse(fvar(9)>const(velocity.run.fwd.x)*2,const(velocity.run.fwd.x)*2,fvar(9)*.9)
ignorehitpause=1

;援軍ヒットキャンセル
[state 100]
type = Helper
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = !((movecontact||animelemtime(5)>0)&&prevstateno=200)
id = 7710
stateno = 7710
pos = 0,const(size.mid.pos.y)
postype = P1
pausemovetime=20
supermovetime=20
ignorehitpause=1

;援軍ヒットキャンセル
[state 100]
type = VarSet
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = !((movecontact||animelemtime(5)>0)&&prevstateno=200)
fvar(5) = 0

;援軍ヒットキャンセル
[state 100]
type = VarSet
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = !((movecontact||animelemtime(5)>0)&&prevstateno=200)
var(15) = 0

;援軍ヒットキャンセル
[state 100]
type = MoveHitReset
trigger1 = !time

;速度取得
[state -2]
type = varset
trigger1 = !time
fvar(8) = 0
ignorehitpause=1

;先行入力処理リセット
[state 200]
type = VarSet
trigger1 = !Time
trigger2 = animtime=-1&&(var(53)!=[110,115])
var(53) = 0

[state 200]
type = ChangeAnim
trigger1 = Time=0&&!(var(34)=stateno&&((prevstateno=[130,132])||(prevstateno=150||prevstateno=152)))
value = 200

[state 190]
type = PlaySND
trigger1 = AnimElemNo(2)=3&&AnimElemNo(1)=2
value = 7300,0
channel = 10

[state 190]
type = PlaySND
triggerall = !Ishelper
trigger1 = (!var(10)||var(10)>=1000)&&random%2=0&&AnimElemNo(2)=3&&AnimElemNo(1)=2
value = 10,1+(random<500)
channel = 1

;~~~自分側のhitpause作成~~
[state 250]
type = varset
trigger1 = time=0
var(52) = 100

[state 250]
type = varadd
trigger1 = movecontact&&var(52)>=0
var(52) = -1

[state 250]
type = varset
trigger1 = movecontact=1
var(52) = 10

[state 250]
type = null;varset
trigger1 = movecontact&&((enemynear,prevstateno=[5000,5099])||(enemynear,prevstateno=[150,155]))&&P2movetype!=H&&var(52)>0
var(52) = 0

[state 250]
type = ChangeAnim
trigger1 = (movecontact||var(19)) && var(52)>var(54) && var(52)<100
value = anim
elem = ifelse(AnimElemNo(0)=var(47),AnimElemNo(0),AnimElemNo(-1))

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(47) = AnimElemNo(0)

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(54) = AnimElemTime(AnimElemNo(0))

[state 250]
type = PosFreeze
trigger1 = var(52)>0&&(movecontact||var(19))
value = 1
;~~~~~~~~~~~~~~~~~~~~~~
;~~必殺技~~~
;屍ニ堕ツル城
[state 250]
type = varset
trigger1 = (var(45)=[1,9999]) && var(53)<1000 && roundstate=2 && !var(59)
var(53) = ifelse(command="Ichigeki",3500,var(53))

;死ニ至ル病
[state 250]
type = varset
trigger1 = Power>=1000 && var(53)<1000 && roundstate=2 && !var(59)
var(53) = ifelse(!var(13)&&command="Shini",3000,var(53))

;苦ヲ喰ム紅
[state 250]
type = varset
trigger1 = Power>=1000 && var(53)<1000 && roundstate=2 && !var(59)
var(53) = ifelse(command="Kuwo",3100,var(53))

;慟哭スル魂
[state 250]
type = varset
trigger1 = var(53)<1000 && time>4 && !var(59)
var(53) = ifelse(!var(12)&&command="Doukoku",1200,var(53))

;慟哭スル魂・散華
[state 250]
type = varset
triggerall = var(53)<1000 && roundstate=2 && !var(59)
trigger1 = numhelper(6400)
trigger1 = helper(6400),stateno=6400
trigger2 = numhelper(6401)
trigger2 = helper(6401),stateno=6400
trigger3 = numhelper(6402)
trigger3 = helper(6402),stateno=6400
var(53) = ifelse(command="Sange",1400,var(53))

;慟哭スル魂・波動
[state 250]
type = varset
triggerall = var(53)<1000 && roundstate=2 && !var(59)
trigger1 = numhelper(6400)
trigger1 = helper(6400),stateno=6400
trigger2 = numhelper(6401)
trigger2 = helper(6401),stateno=6400
trigger3 = numhelper(6402)
trigger3 = helper(6402),stateno=6400
var(53) = ifelse(command = "Hadou",1300,var(53))

;厄災ノ棘
[state 250]
type = varset
trigger1 = var(53)<1000 && time>4 && !var(59)
var(53) = ifelse(command="Yakusai",1100,var(53))

;上反斬り
[state 250]
type = varset
trigger1 = var(53)<1000 && time>4 && !var(59)
var(53) = ifelse(command="Joutan",1600,var(53))

;遠雷遥
[state 250]
type = varset
trigger1 = var(53)<1000 && time>4 && !var(59)
var(53) = ifelse(command="Enrai",1000,var(53))

;~~~~
;チェーンコンボ
[state 250]
type = varset
trigger1 = !var(53) && time>4 && !var(59)
trigger1 = ((command="x"&&command="holddown")||command="y"||command="z")
var(53) = ifelse(command="z",ifelse(command="holdfwd"&&command!="holddown",320,220),ifelse(command="y",ifelse(command="holdfwd"&&command!="holddown",310,210),ifelse(command="x",200,var(53))))+(command="holddown")*200
;~~~~~~~~~~~

;Attack Lv.1
[state 200]
type = Hitdef
triggerall = (var(52)<=0||var(52)=100)
trigger1 = AnimElem=3
damage = floor(ifelse(floor(28*fvar(0))<1,1+(var(2)%5=4),floor(28*fvar(0)))*1.22)
ground.slidetime = 10
ground.hittime = 10
guard.slidetime = 8
guard.hittime = 8
pausetime = 1,10+var(49)*5
ground.velocity = -9.0*(1.0+ifelse(var(2)>31,31,var(2))*.02)*const(size.xscale)
guard.velocity = ifelse(numtarget(920),-44,-9.0)*const(size.xscale)
ground.cornerpush.veloff = 0
air.velocity = ifelse(var(1)%8>=4||var(1)%2>=1,-10.0*(1.0+ifelse(var(2)>31,31,var(2))*.05)-.0010,-6.0*(1.0+ifelse(var(3)>31,31,var(3))*.04)*const(size.xscale)),ifelse(var(6)%10>0,var(6)%10*1.5,(-9.0*(51-var(3))/51-.9)*const(size.yscale))
airguard.velocity = -6*const(size.xscale),-2*const(size.yscale)
air.cornerpush.veloff = 0
yaccel = .9*const(size.yscale)
fall.recover = ifelse(var(6)%10>0||var(28)>0,0,1)
fall.recovertime = ifelse(var(49)&&!var(2),20+10,10-ifelse(floor(var(14)/100)>5,5,floor(var(14)/100))+10)
hitsound = s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,0)
guardsound = s7000,0
getpower = floor(ifelse(var(9),0,floor(33*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2))*1.250*fvar(16))),floor(ifelse(var(9),0,ceil(33*fvar(0)/fvar(2)*1.0/8)*1.250*fvar(16)))
givepower = floor(33*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2)*.8)*1.250,floor(33*fvar(0)/fvar(2)*.8*1.0/8)*1.250
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-180*const(size.xscale))
animtype = Light
ground.type = High
attr = S,NA
hitflag = MAFD
guardflag = M
persistent=0

[state 200]
type = AttackDist
trigger1 = AnimElem=4
value = 0

;ヒットによる増加(スタイリッシュポイント)
[state -2]
type = varadd
trigger1 = movehit=1
fvar(15) = .00005*floor(ifelse(28*fvar(14)<1,1+(var(2)%5=1),28*fvar(14))*1.22)
ignorehitpause=1

[state -2]
type = varset
trigger1 = movehit=1
fvar(14) = fvar(1)*fvar(2)*fvar(3)*fvar(4)
ignorehitpause=1

;◇◇ヒットスパーク◇◇
[state 240]
type = VarSet
trigger1 = AnimElem=3
var(16) = 0
persistent=0

;X座標
[state 240]
type = VarSet
trigger1 = AnimElem=3,>=0&&AnimElem=4,<0
var(17) = floor(ifelse(P2dist X>134*const(size.xscale),134*const(size.xscale),floor(P2dist X)+ifelse((P2dist X=[1,30]),10,-10)+10))

;Y座標
[state 240]
type = VarSet
trigger1 = AnimElem=3,>=0&&AnimElem=4,<0
var(18) = floor(-180*const(size.yscale))

;・・・・自分側ヒットバック・・・・
;ヒットバック量取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = var(1)%2<1&&var(1)%8<4&&target,time=0
fvar(5) = ifelse(var(3)&&target,statetype=A&&var(6)%10<1,-12.0*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.06),-9.0*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.060))*const(size.xscale)
ignorehitpause=1

;ヒットバック量取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2>=1||var(1)%8>=4)&&target,time=1
fvar(5) = (-9.0*1.25*((enemynear,backedgebodydist<=5||enemynear,frontedgebodydist<=5||var(1)%8>=4)&&fvar(10)<=0)*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.1))*const(size.xscale)
ignorehitpause=1

;ヒットバック時間取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2<1&&var(1)%8<4&&target,time=0)||((var(1)%2>=1||var(1)%8>=4)&&target,time=1)
fvar(6) = ifelse(moveguarded,8,10)
ignorehitpause=1

;ヒットポーズ取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2<1&&var(1)%8<4&&target,time=0)||((var(1)%2>=1||var(1)%8>=4)&&target,time=1)
fvar(7) = (10-(var(1)%2>=1||var(1)%8>=4))*ifelse(moveguarded,-1,1)
ignorehitpause=1
;・・・・・・・・

[state 200]
type = ChangeState
trigger1 = AnimTime=0
value = 0
ctrl = 1

;立ち中
[statedef 210]
type = S
movetype=A
physics = S
ctrl = 0
velset = ifelse(fvar(9),fvar(9)*0,0),0
movehitpersist=1

[state 200]
type = VarSet
trigger1 = !time&&P2dist X<0&&(prevstateno=52||((prevstateno=[200,1999])&&fvar(10)<=0))
fvar(9) = -fvar(9)

[state 200]
type = Turn
trigger1 = !time&&P2dist X<0&&(prevstateno=52||(prevstateno=[200,1999]))

;最大慣性速度
[state -2]
type = varset
trigger1 = !time&&(prevstateno=[100,101])
fvar(9) = ifelse(fvar(9)>const(velocity.run.fwd.x)*2,const(velocity.run.fwd.x)*2,fvar(9)*.9)
ignorehitpause=1

;援軍ヒットキャンセル
[state 100]
type = Helper
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = !(movecontact&&(prevstateno=200||prevstateno=400))
id = 7710
stateno = 7710
pos = 0,const(size.mid.pos.y)
postype = P1
pausemovetime=20
supermovetime=20
ignorehitpause=1

;援軍ヒットキャンセル
[state 100]
type = VarSet
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = !(movecontact&&(prevstateno=200||prevstateno=400))
fvar(5) = 0

;援軍ヒットキャンセル
[state 100]
type = VarSet
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = !(movecontact&&(prevstateno=200||prevstateno=400))
var(15) = 0

;援軍ヒットキャンセル
[state 100]
type = MoveHitReset
trigger1 = !time

;速度取得
[state -2]
type = varset
trigger1 = !time
fvar(8) = 0
ignorehitpause=1

;先行入力処理リセット
[state 200]
type = VarSet
trigger1 = !Time
trigger2 = animtime=-1&&(var(53)!=[110,115])
var(53) = 0

[state 200]
type = ChangeAnim
trigger1 = Time=0&&!(var(34)=stateno&&((prevstateno=[130,132])||(prevstateno=150||prevstateno=152)))
value = 210

;||魂属性判別
[state 6900]
type = varset
trigger1 = animelem=1
var(36) = 0

[state 6900]
type = varset
triggerall = animelem=1
trigger1 = numhelper(6400)
trigger1 = helper(6400),stateno=6400
trigger2 = numhelper(6401)
trigger2 = helper(6401),stateno=6400
trigger3 = numhelper(6402)
trigger3 = helper(6402),stateno=6400
var(36) = 1

;魂放出
[state 6900]
type = varset
triggerall = animelem=4,>0&&var(36)=1
triggerall = command="x"&&!var(59)
trigger1 = numhelper(6400)
trigger1 = helper(6400),stateno=6400
trigger2 = numhelper(6401)
trigger2 = helper(6401),stateno=6400
trigger3 = numhelper(6402)
trigger3 = helper(6402),stateno=6400
var(36) = 2

[state 1200]
type = helper
trigger1 = var(36)>1
trigger1 = var(36):=-1
id = 6410
stateno= 6420
pos = 0,0
postype = p1
ownpal = 1
size.xscale = const(size.xscale)*1.5
size.yscale = const(size.xscale)*1.5
ignorehitpause=1
;||

;現在の速度取得
[state 900]
type = VarSet
trigger1 = var(36)&&AnimElem=5
fvar(8) = 8.5

[state 900]
type = VarSet
trigger1 = var(36)&&fvar(8)>=.5&&!(var(52)>0&&movecontact)
fvar(8) = fvar(8)*.85

[state 900]
type = VarSet
trigger1 = var(36)&&fvar(8)<.5&&!(var(52)>0&&movecontact)
fvar(8) = 0

[state -2]
type = velset
trigger1 = var(36)&&fvar(8)>0 && !fvar(9) && !(fvar(5) && !fvar(7)&&(enemynear,backedgebodydist<=5||enemynear,frontedgebodydist<=5))
x = fvar(8)

[state 190]
type = PlaySND
triggerall = !Ishelper
trigger1 = var(36)&&AnimElemNo(2)=6&&AnimElemNo(1)=5
value = 30,8
channel = 10

[state 190]
type = PlaySND
triggerall = !Ishelper
trigger1 = !var(36)&&AnimElemNo(2)=6&&AnimElemNo(1)=5
value = 7300,2
channel = 10

[state 190]
type = PlaySND
triggerall = !Ishelper
trigger1 = (!var(10)||var(10)>=1000)&&random%3!=0&&AnimElemNo(2)=6&&AnimElemNo(1)=5
value = 10,3+(random<500)
channel = 1

;~~~自分側のhitpause作成~~
[state 250]
type = varset
trigger1 = time=0
var(52) = 100

[state 250]
type = varadd
trigger1 = movecontact&&var(52)>=0
var(52) = -1

[state 250]
type = varset
trigger1 = movecontact=1
var(52) = 12

[state 250]
type = null;varset
trigger1 = movecontact&&((enemynear,prevstateno=[5000,5099])||(enemynear,prevstateno=[150,155]))&&P2movetype!=H&&var(52)>0
var(52) = 0

[state 250]
type = ChangeAnim
trigger1 = (movecontact||var(19)) && var(52)>var(54) && var(52)<100
value = anim
elem = ifelse(AnimElemNo(0)=var(47),AnimElemNo(0),AnimElemNo(-1))

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(47) = AnimElemNo(0)

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(54) = AnimElemTime(AnimElemNo(0))

[state 250]
type = PosFreeze
trigger1 = var(52)>0&&(movecontact||var(19))
value = 1
;~~~~~~~~~~~~~~~~~~~~~~
;~~必殺技~~~
;屍ニ堕ツル城
[state 250]
type = varset
trigger1 = (var(45)=[1,9999]) && var(53)<1000 && roundstate=2 && !var(59)
var(53) = ifelse(command="Ichigeki",3500,var(53))

;死ニ至ル病
[state 250]
type = varset
trigger1 = Power>=1000 && var(53)<1000 && roundstate=2 && !var(59)
var(53) = ifelse(!var(13)&&command="Shini",3000,var(53))

;苦ヲ喰ム紅
[state 250]
type = varset
trigger1 = Power>=1000 && var(53)<1000 && roundstate=2 && !var(59)
var(53) = ifelse(command="Kuwo",3100,var(53))

;慟哭スル魂
[state 250]
type = varset
trigger1 = var(53)<1000 && time>4 && !var(59)
var(53) = ifelse(!var(12)&&command="Doukoku",1200,var(53))

;慟哭スル魂・散華
[state 250]
type = varset
triggerall = var(53)<1000 && roundstate=2 && !var(59)
trigger1 = numhelper(6400)
trigger1 = helper(6400),stateno=6400
trigger2 = numhelper(6401)
trigger2 = helper(6401),stateno=6400
trigger3 = numhelper(6402)
trigger3 = helper(6402),stateno=6400
var(53) = ifelse(command="Sange",1400,var(53))

;慟哭スル魂・波動
[state 250]
type = varset
triggerall = var(53)<1000 && roundstate=2 && !var(59)
trigger1 = numhelper(6400)
trigger1 = helper(6400),stateno=6400
trigger2 = numhelper(6401)
trigger2 = helper(6401),stateno=6400
trigger3 = numhelper(6402)
trigger3 = helper(6402),stateno=6400
var(53) = ifelse(command = "Hadou",1300,var(53))

;厄災ノ棘
[state 250]
type = varset
trigger1 = var(53)<1000 && time>4 && !var(59)
var(53) = ifelse(command="Yakusai",1100,var(53))

;上反斬り
[state 250]
type = varset
trigger1 = var(53)<1000 && time>4 && !var(59)
var(53) = ifelse(command="Joutan",1600,var(53))

;遠雷遥
[state 250]
type = varset
trigger1 = var(53)<1000 && time>4 && !var(59)
var(53) = ifelse(command="Enrai",1000,var(53))

;~~~~
;ダッシュ
[state 250]
type = varset
trigger1 = var(53)<1000 && time>4 && !var(59)
trigger1 = movecontact&&var(36)
var(53) = ifelse((fvar(13)=17&&P2dist X>=0)||(fvar(13)=-17&&P2dist X<0),100,var(53))

;ジャンプ・ハイジャンプ
[state 250]
type = varset
trigger1 = !var(53) && time>4 && !var(59)
trigger1 = movecontact&&var(36)
var(53) = ifelse(var(0)<10 && command="longjump",50+ifelse(command="holdback",2,ifelse(command="holdfwd",1,0)),ifelse(command="holdup",40+ifelse(command="holdback",2,ifelse(command="holdfwd",1,0)),0))

;チェーンコンボ
[state 250]
type = varset
trigger1 = !var(53) && time>4 && !var(59)
trigger1 = ((command="x"&&command="holddown")||command="y"||command="z")
var(53) = ifelse(command="z",ifelse(command="holdfwd"&&command!="holddown",320,220),ifelse(command="y",ifelse(command="holdfwd"&&command!="holddown",310,210),ifelse(command="x",200,var(53))))+(command="holddown")*200
;~~~~~~~~~~~

;Attack Lv.3
[state 200]
type = Hitdef
triggerall = (var(52)<=0||var(52)=100)
trigger1 = AnimElem=6
damage = floor(ifelse(floor(48*fvar(0))<1,1+(var(2)%5=4),floor(48*fvar(0)))*1.22)
ground.slidetime = 14+(P2statetype=C)
ground.hittime = 14+(P2statetype=C)
guard.slidetime = 12
guard.hittime = 12
pausetime = 1,12+var(49)*6
ground.velocity = -12.0*(1.0+ifelse(var(2)>31,31,var(2))*.02)*const(size.xscale)
guard.velocity = ifelse(numtarget(920),-44,-12.0)*const(size.xscale)
ground.cornerpush.veloff = 0
air.velocity = ifelse(var(1)%8>=4||var(1)%2>=1,-10.0*(1.0+ifelse(var(2)>31,31,var(2))*.05)-.0012,-6.0*(1.0+ifelse(var(3)>31,31,var(3))*.04)*const(size.xscale)),ifelse(var(6)%10>0,var(6)%10*1.5,(-10.0*(51-var(3))/51-.9)*const(size.yscale))
airguard.velocity = -6*const(size.xscale),-2*const(size.yscale)
air.cornerpush.veloff = 0
yaccel = .9*const(size.yscale)
fall.recover = ifelse(var(6)%10>0||var(28)>0,0,1)
fall.recovertime = ifelse(var(49)&&!var(2),30+12,16-ifelse(floor(var(14)/75)>7,7,floor(var(14)/75))+12)
hitsound = s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,4)
guardsound = s7000,4
getpower = floor(ifelse(var(9),0,floor(45*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2))*1.250*fvar(16))),floor(ifelse(var(9),0,ceil(45*fvar(0)/fvar(2)*1.0/8)*1.250*fvar(16)))
givepower = floor(45*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2)*.8)*1.250,floor(45*fvar(0)/fvar(2)*.8*1.0/8)*1.250
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-160*const(size.xscale))
animtype = Medium
ground.type = High
attr = S,NA
hitflag = MAFD
guardflag = M
persistent=0

[state 200]
type = AttackDist
trigger1 = AnimElem=7
value = 0

;ヒットによる増加(スタイリッシュポイント)
[state -2]
type = varadd
trigger1 = movehit=1
fvar(15) = .00005*floor(ifelse(48*fvar(0)<1,1+(var(2)%5=4),48*fvar(0))*1.22)
ignorehitpause=1

[state -2]
type = varset
trigger1 = movehit=1
fvar(14) = fvar(1)*fvar(2)*fvar(3)*fvar(4)
ignorehitpause=1

;◇◇ヒットスパーク◇◇
[state 240]
type = VarSet
trigger1 = AnimElem=6
var(16) = 5
persistent=0

;X座標
[state 240]
type = VarSet
trigger1 = AnimElem=6,>=0&&AnimElem=7,<0
var(17) = floor(ifelse(P2dist X>172*const(size.xscale),172*const(size.xscale),floor(P2dist X)+ifelse((P2dist X=[1,30]),10,-10)+10))

;Y座標
[state 240]
type = VarSet
trigger1 = AnimElem=6&&AnimElem=7,<0
var(18) = floor(-160*const(size.yscale))-floor(ifelse(floor(P2dist X)<(28+enemynear,const(size.ground.front)),0,ifelse(floor(P2dist X)>(148*const(size.xscale)),20,(floor(P2dist X)-(20+enemynear,const(size.ground.front)))*.5)))


;・・・・自分側ヒットバック・・・・
;ヒットバック量取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = var(1)%2<1&&var(1)%8<4&&target,time=0
fvar(5) = ifelse(var(3)&&target,statetype=A&&var(6)%10<1,-12.0*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.06),-12.0*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.060))*const(size.xscale)
ignorehitpause=1

;ヒットバック量取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2>=1||var(1)%8>=4)&&target,time=1
fvar(5) = (-12.0*1.25*((enemynear,backedgebodydist<=5||enemynear,frontedgebodydist<=5||var(1)%8>=4)&&fvar(10)<=0)*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.1))*const(size.xscale)
ignorehitpause=1

;ヒットバック時間取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2<1&&var(1)%8<4&&target,time=0)||((var(1)%2>=1||var(1)%8>=4)&&target,time=1)
fvar(6) = ifelse(moveguarded,12,14+(P2statetype=C))
ignorehitpause=1

;ヒットポーズ取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2<1&&var(1)%8<4&&target,time=0)||((var(1)%2>=1||var(1)%8>=4)&&target,time=1)
fvar(7) = (12-(var(1)%2>=1||var(1)%8>=4))*ifelse(moveguarded,-1,1)
ignorehitpause=1
;・・・・・・・・

[state 200]
type = ChangeState
trigger1 = AnimTime=0
value = 0
ctrl = 1


;立ち強
[statedef 220]
type = S
movetype=A
physics = S
ctrl = 0
velset = ifelse(fvar(9),fvar(9)*0,0),0
movehitpersist=1

[state 200]
type = VarSet
trigger1 = !time&&P2dist X<0&&(prevstateno=52||((prevstateno=[200,1999])&&fvar(10)<=0))
fvar(9) = -fvar(9)

[state 200]
type = Turn
trigger1 = !time&&P2dist X<0&&(prevstateno=52||(prevstateno=[200,1999]))

;最大慣性速度
[state -2]
type = varset
trigger1 = !time&&(prevstateno=[100,101])
fvar(9) = ifelse(fvar(9)>const(velocity.run.fwd.x)*2,const(velocity.run.fwd.x)*2,fvar(9)*.9)
ignorehitpause=1

;援軍ヒットキャンセル
[state 100]
type = Helper
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = !(movecontact&&((prevstateno=[200,210])||(prevstateno=[400,410])))
id = 7710
stateno = 7710
pos = 0,const(size.mid.pos.y)
postype = P1
pausemovetime=20
supermovetime=20
ignorehitpause=1

;援軍ヒットキャンセル
[state 100]
type = VarSet
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = !(movecontact&&((prevstateno=[200,210])||(prevstateno=[400,410])))
fvar(5) = 0

;援軍ヒットキャンセル
[state 100]
type = VarSet
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = !(movecontact&&((prevstateno=[200,210])||(prevstateno=[400,410])))
var(15) = 0

;援軍ヒットキャンセル
[state 100]
type = MoveHitReset
trigger1 = !time

;速度取得
[state -2]
type = varset
trigger1 = !time
fvar(8) = 0
ignorehitpause=1

;先行入力処理リセット
[state 200]
type = VarSet
trigger1 = !Time
trigger2 = animtime=-1&&(var(53)!=[110,115])
var(53) = 0

[state 200]
type = ChangeAnim
trigger1 = Time=0&&!(var(34)=stateno&&((prevstateno=[130,132])||(prevstateno=150||prevstateno=152)))
value = 220

;||魂属性判別
[state 6900]
type = varset
trigger1 = animelem=1
var(36) = 0

[state 6900]
type = varset
triggerall = animelem=1
trigger1 = numhelper(6400)
trigger1 = helper(6400),stateno=6400
trigger2 = numhelper(6401)
trigger2 = helper(6401),stateno=6400
trigger3 = numhelper(6402)
trigger3 = helper(6402),stateno=6400
var(36) = 1

;魂放出
[state 6900]
type = varset
triggerall = animelem=6,>0&&var(36)=1
triggerall = command="x"&&!var(59)
trigger1 = numhelper(6400)
trigger1 = helper(6400),stateno=6400
trigger2 = numhelper(6401)
trigger2 = helper(6401),stateno=6400
trigger3 = numhelper(6402)
trigger3 = helper(6402),stateno=6400
var(36) = 2

[state 1200]
type = helper
trigger1 = var(36)>1
trigger1 = var(36):=-1
id = 6410
stateno= 6420
pos = 0,0
postype = p1
ownpal = 1
size.xscale = const(size.xscale)*1.5
size.yscale = const(size.xscale)*1.5
ignorehitpause=1
;||

;現在の速度取得
[state 900]
type = VarSet
trigger1 = var(36)&&AnimElem=6
fvar(8) = 8.5

[state 900]
type = VarSet
trigger1 = var(36)&&fvar(8)>=.5&&!(var(52)>0&&movecontact)
fvar(8) = fvar(8)*.825

[state 900]
type = VarSet
trigger1 = var(36)&&fvar(8)<.5&&!(var(52)>0&&movecontact)
fvar(8) = 0

[state -2]
type = velset
trigger1 = var(36)&&fvar(8)>0 && !fvar(9) && !(fvar(5) && !fvar(7)&&(enemynear,backedgebodydist<=5||enemynear,frontedgebodydist<=5))
x = fvar(8)

[state 190]
type = PlaySND
triggerall = !Ishelper
trigger1 = var(36)&&AnimElemNo(2)=6&&AnimElemNo(1)=5
value = 30,8
channel = 10

[state 190]
type = PlaySND
triggerall = !Ishelper
trigger1 = !var(36)&&AnimElemNo(2)=6&&AnimElemNo(1)=5
value = 7300,3
channel = 10

[state 190]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&AnimElemNo(2)=6&&AnimElemNo(1)=5
value = 10,5+(random<=500)
channel = 1

;~~~自分側のhitpause作成~~
[state 250]
type = varset
trigger1 = time=0
var(52) = 100

[state 250]
type = varadd
trigger1 = movecontact&&var(52)>=0
var(52) = -1

[state 250]
type = varset
trigger1 = movecontact=1
var(52) = 13

[state 250]
type = null;varset
trigger1 = movecontact&&((enemynear,prevstateno=[5000,5099])||(enemynear,prevstateno=[150,155]))&&P2movetype!=H&&var(52)>0
var(52) = 0

[state 250]
type = ChangeAnim
trigger1 = (movecontact||var(19)) && var(52)>var(54) && var(52)<100
value = anim
elem = ifelse(AnimElemNo(0)=var(47),AnimElemNo(0),AnimElemNo(-1))

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(47) = AnimElemNo(0)

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(54) = AnimElemTime(AnimElemNo(0))

[state 250]
type = PosFreeze
trigger1 = var(52)>0&&(movecontact||var(19))
value = 1
;~~~~~~~~~~~~~~~~~~~~~~
;~~必殺技~~~
;屍ニ堕ツル城
[state 250]
type = varset
trigger1 = (var(45)=[1,9999]) && var(53)<1000 && roundstate=2 && !var(59)
var(53) = ifelse(command="Ichigeki",3500,var(53))

;死ニ至ル病
[state 250]
type = varset
trigger1 = Power>=1000 && var(53)<1000 && roundstate=2 && !var(59)
var(53) = ifelse(!var(13)&&command="Shini",3000,var(53))

;苦ヲ喰ム紅
[state 250]
type = varset
trigger1 = Power>=1000 && var(53)<1000 && roundstate=2 && !var(59)
var(53) = ifelse(command="Kuwo",3100,var(53))

;慟哭スル魂
[state 250]
type = varset
trigger1 = var(53)<1000 && time>4 && !var(59)
var(53) = ifelse(!var(12)&&command="Doukoku",1200,var(53))

;慟哭スル魂・散華
[state 250]
type = varset
triggerall = var(53)<1000 && roundstate=2 && !var(59)
trigger1 = numhelper(6400)
trigger1 = helper(6400),stateno=6400
trigger2 = numhelper(6401)
trigger2 = helper(6401),stateno=6400
trigger3 = numhelper(6402)
trigger3 = helper(6402),stateno=6400
var(53) = ifelse(command="Sange",1400,var(53))

;慟哭スル魂・波動
[state 250]
type = varset
triggerall = var(53)<1000 && roundstate=2 && !var(59)
trigger1 = numhelper(6400)
trigger1 = helper(6400),stateno=6400
trigger2 = numhelper(6401)
trigger2 = helper(6401),stateno=6400
trigger3 = numhelper(6402)
trigger3 = helper(6402),stateno=6400
var(53) = ifelse(command = "Hadou",1300,var(53))

;厄災ノ棘
[state 250]
type = varset
trigger1 = var(53)<1000 && time>4 && !var(59)
var(53) = ifelse(command="Yakusai",1100,var(53))

;上反斬り
[state 250]
type = varset
trigger1 = var(53)<1000 && time>4 && !var(59)
var(53) = ifelse(command="Joutan",1600,var(53))

;遠雷遥
[state 250]
type = varset
trigger1 = var(53)<1000 && time>4 && !var(59)
var(53) = ifelse(command="Enrai",1000,var(53))

;~~~~
;ダッシュ
[state 250]
type = varset
trigger1 = var(53)<1000 && time>4 && !var(59)
trigger1 = movecontact&&var(36)
var(53) = ifelse((fvar(13)=17&&P2dist X>=0)||(fvar(13)=-17&&P2dist X<0),100,var(53))

;ジャンプ・ハイジャンプ
[state 250]
type = varset
trigger1 = !var(53) && time>4 && !var(59)
trigger1 = movecontact&&var(36)
var(53) = ifelse(var(0)<10 && command="longjump",50+ifelse(command="holdback",2,ifelse(command="holdfwd",1,0)),ifelse(command="holdup",40+ifelse(command="holdback",2,ifelse(command="holdfwd",1,0)),0))

;チェーンコンボ
[state 250]
type = varset
trigger1 = !var(53) && time>4 && !var(59)
trigger1 = ((command="x"&&command="holddown")||command="y"||command="z")
var(53) = ifelse(command="z",ifelse(command="holdfwd"&&command!="holddown",320,220),ifelse(command="y",ifelse(command="holdfwd"&&command!="holddown",310,210),ifelse(command="x",200,var(53))))+(command="holddown")*200
;~~~~~~~~~~~

;Attack Lv.4
[state 200]
type = Hitdef
triggerall = (var(52)<=0||var(52)=100)
trigger1 = AnimElem=6
damage = floor(ifelse(floor(68*fvar(0))<1,1+(var(2)%5=4),floor(68*fvar(0)))*1.22)
ground.slidetime = 17+(P2statetype=C)
ground.hittime = 17+(P2statetype=C)
guard.slidetime = 15
guard.hittime = 15
pausetime = 1,13+var(49)*7
ground.velocity = -15.0*(1.0+ifelse(var(2)>31,31,var(2))*.02)*const(size.xscale)
guard.velocity = ifelse(numtarget(920),-44,-15.0)*const(size.xscale)
ground.cornerpush.veloff = 0
air.velocity = ifelse(var(1)%8>=4||var(1)%2>=1,-10.0*(1.0+ifelse(var(2)>31,31,var(2))*.05)-.0013,-6.0*(1.0+ifelse(var(3)>31,31,var(3))*.04)*const(size.xscale)),ifelse(var(6)%10>0,var(6)%10*1.5,(-10.0*(51-var(3))/51-.9)*const(size.yscale))
airguard.velocity = -6*const(size.xscale),-2*const(size.yscale)
air.cornerpush.veloff = 0
yaccel = .9*const(size.yscale)
fall.recover = ifelse(var(6)%10>0||var(28)>0,0,1)
fall.recovertime = ifelse(var(49)&&!var(2),37+13,20-ifelse(floor(var(14)/55)>9,9,floor(var(14)/55))+13)
hitsound = s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,5)
guardsound = s7000,4
getpower = floor(ifelse(var(9),0,floor(65*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2))*1.250*fvar(16))),floor(ifelse(var(9),0,ceil(65*fvar(0)/fvar(2)*1.0/8)*1.250*fvar(16)))
givepower = floor(65*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2)*.8)*1.250,floor(65*fvar(0)/fvar(2)*.8*1.0/8)*1.250
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-260*const(size.xscale))
animtype = hard
ground.type = High
attr = S,NA
hitflag = MAFD
guardflag = MA

[state 200]
type = AttackDist
trigger1 = AnimElem=7
value = 0

;ヒットによる増加(スタイリッシュポイント)
[state -2]
type = varadd
trigger1 = movehit=1
fvar(15) = .00005*floor(ifelse(68*fvar(14)<1,1+(var(2)%5=1),68*fvar(14))*1.22)
ignorehitpause=1

[state -2]
type = varset
trigger1 = movehit=1
fvar(14) = fvar(1)*fvar(2)*fvar(3)*fvar(4)
ignorehitpause=1

;◇◇ヒットスパーク◇◇
[state 240]
type = VarSet
trigger1 = AnimElem=6
var(16) = 5
persistent=0

;X座標
[state 240]
type = VarSet
trigger1 = AnimElem=6,>=0&&AnimElem=7,<0
var(17) = floor(ifelse(P2dist X>174*const(size.xscale),174*const(size.xscale),floor(P2dist X)+ifelse((P2dist X=[1,30]),10,-10)+10))

;Y座標
[state 240]
type = VarSet
trigger1 = AnimElem=6,>=0&&AnimElem=7,<0
var(18) = -floor(ifelse(P2dist Y<-60*const(size.xscale),150*const(size.xscale),-floor(P2dist Y)+floor(90*const(size.yscale))))


;・・・・自分側ヒットバック・・・・
;ヒットバック量取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = var(1)%2<1&&var(1)%8<4&&target,time=0
fvar(5) = ifelse(var(3)&&target,statetype=A&&var(6)%10<1,-10.5*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.06),-15.0*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.060))*const(size.xscale)
ignorehitpause=1

;ヒットバック量取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2>=1||var(1)%8>=4)&&target,time=1
fvar(5) = (-15.0*1.25*((enemynear,backedgebodydist<=5||enemynear,frontedgebodydist<=5||var(1)%8>=4)&&fvar(10)<=0)*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.1))*const(size.xscale)
ignorehitpause=1

;ヒットバック時間取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2<1&&var(1)%8<4&&target,time=0)||((var(1)%2>=1||var(1)%8>=4)&&target,time=1)
fvar(6) = ifelse(moveguarded,15,17+(P2statetype=C))
ignorehitpause=1

;ヒットポーズ取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2<1&&var(1)%8<4&&target,time=0)||((var(1)%2>=1||var(1)%8>=4)&&target,time=1)
fvar(7) = (13-(var(1)%2>=1||var(1)%8>=4))*ifelse(moveguarded,-1,1)
ignorehitpause=1
;・・・・・・・・

[state 200]
type = ChangeState
trigger1 = AnimTime=0
value = 0
ctrl = 1

;6中
[statedef 310]
type = S
movetype=A
physics = S
ctrl = 0
velset = ifelse(fvar(9),fvar(9)*0,0),0
movehitpersist=1

[state 200]
type = VarSet
trigger1 = !time&&P2dist X<0&&(prevstateno=52||((prevstateno=[200,1999])&&fvar(10)<=0))
fvar(9) = -fvar(9)

[state 200]
type = Turn
trigger1 = !time&&P2dist X<0&&(prevstateno=52||(prevstateno=[200,1999]))

;最大慣性速度
[state -2]
type = varset
trigger1 = !time&&(prevstateno=[100,101])
fvar(9) = ifelse(fvar(9)>const(velocity.run.fwd.x)*2,const(velocity.run.fwd.x)*2,fvar(9)*.9)
ignorehitpause=1

;援軍ヒットキャンセル
[state 100]
type = Helper
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = !(movecontact&&((prevstateno=[200,220])||(prevstateno=[400,420])))
id = 7710
stateno = 7710
pos = 0,const(size.mid.pos.y)
postype = P1
pausemovetime=20
supermovetime=20
ignorehitpause=1

;援軍ヒットキャンセル
[state 100]
type = VarSet
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = !(movecontact&&((prevstateno=[200,220])||(prevstateno=[400,420])))
fvar(5) = 0

;援軍ヒットキャンセル
[state 100]
type = VarSet
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = !(movecontact&&((prevstateno=[200,220])||(prevstateno=[400,420])))
var(15) = 0

;援軍ヒットキャンセル
[state 100]
type = MoveHitReset
trigger1 = !time

;速度取得
[state -2]
type = varset
trigger1 = !time
fvar(8) = 0
ignorehitpause=1

[state 200]
type = VarSet
trigger1 = !Time
trigger2 = animtime=-1&&(var(53)!=[110,115])
var(53) = 0

[state 200]
type = ChangeAnim
trigger1 = Time=0&&!(var(34)=stateno&&((prevstateno=[130,132])||(prevstateno=150||prevstateno=152)))
value = 310

[state 200]
type = VarSet
trigger1 = Time=13&&!IsHelper
var(34) = ifelse(var(32)&&!(var(34)=stateno&&((prevstateno=[130,132])||(prevstateno=150||prevstateno=152))),stateno,0)

;ガード移行に1F要するため
[state 200]
type = NotHitBy
trigger1 = Time=13&&var(34)
value = ,AA,AP

[state 200]
type = VarSet
trigger1 = Time=13&&var(34)
var(35)=11

[state 200]
type = Helper
trigger1 = Time=13&&var(34)
id = 20000
stateno=stateno
helpertype = Player
pos = 1,0
postype = p1

;下段ガードポイント用
[state 200]
type = Helper
trigger1 = Time=13&&var(34)&&var(32)=2
id = 21000
stateno=130
helpertype = Normal
pos = 0,0
postype = p1

[state 200]
type = ChangeState
trigger1 = Time=13&&var(34)
value = ifelse(var(32)=2,131,130)

[state 200]
type = NotHitBy
trigger1 = IsHelper
value = SCA

[state 200]
type = AssertSpecial
trigger1 = IsHelper
flag = invisible

[state 200]
type = ChangeAnim
trigger1 = IsHelper
value = 20000+stateno

[state 200]
type = BindtoRoot
trigger1 = IsHelper
pos = 1,0

[state 200]
type = DestroySelf
trigger1 = IsHelper
trigger1 = !root,var(34)&&root,AnimElemTime(6)>=0

[state 900]
type = StatetypeSet
trigger1 = AnimElem=3
statetype=A
physics = N

[state 900]
type = StatetypeSet
trigger1 = AnimElem=8
statetype=S
physics = S

[state 900]
type = VelSet
trigger1 = AnimElem=3,=1
y = -3.25

[state 900]
type = VelAdd
trigger1 = AnimElem=3,>1&&AnimElem=8,<0
y = .45

[state 900]
type = PosSet
trigger1 = AnimElem=8
y = 0

[state 900]
type = VelSet
trigger1 = AnimElem=8
x = 0
y = 0

;現在の速度取得
[state 900]
type = VarSet
trigger1 = AnimElem=3
fvar(8) = 3.0

[state 900]
type = VarSet
trigger1 = AnimElem=8
fvar(8) = 0

[state -2]
type = velset
trigger1 = animelemtime(3)>=0&&animelemtime(8)<0 && !fvar(9) && !(fvar(5) && !fvar(7)&&(enemynear,backedgebodydist<=5||enemynear,frontedgebodydist<=5))
x = fvar(8)

[state 190]
type = PlaySND
trigger1 = AnimElemNo(2)=10&&AnimElemNo(1)=9
value = 7300,3
channel = 10

[state 190]
type = PlaySND
triggerall = !Ishelper
trigger1 = (!var(10)||var(10)>=1000)&&AnimElemNo(2)=10&&AnimElemNo(1)=9
value = 10,6
channel = 1

;~~~自分側のhitpause作成~~
[state 250]
type = varset
trigger1 = time=0
var(52) = 100

[state 250]
type = varadd
trigger1 = movecontact&&var(52)>=0
var(52) = -1

[state 250]
type = varset
trigger1 = movecontact=1
var(52) = 13

[state 250]
type = null;varset
trigger1 = movecontact&&((enemynear,prevstateno=[5000,5099])||(enemynear,prevstateno=[150,155]))&&P2movetype!=H&&var(52)>0
var(52) = 0

[state 250]
type = ChangeAnim
trigger1 = (movecontact||var(19)) && var(52)>var(54) && var(52)<100
value = anim
elem = ifelse(AnimElemNo(0)=var(47),AnimElemNo(0),AnimElemNo(-1))

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(47) = AnimElemNo(0)

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(54) = AnimElemTime(AnimElemNo(0))

[state 250]
type = PosFreeze
trigger1 = var(52)>0&&(movecontact||var(19))
value = 1
;~~~~~~~~~~~~~~~~~~~~~~
;Attack Lv.4
[state 200]
type = Hitdef
triggerall = (var(52)<=0||var(52)=100)
trigger1 = AnimElem=10
damage = floor(ifelse(floor(70*fvar(0))<1,1+(var(2)%5=4),floor(70*fvar(0)))*1.22)
ground.slidetime = 17+(P2statetype=C)
ground.hittime = 17+(P2statetype=C)
guard.slidetime = 15
guard.hittime = 15
pausetime = 1,13+var(49)*7
ground.velocity = -4*const(size.xscale),(-8-.9)*const(size.yscale)
guard.velocity = ifelse(numtarget(920),-44,-13.5)*const(size.xscale)
ground.cornerpush.veloff = 0
air.velocity = ifelse(var(1)%8>=4||var(1)%2>=1,-10.0*(1.0+ifelse(var(2)>31,31,var(2))*.05)-.0013,-4.0*(1.0+ifelse(var(3)>31,31,var(3))*.04)*const(size.xscale)),ifelse(var(6)%10>0,var(6)%10*1.5,-8.0*((51-var(3))/51)*const(size.yscale))
airguard.velocity = -6*const(size.xscale),-2*const(size.yscale)
air.cornerpush.veloff = 0
yaccel = .9*const(size.yscale)
fall.recover = ifelse(var(6)%10>0||var(28)>0,0,0)
;fall.recovertime = ifelse(var(49)&&!var(2),37+13,20-ifelse(floor(var(14)/55)>9,9,floor(var(14)/55))+13)
hitsound = s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,5)
guardsound = s7000,4
getpower = floor(ifelse(var(9),0,floor(65*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2))*1.250*fvar(16))),floor(ifelse(var(9),0,ceil(65*fvar(0)/fvar(2)*1.0/8)*1.250*fvar(16)))
givepower = floor(65*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2)*.8)*1.250,floor(65*fvar(0)/fvar(2)*.8*1.0/8)*1.250
fall = 1
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-240*const(size.xscale))
animtype = hard
ground.type = High
attr = S,NA
hitflag = MAFD
guardflag = H

[state 200]
type = AttackDist
trigger1 = AnimElem=11
value = 0

;ヒットによる増加(スタイリッシュポイント)
[state -2]
type = varadd
trigger1 = movehit=1
fvar(15) = .00005*floor(ifelse(70*fvar(14)<1,1+(var(2)%5=1),70*fvar(14))*1.22)
ignorehitpause=1

[state -2]
type = varset
trigger1 = movehit=1
fvar(14) = fvar(1)*fvar(2)*fvar(3)*fvar(4)
ignorehitpause=1

;◇◇ヒットスパーク◇◇
[state 240]
type = VarSet
trigger1 = AnimElem=10
var(16) = 5
persistent=0

;X座標
[state 240]
type = VarSet
trigger1 = AnimElem=10,>=0&&AnimElem=11,<0
var(17) = floor(ifelse(P2dist X>258*const(size.xscale),258*const(size.xscale),floor(P2dist X)+ifelse((P2dist X=[1,30]),10,-10)+10))

;Y座標
[state 240]
type = VarSet
trigger1 = AnimElem=10&&AnimElem=11,<0
var(18) = floor(-80*const(size.yscale))

;・・・・自分側ヒットバック・・・・
;ヒットバック量取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = var(1)%2<1&&var(1)%8<4&&target,time=0
fvar(5) = ifelse(((var(3)&&target,statetype=A)||movehit)&&var(6)%10<1,-9.0*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.06),-13.5*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.1))*const(size.xscale)
ignorehitpause=1

;ヒットバック量取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2>=1||var(1)%8>=4)&&target,time=1
fvar(5) = (-13.5*1.25*((enemynear,backedgebodydist<=5||enemynear,frontedgebodydist<=5||var(1)%8>=4)&&fvar(10)<=0)*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.1))*const(size.xscale)
ignorehitpause=1

;ヒットバック時間取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2<1&&var(1)%8<4&&target,time=0)||((var(1)%2>=1||var(1)%8>=4)&&target,time=1)
fvar(6) = ifelse(moveguarded,15,17+(P2statetype=C))
ignorehitpause=1

;ヒットポーズ取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2<1&&var(1)%8<4&&target,time=0)||((var(1)%2>=1||var(1)%8>=4)&&target,time=1)
fvar(7) = (13-(var(1)%2>=1||var(1)%8>=4))*ifelse(moveguarded,-1,1)
ignorehitpause=1
;・・・・・・・・

[state 200]
type = ChangeState
trigger1 = AnimTime=0
value = 0
ctrl = 1

;6強
[statedef 320]
type = C
movetype=A
physics = C
ctrl = 0
velset = ifelse(fvar(9),fvar(9)*0,0),0
movehitpersist=1

[state 200]
type = VarSet
trigger1 = !time&&P2dist X<0&&(prevstateno=52||((prevstateno=[200,1999])&&fvar(10)<=0))
fvar(9) = -fvar(9)

[state 200]
type = Turn
trigger1 = !time&&P2dist X<0&&(prevstateno=52||(prevstateno=[200,1999]))

;最大慣性速度
[state -2]
type = varset
trigger1 = !time&&(prevstateno=[100,101])
fvar(9) = ifelse(fvar(9)>const(velocity.run.fwd.x)*2,const(velocity.run.fwd.x)*2,fvar(9)*.9)
ignorehitpause=1

;援軍ヒットキャンセル
[state 100]
type = Helper
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = !(movecontact&&((prevstateno=[200,210])||prevstateno=400))
id = 7710
stateno = 7710
pos = 0,const(size.mid.pos.y)
postype = P1
pausemovetime=20
supermovetime=20
ignorehitpause=1

;援軍ヒットキャンセル
[state 100]
type = VarSet
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = !(movecontact&&((prevstateno=[200,210])||prevstateno=400))
fvar(5) = 0

;援軍ヒットキャンセル
[state 100]
type = VarSet
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = !(movecontact&&((prevstateno=[200,210])||prevstateno=400))
var(15) = 0

;援軍ヒットキャンセル
[state 100]
type = MoveHitReset
trigger1 = !time

;速度取得
[state -2]
type = varset
trigger1 = !time
fvar(8) = 0
ignorehitpause=1

[state 200]
type = VarSet
trigger1 = !Time
trigger2 = animtime=-1&&(var(53)!=[110,115])
var(53) = 0

[state 200]
type = ChangeAnim
trigger1 = Time=0&&!(var(34)=stateno&&((prevstateno=[130,132])||(prevstateno=150||prevstateno=152)))
value = 320

[state 190]
type = PlaySND
triggerall = !Ishelper
trigger1 = AnimElemNo(2)=7&&AnimElemNo(1)=6
value = 7300,3
channel = 10

[state 190]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&AnimElemNo(2)=7&&AnimElemNo(1)=6
value = 10,5+(random<=500)
channel = 1

;~~~自分側のhitpause作成~~
[state 250]
type = varset
trigger1 = time=0
var(52) = 100

[state 250]
type = varadd
trigger1 = movecontact&&var(52)>=0
var(52) = -1

[state 250]
type = varset
trigger1 = movecontact=1
var(52) = 12

[state 250]
type = null;varset
trigger1 = movecontact&&((enemynear,prevstateno=[5000,5099])||(enemynear,prevstateno=[150,155]))&&P2movetype!=H&&var(52)>0
var(52) = 0

[state 250]
type = ChangeAnim
trigger1 = (movecontact||var(19)) && var(52)>var(54) && var(52)<100
value = anim
elem = ifelse(AnimElemNo(0)=var(47),AnimElemNo(0),AnimElemNo(-1))

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(47) = AnimElemNo(0)

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(54) = AnimElemTime(AnimElemNo(0))

[state 250]
type = PosFreeze
trigger1 = var(52)>0&&(movecontact||var(19))
value = 1
;~~~~~~~~~~~~~~~~~~~~~~
;~~必殺技~~~
;屍ニ堕ツル城
[state 250]
type = varset
trigger1 = (var(45)=[1,9999]) && var(53)<1000 && roundstate=2 && !var(59)
var(53) = ifelse(command="Ichigeki",3500,var(53))

;死ニ至ル病
[state 250]
type = varset
trigger1 = Power>=1000 && var(53)<1000 && roundstate=2 && !var(59)
var(53) = ifelse(!var(13)&&command="Shini",3000,var(53))

;苦ヲ喰ム紅
[state 250]
type = varset
trigger1 = Power>=1000 && var(53)<1000 && roundstate=2 && !var(59)
var(53) = ifelse(command="Kuwo",3100,var(53))

;慟哭スル魂
[state 250]
type = varset
trigger1 = var(53)<1000 && time>4 && !var(59)
var(53) = ifelse(!var(12)&&command="Doukoku",1200,var(53))

;慟哭スル魂・散華
[state 250]
type = varset
triggerall = var(53)<1000 && roundstate=2 && !var(59)
trigger1 = numhelper(6400)
trigger1 = helper(6400),stateno=6400
trigger2 = numhelper(6401)
trigger2 = helper(6401),stateno=6400
trigger3 = numhelper(6402)
trigger3 = helper(6402),stateno=6400
var(53) = ifelse(command="Sange",1400,var(53))

;慟哭スル魂・波動
[state 250]
type = varset
triggerall = var(53)<1000 && roundstate=2 && !var(59)
trigger1 = numhelper(6400)
trigger1 = helper(6400),stateno=6400
trigger2 = numhelper(6401)
trigger2 = helper(6401),stateno=6400
trigger3 = numhelper(6402)
trigger3 = helper(6402),stateno=6400
var(53) = ifelse(command = "Hadou",1300,var(53))

;厄災ノ棘
[state 250]
type = varset
trigger1 = var(53)<1000 && time>4 && !var(59)
var(53) = ifelse(command="Yakusai",1100,var(53))

;上反斬り
[state 250]
type = varset
trigger1 = var(53)<1000 && time>4 && !var(59)
var(53) = ifelse(command="Joutan",1600,var(53))

;遠雷遥
[state 250]
type = varset
trigger1 = var(53)<1000 && time>4 && !var(59)
var(53) = ifelse(command="Enrai",1000,var(53))

;~~~~
;ジャンプ・ハイジャンプ
[state 250]
type = varset
trigger1 = !var(53) && time>4 && !var(59)
trigger1 = movecontact
var(53) = ifelse(var(0)<10 && command="longjump",50+ifelse(command="holdback",2,ifelse(command="holdfwd",1,0)),ifelse(command="holdup",40+ifelse(command="holdback",2,ifelse(command="holdfwd",1,0)),0))

;~~~~~~~~~~~

;Attack Lv.3
[state 200]
type = Hitdef
triggerall = (var(52)<=0||var(52)=100)
triggerall = !movecontact&&!movereversed
trigger1 = AnimElem=7,>=0&&AnimElem=9,<0
damage = floor(ifelse(floor(55*fvar(0))<1,1+(var(2)%5=4),floor(55*fvar(0)))*1.22)
ground.slidetime = 14+(P2statetype=C)
ground.hittime = 14+(P2statetype=C)
guard.slidetime = 12
guard.hittime = 12
pausetime = 1,12+var(49)*6
ground.velocity = ifelse(var(49),-11.0-.0012,-6.0*const(size.xscale)),(-13.0-.9)*const(size.yscale)
guard.velocity = ifelse(numtarget(920),-44,-12.0)*const(size.xscale)
ground.cornerpush.veloff = 0
air.velocity = ifelse(var(1)%8>=4||var(1)%2>=1||var(49),-10.0*(1.0+ifelse(var(2)>31,31,var(2))*.05)-.0012,-6.0*(1.0+ifelse(var(3)>31,31,var(3))*.04)*const(size.xscale)),ifelse(var(6)%10>0,var(6)%10*1.5,(-13.0*(51-var(3))/51-.9)*const(size.yscale))
airguard.velocity = -6*const(size.xscale),-2*const(size.yscale)
air.cornerpush.veloff = 0
yaccel = .9*const(size.yscale)
fall.recover = ifelse(var(6)%10>0||var(28)>0,0,1)
fall.recovertime = ifelse(var(49)&&!var(2),40+12,27-ifelse(floor(var(14)/75)>7,7,floor(var(14)/75))+12)
hitsound = s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,2)
guardsound = s7000,2
getpower = floor(ifelse(var(9),0,floor(55*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2))*1.250*fvar(16))),floor(ifelse(var(9),0,ceil(55*fvar(0)/fvar(2)*1.0/8)*1.250*fvar(16)))
givepower = floor(55*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2)*.8)*1.250,floor(55*fvar(0)/fvar(2)*.8*1.0/8)*1.250
fall = 1
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-50*const(size.xscale))
animtype = Light
ground.type = Low
attr = S,NA
hitflag = MAFD
guardflag = MA
persistent=0

;==壁ダウンに
[state 920]
type = varset
trigger1 = movehit=1 && numtarget&&var(6)%10<1
trigger1 = target,time=0 && var(49)
var(1) = 4
ignorehitpause=1
persistent=0

[state 900]
type = TargetState
trigger1 = movehit=1 && numtarget&&var(6)%10<1
trigger1 = target,time=0 && var(49)
value = 936
ignorehitpause=1
persistent=0

[state 200]
type = AttackDist
trigger1 = AnimElem=9
value = 0

;ヒットによる増加(スタイリッシュポイント)
[state -2]
type = varadd
trigger1 = movehit=1
fvar(15) = .00005*floor(ifelse(54*fvar(14)<1,1+(var(2)%5=1),54*fvar(14))*1.22)
ignorehitpause=1

[state -2]
type = varset
trigger1 = movehit=1
fvar(14) = fvar(1)*fvar(2)*fvar(3)*fvar(4)
ignorehitpause=1

;◇◇ヒットスパーク◇◇
[state 240]
type = VarSet
trigger1 = AnimElem=7
var(16) = 1
persistent=0

;X座標
[state 240]
type = VarSet
trigger1 = AnimElem=7,>=0&&AnimElem=8,<0
var(17) = floor(ifelse(P2dist X>212*const(size.xscale),212*const(size.xscale),floor(P2dist X)+ifelse((P2dist X=[1,30]),10,-10)+10))

;X座標
[state 240]
type = VarSet
trigger1 = AnimElem=8,>=0&&AnimElem=9,<0
var(17) = floor(ifelse(P2dist X>272*const(size.xscale),272*const(size.xscale),floor(P2dist X)+ifelse((P2dist X=[1,30]),10,-10)+10))

;Y座標
[state 240]
type = VarSet
trigger1 = AnimElem=7,>=0&&AnimElem=8,<0
var(18) = floor(-140*const(size.yscale))

;Y座標
[state 240]
type = VarSet
trigger1 = AnimElem=8,>=0&&AnimElem=9,<0
var(18) = floor(-120*const(size.yscale))


;・・・・自分側ヒットバック・・・・
;ヒットバック量取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = var(1)%2<1&&var(1)%8<4&&target,time=0
fvar(5) = ifelse(((var(3)&&target,statetype=A)||movehit)&&var(6)%10<1,-12.0*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.06),-12.0*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.060))*const(size.xscale)
ignorehitpause=1

;ヒットバック量取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2>=1||var(1)%8>=4)&&target,time=1
fvar(5) = (-12.0*1.25*((enemynear,backedgebodydist<=5||enemynear,frontedgebodydist<=5||var(1)%8>=4)&&fvar(10)<=0)*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.1))*const(size.xscale)
ignorehitpause=1

;ヒットバック時間取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2<1&&var(1)%8<4&&target,time=0)||((var(1)%2>=1||var(1)%8>=4)&&target,time=1)
fvar(6) = ifelse(moveguarded,12,14+(P2statetype=C))
ignorehitpause=1

;ヒットポーズ取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2<1&&var(1)%8<4&&target,time=0)||((var(1)%2>=1||var(1)%8>=4)&&target,time=1)
fvar(7) = (12-(var(1)%2>=1||var(1)%8>=4))*ifelse(moveguarded,-1,1)
ignorehitpause=1
;・・・・・・・・

[state 200]
type = ChangeState
trigger1 = AnimTime=0
value = 0
ctrl = 1

;しゃがみ弱
[statedef 400]
type = C
movetype=A
physics = C
ctrl = 0
velset = ifelse(fvar(9),fvar(9)*0,0),0
movehitpersist=1

[state 200]
type = VarSet
trigger1 = !time&&P2dist X<0&&(prevstateno=52||((prevstateno=[200,1999])&&fvar(10)<=0))
fvar(9) = -fvar(9)

[state 200]
type = Turn
trigger1 = !time&&P2dist X<0&&(prevstateno=52||(prevstateno=[200,1999]))

;最大慣性速度
[state -2]
type = varset
trigger1 = !time&&(prevstateno=[100,101])
fvar(9) = ifelse(fvar(9)>const(velocity.run.fwd.x)*2,const(velocity.run.fwd.x)*2,fvar(9)*.9)
ignorehitpause=1

;援軍ヒットキャンセル
[state 100]
type = Helper
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = !(movecontact&&prevstateno=200)
id = 7710
stateno = 7710
pos = 0,const(size.mid.pos.y)
postype = P1
pausemovetime=20
supermovetime=20
ignorehitpause=1

;援軍ヒットキャンセル
[state 100]
type = VarSet
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = !(movecontact&&prevstateno=200)
fvar(5) = 0

;援軍ヒットキャンセル
[state 100]
type = VarSet
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = !(movecontact&&prevstateno=200)
var(15) = 0

;援軍ヒットキャンセル
[state 100]
type = MoveHitReset
trigger1 = !time

;速度取得
[state -2]
type = varset
trigger1 = !time
fvar(8) = 0
ignorehitpause=1

[state 200]
type = VarSet
trigger1 = !Time
trigger2 = animtime=-1&&(var(53)!=[110,115])
var(53) = 0

[state 200]
type = ChangeAnim
trigger1 = Time=0&&!(var(34)=stateno&&((prevstateno=[130,132])||(prevstateno=150||prevstateno=152)))
value = 400

[state 190]
type = PlaySND
trigger1 = AnimElemNo(2)=3&&AnimElemNo(1)=2
value = 7300,0
channel = 10

[state 190]
type = PlaySND
triggerall = !Ishelper
trigger1 = (!var(10)||var(10)>=1000)&&random%2=0&&AnimElemNo(2)=3&&AnimElemNo(1)=2
value = 10,1+(random<500)
channel = 1

;~~~自分側のhitpause作成~~
[state 250]
type = varset
trigger1 = time=0
var(52) = 100

[state 250]
type = varadd
trigger1 = movecontact&&var(52)>=0
var(52) = -1

[state 250]
type = varset
trigger1 = movecontact=1
var(52) = 10

[state 250]
type = null;varset
trigger1 = movecontact&&((enemynear,prevstateno=[5000,5099])||(enemynear,prevstateno=[150,155]))&&P2movetype!=H&&var(52)>0
var(52) = 0

[state 250]
type = ChangeAnim
trigger1 = (movecontact||var(19)) && var(52)>var(54) && var(52)<100
value = anim
elem = ifelse(AnimElemNo(0)=var(47),AnimElemNo(0),AnimElemNo(-1))

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(47) = AnimElemNo(0)

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(54) = AnimElemTime(AnimElemNo(0))

[state 250]
type = PosFreeze
trigger1 = var(52)>0&&(movecontact||var(19))
value = 1
;~~~~~~~~~~~~~~~~~~~~~~
;~~必殺技~~~
;屍ニ堕ツル城
[state 250]
type = varset
trigger1 = (var(45)=[1,9999]) && var(53)<1000 && roundstate=2 && !var(59)
var(53) = ifelse(command="Ichigeki",3500,var(53))

;死ニ至ル病
[state 250]
type = varset
trigger1 = Power>=1000 && var(53)<1000 && roundstate=2 && !var(59)
var(53) = ifelse(!var(13)&&command="Shini",3000,var(53))

;苦ヲ喰ム紅
[state 250]
type = varset
trigger1 = Power>=1000 && var(53)<1000 && roundstate=2 && !var(59)
var(53) = ifelse(command="Kuwo",3100,var(53))

;慟哭スル魂
[state 250]
type = varset
trigger1 = var(53)<1000 && time>4 && !var(59)
var(53) = ifelse(!var(12)&&command="Doukoku",1200,var(53))

;慟哭スル魂・散華
[state 250]
type = varset
triggerall = var(53)<1000 && roundstate=2 && !var(59)
trigger1 = numhelper(6400)
trigger1 = helper(6400),stateno=6400
trigger2 = numhelper(6401)
trigger2 = helper(6401),stateno=6400
trigger3 = numhelper(6402)
trigger3 = helper(6402),stateno=6400
var(53) = ifelse(command="Sange",1400,var(53))

;慟哭スル魂・波動
[state 250]
type = varset
triggerall = var(53)<1000 && roundstate=2 && !var(59)
trigger1 = numhelper(6400)
trigger1 = helper(6400),stateno=6400
trigger2 = numhelper(6401)
trigger2 = helper(6401),stateno=6400
trigger3 = numhelper(6402)
trigger3 = helper(6402),stateno=6400
var(53) = ifelse(command = "Hadou",1300,var(53))

;厄災ノ棘
[state 250]
type = varset
trigger1 = var(53)<1000 && time>4 && !var(59)
var(53) = ifelse(command="Yakusai",1100,var(53))

;上反斬り
[state 250]
type = varset
trigger1 = var(53)<1000 && time>4 && !var(59)
var(53) = ifelse(command="Joutan",1600,var(53))

;遠雷遥
[state 250]
type = varset
trigger1 = var(53)<1000 && time>4 && !var(59)
var(53) = ifelse(command="Enrai",1000,var(53))

;~~~~
;チェーンコンボ
[state 250]
type = varset
trigger1 = !var(53) && time>4 && !var(59)
trigger1 = ((command="x"&&command="holddown")||command="y"||command="z")
var(53) = ifelse(command="z",ifelse(command="holdfwd"&&command!="holddown",320,220),ifelse(command="y",ifelse(command="holdfwd"&&command!="holddown",310,210),ifelse(command="x",200,var(53))))+(command="holddown")*200
;~~~~~~~~~~~

;Attack Lv.1
[state 200]
type = Hitdef
triggerall = (var(52)<=0||var(52)=100)
trigger1 = AnimElem=3
damage = floor(ifelse(20*fvar(0)<1,1+(var(2)%5=4),20*fvar(0))*1.22)
ground.slidetime = 10
ground.hittime = 10
guard.slidetime = 8
guard.hittime = 8
pausetime = 1,10+var(49)*5
ground.velocity = -9.0*(1.0+ifelse(var(2)>31,31,var(2))*.02)*const(size.xscale)
guard.velocity = ifelse(numtarget(920),-44,-9.0)*const(size.xscale)
ground.cornerpush.veloff = 0
air.velocity = ifelse(var(1)%8>=4||var(1)%2>=1,-10.0*(1.0+ifelse(var(2)>31,31,var(2))*.05)-.0010,-6.0*(1.0+ifelse(var(3)>31,31,var(3))*.04)*const(size.xscale)),ifelse(var(6)%10>0,var(6)%10*1.5,(-9.0*(51-var(3))/51-.9)*const(size.yscale))
airguard.velocity = -6*const(size.xscale),-2*const(size.yscale)
air.cornerpush.veloff = 0
yaccel = .9*const(size.yscale)
fall.recover = ifelse(var(6)%10>0||var(28)>0,0,1)
fall.recovertime = ifelse(var(49)&&!var(2),20+10,10-ifelse(floor(var(14)/100)>5,5,floor(var(14)/100))+10)
hitsound = s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,1)
guardsound = s7000,1
getpower = floor(ifelse(var(9),0,floor(28*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2))*1.250*fvar(16))),floor(ifelse(var(9),0,ceil(28*fvar(0)/fvar(2)*1.0/8)*1.250*fvar(16)))
givepower = floor(28*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2)*.8)*1.250,floor(28*fvar(0)/fvar(2)*.8*1.0/8)*1.250
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-30*const(size.xscale))
animtype = Light
ground.type = Low
attr = C,NA
hitflag = MAFD
guardflag = L
persistent=0

[state 200]
type = AttackDist
trigger1 = AnimElem=4
value = 0

;ヒットによる増加(スタイリッシュポイント)
[state -2]
type = varadd
trigger1 = movehit=1
fvar(15) = .00005*floor(ifelse(20*fvar(14)<1,1+(var(2)%5=1),20*fvar(14))*1.22)
ignorehitpause=1

[state -2]
type = varset
trigger1 = movehit=1
fvar(14) = fvar(1)*fvar(2)*fvar(3)*fvar(4)
ignorehitpause=1

;◇◇ヒットスパーク◇◇
[state 240]
type = VarSet
trigger1 = AnimElem=3
var(16) = 0;
persistent=0

;X座標
[state 240]
type = VarSet
trigger1 = AnimElem=3,>=0&&AnimElem=4,<0
var(17) = floor(ifelse(P2dist X>126*const(size.xscale),126*const(size.xscale),floor(P2dist X)+ifelse((P2dist X=[1,30]),10,-10)+10))

;Y座標
[state 240]
type = VarSet
trigger1 = AnimElem=3,>=0&&AnimElem=4,<0
var(18) = floor(-65*const(size.yscale))

;・・・・自分側ヒットバック・・・・
;ヒットバック量取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = var(1)%2<1&&var(1)%8<4&&target,time=0
fvar(5) = ifelse(var(3)&&target,statetype=A&&var(6)%10<1,-12.0*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.06),-9.0*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.060))*const(size.xscale)
ignorehitpause=1

;ヒットバック量取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2>=1||var(1)%8>=4)&&target,time=1
fvar(5) = (-9.0*1.25*((enemynear,backedgebodydist<=5||enemynear,frontedgebodydist<=5||var(1)%8>=4)&&fvar(10)<=0)*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.1))*const(size.xscale)
ignorehitpause=1

;ヒットバック時間取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2<1&&var(1)%8<4&&target,time=0)||((var(1)%2>=1||var(1)%8>=4)&&target,time=1)
fvar(6) = ifelse(moveguarded,8,10)
ignorehitpause=1

;ヒットポーズ取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2<1&&var(1)%8<4&&target,time=0)||((var(1)%2>=1||var(1)%8>=4)&&target,time=1)
fvar(7) = (10-(var(1)%2>=1||var(1)%8>=4))*ifelse(moveguarded,-1,1)
ignorehitpause=1
;・・・・・・・・

[state 200]
type = ChangeState
trigger1 = AnimTime=0
value = 11
ctrl = 1


;しゃがみ中
[statedef 410]
type = C
movetype=A
physics = C
ctrl = 0
velset = ifelse(fvar(9),fvar(9)*0,0),0
movehitpersist=1

[state 200]
type = VarSet
trigger1 = !time&&P2dist X<0&&(prevstateno=52||((prevstateno=[200,1999])&&fvar(10)<=0))
fvar(9) = -fvar(9)

[state 200]
type = Turn
trigger1 = !time&&P2dist X<0&&(prevstateno=52||(prevstateno=[200,1999]))

;最大慣性速度
[state -2]
type = varset
trigger1 = !time&&(prevstateno=[100,101])
fvar(9) = ifelse(fvar(9)>const(velocity.run.fwd.x)*2,const(velocity.run.fwd.x)*2,fvar(9)*.9)
ignorehitpause=1

;援軍ヒットキャンセル
[state 100]
type = Helper
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = !(movecontact&&(prevstateno=200||prevstateno=400))
id = 7710
stateno = 7710
pos = 0,const(size.mid.pos.y)
postype = P1
pausemovetime=20
supermovetime=20
ignorehitpause=1

;援軍ヒットキャンセル
[state 100]
type = VarSet
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = !(movecontact&&(prevstateno=200||prevstateno=400))
fvar(5) = 0

;援軍ヒットキャンセル
[state 100]
type = VarSet
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = !(movecontact&&(prevstateno=200||prevstateno=400))
var(15) = 0

;援軍ヒットキャンセル
[state 100]
type = MoveHitReset
trigger1 = !time

;速度取得
[state -2]
type = varset
trigger1 = !time
fvar(8) = 0
ignorehitpause=1

[state 200]
type = VarSet
trigger1 = !Time
trigger2 = animtime=-1&&(var(53)!=[110,115])
var(53) = 0

[state 200]
type = ChangeAnim
trigger1 = Time=0&&!(var(34)=stateno&&((prevstateno=[130,132])||(prevstateno=150||prevstateno=152)))
value = 410

;||魂属性判別
[state 6900]
type = varset
trigger1 = animelem=1
var(36) = 0

[state 6900]
type = varset
triggerall = animelem=1
trigger1 = numhelper(6400)
trigger1 = helper(6400),stateno=6400
trigger2 = numhelper(6401)
trigger2 = helper(6401),stateno=6400
trigger3 = numhelper(6402)
trigger3 = helper(6402),stateno=6400
var(36) = 1

;魂放出
[state 6900]
type = varset
triggerall = animelem=6,>0&&var(36)=1
triggerall = command="x"&&!var(59)
trigger1 = numhelper(6400)
trigger1 = helper(6400),stateno=6400
trigger2 = numhelper(6401)
trigger2 = helper(6401),stateno=6400
trigger3 = numhelper(6402)
trigger3 = helper(6402),stateno=6400
var(36) = 2

[state 1200]
type = helper
trigger1 = var(36)>1
trigger1 = var(36):=-1
id = 6410
stateno= 6420
pos = 0,0
postype = p1
ownpal = 1
size.xscale = const(size.xscale)*1.5
size.yscale = const(size.xscale)*1.5
ignorehitpause=1
;||

;現在の速度取得
[state 900]
type = VarSet
trigger1 = var(36)&&AnimElem=6,=1
fvar(8) = 8.5

[state 900]
type = VarSet
trigger1 = var(36)&&fvar(8)>=.5&&!(var(52)>0&&movecontact)
fvar(8) = fvar(8)*.85

[state 900]
type = VarSet
trigger1 = var(36)&&fvar(8)<.5&&!(var(52)>0&&movecontact)
fvar(8) = 0

[state -2]
type = velset
trigger1 = var(36)&&fvar(8)>0 && !fvar(9) && !(fvar(5) && !fvar(7)&&(enemynear,backedgebodydist<=5||enemynear,frontedgebodydist<=5))
x = fvar(8)

[state 190]
type = PlaySND
triggerall = !Ishelper
trigger1 = var(36)&&AnimElemNo(2)=7&&AnimElemNo(1)=6
value = 30,8
channel = 10

[state 190]
type = PlaySND
triggerall = !Ishelper
trigger1 = !var(36)&&AnimElemNo(2)=7&&AnimElemNo(1)=6
value = 7300,3
channel = 10

[state 190]
type = PlaySND
triggerall = !Ishelper
trigger1 = (!var(10)||var(10)>=1000)&&random%3!=0&&AnimElemNo(2)=7&&AnimElemNo(1)=6
value = 10,3+(random<500)
channel = 1

;~~~自分側のhitpause作成~~
[state 250]
type = varset
trigger1 = time=0
var(52) = 100

[state 250]
type = varadd
trigger1 = movecontact&&var(52)>=0
var(52) = -1

[state 250]
type = varset
trigger1 = movecontact=1
var(52) = 12

[state 250]
type = null;varset
trigger1 = movecontact&&((enemynear,prevstateno=[5000,5099])||(enemynear,prevstateno=[150,155]))&&P2movetype!=H&&var(52)>0
var(52) = 0

[state 250]
type = ChangeAnim
trigger1 = (movecontact||var(19)) && var(52)>var(54) && var(52)<100
value = anim
elem = ifelse(AnimElemNo(0)=var(47),AnimElemNo(0),AnimElemNo(-1))

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(47) = AnimElemNo(0)

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(54) = AnimElemTime(AnimElemNo(0))

[state 250]
type = PosFreeze
trigger1 = var(52)>0&&(movecontact||var(19))
value = 1
;~~~~~~~~~~~~~~~~~~~~~~
;~~必殺技~~~
;屍ニ堕ツル城
[state 250]
type = varset
trigger1 = (var(45)=[1,9999]) && var(53)<1000 && roundstate=2 && !var(59)
var(53) = ifelse(command="Ichigeki",3500,var(53))

;死ニ至ル病
[state 250]
type = varset
trigger1 = Power>=1000 && var(53)<1000 && roundstate=2 && !var(59)
var(53) = ifelse(!var(13)&&command="Shini",3000,var(53))

;苦ヲ喰ム紅
[state 250]
type = varset
trigger1 = Power>=1000 && var(53)<1000 && roundstate=2 && !var(59)
var(53) = ifelse(command="Kuwo",3100,var(53))

;慟哭スル魂
[state 250]
type = varset
trigger1 = var(53)<1000 && time>4 && !var(59)
var(53) = ifelse(!var(12)&&command="Doukoku",1200,var(53))

;慟哭スル魂・散華
[state 250]
type = varset
triggerall = var(53)<1000 && roundstate=2 && !var(59)
trigger1 = numhelper(6400)
trigger1 = helper(6400),stateno=6400
trigger2 = numhelper(6401)
trigger2 = helper(6401),stateno=6400
trigger3 = numhelper(6402)
trigger3 = helper(6402),stateno=6400
var(53) = ifelse(command="Sange",1400,var(53))

;慟哭スル魂・波動
[state 250]
type = varset
triggerall = var(53)<1000 && roundstate=2 && !var(59)
trigger1 = numhelper(6400)
trigger1 = helper(6400),stateno=6400
trigger2 = numhelper(6401)
trigger2 = helper(6401),stateno=6400
trigger3 = numhelper(6402)
trigger3 = helper(6402),stateno=6400
var(53) = ifelse(command = "Hadou",1300,var(53))

;厄災ノ棘
[state 250]
type = varset
trigger1 = var(53)<1000 && time>4 && !var(59)
var(53) = ifelse(command="Yakusai",1100,var(53))

;上反斬り
[state 250]
type = varset
trigger1 = var(53)<1000 && time>4 && !var(59)
var(53) = ifelse(command="Joutan",1600,var(53))

;遠雷遥
[state 250]
type = varset
trigger1 = var(53)<1000 && time>4 && !var(59)
var(53) = ifelse(command="Enrai",1000,var(53))

;~~~~
;ダッシュ
[state 250]
type = varset
trigger1 = var(53)<1000 && time>4 && !var(59)
trigger1 = movecontact&&var(36)
var(53) = ifelse((fvar(13)=17&&P2dist X>=0)||(fvar(13)=-17&&P2dist X<0),100,var(53))

;ジャンプ・ハイジャンプ
[state 250]
type = varset
trigger1 = !var(53) && time>4 && !var(59)
trigger1 = movecontact&&var(36)
var(53) = ifelse(var(0)<10 && command="longjump",50+ifelse(command="holdback",2,ifelse(command="holdfwd",1,0)),ifelse(command="holdup",40+ifelse(command="holdback",2,ifelse(command="holdfwd",1,0)),0))

;チェーンコンボ
[state 250]
type = varset
trigger1 = !var(53) && time>4 && !var(59)
trigger1 = ((command="x"&&command="holddown")||command="y"||command="z")
var(53) = ifelse(command="z",ifelse(command="holdfwd"&&command!="holddown",320,220),ifelse(command="y",ifelse(command="holdfwd"&&command!="holddown",310,210),ifelse(command="x",200,var(53))))+(command="holddown")*200
;~~~~~~~~~~~

;Attack Lv.3
[state 200]
type = Hitdef
triggerall = (var(52)<=0||var(52)=100)
trigger1 = AnimElem=7
damage = floor(ifelse(floor(40*fvar(0))<1,1+(var(2)%5=4),floor(40*fvar(0)))*1.22)
ground.slidetime = 14+(P2statetype=C)
ground.hittime = 14+(P2statetype=C)
guard.slidetime = 12
guard.hittime = 12
pausetime = 1,12+var(49)*6
ground.velocity = -12.0*(1.0+ifelse(var(2)>31,31,var(2))*.02)*const(size.xscale)
guard.velocity = ifelse(numtarget(920),-44,-12.0)*const(size.xscale)
ground.cornerpush.veloff = 0
air.velocity = ifelse(var(1)%8>=4||var(1)%2>=1,-10.0*(1.0+ifelse(var(2)>31,31,var(2))*.05)-.0012,-8.0*(1.0+ifelse(var(3)>31,31,var(3))*.04)*const(size.xscale)),ifelse(var(6)%10>0,var(6)%10*1.5,(-10.0*(51-var(3))/51-.9)*const(size.yscale))
airguard.velocity = -6*const(size.xscale),-2*const(size.yscale)
air.cornerpush.veloff = 0
yaccel = .9*const(size.yscale)
fall.recover = ifelse(var(6)%10>0||var(28)>0,0,1)
fall.recovertime = ifelse(var(49)&&!var(2),30+12,16-ifelse(floor(var(14)/75)>7,7,floor(var(14)/75))+12)
hitsound = s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,4)
guardsound = s7000,4
getpower = floor(ifelse(var(9),0,floor(45*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2))*1.250*fvar(16))),floor(ifelse(var(9),0,ceil(45*fvar(0)/fvar(2)*1.0/8)*1.250*fvar(16)))
givepower = floor(45*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2)*.8)*1.250,floor(45*fvar(0)/fvar(2)*.8*1.0/8)*1.250
fall = 0
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-100*const(size.xscale))
animtype = Medium
ground.type = Low
attr = C,NA
hitflag = MAFD
guardflag = M
persistent=0

[state 200]
type = AttackDist
trigger1 = AnimElem=8
value = 0

;ヒットによる増加(スタイリッシュポイント)
[state -2]
type = varadd
trigger1 = movehit=1
fvar(15) = .00005*floor(ifelse(40*fvar(14)<1,1+(var(2)%5=1),40*fvar(14))*1.22)
ignorehitpause=1

[state -2]
type = varset
trigger1 = movehit=1
fvar(14) = fvar(1)*fvar(2)*fvar(3)*fvar(4)
ignorehitpause=1

;◇◇ヒットスパーク◇◇
[state 240]
type = VarSet
trigger1 = AnimElem=7
var(16) = 5
persistent=0

;X座標
[state 240]
type = VarSet
trigger1 = AnimElem=7,>=0&&AnimElem=8,<0
var(17) = floor(ifelse(P2dist X>174*const(size.xscale),174*const(size.xscale),floor(P2dist X)+ifelse((P2dist X=[1,30]),10,-10)+10))

;Y座標
[state 240]
type = VarSet
trigger1 = AnimElem=7&&AnimElem=8,<0
var(18) = floor(-80*const(size.yscale))


;・・・・自分側ヒットバック・・・・
;ヒットバック量取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = var(1)%2<1&&var(1)%8<4&&target,time=0
fvar(5) = ifelse(var(3)&&target,statetype=A&&var(6)%10<1,-12.0*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.06),-12.0*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.060))*const(size.xscale)
ignorehitpause=1

;ヒットバック量取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2>=1||var(1)%8>=4)&&target,time=1
fvar(5) = (-12.0*1.25*((enemynear,backedgebodydist<=5||enemynear,frontedgebodydist<=5||var(1)%8>=4)&&fvar(10)<=0)*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.1))*const(size.xscale)
ignorehitpause=1

;ヒットバック時間取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2<1&&var(1)%8<4&&target,time=0)||((var(1)%2>=1||var(1)%8>=4)&&target,time=1)
fvar(6) = ifelse(moveguarded,18,20+(P2statetype=C))
ignorehitpause=1

;ヒットポーズ取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2<1&&var(1)%8<4&&target,time=0)||((var(1)%2>=1||var(1)%8>=4)&&target,time=1)
fvar(7) = (14-(var(1)%2>=1||var(1)%8>=4))*ifelse(moveguarded,-1,1)
ignorehitpause=1
;・・・・・・・・

[state 200]
type = ChangeState
trigger1 = AnimTime=0
value = 11
ctrl = 1

;しゃがみ強
[statedef 420]
type = C
movetype=A
physics = C
ctrl = 0
velset = ifelse(fvar(9),fvar(9)*0,0),0
movehitpersist=1

[state 200]
type = VarSet
trigger1 = !time&&P2dist X<0&&(prevstateno=52||((prevstateno=[200,1999])&&fvar(10)<=0))
fvar(9) = -fvar(9)

[state 200]
type = Turn
trigger1 = !time&&P2dist X<0&&(prevstateno=52||(prevstateno=[200,1999]))

;最大慣性速度
[state -2]
type = varset
trigger1 = !time&&(prevstateno=[100,101])
fvar(9) = ifelse(fvar(9)>const(velocity.run.fwd.x)*2,const(velocity.run.fwd.x)*2,fvar(9)*.9)
ignorehitpause=1

;援軍ヒットキャンセル
[state 100]
type = Helper
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = !(movecontact&&((prevstateno=[200,210])||prevstateno=400))
id = 7710
stateno = 7710
pos = 0,const(size.mid.pos.y)
postype = P1
pausemovetime=20
supermovetime=20
ignorehitpause=1

;援軍ヒットキャンセル
[state 100]
type = VarSet
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = !(movecontact&&((prevstateno=[200,210])||prevstateno=400))
fvar(5) = 0

;援軍ヒットキャンセル
[state 100]
type = VarSet
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = !(movecontact&&((prevstateno=[200,210])||prevstateno=400))
var(15) = 0

;援軍ヒットキャンセル
[state 100]
type = MoveHitReset
trigger1 = !time

;速度取得
[state -2]
type = varset
trigger1 = !time
fvar(8) = 0
ignorehitpause=1

[state 200]
type = VarSet
trigger1 = !Time
trigger2 = animtime=-1&&(var(53)!=[110,115])
var(53) = 0

[state 200]
type = ChangeAnim
trigger1 = Time=0&&!(var(34)=stateno&&((prevstateno=[130,132])||(prevstateno=150||prevstateno=152)))
value = 420

;||魂属性判別
[state 6900]
type = varset
trigger1 = animelem=1
var(36) = 0

[state 6900]
type = varset
triggerall = animelem=1
trigger1 = numhelper(6400)
trigger1 = helper(6400),stateno=6400
trigger2 = numhelper(6401)
trigger2 = helper(6401),stateno=6400
trigger3 = numhelper(6402)
trigger3 = helper(6402),stateno=6400
var(36) = 1

;魂放出
[state 6900]
type = varset
triggerall = animelem=4,>0&&var(36)=1
triggerall = command="x"&&!var(59)
trigger1 = numhelper(6400)
trigger1 = helper(6400),stateno=6400
trigger2 = numhelper(6401)
trigger2 = helper(6401),stateno=6400
trigger3 = numhelper(6402)
trigger3 = helper(6402),stateno=6400
var(36) = 2

[state 1200]
type = helper
trigger1 = var(36)>1
trigger1 = var(36):=-1
id = 6410
stateno= 6420
pos = 0,0
postype = p1
ownpal = 1
size.xscale = const(size.xscale)*1.5
size.yscale = const(size.xscale)*1.5
ignorehitpause=1
;||

;現在の速度取得
[state 900]
type = VarSet
trigger1 = var(36)&&AnimElem=4,=1
fvar(8) = 8.5

[state 900]
type = VarSet
trigger1 = var(36)&&fvar(8)>=.5&&!(var(52)>0&&movecontact)
fvar(8) = fvar(8)*.85

[state 900]
type = VarSet
trigger1 = var(36)&&fvar(8)<.5&&!(var(52)>0&&movecontact)
fvar(8) = 0

[state -2]
type = velset
trigger1 = var(36)&&fvar(8)>0 && !fvar(9) && !(fvar(5) && !fvar(7)&&(enemynear,backedgebodydist<=5||enemynear,frontedgebodydist<=5))
x = fvar(8)

[state 190]
type = PlaySND
triggerall = !Ishelper
trigger1 = var(36)&&AnimElemNo(2)=7&&AnimElemNo(1)=6
value = 30,8
channel = 10

[state 190]
type = PlaySND
triggerall = !Ishelper
trigger1 = !var(36)&&AnimElemNo(2)=7&&AnimElemNo(1)=6
value = 7300,3
channel = 10

[state 190]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&AnimElemNo(2)=7&&AnimElemNo(1)=6
value = 10,5+(random<=500)
channel = 1

;転倒食らい
[state 190]
type = Targetstate
trigger1 = numtarget && movehit=1 && var(1)%2<1 && var(1)%8<4 && var(6)%10<1
trigger1 = target,time=0
value = 15070

;~~~自分側のhitpause作成~~
[state 250]
type = varset
trigger1 = time=0
var(52) = 100

[state 250]
type = varadd
trigger1 = movecontact&&var(52)>=0
var(52) = -1

[state 250]
type = varset
trigger1 = movecontact=1
var(52) = 13

[state 250]
type = null;varset
trigger1 = movecontact&&((enemynear,prevstateno=[5000,5099])||(enemynear,prevstateno=[150,155]))&&P2movetype!=H&&var(52)>0
var(52) = 0

[state 250]
type = ChangeAnim
trigger1 = (movecontact||var(19)) && var(52)>var(54) && var(52)<100
value = anim
elem = ifelse(AnimElemNo(0)=var(47),AnimElemNo(0),AnimElemNo(-1))

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(47) = AnimElemNo(0)

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(54) = AnimElemTime(AnimElemNo(0))

[state 250]
type = PosFreeze
trigger1 = var(52)>0&&(movecontact||var(19))
value = 1
;~~~~~~~~~~~~~~~~~~~~~~
;~~必殺技~~~
;屍ニ堕ツル城
[state 250]
type = varset
trigger1 = (var(45)=[1,9999]) && var(53)<1000 && roundstate=2 && !var(59)
var(53) = ifelse(command="Ichigeki",3500,var(53))

;死ニ至ル病
[state 250]
type = varset
trigger1 = Power>=1000 && var(53)<1000 && roundstate=2 && !var(59)
var(53) = ifelse(!var(13)&&command="Shini",3000,var(53))

;苦ヲ喰ム紅
[state 250]
type = varset
trigger1 = Power>=1000 && var(53)<1000 && roundstate=2 && !var(59)
var(53) = ifelse(command="Kuwo",3100,var(53))

;慟哭スル魂
[state 250]
type = varset
trigger1 = var(53)<1000 && time>4 && !var(59)
var(53) = ifelse(!var(12)&&command="Doukoku",1200,var(53))

;慟哭スル魂・散華
[state 250]
type = varset
triggerall = var(53)<1000 && roundstate=2 && !var(59)
trigger1 = numhelper(6400)
trigger1 = helper(6400),stateno=6400
trigger2 = numhelper(6401)
trigger2 = helper(6401),stateno=6400
trigger3 = numhelper(6402)
trigger3 = helper(6402),stateno=6400
var(53) = ifelse(command="Sange",1400,var(53))

;慟哭スル魂・波動
[state 250]
type = varset
triggerall = var(53)<1000 && roundstate=2 && !var(59)
trigger1 = numhelper(6400)
trigger1 = helper(6400),stateno=6400
trigger2 = numhelper(6401)
trigger2 = helper(6401),stateno=6400
trigger3 = numhelper(6402)
trigger3 = helper(6402),stateno=6400
var(53) = ifelse(command = "Hadou",1300,var(53))

;厄災ノ棘
[state 250]
type = varset
trigger1 = var(53)<1000 && time>4 && !var(59)
var(53) = ifelse(command="Yakusai",1100,var(53))

;上反斬り
[state 250]
type = varset
trigger1 = var(53)<1000 && time>4 && !var(59)
var(53) = ifelse(command="Joutan",1600,var(53))

;遠雷遥
[state 250]
type = varset
trigger1 = var(53)<1000 && time>4 && !var(59)
var(53) = ifelse(command="Enrai",1000,var(53))

;~~~~
;ダッシュ
[state 250]
type = varset
trigger1 = var(53)<1000 && time>4 && !var(59)
trigger1 = movecontact&&var(36)
var(53) = ifelse((fvar(13)=17&&P2dist X>=0)||(fvar(13)=-17&&P2dist X<0),100,var(53))

;ジャンプ・ハイジャンプ
[state 250]
type = varset
trigger1 = !var(53) && time>4 && !var(59)
trigger1 = movecontact&&var(36)
var(53) = ifelse(var(0)<10 && command="longjump",50+ifelse(command="holdback",2,ifelse(command="holdfwd",1,0)),ifelse(command="holdup",40+ifelse(command="holdback",2,ifelse(command="holdfwd",1,0)),0))

;チェーンコンボ
[state 250]
type = varset
trigger1 = !var(53) && time>4 && !var(59)
trigger1 = ((command="x"&&command="holddown")||command="y"||command="z")
var(53) = ifelse(command="z",ifelse(command="holdfwd"&&command!="holddown",320,220),ifelse(command="y",ifelse(command="holdfwd"&&command!="holddown",310,210),ifelse(command="x",200,var(53))))+(command="holddown")*200
;~~~~~~~~~~~

;Attack Lv.4
[state 200]
type = Hitdef
triggerall = (var(52)<=0||var(52)=100)
trigger1 = AnimElem=7
damage = floor(ifelse(floor(60*fvar(0))<1,1+(var(2)%5=4),floor(60*fvar(0)))*1.22)
ground.slidetime = 17+(P2statetype=C)
ground.hittime = 17+(P2statetype=C)
guard.slidetime = 15
guard.hittime = 15
pausetime = 1,13+var(49)*7
ground.velocity = -4.0*const(size.xscale),(-8.0-.9)*const(size.yscale)
guard.velocity = ifelse(numtarget(920),-44,-15.0)*const(size.xscale)
ground.cornerpush.veloff = 0
air.velocity = ifelse(var(1)%8>=4||var(1)%2>=1,-10.0*(1.0+ifelse(var(2)>31,31,var(2))*.05)-.0013,-4.0*(1.0+ifelse(var(3)>31,31,var(3))*.04)*const(size.xscale)),ifelse(var(6)%10>0,var(6)%10*1.5,(-8.0*(51-var(3))/51-.9)*const(size.yscale))
airguard.velocity = -6*const(size.xscale),-2*const(size.yscale)
air.cornerpush.veloff = 0
yaccel = .9*const(size.yscale)
fall.recover = ifelse(var(6)%10>0||var(28)>0,0,1)
fall.recovertime = ifelse(var(49)&&!var(2),37+13,20-ifelse(floor(var(14)/55)>9,9,floor(var(14)/55))+13)
hitsound = s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,2)
guardsound = s7000,2
getpower = floor(ifelse(var(9),0,floor(55*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2))*1.250*fvar(16))),floor(ifelse(var(9),0,ceil(55*fvar(0)/fvar(2)*1.0/8)*1.250*fvar(16)))
givepower = floor(55*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2)*.8)*1.250,floor(55*fvar(0)/fvar(2)*.8*1.0/8)*1.250
fall = 1
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-50*const(size.xscale))
animtype = hard
ground.type = Low
attr = C,NA
hitflag = MAFD
guardflag = L
persistent=0

[state 200]
type = AttackDist
trigger1 = AnimElem=8
value = 0

;ヒットによる増加(スタイリッシュポイント)
[state -2]
type = varadd
trigger1 = movehit=1
fvar(15) = .00005*floor(ifelse(60*fvar(14)<1,1+(var(2)%5=1),60*fvar(14))*1.22)
ignorehitpause=1

[state -2]
type = varset
trigger1 = movehit=1
fvar(14) = fvar(1)*fvar(2)*fvar(3)*fvar(4)
ignorehitpause=1

;◇◇ヒットスパーク◇◇
[state 240]
type = VarSet
trigger1 = AnimElem=7
var(16) = 1
persistent=0

;X座標
[state 240]
type = VarSet
trigger1 = AnimElem=7,>=0&&AnimElem=8,<0
var(17) = floor(ifelse(P2dist X>308*const(size.xscale),308*const(size.xscale),floor(P2dist X)+ifelse((P2dist X=[1,30]),10,-10)+10))

;Y座標
[state 240]
type = VarSet
trigger1 = AnimElem=7,>=0&&AnimElem=8,<0
var(18) = -floor(ifelse(P2dist Y<-78*const(size.xscale),118*const(size.xscale),-floor(P2dist Y)+floor(40*const(size.yscale))))


;・・・・自分側ヒットバック・・・・
;ヒットバック量取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = var(1)%2<1&&var(1)%8<4&&target,time=0
fvar(5) = ifelse(((var(3)&&target,statetype=A)||movehit)&&var(6)%10<1,-4.5*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.06),-15.0*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.060))*const(size.xscale)
ignorehitpause=1

;ヒットバック量取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2>=1||var(1)%8>=4)&&target,time=1
fvar(5) = (-15.0*1.25*((enemynear,backedgebodydist<=5||enemynear,frontedgebodydist<=5||var(1)%8>=4)&&fvar(10)<=0)*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.1))*const(size.xscale)
ignorehitpause=1

;ヒットバック時間取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2<1&&var(1)%8<4&&target,time=0)||((var(1)%2>=1||var(1)%8>=4)&&target,time=1)
fvar(6) = ifelse(moveguarded,18,20+(P2statetype=C))
ignorehitpause=1

;ヒットポーズ取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2<1&&var(1)%8<4&&target,time=0)||((var(1)%2>=1||var(1)%8>=4)&&target,time=1)
fvar(7) = (14-(var(1)%2>=1||var(1)%8>=4))*ifelse(moveguarded,-1,1)
ignorehitpause=1
;・・・・・・・・

[state 200]
type = ChangeState
trigger1 = AnimTime=0
value = 11
ctrl = 1

;ジャンプ弱
[statedef 600]
type = A
movetype=A
physics = N
ctrl = 0
velset = ifelse(fvar(9),fvar(9)*0+fvar(8),Vel X),vel Y
movehitpersist=1

;援軍ヒットキャンセル
[state 100]
type = Helper
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = !((movecontact||animelemtime(4)>0)&&var(1)%4<2&&prevstateno=600)
id = 7710
stateno = 7710
pos = 0,const(size.mid.pos.y)
postype = P1
pausemovetime=20
supermovetime=20
ignorehitpause=1

;援軍ヒットキャンセル
[state 100]
type = VarSet
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = !((movecontact||animelemtime(4)>0)&&var(1)%4<2&&prevstateno=600)
fvar(5) = 0

;援軍ヒットキャンセル
[state 100]
type = VarSet
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = !((movecontact||animelemtime(4)>0)&&var(1)%4<2&&prevstateno=600)
var(15) = 0

;援軍ヒットキャンセル
[state 100]
type = MoveHitReset
trigger1 = !time

[state 200]
type = ChangeAnim
trigger1 = Time=0&&!(var(34)=stateno&&((prevstateno=[130,132])||(prevstateno=150||prevstateno=152)))
value = 600

;着地硬直設定
[state 600]
type = varadd
trigger1 = !time&&var(5)%256<128
var(5) = 128

[state 600]
type = VelSet
trigger1 = (prevstateno=[110,115])&&time<0
y = 0

[state 600]
type = VelAdd
trigger1 = !((prevstateno=[110,115])&&time<0)&&!(var(52)>0&&movecontact)
y = ifelse(var(1)%4>=2&&var(1)%2<1,.5,const(movement.yaccel))*ifelse(var(5)%2>=1,1.08,1.0)*ifelse(var(5)%4>=2||var(5)%8>=4,.95,1.0)*ifelse(fvar(10)>0&&var(1)%2>=1,.9,1.0)*2.0*const(size.yscale)

[state 600]
type = VelSet
trigger1 = !Time&&(prevstateno=[110,115])
x = fvar(8)+fvar(9)

[state 600]
type = VarSet
trigger1 = !Time&&(prevstateno=[110,115])
fvar(8) = fvar(8)

[state 600]
type = VelSet
trigger1 = !Time&&(prevstateno!=[110,115])&&var(5)%8>=4
trigger1 = (fvar(8)>ifelse(var(5)%2>=1,const(velocity.runjump.fwd.x),const(velocity.jump.fwd.x))||fvar(8)<ifelse(var(5)%2>=1,const(velocity.runjump.back.x),const(velocity.jump.back.x)))
x = ifelse(fvar(8)>0,ifelse(var(5)%2>=1,const(velocity.runjump.fwd.x),const(velocity.jump.fwd.x)),ifelse(var(5)%2>=1,const(velocity.runjump.back.x),const(velocity.jump.back.x)))+fvar(9)

[state 600]
type = VarSet
trigger1 = !Time&&(prevstateno!=[110,115])&&var(5)%8>=4
fvar(8) = ifelse(fvar(8)>0,ifelse(var(5)%2>=1,const(velocity.runjump.fwd.x),const(velocity.jump.fwd.x)),ifelse(var(5)%2>=1,const(velocity.runjump.back.x),const(velocity.jump.back.x)))

[state 200]
type = VarSet
trigger1 = !Time
var(34) = 0

[state 190]
type = PlaySND
trigger1 = AnimElemNo(2)=3&&AnimElemNo(1)=2
value = 7300,0
channel = 10

[state 190]
type = PlaySND
triggerall = !Ishelper
trigger1 = (!var(10)||var(10)>=1000)&&random%2=0&&AnimElemNo(2)=3&&AnimElemNo(1)=2
value = 10,1+(random<500)
channel = 1

;~~~自分側のhitpause作成~~
[state 250]
type = varset
trigger1 = time=0
var(52) = 100

[state 250]
type = varadd
trigger1 = movecontact&&var(52)>=0
var(52) = -1

[state 250]
type = varset
trigger1 = movecontact=1
var(52) = ifelse(var(1)%4>=2,8,11)

[state 250]
type = null;varset
trigger1 = movecontact&&((enemynear,prevstateno=[5000,5099])||(enemynear,prevstateno=[150,155]))&&P2movetype!=H&&var(52)>0
var(52) = 0

[state 250]
type = ChangeAnim
trigger1 = movecontact && var(52)>var(54)
value = anim
elem = ifelse(AnimElemNo(0)=var(47),AnimElemNo(0),AnimElemNo(-1))

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(47) = AnimElemNo(0)

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(54) = AnimElemTime(AnimElemNo(0))

[state 250]
type = PosFreeze
trigger1 = var(52)>0&&movecontact
value = 1
;~~~~~~~~~~~~~~~~~~~~~~

;>>>>>>>>>>><<<<<<<<<<<
;~~コマンド先行入力~~
[state 250]
type = varset
trigger1 = time=0
trigger2 = animtime=-1&&(var(53)!=[110,115])
var(53) = 0

;~~必殺技~~~
;遠雷遥・空中
[state 250]
type = varset
trigger1 = var(53)<1000 && time>4 && !var(59)
var(53) = ifelse(command="Enrai",1050,var(53))

;~~~~~~~~~~~
;空中ダッシュ・空中バックステップ
[state 250]
type = varset
trigger1 = !var(53) && time>4 && !var(59)
var(53) = ifelse((fvar(13)=17&&P2dist X>=0)||(fvar(13)=-17&&P2dist X<0),110,ifelse((fvar(13)=-17&&P2dist X>=0)||(fvar(13)=17&&P2dist X<0),115,var(53)))

;２段ジャンプ、２段ハイジャンプ
[state 250]
type = varset
trigger1 = !var(53) && time>4 && !var(59)
trigger1 = var(1)%4>=2
var(53) = ifelse(var(0)%ifelse(var(0)>=1000,1000,100)<10&&command="longjump",50+ifelse(command="holdfwd",1,ifelse(command="holdback",2,0)),ifelse(command="up",40,ifelse(command="fwdup",41,ifelse(command="backup",42,var(53)))))

;エリアルスパイク
[state 250]
type = varset
trigger1 = !var(53) && time>4 && !var(59)
trigger1 = var(1)%4>=2
trigger1 = command="z"&&command="holddown"&&command!="holdfwd"&&command!="holdback"&&P2bodydist X<=floor(85*const(size.xscale))&&P2statetype=A&&!(P2statetype=L&&enemynear,alive)
var(53) = 720

;チェーンコンボ
[state 250]
type = varset
trigger1 = !var(53) && time>4 && !var(59)
trigger1 = (command="x"||command="y"||command="z")
var(53) = ifelse(command="z"&&command="holddown"&&command!="holdfwd"&&command!="holdback"&&var(1)%4>=2,720,ifelse(command="z",620,ifelse(command="y",610,ifelse(command="x"&&0,600,var(53)))))

;~~~~~~~~~~~

;Attack Lv.2
[state 200]
type = Hitdef
trigger1 = AnimElem=3
triggerall = var(1)%4<2
damage = floor(ifelse(floor(24*fvar(0)*ifelse(var(1)%4>=2,.5,1.0))<1,1+(var(2)%5=4),floor(24*fvar(0)*ifelse(var(1)%4>=2,.5,1.0)))*1.22)
ground.slidetime = 12+(P2statetype=C)
ground.hittime = 12+(P2statetype=C)
guard.slidetime = 10
guard.hittime = 10
pausetime = 1,11+var(49)*6
ground.velocity = -10.5*(1.0+ifelse(var(2)>31,31,var(2))*.02)*const(size.xscale)
guard.velocity = ifelse(numtarget(920),-44,-10.5)*const(size.xscale)
ground.cornerpush.veloff = 0
air.velocity = ifelse(var(1)%8>=4||var(1)%2>=1,-10.0*(1.0+ifelse(var(2)>31,31,var(2))*.05)-.0011,-5.0*(1.0+ifelse(var(3)>31,31,var(3))*.04)*const(size.xscale)),ifelse(var(6)%10>0,var(6)%10*1.5,(-9.0*(51-var(3))/51-.9)*const(size.yscale))
airguard.velocity = -6*const(size.xscale),-2*const(size.yscale)
air.cornerpush.veloff = 0
yaccel = .9*const(size.yscale)
fall.recover = ifelse(var(6)%10>0||var(28)>0,0,1)
fall.recovertime = ifelse(var(49)&&!var(2),24+11,12-ifelse(floor(var(14)/85)>6,6,floor(var(14)/85))+11)
hitsound = s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,4)
guardsound = s7000,4
getpower = floor(ifelse(var(9),0,floor(24*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2))*1.250*fvar(16))),floor(ifelse(var(9),0,ceil(24*fvar(0)/fvar(2)*1.0/8)*1.250*fvar(16)))
givepower = floor(24*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2)*.8)*1.250,floor(24*fvar(0)/fvar(2)*.8*1.0/8)*1.250
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-100*const(size.xscale))
animtype = Light
ground.type = High
attr = A,NA
hitflag = MAFD
guardflag = HA
persistent=0

;Attack Lv.2
[state 200]
type = Hitdef
trigger1 = AnimElem=3
triggerall = var(1)%4>=2
damage = floor(ifelse(floor(24*fvar(0)*ifelse(var(1)%4>=2,.5,1.0))<1,1+(var(2)%5=4),floor(24*fvar(0)*ifelse(var(1)%4>=2,.5,1.0)))*1.22)
ground.slidetime = 12+(P2statetype=C)
ground.hittime = 12+(P2statetype=C)
guard.slidetime = 10
guard.hittime = 10
pausetime = 1,8
ground.velocity = -10.5*(1.0+ifelse(var(2)>31,31,var(2))*.02)*const(size.xscale)
guard.velocity = ifelse(numtarget(920),-44,-10.5)*const(size.xscale)
ground.cornerpush.veloff = 0
air.velocity = -9.0*const(size.xscale)-.0008,-9.0*((4-(var(4)-ifelse(var(4)>=100,floor(var(4)/100)*100-ifelse(var(4)>=10000,floor(var(4)/10000)*10000,0),0)-ifelse(var(4)>=10000,floor(var(4)/10000)*10000,0)))*1.0/4)*const(size.yscale)
airguard.velocity = -6*const(size.xscale),-2*const(size.yscale)
air.cornerpush.veloff = 0
yaccel = 1.0*const(size.yscale)
fall.recover = ifelse(var(6)%10>0||var(28)>0,0,1)
fall.recovertime = ifelse(var(49)&&!var(2),24+8,12-ifelse(floor(var(14)/85)>6,6,floor(var(14)/85))+8)
hitsound = s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,4)
guardsound = s7000,4
getpower = floor(ifelse(var(9),0,floor(24*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2))*1.250*fvar(16))),floor(ifelse(var(9),0,ceil(24*fvar(0)/fvar(2)*1.0/8)*1.250*fvar(16)))
givepower = floor(24*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2)*.8)*1.250,floor(24*fvar(0)/fvar(2)*.8*1.0/8)*1.250
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-100*const(size.xscale))
animtype = Light
ground.type = High
attr = A,NA
hitflag = MAFD
guardflag = HA
persistent=0

[state 200]
type = AttackDist
trigger1 = AnimElem=4
value = 0

;エリアル中
[state -2]
type = varset
trigger1 = animelem=3,>=0&&animelem=4,<0&&!movecontact&&var(1)%2<1&&var(1)%8<4&&var(1)%4>=2&&floor(fvar(26))=91000
fvar(26) = ifelse((var(4)-ifelse(var(4)>=100,floor(var(4)/100)*100-ifelse(var(4)>=10000,floor(var(4)/10000)*10000,0),0)-ifelse(var(4)>=10000,floor(var(4)/10000)*10000,0))=0,floor(P2bodydist Y),90000)

[state -2]
type = targetbind
trigger1 = movecontact=1&&var(1)%2<1&&var(1)%8<4&&var(1)%4>=2&&(var(4)-ifelse(var(4)>=100,floor(var(4)/100)*100-ifelse(var(4)>=10000,floor(var(4)/10000)*10000,0),0)-ifelse(var(4)>=10000,floor(var(4)/10000)*10000,0))=0&&floor(fvar(26))<90000
pos = floor(P2dist X),floor(fvar(26))

[state -2]
type = VarAdd
trigger1 = var(1)%4>=2 && movecontact=1 && !var(2)
var(1) = -2
ignorehitpause=1

[state -2]
type = VelSet
trigger1 = var(1)%4>=2 && var(1)%2<1 && movecontact=1
y = -9.0*const(size.yscale)
ignorehitpause=1

;ヒットによる増加(スタイリッシュポイント)
[state -2]
type = varadd
trigger1 = movehit=1
fvar(15) = .00005*floor(ifelse(24*fvar(14)*ifelse(var(1)%4>=2,.5,1.0)<1,1+(var(2)%5=1),24*fvar(14)*ifelse(var(1)%4>=2,.5,1.0))*1.22)
ignorehitpause=1

[state -2]
type = varset
trigger1 = movehit=1
fvar(14) = fvar(1)*fvar(2)*fvar(3)*fvar(4)
ignorehitpause=1

;◇◇ヒットスパーク◇◇
[state 240]
type = VarSet
trigger1 = AnimElem=3
var(16) = 5
persistent=0

;X座標
[state 240]
type = VarSet
trigger1 = AnimElem=3,>=0&&AnimElem=4,<0
var(17) = floor(ifelse(P2dist X>118*const(size.xscale),118*const(size.xscale),floor(P2dist X)+ifelse((P2dist X=[1,30]),10,-10)+10))

;Y座標
[state 240]
type = VarSet
trigger1 = AnimElem=3,>=0&&AnimElem=4,<0
var(18) = floor(-60*const(size.yscale))

;・・・・自分側ヒットバック・・・・
;ヒットバック量取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = var(1)%2<1&&var(1)%8<4&&target,time=0
fvar(5) = ifelse(var(3)&&target,statetype=A&&var(6)%10<1,-12.0*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.06),-10.5*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.060))*const(size.xscale)
ignorehitpause=1

;ヒットバック量取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2>=1||var(1)%8>=4)&&target,time=1
fvar(5) = (-10.5*1.25*((enemynear,backedgebodydist<=5||enemynear,frontedgebodydist<=5||var(1)%8>=4)&&fvar(10)<=0)*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.1))*const(size.xscale)
ignorehitpause=1

;ヒットバック時間取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2<1&&var(1)%8<4&&target,time=0)||((var(1)%2>=1||var(1)%8>=4)&&target,time=1)
fvar(6) = ifelse(moveguarded,10,12+(P2statetype=C))
ignorehitpause=1

;ヒットポーズ取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2<1&&var(1)%8<4&&target,time=0)||((var(1)%2>=1||var(1)%8>=4)&&target,time=1)
fvar(7) = (ifelse(var(1)%4>=2,8,11)-(var(1)%2>=1||var(1)%8>=4))*ifelse(moveguarded,-1,1)
ignorehitpause=1
;・・・・・・・・

[state 200]
type = ChangeState
trigger1 = Vel Y>0 && Pos Y>=-Vel Y && !(var(52)>0&&movecontact)
value = 52

[state 200]
type = ChangeState
trigger1 = AnimTime=0
value = 50
ctrl = 1

;ジャンプ中
[statedef 610]
type = A
movetype=A
physics = N
ctrl = 0
velset = ifelse(fvar(9),fvar(9)*0+fvar(8),Vel X),vel Y
movehitpersist=1

;援軍ヒットキャンセル
[state 100]
type = Helper
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = !(movecontact&&(prevstateno=600||(var(1)%4>=2&&prevstateno=620)))
id = 7710
stateno = 7710
pos = 0,const(size.mid.pos.y)
postype = P1
pausemovetime=20
supermovetime=20
ignorehitpause=1

;援軍ヒットキャンセル
[state 100]
type = VarSet
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = !(movecontact&&(prevstateno=600||(var(1)%4>=2&&prevstateno=620)))
fvar(5) = 0

;援軍ヒットキャンセル
[state 100]
type = VarSet
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = !(movecontact&&(prevstateno=600||(var(1)%4>=2&&prevstateno=620)))
var(15) = 0

;援軍ヒットキャンセル
[state 100]
type = MoveHitReset
trigger1 = !time

[state 200]
type = ChangeAnim
trigger1 = Time=0&&!(var(34)=stateno&&((prevstateno=[130,132])||(prevstateno=150||prevstateno=152)))
value = 610

;着地硬直設定
[state 600]
type = varadd
trigger1 = !time&&var(5)%256<128
var(5) = 128

[state 600]
type = VelSet
trigger1 = (prevstateno=[110,115])&&time<0
y = 0

[state 600]
type = VelAdd
trigger1 = !((prevstateno=[110,115])&&time<0)&&!(var(52)>0&&movecontact)
y = ifelse(var(1)%4>=2&&var(1)%2<1,.5,const(movement.yaccel))*ifelse(var(5)%2>=1,1.08,1.0)*ifelse(var(5)%4>=2||var(5)%8>=4,.95,1.0)*ifelse(fvar(10)>0&&var(1)%2>=1,.9,1.0)*2.0*const(size.yscale)

[state 600]
type = VelSet
trigger1 = !Time&&(prevstateno=[110,115])
x = fvar(8)+fvar(9)

[state 600]
type = VarSet
trigger1 = !Time&&(prevstateno=[110,115])
fvar(8) = fvar(8)

[state 600]
type = VelSet
trigger1 = !Time&&(prevstateno!=[110,115])&&var(5)%8>=4
trigger1 = (fvar(8)>ifelse(var(5)%2>=1,const(velocity.runjump.fwd.x),const(velocity.jump.fwd.x))||fvar(8)<ifelse(var(5)%2>=1,const(velocity.runjump.back.x),const(velocity.jump.back.x)))
x = ifelse(fvar(8)>0,ifelse(var(5)%2>=1,const(velocity.runjump.fwd.x),const(velocity.jump.fwd.x)),ifelse(var(5)%2>=1,const(velocity.runjump.back.x),const(velocity.jump.back.x)))+fvar(9)

[state 600]
type = VarSet
trigger1 = !Time&&(prevstateno!=[110,115])&&var(5)%8>=4
fvar(8) = ifelse(fvar(8)>0,ifelse(var(5)%2>=1,const(velocity.runjump.fwd.x),const(velocity.jump.fwd.x)),ifelse(var(5)%2>=1,const(velocity.runjump.back.x),const(velocity.jump.back.x)))

;||魂属性判別
[state 6900]
type = varset
trigger1 = animelem=1
var(36) = 0

[state 6900]
type = varset
triggerall = animelem=1
trigger1 = numhelper(6400)
trigger1 = helper(6400),stateno=6400
trigger2 = numhelper(6401)
trigger2 = helper(6401),stateno=6400
trigger3 = numhelper(6402)
trigger3 = helper(6402),stateno=6400
var(36) = 1

;魂放出
[state 6900]
type = varset
triggerall = animelem=4,>0&&var(36)=1
triggerall = command="x"&&!((var(1)%4>=2||command="Enrai")&&movecontact)&&!var(59)
trigger1 = numhelper(6400)
trigger1 = helper(6400),stateno=6400
trigger2 = numhelper(6401)
trigger2 = helper(6401),stateno=6400
trigger3 = numhelper(6402)
trigger3 = helper(6402),stateno=6400
var(36) = 2

[state 1200]
type = helper
trigger1 = var(36)>1
trigger1 = var(36):=-1
id = 6410
stateno= 6420
pos = 0,0
postype = p1
ownpal = 1
size.xscale = const(size.xscale)*1.5
size.yscale = const(size.xscale)*1.5
ignorehitpause=1
;||

[state 190]
type = PlaySND
triggerall = !Ishelper
trigger1 = var(36)&&AnimElemNo(2)=5&&AnimElemNo(1)=4
value = 30,8
channel = 10

[state 190]
type = PlaySND
triggerall = !Ishelper
trigger1 = !var(36)&&AnimElemNo(2)=5&&AnimElemNo(1)=4
value = 7300,2
channel = 10

[state 190]
type = PlaySND
triggerall = !Ishelper
trigger1 = (!var(10)||var(10)>=1000)&&random%3!=0&&AnimElemNo(2)=5&&AnimElemNo(1)=4
value = 10,3+(random<500)
channel = 1

;~~~自分側のhitpause作成~~
[state 250]
type = varset
trigger1 = time=0
var(52) = 100

[state 250]
type = varadd
trigger1 = movecontact&&var(52)>=0
var(52) = -1

[state 250]
type = varset
trigger1 = movecontact=1
var(52) = ifelse(var(1)%4>=2,8,12)

[state 250]
type = null;varset
trigger1 = movecontact&&((enemynear,prevstateno=[5000,5099])||(enemynear,prevstateno=[150,155]))&&P2movetype!=H&&var(52)>0
var(52) = 0

[state 250]
type = ChangeAnim
trigger1 = movecontact && var(52)>var(54)
value = anim
elem = ifelse(AnimElemNo(0)=var(47),AnimElemNo(0),AnimElemNo(-1))

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(47) = AnimElemNo(0)

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(54) = AnimElemTime(AnimElemNo(0))

[state 250]
type = PosFreeze
trigger1 = var(52)>0&&movecontact
value = 1
;~~~~~~~~~~~~~~~~~~~~~~

;>>>>>>>>>>><<<<<<<<<<<
;~~コマンド先行入力~~
[state 250]
type = varset
trigger1 = time=0
trigger2 = animtime=-1&&(var(53)!=[110,115])
var(53) = 0

;~~必殺技~~~
;遠雷遥・空中
[state 250]
type = varset
trigger1 = var(53)<1000 && time>4 && !var(59)
var(53) = ifelse(command="Enrai",1050,var(53))

;~~~~~~~~~~~
;空中ダッシュ・空中バックステップ
[state 250]
type = varset
trigger1 = !var(53) && time>4 && !var(59)
var(53) = ifelse((fvar(13)=17&&P2dist X>=0)||(fvar(13)=-17&&P2dist X<0),110,ifelse((fvar(13)=-17&&P2dist X>=0)||(fvar(13)=17&&P2dist X<0),115,var(53)))

;２段ジャンプ、２段ハイジャンプ
[state 250]
type = varset
trigger1 = !var(53) && time>4 && !var(59)
var(53) = ifelse(var(0)%ifelse(var(0)>=1000,1000,100)<10&&command="longjump",50+ifelse(command="holdfwd",1,ifelse(command="holdback",2,0)),ifelse(command="up"&&var(0)<200,40,ifelse(command="fwdup",41,ifelse(command="backup",42,var(53)))))

;エリアルスパイク
[state 250]
type = varset
trigger1 = !var(53) && time>4 && !var(59)
trigger1 = var(1)%4>=2
trigger1 = command="z"&&command="holddown"&&command!="holdfwd"&&command!="holdback"&&P2bodydist X<=floor(85*const(size.xscale))&&P2statetype=A&&!(P2statetype=L&&enemynear,alive)
var(53) = 720

;チェーンコンボ
[state 250]
type = varset
trigger1 = !var(53) && time>4 && !var(59)
trigger1 = (command="x"||command="y"||command="z")
var(53) = ifelse(command="z"&&command="holddown"&&command!="holdfwd"&&command!="holdback"&&var(1)%4>=2,720,ifelse(command="z",620,ifelse(command="y"&&0,610,ifelse(command="x"&&var(1)%4>=2,600,var(53)))))
;~~~~~~~~~~~
;Attack Lv.3
[state 200]
type = Hitdef
triggerall = (var(52)<=0||var(52)=100)
triggerall = var(1)%4<2
trigger1 = AnimElem=5
damage = floor(ifelse(floor(44*fvar(0)*ifelse(var(1)%4>=2,.5,1.0))<1,1+(var(2)%5=4),floor(44*fvar(0)*ifelse(var(1)%4>=2,.5,1.0)))*1.22)
ground.slidetime = 14+(P2statetype=C)
ground.hittime = 14+(P2statetype=C)
guard.slidetime = 12
guard.hittime = 12
pausetime = 1,12+var(49)*6
ground.velocity = -12.0*(1.0+ifelse(var(2)>31,31,var(2))*.02)*const(size.xscale)
guard.velocity = ifelse(numtarget(920),-44,-12.0)*const(size.xscale)
ground.cornerpush.veloff = 0
air.velocity = ifelse(var(1)%8>=4||var(1)%2>=1,-10.0*(1.0+ifelse(var(2)>31,31,var(2))*.05)-.0012,(-6.0-var(49)*4.0)*(1.0+ifelse(var(3)>31,31,var(3))*.04)*const(size.xscale)),ifelse(var(6)%10>0,var(6)%10*1.5,(-8.0*(51-var(3))/51-.9)*const(size.yscale))
airguard.velocity = -6*const(size.xscale),-2*const(size.yscale)
air.cornerpush.veloff = 0
yaccel = .9*const(size.yscale)
fall.recover = ifelse(var(6)%10>0||var(28)>0,0,1)
fall.recovertime = ifelse(var(49)&&!var(2),30+12,16-ifelse(floor(var(14)/75)>7,7,floor(var(14)/75))+12)
hitsound = s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,1)
guardsound = s7000,1
getpower = floor(ifelse(var(9),0,floor(45*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2))*1.250*fvar(16))),floor(ifelse(var(9),0,ceil(45*fvar(0)/fvar(2)*1.0/8)*1.250*fvar(16)))
givepower = floor(45*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2)*.8)*1.250,floor(45*fvar(0)/fvar(2)*.8*1.0/8)*1.250
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-100*const(size.xscale))
animtype = Medium
ground.type = High
attr = A,NA
hitflag = MAFD
guardflag = HA
persistent=0

;Attack Lv.3
[state 200]
type = Hitdef
triggerall = (var(52)<=0||var(52)=100)
triggerall = var(1)%4>=2
trigger1 = AnimElem=5
damage = floor(ifelse(floor(44*fvar(0)*ifelse(var(1)%4>=2,.5,1.0))<1,1+(var(2)%5=4),floor(44*fvar(0)*ifelse(var(1)%4>=2,.5,1.0)))*1.22)
ground.slidetime = 14+(P2statetype=C)
ground.hittime = 14+(P2statetype=C)
guard.slidetime = 12
guard.hittime = 12
pausetime = 1,8
ground.velocity = -12.0*(1.0+ifelse(var(2)>31,31,var(2))*.02)*const(size.xscale)
guard.velocity = ifelse(numtarget(920),-44,-12.0)*const(size.xscale)
ground.cornerpush.veloff = 0
air.velocity = -9.0*const(size.xscale)-.0008,-9.0*((4-(floor(var(4)-ifelse(var(4)>=10000,floor(var(4)/10000)*10000,0))/100)*1.0)/4)*const(size.yscale)
airguard.velocity = -6*const(size.xscale),-2*const(size.yscale)
air.cornerpush.veloff = 0
yaccel = 1.0*const(size.yscale)
fall.recover = ifelse(var(6)%10>0||var(28)>0,0,1)
fall.recovertime = ifelse(var(49)&&!var(2),30+8,16-ifelse(floor(var(14)/75)>7,7,floor(var(14)/75))+8)
hitsound = s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,1)
guardsound = s7000,1
getpower = floor(ifelse(var(9),0,floor(45*fvar(1)*fvar(3)*1.0/3)*1.250*fvar(16))),floor(ifelse(var(9),0,ceil(45*fvar(3)*1.0/3/8)*1.250*fvar(16)))
givepower = floor(45*fvar(1)*fvar(0)/fvar(2)*.8*1.0/3)*1.250,floor(45*fvar(0)/fvar(2)*.8*1.0/3/8)*1.250
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-100*const(size.xscale))
animtype = Medium
ground.type = High
attr = A,NA
hitflag = MAFD
guardflag = HA
persistent=0

[state 200]
type = AttackDist
trigger1 = AnimElem=6
value = 0

;エリアル中
[state -2]
type = varset
trigger1 = animelem=5,>=0&&animelem=6,<0&&!movecontact&&var(1)%2<1&&var(1)%8<4&&var(1)%4>=2&&floor(fvar(26))=91000
fvar(26) = ifelse((floor(var(4)-ifelse(var(4)>=10000,floor(var(4)/10000)*10000,0))/100)=0,floor(P2bodydist Y),90000)

[state -2]
type = targetbind
trigger1 = movecontact=1&&var(1)%2<1&&var(1)%8<4&&var(1)%4>=2&&(floor(var(4)-ifelse(var(4)>=10000,floor(var(4)/10000)*10000,0))/100)=0&&floor(fvar(26))<90000
pos = floor(P2dist X),floor(fvar(26))

[state -2]
type = VarAdd
trigger1 = var(1)%4>=2 && movecontact=1 && !var(2)
var(1) = -2
ignorehitpause=1

[state -2]
type = VelSet
trigger1 = var(1)%4>=2 && var(1)%2<1 && movecontact=1
y = -9.0*const(size.yscale)
ignorehitpause=1

;ヒットによる増加(スタイリッシュポイント)
[state -2]
type = varadd
trigger1 = movehit=1
fvar(15) = .00005*floor(ifelse(44*fvar(14)*ifelse(var(1)%4>=2,.5,1.0)<1,1+(var(2)%5=1),44*fvar(14)*ifelse(var(1)%4>=2,.5,1.0))*1.22)
ignorehitpause=1

[state -2]
type = varset
trigger1 = movehit=1
fvar(14) = fvar(1)*fvar(2)*fvar(3)*fvar(4)
ignorehitpause=1

;◇◇ヒットスパーク◇◇
[state 240]
type = VarSet
trigger1 = AnimElem=5
var(16) = 1
persistent=0

;X座標
[state 240]
type = VarSet
trigger1 = AnimElem=5,>=0&&AnimElem=6,<0
var(17) = floor(ifelse(P2dist X>152*const(size.xscale),142*const(size.xscale),floor(P2dist X)+ifelse((P2dist X=[1,30]),10,-10)+10))

;Y座標
[state 240]
type = VarSet
trigger1 = AnimElem=5&&AnimElem=6,<0
var(18) = floor(-136*const(size.yscale))+ifelse(P2bodydist Y<0,ifelse(P2bodydist Y<-20*const(size.yscale),floor(-20*const(size.yscale)),floor(P2bodydist Y)),0)


;・・・・自分側ヒットバック・・・・
;ヒットバック量取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = var(1)%2<1&&var(1)%8<4&&target,time=0
fvar(5) = ifelse(var(3)&&target,statetype=A&&var(6)%10<1,-13.5*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.06),-12.0*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.060))*const(size.xscale)
ignorehitpause=1

;ヒットバック量取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2>=1||var(1)%8>=4)&&target,time=1
fvar(5) = (-12.0*1.25*((enemynear,backedgebodydist<=5||enemynear,frontedgebodydist<=5||var(1)%8>=4)&&fvar(10)<=0)*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.1))*const(size.xscale)
ignorehitpause=1

;ヒットバック時間取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2<1&&var(1)%8<4&&target,time=0)||((var(1)%2>=1||var(1)%8>=4)&&target,time=1)
fvar(6) = ifelse(moveguarded,12,14+(P2statetype=C))
ignorehitpause=1

;ヒットポーズ取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2<1&&var(1)%8<4&&target,time=0)||((var(1)%2>=1||var(1)%8>=4)&&target,time=1)
fvar(7) = (ifelse(var(1)%4>=2,8,12)-(var(1)%2>=1||var(1)%8>=4))*ifelse(moveguarded,-1,1)
ignorehitpause=1
;・・・・・・・・

[state 200]
type = ChangeState
trigger1 = Vel Y>0 && Pos Y>=-Vel Y && !(var(52)>0&&movecontact) && !IsHelper
value = 52

[state 200]
type = ChangeState
trigger1 = AnimTime=0
value = 50
ctrl = 1

;ジャンプ強
[statedef 620]
type = A
movetype=A
physics = N
ctrl = 0
velset = ifelse(fvar(9),fvar(9)*0+fvar(8),Vel X),vel Y
movehitpersist=1

;援軍ヒットキャンセル
[state 100]
type = Helper
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = !(movecontact&&(prevstateno=[600,610]))
id = 7710
stateno = 7710
pos = 0,const(size.mid.pos.y)
postype = P1
pausemovetime=20
supermovetime=20
ignorehitpause=1

;援軍ヒットキャンセル
[state 100]
type = VarSet
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = !(movecontact&&(prevstateno=[600,610]))
fvar(5) = 0

;援軍ヒットキャンセル
[state 100]
type = VarSet
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = !(movecontact&&(prevstateno=[600,610]))
var(15) = 0

;援軍ヒットキャンセル
[state 100]
type = MoveHitReset
trigger1 = !time

[state 200]
type = ChangeAnim
trigger1 = Time=0&&!(var(34)=stateno&&((prevstateno=[130,132])||(prevstateno=150||prevstateno=152)))
value = 620

;着地硬直設定
[state 600]
type = varadd
trigger1 = !time&&var(5)%256<128
var(5) = 128

[state 600]
type = VelSet
trigger1 = (prevstateno=[110,115])&&time<0
y = 0

[state 600]
type = VelAdd
trigger1 = !((prevstateno=[110,115])&&time<0)&&!(var(52)>0&&movecontact)
y = ifelse(var(1)%4>=2&&var(1)%2<1,.5,const(movement.yaccel))*ifelse(var(5)%2>=1,1.08,1.0)*ifelse(var(5)%4>=2||var(5)%8>=4,.95,1.0)*ifelse(fvar(10)>0&&var(1)%2>=1,.9,1.0)*2.0*const(size.yscale)

[state 600]
type = VelSet
trigger1 = !Time&&(prevstateno=[110,115])
x = fvar(8)+fvar(9)

[state 600]
type = VarSet
trigger1 = !Time&&(prevstateno=[110,115])
fvar(8) = fvar(8)

[state 600]
type = VelSet
trigger1 = !Time&&(prevstateno!=[110,115])&&var(5)%8>=4
trigger1 = (fvar(8)>ifelse(var(5)%2>=1,const(velocity.runjump.fwd.x),const(velocity.jump.fwd.x))||fvar(8)<ifelse(var(5)%2>=1,const(velocity.runjump.back.x),const(velocity.jump.back.x)))
x = ifelse(fvar(8)>0,ifelse(var(5)%2>=1,const(velocity.runjump.fwd.x),const(velocity.jump.fwd.x)),ifelse(var(5)%2>=1,const(velocity.runjump.back.x),const(velocity.jump.back.x)))+fvar(9)

[state 600]
type = VarSet
trigger1 = !Time&&(prevstateno!=[110,115])&&var(5)%8>=4
fvar(8) = ifelse(fvar(8)>0,ifelse(var(5)%2>=1,const(velocity.runjump.fwd.x),const(velocity.jump.fwd.x)),ifelse(var(5)%2>=1,const(velocity.runjump.back.x),const(velocity.jump.back.x)))

;||魂属性判別
[state 6900]
type = varset
trigger1 = animelem=1
var(36) = 0

[state 6900]
type = varset
triggerall = animelem=1
trigger1 = numhelper(6400)
trigger1 = helper(6400),stateno=6400
trigger2 = numhelper(6401)
trigger2 = helper(6401),stateno=6400
trigger3 = numhelper(6402)
trigger3 = helper(6402),stateno=6400
var(36) = 1

;魂放出
[state 6900]
type = varset
triggerall = animelem=4,>0&&var(36)=1
triggerall = command="x"&&!((var(1)%4>=2||command="Enrai")&&movecontact)&&!var(59)
trigger1 = numhelper(6400)
trigger1 = helper(6400),stateno=6400
trigger2 = numhelper(6401)
trigger2 = helper(6401),stateno=6400
trigger3 = numhelper(6402)
trigger3 = helper(6402),stateno=6400
var(36) = 2

[state 1200]
type = helper
trigger1 = var(36)>1
trigger1 = var(36):=-1
id = 6410
stateno= 6420
pos = 0,0
postype = p1
ownpal = 1
size.xscale = const(size.xscale)*1.5
size.yscale = const(size.xscale)*1.5
ignorehitpause=1
;||

[state 190]
type = PlaySND
triggerall = !Ishelper
trigger1 = var(36)&&AnimElemNo(2)=4&&AnimElemNo(1)=3
value = 30,8
channel = 10

[state 190]
type = PlaySND
triggerall = !Ishelper
trigger1 = !var(36)&&AnimElemNo(2)=4&&AnimElemNo(1)=3
value = 7300,3
channel = 10

[state 190]
type = PlaySND
triggerall = !Ishelper
trigger1 = (!var(10)||var(10)>=1000)&&AnimElemNo(2)=4&&AnimElemNo(1)=3
value = 10,5+(random<500)
channel = 1

;~~~自分側のhitpause作成~~
[state 250]
type = varset
trigger1 = time=0
var(52) = 100

[state 250]
type = varadd
trigger1 = movecontact&&var(52)>=0
var(52) = -1

[state 250]
type = varset
trigger1 = movecontact=1
var(52) = ifelse(var(1)%4>=2,8,13)

[state 250]
type = null;varset
trigger1 = movecontact&&((enemynear,prevstateno=[5000,5099])||(enemynear,prevstateno=[150,155]))&&P2movetype!=H&&var(52)>0
var(52) = 0

[state 250]
type = ChangeAnim
trigger1 = movecontact && var(52)>var(54)
value = anim
elem = ifelse(AnimElemNo(0)=var(47),AnimElemNo(0),AnimElemNo(-1))

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(47) = AnimElemNo(0)

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(54) = AnimElemTime(AnimElemNo(0))

[state 250]
type = PosFreeze
trigger1 = var(52)>0&&movecontact
value = 1
;~~~~~~~~~~~~~~~~~~~~~~

;>>>>>>>>>>><<<<<<<<<<<
;~~コマンド先行入力~~
[state 250]
type = varset
trigger1 = time=0
trigger2 = animtime=-1&&(var(53)!=[110,115])
var(53) = 0

;~~必殺技~~~
;遠雷遥・空中
[state 250]
type = varset
trigger1 = var(53)<1000 && time>4 && !var(59)
var(53) = ifelse(command="Enrai",1050,var(53))
;~~~~~~~~~~~

;空中ダッシュ・空中バックステップ
[state 250]
type = varset
trigger1 = !var(53) && time>4 && !var(59)
var(53) = ifelse((fvar(13)=17&&P2dist X>=0)||(fvar(13)=-17&&P2dist X<0),110,ifelse((fvar(13)=-17&&P2dist X>=0)||(fvar(13)=17&&P2dist X<0),115,var(53)))

;２段ジャンプ、２段ハイジャンプ
[state 250]
type = varset
trigger1 = !var(53) && time>4 && !var(59)
trigger1 = (var(1)%4>=2||var(36))
var(53) = ifelse(var(0)%ifelse(var(0)>=1000,1000,100)<10&&command="longjump",50+ifelse(command="holdfwd",1,ifelse(command="holdback",2,0)),ifelse(command="up",40,ifelse(command="fwdup",41,ifelse(command="backup",42,var(53)))))

;エリアルスパイク
[state 250]
type = varset
trigger1 = !var(53) && time>4 && !var(59)
trigger1 = var(1)%4>=2
trigger1 = command="z"&&command="holddown"&&command!="holdfwd"&&command!="holdback"&&P2bodydist X<=floor(85*const(size.xscale))&&P2statetype=A&&!(P2statetype=L&&enemynear,alive)
var(53) = 720

;チェーンコンボ
[state 250]
type = varset
trigger1 = !var(53) && time>4 && !var(59)
trigger1 = (command="x"||command="y"||command="z")
var(53) = ifelse(command="z"&&0,620,ifelse(command="y"&&var(1)%4>=2,610,ifelse(command="x"&&var(1)%4>=2,600,var(53))))
;~~~~~~~~~~~
;Attack Lv.4
[state 200]
type = Hitdef
trigger1 = AnimElem=4
trigger1 = var(1)%4<2
damage = floor(ifelse(floor(64*fvar(0)*ifelse(var(1)%4>=2,.5,1.0))<1,1+(var(2)%5=4),floor(64*fvar(0)*ifelse(var(1)%4>=2,.5,1.0)))*1.22)
ground.slidetime = 17+(P2statetype=C)
ground.hittime = 17+(P2statetype=C)
guard.slidetime = 15
guard.hittime = 15
pausetime = 1,13+var(49)*7
ground.velocity = -15.0*(1.0+ifelse(var(2)>31,31,var(2))*.02)*const(size.xscale)
guard.velocity = ifelse(numtarget(920),-44,-15.0)*const(size.xscale)
ground.cornerpush.veloff = 0
air.velocity = ifelse(var(1)%8>=4||var(1)%2>=1,-10.0*(1.0+ifelse(var(2)>31,31,var(2))*.05)-.0013,-6.0*(1.0+ifelse(var(3)>31,31,var(3))*.04)*const(size.xscale)),ifelse(var(6)%10>0,var(6)%10*1.5,(-10.0*(51-var(3))/51-.9)*const(size.yscale))
airguard.velocity = -6*const(size.xscale),-2*const(size.yscale)
air.cornerpush.veloff = 0
yaccel = .9*const(size.yscale)
fall.recover = ifelse(var(6)%10>0||var(28)>0,0,1)
fall.recovertime = ifelse(var(49)&&!var(2),37+13,20-ifelse(floor(var(14)/55)>9,9,floor(var(14)/55))+13)
hitsound = s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,5)
guardsound = s7000,4
getpower = floor(ifelse(var(9),0,floor(65*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2))*1.250*fvar(16))),floor(ifelse(var(9),0,ceil(65*fvar(0)/fvar(2)*1.0/8)*1.250*fvar(16)))
givepower = floor(65*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2)*.8)*1.250,floor(65*fvar(0)/fvar(2)*.8*1.0/8)*1.22
fall = 0
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-140*const(size.xscale))
animtype = High
ground.type = High
attr = A,NA
hitflag = MAFD
guardflag = HA
persistent=0

;Attack Lv.4
[state 200]
type = Hitdef
trigger1 = AnimElem=4
trigger1 = var(1)%4>=2
damage = floor(ifelse(floor(64*fvar(0)*ifelse(var(1)%4>=2,.5,1.0))<1,1+(var(2)%5=4),floor(64*fvar(0)*ifelse(var(1)%4>=2,.5,1.0)))*1.22)
ground.slidetime = 17+(P2statetype=C)
ground.hittime = 17+(P2statetype=C)
guard.slidetime = 15
guard.hittime = 15
pausetime = 1,8
ground.velocity = -15.0*(1.0+ifelse(var(2)>31,31,var(2))*.02)*const(size.xscale)
guard.velocity = ifelse(numtarget(920),-44,-15.0)*const(size.xscale)
ground.cornerpush.veloff = 0
air.velocity = -9.0*const(size.xscale)-.0008,-9.0*((4-floor(var(4)/10000))*1.0/4)*const(size.yscale)
airguard.velocity = -6*const(size.xscale),-2*const(size.yscale)
air.cornerpush.veloff = 0
yaccel = 1.0*const(size.yscale)
fall.recover = ifelse(var(6)%10>0||var(28)>0,0,1)
fall.recovertime = ifelse(var(49)&&!var(2),37+8,20-ifelse(floor(var(14)/55)>9,9,floor(var(14)/55))+8)
hitsound = s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,5)
guardsound = s7000,4
getpower = floor(ifelse(var(9),0,floor(65*fvar(1)*fvar(3)*1.0/3)*1.250*fvar(16))),floor(ifelse(var(9),0,ceil(65*fvar(3)*1.0/3/8)*1.250*fvar(16)))
givepower = floor(65*fvar(1)*fvar(0)/fvar(2)*.8*1.0/3)*1.250,floor(65*fvar(0)/fvar(2)*.8*1.0/3/8)*1.22
fall = 0
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-140*const(size.xscale))
animtype = High
ground.type = High
attr = A,NA
hitflag = MAFD
guardflag = HA
persistent=0

[state 200]
type = AttackDist
trigger1 = AnimElem=6
value = 0

;エリアル中
[state -2]
type = varset
trigger1 = animelem=4,>=0&&animelem=6,<0&&!movecontact&&var(1)%2<1&&var(1)%8<4&&var(1)%4>=2&&floor(fvar(26))=91000
fvar(26) = ifelse(floor(var(4)/10000)=0,floor(P2bodydist Y),90000)

[state -2]
type = targetbind
trigger1 = movecontact=1&&var(1)%2<1&&var(1)%8<4&&var(1)%4>=2&&floor(var(4)/10000)=0&&floor(fvar(26))<90000
pos = floor(P2dist X),floor(fvar(26))

[state -2]
type = VarAdd
trigger1 = var(1)%4>=2 && movecontact=1 && !var(2)
var(1) = -2
ignorehitpause=1

[state -2]
type = VelSet
trigger1 = var(1)%4>=2 && var(1)%2<1 && movecontact=1
y = -9.0*const(size.yscale)
ignorehitpause=1

;ヒットによる増加(スタイリッシュポイント)
[state -2]
type = varadd
trigger1 = movehit=1
fvar(15) = .00005*ifelse(floor(64*fvar(0)*ifelse(var(1)%4>=2,.5,1.0))<1,1+(var(2)%5=4),floor(64*fvar(0)*ifelse(var(1)%4>=2,.5,1.0))*1.22)
ignorehitpause=1

[state -2]
type = varset
trigger1 = movehit=1
fvar(14) = fvar(1)*fvar(2)*fvar(3)*fvar(4)
ignorehitpause=1

;◇◇ヒットスパーク◇◇
[state 240]
type = VarSet
trigger1 = AnimElem=4
var(16) = 5
persistent=0

;X座標
[state 240]
type = VarSet
trigger1 = AnimElem=4,>=0&&AnimElem=6,<0
var(17) = floor(ifelse((P2bodydist X+const(size.air.front))>172*const(size.xscale),172*const(size.xscale),floor(P2dist X)+ifelse((P2dist X=[1,30]),10,-10)+10))

;Y座標
[state 240]
type = VarSet
trigger1 = AnimElem=4,>=0&&AnimElem=6,<0
var(18) = floor(ifelse(P2dist Y<-110*const(size.xscale),-110*const(size.yscale),ifelse(P2dist Y>-19*const(size.yscale),-19*const(size.yscale),P2dist Y-100*const(size.yscale))))

;Y座標
[state 240]
type = VarSet
trigger1 = AnimElem=4,>=0&&AnimElem=6,<0&&(P2bodydist X+const(size.air.front))>96*const(size.xscale)
var(18) = floor(ifelse(P2dist Y<-164*const(size.xscale),-164*const(size.yscale),ifelse(P2dist Y>-54*const(size.yscale),-54*const(size.yscale),P2dist Y-120*const(size.yscale))))

;・・・・自分側ヒットバック・・・・
;ヒットバック量取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = var(1)%2<1&&var(1)%8<4&&target,time=0
fvar(5) = ifelse(var(3)&&target,statetype=A&&var(6)%10<1,-15.0*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.06),-15.0*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.1))*const(size.xscale)
ignorehitpause=1

;ヒットバック量取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2>=1||var(1)%8>=4)&&target,time=1
fvar(5) = (-15.0*1.25*((enemynear,backedgebodydist<=5||enemynear,frontedgebodydist<=5||var(1)%8>=4)&&fvar(10)<=0)*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.1))*const(size.xscale)
ignorehitpause=1

;ヒットバック時間取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2<1&&var(1)%8<4&&target,time=0)||((var(1)%2>=1||var(1)%8>=4)&&target,time=1)
fvar(6) = ifelse(moveguarded,15,17+(P2statetype=C))
ignorehitpause=1

;ヒットポーズ取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2<1&&var(1)%8<4&&target,time=0)||((var(1)%2>=1||var(1)%8>=4)&&target,time=1)
fvar(7) = (ifelse(var(1)%4>=2,8,13)-(var(1)%2>=1||var(1)%8>=4))*ifelse(moveguarded,-1,1)
ignorehitpause=1
;・・・・・・・・

[state 200]
type = ChangeState
trigger1 = Vel Y>0 && Pos Y>=-Vel Y && !(var(52)>0&&movecontact) && !IsHelper
value = 52

[state 200]
type = ChangeState
trigger1 = AnimTime=0
value = 50
ctrl = 1

;■■■■■■■
;エリアルスパイク
[statedef 720]
type = A
physics = N
movetype=A
ctrl = 0
velset = ifelse(fvar(9),fvar(9)*0+fvar(8),Vel X),vel Y
movehitpersist=1

;援軍ヒットキャンセル
[state 100]
type = Helper
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = !(movecontact&&(prevstateno=[600,610]))
id = 7710
stateno = 7710
pos = 0,const(size.mid.pos.y)
postype = P1
pausemovetime=20
supermovetime=20
ignorehitpause=1

;援軍ヒットキャンセル
[state 100]
type = VarSet
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = !(movecontact&&(prevstateno=[600,610]))
fvar(5) = 0

;援軍ヒットキャンセル
[state 100]
type = VarSet
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = !(movecontact&&(prevstateno=[600,610]))
var(15) = 0

;援軍ヒットキャンセル
[state 100]
type = MoveHitReset
trigger1 = !time

[state 200]
type = ChangeAnim
trigger1 = Time=0&&!(var(34)=stateno&&((prevstateno=[130,132])||(prevstateno=150||prevstateno=152)))
value = 720

;着地硬直設定
[state 600]
type = varadd
trigger1 = !time&&var(5)%256<128
var(5) = 128

[state 600]
type = VelSet
trigger1 = (prevstateno=[110,115])&&time<0
y = 0

[state 600]
type = VelAdd
trigger1 = !((prevstateno=[110,115])&&time<0)&&!(var(52)>0&&movecontact)
y = ifelse(var(1)%4>=2&&var(1)%2<1,.5,const(movement.yaccel))*ifelse(var(5)%2>=1,1.08,1.0)*ifelse(var(5)%4>=2||var(5)%8>=4,.95,1.0)*ifelse(fvar(10)>0&&var(1)%2>=1,.9,1.0)*2.0*const(size.yscale)

[state 600]
type = VelSet
trigger1 = !Time&&(prevstateno=[110,115])
x = fvar(8)+fvar(9)

[state 600]
type = VarSet
trigger1 = !Time&&(prevstateno=[110,115])
fvar(8) = fvar(8)

[state 600]
type = VelSet
trigger1 = !Time&&(prevstateno!=[110,115])&&var(5)%8>=4
trigger1 = (fvar(8)>ifelse(var(5)%2>=1,const(velocity.runjump.fwd.x),const(velocity.jump.fwd.x))||fvar(8)<ifelse(var(5)%2>=1,const(velocity.runjump.back.x),const(velocity.jump.back.x)))
x = ifelse(fvar(8)>0,ifelse(var(5)%2>=1,const(velocity.runjump.fwd.x),const(velocity.jump.fwd.x)),ifelse(var(5)%2>=1,const(velocity.runjump.back.x),const(velocity.jump.back.x)))+fvar(9)

[state 600]
type = VarSet
trigger1 = !Time&&(prevstateno!=[110,115])&&var(5)%8>=4
fvar(8) = ifelse(fvar(8)>0,ifelse(var(5)%2>=1,const(velocity.runjump.fwd.x),const(velocity.jump.fwd.x)),ifelse(var(5)%2>=1,const(velocity.runjump.back.x),const(velocity.jump.back.x)))

[state 190]
type = PlaySND
triggerall = !Ishelper
trigger1 = AnimElemNo(2)=4&&AnimElemNo(1)=3
value = 7300,3
channel = 10

[state 190]
type = PlaySND
triggerall = !Ishelper
trigger1 = (!var(10)||var(10)>=1000)&&AnimElemNo(2)=4&&AnimElemNo(1)=3
value = 10,5+(random<500)
channel = 1

;~~~自分側のhitpause作成~~
[state 250]
type = varset
trigger1 = time=0
var(52) = 100

[state 250]
type = varadd
trigger1 = movecontact&&var(52)>=0
var(52) = -1

[state 250]
type = varset
trigger1 = movecontact=1
var(52) = 8

[state 250]
type = null;varset
trigger1 = movecontact&&((enemynear,prevstateno=[5000,5099])||(enemynear,prevstateno=[150,155]))&&P2movetype!=H&&var(52)>0
var(52) = 0

[state 250]
type = ChangeAnim
trigger1 = movecontact && var(52)>var(54)
value = anim
elem = ifelse(AnimElemNo(0)=var(47),AnimElemNo(0),AnimElemNo(-1))

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(47) = AnimElemNo(0)

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(54) = AnimElemTime(AnimElemNo(0))

[state 250]
type = PosFreeze
trigger1 = var(52)>0&&movecontact
value = 1
;~~~~~~~~~~~~~~~~~~~~~~

;>>>>>>>>>>><<<<<<<<<<<
;~~コマンド先行入力~~
[state 250]
type = varset
trigger1 = time=0
trigger2 = animtime=-1&&(var(53)!=[110,115])
var(53) = 0

;Attack Lv.4
[state 200]
type = Hitdef
trigger1 = AnimElem=4
damage = floor(ifelse(floor(60*fvar(0)*ifelse(var(1)%4>=2,.5,1.0))<1,1+(var(2)%5=4),floor(60*fvar(0)*ifelse(var(1)%4>=2,.5,1.0)))*1.22)
ground.slidetime = 17+(P2statetype=C)
ground.hittime = 17+(P2statetype=C)
guard.slidetime = 15
guard.hittime = 15
pausetime = 1,8
ground.velocity = -13.5*(1.0+ifelse(var(2)>31,31,var(2))*.02)*const(size.xscale)
guard.velocity = ifelse(numtarget(920),-44,-13.5)*const(size.xscale)
ground.cornerpush.veloff = 0
air.velocity = ifelse(var(1)%8>=4||var(1)%2>=1,-10.0*const(size.xscale)-.0008,-10),6
airguard.velocity = -6*const(size.xscale),-2*const(size.yscale)
air.cornerpush.veloff = 0
yaccel = 1.0*const(size.yscale)
fall.recover = ifelse(var(6)%10>0||var(28)>0,0,1)
fall.recovertime = ifelse(var(49)&&!var(2),49+8,32-ifelse(floor(var(14)/55)>9,9,floor(var(14)/55))+8)
hitsound = s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,5)
guardsound = s7000,4
getpower = floor(ifelse(var(9),0,floor(80*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2))*1.250*fvar(16))),floor(ifelse(var(9),0,ceil(80*fvar(0)/fvar(2)*1.0/8)*1.250*fvar(16)))
givepower = floor(80*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2)*.8)*1.250,floor(80*fvar(0)/fvar(2)*.8*1.0/8)*1.250
fall = 0
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-140*const(size.xscale))
animtype = High
ground.type = High
attr = A,NA
hitflag = MAFD
guardflag = HA
persistent=0

[state 200]
type = AttackDist
trigger1 = AnimElem=5
value = 0

;エリアル中
[state -2]
type = varset
trigger1 = animelem=4,>=0&&animelem=6,<0&&!movecontact&&var(1)%2<1&&var(1)%8<4&&var(1)%4>=2&&floor(fvar(26))=91000
fvar(26) = ifelse(floor(var(4)/10000)=0,floor(P2bodydist Y),90000)

[state -2]
type = targetbind
trigger1 = movecontact=1&&var(1)%2<1&&var(1)%8<4&&var(1)%4>=2&&floor(var(4)/10000)=0&&floor(fvar(26))<90000
pos = floor(P2dist X),floor(fvar(26))

[state -2]
type = VarAdd
trigger1 = var(1)%4>=2 && movecontact=1 && !var(2)
var(1) = -2
ignorehitpause=1

[state -2]
type = VelSet
trigger1 = var(1)%4>=2 && var(1)%2<1 && movecontact=1
y = -9.0*const(size.yscale)
ignorehitpause=1

;ヒットによる増加(スタイリッシュポイント)
[state -2]
type = varadd
trigger1 = movehit=1
fvar(15) = .00005*ifelse(floor(60*fvar(0)*ifelse(var(1)%4>=2,.5,1.0))<1,1+(var(2)%5=4),floor(60*fvar(0)*ifelse(var(1)%4>=2,.5,1.0))*1.22)
ignorehitpause=1

[state -2]
type = varset
trigger1 = movehit=1
fvar(14) = fvar(1)*fvar(2)*fvar(3)*fvar(4)
ignorehitpause=1

;◇◇ヒットスパーク◇◇
[state 240]
type = VarSet
trigger1 = AnimElem=4
var(16) = 5
persistent=0

;X座標
[state 240]
type = VarSet
trigger1 = AnimElem=4,>=0&&AnimElem=5,<0
var(17) = floor(ifelse(P2dist X>172*const(size.xscale),172*const(size.xscale),floor(P2dist X)+ifelse((P2dist X=[1,30]),10,-10)+10))

;Y座標
[state 240]
type = VarSet
trigger1 = AnimElem=4,>=0&&AnimElem=5,<0
var(18) = floor(ifelse(P2bodydist Y<-40,-120,-50+ifelse(P2bodydist Y>0,0,P2bodydist Y))*const(size.yscale))

;・・・・自分側ヒットバック・・・・
;ヒットバック量取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = var(1)%2<1&&var(1)%8<4&&target,time=0
fvar(5) = ifelse(((var(3)&&target,statetype=A)||movehit)&&var(6)%10<1,-9.0*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.06),-13.5*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.1))*const(size.xscale)
ignorehitpause=1

;ヒットバック量取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2>=1||var(1)%8>=4)&&target,time=1
fvar(5) = (-13.5*1.25*((enemynear,backedgebodydist<=5||enemynear,frontedgebodydist<=5||var(1)%8>=4)&&fvar(10)<=0)*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.1))*const(size.xscale)
ignorehitpause=1

;ヒットバック時間取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2<1&&var(1)%8<4&&target,time=0)||((var(1)%2>=1||var(1)%8>=4)&&target,time=1)
fvar(6) = ifelse(moveguarded,15,17+(P2statetype=C))
ignorehitpause=1

;ヒットポーズ取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2<1&&var(1)%8<4&&target,time=0)||((var(1)%2>=1||var(1)%8>=4)&&target,time=1)
fvar(7) = (ifelse(var(1)%4>=2,8,13)-(var(1)%2>=1||var(1)%8>=4))*ifelse(moveguarded,-1,1)
ignorehitpause=1
;・・・・・・・・

[state 200]
type = ChangeState
trigger1 = Vel Y>0 && Pos Y>=-Vel Y && !(var(52)>0&&movecontact) && !IsHelper
value = 52

[state 200]
type = ChangeState
trigger1 = AnimTime=0
value = 50
ctrl = 1

;■■■■■■■
;通常投げ
;(発生4F)
[statedef 800]
type = S
physics = S
movetype=A
ctrl = 0
velset = ifelse(fvar(2),fvar(2),vel x),0
anim = 800

[state 200]
type = VarSet
trigger1 = !time&&P2dist X<0&&(prevstateno=52||((prevstateno=[200,1999])&&fvar(10)<=0))
fvar(9) = -fvar(9)

[state 200]
type = Turn
trigger1 = !time&&P2dist X<0&&(prevstateno=52||(prevstateno=[200,1999]))

[state 190]
type = PlaySND
trigger1 = AnimElemNo(1)=3&&AnimElemNo(0)=2
value = 7300,0
channel = 10

[State 0, HitDef]
type = HitDef
triggerall = !(P2stateno=40&&enemynear,time>=1)
triggerall = (P2stateno!=[150,155])
trigger1 = AnimElem=3,>=0&&AnimElem=4,<0
damage = floor(ifelse(floor(50*fvar(0)*ifelse(var(1)%4>=2,.5,1.0))<1,1+(var(2)%5=4),floor(50*fvar(0)*ifelse(var(1)%4>=2,.5,1.0)))*1.22)
attr = S,NT
hitflag = M-
priority = 1,Miss
getpower = 0,0
givepower = 0,0
sparkno = -1
guard.sparkno = -1
sparkxy = 0,0
hitsound = s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,5)
guardsound = -1
p1stateno=801
p1facing = ifelse((command="holdback"&&!var(59))||(ifelse(facing=1,-(helper(30005),pos x-pos x),helper(30000),pos x-pos x)<(160+const(size.ground.back))&&var(59)),-1,1)
p2facing=1

[State 0, HitDef]
type = HitDef
triggerall = !(P2stateno=40&&enemynear,time>=1)
triggerall = (P2stateno!=[150,155])&&enemynear,anim=5300
trigger1 = AnimElem=3,>=0&&AnimElem=4,<0
damage = floor(ifelse(floor(50*fvar(0)*ifelse(var(1)%4>=2,.5,1.0))<1,1+(var(2)%5=4),floor(50*fvar(0)*ifelse(var(1)%4>=2,.5,1.0)))*1.22)
attr = S,NT
hitflag = M+
priority = 1,Miss
getpower = 0,0
givepower = 0,0
sparkno = -1
guard.sparkno = -1
sparkxy = 0,0
hitsound = s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,5)
guardsound = -1
p1stateno=801
p1facing = ifelse((command="holdback"&&!var(59))||(ifelse(facing=1,-(helper(30005),pos x-pos x),helper(30000),pos x-pos x)<(160+const(size.ground.back))&&var(59)),-1,1)
p2facing=1
kill = 0

[state 3100]
type = Attackdist
trigger1 = 1
value = 0

;戻り動作
[state 1000]
type = AttackDist
trigger1 = AnimElem=4
value = 0

;◇◇ヒットスパーク◇◇
[state 240]
type = VarSet
trigger1 = AnimElem=3
var(16) = 5
persistent=0

;X座標
[state 240]
type = VarSet
trigger1 = AnimElem=3,>=0&&AnimElem=4,<0
var(17) = floor(162*const(size.xscale))*ifelse((command="holdback"&&!var(59))||(ifelse(facing=1,-(helper(30005),pos x-pos x),helper(30000),pos x-pos x)<(160+const(size.ground.back))&&var(59)),-1,1)

;Y座標
[state 240]
type = VarSet
trigger1 = AnimElem=3,>=0&&AnimElem=4,<0
var(18) = floor(-140*const(size.yscale))

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

;■■■■■■■
;通常投げ掴み
[statedef 801]
type = S
physics = S
movetype=A
ctrl = 0
velset = 0,0
anim = 801

[state 800]
type = varset
trigger1 = !time
fvar(8) = 0

[state 800]
type = varset
trigger1 = !time
fvar(9) = 0

[state 800]
type = varset
trigger1 = !time
fvar(10) = 0

;気絶値リセット
[state 801]
type = varset
trigger1 = !time
var(29) = 0

[state 190]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&AnimElem=6
value = 10,27
channel = 1

[state 801]
type = targetstate
trugger1 = numtarget
trigger1 = time=0||(target,stateno!=806&&animelemtime(7)<0)
value = 806

[state 801]
type = Width
trigger1 = animelemtime(4)<0
edge = floor(180*const(size.xscale)),0

[state 801]
type = Width
trigger1 = animelemtime(7)=0
edge = floor(190*const(size.xscale)),0

[state 801]
type = targetbind
trigger1 = animelemtime(4)<0
pos = floor(180*const(size.xscale)),0

[state 801]
type = targetbind
trigger1 = animelemtime(4)>=0&&animelemtime(5)<0
pos = floor(176*const(size.xscale)),-floor(252*const(size.yscale))

[state 801]
type = targetbind
trigger1 = animelemtime(5)>=0&&animelemtime(10)<0
pos = floor(132*const(size.xscale)),-floor(302*const(size.yscale))-target,const(size.mid.pos.y)

[state 801]
type = targetbind
trigger1 = animelemtime(10)=0
pos = floor(132*const(size.xscale)),-floor(302*const(size.yscale))-target,const(size.mid.pos.y)

[state 801]
type = targetstate
trigger1 = animelemtime(10)=0
value = 807

;ヒットによる増加(スタイリッシュポイント)
[state -2]
type = varadd
trigger1 = animelemtime(1)=0
fvar(15) = .00005*floor(ifelse(50*fvar(14)<1,1+(var(2)%5=1),50*fvar(14))*1.22)
ignorehitpause=1

[state -2]
type = varset
trigger1 = animelemtime(1)=0
fvar(14) = fvar(1)*fvar(2)*fvar(3)*fvar(4)
ignorehitpause=1

;魂中の与ダメージ
[state -2]
type = varadd
trigger1 = animelemtime(1)=0
var(37) = ceil(floor(50*fvar(0)*1.22)*target,const(data.defence)*const(data.attack)/100)
ignorehitpause=1

[state 190]
type = EnvShake
trigger1 = animelemtime(10)=0
ampl = 4
time = 12

;~~~自分側のhitpause作成~~
[state 250]
type = varset
trigger1 = time=0
var(52) = 100

[state 250]
type = varadd
trigger1 = movecontact&&var(52)>=0
var(52) = -1

[state 250]
type = varset
trigger1 = movecontact=1
var(52) = 14

[state 250]
type = null;varset
trigger1 = movecontact&&((enemynear,prevstateno=[5000,5099])||(enemynear,prevstateno=[150,155]))&&P2movetype!=H&&var(52)>0
var(52) = 0

[state 250]
type = ChangeAnim
trigger1 = (movecontact||var(19)) && var(52)>var(54) && var(52)<100
value = anim
elem = ifelse(AnimElemNo(0)=var(47),AnimElemNo(0),AnimElemNo(-1))

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(47) = AnimElemNo(0)

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(54) = AnimElemTime(AnimElemNo(0))

[state 250]
type = PosFreeze
trigger1 = var(52)>0&&(movecontact||var(19))
value = 1
;~~~~~~~~~~~~~~~~~~~~~~

;Attack Lv.5
[state 200]
type = Hitdef
triggerall = (var(52)<=0||var(52)=100)
trigger1 = AnimElem=10
damage = floor(ifelse(floor(80*fvar(0))<1,1+(var(2)%5=4),floor(80*fvar(0)))*1.22)
ground.slidetime = 20+(P2statetype=C)
ground.hittime = 20+(P2statetype=C)
guard.slidetime = 18
guard.hittime = 18
pausetime = 1,14+var(49)*7
ground.velocity = -8.0*const(size.xscale),(-11.0-.9)*const(size.yscale)
guard.velocity = ifelse(numtarget(920),-44,-15.0)*const(size.xscale)
ground.cornerpush.veloff = 0
air.velocity = ifelse(var(1)%8>=4||var(1)%2>=1,-10.0*(1.0+ifelse(var(2)>31,31,var(2))*.05)-.0013,-8.0*(1.0+ifelse(var(3)>31,31,var(3))*.04)*const(size.xscale)),ifelse(var(6)%10>0,var(6)%10*1.5,(-11.0*(51-var(3))/51-.9)*const(size.yscale))
airguard.velocity = -6*const(size.xscale),-2*const(size.yscale)
air.cornerpush.veloff = 0
yaccel = .9*const(size.yscale)
fall.recover = 0
hitsound = s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,2)
guardsound = s7000,2
getpower = floor(ifelse(var(9),0,floor(80*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2))*1.250*fvar(16))),floor(ifelse(var(9),0,ceil(80*fvar(0)/fvar(2)*1.0/8)*1.250*fvar(16)))
givepower = floor(80*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2)*.8)*1.250,floor(80*fvar(0)/fvar(2)*.8*1.0/8)*1.250
fall = 1
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-50*const(size.xscale))
animtype = Hard
ground.type = High
attr = S,NA
hitflag = MAFD
guardflag = MA
palfx.time=40+14
palfx.sinadd = 96,48,0,4
palfx.color = 0
palfx.add = 56,-96,-208
palfx.invertall = 1
envshake.time = 16
envshake.ampl = 4

[state ]
type=displaytoclipboard
trigger1=movehit=1&&numprojid(3621)
trigger1=enemynear,id=enemy,id
ignorehitpause=1
params=const(data.sparkno)+352
text="%n"
[state ]
type=displaytoclipboard
trigger1=movehit=1&&numprojid(3621)
trigger1=enemynear,id=enemy,id
ignorehitpause=1
params=const(data.sparkno)+3620
text="%n"
[state ]
type=displaytoclipboard
trigger1=movehit=1&&numenemy=2&&numprojid(3621)
trigger1=enemynear,id=enemy(1),id
ignorehitpause=1
params=const(data.guard.sparkno)+352
text="%n"
[state ]
type=displaytoclipboard
trigger1=movehit=1&&numenemy=2&&numprojid(3621)
trigger1=enemynear,id=enemy(1),id
ignorehitpause=1
params=const(data.guard.sparkno)+3620
text="%n"

[state 200]
type = AttackDist
trigger1 = AnimElem=11
value = 0

;ヒットによる増加(スタイリッシュポイント)
[state -2]
type = varadd
trigger1 = movehit=1
fvar(15) = .00005*floor(ifelse(80*fvar(14)<1,1+(var(2)%5=1),80*fvar(14))*1.22)
ignorehitpause=1

[state -2]
type = varset
trigger1 = movehit=1
fvar(14) = fvar(1)*fvar(2)*fvar(3)*fvar(4)
ignorehitpause=1

;◇◇ヒットスパーク◇◇
[state 240]
type = VarSet
trigger1 = AnimElem=10
var(16) = 1
persistent=0

;X座標
[state 240]
type = VarSet
trigger1 = AnimElem=10,>=0&&AnimElem=11,<0
var(17) = floor(ifelse(P2dist X>112*const(size.xscale),112*const(size.xscale),floor(P2dist X)+ifelse((P2dist X=[1,30]),10,-10)+10))

;Y座標
[state 240]
type = VarSet
trigger1 = AnimElem=10,>=0&&AnimElem=11,<0
var(18) = floor(-302*const(size.yscale))
;~~~~~~~~~~~

;強制基底補正50%
[state -1]
type = varadd
trigger1 = animelemtime(10)=0&& var(8)%8<4
var(8) = 4
ignorehitpause=1

[state 3100]
type = Attackdist
trigger1 = 1
value = 0

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

;■■■■■■■
;通常投げ食らい
[statedef 806]
type = S
physics = N
movetype=H
ctrl = 0
velset = 0,0
sprpriority = 2

[state 806]
type = ScreenBound
trigger1 = 1
value = 1

[state 806]
type = ChangeAnim2
trigger1 = time=0
value = 806

[state 806]
type = ChangeAnim
trigger1 = Anim=806&&AnimElemTime(4)>=0
trigger2 = Anim=5070
value = 5070

[state 806]
type = SelfState
trigger1 = time>=180
value = 5000

;■■■■■■■
;通常投げ食らい（吹き飛び）
[statedef 807]
type = A
physics = N
movetype=H
ctrl = 0
velset = 0,0
sprpriority = 2

[state 806]
type = ChangeAnim2
trigger1 = time=0
value = 5050

[state 806]
type = VelSet
trigger1 = Time=8
x = -4.0
y = -7.0

[state 806]
type = VelAdd
trigger1 = Time>8
y = .45

[state 806]
type = ChangeState
trigger1 = Vel Y>0&&Pos Y>=-Vel Y
value = 15100

;吹き飛ばし攻撃
[statedef 900]
type = S
movetype = A
physics = S
ctrl = 0
velset = ifelse(fvar(9),fvar(9)*0,0),0
movehitpersist=1

[state 200]
type = VarSet
trigger1 = !time&&P2dist X<0&&(prevstateno=52||((prevstateno=[200,1999])&&fvar(10)<=0))
fvar(9) = -fvar(9)

[state 200]
type = Turn
trigger1 = !time&&P2dist X<0&&(prevstateno=52||(prevstateno=[200,1999]))

;援軍ヒットキャンセル
[state 100]
type = Helper
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = !(prevstateno=200&&movecontact)
id = 7710
stateno = 7710
pos = 0,const(size.mid.pos.y)
postype = P1
pausemovetime=20
supermovetime=20
ignorehitpause=1

;援軍ヒットキャンセル
[state 100]
type = VarSet
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = !(prevstateno=200&&movecontact)
fvar(5) = 0

;援軍ヒットキャンセル
[state 100]
type = VarSet
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = !(prevstateno=200&&movecontact)
var(15) = 0

;援軍ヒットキャンセル
[state 100]
type = MoveHitReset
trigger1 = !time

;速度取得
[state -2]
type = varset
trigger1 = !time
fvar(8) = 0
ignorehitpause=1

;先行入力処理リセット
[state 200]
type = VarSet
trigger1 = !Time
trigger2 = animtime=-1&&(var(53)!=[110,115])
var(53) = 0

[state 200]
type = ChangeAnim
trigger1 = Time=0&&!(var(34)=stateno&&((prevstateno=[130,132])||(prevstateno=150||prevstateno=152)))
value = 900

;◇◇溜め用◇◇
[state 220]
type = varset
trigger1 = time=0&&(prevstateno!=[130,154])
var(7) = 0

[state 220]
type = varadd
trigger1 = var(7)<120&&((command="hold_y"&&command="hold_z"&&!var(59))||(random<0&&var(59)))
trigger1 = (anim=905&&var(7))||(animelemtime(4)=0&&!var(7))
var(7) = 1

[state 220]
type = ChangeAnim
trigger1 = anim=900&&animelemtime(4)=0&&var(7)&&var(7)<=120
trigger1 = ((command="hold_y"&&command="hold_z"&&!var(59))||(random<0&&var(59)))
value = 905
persistent=0

[state 220]
type = ChangeAnim
trigger1 = (command!="hold_y"||command!="hold_z"||var(7)>=120)&&var(7)
value = 900
elem = 4
persistent=0

;溜めエフェクト
[state -2]
type = Helper
trigger1 = var(7)%8=1 &&anim=905
id = 7770
stateno=7770
pos = 0,0
postype = P1
ownpal = 1
facing=facing
pausemovetime=999999
supermovetime=999999

[state 220]
type = PalFX
trigger1 = anim=905&&(var(7)=[60,68])
add = 255-(var(7)-60)*30,255-(var(7)-60)*30,255-(var(7)-60)*30
time = 1
;~~~~~

[state 190]
type = PlaySND
trigger1 = AnimElemNo(2)=12&&AnimElemNo(1)=11&&AnimElemNo(0)<=11
value = 7300,3
channel = 10

[state 190]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&AnimElemNo(2)=12&&AnimElemNo(1)=11&&AnimElemNo(0)<=11
value = 10,9
channel = 1

[state 900]
type = StatetypeSet
trigger1 = AnimElem=8
physics = N

[state 900]
type = VelSet
trigger1 = !fvar(9)&&AnimElem=8
x = 5.0

[state 900]
type = VelMul
trigger1 = AnimElem=8,>0
x = .9

;現在の速度取得
[state 900]
type = VarSet
trigger1 = AnimElem=8
fvar(8) = 5.0

[state 900]
type = VarSet
trigger1 = AnimElem=8,>0
fvar(8) = fvar(8)*.9

;~~~自分側のhitpause作成~~
[state 250]
type = varset
trigger1 = time=0
var(52) = 100

[state 250]
type = varadd
trigger1 = movecontact&&var(52)>=0
var(52) = -1

[state 250]
type = varset
trigger1 = movecontact=1
var(52) = 13+(var(7)>=60)

[state 250]
type = null;varset
trigger1 = movecontact&&((enemynear,prevstateno=[5000,5099])||(enemynear,prevstateno=[150,155]))&&P2movetype!=H&&var(52)>0
var(52) = 0

[state 250]
type = ChangeAnim
trigger1 = (movecontact||var(19)) && var(52)>var(54) && var(52)<100
value = anim
elem = ifelse(AnimElemNo(0)=var(47),AnimElemNo(0),AnimElemNo(-1))

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(47) = AnimElemNo(0)

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(54) = AnimElemTime(AnimElemNo(0))

[state 250]
type = PosFreeze
trigger1 = var(52)>0&&(movecontact||var(19))
value = 1
;~~~~~~~~~~~~~~~~~~~~~~

;Attack Lv.4
[state 200]
type = Hitdef
triggerall = !movecontact&&!movereversed
trigger1 = AnimElem=12
damage = floor(ifelse(60*fvar(0)<1,1+(var(2)%5=4),60*fvar(0))*1.22)
ground.slidetime = 17+(P2statetype=C)
ground.hittime = 17+(P2statetype=C)
guard.slidetime = 15
guard.hittime = 15
pausetime = 1,13+var(49)*7
ground.velocity = -22*const(size.xscale),-11*const(size.yscale)
guard.velocity = -13.5*const(size.xscale)
ground.cornerpush.veloff = 0
air.velocity = ifelse(var(1)%2>=1||var(1)%16<8,-10.0*(1.0+ifelse(var(2)>31,31,var(2))*.05)-.0013,-7*(1.0+ifelse(var(3)>31,31,var(3))*.04)*const(size.xscale)),ifelse(var(6)%10>0,var(6)%10*1.5,(-10.0*(51-var(3))/51-.9)*const(size.yscale))
airguard.velocity = -6*const(size.xscale),-2*const(size.yscale)
air.cornerpush.veloff = 0
yaccel = .9*const(size.yscale)
fall.recover = ifelse(var(6)%10>0||var(28)>0,0,1)
fall.recovertime = ifelse(var(49)&&!var(2),37+10,20-ifelse(floor(var(14)/55)>9,9,floor(var(14)/55))+10)
hitsound = s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,5)
guardsound = s7000,4
getpower = floor(ifelse(var(9),0,floor(70*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2))*1.250*fvar(16))),floor(ifelse(var(9),0,ceil(70*fvar(0)/fvar(2)*1.0/8)*1.250*fvar(16)))
givepower = floor(70*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2)*.8)*1.250,floor(70*fvar(0)/fvar(2)*.8*1.0/8)*1.250
fall = 1
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-180*const(size.xscale))
animtype = High
ground.type = High
attr = S,NA
hitflag = MAFD
guardflag = M

;Attack Lv.5
[state 200]
type = Hitdef
triggerall = !movecontact&&!movereversed
triggerall = var(7)>=60
trigger1 = AnimElem=12
damage = floor(ifelse(60*fvar(0)<1,1+(var(2)%5=4),60*fvar(0))*1.22)
ground.slidetime = 20+(P2statetype=C)
ground.hittime = 20+(P2statetype=C)
guard.slidetime = 18
guard.hittime = 18
pausetime = 1,14+var(49)*7
ground.velocity = -22*const(size.xscale),-11*const(size.yscale)
guard.velocity = -44*const(size.xscale)
ground.cornerpush.veloff = 0
air.velocity = ifelse(var(1)%8>=4||var(1)%2>=1||var(1)%16<8,-11.0*(1.0+ifelse(var(2)>31,31,var(2))*.1)-.0014,-7*(1.0+ifelse(var(3)>31,31,var(3))*.04)*const(size.xscale)),ifelse(var(6)%10>0,var(6)%10*1.5,(-10.0*(51-var(3))/51-.9)*const(size.yscale))
airguard.velocity = -6*const(size.xscale),-2*const(size.yscale)
air.cornerpush.veloff = 0
yaccel = .9*const(size.yscale)
fall.recover = ifelse(var(6)%10>0||var(28)>0,0,1)
fall.recovertime = ifelse(var(49)&&!var(2),43+10,24-ifelse(floor(var(14)/45)>10,10,floor(var(14)/45))+10)
hitsound = s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,5)
guardsound = s7000,4
getpower = floor(ifelse(var(9),0,floor(70*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2))*1.250*fvar(16))),floor(ifelse(var(9),0,ceil(70*fvar(0)/fvar(2)*1.0/8)*1.250*fvar(16)))
givepower = floor(70*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2)*.8)*1.250,floor(70*fvar(0)/fvar(2)*.8*1.0/8)*1.250
fall = 1
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-180*const(size.xscale))
animtype = High
ground.type = High
attr = S,NA
hitflag = MAFD
guardflag = M
ID = 920

;==壁ダウンに
[state 920]
type = varadd
trigger1 = movehit=1 && numtarget && var(6)%10=0
trigger1 = target,time=0
var(1) = ifelse(var(7)<60&&var(1)%2<1&&var(1)%16<8,4+8,ifelse(var(1)%2<1&&var(7)>=60,1,0))-(var(1)%16>=8&&var(1)%8>=4)*4
ignorehitpause=1
persistent=0

[state 900]
type = TargetState
trigger1 = movehit=1 && numtarget && var(6)%10=0 && (var(1)%2>=1||var(1)%8>=4)
trigger1 = target,time=0
value = ifelse(var(7)<60&&var(1)%2<1,936,926)
ignorehitpause=1
persistent=0

[state 200]
type = VarSet
trigger1 = !Time
var(53) = 0

;ジャンプ・ハイジャンプ
[state 250]
type = varset
trigger1 = !var(53) && var(52)>0 && movecontact && var(7)<60 && !var(59)
var(53) = ifelse(var(0)<10 && command="longjump",50,ifelse(command="holdup",40,var(53)))+ifelse(command="holdback",2,ifelse(command="holdfwd",1,0))
ignorehitpause=1

;ブースト
[state 900]
type = VarSet
triggerall = (movehit||(moveguarded&&var(7)>=60)) && var(52)>0 && movecontact
trigger1 = command="holdfwd"&&command!="holdup"&&command!="holddown"&&!var(59)
var(53) = 2000+ifelse(var(53)=40||var(53)=50,var(53),0)

;ブースト
[state 900]
type = ChangeState
triggerall = (movehit||(moveguarded&&var(7)>=60))&&!(var(52)>0&&movecontact) && (var(1)%2>=1||var(1)%8>=4)
trigger1 = (command="holdfwd"||(var(53)=[2000,2050]))&&!var(59)
trigger2 = var(59)
value = 2000

;ジャンプ
[state 900]
type = ChangeState
triggerall = movecontact&&!(var(52)>0&&movecontact)
trigger1 = (command="up"||command="fwdup"||command="backup"||(var(53)=[40,42])||(var(53)=[50,52]))&&!var(59)
trigger2 = var(1)%2<1&&var(59)
value = 40

[state 200]
type = AttackDist
trigger1 = AnimElem=13
value = 0

;ヒットによる増加(スタイリッシュポイント)
[state -2]
type = varadd
trigger1 = movehit=1
fvar(15) = .00005*floor(ifelse(60*fvar(14)<1,1+(var(2)%5=1),60*fvar(14))*1.22)
ignorehitpause=1

[state -2]
type = varset
trigger1 = movehit=1
fvar(14) = fvar(1)*fvar(2)*fvar(3)*fvar(4)
ignorehitpause=1

;◇◇ヒットスパーク◇◇
[state 240]
type = VarSet
trigger1 = AnimElem=12
var(16) = 5
persistent=0

;X座標
[state 240]
type = VarSet
trigger1 = AnimElem=12,>=0&&AnimElem=13,<0
var(17) = floor(ifelse(P2dist X>244*const(size.xscale),244*const(size.xscale),floor(P2dist X)+ifelse((P2dist X=[1,30]),10,-10)+10))

;Y座標
[state 240]
type = VarSet
trigger1 = AnimElem=12,>=0&&AnimElem=13,<0
var(18) = floor(-120*const(size.yscale))

;・・・・自分側ヒットバック・・・・
;ヒットバック量取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = var(1)%2<1&&var(1)%8<4&&target,time=0
fvar(5) = (ifelse(var(7)>=60,-15.0,-13.5)*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.1))*const(size.xscale)
ignorehitpause=1

;ヒットバック量取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2>=1||var(1)%8>=4)&&target,time=1
fvar(5) = (ifelse(var(7)>=60,-15.0,-13.5)*1.25*((enemynear,backedgebodydist<=5||enemynear,frontedgebodydist<=5||var(1)%8>=4)&&fvar(10)<=0)*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.1))*const(size.xscale)
ignorehitpause=1

;ヒットバック時間取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2<1&&var(1)%8<4&&target,time=0&&var(6))||((var(1)%2>=1||var(1)%8>=4)&&target,time=1)
fvar(6) = ifelse(var(7)>=60,ifelse(moveguarded,18,20+(P2statetype=C)),ifelse(moveguarded,15,17+(P2statetype=C)))
ignorehitpause=1

;ヒットポーズ取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2<1&&var(1)%8<4&&target,time=0&&var(6))||((var(1)%2>=1||var(1)%8>=4)&&target,time=1)
fvar(7) = (ifelse(var(7)>=60,14,13)-(var(1)%2>=1||var(1)%8>=4))*ifelse(moveguarded,-1,1)
ignorehitpause=1
;・・・・・・・・

[state 2000]
type = ChangeState
trigger1 = Anim=900&&AnimTime=0
value = 0
ctrl = 1


;エリアル攻撃
[statedef 910]
type = S
movetype = A
physics = S
ctrl = 0
velset = ifelse(fvar(9),fvar(9)*0,0),0
movehitpersist=1

[state 200]
type = VarSet
trigger1 = !time&&P2dist X<0&&(prevstateno=52||((prevstateno=[200,1999])&&fvar(10)<=0))
fvar(9) = -fvar(9)

[state 200]
type = Turn
trigger1 = !time&&P2dist X<0&&(prevstateno=52||(prevstateno=[200,1999]))

;援軍ヒットキャンセル
[state 100]
type = Helper
trigger1 = !time&&var(15)>0&&(prevstateno!=[100,140])&&(prevstateno=[195,1999])
id = 7710
stateno = 7710
pos = 0,const(size.mid.pos.y)
postype = P1
pausemovetime=20
supermovetime=20
ignorehitpause=1

;援軍ヒットキャンセル
[state 100]
type = VarSet
trigger1 = !time&&var(15)>0&&(prevstateno!=[100,140])&&(prevstateno=[195,1999])
var(15) = 0

;援軍ヒットキャンセル
[state 100]
type = MoveHitReset
trigger1 = !time

;速度取得
[state -2]
type = varset
trigger1 = !time
fvar(8) = 0
ignorehitpause=1

;先行入力処理リセット
[state 200]
type = VarSet
trigger1 = !Time
trigger2 = animtime=-1&&(var(53)!=[110,115])
var(53) = 0

[state 200]
type = ChangeAnim
trigger1 = Time=0&&!(var(34)=stateno&&((prevstateno=[130,132])||(prevstateno=150||prevstateno=152)))
value = 910

[state 190]
type = PlaySND
trigger1 = AnimElemNo(2)=7&&AnimElemNo(1)=6&&AnimElemNo(0)=6
value = 7300,3
channel = 10

[state 190]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&AnimElemNo(2)=7&&AnimElemNo(1)=6&&AnimElemNo(0)=6
value = 10,5+(random<500)
channel = 1

[state 910]
type = RemoveExplod
trigger1 = AnimElem=7
trigger2 = AnimElem=8
trigger3 = AnimElem=9
trigger4 = AnimElem=10
trigger5 = AnimElem=11
trigger6 = AnimElem=11,=2
trigger7 = AnimElem=12
trigger8 = AnimElem=12,=2
trigger9 = AnimElem=13
id = 6050

[state 910]
type = Explod
trigger1 = AnimElem=7
id = 6050
anim = 6050
pos = floor(120*const(size.xscale)),0
postype = p1
bindtime = -1
removeongethit=1
scale = .75,.75
sprpriority = 3

[state 910]
type = Explod
trigger1 = AnimElem=8
id = 6050
anim = 6051
pos = floor(120*const(size.xscale)),0
postype = p1
bindtime = -1
removeongethit=1
scale = .75,.75
sprpriority = 3

[state 910]
type = Explod
trigger1 = AnimElem=9
id = 6050
anim = 6052
pos = floor(120*const(size.xscale)),0
postype = p1
bindtime = -1
removeongethit=1
scale = .75,.75
sprpriority = 3

[state 910]
type = Explod
trigger1 = AnimElem=10
id = 6050
anim = 6053
pos = floor(120*const(size.xscale)),0
postype = p1
bindtime = -1
removeongethit=1
scale = .75,.75
sprpriority = 3

[state 910]
type = Explod
trigger1 = AnimElem=11
id = 6050
anim = 6054
pos = floor(120*const(size.xscale)),0
postype = p1
bindtime = -1
removeongethit=1
scale = .75,.75
sprpriority = 3

[state 910]
type = Explod
trigger1 = AnimElem=11,=2
id = 6050
anim = 6055
pos = floor(120*const(size.xscale)),0
postype = p1
bindtime = -1
removeongethit=1
scale = .75,.75
sprpriority = 3

[state 910]
type = Explod
trigger1 = AnimElem=12
id = 6050
anim = 6056
pos = floor(120*const(size.xscale)),0
postype = p1
bindtime = -1
removeongethit=1
scale = .75,.75
sprpriority = 3

[state 910]
type = Explod
trigger1 = AnimElem=12,=2
id = 6050
anim = 6057
pos = floor(120*const(size.xscale)),0
postype = p1
bindtime = -1
removeongethit=1
scale = .75,.75
sprpriority = 3

;~~~自分側のhitpause作成~~
[state 250]
type = varset
trigger1 = time=0
var(52) = 100

[state 250]
type = varadd
trigger1 = movecontact&&var(52)>=0
var(52) = -1

[state 250]
type = varset
trigger1 = movecontact=1
var(52) = 13

[state 250]
type = null;varset
trigger1 = movecontact&&((enemynear,prevstateno=[5000,5099])||(enemynear,prevstateno=[150,155]))&&P2movetype!=H&&var(52)>0
var(52) = 0

[state 250]
type = ChangeAnim
trigger1 = (movecontact||var(19)) && var(52)>var(54) && var(52)<100
value = anim
elem = ifelse(AnimElemNo(0)=var(47),AnimElemNo(0),AnimElemNo(-1))

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(47) = AnimElemNo(0)

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(54) = AnimElemTime(AnimElemNo(0))

[state 250]
type = PosFreeze
trigger1 = var(52)>0&&(movecontact||var(19))
value = 1
;~~~~~~~~~~~~~~~~~~~~~~

;Attack Lv.4(1)
[state 200]
type = Hitdef
triggearll = (var(52)<=0||var(52)=100)
trigger1 = AnimElem=10
damage = floor(ifelse(60*fvar(0)<1,1+(var(2)%5=4),60*fvar(0))*1.22)
ground.slidetime = 17+(P2statetype=C)
ground.hittime = 17+(P2statetype=C)
guard.slidetime = 8
guard.hittime = 8
pausetime = 1,13+var(49)*7
ground.velocity = 0,(-21-.9)*const(size.yscale)
guard.velocity = -13.5*const(size.xscale)
ground.cornerpush.veloff = 0
air.velocity = ifelse(var(1)%8>=4||var(1)%2>=1,-10.0*(1.0+ifelse(var(2)>31,31,var(2))*.05)-.0013,ifelse(var(6)%10>0,-8,0)*const(size.xscale)),ifelse(var(6)%10>0,var(6)%10*1.5,(-21.0*(51-var(3))/51-.9)*const(size.yscale))
airguard.velocity = -6*const(size.xscale),-2*const(size.yscale)
air.cornerpush.veloff = 0
yaccel = .9*const(size.yscale)
fall.recover = ifelse(var(6)%10>0||var(28)>0,0,1)
fall.recovertime = ifelse(var(49)&&!var(2),37+13,20-ifelse(floor(var(14)/55)>9,9,floor(var(14)/55))+13)
hitsound = s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,2)
guardsound = s7000,2
getpower = floor(ifelse(var(9),0,floor(55*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2))*1.250*fvar(16))),floor(ifelse(var(9),0,ceil(55*fvar(0)/fvar(2)*1.0/8)*1.250*fvar(16)))
givepower = floor(55*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2)*.8)*1.250,floor(55*fvar(0)/fvar(2)*.8*1.0/8)*1.250
fall = 1
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-160*const(size.xscale))
animtype  = diagup
ground.type = High
attr = S,NA
hitflag = MAFD
guardflag = M
persistent=0

[state 200]
type = VarAdd
trigger1 = movehit=1&&numtarget&&var(1)%4<2&&var(6)%10<1
var(1) = 2
ignorehitpause=1

;ジャンプ・ハイジャンプ
[state 250]
type = varset
trigger1 = !var(53) && var(52)>0 && movehit && !var(59)
trigger1 = command="holdup"
var(53) = 40+ifelse(command="holdback",2,ifelse(command="holdfwd",1,0))

[state 200]
type = ChangeState
triggerall = movehit&&numtarget&&!(var(52)>0&&movecontact)
trigger1 = (command="holdup"||(var(53)=[40,42]))&&!var(59)
trigger2 = (var(3)>6||var(2)>=30)&&var(59)
value = 40

[state 200]
type = AttackDist
trigger1 = AnimElem=11
value = 0

;ヒットによる増加(スタイリッシュポイント)
[state -2]
type = varadd
trigger1 = movehit=1
fvar(15) = .00005*floor(ifelse(60*fvar(14)<1,1+(var(2)%5=1),60*fvar(14))*1.22)
ignorehitpause=1

[state -2]
type = varset
trigger1 = movehit=1
fvar(14) = fvar(1)*fvar(2)*fvar(3)*fvar(4)
ignorehitpause=1

;◇◇ヒットスパーク◇◇
[state 240]
type = VarSet
trigger1 = AnimElem=10
var(16) = 1
persistent=0

;X座標
[state 240]
type = VarSet
trigger1 = AnimElem=10,>=0&&AnimElem=11,<0
var(17) = floor(P2dist X)+ifelse((P2dist X=[1,30]),10,-10)

;Y座標
[state 240]
type = VarSet
trigger1 = AnimElem=10,>=0&&AnimElem=11,<0
var(18) = floor(-80*const(size.yscale))

;現在の速度取得
[state 240]
type = varset
trigger1 = !time
fvar(8) = 0

;・・・・自分側ヒットバック・・・・
;ヒットバック量取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = var(1)%2<1&&var(1)%8<4&&target,time=0&&(var(6)||moveguarded)
fvar(5) = (-13.5*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.1))*const(size.xscale)
ignorehitpause=1

;ヒットバック量取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2>=1||var(1)%8>=4)&&target,time=1
fvar(5) = (-13.5*1.25*((enemynear,backedgebodydist<=5||enemynear,frontedgebodydist<=5||var(1)%8>=4)&&fvar(10)<=0)*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.1))*const(size.xscale)
ignorehitpause=1

;ヒットバック時間取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2<1&&var(1)%8<4&&target,time=0&&(var(6)||moveguarded))||((var(1)%2>=1||var(1)%8>=4)&&target,time=1)
fvar(6) = ifelse(moveguarded,8,20+(P2statetype=C))
ignorehitpause=1

;ヒットポーズ取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2<1&&var(1)%8<4&&target,time=0&&(var(6)||moveguarded))||((var(1)%2>=1||var(1)%8>=4)&&target,time=1)
fvar(7) = (13-(var(1)%2>=1||var(1)%8>=4))*ifelse(moveguarded,-1,1)
ignorehitpause=1
;・・・・・・・・

[state 2000]
type = ChangeState
trigger1 = AnimTime=0
value = 0
ctrl = 1

;遠雷遥（地上）
[statedef 1000]
type = S
movetype=A
physics = S
ctrl = 0
velset = ifelse(fvar(9),fvar(9)*0,0),0

[state 200]
type = VarSet
trigger1 = !time&&P2dist X<0&&(prevstateno=52||((prevstateno=[200,1999])&&fvar(10)<=0))
fvar(9) = -fvar(9)

[state 200]
type = Turn
trigger1 = !time&&P2dist X<0&&(prevstateno=52||(prevstateno=[200,1999]))

;速度取得
[state -2]
type = varset
trigger1 = !time
fvar(8) = 0
ignorehitpause=1

;先行入力処理リセット
[state 200]
type = VarSet
trigger1 = !Time
var(53) = 0

[state 200]
type = ChangeAnim
trigger1 = Time=0&&!(var(34)=stateno&&((prevstateno=[130,132])||(prevstateno=150||prevstateno=152)))
value = 1000+(prevstateno=[200,499])*5

[state 190]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&AnimElem=5
value = 10,38
channel = 1

[state 190]
type = PlaySND
trigger1 = AnimElem=7
value = 30,0
channel = 10

;~~~自分側のhitpause作成~~
[state 250]
type = varset
trigger1 = time=0
var(52) = 100

[state 250]
type = varadd
trigger1 = movecontact&&var(52)>=0
var(52) = -1

[state 250]
type = varset
trigger1 = movecontact=1
var(52) = 11

[state 250]
type = null;varset
trigger1 = movecontact&&((enemynear,prevstateno=[5000,5099])||(enemynear,prevstateno=[150,155]))&&P2movetype!=H&&var(52)>0
var(52) = 0

[state 250]
type = ChangeAnim
trigger1 = movecontact && var(52)>var(54)
value = anim
elem = ifelse(AnimElemNo(0)=var(47),AnimElemNo(0),AnimElemNo(-1))

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(47) = AnimElemNo(0)

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(54) = AnimElemTime(AnimElemNo(0))

[state 250]
type = PosFreeze
trigger1 = var(52)>0&&movecontact
value = 1
;~~~~~~~~~~~~~~~~~~~~~~

;Attack Lv.2
[state 200]
type = Hitdef
triggerall = !movecontact&&!movereversed
trigger1 = AnimElem=6
damage = floor(floor(17*ifelse(fvar(1)<.25,.25,fvar(1))*fvar(2)*fvar(3)*fvar(4))*1.22),floor(ceil(17*fvar(3)*fvar(4)*1.0/4))
ground.slidetime = 12+(P2statetype=C)
ground.hittime = 12+(P2statetype=C)
guard.slidetime = 10
guard.hittime = 10
pausetime = 1,11+var(49)*6
ground.velocity = -10.5*(1.0+ifelse(var(2)>31,31,var(2))*.02)*const(size.xscale)
guard.velocity = ifelse(numtarget(920),-44,-10.5)*const(size.xscale)
ground.cornerpush.veloff = 0
air.velocity = ifelse(var(1)%8>=4||var(1)%2>=1,-10.0*(1.0+ifelse(var(2)>31,31,var(2))*.05)-.0011,-4.0*(1.0+ifelse(var(3)>31,31,var(3))*.04)*const(size.xscale)),ifelse(var(6)%10>0,var(6)%10*1.5,(-8.0*(51-var(3))/51-.9)*const(size.yscale))
airguard.velocity = -6*const(size.xscale),-2*const(size.yscale)
air.cornerpush.veloff = 0
yaccel = .9*const(size.yscale)
fall.recover = ifelse(var(6)%10>0||var(28)>0,0,1)
fall.recovertime = ifelse(var(49)&&!var(2),24+ifelse(var(1)%4>=2,8,11),12-ifelse(floor(var(14)/85)>6,6,floor(var(14)/85))+ifelse(var(1)%4>=2,8,11))
hitsound = s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,1)
guardsound = s7000,1
getpower = floor(ifelse(var(9),0,floor(33*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2))*1.250*fvar(16))),floor(ifelse(var(9),0,ceil(33*fvar(0)/fvar(2)*1.0/8)*1.250*fvar(16)))
givepower = floor(33*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2)*.8)*1.250,floor(33*fvar(0)/fvar(2)*.8*1.0/8)*1.250
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-100*const(size.xscale))
animtype = Light
ground.type = High
attr = S,SA
hitflag = MAFD
guardflag = MA

[state 1200]
type = helper
trigger1 = !NumHelper(6100)&&AnimElem=8
id = 6100
stateno= 6100
pos = floor(220*const(size.xscale)),-floor(180*const(size.xscale))
postype = p1
ownpal = 1
size.xscale = const(size.xscale)*1.25
size.yscale = const(size.yscale)*1.25
ignorehitpause=1

;戻り動作
[state 1000]
type = AttackDist
trigger1 = AnimElem=8
value = 0

;ヒットによる増加(スタイリッシュポイント)
[state -2]
type = varadd
trigger1 = movehit=1
fvar(15) = .00005*floor(ifelse(17*fvar(0)<1,1+(var(2)%5=4),17*fvar(0))*1.22)
ignorehitpause=1

[state -2]
type = varset
trigger1 = movehit=1
fvar(14) = fvar(1)*fvar(2)*fvar(3)*fvar(4)
ignorehitpause=1

;◇◇ヒットスパーク◇◇
[state 240]
type = VarSet
trigger1 = AnimElem=6
var(16) = 10
persistent=0

;X座標
[state 240]
type = VarSet
trigger1 = AnimElem=6,>=0&&AnimElem=7,<0
var(17) = floor(ifelse(P2dist X>172*const(size.xscale),172*const(size.xscale),floor(P2dist X)+ifelse((P2dist X=[1,30]),10,-10)+10))

;Y座標
[state 240]
type = VarSet
trigger1 = AnimElem=6&&AnimElem=7,<0
var(18) = floor(-160*const(size.yscale))-floor(ifelse(floor(P2dist X)<(28+enemynear,const(size.ground.front)),0,ifelse(floor(P2dist X)>(148*const(size.xscale)),20,(floor(P2dist X)-(20+enemynear,const(size.ground.front)))*.5)))


;・・・・自分側ヒットバック・・・・
;ヒットバック量取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = var(1)%2<1&&var(1)%8<4&&target,time=0
fvar(5) = ifelse(var(3)&&target,statetype=A&&var(6)%10<1,-6.0*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.06),-10.5*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.1))*const(size.xscale)
ignorehitpause=1

;ヒットバック量取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2>=1||var(1)%8>=4)&&target,time=1
fvar(5) = (-6.0*1.25*((enemynear,backedgebodydist<=5||enemynear,frontedgebodydist<=5||var(1)%8>=4)&&fvar(10)<=0)*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.1))*const(size.xscale)
ignorehitpause=1

;ヒットバック時間取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2<1&&var(1)%8<4&&target,time=0)||((var(1)%2>=1||var(1)%8>=4)&&target,time=1)
fvar(6) = ifelse(moveguarded,10,12+(P2statetype=C))
ignorehitpause=1

;ヒットポーズ取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2<1&&var(1)%8<4&&target,time=0)||((var(1)%2>=1||var(1)%8>=4)&&target,time=1)
fvar(7) = (11-(var(1)%2>=1||var(1)%8>=4))*ifelse(moveguarded,-1,1)
ignorehitpause=1
;・・・・・・・・

;==追加入力==
[state 200]
type = VarSet
trigger1 = !time
var(7) = 0

[state 200]
type = VarSet
triggerall = (numhelper(6400)||numhelper(6401)||numhelper(6402))&&AnimElem=2,>=1
trigger1 = command="x" && !var(59)
var(7) = 1

[state 200]
type = ChangeState
triggerall = (numhelper(6400)||numhelper(6401)||numhelper(6402))&&AnimElem=10,>=1
trigger1 = var(7)
value = 1010

[state 1050]
type = changestate
trigger1 = animtime=0
value = 0
ctrl = 1

;遠雷遥（地上）・追加
[statedef 1010]
type = S
movetype=A
physics = S
ctrl = 0
velset = ifelse(fvar(9),fvar(9)*0,0),0

[state 200]
type = VarSet
trigger1 = !time&&P2dist X<0&&(prevstateno=52||((prevstateno=[200,1999])&&fvar(10)<=0))
fvar(9) = -fvar(9)

[state 200]
type = Turn
trigger1 = !time&&P2dist X<0&&(prevstateno=52||(prevstateno=[200,1999]))

;速度取得
[state -2]
type = varset
trigger1 = !time
fvar(8) = 0
ignorehitpause=1

;先行入力処理リセット
[state 200]
type = VarSet
trigger1 = !Time
var(53) = 0

[state 200]
type = ChangeAnim
trigger1 = Time=0&&!(var(34)=stateno&&((prevstateno=[130,132])||(prevstateno=150||prevstateno=152)))
value = 1010

[state 190]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&AnimElem=3
value = 10,39
channel = 1

[state 190]
type = PlaySND
trigger1 = AnimElem=3
value = 30,0
channel = 10

;魂
[state 6900]
type = varset
triggerall = animelem=1
trigger1 = numhelper(6400)
trigger1 = helper(6400),stateno=6400
trigger2 = numhelper(6401)
trigger2 = helper(6401),stateno=6400
trigger3 = numhelper(6402)
trigger3 = helper(6402),stateno=6400
var(36) = 1

;魂放出
[state 6900]
type = varset
triggerall = animelem=4,=0&&var(36)=1
triggerall = 1
trigger1 = numhelper(6400)
trigger1 = helper(6400),stateno=6400
trigger2 = numhelper(6401)
trigger2 = helper(6401),stateno=6400
trigger3 = numhelper(6402)
trigger3 = helper(6402),stateno=6400
var(36) = 2

[state 1200]
type = helper
trigger1 = var(36)>1
trigger1 = var(36):=-1
id = 6410
stateno= 6420
pos = 0,0
postype = p1
ownpal = 1
size.xscale = const(size.xscale)*1.5
size.yscale = const(size.xscale)*1.5
ignorehitpause=1
;||

;==追加入力==
[state 200]
type = VarSet
trigger1 = !time
var(7) = 0

[state 200]
type = VarSet
triggerall = (numhelper(6400)||numhelper(6401)||numhelper(6402))&&AnimElem=2,>=1
trigger1 = command="x" && !var(59)
var(7) = 1

[state 200]
type = ChangeState
triggerall = (numhelper(6400)||numhelper(6401)||numhelper(6402))&&AnimElem=7,>=1
trigger1 = var(7)
value = 1010

[state 1050]
type = changestate
trigger1 = animtime=0
value = 0
ctrl = 1

;遠雷遥（地上）（飛び道具）
[Statedef 6100]
type = A
movetype = A
physics = N
ctrl = 0
velset = 7,0
sprpriority = 4
anim = 6100

[state 6050]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[state 11455]
type = NotHitBy
trigger1 = 1
value = ,AA,AT

[state 11455]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
slot = 0
stateno=6101
time = 1

[state 1200]
type = Explod
trigger1 = !Time
id = 6120
anim= 6120
pos = -floor(40*const(size.xscale)),0
postype = p1
sprpriority = 4
ownpal = 1
facing=-1
removetime=6
scale = const(size.xscale)*.75, const(size.yscale)*.75
ignorehitpause=1

[state 1200]
type = Explod
trigger1 = !Time
id = 6150
anim= 6150
pos = -floor(40*const(size.xscale)),0
postype = p1
sprpriority = 4
ownpal = 1
removetime=6
scale = const(size.xscale)*.3, const(size.yscale)*1.25
ignorehitpause=1

[state 1200]
type = ModifyExplod
trigger1 = time
id = 6150
scale = const(size.xscale)*(.3-time*.05), const(size.yscale)*1.25

[state 200]
type = varset
trigger1 = !time
var(7) = root,anim=1005

;Attack Lv.3
[state 200]
type = Hitdef
trigger1 = !movecontact&&!movereversed
damage = floor(floor(44*ifelse(root,fvar(1)<.25,.25,root,fvar(1))*root,fvar(2)*root,fvar(3)*root,fvar(4))*1.22),floor(ceil(44*root,fvar(0)*1.0/4)*1.22)
ground.slidetime = 14+(P2statetype=C)
ground.hittime = 14+(P2statetype=C)
guard.slidetime = 12
guard.hittime = 12
pausetime = 1,12+root,var(49)*6
ground.velocity = -12.0*(1.0+ifelse(root,var(2)>31,31,root,var(2))*.02)*const(size.xscale)/1.25
guard.velocity = -12.0*const(size.xscale)/1.25
ground.cornerpush.veloff = 0
air.velocity = ifelse(root,var(1)%8>=4||root,var(1)%2>=1,-10.0*(1.0+ifelse(root,var(3)>31,31,root,var(3))*.1)-.0012,-6.0*const(size.xscale))/1.25,ifelse(root,var(6)%10>0,root,var(6)%10*1.5,(-10.0*(51-root,var(3))/51-.9)*const(size.yscale)/1.25)
airguard.velocity = -6*const(size.xscale)/1.25,-2*const(size.yscale)/1.25
air.cornerpush.veloff = 0
yaccel = .9*const(size.yscale)/1.25
fall.recover = ifelse(root,var(6)%10>0||root,var(28)>0,0,1)
fall.recovertime = ifelse(root,var(49)&&!root,var(2),30+12,16-ifelse(floor(root,var(14)/70)>7,7,floor(root,var(14)/70))+12)
hitsound = s7100,1
guardsound = s7000,1
getpower = floor(ifelse(root,var(9),0,floor(48*ifelse(root,var(1)%4>=2,.5,1.0)*root,fvar(0)/root,fvar(2))*1.250*root,fvar(16))),floor(ifelse(root,var(9),0,ceil(48*root,fvar(0)/root,fvar(2)*1.0/8)*1.250*root,fvar(16)))
givepower = floor(48*ifelse(root,var(1)%4>=2,.5,1.0)*root,fvar(0)/root,fvar(2)*.8)*1.250,floor(48*root,fvar(0)/root,fvar(2)*.8*1.0/8)*1.250
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-260*const(size.xscale))
animtype = hard
ground.type = High
attr = S,SP
hitflag = MAFD
guardflag = MA
palfx.time=ifelse(p2statetype=A,40,14+(P2statetype=C)+root,var(49)*6)+12
palfx.sinadd = 96,48,0,4
palfx.color = 0
palfx.add = 56,-96,-208
palfx.invertall = 1
sprpriority = 4

;Attack Lv.2
[state 200]
type = Hitdef
trigger1 = !movecontact&&!movereversed&&var(7)
damage = floor(floor(44*ifelse(root,fvar(1)<.25,.25,root,fvar(1))*root,fvar(2)*root,fvar(3)*root,fvar(4))*1.22),floor(ceil(44*root,fvar(0)*1.0/4)*1.22)
ground.slidetime = 12+(P2statetype=C)
ground.hittime = 12+(P2statetype=C)
guard.slidetime = 10
guard.hittime = 10
pausetime = 1,11+root,var(49)*6
ground.velocity = -6.0*const(size.xscale)/1.25,(-10.0*(51-root,var(3))/51-.9)*const(size.yscale)/1.25
guard.velocity = -12.0*const(size.xscale)/1.25
ground.cornerpush.veloff = 0
air.velocity = ifelse(root,var(1)%8>=4||root,var(1)%2>=1,-10.0*(1.0+ifelse(root,var(3)>31,31,root,var(3))*.1)-.0010,-6.0*const(size.xscale))/1.25,ifelse(root,var(6)%10>0,root,var(6)%10*1.5,(-10.0*(51-root,var(3))/51-.9)*const(size.yscale)/1.25)
airguard.velocity = -6*const(size.xscale)/1.25,-2*const(size.yscale)/1.25
air.cornerpush.veloff = 0
yaccel = .9*const(size.yscale)/1.25
fall.recover = ifelse(root,var(6)%10>0||root,var(28)>0,0,1)
fall.recovertime = ifelse(root,var(49)&&!root,var(2),24+11,12-ifelse(floor(root,var(14)/80)>6,6,floor(root,var(14)/80))+11)
hitsound = s7100,1
guardsound = s7000,1
getpower = floor(ifelse(root,var(9),0,floor(48*root,fvar(0)/root,fvar(2))*1.250*root,fvar(16))),floor(ifelse(root,var(9),0,ceil(48*root,fvar(0)/root,fvar(2)*1.0/8)*1.250*root,fvar(16)))
givepower = floor(48*ifelse(root,var(1)%4>=2,.5,1.0)*root,fvar(0)/root,fvar(2)*.8)*1.250,floor(48*root,fvar(0)/root,fvar(2)*.8*1.0/8)*1.250
fall = 1
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-260*const(size.xscale))
animtype = hard
ground.type = High
attr = S,SP
hitflag = MAFD
guardflag = MA
palfx.time=ifelse(p2statetype=A,40,12+(P2statetype=C)+root,var(49)*6)+12
palfx.sinadd = 96,48,0,4
palfx.color = 0
palfx.add = 56,-96,-208
palfx.invertall = 1
sprpriority = 4

[state ]
type=displaytoclipboard
trigger1=movehit=1&&root,numprojid(3621)
trigger1=enemynear,id=enemy,id
ignorehitpause=1
params=root,const(data.sparkno)+352
text="%n"
[state ]
type=displaytoclipboard
trigger1=movehit=1&&root,numprojid(3621)
trigger1=enemynear,id=enemy,id
ignorehitpause=1
params=root,const(data.sparkno)+3620
text="%n"
[state ]
type=displaytoclipboard
trigger1=movehit=1&&numenemy=2&&root,numprojid(3621)
trigger1=enemynear,id=enemy(1),id
ignorehitpause=1
params=root,const(data.guard.sparkno)+352
text="%n"
[state ]
type=displaytoclipboard
trigger1=movehit=1&&numenemy=2&&root,numprojid(3621)
trigger1=enemynear,id=enemy(1),id
ignorehitpause=1
params=root,const(data.guard.sparkno)+3620
text="%n"

;ヒット数補正増加
[state 12000]
type = ParentVarAdd
trigger1 = movehit=1&&numtarget
var(2) = 1
persistent=0
ignorehitpause=1

;空中ヒット数補正増加
[state 12000]
type = ParentVarAdd
trigger1 = movehit=1&&numtarget&&root,var(3)
var(3) = 1
persistent=0
ignorehitpause=1

;魂中の与ダメージ
[state -2]
type = parentvaradd
trigger1 = root,var(12)
trigger1 = movehit=1&&enemynear,gethitvar(damage)
var(37) = enemynear,gethitvar(damage)
ignorehitpause=1

;ヒットによる増加(スタイリッシュポイント)
[state -2]
type = parentvaradd
trigger1 = movehit=1
fvar(15) = .00005*floor(floor(44*ifelse(root,fvar(1)<.25,.25,root,fvar(1))*root,fvar(2)*root,fvar(3)*root,fvar(4))*1.22)
ignorehitpause=1

[state -2]
type = parentvarset
trigger1 = movehit=1
fvar(14) = root,fvar(1)*root,fvar(2)*root,fvar(3)*root,fvar(4)
ignorehitpause=1

;◇◇ヒットスパーク◇◇
[state 240]
type = VarSet
trigger1 = 1
var(16) = 10;+random%4
persistent=0

;X座標
[state 240]
type = VarSet
trigger1 = 1
var(17) = floor(P2dist X)-20

;Y座標
[state 240]
type = VarSet
trigger1 = 1
var(18) = 0

;ヒットスパーク
[state 1000]
type = Helper
triggerall = movecontact=1
trigger1 = numtarget
trigger1 = target,time=0&&(target,stateno=150||target,stateno=152||target,stateno=154||target,stateno=5000||target,stateno=5010||target,stateno=5020||target,stateno=5070||target,stateno=5080)
trigger2 = movetype=H
trigger3 = !numtarget && P2movetype=A&&(enemynear,prevstateno=5000||enemynear,prevstateno=5010||enemynear,prevstateno=5020||enemynear,prevstateno=5070||enemynear,prevstateno=5080)&&enemynear,time=1
id = 7000
stateno=7000+(movehit)*100
pos = var(17),var(18)
postype = p1
ignorehitpause=1
ownpal = 1
pausemovetime=99999
supermovetime=99999
size.xscale = .5
size.yscale = .5

;カウンターヒットエフェクト
[state -2]
type = Explod
triggerall = root,var(49)&&movehit=1
trigger1 = numtarget
trigger1 = target,time=0&&(target,stateno=150||target,stateno=152||target,stateno=154||target,stateno=5000||target,stateno=5010||target,stateno=5020||target,stateno=5070||target,stateno=5080)
trigger2 = movetype=H
trigger3 = !numtarget && P2movetype=A&&(enemynear,prevstateno=5000||enemynear,prevstateno=5010||enemynear,prevstateno=5020||enemynear,prevstateno=5070||enemynear,prevstateno=5080)&&enemynear,time=1
id = 7760
anim = 7760
pos = var(17),var(18)
postype = p1
ignorehitpause=1
pausemovetime=99999
supermovetime=99999
sprpriority = 5
ontop = 1
ownpal = 1
scale = .5,.5

[state 900]
type = TargetState
trigger1 = movehit=1 && numtarget && root,var(6)%10<1 && (root,var(1)%2>=1||root,var(1)%8>=4)
trigger1 = target,time=0
value = ifelse(root,var(1)%8>=4,936,926)
ignorehitpause=1
persistent=0

[state 11455]
type = parentvarset
trigger1 = movehit=1&&!numtarget
fvar(25) = uniqhitcount-hitcount+1

;ガードクラッシュ減少値判別
[State 100, Helper]
type = Helper
triggerall = moveguarded=1&&!numhelper(15909)&&IsHelper
triggerall = !enemynear,numpartner
trigger1 = numtarget
trigger1 = target,time=0 && (target,stateno=150||target,stateno=152||target,stateno=154)
trigger2 = !numtarget && movetype=H && (P2stateno=[150,155])
id = 15905+1
stateno=15905
pos = 0,0
postype = p2
ownpal = 1
ignorehitpause = 1

;気絶増加値判別
[State 100, Helper]
type = Helper
triggerall = movehit=1&&!numhelper(15380)&&root,var(28)>=0&&IsHelper
triggerall = !enemynear,numpartner
trigger1 = numtarget
trigger1 = target,time=0 && (target,stateno=5000||target,stateno=5010||target,stateno=5020||target,stateno=5070||target,stateno=5080)
trigger2 = !numtarget && movetype=H && P2movetype=H && (P2stateno!=[150,155])
id = 15380+6
stateno=15380
pos = 0,0
postype = p2
ownpal = 1
ignorehitpause = 1

[state 11455]
type = ChangeState
trigger1 = movecontact>1
value = 6110

[state 11455]
type = DestroySelf
trigger1 = frontedgebodydist<=-40

;飛び道具消滅
[statedef 6101]
type = A
movetype=I
physics = N
movehitpersistent=1
hitcountpersistent=1

[state 6100]
type = NotHitBy
trigger1 = 1
value = SCA

[state 6100]
type = RemoveExplod
trigger1 = time

[state 100]
type = DestroySelf
trigger1 = time

;飛び道具消滅
[statedef 6110]
type = A
movetype=I
physics = N
movehitpersistent=1
hitcountpersistent=1

[state 6100]
type = AssertSpecial
trigger1 = 1
flag = invisible

[state 6100]
type = NotHitBy
trigger1 = 1
value = SCA

[state 1200]
type = Explod
trigger1 = !Time
id = 6110
anim= 6110
pos = -floor(120*const(size.xscale)),floor(120*const(size.xscale))
postype = p1
sprpriority = 4
ownpal = 1
scale = const(size.xscale), const(size.yscale)
ignorehitpause=1

[state 6100]
type = RemoveExplod
trigger1 = time
id = 6120

[state 6100]
type = RemoveExplod
trigger1 = time
id = 6150

[state 100]
type = DestroySelf
trigger1 = time

;遠雷遥（空中）
[statedef 1050]
type = A
movetype=A
physics = N
ctrl = 0
velset = ifelse(fvar(9),fvar(9)*0+fvar(8),0),0

[state 200]
type = ChangeAnim
trigger1 = Time=0&&!(var(34)=stateno&&((prevstateno=[130,132])||(prevstateno=150||prevstateno=152)))
value = 1050+(prevstateno=[600,620])*5

;速度取得
[state -2]
type = varset
trigger1 = !time
fvar(8) = 0
ignorehitpause=1

;先行入力処理リセット
[state 200]
type = VarSet
trigger1 = !Time
var(53) = 0


;ノックバックリセット
[state 200]
type = VarSet
trigger1 = !Time
fvar(5) = 0

[state 190]
type = PlaySND
trigger1 = ifelse(anim=1055,(AnimElem=4,=3),(AnimElem=4,=7))
value = 30,0
channel = 10

[state 190]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&AnimElem=4
value = 10,38
channel = 1

[state 1200]
type = helper
trigger1 = !NumHelper(6100)&&ifelse(anim=1055,(AnimElem=4,=4),(AnimElem=4,=8))
id = 6150
stateno= 6150
pos = floor(90*const(size.xscale)),-floor(40*const(size.xscale))
postype = p1
ownpal = 1
size.xscale = const(size.xscale)*1.75
size.yscale = const(size.yscale)*1.75
ignorehitpause=1

[state 600]
type = VelAdd
trigger1 = AnimElem=1,>1
y = .4*2.0*const(size.yscale)

[state 600]
type = VelSet
trigger1 = AnimElem=1,=1
x = -1.25*2.0*const(size.yscale)
y = -6.0*2.0*const(size.yscale)

[state 600]
type = VarSet
trigger1 = AnimElem=1,=1
fvar(8) = -1.25*2.0*const(size.yscale)

;==追加入力==
[state 200]
type = VarSet
trigger1 = !time
var(7) = 0

[state 200]
type = VarSet
triggerall = (numhelper(6400)||numhelper(6401)||numhelper(6402))&&AnimElem=2,>=0
trigger1 = command="x" && !var(59)
var(7) = 1

[state 200]
type = ChangeState
triggerall = (numhelper(6400)||numhelper(6401)||numhelper(6402))&&AnimElem=7,>=0
trigger1 = var(7)
value = 1060

[state 200]
type = ChangeState
trigger1 = Vel Y>0 && Pos Y>=-Vel Y
value = 52

;遠雷遥（空中）・追加
[statedef 1060]
type = A
movetype=A
physics = N
ctrl = 0
velset = ifelse(fvar(9),fvar(9)*0+fvar(8),0),0

[state 200]
type = ChangeAnim
trigger1 = Time=0&&!(var(34)=stateno&&((prevstateno=[130,132])||(prevstateno=150||prevstateno=152)))
value = 1060

;速度取得
[state -2]
type = varset
trigger1 = !time
fvar(8) = 0
ignorehitpause=1

;先行入力処理リセット
[state 200]
type = VarSet
trigger1 = !Time
var(53) = 0

[state 190]
type = PlaySND
trigger1 = AnimElem=3
value = 30,0
channel = 10

[state 190]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&AnimElem=3
value = 10,39
channel = 1

;魂
[state 6900]
type = varset
triggerall = animelem=1
trigger1 = numhelper(6400)
trigger1 = helper(6400),stateno=6400
trigger2 = numhelper(6401)
trigger2 = helper(6401),stateno=6400
trigger3 = numhelper(6402)
trigger3 = helper(6402),stateno=6400
var(36) = 1

;魂放出
[state 6900]
type = varset
triggerall = animelem=4,=0&&var(36)=1
triggerall = 1
trigger1 = numhelper(6400)
trigger1 = helper(6400),stateno=6400
trigger2 = numhelper(6401)
trigger2 = helper(6401),stateno=6400
trigger3 = numhelper(6402)
trigger3 = helper(6402),stateno=6400
var(36) = 2

[state 1200]
type = helper
trigger1 = var(36)>1
trigger1 = var(36):=-1
id = 6410
stateno= 6420
pos = 0,0
postype = p1
ownpal = 1
size.xscale = const(size.xscale)*1.5
size.yscale = const(size.xscale)*1.5
ignorehitpause=1
;||

[state 1200]
type = Explod
trigger1 = animelem=4
id = 6120
anim= 6125
pos = floor(110*const(size.xscale)),-floor(0*const(size.yscale))
postype = p1
sprpriority = 4
ownpal = 1
vfacing=-1
facing=-1
removetime=6
scale = const(size.xscale), const(size.yscale)
ignorehitpause=1

[state 1200]
type = Explod
trigger1 = animelem=4
id = 6150
anim= 6155
pos = floor(110*const(size.xscale)),-floor(0*const(size.yscale))
postype = p1
sprpriority = 4
ownpal = 1
removetime=6
scale = const(size.xscale), const(size.yscale)
ignorehitpause=1

[state 600]
type = VelAdd
trigger1 = AnimElem=1,>1
y = .4*2.0*const(size.yscale)

[state 600]
type = VelSet
trigger1 = AnimElem=1,=1
x = -1.25*2.0*const(size.yscale)
y = -7.0*2.0*const(size.yscale)

[state 600]
type = VarSet
trigger1 = AnimElem=1,=1
fvar(8) = -1.25*2.0*const(size.yscale)

;==追加入力==
[state 200]
type = VarSet
trigger1 = !time
var(7) = 0

[state 200]
type = VarSet
triggerall = (numhelper(6400)||numhelper(6401)||numhelper(6402))&&AnimElem=2,>=1
trigger1 = command="x" && !var(59)
var(7) = 1

[state 200]
type = ChangeState
triggerall = (numhelper(6400)||numhelper(6401)||numhelper(6402))&&AnimElem=7,>=0
trigger1 = var(7)
value = 1060

[state 200]
type = ChangeState
trigger1 = Vel Y>0 && Pos Y>=-Vel Y
value = 52

;遠雷遥（空中）（飛び道具）
[Statedef 6150]
type = A
movetype = A
physics = N
ctrl = 0
velset = 2.5,7
anim = 6105
sprpriority = 4

[state 6050]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[state 11455]
type = NotHitBy
trigger1 = 1
value = ,AA,AT

[state 11455]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
slot = 0
stateno=6101
time = 1

[state 6050]
type = AngleDraw
trigger1 = 1
value = -66
scale = const(size.xscale)*0.833,const(size.yscale)*0.833

[state 6050]
type = Trans
trigger1 = 1
trans = add

[state 1200]
type = Explod
trigger1 = !Time
id = 6120
anim= 6125
pos = floor(10*const(size.xscale)),floor(20*const(size.yscale))
postype = p1
sprpriority = 4
ownpal = 1
facing = -1
vfacing=-1
removetime=6
scale = const(size.xscale)*.75, const(size.yscale)*.75
ignorehitpause=1

[state 1200]
type = Explod
trigger1 = !Time
id = 6150
anim= 6155
pos = floor(10*const(size.xscale)),floor(20*const(size.yscale))
postype = p1
sprpriority = 4
ownpal = 1
removetime=6
scale = const(size.xscale)*.75, const(size.yscale)*.75
ignorehitpause=1

[state 1200]
type = ModifyExplod
trigger1 = time
id = 6150
scale = const(size.xscale)*(.75-time*.125), const(size.yscale)*.75

[state 6050]
type = varset
trigger1 = !time&&root,anim=1055
var(1) = 1

;Attack Lv.3
[state 200]
type = Hitdef
trigger1 = !movecontact&&!movereversed
damage = floor(floor(44*ifelse(root,fvar(1)<.25,.25,root,fvar(1))*root,fvar(2)*root,fvar(3)*root,fvar(4))*1.22),ceil(floor(44*root,fvar(3)*root,fvar(4)*1.0/4)*1.22)
ground.slidetime = 14+(P2statetype=C)
ground.hittime = 14+(P2statetype=C)
guard.slidetime = 12
guard.hittime = 12
pausetime = 1,12+root,var(49)*6
ground.velocity = -12.0*(1.0+ifelse(root,var(2)>31,31,root,var(2))*.02)*const(size.xscale)/1.75
guard.velocity = -12.0*const(size.xscale)/1.75
ground.cornerpush.veloff = 0
air.velocity = ifelse(root,var(1)%8>=4||root,var(1)%2>=1,-10.0*(1.0+ifelse(root,var(3)>31,31,root,var(3))*.1)-.0012,-6.0*const(size.xscale))/1.75,ifelse(root,var(6)%10>0,root,var(6)%10*1.5,(-12.0*(51-root,var(3))/51-.9)*const(size.yscale)/1.75)
airguard.velocity = -6*const(size.xscale)/1.75,-2*const(size.yscale)/1.75
air.cornerpush.veloff = 0
yaccel = .9*const(size.yscale)/1.75
fall.recover = ifelse(root,var(6)%10>0||root,var(28)>0,0,1)
fall.recovertime = ifelse(root,var(49)&&!root,var(2),30+12,16-ifelse(floor(root,var(14)/70)>7,7,floor(root,var(14)/70))+12)
hitsound = s7100,1
guardsound = s7000,1
getpower = floor(ifelse(root,var(9),0,floor(48*root,fvar(0)/root,fvar(2))*1.250*root,fvar(16))),floor(ifelse(root,var(9),0,ceil(48*root,fvar(0)/root,fvar(2)*1.0/8)*1.250*root,fvar(16)))
givepower = floor(48*ifelse(root,var(1)%4>=2,.5,1.0)*root,fvar(0)/root,fvar(2)*.8)*1.250,floor(48*root,fvar(0)/root,fvar(2)*.8*1.0/8)*1.250
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-260*const(size.xscale))
animtype = hard
ground.type = High
attr = A,SP
hitflag = MAFD
guardflag = MA
palfx.time=ifelse(p2statetype=A,40,14+(P2statetype=C)+root,var(49)*6)+12
palfx.sinadd = 96,48,0,4
palfx.color = 0
palfx.add = 56,-96,-208
palfx.invertall = 1

;Attack Lv.2
[state 200]
type = Hitdef
triggerall = var(1)
trigger1 = !movecontact&&!movereversed
damage = floor(floor(44*ifelse(root,fvar(1)<.25,.25,root,fvar(1))*root,fvar(2)*root,fvar(3)*root,fvar(4))*1.22),ceil(floor(44*root,fvar(3)*root,fvar(4)*1.0/4)*1.22)
ground.slidetime = 12+(P2statetype=C)
ground.hittime = 12+(P2statetype=C)
guard.slidetime = 10
guard.hittime = 10
pausetime = 1,11+root,var(49)*6
ground.velocity = -6.0*const(size.xscale)/1.75,(-12.0*(51-root,var(3))/51-.9)*const(size.yscale)/1.75
guard.velocity = -12.0*const(size.xscale)/1.75
ground.cornerpush.veloff = 0
air.velocity = ifelse(root,var(1)%8>=4||root,var(1)%2>=1,-10.0*(1.0+ifelse(root,var(3)>31,31,root,var(3))*.1)-.0011,-6.0*const(size.xscale))/1.75,ifelse(root,var(6)%10>0,root,var(6)%10*1.5,(-12.0*(51-root,var(3))/51-.9)*const(size.yscale)/1.75)
airguard.velocity = -6*const(size.xscale)/1.75,-2*const(size.yscale)/1.75
air.cornerpush.veloff = 0
yaccel = .9*const(size.yscale)/1.75
fall.recover = ifelse(root,var(6)%10>0||root,var(28)>0,0,1)
fall.recovertime = ifelse(root,var(49)&&!root,var(2),24+11,12-ifelse(floor(root,var(14)/85)>6,6,floor(root,var(14)/85))+11)
hitsound = s7100,1
guardsound = s7000,1
getpower = floor(ifelse(root,var(9),0,floor(40*root,fvar(0)/root,fvar(2))*1.250*root,fvar(16))),floor(ifelse(root,var(9),0,ceil(40*root,fvar(0)/root,fvar(2)*1.0/8)*1.250*root,fvar(16)))
givepower = floor(40*ifelse(root,var(1)%4>=2,.5,1.0)*root,fvar(0)/root,fvar(2)*.8)*1.250,floor(40*root,fvar(0)/root,fvar(2)*.8*1.0/8)*1.250
fall = 1
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-260*const(size.xscale))
animtype = hard
ground.type = High
attr = A,SP
hitflag = MAFD
guardflag = MA
palfx.time=ifelse(p2statetype=A,40,12+(P2statetype=C)+root,var(49)*6)+12
palfx.sinadd = 96,48,0,4
palfx.color = 0
palfx.add = 56,-96,-208
palfx.invertall = 1

;Attack Lv.3
[state 200]
type = Hitdef
triggerall = root,var(1)%4>=2
trigger1 = !movecontact&&!movereversed
damage = floor(floor(44*ifelse(root,fvar(1)<.25,.25,root,fvar(1))*root,fvar(2)*root,fvar(3)*root,fvar(4))*1.22),ceil(floor(44*root,fvar(3)*root,fvar(4)*1.0/4)*1.22)
ground.slidetime = 14+(P2statetype=C)
ground.hittime = 14+(P2statetype=C)
guard.slidetime = 12
guard.hittime = 12
pausetime = 1,12+root,var(49)*6
ground.velocity = -12.0*const(size.xscale)/1.75
guard.velocity = -12.0*const(size.xscale)/1.75
ground.cornerpush.veloff = 0
air.velocity = ifelse(root,var(1)%8>=4||root,var(1)%2>=1,-10.0*(1.0+ifelse(root,var(3)>31,31,root,var(3))*.1)-.0011,-10.0*const(size.xscale))/1.75,ifelse(root,var(6)%10>0,root,var(6)%10*1.5,6)
airguard.velocity = -6*const(size.xscale)/1.75,-2*const(size.yscale)/1.75
air.cornerpush.veloff = 0
yaccel = .9*const(size.yscale)/1.75
fall.recover = ifelse(root,var(6)%10>0||root,var(28)>0,0,1)
fall.recovertime = ifelse(root,var(49)&&!root,var(2),30+12,16-ifelse(floor(root,var(14)/75)>7,7,floor(root,var(14)/75))+12)
hitsound = s7100,1
guardsound = s7000,1
getpower = floor(ifelse(root,var(9),0,floor(55*root,fvar(0)/root,fvar(2))*1.250*root,fvar(16))),floor(ifelse(root,var(9),0,ceil(55*root,fvar(0)/root,fvar(2)*1.0/8)*1.250*root,fvar(16)))
givepower = floor(55*ifelse(root,var(1)%4>=2,.5,1.0)*root,fvar(0)/root,fvar(2)*.8)*1.250,floor(55*root,fvar(0)/root,fvar(2)*.8*1.0/8)*1.250
fall = 1
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-260*const(size.xscale))
animtype = hard
ground.type = High
attr = A,SP
hitflag = MAFD
guardflag = MA
palfx.time=ifelse(p2statetype=A,40,14+(P2statetype=C)+root,var(49)*6)+6
palfx.sinadd = 96,48,0,4
palfx.color = 0
palfx.add = 56,-96,-208
palfx.invertall = 1

[state ]
type=displaytoclipboard
trigger1=movehit=1&&root,numprojid(3621)
trigger1=enemynear,id=enemy,id
ignorehitpause=1
params=root,const(data.sparkno)+352
text="%n"
[state ]
type=displaytoclipboard
trigger1=movehit=1&&root,numprojid(3621)
trigger1=enemynear,id=enemy,id
ignorehitpause=1
params=root,const(data.sparkno)+3620
text="%n"
[state ]
type=displaytoclipboard
trigger1=movehit=1&&numenemy=2&&root,numprojid(3621)
trigger1=enemynear,id=enemy(1),id
ignorehitpause=1
params=root,const(data.guard.sparkno)+352
text="%n"
[state ]
type=displaytoclipboard
trigger1=movehit=1&&numenemy=2&&root,numprojid(3621)
trigger1=enemynear,id=enemy(1),id
ignorehitpause=1
params=root,const(data.guard.sparkno)+3620
text="%n"

;ヒット数補正増加
[state 12000]
type = ParentVarAdd
trigger1 = movehit=1&&numtarget
var(2) = 1
persistent=0
ignorehitpause=1

;空中ヒット数補正増加
[state 12000]
type = ParentVarAdd
trigger1 = movehit=1&&numtarget&&root,var(3)
var(3) = 1
persistent=0
ignorehitpause=1

;魂中の与ダメージ
[state -2]
type = parentvaradd
trigger1 = root,var(12)
trigger1 = movehit=1&&enemynear,gethitvar(damage)
var(37) = enemynear,gethitvar(damage)
ignorehitpause=1

;ヒットによる増加(スタイリッシュポイント)
[state -2]
type = parentvaradd
trigger1 = movehit=1
fvar(15) = .00005*floor(floor(44*ifelse(root,fvar(1)<.25,.25,root,fvar(1))*root,fvar(2)*root,fvar(3)*root,fvar(4))*1.22)
ignorehitpause=1

[state -2]
type = parentvarset
trigger1 = movehit=1
fvar(14) = root,fvar(1)*root,fvar(2)*root,fvar(3)*root,fvar(4)
ignorehitpause=1

;◇◇ヒットスパーク◇◇
[state 240]
type = VarSet
trigger1 = 1
var(16) = 10;+random%4
persistent=0

;X座標
[state 240]
type = VarSet
trigger1 = 1
var(17) = floor(P2dist X)-20

;Y座標
[state 240]
type = VarSet
trigger1 = 1
var(18) = 0

;ヒットスパーク
[state 1000]
type = Helper
triggerall = movecontact=1
trigger1 = numtarget
trigger1 = target,time=0&&(target,stateno=150||target,stateno=152||target,stateno=154||target,stateno=5000||target,stateno=5010||target,stateno=5020||target,stateno=5070||target,stateno=5080)
trigger2 = movetype=H
trigger3 = !numtarget && P2movetype=A&&(enemynear,prevstateno=5000||enemynear,prevstateno=5010||enemynear,prevstateno=5020||enemynear,prevstateno=5070||enemynear,prevstateno=5080)&&enemynear,time=1
id = 7000
stateno=7000+(movehit)*100
pos = var(17),var(18)
postype = p1
ignorehitpause=1
ownpal = 1
pausemovetime=99999
supermovetime=99999
size.xscale = .5
size.yscale = .5

;カウンターヒットエフェクト
[state -2]
type = Explod
triggerall = root,var(49)&&movehit=1
trigger1 = numtarget
trigger1 = target,time=0&&(target,stateno=150||target,stateno=152||target,stateno=154||target,stateno=5000||target,stateno=5010||target,stateno=5020||target,stateno=5070||target,stateno=5080)
trigger2 = movetype=H
trigger3 = !numtarget && P2movetype=A&&(enemynear,prevstateno=5000||enemynear,prevstateno=5010||enemynear,prevstateno=5020||enemynear,prevstateno=5070||enemynear,prevstateno=5080)&&enemynear,time=1
id = 7760
anim = 7760
pos = var(17),var(18)
postype = p1
ignorehitpause=1
pausemovetime=99999
supermovetime=99999
bindtime=-1
ontop = 1
ownpal = 1
scale = .5,.5

[state 900]
type = TargetState
trigger1 = movehit=1 && numtarget && root,var(6)%10<1 && (root,var(1)%2>=1||root,var(1)%8>=4)
trigger1 = target,time=0
value = ifelse(root,var(1)%8>=4,936,926)
ignorehitpause=1
persistent=0

[state 11455]
type = parentvarset
trigger1 = movehit=1&&!numtarget
fvar(25) = uniqhitcount-hitcount+1

;ガードクラッシュ減少値判別
[State 100, Helper]
type = Helper
triggerall = moveguarded=1&&!numhelper(15909)&&IsHelper
triggerall = !enemynear,numpartner
trigger1 = numtarget
trigger1 = target,time=0 && (target,stateno=150||target,stateno=152||target,stateno=154)
trigger2 = !numtarget && movetype=H && (P2stateno=[150,155])
id = 15905+1
stateno=15905
pos = 0,0
postype = p2
ownpal = 1
ignorehitpause = 1

;気絶増加値判別
[State 100, Helper]
type = Helper
triggerall = movehit=1&&!numhelper(15380)&&root,var(28)>=0&&IsHelper
triggerall = !enemynear,numpartner
trigger1 = numtarget
trigger1 = target,time=0 && (target,stateno=5000||target,stateno=5010||target,stateno=5020||target,stateno=5070||target,stateno=5080)
trigger2 = !numtarget && movetype=H && P2movetype=H && (P2stateno!=[150,155])
id = 15380+6
stateno=15380
pos = 0,0
postype = p2
ownpal = 1
ignorehitpause = 1

[state 11455]
type = ChangeState
trigger1 = movecontact>1
value = 6110

[state 11455]
type = DestroySelf
trigger1 = frontedgebodydist<=-40||Pos Y>=(-Vel Y+20)

;厄災ノ棘
[statedef 1100]
type = S
movetype=A
physics = S
ctrl = 0
velset = ifelse(fvar(9),fvar(9)*0,0),0

[state 200]
type = VarSet
trigger1 = !time&&P2dist X<0&&(prevstateno=52||((prevstateno=[200,1999])&&fvar(10)<=0))
fvar(9) = -fvar(9)

[state 200]
type = Turn
trigger1 = !time&&P2dist X<0&&(prevstateno=52||(prevstateno=[200,1999]))

;速度取得
[state -2]
type = varset
trigger1 = !time
fvar(8) = 0
ignorehitpause=1

;先行入力処理リセット
[state 200]
type = VarSet
trigger1 = !Time
var(53) = 0

[state 200]
type = ChangeAnim
trigger1 = Time=0&&!(var(34)=stateno&&((prevstateno=[130,132])||(prevstateno=150||prevstateno=152)))
value = 1100

;◇◇溜め用◇◇
[state 220]
type = varset
trigger1 = time=0&&(prevstateno!=[130,154])
var(7) = 0

[state 220]
type = varadd
trigger1 = var(7)<120&&((command="hold_z"&&!var(59))||(random<0&&var(59)))
trigger1 = (anim=1105&&var(7))||(animelemtime(5)=0&&!var(7))
var(7) = 1

[state 220]
type = ChangeAnim
trigger1 = anim=1100&&animelemtime(5)=0&&var(7)&&var(7)<=120
trigger1 = ((command="hold_z"&&!var(59))||(random<0&&var(59)))
value = 1105
persistent=0

[state 220]
type = ChangeAnim
trigger1 = (command!="hold_z"||var(7)>=120)&&var(7)
value = 1100
elem = 5
persistent=0

;溜めエフェクト
[state -2]
type = Helper
trigger1 = var(7)%8=1 &&anim=1105
id = 7770
stateno=7770
pos = 0,0
postype = P1
ownpal = 1
facing=facing
pausemovetime=999999
supermovetime=999999
;~~~~~

[state 1100]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&AnimElem=8
value = 10,40+random%2*8
channel = 1

[state 1200]
type = playsnd
trigger1 = AnimElem=8,=0
trigger2 = AnimElem=8,=3
trigger3 = AnimElem=9,=2
trigger4 = AnimElem=10,=1
trigger5 = AnimElem=11,=0&&var(7)>=32
trigger6 = AnimElem=11,=3&&var(7)>=48
trigger7 = AnimElem=12,=2&&var(7)>=64
trigger8 = AnimElem=13,=1&&var(7)>=80
trigger9 = AnimElem=13,=4&&var(7)>=96
trigger10 = AnimElem=14,=1&&var(7)>=112
value = 30,1
channel = 12

[state 1200]
type = helper
trigger1 = AnimElem=8,=0
trigger2 = AnimElem=8,=3
trigger3 = AnimElem=9,=2
trigger4 = AnimElem=10,=1
trigger5 = AnimElem=11,=0&&var(7)>=32
trigger6 = AnimElem=11,=3&&var(7)>=48
trigger7 = AnimElem=12,=2&&var(7)>=64
trigger8 = AnimElem=13,=1&&var(7)>=80
trigger9 = AnimElem=13,=4&&var(7)>=96
trigger10 = AnimElem=14,=1&&var(7)>=112
id = 6200
stateno= 6200
pos = floor((120+(AnimTime+52)*10)*const(size.xscale)),floor((100+(AnimTime+52)*10)*const(size.xscale))
postype = p1
ownpal = 1
size.xscale = const(size.xscale)*1.5
size.yscale = const(size.yscale)*1.5
ignorehitpause=1

[state 1050]
type = changestate
trigger1 = anim!=1105&&animtime=0
value = 0
ctrl = 1

;厄災ノ棘（飛び道具）
[Statedef 6200]
type = A
movetype = A
physics = N
ctrl = 0
velset = 10,-10
anim = 6200
sprpriority = 4

[state 6050]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[state 11455]
type = NotHitBy
trigger1 = 1
value = ,AA,AT

[state 11455]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
slot = 0
stateno=6101
time = 1

[state 6050]
type = AngleDraw
trigger1 = 1
value = -45
scale = const(size.xscale),const(size.yscale)

;Attack Lv.3
[state 200]
type = Hitdef
trigger1 = !movecontact&&!movereversed
damage = floor(floor(26*ifelse(root,fvar(1)<.25,.25,root,fvar(1))*root,fvar(2)*root,fvar(3)*root,fvar(4))*1.22),ceil(floor(26*root,fvar(3)*root,fvar(4)*1.0/4)*1.22)
ground.slidetime = 14+(P2statetype=C)
ground.hittime = 14+(P2statetype=C)
guard.slidetime = 12
guard.hittime = 12
pausetime = 1,12+root,var(49)*6
ground.velocity = -12.0*const(size.xscale)/1.25,(-9.0*(51-root,var(3))/51-.9)*const(size.yscale)/1.25
guard.velocity = -12.0*const(size.xscale)/1.25
ground.cornerpush.veloff = 0
air.velocity = ifelse(root,var(1)%8>=4||root,var(1)%2>=1,-11.0*(1.0+ifelse(root,var(3)>31,31,root,var(3))*.1)-.0010,-12.0*const(size.xscale)),ifelse(root,var(6)%10>0,root,var(6)%10*1.5,(-9.0*(51-root,var(3))/51-.9)*const(size.yscale)/1.25)
airguard.velocity = -6*const(size.xscale)/1.25,-2*const(size.yscale)/1.25
air.cornerpush.veloff = 0
yaccel = .9*const(size.yscale)/1.25
fall.recover = ifelse(root,var(6)%10>0||root,var(28)>0,0,1)
fall.recovertime = ifelse(root,var(49)&&!root,var(2),30+12,16-ifelse(floor(root,var(14)/70)>7,7,floor(root,var(14)/70))+12)
hitsound = s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,9+random%2)
guardsound = s7000,4
getpower = floor(ifelse(root,var(9),0,floor(24*root,fvar(0)/root,fvar(2))*1.250*root,fvar(16))),floor(ifelse(root,var(9),0,ceil(24*root,fvar(0)/root,fvar(2)*1.0/8)*1.250*root,fvar(16)))
givepower = floor(24*ifelse(root,var(1)%4>=2,.5,1.0)*root,fvar(0)/root,fvar(2)*.8)*1.250,floor(24*root,fvar(0)/root,fvar(2)*.8*1.0/8)*1.250
fall = 1
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-260*const(size.xscale))
animtype = hard
ground.type = High
attr = A,SP
hitflag = MAFD
guardflag = MA

;ヒット数補正増加
[state 12000]
type = ParentVarAdd
trigger1 = movehit=1&&numtarget
var(2) = 1
persistent=0
ignorehitpause=1

;空中ヒット数補正増加
[state 12000]
type = ParentVarAdd
trigger1 = movehit=1&&numtarget&&root,var(3)
var(3) = 1
persistent=0
ignorehitpause=1

;魂中の与ダメージ
[state -2]
type = parentvaradd
trigger1 = root,var(12)
trigger1 = movehit=1&&enemynear,gethitvar(damage)
var(37) = enemynear,gethitvar(damage)
ignorehitpause=1

;ヒットによる増加(スタイリッシュポイント)
[state -2]
type = parentvaradd
trigger1 = movehit=1
fvar(15) = .00005*floor(floor(26*ifelse(root,fvar(1)<.25,.25,root,fvar(1))*root,fvar(2)*root,fvar(3)*root,fvar(4))*1.22)
ignorehitpause=1

[state -2]
type = parentvarset
trigger1 = movehit=1
fvar(14) = root,fvar(1)*root,fvar(2)*root,fvar(3)*root,fvar(4)
ignorehitpause=1

;◇◇ヒットスパーク◇◇
[state 240]
type = VarSet
trigger1 = 1
var(16) = 10;+random%4
persistent=0

;X座標
[state 240]
type = VarSet
trigger1 = 1
var(17) = floor(P2dist X)+floor(20*const(size.xscale))

;Y座標
[state 240]
type = VarSet
trigger1 = 1
var(18) = -floor(100*const(size.yscale))

;ヒットスパーク
[state 1000]
type = Helper
triggerall = movecontact=1
trigger1 = numtarget
trigger1 = target,time=0&&(target,stateno=150||target,stateno=152||target,stateno=154||target,stateno=5000||target,stateno=5010||target,stateno=5020||target,stateno=5070||target,stateno=5080)
trigger2 = movetype=H
trigger3 = !numtarget && P2movetype=A&&(enemynear,prevstateno=5000||enemynear,prevstateno=5010||enemynear,prevstateno=5020||enemynear,prevstateno=5070||enemynear,prevstateno=5080)&&enemynear,time=1
id = 7000
stateno=7000+(movehit)*100
pos = var(17),var(18)
postype = p1
ignorehitpause=1
ownpal = 1
pausemovetime=99999
supermovetime=99999
size.xscale = .5
size.yscale = .5

;カウンターヒットエフェクト
[state -2]
type = Explod
triggerall = root,var(49)&&movehit=1
trigger1 = numtarget
trigger1 = target,time=0&&(target,stateno=150||target,stateno=152||target,stateno=154||target,stateno=5000||target,stateno=5010||target,stateno=5020||target,stateno=5070||target,stateno=5080)
trigger2 = movetype=H
trigger3 = !numtarget && P2movetype=A&&(enemynear,prevstateno=5000||enemynear,prevstateno=5010||enemynear,prevstateno=5020||enemynear,prevstateno=5070||enemynear,prevstateno=5080)&&enemynear,time=1
id = 7760
anim = 7760
pos = var(17),var(18)
postype = p1
ignorehitpause=1
pausemovetime=99999
supermovetime=99999
bindtime=-1
ontop = 1
ownpal = 1
scale = .5,.5

[state 900]
type = TargetState
trigger1 = movehit=1 && numtarget && root,var(6)%10<1 && (root,var(1)%2>=1||root,var(1)%8>=4)
trigger1 = target,time=0
value = ifelse(root,var(1)%8>=4,936,926)
ignorehitpause=1
persistent=0

[state 11455]
type = parentvarset
trigger1 = movehit=1&&!numtarget
fvar(25) = uniqhitcount-hitcount+1

;ガードクラッシュ減少値判別
[State 100, Helper]
type = Helper
triggerall = moveguarded=1&&!numhelper(15909)&&IsHelper
triggerall = !enemynear,numpartner
trigger1 = numtarget
trigger1 = target,time=0 && (target,stateno=150||target,stateno=152||target,stateno=154)
trigger2 = !numtarget && movetype=H && (P2stateno=[150,155])
id = 15905+1
stateno=15905
pos = 0,0
postype = p2
ownpal = 1
ignorehitpause = 1

;気絶増加値判別
[State 100, Helper]
type = Helper
triggerall = movehit=1&&!numhelper(15380)&&root,var(28)>=0&&IsHelper
triggerall = !enemynear,numpartner
trigger1 = numtarget
trigger1 = target,time=0 && (target,stateno=5000||target,stateno=5010||target,stateno=5020||target,stateno=5070||target,stateno=5080)
trigger2 = !numtarget && movetype=H && P2movetype=H && (P2stateno!=[150,155])
id = 15380+6
stateno=15380
pos = 0,0
postype = p2
ownpal = 1
ignorehitpause = 1

[state 11455]
type = DestroySelf
trigger1 = frontedgebodydist<=-40||ScreenPos Y<=-40

;慟哭スル魂
[statedef 1200]
type = S
movetype=I
physics = S
ctrl = 0
velset = ifelse(fvar(9),fvar(9)*0,0),0
anim = 1200

;速度取得
[state -2]
type = varset
trigger1 = !time
fvar(8) = 0
ignorehitpause=1

;先行入力処理リセット
[state 200]
type = VarSet
trigger1 = !Time
var(53) = 0

;残り時間設定
[state 1200]
type = varset
trigger1 = AnimElem=6
var(12) = 1000+1

[state 1200]
type = helper
trigger1 = !NumHelper(6400)&&AnimElem=6
id = 6400
stateno= 6400
pos = 0,0
postype = p1
ownpal = 1
facing=ifelse(teamside=2,-1,1)*facing
size.xscale = const(size.xscale)*1.5
size.yscale = const(size.xscale)*1.5
ignorehitpause=1

[state 1320]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&AnimElem=6
value = 10,46
channel = 1

[state 1320]
type = PlaySND
trigger1 = AnimElem=6
value = 30,4

;地震
[State 40, 1]
type = Helper
trigger1 = AnimElem=6
id = 6930
stateno = 6930
pos = 0,0
postype = p1
ownpal = 1
pausemovetime = 9999
supermovetime = 9999
ignorehitpause = 1
persistent = 0

[state 801]
type = Explod
trigger1 = AnimElem=6
id = 6330
anim = 6330
pos = floor(0*const(size.xscale)),-floor(240*const(size.yscale))
postype = p1
scale = const(size.xscale)*2,const(size.yscale)*2
ownpal = 1
sprpriority = -2
pausemovetime=999
supermovetime=999
persistent=0

[state 801]
type = Explod
trigger1 = AnimElem=6
id = 6330
anim = 6330
pos = floor(40*const(size.xscale)),-floor(120*const(size.yscale))
postype = p1
scale = const(size.xscale)*2,const(size.yscale)*2
ownpal = 1
sprpriority = -2
pausemovetime=999
supermovetime=999
persistent=0

[state 801]
type = Explod
trigger1 = AnimElem=6
id = 6320
anim = 6320
pos = floor(40*const(size.xscale)),-floor(120*const(size.yscale))
postype = p1
scale = const(size.xscale)*1.5,const(size.yscale)*1.5
ownpal = 1
sprpriority = 4
pausemovetime=999
supermovetime=999
persistent=0

[state 801]
type = Explod
trigger1 = AnimElem=6
id = 6310
anim = 6310
pos = floor(40*const(size.xscale)),-floor(120*const(size.yscale))
postype = p1
scale = const(size.xscale),const(size.yscale)
ownpal = 1
sprpriority = 4
pausemovetime=999
supermovetime=999
persistent=0

[state 801]
type = Explod
trigger1 = AnimElem=6
id = 6300
anim = 6300
pos = floor(40*const(size.xscale)),-floor(120*const(size.yscale))
postype = p1
scale = const(size.xscale),const(size.yscale)
ownpal = 1
sprpriority = 4
pausemovetime=999
supermovetime=999
persistent=0

[state 801]
type = Helper
trigger1 = AnimElem=6
id = 6340
stateno = 6340
pos = floor(40*const(size.xscale)),-floor(140*const(size.yscale))
postype = p1
ownpal = 1
sprpriority = -2
pausemovetime=999
supermovetime=999
size.xscale = const(size.xscale)*1.75
size.yscale = const(size.yscale)*1.75
persistent=0

[state 801]
type = Helper
trigger1 = AnimElem=6
id = 6341
stateno = 6340
pos = floor(10*const(size.xscale)),-floor(100*const(size.yscale))
postype = p1
ownpal = 1
sprpriority = -2
pausemovetime=999
supermovetime=999
size.xscale = const(size.xscale)*1.75
size.yscale = const(size.yscale)*1.75
persistent=0

[state 801]
type = Helper
trigger1 = AnimElem=6
id = 6345
stateno = 6345
pos = floor(40*const(size.xscale)),-floor(160*const(size.yscale))
postype = p1
ownpal = 1
sprpriority = -2
pausemovetime=999
supermovetime=999
size.xscale = const(size.xscale)*1.75
size.yscale = const(size.yscale)*1.75
persistent=0

[state 801]
type = Helper
trigger1 = AnimElem=6
id = 6346
stateno = 6345
pos = floor(20*const(size.xscale)),-floor(120*const(size.yscale))
postype = p1
ownpal = 1
sprpriority = -2
pausemovetime=999
supermovetime=999
size.xscale = const(size.xscale)*1.75
size.yscale = const(size.yscale)*1.75
persistent=0

[state 801]
type = Helper
trigger1 = AnimElem=6
id = 6347
stateno = 6345
pos = floor(60*const(size.xscale)),-floor(110*const(size.yscale))
postype = p1
ownpal = 1
sprpriority = -2
pausemovetime=999
supermovetime=999
size.xscale = const(size.xscale)*1.75
size.yscale = const(size.yscale)*1.75
persistent=0

[state 801]
type = Helper
trigger1 = AnimElem=6
id = 6348
stateno = 6345
pos = floor(80*const(size.xscale)),-floor(160*const(size.yscale))
postype = p1
ownpal = 1
sprpriority = -2
pausemovetime=999
supermovetime=999
size.xscale = const(size.xscale)*1.75
size.yscale = const(size.yscale)*1.75
persistent=0

[state 1320]
type = ChangeState
trigger1 = AnimTime=0
value = 0
ctrl = 1

;慟哭スル魂エフェクト5
[statedef 6340]
ctrl = 0
anim = 6340
sprpriority = -2

[state 6340]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[state 6340]
type = AngleDraw
trigger1 = 1
value = ifelse(IsHelper(6341),75,-90)
scale = const(size.xscale),const(size.yscale)

[state 6340]
type = Trans
trigger1 = 1
trans = sub

[state 6340]
type = DestroySelf
trigger1 = AnimTime=0

;慟哭スル魂エフェクト5
[statedef 6345]
ctrl = 0
anim = 6345
sprpriority = -2

[state 6340]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[state 6340]
type = AngleDraw
trigger1 = 1
value = ifelse(IsHelper(6348),-45,ifelse(IsHelper(6347),-120,ifelse(IsHelper(6346),120,30)))
scale = const(size.xscale),const(size.yscale)

[state 6340]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256-ifelse(time>=7,(time-6)*32,0),256

[state 6340]
type = DestroySelf
trigger1 = AnimTime=0

;慟哭スル魂エフェクト
[statedef 6350]
ctrl = 0
anim = 90000
sprpriority = -2

[state 6355]
type = BindtoRoot
trigger1 = 1
pos = 0,-floor(ifelse(root,statetype=C,140,220)*const(size.yscale))
time=1

[state 801]
type = varset
trigger1 = root,var(12)=0
var(0) = 0

[state 801]
type = varadd
trigger1 = root,var(12)!=0
var(0) = 1

;---慟哭スル魂持続時間ゲージ---
[state 8900]
type = ModifyExplod;RemoveExplod
trigger1 = NumExplod(8970) && root,var(12)<=0
id = 8970
scale = 0,0

[state 8900]
type = ModifyExplod;RemoveExplod
trigger1 = NumExplod(8970) && root,var(12)>0
id = 8970
scale = .5*96,.5

[state 8900]
type = ModifyExplod;RemoveExplod
trigger1 = NumExplod(8971) && root,var(12)<=0
id = 8971
scale = 0,0

;背景
[state 8900]
type = Explod
trigger1 = !NumExplod(8970) && root,var(12)!=0
id = 8970
anim = 8970+(teamside=2)*5
pos = 58+floor(root,fvar(19)),74+floor(1000*ifelse(((root,fvar(19)-floor(root,fvar(19)))=(0,.001)),-1000,1)*(root,fvar(19)-floor(root,fvar(19))))
postype = back
removetime=-1
facing=ifelse(teamside=2,-1,1)
scale = .5*96,.5
sprpriority = -2
bindtime = -1
ownpal = 0
;trans = AddAlpha
;alpha = 0,0

;背景・点滅
[state 8900]
type = null;ModifyExplod
trigger1 = NumExplod(8970) && root,var(12)!=0 && time%16<8
id = 8970
trans = AddAlpha
alpha = 256-(time%8)*32,0

;背景・点滅
[state 8900]
type = null;ModifyExplod
trigger1 = NumExplod(8970) && root,var(12)!=0 && time%16>=8
id = 8970
trans = AddAlpha
alpha = 0+(time%8)*32,0

;ゲージ
[state 8900]
type = Explod
trigger1 = !NumExplod(8971) && root,var(12)!=0
id = 8971
anim = 8971+(teamside=2)*5
pos = 58+floor(root,fvar(19)),74+floor(1000*ifelse(((root,fvar(19)-floor(root,fvar(19)))=(0,.001)),-1000,1)*(root,fvar(19)-floor(root,fvar(19))))
postype = back
removetime=-1
facing=ifelse(teamside=2,-1,1)
scale = .5*((root,var(12)*96.00/1000)),.5
sprpriority = -1
bindtime = -1
ownpal = 0

[state 8900]
type = ModifyExplod
trigger1 = root,var(12)!=0
id = 8971
scale = (root,var(12)*96.00/1000)*.5,.5

[state 6355]
type = turn
trigger1 = facing!=root,facing && root,var(12)!=0
trigger2 = facing!=ifelse(teamside=1,1,-1)&&!root,var(12)

[state 6355]
type = turn
trigger1 = facing!=root,facing && (root,stateno=210||root,stateno=220||root,stateno=410||root,stateno=420||root,stateno=620)

[state 801]
type = Explod
trigger1 = var(0)%30=0&&root,var(12)!=0
id = 6350
anim = 6350
pos = 0,0
postype = p1
scale = const(size.xscale)*1.75,const(size.yscale)*1.75
sprpriority = -2
bindtime=-1
pausemovetime=9999
supermovetime=9999

[state 1300]
type = ModifyExplod
trigger1 = NumExplod(6350)
id = 6350
scale = const(size.xscale)*1.75*(1+time%30*.01),const(size.yscale)*1.75*(1+time%30*.01)

;~~中、強攻撃エフェクト
;~~立ち中
[state 210]
type = Explod
trigger1 = root,stateno=210&&root,AnimElem=6&&root,var(36)&&!root,movecontact
id = 6006
anim=6006
pos = floor(160*const(size.xscale)),floor(30*const(size.xscale))
postype = p1
ignorehitpause=1
sprpriority = 2

[state 210]
type = Explod
trigger1 = root,stateno=210&&root,AnimElem=6&&root,var(36)&&!root,movecontact
id = 6006
anim=6006
pos = floor(120*const(size.xscale)),floor(0*const(size.xscale))
postype = p1
ignorehitpause=1
sprpriority = 2

[state 210]
type = Explod
trigger1 = root,stateno=210&&root,AnimElem=6&&root,var(36)&&!root,movecontact
id = 6006
anim=6006
pos = floor(80*const(size.xscale)),-floor(30*const(size.xscale))
postype = p1
ignorehitpause=1
sprpriority = 2

;~~立ち強
[state 210]
type = Explod
trigger1 = root,stateno=220&&root,AnimElem=6&&root,var(36)&&!root,movecontact
id = 6006
anim=6006
pos = floor(140*const(size.xscale)),floor(120*const(size.xscale))
postype = p1
ignorehitpause=1
sprpriority = 2

[state 210]
type = Explod
trigger1 = root,stateno=220&&root,AnimElem=6&&root,var(36)&&!root,movecontact
id = 6006
anim=6006
pos = floor(100*const(size.xscale)),floor(150*const(size.xscale))
postype = p1
ignorehitpause=1
sprpriority = 2

[state 210]
type = Explod
trigger1 = root,stateno=220&&root,AnimElem=6&&root,var(36)&&!root,movecontact
id = 6006
anim=6006
pos = floor(60*const(size.xscale)),floor(180*const(size.xscale))
postype = p1
ignorehitpause=1
sprpriority = 2

;~~しゃがみ中
[state 210]
type = Explod
trigger1 = root,stateno=410&&root,AnimElem=7&&root,var(36)&&!root,movecontact
id = 6006
anim=6006
pos = floor(160*const(size.xscale)),floor(70*const(size.xscale))
postype = p1
ignorehitpause=1
sprpriority = 2

[state 210]
type = Explod
trigger1 = root,stateno=410&&root,AnimElem=7&&root,var(36)&&!root,movecontact
id = 6006
anim=6006
pos = floor(120*const(size.xscale)),floor(90*const(size.xscale))
postype = p1
ignorehitpause=1
sprpriority = 2

[state 210]
type = Explod
trigger1 = root,stateno=410&&root,AnimElem=7&&root,var(36)&&!root,movecontact
id = 6006
anim=6006
pos = floor(80*const(size.xscale)),floor(110*const(size.xscale))
postype = p1
ignorehitpause=1
sprpriority = 2

;~~しゃがみ強
[state 210]
type = Explod
trigger1 = root,stateno=420&&root,AnimElem=7&&root,var(36)&&!root,movecontact
id = 6006
anim=6006
pos = floor(300*const(size.xscale)),floor(60*const(size.xscale))
postype = p1
ignorehitpause=1
sprpriority = 2

[state 210]
type = Explod
trigger1 = root,stateno=420&&root,AnimElem=7&&root,var(36)&&!root,movecontact
id = 6006
anim=6006
pos = floor(280*const(size.xscale)),floor(30*const(size.xscale))
postype = p1
ignorehitpause=1
sprpriority = 2

[state 210]
type = Explod
trigger1 = root,stateno=420&&root,AnimElem=7&&root,var(36)&&!root,movecontact
id = 6006
anim=6006
pos = floor(260*const(size.xscale)),floor(0*const(size.xscale))
postype = p1
ignorehitpause=1
sprpriority = 2

;~~ジャンプ強
[state 210]
type = Explod
trigger1 = root,stateno=620&&root,AnimElem=4&&root,var(36)&&!root,movecontact
id = 6006
anim=6006
pos = floor(120*const(size.xscale)),floor(140*const(size.xscale))
postype = p1
ignorehitpause=1
sprpriority = 2

[state 210]
type = Explod
trigger1 = root,stateno=620&&root,AnimElem=4&&root,var(36)&&!root,movecontact
id = 6006
anim=6006
pos = floor(80*const(size.xscale)),floor(170*const(size.xscale))
postype = p1
ignorehitpause=1
sprpriority = 2

[state 210]
type = Explod
trigger1 = root,stateno=620&&root,AnimElem=4&&root,var(36)&&!root,movecontact
id = 6006
anim=6006
pos = floor(40*const(size.xscale)),floor(200*const(size.xscale))
postype = p1
ignorehitpause=1
sprpriority = 2

[state 210]
type = Explod
trigger1 = root,stateno=620&&root,AnimElem=4&&root,var(36)&&!root,movecontact
id = 6006
anim=6006
pos = floor(0*const(size.xscale)),floor(200*const(size.xscale))
postype = p1
ignorehitpause=1
sprpriority = 2

[state 210]
type = Explod
trigger1 = root,stateno=620&&root,AnimElem=4&&root,var(36)&&!root,movecontact
id = 6006
anim=6006
pos = -floor(40*const(size.xscale)),floor(180*const(size.xscale))
postype = p1
ignorehitpause=1
sprpriority = 2

[state 6340]
type = null;DestroySelf
trigger1 = !root,var(12)

;死ニ至ル病エフェクト
[statedef 6355]
ctrl = 0
anim = 90000
sprpriority = -3

[state 6355]
type = BindtoRoot
trigger1 = 1
pos = 0,-floor(ifelse(root,statetype=C,140,220)*const(size.yscale))
time=1

[state 801]
type = Explod
trigger1 = time%30=0
id = 6355
anim = 6355
pos = 0,0
postype = p1
scale = const(size.xscale)*1.75,const(size.yscale)*1.75
sprpriority = -3
bindtime=-1
pausemovetime=9999
supermovetime=9999

[state 6340]
type = DestroySelf
trigger1 = !root,var(13)

;魂
[statedef 6400]
ctrl = 0
anim = 6400
sprpriority = 2

[state 6050]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[state 6900]
type = DestroySelf
trigger1 = ((root,stateno=[210,220])||(root,stateno=[410,420])||(root,stateno=[610,620])||(root,stateno=[1500,1550])||(root,stateno=1010||root,stateno=1060))&&root,var(36)=-1
trigger1 = !var(1)
trigger2 = root,stateno=1300&&root,animelemtime(1)=0&&(root,anim=1350||!var(1))
trigger3 = root,stateno=1400&&root,animelemtime(1)=0

;時間
[state 6400]
type = varadd
triggerall = !(root,stateno=3000&&root,AnimElemTime(8)>=0&&root,AnimElemTime(11)<2)&&!(root,stateno=3100&&root,AnimElemTime(1)>=1&&root,AnimElemTime(2)<0)&&!(root,stateno=3500&&root,AnimElemTime(1)>=1&&root,AnimElemTime(1)<31)
trigger1 = time&&(root,var(52)<=0||!root,movecontact||root,var(52)<=3)
var(2) = 1

;魂付与時与ダメージリセット
[state 6400]
type = ParentVarSet
trigger1 = !time
var(37) = 0
ignorehitpause=1

[state 6050]
type = Turn
trigger1 = !time&&var(1)=1

;何個目か判別
[state 6400]
type = VarSet
trigger1 = !time
var(1) = 0

[state 6400]
type = VarAdd
triggerall = !time
trigger1 = numhelper(6402)
trigger1 = (ID-helper(6402),ID)>0
var(1) = 1

[state 6400]
type = VarAdd
triggerall = !time
trigger1 = numhelper(6401)
trigger1 = (ID-helper(6401),ID)>0
var(1) = 1

[state 6400]
type = VarAdd
triggerall = !time
trigger1 = numhelper(6400)
trigger1 = (ID-helper(6400),ID)>0
var(1) = 1

[state -2]
type = DisplayToClipBoard
trigger1 = 1
text = "count=%d a=%f"
params = var(1),fvar(1)
ignorehitpause=1

[state 6400]
type = ChangeState
trigger1 = time&&IsHelper(6402)&&(!numhelper(6401)||!numhelper(6400))&&var(1)=2
trigger2 = time&&IsHelper(6402)&&!numhelper(6401)&&numhelper(6400)&&var(1)=1
trigger2 = helper(6400),var(1)=2
trigger3 = time&&IsHelper(6402)&&!numhelper(6400)&&numhelper(6401)&&var(1)=1
trigger3 = helper(6401),var(1)=2
trigger4 = time&&IsHelper(6402)&&!numhelper(6401)&&!numhelper(6400)&&var(1)=1
trigger5 = time&&IsHelper(6401)&&(!numhelper(6400)||!numhelper(6402))&&var(1)=2
trigger6 = time&&IsHelper(6401)&&!numhelper(6400)&&numhelper(6402)&&var(1)=1
trigger6 = helper(6402),var(1)=2
trigger7 = time&&IsHelper(6401)&&!numhelper(6402)&&numhelper(6400)&&var(1)=1
trigger7 = helper(6400),var(1)=2
trigger8 = time&&IsHelper(6401)&&!numhelper(6400)&&!numhelper(6402)&&var(1)=1
trigger9 = time&&IsHelper(6400)&&(!numhelper(6401)||!numhelper(6402))&&var(1)=2
trigger10 = time&&IsHelper(6400)&&!numhelper(6402)&&numhelper(6401)&&var(1)=1
trigger10 = helper(6401),var(1)=2
trigger11 = time&&IsHelper(6400)&&!numhelper(6401)&&numhelper(6402)&&var(1)=1
trigger11 = helper(6402),var(1)=2
trigger12 = time&&IsHelper(6400)&&!numhelper(6401)&&!numhelper(6402)&&var(1)=1
value = 6400

[state 6400]
type = VarSet
trigger1 = !time&&prevstateno=[6400,6450]
fvar(0) = 0
ignorehitpause=1

[state 6400]
type = VarSet
trigger1 = !time&&prevstateno=[6400,6450]
fvar(1) = 0
ignorehitpause=1

[state 6400]
type = VarSet
trigger1 = !time&&prevstateno=[6400,6450]
fvar(2) = 0
ignorehitpause=1

[state 6400]
type = VarSet
trigger1 = !time&&prevstateno=[6400,6450]
fvar(3) = 0
ignorehitpause=1

[state 6050]
type = Turn
trigger1 = !time&&var(1)=1

[state 6050]
type = null;Turn
trigger1 = root,facing!=facing&&var(1)!=1
trigger2 = root,facing=facing&&var(1)=1

[state 6050]
type = AngleDraw
trigger1 = 1
scale = const(size.xscale)*(1.0-ifelse(time%32<16,time%32*.0167,-0.25+time%32*.0167)),const(size.yscale)*(1.0-ifelse(time%32<16,time%32*.0167,-0.25+time%32*.0167))

[state 6050]
type = Trans
trigger1 = 1
trans = add

[state 6050]
type = null;SprPriority
trigger1 = time%32>=24||time<8
value = 2

[state 6050]
type = null;SprPriority
trigger1 = time%32=[8,23]
value = -2

[state 6000]
type = PosSet
trigger1 = !time
x = ceil(root,pos x)+ifelse(var(1)=2,20,40)*facing
y = ceil(root,pos y)-ifelse(var(1)=2,40,60)

[state 6000]
type = VelSet
trigger1 = 1
x = -7.5*cos(Pi*(time+24)/24)+4.5*sin(Pi*(time+24)/24)
y = 2.25*sin(Pi*(time+24)/24)+4.5*cos(Pi*(time+24)/24)

[state 6000]
type = VelSet
trigger1 = var(1)=1
x = -7.5*cos(Pi*(time+24)/24)+4.5*sin(Pi*(time+24)/24)
y = 2.25*sin(Pi*(time+24)/24)+4.5*cos(Pi*(time+24)/24)

[state 6000]
type = VelSet
trigger1 = var(1)=2
x = -6*cos(Pi*(time+24)/24)+2.25*sin(Pi*(time+24)/24)
y = 4.5*sin(Pi*(time+24)/24)+9*cos(Pi*(time+24)/24)

[state 6000]
type = varadd
trigger1 = var(1)=0
fvar(0) = (-7.5*cos(Pi*(time+24)/24)+4.5*sin(Pi*(time+24)/24))*facing

[state 6000]
type = varadd
trigger1 = var(1)=1
fvar(0) = (-7.5*cos(Pi*(time+24)/24)+4.5*sin(Pi*(time+24)/24))*facing

[state 6000]
type = varadd
trigger1 = var(1)=2
fvar(0) = (-6*cos(Pi*(time+24)/24)+2.25*sin(Pi*(time+24)/24))*facing

[state 6000]
type = varadd
trigger1 = var(1)=0
fvar(1) = 2.25*sin(Pi*(time+24)/24)+4.5*cos(Pi*(time+24)/24)

[state 6000]
type = varadd
trigger1 = var(1)=1
fvar(1) = 2.25*sin(Pi*(time+24)/24)+4.5*cos(Pi*(time+24)/24)

[state 6000]
type = varadd
trigger1 = var(1)=2
fvar(1) = 4.5*sin(Pi*(time+24)/24)+9*cos(Pi*(time+24)/24)


[state 6000]
type = varadd
trigger1 = var(1)=0
fvar(2) = (-7.5*cos(Pi*(time+16)/24)+4.5*sin(Pi*(time+16)/24))*facing

[state 6000]
type = varadd
trigger1 = var(1)=1
fvar(2) = (-7.5*cos(Pi*(time+16)/24)+4.5*sin(Pi*(time+16)/24))*facing

[state 6000]
type = varadd
trigger1 = var(1)=2
fvar(2) = (-6*cos(Pi*(time+16)/24)+2.25*sin(Pi*(time+16)/24))*facing

[state 6000]
type = varadd
trigger1 = var(1)=0
fvar(3) = 2.25*sin(Pi*(time+16)/24)+4.5*cos(Pi*(time+16)/24)

[state 6000]
type = varadd
trigger1 = var(1)=1
fvar(3) = 2.25*sin(Pi*(time+16)/24)+4.5*cos(Pi*(time+16)/24)

[state 6000]
type = varadd
trigger1 = var(1)=2
fvar(3) = 4.5*sin(Pi*(time+16)/24)+9*cos(Pi*(time+16)/24)

[state 6000]
type = PosSet
trigger1 = time
x = ceil(root,pos x)+ifelse(var(1)=2,20,40)*facing+fvar(0)
y = ceil(root,pos y)-ifelse(var(1)=2,40,60)+fvar(1)

[state 6350]
type = null;Explod
trigger1 = !time
id = 6430
anim=6430
pos = 0,0
postype = p1
bindtime = -1
removetime=-1
scale = const(size.xscale)*.25,const(size.yscale)*.25

[state 6350]
type = null;ModifyExplod
trigger1 = time
id = 6430
pos = floor(0-fvar(0)+fvar(2)),floor(0-fvar(1)+fvar(3))
postype = p1

[state 6900]
type = RemoveExplod
triggerall = (ScreenPos Y<0&&Pos Y<=-250)
trigger1 = (var(2)>=780||root,var(12)=1)&&roundstate=2
trigger2 = root,movetype=H&&(root,stateno!=[150,155])&&!root,gethitvar(IsBound)&&root,time>1&&root,time>=4

[state 6900]
type = DestroySelf
triggerall = (ScreenPos Y<0&&Pos Y<=-250)
trigger1 = (var(2)>=780||root,var(12)=1)&&roundstate=2
trigger2 = root,movetype=H&&(root,stateno!=[150,155])&&!root,gethitvar(IsBound)&&root,time>1&&root,time>=4

[state 6900]
type = ChangeState
triggerall = !(ScreenPos Y<0&&Pos Y<=-250)
trigger1 = (var(2)>=780||root,var(12)=1)&&roundstate=2
trigger2 = root,movetype=H&&(root,stateno!=[150,155])&&!root,gethitvar(IsBound)&&root,time>=4&&root,time>1
value = 6450

;魂待機
[statedef 6410]
movetype=A
ctrl = 0
anim = 6400
sprpriority = 2
velset = 0,0

[state 6050]
type = AssertSpecial
trigger1 = 1
flag = noshadow

;何個目か判別
[state 6400]
type = VarSet
trigger1 = !time
var(1) = 0

[state 6400]
type = VarAdd
triggerall = !time
trigger1 = numhelper(6412)
trigger1 = (ID-helper(6412),ID)>0
var(1) = 1

[state 6400]
type = VarAdd
triggerall = !time
trigger1 = numhelper(6411)
trigger1 = (ID-helper(6411),ID)>0
var(1) = 1

[state 6400]
type = VarAdd
triggerall = !time
trigger1 = numhelper(6410)
trigger1 = (ID-helper(6410),ID)>0
var(1) = 1

[state 6000]
type = turn
trigger1 = !time&&ifelse(var(1)=1,facing=root,facing,facing!=root,facing)

[state 6000]
type = turn
trigger1 = !time&&var(1)=1

[state 6000]
type = PosSet
trigger1 = !time
x = ceil(root,pos x)+ifelse(var(1)=2,0,ifelse(var(1)=1,-55,55))*facing
y = ceil(root,pos y)-65-ifelse(var(1)=2,85,0)

[state 6420]
type = ChangeState
trigger1 = Time=(47+var(1)*10)
value = 6420

;魂攻撃
[statedef 6420]
movetype=A
ctrl = 0
anim = 6405
sprpriority = 2
velset = 0,0

[state 6050]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[state 6420]
type = parentvaradd
trigger1 = time=1
var(36) = -1

[state 11455]
type = NotHitBy
trigger1 = 1
value = ,AA,AT

[state 11455]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
slot = 0
stateno=6101
time = 1

[state 6050]
type = PlaySND
trigger1 = !time
value = 30,7

[state 6000]
type = turn
trigger1 = !time&&ifelse(var(1)=1,facing=root,facing,facing!=root,facing)&&prevstateno!=6410

[state 6000]
type = turn
trigger1 = !time&&var(1)=1&&prevstateno!=6410

[state 6900]
type = VarSet
trigger1 = !time&&prevstateno!=6410
fvar(10) = ifelse(root,stateno=220||root,stateno=420||(root,stateno=[1500,1550])||root,stateno=1010,8,ifelse(root,stateno=1060,3,ifelse(root,stateno=210||root,stateno=410,8,ifelse(root,stateno=610,8,3))))

[state 6900]
type = VarSet
trigger1 = !time&&prevstateno!=6410
fvar(11) = ifelse(root,stateno=220||root,stateno=420||(root,stateno=[1500,1550])||root,stateno=1010,0,ifelse(root,stateno=210||root,stateno=410,-4,ifelse(root,stateno=610,4,8)))

[state 6000]
type = PosSet
trigger1 = !time&&prevstateno!=6410
x = ceil(root,pos x)+ifelse(root,stateno=1010,60,ifelse(root,stateno=1060,40,ifelse(stateno=620,10,20)))*facing;+ifelse(var(1)=2,0,ifelse(var(1)=1,-55,55))*facing
y = ceil(root,pos y)-ifelse(root,stateno=1010,90,ifelse(root,stateno=1060,30,ifelse(root,stateno=610,85,ifelse(root,statetype=C||root,stateno=620,45,65))));-ifelse(var(1)=2,85,0)

[state 6000]
type = velset
trigger1 = time=1
x = fvar(10)*1.5
y = fvar(11)*1.5

[state 6000]
type = velset
trigger1 = time=1&&prevstateno=6410
x = 8*1.5
y = ifelse(var(1)=2,4.0,0)*1.5

;Attack Lv.2
[state 200]
type = Hitdef
trigger1 = time=1&&!(ScreenPos Y<0&&Pos Y<=-250)&&!(root,var(1)%2>=1||root,var(1)%8>=4)
damage = floor(floor(44*ifelse(root,fvar(1)<.25,.25,root,fvar(1))*root,fvar(2)*root,fvar(3)*root,fvar(4))*1.22),floor(ceil(44*root,fvar(3)*root,fvar(4)*1.0/4)*1.22)
ground.slidetime = 12+(P2statetype=C)
ground.hittime = 12+(P2statetype=C)
guard.hittime = 10+(P2statetype=C)
pausetime = 1,11+root,var(49)*6
ground.velocity = ifelse(fvar(10)>4,-6.0-(fvar(11)=0)*3,-3.0)*root,const(size.xscale),(ifelse(fvar(11)>0,-7.0,-9.0)-.9)*root,const(size.yscale)
guard.velocity = -10.5*root,const(size.xscale)
ground.cornerpush.veloff = 0
air.velocity =  ifelse(fvar(10)>4,-6.0-(fvar(11)=0)*3,-3.0)*(1.0+ifelse(root,var(3)>31,31,root,var(3))*.04)*root,const(size.xscale),ifelse(root,var(6)%10>0,root,var(6)%10*1.5,(ifelse(fvar(11)>0,-7.0,-9.0)*(51-root,var(3))/51-.9)*root,const(size.yscale))
airguard.velocity = -6*root,const(size.xscale),-2*root,const(size.yscale)
air.cornerpush.veloff = 0
yaccel = .9*root,const(size.yscale)
fall.recover = ifelse(root,var(6)%10>0||root,var(28)>0,0,1)
fall.recovertime = ifelse(root,var(49)&&!root,var(2),39+11,22-ifelse(floor(root,var(14)/55)>10,10,floor(root,var(14)/55))+11)
hitsound = s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,1)
guardsound = s7000,1
getpower = floor(ifelse(root,var(9),0,floor(40*root,fvar(0)/root,fvar(2))*1.250*root,fvar(16))),floor(ifelse(root,var(9),0,ceil(40*root,fvar(0)/root,fvar(2)*1.0/8)*1.250*root,fvar(16)))
givepower = floor(40*ifelse(root,var(1)%4>=2,.5,1.0)*root,fvar(0)/root,fvar(2)*.8)*1.250,floor(40*root,fvar(0)/root,fvar(2)*.8*1.0/8)*1.250
fall = 1
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-180*const(size.xscale))
animtype = Light
ground.type = High
attr = S,SA
hitflag = MAFD
guardflag = MA
persistent=0

;Attack Lv.2
[state 200]
type = Hitdef
trigger1 = time=1&&!(ScreenPos Y<0&&Pos Y<=-250)&&(root,var(1)%2>=1||root,var(1)%8>=4)
damage = floor(floor(44*ifelse(root,fvar(1)<.25,.25,root,fvar(1))*root,fvar(2)*root,fvar(3)*root,fvar(4))*1.22),floor(ceil(44*root,fvar(3)*root,fvar(4)*1.0/4)*1.22)
ground.slidetime = 12+(P2statetype=C)
ground.hittime = 12+(P2statetype=C)
guard.hittime = 10+(P2statetype=C)
pausetime = 1,11+root,var(49)*6
ground.velocity = ifelse(fvar(10)>4,-6.0-(fvar(11)=0)*3,-3.0)*root,const(size.xscale),(ifelse(fvar(11)>0,-11.0,-9.0)-.9)*root,const(size.yscale)
guard.velocity = -10.5*root,const(size.xscale)
ground.cornerpush.veloff = 0
air.velocity =  (-10.0*(1.0+ifelse(root,var(3)>31,31,root,var(3))*.1)-.0011)*root,const(size.xscale),ifelse(root,var(6)%10>0,root,var(6)%10*1.5,(ifelse(fvar(11)>0,-11.0,-9.0)*(51-root,var(3))/51-.9)*root,const(size.yscale))
airguard.velocity = -6*root,const(size.xscale),-2*root,const(size.yscale)
air.cornerpush.veloff = 0
yaccel = .9*root,const(size.yscale)
fall.recover = ifelse(root,var(6)%10>0||root,var(28)>0,0,1)
fall.recovertime = ifelse(root,var(49)&&!root,var(2),39+11,22-ifelse(floor(root,var(14)/55)>10,10,floor(root,var(14)/55))+11)
hitsound = s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,1)
guardsound = s7000,1
getpower = floor(ifelse(root,var(9),0,floor(40*root,fvar(0)/root,fvar(2))*1.250*root,fvar(16))),floor(ifelse(root,var(9),0,ceil(40*root,fvar(0)/root,fvar(2)*1.0/8)*1.250*root,fvar(16)))
givepower = floor(40*ifelse(root,var(1)%4>=2,.5,1.0)*root,fvar(0)/root,fvar(2)*.8)*1.250,floor(40*root,fvar(0)/root,fvar(2)*.8*1.0/8)*1.250
fall = 1
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-180*const(size.xscale))
animtype = Light
ground.type = High
attr = S,SA
hitflag = MAFD
guardflag = MA
persistent=0

[state ]
type=displaytoclipboard
trigger1=movehit=1&&root,numprojid(3621)
trigger1=enemynear,id=enemy,id
ignorehitpause=1
params=root,const(data.sparkno)+352
text="%n"
[state ]
type=displaytoclipboard
trigger1=movehit=1&&root,numprojid(3621)
trigger1=enemynear,id=enemy,id
ignorehitpause=1
params=root,const(data.sparkno)+3620
text="%n"
[state ]
type=displaytoclipboard
trigger1=movehit=1&&numenemy=2&&root,numprojid(3621)
trigger1=enemynear,id=enemy(1),id
ignorehitpause=1
params=root,const(data.guard.sparkno)+352
text="%n"
[state ]
type=displaytoclipboard
trigger1=movehit=1&&numenemy=2&&root,numprojid(3621)
trigger1=enemynear,id=enemy(1),id
ignorehitpause=1
params=root,const(data.guard.sparkno)+3620
text="%n"

;ヒット数補正増加
[state 12000]
type = ParentVarAdd
trigger1 = movehit=1&&numtarget
trigger1 = target,time=0
var(2) = 1
persistent=0
ignorehitpause=1

;空中ヒット数補正増加
[state 12000]
type = ParentVarAdd
trigger1 = movehit=1&&numtarget
trigger1 = target,time=0
var(3) = 1
persistent=0
ignorehitpause=1

;魂中の与ダメージ
[state -2]
type = parentvaradd
trigger1 = root,var(12)
trigger1 = movehit=1&&enemynear,gethitvar(damage)
var(37) = enemynear,gethitvar(damage)
ignorehitpause=1

;魂ヒット判別
[state -2]
type = parentvarset
trigger1 = movecontact=1
var(19) = ifelse(movehit=1,23,-21)
ignorehitpause=1

;ヒットによる増加(スタイリッシュポイント)
[state -2]
type = parentvaradd
trigger1 = movehit=1
fvar(15) = .00005*floor(floor(44*ifelse(root,fvar(1)<.25,.25,root,fvar(1))*root,fvar(2)*root,fvar(3)*root,fvar(4))*1.22)
ignorehitpause=1
persistent=0

[state -2]
type = parentvarset
trigger1 = movehit=1
fvar(14) = root,fvar(1)*root,fvar(2)*root,fvar(3)*root,fvar(4)
ignorehitpause=1
persistent=0

;◇◇ヒットスパーク◇◇
[state 240]
type = VarSet
trigger1 = 1
var(16) = 10;+random%4
persistent=0

;X座標
[state 240]
type = VarSet
trigger1 = 1
var(17) = floor(P2dist X)+ifelse((P2dist X=[1,30]),10,-10)

;Y座標
[state 240]
type = VarSet
trigger1 = 1
var(18) = 0

;ヒットスパーク
[state 1000]
type = Helper
triggerall = movecontact=1
trigger1 = numtarget
trigger1 = target,time=0&&(target,stateno=150||target,stateno=152||target,stateno=154||target,stateno=5000||target,stateno=5010||target,stateno=5020||target,stateno=5070||target,stateno=5080)
trigger2 = movetype=H
trigger3 = !numtarget && P2movetype=A&&(enemynear,prevstateno=5000||enemynear,prevstateno=5010||enemynear,prevstateno=5020||enemynear,prevstateno=5070||enemynear,prevstateno=5080)&&enemynear,time=1
id = 7000
stateno=7000+(movehit)*100
pos = var(17),var(18)
postype = p1
ignorehitpause=1
ownpal = 1
pausemovetime=99999
supermovetime=99999
size.xscale = .5
size.yscale = .5

;カウンターヒットエフェクト
[state -2]
type = Explod
triggerall = root,var(49)&&movehit=1
trigger1 = numtarget
trigger1 = target,time=0&&(target,stateno=150||target,stateno=152||target,stateno=154||target,stateno=5000||target,stateno=5010||target,stateno=5020||target,stateno=5070||target,stateno=5080)
trigger2 = movetype=H
trigger3 = !numtarget && P2movetype=A&&(enemynear,prevstateno=5000||enemynear,prevstateno=5010||enemynear,prevstateno=5020||enemynear,prevstateno=5070||enemynear,prevstateno=5080)&&enemynear,time=1
id = 7760
anim = 7760
pos = var(17),var(18)
postype = p1
ignorehitpause=1
pausemovetime=99999
supermovetime=99999
bindtime=-1
ontop = 1
ownpal = 1
scale = .5,.5

[state 900]
type = TargetState
trigger1 = movehit=1 && numtarget && root,var(6)%10<1 && (root,var(1)%2>=1||root,var(1)%8>=4)
trigger1 = target,time=0
value = ifelse(root,var(1)%8>=4,936,926)
ignorehitpause=1
persistent=0

;ガードクラッシュ減少値判別
[State 100, Helper]
type = Helper
triggerall = moveguarded=1&&!numhelper(15909)&&IsHelper
triggerall = !enemynear,numpartner
trigger1 = numtarget
trigger1 = target,time=0 && (target,stateno=150||target,stateno=152||target,stateno=154)
trigger2 = !numtarget && movetype=H && (P2stateno=[150,155])
id = 15905+2
stateno=15905
pos = 0,0
postype = p2
ownpal = 1
ignorehitpause = 1

;気絶増加値判別
[State 100, Helper]
type = Helper
triggerall = movehit=1&&!numhelper(15380)&&root,var(28)>=0&&IsHelper
triggerall = !enemynear,numpartner
trigger1 = numtarget
trigger1 = target,time=0 && (target,stateno=5000||target,stateno=5010||target,stateno=5020||target,stateno=5070||target,stateno=5080)
trigger2 = !numtarget && movetype=H && P2movetype=H && (P2stateno!=[150,155])
id = 15380+7
stateno=15380
pos = 0,0
postype = p2
ownpal = 1
ignorehitpause = 1

[state 11455]
type = parentvarset
trigger1 = movehit=1&&!numtarget
fvar(25) = uniqhitcount-hitcount+1

[state 11455]
type = StatetypeSet
trigger1 = (Vel Y>0&&Pos Y>=-Vel Y)||FrontEdgedist<=-40||(ScreenPos Y<0&&Pos Y<=-250)
movetype=I

[state 11455]
type = RemoveExplod
trigger1 = (Vel Y>0&&Pos Y>=-Vel Y)||FrontEdgedist<=-40||(ScreenPos Y<0&&Pos Y<=-250)

[state 6900]
type = DestroySelf
trigger1 = (Vel Y>0&&Pos Y>=-Vel Y)||FrontEdgedist<=-40||(ScreenPos Y<0&&Pos Y<=-250)

;魂反乱待機
[statedef 6450]
movetype=A
ctrl = 0
anim = 6400
sprpriority = 2
velset = 0,0

[state 6050]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[state 6000]
type = turn
trigger1 = !time&&ifelse(var(1)=1,facing=root,facing,facing!=root,facing)

[state 6000]
type = turn
trigger1 = !time&&var(1)=1

[state 6000]
type = null;PosSet
trigger1 = !time
x = ceil(root,pos x)+ifelse(var(1)=2,0,ifelse(var(1)=1,-55,55))*facing
y = ceil(root,pos y)-65-ifelse(var(1)=2,85,0)

[state 6000]
type = PosAdd
trigger1 = !time&&RootDist X>0
x = RootDist X*2

[state 6420]
type = varadd
trigger1 = !time&&numhelper(6400)&&!IsHelper(6400)
trigger1 = helper(6400),stateno=[6450,6460]
var(0) = 1

[state 6420]
type = varadd
trigger1 = !time&&numhelper(6401)&&!IsHelper(6401)
trigger1 = helper(6401),stateno=[6450,6460]
var(0) = 1

[state 6420]
type = varadd
trigger1 = !time&&numhelper(6402)&&!IsHelper(6402)
trigger1 = helper(6402),stateno=[6450,6460]
var(0) = 1

[state 6420]
type = ChangeState
trigger1 = Time=var(1)*10+6
value = 6460

;魂反乱
[statedef 6460]
movetype=A
ctrl = 0
anim = 6405
sprpriority = 2
velset = 0,0

[state 6050]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[state 11455]
type = NotHitBy
trigger1 = 1
value = ,AA,AT

[state 11455]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
slot = 0
stateno=6101
time = 1

[state 11400]
type = PalFX
trigger1 = 1
add = 0,0,128
time=1

[state 11400]
type = Trans
trigger1 = 1
trans = add

;□コンボ補正□
[state -1]
type = varset
trigger1 = 1
fvar(1) = 1-(var(0)!=0)*ifelse(var(0)>1,.28,.25);*ifelse(var(0)>1,.45,.4)
ignorehitpause=1

;空中・しゃがみ・カウンター時補正
[state -1]
type = varset
trigger1 = 1
fvar(3) = ifelse(root,statetype=A&&!(root,movetype=H&&(root,stateno!=[150,155])),1.2,ifelse(root,statetype=C,1.1,1.0))*ifelse(root,movetype=A,1.1,1.0)
ignorehitpause=1

;逆根性値補正
[state -1]
type = varset
trigger1 = 1
fvar(4) = ifelse((root,life*1.00/root,const(data.life))<.125,.75,ifelse((root,life*1.00/root,const(data.life))<.25,.80,ifelse((root,life*1.00/root,const(data.life))<.5,.85,1)))
ignorehitpause=1

;最終コンボ補正
[state -2]
type = varset
trigger1 = 1
fvar(0) = fvar(1)*fvar(3)*fvar(4)
ignorehitpause=1

[state 6050]
type = PlaySND
trigger1 = !time
value = 30,7

[state 6000]
type = velset
trigger1 = time=1
x = ifelse(var(1)=2,-3,ifelse(var(1)=1,-8,-8))*1.375
y = ifelse(var(1)=2,8,3)*1.375

;Attack Lv.2
[state 200]
type = Hitdef
trigger1 = time=1&&!(ScreenPos Y<0&&Pos Y<=-250)
damage = floor(floor(ifelse(var(0)!=0,44,66)*ifelse(fvar(1)<.25,.25,fvar(1))*fvar(3)*fvar(4))*1.22),floor(ceil(ifelse(var(0)!=0,44,66)*fvar(3)*fvar(4)*1.0/4)*1.22)
ground.slidetime = 12+(root,statetype=C)
ground.hittime = 12+(root,statetype=C)
guard.hittime = 10+(root,statetype=C)
pausetime = 1,11+(root,movetype=A)*6
ground.velocity = 3*root,const(size.xscale)*ifelse(teamside=2,-1,1),-12.0*root,const(size.yscale)
guard.velocity = 10.5*root,const(size.xscale)*ifelse(teamside=2,-1,1)
ground.cornerpush.veloff = 0
air.velocity = 3*root,const(size.xscale)*ifelse(teamside=2,-1,1),ifelse(root,statetype=L,2,-12.0*root,const(size.yscale))
airguard.velocity = 6*ifelse(teamside=2,-1,1)*root,const(size.xscale),-2*root,const(size.yscale)
air.cornerpush.veloff = 0
yaccel = .9*root,const(size.yscale)
fall.recover = ifelse(root,statetype=L||root,var(26)>0,0,1)
fall.recovertime = ifelse(root,movetype=A&&!IsHelper(6400),39+11,22+11)
hitsound = s7100,1
guardsound = s7000,1
getpower = 0,0
givepower = floor(33*.8*fvar(1))*1.250,floor(33*.8*1.0/8)*1.250
fall = 1
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-180*const(size.xscale))
animtype = Light
ground.type = High
attr = S,SA
hitflag = MAFD
guardflag = MA
affectteam = F
numhits = 0
persistent=0

;◇◇ヒットスパーク◇◇
[state 240]
type = VarSet
trigger1 = 1
var(16) = 10;+random%4
persistent=0

;X座標
[state 240]
type = VarSet
trigger1 = 1
var(17) = floor(rootdist X)+ifelse((rootdist X=[1,40]),10,-10)

;Y座標
[state 240]
type = VarSet
trigger1 = 1
var(18) = 0

;ヒットスパーク
[state 1000]
type = Helper
triggerall = movecontact=1
trigger1 = numtarget
trigger1 = target,time=0&&(target,stateno=150||target,stateno=152||target,stateno=154||target,stateno=5000||target,stateno=5010||target,stateno=5020||target,stateno=5070||target,stateno=5080)
trigger2 = movetype=H
trigger3 = !numtarget && P2movetype=A&&(enemynear,prevstateno=5000||enemynear,prevstateno=5010||enemynear,prevstateno=5020||enemynear,prevstateno=5070||enemynear,prevstateno=5080)&&enemynear,time=1
id = 7000
stateno=7000+(movehit)*100
pos = var(17),var(18)
postype = p1
ignorehitpause=1
ownpal = 1
pausemovetime=99999
supermovetime=99999
size.xscale = .5
size.yscale = .5

;カウンターヒットエフェクト
[state -2]
type = Explod
triggerall = root,var(49)&&movehit=1
trigger1 = numtarget
trigger1 = target,time=0&&(target,stateno=150||target,stateno=152||target,stateno=154||target,stateno=5000||target,stateno=5010||target,stateno=5020||target,stateno=5070||target,stateno=5080)
trigger2 = movetype=H
trigger3 = !numtarget && P2movetype=A&&(enemynear,prevstateno=5000||enemynear,prevstateno=5010||enemynear,prevstateno=5020||enemynear,prevstateno=5070||enemynear,prevstateno=5080)&&enemynear,time=1
id = 7760
anim = 7760
pos = var(17),var(18)
postype = p1
ignorehitpause=1
pausemovetime=99999
supermovetime=99999
bindtime=-1
ontop = 1
ownpal = 1
scale = .5,.5

[state 11455]
type = RemoveExplod
triggerall = time
trigger1 = ScreenPos Y>=240||FrontEdgedist<=-40||(ScreenPos Y<0&&Pos Y<=-250)

[state 6900]
type = DestroySelf
triggerall = time
trigger1 = ScreenPos Y>=240||FrontEdgedist<=-40||(ScreenPos Y<0&&Pos Y<=-250)

;慟哭スル魂・波動
[statedef 1300]
type = S
movetype=A
physics = S
ctrl = 0
velset = ifelse(fvar(9),fvar(9)*0,0),0

[state 200]
type = VarSet
trigger1 = !time&&P2dist X<0&&(prevstateno=52||((prevstateno=[200,1999])&&fvar(10)<=0))
fvar(9) = -fvar(9)

[state 200]
type = Turn
trigger1 = !time&&P2dist X<0&&(prevstateno=52||(prevstateno=[200,1999]))

;速度取得
[state -2]
type = varset
trigger1 = !time
fvar(8) = 0
ignorehitpause=1

;先行入力処理リセット
[state 200]
type = VarSet
trigger1 = !Time
var(53) = 0

[state 200]
type = ChangeAnim
trigger1 = Time=0&&!(var(34)=stateno&&((prevstateno=[130,132])||(prevstateno=150||prevstateno=152)))
value = 1300

[state 190]
type = PlaySND
trigger1 = AnimElem=6
value = 30,5
channel = 10

[state 190]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&AnimElem=6
value = 10,41
channel = 1

[state 1300]
type = varset
trigger1 = !time
var(7) = (numhelper(6400)&&numhelper(6401)&&numhelper(6402))
ignorehitpause=1

[state 1300]
type = changeanim
trigger1 = !time&&var(7)=1
value = 1350

[state 1200]
type = helper
trigger1 = !NumHelper(6500)&&AnimElem=6
id = 6500
stateno= 6500+var(7)*50
pos = floor(160*const(size.xscale)),-floor(180*const(size.xscale))
postype = p1
ownpal = 1
size.xscale = const(size.xscale)*ifelse(var(7),1.25,1.0)
size.yscale = const(size.yscale)*ifelse(var(7),1.25,1.0)
ignorehitpause=1

;ブースト
[state 900]
type = ChangeState
triggerall = AnimElemTime(7)>=0 && var(1)%2>=1 && var(7) && !(var(52)>1&&movecontact)
trigger1 = command="holdfwd"&&!var(59)
trigger2 = var(59)
value = 2000

[state 900]
type = StatetypeSet
trigger1 = AnimElem=8&&var(7)
physiscs = N

[state 900]
type = StatetypeSet
trigger1 = AnimElem=8,>0&&var(7)&&fvar(8)>-.5
physiscs = S

;現在の速度取得
[state 900]
type = VarSet
trigger1 = AnimElem=8&&var(7)
fvar(8) = -15.0

[state 900]
type = VarSet
trigger1 = fvar(8)<=-.5
fvar(8) = fvar(8)*.85

[state 900]
type = VarSet
trigger1 = fvar(8)>-.5
fvar(8) = 0

[state -2]
type = velset
trigger1 = fvar(8)<0 && !fvar(9) && !(fvar(5) && !fvar(7)&&(enemynear,backedgebodydist<=5||enemynear,frontedgebodydist<=5))
x = fvar(8)

;~~~自分側のhitpause作成~~
[state 250]
type = varset
trigger1 = time=0
var(52) = 100

[state 250]
type = varadd
trigger1 = movecontact&&var(52)>=0
var(52) = -1

[state 250]
type = varset
trigger1 = movecontact=1
var(52) = 11

[state 250]
type = null;varset
trigger1 = movecontact&&((enemynear,prevstateno=[5000,5099])||(enemynear,prevstateno=[150,155]))&&P2movetype!=H&&var(52)>0
var(52) = 0

[state 250]
type = ChangeAnim
trigger1 = movecontact && var(52)>var(54)
value = anim
elem = ifelse(AnimElemNo(0)=var(47),AnimElemNo(0),AnimElemNo(-1))

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(47) = AnimElemNo(0)

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(54) = AnimElemTime(AnimElemNo(0))

[state 250]
type = PosFreeze
trigger1 = var(52)>0&&movecontact
value = 1
;~~~~~~~~~~~~~~~~~~~~~~

;Attack Lv.2
[state 200]
type = Hitdef
triggerall = !movecontact&&!movereversed
trigger1 = AnimElem=6&&!var(7)
damage = floor(floor(26*ifelse(fvar(1)<.25,.25,fvar(1))*fvar(2)*fvar(3)*fvar(4))*1.22),floor(ceil(26*fvar(3)*fvar(4)*1.0/4))
ground.slidetime = 12+(P2statetype=C)
ground.hittime = 12+(P2statetype=C)
guard.slidetime = 10
guard.hittime = 10
pausetime = 1,11+var(49)*6
ground.velocity = -10.5*(1.0+ifelse(var(2)>31,31,var(2))*.02)*const(size.xscale)
guard.velocity = ifelse(numtarget(920),-44,-10.5)*const(size.xscale)
ground.cornerpush.veloff = 0
air.velocity = ifelse(var(1)%8>=4||var(1)%2>=1,-10.0*(1.0+ifelse(var(2)>31,31,var(2))*.05)-.0011,-4.0*(1.0+ifelse(var(3)>31,31,var(3))*.04)*const(size.xscale)),ifelse(var(6)%10>0,var(6)%10*1.5,(-8.0*(51-var(3))/51-.9)*const(size.yscale))
airguard.velocity = -6*const(size.xscale),-2*const(size.yscale)
air.cornerpush.veloff = 0
yaccel = .9*const(size.yscale)
fall.recover = ifelse(var(6)%10>0||var(28)>0,0,1)
fall.recovertime = ifelse(var(49)&&!var(2),24+ifelse(var(1)%4>=2,8,11),12-ifelse(floor(var(14)/85)>6,6,floor(var(14)/85))+ifelse(var(1)%4>=2,8,11))
hitsound = s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,1)
guardsound = s7000,1
getpower = floor(ifelse(var(9),0,floor(33*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2))*1.250*fvar(16))),floor(ifelse(var(9),0,ceil(33*fvar(0)/fvar(2)*1.0/8)*1.250*fvar(16)))
givepower = floor(33*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2)*.8)*1.250,floor(33*fvar(0)/fvar(2)*.8*1.0/8)*1.250
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-100*const(size.xscale))
animtype = Light
ground.type = High
attr = S,SA
hitflag = MAFD
guardflag = MA

;Attack Lv.2
[state 200]
type = Hitdef
triggerall = !movecontact&&!movereversed
trigger1 = AnimElem=6&&var(7)
damage = floor(floor(26*ifelse(fvar(1)<.25,.25,fvar(1))*fvar(2)*fvar(3)*fvar(4))*1.22),floor(ceil(26*fvar(3)*fvar(4)*1.0/4))
ground.slidetime = 12+(P2statetype=C)
ground.hittime = 12+(P2statetype=C)
guard.slidetime = 10
guard.hittime = 10
pausetime = 1,11+var(49)*6
ground.velocity = ifelse(var(1)%16<8,-10.0-.0011,-10.5*(1.0+ifelse(var(2)>31,31,var(2))*.02)*const(size.xscale)),-11*const(size.yscale)
guard.velocity = ifelse(numtarget(920),-44,-10.5)*const(size.xscale)
ground.cornerpush.veloff = 0
air.velocity = ifelse(var(1)%8>=4||var(1)%2>=1||var(1)%16<8,-10.0*(1.0+ifelse(var(2)>31,31,var(2))*.05)-.0011,-4.0*(1.0+ifelse(var(3)>31,31,var(3))*.04)*const(size.xscale)),ifelse(var(6)%10>0,var(6)%10*1.5,(-8.0*(51-var(3))/51-.9)*const(size.yscale))
airguard.velocity = -6*const(size.xscale),-2*const(size.yscale)
air.cornerpush.veloff = 0
yaccel = .9*const(size.yscale)
fall.recover = ifelse(var(6)%10>0||var(28)>0,0,1)
fall.recovertime = ifelse(var(49)&&!var(2),24+ifelse(var(1)%4>=2,8,11),12-ifelse(floor(var(14)/85)>6,6,floor(var(14)/85))+ifelse(var(1)%4>=2,8,11))
hitsound = s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,1)
guardsound = s7000,1
getpower = floor(ifelse(var(9),0,floor(33*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2))*1.250*fvar(16))),floor(ifelse(var(9),0,ceil(33*fvar(0)/fvar(2)*1.0/8)*1.250*fvar(16)))
givepower = floor(33*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2)*.8)*1.250,floor(33*fvar(0)/fvar(2)*.8*1.0/8)*1.250
fall = 1
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-100*const(size.xscale))
animtype = Light
ground.type = High
attr = S,SA
hitflag = MAFD
guardflag = MA

;==壁ダウンに
[state 920]
type = varset
trigger1 = movehit=1 && numtarget&&var(6)%10<1
trigger1 = target,time=0&&var(7)
var(1) = ifelse(var(1)%16<8,4+8,0)-(var(1)%2>=1)*1
ignorehitpause=1
persistent=0

[state 900]
type = TargetState
trigger1 = movehit=1 && numtarget&&var(6)%10<1
trigger1 = target,time=0&&var(7)
value = 936
ignorehitpause=1
persistent=0

;ヒットによる増加(スタイリッシュポイント)
[state -2]
type = varadd
trigger1 = movehit=1
fvar(15) = .00005*floor(ifelse(26*fvar(0)<1,1+(var(2)%5=4),26*fvar(0))*1.22)
ignorehitpause=1

[state -2]
type = varset
trigger1 = movehit=1
fvar(14) = fvar(1)*fvar(2)*fvar(3)*fvar(4)
ignorehitpause=1

;◇◇ヒットスパーク◇◇
[state 240]
type = VarSet
trigger1 = AnimElem=6
var(16) = 10
persistent=0

;X座標
[state 240]
type = VarSet
trigger1 = AnimElem=6,>=0&&AnimElem=7,<0
var(17) = floor(ifelse(P2dist X>108*const(size.xscale),108*const(size.xscale),floor(P2dist X)+ifelse((P2dist X=[1,30]),10,-10)+10))

;Y座標
[state 240]
type = VarSet
trigger1 = AnimElem=6,>=0&&AnimElem=7,<0
var(18) = floor(-160*const(size.yscale))-floor(ifelse(floor(P2dist X)<(28+enemynear,const(size.ground.front)),0,ifelse(floor(P2dist X)>(148*const(size.xscale)),20,(floor(P2dist X)-(20+enemynear,const(size.ground.front)))*.5)))


;・・・・自分側ヒットバック・・・・
;ヒットバック量取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = var(1)%2<1&&var(1)%8<4&&target,time=0
fvar(5) = ifelse(var(3)&&target,statetype=A&&var(6)%10<1,-12.0*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.06),-10.5*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.1))*const(size.xscale)
ignorehitpause=1

;ヒットバック量取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2>=1||var(1)%8>=4)&&target,time=1
fvar(5) = (-10.5*1.25*((enemynear,backedgebodydist<=5||enemynear,frontedgebodydist<=5||var(1)%8>=4)&&fvar(10)<=0)*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.1))*const(size.xscale)
ignorehitpause=1

;ヒットバック時間取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2<1&&var(1)%8<4&&target,time=0)||((var(1)%2>=1||var(1)%8>=4)&&target,time=1)
fvar(6) = ifelse(moveguarded,10,12+(P2statetype=C))
ignorehitpause=1

;ヒットポーズ取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2<1&&var(1)%8<4&&target,time=0)||((var(1)%2>=1||var(1)%8>=4)&&target,time=1)
fvar(7) = (11-(var(1)%2>=1||var(1)%8>=4))*ifelse(moveguarded,-1,1)
ignorehitpause=1
;・・・・・・・・

[state 1320]
type = ChangeState
trigger1 = AnimTime=0
value = 0
ctrl = 1

;波動（１個）（飛び道具）
[Statedef 6500]
type = A
movetype = A
physics = N
ctrl = 0
velset = 8,0
anim = 6550

[state 6050]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[state 11455]
type = NotHitBy
trigger1 = 1
value = ,AA,AT

[state 11455]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
slot = 0
stateno=6101
time = 1

[state 6500]
type = Explod
trigger1 = !time
id = 6500
anim = 6500
postype = p1
pos = 0,0
bindtime=-1
sprpriority = 4
removeongethit=1
scale = const(size.xscale)*1.5,const(size.yscale)*1.5
ignorehitpause=1

[state 6500]
type = Explod
trigger1 = !time
id = 6530
anim = 6530
postype = p1
pos = 0,0
bindtime=-1
sprpriority = 4
removeongethit=1
scale = const(size.xscale),const(size.yscale)
ignorehitpause=1

[state 6500]
type = Explod
trigger1 = !time
id = 6520
anim = 6520
postype = p1
pos = 0,0
bindtime=-1
sprpriority = 4
removeongethit=1
scale = const(size.xscale)*1.5,const(size.yscale)*1.5
ignorehitpause=1

[state 6500]
type = Explod
trigger1 = !time
id = 6510
anim = 6510
postype = p1
pos = 0,0
bindtime=-1
sprpriority = 4
removeongethit=1
scale = const(size.xscale)*1.5,const(size.yscale)*1.5
ignorehitpause=1

;Attack Lv.3
[state 200]
type = Hitdef
trigger1 = 1
damage = floor(ifelse(52*root,fvar(0)<1,1+(root,var(2)%5=4),ceil(52*root,fvar(0)))*1.22),ceil(floor(52*root,fvar(0)*1.0/4)*1.22)
ground.slidetime = 14+(P2statetype=C)
ground.hittime = 14+(P2statetype=C)
guard.slidetime = 12
guard.hittime = 12
pausetime = 7,6+root,var(49)*6
ground.velocity = -12.0*(1.0+ifelse(root,var(2)>31,31,root,var(2))*.02)*const(size.xscale)
guard.velocity = -12.0*const(size.xscale)
ground.cornerpush.veloff = 0
air.velocity = ifelse(root,var(1)%8>=4||root,var(1)%2>=1,-10.0*(1.0+ifelse(root,var(3)>31,31,root,var(3))*.1)-.0006,-10.0*const(size.xscale)),ifelse(root,var(6)%10>0,root,var(6)%10*1.5,(-13.0*(51-root,var(3))/51-.9)*const(size.yscale))
airguard.velocity = -6*const(size.xscale),-2*const(size.yscale)
air.cornerpush.veloff = 0
yaccel = .9*const(size.yscale)
fall.recover = 1
fall.recovertime = ifelse(root,var(49)&&!root,var(2),39+11,22-ifelse(floor(root,var(14)/70)>7,7,floor(root,var(14)/70))+11)
hitsound = s7100,2
guardsound = s7000,2
getpower = floor(ifelse(root,var(9),0,floor(55*root,fvar(0)/root,fvar(2))*1.250*root,fvar(16))),floor(ifelse(root,var(9),0,ceil(55*root,fvar(0)/root,fvar(2)*1.0/8)*1.250*root,fvar(16)))
givepower = floor(55*ifelse(root,var(1)%4>=2,.5,1.0)*root,fvar(0)/root,fvar(2)*.8)*1.250,floor(55*root,fvar(0)/root,fvar(2)*.8*1.0/8)*1.250
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-260*const(size.xscale))
animtype = hard
ground.type = High
attr = S,SP
hitflag = MAFD
guardflag = MA
palfx.time=ifelse(p2statetype=A,40,14+(P2statetype=C)+root,var(49)*6)+6
palfx.sinadd = 96,48,0,4
palfx.color = 0
palfx.add = 56,-96,-208
palfx.invertall = 1

[state ]
type=displaytoclipboard
trigger1=movehit=1&&root,numprojid(3621)
trigger1=enemynear,id=enemy,id
ignorehitpause=1
params=root,const(data.sparkno)+352
text="%n"
[state ]
type=displaytoclipboard
trigger1=movehit=1&&root,numprojid(3621)
trigger1=enemynear,id=enemy,id
ignorehitpause=1
params=root,const(data.sparkno)+3620
text="%n"
[state ]
type=displaytoclipboard
trigger1=movehit=1&&numenemy=2&&root,numprojid(3621)
trigger1=enemynear,id=enemy(1),id
ignorehitpause=1
params=root,const(data.guard.sparkno)+352
text="%n"
[state ]
type=displaytoclipboard
trigger1=movehit=1&&numenemy=2&&root,numprojid(3621)
trigger1=enemynear,id=enemy(1),id
ignorehitpause=1
params=root,const(data.guard.sparkno)+3620
text="%n"

;ヒット数補正増加
[state 12000]
type = ParentVarAdd
trigger1 = movehit=1&&numtarget
var(2) = 1
persistent=0
ignorehitpause=1

;空中ヒット数補正増加
[state 12000]
type = ParentVarAdd
trigger1 = movehit=1&&numtarget&&root,var(3)
var(3) = 1
persistent=0
ignorehitpause=1

;魂中の与ダメージ
[state -2]
type = parentvaradd
trigger1 = root,var(12)
trigger1 = movehit=1&&enemynear,gethitvar(damage)
var(37) = enemynear,gethitvar(damage)
ignorehitpause=1

;ヒットによる増加(スタイリッシュポイント)
[state -2]
type = parentvaradd
trigger1 = movehit=1
fvar(15) = .00005*floor(floor(52*ifelse(root,fvar(1)<.25,.25,root,fvar(1))*root,fvar(2)*root,fvar(3)*root,fvar(4))*1.22)
ignorehitpause=1

[state -2]
type = parentvarset
trigger1 = movehit=1
fvar(14) = root,fvar(1)*root,fvar(2)*root,fvar(3)*root,fvar(4)
ignorehitpause=1

;◇◇ヒットスパーク◇◇
[state 240]
type = VarSet
trigger1 = 1
var(16) = 10;+random%4
persistent=0

;X座標
[state 240]
type = VarSet
trigger1 = 1
var(17) = floor(P2dist X)+ifelse((P2dist X=[1,30]),10,-10)

;Y座標
[state 240]
type = VarSet
trigger1 = 1
var(18) = 0

;ヒットスパーク
[state 1000]
type = Helper
triggerall = movecontact=1
trigger1 = numtarget
trigger1 = target,time=0&&(target,stateno=150||target,stateno=152||target,stateno=154||target,stateno=5000||target,stateno=5010||target,stateno=5020||target,stateno=5070||target,stateno=5080)
trigger2 = movetype=H
trigger3 = !numtarget && P2movetype=A&&(enemynear,prevstateno=5000||enemynear,prevstateno=5010||enemynear,prevstateno=5020||enemynear,prevstateno=5070||enemynear,prevstateno=5080)&&enemynear,time=1
id = 7000
stateno=7000+(movehit)*100
pos = var(17),var(18)
postype = p1
ignorehitpause=1
ownpal = 1
pausemovetime=99999
supermovetime=99999
size.xscale = .5
size.yscale = .5

;カウンターヒットエフェクト
[state -2]
type = Explod
triggerall = root,var(49)&&movehit=1
trigger1 = numtarget
trigger1 = target,time=0&&(target,stateno=150||target,stateno=152||target,stateno=154||target,stateno=5000||target,stateno=5010||target,stateno=5020||target,stateno=5070||target,stateno=5080)
trigger2 = movetype=H
trigger3 = !numtarget && P2movetype=A&&(enemynear,prevstateno=5000||enemynear,prevstateno=5010||enemynear,prevstateno=5020||enemynear,prevstateno=5070||enemynear,prevstateno=5080)&&enemynear,time=1
id = 7760
anim = 7760
pos = var(17),var(18)
postype = p1
ignorehitpause=1
pausemovetime=99999
supermovetime=99999
bindtime=-1
ontop = 1
ownpal = 1
scale = .5,.5

[state 900]
type = TargetState
trigger1 = movehit=1 && numtarget && root,var(6)%10<1 && (root,var(1)%2>=1||root,var(1)%8>=4)
trigger1 = target,time=0
value = ifelse(root,var(1)%8>=4,936,926)
ignorehitpause=1
persistent=0

[state 11455]
type = parentvarset
trigger1 = movehit=1&&!numtarget
fvar(25) = uniqhitcount-hitcount+1

;ガードクラッシュ減少値判別
[State 100, Helper]
type = Helper
triggerall = moveguarded=1&&!numhelper(15909)&&IsHelper
triggerall = !enemynear,numpartner
trigger1 = numtarget
trigger1 = target,time=0 && (target,stateno=150||target,stateno=152||target,stateno=154)
trigger2 = !numtarget && movetype=H && (P2stateno=[150,155])
id = 15905+1
stateno=15905
pos = 0,0
postype = p2
ownpal = 1
ignorehitpause = 1

;気絶増加値判別
[State 100, Helper]
type = Helper
triggerall = movehit=1&&!numhelper(15380)&&root,var(28)>=0&&IsHelper
triggerall = !enemynear,numpartner
trigger1 = numtarget
trigger1 = target,time=0 && (target,stateno=5000||target,stateno=5010||target,stateno=5020||target,stateno=5070||target,stateno=5080)
trigger2 = !numtarget && movetype=H && P2movetype=H && (P2stateno!=[150,155])
id = 15380+6
stateno=15380
pos = 0,0
postype = p2
ownpal = 1
ignorehitpause = 1

[state 11455]
type = RemoveExplod
trigger1 = movecontact||frontedgebodydist<=-30

[state 11455]
type = DestroySelf
trigger1 = movecontact||frontedgebodydist<=-30

;波動（３個）（飛び道具）
[Statedef 6550]
type = A
movetype = A
physics = N
ctrl = 0
velset = 9,0
anim = 6555

[state 11455]
type = varset
trigger1 = !time&&numexplod(6500)
var(0)=1

[state 6050]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[state 11455]
type = NotHitBy
trigger1 = 1
value = ,AA,AT

[state 11455]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP
slot = 0
stateno=ifelse(var(0),6101,stateno)
time = 1

[state 6500]
type = Explod
trigger1 = !time
id = 6500
anim = 6500
postype = p1
pos = 0,0
bindtime=-1
sprpriority = 4
removeongethit=ifelse(var(0),1,0)
scale = const(size.xscale)*1.5,const(size.yscale)*1.5
ignorehitpause=1

[state 6500]
type = Explod
trigger1 = !time
id = 6530
anim = 6530
postype = p1
pos = 0,0
bindtime=-1
sprpriority = 4
removeongethit=ifelse(var(0),1,0)
scale = const(size.xscale),const(size.yscale)
ignorehitpause=1

[state 6500]
type = Explod
trigger1 = !time
id = 6520
anim = 6520
postype = p1
pos = 0,0
bindtime=-1
sprpriority = 4
removeongethit=ifelse(var(0),1,0)
scale = const(size.xscale)*1.5,const(size.yscale)*1.5
ignorehitpause=1

[state 6500]
type = Explod
trigger1 = !time
id = 6510
anim = 6510
postype = p1
pos = 0,0
bindtime=-1
sprpriority = 4
removeongethit=ifelse(var(0),1,0)
scale = const(size.xscale)*1.5,const(size.yscale)*1.5
ignorehitpause=1

;Attack Lv.5
[state 200]
type = Hitdef
trigger1 = !movecontact&&!movereversed
damage = floor(ifelse(105*root,fvar(0)<1,1+(root,var(2)%5=4),ceil(105*root,fvar(0)))*1.22),ceil(floor(105*root,fvar(0)*1.0/4)*1.22)
ground.slidetime = 20+(P2statetype=C)
ground.hittime = 20+(P2statetype=C)
guard.slidetime = 18
guard.hittime = 18
pausetime = 1,14+root,var(49)*7
ground.velocity = -10.0*(1.0+ifelse(root,var(2)>31,31,root,var(2))*.02)*const(size.xscale),(-9.0-.9)*const(size.yscale)
guard.velocity = -15.0*const(size.xscale)
ground.cornerpush.veloff = 0
air.velocity = ifelse(root,var(1)%8>=4||root,var(1)%2>=1,-10.0*(1.0+ifelse(root,var(3)>31,31,root,var(3))*.1)-.0014,-10.0*const(size.xscale)),ifelse(root,var(6)%10>0,root,var(6)%10*1.5,(-9.0*(51-root,var(3))/51-.9)*const(size.yscale))
airguard.velocity = -6*const(size.xscale),-2*const(size.yscale)
air.cornerpush.veloff = 0
yaccel = .9*const(size.yscale)
fall.recover = 0
hitsound = s7100,2
guardsound = s7000,2
getpower = floor(ifelse(root,var(9),0,floor(55*root,fvar(0)/root,fvar(2))*1.250*root,fvar(16))),floor(ifelse(root,var(9),0,ceil(55*root,fvar(0)/root,fvar(2)*1.0/8)*1.250*root,fvar(16)))
givepower = floor(55*ifelse(root,var(1)%4>=2,.5,1.0)*root,fvar(0)/root,fvar(2)*.8)*1.250,floor(55*root,fvar(0)/root,fvar(2)*.8*1.0/8)*1.250
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-260*const(size.xscale))
animtype = hard
ground.type = High
attr = S,SP
hitflag = MAFD
guardflag = MA
palfx.time=24+14
palfx.sinadd = 96,48,0,4
palfx.color = 0
palfx.add = 56,-96,-208
palfx.invertall = 1

[state ]
type=displaytoclipboard
trigger1=movehit=1&&root,numprojid(3621)
trigger1=enemynear,id=enemy,id
ignorehitpause=1
params=root,const(data.sparkno)+352
text="%n"
[state ]
type=displaytoclipboard
trigger1=movehit=1&&root,numprojid(3621)
trigger1=enemynear,id=enemy,id
ignorehitpause=1
params=root,const(data.sparkno)+3620
text="%n"
[state ]
type=displaytoclipboard
trigger1=movehit=1&&numenemy=2&&root,numprojid(3621)
trigger1=enemynear,id=enemy(1),id
ignorehitpause=1
params=root,const(data.guard.sparkno)+352
text="%n"
[state ]
type=displaytoclipboard
trigger1=movehit=1&&numenemy=2&&root,numprojid(3621)
trigger1=enemynear,id=enemy(1),id
ignorehitpause=1
params=root,const(data.guard.sparkno)+3620
text="%n"

;ヒット数補正増加
[state 12000]
type = ParentVarAdd
trigger1 = movehit=1&&numtarget
var(2) = 1
persistent=0
ignorehitpause=1

;空中ヒット数補正増加
[state 12000]
type = ParentVarAdd
trigger1 = movehit=1&&numtarget&&root,var(3)
var(3) = 1
persistent=0
ignorehitpause=1

;魂中の与ダメージ
[state -2]
type = parentvaradd
trigger1 = root,var(12)
trigger1 = movehit=1&&enemynear,gethitvar(damage)
var(37) = enemynear,gethitvar(damage)
ignorehitpause=1

;ヒットによる増加(スタイリッシュポイント)
[state -2]
type = parentvaradd
trigger1 = movehit=1
fvar(15) = .00005*floor(floor(105*ifelse(root,fvar(1)<.25,.25,root,fvar(1))*root,fvar(2)*root,fvar(3)*root,fvar(4))*1.22)
ignorehitpause=1

[state -2]
type = parentvarset
trigger1 = movehit=1
fvar(14) = root,fvar(1)*root,fvar(2)*root,fvar(3)*root,fvar(4)
ignorehitpause=1

;◇◇ヒットスパーク◇◇
[state 240]
type = VarSet
trigger1 = 1
var(16) = 10;+random%4
persistent=0

;X座標
[state 240]
type = VarSet
trigger1 = 1
var(17) = floor(P2dist X)+ifelse((P2dist X=[1,30]),10,-10)

;Y座標
[state 240]
type = VarSet
trigger1 = 1
var(18) = 0

;ヒットスパーク
[state 1000]
type = Helper
triggerall = movecontact=1
trigger1 = numtarget
trigger1 = target,time=0&&(target,stateno=150||target,stateno=152||target,stateno=154||target,stateno=5000||target,stateno=5010||target,stateno=5020||target,stateno=5070||target,stateno=5080)
trigger2 = movetype=H
trigger3 = !numtarget && P2movetype=A&&(enemynear,prevstateno=5000||enemynear,prevstateno=5010||enemynear,prevstateno=5020||enemynear,prevstateno=5070||enemynear,prevstateno=5080)&&enemynear,time=1
id = 7000
stateno=7000+(movehit)*100
pos = var(17),var(18)
postype = p1
ignorehitpause=1
ownpal = 1
pausemovetime=99999
supermovetime=99999
size.xscale = .5
size.yscale = .5

;カウンターヒットエフェクト
[state -2]
type = Explod
triggerall = root,var(49)&&movehit=1
trigger1 = numtarget
trigger1 = target,time=0&&(target,stateno=150||target,stateno=152||target,stateno=154||target,stateno=5000||target,stateno=5010||target,stateno=5020||target,stateno=5070||target,stateno=5080)
trigger2 = movetype=H
trigger3 = !numtarget && P2movetype=A&&(enemynear,prevstateno=5000||enemynear,prevstateno=5010||enemynear,prevstateno=5020||enemynear,prevstateno=5070||enemynear,prevstateno=5080)&&enemynear,time=1
id = 7760
anim = 7760
pos = var(17),var(18)
postype = p1
ignorehitpause=1
pausemovetime=99999
supermovetime=99999
bindtime=-1
ontop = 1
ownpal = 1
scale = .5,.5

;==壁ダウンに
[state 920]
type = parentvaradd
trigger1 = movehit=1 && numtarget && root,var(6)%10<1 && root,var(1)%2<1
trigger1 = target,time=0
var(1) = 1-(root,var(1)%16>=8&&root,var(1)%8>=4)*4
ignorehitpause=1
persistent=0

[state 900]
type = TargetState
trigger1 = movehit=1 && numtarget && root,var(6)%10<1
trigger1 = target,time=0
value = 926
ignorehitpause=1
persistent=0

[state 11455]
type = parentvarset
trigger1 = movehit=1&&!numtarget
fvar(25) = uniqhitcount-hitcount+1

;ガードクラッシュ減少値判別
[State 100, Helper]
type = Helper
triggerall = moveguarded=1&&!numhelper(15909)&&IsHelper
triggerall = !enemynear,numpartner
trigger1 = numtarget
trigger1 = target,time=0 && (target,stateno=150||target,stateno=152||target,stateno=154)
trigger2 = !numtarget && movetype=H && (P2stateno=[150,155])
id = 15905+1
stateno=15905
pos = 0,0
postype = p2
ownpal = 1
ignorehitpause = 1

;気絶増加値判別
[State 100, Helper]
type = Helper
triggerall = movehit=1&&!numhelper(15380)&&root,var(28)>=0&&IsHelper
triggerall = !enemynear,numpartner
trigger1 = numtarget
trigger1 = target,time=0 && (target,stateno=5000||target,stateno=5010||target,stateno=5020||target,stateno=5070||target,stateno=5080)
trigger2 = !numtarget && movetype=H && P2movetype=H && (P2stateno!=[150,155])
id = 15380+6
stateno=15380
pos = 0,0
postype = p2
ownpal = 1
ignorehitpause = 1

[state 11455]
type = RemoveExplod
trigger1 = frontedgebodydist<=-30

[state 11455]
type = DestroySelf
trigger1 = frontedgebodydist<=-30

;慟哭スル魂・散華
[statedef 1400]
type = S
movetype=A
physics = S
ctrl = 0
velset = ifelse(fvar(9),fvar(9)*0,0),0

[state 200]
type = VarSet
trigger1 = !time&&P2dist X<0&&(prevstateno=52||((prevstateno=[200,1999])&&fvar(10)<=0))
fvar(9) = -fvar(9)

[state 200]
type = Turn
trigger1 = !time&&P2dist X<0&&(prevstateno=52||(prevstateno=[200,1999]))

;速度取得
[state -2]
type = varset
trigger1 = !time
fvar(8) = 0
ignorehitpause=1

;先行入力処理リセット
[state 200]
type = VarSet
trigger1 = !Time
var(53) = 0

[state 200]
type = ChangeAnim
trigger1 = Time=0&&!(var(34)=stateno&&((prevstateno=[130,132])||(prevstateno=150||prevstateno=152)))
value = 1400

[state 190]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&AnimElem=5
value = 10,ifelse(random%2=0,47,49)
channel = 1

[state 1200]
type = varset
trigger1 = !time
var(37) = 0

[state 1200]
type = varset
trigger1 = !time
var(36) = NumHelper(6400)+NumHelper(6401)+NumHelper(6402)

[state 1200]
type = helper
trigger1 = var(36)=3&&AnimElem=5
id = 6412
stateno= 6410
pos = 0,0
postype = p1
ownpal = 1
size.xscale = const(size.xscale)*1.5
size.yscale = const(size.xscale)*1.5
ignorehitpause=1

[state 1200]
type = helper
trigger1 = var(36)>=2&&AnimElem=5
id = 6411
stateno= 6410
pos = 0,0
postype = p1
ownpal = 1
size.xscale = const(size.xscale)*1.5
size.yscale = const(size.xscale)*1.5
ignorehitpause=1

[state 1200]
type = helper
trigger1 = var(36)>=1&&AnimElem=5
id = 6410
stateno= 6410
pos = 0,0
postype = p1
ownpal = 1
size.xscale = const(size.xscale)*1.5
size.yscale = const(size.xscale)*1.5
ignorehitpause=1

[state 1200]
type = varset
trigger1 = AnimElem=5
var(36) = 0

[state 200]
type = ChangeState
trigger1 = AnimTime=0
value = 0
ctrl = 1

;穿タレル深紅・陽
[statedef 1500]
type = S
movetype=A
physics = S
ctrl = 0
velset = ifelse(fvar(9),fvar(9)*0,Vel X),0

[state 200]
type = VarSet
trigger1 = !time&&P2dist X<0&&(prevstateno=52||((prevstateno=[200,1999])&&fvar(10)<=0))
fvar(9) = -fvar(9)

[state 200]
type = Turn
trigger1 = !time&&P2dist X<0&&(prevstateno=52||(prevstateno=[200,1999]))

;速度取得
[state -2]
type = varset
trigger1 = !time
fvar(8) = 0
ignorehitpause=1

;先行入力処理リセット
[state 200]
type = VarSet
trigger1 = !Time
var(53) = 0

[state 200]
type = ChangeAnim
trigger1 = Time=0&&!(var(34)=stateno&&((prevstateno=[130,132])||(prevstateno=150||prevstateno=152)))
value = 1500

;魂
[state 6900]
type = varset
triggerall = animelem=1
trigger1 = numhelper(6400)
trigger1 = helper(6400),stateno=6400
trigger2 = numhelper(6401)
trigger2 = helper(6401),stateno=6400
trigger3 = numhelper(6402)
trigger3 = helper(6402),stateno=6400
var(36) = 1

;魂放出
[state 6900]
type = varset
triggerall = animelem=2,=0&&var(36)=1
triggerall = 1
trigger1 = numhelper(6400)
trigger1 = helper(6400),stateno=6400
trigger2 = numhelper(6401)
trigger2 = helper(6401),stateno=6400
trigger3 = numhelper(6402)
trigger3 = helper(6402),stateno=6400
var(36) = 2

[state 1200]
type = helper
trigger1 = var(36)>1
trigger1 = var(36):=-1
id = 6410
stateno= 6420
pos = 0,0
postype = p1
ownpal = 1
size.xscale = const(size.xscale)*1.5
size.yscale = const(size.xscale)*1.5
ignorehitpause=1
;||

[state 190]
type = PlaySND
trigger1 = AnimElem=3
trigger2 = AnimElem=3,=3
trigger3 = AnimElem=3,=6
trigger4 = AnimElem=3,=9
trigger5 = AnimElem=3,=12
trigger6 = AnimElem=3,=15
value = 30,3
channel = 10

[state 190]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&AnimElem=2
value = 10,42+random%2
channel = 1

[state 1500]
type = Explod
trigger1 = AnimElem=2,>=0&&AnimElem=2,<3
trigger2 = AnimElem=3,>=0&&AnimElem=3,<3
id = 1505
anim = 1505
pos = floor(40*const(size.xscale)),-floor(80*const(size.xscale))
postype = p1
sprpriority = 1
removeongethit=1
scale = const(size.xscale),const(size.yscale)

[state 1500]
type = Explod
trigger1 = AnimElem=2,>=3&&AnimElem=2,<6
trigger2 = AnimElem=3,>=3&&AnimElem=3,<6
id = 1506
anim = 1506
pos = floor(40*const(size.xscale)),-floor(80*const(size.xscale))
postype = p1
sprpriority = 1
removeongethit=1
scale = const(size.xscale),const(size.yscale)

[state 1500]
type = Explod
trigger1 = AnimElem=2,>=6&&AnimElem=2,<9
trigger2 = AnimElem=3,>=6&&AnimElem=3,<9
id = 1507
anim = 1507
pos = floor(40*const(size.xscale)),-floor(80*const(size.xscale))
postype = p1
sprpriority = 1
removeongethit=1
scale = const(size.xscale),const(size.yscale)

[state 1500]
type = Explod
trigger1 = AnimElem=2,>=9&&AnimElem=2,<12
trigger2 = AnimElem=3,>=9&&AnimElem=3,<12
id = 1508
anim = 1508
pos = floor(40*const(size.xscale)),-floor(80*const(size.xscale))
postype = p1
sprpriority = 1
removeongethit=1
scale = const(size.xscale),const(size.yscale)

[state 190]
type = LifeAdd
trigger1 = AnimElem=2
value = -floor(24*1.22)
kill = 0

;~~~自分側のhitpause作成~~
[state 250]
type = varset
trigger1 = time=0
var(52) = 100

[state 250]
type = varadd
trigger1 = movecontact&&var(52)>=0
var(52) = -1

[state 250]
type = varset
trigger1 = movecontact=1
var(52) = 12

[state 250]
type = null;varset
trigger1 = movecontact&&((enemynear,prevstateno=[5000,5099])||(enemynear,prevstateno=[150,155]))&&P2movetype!=H&&var(52)>0
var(52) = 0

[state 250]
type = ChangeAnim
trigger1 = (movecontact||var(19)) && var(52)>var(54) && var(52)<100
value = anim
elem = ifelse(AnimElemNo(0)=var(47),AnimElemNo(0),AnimElemNo(-1))

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(47) = AnimElemNo(0)

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(54) = AnimElemTime(AnimElemNo(0))

[state 250]
type = PosFreeze
trigger1 = var(52)>0&&(movecontact||var(19))
value = 1
;~~~~~~~~~~~~~~~~~~~~~~

;Attack Lv.3
[state 200]
type = Hitdef
triggerall = var(52)<=0||var(52)=100
trigger1 = AnimElem=2
damage = floor(ifelse(17*fvar(0)<1,1+(var(2)%5=4),ceil(17*fvar(0)))*1.22)
ground.slidetime = 14+(P2statetype=C)
ground.hittime = 14+(P2statetype=C)
guard.slidetime = 12
guard.hittime = 12
pausetime = 1,12+var(49)*6
ground.velocity = -9*const(size.xscale),(-10.0*(51-var(3))/51-.9)*const(size.yscale)
guard.velocity = -12.0*const(size.xscale)
ground.cornerpush.veloff = 0
air.velocity = ifelse(var(1)%8>=4||var(1)%2>=1,-10.0*(1.0+ifelse(var(2)>31,31,var(2))*.05)-.0012,-9*const(size.xscale)),ifelse(var(6)%10>0,var(6)%10*1.5,(-10.0*(51-var(3))/51-.9)*const(size.yscale))
airguard.velocity = -6*const(size.xscale),-2*const(size.yscale)
air.cornerpush.veloff = 0
yaccel = .9*const(size.yscale)
fall.recover = ifelse(var(6)%10>0||var(28)>0,0,1)
fall.recovertime = ifelse(var(49)&&!var(2),30+12,16-ifelse(floor(var(14)/75)>7,7,floor(var(14)/75))+12)
hitsound = s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,9+random%2)
guardsound = s7000,1
getpower = floor(ifelse(var(9),0,floor(55*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2))*1.250*fvar(16))),floor(ifelse(var(9),0,ceil(55*fvar(0)/fvar(2)*1.0/8)*1.250*fvar(16)))
givepower = floor(55*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2)*.8)*1.250,floor(55*fvar(0)/fvar(2)*.8*1.0/8)*1.250
fall = 1
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-260*const(size.xscale))
animtype = hard
ground.type = High
attr = S,SA
hitflag = MAFD
guardflag = MA
kill = 0
guard.kill = 0

[state 200]
type = AttackDist
trigger1 = AnimElem=3
value = 0

;ヒットによる増加(スタイリッシュポイント)
[state -2]
type = varadd
trigger1 = movehit=1
fvar(15) = .00005*floor(ifelse(17*fvar(0)<1,1+(var(2)%5=4),ceil(17*fvar(0)))*1.22)
ignorehitpause=1

[state -2]
type = varset
trigger1 = movehit=1
fvar(14) = fvar(1)*fvar(2)*fvar(3)*fvar(4)
ignorehitpause=1

;◇◇ヒットスパーク◇◇
[state 240]
type = VarSet
trigger1 = AnimElem=2
var(16) = 5
persistent=0

;X座標
[state 240]
type = VarSet
trigger1 = AnimElem=2,>=0&&AnimElem=3,<0
var(17) = floor(P2dist X)+ifelse((P2dist X=[1,30]),10,-10)

;Y座標
[state 240]
type = VarSet
trigger1 = AnimElem=2,>=0&&AnimElem=3,<0
var(18) = floor(-160*const(size.yscale))

;・・・・自分側ヒットバック・・・
;ヒットバック量取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2&&statetype!=A
trigger1 = var(1)%2<1&&var(1)%8<4&&target,time=0
fvar(5) = ifelse(var(3)&&target,statetype=A&&var(6)%10<1,-12.0*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.06),-12.0*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.060))*const(size.xscale)
ignorehitpause=1

;ヒットバック量取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2&&statetype!=A
trigger1 = (var(1)%2>=1||var(1)%8>=4)&&target,time=1
fvar(5) = (-12.0*1.25*((enemynear,backedgebodydist<=5||enemynear,frontedgebodydist<=5||var(1)%8>=4)&&fvar(10)<=0)*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.1))*const(size.xscale)
ignorehitpause=1

;ヒットバック時間取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2&&statetype!=A
trigger1 = (var(1)%2<1&&var(1)%8<4&&target,time=0)||((var(1)%2>=1||var(1)%8>=4)&&target,time=1)
fvar(6) = ifelse(moveguarded,12,14+(P2statetype=C))
ignorehitpause=1

;ヒットポーズ取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2&&statetype!=A
trigger1 = (var(1)%2<1&&var(1)%8<4&&target,time=0)||((var(1)%2>=1||var(1)%8>=4)&&target,time=1)
fvar(7) = (12-(var(1)%2>=1||var(1)%8>=4))*ifelse(moveguarded,-1,1)
ignorehitpause=1
;・・・・・・・・
[state 1320]
type = ChangeState
trigger1 = AnimTime=0
value = 0
ctrl = 1

;穿タレル深紅・陰
[statedef 1550]
type = C
movetype=A
physics = C
ctrl = 0
velset = ifelse(fvar(9),fvar(9)*0,Vel X),0

[state 200]
type = VarSet
trigger1 = !time&&P2dist X<0&&(prevstateno=52||((prevstateno=[200,1999])&&fvar(10)<=0))
fvar(9) = -fvar(9)

[state 200]
type = Turn
trigger1 = !time&&P2dist X<0&&(prevstateno=52||(prevstateno=[200,1999]))

;速度取得
[state -2]
type = varset
trigger1 = !time
fvar(8) = 0
ignorehitpause=1

;先行入力処理リセット
[state 200]
type = VarSet
trigger1 = !Time
var(53) = 0

[state 200]
type = ChangeAnim
trigger1 = Time=0&&!(var(34)=stateno&&((prevstateno=[130,132])||(prevstateno=150||prevstateno=152)))
value = 1550

;魂
[state 6900]
type = varset
triggerall = animelem=1
trigger1 = numhelper(6400)
trigger1 = helper(6400),stateno=6400
trigger2 = numhelper(6401)
trigger2 = helper(6401),stateno=6400
trigger3 = numhelper(6402)
trigger3 = helper(6402),stateno=6400
var(36) = 1

;魂放出
[state 6900]
type = varset
triggerall = animelem=2,=0&&var(36)=1
triggerall = 1
trigger1 = numhelper(6400)
trigger1 = helper(6400),stateno=6400
trigger2 = numhelper(6401)
trigger2 = helper(6401),stateno=6400
trigger3 = numhelper(6402)
trigger3 = helper(6402),stateno=6400
var(36) = 2

[state 1200]
type = helper
trigger1 = var(36)>1
trigger1 = var(36):=-1
id = 6410
stateno= 6420
pos = 0,0
postype = p1
ownpal = 1
size.xscale = const(size.xscale)*1.5
size.yscale = const(size.xscale)*1.5
ignorehitpause=1
;||

[state 190]
type = PlaySND
trigger1 = AnimElem=3
trigger2 = AnimElem=3,=3
trigger3 = AnimElem=3,=6
trigger4 = AnimElem=3,=9
trigger5 = AnimElem=3,=12
trigger6 = AnimElem=3,=15
value = 30,3
channel = 10

[state 190]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&AnimElem=2
value = 10,42+random%2
channel = 1

[state 1500]
type = Explod
trigger1 = AnimElem=2,>=0&&AnimElem=2,<3
trigger2 = AnimElem=3,>=0&&AnimElem=3,<3
id = 1505
anim = 1505
pos = floor(60*const(size.xscale)),-floor(0*const(size.xscale))
postype = p1
sprpriority = 1
removeongethit=1
scale = const(size.xscale),const(size.yscale)

[state 1500]
type = Explod
trigger1 = AnimElem=2,>=3&&AnimElem=2,<6
trigger2 = AnimElem=3,>=3&&AnimElem=3,<6
id = 1506
anim = 1506
pos = floor(60*const(size.xscale)),-floor(0*const(size.xscale))
postype = p1
sprpriority = 1
removeongethit=1
scale = const(size.xscale),const(size.yscale)

[state 1500]
type = Explod
trigger1 = AnimElem=2,>=6&&AnimElem=2,<9
trigger2 = AnimElem=3,>=6&&AnimElem=3,<9
id = 1507
anim = 1507
pos = floor(60*const(size.xscale)),-floor(0*const(size.xscale))
postype = p1
sprpriority = 1
removeongethit=1
scale = const(size.xscale),const(size.yscale)

[state 1500]
type = Explod
trigger1 = AnimElem=2,>=9&&AnimElem=2,<12
trigger2 = AnimElem=3,>=9&&AnimElem=3,<12
id = 1508
anim = 1508
pos = floor(60*const(size.xscale)),-floor(0*const(size.xscale))
postype = p1
sprpriority = 1
removeongethit=1
scale = const(size.xscale),const(size.yscale)

[state 190]
type = LifeAdd
trigger1 = AnimElem=2
value = -floor(24*1.22)
kill = 0

;~~~自分側のhitpause作成~~
[state 250]
type = varset
trigger1 = time=0
var(52) = 100

[state 250]
type = varadd
trigger1 = movecontact&&var(52)>=0
var(52) = -1

[state 250]
type = varset
trigger1 = movecontact=1
var(52) = 10

[state 250]
type = null;varset
trigger1 = movecontact&&((enemynear,prevstateno=[5000,5099])||(enemynear,prevstateno=[150,155]))&&P2movetype!=H&&var(52)>0
var(52) = 0

[state 250]
type = ChangeAnim
trigger1 = (movecontact||var(19)) && var(52)>var(54) && var(52)<100
value = anim
elem = ifelse(AnimElemNo(0)=var(47),AnimElemNo(0),AnimElemNo(-1))

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(47) = AnimElemNo(0)

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(54) = AnimElemTime(AnimElemNo(0))

[state 250]
type = PosFreeze
trigger1 = var(52)>0&&(movecontact||var(19))
value = 1
;~~~~~~~~~~~~~~~~~~~~~~

;Attack Lv.3
[state 200]
type = Hitdef
triggerall = var(52)<=0||var(52)=100
trigger1 = AnimElem=2
damage = floor(ifelse(17*fvar(0)<1,1+(var(2)%5=4),ceil(17*fvar(0)))*1.22)
ground.slidetime = 10+var(49)*5
ground.hittime = 10+var(49)*5
guard.slidetime = 8
guard.hittime = 8
pausetime = 1,10+var(49)*5
ground.velocity = -4*const(size.xscale),(-16.0*(51-var(3))/51-.9)*const(size.yscale)
guard.velocity = -9.0*const(size.xscale)
ground.cornerpush.veloff = 0
air.velocity = ifelse(var(1)%8>=4||var(1)%2>=1,-10.0*(1.0+ifelse(var(2)>31,31,var(2))*.05)-.0012,-4*const(size.xscale)),ifelse(var(6)%10>0,var(6)%10*1.5,(-16.0*(51-var(3))/51-.9)*const(size.yscale))
airguard.velocity = -6*const(size.xscale),-2*const(size.yscale)
air.cornerpush.veloff = 0
yaccel = .9*const(size.yscale)
fall.recover = ifelse(var(6)%10>0||var(28)>0,0,1)
fall.recovertime = ifelse(var(49)&&!var(2),20+10,10-ifelse(floor(var(14)/100)>5,5,floor(var(14)/100))+10)
hitsound = s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,9+random%2)
guardsound = s7000,4
getpower = floor(ifelse(var(9),0,floor(33*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2))*1.250*fvar(16))),floor(ifelse(var(9),0,ceil(33*fvar(0)/fvar(2)*1.0/8)*1.250*fvar(16)))
givepower = floor(33*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2)*.8)*1.250,floor(33*fvar(0)/fvar(2)*.8*1.0/8)*1.250
fall = 1
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-260*const(size.xscale))
animtype = up
ground.type = High
attr = S,SA
hitflag = MAFD
guardflag = MA
kill = 0
guard.kill = 0

[state 200]
type = AttackDist
trigger1 = AnimElem=3
value = 0

;ヒットによる増加(スタイリッシュポイント)
[state -2]
type = varadd
trigger1 = movehit=1
fvar(15) = .00005*floor(ifelse(17*fvar(0)<1,1+(var(2)%5=4),ceil(17*fvar(0)))*1.22)
ignorehitpause=1

[state -2]
type = varset
trigger1 = movehit=1
fvar(14) = fvar(1)*fvar(2)*fvar(3)*fvar(4)
ignorehitpause=1

;◇◇ヒットスパーク◇◇
[state 240]
type = VarSet
trigger1 = AnimElem=2
var(16) = 5
persistent=0

;X座標
[state 240]
type = VarSet
trigger1 = AnimElem=2,>=0&&AnimElem=3,<0
var(17) = floor(P2dist X)+ifelse((P2dist X=[1,30]),10,-10)

;Y座標
[state 240]
type = VarSet
trigger1 = AnimElem=2,>=0&&AnimElem=3,<0
var(18) = floor(-90*const(size.yscale))

;・・・・自分側ヒットバック・・・
;ヒットバック量取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2&&statetype!=A
trigger1 = var(1)%2<1&&var(1)%8<4&&target,time=0
fvar(5) = ifelse(var(3)&&target,statetype=A&&var(6)%10<1,-12.0*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.06),-9.0*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.060))*const(size.xscale)
ignorehitpause=1

;ヒットバック量取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2&&statetype!=A
trigger1 = (var(1)%2>=1||var(1)%8>=4)&&target,time=1
fvar(5) = (-9.0*1.25*((enemynear,backedgebodydist<=5||enemynear,frontedgebodydist<=5||var(1)%8>=4)&&fvar(10)<=0)*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.1))*const(size.xscale)
ignorehitpause=1

;ヒットバック時間取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2&&statetype!=A
trigger1 = (var(1)%2<1&&var(1)%8<4&&target,time=0)||((var(1)%2>=1||var(1)%8>=4)&&target,time=1)
fvar(6) = ifelse(moveguarded,8,10)
ignorehitpause=1

;ヒットポーズ取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2&&statetype!=A
trigger1 = (var(1)%2<1&&var(1)%8<4&&target,time=0)||((var(1)%2>=1||var(1)%8>=4)&&target,time=1)
fvar(7) = (10-(var(1)%2>=1||var(1)%8>=4))*ifelse(moveguarded,-1,1)
ignorehitpause=1
;・・・・・・・・

[state 1320]
type = ChangeState
trigger1 = AnimTime=0
value = 11
ctrl = 1

;上反斬り
[statedef 1600]
type = S
movetype=A
physics = S
ctrl = 0
velset = ifelse(fvar(9),fvar(9)*0,0),0

[state 200]
type = VarSet
trigger1 = !time&&P2dist X<0&&(prevstateno=52||((prevstateno=[200,1999])&&fvar(10)<=0))
fvar(9) = -fvar(9)

[state 200]
type = Turn
trigger1 = !time&&P2dist X<0&&(prevstateno=52||(prevstateno=[200,1999]))

;速度取得
[state -2]
type = varset
trigger1 = !time
fvar(8) = 0
ignorehitpause=1

;先行入力処理リセット
[state 200]
type = VarSet
trigger1 = !Time
var(53) = 0

[state 200]
type = ChangeAnim
trigger1 = Time=0&&!(var(34)=stateno&&((prevstateno=[130,132])||(prevstateno=150||prevstateno=152)))
value = 1600

[state 190]
type = PlaySND
triggerall = !Ishelper
trigger1 = AnimElemNo(2)=9&&AnimElemNo(1)=8
value = 7300,3
channel = 10

[state 190]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&AnimElem=1
value = 10,45
channel = 1

;バウンド食らい
[state 190]
type = Targetstate
trigger1 = numtarget && movehit=1 && var(1)%2<1 && var(1)%8<4 && var(6)%10<1
trigger1 = target,time=0
value = 15070

;~~~自分側のhitpause作成~~
[state 250]
type = varset
trigger1 = time=0
var(52) = 100

[state 250]
type = varadd
trigger1 = movecontact&&var(52)>=0
var(52) = -1

[state 250]
type = varset
trigger1 = movecontact=1
var(52) = 13

[state 250]
type = null;varset
trigger1 = movecontact&&((enemynear,prevstateno=[5000,5099])||(enemynear,prevstateno=[150,155]))&&P2movetype!=H&&var(52)>0
var(52) = 0

[state 250]
type = ChangeAnim
trigger1 = (movecontact||var(19)) && var(52)>var(54) && var(52)<100
value = anim
elem = ifelse(AnimElemNo(0)=var(47),AnimElemNo(0),AnimElemNo(-1))

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(47) = AnimElemNo(0)

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(54) = AnimElemTime(AnimElemNo(0))

[state 250]
type = PosFreeze
trigger1 = var(52)>0&&(movecontact||var(19))
value = 1
;~~~~~~~~~~~~~~~~~~~~~~

;Attack Lv.4
[state 200]
type = Hitdef
triggerall = var(52)<=0||var(52)=100
trigger1 = AnimElem=9
damage = floor(ifelse(88*ifelse(fvar(1)<.25,.25,fvar(1))*fvar(2)*fvar(3)*fvar(4)<1,1+(var(2)%5=4),ceil(88*ifelse(fvar(1)<.25,.25,fvar(1))*fvar(2)*fvar(3)*fvar(4)))*1.22),floor(ceil(88*fvar(3)*fvar(4)*1.0/4)*1.22)
ground.slidetime = 17+(P2statetype=C)
ground.hittime = 17+(P2statetype=C)
guard.slidetime = 15
guard.hittime = 15
pausetime = 1,13+var(49)*7
ground.velocity = -6.0*const(size.xscale),ifelse(var(49),6.0,5.0+.0001*var(2))
guard.velocity = -13.5*const(size.xscale)
ground.cornerpush.veloff = 0
air.velocity = ifelse(var(1)%8>=4||var(1)%2>=1,-10.0*(1.0+ifelse(var(2)>31,31,var(2))*.05)-.0012,-6.0*const(size.xscale)),ifelse(var(6)%10>0,var(6)%10*1.5,4.0+.00012*var(2))
airguard.velocity = -6*const(size.xscale),-2*const(size.yscale)
air.cornerpush.veloff = 0
yaccel = .9*const(size.yscale)
fall.recover = ifelse(var(6)%10>0||var(28)>0,0,1)
fall.recovertime = ifelse(var(49)&&!var(2),49+13,32-ifelse(floor(var(14)/55)>9,9,floor(var(14)/55))+13)
hitsound = s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,5)
guardsound = s7000,4
getpower = floor(ifelse(var(9),0,floor(80*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2))*1.250*fvar(16))),floor(ifelse(var(9),0,ceil(80*fvar(0)/fvar(2)*1.0/8)*1.250*fvar(16)))
givepower = floor(80*ifelse(var(1)%4>=2,.5,1.0)*fvar(0)/fvar(2)*.8)*1.250,floor(80*fvar(0)/fvar(2)*.8*1.0/8)*1.250
fall = 1
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-260*const(size.xscale))
animtype = hard
ground.type = High
attr = S,SA
hitflag = MAFD
guardflag = MA

[state 200]
type = AttackDist
trigger1 = AnimElem=10
value = 0

;ヒットによる増加(スタイリッシュポイント)
[state -2]
type = varadd
trigger1 = movehit=1
fvar(15) = .00005*floor(ifelse(88*ifelse(fvar(1)<.25,.25,fvar(1))*fvar(2)*fvar(3)*fvar(4)<1,1+(var(2)%5=4),ceil(88*ifelse(fvar(1)<.25,.25,fvar(1))*fvar(2)*fvar(3)*fvar(4)))*1.22)
ignorehitpause=1

[state -2]
type = varset
trigger1 = movehit=1
fvar(14) = fvar(1)*fvar(2)*fvar(3)*fvar(4)
ignorehitpause=1

;◇◇ヒットスパーク◇◇
[state 240]
type = VarSet
trigger1 = AnimElem=9
var(16) = 10;+random%4
persistent=0

;X座標
[state 240]
type = VarSet
trigger1 = AnimElem=9,>=0&&AnimElem=10,<0
var(17) = floor(ifelse(P2dist X>286*const(size.xscale),286*const(size.xscale),floor(P2dist X)+ifelse((P2dist X=[1,30]),10,-10)+10))

;Y座標
[state 240]
type = VarSet
trigger1 = AnimElem=9,>=0&&AnimElem=10,<0
var(18) = floor(-34*const(size.yscale))

;・・・・自分側ヒットバック・・・
;ヒットバック量取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2&&statetype!=A
trigger1 = var(1)%2<1&&var(1)%8<4&&target,time=0
fvar(5) = ifelse(((var(3)&&target,statetype=A)||movehit)&&var(6)%10<1,-9.0*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.06),-13.5*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.1))*const(size.xscale)
ignorehitpause=1

;ヒットバック量取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2&&statetype!=A
trigger1 = (var(1)%2>=1||var(1)%8>=4)&&target,time=1
fvar(5) = (-13.5*1.25*((enemynear,backedgebodydist<=5||enemynear,frontedgebodydist<=5||var(1)%8>=4)&&fvar(10)<=0)*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.1))*const(size.xscale)
ignorehitpause=1

;ヒットバック時間取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2&&statetype!=A
trigger1 = (var(1)%2<1&&var(1)%8<4&&target,time=0)||((var(1)%2>=1||var(1)%8>=4)&&target,time=1)
fvar(6) = ifelse(moveguarded,15,17+(P2statetype=C))
ignorehitpause=1

;ヒットポーズ取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2&&statetype!=A
trigger1 = (var(1)%2<1&&var(1)%8<4&&target,time=0)||((var(1)%2>=1||var(1)%8>=4)&&target,time=1)
fvar(7) = (13-(var(1)%2>=1||var(1)%8>=4))*ifelse(moveguarded,-1,1)
ignorehitpause=1
;・・・・・・・・
[state 1320]
type = ChangeState
trigger1 = AnimTime=0
value = 0
ctrl = 1

;ブースト(吹き飛ばし攻撃後)
[statedef 2000]
type = S
movetype = I
physics = S
ctrl = 0
velset = 0,ifelse(pos Y<0,vel Y,0)
anim = 2000

[state 2000]
type = Helper
trigger1 = !time
id = 7720
stateno=7720
pos = 0,floor(-160*const(size.yscale))
postype = p1
ignorehitpause=1
pausemovetime=999
supermovetime=999
ownpal = 1
sprpriority = 2

[state 2000]
type = PlaySND
trigger1 = !time
value = 2000,0
volume = 255

[State 0, AfterImage]
type = AfterImage
trigger1 = !time
time=24
length = 5
palbright = 0,0,0
palcontrast = 256,256,256
palpostbright = -30,0,0
paladd = 0,0,0
palmul = 1,1,1
timegap = 1
framegap = 2
trans = AddAlpha
alpha = 128,128

;ブースト
[state 2000]
type = varadd
trigger1 = !time
var(6) = 100*(!floor(var(6)%1000/100))+1000*(var(1)%2<1&&!floor(var(6)%10000/1000))

;BASARAゲージ回復不能時間
[state 2000]
type = VarAdd
trigger1 = !time
var(9)=ifelse(var(9)>=10000,12000-floor(var(9)/100)*100,12000)

;ヒットバック0
[state 900]
type = VarSet
trigger1 = !time
fvar(5) = 0

[state 2000]
type = PosAdd
trigger1 = !time
x = -13.0

[state 2000]
type = VelSet
trigger1 = !time
x = 13.0
y = ifelse(vel Y<0,-4,0)

;現在の速度
[state 2000]
type = VarSet
trigger1 = !time
fvar(8) = 0

;ブースト速度
[state 2000]
type = VarSet
trigger1 = !time
fvar(9) = 13.0

;ブースト時間
[state 2000]
type = VarSet
trigger1 = !time
fvar(10) = 40

;ブースト速度
[state 2000]
type = VarSet
trigger1 = time<=4&&(P2bodydist X=[-15,0])&&(enemynear,backedgebodydist<=5||enemynear,frontedgebodydist<=5)
fvar(9) = 8.0

;ブースト時間
[state 2000]
type = VarSet
trigger1 = time<=4&&(P2bodydist X=[-15,0])&&(enemynear,backedgebodydist<=5||enemynear,frontedgebodydist<=5)
fvar(10) = 24

[state 200]
type = VarAdd
trigger1 = !Time&&var(53)>2000
var(53) = -2000

[state 2000]
type = ChangeState
trigger1 = !time&&(var(53)=40||var(53)=50)
value = 40

[state 200]
type = VarSet
trigger1 = !Time
var(53) = 0

[state 200]
type = VarSet
trigger1 = !Time
var(34) = 0

[state 200]
type = DestroySelf
trigger1 = IsHelper
trigger1 = !root,var(34)

[state 2000]
type = ChangeState
trigger1 = time>=4
trigger1 = !fvar(10)||(P2bodydist X<=0&&(enemynear,backedgebodydist<=5||enemynear,frontedgebodydist<=5))
trigger2 = time>=32
value = 0
ctrl = 1

;ガードキャンセル攻撃
[statedef 2500]
type = S
movetype = A
physics = S
ctrl = 0
velset = 0,0
anim = 2500
poweradd =-1000

;ガードゲージ減少
[state 2000]
type = VarAdd
trigger1 = Time=0
var(23)=ifelse(var(23)<=128,-var(23)+1,-128)

;BASARAゲージ回復不能時間
[state 2000]
type = VarAdd
trigger1 = 1
var(9)=ifelse((var(9)=[1,999]),420-var(9),420)

[state 2000]
type = PalFX
trigger1 = Time=[0,7]
add = 255-32*time,255-32*time,255-32*time
time = 1

[state 900]
type = PlaySND
trigger1 = Time=0
value = 2500,0

[state 2000]
type = HitBy
trigger1 = Time=[0,13]
value = ,AT

[state 190]
type = PlaySND
trigger1 = AnimElemNo(2)=12&&AnimElemNo(1)=11&&AnimElemNo(0)<=11
value = 7300,3
channel = 10

[state 190]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&AnimElemNo(2)=12&&AnimElemNo(1)=11&&AnimElemNo(0)<=11
value = 10,9
channel = 1

;Attack Lv.5
[state 200]
type = Hitdef
trigger1 = AnimElem=12
damage = floor(ifelse(40*fvar(0)<1,1+(var(2)%5=4),40*fvar(0))*1.22)
ground.slidetime = 20+(P2statetype=C)
ground.hittime = 20+(P2statetype=C)
guard.slidetime = 18
guard.hittime = 18
pausetime = 15,14
ground.velocity = -18*const(size.xscale),-5*const(size.yscale)
guard.velocity = -15.0*const(size.xscale)
ground.cornerpush.veloff = 0
air.velocity = -18*const(size.xscale),ifelse(var(6)%10>0,var(6)%10*1.5,-5*const(size.yscale))
airguard.velocity = -6*const(size.xscale),-2*const(size.yscale)
air.cornerpush.veloff = 0
yaccel = .9*const(size.yscale)
fall.yvelocity = 0
fall.recover = 0
hitsound = s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,5)
guardsound = s7000,4
getpower = 0,0
givepower = 0,0
fall = 1
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-180*const(size.xscale))
animtype = High
ground.type = High
attr = S,NA
hitflag = MAFD
guardflag = M
kill = 0
persistent=0

[state 200]
type = AttackDist
trigger1 = AnimElem=13
value = 0

;ヒットによる増加(スタイリッシュポイント)
[state -2]
type = varadd
trigger1 = movehit=1&&hitpausetime=14
fvar(15) = .00005*floor(ifelse(40*fvar(14)<1,1+(var(2)%5=1),40*fvar(14))*1.22)
ignorehitpause=1

[state -2]
type = varset
trigger1 = movehit=1
fvar(14) = fvar(1)*fvar(2)*fvar(3)*fvar(4)
ignorehitpause=1

;◇◇ヒットスパーク◇◇
[state 240]
type = VarSet
trigger1 = AnimElem=12
var(16) = 5
persistent=0

;X座標
[state 240]
type = VarSet
trigger1 = AnimElem=12,>=0&&AnimElem=13,<0
var(17) = floor(ifelse(P2dist X>244*const(size.xscale),244*const(size.xscale),floor(P2dist X)+ifelse((P2dist X=[1,30]),10,-10)+10))

;Y座標
[state 240]
type = VarSet
trigger1 = AnimElem=12,>=0&&AnimElem=13,<0
var(18) = floor(-120*const(size.yscale))

;・・・・自分側ヒットバック・・・・
;ヒットバック量取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = var(1)%2<1&&var(1)%8<4&&target,time=0
fvar(5) = (-15.0*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.060))*const(size.xscale)
ignorehitpause=1

;ヒットバック量取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2>=1||var(1)%8>=4)&&target,time=1
fvar(5) = (-15.0*1.25*((enemynear,backedgebodydist<=5||enemynear,frontedgebodydist<=5||var(1)%8>=4)&&fvar(10)<=0)*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.1))*const(size.xscale)
ignorehitpause=1

;ヒットバック時間取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2<1&&var(1)%8<4&&target,time=0)||((var(1)%2>=1||var(1)%8>=4)&&target,time=1)
fvar(6) = ifelse(moveguarded,18,20+(P2statetype=C))
ignorehitpause=1

;ヒットポーズ取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2<1&&var(1)%8<4&&target,time=0)||((var(1)%2>=1||var(1)%8>=4)&&target,time=1)
fvar(7) = (14-(var(1)%2>=1||var(1)%8>=4))*ifelse(moveguarded,-1,1)
ignorehitpause=1
;・・・・・・・・

[state 2000]
type = ChangeState
trigger1 = AnimTime=0
value = 0
ctrl = 1


;死ニ至ル病
[statedef 3000]
type = S
movetype=A
physics = S
ctrl = 0
velset = ifelse(fvar(9),fvar(9),0),0
movehitpersist=1

[state 200]
type = VarSet
trigger1 = !time&&P2dist X<0&&(prevstateno=52||((prevstateno=[200,1999])&&fvar(10)<=0))
fvar(9) = -fvar(9)

[state 200]
type = Turn
trigger1 = !time&&P2dist X<0&&(prevstateno=52||(prevstateno=[200,1999]))

;援軍ヒットキャンセル
[state 100]
type = Helper
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = (prevstateno=[1000,1999])
id = 7710
stateno = 7710
pos = 0,const(size.mid.pos.y)
postype = P1
pausemovetime=20
supermovetime=20
ignorehitpause=1

;援軍ヒットキャンセル
[state 100]
type = VarSet
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = (prevstateno=[1000,1999])
fvar(5) = 0

;援軍ヒットキャンセル
[state 100]
type = VarSet
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = (prevstateno=[1000,1999])
var(15) = 0

;援軍ヒットキャンセル
[state 100]
type = MoveHitReset
trigger1 = !time

;速度取得
[state -2]
type = varset
trigger1 = !time
fvar(8) = 0
ignorehitpause=1

;先行入力処理リセット
[state 200]
type = VarSet
trigger1 = !Time
var(53) = 0

[state 200]
type = ChangeAnim
trigger1 = Time=0&&!(var(34)=stateno&&((prevstateno=[130,132])||(prevstateno=150||prevstateno=152)))
value = 3000

;BASARAゲージ回復不能時間
[state 2000]
type = VarAdd
trigger1 = 1
var(9)=ifelse((var(9)=[1,999]),420-var(9),420)

[state 200]
type = NotHitBy
trigger1 = !IsHelper&&(prevstateno!=[5000,5099])&&AnimElem=8
value = ,AP
time=41

[state 200]
type = pause
trigger1 = !IsHelper&&(prevstateno!=[5000,5099])&&AnimElem=7,=1
time = 41
movetime = 41

[state 200]
type = helper
trigger1 = !IsHelper&&(prevstateno!=[5000,5099])&&AnimElem=7,=1
id = 7560
stateno = 7560
pos = floor(10*const(size.xscale)),-floor(160*const(size.yscale))
postype = P1
pausemovetime=41+999
ownpal = 1

[state -2]
type = poweradd
trigger1 = !IsHelper&&(prevstateno!=[5000,5099])&&AnimElem=8
value = -1000
persistent=0

;BASARA Moves Finish
[state 3510]
type = Helper
trigger1 = (movehit=[1,2]) && !enemynear,alive && roundstate=3 && !numhelper(8800)
id  = 8800
stateno=8800
pos = 0,0
postype = left
scale = const(size.xscale),const(size.yscale)
persistent=0
ignorehitpause=1

;~~~スーパーアーマー~~~
;経過時間
[state 1610]
type = varset
trigger1 = !time&&(prevstateno!=5000&&prevstateno!=5010&&prevstateno!=5020&&prevstateno!=5070)
var(46) = 1

;経過時間
[state 1610]
type = varadd
trigger1 = time>0&&time>=var(48)
var(46) = 1

;ダメージ
[state 1610]
type = LifeAdd
trigger1 = !time&&(prevstateno=5000||prevstateno=5010||prevstateno=5020||prevstateno=5070)
value = -var(47)

;ヒットポーズ
[state 1610]
type = varset
trigger1 = !time&&(prevstateno!=5000&&prevstateno!=5010&&prevstateno!=5020&&prevstateno!=5070)
var(48) = 0

[state 1610]
type = ChangeAnim
trigger1 = (prevstateno=5000||prevstateno=5010||prevstateno=5020||prevstateno=5070)&&var(46)<=100
value = 3000
elem =ifelse(AnimElemNo(0)!=4&&var(46)>=4,4,ifelse(AnimElemNo(0)!=3&&var(46)>=3,3,ifelse(AnimElemNo(0)!=2&&var(46)>=2,2,ifelse(AnimElemNo(0)!=1&&var(46)>=1,1,AnimElemNo(0)))))

[state 1610]
type = ChangeAnim
trigger1 = (prevstateno=5000||prevstateno=5010||prevstateno=5020||prevstateno=5070)&&var(46)<=100
value = 3000
elem = ifelse(AnimElemNo(0)!=9&&var(46)>=45,9,ifelse(AnimElemNo(0)!=8&&var(46)>=9,8,ifelse(AnimElemNo(0)!=7&&var(46)>=7,7,ifelse(AnimElemNo(0)!=6&&var(46)>=6,6,ifelse(AnimElemNo(0)!=5&&var(46)>=5,5,AnimElemNo(0))))))

[state 1610]
type = ChangeAnim
trigger1 = (prevstateno=5000||prevstateno=5010||prevstateno=5020||prevstateno=5070)&&var(46)<=100
value = 3000
elem = ifelse(AnimElemNo(0)!=14&&var(46)>=60,14,ifelse(AnimElemNo(0)!=13&&var(46)>=56,13,ifelse(AnimElemNo(0)!=12&&var(46)>=54,12,ifelse(AnimElemNo(0)!=11&&var(46)>=51,11,ifelse(AnimElemNo(0)!=10&&var(46)>=48,10,AnimElemNo(0))))))

[state 1610]
type = ChangeAnim
trigger1 = (prevstateno=5000||prevstateno=5010||prevstateno=5020||prevstateno=5070)&&var(46)<=100
value = 3000
elem = ifelse(AnimElemNo(0)!=19&&var(46)>=88,19,ifelse(AnimElemNo(0)!=18&&var(46)>=84,18,ifelse(AnimElemNo(0)!=17&&var(46)>=80,17,ifelse(AnimElemNo(0)!=16&&var(46)>=76,16,ifelse(AnimElemNo(0)!=15&&var(46)>=72,15,AnimElemNo(0))))))

[state 1610]
type = ChangeAnim
trigger1 = (prevstateno=5000||prevstateno=5010||prevstateno=5020||prevstateno=5070)&&var(46)<=100
value = 3000
elem = ifelse(AnimElemNo(0)!=21&&var(46)>=96,21,ifelse(AnimElemNo(0)!=20&&var(46)>=92,20,AnimElemNo(0)))

[state 1610]
type = ChangeAnim
trigger1 = Time<var(48)
value = anim
elem = AnimElemNo(0)

[state 1320]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&AnimElem=1
value = 10,45
channel = 1

[state 1320]
type = PlaySND
trigger1 = AnimElem=12
value = 30,6

;地震
[State 40, 1]
type = Helper
trigger1 = AnimElem=12
id = 6930
stateno = 6930
pos = 0,0
postype = p1
ownpal = 1
pausemovetime = 9999
supermovetime = 9999
ignorehitpause = 1
persistent = 0

;残り時間設定
[state 1200]
type = varset
trigger1 = animelemtime(12)=0
var(13) = 360+1

[state 1200]
type = helper
trigger1 = !NumHelper(6400)&&movehit=1
id = 6400
stateno= 6400
pos = 0,0
postype = p1
ownpal = 1
facing=ifelse(teamside=2,-1,1)*facing
size.xscale = const(size.xscale)*1.5
size.yscale = const(size.xscale)*1.5
ignorehitpause=1

[state 1200]
type = helper
trigger1 = !NumHelper(6401)&&movehit=1
id = 6401
stateno= 6400
pos = 0,0
postype = p1
ownpal = 1
facing=ifelse(teamside=2,-1,1)*facing
size.xscale = const(size.xscale)*1.5
size.yscale = const(size.xscale)*1.5
ignorehitpause=1

[state 1200]
type = helper
trigger1 = !NumHelper(6402)&&movehit=1
id = 6402
stateno= 6400
pos = 0,0
postype = p1
ownpal = 1
facing=ifelse(teamside=2,-1,1)*facing
size.xscale = const(size.xscale)*1.5
size.yscale = const(size.xscale)*1.5
ignorehitpause=1

[state 801]
type = Helper
trigger1 = AnimElem=12
id = 6355
stateno = 6355
pos = 0,-floor(220*const(size.yscale))
postype = p1
ownpal = 1
sprpriority = -3
pausemovetime=9999
supermovetime=9999
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)
persistent=0

;転倒食らい
[state 190]
type = Targetstate
trigger1 = numtarget && movehit=1 && var(1)%2<1 && var(1)%8<4 && var(6)%10<1
trigger1 = target,time=0
value = 15070


;~~~自分側のhitpause作成~~
[state 250]
type = varset
trigger1 = time=0
var(52) = 100

[state 250]
type = varadd
trigger1 = movecontact&&var(52)>=0
var(52) = -1

[state 250]
type = varset
trigger1 = movecontact=1
var(52) = 14

[state 250]
type = null;varset
trigger1 = movecontact&&((enemynear,prevstateno=[5000,5099])||(enemynear,prevstateno=[150,155]))&&P2movetype!=H&&var(52)>0
var(52) = 0

[state 250]
type = ChangeAnim
trigger1 = (movecontact||var(19)) && var(52)>var(54) && var(52)<100
value = anim
elem = ifelse(AnimElemNo(0)=var(47),AnimElemNo(0),AnimElemNo(-1))

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(47) = AnimElemNo(0)

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(54) = AnimElemTime(AnimElemNo(0))

[state 250]
type = PosFreeze
trigger1 = var(52)>0&&(movecontact||var(19))
value = 1
;~~~~~~~~~~~~~~~~~~~~~~
;>>>>>>>>>>><<<<<<<<<<<

;Attack Lv.5
[state 200]
type = Hitdef
triggerall = (var(52)<=0||var(52)=100)
trigger1 = AnimElem=12
damage = floor(120*ifelse(fvar(1)<.25,.25,fvar(1))*fvar(2)*fvar(3)*fvar(4)*1.22),floor(ceil(120*fvar(3)*fvar(4)*1.0/4)*1.22)
ground.slidetime = 20+(P2statetype=C)
ground.hittime = 20+(P2statetype=C)
guard.hittime = 18
pausetime = 1,14+var(49)*7
ground.velocity = -6.0*(1.0+ifelse(var(2)>31,31,var(2))*.02)*const(size.xscale),(-12-.9)*const(size.yscale)
guard.veloctiy = -15.0*const(size.xscale)
ground.cornerpush.veloff = 0
air.velocity = ifelse(var(1)%8>=4||var(1)%2>=1,-10.0*(1.0+ifelse(var(2)>31,31,var(2))*.05)-.0014,-6.0*(1.0+ifelse(var(3)>31,31,var(3))*.04)*const(size.xscale)),ifelse(var(6)%10>0,var(6)%10*1.5,(-12.0*(51-var(3))/51-.9)*const(size.yscale))
air.cornerpush.veloff = 0
yaccel = .9*const(size.yscale)
fall.recover = 0
hitsound = s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,5)
guardsound = s7000,4
getpower = 0,0
givepower = 0,0
fall = 1
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-180*const(size.xscale))
animtype = hard
ground.type = High
attr = S,HA
hitflag = MAFD
guardflag = M

[state 200]
type = AttackDist
trigger1 = AnimElem=13
value = 0

;強制停止中に動かないように
[state -2]
type = PosFreeze
trigger1 = AnimElemTime(8)>=0&&AnimElemTime(11)<=1
trigger2 = NumHelper(7560)
trigger2 = helper(7560),time<30
value = 1

;ヒットによる増加(スタイリッシュポイント)
[state -2]
type = varadd
trigger1 = movehit=1&&hitpausetime=14
fvar(15) = .00005*floor(120*fvar(14)*1.22)
ignorehitpause=1

[state -2]
type = varset
trigger1 = movehit=1&&hitpausetime=14
fvar(14) = fvar(1)*fvar(2)*fvar(3)*fvar(4)
ignorehitpause=1

;◇◇ヒットスパーク◇◇
[state 240]
type = VarSet
trigger1 = AnimElem=12
var(16) = 10
persistent=0

;X座標
[state 240]
type = VarSet
trigger1 = AnimElem=12,>=0&&AnimElem=13,<0
var(17) = floor(ifelse(P2dist X>184*const(size.xscale),184*const(size.xscale),floor(P2dist X)+ifelse((P2dist X=[1,30]),10,-10)+10))

;Y座標
[state 240]
type = VarSet
trigger1 = AnimElem=12
var(18) = floor(-100*const(size.yscale))

;・・・・自分側ヒットバック・・・・
;ヒットバック量取得
[state -2]
type = varset
triggerall = (movecontact=[1,1+(var(1)%2>=1||var(1)%8>=4)])&&numtarget&&var(1)%4<2
trigger1 = var(1)%2<1&&var(1)%8<4&&target,time=0
fvar(5) = ifelse(((var(3)&&target,statetype=A)||movehit),-9.0*ifelse(var(6)%10>1,2,1)*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.06),-15.0*(1.0+ifelse(var(2)>=32,31,var(2)-1)*.060))*const(size.xscale)
ignorehitpause=1

;ヒットバック時間取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2<1&&var(1)%8<4&&target,time=0)||((var(1)%2>=1||var(1)%8>=4)&&target,time=1)
fvar(6) = ifelse(moveguarded,18,20+(P2statetype=C))
ignorehitpause=1

;ヒットポーズ取得
[state -2]
type = varset
triggerall = (movecontact=[1,2])&&numtarget&&var(1)%4<2
trigger1 = (var(1)%2<1&&var(1)%8<4&&target,time=0)||((var(1)%2>=1||var(1)%8>=4)&&target,time=1)
fvar(7) = (14-(var(1)%2>=1||var(1)%8>=4))*ifelse(moveguarded,-1,1)
ignorehitpause=1
;・・・・・・・・

[state 200]
type = ChangeState
trigger1 = AnimTime=0
value = 0
ctrl = 1

;苦ヲ喰ム紅(30,18回転音、30,19ダメージ与えた時)(アシスト30,11大砲構え、30,12発射)
[statedef 3100]
type = S
movetype=A
physics = S
ctrl = 0
velset = ifelse(fvar(9),fvar(9)*0,0),0
movehitpersist=1

[state 200]
type = VarSet
trigger1 = !time&&P2dist X<0&&(prevstateno=52||((prevstateno=[200,1999])&&fvar(10)<=0))
fvar(9) = -fvar(9)

[state 200]
type = Turn
trigger1 = !time&&P2dist X<0&&(prevstateno=52||(prevstateno=[200,1999]))

;援軍ヒットキャンセル
[state 100]
type = Helper
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = (prevstateno=[1000,1999])
id = 7710
stateno = 7710
pos = 0,const(size.mid.pos.y)
postype = P1
pausemovetime=20
supermovetime=20
ignorehitpause=1

;援軍ヒットキャンセル
[state 100]
type = VarSet
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = (prevstateno=[1000,1999])
fvar(5) = 0

;援軍ヒットキャンセル
[state 100]
type = VarSet
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = (prevstateno=[1000,1999])
var(15) = 0

;援軍ヒットキャンセル
[state 100]
type = MoveHitReset
trigger1 = !time

;速度取得
[state -2]
type = varset
trigger1 = !time
fvar(8) = 0
ignorehitpause=1

;先行入力処理リセット
[state 200]
type = VarSet
trigger1 = !Time
var(53) = 0

[state 200]
type = ChangeAnim
trigger1 = Time=0&&!(var(34)=stateno&&((prevstateno=[130,132])||(prevstateno=150||prevstateno=152)))
value = 3100

[state 200]
type = VarSet
trigger1 = !IsHelper&&!Time
fvar(8) = 0

;BASARAゲージ回復不能時間
[state 2000]
type = VarSet
trigger1 = AnimElem=2,=0
var(9)=420

[state 200]
type = NotHitBy
trigger1 = !IsHelper&&AnimElem=2,=0
value = ,AP
time=46

[state 200]
type = pause
trigger1 = !IsHelper&&AnimElem=1,=3
time = 46
movetime = 46

[state -2]
type = poweradd
trigger1 = !IsHelper&&(prevstateno!=[5000,5099])&&AnimElem=2,=0
value = -1000
persistent=0

[state 200]
type = helper
trigger1 = !IsHelper&&AnimElem=2
id = 7560
stateno = 7560
pos = -floor(46*const(size.xscale)),floor(-120*const(size.yscale))
postype = P1
pausemovetime=46+999
ownpal = 1

;~~~スーパーアーマー~~~
;経過時間
[state 1610]
type = varset
trigger1 = !time&&(prevstateno!=5000&&prevstateno!=5010&&prevstateno!=5020&&prevstateno!=5070)
var(46) = 1

;経過時間
[state 1610]
type = varadd
trigger1 = time>0&&time>=var(48)
var(46) = 1

;ダメージ
[state 1610]
type = LifeAdd
trigger1 = !time&&(prevstateno=5000||prevstateno=5010||prevstateno=5020||prevstateno=5070)
value = -var(47)

;ヒットポーズ
[state 1610]
type = varset
trigger1 = !time&&(prevstateno!=5000&&prevstateno!=5010&&prevstateno!=5020&&prevstateno!=5070)
var(48) = 0

[state 1610]
type = ChangeAnim
trigger1 = (prevstateno=5000||prevstateno=5010||prevstateno=5020||prevstateno=5070)&&var(46)<=90
value = 3100
elem =ifelse(AnimElemNo(0)!=4&&var(46)>=41,4,ifelse(AnimElemNo(0)!=3&&var(46)>=37,3,ifelse(AnimElemNo(0)!=2&&var(46)>=32,2,ifelse(AnimElemNo(0)!=1&&var(46)>=1,1,AnimElemNo(0)))))

[state 1610]
type = ChangeAnim
trigger1 = (prevstateno=5000||prevstateno=5010||prevstateno=5020||prevstateno=5070)&&var(46)<=90
value = 3100
elem = ifelse(AnimElemNo(0)!=9&&var(46)>=50,9,ifelse(AnimElemNo(0)!=8&&var(46)>=49,8,ifelse(AnimElemNo(0)!=7&&var(46)>=48,7,ifelse(AnimElemNo(0)!=6&&var(46)>=46,6,ifelse(AnimElemNo(0)!=5&&var(46)>=44,5,AnimElemNo(0))))))

[state 1610]
type = ChangeAnim
trigger1 = (prevstateno=5000||prevstateno=5010||prevstateno=5020||prevstateno=5070)&&var(46)<=90
value = 3100
elem = ifelse(AnimElemNo(0)!=14&&var(46)>=56,14,ifelse(AnimElemNo(0)!=13&&var(46)>=54,13,ifelse(AnimElemNo(0)!=12&&var(46)>=53,12,ifelse(AnimElemNo(0)!=11&&var(46)>=52,11,ifelse(AnimElemNo(0)!=10&&var(46)>=51,10,AnimElemNo(0))))))

[state 1610]
type = ChangeAnim
trigger1 = (prevstateno=5000||prevstateno=5010||prevstateno=5020||prevstateno=5070)&&var(46)<=90
value = 3100
elem = ifelse(AnimElemNo(0)!=19&&var(46)>=80,19,ifelse(AnimElemNo(0)!=18&&var(46)>=72,18,ifelse(AnimElemNo(0)!=17&&var(46)>=62,17,ifelse(AnimElemNo(0)!=16&&var(46)>=60,16,ifelse(AnimElemNo(0)!=15&&var(46)>=58,15,AnimElemNo(0))))))

[state 1610]
type = ChangeAnim
trigger1 = (prevstateno=5000||prevstateno=5010||prevstateno=5020||prevstateno=5070)&&var(46)<=88
value = 3100
elem = ifelse(AnimElemNo(0)!=20&&var(46)>=84,20,AnimElemNo(0))

[state 1610]
type = ChangeAnim
trigger1 = Time<var(48) && (prevstateno=5000||prevstateno=5010||prevstateno=5020||prevstateno=5070)
value = anim
elem = AnimElemNo(0)

[State 40, 1]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&AnimElem=2,=0
value = 10,48
channel = 1

;援軍アシスト
[state 3000]
type = VarSet
triggerall = (var(40)=1||(var(40)=[5,6]))&&Power>=1000&&animelemtime(5)>=0&&animelemtime(6)<0
trigger1 = command="a"&&!var(59)
var(40) = 7
ignorehitpause=1

;援軍アシスト
[state 3000]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&var(40)=7
value = 10,50
channel = 1

;援軍アタック・勝利(プレイヤーヘルパー削除時用)
[state -2]
type = Helper
triggerall = var(40)=7 && numhelper(10000) && !numhelper(11000)
triggerall = !(stateno=3000&&AnimElemTime(1)>=1&&AnimElemTime(1)<31)&&!(stateno=3100&&AnimElemTime(1)>=1&&AnimElemTime(2)<0)&&!(stateno=3500&&AnimElemTime(1)>=1&&AnimElemTime(1)<31)
trigger1 = (var(40)=[5,9])
name="Nou-Hime"
id = 11000
stateno = 11000
pos = floor(helper(10000),pos x-pos x)*ifelse(helper(10000),facing!=facing,-1,1)*ifelse(teamside=2,-1,1),-floor(Pos Y)
postype = p1
ownpal = 1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)
size.ground.fwd = 20
size.ground.back = 20
size.head.pos = -10,-80
size.mid.pos = -5,-50
facing = helper(10000),facing
ignorehitpause=1

[state 800]
type = varset
trigger1 = movehit=1
var(1) = ifelse(var(1)%16>=8,8,0)

[state 800]
type = varset
trigger1 = movehit=1
var(6) = ifelse(floor(var(6)%10000/1000)>0,1000,0)

;>>>>>>>>>>><<<<<<<<<<<

[State 0, HitDef]
type = HitDef
triggerall = var(52)<=0||var(52)=100
trigger1 = AnimElem=5
attr = S,HT
hitflag = AF
priority = 1,Miss
getpower = 0,0
givepower = 0,0
sparkno = -1
guard.sparkno = -1
sparkxy = 0,0
hitsound = -1
guardsound = -1
p1facing = 1
p2facing=1
numhits = 1

;==ヒット後
[state 920]
type = changestate
trigger1 = (movehit=[1,5])&&numtarget
trigger1 = target,time=0
value = 3150
ignorehitpause=1

[state 200]
type = AttackDist
trigger1 = AnimElem=6
value = 0

;強制停止中に動かないように
[state -2]
type = PosFreeze
trigger1 = AnimElemTime(2)>=0&&AnimElemTime(3)<0
trigger2 = NumHelper(7560)
trigger2 = helper(7560),time<30
value = 1

;ヒットによる増加(スタイリッシュポイント)
[state -2]
type = varadd
trigger1 = movehit=1&&hitpausetime=13
fvar(15) = .00005*ifelse(animelemtime(15)>=0,floor(150*fvar(14)*1.22),floor(150*fvar(14)*1.22))
ignorehitpause=1

[state -2]
type = varset
trigger1 = movehit=1
fvar(14) = fvar(1)*fvar(2)*fvar(3)*fvar(4)
ignorehitpause=1

;◇◇ヒットスパーク◇◇
[state 240]
type = VarSet
trigger1 = AnimElem=5
var(16) = -1
persistent=0

[state 200]
type = ChangeState
trigger1 = AnimTime=0
value = 0
ctrl = 1

;苦ヲ喰ム紅（ヒット）
[statedef 3150]
type = S
movetype=A
physics = S
ctrl = 0
velset = ifelse(fvar(9),fvar(9)*0,0),0

[state 200]
type = ChangeAnim
trigger1 = Time=0&&!(var(34)=stateno&&((prevstateno=[130,132])||(prevstateno=150||prevstateno=152)))
value = 3150

;援軍アシスト
[state 3000]
type = VarSet
triggerall = (var(40)=1||(var(40)=[5,6]))&&Power>=1000&&animtime<-2
trigger1 = command="a"&&!var(59)
trigger2 = (enemynear,life=[80,140])
trigger2 = random%2=0&&AnimElemTime(17)>=0&&AnimElemTime(19)<0&&var(59)
var(40) = 7
ignorehitpause=1

;援軍アシスト
[state 3000]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&var(40)=7
value = 10,50
channel = 1

;援軍アタック・勝利(プレイヤーヘルパー削除時用)
[state -2]
type = Helper
triggerall = var(40)=7 && numhelper(10000) && !numhelper(11000)
triggerall = !(stateno=3000&&AnimElemTime(1)>=1&&AnimElemTime(1)<31)&&!(stateno=3100&&AnimElemTime(1)>=1&&AnimElemTime(2)<0)&&!(stateno=3500&&AnimElemTime(1)>=1&&AnimElemTime(1)<31)
trigger1 = (var(40)=[5,9])
name="Nou-Hime"
id = 11000
stateno = 11000
pos = floor(helper(10000),pos x-pos x)*ifelse(helper(10000),facing!=facing,-1,1)*ifelse(teamside=2,-1,1),-floor(Pos Y)
postype = p1
ownpal = 1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)
size.ground.fwd = 20
size.ground.back = 20
size.head.pos = -10,-80
size.mid.pos = -5,-50
facing = helper(10000),facing
ignorehitpause=1

[state 3100]
type = VelSet
trigger1 = AnimElem=6
y = -2.5

[state 3100]
type = VelSet
trigger1 = AnimElem=13
y = 0

[state 3100]
type = VelAdd
trigger1 = AnimElem=21,>0&&AnimElem=22,<0
y = .46

[state 3100]
type = VelSet
trigger1 = AnimElem=22
y = 0

[state 3100]
type = null;PosSet
trigger1 = AnimElem=22
y = 0

[state 3110]
type = Explod
trigger1 = animelem=13
id = 6250
anim=6250
pos = 0,floor(160*const(size.yscale)*1.5)
postype= p1
ownpal = 1
sprpriority = 4
removeongethit=1
removetime=-1
scale = const(size.xscale)*1.5,const(size.yscale)*1.5
pausemovetime=999
supermovetime=999

[state 3110]
type = Explod
trigger1 = animelem=13
id = 6250
anim=6250
pos = 0,-floor(96*const(size.yscale)*1.5)
postype= p1
ownpal = 1
sprpriority = 4
removeongethit=1
removetime=-1
scale = const(size.xscale)*1.5,const(size.yscale)*1.5
pausemovetime=999
supermovetime=999

[state 3110]
type = Explod
trigger1 = animelem=13
id = 6251
anim=6251
pos = -floor(200*const(size.xscale)),floor(160*const(size.yscale)*1.5)
postype= p1
ownpal = 1
sprpriority = 4
removeongethit=1
removetime=-1
scale = const(size.xscale)*1.5,const(size.yscale)*1.5
pausemovetime=999
supermovetime=999

[state 3110]
type = Explod
trigger1 = animelem=13
id = 6251
anim=6251
pos = floor(200*const(size.xscale)),floor(160*const(size.yscale)*1.5)
postype= p1
ownpal = 1
sprpriority = 4
removeongethit=1
removetime=-1
scale = const(size.xscale)*1.5,const(size.yscale)*1.5
pausemovetime=999
supermovetime=999

[state 3150]
type = VarSet
trigger1 = AnimElem=19
var(7) = 0

[state 3150]
type = VarAdd
trigger1 = AnimElem=19,>=0
var(7) = 1

[state 3150]
type = ModifyExplod
trigger1 = AnimElem=19,>=0&&AnimElem=21,<0
id = 6250
scale = const(size.xscale)*(1.5-var(7)*.18),const(size.yscale)*1.5

[state 3150]
type = ModifyExplod
trigger1 = AnimElem=19,>=0&&AnimElem=21,<0
id = 6251
scale = const(size.xscale)*(1.5-var(7)*.18),const(size.yscale)*1.5

[state 3150]
type = RemoveExplod
trigger1 = AnimElem=21
id = 6250

[state 3150]
type = RemoveExplod
trigger1 = AnimElem=21
id = 6251

[state 3100]
type = PlaySND
trigger1 = AnimElem=4
trigger2 = AnimElem=6
trigger3 = AnimElem=8
trigger4 = AnimElem=10
value = 30,18
channel = 10
ignorehitpause=1

[state 3100]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&AnimElem=13
value = 10,49
channel = 1

[state 3100]
type = PlaySND
trigger1 = AnimElem=13
value = 30,19
channel = 11
ignorehitpause=1

[state 1100]
type = TargetState
trigger1 = animelemtime(12)<0&&numtarget
trigger1 = target,stateno!=3156+(animelemtime(2)>=0)
value = 3156+(animelemtime(2)>=0)

[state 801]
type = Width
trigger1 = AnimElemTime(1)>=0&&AnimElemTime(6)<0
edge = floor(166*const(size.xscale))

[state 801]
type = Width
trigger1 = AnimElemTime(6)>=0&&AnimElemTime(10)<0
edge = floor(232*const(size.xscale))

[state 801]
type = TargetBind
trigger1 = AnimElemTime(1)>=0&&AnimElemTime(2)<0
pos = floor(124*const(size.xscale)),-floor(200*const(size.yscale))

[state 801]
type = TargetBind
trigger1 = AnimElemTime(2)>=0&&AnimElemTime(3)<0
pos = floor(160*const(size.xscale)),-floor(328*const(size.yscale))

[state 801]
type = TargetBind
trigger1 = AnimElemTime(3)>=0&&AnimElemTime(4)<0
pos = floor(154*const(size.xscale)),-floor(330*const(size.yscale))

[state 801]
type = TargetBind
trigger1 = AnimElemTime(4)>=0&&AnimElemTime(5)<0
pos = floor(126*const(size.xscale)),-floor(328*const(size.yscale))

[state 801]
type = TargetBind
trigger1 = AnimElemTime(5)>=0&&AnimElemTime(6)<0
pos = floor(96*const(size.xscale)),-floor(328*const(size.yscale))

[state 801]
type = TargetBind
trigger1 = AnimElemTime(6)>=0&&AnimElemTime(7)<0
pos = -floor(26*const(size.xscale)),-floor(320*const(size.yscale))

[state 801]
type = TargetBind
trigger1 = AnimElemTime(7)>=0&&AnimElemTime(8)<0
pos = -floor(46*const(size.xscale)),-floor(280*const(size.yscale))

[state 801]
type = TargetBind
trigger1 = AnimElemTime(8)>=0&&AnimElemTime(9)<0
pos = floor(96*const(size.xscale)),-floor(250*const(size.yscale))

[state 801]
type = TargetBind
trigger1 = AnimElemTime(9)>=0&&AnimElemTime(10)<0
pos = -floor(46*const(size.xscale)),-floor(260*const(size.yscale))

[state 801]
type = TargetBind
trigger1 = AnimElemTime(10)>=0&&AnimElemTime(11)<0
pos = -floor(76*const(size.xscale)),-floor(260*const(size.yscale))

[state 801]
type = TargetBind
trigger1 = AnimElemTime(11)>=0&&AnimElemTime(12)<0
pos = floor(64*const(size.xscale)),-floor(240*const(size.yscale))

[state 801]
type = TargetBind
trigger1 = AnimElemTime(12)>=0&&AnimElemTime(13)<0
pos = floor(40*const(size.xscale)),-floor(260*const(size.yscale))

[state 801]
type = TargetBind
trigger1 = AnimElemTime(13)=0
pos = floor(60*const(size.xscale)),-floor(260*const(size.yscale))

;BASARA Moves Finish
[state 3510]
type = Helper
trigger1 = (movehit=[1,2]) && !enemynear,alive && roundstate=3 && !numhelper(8800)
id  = 8800
stateno=8800
pos = 0,0
postype = left
scale = const(size.xscale),const(size.yscale)
persistent=0
ignorehitpause=1

;Attack Lv.4
[state 200]
type = Hitdef
triggerall = var(52)<=0||var(52)=100
trigger1 = AnimElem=12
damage = floor(150*ifelse(fvar(1)<.25,.25*fvar(2)*fvar(3)*fvar(4),fvar(0))*1.22),floor(ceil(150*1.0/4)*1.22)
ground.slidetime = 17+(P2statetype=C)
ground.hittime = 17+(P2statetype=C)
guard.hittime = 15
pausetime = 1,9
ground.velocity = 0*const(size.xscale),-28*const(size.yscale)
guard.velocity = -13.5*const(size.xscale)
ground.cornerpush.veloff = 0
air.velocity = 0*const(size.xscale),ifelse(var(6)%10>0,var(6)%10*1.5,(-28.0*(51-var(3))/51-.9)*const(size.yscale))
airguard.velocity = -6*const(size.xscale),-2*const(size.yscale)
air.cornerpush.veloff = 0
yaccel = .9*const(size.yscale)
fall.recover = 0
hitsound = -1
guardsound = -1
getpower = 0,0
givepower = 0,0
fall = 1
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-180*const(size.xscale))
animtype = hard
ground.type = High
attr = S,HA
hitflag = MAFD
;guardflag = M

[state 920]
type = targetstate
trigger1 = (movehit=[1,5])&&numtarget
trigger1 = target,time=0
value = 3159
ignorehitpause=1
persistent=0

[state 3150]
type = AttackDist
trigger1 = 1
value = 0

;◇◇ヒットスパーク◇◇
[state 240]
type = VarSet
trigger1 = AnimElem=13
var(16) = -1
persistent=0

[state 200]
type = ChangeState
trigger1 = AnimTime=0
value = 0
ctrl = 1

;苦ヲ喰ム紅相手動作
[statedef 3156]
type = A
movetype=H
physics=N
ctrl = 0
velset = 0,0

[state 1116]
type = ChangeAnim
trigger1 = time<16
value = Anim
elem = AnimElemNo(0)

[state 1116]
type = ChangeState
trigger1 = time=16
value = 3157

[state 1116]
type = ScreenBound
trigger1 = 1
value = 0
movecamere = 1,0

[state 1116]
type = SelfState
trigger1 = time>=80
value = 5210

;苦ヲ喰ム紅相手動作
[statedef 3157]
type = A
movetype=H
physics=N
ctrl = 0
velset = 0,0

[state 1116]
type = ChangeAnim2
trigger1 = !time&&anim!=3156
value = 3156

[state 1116]
type = ScreenBound
trigger1 = 1
value = 0
movecamere = 1,0

[state 1116]
type = SelfState
trigger1 = time>=112
value = 5210

;苦ヲ喰ム紅相手動作
[statedef 3159]
type = A
movetype=H
physics=N
ctrl = 0
velset = 0,0

[state 1116]
type = ChangeAnim
trigger1 = time<14
value = 5050+(SelfAnimExist(5051))

[state 1116]
type = ScreenBound
trigger1 = 1
value = 0
movecamere = 0,0

[state 1116]
type = HitVelSet
trigger1 = Time=0
y = 1

[state 1116]
type = VelAdd
trigger1 = Time>=0
y = gethitvar(yaccel)

[state 1116]
type = ChangeState
trigger1 = Vel Y>0 && Pos Y>=-Vel Y
value = 15100

;苦ヲ喰ム紅オーラ
[statedef 6480]
ctrl = 0
anim = 90000

[state 6480]
type = BindtoRoot
trigger1 = 1
pos = 0,-floor(280*const(size.yscale))
time = 1

[state 6480]
type = Explod
trigger1 = time%32=0
id = 6480
anim=6480
pos = 0,0
scale = const(size.xscale)*2,const(size.yscale)*3
ownpal = 1
sprpriority = -3
bindtime=-1
pausemovetime=999
supermovetime=999

[state 6480]
type = Explod
trigger1 = time%32=16
id = 6480
anim=6480
pos = 0,0
scale = const(size.xscale)*2,const(size.yscale)*3
ownpal = 1
sprpriority = -3
bindtime=-1
pausemovetime=999
supermovetime=999

[state 6480]
type = RemoveExplod
trigger1 = (root,stateno!=[3110,3120])

[state 6480]
type = DestroySelf
trigger1 = (root,stateno!=[3110,3120])

;屍ニ堕ツル城
[statedef 3500]
type = S
movetype=A
physics = S
ctrl = 0
velset = ifelse(fvar(9),fvar(9)*0,0),0

[state 200]
type = VarSet
trigger1 = !time&&P2dist X<0&&(prevstateno=52||((prevstateno=[200,1999])&&fvar(10)<=0))
fvar(9) = -fvar(9)

[state 200]
type = Turn
trigger1 = !time&&P2dist X<0&&(prevstateno=52||(prevstateno=[200,1999]))

;速度取得
[state -2]
type = varset
trigger1 = !time
fvar(8) = 0
ignorehitpause=1

;先行入力処理リセット
[state 200]
type = VarSet
trigger1 = !Time
var(53) = 0

[state 200]
type = ChangeAnim
trigger1 = Time=0&&!(var(34)=stateno&&((prevstateno=[130,132])||(prevstateno=150||prevstateno=152)))
value = 3500

;一撃BASARA技使用不能時間
[state 195]
type = VarSet
trigger1 = !Time
var(45) = -1

[state 200]
type = pause
trigger1 = AnimElem=4,=3
time = 78
movetime = 78

[state 200]
type = helper
trigger1 = AnimElem=5
id = 7580
stateno = 7580
pos = 0,0
postype = P1
pausemovetime=50+999

[state 190]
type = PlayerPush
trigger1 = 1
value = 0

[state 190]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&AnimElem=1
value = 10,44
channel = 1

[state 190]
type = PlaySND
trigger1 = AnimElem=12
value = 30,13
channel = 10
volume = 192

[state 3500]
type = PosAdd
trigger1 = AnimElem=6,>=0&&AnimElem=7,<0
y = -1

[state 3510]
type = StatetypeSet
trigger1 = AnimElem=7
statetype=A
physics = N

[state 3510]
type = Explod
trigger1 = AnimElem=7
id = 6780
anim = 6780
pos = -floor(310*const(size.xscale)),-floor(140*const(size.yscale))
postype = p1
sprpriority = 2
ignorehitpause=1
scale = const(size.xscale)*1.5,const(size.yscale)*1.5

[state 3510]
type = Explod
trigger1 = AnimElem=7
id = 6780
anim = 6780
pos = floor(310*const(size.xscale)),-floor(140*const(size.yscale))
postype = p1
sprpriority = 2
ignorehitpause=1
scale = const(size.xscale)*1.5,const(size.yscale)*1.5

[state 3510]
type = Explod
trigger1 = AnimElem=7
id = 6712
anim = 6712
pos = -floor(340*const(size.xscale)),floor(120*const(size.yscale))
postype = p1
sprpriority = 2
ignorehitpause=1
scale = const(size.xscale),const(size.yscale)

[state 3510]
type = Explod
trigger1 = AnimElem=7
id = 6712
anim = 6712
pos = floor(280*const(size.xscale)),floor(120*const(size.yscale))
postype = p1
sprpriority = 2
ignorehitpause=1
scale = const(size.xscale),const(size.yscale)

[state 3510]
type = Explod
trigger1 = AnimElem=7
id = 6710
anim = 6710
pos = -floor(400*const(size.xscale)),floor(120*const(size.yscale))
postype = p1
sprpriority = 2
ignorehitpause=1
scale = const(size.xscale),const(size.yscale)

[state 3510]
type = Explod
trigger1 = AnimElem=7
id = 6700
anim = 6705
pos = -floor(104*const(size.xscale)),0
postype = p1
ignorehitpause=1
scale = const(size.xscale),const(size.yscale)

[state 3510]
type = Explod
trigger1 = AnimElem=7
id = 6711
anim = 6711
pos = -floor(320*const(size.xscale)),0
postype = p1
ignorehitpause=1
scale = const(size.xscale),const(size.yscale)

[state 3510]
type = Explod
trigger1 = AnimElem=7
id = 6711
anim = 6711
pos = -floor(128*const(size.xscale)),0
postype = p1
ignorehitpause=1
scale = const(size.xscale),const(size.yscale)

[state 3510]
type = Explod
trigger1 = AnimElem=8
id = 6711
anim = 6711
pos = floor(64*const(size.xscale)),0
postype = p1
ignorehitpause=1
scale = const(size.xscale),const(size.yscale)

[state 3510]
type = Explod
trigger1 = AnimElem=11
id = 6770
anim = 6770
pos = -floor(16*const(size.xscale)),-floor(168*const(size.xscale))
postype = p1
ignorehitpause=1
sprpriority = 4
scale = const(size.xscale)*.25,const(size.yscale)*.25

[state 3510]
type = Explod
trigger1 = AnimElem=11
id = 6770
anim = 6770
pos = -floor(8*const(size.xscale)),-floor(168*const(size.xscale))
postype = p1
ignorehitpause=1
sprpriority = 4
scale = const(size.xscale)*.25,const(size.yscale)*.25

[state 3510]
type = Explod
trigger1 = AnimElem=11
id = 6771
anim = 6771
pos = -floor(12*const(size.xscale)),-floor(168*const(size.xscale))
postype = p1
ignorehitpause=1
sprpriority = 4
scale = const(size.xscale)*.25,const(size.yscale)*.25

[state 3510]
type = Helper
trigger1 = AnimElem=12
id = 6770
stateno = 6770
pos = -floor(12*const(size.xscale)),-floor(166*const(size.xscale))
postype = p1
ignorehitpause=1
size.xscale = const(size.xscale)*.25
size.yscale = const(size.yscale)*.25
[state 3510]
type = Helper
trigger1 = AnimElem=12
id = 6771
stateno = 6770
pos = -floor(12*const(size.xscale)),-floor(166*const(size.xscale))
postype = p1
ignorehitpause=1
size.xscale = const(size.xscale)*.25
size.yscale = const(size.yscale)*.25
[state 3510]
type = Helper
trigger1 = AnimElem=12
id = 6772
stateno = 6770
pos = -floor(12*const(size.xscale)),-floor(166*const(size.xscale))
postype = p1
ignorehitpause=1
size.xscale = const(size.xscale)*.25
size.yscale = const(size.yscale)*.25
[state 3510]
type = Helper
trigger1 = AnimElem=12
id = 6773
stateno = 6770
pos = -floor(12*const(size.xscale)),-floor(166*const(size.xscale))
postype = p1
ignorehitpause=1
size.xscale = const(size.xscale)*.25
size.yscale = const(size.yscale)*.25
[state 3510]
type = Helper
trigger1 = AnimElem=12
id = 6774
stateno = 6770
pos = -floor(12*const(size.xscale)),-floor(166*const(size.xscale))
postype = p1
ignorehitpause=1
size.xscale = const(size.xscale)*.25
size.yscale = const(size.yscale)*.25

[state 3510]
type = VarSet
trigger1 = AnimElem=11,=0
var(7) = 0

[state 3510]
type = VarAdd
trigger1 = AnimElem=11,>=0&&AnimElem=13,<0&&var(7)<10
var(7) = 1

[state 3510]
type = ModifyExplod
trigger1 = AnimElem=11,>=0&&AnimElem=13,<0
id = 6770
scale = const(size.xscale)*(.05+var(7)*.05),const(size.yscale)*(.05+var(7)*.05)

[state 3510]
type = ModifyExplod
trigger1 = AnimElem=11,>=0&&AnimElem=13,<0
id = 6771
scale = const(size.xscale)*(.075+var(7)*.05),const(size.yscale)*(.075+var(7)*.05)

[state 3510]
type = VelSet
trigger1 = AnimElem=18,=1
x = 2.0
y = -6.0
persistent=0

[state 3510]
type = VelAdd
trigger1 = AnimElem=18,>=1
y = .5

[state 3510]
type = ChangeAnim
trigger1 = AnimElem=18,>=1 && vel Y>0&&Pos Y>=-vel Y
value = 3505

[state 3510]
type = StatetypeSet
trigger1 = Anim=3505
statetype=S
physics = S
persistent=0

[state 3510]
type = PosSet
trigger1 = Anim=3505
y = 0
persistent=0

[state 3510]
type = VelSet
trigger1 = Anim=3505
x = 0
y = 0
persistent=0

;~~~自分側のhitpause作成~~
[state 250]
type = varset
trigger1 = time=0
var(52) = 100

[state 250]
type = varadd
trigger1 = (Movehit||projcontacttime(3500)>-1)&&var(52)>=0
var(52) = -1

[state 250]
type = varset
trigger1 = Movehit=1||!projcontacttime(3500)
var(52) = 0;14

[state 250]
type = ChangeAnim
trigger1 = (Movehit||projcontacttime(3500)>-1||var(19)) && var(52)>var(54) && var(52)<100
value = anim
elem = ifelse(AnimElemNo(0)=var(47),AnimElemNo(0),AnimElemNo(-1))

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(47) = AnimElemNo(0)

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(54) = AnimElemTime(AnimElemNo(0))

[state 250]
type = PosFreeze
trigger1 = var(52)>0&&(Movehit||projcontacttime(3500)>-1||var(19))
value = 1
;~~~~~~~~~~~~~~~~~~~~~~

;>>>>>>>>>>><<<<<<<<<<<

;Attack Lv.5
[state ]
type=assertspecial
trigger1=1
flag=unguardable
[state ]
type=projectile
trigger1=animelem=12,>=0&&animelem=13,<0&&(var(52)<1||var(52)=100)
air.cornerpush.veloff=0
air.fall=1
air.velocity=0,-18*const(size.yscale)
animtype=hard
attr=acs,aa,at,ap
fall=0
fall.recover=0
ground.cornerpush.veloff=0
ground.hittime=20+(p2statetype=c)
ground.slidetime=20+(p2statetype=c)
ground.type=high
guardflag=
hitflag=adfhlm
hitonce=0
hitsound=s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,2)
numhits=0
p2stateno=3516
pausetime=0,60
projanim=3501
projedgebound=2000000000
projheightbound=-2147483647,2147483647
projid=3500
projremovetime=1
projstagebound=2000000000
sparkno=-1
yaccel=.9*const(size.yscale)
[state ]
type=reversaldef
trigger1=var(52)<1||var(52)=100
fall=0
fall.recover=0
hitsound=s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,2)
numhits=0
p2stateno=3516
pausetime=0,60
reversal.attr=acs,aa,ap,at
sparkno=-1

[state 3500]
type = HitBy
trigger1 = 1
value = 

;ヒット後の演出へ
[state 3500]
type = Pause
trigger1 = Movehit=1||!projcontacttime(3500)
time = 0
movetime=0

;ヒット後の演出へ
[state 3500]
type = ChangeState
trigger1 = (Movehit||projcontacttime(3500)>-1)&&AnimElem=14,>=0
value = 3510

[state 200]
type = AttackDist
trigger1 = AnimElem=13
value = 0

;強制停止中に動かないように
[state -2]
type = PosFreeze
trigger1 = (AnimElem=1)
trigger2 = NumHelper(7580)
trigger2 = helper(7580),time<30
value = 1

;◇◇ヒットスパーク◇◇
[state 240]
type = VarSet
trigger1 = AnimElem=12
var(16) = 10;+random%4
persistent=0

;X座標
[state 240]
type = VarSet
trigger1 = AnimElem=12,>=0&&AnimElem=13,<0
var(17) = floor(ifelse(P2dist X>486*const(size.xscale),486*const(size.xscale),floor(P2dist X)+ifelse((P2dist X=[1,30]),10,-10)+10))

;Y座標
[state 240]
type = VarSet
trigger1 = AnimElem=12,>=0&&AnimElem=13,<0
var(18) = floor(-80*const(size.yscale))

[state 195]
type = ChangeState
trigger1 = Anim=3505 && AnimTime=0
value = 0
ctrl = 1

;一撃BASARA技ヒット後
[statedef 3510]
type = A
movetype=A
physics = N
ctrl = 0
velset = 0,0
Anim=3510

[state 3500]
type = NotHitBy
trigger1 = 1
value = SCA
ignorehitpause=1

[state 190]
type = PlayerPush
trigger1 = 1
value = 0

;一撃BASARA技成功後
[state 195]
type = VarSet
trigger1 = !Time
var(45) = 10000
ignorehitpause=1

[state 801]
type = AssertSpecial
trigger1 = 1
flag = NoMusic
flag2 = TimerFreeze

[state 801]
type = PlaySND
trigger1 = !Time
value = 7900,0
loop = 1
channel = 30
lowpriority = 1

[state 3510]
type = VarSet
trigger1 = AnimElem=11
var(7) = 0

[state 3510]
type = VarAdd
trigger1 = AnimElem=11,>=0&&AnimElem=13,<0
var(7) = 1

[state 3510]
type = AllPalFX
trigger1 = AnimElem=11,>=0&&AnimElem=13,<0
add = 22*var(7),22*var(7),22*var(7)
time = 1

[state 3510]
type = AssertSpecial
trigger1 = AnimElem=13,>=0
flag = noBG
flag2 = noFG

[state 3510]
type = ScreenBound
trigger1 = AnimElem=13,>=0
movecamera = 0,0

[state 3510]
type = VarSet
trigger1 = AnimElem=18
var(7) = 0

[state 3510]
type = VarAdd
trigger1 = AnimElem=18,>=0
var(7) = 1

[state 3510]
type = AllPalFX
trigger1 = AnimElem=18,>=0&&AnimElem=20,<8
add = 16*var(7),16*var(7),16*var(7)
time = 1

[state 3510]
type = PosSet
trigger1 = AnimElem=13
x = -floor(20*const(size.xscale))

[state 3510]
type = Explod
trigger1 = AnimElem=13
id = 6720
anim = 6720
pos = 75,160
postype = back
sprpriority = -3
ignorehitpause=1
scale = .625,.625

[state 3510]
type = Explod
trigger1 = AnimElem=13
id = 6730
anim = 6730
pos = 0,240
postype = back
removetime=76
sprpriority = -2
ignorehitpause=1
scale = .625,.625

[state 3510]
type = Explod
trigger1 = AnimElem=13
id = 6731
anim = 6731
pos = 150,240
postype = back
removetime=76
sprpriority = -2
ignorehitpause=1
scale = .625,.625

[state 3510]
type = Explod
trigger1 = AnimElem=13
id = 6732
anim = 6732
pos = 300,240
postype = back
removetime=76
sprpriority = -2
ignorehitpause=1
scale = .625,.625

[state 3510]
type = Explod
trigger1 = AnimElem=13
id = 6740
anim = 6740
pos = 0,240
postype = back
sprpriority = -3
ignorehitpause=1
scale = 15,15

[state 3510]
type = Explod
trigger1 = AnimElem=17
id = 6741
anim = 6741
pos = 0,240
postype = back
sprpriority = -1
ignorehitpause=1
scale = 15,15

[state 3510]
type = RemoveExplod
trigger1 = AnimElem=20,=8
id = 6740

[state 3510]
type = Explod
trigger1 = AnimElem=17
id = 6750
anim = 6750
pos = 160,80
postype = back
sprpriority = -2
ignorehitpause=1
scale = .75,.75

[state 3510]
type = Explod
trigger1 = AnimElem=17
id = 6751
anim = 6751
pos = 160,80
postype = back
sprpriority = -2
ignorehitpause=1
scale = .75,.75

[state 3510]
type = Explod
trigger1 = AnimElem=17
id = 6760
anim = 6760
pos = 30,120
postype = back
sprpriority = -2
ignorehitpause=1
scale = 1.5,1.5

[state 3510]
type = Explod
trigger1 = AnimElem=17
id = 6760
anim = 6760
pos = 60,160
postype = back
sprpriority = -2
ignorehitpause=1
scale = 1.5,1.5

[state 3510]
type = Explod
trigger1 = AnimElem=17
id = 6760
anim = 6760
pos = 90,120
postype = back
sprpriority = -2
ignorehitpause=1
scale = 1.5,1.5

[state 3510]
type = Explod
trigger1 = AnimElem=17
id = 6760
anim = 6760
pos = 130,160
postype = back
sprpriority = -2
ignorehitpause=1
scale = 1.5,1.5

[state 3510]
type = Explod
trigger1 = AnimElem=17
id = 6760
anim = 6760
pos = 160,80
postype = back
sprpriority = -2
ignorehitpause=1
scale = 1.5,1.5

[state 3510]
type = Explod
trigger1 = AnimElem=17
id = 6760
anim = 6760
pos = 190,120
postype = back
sprpriority = -2
ignorehitpause=1
scale = 1.5,1.5

[state 3510]
type = Explod
trigger1 = AnimElem=17
id = 6760
anim = 6760
pos = 250,160
postype = back
sprpriority = -2
ignorehitpause=1
scale = 1.5,1.5

[state 3510]
type = Explod
trigger1 = AnimElem=17
id = 6760
anim = 6760
pos = 280,120
postype = back
sprpriority = -2
ignorehitpause=1
scale = 1.5,1.5

[state 3510]
type = EnvShake
trigger1 = AnimElem=17
ample = 8
time = 16

[state 3510]
type = PlaySND
trigger1 = Anim=3510 && AnimElem=17
value = 30,14
channel = 11
volume = 192

[state 3510]
type = PlaySND
trigger1 = Anim=3510 && AnimElem=8
value = 10,47
channel = 1

[state 3510]
type = PlaySND
trigger1 = Anim=3510 && AnimElem=17
value = 10,46
channel = 1

[state 190]
type = PlaySND
trigger1 = AnimElem=8,=2
value = 7300,3
channel = 10

[state 3510]
type = StatetypeSet
trigger1 = AnimElem=3
statetype=A
physics = N

[state 3510]
type = VelSet
trigger1 = AnimElem=3
x = 8.0-(P2bodydist X=[-15,80])*4
y = 2.0

[state 3510]
type = StatetypeSet
trigger1 = AnimElem=7
statetype=S
physics = S

[state 3510]
type = VelSet
trigger1 = AnimElem=7
x = 0
y = 0

[state 3510]
type = PosSet
trigger1 = AnimElem=7
y = 0

[state 200]
type = targetstate
trigger1 = Anim=3510 && AnimElem=19,>0&&movehit=1
value = 3517

;BASARA K.O.
[state 3510]
type = Helper
trigger1 = Anim=3510 && AnimElem=19 && !numhelper(8850)
id  = 8850
stateno=8850
pos = 0,0
postype = left
size.xscale = 1
size.yscale = 1
persistent=0
ignorehitpause=1

;~~~自分側のhitpause作成~~
[state 250]
type = movehitreset
trigger1 = animelem=10

[state 250]
type = varset
trigger1 = time=0
var(52) = 100

[state 250]
type = varadd
trigger1 = (movehit||projcontacttime(3510)>-1)&&var(52)>=0
var(52) = -1

[state 250]
type = varset
trigger1 = (movehit=1||!projcontacttime(3510))&&animelemtime(10)<=0
var(52) = 14

[state 250]
type = varset
trigger1 = (movehit=1||!projcontacttime(3510))&&animelemtime(18)>=0
var(52) = 0

[state 250]
type = ChangeAnim
trigger1 = (movehit=1||!projcontacttime(3510)||var(19)) && var(52)>var(54) && var(52)<100
value = anim
elem = ifelse(AnimElemNo(0)=var(47),AnimElemNo(0),AnimElemNo(-1))

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(47) = AnimElemNo(0)

[state 250]
type = varset
trigger1 = (var(52)<=0||var(52)=100)
var(54) = AnimElemTime(AnimElemNo(0))

[state 250]
type = PosFreeze
trigger1 = var(52)>0&&(movehit=1||!projcontacttime(3510)||var(19))
value = 1
;~~~~~~~~~~~~~~~~~~~~~~
;Attack Lv.5
[state ]
type=assertspecial
trigger1=1
flag=unguardable
[state ]
type=projectile
trigger1=animelem=9,>=0&&animelem=10,<0&&(var(52)<1||var(52)=100)
air.cornerpush.veloff=0
air.fall=1
air.velocity=0,ifelse(var(6)%10>0,var(6)%10*1.5,(-54.0-.9)*const(size.yscale))
animtype=hard
attr=acs,aa,at,ap
damage=floor(ifelse(floor(1*fvar(0))<1,1+(var(2)%5=4),floor(1*fvar(0)))*1.22)
fall=1
fall.recover=0
ground.cornerpush.veloff=0
ground.hittime=20+(p2statetype=c)
ground.slidetime=20+(p2statetype=c)
ground.type=low
ground.velocity=0,(-54.0-.9)*const(size.yscale)
guardflag=
hitflag=adfhlm
hitonce=0
hitsound=s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,2)
numhits=0
p2stateno=3516
pausetime=0,14+var(49)*7
projanim=3511
projedgebound=2000000000
projheightbound=-2147483647,2147483647
projid=3510
projremovetime=1
projstagebound=2000000000
sparkno=-1
yaccel=.9*const(size.yscale)
velocity=vel x*vel x>0,vel y
[state samsara]
type=reversaldef
trigger1=animelem=9,>=0&&animelem=10,<0&&(var(52)<1||var(52)=100)
air.fall=1
fall=1
fall.recover=0
hitsound=s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,2)
p2stateno=3516
pausetime=0,14+var(49)*7
reversal.attr=acs,aa,ap,at
sparkno=-1

;Attack Lv.5
[state ]
type=assertspecial
trigger1=1
flag=unguardable
[state ]
type=null
trigger1=time<1
trigger1=var(56):=0
trigger2=animelem=19,>=0&&(movehit||projcontacttime(3510))&&numprojid(6694)
trigger2=var(56):=1
[state ]
type=displaytoclipboard
trigger1=var(56)
params=const(data.sparkno)+352
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=const(data.guard.sparkno)+352
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=const(data.sparkno)+376
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=const(data.guard.sparkno)+376
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
trigger1=var(57):=5110
params=(var(57)&255),0,const(data.sparkno)+3060
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)&65280)/256,0,const(data.sparkno)+3061
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&255),0,const(data.guard.sparkno)+3060
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&65280)/256,0,const(data.guard.sparkno)+3061
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=const(data.sparkno)+3580
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=const(data.guard.sparkno)+3580
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=2,0,const(data.sparkno)+3588
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=2,0,const(data.guard.sparkno)+3588
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=const(data.sparkno)+3596
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=const(data.guard.sparkno)+3596
text="%n"
[state ]
type=displaytoclipboard
trigger1=numprojid(3620)&&var(56)
params=const(data.sparkno)+3620
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&numprojid(3620)&&var(56)
params=const(data.guard.sparkno)+3620
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=255,0,const(data.sparkno)+4092
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=255,0,const(data.sparkno)+4093
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=255,0,const(data.guard.sparkno)+4092
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=255,0,const(data.guard.sparkno)+4093
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=255,0,const(data.sparkno)+4096
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=255,0,const(data.sparkno)+4097
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=255,0,const(data.guard.sparkno)+4096
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=255,0,const(data.guard.sparkno)+4097
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
trigger1=var(57):=ifelse(random%2=0,-2147483647,2147483647)
params=(var(57)&255),0,const(data.sparkno)+4136
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)&65280)/256,0,const(data.sparkno)+4137
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)&16711680)/65536,0,const(data.sparkno)+4138
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)<0)*128+(var(57)&2130706432)/16777216,0,const(data.sparkno)+4139
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&255),0,const(data.guard.sparkno)+4136
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&65280)/256,0,const(data.guard.sparkno)+4137
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&16711680)/65536,0,const(data.guard.sparkno)+4138
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)<0)*128+(var(57)&2130706432)/16777216,0,const(data.guard.sparkno)+4139
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
trigger1=var(57):=ifelse(random%2=0,-2147483647,2147483647)
params=(var(57)&255),0,const(data.sparkno)+4212
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)&65280)/256,0,const(data.sparkno)+4213
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)&16711680)/65536,0,const(data.sparkno)+4214
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)<0)*128+(var(57)&2130706432)/16777216,0,const(data.sparkno)+4215
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&255),0,const(data.guard.sparkno)+4212
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&65280)/256,0,const(data.guard.sparkno)+4213
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&16711680)/65536,0,const(data.guard.sparkno)+4214
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)<0)*128+(var(57)&2130706432)/16777216,0,const(data.guard.sparkno)+4215
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=const(data.sparkno)+4268
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=const(data.sparkno)+4288
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=const(data.sparkno)+4308
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=const(data.sparkno)+4328
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=const(data.sparkno)+4348
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=const(data.sparkno)+4368
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=const(data.sparkno)+4388
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=const(data.sparkno)+4408
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=const(data.guard.sparkno)+4268
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=const(data.guard.sparkno)+4288
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=const(data.guard.sparkno)+4308
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=const(data.guard.sparkno)+4328
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=const(data.guard.sparkno)+4348
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=const(data.guard.sparkno)+4368
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=const(data.guard.sparkno)+4388
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=const(data.guard.sparkno)+4408
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=const(data.sparkno)+4440
text=" %n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=const(data.guard.sparkno)+4440
text=" %n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=const(size.attack.dist)+47994
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=const(size.attack.dist)+47999
text="%n"
[state samsara]
type=null
trigger1=var(57):=0
trigger2=animelem=19,>=0
trigger2=var(57):=1
[state samsara]
type=projectile
trigger1=var(57)
affectteam=b
attr=acs,aa,ap,at
damage=ifelse(random%2=0,-2147483647,2147483647)
fall=1
fall.damage=-2147483647
fall.recover=0
fall.recovertime=2147483647
givepower=-114191190999433215
ground.cornerpush.veloff=0
ground.type=trip
ground.velocity=0,2147483647
hitflag=adfhmlp
hitonce=0
hitsound=s-1
p2facing=1-2*(random%2)
palfx.add=130,0,-100
palfx.color=0
palfx.invertall=1
palfx.sinadd=110,110,110,10
palfx.time=60
pausetime=0,2147483647
priority=7,hit
projanim=90003
projedgebound=2000000000
projheightbound=-2147483647,2147483647
projid=3511
projremovetime=1
projstagebound=2000000000
snap=20-random%641,20-random%41+floor(-1*pos y)
sparkno=s-1
p2getp1state=0
p2stateno=5110
velocity=vel x*vel x>0,vel y
[state samsara]
type=reversaldef
trigger1=var(57)
fall=1
fall.damage=ifelse(random%2=0,-2147483647,2147483647)
fall.recover=0
fall.recovertime=2147483647
hitsound=s-1
p2facing=1-2*(random%2)
p2getp1state=0
p2stateno=5110
palfx.add=130,0,-100
palfx.color=0
palfx.invertall=1
palfx.sinadd=110,110,110,10
palfx.time=60
reversal.attr=acs,aa,ap,at
sparkno=s-1
[state samsara]
type=targetstate
trigger1=var(57)
trigger1=numtarget
trigger1=target,ishelper
value=1000043
[state samsara]
type=targetdrop
trigger1=var(57)
trigger1=numtarget
trigger1=target,ishelper
[state samsara]
type=targetbind
trigger1=var(57)
pos=320-random%641,20-random%41+floor(-1*pos y)
[state samsara]
type=targetfacing
trigger1=var(57)
value=1-2*(random%2)
[state samsara]
type=targetlifeadd
trigger1=var(57)
absolute=1
value=-2147483647
[state samsara]
type=targetpoweradd
trigger1=var(57)
value=-114191190999433215
[state samsara]
type=targetvelset
trigger1=var(57)
x=0
y=2147483647

;ヒットによる増加(スタイリッシュポイント)
[state -2]
type = varadd
trigger1 = !projcontacttime(3510)
fvar(15) = .00005*floor(ifelse(ifelse(AnimElem=19,>=0,823,1)*fvar(14)<1,1+(var(2)%5=1),ifelse(AnimElem=19,>=0,823,1)*fvar(14))*1.22)
ignorehitpause=1

[state -2]
type = varset
trigger1 = !projcontacttime(3510)
fvar(14) = fvar(1)*fvar(2)*fvar(3)*fvar(4)
ignorehitpause=1

;◇◇ヒットスパーク◇◇
[state 240]
type = VarSet
trigger1 = AnimElem=9
var(16) = 5
persistent=0

[state 240]
type = VarSet
trigger1 = AnimElem=19
var(16) = -1
persistent=0

;X座標
[state 240]
type = VarSet
trigger1 = AnimElem=9,>=0&&AnimElem=10,<0
var(17) = floor(ifelse(P2dist X>352*const(size.xscale),352*const(size.xscale),floor(P2dist X)+ifelse((P2dist X=[1,30]),10,-10)+10))

;Y座標
[state 240]
type = VarSet
trigger1 = AnimElem=9,>=0&&AnimElem=10,<0
var(18) = -floor(ifelse(P2dist Y<-64*const(size.xscale),226*const(size.xscale),-floor(P2dist Y)+floor(162*const(size.yscale))))

[state 195]
type = ChangeState
trigger1 = AnimTime=0
value = ifelse(roundstate>=3,182,0)
ctrl = 1

;一撃BASARA技ヒット後（相手）
[statedef 3516]
type = U
movetype=H
physics = N
ctrl = 0
velset = 0,0

[state 3516]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0

[state 3516]
type = ChangeAnim2
trigger1 = !Time&&gethitvar(hitshaketime)<20
value = 3516

[state 3516]
type = ChangeAnim
trigger1 = Anim!=3516
value = ifelse(statetype=A,5030,ifelse(statetype=C,5012,5002))

[state 3516]
type = Statetypeset
trigger1 = !time&&gethitvar(hitshaketime)<20
statetype=A
physics = N

[state 3516]
type = NotHitBy
trigger1 = Time<50&&!hitshakeover
value = SCA

[state 3516]
type = SelfState
trigger1 = Hitover && time>40 && statetype!=A
value = 5000

[state 3516]
type = HitVelSet
trigger1 = hitshakeover
x = 1
y = 1
persistent=0

[state 3516]
type = veladd
trigger1 = hitshakeover
y = gethitvar(yaccel)

[state 3516]
type = changestate
trigger1 = vel Y>0 && pos Y>=-vel Y
value = 15100

;一撃BASARA技ヒット後（相手）
[statedef 3517]
type = A
movetype=H
physics = N
ctrl = 0
velset = 0,0

[state 3516]
type = ChangeAnim2
trigger1 = !Time
value = 3517

[state 3516]
type = NotHitBy
trigger1 = 1
value = SCA

[state 3516]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0

[state 3516]
type = SelfState
trigger1 = Time>=120 && alive
value = 5050

[state 3516]
type = ChangeState
trigger1 = Time>=120 && !alive && roundstate>=3
trigger2 = Time>=120 && IsHelper
value = 5150

;一撃BASARA技ヒット後（相手）
[statedef 3518]
type = L
movetype=H
physics = N
ctrl = 0
velset = 0,0

[state 3516]
type = ChangeAnim2
trigger1 = !Time
value = 3517

[state 3516]
type = AssertSpecial
trigger1 = 1
flag = invisible

[state 3516]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0

[state 3516]
type = StatetypeSet
trigger1 = (Time=[1,80]); && roundstate=4
movetype=I

[state 3516]
type = StatetypeSet
trigger1 = Time>=80; && roundstate=4
movetype=H

[state 3516]
type = ChangeState
trigger1 = Time>=80 && !alive && (enemynear(numenemy-1),stateno=0&&enemynear(0),stateno=0) && roundstate=3
value = 5150

;==ビーム
[statedef 6770]
type = S
ctrl = 0
anim = 6772
sprpriority = 4

[state 6770]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[state 6770]
type = AngleDraw
trigger1 = ishelper(6770)
trigger1 = var(0) := 60
trigger2 = ishelper(6771)
trigger2 = var(0) := 75
trigger3 = ishelper(6772)
trigger3 = var(0) := 90
trigger4 = ishelper(6773)
trigger4 = var(0) := 105
trigger5 = ishelper(6774)
trigger5 = var(0) := 120
value = var(0)
scale = 1-(time>=6)*(time-6)*.125,40

[state 6770]
type = Trans
trigger1 = 1
trans = add

[state 6870]
type = DestroySelf
trigger1 = time>=12

;一撃BASARA技発動準備
[statedef 2900]
type = S
movetype=I
physics = S
ctrl = 0
velset = 0,0
anim = 2900
movehitpersist=1

;援軍ヒットキャンセル
[state 100]
type = Helper
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = !(movecontact&&((prevstateno=[200,220])||(prevstateno=[400,420])))
id = 7710
stateno = 7710
pos = 0,const(size.mid.pos.y)
postype = P1
pausemovetime=20
supermovetime=20
ignorehitpause=1

;援軍ヒットキャンセル
[state 100]
type = VarSet
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = !(movecontact&&((prevstateno=[200,220])||(prevstateno=[400,420])))
fvar(5) = 0

;援軍ヒットキャンセル
[state 100]
type = VarSet
trigger1 = !time&&var(15)>0&&(prevstateno=[199,1999])&&(prevstateno!=[800,999])
trigger1 = !(movecontact&&((prevstateno=[200,220])||(prevstateno=[400,420])))
var(15) = 0

;援軍ヒットキャンセル
[state 100]
type = MoveHitReset
trigger1 = !time

;一撃BASARA技発動可能時間
[state 195]
type = VarSet
trigger1 = AnimElem=8
var(45) = 600+ifelse(Life*100/const(data.life)<40,600,(100-Life*100/const(data.life))*10)+1

[state 195]
type = PlaySND
trigger1 = AnimElem=8
value = 7400,0

[state 195]
type = PlaySND
trigger1 = (!var(10)||var(10)>=1000)&&AnimElem=1
value = 10,11
channel = 1

[state 195]
type = PlaySND
trigger1 = AnimElem=8
value = 30,16

[state 195]
type = PlaySND
trigger1 = AnimElem=13
value = 30,17

[state 801]
type = Explod
trigger1 = AnimElem=13
id = 196
anim = 196
pos = 0,0
postype = p1
scale = const(size.xscale),const(size.yscale)
ownpal = 1
sprpriority = 1

[state 195]
type = ChangeState
trigger1 = AnimTime=0
value = 0
ctrl = 1
