;Statedef -2 / 謎システム集　＆　Statedef -3
;-------------------------------------------------
;常時実行ステート
;
;TsMUGENに使用する場合は、-2を-3に書き換えること。
;さらに、下のほうにある[Statedef -3]を消すこと。

[Statedef -2]

[State -3]
Type = VarSet
Trigger1 = stateno != 3537
V = 55
Value = -255

[State -3]
Type = VarSet
Trigger1 = stateno != [1000,1001]
V = 36
Value = 0

[State -2]
Type = VarSet
Triggerall = Palno != [7,12]
Trigger1 = Time = 0
Trigger1 = StateType != A
V = 2
Value = 3

[State -2]
Type = VarSet
Triggerall = Palno = [7,12]
Trigger1 = Time = 0
Trigger1 = StateType != A
V = 2
Value = 99

[State 0, PlayerPush]
Type = PlayerPush
triggerall = palno = 12
Trigger1 = 1
IgnoreHitPause = 1
Value = 1

[State 6671, Trans]
Type = Trans
triggerall = palno = [7,12]
Trigger1 = 1
Trans = add

[State 1000, 5]
type = Explod
trigger1 = ProjHit1042 = 1
anim = 6680
sprpriority = 100
postype = p2
pos = -15,-45
bindtime = -1
ignorehitpause =0
under = 0
ownpal = 1
scale = 0.5,0.5
trans = sub
removetime = 60

[State -2]
type = null;PalFX
triggerall = palno = [1,6]
triggerall = Life <= 400
triggerall = Life != 0
trigger1 = stateno != 5150
trigger1 = time = 0
time = 9999999999999999999999
add = -255,-255,-255
;mul = -1,0,0
sinadd = 140,140,120,100

[State -2]
type = null;PalFX
triggerall = palno = [1,6]
trigger1 = Life = 0
time = 9999999999999999999999
add = -1,-1,-1
;mul = -1,0,0

[State 2000]
type =null;bgPalFx
triggerall = roundstate >= 2
triggerall = palno = [1,6]
triggerall = Life <= 400
triggerall = Life != 0
trigger1 = time >= 0
add = -256,-256,-256
time = 25

[State -2]
type = null;bgPalFX
trigger1 = NumHelper(10000) = 1
trigger1 = time = 0
time = 999999999999999999
add = -150,-255,-255
sinadd = 140,140,145,240
abspan = 0
persistent = 0

[State -2]
type = PalFX
triggerall = palno = [7,11]
trigger1 = time = 0
time = 9999999999999999999999
add = -255,-255,-255
sinadd = 140,140,145,140

[State 2399]
Type = null;AssertSpecial
triggerall = palno = [1,6]
triggerall = Life <= 400
Trigger1 = 1
Flag = Noshadow

[State 2399]
Type = AssertSpecial
triggerall = palno = [7,12]
Trigger1 = 1
Flag = Noshadow

[State 2399]
Type = AssertSpecial
triggerall = palno = 12
Trigger1 = 1
Flag = invisible

[State -1]
Type           = AfterImage
triggerall = palno = 12
trigger1 = (GameTime%86)+ (random%4) = 1
Time           = 13  - (random%4)
Trans          = Add
Length         = 25+ (random%3)
TimeGap        = 1
FrameGap       = 1
PalBright      = 40 , 0 , 0
PalContrast    = 30- (random%3) , 20- (random%3) , 30- (random%3)
PalAdd         = 0 , 0 , 0
PalMul         = .30 , .3 , .3

[State -1]
Type           = AfterImage
triggerall = palno = 12
trigger1 = (GameTime%86)+ (random%4) = 1
Time           = 10  - (random%3)
Trans          = Add
Length         = 22+ (random%3)
TimeGap        = 1
FrameGap       = 1
PalBright      = 50 , 0 , 0
PalContrast    = 55- (random%3) , 45- (random%3) , 55- (random%3)
PalAdd         = 0 , 0 , 0
PalMul      = .40,.40,.40  ;残像の色の乗算値（赤,緑,青・ＲＧＢ・float）

[State -1]
Type           = AfterImage
triggerall = palno = 12
trigger1 = (GameTime%99)+ (random%5) = 1
Time           = 8 - (random%3)
Trans          = Add
Length         = 18+ (random%3)
TimeGap        = 1
FrameGap       = 1
PalBright      = 100 , 0 , 0
PalContrast    = 65- (random%3) , 65- (random%3) , 65- (random%3)
PalAdd         = 0 , 0 , 0
PalMul      = .50,.50,.50  ;残像の色の乗算値（赤,緑,青・ＲＧＢ・float）

[state a]
type = PlayerPush
trigger1 = palno = 12
value = 0

[State -2]
type = null;Helper
triggerall = palno = [1,6]
triggerall = alive
trigger1 = Life <= 400
trigger1 = roundstate = 2
trigger1 = NumHelper(3513) = 0
ID = 3513
pos = 0, 0
postype = p1
stateno = 3513
helpertype = normal
ownpal = 0
pausemovetime = 999999 
supermovetime = 99900000

[State -2]
type = attackmulset
trigger1 = NumHelper(3513) = 1
value = 1.1

[State 1000]
type = Helper
Triggerall = NumHelper(6020) = 0
Triggerall = roundstate <= 2
trigger1 = var(6) != -100
trigger1 = time = 1
stateno = 6020
id = 6020
helpertype = normal
pos = 0,0
postype = P1
keyctrl = 0
ownpal = 0
IgnoreHitPause = 1
SuperMoveTime = 9999
PauseMoveTime = 9999
persistent = 0

[State -2,l]
type = null;lifeadd
triggerall = palno = [1,6]
triggerall = Life >= 1
triggerall = Life <= 350
trigger1 = (GameTime%30)= 1
trigger1 = roundstate = 2
value = 1

[State -2,p ]
type = null;poweradd
triggerall = palno = [1,6]
triggerall = movetype != H
trigger1 = (GameTime%50)= 1
value = 1

[State -2,p ]
type = null;poweradd
triggerall = 1
triggerall = Life <= 400
trigger1 = palno = [1,6]
value = 1

[State -2, ]
type = poweradd
triggerall = palno = [7,12]
trigger1 = time >= 0
value = 3000

[State -2]
type = HitOverride
triggerall = palno = [7,12]
trigger1 = 1
attr = SCA, NA, SA, HA ,NP, SP, HP
stateno = 1082
ignorehitpause = 1
time = 1

[State -2, 幻影消去]
Type = RemoveExplod
Trigger1 = StateNo != 400
ID = 6040


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

[State -2, 距離確認デバック]
type = AppendToClipboard
trigger1 = 1
text =  "P2X:%f,P2Y:%f,Vx%f,Vy%f,Py%f \n"
params = P2BodyDist x,P2BodyDist y,vel x,vel y,Pos y
IgnoreHitPause = 1

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


;----------------------------------------------------------------
; 叩き付け音
[State -2]
Type = PlaySnd
Trigger1 = P2StateNo = 5812
Trigger2 = P2StateNo = 5823
Value = S2, 2
Channel = 7
Persistent = 0

[State 2399]
Type = Varset
Trigger1 = var(6) <= 0
V = 6
value = 0

[State -2]
Type = varset
Trigger1 = var(59)>0
var(57)=ifelse((!enemynear,alive&&numenemy=2),1,0)

[Statedef 10000]
anim=0;なにも表示しないｱﾆﾒでもいいけど入れなくても全然問題ない
ctrl=0

[State 10000,間違いで本体が来たら立ちへ移行]
type=selfstate
trigger1=!ishelper
value=0

[State 10000,プレイヤー判定]
type=varset
trigger1=command="up"&&root,command="up"
trigger2=command="down"&&root,command="down"
trigger3=command="back"&&root,command="back"
trigger4=command="fwd"&&root,command="fwd"
trigger5=command="a"&&root,command="a"
trigger6=command="b"&&root,command="b"
trigger7=command="c"&&root,command="c"
trigger8=command="x"&&root,command="x"
trigger9=command="y"&&root,command="y"
trigger10=command="z"&&root,command="z"
trigger11=command="start"&&root,command="start"
var(59)=-1

[State 10000,立ったら消失]
Type = DestroySelf
triggerAll = isHelper
Trigger1 = root,var(59)||var(59)=-1
trigger2=command="up"&&root,command="up"
trigger3=command="down"&&root,command="down"
trigger4=command="back"&&root,command="back"
trigger5=command="fwd"&&root,command="fwd"
trigger6=command="a"&&root,command="a"
trigger7=command="b"&&root,command="b"
trigger8=command="c"&&root,command="c"
trigger9=command="x"&&root,command="x"
trigger10=command="y"&&root,command="y"
trigger11=command="z"&&root,command="z"
trigger12=command="start"&&root,command="start"

[State 10000,ﾌﾗｸﾞON]
type=varset
triggerall=var(59)!=-1
trigger1=root,command="up"
trigger2=root,command="down"
trigger3=root,command="back"
trigger4=root,command="fwd"
trigger5=root,command="a"
trigger6=root,command="b"
trigger7=root,command="c"
trigger8=root,command="x"
trigger9=root,command="y"
trigger10=root,command="z"
trigger11=root,command="start"
var(59)=1