;Gravity Bullet

[Statedef 1000]

type = S

movetype = A

physics = S

anim = 1000

ctrl = 0

velset = 0,0

poweradd = 70 * !var(20)

sprpriority = 2

facep2 = 1

[State 1000, Voice]

type = PlaySnd

trigger1 = AnimElem = 1

value = 0,0

channel = 0

[State 1000, Swing Snd]

type = PlaySnd

trigger1 = Animelem = 5

value = 1, 2

[State 1600, Projectile]

type = Helper

trigger1 = AnimElem = 4

helperType = Normal

stateNo = 1005

ID = 1005

name = "Gravity Bullet"

posType = P1

pos = 52,0

size.xScale = 0.5

size.yScale = 0.5

ownPal = 1

[State 1600, Width]

type = Width

trigger1 = AnimElemTime(4) = 0

value = 30,0

[State 1600, ChangeState]

type = ChangeState

trigger1 = !AnimTime

value = 0

ctrl = 1

;Gravity Bullet Projectile

[StateDef 1005]

type = A

physics = N

moveType = A

ctrl = 0

sprPriority = 3

[State 1605, ChangeAnim]

type = ChangeAnim

trigger1 = Anim != 1005

value = 1005

[State 1605, HitOverride]

type = HitOverride

trigger1 = 1

attr = SCA,AA,AP,AT

time = -1

stateno = 1007

ignoreHitPause = 1

[State 1605, HitBy]

type = HitBy

trigger1 = 1

value = SCA,NP,SP,HP

time = -1

ignoreHitPause = 1

[State 1605, VelSet]

type = VelSet

trigger1 = 1

x = 8

[State 1605, Counter Flag]

type = VarSet

trigger1 = NumEnemy

trigger1 = MoveContact != 1

var(9) = (EnemyNear, MoveType = A)

[State 1605, Dampener]

type = VarSet

trigger1 = 1

fvar(11) = (Root, fvar(10)) * ifElse(var(9), 1.2, 1)

[State 1605, Projectile Flag Increment]

type = ParentVarAdd

trigger1 = !Time

var(39) = 1

[State 1605, Transparency]

type = Trans

trigger1 = 1

trans = AddAlpha

alpha = 256, 256

ignoreHitPause = 1

[State 1605, Miss]

type = HitDef

trigger1 = 1

attr = S,SP

hitFlag =

sparkXY = -10,0

[State 1605, HitDef]

type = HitDef

trigger1 = !(Root, var(16)) && (Root, var(15) < 1 || Root, var(20))

trigger1 = 1

attr = S,SP

hitFlag = MAF

guardFlag = MA

priority = 4, Hit

damage = ceil(ifElse(fvar(11) * ifElse(var(10) = 2, 70, ifElse(var(10), 63, 56)) < 7, 7, fvar(11) * ifElse(var(10) = 2, 70, ifElse(var(10), 63, 56)))), 7

getPower = ifElse(!(Root, var(13)), 144, 72) * !(Root, var(20)), 36 * !(Root, var(20))

givePower = 36, 36

pauseTime = 0, ifElse((Root, var(20)), 6, 12)

guard.pauseTime = 0, ifElse((Root, var(20)), 6, 12)

animType = Hard

air.animType = Back

fall.animType = Back

ground.type = Low

air.type = Low

ground.hitTime = 12

ground.slideTime = 12

guard.hitTime = 12

air.hitTime = 60

airGuard.ctrlTime = 16

ground.velocity = -10.52, 0

ground.cornerPush.velOff = 0

guard.velocity = -10.52

guard.cornerPush.velOff = 0

air.velocity = -4.31, -7.36

air.cornerPush.velOff = 0

airGuard.velocity = -5, 0

airGuard.cornerPush.velOff = 0

yAccel = 0.58

fall = 0

air.fall = 1

fall.recover = 1

fall.recoverTime = 22 + ifElse(Root, var(20), 6, 12)

forceStand = 1

hitSound = -1

guardSound = -1

sparkNo = -1

guard.SparkNo = -1

sparkXY = -10, -32

palFX.time = 24

palFX.mul = 128, 128, 128

palFX.sinAdd = 96, 96, 96, 4

envShake.time = 14

envShake.ampl = 4

envShake.freq = 120

sprPriority = 3

[State 1605, ChangeState]

type = ChangeState

trigger1 = MoveContact

value = 1006

ignoreHitPause = 1

[State 1605, Projectile Flag Off]

type = ParentVarAdd

trigger1 = FrontEdgeDist < -100 || BackEdgeDist < -100

var(39) = -1

[State 1605, End]

type = DestroySelf

trigger1 = FrontEdgeDist < -100 || BackEdgeDist < -100

;Hit Pause

[StateDef 1006]

type = A

physics = N

moveType = A

ctrl = 0

sprPriority = 3

moveHitPersist = 1

[State 1606, PosFreeze]

type = PosFreeze

trigger1 = 1

value = 1

[State 1606, HitSound]

type = PlaySnd

trigger1 = MoveContact = 1 && NumTarget

trigger1 = !(Target, HitShakeOver)

value = ifElse(MoveGuarded, 3, 2), ifElse(MoveGuarded, 0, 6)

channel = 2

ignorehitPause = 1

[State 1606, HitSpark]

type = Helper

trigger1 = MoveContact = 1 && NumTarget

trigger1 = !(Target, HitShakeOver)

helperType = Normal

stateNo = ifElse(MoveGuarded, 8001, 8013)

ID = 8000

name = "Spark"

posType = P1

pos = ifElse(P2Dist x < 0, 0, ifElse(P2Dist x < 20, ceil(P2Dist x), 20)), -24

facing = -1

ownPal = 1

size.xScale = 1

size.yScale = 1

pauseMoveTime = 65535

superMoveTime = 65535

ignoreHitPause = 1

[State 1606, HitCount]

type = ParentVarAdd

trigger1 = !Time

trigger1 = MoveContact && NumTarget

var(13) = 1

[State 1606, Juggle Points]

type = ParentVarAdd

trigger1 = !Time

trigger1 = MoveContact && NumTarget

trigger1 = !(HitDefAttr = SCA,AT)

var(15) = 1

[State 1606, ProjContact]

type = VarSet

trigger1 = MoveContact && NumTarget

var(18) = 1

[State 1606, ProjContact]

type = ParentVarSet

triggerAll = MoveContact && NumTarget

trigger1 = Root, StateNo = 1000

var(18) = 1

[State 1606, ProjContact (for Benimaru's Daimon helper]

type = ParentVarSet

trigger1 = MoveHit && NumTarget

var(45) = 3

[State 1606, End]

type = ChangeState

trigger1 = Time >= 0

trigger2 = Time >= 1

value = 1007

;Disappear

[StateDef 1007]

type = A

physics = N

moveType = A

anim = 1007

ctrl = 0

velSet = 0,0

sprPriority = 3

moveHitPersist = 1

[State 1607, Projectile Flag Decrement]

type = ParentVarAdd

trigger1 = !Time

var(39) = -1

[State 1607, PlaySnd]

type = PlaySnd

trigger1 = !Time

value = 2,6

channel = 2

volume = -128

lowPriority = 1

[State 1607, Transparency]

type = Trans

trigger1 = 1

trans = AddAlpha

alpha = 256,256

ignoreHitPause = 1

[State 1607, End]

type = ChangeState

trigger1 = !AnimTime

value = 1008

;Wait

[StateDef 1008]

type = A

physics = N

moveType = I

anim = 1

ctrl = 0

velSet = 0,0

[State 1608, End]

type = DestroySelf

trigger1 = !NumTarget

trigger2 = NumTarget

trigger2 = Target, Time <= 1 && !(Target, HitShakeOver)