GitHubНачать

Справочник API собран из Go doc-комментариев в исходном коде и написан на английском языке.

package melee

import "github.com/nsgo-dev/game/pkg/pixelfx/melee"

Обзор

Package melee is pixelfx's melee category: claw swipe, dagger flurry, double slash, hammer smash, heavy cleave, scythe reap, spear sweep, spin slash, sword slash, thrust, uppercut and whip crack, each a pixelfx.Effect a character acts out (pixelfx.Perform), registered as "melee/<name>" when the package is imported. Their size options (sword-slash's and spin-slash's radius, thrust's reach, whip-crack's length) are kept between 1 and 416 px, where pixelfx takes any number and a negative one crashes or hangs it.

Указатель

Переменные

var ClawSwipe = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "Claw swipe",
		Desc:     "Three claw marks rake down one after another, white-hot, cooling through orange to red, then close up from both ends and leave a dotted scar, with hot flecks and drips.",
		Tags:     []string{"melee", "claw", "swipe", "beast", "scratch", "combat", "directional", "one-shot"},
		Size:     [2]int{128, 96},
		Origin:   [2]int{36, 84},
		Duration: 0.9,
		FPS:      30,
		BG:       "ground",
		Actor:    2,
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette("#2a0808", "#5c0f12", "#a51d1d", "#e2401f", "#ff8a2a", "#ffd166", "#fff3c4", "#ffffff")},
			{Name: "sparks", Default: pixelfx.Palette("#fff3c4", "#ffd166", "#ff8a2a", "#c42a1a")},
			{Name: "seed", Default: pixelfx.Num(8)},
		},
	},
	Act: &pixelfx.Act{
		Targets: []float64{58},
		Poses: []pixelfx.Key{
			{T: -0.46, Pose: clawReady.With(pixelfx.X.Is(-6))},
			{T: -0.2, Pose: clawHigh},
			{T: -0.05, Pose: clawHigh.With(pixelfx.Crouch.Is(5))},
			{T: 0, Pose: clawReady.With(pixelfx.X.Is(0), pixelfx.Crouch.Is(3), pixelfx.Lean.Is(4), pixelfx.FX.Is(19), pixelfx.FY.Is(-36), pixelfx.SA.Is(-0.9), pixelfx.BX.Is(-7), pixelfx.BY.Is(-24), pixelfx.Ghost.Is(1)), How: "snap"},
			{T: 0.05, Pose: clawReady.With(pixelfx.X.Is(2), pixelfx.Crouch.Is(5), pixelfx.Lean.Is(6), pixelfx.FX.Is(23), pixelfx.FY.Is(-24), pixelfx.SA.Is(0.5), pixelfx.BX.Is(-7), pixelfx.BY.Is(-24), pixelfx.FFX.Is(13), pixelfx.FBX.Is(-10), pixelfx.ToeB.On()), How: "snap"},
			{T: 0.1, Pose: clawReady.With(pixelfx.X.Is(3), pixelfx.Crouch.Is(7), pixelfx.Lean.Is(7), pixelfx.FX.Is(22), pixelfx.FY.Is(-12), pixelfx.SA.Is(1.2), pixelfx.BX.Is(-7), pixelfx.BY.Is(-24), pixelfx.FFX.Is(13), pixelfx.FBX.Is(-10), pixelfx.ToeB.On()), How: "snap"},
			{T: 0.42, Pose: clawReady.With(pixelfx.X.Is(3), pixelfx.Crouch.Is(6), pixelfx.Lean.Is(5), pixelfx.FX.Is(21), pixelfx.FY.Is(-13), pixelfx.SA.Is(1.1), pixelfx.BX.Is(-6), pixelfx.BY.Is(-22), pixelfx.FFX.Is(13), pixelfx.FBX.Is(-10))},
			{T: 0.9, Pose: clawReady.With(pixelfx.X.Is(-6))},
		},
		Hits: []pixelfx.Hit{
			{T: 0.04, Stop: 0.03, Push: pixelfx.Val(0.9), Straw: pixelfx.Val(5), Y: pixelfx.Val(-30), Flash: pixelfx.Val(0.03)},
			{T: 0.08, Stop: 0.03, Push: pixelfx.Val(0.9), Straw: pixelfx.Val(5), Y: pixelfx.Val(-26), Flash: pixelfx.Val(0.03)},
			{T: 0.12, Stop: 0.08, Shake: 0.14, Amp: pixelfx.Val(2), Push: pixelfx.Val(1.4), Straw: pixelfx.Val(9), Y: pixelfx.Val(-18)},
		},
		Dust: []pixelfx.DustKick{{T: 0.1, X: 12, N: 6, Dir: 1}},
	},
	New: newClawSwipe,
}

ClawSwipe is three claw marks that rake down one after another, white-hot, cooling through orange to red, then close up from both ends and leave a dotted scar, with hot flecks and drips. It is registered as "melee/claw-swipe".

var DaggerFlurry = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "Dagger flurry",
		Desc:     "A flurry of small quick crescents at every angle in front of the fighter, each with a flick of sparks, finished by one big cut that glints and bursts.",
		Tags:     []string{"melee", "slash", "dagger", "combo", "flurry", "fast", "combat", "directional", "one-shot"},
		Size:     [2]int{148, 104},
		Origin:   [2]int{36, 86},
		Duration: 0.95,
		FPS:      30,
		BG:       "ground",
		Actor:    2,
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette("#1b1630", "#3a2f63", "#6150a3", "#9480d8", "#c7b8f5", "#efe9ff", "#ffffff")},
			{Name: "sparks", Default: pixelfx.Palette("#ffffff", "#efe9ff", "#c7b8f5", "#9480d8")},
			{Name: "seed", Default: pixelfx.Num(12)},
		},
	},
	Act: &pixelfx.Act{
		Targets: []float64{60},
		Poses: []pixelfx.Key{
			{T: -0.4, Pose: daggerBase.With(pixelfx.X.Is(-4))},
			{T: -0.14, Pose: daggerBase.With(pixelfx.X.Is(-6), pixelfx.Lean.Is(-2), pixelfx.Crouch.Is(5), pixelfx.FX.Is(2), pixelfx.FY.Is(-22), pixelfx.SA.Is(-1.2), pixelfx.BX.Is(2), pixelfx.BY.Is(-26), pixelfx.SB.Is(-1.5))},
			{T: -0.03, Pose: daggerBase.With(pixelfx.X.Is(-6), pixelfx.Lean.Is(-3), pixelfx.Crouch.Is(6), pixelfx.FX.Is(1), pixelfx.FY.Is(-21), pixelfx.SA.Is(-1.2), pixelfx.BX.Is(1), pixelfx.BY.Is(-25), pixelfx.SB.Is(-1.5))},
			{T: 0, Pose: daggerNear(20, -31, -0.5, pixelfx.X.Is(2), pixelfx.Ghost.Is(1)), How: "snap"},
			{T: 0.055, Pose: daggerFar(21, -23, 0.5, pixelfx.X.Is(3)), How: "snap"},
			{T: 0.11, Pose: daggerNear(18, -36, -1, pixelfx.X.Is(4)), How: "snap"},
			{T: 0.165, Pose: daggerFar(22, -31, -0.6, pixelfx.X.Is(5)), How: "snap"},
			{T: 0.22, Pose: daggerNear(20, -22, 0.2, pixelfx.X.Is(5)), How: "snap"},
			{T: 0.275, Pose: daggerFar(21, -27, 0.05, pixelfx.X.Is(6)), How: "snap"},
			{T: 0.33, Pose: daggerBase.With(pixelfx.X.Is(4), pixelfx.Lean.Is(-3), pixelfx.Crouch.Is(5), pixelfx.FX.Is(-1), pixelfx.FY.Is(-33), pixelfx.SA.Is(-2.5), pixelfx.BX.Is(2), pixelfx.BY.Is(-23), pixelfx.SB.Is(-1.2)), How: "snap"},
			{T: 0.37, Pose: daggerBase.With(pixelfx.X.Is(7), pixelfx.Lean.Is(2), pixelfx.Crouch.Is(4), pixelfx.FX.Is(16), pixelfx.FY.Is(-34), pixelfx.SA.Is(-1), pixelfx.BX.Is(-7), pixelfx.BY.Is(-24), pixelfx.SB.Is(-2.4), pixelfx.Ghost.Is(1)), How: "snap"},
			{T: 0.43, Pose: daggerBase.With(pixelfx.X.Is(9), pixelfx.Lean.Is(6), pixelfx.Crouch.Is(6), pixelfx.FX.Is(22), pixelfx.FY.Is(-23), pixelfx.SA.Is(0.15), pixelfx.BX.Is(-9), pixelfx.BY.Is(-24), pixelfx.SB.Is(-2.6), pixelfx.FFX.Is(13), pixelfx.FBX.Is(-10), pixelfx.ToeB.On()), How: "snap"},
			{T: 0.68, Pose: daggerBase.With(pixelfx.X.Is(9), pixelfx.Lean.Is(5), pixelfx.Crouch.Is(5), pixelfx.FX.Is(21), pixelfx.FY.Is(-22), pixelfx.SA.Is(0.2), pixelfx.BX.Is(-8), pixelfx.BY.Is(-24), pixelfx.SB.Is(-2.6))},
			{T: 1.05, Pose: daggerBase.With(pixelfx.X.Is(-4))},
		},
		Hits: []pixelfx.Hit{
			{T: 0.05, Stop: 0.015, Push: pixelfx.Val(0.5), Straw: pixelfx.Val(3), Flash: pixelfx.Val(0.02)},
			{T: 0.105, Stop: 0.015, Push: pixelfx.Val(-0.3), Straw: pixelfx.Val(3), Flash: pixelfx.Val(0.02)},
			{T: 0.16, Stop: 0.015, Push: pixelfx.Val(0.5), Straw: pixelfx.Val(3), Flash: pixelfx.Val(0.02)},
			{T: 0.215, Stop: 0.015, Push: pixelfx.Val(-0.3), Straw: pixelfx.Val(3), Flash: pixelfx.Val(0.02)},
			{T: 0.27, Stop: 0.015, Push: pixelfx.Val(0.5), Straw: pixelfx.Val(3), Flash: pixelfx.Val(0.02)},
			{T: 0.325, Stop: 0.015, Push: pixelfx.Val(-0.3), Straw: pixelfx.Val(3), Flash: pixelfx.Val(0.02)},
			{T: 0.42, Stop: 0.12, Shake: 0.18, Amp: pixelfx.Val(2), Push: pixelfx.Val(2.6), Straw: pixelfx.Val(16)},
		},
		Dust: []pixelfx.DustKick{{T: 0.43, X: 20, N: 7, Dir: 1}, {T: 0, X: -6, N: 3, Dir: -1}},
	},
	New: newDaggerFlurry,
}

DaggerFlurry is a flurry of small quick crescents at every angle in front of the fighter, each with a flick of sparks, finished by one big cut that glints and bursts. It is registered as "melee/dagger-flurry".

var DoubleSlash = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "Double slash",
		Desc:     "A down cut, then an up cut that crosses it: the moment the X closes both strokes flash white, the crossing bursts with light and sparks, and a dotted X lingers.",
		Tags:     []string{"melee", "slash", "combo", "sword", "cross", "combat", "directional", "one-shot"},
		Size:     [2]int{164, 108},
		Origin:   [2]int{44, 92},
		Duration: 0.8,
		FPS:      30,
		BG:       "ground",
		Actor:    2,
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette("#2a0a22", "#5e1238", "#a01f4e", "#e0386a", "#ff86a6", "#ffd2dd", "#ffffff")},
			{Name: "sparks", Default: pixelfx.Palette("#fff3a6", "#ffe26b", "#ff8a2a", "#f2561d")},
			{Name: "seed", Default: pixelfx.Num(6)},
		},
	},
	Act: &pixelfx.Act{
		Targets: []float64{62},
		Poses: []pixelfx.Key{
			{T: -0.42, Pose: doubleStance.With(pixelfx.X.Is(-7))},
			{T: -0.18, Pose: doubleHigh},
			{T: -0.04, Pose: doubleHigh.With(pixelfx.Crouch.Is(5))},
			{T: 0, Pose: doubleStance.With(pixelfx.X.Is(0), pixelfx.Crouch.Is(2), pixelfx.Lean.Is(3), pixelfx.FX.Is(16), pixelfx.FY.Is(-37), pixelfx.SA.Is(-1.45), pixelfx.BX.Is(-7), pixelfx.BY.Is(-24), pixelfx.FFX.Is(11), pixelfx.FBX.Is(-9), pixelfx.Ghost.Is(1)), How: "snap"},
			{T: 0.06, Pose: doubleLow, How: "snap"},
			{T: 0.14, Pose: doubleLow.With(pixelfx.X.Is(4), pixelfx.Crouch.Is(6), pixelfx.Lean.Is(5), pixelfx.FX.Is(20), pixelfx.FY.Is(-17), pixelfx.SA.Is(0.85), pixelfx.Ghost.Is(1))},
			{T: 0.17, Pose: doubleLow.With(pixelfx.X.Is(5), pixelfx.Crouch.Is(3), pixelfx.Lean.Is(5), pixelfx.FX.Is(22), pixelfx.FY.Is(-28), pixelfx.SA.Is(0.1), pixelfx.BY.Is(-18), pixelfx.ToeB.On(), pixelfx.Ghost.Is(1)), How: "snap"},
			{T: 0.21, Pose: doubleLow.With(pixelfx.X.Is(6), pixelfx.Crouch.Is(1), pixelfx.Lean.Is(6), pixelfx.FX.Is(19), pixelfx.FY.Is(-37), pixelfx.SA.Is(-0.95), pixelfx.BY.Is(-18), pixelfx.FFX.Is(13), pixelfx.FBY.Is(-6)), How: "snap"},
			{T: 0.5, Pose: doubleLow.With(pixelfx.X.Is(6), pixelfx.Crouch.Is(3), pixelfx.Lean.Is(3), pixelfx.FX.Is(18), pixelfx.FY.Is(-36), pixelfx.SA.Is(-1.05), pixelfx.BY.Is(-19), pixelfx.FFX.Is(12))},
			{T: 0.92, Pose: doubleStance.With(pixelfx.X.Is(-7))},
		},
		Hits: []pixelfx.Hit{
			{T: 0.06, Stop: 0.05, Shake: 0.08, Amp: pixelfx.Val(1), Push: pixelfx.Val(1.4), Straw: pixelfx.Val(8)},
			{T: 0.16, Stop: 0.14, Shake: 0.2, Amp: pixelfx.Val(2), Push: pixelfx.Val(2.8), Straw: pixelfx.Val(18), Y: pixelfx.Val(-28)},
		},
		Dust: []pixelfx.DustKick{{T: 0.06, X: 16, N: 5, Dir: 1}, {T: 0.17, X: -8, N: 4, Dir: -1}},
	},
	New: newDoubleSlash,
}

DoubleSlash is a down cut, then an up cut that crosses it: the moment the X closes both strokes flash white, the crossing bursts with light and sparks, and a dotted X lingers. It is registered as "melee/double-slash".

var HammerSmash = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "Hammer smash",
		Desc:     "A hammer drops in front in a wedge of motion: a white slam with rays, a dome of force, a dent with cracks, rocks thrown up that bounce and settle, and dust.",
		Tags:     []string{"melee", "smash", "hammer", "heavy", "ground", "shockwave", "debris", "combat", "directional", "one-shot"},
		Size:     [2]int{208, 112},
		Origin:   [2]int{80, 92},
		Duration: 2.0,
		FPS:      30,
		BG:       "ground",
		Actor:    2,
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette("#141834", "#242c5c", "#38479a", "#5a72d0", "#8fa8f0", "#c4d4ff", "#eef3ff", "#ffffff")},
			{Name: "stone", Default: pixelfx.Color("#4a3f69")},
			{Name: "seed", Default: pixelfx.Num(9)},
		},
	},
	Act: &pixelfx.Act{
		Targets: []float64{66},
		Poses: []pixelfx.Key{
			{T: -0.72, Pose: hammerRest.With(pixelfx.X.Is(-3))},
			{T: -0.44, Pose: hammerRest.With(pixelfx.X.Is(-3), pixelfx.Crouch.Is(5), pixelfx.Lean.Is(-1), pixelfx.FX.Is(16), pixelfx.FY.Is(-28), pixelfx.SA.Is(-0.9))},
			{T: -0.2, Pose: hammerTop},
			{T: -0.03, Pose: hammerTop.With(pixelfx.Y.Is(-2))},
			{T: 0.06, Pose: hammerRest.With(pixelfx.X.Is(0), pixelfx.Y.Is(-3), pixelfx.Crouch.Is(-1), pixelfx.Lean.Is(2), pixelfx.FX.Is(13), pixelfx.FY.Is(-41), pixelfx.SA.Is(-1.2), pixelfx.FFX.Is(11), pixelfx.FFY.Is(-8), pixelfx.Ghost.Is(1)), How: "snap"},
			{T: 0.11, Pose: hammerRest.With(pixelfx.X.Is(0), pixelfx.Y.Is(-1), pixelfx.Crouch.Is(3), pixelfx.Lean.Is(5), pixelfx.FX.Is(19), pixelfx.FY.Is(-30), pixelfx.SA.Is(-0.15), pixelfx.FFX.Is(13), pixelfx.Ghost.Is(1)), How: "snap"},
			{T: 0.15, Pose: hammerSlam, How: "snap"},
			{T: 0.62, Pose: hammerSlam.With(pixelfx.Crouch.Is(6), pixelfx.Lean.Is(5))},
			{T: 1.02, Pose: hammerRest.With(pixelfx.X.Is(-2), pixelfx.Crouch.Is(5), pixelfx.Lean.Is(2), pixelfx.FX.Is(14), pixelfx.FY.Is(-24), pixelfx.SA.Is(0.3))},
			{T: 1.4, Pose: hammerRest.With(pixelfx.X.Is(-3))},
		},
		Hits: []pixelfx.Hit{{T: 0.15, Stop: 0.2, Shake: 0.34, Amp: pixelfx.Val(3), Push: pixelfx.Val(3), Straw: pixelfx.Val(26), Y: pixelfx.Val(-8)}},
		Dust: []pixelfx.DustKick{{T: 0.15, X: 10, N: 8}, {T: 0.15, X: -12, N: 5, Dir: -1}},
	},
	New: newHammerSmash,
}

HammerSmash is a hammer that drops in front in a wedge of motion: a white slam with rays, a dome of force, a dent with cracks, rocks thrown up that bounce and settle, and dust. It is registered as "melee/hammer-smash".

var HeavyCleave = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "Heavy cleave",
		Desc:     "A glint over the head, then a thick ember arc accelerates over the top into the floor: a white slam, glowing cracks, dust rolling both ways, grit and rising embers.",
		Tags:     []string{"melee", "slash", "cleave", "axe", "heavy", "ground", "fire", "combat", "directional", "one-shot"},
		Size:     [2]int{208, 116},
		Origin:   [2]int{68, 96},
		Duration: 1.9,
		FPS:      30,
		BG:       "ground",
		Actor:    2,
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette("#2a0c10", "#5c1414", "#a3241a", "#e0481c", "#ff8a2a", "#ffc23d", "#fff0a0", "#ffffff")},
			{Name: "stone", Default: pixelfx.Color("#4a3f69")},
			{Name: "seed", Default: pixelfx.Num(5)},
		},
	},
	Act: &pixelfx.Act{
		Targets: []float64{66},
		Poses: []pixelfx.Key{
			{T: -0.42, Pose: cleaveRest.With(pixelfx.X.Is(-4))},
			{T: -0.3, Pose: cleaveRest.With(pixelfx.X.Is(-3), pixelfx.Crouch.Is(4), pixelfx.FX.Is(13), pixelfx.FY.Is(-29), pixelfx.SA.Is(-1.3))},
			{T: -0.12, Pose: cleaveOver.With(pixelfx.Crouch.Is(4))},
			{T: 0.2, Pose: cleaveOver.With(pixelfx.Crouch.Is(3))},
			{T: 0.27, Pose: cleaveRest.With(pixelfx.X.Is(-1), pixelfx.Y.Is(-2), pixelfx.Crouch.Is(0), pixelfx.Lean.Is(2), pixelfx.FX.Is(11), pixelfx.FY.Is(-42), pixelfx.SA.Is(-1.45), pixelfx.FFX.Is(10), pixelfx.Ghost.Is(1)), How: "snap"},
			{T: 0.31, Pose: cleaveRest.With(pixelfx.X.Is(0), pixelfx.Y.Is(-1), pixelfx.Crouch.Is(3), pixelfx.Lean.Is(4), pixelfx.FX.Is(18), pixelfx.FY.Is(-33), pixelfx.SA.Is(-0.45), pixelfx.FFX.Is(12), pixelfx.Ghost.Is(1)), How: "snap"},
			{T: 0.335, Pose: cleaveFloor, How: "snap"},
			{T: 0.85, Pose: cleaveFloor.With(pixelfx.Crouch.Is(6), pixelfx.Lean.Is(5))},
			{T: 1.3, Pose: cleaveRest.With(pixelfx.X.Is(-2), pixelfx.Crouch.Is(4), pixelfx.Lean.Is(2), pixelfx.FX.Is(15), pixelfx.FY.Is(-23), pixelfx.SA.Is(0.1))},
			{T: 1.7, Pose: cleaveRest.With(pixelfx.X.Is(-4))},
		},
		Hits: []pixelfx.Hit{{T: 0.335, Stop: 0.2, Shake: 0.34, Amp: pixelfx.Val(3), Push: pixelfx.Val(3.2), Straw: pixelfx.Val(28), Y: pixelfx.Val(-8)}},
		Dust: []pixelfx.DustKick{{T: 0.335, X: 18, N: 8, Dir: 1}, {T: 0.335, X: -12, N: 5, Dir: -1}},
	},
	New: newHeavyCleave,
}

HeavyCleave is a glint over the head, then a thick ember arc that accelerates over the top into the floor: a white slam, glowing cracks, dust rolling both ways, grit and rising embers. It is registered as "melee/heavy-cleave".

var ScytheReap = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "Scythe reap",
		Desc:     "A slow, huge dark crescent reaps round the front with a pale ghostly edge; it hangs, then tears away from the tail into curling wisps and cold vapour.",
		Tags:     []string{"melee", "scythe", "reap", "dark", "ghost", "death", "slash", "combat", "one-shot"},
		Size:     [2]int{184, 116},
		Origin:   [2]int{84, 98},
		Duration: 2.1,
		FPS:      30,
		BG:       "ground",
		Actor:    2,
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette("#07040c", "#140a22", "#24113a", "#3b1d58", "#5a3a82", "#7fd6c0", "#d8fff2", "#ffffff")},
			{Name: "seed", Default: pixelfx.Num(13)},
		},
	},
	Act: &pixelfx.Act{
		Targets: []float64{66},
		Poses: []pixelfx.Key{
			{T: -0.56, Pose: scytheRest},
			{T: -0.26, Pose: scytheOut},
			{T: 0.08, Pose: scytheOut.With(pixelfx.Crouch.Is(5))},
			{T: 0.2, Pose: scytheOut.With(pixelfx.Yaw.Is(0.8), pixelfx.Crouch.Is(5), pixelfx.Lean.Is(3), pixelfx.FX.Is(16), pixelfx.FY.Is(-23), pixelfx.SA.Is(0.1), pixelfx.Ghost.Is(1))},
			{T: 0.3, Pose: scytheOut.With(pixelfx.X.Is(1), pixelfx.Yaw.Is(1.9), pixelfx.Crouch.Is(6), pixelfx.Lean.Is(3), pixelfx.FX.Is(15), pixelfx.FY.Is(-23), pixelfx.SA.Is(0.2), pixelfx.Ghost.Is(1))},
			{T: 0.42, Pose: scytheEnd},
			{T: 0.92, Pose: scytheEnd.With(pixelfx.Crouch.Is(5))},
			{T: 1.3, Pose: scytheRest.With(pixelfx.X.Is(1), pixelfx.Yaw.Is(1.4), pixelfx.Crouch.Is(4))},
			{T: 1.7, Pose: scytheRest},
		},
		Hits: []pixelfx.Hit{{T: 0.14, Stop: 0.12, Shake: 0.16, Amp: pixelfx.Val(2), Push: pixelfx.Val(2.4), Straw: pixelfx.Val(20), Skin: "shadow"}},
		Dust: []pixelfx.DustKick{{T: 0.3, X: 2, N: 6}},
	},
	New: newScytheReap,
}

ScytheReap is a slow, huge dark crescent that reaps round the front with a pale ghostly edge; it hangs, then tears away from the tail into curling wisps and cold vapour. It is registered as "melee/scythe-reap".

var SpearSweep = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "Spear sweep",
		Desc:     "A wide low sweep at shin height: a long flat crescent swings from behind the legs round the front, and the wind of it kicks a wake of dust and grit along the floor.",
		Tags:     []string{"melee", "sweep", "spear", "polearm", "low", "aoe", "ground", "dust", "combat", "one-shot"},
		Size:     [2]int{216, 84},
		Origin:   [2]int{104, 70},
		Duration: 1.5,
		FPS:      30,
		BG:       "ground",
		Actor:    2,
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette("#0f2a2a", "#18504a", "#22806e", "#3fb894", "#8fe6c0", "#dcfff0", "#ffffff")},
			{Name: "sparks", Default: pixelfx.Palette("#fff3a6", "#ffe26b", "#ff8a2a", "#f2561d")},
			{Name: "stone", Default: pixelfx.Color("#4a3f69")},
			{Name: "seed", Default: pixelfx.Num(10)},
		},
	},
	Act: &pixelfx.Act{
		Targets: []float64{62},
		Poses: []pixelfx.Key{
			{T: -0.56, Pose: spearRest},
			{T: -0.34, Pose: spearRest.With(pixelfx.Two.On(), pixelfx.Crouch.Is(4), pixelfx.FX.Is(14), pixelfx.FY.Is(-22), pixelfx.SA.Is(-0.7))},
			{T: -0.14, Pose: spearCock},
			{T: -0.02, Pose: spearCock.With(pixelfx.Crouch.Is(7), pixelfx.Yaw.Is(2.7))},
			{T: 0.045, Pose: spearOut.With(pixelfx.X.Is(1), pixelfx.Yaw.Is(1.3), pixelfx.Ghost.Is(1)), How: "snap"},
			{T: 0.09, Pose: spearOut.With(pixelfx.Ghost.Is(1)), How: "snap"},
			{T: 0.14, Pose: spearOut, How: "snap"},
			{T: 0.62, Pose: spearOut.With(pixelfx.Crouch.Is(5), pixelfx.Lean.Is(5))},
			{T: 1.12, Pose: spearRest.With(pixelfx.Two.On(), pixelfx.Crouch.Is(4), pixelfx.SA.Is(-0.7), pixelfx.FX.Is(14), pixelfx.FY.Is(-22))},
			{T: 1.5, Pose: spearRest},
		},
		Hits: []pixelfx.Hit{{T: 0.1, Stop: 0.12, Shake: 0.18, Amp: pixelfx.Val(2), Push: pixelfx.Val(2.6), Straw: pixelfx.Val(18), Y: pixelfx.Val(-12)}},
		Dust: []pixelfx.DustKick{{T: 0.09, X: 14, N: 6, Dir: 1}, {T: 0.09, X: -10, N: 5, Dir: -1}},
	},
	New: newSpearSweep,
}

SpearSweep is a wide low sweep at shin height: a long flat crescent swings from behind the legs round the front, and the wind of it kicks a wake of dust and grit along the floor. It is registered as "melee/spear-sweep".

var SpinSlash = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "Spin slash",
		Desc:     "The blade whirls once round the waist on a tilted plane, behind the body and back in front; the closed ring flares white, dissolves into a dotted trace and throws sparks.",
		Tags:     []string{"melee", "slash", "spin", "sword", "aoe", "combat", "one-shot"},
		Size:     [2]int{208, 104},
		Origin:   [2]int{104, 84},
		Duration: 0.8,
		FPS:      30,
		BG:       "ground",
		Actor:    2,
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette("#16224a", "#1f4a86", "#2a7fc0", "#48b8ec", "#9fe2ff", "#e2f7ff", "#ffffff")},
			{Name: "sparks", Default: pixelfx.Palette("#fff3a6", "#ffe26b", "#ff8a2a", "#f2561d")},
			{Name: "radius", Default: pixelfx.Num(46)},
			{Name: "seed", Default: pixelfx.Num(3)},
		},
	},
	Act: &pixelfx.Act{
		Targets: []float64{60},
		Poses: []pixelfx.Key{
			{T: -0.46, Pose: spinStance},
			{T: -0.2, Pose: spinWound},
			{T: -0.02, Pose: spinWound.With(pixelfx.Crouch.Is(7), pixelfx.Yaw.Is(1.3))},
			{T: 0, Pose: spinWide.With(pixelfx.SA.Is(-0.1), pixelfx.Ghost.Is(1)), How: "snap"},
			{T: 0.05, Pose: spinWide.With(pixelfx.Yaw.Is(-1.57), pixelfx.Ghost.Is(1)), How: "snap"},
			{T: 0.09, Pose: spinWide.With(pixelfx.Yaw.Is(-3.14), pixelfx.Ghost.Is(1)), How: "snap"},
			{T: 0.13, Pose: spinWide.With(pixelfx.Yaw.Is(-4.71), pixelfx.Ghost.Is(1)), How: "snap"},
			{T: 0.17, Pose: spinWide, How: "snap"},
			{T: 0.56, Pose: spinWide.With(pixelfx.Crouch.Is(4), pixelfx.Lean.Is(2))},
			{T: 0.92, Pose: spinStance},
		},
		Hits: []pixelfx.Hit{{T: 0.17, Stop: 0.12, Shake: 0.16, Amp: pixelfx.Val(2), Push: pixelfx.Val(2.4), Straw: pixelfx.Val(16)}},
		Dust: []pixelfx.DustKick{{T: 0, X: 0, N: 6}, {T: 0.17, X: 12, N: 6, Dir: 1}},
	},
	New: newSpinSlash,
}

SpinSlash is a blade that whirls once round the waist on a tilted plane, behind the body and back in front; the closed ring flares white, dissolves into a dotted trace and throws sparks. It is registered as "melee/spin-slash".

var SwordSlash = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "Sword slash",
		Desc:     "A tilted crescent whips round in two frames, cools from white to deep blue as it trails off, glints at the tip and throws sparks.",
		Tags:     []string{"melee", "slash", "sword", "combat", "directional", "one-shot"},
		Size:     [2]int{136, 104},
		Origin:   [2]int{44, 92},
		Duration: 0.75,
		FPS:      30,
		BG:       "ground",
		Actor:    2,
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette("#212f6b", "#2c58aa", "#3a8bd8", "#62c8f4", "#b8c9e8", "#e8f1ff", "#ffffff")},
			{Name: "sparks", Default: pixelfx.Palette("#fff3a6", "#ffe26b", "#ff8a2a", "#f2561d")},
			{Name: "radius", Default: pixelfx.Num(42)},
			{Name: "seed", Default: pixelfx.Num(2)},
		},
	},
	Act: &pixelfx.Act{
		Targets: []float64{58},
		Poses: []pixelfx.Key{
			{T: -0.55, Pose: swordGuard.With(pixelfx.X.Is(-8))},
			{T: -0.3, Pose: swordWind},
			{T: -0.08, Pose: swordWind.With(pixelfx.Crouch.Is(5), pixelfx.Lean.Is(-5))},
			{T: 0, Pose: swordCut, How: "snap"},
			{T: 0.06, Pose: swordDown, How: "snap"},
			{T: 0.3, Pose: swordDown.With(pixelfx.X.Is(3), pixelfx.Crouch.Is(6))},
			{T: 0.58, Pose: swordGuard.With(pixelfx.X.Is(1), pixelfx.Crouch.Is(3), pixelfx.FX.Is(15), pixelfx.FY.Is(-21), pixelfx.SA.Is(0.1), pixelfx.BX.Is(-5), pixelfx.BY.Is(-21), pixelfx.FFX.Is(9), pixelfx.FBX.Is(-7))},
			{T: 0.86, Pose: swordGuard.With(pixelfx.X.Is(-8))},
		},
		Hits: []pixelfx.Hit{{T: 0.06, Stop: 0.14, Shake: 0.18, Amp: pixelfx.Val(2), Push: pixelfx.Val(2.8), Straw: pixelfx.Val(18)}},
		Dust: []pixelfx.DustKick{{T: 0.06, X: 16, N: 7, Dir: 1}, {T: 0.06, X: -11, N: 4, Dir: -1}},
	},
	New: newSwordSlash,
}

SwordSlash is a tilted crescent that whips round in two frames, cools from white to deep blue as it trails off, glints at the tip and throws sparks, acted out as a sword cut. It is registered as "melee/sword-slash".

var Thrust = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "Thrust",
		Desc:     "A piercing stab: a bundle of streaks shoots out from the hand to a point, a long four-point star flares at the tip with a pierce ring, sparks and speed lines.",
		Tags:     []string{"melee", "thrust", "stab", "spear", "rapier", "pierce", "combat", "directional", "one-shot"},
		Size:     [2]int{196, 76},
		Origin:   [2]int{34, 62},
		Duration: 0.75,
		FPS:      30,
		BG:       "ground",
		Actor:    2,
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette("#2a1608", "#6b3c10", "#b8701a", "#f0b42e", "#ffe27a", "#fff6cf", "#ffffff")},
			{Name: "sparks", Default: pixelfx.Palette("#fff3a6", "#ffe26b", "#ff8a2a", "#f2561d")},
			{Name: "reach", Default: pixelfx.Num(66)},
			{Name: "seed", Default: pixelfx.Num(4)},
		},
	},
	Act: &pixelfx.Act{
		Targets: []float64{80},
		Poses: []pixelfx.Key{
			{T: -0.46, Pose: thrustStance},
			{T: -0.24, Pose: thrustBack},
			{T: -0.05, Pose: thrustBack.With(pixelfx.Crouch.Is(6), pixelfx.FX.Is(-5))},
			{T: 0, Pose: thrustLunge.With(pixelfx.Ghost.Is(1)), How: "snap"},
			{T: 0.07, Pose: thrustLunge, How: "snap"},
			{T: 0.3, Pose: thrustLunge.With(pixelfx.Crouch.Is(5), pixelfx.Lean.Is(5))},
			{T: 0.7, Pose: thrustStance},
		},
		Hits: []pixelfx.Hit{{T: 0.07, Stop: 0.12, Shake: 0.14, Amp: pixelfx.Val(2), Push: pixelfx.Val(2.8), Straw: pixelfx.Val(16), Y: pixelfx.Val(-26)}},
		Dust: []pixelfx.DustKick{{T: 0, X: -24, N: 6, Dir: -1}, {T: 0.07, X: 1, N: 6, Dir: 1}},
	},
	New: newThrust,
}

Thrust is a piercing stab: a bundle of streaks shoots out from the hand to a point, a long four-point star flares at the tip with a pierce ring, sparks and speed lines. It is registered as "melee/thrust".

var Uppercut = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "Uppercut",
		Desc:     "A crescent rises from the floor past the face, and at the top a comic impact star bursts: bold outline, hot core, burst lines, twinkles and sparks.",
		Tags:     []string{"melee", "uppercut", "punch", "rising", "launcher", "comic", "combat", "directional", "one-shot"},
		Size:     [2]int{132, 128},
		Origin:   [2]int{48, 110},
		Duration: 0.85,
		FPS:      30,
		BG:       "ground",
		Actor:    2,
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette("#3a1408", "#7a2a10", "#c4501a", "#f08a2a", "#ffc94a", "#fff2a8", "#ffffff")},
			{Name: "outline", Default: pixelfx.Color("#2a0a08")},
			{Name: "sparks", Default: pixelfx.Palette("#fff3a6", "#ffe26b", "#ff8a2a", "#f2561d")},
			{Name: "seed", Default: pixelfx.Num(11)},
		},
	},
	Act: &pixelfx.Act{
		Targets: []float64{44},
		Poses: []pixelfx.Key{
			{T: -0.42, Pose: uppercutFists},
			{T: -0.16, Pose: uppercutCoil},
			{T: 0, Pose: uppercutCoil.With(pixelfx.Crouch.Is(8))},
			{T: 0.03, Pose: uppercutFists.With(pixelfx.Y.Is(-4), pixelfx.Crouch.Is(1), pixelfx.Lean.Is(4), pixelfx.FX.Is(18), pixelfx.FY.Is(-27), pixelfx.BX.Is(-5), pixelfx.BY.Is(-23), pixelfx.FFX.Is(9), pixelfx.FBX.Is(-7), pixelfx.ToeB.On(), pixelfx.Ghost.Is(1)), How: "snap"},
			{T: 0.076, Pose: uppercutTop, How: "snap"},

			{T: 0.3, Pose: uppercutTop.With(pixelfx.Y.Is(-13)).Without(pixelfx.Ghost)},
			{T: 0.56, Pose: uppercutTop.With(pixelfx.Y.Is(0), pixelfx.Crouch.Is(2), pixelfx.FX.Is(13), pixelfx.FY.Is(-31), pixelfx.FFX.Is(7), pixelfx.FFY.Is(-6), pixelfx.FBX.Is(-5), pixelfx.FBY.Is(-5)).Without(pixelfx.Ghost), How: "in"},
			{T: 0.6, Pose: uppercutFists.With(pixelfx.Y.Is(0), pixelfx.Crouch.Is(7), pixelfx.Lean.Is(3), pixelfx.FX.Is(12), pixelfx.FY.Is(-14), pixelfx.BX.Is(-6), pixelfx.BY.Is(-16), pixelfx.FFX.Is(10), pixelfx.FBX.Is(-9)), How: "snap"},
			{T: 0.98, Pose: uppercutFists},
		},
		Hits: []pixelfx.Hit{{T: 0.076, Stop: 0.13, Shake: 0.18, Amp: pixelfx.Val(2), Push: pixelfx.Val(-2.6), Straw: pixelfx.Val(18), Y: pixelfx.Val(-34)}},
		Dust: []pixelfx.DustKick{{T: 0.03, X: 8, N: 6}, {T: 0.6, X: 0, N: 6}},
	},
	New: newUppercut,
}

Uppercut is a crescent that rises from the floor past the face, and at the top a comic impact star bursts: bold outline, hot core, burst lines, twinkles and sparks. It is registered as "melee/uppercut".

var WhipCrack = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "Whip crack",
		Desc:     "A whip rolls out to the right as a loop running down its length, faster and faster, until the tip flips over and cracks: a white pop, a ring of air, sparks and a puff of smoke.",
		Tags:     []string{"melee", "whip", "crack", "lash", "combat", "directional", "one-shot"},
		Size:     [2]int{192, 80},
		Origin:   [2]int{30, 68},
		Duration: 0.85,
		FPS:      30,
		BG:       "ground",
		Actor:    2,
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette("#2a1a10", "#5c3a1e", "#9c6a34", "#d8a45a", "#ffd890", "#fff4d6", "#ffffff")},
			{Name: "sparks", Default: pixelfx.Palette("#fff3a6", "#ffe26b", "#ff8a2a", "#f2561d")},
			{Name: "length", Default: pixelfx.Num(76)},
			{Name: "seed", Default: pixelfx.Num(3)},
		},
	},
	Act: &pixelfx.Act{
		Targets: []float64{94},
		Poses: []pixelfx.Key{
			{T: -0.46, Pose: whipStance},
			{T: -0.22, Pose: whipCock},
			{T: 0.02, Pose: whipCock.With(pixelfx.Lean.Is(-4))},
			{T: 0.06, Pose: whipCrack.With(pixelfx.FX.Is(15), pixelfx.FY.Is(-34), pixelfx.SA.Is(-0.7), pixelfx.Lean.Is(2), pixelfx.Ghost.Is(1)), How: "snap"},
			{T: 0.12, Pose: whipCrack, How: "snap"},
			{T: 0.21, Pose: whipCrack},
			{T: 0.26, Pose: whipCrack.With(pixelfx.FX.Is(15), pixelfx.FY.Is(-27), pixelfx.SA.Is(-0.3), pixelfx.Lean.Is(2), pixelfx.Crouch.Is(3)), How: "snap"},
			{T: 0.44, Pose: whipCrack.With(pixelfx.FX.Is(17), pixelfx.FY.Is(-22), pixelfx.SA.Is(0.1), pixelfx.Lean.Is(3), pixelfx.Crouch.Is(3))},
			{T: 0.92, Pose: whipStance},
		},
		Hits: []pixelfx.Hit{{T: 0.21, Stop: 0.1, Shake: 0.14, Amp: pixelfx.Val(2), Push: pixelfx.Val(2.4), Straw: pixelfx.Val(14), Y: pixelfx.Val(-28)}},
		Dust: []pixelfx.DustKick{{T: 0.06, X: 2, N: 4, Dir: 1}},
	},
	New: newWhipCrack,
}

WhipCrack is a whip that rolls out to the right as a loop running down its length, faster and faster, until the tip flips over and cracks: a white pop, a ring of air, sparks and a puff of smoke. It is registered as "melee/whip-crack".