; Captain America's CNS
;          by
;      MystikBlaze
;(mystik3984@hotmail.com)

[Data]
life = 1000
attack = 100
defence = 100
;power = 3000
fall.defence_up = 50
liedown.time = 50
airjuggle = 15
sparkno = 2
guard.sparkno = S8020
KO.echo = 0
volume = 200
IntPersistIndex = 56
FloatPersistIndex = 40

[Size]
xscale = 1
yscale = 1
ground.back = 24
ground.front = 26
air.back = 20
air.front = 20
height = 60
z.width = 3
attack.dist = 200
proj.attack.dist = 90
proj.doscale = 0
head.pos = -10, -92
mid.pos = 4, -62
shadowoffset = 0
draw.offset = 0,0

[Velocity]
walk.fwd  = 2.6
walk.back = -2.2
run.fwd  = 4.6, 0
run.back = -4.5, 0
jump.neu = 0,-8.4
jump.back = -2.55
jump.fwd = 2.6
runjump.back = -2.55,-8.1
runjump.fwd = 3.6,-8.1
airjump.neu = 0,-8.1
airjump.back = -2.55
airjump.fwd = 2.6

[Movement]
airjump.num = 1
;airjump.height = 35
yaccel = .39
stand.friction = .85
crouch.friction = .82


;---------------------------------------------------------------------------
; Lose by Time Over

[Statedef 170]
type = S
ctrl = 0
anim = 170
velset = 0,0

[State 170, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

;---------------------------------------------------------------------------
; Win state decider

[Statedef 180]
type = S

[State 180, VarRandom]
type = VarRandom
trigger1 = Time = 0
v = 19
range = 0,29

[State 180, Win Pose 1]
type = ChangeState
trigger1 = Command = "holdx"
trigger2 = (Var(19) = [0,9]) && (Command != "holdx") && (Command != "holdy") && (Command != "holdz")
value = 181

[State 180, Win Pose 2]
type = ChangeState
trigger1 = Command = "holdy"
trigger2 = (Var(19) = [10,19]) && (Command != "holdx") && (Command != "holdy") && (Command != "holdz")
value = 182

[State 180, Win Pose 3]
type = ChangeState
trigger1 = Command = "holdz"
trigger2 = (Var(19) = [20,29]) && (Command != "holdx") && (Command != "holdy") && (Command != "holdz")
value = 183

;---------------------------------------------------------------------------
; Win Pose 1 (Raises Shield)

[Statedef 181]
type = S
ctrl = 0
anim = 181
sprpriority = 1
velset = 0,0

[State 181, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 181, PlaySnd];"Victory"
type = PlaySnd
trigger1 = AnimElemTime(3) = 50
value = 30,3
channel = 0

;---------------------------------------------------------------------------
; Win Pose 2 (Thumbs Up)

[Statedef 182]
type = S
ctrl = 0
anim = 182
sprpriority = 1
velset = 0,0

[State 182, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 182, PlaySnd];"Thumbs Up Soldier"
type = PlaySnd
trigger1 = AnimElemTime(3) = 0
value = 30,4
channel = 0

;---------------------------------------------------------------------------
; Win Pose 3 (Flying Birds)

[Statedef 183]
type = S
ctrl = 0
anim = 183
sprpriority = 1
velset = 0,0

[State 183, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 183, Birds Explod]
type = Explod
trigger1 = (Time%8 = 0) && (AnimElemTime(3) >= 0)
anim = 8195
id = 8195
postype = P1
pos = -220,50
random = 120,0
vel = 5,-4
facing = 1
ownpal = 1
sprpriority = 3

[State 183, PlaySnd];"Freedom Prevails"
type = PlaySnd
trigger1 = Time = 50
value = 30,5
channel = 0

;---------------------------------------------------------------------------
; Preintro

[Statedef 190]
type = S
ctrl = 0
velset = 0,0

[State 190, Gems Var Random]
type = VarRandom
trigger1 = (Time = 0) && (PalNo <= 6)
v = 40
range = 1,6

[State 190, VarRandom]
type = VarRandom
trigger1 = Time = 0
v = 1
range = 0,1

[State 190, Intro 1]
type = ChangeState
trigger1 = Var(1) = 0
value = 191

[State 190, Intro 2]
type = ChangeState
trigger1 = Var(1) = 1
value = 8000

;---------------------------------------------------------------------------
; Introduction 1 A (Fixing his wrist)

[Statedef 191]
type = S
ctrl = 0
anim = 190
velset = 0,0

[State 191, AssertSpecial] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 191, Shield Helper]
type = Helper
trigger1 = Time = 0
helpertype = Normal
name = "Flying Shield"
ID = 191
pos = 50,-170
postype = Front
facing = -1
stateno = 193
ownpal = 0
size.ground.back = 20
size.ground.front = 20
ignorehitpause = 1

[State 191, Shield VarSet]
type = VarSet
trigger1 = Time = 0
v = 59
value = 1

[State 191, PlaySnd]
type = PlaySnd
trigger1 = Time = 54
value = 21,4

[State 191, ChangeState]
type = ChangeState
trigger1 = (Helper(191), ParentDist X < 150) && (Helper(191), BackEdgeBodyDist > 0)
value = 192

;---------------------------------------------------------------------------
; Introduction 1 B (Jumping up grabbing shield)

[Statedef 192]
type = A
physics = N
ctrl = 0
anim = 191

[State 192, 2]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 192, VelSet]
type = VelSet
trigger1 = AnimElemTime(3) = 0
y = -8

[State 192, VelAdd]
type = VelAdd
trigger1 = AnimElemTime(3) >= 0
y = 0.38

[State 192, PlaySnd];grunt
type = PlaySnd
trigger1 = AnimElemTime(5) = 0
value = 30,0

[State 192, PlaySnd];grab shield sound
type = PlaySnd
trigger1 = AnimElemTime(6) = 1
value = 20,3

[State 192, ChangeState]
type = ChangeState
trigger1 = (Pos Y >= 0) && (AnimElemTime(4) >= 0)
value = 194

;---------------------------------------------------------------------------
; Introduction 1 C (Flying Shield Helper)

[Statedef 193]
type = A
physics = N
ctrl = 0
anim = 192

[State 193, VelSet]
type = VelSet
trigger1 = Time = 50
x = 6

[State 193, DestroySelf]
type = DestroySelf
trigger1 = (parent, Anim = 191) && (parent, AnimElemTime(6) >= 1)
trigger2 = FrontEdgeBodyDist <= -40

;---------------------------------------------------------------------------
; Introduction 1 D (Jump land)

[Statedef 194]
type = S
physics = S
velset = 0,0
ctrl = 0
anim = 47

[State 194, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 194, PosSet]
type = PosSet
trigger1 = Time = 0
y = 0

[State 194, Landing Sound]
type = PlaySnd
trigger1 = (Anim = 47) && (Time = 1)
value = 10,1

[State 194, Landing Dust]
type = Explod
anim = 8030
trigger1 = (Anim = 47) && (Time = 1) && (PalNo > 6)
postype = P1
pos = 0,2
ownpal = 1

[State 194, ChangeAnim]
type = ChangeAnim
trigger1 = (Anim = 47) && (AnimTime = 0)
value = 48

[State 194, ChangeState]
type = ChangeState
trigger1 = (Anim = 48) && (AnimTime = 0)
value = 0

;---------------------------------------------------------------------------
; Introduction 2 (Cap Sliding Down a Rope)

[Statedef 8000]
type = A
movetype = I
physics = N
ctrl = 0
anim = 193
velset = 0,0
sprpriority = 2

[State 8000, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 8000, Shield VarSet]
type = VarSet
trigger1 = Time = 0
v = 59
value = 1

[State 8000, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0

[State 8000, PosSet]
type = PosSet
trigger1 = Time = 0
y = -94

[State 8000, PosAdd 1]
type = PosAdd
trigger1 = Time = 0
x = -100

[State 8000, PosAdd 2]
type = PosAdd
trigger1 = (Time >= 1) && (AnimElemTime(2) < 0)
x = 8
y = 1

[State 8000, PosAdd B 1]
type = PosAdd
trigger1 = (AnimElemTime(2) >= 0) && (AnimElemTime(6) < 0)
x = -2

[State 8000, PosAdd B 2]
type = PosAdd
trigger1 = (AnimElemTime(6) >= 0) && (AnimElemTime(11) < 0)
x = -1

[State 8000, VelAdd]
type = VelAdd
trigger1 = (AnimElemTime(2) >= 0) && (AnimElemTime(12) < 0)
y = 0.28

[State 8000, VelSet 1]
type = VelSet
trigger1 = AnimElemTime(2) = 0
y = -3

[State 8000, VelSet 2]
type = VelSet
trigger1 = AnimElemTime(12) = 0
y = 0

[State 8000, PosSet]
type = PosSet
trigger1 = AnimElemTime(12) = 0
y = 0

[State 8000, Burning Rope Helper]
type = Helper
trigger1 = Time = 0
helpertype = Normal
name = "Burning Rope"
ID = 8040
postype = back
pos = 160,-135
facing = -1
stateno = 8040
ownpal = 1

[State 8000, Sparks Explod]
type = Explod
anim = 8045
trigger1 = (Time%4 = 0) && (Time <= 19)
postype = P1
pos = 10,-88
ownpal = 1
sprpriority = 3

[State 8000, Landing Sound]
type = PlaySnd
trigger1 = AnimElemTime(12) = 1
value = 10,1

[State 8000, Landing Dust]
type = Explod
anim = 8030
triggerall = PalNo > 6
trigger1 = AnimElemTime(12) = 1
postype = P1
pos = 0,2
ownpal = 1

[State 8000, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------
; Burning Rope Helper

[Statedef 8040]
type = A
movetype = I
physics = N
ctrl = 0
anim = 8040
velset = 0,0
sprpriority = 1

[State 8040, DestroySelf]
type = DestroySelf
trigger1 = AnimTime = 0

;---------------------------------------------------------------------------
; Taunt

[Statedef 195]
type    = S
movetype= I
physics = S
ctrl = 0
;anim = 195
velset = 0,0
sprpriority = 2

[State 195, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 195

[State 195, VarRandom]
type = VarRandom
trigger1 = Time = 0
v = 8
range = 0,10

[State 195, Foot Stomp Sound]
type = PlaySnd
trigger1 = AnimElemTime(1) = 4
value = 10,1

[State 195, PlaySnd];Cap talking
type = PlaySnd
trigger1 = AnimElemTime(4) = 0
value = 30,ifelse(Var(8) > 5, 4, 5)
channel = 0

[State 195, Choose Mind Gem]
type = VarSet
trigger1 = (command = "tap_x") && (Var(40) = [1,6])
v = 40
value = 1

[State 195, Choose Power Gem]
type = VarSet
trigger1 = (command = "tap_y") && (Var(40) = [1,6])
v = 40
value = 2

[State 195, Choose Reality Gem]
type = VarSet
trigger1 = (command = "tap_z") && (Var(40) = [1,6])
v = 40
value = 3

[State 195, Choose Soul Gem]
type = VarSet
trigger1 = (command = "tap_a") && (Var(40) = [1,6])
v = 40
value = 4

[State 195, Choose Space Gem]
type = VarSet
trigger1 = (command = "tap_b") && (Var(40) = [1,6])
v = 40
value = 5

[State 195, Choose Time Gem]
type = VarSet
trigger1 = (command = "tap_c") && (Var(40) = [1,6])
v = 40
value = 6

[State 195, Gem Display];P1 Side
type = RemoveExplod
triggerall = TeamSide = 1
triggerall = Var(40) = [1,6]
trigger1 = (command = "tap_x") || (command = "tap_y") || (command = "tap_z")
trigger2 = (command = "tap_a") || (command = "tap_b") || (command = "tap_c")
id = 8070

[State 195, Gem Display];P2 Side
type = RemoveExplod
triggerall = TeamSide = 2
triggerall = Var(40) = [1,6]
trigger1 = (command = "tap_x") || (command = "tap_y") || (command = "tap_z")
trigger2 = (command = "tap_a") || (command = "tap_b") || (command = "tap_c")
anim = (8071)
id = 8070

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

;---------------------------------------------------------------------------
; Stand X

[Statedef 200]
type    = S
movetype= A
physics = S
juggle  = 1
ctrl = 0
;anim = 200
poweradd = 20
sprpriority = 2

[State 200, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = ifelse(Var(40) = 16, 250, 200)

[State 200, HitDef]
type = HitDef
triggerall = Var(40) != 12
trigger1 = AnimElem = 3
attr = S, NA
damage = 40,0
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 9,10
sparkno = S8010
guard.sparkno = S8020
sparkxy = -10,-85
hitsound = S20,0
guardsound = S20,4
ground.type = High
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -5
guard.velocity = -7
air.type = High
air.velocity = -4,-1

[State 200, Power Gem HitDef]
type = HitDef
triggerall = Var(40) = 12
trigger1 = AnimElem = 3
attr = S, NA
damage = 40,0
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 9,10
sparkno = S8016
guard.sparkno = S8021
sparkxy = -10,-85
hitsound = S20,0
guardsound = S20,4
ground.type = High
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -5
guard.velocity = -7
air.type = High
air.velocity = -4,-1

[State 200, Reality Gem X Helper]
type = Helper
triggerall = Var(40) = 13
trigger1 = (Time = 1) && (NumHelper(270) = 0) && (NumHelper(280) = 0) && (NumHelper(290) = 0)
name = "Reality X"
id = 270
postype = P1
pos = 0,0
stateno = 270
ownpal = 1

[State 200, Whoosh]
type = PlaySnd
trigger1 = AnimElemTime(2) = 0
value = 21,0

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

;---------------------------------------------------------------------------
; Reality X

[Statedef 270]
type    = S
movetype= I
physics = N
ctrl = 0
anim = 8999
sprpriority = -5

[State 270, BindToParent]
type = BindToParent
trigger1 = 1
facing = 1
pos = 0,0
time = -1

[State 270, Reality Gem X Helper 1]
type = Helper
trigger1 = Time = 0
name = "Reality X 1"
id = 271
postype = P1
pos = 38,-14
stateno = 271
ownpal = 1

[State 270, Reality Gem X Helper 2]
type = Helper
trigger1 = Time = 31
name = "Reality X 2"
id = 271
postype = P1
pos = 14,-27
stateno = 272
ownpal = 1

[State 270, Reality Gem X Helper 3]
type = Helper
trigger1 = Time = 63
name = "Reality X 3"
id = 271
postype = P1
pos = 26,-4
stateno = 273
ownpal = 1

[State DestroySelf]
type = DestroySelf
trigger1 = (Time >= 76) && (parent, NumProjID(270) = 0)

;---------------------------------------------------------------------------
; Reality X 1 (fireball)

[Statedef 271]
type    = S
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 8120
sprpriority = 3

[State 271, BindToParent]
type = BindToParent
trigger1 = 1
facing = 1
pos = 38,-14
time = -1

[State 271, Projectile]
type = Projectile
trigger1 = AnimTime = 0
projid = 270
projanim = 8121
projhitanim = 8122
projremovetime = 36
velocity = 1.4
accel = 0.28
projpriority = 1
offset = 0,0
attr = S, NP
damage = 40,5
animtype = Light
guardflag = MA
hitflag = MAFP
priority = 4, Hit
pausetime = 0,8
sparkno = S8016
guard.sparkno = S8021
sparkxy = 10,-48
hitsound = S20,5
guardsound = S20,4
ground.type = High
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -5
guard.velocity = -7
air.type = High
air.velocity = -5,-1
ground.cornerpush.veloff = 0
palfx.time = 12
palfx.add = 120,-10,-250
palfx.sinadd = 50,40,0,12
palfx.color = 0

[State 271, PlaySnd]
type = PlaySnd
trigger1 = Time = 4
value = 21,5

[State 271, DestroySelf]
type = DestroySelf
trigger1 = AnimTime = 0

;---------------------------------------------------------------------------
; Reality X 2 (fireball)

[Statedef 272]
type    = S
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 8120
sprpriority = 3

[State 272, BindToParent]
type = BindToParent
trigger1 = 1
facing = 1
pos = 14,-27
time = -1

[State 272, Projectile]
type = Projectile
trigger1 = AnimTime = 0
projid = 270
projanim = 8121
projhitanim = 8122
projremovetime = 36
velocity = 1.4
accel = 0.28
projpriority = 1
offset = 0,0
attr = S, NP
damage = 40,5
animtype = Light
guardflag = MA
hitflag = MAFP
priority = 4, Hit
pausetime = 0,8
sparkno = S8016
guard.sparkno = S8021
sparkxy = 10,-48
hitsound = S20,5
guardsound = S20,4
ground.type = High
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -5
guard.velocity = -7
air.type = High
air.velocity = -5,-1
ground.cornerpush.veloff = 0
palfx.time = 12
palfx.add = 120,-10,-250
palfx.sinadd = 50,40,0,12
palfx.color = 0

[State 272, PlaySnd]
type = PlaySnd
trigger1 = Time = 4
value = 21,5

[State 272, DestroySelf]
type = DestroySelf
trigger1 = AnimTime = 0

;---------------------------------------------------------------------------
; Reality X 3 (fireball)

[Statedef 273]
type    = S
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 8120
sprpriority = 3

[State 273, BindToParent]
type = BindToParent
trigger1 = 1
facing = 1
pos = 26,-4
time = -1

[State 273, Projectile]
type = Projectile
trigger1 = AnimTime = 0
projid = 270
projanim = 8121
projhitanim = 8122
projremovetime = 36
velocity = 1.4
accel = 0.28
projpriority = 1
offset = 0,0
attr = S, NP
damage = 40,5
animtype = Light
guardflag = MA
hitflag = MAFP
priority = 4, Hit
pausetime = 0,8
sparkno = S8016
guard.sparkno = S8021
sparkxy = 10,-48
hitsound = S20,5
guardsound = S20,4
ground.type = High
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -5
guard.velocity = -7
air.type = High
air.velocity = -5,-1
ground.cornerpush.veloff = 0
palfx.time = 12
palfx.add = 120,-10,-250
palfx.sinadd = 50,40,0,12
palfx.color = 0

[State 273, PlaySnd]
type = PlaySnd
trigger1 = Time = 4
value = 21,5

[State 273, DestroySelf]
type = DestroySelf
trigger1 = AnimTime = 0

;---------------------------------------------------------------------------
; Reality A

[Statedef 275]
type    = S
movetype= I
physics = N
ctrl = 0
anim = 8999
sprpriority = -5

[State 275, BindToParent]
type = BindToParent
trigger1 = 1
facing = 1
pos = 0,0
time = -1

[State 275, Reality Gem X Helper 1]
type = Helper
trigger1 = Time = 0
name = "Reality X 1"
id = 271
postype = P1
pos = 38,31
stateno = 276
ownpal = 1

[State 275, Reality Gem X Helper 2]
type = Helper
trigger1 = Time = 31
name = "Reality X 2"
id = 271
postype = P1
pos = 14,18
stateno = 277
ownpal = 1

[State 275, Reality Gem X Helper 3]
type = Helper
trigger1 = Time = 63
name = "Reality X 3"
id = 271
postype = P1
pos = 26,41
stateno = 278
ownpal = 1

[State DestroySelf]
type = DestroySelf
trigger1 = (Time >= 76) && (parent, NumProjID(270) = 0)

;---------------------------------------------------------------------------
; Reality A 1 (fireball)

[Statedef 276]
type    = S
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 8120
sprpriority = 3

[State 276, BindToParent]
type = BindToParent
trigger1 = 1
facing = 1
pos = 38,31
time = -1

[State 276, Projectile]
type = Projectile
trigger1 = AnimTime = 0
projid = 270
projanim = 8121
projhitanim = 8122
projremovetime = 36
velocity = 1.4
accel = 0.28
projpriority = 1
offset = 0,0
attr = S, NP
damage = 40,5
animtype = Light
guardflag = MA
hitflag = MAFP
priority = 4, Hit
pausetime = 0,8
sparkno = S8016
guard.sparkno = S8021
sparkxy = 10,-48
hitsound = S20,5
guardsound = S20,4
ground.type = High
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -5
guard.velocity = -7
air.type = High
air.velocity = -5,-1
ground.cornerpush.veloff = 0
palfx.time = 12
palfx.add = 120,-10,-250
palfx.sinadd = 50,40,0,12
palfx.color = 0

[State 276, PlaySnd]
type = PlaySnd
trigger1 = Time = 4
value = 21,5

[State 276, DestroySelf]
type = DestroySelf
trigger1 = AnimTime = 0

;---------------------------------------------------------------------------
; Reality A 2 (fireball)

[Statedef 277]
type    = S
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 8120
sprpriority = 3

[State 277, BindToParent]
type = BindToParent
trigger1 = 1
facing = 1
pos = 14,18
time = -1

[State 277, Projectile]
type = Projectile
trigger1 = AnimTime = 0
projid = 270
projanim = 8121
projhitanim = 8122
projremovetime = 36
velocity = 1.4
accel = 0.28
projpriority = 1
offset = 0,0
attr = S, NP
damage = 40,5
animtype = Light
guardflag = MA
hitflag = MAFP
priority = 4, Hit
pausetime = 0,8
sparkno = S8016
guard.sparkno = S8021
sparkxy = 10,-48
hitsound = S20,5
guardsound = S20,4
ground.type = High
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -5
guard.velocity = -7
air.type = High
air.velocity = -5,-1
ground.cornerpush.veloff = 0
palfx.time = 12
palfx.add = 120,-10,-250
palfx.sinadd = 50,40,0,12
palfx.color = 0

[State 277, PlaySnd]
type = PlaySnd
trigger1 = Time = 4
value = 21,5

[State 277, DestroySelf]
type = DestroySelf
trigger1 = AnimTime = 0

;---------------------------------------------------------------------------
; Reality A 3 (fireball)

[Statedef 278]
type    = S
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 8120
sprpriority = 3

[State 278, BindToParent]
type = BindToParent
trigger1 = 1
facing = 1
pos = 26,41
time = -1

[State 278, Projectile]
type = Projectile
trigger1 = AnimTime = 0
projid = 270
projanim = 8121
projhitanim = 8122
projremovetime = 36
velocity = 1.4
accel = 0.28
projpriority = 1
offset = 0,0
attr = S, NP
damage = 40,5
animtype = Light
guardflag = MA
hitflag = MAFP
priority = 4, Hit
pausetime = 0,8
sparkno = S8016
guard.sparkno = S8021
sparkxy = 10,-48
hitsound = S20,5
guardsound = S20,4
ground.type = High
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -5
guard.velocity = -7
air.type = High
air.velocity = -5,-1
ground.cornerpush.veloff = 0
palfx.time = 12
palfx.add = 120,-10,-250
palfx.sinadd = 50,40,0,12
palfx.color = 0

[State 278, PlaySnd]
type = PlaySnd
trigger1 = Time = 4
value = 21,5

[State 278, DestroySelf]
type = DestroySelf
trigger1 = AnimTime = 0

;---------------------------------------------------------------------------
; Stand Y

[Statedef 201]
type    = S
movetype= A
physics = S
juggle  = 3
poweradd= 40
ctrl = 0
;anim = 201
sprpriority = 2

[State 201, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = ifelse(Var(40) = 16, 251, 201)

[State 201, HitDef MSH]
type = HitDef
triggerall = Var(40) != 12
trigger1 = PalNo <= 6
trigger1 = AnimElem = 3
attr = S, NA
damage = ifelse(Var(59) = 1,80,60),0
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 9,10
sparkno = S8011
guard.sparkno = S8020
sparkxy = -10,-100
hitsound = S20,1
guardsound = S20,4
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = 0,-13
guard.velocity = -10
airguard.velocity = -5,-1
air.type = Low
air.velocity = 0,-12

[State 201, Power Gem HitDef MSH]
type = HitDef
triggerall = Var(40) = 12
trigger1 = PalNo <= 6
trigger1 = AnimElem = 3
attr = S, NA
damage = ifelse(Var(59) = 1,80,60),0
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 9,10
sparkno = S8016
guard.sparkno = S8021
sparkxy = -10,-100
hitsound = S20,1
guardsound = S20,4
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = 0,-13
guard.velocity = -10
airguard.velocity = -5,-1
air.type = Low
air.velocity = 0,-12

[State 201, HitDef MvC]
type = HitDef
trigger1 = PalNo > 6
trigger1 = AnimElem = 3
attr = S, NA
damage = ifelse(Var(59) = 1,80,60),0
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 9,10
sparkno = S8011
guard.sparkno = S8020
sparkxy = -10,-100
hitsound = S20,1
guardsound = S20,4
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -8
guard.velocity = -10
airguard.velocity = -5,-1
air.type = Low
air.velocity = 0,-10

[State 201, Reality Gem Y Helper]
type = Helper
triggerall = Var(40) = 13
trigger1 = (Time = 1) && (NumHelper(270) = 0) && (NumHelper(280) = 0) && (NumHelper(290) = 0)
name = "Reality Y"
id = 280
postype = P1
pos = -15,0
stateno = 280
ownpal = 1

[State 201, Yell]
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = 30,1
channel = 0

[State 201, Whoosh]
type = PlaySnd
trigger1 = AnimElemTime(2) = 0
value = 21,1

[State 201, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Reality Gem Y (ice top)

[Statedef 280]
type    = S
movetype= I
physics = N
ctrl = 0
velset = 0,0
anim = 8125
sprpriority = 5

[State 280, Falling Ice Helper]
type = Helper
trigger1 = Time = 0
name = "Reality Y"
id = 280
postype = P1
pos = 0,0
stateno = 281
ownpal = 1

[State 280, Repeat Helper]
type = Helper
trigger1 = (Time = 8) && (parent, NumHelper(280) <= 8)
name = "Reality Y"
id = 280
postype = P1
pos = 46,0
stateno = 280
ownpal = 1

[State 280, PlaySnd]
type = PlaySnd
trigger1 = Time = 1
value = 21,6

[State 280, DestroySelf]
type = DestroySelf
trigger1 = AnimTime = 0

;---------------------------------------------------------------------------
; Reality Gem Y (falling ice)

[Statedef 281]
type    = S
movetype= A
physics = N
ctrl = 0
velset = 0,0
anim = 8126
sprpriority = 5

[State 281, PosAdd]
type = PosAdd
trigger1 = AnimElemTime(2) >= 1
y = 4

[State 271, HitDef]
type = HitDef
trigger1 = Time = 0
attr = S, NP
damage = 40,5
animtype = Light
guardflag = MA
hitflag = MAFP
priority = 4, Hit
pausetime = 0,1
sparkno = S8016
guard.sparkno = S8021
sparkxy = -5,-70
hitsound = S20,5
guardsound = S20,4
ground.type = High
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -2,-6
guard.velocity = -4
air.type = High
air.velocity = -2,-5
airguard.velocity = -4,-1
ground.cornerpush.veloff = 0
yaccel = .49
palfx.time = 20
palfx.add = -255,-20,140
palfx.color = 0

[State 281, Ice Explod 1]
type = Explod
trigger1 = (MoveHit = 1) && (NumExplod(8175) < 3)
anim = 8175
id = 8175
postype = P2
pos = 4,10
random = 30,10
facing = -1
ownpal = 1
bindtime = -1
sprpriority = 4

[State 281, Ice Explod 2]
type = Explod
trigger1 = (MoveHit = 1) && (NumExplod(8175) < 3)
anim = 8176
id = 8175
postype = P2
pos = 4,-20
random = 30,10
facing = -1
ownpal = 1
bindtime = -1
sprpriority = 4

[State 281, Ice Explod 3]
type = Explod
trigger1 = (MoveHit = 1) && (NumExplod(8175) < 3)
anim = 8177
id = 8175
postype = P2
pos = 4,40
random = 30,10
facing = -1
ownpal = 1
bindtime = -1
sprpriority = 4

[State 281, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 281, ChangeState]
type = ChangeState
trigger1 = (Pos Y > 56) || (Time >= 49) || (MoveContact = 1)
value = 282

;---------------------------------------------------------------------------
; Reality Gem Y (ice crumble)

[Statedef 282]
type    = S
movetype= I
physics = N
ctrl = 0
velset = 0,0
anim = 8127
sprpriority = 5

[State 282, PosAdd 1]
type = PosAdd
trigger1 = (Time = 0) && (PrevStateNo = 286)
y = 147

[State 282, PosAdd 2]
type = PosAdd
trigger1 = (Time >= 1) && (PrevStateNo = 286)
y = -1

[State 282, DestroySelf]
type = DestroySelf
trigger1 = AnimTime = 0

;---------------------------------------------------------------------------
; Reality Gem B (ice top)

[Statedef 285]
type    = S
movetype= I
physics = N
ctrl = 0
velset = 0,0
anim = 8128
sprpriority = 5

[State 285, Rising Ice Helper]
type = Helper
trigger1 = Time = 0
name = "Reality Y"
id = 280
postype = P1
pos = 0,0
stateno = 286
ownpal = 1

[State 285, Repeat Helper]
type = Helper
trigger1 = (Time = 8) && (parent, NumHelper(280) <= 8)
name = "Reality Y"
id = 280
postype = P1
pos = 46,0
stateno = 285
ownpal = 1

[State 285, PlaySnd]
type = PlaySnd
trigger1 = Time = 1
value = 21,6

[State 285, DestroySelf]
type = DestroySelf
trigger1 = AnimTime = 0

;---------------------------------------------------------------------------
; Reality Gem B (rising ice)

[Statedef 286]
type    = S
movetype= A
physics = N
ctrl = 0
velset = 0,0
anim = 8129
sprpriority = 5

[State 286, PosAdd]
type = PosAdd
trigger1 = AnimElemTime(2) >= 1
y = -4

[State 286, HitDef]
type = HitDef
trigger1 = Time = 0
attr = S, NP
damage = 40,5
animtype = Light
guardflag = MA
hitflag = MAFP
priority = 4, Hit
pausetime = 0,1
sparkno = S8016
guard.sparkno = S8021
sparkxy = -5,30
hitsound = S20,5
guardsound = S20,4
ground.type = High
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -2,-6
guard.velocity = -3
air.type = High
air.velocity = -2,-5
airguard.velocity = -4,-1
ground.cornerpush.veloff = 0
yaccel = .49
palfx.time = 20
palfx.add = -255,-20,140
palfx.color = 0

[State 286, Ice Explod 1]
type = Explod
trigger1 = (MoveHit = 1) && (NumExplod(8175) < 3)
anim = 8175
id = 8175
postype = P2
pos = 4,10
random = 30,10
facing = -1
ownpal = 1
bindtime = -1
sprpriority = 4

[State 286, Ice Explod 2]
type = Explod
trigger1 = (MoveHit = 1) && (NumExplod(8175) < 3)
anim = 8176
id = 8175
postype = P2
pos = 4,-20
random = 30,10
facing = -1
ownpal = 1
bindtime = -1
sprpriority = 4

[State 286, Ice Explod 3]
type = Explod
trigger1 = (MoveHit = 1) && (NumExplod(8175) < 3)
anim = 8177
id = 8175
postype = P2
pos = 4,40
random = 30,10
facing = -1
ownpal = 1
bindtime = -1
sprpriority = 4

[State 286, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 286, ChangeState]
type = ChangeState
trigger1 = (MoveContact = 1) || (Time >= 49)
value = 282

;---------------------------------------------------------------------------
; Stand Z (without shield)

[Statedef 202]
type    = S
movetype= A
physics = S
juggle  = 3
poweradd= 60
ctrl = 0
;anim = 202
sprpriority = 2

[State 202, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = ifelse(Var(40) = 16, 252, 202)

[State 202, Width 1]
type = Width
trigger1 = (AnimElemTime(2) >= 0) && (AnimElemTime(13) < 0)
value = 10,-10

[State 202, Width 2]
type = Width
trigger1 = AnimElemTime(13) >= 0
value = 0,0

[State 202, HitDef]
type = HitDef
triggerall = Var(40) != 12
trigger1 = AnimElem = 3
attr = S, NA
damage = 110,0
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 9,10
sparkno = S8011
guard.sparkno = S8020
sparkxy = -20,-80
hitsound = S20,2
guardsound = S20,4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -9
guard.velocity = -11
airguard.velocity = -5,-1
air.type = Low
air.velocity = -4,-8

[State 202, Power Gem HitDef]
type = HitDef
triggerall = Var(40) = 12
trigger1 = AnimElem = 3
attr = S, NA
damage = 110,0
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 9,10
sparkno = S8016
guard.sparkno = S8021
sparkxy = -20,-80
hitsound = S20,2
guardsound = S20,4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -9
guard.velocity = -11
airguard.velocity = -5,-1
air.type = Low
air.velocity = -4,-8

[State 202, Reality Gem Z Helper]
type = Helper
triggerall = Var(40) = 13
trigger1 = (Time = 1) && (NumHelper(270) = 0) && (NumHelper(280) = 0) && (NumHelper(290) = 0)
name = "Reality Z"
id = 290
postype = P1
pos = 48,-16
stateno = 290
ownpal = 1

[State 202, Yell]
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = 30,2
channel = 0

[State 202, Whoosh]
type = PlaySnd
trigger1 = AnimElemTime(2) = 0
value = 21,2

[State 202, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Reality Z

[Statedef 290]
type    = S
movetype= I
physics = N
ctrl = 0
velset = 0,0
anim = 8130
sprpriority = 5

[State 290, BindToParent]
type = BindToParent
trigger1 = 1
facing = 1
pos = 48,-16
time = -1

[State 290, Reality Gem Z Helper 1]
type = Helper
trigger1 = AnimTime = 0
name = "Reality Z"
id = 290
postype = P1
pos = 0,0
stateno = 291
ownpal = 1

[State 290, Reality Gem Z Helper 2]
type = Helper
trigger1 = AnimTime = 0
name = "Reality Z"
id = 290
postype = P1
pos = 0,0
stateno = 292
ownpal = 1

[State 290, Reality Gem Z Helper 3]
type = Helper
trigger1 = AnimTime = 0
name = "Reality Z"
id = 290
postype = P1
pos = 0,0
stateno = 293
ownpal = 1

[State 290, DestroySelf]
type = DestroySelf
trigger1 = AnimTime = 0

;---------------------------------------------------------------------------
; Reality Z (fireball 1)

[Statedef 291]
type    = S
movetype= A
physics = N
ctrl = 0
anim = 8131
sprpriority = 5

[State 291, VelAdd Initial]
type = VelAdd
trigger1 = (Time <= 34) && (Vel X <= 4)
x = 0.2

[State 291, VelAdd Y 1]
type = VelAdd
triggerall = Time >= 35
trigger1 = (P2BodyDist Y <= 0) && (Vel Y >= -4)
y = -0.4

[State 291, VelAdd Y 2]
type = VelAdd
triggerall = Time >= 35
trigger1 = (P2BodyDist Y >= 1) && (Vel Y <= 4)
y = 0.4

[State 291, VelAdd X 1]
type = VelAdd
triggerall = Time >= 35
trigger1 = (P2BodyDist X <= -32) && (Vel X >= -4)
x = -0.4

[State 291, VelAdd X 2]
type = VelAdd
triggerall = Time >= 35
trigger1 = (P2BodyDist X >= -31) && (Vel X <= 4)
x = 0.4

[State 291, HitDef]
type = HitDef
trigger1 = Time = 0
attr = S, NP
damage = 50,10
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 0,5
sparkno = S8016
guard.sparkno = S8021
sparkxy = 10,-48
hitsound = S20,5
guardsound = S20,4
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -5,0
guard.velocity = -7
air.type = High
air.velocity = -8,-1
airguard.velocity = -4,-1
ground.cornerpush.veloff = 0
palfx.time = 12
palfx.add = -255,-20,140
palfx.sinadd = 0,80,100,12
palfx.color = 0

[State 291, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 291, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = 21,7

[State 291, Electricity Explod 1]
type = Explod
trigger1 = (MoveHit = 1) && (parent, NumExplod(8180) < 2)
anim = 8180
id = 8180
postype = P2
pos = 0,-10
facing = -1
ownpal = 1
bindtime = -1
sprpriority = 4

[State 291, Electricity Explod 2]
type = Explod
trigger1 = (MoveHit = 1) && (parent, NumExplod(8180) < 2)
anim = 8181
id = 8180
postype = P2
pos = 0,-30
facing = -1
ownpal = 1
bindtime = -1
sprpriority = -1

[State 291, DestroySelf]
type = DestroySelf
trigger1 = (MoveContact = 1) || (FrontEdgeBodyDist <= -80) || (BackEdgeBodyDist <= -80)

;---------------------------------------------------------------------------
; Reality Z (fireball 2)

[Statedef 292]
type    = S
movetype= A
physics = N
ctrl = 0
anim = 8131
sprpriority = 5

[State 292, VelAdd Initial]
type = VelAdd
trigger1 = (Time <= 34) && (Vel X <= 4) && (Vel Y >= -4)
x = 0.3
y = -0.5

[State 292, VelAdd Y 1]
type = VelAdd
triggerall = Time >= 35
trigger1 = (P2BodyDist Y <= 0) && (Vel Y >= -4)
y = -0.4

[State 292, VelAdd Y 2]
type = VelAdd
triggerall = Time >= 35
trigger1 = (P2BodyDist Y >= 1) && (Vel Y <= 4)
y = 0.4

[State 292, VelAdd X 1]
type = VelAdd
triggerall = Time >= 35
trigger1 = (P2BodyDist X <= -32) && (Vel X >= -4)
x = -0.4

[State 292, VelAdd X 2]
type = VelAdd
triggerall = Time >= 35
trigger1 = (P2BodyDist X >= -31) && (Vel X <= 4)
x = 0.4

[State 292, HitDef]
type = HitDef
trigger1 = Time = 0
attr = S, NP
damage = 50,10
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 0,5
sparkno = S8016
guard.sparkno = S8021
sparkxy = 10,-48
hitsound = S20,5
guardsound = S20,4
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -5,0
guard.velocity = -7
air.type = High
air.velocity = -8,-1
airguard.velocity = -4,-1
ground.cornerpush.veloff = 0
palfx.time = 12
palfx.add = -255,-20,140
palfx.sinadd = 0,80,100,12
palfx.color = 0

[State 292, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 292, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = 21,7

[State 292, Electricity Explod 1]
type = Explod
trigger1 = (MoveHit = 1) && (parent, NumExplod(8181) < 2)
anim = 8183
id = 8181
postype = P2
pos = -10,-10
facing = -1
ownpal = 1
bindtime = -1
sprpriority = -1

[State 292, DestroySelf]
type = DestroySelf
trigger1 = (MoveContact = 1) || (FrontEdgeBodyDist <= -80) || (BackEdgeBodyDist <= -80)

;---------------------------------------------------------------------------
; Reality Z (fireball 3)

[Statedef 293]
type    = S
movetype= A
physics = N
ctrl = 0
anim = 8131
sprpriority = 5

[State 293, VelAdd Initial]
type = VelAdd
trigger1 = (Time <= 34) && (Vel X <= 4) && (Vel Y <= 4)
x = 0.3
y = 0.5

[State 293, VelAdd Y 1]
type = VelAdd
triggerall = Time >= 35
trigger1 = (P2BodyDist Y <= 0) && (Vel Y >= -4)
y = -0.4

[State 293, VelAdd Y 2]
type = VelAdd
triggerall = Time >= 35
trigger1 = (P2BodyDist Y >= 1) && (Vel Y <= 4)
y = 0.4

[State 293, VelAdd X 1]
type = VelAdd
triggerall = Time >= 35
trigger1 = (P2BodyDist X <= -32) && (Vel X >= -4)
x = -0.4

[State 293, VelAdd X 2]
type = VelAdd
triggerall = Time >= 35
trigger1 = (P2BodyDist X >= -31) && (Vel X <= 4)
x = 0.4

[State 292, HitDef]
type = HitDef
trigger1 = Time = 0
attr = S, NP
damage = 50,10
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 0,5
sparkno = S8016
guard.sparkno = S8021
sparkxy = 10,-48
hitsound = S20,5
guardsound = S20,4
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -5,0
guard.velocity = -7
air.type = High
air.velocity = -8,-1
airguard.velocity = -4,-1
ground.cornerpush.veloff = 0
palfx.time = 12
palfx.add = -255,-20,140
palfx.sinadd = 0,80,100,12
palfx.color = 0

[State 293, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 293, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = 21,7

[State 293, Electricity Explod 3]
type = Explod
trigger1 = (MoveHit = 1) && (parent, NumExplod(8181) < 2)
anim = 8182
id = 8181
postype = P2
pos = -16,26
facing = -1
ownpal = 1
bindtime = -1
sprpriority = 4

[State 293, DestroySelf]
type = DestroySelf
trigger1 = (MoveContact = 1) || (FrontEdgeBodyDist <= -80) || (BackEdgeBodyDist <= -80)

;---------------------------------------------------------------------------
; Stand Z (with shield)

[Statedef 203]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 60
ctrl = 0
;anim = 203
sprpriority = 2

[State 203, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = ifelse(Var(40) = 16, 253, 203)

[State 203, HitDef]
type = HitDef
triggerall = Var(40) != 12
trigger1 = AnimElem = 3
attr = S, NA
damage = 140,0
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 5, Hit
pausetime = 9,10
sparkno = S8011
guard.sparkno = S8020
sparkxy = -15, -60
hitsound = S20,2
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -10,-3
guard.velocity = -11
airguard.velocity = -5,-1
air.type = Low
air.velocity = -10,-2
p2stateno = 250

[State 203, Power Gem HitDef]
type = HitDef
triggerall = Var(40) = 12
trigger1 = AnimElem = 3
attr = S, NA
damage = 140,0
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 5, Hit
pausetime = 9,10
sparkno = S8016
guard.sparkno = S8021
sparkxy = -15, -60
hitsound = S20,2
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -10,-3
guard.velocity = -11
airguard.velocity = -5,-1
air.type = Low
air.velocity = -10,-2
p2stateno = 250

[State 203, Reality Gem Z Helper]
type = Helper
triggerall = Var(40) = 13
trigger1 = (Time = 1) && (NumHelper(270) = 0) && (NumHelper(280) = 0) && (NumHelper(290) = 0)
name = "Reality Z"
id = 290
postype = P1
pos = 48,-16
stateno = 290
ownpal = 1

[State 203, Yell]
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = 30,2
channel = 0

[State 203, Whoosh]
type = PlaySnd
trigger1 = AnimElemTime(2) = 0
value = 21,3

[State 203, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; HITG_SHAKE (Vs-Style Hitbounce)
[Statedef 250]
type    = S
movetype= H
physics = N
velset = 0,0

[State 250, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
trigger1 = Time = 0
value = 5012

[State 250, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
value = SCA
time = 1

[State 250, 4] ;Freeze anim
type = ChangeAnim
trigger1 = Time > 0
value = anim

[State 250, 5] ;State type gets set to aerial if getting hit up
type = StateTypeSet
trigger1 = Time = 0
trigger1 = GetHitVar(yvel) != 0 && GetHitVar(fall)
trigger2 = Pos Y != 0
type = a

[State 250, 7]
type = ChangeState
trigger1 = HitShakeOver
value = 251

[State 250, FFB Light]
type = ForceFeedback
trigger1 = anim = 5000
trigger2 = anim = 5010
persistent = 0
time = 6
waveform = square

[State 250, FFB Medium]
type = ForceFeedback
trigger1 = anim = 5001
trigger2 = anim = 5011
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3

[State 250, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5012
trigger2 = anim = 5002
trigger3 = anim = 5030
persistent = 0
time = 15
waveform = sinesquare
ampl = 140

;---------------------------------------------------------------------------
; HITA_UP (initial going up) (Vs-Style Hitbounce)
[Statedef 251]
type    = A
movetype= H
physics = N
anim = 5030
ctrl = 0

[State 251, NotHitBy]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 10

[State 251, 1]
type = VelAdd;Gravity
trigger1 = 1
y = GetHitVar(yaccel)

[State 251, 2]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 251, 5]
type = ChangeState
trigger1 = (AnimTime = 0) || (Time = 10)
value = 252 ;HITA_UP (transition)

;---------------------------------------------------------------------------
; HITA_UP_T (transition) (Vs-Style Hitbounce)
[Statedef 252]
type    = A
movetype= H
physics = N

[State 252, 1]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = SelfAnimExist(5035)
trigger1 = Anim != [5051,5059] ;Not if in hit up anim
trigger1 = Anim != 5090 ;Not if hit off ground anim
value = 5035

[State 252, 2]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 252, 4]
type = ChangeState
trigger1 = HitOver  ;Hit is over
trigger2 = AnimTime = 0 ;Anim is over
trigger3 = Time = 0     ;No transition anim
trigger3 = Anim != 5035 ;.
value = 253 ;HITA_FALL

;---------------------------------------------------------------------------
; HITA_FALL (knocked up, falling) (Vs-Style Hitbounce)
[Statedef 253]
type    = A
movetype= H
physics = N

[State 253, 1] ;Change anim when done with transition
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = Anim = 5035
trigger2 = Time = 0     ;If no transition anim
trigger2 = Anim != 5035
trigger2 = (Anim != [5051, 5059]) && (Anim != [5061, 5069])
trigger2 = Anim != 5090 ;Not if hit off ground anim
value = 5050

[State 253, 2] ;Coming down anim
type = ChangeAnim
trigger1 = anim = [5050,5059]
trigger1 = Vel Y >= ifelse(anim = 5050, 1, -2)
trigger1 = SelfAnimExist(anim+10)
value = anim+10
persistent = 0

[State 253, 3] ;Gravity
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 253, 6]
type = ChangeState
triggerall = Alive = 1
trigger1 = Vel Y > 0
trigger1 = Pos Y >= ifelse((anim = [5051,5059]) || (anim = [5061,5069]), 0, 25)
value = 254 ;HIT_BOUNCE

[State 253, SelfState]
type = SelfState
triggerall = Alive = 0
trigger1 = Vel Y > 0
trigger1 = Pos Y >= ifelse((anim = [5051,5059]) || (anim = [5061,5069]), 0, 25)
value = 5101 ;HIT_BOUNCE

;---------------------------------------------------------------------------
; HIT_BOUNCE (hit ground) (Vs-Style Hitbounce)
[Statedef 254]
type    = L
movetype= H
physics = N

[State 254, 1]
type = VelSet
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) = 0
trigger1 = vel x > 1
x = 1

[State 254, EnvShake]
type = EnvShake
trigger1 = Time = 0
time = 20
freq = 60
ampl = -5

[State 254, Var] ;Save fall velocity
type = VarSet
trigger1 = Time = 0
;trigger1 = GetHitVar(fall.yvel) = 0
sysvar(1) = floor(vel y)

[State 254, 2] ;Hit ground anim (normal)
type = ChangeAnim
triggerall = time = 0
trigger1 = (anim != [5051,5059]) && (anim != [5061,5069])
trigger2 = !SelfAnimExist(5100 + (anim % 10))
value = 5100

[State 254, 3] ;Hit ground anim (for hit up)
type = ChangeAnim
trigger1 = time = 0
trigger1 = (anim = [5051,5059]) || (anim = [5061,5069])
trigger1 = SelfAnimExist(5100 + (anim % 10))
value = 5100 + (anim % 10)

[State 254, 4]
type = PosSet
trigger1 = Time = 0
y = 0

[State 254, 5]
type = VelSet
trigger1 = Time = 0
y = 0

[State 254, 6] ;Reduce speed
type = VelMul
trigger1 = Time = 0
x = 0.75

[State 254, 10]
type = PlaySnd
trigger1 = Time = 1
;value = F7, 0 ;Hit ground
value = F7, (sysvar(1) > 5) + (sysvar(1) > 14)

[State 254, 11]
type = PosFreeze
trigger1 = 1

[State 254, 12]
type = ChangeState
trigger1 = AnimTime = 0
value = 255

[State 254, 13]
type = ForceFeedback
trigger1 = Time = 0
waveform = sinesquare
ampl = 128,-3,-.2,.005
time = 20

;---------------------------------------------------------------------------
; HIT_AIRFALLRECOVER (Vs-Style Hitbounce)
[Statedef 255]
type    = A
movetype= I
physics = N
anim = 5210
ctrl = 0

[State 255, 1]
type = PosFreeze
trigger1 = Time = 0
value = 4

[State 255, 2] ;Turn if not facing opponent
type = Turn
trigger1 = Time = 0
trigger1 = p2dist X < -20

[State 255, 1] 
type = VelMul
trigger1 = Time = 4
x = .8
y = .8

[State 255, 1]
type = VelSet
trigger1 = Time = 4
y = -3
x = -5

[State 255, 3]
type = NotHitBy
trigger1 = Time >= 0
value = SCA
time = 2

[State 255, 5]
type = VelAdd;Gravity
trigger1 = Time >= 4
y = .35

[State 255, 5] ;Land on ground
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 52 ;JUMP_LAND
ctrl = 1

;---------------------------------------------------------------------------
; Stand A

[Statedef 210]
type    = S
movetype= A
physics = S
juggle  = 3
poweradd= 20
ctrl = 0
;anim = 210
sprpriority = 2

[State 210, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = ifelse(Var(40) = 16, 260, 210)

[State 210, HitDef]
type = HitDef
triggerall = Var(40) != 12
trigger1 = AnimElem = 3
attr = S, NA
damage = 40,0
animtype = Light
guardflag = MA
hitflag = MAFD
priority = 3, Hit
pausetime = 9,10
sparkno = S8010
guard.sparkno = S8020
sparkxy = -10,-30
hitsound = S20,0
guardsound = S20,4
ground.type = Low
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -8
guard.velocity = -10
air.type = High
air.velocity = -4,-1
down.bounce = 1
down.velocity = -4,-4

[State 210, Power Gem HitDef]
type = HitDef
triggerall = Var(40) = 12
trigger1 = AnimElem = 3
attr = S, NA
damage = 40,0
animtype = Light
guardflag = MA
hitflag = MAFD
priority = 3, Hit
pausetime = 9,10
sparkno = S8016
guard.sparkno = S8021
sparkxy = -10,-30
hitsound = S20,0
guardsound = S20,4
ground.type = Low
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -8
guard.velocity = -10
air.type = High
air.velocity = -4,-1
down.bounce = 1
down.velocity = -4,-4

[State 210, Reality Gem X Helper]
type = Helper
triggerall = Var(40) = 13
trigger1 = (Time = 1) && (NumHelper(270) = 0) && (NumHelper(280) = 0) && (NumHelper(290) = 0)
name = "Reality X"
id = 270
postype = P1
pos = 0,0
stateno = 275
ownpal = 1

[State 210, Whoosh]
type = PlaySnd
trigger1 = AnimElemTime(2) = 0
value = 21,0

[State 210, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Stand B 1

[Statedef 211]
type    = S
movetype= A
physics = S
juggle  = 3
poweradd= 40
ctrl = 0
;anim = 211
sprpriority = 2

[State 211, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = ifelse(Var(40) = 16, 261, 211)

[State 211, HitDef]
type = HitDef
triggerall = Var(40) != 12
trigger1 = AnimElem = 3
attr = S, NA
damage = 80,0
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 9,10
sparkno = S8011
guard.sparkno = S8020
sparkxy = -15,-75
hitsound = S20,1
guardsound = S20,4
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -8
guard.velocity = -10
airguard.velocity = -5,-1
air.type = Low
air.velocity = -6,-1

[State 211, Power Gem HitDef]
type = HitDef
triggerall = Var(40) = 12
trigger1 = AnimElem = 3
attr = S, NA
damage = 80,0
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 9,10
sparkno = S8016
guard.sparkno = S8021
sparkxy = -15,-75
hitsound = S20,1
guardsound = S20,4
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -8
guard.velocity = -10
airguard.velocity = -5,-1
air.type = Low
air.velocity = -6,-1

[State 211, Reality Gem B Helper]
type = Helper
triggerall = Var(40) = 13
trigger1 = (Time = 1) && (NumHelper(270) = 0) && (NumHelper(280) = 0) && (NumHelper(290) = 0)
name = "Reality Y"
id = 280
postype = P1
pos = -15,-96
stateno = 285
ownpal = 1

[State 211, Yell]
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = 30,0
channel = 0

[State 211, Whoosh]
type = PlaySnd
trigger1 = AnimElemTime(2) = 0
value = 21,1

[State 211, VarSet]
type = VarSet
trigger1 = Time = 0
trigger2 = AnimTime = 0
v = 2
value = 0

[State 211, VarSet]
type = VarSet
trigger1 = (Command = "b") && (Time >= 1)
v = 2
value = 1

[State 211, ChangeState Stand B 2]
type = ChangeState
trigger1 = (Var(2) = 1) && (AnimElemTime(6) >= 0) && (AnimElemTime(8) <= 5)
value = 213
ctrl = 0

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

;---------------------------------------------------------------------------
; Stand C

[Statedef 212]
type    = S
movetype= A
physics = S
juggle  = 3
poweradd= 60
ctrl = 0
;anim = 212
sprpriority = 2

[State 212, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = ifelse(Var(40) = 16, 262, 212)

[State 212, Width 1]
type = Width
trigger1 = (AnimElemTime(4) >= 0) && (AnimElemTime(13) < 0)
value = 20,-20

[State 212, Width 2]
type = Width
trigger1 = AnimElemTime(14) >= 0
value = 0,0

[State 212, HitDef]
type = HitDef
triggerall = Var(40) != 12
trigger1 = AnimElem = 4
attr = S, NA
damage = 110,0
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 9,10
sparkno = S8011
guard.sparkno = S8020
sparkxy = -15,-68
hitsound = S20,2
guardsound = S20,4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -9
guard.velocity = -11
airguard.velocity = -5,-1
air.type = Low
air.velocity = -7,-1.5

[State 212, Power Gem HitDef]
type = HitDef
triggerall = Var(40) = 12
trigger1 = AnimElem = 4
attr = S, NA
damage = 110,0
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 9,10
sparkno = S8016
guard.sparkno = S8021
sparkxy = -15,-68
hitsound = S20,2
guardsound = S20,4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -9
guard.velocity = -11
airguard.velocity = -5,-1
air.type = Low
air.velocity = -7,-1.5

[State 212, Reality Gem C Helper]
type = Helper
triggerall = Var(40) = 13
trigger1 = (Time = 1) && (NumHelper(270) = 0) && (NumHelper(280) = 0) && (NumHelper(290) = 0)
name = "Reality C"
id = 290
postype = P1
pos = 48,-16
stateno = 295
ownpal = 1

[State 212, Yell]
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = 30,1
channel = 0

[State 212, Whoosh]
type = PlaySnd
trigger1 = AnimElemTime(3) = 0
value = 21,2

[State 212, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Reality C

[Statedef 295]
type    = S
movetype= I
physics = N
ctrl = 0
velset = 0,0
anim = 8132
sprpriority = 5

[State 295, BindToParent]
type = BindToParent
trigger1 = 1
facing = 1
pos = 48,-16
time = -1

[State 295, Projectile 1]
type = Projectile
trigger1 = Time = 16
projid = 295
projanim = 8131
projhitanim = 8131
velocity = 0.5
accel = 0.5
projpriority = 1
projheightbound = -250, 100
offset = 0,0
attr = S, NP
damage = 40,10
animtype = Light
guardflag = MA
hitflag = MAFP
priority = 4, Hit
pausetime = 0,5
sparkno = S8016
guard.sparkno = S8021
sparkxy = 10,-48
hitsound = S20,5
guardsound = S20,4
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -5,0
guard.velocity = -7
air.type = High
air.velocity = -8,-1
airguard.velocity = -4,-1
ground.cornerpush.veloff = 0
palfx.time = 12
palfx.add = -255,-20,140
palfx.sinadd = 0,80,100,12
palfx.color = 0

[State 295, Projectile 2]
type = Projectile
trigger1 = Time = 16
projid = 295
projanim = 8131
projhitanim = 8131
velocity = 0.5,-0.5
accel = 0.3,-0.3
projpriority = 1
projheightbound = -250, 100
offset = 0,0
attr = S, NP
damage = 40,10
animtype = Light
guardflag = MA
hitflag = MAFP
priority = 4, Hit
pausetime = 0,5
sparkno = S8016
guard.sparkno = S8021
sparkxy = 10,-48
hitsound = S20,5
guardsound = S20,4
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -5,0
guard.velocity = -7
air.type = High
air.velocity = -8,-1
airguard.velocity = -4,-1
ground.cornerpush.veloff = 0
palfx.time = 12
palfx.add = -255,-20,140
palfx.sinadd = 0,80,100,12
palfx.color = 0

[State 295, Projectile 3]
type = Projectile
trigger1 = Time = 16
projid = 295
projanim = 8131
projhitanim = 8131
velocity = 0,-0.5
accel = 0,-0.5
projpriority = 1
projheightbound = -250, 100
offset = 0,0
attr = S, NP
damage = 40,10
animtype = Light
guardflag = MA
hitflag = MAFP
priority = 4, Hit
pausetime = 0,5
sparkno = S8016
guard.sparkno = S8021
sparkxy = 10,-48
hitsound = S20,5
guardsound = S20,4
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -5,0
guard.velocity = -7
air.type = High
air.velocity = -8,-1
airguard.velocity = -4,-1
ground.cornerpush.veloff = 0
palfx.time = 12
palfx.add = -255,-20,140
palfx.sinadd = 0,80,100,12
palfx.color = 0

[State 295, Projectile 4]
type = Projectile
trigger1 = Time = 16
projid = 295
projanim = 8131
projhitanim = 8131
velocity = 0.5,0.5
accel = 0.3,0.3
projpriority = 1
projheightbound = -250, 100
offset = 0,0
attr = S, NP
damage = 40,10
animtype = Light
guardflag = MA
hitflag = MAFP
priority = 4, Hit
pausetime = 0,5
sparkno = S8016
guard.sparkno = S8021
sparkxy = 10,-48
hitsound = S20,5
guardsound = S20,4
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -5,0
guard.velocity = -7
air.type = High
air.velocity = -8,-1
airguard.velocity = -4,-1
ground.cornerpush.veloff = 0
palfx.time = 12
palfx.add = -255,-20,140
palfx.sinadd = 0,80,100,12
palfx.color = 0

[State 295, Projectile 5]
type = Projectile
trigger1 = Time = 16
projid = 295
projanim = 8131
projhitanim = 8131
velocity = 0,0.5
accel = 0,0.5
projpriority = 1
projheightbound = -250, 100
offset = 0,0
attr = S, NP
damage = 40,10
animtype = Light
guardflag = MA
hitflag = MAFP
priority = 4, Hit
pausetime = 0,5
sparkno = S8016
guard.sparkno = S8021
sparkxy = 10,-48
hitsound = S20,5
guardsound = S20,4
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -5,0
guard.velocity = -7
air.type = High
air.velocity = -8,-1
airguard.velocity = -4,-1
ground.cornerpush.veloff = 0
palfx.time = 12
palfx.add = -255,-20,140
palfx.sinadd = 0,80,100,12
palfx.color = 0

[State 295, PlaySnd 1]
type = PlaySnd
trigger1 = Time = 16
value = 21,7

[State 295, DestroySelf]
type = DestroySelf
trigger1 = (Time >= 20) && (parent, NumProjID(295) = 0)

;---------------------------------------------------------------------------
; Stand B 2

[Statedef 213]
type    = S
movetype= A
physics = S
juggle  = 3
poweradd= 40
ctrl = 0
;anim = 213
sprpriority = 2

[State 213, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = ifelse(Var(40) = 16, 263, 213)

[State 213, HitDef MSH]
type = HitDef
triggerall = Var(40) != 12
trigger1 = PalNo <= 6
trigger1 = AnimElem = 2
attr = S, NA
damage = 40,0
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 9,10
sparkno = S8011
guard.sparkno = S8020
sparkxy = -15,-47
hitsound = S20,1
guardsound = S20,4
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -8
guard.velocity = -10
airguard.velocity = -5,-1
air.type = Low
air.velocity = -6,-2

[State 213, Power Gem HitDef MSH]
type = HitDef
triggerall = Var(40) = 12
trigger1 = PalNo <= 6
trigger1 = AnimElem = 2
attr = S, NA
damage = 40,0
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 9,10
sparkno = S8016
guard.sparkno = S8021
sparkxy = -15,-47
hitsound = S20,1
guardsound = S20,4
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -8
guard.velocity = -10
airguard.velocity = -5,-1
air.type = Low
air.velocity = -6,-2

[State 213, HitDef MvC]
type = HitDef
trigger1 = PalNo > 6
trigger1 = AnimElem = 2
attr = S, NA
damage = 40,0
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 9,10
sparkno = S8011
guard.sparkno = S8020
sparkxy = -15,-47
hitsound = S20,1
guardsound = S20,4
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -8
guard.velocity = -10
air.type = Low
air.velocity = -6,-2

[State 213, Yell]
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = 30,1
channel = 0

[State 213, Whoosh]
type = PlaySnd
trigger1 = AnimElemTime(2) = 0
value = 21,1

[State 213, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Crouch X

[Statedef 400]
type    = C
movetype= A
physics = C
juggle  = 3
poweradd= 20
ctrl = 0
;anim = 400
sprpriority = 2

[State 400, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = ifelse(Var(40) = 16, 450, 400)

[State 400, HitDef]
type = HitDef
triggerall = Var(40) != 12
trigger1 = AnimElem = 3
attr = C, NA
damage = 40,0
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 9,10
sparkno = S8010
guard.sparkno = S8020
sparkxy = -10,-54
hitsound = S20,0
guardsound = S20,4
ground.type = Low
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -5
guard.velocity = -7
air.type = High
air.velocity = -4,-1

[State 400, Power Gem HitDef]
type = HitDef
triggerall = Var(40) = 12
trigger1 = AnimElem = 3
attr = C, NA
damage = 40,0
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 9,10
sparkno = S8016
guard.sparkno = S8021
sparkxy = -10,-54
hitsound = S20,0
guardsound = S20,4
ground.type = Low
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -5
guard.velocity = -7
air.type = High
air.velocity = -4,-1

[State 400, Reality Gem X Helper]
type = Helper
triggerall = Var(40) = 13
trigger1 = (Time = 1) && (NumHelper(270) = 0) && (NumHelper(280) = 0) && (NumHelper(290) = 0)
name = "Reality X"
id = 270
postype = P1
pos = 0,0
stateno = 270
ownpal = 1

[State 400, Whoosh]
type = PlaySnd
trigger1 = AnimElemTime(2) = 0
value = 21,0

[State 400, CtrlSet]
type = CtrlSet
trigger1 = AnimElemTime(5) = 0
value = 1

[State 400, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 11

;---------------------------------------------------------------------------
;Crouch Y (with shield)

[Statedef 401]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 40
ctrl = 0
;anim = 401
sprpriority = 2

[State 401, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = ifelse(Var(40) = 16, 451, 401)

[State 401, HitDef]
type = HitDef
triggerall = Var(40) != 12
trigger1 = AnimElem = 3
attr = C, NA
damage = 95,0
animtype = Medium
guardflag = MA
hitflag = MAFD
priority = 4, Hit
pausetime = 9,10
sparkno = S8011
guard.sparkno = S8020
sparkxy = -15,-30
hitsound = S20,1
guardsound = S20,4
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -8
guard.velocity = -10
airguard.velocity = -5,-1
air.type = Low
air.velocity = -6,-1
down.bounce = 1
down.velocity = -4,-4

[State 401, Power Gem HitDef]
type = HitDef
triggerall = Var(40) = 12
trigger1 = AnimElem = 3
attr = C, NA
damage = 95,0
animtype = Medium
guardflag = MA
hitflag = MAFD
priority = 4, Hit
pausetime = 9,10
sparkno = S8016
guard.sparkno = S8021
sparkxy = -15,-30
hitsound = S20,1
guardsound = S20,4
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -8
guard.velocity = -10
airguard.velocity = -5,-1
air.type = Low
air.velocity = -6,-1
down.bounce = 1
down.velocity = -4,-4

[State 401, Reality Gem Y Helper]
type = Helper
triggerall = Var(40) = 13
trigger1 = (Time = 1) && (NumHelper(270) = 0) && (NumHelper(280) = 0) && (NumHelper(290) = 0)
name = "Reality Y"
id = 280
postype = P1
pos = -15,0
stateno = 280
ownpal = 1

[State 401, Yell]
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = 30,1
channel = 0

[State 401, Whoosh]
type = PlaySnd
trigger1 = AnimElemTime(2) = 0
value = 21,1

[State 401, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
;Crouch Z (without shield)

[Statedef 402]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 60
ctrl = 0
;anim = 402
sprpriority = 2

[State 402, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = ifelse(Var(40) = 16, 452, 402)

[State 402, HitDef A]
type = HitDef
triggerall = Var(40) != 12
trigger1 = P2StateType != L
trigger1 = AnimElem = 2
attr = C, NA
damage = 95,0
animtype = Up
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 9,10
sparkno = S8011
guard.sparkno = S8020
sparkxy = -10,-60
hitsound = S20,2
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = 0,-13.5
guard.velocity = -11
airguard.velocity = -5,-1
air.type = Low
air.velocity = 0,-11
p2stateno = 450

[State 402, HitDef B]
type = HitDef
triggerall = Var(40) != 12
trigger1 = P2StateType = L
trigger1 = AnimElem = 2
attr = C, NA
damage = 95,0
animtype = Up
guardflag = MA
hitflag = MAFD
priority = 4, Hit
pausetime = 9,10
sparkno = S8011
guard.sparkno = S8020
sparkxy = -10,-60
hitsound = S20,2
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = 0,-13.5
guard.velocity = -11
airguard.velocity = -5,-1
air.type = Low
air.velocity = 0,-11
down.bounce = 1
down.velocity = -4,-4

[State 402, Reality Gem Z Helper]
type = Helper
triggerall = Var(40) = 13
trigger1 = (Time = 1) && (NumHelper(270) = 0) && (NumHelper(280) = 0) && (NumHelper(290) = 0)
name = "Reality Z"
id = 290
postype = P1
pos = 48,-16
stateno = 290
ownpal = 1

[State 402, Power Gem HitDef A]
type = HitDef
triggerall = Var(40) = 12
trigger1 = P2StateType != L
trigger1 = AnimElem = 2
attr = C, NA
damage = 95,0
animtype = Up
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 9,10
sparkno = S8016
guard.sparkno = S8021
sparkxy = -10,-60
hitsound = S20,2
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = 0,-13.5
guard.velocity = -11
airguard.velocity = -5,-1
air.type = Low
air.velocity = 0,-11
p2stateno = 450

[State 402, Power Gem HitDef B]
type = HitDef
triggerall = Var(40) = 12
trigger1 = P2StateType = L
trigger1 = AnimElem = 2
attr = C, NA
damage = 95,0
animtype = Up
guardflag = MA
hitflag = MAFD
priority = 4, Hit
pausetime = 9,10
sparkno = S8016
guard.sparkno = S8021
sparkxy = -10,-60
hitsound = S20,2
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = 0,-13.5
guard.velocity = -11
airguard.velocity = -5,-1
air.type = Low
air.velocity = 0,-11
down.bounce = 1
down.velocity = -4,-4

[State 402, Yell]
type = PlaySnd
trigger1 = (AnimElemTime(1) = 5) && (Anim = 402)
trigger2 = (AnimElemTime(1) = 2) && (Anim = 452)
value = 30,2
channel = 0

[State 402, Whoosh]
type = PlaySnd
trigger1 = AnimElemTime(2) = 0
value = 21,2

[State 402, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
;Crouch Z (with shield)

[Statedef 403]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 60
ctrl = 0
;anim = 403
sprpriority = 2

[State 403, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = ifelse(Var(40) = 16, 453, 403)

[State 403, HitDef A]
type = HitDef
triggerall = Var(40) != 12
trigger1 = P2StateType != L
trigger1 = AnimElem = 2
attr = C, NA
damage = 110,0
animtype = Up ;Heavy
guardflag = MA
hitflag = MAF
priority = 5, Hit
pausetime = 9,10
sparkno = S8011
guard.sparkno = S8020
sparkxy = -10,-60
hitsound = S20,2
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = 0,-13.5
guard.velocity = -11
airguard.velocity = -5,-1
air.type = Low
air.velocity = 0,-11
p2stateno = 450

[State 403, HitDef B]
type = HitDef
triggerall = Var(40) != 12
trigger1 = P2StateType = L
trigger1 = AnimElem = 2
attr = C, NA
damage = 110,0
animtype = Up ;Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 9,10
sparkno = S8011
guard.sparkno = S8020
sparkxy = -10,-60
hitsound = S20,2
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = 0,-13.5
guard.velocity = -11
airguard.velocity = -5,-1
air.type = Low
air.velocity = 0,-11
down.bounce = 1
down.velocity = -4,-4

[State 403, Power Gem HitDef A]
type = HitDef
triggerall = Var(40) = 12
trigger1 = P2StateType != L
trigger1 = AnimElem = 2
attr = C, NA
damage = 110,0
animtype = Up ;Heavy
guardflag = MA
hitflag = MAF
priority = 5, Hit
pausetime = 9,10
sparkno = S8016
guard.sparkno = S8021
sparkxy = -10,-60
hitsound = S20,2
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = 0,-13.5
guard.velocity = -11
airguard.velocity = -5,-1
air.type = Low
air.velocity = 0,-11
p2stateno = 450

[State 403, Power Gem HitDef B]
type = HitDef
triggerall = Var(40) = 12
trigger1 = P2StateType = L
trigger1 = AnimElem = 2
attr = C, NA
damage = 110,0
animtype = Up ;Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 9,10
sparkno = S8016
guard.sparkno = S8021
sparkxy = -10,-60
hitsound = S20,2
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = 0,-13.5
guard.velocity = -11
airguard.velocity = -5,-1
air.type = Low
air.velocity = 0,-11
down.bounce = 1
down.velocity = -4,-4

[State 403, Reality Gem Z Helper]
type = Helper
triggerall = Var(40) = 13
trigger1 = (Time = 1) && (NumHelper(270) = 0) && (NumHelper(280) = 0) && (NumHelper(290) = 0)
name = "Reality Z"
id = 290
postype = P1
pos = 48,-16
stateno = 290
ownpal = 1

[State 403, Yell]
type = PlaySnd
trigger1 = (AnimElemTime(1) = 7) && (Anim = 403)
trigger2 = (AnimElemTime(1) = 3) && (Anim = 453)
value = 30,2
channel = 0

[State 403, Whoosh]
type = PlaySnd
trigger1 = AnimElemTime(2) = 0
value = 21,3

[State 403, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; HITG_SHAKE (Vs Style Launcher) - for Crouch Z
[Statedef 450]
type    = S
movetype= H
physics = N
velset = 0,0

[State 450, ChangeAnim 1]
type = ChangeAnim
trigger1 = Time = 0
value = 5012

[State 5000, 4] ;Freeze anim
type = ChangeAnim
trigger1 = Time > 0
value = anim

[State 5000, 5] ;State type gets set to aerial if getting hit up
type = StateTypeSet
trigger1 = Time = 0
trigger1 = GetHitVar(yvel) != 0 && GetHitVar(fall)
trigger2 = Pos Y != 0
type = a

[State 450, ChangeState]
type = ChangeState
trigger1 = HitShakeOver
value = 451

[State 5000, FFB Light]
type = ForceFeedback
trigger1 = anim = 5000
trigger2 = anim = 5010
persistent = 0
time = 6
waveform = square

[State 5000, FFB Medium]
type = ForceFeedback
trigger1 = anim = 5001
trigger2 = anim = 5011
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3

[State 5000, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5012
trigger2 = anim = 5002
trigger3 = anim = 5030
persistent = 0
time = 15
waveform = sinesquare
ampl = 140

;---------------------------------------------------------------------------
; HITA_UP (initial going up) (Vs Style Launcher)
[Statedef 451]
type    = A
movetype= H
physics = N
ctrl = 0

[State 451, ChangeAnim] ;Anim for HIT_UP/HIT_DIAGUP (only if it exists)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) ;5051 - 4 + type

[State 5030, 1]
type = VelAdd;Gravity
trigger1 = 1
y = GetHitVar(yaccel)

[State 5030, 2]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 5030, 5]
type = ChangeState
trigger1 = (AnimTime = 0) || (Time = 12)
value = 452 ;HITA_UP (transition)

;---------------------------------------------------------------------------
; HITA_UP_T (transition) (Vs Style Launcher)
[Statedef 452]
type    = A
movetype= H
physics = N

[State 5035, 1]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = SelfAnimExist(5035)
trigger1 = Anim != [5051,5059] ;Not if in hit up anim
trigger1 = Anim != 5090 ;Not if hit off ground anim
value = 5035

[State 5035, 2]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5035, 4]
type = ChangeState
trigger1 = HitOver  ;Hit is over
trigger2 = AnimTime = 0 ;Anim is over
trigger3 = Vel Y > 0    ;Hit ground
trigger3 = Pos Y >= 10  ;.
trigger4 = Time = 0     ;No transition anim
trigger4 = Anim != 5035 ;.
value = 453 ;HITA_FALL

;---------------------------------------------------------------------------
; HITA_FALL (knocked up, falling) (Vs Style Launcher)
[Statedef 453]
type    = A
movetype= H
physics = N

[State 5050, 1] ;Change anim when done with transition
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = Anim = 5035
trigger2 = Time = 0     ;If no transition anim
trigger2 = Anim != 5035
trigger2 = (Anim != [5051, 5059]) && (Anim != [5061, 5069])
trigger2 = Anim != 5090 ;Not if hit off ground anim
value = 5050

[State 5050, 3] ;Gravity
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5050, SelfState 1]
type = SelfState
triggerall = Alive = 1
trigger1 = (Time = 15) || (Vel Y >= 0)
value = 5040

[State 5050, SelfState 2]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= ifelse((anim = [5051,5059]) || (anim = [5061,5069]), 0, 25)
value = 5100 ;HIT_BOUNCE

;---------------------------------------------------------------------------
;Crouch Y (without shield)

[Statedef 404]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 40
ctrl = 0
;anim = 404
sprpriority = 2

[State 404, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = ifelse(Var(40) = 16, 454, 404)

[State 404, HitDef]
type = HitDef
triggerall = Var(40) != 12
trigger1 = AnimElem = 3
attr = C, NA
damage = 55,0
animtype = Medium
guardflag = MA
hitflag = MAFD
priority = 4, Hit
pausetime = 9,10
sparkno = S8011
guard.sparkno = S8020
sparkxy = -15,-30
hitsound = S20,1
guardsound = S20,4
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -8
guard.velocity = -10
airguard.velocity = -5,-1
air.type = Low
air.velocity = -6,-1
down.bounce = 1
down.velocity = -4,-4

[State 404, Power Gem HitDef]
type = HitDef
triggerall = Var(40) = 12
trigger1 = AnimElem = 3
attr = C, NA
damage = 55,0
animtype = Medium
guardflag = MA
hitflag = MAFD
priority = 4, Hit
pausetime = 9,10
sparkno = S8016
guard.sparkno = S8021
sparkxy = -15,-30
hitsound = S20,1
guardsound = S20,4
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -8
guard.velocity = -10
airguard.velocity = -5,-1
air.type = Low
air.velocity = -6,-1
down.bounce = 1
down.velocity = -4,-4

[State 404, Reality Gem Y Helper]
type = Helper
triggerall = Var(40) = 13
trigger1 = (Time = 1) && (NumHelper(270) = 0) && (NumHelper(280) = 0) && (NumHelper(290) = 0)
name = "Reality Y"
id = 280
postype = P1
pos = -15,0
stateno = 280
ownpal = 1

[State 404, Yell]
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = 30,1
channel = 0

[State 404, Whoosh]
type = PlaySnd
trigger1 = AnimElemTime(2) = 0
value = 21,1

[State 404, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
;Crouch A

[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 20
ctrl = 0
;anim = 410
sprpriority = 2

[State 410, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = ifelse(Var(40) = 16, 460, 410)

[State 410, HitDef]
type = HitDef
triggerall = Var(40) != 12
trigger1 = AnimElem = 2
attr = C, NA
damage = 50,0
animtype = Light
guardflag = L
hitflag = MFD
priority = 3, Hit
pausetime = 9,10
sparkno = S8010
guard.sparkno = S8020
sparkxy = 0,-10
hitsound = S20,0
guardsound = S20,4
ground.type = Low
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -8
guard.velocity = -10
down.bounce = 1
down.velocity = -4,-4
air.type = Low
air.velocity = -4,-1

[State 410, Power Gem HitDef]
type = HitDef
triggerall = Var(40) = 12
trigger1 = AnimElem = 2
attr = C, NA
damage = 50,0
animtype = Light
guardflag = L
hitflag = MFD
priority = 3, Hit
pausetime = 9,10
sparkno = S8016
guard.sparkno = S8021
sparkxy = 0,-10
hitsound = S20,0
guardsound = S20,4
ground.type = Low
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -8
guard.velocity = -10
down.bounce = 1
down.velocity = -4,-4
air.type = Low
air.velocity = -4,-1

[State 410, Reality Gem X Helper]
type = Helper
triggerall = Var(40) = 13
trigger1 = (Time = 1) && (NumHelper(270) = 0) && (NumHelper(280) = 0) && (NumHelper(290) = 0)
name = "Reality X"
id = 270
postype = P1
pos = 0,0
stateno = 275
ownpal = 1

[State 410, Yell]
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = 30,0
channel = 0

[State 410, Whoosh]
type = PlaySnd
trigger1 = AnimElemTime(2) = 0
value = 21,0

[State 410, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
;Crouch B

[Statedef 411]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 40
ctrl = 0
;anim = 411
sprpriority = 2

[State 411, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = ifelse(Var(40) = 16, 461, 411)

[State 411, HitDef]
type = HitDef
triggerall = Var(40) != 12
trigger1 = AnimElem = 3
attr = C, NA
damage = 80,0
animtype = Medium
guardflag = L
hitflag = MFD
priority = 4, Hit
pausetime = 9,10
sparkno = S8011
guard.sparkno = S8020
sparkxy = -5,-15
hitsound = S20,1
guardsound = S20,4
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -8
guard.velocity = -10
down.bounce = 1
down.velocity = -4,-4
airguard.velocity = -5,-1
air.type = Low
air.velocity = -6,-1

[State 411, Power Gem HitDef]
type = HitDef
triggerall = Var(40) = 12
trigger1 = AnimElem = 3
attr = C, NA
damage = 80,0
animtype = Medium
guardflag = L
hitflag = MFD
priority = 4, Hit
pausetime = 9,10
sparkno = S8016
guard.sparkno = S8021
sparkxy = -5,-15
hitsound = S20,1
guardsound = S20,4
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -8
guard.velocity = -10
down.bounce = 1
down.velocity = -4,-4
airguard.velocity = -5,-1
air.type = Low
air.velocity = -6,-1

[State 411, Reality Gem B Helper]
type = Helper
triggerall = Var(40) = 13
trigger1 = (Time = 1) && (NumHelper(270) = 0) && (NumHelper(280) = 0) && (NumHelper(290) = 0)
name = "Reality Y"
id = 280
postype = P1
pos = -15,-96
stateno = 285
ownpal = 1

[State 411, Yell]
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = 30,1
channel = 0

[State 411, Whoosh]
type = PlaySnd
trigger1 = AnimElemTime(2) = 0
value = 21,1

[State 411, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
;Crouch C

[Statedef 412]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 60
ctrl = 0
;anim = 412
sprpriority = -1

[State 412, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = ifelse(Var(40) = 16, 462, 412)

[State 412, SprPriority]
type = SprPriority
trigger1 = AnimElemTime(3) = 0
value = 2

[State 412, HitDef]
type = HitDef
triggerall = Var(40) != 12
trigger1 = AnimElem = 3
attr = C, NA
damage = 110,0
animtype = Heavy
guardflag = L
hitflag = MAFD
priority = 4, Hit
pausetime = 9,10
sparkno = S8011
guard.sparkno = S8020
sparkxy = -5,-20
hitsound = S20,2
guardsound = S20,4
ground.type = Trip
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = 0,-4
guard.velocity = -11
airguard.velocity = -5,-1
air.type = Trip
air.velocity = 0,-4
down.bounce = 1
down.velocity = -4,-4
fall.animtype = back
fall = 1
fall.recover = 0

[State 412, Power Gem HitDef]
type = HitDef
triggerall = Var(40) = 12
trigger1 = AnimElem = 3
attr = C, NA
damage = 110,0
animtype = Heavy
guardflag = L
hitflag = MAFD
priority = 4, Hit
pausetime = 9,10
sparkno = S8016
guard.sparkno = S8021
sparkxy = -5,-20
hitsound = S20,2
guardsound = S20,4
ground.type = Trip
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = 0,-4
guard.velocity = -11
airguard.velocity = -5,-1
air.type = Trip
air.velocity = 0,-4
down.bounce = 1
down.velocity = -4,-4
fall.animtype = back
fall = 1
fall.recover = 0

[State 412, Reality Gem C Helper]
type = Helper
triggerall = Var(40) = 13
trigger1 = (Time = 1) && (NumHelper(270) = 0) && (NumHelper(280) = 0) && (NumHelper(290) = 0)
name = "Reality C"
id = 290
postype = P1
pos = 48,-16
stateno = 295
ownpal = 1

[State 412, Yell]
type = PlaySnd
trigger1 = (AnimElemTime(1) = 5) && (Anim = 412)
trigger2 = (AnimElemTime(1) = 2) && (Anim = 462)
value = 30,1
channel = 0

[State 412, Whoosh]
type = PlaySnd
trigger1 = AnimElemTime(2) = 0
value = 21,2

[State 412, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
;Jump X

[Statedef 600]
type    = A
movetype= A
physics = A
juggle  = 3
poweradd= 20
ctrl = 0
;anim = 600
sprpriority = 2

[State 600, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 600

[State 600, Vel VarSet 1]
type = VarSet
trigger1 = (Time = 0) || (AnimElemTime(7) >= 0)
v = 9
value = 0

[State 600, Vel VarSet 2]
type = VarSet
trigger1 = (AnimElemTime(3) >= 0) && (AnimElemTime(6) < 0)
v = 9
value = 1

[State 600, HitDef]
type = HitDef
triggerall = Var(40) != 12
trigger1 = AnimElem = 3
attr = A, NA
damage = 40,0
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 9,9
sparkno = S8010
guard.sparkno = S8020
sparkxy = -10,-60
hitsound = S20,0
guardsound = S20,4
ground.type = High
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -2.5
guard.velocity = -3
airguard.velocity = -3,-1
air.type = High
air.velocity = 0,-3

[State 600, Power Gem HitDef]
type = HitDef
triggerall = Var(40) = 12
trigger1 = AnimElem = 3
attr = A, NA
damage = 40,0
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 9,9
sparkno = S8016
guard.sparkno = S8021
sparkxy = -10,-60
hitsound = S20,0
guardsound = S20,4
ground.type = High
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -2.5
guard.velocity = -3
airguard.velocity = -3,-1
air.type = High
air.velocity = 0,-3

[State 600, Reality Gem X Helper]
type = Helper
triggerall = Var(40) = 13
trigger1 = (Time = 1) && (NumHelper(270) = 0) && (NumHelper(280) = 0) && (NumHelper(290) = 0)
name = "Reality X"
id = 270
postype = P1
pos = 0,0
stateno = 270
ownpal = 1

[State 600, Yell]
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = 30,0
channel = 0

[State 600, Whoosh]
type = PlaySnd
trigger1 = AnimElemTime(2) = 0
value = 21,0

[State 600, Super Jump HoldFwd]
type = VelAdd
triggerall = (Var(10) = 1) && (Vel X <= 4)
trigger1 = command = "holdfwd"
x = 0.25

[State 600, Super Jump HoldBack]
type = VelAdd
triggerall = (Var(10) = 1) && (Vel X >= -3)
trigger1 = command = "holdback"
x = -0.1

[State 600, Super Jump CtrlSet]
type = CtrlSet
trigger1 = (AnimElemTime(7) = 0) && (Var(10) = 1)
value = 1

;---------------------------------------------------------------------------
;Jump Y (with shield)

[Statedef 601]
type    = A
movetype= A
physics = A
juggle  = 3
poweradd= 40
ctrl = 0
;anim = 601
sprpriority = 2

[State 601, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 601

[State 601, Vel VarSet 1]
type = VarSet
trigger1 = (Time = 0) || (AnimElemTime(9) >= 0)
v = 9
value = 0

[State 601, Vel VarSet 2]
type = VarSet
trigger1 = (AnimElemTime(3) >= 0) && (AnimElemTime(7) < 0)
v = 9
value = 1

[State 601, HitDef]
type = HitDef
triggerall = Var(40) != 12
trigger1 = AnimElem = 3
attr = A, NA
damage = 80,0
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 9,10
sparkno = S8011
guard.sparkno = S8020
sparkxy = -10,-60
hitsound = S20,1
guardsound = S20,4
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -3.5
guard.velocity = -4
airguard.velocity = -4,-1.5
air.type = Low
air.velocity = -3,-3.5

[State 601, Power Gem HitDef]
type = HitDef
triggerall = Var(40) = 12
trigger1 = AnimElem = 3
attr = A, NA
damage = 80,0
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 9,10
sparkno = S8016
guard.sparkno = S8021
sparkxy = -10,-60
hitsound = S20,1
guardsound = S20,4
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -3.5
guard.velocity = -4
airguard.velocity = -4,-1.5
air.type = Low
air.velocity = -3,-3.5

[State 601, Reality Gem Y Helper]
type = Helper
triggerall = Var(40) = 13
trigger1 = (Time = 1) && (NumHelper(270) = 0) && (NumHelper(280) = 0) && (NumHelper(290) = 0)
name = "Reality Y"
id = 280
postype = P1
pos = -15,0
stateno = 280
ownpal = 1

[State 601, Yell]
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = 30,1
channel = 0

[State 601, Whoosh]
type = PlaySnd
trigger1 = AnimElemTime(2) = 0
value = 21,1

[State 601, Super Jump HoldFwd]
type = VelAdd
triggerall = (Var(10) = 1) && (Vel X <= 4)
trigger1 = command = "holdfwd"
x = 0.25

[State 601, Super Jump HoldBack]
type = VelAdd
triggerall = (Var(10) = 1) && (Vel X >= -3)
trigger1 = command = "holdback"
x = -0.1

[State 601, Super Jump CtrlSet]
type = CtrlSet
trigger1 = (AnimElemTime(9) = 0) && (Var(10) = 1)
value = 1

;---------------------------------------------------------------------------
;Jump Z (without shield)

[Statedef 602]
type    = A
movetype= A
physics = A
juggle  = 3
poweradd= 60
ctrl = 0
;anim = 602
sprpriority = 2

[State 602, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 602

[State 602, Vel VarSet 1]
type = VarSet
trigger1 = (Time = 0) || (AnimElemTime(10) >= 0)
v = 9
value = 0

[State 602, Vel VarSet 2]
type = VarSet
trigger1 = (AnimElemTime(3) >= 0) && (AnimElemTime(4) < 0)
v = 9
value = 1

[State 602, HitDef]
type = HitDef
triggerall = Var(40) != 12
trigger1 = AnimElem = 3
attr = A, NA
damage = 100,0
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 9,10
sparkno = S8011
guard.sparkno = S8020
sparkxy = -20,-80
hitsound = S20,2
guardsound = S20,4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -7
guard.velocity = -8.5
airguard.velocity = -5.5,-1.5
air.type = Low
air.velocity = -8,2
air.fall = 1

[State 602, Power Gem HitDef]
type = HitDef
triggerall = Var(40) = 12
trigger1 = AnimElem = 3
attr = A, NA
damage = 100,0
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 9,10
sparkno = S8016
guard.sparkno = S8021
sparkxy = -20,-80
hitsound = S20,2
guardsound = S20,4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -7
guard.velocity = -8.5
airguard.velocity = -5.5,-1.5
air.type = Low
air.velocity = -8,2
air.fall = 1

[State 602, Reality Gem Z Helper]
type = Helper
triggerall = Var(40) = 13
trigger1 = (Time = 1) && (NumHelper(270) = 0) && (NumHelper(280) = 0) && (NumHelper(290) = 0)
name = "Reality Z"
id = 290
postype = P1
pos = 48,-16
stateno = 290
ownpal = 1

[State 602, Yell]
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = 30,2
channel = 0

[State 602, Whoosh]
type = PlaySnd
trigger1 = AnimElemTime(2) = 0
value = 21,2

[State 602, Super Jump HoldFwd]
type = VelAdd
triggerall = (Var(10) = 1) && (Vel X <= 4)
trigger1 = command = "holdfwd"
x = 0.25

[State 602, Super Jump HoldBack]
type = VelAdd
triggerall = (Var(10) = 1) && (Vel X >= -3)
trigger1 = command = "holdback"
x = -0.1

[State 602, Super Jump CtrlSet]
type = CtrlSet
trigger1 = (AnimElemTime(10) = 0) && (Var(10) = 1)
value = 1

;---------------------------------------------------------------------------
;Jump Y (without shield)

[Statedef 605]
type    = A
movetype= A
physics = A
juggle  = 3
poweradd= 40
ctrl = 0
;anim = 605
sprpriority = 2

[State 605, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 605

[State 605, Vel VarSet 1]
type = VarSet
trigger1 = (Time = 0) || (AnimElemTime(8) >= 0)
v = 9
value = 0

[State 605, Vel VarSet 2]
type = VarSet
trigger1 = (AnimElemTime(3) >= 0) && (AnimElemTime(6) < 0)
v = 9
value = 1

[State 605, HitDef]
type = HitDef
triggerall = Var(40) != 12
trigger1 = AnimElem = 3
attr = A, NA
damage = 60,0
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 9,10
sparkno = S8011
guard.sparkno = S8020
sparkxy = -10,-60
hitsound = S20,1
guardsound = S20,4
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -3.5
guard.velocity = -4
airguard.velocity = -4,-1.5
air.type = Low
air.velocity = -4,4.5
air.fall = 1
fall.xvelocity = -4

[State 605, Power Gem HitDef]
type = HitDef
triggerall = Var(40) = 12
trigger1 = AnimElem = 3
attr = A, NA
damage = 60,0
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 9,10
sparkno = S8016
guard.sparkno = S8021
sparkxy = -10,-60
hitsound = S20,1
guardsound = S20,4
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -3.5
guard.velocity = -4
airguard.velocity = -4,-1.5
air.type = Low
air.velocity = -4,4.5
air.fall = 1
fall.xvelocity = -4

[State 605, Reality Gem Y Helper]
type = Helper
triggerall = Var(40) = 13
trigger1 = (Time = 1) && (NumHelper(270) = 0) && (NumHelper(280) = 0) && (NumHelper(290) = 0)
name = "Reality Y"
id = 280
postype = P1
pos = -15,0
stateno = 280
ownpal = 1

[State 605, Yell]
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = 30,1
channel = 0

[State 605, Whoosh]
type = PlaySnd
trigger1 = AnimElemTime(2) = 0
value = 21,1

[State 605, Super Jump HoldFwd]
type = VelAdd
triggerall = (Var(10) = 1) && (Vel X <= 4)
trigger1 = command = "holdfwd"
x = 0.25

[State 605, Super Jump HoldBack]
type = VelAdd
triggerall = (Var(10) = 1) && (Vel X >= -3)
trigger1 = command = "holdback"
x = -0.1

[State 605, Super Jump CtrlSet]
type = CtrlSet
trigger1 = (AnimElemTime(8) = 0) && (Var(10) = 1)
value = 1

;---------------------------------------------------------------------------
;Jump Z (with shield)

[Statedef 606]
type    = A
movetype= A
physics = A
juggle  = 3
poweradd= 60
ctrl = 0
;anim = 606
sprpriority = 2

[State 606, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 606

[State 606, ScreenBound]
type = ScreenBound
trigger1 = Var(9) = 1
value = 0
movecamera = 0,0

[State 606, HitDef]
type = HitDef
triggerall = Var(40) != 12
trigger1 = AnimElem = 3
attr = A, NA
damage = 120,0
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 5, Hit
pausetime = 9,10
sparkno = S8011
guard.sparkno = S8020
sparkxy = -5,-40
hitsound = S20,2
guardsound = S20,4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = ifelse(P2Dist X < 0, 7.5, -7.5)
guard.velocity = ifelse(P2Dist X < 0, 9, -9)
airguard.velocity = -5.5,-1.5
air.type = Low
air.velocity = ifelse(Var(9) = 1, -15, -4),-5
fall.xvelocity = 0
fall.yvelocity = 0
fall = ifelse(Var(9) = 1, 1, 0)
fall.recover = 0

[State 606, Power Gem HitDef]
type = HitDef
triggerall = Var(40) = 12
trigger1 = AnimElem = 3
attr = A, NA
damage = 120,0
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 5, Hit
pausetime = 9,10
sparkno = S8016
guard.sparkno = S8021
sparkxy = -5,-40
hitsound = S20,2
guardsound = S20,4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = ifelse(P2Dist X < 0, 7.5, -7.5)
guard.velocity = ifelse(P2Dist X < 0, 9, -9)
airguard.velocity = -5.5,-1.5
air.type = Low
air.velocity = ifelse(Var(9) = 1, -15, -4),-5
fall.xvelocity = 0
fall.yvelocity = 0
fall = ifelse(Var(9) = 1, 1, 0)
fall.recover = 0

[State 606, Reality Gem Z Helper]
type = Helper
triggerall = Var(40) = 13
trigger1 = (Time = 1) && (NumHelper(270) = 0) && (NumHelper(280) = 0) && (NumHelper(290) = 0)
name = "Reality Z"
id = 290
postype = P1
pos = 48,-16
stateno = 290
ownpal = 1

[State 606, Yell]
type = PlaySnd
trigger1 = AnimElemTime(1) = 5
value = 30,2
channel = 0

[State 606, Whoosh]
type = PlaySnd
trigger1 = AnimElemTime(2) = 0
value = 21,3

[State 606, Super Jump HoldFwd]
type = VelAdd
triggerall = (Var(10) = 1) && (Vel X <= 4)
trigger1 = command = "holdfwd"
x = 0.25

[State 606, Super Jump HoldBack]
type = VelAdd
triggerall = (Var(10) = 1) && (Vel X >= -3)
trigger1 = command = "holdback"
x = -0.1

[State 606, Super Jump CtrlSet]
type = CtrlSet
trigger1 = (AnimElemTime(12) = 0) && (Var(10) = 1)
value = 1

;---------------------------------------------------------------------------
;Jump A

[Statedef 610]
type    = A
movetype= A
physics = A
juggle  = 3
poweradd= 20
ctrl = 0
;anim = 610
sprpriority = 2

[State 610, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 610

[State 610, Vel VarSet 1]
type = VarSet
trigger1 = (Time = 0) || (AnimElemTime(5) >= 0)
v = 9
value = 0

[State 610, Vel VarSet 2]
type = VarSet
trigger1 = (AnimElemTime(3) >= 0) && (AnimElemTime(4) < 0)
v = 9
value = 1

[State 610, HitDef]
type = HitDef
triggerall = Var(40) != 12
trigger1 = AnimElem = 3
attr = A, NA
damage = 30,0
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 9,9
sparkno = S8010
guard.sparkno = S8020
sparkxy = -10,-100
hitsound = S20,0
guardsound = S20,4
ground.type = High
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -2.5
guard.velocity = -3
airguard.velocity = -3,-1
air.type = High
air.velocity = 0,-3

[State 610, Power Gem HitDef]
type = HitDef
triggerall = Var(40) = 12
trigger1 = AnimElem = 3
attr = A, NA
damage = 30,0
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 9,9
sparkno = S8016
guard.sparkno = S8021
sparkxy = -10,-100
hitsound = S20,0
guardsound = S20,4
ground.type = High
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -2.5
guard.velocity = -3
airguard.velocity = -3,-1
air.type = High
air.velocity = 0,-3

[State 610, Reality Gem X Helper]
type = Helper
triggerall = Var(40) = 13
trigger1 = (Time = 1) && (NumHelper(270) = 0) && (NumHelper(280) = 0) && (NumHelper(290) = 0)
name = "Reality X"
id = 270
postype = P1
pos = 0,0
stateno = 275
ownpal = 1

[State 610, Yell]
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = 30,0
channel = 0

[State 610, Whoosh]
type = PlaySnd
trigger1 = AnimElemTime(2) = 0
value = 21,0

[State 610, Super Jump HoldFwd]
type = VelAdd
triggerall = (Var(10) = 1) && (Vel X <= 4)
trigger1 = command = "holdfwd"
x = 0.25

[State 610, Super Jump HoldBack]
type = VelAdd
triggerall = (Var(10) = 1) && (Vel X >= -3)
trigger1 = command = "holdback"
x = -0.1

[State 610, Super Jump CtrlSet]
type = CtrlSet
trigger1 = (AnimElemTime(5) = 0) && (Var(10) = 1)
value = 1

;---------------------------------------------------------------------------
;Jump B

[Statedef 611]
type    = A
movetype= A
physics = A
juggle  = 3
poweradd= 40
ctrl = 0
;anim = 611
sprpriority = 2

[State 611, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 611

[State 611, Vel VarSet 1]
type = VarSet
trigger1 = (Time = 0) || (AnimElemTime(7) = 0)
v = 9
value = 0

[State 611, Vel VarSet 2]
type = VarSet
trigger1 = (AnimElemTime(2) >= 0) && (AnimElemTime(6) < 0)
v = 9
value = 1

[State 611, HitDef]
type = HitDef
triggerall = Var(40) != 12
trigger1 = AnimElem = 2
attr = A, NA
damage = 55,0
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 9,10
sparkno = S8011
guard.sparkno = S8020
sparkxy = -10,-60
hitsound = S20,1
guardsound = S20,4
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -3
guard.velocity = -4
airguard.velocity = -4,-1.5
air.type = Low
air.velocity = -2,-3

[State 611, Power Gem HitDef]
type = HitDef
triggerall = Var(40) = 12
trigger1 = AnimElem = 2
attr = A, NA
damage = 55,0
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 9,10
sparkno = S8016
guard.sparkno = S8021
sparkxy = -10,-60
hitsound = S20,1
guardsound = S20,4
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -3
guard.velocity = -4
airguard.velocity = -4,-1.5
air.type = Low
air.velocity = -2,-3

[State 611, Reality Gem B Helper]
type = Helper
triggerall = Var(40) = 13
trigger1 = (Time = 1) && (NumHelper(270) = 0) && (NumHelper(280) = 0) && (NumHelper(290) = 0)
name = "Reality Y"
id = 280
postype = P1
pos = -15,-96
stateno = 285
ownpal = 1

[State 611, Yell]
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = 30,1
channel = 0

[State 611, Whoosh]
type = PlaySnd
trigger1 = AnimElemTime(2) = 0
value = 21,1

[State 611, Super Jump HoldFwd]
type = VelAdd
triggerall = (Var(10) = 1) && (Vel X <= 4)
trigger1 = command = "holdfwd"
x = 0.25

[State 611, Super Jump HoldBack]
type = VelAdd
triggerall = (Var(10) = 1) && (Vel X >= -3)
trigger1 = command = "holdback"
x = -0.1

[State 611, Super Jump CtrlSet]
type = CtrlSet
trigger1 = (AnimElemTime(7) = 0) && (Var(10) = 1)
value = 1

;---------------------------------------------------------------------------
;Jump C

[Statedef 612]
type    = A
movetype= A
physics = A
juggle  = 3
poweradd= 60
ctrl = 0
;anim = 612
sprpriority = 2

[State 612, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 612

[State 612, ScreenBound]
type = ScreenBound
trigger1 = Var(9) = 1
trigger2 = PrevStateNo = 606
value = 0
movecamera = 0,0

[State 612, HitDef A]
type = HitDef
triggerall = Var(40) != 12
trigger1 = (AnimElem = 3) && (Var(9) != 1)
trigger2 = (AnimElem = 3) && (PrevStateNo != 606)
attr = A, NA
damage = 120,0
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 9,10
sparkno = S8011
guard.sparkno = S8020
sparkxy = -5,-80
hitsound = S20,2
guardsound = S20,4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -7.5
guard.velocity = -9
airguard.velocity = -4,-1.5
air.type = Low
air.velocity = -7,0.5
air.fall = 1
fall.recover = 0

[State 612, HitDef B]
type = HitDef
triggerall = Var(40) != 12
trigger1 = (AnimElem = 3) && (Var(9) = 1)
trigger2 = (AnimElem = 3) && (PrevStateNo = 606)
attr = A, NA
damage = ifelse(PrevStateNo = 606, 60, 120),0
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 9,10
sparkno = S8011
guard.sparkno = S8020
sparkxy = -5,-80
hitsound = S20,2
guardsound = S20,4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -7.5
guard.velocity = -9
airguard.velocity = -4,-1.5
air.type = Low
air.velocity = -14,-2
fall.xvelocity = 0
fall.yvelocity = 0
air.fall = 1
fall.recover = 0

[State 612, Power Gem HitDef A]
type = HitDef
triggerall = Var(40) = 12
trigger1 = (AnimElem = 3) && (Var(9) != 1)
trigger2 = (AnimElem = 3) && (PrevStateNo != 606)
attr = A, NA
damage = 120,0
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 9,10
sparkno = S8016
guard.sparkno = S8021
sparkxy = -5,-80
hitsound = S20,2
guardsound = S20,4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -7.5
guard.velocity = -9
airguard.velocity = -4,-1.5
air.type = Low
air.velocity = -7,0.5
air.fall = 1
fall.recover = 0

[State 612, Power Gem HitDef B]
type = HitDef
triggerall = Var(40) = 12
trigger1 = (AnimElem = 3) && (Var(9) = 1)
trigger2 = (AnimElem = 3) && (PrevStateNo = 606)
attr = A, NA
damage = ifelse(PrevStateNo = 606, 60, 120),0
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 9,10
sparkno = S8016
guard.sparkno = S8021
sparkxy = -5,-80
hitsound = S20,2
guardsound = S20,4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -7.5
guard.velocity = -9
airguard.velocity = -4,-1.5
air.type = Low
air.velocity = -14,-2
fall.xvelocity = 0
fall.yvelocity = 0
air.fall = 1
fall.recover = 0

[State 612, Reality Gem C Helper]
type = Helper
triggerall = Var(40) = 13
trigger1 = (Time = 1) && (NumHelper(270) = 0) && (NumHelper(280) = 0) && (NumHelper(290) = 0)
name = "Reality C"
id = 290
postype = P1
pos = 48,-16
stateno = 295
ownpal = 1

[State 612, Yell]
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = 30,2
channel = 0

[State 612, Whoosh]
type = PlaySnd
trigger1 = AnimElemTime(2) = 0
value = 21,2

[State 612, Super Jump HoldFwd]
type = VelAdd
triggerall = (Var(10) = 1) && (Vel X <= 4)
trigger1 = command = "holdfwd"
x = 0.25

[State 612, Super Jump HoldBack]
type = VelAdd
triggerall = (Var(10) = 1) && (Vel X >= -3)
trigger1 = command = "holdback"
x = -0.1

[State 612, Super Jump CtrlSet]
type = CtrlSet
trigger1 = (AnimElemTime(6) = 0) && (Var(10) = 1)
value = 1

;---------------------------------------------------------------------------
;Down Jump C

[Statedef 613]
type    = A
movetype= A
physics = A
juggle  = 3
poweradd= 60
ctrl = 0
;anim = 613
sprpriority = 2

[State 613, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 613

[State 613, ScreenBound]
type = ScreenBound
trigger1 = Var(9) = 1
trigger2 = PrevStateNo = 606
value = 0
movecamera = 0,0

[State 613, HitDef A]
type = HitDef
triggerall = Var(40) != 12
trigger1 = (AnimElem = 4) && (Var(9) != 1)
trigger2 = (AnimElem = 4) && (PrevStateNo != 606)
attr = A, NA
damage = 120,0
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 9,10
sparkno = S8011
guard.sparkno = S8020
sparkxy = -5,-50
hitsound = S20,2
guardsound = S20,4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -7.5
guard.velocity = -9
airguard.velocity = -4,-1.5
air.type = Low
air.velocity = -9,7.2
air.fall = 1
fall.recover = 0

[State 613, HitDef B]
type = HitDef
triggerall = Var(40) != 12
trigger1 = (AnimElem = 4) && (Var(9) = 1)
trigger2 = (AnimElem = 4) && (PrevStateNo = 606)
attr = A, NA
damage = ifelse(PrevStateNo = 606, 60, 120),0
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 9,10
sparkno = S8011
guard.sparkno = S8020
sparkxy = -5,-50
hitsound = S20,2
guardsound = S20,4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -7.5
guard.velocity = -9
airguard.velocity = -4,-1.5
air.type = Low
air.velocity = -14,7.2
fall.xvelocity = 0
fall.yvelocity = 0
air.fall = 1
fall.recover = 0

[State 613, Power Gem HitDef A]
type = HitDef
triggerall = Var(40) = 12
trigger1 = (AnimElem = 4) && (Var(9) != 1)
trigger2 = (AnimElem = 4) && (PrevStateNo != 606)
attr = A, NA
damage = 120,0
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 9,10
sparkno = S8016
guard.sparkno = S8021
sparkxy = -5,-50
hitsound = S20,2
guardsound = S20,4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -7.5
guard.velocity = -9
airguard.velocity = -4,-1.5
air.type = Low
air.velocity = -9,7.2
air.fall = 1
fall.recover = 0

[State 613, Power Gem HitDef B]
type = HitDef
triggerall = Var(40) = 12
trigger1 = (AnimElem = 4) && (Var(9) = 1)
trigger2 = (AnimElem = 4) && (PrevStateNo = 606)
attr = A, NA
damage = ifelse(PrevStateNo = 606, 60, 120),0
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 9,10
sparkno = S8016
guard.sparkno = S8021
sparkxy = -5,-50
hitsound = S20,2
guardsound = S20,4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -7.5
guard.velocity = -9
airguard.velocity = -4,-1.5
air.type = Low
air.velocity = -14,7.2
fall.xvelocity = 0
fall.yvelocity = 0
air.fall = 1
fall.recover = 0

[State 613, Reality Gem C Helper]
type = Helper
triggerall = Var(40) = 13
trigger1 = (Time = 1) && (NumHelper(270) = 0) && (NumHelper(280) = 0) && (NumHelper(290) = 0)
name = "Reality C"
id = 290
postype = P1
pos = 48,-16
stateno = 295
ownpal = 1

[State 613, Yell]
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = 30,2
channel = 0

[State 613, Whoosh]
type = PlaySnd
trigger1 = AnimElemTime(2) = 0
value = 21,2

[State 613, Super Jump HoldFwd]
type = VelAdd
triggerall = (Var(10) = 1) && (Vel X <= 4)
trigger1 = command = "holdfwd"
x = 0.25

[State 613, Super Jump HoldBack]
type = VelAdd
triggerall = (Var(10) = 1) && (Vel X >= -3)
trigger1 = command = "holdback"
x = -0.1

[State 613, Super Jump CtrlSet]
type = CtrlSet
trigger1 = (AnimElemTime(9) = 0) && (Var(10) = 1)
value = 1

;---------------------------------------------------------------------------
; Cap Offscreen - Dashing In (part 1)

[Statedef 650]
type    = S
movetype= I
physics = N
poweradd= 0
velset = 0,0
ctrl = 0
anim = 8999

[State 650, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0

[State 650, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 650, VarSet];superjump reset
type = VarSet
trigger1 = Time = 0
v = 10
value = 0

[State 650, PosSet]
type = PosSet
trigger1 = Time = 0
y = 0

[State 650, PosAdd]
type = PosAdd
trigger1 = Time = 50
x = (-1 * BackEdgeBodyDist) + (-190)

[State 650, ChangeState]
type = ChangeState
trigger1 = Time = 50
value = 651
ctrl = 0

;---------------------------------------------------------------------------
; Cap Offscreen - Dashing In (part 2)

[Statedef 651]
type    = S
physics = N
anim = 100
sprpriority = 1
ctrl = 0

[State 651, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0

;[State 651, PosAdd]
;type = PosAdd
;trigger1 = Time = 0
;x = -200

[State 651, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0

[State 651, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 651, VelSet]
type = VelSet
trigger1 = AnimElem = 1
x = 7

[State 651, VelMul]
type = VelMul
trigger1 = AnimElem = 9
x = .28

[State 651, Width]
type = Width
trigger1 = 1
value = 10,0

[State 651, Footstep Sound]
type = PlaySnd
trigger1 = (Time%12) = 1
trigger1 = AnimElemTime(10) < 0
value = 10,1

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

;---------------------------------------------------------------------------
;Throw P (attempt)

[Statedef 800]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
;anim = 800
sprpriority = 2

[State 800, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 800

[State 800, HitDef]
type = HitDef
trigger1 = Time = 0
attr = S, NT
hitflag = M-
priority = 1, Miss
sparkno = -1
sprpriority = 2
p1facing = ifelse (command = "holdfwd", 1, -1)
p2facing = 1
p1stateno = 801
p2stateno = 810
guard.dist = 0
fall.xvelocity = 0
fall.yvelocity = 0
fall = ifelse(PalNo > 6, 0, 1)
fall.recover = 0
fall.damage = 80

[State 800, ChangeState]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Throw P (throwing opponent)

[Statedef 801]
type    = S
movetype= A
physics = N
anim = 801
poweradd = 60
sprpriority = 2

[State 801, TargetBind 1]
type = TargetBind
trigger1 = Time = 0
pos = -43,0

[State 801, TargetBind 2]
type = TargetBind
trigger1 = (AnimElemTime(2) >= 0) && (AnimElemTime(3) < 0)
pos = -42,0

[State 801, TargetBind 3]
type = TargetBind
trigger1 = (AnimElemTime(3) >= 0) && (AnimElemTime(4) < 0)
pos = -3,0

[State 801, TargetBind 4]
type = TargetBind
trigger1 = (AnimElemTime(4) >= 0) && (AnimElemTime(5) < 0)
pos = 19,0

[State 801, TargetBind 5]
type = TargetBind
trigger1 = (AnimElemTime(5) >= 0) && (AnimElemTime(6) < 0)
pos = 92,-3

[State 801, TargetBind 6]
type = TargetBind
trigger1 = (AnimElemTime(6) >= 0) && (AnimElemTime(6) < 4)
pos = 92,-3

[State 801, TargetState]
type = TargetState
trigger1 = AnimElemTime(6) = 4
value = ifelse(PalNo > 6, 812, 811)

[State 801, PowerAdd]
type = PowerAdd
trigger1 = AnimElemTime(6) = 4
value = 60

[State 801, Hurt]
type = TargetLifeAdd
trigger1 = AnimElemTime(6) = 0
value = ifelse(PalNo > 6, -160, -80)

[State 801, EnvShake]
type = EnvShake
trigger1 = AnimElemTime(5) = 0
time = 20
freq = 80
ampl = -6

[State 801, Width 1]
type = Width
trigger1 = (AnimElemTime(1) >= 0) && (AnimElemTime(5) < 0)
edge = 40,0

[State 801, Width 2]
type = Width
trigger1 = (AnimElemTime(5) >= 0) && (AnimElemTime(6) < 4)
edge = 100,0

[State 801, Grab Sound]
type = PlaySnd
trigger1 = Time = 0
value = 20,3

[State 801, Yell 1]
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = 30,0
channel = 0

[State 801, Yell 2]
type = PlaySnd
trigger1 = AnimElemTime(5) = 0
value = 30,2
channel = 0

[State 801, Slam Sound]
type = PlaySnd
trigger1 = AnimElemTime(5) = 0
value = 22,0

[State 801, Slam Explod A]
type = Explod
trigger1 = AnimElemTime(6) = 1
anim = 8000
ID = 8000
postype = P2
pos = -12,3
sprpriority = -1

[State 801, Slam Explod B]
type = Explod
trigger1 = AnimElemTime(6) = 1
anim = 8001
ID = 8001
postype = P2
pos = -12,3
sprpriority = 1

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

;---------------------------------------------------------------------------
;Throw P (thrown state for opponent)

[Statedef 810]
type    = A
movetype= H
physics = N
velset = 0,0

[State 810, SprPriority 1]
type = SprPriority
trigger1 = AnimElemTime(2) = 0
value = 3

[State 810, SprPriority 2]
type = SprPriority
trigger1 = AnimElemTime(5) = 0
value = 0

[State 810, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 810

;---------------------------------------------------------------------------
;Throw P (opponent fly away - MSH)

[Statedef 811]
type    = A
movetype= H
physics = N
velset = -4,-3
poweradd = 60

[State 811, PosAdd]
type = PosAdd
trigger1 = Time = 0
y = 10

[State 811, SelfState]
type = SelfState
trigger1 = Time = 0
value = 5050
ctrl = 0

;---------------------------------------------------------------------------
;Throw P (opponent fly away - MvC)

[Statedef 812]
type    = A
movetype= H
physics = N
velset = -7,-11
poweradd = 60

[State 812, ChangeAnim]
type = ChangeAnim
trigger1 = (AnimTime = 0) && (Anim = 5035)
trigger2 = Time = 0
trigger2 = Anim != 5035
trigger2 = (Anim != [5051, 5059]) && (Anim != [5061, 5069])
trigger2 = Anim != 5090 ;Not if hit off ground anim
value = 5050

[State 812, Change Anim] ;Coming down anim
type = ChangeAnim
trigger1 = anim = [5050,5059]
trigger1 = Vel Y >= ifelse(anim = 5050, 1, -2)
trigger1 = SelfAnimExist(anim+10)
value = anim+10
persistent = 0

[State 812, VelAdd]
type = VelAdd
trigger1 = 1
y = 0.49

[State 812, SelfState]
type = SelfState
trigger1 = Vel Y >= -0.5
value = 5040
ctrl = 1

;---------------------------------------------------------------------------
;Throw K (attempt)

[Statedef 820]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
;anim = 800
sprpriority = 2

[State 800, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 800

[State 820, HitDef]
type = HitDef
Trigger1 = Time = 0
attr = S, NT
hitflag = M-
animtype = Up
pausetime = 0,0
priority = 1, Miss
sparkno = -1
sprpriority = 2
p1facing = ifelse (command = "holdfwd", -1, 1)
p2facing = 1
p1stateno = 821
p2stateno = 830
guard.dist = 0
ground.velocity = 2.2,-10
air.velocity = 2.2,-10
;yaccel = .41
fall.xvelocity = 0
fall.yvelocity = 0
fall = 1
fall.recover = 0
fall.damage = 80

[State 820, ChangeState]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Throw K (throwing opponent)

[Statedef 821]
type    = S
movetype= A
physics = N
anim = 821
poweradd = 60
sprpriority = 2

[State 821, SprPriority]
type = SprPriority
trigger1 = AnimElemTime(6) = 0
value = 0

[State 821, TargetBind 1]
type = TargetBind
trigger1 = Time = 0
pos = 42,0

[State 821, TargetBind 2]
type = TargetBind
trigger1 = (AnimElemTime(2) >= 0) && (AnimElemTime(3) < 0)
pos = 39,0

[State 821, TargetBind 3]
type = TargetBind
trigger1 = (AnimElemTime(3) >= 0) && (AnimElemTime(4) < 0)
pos = 6,-2

[State 821, TargetBind 4]
type = TargetBind
trigger1 = (AnimElemTime(4) >= 0) && (AnimElemTime(5) < 0)
pos = 3,-2

[State 821, TargetBind 5]
type = TargetBind
trigger1 = (AnimElemTime(5) >= 0) && (AnimElemTime(6) < 0)
pos = -11,-2

[State 821, TargetState]
type = TargetState
trigger1 = AnimElemTime(6) = 0
value = ifelse(PalNo > 6, 832, 831)

[State 821, Grab Sound]
type = PlaySnd
trigger1 = Time = 0
value = 20,3

[State 821, Yell 1]
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = 30,0
channel = 0

[State 821, Yell 2]
type = PlaySnd
trigger1 = AnimElemTime(6) = 0
value = 30,1
channel = 0

[State 821, PowerAdd]
type = PowerAdd
trigger1 = AnimElemTime(6) = 0
value = 60

[State 821, Hurt]
type = TargetLifeAdd
trigger1 = AnimElemTime(6) = 0
value = ifelse(PalNo > 6, -160, -80)

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

;---------------------------------------------------------------------------
;Throw K (thrown state for opponent)

[Statedef 830]
type    = A
movetype= H
physics = N
velset = 0,0

[State 830, SprPriority]
type = SprPriority
trigger1 = AnimElemTime(4) = 0
value = 3

[State 830, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 830

;---------------------------------------------------------------------------
;Throw K (opponent fly away - MSH)

[Statedef 831]
type    = A
movetype= H
physics = N
velset = 2.2,-11
poweradd = 60
sprpriority = 0

[State 831, VelAdd]
type = VelAdd
trigger1 = 1
y = 0.42

[State 831, Turn]
type = Turn
trigger1 = Time = 0

[State 831, PosAdd]
type = PosAdd
trigger1 = Time = 0
x = 11
y = -32

[State 831, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (SelfAnimExist(5051))
value = 5051

[State 831, ChangeAnim 2]
type = ChangeAnim
trigger1 = (Vel Y >= 0) && (SelfAnimExist(5061)) && (Anim != 5061)
value = 5061

[State 831, ChangeAnim2 1]
type = ChangeAnim2
trigger1 = (Time = 0) && (!SelfAnimExist(5051))
value = 831

[State 831, ChangeAnim2 2]
type = ChangeAnim2
trigger1 = (Vel Y >= 0) && (!SelfAnimExist(5061)) && (Anim != 832)
value = 832

[State 831, SelfState]
type = SelfState
trigger1 = (Pos Y >= 0) && (Vel Y > 0)
value = 5100
ctrl = 0

;---------------------------------------------------------------------------
;Throw K (opponent fly away - MvC)

[Statedef 832]
type    = A
movetype= H
physics = N
velset = 4,-13
poweradd = 60
sprpriority = 0

[State 832, VelAdd]
type = VelAdd
trigger1 = 1
y = 0.49

[State 832, Turn]
type = Turn
trigger1 = Time = 0

[State 832, PosAdd]
type = PosAdd
trigger1 = Time = 0
x = 11
y = -32

[State 832, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (SelfAnimExist(5051))
value = 5051

[State 832, ChangeAnim 2]
type = ChangeAnim
trigger1 = (Vel Y >= 0) && (SelfAnimExist(5061)) && (Anim != 5061)
value = 5061

[State 832, ChangeAnim2 1]
type = ChangeAnim2
trigger1 = (Time = 0) && (!SelfAnimExist(5051))
value = 831

[State 832, ChangeAnim2 2]
type = ChangeAnim2
trigger1 = (Vel Y >= 0) && (!SelfAnimExist(5061)) && (Anim != 832)
value = 832

[State 832, SelfState]
type = SelfState
trigger1 = Vel Y >= 0
value = 5040
ctrl = 1

;---------------------------------------------------------------------------
;Air Throw P (attempt)

[Statedef 850]
type    = A
movetype= A
physics = A
juggle  = 0
ctrl = 0
;anim = 850
sprpriority = 2

[State 850, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 850

[State 850, HitDef]
type = HitDef
trigger1 = Time = 0
attr = A, NT
hitflag = A-
priority = 1, Miss
sparkno = -1
sprpriority = 2
p1facing = ifelse (command = "holdfwd", 1, -1)
p2facing = 1
p1stateno = 851
p2stateno = 860
guard.dist = 0
fall.xvelocity = 0
fall.yvelocity = 0
fall = 1
fall.recover = 0
fall.damage = 80

[State 850, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1

;---------------------------------------------------------------------------
;Air Throw P (throwing opponent)

[Statedef 851]
type    = A
movetype= A
physics = N
anim = 851
poweradd = 60
velset = 0,0
sprpriority = 0

[State 851, TargetBind 1]
type = TargetBind
trigger1 = Time = 0
pos = 10,0

[State 851, TargetBind 2]
type = TargetBind
trigger1 = (AnimElemTime(2) >= 0) && (AnimElemTime(3) < 0)
pos = 10,0

[State 851, TargetBind 3]
type = TargetBind
trigger1 = (AnimElemTime(3) >= 0) && (AnimElemTime(4) < 0)
pos = 10,0

[State 851, TargetBind 4]
type = TargetBind
trigger1 = (AnimElemTime(4) >= 0) && (AnimElemTime(5) < 0)
pos = 10,0

[State 851, TargetState]
type = TargetState
trigger1 = AnimElemTime(5) = 0
value = 861

[State 851, PowerAdd]
type = PowerAdd
trigger1 = AnimElemTime(5) = 0
value = 60

[State 851, Hurt]
type = TargetLifeAdd
trigger1 = AnimElemTime(5) = 0
value = -80

[State 801, Width]
type = Width
trigger1 = AnimElemTime(1) >= 0
edge = 40,0

[State 851, Grab Sound]
type = PlaySnd
trigger1 = Time = 0
value = 20,3

[State 851, Yell]
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = 30,0
channel = 0

[State 851, Hit Sound]
type = PlaySnd
trigger1 = AnimElemTime(5) = 0
value = 20,2

[State 851, Hit Explod]
type = Explod
trigger1 = AnimElemTime(5) = 0
anim = 8010
postype = P1
pos = 10,-90
sprpriority = 5

[State 851, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 852
ctrl = 0

;---------------------------------------------------------------------------
;Air Throw P (falling)

[Statedef 852]
type    = A
movetype= I
physics = A
;anim = 852
poweradd = 0
sprpriority = 0

[State 852, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 852

[State 852, Super Jump HoldFwd]
type = VelAdd
triggerall = (Var(10) = 1) && (Vel X <= 4)
trigger1 = command = "holdfwd"
x = 0.25

[State 852, Super Jump HoldBack]
type = VelAdd
triggerall = (Var(10) = 1) && (Vel X >= -3)
trigger1 = command = "holdback"
x = -0.1

[State 852, Super Jump CtrlSet]
type = CtrlSet
trigger1 = (AnimElemTime(1) = 0) && (Var(10) = 1)
value = 1

;---------------------------------------------------------------------------
;Air Throw P (thrown state for opponent)

[Statedef 860]
type    = A
movetype= H
physics = N
poweradd = 60
velset = 0,0
sprpriority = -1

[State 860, SprPriority]
type = SprPriority
trigger1 = AnimElemTime(1) = 2
value = 1

[State 860, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 860

;---------------------------------------------------------------------------
;Air Throw P (opponent going down)

[Statedef 861]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = 1

[State 861, PosAdd]
type = PosAdd
trigger1 = Time = 0
x = -23
y = -44

[State 861, VelSet]
type = VelSet
trigger1 = Time = 1
y = 11

[State 861, VelAdd]
type = VelAdd
trigger1 = 1
y = 0.39

[State 861, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 861, Turn]
type = Turn
trigger1 = Time = 0

[State 861, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 861

[State 861, EnvShake]
type = EnvShake
trigger1 = Pos Y >= 0
time = 15
freq = 80
ampl = -6

[State 861, SprPriority]
type = SprPriority
trigger1 = Pos Y >= 0
value = 0

[State 861, SelfState]
type = SelfState
trigger1 = (Pos Y >= 0) && (Vel Y > 0)
value = 5100
ctrl = 0

;---------------------------------------------------------------------------
; Recovery Roll
[Statedef 900]
type    = C
movetype= I
physics = N
poweradd= 0
velset = 0,0
ctrl = 0
anim = 900
sprpriority = -2

[State 900, PlayerPush]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 900, VelSet 1]
type = VelSet
trigger1 = AnimElemTime(2) = 0
x = 8

[State 900, VelSet 2]
type = VelSet
trigger1 = AnimTime = 0
x = 0

[State 900, PosSet]
type = PosSet
trigger1 = Time >= 0
y = 0

[State 900, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

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

;---------------------------------------------------------------------------
; Infinite Counter (ground)

[Statedef 950]
type    = S
movetype= A
physics = S
ctrl = 0
poweradd = 0
sprpriority = 2

[State 950, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 950

[State 950, SuperPause]
type = SuperPause
trigger1 = AnimElemTime(1) = 0
time = 25
anim = S8190
poweradd = -1000
pos = 46,-89
sound = S70,1

[State 950, Pause]
type = Pause
trigger1 = AnimElemTime(1) = 1
time = 7

[State 950, VarSet 1]
type = VarSet
trigger1 = Time = 0
v = 15
value = 0

[State 950, VarSet 2]
type = VarSet
trigger1 = MoveContact = 1
v = 15
value = 1

[State 950, VelSet]
type = VelSet
trigger1 = 1
x = 0

[State 950, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 950, PlaySnd];"Stars N' Stripes"
type = PlaySnd
trigger1 = AnimElemTime(2) = 0
value = 35,1
channel = 0

[State 950, PlaySnd];"Counter"
type = PlaySnd
trigger1 = Time = 0
value = 40,1

[State 950, HitDef 1]
type = HitDef
trigger1 = AnimElem = 2
attr = S, SA
damage = 120,15
getpower = 0
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 7, Hit
pausetime = 9,9
guard.pausetime = 8,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = 0,-40
hitsound = S20,0
guardsound = S20,4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -5,-4
guard.velocity = -9
airguard.velocity = -5,-1
air.type = High
air.velocity = -5,-4
down.bounce = 0
down.velocity = -4,-4
fall.xvelocity = 0
fall.yvelocity = 0
fall = 1
fall.recover = 0

[State 950, Special Move Dust]
type = Explod
anim = 8031
trigger1 = (PalNo > 6) && (Time = 1)
postype = P1
pos = 20,2
ownpal = 1
sprpriority = 5

[State 950, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 951

;---------------------------------------------------------------------------
; Infinite Counter (air - rising)

[Statedef 951]
type    = A
movetype= A
physics = N
juggle  = 5
ctrl = 0
;anim = 951
sprpriority = 2
ctrl = 0

[State 951, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 951

[State 951, PosAdd 1]
type = PosAdd
trigger1 = Time = 0
x = 50
y = -5

[State 951, PosAdd 2]
type = PosAdd
trigger1 = Time = 1
x = 2
y = -9

[State 951, PosAdd 3]
type = PosAdd
trigger1 = Time = 2
x = 2
y = -8

[State 951, PosAdd 4]
type = PosAdd
trigger1 = Time = 3
x = 2
y = -9

[State 951, PosAdd 5]
type = PosAdd
trigger1 = Time = 4
x = 0
y = -3

[State 951, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 951, VarSet)
type = VarSet
trigger1 = AnimTime = 0
v = 15
value = 0

[State 951, HitDef]
type = HitDef
trigger1 = (AnimElem = 1) && (Var(15) = 0)
attr = A, SA
damage = 120,150
getpower = 0
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 7, Hit
pausetime = 9,9
guard.pausetime = 8,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = 0,-100
hitsound = S20,0
guardsound = S20,4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -5,-4
guard.velocity = -9
airguard.velocity = -5,-1
air.type = Low
air.velocity = -5,-3
down.bounce = 0
down.velocity = -4,-4
fall.xvelocity = 0
fall.yvelocity = 0
fall = 1
fall.recover = 0

[State 951, Explod]
type = Explod
trigger1 = Time = 0
anim = 8065
id = 8065
postype = P1
pos = 0,0
ownpal = 1
sprpriority = 4
bindtime = -1
removetime = -1
removeongethit = 1

[State 951, RemoveExplod]
type = RemoveExplod
trigger1 = AnimTime = 0
id = 8065

[State 951, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 952
ctrl = 0

;---------------------------------------------------------------------------
; Infinite Counter (air - falling)

[Statedef 952]
type    = A
movetype= I
physics = N
ctrl = 0
;anim = 952
velset = 0,0
sprpriority = 2

[State 952, PosAdd 1]
type = PosAdd
trigger1 = Time = 0
x = 0
y = -4

[State 952, PosAdd 2]
type = PosAdd
trigger1 = Time = [1,2]
x = 0
y = -2

[State 952, PosAdd 3]
type = PosAdd
trigger1 = Time = [3,5]
x = 0
y = -1

[State 952, PosAdd 4]
type = PosAdd
trigger1 = Time = [6,7]
x = 0
y = 0

[State 952, PosAdd 5]
type = PosAdd
trigger1 = Time = 8
x = 0
y = 2

[State 952, PosAdd 6]
type = PosAdd
trigger1 = Time = [9,11]
x = 0
y = 1

[State 952, PosAdd 7]
type = PosAdd
trigger1 = Time = 12
x = 0
y = 0

[State 952, PosAdd 8]
type = PosAdd
trigger1 = Time = 13
x = 0
y = 2

[State 952, PosAdd 9]
type = PosAdd
trigger1 = Time = [14,15]
x = 0
y = 3

[State 952, PosAdd 10]
type = PosAdd
trigger1 = Time = 16
x = 0
y = 2

[State 952, PosAdd 11]
type = PosAdd
trigger1 = Time = [17,18]
x = 0
y = 4

[State 952, PosAdd 12]
type = PosAdd
trigger1 = Time = 19
x = 0
y = 5

[State 952, PosAdd 13]
type = PosAdd
trigger1 = Time = [20,22]
x = 0
y = 6

[State 952, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 952

[State 952, ChangeState]
type = ChangeState
trigger1 = (Pos Y >= 0) && (Time >= 23)
value = 52

;---------------------------------------------------------------------------
; Dizzy (flying up)

[Statedef 970]
type    = A
movetype= H
physics = N
ctrl = 0
anim = 5250
poweradd = 0
velset = -2,-15.5
sprpriority = 1

[State 970, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 970, VelAdd]
type = VelAdd
trigger1 = 1
y = 0.46

[State 970, VarSet]
type = VarSet
trigger1 = Time = 0
v = 35
value = 0

[State 970, ChangeAnim]
type = ChangeAnim
trigger1 = (Vel Y >= 0) && (Anim != 5251)
value = 5251

[State 970, ChangeState]
type = ChangeState
trigger1 = (Pos Y >= 0) && (Vel Y > 0)
value = 971

;---------------------------------------------------------------------------
; Dizzy (just hit ground)

[Statedef 971]
type    = S
movetype= I
physics = S
ctrl = 0
poweradd = 0
velset = 0,0
sprpriority = 0

[State 971, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 0
value = 105
elem = 2

[State 971, PosSet]
type = PosSet
trigger1 = Time = 0
y = 0

[State 971, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 971, HitGround Snd]
type = PlaySnd
trigger1 = Time = 0
value = 22,1

[State 971, Slam Explod A]
type = Explod
trigger1 = (Time = 0) && (PalNo > 6)
anim = 8000
ID = 8000
postype = P1
pos = 0,3
sprpriority = -1

[State 971, Slam Explod B]
type = Explod
trigger1 = (Time = 0) && (PalNo > 6)
anim = 8001
ID = 8001
postype = P1
pos = 0,3
sprpriority = 2

[State 971, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 972

;---------------------------------------------------------------------------
; Dizzy (on ground - dizzy)

[Statedef 972]
type    = S
movetype= I
physics = S
ctrl = 0
poweradd = 0
anim = 5300
velset = 0,0
sprpriority = 0

[State 972, Dizzy Snd]
type = PlaySnd
trigger1 = Time = 0
value = 31,2

[State 972, Dizzy FX]
type = Explod
trigger1 = Time = 0
anim = 8196
id = 8196
postype = P1
pos = 20,0
ownpal = 1
sprpriority = 4
facing = -1
bindtime = -1
removetime = -1
removeongethit = 1

[State 972, RemoveExplod]
type = RemoveExplod
trigger1 = Time = 140
id = 8196

[State 972, ChangeState]
type = ChangeState
trigger1 = Time = 140
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Shield Grab High
[Statedef 990]
type    = S
movetype= I
physics = S
poweradd= 0
velset = 0,0
ctrl = 1
;anim = 990
sprpriority = 2

[State 990, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 990

[State 990, Shield Grab VarSet Reset]
type = VarSet
trigger1 = Time = 0
v = 31
value = 0

[State 990, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------
; Shield Grab Low
[Statedef 995]
type    = S
movetype= I
physics = S
poweradd= 0
velset = 0,0
ctrl = 1
;anim = 995
sprpriority = 2

[State 995, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 995

[State 995, Shield Grab VarSet Reset]
type = VarSet
trigger1 = Time = 0
v = 31
value = 0

[State 995, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;===========================================================================
;---------------------------------------------------------------------------
;Special Attacks
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; Shield Slash X

[Statedef 1000]
type    = S
movetype= A
physics = S
juggle  = 5
poweradd= 100
velset = 0,0
;anim = 1000
ctrl = 0
sprpriority = 2

[State 1000, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 1000

[State 1000, PlaySnd] ;"Shield Slash"
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = 35,0
channel = 0

[State 1000, Whoosh]
type = PlaySnd
trigger1 = AnimElemTime(5) = 0
value = 21,4

[State 1000, Shield VarSet]
type = VarSet
trigger1 = (AnimElemTime(5) = 0) && (MoveContact = 0)
v = 59
value = 0

[State 1000, HitDef]
type = HitDef
triggerall = Var(40) != 12
trigger1 = AnimElem = 4
attr = S, SP
damage = 100,10
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 1,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = 15,-32
hitsound = S20,0
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -9
guard.velocity = -11
air.type = Low
air.velocity = -7,-1.5
down.bounce = 1
down.velocity = -4,-4

[State 1000, Power Gem HitDef]
type = HitDef
triggerall = Var(40) = 12
trigger1 = AnimElem = 4
attr = S, SP
damage = 100,10
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 1,9
sparkno = S8016
guard.sparkno = S8021
sparkxy = 15,-32
hitsound = S20,0
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -9
guard.velocity = -11
air.type = Low
air.velocity = -7,-1.5
down.bounce = 1
down.velocity = -4,-4

[State 1000, Special Move Dust]
type = Explod
anim = 8031
trigger1 = (PalNo > 6) && (Time = 1)
postype = P1
pos = 5,2
ownpal = 1
sprpriority = 5

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

;---------------------------------------------------------------------------
; Shield Slash Y

[Statedef 1010]
type    = S
movetype= A
physics = S
juggle  = 5
poweradd= 100
velset = 0,0
;anim = 1010
ctrl = 0
sprpriority = 2

[State 1010, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 1010

[State 1010, PlaySnd] ;"Shield Slash"
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = 35,0
channel = 0

[State 1010, Whoosh]
type = PlaySnd
trigger1 = AnimElemTime(6) = 0
value = 21,4

[State 1010, Shield VarSet]
type = VarSet
trigger1 = (AnimElemTime(6) = 0) && (MoveContact = 0)
v = 59
value = 0

[State 1010, HitDef]
type = HitDef
trigger1 = AnimElem = 5
attr = S, SP
damage = 100,10
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 1,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = 15,-82
hitsound = S20,0
guardsound = S20,4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -9
guard.velocity = -11
air.type = Low
air.velocity = -7,-1.5
down.bounce = 1
down.velocity = -4,-4

[State 1010, Special Move Dust]
type = Explod
anim = 8031
trigger1 = (PalNo > 6) && (Time = 1)
postype = P1
pos = 5,2
ownpal = 1
sprpriority = 5

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

;---------------------------------------------------------------------------
; Shield Slash Z

[Statedef 1020]
type    = S
movetype= A
physics = S
juggle  = 5
poweradd= 100
velset = 0,0
;anim = 1020
ctrl = 0
sprpriority = 2

[State 1020, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 1020

[State 1020, PlaySnd] ;"Shield Slash"
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = 35,0
channel = 0

[State 1020, Whoosh]
type = PlaySnd
trigger1 = AnimElemTime(5) = 0
value = 21,4

[State 1020, Shield VarSet]
type = VarSet
trigger1 = (AnimElemTime(5) = 0) && (MoveContact = 0)
v = 59
value = 0

[State 1020, HitDef]
type = HitDef
triggerall = Var(40) != 12
trigger1 = AnimElem = 4
attr = S, SP
damage = 100,10
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 1,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = 15,-77
hitsound = S20,0
guardsound = S20,4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -9
guard.velocity = -11
air.type = Low
air.velocity = -7,-1.5
down.bounce = 1
down.velocity = -4,-4

[State 1020, Power Gem HitDef]
type = HitDef
triggerall = Var(40) = 12
trigger1 = AnimElem = 4
attr = S, SP
damage = 100,10
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 1,9
sparkno = S8016
guard.sparkno = S8021
sparkxy = 10,-75
hitsound = S20,0
guardsound = S20,4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -9
guard.velocity = -11
air.type = Low
air.velocity = -7,-1.5
down.bounce = 1
down.velocity = -4,-4

[State 1020, Special Move Dust]
type = Explod
anim = 8031
trigger1 = (PalNo > 6) && (Time = 1)
postype = P1
pos = 5,2
ownpal = 1
sprpriority = 5

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

;---------------------------------------------------------------------------
; Power Gem Shield Slash Y

[Statedef 1060]
type    = S
movetype= A
physics = S
juggle  = 5
poweradd= 100
velset = 0,0
;anim = 1060
ctrl = 0
sprpriority = 2

[State 1060, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 1060

[State 1060, PlaySnd] ;"Shield Slash"
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = 35,0
channel = 0

[State 1060, Whoosh]
type = PlaySnd
trigger1 = AnimElemTime(4) = 0
value = 21,4

[State 1060, Shield VarSet]
type = VarSet
trigger1 = (AnimElemTime(4) = 0) && (MoveContact = 0)
v = 59
value = 0

[State 1060, HitDef]
type = HitDef
trigger1 = AnimElem = 3
attr = S, SP
damage = 100,10
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 1,9
sparkno = S8016
guard.sparkno = S8021
sparkxy = -5,-65
hitsound = S20,0
guardsound = S20,4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -9
guard.velocity = -11
air.type = Low
air.velocity = -7,-1.5
down.bounce = 1
down.velocity = -4,-4

[State 1060, Special Move Dust]
type = Explod
anim = 8031
trigger1 = (PalNo > 6) && (Time = 1)
postype = P1
pos = 5,2
ownpal = 1
sprpriority = 5

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

;---------------------------------------------------------------------------
; Air Shield Slash X

[Statedef 1100]
type    = A
movetype= A
physics = N
juggle  = 5
poweradd= 100
;anim = 1100
ctrl = 0
sprpriority = 2

[State 1100, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 1100

;-------| Velocity |-----------------------
[State 1100, VelSet]
type = VelSet
triggerall = Var(10) != 1
trigger1 = (Time = 0) && (Vel Y <= 2.4)
y = 2.4

[State 1100, non-Superjump VelMul]
type = VelMul
triggerall = Var(10) != 1
trigger1 = Time = 0
y = 0.3

[State 1100, Superjump VelMul]
type = VelMul
triggerall = Var(10) = 1
trigger1 = Time = 0
y = ifelse(Vel Y <= 0, 0.1, 0.15)

[State 1100, VelMul]
type = VelMul
trigger1 = Time = 0
x = 0.1

[State 1100, non-Superjump VelAdd]
type = VelAdd
triggerall = Var(10) != 1
trigger1 = AnimElemTime(10) >= 0
y = 0.39

[State 1100, Superjump VelAdd]
type = VelAdd
triggerall = Var(10) = 1
trigger1 = AnimElemTime(10) >= 0
y = 0.34

[State 1100, VelSet];so Cap doesn't fall through floor
type = VelSet
trigger1 = (Pos Y >= 10)
x = 0
y = 0
;-------| Velocity |-----------------------

[State 1100, PlaySnd] ;"Shield Slash"
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = 35,0
channel = 0

[State 1100, Whoosh]
type = PlaySnd
trigger1 = AnimElemTime(5) = 0
value = 21,4

[State 1100, Shield VarSet]
type = VarSet
trigger1 = (AnimElemTime(5) = 0) && (MoveContact = 0)
v = 59
value = 0

[State 1100, HitDef]
type = HitDef
triggerall = Var(40) != 12
trigger1 = AnimElem = 4
attr = S, SP
damage = 100,10
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 1,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = 0,-60
hitsound = S20,0
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -9
guard.velocity = -11
air.type = Low
air.velocity = -7,-1.5
down.bounce = 1
down.velocity = -4,-4

[State 1100, Power Gem HitDef]
type = HitDef
triggerall = Var(40) = 12
trigger1 = AnimElem = 4
attr = S, SP
damage = 100,10
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 1,9
sparkno = S8016
guard.sparkno = S8021
sparkxy = 0,-60
hitsound = S20,0
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -9
guard.velocity = -11
air.type = Low
air.velocity = -7,-1.5
down.bounce = 1
down.velocity = -4,-4

[State 1100, ChangeState]
type = ChangeState
trigger1 = (Pos Y >= 0) && (AnimElemTime(10) >= 0)
value = 52

[State 1100, Super Jump HoldFwd]
type = VelAdd
triggerall = (Var(10) = 1) && (Vel X <= 4) && (AnimElemTime(10) >= 0)
trigger1 = command = "holdfwd"
x = 0.25

[State 1100, Super Jump HoldBack]
type = VelAdd
triggerall = (Var(10) = 1) && (Vel X >= -3) && (AnimElemTime(10) >= 0)
trigger1 = command = "holdback"
x = -0.1

[State 1100, Super Jump CtrlSet]
type = CtrlSet
trigger1 = (AnimElemTime(10) = 0) && (Var(10) = 1)
value = 1

;---------------------------------------------------------------------------
; Air Shield Slash Y

[Statedef 1110]
type    = A
movetype= A
physics = N
juggle  = 5
poweradd= 100
;anim = 1110
ctrl = 0
sprpriority = 2

[State 1110, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 1110

;-------| Velocity |-----------------------
[State 1110, VelSet]
type = VelSet
triggerall = Var(10) != 1
trigger1 = (Time = 0) && (Vel Y <= 2.4)
y = 2.4

[State 1110, non-Superjump VelMul]
type = VelMul
triggerall = Var(10) != 1
trigger1 = Time = 0
y = 0.3

[State 1110, Superjump VelMul]
type = VelMul
triggerall = Var(10) = 1
trigger1 = Time = 0
y = ifelse(Vel Y <= 0, 0.1, 0.15)

[State 1110, VelMul]
type = VelMul
trigger1 = Time = 0
x = 0.1

[State 1110, non-Superjump VelAdd]
type = VelAdd
triggerall = Var(10) != 1
trigger1 = AnimElemTime(10) >= 0
y = 0.39

[State 1110, Superjump VelAdd]
type = VelAdd
triggerall = Var(10) = 1
trigger1 = AnimElemTime(10) >= 0
y = 0.34

[State 1110, VelSet];so Cap doesn't fall through floor
type = VelSet
trigger1 = (Pos Y >= 10)
x = 0
y = 0
;-------| Velocity |-----------------------

[State 1110, PlaySnd] ;"Shield Slash"
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = 35,0
channel = 0

[State 1110, Whoosh]
type = PlaySnd
trigger1 = AnimElemTime(5) = 0
value = 21,4

[State 1110, Shield VarSet]
type = VarSet
trigger1 = (AnimElemTime(5) = 0) && (MoveContact = 0)
v = 59
value = 0

[State 1110, HitDef]
type = HitDef
triggerall = Var(40) != 12
trigger1 = AnimElem = 4
attr = S, SP
damage = 100,10
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 1,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = 15,-92
hitsound = S20,0
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -9
guard.velocity = -11
air.type = Low
air.velocity = -7,-1.5
down.bounce = 1
down.velocity = -4,-4

[State 1110, Power Gem HitDef]
type = HitDef
triggerall = Var(40) = 12
trigger1 = AnimElem = 4
attr = S, SP
damage = 100,10
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 1,9
sparkno = S8016
guard.sparkno = S8021
sparkxy = 15,-92
hitsound = S20,0
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -9
guard.velocity = -11
air.type = Low
air.velocity = -7,-1.5
down.bounce = 1
down.velocity = -4,-4

[State 1110, ChangeState]
type = ChangeState
trigger1 = (Pos Y >= 0) && (AnimElemTime(10) >= 0)
value = 52

[State 1110, Super Jump HoldFwd]
type = VelAdd
triggerall = (Var(10) = 1) && (Vel X <= 4) && (AnimElemTime(10) >= 0)
trigger1 = command = "holdfwd"
x = 0.25

[State 1110, Super Jump HoldBack]
type = VelAdd
triggerall = (Var(10) = 1) && (Vel X >= -3) && (AnimElemTime(10) >= 0)
trigger1 = command = "holdback"
x = -0.1

[State 1110, Super Jump CtrlSet]
type = CtrlSet
trigger1 = (AnimElemTime(10) = 0) && (Var(10) = 1)
value = 1

;---------------------------------------------------------------------------
; Air Shield Slash Z

[Statedef 1120]
type    = A
movetype= A
physics = N
juggle  = 5
poweradd= 100
;anim = 1120
ctrl = 0
sprpriority = 2

[State 1120, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 1120

;-------| Velocity |-----------------------
[State 1120, VelSet]
type = VelSet
triggerall = Var(10) != 1
trigger1 = (Time = 0) && (Vel Y <= 2.4)
y = 2.4

[State 1120, non-Superjump VelMul]
type = VelMul
triggerall = Var(10) != 1
trigger1 = Time = 0
y = 0.3

[State 1120, Superjump VelMul]
type = VelMul
triggerall = Var(10) = 1
trigger1 = Time = 0
y = ifelse(Vel Y <= 0, 0.1, 0.15)

[State 1120, VelMul]
type = VelMul
trigger1 = Time = 0
x = 0.1

[State 1120, non-Superjump VelAdd]
type = VelAdd
triggerall = Var(10) != 1
trigger1 = AnimElemTime(10) >= 0
y = 0.39

[State 1120, Superjump VelAdd]
type = VelAdd
triggerall = Var(10) = 1
trigger1 = AnimElemTime(10) >= 0
y = 0.34

[State 1120, VelSet];so Cap doesn't fall through floor
type = VelSet
trigger1 = (Pos Y >= 10)
x = 0
y = 0
;-------| Velocity |-----------------------

[State 1120, PlaySnd] ;"Shield Slash"
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = 35,0
channel = 0

[State 1120, Whoosh]
type = PlaySnd
trigger1 = AnimElemTime(5) = 0
value = 21,4

[State 1120, Shield VarSet]
type = VarSet
trigger1 = (AnimElemTime(5) = 0) && (MoveContact = 0)
v = 59
value = 0

[State 1125, HitDef]
type = HitDef
triggerall = Var(40) != 12
trigger1 = AnimElem = 4
attr = S, SP
damage = 100,10
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 1,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = 0,-125
hitsound = S20,0
guardsound = S20,4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -9
guard.velocity = -11
air.type = Low
air.velocity = -7,-1.5
down.bounce = 1
down.velocity = -4,-4

[State 1125, Power Gem HitDef]
type = HitDef
triggerall = Var(40) = 12
trigger1 = AnimElem = 4
attr = S, SP
damage = 100,10
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 1,9
sparkno = S8016
guard.sparkno = S8021
sparkxy = 0,-125
hitsound = S20,0
guardsound = S20,4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -9
guard.velocity = -11
air.type = Low
air.velocity = -7,-1.5
down.bounce = 1
down.velocity = -4,-4

[State 1120, ChangeState]
type = ChangeState
trigger1 = (Pos Y >= 0) && (AnimElemTime(10) >= 0)
value = 52

[State 1120, Super Jump HoldFwd]
type = VelAdd
triggerall = (Var(10) = 1) && (Vel X <= 4) && (AnimElemTime(10) >= 0)
trigger1 = command = "holdfwd"
x = 0.25

[State 1120, Super Jump HoldBack]
type = VelAdd
triggerall = (Var(10) = 1) && (Vel X >= -3) && (AnimElemTime(10) >= 0)
trigger1 = command = "holdback"
x = -0.1

[State 1120, Super Jump CtrlSet]
type = CtrlSet
trigger1 = (AnimElemTime(10) = 0) && (Var(10) = 1)
value = 1

;---------------------------------------------------------------------------
; Stars N' Stripes X (ground)

[Statedef 1200]
type    = S
movetype= A
physics = S
juggle  = 5
ctrl = 0
;anim = 1200
poweradd = 110
sprpriority = 2

[State 1200, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 1200

[State 1200, VarSet 1]
type = VarSet
trigger1 = Time = 0
v = 15
value = 0

[State 1200, VarSet 2]
type = VarSet
trigger1 = MoveContact = 1
v = 15
value = 1

[State 1200, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 1200, PlaySnd];"Stars N' Stripes"
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = 35,1
channel = 0

[State 1200, HitDef MSH 1]
type = HitDef
triggerall = PalNo <= 6
trigger1 = (AnimElem = 2) && (P2StateNo != [5070,5071])
attr = S, SA
damage = ifelse(P2StateNo = 5050, 70, 140),15
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 9,9
guard.pausetime = 8,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = 0,-40
hitsound = S20,2
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -3.5,-8
guard.velocity = -9
airguard.velocity = -5,-1
air.type = Low
air.velocity = -3.5,-8
down.bounce = 1
down.velocity = -4,-4
fall = ifelse(Var(59) = 1, 1, 0)
fall.recover = 0

[State 1200, HitDef MSH 2]
type = HitDef
triggerall = PalNo <= 6
trigger1 = (AnimElem = 3) && (MoveContact = 0) && (P2StateNo != [5070,5071])
attr = S, SA
damage = ifelse(P2StateNo = 5050, 70, 140),15
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 9,9
guard.pausetime = 8,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = 0,-80
hitsound = S20,2
guardsound = S20,4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -3.5,-8
guard.velocity = -9
airguard.velocity = -5,-1
air.type = Low
air.velocity = -3.5,-8
down.bounce = 1
down.velocity = -4,-4
fall = ifelse(Var(59) = 1, 1, 0)
fall.recover = 0

[State 1200, HitDef MvC 1]
type = HitDef
triggerall = PalNo > 6
trigger1 = (AnimElem = 2) && (P2StateNo != [5070,5071])
attr = S, SA
damage = ifelse(P2StateNo = 5050, 70, 140),15
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 9,9
guard.pausetime = 8,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = 0,-40
hitsound = S20,2
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -5,-16
guard.velocity = -9
airguard.velocity = -5,-1
air.type = Low
air.velocity = -5,-10
down.bounce = 1
down.velocity = -4,-4
yaccel = 0.45

[State 1200, HitDef MvC 2]
type = HitDef
triggerall = PalNo > 6
trigger1 = (AnimElem = 3) && (MoveContact = 0) && (P2StateNo != [5070,5071])
attr = S, SA
damage = ifelse(P2StateNo = 5050, 70, 140),15
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 9,9
guard.pausetime = 8,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = 0,-80
hitsound = S20,2
guardsound = S20,4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -5,-16
guard.velocity = -9
airguard.velocity = -5,-1
air.type = Low
air.velocity = -5,-10
down.bounce = 1
down.velocity = -4,-4
yaccel = 0.45

[State 1200, Special Move Dust]
type = Explod
anim = 8031
trigger1 = (PalNo > 6) && (Time = 1)
postype = P1
pos = 20,2
ownpal = 1
sprpriority = 5

[State 1200, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 1201

;---------------------------------------------------------------------------
; Stars N' Stripes X (air - rising)

[Statedef 1201]
type    = A
movetype= A
physics = N
juggle  = 5
ctrl = 0
;anim = 1201
sprpriority = 2
ctrl = 0

[State 1201, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 1201

[State 1201, PosAdd]
type = PosAdd
trigger1 = Time = 0
x = 52
y = -7

[State 1201, VelSet]
type = VelSet
trigger1 = Time = 1
x = 3
y = -6.2

[State 1201, VelAdd]
type = VelAdd
trigger1 = (Time >= 0) && (Vel X > 0)
x = -0.3

[State 1201, VelSet]
type = VelSet
trigger1 = AnimElemTime(1) = 10
x = 0
y = 0

[State 1201, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 1201, VarSet)
type = VarSet
trigger1 = AnimTime = 0
v = 15
value = 0

[State 1201, HitDef MSH]
type = HitDef
triggerall = PalNo <= 6
trigger1 = (AnimElem = 1) && (Var(15) = 0) && (P2StateNo != [5070,5071])
attr = A, SA
damage = ifelse(P2StateNo = 5050, 70, 140),15
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 9,9
guard.pausetime = 8,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = 0,-100
hitsound = S20,2
guardsound = S20,4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -3.5,-8
guard.velocity = -9
airguard.velocity = -5,-1
air.type = Low
air.velocity = -3.5,-4
down.bounce = 1
down.velocity = -4,-4
fall = ifelse(Var(59) = 1, 1, 0)
fall.recover = 0

[State 1201, HitDef MvC]
type = HitDef
triggerall = PalNo > 6
trigger1 = (AnimElem = 1) && (Var(15) = 0) && (P2StateNo != [5070,5071])
attr = A, SA
damage = ifelse(P2StateNo = 5050, 70, 140),15
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 9,9
guard.pausetime = 8,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = 0,-100
hitsound = S20,2
guardsound = S20,4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -5,-16
guard.velocity = -9
airguard.velocity = -5,-1
air.type = Low
air.velocity = -5,-10
down.bounce = 1
down.velocity = -4,-4
yaccel = 0.45

[State 1201, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 1202
ctrl = 0

;---------------------------------------------------------------------------
; Stars N' Stripes X (air - falling)

[Statedef 1202]
type    = A
movetype= I
physics = N
juggle  = 5
ctrl = 0
;anim = 1202
velset = 0,0
sprpriority = 2

[State 1202, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 1202

[State 1202, VelAdd]
type = VelAdd
trigger1 = 1
y = 0.39

[State 1202, ChangeState]
type = ChangeState
trigger1 = Pos Y >= 0
value = 52

;---------------------------------------------------------------------------
; Stars N' Stripes Y (ground)

[Statedef 1210]
type    = S
movetype= A
physics = S
juggle  = 5
ctrl = 0
;anim = 1200
poweradd = 110
sprpriority = 2

[State 1210, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 1200

[State 1210, VarSet 1]
type = VarSet
trigger1 = Time = 0
v = 15
value = 0

[State 1210, VarSet 2]
type = VarSet
trigger1 = MoveContact = 1
v = 15
value = 1

[State 1210, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 1210, PlaySnd];"Stars N' Stripes"
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = 35,1
channel = 0

[State 1210, Shield HitDef MSH 1]
type = HitDef
triggerall = (Var(59) = 1) && (PalNo <= 6)
trigger1 = (AnimElem = 2) && (P2StateNo != [5070,5071])
attr = S, SA
damage = ifelse(P2StateNo = 5050, 75, 150),15
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 9,9
guard.pausetime = 8,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = 0,-40
hitsound = S20,2
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -3.5,-8
guard.velocity = -9
airguard.velocity = -5,-1
air.type = Low
air.velocity = -3.5,-8
down.bounce = 1
down.velocity = -4,-4
fall = 1
fall.recover = 0

[State 1210, Shield HitDef MSH 2]
type = HitDef
triggerall = (Var(59) = 1) && (PalNo <= 6)
trigger1 = (AnimElem = 3) && (MoveContact = 0) && (P2StateNo != [5070,5071])
attr = S, SA
damage = ifelse(P2StateNo = 5050, 75, 150),15
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 9,9
guard.pausetime = 8,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = 0,-80
hitsound = S20,2
guardsound = S20,4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -3.5,-8
guard.velocity = -9
airguard.velocity = -5,-1
air.type = Low
air.velocity = -3.5,-8
down.bounce = 1
down.velocity = -4,-4
fall = 1
fall.recover = 0

[State 1210, No Shield HitDef MSH 1]
type = HitDef
triggerall = (Var(59) != 1) && (PalNo <= 6)
trigger1 = (AnimElem = 2) && (P2StateNo != [5070,5071])
attr = S, SA
damage = ifelse(P2StateNo = 5050, 25, 50),5
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 9,9
guard.pausetime = 8,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = 0,-40
hitsound = S20,2
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -5,-12
guard.velocity = -9
airguard.velocity = -5,-1
air.type = Low
air.velocity = -5,-12
down.bounce = 1
down.velocity = -5,-12
fall = 0
fall.recover = 0

[State 1210, No Shield HitDef MSH 2]
type = HitDef
triggerall = (Var(59) != 1) && (PalNo <= 6)
trigger1 = (AnimElem = 3) && (P2StateNo != [5070,5071])
attr = S, SA
damage = ifelse(P2StateNo = 5050, 25, 50),5
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 9,9
guard.pausetime = 8,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = 0,-80
hitsound = S20,2
guardsound = S20,4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -5,-12
guard.velocity = -9
airguard.velocity = -5,-1
air.type = Low
air.velocity = -5,-12
down.bounce = 1
down.velocity = -5,-12
fall = 0
fall.recover = 0

[State 1210, HitDef MvC 1]
type = HitDef
triggerall = PalNo > 6
trigger1 = (AnimElem = 2) && (P2StateNo != [5070,5071])
attr = S, SA
damage = ifelse(P2StateNo = 5050, 75, 150),15
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 9,9
guard.pausetime = 8,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = 0,-40
hitsound = S20,2
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -5,-18
guard.velocity = -9
airguard.velocity = -5,-1
air.type = Low
air.velocity = -5,-12
down.bounce = 1
down.velocity = -4,-4
yaccel = 0.45

[State 1210, HitDef MvC 2]
type = HitDef
triggerall = PalNo > 6
trigger1 = (AnimElem = 3) && (MoveContact = 0) && (P2StateNo != [5070,5071])
attr = S, SA
damage = ifelse(P2StateNo = 5050, 75, 150),15
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 9,9
guard.pausetime = 8,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = 0,-80
hitsound = S20,2
guardsound = S20,4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -5,-18
guard.velocity = -9
airguard.velocity = -5,-1
air.type = Low
air.velocity = -5,-12
down.bounce = 1
down.velocity = -4,-4
yaccel = 0.45

[State 1210, Special Move Dust]
type = Explod
anim = 8031
trigger1 = (PalNo > 6) && (Time = 1)
postype = P1
pos = 20,2
ownpal = 1
sprpriority = 5

[State 1210, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 1211

;---------------------------------------------------------------------------
; Stars N' Stripes Y (air - rising)

[Statedef 1211]
type    = A
movetype= A
physics = N
juggle  = 5
ctrl = 0
;anim = 1211
sprpriority = 2
ctrl = 0

[State 1211, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 1211

[State 1211, PosAdd]
type = PosAdd
trigger1 = Time = 0
x = 56
y = -11

[State 1211, VelSet 1]
type = VelSet
trigger1 = Time = 1
x = 4.5
y = -7.5

[State 1211, VelSet]
type = VelSet
trigger1 = AnimElemTime(1) = 14
y = -4

[State 1211, VelAdd]
type = VelAdd
trigger1 = (AnimElemTime(1) = [15,17]) && (Vel Y < 0)
y = 0.8

[State 1211, VelAdd]
type = VelAdd
trigger1 = (Time >= 8) && (Vel X > 0) && (AnimElemTime(1) <= 16)
x = -0.5

[State 1211, VelSet]
type = VelSet
trigger1 = AnimElemTime(1) = 18
x = 0
y = 0

[State 1211, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 1211, VarSet)
type = VarSet
trigger1 = AnimTime = 0
v = 15
value = 0

[State 1211, Shield MSH HitDef]
type = HitDef
triggerall = (Var(59) = 1) && (PalNo <= 6)
trigger1 = (AnimElem = 1) && (Var(15) = 0) && (P2StateNo != [5070,5071])
attr = A, SA
damage = ifelse(P2StateNo = 5050, 75, 150),15
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 9,9
guard.pausetime = 8,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = 0,-100
hitsound = S20,2
guardsound = S20,4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -3.5,-8
guard.velocity = -9
airguard.velocity = -5,-1
air.type = Low
air.velocity = -3.5,-4
down.bounce = 1
down.velocity = -4,-4
fall = 1
fall.recover = 0

[State 1211, No Shield MSH HitDef]
type = HitDef
triggerall = (Var(59) != 1) && (PalNo <= 6)
trigger1 = (AnimElem = 1) && (P2StateNo != [5070,5071])
attr = A, SA
damage = ifelse(P2StateNo = 5050, 25, 50),5
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 9,9
guard.pausetime = 8,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = 0,-100
hitsound = S20,2
guardsound = S20,4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -3.5,-12
guard.velocity = -9
airguard.velocity = -5,-1
air.type = Low
air.velocity = -3.5,-12
down.bounce = 1
down.velocity = -3.5,-12
fall = 0
fall.recover = 0

[State 1211, Shield MvC HitDef]
type = HitDef
triggerall = PalNo > 6
trigger1 = (AnimElem = 1) && (Var(15) = 0) && (P2StateNo != [5070,5071])
attr = A, SA
damage = ifelse(P2StateNo = 5050, 75, 150),15
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 9,9
guard.pausetime = 8,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = 0,-100
hitsound = S20,2
guardsound = S20,4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -5,-18
guard.velocity = -9
airguard.velocity = -5,-1
air.type = Low
air.velocity = -5,-12
down.bounce = 1
down.velocity = -4,-4
yaccel = 0.45

[State 1211, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 1202
ctrl = 0

;---------------------------------------------------------------------------
; Stars N' Stripes Z (ground)

[Statedef 1220]
type    = S
movetype= A
physics = S
juggle  = 5
ctrl = 0
;anim = 1200
poweradd = 110
sprpriority = 2

[State 1220, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 1200

[State 1220, VarSet 1]
type = VarSet
trigger1 = Time = 0
v = 15
value = 0

[State 1220, VarSet 2]
type = VarSet
trigger1 = MoveContact = 1
v = 15
value = 1

[State 1220, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 1220, PlaySnd];"Stars N' Stripes"
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = 35,1
channel = 0

[State 1220, Shield HitDef MSH 1]
type = HitDef
triggerall = (Var(59) = 1) && (PalNo <= 6)
trigger1 = (AnimElem = 2) && (P2StateNo != [5070,5071])
attr = S, SA
damage = ifelse(P2StateNo = 5050, 80, 160),15
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 9,9
guard.pausetime = 8,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = 0,-40
hitsound = S20,2
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -5,-13
guard.velocity = -9
airguard.velocity = -5,-1
air.type = Low
air.velocity = -6,-4
down.bounce = 1
down.velocity = -4,-4
fall = 1
fall.recover = 0

[State 1220, Shield HitDef MSH 2]
type = HitDef
triggerall = (Var(59) = 1) && (PalNo <= 6)
trigger1 = (AnimElem = 3) && (MoveContact = 0) && (P2StateNo != [5070,5071])
attr = S, SA
damage = ifelse(P2StateNo = 5050, 80, 160),15
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 9,9
guard.pausetime = 8,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = 0,-80
hitsound = S20,2
guardsound = S20,4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -5,-13
guard.velocity = -9
airguard.velocity = -5,-1
air.type = Low
air.velocity = -6,-4
down.bounce = 1
down.velocity = -4,-4
fall = 1
fall.recover = 0

[State 1220, No Shield HitDef MSH 1]
type = HitDef
triggerall = (Var(59) != 1) && (PalNo <= 6)
trigger1 = (AnimElem = 2) && (P2StateNo != [5070,5071])
attr = S, SA
damage = ifelse(P2StateNo = 5050, 23, 45),5
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 9,9
guard.pausetime = 8,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = 0,-40
hitsound = S20,2
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -5,-13
guard.velocity = -9
airguard.velocity = -5,-1
air.type = Low
air.velocity = -6,-4
down.bounce = 1
down.velocity = -4,-4
fall = 0
fall.recover = 0

[State 1220, No Shield HitDef MSH 2]
type = HitDef
triggerall = (Var(59) != 1) && (PalNo <= 6)
trigger1 = (AnimElem = 3) && (P2StateNo != [5070,5071])
attr = S, SA
damage = ifelse(P2StateNo = 5050, 23, 45),5
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 9,9
guard.pausetime = 8,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = 0,-80
hitsound = S20,2
guardsound = S20,4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -5,-13
guard.velocity = -9
airguard.velocity = -5,-1
air.type = Low
air.velocity = -6,-13
down.bounce = 1
down.velocity = -4,-4
fall = 0
fall.recover = 0

[State 1220, HitDef MvC 1]
type = HitDef
triggerall = PalNo > 6
trigger1 = (AnimElem = 2) && (P2StateNo != [5070,5071])
attr = S, SA
damage = ifelse(P2StateNo = 5050, 80, 160),15
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 9,9
guard.pausetime = 8,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = 0,-40
hitsound = S20,2
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -5,-20
guard.velocity = -9
airguard.velocity = -5,-1
air.type = Low
air.velocity = -5,-14
down.bounce = 1
down.velocity = -4,-4
yaccel = 0.45

[State 1220, HitDef MvC 2]
type = HitDef
triggerall = PalNo > 6
trigger1 = (AnimElem = 3) && (MoveContact = 0) && (P2StateNo != [5070,5071])
attr = S, SA
damage = ifelse(P2StateNo = 5050, 80, 160),15
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 9,9
guard.pausetime = 8,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = 0,-80
hitsound = S20,2
guardsound = S20,4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -5,-20
guard.velocity = -9
airguard.velocity = -5,-1
air.type = Low
air.velocity = -5,-14
down.bounce = 1
down.velocity = -4,-4
yaccel = 0.45

[State 1220, Special Move Dust]
type = Explod
anim = 8031
trigger1 = (PalNo > 6) && (Time = 1)
postype = P1
pos = 20,2
ownpal = 1
sprpriority = 5

[State 1220, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 1221

;---------------------------------------------------------------------------
; Stars N' Stripes Z (air - rising)

[Statedef 1221]
type    = A
movetype= A
physics = N
juggle  = 5
ctrl = 0
;anim = 1211
sprpriority = 2
ctrl = 0

[State 1221, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 1211

[State 1221, PosAdd]
type = PosAdd
trigger1 = Time = 0
x = 59
y = -15

[State 1221, VelSet 1]
type = VelSet
trigger1 = Time = 1
x = 6
y = -12

[State 1221, VelSet 2]
type = VelSet
trigger1 = AnimElemTime(1) = 15
y = -8

[State 1221, VelAdd]
type = VelAdd
trigger1 = (Time >= 10) && (Vel X > 0)
x = -0.30
y = 0.05

[State 1221, VelSet]
type = VelSet
trigger1 = AnimElemTime(1) = 18
x = 0
y = 0

[State 1221, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 1221, VarSet)
type = VarSet
trigger1 = AnimTime = 0
v = 15
value = 0

[State 1221, Shield MSH HitDef 1]
type = HitDef
triggerall = (Var(59) = 1) && (PalNo <= 6)
trigger1 = (AnimElem = 1) && (Var(15) = 0) && (P2StateNo != [5070,5071])
attr = A, SA
damage = ifelse(P2StateNo = 5050, 80, 160),15
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 9,9
guard.pausetime = 8,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = 0,-100
hitsound = S20,2
guardsound = S20,4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -5,-13
guard.velocity = -9
airguard.velocity = -5,-1
air.type = Low
air.velocity = -6,-4
down.bounce = 1
down.velocity = -4,-4
fall = 1
fall.recover = 0

[State 1221, No Shield HitDef MSH 1]
type = HitDef
triggerall = (Var(59) != 1) && (PalNo <= 6)
triggerall = P2StateNo != [5070,5071]
trigger1 = AnimElemTime(1) = 1
trigger2 = AnimElemTime(1) = 4
trigger3 = AnimElemTime(1) = 7
trigger4 = AnimElemTime(1) = 10
attr = A, SA
damage = ifelse(P2StateNo = 5050, 8, 15),5
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 9,9
guard.pausetime = 8,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = 0,-100
hitsound = S20,2
guardsound = S20,4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -4,-18
guard.velocity = -9
airguard.velocity = -5,-1
air.type = Low
air.velocity = -4,-18
down.bounce = 1
down.velocity = -4,-4
fall = 0
fall.recover = 0

[State 1221, No Shield HitDef MSH 2]
type = HitDef
triggerall = (Var(59) != 1) && (PalNo <= 6)
triggerall = P2StateNo != [5070,5071]
trigger1 = AnimElemTime(1) = 13
attr = A, SA
damage = ifelse(P2StateNo = 5050, 5, 10),5
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 9,9
guard.pausetime = 8,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = 0,-100
hitsound = S20,2
guardsound = S20,4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -1,-6
guard.velocity = -9
airguard.velocity = -5,-1
air.type = Low
air.velocity = -1,-6
down.bounce = 1
down.velocity = -4,-4
fall = 0
fall.recover = 0

[State 1221, Shield MvC HitDef 1]
type = HitDef
triggerall = PalNo > 6
trigger1 = (AnimElem = 1) && (Var(15) = 0) && (P2StateNo != [5070,5071])
attr = A, SA
damage = ifelse(P2StateNo = 5050, 80, 160),15
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 9,9
guard.pausetime = 8,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = 0,-100
hitsound = S20,2
guardsound = S20,4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -5,-20
guard.velocity = -9
airguard.velocity = -5,-1
air.type = Low
air.velocity = -5,-14
down.bounce = 1
down.velocity = -4,-4
yaccel = 0.45

[State 1221, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 1202
ctrl = 0

;---------------------------------------------------------------------------
; Power Gem Stars N' Stripes X (ground)

[Statedef 1250]
type    = S
movetype= A
physics = N
juggle  = 3
ctrl = 0
;anim = 1250
poweradd = 110
sprpriority = 2

[State 1250, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 1250

[State 1250, AfterImage]
type = AfterImage
trigger1 = AnimElemTime(1) = 0
time = 100
length = 18
framegap = 5
palcolor = 0
palbright = -255,-20,50
trans = none

[State 1250, VelSet 1]
type = VelSet
trigger1 = AnimElemTime(1) = 0
x = 4

[State 1250, VelSet 2]
type = VelSet
trigger1 = AnimElemTime(6) = 0
x = 0

[State 1250, VelAdd]
type = VelAdd
trigger1 = (AnimElemTime(5) >= 0) && (AnimElemTime(6) < 0) && (Vel X > 0)
x = -0.5

[State 1250, Width]
type = Width
trigger1 = (AnimElemTime(10) >= 1) && (AnimTime < 0)
value = 20,0

[State 1250, PlaySnd];"Stars N' Stripes"
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = 35,1
channel = 0

[State 1250, Spark Pos VarSet Reset]
type = VarSet
trigger1 = (Time = 0) || (AnimTime = 0)
v = 3
value = 0

[State 1250, Spark Pos VarSet 1]
type = VarSet
trigger1 = AnimElemTime(2) = 0
trigger2 = AnimElemTime(9) = 0
v = 3
value = -40

[State 1250, Spark Pos VarSet 2]
type = VarSet
trigger1 = AnimElemTime(3) = 0
trigger2 = AnimElemTime(10) = 0
v = 3
value = -80

[State 1250, Spark Pos VarSet 3]
type = VarSet
trigger1 = AnimElemTime(4) = 0
v = 3
value = -90

[State 1250, HitDef 1]
type = HitDef
triggerall = P2StateNo != [5070,5071]
trigger1 = (AnimElem = 2) || (AnimElem = 3) || (AnimElem = 4) || (AnimElem = 9) || (AnimElem = 10)
attr = S, SA
damage = ifelse(P2StateNo = 5050, 8, 16),3
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 5,6
sparkno = S8016
guard.sparkno = S8021
sparkxy = 0,Var(3)
hitsound = S20,0
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -1
ground.cornerpush.veloff = 0
guard.velocity = -9
airguard.velocity = -5,-1
air.type = Low
air.velocity = -1,-1
down.bounce = 1
down.velocity = -4,-7
fall = 0
fall.recover = 0

[State 1250, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 1251
ctrl = 0

;---------------------------------------------------------------------------
; Power Gem Stars N' Stripes X (air - rising)

[Statedef 1251]
type    = A
movetype= A
physics = N
juggle  = 3
ctrl = 0
;anim = 1251
sprpriority = 2
ctrl = 0

[State 1251, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 1251

[State 1251, PosAdd]
type = PosAdd
trigger1 = Time = 0
x = 52
y = -7

[State 1251, VelSet]
type = VelSet
trigger1 = Time = 1
x = 2
y = -6

[State 1251, VelAdd]
type = VelAdd
trigger1 = (Time >= 0) && (Vel X > 0)
x = -0.05

[State 1251, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 1251, HitDef 1]
type = HitDef
triggerall = P2StateNo != [5070,5071]
trigger1 = (AnimElem = 1)
attr = S, SA
damage = ifelse(P2StateNo = 5050, 30, 60),3
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 5,5
sparkno = S8016
guard.sparkno = S8021
sparkxy = 0,-90
hitsound = S20,2
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -5,-6
guard.velocity = -9
airguard.velocity = -5,-1
air.type = Low
air.velocity = -5,-6
down.bounce = 1
down.velocity = -5,-6
fall = 1
fall.recover = 0

[State 1251, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 1252
ctrl = 0

;---------------------------------------------------------------------------
; Power Gem Stars N' Stripes X (air - falling)

[Statedef 1252]
type    = A
movetype= I
physics = N
juggle  = 5
ctrl = 0
;anim = 1252
velset = 0,-4
sprpriority = 2

[State 1252, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 1252

[State 1252, AfterImageTime]
type = AfterImageTime
trigger1 = Pos Y >= 0
time = 1

[State 1252, VelAdd]
type = VelAdd
trigger1 = 1
y = 0.39

[State 1252, ChangeState]
type = ChangeState
trigger1 = Pos Y >= 0
value = 52

;---------------------------------------------------------------------------
; Power Gem Stars N' Stripes Y (ground)

[Statedef 1260]
type    = S
movetype= A
physics = N
juggle  = 3
ctrl = 0
;anim = 1260
poweradd = 110
sprpriority = 2

[State 1260, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 1260

[State 1260, AfterImage]
type = AfterImage
trigger1 = AnimElemTime(1) = 0
time = 100
length = 18
framegap = 5
palcolor = 0
palbright = -250,-20,50
trans = none

[State 1260, VelSet 1]
type = VelSet
trigger1 = AnimElemTime(1) = 0
trigger2 = AnimElemTime(8) = 0
x = 4

[State 1260, VelSet 2]
type = VelSet
trigger1 = AnimElemTime(7) = 0
trigger2 = AnimElemTime(13) = 0
x = 0

[State 1260, VelAdd 1]
type = VelAdd
trigger1 = (AnimElemTime(5) >= 0) && (AnimElemTime(7) < 0) && (Vel X > 0)
x = -0.4

[State 1260, VelAdd 2]
type = VelAdd
trigger1 = (AnimElemTime(12) >= 0) && (AnimElemTime(13) < 0) && (Vel X > 0)
x = -0.6

[State 1260, Width]
type = Width
trigger1 = (AnimElemTime(17) >= 1) && (AnimTime < 0)
value = 20,0

[State 1260, PlaySnd];"Stars N' Stripes"
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = 35,1
channel = 0

[State 1260, Spark Pos VarSet Reset]
type = VarSet
trigger1 = (Time = 0) || (AnimTime = 0)
v = 3
value = 0

[State 1260, Spark Pos VarSet 1]
type = VarSet
trigger1 = AnimElemTime(2) = 0
trigger2 = AnimElemTime(9) = 0
trigger3 = AnimElemTime(16) = 0
v = 3
value = -40

[State 1260, Spark Pos VarSet 2]
type = VarSet
trigger1 = AnimElemTime(3) = 0
trigger2 = AnimElemTime(10) = 0
trigger3 = AnimElemTime(17) = 0
v = 3
value = -80

[State 1260, Spark Pos VarSet 3]
type = VarSet
trigger1 = AnimElemTime(4) = 0
trigger2 = AnimElemTime(11) = 0
v = 3
value = -90

[State 1260, HitDef 1]
type = HitDef
triggerall = P2StateNo != [5070,5071]
trigger1 = (AnimElem = 2) || (AnimElem = 3) || (AnimElem = 4) || (AnimElem = 9) || (AnimElem = 10) || (AnimElem = 11)
trigger2 = (AnimElem = 16) || (AnimElem = 17)
attr = S, SA
damage = ifelse(P2StateNo = 5050, 6, 12),3
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 5,6
sparkno = S8016
guard.sparkno = S8021
sparkxy = 0,Var(3)
hitsound = S20,0
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -1
ground.cornerpush.veloff = 0
guard.velocity = -9
airguard.velocity = -5,-1
air.type = Low
air.velocity = -1,-1
down.bounce = 1
down.velocity = -4,-7
fall = 0
fall.recover = 0

[State 1260, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 1261
ctrl = 0

;---------------------------------------------------------------------------
; Power Gem Stars N' Stripes Y (air - rising)

[Statedef 1261]
type    = A
movetype= A
physics = N
juggle  = 5
ctrl = 0
;anim = 1261
sprpriority = 2
ctrl = 0

[State 1261, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 1261

[State 1261, PosAdd]
type = PosAdd
trigger1 = Time = 0
x = 56
y = -11

[State 1261, VelSet]
type = VelSet
trigger1 = Time = 1
x = 2.5
y = -8

[State 1261, VelAdd]
type = VelAdd
trigger1 = (Time >= 8) && (Vel X > 0)
x = -0.05

[State 1261, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 1261, HitDef 1]
type = HitDef
triggerall = P2StateNo != [5070,5071]
trigger1 = AnimElem = 1
attr = S, SA
damage = ifelse(P2StateNo = 5050, 27, 54),3
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 5,5
sparkno = S8016
guard.sparkno = S8021
sparkxy = 0,-90
hitsound = S20,2
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -5,-6
guard.velocity = -9
airguard.velocity = -5,-1
air.type = Low
air.velocity = -5,-6
down.bounce = 1
down.velocity = -5,-6
fall = 1
fall.recover = 0

[State 1261, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 1252
ctrl = 0

;---------------------------------------------------------------------------
; Power Gem Stars N' Stripes Z (ground)

[Statedef 1270]
type    = S
movetype= A
physics = N
juggle  = 3
ctrl = 0
;anim = 1270
poweradd = 110
sprpriority = 2

[State 1270, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 1270

[State 1270, AfterImage]
type = AfterImage
trigger1 = AnimElemTime(1) = 0
time = 110
length = 18
framegap = 5
palcolor = 0
palbright = -250,-20,50
trans = none

[State 1270, VelSet 1]
type = VelSet
trigger1 = AnimElemTime(1) = 0
trigger2 = AnimElemTime(8) = 0
x = 5

[State 1270, VelSet 2]
type = VelSet
trigger1 = AnimElemTime(7) = 0
trigger2 = AnimElemTime(14) = 0
x = 0

[State 1270, VelAdd 1]
type = VelAdd
trigger1 = (AnimElemTime(5) >= 0) && (AnimElemTime(7) < 0) && (Vel X > 0)
x = -0.26

[State 1270, VelAdd 2]
type = VelAdd
trigger1 = (AnimElemTime(13) >= 0) && (AnimElemTime(14) < 0) && (Vel X > 0)
x = -0.36

[State 1270, Width]
type = Width
trigger1 = (AnimElemTime(17) >= 1) && (AnimTime < 0)
value = 20,0

[State 1270, PlaySnd];"Stars N' Stripes"
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = 35,1
channel = 0

[State 1270, Spark Pos VarSet Reset]
type = VarSet
trigger1 = (Time = 0) || (AnimTime = 0)
v = 3
value = 0

[State 1270, Spark Pos VarSet 1]
type = VarSet
trigger1 = AnimElemTime(2) = 0
trigger2 = AnimElemTime(9) = 0
trigger3 = AnimElemTime(16) = 0
v = 3
value = -40

[State 1270, Spark Pos VarSet 2]
type = VarSet
trigger1 = AnimElemTime(3) = 0
trigger2 = AnimElemTime(10) = 0
trigger3 = AnimElemTime(17) = 0
v = 3
value = -80

[State 1270, Spark Pos VarSet 3]
type = VarSet
trigger1 = AnimElemTime(4) = 0
trigger2 = AnimElemTime(11) = 0
v = 3
value = -90

[State 1270, HitDef 1]
type = HitDef
triggerall = P2StateNo != [5070,5071]
trigger1 = (AnimElem = 2) || (AnimElem = 3) || (AnimElem = 4) || (AnimElem = 9) || (AnimElem = 10) || (AnimElem = 11)
trigger2 = (AnimElem = 16) || (AnimElem = 17)
attr = S, SA
damage = ifelse(P2StateNo = 5050, 6, 12),3
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 5,6
sparkno = S8016
guard.sparkno = S8021
sparkxy = 0,Var(3)
hitsound = S20,0
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -1
ground.cornerpush.veloff = 0
guard.velocity = -9
airguard.velocity = -5,-1
air.type = Low
air.velocity = -1,-1
down.bounce = 1
down.velocity = -4,-7
fall = 0
fall.recover = 0

[State 1270, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 1271
ctrl = 0

;---------------------------------------------------------------------------
; Power Gem Stars N' Stripes Z (air - rising)

[Statedef 1271]
type    = A
movetype= A
physics = N
juggle  = 5
ctrl = 0
;anim = 1271
sprpriority = 2
ctrl = 0

[State 1271, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 1271

[State 1271, PosAdd]
type = PosAdd
trigger1 = Time = 0
x = 59
y = -15

[State 1271, VelSet 1]
type = VelSet
trigger1 = Time = 1
x = 3
y = -12

[State 1271, VelSet 2]
type = VelSet
trigger1 = AnimElemTime(1) = 15
y = -10

[State 1271, VelAdd]
type = VelAdd
trigger1 = (Time >= 10) && (Vel X > 0)
x = -0.05

[State 1271, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 1271, HitDef 1]
type = HitDef
triggerall = P2StateNo != [5070,5071]
trigger1 = AnimElem = 1
attr = S, SA
damage = ifelse(P2StateNo = 5050, 32, 64),3
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 5,5
sparkno = S8016
guard.sparkno = S8021
sparkxy = 0,-90
hitsound = S20,2
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -5,-6
guard.velocity = -9
airguard.velocity = -5,-1
air.type = Low
air.velocity = -5,-6
down.bounce = 1
down.velocity = -5,-6
fall = 1
fall.recover = 0

[State 1271, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 1252
ctrl = 0

;---------------------------------------------------------------------------
; Cartwheel

[Statedef 1300]
type    = S
movetype= I
physics = N
ctrl = 0
;anim = 1300
poweradd = 100
velset = 4.5,0
sprpriority = -2

[State 1300, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 1300

[State 1300, PlaySnd]
type = PlaySnd
trigger1 = AnimElemTime(1) = 1
value = 30,0
channel = 0

[State 1300, VelSet]
type = VelSet
trigger1 = AnimTime = 0
x = 0

[State 1300, NotHitBy]
type = NotHitBy
trigger1 = AnimElemTime(9) < 0
value = SCA
time = 1

[State 1300, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0

[State 1300, Turn]
type = Turn
trigger1 = AnimTime = 0

[State 1300, PosAdd]
type = PosAdd
trigger1 = AnimTime = 0
x = -7

[State 1300, Special Move Dust]
type = Explod
anim = 8031
trigger1 = (PalNo > 6) && (Time = 1)
postype = P1
pos = 10,2
ownpal = 1
sprpriority = 5

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

;---------------------------------------------------------------------------
; Charging Star A

[Statedef 1400]
type    = S
movetype= A
physics = N
juggle  = 5
ctrl = 0
;anim = 1400
poweradd = 110
velset = 0,0
sprpriority = 2

[State 1400, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 1400

[State 1400, VelSet 1]
type = VelSet
trigger1 = AnimElemTime(5) = 0
trigger2 = (Var(59) = 1) && (NumHelper(1400) >= 1) && (helper(1400), StateNo = 1430)
x = 8

[State 1400, VelSet 2]
type = VelSet
trigger1 = (NumHelper(1400) >= 1) && (helper(1400), StateNo = 1435)
x = 0

[State 1400, VelSet End]
type = VelSet
trigger1 = AnimElemTime(12) = 0
x = 1.84

[State 1400, HitBy]
type = HitBy
triggerall = Var(59) = 1
trigger1 = (AnimElemTime(5) >= 0) && (AnimElemTime(12) < 0)
value = SCA, NA, SA, HA, NT, ST, HT
time = 1

[State 1400, Width]
type = Width
trigger1 = (AnimElemTime(5) >= 0) && (AnimElemTime(12) < 0)
value = 15,0

[State 1400, Helper]
type = Helper
trigger1 = (Var(59) = 1) && (AnimElemTime(5) = 0)
helpertype = Normal
name = "Charging Star"
ID = 1400
pos = 0,0
postype = P1
stateno = 1430
ownpal = 1
ignorehitpause = 1

[State 1400, PlaySnd];"Charging Star"
type = PlaySnd
trigger1 = AnimElemTime(2) = 0
value = 35,2
channel = 0

[State 1400, HitDef MSH 1]
type = HitDef
triggerall = PalNo <= 6
trigger1 = (AnimElemTime(4) = 0) && (P2StateNo != [5070,5071])
attr = S, SA
damage = 30,10
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 6, Hit
pausetime = 9,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = 0,-40
hitsound = S20,1
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -6,-5
guard.velocity = -10
air.type = Low
air.velocity = -6,-5
down.bounce = 1
down.velocity = -4,-4

[State 1400, HitDef MSH 2]
type = HitDef
triggerall = PalNo <= 6
trigger1 = (AnimElemTime(5) = 0) && (P2StateNo != [5070,5071])
attr = S, SA
damage = 90,10
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 6, Hit
pausetime = 9,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = -10,-80
hitsound = S20,1
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -6,-6
guard.velocity = -10
air.type = Low
air.velocity = -6,-6
fall = 1
fall.recover = 0
down.bounce = 1
down.velocity = -4,-4

[State 1400, HitDef MvC 1]
type = HitDef
triggerall = PalNo > 6
trigger1 = (AnimElemTime(4) = 0) && (P2StateNo != [5070,5071])
attr = S, SA
damage = 120,10
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 6, Hit
pausetime = 9,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = 0,-40
hitsound = S20,1
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -5,-6
guard.velocity = -10
air.type = Low
air.velocity = -5,-6
down.bounce = 1
down.velocity = -4,-4
yaccel = 0.45

[State 1400, HitDef MvC 2]
type = HitDef
triggerall = PalNo > 6
trigger1 = (AnimElemTime(5) = 0) && (MoveContact = 0) && (P2StateNo != [5070,5071])
attr = S, SA
damage = 120,10
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 6, Hit
pausetime = 9,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = -10,-80
hitsound = S20,1
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -4,-11
guard.velocity = -10
air.type = Low
air.velocity = -4,-11
down.bounce = 1
down.velocity = -4,-4
yaccel = 0.45

[State 1400, MvC FX]
type = Explod
trigger1 = (AnimElemTime(5) = 0) && (PalNo > 6)
anim = 8061
id = 8061
postype = P1
pos = 0,0
ownpal = 1
sprpriority = 4
bindtime = -1
removetime = -1
removeongethit = 1

[State 1400, RemoveExplod]
type = RemoveExplod
trigger1 = AnimElemTime(12) >= 0
id = 8061

[State 1400, Special Move Dust]
type = Explod
anim = 8031
trigger1 = (PalNo > 6) && (Time = 1)
postype = P1
pos = 10,2
ownpal = 1
sprpriority = 5

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

;---------------------------------------------------------------------------
; Charging Star B

[Statedef 1410]
type    = S
movetype= A
physics = N
juggle  = 5
ctrl = 0
;anim = 1410
poweradd = 110
velset = 0,0
sprpriority = 2

[State 1410, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 1410

[State 1410, VelSet 1]
type = VelSet
trigger1 = AnimElemTime(5) = 0
trigger2 = (Var(59) = 1) && (NumHelper(1400) >= 1) && (helper(1400), StateNo = 1430)
x = 8

[State 1410, VelSet 2]
type = VelSet
trigger1 = (NumHelper(1400) >= 1) && (helper(1400), StateNo = 1435)
x = 0

[State 1410, VelSet End]
type = VelSet
trigger1 = AnimElemTime(15) = 0
x = 1.84

[State 1410, Width]
type = Width
trigger1 = (AnimElemTime(5) >= 0) && (AnimElemTime(15) < 0)
value = 15,0

[State 1410, HitBy]
type = HitBy
triggerall = Var(59) = 1
trigger1 = (AnimElemTime(5) >= 0) && (AnimElemTime(15) < 0)
value = SCA, NA, SA, HA, NT, ST, HT
time = 1

[State 1410, Helper]
type = Helper
trigger1 = (Var(59) = 1) && (AnimElemTime(5) = 0)
helpertype = Normal
name = "Charging Star"
ID = 1400
pos = 0,0
postype = P1
stateno = 1430
ownpal = 1
ignorehitpause = 1

[State 1410, PlaySnd];"Charging Star"
type = PlaySnd
trigger1 = AnimElemTime(2) = 0
value = 35,2
channel = 0

[State 1410, HitDef MSH 1]
type = HitDef
triggerall = PalNo <= 6
trigger1 = (AnimElemTime(4) = 0) && (P2StateNo != [5070,5071])
attr = S, SA
damage = 35,10
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 6, Hit
pausetime = 9,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = 0,-40
hitsound = S20,1
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -6,-5
guard.velocity = -10
air.type = Low
air.velocity = -6,-5
down.bounce = 1
down.velocity = -4,-4

[State 1410, HitDef MSH 2]
type = HitDef
triggerall = PalNo <= 6
trigger1 = (AnimElemTime(5) = 0) && (P2StateNo != [5070,5071])
attr = S, SA
damage = 95,10
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 6, Hit
pausetime = 9,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = -10,-80
hitsound = S20,1
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -7,-6
guard.velocity = -10
air.type = Low
air.velocity = -7,-6
fall = 1
fall.recover = 0
down.bounce = 1
down.velocity = -4,-4

[State 1410, HitDef MvC 1]
type = HitDef
triggerall = PalNo > 6
trigger1 = (AnimElemTime(4) = 0) && (P2StateNo != [5070,5071])
attr = S, SA
damage = 130,10
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 6, Hit
pausetime = 9,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = 0,-40
hitsound = S20,1
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -5,-6
guard.velocity = -10
air.type = Low
air.velocity = -5,-6
down.bounce = 1
down.velocity = -4,-4
yaccel = 0.45

[State 1410, HitDef MvC 2]
type = HitDef
triggerall = PalNo > 6
trigger1 = (AnimElemTime(5) = 0) && (MoveContact = 0 ) && (P2StateNo != [5070,5071])
attr = S, SA
damage = 130,10
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 6, Hit
pausetime = 9,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = -10,-80
hitsound = S20,1
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -5,-13
guard.velocity = -10
air.type = Low
air.velocity = -5,-12
down.bounce = 1
down.velocity = -4,-4
yaccel = 0.45

[State 1410, MvC FX]
type = Explod
trigger1 = (AnimElemTime(5) = 0) && (PalNo > 6)
anim = 8061
id = 8061
postype = P1
pos = 0,0
ownpal = 1
sprpriority = 4
bindtime = -1
removetime = -1
removeongethit = 1

[State 1410, RemoveExplod]
type = RemoveExplod
trigger1 = AnimElemTime(15) >= 0
id = 8061

[State 1410, Special Move Dust]
type = Explod
anim = 8031
trigger1 = (PalNo > 6) && (Time = 1)
postype = P1
pos = 10,2
ownpal = 1
sprpriority = 5

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

;---------------------------------------------------------------------------
; Charging Star C

[Statedef 1420]
type    = S
movetype= A
physics = N
juggle  = 5
ctrl = 0
;anim = 1420
poweradd = 110
velset = 0,0
sprpriority = 2

[State 1420, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 1420

[State 1420, VelSet 1]
type = VelSet
trigger1 = AnimElemTime(5) = 0
trigger2 = (Var(59) = 1) && (NumHelper(1400) >= 1) && (helper(1400), StateNo = 1430)
x = 8

[State 1420, VelSet 2]
type = VelSet
trigger1 = (NumHelper(1400) >= 1) && (helper(1400), StateNo = 1435)
x = 0

[State 1420, VelSet End]
type = VelSet
trigger1 = AnimElemTime(18) = 0
x = 1.84

[State 1420, Width]
type = Width
trigger1 = (AnimElemTime(5) >= 0) && (AnimElemTime(18) < 0)
value = 15,0

[State 1420, HitBy]
type = HitBy
triggerall = Var(59) = 1
trigger1 = (AnimElemTime(5) >= 0) && (AnimElemTime(18) < 0)
value = SCA, NA, SA, HA, NT, ST, HT
time = 1

[State 1420, Helper]
type = Helper
trigger1 = (Var(59) = 1) && (AnimElemTime(5) = 0)
helpertype = Normal
name = "Charging Star"
ID = 1400
pos = 0,0
postype = P1
stateno = 1430
ownpal = 1
ignorehitpause = 1

[State 1420, PlaySnd];"Charging Star"
type = PlaySnd
trigger1 = AnimElemTime(2) = 0
value = 35,2
channel = 0

[State 1420, HitDef MSH 1]
type = HitDef
triggerall = PalNo <= 6
trigger1 = (AnimElemTime(4) = 0) && (P2StateNo != [5070,5071])
attr = S, SA
damage = 40,10
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 6, Hit
pausetime = 9,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = 0,-40
hitsound = S20,1
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -6,-5
guard.velocity = -10
air.type = Low
air.velocity = -6,-5
down.bounce = 1
down.velocity = -4,-4

[State 1420, HitDef MSH 2]
type = HitDef
triggerall = PalNo <= 6
trigger1 = (AnimElemTime(5) = 0) && (P2StateNo != [5070,5071])
attr = S, SA
damage = 100,10
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 6, Hit
pausetime = 9,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = -10,-80
hitsound = S20,1
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -7,-6
guard.velocity = -10
air.type = Low
air.velocity = -7,-6
fall = 1
fall.recover = 0
down.bounce = 1
down.velocity = -4,-4

[State 1420, HitDef MvC 1]
type = HitDef
triggerall = PalNo > 6
trigger1 = (AnimElemTime(4) = 0) && (P2StateNo != [5070,5071])
attr = S, SA
damage = 140,10
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 6, Hit
pausetime = 9,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = 0,-40
hitsound = S20,1
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -5,-6
guard.velocity = -10
air.type = Low
air.velocity = -5,-6
down.bounce = 1
down.velocity = -4,-4
yaccel = 0.45

[State 1420, HitDef MvC 2]
type = HitDef
triggerall = PalNo > 6
trigger1 = (AnimElemTime(5) = 0) && (MoveContact = 0) && (P2StateNo != [5070,5071])
attr = S, SA
damage = 140,10
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 6, Hit
pausetime = 9,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = -10,-80
hitsound = S20,1
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -6,-15
guard.velocity = -10
air.type = Low
air.velocity = -6,-14
down.bounce = 1
down.velocity = -4,-4
yaccel = 0.45

[State 1420, MvC FX]
type = Explod
trigger1 = (AnimElemTime(5) = 0) && (PalNo > 6)
anim = 8061
id = 8061
postype = P1
pos = 0,0
ownpal = 1
sprpriority = 4
bindtime = -1
removetime = -1
removeongethit = 1

[State 1420, RemoveExplod]
type = RemoveExplod
trigger1 = AnimElemTime(18) >= 0
id = 8061

[State 1420, Special Move Dust]
type = Explod
anim = 8031
trigger1 = (PalNo > 6) && (Time = 1)
postype = P1
pos = 10,2
ownpal = 1
sprpriority = 5

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

;---------------------------------------------------------------------------
; Charging Star Helper

[Statedef 1430]
type    = S
movetype= A
physics = N
ctrl = 0
anim = 1430
sprpriority = -5

[State 1430, BindToParent]
type = BindToParent
trigger1 = 1
facing = 1
pos = 0,0
time = -1

[State 1430, HitOverRide]
type = HitOverRide
trigger1 = 1
attr = SCA, AA, AT, AP, NA, NT, NP, HA, HT, HP
slot = 0
stateno = 1435
time = -1

[State 1430, HitBy]
type = HitBy
trigger1 = 1
value = SCA, NP, SP, HP
time = 1

[State 1430, DestroySelf]
type = DestroySelf
trigger1 = (parent, StateNo = 1400) && (parent, AnimElemTime(12) >= 0)
trigger2 = (parent, StateNo = 1410) && (parent, AnimElemTime(15) >= 0)
trigger3 = (parent, StateNo = 1420) && (parent, AnimElemTime(18) >= 0)
trigger4 = (parent, StateNo = [1450,1451]) && (parent, AnimElemTime(12) >= 0)
trigger5 = (parent, StateNo = [1460,1461]) && (parent, AnimElemTime(15) >= 0)
trigger6 = (parent, StateNo = [1470,1471]) && (parent, AnimElemTime(18) >= 0)
trigger7 = parent, StateNo != [1400,1471]

;---------------------------------------------------------------------------
; Charging Star Helper (hitoverride)

[Statedef 1435]
type    = S
movetype= A
physics = N
ctrl = 0
anim = 1430
sprpriority = -5

[State 1435, BindToParent]
type = BindToParent
trigger1 = 1
facing = 1
pos = 0,0
time = -1

[State 1435, HitOverRide]
type = HitOverRide
trigger1 = 1
attr = SCA, AA, AT, AP, NA, NT, NP, HA, HT, HP
slot = 0
stateno = 1435
time = -1

[State 1435, HitBy]
type = HitBy
trigger1 = 1
value = SCA, NP, SP, HP
time = 1

[State 1435, ChangeState]
type = ChangeState
trigger1 = Time >= 5
value = 1430

[State 1435, DestroySelf]
type = DestroySelf
trigger1 = (parent, StateNo = 1400) && (parent, AnimElemTime(12) >= 0)
trigger2 = (parent, StateNo = 1410) && (parent, AnimElemTime(15) >= 0)
trigger3 = (parent, StateNo = 1420) && (parent, AnimElemTime(18) >= 0)
trigger4 = (parent, StateNo = [1450,1451]) && (parent, AnimElemTime(12) >= 0)
trigger5 = (parent, StateNo = [1460,1461]) && (parent, AnimElemTime(15) >= 0)
trigger6 = (parent, StateNo = [1470,1471]) && (parent, AnimElemTime(18) >= 0)
trigger7 = parent, StateNo != [1400,1471]

;---------------------------------------------------------------------------
; Power Gem Charging Star A (starting)

[Statedef 1450]
type    = S
movetype= A
physics = N
juggle  = 5
ctrl = 0
;anim = 1450
poweradd = 110
velset = 0,0
sprpriority = 2

[State 1450, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 1450

[State 1450, PlaySnd];"Charging Star"
type = PlaySnd
trigger1 = AnimElemTime(2) = 0
value = 35,2
channel = 0

[State 1450, HitDef 1]
type = HitDef
trigger1 = (AnimElemTime(4) = 0) && (P2StateNo != [5070,5071])
attr = S, SA
damage = 20,10
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 6, Hit
pausetime = 9,9
sparkno = S8016
guard.sparkno = S8021
sparkxy = 0,-40
hitsound = S20,1
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -5,-5
ground.cornerpush.veloff = 0
guard.velocity = -9
air.type = Low
air.velocity = -5,-5
down.bounce = 1
down.velocity = -4,-5

[State 1450, Special Move Dust]
type = Explod
anim = 8031
trigger1 = (PalNo > 6) && (Time = 1)
postype = P1
pos = 10,2
ownpal = 1
sprpriority = 5

[State 1450, ChangeState]
type = ChangeState
trigger1 = AnimElemTime(5) = 0
value = 1451
ctrl = 0

;---------------------------------------------------------------------------
; Power Gem Charging Star A (charging)

[Statedef 1451]
type    = S
movetype= A
physics = N
juggle  = 5
ctrl = 0
sprpriority = 2

[State 1451, VarSet]
type = VarSet
trigger1 = (HitCount >= 2) || (AnimElemTime(11) = 0)
v = 25
value = 1

[State 1451, VarReset]
type = VarSet
trigger1 = Time = 0
v = 25
value = 0

[State 1451, VelSet 1]
type = VelSet
trigger1 = AnimElemTime(5) = 0
trigger2 = (Var(59) = 1) && (NumHelper(1400) >= 1) && (helper(1400), StateNo = 1430)
x = 8

[State 1451, VelSet 2]
type = VelSet
trigger1 = (NumHelper(1400) >= 1) && (helper(1400), StateNo = 1435)
x = 0

[State 1451, VelSet End]
type = VelSet
trigger1 = AnimElemTime(12) = [0,1]
x = 1.84

[State 1451, ChangeAnim]
type = ChangeAnim
triggerall = AnimElemTime(12) < 0
trigger1 = (HitCount >= 3) || (MoveGuarded = 1)
value = 1450
elem = 12

[State 1451, Width]
type = Width
trigger1 = (AnimElemTime(5) >= 0) && (AnimElemTime(12) < 0)
value = 15,0

[State 1451, HitBy]
type = HitBy
triggerall = Var(59) = 1
trigger1 = (AnimElemTime(5) >= 0) && (AnimElemTime(12) < 0)
value = SCA, NA, SA, HA, NT, ST, HT
time = 1

[State 1451, Helper]
type = Helper
trigger1 = (Var(59) = 1) && (AnimElemTime(5) = 0)
helpertype = Normal
name = "Charging Star"
ID = 1400
pos = 0,0
postype = P1
stateno = 1430
ownpal = 1
ignorehitpause = 1

[State 1451, HitDef 2]
type = HitDef
triggerall = (P2StateNo != [5070,5071])
trigger1 = (AnimElemTime(5) = 0) || (AnimElemTime(6) = 0) || (AnimElemTime(7) = 0) || (AnimElemTime(8) = 0)
trigger2 = (AnimElemTime(9) = 0) || (AnimElemTime(10) = 0) || (AnimElemTime(11) = 0)
attr = S, SA
damage = 30,10
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 6, Hit
pausetime = 9,10
sparkno = S8016
guard.sparkno = S8021
sparkxy = -10,-70
hitsound = S20,1
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -5,-5
ground.cornerpush.veloff = 0
guard.velocity = -9
air.type = Low
air.velocity = -5,-5
fall = ifelse(Var(25) = 1, 1, 0)
fall.recover = 0
down.bounce = 1
down.velocity = -5,-5

[State 1451, Power Gem FX]
type = Explod
trigger1 = AnimElemTime(5) = 0
anim = 8061
id = 8061
postype = P1
pos = 0,0
ownpal = 1
sprpriority = 4
bindtime = -1
removetime = -1
removeongethit = 1

[State 1451, RemoveExplod]
type = RemoveExplod
trigger1 = AnimElemTime(12) >= 0
id = 8061

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

;---------------------------------------------------------------------------
; Power Gem Charging Star B (starting)

[Statedef 1460]
type    = S
movetype= A
physics = N
juggle  = 5
ctrl = 0
;anim = 1460
poweradd = 110
velset = 0,0
sprpriority = 2

[State 1460, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 1460

[State 1460, PlaySnd];"Charging Star"
type = PlaySnd
trigger1 = AnimElemTime(2) = 0
value = 35,2
channel = 0

[State 1460, HitDef 1]
type = HitDef
trigger1 = (AnimElemTime(4) = 0) && (P2StateNo != [5070,5071])
attr = S, SA
damage = 20,10
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 6, Hit
pausetime = 9,9
sparkno = S8016
guard.sparkno = S8021
sparkxy = 0,-40
hitsound = S20,1
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -5,-5
ground.cornerpush.veloff = 0
guard.velocity = -9
air.type = Low
air.velocity = -5,-5
down.bounce = 1
down.velocity = -4,-5

[State 1460, Special Move Dust]
type = Explod
anim = 8031
trigger1 = (PalNo > 6) && (Time = 1)
postype = P1
pos = 10,2
ownpal = 1
sprpriority = 5

[State 1460, ChangeState]
type = ChangeState
trigger1 = AnimElemTime(5) = 0
value = 1461
ctrl = 0

;---------------------------------------------------------------------------
; Power Gem Charging Star B (charging)

[Statedef 1461]
type    = S
movetype= A
physics = N
juggle  = 5
ctrl = 0
sprpriority = 2

[State 1461, VarSet]
type = VarSet
trigger1 = (HitCount >= 4) || (AnimElemTime(14) = 0)
v = 25
value = 1

[State 1461, VarReset]
type = VarSet
trigger1 = Time = 0
v = 25
value = 0

[State 1461, VelSet 1]
type = VelSet
trigger1 = AnimElemTime(5) = 0
trigger2 = (Var(59) = 1) && (NumHelper(1400) >= 1) && (helper(1400), StateNo = 1430)
x = 8

[State 1461, VelSet 2]
type = VelSet
trigger1 = (NumHelper(1400) >= 1) && (helper(1400), StateNo = 1435)
x = 0

[State 1461, VelSet End]
type = VelSet
trigger1 = AnimElemTime(15) = [0,1]
x = 1.84

[State 1461, ChangeAnim]
type = ChangeAnim
triggerall = AnimElemTime(15) < 0
trigger1 = (HitCount >= 5) || (MoveGuarded = 1)
value = 1460
elem = 15

[State 1461, Width]
type = Width
trigger1 = (AnimElemTime(5) >= 0) && (AnimElemTime(15) < 0)
value = 15,0

[State 1461, HitBy]
type = HitBy
triggerall = Var(59) = 1
trigger1 = (AnimElemTime(5) >= 0) && (AnimElemTime(15) < 0)
value = SCA, NA, SA, HA, NT, ST, HT
time = 1

[State 1461, Helper]
type = Helper
trigger1 = (Var(59) = 1) && (AnimElemTime(5) = 0)
helpertype = Normal
name = "Charging Star"
ID = 1400
pos = 0,0
postype = P1
stateno = 1430
ownpal = 1
ignorehitpause = 1

[State 1461, HitDef 2]
type = HitDef
triggerall = (P2StateNo != [5070,5071])
trigger1 = (AnimElemTime(5) = 0) || (AnimElemTime(6) = 0) || (AnimElemTime(7) = 0) || (AnimElemTime(8) = 0)
trigger2 = (AnimElemTime(9) = 0) || (AnimElemTime(10) = 0) || (AnimElemTime(11) = 0) || (AnimElemTime(12) = 0)
trigger3 = (AnimElemTime(13) = 0) || (AnimElemTime(14) = 0) || (AnimElemTime(15) = 0)
attr = S, SA
damage = 22,10
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 6, Hit
pausetime = 9,10
sparkno = S8016
guard.sparkno = S8021
sparkxy = -10,-70
hitsound = S20,1
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -5,-5
ground.cornerpush.veloff = 0
guard.velocity = -9
air.type = Low
air.velocity = -5,-5
fall = ifelse(Var(25) = 1, 1, 0)
fall.recover = 0
down.bounce = 1
down.velocity = -5,-5

[State 1461, Power Gem FX]
type = Explod
trigger1 = AnimElemTime(5) = 0
anim = 8061
id = 8061
postype = P1
pos = 0,0
ownpal = 1
sprpriority = 4
bindtime = -1
removetime = -1
removeongethit = 1

[State 1461, RemoveExplod]
type = RemoveExplod
trigger1 = AnimElemTime(15) >= 0
id = 8061

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

;---------------------------------------------------------------------------
; Power Gem Charging Star C (starting)

[Statedef 1470]
type    = S
movetype= A
physics = N
juggle  = 5
ctrl = 0
;anim = 1470
poweradd = 110
velset = 0,0
sprpriority = 2

[State 1470, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 1470

[State 1470, PlaySnd];"Charging Star"
type = PlaySnd
trigger1 = AnimElemTime(2) = 0
value = 35,2
channel = 0

[State 1470, HitDef 1]
type = HitDef
trigger1 = (AnimElemTime(4) = 0) && (P2StateNo != [5070,5071])
attr = S, SA
damage = 20,10
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 6, Hit
pausetime = 9,9
sparkno = S8016
guard.sparkno = S8021
sparkxy = 0,-40
hitsound = S20,1
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -5,-5
ground.cornerpush.veloff = 0
guard.velocity = -9
air.type = Low
air.velocity = -5,-5
down.bounce = 1
down.velocity = -4,-5

[State 1470, Special Move Dust]
type = Explod
anim = 8031
trigger1 = (PalNo > 6) && (Time = 1)
postype = P1
pos = 10,2
ownpal = 1
sprpriority = 5

[State 1470, ChangeState]
type = ChangeState
trigger1 = AnimElemTime(5) = 0
value = 1471
ctrl = 0

;---------------------------------------------------------------------------
; Power Gem Charging Star C (charging)

[Statedef 1471]
type    = S
movetype= A
physics = N
juggle  = 5
ctrl = 0
sprpriority = 2

[State 1471, VarSet]
type = VarSet
trigger1 = (HitCount >= 6) || (AnimElemTime(17) = 0)
v = 25
value = 1

[State 1471, VarReset]
type = VarSet
trigger1 = Time = 0
v = 25
value = 0

[State 1471, VelSet 1]
type = VelSet
trigger1 = AnimElemTime(5) = 0
trigger2 = (Var(59) = 1) && (NumHelper(1400) >= 1) && (helper(1400), StateNo = 1430)
x = 8

[State 1471, VelSet 2]
type = VelSet
trigger1 = (NumHelper(1400) >= 1) && (helper(1400), StateNo = 1435)
x = 0

[State 1471, VelSet End]
type = VelSet
trigger1 = AnimElemTime(18) = [0,1]
x = 1.84

[State 1471, ChangeAnim]
type = ChangeAnim
triggerall = AnimElemTime(18) < 0
trigger1 = (HitCount >= 7) || (MoveGuarded = 1)
value = 1470
elem = 18

[State 1471, Width]
type = Width
trigger1 = (AnimElemTime(5) >= 0) && (AnimElemTime(18) < 0)
value = 15,0

[State 1471, HitBy]
type = HitBy
triggerall = Var(59) = 1
trigger1 = (AnimElemTime(5) >= 0) && (AnimElemTime(18) < 0)
value = SCA, NA, SA, HA, NT, ST, HT
time = 1

[State 1471, Helper]
type = Helper
trigger1 = (Var(59) = 1) && (AnimElemTime(5) = 0)
helpertype = Normal
name = "Charging Star"
ID = 1400
pos = 0,0
postype = P1
stateno = 1430
ownpal = 1
ignorehitpause = 1

[State 1471, HitDef 2]
type = HitDef
triggerall = (P2StateNo != [5070,5071])
trigger1 = (AnimElemTime(5) = 0) || (AnimElemTime(6) = 0) || (AnimElemTime(7) = 0) || (AnimElemTime(8) = 0)
trigger2 = (AnimElemTime(9) = 0) || (AnimElemTime(10) = 0) || (AnimElemTime(11) = 0) || (AnimElemTime(12) = 0)
trigger3 = (AnimElemTime(13) = 0) || (AnimElemTime(14) = 0) || (AnimElemTime(15) = 0) || (AnimElemTime(16) = 0)
trigger4 = (AnimElemTime(17) = 0)
attr = S, SA
damage = 20,10
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 6, Hit
pausetime = 9,10
sparkno = S8016
guard.sparkno = S8021
sparkxy = -10,-70
hitsound = S20,1
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -5,-5
ground.cornerpush.veloff = 0
guard.velocity = -9
air.type = Low
air.velocity = -5,-5
fall = ifelse(Var(25) = 1, 1, 0)
fall.recover = 0
down.bounce = 1
down.velocity = -5,-5

[State 1471, Power Gem FX]
type = Explod
trigger1 = AnimElemTime(5) = 0
anim = 8061
id = 8061
postype = P1
pos = 0,0
ownpal = 1
sprpriority = 4
bindtime = -1
removetime = -1
removeongethit = 1

[State 1471, RemoveExplod]
type = RemoveExplod
trigger1 = AnimElemTime(18) >= 0
id = 8061

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

;===========================================================================
;---------------------------------------------------------------------------
;Super Attacks
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; Final Justice

[Statedef 3000]
type    = S
movetype= A
physics = N
juggle  = 1
velset = 0,0
;anim = 3000
ctrl = 0
sprpriority = 2

[State 3000, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 3000


;-------------------
; DCvM hyper portrait/BG
[State 0, ]
type = Null	;Helper
trigger1 = time = 0
name = "Orb"
ID = 8000
pos = 50,-75
postype = p1
stateno = 8000
supermovetime = 40
pausemovetime = 1
ownpal = 1

[State 0, ]
type = Helper
trigger1 = time = 0
name = "Super BG"
ID = 8005
stateno = 8005
postype = back
facing = 1
supermovetime = 999999
pausemovetime = 999999
ownpal = 1
; end DCvM stuff
;-------------------



;[State 3000, Portrait Explod]
;type = Explod
;trigger1 = (PalNo > 6) && (AnimElemTime(3) = 8)
;anim = 8055
;postype = back
;pos = 0,8
;ownpal = 1
;ignorehitpause = 1
;sprpriority = -1
;supermovetime = 40
;removeongethit = 1


[State 3000, Super Charge B Exlod]
type = Explod
trigger1 = AnimElemTime(3) = 8
anim = 8051
postype = P1
pos = -18,-95
ownpal = 1
ignorehitpause = 1
sprpriority = 5
supermovetime = 40

[State 3000, SuperPause]
type = SuperPause
trigger1 = AnimElemTime(3) = 8
time = 45
pos = -22,-97
anim = S8050
sound = S40,0
poweradd = -1000

[State 3000, NotHitBy]
type = NotHitBy
trigger1 = AnimElemTime(3) = 8
value = SCA
time = 10

[State 3000, VelSet]
type = VelSet
trigger1 = AnimElemTime(5) = 0
x = 8.5

[State 3000, VelSet End 1]
type = VelSet
trigger1 = AnimElemTime(22) = 0
x = 1.2

[State 3000, VelSet End 2]
type = VelSet
trigger1 = AnimElemTime(25) = 0
x = 0.8

[State 3000, Width]
type = Width
trigger1 = (AnimElemTime(5) >= 0) && (AnimElemTime(22) < 0)
value = 15,0

[State 3000, PlaySnd] ;"Final Justice"
type = PlaySnd
trigger1 = AnimElemTime(5) = 0
value = 35,3
channel = 0

[State 3000, HitDef A]
type = HitDef
trigger1 = (MoveContact = 0) && (P2StateType != L) && (P2StateNo != [5070,5071])
attr = S, HA
damage = 50,10
getpower = 0
animtype = Up
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 9,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = 0,-75
hitsound = S20,2
guardsound = S20,4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = 0,-12
guard.velocity = -10
air.type = Low
air.velocity = 0,-12
down.bounce = 1
down.velocity = -4,-4
p1stateno = 3001
p2stateno = 3010
hitonce = 1
kill = 0
guard.kill = 0

[State 3000, HitDef B]
type = HitDef
trigger1 = (AnimElemTime(6) = 3) && (P2StateType = L) && (P2StateNo != [5070,5071])
attr = S, HA
damage = 50,10
getpower = 0
animtype = Up
guardflag = MA
hitflag = MAFD
priority = 7, Hit
pausetime = 9,9
sparkno = S8015
guard.sparkno = S8021
sparkxy = 0,-75
hitsound = S20,2
guardsound = S20,4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -4,-4
guard.velocity = -10
air.type = Low
air.velocity = -4,-4
fall = 1
fall.recover = 0
down.bounce = 1
down.velocity = -4,-4

[State 3000, Special Move Dust]
type = Explod
anim = 8031
trigger1 = (PalNo > 6) && (Time = 1)
postype = P1
pos = 10,2
ownpal = 1
sprpriority = 5

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

;---------------------------------------------------------------------------
; Final Justice (hit success)

[Statedef 3001]
type    = S
movetype= A
physics = N
poweradd= 0
;anim = 3001
ctrl = 0
sprpriority = 2

[State 3001, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 3001

[State 3001, Turn]
type = Turn
trigger1 = AnimElemTime(2) = 0

[State 3001, VelSet 1]
type = VelSet
trigger1 = AnimElemTime(2) = 0
x = -6

[State 3001, VelSet 2]
type = VelSet
trigger1 = AnimElemTime(5) = 0
x = -4

[State 3001, VelSet 3]
type = VelSet
trigger1 = AnimElemTime(6) = 0
x = 0

[State 3001, HitDef]
type = HitDef
trigger1 = (AnimElemTime(7) = 2) && (P2MoveType = H)
trigger1 = (P2StateNo = 3011) || (P2StateNo = 3012) 
attr = S,HT
hitflag = MAF+
priority = 7,Hit
sparkno = -1
sprpriority = 2
p1stateno = 3002
p2stateno = 3013
guard.dist = 0
hitonce = 1
numhits = 0

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

;---------------------------------------------------------------------------
; Final Justice (auto-combo)

[Statedef 3002]
type    = S
movetype= A
physics = N
poweradd= 0
anim = 3002
velset = 0,0
ctrl = 0
sprpriority = 2

[State 3002, HitDef 1]
type = HitDef
trigger1 = AnimElemTime(2) = 0
attr = S, HA
damage = 30,5
getpower = 0
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 0,15
sparkno = S8015
guard.sparkno = S8021
sparkxy = -20,-80
hitsound = S20,0
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = 0,0
guard.velocity = -7
p2facing = 1
kill = 0
guard.kill = 0
mindist = 10, 0
maxdist = 80, 0

[State 3002, HitDef 2]
type = HitDef
trigger1 = AnimElemTime(13) = 0
trigger2 = AnimElemTime(21) = 0
attr = S, HA
damage = 30,5
getpower = 0
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 0,15
sparkno = S8015
guard.sparkno = S8021
sparkxy = -20,-80
hitsound = S20,0
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = 0,0
guard.velocity = -7
p2facing = 1
kill = 0
guard.kill = 0

[State 3002, HitDef 3]
type = HitDef
trigger1 = AnimElemTime(7) = 0
trigger2 = AnimElemTime(17) = 0
trigger3 = AnimElemTime(26) = 0
attr = S, HA
damage = 30,5
getpower = 0
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 0,15
sparkno = S8015
guard.sparkno = S8021
sparkxy = -20,-80
hitsound = S20,0
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = 0,0
guard.velocity = -7
p2facing = 1
kill = 0
guard.kill = 0

[State 3002, HitDef Grab]
type = HitDef
trigger1 = AnimElemTime(33) = 0
attr = S,HT
hitflag = MAF+
priority = 7,Hit
sparkno = -1
sprpriority = 2
p2facing = 1
p1stateno = 3003
p2stateno = 3014
guard.dist = 0
fall.xvelocity = 0
fall.yvelocity = 0
fall = 1
fall.recover = 0
hitonce = 1

[State 3002, Yell]
type = PlaySnd
trigger1 = AnimElemTime(2) = 0
trigger2 = AnimElemTime(7) = 0
trigger3 = AnimElemTime(13) = 0
trigger4 = AnimElemTime(17) = 0
trigger5 = AnimElemTime(21) = 0
trigger6 = AnimElemTime(26) = 0
value = 30,0
channel = 0

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

;---------------------------------------------------------------------------
; Final Justice (grabbing opponent)

[Statedef 3003]
type    = S
movetype= A
physics = N
poweradd= 0
anim = 3003
velset = 0,0
ctrl = 0
sprpriority = 2

[State 3003, Bind 1]
type = TargetBind
trigger1 = Time = 0
pos = 60,0

[State 3003, Bind 2]
type = TargetBind
trigger1 = (AnimElemTime(1) >= 16) && (AnimElemTime(2) < 0)
pos = 56,4

[State 3003, Bind 3]
type = TargetBind
trigger1 = (AnimElemTime(2) >= 0) && (AnimElemTime(3) < 0)
pos = -40,-2

[State 3003, Bind 4]
type = TargetBind
trigger1 = (AnimElemTime(3) >= 0) && (AnimElemTime(4) < 0)
pos = 14,-2

[State 3003, Bind 5]
type = TargetBind
trigger1 = (AnimElemTime(4) >= 0) && (AnimElemTime(4) < 4)
pos = 52,-2

[State 3003, Bind 6]
type = TargetBind
trigger1 = (AnimElemTime(4) >= 4) && (AnimElemTime(5) < 0)
pos = 66,-2

[State 3003, TargetState]
type = TargetState
trigger1 = AnimElemTime(5) = 0
value = 3015

[State 3003, Width 1]
type = Width
trigger1 = (AnimElemTime(1) >= 0) && (AnimElemTime(2) < 0)
trigger2 = (AnimElemTime(4) >= 0) && (AnimElemTime(5) < 0)
edge = 55,0

[State 3003, Width 2]
type = Width
trigger1 = (AnimElemTime(2) >= 0) && (AnimElemTime(3) < 0)
edge = 0,50

[State 3003, Width 3]
type = Width
trigger1 = (AnimElemTime(3) >= 0) && (AnimElemTime(4) < 0)
edge = 0,15

[State 3003, Width 4]
type = Width
trigger1 = (AnimElemTime(5) >= 0) && (AnimElemTime(6) < 0)
trigger2 = (AnimElemTime(6) >= 0) && (AnimElemTime(7) < 0)
edge = 50,0

[State 3003, Hit Spark]
type = Explod
trigger1 = AnimElemTime(1) = 0
anim = 8010
postype = p2
pos = -2,-90
sprpriority = 5

[State 3003, Grab Sound]
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = 20,3

[State 3003, Yell]
type = PlaySnd
trigger1 = AnimElemTime(5) = 0
value = 30,1
channel = 0

[State 3003, PosAdd]
type = PosAdd
trigger1 = AnimElemTime(7) = 0
x = 12

[State 3003, VelSet 1]
type = VelSet
trigger1 = AnimElemTime(3) = 0
trigger2 = AnimElemTime(7) = 0
x = 5

[State 3003, VelSet 2]
type = VelSet
trigger1 = AnimElemTime(5) = 0
trigger2 = AnimElemTime(9) = 0
x = 0

[State 3003, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 3004
ctrl = 0

;---------------------------------------------------------------------------
; Final Justice (jumping up)

[Statedef 3004]
type    = A
movetype= A
physics = N
poweradd= 0
anim = 3004
velset = 0,-20
ctrl = 0
sprpriority = 2

[State 3004, VelAdd]
type = VelAdd
trigger1 = Time >= 6
y = 0.39

[State 3004, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0

[State 3004, HitDef Grab]
type = HitDef
trigger1 = AnimElemTime(9) = 1
attr = S,HT
hitflag = MAF+
priority = 7,Hit
sparkno = -1
sprpriority = 1
p2facing = 1
p1stateno = 3005
p2stateno = 3017
guard.dist = 0
fall.xvelocity = 0
;fall.yvelocity = 0
fall = 1
fall.recover = 0
hitonce = 1

[State 3004, ChangeState]
type = ChangeState
trigger1 = (Pos Y >= 0) && (Vel Y > 0)
value = 52
ctrl = 0

;---------------------------------------------------------------------------
; Final Justice (grabbing opponent and going down)

[Statedef 3005]
type    = A
movetype= A
physics = N
poweradd= 0
anim = 3005
velset = 0,0
ctrl = 0
sprpriority = 2

[State 3005, VelSet 1]
type = VelSet
trigger1 = AnimElemTime(3) = 0
y = 16

[State 3005, VelSet 2]
type = VelSet
trigger1 = (Pos Y >= 10) && (Vel Y > 0)
y = 0

[State 3005, PosSet]
type = VelSet
trigger1 = (Pos Y >= 10) && (Vel Y > 0)
y = 10

[State 3005, Bind 1]
type = TargetBind
trigger1 = Time = 0
pos = -25,-14

[State 3005, Bind 2]
type = TargetBind
trigger1 = (AnimElemTime(2) >= 0) && (AnimElemTime(3) < 0)
pos = -6,-13

[State 3005, Bind 3]
type = TargetBind
trigger1 = (AnimElemTime(3) >= 0)
pos = 0,-10

[State 3005, TargetState]
type = TargetState
trigger1 = Time = 54
value = 3018

[State 3005, Hurt]
type = TargetLifeAdd
trigger1 = Time = 38
value = -110

[State 3005, HitAdd]
type = HitAdd
trigger1 = Time = 38
value = 1

[State 3005, Grab Sound]
type = PlaySnd
trigger1 = AnimElemTime(1) = 0
value = 20,3

[State 3005, Yell 1]
type = PlaySnd
trigger1 = AnimElemTime(3) = 0
value = 30,0
channel = 0

[State 3005, Yell 2]
type = PlaySnd
trigger1 = Time = 38
value = 30,2
channel = 0

[State 3005, Hit Ground Sound]
type = PlaySnd
trigger1 = Time = 38
value = 22,0

[State 3005, EnvShake]
type = EnvShake
trigger1 = Time = 38
freq = 80
ampl = -15
time = 35

[State 3005, Grab Spark]
type = Explod
trigger1 = AnimElemTime(1) = 0
anim = 8010
postype = p2
pos = 30,-30
sprpriority = 5

[State 3005, Huge Explosion]
type = Explod
trigger1 = (Time = 40) && (PalNo > 6)
anim = 8060
postype = P1
pos = 2,-16
sprpriority = 5

[State 3005, Hit Ground Explod A]
type = Explod
trigger1 = Time = 53
anim = 8000
postype = P1
pos = 0,-20
sprpriority = -2

[State 3005, Hit Ground Explod B]
type = Explod
trigger1 = Time = 53
anim = 8001
postype = P1
pos = 0,-20
sprpriority = 5

[State 3005, ChangeState]
type = ChangeState
trigger1 = Time = 54
value = 3006
ctrl = 0

;---------------------------------------------------------------------------
; Final Justice (bounce away)

[Statedef 3006]
type    = A
movetype= I
physics = N
poweradd= 0
;anim = 3006
velset = -6.5,-8
ctrl = 0
sprpriority = 2

[State 3006, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 3006

[State 3006, VelAdd]
type = VelAdd
trigger1 = 1
y = 0.39

[State 3006, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 3006, ChangeState]
type = ChangeState
trigger1 = (Pos Y >= 0) && (Vel Y > 0)
value = 3007
ctrl = 0

;---------------------------------------------------------------------------
; Final Justice (landing)

[Statedef 3007]
type    = S
movetype= I
physics = S
poweradd= 0
;anim = 3007
velset = 0,0
ctrl = 0
sprpriority = 2

[State 3007, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 3007

[State 3007, PosSet]
type = PosSet
trigger1 = Time = 0
y = 0

[State 3007, Landing Sound]
type = PlaySnd
trigger1 = Time = 1
value = 10,1

[State 3007, Landing Dust]
type = Explod
anim = 8030
trigger1 = (Time = 1) && (PalNo > 6)
postype = P1
pos = 0,2
ownpal = 1

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

;---------------------------------------------------------------------------
; Final Justice (opponent hitshake)

[Statedef 3010]
type    = S
movetype= H
physics = N
velset = 0,0

[State 3010, ChangeAnim2 A]
type = ChangeAnim2
trigger1 = !SelfAnimExist(5250)
trigger1 = Time >= 0
value = 3010

[State 3010, ChangeAnim B]
type = ChangeAnim
trigger1 = SelfAnimExist(5250)
trigger1 = Time >= 0
value = 5250

[State 3010, ChangeState]
type = ChangeState
trigger1 = HitShakeOver
value = 3011

[State 3010, FFB Light]
type = ForceFeedback
trigger1 = anim = 5000
trigger2 = anim = 5010
persistent = 0
time = 6
waveform = square

[State 3010, FFB Medium]
type = ForceFeedback
trigger1 = anim = 5001
trigger2 = anim = 5011
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3

[State 3010, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5012
trigger2 = anim = 5002
trigger3 = anim = 5030
persistent = 0
time = 15
waveform = sinesquare
ampl = 140

;---------------------------------------------------------------------------
; Final Justice (opponent spiraling up)

[Statedef 3011]
type    = A
movetype= H
physics = N
poweradd= 40
ctrl = 0
sprpriority = 1

[State 3011, VelSet]
type = VelSet
trigger1 = Time = 0
y = -14

[State 3011, VelAdd]
type = VelAdd
trigger1 = Time >= 7
y = 0.62

[State 3011, ChangeAnim2 A]
type = ChangeAnim2
trigger1 = !SelfAnimExist(5250)
trigger1 = Time = 0
value = 3010

[State 3011, ChangeAnim B]
type = ChangeAnim
trigger1 = SelfAnimExist(5250)
trigger1 = Time = 0
value = 5250

[State 3011, ChangeState]
type = ChangeState
trigger1 = Vel Y >= 0
value = 3012
ctrl = 0

;---------------------------------------------------------------------------
; Final Justice (opponent spiraling down)

[Statedef 3012]
type    = A
movetype= H
physics = N
poweradd= 0
ctrl = 0
sprpriority = 1

[State 3012, VelAdd]
type = VelAdd
trigger1 = 1
y = 0.62

[State 3012, ChangeAnim2 A]
type = ChangeAnim2
trigger1 = !SelfAnimExist(5250)
trigger1 = Time = 0
value = 3011

[State 3012, ChangeAnim B]
type = ChangeAnim
trigger1 = SelfAnimExist(5250)
trigger1 = Time = 0
value = 5251

[State 3012, SelfState]
type = SelfState
trigger1 = (Pos Y >= 20) && (Vel Y > 0)
value = 5100
ctrl = 0

;---------------------------------------------------------------------------
; Final Justice (opponent about to get hit)

[Statedef 3013]
type    = S
movetype= H
physics = N
poweradd= 0
ctrl = 0
sprpriority = 1

[State 3013, ChangeAnim A]
type = ChangeAnim
trigger1 = SelfAnimExist(5251)
trigger1 = Time >= 0
value = 5251

[State 3013, ChangeAnim2 B]
type = ChangeAnim2
trigger1 = !SelfAnimExist(5251)
trigger1 = Time >= 0
value = 3011

[State 3013, VelSet]
type = VelSet
trigger1 = Pos Y >= 0
y = 0

[State 3013, PosSet]
type = PosSet
trigger1 = Pos Y >= 0
y = 0

[State 3013, SelfState]
type = SelfState
trigger1 = Time >= 50
value = 5100
ctrl = 0

;---------------------------------------------------------------------------
; Final Justice (opponent getting thrown)

[Statedef 3014]
type    = S
movetype= H
physics = N
poweradd= 0
ctrl = 0
sprpriority = 3

[State 3014, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 3014

;---------------------------------------------------------------------------
; Final Justice (opponent getting thrown - going up)

[Statedef 3015]
type    = A
movetype= H
physics = N
poweradd= 0
ctrl = 0
velset = 0,-16
sprpriority = 0

[State 3015, PosAdd]
type = PosAdd
trigger1 = Time = 0
x = 20

[State 3015, VelAdd]
type = VelAdd
trigger1 = 1
y = 0.39

[State 3015, Turn]
type = Turn
trigger1 = Time = 1

[State 3015, ChangeAnim2 A]
type = ChangeAnim2
trigger1 = !SelfAnimExist(5051)
trigger1 = Time = 0
value = 3015

[State 3015, ChangeAnim2 B]
type = ChangeAnim
trigger1 = SelfAnimExist(5051)
trigger1 = Time = 0
value = 5051

[State 3015, SelfState]
type = SelfState
trigger1 = (Pos Y >= 0) && (Vel Y > 0)
value = 5100
ctrl = 0

[State 3015, ChangeState]
type = ChangeState
trigger1 = Time = 40
value = 3016
ctrl = 0

;---------------------------------------------------------------------------
; Final Justice (opponent getting thrown - going up about to get hit)

[Statedef 3016]
type    = A
movetype= H
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority = 3

[State 3016, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 3016

[State 3016, VelAdd]
type = VelAdd
trigger1 = Time >= 50
y = 0.46

[State 3016, SelfState]
type = SelfState
trigger1 = (Pos Y >= 0) && (Vel Y > 0)
value = 5100
ctrl = 0

;---------------------------------------------------------------------------
; Final Justice (opponent getting thrown - going down)

[Statedef 3017]
type    = A
movetype= H
physics = N
poweradd= 0
ctrl = 0
sprpriority = 0

[State 3017, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 3017

;---------------------------------------------------------------------------
; Final Justice (opponent down)

[Statedef 3018]
type    = L
movetype= H
physics = N
poweradd= 0
ctrl = 0
sprpriority = 0

[State 3018, SelfState]
type = SelfState
trigger1 = Time = 0
value = 5100
ctrl = 0

;---------------------------------------------------------------------------
; Hyper Stars N' Stripes (ground)

[Statedef 3100]
type    = S
movetype= A
physics = N
juggle  = 3
ctrl = 0
velset = 0,0
anim = 1270
poweradd = 0
sprpriority = 2

[State 3100, ChangeAnim]
type = ChangeAnim
trigger1 = Time = [0,10]
value = 1270

;-------------------
; DCvM hyper portrait/BG
[State 0, ]
type = Null	;Helper
trigger1 = time = 0
name = "Orb"
ID = 8000
pos = 50,-75
postype = p1
stateno = 8000
supermovetime = 40
pausemovetime = 1
ownpal = 1

[State 0, ]
type = Helper
trigger1 = time = 0
name = "Super BG"
ID = 8005
stateno = 8005
postype = back
facing = 1
supermovetime = 999999
pausemovetime = 999999
ownpal = 1
; end DCvM stuff
;-------------------



;[State 3000, Portrait Explod]
;type = Explod
;trigger1 = Time = 10
;anim = 8055
;postype = back
;pos = 0,8
;ownpal = 1
;ignorehitpause = 1
;sprpriority = -1
;supermovetime = 40
;removeongethit = 1


[State 3100, Super Charge B Exlod]
type = Explod
trigger1 = Time = 10
anim = 8051
postype = P1
pos = -12,-55
ownpal = 1
ignorehitpause = 1
sprpriority = 5
supermovetime = 40

[State 3100, SuperPause]
type = SuperPause
trigger1 = Time = 10
time = 45
pos = -16,-57
anim = S8050
sound = S40,0
poweradd = -1000

[State 3100, AfterImage]
type = AfterImage
trigger1 = AnimElemTime(1) = 0
time = 120
length = 15
framegap = 5
palcolor = 0
palbright = -250,-20,50
trans = none

[State 3100, VelSet 1]
type = VelSet
trigger1 = AnimElemTime(2) = 0
x = 7

[State 3100, VelSet 2]
type = VelSet
trigger1 = AnimElemTime(8) = 0
x = 6

[State 3100, VelSet 2]
type = VelSet
trigger1 = AnimElemTime(7) = 0
trigger2 = AnimElemTime(13) = 0
x = 0

[State 3100, VelAdd 1]
type = VelAdd
trigger1 = (AnimElemTime(5) >= 0) && (AnimElemTime(7) < 0) && (Vel X > 0)
x = -0.5

[State 3100, VelAdd 2]
type = VelAdd
trigger1 = (AnimElemTime(13) >= 0) && (AnimElemTime(14) < 0) && (Vel X > 0)
x = -0.4

[State 3100, Width]
type = Width
trigger1 = (AnimElemTime(17) >= 1) && (AnimTime < 0)
value = 20,0

[State 3100, PlaySnd];"Heh"
type = PlaySnd
trigger1 = (AnimElemTime(3) = 0) || (AnimElemTime(10) = 0)
value = 30,1
channel = 0

[State 3100, PlaySnd];"Stars N' Stripes"
type = PlaySnd
trigger1 = AnimTime = 0
value = 35,1
channel = 0

[State 3100, Spark Pos VarSet Reset]
type = VarSet
trigger1 = (Time = 0) || (AnimTime = 0)
v = 3
value = 0

[State 3100, Spark Pos VarSet 1]
type = VarSet
trigger1 = AnimElemTime(2) = 0
trigger2 = AnimElemTime(9) = 0
trigger3 = AnimElemTime(16) = 0
v = 3
value = -40

[State 3100, Spark Pos VarSet 2]
type = VarSet
trigger1 = AnimElemTime(3) = 0
trigger2 = AnimElemTime(10) = 0
trigger3 = AnimElemTime(17) = 0
v = 3
value = -80

[State 3100, Spark Pos VarSet 3]
type = VarSet
trigger1 = AnimElemTime(4) = 0
trigger2 = AnimElemTime(11) = 0
v = 3
value = -90

[State 3100, NotHitBy]
type = NotHitBy
trigger1 = Time = 10
value = SCA
time = 15

[State 3100, HitDef 1]
type = HitDef
triggerall = P2StateNo != [5070,5071]
trigger1 = (AnimElem = 2) || (AnimElem = 3) || (AnimElem = 4) || (AnimElem = 9) || (AnimElem = 10) || (AnimElem = 11)
trigger2 = (AnimElem = 16) || (AnimElem = 17)
attr = S, HA
damage = 30,5
getpower = 0
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 5,6
sparkno = S8015
guard.sparkno = S8021
sparkxy = -30,Var(3)
hitsound = S20,1
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -1
ground.cornerpush.veloff = 0
guard.velocity = -9
airguard.velocity = -5,-1
air.type = Low
air.velocity = -1,-1
down.bounce = 1
down.velocity = -4,-7
fall = 0
fall.recover = 0

[State 3100, Special Move Dust]
type = Explod
anim = 8031
trigger1 = (PalNo > 6) && (Time = 1)
postype = P1
pos = 20,2
ownpal = 1
sprpriority = 5

[State 3100, Explod]
type = Explod
trigger1 = (AnimElemTime(4) = 0) || (AnimElemTime(11) = 0)
anim = 8065
id = 8065
postype = P1
pos = 0,0
ownpal = 1
sprpriority = 4
bindtime = -1
removetime = -1
removeongethit = 1

[State 3100, RemoveExplod]
type = RemoveExplod
trigger1 = (AnimElemTime(5) = 0) || (AnimElemTime(12) = 0)
id = 8065

[State 3100, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 3101
ctrl = 0

;---------------------------------------------------------------------------
; Hyper Stars N' Stripes (air - rising)

[Statedef 3101]
type    = A
movetype= A
physics = N
juggle  = 5
ctrl = 0
anim = 1271
sprpriority = 2
ctrl = 0

[State 3101, PosAdd]
type = PosAdd
trigger1 = Time = 0
x = 59
y = -15

[State 3101, VelSet 1]
type = VelSet
trigger1 = Time = 1
x = 3
y = -12

[State 3101, VelSet 2]
type = VelSet
trigger1 = AnimElemTime(1) = 15
y = -10

[State 3101, VelAdd]
type = VelAdd
trigger1 = (Time >= 10) && (Vel X > 0)
x = -0.05

[State 3101, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 3101, HitDef 1]
type = HitDef
triggerall = P2StateNo != [5070,5071]
trigger1 = AnimElem = 1
attr = S, HA
damage = 90,10
getpower = 0
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 5, Hit
pausetime = 5,5
sparkno = S8015
guard.sparkno = S8021
sparkxy = 0,-90
hitsound = S20,2
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -6,-13.5
guard.velocity = -9
airguard.velocity = -5,-1
air.type = Low
air.velocity = -6,-12.5
down.bounce = 1
down.velocity = -5,-6

[State 3101, Explod]
type = Explod
trigger1 = Time = 0
anim = 8065
id = 8065
postype = P1
pos = 0,0
ownpal = 1
sprpriority = 4
bindtime = -1
removetime = -1
removeongethit = 1

[State 3101, RemoveExplod]
type = RemoveExplod
trigger1 = AnimTime = 0
id = 8065

[State 3101, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 1252
ctrl = 0

;---------------------------------------------------------------------------
; Hyper Charging Star (starting)

[Statedef 3200]
type    = S
movetype= A
physics = N
juggle  = 4
ctrl = 0
anim = 3200
poweradd = 0
velset = 0,0
sprpriority = 2


;-------------------
; DCvM hyper portrait/BG
[State 0, ]
type = Null	;Helper
trigger1 = time = 0
name = "Orb"
ID = 8000
pos = 50,-75
postype = p1
stateno = 8000
supermovetime = 40
pausemovetime = 1
ownpal = 1

[State 0, ]
type = Helper
trigger1 = time = 0
name = "Super BG"
ID = 8005
stateno = 8005
postype = back
facing = 1
supermovetime = 999999
pausemovetime = 999999
ownpal = 1
; end DCvM stuff
;-------------------



;[State 3000, Portrait Explod]
;type = Explod
;trigger1 = Time = 10
;anim = 8055
;postype = back
;pos = 0,8
;ownpal = 1
;ignorehitpause = 1
;sprpriority = -1
;supermovetime = 40
;removeongethit = 1


[State 3200, Super Charge B Exlod]
type = Explod
trigger1 = Time = 10
anim = 8051
postype = P1
pos = 14,-80
ownpal = 1
ignorehitpause = 1
sprpriority = 5
supermovetime = 40

[State 3200, SuperPause]
type = SuperPause
trigger1 = Time = 10
time = 45
pos = 10,-82
anim = S8050
sound = S40,0
poweradd = -1000

[State 3200, AfterImage]
type = AfterImage
trigger1 = AnimElemTime(3) = 0
time = 200
length = 15
framegap = 5
palcolor = 0
palbright = -250,-20,50
trans = none

[State 3200, PlaySnd];"Charging Star"
type = PlaySnd
trigger1 = AnimElemTime(3) = 0
value = 35,2
channel = 0

[State 3200, HitDef 1]
type = HitDef
trigger1 = (AnimElemTime(5) = 0)
attr = S, HA
damage = 30,5
getpower = 0
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 7, Hit
pausetime = 6,12
sparkno = S8015
guard.sparkno = S8021
sparkxy = 0,-40
hitsound = S20,1
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -5,-5
ground.cornerpush.veloff = 0
guard.velocity = -9
air.type = Low
air.velocity = -5,-5
down.bounce = 1
down.velocity = -4,-5

[State 3200, Special Move Dust]
type = Explod
anim = 8031
trigger1 = Time = 1
postype = P1
pos = 10,2
ownpal = 1
sprpriority = 5

[State 3200, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 3201
ctrl = 0

;---------------------------------------------------------------------------
; Hyper Charging Star (charging)

[Statedef 3201]
type    = S
movetype= A
physics = N
juggle  = 1
ctrl = 0
sprpriority = 2

[State 3201, ChangeAnim]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3202)
value = 3201

[State 3201, VelSet 1]
type = VelSet
trigger1 = Time = 0
x = 8

[State 3201, VelSet 2]
type = VelSet
trigger1 = PrevStateNo = 3201
x = 6

[State 3201, Width]
type = Width
trigger1 = 1
value = 15,0

[State 3201, HitOverRide]
type = HitOverRide
trigger1 = (AnimTime < 0) && (Var(59) = 1)
attr = SCA, AA, AT, AP, NA, NT, NP, SA, ST, SP, HA, HT, HP
slot = 1
stateno = 3202
time = 1

[State 3201, HitBy]
type = HitBy
trigger1 = (AnimTime < 0) && (Var(59) = 1)
value = SCA, NP, SP, HP
time = 1

[State 3201, DefenceMulSet]
type = DefenceMulSet
trigger1 = (AnimTime < 0) && (Var(59) = 1)
value = 0

[State 3201, Helper FX]
type = Helper
trigger1 = Time = 0
helpertype = Normal
name = "Hyper Charging Star FX"
ID = 8062
pos = 0,0
postype = P1
stateno = 3205
ownpal = 1
ignorehitpause = 1

[State 3201, HitDef 1]
type = HitDef
triggerall = (P2StateNo != [5070,5071])
trigger1 = 1
attr = S, HA
damage = 40,5
getpower = 0
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 7, Hit
pausetime = 9,10
sparkno = S8015
guard.sparkno = S8021
sparkxy = -10,-65
hitsound = S20,1
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -5,-5
ground.cornerpush.veloff = 0
guard.velocity = -9
air.type = Low
air.velocity = -5,-5
fall = ifelse(Var(25) = 1, 1, 0)
fall.recover = 0
down.bounce = 1
down.velocity = -5,-5

[State 3201, ChangeState 1]
type = ChangeState
trigger1 = AnimTime = 0
trigger2 = Var(20) >= 31
value = 3203
ctrl = 0

[State 3201, ChangeState 2]
type = ChangeState
trigger1 = MoveContact
value = 3210
ctrl = 0

;---------------------------------------------------------------------------
; Hyper Charging Star (charging) HitOverRide

[Statedef 3202]
type    = S
movetype= A
physics = N
juggle  = 1
ctrl = 0
sprpriority = 1

[State 3202, AfterImageTime]
type = AfterImageTime
trigger1 = Time = 0
time = 200

[State 3202, AnimElem VarSet]
type = VarSet
trigger1 = Time <= 0
v = 26
value = AnimElemNo(0)

[State 3202, HitOverRide]
type = HitOverRide
trigger1 = (AnimTime < 0) && (Var(59) = 1)
attr = SCA, AA, AT, AP, NA, NT, NP, SA, ST, SP, HA, HT, HP
slot = 1
stateno = 3202
time = 1

[State 3202, HitBy]
type = HitBy
trigger1 = (AnimTime < 0) && (Var(59) = 1)
value = SCA, NP, SP, HP
time = 1

[State 3202, DefenceMulSet]
type = DefenceMulSet
trigger1 = (AnimTime < 0) && (Var(59) = 1)
value = 0

[State 3202, VelSet]
type = VelSet
trigger1 = 1
x = 0.2

[State 3202, HitDef 1]
type = HitDef
triggerall = (P2StateNo != [5070,5071])
trigger1 = 1
attr = S, HA
damage = 40,5
getpower = 0
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 7, Hit
pausetime = 9,10
sparkno = S8015
guard.sparkno = S8021
sparkxy = -10,-65
hitsound = S20,1
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -5,-5
ground.cornerpush.veloff = 0
guard.velocity = -9
air.type = Low
air.velocity = -5,-5
fall = ifelse(Var(25) = 1, 1, 0)
fall.recover = 0
down.bounce = 1
down.velocity = -5,-5

[State 3202, ChangeAnim]
type = ChangeAnim
trigger1 = 1
value = 3201
elem = Var(26)

[State 3202, ChangeState 1]
type = ChangeState
trigger1 = (Time >= 10) || (Time >= floor(GetHitVar(HitTime)))
value = 3201

[State 3202, ChangeState 2]
type = ChangeState
trigger1 = MoveContact
value = 3210
ctrl = 0

;---------------------------------------------------------------------------
; Hyper Charging Star (end)

[Statedef 3203]
type    = S
movetype= A
physics = N
anim = 3202
ctrl = 0
sprpriority = 2

[State 3203, AfterImageTime]
type = AfterImageTime
trigger1 = Time = 0
time = 1

[State 3203, VelSet End]
type = VelSet
trigger1 = AnimElemTime(2) = 0
x = 1.84

[State 3203, DefenceMulSet]
type = DefenceMulSet
trigger1 = Time = 0
value = 1

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

;---------------------------------------------------------------------------
; Hyper Charging Star FX Helper

[Statedef 3205]
type    = S
movetype= I
physics = N
ctrl = 0
sprpriority = 2

[State 3205, SprPriority 1]
type = SprPriority
trigger1 = parent, StateNo = 3201
value = 3

[State 3205, SprPriority 2]
type = SprPriority
trigger1 = parent, StateNo = 3202
value = 2

[State 3205, BindToParent]
type = BindToParent
trigger1 = 1
pos = 0,0

[State 3205, ChangeAnim 1]
type = ChangeAnim
trigger1 = (parent, Var(59) != 1) && (Anim != 8062)
value = 8062
elem = AnimElemNo(0)

[State 3205, ChangeAnim 2]
type = ChangeAnim
trigger1 = (parent, Var(59) = 1) && (Anim != 8063)
value = 8063
elem = AnimElemNo(0)

[State 3205, ChangeState]
type = ChangeState
trigger1 = parent, StateNo = 3203
value = 3206

[State 3205, DestroySelf]
type = DestroySelf
trigger1 = (parent, StateNo != [3201,3203]) && (parent, StateNo != 3210)

;---------------------------------------------------------------------------
; Hyper Charging Star FX Helper (end)

[Statedef 3206]
type    = S
movetype= I
physics = N
anim = 8064
ctrl = 0
sprpriority = 3

[State 3206, BindToParent]
type = BindToParent
trigger1 = 1
pos = 0,0

[State 3206, DestroySelf]
type = DestroySelf
trigger1 = AnimTime = 0

;---------------------------------------------------------------------------
; Hyper Charging Star (charging - hit success)

[Statedef 3210]
type    = S
movetype= A
physics = N
juggle  = 5
anim = 3210
ctrl = 0
sprpriority = 2

[State 3210, VelSet 1]
type = VelSet
trigger1 = 1
x = 8

[State 3210, Width]
type = Width
trigger1 = 1
value = 20,0

[State 3210, NotHitBy]
type = NotHitBy
trigger1 = Var(59) = 1
value = SCA
time = 1

[State 3210, VarSet]
type = VarSet
trigger1 = HitCount >= 7
v = 25
value = 1

[State 3210, HitDef 1]
type = HitDef
trigger1 = (Time%3 = 0) && (AnimElemTime(1) < 21)
attr = S, HA
damage = 30,5
getpower = 0
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 7, Hit
pausetime = 9,12
sparkno = S8015
guard.sparkno = S8021
sparkxy = -10,-65
hitsound = S20,1
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -5,-5
ground.cornerpush.veloff = 0
guard.velocity = -9
air.type = Low
air.velocity = -5,-5
fall = 0
fall.recover = 0
down.bounce = 1
down.velocity = -5,-5

[State 3210, HitDef 2]
type = HitDef
trigger1 = AnimElemTime(1) = 22
attr = S, HA
damage = 50,10
getpower = 0
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 7, Hit
pausetime = 4,5
sparkno = S8015
guard.sparkno = S8021
sparkxy = -10,-65
hitsound = S20,2
guardsound = S20,4
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -8,-9
ground.cornerpush.veloff = 0
guard.velocity = -9
air.type = Low
air.velocity = -8,-8
fall = 1
fall.recover = 0
down.bounce = 1
down.velocity = -7,-7

[State 3210, Dummy Helper]
type = Helper
trigger1 = Time = 0
helpertype = Normal
name = "Hyper Charging Star Dummy"
ID = 3211
pos = 0,0
postype = P1
stateno = 3211
ownpal = 1
ignorehitpause = 1

[State 3210, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 3203
ctrl = 0

;---------------------------------------------------------------------------
; Hyper Charging Star Dummy Helper (hitoverride)

[Statedef 3211]
type    = S
movetype= A
physics = N
ctrl = 0
anim = 1430
sprpriority = -5

[State 3211, BindToParent]
type = BindToParent
trigger1 = 1
facing = 1
pos = 0,0
time = -1

[State 3211, HitOverRide]
type = HitOverRide
trigger1 = 1
attr = SCA, AA, AT, AP, NA, NT, NP, SA, ST, SP, HA, HT, HP
slot = 1
stateno = 3211
time = -1

[State 3211, HitBy]
type = HitBy
trigger1 = 1
value = SCA, NP, SP, HP
time = 1

[State 3211, DestroySelf]
type = DestroySelf
trigger1 = (parent, StateNo != 3210)

;---------------------------------------------------------------------------
; Activate Gem

[Statedef 3900]
type    = S
movetype= A
physics = S
juggle  = 5
ctrl = 0
;anim = 3900
velset = 0,0
poweradd = 0
sprpriority = 2

[State 3900, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 3900

[State 3900, SuperPause]
type = SuperPause
trigger1 = AnimElemTime(4) = 0
anim = S8079 + Var(40)
pos = 12,-142
sound = S50,6
time = 72
movetime = 72

[State 3900, Shield Explod]
type = Explod
trigger1 = (Var(59) = 1) && (AnimElemTime(3) >= 0) && (AnimElemTime(21) < 0) && (NumExplod(1390010) = 0)
anim = 1390010
id = 1390010
pos = 0,0
postype = P1
bindtime = -1
supermovetime = 100
sprpriority = 3
removeongethit = 1

[State 3900, Remove Shield Explod]
type = RemoveExplod
trigger1 = AnimElemTime(21) = 0
id = 1390010

[State 3900, Activate Gem];announcer
type = PlaySnd
trigger1 = AnimElemTime(4) = 0
value = 50,(Var(40) - 1)

[State 3900, Gem VarSet]
type = VarSet
trigger1 = AnimElemTime(21) = 1
v = 40
value = 10 + Var(40)

[State 3900, Activated Gem Display];P1 Side
type = Explod
triggerall = TeamSide = 1
trigger1 = AnimElemTime(21) = 0
anim = (8109 + Var(40))
id = 8110
postype = Left
pos = 22,234
facing = 1
bindtime = -1
removetime = -1
ontop = 1
ownpal = 1
supermovetime = -1

[State 3900, Activated Gem Display];P2 Side
type = Explod
triggerall = TeamSide = 2
trigger1 = AnimElemTime(21) = 0
anim = (8109 + Var(40))
id = 8110
postype = Right
pos = -22,234
facing = 1
bindtime = -1
removetime = -1
ontop = 1
ownpal = 1
supermovetime = -1

[State 3900, Gem Bar Display];P1 Side
type = Explod
triggerall = TeamSide = 1
trigger1 = AnimElemTime(21) = 0
anim = 8089 + Var(40)
id = 8090
postype = Left
pos = 54,218
facing = 1
bindtime = -1
ontop = 1
ownpal = 1

[State 3900, Gem Bar Display];P2 Side
type = Explod
triggerall = TeamSide = 2
trigger1 = AnimElemTime(21) = 0
anim = 8089 + Var(40)
id = 8090
postype = Right
pos = -54,218
facing = 1
bindtime = -1
ontop = 1
ownpal = 1

[State 3900, Gem Bar Depleting];P1 Side
type = Explod
triggerall = TeamSide = 1
trigger1 = AnimElemTime(21) = 0
anim = 8099 + Var(40)
id = 8100
postype = Left
pos = 54,218
facing = 1
bindtime = -1
ontop = 1
ownpal = 1

[State 3900, Gem Bar Depleting];P2 Side
type = Explod
triggerall = TeamSide = 2
trigger1 = AnimElemTime(21) = 0
anim = 8099 + Var(40)
id = 8100
postype = Right
pos = -54,218
facing = 1
bindtime = -1
ontop = 1
ownpal = 1

[State 3900, Gem Word];P1 Side
type = Explod
triggerall = TeamSide = 1
trigger1 = AnimElemTime(21) = 0
anim = 8139 + Var(40)
id = 8140
postype = Left
pos = 54,211
facing = 1
bindtime = -1
ontop = 1
removetime = -1
ownpal = 1

[State 3900, Gem Word];P2 Side
type = Explod
triggerall = TeamSide = 2
trigger1 = AnimElemTime(21) = 0
anim = 8139 + Var(40)
id = 8140
postype = Right
pos = -54,211
facing = 1
bindtime = -1
ontop = 1
removetime = -1
ownpal = 1

[State 3900, Gem Word]
type = Explod
trigger1 = AnimElemTime(4) = 0
anim = 8149 + Var(40)
id = 8140
postype = Left
pos = 160,60
facing = 1
bindtime = -1
ontop = 1
ownpal = 1
supermovetime = 72

[State 3900, RemoveExplod]
type = RemoveExplod
trigger1 = AnimElemTime(21) = [0,1]
id = 8070

[State 3900, HitDef]
type = HitDef
trigger1 = (AnimElemTime(3) = 6) && (P2StateNo != [5070,5071])
attr = S, HA
damage = 10,10
animtype = Heavy
guardflag = MA
hitflag = MAFD
priority = 7, Hit
pausetime = 0,9
sparkno = -1
guard.sparkno = -1
hitsound = S20,5
guardsound = S20,4
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = ifelse(P2Dist X < 0, 10, -10)
guard.velocity = ifelse(P2Dist X < 0, 11, -11)
airguard.velocity = ifelse(P2Dist X < 0, 5, -5),-1
air.type = Low
air.velocity = ifelse(P2Dist X < 0, 8, -8),-2
down.bounce = 1
down.velocity = ifelse(P2Dist X < 0, 4, -4),-4
kill = 0
guard.kill = 0

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

;---------------------------------------------------------------------------
; Space Gem Super Armor HitOverRide

[Statedef 3950]
type    = U
movetype= H
physics = U

[State 3950, AnimElem VarSet]
type = VarSet
trigger1 = Time <= 0
v = 26
value = AnimElemNo(0)

[State 3950, PosFreeze]
type = PosFreeze
trigger1 = 1

[State 3950, VelSet]
type = VelSet
trigger1 = 1
trigger1 = Life > 0
x = FVar(30)
y = FVar(31)

[State 3950, ChangeAnim]
type = ChangeAnim
trigger1 = 1
value = Anim
elem = Var(26)

[State 3950, ChangeState];Dead
type = ChangeState
trigger1 = Life <= 0
;value = 5000
value = 3951

[State 3950, ChangeState];Still alive
type = ChangeState
trigger1 = (Time >= floor(GetHitVar(HitTime)/2)) && (Life > 0)
value = Var(27)

;---------------------------------------------------------------------------
; HITG_SHAKE (Die during super armor)
[Statedef 3951]
type    = S
movetype= H
physics = N
velset = 0,0

[State 3951, 2] ;Anim for HIT_BACK
type = ChangeAnim
trigger1 = Time = 0
value = 5030

[State 3951, 5] ;State type gets set to aerial if getting hit up
type = StateTypeSet
trigger1 = Time = 0
trigger1 = GetHitVar(yvel) != 0 && GetHitVar(fall)
trigger2 = Pos Y != 0
type = a

[State 3951, 7]
type = ChangeState
trigger1 = HitShakeOver
value = 3952

[State 3951, FFB Light]
type = ForceFeedback
trigger1 = anim = 5000
trigger2 = anim = 5010
persistent = 0
time = 6
waveform = square

[State 3951, FFB Medium]
type = ForceFeedback
trigger1 = anim = 5001
trigger2 = anim = 5011
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3

[State 3951, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5012
trigger2 = anim = 5002
trigger3 = anim = 5030
persistent = 0
time = 15
waveform = sinesquare
ampl = 140

;---------------------------------------------------------------------------
; HITA_UP (initial going up)
[Statedef 3952]
type    = A
movetype= H
physics = N
ctrl = 0

[State 3952, 1]
type = VelAdd;Gravity
trigger1 = 1
y = GetHitVar(yaccel)

[State 3952, VelSet]
type = VelSet
trigger1 = Time = 0
y = ifelse(GetHitVar(YVel) >= 0, -5, GetHitVar(YVel))

[State 3950, HitVelSet]
type = HitVelSet
trigger1 = Time = 0
x = 1

[State 3952, 4]
type = ChangeState
trigger1 = HitOver
trigger2 = Vel Y > 0    ;Hit ground
trigger2 = Pos Y >= 10  ;.
value = 5050 ;HITA_FALL


;---------------------------------------------------------------------------
; Override common states (use same number to override) :
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; Stand
[Statedef 0]
type = S
physics = S
sprpriority = 0

[State 0, ChangeState] ;Change to grabbing shield high
type = ChangeState
trigger1 = (Var(31) = 1) && (Var(33) = 1)
value = 990
ctrl = 1

[State 0, ChangeState] ;Change to grabbing shield low
type = ChangeState
trigger1 = (Var(31) = 1) && (Var(33) = 2)
value = 995
ctrl = 1

[State 0, CtrlSet];Super Armor
type = CtrlSet
trigger1 = PrevStateNo = 3950
value = 1

[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 0 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 0

[State 0, 2]
type = VelSet
trigger1 = Time = 0
y = 0

[State 0, 3] ;Stop moving if low velocity or 4 ticks pass
type = VelSet
trigger1 = abs(vel x) < 2
trigger2 = Time = 4
x = 0

;---------------------------------------------------------------------------
; Stand to Crouch
[Statedef 10]
type    = C
physics = C
anim = 10
sprpriority = 0

[State 10, CtrlSet];Super Armor
type = CtrlSet
trigger1 = PrevStateNo = 3950
value = 1

[State 10, 1]
type = VelMul
trigger1 = Time = 0
x = .75

[State 10, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 11

;---------------------------------------------------------------------------
; Crouching
[Statedef 11]
type    = C
physics = C
anim = 11
sprpriority = 0

[State 11, CtrlSet];Super Armor
type = CtrlSet
trigger1 = PrevStateNo = 3950
value = 1

[State 11, 1] ;Change from turning animation
type = ChangeAnim
trigger1 = Anim = 6 && AnimTime = 0
value = 11

;---------------------------------------------------------------------------
; Crouch to Stand
[Statedef 12]
type    = S
physics = S
anim = 12
sprpriority = 0

[State 12, CtrlSet];Super Armor
type = CtrlSet
trigger1 = PrevStateNo = 3950
value = 1

[State 12, 1]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------
; Walk
[Statedef 20]
type    = S
physics = S
sprpriority = 0

[State 20, CtrlSet];Super Armor
type = CtrlSet
trigger1 = PrevStateNo = 3950
value = 1

[State 20, 1]
type = VelSet
trigger1 = command = "holdfwd"
x = ifelse(Var(40) = 16, (const(velocity.walk.fwd.x) * 1.5), (const(velocity.walk.fwd.x)))

[State 20, 2]
type = VelSet
trigger1 = command = "holdback"
x = ifelse(Var(40) = 16, (const(velocity.walk.back.x) * 1.5), (const(velocity.walk.back.x)))

[State 20, 3]
type = ChangeAnim
triggerall = vel x > 0
trigger1 = Anim != 20 && Anim != 5 && Anim != 25
trigger2 = Anim = 5 && AnimTime = 0
value = ifelse(Var(40) = 16, 25, 20)

[State 20, 3b]
type = ChangeAnim
triggerall = vel x > 0
trigger1 = (Anim = 25) && (Var(40) != 16)
value = 20
elem = AnimElemNo(0)

[State 20, 4]
type = ChangeAnim
triggerall = vel x < 0
trigger1 = Anim != 21 && Anim != 5 && Anim != 26
trigger2 = Anim = 5 && AnimTime = 0
value = ifelse(Var(40) = 16, 26, 21)

[State 20, 4b]
type = ChangeAnim
triggerall = vel x < 0
trigger1 = (Anim = 26) && (Var(40) != 16)
value = 21
elem = AnimElemNo(0)

;---------------------------------------------------------------------------
; Jump Start
[Statedef 40]
type    = S
physics = S
;anim = ifelse(command != "holdfwd" && command != "holdback", 40, 39)
ctrl = 0
sprpriority = 1

[State 40, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = ifelse(command != "holdfwd" && command != "holdback", 40, 39)

[State 40, 1]
type = VarSet
trigger1 = Time = 0
sysvar(1) = 0

[State 40, 2]
type = VarSet
trigger1 = command = "holdfwd"
sysvar(1) = 1

[State 40, 3]
type = VarSet
trigger1 = command = "holdback"
sysvar(1) = -1

[State 40, 4]
type = VelSet
triggerall = Var(40) != 16
trigger1 = (AnimTime = 0) && (Var(10) != 1)
x = ifelse(sysvar(1)=0, const(velocity.jump.neu.x), ifelse(sysvar(1)=1, const(velocity.jump.fwd.x), const(velocity.jump.back.x)))
y = const(velocity.jump.y)

[State 40, 4b];Time Gem Velocity
type = VelSet
triggerall = Var(40) = 16
trigger1 = (AnimTime = 0) && (Var(10) != 1)
x = ifelse(sysvar(1)=0, const(velocity.jump.neu.x), ifelse(sysvar(1)=1, const(velocity.jump.fwd.x) * 1.4, const(velocity.jump.back.x) * 1.4))
y = const(velocity.jump.y) * 1.1

[State 40, 5]
type = VelSet
triggerall = Var(10) != 1
trigger1 = AnimTime = 0
trigger1 = prevstateno = 100 ;RUN_FWD
trigger1 = sysvar(1) = 1
x = ifelse(Var(40) = 16, const(velocity.runjump.fwd.x) * 2.3, const(velocity.runjump.fwd.x))

[State 40, Super Jump Detect VarSet]
type = VarSet
trigger1 = Command = "superjump"
trigger2 = PrevStateNo = 201
trigger3 = PrevStateNo = 202
trigger4 = PrevStateNo = 402
trigger5 = PrevStateNo = 403
v = 10
value = 1

[State 40, Super Jump VarSet Neutral]
type = VarSet
trigger1 = (command != "holdfwd") && (command != "holdback")
v = 11
value = 0

[State 40, Super Jump VarSet Fwd]
type = VarSet
trigger1 = command = "holdfwd"
v = 11
value = 1

[State 40, Super Jump VarSet Back]
type = VarSet
trigger1 = command = "holdback"
v = 11
value = -1

[State 40, Super Jump VelSet]
type = VelSet
trigger1 = (AnimTime = 0) && (Var(10) = 1)
y = -12.5

[State 40, Super Jump Sound]
type = PlaySnd
trigger1 = (AnimTime = 0) && (Var(10) = 1)
value = 10,0

[State 40, Super Jump Up Sparks]
type = Explod
anim = 8035
ID = 8035
trigger1 = (Var(10) = 1) && (Var(11) = 0) && (AnimTime = 0)
postype = P1
pos = -2,-8
ownpal = 1
bindtime = -1
removeongethit = 1
sprpriority = 5

[State 40, Super Jump Forward Sparks]
type = Explod
anim = 8036
ID = 8035
trigger1 = (Var(10) = 1) && (Var(11) = 1) && (AnimTime = 0)
postype = P1
pos = 0,0
ownpal = 1
bindtime = -1
removeongethit = 1
sprpriority = 5

[State 40, Super Jump Back Sparks]
type = Explod
anim = 8037
ID = 8035
trigger1 = (Var(10) = 1) && (Var(11) = -1) && (AnimTime = 0)
postype = P1
pos = 0,0
ownpal = 1
bindtime = -1
removeongethit = 1
sprpriority = 5

[State 40, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1

;---------------------------------------------------------------------------
; Jump Up (also Super Jump)

[Statedef 50]
type    = A
physics = A

[State 50, CtrlSet];Super Armor
type = CtrlSet
trigger1 = PrevStateNo = 3950
value = 1

[State 50, 1]
type = VarSet
trigger1 = Time = 0
sysvar(1) = 0

[State 50, 2]
type = ChangeAnim
trigger1 = (Time = 0) && (Var(10) != 1) && (PrevStateNo != 3950)
value = ifelse((vel x)=0, 41, ifelse((vel x)>0, 42, 43))

[State 50, Double Jump ChangeAnim Neutral] ;during super jump
type = ChangeAnim
trigger1 = (Time = 0) && (Var(10) = 1) && (PrevStateNo = 45) && (Vel X = 0)
value = 41

[State 50, Double Jump ChangeAnim Fwd] ;during super jump
type = ChangeAnim
trigger1 = (Time = 0) && (Var(10) = 1) && (PrevStateNo = 45) && (Vel X > 0)
value = 42

[State 50, Double Jump ChangeAnim Back] ;during super jump
type = ChangeAnim
trigger1 = (Time = 0) && (Var(10) = 1) && (PrevStateNo = 45) && (Vel X < 0)
value = 43

[State 50, 3]
type = ChangeAnim
trigger1 = Vel y > -2
trigger1 = SelfAnimExist(anim + 3)
persistent = 0
value = Anim + 3

[State 50, Super Jump VelAdd] ;falls slower during super jump
type = VelAdd
trigger1 = Var(10) = 1
y = -0.05

[State 50, Time Gem VelAdd] ;falls faster during Time Gem
type = VelAdd
trigger1 = (Var(40) = 16) && (Var(10) != 1)
y = 0.05

[State 50, Super Jump HoldFwd]
type = VelAdd
triggerall = Var(10) = 1
triggerall = Vel X <= 4
trigger1 = command = "holdfwd"
x = 0.25

[State 50, Super Jump HoldBack]
type = VelAdd
triggerall = Var(10) = 1
triggerall = Vel X >= -3
trigger1 = command = "holdback"
x = -0.1

[State 50, Super Jump VelSet Fwd]
type = VelSet
triggerall = Var(10) = 1
triggerall = PrevStateNo != 45
trigger1 = (Time = [0,2]) && (Anim = 9002)
x = 3.0

[State 50, Super Jump VelSet Back]
type = VelSet
triggerall = Var(10) = 1
triggerall = PrevStateNo != 45
trigger1 = (Time = [0,2]) && (Anim = 9003)
x = -1.5

[State 50, ChangeAnim Neutral]
type = ChangeAnim
triggerall = Var(10) = 1
triggerall = PrevStateNo != 45
trigger1 = (Time = 0) && (Var(11) = 0)
value = 9001

[State 50, ChangeAnim Fwd]
type = ChangeAnim
triggerall = Var(10) = 1
triggerall = PrevStateNo != 45
trigger1 = (Time = 0) && (Var(11) = 1)
value = 9002

[State 50, ChangeAnim Back]
type = ChangeAnim
triggerall = Var(10) = 1
triggerall = PrevStateNo != 45
trigger1 = (Time = 0) && (Var(11) = -1)
value = 9003

;---------------------------------------------------------------------------
; Jump Down (empty state for compatibility)
[Statedef 51]
type    = A
physics = A

[State 51, 1]
type = Null
trigger1 = 1

[State 51, Super Jump HoldFwd]
type = VelAdd
triggerall = (Var(10) = 1) && (Vel X <= 4)
trigger1 = command = "holdfwd"
x = 0.25

[State 51, Super Jump HoldBack]
type = VelAdd
triggerall = (Var(10) = 1) && (Vel X >= -3)
trigger1 = command = "holdback"
x = -0.1

;---------------------------------------------------------------------------
; Jump Land 1

[Statedef 52]
type    = S
physics = S
ctrl = 0
;anim = 47

[State 52, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 47

[State 52, Super Jump Detect VarSet Reset]
type = VarSet
trigger1 = Time = 0
v = 10
value = 0

[State 52, Super Jump Var(11) Reset]
type = VarSet
trigger1 = Time = 0
v = 11
value = 0

[State 52, 1]
type = VelSet
trigger1 = Time = 0
y = 0

[State 52, 2]
type = PosSet
trigger1 = Time = 0
y = 0

[State 52, 3]
type = CtrlSet
trigger1 = Time = 3
value = 1

[State 52, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 53
ctrl = 1

;---------------------------------------------------------------------------
; Jump Land 2

[Statedef 53]
type    = S
physics = S
ctrl = 1
;anim = 48

[State 53, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 48

[State 53, Super Jump Detect VarSet Reset]
type = VarSet
trigger1 = Time = 0
v = 10
value = 0

[State 53, Super Jump Var(11) Reset]
type = VarSet
trigger1 = Time = 0
v = 11
value = 0

[State 53, VelSet]
type = VelSet
trigger1 = Time = 0
y = 0

[State 53, PosSet]
type = PosSet
trigger1 = Time = 0
y = 0

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

;---------------------------------------------------------------------------
; Dash Forward

[Statedef 100]
type    = S
physics = N
;anim = 100
sprpriority = 1
ctrl = 0

[State 100, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 100

[State 100, VelSet]
type = VelSet
trigger1 = AnimElem = 1
x = 7

[State 100, VelMul]
type = VelMul
trigger1 = AnimElem = 9
x = .28

[State 100, Width]
type = Width
trigger1 = 1
value = 10,0

[State 100, Footstep Sound]
type = PlaySnd
trigger1 = (Time%12) = 1
trigger1 = AnimElemTime(10) < 0
value = 10,1

[State 100, Dash Explod 1]
type = Explod
trigger1 = (Time%8 = 0) && (AnimElemTime(9) < 0)
anim = 8038
postype = P1
pos = -30,-30
random = 40,90
sprpriority = 3
ownpal = 1

[State 100, Dash Explod 2]
type = Explod
trigger1 = (Time%8 = 4) && (AnimElemTime(9) < 0)
anim = 8039
postype = P1
pos = -30,-30
random = 40,90
sprpriority = 3
ownpal = 1

[State 100, Cancel into walking back]
type = ChangeState
trigger1 = Command = "holdback" && Time > 3
value = 20
ctrl = 1

[State 100, Cancel into crouching]
type = ChangeState
trigger1 = Command = "holddown"
value = 10
ctrl = 1

[State 100, Cancel into jumping]
type = ChangeState
trigger1 = Command = "holdup"
value = 40
ctrl = 1

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

;---------------------------------------------------------------------------
; Dash Back

[Statedef 105]
type    = S
physics = N
;anim = 105
sprpriority = 1
ctrl = 0

[State 105, ChangeAnim 1]
type = ChangeAnim
trigger1 = (Time = 0) && (PrevStateNo != 3950)
value = 105

[State 105, PosAdd]
type = PosAdd
trigger1 = AnimElem = 2
x = -80

[State 105, PosFreeze]
type = PosFreeze
trigger1 = Time < 6

[State 105, VelSet 1]
type = VelSet
trigger1 = AnimElem = 2
x = -7

[State 105, VelSet 2]
type = VelSet
trigger1 = AnimElem = 6
x = -6

[State 105, VelMul]
type = VelMul
trigger1 = AnimElem = 13
x = .25

[State 105, Grunt Sound]
type = PlaySnd
trigger1 = AnimElemTime(3) = 0
value = 30,0
channel = 0

[State 105, Landing Sound]
type = PlaySnd
trigger1 = AnimElemTime(14) = 0
value = 10,1

[State 105, Cancel into walking forward]
type = ChangeState
trigger1 = Command = "holdfwd" && Time > 3
value = 20
ctrl = 1

[State 105, Cancel into crouching]
type = ChangeState
trigger1 = Command = "holddown"
value = 10
ctrl = 1

[State 105, Cancel into jumping]
type = ChangeState
trigger1 = Command = "holdup"
value = 40
ctrl = 1

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

;---------------------------------------------------------------------------
; HITG_SHAKE

[Statedef 5000]
type    = S
movetype= H
physics = N
velset = 0,0

[State 5000, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = ifelse((GetHitVar(groundtype) = 1),5000,5010) + GetHitVar(animtype)

[State 5000, 2] ;Anim for HIT_BACK
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5030

[State 5000, 3] ;Anim for HIT_UP/HIT_DIAGUP (only if it exists)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) ;5051 - 4 + type

;[State 5000, 4] ;Freeze anim
;type = ChangeAnim
;trigger1 = Time > 0
;value = anim

[State 5000, 5] ;State type gets set to aerial if getting hit up
type = StateTypeSet
trigger1 = Time = 0
trigger1 = GetHitVar(yvel) != 0 && GetHitVar(fall)
trigger2 = Pos Y != 0
type = a

[State 5000, 6]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0
value = 5001 ;HITG_SLIDE

[State 5000, 7]
type = ChangeState
trigger1 = HitShakeOver
value = 5030

[State 5000, FFB Light]
type = ForceFeedback
trigger1 = anim = 5000
trigger2 = anim = 5010
persistent = 0
time = 6
waveform = square

[State 5000, FFB Medium]
type = ForceFeedback
trigger1 = anim = 5001
trigger2 = anim = 5011
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3

[State 5000, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5012
trigger2 = anim = 5002
trigger3 = anim = 5030
persistent = 0
time = 15
waveform = sinesquare
ampl = 140

;---------------------------------------------------------------------------
; HITC_SHAKE

[Statedef 5010]
type    = C
movetype= H
physics = N
velset = 0,0

[State 5010, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = 5020 + GetHitVar(animtype)

[State 5010, 2] ;Anim for HIT_BACK
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5030

[State 5010, 3] ;Anim for HIT_UP/HIT_DIAGUP (only if it exists)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) ;5051 - 4 + type

;[State 5010, 4] ;Freeze anim
;type = ChangeAnim
;trigger1 = Time > 0
;value = anim

[State 5010, 5]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0
value = 5011 ;HITC_SLIDE

[State 5010, 6]
type = ChangeState
trigger1 = HitShakeOver
value = 5030

[State 5010, FFB Light]
type = ForceFeedback
trigger1 = anim = 5020
persistent = 0
time = 6
waveform = square

[State 5010, FFB Medium]
type = ForceFeedback
trigger1 = anim = 5021
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3

[State 5010, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5022
persistent = 0
time = 15
waveform = sinesquare
ampl = 140

;---------------------------------------------------------------------------
; HITA_SHAKE

[Statedef 5020]
type    = A
movetype= H
physics = N
velset = 0,0

[State 5020, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = ifelse((GetHitVar(airtype) = 1),5000,5010) + GetHitVar(animtype)

[State 5020, 2] ;Anim for HIT_BACK
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5030

[State 5020, 3] ;Anim for HIT_UP/HIT_DIAGUP (only if it exists)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) ;5051 - 4 + type

;[State 5020, 4] ;Freeze anim
;type = ChangeAnim
;trigger1 = Time > 0
;value = anim

[State 5020, 5]
type = ChangeState
trigger1 = HitShakeOver
value = 5030

[State 5020, FFB Light]
type = ForceFeedback
trigger1 = anim = 5000
trigger2 = anim = 5010
persistent = 0
time = 6
waveform = square

[State 5020, FFB Medium]
type = ForceFeedback
trigger1 = anim = 5001
trigger2 = anim = 5011
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3

[State 5020, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5012
trigger2 = anim = 5002
trigger3 = anim = 5030
trigger4 = anim = [5051,5059]
persistent = 0
time = 15
waveform = sinesquare
ampl = 140

;---------------------------------------------------------------------------
; HITA_RECOV (recovering in air, not falling)
[Statedef 5040]
type    = A
movetype= H
physics = N

[State 5040, 1]
type = ChangeState
trigger1 = !Alive
value = 5050

[State 5040, 2]
type = ChangeAnim
triggerall = PrevStateNo != 3950
trigger1 = AnimTime = 0
trigger1 = Anim != 5040
trigger2 = Time = 0
trigger2 = Anim != 5035
value = 5040

[State 5040, 3]
type = CtrlSet
trigger1 = HitOver
value = 1

[State 5040, 4]
type = StateTypeSet
trigger1 = HitOver
movetype = I

[State 5040, 5]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5040, 6]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 52 ;JUMPLAND

;---------------------------------------------------------------------------
; HITL_SHAKE
[Statedef 5080]
type    = L
movetype= H
physics = N
velset = 0,0

[State 5080, 1] ;Set default anim
type = VarSet
trigger1 = time = 0
sysvar(2) = ifelse (GetHitVar(yvel) = 0, 5080, 5090)

[State 5080, 2]
type = VarAdd
trigger1 = time = 0
trigger1 = (anim = [5081,5089]) || (anim = [5111,5119])
trigger1 = SelfAnimExist(sysvar(2) + (anim % 10))
sysvar(2) = anim % 10

[State 5080, 3] ;If 5090 doesn't exist, default to 5030
type = VarSet
trigger1 = time = 0
trigger1 = sysvar(2) = 5090
trigger1 = !SelfAnimExist(5090)
sysvar(2) = 5030

[State 5080, 3] ;Freeze
type = ChangeAnim
trigger1 = Time = 0
value = sysvar(2)

[State 5080, 4]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0
value = 5081 ;HITL_SLIDE

[State 5080, 5]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) != 0
value = 5030 ;HITA_UP

;---------------------------------------------------------------------------
; Initialize (at the start of the round)
[Statedef 5900]
type = S

[State 5900, 1] ;Clear all int variables
type = VarRangeSet
trigger1 = roundno = 1
value = 0

[State 5900, 2] ;Clear all float variables
type = VarRangeSet
trigger1 = roundno = 1
fvalue = 0

[State 5900, 3] ;Intro
type = ChangeState
trigger1 = roundno = 1
value = 190

[State 5900, Shield VarSet] ;Shield bind to Cap
type = VarSet
trigger1 = 1
v = 59
value = 1

[State 5900, Gems Var Random]
type = VarRandom
trigger1 = (Time = 0) && (PalNo <= 6)
v = 40
range = 1,6

;---------------------------------------------------------------------------
; States that are always executed (use statedef -2)
;---------------------------------------------------------------------------

[Statedef -2]

[State -2, Call Shield Helper]
type = Helper
trigger1 = NumHelper(1000) = 0
helpertype = Normal
name = "Shield"
ID = 1000
pos = 0,0
postype = P1
stateno = 1000000
ownpal = 0
size.ground.back = 20
size.ground.front = 20
ignorehitpause = 1

;[State -2, ClipBoard]
;type = DisplayToClipboard
;trigger1 = 1
;text = "Shield Var = %d Random Gem = %d \n Shield Pos X = %f  Shield Pos Y = %f"
;params = Var(59), Var(40), (helper(1000), parentdist x), (helper(1000), parentdist y)

;[State -2, ClipBoard] ;Gems
;type = DisplayToClipboard
;trigger1 = 1
;text = "Random Gem = %d Level1 = %d Level2 = %d Level3 = %d"
;params = Var(40), Var(56), Var(57), Var(58)

[State -2, ClipBoard] ;Super Armor
type = DisplayToClipboard
trigger1 = 1
text = "Hit = %d Counter = %d"
params = Var(35), Var(36)

[State -2, Shield VarSet 2]
type = VarSet
triggerall = (helper(1000), StateNo != [1000000,1000100]) && (Var(59) != 1)
triggerall = (helper(1000), StateNo != 1100500) && (helper(1000), StateNo != 1101500) && (helper(1000), StateNo != 1102500)
triggerall = (helper(1000), StateNo != 1100600) && (helper(1000), StateNo != 1101600) && (helper(1000), StateNo != 1102600)
triggerall = (helper(1000), StateNo != 1110500) && (helper(1000), StateNo != 1111500) && (helper(1000), StateNo != 1112500)
triggerall = (helper(1000), StateNo != 1110600) && (helper(1000), StateNo != 1111600) && (helper(1000), StateNo != 1112600)
triggerall = (StateNo != 1201) && (StateNo != 1211) && (StateNo != 1221)
trigger1 = (StateType != C) && ((helper(1000), Pos X) - (Pos X) = [-40,40]) && ((helper(1000), Pos Y) - (Pos Y)= [-100,0])
trigger2 = (StateType = C) && ((helper(1000), Pos X) - (Pos X) = [-40,40]) && ((helper(1000), Pos Y) - (Pos Y)= [-60,0])
trigger3 = (RoundState = 0) || (RoundState = 1)
v = 59
value = 1

[State -2, Stand B Var Reset]
type = VarSet
trigger1 = StateNo != 211
v = 2
value = 0

[State -2, Stand Z Explod A] ;opponent hits ground
type = Explod
trigger1 = (enemy, StateNo = 254) && (enemy, Anim = 5100) && (NumExplod(8000) < 1)
anim = 8000
ID = 8000
postype = P2
pos = 0,0
sprpriority = -1

[State -2, Stand Z Explod B] ;opponent hits ground
type = Explod
trigger1 = (enemy, StateNo = 254) && (enemy, Anim = 5100) && (NumExplod(8001) < 1)
anim = 8001
ID = 8001
postype = P2
pos = 0,0
sprpriority = 1

[State -2, Stand Z Hit Ground Sound]
type = PlaySnd
trigger1 = (enemy, StateNo = 254) && (enemy, Anim = 5100) && (enemy, Time = 1)
value = 22,1

[State -2, Vel Var Reset]
type = VarSet
trigger1 = (StateType != A) || (P2MoveType != H)
v = 9
value = 0

[State -2, Super Jump Detect VarSet Reset]
type = VarSet
trigger1 = StateNo = 0
v = 10
value = 0

[State -2, Super Jump Var(11) Reset]
type = VarSet
trigger1 = StateNo = 0
v = 11
value = 0

[State -2, ChangeState] ;Off screen - Dash in
type = ChangeState
trigger1 = (BackEdgeBodyDist <= -50) && (StateNo != 650) && (StateNo != 651) && (RoundState = 2)
trigger1 = (StateNo = 606) || (StateNo = 612) || (StateNo = 613)
value = 650
ctrl = 0

[State -2, Recovery Roll Reset]
type = VarSet
trigger1 = (StateNo != 5050) && (StateNo != 5071)
v = 30
value = 0

[State -2, RemoveExplod];Power Gem Charging Star
type = RemoveExplod
trigger1 = StateNo != [1400,1471]
id = 8061

[State -2, VarReset];for Power Gem charging shield
type = VarSet
trigger1 = StateNo != [1450,1471]
v = 25
value = 0

;---------------------------------------
; Shield Grab
;---------------------------------------

[State -2, Shield Grab VarSet]
type = VarSet
trigger1 = (Var(59) = 1) && (Var(32) <= 1)
v = 31
value = 1

[State -2, Shield Grab VarSet]
type = VarSet
trigger1 = (Var(59) = 1) && (Var(32) > 1)
v = 31
value = 0

[State -2, Shield Grab VarAdd]
type = VarAdd
trigger1 = Var(59) = 1
v = 32
value = 1

[State -2, Shield Grab VarSet]
type = VarSet
trigger1 = Var(59) = 0
v = 32
value = 0

[State -2, Shield Grab VarSet High]
type = VarSet
trigger1 = (helper(1000), Pos Y) - (Pos Y)= [-100,-40]
v = 33
value = 1

[State -2, Shield Grab VarSet Low]
type = VarSet
trigger1 = (helper(1000), Pos Y) - (Pos Y)= [-39,0]
v = 33
value = 2

[State -2, Shield Grab VarSet Reset]
type = VarSet
trigger1 = (Var(32) > 4)
v = 33
value = 0

[State -2, AfterImageTime]
type = AfterImageTime
trigger1 = StateNo = 0
time = 1

;---------------------------------------
; AttackMulSet (Combos take less damage)
;---------------------------------------

[State -2, AttackMulSet 1]
type = AttackMulSet
triggerall = Var(40) != 12 ;not while Power Gem is active
trigger1 = Var(7) <= 1
trigger1 = StateNo != [1200,1221]
value = 1

[State -2, AttackMulSet 2]
type = AttackMulSet
triggerall = Var(40) != 12 ;not while Power Gem is active
trigger1 = Var(7) = 2
trigger1 = StateNo != [1200,1221]
value = .8

[State -2, AttackMulSet 3]
type = AttackMulSet
triggerall = Var(40) != 12 ;not while Power Gem is active
trigger1 = Var(7) = 3
trigger1 = StateNo != [1200,1221]
value = .6

[State -2, AttackMulSet 4]
type = AttackMulSet
triggerall = Var(40) != 12 ;not while Power Gem is active
trigger1 = Var(7) = 4
trigger1 = StateNo != [1200,1221]
value = .4

[State -2, AttackMulSet 5]
type = AttackMulSet
triggerall = Var(40) != 12 ;not while Power Gem is active
trigger1 = Var(7) >= 5
trigger1 = StateNo != [1200,1221]
value = .2

;---------------------------------------
; Kamek's Combo Ranking (altered to suit Captain America)
;---------------------------------------

[State -2, Set Up For Count]
type = VarSet
trigger1 = P2MoveType = H
trigger1 = Var(5) = 0
v = 5
value = 1

[State -2, Keep Track Of Hit Count]
type = VarSet
;triggerall = StateNo < 1000
trigger1 = HitCount > 0
trigger1 = Var(5) != 0
v = 6
value = HitCount

[State -2, Add To Total Hit Count]
type = VarSet
;triggerall = StateNo < 1000
triggerall = Var(5) != 0
trigger1 = HitCount = 0
trigger2 = P2MoveType != H
v = 7
value = Var(7) + Var(6)

[State -2, Projectile Hits]
type = VarSet
;triggerall = StateNo < 1000
triggerall = Var(5) != 0
trigger1 = ProjHit = 1
v = 7
value = Var(7) + 1

[State -2, Reset Current Hit Count]
type = VarSet
trigger1 = HitCount = 0
trigger1 = Var(5) != 0
v = 6
value = 0

[State -2, Combo Is Finished]
type = VarSet
trigger1 = EnemyNear, MoveType != H
trigger1 = Var(5) != 0
v = 6
value = 0

[State -2, Reset]
type = VarSet
triggerall = Var(5) != 0
trigger1 = EnemyNear, MoveType != H
v = 5
value = 0

[State -2, Reset]
type = VarSet
trigger1 = Var(5) = 0
trigger1 = Var(7) > 0
v = 7
value = 0

;---------------------------------------
; Level Up Spark
;---------------------------------------

[State -2, VarAdd 1]
type = VarAdd
triggerall = RoundState = 2
trigger1 = (Power >= 1000) && (Var(56) < 5)
v = 56
value = 1

[State -2, Var(20) Reset]
type = VarSet
trigger1 = Power < 999
v = 56
value = 0

[State -2, VarAdd 2]
type = VarAdd
triggerall = RoundState = 2
trigger1 = (Power >= 2000) && (Var(57) < 5)
v = 57
value = 1

[State -2, Var(21) Reset]
type = VarSet
trigger1 = Power < 1999
v = 57
value = 0

[State -2, VarAdd 3]
type = VarAdd
triggerall = RoundState = 2
trigger1 = (Power >= 3000) && (Var(58) < 5)
v = 58
value = 1

[State -2, Var(22) Reset]
type = VarSet
trigger1 = Power < 2999
v = 58
value = 0

[State -2, Level Up Explod]
type = Explod
triggerall = (NumExplod(8052) = 0) && (RoundState != [0,1])
trigger1 = (Var(56) = 1) || (Var(57) = 1) || (Var(58) = 1)
anim = 8052
id = 8052
postype = P1
pos = 5,0
bindtime = -1
sprpriority = 5
ownpal = 1

[State -2, PlaySnd] ;"Level Up"
type = PlaySnd
triggerall = (NumExplod(8052) = 1) && (RoundState != [0,1])
trigger1 = (Var(56) = 1) || (Var(57) = 1) || (Var(58) = 1)
value = 40,2

[State -2, PlaySnd] ;Level Up FX
type = PlaySnd
triggerall = (NumExplod(8052) = 1) && (RoundState != [0,1])
trigger1 = (Var(56) = 1) || (Var(57) = 1) || (Var(58) = 1)
value = 70,0

;---------------------------------------
; Gems System
;---------------------------------------

[State -2, Gem Display];P1 Side
type = Explod
triggerall = TeamSide = 1
trigger1 = (Var(40) = [1,6]) && (NumExplod(8070) < 1)
anim = (8069 + Var(40))
id = 8070
postype = Left
pos = 22,234
facing = 1
bindtime = -1
removetime = -1
ontop = 1
ownpal = 1
supermovetime = -1

[State -2, Gem Display];P2 Side
type = Explod
triggerall = TeamSide = 2
trigger1 = (Var(40) = [1,6]) && (NumExplod(8070) < 1)
anim = (8069 + Var(40))
id = 8070
postype = Right
pos = -22,234
facing = 1
bindtime = -1
removetime = -1
ontop = 1
ownpal = 1
supermovetime = -1

[State -2, RemoveExplod];Remove Activated Gem
type = RemoveExplod
trigger1 = (NumExplod(8100) <= 0) && (Var(40) = [11,16])
id = 8110

[State -2, RemoveExplod];Remove Gem Word
type = RemoveExplod
trigger1 = (NumExplod(8100) <= 0) && (Var(40) = [11,16])
id = 8140

[State -2, VarSet];Gem reset
type = VarSet
trigger1 = (NumExplod(8100) <= 0) && (Var(40) = [11,16])
v = 40
value = 0

;-----|Mind Gem|-----
[State -2, Mind Gem PowerAdd]
type = PowerAdd
trigger1 = Var(40) = 11
value = 5
ignorehitpause = 1

;-----|Power Gem|-----
[State -2, AttackMulSet 1]
type = AttackMulSet
triggerall = Var(40) = 12
trigger1 = Var(7) <= 1
trigger1 = StateNo != [1200,1221]
value = 1.5

[State -2, AttackMulSet 2]
type = AttackMulSet
triggerall = Var(40) = 12
trigger1 = Var(7) = 2
trigger1 = StateNo != [1200,1221]
value = 1.2

[State -2, AttackMulSet 3]
type = AttackMulSet
triggerall = Var(40) = 12
trigger1 = Var(7) = 3
trigger1 = StateNo != [1200,1221]
value = 0.9

[State -2, AttackMulSet 4]
type = AttackMulSet
triggerall = Var(40) = 12
trigger1 = Var(7) = 4
trigger1 = StateNo != [1200,1221]
value = .6

[State -2, AttackMulSet 5]
type = AttackMulSet
triggerall = Var(40) = 12
trigger1 = Var(7) >= 5
trigger1 = StateNo != [1200,1221]
value = .3

;-----|Reality Gem|-----

[State -2, Fire Burn Explod 1]
type = Explod
trigger1 = (ProjHit270 = 1) && (NumExplod(8170) < 3)
anim = 8170
id = 8170
postype = P2
pos = 6,0
random = 30,60
facing = -1
ownpal = 1
bindtime = -1
sprpriority = 4

[State -2, VarAdd]
type = VarAdd
trigger1 = Var(38) < 4
v = 38
value = 1
ignorehitpause = 1

[State -2, VarSet]
type = VarSet
trigger1 = Var(38) >= 4
v = 38
value = 0
ignorehitpause = 1

[State -2, Electricity Explod 3]
type = Explod
trigger1 = (ProjHit295 = 1) && (NumExplod(8180) > 0) && (NumExplod(8181) < 2)
anim = 8182
id = 8181
postype = P2
pos = -16,26
facing = -1
ownpal = 1
bindtime = -1
sprpriority = 4

[State -2, Electricity Explod 4]
type = Explod
trigger1 = (ProjHit295 = 1) && (NumExplod(8180) > 0) && (NumExplod(8181) < 2)
anim = 8183
id = 8181
postype = P2
pos = -10,-10
facing = -1
ownpal = 1
bindtime = -1
sprpriority = -1

[State -2, Electricity Explod 1]
type = Explod
trigger1 = (ProjHit295 = 1) && (NumExplod(8180) < 2)
anim = 8180
id = 8180
postype = P2
pos = 0,-10
facing = -1
ownpal = 1
bindtime = -1
sprpriority = 4

[State -2, Electricity Explod 2]
type = Explod
trigger1 = (ProjHit295 = 1) && (NumExplod(8180) < 2)
anim = 8181
id = 8180
postype = P2
pos = 0,-30
;random = 30,10
facing = -1
ownpal = 1
bindtime = -1
sprpriority = -1

;-----|Soul Gem|-----
[State -2, Soul Gem LifeAdd]
type = LifeAdd
trigger1 = Var(40) = 14
value = 1
ignorehitpause = 1

;-----|Space Gem|-----

[State -2, VarSet]
type = VarSet
trigger1 = (MoveType != H) && (StateNo != 3950)
v = 27
value = StateNo

[State -2, DefenceMulSet]
type = DefenceMulSet
trigger1 = Var(40) = 15
value = 0.70

[State -2, VarAdd 1];Limits HitOverRide
type = VarAdd
trigger1 = StateNo = 3950
v = 28
value = 5

[State -2, VarAdd 2];Limits HitOverRide
type = VarAdd
trigger1 = (StateNo != 3950) && (Var(28) > 0)&& (MoveType != H)
v = 28
value = -1

[State -2, VarSet X]
type = VarSet
trigger1 = StateNo != 3950
fv = 30
value = Vel X

[State -2, VarSet Y]
type = VarSet
trigger1 = StateNo != 3950
fv = 31
value = Vel Y

;---------------------------------------------------------------------------
; States that are executed when in self's state file (use statedef -3)
;---------------------------------------------------------------------------

[Statedef -3]

[State -3, Landing Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 52 ;Jump land
trigger2 = stateno = 106 ;Run-back land
value = 10,1

[State -3, Landing Dust]
type = Explod
anim = 8030
triggerall = PalNo > 6
triggerall = Time = 1
trigger1 = stateno = 52
postype = P1
pos = 0,2
ownpal = 1

[State -3, AfterImageTime]
type = AfterImageTime
trigger1 = MoveType = H
time = 1

[State -3, Hyper ChargeVarAdd]
type = VarAdd
trigger1 = StateNo = [3201,3202]
v = 20
value = 1

[State -3, Hyper ChargeVarSet]
type = VarSet
trigger1 = StateNo != [3201,3202]
v = 20
value = 0

[State -3, HitSound VarRandom]
type = VarRandom
trigger1 = 1
v = 23
range = 500
ignorehitpause = 1

[State -3, HitSound Light]
type = PlaySnd
triggerall = (Time = 1) && (Var(23) = [300,470])
triggerall = (Anim = [5000,5001]) || (Anim = [5010,5011]) || (Anim = [5020,5021])
trigger1 = (StateNo = 5000) || (StateNo = 5010) || (StateNo = 5020)
value = 31,0
channel = 0

[State -3, HitSound Hard]
type = PlaySnd
triggerall = (Time = 1) && (Var(23) = [300,470])
triggerall = (Anim = 5002) || (Anim = 5012) || (Anim = 5022)
trigger1 = (StateNo = 5000) || (StateNo = 5010) || (StateNo = 5020)
value = 31,1

;-----|Space Gem|-----

[State -3, Space Gem HitOverRide]
type = HitOverRide
trigger1 = (Var(40) = 15) && (Var(28) < 15)
trigger1 = StateNo != [120,155]
attr = SCA, NA, NP, SA, SP
slot = 1
stateno = 3950
time = 1

;-----|Dizzy System|-----

[State -3, Counter Add]
type = VarAdd
triggerall = Time = 0
trigger1 = (StateNo = 5000) || (StateNo = 5010) || (StateNo = 5020) || (StateNo = 5070) || (StateNo = 5080)
v = 36
value = 1
ignorehitpause = 1

[State -3, Counter Reset]
type = VarSet
trigger1 = MoveType != H
v = 36
value = 0
ignorehitpause = 1

[State -3, Varadd]
type = VarAdd
triggerall = (Time = 0) && (Var(36) < 15)
trigger1 = (StateNo = 5000) || (StateNo = 5010) || (StateNo = 5020) || (StateNo = 5070) || (StateNo = 5080)
v = 35
value = ((GetHitVar(animtype)=0)*100)+((GetHitVar(animtype)=1)*200)+((GetHitVar(animtype)=2)*300)+((GetHitVar(animtype)>=3)*400)

[State -3, VarSubtract]
type = VarAdd
trigger1 = Var(35) > 0
v = 35
value = ifelse(MoveType = A,-3,-2)

[State -3, VarSet]
type = VarSet
trigger1 = Var(35) < 0
v = 35
value = 0
ignorehitpause = 1

[State -3, ChangeState]
type = ChangeState
triggerall = Time = 1
trigger1 = (StateNo = 5000) || (StateNo = 5010) || (StateNo = 5020) || (StateNo = 5070) || (StateNo = 5080)
trigger1 = (Var(35) >= 8000) && (LoseKO = 0)
value = 970
ignorehitpause = 1
persistent = 0