GitHubComeçar

A referência da API é gerada a partir dos comentários de documentação Go no código-fonte e está escrita em inglês.

package ice

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

Visão geral

Package ice is pixelfx's ice category: blizzard vortex, freeze, frost breath, frost nova, ice crystal, ice lance, ice shatter, ice spikes, icicle fall and snowflake burst, each a pixelfx.Effect registered as "ice/<name>" when the package is imported.

Índice

Variáveis

var BlizzardVortex = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "Blizzard vortex",
		Desc:     "A swirling snow tornado: wind bands spin up a leaning funnel, flakes and ice crystals orbit in front and behind, snow boils at its foot and cold light fills its throat.",
		Tags:     []string{"ice", "snow", "blizzard", "tornado", "vortex", "wind", "loop"},
		Size:     [2]int{128, 116},
		Origin:   [2]int{64, 102},
		Duration: vortexDuration,
		Loop:     true,
		FPS:      30,
		BG:       "ground",
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette(icePalette...)},
			{Name: "height", Default: pixelfx.Num(80)},
			{Name: "seed", Default: pixelfx.Num(17)},
		},
	},
	New: newBlizzardVortex,
}

BlizzardVortex is a swirling snow tornado: wind bands spin up a leaning funnel, flakes and ice crystals orbit in front and behind, snow boils at its foot and cold light fills its throat. It is registered as "ice/blizzard-vortex".

var Freeze = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "Freeze",
		Desc:     "Frost races in and climbs the character, turning it to ice; a faceted block crystallizes round it pane by pane, glints, cracks and bursts, and the character thaws free.",
		Tags:     []string{"ice", "freeze", "frozen", "status", "crowd-control", "one-shot"},
		Size:     [2]int{176, 128},
		Origin:   [2]int{88, 108},
		Duration: freezeDuration,
		Loop:     false,
		FPS:      30,
		BG:       "ground",
		Actor:    2,
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette(icePalette...)},
			{Name: "seed", Default: pixelfx.Num(5)},
		},
	},
	Act: &pixelfx.Act{
		OnBody: true,
		Poses: []pixelfx.Key{
			{T: -0.2, Pose: pixelfx.Ready},
			{T: 0.05, Pose: pixelfx.Ready},
			{T: 0.16, Pose: freezeFear, How: "snap"},
			{T: 0.3, Pose: freezeFear.With(pixelfx.Lean.Is(-1), pixelfx.FX.Is(-10), pixelfx.FY.Is(-34))},
			{T: 0.45, Pose: freezeFear.With(pixelfx.Lean.Is(-3), pixelfx.BX.Is(11), pixelfx.BY.Is(-34), pixelfx.FX.Is(-7), pixelfx.FY.Is(-29))},
			{T: 0.62, Pose: freezeFear},
			{T: 2.52, Pose: freezeFear},
			{T: 2.54, Pose: freezeFree, How: "snap"},
			{T: 2.9, Pose: freezeFree.With(pixelfx.Crouch.Is(4))},
			{T: 3.1, Pose: freezeFree.With(pixelfx.Crouch.Is(3), pixelfx.Lean.Is(1))},
			{T: 3.3, Pose: freezeFree.With(pixelfx.Crouch.Is(3), pixelfx.Lean.Is(-1))},
			{T: 4, Pose: pixelfx.Ready},
		},
		Hits: []pixelfx.Hit{
			{T: 0.62, Stop: 0.03, Shake: 0.08, Amp: pixelfx.Val(1)},
			{T: 2.52, Stop: 0.05, Shake: 0.2, Amp: pixelfx.Val(2)},
		},
	},
	New: newFreeze,
}

Freeze races frost in and up the character, turning it to ice; a faceted block crystallizes round it pane by pane, glints, cracks and bursts, and the character thaws free. It is registered as "ice/freeze".

var FrostBreath = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "Frost breath",
		Desc:     "A cone of icy wind blowing right: frost puffs billow out, swell and sink, wind streaks race through, ice crystals tumble and glint off a white-hot mouth.",
		Tags:     []string{"ice", "breath", "frost", "cone", "wind", "directional", "loop"},
		Size:     [2]int{184, 104},
		Origin:   [2]int{12, 50},
		Duration: breathDuration,
		Loop:     true,
		FPS:      30,
		BG:       "dark",
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette(icePalette...)},
			{Name: "spread", Default: pixelfx.Num(0.21)},
			{Name: "power", Default: pixelfx.Num(1)},
			{Name: "seed", Default: pixelfx.Num(11)},
		},
	},
	New: newFrostBreath,
}

FrostBreath is a cone of icy wind blowing right: frost puffs billow out, swell and sink, wind streaks race through, ice crystals tumble and glint off a white-hot mouth. It is registered as "ice/frost-breath".

var FrostNova = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "Frost nova",
		Desc:     "Frost spirals into a spinning snowflake, then a wave blooms three rings of ice crystals round the caster; snow drifts, frost creeps, and the ice melts back into the floor.",
		Tags:     []string{"ice", "nova", "aoe", "frost", "magic", "one-shot"},
		Size:     [2]int{288, 192},
		Origin:   [2]int{144, 150},
		Duration: novaDuration,
		Loop:     false,
		FPS:      30,
		BG:       "ground",
		Actor:    2,
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette(icePalette...)},
			{Name: "reach", Default: pixelfx.Num(104)},
			{Name: "seed", Default: pixelfx.Num(4)},
		},
	},
	Act: &pixelfx.Act{
		Targets: []float64{76},
		Poses: []pixelfx.Key{
			{T: -0.34, Pose: pixelfx.Ready},
			{T: -0.04, Pose: novaHigh.With(pixelfx.Crouch.Is(2), pixelfx.FY.Is(-36), pixelfx.BY.Is(-36))},
			{T: 0.36, Pose: novaHigh},
			{T: 0.42, Pose: novaSlam, How: "snap"},
			{T: 0.9, Pose: novaSlam.With(pixelfx.Crouch.Is(7))},
			{T: 1.9, Pose: novaSlam.With(pixelfx.Crouch.Is(6))},
			{T: 2.6, Pose: novaEase},
			{T: 3.4, Pose: pixelfx.Ready},
		},
		Hits: []pixelfx.Hit{
			{T: 0.42, Stop: 0.1, Shake: 0.26, Amp: pixelfx.Val(2), NoTarget: true},
			{T: 0.66, Push: pixelfx.Val(0.9), Straw: pixelfx.Val(6), Y: pixelfx.Val(-10), Skin: "ice", Shiver: 1.7},
			{T: 2.9, Push: pixelfx.Val(0.2), Straw: pixelfx.Val(0), Flash: pixelfx.Val(0), Skin: pixelfx.SkinNone},
		},
		Dust: []pixelfx.DustKick{{T: 0.42, X: 10, N: 5, Dir: 1, C: novaDust}, {T: 0.42, X: -10, N: 5, Dir: -1, C: novaDust}},
	},
	New: newFrostNova,
}

FrostNova spirals frost into a spinning snowflake, then a wave blooms three rings of ice crystals round the caster; snow drifts, frost creeps, and the ice melts back into the floor. It is registered as "ice/frost-nova".

var IceCrystal = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "Ice crystal",
		Desc:     "A floating ice crystal turning slowly in its own cold light: its facets brighten and darken as they turn, glints flash on them, frost motes circle it.",
		Tags:     []string{"ice", "crystal", "gem", "pickup", "float", "magic", "loop"},
		Size:     [2]int{96, 100},
		Origin:   [2]int{48, 92},
		Duration: crystalDuration,
		Loop:     true,
		FPS:      30,
		BG:       "ground",
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette(icePalette...)},
			{Name: "height", Default: pixelfx.Num(34)},
			{Name: "seed", Default: pixelfx.Num(21)},
		},
	},
	New: newIceCrystal,
}

IceCrystal is a floating ice crystal turning slowly in its own cold light: its facets brighten and darken as they turn, glints flash on them, frost motes circle it. It is registered as "ice/ice-crystal".

var IceLance = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "Ice lance",
		Desc:     "A faceted ice spear flying right: a light pulse runs through its core, rings of cold air shear off the tip, frost peels off into a wake and crystals shed behind it.",
		Tags:     []string{"ice", "lance", "spear", "projectile", "directional", "magic", "loop"},
		Size:     [2]int{176, 64},
		Origin:   [2]int{146, 32},
		Duration: lanceDuration,
		Loop:     true,
		FPS:      30,
		BG:       "dark",
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette(icePalette...)},
			{Name: "length", Default: pixelfx.Num(40)},
			{Name: "seed", Default: pixelfx.Num(13)},
		},
	},
	New: newIceLance,
}

IceLance is a faceted ice spear flying right: a light pulse runs through its core, rings of cold air shear off the tip, frost peels off into a wake and crystals shed behind it. It is registered as "ice/ice-lance".

var IceShatter = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "Ice shatter",
		Desc:     "A block of ice takes a hit from the left: it jolts, cracks race over its faces, it flashes white and bursts into chunks that tumble, bounce and skid off in a roll of ice dust.",
		Tags:     []string{"ice", "shatter", "break", "destroy", "impact", "directional", "one-shot"},
		Size:     [2]int{224, 112},
		Origin:   [2]int{68, 90},
		Duration: shatterDuration,
		Loop:     false,
		FPS:      30,
		BG:       "ground",
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette(icePalette...)},
			{Name: "seed", Default: pixelfx.Num(6)},
		},
	},
	New: newIceShatter,
}

IceShatter is a block of ice taking a hit from the left: it jolts, cracks race over its faces, it flashes white and bursts into chunks that tumble, bounce and skid off in a roll of ice dust. It is registered as "ice/ice-shatter".

var IceSpikes = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "Ice spikes",
		Desc:     "A frost line races along the floor and clusters of jagged ice blades burst up behind it in a rising wave, glint, flash white together and shatter into toppling shards.",
		Tags:     []string{"ice", "spikes", "ground", "wave", "directional", "magic", "one-shot"},
		Size:     [2]int{264, 112},
		Origin:   [2]int{24, 96},
		Duration: spikesDuration,
		Loop:     false,
		FPS:      30,
		BG:       "ground",
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette(icePalette...)},
			{Name: "reach", Default: pixelfx.Num(172)},
			{Name: "height", Default: pixelfx.Num(56)},
			{Name: "seed", Default: pixelfx.Num(3)},
		},
	},
	New: newIceSpikes,
}

IceSpikes is a frost line racing along the floor while clusters of jagged ice blades burst up behind it in a rising wave, glint, flash white together and shatter into toppling shards. It is registered as "ice/ice-spikes".

var IcicleFall = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "Icicle fall",
		Desc:     "An icicle drips and trembles, snaps off its frosted root, drops, stabs the floor and bursts into skidding shards, splinters and rolling frost.",
		Tags:     []string{"ice", "icicle", "fall", "trap", "shatter", "one-shot"},
		Size:     [2]int{152, 120},
		Origin:   [2]int{76, 100},
		Duration: icicleDuration,
		Loop:     false,
		FPS:      30,
		BG:       "ground",
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette(icePalette...)},
			{Name: "seed", Default: pixelfx.Num(4)},
		},
	},
	New: newIcicleFall,
}

IcicleFall is an icicle that drips and trembles, snaps off its frosted root, drops, stabs the floor and bursts into skidding shards, splinters and rolling frost. It is registered as "ice/icicle-fall".

var SnowflakeBurst = &pixelfx.Effect{
	Meta: pixelfx.Meta{
		Name:     "Snowflake burst",
		Desc:     "A cold pop: frost gathers and flashes white in a ring, then crisp six-armed snowflakes spin out, slow, twinkle and drift down to settle and melt.",
		Tags:     []string{"ice", "snow", "snowflake", "burst", "magic", "one-shot"},
		Size:     [2]int{140, 120},
		Origin:   [2]int{70, 106},
		Duration: burstDuration,
		Loop:     false,
		FPS:      30,
		BG:       "ground",
		Options: []pixelfx.Option{
			{Name: "palette", Default: pixelfx.Palette(icePalette...)},
			{Name: "count", Default: pixelfx.Num(9)},
			{Name: "seed", Default: pixelfx.Num(8)},
		},
	},
	New: newSnowflakeBurst,
}

SnowflakeBurst is a cold pop: frost gathers and flashes white in a ring, then crisp six-armed snowflakes spin out, slow, twinkle and drift down to settle and melt. It is registered as "ice/snowflake-burst".