mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-11-29 05:11:19 -08:00
Move Ghoul Rush into activities/ghoul-rush/ and split ghoul.js
Every Ghoul Rush file moves under activities/ghoul-rush/, sorted into core, arms, draw, story, sfx, stages/<stage> and rides/<ride>, with names unchanged. ghoul.js is now a facade over seven parts in core/, taking it from over the 3,000 line cap to 50 lines. Also in this tree: the Drowned Lantern replaces the Bog Runner, the "Use a Lucky Die?" question, the Old Mother Bog rework, Rapid fire at 60 ms, the rules for the finale's first kill (not plugged in yet), and small fixes the suites asked for (the Stilt House's and Drowning Pool's weapons). AI Assisted
This commit is contained in:
1 parent
0454bdd19a
commit
903fbf5680
160 files changed
+11022
-7061
No files matched your search
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,547 @@
|
||||
// Plan2Code Web Console - Ghoul Rush's Gardener's Revenge, its rules: the Grounds' bonus round. YOU ride the gardener's rusty, haunted ride-on mower down a long straight run through the overgrown estate lawn at night: jump the gnomes, barrows, flowerpots, ponds and ha-ha ditches, duck the hedge arches and the clothes lines of ghostly gloves, shoot the snapping topiary beasts, and MOW: hold fire and the blades come down, cutting the tall grass, the weeds and the thorn hedges just ahead. As a stage pack that ghoul.js plugs in.
|
||||
//
|
||||
// Modeled on the Coffin Sled (ghoul-sled.js: read its header first) and, like it, handed a
|
||||
// kit `k` of ghoul.js's own helpers, so this file never imports ghoul.js (it borrows the
|
||||
// cart's track helpers). Pack fields used: `ride` (a hook that moves Planny himself, so no
|
||||
// key walks him), `place` (Planny put down in a room: a room set up or a respawn) and
|
||||
// `target` (a bolt strikes something that is no monster: the topiary beasts). It adds no
|
||||
// monster, boss or hazard kind and it draws NO random number. Its state is the shared
|
||||
// bonus-ride slot `round.runner` (id "mower"; null in any other room), the room marks its
|
||||
// ride `runner: "mower"` (the cart's `place` leaves such a room alone).
|
||||
//
|
||||
// THE ROOM (spec.ride, see ghoul-rooms.js):
|
||||
//
|
||||
// - `track`: polylines [x, y] the mower rolls along, all flat at one height; a gap between
|
||||
// two lines is a POND or a HA-HA DITCH (`gaps`: per gap, 0 a pond, 1 a ditch; jump it, or
|
||||
// the mower drops in: a heart, cause "pond" or "ditch"). The last line ends at `finish`,
|
||||
// where the lawn's end (the ground) begins at the same height: rolling onto it ends the ride.
|
||||
// - `junk` [x, kind] (a garden gnome, a wheelbarrow or a flowerpot, JUNK: jump it), `lows`
|
||||
// [x0, x1, y, kind] (a hedge arch, kind 0, or a clothes line of ghostly gloves, kind 1: its
|
||||
// underside is y, from there up to the roof, so DUCK it; y is 3.0 over the lawn, between a
|
||||
// ducked box and a standing one), `hedges` [x] (a thorn hedge across the lane, THORN_W by
|
||||
// THORN_H: MOW it, or jump it), `beasts` [x] (a snapping topiary beast: it shivers
|
||||
// BEAST_WARN_MS when the mower is BEAST_NEAR short of it, then lunges into the lane
|
||||
// BEAST_UP_MS, BEAST_W by BEAST_H: shoot it, BEAST_HP bolts, or jump it), `grass` [x0, x1]
|
||||
// (tall grass, one cell a unit, mown by the blades), `weeds` [x] (a weed patch with a
|
||||
// flower, WEED_CELLS cells), `checks` (x positions of the checkpoints), `finish`, `time`
|
||||
// (the room's clock, ms) and `how` (the controls line).
|
||||
//
|
||||
// THE MOWER (`round.runner`): { id, room, check, v, line, coyote, from, left, done, heat,
|
||||
// jam, blade, bogMs, cut, cells, lawn, grass, hedges, weeds, beasts, ... }. Planny rides
|
||||
// at (you.x, you.y), always facing right (`you.state` "run" on the lawn, "air" off it,
|
||||
// `you.ducking` ducked). Speed `v` is MOWER_V, bogging down BOG slower for BOG_MS after a
|
||||
// cut (nothing else changes it: it is a ride). Up jumps at MOWER_JUMP_V against MOWER_G
|
||||
// (about 11 high, 0.7 s, 22 across at MOWER_V), COYOTE_MS of grace after running off a line's
|
||||
// end; down ducks.
|
||||
//
|
||||
// THE BLADES: while fire is held and the blades are not jammed they are down (`blade`) and cut
|
||||
// everything in the zone from the mower's front to BLADE_REACH ahead of it: every grass cell
|
||||
// (GRASS_POINTS each), every weed patch (WEED_POINTS, an act) and every thorn hedge
|
||||
// (HEDGE_POINTS, an act). Holding fire heats them (`heat` 0 to 1, HEAT_UP a second; they
|
||||
// cool COOL a second while let go); full heat JAMS them for JAM_MS (no cutting, smoke), after
|
||||
// which they restart at JAM_RESUME. So the player pulses them. The bolts fly all the time
|
||||
// fire is held, as always. `lawn` is the share of the room's cells cut (grass cells plus
|
||||
// WEED_CELLS a weed patch): the grade's `steady` die is lawn at least LAWN_GOAL.
|
||||
//
|
||||
// A hit costs one of the round's five hearts (ghoul-bonus.js), not a life, and the mower rolls
|
||||
// on, Planny blinking safe BONUS_SAFE_MS; the last heart gone ends the round with nothing, at
|
||||
// once. A fall puts him back on the lawn ahead at MOWER_V. Causes: "gnome", "barrow", "pot",
|
||||
// "arch", "line", "thorns", "snap", "pond", "ditch". Every obstacle is a number for the grade
|
||||
// (`perf.total`: junk, lows, hedges, beasts and gaps, each id once in `perf.hits` if it ever
|
||||
// cost a heart); cutting a hedge or a weed patch, or shooting a beast, counts for `perf.acts`
|
||||
// (the grade's goal is ACTS_GOAL).
|
||||
//
|
||||
// Checkpoints are passed at their x (`mowerCheck`); a restart after the last heart goes back to the
|
||||
// last one passed (that ends the round, as the sled's does).
|
||||
//
|
||||
// WHAT THE ART READS: `spec.ride` (above), `round.runner` { v, line, check, done, left, heat,
|
||||
// jam, blade, lawn, cut, grass: [[cut cells]], hedges: [cut], weeds: [cut], beasts: [{ state
|
||||
// "idle"|"warn"|"snap"|"sink"|"spent"|"broken", t }] }, `round.you` (`state`, `vy`, `ducking`),
|
||||
// the events in EVENTS.
|
||||
|
||||
import { linesAt, linesOf, trackY } from "../cart/ghoul-cart.js";
|
||||
|
||||
const freeze = (o) => Object.freeze(o);
|
||||
const clamp = (v, lo, hi) => Math.min(hi, Math.max(lo, v));
|
||||
|
||||
export const MONSTERS = freeze({});
|
||||
|
||||
// Every event this pack puts on the field, for the art and the sounds to answer.
|
||||
export const EVENTS = freeze([
|
||||
"mowerJump", "mowerLand", "mowerDuck", "mowerCrash", "mowerCheck", "mowerFinish",
|
||||
"mowerGrass", "mowerHedge", "mowerWeed", "mowerJam",
|
||||
"mowerBeastWarn", "mowerBeastSnap", "mowerBeastHit", "mowerBeastBreak",
|
||||
]);
|
||||
|
||||
// The mower. Speeds are units across a second, MOWER_G units a second squared.
|
||||
export const MOWER_V = 32;
|
||||
export const BOG = 4;
|
||||
export const BOG_MS = 220;
|
||||
export const RELAX = 3;
|
||||
export const MOWER_JUMP_V = 66;
|
||||
export const MOWER_G = 190;
|
||||
export const COYOTE_MS = 100;
|
||||
export const LAND_TOL = 0.9;
|
||||
export const BIG_LAND = 5;
|
||||
export const DERAIL_DROP = 7;
|
||||
export const CAM_AHEAD = 10;
|
||||
// The blades.
|
||||
export const BLADE_REACH = 9;
|
||||
export const BLADE_NEAR = 0;
|
||||
export const HEAT_UP = 0.75;
|
||||
export const COOL = 0.5;
|
||||
export const JAM_MS = 1800;
|
||||
export const JAM_RESUME = 0.3;
|
||||
export const GRASS_POINTS = 4;
|
||||
export const WEED_POINTS = 40;
|
||||
export const HEDGE_POINTS = 80;
|
||||
export const WEED_CELLS = 3;
|
||||
export const WEED_W = 2.2;
|
||||
export const LAWN_GOAL = 0.6;
|
||||
// Obstacles: a gnome, a wheelbarrow, a flowerpot (jump), a thorn hedge (mow or jump).
|
||||
export const JUNK = freeze([
|
||||
freeze({ name: "gnome", w: 2.4, h: 4.2 }),
|
||||
freeze({ name: "barrow", w: 5.2, h: 3 }),
|
||||
freeze({ name: "pot", w: 2.2, h: 3.6 }),
|
||||
]);
|
||||
export const THORN_W = 3.4;
|
||||
export const THORN_H = 3.8;
|
||||
// The snapping topiary beast: wakes, lunges into the lane, and the shots at it.
|
||||
export const BEAST_W = 3.4;
|
||||
export const BEAST_H = 4.6;
|
||||
export const BEAST_HP = 2;
|
||||
export const BEAST_NEAR = 36;
|
||||
export const BEAST_WARN_MS = 450;
|
||||
export const BEAST_UP_MS = 1400;
|
||||
export const BEAST_SINK_MS = 300;
|
||||
export const BEAST_POINTS = 150;
|
||||
const SHOT_R = 0.5;
|
||||
// The shots and cuts (a hedge, a weed patch, a beast) worth a die.
|
||||
export const ACTS_GOAL = 14;
|
||||
|
||||
// Notes for a bonus round that obstacle `id` cost a heart (once each).
|
||||
function noteHit(round, id) {
|
||||
const b = round.bonusRound;
|
||||
if (b && !b.perf.hits.includes(id)) b.perf.hits.push(id);
|
||||
}
|
||||
|
||||
const duckH = (k, you) => (you.ducking ? k.DUCK_H : k.HIT_H);
|
||||
const boxHit = (k, you, x, y0, w, h) => Math.abs(you.x - x) < (k.HIT_W + w) / 2 && you.y < y0 + h && you.y + duckH(k, you) > y0;
|
||||
|
||||
// The highest line under x, as [line, y], or null over a gap.
|
||||
const topAt = (R, x) => linesAt(R, x)[0] || null;
|
||||
|
||||
// The highest line the mower, falling from `py` to `y` at `x`, crossed going down.
|
||||
function landOn(R, x, py, y) {
|
||||
for (const [line, ly] of linesAt(R, x)) if (py >= ly - LAND_TOL && y <= ly) return { line, y: ly };
|
||||
return null;
|
||||
}
|
||||
|
||||
// Where a mower in the air at (x, y) going up at vy and across at v lands, if it does not
|
||||
// steer: { x, y, line } or null when it drops. The unit suite's measure of which gaps a jump clears.
|
||||
export function flight(R, x, y, vy, v) {
|
||||
const dt = 0.004;
|
||||
const floor = y - DERAIL_DROP;
|
||||
for (let t = 0; t < 5; t += dt) {
|
||||
const py = y;
|
||||
vy = Math.max(-120, vy - MOWER_G * dt);
|
||||
x += v * dt;
|
||||
y += vy * dt;
|
||||
if (vy <= 0) {
|
||||
const f = landOn(R, x, py, y);
|
||||
if (f) return { x, y: f.y, line: f.line };
|
||||
}
|
||||
if (y < floor) return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
// The cells of a stretch of tall grass: one a unit.
|
||||
export const cellsOf = (g) => Math.max(1, Math.ceil(g[1] - g[0]));
|
||||
// The room's cells in all, the lawn's whole, and how many of them are cut so far in a runner.
|
||||
export const totalCells = (R) => R.grass.reduce((n, g) => n + cellsOf(g), 0) + R.weeds.length * WEED_CELLS;
|
||||
|
||||
/* -------------------------------------------------------------- placing */
|
||||
|
||||
// A fresh set of the room's things, each beast asleep. What was cut or shot stays so (`old`,
|
||||
// the runner of an earlier try in the same room).
|
||||
function things(R, old) {
|
||||
const same = Boolean(old && old.id === "mower" && old.grass.length === R.grass.length && old.hedges.length === R.hedges.length && old.weeds.length === R.weeds.length && old.beasts.length === R.beasts.length);
|
||||
return {
|
||||
grass: R.grass.map((g, i) => (same && old.grass[i].length === cellsOf(g) ? old.grass[i].slice() : new Array(cellsOf(g)).fill(false))),
|
||||
hedges: R.hedges.map((_, i) => Boolean(same && old.hedges[i])),
|
||||
weeds: R.weeds.map((_, i) => Boolean(same && old.weeds[i])),
|
||||
beasts: R.beasts.map((_, i) => ({ state: same && old.beasts[i].state === "broken" ? "broken" : "idle", t: 0, hp: BEAST_HP })),
|
||||
};
|
||||
}
|
||||
|
||||
// How many cells are cut, from the lists.
|
||||
function cutCells(c) {
|
||||
return c.grass.reduce((n, g) => n + g.filter(Boolean).length, 0) + c.weeds.filter(Boolean).length * WEED_CELLS;
|
||||
}
|
||||
|
||||
// Planny put down in the room: on the mower at the start of a ride, or at the last
|
||||
// checkpoint passed after the last heart (the same room).
|
||||
function place(round, k) {
|
||||
const R = round.spec.ride;
|
||||
// (The Cart's `place` runs first and has already zeroed `round.camLead`: another room's lead is not ours to touch.)
|
||||
if (!R || R.runner !== "mower") {
|
||||
if (round.runner && round.runner.id === "mower") round.runner = null;
|
||||
return;
|
||||
}
|
||||
const again = round.runner && round.runner.id === "mower" && round.runner.room === round.room;
|
||||
const check = again ? round.runner.check : -1;
|
||||
const you = round.you;
|
||||
const x = check >= 0 ? R.checks[check] : round.spec.start;
|
||||
const top = topAt(R, x);
|
||||
Object.assign(you, { x, y: top ? top[1] : you.y, vy: 0, state: "run", shelf: -1, face: 1, ducking: false, coyote: 0, drop: -1 });
|
||||
const t = things(R, again ? round.runner : null);
|
||||
const cells = totalCells(R);
|
||||
round.runner = { id: "mower", room: round.room, check, v: MOWER_V, line: top ? top[0] : -1, coyote: 0, from: you.y, left: top ? top[0] : 0, done: false, heat: 0, jam: 0, blade: false, bogMs: 0, cells, cut: 0, lawn: 0, ...t };
|
||||
round.runner.cut = cutCells(round.runner);
|
||||
round.runner.lawn = cells ? round.runner.cut / cells : 0;
|
||||
round.camLead = CAM_AHEAD;
|
||||
const b = round.bonusRound;
|
||||
if (b && !b.perf.total) {
|
||||
b.perf.total = R.junk.length + R.lows.length + R.hedges.length + R.beasts.length + (R.track.length - 1);
|
||||
b.perf.steady = false;
|
||||
b.perf.goal = ACTS_GOAL;
|
||||
}
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ the ride */
|
||||
|
||||
// After a fall that cost a heart but not the ride: Planny and the mower go back onto the
|
||||
// lawn nearest where they fell (the line under him, else the next one ahead) at MOWER_V. He
|
||||
// blinks safe (ghoul.js's takeLife).
|
||||
function reseat(round, c, R) {
|
||||
const you = round.you;
|
||||
const under = topAt(R, you.x);
|
||||
let line;
|
||||
let x;
|
||||
let y;
|
||||
if (under) {
|
||||
[line, y] = under;
|
||||
x = you.x;
|
||||
} else {
|
||||
const ahead = linesOf(R)
|
||||
.map((L, i) => ({ i, x0: L.x0 }))
|
||||
.filter((L) => L.x0 > you.x)
|
||||
.sort((a, b) => a.x0 - b.x0)[0];
|
||||
line = ahead ? ahead.i : linesOf(R).length - 1;
|
||||
x = ahead ? ahead.x0 + 2 : R.finish - 2;
|
||||
y = trackY(R, line, x) ?? you.y;
|
||||
}
|
||||
Object.assign(you, { x, y, vy: 0, state: "run", shelf: -1, ducking: false, coyote: 0, drop: -1 });
|
||||
Object.assign(c, { line, v: MOWER_V, coyote: 0, from: y });
|
||||
}
|
||||
|
||||
// The mower's motion for one slice. Returns true once it has moved Planny (every slice of a
|
||||
// ride); false outside a ride and once he has stepped out onto the lawn's end.
|
||||
function ride(round, ms, k) {
|
||||
const R = round.spec.ride;
|
||||
const c = round.runner;
|
||||
if (!R || R.runner !== "mower" || !c || c.id !== "mower" || c.done) return false;
|
||||
const you = round.you;
|
||||
const inp = round.input;
|
||||
const dt = ms / 1000;
|
||||
const ev = (type, extra = {}) => round.events.push({ type, x: you.x, y: you.y, ...extra });
|
||||
// Already down on the lawn's end (set there, or rolled on by some other way): the ride is over.
|
||||
if (you.x >= R.finish && you.vy <= 0 && you.y <= k.groundAt(round.spec, you.x) + 0.01) return finish(round, c, k);
|
||||
// A stomp's bounce (or anything else) lifts the mower off its line.
|
||||
if (you.state === "air" && c.line >= 0) {
|
||||
c.left = c.line;
|
||||
c.line = -1;
|
||||
c.coyote = 0;
|
||||
c.from = you.y;
|
||||
}
|
||||
const want = inp.jump > 0;
|
||||
const target = MOWER_V - (c.bogMs > 0 ? BOG : 0);
|
||||
c.bogMs = Math.max(0, c.bogMs - ms);
|
||||
c.v += (target - c.v) * Math.min(1, RELAX * dt);
|
||||
if (c.line >= 0) {
|
||||
// On the lawn.
|
||||
const duck = Boolean(inp.down) && !want;
|
||||
if (duck && !you.ducking) ev("mowerDuck");
|
||||
you.ducking = duck;
|
||||
if (want) {
|
||||
inp.jump = 0;
|
||||
you.vy = MOWER_JUMP_V;
|
||||
Object.assign(c, { left: c.line, line: -1, coyote: 0, from: you.y });
|
||||
you.state = "air";
|
||||
you.ducking = false;
|
||||
ev("mowerJump", { v: c.v });
|
||||
} else {
|
||||
const L = linesOf(R)[c.line];
|
||||
const nx = you.x + c.v * dt;
|
||||
you.state = "run";
|
||||
you.vy = 0;
|
||||
if (nx >= L.x1) {
|
||||
// Off the end of the line: into a gap, or onto the lawn's end.
|
||||
you.x = L.x1;
|
||||
you.y = L.pts[L.pts.length - 1][1];
|
||||
Object.assign(c, { left: c.line, line: -1, coyote: COYOTE_MS, from: you.y });
|
||||
you.state = "air";
|
||||
you.ducking = false;
|
||||
you.vy = 0;
|
||||
} else {
|
||||
you.x = nx;
|
||||
you.y = trackY(R, c.line, nx);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// In the air.
|
||||
c.coyote = Math.max(0, c.coyote - ms);
|
||||
if (want && c.coyote > 0) {
|
||||
inp.jump = 0;
|
||||
c.coyote = 0;
|
||||
you.vy = MOWER_JUMP_V;
|
||||
c.from = you.y;
|
||||
ev("mowerJump", { v: c.v });
|
||||
}
|
||||
const py = you.y;
|
||||
you.vy = Math.max(-k.FALL_MAX, you.vy - MOWER_G * dt);
|
||||
you.x += c.v * dt;
|
||||
you.y += you.vy * dt;
|
||||
you.ducking = false;
|
||||
you.state = "air";
|
||||
if (you.vy <= 0) {
|
||||
const f = landOn(R, you.x, py, you.y);
|
||||
if (f) {
|
||||
you.y = f.y;
|
||||
you.vy = 0;
|
||||
you.state = "run";
|
||||
c.line = f.line;
|
||||
ev("mowerLand", { big: c.from - f.y >= BIG_LAND || c.from - f.y <= -BIG_LAND });
|
||||
c.from = f.y;
|
||||
} else if (you.x >= R.finish) {
|
||||
// Over the lawn's end: down onto it, and the ride is over.
|
||||
const g = k.groundAt(round.spec, you.x);
|
||||
if (g > -Infinity && you.y <= g + 0.01) return finish(round, c, k, g);
|
||||
}
|
||||
}
|
||||
}
|
||||
// A press nothing took waits a moment for a landing, then goes.
|
||||
if (want && inp.jump > 0) inp.jump = Math.max(0, inp.jump - ms);
|
||||
// Into a gap: a pond or a ditch.
|
||||
const base = R.track[0][0][1];
|
||||
if (you.y < base - DERAIL_DROP || k.groundAt(round.spec, you.x) > you.y + 0.5) {
|
||||
noteHit(round, `g${c.left}`);
|
||||
const kind = R.gaps[Math.min(R.gaps.length - 1, Math.max(0, c.left))];
|
||||
const hit = { type: "mowerCrash", what: kind ? "ditch" : "pond", x: you.x, y: you.y };
|
||||
if (k.lose(round, kind ? "ditch" : "pond")) {
|
||||
round.events.push(hit);
|
||||
if (round.phase === "play") reseat(round, c, R);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
while (c.check + 1 < R.checks.length && you.x >= R.checks[c.check + 1]) {
|
||||
c.check++;
|
||||
ev("mowerCheck", { n: c.check + 1 });
|
||||
}
|
||||
round.camLead = CAM_AHEAD + (c.v - MOWER_V) * 0.25;
|
||||
mow(round, c, R, ms);
|
||||
if (obstacles(round, c, R, k)) return true;
|
||||
creatures(round, c, R, ms);
|
||||
return true;
|
||||
}
|
||||
|
||||
// The ride is over: the mower coughs to a halt on the lawn's end, the door opens, Planny walks out.
|
||||
function finish(round, c, k, g = k.groundAt(round.spec, round.you.x)) {
|
||||
const you = round.you;
|
||||
c.done = true;
|
||||
c.restX = you.x;
|
||||
c.blade = false;
|
||||
Object.assign(you, { y: g, vy: 0, state: "run", shelf: -1, ducking: false });
|
||||
round.hasKey = true;
|
||||
round.camLead = 0;
|
||||
grade(round, c);
|
||||
round.events.push({ type: "mowerFinish", x: you.x, y: you.y, big: false });
|
||||
return false;
|
||||
}
|
||||
|
||||
// The grade's steady die: the lawn cut reaches LAWN_GOAL.
|
||||
function grade(round, c) {
|
||||
c.lawn = c.cells ? c.cut / c.cells : 0;
|
||||
const b = round.bonusRound;
|
||||
if (b) b.perf.steady = c.lawn >= LAWN_GOAL;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------- the blades */
|
||||
|
||||
// The blades for one slice: heat, jam, and what they cut in the zone ahead.
|
||||
function mow(round, c, R, ms) {
|
||||
const you = round.you;
|
||||
const dt = ms / 1000;
|
||||
const ev = (type, extra = {}) => round.events.push({ type, x: you.x, y: you.y, ...extra });
|
||||
if (c.jam > 0) {
|
||||
c.jam = Math.max(0, c.jam - ms);
|
||||
c.blade = false;
|
||||
c.heat = c.jam > 0 ? JAM_RESUME + ((1 - JAM_RESUME) * c.jam) / JAM_MS : JAM_RESUME;
|
||||
} else if (round.input.fire) {
|
||||
c.blade = true;
|
||||
c.heat = Math.min(1, c.heat + HEAT_UP * dt);
|
||||
if (c.heat >= 1) {
|
||||
c.blade = false;
|
||||
c.jam = JAM_MS;
|
||||
ev("mowerJam");
|
||||
}
|
||||
} else {
|
||||
c.blade = false;
|
||||
c.heat = Math.max(0, c.heat - COOL * dt);
|
||||
}
|
||||
if (c.blade) {
|
||||
const z0 = you.x + BLADE_NEAR;
|
||||
const z1 = you.x + BLADE_REACH;
|
||||
let cells = 0;
|
||||
R.grass.forEach((g, i) => {
|
||||
if (g[1] < z0 || g[0] > z1) return;
|
||||
const row = c.grass[i];
|
||||
for (let j = Math.max(0, Math.floor(z0 - g[0])); j < row.length && g[0] + j < z1; j++) {
|
||||
const cx = g[0] + j + 0.5;
|
||||
if (!row[j] && cx >= z0 && cx <= z1) {
|
||||
row[j] = true;
|
||||
cells++;
|
||||
}
|
||||
}
|
||||
});
|
||||
if (cells) {
|
||||
c.cut += cells;
|
||||
round.score += cells * GRASS_POINTS;
|
||||
ev("mowerGrass", { n: cells, points: cells * GRASS_POINTS, tx: you.x + BLADE_REACH * 0.6 });
|
||||
}
|
||||
let bog = cells > 0;
|
||||
R.hedges.forEach((x, i) => {
|
||||
if (c.hedges[i] || x + THORN_W / 2 < z0 || x - THORN_W / 2 > z1) return;
|
||||
c.hedges[i] = true;
|
||||
bog = true;
|
||||
round.score += HEDGE_POINTS;
|
||||
if (round.bonusRound) round.bonusRound.perf.acts++;
|
||||
ev("mowerHedge", { x, y: trackY(R, c.line >= 0 ? c.line : c.left, x) ?? you.y, points: HEDGE_POINTS });
|
||||
});
|
||||
R.weeds.forEach((x, i) => {
|
||||
if (c.weeds[i] || x + WEED_W / 2 < z0 || x - WEED_W / 2 > z1) return;
|
||||
c.weeds[i] = true;
|
||||
c.cut += WEED_CELLS;
|
||||
round.score += WEED_POINTS;
|
||||
if (round.bonusRound) round.bonusRound.perf.acts++;
|
||||
ev("mowerWeed", { x, y: trackY(R, c.line >= 0 ? c.line : c.left, x) ?? you.y, points: WEED_POINTS });
|
||||
});
|
||||
if (bog) c.bogMs = BOG_MS;
|
||||
}
|
||||
grade(round, c);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ obstacles */
|
||||
|
||||
// What the mower runs into: junk, a low arch or line, an uncut thorn hedge, a beast's lunge.
|
||||
// Returns whether it cost a heart.
|
||||
function obstacles(round, c, R, k) {
|
||||
const you = round.you;
|
||||
const hh = duckH(k, you);
|
||||
for (const [i, [x0, x1, y, kind]] of R.lows.entries()) {
|
||||
if (you.x > x0 - k.HIT_W / 2 && you.x < x1 + k.HIT_W / 2 && you.y + hh > y && k.struck(round, kind ? "line" : "arch")) {
|
||||
noteHit(round, `l${i}`);
|
||||
round.events.push({ type: "mowerCrash", what: "low", x: you.x, y: you.y + hh });
|
||||
return true;
|
||||
}
|
||||
}
|
||||
for (const [i, [x, kind]] of R.junk.entries()) {
|
||||
if (Math.abs(you.x - x) > 6) continue;
|
||||
const J = JUNK[kind];
|
||||
if (boxHit(k, you, x, trackY(R, lineAt(R, x), x) ?? you.y, J.w, J.h) && k.struck(round, J.name)) {
|
||||
noteHit(round, `j${i}`);
|
||||
round.events.push({ type: "mowerCrash", what: J.name, x, y: you.y });
|
||||
return true;
|
||||
}
|
||||
}
|
||||
for (const [i, x] of R.hedges.entries()) {
|
||||
if (c.hedges[i] || Math.abs(you.x - x) > 6) continue;
|
||||
if (boxHit(k, you, x, trackY(R, lineAt(R, x), x) ?? you.y, THORN_W, THORN_H) && k.struck(round, "thorns")) {
|
||||
noteHit(round, `h${i}`);
|
||||
round.events.push({ type: "mowerCrash", what: "thorns", x, y: you.y });
|
||||
return true;
|
||||
}
|
||||
}
|
||||
for (const [i, x] of R.beasts.entries()) {
|
||||
const b = c.beasts[i];
|
||||
if (b.state !== "snap" || Math.abs(you.x - x) > 5) continue;
|
||||
if (boxHit(k, you, x, trackY(R, lineAt(R, x), x) ?? you.y, BEAST_W, BEAST_H) && k.struck(round, "snap")) {
|
||||
noteHit(round, `b${i}`);
|
||||
round.events.push({ type: "mowerCrash", what: "snap", x, y: you.y });
|
||||
Object.assign(b, { state: "sink", t: BEAST_SINK_MS });
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// The line a thing at x stands on (the one under it).
|
||||
const lineAt = (R, x) => {
|
||||
const top = topAt(R, x);
|
||||
return top ? top[0] : 0;
|
||||
};
|
||||
|
||||
// The topiary beasts wake when the mower comes near: a shiver, then a lunge, then back to a bush.
|
||||
function creatures(round, c, R, ms) {
|
||||
const you = round.you;
|
||||
R.beasts.forEach((x, i) => {
|
||||
const b = c.beasts[i];
|
||||
const y = trackY(R, lineAt(R, x), x) ?? you.y;
|
||||
if (b.state === "idle") {
|
||||
const ahead = x - you.x;
|
||||
if (ahead < BEAST_NEAR && ahead > -BEAST_W) {
|
||||
Object.assign(b, { state: "warn", t: BEAST_WARN_MS });
|
||||
round.events.push({ type: "mowerBeastWarn", x, y });
|
||||
}
|
||||
} else if (b.state === "warn" || b.state === "snap" || b.state === "sink") {
|
||||
b.t -= ms;
|
||||
if (b.t > 0) return;
|
||||
if (b.state === "warn") {
|
||||
Object.assign(b, { state: "snap", t: BEAST_UP_MS });
|
||||
round.events.push({ type: "mowerBeastSnap", x, y });
|
||||
} else if (b.state === "snap") Object.assign(b, { state: "sink", t: BEAST_SINK_MS });
|
||||
else Object.assign(b, { state: "spent", t: 0 });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------- targets */
|
||||
|
||||
// A bolt into something to shoot: a topiary beast lunging into the lane. True when one took it
|
||||
// (the bolt is spent).
|
||||
function mowerShot(round, s) {
|
||||
const R = round.spec.ride;
|
||||
const c = round.runner;
|
||||
if (!R || R.runner !== "mower" || !c || c.id !== "mower") return false;
|
||||
for (let i = 0; i < R.beasts.length; i++) {
|
||||
const b = c.beasts[i];
|
||||
const x = R.beasts[i];
|
||||
const y = trackY(R, lineAt(R, x), x) ?? 0;
|
||||
if (b.state !== "snap" || Math.abs(s.x - x) > BEAST_W / 2 + SHOT_R || s.y < y - SHOT_R || s.y > y + BEAST_H + SHOT_R) continue;
|
||||
b.hp--;
|
||||
if (b.hp > 0) round.events.push({ type: "mowerBeastHit", x, y: y + BEAST_H / 2 });
|
||||
else {
|
||||
Object.assign(b, { state: "broken", t: 0 });
|
||||
round.score += BEAST_POINTS;
|
||||
if (round.bonusRound) round.bonusRound.perf.acts++;
|
||||
round.events.push({ type: "mowerBeastBreak", x, y: y + BEAST_H / 2, points: BEAST_POINTS });
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
export const MOWER = freeze({
|
||||
id: "mower",
|
||||
monsters: MONSTERS,
|
||||
walkers: freeze([]),
|
||||
zombies: freeze([]),
|
||||
stackers: freeze([]),
|
||||
climbers: freeze([]),
|
||||
act: freeze({}),
|
||||
horde: freeze({}),
|
||||
ride: freeze([ride]),
|
||||
place: freeze([place]),
|
||||
target: mowerShot,
|
||||
});
|
||||
@@ -0,0 +1,221 @@
|
||||
// Plan2Code Web Console - ghoul: The Gardener's Revenge's own sound effects and music track, merged into ghoul-sfx.js; defines only.
|
||||
//
|
||||
// Same shape and rules as ghoul-sfx-sled.js: `tones` (a `ghoulMower<Act>` sound for the
|
||||
// mower's things, each under 1.2 s, built only from the house's tone layers) and `music` (a
|
||||
// track for the room, `ghoulMowerRide`, named in ROOM_MUSIC in ghoul.js). The sounds and the
|
||||
// track are first drafts, to be picked by ear. A name may be defined only once across tones.js
|
||||
// and every game's file. No imports.
|
||||
|
||||
export const MOWER_SFX = {
|
||||
tones: {
|
||||
// The Gardener's Revenge: the bonus ride: you mow a long lawn on a haunted ride-on mower, jumping, ducking, shooting and cutting.
|
||||
// Jump: the engine revs as the deck bounces up.
|
||||
ghoulMowerJump: {
|
||||
layers: [
|
||||
{ type: "sawtooth", from: 70, to: 150, seconds: 0.3, attack: 0.02, gain: 0.5, vibrato: { rate: 22, depth: 0.1 }, filter: { type: "lowpass", from: 900, to: 1500, q: 2 } },
|
||||
{ type: "noise", seconds: 0.2, attack: 0.06, gain: 0.3, filter: { type: "bandpass", from: 500, to: 1800, q: 1.5 } },
|
||||
{ type: "triangle", from: 180, to: 320, seconds: 0.18, attack: 0.01, gain: 0.3 },
|
||||
],
|
||||
},
|
||||
// Land: a clunk of the deck and a rattle of the chassis.
|
||||
ghoulMowerLand: {
|
||||
layers: [
|
||||
{ type: "sine", from: 110, to: 50, seconds: 0.14, attack: 0, gain: 0.8 },
|
||||
{ type: "noise", seconds: 0.05, attack: 0, gain: 0.5, filter: { type: "bandpass", from: 1600, to: 900, q: 5 } },
|
||||
{ type: "square", from: 330, to: 270, seconds: 0.03, delay: 0.04, gain: 0.14 },
|
||||
{ type: "noise", seconds: 0.05, delay: 0.08, attack: 0, gain: 0.4, filter: { type: "bandpass", from: 1300, to: 800, q: 6 } },
|
||||
],
|
||||
},
|
||||
// Duck: a quick swish under a branch.
|
||||
ghoulMowerDuck: {
|
||||
layers: [
|
||||
{ type: "noise", seconds: 0.18, attack: 0.06, gain: 0.5, filter: { type: "bandpass", from: 350, to: 1900, q: 1.5 } },
|
||||
],
|
||||
},
|
||||
// Crash: a clang of metal, a thud and a rattle of loose parts.
|
||||
ghoulMowerCrash: {
|
||||
layers: [
|
||||
{ type: "sine", from: 90, to: 34, seconds: 0.25, attack: 0, gain: 1 },
|
||||
{ type: "square", from: 520, to: 300, seconds: 0.12, attack: 0, gain: 0.22, filter: { type: "bandpass", from: 800, to: 500, q: 3 } },
|
||||
{ type: "noise", seconds: 0.3, attack: 0.01, gain: 0.45, delay: 0.02, filter: { type: "bandpass", from: 2200, to: 700, q: 2 } },
|
||||
{ type: "noise", seconds: 0.04, delay: 0.16, attack: 0, gain: 0.5, filter: { type: "bandpass", from: 1500, to: 1000, q: 6 } },
|
||||
{ type: "noise", seconds: 0.04, delay: 0.23, attack: 0, gain: 0.4, filter: { type: "bandpass", from: 1900, to: 1200, q: 6 } },
|
||||
],
|
||||
},
|
||||
// Checkpoint: a rusty bicycle bell, twice.
|
||||
ghoulMowerCheck: {
|
||||
layers: [
|
||||
{ type: "sine", from: 1976, to: 1960, seconds: 0.25, attack: 0.003, gain: 0.3 },
|
||||
{ type: "sine", from: 4150, to: 4100, seconds: 0.12, attack: 0.003, gain: 0.12 },
|
||||
{ type: "sine", from: 1976, to: 1960, seconds: 0.3, attack: 0.003, gain: 0.3, delay: 0.14 },
|
||||
{ type: "sine", from: 4150, to: 4100, seconds: 0.14, attack: 0.003, gain: 0.12, delay: 0.14 },
|
||||
],
|
||||
},
|
||||
// Finish: the engine coughs, rattles and dies, then a triumphant ding.
|
||||
ghoulMowerFinish: {
|
||||
layers: [
|
||||
{ type: "sawtooth", from: 120, to: 40, seconds: 0.7, attack: 0.01, gain: 0.5, vibrato: { rate: 14, depth: 0.2 }, filter: { type: "lowpass", from: 700, to: 200, q: 2 } },
|
||||
{ type: "noise", seconds: 0.5, attack: 0.05, gain: 0.25, filter: { type: "bandpass", from: 900, to: 300, q: 1.5 } },
|
||||
{ type: "triangle", seconds: 0.5, attack: 0.01, delay: 0.6, gain: 0.5, notes: [659, 880, 1175] },
|
||||
],
|
||||
},
|
||||
// Grass: the blades biting a swathe, a quick chatter.
|
||||
ghoulMowerGrass: {
|
||||
layers: [
|
||||
{ type: "noise", seconds: 0.1, attack: 0.02, gain: 0.4, filter: { type: "bandpass", from: 3200, to: 1800, q: 2.5 } },
|
||||
{ type: "sawtooth", from: 200, to: 170, seconds: 0.08, attack: 0.005, gain: 0.2, vibrato: { rate: 40, depth: 0.15 }, filter: { type: "lowpass", from: 1200, to: 900, q: 1 } },
|
||||
],
|
||||
},
|
||||
// Hedge: the blades chop a thorn hedge, a crunch with a thunk.
|
||||
ghoulMowerHedge: {
|
||||
layers: [
|
||||
{ type: "noise", seconds: 0.18, attack: 0.005, gain: 0.7, filter: { type: "bandpass", from: 2400, to: 800, q: 1.5 } },
|
||||
{ type: "square", from: 260, to: 110, seconds: 0.1, attack: 0, gain: 0.3, filter: { type: "lowpass", from: 1200, to: 500, q: 1 } },
|
||||
{ type: "brown", seconds: 0.2, attack: 0.01, gain: 0.6, filter: { type: "lowpass", from: 500, to: 300, q: 1 } },
|
||||
{ type: "triangle", seconds: 0.2, delay: 0.1, attack: 0.005, gain: 0.35, notes: [784, 1047] },
|
||||
],
|
||||
},
|
||||
// Weed: a small pop of a weed patch.
|
||||
ghoulMowerWeed: {
|
||||
layers: [
|
||||
{ type: "sine", from: 500, to: 950, seconds: 0.08, attack: 0.002, gain: 0.5 },
|
||||
{ type: "noise", seconds: 0.05, attack: 0, gain: 0.3, filter: { type: "bandpass", from: 2600, to: 2000, q: 3 } },
|
||||
],
|
||||
},
|
||||
// Jam: the blades overheat: a clank, a grind winding down and a long hiss of steam.
|
||||
ghoulMowerJam: {
|
||||
layers: [
|
||||
{ type: "square", from: 140, to: 60, seconds: 0.2, attack: 0, gain: 0.4, filter: { type: "lowpass", from: 900, to: 400, q: 3 } },
|
||||
{ type: "noise", seconds: 0.05, attack: 0, gain: 0.6, filter: { type: "bandpass", from: 1400, to: 900, q: 5 } },
|
||||
{ type: "sawtooth", from: 190, to: 50, seconds: 0.6, attack: 0.02, delay: 0.05, gain: 0.35, vibrato: { rate: 18, depth: 0.3 }, filter: { type: "lowpass", from: 800, to: 150, q: 2 } },
|
||||
{ type: "noise", seconds: 0.8, attack: 0.1, delay: 0.1, gain: 0.3, filter: { type: "highpass", from: 3500, to: 5000 } },
|
||||
],
|
||||
},
|
||||
// Topiary Beast: a bush that comes alive and lunges across the lane, snapping its hedge-trimmed jaws.
|
||||
// Warn: leaves rustle and shake.
|
||||
ghoulMowerBeastWarn: {
|
||||
layers: [
|
||||
{ type: "noise", seconds: 0.4, attack: 0.15, gain: 0.4, filter: { type: "bandpass", from: 1800, to: 3200, q: 1.5 }, vibrato: { rate: 24, depth: 0.2 } },
|
||||
{ type: "pink", seconds: 0.4, attack: 0.2, gain: 0.25, filter: { type: "bandpass", from: 900, to: 1500, q: 1 } },
|
||||
],
|
||||
},
|
||||
// Snap: the lunge and two clacks of the shears.
|
||||
ghoulMowerBeastSnap: {
|
||||
layers: [
|
||||
{ type: "noise", seconds: 0.2, attack: 0.06, gain: 0.45, filter: { type: "bandpass", from: 600, to: 2400, q: 1.5 } },
|
||||
{ type: "square", from: 880, to: 300, seconds: 0.04, delay: 0.1, attack: 0, gain: 0.35 },
|
||||
{ type: "noise", seconds: 0.04, delay: 0.1, attack: 0, gain: 0.55, filter: { type: "bandpass", from: 3000, to: 2000, q: 4 } },
|
||||
{ type: "square", from: 780, to: 260, seconds: 0.04, delay: 0.22, attack: 0, gain: 0.35 },
|
||||
{ type: "noise", seconds: 0.04, delay: 0.22, attack: 0, gain: 0.55, filter: { type: "bandpass", from: 2800, to: 1900, q: 4 } },
|
||||
],
|
||||
},
|
||||
// Hit: a bolt strikes it: a leafy thwack.
|
||||
ghoulMowerBeastHit: {
|
||||
layers: [
|
||||
{ type: "noise", seconds: 0.06, attack: 0, gain: 0.7, filter: { type: "bandpass", from: 1800, to: 1000, q: 2 } },
|
||||
{ type: "square", from: 640, to: 220, seconds: 0.05, attack: 0, gain: 0.3 },
|
||||
{ type: "pink", seconds: 0.15, delay: 0.03, attack: 0.02, gain: 0.3, filter: { type: "bandpass", from: 1400, to: 800, q: 1 } },
|
||||
],
|
||||
},
|
||||
// Break: it is trimmed to a stump: a crunch of cut branches.
|
||||
ghoulMowerBeastBreak: {
|
||||
layers: [
|
||||
{ type: "noise", seconds: 0.3, attack: 0.01, gain: 0.7, filter: { type: "bandpass", from: 2600, to: 700, q: 1.5 } },
|
||||
{ type: "brown", seconds: 0.25, attack: 0.01, gain: 0.6, filter: { type: "lowpass", from: 500, to: 250, q: 1 } },
|
||||
{ type: "square", from: 500, to: 160, seconds: 0.08, attack: 0, gain: 0.3 },
|
||||
{ type: "triangle", seconds: 0.3, delay: 0.1, attack: 0.005, gain: 0.35, notes: [988, 1319, 1760] },
|
||||
],
|
||||
},
|
||||
},
|
||||
music: {
|
||||
// The Gardener's Revenge: a sputtering waltz-march. A reedy pulse lead walks an E minor
|
||||
// figure over a chugging two-stroke bass (a bass note on every beat's offbeat, like an
|
||||
// engine), a kick and a snare crack on the backbeat; a thin siren-like wheeze joins as the
|
||||
// dread grows. The bridge drops the drums for a creeping line.
|
||||
ghoulMowerRide: {
|
||||
bpm: 138,
|
||||
rush: 8,
|
||||
voices: {
|
||||
lead: { wave: "pulse", duty: 0.25, gain: 0.1, decay: 0.12, sustain: 0.45 },
|
||||
bass: { wave: "triangle", gain: 0.42, decay: 0.08, sustain: 0.5 },
|
||||
chug: { wave: "sawtooth", gain: 0.07, decay: 0.06, sustain: 0.2, from: 0.15 },
|
||||
kick: { kit: true, gain: 0.26, from: 0.2 },
|
||||
hat: { kit: true, gain: 0.1, from: 0.35 },
|
||||
snap: { kit: true, gain: 0.16, from: 0.5 },
|
||||
wheeze: { wave: "sawtooth", gain: 0.03, decay: 0.3, sustain: 1, from: 0.75, vibrato: { rate: 0.7, depth: 0.05, delay: 0 } },
|
||||
},
|
||||
patterns: {
|
||||
A: {
|
||||
lead:
|
||||
"E4 . G4 . B4 . G4 . E4 . G4 . B4 . G4 . | E4 . G4 . A4 . F#4 . E4 . G4 . A4 . F#4 . | " +
|
||||
"E4 . G4 . B4 . D5 . B4 . G4 . B4 . D5 . | C5 . B4 . A4 . G4 . F#4 . . . B4 . . .",
|
||||
bass:
|
||||
"E2 . . E2 . . E2 . E2 . . E2 . . E2 . | E2 . . E2 . . E2 . E2 . . E2 . . E2 . | " +
|
||||
"C2 . . C2 . . C2 . C2 . . C2 . . C2 . | B1 . . B1 . . B1 . B1 . . B1 . . B1 .",
|
||||
chug:
|
||||
". . E3 . . . E3 . . . E3 . . . E3 . | . . E3 . . . E3 . . . E3 . . . E3 . | " +
|
||||
". . C3 . . . C3 . . . C3 . . . C3 . | . . B2 . . . B2 . . . B2 . . . B2 .",
|
||||
kick:
|
||||
"k . . . . . k . k . . . . . k . | k . . . . . k . k . . . . . k . | " +
|
||||
"k . . . . . k . k . . . . . k . | k . . . . . k . k . . . . . k .",
|
||||
hat:
|
||||
". . h . . . h . . . h . . . h . | . . h . . . h . . . h . . . h . | " +
|
||||
". . h . . . h . . . h . . . h . | . . h . . . h . . . h . . . h .",
|
||||
snap:
|
||||
". . . . s . . . . . . . s . . . | . . . . s . . . . . . . s . . . | " +
|
||||
". . . . s . . . . . . . s . . . | . . . . s . . . . . . . s . . .",
|
||||
wheeze:
|
||||
"B3 - - - - - - - - - - - - - - - | A3 - - - - - - - - - - - - - - - | " +
|
||||
"G3 - - - - - - - - - - - - - - - | F#3 - - - - - - - - - - - - - - -",
|
||||
},
|
||||
B: {
|
||||
lead:
|
||||
"B4 . D5 . E5 . D5 . B4 . D5 . E5 . G5 . | F#5 . E5 . D5 . B4 . A4 . B4 . D5 . . . | " +
|
||||
"E5 . D5 . B4 . D5 . E5 . G5 . E5 . D5 . | C5 . D5 . B4 . A4 . B4 . . . . . . .",
|
||||
bass:
|
||||
"E2 . . E2 . . E2 . E2 . . E2 . . E2 . | A1 . . A1 . . A1 . A1 . . A1 . . A1 . | " +
|
||||
"C2 . . C2 . . C2 . C2 . . C2 . . C2 . | B1 . . B1 . . B1 . B1 . . B1 . . B1 .",
|
||||
chug:
|
||||
". . E3 . . . E3 . . . E3 . . . E3 . | . . A2 . . . A2 . . . A2 . . . A2 . | " +
|
||||
". . C3 . . . C3 . . . C3 . . . C3 . | . . B2 . . . B2 . . . B2 . . . B2 .",
|
||||
kick:
|
||||
"k . . . . . k . k . . . . . k . | k . . . . . k . k . . . . . k . | " +
|
||||
"k . . . . . k . k . . . . . k . | k . . . . . k . k . . . k . k .",
|
||||
hat:
|
||||
". . h . . . h . . . h . . . h . | . . h . . . h . . . h . . . h . | " +
|
||||
". . h . . . h . . . h . . . h . | . . h . . . h . . . h . h . h .",
|
||||
snap:
|
||||
". . . . s . . . . . . . s . . . | . . . . s . . . . . . . s . . . | " +
|
||||
". . . . s . . . . . . . s . . . | . . . . s . . . . . . . s . s s",
|
||||
wheeze:
|
||||
"E4 - - - - - - - - - - - - - - - | C#4 - - - - - - - - - - - - - - - | " +
|
||||
"C4 - - - - - - - - - - - - - - - | B3 - - - - - - - - - - - - - - -",
|
||||
},
|
||||
C: {
|
||||
lead:
|
||||
"E4 . . . G4 . . . B4 . . . G4 . . . | A4 . . . F#4 . . . E4 . . . . . . . | " +
|
||||
"E4 . . . G4 . . . B4 . . . D5 . . . | C5 . . . B4 . . . A4 . . . . . . .",
|
||||
bass:
|
||||
"E2 . . . . . . . E2 . . . . . . . | A1 . . . . . . . A1 . . . . . . . | " +
|
||||
"C2 . . . . . . . C2 . . . . . . . | B1 . . . . . . . B1 . . . . . . .",
|
||||
chug:
|
||||
". . . . . . E3 . . . . . . . E3 . | . . . . . . A2 . . . . . . . A2 . | " +
|
||||
". . . . . . C3 . . . . . . . C3 . | . . . . . . B2 . . . . . . . B2 .",
|
||||
kick:
|
||||
". . . . . . . . . . . . . . . . | . . . . . . . . . . . . . . . . | " +
|
||||
". . . . . . . . . . . . . . . . | . . . . . . . . . . . . . . . .",
|
||||
hat:
|
||||
". . . . h . . . . . . . h . . . | . . . . h . . . . . . . h . . . | " +
|
||||
". . . . h . . . . . . . h . . . | . . . . h . . . . . . . h . . .",
|
||||
snap:
|
||||
". . . . . . . . . . . . . . . . | . . . . . . . . . . . . . . . . | " +
|
||||
". . . . . . . . . . . . . . . . | . . . . . . . . . . . . . . . .",
|
||||
wheeze:
|
||||
"B3 - - - - - - - - - - - - - - - | A3 - - - - - - - - - - - - - - - | " +
|
||||
"G3 - - - - - - - - - - - - - - - | F#3 - - - - - - - - - - - - - - -",
|
||||
},
|
||||
},
|
||||
order: ["A", "A", "B", "A", "C", "B", "A", "B", "C"],
|
||||
},
|
||||
},
|
||||
};
|
||||
Reference in new issue
Block a user