JS Concepts Explained in Cult of the Lamb Terms
Events are when something happens.
In Cult:
- You press A
- You talk to someone
- You cook
- You fight
- You preach
Nothing happens without a trigger.
In JS: button.addEventListener("click", preach);
Translation: “When the player does this → run this ritual.”
Variables are the numbers and values you're constantly checking.
In-game:
- Faith
- Hunger
- Followers
- Gold
- Health
let faith = 80;
let followers = 12;
let hunger = 40;
let gold = 250;
“What's my cult's current status?”
Conditionals are the “if this, then that” rules.
- If faith < 30 → rebellion
- If hunger > 80 → sickness
- If loyalty high → bonus
if (faith < 30) { startRebellion(); }
localStorage = your save slot.
- You quit
- Come back tomorrow
- Everything is still there
localStorage.setItem("faith", faith);
Without this → every reload = new game.
Toggle = turning a state on/off.
- Night mode
- Curse active
- Ritual buff
- Demon form
body.classList.toggle("dark-mode");
Mental Model: “Am I about to trigger a bad event?”
The Lamb Remains
Every spell, state, trigger, and save leaves a mark on the cult.
The page ends, but the ritual stays alive in memory.