holy library

Classes

FeatherItem
Feathers
Loose feathers that are thrown, brake hard, then rock like a pendulum as they sink.
HolyShape
Cached silhouette points for an actor at (x, y): rim pixels inside (edge), 1 px ring just outside (out), vertical bounds, and an inside test at.

Constants

kHolyAsh → const List<String>
Ash: the colour of the fallen, a cool grey-violet, dark to light.
kHolyGold → const List<String>
Holy gold, dark to bright: a plum shadow, rust, amber, gold, pale gold, cream, white.
kHolyGreen → const List<String>
Healing green, warm: deep pine, leaf, spring green, a yellow-green highlight, cream.

Properties

blessingEffect → PureEffect
final
divineShieldEffect → PureEffect
final
featherBurstEffect → SimulatedEffect
final
haloEffect → PureEffect
final
healAoeEffect → SimulatedEffect
final
healEffect → SimulatedEffect
final
holyEffects → List<PixelEffect>
All 10 effects in the holy category, sorted alphabetically by meta.id.
final
holyPillarEffect → SimulatedEffect
final
resurrectionEffect → SimulatedEffect
final
smiteEffect → SimulatedEffect
final
sunburstEffect → PureEffect
final

Functions

farHalf(double g) → bool
feather(Painter p, double x, double y, double ang, double len, double wid, List<int> rampColors, [double a = 1.0, int side = 1, double hot = 0.0, double quill = 0.02]) → void
A feather of light from its quill at (x, y) pointing along ang, len px long.
holyRound(double v) → int
JS Math.round(v) parity (rounds half towards +infinity, e.g. -1.5 -> -1).
nearHalf(double g) → bool
oval(Painter p, num cx, num cy, num rx, num ry, int c, [double a = 1.0, bool keep(double g)?]) → void
A 1 px oval (a ring on a tilted plane): centre (cx, cy), radii rx, ry. keep picks the part to draw.
ovalShaded(Painter p, num cx, num cy, num rx, num ry, {required int color(double v), double alpha(double g)?, bool keep(double g)?}) → void
Shaded variant of oval where color and alpha are functions of angle g.
plus(Painter p, double x, double y, int armLen, int th, List<int> rampColors, [double a = 1.0, bool glint = false]) → void
A plus sign of light centred on (x, y): arm length armLen (1..4) and thickness th (1 or 3).
recolor(Painter p, ActorDefinition a, int fn(int c, int x, int y), [double alpha = 1.0]) → void
Draw the actor's own pixels recolored: fn returns the new color for pixel c at (x, y), or 0 to leave that pixel alone.
recolorShaded(Painter p, ActorDefinition a, int fn(int c, int x, int y), double alpha(int x, int y)) → void
Variant of recolor with per-pixel alpha callback (x, y).
shapeOf(ActorDefinition a) → HolyShape
toneOf(List<int> rampColors, int c, [double lift = 0.0]) → int
A color mapped onto a ramp by its brightness (a tint that keeps the character's shading).