
;攻撃
[Statedef 6800]
type    = S
movetype= A
physics = S
juggle  = 4;0
velset = 0,0
ctrl = 0
anim = 6800
sprpriority = 2



[state 当身発動]
type = changeanim
triggerAll= ishelper
trigger1 = Root,anim = 6800;OTHKを入れたいアニメにしてください(小パンならanim = 200となっているはずです)
value = 15000;テンプレその2に入っているものを使用してください
ignorehitpause = 1

[state それ以外ではただの透明]
type = changeanim
triggerAll= ishelper
trigger1 = (Root,anim != 6800);ここで上の当身発動時のアニメの数値にしてください。する事で設定したアニメ以外だと当身出来なくなります
value = 15010
ignorehitpause = 1

[state 156, OTHK]
type = reversaldef
triggerall = ishelper
trigger1 = 1
reversal.attr = SCA,AA,AT,AP;この設定だとどんなHitdefでも当身します
numhits = 0
sparkno = -1
hitsound = -1
pausetime = 0,0
p1stateno = 520
p2stateno = 6821;次のステートと同じ数字にしてください 
ignorehitpause = 1

[State 800, ヒット定義（投げ用）]
type = HitDef
trigger1 = AnimElem = 1
trigger2 = AnimElem = 2
attr = S, NT ;立ち通常投げ（Standing, Normal Throw）
hitflag = MAF  ;マイナスが付加されてるので相手が食らい中の時は掴めない
priority = 1, Miss
sparkno = -1  ;-1だからヒットスパークは表示しない
p1sprpriority = 1
p1facing = 1
p2facing = 1
p1stateno = 520
p2stateno = 6821
guard.dist = 0 ;相手のガード態勢に入る距離を０にしてるので、ガード不可


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


;---------------------------------------------------------------------------
;ヒット後
[Statedef 520]
type    = S
movetype= A
physics = N
ctrl = 0
anim = 520
velset = 0

[State 810, 掴んだ相手の位置１];TargetBindで相手を一時的に拘束
type = Targetbind
trigger1 = AnimElemTime(2) < 0
pos = 200, 0  ;自分の軸位置から相手の軸をX=28・Y=0の位置にする


[State 810, 掴んだ相手の位置２]
type = Targetbind
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(12) < 1;0
pos = 200, 0;58, 0

[state ]
type = lifeadd
trigger1 = time = 1
value = -200 

[State 1005, 2]
type = PlaySnd
trigger1 = time = 0
LowPriority = 1
Channel = 1
value = s1000,3




[State 3000, エフェクト]
type = Explod
trigger1 = time = 0
anim = 11000
postype = left;left
pos = 0,0
velocity = 0, 0
accel = 0,0
removetime = 530;90
persistent = 0
ownpal= 1
sprpriority = 0
supermovetime = 100
ontop = 1
Scale =1,1
bindtime = -1

                
[State -2];ヘルパー
type = helper
 triggerall = roundstate=2
 triggerall = numhelper(222)=0
 trigger1 = !ishelper
 id = 222
 name = "eizoku"
 pos = 30,0
 postype = P2
 stateno = 222
 helpertype = Normal
 keyctrl = 0
 ownpal = 1


[State ,干渉外へ]
type = Posset
 trigger1 = 1
 trigger1 = IsHelper(222)
 x = root,pos x
 y = root,pos y
 ignorehitpause = 1


[state PH,Recover]
 type = selfstate
 trigger1 = IsHelper(222)
 trigger1 = 1
 value = 222
 ignorehitpause = 1
 pausemovetime = 99999999
 supermovetime = 99999999
 ignorehitpause = 1

[State 1005, 5]
type = ChangeState
trigger1 = animelem = 2
value = 521
ctrl = 1

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

;ビーム
[Statedef 521]
type    = S
movetype= A
physics = N
poweradd= -3000
ctrl = 0
anim = 521
velset = 0

[State 200 , 1]
type = HitDef
trigger1 = AnimElem= 1
attr = , NA
damage    = 9999,9999
animtype = Light
getpower = -3000
givepower = -3000,-2000
hitflag = MAFD
priority = 3, Hit
pausetime = 7,10
numhits = 1
hitsound = s60,6
guardsound = s60,6
sparkno = s2000
sparkxy = -10,-62
ground.type = High
ground.slidetime = 3
ground.hittime  =  13
ground.velocity = -9,-5
airguard.velocity = -1.5
air.velocity = -9,-2
fall = 1
p2lifeadd = -200
fall.damage = 9999

[State 1000, 3]
type = Projectile
trigger1 = animelem = 1
projanim = 555
projedgebound = 70
projID = 555
projpriority = 1
postype = p1
offset = 50,-250
attr = S, SP
damage = 9999,9999
animtype = hard
hitflag = MAFP
guardflag = MA
sparkxy = 0,-60
hitsound = S60,6
guardsound = S60,6
pausetime = 0,13
ground.hittime = 17
ground.type = high
ground.slidetime = 17
ground.velocity = -12.3
air.velocity = -3,-4
air.fall = 1
air.juggle = 10
yaccel = .5
Scale = 0.8,0.8

[State 2000, 背景]
type = BGPalFX
Trigger1=1
time = 40
add = 256,256,256
mul = 0,0,0
invertall = 0

[State 1005, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;--------------------

;---------------------------------------------------------------------------
;相手側２（吹っ飛び）
[Statedef 6821]
type    = A
movetype= H
physics = N
velset = 0,0

[State 820, 相手のアニメ変更]
type = ChangeAnim2
trigger1 = Time = 0
value = 6821

[State 820]
Type           = PosSet
Trigger1       = 1
X              = 0
Y              = -20
IgnoreHitPause = 1


[State 820, 相手ステートに戻す]
type = SelfState
trigger1 = !GetHitVar(IsBound) ;（※３）
value = 5050
;--------------

;永久ヘルパー
[Statedef 222]
 type = A
 movetype = A　　;←ここは必ずmovetype = A（攻撃）にして下さい。　　　　　
physics = N
 velset = 0,0
 ctrl = 0
 Anim = 1058;攻撃判定を持つ物1058のanimtimeをー１にしないでください
SprPriority = 3
 movehitpersist = 1
 hitdefpersist = 1

[State 10000, 1];殴られたり投げられたりしないように設定
type = NotHitBy
trigger1 = 1
value = SCA, NT, ST, HT, NA, SA, HA,NP,SP,HP


[State ,ターゲット取得]
type = HitDef
 trigger1 = IsHelper(222)
 Trigger1=Anim=1058
 attr = ,SA
 sparkno = -1
 hitsound = -1
 hitflag = MAFD
 affectteam = E
 pausetime =15 ,15 ;親変更時にHitPauseTimeが必要になってくるのでこの段階で付けておく

[State 2501,UnGuard];ガード不可設定

Type=assertSpecial

trigger1 = IsHelper(222)
 flag=unGuardable


[State 1058, 3];相手がガードモーションを取り続けないよう movetype を I に
type = statetypeset
 trigger1 = movehit >= 1
 trigger1 = IsHelper(222)
 statetype = S
 movetype = I
 physics = N
 ignorehitpause = 1


[State 1058,1]
 type = reversaldef
 trigger1 = IsHelper(222)
 trigger1 = movehit >= 1;攻撃がヒットした直後から起動します。movecontact や moveguarded なども使えます。
reversal.attr = SCA,AA,AT,AP
 ignorehitpause = 1


 [State 1058,4]; 影消し
Type = AssertSpecial
 trigger1 = IsHelper(222)
 Trigger1 = movehit = 0
 Flag = NoShadow
 IgnoreHitPause = 1


[State 1058,5]; ヒット時透明に
Type = AssertSpecial
 trigger1 = IsHelper(222)
 triggerall = ishelper
 trigger1 = NumTarget
flag = NoShadow
 flag2 = invisible
 IgnoreHitPause = 1


[State 10000]
type = TargetState
triggerall = Target,movetype != H
triggerall = Target,stateno != 10001
trigger1 = Root,stateno = 521
trigger1 = Root,screenpos x >= (var(10)-320)	;必ず攻撃が当たるｘ座標差（前方）　※
trigger1 = Root,screenpos x <= (var(10)+320)	;必ず攻撃が当たるｘ座標差（後方）　※
trigger1 = var(11) >= (240-240)			;必ず攻撃が当たるｙ座標差　※
value = 10001
IgnoreHitPause = 1

 [State 1058,2];
type = targetlifeadd
trigger1 = Root,stateno = 521
trigger1 = Root,screenpos x >= (var(10)-320)	;必ず攻撃が当たるｘ座標差（前方）　※
trigger1 = Root,screenpos x <= (var(10)+320)	;必ず攻撃が当たるｘ座標差（後方）　※
trigger1 = var(11) >= (240-240)			;必ず攻撃が当たるｙ座標差　※
 trigger1 = ishelper(222)
 trigger1 = 1
 value = -200

[state 10001]
type = targetlifeadd
trigger1 = IsHelper(222)
trigger1 = p2stateno = 10001
trigger1 = p2Life >= 800
Trigger1 = RoundState =2
value = -2000

[State 1058,2]
type = targetlifeadd
 trigger1 = IsHelper(222)
 trigger1 = p2stateno = 10001
 trigger1 = p2Life <= 800
 Trigger1 = RoundState =2
 value = -1000000


[State 1058,7]; 無敵に
Type = nothitby
 trigger1 = IsHelper(222)
 triggerall = ishelper
 trigger1 = NumTarget
 Trigger1 = 1
 value = sca
 time = -1

IgnoreHitPause = 1

[State 140, アニメ変更];1058のanimtimeをー１にしないでください
type = ChangeAnim
 trigger1 = time=0
 triggerall = IsHelper(222)
 value = 1058


[State 140, アニメ変更]
type = ChangeAnim
 Trigger1 = RoundState =2

triggerall = IsHelper(222)
 triggerall = ishelper
 trigger1 = NumTarget
 trigger1 =!target,Ishelper
 triggerall = !HitPauseTime
 value = 223


[State 3600, 5]
 type = Destroyself
 triggerall = IsHelper(222)
 Trigger1=Anim=223
 Trigger1=AnimTime=0 

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

[Statedef 10001]
type = U
movetype = H
physics = U
sprpriority = -1
ctrl = 0

[State 10001]
type = ChangeAnim
triggerall = Statetype != A
trigger1 = Anim != 0
value = 0
[State 10001]
type = ChangeAnim
trigger1 = Statetype = A
value = 41
[State 10001]
type = VelSet
trigger1 = 1
x = 0
y = 0
[State 10001]
type = PosSet
trigger1 = 1
y = ifelse((Statetype = A),-20,0)
persistent = 0


[State 10001]
type = HitBy
trigger1 = 1
value = SCA,AA,AP,AT
[State 10001]
type = SelfState
trigger1 = Time >= 30
value = 5050

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

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


[Statedef 1234]
[State 1234, 1]
type = Statetypeset
trigger1 = ishelper(1234);これでこのヘルパー以外読み込まない
movetype = I
physics = N
ignorehitpause = 1

[state 1234];本体が入ったらすぐさま抜ける
type = selfstate
trigger1 = !ishelper
value = 0
ignorehitpause = 1

[state 当身発動]
type = changeanim
triggerall = ishelper
trigger1 = Root,anim = 3334;OTHKを入れたいアニメにしてください(小パンならanim = 200となっているはずです)
value = 15000;テンプレその2に入っているものを使用してください
ignorehitpause = 1

[state それ以外ではただの透明]
type = changeanim
triggerAll= ishelper
trigger1 = (Root,anim != 3334);ここで上の当身発動時のアニメの数値にしてください。する事で設定したアニメ以外だと当身出来なくなります
value = 15010
ignorehitpause = 1


[State 157, 3]
type = Ctrlset  
trigger1 = ishelper(3334)
value = 0 
ignorehitpause = 1

[state 20000];ヘルパーは透明に
type = assertspecial
trigger1 = ishelper
flag = invisible
flag2 = noshadow
ignorehitpause = 1

[State 157, 5];ここでヘルパーの体力を固定して死なないようにします
type = Lifeset
trigger1 = ishelper(3334)
value = 9999999999999
ignorehitpause = 1

[state 156, OTHK]
type = reversaldef
triggerall = ishelper
trigger1 = root,anim = 3334 ;OTHK発動時の本体アニメ
reversal.attr = SCA,AA,AT,AP;この設定だとどんなHitdefでも当身します
numhits = 0
sparkno = -1
hitsound = -1
pausetime = 0,0
p2stateno = 1232;次のステートと同じ数字にしてください 
ignorehitpause = 1

[State 157, 6]
type = Screenbound
trigger1 = ishelper(1234)
value = 0
ignorehitpause = 1

[State 157, 7];本体に追従
type = Bindtoroot
trigger1 = ishelper(1234)
pos = 0,0
ignorehitpause = 1

[State 157, 8] ;すり抜けする
type = Playerpush 
trigger1 = ishelper(1234)
value = 1
ignorehitpause = 1

[State 157, 9];振り返る
type = Turn                     
triggerall = ishelper(1234)
trigger1 = facing != root,facing
ignorehitpause = 1


[state 156, 即死投げ];これで相手が当身を感知して抜けても捕まえる
type = targetstate
triggerall = ishelper
triggerall = numtarget;ターゲットを取った時
triggerall = !target,ishelper;ターゲットがヘルパーでない＝本体である時
triggerall = target,alive;ターゲットが生きている時
trigger1 = root,anim = 3334;ここで自分がOTHKを使用している時のみ発動するように
value = 1232
ignorehitpause = 1

[state 156, 即死投げ];これで当身を抜ける相手の体力に猛毒をつける
type = targetLifeAdd
triggerall = ishelper
triggerall = numtarget
triggerall = !target,ishelper
triggerall = target,alive
trigger1 = root,anim = 3334
value = -9999999999999999
ignorehitpause = 1

[state 157];ラウンド終了時にアニメ変更
type = changeanim
value = 15010
trigger1 = roundstate = 4
ignorehitpause = 1

[State 157, 12];ここで終わった時にヘルパーを消す
type = Destroyself                    
triggerall = ishelper(1234)
trigger1 = !alive;このヘルパーが死んだ時       
trigger2 = !root,alive;本体が死んだとき              
ignorehitpause = 1



[Statedef 1232];ここが捕まえた相手のヘルパーなどを読み込ませるステート
type = U
movetype = U
physics = N
ctrl = 0

[state 20000];使用者本人は脱出
type = selfstate
trigger1 = name = "izayoi aki & BRD"
value = 52
ignorehitpause = 1

[state 20000];無敵にして邪魔されないように。
type = nothitby
trigger1 = 1
value = SCA,AA,AT,AP
ignorehitpause = 1

[state 20000];ヘルパーは透明に
type = assertspecial
trigger1 = ishelper
flag = invisible
flag2 = noshadow
ignorehitpause = 1

[state 20000, OTHK用]
type = projectile
triggerall = ishelper
triggerall = root,alive
triggerall = root,name != "izayoi aki & BRD" ;[これで本体の名前が設定してある名前でない時]
triggerall = !root,numprojid(20001);[下のprojectileが存在していない時]
triggerall = root,stateno != 5150;[読み込ませた相手のヘルパーの本体が5150にいない時]
trigger1 = !time;[入った瞬間]
attr = SCA,HP;[上のヘルパーはどの攻撃でもあたるので適当な属性でいいです]
projid = 20000
projanim = anim;ここで捕まえたヘルパーのアニメと同じアニメのprojectileを飛ばす
projpriority = 7
projremove = 0
projremovetime = 10
projedgebound = 1000
projstagebound = 1000
projheightbound = -2000,2000
projmisstime = 1
postype = p2
offset = 0,0
pausetime = 0,10
p1stateno = prevstateno;←このprevstatenoで相手本体をヘルパーがhitdefしてたステにシュートする
supermovetime = 9999999999999
pausemovetime = 9999999999999
ignorehitpause = 1

[state 20000];相手がhitdef振らないなら、これで返す
type = projectile
triggerall = ishelper
triggerall = root,alive;[本体が生きている時]
triggerall = root,name != "izayoi aki & BRD";[これで本体の名前が設定してある名前でない時]
triggerall = !root,numprojid(20001);[このprojectileが存在していない時]
triggerall = root,stateno != 5150;[本体がステート5150にいない時]
trigger1 = time > 10;[入って10F立ってから]
attr = SCA,HP
projid = 20001
projanim = anim
projpriority = 7
projremove = 0
projremovetime = 15
projedgebound = 1000
projstagebound = 1000
projheightbound = -2000,2000
projmisstime = 1
postype = p2
offset = 0,200
pausetime = 0,10
p1stateno = 5150;←相手を倒れステ
supermovetime = 9999999999999
pausemovetime = 9999999999999
ignorehitpause = 1

[state 20000];用済みなものは処分
type=destroyself
triggerall = ishelper
trigger1 = !root,alive;本体が死んだ場合
trigger2 = time > 20;20F立ってから
ignorehitpause=1

[state 20000 ];即死
type = lifeset
triggerall = !ishelper;ヘルパーでない＝本体
trigger1 = name != "izayoi aki & BRD"
value = 0
ignorehitpause = 1

[state 20000];死んだら倒れステにシュート
type = selfstate
triggerall = !ishelper
trigger1 = !alive
value = 5100;相手の倒れステに放り込む
ignorehitpause = 1

[state 20000];生きてたら、着地ステにポイ捨て
type = selfstate
triggerall = !ishelper
trigger1 = alive
trigger1 = time > 10
value = 52;相手の着地ステに放り込む
ignorehitpause = 1

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



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

;冷たい炎

[Statedef 1900]
type = S
movetype = A
physics = S
ctrl = 0
PowerAdd = -1000

[State 800, 1]
type = ChangeAnim
Trigger1 = Time = 0
value = 6900

[State 13000, NotHitby]
type = NotHitBy
trigger1 = 1
value = SCA

[state ]
type = lifeadd
trigger1 = time = 1
value = -200 

[State -2, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = s1000,4
chanel = 1


[State ,RemoveExplod]
Type   = RemoveExplod
Trigger1   = 1
ID   = 20000
Persistent     = 1
IgnoreHitPause  = 0

[State 3000, エフェクト]
type = Explod
trigger1 = time = 0
anim = 10000
postype = left;left
pos = 0,0
velocity = 0, 0
accel = 0,0
removetime = 110
persistent = 0
ownpal= 1
sprpriority = 0
supermovetime = 100
ontop = 1
Scale =1,1
bindtime = -1

[State 1000, 3]
type = Projectile
trigger1 = time = 1
projanim = 10001
projedgebound = 70
projID = 10001
projpriority = 1
postype = p2
offset = 0,-50
attr = S, SP
damage = 8,8
animtype = hard
hitflag = MAFP
guardflag = MA
sparkxy = 0,-30
hitsound = -1
guardsound = -1
pausetime = 0,13
ground.hittime = 17
ground.type = high
ground.slidetime = 17
ground.velocity = 0,0
air.velocity = 0,-4
air.fall = 1
air.juggle = 10
yaccel = .5
size = 0.8,0.8
ProjRemoveTime = 200
ProjHits  =  100
ProjRemove = 0
OwnPal = 1

[State 3000, エフェクト]
type = Explod
triggerall = teamside = 1
trigger1 = AnimTime = 0
anim = 20000
ID = 20000
postype = left
pos = 0,0
velocity = 0, 0
accel = 0,0
removetime = -1 ;90
persistent = 0
ownpal= 1
sprpriority = -3
supermovetime = 10
ontop = 0
Scale =1,1
bindtime = -1

[State 3000, エフェクト]
type = Explod
triggerall = teamside = 2
trigger1 = AnimTime = 0
anim = 20000
ID = 20000
Facing = -1
postype = left
pos = 340,0
velocity = 0, 0
accel = 0,0
removetime = -1 ;90
persistent = 0
ownpal= 1
sprpriority = -3
supermovetime = 10
ontop = 0
Scale =1,1
bindtime = -1

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

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


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

;ブレス

[Statedef 2000]
type = S
movetype = A
physics = S
ctrl = 0
PowerAdd = -1000

[State 800, 1]
type = ChangeAnim
Trigger1 = Time = 0
value = 7000

[State 13000, NotHitby]
type = NotHitBy
trigger1 = 1
value = SCA

[state ]
type = lifeadd
trigger1 = time = 1
value = -200 

[State -2, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = s1000,5
chanel = 1

[State 1000, 3]
type = Projectile
triggerall = teamside = 1
trigger1 = time = 1
projanim = 2222
projedgebound = 70
projID = 2222
projpriority = 1
postype = back
offset = 140,-200
attr = S, SP
damage = 20,20
animtype = hard
hitflag = MAFP
sparkno = -1
hitsound = -1
guardsound = -1
pausetime = 0,13
ground.hittime = 17
ground.type = high
ground.slidetime = 17
ground.velocity = 0,0
air.velocity = 0,-4
air.fall = 1
air.juggle = 10
yaccel = .5
scale = 0.5,0.5
ProjRemoveTime = 57
ProjHits  =  100
ProjRemove = 0
OwnPal = 1

[State 1000, 3]
type = Projectile
triggerall = teamside = 2
trigger1 = time = 1
projanim = 2222
projedgebound = 70
projID = 2222
projpriority = 1
postype = back
offset = 140,-200
attr = S, SP
damage = 20,20
animtype = hard
hitflag = MAFP
sparkno = -1
hitsound = -1
guardsound = -1
pausetime = 0,13
ground.hittime = 17
ground.type = high
ground.slidetime = 17
ground.velocity = 0,0
air.velocity = 0,-4
air.fall = 1
air.juggle = 10
yaccel = .5
scale = 0.5,0.5
ProjRemoveTime = 57
ProjHits  =  100
ProjRemove = 0
OwnPal = 1

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

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

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

;ブラックローズガイル

[Statedef 2100]
type = S
movetype = A
physics = S
ctrl = 0
PowerAdd = -1000

[State 800, 1]
type = ChangeAnim
Trigger1 = Time = 0
value = 3335

[State 800, 1]
type = ChangeAnim
Trigger1 = Time = 600
value = 3334

[State 13000, NotHitby]
type = NotHitBy
trigger1 = 1
value = SCA

[state test]
type = varset
 trigger1 = var(35) = 0
 var(35) = 1

[State -2, 1]
type = PlaySnd
trigger1 = time = 0
value = s1000,6




[State ,RemoveExplod]
Type   = RemoveExplod
trigger1 = AnimElem = 3
ID   = 20000
Persistent     = 1
IgnoreHitPause  = 0

[State 3000, エフェクト]
type = Explod
trigger1 = AnimElem = 2
anim = 3333
ID = 3333
postype = back
pos = 0,0
velocity = 0, 0
accel = 0,0
removetime = 300 ;90
persistent = 0
ownpal= 1
sprpriority = -3
supermovetime = 300
ontop = 1
Scale =1,1
bindtime = -1


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