Raid System (both directions)
Part of The design hub. Drafted 2026-08-30. Consumes the outputs of Engineer Ladder (short-ladder example) (emplacements, breach gear, stealth kits) and Inn Ladder (service-building example) (intel, recruitment). Real-time ARPG combat throughout.
Design pillar: raids are earned, not random
Incoming pressure = Prosperity (era + visible wealth — a baseline that grows as your city does) + Heat (per-rival vendetta earned by raiding them). A turtling player sees occasional prosperity raids; an aggressive player triggers retaliation from the specific city they hit. The player can always answer "why was I raided?" — and usually the answer is "because of what I did / built."
Incoming raids (defense)
Prototype (v0.1.23, 2026-09-03): the defense half is built as data + one Raider class. Pressure = Storehouse + Town Hall standing; interval = max(120, 300 − 15·buildings − 30·(era−1)) s. Warning 30 s (Chapel Bell Tower module ×1.5; Marshal mayor +25 %·quality — the Marshal's first real effect). Wave = 3 + era raiders at the east gate, walking to the store; each grabs 3 goods and runs for the gate, fights only if the hero closes to 90 px or strikes; killed carriers spill a winlu sack. Empty store → the store is wrecked (phase 3, offline; REPAIR = half materials, half time through the BUILDING phase). Hero not in town when it lands (or leaves mid-raid) → resolve_away: a fifth of the store + one random built plot wrecked. 90 s cap: remaining raiders bolt. Not yet: walls/emplacements (no Engineer), NPC kidnap (needs rival cities), Heat, morale surge.
Warning
Raids are telegraphed, never ambushes: a Watchtower (wall module or small building, TBD) gives lead time scaling with its tier; the Inn's rumor board can leak earlier hints ("Ironhold musters men…"). Lead time enables the prep ritual: eat, drink, set traps, position.
The assault
- Wave-based, real-time, at your walls. Raiders target: gate/walls → stockpiles (theft) → buildings (damage) → NPCs (kidnap).
- Automated defenses fight; the hero is the strongest piece. Traps and emplacements (Engineer) thin and slow waves; walls gate where enemies can enter; the player is the response force. Emplacements are automatic (no militia micromanagement — solo-hero combat stays the focus; a garrison/militia layer is parked as a possible late building).
- Raid tier scales with the attacker's era, mostly answering YOUR era — tier-2 walls in era 4 are a genuine liability.
Stakes (what you can lose)
- Buildings damaged, never erased: a wrecked building goes offline until repaired (materials + time). Mirrors gear dulling — progression is never deleted, but neglect has a price.
- Stockpile theft: raiders that reach storage grab goods and RUN — chasing a loot-carrier is a mid-raid decision (leave the gate?).
- NPC kidnap, never death: NPCs flee indoors when the bell rings; raiders who breach a staffed building can carry the NPC off. Kidnapped NPC = a rescue mission at the attacker's city (their prison). Turns your worst loss into content instead of a reload.
Repelled = payout
Fallen raiders leave lootable remains (core loop); repelling grants a morale surge and Heat against the attacker — a free justification to counter-raid.
Outgoing raids (offense)
Expanded 2026-09-04 into its own document: Outgoing Raids (rival cities) — rival cities as records, siege vs stealth, the consequences dial, Heat arithmetic, kidnap/rescue, reward anchors, and a one-rival prototype slice (Ironhold).
Rival city anatomy
Every rival city is built from the same grammar as yours: walls (tiered), a gate, guard patrols, and key buildings — warehouse (materials), vault (money/gems), workshop (recipes, unique gear), prison (captive NPCs — the main source of Journeymen/Masters), and a champion (boss: the rival mayor/warlord, best loot in the city).
Two paths, both engineer-funded
- Siege (loud): breach with charges/ram/ladders, fight garrison waves, take everything not nailed down, face the champion. Costs demolition goods; rewards are total.
- Stealth (quiet): the original concept's "puzzles and timings" — guard rotations, wall weak points, timed windows, gadget spends (grapple, smoke, lockpicks). Limited carry: you take targeted prizes (a recipe, a gem cache, ONE rescued NPC), not the warehouse.
- Fail-forward: blowing stealth doesn't reload — the alarm turns the run into an improvised siege at a disadvantage. Every raid resolves in play.
Consequences dial (player choice per raid)
- Loot it → city survives, rebuilds over time, can be farmed again — but Heat rises: expect retaliation.
- Cripple it → destroy production buildings: their raids on you weaken for a long while; slower rebuild.
- Raze it (siege only, late-game) → enormous one-time payout, permanent removal of that threat — and that farm. Other cities' fear/Heat response TBD.
Death & failure
- Player death (either direction) = wake at the Chapel; gear heavily dulled (big repair bill — the death penalty IS the durability system), any un-banked raid loot dropped where you fell (corpse run into a hostile city = tense, optional).
- Defense continues without you: automated defenses + walls decide how bad the raid ends. Losing hurts in materials, gold, and rescues owed — never in erased progression.
Building hooks (systems this consumes)
- Engineer: traps, emplacements, breach gear, stealth kits, aether cannon.
- Inn: rumor-board intel, morale; possible hostile "spy visitor" (TBD).
- Blacksmith: post-raid repair economy (gear + a role in building repair?).
- Chapel: respawn point, respec before a big raid.
- Walls/Stone Worker: the tier race against rising raid tiers.
- Scribe/Enchanter: raid-exclusive loot (tomes, essences) — raids are the primary source of enchanting materials.
Open questions
Watchtower— answered: a wall module from the palisade tier up (Building ladders); the Chapel bell tower stacks a small warning bonus on top.- Retaliation timing: how soon after your raid, and is it interceptable (meet the war party in the field)?
- Can rival cities raid EACH OTHER / grow in era alongside you?
- Spy visitors at the inn — real mechanic or cut for scope?
- Militia/garrison building — parked; revisit after combat feel exists.
- Razing: world reaction (fear discount vs. coalition Heat spike)?
Prototype v0.1.44 (2026-09-06) — raids scale with the city's era:raid_steps= era − 1. Raider hp ×(1 + 0.25·steps), stab 12 + 2·steps (raid_guard_hp/dmg), grab 3 + steps (raid_grab), gate swing 4 + steps (raid_gate_hit), gold drop 2·steps (raid_gold_drop, a "loot" sack entry), captain from Era 3 (Raider.captain: first of the wave, ×2 hp, +2 dmg, ×2 grab, ×3 gold, bigger tinted sprite). Away resolution: walls held 10% + 2%/step of the store and gate damage 60 + 20·steps; no walls 20% + 5%/step. Wave size stays 3 + era + Heat.