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 status
import "github.com/nsgo-dev/game/pkg/pixelfx/status"Visão geral
Package status is pixelfx's status category: bleeding, burning, charmed, confused, cursed, frozen, haste, petrified, poisoned, rage, sleep, slowed and stunned, each a pixelfx.Effect registered as "status/<name>" when the package is imported.
Índice
Variáveis
var Bleeding = &pixelfx.Effect{
Meta: pixelfx.Meta{
Name: "Bleeding",
Desc: "Bleeding out: beads swell at three wounds, run, let go and fall to spatter into a glossy pool that ripples; each heartbeat spurts a little and flashes the body red.",
Tags: []string{"status", "bleed", "blood", "dot", "debuff", "wound", "loop"},
Size: [2]int{60, 56},
Origin: [2]int{30, 46},
Duration: bleedingDuration,
Loop: true,
FPS: 30,
BG: "ground",
Actor: 2,
Options: []pixelfx.Option{
{Name: "palette", Default: pixelfx.Palette("#350711", "#5e0c1b", "#931327", "#c71e33", "#f2384a", "#ff8a7a")},
{Name: "seed", Default: pixelfx.Num(5)},
},
},
Act: &pixelfx.Act{
OnBody: true,
Poses: []pixelfx.Key{
{T: 0, Pose: bleedingBeatP},
{T: 0.18, Pose: bleedingClutch},
{T: 1.2, Pose: bleedingClutch},
{T: 1.2, Pose: bleedingBeatP, How: "snap"},
{T: 1.38, Pose: bleedingClutch},
{T: 2.4, Pose: bleedingClutch},
{T: 2.4, Pose: bleedingBeatP, How: "snap"},
},
},
New: newBleeding,
}Bleeding is bleeding out: beads swell at three wounds, run, let go and fall to spatter into a glossy pool that ripples; each heartbeat spurts a little and flashes the body red. It is registered as "status/bleeding".
var Burning = &pixelfx.Effect{
Meta: pixelfx.Meta{
Name: "Burning",
Desc: "Burning over time: small flames lick from four hot spots, trailing sparks and thin smoke; every 0.6 s they flare, the body flashes white then orange, scorch marks spread.",
Tags: []string{"status", "fire", "burn", "dot", "debuff", "loop"},
Size: [2]int{72, 80},
Origin: [2]int{36, 70},
Duration: burningDuration,
Loop: true,
FPS: 30,
BG: "ground",
Actor: 2,
Options: []pixelfx.Option{
{Name: "palette", Default: pixelfx.Palette("#4a1712", "#8a1f17", "#c9281f", "#f2561d", "#ff8a2a", "#ffc23d", "#ffe26b", "#fff3a6", "#ffffff")},
{Name: "char", Default: pixelfx.Palette("#120c0a", "#2a1a14", "#4a2c1c")},
{Name: "smoke", Default: pixelfx.Color("#5b5566")},
{Name: "seed", Default: pixelfx.Num(3)},
},
},
Act: &pixelfx.Act{
OnBody: true,
Poses: []pixelfx.Key{
{T: 0, Pose: burningA},
{T: 0.15, Pose: burningB, How: "snap"},
{T: 0.3, Pose: burningA, How: "snap"},
{T: 0.45, Pose: burningB, How: "snap"},
{T: 0.6, Pose: burningA, How: "snap"},
{T: 0.75, Pose: burningB, How: "snap"},
{T: 0.9, Pose: burningA, How: "snap"},
{T: 1.05, Pose: burningB, How: "snap"},
{T: 1.2, Pose: burningA, How: "snap"},
},
},
ActorAlpha: func(t float64, _ *pixelfx.Options) float64 {
if burningSince(t) < 0.034 {
return 0
}
return 1
},
New: newBurning,
}Burning is burning over time: small flames lick from four hot spots, trailing sparks and thin smoke; every 0.6 s they flare, the body flashes white then orange, scorch marks spread. It is registered as "status/burning".
var Charmed = &pixelfx.Effect{
Meta: pixelfx.Meta{
Name: "Charmed",
Desc: "Smitten: a big heart beats over the head, throwing a ring and a flush of light with every beat, little hearts float up, the eyes go pink and the cheeks blush.",
Tags: []string{"status", "charm", "love", "hearts", "debuff", "loop"},
Size: [2]int{60, 76},
Origin: [2]int{30, 68},
Duration: charmedDuration,
Loop: true,
FPS: 30,
BG: "ground",
Actor: 2,
Options: []pixelfx.Option{
{Name: "palette", Default: pixelfx.Palette("#3a0a1e", "#7a1238", "#c4245a", "#f04e86", "#ff8ab0", "#ffc8da", "#ffffff")},
{Name: "seed", Default: pixelfx.Num(8)},
},
},
Act: &pixelfx.Act{
OnBody: true,
Poses: []pixelfx.Key{
{T: 0, Pose: charmedSwoon.With(pixelfx.Lean.Is(-2))},
{T: 0.6, Pose: charmedSwoon.With(pixelfx.Lean.Is(0), pixelfx.Crouch.Is(1))},
{T: 1.2, Pose: charmedSwoon.With(pixelfx.Lean.Is(2))},
{T: 1.8, Pose: charmedSwoon.With(pixelfx.Lean.Is(0), pixelfx.Crouch.Is(1))},
{T: 2.4, Pose: charmedSwoon.With(pixelfx.Lean.Is(-2))},
},
},
New: newCharmed,
}Charmed is smitten: a big heart beats over the head, throwing a ring and a flush of light with every beat, little hearts float up, the eyes go pink and the cheeks blush. It is registered as "status/charmed".
var Confused = &pixelfx.Effect{
Meta: pixelfx.Meta{
Name: "Confused",
Desc: "Head in a spin: a glowing spiral whirls over the head, question marks pop up round it and bob, the eyes dart left and right.",
Tags: []string{"status", "confused", "confusion", "dizzy", "debuff", "loop"},
Size: [2]int{60, 78},
Origin: [2]int{30, 70},
Duration: confusedDuration,
Loop: true,
FPS: 30,
BG: "ground",
Actor: 2,
Options: []pixelfx.Option{
{Name: "palette", Default: pixelfx.Palette("#1e0f2e", "#4b2070", "#8a3ab0", "#c66ae0", "#f0a8ff", "#ffffff")},
{Name: "marks", Default: pixelfx.Palette("#2a1608", "#b0701a", "#ffd84a", "#fff4b8")},
{Name: "seed", Default: pixelfx.Num(6)},
},
},
Act: &pixelfx.Act{
OnBody: true,
Poses: []pixelfx.Key{
{T: 0, Pose: confusedShrug.With(pixelfx.X.Is(0), pixelfx.Lean.Is(-2))},
{T: 0.6, Pose: confusedShrug.With(pixelfx.X.Is(1), pixelfx.Lean.Is(1), pixelfx.Crouch.Is(1), pixelfx.FY.Is(-23), pixelfx.BY.Is(-29), pixelfx.FBX.Is(5), pixelfx.FBY.Is(-6))},
{T: 1.2, Pose: confusedShrug.With(pixelfx.X.Is(2), pixelfx.Lean.Is(2))},
{T: 1.8, Pose: confusedShrug.With(pixelfx.X.Is(1), pixelfx.Lean.Is(-1), pixelfx.Crouch.Is(1), pixelfx.FY.Is(-29), pixelfx.BY.Is(-23), pixelfx.FFX.Is(-4), pixelfx.FFY.Is(-6))},
{T: 2.4, Pose: confusedShrug.With(pixelfx.X.Is(0), pixelfx.Lean.Is(-2))},
},
},
New: newConfused,
}Confused is head in a spin: a glowing spiral whirls over the head, question marks pop up round it and bob, the eyes dart left and right. It is registered as "status/confused".
var Cursed = &pixelfx.Effect{
Meta: pixelfx.Meta{
Name: "Cursed",
Desc: "Hexed: violet smoke rises off the body in winding trails, a dark stain creeps up from the feet with a glowing edge, the eyes burn, a skull glitches in overhead.",
Tags: []string{"status", "curse", "hex", "dark", "debuff", "shadow", "loop"},
Size: [2]int{64, 84},
Origin: [2]int{32, 76},
Duration: cursedDuration,
Loop: true,
FPS: 30,
BG: "ground",
Actor: 2,
Options: []pixelfx.Option{
{Name: "palette", Default: pixelfx.Palette("#0c0612", "#1f0f2e", "#3a1a55", "#5e2a85", "#8a3fc0", "#b86ef0", "#e0b0ff", "#ffffff")},
{Name: "seed", Default: pixelfx.Num(9)},
},
},
Act: &pixelfx.Act{
OnBody: true,
Poses: []pixelfx.Key{
{T: 0, Pose: cursedHunch},
{T: 0.6, Pose: cursedHunch.With(pixelfx.Crouch.Is(5))},
{T: 1.2, Pose: cursedHunch.With(pixelfx.Lean.Is(2))},
{T: 1.8, Pose: cursedHunch.With(pixelfx.Crouch.Is(5))},
{T: 2.4, Pose: cursedHunch},
},
},
New: newCursed,
}Cursed is hexed: violet smoke rises off the body in winding trails, a dark stain creeps up from the feet with a glowing edge, the eyes burn, a skull glitches in overhead. It is registered as "status/cursed".
var Frozen = &pixelfx.Effect{
Meta: pixelfx.Meta{
Name: "Frozen",
Desc: "Chilled to the bone: frost ferns creep over the body, icicles hang from chin and hands and drip, breath steams, snow settles, a shiver every second, frost spreads underfoot.",
Tags: []string{"status", "ice", "freeze", "frozen", "cold", "chill", "debuff", "loop"},
Size: [2]int{72, 64},
Origin: [2]int{36, 54},
Duration: frozenDuration,
Loop: true,
FPS: 30,
BG: "ground",
Actor: 2,
Options: []pixelfx.Option{
{Name: "palette", Default: pixelfx.Palette("#151a3d", "#212f6b", "#2c58aa", "#3a8bd8", "#62c8f4", "#a6ecff", "#dcfbff", "#ffffff")},
{Name: "seed", Default: pixelfx.Num(4)},
},
},
Act: &pixelfx.Act{
OnBody: true,
Poses: []pixelfx.Key{
{T: 0, Pose: frozenStiff.With(pixelfx.Crouch.Is(2))},
{T: 0.22, Pose: frozenStiff},
{T: 1, Pose: frozenStiff},
{T: 1, Pose: frozenStiff.With(pixelfx.Crouch.Is(2)), How: "snap"},
{T: 1.22, Pose: frozenStiff},
{T: 2, Pose: frozenStiff.With(pixelfx.Crouch.Is(2))},
},
},
ActorAlpha: func(float64, *pixelfx.Options) float64 { return 0 },
New: newFrozen,
}Frozen is chilled to the bone: frost ferns creep over the body, icicles hang from chin and hands and drip, breath steams, snow settles, a shiver every second, frost spreads underfoot. It is registered as "status/frozen".
var Haste = &pixelfx.Effect{
Meta: pixelfx.Meta{
Name: "Haste",
Desc: "Sped up: striped after-images stream out behind, speed lines whip past, dust kicks off the heels and the leading edge catches the wind. Faces right.",
Tags: []string{"status", "haste", "speed", "fast", "buff", "directional", "loop"},
Size: [2]int{100, 56},
Origin: [2]int{64, 48},
Duration: hasteDuration,
Loop: true,
FPS: 30,
BG: "ground",
Actor: 2,
Options: []pixelfx.Option{
{Name: "palette", Default: pixelfx.Palette("#4c25ab", "#773ae4", "#5b6cff", "#5eb0ff", "#a3dcff", "#ccf6ff", "#ffffff")},
{Name: "dust", Default: pixelfx.Color("#8a8090")},
{Name: "seed", Default: pixelfx.Num(4)},
},
},
Act: &pixelfx.Act{
OnBody: true,
Follow: pixelfx.Val(0),
Poses: []pixelfx.Key{
{T: 0, Pose: hasteR1},
{T: 0.1, Pose: hasteR2, How: "snap"},
{T: 0.2, Pose: hasteR3, How: "snap"},
{T: 0.3, Pose: hasteR4, How: "snap"},
{T: 0.4, Pose: hasteR1, How: "snap"},
{T: 0.5, Pose: hasteR2, How: "snap"},
{T: 0.6, Pose: hasteR3, How: "snap"},
{T: 0.7, Pose: hasteR4, How: "snap"},
{T: 0.8, Pose: hasteR1, How: "snap"},
{T: 0.9, Pose: hasteR2, How: "snap"},
{T: 1, Pose: hasteR3, How: "snap"},
{T: 1.1, Pose: hasteR4, How: "snap"},
{T: 1.2, Pose: hasteR1, How: "snap"},
},
},
New: newHaste,
}Haste is sped up: striped after-images stream out behind, speed lines whip past, dust kicks off the heels and the leading edge catches the wind. Faces right. It is registered as "status/haste".
var Petrified = &pixelfx.Effect{
Meta: pixelfx.Meta{
Name: "Petrified",
Desc: "Turned to stone: grey creeps up from the feet behind a crackling edge that spits grit, the statue holds, cracks run through it, and it bursts into tumbling chunks and dust.",
Tags: []string{"status", "stone", "petrify", "petrified", "debuff", "death", "one-shot"},
Size: [2]int{120, 74},
Origin: [2]int{60, 64},
Duration: petrifiedDuration,
Loop: false,
FPS: 30,
BG: "ground",
Actor: 2,
Options: []pixelfx.Option{
{Name: "palette", Default: pixelfx.Palette("#16141c", "#2a2733", "#433f4d", "#5f5a6a", "#7d7889", "#a29dab", "#cdc8d2", "#f0edf3")},
{Name: "seed", Default: pixelfx.Num(3)},
},
},
Act: &pixelfx.Act{
OnBody: true,
Poses: []pixelfx.Key{
{T: -0.16, Pose: pixelfx.Ready},
{T: 0.08, Pose: petrifiedShock, How: "snap"},
{T: 0.5, Pose: petrifiedReach},
{T: 0.95, Pose: petrifiedReach},
{T: 3.8, Pose: petrifiedReach},
},
Hits: []pixelfx.Hit{
{T: 2.2, Stop: 0.08, Shake: 0.24, Amp: pixelfx.Val(2)},
},
},
ActorAlpha: func(t float64, _ *pixelfx.Options) float64 {
if t < petrifiedCreep {
return 1
}
return 0
},
New: newPetrified,
}Petrified is turned to stone: grey creeps up from the feet behind a crackling edge that spits grit, the statue holds, cracks run through it, and it bursts into tumbling chunks and dust. It is registered as "status/petrified".
var Poisoned = &pixelfx.Effect{
Meta: pixelfx.Meta{
Name: "Poisoned",
Desc: "Sick to the bone: green rolls up the body in waves, dark veins creep from a wound, toxic sweat drips and hisses; every 0.8 s it wobbles, blisters pop and a ring pulses out.",
Tags: []string{"status", "poison", "toxic", "dot", "debuff", "sick", "loop"},
Size: [2]int{72, 64},
Origin: [2]int{36, 54},
Duration: poisonedDuration,
Loop: true,
FPS: 30,
BG: "ground",
Actor: 2,
Options: []pixelfx.Option{
{Name: "palette", Default: pixelfx.Palette("#0e1d14", "#173320", "#23552e", "#318232", "#55b92f", "#8eea3f", "#cfff63", "#f6ffc2")},
{Name: "veins", Default: pixelfx.Color("#2c1a3a")},
{Name: "seed", Default: pixelfx.Num(5)},
},
},
Act: &pixelfx.Act{
OnBody: true,
Poses: []pixelfx.Key{
{T: 0, Pose: poisonedSick.With(pixelfx.X.Is(-1), pixelfx.Crouch.Is(5), pixelfx.Lean.Is(5))},
{T: 0.2, Pose: poisonedSick.With(pixelfx.X.Is(0))},
{T: 0.5, Pose: poisonedSick.With(pixelfx.X.Is(1))},
{T: 0.8, Pose: poisonedSick.With(pixelfx.X.Is(1), pixelfx.Crouch.Is(5), pixelfx.Lean.Is(5))},
{T: 1, Pose: poisonedSick.With(pixelfx.X.Is(0))},
{T: 1.3, Pose: poisonedSick.With(pixelfx.X.Is(-1))},
{T: 1.6, Pose: poisonedSick.With(pixelfx.X.Is(-1), pixelfx.Crouch.Is(5), pixelfx.Lean.Is(5))},
},
},
ActorAlpha: func(float64, *pixelfx.Options) float64 { return 0 },
New: newPoisoned,
}Poisoned is sick to the bone: green rolls up the body in waves, dark veins creep from a wound, toxic sweat drips and hisses; every 0.8 s it wobbles, blisters pop and a ring pulses out. It is registered as "status/poisoned".
var Rage = &pixelfx.Effect{
Meta: pixelfx.Meta{
Name: "Rage",
Desc: "Seething: the body judders on every heartbeat, an anger mark throbs at the temple, eyes burn, steam jets off the head, stress lines flash out and the floor cracks hot underfoot.",
Tags: []string{"status", "rage", "berserk", "anger", "buff", "loop"},
Size: [2]int{80, 80},
Origin: [2]int{40, 70},
Duration: rageDuration,
Loop: true,
FPS: 30,
BG: "ground",
Actor: 2,
Options: []pixelfx.Option{
{Name: "palette", Default: pixelfx.Palette("#1a0208", "#4a0612", "#8a0c1c", "#c81828", "#ff3040", "#ff7a7a", "#ffc8c8", "#ffffff")},
{Name: "heat", Default: pixelfx.Palette("#5a0a0a", "#c8281a", "#ff7a2a", "#ffd27a")},
{Name: "steam", Default: pixelfx.Color("#f2e8ee")},
{Name: "seed", Default: pixelfx.Num(6)},
},
},
Act: &pixelfx.Act{
OnBody: true,
Poses: []pixelfx.Key{
{T: 0, Pose: rageSeethe},
{T: 0.05, Pose: rageThud, How: "snap"},
{T: 0.17, Pose: rageSeethe, How: "snap"},
{T: 0.29, Pose: rageThud.With(pixelfx.Crouch.Is(5)), How: "snap"},
{T: 0.4, Pose: rageSeethe, How: "snap"},
{T: 1.2, Pose: rageSeethe},
},
},
ActorAlpha: func(t float64, _ *pixelfx.Options) float64 {
if rageShaking(t) {
return 0
}
return 1
},
New: newRage,
}Rage is seething: the body judders on every heartbeat, an anger mark throbs at the temple, eyes burn, steam jets off the head, stress lines flash out and the floor cracks hot underfoot. It is registered as "status/rage".
var Sleep = &pixelfx.Effect{
Meta: pixelfx.Meta{
Name: "Sleep",
Desc: "Fast asleep: eyes shut, soft outlined Zs float up off the head one after another, swaying and growing as they rise, dream motes drift, a slow breathing glow.",
Tags: []string{"status", "sleep", "zzz", "rest", "debuff", "loop"},
Size: [2]int{60, 82},
Origin: [2]int{26, 74},
Duration: sleepDuration,
Loop: true,
FPS: 30,
BG: "ground",
Actor: 2,
Options: []pixelfx.Option{
{Name: "palette", Default: pixelfx.Palette("#1a1636", "#3c3a7a", "#6f78c8", "#a9b8f0", "#dfe6ff", "#ffffff")},
{Name: "seed", Default: pixelfx.Num(3)},
},
},
Act: &pixelfx.Act{
OnBody: true,
Poses: []pixelfx.Key{
{T: 0, Pose: sleepNod},
{T: 1.2, Pose: sleepNod.With(pixelfx.Crouch.Is(2), pixelfx.Lean.Is(2), pixelfx.HY.Is(3))},
{T: 2.4, Pose: sleepNod},
},
},
New: newSleep,
}Sleep is fast asleep: eyes shut, soft outlined Zs float up off the head one after another, swaying and growing as they rise, dream motes drift, a slow breathing glow. It is registered as "status/sleep".
var Slowed = &pixelfx.Effect{
Meta: pixelfx.Meta{
Name: "Slowed",
Desc: "Dragged through time: a glassy clock dial behind the head ticks round in heavy steps, flashing with each, while drops sink in slow motion and spread slow rings.",
Tags: []string{"status", "slow", "time", "clock", "debuff", "loop"},
Size: [2]int{64, 76},
Origin: [2]int{32, 68},
Duration: slowedDuration,
Loop: true,
FPS: 30,
BG: "ground",
Actor: 2,
Options: []pixelfx.Option{
{Name: "palette", Default: pixelfx.Palette("#081a24", "#0e3446", "#165a6e", "#2a8a9a", "#52bcc4", "#9ee6e0", "#e2fff8", "#ffffff")},
{Name: "seed", Default: pixelfx.Num(7)},
},
},
Act: &pixelfx.Act{
OnBody: true,
Poses: []pixelfx.Key{
{T: 0, Pose: slowedS1},
{T: 1.2, Pose: slowedS2},
{T: 2.4, Pose: slowedS1},
},
},
New: newSlowed,
}Slowed is dragged through time: a glassy clock dial behind the head ticks round in heavy steps, flashing with each, while drops sink in slow motion and spread slow rings. It is registered as "status/slowed".
var Stunned = &pixelfx.Effect{
Meta: pixelfx.Meta{
Name: "Stunned",
Desc: "Seeing stars: three spinning stars and two little birds circle the head on a tilted ring, ducking behind it and sweeping round in front, trailing glitter.",
Tags: []string{"status", "stun", "dizzy", "daze", "stars", "birds", "debuff", "loop"},
Size: [2]int{60, 64},
Origin: [2]int{30, 56},
Duration: stunnedDuration,
Loop: true,
FPS: 30,
BG: "ground",
Actor: 2,
Options: []pixelfx.Option{
{Name: "palette", Default: pixelfx.Palette("#3a1e0c", "#8a4a12", "#d88a1c", "#f5c030", "#ffe36e", "#fff6c8", "#ffffff")},
{Name: "birds", Default: pixelfx.Palette("#1a1422", "#6a7fae", "#b8c8e8", "#f4f8ff")},
{Name: "beak", Default: pixelfx.Color("#ffae35")},
{Name: "seed", Default: pixelfx.Num(2)},
},
},
Act: &pixelfx.Act{
OnBody: true,
Poses: []pixelfx.Key{
{T: 0, Pose: stunnedDaze.With(pixelfx.X.Is(-1), pixelfx.Lean.Is(-3), pixelfx.HX.Is(-1))},
{T: 0.5, Pose: stunnedDaze.With(pixelfx.X.Is(0), pixelfx.Lean.Is(0), pixelfx.Crouch.Is(2), pixelfx.HY.Is(1), pixelfx.FFX.Is(-2))},
{T: 1, Pose: stunnedDaze.With(pixelfx.X.Is(1), pixelfx.Lean.Is(3), pixelfx.HX.Is(1))},
{T: 1.5, Pose: stunnedDaze.With(pixelfx.X.Is(0), pixelfx.Lean.Is(0), pixelfx.Crouch.Is(2), pixelfx.HY.Is(1), pixelfx.FBX.Is(3))},
{T: 2, Pose: stunnedDaze.With(pixelfx.X.Is(-1), pixelfx.Lean.Is(-3), pixelfx.HX.Is(-1))},
},
},
New: newStunned,
}Stunned is seeing stars: three spinning stars and two little birds circle the head on a tilted ring, ducking behind it and sweeping round in front, trailing glitter. It is registered as "status/stunned".