;-----------------<Normal Attacks>---------------------------------------
;====================================================
; 通常技
;====================================================
;---------------------------------------------------------------------------
; 鳥
[Statedef 200]
type=S
physics=S
movetype=A
anim=6800
ctrl=0
juggle=0
sprpriority=1
poweradd=0
facep2=1
poweradd = -2000

[state ゲージ自動回復]
type = poweradd
trigger1 = AnimElem = 2 ;2フレームごとに回復
value = -1000

[State bird]
type=helper
trigger1 = AnimElemtime(3) >= 0
helpertype=normal
stateno=186
ID = 1230002
name="bird"
postype=left
pos= -160+random%150,-20+random%300
facing= 1
ownpal=0
size.xscale=.5
size.yscale=.5
ignorehitpause=1
persistent = 1

[State -2, アーマー用ステ固定]
type = Selfstate
trigger1 = ishelper(1230002)
value = 186
ignorehitpause = 1
supermovetime = 9999999999999
pausemovetime = 9999999999999

[State 3100,カットイン]
Type=Explod
Trigger1=Time=0
Anim=6820
ID=6820
PosType=back
Pos=-100,-70
Ownpal=0
Scale=0.7,0.7
SprPriority=-3
OnTop=0
RemoveTime=41
IgnoreHitPause=1
Persistent=0
SuperMoveTime=9**8
PauseMoveTime=9**8



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

[state それ以外ではただの透明]
type = changeanim
triggerAll= ishelper
trigger1 = (Root,anim != 200);ここで上の当身発動時のアニメの数値にしてください。する事で設定したアニメ以外だと当身出来なくなります
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 = 1234
p2stateno = 1232;次のステートと同じ数字にしてください 
ignorehitpause = 1


[State 200, Snd]
type=playsnd
trigger1= animelem=2
value= 100,5
[State 200, Snd]
type=playsnd
trigger1= animelem=2
value=0,10



[State 200, Type]
type=statetypeset
trigger1= animelemtime(4)>=0
movetype=I
[State 200, End]
type=changestate
trigger1= !animtime
value=0
ctrl=1

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


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


[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 = 6800;OTHKを入れたいアニメにしてください(小パンならanim = 200となっているはずです)
value = 15000;テンプレその2に入っているものを使用してください
ignorehitpause = 1

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

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

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

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

[state 156, OTHK]
type = reversaldef
triggerall = ishelper
trigger1 = root,anim = 6800 ;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 = 6800;ここで自分がOTHKを使用している時のみ発動するように
value = 1232
ignorehitpause = 1

[state 156, 即死投げ];これで当身を抜ける相手の体力に猛毒をつける
type = targetLifeAdd
triggerall = ishelper
triggerall = numtarget
triggerall = !target,ishelper
triggerall = target,alive
trigger1 = root,anim = 6800
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 = "Zekira"
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 != "Zekira" ;[これで本体の名前が設定してある名前でない時]
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 != "Zekira";[これで本体の名前が設定してある名前でない時]
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 != "Zekira"
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 = 5100;相手の着地ステに放り込む
ignorehitpause = 1

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

[state 1234];
type = selfstate
trigger1 = animtime = 0
value = 5050
