Die API-Referenz stammt aus den Go-Doc-Kommentaren im Quellcode und ist auf Englisch verfasst.
package moves
import "github.com/nsgo-dev/game/pkg/pixelfx/moves"Übersicht
Package moves is pixelfx's moves category: whole attacks, wind-up to recovery, chained from the effects of the other categories and acted out by a character (pixelfx.Perform), each a pixelfx.Effect registered as "moves/<name>" when the package is imported.
It holds the arrow shot, dash strike, earth stomp, fireball throw, ground pound, holy smite, ice lance throw, lightning call, meteor call, pistol shots, rocket launcher and sword combo.
Index
Variablen
var ArrowShot = &pixelfx.Effect{
Meta: pixelfx.Meta{
Name: "Arrow shot",
Desc: "He raises the bow, draws to his cheek, holds his breath and looses: the string snaps forward, the arrow crosses the floor and thuds home.",
Tags: []string{"move", "bow", "arrow", "projectile", "ranged", "one-shot"},
Size: [2]int{300, 74},
Origin: [2]int{38, 66},
Duration: 1.9,
FPS: 30,
BG: "ground",
Actor: 2,
Options: []pixelfx.Option{{Name: "seed", Default: pixelfx.Num(1)}},
},
Act: &pixelfx.Act{
Targets: []float64{arrowTX},
Poses: []pixelfx.Key{
{T: -0.44, Pose: arrowRest},
{T: -0.14, Pose: arrowAim},
{T: 0.16, Pose: arrowDrawn},
{T: arrowLoose, Pose: arrowDrawn.With(pixelfx.Crouch.Is(4))},
{T: arrowLoose + 0.002, Pose: arrowLoosed, How: "snap"},
{T: 1.1, Pose: arrowLoosed.With(pixelfx.BX.Is(-6), pixelfx.BY.Is(-25))},
{T: 1.6, Pose: arrowRest},
{T: 1.9, Pose: arrowRest},
},
Hits: []pixelfx.Hit{
{T: arrowHit, Stop: 0.07, Shake: 0.12, Amp: pixelfx.Val(2), Push: pixelfx.Val(2.2), Straw: pixelfx.Val(14), Y: pixelfx.Val(-28)},
},
},
New: pixelfx.Chain([]pixelfx.Cue{
{FX: projectiles.Arrow, T: arrowLoose, Until: arrowHit, XFn: func(t float64) float64 { return 30 + (t-arrowLoose)*arrowSpeed }, Y: -28},
{FX: impacts.HitSpark, T: arrowHit, X: arrowTX - 10, Options: map[string]pixelfx.Value{"height": pixelfx.Num(30)}},
}),
}ArrowShot is a move: he raises the bow, draws to his cheek, holds his breath and looses; the string snaps forward, the arrow crosses the floor and thuds home. It chains projectiles.Arrow and impacts.HitSpark, and is registered as "moves/arrow-shot".
var DashStrike = &pixelfx.Effect{
Meta: pixelfx.Meta{
Name: "Dash strike",
Desc: "A crouch, then he's across the floor in a blur of after-images and already cutting: a critical hit, a beat, and he hops back to where he started.",
Tags: []string{"move", "melee", "sword", "dash", "crit", "one-shot"},
Size: [2]int{372, 156},
Origin: [2]int{66, 136},
Duration: 2.3,
FPS: 30,
BG: "ground",
Actor: 2,
Options: []pixelfx.Option{{Name: "seed", Default: pixelfx.Num(1)}},
},
Act: &pixelfx.Act{
Targets: []float64{dashTX},
Poses: []pixelfx.Key{
{T: -0.5, Pose: dashGuard.With(pixelfx.X.Is(0))},
{T: -0.16, Pose: dashLow.With(pixelfx.X.Is(-2))},
{T: -0.01, Pose: dashLow.With(pixelfx.X.Is(-3), pixelfx.Crouch.Is(6))},
{T: 0, Pose: dashLow.With(pixelfx.X.Is(8), pixelfx.Ghost.Is(1)), How: "snap"},
{T: 0.14, Pose: dashLow.With(pixelfx.X.Is(dashAt-6), pixelfx.Ghost.Is(1)), How: "line"},
{T: 0.145, Pose: dashCock, How: "snap"},
{T: dashCut, Pose: dashCutP, How: "snap"},
{T: dashHit, Pose: dashDown, How: "snap"},
{T: 0.75, Pose: dashDown.With(pixelfx.Crouch.Is(4), pixelfx.Lean.Is(4))},
{T: 1.25, Pose: dashGuard.With(pixelfx.X.Is(dashAt + 2))},
{T: 1.32, Pose: dashGuard.With(pixelfx.X.Is(dashAt+2), pixelfx.Crouch.Is(5), pixelfx.Lean.Is(-2)), How: "snap"},
{T: 1.4, Pose: dashHop.With(pixelfx.X.Is(dashAt - 28)), How: "snap"},
{T: 1.6, Pose: dashHop.With(pixelfx.X.Is(22), pixelfx.Y.Is(-18)), How: "line"},
{T: 1.74, Pose: dashGuard.With(pixelfx.X.Is(0), pixelfx.Y.Is(0), pixelfx.Crouch.Is(5)), How: "line"},
{T: 2.2, Pose: dashGuard.With(pixelfx.X.Is(0))},
},
Hits: []pixelfx.Hit{
{T: dashHit, Stop: 0.17, Shake: 0.26, Amp: pixelfx.Val(3), Push: pixelfx.Val(3.4), Straw: pixelfx.Val(32)},
},
Dust: []pixelfx.DustKick{
{T: 0, X: 0, N: 8, Dir: -1},
{T: 0.14, X: dashAt - 6, N: 7},
{T: 1.74, X: 0, N: 6},
},
},
New: pixelfx.Chain([]pixelfx.Cue{
{FX: melee.SwordSlash, T: dashCut, X: dashAt},
{FX: impacts.CritHit, T: dashHit, X: dashTX - 10, Options: map[string]pixelfx.Value{"height": pixelfx.Num(28)}},
}),
}DashStrike is a move: a crouch, then he's across the floor in a blur of after-images and already cutting; a critical hit, a beat, and he hops back to where he started. It chains melee.SwordSlash and impacts.CritHit, and is registered as "moves/dash-strike".
var EarthStomp = &pixelfx.Effect{
Meta: pixelfx.Meta{
Name: "Earth stomp",
Desc: "A knee comes up, the boot slams down, the floor heaves under the target and a stone spike rams up through it.",
Tags: []string{"move", "earth", "spell", "stomp", "one-shot"},
Size: [2]int{290, 142},
Origin: [2]int{50, 128},
Duration: stompT + 3.4,
FPS: 30,
BG: "ground",
Actor: 2,
Options: []pixelfx.Option{{Name: "seed", Default: pixelfx.Num(1)}},
},
Act: &pixelfx.Act{
Targets: []float64{stompTarget},
Poses: []pixelfx.Key{
{T: -0.5, Pose: pixelfx.Ready},
{T: -0.14, Pose: stompKnee},
{T: stompT - 0.005, Pose: stompKnee.With(pixelfx.FFY.Is(-17))},
{T: stompT, Pose: stompSlam, How: "snap"},
{T: stompRam + 0.5, Pose: stompSlam.With(pixelfx.Crouch.Is(5))},
{T: stompRam + 1.1, Pose: pixelfx.Ready},
{T: stompT + 3.4, Pose: pixelfx.Ready},
},
Hits: []pixelfx.Hit{
{T: stompT, Stop: 0.1, Shake: 0.2, Amp: pixelfx.Val(3), NoTarget: true},
{T: stompRam, Stop: 0.14, Shake: 0.28, Amp: pixelfx.Val(3), Push: pixelfx.Val(-3.2), Straw: pixelfx.Val(30), Y: pixelfx.Val(-10)},
},
Dust: []pixelfx.DustKick{{T: stompT, X: 11, N: 9}},
},
New: pixelfx.Chain([]pixelfx.Cue{{FX: nature.EarthSpike, T: stompT, X: stompTarget}}),
}EarthStomp is a move: a knee comes up, the boot slams down, the floor heaves under the target and a stone spike rams up through it. It chains nature.EarthSpike and is registered as "moves/earth-stomp".
var FireballThrow = &pixelfx.Effect{
Meta: pixelfx.Meta{
Name: "Fireball throw",
Desc: "He gathers fire in his hand, leans back and hurls it: the ball flies, the target takes it in a blast and comes out charred.",
Tags: []string{"move", "fire", "spell", "projectile", "explosion", "one-shot"},
Size: [2]int{356, 244},
Origin: [2]int{64, 198},
Duration: fireballHit + 5.4,
FPS: 30,
BG: "ground",
Actor: 2,
Options: []pixelfx.Option{{Name: "seed", Default: pixelfx.Num(1)}},
},
Act: &pixelfx.Act{
Targets: []float64{fireballTX},
Poses: []pixelfx.Key{
{T: -0.42, Pose: pixelfx.Ready.With(pixelfx.X.Is(-3))},
{T: 0.08, Pose: fireballHold},
{T: 0.5, Pose: fireballHold},
{T: fireballThrow - 0.03, Pose: fireballHold.With(pixelfx.Crouch.Is(5), pixelfx.Lean.Is(-2), pixelfx.FX.Is(17), pixelfx.BX.Is(5), pixelfx.BY.Is(-20))},
{T: fireballThrow, Pose: fireballThrown, How: "snap"},
{T: fireballHit - 0.02, Pose: fireballThrown.With(pixelfx.Crouch.Is(3), pixelfx.Lean.Is(4))},
{T: fireballHit, Pose: fireballFlinch, How: "snap"},
{T: fireballHit + 0.7, Pose: fireballFlinch.With(pixelfx.Crouch.Is(3), pixelfx.Lean.Is(-2))},
{T: fireballHit + 1.4, Pose: pixelfx.Ready.With(pixelfx.X.Is(4))},
{T: fireballHit + 2.1, Pose: pixelfx.Ready.With(pixelfx.X.Is(-3))},
{T: fireballHit + 5.4, Pose: pixelfx.Ready.With(pixelfx.X.Is(-3))},
},
Hits: []pixelfx.Hit{
{T: fireballHit, Stop: 0.18, Shake: 0.38, Amp: pixelfx.Val(3), Push: pixelfx.Val(3.4), Straw: pixelfx.Val(34), Skin: "char"},
{T: fireballHit + 4.8, Push: pixelfx.Val(0), Straw: pixelfx.Val(0), Flash: pixelfx.Val(0), Skin: pixelfx.SkinNone},
},
Dust: []pixelfx.DustKick{{T: fireballThrow, X: 13, N: 7, Dir: 1}},
},
New: pixelfx.Chain([]pixelfx.Cue{
{FX: arcane.SpellCharge, T: 0.08, Until: fireballThrow, Options: map[string]pixelfx.Value{"palette": pixelfx.RampOf(pixelfx.Ramps["fire"])}},
{FX: fire.Fireball, T: fireballThrow, Until: fireballHit, XFn: func(t float64) float64 { return 28 + (t-fireballThrow)*fireballSpeed }, Y: -22},
{FX: explosions.SmallExplosion, T: fireballHit, X: fireballTX},
}),
}FireballThrow is a move: he gathers fire in his hand, leans back and hurls it; the ball flies, the target takes it in a blast and comes out charred. It chains arcane.SpellCharge, fire.Fireball and explosions.SmallExplosion, and is registered as "moves/fireball-throw".
var GroundPound = &pixelfx.Effect{
Meta: pixelfx.Meta{
Name: "Ground pound",
Desc: "He coils, leaps out of frame height, hangs, and comes down like a rock: the floor cracks, shock waves race out and throw the target about as they pass.",
Tags: []string{"move", "impact", "jump", "landing", "shockwave", "one-shot"},
Size: [2]int{304, 204},
Origin: [2]int{152, 168},
Duration: land + 3.2,
FPS: 30,
BG: "ground",
Actor: 2,
Options: []pixelfx.Option{{Name: "seed", Default: pixelfx.Num(1)}},
},
Act: &pixelfx.Act{
Targets: []float64{poundTarget},
Poses: []pixelfx.Key{
{T: -0.5, Pose: pixelfx.Ready},
{T: -0.16, Pose: poundCoil},
{T: 0, Pose: poundCoil.With(pixelfx.Crouch.Is(7))},
{T: 0.03, Pose: poundAir.With(pixelfx.Y.Is(-10), pixelfx.Ghost.Is(1)), How: "snap"},
{T: 0.26, Pose: poundTop.With(pixelfx.Y.Is(-60)), How: "out"},
{T: 0.42, Pose: poundTop},
{T: land - 0.005, Pose: poundDown.With(pixelfx.Y.Is(-4)), How: "in"},
{T: land, Pose: poundHero, How: "snap"},
{T: land + 0.8, Pose: poundHero.With(pixelfx.Crouch.Is(6))},
{T: land + 1.3, Pose: poundHero.With(pixelfx.Crouch.Is(5), pixelfx.Lean.Is(3), pixelfx.FX.Is(13), pixelfx.FY.Is(-15), pixelfx.BX.Is(-5), pixelfx.BY.Is(-20))},
{T: land + 1.8, Pose: pixelfx.Ready},
{T: land + 3.2, Pose: pixelfx.Ready},
},
Hits: []pixelfx.Hit{
{T: land, Stop: 0.2, Shake: 0.5, Amp: pixelfx.Val(4), NoTarget: true},
{T: land + 0.14, Stop: 0.04, Push: pixelfx.Val(3), Straw: pixelfx.Val(26), Y: pixelfx.Val(-8)},
{T: land + 0.44, Push: pixelfx.Val(-1.6), Straw: pixelfx.Val(8), Y: pixelfx.Val(-8), Flash: pixelfx.Val(0)},
},
Dust: []pixelfx.DustKick{{T: 0.03, X: 0, N: 8}},
},
New: pixelfx.Chain([]pixelfx.Cue{{FX: impacts.GroundSlam, T: land}}),
}GroundPound is a move: he coils, leaps out of frame height, hangs, and comes down like a rock; the floor cracks, shock waves race out and throw the target about as they pass. It chains impacts.GroundSlam and is registered as "moves/ground-pound".
var HolySmite = &pixelfx.Effect{
Meta: pixelfx.Meta{
Name: "Holy smite",
Desc: "Both hands go up and a glint marks the target; he brings them down and a bolt of light drops like a hammer, leaving the target blanched.",
Tags: []string{"move", "holy", "spell", "strike", "one-shot"},
Size: [2]int{252, 182},
Origin: [2]int{42, 151},
Duration: 2.8,
FPS: 30,
BG: "ground",
Actor: 2,
Options: []pixelfx.Option{{Name: "seed", Default: pixelfx.Num(1)}},
},
Act: &pixelfx.Act{
Targets: []float64{smiteTX},
Poses: []pixelfx.Key{
{T: -0.42, Pose: pixelfx.Ready},
{T: -0.04, Pose: smiteUp},
{T: smiteBolt - 0.01, Pose: smiteUp.With(pixelfx.Y.Is(-1))},
{T: smiteBolt, Pose: smiteDown, How: "snap"},
{T: 1.1, Pose: smiteDown.With(pixelfx.Crouch.Is(3), pixelfx.Lean.Is(3))},
{T: 1.7, Pose: pixelfx.Ready},
{T: 2.8, Pose: pixelfx.Ready},
},
Hits: []pixelfx.Hit{
{T: smiteBolt, Stop: 0.14, Shake: 0.32, Amp: pixelfx.Val(3), Push: pixelfx.Val(2.8), Straw: pixelfx.Val(24), Skin: "holy", Y: pixelfx.Val(-30)},
{T: 2.3, Push: pixelfx.Val(0), Straw: pixelfx.Val(0), Flash: pixelfx.Val(0), Skin: pixelfx.SkinNone},
},
Dust: []pixelfx.DustKick{{T: smiteBolt, X: 14, N: 6, Dir: 1}},
},
New: pixelfx.Chain([]pixelfx.Cue{{FX: holy.Smite, T: 0, X: smiteTX}}),
}HolySmite is a move: both hands go up and a glint marks the target; he brings them down and a bolt of light drops like a hammer, leaving the target blanched. It chains holy.Smite and is registered as "moves/holy-smite".
var IceLanceThrow = &pixelfx.Effect{
Meta: pixelfx.Meta{
Name: "Ice lance throw",
Desc: "Frost gathers into a spear in his hand, he throws it like a javelin, and the target ices over in a burst of snowflakes and shivers.",
Tags: []string{"move", "ice", "spell", "projectile", "one-shot"},
Size: [2]int{310, 136},
Origin: [2]int{86, 134},
Duration: iceHit + 3.2,
FPS: 30,
BG: "ground",
Actor: 2,
Options: []pixelfx.Option{{Name: "seed", Default: pixelfx.Num(1)}},
},
Act: &pixelfx.Act{
Targets: []float64{iceTX},
Poses: []pixelfx.Key{
{T: -0.4, Pose: pixelfx.Ready.With(pixelfx.X.Is(-3))},
{T: 0.06, Pose: iceHold},
{T: iceThrow - 0.2, Pose: iceHold},
{T: iceThrow - 0.03, Pose: iceHold.With(pixelfx.Crouch.Is(5), pixelfx.Lean.Is(-2), pixelfx.FX.Is(17), pixelfx.BX.Is(5), pixelfx.BY.Is(-20))},
{T: iceThrow, Pose: iceThrown, How: "snap"},
{T: iceHit + 0.3, Pose: iceThrown.With(pixelfx.Crouch.Is(3), pixelfx.Lean.Is(4))},
{T: iceHit + 0.9, Pose: pixelfx.Ready.With(pixelfx.X.Is(-3))},
{T: iceHit + 3.2, Pose: pixelfx.Ready.With(pixelfx.X.Is(-3))},
},
Hits: []pixelfx.Hit{
{T: iceHit, Stop: 0.13, Shake: 0.2, Amp: pixelfx.Val(2), Push: pixelfx.Val(2.4), Straw: pixelfx.Val(12), Skin: "ice", Shiver: 1.4, Y: pixelfx.Val(-26)},
{T: 2.75, Push: pixelfx.Val(0.3), Straw: pixelfx.Val(0), Flash: pixelfx.Val(0), Skin: pixelfx.SkinNone},
},
Dust: []pixelfx.DustKick{{T: iceThrow, X: 13, N: 6, Dir: 1, C: pixelfx.Hex("#d8f2ff")}},
},
New: pixelfx.Chain([]pixelfx.Cue{
{FX: arcane.SpellCharge, T: 0.06, Until: iceThrow, Options: map[string]pixelfx.Value{"palette": pixelfx.RampOf(pixelfx.Ramps["ice"])}},
{FX: ice.IceLance, T: iceThrow, Until: iceHit, XFn: func(t float64) float64 { return 34 + (t-iceThrow)*iceSpeed }, Y: -24},
{FX: ice.SnowflakeBurst, T: iceHit, X: iceTX, Y: -26},
}),
}IceLanceThrow is a move: frost gathers into a spear in his hand, he throws it like a javelin, and the target ices over in a burst of snowflakes and shivers. It chains arcane.SpellCharge, ice.IceLance and ice.SnowflakeBurst, and is registered as "moves/ice-lance-throw".
var LightningCall = &pixelfx.Effect{
Meta: pixelfx.Meta{
Name: "Lightning call",
Desc: "An arm goes up, a sigil lights under the target, and on the downswing a thick bolt comes down on it; the target jolts through the aftershocks.",
Tags: []string{"move", "lightning", "spell", "strike", "one-shot"},
Size: [2]int{290, 266},
Origin: [2]int{42, 231},
Duration: 3,
FPS: 30,
BG: "ground",
Actor: 2,
Options: []pixelfx.Option{{Name: "seed", Default: pixelfx.Num(1)}},
},
Act: &pixelfx.Act{
Targets: []float64{lightningTX},
Poses: []pixelfx.Key{
{T: 0, Pose: pixelfx.Ready},
{T: 0.26, Pose: lightningUp},
{T: lightningBolt - 0.04, Pose: lightningUp.With(pixelfx.Y.Is(-1), pixelfx.Crouch.Is(-1))},
{T: lightningBolt, Pose: lightningDown, How: "snap"},
{T: 1.4, Pose: lightningDown.With(pixelfx.Crouch.Is(3), pixelfx.Lean.Is(4))},
{T: 2, Pose: pixelfx.Ready},
{T: 3, Pose: pixelfx.Ready},
},
Hits: []pixelfx.Hit{
{T: lightningBolt, Stop: 0.14, Shake: 0.32, Amp: pixelfx.Val(3), Push: pixelfx.Val(2.8), Straw: pixelfx.Val(24), Skin: "shock", Shiver: 1.2},
{T: 1.04, Stop: 0.03, Push: pixelfx.Val(1.2), Straw: pixelfx.Val(8)},
{T: 1.26, Stop: 0.03, Push: pixelfx.Val(-1), Straw: pixelfx.Val(6)},
{T: 2.5, Push: pixelfx.Val(0), Straw: pixelfx.Val(0), Flash: pixelfx.Val(0), Skin: pixelfx.SkinNone},
},
Dust: []pixelfx.DustKick{{T: lightningBolt, X: 14, N: 6, Dir: 1}},
},
New: pixelfx.Chain([]pixelfx.Cue{{FX: lightning.LightningStrike, T: 0, X: lightningTX}}),
}LightningCall is a move: an arm goes up, a sigil lights under the target, and on the downswing a thick bolt comes down on it; the target jolts through the aftershocks. It chains lightning.LightningStrike and is registered as "moves/lightning-call".
var MeteorCall = &pixelfx.Effect{
Meta: pixelfx.Meta{
Name: "Meteor call",
Desc: "A long chant: a circle draws itself round him, it flares, he points, and a burning rock comes down on the target and flattens the scene.",
Tags: []string{"move", "fire", "spell", "meteor", "ultimate", "one-shot"},
Size: [2]int{380, 240},
Origin: [2]int{92, 212},
Duration: meteorHit - 0.62 + 5,
FPS: 30,
BG: "ground",
Actor: 2,
Options: []pixelfx.Option{{Name: "seed", Default: pixelfx.Num(1)}},
},
Act: &pixelfx.Act{
Targets: []float64{meteorTX},
Poses: []pixelfx.Key{
{T: -0.34, Pose: pixelfx.Ready},
{T: 0, Pose: meteorChant},
{T: 0.75, Pose: meteorChant.With(pixelfx.Crouch.Is(2))},
{T: 1.4, Pose: meteorUp},
{T: meteorBolt - 0.02, Pose: meteorUp.With(pixelfx.Y.Is(-1))},
{T: meteorBolt, Pose: meteorPoint, How: "snap"},
{T: meteorHit - 0.02, Pose: meteorPoint.With(pixelfx.Crouch.Is(3))},
{T: meteorHit, Pose: meteorFlinch, How: "snap"},
{T: meteorHit + 0.9, Pose: meteorFlinch.With(pixelfx.Crouch.Is(3), pixelfx.Lean.Is(-2))},
{T: meteorHit + 1.7, Pose: pixelfx.Ready.With(pixelfx.X.Is(0))},
{T: meteorHit + 4.3, Pose: pixelfx.Ready},
},
Hits: []pixelfx.Hit{
{T: meteorBolt, Stop: 0.06, Shake: 0.16, Amp: pixelfx.Val(2), NoTarget: true},
{T: meteorHit, Stop: 0.22, Shake: 0.55, Amp: pixelfx.Val(4), Push: pixelfx.Val(3.8), Straw: pixelfx.Val(44), Skin: "char"},
{T: meteorHit + 3.9, Push: pixelfx.Val(0), Straw: pixelfx.Val(0), Flash: pixelfx.Val(0), Skin: pixelfx.SkinNone},
},
},
New: pixelfx.Chain([]pixelfx.Cue{
{FX: arcane.MagicCircleCast, T: 0},
{FX: fire.Meteor, T: meteorHit - 0.62, X: meteorTX},
}),
}MeteorCall is a move: a long chant; a circle draws itself round him, it flares, he points, and a burning rock comes down on the target and flattens the scene. It chains arcane.MagicCircleCast and fire.Meteor, and is registered as "moves/meteor-call".
var PistolShots = &pixelfx.Effect{
Meta: pixelfx.Meta{
Name: "Pistol shots",
Desc: "Three aimed shots: the gun kicks up each time and settles, tracers cross the floor, and the target staggers under each hit.",
Tags: []string{"move", "gun", "pistol", "projectile", "ranged", "one-shot"},
Size: [2]int{378, 76},
Origin: [2]int{111, 72},
Duration: 2.6,
FPS: 30,
BG: "ground",
Actor: 2,
Options: []pixelfx.Option{{Name: "seed", Default: pixelfx.Num(1)}},
},
Act: &pixelfx.Act{
Targets: []float64{pistolTX},
Poses: pistolPoses(),
Hits: pistolHits(),
},
New: pixelfx.Chain(pistolCues()),
}PistolShots is a move: three aimed shots; the gun kicks up each time and settles, tracers cross the floor, and the target staggers under each hit. It chains projectiles.MuzzlePistol, projectiles.BulletTracer and impacts.HitSpark, and is registered as "moves/pistol-shots".
var RocketLauncher = &pixelfx.Effect{
Meta: pixelfx.Meta{
Name: "Rocket launcher",
Desc: "He drops to one knee, shoulders the tube and fires: the kick shoves him back along the floor, the rocket crawls out on its jet and the target goes up.",
Tags: []string{"move", "gun", "rocket", "projectile", "explosion", "one-shot"},
Size: [2]int{480, 244},
Origin: [2]int{178, 198},
Duration: rocketHit + 5.4,
FPS: 30,
BG: "ground",
Actor: 2,
Options: []pixelfx.Option{{Name: "seed", Default: pixelfx.Num(1)}},
},
Act: &pixelfx.Act{
Targets: []float64{rocketTX},
Poses: []pixelfx.Key{
{T: -0.52, Pose: rocketRest},
{T: -0.18, Pose: rocketKneel},
{T: rocketFire - 0.001, Pose: rocketKneel.With(pixelfx.Crouch.Is(7))},
{T: rocketFire, Pose: rocketKicked, How: "snap"},
{T: rocketFire + 0.36, Pose: rocketKneel.With(pixelfx.X.Is(-6))},
{T: rocketHit + 0.9, Pose: rocketKneel.With(pixelfx.X.Is(-6), pixelfx.Crouch.Is(5), pixelfx.Lean.Is(1))},
{T: rocketHit + 1.5, Pose: rocketRest.With(pixelfx.X.Is(-3))},
{T: rocketHit + 2.2, Pose: rocketRest.With(pixelfx.X.Is(0))},
{T: rocketHit + 5.4, Pose: rocketRest},
},
Hits: []pixelfx.Hit{
{T: rocketFire, Stop: 0.06, Shake: 0.22, Amp: pixelfx.Val(2), NoTarget: true},
{T: rocketHit, Stop: 0.2, Shake: 0.45, Amp: pixelfx.Val(4), Push: pixelfx.Val(3.8), Straw: pixelfx.Val(44), Skin: "char"},
{T: rocketHit + 4.8, Push: pixelfx.Val(0), Straw: pixelfx.Val(0), Flash: pixelfx.Val(0), Skin: pixelfx.SkinNone},
},
Dust: []pixelfx.DustKick{{T: rocketFire, X: -16, N: 10, Dir: -1}},
},
New: pixelfx.Chain([]pixelfx.Cue{
{FX: projectiles.MuzzleShotgun, T: rocketFire, X: rocketMX, Options: map[string]pixelfx.Value{"height": pixelfx.Num(-rocketMY)}},
{FX: projectiles.Rocket, T: rocketFire, Until: rocketHit, XFn: rocketX, Y: rocketMY},
{FX: explosions.SmallExplosion, T: rocketHit, X: rocketTX},
}),
}RocketLauncher is a move: he drops to one knee, shoulders the tube and fires; the kick shoves him back along the floor, the rocket crawls out on its jet and the target goes up. It chains projectiles.MuzzleShotgun, projectiles.Rocket and explosions.SmallExplosion, and is registered as "moves/rocket-launcher".
var SwordCombo = &pixelfx.Effect{
Meta: pixelfx.Meta{
Name: "Sword combo",
Desc: "Three strokes walking forward: a slash, a crossing double cut, and a two-handed cleave into the floor that throws the target about.",
Tags: []string{"move", "melee", "sword", "combo", "one-shot"},
Size: [2]int{264, 150},
Origin: [2]int{72, 130},
Duration: comboFinish + 1.6,
FPS: 30,
BG: "ground",
Actor: 2,
Options: []pixelfx.Option{{Name: "seed", Default: pixelfx.Num(1)}},
},
Act: &pixelfx.Act{
Targets: []float64{118},
Poses: comboPoses(),
Hits: comboHits(),
Dust: comboDust(),
},
New: pixelfx.Chain([]pixelfx.Cue{
{FX: melee.SwordSlash, T: comboA},
{FX: melee.DoubleSlash, T: comboB, X: comboStep},
{FX: melee.HeavyCleave, T: comboC, X: comboStep * 2},
}),
}SwordCombo is a move: three strokes walking forward; a slash, a crossing double cut, and a two-handed cleave into the floor that throws the target about. It chains melee.SwordSlash, melee.DoubleSlash and melee.HeavyCleave, and is registered as "moves/sword-combo".