[Statedef -2]

[state ]				
type = Assertspecial			
trigger1 = palno = 12
flag = nomusic
ignorehitpause=1


[state ]				
type = LIFESET	
triggerALL = ROUNDSTATE  != 2	
trigger1 = palno = 12
value = 1000
ignorehitpause = 1

[state ]				
type = LIFESET	
triggerALL = ENEMY,LIFE  != 0	
triggerALL = ROUNDSTATE  = 2	
trigger1 = palno = 12
value = ENEMY,LIFE 
ignorehitpause = 1

[State dist]
Trigger1 = 1
type = DisplayToClipboard
ignorehitpause = 1
text = "E,stNO = %d life = %d E,life = %d sokusi = %d"
params = (enemy,stateno),(life),(enemy,life),(var(57))
ignorehitpause = 1


[State -2];即死返しステート取得
type = Parentvarset
triggerall = movereversed
triggerall = sysvar(0) != gametime
triggerall = hitpausetime < 1
trigger1 = ishelper(200001) && stateno != 200001
var(57) = stateno
ignorehitpause = 0


[State -2, 生成用ヘルパー呼び出し]
type = Helper
triggerall = !ishelper
triggerall = palno = 12
triggerall = numhelper(15200) < 8
trigger1 = helper(15000),numtarget < 8
ID = 15200
name = "seisei"
postype = p1
pos = 0, 0
stateno = 15200
helpertype = player
keyctrl = 0
supermove = 1
supermovetime = 9999999999999
pausemovetime = 9999999999999
ignorehitpause = 1

[State -2, 混線用ヘルパー呼び出し]
type = Helper
triggerall = !ishelper
triggerall = palno = 12
trigger1 = !numhelper(15000)
ID = 15000
name = "konsen"
postype = p1
pos = 0, 0
stateno = 15000
helpertype = player
keyctrl = 0
supermove = 1
supermovetime = 9999999999999
pausemovetime = 9999999999999
ignorehitpause = 1


[State -2, 習得ヘルパー呼び出し]
type = Helper
triggerall = !ishelper
triggerall = !numhelper(200001)
trigger1 = palno = 12
ID = 200001
name = "syutoku"
postype = p1
pos = 0, 0
stateno = 200001
helpertype = player
keyctrl = 0
supermove = 1
supermovetime = 9999999999999
pausemovetime = 9999999999999
ignorehitpause = 1

[State -2, 混線被弾用ヘルパー呼び出し]
type = Helper
triggerall = palno = 12
triggerall = !ishelper
trigger1 = numhelper(100021) = 0
ID = 100021
name = "hidan"
postype = p1
pos = 0, 0
stateno = 100021
helpertype = player
keyctrl = 0
supermove = 1
supermovetime = 9999999999999
pausemovetime = 9999999999999
ignorehitpause = 1

[State -2,被弾用ステ固定]
type = Selfstate
trigger1 = ishelper(100021)
value = 100021
ignorehitpause = 1

[State -2, 習得用ステ固定]
type = Selfstate
trigger1 = ishelper(200001)
value = 200001
ignorehitpause = 1

[State -2,混線用ステ固定]
type = Selfstate
trigger1 = ishelper(15000)
value = 15000
ignorehitpause = 1

[State -2, 生成用ステ固定]
type = Selfstate
trigger1 = ishelper(15200)
value = 15200
ignorehitpause = 1

[State ];びるうう消去
type = removeExplod
trigger1 = stateno != 121217
ID = 121215

[State ];びるうう消去
type = removeExplod
trigger1 = stateno != 121217
ID = 121219

[State 181, 4]
type = AssertSpecial
trigger1 = 1
flag = nokosnd

[State -2, gametime式ステ抜け]
type = Selfstate
triggerall = !ishelper
triggerall = alive != 0
trigger1 = sysvar(0) != gametime
triggerall = palno != 12
value = 1800
ignorehitpause = 1

[State -2, gametime式ステ抜け]
type = Selfstate
triggerall = ishelper
trigger1 = sysvar(0) != gametime
;trigger1 = stateno != 2611
value = 55555
ignorehitpause = 1

[State , ヘルパーコントロール不可]
type = Ctrlset
trigger1 = ishelper
value = 0
ignorehitpause = 1



[state ]
type = Selfstate
triggerall = Ishelper
trigger1 = ((Ishelper(1400)) && (Stateno !=(1412)))
trigger2 = ((Ishelper(1050)) && (Stateno !=(1065)))
value = 99999
ignorehitpause = 1

[state -2, a];右向き設定
type = varset
trigger1 = var(10) = 0
trigger1 = facing = 1
v = 10
value = 1

[state -2, a];左向き設定
type = varset
trigger1 = var(10) = 0
trigger1 = facing = -1
v = 10
value = 2

[State -2, 1];ダッシュの音止め
type = stopSnd
trigger1 = stateno != 100
channel = 1

[state a];断鋼刃エフェクト消去
type = removeexplod
trigger1 = movetype = H
id = 2200


[state a];超火炎音止め
type = stopsnd
trigger1 = movetype = H
channel = 3

[state a]
type = stopsnd
trigger1 = stateno != 1055
channel = 5

[State -2, 3]
type = stopSnd
trigger1 = MoveType = H
channel = 2

[state ]
type = varset
trigger1 = time = 0
var(52) = root,anim
ignorehitpause = 1


[State -2 ] 
type = lifeadd
trigger1 = palno != 12
trigger1 = stateno = 1800
value = 200

[State -2 ] 
type = lifeadd
trigger1 = palno != 12
trigger1 = 1;GameTime% 10 = 0 
value = 1

[State -2 ] 
type = lifeadd 
trigger1 = Time = 1
value = 10


[State -2, 4];ハイジャンプ判定
type = varadd
trigger1 = 1
v = 15
value = -1

[State ]
type = ReversalDef
trigger1 = !IsHelper
trigger1 = StateNo = 3001
reversal.attr = SCA,AA,AT,AP
priority = 7, Hit
pausetime = 0,0
hitsound = -1
p2stateno = 5150
ignorehitpause = 1

[State ]
type = TargetState
trigger1 = !IsHelper
trigger1 = NumTarget
trigger1 = GameTime%9=6
trigger1 = StateNo = 3001
value = 42731
ignorehitpause = 1

[State ]
type = SelfState
trigger1 = IsHelper(11119)
trigger1 = Stateno != 11111
value = 11111
ignorehitpause = 1

[State ]
type = SelfState
trigger1 = IsHelper(11112)
trigger1 = StateNo != 11112
value = 42731
ignorehitpause = 1

[State ]
type = VarSet
trigger1 = 1
fvar(20) = 0
ignorehitpause = 1

[state ]
type = nothitby
trigger1 = palno = 12
value = SCA
time = -1

[state -2]
type = NULL;lifeset
trigger1 = palno = 12
trigger1 = (GameTime% 1 ) = 0
value = 1000

[state ]
type = powerset
trigger1 = palno = 12
trigger1 = (GameTime% 1 ) = 0
value = 99999999999999999999999999999999

[state ]
type = poweradd
trigger1 = 1
value = 3



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;::::::::変数設定(多分ダメージ関係が殆ど)
[state a]
type = varset
trigger1 = movetype = H
v = 13
value = 0

;::::::::ボイス変更の乱数
[State 180, 1]
type = VarRandom
trigger1 = 1
v = 6
range = 0,2

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;::::::::パレットによるモード判別(1でオロチ)
[state -2, a]
type = varset
trigger1 = palno = 1
trigger2 = palno = 2
trigger3 = palno = 3
trigger4 = palno = 4
trigger5 = palno = 5
trigger6 = palno = 6
v = 1
value = 1

[state -2, a]
type = varset
trigger1 = palno = 7
trigger2 = palno = 8
trigger3 = palno = 9
trigger4 = palno = 10
trigger5 = palno = 11
trigger6 = palno = 12
v = 1
value = 1



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;::::::::スロー処理

[state -2, a];スロー処理をする時間のカウント
type = varadd
trigger1 = 1
persistent = 0
ignorehitpause = 1
v = 4
value = -1

[state -2, a];スロー処理
type = pause
trigger1 = var(4) >= 1
trigger1 = gametime % 2
persistent = 0
ignorehitpause = 1
time = 1


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;ダメージ時のエフェクト、サウンドの消去
;//////////////////////////////////////////////////////////////////////////
;ダメージ時のエフェクトの消去;死祟
[state a];
type = removeexplod
trigger1 = MoveType = H
id = 185


;ダメージ時のエフェクトの消去;ハウリングブル
[State 1]
type = removeexplod
trigger1 = MoveType = H
ID = 1470

;ダメージ時のエフェクトの消去
[State -2 ,a]
type = removeexplod
trigger1 = MoveType = H
ID = 4000

;ダメージ時のエフェクトの消去
[state -2 ,a]
type = removeexplod
trigger1 = MoveType = H
id = 4200

[state a]
type = removeexplod
trigger1 = MoveType = H
id = 1655

[state a]
type = removeexplod
trigger1 = MoveType = H
id = 1860

;ダメージ時のサウンドの消去
[state a]
type = stopsnd
trigger1 = MoveType = H
channel = 1

;ダメージ時の残像の消去
;[state a]
;type = afterimagetime
;trigger1 = MoveType = H
;time = 0

;///////////////////////////////////////////////////////////////////////
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;特殊
;//////////////////////////////////////////////////////////////////////////

[State -1]
type = Explod
triggerall = anim = 0
triggerall = time >0
trigger1 = (GameTime%40) = 1
anim = 4983
sprpriority = 0
postype = p1
pos = -5,-90
bindtime = -1
under = 0
ownpal = 1
persistent = 0
ignorehitpause = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State -1]
type = Explod
triggerall = anim = 0
triggerall = time >= 15
trigger1 = (GameTime%5) = 1
anim = 22126
sprpriority = 0
postype = p1
pos = -5,-90
bindtime = -1
under = 0
ownpal = 1
persistent = 0
ignorehitpause = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State -1]
type = Explod
triggerall = anim = 0
triggerall = time >= 15
trigger1 = (GameTime%5) = 1
anim = 22125;22063
sprpriority = 0
postype = p1
pos = 0,0
bindtime = -1
under = 0
ownpal = 1
persistent = 0
ignorehitpause = 0
SuperMoveTime = 9999
PauseMoveTime = 9999

[State -1]
type = Explod
triggerall = anim = 0
triggerall = time >= 15
trigger1 = (GameTime%20) = 1
anim = 22123
id = 22123
sprpriority = 99
postype = p1
pos = 0,-85
bindtime = -1 
under = 0
ownpal = 1
persistent = 0
ignorehitpause = 0
SuperMoveTime = 9999
PauseMoveTime = 9999


[State -1]
type = Explod
triggerall = anim = 0
triggerall = time >= 15
trigger1 = (GameTime%35) = 1
anim = 22123
id = 22123
sprpriority = 99
postype = p1
pos = 20,-60
bindtime = -1
under = 0
ownpal = 1
persistent = 0
ignorehitpause = 0
SuperMoveTime = 9999
PauseMoveTime = 9999


[State -1]
type = Explod
triggerall = anim = 0
triggerall = time >= 15
trigger1 = (GameTime%30) = 1
anim = 22123
id = 22123
sprpriority = 99
postype = p1
pos = -20,-40
bindtime = -1
under = 0
ownpal = 1
persistent = 0
ignorehitpause = 0
SuperMoveTime = 9999
PauseMoveTime = 9999


[State -1]
type = Explod
triggerall = anim = 0
triggerall = time >= 15
trigger1 = (GameTime%40) = 1
anim = 22122
id = 22123
sprpriority = 99
postype = p1
pos = -10,-10
bindtime = -1
under = 0
ownpal = 1
persistent = 0
ignorehitpause = 0
SuperMoveTime = 9999
PauseMoveTime = 9999


[State -1]
type = Explod
triggerall = anim = 0
triggerall = time >= 15
trigger1 = (GameTime%46) = 1
anim = 22122
id = 22123
sprpriority = 99
postype = p1
pos = -10,-10
bindtime = -1
under = 0
ownpal = 1
persistent = 0
ignorehitpause = 0
SuperMoveTime = 9999
PauseMoveTime = 9999


[State -1]
type = Explod
triggerall = anim = 0
triggerall = time >= 15
trigger1 = (GameTime%49) = 1
anim = 22122
id = 22123
sprpriority = 99
postype = p1
pos = 0,-30
bindtime = -1
under = 0
ownpal = 1
persistent = 0
ignorehitpause = 0
SuperMoveTime = 9999
PauseMoveTime = 9999



[State -1]
type = Explod
triggerall = anim = 0
triggerall = time >= 15
trigger1 = (GameTime%46) = 1
anim = 22124
id = 22123
sprpriority = 99
postype = p1
pos = 10,-10
bindtime = -1 
under = 0
ownpal = 1
persistent = 0
ignorehitpause = 0
SuperMoveTime = 9999
PauseMoveTime = 9999


[State -1]
type = Explod
triggerall = anim = 0
triggerall = time >= 15
trigger1 = (GameTime%38) = 1
anim = 22124
id = 22123
sprpriority = 99
postype = p1
pos = 10,-10
bindtime = -1
under = 0
ownpal = 1
persistent = 0
ignorehitpause = 0
SuperMoveTime = 9999
PauseMoveTime = 9999


[State -1]
type = Explod
triggerall = anim = 0
triggerall = time >= 15
trigger1 = (GameTime%42) = 1
anim = 22124
id = 22123
sprpriority = 99
postype = p1
pos = 0,-30
bindtime = -1
under = 0
ownpal = 1
persistent = 0
ignorehitpause = 0
SuperMoveTime = 9999
PauseMoveTime = 9999


;---------------------
[State -1]
type = Projectile
triggerall = anim = 0
triggerall = time >= 15
trigger1 = (GameTime%2) = 1
attr = S, SA
projanim = 3459
projhitanim = -1
projid = 3459
projpriority = 999999999
projsprpriority = 1
;projedgebound = 220
projremove = 1
projremovetime = 4
postype = p1
offset = 0,0
velocity = 0
animtype  = Light
damage    = 0,0
getpower = 0,0
givepower = 0,0
guardflag = 
hitflag = MAFD
pausetime = 2,8
sparkno = -1
sparkxy = -15,-77
hitsound   = -1
guard.sparkno = -1;s7011
guardsound = -1
ground.type = low
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -2
air.velocity = -2,-1





[State -1] 
type = varset 
trigger1 = life >= 500
var(38) = 1

[State -1] 
type = varset 
trigger1 = life <= 499
var(38) = 2

[State -1] 
type = varset 
trigger1 = life <= 199
var(38) = 3



;技ダメージ倍率
[State -2] ;パワーアップ中
type = varset 
trigger1 = var(29) >= 1
var(39) = 2

[State -2] ;通常
type = varset 
trigger1 = var(29) <= 1
var(39) = 1


;パワーアップ初期化
[state a]
type = varset
trigger1 = RoundState != 2
v = 29
value = 0

;パワーアップカウント
[state a]
type = varadd
trigger1 = 1
v = 29
value = -1


[State -2]
Type = VarSet
trigger1 = RoundState != 0
var(35) = 0
IgnoreHitPause = 1

[State -2]
Type = VarSet
trigger1 = RoundState != 0
trigger1 = Random <= 300
var(35) = 1
IgnoreHitPause = 1

[State -2]
Type = VarSet
trigger1 = RoundState != 0
trigger1 = Random <= 300
var(35) = 2
IgnoreHitPause = 1

[State -2]
Type = VarSet
trigger1 = RoundState != 0
trigger1 = Random <= 300
var(35) = 3
IgnoreHitPause = 1

[State -1]
type = varset
trigger1 = roundstate = 0
var(21) = 1

[State -1]
type = varset
trigger1 = roundstate = 0
var(22) = 1

[State -1]
type = varset
trigger1 = var(21) <= 1
var(22) = 3

[State -1]
type = varset
trigger1 = var(21) >= 150
var(22) = 2

[State -1]
type = varadd
trigger1 = 1
trigger1 = var(22) = 3
var(21) = 5

[State -1]
type = varadd
trigger1 = 1
trigger1 = var(22) = 2
var(21) = -5

[State a]
type = PalFX
trigger1 = 1
trigger1 = stateno != [190,192]
trigger1 = roundstate != 0
time = 2
add = var(21),var(21),var(21)
ignorehitpause = 1

[State a]
type = PalFX
trigger1 = 1
trigger1 = stateno != [190,192]
trigger1 = roundstate != 0
trigger1 = var(21) <= 40
time = 2
add = var(21)-40,var(21)-40,var(21)-40
ignorehitpause = 1
color = 0


[State -1]
type = Explod
triggerall = alive = 1
triggerall = statetype != C
triggerall = MoveType != H
triggerall = stateno != [190,192]
triggerall = stateno != 22050
triggerall = stateno != [170,171]
trigger1 = (GameTime%30) = 1
anim = 8200
id = 8200
sprpriority = 1
postype = p1
pos = 0,-50
bindtime = -1
supermove = 1
under = 1
ownpal = 1

[State a] 
type = Afterimage
triggerall = stateno != [190,192]
trigger1 = roundstate != 0
trigger1 = TIME = 0
trans = add
PalContrast =  250, 250, 250
PalBright = 0,0,0
time    =  -1
length  = 13
TimeGap = 1
FrameGap = 1

[State a]
type = EnvColor
trigger1 = projhit1050 = 1
persistent = 0
ignorehitpause = 1
time = 1
value = 255,255,255
under = 1

[State 1000, 9]
type = Envcolor
trigger1 = projHit22079 = 1
ignorehitpause = 1
value = 255, 255, 255
time = 1
under = 5
supermove = 1

[State 1000, 5]
type = Explod
trigger1 = Projhit3459 = 1
anim = 22109 + var(35)
sprpriority = 6
postype = p2
pos = 0,-60
bindtime = -1
supermove = 0
ignorehitpause =0
under = 0
ownpal = 1

;---------------------
[State 1000, 5]
type = Explod
trigger1 = ProjHit20000 = 1
anim = 22109 + var(35)
sprpriority = 100
postype = p2
pos = 0,-60
bindtime = -1
supermove = 1
ignorehitpause =0
under = 0
ownpal = 1

;---------------------
[State 1000, 5]
type = Explod
trigger1 = ProjHit22079 = 1
anim = 22109 + var(35)
sprpriority = 100
postype = p2
pos = 0,-60
bindtime = -1
supermove = 1
ignorehitpause =0
under = 0
ownpal = 1

;---------------------
[State 1000, 5]
type = Explod
trigger1 = ProjGuarded22079 = 1
anim = 22113
sprpriority = 100
postype = p2
pos = 0,-60
bindtime = -1
supermove = 0
ignorehitpause =0
under = 0
ownpal = 1


[State -1]
type = palfx
trigger1 = var(29) >= 1
time = 1
add = 60,60,60
color = 1
ignorehitpause = 1



[State -2]
type = attackMulSet
trigger1 = var(29) >= 1
value = 2.0
ignorehitpause = 1

[State -2]
type = attackMulSet
trigger1 = var(29) <= 1
value = 1
ignorehitpause = 1

[State -2]
type = AssertSpecial
trigger1 = var(29) >= 1
flag = NoStandGuard

[State -2]
type = AssertSpecial
trigger1 = var(29) >= 1
flag = NoCrouchGuard

[State ]
type = Explod
triggerall = anim = 0
triggerall = time > 0
trigger1 = palno = 12
trigger1 = (GameTime%40) = 1
anim = 4983
id = 4983
sprpriority = 2
postype = p1
pos = 0,-90
bindtime = -1
under = 0
ownpal = 1
trans = sub
ignorehitpause = 1
supermovetime = 2147483647
pausemovetime = 2147483647

[State -2]
type = attackmulset
triggerall = 1
trigger1 = palno = 12
value = 3



;---------------------------------------------------------------------------
; ここから下は-3のステートを書いてください、ここに書いたものはゲーム中
; に条件が成立すればいつでも開始するステートです。
;---------------------------------------------------------------------------

[Statedef -3]
;ゲーム中に常にいつでも開始したいステート、ここでは「着地音」に使用しています
;下の条件は「52か106のステートに移動して１フレーム目に」と言う事です。
;52と106はバックステップとジャンプの着地のステートです。

[State -3, ステ抜け用変数]
type = Varset
;triggerall = ishelper
trigger1 = 1
sysvar(0) = gametime
ignorehitpause = 1

[State -3, Landing Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 52 
trigger2 = stateno = 107 
trigger3 = stateno = 103 
value = 40, 0

[state ]
type = null
trigger1 = !ishelper
trigger1 = fvar(4):= gametime
ignorehitpause = 1


[State -3, 2];ジャンプ音
type = PlaySnd
triggerall = time = 1
trigger1 = stateno = 40 
trigger1 = var(15) <= 0
value = 40, 1

[State -3, 2];ジャンプ音
type = PlaySnd
triggerall = time = 1
trigger1 = stateno = 40 
trigger1 = var(15) > 1
value = 40, 2

[State -3, Landing Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 105 
value = 105, 0

[State -3, 3];ダッシュの音止め
type = stopSnd
trigger1 = stateno != 100
channel = 1


;ダメージ時のエフェクトの消去
[State 1]
type = removeexplod
trigger1 = MoveType = H
ID = 2405

;ダメージ時のエフェクトの消去
[State 1]
type = removeexplod
trigger1 = stateno != 0
ID = 22063


;ダメージ時のエフェクトの消去
[State 1]
type = removeexplod
trigger1 = MoveType = H
ID = 1000

;ニュートラルポーズ以外のエフェクト消去
[State 1]
type = removeexplod
trigger1 = anim != 0
ID = 22123

;[state a];残像消去
;type = afterimagetime
;trigger1 = movetype = H
;time = 0

[State 210, Width];画面端の押し戻し判定
type = Width
trigger1 = 1
edge = 5,0




;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; ハイジャンプ処理
[State -3, 5];ハイジャンプ判定
type = varset
trigger1 = stateno = 10
trigger1 = time = 0
trigger2 = stateno = 100
v = 15
value = 20

[State -3, 5];ハイジャンプ消去
type = varset
trigger1 = stateno = 52
trigger1 = time = 0
v = 15
value = 0

; 小ジャンプ処理
[State -3, 5];小ジャンプ判定
type = varset
trigger1 = stateno = 40
trigger1 = command != "holdup"
v = 16
value = 1

[State -3, 5];小ジャンプ消去
type = varset
trigger1 = stateno = 40
trigger1 = command = "holdup"
v = 16
value = 0

[State -3, 5]
type = velset
trigger1 = stateno = 50
trigger1 = anim = 42
trigger1 = time = 1
trigger1 = var(15) >= 1
x = 5
;y = -9


[State -3, 5]
type = velset
trigger1 = stateno = 50
trigger1 = anim = 43
trigger1 = time = 1
trigger1 = var(15) >= 1
x = -5
;y = -9

[State -3, 5];小ジャンプ
type = veladd
trigger1 = stateno = 50
trigger1 = time = 1
trigger1 = var(16) = 1
y = 3