The player commands the defense of a great wall — the most critical barrier between the kingdom and the forces that would destroy it. Appointed by the king himself, the player holds the second most powerful position in all the realm.
Every year, a new cohort of volunteers arrives at the wall. These are not conscripts — they are ambitious men and women who see service as a path to upward mobility in a world with few such opportunities. The promise is simple: survive and defend for seven years, and you return home a hero. Many will die. A rare few will become legends.
The wall is described as vital to the kingdom's survival. The king has a vested interest in its success and will intervene with additional resources when things go badly — but no resource drop replaces the loss of battle-hardened veterans.
The kingdom occupies a valley entirely enclosed by impassable mountains. There is one way in and one way out — the valley mouth, where the wall stands. There is no outside world to flee to, no distant ally to call upon, no alternative. The people have always known this. It shapes everything about how they live and what they value.
The kingdom is predominantly agrarian — farmers, herders, and small-holders working land that has been in families for generations. The only settlement of any size is simply called the City. A small middle class of traders, merchants, and craftspeople operates primarily there. The nobility is tiny and largely ceremonial; real power flows from the king and the wall.
The world is grim but not hopeless. The threat of the raiders is not an abstraction — everyone understands that if the wall falls, the kingdom ends. This understanding sits quietly in the back of every citizen's mind from childhood onward. It does not paralyze them. It makes them serious.
The wall is the single most important structure in the kingdom — militarily, economically, and psychologically. Every citizen grows up knowing what it is and what it means. Parents tell children about the wall before they can read. Tavern songs recount famous battles. The raiders are referred to simply as the enemy, the invaders, or — in stories told to children — the monsters. They have no other name. They need none.
Adolescents who show promise train and apprentice with the explicit hope of one day qualifying as recruits. Service at the wall is the most direct path to meaningful social advancement in a society with few such paths. To be selected is already an honor.
Recruits who survive seven full years of service and are released honorably are known as heroes — not as a courtesy title, but in the fullest sense the culture understands the word. They return home to land grants and property deeds from the crown. Their names are known everywhere. Children ask to hear their stories. Taverns hang their names on the wall. They are the living proof that the wall can be held and that ordinary people can become extraordinary ones.
This hero culture is not incidental — it is the kingdom's primary mechanism for maintaining morale and a steady supply of volunteers across generations. Without it, the wall would not stand.
| Figure | Role | Notes |
|---|---|---|
| King Aldric | Ruler of the kingdom | A former wall commander himself. His authority is genuine and his understanding of the wall's needs is firsthand. He appointed the player personally. |
| The Commander (player) | Wall commander | A former seven-year hero, recalled to service and appointed by Aldric. Holds the second most powerful position in the realm. Name supplied by the player at game start. |
The forces that assault the wall are referred to as the raiders or the invaders. They have no known name, civilization, or recorded history in kingdom lore — only the pattern of their attacks and the destruction they leave behind. To children they are simply called the monsters. No recruit has ever returned from behind enemy lines. No one knows what lies beyond the valley mouth except death.
Each recruit receives a bespoke bio and greeting organized by gender (M/F) and age (young/old). Approximately 250 bespoke bios are planned, targeting meaningful emotional investment in individual soldiers. This system is in progress.
The game is structured as a series of years. Each year consists of exactly two phases: an Off Season and a Battle. The game runs for 10, 20, or 30 years depending on chosen difficulty.
Resource allocation, building construction and upgrades, recruit development, intelligence gathering, and repair of damage from the previous battle. The bulk of long-term strategic decisions happen here.
Enemies assault the wall. Combat is largely automated (auto-battler style), with the player making key tactical decisions: initial deployment, timing of reserve deployment, choosing which wall section to reinforce or sortie into, and adjusting targeting preferences mid-battle.
Recruits cycle through multiple generations over the course of the game. Players will outlast several cohorts of soldiers, which creates tension between emotional attachment and strategic detachment.
The off season is a pure resource allocation phase — not a spatial building or city-management sim. Players decide how to spend their gold across competing priorities. The phase is structured as a linear wizard with Next and Previous buttons, allowing unidirectional progress while preserving the ability to revisit prior decisions. Gold is spent first, then recruits arrive, then deployments are set.
Each off season the player receives:
After all gold is spent, new recruits arrive to fill every empty housing slot across all buildings. The composition is random but skewed to balance the current roster:
| Category | Examples | Trade-off |
|---|---|---|
| Wall Repairs | Restore damaged wall segments | Instant repair; Mason capacity limits total HP restored per off season (50 HP per Mason) |
| Wall Upgrades | Increase wall level per segment | Higher HP and damage reduction bonus for on-wall units |
| Building Construction | Barracks, Library, Artisan Workshop | Unlocks new unit types and increases capacity |
| Building Upgrades | Level up Archery Range, Mage Workshop, etc. | Improves unit effectiveness — attack speed, armor, damage |
| Retention & Loyalty | Monument, veteran stipends | Increases chances heroes stay past year seven |
| Intelligence | Scout Academy | Advance knowledge of enemy composition before battle |
The off season proceeds as a multi-step wizard. Players navigate with Next and Previous buttons. State is preserved when going back — no choices reset unless explicitly changed. Each step is described below.
Presents all soldiers who died in the most recent battle. See Section V for full specification. Skipped if no soldiers died.
Presents all soldiers who completed their seventh year of service. See Section V for full specification. Skipped if no soldiers reached hero status this year.
Displays the player's current gold total: carryover from the prior season plus any new gold earned from wall damage. Breakdowns for base income, missing-HP bonus, and destroyed-segment bonus are shown separately. This is an informational screen — no choices are made here.
Surprise Tactic Award (Year 2+): The king awards one Surprise Tactic per year, delivered at this step. The flavor text frames it as the king sending one of his generals to train the wall units — with wording that acknowledges last year's battle outcome. The awarded tactic is added to the player's stockpile (maximum 3). If the stockpile is already full, no new tactic is awarded. Year 1's battle begins with no tactics available. See Section VIII-C — Surprise Tactics for the full tactic list and battle mechanics.
The player's full investment screen. Displays the wall in its current state across all three segments (HP, level), alongside the complete building list. Players can spend gold on:
Buildings the player cannot yet afford or lacks prerequisites for are displayed in a grayed-out state with their prerequisite listed. Current gold total is always visible. Spending decisions are reflected immediately in the running total.
A confirmation dialogue summarizing all spending choices made in Step 4. The player is reminded that their building decisions will determine which recruit classes arrive at the wall. Confirming here triggers recruit generation. The player can go back to revise spending before confirming.
Shown when any of the following are true: a unit leveled up during the last battle; a staying veteran's XP bonus caused a level-up; a unit has a pending Level 3 specialization choice. If veterans are on the roster but their XP caused no level-ups and no specialization choices are pending, this step is skipped.
The screen shows three categories of information:
Veteran XP (1 XP per staying veteran, awarded to all roster units each off season) is applied at the start of this step. The Hero Departures step (Step 2) handles only the year-7 ceremony — XP distribution happens here.
See Section VIII-B — Class Specialization for full specialization rules.
The core personnel management screen. Displays all soldiers — existing roster plus newly arrived recruits — in a single sortable, filterable table. Filter and sort state persists for the duration of this off season and resets at the start of the next.
Table Columns: Name · Class · Year of Service · Level · Assignment
New recruits are visually highlighted (e.g., a distinct row color or badge) to distinguish them from returning soldiers. Each row has a detail button that opens a character sheet. The character sheet opens with the soldier's portrait and a greeting in the format: "Commander [playername], [greeting]" — where the greeting is selected randomly from the pool matching the soldier's class and current year of service. Below the greeting, the sheet shows the soldier's bio and full stats.
The Assignment column is a dropdown per row. Every combatant (all classes except Mason and Scout) must be assigned to one of six deployment groups before the player can proceed:
Assignment choices persist year to year. Only new recruits arrive without assignments — returning soldiers carry their prior assignment forward as the default, which the player can change. Empty groups are permitted. If any group exceeds its hard capacity, a popup warning is shown. Warriors and Captains may only be assigned to reserve groups (enforced by the dropdown — wall options are disabled for these classes).
The player cannot advance to the next step until every combatant has an assignment.
A visual representation of the upcoming battle deployment based on the assignments set in Step 7. Shows all wall units in position across the three wall sections, and all reserve units staged in their respective reserve zones, mirroring the battle map layout. The player can review the composition visually and go back to Step 7 to revise assignments if needed. Proceeding from here advances to the scout phase (if applicable) or ends the off season.
Shown only if the player has one or more Scouts available. The player chooses whether to send Scouts out this year. If yes, results are returned after a brief delay (~3 seconds):
If intel is successfully returned, the player is given the option to go back to Step 7 to revise assignments before proceeding. The Deployment Preview (Step 8) is shown again after any revision.
Recruit generation is triggered after building choices are confirmed in Step 5. The full rules governing class distribution, name assignment, portrait allocation, and bio selection are documented in Section VI — Recruit Generation Rules.
The off season does not begin with gold counts or building menus. It begins with the dead, and then with the heroes. This is the cultural spine of the kingdom made tangible — the moment the player is asked to hold, however briefly, what the last battle actually cost and what it produced.
The two ceremonies are sequential and separate. Steps 1 and 2 of the off season wizard. Each is skipped automatically if there is nothing to show.
The first screen of every off season (except Year 1, when there has been no prior battle) presents all soldiers who died in the most recent battle as a list. If no soldiers died, this screen is skipped entirely.
All fallen soldiers are displayed together as a list — not one at a time. Each entry in the list shows the soldier's portrait (at standard size), full name, class, and years of service at time of death.
The list is sorted by years of service, highest to lowest. Ties are broken alphabetically by name.
At the bottom of the list, the Commander's closing line is displayed:
"Let us all take a moment of silence to remember their sacrifice for the kingdom."
The button to advance to the next stage of the off season appears after that line.
Immediately following the fallen ceremony (or opening the off season directly if no one died), the game presents any soldiers who completed their seventh year of service. A soldier who survived their seventh battle is a hero by right. If no soldiers reached hero status this year, this screen is skipped entirely.
All seven-year heroes are displayed together as a list. Each entry shows the soldier's portrait (at standard size), full name, class, and an indication of their outcome — departed or staying.
Each hero has a 25% chance to stay and help train others, and a 75% chance to depart as a hero. Both outcomes count toward the Monument bonus. The outcome is determined at the moment this screen renders and is shown directly on each hero's entry.
The Hero Departures step covers only the year-7 ceremony and retention outcome. The XP bonus that staying veterans award to the roster each off season (1 XP per staying veteran) is applied and displayed in the Training & Specialization step (Step 3), not here.
Heroes who depart show:
"[Name]. [Class]. Seven years of service. A hero of the realm."
Heroes who stay show:
"[Name]. [Class]. Seven years of service. A hero of the realm — and they are staying."
Heroes who stay transition immediately into the active roster as super units. Each staying hero grants every unit on the roster 1 XP per off season for as long as they remain.
The player advances to the gold summary when ready.
New recruits are generated at the moment the player confirms their building and spending choices (Off Season Step 6). Every empty housing slot across all buildings is filled. The process follows a strict sequence: determine class distribution first, then generate each individual recruit in that class.
Count empty housing slots across all buildings after spending is confirmed. Each empty slot produces exactly one recruit. Slot counts are building-type-specific:
For buildings that house two classes (Barracks: Warriors/Archers; Library: Mages/Healers), incoming recruits are distributed using a roster-balancing algorithm. Each pairing is calculated independently.
Algorithm: The goal is an even final split within that building's total capacity, ±1 unit per type. Count the current number of living soldiers of each class within the pair. Determine how many of each class are needed to reach an even split of the building's total capacity. Assign the incoming recruits accordingly. The result is that after recruits arrive, each class occupies between (capacity/2 − 1) and (capacity/2 + 1) slots. The same logic applies independently to Mages vs Healers within Library slots.
Once class counts are determined, each recruit is generated individually in sequence. Portrait is assigned first because the portrait pool is divided by gender and age — drawing a portrait determines those attributes, which then drive name and bio selection.
The recruit's class (from Step 2) determines which portrait category to draw from: Warriors, Archers, and Captains draw from the warrior portrait pools; all other classes (Mage, Healer, Engineer, Mason, Scout) draw from the nonwarrior pools.
A portrait is selected randomly from all available portraits across all gender and age sub-pools within that category. The gender and age of the drawn portrait then determine the recruit's gender and age category for all subsequent attribute generation.
| Pool | Files | Naming |
|---|---|---|
| Warrior / Male / Old | 7 | warrior_male_old_portrait1–7.png |
| Warrior / Male / Young | 44 | warrior_male_young_portrait1–44.png |
| Warrior / Female / Old | 4 | warrior_female_old_portrait1–4.png |
| Warrior / Female / Young | 55 | warrior_female_young_portrait1–55.png |
| Nonwarrior / Male / Old | 31 | nonwarrior_male_old_portrait1–31.png |
| Nonwarrior / Male / Young | 14 | nonwarrior_male_young_portrait1–14.png |
| Nonwarrior / Female / Old | 16 | nonwarrior_female_old_portrait1–16.png |
| Nonwarrior / Female / Young | 41 | nonwarrior_female_young_portrait1–41.png |
Deck-draw rules: Each portrait is unique among all living soldiers at any given time. Once assigned, it is removed from the available pool. Portraits are never returned to the pool mid-playthrough — not on death, not on hero departure. Only when the entire pool for that category (warrior or nonwarrior) is fully exhausted do portraits from dead or departed soldiers re-enter the pool. The full deck resets at the start of each new playthrough.
Both are derived directly from the portrait drawn in Attribute 1. No separate random roll is made. Gender drives first name pool selection and bio pool selection. Age category drives bio pool selection only.
Selected randomly from the gender-appropriate first name pool. The pool contains 50 male names and 50 female names drawn from Anglo-Saxon and Northern European traditions. No uniqueness check is applied to first names alone — the uniqueness constraint is on the full name combination.
Male pool (50 names): Aldric, Bjorn, Calder, Dagmar, Edrik, Falko, Gunnar, Halvard, Ingvar, Jorvik, Knut, Leif, Magnus, Njord, Oskar, Ragnar, Sigurd, Torsten, Ulfric, Valdis, Wulfgar, Yorick, Alaric, Bertram, Cormac, Draven, Einar, Finn, Godwin, Harald, Ivar, Jokull, Kettil, Lothar, Morven, Norbert, Olaf, Peder, Quindar, Rodrik, Sven, Thane, Ulrik, Vidar, Wulfric, Xander, Yngvar, Zoran, Asmund, Brandr
Female pool (50 names): Astrid, Brynhild, Dagny, Eira, Freya, Gudrun, Helga, Ingrid, Jorunn, Kari, Lofn, Maren, Nora, Oddny, Petra, Ragnhild, Sigrid, Thyra, Ulfhild, Ragnvor, Wulfwyn, Ylva, Alva, Bodil, Cerwen, Drifa, Embla, Frida, Gunnhild, Hilda, Idunn, Jora, Katla, Liv, Marta, Nanna, Olrun, Runa, Signe, Thora, Unn, Vigdis, Wulfrun, Yrsa, Solveig, Bergljot, Catriona, Dalla, Estrid, Finna
Selected randomly from the class-appropriate surname pool. Each class has 25 surnames. After selecting a last name, the full name (first + last) is checked against a per-playthrough set of all names ever generated. If the combination has been used before, re-roll the last name only (not the first name) until a unique combination is found. If all 25 last names for that class have been exhausted in combination with this first name, re-roll the first name and repeat.
| Class | Surname Theme | Example Names |
|---|---|---|
| Warrior | Martial, battle-hardened | Ironhelm, Grimwall, Stonefist, Hammerfall, Ravenbrow |
| Archer | Precision, distance, nature | Trueshot, Eagleeye, Swiftflight, Hawkgaze, Longdraw |
| Mage | Arcane, ethereal, elemental | Runeborn, Ashenveil, Frostmantle, Grimrune, Shadowtongue |
| Healer | Gentle craft, herb and hand | Gentlehand, Brightbalm, Mosswick, Dawntouch, Willowmend |
| Captain | Command, honor, order | Goldmantle, Crownward, Bannerborn, Ironward, Valorhelm |
| Engineer | Craft, mechanism, structure | Stonethrower, Ironwright, Cogsworth, Forgewise, Timberfall |
| Mason | Stone, mortar, building trade | Stonewright, Mortarborn, Wallward, Hammerstone, Keystoneborn |
| Scout | Ranging, stealth, terrain | Shadowstep, Farwalker, Quietfoot, Windreader, Mistwalker |
Selected from a pool of 256 complete bios organized by gender (male/female) and age category (young/old), giving four sub-pools of 64 bios each. One bio is selected at random from the appropriate sub-pool. Bios are not tracked for uniqueness — the same bio may appear on multiple recruits across a long playthrough. Each bio is a self-contained paragraph describing the recruit's background, motivation, and character.
| Sub-pool | Count |
|---|---|
| Young Male | 64 bios |
| Young Female | 64 bios |
| Old Male | 64 bios |
| Old Female | 64 bios |
All recruits begin at Level 1 with base stats as defined in Section VIII — Unit Archetypes. Year of Service is initialized to 0 and increments to 1 after their first battle. XP begins at 0.
Each soldier has a greeting drawn from a data table keyed by class × year of service (years 1–7). The greeting is selected randomly from the pool matching the soldier's current class and current year of service. A new greeting is selected each off season — it is not fixed at generation time.
Greetings are displayed on the character detail screen (accessed from the Personnel table in Step 7) in the format:
"Commander [playername], [greeting]"
The greeting pool covers all eight classes across all seven years of service. Year 1 greetings reflect the uncertainty and ambition of a new recruit; later years reflect the weight of experience and survival. The same pool is used regardless of gender or age.
| Condition | Handling |
|---|---|
| No empty slots (roster full) | No recruits generated this year |
| Building constructed this year | All slots from the new building are treated as empty; recruits fill them normally |
| Officer Academy at cap (5 Captains living) | No Captain slots generated regardless of building level |
| All first+last combinations exhausted for a class | Edge case — practically impossible with 50 first names × 25 last names = 1,250 combinations per class. No handling required. |
| Portrait pool exhausted mid-generation | All portraits in that category (warrior or nonwarrior) have been assigned. No dead soldiers' portraits are returned until the pool is fully exhausted — at that point all portraits from dead and departed soldiers re-enter the pool. |
Year of Service is a persistent integer on each soldier object, incremented at the end of each battle they survive. A soldier who arrives at the start of Year 3 and survives through Year 9 has 7 years of service and becomes a hero at the end of Year 9's off season ceremony. The wall's promise is seven survived battles — not seven calendar years of enrollment.
Each year brings one battle. The wall is divided into three sections. Units assigned to a wall section cannot move during battle — they hold their ground. Warriors and Captains are never assigned to wall sections; they are always held in reserve. The player's real-time tactical decisions come from managing reserves and adjusting targeting preferences.
The battlefield is 12 tiles wide × 16 tiles tall, rendered at 46 pixels per tile (canvas: 552 × 736 px). The wall sits at row 11 (0-indexed from the top), giving approximately 10 rows of enemy approach space and 4 rows of player territory behind the wall.
| Section | Tile Width | Notes |
|---|---|---|
| Wall Left | 4 tiles (cols 0–3) | Outer edge — often targeted for flanking attacks |
| Wall Center | 4 tiles (cols 4–7) | Prime ranged position; highest enemy traffic |
| Wall Right | 4 tiles (cols 8–11) | Outer edge — often targeted for flanking attacks |
The wall is a barrier with HP. Enemies cannot reach player units until the wall is breached (HP reaches zero). Only ranged enemies (Goblins, Catapults) can damage player units directly while the wall stands. Goblins cannot damage the wall itself — they are purely a unit-killing threat.
Melee enemies (Orcs, Ogres, Generals) attack the wall directly. Catapults deal AoE damage that hits both wall HP and player units on the wall; AoE splash does not affect units currently standing on the wall (the wall provides cover).
The wall grants a damage reduction bonus to all player units on it equal to 1% per foot of wall height:
| Wall Level | Height | Damage Reduction Bonus | Wall HP | Upgrade Cost |
|---|---|---|---|---|
| 1 | 10 ft | +10% | 200 | 100 |
| 2 | 20 ft | +20% | 300 | 200 |
| 3 | 20 ft | +20% | 400 | 300 |
| 4 | 30 ft | +30% | 500 | 400 |
| 5 | 30 ft | +30% | 600 | 500 |
When the wall falls, all units on it drop to ground level and lose the damage reduction bonus. Breaching enemies then target the nearest ground unit. Engineers and reserve units on the player side become valid targets after any breach.
| Unit | Default Targeting Priority |
|---|---|
| Warrior / Captain | Nearest enemy |
| Archer | Furthest enemy in range; nearest if none in range |
| Engineer | Nearest Catapult in range (highest priority); else largest enemy clump within AoE radius; nearest if none in range |
| Mage | Nearest elite (Ogre / General / Catapult) in range; else furthest in range |
| Healer | Lowest HP% friendly within 2 tiles (heal only — attacks nearest enemy in melee range) |
| Unit | Default Targeting Priority |
|---|---|
| Orc / Ogre / General | Nearest wall section; on breach (or player unit crosses wall), nearest player unit |
| Goblin | Furthest player unit in range; advances until in range |
| Catapult | Nearest wall section (same as melee); on breach (or player crosses wall), furthest player unit in range |
Enemy targeting override: if any wall is breached or any player unit crosses into enemy territory, all wall-targeting enemies switch to targeting the nearest player unit instead. This reverts to wall-targeting if neither condition holds.
Players can override default targeting for three groups via dropdowns displayed below the battle canvas. Preferences are saved to localStorage and persist between sessions.
| Group | Units Affected | Options | Notes |
|---|---|---|---|
| Melee | Warrior, Captain | Default, Orc, Goblin, Ogre, General, Catapult | Default = nearest enemy |
| Ranged | Archer, Mage | Default, Orc, Goblin, Ogre, General, Catapult | Overrides Mage elite-priority when set |
| Siege | Engineer | Default, Orc, Goblin, Ogre, General, Catapult | Default = furthest in range |
Healer is excluded from targeting preferences — it targets friendly units for healing, not enemies.
Each battle begins with a 3–2–1–FIGHT! countdown (1 second per number, 0.7 seconds for "FIGHT!"). The game loop is frozen during the countdown so the player can review and adjust targeting preferences before combat begins.
A Slow Mo checkbox appears to the right of the targeting controls. When enabled, game time runs at 25% speed. Useful for studying unit behavior and making deployment decisions under pressure. State persists between sessions alongside targeting preferences.
If the player has any tactics stockpiled, a button strip appears below the targeting controls bar. Each available tactic is shown as a button with a distinct icon and label. Buttons are visible from the start of the battle. Activating a tactic consumes it immediately — the button is removed and the effect fires at once. The strip is hidden if the stockpile is empty. See Section VIII-C — Surprise Tactics for full effect descriptions.
Enemies retreat (rout) when all Ogres, Generals, and Catapults are dead AND remaining enemy count is below 50% of the year's starting total AND player units outnumber remaining enemies. Retreating enemies run toward the top of the screen and can still be attacked as they flee. The round ends when either:
When rout triggers, all mobile player units (non-stationary, non-reserve) are released from any hold orders so they can give chase, including reinforce-hold warriors waiting behind the wall.
Each year has 3 possible enemy composition variations (options A, B, C) randomly selected at the start of battle. Compositions are defined per year in src/data/compositions.js and include lane assignments, reserve slots, deployment logic, and a scouting report string. Years 1–3 are fully defined; remaining years use a placeholder stress test until authored.
Three reserve slots exist on both the player side (rows 14–15) and enemy side (rows 0–1). Reserve units are inert until deployed — they are skipped by targeting, movement, and attack logic and cannot be targeted by the opposing side.
| Parameter | Value |
|---|---|
| Slots per side | 3 (Left, Center, Right — aligned with wall sections) |
| Capacity per slot | Up to 25 units |
| Player reserve zone | Rows 14–15 (blue highlight) |
| Enemy reserve zone | Rows 0–1 (red highlight) |
Pre-assigned before battle, deployed via an in-battle Deploy button. Tapping Deploy opens a 2-row selection grid:
| Row | Options | Behavior |
|---|---|---|
| Sortie | Left · Center · Right | Units advance through the wall into enemy territory; normal targeting applies |
| Reinforce | Left · Center · Right | Archers, Mages, and Healers move to just behind the chosen wall section and engage enemies normally. Warriors and Captains advance to behind the wall and hold until breach or rout, then fight freely. |
Deployment is one-way — there is no recall. All undeployed player reserves are automatically released on wall breach.
Enemy reserves deploy based on per-composition logic:
Alarm condition: if any player unit crosses into rows 0–7 (deep enemy territory), all undeployed enemy reserves release immediately.
Engineers are stationary and deployed on the player side of the wall (row 12), not on the wall itself. Their range of 11 tiles covers nearly the full map length, allowing them to fire trebuchet-style over the wall at enemies on approach.
When an Ogre, General, or Catapult is destroyed, a kill announcement displays on screen identifying the player unit that landed the killing blow. Killing blow XP for these units is tripled (6 XP).
Combat is auto-battler style. Each unit follows its targeting rules and behavior patterns; outcomes are driven by matchups, levels, positioning, and building bonuses. The player controls deployment, timing, and targeting preferences — not individual unit actions.
| Outcome | Result |
|---|---|
| Complete Success | Wall holds, minimal casualties, full off-season budget available |
| Partial Loss | Wall holds but damaged; repair costs eat into next year's budget |
| Total Wipe | All player units dead — game over |
Recruits arrive as generalists and specialize based on buildings available. Each archetype is enabled by a corresponding building. Without the building, that unit type cannot be recruited or developed. Attack speed values are given as seconds per attack; the floor is 0.5s regardless of bonuses.
| Unit | HP | DMG | Atk Speed | Range | Armor | Lvl Up HP/DMG | Special |
|---|---|---|---|---|---|---|---|
| Warrior | 20 | 5 | 2s | 1 | 20% | +10 / +3 | Reserve only — never assigned to wall |
| Archer | 10 | 3 | 2s | 5 | 10% | +5 / +2 | — |
| Mage | 7 | 7 | 5s | 7 | 0% | +3 / +10 | Ignores target armor entirely |
| Healer | 10 | 3 | 5s | 1 | 10% | +5 / +1 | Heals lowest-HP% friendly within 2 tiles to full; fires on first injured ally immediately, then 10s cooldown. Earns 1 XP per 50 HP healed. |
| Captain | 25 | 5 | 2s | 1 | 20% | +15 / +3 | +25% DMG aura to all friendlies within a 1.5-tile radius circle (additive). Reserve only — never assigned to wall. |
| Engineer | 10 | 15 | 10s | 11 | 10% | +5 / +10 | AoE damage; stationary behind wall at row 12; trebuchet-style range covering nearly full map width |
| Unit | Role | Notes |
|---|---|---|
| Mason | Wall repair & construction | Repairs or builds 50 HP of wall damage per Mason per off season |
| Scout | Pre-battle intelligence | 60% success, 30% fail, 10% permanently captured. Reveals enemy composition when successful. |
Units within the aura radius of a friendly Captain or enemy General display a dim gold border (postFX glow). This helps players immediately identify which of their units are receiving the damage bonus — and which enemy units are benefiting from a General's presence. The gold glow is temporarily replaced by a blue glow when a Healer heals a unit.
For reference — reaching this state requires significant long-term investment across multiple building trees.
| Unit | HP | DPS (base) | DPS (fully boosted) | Notes |
|---|---|---|---|---|
| Warrior | 60 | 8.5 | ~51.0 | Sparring Ground + Weaponsmith + Monument. 55% armor. |
| Archer | 30 | 5.5 | ~33.0 | Archery Range + Weaponsmith + Monument. 45% armor. |
| Mage | 19 | 9.4 | ~23.5 | Mage Workshop + Monument. Ignores all target armor. Squishy. |
| Healer | 30 | 1.4 | ~1.4 | Offensive DPS negligible — value is healing output. |
| Captain | 85 | 8.5 | ~51.0 | +25% DMG aura within 1.5-tile radius. Max 5 Captains total. |
| Engineer | 30 | 5.5 | ~5.8 | AoE — effective DPS much higher vs grouped enemies. Range 11. |
Units earn XP through combat actions. A killing blow awards 2 XP; an assist (minimum 30% of target HP dealt) awards 1 XP; taking damage awards 1 XP (awarded to surviving units at battle end); Healers earn 1 XP per 50 HP healed. Killing blow XP is tripled (6 XP) when the target is an Ogre, General, or Catapult.
On each level-up, a unit also randomly gains either +1–3 bonus HP or +1–3 bonus DMG (50/50 chance). This bonus is permanent and stacks with the fixed per-level stat increases shown in the table above.
All player units have a 5% base critical hit chance on every attack. A critical hit deals triple damage. Enemies do not crit. Sharpshooter Archers raise their personal crit chance to 30%. On a crit, the target briefly flashes a bright red glow.
Engineers gain a maximum of one level per battle, regardless of XP earned.
| Level | XP Required | Feel |
|---|---|---|
| 1 → 2 | 5 XP | Fast — first battle usually gets a unit here |
| 2 → 3 | 10 XP | A few good battles |
| 3 → 4 | 20 XP | Officer threshold unlockable |
| 4 → 5 | 30 XP | True veteran — protect at all costs |
Minimum attack interval is 0.5 seconds regardless of building bonuses.
When a unit reaches Level 3, they become eligible to specialize. Specialization is a permanent, one-time choice that meaningfully changes how a unit fights. There are two paths per class, each expressed as an adjective before the class name (e.g. Mounted Warrior, Sharpshooter Archer).
Specialized units use a distinct color tint on their sprite so they are recognizable in the field while their base class icon (bow, sword, staff, etc.) remains unchanged. The base class is always readable; the tint communicates which path was chosen.
| Class | Base Color | Path A Color | Path B Color |
|---|---|---|---|
| Warrior | Steel Blue (0x4472C4) | Bright Cobalt (0x6AABFF) | Deep Navy (0x1A3A7A) |
| Archer | Forest Green (0x70AD47) | Lime Green (0xAAE040) | Dark Olive (0x2D6B1A) |
| Mage | Purple (0x9B30FF) | Lavender (0xCC88FF) | Deep Indigo (0x4A0080) |
| Healer | Near-White (0xEEEEEE) | Bright Yellow (0xFFFF88) | Amber (0xFFAA33) |
| Captain | Gold (0xFFD700) | Pale Gold (0xFFF0A0) | Bronze (0xB87333) |
| Engineer | Orange (0xFF6600) | Red-Orange (0xFF3300) | Dark Umber (0x8B3A00) |
| Class | Path A | Effect | Path B | Effect |
|---|---|---|---|---|
| Warrior | Mounted | Double move speed | Heavy | Armor 20% → 40% |
| Archer | Longbow | +2 range | Sharpshooter | +25% crit chance (stacks with base 5%) |
| Mage | Explosive | Attacks deal AoE damage at 0.75 tile radius on impact | Rapid-fire | Fires a simultaneous second projectile at a second valid target (standard Mage targeting) |
| Healer | Area | Heal radiates 0.75 tiles from the primary target, hitting all friendlies in radius | Combat | Armor 10% → 30% |
| Captain | Inspiring | Aura radius 1.5 → 2.0 tiles | Heroic | +50% DMG, +50% HP |
| Engineer | Flameshot | AoE radius increased to 1.5 tiles (base 1.0) | Anti-siege | AoE radius −25%, DMG +50% |
Once per year, King Aldric sends one of his generals to the wall to train the defenders in a surprise tactic. This award is presented during the Gold Summary step of the off-season wizard (Step 4), starting with Year 2. The flavor text acknowledges last year's battle outcome — the king is paying attention, and his help is a direct response to what the wall endured.
All available tactics appear as buttons in a strip below the targeting controls bar. Each button has a distinct icon and label. When a tactic is activated, the button is removed and the effect fires immediately. The strip is hidden when the stockpile is empty.
| Name | Effect |
|---|---|
| Mass Sortie | All non-Engineer units not currently on the wall receive a 50% move speed boost. Any reserve units still in the holding pattern are immediately force-deployed as a sortie. Units already in the field but not on the wall also receive the speed boost. |
| Covering Fire | All Archers fire one immediate free volley. Does not consume or reset their attack timer. |
| Barrage | All Engineers and Mages fire one immediate free shot. Does not consume or reset their attack timer. |
| Healing Grace | All Healers immediately trigger their heal regardless of cooldown. The heal cooldown resets after firing. |
| Shield Wall | All Warriors and Captains gain +40% armor for 10 seconds. Buff expires automatically and armor reverts. |
Enemy forces escalate over the course of the campaign, introducing new unit types and tactical approaches that require the player to adapt their defenses year over year.
| Unit | HP | DMG | Atk Speed | Move | Armor | Range | Year Up (HP/DMG/Armor) | Special |
|---|---|---|---|---|---|---|---|---|
| Orc | 15 | 5 | 2s | Med | 20% | 1 | +1 / +1 / +1% | — |
| Goblin | 10 | 4 | 3s | Fast | 10% | 3 | +1 / +1 / +0.5% | Cannot damage wall; targets furthest player unit in range |
| Ogre | 50 | 20 | 5s | Slow | 30% | 1 | +3 / +2 / +1% | Ignores player armor. Elite. Advances immediately at battle start. |
| General | 20 | 5 | 2s | Med | 20% | 1 | +1 / +1 / +1.5% | +25% DMG aura to all friendlies within 1 tile. Armor scales fastest. Elite. Buffed allies show gold border glow. |
| Catapult | 20 | 15 | 10s | Slow | 10% | 10 | +3 / +4 / +0.5% | AoE damage. Targets nearest wall section. Splash does not affect units on wall. Elite. |
Move speed values in tiles per second (Sprint 1 starting values — subject to playtesting tuning):
| Speed Class | Tiles / Second | Units |
|---|---|---|
| Slow | 0.5 | Ogre, Catapult |
| Med | 1.0 | Orc, General |
| Fast | 2.0 | Goblin |
| Unit | DPS Year 1 | DPS Year 10 | DPS Year 20 | Notes |
|---|---|---|---|---|
| Orc | 2.5 | 7.0 | 12.0 | Steady workhorse |
| Goblin | 1.3 | 4.3 | 7.7 | Fast; armor scaling to be tuned in playtesting |
| Ogre | 4.0 | 7.6 | 11.6 | Ignores armor — true DPS vs any player unit |
| General | 2.5 | 7.0 | 12.0 | 50% armor by year 20 + aura; highest priority target |
| Catapult | 1.5 | 5.1 | 9.1 | AoE; effective DPS much higher vs grouped defenders |
Each year has three possible enemy compositions (A, B, C) randomly selected at battle start. Each composition defines unit assignments per lane (left, center, right), reserve slot contents, reserve deployment logic, and a scouting report string for the Scout Academy. Compositions for Years 1–3 are implemented in src/data/compositions.js. Years 4 and beyond fall back to a hardcoded stress test until authored.
When an Ogre, General, or Catapult is destroyed, a kill announcement is displayed on screen identifying which player unit landed the killing blow. XP awarded for killing blow on these units is tripled (6 XP) instead of the standard 2 XP.
Enemies commit to an overarching strategy per year, then execute adaptively within that plan:
Enemy Mages are deferred to V2. Ladder mechanics and wall height gameplay effects also deferred to V2.
Every recruit who survives seven years earns the right to leave as a hero. By default, a veteran has a 25% chance of choosing to stay. The Monument building tracks hero names and applies the attack speed bonus accordingly — each hero who stayed is recorded, making the Monument both a mechanical tracker and a piece of narrative history. Financial incentives (stipends, bonuses) can further raise retention chances.
Veterans who choose to stay remain on the active roster as high-level soldiers. They are the same unit type they always were, but with accumulated XP, levels, and battle experience. There are no special super-unit mechanics — their value is their combat effectiveness and the XP bonus they provide to the roster each off season.
Veterans who depart as heroes may leave behind a lasting influence on future recruit cohorts — a passive buff to incoming soldiers in their archetype, a shared technique, or improved early leveling. This ties long-term investment to multi-generational payoff and rewards players who protect and develop their veterans.
See Section VI for the full XP curve and level thresholds.
Buildings are the primary gate for unit types, capacity, and special abilities. They operate on two layers: a dependency/unlock system determines what can be built, and quantity + level are managed separately for each structure type. All building costs are in gold unless otherwise noted.
| Building | Primary Purpose | Bonus per Level | Cost/Level | Prerequisites |
|---|---|---|---|---|
| Barracks | Houses Warriors & Archers | +10 soldier capacity | 200 | — |
| Archery Range | Speeds archer attack | -0.2s attack interval | 150 | Barracks |
| Sparring Ground | Speeds warrior & captain attack | -0.2s attack interval | 150 | Barracks |
| Library | Houses Mages & Healers | +5 capacity | 200 | — |
| Mage Workshop | Speeds mage attack | -0.5s attack interval | 150 | Library |
| Hospital | Speeds healer heal interval | -1.0s heal interval | 150 | Library |
| Artisan Workshop | Houses Masons; auto-repairs wall before battle | +10 Mason capacity; auto-repairs 50 HP per wall segment per level at the start of each off season (before gold is calculated) | 100 | — |
| Armory | Increases armor (all units, additive) | +7% armor | 250 | Artisan Workshop |
| Weaponsmith | Increases DMG (Warriors, Archers, Captains only) | +10% DMG multiplier | 250 | Artisan Workshop |
| Siege Workshop | Houses Engineers | +1 Engineer capacity | 200 | Artisan Workshop + Archery Range |
| Officer Academy | Houses Captains | +1 Captain capacity (max 5) | 200 | Sparring Ground |
| Monument | Boosts attack speed per inscribed 7-year hero | -0.1s attack interval per inscribed hero; max 3 levels at 300g each; hero cap scales with level (Lv1: 5 heroes, Lv2: 10, Lv3: 15 — max bonus −1.5s at Lv3 full) | 300 | Officer Academy |
| Scout Academy | Houses Scouts; reveals enemy composition | +1 Scout capacity (max 3 levels) | 100 | Archery Range |
The wall is upgraded per segment independently. Ladder mechanics are deferred to V2 — wall height has no gameplay effect in V1 beyond the damage reduction bonus.
| Level | Height | Thickness | HP | Upgrade Cost |
|---|---|---|---|---|
| 1 | 10 ft | 1 | 200 | 100 |
| 2 | 20 ft | 1 | 300 | 200 |
| 3 | 20 ft | 2 | 400 | 300 |
| 4 | 30 ft | 2 | 500 | 400 |
| 5 | 30 ft | 3 | 600 | 500 |
Players choose their difficulty at the start of the game. This primarily determines how many years they must survive, not the speed of enemy escalation. The first ten years are the learning ramp regardless of difficulty — the same threat curve applies, the campaigns simply end at different points.
| Difficulty | Campaign Length | Feel |
|---|---|---|
| Easy | 10 Years | Learn the systems; first gen of recruits may reach hero status |
| Medium | 20 Years | Standard experience; two full recruit generations; true mid-game challenge |
| Hard | 30 Years | Full test; severe late-game escalation; requires optimized long-term planning |
Two sources of variance ensure each playthrough feels distinct:
Each year's enemy composition is randomly selected from three options at battle start. One campaign may emphasize Catapults and Generals; another may rely on Ogre-led assaults with Goblin swarms. Players must read enemy development and adapt their building and recruitment decisions accordingly — no single strategy is universally optimal.
The annual recruit pool varies in composition. Some years bring melee-heavy cohorts; others skew toward healers or casters. Players must adapt their building and training priorities to make the most of what they receive.
Primary Win Condition: Survive to the end of the campaign. Game over occurs only when all player units are dead (total wipe).
Score: Total number of soldiers who achieved hero status (survived seven full years and were released honorably). This differentiates between "barely survived" and "truly excelled."
| Outcome | Meaning |
|---|---|
| Total Wipe (all units dead) | Game over — campaign ends immediately |
| Survived, 0 Heroes | Bare survival — the wall held but no one made it seven years |
| Survived, Some Heroes | Standard success — a good campaign |
| Survived, Many Heroes | Mastery — the wall produced legends |
The game targets browser-native deployment on desktop. Mobile layout is deferred to a later sprint.
| Technology | Role | Rationale |
|---|---|---|
| HTML5 | Platform & off season UI | Browser-native, no install, cross-platform |
| Phaser 3 (CDN) | Battle phase rendering & game loop | WebGL renderer handles 50+ simultaneous units comfortably; built-in postFX, tweens, scene management; no build step via CDN |
| CSS / HTML overlay | Off season menus, building screens, resource UI | Layered over the Phaser canvas; cleaner and more responsive than Phaser's UI tools for complex menus |
| JavaScript (shared state) | Game state management | A shared GameState object bridges the Phaser battle scene and HTML off season UI. All constants centralized in src/data/constants.js — no raw literals elsewhere. |
| File / Folder | Purpose |
|---|---|
index.html | Production entry point — auto-starts Year 1 with random composition |
testversion.html | Development entry point — scenario chooser, key/legend sidebar, stress test |
src/state/GameState.js | Shared state object bridging battle and off-season |
src/battle/BattleScene.js | Phaser scene — update loop, unit tick, combat, reserves, rout |
src/battle/Unit.js | Unit class — stats, sprites, XP, postFX glows |
src/battle/targeting.js | All targeting logic for player and enemy units |
src/battle/Wall.js | WallSegment class — HP, breach, damage reduction |
src/battle/Projectile.js | Projectile class — movement, hit detection, AoE |
src/data/units.js | Player unit stat definitions |
src/data/enemies.js | Enemy stat definitions |
src/data/buildings.js | Building definitions, costs, prerequisites |
src/data/compositions.js | Enemy compositions keyed by year (3 options each) |
src/data/constants.js | All magic numbers — tile size, colors, thresholds, timings |
Phaser owns the battle phase canvas entirely. The off season is rendered as standard HTML/CSS positioned alongside the canvas. A central GameState object holds all persistent data — unit rosters, building levels, resources, year count — and is read and written by both layers. Game logic (combat resolution, targeting, XP math) runs in JavaScript; Phaser handles visual playback only.
All unit movement, combat resolution, projectile handling, and rendering handled inside Phaser. Validated at 50+ simultaneous units. Phaser's Scene Manager maps cleanly to the yearly battle cycle. PostFX system used for heal and aura glow effects.
Tabbed navigation, building cards, resource counters, and upgrade flows built in standard HTML and CSS. Reads and writes to shared GameState on confirmation.
The following is a suggested build order for implementing the off season UI. Tasks are sequenced to allow each step to be tested in isolation before the next layer is added. Claude Code should treat this as a to-do list and adapt sequencing as needed based on implementation realities.
GameState.js to support off season state: gold breakdown (base / wall-damage / destroyed-segment), building levels, wall segment HP and level per section, unit roster array (with name, class, gender, level, XP, year, portrait ID, assignment), and per-playthrough used-name and used-portrait sets.src/data/names.js — export male and female first-name arrays (Anglo-Saxon / Northern European) and per-class surname pool arrays (combat classes: martial surnames; Mason: trade-craft surnames; Scout: ranger-style surnames).src/data/portraits.js — export portrait manifest arrays keyed by gender × type (male-combatant, female-combatant, male-noncombatant, female-noncombatant). Implement deck-draw logic: remove on assignment, return dead soldiers' portraits to the deck.src/data/bios.js — pool of modular bio fragments (origin, trait, motivation) that can be combined into a short background paragraph for each recruit at generation time.src/offseason/recruitGenerator.js: determine class distribution (capacity-aware, roster-balancing, ±5 variance), generate name (unique-check against playthrough used-names set), assign portrait (deck-draw, unique among living), assemble bio. Expose as a function called after spending is confirmed.src/offseason/OffSeasonUI.js (or equivalent HTML/JS module). Implement step tracking, Next / Previous button logic, and step rendering dispatch. The shell should render one step at a time and preserve all step state on back-navigation.BattleScene.js can read unit positions and reserve group contents on startup.testversion.html to support launching the off season wizard directly (alongside the existing battle scenario chooser) so each step can be tested independently.The following design questions remain unresolved and should be addressed during or after playtesting:
src/data/compositions.js.index.html (production, random Year 1 composition) and testversion.html (scenario chooser, key/legend, stress test).src/data/constants.js. No raw literals in other source files.