;===========================================================================
; Electric Cage FX
;===========================================================================
[Statedef 3005]
type = A
physics = N
movetype = A
ctrl = 0
sprpriority = 3
[State 3005, HitOverride]
type = hitoverride
trigger1 = 1
attr = SCA, AA, AP, AT
time = -1
stateno = 3008
ignorehitpause = 1
[State 3005, HB]
type = hitby
trigger1 = 1
value = SCA, NP, SP, HP
time = -1
ignorehitpause = 1
[State 3005, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
[State 3005, Anim]
type = changeanim
trigger1 = anim != 3005
value = 3005
[State 3005, Counter Flag]
type = varset
trigger1 = numenemy
trigger1 = movecontact != 1
var(9) = (enemynear, movetype = A)
[State 3005, Dampener]
type = varset
trigger1 = 1
fvar(11) = (root, fvar(10)) * ifelse(var(9), 1.2, 1)
[State 3005, HitSound]
type = playsnd
trigger1 = movecontact = 1 && numtarget
trigger1 = !(target, hitshakeover)
value = 2,6
channel = 2
ignorehitpause = 1
[State 0, VelSet]
type = VelSet
trigger1 = 1
x = 1
y = 0
[State 3005, Hit]
type = hitdef
trigger1 = 1
attr = A, HP
hitflag = MAFP
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 35 < 7, 7, fvar(11) * 35)), 7
getpower = 0,0
givepower = 36, 36
pausetime = 0, 12
guard.pausetime = 0, 10
animtype = Hard
air.animtype = hard
fall.animtype = hard
ground.type = High
air.type = Low
ground.hittime = 18
ground.slidetime = 18
guard.hittime = 16
air.hittime = 60
airguard.ctrltime = 16
ground.velocity = 0, 0
ground.cornerpush.veloff = 0
guard.velocity = -4
guard.cornerpush.veloff = 0
air.velocity = 0, 0
air.cornerpush.veloff = 0
airguard.velocity = -5, 0
airguard.cornerpush.veloff = 0
down.velocity = 0, 0
down.cornerpush.veloff = 0
yaccel = 0.58
fall = 0
fall.recover = 0
air.fall = 1
forcestand = 1
hitsound = -1
guardsound = s130,1
sparkno = -1
guard.sparkno = -1
sparkxy = -1,-1
p2stateno = 4050
envshake.time = 18
envshake.ampl = 6
envshake.freq = 120
[State 3005, End]
type = changestate
trigger1 = movecontact
value = 3006
ignorehitpause = 1
[State 3005, End]
type = destroyself
trigger1 = pos x != [ -200, 200]
; Connected
[Statedef 3006]
type = A
physics = N
movetype = A
ctrl = 0
sprpriority = 3
hitcountpersist = 1
[State 3006, HitOverride]
type = hitoverride
trigger1 = 1
attr = SCA, AA, AP, AT
time = -1
stateno = 3006
ignorehitpause = 1
[State 3006, HB]
type = hitby
trigger1 = 1
value = SCA, NP, SP, HP
time = -1
ignorehitpause = 1
[State 3006, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
[State 3006, Anim]
type = changeanim
trigger1 = anim != 3006
value = 3006
[State 3006, PosFreeze]
type = PosFreeze
trigger1 = 1
value = 1
ignorehitpause = 1
[State 3006, Counter Flag]
type = varset
trigger1 = numenemy
trigger1 = movecontact != 1
var(9) = (enemynear, movetype = A)
[State 3006, Dampener]
type = varset
trigger1 = 1
fvar(11) = (root, fvar(10)) * ifelse(var(9), 1.2, 1)
[State 3006, Miss]
type = hitdef
trigger1 = 1
attr = A, HP
hitflag =
sparkxy = -10, 0
[State 3006, Hit]
type = hitdef
triggerall = anim = 3001
trigger1 = time = 2 || time = 10 || time = 18 || time = 26 || time = 34 || time = 42 || time = 50
attr = A, HP
hitflag = MAFP
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 35 < 7, 7, fvar(11) * 35)), 7
getpower = 0,0
givepower = 36, 36
pausetime = 0, 2
guard.pausetime = 0, 1
animtype = Hard
air.animtype = Hard
fall.animtype = Hard
ground.type = low
air.type = Low
ground.hittime = 12
ground.slidetime = 2
guard.hittime = 12
air.hittime = 60
airguard.ctrltime = 12
ground.velocity = 15, 0
ground.cornerpush.veloff = 0
guard.velocity = 12
guard.cornerpush.veloff = 0
air.velocity= 2,5
air.cornerpush.veloff = 0
airguard.velocity = -5, 0
airguard.cornerpush.veloff = 0
yaccel = 0.58
fall = 0
fall.recover = 0
air.fall = 1
forcestand = 1
hitsound = -1
guardsound = s130,1
sparkno = -1
guard.sparkno = -1
sparkxy = -1,-1
p2stateno = 4051
envshake.time = 18
envshake.ampl = 6
envshake.freq = 120
[State 3006, Hit]
type = hitdef
triggerall = anim = 3001
trigger1 = time = 6 || time = 14 || time = 22 || time = 30 ||time = 38 || time = 46
attr = A, HP
hitflag = MAFP
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 35 < 7, 7, fvar(11) * 35)), 7
getpower = 0,0
givepower = 36, 36
pausetime = 0, 2
guard.pausetime = 0, 1
animtype = Hard
air.animtype = Hard
fall.animtype = Hard
ground.type = low
air.type = Low
ground.hittime = 12
ground.slidetime = 2
guard.hittime = 12
air.hittime = 60
airguard.ctrltime = 12
ground.velocity = -15, 0
ground.cornerpush.veloff = 0
guard.velocity = -12
guard.cornerpush.veloff = 0
air.velocity = -2,5
air.cornerpush.veloff = 0
airguard.velocity = -5, 0
airguard.cornerpush.veloff = 0
yaccel = 0.58
fall = 0
fall.recover = 0
air.fall = 1
forcestand = 1
hitsound = -1
guardsound = s130,1
sparkno = -1
guard.sparkno = -1
sparkxy = -1,-1
p2stateno = 4051
envshake.time = 18
envshake.ampl = 6
envshake.freq = 120
[State 3006, Hit]
type = hitdef
triggerall = anim = 3001
trigger1 = time = 54
attr = A, HP
hitflag = MAFP
guardflag = M
priority = 4, Hit
damage = ceil(ifelse(fvar(11) * 35 < 7, 7, fvar(11) * 35)), 7
getpower = 0,0
givepower = 36, 36
pausetime = 0, 12
guard.pausetime = 0, 10
animtype = Hard
air.animtype = Hard
fall.animtype = Hard
ground.type = low
air.type = Low
ground.hittime = 12
ground.slidetime = 2
guard.hittime = 12
air.hittime = 60
airguard.ctrltime = 12
ground.velocity = -5,-8
ground.cornerpush.veloff = 0
guard.velocity = -9
guard.cornerpush.veloff = 0
air.velocity = -2,5
air.cornerpush.veloff = 0
airguard.velocity = -5,-6.5
airguard.cornerpush.veloff = 0
yaccel = 0.58
fall = 1
fall.recover = 0
air.fall = 1
forcestand = 1
hitsound = -1
guardsound = s130,1
sparkno = -1
guard.sparkno = -1
sparkxy = -1,-1
envshake.time = 18
envshake.ampl = 6
envshake.freq = 120
[State 3006, End]
type = changestate
trigger1 = movecontact
value = 3006
ignorehitpause = 1
[State 3006, End]
type=changestate
trigger1 = root, movetype = H
trigger2 = root, anim != 3001
value = 3007
ignorehitpause = 1
; Hitpause
[Statedef 3007]
type = A
physics = N
movetype = A
ctrl = 0
sprpriority = 3
movehitpersist = 1
hitcountpersist = 1
[State 3007, Freeze]
type = posfreeze
trigger1 = 1
value = 1
[State 3007, HitSound]
type = playsnd
trigger1 = movecontact = 1 && numtarget
trigger1 = !(target, hitshakeover)
value = 2,6
channel = 2
ignorehitpause = 1
[State 3007, Helper]
type = Helper
trigger1 = movecontact = 1 && numtarget
trigger1 = !(target, hitshakeover)
helpertype = normal
stateno = ifelse(moveguarded, 8000, 8030)
ID = 8000
name = "HitSpark"
postype = p1
pos = ifelse(p2dist x < 0, 0, ifelse(p2dist x < 170, ceil(p2dist x), 170)), 0
facing = -1
ownpal = 1
pausemovetime = 65535
supermovetime = 65535
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
[State 3007, Helper]
type = Helper
trigger1 = movecontact = 1 && numtarget && var(9)
trigger1 = !(target, hitshakeover)
helpertype = normal
stateno = 8290
ID = 8290
name = "CounterFX"
postype = p1
pos = ifelse(p2dist x < 0, 0, ifelse(p2dist x < 20, ceil(p2dist x), 20)), 0
ownpal = 1
pausemovetime = 65535
supermovetime = 65535
ignorehitpause = 1
[State 3007, Helper]
type = helper
trigger1 = !numhelper(7181)
trigger1 = movehit = 1 && numtarget
trigger1 = !(target, hitshakeover) && (target, movetype = H)&&((enemynear,stateno=[5000,5050])||(enemynear,stateno=4051))
helpertype = normal
stateno = 7181
ID = 7181
name = "P2Electricity"
postype = p2
ownpal = 1
pausemovetime = 255
ignorehitpause = 1
[State 3007, HitCount]
type = parentvaradd
trigger1 = !time
trigger1 = movecontact && numtarget
var(13) = 1
[State 3007, Juggle]
type = parentvaradd
trigger1 = !time
trigger1 = movecontact && numtarget
var(15) = 1
[State 3007, ProjContact]
type = varset
trigger1 = movecontact && numtarget
var(18) = 1
[State 3007, ProjContact]
type = parentvarset
trigger1 = movecontact && numtarget
trigger1 = root, stateno = 3001
var(18) = 1
[State 3007, End]
type = changestate
trigger1 = time >= 56
value = 3008
; Disappear
[Statedef 3008]
type = A
physics = N
movetype = A
anim = 3008
ctrl = 0
velset = 0,0
sprpriority = 3
movehitpersist = 1
[State 3008, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = s18,2
channel = 10
ignorehitpause = 1
[State 3008, End]
type = changestate
trigger1 = !animtime
value = 1008