;var(0) ランダム
;var(1) 時間
;var(2) 音声重複防止1
;var(3) 音声重複防止2
;var(4) 一度のみの音声
;var(5) 
;var(6) 

;援軍待機
[statedef 10000]
type = S
ctrl = 0
velset = 0,0
anim = 10000
sprpriority = -4

[state 10000]
type = DestroySelf
trigger1 = root,var(40)=0&&time

[state 190]
type = PosSet
trigger1 = Time=0&&IsHelper(10000)&&(prevstateno!=[10000,19999])
x = ifelse(teamside=2,60,-60)
y = -20

[state 190]
type = PosSet
trigger1 = Time=ifelse(roundstate<2,1,0)&&IsHelper(10000)&&(prevstateno!=[10000,19999])&&numpartner
trigger1 = (root,ID-partner,ID)>0
x = ifelse(teamside=2,120,-120)
y = -20

[state 190]
type = PosSet
trigger1 = Time=0&&IsHelper(10000)&&NumHelper(18000)&&(prevstateno=[10000,19999])
x = Helper(18000),Pos X
y = -20

[state 190]
type = PalFX
trigger1 = 1
;add = -56,-56,-56
mul = 224,224,224
time=1

[state 190]
type = VarRandom
trigger1 = 1
v = 0
range = 0,999

[state 190]
type = VarAdd
trigger1 = Roundstate>=2
var(1) = 1

[state 190]
type = VarSet
trigger1 = var(1)>2400
var(1) = 0

[state 10000]
type = varadd
trigger1 = var(2)
var(2) = -1

[state 10000]
type = varadd
trigger1 = var(3)
var(3) = -1

[state 190]
type = VarAdd
trigger1 = Roundstate>=2
var(6) = 1

;目印（ヘルパーにしないと影の表示が正常にできないため）
[state 190]
type = Helper
trigger1 = !Time&&IsHelper(10000)&&!NumHelper(18000)
id = 18000
stateno = 18000
pos = 0,0
postype = P1
sprpriority = -4
shadowoffset = -16
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

;援軍アタック・勝利時
[state 10000]
type = ChangeState
triggerall = IsHelper(10000)&&Time
trigger1 = (root,stateno=[180,182])&&root,time>=1
value = 10180

;援軍アタック(待機用ヘルパー隔離)
[state 10000]
type = ChangeState
triggerall = IsHelper(10000)&&Time
trigger1 = (Root,NumExplod(6295)||Root,NumExplod(6296)||Root,NumExplod(6297))&&root,var(40)>0
trigger2 = (root,var(40)=[5,8])
value = 19000

;~~~挙動不審
[state 190]
type = ChangeAnim
trigger1 = Anim=10002&&animtime=0
value = 10000

[state 190]
type = ChangeAnim
trigger1 = Anim=10000&&var(0)%360=0&&SelfAnimExist(10002)
value = 10002
persistent=0
;~~~

;~~手出し無用宣言~~~
[state 190]
type = VarAdd
trigger1 = var(19)
var(19) = -1

[state 190]
type = VarSet
trigger1 = root,var(40)=-2&&Root,NumExplod(6295)
var(19) = 181
persistent=0

[state 190]
type = PlaySND
trigger1 = root,var(40)=-2&&var(19)=1
trigger1 = var(2) := floor(ifelse(var(0)%2=0,169,16)*(TicksPerSecond/60))
value = ifelse(var(0)%2=0,20,25),ifelse(var(0)%2=0,15,6)
channel = 2
persistent=0
;2.814sec
;0.262sec

;その他~~~~
;そんなもので、上様は…(ジャストディフェンス成功時)
[state 190]
type = PlaySND
trigger1 = !var(2)&&(root,stateno=150||root,stateno=152||root,stateno=154)&&root,time<=1&&root,numexplod(7706)&&random%2=0
trigger1 = var(2) := floor(147*(TicksPerSecond/60))
value = 20,6
channel = 2
;2.436sec

;~~~~~~SP獲得時

;気の毒ね…最大の恐怖の前に死ぬなんて
;あはは！　信長様に歯向かうからだよ！
;天下布武です！　信長様！
[state 190]
type = PlaySND
trigger1 = !var(2)&&!var(3) && root,var(11)
trigger1 = var(2) := floor(ifelse(var(0)%3=0,241,ifelse(var(0)%3=1,206,134))*(TicksPerSecond/60))
value = ifelse(var(0)%3!=0,25,20),ifelse(var(0)%3=0,11,ifelse(var(0)%3=1,4,5))
channel = 2
;4.006sec
;3.430sec
;2.223sec

;~~~BASARA技ヒット~~~
;へへっ！やりましたね信長様
[state 190]
type = PlaySND
trigger1 = !var(2)&&!var(3) && root,stateno=3000&&root,movehit&&root,var(52)<=1 && random%48=0 && (root,movecontact=[14,34])
trigger1 = var(2) := floor(156*(TicksPerSecond/60))
value = 25,7
channel = 2
;2.587sec

;相手援軍到着

;~~~一定時間毎に判別~~~~
;詳しい条件がわからないのでほぼアレンジ

;優勢時
;どけどけー！信長様の御通りだー！
[state 190]
type = PlaySND
trigger1 = !var(2)&&!var(3)&&Root,movetype!=H&&(root,life-enemynear,life)>=250&&(enemynear,life=(enemynear,const(data.life)*.5,enemynear,const(data.life)*.75])&&var(0)%960=0&&roundstate=2
trigger1 = var(2) := floor(223*(TicksPerSecond/60))
value = 25,3
channel = 2
;3.714sec

;すっげー！信長様！
[state 190]
type = PlaySND
trigger1 = !var(2)&&!var(3)&&Root,movetype!=H&&(root,life-enemynear,life)>=250&&(enemynear,life=(enemynear,const(data.life)*.25,enemynear,const(data.life)*.5])&&var(0)%600=0&&roundstate=2
trigger1 = var(2) := floor(161*(TicksPerSecond/60))
value = 25,1
channel = 2
;2.678sec

;さすが！
[state 190]
type = PlaySND
trigger1 = !var(2)&&!var(3)&&Root,movetype!=H&&!root,var(2)&&(root,life-enemynear,life)>=500&&enemynear,life<=enemynear,const(data.life)*.25&&var(0)%420=0&&roundstate=2
trigger1 = var(2) := floor(174*(TicksPerSecond/60))
value = 20,10
channel = 2
;2.885sec

;~~~~劣勢時~~~~
;詳しい条件がわからないのでほぼアレンジ

;この命尽きるまで…/信長様！しっかり！
[state 190]
type = PlaySND
trigger1 = !var(2)&&!var(3)&&(root,movetype=H||root,statetype=L)&&(root,life-enemynear,life)<0&&(root,life=[(const(data.life)-250),(const(data.life)-500)])&&var(0)%480=0&&roundstate=2
trigger1 = var(2) := floor(ifelse(var(0)<=500,118,104)*(TicksPerSecond/60))
value = ifelse(var(0)<=500,25,20),ifelse(var(0)<=500,0,8)
channel = 2
;1.733sec
;1.981sec

;上様…どうかご無理をなさらず
[state 190]
type = PlaySND
trigger1 = !var(2)&&!var(3)&&(Root,movetype!=H||Root,Statetype=L)&&!root,var(2)&&(root,life-enemynear,life)<0&&root,life<(root,const(data.life)-750)&&var(0)%240=0&&roundstate=2
trigger1 = var(2) := floor(191*(TicksPerSecond/60))
value = 20,9
channel = 2
;3.173sec

;==

;==

;援軍勝利
[statedef 10180]
type = S
physics = S
movetype=I
anim = 10180
velset = 0,0
sprpriority = -1

[state 190]
type = PalFX
trigger1 = IsHelper(10000)
;add = -56,-56,-56
mul = 224,224,224
time=1

[state 10180]
type = SprPriority
trigger1 = IsHelper(11000)
value = 1

[state 10180]
type = SprPriority
trigger1 = IsHelper(10000)
value = -4

;援軍戦場待機
[statedef 10500]
type = S
physics = S
movetype=I
anim = 10500
velset = 0,0
sprpriority = 0

[state 12000]
type = ParentVarSet
trigger1 = !Time
var(40) = ifelse((prevstateno=[15000,15031]),ifelse(root,var(40)!=4,3+(IsHelper(11010)),root,var(40)),ifelse((prevstateno=[13500,13600])||root,var(42)<=0,-1,1))

[state 10000]
type = parentvarset
trigger1 = IsHelper(11010)
fvar(22) = floor(pos X)

[state 10000]
type = parentvarset
trigger1 = IsHelper(11010)
fvar(23) = floor(pos y)

[state 10500]
type = PosSet
trigger1 = !time
y = 0

[state 12000]
type = PlayerPush
trigger1 = 1
value = 1

[State 900, 4]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0

[State 900, 4]
type = ScreenBound
trigger1 = numhelper(30000)
trigger1 = ifelse(facing=1,helper(30000),pos x-pos x,-(helper(30005),pos x-pos x))<(40+const(size.ground.front))&&frontedgebodydist<=0
trigger2 = numhelper(30000)
trigger2 = ifelse(facing=1,-(helper(30005),pos x-pos x),(helper(30000),pos x-pos x))<(40+const(size.ground.back))&&backedgebodydist<=0
value = 1
movecamera = 0,0

[state 12000]
type = AssertSpecial
trigger1 = IsHelper(11000)&&Root,NumHelper(11010)&&root,var(40)!=4&&!(roundstate>=3&&Root,WinKO&&Root,Alive)
flag = invisible

[state 12000]
type = NotHitBy
trigger1 = IsHelper(11000)&&Root,NumHelper(11010)
trigger2 = IsHelper(11010)&&(prevstateno=[15000,15031])
value = SCA

[state 105090]
type = PosSet
trigger1 = IsHelper(11000)&&Root,NumHelper(11010)&&time
x = floor(root,fvar(22))
y = 0

;援軍アタック・勝利時
[state 10000]
type = ChangeState
triggerall = IsHelper(11000)&&Time
trigger1 = (root,stateno=[180,182])&&root,time>=1
value = 10180

;援軍カウンター
[state 10000]
type = ChangeState
trigger1 = IsHelper(11000)&&root,var(40)=[8,9]
value = 11000

;援軍アシスト
[state 10000]
type = ChangeState
trigger1 = IsHelper(11000)&&root,var(40)=7
value = 11000

;援護形態
[state 10000]
type = ChangeState
trigger1 = IsHelper(11000)&&root,var(40)=5
value = 11000

;援軍アタック（対空）
[state 10000]
type = ChangeState
trigger1 = root,var(40)=6
value = 11000

[state 19000]
type = DestroySelf
trigger1 = ((root,var(40)=[5,9])||Root,NumExplod(6295)||Root,NumExplod(6296)||Root,NumExplod(6297))&&IsHelper(11010)

[state 10500]
type = NotHitBy
trigger1 = !(IsHelper(11000)&&Root,NumHelper(11010))
value = ,AT
ignorehitpause=1

[state 10500]
type = HitOverride
trigger1 = 1
time = 1
attr = SCA,AA,AP
stateno=15000
slot = 0
ignorehitpause=1

[state 19000]
type = ChangeState
trigger1 = root,var(40)=3&&IsHelper(11000)&&Root,NumHelper(11010)
value = 15000

[state 19000]
type = DestroySelf
trigger1 = (AnimTime=0||(roundstate>=3&&Root,WinKO&&Root,Alive))&&IsHelper(11010)
trigger2 = Time>=2&&(prevstateno=[15000,15031])&&IsHelper(11010)

[state 19000]
type = ChangeState
trigger1 = AnimTime=0&&IsHelper(11000)&&root,var(40)!=3&&!(roundstate>=3&&Root,WinKO&&Root,Alive)
trigger2 = ((root,var(40)=4&&ifelse((prevstateno=[15000,15031]),time>=2,1))||(root,var(40)=3&&time>=2)) && IsHelper(11000)
trigger3 = Time=40&&prevstateno=13500
value = 10600

;援軍戦場定位置へ
[statedef 10600]
type = S
anim = 11000
sprpriority = -3
velset = 0,0

[state 12000]
type = PosSet
trigger1 = !time
y = 0

[state 10600]
type = NotHitBy
trigger1 = 1
value = SCA

[state 19000]
type = parentvarset
trigger1 = AnimElem=1
var(40) = -1

[state 12000]
type = parentvarset
trigger1 = !Time
fvar(22) = 0

[state 12000]
type = parentvarset
trigger1 = !Time&&(((pos x-helper(18000),pos x)>ifelse(teamside=2,40,-40)&&facing=1)||((pos x-helper(18000),pos x)<ifelse(teamside=2,40,-40)&&facing=-1))
fvar(22) = -1.1

[state 12000]
type = Turn
trigger1 = !Time&&(((pos x-helper(18000),pos x)>ifelse(teamside=2,40,-40)&&facing=1)||((pos x-helper(18000),pos x)<ifelse(teamside=2,40,-40)&&facing=-1))

[state 12000]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[state 12000]
type = AngleDraw
trigger1 = Time>=4
scale = 1-(time-4)*.03,1-(time-4)*.03

[state 12000]
type = OffSet
trigger1 = AnimElem=2,>0
y = -Time*3

[state 10600]
type = VelSet
trigger1 = AnimElem=2
x = ((pos X-(helper(18000),pos x-floor(80*const(size.xscale)/2)*ifelse(teamside=2,-1,1)*facing))*ifelse(fvar(22)=-1.1,facing,-facing))/8

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

[state 10500]
type = NotHitBy
trigger1 = 1
value = SCA

[state 19000]
type = parentvarset
trigger1 = AnimElem=4
var(40) = floor(ifelse((prevstateno=[13500,13600])||var(43)>=100000||(prevstateno=[15000,15031]),240,ifelse((prevstateno=[12000,12050]),90,120))*ifelse(root,var(43)>=10000,1.0,ifelse(root,var(43)>=5000,1.5,2.0)))+11

[state 19000]
type = DestroySelf
trigger1 = AnimElem=4

;援軍アタック時移動中
[statedef 11000]
type = S
physics = N
anim = 11000

[state 12000]
type = VarSet
trigger1 = !time
var(7) = ifelse(root,var(40)=7,0,ifelse(root,NumExplod(6296),1,ifelse(root,NumExplod(6297),-1,0)))

[state 11000]
type = VarSet
trigger1 = !time
var(8) = ifelse(root,var(40)=9,13600,ifelse(root,var(40)=8,13500,ifelse(root,var(40)=7,13000,ifelse((root,stateno=[180,182]),10180,ifelse(root,NumHelper(6200)||root,var(40)=5,12000,12500+(root,var(1)%4>=2&&root,var(1)%2<1&&root,var(1)%8<4)*100)))))

[state 11000]
type = varset
trigger1 = !time
var(9) = floor(root,Pos X)

[state 19000]
type = ParentVarAdd
trigger1 = !time&&(root,var(40)=[5,6])&&IsHelper(11000)
var(42) = -floor(ifelse(floor(root,var(43)/1000)<50,100-floor((floor(root,var(43)/1000)-1)*1.0/1.50),67)*(1.0+((floor((root,var(41)-72)*3.125/2)-floor(root,var(43)/1000))*1.00/200)*(root,var(43)<floor((root,var(41)-72)*3.125/2))))
persistent=0

;援軍使用回数
[state 13000]
type = varset
trigger1 = !time&&(prevstateno!=[10000,19999])
var(10) = 0

[state 13000]
type = varadd
trigger1 = !time&&IsHelper(11000)
var(10) = 1

;援軍使用不能時間
[state 12000]
type = VarSet
trigger1 = !time&&IsHelper(11000)
var(40) = floor(ifelse((prevstateno=[13500,13600])||(prevstateno=[15000,15031]),3,var(10))*75*(1.0+floor((100-floor(root,var(43)/1000))*1.0/25)))

;援軍使用不能時間
[state 12000]
type = VarSet
trigger1 = !time&&IsHelper(11000)
trigger1 = floor(ifelse((prevstateno=[13500,13600])||(prevstateno=[15000,15031]),3,var(10))*75*(1.0+floor((100-floor(root,var(43)/1000))*1.0/25)))>600
var(40) = 600

;BASARAゲージ回復不能時間
[state 2000]
type = ParentVarAdd
trigger1 = root,var(40)=[7,9]
var(9)=ifelse((root,var(9)=[1,999]),420-root,var(9),420)

[state 13500]
type = NotHitBy
trigger1 = root,var(40)=8||var(8)=13500
value = SCA

[state 13500]
type = SuperPause
trigger1 = !time&&root,var(40)=8
time = 30+ifelse(root,var(57)>=4,40,ifelse(root,var(57)=3,33,ifelse(root,var(57)=2,22,ifelse(root,var(57)=1,12,0))))
movetime=30+ifelse(root,var(57)>=4,40,ifelse(root,var(57)=3,33,ifelse(root,var(57)=2,22,ifelse(root,var(57)=1,12,0))))
p2defmul = 1
sound = -1
anim = -1
darken = 0
poweradd = 0

;ゲージ減少
[state 13500]
type = PowerAdd
trigger1 = !time&&root,var(40)=8
value = -1000*(root,var(57)+1)

[state 13000]
type = ParentVaradd
trigger1 = !time&&(root,var(40)=7||root,var(40)=8)
var(42) = -200

;援軍レベル減少
[state 13500]
type = ParentVarAdd
trigger1 = !time&&root,var(40)=8
var(43) = ifelse(root,var(43)<=30000,-root,var(43)+1000,-30000)

;援軍カウンター使用回数
[state 13500]
type = ParentVarAdd
trigger1 = !time&&root,var(40)=8&&root,var(57)<5
var(57) = 1

[state 13500]
type = PlaySND
trigger1 = !time&&root,var(40)=8
value = 3500,0

[state 13500]
type = PlaySND
trigger1 = !time&&root,var(40)=9
value = 3600,0

;カットイン
[state 13500]
type = Helper
trigger1 = !time&&root,var(40)=8
id = 7565
stateno=7565
pos = 0,0
postype = p1
ignorehitpause=1
supermovetime=60

[state 11000]
type = Turn
triggerall = !time&&!(var(8)=12000&&root,numexplod(6296))
triggerall = var(8)!=13000
triggerall = !((var(8)=[13500,13600])&&numhelper(30000)&&numhelper(30005))
trigger1 = ((pos x-root,pos x)-ifelse(root,NumExplod(6297),(0-(var(8)=12500)*6)*11,0)*ifelse(facing!=root,facing,-1,1))>0&&facing=1
trigger2 = ((pos x-root,pos x)-ifelse(root,NumExplod(6297),(0-(var(8)=12500)*6)*11,0)*ifelse(facing!=root,facing,-1,1))<0&&facing=-1

[state 11000]
type = Turn
triggerall = !time&&var(8)=12000&&root,numexplod(6296)
triggerall = !((var(8)=[13500,13600])&&numhelper(30000)&&numhelper(30005))
trigger1 = ((pos x-root,pos x)-ifelse(abs(floor(root,pos X-enemynear,Pos X))<12.0*11,-(root,pos X-enemynear,Pos X)*ifelse(facing!=root,facing,-1,1)-3*11,12.0*11)*ifelse(facing!=root,facing,-1,1))>0&&facing=1
trigger2 = ((pos x-root,pos x)-ifelse(abs(floor(root,pos X-enemynear,Pos X))<12.0*11,-(root,pos X-enemynear,Pos X)*ifelse(facing!=root,facing,-1,1)-3*11,12.0*11)*ifelse(facing!=root,facing,-1,1))<0&&facing=-1

[state 11000]
type = Turn
triggerall = !time&&var(8)=12500&&root,numexplod(6296)
triggerall = !((var(8)=[13500,13600])&&numhelper(30000)&&numhelper(30005))
trigger1 = ((pos x-root,pos x)-ifelse(abs(floor(root,pos X-enemynear,Pos X))<14.0*11,-(root,pos X-enemynear,Pos X)*ifelse(facing!=root,facing,-1,1)-3*11,14.0*11)*ifelse(facing!=root,facing,-1,1))>0&&facing=1
trigger2 = ((pos x-root,pos x)-ifelse(abs(floor(root,pos X-enemynear,Pos X))<14.0*11,-(root,pos X-enemynear,Pos X)*ifelse(facing!=root,facing,-1,1)-3*11,14.0*11)*ifelse(facing!=root,facing,-1,1))<0&&facing=-1

[state 11000]
type = Turn
triggerall = !time&&numhelper(30000)&&numhelper(30005)&&(!var(7)||numenemy=1)
triggerall = var(8)=13000
trigger1 = (ifelse(root,screenpos x>=160,(pos x-helper(30000),var(11)),(pos x-helper(30005),var(11)))-5*11*ifelse(root,facing!=facing,-1,1))>0&&facing=1
trigger2 = (ifelse(root,screenpos x>=160,(pos x-helper(30000),var(11)),(pos x-helper(30005),var(11)))-5*11*ifelse(root,facing!=facing,-1,1))<0&&facing=-1

[state 11000]
type = Turn
triggerall = !time&&numhelper(30000)&&numhelper(30005)&&(!var(7)||numenemy=1)
triggerall = ((var(8)=[13500,13600])||(var(8)=12500&&(root,var(1)%2>=1||root,var(1)%8>=4)&&(root,NumExplod(6296)||(root,NumExplod(6297)&&root,facing*enemynear,facing>0)))||var(8)=12600)
trigger1 = (ifelse(root,screenpos x>=160,(pos x-helper(30000),var(11)),(pos x-helper(30005),var(11)))-3*11*ifelse(root,facing!=facing,-1,1))>0&&facing=1
trigger2 = (ifelse(root,screenpos x>=160,(pos x-helper(30000),var(11)),(pos x-helper(30005),var(11)))-3*11*ifelse(root,facing!=facing,-1,1))<0&&facing=-1

[state 11000]
type = Turn
triggerall = !time&&(var(8)=[13500,13600])&&numhelper(30000)&&numhelper(30005)&&var(7)=-1&&numenemy>1
triggerall = ifelse(root,screenpos x>=160,!helper(30000),var(16),!helper(30005),var(16))
trigger1 = (ifelse(root,screenpos x>=160,(pos x-helper(30000),var(11)),(pos x-helper(30005),var(11)))-3*11*ifelse(root,facing!=facing,-1,1))>0&&facing=1
trigger2 = (ifelse(root,screenpos x>=160,(pos x-helper(30000),var(11)),(pos x-helper(30005),var(11)))-3*11*ifelse(root,facing!=facing,-1,1))<0&&facing=-1

[state 11000]
type = Turn
triggerall = !time&&(var(8)=[13500,13600])&&numhelper(30000)&&numhelper(30005)&&var(7)=-1&&numenemy>1
triggerall = ifelse(root,screenpos x>=160,helper(30000),var(16),helper(30005),var(16))
trigger1 = (ifelse(root,screenpos x>=160,(pos x-helper(30000),var(12)),(pos x-helper(30005),var(12)))-3*11*ifelse(root,facing!=facing,-1,1))>0&&facing=1
trigger2 = (ifelse(root,screenpos x>=160,(pos x-helper(30000),var(12)),(pos x-helper(30005),var(12)))-3*11*ifelse(root,facing!=facing,-1,1))<0&&facing=-1

[state 11000]
type = Turn
triggerall = !time&&(var(8)=[13500,13600])&&numhelper(30000)&&numhelper(30005)&&var(7)=1&&numenemy>1
trigger1 = (ifelse(root,screenpos x>=160,(pos x-helper(30000),var(12)),(pos x-helper(30005),var(12)))-3*11*ifelse(root,facing!=facing,-1,1))>0&&facing=1
trigger2 = (ifelse(root,screenpos x>=160,(pos x-helper(30000),var(12)),(pos x-helper(30005),var(12)))-3*11*ifelse(root,facing!=facing,-1,1))<0&&facing=-1

[state 11000]
type = ChangeAnim
trigger1 = !Time
value = anim
elem = 2

[state 190]
type = VarRandom
trigger1 = 1
v = 0
range = 0,999

[state 12000]
type = PosSet
trigger1 = !Time
y = 0

[state 11000]
type = VelSet
trigger1 = !time
x = -(pos X-root,Pos X)*facing/11+ifelse(root,NumExplod(6296),12+(var(8)=12500)*2,ifelse(root,NumExplod(6297),0-(var(8)=12500)*6,6-(var(8)=12500)*6))*ifelse(facing!=root,facing,-1,1)

[state 11000]
type = VelSet
trigger1 = !time&&var(8)=12000&&root,NumExplod(6296)&&abs(floor(root,pos X-enemynear,Pos X))<12.0*11
trigger2 = !time&&var(8)=12500&&root,NumExplod(6296)&&abs(floor(root,pos X-enemynear,Pos X))<14.0*11
x = -(pos X-root,Pos X)*facing/11+abs(floor(root,pos X-enemynear,Pos X))*ifelse(facing!=root,facing,-1,1)/11-3*ifelse(facing!=root,facing,-1,1)

[state 11000]
type = VelSet
trigger1 = !time&&var(8)=[13500,13600]
trigger2 = !time&&((var(8)=12500&&(root,var(1)%2>=1||root,var(1)%8>=4)&&(root,NumExplod(6296)||(root,NumExplod(6297)&&root,facing*enemynear,facing>0)))||var(8)=12600)
x = abs(floor(pos X-enemynear,Pos X))/11-3*ifelse(facing!=root,facing,-1,1)

[state 11000]
type = VelSet
trigger1 = !time&&var(8)=13000
x = abs(floor(pos X-root,Pos X))/11-5*ifelse(facing!=root,facing,-1,1)

[state 11000]
type = VelSet
trigger1 = !time&&(!var(7)||numenemy=1)&&numhelper(30000)&&numhelper(30005)&&var(8)=[13500,13600]
x = abs(floor(pos X-ifelse(root,screenpos x>=160,helper(30000),var(11),helper(30005),var(11))))/11-3*ifelse(facing!=root,facing,-1,1)

[state 11000]
type = VelSet
trigger1 = !time&&var(7)=-1&&numenemy>1&&numhelper(30000)&&numhelper(30005)&&var(8)=[13500,13600]
trigger1 = ifelse(root,screenpos x>=160,!helper(30000),var(16),!helper(30005),var(16))
x = abs(floor(pos X-ifelse(root,screenpos x>=160,helper(30000),var(11),helper(30005),var(11))))/11-3*ifelse(facing!=root,facing,-1,1)

[state 11000]
type = VelSet
trigger1 = !time&&var(7)=-1&&numenemy>1&&numhelper(30000)&&numhelper(30005)&&var(8)=[13500,13600]
trigger1 = ifelse(root,screenpos x>=160,helper(30000),var(16),helper(30005),var(16))
x = abs(floor(pos X-ifelse(root,screenpos x>=160,helper(30000),var(12),helper(30005),var(12))))/11-3*ifelse(facing!=root,facing,-1,1)

[state 11000]
type = VelSet
trigger1 = !time&&var(7)=1&&numenemy>1&&numhelper(30000)&&numhelper(30005)&&var(8)=[13500,13600]
x = abs(floor(pos X-ifelse(root,screenpos x>=160,helper(30000),var(12),helper(30005),var(12))))/11-3*ifelse(facing!=root,facing,-1,1)

[state 12000]
type = ParentVarSet
trigger1 = !Time&&root,stateno!=181
var(40) = ifelse(root,var(42)<=0,-1,2)

[state 12000]
type = AssertSpecial
trigger1 = IsHelper(11000)&&Root,NumHelper(11010)
flag = invisible

[state 12000]
type = NotHitBy
trigger1 = 1
value = SCA

[state 12000]
type = PlayerPush
trigger1 = 1
value = 0

[state 12000]
type = Width
trigger1 = Vel X>0
edge = 2,0

[state 12000]
type = DestroySelf
trigger1 = P2dist X<=Vel X&&IsHelper(11010)&&!(AnimElemTime(3)>=0&&AnimElemTime(4)<0)

[state 11000]
type = ChangeState
trigger1 = Time=11
value = ifelse(!var(8),12500,var(8))

;援軍アタック（対地）
[statedef 12000]
type = S
movetype=A
physics = S
anim = 12000+(floor(root,var(43)/1000)>=50)*100+(floor(root,var(43)/1000)>=100)*100
velset = 0,0
sprpriority = 2

[state 11000]
type = Turn
trigger1 = !time&&facing!=root,facing

[state 11000]
type = Turn
trigger1 = !time&&P2dist X<0

[state 12000]
type = PosSet
trigger1 = !Time
y = 0

[state 12000]
type = ParentVarSet
trigger1 = !Time
var(40) = ifelse(root,var(42)<=0,-1,2)

[state 12000]
type = PosSet
trigger1 = !Time&&IsHelper(11010)&&prevstateno!=10500
x = helper(11000),pos x

[state 10000]
type = parentvarset
trigger1 = IsHelper(11010)
fvar(22) = floor(pos X)

[state 10000]
type = parentvarset
trigger1 = IsHelper(11010)
fvar(23) = floor(pos y)

[state 190]
type = PlaySND
trigger1 = AnimElem=4&&IsHelper(11000)
trigger2 = AnimElem=13&&floor(root,var(43)/1000)>=100&&IsHelper(11000)
value = 7300,2
;channel = 10

;お逝きなさい！
[state 12000]
type = null;PlaySND
trigger1 = AnimElem=4
value = 20,5
channel = 2

[state 190]
type = VarRandom
trigger1 = 1
v = 0
range = 0,999

[state 12000]
type = ChangeAnim
trigger1 = Time=3&&(Prevstateno!=[10000,19999])&&IsHelper(11010)
value = anim
elem = 2

[state 12000]
type = AssertSpecial
trigger1 = IsHelper(11000)&&Root,NumHelper(11010)
flag = invisible

[state 12000]
type = NotHitBy
trigger1 = IsHelper(11000)&&Root,NumHelper(11010)
value = SCA

[state 12000]
type = PlayerPush
trigger1 = 1
value = 1

[state 12000]
type = Width
trigger1 = Vel X>0
edge = 2,0

[state 12000]
type = PlayerPush
trigger1 = 1
value = 1

[state 12000]
type = Width
trigger1 = Vel X>0
edge = 2,0

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

[State 900, 4]
type = ScreenBound
trigger1 = numhelper(30000)
trigger1 = ifelse(facing=1,helper(30000),pos x-pos x,-(helper(30005),pos x-pos x))<(40+const(size.ground.front))&&frontedgebodydist<=0
trigger2 = numhelper(30000)
trigger2 = ifelse(facing=1,-(helper(30005),pos x-pos x),(helper(30000),pos x-pos x))<(40+const(size.ground.back))&&backedgebodydist<=0
value = 1
movecamera = 0,0

[state 12000]
type = DestroySelf
trigger1 = P2dist X<=0&&IsHelper(11010)&&!(AnimElemTime(3)>=0&&AnimElemTime(4)<0)

[state 12000]
type = VarSet
trigger1 = abs(root,var(15))<=18&&IsHelper(11000)
var(20) = 1

[state 12000]
type = ChangeAnim
trigger1 = (root,var(15)<-23||root,var(15)>23)&&AnimElemNo(0)=3&&IsHelper(11000)
value = anim
elem = 3

[state 12000]
type = ChangeAnim
trigger1 = abs(root,var(15))<=18&&var(20)=34&&IsHelper(11000)
value = anim
elem = 4

[state 12000]
type = PosFreeze
trigger1 = (root,var(15)<-23||root,var(15)>23)&&IsHelper(11000)
value = 1

[state 3000]
type = Explod
trigger1 = floor(root,var(43)/1000)>=50
trigger1 = AnimElem=5
trigger2 = floor(root,var(43)/1000)>=100
trigger2 = AnimElem=15
id = 6800
anim = 6800
pos = -floor(110*const(size.xscale)),-floor(160*const(size.yscale))
postype = p1
sprpriority = 3
scale = const(size.xscale)*.75,const(size.yscale)*.75

[state 3000]
type = Explod
trigger1 = floor(root,var(43)/1000)>=50
trigger1 = AnimElem=5
trigger2 = floor(root,var(43)/1000)>=100
trigger2 = AnimElem=15
id = 6800
anim = 6800
pos = -floor(80*const(size.xscale)),-floor(110*const(size.yscale))
postype = p1
sprpriority = 3
scale = const(size.xscale)*1.5,const(size.yscale)*1.5

[state 3000]
type = Explod
trigger1 = floor(root,var(43)/1000)>=50
trigger1 = AnimElem=5
trigger2 = floor(root,var(43)/1000)>=100
trigger2 = AnimElem=15
id = 6800
anim = 6800
pos = floor(10*const(size.xscale)),-floor(90*const(size.yscale))
postype = p1
sprpriority = 3
scale = const(size.xscale)*2.0,const(size.yscale)*2.0

[state 3000]
type = Explod
trigger1 = floor(root,var(43)/1000)>=50
trigger1 = AnimElem=5
trigger2 = floor(root,var(43)/1000)>=100
trigger2 = AnimElem=15
id = 6800
anim = 6800
pos = floor(80*const(size.xscale)),-floor(100*const(size.yscale))
postype = p1
sprpriority = 3
scale = const(size.xscale)*1.75,const(size.yscale)*1.75

[state 3000]
type = Explod
trigger1 = floor(root,var(43)/1000)>=50
trigger1 = AnimElem=5
trigger2 = floor(root,var(43)/1000)>=100
trigger2 = AnimElem=15
id = 6800
anim = 6800
pos = floor(130*const(size.xscale)),-floor(120*const(size.yscale))
postype = p1
sprpriority = 3
scale = const(size.xscale)*1.5,const(size.yscale)*1.5

[state 12000]
type = StatetypeSet
trigger1 = AnimElem=2
trigger2 = AnimElem=12 && floor(root,var(43)/1000)>=100
physics = N

[state 12000]
type = VelSet
trigger1 = AnimElem=2,=1&&!((root,var(15)<-23||root,var(15)>23)&&IsHelper(11000))
trigger2 = AnimElem=12,=1 && floor(root,var(43)/1000)>=100
x = 4.0

[state 12000]
type = StatetypeSet
trigger1 = AnimElem=6
trigger2 = AnimElem=17 && floor(root,var(43)/1000)>=100
physics = S

[State 900, 4]
type = VelSet
trigger1 = AnimElem=6
trigger2 = AnimElem=17 && floor(root,var(43)/1000)>=100
x = 0

[State 900, 4]
type = VelSet
trigger1 = numhelper(30000)
trigger1 = vel x>0&&ifelse(facing=1,helper(30000),pos x-pos x,-(helper(30005),pos x-pos x))<(40+const(size.ground.front))&&frontedgebodydist<=0
trigger2 = numhelper(30000)
trigger2 = vel x<0&&ifelse(facing=1,-(helper(30005),pos x-pos x),(helper(30000),pos x-pos x))<(40+const(size.ground.back))&&backedgebodydist<=0
x = 0

;Attack Lv.2
[state 200]
type = Hitdef
triggerall = floor(root,var(43)/1000)<50
triggerall = !movecontact&&!movereversed
trigger1 = AnimElem=5,>=0&&AnimElem=7,<0&&!(root,var(15)&&IsHelper(11000))
damage = floor(ifelse((28+floor(root,var(43)/1000)+(root,var(43)=49000))*root,fvar(0)<1,1+(root,var(2)%5=4),(28+floor(root,var(43)/1000)+(root,var(43)=49000))*root,fvar(0))*1.22)
ground.slidetime = 12+(P2statetype=C)+(root,var(49)&&!root,var(2))*6
ground.hittime = 12+(P2statetype=C)+(root,var(49)&&!root,var(2))*6
guard.hittime = 10
pausetime = 12,11
ground.velocity = -13.5*(1.0+ifelse(root,var(2)>31,31,root,var(2))*.08)*const(size.xscale)
guard.velocity = -13.5*const(size.xscale)
ground.cornerpush.veloff = 0
air.velocity = -3*(1.0+ifelse(root,var(3)>31,31,root,var(3))*.04)*const(size.xscale),(-13.0*(51-root,var(3))*1.0/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(root,var(6)%10>0||root,var(28)>0,0,1)
fall.recovertime = ifelse(root,var(49)&&!root,var(2),44+11,32-ifelse(floor(root,var(14)/85)>6,6,floor(root,var(14)/85))+11)
hitsound = s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,1)
guardsound = s7000,0
getpower = floor(ifelse(root,var(9),0,floor(45*ifelse(root,var(1)%4>=2,.5,1.0)*root,fvar(0)/root,fvar(2))*1.3*root,fvar(16))),floor(ifelse(root,var(9),0,ceil(45*root,fvar(0)/root,fvar(2)*1.0/8)*1.3*root,fvar(16)))
givepower = floor(45*ifelse(root,var(1)%4>=2,.5,1.0)*root,fvar(0)/root,fvar(2)*.8)*1.3,floor(45*root,fvar(0)/root,fvar(2)*.8*1.0/8)*1.3
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-60*const(size.xscale))
animtype = High
ground.type = High
attr = S,NA
hitflag = MAFD
guardflag = MA

;Attack Lv.3
[state 200]
type = Hitdef
triggerall = floor(root,var(43)/1000)=[50,99]
triggerall = !movecontact&&!movereversed
trigger1 = AnimElem=5,>=0&&AnimElem=7,<0&&!(root,var(15)&&IsHelper(11000))
damage = floor(ifelse((57+floor((floor(root,var(43)/1000)-50)*1.0/4))*root,fvar(0)<1,1+(root,var(2)%5=4),(57+floor((floor(root,var(43)/1000)-50)*1.0/4))*root,fvar(0))*1.22)
ground.slidetime = 14+(P2statetype=C)+(root,var(49)&&!root,var(2))*6
ground.hittime = 14+(P2statetype=C)+(root,var(49)&&!root,var(2))*6
guard.hittime = 12
pausetime = 13,12
ground.velocity = -6.0*const(size.xscale),(-14.0-.9)*const(size.yscale)
guard.velocity = -15.0*const(size.xscale)
ground.cornerpush.veloff = 0
air.velocity = -6*(1.0+ifelse(root,var(3)>31,31,root,var(3))*.04)*const(size.xscale),(-14.0*(51-root,var(3))*1.0/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(root,var(6)%10>0||root,var(28)>0,0,1)
fall.recovertime = ifelse(root,var(49)&&!root,var(2),50+12,36-ifelse(floor(root,var(14)/75)>7,7,floor(root,var(14)/75))+12)
hitsound = s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,1)
guardsound = s7000,1
getpower = floor(ifelse(root,var(9),0,floor(45*ifelse(root,var(1)%4>=2,.5,1.0)*root,fvar(0)/root,fvar(2))*1.3*root,fvar(16))),floor(ifelse(root,var(9),0,ceil(45*root,fvar(0)/root,fvar(2)*1.0/8)*1.3*root,fvar(16)))
givepower = floor(45*ifelse(root,var(1)%4>=2,.5,1.0)*root,fvar(0)/root,fvar(2)*.8)*1.3,floor(45*root,fvar(0)/root,fvar(2)*.8*1.0/8)*1.3
fall = 1
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-60*const(size.xscale))
animtype = High
ground.type = High
attr = S,NA
hitflag = MAFD
guardflag = MA
palfx.time=30+12
palfx.sinadd = 96,48,0,4
palfx.color = 0
palfx.add = 56,-96,-208
palfx.invertall = 1

[state 200]
type = MoveHitReset
triggerall = floor(root,var(43)/1000)>=100
trigger1 = AnimElem=15

;Attack Lv.3
[state 200]
type = Hitdef
triggerall = floor(root,var(43)/1000)>=100
triggerall = !movecontact&&!movereversed
trigger1 = AnimElem=5,>=0&&AnimElem=7,<0&&!(root,var(15)&&IsHelper(11000))
trigger2 = AnimElem=15,>=0&&AnimElem=17,<0
damage = floor(ifelse(56*root,fvar(0)<1,1+(root,var(2)%5=4),56*root,fvar(0))*1.22)
ground.slidetime = 14+(P2statetype=C)+(root,var(49)&&!root,var(2))*6
ground.hittime = 14+(P2statetype=C)+(root,var(49)&&!root,var(2))*6
guard.hittime = 12
pausetime = 13,12
ground.velocity = -6.0*const(size.xscale),(-15.0-.9)*const(size.yscale)
guard.velocity = -15.0*const(size.xscale)
ground.cornerpush.veloff = 0
air.velocity = -6*(1.0+ifelse(root,var(3)>31,31,root,var(3))*.04)*const(size.xscale),ifelse(root,var(6)%10>0,root,var(6)%10*1.5,(-15.0*(51-root,var(3))*1.0/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(root,var(6)%10>0||root,var(28)>0,0,1)
fall.recovertime = ifelse(root,var(49)&&!root,var(2),50+12,36-ifelse(floor(root,var(14)/75)>7,7,floor(root,var(14)/75))+12)
hitsound = s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,1)
guardsound = s7000,1
getpower = floor(ifelse(root,var(9),0,floor(45*ifelse(root,var(1)%4>=2,.5,1.0)*root,fvar(0)/root,fvar(2))*1.3*root,fvar(16))),floor(ifelse(root,var(9),0,ceil(45*root,fvar(0)/root,fvar(2)*1.0/8)*1.3*root,fvar(16)))
givepower = floor(45*ifelse(root,var(1)%4>=2,.5,1.0)*root,fvar(0)/root,fvar(2)*.8)*1.3,floor(45*root,fvar(0)/root,fvar(2)*.8*1.0/8)*1.3
fall = 1
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-60*const(size.xscale))
animtype = High
ground.type = High
attr = S,NA
hitflag = MAFD
guardflag = MA
palfx.time=34+12
palfx.sinadd = 96,48,0,4
palfx.color = 0
palfx.add = 56,-96,-208
palfx.invertall = 1

[state -1]
type = parentvaradd
trigger1 = (root,var(1)%2>=1||root,var(1)%8>=4)&&numtarget && floor(root,var(43)/1000)<100
trigger1 = movehit=1 && target,time=0
var(1) = -1*(root,var(1)%2>=1)-4*(root,var(1)%8>=4)
ignorehitpause=1

[state -1]
type = targetstate
trigger1 = (root,var(1)%2>=1||root,var(1)%8>=4)&&numtarget && floor(root,var(43)/1000)>=100
trigger1 = movehit=1 && target,time=0
value = 926+(root,var(1)%8>=4)*10
ignorehitpause=1

;援軍ヒット判別
[state 12000]
type = ParentVarSet
trigger1 = movecontact=1
var(15) = ifelse((root,stateno=[1000,1999]),36,28)*ifelse(moveguarded||!numtarget,-1,1)
persistent=0
ignorehitpause=1

;ヒット数補正増加
[state 12000]
type = ParentVarAdd
trigger1 = movehit=1&&numtarget&&hitpausetime=ifelse(floor(root,var(43)/1000)>=50,12,11)
var(2) = 1
ignorehitpause=1

;空中ヒット数補正増加
[state 12000]
type = ParentVarAdd
trigger1 = movehit=1&&numtarget&&hitpausetime=ifelse(floor(root,var(43)/1000)>=50,12,11)&&(floor(root,var(43)/1000)>=50||root,var(3))
var(3) = 1
ignorehitpause=1

;引き剥がし効果
[state 12000]
type = ParentVarSet
trigger1 = movehit=1&&numtarget&&root,var(6)!=0 && floor(root,var(43)/1000)<100
var(6) = 0
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
triggerall = floor(root,var(43)/1000)<50
trigger1 = movehit=1&&hitpausetime=11
fvar(15) = .00005*floor(ifelse((28+floor(root,var(43)/1000)+(root,var(43)=49000))*root,fvar(14)<1,1+(root,var(2)%5=1),(28+floor(root,var(43)/1000)+(root,var(43)=49000))*root,fvar(14))*1.22)
ignorehitpause=1

;ヒットによる増加(スタイリッシュポイント)
[state -2]
type = parentvaradd
triggerall = (floor(root,var(43)/1000)=[50,99])
trigger1 = movehit=1&&hitpausetime=12
fvar(15) = .00005*floor(ifelse((57+floor((root,var(43)-50)/1000)+(root,var(43)=99000))*root,fvar(14)<1,1+(root,var(2)%5=1),(57+floor((root,var(43)-50)/1000)+(root,var(43)=99000))*root,fvar(14))*1.22)
ignorehitpause=1

;ヒットによる増加(スタイリッシュポイント)
[state -2]
type = parentvaradd
triggerall = floor(root,var(43)/1000)>=100
trigger1 = movehit=1&&hitpausetime=12
fvar(15) = .00005*floor(ifelse(56*root,fvar(14)<1,1+(root,var(2)%5=1),56*root,fvar(14))*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 = AnimElem=5
trigger2 = floor(root,var(43)/1000)>=100 && AnimElem=15
var(16) = (floor(root,var(43)/1000)>=50)
persistent=0

;X座標
[state 240]
type = VarSet
triggerall = floor(root,var(43)/1000)<50
trigger1 = AnimElem=5,>=0&&AnimElem=6,<0
var(17) = ifelse(P2dist X>floor(148*const(size.xscale)),floor(148*const(size.xscale)),floor(P2dist X)+ifelse((P2dist X=[1,60]),10,-10))

;X座標
[state 240]
type = VarSet
triggerall = floor(root,var(43)/1000)>=50
trigger1 = AnimElem=5,>=0&&AnimElem=6,<0
trigger2 = floor(root,var(43)/1000)>=100 && AnimElem=15,>=0&&AnimElem=16,<0
var(17) = ifelse(P2dist X>floor(160*const(size.xscale)),floor(160*const(size.xscale)),floor(P2dist X)+ifelse((P2dist X=[1,60]),10,-10))

;X座標
[state 240]
type = VarSet
triggerall = floor(root,var(43)/1000)<50
trigger1 = AnimElem=6,>=0&&AnimElem=7,<0
var(17) = ifelse(P2dist X>floor(130*const(size.xscale)),floor(130*const(size.xscale)),floor(P2dist X)+ifelse((P2dist X=[1,60]),10,-10))

;X座標
[state 240]
type = VarSet
triggerall = floor(root,var(43)/1000)>=50
trigger1 = AnimElem=6,>=0&&AnimElem=7,<0
trigger2 = floor(root,var(43)/1000)>=100 && AnimElem=16,>=0&&AnimElem=17,<0
var(17) = ifelse(P2dist X>floor(146*const(size.xscale)),floor(146*const(size.xscale)),floor(P2dist X)+ifelse((P2dist X=[1,60]),10,-10))

;Y座標
[state 240]
type = VarSet
trigger1 = AnimElem=5,>=0&&AnimElem=6,<0
trigger2 = floor(root,var(43)/1000)>=100 && AnimElem=15,>=0&&AnimElem=16,<0
var(18) = floor(-100*const(size.yscale))

;Y座標
[state 240]
type = VarSet
trigger1 = AnimElem=6,>=0&&AnimElem=7,<0
trigger2 = floor(root,var(43)/1000)>=100 && AnimElem=16,>=0&&AnimElem=17,<0
var(18) = floor(-160*const(size.yscale))

;ヒットスパーク
[state 1000]
type = Helper
trigger1 = movecontact=1&&hitpausetime=ifelse(floor(root,var(43)/1000)<50,11,12)
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 12000]
type = AttackDist
trigger1 = floor(root,var(43)/1000)<100 && AnimElem=7
trigger2 = floor(root,var(43)/1000)>=100 && AnimElem=17
value = 0

[state -2]
type = Explod
trigger1 = movehit=1&&!numtarget
id = 15990
anim = 90000
removetime=0
pausemovetime=1
supermovetime=1

[state 10500]
type = NotHitBy
trigger1 = !(IsHelper(11000)&&Root,NumHelper(11010))
value = ,AT
ignorehitpause=1

[state 10500]
type = HitOverride
trigger1 = 1
time = 1
attr = SCA,AA,AP
stateno=15000
slot = 0
ignorehitpause=1

[state 1000]
type = parentvaradd
trigger1 = var(25)
var(25) = var(25)
ignorehitpause=1

[state 1000]
type = varset
trigger1 = var(25)
var(25) = 0
ignorehitpause=1

;ガードクラッシュ減少値判別
[State 100, Helper]
type = Helper
triggerall = !enemynear,numpartner && !numhelper(15904)&&IsHelper
trigger1 = time=1
id = 15904
stateno=15904
pos = 0,0
postype = p2
ownpal = 1
ignorehitpause = 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+4
stateno=15905
pos = 0,0
postype = p2
ownpal = 1
ignorehitpause = 1

[state 11455]
type = parentvarset
trigger1 = movehit=1&&!numtarget
fvar(25) = uniqhitcount-hitcount+1

[state 19000]
type = ChangeState
trigger1 = root,var(40)=3&&IsHelper(11000)&&Root,NumHelper(11010)
value = 15000

[state 19000]
type = ChangeState
trigger1 = AnimTime=0
value = 10500

;援軍アタック対空
[statedef 12500]
type = S
movetype=A
physics =S
anim = 12500
sprpriority = 2
velset = 0,0

[state 11000]
type = Turn
trigger1 = !time&&facing!=root,facing

[state 11000]
type = Turn
trigger1 = !time&&P2dist X<0

[state 12000]
type = PosSet
trigger1 = !Time
y = 0

[state 12000]
type = ParentVarSet
trigger1 = !Time
var(40) = ifelse(root,var(42)<=0,-1,2)

[state 12000]
type = PosSet
trigger1 = !Time&&IsHelper(11010)&&prevstateno!=10500
x = helper(11000),pos x

[state 10000]
type = parentvarset
trigger1 = IsHelper(11010)
fvar(22) = floor(pos X)

[state 10000]
type = parentvarset
trigger1 = IsHelper(11010)
fvar(23) = floor(pos y)

;お逝きなさい！
[state 12000]
type = null;PlaySND
trigger1 = !Time&&IsHelper(11000)
value = 20,5
channel = 2

[state 12000]
type = PlaySND
trigger1 = AnimElemTime(4)>=0&&AnimElemTime(8)<0&&Time%4=0&&IsHelper(11000)
value = 30,5
;channel = 10

[state 12500]
type = Explod
trigger1 = AnimElemTime(4)=0
id = 6810
anim=6810
pos = floor((140+var(0)%3*10)*const(size.xscale)),-floor(120*const(size.yscale))
postype = p1
sprpriority = 4
pausemovetime=999
supermovetime=999
persistent=0

[state 12500]
type = Explod
trigger1 = AnimElemTime(5)=0
id = 6810
anim=6810
pos = -floor((0+var(0)%3*10)*const(size.xscale)),-floor(120*const(size.yscale))
postype = p1
sprpriority = 4
pausemovetime=999
supermovetime=999
persistent=0

[state 12500]
type = Explod
trigger1 = AnimElemTime(6)=0
id = 6810
anim=6810
pos = floor((100+var(0)%3*10)*const(size.xscale)),-floor(120*const(size.yscale))
postype = p1
sprpriority = 4
pausemovetime=999
supermovetime=999
persistent=0

[state 12500]
type = Explod
trigger1 = AnimElemTime(6)=4
id = 6810
anim=6810
pos = -floor((40+var(0)%3*10)*const(size.xscale)),-floor(120*const(size.yscale))
postype = p1
sprpriority = 4
pausemovetime=999
supermovetime=999
persistent=0

[state 12500]
type = Explod
trigger1 = AnimElemTime(4)=0
id = 6815
anim=6815
pos = floor((140+var(0)%3*10)*const(size.xscale)),-floor(120*const(size.yscale))
postype = p1
sprpriority = 4
pausemovetime=999
supermovetime=999
persistent=0

[state 12500]
type = Explod
trigger1 = AnimElemTime(5)=0
id = 6815
anim=6815
pos = -floor((0+var(0)%3*10)*const(size.xscale)),-floor(120*const(size.yscale))
postype = p1
sprpriority = 4
pausemovetime=999
supermovetime=999
persistent=0

[state 12500]
type = Explod
trigger1 = AnimElemTime(6)=0
id = 6815
anim=6815
pos = floor((100+var(0)%3*10)*const(size.xscale)),-floor(120*const(size.yscale))
postype = p1
sprpriority = 4
pausemovetime=999
supermovetime=999
persistent=0

[state 12500]
type = Explod
trigger1 = AnimElemTime(6)=4
id = 6815
anim=6815
pos = -floor((40+var(0)%3*10)*const(size.xscale)),-floor(120*const(size.yscale))
postype = p1
sprpriority = 4
pausemovetime=999
supermovetime=999
persistent=0

[state 190]
type = VarRandom
trigger1 = 1
v = 0
range = 0,999

[state 12000]
type = PlaySND
trigger1 = !Time&&IsHelper(11000)
value = 110,0

[state 12000]
type = ChangeAnim
trigger1 = Time=1&&(Prevstateno!=[10000,19999])&&IsHelper(11010)
value = anim
elem = 2

[state 12000]
type = AssertSpecial
trigger1 = IsHelper(11000)&&Root,NumHelper(11010)
flag = invisible

[state 12000]
type = NotHitBy
trigger1 = IsHelper(11000)&&Root,NumHelper(11010)
value = SCA

[state 12000]
type = PlayerPush
trigger1 = 1
value = 1

[state 12000]
type = Width
trigger1 = Vel X>0
edge = 2,0

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

[State 900, 4]
type = ScreenBound
trigger1 = numhelper(30000)
trigger1 = ifelse(facing=1,helper(30000),pos x-pos x,-(helper(30005),pos x-pos x))<(40+const(size.ground.front))&&frontedgebodydist<=0
trigger2 = numhelper(30000)
trigger2 = ifelse(facing=1,-(helper(30005),pos x-pos x),(helper(30000),pos x-pos x))<(40+const(size.ground.back))&&backedgebodydist<=0
value = 1
movecamera = 0,0

[state 12000]
type = null;StatetypeSet
trigger1 = P2dist X>Vel X&&IsHelper(11000)&&AnimElem=3
movetype=I

[state 12000]
type = DestroySelf
trigger1 = P2dist X<=Vel X&&IsHelper(11010)&&!(AnimElemTime(3)>=0&&AnimElemTime(4)<0)

[state 12000]
type = VarSet
trigger1 = abs(root,var(15))<=18&&IsHelper(11000)
var(20) = 1

[state 12000]
type = ChangeAnim
trigger1 = (root,var(15)<-23||root,var(15)>23)&&AnimElemNo(0)=3&&IsHelper(11000)
value = anim
elem = 3

[state 12000]
type = ChangeAnim
trigger1 = abs(root,var(15))<=18&&var(20)=34&&IsHelper(11000)
value = anim
elem = 4

[state 12000]
type = PosFreeze
trigger1 = (root,var(15)<-23||root,var(15)>23)&&IsHelper(11000)
value = 1

[state 12000]
type = PosAdd
trigger1 = AnimElem=4&&!((root,var(15)<-23||root,var(15)>23)&&IsHelper(11000))
x = floor(40*const(size.xscale))

[state 12000]
type = StatetypeSet
trigger1 = AnimElem=4
statetype=A
physics = N

[state 12000]
type = VelSet
trigger1 = AnimElem=4,=1
x = 2.5
y = -13.5

[State 900, 4]
type = VelSet
trigger1 = AnimElem=4,>=1&&Statetype=A
x = 2.5

[State 900, 4]
type = VelSet
trigger1 = numhelper(30000)
trigger1 = vel x>0&&ifelse(facing=1,helper(30000),pos x-pos x,-(helper(30005),pos x-pos x))<(40+const(size.ground.front))&&frontedgebodydist<=0
trigger2 = numhelper(30000)
trigger2 = vel x<0&&ifelse(facing=1,-(helper(30005),pos x-pos x),(helper(30000),pos x-pos x))<(40+const(size.ground.back))&&backedgebodydist<=0
x = 0

[state 12000]
type = VelAdd
trigger1 = AnimElem=4,>1&&!((root,var(15)<-23||root,var(15)>23)&&IsHelper(11000))
y = .5

[state 200]
type = MoveHitReset
trigger1 = AnimElem=4
trigger2 = AnimElem=5
trigger3 = AnimElem=6

;Attack Lv.1
[state 200]
type = Hitdef
triggerall = !movecontact&&!movereversed
trigger1 = AnimElem=3,>=0&&AnimElem=4,<0
damage = floor(ifelse((17+floor(root,var(43)/5000)-(root,var(43)=100000))*root,fvar(0)<1,1+(root,var(2)%5=4),(17+floor(root,var(43)/5000)-(root,var(43)=100000))*root,fvar(0))*1.22)
ground.slidetime = 10+(root,var(49)&&!root,var(2))*5
ground.hittime = 10+(root,var(49)&&!root,var(2))*5
guard.hittime = 8
pausetime = 5,4
ground.velocity = -3*const(size.xscale),-15.0*const(size.yscale)
guard.velocity = -9.0*const(size.xscale)
ground.cornerpush.veloff = 0
air.velocity = ifelse(root,var(1)%8>=4||root,var(1)%2>=1,-11.0-.0014,-3*(1.0+ifelse(root,var(3)>31,31,root,var(3))*.04)*const(size.xscale)),ifelse(root,var(6)%10>0,2,(-15.0*(51-root,var(3))*1.0/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(root,var(6)%10>0||root,var(28)>0,0,1)
fall.recovertime = ifelse(root,var(49)&&!root,var(2),38+6,28-ifelse(floor(root,var(14)/100)>5,5,floor(root,var(14)/100))+6)
hitsound = s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,1)
guardsound = s7000,1
getpower = floor(ifelse(root,var(9),0,floor(24*ifelse(root,var(1)%4>=2,.5,1.0)*root,fvar(0)/root,fvar(2))*1.3*root,fvar(16))),floor(ifelse(root,var(9),0,ceil(24*root,fvar(0)/root,fvar(2)*1.0/8)*1.3*root,fvar(16)))
givepower = floor(24*ifelse(root,var(1)%4>=2,.5,1.0)*root,fvar(0)/root,fvar(2)*.8)*1.3,floor(24*root,fvar(0)/root,fvar(2)*.8*1.0/8)*1.3
fall = 1
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-60*const(size.xscale))
animtype = up
ground.type = High
attr = S,NA
hitflag = MAFD
guardflag = M

;Attack Lv.1
[state 200]
type = Hitdef
triggerall = !movecontact&&!movereversed
trigger1 = AnimElem=4,>=0&&AnimElem=5,<0
trigger2 = AnimElem=5,>=0&&AnimElem=6,<0
trigger3 = AnimElem=6,>=0&&AnimElem=7,<0
damage = floor(ifelse((17+floor(root,var(43)/5000)-(root,var(43)=100000))*root,fvar(0)<1,1+(root,var(2)%5=4),(17+floor(root,var(43)/5000)-(root,var(43)=100000))*root,fvar(0))*1.22)
ground.slidetime = 10+(root,var(49)&&!root,var(2))*5
ground.hittime = 10+(root,var(49)&&!root,var(2))*5
guard.hittime = 8
pausetime = 5,4
ground.velocity = -3*const(size.xscale),-15.0*const(size.yscale)
guard.velocity = -9.0*const(size.xscale)
ground.cornerpush.veloff = 0
air.velocity = ifelse(root,var(1)%8>=4||root,var(1)%2>=1,-11.0-.0014,-3*(1.0+ifelse(root,var(3)>31,31,root,var(3))*.04)*const(size.xscale)),ifelse(root,var(6)%10>0,2,(-15.0*(51-root,var(3))*1.0/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(root,var(6)%10>0||root,var(28)>0,0,1)
fall.recovertime = ifelse(root,var(49)&&!root,var(2),38+6,28-ifelse(floor(root,var(14)/100)>5,5,floor(root,var(14)/100))+6)
hitsound = s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,1)
guardsound = s7000,1
getpower = floor(ifelse(root,var(9),0,floor(24*ifelse(root,var(1)%4>=2,.5,1.0)*root,fvar(0)/root,fvar(2))*1.3*root,fvar(16))),floor(ifelse(root,var(9),0,ceil(24*root,fvar(0)/root,fvar(2)*1.0/8)*1.3*root,fvar(16)))
givepower = floor(24*ifelse(root,var(1)%4>=2,.5,1.0)*root,fvar(0)/root,fvar(2)*.8)*1.3,floor(24*root,fvar(0)/root,fvar(2)*.8*1.0/8)*1.3
fall = 1
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-60*const(size.xscale))
animtype = up
ground.type = High
attr = A,NA
hitflag = MAFD
guardflag = M

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

;X座標
[state 240]
type = VarSet
trigger1 = AnimElem=3,>=0&&AnimElem=7,<0
var(17) = floor(P2dist X)+ifelse((P2dist X=[1,60]),10,-10)

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

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

;ヒットスパーク
[state 1000]
type = Helper
trigger1 = movecontact=1&&hitpausetime=4
id = 7000
stateno=7000+(movehit)*100
pos = var(17),var(18)
postype = p1
ignorehitpause=1
pausemovetime=99999
supermovetime=99999
size.xscale = .5
size.yscale = .5

[state -1]
type = targetstate
trigger1 = (root,var(1)%2>=1||root,var(1)%8>=4)&&numtarget
trigger1 = movehit=1 && target,time=0
value = 926+(root,var(1)%8>=4)*10
ignorehitpause=1

;援軍ヒット判別
[state 12000]
type = ParentVarSet
trigger1 = movecontact=1
var(15) = ifelse((root,stateno=[1000,1999]),36,28)*ifelse(moveguarded||!numtarget,-1,1)
persistent=0
ignorehitpause=1

;ヒット数補正増加
[state 12000]
type = ParentVarAdd
trigger1 = movehit=1&&numtarget&&hitpausetime=4
var(2) = 1
ignorehitpause=1

;空中ヒット数補正増加
[state 12000]
type = ParentVarAdd
trigger1 = movehit=1&&numtarget&&hitpausetime=4
var(3) = 1
ignorehitpause=1

;壁コンボヒット数補正増加
[state -1]
type = parentvaradd
trigger1 = (root,var(1)%2>=1||root,var(1)%8>=4)&&numtarget && floor(root,var(6)%100/10)<9
trigger1 = movehit=1 && target,time=0
var(6) = 10
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&&hitpausetime=4
fvar(15) = .00005*floor(ifelse((17+floor(root,var(43)/5000)-(root,var(43)=100000))*root,fvar(14)<1,1+(root,var(2)%5=1),(17+floor(root,var(43)/5000)-(root,var(43)=100000))*root,fvar(14))*1.22)
ignorehitpause=1

[state -2]
type = parentvarset
trigger1 = movehit=1&&hitpausetime=4
fvar(14) = root,fvar(1)*root,fvar(2)*root,fvar(3)*root,fvar(4)
ignorehitpause=1

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

[state 10500]
type = NotHitBy
trigger1 = !(IsHelper(11000)&&Root,NumHelper(11010))
value = ,AT
ignorehitpause=1

[state 10500]
type = HitOverride
trigger1 = 1
time = 1
attr = SCA,AA,AP
stateno=15000
slot = 0
ignorehitpause=1

[state 19000]
type = ChangeState
trigger1 = root,var(40)=3&&IsHelper(11000)&&Root,NumHelper(11010)
value = 15000

[state 19000]
type = PlaySND
trigger1 = Vel Y>0 && Pos Y>=-Vel Y
value = 52,0

[state 19000]
type = StopSND
trigger1 = Vel Y>0 && Pos Y>=-Vel Y
channel = 10

[state 19000]
type = ChangeAnim
trigger1 = Vel Y>0 && Pos Y>=-Vel Y
value = 12547

[state 19000]
type = StatetypeSet
trigger1 = Vel Y>0 && Pos Y>=-Vel Y
statetype=S
physics = S

[state 19000]
type = PosSet
trigger1 = Vel Y>0 && Pos Y>=-Vel Y
y = 0

[state 19000]
type = VelSet
trigger1 = Vel Y>0 && Pos Y>=-Vel Y
x = 0
y = 0

[state 11455]
type = parentvarset
trigger1 = movehit=1&&!numtarget
fvar(25) = uniqhitcount-hitcount+1

[state 1000]
type = parentvaradd
trigger1 = var(25)
var(25) = var(25)
ignorehitpause=1

[state 1000]
type = varset
trigger1 = var(25)
var(25) = 0
ignorehitpause=1

;ガードクラッシュ減少値判別
[State 100, Helper]
type = Helper
triggerall = !enemynear,numpartner && !numhelper(15904)&&IsHelper
trigger1 = time=1
id = 15904
stateno=15904
pos = 0,0
postype = p2
ownpal = 1
ignorehitpause = 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+4
stateno=15905
pos = 0,0
postype = p2
ownpal = 1
ignorehitpause = 1

[state 19000]
type = ChangeState
trigger1 = Anim=12547&&AnimTime=0
value = 10500

;援軍エリアルアタック
[statedef 12600]
type = S
movetype=A
physics =S
anim = 12500
sprpriority = 2
velset = 0,0

[state 11000]
type = Turn
trigger1 = !time&&facing!=root,facing

[state 11000]
type = Turn
trigger1 = !time&&P2dist X<0

[state 12000]
type = PosSet
trigger1 = !Time
y = 0

[state 12000]
type = ParentVarSet
trigger1 = !Time
var(40) = ifelse(root,var(42)<=0,-1,2)

[state 12000]
type = PosSet
trigger1 = !Time&&IsHelper(11010)&&prevstateno!=10500
x = helper(11000),pos x

[state 10000]
type = parentvarset
trigger1 = IsHelper(11010)
fvar(22) = floor(pos X)

[state 10000]
type = parentvarset
trigger1 = IsHelper(11010)
fvar(23) = floor(pos y)

;お逝きなさい！
[state 12000]
type = null;PlaySND
trigger1 = !Time&&IsHelper(11000)
value = 20,5
channel = 2

[state 12000]
type = PlaySND
trigger1 = AnimElemTime(4)>=0&&AnimElemTime(8)<0&&Time%4=0&&IsHelper(11000)
value = 30,5
;channel = 10

[state 190]
type = VarRandom
trigger1 = 1
v = 0
range = 0,999

[state 12500]
type = Explod
trigger1 = AnimElemTime(4)=0
id = 6810
anim=6810
pos = floor((140+var(0)%3*10)*const(size.xscale)),-floor(120*const(size.yscale))
postype = p1
sprpriority = 4
pausemovetime=999
supermovetime=999
persistent=0

[state 12500]
type = Explod
trigger1 = AnimElemTime(5)=0
id = 6810
anim=6810
pos = -floor((0+var(0)%3*10)*const(size.xscale)),-floor(120*const(size.yscale))
postype = p1
sprpriority = 4
pausemovetime=999
supermovetime=999
persistent=0

[state 12500]
type = Explod
trigger1 = AnimElemTime(6)=0
id = 6810
anim=6810
pos = floor((100+var(0)%3*10)*const(size.xscale)),-floor(120*const(size.yscale))
postype = p1
sprpriority = 4
pausemovetime=999
supermovetime=999
persistent=0

[state 12500]
type = Explod
trigger1 = AnimElemTime(6)=4
id = 6810
anim=6810
pos = -floor((40+var(0)%3*10)*const(size.xscale)),-floor(120*const(size.yscale))
postype = p1
sprpriority = 4
pausemovetime=999
supermovetime=999
persistent=0

[state 12500]
type = Explod
trigger1 = AnimElemTime(4)=0
id = 6815
anim=6815
pos = floor((140+var(0)%3*10)*const(size.xscale)),-floor(120*const(size.yscale))
postype = p1
sprpriority = 4
pausemovetime=999
supermovetime=999
persistent=0

[state 12500]
type = Explod
trigger1 = AnimElemTime(5)=0
id = 6815
anim=6815
pos = -floor((0+var(0)%3*10)*const(size.xscale)),-floor(120*const(size.yscale))
postype = p1
sprpriority = 4
pausemovetime=999
supermovetime=999
persistent=0

[state 12500]
type = Explod
trigger1 = AnimElemTime(6)=0
id = 6815
anim=6815
pos = floor((100+var(0)%3*10)*const(size.xscale)),-floor(120*const(size.yscale))
postype = p1
sprpriority = 4
pausemovetime=999
supermovetime=999
persistent=0

[state 12500]
type = Explod
trigger1 = AnimElemTime(6)=4
id = 6815
anim=6815
pos = -floor((40+var(0)%3*10)*const(size.xscale)),-floor(120*const(size.yscale))
postype = p1
sprpriority = 4
pausemovetime=999
supermovetime=999
persistent=0

[state 12000]
type = ChangeAnim
trigger1 = Time=3&&(Prevstateno!=[10000,19999])&&IsHelper(11010)
value = anim
elem = 2

[state 12000]
type = AssertSpecial
trigger1 = IsHelper(11000)&&Root,NumHelper(11010)
flag = invisible

[state 12000]
type = NotHitBy
trigger1 = IsHelper(11000)&&Root,NumHelper(11010)
value = SCA

[state 12000]
type = PlayerPush
trigger1 = 1
value = 1

[state 12000]
type = Width
trigger1 = Vel X>0
edge = 2,0

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

[State 900, 4]
type = ScreenBound
trigger1 = numhelper(30000)
trigger1 = ifelse(facing=1,helper(30000),pos x-pos x,-(helper(30005),pos x-pos x))<(40+const(size.ground.front))&&frontedgebodydist<=0
trigger2 = numhelper(30000)
trigger2 = ifelse(facing=1,-(helper(30005),pos x-pos x),(helper(30000),pos x-pos x))<(40+const(size.ground.back))&&backedgebodydist<=0
value = 1
movecamera = 0,0

[state 12000]
type = null;StatetypeSet
trigger1 = P2dist X>Vel X&&IsHelper(11000)&&AnimElem=3
movetype=I

[state 12000]
type = DestroySelf
trigger1 = P2dist X<=Vel X&&IsHelper(11010)&&!(AnimElemTime(3)>=0&&AnimElemTime(4)<0)

[state 12000]
type = VarSet
trigger1 = abs(root,var(15))<=18&&IsHelper(11000)
var(20) = 1

[state 12000]
type = ChangeAnim
trigger1 = (root,var(15)<-23||root,var(15)>23)&&AnimElemNo(0)=3&&IsHelper(11000)
value = anim
elem = 3

[state 12000]
type = ChangeAnim
trigger1 = abs(root,var(15))<=18&&var(20)=34&&IsHelper(11000)
value = anim
elem = 4

[state 12000]
type = PosFreeze
trigger1 = (root,var(15)<-23||root,var(15)>23)&&IsHelper(11000)
value = 1

[state 12000]
type = PosAdd
trigger1 = AnimElem=3&&!((root,var(15)<-23||root,var(15)>23)&&IsHelper(11000))
x = floor(40*const(size.xscale))

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

[state 12000]
type = VelSet
trigger1 = AnimElem=3,=1&&!((root,var(15)<-23||root,var(15)>23)&&IsHelper(11000))
x = 2.5
y = -13.5

[State 900, 4]
type = VelSet
trigger1 = AnimElem=3,>=1&&Statetype=A
x = 2.5

[State 900, 4]
type = VelSet
trigger1 = numhelper(30000)
trigger1 = vel x>0&&ifelse(facing=1,helper(30000),pos x-pos x,-(helper(30005),pos x-pos x))<(40+const(size.ground.front))&&frontedgebodydist<=0
trigger2 = numhelper(30000)
trigger2 = vel x<0&&ifelse(facing=1,-(helper(30005),pos x-pos x),(helper(30000),pos x-pos x))<(40+const(size.ground.back))&&backedgebodydist<=0
x = 0

[state 12000]
type = VelAdd
trigger1 = AnimElem=3,>1&&!((root,var(15)<-23||root,var(15)>23)&&IsHelper(11000))
y = .5

;Attack Lv.3
[state 200]
type = Hitdef
triggerall = !movecontact&&!movereversed
trigger1 = AnimElem=3,>=0&&AnimElem=6,<0&&!(root,var(15)&&IsHelper(11000))
damage = floor(ifelse((57+floor(root,var(43)/4000)+root,var(43)=100000)*root,fvar(0)<1,1+(root,var(2)%5=4),(57+floor(root,var(43)/4000)+root,var(43)=100000)*root,fvar(0))*1.22)
ground.slidetime = 14+(P2statetype=C)+(root,var(49)&&!root,var(2))*6
ground.hittime = 14+(P2statetype=C)+(root,var(49)&&!root,var(2))*6
guard.hittime = 12
pausetime = 15,14
ground.velocity = -3*const(size.xscale),-22.0*const(size.yscale)
guard.velocity = -12.0*const(size.xscale)
ground.cornerpush.veloff = 0
air.velocity = ifelse(root,var(1)%8>=4||root,var(1)%2>=1,-11.0-.0013,-3*(1.0+ifelse(root,var(3)>31,31,root,var(3))*.04)*const(size.xscale)),ifelse(root,var(6)%10>0,2,(-22.0*(51-root,var(3))*1.0/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(root,var(6)%10>0||root,var(28)>0,0,1)
fall.recovertime = ifelse(root,var(49)&&!root,var(2),50+12,36-ifelse(floor(root,var(14)/75)>7,7,floor(root,var(14)/75))+12)
hitsound = s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,2)
guardsound = s7000,2
getpower = floor(ifelse(root,var(9),0,floor(45*ifelse(root,var(1)%4>=2,.5,1.0)*root,fvar(0)/root,fvar(2))*1.3*root,fvar(16))),floor(ifelse(root,var(9),0,ceil(45*root,fvar(0)/root,fvar(2)*1.0/8)*1.3*root,fvar(16)))
givepower = floor(45*ifelse(root,var(1)%4>=2,.5,1.0)*root,fvar(0)/root,fvar(2)*.8)*1.3,floor(45*root,fvar(0)/root,fvar(2)*.8*1.0/8)*1.3
fall = 1
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-60*const(size.xscale))
animtype = up
ground.type = High
attr = A,NA
hitflag = MAFD
guardflag = M

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

;X座標
[state 240]
type = VarSet
trigger1 = AnimElem=3,>=0&&AnimElem=7,<0
var(17) = floor(P2dist X)+ifelse((P2dist X=[1,60]),10,-10)

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

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

;ヒットスパーク
[state 1000]
type = Helper
trigger1 = movecontact=1&&hitpausetime=14
id = 7000
stateno=7000+(movehit)*100
pos = var(17),var(18)
postype = p1
ignorehitpause=1
pausemovetime=99999
supermovetime=99999
size.xscale = .5
size.yscale = .5

[state -1]
type = targetstate
trigger1 = (root,var(1)%2>=1||root,var(1)%8>=4)&&numtarget
trigger1 = movehit=1 && target,time=0
value = 926+(root,var(1)%8>=4)*10
ignorehitpause=1

;援軍ヒット判別
[state 12000]
type = ParentVarSet
trigger1 = movecontact=1
var(15) = ifelse((root,stateno=[1000,1999]),36,28)*ifelse(moveguarded||!numtarget,-1,1)
persistent=0
ignorehitpause=1

;ヒット数補正増加
[state 12000]
type = ParentVarAdd
trigger1 = movehit=1&&numtarget
var(2) = 1
persistent=0
ignorehitpause=1

;空中ヒット数補正増加
[state 12000]
type = ParentVarAdd
trigger1 = movehit=1&&numtarget
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&&hitpausetime=14
fvar(15) = .00005*floor(ifelse((57+floor(root,var(43)/4000)+root,var(43)=100000)*root,fvar(14)<1,1+(root,var(2)%5=1),(57+floor(root,var(43)/4000)+root,var(43)=100000)*root,fvar(14))*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 12000]
type = AttackDist
trigger1 = AnimElem=4
value = 0

[state 10500]
type = NotHitBy
trigger1 = !(IsHelper(11000)&&Root,NumHelper(11010))
value = ,AT
ignorehitpause=1

[state 10500]
type = HitOverride
trigger1 = 1
time = 1
attr = SCA,AA,AP
stateno=15000
slot = 0
ignorehitpause=1

[state 19000]
type = ChangeState
trigger1 = root,var(40)=3&&IsHelper(11000)&&Root,NumHelper(11010)
value = 15000

[state 50]
type = PlaySND
trigger1 = AnimElem=8,=1
value = 41,0

[state 19000]
type = PlaySND
trigger1 = Vel Y>0 && Pos Y>=-Vel Y
value = 52,0

[state 19000]
type = StopSND
trigger1 = Vel Y>0 && Pos Y>=-Vel Y
channel = 10

[state 19000]
type = ChangeAnim
trigger1 = Vel Y>0 && Pos Y>=-Vel Y
value = 12547

[state 19000]
type = StatetypeSet
trigger1 = Vel Y>0 && Pos Y>=-Vel Y
statetype=S
physics = S

[state 19000]
type = PosSet
trigger1 = Vel Y>0 && Pos Y>=-Vel Y
y = 0

[state 19000]
type = VelSet
trigger1 = Vel Y>0 && Pos Y>=-Vel Y
x = 0
y = 0

[state 11455]
type = parentvarset
trigger1 = movehit=1&&!numtarget
fvar(25) = uniqhitcount-hitcount+1

[state 1000]
type = parentvaradd
trigger1 = var(25)
var(25) = var(25)
ignorehitpause=1

[state 1000]
type = varset
trigger1 = var(25)
var(25) = 0
ignorehitpause=1

;ガードクラッシュ減少値判別
[State 100, Helper]
type = Helper
triggerall = !enemynear,numpartner && !numhelper(15904)&&IsHelper
trigger1 = time=1
id = 15904
stateno=15904
pos = 0,0
postype = p2
ownpal = 1
ignorehitpause = 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+4
stateno=15905
pos = 0,0
postype = p2
ownpal = 1
ignorehitpause = 1

[state 19000]
type = ChangeState
trigger1 = Anim=12547&&AnimTime=0
value = 10500

;援軍アシスト
[statedef 13000]
type = S
movetype=A
physics =S
anim = 13000
sprpriority = 2
velset = 0,0

[state 190]
type = VarRandom
trigger1 = 1
v = 0
range = 0,999

[state 11000]
type = Turn
trigger1 = !time&&facing!=root,facing

[state 11000]
type = Turn
trigger1 = !time&&P2dist X<0

[state 200]
type = helper
trigger1 = AnimElem=1,=13
id = 7570
stateno = 7570
pos = 0,floor(-120*const(size.yscale))
postype = P1
pausemovetime=50
supermovetime=50
ownpal = 1

[state 13000]
type = SuperPause
trigger1 = AnimElem=1,=13
time = 30
movetime = 30
p2defmul = 1
sound = -1
anim = -1
darken = 0
poweradd = 0

[state 13000]
type = PowerAdd
trigger1 = AnimElem=1,=13
value  = -1000

[state 13000]
type = VarAdd
trigger1 = AnimElem=1,=13
var(42) = -200

[state 13000]
type = VarSet
trigger1 = AnimElem=1,=13
var(40) = -1

[state 12000]
type = PlayerPush
trigger1 = 1
value = 1

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

[State 900, 4]
type = ScreenBound
trigger1 = numhelper(30000)
trigger1 = ifelse(facing=1,helper(30000),pos x-pos x,-(helper(30005),pos x-pos x))<(40+const(size.ground.front))&&frontedgebodydist<=0
trigger2 = numhelper(30000)
trigger2 = ifelse(facing=1,-(helper(30005),pos x-pos x),(helper(30000),pos x-pos x))<(40+const(size.ground.back))&&backedgebodydist<=0
value = 1
movecamera = 0,0

[state 3000]
type = Explod
trigger1 = AnimElem=2
id = 6820
anim = 6820
pos = floor(40*const(size.xscale)),0
postype = p1
sprpriority = 2
scale = const(size.xscale),const(size.yscale)

[state 3000]
type = PlaySND
trigger1 = AnimElem=6
value = 30,11

[state 3000]
type = PlaySND
trigger1 = AnimElem=8
value = 30,12

[state 3000]
type = Helper
trigger1 = AnimElem=8&&floor(root,var(43)/1000)<100
trigger2 = AnimElem=8&&floor(root,var(43)/1000)>=100&&NumHelper(20000)
trigger2 = Helper(20000),stateno!=20000
id = 6830
stateno=6830
pos = floor(176*const(size.xscale)),-floor(276*const(size.yscale))
postype = p1
size.xscale = const(size.xscale)*1.5
size.yscale = const(size.yscale)*1.5

;ヒット数補正増加
[state 12000]
type = ParentVarAdd
trigger1 = numhelper(6830)
trigger1 = helper(6830),movehit=2&&helper(6830),numtarget
trigger2 = numhelper(21000)
trigger2 = helper(21000),movehit=2&&helper(21000),numtarget
var(2) = 1
persistent=0
ignorehitpause=1

;空中ヒット数補正増加
[state 12000]
type = ParentVarAdd
trigger1 = numhelper(6830)
trigger1 = helper(6830),movehit=2&&helper(6830),numtarget
trigger2 = numhelper(21000)
trigger2 = helper(21000),movehit=2&&helper(21000),numtarget
var(3) = 1
persistent=0
ignorehitpause=1

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

;ヒットによる増加(スタイリッシュポイント)
[state -2]
type = parentvaradd
trigger1 = numhelper(21000)
trigger1 = helper(21000),movehit=2&&floor(root,var(43)/1000)>=100
fvar(15) = .00005*floor(ifelse(271*root,fvar(14)<1,1+(root,var(2)%5=1),271*root,fvar(14))*1.22)
ignorehitpause=1
persistent=0

[state -2]
type = parentvarset
trigger1 = numhelper(6830)
trigger1 = helper(6830),movehit=2
trigger2 = numhelper(21000)
trigger2 = helper(21000),movehit=2&&helper(21000),numtarget
fvar(14) = root,fvar(1)*root,fvar(2)*root,fvar(3)*root,fvar(4)
ignorehitpause=1

[state 12000]
type = null;AttackDist
trigger1 = AnimElem=9
value = 0

[state 10500]
type = NotHitBy
trigger1 = !(IsHelper(11000)&&Root,NumHelper(11010))
value = ,AT
ignorehitpause=1

[state 10500]
type = HitOverride
trigger1 = 1
time = 1
attr = SCA,AA,AP
stateno=15000
slot = 0
ignorehitpause=1

[state 19000]
type = ChangeState
trigger1 = root,var(40)=3&&IsHelper(11000)&&Root,NumHelper(11010)
value = 15000

[state 13000]
type = ChangeState
trigger1 = AnimTime=0
value = 10600

;援軍アシスト（飛び道具）
[Statedef 6830]
type = A
movetype = A
physics = N
ctrl = 0
velset = 1,-8
sprpriority = 1
anim = 6830

;Attack Lv.5
[state 200]
type = Hitdef
trigger1 = !movecontact&&!movereversed
damage = ceil(floor(187*ifelse(root,fvar(1)<.25,.25*root,fvar(2)*root,fvar(3)*root,fvar(4),root,fvar(0)))*1.22),ceil(floor(187*1.0/4)*1.22)
ground.slidetime = 20+(P2statetype=C)+(root,var(49)&&!root,var(2))*7
ground.hittime = 20+(P2statetype=C)+(root,var(49)&&!root,var(2))*7
guard.hittime = 18
pausetime = 1,14
ground.velocity = -4.0*const(size.xscale),ifelse(root,var(6)%10>0,2,(-16.0-.9)*const(size.yscale))
guard.velocity = -15.0*const(size.xscale)
ground.cornerpush.veloff = 0
air.velocity = -4*(1.0+ifelse(root,var(3)>31,31,root,var(3))*.04)*const(size.xscale),ifelse(root,var(6)%10>0,2,(-16.0*(51-root,var(3))*1.0/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(root,var(6)%10>0||root,var(28)>0,0,0)
hitsound = s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,2)
guardsound = s7000,2
getpower = 0,0
givepower = 0,0
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-60*const(size.xscale))
animtype = High
ground.type = High
attr = S,HP
hitflag = MAFD
guardflag = MA
persistent=0
palfx.time=60+14
palfx.sinadd = 96,48,0,4
palfx.color = 0
palfx.add = 56,-96,-208
palfx.invertall = 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,60]),10,-10)

;Y座標
[state 240]
type = VarSet
trigger1 = 1
var(18) = floor(-24*const(size.yscale))

;ヒットスパーク
[state 1000]
type = Helper
trigger1 = movecontact=1
id = 7000
stateno=7000+(movehit)*100
pos = var(17),var(18)
postype = p1
ignorehitpause=1
pausemovetime=99999
supermovetime=99999
size.xscale = .5
size.yscale = .5

[state 6830]
type = DestroySelf
trigger1 = (ScreenPos Y<=-20&&Pos Y<=-240)||movecontact>1||FrontEdgeDist<=-20

;援軍カウンター
[statedef 13500]
type = S
movetype=A
physics =S
anim = 13500+root,var(57)-1
sprpriority = 2
velset = 0,0

[state 13500]
type = NotHitBy
trigger1 = AnimElem=3,<0
value = SCA

[state 11000]
type = Turn
trigger1 = facing!=root,facing

[state 12000]
type = PosSet
trigger1 = !Time
y = 0

[state 12000]
type = ParentVarSet
trigger1 = !Time
var(40) = -1

;濃めにも力添えのお許しを
[state 12000]
type = null;PlaySND
trigger1 = movehit=1&&IsHelper(11000)
value = 20,15
channel = 2
persistent=0

[state 190]
type = VarRandom
trigger1 = 1
v = 0
range = 0,999

[state 12000]
type = PlaySND
trigger1 = AnimElemTime(4)>=0&&AnimElemTime(8)<0&&Time%4=0&&IsHelper(11000)
value = 30,5
;channel = 10

[state 12500]
type = Explod
trigger1 = AnimElemTime(4)=0
id = 6810
anim=6810
pos = floor((140+var(0)%3*10)*const(size.xscale)),-floor(120*const(size.yscale))
postype = p1
sprpriority = 4
pausemovetime=999
supermovetime=999
persistent=0

[state 12500]
type = Explod
trigger1 = AnimElemTime(5)=0
id = 6810
anim=6810
pos = -floor((0+var(0)%3*10)*const(size.xscale)),-floor(120*const(size.yscale))
postype = p1
sprpriority = 4
pausemovetime=999
supermovetime=999
persistent=0

[state 12500]
type = Explod
trigger1 = AnimElemTime(6)=0
id = 6810
anim=6810
pos = floor((100+var(0)%3*10)*const(size.xscale)),-floor(120*const(size.yscale))
postype = p1
sprpriority = 4
pausemovetime=999
supermovetime=999
persistent=0

[state 12500]
type = Explod
trigger1 = AnimElemTime(6)=4
id = 6810
anim=6810
pos = -floor((40+var(0)%3*10)*const(size.xscale)),-floor(120*const(size.yscale))
postype = p1
sprpriority = 4
pausemovetime=999
supermovetime=999
persistent=0

[state 12500]
type = Explod
trigger1 = AnimElemTime(4)=0
id = 6815
anim=6815
pos = floor((140+var(0)%3*10)*const(size.xscale)),-floor(120*const(size.yscale))
postype = p1
sprpriority = 4
pausemovetime=999
supermovetime=999
persistent=0

[state 12500]
type = Explod
trigger1 = AnimElemTime(5)=0
id = 6815
anim=6815
pos = -floor((0+var(0)%3*10)*const(size.xscale)),-floor(120*const(size.yscale))
postype = p1
sprpriority = 4
pausemovetime=999
supermovetime=999
persistent=0

[state 12500]
type = Explod
trigger1 = AnimElemTime(6)=0
id = 6815
anim=6815
pos = floor((100+var(0)%3*10)*const(size.xscale)),-floor(120*const(size.yscale))
postype = p1
sprpriority = 4
pausemovetime=999
supermovetime=999
persistent=0

[state 12500]
type = Explod
trigger1 = AnimElemTime(6)=4
id = 6815
anim=6815
pos = -floor((40+var(0)%3*10)*const(size.xscale)),-floor(120*const(size.yscale))
postype = p1
sprpriority = 4
pausemovetime=999
supermovetime=999
persistent=0

[state 12000]
type = PlaySND
trigger1 = !time&&IsHelper(11000)
value = 110,0

[state 12000]
type = PlayerPush
trigger1 = 1
value = 1

[state 12000]
type = Width
trigger1 = Vel X>0
edge = 2,0

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

[State 900, 4]
type = ScreenBound
trigger1 = numhelper(30000)
trigger1 = ifelse(facing=1,helper(30000),pos x-pos x,-(helper(30005),pos x-pos x))<(40+const(size.ground.front))&&frontedgebodydist<=0
trigger2 = numhelper(30000)
trigger2 = ifelse(facing=1,-(helper(30005),pos x-pos x),(helper(30000),pos x-pos x))<(40+const(size.ground.back))&&backedgebodydist<=0
value = 1
movecamera = 0,0

[state 12000]
type = PosAdd
trigger1 = AnimElem=3
x = floor(40*const(size.xscale))

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

[state 12000]
type = VelSet
trigger1 = AnimElem=3,=1
x = 1.5
y = -23.0

[State 900, 4]
type = VelSet
trigger1 = AnimElem=3,>=1&&Statetype=A
x = 1.5

[State 900, 4]
type = VelSet
trigger1 = numhelper(30000)
trigger1 = vel x>0&&ifelse(facing=1,helper(30000),pos x-pos x,-(helper(30005),pos x-pos x))<(40+const(size.ground.front))&&frontedgebodydist<=0
trigger2 = numhelper(30000)
trigger2 = vel x<0&&ifelse(facing=1,-(helper(30005),pos x-pos x),(helper(30000),pos x-pos x))<(40+const(size.ground.back))&&backedgebodydist<=0
x = 0

[state 12000]
type = VelAdd
trigger1 = AnimElem=3,>1
y = .6

;Attack Lv.3
[state 200]
type = Hitdef
trigger1 = AnimElem=3
damage = floor(ifelse((20+floor((root,var(43)-10000)/10000))*root,fvar(0)<1,1+(root,var(2)%5=4),(20+floor((root,var(43)-10000)/10000))*root,fvar(0))*1.22)
ground.slidetime = 14+(P2statetype=C)+(root,var(49)&&!root,var(2))*6
ground.hittime = 14+(P2statetype=C)+(root,var(49)&&!root,var(2))*6
guard.hittime = 12
priority = 9,Dodge
pausetime = 15,14
ground.velocity = -3*const(size.xscale),-22.0*const(size.yscale)
guard.velocity = -12.0*const(size.xscale)
ground.cornerpush.veloff = 0
air.velocity = ifelse(root,var(1)%8>=4||root,var(1)%2>=1,-11.0-.0013,-3*(1.0+ifelse(root,var(3)>31,31,root,var(3))*.04)*const(size.xscale)),ifelse(root,var(6)%10>0,2,(-22.0*(51-root,var(3))*1.0/51)*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(root,var(6)%10>0||root,var(28)>0,0,1)
fall.recovertime = ifelse(root,var(49)&&!root,var(2),50+12,36-ifelse(floor(root,var(14)/75)>7,7,floor(root,var(14)/75))+12)
hitsound = s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,2)
guardsound = s7000,2
getpower = 0,0
givepower =  0,0
fall = 1
air.fall = 1
kill = 0
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-60*const(size.xscale))
animtype = up
ground.type = High
attr = A,NA
hitflag = MAFD
guardflag = MA
persistent=0

[state -1]
type = targetstate
trigger1 = (root,var(1)%2>=1||root,var(1)%8>=4)&&numtarget
trigger1 = movehit=1 && target,time=0
value = 926+(root,var(1)%8>=4)*10
ignorehitpause=1

;援軍ヒット判別
[state 12000]
type = ParentVarSet
trigger1 = movecontact=1
var(15) = ifelse((root,stateno=[1000,1999]),36,28)*ifelse(moveguarded||!numtarget,-1,1)
persistent=0
ignorehitpause=1

;ヒット数補正増加
[state 12000]
type = ParentVarAdd
trigger1 = movehit=1&&numtarget
var(2) = 1
persistent=0
ignorehitpause=1

;空中ヒット数補正増加
[state 12000]
type = ParentVarAdd
trigger1 = movehit=1&&numtarget
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&&hitpausetime=14
fvar(15) = .00005*floor(ifelse((20+floor((root,var(43)-10000)/10000))*root,fvar(14)<1,1+(root,var(2)%5=1),(20+floor((root,var(43)-10000)/10000))*root,fvar(14))*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 13500]
type = parentvaradd
trigger1 = movehit=1&&hitpausetime=14
fvar(15) = .07
ignorehitpause=1

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

;X座標
[state 240]
type = VarSet
trigger1 = AnimElem=3,>=0&&AnimElem=4,<0
var(17) = floor(P2dist X)+ifelse((P2dist X=[1,60]),10,-10)

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

;ヒットスパーク
[state 1000]
type = Helper
trigger1 = movecontact=1&&hitpausetime=12
id = 7000
stateno=7000+(movehit)*100
pos = var(17),var(18)
postype = p1
ignorehitpause=1
pausemovetime=99999
supermovetime=99999
size.xscale = .5
size.yscale = .5

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

[state 10500]
type = NotHitBy
trigger1 = AnimElemTime(3)>=0
value = ,AT
ignorehitpause=1

[state 10500]
type = HitOverride
trigger1 = 1
time = 1
attr = SCA,AA,AP
stateno=15000
slot = 0
ignorehitpause=1

[state 19000]
type = ChangeState
trigger1 = root,var(40)=3&&IsHelper(11000)&&Root,NumHelper(11010)
value = 15000

[state 50]
type = PlaySND
trigger1 = AnimElem=8,=1
value = 41,0

[state 19000]
type = PlaySND
trigger1 = Vel Y>0 && Pos Y>=-Vel Y
value = 52,0

[state 19000]
type = StopSND
trigger1 = Vel Y>0 && Pos Y>=-Vel Y
channel = 10

[state 19000]
type = ChangeAnim
trigger1 = Vel Y>0 && Pos Y>=-Vel Y
value = 12547

[state 19000]
type = StatetypeSet
trigger1 = Vel Y>0 && Pos Y>=-Vel Y
statetype=S
physics = S

[state 19000]
type = PosSet
trigger1 = Vel Y>0 && Pos Y>=-Vel Y
y = 0

[state 19000]
type = VelSet
trigger1 = Vel Y>0 && Pos Y>=-Vel Y
x = 0
y = 0

[state 11455]
type = parentvarset
trigger1 = movehit=1&&!numtarget
fvar(25) = uniqhitcount-hitcount+1

[state 1000]
type = parentvaradd
trigger1 = var(25)
var(25) = var(25)
ignorehitpause=1

[state 1000]
type = varset
trigger1 = var(25)
var(25) = 0
ignorehitpause=1

;ガードクラッシュ減少値判別
[State 100, Helper]
type = Helper
triggerall = !enemynear,numpartner && !numhelper(15904)&&IsHelper
trigger1 = time=1
id = 15904
stateno=15904
pos = 0,0
postype = p2
ownpal = 1
ignorehitpause = 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+4
stateno=15905
pos = 0,0
postype = p2
ownpal = 1
ignorehitpause = 1

[state 19000]
type = ChangeState
trigger1 = Anim=12547&&AnimTime=0
value = 10500

;援軍ダメージ
[statedef 15000]
type = S
movetype=H
physics = S
sprpriority = -4
velset = 0,0

[state 10000]
type = parentvarset
trigger1 = !time&&root,var(40)!=4
var(40) = 3

[state 10000]
type = parentvaradd
trigger1 = !time&&!(IsHelper(11000)&&Root,NumHelper(11010))
var(42) = -floor(22.5*ifelse(gethitvar(hittime)>=14,3,2))

[state 13000]
type = varadd
trigger1 = !time&&IsHelper(11000)
var(10) = 1

;あっ！、あぁっ！
[state 10000]
type = PlaySND
trigger1 = !time&&!(IsHelper(11000)&&Root,NumHelper(11010))
value = 20,2+(hitfall||pos Y<0)
chanel = 2

;くっ、なんとこと！
[state 10000]
type = PlaySND
trigger1 = !time&&!(IsHelper(11000)&&Root,NumHelper(11010))&&(prevstateno=[13500,13600])
value = 20,4
chanel = 2

[state 12000]
type = AssertSpecial
trigger1 = IsHelper(11000)&&Root,NumHelper(11010)
flag = invisible

[state 12000]
type = NotHitBy
trigger1 = IsHelper(11000)&&Root,NumHelper(11010)
value = SCA

[state 10000]
type = parentvarset
trigger1 = IsHelper(11010)
fvar(22) = floor(pos X)

[state 10000]
type = parentvarset
trigger1 = IsHelper(11010)
fvar(23) = floor(pos y)

[state 12000]
type = PlayerPush
trigger1 = 1
value = 1

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

[State 900, 4]
type = ScreenBound
trigger1 = numhelper(30000)
trigger1 = ifelse(facing=1,helper(30000),pos x-pos x,-(helper(30005),pos x-pos x))<(40+const(size.ground.front))&&frontedgebodydist<=0
trigger2 = numhelper(30000)
trigger2 = ifelse(facing=1,-(helper(30005),pos x-pos x),(helper(30000),pos x-pos x))<(40+const(size.ground.back))&&backedgebodydist<=0
value = 1
movecamera = 0,0

[state 10000]
type = varset
trigger1 = !time
var(7) = GetHitVar(hittime)

[state 10000]
type = posset
trigger1 = IsHelper(11000) && Root,NumHelper(11010)
x = root,fvar(23)

[state 10000]
type = posset
trigger1 = IsHelper(11000) && Root,NumHelper(11010)
y = root,fvar(23)

[state 15000]
type = VarSet
trigger1 = !Hitshakeover&&IsHelper(11010)
var(6) = ifelse(hitfall||pos Y<0||root,var(42)<=0,15030,15000+(gethitvar(hittime)>=14)*10)

[state 15000]
type = ChangeAnim
trigger1 = !Hitshakeover
value = ifelse(hitfall||pos Y<0||root,var(42)<=0,15030,15000+(gethitvar(hittime)>=14)*10)

[state 15000]
type = ChangeAnim
trigger1 = IsHelper(11000)&&Root,NumHelper(11010)
value = var(6)

[state 10500]
type = NotHitBy
trigger1 = !(IsHelper(11000)&&Root,NumHelper(11000))
value = ,AT
ignorehitpause=1

[state 10500]
type = HitOverride
trigger1 = 1
time = 1
attr = SCA,AA,AP
stateno=15000
slot = 0

[state 19000]
type = DestroySelf
trigger1 = IsHelper(11000)&&Root,NumHelper(11010)
trigger1 = Helper(11010),var(6)=15030

[state 19000]
type = ChangeState
trigger1 = IsHelper(11000)&&Root,NumHelper(11010)&&time
trigger1 = Helper(11010),time>=(Helper(11010),var(7)-1)
value = 10500+(root,var(40)=4)*4531

[state 19000]
type = ChangeState
trigger1 = HitShakeOver&&!(IsHelper(11000)&&Root,NumHelper(11010))
value = 15001+(HitFall||pos Y<0||root,var(42)<=0)*30

;援軍ダメージ
[statedef 15001]
type = S
movetype=H
physics = S
sprpriority = -4

[state 10000]
type = parentvarset
trigger1 = 1
var(40) = 3

[state 10000]
type = parentvarset
trigger1 = IsHelper(11010)
fvar(22) = floor(pos X)

[state 10000]
type = parentvarset
trigger1 = IsHelper(11010)
fvar(23) = floor(pos y)

[state 12000]
type = PlayerPush
trigger1 = 1
value = 1

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

[State 900, 4]
type = ScreenBound
trigger1 = numhelper(30000)
trigger1 = ifelse(facing=1,helper(30000),pos x-pos x,-(helper(30005),pos x-pos x))<(40+const(size.ground.front))&&frontedgebodydist<=0
trigger2 = numhelper(30000)
trigger2 = ifelse(facing=1,-(helper(30005),pos x-pos x),(helper(30000),pos x-pos x))<(40+const(size.ground.back))&&backedgebodydist<=0
value = 1
movecamera = 0,0

[state 15000]
type = HitVelSet
trigger1 = !time
x = 1

[State 5001, 3] ;Stop sliding back
type = VelMul
trigger1 = Time >= GetHitVar(slidetime)
x = .6

[State 5001, 4]
type = VelSet
trigger1 = HitOver
x = 0

[state 10500]
type = NotHitBy
trigger1 = 1
value = ,AT
ignorehitpause=1

[state 10500]
type = HitOverride
trigger1 = 1
time = 1
attr = SCA,AA,AP
stateno=15000
slot = 0

[state 19000]
type = ChangeState
trigger1 = HitOver
value = 10500

;援軍ダメージ
[statedef 15031]
type = A
movetype=H
physics = N
sprpriority = -4

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

[state 10000]
type = parentvarset
trigger1 = 1
var(40) = 4

[state 10000]
type = parentvarset
trigger1 = IsHelper(11010)||(IsHelper(11000)&&!Root,NumHelper(11010))
fvar(22) = floor(pos X)

[state 10000]
type = parentvarset
trigger1 = IsHelper(11010)||(IsHelper(11000)&&!Root,NumHelper(11010))
fvar(23) = floor(pos y)

[state 15000]
type = VelSet
trigger1 = !time
x = -12.0
y = -12.0

[State 5001, 3] ;Stop sliding back
type = VelAdd
trigger1 = 1
y = .5

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

[state 19000]
type = DestroySelf
trigger1 = Vel Y>0 && Pos Y>=-Vel Y

;援軍帰還
[statedef 16000]
movetype=I
physics = N
type = S
anim = 11000
sprpriority = -4

[state 190]
type = VarRandom
trigger1 = 1
v = 0
range = 0,999

[state 190]
type = PalFX
trigger1 = 1
;add = -56,-56,-56
mul = 224,224,224
time=1

[state 16000]
type = ChangeAnim
trigger1 = prevstateno=19000
trigger1 = time<ifelse(floor(ifelse(root,var(42)<=0,3.0,1.0)*75*(1.0+floor((100-floor(root,var(43)/1000))*1.0/50)))>600,600,floor(ifelse(root,var(42)<=0,3.0,1.0)*75*(1.0+floor((100-floor(root,var(43)/1000))*1.0/50))))
value = anim

[state 19000]
type = Turn
trigger1 = !Time
trigger1 = ((Pos X<Helper(18000),Pos X&&facing=-1)||(Pos X>Helper(18000),Pos X&&facing=1))

[state 19000]
type = VarSet
trigger1 = !Time&&prevstateno!=19000
var(40) = 0

[state 19000]
type = VarSet
trigger1 = !Time&&prevstateno=19000
var(40) = floor(225*(1.0+floor((100-floor(root,var(43)/1000))*1.0/25)))

[state 19000]
type = VarAdd
trigger1 = Time&&var(40)>0
var(40) = -1

[state 10000]
type = varadd
trigger1 = var(2)
var(2) = -1

[state 10000]
type = varadd
trigger1 = var(3)
var(3) = -1

[state 14000]
type = PosSet
trigger1 = !Time
y = -20

[state 16500]
type = NotHitBy
trigger1 = 1
value = SCA

[state 19000]
type = VelSet
trigger1 = AnimElem=2
x = 6.0

[state 19000]
type = VelSet
trigger1 = Vel X<.75&&AnimElemTime(2)>=0
x = 0

[state 19000]
type = VelMul
trigger1 = Vel X<6&&AnimElemTime(2)>=0
x = .9

[state 19000]
type = VelMul
triggerall = AnimElemTime(2)>=0
trigger1 = Pos X=[Helper(18000),Pos X-Vel X*4*facing-4,Helper(18000),Pos X-Vel X*4*facing+4]
x = .9
persistent=0

[state 19000]
type = PosSet
trigger1 = !Vel X&&AnimElemTime(2)>=0
x = Helper(18000),Pos X

[state 19000]
type = ChangeAnim
trigger1 = AnimElemTime(4)=0 && Vel X>=6
value = anim
elem = 2

[state 14000]
type = Turn
trigger1 = !AnimTime
trigger1 = (teamside=1&&facing=-1)||(teamside=2&&facing=1)

[state 14000]
type = ParentVarSet
trigger1 = AnimTime=0
var(40) = 10

[state 19000]
type = ChangeState
trigger1 = AnimTime=0
value = 10000

;援軍移動中
[statedef 17000]
type = S
sprpriority = -4
anim = 90000

[state 17000]
type = PosSet
trigger1 = !time
x = ifelse(teamside=1,floor(root,fvar(12))+60,-floor((root,fvar(12)-floor(root,fvar(12)))*10000)-60)
y = -20

[state 190]
type = VarRandom
trigger1 = 1
v = 0
range = 0,999

[state 10000]
type = varadd
trigger1 = var(2)
var(2) = -1

;上様…ただいま参ります
;濃はいつでも、上様のお側に…！
[state 17000]
type = PlaySND
trigger1 = time=120&&roundstate>=2
value = 20,12+var(0)%2
channel = 2
;2.733sec
;2.946sec

;さあ、蘭丸君、急ぐわよ！
[state 17000]
type = PlaySND
trigger1 = var(0)%6=0&&time%30=0&&time=[300,480]
value = 20,14
channel = 2
persistent=0

;援軍ゲージ最大値設定
[state 17000]
type = ParentVarSet
trigger1 = !time&&root,var(40)>=-10
var(41) = 71+floor((floor(root,var(43)/1000)-1)*1.0/.77)+(root,var(43)=100)

[state 17000]
type = ParentVarSet
trigger1 = !time&&(root,var(40)=[0,-10])
var(42) = 0

[state 17000]
type = ParentVarSet
trigger1 = !time&&root,var(40)>=-10&&root,var(40)<=0
var(40) = -10

[state 19000]
type = ChangeState
trigger1 = root,var(40)<=-670||root,var(40)=1
value = 17500

;援軍到着モーション
[statedef 17500]
type = A
physics = N
anim = 17000
sprpriority = -4

[state 14000]
type = PosSet
trigger1 = !Time
y = -20

[state 190]
type = PalFX
trigger1 = 1
;add = -56,-56,-56
mul = 224,224,224
time=1

[state 17000]
type = PosSet
trigger1 = !time
x = ifelse(root,facing=-1,160,-160)
y = -240

[state 17000]
type = ParentVarAdd
trigger1 = prevstateno=17000&&root,var(42)<root,var(41)
var(42) = ifelse(root,var(42)<(root,var(41)-3),4,1)

[state 19000]
type = VarSet
trigger1 = !Time&&prevstateno!=19000
var(40) = 0

[state 19000]
type = VarSet
trigger1 = !Time&&prevstateno=19000
var(40) = floor(225*(1.0+floor((100-floor(root,var(43)/1000))*1.0/25)))

[state 19000]
type = VarAdd
trigger1 = Time&&var(40)>0
var(40) = -1

[state 19000]
type = ParentVarSet
trigger1 = !Time&&prevstateno=17000
var(40) = -900

[state 19000]
type = turn
trigger1 = !time&&facing!=root,facing

[state 19000]
type = PlaySND
trigger1 = Anim=17500
trigger1 = var(2) := floor(ifelse(floor(root,var(43)/1000)>=100,175,168)*(TicksPerSecond/60))
trigger1 = var(4) := var(4)+2
value = 20,ifelse(floor(root,var(43)/1000)>=100,1,0)
persistent=0
;2.913sec
;2.800sec

[state 19000]
type = VelSet
trigger1 = !time
x = 3.0
y = -5.0

[state 19000]
type = VelAdd
trigger1 = time
y = .4

[state 19000]
type = ChangeAnim
trigger1 = vel y>0&&Pos y>=(-Vel Y-20)
value = 17500
persistent=0

[State 40, 1]
type = PlaySND
trigger1 = Anim=17500
value = 52,0
persistent = 0

[State 40, 1]
type = Explod
trigger1 = Anim=17500
id = 6910
anim = 6910
pos = ceil(-6*const(size.xscale)),ceil(0*const(size.yscale))
postype = p1
ownpal = 1
sprpriority = 3
facing = -1
vel = -5*const(size.xscale),0
scale = const(size.xscale),const(size.yscale)
pausemovetime = 9999
supermovetime = 9999
persistent = 0

[State 40, 1]
type = Explod
trigger1 = Anim=17500
id = 6910
anim = 6910
pos = ceil(6*const(size.xscale)),ceil(0*const(size.yscale))
postype = p1
ownpal = 1
sprpriority = 3
facing = 1
vel = 5*const(size.xscale)
scale = const(size.xscale),const(size.yscale)
pausemovetime = 9999
supermovetime = 9999
persistent = 0

[state 19000]
type = StatetypeSet
trigger1 = Anim=17500
statetype=S

[state 19000]
type = VelSet
trigger1 = Anim=17500
x = 0
y = 0

[state 19000]
type = PosSet
trigger1 = Anim=17500
y = -20

[state 19000]
type = ParentVarSet
trigger1 = Anim=17500&&AnimTime=0&&(Pos X=[Helper(18000),Pos X-24,Helper(18000),Pos X+24])
var(40) = 10

[state 19000]
type = Turn
trigger1 = Anim=17500&&AnimTime=0&&(Pos X=[Helper(18000),Pos X-24,Helper(18000),Pos X+24])&&((facing=-1&&teamside=1)||(facing=1&&teamside=2))

[state 19000]
type = ChangeState
trigger1 = Anim=17500&&AnimTime=0
value = ifelse((Pos X=[Helper(18000),Pos X-24,Helper(18000),Pos X+24]),10000,16000)

;位置判別ヘルパー
[statedef 18000]
type = S
anim = 90000
sprpriority = -4

[state 18000]
type = PosAdd
trigger1 = Time=0&&numpartner&&ifelse(teamside=2,Pos X<60,Pos X>-60)
trigger1 = (root,ID-partner,ID)>0
x = ifelse(teamside=2,60,-60)

;援軍行動中（待機用ヘルパー隔離）
[statedef 19000]
type = S
anim = 90000

[state 190]
type = StopSND
trigger1 = !Time&&!((root,stateno=[180,182])&&Root,WinTime&&root,var(51)%2=0)
channel = 2

[state 10000]
type = varadd
trigger1 = var(2)
var(2) = -1

[state 10000]
type = varadd
trigger1 = var(3)
var(3) = -1

;手出し無用宣言可能か判別
[state 10000]
type = varset
trigger1 = !time
var(30) = 1

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

;お逝きなさい！
[state 19000]
type = PlaySND
triggerall = !var(2)&&!var(3)&&numhelper(11000)
triggerall = helper(11000),stateno=12000&&!helper(11000),movecontact
trigger1 = helper(11000),animelemTime(4)=0
trigger1 = var(3) := floor(155*(TicksPerSecond/60))
value = 20,5
channel = 2

;お逝きなさい！
[state 19000]
type = PlaySND
trigger1 = !var(2)&&!var(3)&&numhelper(11000)
trigger1 = (helper(11000),stateno=[12500,12600])&&helper(11000),anim=12500&&helper(11000),animelemTime(3)=0&&!helper(11000),movecontact
trigger1 = var(3) := floor(155*(TicksPerSecond/60))
value = 20,5
channel = 2

;さあ！行くわよ！
[state 19000]
type = PlaySND
trigger1 = !var(2)&&!var(3)&&numhelper(11000)
trigger1 = helper(11000),stateno=13000&&helper(11000),animelem=1,=12
trigger1 = var(3) := floor(63*(TicksPerSecond/60))
value = 20,7
channel = 2
;1.050sec

;濃姫様凄いです
[state 12000]
type = PlaySND
trigger1 = !var(2)&&!var(3)&&numHelper(11000)
trigger1 = helper(11000),stateno=13500&&helper(11000),movehit=1&&helper(11000),hitpausetime=12
trigger1 = var(3) := floor(113*(TicksPerSecond/60))
value = 25,2
channel = 3
;1.873sec

;~~~援軍ファーストヒット用
[state 19000]
type = PlaySND
trigger1 = !var(2)&&root,var(11)=2&&random%2=0&&roundstate=2
trigger1 = enemynear,name="Date Masamune"||enemynear,name="Masamune"
trigger1 = var(2) := floor(251*(TicksPerSecond/60))
value = 20,16
channel = 2
;4.178sec

[state 19000]
type = PlaySND
trigger1 = !var(2)&&root,var(11)=2&&random%2=0&&roundstate=2
trigger1 = enemynear,name="Sanada yukimura"||enemynear,name="Yukimura"
trigger1 = var(2) := floor(202*(TicksPerSecond/60))
value = 20,17
channel = 2
;3.355sec

[state 19000]
type = PlaySND
trigger1 = !var(2)&&root,var(11)=2&&random%2=0&&roundstate=2
trigger1 = enemynear,name="Maeda Keiji"||enemynear,name="Keiji"
trigger1 = var(2) := floor(209*(TicksPerSecond/60))
value = 20,18
channel = 2
;3.467sec

[state 19000]
type = PlaySND
trigger1 = !var(2)&&root,var(11)=2&&random%2=0&&roundstate=2
trigger1 = enemynear,name="Chousokabe Motochika"||enemynear,name="Motochika"
trigger1 = var(2) := floor(188*(TicksPerSecond/60))
value = 20,19
channel = 2
;3.120sec

[state 19000]
type = PlaySND
trigger1 = !var(2)&&root,var(11)=2&&random%2=0&&roundstate=2
trigger1 = enemynear,name="Mouri Motonari"||enemynear,name="Motonari"
trigger1 = var(2) := floor(205*(TicksPerSecond/60))
value = 20,20
channel = 2
;3.407sec

[state 19000]
type = PlaySND
trigger1 = !var(2)&&root,var(11)=2&&random%2=0&&roundstate=2
trigger1 = enemynear,name="Toyotomi Hideyoshi"||enemynear,name="Hideyoshi"
trigger1 = var(2) := floor(172*(TicksPerSecond/60))
value = 20,21
channel = 2
;2.858sec

[state 19000]
type = PlaySND
trigger1 = !var(2)&&root,var(11)=2&&random%2=0&&roundstate=2
trigger1 = enemynear,name="Uesugi Kenshin"||enemynear,name="Kenshin"
trigger1 = var(2) := floor(299*(TicksPerSecond/60))
value = 20,22
channel = 2
;4.978sec

[state 19000]
type = PlaySND
trigger1 = !var(2)&&root,var(11)=2&&random%2=0&&roundstate=2
trigger1 = enemynear,name="Oichi"
trigger1 = var(2) := floor(167*(TicksPerSecond/60))
value = 20,23
channel = 2
;2.773sec

[state 19000]
type = PlaySND
trigger1 = !var(2)&&root,var(11)=2&&random%2=0&&roundstate=2
trigger1 = enemynear,name="Honda Tadakatsu"||enemynear,name="Tadakatsu"
trigger1 = var(2) := floor(225*(TicksPerSecond/60))
value = 20,24
channel = 2
;3.742sec

[state 19000]
type = PlaySND
trigger1 = !var(2)&&root,var(11)=2&&random%2=0&&roundstate=2
trigger1 = enemynear,name="Katakura Kojuro"||enemynear,name="Kojuro"
trigger1 = var(2) := floor(204*(TicksPerSecond/60))
value = 20,25
channel = 2
;3.392sec

[state 19000]
type = PlaySND
trigger1 = !var(2)&&root,var(11)=2&&random%2=0&&roundstate=2
trigger1 = enemynear,name="Takenaka Hambe"||enemynear,name="Hambe"
trigger1 = var(2) := floor(246*(TicksPerSecond/60))
value = 20,25
channel = 2
;4.089sec

;蘭丸のセリフ（原作だと濃姫のボイスが消されるが変更）
[state 19000]
type = PlaySND
trigger1 = !var(2)&&root,var(11)=2&&roundstate=2
trigger1 = 1;var(2) := floor(225*(TicksPerSecond/60))
value = 25,8
channel = 3;2
;3.738sec

[state 19000]
type = VarSet
trigger1 = !Time
trigger2 = root,var(40)=-1||root,var(40)=3
var(7) = 0

[state 19000]
type = VarSet
trigger1 = Time&&(root,NumHelper(11000)||root,NumHelper(11010))
trigger1 = root,var(40)=4
var(7) = 1

[state 19000]
type = PosSet
trigger1 = Time&&var(7)
x = ifelse(teamside=2,floor(root,fvar(12))+240,-floor((root,fvar(12)-floor(root,fvar(12)))*10000)-240)

[state 19000]
type = ChangeState
trigger1 = Time&&!Root,NumHelper(11000)&&!Root,NumHelper(11010) && var(7)
value = 16000

[state 19000]
type = ChangeState
trigger1 = Time&&root,var(40)>0 && !Root,NumHelper(11000) && !Root,NumHelper(11010)
value = 10000

;援軍要請前
[statedef 19900]
type = S
anim = 90000

[state 190]
type = PosSet
trigger1 = Time=0&&IsHelper(10000)&&(prevstateno!=[10000,19999])
x = ifelse(teamside=2,60,-60)
y = -20

;目印（ヘルパーにしないと影の表示が正常にできないため）
[state 190]
type = Helper
trigger1 = !Time&&IsHelper(10000)&&!NumHelper(18000)
id = 18000
stateno = 18000
pos = 0,0
postype = P1
sprpriority = -4
shadowoffset = -16
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[state 17000]
type = ParentVarSet
trigger1 = 1
var(41) = 71+floor((floor(root,var(43)/1000)-1)*1.0/.77)+(root,var(43)=100)

[state 19000]
type = ChangeState
trigger1 = root,var(40)<=-10||root,var(40)=1
value = 17000

;~~~蘭丸~~~~

;援軍待機
[statedef 20000]
type = S
ctrl = 0
velset = 0,0
anim = 20000
sprpriority = -4

[state 10000]
type = DestroySelf
trigger1 = root,var(40)=0&&time

[state 190]
type = PosSet
trigger1 = Time=0&&IsHelper(20000)&&(prevstateno!=[20000,29999])
x = ifelse(teamside=2,100,-100)
y = -20

[state 190]
type = PosSet
trigger1 = Time=ifelse(roundstate<2,1,0)&&IsHelper(20000)&&(prevstateno!=[20000,29999])&&numpartner
trigger1 = (root,ID-partner,ID)>0
x = ifelse(teamside=2,180,-180)
y = -20

[state 190]
type = PosSet
trigger1 = Time=0&&IsHelper(20000)&&NumHelper(18000)&&(prevstateno=[20000,29999])
x = Helper(18000),Pos X+ifelse(teamside=2,40,-40)
y = -20

[state 190]
type = PalFX
trigger1 = 1
;add = -56,-56,-56
mul = 224,224,224
time=1

[state 190]
type = VarRandom
trigger1 = 1
v = 0
range = 0,999

[state 190]
type = VarAdd
trigger1 = Roundstate>=2
var(1) = 1

[state 190]
type = VarSet
trigger1 = var(1)>2400
var(1) = 0

[state 10000]
type = varadd
trigger1 = var(2)
var(2) = -1

[state 10000]
type = varadd
trigger1 = var(3)
var(3) = -1

[state 190]
type = VarAdd
trigger1 = Roundstate>=2
var(6) = 1

;援軍アタック・勝利時
[state 10000]
type = ChangeState
triggerall = IsHelper(20000)&&Time
trigger1 = (root,stateno=[180,182])&&root,time>=1
value = 20180

[state 10000]
type = ChangeState
triggerall = IsHelper(20000)&&Time
trigger1 = numhelper(11000)
trigger1 = helper(11000),stateno=13000&&helper(11000),animelem=8
value = 29000

;援軍勝利
[statedef 20180]
type = S
physics = S
movetype=I
anim = 20180
velset = 0,0
sprpriority = -1

[state 190]
type = PalFX
trigger1 = IsHelper(20000)
;add = -56,-56,-56
mul = 224,224,224
time=1

[state 10180]
type = SprPriority
trigger1 = IsHelper(21000)
value = 1

[state 10180]
type = SprPriority
trigger1 = IsHelper(20000)
value = -4

;援軍アシストLV100（飛び道具）
[Statedef 23000]
type = A
movetype = A
physics = N
ctrl = 0
velset = 2,-12
sprpriority = 1
anim = 23000

[state 23000]
type = ChangeAnim
trigger1 = !time
value = 23000
elem = 2

[state 23000]
type = VarSet
trigger1 = ScreenPos Y<=-20&&Pos Y<=-240
var(10) = 1

[state 23000]
type = AssertSpecial
trigger1 = var(10)=1
flag = invisible

[state 23000]
type = VelAdd
trigger1 = Anim=23000 && AnimElem=2,>0
y = .4

[state 23000]
type = ChangeAnim
trigger1 = Vel Y>0 && Pos Y>=-Vel Y
value = 23052

[state 23000]
type = VelSet
trigger1 = Anim=23052
x = 0
y = 0
persistent=0

[state 23000]
type = PosSet
trigger1 = Anim=23052
y = 0
persistent=0

[state 23000]
type = StatetypeSet
trigger1 = Anim=23052
statetype = S
physics = S

;Attack Lv.5
[state 200]
type = Hitdef
trigger1 = !movecontact&&!movereversed
trigger1 = AnimElem=2,>=0&&AnimElem=3,<0
damage = ceil(floor(271*ifelse(root,fvar(1)<.25,.25*root,fvar(2)*root,fvar(3)*root,fvar(4),root,fvar(0)))*1.22),ceil(floor(271*1.0/4)*1.22)
ground.slidetime = 20+(P2statetype=C)+(root,var(49)&&!root,var(2))*7
ground.hittime = 20+(P2statetype=C)+(root,var(49)&&!root,var(2))*7
guard.hittime = 18
pausetime = 1,14
ground.velocity = -4.0*const(size.xscale),ifelse(root,var(6)%10>0,2,(-16.0-.9)*const(size.yscale))
guard.velocity = -15.0*const(size.xscale)
ground.cornerpush.veloff = 0
air.velocity = -4*(1.0+ifelse(root,var(3)>31,31,root,var(3))*.04)*const(size.xscale),ifelse(root,var(6)%10>0,2,(-16.0*(51-root,var(3))*1.0/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(root,var(6)%10>0||root,var(28)>0,0,0)
hitsound = s7100,ifelse(!(enemynear,teammode=simul)&&enemynear,name="Honda Tadakatsu",999,2)
guardsound = s7000,2
getpower = 0,0
givepower = 0,0
air.fall = 1
sparkno = -1;0
guard.sparkno = -1;40
sparkxy = ifelse(P2bodydist X<20,-20,-10),floor(-60*const(size.xscale))
animtype = High
ground.type = High
attr = S,HP
hitflag = MAFD
guardflag = MA
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,60]),10,-10)

;Y座標
[state 240]
type = VarSet
trigger1 = 1
var(18) = floor(-24*const(size.yscale))

;ヒットスパーク
[state 1000]
type = Helper
trigger1 = movecontact=1
id = 7000
stateno=7000+(movehit)*100
pos = var(17),var(18)
postype = p1
ignorehitpause=1
pausemovetime=99999
supermovetime=99999
size.xscale = .5
size.yscale = .5

[state 6830]
type = DestroySelf
trigger1 = AnimTime=0&&Anim%100=52

;援軍帰還
[statedef 26000]
movetype=I
physics = N
type = S
anim = 21000
sprpriority = -4

[state 190]
type = VarRandom
trigger1 = 1
v = 0
range = 0,999

[state 190]
type = PalFX
trigger1 = 1
;add = -56,-56,-56
mul = 224,224,224
time=1

[state 19000]
type = Turn
trigger1 = !Time
trigger1 = ((Pos X<Helper(18000),Pos X&&facing=-1)||(Pos X>Helper(18000),Pos X&&facing=1))

[state 16000]
type = ChangeAnim
trigger1 = var(40)!=0
value = anim

[state 19000]
type = VarSet
trigger1 = !Time
var(40) = 390

[state 19000]
type = VarAdd
trigger1 = Time&&var(40)>0
var(40) = -1

[state 10000]
type = varadd
trigger1 = var(2)
var(2) = -1

[state 10000]
type = varadd
trigger1 = var(3)
var(3) = -1

[state 14000]
type = PosSet
trigger1 = !Time
y = -20

[state 16500]
type = NotHitBy
trigger1 = 1
value = SCA

[state 19000]
type = VelSet
trigger1 = AnimElem=2
x = 6.0

[state 19000]
type = VelSet
trigger1 = Vel X<.75&&AnimElemTime(2)>=0
x = 0

[state 19000]
type = VelMul
trigger1 = Vel X<6&&AnimElemTime(2)>=0
x = .9

[state 19000]
type = VelMul
triggerall = AnimElemTime(2)>=0
trigger1 = Pos X=[Helper(18000),Pos X-100*ifelse(teamside=2,-1,1)-Vel X*4*facing-4,Helper(18000),Pos X-100*ifelse(teamside=2,-1,1)-Vel X*4*facing+4]
x = .9
persistent=0

[state 19000]
type = PosSet
trigger1 = !Vel X&&AnimElemTime(2)>=0
x = Helper(18000),Pos X-100*ifelse(teamside=2,-1,1)

[state 19000]
type = ChangeAnim
trigger1 = AnimElemTime(4)=0 && Vel X>=6
value = anim
elem = 2

[state 14000]
type = Turn
trigger1 = !AnimTime
trigger1 = (teamside=1&&facing=-1)||(teamside=2&&facing=1)

[state 19000]
type = ChangeState
trigger1 = AnimTime=0
value = 20000

;援軍移動中
[statedef 27000]
type = S
sprpriority = -4
anim = 90000

[state 19000]
type = ChangeState
trigger1 = root,var(40)<=-670||root,var(40)=1
value = 27500

;援軍到着モーション
[statedef 27500]
type = S
physics = N
anim = 21000
sprpriority = -4

[state 14000]
type = PosSet
trigger1 = !Time
y = -20

[state 190]
type = PalFX
trigger1 = 1
;add = -56,-56,-56
mul = 224,224,224
time=1

[state 17000]
type = PosSet
trigger1 = !time
x = ifelse(root,facing=-1,160,-160)

[state 19000]
type = turn
trigger1 = !time&&facing!=root,facing

[state 19000]
type = Turn
trigger1 = !Time
trigger1 = ((Pos X<Helper(18000),Pos X&&facing=-1)||(Pos X>Helper(18000),Pos X&&facing=1))

[state 19000]
type = VelSet
trigger1 = !time
x = 3.0

[state 19000]
type = ChangeAnim
trigger1 = (Pos X=[Helper(18000),Pos X-84,Helper(18000),Pos X-44])&&teamside=1
trigger2 = (Pos X=[Helper(18000),Pos X+44,Helper(18000),Pos X+84])&&teamside=2
value = 21500
persistent=0

[State 40, 1]
type = Explod
trigger1 = Anim=21500
id = 6910
anim = 6910
pos = ceil(-6*const(size.xscale)),ceil(0*const(size.yscale))
postype = p1
ownpal = 1
sprpriority = 3
facing = -1
vel = -5*const(size.xscale),0
scale = const(size.xscale),const(size.yscale)
pausemovetime = 9999
supermovetime = 9999
persistent = 0

[State 40, 1]
type = Explod
trigger1 = Anim=21500
id = 6910
anim = 6910
pos = ceil(6*const(size.xscale)),ceil(0*const(size.yscale))
postype = p1
ownpal = 1
sprpriority = 3
facing = 1
vel = 5*const(size.xscale)
scale = const(size.xscale),const(size.yscale)
pausemovetime = 9999
supermovetime = 9999
persistent = 0

[state 19000]
type = StatetypeSet
trigger1 = Anim=21500
statetype=S

[state 19000]
type = ChangeState
trigger1 = Anim=21500&&AnimTime=0
value = 20000;ifelse((Pos X=[Helper(18000),Pos X-64,Helper(18000),Pos X+64]),20000,21700)

;援軍行動中（待機用ヘルパー隔離）
[statedef 29000]
type = S
anim = 90000

[state 190]
type = StopSND
trigger1 = !Time&&!((root,stateno=[180,182])&&Root,WinTime&&root,var(51)%2=0)
channel = 2

[state 19000]
type = VarSet
trigger1 = !Time
var(7) = 0

[state 19000]
type = VarSet
trigger1 = Time
var(7) = 1

[state 19000]
type = PosSet
trigger1 = Time&&var(7)
x = ifelse(teamside=2,floor(root,fvar(12))+240,-floor((root,fvar(12)-floor(root,fvar(12)))*10000)-240)
persistent=0

[state 19000]
type = ChangeState
trigger1 = Time&&!Root,NumHelper(21000)&&!Root,NumHelper(21010) && var(7)
value = 26000

[state 19000]
type = ChangeState
trigger1 = Time&&root,var(40)>0 && !Root,NumHelper(21000) && !Root,NumHelper(21010)
value = 20000

;援軍要請前
[statedef 29900]
type = S
anim = 90000

[state 190]
type = PosSet
trigger1 = Time=0&&IsHelper(20000)&&(prevstateno!=[10000,19999])
x = ifelse(teamside=2,100,-100)
y = -20

[state 19000]
type = ChangeState
trigger1 = root,var(40)<=-10||root,var(40)=1
value = 27000





























































































;---------------------------------------------------------------------------
; RUN_FWD
[Statedef 20100]
type    = S
physics = N
velset = 0,0
anim = 20100
sprpriority = 1
ctrl = 0
movehitpersist=1

[State 170, 1]
type =HitBy
trigger1 = 1
time=-1
value =
[state 180]
type = posset
trigger1 = !time
y = 0
[state t]
type = Turn
trigger1 = !time&&P2dist X<0

[State 100, 1]
type = VelSet
trigger1 = AnimElem=1
x = 2.75

[State 100, 1]
type = VelAdd
trigger1 = AnimElem=2,>0&&time<40
x = .17

[state 190]
type = Explod
trigger1 = AnimElem=3,=1
trigger2 = AnimElem=6,=1
trigger3 = AnimElem=9,=1
id = 6915
anim = 6915
pos = floor(-40*const(size.xscale)),0
postype = P1
ownpal = 1
sprpriority = 3
bindtime=1
scale = const(size.xscale),const(size.yscale)

;現在の速度取得
[state 40]
type = varset
trigger1 = !time
fvar(9) = 2.75
[state 40]
type = varadd
trigger1 = AnimElem=2,>0&&time<48
fvar(9) = .18

[State 100, 4]
type = ChangeState
trigger1 = AnimElemTime(2)>=0
trigger1 = P2bodydist X=[-15,40]
value = 20101

[State 9001, 5]
type = destroyself
trigger1 = frontEdgeDist<-200

;---------------------------------------------------------------------------
; RUN_FWD STOP
[Statedef 20101]
type    = S
physics = S
anim = 20101
ctrl = 0
sprpriority = 1
velset = fvar(9),0

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

;---------------------------------------------------------------------------
; RUN_BACK
[Statedef 20105]
type    = S
physics = N
velset = 0,0
ctrl = 0
anim = 20105
sprpriority = 1

[State 40, 1]
type = PlaySND
trigger1 = AnimElem=1
value = 7300,0
[state 190]
type = PlaySND
trigger1 = AnimElem=1&&random%2=0
value = 20010,36+random%2
channel = 1

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

[State 9001, 5]
type = destroyself
trigger1 = backEdgeDist<-200

;勝利ポーズ2
[statedef 20182]
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!=20182
value = 20182

[State 170, 1]
type =posset
trigger1 = 1
y = 0

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

;至れ死の淵
[statedef 23500]
type = S
movetype=A
physics = S
ctrl = 0
velset = 0,0
anim = 23500

[state 200]
type = pause
trigger1 = Anim=23500&&AnimElem=3,=1
time = 60
movetime = 60

[state 200]
type = helper
trigger1 = Anim=23500&&AnimElem=4
id = 27580
stateno = 27580
pos = 0,0
postype = P1
pausemovetime=68+999

[state 190]
type = PlayerPush
trigger1 = 1
value = 0

[state 190]
type = PlaySND
trigger1 = Anim=23500&&AnimElem=4
value = 20010,48
channel = 1

[state 190]
type = PlaySND
trigger1 = Anim=23500&&AnimElem=14
value = 20030,10
channel = 10
volume = 192

[state 3510]
type = StatetypeSet
trigger1 = Anim=23500&&AnimElem=15
physics = N

[state 3510]
type = ScreenBound
trigger1 = Anim=23500&&AnimElem=15,>=0&&AnimElem=16,<0
value = 1

[state 3510]
type = PosAdd
trigger1 = Anim=23500&&AnimElem=15
x = floor(90*const(size.xscale)*1.25)+ifelse(frontedgebodydist<floor(230*const(size.xscale)*1.25),frontedgebodydist-floor(230*const(size.xscale)*1.25),floor(40*const(size.xscale)))
y = -floor(200*const(size.yscale)*1.25)
persistent=0

[state 3510]
type = PosAdd
trigger1 = Anim=23500&&AnimElem=16
x = floor(40*const(size.xscale)*1.25)
y = -floor(40*const(size.yscale)*1.25)
persistent=0

[state 3510]
type = PosAdd
trigger1 = Anim=23500&&AnimElem=17
x = floor(100*const(size.xscale)*1.25)
y = floor(100*const(size.yscale)*1.25)
persistent=0

[state 3510]
type = StatetypeSet
trigger1 = Anim=23500&&AnimElem=18
statetype=S
physics = S
persistent=0

[state 3510]
type = PosSet
trigger1 = Anim=23500&&AnimElem=18
y = 0
persistent=0

[state 3510]
type = VelSet
trigger1 = Anim=23500&&AnimElem=18
x = 0
y = 0
persistent=0

[state 3510]
type = ChangeAnim
trigger1 = Anim=23500&&AnimTime=0&&Roundstate<3
value = 23550

;~~魔の手
[state 1400]
type = Explod
trigger1 = Anim=23500&&AnimElem=1
id = 6580
anim=26580
pos = floor(40*const(size.xscale)),floor(80*const(size.xscale))
postype = p1
ignorehitpause=1
ownpal = 1
scale = const(size.xscale)*1.25,const(size.yscale)*1.25
removeongethit=1
bindtime=-1
persistent=0
pausemovetime=74
[state 1400]
type = Explod
trigger1 = Anim=23500&&AnimElem=1
id = 6580
anim=26580
pos = floor(40*const(size.xscale))+1,floor(80*const(size.xscale))
postype = p1
ignorehitpause=1
ownpal = 1
facing=-1
scale = const(size.xscale)*1.25,const(size.yscale)*1.25
removeongethit=1
bindtime=-1
persistent=0
pausemovetime=74
[state 1400]
type = Helper
trigger1 = Anim=23500&&AnimElem=14
id = 26590
stateno=26590
pos = floor(40*const(size.xscale)),floor(80*const(size.xscale))
postype = p1
ignorehitpause=1
ownpal = 1
size.xscale = const(size.xscale)*1.25
size.yscale = const(size.yscale)*1.25
persistent=0
;~~

;~~~自分側のhitpause作成~~
[state 250]
type = varset
trigger1 = var(7)<=1&&var(52)<=0
var(52) = 100
[state 250]
type = varadd
trigger1 = var(52)>=0&&var(52)<100
var(52) = -1

;LV.4
[state 250]
type = varset
trigger1 = numhelper(26590)
trigger1 = helper(26590),movecontact=2
var(19) = 25-1
;LV.4
[state 250]
type = varset
trigger1 = numhelper(26590)
trigger1 = helper(26590),movecontact=2
var(52) = 25-1
[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 -2]
type = PosFreeze
trigger1 = (AnimElem=3,=1)
trigger2 = NumHelper(27580)
trigger2 = helper(27580),time<30
value = 1

;~~~~一撃BASARA技成功後
[state 195]
type = VarSet
trigger1 = numhelper(26590)
trigger1 = helper(26590),Movecontact
;trigger1 = helper(26590),animelemtime(9)>=0
var(45) = 10000
[state 801]
type = AssertSpecial
trigger1 = var(45) = 10000
flag = NoMusic
flag2 = TimerFreeze
[state 801]
type = PlaySND
trigger1 = var(45) = 10000
value = 7900,0
loop = 1
channel = 30
lowpriority = 1
persistent=0

;ヒット後の演出へ
[state 3500]
type = Pause
triggerall = roundstate=2
trigger1 = var(45) = 10000
time = 0
movetime=0
;ヒット後の演出へ
[state 3500]
type = ChangeState
triggerall = roundstate>2
trigger1 = Anim=23500&&AnimTime=0
value = 20182

[state 195]
type = ChangeAnim
trigger1 = Anim=23500 && AnimElemTime(16)>0 && NumHelper(26590)
trigger1 = Helper(26590),var(5)=1&&Helper(26590),time<420&&Helper(26590),stateno=26592
value = 23500
elem = 16
[state 195]
type = ChangeAnim
trigger1 = Anim=23500 && AnimElemTime(16)>=0 && NumHelper(26590)
trigger1 = Helper(26590),var(5)=1&&(Helper(26590),time=[420,466])&&Helper(26590),stateno=26592
value = 23500
elem = 18
[state 195]
type = PosSet
trigger1 = Anim=23500 && AnimElemTime(18)>0 && NumHelper(26590)
trigger1 = Helper(26590),stateno=26592&&Helper(26590),time>=466
x = floor(Helper(26590),pos x)
persistent=0
[state 195]
type = PosAdd
trigger1 = Anim=23500 && AnimElemTime(18)>0 && NumHelper(26590)
trigger1 = Helper(26590),stateno=26592&&Helper(26590),time>=466
x = floor(40*const(size.xscale))
persistent=0

;BASARA K.O.
[state 3510]
type = Helper
trigger1 = Anim=23500 && AnimElem=17,>=0 && numhelper(26590) && !numhelper(28850)
trigger1 = helper(26590),var(5)!=1||helper(26590),stateno=26592
id  = 8850
stateno=8850
pos = 0,0
postype = left
size.xscale = 1
size.yscale = 1
persistent=0
ignorehitpause=1
pausemovetime=999

[state 195]
type = ChangeAnim
trigger1 = Anim=23500 && AnimTime=0
value = 23550

[state 195]
type = ChangeState
trigger1 = Anim=23550 && AnimTime=0
value = 20105
ctrl = 1

;開け根の国（至れ死の淵）
[Statedef 26590]
type = S
movetype = A
physics = S
ctrl = 0
velset = 0,0
anim = 26590
sprpriority = 4

[state 6050]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[state 1400]
type = PlaySND
trigger1 = AnimElem=1
value = 20030,2
channel = 1
[state 1400]
type = PlaySND
trigger1 = AnimElem=10
value = 5100,1

[state 1400]
type = PosAdd
trigger1 = AnimElem=7
x = ifelse(root,frontedgebodydist<floor(230*root,const(size.xscale)*1.25),root,frontedgebodydist-floor(230*root,const(size.xscale)*1.25),0)
persistent = 0

[state 6500]
type = MoveHitReset
triggerall = movecontact!=1
trigger1 = AnimElem=1
trigger2 = AnimElem=9

[State 40, 1]
type = Helper
trigger1 = AnimElem=10
id = 26925
stateno = 6920
pos = floor(260*const(size.xscale)),0
postype = p1
ownpal = 1
pausemovetime = 9999
supermovetime = 9999

;ランダムオリジナル演出
[state 6500]
type = VarSet
trigger1 = !time
var(5) = random%3
[state 6500]
type = VarSet
trigger1 = !time&&var(5)=2
var(5) = 0

;ランダムオリジナル演出
[state 6500]
type = ParentVarSet
trigger1 = time&&movecontact&&var(5)=1&&AnimElem=9,>=0
var(45) = 10000
;ランダムオリジナル演出
[state 6500]
type = ChangeState
trigger1 = time&&movecontact&&var(5)=1&&AnimElem=9,>=0
value = 26592

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

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

;LV.4
[state 250]
type = varset
trigger1 = movecontact
var(52) = 25
persistent = 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 ]
type=assertspecial
trigger1=1
flag=unguardable
[state ]
type=null
trigger1=movecontact&&root,numprojid(6694)
trigger1=var(56):=1
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+352
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+352
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+376
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+376
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
trigger1=var(57):=ifelse(gametime%3=0,150,ifelse(gametime%2=0,5110,random*random*random*random))
params=(var(57)&255),0,root,const(data.sparkno)+3060
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)&65280)/256,0,root,const(data.sparkno)+3061
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&255),0,root,const(data.guard.sparkno)+3060
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&65280)/256,0,root,const(data.guard.sparkno)+3061
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+3580
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+3580
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=2,0,root,const(data.sparkno)+3588
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=2,0,root,const(data.guard.sparkno)+3588
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+3596
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+3596
text="%n"
[state ]
type=displaytoclipboard
trigger1=root,numprojid(3620)&&var(56)
params=root,const(data.sparkno)+3620
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&root,numprojid(3620)&&var(56)
params=root,const(data.guard.sparkno)+3620
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=255,0,root,const(data.sparkno)+4092
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=255,0,root,const(data.sparkno)+4093
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=255,0,root,const(data.guard.sparkno)+4092
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=255,0,root,const(data.guard.sparkno)+4093
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=255,0,root,const(data.sparkno)+4096
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=255,0,root,const(data.sparkno)+4097
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=255,0,root,const(data.guard.sparkno)+4096
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=255,0,root,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,root,const(data.sparkno)+4136
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)&65280)/256,0,root,const(data.sparkno)+4137
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)&16711680)/65536,0,root,const(data.sparkno)+4138
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)<0)*128+(var(57)&2130706432)/16777216,0,root,const(data.sparkno)+4139
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&255),0,root,const(data.guard.sparkno)+4136
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&65280)/256,0,root,const(data.guard.sparkno)+4137
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&16711680)/65536,0,root,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,root,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,root,const(data.sparkno)+4212
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)&65280)/256,0,root,const(data.sparkno)+4213
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)&16711680)/65536,0,root,const(data.sparkno)+4214
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)<0)*128+(var(57)&2130706432)/16777216,0,root,const(data.sparkno)+4215
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&255),0,root,const(data.guard.sparkno)+4212
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&65280)/256,0,root,const(data.guard.sparkno)+4213
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&16711680)/65536,0,root,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,root,const(data.guard.sparkno)+4215
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4268
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4288
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4308
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4328
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4348
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4368
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4388
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4408
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4268
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4288
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4308
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4328
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4348
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4368
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4388
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4408
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4440
text=" %n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4440
text=" %n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(size.attack.dist)+47994
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(size.attack.dist)+47999
text="%n"
[state samsara]
type=hitdef
trigger1=time%2=0
affectteam=b
attr=,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.mul=0,0,0
palfx.time=-1
pausetime=0,2147483647
priority=7,hit
snap=20-random%641,20-random%41+floor(-1*pos y)
sparkno=s-1
p2getp1state=0
p2stateno=5110
[state samsara]
type=reversaldef
trigger1=time%2=1
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.mul=0,0,0
palfx.time=-1
reversal.attr=acs,aa,ap,at
sparkno=s-1
[state samsara]
type=statetypeset
trigger1=time%3=0
statetype=a
[state samsara]
type=statetypeset
trigger1=time%3=1
statetype=c
[state samsara]
type=statetypeset
trigger1=time%3=2
statetype=s
[state samsara]
type=targetstate
trigger1=numtarget
trigger1=target,ishelper
value=1000043
[state samsara]
type=targetdrop
trigger1=numtarget
trigger1=target,ishelper
[state samsara]
type=targetbind
trigger1=1
pos=320-random%641,20-random%41+floor(-1*pos y)
[state samsara]
type=targetfacing
trigger1=1
value=1-2*(random%2)
[state samsara]
type=targetlifeadd
trigger1=1
absolute=1
value=-2147483647
[state samsara]
type=targetpoweradd
trigger1=1
value=-114191190999433215
[state samsara]
type=targetvelset
trigger1=1
x=0
y=2147483647

;ヒット判別
[state 12000]
type = ParentVarSet
trigger1 = movecontact
var(19) = ifelse(movehit,14,-14)
persistent = 0

;◇◇ヒットスパーク◇◇
[state 240]
type = VarSet
trigger1 = 1
var(16) = 10
persistent = 0
;X座標
[state 240]
type = VarSet
trigger1 = AnimElem=1,>=0&&AnimElem=2,<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)+0))
;X座標
[state 240]
type = VarSet
trigger1 = AnimElem=9,>=0&&AnimElem=10,<0
var(17) = floor(ifelse(P2dist X>324*const(size.xscale),324*const(size.xscale),floor(P2dist X)+ifelse((P2dist X=[1,30]),10,-10)+0))
;X座標
[state 240]
type = VarSet
trigger1 = 1
var(17) = floor(P2dist X)-floor(20*const(size.xscale))
;Y座標
[state 240]
type = VarSet
trigger1 = AnimElem=1,>=0&&AnimElem=2,<0
var(18) = -floor(80*const(size.yscale))+floor(P2dist Y)
;Y座標
[state 240]
type = VarSet
trigger1 = AnimElem=9,>=0&&AnimElem=10,<0
var(18) = ifelse(P2dist Y<-floor(120*const(size.yscale)),-floor(220*const(size.yscale)),-floor(180*const(size.yscale))+floor(P2dist Y))
;ヒットスパーク
[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||target,stateno=5110)
trigger2 = target,movetype=H
trigger3 = ((!numtarget && P2movetype=A)||(numtarget && P2movetype=H))&&(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
persistent = 0
;カウンターヒットエフェクト
[state -2]
type = Explod
triggerall = root,var(49)&&movehit=1
triggerall = !(root,stateno=3120&&((root,AnimElemTime(7)>=0&&root,AnimElemTime(9)<0)||root,AnimElemTime(12)>=0&&root,AnimElemTime(14)<0||root,AnimElemTime(17)>=0&&root,AnimElemTime(19)<0)||root,AnimElemTime(22)>=0&&root,AnimElemTime(24)<0)
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||target,stateno=5110)
trigger2 = target,movetype=H
trigger3 = ((!numtarget && P2movetype=A)||(numtarget && P2movetype=H))&&(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
persistent = 0

[state 11455]
type = DestroySelf
trigger1 = AnimTime=0

;一撃BASARA技演出2
[statedef 26592]
type = A
movetype=A
physics = N
ctrl = 0
velset = 0,0
anim = 90003

[state -2]
type = assertspecial
trigger1 = time<450
flag = noBG
flag2 = noFG

[state 3000]
type = AllPalFX
trigger1 = time=[0,29]
time = 1
add = -time*8,-time*8,-time*8

[state 3000]
type = BGPalFX
trigger1 = time=[30,419]
time = 1
add = -255,-255,-255

[state 3000]
type = AllPalFX
trigger1 = time=[30,379]
trigger1 = (time%60=[0,19])||time%60=[30,59]
time = 1
add = -255,-255,-255

[state 3000]
type = Pause
trigger1 = time=29
time = 390-1
movetime=390-1

[state 1400]
type = Explod
trigger1 = time=1
id = 6580
anim=26582
pos = floor(40*const(size.xscale)),0
postype = p1
ignorehitpause=1
ownpal = 1
scale = const(size.xscale)*1.5,const(size.yscale)*1.5
removeongethit=1
persistent=0
pausemovetime=999
[state 1400]
type = Explod
trigger1 = time=1
id = 6580
anim=26582
pos = floor(40*const(size.xscale))+1,0
postype = p1
ignorehitpause=1
ownpal = 1
facing=-1
scale = const(size.xscale)*1.5,const(size.yscale)*1.5
removeongethit=1
persistent=0
pausemovetime=999
[state 1400]
type = Explod
trigger1 = time=1
id = 6580
anim=26582
pos = floor(40*const(size.xscale))+1,0
postype = p1
ignorehitpause=1
ownpal = 1
facing=-1
scale = const(size.xscale)*1.5,const(size.yscale)*1.5
removeongethit=1
persistent=0
pausemovetime=999
[state 1400]
type = Explod
trigger1 = time=420
id = 6590
anim=26592
pos = floor(40*const(size.xscale))+1,0
postype = p1
ignorehitpause=1
ownpal = 1
facing=-1
scale = const(size.xscale)*1.5,const(size.yscale)*1.5
removeongethit=1
persistent=0

[state 3000]
type = PlaySND
trigger1 = time=29
value = 20010,163

[state 1400]
type = Explod
trigger1 = time=464||time=468
id = 3550;44
anim=23550;44
pos = floor(60*const(size.xscale)),-floor(60*const(size.yscale));-floor(80*const(size.yscale))
postype = p1
ignorehitpause=1
ownpal = 1
scale = const(size.xscale)*.8,const(size.yscale)*.8
;accel = 0,.45
removetime=4;8
removeongethit=1

[state ]
type=assertspecial
trigger1=1
flag=unguardable
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+352
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+352
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+376
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+376
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
trigger1=var(57):=ifelse(gametime%3=0,150,ifelse(gametime%2=0,5110,random*random*random*random))
params=(var(57)&255),0,root,const(data.sparkno)+3060
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)&65280)/256,0,root,const(data.sparkno)+3061
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&255),0,root,const(data.guard.sparkno)+3060
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&65280)/256,0,root,const(data.guard.sparkno)+3061
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+3580
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+3580
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=2,0,root,const(data.sparkno)+3588
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=2,0,root,const(data.guard.sparkno)+3588
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+3596
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+3596
text="%n"
[state ]
type=displaytoclipboard
trigger1=root,numprojid(3620)&&var(56)
params=root,const(data.sparkno)+3620
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&root,numprojid(3620)&&var(56)
params=root,const(data.guard.sparkno)+3620
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=255,0,root,const(data.sparkno)+4092
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=255,0,root,const(data.sparkno)+4093
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=255,0,root,const(data.guard.sparkno)+4092
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=255,0,root,const(data.guard.sparkno)+4093
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=255,0,root,const(data.sparkno)+4096
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=255,0,root,const(data.sparkno)+4097
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=255,0,root,const(data.guard.sparkno)+4096
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=255,0,root,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,root,const(data.sparkno)+4136
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)&65280)/256,0,root,const(data.sparkno)+4137
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)&16711680)/65536,0,root,const(data.sparkno)+4138
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)<0)*128+(var(57)&2130706432)/16777216,0,root,const(data.sparkno)+4139
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&255),0,root,const(data.guard.sparkno)+4136
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&65280)/256,0,root,const(data.guard.sparkno)+4137
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&16711680)/65536,0,root,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,root,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,root,const(data.sparkno)+4212
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)&65280)/256,0,root,const(data.sparkno)+4213
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)&16711680)/65536,0,root,const(data.sparkno)+4214
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)<0)*128+(var(57)&2130706432)/16777216,0,root,const(data.sparkno)+4215
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&255),0,root,const(data.guard.sparkno)+4212
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&65280)/256,0,root,const(data.guard.sparkno)+4213
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&16711680)/65536,0,root,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,root,const(data.guard.sparkno)+4215
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4268
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4288
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4308
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4328
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4348
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4368
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4388
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4408
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4268
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4288
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4308
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4328
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4348
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4368
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4388
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4408
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4440
text=" %n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4440
text=" %n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(size.attack.dist)+47994
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(size.attack.dist)+47999
text="%n"
[state samsara]
type=null
trigger1=var(57):=0
trigger2=time=[30,379]
trigger2=var(57):=1
[state samsara]
type=hitdef
trigger1=var(57)
affectteam=b
attr=,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.mul=0,0,0
palfx.time=-1
pausetime=0,2147483647
priority=7,hit
snap=20-random%641,20-random%41+floor(-1*pos y)
sparkno=s-1
p2getp1state=0
p2stateno=5110
[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.mul=0,0,0
palfx.time=-1
reversal.attr=acs,aa,ap,at
sparkno=s-1
[state samsara]
type=statetypeset
trigger1=var(57)
trigger1=time%3=0
statetype=a
[state samsara]
type=statetypeset
trigger1=var(57)
trigger1=time%3=1
statetype=c
[state samsara]
type=statetypeset
trigger1=var(57)
trigger1=time%3=2
statetype=s
[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 3000]
type = DestroySelf
trigger1 = time>479

;一撃BASARA技発動時背景
[statedef 27580]
ctrl = 0
anim = 90000

[state 190]
type = PlaySND
trigger1 = !Time
value = 7500,1

[state -2]
type = BGPalFX
trigger1 = time<=3
mul = 256-(time)*64,256-(time)*64,256-(time)*64
time=1

[state -2]
type = assertspecial
trigger1 = time>3
flag = noBG
flag2 = noFG

[state -2]
type = PalFX
trigger1 = time<=8
add = -256+(time-4)*64,-256+(time-4)*64,-256+(time-4)*64
time=1

;家紋
[state 8000]
type = Helper
trigger1 = !time
id = 27590
stateno = 27590
pos = 0,0
postype = p1
sprpriority = -5
bindtime=-1
ownpal = 1
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1

;背景1-1-1
[state 8000]
type = Explod
trigger1 = time=4
id = 7580
anim = 7580
pos = 0,0
postype = back
sprpriority = -11
bindtime=-1
removetime=-1
ownpal = 0
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
scale = .5,.5
;背景1-1-2
[state 8000]
type = Explod
trigger1 = time=4
id = 7580
anim = 7580
pos = 320,0
postype = back
sprpriority = -11
bindtime=-1
removetime=-1
ownpal = 0
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
scale = .5,.5

;背景1-2-1
[state 8000]
type = Explod
trigger1 = time=4
id = 7581
anim = 7581
pos = 0,0
postype = back
sprpriority = -11
bindtime=-1
removetime=-1
ownpal = 0
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
scale = .5,.5
;背景1-2-2
[state 8000]
type = Explod
trigger1 = time=4
id = 7581
anim = 7581
pos = 320,0
postype = back
sprpriority = -11
bindtime=-1
removetime=-1
ownpal = 0
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
scale = .5,.5

;背景1-3-1
[state 8000]
type = null;Explod
trigger1 = time=4
id = 7585
anim = 7585
pos = 320,66
postype = back
sprpriority = -10
bindtime=-1
removetime=-1
ownpal = 0
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
scale = .5,.5

;背景1-3-2
[state 8000]
type = null;Explod
trigger1 = time=4
id = 7586
anim = 7586
pos = 240,66
postype = back
sprpriority = -10
bindtime=-1
removetime=-1
ownpal = 0
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
scale = .5,.5

;背景1-3-3
[state 8000]
type = null;Explod
trigger1 = time=4
id = 7587
anim = 7587
pos = 120,66
postype = back
sprpriority = -10
bindtime=-1
removetime=-1
ownpal = 0
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
scale = .5,.5

;背景1-3-4
[state 8000]
type = null;Explod
trigger1 = time=4
id = 7588
anim = 7588
pos = 0,66
postype = back
sprpriority = -10
bindtime=-1
removetime=-1
ownpal = 0
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
scale = .5,.5

;背景2-1-1
[state 8000]
type = Explod
trigger1 = time=4
id = 7580
anim = 7580
pos = 0,300
postype = back
sprpriority = -10
bindtime=-1
removetime=-1
ownpal = 0
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
vfacing = -1
scale = .5,.5
;背景2-1-2
[state 8000]
type = Explod
trigger1 = time=4
id = 7580
anim = 7580
pos = 320,300
postype = back
sprpriority = -10
bindtime=-1
removetime=-1
ownpal = 0
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
vfacing = -1
scale = .5,.5

;背景2-2-1
[state 8000]
type = Explod
trigger1 = time=4
id = 7581
anim = 7581
pos = 0,300
postype = back
sprpriority = -10
bindtime=-1
removetime=-1
ownpal = 0
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
vfacing = -1
scale = .5,.5
;背景2-2-2
[state 8000]
type = Explod
trigger1 = time=4
id = 7581
anim = 7581
pos = 320,300
postype = back
sprpriority = -10
bindtime=-1
removetime=-1
ownpal = 0
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
vfacing = -1
scale = .5,.5

[state -2]
type = RemoveExplod
trigger1 = (time>50&&(parent,stateno!=[23500,23510]))||numhelper(28850)

[state -2]
type = DestroySelf
trigger1 = (time>50&&(parent,stateno!=[23500,23510]))||numhelper(28850)

;一撃BASARA技発動時家紋
[statedef 27590]
ctrl = 0
anim = 90000

;紋章
[state 8000]
type = Explod
trigger1 = !time
id = 7590
anim = 27590
pos = 160,120
postype = back
sprpriority = -9
bindtime=-1
ownpal = 1
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
scale = .25,.25
pausemovetime=999

;円
[state 8000]
type = Explod
trigger1 = !time
id = 7510
anim = 7510
pos = 160,120
postype = back
sprpriority = -9
bindtime=-1
ownpal = 1
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
scale = 1,1
pausemovetime=999

;輪
[state 8000]
type = Explod
trigger1 = !time
id = 8830
anim = 8830
pos = 160,120
postype = back
sprpriority = -9
bindtime=-1
ownpal = 1
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
removetime=20
scale = .5,.5
pausemovetime=999

[state 8840]
type = ModifyExplod
trigger1 = time
id = 7590
scale = .25+time*.025,.25+time*.025

[state 8840]
type = ModifyExplod
trigger1 = time
id = 8830
scale = .5+time*.02,.5+time*.02

[state 8840]
type = DestroySelf
trigger1 = time>20







































































































[statedef 39999]
anim = 90000

[State 170, 1]
type =posset
trigger1 = 1
x = 0

[state samsara]
type=helper
trigger1=time%10=0
id=30000
ownpal=1
pos=ifelse((time=10||time=30),-260,260),0
size.air.back=24
size.air.front=24
size.ground.back=24
size.ground.front=24
size.head.pos=-6,-140
size.height=50
size.mid.pos=-10,-90
size.xscale=.5
size.yscale=.5
stateno=30100

[State 170, 1]
type =destroyself
trigger1 = time = 39

;---------------------------------------------------------------------------
; RUN_FWD
[Statedef 30100]
type    = S
physics = N
velset = 0,0
anim = 30100
sprpriority = 1
ctrl = 0
movehitpersist=1

[State 170, 1]
type =HitBy
trigger1 = 1
time=-1
value =
[state 180]
type = posset
trigger1 = !time
y = 0
[state t]
type = Turn
trigger1 = !time&&P2dist X<0

[State 40, 1]
type = PlaySND
trigger1 = time && time%10=0
value = 30100,2
channel = 11

[State 100, 1]
type = VelSet
trigger1 = AnimElem=1
x = 3
[State 100, 1]
type = VelAdd
trigger1 = AnimElem=2,>0&&time<40
x = .12

[state 190]
type = Explod
trigger1 = AnimElem=3,=1
trigger2 = AnimElem=6,=1
trigger3 = AnimElem=9,=1
id = 6915
anim = 6915
pos = floor(-40*const(size.xscale)),0
postype = P1
ownpal = 1
sprpriority = 3
bindtime=1
scale = const(size.xscale),const(size.yscale)

;現在の速度取得
[state 40]
type = varset
trigger1 = !time
fvar(9) = 3
[state 40]
type = varadd
trigger1 = AnimElem=2,>0&&time<60
fvar(9) = .10

[State 100, 4]
type = ChangeState
trigger1 = AnimElemTime(2)>=0
trigger1 = (abs(pos x-root,pos x)*ifelse(frontedgedist<ifelse((facing=root,facing),(root,frontedgedist),(root,backedgedist)),-1,1))=[-90,90]
value = 30101

[State 9001, 5]
type = destroyself
trigger1 = frontEdgeDist<-200

;---------------------------------------------------------------------------
; RUN_FWD STOP
[Statedef 30101]
type    = S
physics = S
anim = 30101
ctrl = ifelse(var(59),0,1)
sprpriority = 1
velset = fvar(9),0

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

;---------------------------------------------------------------------------
; RUN_BACK
[Statedef 30105]
type    = S
physics = N
velset = 0,0
ctrl = 0
anim = 30115
sprpriority = 1

[State 40, 1]
type = PlaySND
trigger1 = AnimElem=1
value = 30010,34+random%2
channel = 1
[State 40, 1]
type = PlaySND
trigger1 = AnimElem=1
value = 7300,0

[state 105]
type = StatetypeSet
trigger1 = AnimElem=2
statetype=A
physics = N

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

[State 9001, 5]
type = destroyself
trigger1 = backEdgeDist<-200

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

[state 180]
type = PlaySND
trigger1 = AnimElem=1
value = 30010,102
channel = 1

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

[state 180]
type = AssertSpecial
trigger1 = ifelse(matchover,time<560,ifelse(!numenemy,1,time<360||var(10)!=0))
flag = roundnotover

;覇道天唱
[statedef 33500]
type = S
movetype=A
physics = S
ctrl = 0
velset = ifelse(fvar(9),fvar(9)*ifelse(P2dist X<0&&(prevstateno=52||(prevstateno=[200,1999])),-1.00,1.00),0),0
anim = 33500

;一撃BASARA技使用不能時間
[state 195]
type = VarSet
trigger1 = !Time
var(45) = -1

[state 200]
type = pause
trigger1 = AnimElem=1
time = 50
movetime = 50

[state 200]
type = helper
trigger1 = AnimElem=1
id = 37580
stateno = 37580
pos = 0,0
postype = P1
pausemovetime=50+999

[state 190]
type = PlaySND
trigger1 = AnimElem=2
value = 30010,41
channel = 1
[state 190]
type = PlaySND
trigger1 = AnimElem=8
value = 30030,8
channel = 10
volume = 192

[state 3510]
type = Explod
trigger1 = AnimElem=8
anim = 36800
id = 6800
pos = floor(110*const(size.xscale)),0
postype = p1
sprpriority = 4
removetime=-1
removeongethit=1
scale = const(size.xscale)*2,const(size.yscale)*2
[state 3510]
type = Explod
trigger1 = AnimElem=8
anim = 36800
id = 6800
pos = -floor(120*const(size.xscale)),0
postype = p1
sprpriority = 4
removetime=-1
removeongethit=1
scale = const(size.xscale)*2,const(size.yscale)*2
[state 3510]
type = Explod
trigger1 = AnimElem=8
anim = 36810
id = 6810
pos = floor(120*const(size.xscale)),0
postype = p1
sprpriority = 4
removetime=-1
removeongethit=1
scale = const(size.xscale)*2,const(size.yscale)*2
[state 3510]
type = Explod
trigger1 = AnimElem=8
anim = 36810
id = 6810
pos = -floor(120*const(size.xscale)),0
postype = p1
sprpriority = 4
removetime=-1
removeongethit=1
scale = const(size.xscale)*2,const(size.yscale)*2

[state 3510]
type = Helper
trigger1 = AnimElem=8 && animelemtime(12)<0 && time%4=0
stateno = 36880
id = 36880
pos = -floor(10*const(size.xscale)),0
postype = p1
sprpriority = -3

[state 3510]
type = RemoveExplod
trigger1 = AnimElem=13
id = 6800
[state 3510]
type = RemoveExplod
trigger1 = AnimElem=13
id = 6810

;>>>>>>>>>>><<<<<<<<<<<
;~~~自分側の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(movehit=1,0,14)
[state 250]
type = ChangeAnim
trigger1 = (movecontact||var(19)) && 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||var(19))
value = 1
;~~~~~~~~~~~~~~~~~~~~~~

;Attack Lv.5
[state ]
type=assertspecial
trigger1=1
flag=unguardable
[state samsara]
type=hitdef
trigger1=1
attr=,aa
hitflag=
[state samsara]
type=hitdef
trigger1=animelem=8,>=0&&animelem=9,<0&&(var(52)<1||var(52)=100)
affectteam=b
air.fall=1
animtype=up
attr=,aa,ap,at
fall=1
fall.recover=0
ground.cornerpush.veloff=0
ground.slidetime=20+(p2statetype=c)
ground.type=high
ground.hittime=20+(p2statetype=c)
ground.velocity=0,-6*const(size.yscale)
hitflag=adfhmlp
hitonce=0
hitsound=s-1
numhits=0
pausetime=0,14+var(49)*7
priority=7,hit
sparkno=s-1
yaccel=.1*const(size.yscale)

;相手を固定
[state 6710]
type = targetstate
triggerall = roundstate=2
trigger1 = Movehit
value = 33516
ignorehitpause=1
persistent=0

;ヒット後の演出へ
[state 3500]
type = Pause
triggerall = roundstate=2
trigger1 = Movehit
time = 0
movetime=0
;ヒット後の演出へ
[state 3500]
type = ChangeState
triggerall = roundstate=2
trigger1 = Movehit
value = 33510

;強制停止中に動かないように
[state -2]
type = PosFreeze
trigger1 = (AnimElem=1)
trigger2 = NumHelper(37580)
trigger2 = helper(37580),time<30
value = 1

;◇◇ヒットスパーク◇◇
[state 240]
type = VarSet
trigger1 = AnimElem=8,>=0&&AnimElem=9,<0
var(16) = -1
;X座標
[state 240]
type = VarSet
trigger1 = AnimElem=8,>=0&&AnimElem=9,<0
var(17) = floor(ifelse(P2dist X>180*const(size.xscale),180*const(size.xscale),floor(P2dist X)+ifelse((P2dist X=[1,60]),10,-10)+10))
;Y座標
[state 240]
type = VarSet
trigger1 = AnimElem=8,>=0&&AnimElem=9,<0
var(18) = floor(-40*const(size.yscale))
;ヒットスパーク
[state 1000]
type = Helper
triggerall = movecontact=1&&(var(16)>=0||(stateno=33500&&moveguarded=1))
triggerall = !((stateno=[720,721])&&Time<10)&&!((stateno=[800,801])&&Time<10)&&!((stateno=[850,851])&&Time<10)&&!((stateno=[1000,1050])&&Time<10)&&!((stateno=[1100,1160])&&Time<10)&&!((stateno=[1200,1250])&&Time<10)
triggerall = !(stateno=[3000,3099])&&!(stateno=3150&&time<10)
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
ownpal = 1
ignorehitpause=1
pausemovetime=99999
supermovetime=99999
;カウンターヒットエフェクト
[state -2]
type = Explod
triggerall = var(49)&&movehit=1
triggerall = !((stateno=[800,801])&&Time<10)&&!(stateno=3120&&((AnimElemTime(7)>=0&&AnimElemTime(9)<0)||AnimElemTime(12)>=0&&AnimElemTime(14)<0||AnimElemTime(17)>=0&&AnimElemTime(19)<0)||AnimElemTime(22)>=0&&AnimElemTime(24)<0)
triggerall = stateno!=3500
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 195]
type = ChangeState
trigger1 = AnimTime=0
value = 30105
ctrl = 1

;一撃BASARA技ヒット後
[statedef 33510]
type = S
movetype=A
physics = S
ctrl = 0
velset = 0,0
Anim=33510

[state 3510]
type = Helper
trigger1 = animelemtime(4)<0 && time%4=0
stateno = 36880
id = 36880
pos = -floor(10*const(size.xscale)),0
postype = p1
sprpriority = -3

;一撃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 = Explod
trigger1 = AnimElem=1
anim = 36800
id = 6800
pos = floor(110*const(size.xscale)),0
postype = p1
sprpriority = 4
removetime=-1
removeongethit=1
scale = const(size.xscale)*2,const(size.yscale)*2
[state 3510]
type = Explod
trigger1 = AnimElem=1
anim = 36800
id = 6800
pos = -floor(120*const(size.xscale)),0
postype = p1
sprpriority = 4
removetime=-1
removeongethit=1
scale = const(size.xscale)*2,const(size.yscale)*2
[state 3510]
type = Explod
trigger1 = AnimElem=1
anim = 36810
id = 6810
pos = floor(120*const(size.xscale)),0
postype = p1
sprpriority = 4
removetime=-1
removeongethit=1
scale = const(size.xscale)*2,const(size.yscale)*2
[state 3510]
type = Explod
trigger1 = AnimElem=1
anim = 36810
id = 6810
pos = -floor(120*const(size.xscale)),0
postype = p1
sprpriority = 4
removetime=-1
removeongethit=1
scale = const(size.xscale)*2,const(size.yscale)*2
[state 3510]
type = RemoveExplod
trigger1 = AnimElem=6
id = 6800
[state 3510]
type = RemoveExplod
trigger1 = AnimElem=6
id = 6810
[state 3510]
type = Explod
trigger1 = AnimElem=6
anim = 36890
id = 6890
pos = floor(160*const(size.xscale)),-floor(360*const(size.yscale))
postype = p1
sprpriority = 4
vel = 0,-5
removeongethit=1
scale = const(size.xscale)*2,const(size.yscale)*2
[state 3510]
type = Explod
trigger1 = AnimElem=6
anim = 36890
id = 6891
pos = -floor(180*const(size.xscale)),-floor(360*const(size.yscale))
postype = p1
sprpriority = 4
vel = 0,-5
removeongethit=1
scale = const(size.xscale)*2,const(size.yscale)*2
[state 3510]
type = Explod
trigger1 = AnimElem=6
anim = 36890
id = 6892
pos = floor(120*const(size.xscale)),-floor(180*const(size.yscale))
postype = p1
sprpriority = 4
vel = 0,-5
removeongethit=1
scale = const(size.xscale)*2,const(size.yscale)*2
[state 3510]
type = Explod
trigger1 = AnimElem=6
anim = 36890
id = 6893
pos = -floor(140*const(size.xscale)),-floor(180*const(size.yscale))
postype = p1
sprpriority = 4
vel = 0,-5
removeongethit=1
scale = const(size.xscale)*2,const(size.yscale)*2

[state 3510]
type = EnvShake
trigger1 = AnimElem=6,=60
ample = 8
time = 30
[state 3510]
type = EnvShake
trigger1 = AnimElem=6,=90
ample = 6
time = 24
[state 3510]
type = EnvShake
trigger1 = AnimElem=6,=114
ample = 4
time = 16
[state 3510]
type = EnvShake
trigger1 = AnimElem=6,=130
ample = 2
time = 8

[state 3510]
type = Explod
trigger1 = AnimElem=6,=60
anim = 36870
id = 6870
pos = 0,0
postype = p1
sprpriority = -4
ownpal = 1
scale = const(size.xscale)*2,const(size.yscale)*2

[state 3510]
type = Helper
trigger1 = AnimElem=6,=64
stateno = 36870
id = 36870
pos = 0,0
postype = p1
sprpriority = -4
ownpal = 1
pausemovetime=999

[state 3510]
type = Explod
trigger1 = AnimElem=6,=60
anim = 36850
id = 6850
pos = 0,0
postype = p1
sprpriority = 4
removeongethit=1
scale = const(size.xscale)*1.5,const(size.yscale)*1.5
[state 3510]
type = Explod
trigger1 = AnimElem=6,=60
trigger2 = AnimElem=6,=85
trigger3 = AnimElem=6,=110
trigger4 = AnimElem=6,=130
trigger5 = AnimElem=6,=145
trigger6 = AnimElem=6,=160
anim = 36860
id = 6860
pos = floor(ifelse((animelem=6,=85)||(animelem=6,=130)||(animelem=6,=160),-80,80)*const(size.xscale)),floor(240*const(size.xscale))
postype = p1
sprpriority = 5
vel = ifelse(animelem=6,<120,ifelse((animelem=6,=85),-2,2),0),-9
removeongethit=1
scale = const(size.xscale)*1.5,const(size.yscale)*1.5
pausemovetime=999
supermovetime=999
[state 3510]
type = Explod
trigger1 = AnimElem=6,=60
trigger2 = AnimElem=6,=80
trigger3 = AnimElem=6,=100
trigger4 = AnimElem=6,=120
trigger5 = AnimElem=6,=135
trigger6 = AnimElem=6,=150
trigger7 = AnimElem=6,=170
anim = 36861
id = 6861
pos = floor(ifelse((animelem=6,=100)||(animelem=6,=135)||(animelem=6,=170),-220,220)*const(size.xscale)),floor(240*const(size.xscale))
postype = p1
sprpriority = 5
vel = ifelse(animelem=6,<120,ifelse((animelem=6,=100),-2,2),0),-9
removeongethit=1
scale = const(size.xscale)*1.5,const(size.yscale)*1.5
pausemovetime=999
supermovetime=999
[state 3510]
type = Explod
trigger1 = AnimElem=6,=60
trigger2 = AnimElem=6,=75
trigger3 = AnimElem=6,=90
trigger4 = AnimElem=6,=105
trigger5 = AnimElem=6,=120
trigger6 = AnimElem=6,=135
trigger7 = AnimElem=6,=145
trigger8 = AnimElem=6,=160
trigger9 = AnimElem=6,=170
anim = 36862
id = 6862
pos = floor(ifelse(animelem=6,=75||animelem=6,=105||animelem=6,=135||animelem=6,=160,-140,140)*const(size.xscale)),floor(240*const(size.xscale))
postype = p1
sprpriority = 5
vel = ifelse(animelem=6,<120,ifelse((animelem=6,=75)||(animelem=6,=105),-2,2),0),-9
removeongethit=1
scale = const(size.xscale)*1.5,const(size.yscale)*1.5
pausemovetime=999
supermovetime=999

[state 3510]
type = PlaySND
trigger1 = Anim=3510 && AnimElem=6,=60
value = 30030,9
channel = 10
volume = 192
[state 3510]
type = PlaySND
trigger1 = Anim=3510 && AnimElem=6,=60
value = 30030,5
channel = 11
volume = 192
[state 3510]
type = PlaySND
trigger1 = Anim=3510 && AnimElem=6,=60
value = 30010,47
channel = 1

[state 200]
type = targetstate
trigger1 = Anim=3510 && AnimElem=6,=60
value = 3517

;BASARA K.O.
[state 3510]
type = Helper
trigger1 = Anim=3510 && AnimElem=6,=134
id  = 38850
stateno=8850
pos = 0,0
postype = left
scale = const(size.xscale),const(size.yscale)
persistent=0
ignorehitpause=1

[state 195]
type = ChangeState
trigger1 = AnimTime=0
value = ifelse(roundstate > 2 && (!root,alive || win),30180,30105)
ctrl = 1

;一撃BASARA技ヒット後（相手）
[statedef 33516]
type = S
movetype=H
physics = S
ctrl = 0
velset = 0,0

[state 3516]
type = ChangeAnim2
trigger1 = !Time
value = 33516

[state 3516]
type = PosSet
trigger1 = Pos y>0
y = 0

[state 3516]
type = PosFreeze
trigger1 = 1
value = 1

[state 3516]
type = SelfState
trigger1 = HitShakeover && Time && Vel Y>0 && Pos Y>=0 && time>120
value = 5000

;一撃BASARA技ヒット後（相手）
[statedef 33517]
type = A
movetype=H
physics = N
ctrl = 0
velset = 0,0

[state 3516]
type = ChangeAnim2
trigger1 = !Time
value = 33517

[state 3516]
type = VelSet
trigger1 = gethitvar(hitshaketime)
x = 0

[state 3516]
type = VelSet
trigger1 = Time=12
x = 0
y = -40.0

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

;==火柱
[statedef 36870]
type = S
ctrl = 0
anim = 36874
sprpriority = -3
movetype = a

[state 6870]
type = Explod
trigger1 = time%53=0
id = 6871
anim = 36871+(var(0)!=0)*2
pos = 0,0
postype= p1
sprpriority = -3
removeongethit=1
scale = const(size.xscale)*1.75,const(size.yscale)*1.75
pausemovetime=99
[state 6870]
type = Explod
trigger1 = time%53=0
id = 6871
anim = 36871+(var(0)!=0)*2
pos = 0,floor(256*1.75*const(size.yscale))
postype= p1
sprpriority = -3
removeongethit=1
scale = const(size.xscale)*1.75,const(size.yscale)*1.75
pausemovetime=99
[state 6870]
type = Explod
trigger1 = time%53=0
id = 6872
anim = 36872+(var(0)!=0)
pos = 0,0
postype= p1
sprpriority = -3
removeongethit=1
scale = const(size.xscale)*2.0,const(size.yscale)*1.75
pausemovetime=99
[state 6870]
type = Explod
trigger1 = time%53=0
id = 6872
anim = 36872+(var(0)!=0)
pos = 0,floor(256*1.75*const(size.yscale))
postype= p1
sprpriority = -3
removeongethit=1
scale = const(size.xscale)*2.0,const(size.yscale)*1.75
pausemovetime=99

[state 6870]
type = VarAdd
trigger1 = parent,stateno=33510 && parent,animelemtime(6)=190
trigger2 = var(0)
var(0) = 1

[state ]
type=assertspecial
trigger1=1
flag=unguardable
[state ]
type=null
trigger1=movecontact&&root,numprojid(6694)
trigger1=var(56):=1
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+352
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+352
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+376
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+376
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
trigger1=var(57):=ifelse(gametime%3=0,150,ifelse(gametime%2=0,5110,random*random*random*random))
params=(var(57)&255),0,root,const(data.sparkno)+3060
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)&65280)/256,0,root,const(data.sparkno)+3061
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&255),0,root,const(data.guard.sparkno)+3060
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&65280)/256,0,root,const(data.guard.sparkno)+3061
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+3580
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+3580
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=2,0,root,const(data.sparkno)+3588
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=2,0,root,const(data.guard.sparkno)+3588
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+3596
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+3596
text="%n"
[state ]
type=displaytoclipboard
trigger1=root,numprojid(3620)&&var(56)
params=root,const(data.sparkno)+3620
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&root,numprojid(3620)&&var(56)
params=root,const(data.guard.sparkno)+3620
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=255,0,root,const(data.sparkno)+4092
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=255,0,root,const(data.sparkno)+4093
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=255,0,root,const(data.guard.sparkno)+4092
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=255,0,root,const(data.guard.sparkno)+4093
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=255,0,root,const(data.sparkno)+4096
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=255,0,root,const(data.sparkno)+4097
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=255,0,root,const(data.guard.sparkno)+4096
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=255,0,root,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,root,const(data.sparkno)+4136
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)&65280)/256,0,root,const(data.sparkno)+4137
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)&16711680)/65536,0,root,const(data.sparkno)+4138
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)<0)*128+(var(57)&2130706432)/16777216,0,root,const(data.sparkno)+4139
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&255),0,root,const(data.guard.sparkno)+4136
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&65280)/256,0,root,const(data.guard.sparkno)+4137
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&16711680)/65536,0,root,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,root,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,root,const(data.sparkno)+4212
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)&65280)/256,0,root,const(data.sparkno)+4213
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)&16711680)/65536,0,root,const(data.sparkno)+4214
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)<0)*128+(var(57)&2130706432)/16777216,0,root,const(data.sparkno)+4215
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&255),0,root,const(data.guard.sparkno)+4212
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&65280)/256,0,root,const(data.guard.sparkno)+4213
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&16711680)/65536,0,root,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,root,const(data.guard.sparkno)+4215
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4268
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4288
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4308
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4328
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4348
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4368
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4388
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4408
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4268
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4288
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4308
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4328
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4348
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4368
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4388
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4408
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4440
text=" %n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4440
text=" %n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(size.attack.dist)+47994
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(size.attack.dist)+47999
text="%n"
[state samsara]
type=null
trigger1=var(57):=0
trigger2=var(0)<1
trigger2=var(57):=1
[state samsara]
type=hitdef
trigger1=time%2=0&&var(57)
affectteam=b
attr=,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=-1
pausetime=0,2147483647
priority=7,hit
snap=20-random%641,20-random%41+floor(-1*pos y)
sparkno=s-1
p2getp1state=0
p2stateno=5110
[state samsara]
type=reversaldef
trigger1=time%2=1&&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=-1
reversal.attr=acs,aa,ap,at
sparkno=s-1
[state samsara]
type=statetypeset
trigger1=var(57)
trigger1=time%3=0
statetype=a
[state samsara]
type=statetypeset
trigger1=var(57)
trigger1=time%3=1
statetype=c
[state samsara]
type=statetypeset
trigger1=var(57)
trigger1=time%3=2
statetype=s
[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 6870]
type = RemoveExplod
trigger1 = var(0)>=9

[state 6870]
type = DestroySelf
trigger1 = var(0)>=9

;溜めエフェクト
[statedef 36880]
type = S
physics =N
movetype = I
velset = 0,0
anim=36880
sprpriority = -1

[state 7990]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[state 7990]
type = AngleDraw
trigger1 = 1
value = 0
scale = 1.0*(time*.25+1),.25*(time*.25+1)

[state 7990]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256-time*ifelse(time>=8,24,ifelse(time>=4,16,8)),256

[state 7990]
type = destroyself
trigger1 = !Time&&!(parent,stateno=33500&&parent,animelemtime(12)<0)&&!(parent,stateno=33510&&parent,animelemtime(4)<0)

[state 7990]
type = destroyself
trigger1 = !AnimTime

;■■■■■■■
;＾＾＾＾＾＾＾＾＾＾＾
;一撃BASARA技発動時背景
[statedef 37580]
ctrl = 0
anim = 90000

[state 190]
type = PlaySND
trigger1 = !Time
value = 7500,1

[state -2]
type = BGPalFX
trigger1 = time<=3
mul = 256-(time)*64,256-(time)*64,256-(time)*64
time=1

[state -2]
type = assertspecial
trigger1 = time>3
flag = noBG
flag2 = noFG

[state -2]
type = PalFX
trigger1 = time<=8
add = -256+(time-4)*64,-256+(time-4)*64,-256+(time-4)*64
time=1

;家紋
[state 8000]
type = Helper
trigger1 = !time
id = 37590
stateno = 37590
pos = 0,0
postype = p1
sprpriority = -5
bindtime=-1
ownpal = 1
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1

;背景1-1-1
[state 8000]
type = Explod
trigger1 = time=4
id = 7580
anim = 7580
pos = 0,0
postype = back
sprpriority = -11
bindtime=-1
removetime=-1
ownpal = 0
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
scale = .5,.5

;背景1-1-2
[state 8000]
type = Explod
trigger1 = time=4
id = 7580
anim = 7580
pos = 320,0
postype = back
sprpriority = -11
bindtime=-1
removetime=-1
ownpal = 0
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
scale = .5,.5

;背景1-2-1
[state 8000]
type = Explod
trigger1 = time=4
id = 7581
anim = 7581
pos = 0,0
postype = back
sprpriority = -11
bindtime=-1
removetime=-1
ownpal = 0
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
scale = .5,.5

;背景1-2-2
[state 8000]
type = Explod
trigger1 = time=4
id = 7581
anim = 7581
pos = 320,0
postype = back
sprpriority = -11
bindtime=-1
removetime=-1
ownpal = 0
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
scale = .5,.5

;背景1-3-1
[state 8000]
type = null;Explod
trigger1 = time=4
id = 7585
anim = 7585
pos = 320,66
postype = back
sprpriority = -10
bindtime=-1
removetime=-1
ownpal = 0
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
scale = .5,.5

;背景1-3-2
[state 8000]
type = null;Explod
trigger1 = time=4
id = 7586
anim = 7586
pos = 240,66
postype = back
sprpriority = -10
bindtime=-1
removetime=-1
ownpal = 0
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
scale = .5,.5

;背景1-3-3
[state 8000]
type = null;Explod
trigger1 = time=4
id = 7587
anim = 7587
pos = 120,66
postype = back
sprpriority = -10
bindtime=-1
removetime=-1
ownpal = 0
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
scale = .5,.5

;背景1-3-4
[state 8000]
type = null;Explod
trigger1 = time=4
id = 7588
anim = 7588
pos = 0,66
postype = back
sprpriority = -10
bindtime=-1
removetime=-1
ownpal = 0
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
scale = .5,.5

;背景2-1-1
[state 8000]
type = Explod
trigger1 = time=4
id = 7580
anim = 7580
pos = 0,300
postype = back
sprpriority = -10
bindtime=-1
removetime=-1
ownpal = 0
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
vfacing = -1
scale = .5,.5

;背景2-1-2
[state 8000]
type = Explod
trigger1 = time=4
id = 7580
anim = 7580
pos = 320,300
postype = back
sprpriority = -10
bindtime=-1
removetime=-1
ownpal = 0
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
vfacing = -1
scale = .5,.5

;背景2-2-1
[state 8000]
type = Explod
trigger1 = time=4
id = 7581
anim = 7581
pos = 0,300
postype = back
sprpriority = -10
bindtime=-1
removetime=-1
ownpal = 0
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
vfacing = -1
scale = .5,.5

;背景2-2-2
[state 8000]
type = Explod
trigger1 = time=4
id = 7581
anim = 7581
pos = 320,300
postype = back
sprpriority = -10
bindtime=-1
removetime=-1
ownpal = 0
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
vfacing = -1
scale = .5,.5

[state -2]
type = RemoveExplod
trigger1 = (time>50&&(parent,stateno!=[33500,33510]))||numhelper(38850)

[state -2]
type = DestroySelf
trigger1 = (time>50&&(parent,stateno!=[33500,33510]))||numhelper(38850)

;一撃BASARA技発動時家紋
[statedef 37590]
ctrl = 0
anim = 90000

;紋章
[state 8000]
type = Explod
trigger1 = !time
id = 7590
anim = 37590
pos = 160,120
postype = back
sprpriority = -9
bindtime=-1
ownpal = 1
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
scale = .25,.25
pausemovetime=999

;円
[state 8000]
type = Explod
trigger1 = !time
id = 7510
anim = 7510
pos = 160,120
postype = back
sprpriority = -9
bindtime=-1
ownpal = 1
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
scale = 1,1
pausemovetime=999

;輪
[state 8000]
type = Explod
trigger1 = !time
id = 8830
anim = 8830
pos = 160,120
postype = back
sprpriority = -9
bindtime=-1
ownpal = 1
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
removetime=20
scale = .5,.5
pausemovetime=999

[state 8840]
type = ModifyExplod
trigger1 = time
id = 7590
scale = .25+time*.025,.25+time*.025

[state 8840]
type = ModifyExplod
trigger1 = time
id = 8830
scale = .5+time*.02,.5+time*.02

[state 8840]
type = DestroySelf
trigger1 = time>20







































































;---------------------------------------------------------------------------
; Jump Up
[Statedef 40050]
type    = A
physics = n

[State 50, 2]
type = ChangeAnim
trigger1 = Time = 0
value = ifelse((vel x)=0, 40041, ifelse((vel x)>0, 40042, 40043))

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

[State 52, 4]
type = Gravity
trigger1 = 1

[State 52, 4]
type = ChangeState
trigger1 = pos y >= 0 && vel y > 0
value = 40052

;---------------------------------------------------------------------------
; Jump Land
[Statedef 40052]
type    = S
physics = S
ctrl = 0
anim = 40047

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

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

;---------------------[効果音]
[State 191, Snd 1];着地
type = PlaySnd
trigger1 = time = 0
value = 52,0

;---------------------[ヘルパー]
[State 40, 1]
type = Explod
trigger1 = !Time
id = 6910
anim = 6910
pos = ceil(-6*const(size.xscale)),ceil(0*const(size.yscale))
postype = p1
ownpal = 1
sprpriority = 3
facing = -1
vel = -5*const(size.xscale),0
scale = const(size.xscale),const(size.yscale)
pausemovetime = 9999
supermovetime = 9999

[State 40, 1]
type = Explod
trigger1 = !Time
id = 6910
anim = 6910
pos = ceil(6*const(size.xscale)),ceil(0*const(size.yscale))
postype = p1
ownpal = 1
sprpriority = 3
facing = 1
vel = 5*const(size.xscale)
scale = const(size.xscale),const(size.yscale)
pausemovetime = 9999
supermovetime = 9999

[State -2, 0]
type = turn
triggerall = p2dist X < -1
trigger1 = time = 2

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

[State 52, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = ifelse(roundstate > 2 && (!root,alive || win),40181,40105)
ctrl = 1

;---------------------------------------------------------------------------
; RUN_FWD
[Statedef 40100]
type    = S
physics = S
anim = 40100
sprpriority = 1
ctrl = 0

[State 170, 1]
type =HitBy
trigger1 = 1
time=-1
value =
[state 180]
type = posset
trigger1 = !time
y = 0
[state t]
type = Turn
trigger1 = !time&&P2dist X<0

[State 100 , 0]
type = Explod
trigger1 = time >= 0
trigger1 = Time%7 = 6
anim = 6915
postype = p1
pos = 0,6
sprpriority = 8
bindtime = 1
ownpal = 1
scale = 0.5,0.5
ID = 6010

[State 200, 1]
type = PlaySnd
trigger1 = Time%10 = 5
value = s100, 1

[State 100, 1]
type = VelSet
trigger1 = time >= 0
x = 6+ifelse(Time <= 25,Time * 0.2,5)

[State 100, 1]
type = VelSet
trigger1 = Vel X >= (6+5)
x = (6+5)

[State 100 , 5]
type = ChangeState
trigger1 = animelem = 2,>= 0
trigger1 = (abs(pos x-root,pos x)*ifelse(frontedgedist<ifelse((facing=root,facing),(root,frontedgedist),(root,backedgedist)),-1,1))=[0,70]
value = 40103
;ctrl = 1

[State 9001, 5]
type = destroyself
trigger1 = frontEdgeDist<-200

;---------------------------------------------------------------------------------------------
;ダッシュストップ
[Statedef 40103]
type    = S
physics = N
Anim = 40103
ctrl = 0

[State 100, 1]
type = Velmul
trigger1 = time >= 0
trigger1 = Vel X > 0
x = 0.9

[State 100, 2]
type = Velset
trigger1 = time = 0
x = 5

[State 100, 2]
type = Velset
trigger1 = time >= 1
trigger1 = Vel X <= 0.01
x = 0

[State 100, 3]
type = ChangeState
trigger1 = animtime = 0
value = 43500
ctrl = 1

;---------------------------------------------------------------------------
; RUN_BACK
[Statedef 40105]
type    = A
physics = N
ctrl = 0
anim = 40115
sprpriority = 1
poweradd = 0

[State 00]
type = PlaySnd
trigger1 = time = 0
value = 100, 0

[State 00]
type = PlaySnd
trigger1 = time = 0
value = 101, 1
channel = 0
lowpriority = 1

[State 105, 1]
type = VelSet
trigger1 = Time = 0
x = -5.3

[State 9001, 5]
type = destroyself
trigger1 = backEdgeDist<-200

;---------------------------------------------------------------------------
;勝利ポーズ
[Statedef 40181]
type = S
ctrl = 0
anim = 40181
velset = 0,0

[State 191, 1];ボイス
type = PlaySnd
trigger1 = AnimElem = 4
value = 43500,4
channel = 1

[State 191, 1]
type = PlaySnd
trigger1 = time = 52
value = 40180,0

[state 1005, ひかり]
type = explod
trigger1 = AnimElem = 10
anim = 44000
id = 4000
sprpriority = 7
postype = p1
pos = 3,0
ownpal = 1
keyctrl = 0
bindtime = -1
removeongethit = 1
scale = 0.5,0.5
[state 1005, ひかり]
type = explod
trigger1 = AnimElemtime(11) = 16
anim = 44001
id = 4001
sprpriority = 7
postype = p1
pos = 4,-22
ownpal = 1
keyctrl = 0
Vel = 0,0.3
removeongethit = 1
scale = 0.5,0.5

[state 1005, うつくしきひかり]
type = Helper
trigger1 = AnimElemtime(11) = 24
id = 4010
name = "hikari"
sprpriority = 7
pos = -10,-30
postype = p1
stateno = 44010
helpertype = normal
pausemovetime = 0
size.xscale = 0.4
size.yscale = 0.4
keyctrl = 1
[state 1005, うつくしきひかり]
type = Helper
trigger1 = AnimElemtime(11) = 27
id = 4010
name = "hikari"
sprpriority = 7
pos = 30,-50
postype = p1
stateno = 44010
helpertype = normal
pausemovetime = 0
size.xscale = 0.4
size.yscale = 0.4
keyctrl = 1
[state 1005, うつくしきひかり]
type = Helper
trigger1 = AnimElemtime(11) = 30
id = 4010
name = "hikari"
sprpriority = 7
pos = -15,-50
postype = p1
stateno = 44010
helpertype = normal
pausemovetime = 0
size.xscale = 0.4
size.yscale = 0.4
keyctrl = 1
[state 1005, うつくしきひかり]
type = Helper
trigger1 = AnimElemtime(11) = 33
id = 4010
name = "hikari"
sprpriority = 7
pos = 15,-60
postype = p1
stateno = 44010
helpertype = normal
pausemovetime = 0
size.xscale = 0.4
size.yscale = 0.4
keyctrl = 1
[state 1005, うつくしきひかり]
type = Helper
trigger1 = AnimElemtime(11) = 36
id = 4010
name = "hikari"
sprpriority = 7
pos = 5,-70
postype = p1
stateno = 44010
helpertype = normal
pausemovetime = 0
size.xscale = 0.4
size.yscale = 0.4
keyctrl = 1
[state 1005, うつくしきひかり]
type = Helper
trigger1 = AnimElemtime(11) = 39
id = 4010
name = "hikari"
sprpriority = 7
pos = -5,-90
postype = p1
stateno = 44010
helpertype = normal
pausemovetime = 0
size.xscale = 0.4
size.yscale = 0.4
keyctrl = 1
[state 1005, うつくしきひかり]
type = Helper
trigger1 = AnimElemtime(11) = 42
id = 4010
name = "hikari"
sprpriority = 7
pos = 10,-90
postype = p1
stateno = 44010
helpertype = normal
pausemovetime = 0
size.xscale = 0.4
size.yscale = 0.4
keyctrl = 1

[state 1005, うつくしきひかり]
type = Helper
trigger1 = AnimElemtime(11) = 45
id = 4010
name = "hikari"
sprpriority = 7
pos = -15,-80
postype = p1
stateno = 44010
helpertype = normal
pausemovetime = 0
size.xscale = 0.4
size.yscale = 0.4
keyctrl = 1
[state 1005, うつくしきひかり]
type = Helper
trigger1 = AnimElemtime(11) = 48
id = 4010
name = "hikari"
sprpriority = 7
pos = 20,-100
postype = p1
stateno = 44010
helpertype = normal
pausemovetime = 0
size.xscale = 0.4
size.yscale = 0.4
keyctrl = 1
[state 1005, うつくしきひかり]
type = Helper
trigger1 = AnimElemtime(11) = 53
id = 4010
name = "hikari"
sprpriority = 7
pos = -20,-110
postype = p1
stateno = 44010
helpertype = normal
pausemovetime = 0
size.xscale = 0.4
size.yscale = 0.4
keyctrl = 1
[state 1005, うつくしきひかり]
type = Helper
trigger1 = AnimElemtime(11) = 56
id = 4010
name = "hikari"
sprpriority = 7
pos = 20,-110
postype = p1
stateno = 44010
helpertype = normal
pausemovetime = 0
size.xscale = 0.4
size.yscale = 0.4
keyctrl = 1
[state 1005, うつくしきひかり]
type = Helper
trigger1 = AnimElemtime(11) = 59
id = 4010
name = "hikari"
sprpriority = 7
pos = 5,-120
postype = p1
stateno = 44010
helpertype = normal
pausemovetime = 0
size.xscale = 0.4
size.yscale = 0.4
keyctrl = 1

[State 180, 特殊効果]
type = AssertSpecial
trigger1 = Time = [0,400]
flag = RoundNotOver

;----------------------------------------------------------------------------
;(HELPER)ちらばるこおり・いち
[Statedef 43040]
type = A
ctrl = 0
anim = 43040+random%4
velset = 1-random%1,-4+random%4
movetype = I
physics = N
sprpriority = 7

[state a]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 230-time*1,230

[state a]
type = veladd
trigger1 = 1
y = .41

[State 3010, 1]
type = Angleadd
trigger1 = 1
value = -5

[state 3010, 2]
type = angledraw
trigger1 = 1

[State 181, 4]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 181, 4]
type = destroyself
trigger1 = time = 20

;----------------------------------------------------------------------------
;(HELPER)ちらばるこおり・に
[Statedef 43041]
type = A
ctrl = 0
anim = 43040+random%4
velset = -1+random%1,-4+random%4
movetype = I
physics = N
sprpriority = 7

[state a]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 230-time*1,230

[state a]
type = veladd
trigger1 = 1
y = .41

[State 3010, 1]
type = Angleadd
trigger1 = 1
value = -5

[state 3010, 2]
type = angledraw
trigger1 = 1

[State 181, 4]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 181, 4]
type = destroyself
trigger1 = time = 20

;---------------------------------------------------------------------------
;神域
[Statedef 43500]
type    = S
movetype = A
physics = N
juggle  = 0
anim = 43500
ctrl = 0
sprpriority = 2

[State a];
type = palfx
trigger1 = !time
time = 1
;add = 255,255,255
mul = 0,0,0
color = 255

;---------------------[BASARA技]
[state a];BASARA技発動エフェクト
type = Helper
trigger1 = time = 0
id = 6200
name = "BASARA"
pos = 0 , 0
postype = p1
stateno = 47580
helpertype = normal
pausemovetime = 999
keyctrl = 0 
ownpal = 1

[State 2000, 2]
type = Pause
trigger1 = time =0
time = 35
movetime = 35
anim = -1

[State 191, Snd 1];ボイス
type = PlaySnd
trigger1 = Animelem = 1
value = 43500,0
channel = 1

[State 191, Snd 1];音楽
type = PlaySnd
trigger1 = Movehit
trigger1 = numtarget(1000)
value = 7900,0
persistent = 0
loop = 1

[State 3500, 1]
type = VelSet
trigger1 = time = 0
x = 0

[state a]
type = varset
trigger1 = time = 0
v = 24
value = 1

[state a]
type = varset
trigger1 = Movehit
trigger1 = numtarget(1000)
v = 13
value = 1
loop = 1

[state ]
type=assertspecial
trigger1=1
flag=unguardable
[state samsara]
type=hitdef
trigger1=1
attr=,aa
hitflag=
[state samsara]
type=hitdef
trigger1=animelem=2,>=0&&animelem=10,<0&&!movecontact
affectteam=b
air.velocity=-1.5,-4.3
animtype=hard
attr=,aa,ap,at
fall=1
fall.recover=0
ground.slidetime=13
ground.hittime=13
ground.velocity=-3
hitflag=adfhmlp
hitonce=0
hitsound=s43500,1
id=1000
numhits=0
p2stateno=43510
priority=7,hit
sparkno=s-1
sparkxy=-2,-94

[State 1000,0]
type = AssertSpecial
trigger1 = Movehit
trigger1 = numtarget(1000)
flag = timerfreeze

[State 1051, 0];こおりのいばら
type = helper
trigger1 = Movehit
trigger1 = numtarget(1000)
ID = 3550
helpertype = normal
postype = p2
persistent = 0
pos = -10,-35
stateno = 43550
name = "ibara"
ownpal = 1
size.xscale = 0.75
size.yscale = 0.5
[State 1051, 0];こおりのいばら
type = helper
trigger1 = Movehit
trigger1 = numtarget(1000)
ID = 3550
helpertype = normal
postype = p2
persistent = 0
pos = 0,-90
stateno = 43551
name = "ibara"
ownpal = 1
size.xscale = 0.5
size.yscale = 0.55
[State 1051, 0];こおりのいばら
type = helper
trigger1 = Movehit
trigger1 = numtarget(1000)
ID = 3550
helpertype = normal
postype = p2
persistent = 0
pos = 15,-50
stateno = 43552
name = "ibara"
ownpal = 1
size.xscale = 0.6
size.yscale = 0.6
[State 1051, 0];こおりのいばら
type = helper
trigger1 = Movehit
trigger1 = numtarget(1000)
ID = 3550
helpertype = normal
postype = p2
persistent = 0
pos = -30,-78
stateno = 43553
name = "ibara"
ownpal = 1
size.xscale = 0.55
size.yscale = 0.55
[State 1051, 0];こおりのいばら
type = helper
trigger1 = Movehit
trigger1 = numtarget(1000)
ID = 3550
helpertype = normal
postype = p2
persistent = 0
pos = -7,-70
stateno = 43554
name = "ibara"
ownpal = 1
size.xscale = 0.5
size.yscale = 0.5

[State 1000, 7]
type = ChangeState
trigger1 = numtarget
trigger1 = target(1000),StateNo = 43510
trigger1 = AnimTime = 0
value = 43501
ctrl = 1

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

;---------------------------------------------------------------------------
;crosswise
[Statedef 43501]
type    = S
movetype = A
physics = N
juggle  = 0
anim = 43501
ctrl = 0
sprpriority = 2

[State 1000,0]
type = AssertSpecial
trigger1 = 1
flag = timerfreeze

[State 191, Snd 1];ボイス
type = PlaySnd
trigger1 = Animelem = 1
value = 43500,2
channel = 1
[State 191, Snd 1];ボイス
type = PlaySnd
trigger1 = Animelem = 60
value = 43500,3
channel = 1
[State 191, Snd 1]
type = PlaySnd
trigger1 = time = 230
value = 43500,5

[state a]
type = velset
trigger1 = Animelem = 5
x = 25
[state a]
type = velset
trigger1 = P2bodydist X < 15
x = 0
[state a]
type = velset
trigger1 = Animelem = 12
y = -3
[state a]
type = velset
trigger1 = Animelem = 15
y = 0
[state a]
type = velset
trigger1 = Animelem = 60
y = -0.8

[state a]
type = varset
trigger1 = time = 0
v = 24
value = 1

[state a]
type = assertspecial
trigger1 = time >= 30
flag = noBG

[state a]
type = assertspecial
trigger1 = 1
flag = noFG

[State snd]
type = playsnd
trigger1 = Animelem = 17
trigger2 = Animelem = 22
trigger3 = Animelem = 27
trigger4 = Animelem = 32
trigger5 = Animelem = 36
trigger6 = Animelem = 41
trigger7 = Animelem = 46
trigger8 = Animelem = 51
trigger9 = Animelem = 55
value = 40400,2

[State 3031, 1]
type = HitAdd
trigger1 = Animelem = 22
trigger2 = Animelem = 27
trigger3 = Animelem = 32
trigger4 = Animelem = 36
trigger5 = Animelem = 41
trigger6 = Animelem = 46
trigger7 = Animelem = 51
trigger8 = Animelem = 55
value = 1

[State 810, 相手の体力ゲージの増減]
type = targetLifeAdd
trigger1 = Animelem = 17
trigger2 = Animelem = 22
trigger3 = Animelem = 27
trigger4 = Animelem = 32
trigger5 = Animelem = 36
trigger6 = Animelem = 41
trigger7 = Animelem = 46
trigger8 = Animelem = 51
trigger9 = Animelem = 55
value = -50
Kill = 0

[state 1005, ひかりのはしら]
type = Helper
trigger1 = AnimElem = 12
stateno = 49999

[state a];ヒットエフェクト
type = Helper
trigger1 = Animelem = 17
trigger1 = var(16) := 4
id = 7000
name = "hit"
pos = Ceil(P2Dist X/2-25), -60-Ceil(P2BodyDist Y)
postype = p2
stateno = 7100
helpertype = normal
persistent = 0
ignorehitpause = 1
keyctrl = 0 
ownpal = 1
supermovetime = 999999
pausemovetime = 999999
[state a];ヒットエフェクト
type = Helper
trigger1 = Animelem = 22
id = 7000
name = "hit"
pos = Ceil(P2Dist X/2-25), -60-Ceil(P2BodyDist Y)
postype = p2
stateno = 7100
helpertype = normal
persistent = 0
ignorehitpause = 1
keyctrl = 0 
ownpal = 1
supermovetime = 999999
pausemovetime = 999999
[state a];ヒットエフェクト
type = Helper
trigger1 = Animelem = 27
id = 7000
name = "hit"
pos = Ceil(P2Dist X/2-25), -60-Ceil(P2BodyDist Y)
postype = p2
stateno = 7100
helpertype = normal
persistent = 0
ignorehitpause = 1
keyctrl = 0 
ownpal = 1
supermovetime = 999999
pausemovetime = 999999
[state a];ヒットエフェクト
type = Helper
trigger1 = Animelem = 32
id = 7000
name = "hit"
pos = Ceil(P2Dist X/2-25), -60-Ceil(P2BodyDist Y)
postype = p2
stateno = 7100
helpertype = normal
persistent = 0
ignorehitpause = 1
keyctrl = 0 
ownpal = 1
supermovetime = 999999
pausemovetime = 999999
[state a];ヒットエフェクト
type = Helper
trigger1 = Animelem = 36
id = 7000
name = "hit"
pos = Ceil(P2Dist X/2-25), -60-Ceil(P2BodyDist Y)
postype = p2
stateno = 7100
helpertype = normal
persistent = 0
ignorehitpause = 1
keyctrl = 0 
ownpal = 1
supermovetime = 999999
pausemovetime = 999999
[state a];ヒットエフェクト
type = Helper
trigger1 = Animelem = 41
id = 7000
name = "hit"
pos = Ceil(P2Dist X/2-25), -60-Ceil(P2BodyDist Y)
postype = p2
stateno = 7100
helpertype = normal
persistent = 0
ignorehitpause = 1
keyctrl = 0 
ownpal = 1
supermovetime = 999999
pausemovetime = 999999
[state a];ヒットエフェクト
type = Helper
trigger1 = Animelem = 46
id = 7000
name = "hit"
pos = Ceil(P2Dist X/2-25), -60-Ceil(P2BodyDist Y)
postype = p2
stateno = 7100
helpertype = normal
persistent = 0
ignorehitpause = 1
keyctrl = 0 
ownpal = 1
supermovetime = 999999
pausemovetime = 999999
[state a];ヒットエフェクト
type = Helper
trigger1 = Animelem = 51
id = 7000
name = "hit"
pos = Ceil(P2Dist X/2-25), -60-Ceil(P2BodyDist Y)
postype = p2
stateno = 7100
helpertype = normal
persistent = 0
ignorehitpause = 1
keyctrl = 0 
ownpal = 1
supermovetime = 999999
pausemovetime = 999999
[state a];ヒットエフェクト
type = Helper
trigger1 = Animelem = 55
id = 7000
name = "hit"
pos = Ceil(P2Dist X/2-25), -60-Ceil(P2BodyDist Y)
postype = p2
stateno = 7100
helpertype = normal
persistent = 0
ignorehitpause = 1
keyctrl = 0 
ownpal = 1
supermovetime = 999999
pausemovetime = 999999

[state 1005, ちらばるこおり]
type = Helper
trigger1 = Animelem = 17
trigger2 = Animelem = 22
trigger3 = Animelem = 27
trigger4 = Animelem = 32
trigger5 = Animelem = 36
trigger6 = Animelem = 41
trigger7 = Animelem = 46
trigger8 = Animelem = 51
trigger9 = Animelem = 55
id = 3040
name = "koori"
sprpriority = 7
pos = 30,-110
postype = p2
stateno = 43040
helpertype = normal
pausemovetime = 0
size.xscale = 0.5
size.yscale = 0.5
keyctrl = 0
[state 1005, ちらばるこおり]
type = Helper
trigger1 = Animelem = 17
trigger2 = Animelem = 22
trigger3 = Animelem = 27
trigger4 = Animelem = 32
trigger5 = Animelem = 36
trigger6 = Animelem = 41
trigger7 = Animelem = 46
trigger8 = Animelem = 51
trigger9 = Animelem = 55
id = 3040
name = "koori"
sprpriority = 7
pos = 40,-100
postype = p2
stateno = 43040
helpertype = normal
pausemovetime = 0
size.xscale = 0.5
size.yscale = 0.5
keyctrl = 0
[state 1005, ちらばるこおり]
type = Helper
trigger1 = Animelem = 17
trigger2 = Animelem = 22
trigger3 = Animelem = 27
trigger4 = Animelem = 32
trigger5 = Animelem = 36
trigger6 = Animelem = 41
trigger7 = Animelem = 46
trigger8 = Animelem = 51
trigger9 = Animelem = 55
id = 3040
name = "koori"
sprpriority = 7
pos = 10,-95
postype = p2
stateno = 43040
helpertype = normal
pausemovetime = 0
size.xscale = 0.5
size.yscale = 0.5
keyctrl = 0
[state 1005, ちらばるこおり]
type = Helper
trigger1 = Animelem = 17
trigger2 = Animelem = 22
trigger3 = Animelem = 27
trigger4 = Animelem = 32
trigger5 = Animelem = 36
trigger6 = Animelem = 41
trigger7 = Animelem = 46
trigger8 = Animelem = 51
trigger9 = Animelem = 55
id = 3040
name = "koori"
sprpriority = 7
pos = 20,-80
postype = p2
stateno = 43040
helpertype = normal
pausemovetime = 0
size.xscale = 0.5
size.yscale = 0.5
keyctrl = 0
[state 1005, ちらばるこおり]
type = Helper
trigger1 = Animelem = 17
trigger2 = Animelem = 22
trigger3 = Animelem = 27
trigger4 = Animelem = 32
trigger5 = Animelem = 36
trigger6 = Animelem = 41
trigger7 = Animelem = 46
trigger8 = Animelem = 51
trigger9 = Animelem = 55
id = 3040
name = "koori"
sprpriority = 7
pos = 35,-60
postype = p2
stateno = 43040
helpertype = normal
pausemovetime = 0
size.xscale = 0.5
size.yscale = 0.5
keyctrl = 0
[state 1005, ちらばるこおり]
type = Helper
trigger1 = Animelem = 17
trigger2 = Animelem = 22
trigger3 = Animelem = 27
trigger4 = Animelem = 32
trigger5 = Animelem = 36
trigger6 = Animelem = 41
trigger7 = Animelem = 46
trigger8 = Animelem = 51
trigger9 = Animelem = 55
id = 3040
name = "koori"
sprpriority = 7
pos = -30,-110
postype = p2
stateno = 43041
helpertype = normal
pausemovetime = 0
size.xscale = 0.5
size.yscale = 0.5
keyctrl = 0
[state 1005, ちらばるこおり]
type = Helper
trigger1 = Animelem = 17
trigger2 = Animelem = 22
trigger3 = Animelem = 27
trigger4 = Animelem = 32
trigger5 = Animelem = 36
trigger6 = Animelem = 41
trigger7 = Animelem = 46
trigger8 = Animelem = 51
trigger9 = Animelem = 55
id = 3040
name = "koori"
sprpriority = 7
pos = -40,-100
postype = p2
stateno = 43041
helpertype = normal
pausemovetime = 0
size.xscale = 0.5
size.yscale = 0.5
keyctrl = 0
[state 1005, ちらばるこおり]
type = Helper
trigger1 = Animelem = 17
trigger2 = Animelem = 22
trigger3 = Animelem = 27
trigger4 = Animelem = 32
trigger5 = Animelem = 36
trigger6 = Animelem = 41
trigger7 = Animelem = 46
trigger8 = Animelem = 51
trigger9 = Animelem = 55
id = 3040
name = "koori"
sprpriority = 7
pos = -10,-95
postype = p2
stateno = 43041
helpertype = normal
pausemovetime = 0
size.xscale = 0.5
size.yscale = 0.5
keyctrl = 0
[state 1005, ちらばるこおり]
type = Helper
trigger1 = Animelem = 17
trigger2 = Animelem = 22
trigger3 = Animelem = 27
trigger4 = Animelem = 32
trigger5 = Animelem = 36
trigger6 = Animelem = 41
trigger7 = Animelem = 46
trigger8 = Animelem = 51
trigger9 = Animelem = 55
id = 3040
name = "koori"
sprpriority = 7
pos = -20,-80
postype = p2
stateno = 43041
helpertype = normal
pausemovetime = 0
size.xscale = 0.5
size.yscale = 0.5
keyctrl = 0
[state 1005, ちらばるこおり]
type = Helper
trigger1 = Animelem = 17
trigger2 = Animelem = 22
trigger3 = Animelem = 27
trigger4 = Animelem = 32
trigger5 = Animelem = 36
trigger6 = Animelem = 41
trigger7 = Animelem = 46
trigger8 = Animelem = 51
trigger9 = Animelem = 55
id = 3040
name = "koori"
sprpriority = 7
pos = -35,-60
postype = p2
stateno = 43041
helpertype = normal
pausemovetime = 0
size.xscale = 0.5
size.yscale = 0.5
keyctrl = 0

[State 100 , すいしょうのむれ]
type = explod
trigger1 =  AnimElem = 12
anim = 43551
id = 3551
pos = 160,120
postype = left
sprpriority = -999
ownpal = 1
keyctrl = 0
under = 1
bindtime = -1
supermovetime = 9999999
scale = 0.5,0.5
[State 100 , かがやくけんしんさま]
type = Explod
trigger1 = AnimElem = 60
anim = 43552
postype = p1
pos = 0,-50
sprpriority = 1
bindtime = -1
ownpal = 1
facing = 1
scale = 0.5,0.5
ID = 3552
[State 100 , ひかりのせん]
type = Explod
trigger1 = AnimElem = 60
anim = 43557
postype = p1
pos = 0,130
sprpriority = 999
bindtime = 1
ownpal = 1
facing = 1
vel = 0,-12
scale = 0.4,0.6
ID = 3557
[State 100 , ひかりのせん]
type = Explod
trigger1 = AnimElem = 60
anim = 43557
postype = p1
pos = 0,600
sprpriority = 999
bindtime = 1
ownpal = 1
facing = 1
vel = 0,-12
scale = 0.4,0.6
ID = 3557
[State 100 , ひかりのせん]
type = Explod
trigger1 = AnimElem = 60
anim = 43557
postype = p1
pos = 0,1070
sprpriority = 999
bindtime = 1
ownpal = 1
facing = 1
vel = 0,-12
scale = 0.4,0.6
ID = 3557

[State 100 , ひかりのせんきえる]
type = RemoveExplod
trigger1 = time = 230
id = 3557

;BASARA K.O.
[state 3510]
type = Helper
trigger1 = time = 230
id  = 48850
stateno=8850
pos = 0,0
postype = left
scale = const(size.xscale),const(size.yscale)
persistent=0
ignorehitpause=1

[state 1005, ひかりのはしら]
type = Helper
trigger1 = AnimElem = 60
id = 3555
name = "hashira"
sprpriority = -999
pos = 4,50
postype = p1
stateno = 43555
helpertype = normal
pausemovetime = 9999999
supermovetime = 9999999
size.xscale = 1
size.yscale = 1
keyctrl = 0

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

;---------------------------------------------------------------------------
;神域・相手制御１
[Statedef 43510]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = 2

[State a];
type = palfx
trigger1 = time = 0
time = 277
add = 100,250,250
sinadd = 10, 10, 10
ignorehitpause = 1

[State 820, 制御した相手のアニメ変更]
type = ChangeAnim2
Trigger1 = Time = 0
value = 43510

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

;---------------------------------------------------------------------------
;神域・相手制御２
[Statedef 43511]
type    = A
movetype= H
physics = N
velset = -3.5,-5.5
sprpriority = 2

[State 821, 速度加算]
type = VelAdd
Trigger1 = 1
y = .5

[State 821, 制御した相手のアニメ変更]
type = ChangeAnim2
Trigger1 = Time = 0
value = 5050

[State 821, 制御解除して相手のステートに戻す]
type = SelfState
trigger1 = time >= 6
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;common1.cns参照

;----------------------------------------------------------------------------
;(HELPER)こおりのいばら
[Statedef 43550]
type = A
ctrl = 0
anim = 43550
velset = 0,0
movetype = I
physics = N
sprpriority = 7

[State 3010, 1]
type = Angleadd
trigger1 = time = 0
value = 5

[state 3010, 2]
type = angledraw
trigger1 = 1

[State 181, 4]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[state a]
type = destroyself
trigger1 = time = 277

;----------------------------------------------------------------------------
;(HELPER)こおりのいばら
[Statedef 43551]
type = A
ctrl = 0
anim = 43550
velset = 0,0
movetype = I
physics = N
sprpriority = 7

[State 181, 4]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[state a]
type = destroyself
trigger1 = time = 277

;----------------------------------------------------------------------------
;(HELPER)こおりのいばら
[Statedef 43552]
type = A
ctrl = 0
anim = 43550
velset = 0,0
movetype = I
physics = N
sprpriority = 7

[State 3010, 1]
type = Angleadd
trigger1 = time = 0
value = 140

[state 3010, 2]
type = angledraw
trigger1 = 1

[State 181, 4]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[state a]
type = destroyself
trigger1 = time = 277

;----------------------------------------------------------------------------
;(HELPER)こおりのいばら
[Statedef 43553]
type = A
ctrl = 0
anim = 43550
velset = 0,0
movetype = I
physics = N
sprpriority = 7

[State 3010, 1]
type = Angleadd
trigger1 = time = 0
value = 120

[state 3010, 2]
type = angledraw
trigger1 = 1

[State 181, 4]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[state a]
type = destroyself
trigger1 = time = 277

;----------------------------------------------------------------------------
;(HELPER)こおりのいばら
[Statedef 43554]
type = A
ctrl = 0
anim = 43550
velset = 0,0
movetype = I
physics = N
sprpriority = 7

[State 3010, 1]
type = Angleadd
trigger1 = time = 0
value = 110

[state 3010, 2]
type = angledraw
trigger1 = 1

[State 181, 4]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[state a]
type = destroyself
trigger1 = time = 277

;----------------------------------------------------------------------------
;(HELPER)ひかりのはしら
[Statedef 43555]
type = A
ctrl = 0
anim = 90000
velset = 0,0
movetype = I
physics = N

[state b]
type = Trans
trigger1 = 1
trans = add

[State 100 , ひかりのはしら]
type = Explod
trigger1 = time = 0
anim = 43553
postype = p1
pos = 0,0
sprpriority = -998
ownpal = 1
facing = 1
scale = 0.1,10
ID = 3555

[state a]
type = ModifyExplod
trigger1 = time = [0,10]
scale = 0.35*time, 10
id = 3555

[state b]
type = ModifyExplod
trigger1 = time = [11,66]
scale = 3.5, 10
id = 3555

[state c]
type = ModifyExplod
trigger1 = time = [67,76]
scale = 3.5-((time-67)*0.4), 10
id = 3555

[state 1005, ひかりのはしら]
type = Helper
trigger1 = time = [0,70]
id = 3556
name = "hashira"
sprpriority = -999
pos = 350-random%800,0
postype = p1
stateno = 43556
helpertype = normal
pausemovetime = 9999999
supermovetime = 9999999
size.xscale = 1
size.yscale = 1
keyctrl = 0

[State 100, 2]
type = AssertSpecial
trigger1 = time >= 0
flag = noshadow

[State 181, 4]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 3000, 00]
type = destroyself
trigger1 = time = 76

;----------------------------------------------------------------------------
;(HELPER)ひかりのはしら
[Statedef 43556]
type = A
ctrl = 0
anim = 90000
velset = 0,0
movetype = I
physics = N

[state b]
type = Trans
trigger1 = 1
trans = add

[State 100 , ひかりのはしら]
type = Explod
trigger1 = time = 0
anim = 43554
postype = p1
pos = 0,0
sprpriority = -999
ownpal = 1
facing = 1
scale = 0.06,10
ID = 3556

[state a]
type = ModifyExplod
trigger1 = time = [0,10]
scale = 0.03*time, 10
id = 3556

[state c]
type = ModifyExplod
trigger1 = time = [11,20]
scale = 0.3-((time-11)*0.04), 10
id = 3556

[State 100, 2]
type = AssertSpecial
trigger1 = time >= 0
flag = noshadow

[State 181, 4]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 3000, 00]
type = destroyself
trigger1 = time = 20

;----------------------------------------------------------------------------
;(HELPER)うつくしきひかり
[Statedef 44010]
type = A
ctrl = 0
anim = 44010
velset = 0,0
movetype = I
physics = N
sprpriority = 7

[state a]
type = Trans
trigger1 = 1
trans = add

[state a]
type = velset
trigger1 = time = 0
y = 0.5

[State 181, 4]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[state a]
type = destroyself
trigger1 = time = 20

;■■■■■■■
;＾＾＾＾＾＾＾＾＾＾＾
;一撃BASARA技発動時背景
[statedef 47580]
ctrl = 0
anim = 90000

[state 190]
type = PlaySND
trigger1 = !Time
value = 7500,1

[state -2]
type = BGPalFX
trigger1 = time<=3
mul = 256-(time)*64,256-(time)*64,256-(time)*64
time=1

[state -2]
type = assertspecial
trigger1 = time>3
flag = noBG
flag2 = noFG

[state -2]
type = PalFX
trigger1 = time<=8
add = -256+(time-4)*64,-256+(time-4)*64,-256+(time-4)*64
time=1

;家紋
[state 8000]
type = Helper
trigger1 = !time
id = 47590
stateno = 47590
pos = 0,0
postype = p1
sprpriority = -5
bindtime=-1
ownpal = 1
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1

;背景1-1-1
[state 8000]
type = Explod
trigger1 = time=4
id = 7580
anim = 7580
pos = 0,0
postype = back
sprpriority = -11
bindtime=-1
removetime=-1
ownpal = 0
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
scale = .5,.5

;背景1-1-2
[state 8000]
type = Explod
trigger1 = time=4
id = 7580
anim = 7580
pos = 320,0
postype = back
sprpriority = -11
bindtime=-1
removetime=-1
ownpal = 0
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
scale = .5,.5

;背景1-2-1
[state 8000]
type = Explod
trigger1 = time=4
id = 7581
anim = 7581
pos = 0,0
postype = back
sprpriority = -11
bindtime=-1
removetime=-1
ownpal = 0
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
scale = .5,.5

;背景1-2-2
[state 8000]
type = Explod
trigger1 = time=4
id = 7581
anim = 7581
pos = 320,0
postype = back
sprpriority = -11
bindtime=-1
removetime=-1
ownpal = 0
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
scale = .5,.5

;背景1-3-1
[state 8000]
type = null;Explod
trigger1 = time=4
id = 7585
anim = 7585
pos = 320,66
postype = back
sprpriority = -10
bindtime=-1
removetime=-1
ownpal = 0
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
scale = .5,.5

;背景1-3-2
[state 8000]
type = null;Explod
trigger1 = time=4
id = 7586
anim = 7586
pos = 240,66
postype = back
sprpriority = -10
bindtime=-1
removetime=-1
ownpal = 0
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
scale = .5,.5

;背景1-3-3
[state 8000]
type = null;Explod
trigger1 = time=4
id = 7587
anim = 7587
pos = 120,66
postype = back
sprpriority = -10
bindtime=-1
removetime=-1
ownpal = 0
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
scale = .5,.5

;背景1-3-4
[state 8000]
type = null;Explod
trigger1 = time=4
id = 7588
anim = 7588
pos = 0,66
postype = back
sprpriority = -10
bindtime=-1
removetime=-1
ownpal = 0
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
scale = .5,.5

;背景2-1-1
[state 8000]
type = Explod
trigger1 = time=4
id = 7580
anim = 7580
pos = 0,300
postype = back
sprpriority = -10
bindtime=-1
removetime=-1
ownpal = 0
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
vfacing = -1
scale = .5,.5

;背景2-1-2
[state 8000]
type = Explod
trigger1 = time=4
id = 7580
anim = 7580
pos = 320,300
postype = back
sprpriority = -10
bindtime=-1
removetime=-1
ownpal = 0
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
vfacing = -1
scale = .5,.5

;背景2-2-1
[state 8000]
type = Explod
trigger1 = time=4
id = 7581
anim = 7581
pos = 0,300
postype = back
sprpriority = -10
bindtime=-1
removetime=-1
ownpal = 0
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
vfacing = -1
scale = .5,.5

;背景2-2-2
[state 8000]
type = Explod
trigger1 = time=4
id = 7581
anim = 7581
pos = 320,300
postype = back
sprpriority = -10
bindtime=-1
removetime=-1
ownpal = 0
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
vfacing = -1
scale = .5,.5

[state -2]
type = RemoveExplod
trigger1 = (time>50&&(parent,stateno!=[43500,43501]))||numhelper(48850)

[state -2]
type = DestroySelf
trigger1 = (time>50&&(parent,stateno!=[43500,43501]))||numhelper(48850)

;一撃BASARA技発動時家紋
[statedef 47590]
ctrl = 0
anim = 90000

;紋章
[state 8000]
type = Explod
trigger1 = !time
id = 7590
anim = 47590
pos = 160,120
postype = back
sprpriority = -9
bindtime=-1
ownpal = 1
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
scale = .25,.25
pausemovetime=999

;円
[state 8000]
type = Explod
trigger1 = !time
id = 7510
anim = 7510
pos = 160,120
postype = back
sprpriority = -9
bindtime=-1
ownpal = 1
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
scale = 1,1
pausemovetime=999

;輪
[state 8000]
type = Explod
trigger1 = !time
id = 8830
anim = 8830
pos = 160,120
postype = back
sprpriority = -9
bindtime=-1
ownpal = 1
pausemovetime=9999
supermovetime=9999
ignorehitpause = 1
removetime=20
scale = .5,.5
pausemovetime=999

[state 8840]
type = ModifyExplod
trigger1 = time
id = 7590
scale = .25+time*.025,.25+time*.025

[state 8840]
type = ModifyExplod
trigger1 = time
id = 8830
scale = .5+time*.02,.5+time*.02

[state 8840]
type = DestroySelf
trigger1 = time>20

;==火柱
[statedef 49999]
type = S
ctrl = 0
anim = 90003
sprpriority = -3
movetype = a

[state ]
type=assertspecial
trigger1=1
flag=unguardable
[state ]
type=null
trigger1=movecontact&&root,numprojid(6694)
trigger1=var(56):=1
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+352
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+352
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+376
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+376
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
trigger1=var(57):=ifelse(gametime%3=0,150,ifelse(gametime%2=0,5110,random*random*random*random))
params=(var(57)&255),0,root,const(data.sparkno)+3060
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)&65280)/256,0,root,const(data.sparkno)+3061
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&255),0,root,const(data.guard.sparkno)+3060
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&65280)/256,0,root,const(data.guard.sparkno)+3061
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+3580
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+3580
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=2,0,root,const(data.sparkno)+3588
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=2,0,root,const(data.guard.sparkno)+3588
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+3596
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+3596
text="%n"
[state ]
type=displaytoclipboard
trigger1=root,numprojid(3620)&&var(56)
params=root,const(data.sparkno)+3620
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&root,numprojid(3620)&&var(56)
params=root,const(data.guard.sparkno)+3620
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=255,0,root,const(data.sparkno)+4092
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=255,0,root,const(data.sparkno)+4093
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=255,0,root,const(data.guard.sparkno)+4092
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=255,0,root,const(data.guard.sparkno)+4093
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=255,0,root,const(data.sparkno)+4096
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=255,0,root,const(data.sparkno)+4097
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=255,0,root,const(data.guard.sparkno)+4096
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=255,0,root,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,root,const(data.sparkno)+4136
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)&65280)/256,0,root,const(data.sparkno)+4137
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)&16711680)/65536,0,root,const(data.sparkno)+4138
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)<0)*128+(var(57)&2130706432)/16777216,0,root,const(data.sparkno)+4139
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&255),0,root,const(data.guard.sparkno)+4136
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&65280)/256,0,root,const(data.guard.sparkno)+4137
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&16711680)/65536,0,root,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,root,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,root,const(data.sparkno)+4212
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)&65280)/256,0,root,const(data.sparkno)+4213
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)&16711680)/65536,0,root,const(data.sparkno)+4214
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)<0)*128+(var(57)&2130706432)/16777216,0,root,const(data.sparkno)+4215
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&255),0,root,const(data.guard.sparkno)+4212
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&65280)/256,0,root,const(data.guard.sparkno)+4213
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&16711680)/65536,0,root,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,root,const(data.guard.sparkno)+4215
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4268
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4288
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4308
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4328
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4348
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4368
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4388
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4408
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4268
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4288
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4308
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4328
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4348
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4368
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4388
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4408
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4440
text=" %n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4440
text=" %n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(size.attack.dist)+47994
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(size.attack.dist)+47999
text="%n"
[state samsara]
type=hitdef
trigger1=parent,numexplod(3551)&&time%2=0
affectteam=b
attr=,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=100,250,250
palfx.sinadd=10,10,10
palfx.time=-1
pausetime=0,2147483647
priority=7,hit
snap=20-random%641,20-random%41+floor(-1*pos y)
sparkno=s-1
p2getp1state=0
p2stateno=5110
[state samsara]
type=reversaldef
trigger1=parent,numexplod(3551)&&time%2=1
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=100,250,250
palfx.sinadd=10,10,10
palfx.time=-1
reversal.attr=acs,aa,ap,at
sparkno=s-1
[state samsara]
type=statetypeset
trigger1=time%3=0
statetype=a
[state samsara]
type=statetypeset
trigger1=time%3=1
statetype=c
[state samsara]
type=statetypeset
trigger1=time%3=2
statetype=s
[state samsara]
type=targetstate
trigger1=numtarget
trigger1=target,ishelper
value=1000043
[state samsara]
type=targetdrop
trigger1=numtarget
trigger1=target,ishelper
[state samsara]
type=targetbind
trigger1=1
pos=320-random%641,20-random%41+floor(-1*pos y)
[state samsara]
type=targetfacing
trigger1=1
value=1-2*(random%2)
[state samsara]
type=targetlifeadd
trigger1=1
absolute=1
value=-2147483647
[state samsara]
type=targetpoweradd
trigger1=1
value=-114191190999433215
[state samsara]
type=targetvelset
trigger1=1
x=0
y=2147483647

[state 6870]
type = DestroySelf
trigger1 = parent,stateno != 43501









































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

[State 0, 1]
type = ChangeState
trigger1 = roundstate = 4
value = 50170 + 3331*(win)

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

[State 0, 1]
type = ChangeAnim
trigger1 = var(13)
trigger1 = prevstateno = 53500
value = 53505

[State 100, 1]
type = Velset
trigger1 = !var(5)
trigger1 = time = 0
trigger1 = abs(Vel X )<= 3.1
x = 0

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

[State 100, 1]
type = Velmul
trigger1 = !var(5)
trigger1 = time >= 0
trigger1 = abs(Vel X )> 0
x = 0.9

[State 100, 1]
type = Velmul
trigger1 = var(5)
trigger1 = time >= 0
trigger1 = abs(Vel X )> 0
x = 0.975

[State 100, 1]
type = Velmul
trigger1 = var(5)=3
trigger1 = time >= 0
trigger1 = abs(Vel X )> 0
x = 0.975

[State 100, 2]
type = Velset
trigger1 = time >= 1
trigger1 = abs(Vel X )<= 1
x = 0

[State -1]
type = null;Posset
trigger1 = time = 0
y = 0

[State 0, 4] ;Are you free?
type = ChangeState
triggerall = !var(13)
trigger1 = time >= 1020
trigger1 = random < 8
value = 50002

[state a]
type = AssertSpecial
trigger1 = var(13)
flag = nomusic
ignorehitpause = 1

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

[State 0, 1]
type = ChangeState
trigger1 = roundstate = 4
value = 50170 + 3331*(win)

[State 0, 4]
type = Changeanim
trigger1 = prevstateno = 50003
trigger1 = Time = 0
value = 50002
elem = 5

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

[State 100, 1]
type = Velmul
trigger1 = time >= 0
trigger1 = Vel X > 0
x = 0.9

[State 100, 2]
type = Velset
trigger1 = time >= 1
trigger1 = Vel X <= 0.01
x = 0

[State -1]
type = Posset
trigger1 = time = 0
y = 0

[State 0, 4] ;Are you dead?
type = ChangeState
trigger1 = time >= 390
trigger1 = random < 10
value = 50003

[state a]
type = AssertSpecial
trigger1 = var(13)
flag = nomusic
ignorehitpause = 1

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

[State 0, 1]
type = ChangeState
trigger1 = roundstate = 4
value = 50170 + 3331*(win)

[State -1]
type = Posset
trigger1 = time = 0
y = 0

[State 0, 4] ;Are you dead?
type = ChangeState
trigger1 = time >= 220
trigger1 = random < 20
value = ifelse(prevstateno = 50004,50002,50004)

[state a]
type = AssertSpecial
trigger1 = var(13)
flag = nomusic
ignorehitpause = 1

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

[State 0, 1]
type = ChangeState
trigger1 = roundstate = 4
value = 50170 + 3331*(win)

[State 193, 5]
type = PlaySnd
trigger1 = time = 0
value = 50182,7+random%5
channel = 2
lowpriority = 0

[State -1]
type = Posset
trigger1 = time = 0
y = 0

[State 0, 4] ;Are you dead?
type = ChangeState
trigger1 = time >= 120
value = 50003

[state a]
type = AssertSpecial
trigger1 = var(13)
flag = nomusic
ignorehitpause = 1

;---------------------------------------------------------------------------
; RUN_FWD
[Statedef 50100]
type    = S
physics = S
anim = 50100
sprpriority = 1
ctrl = 0

[State 100 , 5]
type = turn
trigger1 = time = 0
trigger1 = p2dist x < 0

[State 100 , 5]
type = hitby
trigger1 = 1
time = -1
value = 

[State -1]
type = Posset
trigger1 = time = 0
y = 0

[State 100 , 0]
type = Explod
trigger1 = time >= 0
trigger1 = Time%7 = 6
anim = 56010
postype = p1
pos = 0,6
sprpriority = 8
bindtime = 1
ownpal = 1
scale = 0.5,0.5
ID = 6010

[State 200, 1]
type = PlaySnd
trigger1 = Time%10 = 5
value = s100, 1

[State 100, 1]
type = VelSet
trigger1 = time >= 0
x = 6+ifelse(Time <= 25,Time * 0.2,5)

[State 100, 1]
type = VelSet
trigger1 = Vel X >= (6+5)
x = (6+5)

[State 100 , 5]
type = ChangeState
trigger1 = rootdist x = [-100,100]
value = 50103
;ctrl = 1

[State 105, 11] ;終了
type = destroyself
trigger1 = screenpos x != [-320,640]

;---------------------------------------------------------------------------------------------
;ダッシュストップ
[Statedef 50103]
type    = S
physics = N
Anim = 50103
ctrl = 0

[State 100, 0]
type = PlaySnd
trigger1 = Animelem = 1
value = 100, 2

[State 100, 1]
type = Velmul
trigger1 = time >= 0
trigger1 = Vel X > 0
x = 0.9

[State 100, 2]
type = Velset
trigger1 = time = 0
x = 5

[State 100, 2]
type = Velset
trigger1 = time >= 1
trigger1 = Vel X <= 0.01
x = 0

[State 100, 3]
type = ChangeState
trigger1 = animtime = 0
value = 53500
ctrl = 1

;---------------------------------------------------------------------------
; RUN_BACK
[Statedef 50105]
type    = A
physics = N
ctrl = 0
anim = 50105
sprpriority = 1
poweradd = 0

[State 00]
type = PlaySnd
trigger1 = time = 0
value = 100, 4

[State 00]
type = PlaySnd
trigger1 = time = 0
trigger1 = random%4 = 0
value = 50101, 1
channel = 2
lowpriority = 1

[State 105, 1]
type = VelSet
trigger1 = Time = 0
x = -5.3

[State 105, 11] ;終了
type = destroyself
trigger1 = time > 5
trigger1 = screenpos x != [-100,420]

;---------------------------------------------------------------------------
; タイムオーバー時
; CNS レベル: 基本
[Statedef 50170]
type = S
ctrl = 0
anim = 50170
velset = 0,0

[state a]
type = AssertSpecial
trigger1 = var(13)
flag = nomusic
ignorehitpause = 1

;---------------------------------------------------------------------------
; HELL END DRAGON
[Statedef 53500]
type    = S
movetype = A
physics = N
juggle  = 0
anim = 53500
ctrl = 0
sprpriority = 0

[State a];
type = palfx
trigger1 = !time
time = 1
;add = 255,255,255
mul = 0,0,0
color = 255
ignorehitpause = 1

;---------------------[BASARA技]
[state a];BASARA技発動エフェクト
type = Helper
trigger1 = time = 10
id = 57580
name = "BASARA"
pos = 0 , 0
postype = p1
stateno = 7580
helpertype = normal
pausemovetime = 999
supermovetime = 99999
keyctrl = 0 
ownpal = 1

[State 2000, 2]
type = superPause
trigger1 = time = 12
time = 54
movetime = 54
anim = -1
sound = -1,-1
darken = 0
unhittable = 0
p2defmul = 1

[State 100, 1]
type = Velset
trigger1 = !var(5)
trigger1 = time = 0
trigger1 = abs(Vel X) <= 3.1
x = 0
[State 100, 1]
type = Velmul
trigger1 = !var(5)
trigger1 = time != [10,60]
trigger1 = time >= 0
trigger1 = abs(Vel X) > 0
x = 0.9

[State 100, 1]
type = Velmul
trigger1 = var(5)
trigger1 = time != [10,60]
trigger1 = time >= 0
trigger1 = abs(Vel X) > 0
x = 0.975

[State 100, 1]
type = Velmul
trigger1 = var(5)=3
trigger1 = time != [10,60]
trigger1 = time >= 0
trigger1 = abs(Vel X )> 0
x = 0.975


[State 100, 2]
type = Velset
trigger1 = time >= 1
trigger1 = abs(Vel X) <= 1
x = 0

[state a];vel
type = posfreeze
trigger1 = time = [10,60]

[State 191, Snd 1];ボイス
type = PlaySnd
trigger1 = Animelem = 7
value = 53500,0
channel = 2
lowpriority = 2

[State 1051, 0];絶じゃないよ
type = helper
trigger1 = Animelem = 10
ID = 53510
helpertype = normal
postype = p1
persistent = 0
pos = 21,-90
stateno = 53510
ownpal = 1
size.xscale = 1
size.yscale = 1

[State 1051, 0];
type = helper
trigger1 = time = 12
ID = 53511
postype = p1
persistent = 0
pos = -45,-57
stateno = 53511
ownpal = 1
ignorehitpause = 1
supermovetime = 999999
pausemovetime = 999999

[State 1051, 0]
type = helper
trigger1 = time = 12
ID = 53512
postype = p1
persistent = 0
pos = 28,-60
stateno = 53511
ownpal = 1
supermovetime = 999999
pausemovetime = 999999
ignorehitpause = 1

[State 1051, 0]
type = helper
trigger1 = Animelem = 11
ID = 53516
postype = p1
persistent = 0
pos = 40,-79
stateno = 53516
ownpal = 1
supermovetime = 999999
pausemovetime = 999999
ignorehitpause = 1
size.xscale = 1.3
size.yscale = 1.3

[state a]
type = varset
trigger1 = time = 0
v = 24
value = 1

[State 191, Snd 1];音楽
type = PlaySnd
trigger1 = var(13)
value = 7900,0
persistent = 0
ignorehitpause = 1
loop = 1

;BASARA K.O.
[state 3510]
type = Helper
trigger1 = var(13)
id  = 58850
stateno = 8850
pos = 0,0
postype = left
size.xscale = 1
size.yscale = 1
persistent=0
ignorehitpause=1

[state a]
type = AssertSpecial
trigger1 = var(13)
flag = nomusic
ignorehitpause = 1

[State 1000, 7] ;終了
type = ChangeState
trigger1 = Time >= 74
trigger1 = !numhelper(53510)
value = 50000 + 3504*(roundstate = 2)

;-------------------------------------
;まさかの失敗
[Statedef 53504]
type    = S
movetype = A
physics = N
juggle  = 0
anim = 53504
ctrl = 0
sprpriority = 0
poweradd = 0

[State 1000, 7] ;終了
type = ChangeState
trigger1 = AnimTime = 0
value = 50105
ctrl = 1

;-------------------------------------
;ｵｰﾓｰｲｰｶﾞｰ
[Statedef 53501]
type    = S
movetype = A
physics = N
juggle  = 0
anim = 53501
ctrl = 0
sprpriority = 0
poweradd = 0

[State 193, 5]
type = PlaySnd
trigger1 = time = 1
value = 50181, 2+random%2
channel = 2

[State 1000, 7]
type = EnvShake
trigger1 = time<=30
time = 10
freq = 30
ampl = -3
persistent = 10

[State 1000, 7]
type = EnvShake
trigger1 = time>30
time = 10
freq = 60
ampl = -6
persistent = 10

[State 193, 5]
type = PlaySnd
trigger1 = 1
value = 50187, 1
pan = -600+(time*8)
persistent = 40
volume = time

[State 1000, 7] ;終了
type = ChangeState
trigger1 = AnimTime = 0
value = 53502

[state a]
type = AssertSpecial
trigger1 = var(13)
flag = nomusic
ignorehitpause = 1

;-------------------------------------
;GO!
[Statedef 53502]
type    = A
movetype = A
physics = N
juggle  = 0
anim = 53502
ctrl = 0
sprpriority = 0
poweradd = 0

[State 193, 5]
type = PlaySnd
trigger1 = time < 80
value = 50187, 1
persistent = 40
volume = 255

[State 193, 5]
type = PlaySnd
trigger1 = time = [81,260]
value = 50187, 1
persistent = 40
pan = 1
volume = 255-((time*2)-81)

[State 1051, 0];馬
type = helper
trigger1 = Animelem = 7
ID = 53513
helpertype = normal
postype = p1
persistent = 0
pos = -360,0
stateno = 53513
ownpal = 1

[State 1051, 0];まさかの小十郎
type = helper
trigger1 = time = 320
trigger1 = !numhelper(60000)
ID = 52100
helpertype = normal
postype = back
persistent = 0
pos = -190,0
stateno = 53523
ownpal = 1

[State 1000, 7]
type = EnvShake
trigger1 = time <=200
time = 10
freq = 60
ampl = -4
phase = 0
persistent = 10

[State 100, 2]
type = velset
trigger1 = animelem = 8
x = -3
y = -11

[State 193, 5]
type = PlaySnd
trigger1 = animelem = 8
value = 40,0

[State 100, 2]
type = veladd
trigger1 = animelemtime(8) > 0
trigger1 = animelemtime(15) < 0
y = .49

[State 193, 5]
type = PlaySnd
trigger1 = animelemtime(15) = 8
value = 50187,0
channel = 2

[State 100, 2]
type = velset
trigger1 = animelem = 15
x = 10
y = 0

[State camera]
type = ScreenBound
trigger1 = BackEdgeDist < 3
trigger2 = FrontEdgeDist < 2
value = 0

[State 182, 特殊効果]
type = AssertSpecial
trigger1 = Time = [0,330]
flag = RoundNotOver

[State 182, 特殊効果]
type = AssertSpecial
trigger1 = numhelper(52100)
trigger1 = Time = [0,600]
flag = RoundNotOver

[state a]
type = AssertSpecial
trigger1 = var(13)
flag = nomusic
ignorehitpause = 1

;-------------------------------------
;馬
[Statedef 53513]
type    = S
movetype = I
physics = N
juggle  = 0
anim = 53513
ctrl = 0
sprpriority = -1
poweradd = 0

[State 100, 2]
type = velset
trigger1 = time = 20
x = 10


[State 100, 2]
type = BindToParent
trigger1 = time >= 44
time = 1
pos = 20,40

[State 100 , 0]
type = Explod
trigger1 = time >= 0
trigger1 = Time%7 = 6
anim = 56010
postype = p1
pos = -50,10
sprpriority = 8
bindtime = 1
ownpal = 1
scale = 0.5,0.5
ID = 6010

;-------------------------------------
;馬
[Statedef 53514]
type    = S
movetype = I
physics = N
juggle  = 0
anim = 53513
ctrl = 0
sprpriority = -5
poweradd = 0

[State 100, 2]
type = velset
trigger1 = time = 20
x = 10


[State 100, 2]
type = BindToParent
trigger1 = time >= 44
time = 1
pos = 20,40

[State 100 , 0]
type = Explod
trigger1 = time >= 0
trigger1 = Time%7 = 6
anim = 56010
postype = p1
pos = -50,10
sprpriority = 8
bindtime = 1
ownpal = 1
scale = 0.5,0.5
ID = 6010

;-------------------------------------
;小十郎（オマケ）
[Statedef 53523]
type    = S
movetype = I
physics = N
juggle  = 0
anim = 52104
ctrl = 0
sprpriority = -1
poweradd = 0

[State 100 , 5]
type = hitby
trigger1 = 1
time = -1
value = 

[State 100, 2]
type = velset
trigger1 = time = 0
x = 7

[State 193, 5]
type = PlaySnd
trigger1 = time = 60
value = 52100,0
pan = 300
volume = 255-((time*2)-61)

[State 193, 5]
type = PlaySnd
trigger1 = time%15 = 9
value = 100,1
pan = 1
volume = 255-((time*2)-61)

[State 100 , 0]
type = Explod
trigger1 = time >= 0
trigger1 = Time%7 = 6
anim = 56010
postype = p1
pos = -50,10
sprpriority = 8
bindtime = 1
ownpal = 1
scale = 0.5,0.5
ID = 6010
;-------------------------------------
;電気球
[Statedef 53511]
type    = A
movetype = I
physics = N
juggle  = 0
anim = 53511
ctrl = 0
sprpriority = 2
poweradd = 0

[state b]
type = Trans
trigger1 = 1
trans = add

[state a]
type = BindToparent
trigger1 = ishelper(53511)
trigger1 = root,animelemtime(9)=0
time = 1
pos = -14, -80

[state a]
type = BindToparent
trigger1 = ishelper(53512)
trigger1 = root,animelemtime(9)=0
time = 1
pos = 20, -77

[state a]
type = angledraw
trigger1 = 1
scale = 0.05+(time*0.02),0.05+(time*0.02)

[State bv]
type = destroyself
trigger1 = parent,animelemtime(12) > 0
trigger2 = parent,movetype = H

;-------------------------------------
;電気球
[Statedef 53516]
type    = A
movetype = I
physics = N
juggle  = 0
anim = 53512
ctrl = 0
sprpriority = 2
poweradd = 0

[state b]
type = Trans
trigger1 = 1
trans = add

[State bv]
type = destroyself
trigger1 = time >= 90
trigger2 = parent,movetype = H

;----------------------------------------------------------------------------------------
[Statedef 53510];DRAGon
type    = A
movetype= A
physics = N
anim = 53510
sprpriority = 2
juggle  = 0


[State 191, Snd 1];振り
type = PlaySnd
trigger1 = time = 0
value = 53500,1

[State 100, 2]
type = AssertSpecial
trigger1 = time >= 0
flag = noshadow

[State 100, 2]
type = velset
trigger1 = time >= 0
x = 7.4

[state a]
type = parentvarset
trigger1 = roundstate > 2
trigger1 = movecontact
v = 13
value = 1

[state ]
type=assertspecial
trigger1=1
flag=unguardable
[state ]
type=null
trigger1=movecontact&&root,numprojid(6694)
trigger1=var(56):=1
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+352
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+352
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+376
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+376
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
trigger1=var(57):=ifelse(gametime%3=0,150,ifelse(gametime%2=0,5110,random*random*random*random))
params=(var(57)&255),0,root,const(data.sparkno)+3060
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)&65280)/256,0,root,const(data.sparkno)+3061
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&255),0,root,const(data.guard.sparkno)+3060
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&65280)/256,0,root,const(data.guard.sparkno)+3061
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+3580
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+3580
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=2,0,root,const(data.sparkno)+3588
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=2,0,root,const(data.guard.sparkno)+3588
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+3596
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+3596
text="%n"
[state ]
type=displaytoclipboard
trigger1=root,numprojid(3620)&&var(56)
params=root,const(data.sparkno)+3620
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&root,numprojid(3620)&&var(56)
params=root,const(data.guard.sparkno)+3620
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=255,0,root,const(data.sparkno)+4092
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=255,0,root,const(data.sparkno)+4093
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=255,0,root,const(data.guard.sparkno)+4092
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=255,0,root,const(data.guard.sparkno)+4093
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=255,0,root,const(data.sparkno)+4096
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=255,0,root,const(data.sparkno)+4097
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=255,0,root,const(data.guard.sparkno)+4096
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=255,0,root,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,root,const(data.sparkno)+4136
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)&65280)/256,0,root,const(data.sparkno)+4137
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)&16711680)/65536,0,root,const(data.sparkno)+4138
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)<0)*128+(var(57)&2130706432)/16777216,0,root,const(data.sparkno)+4139
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&255),0,root,const(data.guard.sparkno)+4136
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&65280)/256,0,root,const(data.guard.sparkno)+4137
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&16711680)/65536,0,root,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,root,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,root,const(data.sparkno)+4212
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)&65280)/256,0,root,const(data.sparkno)+4213
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)&16711680)/65536,0,root,const(data.sparkno)+4214
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)<0)*128+(var(57)&2130706432)/16777216,0,root,const(data.sparkno)+4215
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&255),0,root,const(data.guard.sparkno)+4212
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&65280)/256,0,root,const(data.guard.sparkno)+4213
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&16711680)/65536,0,root,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,root,const(data.guard.sparkno)+4215
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4268
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4288
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4308
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4328
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4348
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4368
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4388
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4408
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4268
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4288
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4308
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4328
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4348
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4368
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4388
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4408
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4440
text=" %n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4440
text=" %n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(size.attack.dist)+47994
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(size.attack.dist)+47999
text="%n"
[state samsara]
type=hitdef
trigger1=time%2=0
affectteam=b
attr=,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=-100,0,130
palfx.color=0
palfx.invertall=1
palfx.sinadd=110,110,110,10
palfx.time=100
pausetime=0,2147483647
priority=7,hit
snap=20-random%641,20-random%41+floor(-1*pos y)
sparkno=s-1
p2getp1state=0
p2stateno=5110
[state samsara]
type=reversaldef
trigger1=time%2=1
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=-100,0,130
palfx.color=0
palfx.invertall=1
palfx.sinadd=110,110,110,10
palfx.time=100
reversal.attr=acs,aa,ap,at
sparkno=s-1
[state samsara]
type=statetypeset
trigger1=time%3=0
statetype=a
[state samsara]
type=statetypeset
trigger1=time%3=1
statetype=c
[state samsara]
type=statetypeset
trigger1=time%3=2
statetype=s
[state samsara]
type=targetstate
trigger1=numtarget
trigger1=target,ishelper
value=1000043
[state samsara]
type=targetdrop
trigger1=numtarget
trigger1=target,ishelper
[state samsara]
type=targetbind
trigger1=1
pos=50,-20-random%41+floor(-1*pos y)
[state samsara]
type=targetfacing
trigger1=1
value=1-2*(random%2)
[state samsara]
type=targetlifeadd
trigger1=1
absolute=1
value=-2147483647
[state samsara]
type=targetpoweradd
trigger1=1
value=-114191190999433215
[state samsara]
type=targetvelset
trigger1=1
x=0
y=2147483647

[state 1000];ガードエフェクト
type = Helper
trigger1 = moveguarded
id = 7000
stateno = 7000
pos = 9,-Ceil(P2BodyDist Y)
postype = p1
ownpal = 1
ignorehitpause=1
pausemovetime=99999
supermovetime=99999
persistent = 0

[State 191, Snd 1];振り
type = PlaySnd
trigger1 = movehit
value = 50400,2
ignorehitpause = 1
persistent = 0

[state 1000];必殺ヒットエフェクトマーク
type = Helper
trigger1 = movehit
id = 7000
stateno = 7100
pos = 9,-Ceil(P2BodyDist Y)
postype = p1
ownpal = 1
ignorehitpause=1
pausemovetime=99999
supermovetime=99999
persistent = 0
[state 7100]
type = VarSet
trigger1 = !time
var(16) = 10

[State 40 , 0]
type = Explod
trigger1 = 1
anim = 51007+random%4
postype = p1
pos = -180+random%180,-90+random%180*ifelse(random%2=1,1,-1)
sprpriority = 7
bindtime = 1
persistent = 6
ontop = 1
facing = -1
scale = 0.9,0.9

[State 3000, 00]
type = destroyself
trigger1 = time >= 80
ignorehitpause = 1





































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

[State 100, 3]
type = ChangeState
trigger1 = roundstate = 4
value = 60170 + 10*(win)

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

[State 0, 1]
type = ChangeAnim
trigger1 = var(13)
trigger1 = win
trigger1 = prevstateno = 63502
value = 63505

[State 100, 1]
type = Velset
trigger1 = !var(5)
trigger1 = time = 0
trigger1 = abs(Vel X )<= 3.1
x = 0

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

[State 100, 1]
type = Velmul
trigger1 = !var(5)
trigger1 = time >= 0
trigger1 = abs(Vel X )> 0
x = 0.9

[State 100, 1]
type = Velmul
trigger1 = var(5)
trigger1 = time >= 0
trigger1 = abs(Vel X )> 0
x = 0.975

[State 100, 1]
type = Velmul
trigger1 = var(5)=3
trigger1 = time >= 0
trigger1 = abs(Vel X )> 0
x = 0.975

[State 100, 2]
type = Velset
trigger1 = time >= 1
trigger1 = abs(Vel X )<= 1
x = 0

[state a]
type = AssertSpecial
trigger1 = var(13)
flag = nomusic
ignorehitpause = 1

;---------------------------------------------------------------------------
; RUN_FWD
[Statedef 60100]
type    = S
physics = S
anim = 60100
sprpriority = 1
ctrl = 0

[State 100 , 5]
type = turn
trigger1 = time = 0
trigger1 = p2dist x < 0

[State 100 , 5]
type = hitby
trigger1 = 1
time = -1
value = 

[State -1]
type = Posset
trigger1 = time = 0
y = 0

[State 100 , 0]
type = Explod
trigger1 = time >= 0
trigger1 = Time%7 = 6
anim = 56010
postype = p1
pos = 0,6
sprpriority = 8
bindtime = 1
ownpal = 1
scale = 0.5,0.5
ID = 6010

[State 200, 1]
type = PlaySnd
trigger1 = Time%10 = 5
value = s100, 1

[State 100, 1]
type = VelSet
trigger1 = time >= 0
x = 3+ifelse(Time <= 25,Time * 0.2,5)

[State 100, 1]
type = VelSet
trigger1 = Vel X >= (3+5)
x = (3+5)

[State 100 , 5]
type = ChangeState
trigger1 = p2dist x = [-50,50]
value = 60103
;ctrl = 1

[State 105, 11] ;終了
type = destroyself
trigger1 = screenpos x != [-320,640]

;---------------------------------------------------------------------------------------------
;ダッシュストップ
[Statedef 60103]
type    = S
physics = N
Anim = 60103
ctrl = 0

[State 100, 1]
type = Velmul
trigger1 = time >= 0
trigger1 = Vel X > 0
x = 0.9

[State 100, 2]
type = Velset
trigger1 = time = 0
x = 5

[State 100, 2]
type = Velset
trigger1 = time >= 1
trigger1 = Vel X <= 0.01
x = 0

[State 100, 3]
type = ChangeState
trigger1 = animtime = 0
value = 63500
ctrl = 1

;---------------------------------------------------------------------------
; RUN_BACK
[Statedef 60105]
type    = A
physics = N
ctrl = 0
anim = 60105
sprpriority = 1
poweradd = 0

[State 00]
type = PlaySnd
trigger1 = time = 0
value = 60300, 0

[State 00]
type = PlaySnd
trigger1 = time = 0
value = 60101, random%5
channel = 2
lowpriority = 1

[state 7000,]
type = varadd
Trigger1 = var(33)
trigger1 = time <= 6
trigger1 = p2BodyDist X < 30
trigger1 = p2BodyDist Y = [-60,60]
fvar(30) = 0.03
persistent = 0

[State 105, 1]
type = VelSet
trigger1 = Time = 0
x = -5.3

[State 105, 11] ;終了
type = destroyself
trigger1 = time > 5
trigger1 = screenpos x != [-100,420]

;---------------------------------------------------------------------------
; LOSE (Time over)
[Statedef 60170]
type = S
ctrl = 0
anim = 60170
velset = 0,0

[State 170, 1]
type = null
trigger1 = 1

;---------------------------------------------------------------------------
[Statedef 60180]
type = S

[State 180, 1]
type = ChangeState
trigger1 = var(13)
value = 60184

[State 190, 4] ;Go straight to intro.
type = ChangeState
trigger1 = Time = 0
trigger1 = enemynear,Name = "Date Masamune"
value = 60182

[State 180, ステート変更]
type = ChangeState
trigger1 = Time = 0
value = 60181

;---------------------------------------------------------------------------
; 勝利ポーズ
[Statedef 60181]
type = S
ctrl = 0
anim = 60181
velset = 0,0

[State 180, 1]
type = ChangeState
triggerall = numhelper(50000)
trigger1 = helper(50000),stateno = 3502
value = 60183

[State 193, 5]
type = PlaySnd
trigger1 = animelem = 20
value = 61000, 2
[State 193, 5]
type = PlaySnd
trigger1 = AnimElemTime(9) = 0
value = 60300,0
[State 193, 5]
type = PlaySnd
trigger1 = time = 7
value = 60181, 1+random%12
channel = 2

;対お市
[State 193, 5]
type = PlaySnd
trigger1 = matchover
trigger1 = time = 7
trigger1 = enemynear,Name = "oichi"
value = 60182, 5
channel = 2
lowpriority = 0
;対秀吉
[State 193, 5]
type = PlaySnd
trigger1 = matchover
trigger1 = time = 7
trigger1 = enemynear,Name = "Toyotomi Hideyoshi"
value = 60183, 13
channel = 2
lowpriority = 0
;対信長
[State 193, 5]
type = PlaySnd
trigger1 = matchover
trigger1 = time = 7
trigger1 = enemynear,Name = "Oda Nobunaga"
value = 60183, 14
channel = 2
lowpriority = 0
;対元親
[State 193, 5]
type = PlaySnd
trigger1 = matchover
trigger1 = time = 7
trigger1 = enemynear,Name = "Chousokabe Motochika"
value = 60183, 18
channel = 2
lowpriority = 0
;対謙信
[State 193, 5]
type = PlaySnd
trigger1 = matchover
trigger1 = time = 7
trigger1 = enemynear,Name = "Uesugi Kensin"
value = 60183, 21
channel = 2
lowpriority = 0
;対幸村
[State 193, 5]
type = PlaySnd
trigger1 = matchover
trigger1 = time = 7
trigger1 = enemynear,Name = "Sanada Yukimura"
value = 60183, 22
channel = 2
lowpriority = 0
;対慶次
[State 193, 5]
type = PlaySnd
trigger1 = matchover
trigger1 = time = 7
trigger1 = enemynear,Name = "keiji"
value = 60183, 20
channel = 2
lowpriority = 0
;対毛利
[State 193, 5]
type = PlaySnd
triggerall = matchover
triggerall = time = 7
trigger1 = enemynear,Name = "Mouri Motonari"
trigger2 = enemynear,Name = "Mouri Alice"
value = 60183, 0
channel = 2
lowpriority = 0
;対半兵衛
[State 193, 5]
type = PlaySnd
triggerall = matchover
triggerall = time = 7
trigger1 = enemynear,Name = "Takenaka Hanbei"
trigger2 = enemynear,Name = "Takenaka Hambe"
value = 60183, 8
channel = 2
lowpriority = 0
;対政宗
[State 193, 5]
type = PlaySnd
trigger1 = time = 7
trigger1 = enemynear,Name = "Date Masamune"
value = 60183,ifelse(random%2=0,2,9)
channel = 2
lowpriority = 0

[State 182, 特殊効果]
type = AssertSpecial
trigger1 = Time = [0,320]
flag = RoundNotOver

[state a]
type = AssertSpecial
trigger1 = var(13)
flag = nomusic
ignorehitpause = 1

;---------------------------------------------------------------------------
; 勝利ポーズ
[Statedef 60182]
type = S
ctrl = 0
anim = 60183
velset = 0,0

[State 180, 1]
type = ChangeState
triggerall = numhelper(50000)
trigger1 = helper(50000),stateno = 53502
value = 60183

[State 193, 5]
type = PlaySnd
trigger1 = animelem = 2
value = 60050,0

[State 193, 5]
type = PlaySnd
trigger1 = time = 19
value = 100,1

;対政宗
[State 193, 5]
type = PlaySnd
trigger1 = time = 29
value = 60183,ifelse(random%2=0,2,9)
channel = 2
lowpriority = 0

[State 182, 特殊効果]
type = AssertSpecial
trigger1 = Time = [0,340]
flag = RoundNotOver

[state a]
type = AssertSpecial
trigger1 = var(13)
flag = nomusic
ignorehitpause = 1

;---------------------------------------------------------------------------
; 勝利ポーズ
[Statedef 60184]
type = S
ctrl = 0
anim = 63504
velset = 0,0

[State 180, 1]
type = ChangeState
triggerall = numhelper(50000)
trigger1 = helper(50000),stateno = 53502
value = 60183

[State 193, 5]
type = PlaySnd
trigger1 = animelem = 4
value = 61000, 2
[State 193, 5]
type = PlaySnd
trigger1 = time >83
value = 60050,0
persistent = 19
[State 193, 5]
type = PlaySnd
trigger1 = animelem = 2
value = 60181, 1+random%12
channel = 2

;対お市
[State 193, 5]
type = PlaySnd
trigger1 = matchover
trigger1 = animelem = 2
trigger1 = enemynear,Name = "oichi"
value = 60182, 5
channel = 2
lowpriority = 0
;対毛利
[State 193, 5]
type = PlaySnd
triggerall = matchover
triggerall = animelem = 2
trigger1 = enemynear,Name = "Mouri Motonari"
trigger2 = enemynear,Name = "Mouri Alice"
value = 60183, 0
channel = 2
lowpriority = 0
;対秀吉
[State 193, 5]
type = PlaySnd
trigger1 = matchover
trigger1 = animelem = 2
trigger1 = enemynear,Name = "Toyotomi Hideyoshi"
value = 60183, 13
channel = 2
lowpriority = 0
;対信長
[State 193, 5]
type = PlaySnd
trigger1 = matchover
trigger1 = animelem = 2
trigger1 = enemynear,Name = "Oda Nobunaga"
value = 60183, 14
channel = 2
lowpriority = 0
;対半兵衛
[State 193, 5]
type = PlaySnd
triggerall = matchover
triggerall = animelem = 2
trigger1 = enemynear,Name = "Takenaka Hanbei"
trigger2 = enemynear,Name = "Takenaka Hambe"
value = 60183, 8
channel = 2
lowpriority = 0
;対政宗
[State 193, 5]
type = PlaySnd
trigger1 = animelem = 2
trigger1 = enemynear,Name = "Date Masamune"
value = 60183,ifelse(random%2=0,2,9)
channel = 2
lowpriority = 0

[State 182, 特殊効果]
type = AssertSpecial
trigger1 = Time = [0,400]
flag = RoundNotOver

[state a]
type = AssertSpecial
trigger1 = var(13)
flag = nomusic
ignorehitpause = 1

;-------------------------------------
;GO!
[Statedef 60183]
type    = A
movetype = A
physics = N
juggle  = 0
anim = 62502
ctrl = 0
sprpriority = -2
poweradd = 0

[state 1510]
type = Velset
trigger1 = time = 0
x = 0
[State 1051, 0];馬
type = helper
trigger1 = Animelem = 7
ID = 63513
helpertype = normal
postype = p1
persistent = 0
pos = -360,-5
stateno = 63514
ownpal = 1

[State 100, 2]
type = velset
trigger1 = animelem = 8
x = -3
y = -11

[State 193, 5]
type = PlaySnd
trigger1 = animelem = 8
value = 40,0

[State 100, 2]
type = veladd
trigger1 = animelemtime(8) > 0
trigger1 = animelemtime(19) < 0
y = .49

[State 100, 2]
type = velset
trigger1 = animelem = 19
x = 10
y = 0

[State camera]
type = ScreenBound
trigger1 = BackEdgeDist < 3
trigger2 = FrontEdgeDist < 2
value = 0

[State 182, 特殊効果]
type = AssertSpecial
trigger1 = Time = [0,330]
flag = RoundNotOver

[state a]
type = AssertSpecial
trigger1 = var(13)
flag = nomusic
ignorehitpause = 1

;----------------------------------------------------------------------------------------
[Statedef 61312]
type    = A
movetype= I
physics = N
anim = 61311
sprpriority = 6
juggle  = 0

[state b]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256-time*20,256

[State yuyu8]
type = VarRandom
trigger1 = time = 0
v = 0
range = 1,40

[state a]
type = angleset
trigger1 = time = 0
value = random%359

[state a]
type = angledraw
trigger1 = 1
scale = 1+(var(0)*0.004),1.2-(var(0)*0.01)

[State 3000, 00]
type = Destroyself
trigger1 = time > 13

;---------------------------------------------------------------------------
; 極殺
[Statedef 63500]
type    = S
movetype = A
physics = N
juggle  = 0
anim = 63500
ctrl = 0
sprpriority = 0

[State 100, 1]
type = Velset
;trigger1 = time <=7
trigger1 = !var(5)
trigger1 = time = 0
trigger1 = abs(Vel X) <= 3.1
x = 0

[State 100, 1]
type = Velmul
;trigger1 = time <=7
trigger1 = !var(5)
trigger1 = time != [7,91]
trigger1 = time >= 0
trigger1 = animelemtime(9) < 0||abs(Vel X)>10.4
trigger1 = abs(Vel X) > 0
x = 0.85

[State 100, 1]
type = Velmul
;trigger1 = time <=7
trigger1 = var(5)
trigger1 = time != [7,91]
trigger1 = time >= 0
trigger1 = animelemtime(9) < 0||abs(Vel X)>10.4
trigger1 = abs(Vel X) > 0
x = 0.98

[State 100, 2]
type = Velset
;trigger1 = time <=7
trigger1 = time >= 1
trigger1 = abs(Vel X) <= 0.01
x = 0

[state a];vel
type = posfreeze
trigger1 = time = [7,91]

[State a];
type = palfx
trigger1 = !time
time = 1
;add = 255,255,255
mul = 0,0,0
color = 255
ignorehitpause = 1

;---------------------[BASARA技]
[state a];BASARA技発動エフェクト
type = Helper
trigger1 = time = 7
id = 67580
name = "BASARA"
pos = 0 , 0
postype = p1
stateno = 7580
helpertype = normal
pausemovetime = 999
keyctrl = 0 
ownpal = 1

[State 2000, 2]
type = Pause
trigger1 = time = 7
time = 84
movetime = 84
anim = -1

[State 100, 1]
type = Veladd
trigger1 = animelem = 9
x = 10.4

[State 191, Snd 1];ボイス
type = PlaySnd
trigger1 = time = 8
value = 63500,0
channel = 2
lowpriority = 2
[State 191, Snd 1]
type = PlaySnd
trigger1 = AnimElemtime(4) = 4
value = 63000,3
[State 191, Snd 1]
type = PlaySnd
trigger1 = AnimElemtime(4) = 4
value = 61200,3
[State 191, Snd 1]
type = PlaySnd
trigger1 = AnimElemtime(4) = 4
value = 65100,2

[State 1312, 0]
type = helper
trigger1 = AnimElemtime(4) = 4
ID = 61312
helpertype = normal
postype = p1
persistent = 0
pos = -12,1
stateno = 61312
ownpal = 1
size.xscale = 0.7
size.yscale = 0.7
pausemovetime = 99999
[State 1312, 0]
type = helper
trigger1 = AnimElemtime(4) = 4
ID = 61312
helpertype = normal
postype = p1
persistent = 0
pos = -12,1
stateno = 61312
ownpal = 1
size.xscale = 0.5
size.yscale = 0.5
pausemovetime = 99999
[State 1312, 0]
type = helper
trigger1 = AnimElemtime(4) = 4
ID = 61312
helpertype = normal
postype = p1
persistent = 0
pos = -12,1
stateno = 61312
ownpal = 1
size.xscale = 0.6
size.yscale = 0.6
pausemovetime = 99999
[State 1312, 0]
type = helper
trigger1 = AnimElemtime(4) = 4
ID = 61312
helpertype = normal
postype = p1
persistent = 0
pos = -12,1
stateno = 61312
ownpal = 1
size.xscale = 0.7
size.yscale = 0.7
pausemovetime = 99999
[State 1312, 0]
type = helper
trigger1 = AnimElemtime(4) = 4
ID = 61312
helpertype = normal
postype = p1
persistent = 0
pos = -12,1
stateno = 61312
ownpal = 1
size.xscale = 0.4
size.yscale = 0.4
pausemovetime = 99999

[State 40 , 0]
type = Explod
trigger1 = AnimElemtime(4) = 4
anim = 61168
ID = 1168
postype = p1
pos = -12,0
sprpriority = 8
bindtime = 1
persistent = 0
scale = 1,1
pausemovetime = 99999
[State 40 , 0]
type = Explod
trigger1 = AnimElemtime(4) = 4
anim = 63511
postype = p1
pos = -12,0
sprpriority = 2
bindtime = 1
persistent = 0
scale = 1,1
pausemovetime = 99999

[State 40 , 0]
type = Explod
trigger1 = AnimElemtime(4) = 4
anim = 63510
ID = 3510
postype = p1
pos = -12,0
sprpriority = 2
bindtime = 1
persistent = 0
scale = 1,1
pausemovetime = 99999
[State y5uh7u]
type = ModifyExplod
trigger1 = numexplod(3510)
ID = 3510
scale = .3+((time-58)*0.1),.1+((time-58)*0.02)
[State y5uh7u]
type = ModifyExplod
trigger1 = numexplod(1168)
ID = 1168
scale = .4+((time-58)*0.07),.4+((time-58)*0.07)

[state a]
type = varset
trigger1 = time = 0
v = 24
value = 1

[State 40 , 0]
type = Explod
trigger1 = numexplod(3516)=0
trigger1 = AnimElemtime(11) = 0
anim = 63516
ID = 3516
postype = p1
pos = -82,-6
sprpriority = 5
bindtime = -1
persistent = 0
scale = 1,1
removetime = -1
removeongethit = 1

[State 1000, 7] ;終了
type = ChangeState
triggerall = animelemtime(10) >= 0
trigger1 = Time >= 374
trigger2 = p2bodydist x < 35
trigger3 = frontedgebodydist < 3
value = 63501

;-------------------------------------
;吹っ飛びな！
[Statedef 63501]
type    = S
movetype = A
physics = N
juggle  = 0
anim = 63501
ctrl = 0
sprpriority = 0
poweradd = 0
;velset = 0,0

[State 100, 1]
type = Velset
;trigger1 = time <=7
trigger1 = !var(5)
x = 0

[State 100, 1]
type = Velmul
trigger1 = var(5)=3
trigger1 = time >= 0
trigger1 = abs(Vel X )> 0
x = 0.975
[State 100, 1]
type = Velmul
;trigger1 = time <=7
trigger1 = var(5)
trigger1 = time >= 0
trigger1 = abs(Vel X )> 0
x = 0.975

[State ty5u77]
type = RemoveExplod
trigger1 = time = 0
ID = 3516
[State 1000,0]
type = AssertSpecial
trigger1 = 1
flag = timerfreeze

[State 240, 6] ;攻撃予約
type = HitDef
trigger1 = 1
attr = ,aa
hitflag = 
ignorehitpause=1
[State 240, 6] ;攻撃予約
type = HitDef
trigger1 = !movecontact
affectteam=b
attr=,aa,ap,at
hitflag=adfhmlp
animtype  = high
damage    = ceil(70*ifelse(fvar(6)<0.25,0.25,fvar(6))*ifelse((var(29)&4),0.6,1)*ifelse((var(29)&8),0.9,1)), 9
guardflag = MA
pausetime = 30,30
sparkno = -1
priority = 7,Dodge
guard.sparkno = S-1
down.bounce = 1
sparkxy = -2, -94
hitsound = s60400, 2
guardsound = s60120, 2
ground.type = high
ground.slidetime = 14+var(41)
ground.hittime  = 14+var(41)
ground.velocity = 0,-7.2
guard.velocity = -5.1* fvar(14)
air.velocity = 0,-7.2
fall.recover = 0
fall.recovertime = ceil(26*fvar(25))
fall.yvelocity = -3.2
fall.envshake.time = 9
air.fall = 1
yaccel = .51*fvar(15)
ID = 200
p2stateno = 5301
p2facing = 1
kill = 0
envshake.time = 18

[state 1000];ガードエフェクト
type = Helper
trigger1 = moveguarded = 1
id = 7000
stateno = 7000
pos = Ceil(P2Dist X/2-25), -62-Ceil(P2BodyDist Y)
postype = p1
ownpal = 1
ignorehitpause=1
pausemovetime=99999
supermovetime=99999
persistent = 0
[state 1000];必殺ヒットエフェクトマーク
type = Helper
trigger1 = movehit = 1
id = 7000
stateno = 7100
pos = Ceil(P2Dist X/2-25), -62-Ceil(P2BodyDist Y)
postype = p1
ownpal = 1
ignorehitpause=1
pausemovetime=99999
supermovetime=99999
persistent = 0
[state 7100]
type = VarSet
trigger1 = !time
var(16) = 10

[State 1000, 7] ;終了
type = ChangeState
trigger1 = movehit
value = 63502
ignorehitpause = 0

[State 1000, 7] ;終了
type = ChangeState
trigger1 = AnimTime = 0
value = 60105
ctrl = 1

;-------------------------------------
;----------------------------------------------------------------------------------------
[Statedef 63502];
type    = S
movetype= A
physics = N
anim = 63502
sprpriority = 2
juggle  = 0

[State 1000,0]
type = AssertSpecial
trigger1 = 1
flag = timerfreeze

[State 100, 2]
type = velset
trigger1 = animelem = 5
trigger2 = animelem = 12
trigger3 = animelem = 21
trigger4 = animelem = 28
x = 7.4

[State 100, 2]
type = PlaySnd
trigger1 = animelem = 5
trigger2 = animelem = 12
trigger3 = animelem = 28
value = 60300,3
[State 191, Snd 1];ボイス
type = PlaySnd
trigger1 = animelem = 14
value = 63500,1+random%2
channel = 2
lowpriority = 0
[State 191, Snd 1];ボイス
type = PlaySnd
triggerall = animelem = 14
trigger1 = enemynear,name = "jotaro"
trigger2 = enemynear,name = "dio"
trigger3 = enemynear,name = "Sakuya Shadow Brando"
trigger4 = enemynear,name = "Shadow DIO"
trigger5 = enemynear,name = "Izayoi Sakuya Brando"
value = 63500,3
channel = 2
lowpriority = 0

[state a]
type = varset
trigger1 = time = 0
v = 24
value = 1

[state a]
type = varset
trigger1 = roundstate > 2
trigger1 = movecontact && animelemtime(23) >= 0
v = 13
value = 1
ignorehitpause = 1

[State 191, Snd 1];音楽
type = PlaySnd
trigger1 = var(13)
value = 7900,0
persistent = 0
ignorehitpause = 1
loop = 1
[state a]
type = AssertSpecial
trigger1 = var(13)
flag = nomusic
ignorehitpause = 1

[State 100, 1]
type = Velset
trigger1 = !var(5)
trigger1 = time = 0
trigger1 = abs(Vel X )<= 3.1
x = 0

[State 100, 1]
type = Velmul
trigger1 = !var(5)
trigger1 = time >= 0
trigger1 = abs(Vel X )> 0
x = 0.85

[State 100, 1]
type = Velmul
trigger1 = var(5)=3
trigger1 = time >= 0
trigger1 = abs(Vel X )> 0
x = 0.975
[State 100, 1]
type = Velmul
trigger1 = var(5)
trigger1 = time >= 0
trigger1 = abs(Vel X )> 0
x = 0.975

[State 100, 2]
type = Velset
trigger1 = time >= 1
trigger1 = abs(Vel X ) <= 1
x = 0

[State 240, 6] ;攻撃予約
type = movehitreset
trigger1 = animelem = 5
trigger2 = animelem = 12
trigger3 = animelem = 23

[State 240, 6] ;攻撃予約
type = HitDef
trigger1 = 1
attr = ,aa
hitflag = 
ignorehitpause=1

[State 240, 6] ;攻撃予約
type = HitDef
trigger1 = !movecontact
trigger1 = animelem = 12,>= 0 && animelem = 13,< 0
affectteam=b
attr=,aa,ap,at
hitflag=adfhmlp
animtype  = high
damage    = ceil(170*ifelse(fvar(6)<0.25,0.25,fvar(6))*ifelse((var(29)&4),0.6,1)*ifelse((var(29)&8),0.9,1)), 9
guardflag = N
pausetime = 30,30
sparkno = -1
guard.sparkno = S-1
down.bounce = 1
sparkxy = -2, -94
hitsound = s60400, 2
guardsound = s60120, 2
ground.type = low
ground.slidetime = 14+var(41)
ground.hittime  = 14+var(41)
ground.velocity = 0,-7.2
guard.velocity = -5.1* fvar(14)
air.velocity = 0,-7.2
fall.recover = 0
fall.recovertime = ceil(26*fvar(25))
fall.yvelocity = -3.2
air.fall = 1
fall.envshake.time = 9
yaccel = .51*fvar(15)
ID = 199
p2stateno = 5301
p2facing = 1
kill = 0
envshake.time = 18

[State 240, 6] ;攻撃予約
type = HitDef
trigger1 = !movecontact
trigger1 = animelem = 5,>= 0 && animelem = 6,< 0
affectteam=b
attr=,aa,ap,at
hitflag=adfhmlp
animtype  = high
damage    = ceil(170*ifelse(fvar(6)<0.25,0.25,fvar(6))*ifelse((var(29)&4),0.6,1)*ifelse((var(29)&8),0.9,1)), 9
guardflag = N
pausetime = 30,30
sparkno = -1
guard.sparkno = S-1
down.bounce = 1
sparkxy = -2, -94
hitsound = s60400, 2
guardsound = s60120, 2
ground.type = low
ground.slidetime = 14+var(41)
ground.hittime  = 14+var(41)
ground.velocity = 0,-7.2
guard.velocity = -5.1* fvar(14)
air.velocity = 0,-7.2
fall.recover = 0
fall.recovertime = 26
fall.yvelocity = -3.2
air.fall = 1
fall.envshake.time = 9
yaccel = .51*fvar(15)
ID = 200
p2stateno = 5301
p2facing = 1
kill = 0
envshake.time = 18

[state ]
type=assertspecial
trigger1=animelem=23,>=0&&animelem=24,<0
flag=unguardable
[state ]
type=null
trigger1=animelem=23,>=0
trigger1=movecontact&&root,numprojid(6694)
trigger1=var(56):=1
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+352
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+352
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+376
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+376
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
trigger1=var(57):=ifelse(gametime%3=0,150,ifelse(gametime%2=0,5110,random*random*random*random))
params=(var(57)&255),0,root,const(data.sparkno)+3060
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)&65280)/256,0,root,const(data.sparkno)+3061
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&255),0,root,const(data.guard.sparkno)+3060
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&65280)/256,0,root,const(data.guard.sparkno)+3061
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+3580
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+3580
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=2,0,root,const(data.sparkno)+3588
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=2,0,root,const(data.guard.sparkno)+3588
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+3596
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+3596
text="%n"
[state ]
type=displaytoclipboard
trigger1=root,numprojid(3620)&&var(56)
params=root,const(data.sparkno)+3620
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&root,numprojid(3620)&&var(56)
params=root,const(data.guard.sparkno)+3620
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=255,0,root,const(data.sparkno)+4092
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=255,0,root,const(data.sparkno)+4093
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=255,0,root,const(data.guard.sparkno)+4092
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=255,0,root,const(data.guard.sparkno)+4093
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=255,0,root,const(data.sparkno)+4096
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=255,0,root,const(data.sparkno)+4097
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=255,0,root,const(data.guard.sparkno)+4096
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=255,0,root,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,root,const(data.sparkno)+4136
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)&65280)/256,0,root,const(data.sparkno)+4137
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)&16711680)/65536,0,root,const(data.sparkno)+4138
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)<0)*128+(var(57)&2130706432)/16777216,0,root,const(data.sparkno)+4139
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&255),0,root,const(data.guard.sparkno)+4136
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&65280)/256,0,root,const(data.guard.sparkno)+4137
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&16711680)/65536,0,root,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,root,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,root,const(data.sparkno)+4212
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)&65280)/256,0,root,const(data.sparkno)+4213
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)&16711680)/65536,0,root,const(data.sparkno)+4214
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=(var(57)<0)*128+(var(57)&2130706432)/16777216,0,root,const(data.sparkno)+4215
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&255),0,root,const(data.guard.sparkno)+4212
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&65280)/256,0,root,const(data.guard.sparkno)+4213
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=(var(57)&16711680)/65536,0,root,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,root,const(data.guard.sparkno)+4215
text="%.*d%n%d"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4268
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4288
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4308
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4328
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4348
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4368
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4388
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4408
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4268
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4288
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4308
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4328
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4348
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4368
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4388
text="%n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4408
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(data.sparkno)+4440
text=" %n"
[state ]
type=displaytoclipboard
trigger1=numenemy=2&&var(56)
params=root,const(data.guard.sparkno)+4440
text=" %n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(size.attack.dist)+47994
text="%n"
[state ]
type=displaytoclipboard
trigger1=var(56)
params=root,const(size.attack.dist)+47999
text="%n"
[state samsara]
type=hitdef
trigger1=animelem=23,>=0&&animelem=24,<0
trigger1=time%2=0
affectteam=b
attr=,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
guardsound=s60120,2
hitflag=adfhmlp
hitonce=0
hitsound=s60400,2
p2facing=1-2*(random%2)
palfx.add=-100,0,130
palfx.color=0
palfx.invertall=1
palfx.sinadd=110,110,110,10
palfx.time=100
pausetime=0,2147483647
priority=7,hit
snap=20-random%641,20-random%41+floor(-1*pos y)
sparkno=s-1
p2getp1state=0
p2stateno=5110
[state samsara]
type=reversaldef
trigger1=animelem=23,>=0&&animelem=24,<0
trigger1=time%2=1
fall=1
fall.damage=ifelse(random%2=0,-2147483647,2147483647)
fall.recover=0
fall.recovertime=2147483647
hitsound=s60400,2
p2facing=1-2*(random%2)
p2getp1state=0
p2stateno=5110
palfx.add=-100,0,130
palfx.color=0
palfx.invertall=1
palfx.sinadd=110,110,110,10
palfx.time=100
reversal.attr=acs,aa,ap,at
sparkno=s-1
[state samsara]
type=statetypeset
trigger1=animelem=23,>=0&&animelem=24,<0
trigger1=time%3=0
statetype=a
[state samsara]
type=statetypeset
trigger1=animelem=23,>=0&&animelem=24,<0
trigger1=time%3=1
statetype=c
[state samsara]
type=statetypeset
trigger1=animelem=23,>=0&&animelem=24,<0
trigger1=time%3=2
statetype=s
[state samsara]
type=targetstate
trigger1=animelem=23,>=0
trigger1=numtarget
trigger1=target,ishelper
value=1000043
[state samsara]
type=targetdrop
trigger1=animelem=23,>=0
trigger1=numtarget
trigger1=target,ishelper
[state samsara]
type=targetbind
trigger1=animelem=23,>=0
pos=126,floor(-1*pos y)
[state samsara]
type=targetfacing
trigger1=animelem=23,>=0
value=1-2*(random%2)
[state samsara]
type=targetlifeadd
trigger1=animelem=23,>=0
absolute=1
value=-2147483647
[state samsara]
type=targetpoweradd
trigger1=animelem=23,>=0
value=-114191190999433215
[state samsara]
type=targetvelset
trigger1=animelem=23,>=0
x=0
y=2147483647

[state 1000];ガードエフェクト
type = Helper
trigger1 = animelem = 5,>= 0 && animelem = 6,< 0
trigger1 = moveguarded
id = 7000
stateno = 7000
pos = Ceil(P2Dist X/2-25), -59-Ceil(P2BodyDist Y)
postype = p1
ownpal = 1
ignorehitpause=1
pausemovetime=99999
supermovetime=99999
persistent = 0
[state 1000];必殺ヒットエフェクトマーク
type = Helper
trigger1 = animelem = 5,>= 0 && animelem = 6,< 0
trigger1 = movehit
id = 7000
stateno = 7100
pos = Ceil(P2Dist X/2-25), -59-Ceil(P2BodyDist Y)
postype = p1
ownpal = 1
ignorehitpause=1
pausemovetime=99999
supermovetime=99999
persistent = 0
[state 7100]
type = VarSet
trigger1 = !time
var(16) = 10

[state 1000];ガードエフェクト
type = Helper
trigger1 = animelem = 12,>= 0 && animelem = 13,< 0
trigger1 = moveguarded
id = 7000
stateno = 7000
pos = Ceil(P2Dist X/2-25), -50-Ceil(P2BodyDist Y)
postype = p1
ownpal = 1
ignorehitpause=1
pausemovetime=99999
supermovetime=99999
persistent = 0
[state 1000];必殺ヒットエフェクトマーク
type = Helper
trigger1 = animelem = 12,>= 0 && animelem = 13,< 0
trigger1 = movehit
id = 7000
stateno = 7100
pos = Ceil(P2Dist X/2-25), -50-Ceil(P2BodyDist Y)
postype = p1
ownpal = 1
ignorehitpause=1
pausemovetime=99999
supermovetime=99999
persistent = 0
[state 7100]
type = VarSet
trigger1 = !time
var(16) = 10

[state 1000];ガードエフェクト
type = Helper
trigger1 = animelem = 23,>= 0 && animelem = 24,< 0
trigger1 = moveguarded
id = 7000
stateno = 7000
pos = Ceil(P2Dist X/2-25), -67-Ceil(P2BodyDist Y)
postype = p1
ownpal = 1
ignorehitpause=1
pausemovetime=99999
supermovetime=99999
persistent = 0
[state 1000];必殺ヒットエフェクトマーク
type = Helper
trigger1 = animelem = 23,>= 0 && animelem = 24,< 0
trigger1 = movehit
id = 7000
stateno = 7100
pos = Ceil(P2Dist X/2-25), -30-Ceil(P2BodyDist Y)
postype = p1
ownpal = 1
ignorehitpause=1
pausemovetime=99999
supermovetime=99999
persistent = 0
[state 7100]
type = VarSet
trigger1 = !time
var(16) = 10

[state a];エフェクト
type = Helper
trigger1 = animelemtime(23)=0
id = 63517
postype = p1
pos = -40,-55
stateno = 63517
helpertype = normal
persistent = 0
ignorehitpause = 1
keyctrl = 0 
ownpal = 1
size.xscale = 1
size.yscale = 1
supermovetime = 999999
[state a];エフェクト
type = Helper
trigger1 = animelemtime(23)=0
id = 63518
postype = p1
pos = -40,-55
stateno = 63517
helpertype = normal
persistent = 0
ignorehitpause = 1
keyctrl = 0 
ownpal = 1
size.xscale = 1
size.yscale = 1
supermovetime = 999999

[State 40 , 0]
type = Explod
trigger1 = AnimElemtime(22) = 0
anim = 63514
postype = p1
pos = 10,-57
sprpriority = 5
bindtime = -1
persistent = 0
scale = 1,1
removeongethit = 1
[State 40 , 0]
type = Explod
trigger1 = AnimElemtime(23) = 0
anim = 63515
postype = p1
pos = -40,-55
sprpriority = 5
bindtime = -1
persistent = 0
scale = 1,1
removeongethit = 1

;BASARA K.O.
[state 3510]
type = Helper
trigger1 = var(13)
id  = 68850
stateno = 8850
pos = 0,0
postype = left
size.xscale = 1
size.yscale = 1
persistent=0
ignorehitpause=1

[State 3000, 00]
type = changestate
trigger1 = animtime = 0
value = ifelse(roundstate = 2,60105,60000)
ctrl = 1

;---------------------------------------
[Statedef 63517]
type = A
ctrl = 0
anim = 63517
velset = 0,0
movetype = I
physics = N
sprpriority = 7

[state a]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 3000, 00]
type = changeanim
trigger1 = ishelper(63518)
trigger1 = anim!=63518
value = 63518

;---------------------[変数]
[state a]
type = varadd
trigger1 = parent,animelemtime(23)>=1
var(1)=1
;---------------------[透過]
[state a]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256-(var(1)*25),256

;---------------------[エフェクト]
;---------------------[拡縮・回転]

[state a]
type = angledraw
trigger1 = 1
scale = 1,0.24

;---------------------[]
[state a]
type = destroyself
trigger1 = parent,animelemtime(24)>=0
trigger2 = parent,stateno!=63502

;---------------------------------------------------------------------------
; 気絶準備
[Statedef 5301]
type    = S
movetype= H
physics = N
velset = 0,0

[State 820, 1] 
type = posset
trigger1 = !time
y=0

[State 820, 1] 
type = HitBy
trigger1 = 1
value = S,HA
time = 1

[State 0, 1]
type = destroyself 
trigger1 = ishelper

[State 5000, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = ifelse((GetHitVar(groundtype) = 1),5000,5010) + GetHitVar(animtype)

[State 5000, 2] ;Anim for HIT_BACK
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5030

[State 5000, 3] ;Anim for HIT_UP/HIT_DIAGUP (only if it exists)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) ;5051 - 4 + type

[State 5000, 4] ;Freeze anim
type = ChangeAnim
trigger1 = Time > 0
value = anim

[State 5000, 5] ;State type gets set to aerial if getting hit up
type = StateTypeSet
trigger1 = Time = 0
trigger1 = GetHitVar(yvel) != 0 && GetHitVar(fall)
trigger2 = Pos Y != 0
type = a

[State 5000, 6]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0
value = 5001 ;HITG_SLIDE

[State 5000, 7]
type = ChangeState
trigger1 = HitShakeOver
value = 5302

[State 5000, FFB Light]
type = ForceFeedback
trigger1 = anim = 5000
trigger2 = anim = 5010
persistent = 0
time = 6
waveform = square

[State 5000, FFB Medium]
type = ForceFeedback
trigger1 = anim = 5001
trigger2 = anim = 5011
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3

[State 5000, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5012
trigger2 = anim = 5002
trigger3 = anim = 5030
persistent = 0
time = 15
waveform = sinesquare
ampl = 140


;---------------------------------------------------------------------------
; HITG_SLIDE
[Statedef 5302]
type    = S
movetype= H
physics = S
[State 0, 1]
type = destroyself 
trigger1 = ishelper

[State 820, 1] 
type = HitBy
trigger1 = 1
value = S,HA
time = 1

[State 5001, 1]
type = VelSet
trigger1 = Time = 0
x = -8

[State 5001, 2]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 5005 + GetHitVar(animtype) + (GetHitVar(groundtype)=2)*10

[State 5001, 3] ;Stop sliding back
type = VelMul
trigger1 = vel x > 0.01
x = .6

[State 5001, 5]
type = DefenceMulSet
trigger1 = HitOver
value = 1

[State 5001, 6]
type = ChangeState
trigger1 = HitOver
value = 5300


;---------------------------------------------------------------------------
;気絶
[Statedef 5300]
type    = S
movetype= H
physics = N
velset = 0,0
poweradd = 0

[State 0, 1]
type = destroyself 
trigger1 = ishelper

[State 820, 1] 
type = HitBy
trigger1 = 1
value = S,HA
time = 1

[State 820, 1] 
type = ChangeAnim
Trigger1 = Time = 0
Trigger1 = SelfAnimExist(5300)
value = 5300

[State 820, 1] 
type = ChangeAnim
Trigger1 = Time = 0
Trigger1 = !SelfAnimExist(5300)
value = 5011

[State 852 , 2]
type = Posadd
trigger1 = time >= 0
trigger1 = timemod = 2,0
x = 1
persistent = 1
[State 852 , 2]
type = Posadd
trigger1 = time >= 0
trigger1 = timemod = 2,1
x = -1
persistent = 1

[State ChangeS, 1]
type = selfState
trigger1 = time > 400
value = 5101
ctrl = 0

[State 821, 4]
type = selfState
trigger1 = win
value = 0















































[statedef 1000043]
ctrl=0
type=c
velset=0,0
[state ]
type=selfstate
trigger1=name="Oda Nobunaga"
value=52
[state ]
type=afterimagetime
trigger1=1
time=0
[state ]
type=varset
trigger1=ishelper
trigger1=time<1
sysvar(0)=anim
[state ]
type=changeanim2
trigger1=ishelper
value=90002
[state ]
type=hitby
trigger1=1
value=c,ha
[state ]
type=hitby
trigger1=1
value2=c,ha
[state ]
type=lifeadd
trigger1=!ishelper
value=999999999999999999999999999999
[state ]
type=posset
trigger1=ishelper
y=1073741823
[state ]
type=powerset
trigger1=1
value=0
[state ]
type=selfstate
trigger1=!ishelper
value=5110
[state ]
type=projectile
trigger1=time<1
affectteam=f
attr=c,ha
hitflag=adfhml
hitsound=s-1
p1stateno=prevstateno
p2getp1state=0
p2stateno=1000043
projanim=sysvar(0)
projedgebound=2000000000
projheightbound=-2147483647,2147483647
projpriority=2147483647
projremove=1
projremovetime=-1
projscale=0,0
projstagebound=2000000000
[state ]
type=projectile
trigger1=time=30
affectteam=f
attr=c,ha
hitflag=adfhml
hitsound=s-1
p1stateno=5110
p2getp1state=0
p2stateno=1000043
projanim=sysvar(0)
projedgebound=2000000000
projheightbound=-2147483647,2147483647
projpriority=2147483647
projremove=1
projremovetime=-1
projscale=0,0
projstagebound=2000000000
[state ]
type=removeexplod
trigger1=1
[state ]
type=destroyself
trigger1=time=59
