
;=================================================================================================
;		立ちシールド(開始)
;=================================================================================================

[Statedef 900]
type = S
movetype = I
physics = S
anim = 900
ctrl = 0

[State 210, 1]
type = PlaySnd
trigger1 = animelem = 2
value = S0,7
ignorehitpause = 1
persistent = 1

[State explod]
type = Explod
trigger1 = animelem = 2
anim = 6010 + random%2
supermove = 1
pausemovetime = 1
pos = 31,-87
sprpriority = 2
removeongethit = 1
ownpal = 1

[State explod]
type = Explod
trigger1 = MoveHit
anim = ifelse( Random%2 = 0, 6015, 6016 )
supermove = 1
pausemovetime = 1
pos = 31,-87
sprpriority = 2
removeongethit = 1
ownpal = 1

[State var]
type = varset
trigger1 = time = 0
var(3) = 0

[State explod]
type = RemoveExplod
trigger1 = time = 0
ID = 200

[State vel]
type = veladd
trigger1 = vel x != 0
x = ifelse(vel x >0,-.01,.01)

[State 900]
type = ReversalDef
trigger1 = PalNo <= 10
trigger1 = StateNo = 900
getpower = 70
ID = 6010
reversal.attr = SCA,AA,AP,AT
PauseTime = 6*(PalNo<=10),30
sparkno = -1
hitsound = s4,random%2
p1stateno = 901
numhits = 0

[State 101,next]
type = ChangeState
triggerall = var(12) != 1
trigger1 = movehit
trigger1 = command = "236C"
value = 2800
ctrl = 0
ignorehitpause = 1

[State type]
type = StateTypeSet
trigger1 = animelem = 3
movetype = I

[State end]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

;=================================================================================================
;		立ちシールド(成功)
;===========================================
[Statedef 901]
type = S
movetype = I
physics = S
anim = 901
ctrl = 0

[State 900]
type = ReversalDef
trigger1 = PalNo <= 10
trigger1 = time <= 4
getpower = 70
ID = 6010
reversal.attr = SCA,AA,AP,AT
PauseTime = 6*(PalNo<=10),30
sparkno = -1
hitsound = s4,random%2;S32,1
p1stateno = 901
numhits = 0

[State explod]
type = RemoveExplod
trigger1 = time = 0
ID = 6010
ignorehitpause = 0

[State power]
type = PowerAdd
trigger1 = animelem = 1
value = 50
ignorehitpause = 0
persistent = 0

[State 210, 1]
type = PlaySnd
trigger1 = animelem = 1
value = S32, random%2
ignorehitpause = 0
persistent = 0
channel = 0

[State explod]
type = Explod
trigger1 = !Time
anim = ifelse( Random%2 = 0, 6015, 6016 )
supermove = 1
pausemovetime = 1
pos = 31,-87
sprpriority = 2
removeongethit = 1
ownpal = 1

[State 210, 1]
type = PlaySnd
trigger1 = animelem = 1
value = 110,7
ignorehitpause = 0
persistent = 0
channel = 0

[State 101,next]
type = ChangeState
triggerall = var(12) != 1
trigger1 = command = "236C"
value = 2800
ctrl = 0
ignorehitpause = 1

[State pos]
type = PosFreeze
trigger1 = animelem = 3,< 0

[State end]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

;=================================================================================================
;		しゃがみシールド(開始)
;=================================================================================================
[Statedef 910]
type = C
movetype = I
physics = C
anim = 910
ctrl = 0

[State 210, 1]
type = PlaySnd
trigger1 = animelem = 2
value = S32,5
ignorehitpause = 1
persistent = 1

[State 210, 1]
type = PlaySnd
trigger1 = animelemtime(2)= 0
value = S0,7
ignorehitpause = 1
persistent = 0

[State explod]
type = Explod
trigger1 = animelem = 2
anim = 6010 + random%2
ID = 6010
supermove = 1
pausemovetime = 1
pos = 32,-58
sprpriority = 2
removeongethit = 1
ownpal = 1

[State var]
type = varset
trigger1 = time = 0
var(3) = 1

[State 910]
type = ReversalDef
trigger1 = AnimElem = 2
reversal.attr = SCA,NA,SA,HA,NP,SP
PauseTime = 6*(PalNo<=10),30
sparkno = -1
hitsound = s4,random%1
p1stateno = 911
numhits = 0

[State 101,next]
type = ChangeState
triggerall = var(12) != 1
trigger1 = command = "236C"
trigger1 = movehit
value = 2800
ctrl = 0
ignorehitpause = 1

[State type]
type = StateTypeSet
trigger1 = animelem = 4
movetype = I

[State end]
type = ChangeState
trigger1 = animtime = 0
value = 11
ctrl = 1

;=================================================================================================
;		しゃがみシールド(成功)
;===============================================

[Statedef 911]
type = C
movetype = I
physics = C
anim = 911
ctrl = 0

[State 910]
type = ReversalDef
trigger1 = time <= 3
getpower = 70
reversal.attr = SCA,NA,SA,NP,SP
PauseTime = 6*(PalNo<=10),30
sparkno = -1
hitsound = s4,random%1
p1stateno = 911
numhits = 0

[State explod]
type = RemoveExplod
trigger1 = time = 0
ID = 6010
ignorehitpause = 0

[State 210, 1]
type = PlaySnd
trigger1 = animelem = 1
value = S32, random%2
ignorehitpause = 0
persistent = 0
channel = 0

[State pos]
type = PosFreeze
trigger1 = animelem = 2,< 0

[State 101,next]
type = ChangeState
triggerall = var(12) != 1
trigger1 = command = "236C"
value = 2800
ctrl = 0
ignorehitpause = 1

[State explod]
type = Explod
trigger1 = !Time
anim = ifelse( Random%2 = 0, 6015, 6016 )
supermove = 1
pausemovetime = 1
pos = 32,-58
sprpriority = 2
removeongethit = 1
ownpal = 1

[State power]
type = PowerAdd
triggerall = var(12) != 1
trigger1 = animelem = 1
value = 50
ignorehitpause = 0
persistent = 0

[State ctrl]
type = ctrlset 
trigger1 = animelem = 3
value = 1

[State end]
type = ChangeState
trigger1 = animtime = 0
value = 11

;=================================================================================================
;		空中シールド(開始)
;=================================================================================================

[Statedef 920]
type = A
movetype = I
physics = A
anim = 920
ctrl = 0

[State 210, 1]
type = PlaySnd
trigger1 = time = 2
value = S32,5
ignorehitpause = 1
persistent = 1

[State 210, 1]
type = PlaySnd
trigger1 = animelem = 1
value = S0,7
ignorehitpause = 1
persistent = 1

[State explod]
type = Explod
trigger1 = animelem = 1
anim = 6010 + random%2
id = 6010
supermove = 1
pausemovetime = 1
pos = 35,-67
postype = p1
sprpriority = 3
bindtime = -1
removeongethit = 1
ownpal = 1

[State explod]
type = RemoveExplod
trigger1 = movehit = 1
ID = 6010

[State var]
type = varset
trigger1 = time = 0
var(3) = 2

[State explod]
type = RemoveExplod
trigger1 = time = 0
ID = 200

[State 210, 1]
type = PlaySnd
trigger1 = movehit = 1
channel = 0
value = S2032, random%2
ignorehitpause = 1
channel = 0

[State 920]
type = ReversalDef
trigger1 = AnimElem = 2
getpower = 70
reversal.attr = SCA,AA,AT,AP
PauseTime = 10*(PalNo<=10),40
p1stateno = 921
sparkno = -1
hitsound = s4,random%2
numhits = 0

[State 101,next]
type = ChangeState
triggerall = var(12) != 1
triggerall = command = "214C"
triggerall = Power >= 1000
trigger1 = time <= 12
value = 1655
ctrl = 0
ignorehitpause = 1

[State anim]
type = ChangeAnim
trigger1 = animtime = 0
value = 55

[State 920]
type = ChangeState
trigger1 = vel y > 0 && pos y >= 0
value = 53
ctrl = 0

;=================================================================================================
;		空中シールド(成功)
;===============================================


[Statedef 921]
type = A
movetype = I
physics = A
anim = 921
ctrl = 0

[State 210, 1]
type = PlaySnd
trigger1 = animelem = 1
value = S32, random%2
ignorehitpause = 0
persistent = 0
channel = 0

[State 101,next]
type = ChangeState
triggerall = var(12) != 1
triggerall = command = "214C"
triggerall = Power >= 1000
trigger1 = time <= 12
value = 1655
ctrl = 0
ignorehitpause = 1

[State ctrl]
type = ctrlset
trigger1 = animelem = 1,>= 6
value = 1

[State power]
type = PowerAdd
trigger1 = var(12) = 0
trigger1 = animelem = 1
value = 60
ignorehitpause = 0
persistent = 0

[State 921]
type = Changeanim
trigger1 = animtime = 0
value = 55

[State 921]
type = ChangeState
trigger1 = vel y > 0 && pos y>= 0
value = 52

;=================================================================================================
;		シールドカウンター
;=================================================================================================
[StateDef 950]
Type = S
MoveType = A
Physics = S
Anim = 950
Ctrl = 0
SprPriority = 2
FaceP2 = 1

[State -1]
Type = VelSet
Trigger1 = !Time*(PrevStateNo=[150,153])
X = 0
Y = 0

[State explod]
Type = Explod
Trigger1 = !Time
Anim = 6010 + Random%2
SuperMove = 1
PauseMoveTime = 1
Pos = -6,-74
SprPriority = 3
BindTime = -1
ReMoveOnGetHit = 1
OwnPal = 1

[State 210, 1]
Type = PlaySnd
Trigger1 = Time = 1
Value = S0,7
IgnoreHitPause = 1
Persistent = 0

[State 101,Vel]
Type = PosAdd
Trigger1 = AnimElem = 9
X = 8

[State 101,Vel]
Type = PosAdd
Trigger1 = AnimElem = 12
X = 4

[State -1]
Type = ReversalDef
Trigger1 = AnimElem >= 2
ID = 950
Reversal.Attr = SCA,AA,AT
PauseTime = 6, 35
SparkNo = s6015 + Random%2
SparkXY = 0,0
P1StateNo = 951
HitSound = s4,Random%2
NumHits = 0

[State 1100, wind]
Type = Explod
Trigger1 = AnimElem = 13
Anim = 16000
Scale = 1,1
PosType = P1
Pos = 0,0
BindTime = -1
SprPriority = 4
SuperMove = 0
OwnPal = 1
ReMoveOnGetHit = 1

[State 700, 6]
Type = HitDef
trigger1 = PalNo <= 10
Trigger1 = AnimElem = 13
Attr = S, SA
AnimType = Up
Damage = 20
GetPower = 0
Priority = 4,Hit
GuardFlag = MA
HitFlag = MA
PauseTime = 4,6
Guard.SparkNo = S8030
SparkNo = S6040+Random%5 
SparkXY = -15,-60
HitSound = S1,9
GuardSound = S2,10
Ground.Type = High
Ground.SlideTime = 24
Ground.HitTime = 24
Guard.HitTime = 14
Ground.Velocity = 0,-9.5
Guard.Velocity = -5
Air.Velocity = 0,-7.5
AirGuard.Velocity = -2.0, -1.5
Fall = 1
Fall.Recover = 1
Fall.RecoverTime = 32
EnvShake.Time = 9
EnvShake.Freq = 70
EnvShake.Ampl = 9

[State 1200, 5]
Type = ChangeState
Trigger1 = !AnimTime
Value = 0
Ctrl = 1

;=================================================================================================
;		シールドカウンター成功
;======================================================
[StateDef 951]
Type = S
MoveType = A
Physics = S
Ctrl = 0
Anim = 951
SprPriority = 2

[State -2]
Type = NotHitBy
Trigger1 = 1
Value = SCA
IgnoreHitPause = 1

[State 101,Vel]
Type = PosAdd
Trigger1 = (Anim=951)*(AnimElem=1||AnimElem=10)
X = 8-4*(AnimElem=4)

[State 1100, wind]
Type = Explod
Trigger1 = Anim = 951
Trigger1 = AnimElem = 11
Anim = 16000
Scale = 1,1
PosType = P1
Pos = 0,0
BindTime = -1
SprPriority = 4
SuperMove = 0
OwnPal = 1
ReMoveOnGetHit = 1

[State 700, 6]
Type = HitDef
trigger1 = PalNo <= 10
Trigger1 = Anim = 951
Trigger1 = AnimElem = 11
Attr = S, SA
AnimType = Up
Damage = 20
GetPower = 0
Priority = 4,Hit
GuardFlag = MA
HitFlag = MA
PauseTime = 4,6
Guard.SparkNo = S8030
SparkNo = S6040+Random%5 
SparkXY = -15,-60
HitSound = S1,9
GuardSound = S2,10
Ground.Type = High
Ground.SlideTime = 24
Ground.HitTime = 24
Guard.HitTime = 14
Ground.Velocity = 0,-9.5
Guard.Velocity = -5
Air.Velocity = 0,-7.5
AirGuard.Velocity = -2.0, -1.5
Fall = 1
Fall.Recover = 1
Fall.RecoverTime = 50
EnvShake.Time = 9
EnvShake.Freq = 70
EnvShake.Ampl = 9
ID = 953

[State 1200, 5]
Type = ChangeState
Trigger1 = Anim = 951
Trigger1 = !AnimTime
Value = 0
Ctrl = 1