MASTER OF MAGIC v1.31 (WIZARDS.EXE) - ORIGINAL-GAME BUGS AND QUIRKS FOUND WHILE DECOMPILING
Consolidated 2026-10-16 (diplomacy 46-67 step 38; items/units 68-93 step 39; info/lists 94-101 step 40). Every item comes from reading the code; only the GAME ones were also seen in game.
Status:  CHECKED = I verified the instructions myself in the assembly (tools/dis16.py);
         SRC     = re-checked by me in the matched source (src/, which compiles byte-identical to the shipped
                   EXE): the entry's 'Re-checked (N221)' line names the code (P4 B1); #413+ come from our
                   own notes on that source;
         READ    = found by a reader agent from decompile + assembly, not re-checked by me (none left after
                   N221: all became SRC);
         READ+asm= found by a reader agent who verified it in the assembly (dis16) - not re-checked by me;
         WIKI    = from the community MoM wiki (masterofmagic.fandom.com; its numbers come from the 1.50 patch
                   authors reading the code), not yet checked by us;  OPEN = we and the wiki disagree, to settle;
         GAME    = confirmed in game (since P4 B4: an 'In game' line names the run, tools/harness/regress.py).
         SAME    = the same bug as the entry it names (merged there in N221); the number stays because src
                   cites it.
Details / context: ORIGINAL_NOTES.txt (section named in brackets) and work/reports/*.tsv.

=== EVENTS / END OF TURN ===
1. CHECKED  Depletion and New Minerals random events can NEVER happen. The site search loops "while result == 0" but the
            result starts at -1 (cbdf:0db1 / 0f2e, Event_Find_Depletion_Site / Event_Find_New_Mineral_Site). [END TURN -
            SECOND WAVE]  Test: hundreds of turns should never show either event.
            Static check (2026-10-24, tools/harness/regress.py 1): wizards/TERRCHG.C:417 holds the code;
            Event_Find_Depletion_Site = 1.31 bytes; Event_Find_New_Mineral_Site = 1.31 bytes
            [work/harness/game/WIZARDS.EXE]
2. GAME     City_Remove fall-through (c3f5:157a): after an outpost is removed the loop does not "continue", so the next
            city in that slot can be turned into population 1 / size 1 and skips its growth that turn.
            Re-checked (N221): City_Remove shifts the records; the shifted city is tested by the population_tens >= 10
            branch and skips its own turn.
            In game (2026-10-24, tools/harness/regress.py 2): turn 107: Sunnydale removed; Zho now index 9, population
            1, size 1
3. GAME     AI wizards use the HUMAN's fame for merchant / mercenary / hero offers (c3f5:1e19). [MAIN LOOP + NEXT TURN]
            Re-checked (N221): fame is assigned only in the human branch; the AI iterations reuse it.
            In game (2026-10-24, tools/harness/regress.py 3): mercenary rolls (player, chance) [(0, 10), (1, 20), (2,
            20), (4, 20)]; the chance from each AI's own fame 0 would be {1: 11, 2: 11, 3: 11, 4: 11} (Famous {1: 0,
            2: 0, 3: 0, 4: 0})
4. GAME     Grand Vizier "population < 5 -> Housing x2" test reads the wrong city (eab0:100a).
            Re-checked (N221): p_cities[i] with i the option index (AIPROD.C 387).
            In game (2026-10-23, tools/harness/regress.py 4): AI_Wizard_Choose_Production(city 1, population 11): the
            test reads p_cities[14] (DI = the option count), population 7
5. GAME     Outposts_Grow mineral loop indexes tiles by the city index (c751:2150): checks one tile repeatedly, reads past
            the 25-entry arrays for city index >= 25.
            Re-checked (N221): CITYCALC.C 938: p_mineral_maps[plane][ys[city]][xs[city]] - the city index, not k.
            In game (2026-10-23, tools/harness/regress.py 5): Cornwell outpost: grow 33 before the mineral loop, 138
            after it (+105), 276 after the difficulty (3) multiplier
6. GAME     Mana-shortfall summon disbanding starts one past the last unit (c3f5:1031); food shortfall tests the
            carrier's type (c3f5:0c7a); unit-enchantment loss report prints unit numbers as unit names (12f3).
            Re-checked (N221): part 1: unit = num_units (TURNUPD.C 464); part 2: the stranded loop tests and reports
            the carrier's type p_units[unit] (351-354); part 3 is #130 (Mana_Shortfall_Unit_Enchants).
            In game (2026-10-23, tools/harness/regress.py 6): first unit tested: SI = 195 with num_units = 195 (the
            record there: {'owner': 1, 'type': 47, 'x': 52, 'y': 15})
7. GAME     Units_Stranded_By_Removal never fills its list (7504:0c94) - "drowned" passengers come from stack garbage.
            In game (2026-10-23, tools/harness/regress.py 7): Units_Stranded_By_Removal(192): count [bp-2] = 11495,
            tile list [bp-30] = [1517, 11495, 1360, 10855, -31691, 11982, 0, 192, 0] (the square holds 192, 33, 69)
8. SRC      Mercenary roll compares an uninitialised value (c751:1da8).
            Re-checked (N221): cost is first assigned after the 'game_turn / 2 < cost' test (CITYCALC.C 820-822).
            Static check (2026-10-24, tools/harness/regress.py 8): wizards/CITYCALC.C:745 holds the code;
            Mercenary_Offer_Roll = 1.31 bytes [work/harness/game/WIZARDS.EXE]
9. GAME     AI-vs-AI treaty roll (AI_Diplo_Turn_AI_Vs_AI 7269:04c5, phase-2 re-read): with S = bias + relation +
            personality + Random(100) + (Random(5)+3) x difficulty (+10 pact, +20 alliance) and T = treaty interest, S +
            T >= 151 gives an ALLIANCE from no treaty (a pact is skipped) and even from WAR (status 3 -> 2 with no peace
            made); an existing alliance is turned back into a pact; a pact becomes an alliance. Below 151 they trade
            spells when S > trade interest + 80 (so a higher trade interest makes a trade LESS likely), and the trade
            passes crossed arguments (no spell moves but the Mastery cost still drops, aba4:05e2). COMMUNITY-KNOWN:
            W078DIPL lists the same four, W540FIX (AI can't trade).
            Re-checked (N221): DIPLOMSG.C AI_Diplo_Turn_AI_Vs_AI: score + treaty interest > 150 and not allied ->
            alliance (from none, pact or war), allied -> pact; else trade_interest + 80 < score trades (#458 crossed
            gifts); Wizard_Learn_Spell (TURNUPD.C) cuts the Mastery cost even for a spell already known.
            In game (2026-10-23, tools/harness/regress.py 9): turn 106: wizards 4 and 2 are made allies while their
            status is 3 (3 = war)
10. GAME    Subversion also lowers the AI caster's own relation with the target (af2c:2741; the wiki says it should not).
            Re-checked (N221): Subversion_Apply skips only the human and the victim, so an AI caster lowers its own
            relation too (OVERSPL3.C).
            In game (2026-10-23, tools/harness/regress.py 10): Subversion_Apply wrote wizard 1 (the caster)'s
            relationship with victim 0: 14 -> -11
11. GAME    Drain Power drains 10..200 mana (af2c:06ea; the wiki says 50..150).
            Re-checked (N221): ten Random(20) = 10..200 (OVERSPL? Drain_Power_Apply).
            In game (2026-10-23, tools/harness/regress.py 11): victim 0: Random calls (n, result) [(20, 9), (20, 2),
            (20, 7), (20, 7), (20, 4), (20, 3), (20, 12), (20, 9), (20, 15), (20, 17)], sum 85

=== COMBAT ===
12. CHECKED The AI probably never casts Holy Word: its target check keeps the answer in DI and discards it (pop di);
            AX is leftover, usually 0 (8a20:2d0a-2d1e). [COMBAT DEEP DIVE]
            Static check (2026-10-24, tools/harness/regress.py 12): wizards/COMBCAST.C:1059 holds the code;
            AI_Check_Holy_Word = 1.31 bytes [work/harness/game/WIZARDS.EXE]
13. SRC     With combat animations OFF, Death Spell / Holy Word / Flame Strike / Mass Healing read uninitialised locals
            and may do nothing (b1af:15ed no-animation path). Test: cast them with animations off. Phase 2 (asm
            b66a:1e69): Call Chaos without animation calls Call_Chaos_Apply with its effect array (bp-0x54) never filled
            - each enemy gets the effect left in that stack slot (values > 7 do nothing) instead of Random(8)-1.
            COMMUNITY-KNOWN in part: W737FIX (Drake178) rewrites Call_Chaos_Cast / Apply; its other claims - a crash
            when the AI casts it outside the defender's first turn, Doom Bolt / Fire Bolt pictures (the 8-entry picture
            table is local_66[4] + four following locals, b66a:1e31), animation timing - are not checked here.
            Re-checked (N221): our source note at src/wizards/COMBDISP.C:507 states it.
            Static check (2026-10-24, tools/harness/regress.py 13): wizards/COMBDISP.C:507 holds the code;
            Mass_Spell_Animate = 1.31 bytes; Call_Chaos_Cast = 1.31 bytes [work/harness/game/WIZARDS.EXE]
14. GAME    Mass Healing is refused while True Light is active (both use combat-enchant slot 0) (8cf2:1548).
            Re-checked (N221): our source note at src/wizards/COMBSPL.C:566 states it.
            In game (2026-10-22, tools/harness/regress.py 14): skill after True Light 153; next turn 153; after the
            Mass Healing attempt 153
15. GAME    When the AI defends, Combat_Turn_Start runs twice before the human's first move (per-turn effects and the
            turn counter run once extra). [COMBAT FLOW]  Test: does the first combat turn show turn 2?
            Re-checked (N221): COMBAT.C 291 Combat_Turn_Start, AI defender moves, 302 Combat_Turn_Start again, then
            the human; afterwards COMBTURN.C 228 Start + AI defender + human each turn: one extra start before the
            human's first move. Consequence (N226): Combat_Check_Winner (COMBAT.C 304, after the second start) lets an
            AI wizard's side flee from combat turn 2 on (combat_turn_count > 1), so an AI defender can flee before the
            human has moved at all - seen in the harness: two weak defenders of AI wizard 1 left the battle before
            the human's first turn.
            In game (2026-10-22, tools/harness/regress.py 15): combat_turn_count 2 at the human's first move; 8 battle
            units
16. SRC     Warp Creature loops forever if a unit already has all three warp flags (b66a:0000).
            Re-checked (N221): the retry loop never ends when all three flags are set; the AI target scan skips warped
            units (COMBCAST.C 509), the human picker does not, so a fourth human cast on a triple-warped unit hangs.
            Static check (2026-10-24, tools/harness/regress.py 16): wizards/SPELLFX.C:110 holds the code;
            Warp_Creature_Apply = 1.31 bytes [work/harness/game/WIZARDS.EXE]
17. SRC     Call Chaos "disintegrate" on a resisting unit applies a stale damage array from the previous victim
            (b66a:23f0-2404).
            Re-checked (N221): our source note at src/wizards/SPELLFX.C:1135 states it.
            Static check (2026-10-24, tools/harness/regress.py 17): wizards/SPELLFX.C:1135 holds the code;
            Call_Chaos_Apply = 1.31 bytes [work/harness/game/WIZARDS.EXE]
18. GAME    Side_Missile_Strength returns the LAST missile unit's value, not a sum, and the AI adds it to uninitialised
            locals (a76b:0000) - siege/rally decisions read garbage.
            Re-checked (N221): the last active shooter's ranged value is returned (COMBUTIL.C); COMBTACT.C adds it to
            own_magic / enemy_magic.
            In game (2026-10-24, tools/harness/regress.py 18): Side_Missile_Strength(5) = 1; the living neutral
            shooters' ranged strengths [1, 1] (sum 2)
19. SRC     Deployment picks melee units by list position instead of unit index (8f51:20c2).
            Re-checked (N221): our source note at src/wizards/COMBTARG.C:900 states it.
            Static check (2026-10-24, tools/harness/regress.py 19): wizards/COMBTARG.C:900 holds the code;
            Combat_Deploy_Side = 1.31 bytes [work/harness/game/WIZARDS.EXE]
20. SRC     Combat AI realm-threat bits built as 1<<realm but tested as 1<<(realm-1) (Bless, Resist Elements, True Sight
            checks look at the wrong realm) (c165 / c165:1fee); Animate Dead counts corpses and ignores the count.
            Another site of the same off-by-one: AI_Target_Dispel 8a20:1657 (#312, W640FIX).
            Re-checked (N221): our source note at src/wizards/COMBAI.C:75 states it.
            Static check (2026-10-24, tools/harness/regress.py 20): wizards/COMBAI.C:159 holds the code;
            AI_Combat_Spell_Score = 1.31 bytes; AI_Combat_Assess_Threats = 1.31 bytes [work/harness/game/WIZARDS.EXE]
21. SRC     Strength-table index mix-ups in AI_Build_Strength_Tables (d208 chunks; uses DI before set at d208:1009;
            Myrran race test 0xE instead of 0xD).
            Re-checked (N221): our source note at src/wizards/AITURN.C:404 states it.
            Static check (2026-10-24, tools/harness/regress.py 21): wizards/AITURN.C:404 holds the code;
            AI_Build_Strength_Tables = 1.31 bytes [work/harness/game/WIZARDS.EXE]
22. GAME    Life Drain cast by a wizard adds 3x the drain to casting SKILL points (b66a:0616) - intended?
            Re-checked (N221): SPELLFX.C 261 header: a wizard caster gets 3 skill points per drained point.
            In game (2026-10-24, tools/harness/regress.py 22): skill_points 30000 -> 30009 (+9); the target's drain
            damage 0 -> 3 (+3)
23. SRC     Battlefield rivers are dead code (df82:0000 zeroes the river input); decoration B never placed on some
            centre squares (precedence error df82:1393); city-wall art set is sticky between battles (DS:706e).
            Re-checked (N221): our source note at src/wizards/BFGEN.C:601 states it.
            Static check (2026-10-24, tools/harness/regress.py 23): wizards/BFGEN.C:91 holds the code;
            Battlefield_Generate = 1.31 bytes; Battlefield_Scatter_Decor_B = 1.31 bytes
            [work/harness/game/WIZARDS.EXE]

=== OVERLAND / MAP ===
24. GAME    New volcanoes (Raise Volcano, Armageddon) never get a mineral: (roll + mineral) & 0xE0 on a zeroed byte
            (cbdf:0c64-0c6a). A community patch fixes exactly this. [OVERLAND SCREEN CONTROLS + MAP]
            In game (2026-10-22, tools/harness/regress.py 24): turn 112 autosave: 74 new volcanoes, 0 with a mineral
            (a fixed build: 1 in 5; no mineral in 74 by chance 0.0 %)
25. GAME    Oracle + Nature's Eye city sees only 4 tiles (Oracle checked last) (7851:0119).
            Re-checked (N221): MAPVIS.C 104 header: Oracle tested after Nature's Eye, so 4.
            In game (2026-10-23, tools/harness/regress.py 25): Cornwell (Oracle + Nature's Eye):
            Visibility_Mark_Square range 4
26. SRC     The AI's settler site evaluation reads the HUMAN's exploration map (City_Site_Evaluate, c751:2bb6): a
            square the human has not explored adds nothing (no food, production or minerals), and the AI's settler
            loop ignores the 'unexplored' result. So sites in land the human has not seen score low, and the AI
            prefers sites the human has explored. Matters for AI-vs-AI.
            Re-checked (N221): CITYCALC.C City_Site_Evaluate counts a square only when p_exploration_maps (the
            human's) has it explored; AIUNITS.C 1905-1910 ignores *unexplored. The entry's 'only founds cities on
            tiles the human has explored' overstated it (corrected after the Codex review: unexplored squares add
            nothing, explored ones still count).
            Static check (2026-10-24, tools/harness/regress.py 26): wizards/CITYCALC.C:1178 holds the code;
            City_Site_Evaluate = 1.31 bytes [work/harness/game/WIZARDS.EXE]
27. GAME    City-area sharing bitmap does not wrap at the x=0/59 map seam (c751:3209); fog/road code has similar seam
            and y=0 edge glitches (5a8c:04f0, d95b:0f72). Phase 2: the road-connection rebuild's "road next to the city"
            test (cbdf:118a, cbdf:14e1) reads the 8 neighbours unwrapped too (x 0 / 59 test the next / previous row).
            Reach: needs a city within 2 columns of the seam; continents never come that close (#203 MAP SURVEY), but
            Tile_Settle_Blocker (66bf:0b9e) has no row limit, so only a city founded on the polar tundra of rows 1 / 38
            at x = 58..1 can trigger it.
            Re-checked (N221): our source note at src/wizards/CITYCALC.C:1313 states it.
            In game (2026-10-23, tools/harness/regress.py 27): Arcanus city_area_bits in memory: clipped version
            FOUND, wrapped version not found (they differ in 3 bytes)
28. SRC     Stack_Blink_Draw looks up the unit grid with pixel coordinates (59bd:032a) - steady-mode test reads garbage.
            Re-checked (N221): our source note at src/wizards/MAPDRAW.C:191 states it.
            Static check (2026-10-24, tools/harness/regress.py 28): wizards/MAPDRAW.C:191 holds the code;
            Stack_Blink_Draw = 1.31 bytes [work/harness/game/WIZARDS.EXE]
29. READ+asm Overland map shows every city with the same picture whether or not it has walls (d95b:05ab).
            Mechanism (step 60): Map_Draw_Cities / Map_Draw_Cities_Move_Anim pick MAPBACK.LBX 20 instead of 21 when
            City.buildings[35] (City Walls, byte +0x42) != 0, but building bytes are 0xFF never built / 1 standing /
            0 replaced - so "never built" and "standing" both take the same picture; the test should be == 1.
            Static check (2026-10-24, tools/harness/regress.py 29): wizards/MAPLAYER.C:284 holds the code;
            Map_Draw_Cities = 1.31 bytes [work/harness/game/WIZARDS.EXE]
30. SRC     Road plans truncated by the 120-turn cap may still target the full clicked tile (5b8b:0834).
            Re-checked (N221): ROADSCR.C RoadScr_Plan sets road_end_x/y from the 10-square line before the
            blocked-square / 120-turn cuts shorten road_path_len; the order (line 169) builds to road_end.
            Static check (2026-10-24, tools/harness/regress.py 30): wizards/ROADSCR.C:358 holds the code; RoadScr_Plan
            = 1.31 bytes [work/harness/game/WIZARDS.EXE]
31. SRC     Cityscape: Evil Presence overlay drawn on Shrine/Temple/Parthenon but not Cathedral; newly built City Walls
            never fade in (cd8b:25a3); layout seed has no plane (cities with equal x*y look alike); row-0 road bug
            (cd8b:046e).
            Re-checked (N221): CITYSCAP.C headers 209 (row-0 road into row 5) and 882 (walls fade with the last cell;
            Evil Presence over 22..24 only); seed map_x * map_y + 0x2895, no plane (lines 177 / 1563).
            Static check (2026-10-24, tools/harness/regress.py 31): wizards/CITYSCAP.C:213 holds the code;
            Cityscape_Draw_Roads = 1.31 bytes; Cityscape_Draw_Objects = 1.31 bytes [work/harness/game/WIZARDS.EXE]
32. SRC     Neutral lair-monster "re-pick if not on the human's plane" loop does nothing (f978:01a2).
            Re-checked (N221): our source note at src/wizards/AINEUTRL.C:109 states it.
            Static check (2026-10-24, tools/harness/regress.py 32): wizards/AINEUTRL.C:109 holds the code;
            AI_Neutral_Lair_Monsters = 1.31 bytes [work/harness/game/WIZARDS.EXE]

=== MAGIC / SPELLS ===
33. GAME    Disenchant (Area / True) never removes Invulnerability: the unit loop stops at bit 30 (ba2c:0758); it can
            fail to free first-turn Stasis on units with other mutation bits (ba2c:07ed).
            Re-checked (N221): OVERCAST.C Disenchant_Area_Overland: k < 31 (bit 31 Invulnerability never); Stasis:
            mutation_flags == MUT_STASIS_NEW (equality), with other bits it XORs MUT_STASIS instead.
            In game (2026-10-22, tools/harness/regress.py 33): unit 2 enchantments 0x80000000 after the cast (was
            0x8000003f); casting now 0
34. GAME    AI Nature's Cures, Stasis and Black Wind use the target's x coordinate as a unit index (acd6:15f2,
            acd6:1595, af2c:062e) - wrong stack healed / wrong diplomacy target / wrong visibility test.
            Re-checked (N221): our source note at src/wizards/AISPELL.C:3263 states it.
            In game (2026-10-23, tools/harness/regress.py 34): turn 107: wizard 1's damaged unit 2 (1, 47, 48, 16, 1)
            damage [5, 0] -> [4, 0]; unit #48 (its x) is (5, 68, 25, 29, 1); squares healed to 0: [(5, 121, 51, 19,
            0), (5, 68, 25, 29, 1)]; wizard 1 casting now 203; unit #48's square: damage [0, 0, 6, 0, 0, 0] -> [0, 0,
            0, 0, 0, 0]
35. GAME    Call the Void, Enchant Road and Consecration's purification off-by-one at the map edge (x = 60 / y = 40 accepted:
            the next row's tile x 0, or row 40 = past the plane) (acd6:08c3, af2c:2154, af2c:25f9 City_Consecration_Turn).
            Re-checked (N221): our source note at src/wizards/OVERSPEL.C:775 states it.
            In game (2026-10-23, tools/harness/regress.py 35): Tile_Is_Desert columns for Cornwell at x 58: [56, 57,
            58, 59, 60] (25 squares)
36. SRC     AI never casts Flying Fortress fresh: its target picker requires the fortress city to ALREADY have it
            (CHECKED e318:3e08).
            Re-checked (N221): our source note at src/wizards/AISPELL.C:1821 states it.
            Static check (2026-10-24, tools/harness/regress.py 36): wizards/AISPELL.C:1822 holds the code;
            AI_Target_Flying_Fortress = 1.31 bytes [work/harness/game/WIZARDS.EXE]
37. GAME    Raise Volcano: the 2-slot nearby-city array is overrun by a 3rd city; the event record stores x as the
            city index (af2c:12bf); Corruption's nearby-city array can corrupt the saved map view.
            Re-checked (N221): our source note at src/wizards/OVERSPL3.C:516 states it.
            In game (2026-10-23, tools/harness/regress.py 37): report_buildings_lost (city, building): [(14, 1), (14,
            6368), (14, 919), (14, 6186), (14, 927), (14, 2), (14, 78), (14, 11982), (14, 4), (14, 270), (14, 2264),
            (14, 6294), (14, 270), (14, 4), (14, 18091), (14, 11726), (14, 10772), (14, 10772), (14, 5), (14, 16299)];
            Cornwell square now terrain 179 (volcano 179)
38. GAME    Human Spell Binding and Disjunction rolls (Spell_Binding_Resolve bcc7:16e6, Disjunction_Resolve bcc7:19e6):
            chance = Spell_Dispel_Resistance(250 S / (S + target base cost), TARGET OWNER, realm of the CAST spell)
            vs Random(250): the target owner's Archmage (and, for Spell Binding = Sorcery, Sorcery Mastery)
            MULTIPLIES the caster's success chance instead of resisting. Spell Binding also uses S = cost x 20
            (Disjunction S = cost, x3 True); the human gets no Runemaster x2 here (the AI path in Overland_Cast_Spell
            does). Compare Dispel_Square / the AI path: resistance goes into the denominator. COMMUNITY: W269FIX removes
            the Spell Binding roll altogether ("over 95% success rate"); the Disjunction side has no community fix.
            Re-checked (N221): our source note at src/wizards/CASTUI.C:666 states it.
            In game (2026-10-24, tools/harness/regress.py 38): Spell_Dispel_Resistance(strength 53, owner 2, realm 5)
            = 106 (250 x 300 / (300 + Evil Omens' cost) expected as the strength)
39. SRC     Spellbook turn icons round DOWN while the research/Apprentice book rounds UP (9a4b:0c57 vs 9c9a:17e1): a
            30 MP spell with a 20 MP/turn budget shows 1 icon but takes 2 turns.
            Re-checked (N221): SPELLBK.C 508 cost / spend_per_turn (down, at least 1) vs RESEARCH.C 738 (cost + spend
            - 1) / spend (up).
            Static check (2026-10-24, tools/harness/regress.py 39): wizards/RESEARCH.C:675 holds the code;
            Research_Book_Draw_Page = 1.31 bytes; Spellbook_Draw_Page_Overland = 1.31 bytes
            [work/harness/game/WIZARDS.EXE]
40. SRC     Conjurer's +25% is applied to research estimates of EVERY Death and Arcane spell (rate taken from each
            realm's first spell, a summon) (9a4b:02fc).
            Re-checked (N221): SPELLBK.C 268 Research_Bonus_Pct(0, realm * 40 + 1): the first spells of Death (161
            Skeletons) and Arcane (201 Magic Spirit) are summons, so Conjurer's 25 (ECONOMY.C 610) lands on the whole
            realm's rate.
            Static check (2026-10-24, tools/harness/regress.py 40): wizards/SPELLBK.C:245 holds the code;
            Spellbook_Build = 1.31 bytes [work/harness/game/WIZARDS.EXE]
41. GAME    Evil Omens raises the cost of Nature/Life spells for every wizard including the caster (a0ec:054c);
            casting-cost reduction has no cap.
            Re-checked (N221): WIZSTATS.C Spell_Casting_Cost: any wizard's Evil Omens -> x 3 / 2 for Nature / Life;
            cost - cost * reduction / 100 with Spell_Cost_Reduction_Pct unbounded (100 % or more possible).
            In game (2026-10-23, tools/harness/regress.py 41): Spell_Casting_Cost(0, spell 129, combat 0) = -36; base
            80 (castable 1); with Omens x 3/2 and -130 %: -36
42. SRC     After Alchemy the magic screen recomputes the per-turn cap without the fortress hero bonus (6080:0000).
            Re-checked (N221): MAGICSCR.C 292-297 recompute spend_per_turn from nominal_casting_skill alone; SPELLBK.C
            274-275 adds Fortress_Hero_Skill_Bonus.
            Static check (2026-10-24, tools/harness/regress.py 42): wizards/MAGICSCR.C:150 holds the code;
            Screen_Magic = 1.31 bytes [work/harness/game/WIZARDS.EXE]

=== CITY SCREEN / DISPLAY ===
43. SRC     Breakdown scrolls are display re-computations that differ from the real totals: Merchant's Guild shows taxes
            only, Dwarf Prosperity counted 4x, Shrine power unscaled, Evil Presence only in the display, Gaia/Animist
            farmers double-counted (c751:34fc..427c).
            Food scroll (phase 2, c751:34fc vs City_Calc_Food c751:05d2): the real food is farmers x 2|3 + Foresters 2,
            Famine /2, THEN the over-cap half (cap with Gaia x1.5); the scroll halves the farmer line at the cap without
            Gaia, shows Foresters as 1 when that line is over the cap, re-adds farmers x 3 on top of the running total in
            the Gaia line for Halflings / Animists, and shows Famine as half of that running total.
            COMMUNITY-KNOWN for Foresters / Famine (W669FIX).
            Gold scroll (c751:382d vs City_Calc_Gold c751:0add): the real base is taxes (x2 Dwarves) + minerals; the
            scroll's trade / Marketplace / Bank lines use the base WITHOUT the Dwarf doubling, Merchants' Guild shows the
            taxes line instead of 100 % of the base, Prosperity = taxes + minerals + Miners (+ taxes again for Dwarves).
            Production scroll (c751:3d30): every percentage line is truncated on its own, so the lines can add up to
            less than the real total (W667FIX "rounding errors"); Cursed Lands shows sum / 2 where the real is (prod+1)/2.
            Power scroll (c751:427c vs c751:0eeb): Shrine line not x1.5 for Divine / Infernal Power, the other temple
            lines truncated one by one; the Evil Presence loss line is shown only when the owner HAS Death books
            (c751:4519 je, the same inversion as #112) - and the real power total has no Evil Presence term at all.
            COMMUNITY-KNOWN: W666FIX (gold), W668FIX (power), W493 / W669 / W670FIX (food), W218FIX (Evil Presence).
            Re-checked (N221): CITYCALC.C scroll headers 1383 / 1451 / 1638 state the differences; Gold scroll: Dwarf
            taxes line doubled, then Prosperity adds the (doubled) taxes and once more for Dwarves = 4 x the base
            taxes.
            Static check (2026-10-24, tools/harness/regress.py 43): wizards/CITYCALC.C:265 holds the code;
            City_Calc_Food = 1.31 bytes; City_Calc_Gold = 1.31 bytes; City_Calc_Power = 1.31 bytes;
            City_Food_Breakdown = 1.31 bytes; City_Gold_Breakdown = 1.31 bytes; City_Production_Breakdown = 1.31
            bytes; City_Power_Breakdown = 1.31 bytes [work/harness/game/WIZARDS.EXE]
44. GAME    Production list caps: max 12 units (if 12, Spearmen and Swordsmen are dropped) and 20 entries total, so a
            12-unit city shows at most 8 building entries (4e5c:0c04, asm 1137-1178).
            Re-checked (N221): CITYPROD.C 525 header: at most 12 units (rebuilt without Spearmen / Swordsmen), 20
            entries.
            In game (2026-10-25, tools/harness/regress.py 44): City_Build_Options(21): n_options 20, n_units 12; unit
            types [35, 36, 37, 38, 106, 107, 108, 109, 110, 111, 112, 113]; buildings [1, 2, 7, 17, 18, 28, 30, 31];
            unbuilt candidates listed [1, 2, 7, 17, 18, 28, 30, 31], left off [11] - both caps: Spearmen / Swordsmen
            dropped and the list cut at 20 with unbuilt candidates left off
45. SRC     The "not enough population to support new construction" branch of the production screen is unreachable.
            Re-checked (N221): CITYPROD.C 124 header: the population warning is never reached.
            Static check (2026-10-23, tools/harness/regress.py 45): wizards/CITYPROD.C:128 holds the code;
            Screen_City_Production = 1.31 bytes [work/harness/game/WIZARDS.EXE]

=== DIPLOMACY (step 38; readers D1/D2 checked most of these in asm themselves - "READ+asm") [DIPLOMACY]
46. GAME    AI-initiated audiences: AI_Diplo_Turn_Vs_Human runs its offense / peace / proposal logic only when
            bias + 2*relation + lowest interest + personality mod is BELOW -100 (736d:015b cmp dx,-100; jl); otherwise
            it clears that wizard's pending message. Looks inverted: friendly AIs would almost never propose a treaty.
            COMMUNITY-KNOWN (W082DIPL: the same JL made a JMP - "AI never offering a treaty ... permanent silence";
            W085DIPL: the follow-up proposal roll is ~0.75% / turn). HARNESS (step 47, edited test save only): Raven
            relation +80 and Kali -100 toward the human, both met, turns 106-121 (15 turns): no AI audience at all, from either.
            In game (2026-10-23, tools/harness/regress.py 46): AI 1 (relationship 100): score 250 + relationship 100 =
            350 (>= -100: message cleared)
47. GAME    Exchange Spells: the AI's acceptance roll (Random(100) + ... - 125) is stored in a local that is never read
            (7057:1c49): the AI accepts every exchange it lists. COMMUNITY-KNOWN (MoM wiki "Player to AI Diplomacy": "this
            value is not used in the game code"; the 1.50 unofficial patch keeps it). The wiki's 'trade forever' exploit
            is a different bug: the Diplomatic Reaction (Diplo_Relation_Change 7057:0ae1) can reset the interests
            to maximum, so the audience never runs out - see 66.
            In game (2026-10-23, tools/harness/regress.py 54): Dispel Magic picked: the human now knows Disenchant
            Area True, wizard 1 knows Dispel Magic True; the unused accept roll = Random(100) + 0 bias - 50 (relation
            / 2) + 100 (2 x Peaceful 50) - 100 (trade) - 125 = -174 .. -75; offers ['[ Disenchant Area']; counter-
            offers for Disenchant Area (300) ['[ Summoning Circle', '[ Dispel Magic', '[ Forget It']
48. GAME    Offer Tribute (spells): the minimum spell value passed to the spell lister is a leftover byte
            (DS:c399 + number of gold options, 7057:1964) from the last Exchange Spells / AI spell offer; a stale high
            value hides tribute spells.
            In game (2026-10-23, tools/harness/regress.py 48): tribute spells before the exchange ['Magic Spirit',
            'Dispel Magic', 'Forget It']; exchange offers ['[ Disenchant Area']; after ['Dispel Magic', 'Forget It']
49. GAME    Threat reparations are created from nothing: Wizard_Add_Gold(you, amount) and the AI's gold is only read
            to cap the amount, never reduced (6ea7:1299; gold reads 1247/125a/126b only). COMMUNITY-KNOWN (wiki; fixed in 1.50).
            In game (2026-10-23, tools/harness/regress.py 49): roll 173 (army_term 50): human gold 987 -> 1056, wizard
            1 gold 279 -> 279; message 69
50. GAME     Threat army term keeps only the low 16 bits of 100 x H / P (6ea7:107e, 10ba): outnumbering the AI more
            than ~328:1 (unit cost on his home continent) wraps negative -> he declares war; the reverse capitulates.
            Inside the audience the armies are counted on the squares that share the fortress square's MUSIC byte (#491).
            In game (2026-10-23, tools/harness/regress.py 50): armies human 11000 / wizard 1 10, army_term -21122,
            roll -20981; human-wizard 1 status 0 -> 3 (3 war); message 39
51. GAME     Having NO units on his continent counts -100, a token force -50 - 100 x P/H (far worse) (6ea7:1053).
            Same shape in Diplo_Proposal_Response (7057:058e, asm-checked): no units -50, a token force -50 - 100 x P/H;
            the 16-bit truncation of #50 applies there too.
            In game (2026-10-23, tools/harness/regress.py 51): no human unit: armies 0 / 30, army_term -100; one unit:
            armies 10 / 30, army_term -350
52. GAME     Leaving the Threaten/Break submenu by Forget It / Esc still costs -100 to all three interests (6ea7:12b2).
            COMMUNITY-KNOWN (wiki; 1.50 removes it for Forget It).
            In game (2026-10-23, tools/harness/regress.py 52): human's treaty / trade / peace interest toward wizard
            1: (50, 50, 50) -> (-50, -50, -50) after Threaten -> Forget It
53. GAME     A threat scoring >= 200 when the AI has no spell to give is "ignored" instead of paying gold (6ea7:11b1).
            COMMUNITY-KNOWN (wiki; fixed in 1.50).
            In game (2026-10-23, tools/harness/regress.py 53): roll 462 (army_term 250): human gold 987 -> 987, wizard
            1 gold 279 -> 279; message 67
54. GAME     Spell trade values are stored as BYTES: research costs compared mod 256 (7057:15b9; Exchange Spells and
            AI spell-offer thresholds).
            In game (2026-10-23, tools/harness/regress.py 54): offers ['[ Disenchant Area']; counter-offers for
            Disenchant Area (300) ['[ Summoning Circle', '[ Dispel Magic', '[ Forget It']
55. GAME     AI spell offer (message 0x30): you receive the chosen spell, but the AI never receives the spell it asked
            for (7269:0243). COMMUNITY-KNOWN (wiki "AI to Player Diplomacy": the AI not receiving the spell).
            In game (2026-10-23, tools/harness/regress.py 55): wizard 2 offer menus [['[ Disenchant Area', '[ Forget
            It']]; it asked for spell 202 (Dispel Magic); after: the human knows Disenchant Area True, wizard 2 knows
            Dispel Magic False
56. GAME     Accepting an AI pact / alliance / peace proposal always pays the AI's prepared incentive gold and spell to
            you, even when you accepted at once and it was never offered (7269:0201).
            In game (2026-10-23, tools/harness/regress.py 56): wizard 1 pact offer The need for peace is great. I
            propose that we sign a Wizard's Pact so we can concentrate our forces., accepted at once (status after 1):
            human gold 1001 -> 1151, wizard 1 gold 410 -> 410 (tribute_gold 150 set, tribute_spell 0)
57. GAME     AI-vs-AI peace test is peace_interest + DS:c3ea > 100, where DS:c3ea is the diplomacy-screen text variant
            (-1 or 0..14) - a stale UI value (7269:05f3). (Adds to bug 9.)
            In game (2026-10-24, tools/harness/regress.py 57): diplomacy screen opened True; diplo_msg_variant after
            it 2; the AI-vs-AI peace line read diplo_msg_variant 1 time(s): values [0]
58. READ+asm Make Peace adds +40 to the relation as an 8-bit value before the cap: 88..100 would wrap negative
            (7057:0978); normally unreachable at war.
            Static check (2026-10-23, tools/harness/regress.py 58): wizards/DIPLOACT.C:414 holds the code;
            Diplo_Make_Peace = 1.31 bytes [work/harness/game/WIZARDS.EXE]
59. GAME    Make Peace's curse removal also clears City +0x5c (cached Nightshade count) when it equals the other
            wizard's index + 1 (7057:2053, loops all 26 slots).
            Re-checked (N221): DIPLOACT.C Diplo_Remove_Mutual_City_Curses: every slot of the 26 (NUM_CITY_ENCHANTS)
            equal to the other + 1 is cleared, the Nightshade count slot included.
            In game (2026-10-23, tools/harness/regress.py 61): Make Peace in the human's audience: Dracon's Nightshade
            count slot 2 (= wizard 1 + 1) -> 0; menu ['[ Wizard Pact', '[ Alliance', '[ Peace Treaty', '[ Declaration
            of War on Another Wizard', '[ Break Alliance With Another Wizard', '[ Forget It']; status after 0 (3 war);
            treaty / trade / peace interest (100, 50, -100) -> (27, 20, -130) (change [-73, -30, -30]); Dracon
            enchants[25] 2 -> 0
60. GAME     Two-player games: diplomacy text variant = Random(n) - 2 (min 0): the last variant never appears, variant 0
            is twice as likely (7269:0c8e).
            In game (2026-10-23, tools/harness/regress.py 60): 40 greetings; per (message, count n): variants seen
            {(42, 3): [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1,
            1, 1, 1, 1, 1, 1, 1, 1]}; chance that an even 0 .. n - 1 draw never gives n - 1 here: 9e-08
61. GAME     Human peace proposal is scored on TREATY interest, not peace interest (6ea7:07a4) - PROVISIONAL, maybe
            intended.
            In game (2026-10-23, tools/harness/regress.py 61): menu ['[ Wizard Pact', '[ Alliance', '[ Peace Treaty',
            '[ Declaration of War on Another Wizard', '[ Break Alliance With Another Wizard', '[ Forget It']; status
            after 0 (3 war); treaty / trade / peace interest (100, 50, -100) -> (27, 20, -130) (change [-73, -30,
            -30]); Dracon enchants[25] 2 -> 0
62. READ+asm Ask_Sweetener's "has a spell to ask" flag is register DI, never set when true; works only because the one
            caller leaves DI = 6 (6ea7:0ca3).
            Static check (2026-10-23, tools/harness/regress.py 62): wizards/DIPLOSCR.C:619 holds the code;
            Diplo_AI_Ask_Sweetener = 1.31 bytes [work/harness/game/WIZARDS.EXE]
63. GAME    Offer Tribute gold choices are sized by the AI's treasury (an AI with < 25 gold offers no gold option);
            affordability is tested on current_player, the gold deducted from wizards[0] (7057:1620).
            Re-checked (N221): DIPLOACT.C Diplo_Offer_Tribute: amounts from wizards[diplo_partner].gold (< 25 ->
            n_gold 0), enabled against wizards[current_player].gold, deducted from wizards[PLAYER_HUMAN].
            In game (2026-10-23, tools/harness/regress.py 63): human gold 987, wizard 1 gold 20; tribute menu: ['[
            Spells', '[ Forget It']
64. GAME    "Incentive" text: nothing is appended when the gold is 0 even if a spell is offered (6ea7:0269).
            Re-checked (N221): our source note at src/wizards/DIPLOSCR.C:265 states it.
            In game (2026-10-23, tools/harness/regress.py 56): wizard 2 (tribute spell Confusion, gold 0), rejected
            first: the incentive text "What if we were to also offer  as an incentive?"; accepted then: the human
            knows Confusion True
65. GAME    A pending AI message blocks your diplomacy menu with that wizard for the whole turn (6ea7:0000 never clears
            it); pending types that set mode 2, or 1 / 0x36, would hang the screen - PROVISIONAL, probably unreachable.
            Re-checked (N221): DIPLOSCR.C Screen_Diplomacy: pending_rel_msg read, never cleared here;
            DIPLO_TALK_PROPOSAL has no case in the input switch (never done). Reachability of the hang not settled
            (entry keeps PROVISIONAL).
            In game (2026-10-23, tools/harness/regress.py 65): first audience: messages [9], menu False; second:
            messages [9], menu False; pending message after: 9 (set 9)
66. GAME     Relation events overwrite the interest spent in talks (Diplo_Relation_Change, asm-checked 7057:0ea4):
            the observer's treaty and trade interest toward the actor get + amount, then are COPIED onto the actor's row
            (wizards[actor].X[observer] = wizards[observer].X[actor]). The observer is never the human (tested at the
            top), so for the human the copy lands on wizards[0].X[AI] - the row every human-AI talk reads and spends
            (Diplo_Min_Interest, Diplo_Proposal_Response, Diplo_Interests_Minus10, Diplo_Threaten_Menu). The AI's own
            row is never spent by talks, so any event the human causes restores the spent interest to it: the wiki's
            "Exchange Spells forever" effect. Peace interest is not copied: a hostile act by the human RAISES
            wizards[0].peace_interest[AI] by |amount|/4 (and lowers the unused row), a friendly act only touches the
            unused row; at war (message <= 14) the hostile act changes no relation and moves peace interest the same
            way. COMMUNITY-KNOWN: wiki (Trade Interest); W068DIPL bugfix.
            In game (2026-10-23, tools/harness/regress.py 66): human's trade interest toward wizard 1: 0 -> -3 written
            by Diplo_Relation_Change+404 (7057:0EE5) (wizard 1's toward the human 77 before); trade / treaty after the
            attack (-200, -200) (Diplo_Break_Treaty sets -200 later)
67. GAME    Tribute spell's peace-interest bonus - SETTLED by phase 2 (wiki claim does not hold for 1.31): the code adds
            it to wizards[0].peace_interest[partner] (7057:1b3a, CHECKED). Phase 2 established that every human-AI talk
            reads and spends exactly that row (wizards[0].X[partner]: Diplo_Min_Interest for the audience gate and the
            AI's own turn at 736d:0113, Diplo_Proposal_Response, Diplo_Interests_Minus10); the AI's row
            wizards[partner].X[0] is used only between AIs (W068DIPL's notes say the same). So the bonus does matter.
            Not GAME-checked.
            Re-checked (N221): DIPLOACT.C Diplo_Offer_Tribute spell branch:
            wizards[PLAYER_HUMAN].peace_interest[diplo_partner] += gain (at most 200).
            In game (2026-10-23, tools/harness/regress.py 48): Dispel Magic given True: relation 40 -> 45,
            wizards[0].peace_interest[1] 110 -> 115, wizards[1].peace_interest[0] 50 -> 50
Dead code: 7442:0a18 / 0b2a army/population ratio rolls (no caller, no pointer); DS:0x4c44 diplo_test_mode never
written (its "== 3" branches are dead); 6ea7:191d empty; 7057:004d empty at-war test.

=== ITEMS, HEROES, UNIT STATS (step 39; readers I1 forge, I2 items/treasure, I3 unit view, I4 stats) [ITEMS ...]
68. CHECKED Random items: Item_Create_Random tests the item TYPE before rolling it (94df:2407 reads [bp-2], type rolled
            at 242f): whether a random treasure/merchant item gets 3 or 4 powers depends on leftover stack data.
            Static check (2026-10-24, tools/harness/regress.py 68): wizards/ITEMFORG.C:1002 holds the code;
            Item_Create_Random = 1.31 bytes [work/harness/game/WIZARDS.EXE]
69. READ+asm Forge: clicking Spell Charges a second time unpicks it but leaves the spell + charges on the design
            (94df:12a9); cost and name ignore them, the finished staff/wand keeps them for free (combat use of the
            charges = reader's static reading, PROVISIONAL).
            Static check (2026-10-24, tools/harness/regress.py 69): wizards/ITEMFORG.C:494 holds the code;
            Screen_Item_Forge = 1.31 bytes [work/harness/game/WIZARDS.EXE]
70. GAME    Merging needs 22 Nature books in ITEMPOW, so the forge can never offer it (prefabs still carry it).
            Re-checked (N221): ITEMPOW.LBX record 62 Merging: realm 0 (Nature), books 22 (gog/official_131);
            ITEMFORG.C 794 tests books >= books_required; books: an AI starts with at most 12 (MAGIC GAMESTRT.C 643),
            lair books stop once the five realms hold more than 12 (LAIR.C 719-725), so at most 13.
            In game (2026-10-24, tools/harness/regress.py 70): ITEMPOW.LBX: 67 records of 30 bytes; record 62
            "Merging": realm 0, books_required 22; the other special powers (group 9) need [0, 2, 3, 4, 5, 6, 7] books
71. SRC     Long auto-names are cut: ItemForge_Auto_Name (94df:0930) builds the name in a 30-byte stack buffer, and a
            '+N' name over 26 characters has its first 3 characters ('+N ') deleted inside those 30 bytes only
            (Array_Delete_Near zero-fills the end): "+6 Plate Mail of Invulnerability" (32 characters, written 3 bytes
            past the buffer) becomes "Plate Mail of Invulnerabili" (27).
            Re-checked (N221): ITEMFORG.C ItemForge_Auto_Name: name[30] on the stack; strcat writes "+6 Plate Mail of
            Invulnerability" (33 bytes with the NUL) 3 bytes past it; then 3 x Array_Delete_Near(0, name, 1, 30)
            (UTIL.C 265: moves bytes 1..29 down and zeroes byte 29) leave "Plate Mail of Invulnerabili" + 3 zero bytes
            - the original reading holds (a first N221 rewrite claimed no cut; the Codex review caught it).
            UI_Add_Text_Input (max 26) does not cut the buffer.
            Static check (2026-10-24, tools/harness/regress.py 71): wizards/ITEMFORG.C:295 holds the code;
            ItemForge_Auto_Name = 1.31 bytes [work/harness/game/WIZARDS.EXE]
72. GAME    Treasure spells: the realm loop runs 0..5 but tests realm == 6 for Arcane (aba4:032f); realm 5 reads
            Wizard +0x64 (Alchemy/Warlord retort bytes) as "Arcane books": Arcane treasure spells only for wizards
            with Alchemy or Warlord.
            In game (2026-10-23, tools/harness/regress.py 72): human (no Alchemy / Warlord): realm_done Nature..Arcane
            [1, 1, 1, 0, 1, 1], realms open 1
73. READ+asm Treasure spells: a realm with nothing left is marked eligible again (aba4:0492 writes 0, not 1), so a
            realm that still has spells can become unreachable and the treasure spell fails.
            Static check (2026-10-24, tools/harness/regress.py 73): wizards/TREASURE.C:156 holds the code;
            Treasure_Pick_Spell = 1.31 bytes [work/harness/game/WIZARDS.EXE]
74. GAME     Lair items ignore the stored item values: the value is passed as Item_Create_Prefab's KIND with no cost cap
            (6d36:0d59) - any prefab the wizard's books allow can appear. (Community patch 1.50 #134 clamps values.)
            In game (2026-10-23, tools/harness/regress.py 74): Item_Create_Prefab(kind 150, books, max_cost 0) = item
            2, cost 250 (lair value 150)
75. READ+asm Lair items won by an AI are created but never given to anyone (6d36:03bf); the records leak and the prefabs
            stay flagged in game. (Community fix IW040.)
            Static check (2026-10-24, tools/harness/regress.py 75): wizards/LAIR.C:170 holds the code; Lair_Enter =
            1.31 bytes [work/harness/game/WIZARDS.EXE]
76. GAME     Treasure retorts: Infernal / Divine Power and Famous go through the "expensive" branch, which has no Life /
            Death book check and no +10 fame (those checks sit in the cheap branch - dead code) (6d36:142b).
            In game (2026-10-24, tools/harness/regress.py 76): tries (new retorts, fame before, after, books): [([1],
            19, 19, [11, 0, 0, 1, 1]), ([6], 19, 19, [11, 0, 0, 1, 1])]; specials {6: 'Divine Power'}
77. GAME    Items_Screen_Award shows at most 6 items; Combat_End collects up to 18 hero items, the 7th+ are never shown
            or freed (6356:14bd). (Community patch 1.50 #291.)
            Re-checked (N221): ITEMSCR.C 616 header (6 queued, the rest dropped unfreed); the collectors hold
            items[18] (ATTACK.C 73, OVERSPL2.C ...).
            In game (2026-10-24, tools/harness/regress.py 77): records 2..10 cost after the battle {2: 1500, 3: 1500,
            4: 1500, 5: 1500, 6: 1500, 7: 1500, 8: 1500, 9: 1500, 10: 1500}; held by a hero / vault [2, 3, 5, 6];
            allocated and unowned [4, 7, 8, 9, 10]; the AI heroes (owner, x, y) {13: (-1, 30, 28), 50: (-1, 30, 28),
            121: (-1, 30, 28)}
78. GAME     AI hero re-equip: the staff/wand slot case falls through into the armour case (87aa:0705-0781): AI mage
            heroes get a shield/chain/plate in their weapon slot.
            In game (2026-10-23, tools/harness/regress.py 78): turn 107: wizard 4's mage hero slots [4, 6, 6] hold
            items [2, -1, -1] of types [7, None, None] (7 shield); wizard 4 casting now 6
79. GAME    Destroyed / sold prefab items never return: p_items_in_game is set on creation and never cleared.
            Re-checked (N221): HEROITEM.C 46 header: p_items_in_game not cleared when an item is freed.
            In game (2026-10-24, tools/harness/regress.py 79): boxes ['esc', 'esc', 'esc', 'award']; prefab marks set
            by the lair [163]; vault [2, -1, -1, -1]; item 2 "The Revenge of Orculs" (prefab 163) destroyed at the
            anvil: its record cost now -1, vault [-1, -1, -1, -1], prefab mark 1
80. SRC     Drowning guard may allow removing the hero's only Water Walking + Flight item over water (the item is
            still counted during the check, 6356:1579). Settled by reading Items_Removal_Allowed: the closing
            Hero_Item_Water_Walking / Hero_Item_Flight tests include the item being removed (ReMoM marks the same;
            clarified using ReMoM repo).
            Re-checked (N221): our source note at src/wizards/ITEMSCR.C:648 states it.
            Static check (2026-10-24, tools/harness/regress.py 80): wizards/ITEMSCR.C:648 holds the code;
            Items_Removal_Allowed = 1.31 bytes [work/harness/game/WIZARDS.EXE]
81. CHECKED Unit view: the Trireme (type 0x23) pays 1 food (real upkeep counts type > 0x22, 9ef8:08a3) but its view shows
            no food (5e1f:18bc type > 0x23).
            Static check (2026-10-24, tools/harness/regress.py 81): wizards/UNITVIEW.C:697 holds the code;
            Draw_Unit_Upkeep = 1.31 bytes; Units_Food_Upkeep_All = 1.31 bytes [work/harness/game/WIZARDS.EXE]
82. READ+asm Unit view hotkeys: X is registered with an empty handler (5e1f:0463); the down arrow uses "D" like Dismiss
            (PROVISIONAL: D may alternate between paging and the dismiss prompt).
            Static check (2026-10-24, tools/harness/regress.py 82): wizards/UNITVIEW.C:181 holds the code;
            Screen_Unit_View = 1.31 bytes [work/harness/game/WIZARDS.EXE]
83. SRC     Unit view: paging up on a non-hero list of 16 / 24 rows lands on an empty page (5e1f:243b); item #0 drawn
            without its aura (5e1f:1f42); Berserk units show a blank armour row; moves shown are maximum, never moves
            left, half moves not drawn; teleport/forester/mountaineer/merging all show the walking boot (dead test
            5e1f:1dcf).
            Re-checked (N221): UNITVIEW.C UnitView_Scroll_Abilities up from 0 on a non-hero: -8 -> count / 8 * 8 =
            count for 16 / 24 rows (empty page); Draw_Unit_Ability_List 950 'help > 0' (item 0 drawn as an empty
            slot); Draw_Unit_View 550 moves / 2 icons (half moves not drawn); UnitView_Move_Icon header 884 (the & 0
            test). Berserk's blank row = defense 0 drawn as no icons.
            Static check (2026-10-24, tools/harness/regress.py 83): wizards/UNITVIEW.C:887 holds the code;
            UnitView_Move_Icon = 1.31 bytes; Draw_Unit_Ability_List = 1.31 bytes; UnitView_Scroll_Abilities = 1.31
            bytes [work/harness/game/WIZARDS.EXE]
84. GAME    Chaos Surge: the loop over players always reads the HUMAN's Chaos Surge flag (9748:154c [0xa356], loop index
            unused): Chaos creatures get +2 only when the human has it, never when only an AI cast it.
            In game (2026-10-23, tools/harness/regress.py 84): Chaos Surge human 0 / wizard 1 1; unit 2 (race 18)
            battle melee 3 ranged 3, type melee 3 ranged 3
85. GAME    Weakness: the thrown-weapon test is ranged_type/10 == 100 (9748:2d4d cmp 0x64; should be 10): thrown attacks
            are never weakened.
            In game (2026-10-23, tools/harness/regress.py 85): unit 2 (type 45, thrown): ranged 3 -> 3, melee 7 -> 5,
            combat_enchantments 0x0 -> 0x0
86. GAME     Chaos Channels demon armour counts twice in combat: +6 defence instead of +3 (9748:2339 re-applies the
            mutations after Unit_Apply_Modifiers).
            In game (2026-10-22, tools/harness/regress.py 86): battle defence: 173 (demon skin) 15, 192 9 -> +6
87. READ+asm Unit view "Spell x N" line for non-hero magic shooters tests p_battle_units[UNIT TYPE] - a stale combat record
            (679a:0aaf).
            Static check (2026-10-24, tools/harness/regress.py 87): wizards/UNITABIL.C:257 holds the code;
            UnitView_Build_Abilities = 1.31 bytes [work/harness/game/WIZARDS.EXE]
88. READ+asm Display only: Mind Twist penalty drawn as a gold bonus box (9748:2c90); Shatter's lost attack never drawn
            (9748:2f0c); item powers Haste / Giant Strength / Merging never listed on the hero view, Wraith Form has no
            entry (they still work).
            Static check (2026-10-24, tools/harness/regress.py 88): wizards/UNITSTAT.C:754 holds the code;
            Battle_Unit_Combat_Modifiers = 1.31 bytes [work/harness/game/WIZARDS.EXE]
89. GAME    Crusade adds its +1 level twice to combat hit points: Battle_Unit_Max_Hits (9748:0c80) adds it to
            Unit.level, which for a normal living unit already holds it (Unit_Calc_Level, stored each turn by the
            experience step and at a Heroism cast); a unit at the level cap (8) only gets the second one.
            Re-checked (N221): UNITSTAT.C Battle_Unit_Max_Hits 251-252 adds Crusade's level (non-fantastic units) to
            p_units[].level; TURNUPD.C 1162-1168 stores Unit_Calc_Level each turn for normal living units, which
            includes Crusade's +1 (ECONOMY.C 755-757, types below Magic Spirit, not undead; capped at 8 at 760). Drop
            PROVISIONAL.
            In game (2026-10-22, tools/harness/regress.py 89): Dragon Turtle 161: hits per figure 17 in battle, type
            hits 15
90. SRC     Famous: every hero shows 0 upkeep on the unit view but is still charged - among heroes only Noble ones and
            the Chosen are free (Unit_Gold_Upkeep 9ef8:0653), while Hero_Ability_Bonus zeroes the shown upkeep for
            Noble OR Famous.
            Re-checked (N221): ECONOMY.C Unit_Gold_Upkeep: among heroes only Noble ones and the Chosen pay nothing
            (undead and fantastic units also pay 0); UNITSTAT.C Hero_Ability_Bonus sets bu->upkeep 0 for Noble or a
            Famous owner (the unit view's figure). Drop PROVISIONAL.
            Static check (2026-10-24, tools/harness/regress.py 90): wizards/ECONOMY.C:158 holds the code;
            Unit_Gold_Upkeep = 1.31 bytes [work/harness/game/WIZARDS.EXE]
91. GAME    Resistance is not clamped at 0 in combat (melee / ranged / defence are, 9748:2339): Mind Storm (-5), Black
            Prayer (-2), Darkness / True Light (-1) and Mind Twist (-1) can leave it negative. (Warp Creature's
            resistance warp sets it to 0, so it cannot.)
            Re-checked (N221): UNITSTAT.C Battle_Unit_Combat_Modifiers clamps melee / ranged / defense at 0 (965-970),
            not resist; Mind Storm -5 (933), Black Prayer -2 (905), Darkness / True Light -1 (849 / 875) and Mind
            Twist -1 (914) can make it negative. Warp Creature's resistance warp sets it to 0 (951-953), so it cannot.
            In game (2026-10-22, tools/harness/regress.py 91): unit 2 resistance 4 -> -1 after Mind Storm (defence now
            0)
92. GAME    Hero abilities scale with the stored level: Might / Agility / Blademaster / Arcane Power
            (Hero_Ability_Bonus 9748:1f72) read Unit.level, which includes an overland Heroism (Unit_Calc_Level), but
            a Heroism cast in combat (a combat enchantment) counts only as a minimum level 3 in the experience bonuses
            and hit points, not in those abilities.
            Re-checked (N221): UNITSTAT.C Hero_Ability_Bonus scales by p_units[].level, which holds an overland
            Heroism (Unit_Calc_Level; OVERCAST.C 617-619 at the cast, TURNUPD.C 1168 each turn); a combat-cast Heroism
            (combat_enchantments) is seen only as a minimum level 3 in Unit_Experience_Bonus (605-606) and
            Battle_Unit_Max_Hits (249-250).
            In game (2026-10-24, tools/harness/regress.py 92): hero 19 melee 7 before the cast, 10 after; battle
            combat_enchantments 0x01000000 (Heroism 0x01000000); at the Might line (reached): Unit.level 0,
            combat_enchantments 0x01000000
93. CHECKED Forge-and-smash mana exploit: the forge discount (Artificer 50% + Runemaster 25%, additive) is applied
            only to the mana you pay (94df:173e-1774 reduces the returned cost DS:c8f6), while the item keeps its full
            value (Item +0x22, reader I1 b8ad:09a5) and the anvil pays value/2 (6356:0d88 cost, cdq/sub/sar). With
            both retorts you pay 25% and get 50% back: +25% profit per item, i.e. mana income about equal to casting
            skill. COMMUNITY-KNOWN (MoM wiki "Artificer": "an item can be created and immediately smashed to gain
            actual profit").
            Static check (2026-10-24, tools/harness/regress.py 93): wizards/ITEMFORG.C:494 holds the code;
            Screen_Item_Forge = 1.31 bytes; Items_Break_Item = 1.31 bytes; Wizard_Begin_Casting = 1.31 bytes
            [work/harness/game/WIZARDS.EXE]
Dead code: 9748:2fbe Unit_Has_Spell_Enchant, aba4:108c (grant Artificer spells; only an overlay stub entry), 6cba:06f9
second Cloak of Fear test, 94df:0ae8 empty branch.

=== INFO SCREENS, ARMIES / CITIES LISTS (step 40; readers V1 64e7 advisors, V2 585e armies + 5767 cities) [INFO ...]
94. READ+asm Historian: the first point of each line reads power_history[0] instead of [start] (64e7:0d6f): after 24 years
            the left edge spikes; after turn 288 the newest sample (slot 287) is never drawn (64e7:0a0b); after scrolling
            the year ticks sit one month early (64e7:0995).
            Static check (2026-10-24, tools/harness/regress.py 94): wizards/ADVISORS.C:420 holds the code;
            Historian_Redraw = 1.31 bytes; Historian_Draw_Wizard_Line = 1.31 bytes [work/harness/game/WIZARDS.EXE]
95. READ+asm Astrologer + Historian name list show eliminated wizards (only "contacted" is tested, 64e7:10ae / 0ad5).
            COMMUNITY-KNOWN (patch W041FIX).
            Static check (2026-10-24, tools/harness/regress.py 95): wizards/ADVISORS.C:508 holds the code;
            Astrologer_Redraw = 1.31 bytes [work/harness/game/WIZARDS.EXE]
96. GAME    Historian keeps advancing during Time Stop (Wizard_Update_Power_Stats outside the Time Stop branch).
            COMMUNITY-KNOWN (W613FIX).
            Re-checked (N221): NEXTTURN.C: Wizard_Update_Power_Stats (138) runs after the 'time_stop_player == 0'
            block, every turn.
            In game (2026-10-22, tools/harness/regress.py 96): time_stop_player 1; turn 106 -> 107; power_history
            bytes changed: 1 (first [106])
97. SRC     Cartographer: dead "plane == 2" city test (64e7:1be3); neutral units never shown; clicking the map deselects
            the active stack.
            Re-checked (N221): ADVISORS.C Cartographer_Draw_Plane: neutral units skipped ('not shown'); the city test
            'plane == PLANE_BOTH' (whether any city has plane 2 not checked); Screen_Cartographer's grid click clears
            stack_unit_count.
            Static check (2026-10-24, tools/harness/regress.py 97): wizards/ADVISORS.C:699 holds the code;
            Cartographer_Draw_Plane = 1.31 bytes [work/harness/game/WIZARDS.EXE]
98. GAME    Opening the Cities list switches every own city/outpost producing "None" (0) to Housing (5767:0e40, producing
            +0x1c == 0 -> 2).
            In game (2026-10-22, tools/harness/regress.py 98): producing 0 on the map; screen 3 after the click;
            producing 2 on the Cities list
99. SRC     Armies list: units in the same Tower of Wizardry with different plane values form one row showing only one
            plane's units (585e:110b vs 1216); hovering the portrait of such a missing hero loops without bound
            (585e:10a7, asm-confirmed unbounded) - possible HANG. PROVISIONAL, needs an in-game test.
            Re-checked (N221): our source note at src/wizards/ARMYLIST.C:589 states it.
            Static check (2026-10-24, tools/harness/regress.py 99): wizards/ARMYLIST.C:590 holds the code;
            ArmyList_Scroll_To_Unit = 1.31 bytes; ArmyList_Build_Stacks = 1.31 bytes; ArmyList_Collect_Units = 1.31
            bytes [work/harness/game/WIZARDS.EXE]
100. SRC    Cities list: right-clicking the TOP row matches the exit test (5767:024c cmp di,-1 with right-click =
            -(id), first row = id 1, UI_Clear_Controls starts the ids at 1): an outpost in the top row shows its
            outpost screen and then returns to the overland map instead of the list (a city's production screen
            overrides the exit).
            Re-checked (N221): CITYLIST.C: UI_Clear_Controls sets ui_control_count = 1 and CityList_Add_Controls adds
            the rows first, so row 0 is control 1 and its right-click is input -1, the exit test; an outpost's
            Screen_Outpost runs with done already 1 (back to the map), a city's production screen overrides
            current_screen. Drop PROVISIONAL.
            Static check (2026-10-24, tools/harness/regress.py 100): wizards/CITYLIST.C:82 holds the code;
            Screen_Cities = 1.31 bytes [work/harness/game/WIZARDS.EXE]
101. SRC    Lists: after a unit is dismissed while scrolled to the bottom the last row can show a stale stack (585e:12e7);
            Cities scroll up 5 rows but down 1 when < 15 remain (5767:02bc); minimap dot read from an empty list
            (585e:1020 / 5767:0543); race-14 units (Trireme, Galley, Catapult, Warship) get a leading space in their
            name (empty race prefix).
            Re-checked (N221): CITYLIST.C CityList_Draw_Minimap and ARMYLIST.C ArmyList_Draw_Minimap read the
            highlighted entry with no count test; CITYLIST down: +5, else +1 near the end. The stale last row and the
            race-14 leading space not re-checked.
            Static check (2026-10-24, tools/harness/regress.py 101): wizards/ARMYLIST.C:575 holds the code;
            ArmyList_Draw_Minimap = 1.31 bytes; ArmyList_Calc_Visible_Rows = 1.31 bytes; CityList_Draw_Minimap = 1.31
            bytes [work/harness/game/WIZARDS.EXE]
Dead code: 585e:14c9 hyphenating print (thunk never called), 585e:0dbe whole-row controls never tested.

=== GAME MENU / SETTINGS / SAVE (step 42, read directly) ===
105. CHECKED Load_Game clears the hero-names block for a short (old-format) save with 0x221 bytes, but the block is 0x230
            (35 x 16): the last 15 bytes keep stale data (4558:07bf).
            Static check (2026-10-23, tools/harness/regress.py 105): wizards/SAVELOAD.C:155 holds the code; Load_Game
            = 1.31 bytes [work/harness/game/WIZARDS.EXE]
106. GAME    Settings: Esc leaves without writing MAGIC.SET, but every toggle was already applied to game_config in memory
            (a8fc:0303-032c), so "cancelled" changes stay in effect until the game is restarted.
            In game (2026-10-24, tools/harness/regress.py 106): strategic_combat 0 before, 1 after Esc; MAGIC.SET
            unchanged (466 bytes)
107. CHECKED The random number generator is reseeded from the timer on every load (Game_Init_State 45d6:01d2), so reloading
            a save does not repeat the same rolls (not a bug - matters for save-scumming and for an AI harness).

108. SRC     Conquest scream: sound 0x22 for portraits 2/9/11/13 (Sharee, Freya, Ariel, Kali), 0x23 for the rest; the table
            index is portrait - 2 (78ba:0b78), so Raven (portrait 1) gets 0x23 - if 0x22 is the female scream, Raven
            screams with the male voice. PROVISIONAL (sounds not listened to).
            Re-checked (N221): ENDGAME.C 379 header: SOUNDFX 34 for portraits 2, 9, 11, 13, else 35 (Raven is portrait
            1); which sound is which voice not checked (PROVISIONAL stays).
            Static check (2026-10-24, tools/harness/regress.py 108): wizards/ENDGAME.C:382 holds the code;
            Conquest_Anim_Load_Stage2 = 1.31 bytes [work/harness/game/WIZARDS.EXE]
109. CHECKED Final score turn bonus 2000 - 2 x turn has no floor (86ea:03e1): after turn 1000 it subtracts from the score.
            Static check (2026-10-24, tools/harness/regress.py 109): wizards/FINSCORE.C:5 holds the code;
            Final_Score_Redraw = 1.31 bytes [work/harness/game/WIZARDS.EXE]

=== FRONTIER PASS (step 44, read directly) ===
110. CHECKED AI area-damage targeting (Ice Storm / Fire Storm / Black Wind / Stasis): AI_Target_Area_Damage e318:6284
            measures the enemy stack distance from city / unit number <stack index> instead of the loop city / unit
            (e318:6331-636e: buildings tested with DI, distance with SI) - the "near my city" test uses the wrong city.
            Static check (2026-10-24, tools/harness/regress.py 110): wizards/AISPELL.C:2832 holds the code;
            AI_Target_Area_Damage = 1.31 bytes [work/harness/game/WIZARDS.EXE]
111. CHECKED AI Enchant Road targeting: AI_Target_Enchant_Road e318:6684 loops over the 5x5 area but never adds the loop
            offsets (e318:66d3-6724) - it tests the city tile itself 24 times.
            Static check (2026-10-24, tools/harness/regress.py 111): wizards/AISPELL.C:2980 holds the code;
            AI_Target_Enchant_Road = 1.31 bytes [work/harness/game/WIZARDS.EXE]

112. CHECKED AI Evil Presence targeting: AI_Pick_City_Spell_Target e318:4b49 requires the target city's owner to HAVE Death
            books (wizards[owner].spellbooks Death != 0) - inverted, since Evil Presence does nothing to Death wizards, so
            the AI only casts it where it is useless. COMMUNITY-KNOWN (W219FIX).
            Static check (2026-10-24, tools/harness/regress.py 112): wizards/AISPELL.C:2288 holds the code;
            AI_Pick_City_Spell_Target = 1.31 bytes [work/harness/game/WIZARDS.EXE]
113. CHECKED AI curse targeting tests Chaos Ward (city slot 11) for Earthquake as well as Chaos Rift / Call the Void
            (e318:4b49, spell list e318:4e51), although Earthquake is a Nature spell (Nature Ward = slot 9).
            COMMUNITY-KNOWN (W280AI).
            Static check (2026-10-24, tools/harness/regress.py 113): wizards/AISPELL.C:2288 holds the code;
            AI_Pick_City_Spell_Target = 1.31 bytes [work/harness/game/WIZARDS.EXE]
114. CHECKED AI Warp Node targeting (AI_Target_Warp_Node e318:56ab): picks the human (50%) or Random(hostile count) used
            directly as a wizard number instead of an entry of the hostile list 3f33:087e, then only nodes that are
            ALREADY warped (+0x2e bit 0 == 1, e318:5730-5738). COMMUNITY-KNOWN (W510AI "AI fails to target with Warp Node").
            Static check (2026-10-24, tools/harness/regress.py 114): wizards/AISPELL.C:2568 holds the code;
            AI_Target_Warp_Node = 1.31 bytes [work/harness/game/WIZARDS.EXE]
115. GAME    AI Word of Recall: Word_Of_Recall_Cast af2c:1e48 asks AI_Pick_Unit_Enchant_Target e318:4ef0 for a unit, but
            spell 47 is not in its table (e318:5240), so the AI's cast always finds no target (release build: returns
            0, no error). PROVISIONAL: whether the AI ever chooses Word of Recall was not checked. ReMoM audit (step
            46): a dedicated picker AI_Target_Word_Of_Recall_Unused 8cf2:2379 exists but has NO callers - the cast
            code asks the wrong picker (COMMUNITY-KNOWN: ReMoM names 8cf2:2379 AITP_Word_Of_Recall).
            Re-checked (N221): AISPELL.C 2404 header: Word of Recall is not in AI_Pick_Unit_Enchant_Target's list;
            OVERSPL3.C 833 asks it. Whether the AI picks the spell not checked (PROVISIONAL stays).
            In game (2026-10-23, tools/harness/regress.py 115): AI_Pick_Unit_Enchant_Target(kind 0, &unit, spell 47,
            caster 1) = 0
116. SRC     AI Spell Binding / Disjunction priorities (AI_Pick_Global_Enchant_Target e318:5773) of 200 and 250 are kept
            in signed chars (-56 / -6), so those enchantments lose to every positive priority. COMMUNITY-KNOWN (W238FIX).
            Re-checked (N221): our source note at src/wizards/AISPELL.C:2599 states it.
            Static check (2026-10-24, tools/harness/regress.py 116): wizards/AISPELL.C:2600 holds the code;
            AI_Pick_Global_Enchant_Target = 1.31 bytes [work/harness/game/WIZARDS.EXE]
117. CHECKED AI ships answering transport requests (AI_Ship_Orders ebda:0ee6): the capacity already on its way to a request
            is computed from unit number <request index> (ebda:0fa3 mov ax,di) instead of the moving ship, so requests
            are over- or under-served at random.
            Static check (2026-10-24, tools/harness/regress.py 117): wizards/AIUNITS.C:486 holds the code;
            AI_Ship_Orders = 1.31 bytes [work/harness/game/WIZARDS.EXE]
118. GAME    AI target list (AI_Collect_Landmass_Targets ebda:2270): an enemy fortress's defence is read from the threat
            map BEFORE its x/y are loaded (ebda:22bf-2330), i.e. at the previous fortress (first time: stack garbage).
            In game (2026-10-24, tools/harness/regress.py 118): fortress-loop reads (player, plane, i, the x / y the
            defence was read at, fortress i's x / y): 92, stale 92, e.g. [(1, 0, 0, (55, 0), (29, 27)), (1, 0, 2, (29,
            27), (4, 11)), (1, 0, 3, (4, 11), (14, 29)), (1, 0, 4, (14, 29), (48, 23))]; at the right square 0
119. GAME    Same function, city loop: the human x5/4 defence factor is applied when the CITY index is 0, not when the
            city belongs to the human (copy of the fortress loop, where the index is the player).
            Re-checked (N221): AIUNITS.C 985 header and line 1043: 'if (i == 0)' in the city loop (the city index).
            In game (2026-10-24, tools/harness/regress.py 118): city loop: x 5 / 4 branch for cities [0], plain branch
            for [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 20, 22, 23, 24, 25, 26, 27]; the human's cities [0, 3]
120. CHECKED AI landmass re-plan (AI_Replan_Landmass ebda:5b81): the plane argument (kept in DI) is overwritten with
            each own city's plane (ebda:5ca5) and each unit's plane (ebda:5e15), so own/foreign strength counts both
            planes' landmasses that share the number, and the status can be written into the other plane's table.
            COMMUNITY-KNOWN (W571FIX: 'various bugs in AI continent evaluation including a division by zero crash
            source' - its rewrite of AI_Replan_Landmass / AI_Landmass_Plan covers this; the division by zero is not
            traced here: the centroid division in AI_Replan_Landmass is guarded by count > 0).
            Static check (2026-10-24, tools/harness/regress.py 120): wizards/AIUNITS.C:2388 holds the code;
            AI_Replan_Landmass = 1.31 bytes [work/harness/game/WIZARDS.EXE]


121. GAME     Outpost growth (Outposts_Grow c751:207b) multiplies the growth chance by the difficulty table's outpost
            word (DS:0x1fec: Intro / Easy 100, Normal 150, Hard 200, Impossible 400 %) for EVERY outpost, the human's
            too: on harder levels the human's outposts grow up to 4x faster. COMMUNITY-KNOWN (ReMoM OGBUG note).
            In game (2026-10-23, tools/harness/regress.py 5): human outpost grow 138 -> 276 by the difficulty 3 table
122. GAME    Same function: the terrain-special bonus counts only mineral & 0xf (iron / silver +5, others +10); Wild
            Game (mineral flag 0x40) adds nothing to outpost growth. COMMUNITY-KNOWN (ReMoM OGBUG note).
            Re-checked (N221): CITYCALC.C Outposts_Grow: mineral & MINERAL_KIND_MASK only (iron / silver 5, else 10);
            the Wild Game flag never tested.
            In game (2026-10-23, tools/harness/regress.py 122): Cornwell outpost with Wild Game: grow 33 before the
            mineral loop, 33 after
123. READ+asm Surveyor / AI settler site value (City_Site_Evaluate c751:2bb6): Wild Game adds 2 to a sum kept in QUARTER
            food units (c751:2d9c, 2e71; Terrain_Food is x4), i.e. +0.5 food instead of +2, so the Surveyor's maximum
            population and the AI's site score undervalue Wild Game 4x. COMMUNITY-KNOWN (W528FIX 'Surveyor shows Wild
            Game wrong'; ReMoM OGBUG).
            Static check (2026-10-24, tools/harness/regress.py 123): wizards/CITYCALC.C:1174 holds the code;
            City_Site_Evaluate = 1.31 bytes [work/harness/game/WIZARDS.EXE]
124. READ+asm Same function: both its loops skip map row 0 (c751:2ca1 or di,di / jg; c751:318f jle) where every other
            city-area loop accepts y >= 0: for a site at y <= 2 the top-row tiles are left out of the Surveyor / AI
            estimate and of the coast test.
            Static check (2026-10-24, tools/harness/regress.py 124): wizards/CITYCALC.C:1178 holds the code;
            City_Site_Evaluate = 1.31 bytes [work/harness/game/WIZARDS.EXE]
125. GAME    Removing a city (Road_Remove c751:33d7, from City_Remove) sets its tile's cost on land movement maps 0-4 to
            2 (= 1 move point) whatever the terrain: a city razed on hills / mountains / forest / swamp leaves a tile
            that costs 1 MP for good (the cost maps are only built at world creation and are saved with the game).
            COMMUNITY-KNOWN as code (ReMoM City_Remove_Road), effect not noted there.
            Re-checked (N221): our source note at src/wizards/CITY.C:596 states it.
            In game (2026-10-23, tools/harness/regress.py 125): turn 107: Sunnydale removed; its square's costs [255,
            8, 8, 2, 8, 255] -> [2, 2, 2, 2, 2, 255] (mountain [255, 8, 8, 2, 8, 255])
126. GAME    City_Recalculate (9ef8:0000) stores food / production / gold / upkeep / research / power as BYTES (City
            +0x5d..0x64; e.g. 9ef8:016b mov byte ptr es:[bx+0x5d], al), and the AI difficulty scaling is applied to the
            stored byte and stored back the same way: any value of 256+ wraps mod 256. Readers take the byte unsigned.
            AI cities at Impossible (x400 %) lose everything above 255 once a base value reaches 64 (Hard x200: 128),
            e.g. production 70 -> 280 -> 24; the human only above 255 unscaled. No community patch found for it
            (Patches.zip searched). GAME 2026-10-17 (tools/harness/check_126.py, work/reports/check_126.txt): AI city
            Bremen (wizard 4) enlarged in a test copy (Dwarf, population 25, production buildings 15 / 31 / 33 / 34) and
            loaded at Intro (AI x100%) and Impossible (x400%): production 115 -> stored 204 (= 460 - 256), gold 83 ->
            stored 76 (= 332 - 256); upkeep, power, research, food below 256 scale correctly. The Impossible AI city
            produces LESS than at Intro.
            In game (2026-10-24, tools/harness/regress.py 126): production base 115  x400% =  460  -> stored at
            Impossible 204  WRAPPED (460 mod 256 = 204); gold       base  83  x400% =  332  -> stored at Impossible
            76  WRAPPED (332 mod 256 = 76)
127. GAME     Conquering a city (City_Change_Owner 4a3f:1099) removes only the OLD owner's enchantments: curses the
            conqueror himself had cast on it (Famine, Pestilence, Cursed Lands, Evil Presence, Chaos Rift ...) stay on
            his new city and keep costing him their upkeep. COMMUNITY-KNOWN (drake178 note in ReMoM).
            In game (2026-10-23, tools/harness/regress.py 127): City_Change_Owner(city 21, new owner 0); city owner
            now 0, Famine value 1; Map_Explore_Radius [30, 28, 0, 2]
128. GAME    Same function: the new owner (human) explores radius 2 around a conquered city whatever it holds - a
            conquered Oracle never reveals its larger radius (only City_Production_Step's completion does). COMMUNITY-
            KNOWN (W712FIX; drake178 note).
            Re-checked (N221): our source note at src/wizards/CITY.C:519 states it.
            In game (2026-10-23, tools/harness/regress.py 127): Oracle city captured: Map_Explore_Radius(x, y, plane,
            radius) = [30, 28, 0, 2]
129. SRC     City_Collateral_Damage (4a3f:1292) rolls every building with state > 0, which includes state 2 (already
            removed this turn, cleared only by Turn_Finalize_Sold_Buildings at the turn end): a second Earthquake /
            Chaos Rift / battle in the same turn can 'destroy' a building again and list it again; replaced buildings
            (state 0) are never hit.
            Re-checked (N221): our source note at src/wizards/CITY.C:562 states it.
            Static check (2026-10-25, tools/harness/regress.py 129): static fallback: wizards/CITY.C:562 holds the
            code; City_Collateral_Damage = 1.31 bytes [work/harness/game/WIZARDS.EXE] | play case NOT REACHED
            (2026-10-23 17:06): City_Try_Remove_Building calls (building, city, state at the call): [(6, 2, 1), (23,
            2, 1), (26, 2, 1), (32, 2, 1), (35, 2, 1)]; on state-2 buildings: 0 - no state-2 building left at the
            cast: the turn end (Turn_Finalize_Removed_Buildings) cleared them; needs two damage events in ONE turn
            (two battles at the city)
130. GAME     Turn report 'UNIT SPELLS DISSIPATED': Mana_Shortfall_Unit_Enchants (c3f5:12f3) logs the UNIT INDEX (as a
            byte) of each unit stripped of its enchantments, but TurnReport_Draw_Text (a9a3:0779) prints entry * 0x24 +
            0x19c, i.e. the name of the unit TYPE with that number: the list names wrong units. In the same function a
            test of mutation bit 0x80 (c3f5:13cf test ax,0x4000 after cwde) writes the byte back unchanged (c3f5:13f2) -
            a no-op where some flag was presumably meant to be cleared.
            In game (2026-10-24, tools/harness/regress.py 130): unit 1 (type 121) enchantments after the turn 0x0;
            report_unit_spells_lost [1] (count 1) - printed as the names of unit types [1]
131. GAME     Terrain re-tiling at the map seam: Terrain_Retile_3x3 (cbdf:0422) calls Terrain_Autotile for x-1 / x+1
            without wrapping; Autotile classifies the WRAPPED tile but writes at y*60 + x unwrapped (cbdf:0633 shl ax,1
            on [bp+6], no wrap): for a change at x = 0 the blend tile of (59, y) is written onto (59, y-1), at x = 59
            that of (0, y) onto (0, y+1) - turning e.g. ocean into land - and at the map corners outside the plane's
            array. Callers: Raise Volcano, Armageddon, Change Terrain, Gaia's Blessing, volcano decay. COMMUNITY-KNOWN
            (W612FIX 'no longer creates land tiles in the adjacent ocean'). Reach: continents never touch the seam (#203
            MAP SURVEY); only re-tiling at polar seam tiles (rows 1 / 38) or terraforming that reaches columns 59 / 0
            can trigger it.
            In game (2026-10-23, tools/harness/regress.py 131): terrain before -> after the cast: (0, 20) 162 -> 184,
            (59, 19) 0 -> 308, (59, 20) 165 -> 165, (59, 21) 0 -> 0
132. GAME     Ghost buildings: City_Production_Step (c3f5:0050) completes a building with state = 1 only when it was
            0xff (never built); any other state is INCREMENTED (c3f5:0239 inc al). City_Build_Options offers buildings
            in state 2 (sold / destroyed this turn), so one rebuilt (e.g. bought) before the turn ends becomes state 3:
            shown in the city, but every effect / upkeep / prerequisite test wants 1 or 0, Turn_Finalize_Sold_Buildings
            only clears 2, and it can never be offered again. COMMUNITY-KNOWN (W210FIX 'a destroyed building ... becomes
            a ghost building').
            In game (2026-10-22, tools/harness/regress.py 132): turn 107: Dracon Library state 3 (was 2); producing
            now 2
133. SRC     Spellbook lists are 13 paragraphs = 104 spell ids (Spellbook_Build 9a4b:026b Heap_Alloc_Front(p_scratch,
            0xd); Combat_Spellbook_Build Heap_Alloc_Back 0xd; ReMoM the same 13 PR), but Spellbook_Collect_Spells
            appends every known spell of the book's kind with no limit: a wizard who knows more than 104 overland (or
            combat) castable spells - possible after looting conquered wizards' libraries - writes past the block.
            PROVISIONAL: the effect depends on what follows in the scratch heap; not reproduced.
            Re-checked (N221): our source note at src/wizards/SPELLBK.C:242 states it.
            Static check (2026-10-23, tools/harness/regress.py 133): wizards/SPELLBK.C:255 holds the code;
            Spellbook_Build = 1.31 bytes [work/harness/game/WIZARDS.EXE]
134. READ+asm Hero spells: Combat_Spellbook_Build (9a4b:060d) reads a hero's own 4 spells as SIGNED chars (hero record
            +7..+10) and stops at the first value < 1: a hero spell with id 128+ (later Life, all Death and Arcane
            spells) reads negative, is never added, and ends the list. COMMUNITY-KNOWN (IW074, bytes 9a4b:0783-).
            Static check (2026-10-24, tools/harness/regress.py 134): wizards/SPELLBK.C:351 holds the code;
            Combat_Spellbook_Build = 1.31 bytes [work/harness/game/WIZARDS.EXE]
135. LATENT  Wizard_Begin_Casting (b8ad:08c4), AI branch of Enchant Item / Create Artifact: the AI's prefab item is made
            and parked in item slot 136-player and its cost stored as casting_cost_initial, but casting_cost_left is
            never set; it is reduced by an UNINITIALISED percentage (bp-8, never written: asm b8ad:0a1a / 0b29) of its
            stale value - after any finished spell 0 - and cost_left 0 then cancels the cast. Unreachable in play as far
            as read: AI_Pick_Spell_Category has no crafting category. (ReMoM papers over the same local with var_8 = 0.)
            Static check (2026-10-23, tools/harness/regress.py 135): wizards/SPELLCST.C:346 holds the code;
            Wizard_Begin_Casting = 1.31 bytes [work/harness/game/WIZARDS.EXE]
136. GAME    Spell Blast cost differs by caster: the human pays the target's invested mana casting_cost_initial -
            casting_cost_left (Screen_Wizard_Target be86:17a1), the AI pays the target spell's BASE cost -
            casting_cost_left (Overland_Cast_Spell ba2c, wizard-target case) - too much when the target has cost
            reductions (left starts below base), too little for a target's variable-power spell (initial above base);
            the AI's 'can afford' test uses the same figure.
            Re-checked (N221): CASTANIM.C 843 / 901 (human): casting_cost_initial - casting_cost_left; OVERCAST.C
            848-851 (AI): the target spell's base_cost - casting_cost_left, also the mana_reserve test.
            In game (2026-10-23, tools/harness/regress.py 136): wizard 1's Spell Blast: mana 5000 -> 3850 (paid 1150)
            by Overland_Cast_Spell+18F0 (BA2C:22B4); Armageddon base cost 1250: base - left = 1150, initial - left =
            1900; the human now casting 0
137. GAME     AI strength tables count dead units as enemies: AI_Build_Strength_Tables (d208:0cd7) puts every unit not
            owned by the AI into the enemy stack list / city threat (d208:1ae6, no owner test), including units killed
            or disbanded this turn (owner 0xff, removed only by Units_Compact at the end of Next_Turn). AI_Overland_Turn
            first resets their plane 0xff to 0, so they count on ARCANUS at their last x, y - e.g. the garrison units
            AI_Disband_Obsolete_Units just disbanded add threat to the AI's own Arcanus city. Allies are not excluded
            either. AI_Build_Threat_Map (f48f:3aab) adds them to the threat map the same way (owner -1 also indexes
            its pact table at [-1]).
            In game (2026-10-24, tools/harness/regress.py 137): unit 16 (owner, x, y, plane in the save (2, 7, 15,
            0)): AI_Build_Strength_Tables took it as an enemy for (player, owner, plane) [(1, -1, 0), (2, -1, 0)];
            AI_Build_Threat_Map added it for (player, plane, owner) [(1, 0, -1)]
138. SRC     Path cache: Path_Cache_Invalidate (d592:0bc6) only clears path_cache_index when it is > 0, so cache record
            0 (the first AI path stored) is never invalidated by Stack_Continue_GoTo - a stack whose cached path sits in
            record 0 can keep receiving that stale path from Path_Find's cache lookup.
            Re-checked (N221): our source note at src/wizards/PATHFIND.C:333 states it.
            Static check (2026-10-24, tools/harness/regress.py 138): wizards/PATHFIND.C:333 holds the code;
            Path_Cache_Invalidate = 1.31 bytes [work/harness/game/WIZARDS.EXE]
139. GAME     AI research choice: AI_Choose_Research (e318:0000) estimates each candidate's turns with
            Research_Bonus_Pct(player, REALM of the candidate) (e318:0135 pushes Spell +0x17) where a spell id is
            expected, so every candidate gets the bonuses of spell #realm (0 None, 1-5 = early Nature spells): Nature
            Mastery / Nature books count for all realms, the candidate's own Mastery / books and Conjurer never do.
            COMMUNITY-KNOWN (W651FIX jumps over the realm load, e318:012a).
            In game (2026-10-24, tools/harness/regress.py 139): AI_Choose_Research entered for players [1];
            Research_Bonus_Pct calls from it (player, argument) [(1, 5), (1, 0), (1, 0), (1, 5), (1, 5), (1, 0), (1,
            5), (1, 0)]; all callers (calls) {'Wizard_Magic_Income': 26, 'AI_Choose_Research': 8,
            'Research_Candidates_Sort': 6, 'Spellbook_Build': 12}; (candidate, its realm, the argument) [(202, 5, 5),
            (10, 0, 0), (12, 0, 0), (204, 5, 5), (206, 5, 5), (16, 0, 0), (207, 5, 5), (20, 0, 0)]; 8 telling (realm
            != id): argument = realm in 8, = the id in 0
140. READ+asm AI_Pick_Spell_Category (e318:09e5): in the 'has an attack-spell group' test the 14th term is cmp byte
            [player*0x4c8 - 0x5d81], 1 (e318:136f) - Wizard +0x3b5 = power_history[83], the Historian byte of turn 83 -
            where every other term reads p_ai_spell_groups[n] (0x9120); group 0x53 is never actually checked (it counts
            only if that history byte happens to be 1). COMMUNITY-KNOWN (W229AI: 'Historian data counts as having town
            curse spells').
            Static check (2026-10-24, tools/harness/regress.py 140): wizards/AISPELL.C:506 holds the code;
            AI_Pick_Spell_Category = 1.31 bytes [work/harness/game/WIZARDS.EXE]
141. READ+asm AI summon choice: AI_Pick_Summon (e318:1995) weights each known summon by (base cost / 10) squared, but
            the Storm Giant entry (DS:0xd39c, spell 0x41) is set (e318:1ad9) and never squared (the squaring run
            e318:1d3e.. goes 0xd39a -> 0xd39e): Storm Giant weighs 50 against e.g. 4225 for Djinn and 10000 for Sky
            Drake - the AI almost never summons it. No 1.31-specific community fix found (IW144 rewrites the
            priorities).
            Static check (2026-10-24, tools/harness/regress.py 141): wizards/AISPELL.C:655 holds the code;
            AI_Pick_Summon = 1.31 bytes [work/harness/game/WIZARDS.EXE]
142. READ+asm AI Transmute target: AI_Target_Transmute (e318:39ad) accepts a tile when mineral & 2, & 1 or & 3 is set
            (e318:3a6a / 3a89 / 3aa8 test) - BIT tests on the mineral NUMBER, so besides iron (1) and coal (2) it takes
            silver 3, gems 5, mithril 6, adamantium 7 and crysx 9. Transmute then turns the AI's own gems into coal and
            mithril into silver, and does nothing on adamantium / crysx (spell wasted). No community fix found.
            Static check (2026-10-24, tools/harness/regress.py 142): wizards/AISPELL.C:1689 holds the code;
            AI_Target_Transmute = 1.31 bytes [work/harness/game/WIZARDS.EXE]
143. GAME    AI casts globals it then throws away: AI_Drop_Bad_Globals (e318:4888) cancels its own Eternal Night unless
            Death is a main realm, Evil Omens when Life / Nature is, Chaos Surge unless Chaos is, Tranquility when Chaos
            is, Life Force when Death is - but AI_Pick_Global_Enchant / AI_Pick_Anti_Realm_Global choose those spells
            with no realm test (only 'known and not held'), so e.g. a Life / Chaos wizard can spend a whole cast on
            Tranquility and lose it the next turn (each turn anew). A mana reserve of 0 also drops every global at once
            (no upkeep check involved).
            Re-checked (N221): AISPELL.C 2235 header (the drops); AI_Pick_Anti_Realm_Global picks Nature's Wrath /
            Life Force / Tranquility / Evil Omens on 'known' alone, no realm test (AI_Pick_Global_Enchant not
            re-checked).
            In game (2026-10-23, tools/harness/regress.py 143): wizard 1 (primary realm Chaos), 1 turn changes: writes
            to globals.tranquility (old, new, writer, turn): [(0, 2, 'Overland_Cast_Spell+14FC (BA2C:1EC0)', 106), (2,
            0, 'AI_Drop_Bad_Globals+11E (E318:49A6)', 106)]
144. READ+asm AI Disenchant True / Area aimed at the human's units: AI_Target_Disenchant (e318:681f) picks the most
            expensive enchanted human unit on its home landmass into bp-8 (e318:6b57) but returns x / y / plane of unit
            [bp-6] (e318:6b8a..) - the node index, which is -1 on this path - i.e. of units[-1], the 32 bytes in front
            of the unit table: the spell goes to a garbage tile. No community fix found.
            Static check (2026-10-24, tools/harness/regress.py 144): wizards/AISPELL.C:3030 holds the code;
            AI_Target_Disenchant = 1.31 bytes [work/harness/game/WIZARDS.EXE]
145. READ+asm AI production choice, two index slips in AI_Wizard_Choose_Production (eab0:00e8): (a) the Trade Goods
            count tests city[param] (this city, eab0:0116 [bp+8]) inside the loop over all own cities, so it is 'all
            cities' when this city already makes Trade Goods and 0 otherwise - the Trade Goods chance (cities/8 - count)
            x 10 + 40 % is ~40 % for others and below 0 for a city re-choosing; COMMUNITY-KNOWN (IW149 'wrong index ...
            counting towns producing Trade Goods'). (b) the 'population < 5 -> Housing x2' test reads city[DI] where DI
            is the left-over loop counter = number of build options (eab0:05c6) - a random other city's size decides (as #4 in the Vizier copy); no
            specific community fix (IW153 rewrites the area).
            Static check (2026-10-24, tools/harness/regress.py 145): wizards/AIPROD.C:65 holds the code;
            AI_Wizard_Choose_Production = 1.31 bytes [work/harness/game/WIZARDS.EXE]
146. READ+asm AI_Stack_Embark (ebda:1ea4): the 'no own boat next to the stack' fallback that should give the units
            status 11 (AI_Order_Seek_Transport, ebda:2225-2268) loops only while the free boat capacity [bp-0x16] > 0 -
            but that counter starts at 0 (ebda:202b) and only grows when a boat WAS found, so the fallback never runs;
            mild in effect because a transport request for the rally point was already filed. (Also: a 3x3
            Tile_Is_Shore_Water scan whose result is discarded.)
            Static check (2026-10-24, tools/harness/regress.py 146): wizards/AIUNITS.C:876 holds the code;
            AI_Stack_Embark = 1.31 bytes [work/harness/game/WIZARDS.EXE]
147. GAME     AI_Unit_Dispatch (ebda:0000) calls AI_Release_Goto_Near_Weak_City(plane, player) with the plane argument
            [bp-2] pushed at ebda:0082 BEFORE it is set (ebda:008c, where it becomes the plane loop counter): the
            'release stacks heading next to a weakly held enemy city' check compares city planes with stack garbage -
            usually it matches no city and does nothing.
            In game (2026-10-24, tools/harness/regress.py 147): AI_Release_Goto_Near_Weak_City(plane, player) calls
            (with the caller) [(11923, 1, 'AI_Unit_Dispatch+8A (EBDA:008A)'), (11923, 4, 'AI_Unit_Dispatch+8A
            (EBDA:008A)')] (turn changed True)
148. GAME     AI_Disband_For_Upkeep (ebda:358e), mana loop: the weakest summoned unit is found with
            AI_Unit_Strength(unit TYPE) (ebda:380d push of Unit +5) where a unit index is expected, so the 'weakest'
            fantastic unit is chosen by the strength of whatever unit has that index; the gold / food loop is right (and
            counts heroes as normal units: they are killed, kind 0). Disbanded units get plane 0 afterwards (cf. #137).
            In game (2026-10-24, tools/harness/regress.py 148): wizard 1's fantastic units (index: type) {22: 164, 28:
            164, 36: 164, 41: 164, 51: 179, 56: 154, 61: 164, 71: 181, 77: 164, 108: 181, 156: 183, 166: 179, 190:
            183}; AI_Unit_Strength arguments from AI_Disband_For_Upkeep [154, 164, 179, 181, 183] (turn changed True);
            as types [154, 164, 179, 181, 183], as indexes []
149. GAME     AI attack pool: AI_Pool_Add_Strongest (ebda:3ef2) ranks the units a stack releases for attacks by
            AI_Unit_Strength(unit TYPE) ([bp-6] = Unit +5, ebda:3f35-3fa5) instead of the unit index - the 'strongest'
            units sent out (and the garrison's 5 kept back) are chosen by the strength of whatever unit has that index.
            Same slip as #148 (the by-type UnitType_AI_Strength exists and is used for lair guardians). COMMUNITY-KNOWN (W249FIX 'unit value evaluation with wrong parameter when splitting
            stacks').
            In game (2026-10-24, tools/harness/regress.py 149): AI_Unit_Strength calls from AI_Pool_Add_Strongest
            (argument, ranked unit, its ut local, its type) [(47, 2, 47, 47, 16298), (5, 13, 5, 5, 16298), (47, 73,
            47, 47, 16298), (49, 82, 49, 49, 16298), (60, 120, 60, 60, 16298), (8, 121, 8, 8, 16298), (49, 142, 49,
            49, 16298), (179, 166, 179, 179, 16298), (49, 171, 49, 49, 16298), (82, 82, 49, 49, 16870), (46, 34, 46,
            46, 16298), (46, 47, 46, 46, 16298)] (31 calls; turn changed True); return offsets (calls) {'3faa': 30,
            '41e6': 1} - the ranking loop's 3faa; ranking calls: argument = the unit's type in 30 of 30 telling calls
            (= the unit index in 0; 0 left out: index == type)
150. READ+asm AI settler site search: AI_Settler_Orders (ebda:4661) scores each candidate tile with
            City_Site_Evaluate(x, y, [bp-2], ...) (ebda:4911 push) - [bp-2] is never written in the function, so the
            site is evaluated on whatever plane number the stack holds (wrong plane, or tables read far out of range):
            the AI settlers' choice of city site is partly garbage. Fixed silently by the community (W448AI changes that
            push to [bp-0x38], ebda:4913 FE -> C8, inside 'improved AI settling decision').
            Static check (2026-10-25, tools/harness/regress.py 150): static fallback: wizards/AIUNITS.C:1832 holds the
            code; AI_Settler_Orders = 1.31 bytes [work/harness/game/WIZARDS.EXE] | play case NOT REACHED (2026-10-25
            20:59): settler unit 37 (owner, x, y, plane) (1, 56, 16, 1); City_Site_Evaluate from AI_Settler_Orders: 0
            calls in all, 0 for unit 37 (DI's record = its owner, type, square), their planes [], its up local [],
            first [] (turn changed True) - no site search ran for unit 37; AI_Settler_Orders(1, landmass) landmasses
            [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
            29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
            55, 56, 57, 58, 59, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
            26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
            52, 53, 54, 55, 56, 57, 58, 59]; AI_Order_Settle units []; AI_Settler_Tower_Target units []; unit 37 after
            (owner, type, order, x, y, plane) (2, 166, 0, 12, 10, 0)
151. SRC     AI_Engineer_Orders (ebda:4c28): (a) the 'stack can cross water' test reads p_ai_own_stacks[stack] +3 & 8 with
            the index of the per-landmass ai_stack table (a different table), so whether the nearest city must be on the
            same landmass is decided by an unrelated stack's flags; (b) 'nearest city' and the road target city ignore
            the OWNER - engineers walk to and build roads from / to enemy and neutral cities; road target = nearest city
            on the same landmass not yet road-connected to it.
            Re-checked (N221): our source note at src/wizards/AIUNITS.C:2025 states it.
            Static check (2026-10-24, tools/harness/regress.py 151): wizards/AIUNITS.C:1990 holds the code;
            AI_Engineer_Orders = 1.31 bytes [work/harness/game/WIZARDS.EXE]
152. READ+asm AI landmass re-plan (AI_Landmass_Plan f48f:2b22, every 27-45 turns): the step that releases units whose
            destination is no longer threatened reads p_threat_maps[DI] with DI = 2 left over from the preceding plane
            loop (f48f:2c9f) - the far pointer after the two threat maps, i.e. city_area_bits (DS:0x9c9c) - so an AI
            unit's orders are cancelled when the city-area bitmap WORD at (dest_y x 60 + dest_x) x 2 is 0, unrelated to
            any threat.
            Static check (2026-10-24, tools/harness/regress.py 152): wizards/AIORDERS.C:1125 holds the code;
            AI_Landmass_Plan = 1.31 bytes [work/harness/game/WIZARDS.EXE]
153. READ+asm AI expansion target: AI_Landmass_Plan (f48f:2b22) picks the expansion landmass point as the zero-threat
            tile of an unsettled (status 3) landmass with the smallest Map_Distance(tile, [bp-0xe], [bp-0x10]) +
            Random(20) (f48f:3346) - but [bp-0xe] / [bp-0x10] are first written later in the function (f48f:38f1, zeroed
            for the staging centroid), so the reference point is stack garbage: where AI settlers expand to is chosen
            relative to an arbitrary point. Also the search is skipped whenever the re-plan was forced by a threatened
            status-3 rally point ([bp-0x22] = 1).
            Static check (2026-10-24, tools/harness/regress.py 153): wizards/AIORDERS.C:1125 holds the code;
            AI_Landmass_Plan = 1.31 bytes [work/harness/game/WIZARDS.EXE]
154. GAME     Stale spell number 90 in the AI: AI_Choose_Attack_Landmass (f48f:3f47 cmp casting_spell, 0x5a) takes as
            its war target any wizard who is casting spell 90 = Fire Elemental (besides diplomacy status > 2);
            AI_Magic_Allocation (d208:0b82 cmp research_spell, 0x5a) switches to 70 % research / 10 skill / 20 mana
            while researching Fire Elemental; AI_Hostility_Replan (f978:12ac) sets hostility 3 (war) toward every
            contacted wizard while the AI ITSELF casts spell 90. All three look like a spell number left over from an
            older spell list (the Spell of Mastery tests, 0xd5, sit right next to them, so 90 is not a Mastery slip; the
            intent cannot be read from the code).
            Added 2026-10-21 (P2): the two casting_spell tests can NEVER be true in 1.31. Fire Elemental is combat-only
            (SPELLDAT.LBX castable 0xff, like Earth / Air Elemental). The human's overland book (SPELLBK.C mode 0)
            leaves castable -1 out, the AI's overland pickers (AI_Choose_Overland_Spell's categories) never return it,
            and the combat path parks a spell in casting_spell only for effect_type >= 17 (Fire Elemental: 0). Only
            the research_spell test is live. All three tests read naturally as Spell of Mastery tests (go hostile
            while casting it, target its caster, push research while researching it). Third-party reading: the
            community patch (gog/community_patch/WIZARDS.EXE) rewrites both casting tests in place to
            'cmp byte ptr [bx+9f1c], 0d5h' (Spell of Mastery; file 0xf1ed7 = AIORDERS.C, 0xf424e = AINEUTRL.C) and
            makes the research test's jne a jmp (0xcb673: the 70 / 10 / 20 block never runs). Likely intent (inference, 10/21; not
            provable from the code): total war against a wizard who starts the Spell of Mastery - the game's own
            DIPLOMSG.LBX lines 0x0a / 0x19 / 0x22 threaten exactly that ("cease casting the Spell of Mastery or I
            shall destroy you").
            In game (2026-10-24, tools/harness/regress.py 154): (research, skill, mana) % after the re-split:
            researching 90 (70, 10, 20); researching 19 (20, 10, 70)
155. QUIRK   Human asks a partner to declare war on another wizard (Diplo_Propose_Treaty 6ea7:084b, asm-checked): the
            code computes partner-to-target treaty status * 30 + 150 into a local (bp-6) and never uses it; the
            difficulty actually passed to Diplo_Proposal_Response is 150 + the partner's relation to the target. So an
            existing pact or alliance between the partner and the target does not make the request harder except through
            relation. Likely an unfinished design (status was meant to weigh in). Same function: the Break Alliance
            target list (6ea7:0615) needs only the partner to have met the target, not the human, unlike the war list
            (ReMoM transcribes the test as status != alliance; the asm tests == 2). COMMUNITY-KNOWN (IW042: add ax, 0x96
            becomes add ax, [bp-6], i.e. relation + status * 30 + 150).
            Static check (2026-10-23, tools/harness/regress.py 155): wizards/DIPLOSCR.C:464 holds the code;
            Diplo_Propose_Treaty = 1.31 bytes [work/harness/game/WIZARDS.EXE]
156. GAME     Expansion penalty counts the HUMAN's cities for every wizard: Diplo_Relation_Drift (7057:01ed) counts
            cities with owner == 0 inside the per-wizard loop, then applies the penalty (half size for an AI) to that
            wizard's relations with everyone it has met (no alliance). So once the human passes 3 x (land size + 1)
            cities, AI wizards also start hating EACH OTHER every other turn, by the human's city count; an AI's own
            sprawl never matters. COMMUNITY-KNOWN: W391DIPL (counts the outer wizard's cities).
            In game (2026-10-23, tools/harness/regress.py 156): count per wizard (i: count / own cities): 0: 14 / 14,
            1: 14 / 2, 2: 14 / 4, 3: 14 / 0, 4: 14 / 4
157. GAME    Army envy works backwards from the strategy guide: Diplo_Relation_Drift (7057:0170) takes, for each wizard
            whose army strength is below the human's, t = 50 x human / theirs and hits the relation by -10 when
            Random(100) >= t and Random(20) == 1. So the chance is about 2.5% per turn when the armies are nearly equal,
            falls to about 0.05% at 2:1 and is zero beyond; a wizard far weaker than the human is never upset. The
            official guide says the opposite (2:1 always triggers on the d20 roll). W061DIPL turns the event off for the
            human entirely.
            In game (2026-10-23, tools/harness/regress.py 157): wizard i: human army / theirs -> threshold: 1: 40 / 27
            -> 74, 2: 40 / 10 -> 200, 4: 40 / 13 -> 153
158. READ+asm Spell of Mastery's war roll tests the wrong argument: Diplo_Relation_Change (7057:0f3b) gives a 10%
            chance (Random(100) < 11) that the actor declares war on the observer when its LAST argument == 10. That
            argument is the message's spell / unit / city detail; the Spell of Mastery event is message 10 with argument
            0xd5, so it never triggers. Instead the roll fires when the detail happens to be 10: Earth Lore (spell 10,
            never a hostile city spell, so never), or unit index 10 / x coordinate 10 in the hostile unit-spell events
            (message 8, ba2c:0f99 and the bug #34 Black Wind path). So the caster of a curse on unit #10 has a 10%
            chance of declaring war on its owner. ReMoM marks the same line OGBUG (should be Spell of Mastery).
            Static check (2026-10-25, tools/harness/regress.py 158): static fallback: wizards/DIPLOACT.C:445 holds the
            code; Diplo_Relation_Change = 1.31 bytes; Overland_Cast_Spell = 1.31 bytes [work/harness/game/WIZARDS.EXE]
            | play case NOT REACHED (2026-10-24 11:25): Diplo_Relation_Change(amount, actor, observer, msg, city,
            msg_arg) calls []; Diplo_Declare_War calls []; Random calls from Diplo_Relation_Change (argument) [],
            diplo_test_mode 0; wizard 1's status to the human 0 (war 3), unit 10's owner after 1 - no relation change
            (the spell did not land)
159. GAME     Relation overflow: Diplo_Relation_Change adds the scaled amount to the relation as a byte (7057:0e11
            add al, then the -100..100 clamp), so a total below -128 wraps positive. Negatives are doubled when the
            observer's relation is 1 or more and doubled again for a Lawful observer, so a Lawful wizard with relation
            1..71 who sees the human start Spell of Mastery (-50 x 2 x 2 = -200) ends at relation + 56, capped to 65
            without an alliance: starting Spell of Mastery IMPROVES his mood. Same for an attack on a Lawful wizard's
            city (-40 -> -160) at relation 1..31. COMMUNITY-KNOWN: W384FIX (overflow in the relations variable).
            In game (2026-10-23, tools/harness/regress.py 159): Diplo_Relation_Change(amount, msg): relation before ->
            after: (-40, msg 9): 20 -> 65
160. GAME    Breaking a treaty rewards the breaker: Diplo_Break_Treaty(a, b) (7057:12a6) sets penalty -10 (pact) / -20
            (alliance), doubled if a (the BREAKER) is Lawful, then SUBTRACTS it: relation_bias[a][b] += 10/20 and, for
            an alliance, base_relation[a][b] += 20/40 (mirrored, clamped only below -100, so a base above 87 can wrap
            and land on -100). When the human breaks a pact from the Threaten menu (Diplo_Break_Treaty(0, partner)) the
            hidden bias the AI uses toward him in every later talk (wizards[0].relation_bias[partner]) goes UP. Every
            other wizard c gets relation_bias[c][b] -5 toward the victim's column. The visible relation does drop by
            Random(20). COMMUNITY-KNOWN: W070DIPL (adds instead of reduces), W390DIPL (Lawful tested on the wrong
            player); ReMoM marks the same lines BUG.
            Re-checked (N221): DIPLOACT.C Diplo_Break_Treaty: relation_bias[breaker][victim] -= penalty (negative),
            alliance base_relation -= penalty with only a < -100 clamp on a char (88 + 40 wraps to -128 -> -100);
            third wizards' relation_bias[i][victim] -= 5.
            In game (2026-10-23, tools/harness/regress.py 160): Diplo_Break_Treaty (pact, breaker 1 not Lawful):
            wizards[1].relation_bias[0] 0 -> 10 (by Diplo_Break_Treaty+9F (7057:1345))
161. LATENT  Diplo_Declare_War (7057:109c) lowers base_relation by 5 both ways with no floor; after enough wars between
            the same pair (from -100, the sixth) the byte wraps to about +126. COMMUNITY-KNOWN: W388FIX (no range check
            on starting relations at DoW).
            Static check (2026-10-23, tools/harness/regress.py 161): wizards/DIPLOACT.C:601 holds the code;
            Diplo_Declare_War = 1.31 bytes [work/harness/game/WIZARDS.EXE]
162. GAME    AI-vs-AI hostility runs only on the rare treaty roll: in AI_Diplo_Turn_AI_Vs_AI the calls
            Diplo_Break_Conflicting_Alliances, AI_War_Check (the need-for-war test) and AI_Border_Tension sit inside the
            same gate as the friendly roll (both fortresses alive, met, Random(15 - 2 x difficulty) == 1), while the
            human gets the hostile checks every turn. So AIs rarely break treaties or declare war on each other. The
            whole AI-vs-AI pass is also skipped while the human casts Spell of Return. COMMUNITY-KNOWN: W076DIPL (and
            W631FIX for the banished case).
            Re-checked (N221): DIPLOMSG.C AI_Diplo_Turn_AI_Vs_AI: Diplo_Break_Conflicting_Allies, AI_War_Check and
            AI_Border_Tension inside the Random(15 - 2 x difficulty) == 1 gate; the whole pass returns 0 under Spell
            of Return.
            In game (2026-10-23, tools/harness/regress.py 162): 3 turn changes: 2 AI_War_Check calls for AI-AI pairs
            [(4, 1), (4, 2)] (6 ordered pairs a turn)
163. GAME    Diplo_Break_Conflicting_Alliances (7057:0853) only fixes a conflict when the wizard allied to both warring
            sides has the LOWEST index of the three (its loops start the other two above it), and never involves the
            human. COMMUNITY-KNOWN: W452DIPL.
            Re-checked (N221): DIPLOACT.C Diplo_Break_Conflicting_Allies: i from 1, j and k from i + 1.
            In game (2026-10-23, tools/harness/regress.py 163): Diplo_Break_Conflicting_Allies: 4-1 / 4-2 / 1-2 (2, 2,
            3) at entry -> (2, 2, 3) after (2 alliance, 3 war)
164. SRC     AI_War_Check(target a, AI b) uses the HUMAN's war list in its two ally/quota rules (736d:0251), even when a
            is another AI: (1) b allied to some k with the HUMAN at war with k (status[0][k] == 3, not a's), 1/10 per
            call -> b moves to war with a; (2) difficulty >= 2 and the human has fewer wars than the difficulty level,
            relation[a][b] <= -31, no peace timer, Random(15) <= -relation/10 -> b moves to war with a. Meant for the
            human, but in the AI-vs-AI calls b breaks treaties with / declares war on an uninvolved AI. Rule (2) at the
            old 1-in-15 odds also makes AIs pile onto the human almost at once until the quota is met. COMMUNITY-KNOWN:
            W090DIPL (cases III and IV).
            Re-checked (N221): our source note at src/wizards/DIPLOTRN.C:129 states it.
            Static check (2026-10-24, tools/harness/regress.py 164): wizards/DIPLOTRN.C:131 holds the code;
            AI_War_Check = 1.31 bytes [work/harness/game/WIZARDS.EXE]
165. READ+asm AI allies never ask the human to join a war: AI_Ally_Pick_War_Request (736d:084c), called when an allied
            AI has nothing else to say, picks (1 in 10) a wizard it is at war with that the human has met and is not
            fighting, stores it in war_request_target (Wizard +0x22a), then clears the pending message (736d:08e4 mov
            [di-0x5fcc], 0) instead of queueing message 0x2f. Nothing else ever queues 0x2f for the human, so the whole
            'join my war' audience in Screen_Diplomacy_Incoming (accept -> war, refuse -> the AI breaks the alliance) is
            unreachable. COMMUNITY-KNOWN: W281DIPL ('AI can request a declaration of war from the allied player') adds
            it.
            Static check (2026-10-24, tools/harness/regress.py 165): wizards/DIPLOTRN.C:258 holds the code;
            AI_Ally_Pick_War_Request = 1.31 bytes [work/harness/game/WIZARDS.EXE]
166. GAME     AI treaty incentive gold is sized by POPULATION and paid from nothing: AI_Diplo_Propose_To_Human
            (7442:0534; same formula in AI_React_To_Offense 7442:071f) sets tribute_gold = ((population stat /
            (Random(3)+1) + game turn) / 25) x 25, where the population stat (Wizard +0x360) is city population in
            thousands / 10 - so the offer is about the game turn rounded down to 25, and 0 before turn ~25 (the '0 gold'
            offer). It is offered only by non-Maniacal/Ruthless wizards for a pact/alliance, when Random(100) <= 30 x
            human pop / AI pop, then 1 in 8, then 3 in 4 gold (else their first spell you lack).
            Screen_Diplomacy_Incoming pays it with Wizard_Add_Gold(human) and never takes it from the AI (like #49).
            COMMUNITY-KNOWN: W632FIX (0 gold offer), W077DIPL (#56).
            In game (2026-10-23, tools/harness/regress.py 56): wizard 1 pact offer The need for peace is great. I
            propose that we sign a Wizard's Pact so we can concentrate our forces., accepted at once (status after 1):
            human gold 1001 -> 1151, wizard 1 gold 410 -> 410 (tribute_gold 150 set, tribute_spell 0)
167. GAME     Moving a ship stack that needs no carrying leaves Go-To units behind: Stack_Build_Move_Group (5315:0bef)
            with an active transport outside a city asks Stack_Needs_Transport, which answers 'nobody' when the stack
            holds a Wind Walking unit (or every unit flies / swims). In that case every non-transport unit comes along -
            selected or not - EXCEPT units on a Go-To order (5315:0f16 cmp status, 3), which stay on the water tile.
            With land units aboard instead, capacity is UnitType +0x14 summed over the active transports; heroes do not
            use capacity, but the first unit left over stops the matching, so later heroes stay too; self-propelled
            units then come along, again not if on Go-To. COMMUNITY-KNOWN: W545FIX ('ships don't carry units set to
            Going').
            In game (2026-10-23, tools/harness/regress.py 167): after the move: {192: (30, 25), 173: (30, 25), 161:
            (29, 26)} (started on (29, 26))
168. GAME     Ships on a Go-To carry one unit more than their capacity: GoTo_Build_Group (5315:129d cmp carried,
            capacity; jg skip) takes a land unit while carried <= capacity, the click version Stack_Build_Move_Group
            (5315:0de6, jl) while carried < capacity. A Trireme-class boat with room for 2 thus carries 3 non-hero units
            on Go-To. (In the Go-To version heroes have no exception but are never counted either.) Related oddities in
            W479FIX (flying-ship stacks).
            In game (2026-10-23, tools/harness/regress.py 168): turn 107: human Triremes at {(32, 25): 1}; Barbarian
            Swordsmen near the start {(32, 25): 3} (start (29, 26), Go-To (32,25))
169. GAME    Go-To ignores the stack selection: Stack_Set_Order's Go-To case (54e2:088a, asm-checked) gives the order
            and destination to EVERY unit on the tile whose status is ready, done or already Go-To - including units the
            player deselected in the stack panel - and GoTo_Build_Group then moves all units with that destination
            together. Only units on patrol, road building, wait, casting or purify keep their orders. ReMoM has no
            selection test either (it transcribes the status tests as bit masks '& 4', '& 3', '& 0'; the asm compares
            for equality).
            In game (2026-10-23, tools/harness/regress.py 169): stack_units (unit, active) [(161, 0), (173, 0), (107,
            0)]; orders after the click (order, dest x, y) {107: (3, 25, 26), 161: (3, 25, 26), 173: (3, 25, 26)}
            (Done 4, Go-To 3)
170. SRC     Dispelling your own Flight or Water Walking over water ignores the unit's NATIVE movement:
            Unit_Dispel_Enchant_Confirm (7504:05b0; unit view, clicking an enchantment) on a water tile without a
            transport or Wind Walker in the stack keeps a unit losing Flight (hi bit 2) only if it can cross water
            (Water Walking / swim / sail type, water-walking item), and a unit losing Water Walking (lo 0x100) only if
            Unit_Can_Fly or a flight item says so. A natural flyer losing a cast Flight, or a natural swimmer (UnitType
            +0x18 bit 2/4) losing Water Walking, is warned 'This unit will die' and killed. Removing Wind Walking (hi
            bit 1) kills every stack unit that cannot fly or cross water, after the bits are cleared.
            Re-checked (N221): our source note at src/wizards/UNITFIG.C:325 states it.
            Static check (2026-10-24, tools/harness/regress.py 170): wizards/UNITFIG.C:328 holds the code;
            Unit_Dispel_Enchant_Confirm = 1.31 bytes [work/harness/game/WIZARDS.EXE]
171. GAME    Any move that ends on a tile where one of your transports still has moves puts EVERY non-transport unit of
            yours there on Patrol (status 1) and finished: Stack_Board_Transport (7b88:1a3d, after each Stack_Move) has
            no water test, so it also fires in a port city - the garrison and the arriving units are all sentried until
            reselected. (Its owner search also reads one entry past the moved list, '<=' at 7b88:1a8c; ReMoM writes
            '<'.)
            In game (2026-10-23, tools/harness/regress.py 171): hero 19 now at (29, 27); (order, finished) of 33 / 69:
            {33: (0, 1), 69: (0, 1)} -> {33: (1, 1), 69: (1, 1)} (1 = Patrol)
172. GAME     Attacking a treaty partner names the VICTIM as the treaty breaker: Overland_Attack (7d45:0361) calls
            Diplo_Break_Treaty(defender, attacker) after the human confirms 'You have a treaty with X. Do you still wish
            to attack?'. So the breaker-side effects of #160 (bias / base-relation changes, the Lawful doubling) are
            applied with the roles swapped, and 'everyone else -5' lands on the attacker's column instead of the
            victim's. The relation hit itself (-40, message 5) is on the right side. COMMUNITY-KNOWN: W390DIPL (swaps
            the two pushes here).
            In game (2026-10-23, tools/harness/regress.py 172): Diplo_Break_Treaty(breaker 1, victim 0) when the human
            attacked wizard 1
173. GAME    Chaos Ward and Death Ward corrupt the moving stack's unit list: City_Ward_Check (7dfd:08d6, 7dfd:09b5 mov
            [bx+di], 0xffff) overwrites the list entry of every Chaos-realm (race 0x12) or Death-realm (0x14) creature
            with -1 when the stack's path reaches a city with that ward. The list is the caller's own array
            (Stack_Move's units, from Stack_Move_Click / Stack_Continue_GoTo), so everything after it -
            Path_Walk_Check's Go-To clearing, Stack_Move's move deduction, Stack_Board_Transport, Stack_Move_Click's
            'done' loop - works on p_units[-1], reading and writing the 32 bytes before the unit array, while the real
            creature is never updated. Its Go-To is therefore never cleared and the next-unit loop retries the move
            forever: the cause of the lock-up the MoM wiki reports for Spell Ward ('the move order does not appear to be
            cancelled... over and over'). The other three wards do not touch the list; for them the order is cleared in
            Path_Walk_Check. GAME 2026-10-17 (tools/harness/check_173.py, work/reports/check_173.txt): human Hell Hounds
            (Chaos, type 155) on Go-To into the human's own Dracon with Chaos Ward: after Done on the other stack the
            message 'A Chaos Ward prevents your troops from entering the city' appears and comes back after every click
            (each click consumed by the game within 0.25 s; 6+ tries), the Hounds keep status 3 / dest / full moves, W /
            D / N change nothing - the player is stuck. Contrast with Sorcery Ward + Phantom Beast (Sorcery): blocked
            once, Go-To cleared (status 0, dest 0), the game goes on. Control without a ward: the Hounds walk in. (The
            32 bytes before the unit array did not change in this run, so the p_units[-1] accesses did not alter them
            here.)
            In game (2026-10-24, tools/harness/regress.py 173): Chaos Ward + Hell Hounds (probe, status, dest)
            [('after D', 3, (29, 27)), ('after W', 3, (29, 27)), ('after D', 3, (29, 27)), ('after N', 3, (29, 27))];
            Sorcery Ward + Phantom Beast [('after D', 0, (0, 0)), ('after W', 0, (0, 0)), ('after D', 0, (0, 0)),
            ('after N', 0, (0, 0))]; the 32 bytes before p_units unchanged
174. GAME     AI stacks of exactly 9 units can never plane-shift: Stack_Can_Plane_Shift (81df:0d24 cmp count, 9; jl)
            requires FEWER than 9 units on the source tile, while the destination test allows up to 9 combined
            (81df:0d6e, jle). Used only by the AI's plane-shift orders (AI_Plane_Shift_Stacks,
            AI_Stack_Order_Plane_Shift); the human's plane button is separate code. COMMUNITY-KNOWN (W593FIX: the limit
            compare at 81df:0d27 becomes < 10).
            In game (2026-10-23, tools/harness/regress.py 471): units kept / their planes after the turn (1 Myrror, 0
            Arcanus): Wraith Form (4, [1, 1, 1, 1]), Water Walking (4, [0, 0, 0, 0]), nine Water Walking (9, [1, 1, 1,
            1, 1, 1, 1, 1, 1])
175. LATENT  Planar Travel into a warded city checks the wards against garbage: Planar_Travel_Dest_Check (51b2:0d2e,
            asm-checked) calls Path_Ward_Blocked(city, &count, list) with its local count (bp-2) and list (bp-0x1c)
            never set on that path - they are filled only in the non-city branch. So whether a Spell Ward stops a Planar
            Travel stack depends on stack leftovers instead of the travelling units (which are in stack_units), and a
            Chaos / Death ward can write -1s over the frame (#173). (Human plane button only.)
            Static check (2026-10-23, tools/harness/regress.py 175): wizards/MAPUNITS.C:491 holds the code;
            Planar_Travel_Dest_Check = 1.31 bytes [work/harness/game/WIZARDS.EXE]
176. SRC     Road building's first tile counts engineers that do not work: Screen_Road_Building (5b8b:0000) sums
            road_engineer_power over EVERY unit of the selected stack (deselected and finished ones too), and
            Units_Order_Build_Road divides the first tile's Road_Build_Turns by it, but only the active engineers with
            moves are ordered (RoadScr_Collect_Engineers). With one of two Engineers deselected, the ordered one builds
            its first tile in half the time; later tiles use the moving group's real power (Stack_Move). The panel's
            turn estimate (RoadScr_Plan) uses the same inflated power. Same flaw in the mover itself (asm
            7b88:01eb-0239): Stack_Move's road mode sums UnitType +0x16 engineer power over every unit of the moving
            group without testing for a road order (status 2); whether a group can hold an engineer without the order is
            PROVISIONAL. COMMUNITY-KNOWN (IW047 adds the status == 2 test there).
            Re-checked (N221): our source note at src/wizards/ROADSCR.C:450 states it.
            Static check (2026-10-24, tools/harness/regress.py 176): wizards/MOVESTK.C:89 holds the code; Stack_Move =
            1.31 bytes; Screen_Road_Building = 1.31 bytes [work/harness/game/WIZARDS.EXE]
177. GAME    The Gift event gives AI wizards nothing and leaks the item: Event_Roll creates the item at once
            (Item_Create_Prefab(2, ...)), but Events_Process (6ad6:0947) only hands it over through Items_Screen_Award
            when the human is the receiver; for an AI the 'X was given the <item>' message is shown and the item record
            stays allocated with no owner for the rest of the game. COMMUNITY-KNOWN (wiki Event page: computer wizards
            'do not actually receive the items' before 1.50). COMMUNITY-KNOWN (W516FIX: 'AI cannot receive items from
            gift events').
            Re-checked (N221): our source note at src/wizards/EVENTGEN.C:371 states it.
            In game (2026-10-24, tools/harness/regress.py 177): gift to wizard 1: {'gift': 0, 'cost': 1500, 'held':
            False}; to the human: {'gift': 0, 'cost': 1500, 'held': True}
178. GAME    Plague can GROW a size-1 town: Events_Process (6ad6:0947) ends a running Plague as soon as the town's
            population is below 2 and then sets it to 2. Plague itself never takes a town below 2 (it removes 1000 only
            while the size is above 2, when Random(10) < size), so this fires only when the plague started in a size-1
            town - Event_Pick_City has no size test - which then gains a pop on the plague's second turn.
            In game (2026-10-22, tools/harness/regress.py 178): turn 107: Naples population 2, plague state 0
179. SRC     Hero hiring prices: Screen_Hire_Hero (aab2:0574) prices a hero at cost + level x cost / 4 and offers it
            only if the human can pay that FULL price, halving it for Charismatic only afterwards - so a Charismatic
            wizard who could afford the halved price never sees the offer (COMMUNITY-KNOWN: IW098, same for mercenaries
            in Mercenary_Offer_Roll). The AI (AI_Hire_Hero aab2:0e65) pays the base UnitType cost only, with no level
            surcharge, Charismatic-halved, when that cost is at most 90% of its gold. An unaffordable or
            rejected paid offer raises the hero's level by 1 (to at most 4) before it is dismissed, so it returns
            stronger.
            Re-checked (N221): HIRE.C 291-292: the full price (cost + level x cost / 4) tested against the human's
            gold, Charismatic halving at 301 afterwards; an unaffordable hero gets +1 level (below 4); AI_Hire_Hero
            497-501: the base cost, halved, against 90 % of the gold.
            Static check (2026-10-24, tools/harness/regress.py 179): wizards/HIRE.C:252 holds the code;
            Screen_Hire_Hero = 1.31 bytes; AI_Hire_Hero = 1.31 bytes [work/harness/game/WIZARDS.EXE]
180. LATENT  A combat summon cast when the battle is full becomes a ghost unit: Combat_Cast_Spell creates the creature
            with Unit_Create(..., plane 9) first and only then calls Combat_Summon_Add_Unit (7eb0:1744), which silently
            does nothing when all 36 battle slots are taken and none holds a dead combat-only summon. The summon
            animation then plays on the last battle unit, and the new Unit record stays in the unit table on 'plane 9'
            at (0, 0) after the battle: nothing removes plane-9 units outside the battle list (Combat_Retreat_Resolve
            only scans battle units), so it keeps costing its owner upkeep. Needs 36 living / non-summon slots, e.g. two
            full stacks plus many surviving combat summons. COMMUNITY-KNOWN (W556FIX: 'crash / ghost unit creation when
            a new combat unit is summoned that makes the total units including dead exceed 36').
            Static check (2026-10-24, tools/harness/regress.py 180): wizards/COMBTURN.C:780 holds the code;
            Combat_Summon_Add_Unit = 1.31 bytes [work/harness/game/WIZARDS.EXE]
181. GAME     Auto-resolve battles can end with an undefined winner: Combat_Strategic (888b:00c9, the strategic combat used
            for every battle without the human or with tactical combat off) only assigns its winner variable (bp-2,
            never initialised in the prologue) when one side's attack total is still above 10 after the rounds
            (888b:11dc attacker, 888b:123a defender). If both totals end at 10 or below - two weak stacks, or both
            dropping together - the winner is whatever was left on the stack: every battle unit not owned by that value
            is marked dead (status 4), and Combat_End / the return value use it too. PROVISIONAL until GAME-checked.
            In game (2026-10-24, tools/harness/regress.py 181): at the winner test: att_attack 0, def_attack 0, winner
            (uninitialised local) 11605; after the kill loop winner 11605, battle units [{'unit_index': 2, 'owner': 1,
            'status': 4}, {'unit_index': 1, 'owner': 0, 'status': 4}]
182. GAME    Auto-resolve wizard-magic values (Combat_Strategic 888b:0816..): each realm's books SET (not add) up to three
            per-side channels - Nature 50/10/25, Sorcery 75/-/25, Chaos 100/30/-, Life -/15/40, Death 75/-/15 per book -
            so for a multi-realm wizard the last realm in that order wins each channel. The attacker's realms are zeroed
            in node battles (Combat_Terrain_Kind 2-4), the defender's never. In the melee rounds the toughness term
            reads the second channel instead of the third (888b:0f77 / 0f86 both [bp-0x50]; the missile rounds use
            [bp-0x54]), so Chaos wizards gain melee toughness and Life wizards lose most of theirs.
            In game (2026-10-24, tools/harness/regress.py 182): stop at the missile round; books [2, 0, 3, 4, 0];
            channels (damage, percentage, healing) after the realm loop (30, 6, 8); budget 60
183. SRC     Dead units fight again in auto-resolve: Combat_Strategic (888b:00c9) takes every unit on the target tile whose
            owner differs from the attacker's - dead ones too (owner 0xff, turned into battle owner 6) - and adds them
            to the DEFENDER's toughness / attack totals. Killed units normally sit on plane 0xff, but AI_Overland_Turn
            resets that to 0 (see #137), so during the AI turn the dead of an earlier battle on an Arcanus tile join a
            later battle there. combat_defender_player is set from each such unit in turn (scanning down), so when a
            dead unit has the lowest index it ends as -1: the defender's magic is then read from wizards[-1] and the
            result goes to Combat_End for player -1. PROVISIONAL.
            Re-checked (N221): COMBAUTO.C Combat_Strategic 144-153: every unit on the square not the attacker's, owner
            PLAYER_NONE rewritten to PLAYER_NO_WIZARD (6); combat_defender_player = the last one scanned (lowest
            index); the 'no wizard' mark compares battle owners with -1 and so never hits them; they add to def_tough
            / def_attack (205-219). OUR HEADER (COMBAUTO.C 67) said that side is out of the fight - corrected. The
            plane reset (#137) and wizards[-1] parts not re-checked (PROVISIONAL stays).
            Static check (2026-10-24, tools/harness/regress.py 183): wizards/COMBAUTO.C:71 holds the code;
            Combat_Strategic = 1.31 bytes [work/harness/game/WIZARDS.EXE]
184. READ+asm Healing a multi-figure unit that revives a figure can grant it extra hit points: Battle_Unit_Heal
            (888b:139a) revives figures while the healed amount exceeds the front figure's damage, leaving the leftover
            as the revived figure's damage (local, then front_damage) - and then (888b:155d..) treats that same POSITIVE
            leftover like Life Steal overflow: when it is at least the unit's figure count, heal_overflow (+0x32) grows
            by leftover / figures, which Battle_Unit_Max_Hits adds to every figure's maximum hits for the rest of the
            battle. E.g. War Bears (2 figures x 8) that lost a figure and regenerate 1: the revived bear has 7 damage,
            and the unit gains +3 hits per figure. COMMUNITY-KNOWN (W113FIX, bytes 888b:1538-1547: 'grants extra hearts
            and heals more than needed'). In Life Steal (overflow) mode the heal is not capped at the recoverable
            damage, so it can also revive figures killed by irrecoverable damage (W700FIX; per the function's own cap
            rule, not traced further).
            Static check (2026-10-24, tools/harness/regress.py 184): wizards/COMBAUTO.C:487 holds the code;
            Battle_Unit_Heal = 1.31 bytes [work/harness/game/WIZARDS.EXE]
185. READ+asm A hasted shooter's second shot tests the wrong unit: in Combat_Exchange's ranged path (a22c:040c) the
            'magical ranged attack?' test reads the ranged type of battle unit SI, which is the leftover loop counter
            (always 3), not the shooter (DI). So the second shot of a Haste'd unit (combat_flags 0x800) pays 3 spell
            points (needing more than 6) when battle unit #3 happens to have a magical ranged attack or the shooter is a
            caster, and otherwise one ammo (needing more than 1) - for a magic-ranged non-caster that depends on what
            unit #3 is, not on its own attack. COMMUNITY-KNOWN: W744FIX ('Ranger and Elven Archer heroes sometimes use
            MP to shoot when Hasted').
            Static check (2026-10-24, tools/harness/regress.py 185): wizards/COMBRES.C:185 holds the code;
            Combat_Exchange = 1.31 bytes [work/harness/game/WIZARDS.EXE]
186. READ+asm Blur is checked against the wrong unit and rolls too few times: Attack_Resolve (a22c:12e6 / 131e) lets a
            side's Blur cancel hits unless the BLURRED unit itself has illusion immunity (+0x18 bit 8, e.g. True Sight)
            - an attacker with True Sight is still fooled - and the cancel loop runs 'for i < hits: if d10 == 10 then
            hits--', so every cancelled hit also shortens the loop and skips another roll. COMMUNITY-KNOWN: W156FIX
            (both).
            Static check (2026-10-24, tools/harness/regress.py 186): wizards/COMBRES.C:333 holds the code;
            Attack_Resolve = 1.31 bytes [work/harness/game/WIZARDS.EXE]
187. GAME    Melee to-defend bonuses count twice: Attack_Resolve subtracts the defender's block bonus (BattleUnit
            block_bonus: Lucky, Prayer, High Prayer...) from the attacker's to-hit in melee AND passes it to Roll_Blocks
            as the defender's block chance. COMMUNITY-KNOWN: IW081.
            Re-checked (N221): COMBRES.C Attack_Resolve 396 (to_hit - block_bonus) and 490 / 528 (Roll_Blocks(shields,
            block_bonus)); also Combat_Unit_Attack 965.
            In game (2026-10-24, tools/harness/regress.py 187): the Wolf Riders' melee strikes on unit 2 (counter
            flag, to_hit): on the Lucky defender (block_bonus 1) [(1, -1, 1), (1, -1, 1), (1, -1, 1), (1, -1, 1)],
            Roll_Blocks to_block [0, 1]; on the control (block_bonus 0) [(1, 0, 0), (1, 0, 0)], to_block [0];
            compared: the first counter strikes
188. GAME    Immolation fires on every attack kind: Attack_Resolve runs the Immolation damage (abilities2 bit 8 ->
            Spell_Damage_Roll(0x60)) before testing whether the attack is melee, so ranged, thrown and breath attacks of
            an immolated unit burn too; and specials inside the per-figure loop (touch attacks, Dispel Evil, Stoning /
            Death Touch, Life Steal, Destruction) are skipped entirely when the main attack strength is 0. COMMUNITY-
            KNOWN: W154FIX, W153FIX.
            Re-checked (N221): COMBRES.C Attack_Resolve 411: Immolation's Spell_Damage_Roll inside a test that any
            non-melee kind passes; the touch / Dispel Evil / Stoning / Death Touch / Life Steal / Destruction rolls
            inside 'if (points > 0)' (427).
            In game (2026-10-24, tools/harness/regress.py 188): the bowmen (battle unit 0, abilities2 0x8: Immolation
            0x8) shoot unit 2 (battle unit 1); calls in order [('Attack_Resolve', 0, 1, 2, 0), ('Spell_Damage_Roll',
            96, 1, 4)]
189. READ+asm A Righteousness ITEM only half works: Resist_Bonus gives +30 resistance against Chaos / Death from the
            unit's, combat and item enchantments, but Defender_Shields (a22c:1791 / 17b0) makes the unit immune to Chaos
            / Death ranged attacks only for a cast Righteousness (unit or combat enchantment) - the item bits (+0x2e)
            are not OR-ed in there, unlike Bless just above. COMMUNITY-KNOWN (W694FIX: 'Righteousness item power does
            not work against ranged attacks').
            Static check (2026-10-25, tools/harness/regress.py 189): static fallback: wizards/COMBRES.C:558 holds the
            code; Defender_Shields = 1.31 bytes [work/harness/game/WIZARDS.EXE] | play case NOT REACHED (2026-10-24
            08:58): Defender_Shields vs a fire (Chaos) shot: with the item (hero item_enchantments 0x40000000) None =
            None; with the cast None = None - a shot was not caught
190. SRC     Shooting at a city wall uses different ammo rules from shooting at a unit: Combat_Unit_Attack (a22c:1da4)
            charges 3 spell points for a magical ranged attack by a hero OR a caster when the target is a unit (ranged
            disabled below 3 points), but for a wall shot (target 99, Wall Crusher) only heroes pay spell points - non-
            hero casters such as Magicians pay one ammo instead - and a hero's magic ranged attack is disabled below 5
            points instead of 3.
            Re-checked (N221): COMBRES.C Combat_Unit_Attack: unit target 825-831 (hero or ABILITY_CASTER, magic class:
            3 points, disabled below 3), wall 861-867 (hero only: 3 points, disabled below 5; others 1 ammo).
            Static check (2026-10-24, tools/harness/regress.py 190): wizards/COMBRES.C:761 holds the code;
            Combat_Unit_Attack = 1.31 bytes [work/harness/game/WIZARDS.EXE]
191. GAME    Cloak of Fear works backwards on the attack: Combat_Exchange takes Cloak_Of_Fear_Count(attacker, defender)
            - the defender's figures that fail to resist the ATTACKER's fear - and subtracts it from the ATTACKER's own
            striking figures (both the First Strike and the normal strike), while the same count correctly reduces the
            defender's counter. A defender's Cloak of Fear never affects the attacker. COMMUNITY-KNOWN: IW079 ('Cloak of
            Fear affects user not enemy').
            Re-checked (N221): COMBRES.C Combat_Exchange 270 / 303: Cloak_Of_Fear_Count(attacker, defender) taken from
            the attacker's striking figures; 289 the same count off the defender's counter; never
            Cloak_Of_Fear_Count(defender, attacker).
            In game (2026-10-24, tools/harness/regress.py 191): Cloak_Of_Fear_Count(Spearmen with the cloak, Wolf
            Riders) calls (site, return IP, result, (Spearmen, Wolf Riders figures)): [('Combat_Exchange+56C
            (A22C:089E)', '089E', 0, (7, 4)), ('Combat_Exchange+647 (A22C:0979)', '0979', 4, (7, 4))]; the attacker-
            strike site 0979 results [4]
192. SRC     First Strike attackers can strike with figures already killed by a gaze: in the First Strike branch
            Combat_Exchange counts gaze casualties as the sum over the three damage buckets of (bucket / hits per
            figure), each rounded down, and ignores the damage the front figure already had - the normal branch uses
            (gaze damage + front damage) / hits. A front figure finished off by the gaze (or damage split across
            buckets) still strikes first. COMMUNITY-KNOWN: W746FIX ('First Strike figures slain by Doom Gaze sometimes
            still participate in melee').
            Re-checked (N221): COMBRES.C Combat_Exchange 271-272: feared += dmg_att[i] / hits per bucket, no
            front_damage; normal branch 304-305: (att_total + front_damage) / hits.
            Static check (2026-10-24, tools/harness/regress.py 192): wizards/COMBRES.C:192 holds the code;
            Combat_Exchange = 1.31 bytes [work/harness/game/WIZARDS.EXE]
193. READ+asm Combat spells read the target's combat and item enchantments from a random battle unit: Combat_Cast_Spell
            (8a20:1ae4 / 1afe) ORs the target's Unit enchantments with combat_enchant (+0x3a/+0x3c) and item_enchant
            (+0x2c/+0x2e) of battle unit [bp-4] - a local that is never set at that point - instead of the target (SI).
            These merged bits decide Righteousness's protection from Chaos / Death curse effects (effect-type branch
            8a20:c321) and the lo-0x4000 exemption for spells 0x40 / 0x86, so a cast or item Righteousness on the target
            may not protect it, and some other unit's can. COMMUNITY-KNOWN (W603FIX: 'Banish and Dispel Evil does
            nothing for no reason at all sometimes / is not prevented by combat cast Spell Lock sometimes ... the game
            was checking the wrong unit for the enchantments').
            Static check (2026-10-24, tools/harness/regress.py 193): wizards/COMBCAST.C:692 holds the code;
            Combat_Cast_Spell = 1.31 bytes [work/harness/game/WIZARDS.EXE]
194. LATENT  Raise Dead and Animate Dead can hang the battle: both (Raise_Dead b1af:1f5d for an AI caster, Animate_Dead
            b1af:2384 always) place the returning unit on a random square of the caster's 3 x 3 deployment block
            (attacker x 11..13, defender x 8..10, y 9..11) and retry until the square is free, with no try limit - if
            all nine squares are occupied (units, or other blockers in that grid) the game loops forever.
            Static check (2026-10-23, tools/harness/regress.py 194): wizards/COMBDISP.C:823 holds the code; Raise_Dead
            = 1.31 bytes; Animate_Dead = 1.31 bytes [work/harness/game/WIZARDS.EXE]
195. READ+asm Dispel Magic and Disenchant Area cast by a UNIT pick the side from a stray register:
            Disenchant_Area_Combat (b1af:0061 mov ax, si) and Dispel_Square (b1af:0656, the DI register) take the
            caster's side, when the caster is a battle unit (< 20), from battle unit SI / DI - values left by the caller
            - instead of the caster argument; only the wizard's own casts (20 + player) are right. So a caster hero or
            unit casting these can strip its OWN side's combat enchantments, city enchantments and unit spells and spare
            the enemy's, depending on the leftover value. COMMUNITY-KNOWN (IW103 patches exactly these two sites,
            b1af:0053-0062 and b1af:0821-0830).
            Static check (2026-10-24, tools/harness/regress.py 195): wizards/COMBDISP.C:86 holds the code;
            Disenchant_Area_Combat = 1.31 bytes; Dispel_Square = 1.31 bytes [work/harness/game/WIZARDS.EXE]
196. READ+asm The relation penalty for killing a wizard's units counts only the last battle unit: Combat_End (a4fa:0e75)
            clears its accumulator (bp-0x24) inside the per-unit loop (0cb8..1499) and then adds Random(20) per dead
            normal defender unit (+ Random(10) for settlers / engineers), 20 per hero - so the
            Diplo_Relation_Change(-total, attacker, defender, message 8) after the loop uses just the last battle
            unit's share: 0 if that unit survived or belongs to the attacker. Attacking an AI's army costs almost no
            relation from the losses themselves. COMMUNITY-KNOWN (W159DIPL: 'only the last unit in combat counts for
            killed units diplomatic penalty').
            Static check (2026-10-25, tools/harness/regress.py 196): static fallback: wizards/COMBEND.C:356 holds the
            code; Combat_End = 1.31 bytes [work/harness/game/WIZARDS.EXE] | play case NOT REACHED (2026-10-24 09:23):
            no unprovoked-destruction relation change after the battle
197. READ+asm Combat movement can get a phantom Endurance bonus: Unit_Combat_Moves (a76b:0c4d) sets its 'a held item
            grants Endurance' flag (bp-2) only when such an item is found (a76b:0d83) and never clears it, then adds 2
            half-moves when it equals 1 (a76b:0ed5). For every unit without such an item the test reads whatever the
            stack slot held - if that happens to be 1 the unit moves one square further that turn.
            Static check (2026-10-24, tools/harness/regress.py 197): wizards/COMBUTIL.C:483 holds the code;
            Unit_Combat_Moves = 1.31 bytes [work/harness/game/WIZARDS.EXE]
198. SRC     The AI shooting loop has no way out when the shot is refused: AI_Unit_Execute's missile action (9218:0344)
            repeats Combat_Unit_Attack while the shooter has moves and a target, re-targeting only when the target dies.
            Combat_Unit_Attack returns without spending moves when Ranged_Target_Blocked refuses the shot. Concrete case
            found in phase 2: invisibility is tested three different ways - Ranged_Target_Blocked counts unit, combat
            AND ITEM invisibility, but Combat_Unit_Visible_To_Enemy (used by the AI target picker) and Unit_Update_Visibility
            (drawing) ignore the item bits - so a hero with an Invisibility ITEM, not adjacent to any enemy, is a legal
            AI missile target whose every shot is refused: the loop would never end. PROVISIONAL (not GAME-checked;
            combat tests were deferred at the time); COMMUNITY-KNOWN in effect: W455AI ('ranged units get stuck' for
            combat-cast Wall of Darkness). COMMUNITY-KNOWN (IW045: item invisibility added to Combat_Unit_Visible_To_Enemy).
            Re-checked (N221): our source note at src/wizards/COMBMOVE.C:474 states it.
            Static check (2026-10-24, tools/harness/regress.py 198): wizards/COMBTACT.C:179 holds the code;
            AI_Unit_Execute = 1.31 bytes [work/harness/game/WIZARDS.EXE]
199. LATENT  Earth to Mud ignores the battlefield edges: Earth_To_Mud_Square (df82:2f22) rewrites the 5 x 5 block around
            the target with no bounds test, so near an edge x - 2 / x + 2 wraps into the neighbouring row and y - 2 / y
            + 2 leaves the 21 x 22 grid (into the preceding / following arrays of the Battlefield record). Any grass /
            type-2 square it hits gets ground / sailing cost 12 - including the cut-off diamond corners that
            Battlefield_Build_Move_Costs made impassable (0xff), which then become slow but walkable. COMMUNITY-KNOWN
            (W656FIX: 'Earth to Mud affects tiles outside of the battlefield').
            Static check (2026-10-23, tools/harness/regress.py 199): wizards/BFGEN.C:1374 holds the code;
            Earth_To_Mud_Square = 1.31 bytes [work/harness/game/WIZARDS.EXE]
200. LATENT  Combat_Find_Path (e29d:0000) builds its reversed path list in the movement-cost map itself (DS:4af4 =
            p_combat_move_cost, 2 bytes per step), so after a search the first rows of the cost map hold path indices
            instead of costs - the top rows that are mostly the impassable diamond corner become 'passable' with small
            or zero costs. Every caller rebuilds the map before moving, except AI_Move_Toward's gate search (9218:2056),
            which runs 16 searches in a row on the damaged map (and tests the target's cost after the first); it only
            affects which gate square the AI heads for. COMMUNITY-KNOWN (W625FIX: 'stores two different types of
            temporal combat data for pathfinding in the same array').
            Static check (2026-10-23, tools/harness/regress.py 200): wizards/COMBPATH.C:28 holds the code;
            Combat_Find_Path = 1.31 bytes; AI_Move_Toward = 1.31 bytes [work/harness/game/WIZARDS.EXE]
201. READ+asm Surveyor 'River Mouth' test skips the top row: Tile_Next_To_Sea_4 (7a3c:1423) checks the tile above only
            when y-1 > 0 (dec ax / jle), so a river tile on row 1 next to sea on row 0 is reported as plain River. The
            bottom edge is handled correctly (y+1 <= 39). Surveyor text only. No community patch found.
            Static check (2026-10-24, tools/harness/regress.py 201): wizards/SURVEYOR.C:668 holds the code;
            Tile_Next_To_Sea_4 = 1.31 bytes [work/harness/game/WIZARDS.EXE]
202. GAME    After Meld or Settle the overland screen re-selects the stack at (iStack_14, iStack_16)
            (Screen_Overland_Map 4fb6:0000), coordinates set only when a unit is right-clicked: if the settler / spirit
            was picked by Next Unit the values are stale (the last right-clicked tile, whose waiting units
            Stack_Collect_Tile wakes) or never set on this visit to the screen. Usually nothing is there and
            Next_Unit_Run_GoTos picks the next unit. No community patch found.
            Re-checked (N221): OVERLAND.C Screen_Overland_Map: sel_x / sel_y set only at 675 (right-click select),
            passed to Stack_Select_At after Meld / Settle (440, 456).
            In game (2026-10-23, tools/harness/regress.py 202): right-click on (27,28) selected [161, 107]; after W
            [173]; orders of 107 / 161 (Wait 5, Ready 0) before B {107: 5, 161: 5}, after the settle {107: 0, 161: 0};
            cities 28 -> 29; selected after the settle [161, 107]
203. GAME    Numpad movement across the x = 0 seam goes one row off: Stack_Key_Move_Dir (4fb6:1aa0) computes (x - 1) %
            60 with idiv, which is -1 at x = 0; Path_Find (d592:00ae) indexes the target as x + y*60, i.e. tile (59,
            y-1). So West at column 0 moves north-west, North-West aims two rows up (a 2-tile path), South-West moves
            due west. The mouse path uses a non-negative sum and is correct. No community patch found. GAME 2026-10-17
            (tools/harness/check_203.py, work/harness/check_203.txt): Dragon Turtles alone on Arcanus ocean at x = 0,
            numpad 4 from (0,20) -> (59,19); numpad 7 from (0,25) -> (59,23) using both moves; numpad 1 from (0,30) ->
            (59,30); the grey Left arrow gives the same as numpad 4. Control at x = 2: all three go to the correct
            neighbour. Practical reach: ships, swimmers and flyers crossing the seam, and walkers on the polar tundra of
            rows 1 / 38 (a unit placed on row 39 for the test could not move at all: Stack_Move_Click 5315:021c refuses
            target rows 0 and 39). MAP SURVEY (step 56, tools/harness/mapgen_survey.py, work/harness/mapgen/): 30 new
            games made by MAGIC.EXE in the harness (10 each Small / Medium / Large) plus 9 older maps = 78 planes: on
            rows 2-37 land never lies in columns 58, 59, 0 or 1 (nearest x = 2 / 57, 17 of 60 new planes, mostly Large);
            the seam columns hold land only on the polar rows - rows 0 / 39 are all tundra (cannot be entered:
            Stack_Move_Click refuses those rows), rows 1 / 38 have tundra at x = 59 / 0 on most maps (92 tiles in 60
            planes). ReMoM's Generate_Landmasses (answer key, after the survey) bounds the continent walk to 2 <= x <=
            57, 4 <= y <= 35.
            In game (2026-10-24, tools/harness/regress.py 203): unit 161 selected [161]: West (0, 20) moves 4 -> kp4
            (59, 19) moves 2  [correct (59, 20), bug (59, 19)] => BUG (as predicted); unit 173 selected [192]: North-
            West (0, 25) moves 4 -> kp7 (59, 23) moves 0  [correct (59, 24), bug (59, 23)] => BUG (as predicted); unit
            192 selected [192]: South-West (0, 30) moves 4 -> kp1 (59, 30) moves 2  [correct (59, 31), bug (59, 30)]
            => BUG (as predicted)
204. GAME    Numpad movement skips the plane check for stacks without Planar Travel: Stack_Key_Move_Dir (4fb6:1aa0)
            calls Stack_Move_Click straight away when Stack_Can_Planar_Travel is 0, while the mouse path refuses
            (message 0x2f42) unless the unit is on the viewed plane or in a tower; Stack_Move_Click then moves on
            map_view_plane. COMMUNITY- KNOWN (W796FIX). GAME 2026-10-17 (tools/harness/check_204.py,
            work/reports/check_204.txt): not a plane shift - the unit stays on its own plane, but Stack_Move gets
            map_view_plane, so the path is planned on the OTHER plane's map. Halfling Bowmen on Arcanus, view switched
            to Myrror, numpad 4: (A) West tile ocean on Arcanus / land on Myrror -> the Bowmen walk onto the Arcanus
            ocean (24,24) and stand there; (B) West tile land on Arcanus / water on Myrror -> no move (and the unit is
            set done, status 4); (C) land on both -> normal move. Control without the view switch: A refused, B walks, C
            walks.
            In game (2026-10-24, tools/harness/regress.py 204): => walked West on Arcanus; => did not move; => walked
            West on Arcanus
205. GAME     After an overland summon (Summon_Hero_Cast, Overland_Cast_Spell summons, Resurrection_Cast,
            Incarnation_Cast) the new unit is not selected: the four call sites (b43d:000b, b45b:0001, b504:000d,
            bb0b:000a in flat paragraphs) do cbw / mov [bd86], ax / call far Select_Stack_Of_Unit (517e:023a) with
            nothing pushed, so the callee reads its unit index from stale stack ([bp+6]) and selects / centres on a
            random unit (or an out-of-range index). COMMUNITY-KNOWN (W564FIX: uses num_units - 1, the newest unit).
            In game (2026-10-23, tools/harness/regress.py 205): Select_Stack_Of_Unit called from
            Overland_Cast_Spell+43B (BA2C:0DFF) reads unit 1; the new unit is 199 (num_units - 1, type 176)
206. READ+asm Random(n) (1d4d:00d8) draws only 9 bits per call (9 LFSR steps into a 0..511 value) and returns value % n
            + 1: results above 512 are impossible, and every roll has modulo bias - Random(100) gives 1..12 with 6/512
            and 13..100 with 5/512, so 'Random(100) <= 10' is 11.7% (not 10%) and '<= 50' 51.2%. The developers knew the
            limit (Random_Weighted_Pick and Event_Pick_Wizard halve weights until the sum is below 512); no call site
            passes a constant above 512 (Random(512) is the largest). Zero seed is replaced by 0x30be; n = 0 -> fatal
            'RND no 0's'.
            Static check (2026-10-24, tools/harness/regress.py 206): wizards/UTIL.C:99 holds the code; Random = 1.31
            bytes [work/harness/game/WIZARDS.EXE]
207. WITHDRAWN (step 78c-Z batch 19, byte-matched src/wizards/UTIL.C): NOT A BUG. Random_Get_Seed stores
            rng_state_hi (DS:7848) in the HIGH word of its long result and returns DX = high, AX = low; Random_Seed
            takes (low, high) = the long as pushed (AX lands at [bp+6]), so Random_Seed(Random_Get_Seed()) restores the
            state exactly. The original reading below misread which register holds which half. Original text:
     (old) Saving and restoring the random seed swaps its two halves: Random_Get_Seed (1d4d:0089) returns DX = low
            word, AX = high word, while Random_Seed (1d4d:0078) takes (low, high) and callers pass (AX, DX). So
            Outpost_Draw_Scene (cd8b:42f8: push [bp-8]=DX, push [bp-0xa]=AX), and (by the decompile; the other 6 save /
            restore sites not checked) Next_Turn's turn_rng_seed (stored end of turn, reseeded at the start of the next)
            put the generator back in a different (half-swapped) state. Still deterministic; it only defeats the intent
            that drawing does not disturb the game's random sequence.
208. SRC  The stack's shown move total ignores the Wind Walker rule when a slower unit follows it: Stack_Selected_Moves
            (55bb:0ec8, selection panel and the click handler) takes the Wind Walker's moves but keeps looping and
            taking the minimum over the units after it, while the real mover Stack_Moves_Available (7dfd:06a8) returns
            the Wind Walker's moves at once. A Wind Walking stack whose later unit is out of moves shows 0 moves, and a
            map click then sets a Go-To instead of moving. COMMUNITY-KNOWN (IW017). Step 60: the same loop shape is in
            Stack_Moves_WindWalk_Carry (55bb:0fa6, called by Stack_Move_Click). It takes the minimum moves, overwrites
            it with the Wind Walker's moves on meeting one, then keeps taking the minimum over the units after it. Its
            result (DS:37fe) therefore also depends on unit order, although it does give the 0-move units 1 move when a
            Wind Walker with moves is present.
            Re-checked (N221): our source note at src/wizards/UNITDRAW.C:600 states it.
            Static check (2026-10-24, tools/harness/regress.py 208): wizards/MOVECHK.C:248 holds the code;
            Stack_Moves_Available = 1.31 bytes; Stack_Selected_Moves = 1.31 bytes; Stack_Moves_WindWalk_Carry = 1.31
            bytes [work/harness/game/WIZARDS.EXE]
209. READ+asm Confusion: when a confused unit's borrowed turn ends, Combat_Main (75eb:06c5-0702) flips BattleUnit.owner
            (+0x35) back between combat_attacker_player and combat_defender_player but never clears confusion_result
            (+0x56), which stays 2 ('fights for the other side') for the rest of the turn. In-game effect PROVISIONAL
            (the patch text gives none; W255 builds on it for the Confusion + Dispel permanent-control exploit).
            COMMUNITY-KNOWN (IW044: adds mov byte es:[bx+56h], 0).
            Static check (2026-10-24, tools/harness/regress.py 209): wizards/COMBAT.C:190 holds the code; Combat_Main
            = 1.31 bytes [work/harness/game/WIZARDS.EXE]
210. READ+asm Counter Magic weakens the wrong enchantment when it stops a WIZARD's spell: Combat_Spell_Action
            (8cf2:004b) keeps the Counter Magic slot index (0x14 attacker / 0x15 defender of the 30-byte combat-
            enchantment array) in [bp-0xc], but on a countered wizard spell (caster >= 20) the mana-cost code reuses
            [bp-0xc] for Combat_Range_Multiplier (8cf2:0656), so the following 'slot -= 5, clear at < 0' hits byte 5 /
            10 / 15 / 20 / 25 / 30 = Warp Reality (defender), Metal Fires (attacker), High Prayer (defender), Counter
            Magic (attacker), Entangle (defender) or the byte after the array, by the caster's range (fortress / <= 5 /
            10 / 15 / 20 / farther or other plane). Counter Magic itself keeps its strength unless the range happens to
            give 20. The patch's second site (8cf2:08f4, the node-aura dispel) overwrites the same variable after its
            last use there - harmless. Unit-cast spells are not affected. COMMUNITY-KNOWN (IW056: keeps the multiplier
            on the stack).
            Static check (2026-10-24, tools/harness/regress.py 210): wizards/COMBSPL.C:106 holds the code;
            Combat_Spell_Action = 1.31 bytes [work/harness/game/WIZARDS.EXE]
211. GAME     Dispel Evil hits creatures of every realm when the human casts it: the target picker
            Combat_Spell_Pick_Target_UI (8f51:078a) has the Chaos / Death creature test (BattleUnit.race 18 / 20) only
            for Star Fires (0x7a), not for Dispel Evil (0x86), and the effect in Combat_Cast_Spell (8a20:1a8e, the
            resist-or-die case) checks only Spell Lock - so Nature, Sorcery and Life summons must resist at -4 or die.
            COMMUNITY-KNOWN (IW061 adds the 0x86 test to the picker).
            In game (2026-10-22, tools/harness/regress.py 211): target race 8; combat skill 173 -> 148, mana 5000 ->
            4975
212. GAME     Life Drain can be cast by the human on Death creatures and Death-Immune units: Combat_Spell_Pick_Target_UI
            (8f51:088c) has no test for it, while the AI picker AI_Combat_Spell_Target (8a20:0000) skips race 20 and
            abilities 0x40 (Death Immunity) for 0xa7; Life_Drain_Apply (b66a:0577) rolls Roll_Resist with element 4 and
            Resist_Bonus gives Death Immunity no bonus, so Undead and Death creatures are drained normally. COMMUNITY-
            KNOWN (IW062).
            In game (2026-10-22, tools/harness/regress.py 212): target race 20; combat skill 173 -> 163, mana 5000 ->
            4990
213. GAME     Chaos Channeled units count as normal living units: Unit_Is_Normal_Living (a0ec:0b8d) rejects only
            summoned types and Undead (mutation 0x20), not the Chaos Channel mutations (0x04 / 0x08 / 0x10). So
            Overland_Cast_Spell (ba2c:09c4) lets Chaos Channels (spell 93), Black Channels (175) and the normal-units-
            only enchantments (Eldritch Weapon, Flame Blade, Holy Weapon, Holy Armor, Heroism) target an already Chaos
            Channeled unit, and Call Chaos (Call_Chaos_Apply) can Chaos-Channel it again. COMMUNITY-KNOWN (IW078: the
            test becomes mutations & 0x3c).
            In game (2026-10-23, tools/harness/regress.py 213): unit 160 at (27,28): mutation_flags 0x08, enchantments
            0x01000000 (Heroism 0x01000000); casting now 0
214. QUIRK   Thrown, breath and gaze attacks get no to-hit bonus at all: in Attack_Resolve (a22c:0a69) the non-melee
            path adds BattleUnit.ranged_hit_bonus (+0x25: weapon quality, Holy Weapon, item to-hit) only for kind 2 when
            Has_Shooting_Attack (a22c:0c04-0c27, asm-checked); kind 1 (thrown / breath / gaze) adds neither that nor
            melee_hit_bonus. Real missile and magic ranged attacks DO get the bonus - the patch text ('Ranged To Hit
            bonus doesn't apply to ranged attacks') overstates it. COMMUNITY-KNOWN (IW080 moves the add before the kind
            test, so every non-melee attack gets it).
            Static check (2026-10-24, tools/harness/regress.py 214): wizards/COMBRES.C:333 holds the code;
            Attack_Resolve = 1.31 bytes [work/harness/game/WIZARDS.EXE]
215. GAME    Weapon Immunity overrides Missiles (and other) Immunity: Defender_Shields (a22c:1627) sets the 'immune'
            level 2 (defence 50) when an immunity bit matches the attack, then the Weapon Immunity test (attack bit
            0x100) overwrites it with level 1 (defence at least 10). A unit with both - hit by a non-magical missile -
            defends at 10+ instead of 50. COMMUNITY-KNOWN (IW083).
            Re-checked (N221): COMBRES.C Defender_Shields 575-578: abilities & damage_flags -> IMMUNE_TOTAL, then
            damage_flags & ABILITY_WEAPON_IMMUNITY -> IMMUNE_WEAPON overwrites (shields at least 10).
            In game (2026-10-24, tools/harness/regress.py 215): Defender_Shields(defender, ranged_type, damage_flags,
            attack_flags, realm) for the Demon (abilities 0x3dc: Missiles Immunity 0x4, Weapon Immunity 0x100) (1, 20,
            260, 0, -1) = 10
216. GAME     Regeneration cancels Recall: Recall Hero (205) and Word of Recall (47) mark the battle unit status 1
            (Combat_Cast_Spell 8a20:1a8e), but Combat_End (a4fa:0336-035a) sets status 0 for every Regenerating unit of
            the winning side without excluding 1, so a recalled regenerating unit (e.g. a hero with a Regeneration item)
            stays where the battle was. COMMUNITY-KNOWN (IW088: skips status 1).
            In game (2026-10-24, tools/harness/regress.py 216): hero 19 after a Recall Hero (status after the cast 1 /
            1): with the Regeneration item (0x00000040) at (30, 28, 0, 0); without at (29, 27, 0, 0)
217. READ+asm AI raze decision has the army term backwards: AI_Decide_Raze (a76b:13bb) adds own units on the landmass x
            50 / the owner's units there - 50 (a76b:1598-15a7), so the more the AI outnumbers the former owner locally,
            the likelier it razes - yet when the owner has no units there at all it subtracts 200 (keeps the town). The
            two branches contradict each other; a 2:1 local edge adds +50, a 10:1 edge +450 (always razes unless capped
            by the roll). COMMUNITY-KNOWN (IW096: add -> sub).
            Static check (2026-10-24, tools/harness/regress.py 217): wizards/COMBUTIL.C:665 holds the code;
            AI_Decide_Raze = 1.31 bytes [work/harness/game/WIZARDS.EXE]
218. READ+asm A Spell Lock cast during the battle does not stop Dispel Magic: Dispel_Square (b1af:0656) tests the lock
            bit 0x4000 only in the overland unit enchantments (Unit +0x18, b1af:097a-09a6), not in
            BattleUnit.combat_enchant_lo (+0x3a) where a combat-cast Spell Lock lives (Combat_Cast_Spell writes +0x3a /
            +0x3c), nor in the item word +0x2c. COMMUNITY-KNOWN in effect (IW104 'combat cast spell lock does not
            prevent dispelling'), but the patch ORs in +0x2c, the ITEM enchantment word (Hero_Item_Enchants 9748:0469;
            no item power grants Spell Lock), so it does not reach combat-cast locks - disagreement noted. W326FIX
            agrees (its notes: the earlier fix 'only fixes the item power which doesn't exist') and lists two more Spell
            Lock gaps not checked here: Haste (a combat flag) is not protected, and dispelling a Spell Lock shows no
            message.
            Static check (2026-10-24, tools/harness/regress.py 218): wizards/COMBDISP.C:229 holds the code;
            Dispel_Square = 1.31 bytes; Hero_Item_Enchants = 1.31 bytes [work/harness/game/WIZARDS.EXE]
219. GAME     Dispel Magic never removes Invulnerability and tests the wrong wizard's Holy Arms: Dispel_Square
            (b1af:0656) walks the 32 unit-enchantment bits with 'index < 31' (cmp 0x1f / jge at b1af:0ce6; the patch
            changes two more loops the same way at 0fa3 and 14e4, not checked here), so bit 31 = Invulnerability (spell
            143) is never rolled; and the rule 'Holy Weapon (bit 23) is not dispelled while its owner has Holy Arms'
            reads the Holy Arms flag of [bp-2], the dispelling side, instead of [bp-0x10], the unit's owner (b1af:0d54)
            - so the caster's own Holy Arms shields enemy Holy Weapons, and an enemy's Holy Arms does not. COMMUNITY-
            KNOWN (IW105: jge -> jg at the three loops, [bp-2] -> [bp-0x10]).
            In game (2026-10-24, tools/harness/regress.py 219): unit 2 enchantments 0x80000100 before, 0x80000000
            after; bits rolled [8]
220. READ+asm Raise Dead and Animate Dead write unit names to random memory: building the pick list, Raise_Dead
            (b1af:1f5d, asm b1af:2043-204f) does strcpy(dest = [bp-0x24 + 2i], unit-type name) - the destination is an
            UNINITIALISED stack word used as a near pointer, so each candidate's name is copied to whatever DS address
            that word holds (the list dialog then shows it from there, so it looks right). Animate_Dead (b1af:2384) has
            the same pattern. Raise_Dead's index and pointer arrays hold 8 entries and are not bounded: a 9th / 10th
            candidate overwrites the chosen-index and the count locals. The pointer list is also not ended by an empty
            string, which List_Select_Layout (d677:11a1) needs to count the entries: the count runs on into stack
            garbage, and with 7+ candidates the scrolling dialog (mode 1, 6 rows shown, b1af:2088) can scroll past the
            real entries and return an index beyond them. COMMUNITY-KNOWN (IW107 'partially fixes the memory
            corruption', W172FIX 'crashes on 7+ dead units' removes the scrolling branch at b1af:208c / 24c8).
            Static check (2026-10-24, tools/harness/regress.py 220): wizards/COMBDISP.C:772 holds the code; Raise_Dead
            = 1.31 bytes; Animate_Dead = 1.31 bytes; List_Select_Layout = 1.31 bytes [work/harness/game/WIZARDS.EXE]
221. SRC     Animate Dead on an ENEMY corpse changes only the battle owner: Animate_Dead (b1af:2384) sets
            BattleUnit.owner to the caster and the Undead mutation, but leaves the overland Unit.owner (+3) at the old
            owner, so after the battle the risen unit still belongs to its former wizard on the map. Exact after-battle
            result PROVISIONAL (not GAME-checked; no combat tests yet). COMMUNITY-KNOWN (IW108 writes Unit +3 = caster).
            Re-checked (N221): COMBDISP.C Animate_Dead: p_battle_units[raised].owner = caster, MUT_UNDEAD on the unit;
            COMBEND.C writes Unit.owner back only for drained (191) and zombie (207) units. After-battle result
            PROVISIONAL stays.
            Static check (2026-10-25, tools/harness/regress.py 221): static fallback: wizards/COMBDISP.C:862 holds the
            code; Animate_Dead = 1.31 bytes [work/harness/game/WIZARDS.EXE] | play case NOT REACHED (2026-10-25
            21:03): the Settlers (battle unit 1) status 4 - not killed in a human turn
222. GAME    Call Lightning spares Wraith Form, not Magic Immunity, and loses bolts: Call_Lightning_Turn (b66a:03c9)
            skips a target whose unit / combat / item enchantments have bit 0x20 - Wraith Form (spell 181) - where the
            patch authors expected the Magic Immunity ability (BattleUnit +0x18 bit 0x20); Magic Immune units are still
            picked (their damage is then cut by Defender_Shields). Each of the Random(3)+2 bolts picks
            Random(battle_unit_count) up to 30 times and needs a living enemy plus a 1-in-2 roll, so with many dead or
            friendly entries in the battle list bolts are silently lost. COMMUNITY-KNOWN (IW112 for the immunity test,
            W176FIX for the lost bolts).
            Re-checked (N221): SPELLFX.C Call_Lightning_Turn 243: skips UNIT_ENCH_WRAITH_FORM, not Magic Immunity;
            tries < 30, reset on a hit; a living enemy and Random(2) == 1 needed. OUR HEADER said 'not immune' -
            corrected.
            In game (2026-10-25, tools/harness/regress.py 222): Paladins (battle unit 1, abilities 0x20, Magic
            Immunity 0x20), Wraith Form spearmen (battle unit 2); bolt targets [1, 1, 1, 1, 1, 1]; Paladins' figures 4
            -> 4
223. READ+asm The AI never counters Wrack, Mana Leak or Call Lightning with Disenchant Area on purpose:
            AI_Combat_Spell_Score (c165:00bd) sets a +500 bonus in [bp-0x10] when the enemy side has one of those three
            combat enchantments (c165:01c4-022c), but no instruction in the function reads [bp-0x10], so the bonus is
            lost. COMMUNITY-KNOWN (IW124 adds it to the total).
            Static check (2026-10-24, tools/harness/regress.py 223): wizards/COMBAI.C:78 holds the code;
            AI_Combat_Spell_Score = 1.31 bytes [work/harness/game/WIZARDS.EXE]
224. GAME    The autosave is written in the middle of the turn change: Next_Turn (9ec1:0000) calls Autosave (c74a:0000,
            every 4th turn -> SAVE9.GAM) after game_turn++ but BEFORE Cities_Recalculate_All, the new turn_rng_seed, and
            everything Human_End_Turn (5297:0199) does after Next_Turn returns - the city notices (production falls back
            to Housing), Units_Reset_Moves (5297:05cc), and the cast of an overland spell whose cost is now paid.
            Loading re-runs only part of it: Game_After_Load_Init / Game_Start_Init call Units_Reset_Moves_NonCurrent
            (5297:0499), which skips units of current_player (0 = the human). So after loading SAVE9 the human's units
            would start the turn with the moves they had left at the end of the previous turn. COMMUNITY-KNOWN (W032FIX
            moves the autosave and saves every turn). GAME 2026-10-17 (tools/harness/check_224.py,
            work/reports/check_224.txt): the game's own autosave at turn 108 (written during check_204_drown) holds the
            human units that acted in turn 107 as finished 1 / moves 0 / status 4, although in the running game they had
            full moves again at turn 108. Loading it (copy with one other unit set ready so the turn cannot end by
            itself): units 19, 105, 193 start turn 108 with 0 moves, finished, status 4 - they cannot act that turn.
            Loading the unedited autosave, where no human unit was ready, made the game end turn 108 at once (turn 109
            on the first look). So a player who loads SAVE9 loses that turn's moves for every unit that moved in the
            previous turn.
            In game (2026-10-24, tools/harness/regress.py 224): 1 human unit(s) without orders start the turn with
            less than full moves
225. GAME     An AI's 'break your alliance with X' demand names the wrong wizard: Diplo_Demand_Drop_Ally (7057:04aa)
            stores X in wizards[0].demand_drop_ally[partner] (Wizard +0x1a6, 7057:050c) - a field nothing ever reads -
            while the diplomacy text takes its third wizard from war_request_target[partner] (+0x22a; diplo_third_wizard
            in Screen_Diplomacy_Offer's callers), so the message shows whatever wizard was last asked to be warred on,
            or none. Breaking the treaty on 'agree' does use the right ally. COMMUNITY-KNOWN (W062DIPL: the store goes
            to +0x22a).
            In game (2026-10-23, tools/harness/regress.py 225): wizard 1 audience menus ['Any friend of Freya is an
            enemy of mine. If you would deal with me, break your treaty with that scum first.', "Reckless expansion
            can be very dangerous. Therefore, I propose a Wizard's Pact to prevent accidental conflict."]; names: 2 =
            Kali, 4 = Freya; human-wizard 2 status after 0 (2 alliance)
226. GAME    An eliminated wizard keeps casting: Wizard_Fortress_Captured (78ba:0000) clears the loser's units, cities,
            nodes, global enchantments, treaties and contacts but not casting_spell / casting_cost_left, and
            Turn_Overland_Casting (c3f5:1b61) runs for every player with no 'fortress alive' test (an AI's Spell of
            Return even progresses without mana). So a dead AI's spell in progress keeps advancing and can complete.
            What a completed spell then does for a wizard with no cities or units is PROVISIONAL (the patch text
            mentions a dead wizard's 'started casting Spell of Mastery' notice). COMMUNITY-KNOWN (W102FIX).
            Re-checked (N221): ENDGAME.C Wizard_Fortress_Captured: casting_spell / cost not cleared, the loser keeps
            half its mana (only / 2 given away, 169-170); TURNUPD.C Turn_Overland_Casting 738-739: every player, no
            fortress test. What a completed spell does then PROVISIONAL stays.
            In game (2026-10-22, tools/harness/regress.py 226): turn 107: eliminated wizard 3 cost left 478 (was 500),
            mana 978 (was 1000), casting 166
227. GAME     Taking an OUTPOST skips the conquest rules: in Overland_Attack (7d45:0000) a won city attack on a size-0
            town jumps straight to the destroy path (7d45:0551-0558 -> 05f7, [bp-0xa] = 1) and bypasses
            Diplo_Relation_Change(-40, msg 9 'city captured'), Diplo_Declare_War and City_Change_Owner (4a3f:1099).
            So the victim AI gets no relation penalty or war declaration from it, and if the outpost was the wizard's
            last town (or his fortress town) the elimination in City_Change_Owner -> Wizard_Fortress_Captured never
            runs. COMMUNITY-KNOWN (W107FIX: 'crash if that was the last, capital outpost').
            Corrected (2026-10-23, in game, tools/harness/regress.py 227): City_Change_Owner DOES run on this
            path - Overland_Attack's destroy branch (ATTACK.C: destroyed == 1) calls City_Change_Owner(city,
            attacker) and then City_Remove (traced: City_Change_Owner(21, 0)); what is skipped is the -40 relation
            event and Diplo_Declare_War. Whether the elimination check in City_Change_Owner then works for a
            wizard's last town was not traced.
            In game (2026-10-23, tools/harness/regress.py 227): outpost Rastenford: Diplo_Relation_Change(actor 0,
            observer 1) calls []; Diplo_Declare_War calls []; City_Change_Owner calls [(21, 0)]; a city at (30,28)
            now: []
228. GAME    Wind Walking makes a unit untouchable for melee in combat: Unit_Is_Airborne (7eb0:1eb0, used by
            Can_Attack_Target) treats the Wind Walking enchantment (bit 0x10000) like Flight (0x20000), so non-flying
            units cannot attack a Wind Walking unit in melee, although Wind Walking is an overland movement spell.
            COMMUNITY-KNOWN (W108FIX skips the Wind Walking test).
            Re-checked (N221): COMBTURN.C 948 header: Wind Walking or Flight enchantment counts as airborne.
            In game (2026-10-24, tools/harness/regress.py 228): Can_Attack_Target(attacker, target) with the target
            Wind Walking: (0, 1) = 0 (move_flags 0x0); without: (0, 1) = 1
229. SRC     The AI treats Flame Strike, Call Chaos, Mass Healing, Holy Word and Death Spell like combat enchantments:
            these army-wide instants share effect type 10 with Prayer / High Prayer, and AI_Combat_Spell_Target
            (8a20:0000, the type-10 case) refuses the spell whenever combat_enchants[effect_param + side] is already set
            - for the instants effect_param is not a slot index, so an unrelated combat enchantment (which one depends on
            the spell's value, PROVISIONAL) stops the AI from casting them. COMMUNITY-KNOWN (W122FIX).
            Re-checked (N221): COMBCAST.C AI target case SPELL_FX_COMBAT_ENCH 327-334: refused when
            p_combat_enchants[effect_param + side] > 0, also for the five instants that Combat_Cast_Spell (895-896)
            does not store as enchantments.
            Static check (2026-10-24, tools/harness/regress.py 229): wizards/COMBCAST.C:86 holds the code;
            AI_Combat_Spell_Target = 1.31 bytes [work/harness/game/WIZARDS.EXE]
230. SRC     Spell Ward does nothing in combat: the five ward slots of the City record are read only by overland code -
            City_Spell_Protection_Check (acd6:0ada, overland spells at the city), City_Ward_Check / Path_Ward_Blocked
            (creature movement), the cast code, Create_City, the cityscape and the AI picker (grep of every reader) -
            and no combat function (Combat_Spell_Action 8cf2:004b, Combat_Cast_Spell 8a20:1a8e) tests them, so a battle
            at a warded city lets spells of the warded realm be cast freely. COMMUNITY-KNOWN (W125FIX adds the counter
            roll to Combat_Spell_Action).
            Re-checked (N221): grep: the ward slots are read in AISPELL / CITY / CITYSCAP / MOVECHK / OVERCAST /
            OVERSPL2 / OVERSPL3 only, no combat module.
            Static check (2026-10-24, tools/harness/regress.py 230): wizards/COMBCAST.C:697 holds the code;
            Combat_Cast_Spell = 1.31 bytes; Combat_Spell_Action = 1.31 bytes; City_Spell_Protection_Check = 1.31 bytes
            [work/harness/game/WIZARDS.EXE]
231. GAME    Raise Dead and Animate Dead can 'raise' living units: both candidate filters (Raise_Dead b1af:1f5d,
            Animate_Dead b1af:2384) accept any battle status > 0 except 6, so besides the dead (4 / 5) they list
            recalled (1), fled (2) and non-combatant (3, e.g. land units carried by a ship) units; picking one pulls it
            into the battle - Raise Dead halving its figures (single-figure units at half hits) and both wiping its
            enchantments, Animate Dead also making it Undead. COMMUNITY-KNOWN (W127FIX for the ship case). COMMUNITY-
            KNOWN for the recalled case (W731FIX).
            Re-checked (N221): COMBDISP.C Raise_Dead (status > 0, not DESTROYED, own normal units) and Animate_Dead
            881 (status > 0, not DESTROYED): fled / recalled / set-aside units qualify. OUR Animate_Dead HEADER said
            'a dead non-hero unit' - corrected.
            In game (2026-10-24, tools/harness/regress.py 231): hero 33 (battle unit 1): status 1 after Recall Hero;
            Raise Dead candidates (i) [1]; hero 33 after Raise Dead: status 1, figures 1
232. SRC     The Demon Lord's summon ability has no limit checks: Demon_Lord_Summon (8f51:22fa) creates the demon
            (Unit_Create type 0xa9 on plane 9) without testing the side's unit count or the 36 battle slots (so a full
            battle gives the ghost unit of #180), then places it with the same unbounded random 3 x 3 deployment-square
            retry as #194 (a hang if all nine squares are taken). COMMUNITY-KNOWN (W129FIX: 'can summon a demon if
            already having 9 units', makes the attempt fail).
            Re-checked (N221): our source note at src/wizards/COMBTARG.C:1027 states it.
            Static check (2026-10-24, tools/harness/regress.py 232): wizards/COMBTARG.C:1027 holds the code;
            Demon_Lord_Summon = 1.31 bytes [work/harness/game/WIZARDS.EXE]
233. GAME    'Ghost units': Battle_Unit_Init (9748:0ee9) sets figures_alive = figures - Unit.damage / hits_per_figure
            with no lower bound, so a unit whose stored overland damage is at or above its CURRENT total hits (possible
            after its maximum hits drop, e.g. an enchantment or item bonus lost while damaged - PROVISIONAL which cases
            occur) enters battle with 0 figures alive yet status active. COMMUNITY-KNOWN (W138FIX sets such units to
            exactly 1 hit left; W216FIX: those units never heal).
            Re-checked (N221): UNITSTAT.C Battle_Unit_Init 348: figures_alive = figures - damage / hits_per_figure, no
            bound.
            In game (2026-10-22, tools/harness/regress.py 233): unit 2: figures 6, figures_alive -36, status 0, hits
            per figure 3
234. SRC     Dispelling an enchantment in combat does not remove the abilities it gave: Unit_Apply_Modifiers (9748:122d,
            re-run by Combat_Cast_Spell, Combat_Turn_Start and Battle_Unit_Heal) reloads attack, defence, resistance,
            to-hit and the bonus bytes from the UnitType but never resets the BattleUnit ability words (+0x18
            immunities, +0x1a, +0x1c, +0x1e attack flags), and Unit_Enchant_Bonus (9748:1740) only ORs bits in. So after
            Dispel Magic / Disenchant the unit keeps e.g. Magic Immunity, Wraith Form's immunities, Guardian Wind's
            missile immunity, True Sight, Immolation or Eldritch Weapon for the rest of the battle (stat bonuses do go
            away). COMMUNITY-KNOWN (W139FIX).
            Re-checked (N221): UNITSTAT.C Unit_Apply_Modifiers reloads to_hit / resist / defense / melee / ranged from
            the type, never abilities / abilities2 / ability_flags / attack words; Unit_Enchant_Bonus only ORs bits
            in.
            Static check (2026-10-25, tools/harness/regress.py 234): static fallback: wizards/UNITSTAT.C:478 holds the
            code; Unit_Apply_Modifiers = 1.31 bytes; Unit_Enchant_Bonus = 1.31 bytes [work/harness/game/WIZARDS.EXE] |
            play case NOT REACHED: unit 2 (enchantments, battle abilities, the record's unit, in combat) at the start
            and after each Dispel Magic: ['(0x2, 0x8004, 2, True)', '(0x2, 0x8004, 2, True)', '(0x2, 0x8004, 2,
            True)', '(0x2, 0x8004, 2, True)', '(0x2, 0x8004, 2, True)'] (Guardian Wind 0x2, Missiles Immunity 0x4) -
            Guardian Wind was never dispelled
235. GAME    Flight cast during a battle gives no movement minimum on the turn it is cast: Combat_Cast_Spell's
            recompute (the moves_were_full test, as for Haste #268) keeps the unit's current moves. From the next
            combat turn Combat_Turn_Start sets moves = Unit_Combat_Moves (COMBMOVE.C 130), which does read the combat
            enchantments, so the 3-move minimum applies for the rest of the battle. (Corrected N228 from the harness
            run: the earlier text said the unit flies with its own move allowance for the battle, because
            Unit_Move_Points (a0ec:0964) and Unit_Apply_Modifiers' '< 3 half-moves -> 6' test (9748:1712) read only
            the unit and item words - true, but in battle their result is replaced each turn.) COMMUNITY-KNOWN in
            effect (W143FIX raises the 9748:1712 threshold 3 -> 6, a test that cannot see combat-cast Flight).
            Re-checked (N221): UNITSTAT.C Unit_Apply_Modifiers 469-471: ench = p_units[].enchantments |
            item_enchantments (no combat_enchantments) for 'moves < 3 -> 6'; WIZSTATS.C Unit_Move_Points: unit + item
            powers.
            In game (2026-10-22, tools/harness/regress.py 235): turtle moves 4 -> 4 after Flight (enchantments
            0x20000, move_flags 0xc) -> 6 next turn
236. SRC     Thrown attacks ignore Weapon Immunity: Attack_Damage_Flags (a22c:01f0) marks a non-magical ranged attack as
            an ordinary weapon (flag 0x100, which Defender_Shields uses for Weapon Immunity) when ranged_type / 10 < 3
            or ranged_type / 10 == 100 - the second test can never be true (type 100 = thrown gives 10), it was meant as
            ranged_type == 100. So Thrown never counts as a normal weapon. COMMUNITY-KNOWN (W152FIX removes the
            division).
            Re-checked (N221): our source note at src/wizards/COMBRES.C:151 states it.
            Static check (2026-10-25, tools/harness/regress.py 236): static fallback: wizards/COMBRES.C:151 holds the
            code; Attack_Damage_Flags = 1.31 bytes [work/harness/game/WIZARDS.EXE] | play case NOT REACHED (2026-10-25
            21:06): (ranged_type, weapon_icon, Attack_Damage_Flags) thrown None; arrow (20, 0, 260) (Weapon Immunity
            bit 0x100) - an attack was not caught
237. SRC     Units carried by a ship die when the ship flees: at the end of a battle Combat_End (a4fa:0000) sets every
            non-combatant (status 3, e.g. land units aboard) of the winning side back to active and every non-combatant
            of the LOSING side to dead (status 4), without checking whether the loser's transport survived by fleeing
            (status 2). COMMUNITY-KNOWN (W160FIX).
            Re-checked (N221): COMBEND.C Combat_End 143-148: SET_ASIDE units of the winner active, of the loser dead,
            no transport test.
            Static check (2026-10-24, tools/harness/regress.py 237): wizards/COMBEND.C:92 holds the code; Combat_End =
            1.31 bytes [work/harness/game/WIZARDS.EXE]
238. GAME     A spellbook found when a realm already has 11+ books reads past its table: Wizard_Gain_Spellbook
            (aba4:0ea1) gives new spells per rarity from a local table of 10 book-counts x 4 rarities (+ one slot used
            for the random index), skips the grants only when the count is exactly 10 (aba4:0f89 cmp 0xa / jne) and
            increments the count in every case - so at 11+ books it indexes local_58[books * 4 + rarity] beyond the
            table, treating stack words as 'spells to grant' and decrementing them (PROVISIONAL what that does: more
            spells, or corrupted locals). COMMUNITY-KNOWN (W170FIX: jne -> jl, plus table values changed to match the
            starting-book table - the table part is tuning).
            Settled (2026-10-23, in game, tools/harness/regress.py 238): the table sits at [bp-86], so row 11 is [bp+2
            .. +8] = the return IP / CS and the player / realm arguments, and each spell granted there decrements one
            of them. Seen with 11 Life books: the return CS -2 (two grants of tier 1) and realm 3 -> 0 while the loop
            ran, so the later grants went to other realms' slots and the book itself to Nature (spellbooks[0] 0 -> 1)
            instead of Life; the function returned through the changed segment.
            In game (2026-10-23, tools/harness/regress.py 238): Wizard_Gain_Spellbook(player 0, realm 3) with 11
            books; tier_counts[11][0..3] = the return IP / CS and the player / realm arguments: [5453, 17459, 0, 3] at
            entry, [5453, 17457, 0, 0] at the "spellbooks[realm]++" line; the human's books after (Nature .. Death)
            [1, 0, 0, 11, 0] (Life was 11, Chaos 0); Life spell states changed (slot, before, after) [(18, 0, 1), (19,
            0, 1), (36, 0, 1)]
239. GAME     The AI's truce after a peace treaty runs at double speed: peace_turns (Wizard +0x4b0, Random(6)+7 after
            Diplo_Make_Peace) is decremented by Diplo_Tick_Peace_Turns (736d:0c3a, every ordered pair, floor 0, from
            Next_Turn) AND again by AI_Overland_Turn (d208:0251-028a, the AI's own row, when non-zero), so an AI's 7-12
            turn no-attack period lasts about half that; the human's row ticks once. It cannot go negative (one test is
            != 0, the other floors at 0) - the patch text's 'below 0' does not apply to 1.31. COMMUNITY-KNOWN (W223DIPL
            removes the AI_Overland_Turn loop).
            In game (2026-10-22, tools/harness/regress.py 239): turn 107: AI 1 peace_turns 8, human 9 (both were 10)
240. GAME    The AI recasts 'anti-realm' globals it already has: AI_Pick_Anti_Realm_Global (e318:2888) weights Nature's
            Wrath (40), Life Force (156), Tranquility (157) and Evil Omens (198) by base cost whenever the spell is
            known (library state 2), never testing whether the AI's own global enchantment is already active, and
            AI_Choose_Overland_Spell (e318:08e6) only checks affordability - so the AI can spend its casting on a global
            it already has. COMMUNITY-KNOWN (W231AI names the first three).
            Re-checked (N221): AISPELL.C AI_Pick_Anti_Realm_Global 1158: 'known' only, no own-global test;
            AI_Choose_Overland_Spell header 265: an affordability test only.
            In game (2026-10-25, tools/harness/regress.py 240): AI_Pick_Anti_Realm_Global(1) = 40 while wizard 1 holds
            Nature's Wrath (40)
241. SRC    The AI can cast Time Stop while its Time Stop is running: AI_Pick_Attack_Spell (e318:2f1c) weights Time
            Stop (spell 80) when known and mana >= 3000 without testing the AI's own Time Stop global; the only
            own-global test in that picker is Raise Volcano's (not under its own Armageddon). COMMUNITY-KNOWN (W232AI;
            the patch also raises the mana floor to 5000 - tuning).
            Re-checked (N221): AISPELL.C AI_Pick_Attack_Spell 1351: Time Stop weighted when known and mana >= 3000, no
            globals.time_stop test. The entry's 'unlike the entry just after it' is wrong: Corruption follows with no
            test; the only own-global test in the picker is Raise Volcano's armageddon == 0.
            Static check (2026-10-25, tools/harness/regress.py 241): static fallback: wizards/AISPELL.C:1333 holds the
            code; AI_Pick_Attack_Spell = 1.31 bytes [work/harness/game/WIZARDS.EXE] | play case NOT REACHED
            (2026-10-25 21:55): AI_Pick_Attack_Spell(1) was not called in 15 turns; other attack spells it knew, made
            researchable: []; AI_Choose_Overland_Spell(1) entered on turns [137, 138, 139, 140, 141, 142, 143, 144,
            145, 146, 147, 148]
242. GAME    An AI that runs out of mana keeps the world frozen one more turn: AI_Drop_Bad_Globals (e318:4888) clears
            all 24 of the AI's global slots when its mana reserve is 0 - Time Stop (slot 6) included - but leaves
            time_stop_player set, so the next Next_Turn (9ec1:0000) is still a Time Stop turn (only the caster acts)
            until its upkeep branch finds mana < 200 and clears it. The AI also cancels Time Stop / Suppress Magic only
            at mana 0, after unpaid upkeep has already cost it its summons (policy, tuning). COMMUNITY-KNOWN (W237AI).
            Re-checked (N221): AISPELL.C AI_Drop_Bad_Globals 2253-2278: at mana 0 all 24 cleared, time_stop included,
            time_stop_player untouched; NEXTTURN.C 121-128: the next turn is still a Time Stop turn until reserve -
            200 < 0 clears it.
            In game (2026-10-22, tools/harness/regress.py 242): turn 106 -> 107: human gold 987 -> 987; wizard 2
            time_stop now 0, time_stop_player 0
243. READ+asm Confusion + Dispel steals a unit: a confused unit whose roll is 'fights for the other side' gets its
            BattleUnit.owner flipped for its turn, and the flip back - in Combat_Main (75eb:06a8-0702) and Combat_End's
            owner restore (a4fa:0000, units with combat_flags & 2) - runs only while the Confusion flag (combat_flags
            bit 2) is still set. Dispelling the Confusion during that turn clears the flag, so the unit stays on the
            caster's side for the rest of the battle (and Combat_End does not restore it). Related: #209
            (confusion_result never reset). COMMUNITY-KNOWN (W255FIX, 'the confusion+dispel permanent control bug').
            Static check (2026-10-24, tools/harness/regress.py 243): wizards/COMBAT.C:190 holds the code; Combat_Main
            = 1.31 bytes; Combat_End = 1.31 bytes [work/harness/game/WIZARDS.EXE]
244. SRC     Confusion's 'moves randomly' result does nothing to AI units: only Combat_Main's human loop (75eb:0000)
            acts on confusion_result == 1 (Confused_Unit_Random_Move); AI_Combat_Turn (9218:108c) never reads
            confusion_result (the readers are Combat_Main, Combat_Turn_Start, Combat_Check_Winner, Combat_Count_Sides,
            AI_Target_Dispel, Dispel_Square), so a confused AI unit that rolled 'moves randomly' is commanded normally.
            COMMUNITY-KNOWN (W262FIX).
            Re-checked (N221): grep confusion_result: readers COMBAT.C (human loop 406), COMBATUI, COMBCAST, COMBDISP,
            COMBMOVE (sets), COMBTARG, UNITSTAT - none in COMBTACT / COMBAI.
            Static check (2026-10-24, tools/harness/regress.py 244): wizards/COMBAT.C:190 holds the code; Combat_Main
            = 1.31 bytes; AI_Combat_Turn = 1.31 bytes [work/harness/game/WIZARDS.EXE]
245. GAME    Summon Champion with no champions left usually fails: Hero_Pick_Random (a0ec:0839) tries up to 10 / 100
            random picks in the champion pool and then falls back to the whole hero pool, but does not reset its try
            counter (local_8), so the fallback do-while runs exactly once - one random hero, which must also pass the
            dead / book / fame tests - before giving up with -1. COMMUNITY-KNOWN (W285FIX).
            Re-checked (N221): our source note at src/wizards/WIZSTATS.C:246 states it.
            In game (2026-10-23, tools/harness/regress.py 245): Overland_Cast_Spell (player, spell) None;
            Summon_Hero_Cast None; Hero_Pick_Random calls (mode, pool) [(1, 2)]; tries counted 101
246. GAME     Resistance auras count twice against Terror: Combat_Turn_Start (7719:0047) rolls Terror with
            Roll_Resist(unit, p_aura_resistance[owner] + 1, ...) (7719:01dc-01e6), but that aura sum (Prayermaster /
            Resistance To All / Holy Bonus) is already added to every own unit's resistance by
            Battle_Unit_Combat_Modifiers (9748:2339), so units under such a leader resist Terror with the aura counted
            twice. COMMUNITY-KNOWN (W314FIX).
            In game (2026-10-24, tools/harness/regress.py 246): p_aura_resistance [0, 1, 0, 0, 0, 0, 0] (wizard 1 =
            index 1); Terror (attacker's) 1; Terror rolls from Combat_Turn_Start (the copy's resist, modifier, unit)
            [(9, 2, 2), (5, 2, 13)]; unit types {2: 113, 13: 104}, their type resistance {2: 8, 13: 4} - every roll:
            resist = type + aura and modifier = aura + 1
247. GAME    Wraith Form shields its unit from Flame Strike, Holy Word and Death Spell: Flame_Strike_All (b1af:195a),
            Holy_Word_All (b1af:1a3b) and Death_Spell_All (b1af:1bce) skip any target whose unit / combat / item
            enchantments have bit 0x20 = Wraith Form (spell 181) - the same mix-up as #222 with the Magic Immunity
            ability bit (BattleUnit +0x18 bit 0x20). Wraith Form is meant to give weapon immunity, not spell immunity.
            (Flame Strike also skips Righteousness, 0x40000000; Holy Word skips Spell Lock, 0x4000; Death Spell skips
            Death Immunity - those are intended.) COMMUNITY-KNOWN (W318FIX). The same Wraith-Form-for-Magic-Immunity
            test is in Wrack_Turn (b66a:0106: Wraith Form units are skipped by Wrack, W529FIX) and in
            Overland_Cast_Spell (ba2c:09c4: Resist Magic, spell 41, is refused on a Wraith Form unit - 'already has',
            W525FIX). The AI's own target picker repeats it: AI_Combat_Spell_Target (8a20:0000) refuses Resist Magic
            (0x29) on a unit with enchantment bit 0x20 (Wraith Form) (W715FIX).
            Re-checked (N221): COMBDISP.C 598 / 618 / 653 headers (Wraith Form skips) and SPELLFX.C 146 Wrack.
            In game (2026-10-22, tools/harness/regress.py 247): unit 2 (Wraith Form) {'figures_alive': 6,
            'front_damage': 0} -> {'figures_alive': 6, 'front_damage': 0}; unit 13 {'figures_alive': 8,
            'front_damage': 0} -> {'figures_alive': 1, 'front_damage': 0}
248. GAME    Holy Weapon cast during a battle gives no to-hit bonus: Unit_Apply_Modifiers (9748:122d) applies Holy
            Weapon's +1 to-hit (melee and missile) only when the bit 0x80 is in the overland unit or ITEM word (uVar7 =
            Unit hi | BattleUnit +0x2e) or the owner has Holy Arms, then copies it into combat_enchant_hi; a combat-cast
            Holy Weapon lands directly in combat_enchant_hi (+0x3c), which that test never reads, and Unit_Enchant_Bonus
            has no Holy Weapon case. Same family as #235 (combat-cast Flight). COMMUNITY-KNOWN (W323FIX).
            Re-checked (N221): UNITSTAT.C Unit_Apply_Modifiers 452-453: Holy Weapon only from holy_arms or ench = unit
            | item enchantments (no combat_enchantments).
            In game (2026-10-22, tools/harness/regress.py 248): turtle melee_hit_bonus 0 -> 0; combat_enchantments 0x0
            -> 0x800000
249. GAME    Lair treasure of exactly 1 gold or 1 mana is not mentioned: Treasure_Show (6d36:06f7) lists gold and mana
            crystals only when the amount is > 1 (6d36:078c / 07f0 'cmp 1 / jle'), so an amount of 1 is granted
            silently. Display only. COMMUNITY-KNOWN (W379FIX).
            In game (2026-10-24, tools/harness/regress.py 249): gold 1: text "Inside you find .", gold 987 -> 1002;
            gold 2: text "Inside you find 2 gold.", gold 987 -> 1003
250. SRC     The city production preview can show stray To Hit bonuses: Battle_Unit_Init_From_Type (7504:0000) copies the
            0x24-byte UnitType record into the shared battle-unit buffer and clears +0x27, +0x39 and the shown-bonus
            bytes +0x64..+0x6c, but not melee_hit_bonus / ranged_hit_bonus (+0x24 / +0x25), which keep whatever the last
            unit shown in that buffer had. Display only. COMMUNITY-KNOWN (W336FIX). The same buffer field +0x26
            (block_bonus, 'To Def') is not cleared either (W644FIX).
            Re-checked (N221): our source note at src/wizards/UNITFIG.C:54 states it.
            Static check (2026-10-24, tools/harness/regress.py 250): wizards/UNITFIG.C:54 holds the code;
            Battle_Unit_Init_From_Type = 1.31 bytes [work/harness/game/WIZARDS.EXE]
251. GAME     An invisible obstacle in the middle of open-field battles: Combat_Mark_Wall_Obstacles (a76b:0064) marks
            the central path cell (+0xed, the spot of a central structure) impassable unless the backdrop is 2 (city) -
            so also in open-field battles (backdrop 0). That contradicts the battlefield's own movement-cost map,
            Battlefield_Build_Move_Costs (df82:29d8), which blocks the centre only when the backdrop is neither 0 nor 2.
            Ground units then cannot path through that open-field square and the AI cannot reach a unit standing on it.
            COMMUNITY-KNOWN (W348FIX: the test becomes backdrop == 0).
            In game (2026-10-25, tools/harness/regress.py 251): backdrop 0; centre cell (6, 11): the battlefield's own
            ground cost 2, the human's movement map 2; writes to the movement map's centre cell in the neutral turn
            (writer: values) {'Combat_Mark_Wall_Obstacles': [255], 'Mem_Copy_Far': [2]}
252. QUIRK   The mouse shows the hourglass while an AI wizard talks to you: Next_Turn (9ec1:0151) sets the hourglass
            cursor (cursor table 0x106) right before AI_Diplo_Turn_Vs_Human, whose conversations are interactive.
            Cosmetic. COMMUNITY-KNOWN (W350FIX uses the normal cursor table 0xee).
            Static check (2026-10-24, tools/harness/regress.py 252): wizards/NEXTTURN.C:66 holds the code; Next_Turn =
            1.31 bytes [work/harness/game/WIZARDS.EXE]
253. GAME     The AI's hidden liking makes it MORE hostile: AI_Hostility_Replan (f978:12ac) builds the hostility
            chance from low relation ((100 - relation) / 4, or more when relation < 0) plus a personality term, then
            ADDS relation_bias[player][other] (f978:1508 add) - the hidden 'how much I like him' value - so a wizard the
            AI likes is likelier to be set hostile and one it dislikes less likely. COMMUNITY-KNOWN (W372FIX: add ->
            sub). Its index is also transposed - see #305 (W389DIPL).
            In game (2026-10-24, tools/harness/regress.py 253): hostility chance of wizard 1 (personality 5) toward
            the human: with relation_bias +50 [55]; with 0 [5]
254. GAME    A unit with Water Walking AND non-corporeality counts twice for crossing water: Stack_Movement_Modes
            (5d70:00b8) counts, for the water mode (4), +1 for Water Walking (unit or item 0x100) and, separately, +1
            for being non-corporeal (UnitType flag 0x800 or Wraith Form 0x20) for the same unit, so the 'every unit can
            cross water' count can be met with one unit short. The patch's second claim (a flyer stacked with a non-
            corporeal unit has to walk) is in the same counting code - PROVISIONAL, not traced. COMMUNITY-KNOWN (W398FIX
            rewrites the procedure).
            Re-checked (N221): our source note at src/wizards/UNITMOVE.C:66 states it.
            In game (2026-10-23, tools/harness/regress.py 254): after keypad 8: {161: (29, 26), 173: (29, 26)} (water
            square (29, 26))
255. DISPUTED Deployment slot 9 (the central square): Combat_Deploy_Side (8f51:1f73) skips it for every battlefield
            except backdrop 2 (city) (8f51:2174 / 2204). That matches 1.31's own model - Battlefield_Build_Move_Costs
            (df82:29d8) leaves the centre open exactly for backdrops 0 and 2 - so only open fields lose a usable square
            here. The community treats the city centre as a structure and reports 'city defenders start combat from
            invalid central structure position' (W410FIX makes both tests backdrop == 0); whether the city centre is
            drawn as a blocking structure was not checked.
            Static check (2026-10-23, tools/harness/regress.py 255): wizards/COMBTARG.C:997 holds the code;
            Combat_Deploy_Side = 1.31 bytes; Battlefield_Build_Move_Costs = 1.31 bytes [work/harness/game/WIZARDS.EXE]
256. GAME     Pathfinding ignores enemies standing in a Tower of Wizardry from the other plane: Path_Apply_Obstacles
            (7b88:1325) considers a unit only if Unit.plane equals the path's plane (7b88:133e-1346), with no in_tower
            exception - a tower occupies both planes, so a unit in it registered on the other plane is not marked as an
            obstacle and Path_Find routes through its square. COMMUNITY-KNOWN (W407FIX adds the in_tower test).
            In game (2026-10-24, tools/harness/regress.py 256): tower square cost after the obstacles with the neutral
            unit on plane 1: 2 (row 27, x 28..33: [6, 1, 8, 2, 255, 255]); on plane 0: 255 ([6, 1, 8, 255, 255, 255])
257. GAME    Terror (a Death combat enchantment) freezes Death-Immune units: Combat_Turn_Start (7719:0047) makes every
            enemy unit resist Terror or lose its turn with no Death Immunity test, and Resist_Bonus (a22c:00ad) gives
            Death Immunity no bonus (only Magic Immunity's +30 protects), so Undead and Death creatures can be
            terrified. COMMUNITY-KNOWN (W440FIX).
            Re-checked (N221): COMBMOVE.C Combat_Turn_Start 132-140: Terror's Roll_Resist with no immunity test;
            COMBRES.C 115 Resist_Bonus header: Death Immunity not listed.
            In game (2026-10-24, tools/harness/regress.py 257): Skeletons (battle unit 7) abilities 0xdc (Death
            Immunity 0x40); combat enchantments after the cast [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; the Terror roll
            made for it
258. GAME    Death Immunity does not stop a Create Undead attacker's damage: in Attack_Resolve (a22c:0a69) damage from
            an attacker with Create Undead (ability_flags 0x80) goes to the 'raises undead' bucket 1 unless the DEFENDER
            has Magic Immunity (abilities 0x20) - Death Immunity (0x40) is not tested, so e.g. a Death-immune unit
            killed by Ghouls / undead-creating units is counted for undead creation. COMMUNITY-KNOWN (W496FIX).
            Re-checked (N221): COMBRES.C Attack_Resolve 499 / 514 / 522 / 536: AFLAG_CREATE_UNDEAD damage to the
            undead bucket unless ABILITY_MAGIC_IMMUNITY; Death Immunity not tested.
            In game (2026-10-24, tools/harness/regress.py 258): Ghouls ability_flags 0x81 (Create Undead 0x80);
            Skeletons abilities 0xdc (Death Immunity 0x40): damage (normal, drain, destroy) [0, 6, 0]; Paladins
            abilities 0x20 (Magic Immunity 0x20): [5, 0, 0]
259. GAME    Gaia's Blessing can turn a Chaos Node into hills: City_Gaias_Blessing_Turn (b425:1850) changes a volcano in
            the city area to hills with a 10% roll per turn, using Tile_Is_Volcano (f319:12a1), which also returns true
            for raw 0xaa - the Chaos node's volcano tile - so the node square becomes ordinary hills terrain (the Node
            record itself is not touched; what that does to the node is PROVISIONAL). Change_Terrain_Cast uses the same
            predicate. COMMUNITY-KNOWN (W492FIX).
            Re-checked (N221): our source note at src/wizards/TERRAIN.C:927 states it.
            In game (2026-10-23, tools/harness/regress.py 259): City_Gaias_Blessing_Turn(3): Tile_Is_Volcano(15, 29,
            0) on the Chaos Node tile = 1
260. READ+asm Call Lightning with Sound Effects off can corrupt memory: Call_Lightning_Turn (b66a:03c9) ends with
            Heap_Release(p_world_block) (b66a:0567), whose matching Heap_Mark happens only inside
            Combat_Load_Spell_Sound (a76b:0836) when sound is on (game_config == 1); with sound off nothing is marked,
            so the release rolls the world block's used size back to whatever older mark it holds and later allocations
            from that block can overwrite live data - the crash the community reports. COMMUNITY-KNOWN (W465FIX removes
            the release).
            Static check (2026-10-24, tools/harness/regress.py 260): wizards/COMBUTIL.C:366 holds the code;
            Call_Lightning_Turn = 1.31 bytes; Combat_Load_Spell_Sound = 1.31 bytes [work/harness/game/WIZARDS.EXE]
261. GAME     Neutral units never get Holy Bonus resistance: Combat_Start_Auras (a22c:194b) adds each player's Holy
            Bonus aura into p_aura_resistance[player] (i16[7]) in a loop bounded by num_players (a22c:1d98 cmp si,
            [0xbd9c]); the neutral player is index 5, beyond the loop unless six wizards play, so a neutral stack with a
            Holy Bonus unit gets no resistance from it. COMMUNITY-KNOWN (W425FIX: the bound becomes 7).
            In game (2026-10-24, tools/harness/regress.py 261): num_players 5; p_aura_holy_bonus [1, 0, 0, 0, 0, 1,
            0]; p_aura_resistance [1, 0, 0, 0, 0, 0, 0] (index = player, 5 neutral)
262. READ+asm Dispel Magic always removes unit curses: in Dispel_Square's curse branch (b1af:13a4-13b7) the roll is
            Random(250) <= x + 500 (add dx, 0x1f4) - always true since Random(250) is at most 250 - so the computed
            strength term x never matters and every combat curse on the target is dispelled. COMMUNITY-KNOWN (W431FIX
            removes the +500).
            Static check (2026-10-24, tools/harness/regress.py 262): wizards/COMBDISP.C:229 holds the code;
            Dispel_Square = 1.31 bytes [work/harness/game/WIZARDS.EXE]
263. SRC     Illusion-immune units cannot shoot through Wall of Darkness: Ranged_Target_Blocked (8f51:1e10) exempts a
            shooter from the wall (target inside the city, shooter outside -> blocked, code 2) only for the True Sight
            enchantment (hi word 0x40), while the invisibility test just above also accepts the Illusions Immunity
            ability (BattleUnit +0x18 bit 8) - so units with innate Illusions Immunity are blocked. COMMUNITY-KNOWN
            (W470FIX).
            Re-checked (N221): our source note at src/wizards/COMBTARG.C:875 states it.
            Static check (2026-10-24, tools/harness/regress.py 263): wizards/COMBTARG.C:876 holds the code;
            Ranged_Target_Blocked = 1.31 bytes [work/harness/game/WIZARDS.EXE]
264. READ+asm The Magic screen can crash after conquering a wizard: when a learned spell is the one being researched,
            Wizard_Learn_Spell (c3f5:22c5) sets research_spell = -research_spell as a 'choose new research' marker;
            callers passing 1 show Screen_Spell_Learned (where the player picks again - not traced here), but
            Conquest_Loot_Spells (aba4:10b6) calls it without the prompt (param 3 = 0), so the negative value stays, and
            MagicScr_Draw (6080:0f5f-0f76) reads the research spell's name from p_spell_data[research_spell] - a
            negative index, before the table. COMMUNITY-KNOWN (W483FIX adds a research_spell >= 0 test).
            Static check (2026-10-24, tools/harness/regress.py 264): wizards/MAGICSCR.C:368 holds the code;
            MagicScr_Draw = 1.31 bytes; Conquest_Loot_Spells = 1.31 bytes; Wizard_Learn_Spell = 1.31 bytes
            [work/harness/game/WIZARDS.EXE]
265. SRC     Banishing the HUMAN gives the winner no spells: Wizard_Banish (78ba:148a) calls Conquest_Loot_Spells (the
            'spells found in the ruins' reward) only in the AI-loser branch (after Screen_Banish_Vortex); when the loser
            is the human it only asks whether to resign, so an AI that banishes the human (who does not resign) loots
            nothing. COMMUNITY-KNOWN (W502FIX).
            Re-checked (N221): ENDGAME.C Wizard_Banish 772-777: Conquest_Loot_Spells only in the 'else if (loser !=
            PLAYER_NEUTRAL)' AI branch after Screen_Banish_Vortex.
            Static check (2026-10-24, tools/harness/regress.py 265): wizards/ENDGAME.C:738 holds the code;
            Wizard_Banish = 1.31 bytes [work/harness/game/WIZARDS.EXE]
266. GAME    Any city-damaging spell or event destroys an outpost: City_Collateral_Damage (4a3f:1292) ends with
            'population < 1 or size < 1 -> City_Remove', and an outpost has population 0 and size 0 (Create_City
            4a3f:0d05; Settler_Found_City sets only population_tens), so every call on an outpost removes the town.
            Combat_End guards its call with population != 0, but Earthquake_Effect, City_Chaos_Rift_Turn,
            Call_The_Void_Effect (also the Meteor event), Natures_Wrath_Strike, Raise_Volcano_Cast and Meteor_Storm_Turn
            do not - Meteor Storm calls it (0 population, 1% buildings) every turn on every unprotected city not owned
            by the caster, so it should wipe out all other wizards' and neutral outposts on its first turn. COMMUNITY-
            KNOWN (W526FIX 'cities disappearing for no reason'). W648FIX is the community's fix ('when an outpost would
            be destroyed by a spell effect, it won't be'). GAME 2026-10-17 (tools/harness/check_266.py,
            work/reports/check_266.txt): SAVE9 with Meteor Storm switched on for the human (global slot 0xd): the AI
            outpost Salamis (wizard 2, (4,15), population 0, size 0) is gone after the turn change (turns 106 -> 108;
            this game copy ends a turn by itself when no unit is left, so two turn changes ran); control without Meteor
            Storm over the same two turns: Salamis untouched, 28 cities.
            In game (2026-10-24, tools/harness/regress.py 266): turn 108, 27 cities; gone: ['Salamis']; Salamis now
            None; => Salamis REMOVED
267. GAME    The turn counter keeps running during Time Stop: Next_Turn (9ec1:0000) does game_turn++ every turn, also
            while a Time Stop holds everyone else still (the Time Stop branch only skips the other players' turn
            processing and charges the caster 200 mana), so the date, everything that reads game_turn (e.g. Autosave's
            every-4th-turn test) advances during the frozen turns. COMMUNITY-KNOWN (W560FIX).
            In game (2026-10-22, tools/harness/regress.py 96): time_stop_player 1; turn 106 -> 107; power_history
            bytes changed: 1 (first [106])
268. GAME    Haste adds no movement on the turn it is cast: in Combat_Cast_Spell's unit-enchantment case (8a20:1a8e)
            Haste's combat flag 0x800 is set BEFORE the moves check, so Unit_Combat_Moves already returns the doubled
            allowance, which never equals the unit's current moves; the code then keeps the current (undoubled) moves
            and, in this branch, always writes them back after the stat recompute. The doubling starts next turn.
            COMMUNITY-KNOWN (W567FIX).
            Re-checked (N221): our source note at src/wizards/COMBCAST.C:886 states it.
            In game (2026-10-22, tools/harness/regress.py 268): turtle moves 4 (flags 0x0) -> 4 after Haste (flags
            0x800) -> 8 next turn
269. GAME     The spellbook's 'turns to cast' goes wrong for powerful wizards: Spellbook_Build (9a4b:026b) computes mana
            per turn as mana_percentage x power_base / 100 with imul (32-bit product in DX:AX) followed by cdq
            (9a4b:0353), which throws the high word away and sign-extends AX - so once the product exceeds 32767 (e.g.
            power 328+ with all power to mana) the dividend becomes negative and the estimate uses a wrong, negative
            mana income. Display estimate only. COMMUNITY-KNOWN (W450FIX removes the cdq).
            In game (2026-10-24, tools/harness/regress.py 269): power base 485; at 100% net_mana_per_turn -170
            (product 48500); control at 30%: net 145 -> upkeep 0; predicted with the wrap -170, without 485
270. SRC     Tower defenders from the other plane stay out of the battle: Combat_Load_Armies (7eb0:18f3) takes the
            defending units on the tile only if Unit.plane == combat plane, and Combat_Strategic (888b:00c9, auto-resolve)
            does the same, with no in_tower exception - so units standing in a Tower of Wizardry but registered on the
            other plane do not fight (what then happens to them if the tower falls is PROVISIONAL). Same family as #256.
            COMMUNITY-KNOWN (W469FIX).
            Re-checked (N221): COMBTURN.C Combat_Load_Armies 851 and COMBAUTO.C Combat_Strategic 145: Unit.plane ==
            the combat plane, no in_tower exception.
            Static check (2026-10-24, tools/harness/regress.py 270): wizards/COMBAUTO.C:82 holds the code;
            Combat_Strategic = 1.31 bytes; Combat_Load_Armies = 1.31 bytes [work/harness/game/WIZARDS.EXE]
271. READ+asm Wall of Fire and Wall of Darkness do nothing at an outpost: Battlefield_Generate (df82:0000) gives a
            size-0 town backdrop 1 and then jumps past the fortress test and the collection of the town's enchantments
            (df82:00a6-00b1 -> 01db), so an outpost's Wall of Fire / Wall of Darkness are never passed to the
            battlefield. (The patch's display claims - Flying Fortress and the wizard's fortress not drawn - were not
            checked.) COMMUNITY-KNOWN (W541FIX). The same holds for an outpost's Wall of Stone walls (W687FIX: 'Wall of Stone has no combat effect on
            Outposts'), settled by reading: the outpost branch computes neither walls nor wall_bits, and
            Battlefield_Generate_Map's outpost case never reads walls (clarified using ReMoM repo).
            Static check (2026-10-24, tools/harness/regress.py 271): wizards/BFGEN.C:248 holds the code;
            Battlefield_Generate_Map = 1.31 bytes [work/harness/game/WIZARDS.EXE]
272. GAME    Swamps give no food: Terrain_Food (f319:00a1) sends the swamp tile (raw 0xa6) through its jump table to the
            0-food exit, while the manual (and the community patch) give swamps 1/2 food; our data/terrain_types.tsv and
            the GAME-confirmed growth check agree with the code (0). COMMUNITY-KNOWN (W607FIX retargets that jump to the
            1/2-food case).
            The game contradicts itself (10/23): the Surveyor's terrain text (SURVEYOR.C Surveyor_Terrain_Text,
            TERR_CAT_SWAMP) prints "1/2 food" for a swamp, so the displayed yield and the computed one differ - a
            display / rules mismatch whichever is meant. The other terrain texts there agree with Terrain_Food
            (grassland 1 1/2, forest / hills / shore 1/2, river 2, none for desert / mountain / tundra).
            In game (2026-10-23, tools/harness/regress.py 272): Cornwell area all swamp: City_Terrain_Food_Cap = 0
273. GAME    A Lion Heart ITEM gives no extra hits outside combat: Unit_Max_Hits (9748:0a98; callers: Unit_Heal_Step,
            the map health bar Draw_Unit_Badges, and the combat setup before Battle_Unit_Max_Hits) adds Lionheart's +3
            only for the unit's own enchantment, not for the item power (item bits are not read there; in combat
            Hero_Item_Enchants puts them into the battle unit), so a hero with a Lion Heart item heals overland and
            shows its health bar as if without it. COMMUNITY-KNOWN (W680FIX).
            Re-checked (N221): UNITSTAT.C Unit_Max_Hits 202: Lionheart only from p_units[].enchantments (no item
            bits).
            In game (2026-10-24, tools/harness/regress.py 273): Unit_Max_Hits(hero 19): with the Lion Heart item 10;
            with the Lionheart enchantment 13
274. GAME     A shrinking big city gets a size that does not exist: when Turn_City_Growth (c3f5:14ed) lowers population
            it recomputes size = (pop + 3) / 4 (c3f5:1865-1883) without the cap at 5 ('Capital') that
            City_Collateral_Damage applies, so a city of 21+ that loses a citizen gets size 6 or more - past the 6-entry
            size-name table (hamlet .. capital) used e.g. by the 'the <size> of <city>' notices. COMMUNITY-KNOWN
            (W605FIX).
            In game (2026-10-22, tools/harness/regress.py 274): turn 107: Rastenford population 24, size 6
275. GAME    A banished AI wizard loses its mana every turn: while the AI casts Spell of Return, AI_Balance_Gold_Mana
            (d208:20c3) SETS the mana reserve to its gold (with Alchemy) or gold / 2 and zeroes gold each turn,
            discarding whatever mana it held (the Return itself progresses on casting skill without mana, so the casting
            is unaffected, but the wizard comes back with only that turn's converted gold). COMMUNITY-KNOWN (W582FIX).
            Re-checked (N221): our source note at src/wizards/AITURN.C:697 states it.
            In game (2026-10-22, tools/harness/regress.py 275): turn 107: wizard 4 mana 168 (was 1000), gold 127 (was
            400), casting 214
276. SRC     A Lawful AI razes the towns of wizards IT betrayed: AI_Decide_Raze (a76b:13bb) gives a Lawful AI +25 raze
            chance when relation_bias[AI][owner] is non-zero (else -200), and because breaking a treaty raises the
            BREAKER's own bias row (#160), that value is set when the AI broke a treaty with the owner - the opposite of
            punishing a treaty-breaker. COMMUNITY-KNOWN (W583DIPL).
            Re-checked (N221): COMBUTIL.C 661 header: Lawful 25, or -200 with no relation bias toward the owner (the
            bias a break raises, #160).
            Static check (2026-10-24, tools/harness/regress.py 276): wizards/COMBUTIL.C:665 holds the code;
            AI_Decide_Raze = 1.31 bytes [work/harness/game/WIZARDS.EXE]
277. GAME    Planar Travel / Astral Gate shifts can be refused for a full stack you did not move:
            Planar_Travel_Dest_Check (51b2:0c54) tests 9 < stack_unit_count + units already at the destination, but
            stack_unit_count counts every unit of the selected stack - deselected and finished ones too - while
            Overland_Plane_Button moves only the ACTIVE units, so shifting part of a stack onto a partly filled tile is
            refused although it would fit. COMMUNITY-KNOWN (W599FIX).
            Re-checked (N221): MAPUNITS.C 459 / 498 / 509: stack_unit_count + count > MAX_STACK; stack_unit_count
            counts every stack slot (the active flag is per slot).
            In game (2026-10-23, tools/harness/regress.py 277): stack panel icons 6; stack_units (unit, active) before
            [(0, 1), (1, 1), (107, 1), (161, 1), (173, 1), (192, 1)], after the clicks [(0, 1), (1, 1), (107, 0),
            (161, 0), (173, 0), (192, 0)]; planes after Plane: {107: 0, 161: 0, 173: 0, 192: 0, 1: 0, 0: 0}
278. READ+asm The AI cannot target walls with Disrupt: AI_Target_Disrupt (8cf2:2065) checks has_city_walls (Battlefield
            +0x1556) correctly, then looks for a standing wall segment at Battlefield +0x15d0, +0x15c0, +0x15b8 ... -
            past the wall_segments array (+0x1558, u16[16], up to +0x1577) into unrelated fields - so it practically
            never finds a target and the AI does not cast Disrupt. COMMUNITY-KNOWN (W585AI: the first offset becomes
            +0x155e, plus target coordinates). Phase 2 work list C (step 59): AI_Target_Cracks_Call (8cf2:210d) has the
            same wall fallback block with the same wrong offsets, and its per-unit '+30 when the enemy stands on a wall
            square' test reads wall_segments with the unit's RAW combat coordinates (8cf2:2254 'cmp es:[bx+0x1558], 1'
            with bx = y x 8 + x x 2 for x 5-7, y 11-13), i.e. Battlefield +0x15ba..+0x15ce instead of [(y-10) x 4 +
            (x-5)] - past the array and past the end of the 0x15c0-byte block, so the bonus depends on unrelated memory.
            Static check (2026-10-24, tools/harness/regress.py 278): wizards/COMBSPL.C:876 holds the code;
            AI_Target_Disrupt = 1.31 bytes [work/harness/game/WIZARDS.EXE]
279. SRC     Dispels also hit dead units: Dispel_Square (b1af:0656, combat Dispel Magic / Disenchant) processes every
            battle unit whose combat_x / combat_y is the target square with no status test, so dead units lying there
            are rolled against too; Disenchant_Area_Overland (ba2c:00e4) does the same with every unit record on the
            tile without testing for a removed unit (owner 0xff), treating it as an enemy. Mostly wasted rolls and odd
            'dispelled' notices. COMMUNITY-KNOWN (W655FIX combat, W673FIX overland).
            Re-checked (N221): COMBDISP.C 221 header (no status test); OVERCAST.C Disenchant_Area_Overland: x / y /
            plane and owner != player only (a removed unit is reached only when its plane matches).
            Static check (2026-10-24, tools/harness/regress.py 279): wizards/COMBDISP.C:229 holds the code;
            Dispel_Square = 1.31 bytes; Disenchant_Area_Overland = 1.31 bytes [work/harness/game/WIZARDS.EXE]
280. SRC    Entangle does not slow anyone the turn it is cast: Entangle's -2 moves is applied only at
            Combat_Turn_Start (7719:0047); Unit_Combat_Moves has no Entangle term, so the recompute after the cast in
            Combat_Cast_Spell (8a20:1a8e) restores full moves or keeps the current ones. Matters when the defender
            casts it (the attacker's units still have their full moves that turn). COMMUNITY-KNOWN (W617FIX).
            Re-checked (N221): COMBCAST.C 904-918: the effect holds (no slow-down the turn Entangle is cast) but not
            by the entry's mechanism: Unit_Combat_Moves (COMBUTIL.C 480) has no Entangle term; Entangle's -2 is
            applied only in Combat_Turn_Start (COMBMOVE.C 142); the recompute after the cast restores full moves or
            keeps the current ones.
            Static check (2026-10-24, tools/harness/regress.py 280): wizards/COMBCAST.C:697 holds the code;
            Combat_Cast_Spell = 1.31 bytes [work/harness/game/WIZARDS.EXE]
281. READ+asm The 'you have a treaty - attack anyway?' question is skipped for one battle kind: Overland_Attack
            (7d45:0000) asks only when combat_site (DS:0x9284) is 0 (field) or 1 (city) (7d45:02b2-02c0); the attack
            set-up also produces kind 5 (7d45 branch setting combat_site = 5; per the patch text, sea battles -
            PROVISIONAL), where a treaty partner is attacked without confirmation (and the treaty broken). COMMUNITY-
            KNOWN (W665FIX).
            Checked (2026-10-24, source; no case yet): the COMBAT_AT_ values are -1 none, 0 units, 1 city and 5
            lair (ENUMS.H); MOVECHK.C sets 5 only for a square with an active lair (Lair_At) and with the lair's
            guards - the neutral player - as the target, so the treaty test (which needs a defender below the
            neutral player) is never relevant there; no sea-battle kind exists in 1.31. PROVISIONAL: whether a
            treaty partner's units can stand on an active lair square at all.
            Static check (2026-10-24, tools/harness/regress.py 281): wizards/ATTACK.C:65 holds the code;
            Overland_Attack = 1.31 bytes [work/harness/game/WIZARDS.EXE]
282. GAME     Spell trading / conquest looting can overrun the stack: Diplo_Tradeable_Spells (aba4:05e2; used by
            conquest loot, AI-vs-AI trades and the trade menu) gathers EVERY spell that b knows and a lacks in their
            shared realms plus Arcane into a 60-byte local list (frame 0x48) with no bound on the count, so a gap of
            more than 60 such spells (late game, after a conquest) writes past the list over the other locals and the
            return address. COMMUNITY-KNOWN (W683FIX adds the bound).
            In game (2026-10-23, tools/harness/regress.py 282): Diplo_Tradeable_Spells(receiver 161, giver 1, min 0):
            79 spells gathered into list[60]
283. GAME     Barbarian Spearmen and Swordsmen never go raiding: AI_Neutral_City_Raiders (f978:05fa) skips any candidate
            raider unit type <= 40 (f978:08ea cmp 0x28 / jle), which is meant to drop the race-14 ships and catapult
            (35-38) but also drops unit types 39 (Barbarian Spearmen) and 40 (Barbarian Swordsmen). COMMUNITY-KNOWN
            (W634FIX: the bound becomes 38).
            In game (2026-10-24, tools/harness/regress.py 283): Spearmen / Swordsmen garrisons: {'city': 7,
            'garrison': 7, 'types': [40, 39, 39, 40, 39, 40, 40], 'raiders': 2, 'created': 0}; Bowmen control:
            {'city': 7, 'garrison': 7, 'types': [41, 41, 41, 41, 41, 41, 41], 'raiders': 2, 'created': 2}
284. SRC     A ranged attack does not always end the shooter's turn: Combat_Unit_Attack (a22c:1da4) 'ends the turn' of a
            missile attacker with moves -= 20 half-moves (10 MP, floor 0), so a unit with more than 10 movement points
            (e.g. a Hasted fast unit) keeps moving and may shoot again. COMMUNITY-KNOWN (W747FIX).
            Re-checked (N221): COMBRES.C Combat_Unit_Attack 822-824: moves - 20, floored at 0.
            Static check (2026-10-24, tools/harness/regress.py 284): wizards/COMBRES.C:761 holds the code;
            Combat_Unit_Attack = 1.31 bytes [work/harness/game/WIZARDS.EXE]
285. GAME    Wait never hands over to the other plane: Find_Next_Unit (5315:08dd) looks for the next ready unit on the
            viewed plane, falls back to the WAITING units of that plane (resetting every waiting unit to ready) before
            trying the other plane, so after Wait the selection keeps cycling the waiting units here while ready units
            on the other plane are never offered. COMMUNITY-KNOWN (W750FIX).
            In game (2026-10-23, tools/harness/regress.py 285): ready stacks at [(14, 29, 1), (29, 27, 0), (36, 24,
            0)]; after each W (view plane, unit, its plane): [(0, 161, 0), (0, 1, 0), (0, 1, 0), (0, 161, 0), (0, 161,
            0), (0, 1, 0), (0, 1, 0), (0, 161, 0), (0, 161, 0), (0, 1, 0), (0, 1, 0)]
286. SRC     Webbed units break free with missiles, not magic: Combat_Turn_Start (7719:0047) lets a webbed unit attack
            the web (BattleUnit +0x33 web strength) with max(ranged, melee) when its ranged type is 2x (missiles), melee
            only for other types below 101 (magic 3x included) and melee + ranged for 101+ - so bows and slings cut webs
            and magical ranged attacks do not; the type test looks like 2 written for 3. COMMUNITY-KNOWN (W784FIX).
            Re-checked (N221): COMBMOVE.C Combat_Turn_Start 149-157: class missile max(melee, ranged), > RANGED_THROWN
            melee + ranged, else melee.
            Static check (2026-10-24, tools/harness/regress.py 286): wizards/COMBMOVE.C:98 holds the code;
            Combat_Turn_Start = 1.31 bytes [work/harness/game/WIZARDS.EXE]
287. GAME    No random events for 5 turns after every program start: Event_Roll (6ad6:0000) forces the chance to 0 while
            its cooldown runs, and the cooldown is a DS global that is not saved (it starts at 5 when WIZARDS.EXE
            starts), so every load / continue suppresses events for 5 turns as if one had just happened. COMMUNITY-KNOWN
            (W810FIX; ReMoM marks it OGBUG).
            Corrected (2026-10-23, in game, tools/harness/regress.py 287): event_cooldown starts at 0 (its DS start
            value, not saved) and counts UP to 5; the chance is forced to 0 while it is below 5 - the same 5 turns
            after every load, but it does not 'start at 5'.
            In game (2026-10-23, tools/harness/regress.py 287): event_cooldown after the load 0, at the roll 1; chance
            0 (turns since the last event 106, difficulty 3)
288. QUIRK   Recall spells can be wasted in a battle at the Summoning Circle (where they would send the unit):
            Combat_Spell_Choice_Invalid (8cf2:1548) refuses the human's Recall Hero (205) at the circle's square but
            refuses Word of Recall (47) only while Spell of Return is being cast; and the AI's picker
            AI_Target_Recall_Hero (8cf2:2486) tests the FORTRESS square instead of the circle, so with a moved Summoning
            Circle the AI can cast Recall Hero right at it. COMMUNITY-KNOWN (W704FIX, W717FIX).
            Static check (2026-10-24, tools/harness/regress.py 288): wizards/COMBSPL.C:571 holds the code;
            Combat_Spell_Choice_Invalid = 1.31 bytes; AI_Target_Recall_Hero = 1.31 bytes
            [work/harness/game/WIZARDS.EXE]
289. SRC     A hero whose control changed in battle (Possession, Confusion 'fights for the other side', Creature
            Binding) is read from the CONTROLLER's hero tables: combat code indexes hero data by BattleUnit.owner, which
            those effects flip, instead of the hero's real owner (Unit.owner) - Unit_Combat_Moves (a76b:0c4d) takes item
            moves / Endurance from the controller's hired-hero slot of the same number, and Combat_Start_Auras
            (a22c:194b) takes Leadership / Prayermaster etc. from p_hero_stats[controller]. The patches list the same
            pattern for the spellcast banner and counter message names, item charges, spell-save modifiers and the
            human's combat spellbook (not each checked here). COMMUNITY-KNOWN (W719FIX, W721FIX, W722FIX, W723FIX,
            W724FIX, W725FIX, W728FIX).
            Re-checked (N221): our source note at src/wizards/COMBTACT.C:639 states it.
            Static check (2026-10-24, tools/harness/regress.py 289): wizards/COMBRES.C:690 holds the code;
            Combat_Start_Auras = 1.31 bytes; Unit_Combat_Moves = 1.31 bytes [work/harness/game/WIZARDS.EXE]
290. SRC     Combat enchantments cast by neutral creatures cannot be dispelled: Disenchant_Area_Combat (b1af:0000)
            dispels the enemy side's combat enchantments only 'if enemy side != 5' (neutral), so when fighting neutrals
            (lair / node defenders, raiders) their Mana Leak, Darkness, Wrack etc. are untouchable. COMMUNITY-KNOWN
            (W741FIX).
            Re-checked (N221): COMBDISP.C Disenchant_Area_Combat 131: 'if (enemy != PLAYER_NEUTRAL)' around the
            combat-enchantment loop.
            Static check (2026-10-24, tools/harness/regress.py 290): wizards/COMBDISP.C:91 holds the code;
            Disenchant_Area_Combat = 1.31 bytes [work/harness/game/WIZARDS.EXE]
291. SRC     Creatures summoned in combat skip the battlefield effects until the next turn: Combat_Summon_Add_Unit
            (7eb0:1744) -> Battle_Slot_Init (7eb0:17c9) sets the new unit up with Battle_Unit_Init (overland stat layer)
            only, never Battle_Unit_Combat_Modifiers (9748:2339: node auras, Prayer / High Prayer, True Light /
            Darkness, Leadership, curses' battlefield layer...), which is next applied at Combat_Turn_Start - so on the
            turn it appears a summon fights without them. COMMUNITY-KNOWN (W701FIX).
            Re-checked (N221): COMBTURN.C Battle_Slot_Init: Battle_Unit_Init (Unit_Apply_Modifiers) only; COMBCAST.C
            1048 adds no Battle_Unit_Combat_Modifiers.
            Static check (2026-10-24, tools/harness/regress.py 291): wizards/COMBTURN.C:780 holds the code;
            Combat_Summon_Add_Unit = 1.31 bytes; Battle_Slot_Init = 1.31 bytes; Battle_Unit_Combat_Modifiers = 1.31
            bytes [work/harness/game/WIZARDS.EXE]
292. SRC     Casting a spell can strip a unit's thrown / breath / gaze attack: after a battle unit casts,
            Combat_Spell_Action (8cf2:004b, end) sets ranged = 0 and ranged_type = 0xff when its spell points drop below
            3 and its ammo is 0 - meant for the magic ranged attack that runs on spell points, but the 'short range'
            attacks (types 100+) also have no ammo, so a caster with e.g. a breath or thrown attack loses it for the
            rest of the battle. COMMUNITY-KNOWN (W705FIX adds a ranged-type test).
            Re-checked (N221): COMBSPL.C 398-403: a unit caster with mana < 3 and ammo 0 loses ranged / ranged_type,
            no ranged-type test.
            Static check (2026-10-24, tools/harness/regress.py 292): wizards/COMBSPL.C:110 holds the code;
            Combat_Spell_Action = 1.31 bytes [work/harness/game/WIZARDS.EXE]
293. QUIRK   The Spell button stays on for a Caster-40 unit with no mana left: Unit_Has_Combat_Ability (7eb0:00ec, used
            for the combat buttons) returns 1 for any unit with the Caster 40 ability (BattleUnit +0x18 bit 0x4000)
            without looking at its remaining spell points, so the player can open the unit's spell list after it has
            spent everything. COMMUNITY-KNOWN (W689FIX).
            Static check (2026-10-24, tools/harness/regress.py 293): wizards/COMBTURN.C:158 holds the code;
            Unit_Has_Combat_Ability = 1.31 bytes [work/harness/game/WIZARDS.EXE]
294. GAME     Auto-resolve battle magic overflows for strong wizards: Combat_Strategic (888b:00c9, strategic combat)
            computes each realm channel's effect as channel x per-round spend / 5 with imul (32-bit DX:AX) followed by
            cdq (888b:0c6a-0c91), which drops the high word - with channels of books x 50..100 (#182) and a spend of
            skill / 3 the product passes 32767 for a powerful caster, wrapping to a wrong or negative value (what a
            negative term then does in the auto-resolve sums was not traced). Same pattern as #269. COMMUNITY-KNOWN
            (W654FIX; IW051 'fixing of spending mana in strategic combat' is probably the older attempt).
            In game (2026-10-24, tools/harness/regress.py 294): stop at the missile round: att_book_dmg 130 x
            att_spend 300 = 39000 (> 32767: True); att_magic_dmg read -5307; the true value / 5 = 7800, the 16-bit
            wrapped value / 5 = -5307
295. SRC     AI units walk through Wall of Fire unharmed: the wall's damage is applied by Wall_Of_Fire_Crossing
            (a76b:08ca), which only Combat_Move_Unit (7719:06f8, the player's / ordered moves) and Combat_Exchange
            (a22c:0332, an attack across the wall) call; the AI's mover AI_Move_Path (9218:226d) steps its units by
            writing combat_x / combat_y directly and never calls it, so an AI unit crossing a Wall of Fire takes no
            damage unless it attacks from outside. COMMUNITY-KNOWN (W569FIX).
            Re-checked (N221): Wall_Of_Fire_Crossing callers: COMBMOVE.C 301 and COMBRES.C 266 only; AI_Move_Path
            (COMBTACT.C 949 / 967) writes combat_x / combat_y itself.
            Static check (2026-10-24, tools/harness/regress.py 295): wizards/COMBMOVE.C:238 holds the code;
            Combat_Move_Unit = 1.31 bytes; Combat_Exchange = 1.31 bytes; AI_Move_Path = 1.31 bytes;
            Wall_Of_Fire_Crossing = 1.31 bytes [work/harness/game/WIZARDS.EXE]
296. SRC     The AI always 'sees' a unit on the city-gate square: AI_Target_Scan (9218:1836) accepts a target if
            Combat_Unit_Visible_To_Enemy says so OR the target stands on (8, 12), the gate square of a city battlefield, with
            no test that the battle is in a city - so an invisible unit standing on that square in any battle can be
            targeted by the AI. COMMUNITY-KNOWN (W793FIX).
            Re-checked (N221): COMBTACT.C 671: an invisible unit is skipped only when it is not on (BF_GATE_X,
            BF_GATE_Y), no city-battle test.
            Static check (2026-10-24, tools/harness/regress.py 296): wizards/COMBTACT.C:573 holds the code;
            AI_Target_Scan = 1.31 bytes [work/harness/game/WIZARDS.EXE]
297. GAME     A treaty made in the turn of first contact is erased at the end of that turn: contact is made mid-turn
            when a unit moves (Visibility_Rebuild 7851:0119 / Unit_Check_Contact 7851:053d set contacted both ways), and
            the diplomacy screens accept any contacted wizard, but met_stage stays 0 until Next_Turn calls
            Diplo_Mark_Met (736d:0000), which for every contacted wizard with met_stage 0 sets met_stage 1 AND
            diplomacy_status 0 both ways (736d:003f-0062): a Wizard Pact or Alliance signed that turn is silently gone,
            and the next AI_Diplo_Turn_Vs_Human sends the first-contact greeting (met_stage 1 -> 2, pending message =
            personality + 15). Also: Diplo_Declare_War (7057:10c8 / 10ee) sets met_stage 0 -> 1 on the human side, so a
            war declared on a wizard the human has not been greeted by is followed by the greeting audience (PROVISIONAL
            whether the greeting replaces the war message in the same pending slot). COMMUNITY-KNOWN (W517FIX: 'Greeting
            overrides DoW message', 'Greeting cancels treaties' - it NOPs the two status resets and makes Declare_War
            store met_stage 2).
            In game (2026-10-23, tools/harness/regress.py 297): status after the reply 1 (1 pact); after the turn (now
            107): 0 / 0 (both ways), met_stage (2, 0)
298. GAME    Units healed by a Healer can lose most of that turn's natural healing, depending on their index:
            Turn_Heal_Units (c3f5:2622) keeps each unit's natural-heal divisor in a per-unit byte (20 field, 10 city, 6
            Animists' Guild) and walks the units in index order; for a unit with the Healer ability it heals every unit
            on its tile by Unit_Heal_Step(.., 1) (c3f5:2503), which marks the healed unit by overwriting the SAME byte
            with 0x42. A unit with a higher index than the Healer then gets its own natural step with divisor 66 instead
            of 20 / 10 / 6 (heals about one point per 66 total hits, so usually 0-1); a unit with a lower index has
            already had its normal natural healing. Same stack, same healer, different healing by unit order. COMMUNITY-
            KNOWN (W679FIX, Drake178: 'healers override natural healing for units created after them' - it sets only the
            0x80 bit).
            Re-checked (N221): TURNUPD.C Turn_Heal_Units 1027-1063 and Unit_Heal_Step 998: one byte per unit holds the
            divisor (20 / 10 / 6) and HEAL_MARK_HEALER (0x42); units walked in index order.
            In game (2026-10-23, tools/harness/regress.py 298): turn 107: the Hydras at (30,28) by index [106, 172]:
            damage 60 -> [36, 40] (healed [24, 20])
299. SRC     Wall of Fire / Wall of Darkness cast during combat cannot be dispelled: Combat_Wall_Create (b66a:0636) sets
            only Battlefield wall_of_fire / wall_of_darkness (+0x1578 / +0x157a), while Disenchant_Area_Combat
            (b1af:0000) finds walls only through the Battlefield city_enchants copy (+0x157e, owner+1 per slot) and
            clears wall_of_fire / wall_of_darkness only when it removes that slot. A wall cast overland on the city is
            in city_enchants and can be dispelled; the same wall cast in the battle never is. COMMUNITY-KNOWN (W742FIX,
            Drake178: 'combat-cast Wall spells can't be dispelled'; its second claim, that overland walls are much
            easier to dispel in combat, is not checked here).
            Re-checked (N221): SPELLFX.C 323-328: Combat_Wall_Create sets wall_of_fire / wall_of_darkness only;
            COMBDISP.C 185-199 clears them only when the city_enchants copy slot is dispelled.
            Static check (2026-10-24, tools/harness/regress.py 299): wizards/COMBDISP.C:91 holds the code;
            Disenchant_Area_Combat = 1.31 bytes; Combat_Wall_Create = 1.31 bytes [work/harness/game/WIZARDS.EXE]
300. SRC     Disenchant Area (combat) gives enemy Magic Vortices on a unit's square a second dispel roll, and can remove
            the caster's own vortex: Disenchant_Area_Combat (b1af:0000) first rolls once against every vortex not owned
            by the caster, then calls Dispel_Square (b1af:0656) on the square of every active battle unit, and
            Dispel_Square's vortex loop rolls again against every vortex on that square with NO owner test. So an enemy
            vortex standing on a unit's square gets two chances to vanish, and the caster's own vortex on such a square
            can be dispelled by its own spell (also by a single-target Dispel Magic on that square). COMMUNITY-KNOWN
            (W740FIX, Drake178: 'Disenchants make an extra dispel attempt against Magic Vortices that happen to be on
            the same tile as a unit' - it passes an extra zero for single-tile Dispels).
            Re-checked (N221): COMBDISP.C Disenchant_Area_Combat 173-174 (vortices of others), then Dispel_Square per
            active unit (217); Dispel_Square 297-305 rolls every vortex on the square, no owner test.
            Static check (2026-10-24, tools/harness/regress.py 300): wizards/COMBDISP.C:91 holds the code;
            Disenchant_Area_Combat = 1.31 bytes; Dispel_Square = 1.31 bytes [work/harness/game/WIZARDS.EXE]
301. GAME     Moving toward a sea tile that holds your own transport makes every tile with your own units passable at
            cost 2: Path_Apply_Obstacles (7b88:1325), own-unit branch (7b88:1628-1665), asks 'is this a water tile
            (landmass 0) whose own transports can carry the non-self-propelled units here?' but reads the landmass and
            the transport list of the DESTINATION (args [bp+0x12] / [bp+0x14]) instead of the tile being marked ([bp-6]
            / [bp-8]). So with a sea destination holding an own ship, the capacity test is done once against that ship
            and every other tile with fewer own units than its capacity gets cost 2 - including water tiles held by own
            swimmers or flyers, which land units may then be routed across, and costlier land tiles that become cheap.
            (Effect on the actual move PROVISIONAL: not traced through Path_Walk_Check.) COMMUNITY-KNOWN (W598FIX: 'when
            a unit moved towards a sea tile, it'll set all tiles on the path already containing own units legal to
            enter' - it swaps the four operands).
            In game (2026-10-24, tools/harness/regress.py 301): cost of (31,26) / (29,26) after the obstacles: {'to
            the ship': {(31, 26): 2, (29, 26): 2}, 'control, to land': {(31, 26): 255, (29, 26): 255}}
302. GAME     The battlefield's open diamond is two squares too big on one side: Battlefield_Build_Move_Costs
            (df82:29d8) blocks four corners of the 21 x 22 grid - x+y <= 10, x-y <= -10, x-y >= 10 (rows 0-11) and x+y
            >= 32 (rows 10-21) - so the open area is 11 <= x+y <= 31 and -9 <= x-y <= 9: the bottom-right edge has two
            more diagonal lines (x+y = 30, 31) than the symmetric diamond the other three edges give (11..29). Units can
            move onto squares outside the area the other edges imply. (Where those squares fall on screen PROVISIONAL -
            drawing not traced.) COMMUNITY-KNOWN (W559FIX: 'units can leave valid combat area at the bottom edge' - it
            rewrites the corner loops as one test -9 <= x-y <= 9, 11 <= x+y <= 29).
            In game (2026-10-24, tools/harness/regress.py 302): open cells 200; x + y from 11 to 31; x - y from -9 to
            9; open cells with x + y >= 30: 19, e.g. [(11, 19), (11, 20), (12, 18), (12, 19), (13, 17), (13, 18)]
303. GAME     Killing the last enemy does not stop an AI / Auto combat turn: Battle_Apply_Damage (8f51:1ad9), when a
            unit's figures reach 0, stores Combat_Count_Sides() into the combat-over word DS:40e2 (8f51:1c7e-1c82)
            BEFORE it sets the unit's dead status (4 / 5 / 6, after the call). Combat_Count_Sides (8f51:2bc0) counts
            units with status 0, so the dying unit is still counted and the result is -1 (both sides alive) even when it
            was the last enemy. AI_Combat_Turn (9218:108c) breaks out of its unit loops only when that word is not -1,
            so the AI (or the human's Auto) side keeps moving and acting until its turn's loop runs out; the battle ends
            only at the later end-of-turn check. COMMUNITY-KNOWN (W561FIX: 'combat doesn't end during AI/Auto turn even
            if there are no remaining enemies' - it sets status 4 before the count).
            In game (2026-10-24, tools/harness/regress.py 303): dying battle unit 1 {'unit_index': 2, 'owner': 5,
            'status': 0, 'figures_alive': 0}; combat_winner -1; other living defenders []; all [{'unit_index': 19,
            'owner': 0, 'status': 0, 'figures_alive': 1}, {'unit_index': 2, 'owner': 5, 'status': 0, 'figures_alive':
            0}]
304. READ+asm AI Move Fortress targeting ignores a lost fortress: AI_Target_Move_Fortress (e318:3c7d) looks up the city
            at the wizard's fortress record (x / y / plane) without testing the record's alive flag (+3), so a banished
            AI still gets a target: if a city (now someone else's) stands on the old site, it is taken as the 'fortress
            city' and any own city with a bigger garrison is returned; if none stands there, the fortress-city index
            (local) is never set and ai_city_garrison is read at a stack-garbage index. AI_Pick_City_Spell (e318:3318)
            then gives Move Fortress category weight game_turn / 15 for a wizard that has no fortress (and
            AI_Pick_City_Spell_Target e318:4b49 uses the same lookup). Whether this replaces a Spell of Return already
            being cast is PROVISIONAL (cast-switch rule not traced). COMMUNITY-KNOWN (W416FIX: 'AI cancels Spell of
            Return when selecting target' - it returns 'no target' when fortress +3 != 1).
            Static check (2026-10-24, tools/harness/regress.py 304): wizards/AISPELL.C:1460 holds the code;
            AI_Target_Move_Fortress = 1.31 bytes [work/harness/game/WIZARDS.EXE]
305. GAME     Two AI hostility calculations read the hidden relation transposed: AI_Pick_Spell_Category (e318:121b-122e,
            hostile-spell weight per target) and AI_Hostility_Replan (f978:14f8-1503, the term of #253) index
            relation_bias (Wizard +0x1a0) as [AI][other], while the audience code reads the AI's own hidden opinion of a
            wizard as [other][AI] (AI_Diplo_Turn_Vs_Human: wizards[0].relation_bias[partner] for the AI's view of the
            human; Diplo_Break_Treaty raises relation_bias[breaker][victim]). So the AI's war stance and its choice of
            hostile-spell targets follow the OTHER wizard's hidden opinion of the AI. Together with #253 (the term is
            added, not subtracted). COMMUNITY-KNOWN (W389DIPL: 'hostility evaluation and hostile spell use adds the
            wrong player's hidden relation' - it swaps the two indices at both sites).
            In game (2026-10-24, tools/harness/regress.py 305): hostility chance of wizard 1 toward the human:
            relation_bias[0][1] +50 [5]; both 0 [5]
306. SRC     Overland-only unit enchantments resist dispels at five times their cost: both Dispel_Square (b1af:0656,
            combat Dispel Magic / Disenchant, b1af:0ad4) and Disenchant_Area_Overland (ba2c:00e4) use base_cost x 5 as
            the resistance cost of EVERY unit enchantment bit. That matches what was paid for spells castable both
            overland and in combat, because Spell_Casting_Cost (a0ec:054c) charges x5 overland only for those; but the
            six overland-only ones (Black Channels 100, Path Finding 50, Water Walking 50, Endurance 30, Wind Walking
            250, Planar Travel 150 - SPELLDAT base = overland cost) were paid at base cost and still resist as 5x (Wind
            Walking as 1250). Rule 'resistance = the cost actually paid' (the project's reading, step 56). COMMUNITY-KNOWN for
            combat only (W738FIX, Drake178: 'overland-only unit enchantments have 5 times the intended dispel resistance
            in combat'); the overland Disenchant site has no community fix (W444FIX / W673FIX touch other parts).
            Re-checked (N221): OVERCAST.C Disenchant_Area_Overland base_cost * 5 for every unit-enchantment bit (also
            Dispel_Square, COMBDISP.C 221 header); WIZSTATS.C Spell_Casting_Cost x 5 overland only for castable 0 / 2
            / 3.
            Static check (2026-10-24, tools/harness/regress.py 306): wizards/COMBDISP.C:229 holds the code;
            Dispel_Square = 1.31 bytes; Disenchant_Area_Overland = 1.31 bytes; Spell_Casting_Cost = 1.31 bytes
            [work/harness/game/WIZARDS.EXE]
307. GAME     AI Plane Shift on a tile the human cannot see releases a scratch-heap mark it never set: Plane_Shift_Cast
            (b425:104d) does Minimap_Alloc_Pic + Heap_Mark(p_scratch) + the animation buffers only for the human or for
            a visible tile (b425:1189-11ae), but every path ends at b425:16a8 with Heap_Release(p_scratch). For an AI
            cast on an invisible tile the release restores whatever mark some earlier code left (Heap_Release sets top
            <- saved mark), freeing scratch memory the caller may still hold - a heap corruption, the likely cause of
            the reported crash. The 'no target' exit (target selection returns != 1) also jumps to the same release
            without a mark (effect PROVISIONAL). COMMUNITY-KNOWN (W663FIX: 'Plane Shift crashes the game when the AI
            uses it on an invisible tile' - it makes the AI always take the setup branch).
            In game (2026-10-24, tools/harness/regress.py 307): Plane_Shift_Cast(player 1): Heap_Mark line reached 0
            time(s) before the release; at the release the scratch block (seg 5eb3) has used 305, mark 0 (used <- 0)
308. SRC     AI boarding ignores most shore tiles: Tile_Is_Shore_Water (f319:0f4e), the water test AI_Unit_Go_Overseas
            (ebda:569d) and AI_Stack_Embark (ebda:1ea4) use to find the tile to board a ship from, is true only for raw
            terrain 0, 2-0x11, 0x13-0x31, 0x62-0xa1, 0xd9-0xe8, 0x1d9-0x1f7: it misses 182 of the Shore variants (0x12,
            0x32-0x61, ...; 403 tiles in our 4 saves) and the ocean variant 0x259 (1548 tiles), which every other water
            test (Tile_Is_Sea f319:15b7, Tile_Is_Ocean f319:0f0b) accepts. AI settlers and stacks next to such tiles do
            not find a boarding spot. COMMUNITY-KNOWN (W614FIX: 'AI Settlers fail to board ships at some types of shore
            tiles because the tiles are not recognized as shores' - it retargets the call in AI_Unit_Go_Overseas).
            Re-checked (N221): our source note at src/wizards/TERRAIN.C:760 states it.
            Static check (2026-10-24, tools/harness/regress.py 308): wizards/TERRAIN.C:762 holds the code;
            Tile_Is_Shore_Water = 1.31 bytes [work/harness/game/WIZARDS.EXE]
309. READ+asm Combat_Select_Next_Unit (83d2:0e5a) falls back to the ATTACKER's first unit instead of the human's: when
            no human unit was found (active unit not owned by combat_human_side), it searches for the first battle unit
            whose owner == combat_attacker_player (83d2:0efe cmp ax, [c586]) and makes it the active unit. When the
            human is the attacker that is his own unit; when he defends it is an enemy unit, so the human's turn starts
            with the computer's unit active (e.g. when all his units are immobilized or out of moves). Effect on the
            spell button / turn flow PROVISIONAL (not traced). COMMUNITY-KNOWN (W495FIX: 'not getting turn to cast
            spells when all units immobilized', second attempt - it compares with combat_human_side, DS:c436).
            Static check (2026-10-24, tools/harness/regress.py 309): wizards/COMBINFO.C:627 holds the code;
            Combat_Select_Next_Unit = 1.31 bytes [work/harness/game/WIZARDS.EXE]
310. GAME    Placement code does not let Non-Corporeal units onto water: Tile_Room_For_Unit (81df:080d) accepts a water
            tile only for a unit that flies, has Wind Walking (itself or a unit there) or passes Unit_Can_Cross_Water
            (5d70:075b: Water Walking enchantment or swim / sail type flags), and the AI routine at ebda:0ab4 uses the
            same test (ebda:0e0a); Non-Corporeal types and Wraith Form (Unit_Is_Non_Corporeal 5d70:0a4a), which overland
            movement treats as water-capable (#254), are refused. A Non-Corporeal unit that must be placed next to a
            full city on an island finds no tile; the reported crash in that case is PROVISIONAL (summon placement
            fallback not traced). COMMUNITY-KNOWN (W433FIX: 'game crashes when summoning a noncorporeal unit into a full
            city on an island' - it retargets both calls to a test that includes non-corporeality).
            Re-checked (N221): ORDERS.C Tile_Room_For_Unit 405-422: water needs Wind Walking (own or the stack's),
            Unit_Can_Fly or Unit_Can_Cross_Water (UNITMOVE.C 204: sailing, swimming, Water Walking); no non-corporeal
            test. The crash part PROVISIONAL stays.
            In game (2026-10-24, tools/harness/regress.py 310): Magic Spirits (Dracon, water (29,26), all): (9, 0, 9)
            before, (9, 0, 9) after the summon; Sprites: (9, 0, 9) -> (9, 1, 10)
311. READ+asm AI engineers time their first road tile by the wrong tile: Road_Order_Start (81df:0a83) sets road_turns =
            Road_Build_Turns(path_x[0], path_y[0], plane) / engineer power (81df:0c0c-0c19), but Road_Path_AI
            (cbdf:18c6) returns its path start-exclusive, so that is the NEXT tile's cost; the human order
            (Units_Order_Build_Road 5b8b:0a80) uses the unit's own tile, the one the road is built on first, and clamps
            the result to at least 1 (the AI does not). E.g. an AI road leaving a grassland tile toward mountains waits
            the mountain time on the grassland tile (and the reverse). COMMUNITY-KNOWN (W588FIX: 'AI pays the wrong cost
            for moving on roads' - it passes the unit's x / y).
            Static check (2026-10-24, tools/harness/regress.py 311): wizards/ORDERS.C:467 holds the code;
            Road_Order_Start = 1.31 bytes [work/harness/game/WIZARDS.EXE]
312. READ+asm AI_Target_Dispel (8a20:1657, combat AI choice of a Dispel Magic target) uses the attacker's side data
            whichever side it plays: it tests 'caster == combat_attacker_player' (8a20:1669-1670) and then both branches
            load the SAME words - the realm masks DS:92ac / 92ae (AI_Combat_Assess_Threats c165:1fee: castable-spell
            realms of defender / attacker) and the side profiles DS:9298 / 92a2 (8a20:1672-1683 vs 168a-169b), so a
            defending AI rates enchantments against the wrong opponent (Ghidra folds the two identical branches into one
            assignment). Its realm tests also use the #20 off-by-one bits (uVar & 1 / 2 / 8 for realm masks built as 1
            << realm; 8a20:196c, 1973, 19f0, 1a1d, 1a24). COMMUNITY-KNOWN (W640FIX, Drake178: 'the AI checking the wrong
            realms and/or on the wrong player for dispel magic priority' - it swaps the second branch and shifts the
            five masks one bit up).
            Static check (2026-10-24, tools/harness/regress.py 312): wizards/COMBCAST.C:576 holds the code;
            AI_Target_Dispel = 1.31 bytes [work/harness/game/WIZARDS.EXE]
313. GAME     Combat AI scores melee attacks on flyers by non-flyers that have only a missile attack: AI_Target_Score
            (a22c:2630) returns -200 ('cannot reach') for a non-flying attacker against a flying target only when the
            attacker's ranged_type is 255 (no ranged attack at all, a22c:2678). An archer / slinger / magic-missile unit
            (ranged_type 1-99) asked for a melee score (mode 0) passes the test and gets a normal score, although it
            cannot melee a flyer (and may have no ammo left), so the AI sends such units to attack flyers they cannot
            hit. COMMUNITY-KNOWN (W471FIX: 'AI tries to melee flying units with nonfliers if they have an unusable
            ranged attack' - in melee mode it refuses unless ranged_type is 100-127: thrown / breath / gaze).
            In game (2026-10-25, tools/harness/regress.py 313): AI_Target_Score(bowman, drake, mode) = score: ['(2, 0,
            1) = -39', '(2, 0, 0) = 1']; the drake's move_flags 0x8, the bowmen's ranged_type 20
314. GAME    Razing a captured city from the combat results scroll ('R') pays the plunder twice and changes fame
            differently from the Raze dialog: with the dialog (Combat_End a4fa:0000, raze chosen before the capture) the
            attacker loses fame = city size (floored at 0) and gains plunder + 1/10 of every building's cost. Without it
            the city is first captured - attacker fame + (size - 2) and the plunder gold paid (combat_end_value =
            City_Plunder_Gold) - and 'R' in Combat_Results_Scroll (a4fa:1a3c, 92514-92525) then subtracts size + 1 fame
            (no floor) and pays combat_end_value + the building tenth, where combat_end_value still holds the plunder
            already paid. Net: plunder twice, and fame -3 instead of -size. COMMUNITY-KNOWN (W682FIX, Drake178: 'the
            player gains more gold and loses a different amount of Fame when razing cities from the combat summary
            scroll').
            Re-checked (N221): our source note at src/wizards/COMBEND.C:528 states it.
            In game (2026-10-25, tools/harness/regress.py 314): gold gained: A (scroll) 127, B (dialog) 68, difference
            59; the plunder P on the scroll 48; fame change A -3, B -2; answers A ['n', 'r'], B ['r']; raze option 1;
            city size 2, buildings' tenth T at the start 31 (B) / at A's scroll 31: predicted A - B = P + T(scroll) -
            T(start) = 48; fame predicted A -3, B -2; A = 2 x P + T(scroll) = 127: yes
315. GAME     Finding spells in a conquered wizard's fortress overwrites the start or end of the data segment:
            Conquest_Loot_Spells (aba4:10b6) builds 'You found a X spell (and a Y spell) in the ruins' by far_strcpy of
            each spell name into a local buffer, but passes the buffer by VALUE - aba4:11b7 / 11c4 'mov al, [bp-0xd];
            cbw' (the first byte of the buffer, sign-extended) where 'lea' was meant - so each name is copied to
            DS:0..0x7f or DS:0xff80..0xffff, depending on whatever byte is there, and strcat then reads that same
            garbage address. Human winner only (the message is shown only for player 0). COMMUNITY-KNOWN (W684FIX,
            Drake178: 'the dialog shown when finding spells in a conquered wizard's fortress corrupts memory' - mov ->
            lea).
            In game (2026-10-23, tools/harness/regress.py 315): keys ['n', 'esc', 'esc', 'esc']; city 1 owner 0 (0 =
            human); message "You found a Disenchant Area spell in the ruins."; "Disenchant Area" found at ['DS:0000'];
            bytes changed DS:0000-00FF 16, DS:FF00-FFFF 12
316. SRC     Ships' movement bonuses stack in a different order in combat than overland: Unit_Move_Points (a0ec:0964,
            overland) applies Flight (at least 6 half-moves), Chaos wings (4), Endurance (+2) and item moves first and
            the Wind Mastery ship factor (x1.5 own, /2 enemy) last, while Unit_Combat_Moves (a76b:0c4d) applies Wind
            Mastery right after type + item moves and the minimums / Endurance after it. E.g. a ship with Endurance
            under its owner's Wind Mastery: overland (base + 2) x 1.5, combat base x 1.5 + 2; a flying ship under an
            enemy Wind Mastery: overland 6 / 2 = 3, combat at least 6. COMMUNITY-KNOWN (W698FIX, Drake178: 'movement
            enhancements apply in different order in combat than overland' - it reorders the combat function to the
            overland order).
            Re-checked (N221): WIZSTATS.C Unit_Move_Points: Flight 6, wings 4, Endurance + 2, items, then Wind
            Mastery; COMBUTIL.C Unit_Combat_Moves: type + items, Wind Mastery, then Flight 6, wings 4, Endurance + 2,
            Haste x 2.
            Static check (2026-10-24, tools/harness/regress.py 316): wizards/COMBUTIL.C:479 holds the code;
            Unit_Combat_Moves = 1.31 bytes; Unit_Move_Points = 1.31 bytes [work/harness/game/WIZARDS.EXE]
317. READ+asm AI stacks on a move / attack order (status 0x10) fall apart when their units have different speeds: in
            Stack_Move (7b88:0000) a walk cut short (not all the way, local flag set) turns every moving unit into a Go-
            To (status 3, dest, finished 1) EXCEPT those with status 0x10, and the final loop marks finished only status
            3 units (7b88:08d2-08e5). So after the slowest unit limits the step, faster 0x10 units still have moves and
            no 'finished' mark, and when the AI's unit loop reaches one of them it moves again with whatever units still
            have moves - the stack splits into speed groups. Human orders use Go-To (3) and are not affected. COMMUNITY-
            KNOWN (W424AI: 'stacks that have the order to move together split up' - it also marks 0x10 units finished).
            Static check (2026-10-24, tools/harness/regress.py 317): wizards/MOVESTK.C:89 holds the code; Stack_Move =
            1.31 bytes [work/harness/game/WIZARDS.EXE]
318. SRC    The AI's / auto-combat's attack rating overflows 16 bits for strong units: AI_Attack_Value (888b:17aa)
            computes in 16-bit ints (attack - 2) x figures x 20 (+ ranged x 30), then x2 for flag 0x10 (else x5/4 for
            0x1), + 60 x figures for each of flags 4 / 8 / 0x20 / 0x80 / 0x200, x5 for 0x40, x5/4 for 2 and for
            0x4000. A 1-figure unit (typically a hero) with melee 40 and flags 0x10 + 0x40 + 2 goes 760 -> 1520 ->
            7600, and 7600 x 5 = 38000 wraps before the / 4, giving -6884; callers Combat_Strategic (888b:00c9,
            auto-resolve strength), UnitType_AI_Strength (a0ec:0ccf), AI_Unit_Strength (a0ec:0de8) and
            Unit_Combat_Value (c165:1e7f) then see a weak or negative unit. (The crash the community reports is
            PROVISIONAL - not traced.) COMMUNITY-KNOWN (W572FIX: 'overflow crash caused by overly powerful units
            (usually heroes) in AI unit evaluation'; its second change, making armour-ignoring abilities not
            cumulative, is a rating change, not a 1.31 defect).
            Re-checked (N221): COMBAUTO.C AI_Attack_Value: all int (16-bit). The entry's example is off: 0x10 (x 2)
            and armour piercing 0x1 (x 5 / 4) are else-if; for melee 40, 1 figure, flags 0x10 + 0x40 + 2: 760 -> 1520
            -> 7600, then 7600 x 5 = 38000 wraps before the / 4 -> -6884. Overflow and the negative result hold.
            Static check (2026-10-24, tools/harness/regress.py 318): wizards/COMBAUTO.C:615 holds the code;
            AI_Attack_Value = 1.31 bytes [work/harness/game/WIZARDS.EXE]
319. SRC     AI_Build_Stacks (ebda:2da6) drops units from stacks it has already recorded once the table is full: its
            per-unit loop starts with 'if ai_square_stack_count < 80' (ebda:2df7), so after the 80th stack of the landmass is
            registered every later unit (by unit index) is skipped - not only units that would open an 81st stack but
            also units standing on tiles already in the table, which are then missing from that stack's size and unit
            list (and from the rally count). An AI with more than 80 unit tiles on one landmass plans with incomplete
            stacks. COMMUNITY-KNOWN (W549AI: 'if there are more stacks than the limit of 80 ... it aborts sorting the
            units - not inserting the remaining units that belong to the 80 possible stacks').
            Re-checked (N221): AIUNITS.C AI_Build_Stacks 1225: 'ai_square_stack_count < AI_MAX_STACKS && owner ==
            player' gates every unit, also those on recorded squares.
            Static check (2026-10-24, tools/harness/regress.py 319): wizards/AIUNITS.C:1202 holds the code;
            AI_Build_Stacks = 1.31 bytes [work/harness/game/WIZARDS.EXE]
320. SRC     The AI attacks units of wizards it is not hostile to when they stand on an unmelded node:
            AI_Collect_Landmass_Targets (ebda:2270) adds a node as a target when its owner is a wizard the AI is hostile
            to (hostility > 1) OR when the node is unmelded (owner -1), in which case any threat on the tile qualifies;
            the threat map (AI_Build_Threat_Map f48f:3aab) counts every unit not owned by the AI, so another wizard's
            army camping on a free node - even an ally's - makes the node an attack target with value power x 5 + 25,
            while the same army elsewhere is ignored at hostility < 2. COMMUNITY-KNOWN (W491AI: 'AI attacks units on
            unmelded node even if not having hostility to do so').
            Re-checked (N221): AIUNITS.C AI_Collect_Landmass_Targets 1079-1088: hostility test OR owner ==
            PLAYER_NONE; an unowned node is a target (power x 5 + 25) whenever its square has threat. The threat map's
            makeup not re-checked.
            Static check (2026-10-24, tools/harness/regress.py 320): wizards/AIORDERS.C:1373 holds the code;
            AI_Build_Threat_Map = 1.31 bytes; AI_Collect_Landmass_Targets = 1.31 bytes [work/harness/game/WIZARDS.EXE]
321. SRC     The 'can this unit be at sea' test is built differently at each place, so the same unit counts as sea-
            capable in one routine and not in another: Combat_Retreat_Resolve (7eb0:0287, battle on water without a Wind
            Walker) accepts flight, Unit_Can_Cross_Water, a hero flight item or a hero water-walking item - but not Non-
            Corporeal / Wraith Form, so such a unit gets status 2 there like a unit that cannot be at sea;
            AI_Units_At_Sea_Orders (ebda:0ab4) and its stack test accept flight, Unit_Can_Cross_Water and Non-Corporeal
            - but not hero flight / water-walking items; Tile_Room_For_Unit (81df:080d) accepts flight,
            Unit_Can_Cross_Water and Wind Walking only (#310); the AI routines AI_Stack_Embark (ebda:1ea4),
            AI_Field_Stack_Targets, AI_Flyers_To_Target_Landmass and AI_Unit_Go_Overseas call Unit_Can_Fly alone at the
            points the community patched. COMMUNITY-KNOWN (W369FIX: 'various sea capability check fixes ... AI units
            drowning check (Flight item units seem to be missing) ... Fleeing on sea: Noncorporeal units were missing' -
            it routes the calls to one combined test, W368).
            Re-checked (N221): our source note at src/wizards/COMBTURN.C:245 states it.
            Static check (2026-10-24, tools/harness/regress.py 321): wizards/COMBTURN.C:246 holds the code;
            Combat_Retreat_Resolve = 1.31 bytes; Tile_Room_For_Unit = 1.31 bytes; AI_Stack_Embark = 1.31 bytes
            [work/harness/game/WIZARDS.EXE]
322. GAME    An AI can accept an audience and end it before the first menu: Diplo_Pick_Greeting (7057:0000) refuses to
            talk only when relation_bias + Diplo_Min_Interest + personality_treaty_mod <= -100 (it subtracts the
            relation back out of S), while Diplo_Main_Menu (6ea7:0393) checks, before showing even its first menu,
            Diplo_Min_Interest < -100 alone and then leaves with message 0x47 ('tired of talks'). With the lowest
            interest below -100 but a positive hidden bias or a friendly personality modifier, the wizard greets the
            player normally and then at once says he is out of time. COMMUNITY-KNOWN (W385DIPL: 'the AI allowed the
            player to talk to them only to immediately say they are out of time' - it makes the opening test match the
            ending one).
            Re-checked (N221): Diplo_Pick_Greeting: score - relationship (= bias + min interest + personality) <= -100
            refuses; Diplo_Main_Menu 328: Diplo_Min_Interest() < -100 alone.
            In game (2026-10-23, tools/harness/regress.py 322): talk modes seen [0], messages seen [42, 71], main menu
            shown: False
323. READ+asm AI landmasses with exactly 6 own cities are marked 'no targets': AI_Landmass_Plan (f48f:2b22) zeroes every
            landmass status byte of the player (ai_landmass_plan +0x78, DS -0x76f8), then counts its own cities INTO
            those status bytes (for the rally centroid), and afterwards keeps the value when it is 6 ('no targets /
            depleted') and no foreign unit strength is on the landmass (f48f:307e cmp 6), else sets 3 / 1 / 2. The
            intended 'keep an existing status 6' test reads the city count instead: a landmass with exactly 6 AI cities
            and no foreign units stays at status 6 (treated as having nothing to do), and a genuine earlier status 6 is
            never kept. COMMUNITY-KNOWN (W301AI: 'AI sets continent containing exactly 6 owned towns to
            uninteresting/depleted state' - it removes the test). (Step 55 note corrected: the byte is the status array
            used as a counter, not a separate city count.)
            Static check (2026-10-24, tools/harness/regress.py 323): wizards/AIORDERS.C:1125 holds the code;
            AI_Landmass_Plan = 1.31 bytes [work/harness/game/WIZARDS.EXE]
324. GAME     An AI with nothing left to research stops raising its casting skill: AI_Magic_Allocation (d208:0863), in
            its 'no research' branch, does skill_percentage = research_percentage / 2 and research_percentage = 0
            (d208:093b mov - a store where an add was meant), so the existing skill share is discarded; on the next
            allocation (every Random(10) + 15 turns) research is already 0, skill becomes 0 / 2 = 0, and mana = 100 -
            skill - research takes everything: from then on the AI puts no power into casting skill at all. COMMUNITY-
            KNOWN (W672FIX, Drake178: 'AI can't properly allocate power to skill when all of their spells have been
            researched' - mov -> add).
            In game (2026-10-23, tools/harness/regress.py 324): turn 107: wizard 1 (39 spells made known, nothing to
            research): {'research_percentage': 0, 'skill_percentage': 20, 'mana_percentage': 80, 'ai_magic_timer': 17}
            (was 40 / 30 / 30, timer 1)
325. SRC     Wrack deals squared damage and can overrun its stack list: Wrack_Turn (b66a:0106) rolls a resistance check
            per enemy figure and, for each failure, appends the unit to a list (local char[36]) and counts failures per
            unit; when applying, it walks the LIST and gives each entry the unit's whole failure count
            (Battle_Apply_Damage with local_5e[unit]), so a unit with k failed figures takes k x k damage instead of k.
            The list has room for 36 entries and no bound test: more than 36 failed figures in the enemy army (e.g.
            several 6-8 figure units) write past it into the following locals - its own entry counter, the picture
            coordinates - and on into the saved frame (memory corruption / crash). COMMUNITY-KNOWN (W697FIX, Drake178:
            'Wrack no longer deals squared damage', 'Wrack affecting more than 36 figures can no longer corrupt memory';
            its Wraith Form point is in the Wraith Form entry, W529FIX; the 40-figure limit and timing / sound points
            not checked).
            Re-checked (N221): our source note at src/wizards/SPELLFX.C:147 states it.
            Static check (2026-10-24, tools/harness/regress.py 325): wizards/SPELLFX.C:147 holds the code; Wrack_Turn
            = 1.31 bytes [work/harness/game/WIZARDS.EXE]
326. READ+asm City walls can carry over into the next battle: Battlefield_Generate_Map (df82:05d8) sets Battlefield
            has_city_walls (+0x1556) only for a city (backdrop 2) or fortress (3) battlefield (df82:086a 'mov
            es:[bx+0x1556], ax' from its walls argument); for open-field, outpost, tower, node and lair battles the word
            is never written, so it keeps the value of the previous battle - 1 after a battle at a walled city or one
            where Wall of Stone was cast (Combat_Wall_Create b66a:0636 sets 1). Every wall rule reads it
            (Combat_Mark_Wall_Obstacles, Melee_Wall_Allowed, Combat_Deploy_Side, Is_City_Wall_Square, combat_siege_flags
            in Combat_Strategic, the AI tests; Attack_Resolve and AI_Combat_Spell_Score test != 0), so the next battle
            anywhere can have wall blocking / siege behaviour (with the stale wall_segments) on a battlefield that has
            no walls; whether they are drawn depends on the wall pictures loaded for that battle (PROVISIONAL -
            'invisible walls' per the community). COMMUNITY-KNOWN (W155FIX '154 - invisible city walls bug': it clears
            the word at the start of Battlefield_Generate_Map and makes Attack_Resolve test == 1).
            Static check (2026-10-25, tools/harness/regress.py 326): static fallback: wizards/BFGEN.C:224 holds the
            code; Battlefield_Generate_Map = 1.31 bytes [work/harness/game/WIZARDS.EXE] | play case ERROR (2026-10-25
            22:47): RuntimeError: no combat turn for the human (screen 5, battle units 3)
327. READ+asm Auto-resolved (strategic) combat magic has two more defects in Combat_Strategic (888b:00c9) besides
            #294: (1) each side's magic budget is min(nominal casting skill, mana_reserve x 10 /
            Combat_Range_Multiplier) where the 32-bit quotient is kept as a 16-bit int (local budget at 888b:0798 /
            097e): Combat_Range_Multiplier is 5 at the wizard's own fortress, 10 .. 30 elsewhere, so it wraps only for
            a defender at its own fortress with more than 16,383 mana - negative, so that wizard spends no battle
            magic at all (budget < 10; corrected N221: the earlier '3,277 - 6,553 mana at range factor 1' read the
            multiplier as 1 / 2 / 3); (2) per round the attacker's channel total is ADDED (local += its mana-scaled
            term) but the defender's is STORED over its first channel term (888b:0d62 and 1067 'mov [bp-0x66], ax'),
            so the defender loses one of its three channel contributions every round. COMMUNITY- KNOWN (IW051, 1.40
            patch 'fixing of spending mana in strategic combat': sub-patches 1-2 make a negative budget fall back to
            the mana, 3 and 5 turn the two stores into adds; sub-patches 4 (888b:0f88 / 1039 operand changes) and the
            removed halvings (888b:0fdf / 1090) are not interpreted here). Step 78c c40 (read + asm): in the MELEE
            rounds both sides compute the healing term from the pct channel (channel 2) instead of the heal channel
            (channel 3) - the missile rounds use channel 3: 888b:0f86 and 1037 'mov ax,[bp-0x50]' / '[bp-0x52]' load
            the pct channel a second time; their displacement bytes 0f88 / 1039 are exactly sub-patch 4's operand
            changes.
            Static check (2026-10-24, tools/harness/regress.py 327): wizards/COMBAUTO.C:372 holds the code;
            Combat_Strategic = 1.31 bytes [work/harness/game/WIZARDS.EXE]
328. READ+asm AI ship-space bookkeeping uses the wrong unit: in AI_ebda_0ee6 (ebda:0ee6) every AI ship slot di (up to
            15) starts with 9 free places (ebda:0ef7), and for each of the player's units on Go-To (status 3) to that
            ship's tile the free count is lowered by 1 + transport capacity of a unit type - but the type is read from
            unit number di (ebda:0fa3 'mov ax, di; shl ax, 5', i.e. the ship's position in the ship list used as a unit
            index) instead of the travelling unit [bp-0x14]. So each unit heading for a ship costs 1 + the capacity of
            whatever unit 0..14 happens to be (e.g. 1 for ordinary units, 4 or more when that early unit is a ship), and
            the AI thinks ships are fuller or emptier than they are. COMMUNITY-KNOWN (W265FIX: 'AI calculates carrying
            capacity of ships on the way to pick up units wrong' - it keeps the travelling unit's record pointer for the
            type lookup).
            Static check (2026-10-24, tools/harness/regress.py 328): wizards/AIUNITS.C:486 holds the code;
            AI_Ship_Orders = 1.31 bytes [work/harness/game/WIZARDS.EXE]
329. READ+asm AI disembarking checks the wrong tile for enemies: when AI_ebda_0ee6 (ebda:0ee6) looks for a landing tile
            among the 3 x 3 neighbours of a ship, the landmass test indexes the map correctly as (y + dy) x 60 + x + dx
            (ebda:116f-117f), but the threat / occupancy test right after it (p_threat_maps, ebda:1193-11a6) computes y
            x 60 + dy + x + dx - dy is not multiplied by 60 - so for the rows above and below the ship it reads the
            threat of a tile shifted sideways in the ship's own row: an occupied landing tile can be taken as free (and
            a free one rejected). COMMUNITY-KNOWN (W330AI item 1: 'when trying to disembark, do not consider cells
            already occupied as available' - the patch computes (y + dy) x 60; its items 2-3, skipping status 5 / 6
            landmasses, are strategy changes).
            Static check (2026-10-24, tools/harness/regress.py 329): wizards/AIUNITS.C:486 holds the code;
            AI_Ship_Orders = 1.31 bytes [work/harness/game/WIZARDS.EXE]
330. SRC     The combat AI's rally point is read from before the path buffers when its pace unit cannot reach its
            target: AI_Combat_Turn (9218:108c) sorts its units by moves and takes AI_Rally_Point (9218:0e65) of the
            median unit as the rally box for every unit's move that turn (AI_Unit_Execute -> AI_Move_Path stops steps
            outside it). For a melee / advancing unit AI_Rally_Point runs Combat_Find_Path to the unit's target and
            returns the last reachable step - but Combat_Find_Path returns length 0 when the target is blocked, the loop
            then ends at index 0 and the point is path_x[-1] / path_y[-1], two bytes before each path buffer (also when
            target_unit is -1, whose coordinates come from p_battle_units[-1]). The AI's movement box for that turn then
            depends on that garbage (effect in battle PROVISIONAL). Found in work list C (step 59); no community patch
            found.
            Re-checked (N221): our source note at src/wizards/COMBTACT.C:357 states it.
            Static check (2026-10-24, tools/harness/regress.py 330): wizards/COMBTACT.C:359 holds the code;
            AI_Rally_Point = 1.31 bytes [work/harness/game/WIZARDS.EXE]
331. READ+asm The combat AI's 'which realms can the enemy cast' masks are never cleared: AI_Combat_Assess_Threats
            (c165:1fee, run by Combat_Spell_Action on every AI spell action) ORs 1 << realm of each castable hostile
            spell of the attacker into DS 0x92ae and of the defender into DS 0x92ac (c165:2xxx 'mov dx, [92ac]; or dx,
            ax; mov [92ac], dx'); no code anywhere writes 0 to either word (the only accesses in the image are these ORs
            and the reads in AI_Target_Dispel 8a20:1657 and the combat spell scoring c165:00bd). So within one play
            session the masks collect the realms of every attacker / defender of every earlier battle, and the AI's
            realm-threat tests (already off by one bit, #20) answer for opponents long gone. Found in work list C (step
            59); no community patch found.
            Static check (2026-10-24, tools/harness/regress.py 331): wizards/COMBAI.C:912 holds the code;
            AI_Combat_Assess_Threats = 1.31 bytes [work/harness/game/WIZARDS.EXE]
332. SRC     A rich AI wizard can be unable to cast any spell in a battle at its own fortress:
            Combat_Castable_Spell_List (c165:2669), the list AI_Combat_Choose_Spell and AI_Combat_Assess_Threats pick
            from, sets the wizard's budget to min(combat skill left, mana_reserve x 10 / Combat_Range_Multiplier) but
            compares and stores the 32-bit quotient as a 16-bit int. Combat_Range_Multiplier returns 5 at the wizard's
            own fortress (0.5x), 10 .. 30 elsewhere: so only at the own fortress, with a reserve over 16,383 (quotient
            32,768 or more, up to 60,000 at the 30,000 mana cap), the budget is negative and no spell's cost is <= it
            - the list is empty and the AI wizard casts nothing that battle. The human's combat book has the same wrap
            (#476). Found in work list C (step 59); no community patch found for this site.
            Re-checked (N221): COMBAI.C 1029-1031 and COMBSPL.C Combat_Range_Multiplier (5 / 10 .. 30 / 1 for the
            neutral player). The earlier text put the wrap at 3,277 - 6,553 mana 'at range factor 1' (reading the
            multiplier as 1 / 2 / 3) - wrong; our source note at src/wizards/COMBAI.C:1028 had it right.
            Static check (2026-10-24, tools/harness/regress.py 332): wizards/COMBAI.C:1028 holds the code;
            Combat_Castable_Spell_List = 1.31 bytes [work/harness/game/WIZARDS.EXE]
333. READ+asm Long pauses are cut to 4 ticks (cosmetic timing): Wait_Ticks (1484:002c) loops only while 0 <= ticks since
            Timer_Mark < 4 (1484:0050 'cmp ax, 4; jns return') and returns when the count reaches n - so any wait longer
            than 4 BIOS ticks (~0.22 s) ends after 4: Call_Lightning_Turn's 12-tick pause, the diplomacy portrait fade
            (0x1e), Screen_Conquest (6) and the other calls with 5 / 6 (Wait_30_Ticks 1d4d:0023 has no callers). Most
            callers use 1-3 ticks and are unaffected. Found in work list C (step 59); no community patch found.
            Static check (2026-10-24, tools/harness/regress.py 333): wizards/TIMER.ASM:39 holds the code; Wait_Ticks =
            1.31 bytes [work/harness/game/WIZARDS.EXE]
334. READ+asm Saving never notices a failed file open: DOS_File_Open (169a:0001) stores whatever INT 21h returns in AX
            as the file handle (DS:e5e8, 169a:0030 / 0060 / 006d) without testing the carry flag, and returns it;
            DOS_File_Write_Far / Read_Far (169a:00a7 / 0078) do not test the carry either. Save_Game (4558:0000),
            Load_Game (4558:03f8) and the COMBAT.TMP save / restore (df82:312e / 30b0) use it unchecked. If the create
            fails (read-only SAVEn.GAM, full or write-protected disk) the DOS error code (3 path not found, 4 too many
            files, 5 access denied) is used as a handle: the save data goes to that handle (3 = AUX, 4 = PRN, 5 = the
            first file the program opened) and DOS_File_Close then closes it - the game reports nothing and the player
            believes the game was saved. (Consequence of closing handle 5 PROVISIONAL.) Also the read / seek wrappers of
            1573 (DOS_Seek 1573:003a, DOS_Read_To_Segment 1573:008c, DOS_Read_Near 1573:00b9) return -1 on success and 0
            on failure, so a short read is never detected. Found in work list C (step 59); no community patch found.
            Static check (2026-10-23, tools/harness/regress.py 334): wizards/DOSFILE.C:5 holds the code; DOS_File_Open
            = 1.31 bytes; Save_Game = 1.31 bytes [work/harness/game/WIZARDS.EXE]
335. LATENT  Two slips in the EMS-cached LBX loaders, harmless with the shipped data: (1) in append mode (2)
            EMS_LBX_Load_Entry (16d5:087b), EMS_LBX_Load_Entry_Data (16d5:0b19) and EMS_LBX_Load_Records (16d5:0d1a)
            call Heap_Block_Valid(block == 0) - i.e. on segment 1 or 0, the interrupt table - instead of
            !Heap_Block_Valid(block) (16d5:0ef2 'or si, si / mov ax, 1 or 0 / push ax'), so the destination block is
            never validated (the non-EMS LBX_Load_Core / LBX_Load_Records_Core and modes 1 test it correctly); (2) they
            copy in 32 KB pieces while more than 32 KB remain, then copy 'remaining mod 32768' bytes - 0 when exactly 32
            KB are left, so an entry (or record range) whose size is an exact multiple of 32,768 would lose its last 32
            KB. No LBX entry of the game has such a size (5,264 entries scanned, step 59). Found in work list C (step
            59).
            Static check (2026-10-23, tools/harness/regress.py 335): wizards/EMSLBX.C:392 holds the code;
            EMS_LBX_Load_Entry = 1.31 bytes; EMS_LBX_Load_Entry_Data = 1.31 bytes; EMS_LBX_Load_Records = 1.31 bytes
            [work/harness/game/WIZARDS.EXE]
336. READ+asm Removing a city that has a pending 'construction completed' notice scrambles the other notices: the notice
            list (DS 0x9af2, 4-byte records: city byte, building / unit word at +2; up to 20, human cities only, filled
            by City_Production_Step and City_Production_Lost_Prereq during the turn change and shown by Human_End_Turn)
            is fixed up by City_Notices_Remove_City (a0ec:137f, called from City_Remove): for the removed city's record
            it shifts ONLY the city bytes of the following records down (a0ec:13c5-13d5 'mov al, [bx-0x650a]; mov
            [bx-0x650e], al'), leaving each record's building word in place, and then goes on to the next index without
            re-testing the record that moved in. So every later notice is shown for the city of the record after it (and
            one city index is not decremented). Needs a human city with a completed build to be removed later in the
            same turn change (e.g. by a spell or event), so rare. Found in work list C (step 59); no community patch
            found.
            Static check (2026-10-24, tools/harness/regress.py 336): wizards/WIZSTATS.C:662 holds the code;
            City_Notices_Remove_City = 1.31 bytes [work/harness/game/WIZARDS.EXE]
337. SRC    City enchantment list: the 'previous page' arrow does not wrap to the last page when the number of
            enchantments is a multiple of 6 (cosmetic). Screen_City_View (4a3f:0000) and Screen_Outpost (66bf:0273)
            set city_ench_list_first = (count / 6) * 6 when it goes below 0; for 12, 18 or 24 enchantments that is one
            page past the end, and CityScr_Add_Enchant_Controls (4a3f:2a96) then resets an empty page to 0 - pressing
            'previous' on page 1 stays on page 1. Screen_City (47bc:0000) adds 'first >= count -> count - 6' and pages
            correctly. Arrows appear only with 7+ enchantments. Fix: ((count - 1) / 6) * 6. [CITY ENCHANT LIST PAGING]
            Re-checked (N221): CITY.C 279 (Screen_City_View) and OUTPOST.C 244 (Screen_Outpost): (count / 6) * 6 on
            wrap; CityScr_Add_Enchant_Controls resets an empty page to 0 (CITY.C 1205-1208). Screen_City (CITYSCR.C
            373-375) adds 'if (first >= count) first = count - 6' and pages correctly; 24 is also a multiple of 6 (26
            city enchantments).
            Static check (2026-10-24, tools/harness/regress.py 337): wizards/CITY.C:168 holds the code;
            Screen_City_View = 1.31 bytes; CityScr_Add_Enchant_Controls = 1.31 bytes; Screen_City = 1.31 bytes;
            Screen_Outpost = 1.31 bytes [work/harness/game/WIZARDS.EXE]
338. READ+asm Two slips in the no-mouse input loop UI_Poll_Input_Keyboard (2666:1284). It runs only when no mouse driver
            is found: UI_Get_Input picks it when Mouse_Init returned 0, and normal play with a mouse uses UI_Poll_Input.
            (1) Enter over a non-text control while a text field is being edited copies the edit buffer back, capped by
            control[i].max_len, where i is the loop counter itself (asm 2666:15e3 'mov ax, di'). It should be
            control[ui_edit_control], as the two mouse-loop copies of this code do. Control 0 is never added: UI_Init
            points the array at the heap block's own header paragraph (Seg_To_Far_Ptr(seg) = seg:0), so its type word is
            the block size 0x165 and its length / state words (+0x20 / +0x1a) are uninitialised farmalloc memory; if
            that length is 0 the committed text is cut to nothing, and the '_' check can then clear the byte before the
            buffer (DS:e879). (2) Enter on a toggle control (type 1) tests the state word of control [bp-8], the nav-key
            result, which is 0 for a plain Enter, instead of the control under the cursor (asm 2666:16db). It decides
            the flip from uninitialised control 0. LATENT: no WIZARDS code creates type-1 toggles (UI_Add_Toggle_Button
            has no callers). Reach of (1): only the 8 save-name fields of the Load / Save screen (UI_Add_Text_Line, type
            0xb, Screen_Game_Menu) - type a name, move the keyboard cursor to Save, press Enter: the name is cut by the
            wrong length (to nothing if control 0's uninitialised length word is 0) before Save_Game runs; the item-
            forge name and UI_Text_Input_Box run their own key loop (type 4) and are not affected. (3) LATENT:
            Mouse_Get_Buttons (2579:0120) loads AX with the DGROUP segment and, when no driver was found (DS:78be = 0),
            returns without clearing it - 'buttons held' (nonzero) instead of 0. Every live caller checks
            ui_mouse_present first, and Wait_Ticks_Or_Input, the one that does not, has no callers. [NO-MOUSE INPUT
            LOOP]
            CONFIRMED (batch 31): (1) and (2) are exactly the matched source src/wizards/UI.C ('p_ui_controls[i].param5'
            with i the character index; the toggle tests p_ui_controls[control], the nav-key result).
            Static check (2026-10-23, tools/harness/regress.py 338): wizards/UI.C:896 holds the code;
            UI_Poll_Input_Keyboard = 1.31 bytes; Mouse_Get_Buttons = 1.31 bytes [work/harness/game/WIZARDS.EXE]
339. LATENT  The clipped picture decoders lose their data segment on frames larger than 63 KB. Pic_Blit_Clipped_Planar
            (23a4:0087), Pic_Blit_Clipped_Planar_Remap (23a4:02e0) and Pic_Draw_Clipped_EMS (copy at linear 14344) re-base
            the read pointer at the start of each column once SI reaches 0xFC00. The three instructions are in the wrong
            order: 'mov ds, cx / add cx, 0xfc0 / mov cx, ds' (bytes 8E D9 81 C1 C0 0F 8C D9). The intent was 'mov cx, ds
            / add cx, 0xfc0 / mov ds, cx'. DS becomes CX instead, normally 0 after the previous column's loop, so the
            remaining columns are decoded from the interrupt vector table. That draws garbage, and its skip counts can
            push writes into the other VRAM pages. Reach: only frames of 0xFC00+ bytes drawn through a CLIPPED draw
            (Draw_Pic_Clipped and friends). A read-only scan of all 101 LBX files (15,792 frames) finds 7 such frames: 5
            in INTRO.LBX (MAGIC.EXE), SPELLSCR 13 (64,909 bytes - the item forge background, drawn with the UNCLIPPED
            Draw_Pic_Frame, whose decoder never re-bases and is fine below 64 KB) and RELOAD 25 (no WIZARDS loader
            found). So no shipped picture is known to trigger it in WIZARDS. MAGIC.EXE has the same three byte
            sequences; no community patch touches them. [CLIPPED DECODER SEGMENT WRAP]
            CORRECTION (78c-Z, byte-matching): the EMS copy is in Pic_Draw_Clipped_EMS_Remap (23f7:03da), not in
            Pic_Draw_Clipped_EMS (that one moves the EMS window at C000h instead). Sources: PICCLIP.ASM, PICEMS.ASM.
            Static check (2026-10-23, tools/harness/regress.py 339): wizards/PICCLIP.ASM:9 holds the code;
            Pic_Blit_Clipped_Planar = 1.31 bytes; Pic_Blit_Clipped_Planar_Remap = 1.31 bytes;
            Pic_Draw_Clipped_EMS_Remap = 1.31 bytes [work/harness/game/WIZARDS.EXE]
340. READ+asm Str_Trim (19b4:135a) removes only ONE trailing space (cosmetic). The trailing loop records the index of
            every space and resets on any other character (asm 1390-139a), so it ends at the LAST space, not the first
            of the trailing run. 'Abc ' becomes 'Abc ' with one space still attached. Leading spaces are removed
            correctly. Callers: the two city-naming dialogs (Outpost_Name_Dialog, Dialog_Name_Starting_City), so a city
            name typed with two or more trailing spaces keeps all but one. Fix: set the index only when it is still -1.
            [STR_TRIM]
            Static check (2026-10-24, tools/harness/regress.py 340): wizards/TEXT.C:874 holds the code; Str_Trim =
            1.31 bytes [work/harness/game/WIZARDS.EXE]
341. LATENT  Paragraph_Print_To_Pic (1b9d:0bb9) passes the wrong bitmap for right / centre alignment. For align 1 / 2 it
            pushes five arguments (x, y, text, WIDTH, pic) to the four-argument Print_Text_Right_To_Pic /
            Print_Text_Centered_To_Pic (asm 1b9d:0c58-0ca0: push [bp+10h] pic, push [bp+0Ah] width, ..., add sp, 0Ah).
            The callee takes width as its bitmap segment, so the glyphs would be written into segment 0x0080 = DOS low
            memory (crash / corruption). Align 0 and 3 are correct. Both callers (the spell-learned and research book
            paragraphs) pass align 0, so it never runs in the shipped game. [PARAGRAPH TO PIC ALIGN]
            Static check (2026-10-23, tools/harness/regress.py 341): wizards/PARAGRPH.C:478 holds the code;
            Paragraph_Print_To_Pic = 1.31 bytes [work/harness/game/WIZARDS.EXE]
342. READ+asm Combat rocks are drawn from the tree list (COMMUNITY-KNOWN W686, confirmed in the asm).
            Combat_Queue_Terrain_Objects_B (dc99:0c3d) queues the rock sprites (decor B, which also raise movement costs
            where they stand) at decor_b_x / decor_b_y (+0x10CC / +0x1194). But it loops up to decor_A_count (+0xE70,
            asm 0ca6), not decor_b_count (+0x10CA), and takes its picture from decor_A_pic (+0x1002, asm 0c70) used as
            an index, not from decor_b_pic (+0x125C). So the number of rocks drawn equals the number of trees: with
            fewer trees than rocks, some rocks that slow movement are invisible; with more trees, stale rock entries
            from an earlier battle (or zeros) are drawn as phantom rocks. Rock shapes follow the tree list. W686 changes
            exactly these two operands. [COMBAT ROCKS]
            Static check (2026-10-24, tools/harness/regress.py 342): wizards/COMBSPRT.C:445 holds the code;
            Combat_Queue_Terrain_Objects_B = 1.31 bytes [work/harness/game/WIZARDS.EXE]
343. READ+asm Combat sprite list: the overflow check is one too late, and the overflow ends the game. Sprite_List_Add
            (dc99:28a8) allows up to 257 sprites ('if (0x100 < count) fatal', i.e. it stops only at the 258th) and the
            record array does hold 257 (0x1E2 paragraphs / 30 bytes). But the depth-order index table at DS:49f0 holds
            256 bytes. The 257th sprite's insert shifts one byte past it onto combat_def_floating_island (DS:4af0, a
            combat flag) and stores its own index as (byte) 256 = 0, so sprite 0's order slot is reused. A 258th sprite
            stops the game with Fatal_Exit 'E1'. Reach: up to 36 battle units of up to 8 figures, each with a status
            icon, plus up to 59 trees (forest), about 15 rocks, 14 city-wall pieces, vortices and missiles. A 9-v-9
            battle of 8-figure units in a forest city with walls is about 250 sprites, and combat summons / raised dead
            push past 256. Rare, but a crash to DOS when it happens. [COMBAT SPRITE LIMIT]
            Static check (2026-10-24, tools/harness/regress.py 343): wizards/COMBSPRT.C:1191 holds the code;
            Sprite_List_Add = 1.31 bytes [work/harness/game/WIZARDS.EXE]
344. READ+asm Owned towers are not shown in their owner's colors (COMMUNITY-KNOWN W692, confirmed in the asm).
            Map_Draw_Towers (d95b:06e3) recolours the tower's shades 0xE0-0xE4 with the NUMBER banner*5 + 0xAA (asm
            07de-07e6: imul 5 / add ax, 0AAh / push ax), the same value for all five. The banner colors are the BYTES
            of the table at DS:00AA, read the way Banner_Colorize does (8593:0179 mov al, [bx+0AAh]): banner 0 =
            0x69-0x6D, banner 1 = 0x49-0x4D, and so on. The tower is painted flat in palette entry 0xAA / 0xAF / 0xB4 /
            0xB9 / 0xBE, which has nothing to do with the owner. W692 rewrites this color retrieval. [TOWER OWNER
            COLOUR]
            Static check (2026-10-24, tools/harness/regress.py 344): wizards/MAPLAYER.C:348 holds the code;
            Map_Draw_Cities = 1.31 bytes [work/harness/game/WIZARDS.EXE]
345. READ+asm Cityscape: in a city with 15 or more small buildings, one building is drawn in the wrong place (cosmetic).
            Cityscape_Layout (cd8b:2685) stores the lots it places in fixed stack arrays: 8 entries each for the 3x3,
            3x2 and 2x3 footprints (bp-0xbc/-0xac, -0x9c/-0x8c, -0x7c/-0x6c) and 14 for the 2x2 footprint (y at bp-0x5c,
            x at bp-0x40; asm 317e-3195), with no bound check. Footprint class 0 (2x2) holds 16 buildings in BUILDDAT
            (Armory, Smithy, Animists / Sages / Alchemists / Wizards / Merchants / Foresters / Mechanicians / Miners
            Guilds, Sawmill, Oracle, Marketplace, Bank, Granary, Farmers Market), and Earth Gate, Stream of Life and
            Astral Gate add 2x2 lots too. With a 15th lot, its y is written over the first lot's x, so that building is
            drawn at the wrong column (over a road or another lot) and its own lot stays empty; x entries 14-17 fall on
            locals that are set again later, and entry 18 on the search radius. The other classes have at most 5 / 2 / 6
            buildings, so their 8-entry arrays are safe. Reach not tried in game (how many class-0 buildings a race can
            hold at once is not checked). No community patch. [CITYSCAPE LOT ARRAY]
            Static check (2026-10-24, tools/harness/regress.py 345): wizards/CITYSCAP.C:1047 holds the code;
            Cityscape_Layout = 1.31 bytes [work/harness/game/WIZARDS.EXE]
346. READ+asm Sound setup errors lose their explanation (cosmetic). Sound_Fatal_Error (3151:0e4d) builds the fatal
            message for the driver / I-O error codes with strcpy twice instead of strcpy + strcat. It copies the
            specific text ('You selected an invalid sound driver, ', 'You selected an invalid digi driver ...', 'Sound
            driver is not a valid XMIDI driver', 'Music ' / 'Digi Driver ' + 'I/O parameters are incorrect, ', ...) and
            then copies 'reconfigure hardware options' OVER it (asm 0e6d / 0e7c both call 1000:3c37 strcpy). Only the
            generic tail reaches Fatal_Exit; the 'Music ' / 'Digi Driver ' prefix is overwritten twice. The file-error
            codes (one strcpy, or strcpy + strcat 1000:3bfe for '... sound file') come out correctly. Reach: a wrong
            sound driver, port, IRQ or DMA set in INSTALL. [SOUND ERROR TEXT]
            Also (merged from #397, N221): a sequence that fails to register (code 11) exits without AIL_shutdown,
            unlike the other codes. Proved by byte-matching src/wizards/SOUND.C (also MAGIC 2fc5).
            Static check (2026-10-23, tools/harness/regress.py 346): wizards/SOUND.C:618 holds the code;
            Sound_Fatal_Error = 1.31 bytes [work/harness/game/WIZARDS.EXE]
347. SRC     A teleporting or merging AI unit that dies in its attack can come back to life with 0 figures (COMMUNITY-
            KNOWN W577, confirmed by reading). In AI_Move_Path (9218:226d), after the melee exchange the loop retries
            the same step. If the target is dead too, the step is taken as a move, and for a teleporting / merging unit
            that move runs Combat_Teleport_Anim / Combat_Merge_Anim. Both set status = 4 for the effect and then status
            = 0 (alive) and the new combat_x / y unconditionally, with no 'is the mover still alive' test, so the dead
            attacker is alive again with figures_alive 0. Only when the attacker is visible to the viewer (the animation
            branch). W577 replaces the move-flag test with a status test. [AI MOVE REVIVE]
            Re-checked (N221): SPELLFX.C Combat_Teleport_Anim 621 / 645: status DEAD for the effect, then ACTIVE and
            the new square unconditionally; called from AI_Move_Path 943-946 in the visible branch.
            Static check (2026-10-24, tools/harness/regress.py 347): wizards/COMBTACT.C:776 holds the code;
            AI_Move_Path = 1.31 bytes [work/harness/game/WIZARDS.EXE]
348. SRC     AI melee movement after an attack (COMMUNITY-KNOWN W578, confirmed by reading AI_Move_Path 9218:226d; in-
            game effect not tested). (1) After killing its target the AI unit steps INTO the dead target's square when
            its remaining moves pass the path test - the loop retries the attack step and, the target now dead, takes it
            as a move. A human player's unit does not advance after a kill. (2) Teleporting / merging units pay a flat 2
            (one movement point) at the end of AI_Move_Path in addition to the melee cost (moves - (full moves + 1) / 2
            in Combat_Unit_Attack a22c:1da4), so they can fail to attack twice. (3) The patch's 'sometimes moves less than
            able after a kill' rests on the path test comparing post-attack moves with pre-walk path distances -
            plausible, not traced in full. [AI MOVE AFTER KILL]
            Re-checked (N221): COMBTACT.C AI_Move_Path 971-975: teleporters / mergers pay a flat 2 at the end. Parts
            (1) and (3) not re-checked.
            Static check (2026-10-24, tools/harness/regress.py 348): wizards/COMBTACT.C:776 holds the code;
            AI_Move_Path = 1.31 bytes; Combat_Unit_Attack = 1.31 bytes [work/harness/game/WIZARDS.EXE]
349. SRC     Combat: with all your units immobilized, opening the Info screen ends your turn (COMMUNITY-KNOWN W451, part
            confirmed by reading). Each combat turn starts with combat_all_units_immobile = 1 (Combat_Turn_Start 7719:0047).
            Combat_Select_Next_Unit clears it only when a unit can move; otherwise it sets the no-unit flag DS:3c8e and
            the 'All units are immobilized. Select an action.' prompt shows. Combat_Main (75eb:0000) ends the human turn
            at the bottom of its input loop whenever no winner is decided, 3c8e == 1 and combat_all_units_immobile == 0, and the
            Info button handler sets combat_all_units_immobile = 0 before opening Screen_Combat_Info. So in the immobilized state
            the Info button (W451 also names Flee and the end of auto combat) passes the turn instead of just showing
            the info. W451's other claims (frozen interface after the selected unit died, the prompt showing during the
            first enemy turn - Combat_Main sets the prompt flag DS:3f0a = 1 at combat start) are plausible from this
            code but not traced in full. [COMBAT IMMOBILIZED TURN]
            Re-checked (N221): COMBAT.C 577-578: the Info button sets combat_all_units_immobile = 0; 633: the turn
            ends when combat_end_turn_pending (set by COMBINFO.C 638 when no unit can move) and immobile == 0.
            Static check (2026-10-24, tools/harness/regress.py 349): wizards/COMBAT.C:190 holds the code; Combat_Main
            = 1.31 bytes; Combat_Turn_Start = 1.31 bytes [work/harness/game/WIZARDS.EXE]
350. SRC     Flying Fortress lets more than flying units in, and does not stop melee across the city edge (COMMUNITY-
            KNOWN W501, two of its three points confirmed by reading). The spell's help text: 'Only flying units may
            enter (or attack) and leave this city in the clouds.' (1) Combat_Mark_Wall_Obstacles (a76b:0064) builds the
            Fortress barrier (city_enchants[8]) with the city-wall code and its exemption list: flying (move_flags 8),
            teleporting (0x10), merging (0x80) and non-corporeal (ability_flags 0x800) units all ignore it. The fortress
            only differs by also closing the gate cell. (2) Melee_Wall_Allowed (8f51:247d) refuses melee from outside
            onto a city square only when has_city_walls == 1, and never tests Flying Fortress. A Fortress city without
            walls can be meleed on its edge squares by foot units from outside, and vice versa. W501's third point
            (moves between inside and outside) was not traced; W543 later fixed its own W501 change for players other
            than slot 1. [FLYING FORTRESS BARRIER]
            Re-checked (N221): COMBTARG.C Melee_Wall_Allowed 1062: has_city_walls == 1 only (Flying Fortress not
            tested); the obstacle exemptions (1) not re-checked.
            Static check (2026-10-24, tools/harness/regress.py 350): wizards/COMBTARG.C:1059 holds the code;
            Melee_Wall_Allowed = 1.31 bytes; Combat_Mark_Wall_Obstacles = 1.31 bytes [work/harness/game/WIZARDS.EXE]
351. SRC     AI settlers (and other walking units) board ships without checking for room, and the ship is not told to
            wait (COMMUNITY-KNOWN W581, confirmed by reading). AI_Unit_Go_Overseas (ebda:569d) sends a walking unit next
            to shore water to any own stack within one square whose AI stack flag bit 0 is set. That flag means 'holds a
            transport': AI_Build_Strength_Tables d208:0cd7 sets it for a unit with UnitType +0x1b0 > 0, and the stack's
            free-seat count at +6 (capacity minus passengers) sits right beside it. The function never reads +6 and
            gives the ship no order to stay, so a full ship, or one that sails off in the same turn, leaves the unit
            stuck on the shore and the trip fails. W581 (1,121 bytes) also reworks the stack-embark and at-sea orders.
            [AI BOARDING]
            Re-checked (N221): AIUNITS.C AI_Unit_Go_Overseas 2300-2314: any own AISTACK_TRANSPORT stack within one
            square; spare_transport and the room are read into locals never used; no order for the ship.
            Static check (2026-10-24, tools/harness/regress.py 351): wizards/AITURN.C:409 holds the code;
            AI_Build_Strength_Tables = 1.31 bytes; AI_Unit_Go_Overseas = 1.31 bytes [work/harness/game/WIZARDS.EXE]
352. GAME    MAGIC.EXE world generator: the Towers of Wizardry spacing rule relaxes from the first try, and has no
            floor. Place_Towers (MAGIC 4358:0715) sets the spacing [bp-6] = 10 but never initialises its try counter
            [bp-8] (asm: only "mov [bp-6],0xa" and "xor di,di" before the loop; 4358:0727 inc [bp-8] / cmp 0x1f4 / jle;
            0731 mov [bp-8],0x1c2; 0736 dec [bp-6]). The counter starts with whatever the stack held, is never reset
            between towers and the spacing is never bounded below. GAME (tools/harness/magic_trace.py +
            magic_towers.py, nightly DOSBox-X breakpoints, 2026-10-17): counter = 14839 on the first try, so the very
            first attempt relaxes 10 -> 9; 4 relaxations in total in that world (rule ended at 6, closest towers 8
            apart); another world ended with towers 6 apart. Intended rule (as written): >= 10 apart, relaxing only
            after 500 failed tries. Found by runtime first (spacing 6 < 10), then read in asm. [TOWER SPACING]
            Static check (2026-10-25, tools/harness/regress.py 352): static fallback: magic/WORLDGEN.C:342 holds the
            code; Place_Towers = 1.31 bytes [work/harness/game/MAGIC.EXE] | play case NOT REACHED (2026-10-25 22:48):
            no first-try line: tools\harness\magic_towers.py", line 238, in <module> |     main() |     ~~~~^^ |
            File "tools\harness\magic_towers.py", line 197, in main |     raise RuntimeError('LBX_Load_Records not
            reached') | RuntimeError: LBX_Load_Records not reached
353. GAME     A Miners' Guild DOUBLES the iron / coal unit-cost cut instead of adding 50%: City_Production_Cost (c751:16c7)
            passes guild = (buildings[34] Miners' Guild standing or replaced) and dwarf = (race 4) to
            Tile_Mineral_Unit_Cost_Pct (f319:09fb), which returns Iron 5 / Coal 10, but 10 / 20 with the guild (x2 again
            for Dwarves, /2 on a shared square); the summed cut lowers normal units' cost to at least 50%. COMMUNITY-KNOWN
            (W251FIX: "Miner's Guild adds 100% to Coal, Iron instead of 50%"). CORRECTION (step 64): the phase-2 review
            had rejected W251FIX as "guild branch unreachable: only caller passes guild 0" - City_Site_Evaluate does pass 0,
            but City_Production_Cost is a second caller with the real flags. Found while modelling production for F1.
            In game (2026-10-23, tools/harness/regress.py 353): Tile_Mineral_Unit_Cost_Pct(15, 29, plane 0, guild 1,
            dwarf 0) on iron ore = 10 (5 without the guild)
354. READ+asm MAGIC.EXE: a PRESET wizard starts with one more spell per realm than a custom wizard with the same books, and
            with 10 books gets the whole 11-book set. Wizard_Apply_Preset (3da3:5674) reads the per-book-count tables one
            entry late: the counts of commons / uncommons / rare are [2*books + 0x2c2c] / [+ 0x2c40] / [+ 0x2c54] (asm
            3da3:5766 / 5785 / 578f), i.e. start_spells_common / _uncommon / _rare[books - 1], while Screen_Select_Spells
            (the custom path) reads [books - 2] (asm 3da3:4316 cmp [bx + 0x2c2e], 4342 [bx + 0x2c42], 436e [bx + 0x2c56]).
            Presets skip the spell screen (NewGame_Run: name -> race), so these defaults are final. Effect: b books -> b
            commons instead of b - 1; 10 books (Ariel Life, Jafar Sorcery, Freya Nature, Tauron Chaos) -> all 10 commons
            + 2 uncommons + 1 rare, which a custom wizard gets only at 11; Rjak (9 Death) 9 commons + 0.
            AI wizards take another path (Wizards_Setup copies all 13 defaults; the count tables are not read there - not
            followed further). ReMoM transcribes the same reads (m_select_count_common[spellranks] - 2) without a note. Intent PROVISIONAL (could be a deliberate
            bonus for presets); effect queued for a live check (RUNTIME_CONFIRM: new game as Ariel). [PRESET SPELLS]
            CORRECTED (2026-10-26, P4 B4 #354): the late read is real but has NO effect in play. Wizards_Init_Spell_Lists
            (src/magic/GAMESTRT.C) makes KNOWN only start picks 0 .. books - 2 below 11 books - the same first entries
            whichever count was stored - and at 11 books every common plus picks 10 .. 12, reading no count; so the extra
            pick never becomes a known spell (30 generated worlds: preset Merlin 5 / 5 books knows 4 / 4 commons, as a
            custom wizard). Latent.
            Latent in 1.31 (2026-10-25, tools/harness/regress.py 354): the human per world (name, Life / Nature books,
            known Life / Nature commons): {('Merlin', (5, 5), (4, 4)): 30}. Wizards_Init_Spell_Lists
            (src/magic/GAMESTRT.C) makes only the first (books - 1) start picks known below 11 books, so the extra
            pick Wizard_Apply_Preset stores never becomes a known spell; at 11 books every common is known anyway (the
            10-book Ariel / Jafar / Freya / Tauron case not run) - latent: the extra pick is never made known for any
            book count
355. GAME     MAGIC.EXE world generator: the mineral sites ignore the map edge, so some land OFF the map. Place_Minerals
            (4358:8a13) takes one site per 4x4 (Arcanus) / 3x3 (Myrror) cell, at cell + Random(2 * cell) (Random = 1..n),
            i.e. x up to 64 / 63 and y up to 44 / 45 on a 60 x 40 map. The edge test meant to skip such sites is written
            with AND: asm 4358:8be7 cmp di,2 / jg / cmp di,0x26 / jl / cmp si,2 / jg / cmp si,0x3a / jl / jmp skip =
            "y <= 2 AND y >= 38 AND x <= 2 AND x >= 58" - never true, so nothing is skipped. Effects (from the code):
            x 60..64 wraps onto the first squares of the NEXT row, where the lair / tower / city tests (they compare the
            unwrapped x) see nothing, so a city, lair or tower square there can be turned into mountain / hills / swamp
            (grassland always, forest half the time) and given a mineral; Arcanus y 40..44 lands in Myrror's rows 0..4
            (Place_Minerals(1) runs next and clears Myrror's mineral map, but a terrain change stays); Myrror y 40..45
            reads and writes past the end of the terrain (0x2580 bytes) and mineral (0x12c0) buffers. Intended (as
            written): skip the 3 outer rows / columns, which would also have kept every site on the map. Effects
            PROVISIONAL until the live check (RUNTIME_CONFIRM, MAGIC world build). [MINERAL EDGE]
            In game (2026-10-24, tools/harness/regress.py 355): minerals in the edge band (world, plane, x, y, value)
            [('008', 1, 2, 13, 4), ('014', 0, 2, 11, 6), ('017', 0, 2, 21, 5), ('023', 1, 2, 21, 64)]; elsewhere 2249
            (30 worlds)
356. GAME    MAGIC.EXE world generator: Myrror's city squares never get the enchanted-road bit, and ONE unrelated square
            does. Gen_Roads (4358:84d3) ends by marking every city square with the road bit 8 and, for plane 1, meant to
            add 0x10 (Myrror roads are enchanted), but that store indexes with the road loop's leftover x / y (asm
            4358:8951-898c: [bp-0xe] * 0x3c + [bp-0xc], while the city loop counts in [bp-0x10]): it ORs 0x10 into
            the last square the road search looked at (or (60, 40), past the end of the flag maps, when no Myrror road
            was tried). SAVE CENSUS (20 distinct saves): starting Myrror cities carry flags 8 (no 0x10), and 4 saves
            hold exactly one Myrror square with 0x10 but no road bit - (36,14), (35,11), (32,11), (32,7). Movement is
            not affected (MAGIC's Build_Movement_Maps prices roads by bit 8 and the plane); Battlefield_Generate draws an
            enchanted road for 0x10, so a battle on that square shows one (PROVISIONAL - not seen). [MYRROR ROAD BIT]
            In game (2026-10-24, tools/harness/regress.py 356): city squares (plane, flags & 0x18): {(0, 8): 350, (1,
            8): 249} over the 30 worlds
357. GAME    MAGIC.EXE world generator: every Mysterious Cave, Dungeon, Abandoned Keep and Monster Lair is guarded by
            NATURE creatures only - a switch without breaks. Lair_Create (4358:3227) picks the guardians' realm by lair
            kind; for these four types Random(5) jumps (cs:[bx + 0x3c9f], asm 4358:34b4) into five consecutive stores
            with no jump between them (34b9 death, 34be death, 34c3 chaos, 34c8 chaos, 34cd nature), so every roll falls
            through to Nature. Intended (as written): Death 2/5, Chaos 2/5, Nature 1/5. The other two switches of the
            same function do break (towers: asm 340f-342d; temples / ruins: 348c-349c). Both guardians come from that
            realm. SAVE CENSUS (20 distinct saves): 528 guardian groups in those four lair types, all Nature (race 16),
            while temples / ruins hold Death and Life and towers all five realms. COMMUNITY: not found in the
            community patch map (it covers WIZARDS only). [LAIR REALM]
            In game (2026-10-24, tools/harness/regress.py 357): guardian races in the four types
            {'RACE_NATURE_CREATURE': 494}; in the other lair types {'RACE_LIFE_CREATURE': 191, 'RACE_NATURE_CREATURE':
            464, 'RACE_DEATH_CREATURE': 676, 'RACE_SORCERY_CREATURE': 650, 'RACE_CHAOS_CREATURE': 457} (30 worlds)
358. GAME    MAGIC.EXE world generator: too many Sorcery nodes are 'balanced' into a fixed 4 / 6 / 6 split, not trimmed.
            Balance_Node_Realms (4358:148e) computes the surplus = sorcery - 9 (Arcanus) / - 4 (Myrror) but never lowers
            it (asm: [bp-0xe] written at 151b / 155b, only compared at 1533 / 1547 / 1573 / 1587), so the loops that
            should move the surplus into Chaos (up to 6 / 3) and Nature (up to 6 / 3) run until both are full: whenever
            Arcanus rolls 10+ Sorcery nodes (Node_Pick_Realm: Sorcery 0.60 per node -> 52% of worlds) it ends with exactly
            4 Sorcery, 6 Nature, 6 Chaos (the surplus rule would leave 9 Sorcery); Myrror (98% of worlds) gets Chaos and
            Nature topped up to 3 each. SAVE CENSUS (6 distinct worlds, game saves only): 3 have Arcanus S4 N6 C6 - an
            exact split the dice alone give about once in 1,200 worlds - and the other 3 have <= 9 Sorcery (no balancing). The
            computed-but-unused surplus is the mark of a forgotten 'surplus--'. [NODE BALANCE]
            In game (2026-10-24, tools/harness/regress.py 358): Arcanus node splits (Sorcery, Nature, Chaos): {(4, 6,
            6): 18, (8, 6, 2): 1, (8, 4, 4): 1, (7, 3, 6): 1, (9, 3, 4): 1, (9, 4, 3): 2, (8, 5, 3): 1, (9, 5, 2): 2,
            (9, 6, 1): 1, (6, 5, 5): 1, (5, 5, 6): 1}; exactly 4 / 6 / 6 in 18 of 30 worlds
359. GAME     MAGIC.EXE world generator: the 'High Elf AI capitals need a forest' rule tests the wrong square, and its
            retry writes extra fortress records past the 6. Place_Fortresses (4358:08cf), building the capitals: an AI
            capital whose rolled race is High Elf (asm 4358:0e03 cmp [city + 0xe], 7) calls Tile_Is_Forest with the
            leftover x / y / plane of the LAST fortress site tried ([bp-0xa] / [bp-0xc] / [bp-8], i.e. the 6th
            fortress), not this capital's square; when that square is no forest it jumps back into the fortress site
            loop (jmp 0x919) with its counter [bp-2] already 6: it reads wizards[6].retorts (past the 6 wizards), picks a
            new site and writes it as p_fortresses[6] (then [7] .. on later retries), then rebuilds every capital with
            new races. The real fortresses do not move, so the rule only re-rolls races until no High Elf AI is
            'rejected'. Stray records 6..11 land in the slack of p_fortresses' 3-paragraph block (24 of 48 bytes used);
            a 7th retry in one world would reach the next heap block's header (rough odds 0.28^7). SAVE CENSUS: of the
            6 distinct game worlds one has a High Elf AI capital (work/demom SAVE9.GAM, wizard 4) - on grassland 0xa2.
            [HIGH ELF CAPITAL]
            In game (2026-10-24, tools/harness/regress.py 359): High Elf AI capitals (world, player, terrain) [('004',
            2, 180), ('005', 1, 387), ('009', 3, 260), ('012', 2, 184), ('012', 3, 178), ('015', 2, 180), ('024', 1,
            163), ('024', 3, 180), ('029', 3, 163)]: 6 of 9 not on forest; other AI capitals on forest 28, elsewhere
            53; left out (Place_Minerals' wrap can reach them) []
360. GAME     MAGIC.EXE world generator: the land added next to a node / tower in open water only grows east, south and
            south-west. Gen_Islets_Around_Sites (4358:0344) tries Random(8) + 1 squares at dx, dy = Random(3) - 2 (-1..1)
            and switches on a 3 x 3 neighbour index whose cases are laid out for (dy + 1) * 3 + (dx + 1) (0..8: diagonals
            need a non-ocean square beside them, straight neighbours always, 4 = the centre refused) - but the code
            computes dy * 3 + dx (asm 4358:04cd imul 3 / add / inc, then dec for the table at 04e6). Index < 0 (the
            four directions with dy = -1, or dy = 0 and dx = -1) fails the unsigned 'index > 8' test and is skipped;
            (1, 0) -> case 1 and (0, 1) -> case 3 always convert; (-1, 1) -> case 2, the north-east diagonal test, so it
            looks at the unrelated squares (x - 1, y + 2) and (x - 2, y + 1); (1, 1) -> case 4, the centre: refused. So
            such islands only ever grow to the east, south and south-west. [ISLAND SPECIALS]
            In game (2026-10-24, tools/harness/regress.py 360): open-water nodes 129, 61 with land beside them; land
            squares by direction (dx, dy) {(1, 0): 41, (0, 1): 35}; outside east / south / south-west {}; cardinal:
            east + south 76, west + north 0
361. LATENT MAGIC.EXE: its own copy of Unit_Create (4358:95d5) checks the Fighters' Guild / War College of an
            UNINITIALISED city index - the local [bp-2] is reserved (sub sp,2) and only read (asm 4358:97c7, 9802), never
            set from the city parameter [bp+0x10] that gates the test (97be). WIZARDS' Unit_Create (a0ec:0000) uses its
            src parameter and also knows the Altar of Battle. MAGIC creates only the starting units through it, and no
            starting capital has those buildings, so it matters only if the stack value points outside the 100 cities
            at non-zero bytes (then a starting unit could start at level 1 / 2). Not seen. [MAGIC UNIT XP]
            Static check (2026-10-23, tools/harness/regress.py 361): magic/WORLDGEN.C:3480 holds the code; 4358:95d5 =
            1.31 bytes [work/harness/game/MAGIC.EXE]
362. READ+asm MAGIC.EXE game start: the Hard / Impossible AI's extra summon is guarded by the wrong spell, and can take
            a KNOWN spell back to 'researchable'. Wizards_Pick_Realms_And_Traits (522e:04b2) gives each AI its primary realm's basic
            summon as known (library 2: Sprites, Nagas, Hell Hounds, Guardian Spirit, Ghouls) and, above Normal, the
            realm's uncommon summon as researchable (1: Basilisk, Phantom Beast, Chimeras, Unicorns, Shadow Demons) only
            'if it is still 0' - but every realm tests Basilisk's byte (asm 522e:061a / 065b / 067b / 069b cmp
            [bx + 0x6b77]), Life tests Path Finding's (063b cmp [bx + 0x6b73]); only Nature tests its own. So the 1 is
            written whatever the target held. Wizards_Init_Spell_Lists (run earlier) makes the start picks' uncommons
            known only with 11 books in the realm, and the AI default picks include Phantom Beast (Sorcery) and
            Unicorns (Life): a Hard / Impossible AI with 11 books in a primary realm of Sorcery or Life loses that
            known summon to 'researchable'. [AI EXTRA SUMMON]
            Static check (2026-10-25, tools/harness/regress.py 362): static fallback: magic/GAMESTRT.C:257 holds the
            code; Wizards_Pick_Realms_And_Traits = 1.31 bytes [work/harness/game/MAGIC.EXE] | play case NOT REACHED
            (2026-10-25 23:18): 30 Hard worlds; AIs with a Life / Death / Chaos / Sorcery primary by (summon state,
            guard byte set): {(1, False): 69, (1, True): 8}; summon not in the library (world, player, realm, guard
            byte): [] - every such summon in the library (no evidence either way)
363. GAME    MAGIC.EXE game start: AI wizards practically never lose their preset's retort - the 'clear the retorts'
            roll clears one byte. AI_Wizards_Create (522e:0d3e) shuffles each AI preset by 0 (Intro / Easy), Random(3)
            (Normal), Random(3) + Random(3) (Hard) or Random(5) + Random(5) (Impossible) random reductions - Random(6):
            one book less in a realm, or (6) clear the retorts - then tops the picks up to 11 / 13 (Hard) / 15
            (Impossible). The clear loop counts 18 retort slots in [bp-2] but stores at retorts[di], di being the
            reduction counter (asm 522e:10a1 add bx,di / mov [bx],0 / inc [bp-2]): it clears retort number i only.
            SAVE CENSUS (6 distinct game worlds): 19 of 19 AI wizards still hold their preset's retort, 16 of them above
            Intro, where the intended rule would have stripped about half (chance of 16 / 16 about 1 in 25,000). [AI RETORT]
            In game (2026-10-25, tools/harness/regress.py 363): 30 worlds (difficulty {3: 30}): AI wizards with a
            preset retort 84, still holding it 82 (98%; the intended rule keeps about 49% on Hard)
364. GAME    MAGIC.EXE game start: a hero's random 'Lucky' roll also rolls Agility - a missing break. Heroes_Init_Start
            (522e:246d) gives each of the 35 hero types per player its template's random picks (DS:0x35d0, 18 bytes per
            hero: picks, kind, base abilities) by Random(14); case 11 (Lucky, abilities_b 0x800) has no break (asm
            522e:28e4 .. 2907 runs straight into case 12 at 290a, even its own 'already Lucky' test jumps there), so it
            continues into the Agility / Super Agility step whenever fighter picks remain - Agility comes up 2 in 14 and
            Lucky costs two picks. SAVE CENSUS (6 distinct game worlds, 750 heroes with picks): of 107 with a rolled
            Lucky, 34 (32%) also rolled Agility; of the other 643, 57 (8.9%). [HERO LUCKY]
            In game (2026-10-24, tools/harness/regress.py 364): heroes with fighter picks in 30 worlds x 5 players:
            with a rolled Lucky 376, of them 149 (40%) also rolled Agility; without Lucky 2324, of them 381 (16.4%);
            one-sided Fisher p = 1.2e-22 (pooled); Mantel-Haenszel per hero type z = 8.03 over 17 informative types;
            per type [lucky&agile, lucky, agile, neither] {6: [0, 10, 17, 123], 8: [0, 14, 18, 118], 11: [0, 12, 0,
            138], 12: [0, 7, 7, 136], 14: [0, 13, 23, 114], 17: [12, 13, 29, 96], 19: [7, 12, 28, 103], 20: [20, 7,
            26, 97], 21: [0, 13, 22, 115], 22: [0, 18, 19, 113], 24: [37, 6, 26, 81], 26: [0, 12, 19, 119], 28: [0,
            13, 35, 102], 29: [0, 21, 15, 114], 30: [24, 9, 26, 91], 31: [0, 27, 18, 105], 33: [28, 11, 21, 90], 34:
            [21, 9, 32, 88]}
365. GAME    MAGIC.EXE world generator: the third tundra picture (terrain 0xb6) is never placed. Gen_Terrain_Variety
            (4358:52a1) swaps each plain grassland / forest / desert / swamp / tundra square for one of its visual
            variants by Random(4) / Random(3); tundra rolls Random(3) (1..3) but tests 1, 3 and 4 (asm 4358:5626 ..
            563f: cmp ax,1 / 3 / 4) - 2 leaves it unchanged, 3 gives 0xb5, the 4 for 0xb6 never comes. So tundra is
            2/3 plain 0xa7, 1/3 0xb5. Same food, production and movement for all three; only the picture.
            SAVE CENSUS (5 distinct game worlds): tundra 0xa7 171, 0xb5 74, 0xb6 0. [TERRAIN VARIETY]
            In game (2026-10-24, tools/harness/regress.py 365): pictures 0xb0 .. 0xb8 over the 30 worlds: {'0xb0': 9,
            '0xb1': 269, '0xb2': 288, '0xb4': 1971, '0xb5': 489, '0xb7': 3039, '0xb8': 2956}
366. GAME    MAGIC.EXE world generator: the ocean-variety pass runs one row and one column past the 40 x 60 map.
            Gen_Ocean_Variety (4358:98b5) turns 1 in 5 plain ocean squares (0) into the other ocean picture (0x259),
            but loops y 0..40 and x 0..60 (asm 4358:997b cmp [bp-2],0x3c / jg; 9985 cmp di,0x28 / jg). Square
            [y][60] is [y + 1][0] and row 40 of Arcanus is row 0 of Myrror, so Arcanus column 0 and Myrror's top row
            and column 0 get two rolls (36% variant instead of 20%); Myrror's row 40 is past the map: 32 spare bytes of
            the allocation (0x25a paragraphs for 0x2580 bytes), the next allocation's 16-byte header (no 0 words) and
            the first 74 bytes of p_region_bits_land - which already holds Arcanus' block-crossing bits (Build_Region_Bits
            runs just before, #367): a 0 word there becomes 0x0259 1 time in 5 (SAVE CHECK: original save1 bytes 18
            and 22, save2 byte 72 = 59 02, exactly the blocks whose shared-edge flags disagree with their neighbours).
            No effect on play: WIZARDS only loads and saves that map. Also dead: its second test (0x2fa ->
            0x553, the same swap for a Myrror-offset ocean value) never matches - the generator stores Myrror squares
            with the Arcanus values. SAVE CENSUS (5 distinct game worlds): squares rolled once 1,863 / 9,327 ocean =
            20.0% variant; rolled twice 124 / 342 = 36.3% (two rolls predict 36.0%); no terrain value >= 0x2fa.
            [OCEAN VARIETY]
            In game (2026-10-24, tools/harness/regress.py 366): variant share in column 0 38.0% (788 of 2072 ocean
            squares), in columns 1..58 20.5% (12055 of 58922)
367. LATENT MAGIC.EXE world generator: the block map's east-edge pre-check tests the wrong columns - in data nothing
            uses. Build_Region_Bits (4358:89a4) runs Block_Edge_Bits_Build (518e:0000) on movement layers 1 (land; ocean
            impassable) and 5 (water only) of each plane: the map as 12 x 8 blocks of 5 x 5 squares, one byte per block
            (p_region_bits_land / _b, 96 bytes per plane): per edge N 1 / E 2 / S 4 / W 8 'a passable square on the edge
            with a passable neighbour across it' (+ 0x10 / 0x20 / 0x40 / 0x80 kept), the low bit cleared again when
            Path_Win_Search finds no path from the block's far side across the edge; then each low bit is copied to
            the neighbour's opposite edge. The E pre-check sets x = x0 + 1 (with a wrap at 60 that never applies) and
            compares columns x0 / x0 + 1 - the copy of the W check with -1 -> +1, not x0 + 4 / x0 + 5 (asm 518e:0656 ..
            06a5). The E path search itself uses the right window, and the symmetry pass restores E from the east
            neighbour's W, so only the kept 0x20 flags are wrong. SAVE CENSUS (5 distinct game worlds, both maps and
            planes): shared-edge flags N 0x10 vs the upper block's S 0x40 agree 1,668, disagree 12 (all 12 = #366's
            overrun); E 0x20 vs the east block's W 0x80 agree 1,503, disagree 417 (a few at #366's bytes). No effect on play: WIZARDS never
            reads these maps (only save / load); its own windowed pathfinder (db07) that matches them is dead code -
            a coarse block pathfinder that was not finished. [REGION BITS]
            Static check (2026-10-23, tools/harness/regress.py 367): magic/REGIONS.C:14 holds the code; 518e:0000 =
            1.31 bytes [work/harness/game/MAGIC.EXE]
368. CHECKED Overland pathfinding: the search window's bottom row is never clamped to the map, so Path_Find writes past
            its 40-row cost grid. Path_Bounding_Box (d592:0608) widens the two ends by a quarter of their distance and
            clamps ymin to 0..39 (asm d592:0654 .. 0662: [di] = ymin; the upper clamp to 0x27 cannot apply to a
            minimum) but leaves ymax (stored at d592:0652) as it is - up to 39 + 39 / 4 = 48. Path_Find (d592:00ae)
            then marks every row ymin..ymax outside the x window impassable (0xff), rows 40..48 included: up to 9 x 60
            bytes past PathWork.cost (0x960 bytes). Those bytes are PathWork +0x960.., the relaxation's distance grid
            (u8[40][60], missing from the PathWork struct), which Path_Relax (d511:0004) refills with 0xff at once
            (asm d511:0023 .. 002c: rep stosw 0x4b0 words from 0x960) - so today it has no effect on any path; it is
            a bug that only the buffer layout hides. [PATHFINDING]
            Static check (2026-10-24, tools/harness/regress.py 368): wizards/PATHFIND.C:183 holds the code;
            Path_Bounding_Box = 1.31 bytes [work/harness/game/WIZARDS.EXE]
369. CHECKED Tile_Make_Grassland (cbdf:018a; Change Terrain, Gaia's Blessing) never makes the third grassland picture
            0xad. Its table at DS:6eac holds 0xa2 / 0xac / 0xad, but it reads [Random(2) * 2 + 0x6eaa] (asm cbdf:0195 ..
            01a3) - Random gives 1..2, so 0xa2 or 0xac. Tile_Make_Forest reads [Random(3) * 2 + 0x6eb0] and uses all
            three forest pictures. Same terrain for food, production and movement; only the picture. [TERRAIN VARIETY]
            Static check (2026-10-24, tools/harness/regress.py 369): wizards/TERRCHG.C:95 holds the code;
            Tile_Make_Grassland = 1.31 bytes [work/harness/game/WIZARDS.EXE]
370. GAME    MAGIC.EXE game start: a wizard whose primary realm is Nature always gets Nature as the secondary realm
            too. Wizards_Pick_Realms_And_Traits (522e:04b2) picks the primary as the realm with the most books, scanning Nature,
            Sorcery, Chaos, Life, Death with a strict '>' - so a tie goes to the realm earlier in that order (Nature
            first). The secondary scan then starts from Nature AND Nature's book count (asm 522e:04eb .. 04f3: [bp-0xa]
            = 0, [bp-2] = books[0]) and takes only a realm with MORE books that is not the primary (0503 jle / 0508 je);
            when Nature is the primary nothing can beat its count, so the secondary stays Nature. Same code for the AI
            wizards (054a ..). Other primaries are not affected (except that a tie with Nature for second place goes to
            Nature, by the same order). WIZARDS reads secondary_realm only in AI spell choices (AI_Pick_Spell_Category,
            AI_Target_Spell_Ward / _Consecration - which look at the HUMAN's realms -, AI_Drop_Bad_Globals,
            AI_Pick_Global_Enchant_Target), so e.g. a Nature / Death human is treated as pure Nature: no ward or
            Consecration aimed at the Death half except by the 1-in-10 random pick. SAVE CENSUS (original saves, 29
            distinct wizards): all 4 Nature-primary wizards holding other books have secondary = Nature - save1 turn 0
            (9 Nature, 1 Sorcery), save9 turn 0 (5 Nature + 5 Chaos; 5 Nature + 5 Life - also the tie rule), save2
            turn 106 (10 Nature, 2 Death). [MAGIC REALMS]
            In game (2026-10-24, tools/harness/regress.py 370): wizards with primary Nature (world, wizard, secondary,
            books): [('000_small.GAM', 0, 0, [5, 0, 0, 5, 0]), ('001_medium.GAM', 0, 0, [5, 0, 0, 5, 0]),
            ('001_medium.GAM', 1, 0, [10, 0, 0, 0, 0]), ('002_large.GAM', 0, 0, [5, 0, 0, 5, 0]), ('002_large.GAM', 1,
            0, [5, 0, 5, 0, 0]), ('003_small.GAM', 0, 0, [5, 0, 0, 5, 0]), ('003_small.GAM', 2, 0, [10, 0, 0, 0, 0]),
            ('003_small.GAM', 3, 0, [5, 0, 5, 0, 0])]; all wizards 120
371. QUIRK   Font selection is called with too few arguments: the third color set is whatever lies on the stack.
            Font_Select (1b42:0068) always reads four arguments - font and three color-set numbers (asm 1b42:0072 /
            0080 / 008e: [bp+8] / [bp+0xa] / [bp+0xc], each kept when < 16, else 0) - but 53 of its call sites push
            only three words ('add sp, 6' after the call; e.g. 6d36:107a pushes 0xf, 4, 4 = Font_Select(4, 4, 15)),
            so the third set comes from the caller's stack. Exact counts (tools/arity.py, P1 (d), 2026-10-21):
            WIZARDS Font_Select 30 calls push 2 words, 53 push 3; _Shadow 10 x 2, 4 x 3; _Shadow_UL 2 x 3; _Outline 1 x 2;
            MAGIC Font_Select 41 x 2, 33 x 3; _Shadow 11 x 2, 4 x 3; _Shadow_UL 2 x 2, 2 x 3 (a 2-word call leaves
            color sets 2 AND 3 to the stack). The source evidently called it without a prototype in
            scope (C then accepts fewer arguments); the Font_Select_Shadow / _Shadow_UL / _Outline wrappers forward
            their arguments the same way. Visible effect NOT checked: it matters only where the printed text uses
            the third color set. (Decompile: the four functions are typed variadic so each call shows what it
            pushes; Fill_Box_Styled is the same pattern with its style-dependent extras.) [FONTS]
            Static check (2026-10-23, tools/harness/regress.py 371): wizards/UI.C:73 holds the code; Font_Select =
            1.31 bytes [work/harness/game/WIZARDS.EXE]
372. CHECKED The city breakdown screen sets its redraw callback without the frame rate. Screen_City_Breakdown
            (4a3f:31fa) calls UI_Set_Redraw_Fn (2666:9459: fn far pointer, rate) pushing only the pointer (asm
            4a3f:3287 .. 3295: push 0x23fa, push 0xde, call, pop cx, pop cx), so 'rate' is the next word on the stack
            - the screen's saved DI (its prologue pushes si, di), i.e. the caller's DI register. UI_Set_Redraw_Fn
            uses it as ui_frame_ticks when it is 1..9, else 2. Every other call (148 sites) passes a rate. Effect:
            the breakdown screen's redraw pacing depends on a leftover register value; not checked in game.
            Found by tools/argcount_scan.py (words read vs pushed per call site). [ARG COUNTS]
            Static check (2026-10-24, tools/harness/regress.py 372): wizards/CITY.C:1442 holds the code;
            Screen_City_Breakdown = 1.31 bytes [work/harness/game/WIZARDS.EXE]
373. CHECKED The save-game name fields of the game menu get a garbage caret color table. Screen_Game_Menu
            (f294:0000) adds each save slot's editable name with UI_Add_Text_Line (2666:4177, 9 words: ... help,
            caret_colors) but pushes 8 (f294:0314, 'add sp, 0x10'), so caret_colors is the next stack word - the
            menu's saved DI (prologue push si, push di) - which UI_Add_Text_Line stores as the control's near caret
            color table (asm 2666:42ae .. 42b1 -> UIControl +0x22, read for the caret of type-11 text controls,
            step 72). Effect: the caret colors while typing a save name come from whatever DS bytes that leftover
            register points at; not checked in game. [ARG COUNTS]
            Static check (2026-10-24, tools/harness/regress.py 373): wizards/GAMEMENU.C:110 holds the code;
            Screen_Game_Menu = 1.31 bytes [work/harness/game/WIZARDS.EXE]
374. LATENT  EMS_Cache_LBX_Range_Core (16d5:0654, dead code - only dead wrappers call it) calls EMS_Named_Handle
            (pages, name, reserved) with two arguments (16d5:07c9: push name, push pages, pop cx, pop cx): 'reserved'
            would be a leftover stack word, and 1 there would charge the pages to ems_reserved_pages. The live twin
            EMS_Cache_LBX_Entry passes 0. No effect: never called. [ARG COUNTS]
            Static check (2026-10-23, tools/harness/regress.py 374): wizards/EMSLBX.C:269 holds the code;
            EMS_Cache_LBX_Range_Core = 1.31 bytes [work/harness/game/WIZARDS.EXE]
375. CHECKED The deserted-outpost name list has room for 14 names but accepts 20. Turn_City_Growth (c3f5:153d ..
            1574) copies the name of each emptied human outpost to DS:0x99c3 + count * 20 while count < 20 (cmp byte
            [0x99c2],0x14 / jge), but the next variable, report_outposts_grown_count, is at DS:0x9adb - 0x118 bytes
            = 14 rows of 20 (the rows are 20 bytes, the City name field 14). From the 15th outpost deserted in one
            turn the names overwrite report_outposts_grown_count, the report_outposts_grown list, city_notice_count
            and the start of city_notices (up to DS:0x9b6e). Effect: practically none - 15 human outposts would have
            to empty in the same turn. Found while sizing the table (step 78c batch c14). [TABLE BOUNDS]
            Static check (2026-10-24, tools/harness/regress.py 375): wizards/TURNUPD.C:633 holds the code;
            Turn_City_Growth = 1.31 bytes [work/harness/game/WIZARDS.EXE]
376. READ+asm The AI's attack-landmass distance uses a stale value for threatened coast tiles. AI_Choose_Attack_Landmass
            (f48f:3f14) takes, per landmass, the smallest distance from its zero-threat coast tiles to the centroid of
            the AI's own cities; for a coast tile WITH threat it skips the Map_Distance call (f48f:435e cmp, jnz
            437f) but still compares [bp-0x12] with the minimum - the previous tile's distance, or for the first
            tile the own-city count left in the same variable. Effect: a landmass whose coast is partly threatened
            can get a smaller distance than any safe landing tile has, so a larger weight
            ((2000 - 10 x target cities) / distance) in the attack-landmass pick. Not checked in game. [AI]
            Static check (2026-10-24, tools/harness/regress.py 376): wizards/AIORDERS.C:1450 holds the code;
            AI_Choose_Attack_Landmass = 1.31 bytes [work/harness/game/WIZARDS.EXE]
377. SRC     QUIRK (cosmetic): the window zoom draws two of its three color pairs. Window_Zoom_Draw (d677:2258)
            fills three [4][12] dash-color tables from its color pairs (Window_Zoom_Open passes 0xb4/0xb5, 0xb9/0xba,
            0xbb/0xba), but every line reads table a (row Random(4) - 1) or table c (acStack_50 + 12 r = table c row
            r - 1); table b is filled and never drawn. Step 78c c41. [UI]
            Re-checked (N221): NOTIFY.C Window_Zoom_Draw: pat_b filled, only pat_a / pat_c drawn.
            Static check (2026-10-24, tools/harness/regress.py 377): wizards/NOTIFY.C:1010 holds the code;
            Window_Zoom_Draw = 1.31 bytes [work/harness/game/WIZARDS.EXE]
378. SRC     QUIRK (cosmetic): the warped-picture draw drops a whole frame when a corner is above the screen.
            Pic_Draw_Warped_Core (2072:0d5d) takes the y range of its 4 corners with the start values swapped:
            min starts at 0 and max at 10000 ([bp-0x26] = 0, [bp-0x28] = 0x2710 at 2072:0dbd), both compared
            unsigned (jnc / jbe at 0dde / 0dfe). min never moves, so the "below the clip rect" reject (signed jg,
            0eb5) never fires; max moves only for a y above 10000 unsigned, i.e. a NEGATIVE y, and then the signed
            "max < clip_y1" test (jge, 0ebe) rejects the frame. (The min / max scan also runs inside the corner
            bubble sort, so a corner already moved past the scan index is not seen.) Only caller: Lose_Redraw's
            spinning portrait; its path table lose_anim_path (DS:0x511c) puts the top-left at y = -4, -10, -8, -5
            for steps 7-10, so frames around there are not drawn whenever a rotated corner stays above row 0
            (which steps depends on the portrait size - not computed). Not checked in game. Step 78c c61. [Gfx]
            Step 78c-Z4: confirmed by byte-matching src/wizards/PIC.C (the source sets max_y = 10000, min_y = 0 and
            scans inside the outer loop of the corner bubble sort; also MAGIC 1ee7).
            Re-checked (N221): our source note at src/wizards/PIC.C:737 states it.
            Static check (2026-10-24, tools/harness/regress.py 378): wizards/PIC.C:893 holds the code;
            Pic_Draw_Warped_Core = 1.31 bytes [work/harness/game/WIZARDS.EXE]
379. SRC     QUIRK (no effect): Nightshade's building test checks the Shrine twice. Cities_Count_Nightshade (f319:1348)
            counts Nightshade tiles only for a city with one of its listed buildings; the list compares buildings
            byte +0x35 (BLD_SHRINE, City.buildings at +0x1f) twice (asm f319:13c9 and 13e0), then Temple,
            Parthenon, Cathedral, Sages' Guild, Oracle, Alchemists' Guild, Wizards' Guild, Animists' Guild. The
            second test is redundant; the Library and University are not in the list (whether one was meant there
            cannot be read from the code). Step 78c c67. [City]
            Re-checked (N221): TERRAIN.C Cities_Count_Nightshade 984: BLD_SHRINE tested twice.
            Static check (2026-10-23, tools/harness/regress.py 379): wizards/TERRAIN.C:984 holds the code;
            Cities_Count_Nightshade = 1.31 bytes [work/harness/game/WIZARDS.EXE]
380. SRC     QUIRK (no effect): the move-type icon draw clears 9 words of a 6-word list, and relies on it.
            Draw_Move_Type_Icons (55bb:0bbc) zeroes [bp-0x16] for 9 words (asm 55bb:0bda-0beb, cmp di,9) before
            Stack_(Active_)Movement_Modes fills its 6 movement-mode words there. The 7th word, [bp-0xa], is the
            planar-travel flag: it is set to 1 only when Stack_Can_Planar_Travel succeeds (55bb:0c23), so its 0
            otherwise comes from the over-long clear. Effect: none (the extra words are this function's own
            locals). Step 78c c72. [UnitDraw]
            Re-checked (N221): UNITDRAW.C Draw_Move_Type_Icons 490-499: modes[9] cleared, the fillers write 6,
            modes[MOVE_MODE_PLANAR_TRAVEL] set only on success (our source reads the 9 words as one array).
            Static check (2026-10-23, tools/harness/regress.py 380): wizards/UNITDRAW.C:490 holds the code;
            Draw_Move_Type_Icons = 1.31 bytes [work/harness/game/WIZARDS.EXE]
381. READ+asm BUG (fatal-error path only): the "Near Allocation too large by N bytes" message never gets " bytes".
            Near_Alloc_Error (150a:00a5) calls strcat(" bytes") with ONE argument (asm 150a:00d9-00e2: push 0x729c,
            call strcat, pop cx) - it only compiles because the module has no <string.h> prototypes (proved by
            byte-matching the module: src/wizards/HEAP.C, step 78c-T). strcat takes the literal " bytes" as the
            DESTINATION and the word above it on the stack - this function's saved BP, a stack address - as the
            source, so stack bytes are appended to the literal in DGROUP (over the strings that follow it, e.g.
            "Insufficient memory...") and the message shown has no " bytes". Effect: cosmetic; Fatal_Exit follows.
            [Heap]
            Static check (2026-10-23, tools/harness/regress.py 381): wizards/HEAP.C:88 holds the code;
            Near_Alloc_Error = 1.31 bytes [work/harness/game/WIZARDS.EXE]

=== FOUND THROUGH THE COMMUNITY CROSS-CHECK (step 40) ===
102. GAME    AI wizard-target spells: AI_Pick_Wizard_Target e318:72bc applies the Spell Blast condition (target is casting
            AND its progress <= AI mana - 50) to Drain Power, Subversion and Cruel Unminding too, so those are cancelled
            unless a Spell Blast would also be valid - the AI's versions almost never work. COMMUNITY-KNOWN (W239FIX).
            In game (2026-10-23, tools/harness/regress.py 102): AI_Pick_Wizard_Target(spell 171, caster 1) = 0; wizard
            1 casting now 0
103. GAME    Growth only stops when population EQUALS the maximum (c751:139f cmp / jne): a city above its maximum (e.g.
            after Raise Volcano / Change Terrain shrinks its food area) still gets (max-pop+1)/2 + building and Housing
            bonuses and can keep growing. COMMUNITY-KNOWN (wiki "Population Growth"; the Insecticide patch fix). The
            same test also hides starvation AT the maximum: when population == max (c751:139f cmp / jne -> jmp 137f) the
            function returns 0 before the food < population branch, so a starving city at its maximum does not shrink.
            COMMUNITY-KNOWN (W220FIX: 'negative growth does not get applied if max population is reached').
            In game (2026-10-23, tools/harness/regress.py 103): turn 107: Cornwell (maximum 5) population 8 -> 8, tens
            0 -> 4, food 17
104. GAME   Growth overflow beyond 100 (1000 citizens) in one turn is discarded: at most +1 population per turn
            (ORIGINAL_NOTES growth line). COMMUNITY-KNOWN (IW132 / W213 "cities don't lose the extra population").
            Re-checked (N221): TURNUPD.C Turn_City_Growth: population_tens = 0 after a growth (the excess over 100
            dropped).
            In game (2026-10-22, tools/harness/regress.py 104): turn 107: Dracon pop 14 tens 0 (was 13 / 95); Bremen
            pop 13 tens 0 (was 12 / 96)

COMMUNITY CROSS-CHECK (work/reports/patch_crosscheck.txt, from re/patch_map.tsv = every Unofficial Patch 1.40/1.51/1.52
byte patch mapped onto our functions by tools/patch_map.py):
- A: 58 of our 101 items are fixed by a community patch too (several at the very same instruction, e.g. 46 = W082DIPL,
  9 = W540FIX, 1 = W272FIX); 39 have no community fix; 4 more are rewritten without naming the bug.
- B: about 310 community bug fixes are NOT in this list yet - only 18 in still-unnamed functions, i.e. most are in
  areas we already read: our readers catch only part of the bugs. They are UNVERIFIED by us; see section B (grouped
  by area). To promote one here: read the code, then add it with CHECKED / READ+asm and "COMMUNITY-KNOWN (<patch>)".
- C: 19 disagreements between our notes and the patch texts (both claims listed there).

=== DEV LEFTOVERS (not bugs) ===
- Debug hotkeys on the overland screen (Alt+A autoplay, Alt+K = toggles the Strategic Combat Only setting, Alt+N landmass ids, Alt+T) gated by a
  release flag; Alt+P (re-roll AI personalities) is NOT gated. Magic-screen codes RVL / PWR / DESTIN. City-screen 'X'
  dumps the city record. [DEBUG HOTKEYS], [MAGIC ...]
382. READ+asm QUIRK (no effect found): the AI planning tables live in the NEUTRAL player's spell library.
            Alloc_Game_Data (dc56) points the 14 AI per-plane tables (attack / expand landmasses, expand x / y, the
            two unnamed tables, replan and circle timers; 118 ints) into wizards[5].spell_library (+0x264, 240
            bytes) - proved by byte-matching src/wizards/GAMEDATA.C, step 78c-Z. The neutral player never researches,
            so the space is free; side effect: the AI tables are written to and read from SAVEn.GAM with the 6 Wizard
            records. A bug only if some code reads the neutral player's spell library - not checked yet.
            Static check (2026-10-23, tools/harness/regress.py 382): wizards/GAMEDATA.C:113 holds the code;
            Alloc_Game_Data = 1.31 bytes [work/harness/game/WIZARDS.EXE]
383. READ+asm QUIRK (dead code): Wait_Ticks_Or_Input (1484:0094) loads the timer segment from BX ('mov ax, 0 /
            mov es, bx') instead of 0, so it would read the "tick count" from wherever BX points after
            Mouse_Take_Event. The function has no callers (also MAGIC 13f2) - no effect. Its give-up limit is 400
            ticks (cmp ax, 190h), not 4. Proved by byte-matching src/wizards/TIMER.ASM (step 78c-Z).
            Static check (2026-10-23, tools/harness/regress.py 383): wizards/TIMER.ASM:64 holds the code;
            Wait_Ticks_Or_Input = 1.31 bytes [work/harness/game/WIZARDS.EXE]
384. READ+asm QUIRK (dead code): DOS_Drive_Ready (1491:0007) sets DS = CS to install its INT 24h handler and reads
            the saved vector back (DS:71e6) with DS still = CS, so it would restore two words of the code segment as
            the critical-error vector. No callers (also MAGIC 13ff) - no effect. Proved by byte-matching
            src/wizards/DOSUTIL.ASM (step 78c-Z).
            Static check (2026-10-23, tools/harness/regress.py 384): wizards/DOSUTIL.ASM:25 holds the code;
            DOS_Drive_Ready = 1.31 bytes [work/harness/game/WIZARDS.EXE]
385. READ+asm QUIRK (latent): Palette_Tint_Upload (1cde:017c) with percent >= 100 uploads every dirty color as
            the code-segment tint words LEFT BY THE PREVIOUS CALL (the last blend's scaled r, g, b, or
            Remap_Build_Table's raw r, g, b) - the r, g, b passed in are never stored on that path. Its only caller
            (the combat spell flash, b1af:1ed3) passes 0..40 - no effect. Also: the blend path never updates color 0
            (starts at index 1). Proved by byte-matching src/wizards/PALUPLD.ASM (step 78c-Z; also MAGIC 1c4c).
            Static check (2026-10-23, tools/harness/regress.py 385): wizards/PALUPLD.ASM:225 holds the code;
            Palette_Tint_Upload = 1.31 bytes [work/harness/game/WIZARDS.EXE]
386. READ+asm QUIRK (latent, effect unchecked): Pic_Load_Palette (1cde:0649) for a picture cached in EMS maps the
            picture's first logical page to physical page 0 AND to physical page 1 (the second INT 67h / 4401h lacks
            the 'inc bx' the blitters have, e.g. PICRLE.ASM) - a palette block reaching past 16 KB from the page
            start would be read from the wrong page. Not checked whether any EMS picture's palette crosses a page.
            Proved by byte-matching src/wizards/PALUPLD.ASM (step 78c-Z; also MAGIC 1c4c).
            Static check (2026-10-23, tools/harness/regress.py 386): wizards/PALUPLD.ASM:789 holds the code;
            Pic_Load_Palette = 1.31 bytes [work/harness/game/WIZARDS.EXE]
387. READ+asm BUG (latent: no v1.31 text uses the codes): the paragraph position codes 19h NN (set y) and 1Dh NN
            (set x) read the FIRST digit twice - Paragraph_Layout_Lines (1b9d:05a8) computes (text[i] - '0') * 10 +
            (text[i] - '0'), so "" "42" would give 44, not 42 (always 11 x the first digit). A scan of every
            official v1.31 .LBX for 19h / 1Dh + two digits found only picture data, no text. Proved by byte-matching
            src/wizards/PARAGRPH.C (step 78c-Z; also MAGIC 1b0a).
            Static check (2026-10-23, tools/harness/regress.py 387): wizards/PARAGRPH.C:6 holds the code;
            Paragraph_Layout_Lines = 1.31 bytes [work/harness/game/WIZARDS.EXE]
388. READ+asm QUIRK (dead code): Paragraph_Add_Hotkey_Regions (1b9d:0295, no callers) counts the spaces of a justified
            line until text[j] is a line-ending code OR the INDEX j reaches 29 ('j != 0x1d', meant text[j] != 0x1d).
            Proved by byte-matching src/wizards/PARAGRPH.C (step 78c-Z).
            Static check (2026-10-23, tools/harness/regress.py 388): wizards/PARAGRPH.C:104 holds the code;
            Paragraph_Add_Hotkey_Regions = 1.31 bytes [work/harness/game/WIZARDS.EXE]
389. GAME     QUIRK: Confirm_Box (d677:0000) cannot be cancelled with Esc or a click outside: it takes abs() of
            UI_Get_Input (so the -1 test never fires) and never tests its full-screen Esc control - only Yes / No
            close it. Proved by byte-matching src/wizards/NOTIFY.C (step 78c-Z; also MAGIC 4d5b).
            In game (2026-10-24, tools/harness/regress.py 389): the Yes / No box up: after the anvil True, after Esc
            True, after the outside click True, after N False; item 1 cost 1500 (kept)
390. READ+asm QUIRK (latent, effect unchecked): Zoom_Step_Rect (d677:2c53) clamps the picture's bottom edge at 315
            (the right-edge limit) instead of 199. Same proof.
            Static check (2026-10-23, tools/harness/regress.py 390): wizards/NOTIFY.C:1166 holds the code;
            Zoom_Step_Rect = 1.31 bytes [work/harness/game/WIZARDS.EXE]
391. READ+asm QUIRK (cosmetic): Window_Zoom_Draw (d677:2258) - two of its eight copy-pasted branches mix the left
            and right edges of the rectangles and draw a zero-length line or the same line twice; color pair b is
            built but never drawn. Same proof.
            Static check (2026-10-24, tools/harness/regress.py 391): wizards/NOTIFY.C:1010 holds the code;
            Window_Zoom_Draw = 1.31 bytes [work/harness/game/WIZARDS.EXE]
392. READ+asm QUIRK: Notify_Picture_Box (d677:19c4) zeroes its dim argument on entry (darken branch dead) and, in
            notify_box_mode 1, draws with the CENTRED box's redraw instead of its own. Same proof.
            Static check (2026-10-24, tools/harness/regress.py 392): wizards/NOTIFY.C:760 holds the code;
            Notify_Picture_Box = 1.31 bytes [work/harness/game/WIZARDS.EXE]
393. READ+asm QUIRK (no visible effect): Pic_Shift_Rows_H (2072:042e) was copied from Pic_Shift_Columns_V and
            not fully adapted: a right shift keeps 'height - shift' columns (should be width), its copy loop runs down
            to index 0 and so reads up to one column BEFORE the pixels (the header and the memory below it), and it
            first reads one pixel through the loop index before it is set (the value is unused). Its one caller, the
            node aura (shifts -1..1, then Pic_Shift_Columns_V), clears column 0 right after, so nothing visible
            changes. Proved by byte-matching src/wizards/PIC.C (step 78c-Z4; also MAGIC 1ee7).
            Static check (2026-10-23, tools/harness/regress.py 393): wizards/PIC.C:188 holds the code;
            Pic_Shift_Rows_H = 1.31 bytes [work/harness/game/WIZARDS.EXE]
394. READ+asm BUG (dead code): Pic_Keep_Rect (2072:264e, no caller) clears the area right of the rectangle from
            column x2, not x2 + 1, wiping the rectangle's own last column. Same proof.
            Static check (2026-10-23, tools/harness/regress.py 394): wizards/PIC.C:1452 holds the code; Pic_Keep_Rect
            = 1.31 bytes [work/harness/game/WIZARDS.EXE]
395. READ+asm QUIRK (error path only): Anim_EMS_Read_Frame (2072:2c83) reports its two read errors (entry too
            short, seek failed) with LBX_Error(name, 2, entry) where 'name' is an uninitialised 20-byte local, not the
            animation's file name (DS:e860 anim_lbx_name, which the EMS-handle error does use) - the message would
            show garbage instead of the file. Only on a damaged install. Same proof.
            Static check (2026-10-23, tools/harness/regress.py 395): wizards/PIC.C:1673 holds the code;
            Anim_EMS_Read_Frame = 1.31 bytes [work/harness/game/WIZARDS.EXE]
396. READ+asm BUG (dead code): Pic_Draw_Rect_Outline (2072:30f7, no caller) indexes the bitmap from its header, not
            its pixels (Seg_To_Far_Ptr(pic), no +1 paragraph: 16 bytes off), and uses the rectangle's h as the
            column stride instead of the bitmap height. Same proof.
            Static check (2026-10-23, tools/harness/regress.py 396): wizards/PIC.C:2014 holds the code;
            Pic_Draw_Rect_Outline = 1.31 bytes [work/harness/game/WIZARDS.EXE]
397. SAME     BUG (cosmetic, set-up errors only): Sound_Fatal_Error (3151:0e4d) builds the messages of codes 0-8
            with strcpy followed by strcpy (meant strcat): "You selected an invalid sound driver, ", "Music " +
            "I/O parameters are incorrect, " etc. are overwritten, and every driver / detect failure ends the
            program with just "reconfigure hardware options". Codes 13-15 use strcat correctly. Also: a sequence
            that fails to register (code 11) exits without AIL_shutdown, unlike the other codes. Proved by
            byte-matching src/wizards/SOUND.C (step 78c-Z4; also MAGIC 2fc5).
            SAME (N221): the same bug as #346 (merged there); kept so the number cited in src stays valid.
398. READ+asm QUIRK (error text only): LBX_Error (1584:0f5a) case 14 has no break - its message
            " EMM loading error. Insufficient EMM. (Reserved EMM) " runs on into case 15's " LBX to EMM loading
            error. Insufficient EMM. (Reserved EMM) "; code 6 has no message at all. Also: the record loaders
            report seek / record-size / record-count errors under the OPEN file's name (lbx_open_name) rather
            than the requested one (same file in practice), and LBX_Load_Records_Near reads (count x size) % 60000
            bytes. Proved by byte-matching src/wizards/LBX.C (step 78c-Z4; also MAGIC 14f2).
            Static check (2026-10-23, tools/harness/regress.py 398): wizards/LBX.C:470 holds the code; LBX_Error =
            1.31 bytes [work/harness/game/WIZARDS.EXE]
399. READ+asm BUG (latent, effect unchecked): Pic_EMS_Next_Pages (2459:0228), the window-advance helper of
            Pic_Decode_Frame_EMS, pushes DX as the EMS handle without loading it - its twin in PICEMS.ASM
            (Pic_Clipped_EMS_Map) does 'mov dx, cs:ems_handle' first. DX holds the decoder's leftover run count
            (0 or below) or whatever EMS_Map_Pages left, so when an EMS picture's frame data crosses the 48 KB
            window while being decoded into a bitmap (Pic_Decode_Frame_To_Bitmap), the next pages are mapped with a wrong
            handle and the rest of the frame is read from the old window. Not checked which pictures are large
            enough. Proved by byte-matching src/wizards/PICDEC.ASM (step 78c-Z4; also MAGIC 22cd).
            Static check (2026-10-23, tools/harness/regress.py 399): wizards/PICDEC.ASM:301 holds the code;
            Pic_EMS_Next_Pages = 1.31 bytes [work/harness/game/WIZARDS.EXE]
400. READ+asm QUIRK (effect unchecked): Mouse_Restore_Under_Back (2579:0a89) restores the OTHER page from
            mouse_under_front, the buffer Mouse_Save_Under fills for the displayed page, while Mouse_Save_Under_Back
            saves into mouse_under_back; correct only if Mouse_Copy_Save_Buffer (back -> front) ran in between.
            Callers not traced. Also: Input_Record_Close writes its end marker at the byte position / 2 (already
            noted in the database). Proved by byte-matching src/wizards/INPUT.ASM (step 78c-Z4; also MAGIC 23ed).
            Static check (2026-10-24, tools/harness/regress.py 400): wizards/INPUT.ASM:1434 holds the code;
            Mouse_Restore_Under_Back = 1.31 bytes [work/harness/game/WIZARDS.EXE]
401. READ+asm BUG (minor): UI_Text_Edit_Run (2666:339f) and UI_Text_Input_Box (2666:37e1) trim a default text that
            is wider than the field with 'while (Text_Width(text) > width && len > 0) { len -= len; text[len] = 0; }'
            (asm 'sub si, si' at 3482 / 388a): the first pass empties the whole text instead of dropping one
            character. A too-long default name is shown as an empty field. Callers not checked for over-wide
            defaults. Proved by byte-matching src/wizards/UI.C (batch 31; also MAGIC 24da).
            Static check (2026-10-24, tools/harness/regress.py 401): wizards/UI.C:1706 holds the code;
            UI_Text_Edit_Run = 1.31 bytes; UI_Text_Input_Box = 1.31 bytes [work/harness/game/WIZARDS.EXE]
402. READ+asm BUG (effect unchecked): in UI_Poll_Input (2666:000c, the mouse-driver input loop), clicking - or
            pressing Enter on - the type-11 text line that is already being edited commits the text but clears
            only ui_edit_control (-1), not ui_edit_active (DS:8288). Until the next commit the loop then works on
            control -1, the 38 bytes before the control table (UI_Init points it at its heap block's header): typed
            letters are capped by that record's 'max_len' word and the next commit strcpy's ui_edit_buf to the
            near pointer in that record's text word. Reach: the 8 save-name lines of the Load / Save screen (click
            a name twice, type, click elsewhere). UI_Poll_Input_Keyboard has no such third branch. Proved by
            byte-matching src/wizards/UI.C (batch 31); the run-time effect is not checked.
            Static check (2026-10-24, tools/harness/regress.py 402): wizards/UI.C:117 holds the code; UI_Poll_Input =
            1.31 bytes [work/harness/game/WIZARDS.EXE]
403. READ+asm QUIRKS (latent / dead code), same proof: Slider_Set_From_Mouse's vertical branch leaves out
            '+ scale_min' (every vertical slider has scale_min 0); UI_Text_List_Select and UI_Text_List_Select_Scrolling read
            enabled[i] before testing enabled for NULL (the result is ignored when it is NULL); UI_Text_List_Select_Scrolling (no
            callers) never leaves its scroll-down search when enabled is NULL ('(enabled[k] == 0 && k < n) ||
            enabled == 0'); UI_Text_Edit_Draw computes the field width and never uses it.
            Static check (2026-10-23, tools/harness/regress.py 403): wizards/UI.C:2518 holds the code;
            Slider_Set_From_Mouse = 1.31 bytes [work/harness/game/WIZARDS.EXE]
404. SRC  QUIRK (harmless): Load_UnitView_Art (45fc:1670; was named Load_Cityscape_Art here) loads SPECIAL2.LBX entries 0..0x21 - 34 pictures - into
            special2_icons, which holds 33 (DS:98d6..9917 in WIZARDS; the same 33 in MAGIC.C's copy, DS:60f6, by the
            layout of both programs). The 34th handle lands on the next global, diplo_mirror_pic (DS:9918, BACKGRND
            0x12). Harmless: every diplomacy / global-enchantment screen reloads diplo_mirror_pic before drawing it,
            and no code reads special2_icons[33]. Found by the W3 type-overlap review (batch 41).
            Re-checked (N221): our source note at src/wizards/ASSETS.C:741 states it.
            Static check (2026-10-23, tools/harness/regress.py 404): wizards/ASSETS.C:741 holds the code;
            Load_UnitView_Art = 1.31 bytes [work/harness/game/WIZARDS.EXE]
405. READ+asm QUIRK (effect unchecked): Path_Relax (d511:0004, the whole-map 60 x 40 cost relaxation behind
            Cities_Update_Road_Connections and the other path searches) sweeps down from the start row and stops
            after row 38 ('cmp si, 910h / jns'), then up from the start row and stops after row 1 ('cmp si, 3Ch / js'):
            rows 39 and 0 (the polar rows) are never relaxed unless the start square is in them, so no route can end
            there. Whether any caller ever needs a polar target is not checked. Proved by byte-matching
            src/wizards/PATHRLX.ASM (batch 45).
            Static check (2026-10-24, tools/harness/regress.py 405): wizards/PATHRLX.ASM:9 holds the code; Path_Relax
            = 1.31 bytes [work/harness/game/WIZARDS.EXE]
406. READ+asm BUG (effect unchecked): two screens release the scratch heap without saying which block. Screen_Wizard_Target
            (CASTANIM.C) and Overland_Extra_Power_Dialog (CASTUI.C) call Heap_Release with nothing pushed ('call',
            no stack clean-up), so Heap_Release(block) (HEAP.C: copies the word at block:14 to block:10) takes its
            segment from a leftover stack word. Every other call (87) passes p_scratch. If the leftover is not the
            scratch segment, two bytes at that segment:10 are overwritten and the scratch heap is not reset. Found
            by tools/arity.py (post-rebuild pass P1 (d)). [ARG COUNTS]
            Static check (2026-10-24, tools/harness/regress.py 406): wizards/CASTUI.C:227 holds the code;
            Screen_Wizard_Target = 1.31 bytes; Overland_Extra_Power_Dialog = 1.31 bytes
            [work/harness/game/WIZARDS.EXE]
407. READ+asm QUIRK (dead code): Engine_Init_Short (GRAPHICS.C) calls Sound_Init with 2 of its 9 arguments (both
            branches), so the driver io / irq / dma words would be stack leftovers - but nothing calls
            Engine_Init_Short in either program (the live Engine_Init passes 9 or 11). Found by tools/arity.py. [ARG COUNTS]
            Static check (2026-10-23, tools/harness/regress.py 407): wizards/GRAPHICS.C:53 holds the code;
            Engine_Init_Short = 1.31 bytes [work/harness/game/WIZARDS.EXE]
408. GAME     BUG (effect unchecked): Overland_Cast_Spell (ba2c:09c4) stores the result of Screen_Disjunction
            (bcc7:1230), Spell_Ward_Cast (af2c:21cc), Spell_Binding_Cast (af2c:08bf), Great_Unsummoning_Cast (af2c:02ad)
            and Death_Wish_Cast (af2c:0071) as its 'ok', but none of them returns a value: 'ok' is whatever AX the
            last statement left. 'ok == 1' only decides whether Nature's Wrath strikes back at a Chaos / Death spell,
            and only Death Wish is a Death spell (the others are Sorcery / Arcane), so a Death Wish triggers Nature's
            Wrath only if its last loop step leaves AX = 1. Found by the P1 check build (rule A). [ARG COUNTS]
            In game (2026-10-23, tools/harness/regress.py 408): at Death_Wish_Cast's RETF (byte 0xCB at 3ED0:02AC,
            0xCB = RETF): AX = 0 (0x0000), the value Overland_Cast_Spell takes as ok; wizard 1's Nature's Wrath 2 at
            that moment; Natures_Wrath_Strike calls (caster) []
409. SRC     BUG (minor): Wizard_Begin_Casting (b8ad:08c4), human Enchant Item / Create Artifact: the forge builds the
            item in record 137 (ITEM_REC_FORGE), which Overland_Cast_Spell later hands out, but casting_cost_initial
            is read from record 136 (ITEM_REC_WORK) - the work record where Item_Create_Prefab and
            Item_Create_From_ITEMDATA (ITEMFORG.C) build random / prefab items, so the last one made. The wrong figure only
            reaches readers of the human's casting_cost_initial while the item is being cast (e.g. OVERSPEL.C's
            Meteor Storm Nightshade roll); the cast itself runs on casting_cost_left from Screen_Item_Forge.
            Found in A4 (PROVISIONAL settled statically, N215).
            Re-checked (N221): our source note at src/wizards/SPELLCST.C:340 states it.
            Static check (2026-10-24, tools/harness/regress.py 409): wizards/SPELLCST.C:340 holds the code;
            Wizard_Begin_Casting = 1.31 bytes [work/harness/game/WIZARDS.EXE]
410. GAME    QUIRK (cosmetic): Tile_Is_Tundra (f319:11ac) tests terrain > 602 where every other range test has >=,
            so tile 602 is not tundra to it - and MAGIC's Gen_Neighbour_Variants makes 602 for a tundra square
            whose only non-tundra neighbour is the SE one (TERRTYPE.LBX 0 table[16] = 2). Such a square is not
            tundra to the battlefield generator (BFGEN.C) or the Surveyor (SURVEYOR.C). ReMoM keeps the same >.
            Found in A4 (N215).
            Re-checked (N221): our source note at src/wizards/TERRAIN.C:898 states it.
            In game (2026-10-23, tools/harness/regress.py 410): battlefield kind: tile 602 -> 0, tile 603 -> 5 (ocean
            0, tundra 5)
411. SRC     QUIRK (UI): MAGIC.EXE new game, custom wizard with no realm of 2+ books: Screen_Select_Spells (3da3:402f)
            returns the race state at once, and Esc on the race screen (Screen_Select_Race) leads back to the spell
            state - so Esc only bounces between them and the custom picks screen cannot be reached again (the
            wizard can only go forward). Found by drake178 (ReMoM note); checked in our source (N216).
            Re-checked (N221): our source note at src/magic/NEWGAME.C:1834 states it.
            Static check (2026-10-24, tools/harness/regress.py 411): magic/NEWGAME.C:1834 holds the code;
            Screen_Select_Spells = 1.31 bytes [work/harness/game/MAGIC.EXE]
412. GAME    QUIRK: MAGIC.EXE neutral towns of the Dark Elves get half their garrison. Place_Neutral_Cities (4358:73c2)
            takes the race's last melee type (ranged type none, or thrown / breath 100+) and its last ranged type
            (1 .. 99), and creates population / 4 of each. Every Dark Elf unit but the Settlers (excluded as outpost
            founders) and the Nightblades has a magic ranged attack (RANGED_MAGIC_* 30 .. 38), and the Nightblades
            need a Fighters' Guild, which a town gets only at population 12+ - but the generator's population is at
            most 11 (Random(10) + (difficulty + 1) / 3 on Hard / Impossible, else Random(4) + ... + 1), so every Dark
            Elf town gets melee type 0 (Unit_Create makes nothing) and only the ranged half. (The population cases
            12+ of the building switch are dead for the same reason.) ReMoM notes the half garrison (MAPGEN.c);
            checked in our source and MAGIC.C's unit table (N216; Codex review N218).
            Re-checked (N221): our source note at src/magic/WORLDGEN.C:2663 states it.
            In game (2026-10-24, tools/harness/regress.py 412): neutral towns of population 4+ in 30 worlds: Dark Elf
            20, of them 20 with population / 4 units (e.g. [(2, 5, 1), (2, 4, 1), (2, 5, 1), (2, 4, 1), (2, 4, 1), (2,
            4, 1)]); other races 225, of them 225 with 2 x (population / 4)

=== FROM OUR SOURCE COMMENTS (numbered in P4 B1, N220) ===
These were bug notes in our own comments (written while matching the bytes and reading the matched source) that
had no number yet. Status SRC here = our reading of the byte-identical source, not a separate asm re-check.
413. GAME    MAGIC.EXE world generator: the Myrror nodes test Arcanus' land. Place_Nodes (4358:20c5),
            src/magic/WORLDGEN.C: "BUG: the Myrror nodes test Arcanus' land" Numbered in P4 B1 (N220) from our
            comment.
            In game (2026-10-24, tools/harness/regress.py 413): Myrror nodes over Arcanus water 110 of 420 (26.2%);
            Arcanus water share in the window 71.8%
414. SRC     MAGIC.EXE world generator: a node aura's terrain counts are overwritten and never used. Node_Pick_Realm
            (4358:2849), src/magic/WORLDGEN.C: "BUG: the aura's water / hill / grass counts are overwritten by the
            rolls and never used" Numbered in P4 B1 (N220) from our comment.
            Static check (2026-10-23, tools/harness/regress.py 414): magic/WORLDGEN.C:1203 holds the code; 4358:2849 =
            1.31 bytes [work/harness/game/MAGIC.EXE]
415. SRC     MAGIC.EXE world generator: the neighbour-variant pass reads row 40, off the map. Gen_Neighbour_Variants
            (4358:40bf), src/magic/WORLDGEN.C: "BUG: the south tests are y < 40, not y + 1 < 40 (row 40 read off the
            map)" Numbered in P4 B1 (N220) from our comment.
            Static check (2026-10-24, tools/harness/regress.py 415): magic/WORLDGEN.C:1714 holds the code;
            Gen_Neighbour_Variants = 1.31 bytes [work/harness/game/MAGIC.EXE]
416. SRC     MAGIC.EXE neutral towns: a terrain prerequisite would index past the building list (latent).
            Place_Neutral_Cities (4358:73c2), src/magic/WORLDGEN.C: "BUG (latent: none of the buildings placed above
            has one): a terrain prereq1 (> BLD_PREREQ_TERRAIN_BASE) indexes buildings[] far past its 36 entries"
            Numbered in P4 B1 (N220) from our comment.
            Static check (2026-10-23, tools/harness/regress.py 416): magic/WORLDGEN.C:2929 holds the code; 4358:73c2 =
            1.31 bytes [work/harness/game/MAGIC.EXE]
417. SRC     The AI's known-spell buffer holds 50 entries with no bound test. AI_Init_Buffers (f978:0f80),
            src/wizards/AINEUTRL.C: "BUG: 50 spells, filled with no bound test (AI_Count_Known_Spells)" Numbered in P4
            B1 (N220) from our comment.
            Static check (2026-10-24, tools/harness/regress.py 417): wizards/AINEUTRL.C:391 holds the code;
            AI_Init_Buffers = 1.31 bytes [work/harness/game/WIZARDS.EXE]
418. GAME    AI threat map: dead units not yet compacted add threat and write through index -1. AI_Build_Threat_Map
            (f48f:3aab), src/wizards/AIORDERS.C: "BUG: no test for a dead unit not yet compacted (owner PLAYER_NONE:
            the phantom threat and at_peace[-1] of #137)." Numbered in P4 B1 (N220) from our comment.
            In game (2026-10-24, tools/harness/regress.py 137): unit 16 (owner, x, y, plane in the save (2, 7, 15,
            0)): AI_Build_Strength_Tables took it as an enemy for (player, owner, plane) [(1, -1, 0), (2, -1, 0)];
            AI_Build_Threat_Map added it for (player, plane, owner) [(1, 0, -1)] - #418: the dead record added threat
            (its own function); the plane -1 write is not exercised (the record's plane is 0 here)
419. SRC     AI spell categories: Suppress Magic is weighted into a category with no slot for it.
            AI_Pick_Spell_Category (e318:09e5), src/wizards/AISPELL.C: "BUG: into category 8
            (AI_Pick_Anti_Realm_Global), which has no Suppress Magic slot; only category 9's AI_Pick_Global_Enchant
            casts it" Numbered in P4 B1 (N220) from our comment.
            Static check (2026-10-25, tools/harness/regress.py 419): static fallback: wizards/AISPELL.C:550 holds the
            code; AI_Pick_Spell_Category = 1.31 bytes; AI_Pick_Anti_Realm_Global = 1.31 bytes
            [work/harness/game/WIZARDS.EXE] | play case NOT REACHED (2026-10-25 21:14): AI_Pick_Anti_Realm_Global(1)
            was not called in 15 turns (AI_Choose_Overland_Spell(1) entered on turns [106, 108, 109, 110, 111, 113,
            114, 115, 117, 118, 119, 120])
420. SRC     AI summons: the Incarnation test reads the wrong unit type and is inverted. AI_Pick_Summon (e318:1995),
            src/wizards/AISPELL.C: "BUG: Incarnation's test reads type 39 (Barbarian Spearmen) where Torin the Chosen
            is 34, and requires one (it should require none): an AI owning Spearmen weighs Incarnation 500 even after
            Torin came - Incarnation_Cast then refuses - and the else-if keeps Summon Champion / Summon Hero out;
            clarified using ReMoM repo" Numbered in P4 B1 (N220) from our comment.
            Static check (2026-10-24, tools/harness/regress.py 420): wizards/AISPELL.C:790 holds the code;
            AI_Pick_Summon = 1.31 bytes [work/harness/game/WIZARDS.EXE]
421. SRC     AI unit enchantments: with no stack anywhere the picker reads p_ai_own_stacks[-1].
            AI_Pick_Unit_For_Enchant (e318:52c8), src/wizards/AISPELL.C: "(caster, enchants, &unit, normal_only,
            summons_only, no_basic, movement_spell, unused) the unit for a unit enchantment: the caster's strongest
            stack outside its cities (else the stack at its fortress - BUG: with none there either p_ai_own_stacks[-1]
            is read), then the unit there with the highest upkeep that is not a transport, settler
            (AFLAG_CREATE_OUTPOST) or melder (AFLAG_MELD_WITH_NODE), lacks all of the enchants bits, and passes the
            filters (normal_only: below the summ..." Numbered in P4 B1 (N220) from our comment.
            Static check (2026-10-24, tools/harness/regress.py 421): wizards/AISPELL.C:2491 holds the code;
            AI_Pick_Unit_Enchant_Target = 1.31 bytes [work/harness/game/WIZARDS.EXE]
422. SRC     AI Corruption / Raise Volcano targets: the square offset is Random(5) - 3 (-3 .. +1).
            AI_Target_Corruption_Volcano (e318:6bd6), src/wizards/AISPELL.C: "a square at offset Random(5) - 3 (-3 ..
            +1, BUG) that is not a 5x5 corner" Numbered in P4 B1 (N220) from our comment.
            Static check (2026-10-24, tools/harness/regress.py 422): wizards/AISPELL.C:3100 holds the code;
            AI_Target_Corruption_Volcano = 1.31 bytes [work/harness/game/WIZARDS.EXE]
423. SRC     AI Corruption / Raise Volcano targets: the plane returned is the last city examined.
            AI_Target_Corruption_Volcano (e318:6bd6), AI_Target_Raise_Volcano_Old (e318:6e29), src/wizards/AISPELL.C:
            "*plane is the plane of the LAST city examined, not the chosen one (BUG)." Numbered in P4 B1 (N220) from
            our comment.
            Static check (2026-10-24, tools/harness/regress.py 423): wizards/AISPELL.C:3102 holds the code;
            AI_Target_Corruption_Volcano = 1.31 bytes; AI_Target_Raise_Volcano_Old = 1.31 bytes
            [work/harness/game/WIZARDS.EXE]
424. GAME    AI_More_Myrror_Cities_Than_Human: the count is wrong. AI_More_Myrror_Cities_Than_Human (e318:7395),
            src/wizards/AISPELL.C: "the human's counters are never initialised (BUG)." Numbered in P4 B1 (N220) from
            our comment.
            In game (2026-10-24, tools/harness/regress.py 424): AI_More_Myrror_Cities_Than_Human(player 1):
            human_arcanus / human_myrror (3, 21); the human's real cities (Arcanus, Myrror) (2, 0)
425. SRC     AI stacks: a released stack's ordered slots write p_units[-1].order. AI_Build_Stacks (ebda:2da6),
            src/wizards/AIUNITS.C: "BUG: a released stack's -1 slots (units already ordered) write p_units[-1].order
            (AI_Order_Move guards -1)" Numbered in P4 B1 (N220) from our comment.
            Static check (2026-10-24, tools/harness/regress.py 425): wizards/AIUNITS.C:1201 holds the code;
            AI_Build_Stacks = 1.31 bytes [work/harness/game/WIZARDS.EXE]
426. SRC     AI tower crossing value: the city's plane is not tested. AI_Tower_Other_Side_Worth (ebda:59ef),
            src/wizards/AIUNITS.C: "(player, x, y, plane) 1 if the landmass at (x, y) on the OTHER plane is worth
            crossing to by a tower: (not status 1 / 4) it holds a neutral city or one of a wizard at hostility >=
            HOSTILITY_HOSTILE (BUG: the city's plane is not tested, so a city with that landmass id on the tower's own
            plane counts too), or (not status 3) it has more than 10 squares" Numbered in P4 B1 (N220) from our
            comment.
            Static check (2026-10-24, tools/harness/regress.py 426): wizards/AIUNITS.C:2343 holds the code;
            AI_Tower_Other_Side_Worth = 1.31 bytes [work/harness/game/WIZARDS.EXE]
427. SRC     AI landmass re-plan: the cost sums are not reset. AI_Replan_Landmass (ebda:5b81), src/wizards/AIUNITS.C:
            "BUG: not reset in between, the cost sums start from the coordinate sums" Numbered in P4 B1 (N220) from
            our comment.
            Static check (2026-10-24, tools/harness/regress.py 427): wizards/AIUNITS.C:2405 holds the code;
            AI_Replan_Landmass = 1.31 bytes [work/harness/game/WIZARDS.EXE]
428. SRC     A winning defender's loot is awarded as if from the vault (award_at_location not set). Overland_Attack
            (7d45:0000), src/wizards/ATTACK.C: "BUG: award_at_location is not set to 1 first (the attacker's branch
            does): a winning defender's loot counts as from the vault - free only for heroes at the fortress, not at
            the battle site; clarified using ReMoM repo" Numbered in P4 B1 (N220) from our comment.
            Static check (2026-10-24, tools/harness/regress.py 428): wizards/ATTACK.C:215 holds the code;
            Overland_Attack = 1.31 bytes [work/harness/game/WIZARDS.EXE]
429. SRC     Attack_At_Unit_Unused passes the target's owner where a unit index is read (dead code).
            Attack_At_Unit_Unused (7d45:09b8), src/wizards/ATTACK.C: "DEAD (no callers): the current player's units on
            at_unit's square attack - BUG: it passes the target unit's OWNER, while combat_site COMBAT_AT_UNITS makes
            Overland_Attack read it as a unit index" Numbered in P4 B1 (N220) from our comment.
            Static check (2026-10-23, tools/harness/regress.py 429): wizards/ATTACK.C:299 holds the code;
            Attack_At_Unit_Unused = 1.31 bytes [work/harness/game/WIZARDS.EXE]
430. SRC     Battlefield decoration A: the bounds test checks the cluster centre only. Battlefield_Scatter_Decor_A
            (df82:0f5e), src/wizards/BFGEN.C: "BUG: the bounds test checks the cluster centre, not the placed square."
            Numbered in P4 B1 (N220) from our comment.
            Static check (2026-10-24, tools/harness/regress.py 430): wizards/BFGEN.C:498 holds the code;
            Battlefield_Scatter_Decor_A = 1.31 bytes [work/harness/game/WIZARDS.EXE]
431. SRC     The extra-power dialogs (overland and combat) ignore Evil Omens. Combat_Extra_Power_Dialog (bcc7:092d),
            Overland_Extra_Power_Dialog (bcc7:043d), src/wizards/CASTUI.C: "BUG: the cost is base_cost + the extra,
            less the retort reduction - never Spell_Casting_Cost's x 3 / 2 under Evil Omens, so a variable Life /
            Nature spell escapes it (the combat dialog too); clarified using ReMoM repo" Numbered in P4 B1 (N220) from
            our comment.
            Static check (2026-10-24, tools/harness/regress.py 431): wizards/CASTUI.C:224 holds the code;
            Overland_Extra_Power_Dialog = 1.31 bytes; Combat_Extra_Power_Dialog = 1.31 bytes
            [work/harness/game/WIZARDS.EXE]
432. SRC     Production list: unsigned prerequisite bytes are compared with -1. City_Build_Options (4e5c:0c04),
            src/wizards/CITYPROD.C: "BUG: req_building_1 / 2 (unsigned char) are compared with -1" Numbered in P4 B1
            (N220) from our comment.
            Static check (2026-10-23, tools/harness/regress.py 432): wizards/CITYPROD.C:530 holds the code;
            City_Build_Options = 1.31 bytes [work/harness/game/WIZARDS.EXE]
433. SRC     City_Terrain_Prereq: the break of the 110 search leaves only the column loop. City_Terrain_Prereq
            (4e5c:1180), src/wizards/CITYPROD.C: "BUG: the 110 search's break leaves only the column loop" Numbered in
            P4 B1 (N220) from our comment.
            Static check (2026-10-24, tools/harness/regress.py 433): wizards/CITYPROD.C:626 holds the code;
            City_Terrain_Prereq = 1.31 bytes [work/harness/game/WIZARDS.EXE]
434. SRC     Building pictures: a frame's height is compared with the best width. Building_Pic_Opaque_Bounds
            (47bc:23cf), src/wizards/CITYSCR.C: "BUG: a frame wins when its width or its height exceeds the best width
            (the height is compared with the width)" Numbered in P4 B1 (N220) from our comment.
            Static check (2026-10-24, tools/harness/regress.py 434): wizards/CITYSCR.C:1114 holds the code;
            Building_Pic_Opaque_Bounds = 1.31 bytes [work/harness/game/WIZARDS.EXE]
435. SRC     AI combat spell scores: figures_alive > figures is never true. AI_Combat_Spell_Score (c165:00bd),
            src/wizards/COMBAI.C: "BUG: figures_alive > figures is never true (figures is the full count): only front
            damage counts" Numbered in P4 B1 (N220) from our comment.
            Static check (2026-10-24, tools/harness/regress.py 435): wizards/COMBAI.C:629 holds the code;
            AI_Combat_Spell_Score = 1.31 bytes [work/harness/game/WIZARDS.EXE]
436. SRC     Unit casters: battle unit 19 is tested as < 19, not < CASTER_WIZARD (20). Combat_Cast_Spell (8a20:1a8e),
            Combat_Castable_Spell_List (c165:2669), Screen_Combat_Spellbook (8cf2:0d92), Spellbook_Draw_Page_Combat
            (9a4b:1096), src/wizards/COMBAI.C: "other units (heroes) the owner's known spells at base cost, then (BUG:
            < 19, not < 20) their hero spells" Numbered in P4 B1 (N220) from our comment.
            Static check (2026-10-24, tools/harness/regress.py 436): wizards/COMBCAST.C:715 holds the code;
            Combat_Cast_Spell = 1.31 bytes [work/harness/game/WIZARDS.EXE]
437. SRC     Combat enchantment icons: the page step leaves icons 12 .. 14 unreachable. Combat_Main (75eb:0000),
            src/wizards/COMBAT.C: "pages 0 / 4 / 8: QUIRK - icons 12 .. 14 of a side with 13+ enchantments are never
            shown" Numbered in P4 B1 (N220) from our comment.
            Static check (2026-10-24, tools/harness/regress.py 437): wizards/COMBAT.C:422 holds the code; Combat_Main
            = 1.31 bytes [work/harness/game/WIZARDS.EXE]
438. SRC     Unit_Ranged_Icon covers only some ranged types. Unit_Ranged_Icon (8593:0b06), src/wizards/COMBATUI.C:
            "BUG: only the boulder / missile / magic types (class 1..3) reach the switch, so its thrown / breath /
            gaze cases are dead and those units get -1" Numbered in P4 B1 (N220) from our comment.
            Static check (2026-10-24, tools/harness/regress.py 438): wizards/COMBATUI.C:392 holds the code;
            Unit_Ranged_Icon = 1.31 bytes [work/harness/game/WIZARDS.EXE]
439. SRC     AI attack value: a melee strength of 0 makes the whole value 0. AI_Attack_Value (888b:17aa),
            src/wizards/COMBAUTO.C: "BUG: melee 0 -> 0" Numbered in P4 B1 (N220) from our comment.
            Static check (2026-10-24, tools/harness/regress.py 439): wizards/COMBAUTO.C:614 holds the code;
            AI_Attack_Value = 1.31 bytes [work/harness/game/WIZARDS.EXE]
440. SRC     Combat AI targeting has no city-enchantment case: the AI never casts Wall of Fire / Darkness in combat.
            AI_Combat_Spell_Target (8a20:0000), src/wizards/COMBCAST.C: "BUG: no SPELL_FX_CITY_ENCH case, so Wall of
            Fire / Wall of Darkness get -1 and the AI's scorer (COMBAI.C) rejects them before its own
            SPELL_WALL_OF_FIRE case: the AI never casts the walls in combat; the summon square is kept after 200
            failed tries (occupied: the summon lands on a unit)." Numbered in P4 B1 (N220) from our comment.
            Static check (2026-10-24, tools/harness/regress.py 440): wizards/COMBCAST.C:82 holds the code;
            AI_Combat_Spell_Target = 1.31 bytes [work/harness/game/WIZARDS.EXE]
441. SRC     The combat Spell button lights at 3 spell points; the cheapest combat spells cost 5. Combat_Draw_Buttons
            (80d6:08f3), src/wizards/COMBDRAW.C: "BUG (cosmetic): 3 spell points light Spell, but the cheapest combat
            spells cost 5 (Bless, Fire Bolt, Resist Elements, Resist Magic, Star Fires, Weakness) and a unit pays the
            base cost: with 3 or 4 points the book opens with every spell grayed." Numbered in P4 B1 (N220) from our
            comment.
            Static check (2026-10-24, tools/harness/regress.py 441): wizards/COMBDRAW.C:367 holds the code;
            Combat_Draw_Buttons = 1.31 bytes [work/harness/game/WIZARDS.EXE]
442. SRC     p_combat_bldgs_lost keeps a pointer to Combat_End's local list. p_combat_bldgs_lost (DS:c97a), Combat_End
            (a4fa:0000), src/wizards/COMBEND.C: "DS:c97a BUG: points at Combat_End's local list" Numbered in P4 B1
            (N220) from our comment.
            Static check (2026-10-23, tools/harness/regress.py 442): wizards/COMBEND.C:335 holds the code; Combat_End
            = 1.31 bytes [work/harness/game/WIZARDS.EXE]
443. SRC     Combat_End: the population shift reuses j. Combat_End (a4fa:0000), src/wizards/COMBEND.C: "BUG: the shift
            below reuses j (the inhabitants killed), so combat_pop_lost gets its end value when a notice was removed;
            and it moves only .city, not .producing" Numbered in P4 B1 (N220) from our comment.
            Static check (2026-10-24, tools/harness/regress.py 443): wizards/COMBEND.C:318 holds the code; Combat_End
            = 1.31 bytes [work/harness/game/WIZARDS.EXE]
444. SRC     Combat results scroll: the human's lost city attack text. Combat_Results_Scroll (a4fa:1a3c),
            src/wizards/COMBEND.C: "QUIRK: the human's lost city attack shows the victory picture" Numbered in P4 B1
            (N220) from our comment.
            Static check (2026-10-24, tools/harness/regress.py 444): wizards/COMBEND.C:553 holds the code;
            Combat_Results_Scroll = 1.31 bytes [work/harness/game/WIZARDS.EXE]
445. SRC     Combat figure pictures: the facing is forced to 7. Combat_Build_Unit_Figures_Pic (83d2:0b5e),
            src/wizards/COMBINFO.C: "(unit) builds combat_figure_pic: the battle unit's figures (one for Hydra) in
            formation, facing toward its destination (BUG: the facing is then forced to 7), animated when moving or
            always-animated, with its banner, enchantment outline and draw effect" Numbered in P4 B1 (N220) from our
            comment.
            Static check (2026-10-24, tools/harness/regress.py 445): wizards/COMBINFO.C:532 holds the code;
            Combat_Build_Unit_Figures_Pic = 1.31 bytes [work/harness/game/WIZARDS.EXE]
446. SRC     Combat pathfinding: the sweep covers rows 0 .. 19 only. Combat_Find_Path (e29d), Combat_Calc_Reach
            (e29d:04af), src/wizards/COMBPATH.C: "BUG: the sweep covers rows 0..19 only - the last two rows of the
            22-row grid are never relaxed (the same copy-paste shape as PATHWIN.C's overland search)." Numbered in P4
            B1 (N220) from our comment.
            Static check (2026-10-24, tools/harness/regress.py 446): wizards/COMBPATH.C:4 holds the code;
            Combat_Find_Path = 1.31 bytes [work/harness/game/WIZARDS.EXE]
447. SRC     Attacking a wall square: magic shots stop below 5 spell points, the hit shown is uninitialised.
            Combat_Unit_Attack (a22c:1da4), src/wizards/COMBRES.C: "Wall Crusher (ability_flags 8, not the defender)
            on a wall square breaches it on Random(100) <= 25 at range, <= 50 adjacent (attacking the wall square
            itself plays the attack and pays for it - BUG: magic shots there stop below 5 spell points, and the hit
            shown is uninitialised)" Numbered in P4 B1 (N220) from our comment.
            Static check (2026-10-24, tools/harness/regress.py 447): wizards/COMBRES.C:760 holds the code;
            Combat_Unit_Attack = 1.31 bytes [work/harness/game/WIZARDS.EXE]
448. SRC     Combat spell choice: the target tests ignore the unit's state. Combat_Spell_Choice_Invalid (8cf2:1548),
            src/wizards/COMBSPL.C: "BUG: the target tests ignore the unit's state - Star Fires and the normal-unit
            spells count any unit, Animate / Raise Dead any status above 0 (recalled, fled, set aside too) -, so the
            spell can pass here and find no target; and only summons are held to 9 own units, not Possession or
            Creature Binding, which also add a unit to the side." Numbered in P4 B1 (N220) from our comment.
            Static check (2026-10-24, tools/harness/regress.py 448): wizards/COMBSPL.C:567 holds the code;
            Combat_Spell_Choice_Invalid = 1.31 bytes [work/harness/game/WIZARDS.EXE]
449. SRC     AI Recall Hero value: a 16-bit product wraps. AI_Target_Recall_Hero (8cf2:2486), src/wizards/COMBSPL.C:
            "BUG: a 16-bit product - over 32767 it wraps (negative: the hero is skipped); clarified using ReMoM repo"
            Numbered in P4 B1 (N220) from our comment.
            Static check (2026-10-24, tools/harness/regress.py 449): wizards/COMBSPL.C:1022 holds the code;
            AI_Target_Recall_Hero = 1.31 bytes [work/harness/game/WIZARDS.EXE]
450. SRC     Combat_Draw_Battlefield reads entries 4 .. 7 of a 4-entry array. Combat_Draw_Battlefield (dc99:001b),
            src/wizards/COMBSPRT.C: "52-55 always battlefield_chaos_water_pics[tile - 48] - BUG: entries 4..7 of a
            4-entry array), the Sorcery node (backdrop 9) and the Chaos node's volcano (backdrop 10) at (6, 11), the
            roads (or a floating island), the outpost (backdrop 1) or, in a city or fortress battle (backdrops 2, 3),
            the city base - the Flying Fortress when the city has it - and the special animation square; then the
            target and active-unit markers; the animation counters advance and the sprite list is ..." Numbered in P4
            B1 (N220) from our comment.
            Static check (2026-10-24, tools/harness/regress.py 450): wizards/COMBSPRT.C:174 holds the code;
            Combat_Draw_Battlefield = 1.31 bytes [work/harness/game/WIZARDS.EXE]
451. SRC     AI_Unit_Execute: the search for an enemy in the gate never runs. AI_Unit_Execute (9218:0344),
            src/wizards/COMBTACT.C: "(unit, rally x, y or 0, 0 for the target's square) carries out the unit's
            action_state: AI_ACTION_MELEE - approach and attack while the moves fall (behind city walls a unit without
            a target walks toward the gate (BF_GATE_X, BF_GATE_Y) instead - BUG: the search for an enemy in the gate
            tests for a target inside the no-target branch, so it never runs; raiders (PLAYER_NEUTRAL) attacking a
            city without walls and without a target walk into the city core (the nearest reachable o..." Numbered in
            P4 B1 (N220) from our comment.
            Static check (2026-10-24, tools/harness/regress.py 451): wizards/COMBTACT.C:171 holds the code;
            AI_Unit_Execute = 1.31 bytes [work/harness/game/WIZARDS.EXE]
452. SRC     AI_Unit_Execute has no case for AI_ACTION_HEALING. AI_Unit_Execute (9218:0344), src/wizards/COMBTACT.C:
            "BUG: no case for AI_ACTION_HEALING - the innate Healing AI_Target_Scan used up is never cast" Numbered in
            P4 B1 (N220) from our comment.
            Static check (2026-10-24, tools/harness/regress.py 452): wizards/COMBTACT.C:177 holds the code;
            AI_Unit_Execute = 1.31 bytes [work/harness/game/WIZARDS.EXE]
453. SRC     AI_Choose_Target: an ally without a target reads p_battle_units[-1]. AI_Choose_Target (9218:144d),
            src/wizards/COMBTACT.C: "melee and missile units of a defender (or with no siege) then switch to the
            nearest enemy of the chosen one's type and defense, and melee units join an earlier ally's target of that
            type and defense (focus fire - BUG: an ally without a target reads p_battle_units[-1])." Numbered in P4 B1
            (N220) from our comment.
            Static check (2026-10-24, tools/harness/regress.py 453): wizards/COMBTACT.C:500 holds the code;
            AI_Choose_Target = 1.31 bytes [work/harness/game/WIZARDS.EXE]
454. SRC     AI_Move_Path: without a target (-1) the attack test reads a bad unit. AI_Move_Path (9218:226d),
            src/wizards/COMBTACT.C: "BUG: without a target (-1) the attack test reads p_battle_units[-1]" Numbered in
            P4 B1 (N220) from our comment.
            Static check (2026-10-24, tools/harness/regress.py 454): wizards/COMBTACT.C:774 holds the code;
            AI_Move_Path = 1.31 bytes [work/harness/game/WIZARDS.EXE]
455. SRC     Combat spell target picker: a wall pick leaves the unit unset; the vortex value.
            Combat_Spell_Pick_Target_UI (8f51:0347), src/wizards/COMBTARG.C: "BUGS: a wall pick (CTARGET_WALL) ends
            the loop without setting the unit (uninitialised or the previous click's), a vortex pick returns the
            click-map value of its square (negative without a unit)." Numbered in P4 B1 (N220) from our comment.
            Static check (2026-10-24, tools/harness/regress.py 455): wizards/COMBTARG.C:228 holds the code;
            Combat_Spell_Pick_Target_UI = 1.31 bytes [work/harness/game/WIZARDS.EXE]
456. SRC     Unit pushed off a square: at the top row the 3 x 3 is shifted down. Combat_Retreat_Resolve (7eb0:0287),
            Unit_Bump_To_Adjacent (81df:065d), src/wizards/COMBTURN.C: "BUG: at the top row y0 is clamped to 0, so
            rows 0 .. 2 are tried and a survivor can land 2 rows away (x wraps correctly) - the same in
            Unit_Bump_To_Adjacent" Numbered in P4 B1 (N220) from our comment.
            Static check (2026-10-24, tools/harness/regress.py 456): wizards/COMBTURN.C:243 holds the code;
            Combat_Retreat_Resolve = 1.31 bytes [work/harness/game/WIZARDS.EXE]
457. SRC     Combat_Load_Armies writes combat_skill_left one record past the wizard table. Combat_Load_Armies
            (7eb0:18f3), src/wizards/COMBTURN.C: "BUG: PLAYER_NO_WIZARD (6) is one record past the table (wizards
            DS:9eca + 6 x 0x4c8 = DS:bb7a, help_entries): this writes help_entries[7].x2 (DS:bbc6); clarified using
            ReMoM repo" Numbered in P4 B1 (N220) from our comment.
            Static check (2026-10-23, tools/harness/regress.py 457): wizards/COMBTURN.C:923 holds the code;
            Combat_Load_Armies = 1.31 bytes [work/harness/game/WIZARDS.EXE]
458. SAME    AI-vs-AI spell trade changes nothing. AI_Diplo_Turn_AI_Vs_AI (7269:0390), src/wizards/DIPLOMSG.C: "BUG:
            spell_a is one j knows and i lacks (receiver i, giver j), yet j is given it - and i gets spell_b, which i
            knows: the trade changes nothing" Numbered in P4 B1 (N220) from our comment.
            SAME (N221): the same bug as the trade part of #9; kept so the number cited in src stays valid.
459. SRC     EMS_Cache_LBX_File: the handle is not set when EMS is missing. EMS_Cache_LBX_File (16d5:01df),
            src/wizards/EMSLBX.C: "QUIRK: the handle is not set when EMS is missing, the table is full or the file is
            empty - the function then returns an uninitialised local" Numbered in P4 B1 (N220) from our comment.
            Static check (2026-10-23, tools/harness/regress.py 459): wizards/EMSLBX.C:112 holds the code;
            EMS_Cache_LBX_File = 1.31 bytes [work/harness/game/WIZARDS.EXE]
460. SRC     EMS_LBX_Uncache: the table compaction starts at the wrong entry (dead code). EMS_LBX_Uncache (16d5:1245),
            src/wizards/EMSLBX.C: "QUIRK: the table compaction starts at the EMS HANDLE number instead of the table
            index" Numbered in P4 B1 (N220) from our comment.
            Static check (2026-10-23, tools/harness/regress.py 460): wizards/EMSLBX.C:632 holds the code;
            EMS_LBX_Uncache = 1.31 bytes [work/harness/game/WIZARDS.EXE]
461. SRC     EMS_LBX_Reload_Into_Handle opens the name as given, not the .LBX path it measured.
            EMS_LBX_Reload_Into_Handle (16d5:178c), src/wizards/EMSLBX.C: "QUIRK: opens lbx as given, not the .LBX
            path it measured" Numbered in P4 B1 (N220) from our comment.
            Static check (2026-10-23, tools/harness/regress.py 461): wizards/EMSLBX.C:823 holds the code;
            EMS_LBX_Reload_Into_Handle = 1.31 bytes [work/harness/game/WIZARDS.EXE]
462. SRC     Game menu help: 27 entries installed where the screen has 6. Help_Load_Game_Menu (f294:074b),
            src/wizards/GAMEMENU.C: "BUG: 27 (the LBX entry), not 6: entries 6..26 keep the previous screen's help
            rectangles" Numbered in P4 B1 (N220) from our comment.
            Static check (2026-10-24, tools/harness/regress.py 462): wizards/GAMEMENU.C:311 holds the code;
            Help_Load_Game_Menu = 1.31 bytes [work/harness/game/WIZARDS.EXE]
463. SRC     ItemForge_Auto_Name returns its own stack buffer. ItemForge_Auto_Name (94df:0930),
            src/wizards/ITEMFORG.C: "BUG: returns its own stack buffer" Numbered in P4 B1 (N220) from our comment.
            Static check (2026-10-23, tools/harness/regress.py 463): wizards/ITEMFORG.C:383 holds the code;
            ItemForge_Auto_Name = 1.31 bytes [work/harness/game/WIZARDS.EXE]
464. SRC     The items screens read wizard 0's heroes and reserves. Items_Screen_Draw (6356:0581), Screen_Items
            (6356:0000), src/wizards/ITEMSCR.C: "The right-click item views read wizard 0's slots (BUG when another
            player is current)" Numbered in P4 B1 (N220) from our comment.
            Static check (2026-10-24, tools/harness/regress.py 464): wizards/ITEMSCR.C:104 holds the code;
            Screen_Items = 1.31 bytes; Items_Screen_Draw = 1.31 bytes [work/harness/game/WIZARDS.EXE]
465. SRC     Items screen: the vault's slot test reads hired_heroes[6], one past the table. Items_Slot_Click
            (6356:0e74), src/wizards/ITEMSCR.C: "BUG: the slot type is read once from wizards[current_player],
            elsewhere from wizards[PLAYER_HUMAN]; for the vault (owner 6) the fit tests read
            hired_heroes[6].slot_type, one record past the table (a read, no effect: the vault takes anything);
            clarified using ReMoM repo" Numbered in P4 B1 (N220) from our comment.
            Static check (2026-10-24, tools/harness/regress.py 465): wizards/ITEMSCR.C:479 holds the code;
            Items_Slot_Click = 1.31 bytes [work/harness/game/WIZARDS.EXE]
466. GAME    A hero created at the fortress can push a unit out of the capital. Lair_Enter (6d36:0164),
            src/wizards/LAIR.C: "BUG: the hero is created at the fortress and Screen_Hire_Hero's Stack_Limit_Enforce
            runs there, so a fortress holding 9 units has its cheapest unit pushed out (Unit_Bump_Or_Report) before
            the hero moves here; and here nothing checks the limit - a 9-unit stack becomes 10." Numbered in P4 B1
            (N220) from our comment.
            Corrected (2026-10-23, in game, tools/harness/regress.py 466): the second half cannot happen -
            Treasure_Roll offers the prisoner only when fewer than 9 units stand on the lair square. And
            Stack_Limit_Enforce bumps the LAST unit of the lowest upkeep + level, so the new hero (the last unit)
            loses ties and bumps itself (seen, run 1: Unit_Bump_To_Adjacent(the hero)); a fortress unit is pushed out
            only when it is strictly cheaper (seen, run 2: a level-0 unit moved from the fortress to (28,26)).
            In game (2026-10-23, tools/harness/regress.py 466): keys ['esc', 'esc', 'a', 'a', 'esc']; fortress units 9
            -> 8; pushed out {0: (28, 26)}; units 195 -> 196, the new unit at (30, 28, 9); Stack_Limit_Enforce (unit,
            type, x, y, level) [(195, 9, 29, 27, 0)]; Unit_Bump_To_Adjacent [(0, 120, 29, 27, 0)]
467. SRC     Minimap highlight: a y bound applied to x. Minimap_Build (d95b:12f3), src/wizards/MAPLAYER.C: "(ox, oy,
            plane, pic, w, h, hx, hy, hilite) the w x h minimap picture of the map from (ox, oy): the explored
            squares' terrain colors, the cities in their owner's color, and with hilite a white dot at (hx, hy) (BUG:
            a y past the bottom is corrected on x)" Numbered in P4 B1 (N220) from our comment.
            Static check (2026-10-24, tools/harness/regress.py 467): wizards/MAPLAYER.C:775 holds the code;
            Minimap_Build = 1.31 bytes [work/harness/game/WIZARDS.EXE]
468. SRC     Fog_Fill_Corner: right / down neighbours are not wrapped. Fog_Fill_Corner (5a8c:07ce),
            src/wizards/MAPVIEW.C: "BUG: right = x + 1 and down = y + 1 are not wrapped: column 60 is the next row's
            column 0, row 40 is Myrror's row 0 (from Arcanus) or past the maps (from Myrror) - read, and written when
            all four match; clarified using ReMoM repo" Numbered in P4 B1 (N220) from our comment.
            Static check (2026-10-24, tools/harness/regress.py 468): wizards/MAPVIEW.C:290 holds the code;
            Fog_Fill_Corner = 1.31 bytes [work/harness/game/WIZARDS.EXE]
469. SRC     Road building: the path length is set per unit, the last unit decides. Stack_Move (7b88:0000),
            src/wizards/MOVESTK.C: "a running counter counts down (BUG: the path length is set per unit, so the last
            unit decides)." Numbered in P4 B1 (N220) from our comment.
            Latent in 1.31 (2026-10-25, tools/harness/regress.py 469): (order, road_turns, x, y) after the turn: A
            (161: 2, 173: 0) {161: (3, 0, 28, 28), 173: (3, 3, 27, 28)}; B (161: 0, 173: 2) {161: (3, 3, 27, 28), 173:
            (3, 0, 28, 28)} (Ready 0, Go-To 3); the two engineers ended on different squares: GoTo_Build_Group
            (STACKCMD.C) groups only units with the lead's road_turns, so engineers with different counters never
            share a Stack_Move - the shared call the bug needs never happens (latent in 1.31)
470. SRC     Window_Zoom_Open saves a rectangle short of its size. Window_Zoom_Open (d677:1e9d), src/wizards/NOTIFY.C:
            "BUG: (w - 1)(h - 1) + 32, short of the w x h + 16 bitmap once w + h > 17: each step's restore misses its
            tail" Numbered in P4 B1 (N220) from our comment.
            Static check (2026-10-24, tools/harness/regress.py 470): wizards/NOTIFY.C:945 holds the code;
            Window_Zoom_Open = 1.31 bytes [work/harness/game/WIZARDS.EXE]
471. GAME    Plane Shift test: Non-Corporeal and Wraith Form are not tested. Stack_Can_Plane_Shift (81df:0cb8),
            src/wizards/ORDERS.C: "BUG: Non-Corporeal and Wraith Form are not tested, though overland movement lets
            them cross water (UNITMOVE.C) - a non-corporeal stack cannot shift onto water; clarified using ReMoM repo"
            Numbered in P4 B1 (N220) from our comment.
            In game (2026-10-23, tools/harness/regress.py 471): units kept / their planes after the turn (1 Myrror, 0
            Arcanus): Wraith Form (4, [1, 1, 1, 1]), Water Walking (4, [0, 0, 0, 0]), nine Water Walking (9, [1, 1, 1,
            1, 1, 1, 1, 1, 1])
472. SRC     Killed heroes' item slots are cleared to 0 (an item index), not -1. Death_Wish_Cast (af2c:0071),
            Great_Unsummoning_Cast (af2c:02ad), Hero_Item_Slot_Types (af2c:0000), Natures_Wrath_Strike (acd6:2051),
            Stack_Resist_Or_Die (acd6:0490), Unit_Spell_Damage (acd6:01b0), src/wizards/OVERSPL2.C: "BUG: 0, not -1
            (none) - as Death Wish" Numbered in P4 B1 (N220) from our comment.
            Static check (2026-10-25, tools/harness/regress.py 472): static fallback: wizards/OVERSPL3.C:189 holds the
            code; Death_Wish_Cast = 1.31 bytes; Great_Unsummoning_Cast = 1.31 bytes; Unit_Spell_Damage = 1.31 bytes
            [work/harness/game/WIZARDS.EXE] | play case NOT REACHED (2026-10-23 17:11): turn 107: AI heroes (wizard,
            slot) items before {(1, 0): [-1, -1, -1], (1, 1): [-1, -1, -1], (1, 2): [-1, -1, -1], (2, 0): [-1, -1,
            -1], (2, 1): [-1, -1, -1], (2, 2): [-1, -1, -1], (2, 3): [-1, -1, -1], (4, 0): [-1, -1, -1], (4, 1): [-1,
            -1, -1], (4, 2): [-1, -1, -1]} -> after {(1, 0): [-1, -1, -1], (1, 1): [-1, -1, -1], (1, 2): [-1, -1, -1],
            (2, 0): [-1, -1, -1], (2, 1): [-1, -1, -1], (2, 2): [-1, -1, -1], (2, 3): [-1, -1, -1], (4, 0): [-1, -1,
            -1], (4, 1): [-1, -1, -1], (4, 2): [-1, -1, -1]}; cleared to 0: []; human casting now 0 - no hero died
            (resist rolls)
473. GAME    Spell Binding (AI): a GlobalEnchants slot used as a spell. Spell_Binding_Cast (af2c:08bf),
            src/wizards/OVERSPL3.C: "BUG: the AI pick returns a GlobalEnchants slot (OVERCAST.C maps it with
            GlobalSlot_To_Spell); here it indexes p_spell_data as if it were a SpellId" Numbered in P4 B1 (N220) from
            our comment.
            In game (2026-10-24, tools/harness/regress.py 473): p_spell_data[5]: effect_param 4096, base cost 10,
            realm 0, effect type 14; globals changed in the turn: {0: [], 1: [], 2: [], 3: [], 4: []}; human Suppress
            Magic 1 -> 1, wizard 1's 0; wizard 1 casting now 14; the bytes at globals + 4096 (in wizard 4 / 5's
            records, offset 354): human's 0 -> 0, wizard 1's 0 -> 2
474. SRC     Palette_Cycle_Step: the turn test when to < from. Palette_Cycle_Step (1c79:050f), src/wizards/PALETTE.C:
            "BUG: when to < from the turn tests compare the opposite ends, so the value jumps between from + 1 and to
            - 1 (outside the range) every step." Numbered in P4 B1 (N220) from our comment.
            Static check (2026-10-24, tools/harness/regress.py 474): wizards/PALETTE.C:310 holds the code;
            Palette_Cycle_Step = 1.31 bytes [work/harness/game/WIZARDS.EXE]
475. SRC     Screen_Spell_Learned: (spell - 2) / 40 is not the spell's realm. Screen_Spell_Learned (9c9a:0840),
            src/wizards/RESEARCH.C: "BUG: (spell - 2) / SPELLS_PER_REALM is not SPELL_REALM(spell): a realm's first
            spell marks the previous realm's first slot" Numbered in P4 B1 (N220) from our comment.
            Latent in 1.31 (2026-10-25, tools/harness/regress.py 475): spell 41: learned state 2, Nature slot 0 2 ->
            2, the found == 0 line not hit; spell 42: learned state 2, Nature slot 0 2 -> 2, the line not hit (known
            2, researchable 1) - the found == 0 branch did not run (the spell was found on an earlier page). Latent:
            the branch is dead code in 1.31 - Wizard_Learn_Spell makes the spell KNOWN before this screen, the
            research book lists every known spell, and Spellbook_Fill_Group adds the Research / Spells pages even when
            empty, so the first search (all pages but those two) always finds it
476. SRC     Combat spellbook budget overflows above 16383 mana at the 0.5x range multiplier (own fortress).
            Combat_Spellbook_Build (9a4b:060d), src/wizards/SPELLBK.C: "BUG: at the 0.5x range multiplier (n 5) a
            reserve over 16383 gives a quotient over 32767: the int is negative, so the budget becomes negative and
            nothing is castable - in a battle at the wizard's own fortress (Combat_Range_Multiplier 5)." Numbered in
            P4 B1 (N220) from our comment.
            Static check (2026-10-24, tools/harness/regress.py 476): wizards/SPELLBK.C:376 holds the code;
            Combat_Spellbook_Build = 1.31 bytes [work/harness/game/WIZARDS.EXE]
477. SRC     Spellbook casting screen: the right page's help test reads the left page. Screen_Spellbook_Cast
            (b8ad:0088), src/wizards/SPELLCST.C: "BUG: the right page's help test reads the left page's spell; the
            first Cancel control gets -1 as its hotkey string" Numbered in P4 B1 (N220) from our comment.
            Static check (2026-10-24, tools/harness/regress.py 477): wizards/SPELLCST.C:195 holds the code;
            Screen_Spellbook_Cast = 1.31 bytes [work/harness/game/WIZARDS.EXE]
478. GAME    Call Lightning bolts take their damage from spell 3's record (Wall of Stone). Call_Lightning_Turn
            (b66a:03c9), src/wizards/SPELLFX.C: "QUIRK: spell 3's record (Wall of Stone), not Call Lightning's, sets
            the bolt's damage" Numbered in P4 B1 (N220) from our comment.
            In game (2026-10-24, tools/harness/regress.py 478): Spell_Damage_Roll(spell, target, damage, strength) (3,
            8, -590, 0) called from Call_Lightning_Turn+121 (B66A:04EA); spell 3 (effect_param, type) (73736, 5), Call
            Lightning (18, 10)
479. SRC     Vortices: the bounds test lets column / row BATTLEFIELD_W / _H through. Vortices_Turn (b66a:1a11),
            src/wizards/SPELLFX.C: "BUG: > lets column BATTLEFIELD_W and row BATTLEFIELD_H through, and cost_flying is
            read before the bounds tests" Numbered in P4 B1 (N220) from our comment.
            Static check (2026-10-24, tools/harness/regress.py 479): wizards/SPELLFX.C:952 holds the code;
            Vortices_Turn = 1.31 bytes [work/harness/game/WIZARDS.EXE]
480. SRC     Stack popup: rebuild is read before it is first set. Screen_Stack_Popup (6a2d:0000),
            src/wizards/STACKPOP.C: "BUG: 'rebuild' is read before it is first set (the first frame may skip its
            redraw)" Numbered in P4 B1 (N220) from our comment.
            Static check (2026-10-24, tools/harness/regress.py 480): wizards/STACKPOP.C:65 holds the code;
            Screen_Stack_Popup = 1.31 bytes [work/harness/game/WIZARDS.EXE]
481. SRC     Surveyor: the bottom 2 pixel rows of a square read the row above. Surveyor_Show_Tile (7a3c:03a1),
            src/wizards/SURVEYOR.C: "QUIRK: - 1 row for the 20-pixel bar, so the last 2 pixel rows of a square read
            the square below (MAPDRAW.C: (y - MAP_VIEW_TOP) / MAP_TILE_H)" Numbered in P4 B1 (N220) from our comment.
            Static check (2026-10-24, tools/harness/regress.py 481): wizards/SURVEYOR.C:257 holds the code;
            Surveyor_Show_Tile = 1.31 bytes [work/harness/game/WIZARDS.EXE]
482. GAME    Nightshade: a city that stops qualifying keeps its count. Cities_Count_Nightshade (f319:1348),
            src/wizards/TERRAIN.C: "BUG: a city that stops qualifying keeps its old count" Numbered in P4 B1 (N220)
            from our comment.
            In game (2026-10-22, tools/harness/regress.py 482): turn 107: Cremona Nightshade count 6 (set to 6)
483. SRC     Tile_Water_Bonus_Unused overwrites its own values (dead code). Tile_Water_Bonus_Unused (f319:1658),
            src/wizards/TERRAIN.C: "BUG: the single squares 0xa2..0xb8 all reset it to 0" Numbered in P4 B1 (N220)
            from our comment.
            Static check (2026-10-23, tools/harness/regress.py 483): wizards/TERRAIN.C:1054 holds the code;
            Tile_Water_Bonus_Unused = 1.31 bytes [work/harness/game/WIZARDS.EXE]
484. GAME    Terrain changes never update the movement cost maps. TERRCHG.C, segment cbdf (Tile_Make_Volcano /
            _Grassland / _Forest / _Hills, Volcano_To_Mountain), src/wizards/TERRCHG.C: "BUG: no conversion here
            updates p_movement_cost_maps (built only by MAGIC.EXE's world generation, then saved and loaded; WIZARDS
            changes it only for roads and cities), so a square changed by Change Terrain, Raise Volcano, Gaia's
            Blessing or a cooling volcano keeps the old terrain's movement costs for the rest of the game
            (COMMUNITY-KNOWN: ReMoM notes the TERRSTAT patch fixes it)." Numbered in P4 B1 (N220) from our comment.
            In game (2026-10-22, tools/harness/regress.py 24): turn 112 autosave: 74 new volcanoes, 74 keep their old
            movement costs; TERRSTAT volcano costs (6, 6, 6, 6, 2, 255) differ from the old costs on 73 of them
485. SRC     UI_Text_List_Select_Scrolling: a loop that never ends. UI_Text_List_Select_Scrolling (2666:59b3),
            src/wizards/UI.C: "QUIRK: never ends when enabled == 0 (DEAD code)" Numbered in P4 B1 (N220) from our
            comment.
            Static check (2026-10-23, tools/harness/regress.py 485): wizards/UI.C:2885 holds the code;
            UI_Text_List_Select_Scrolling = 1.31 bytes [work/harness/game/WIZARDS.EXE]
486. SRC     Unit type ability lines read strengths from the last unit's statistics. UnitView_Build_Type_Abilities
            (679a:1bf5), src/wizards/UNITABIL.C: "BUG: the poison / stoning / gaze strengths and the ranged test come
            from p_unit_stats_buf (the last unit's statistics), not from the type" Numbered in P4 B1 (N220) from our
            comment.
            Static check (2026-10-24, tools/harness/regress.py 486): wizards/UNITABIL.C:753 holds the code;
            UnitView_Build_Type_Abilities = 1.31 bytes [work/harness/game/WIZARDS.EXE]
487. GAME    Stack_Movement_Modes mixes && and || in the Wraith Form test. Stack_Movement_Modes (5d70:00b8),
            src/wizards/UNITMOVE.C: "BUG: one test mixes && and || ('mode 8 && Non-Corporeal type || Wraith Form ||
            item Wraith Form'): a Wraith Form unit takes one off the swimmer count for every mode whose type flag it
            has, not only for flying." Numbered in P4 B1 (N220) from our comment.
            In game (2026-10-23, tools/harness/regress.py 487): positions after the move east: control (Spearmen +
            flyer) [(32, 28), (32, 28)], cavalry (Cavalry + flyer) [(31, 28), (31, 28)]
488. SRC     Wizard info: help slots 14 .. 17. Wizard_Info_Draw (62a9:012c), src/wizards/WIZINFO.C: "help slots: 7
            fame, 8-13 retorts, 14-17 the relation lines (BUG: the retorts go to k + 8 later, so a 7th+ retort
            overwrites them)" Numbered in P4 B1 (N220) from our comment.
            Static check (2026-10-24, tools/harness/regress.py 488): wizards/WIZINFO.C:154 holds the code;
            Wizard_Info_Draw = 1.31 bytes [work/harness/game/WIZARDS.EXE]

=== FOUND BY THE REGRESSION SUITE (P4 B4) ===
489. GAME    Nightshade dispels its own count. City_Nightshade_Dispel (b425:1d2f), src/wizards/OVERSPEL.C, rolls every
            city enchantment slot 0..25 whose value is not the owner + 1 - slot 25 included, which is the Nightshade
            count itself; CitySlot_To_Spell(25) finds no spell, so the count is rolled as spell 0 at chance count x
            25000 / (resistance + count x 100) and usually zeroed. Our names database called this harmless because
            Next_Turn recounts the slot (Cities_Count_Nightshade), but the recount covers only cities with a
            qualifying building: a city that no longer qualifies loses its stale count here (see #482) - unless the
            count equals its owner + 1, which is never rolled and stays. Found by the regression suite (N224).
            In game (2026-10-22, tools/harness/regress.py 489): turn 107: Cremona Nightshade count 0 (set to 3)
490. SRC     The plain desert square gives no production bonus. Terrain_Production_Pct (f319:01da), src/wizards/TERRAIN.C,
            gives +3% to TILE_DESERT_2 / _3 / _4 and to the desert-edge range, but leaves TILE_DESERT (165, the single
            plain desert picture) out of its list, so that square adds 0%. The Surveyor's terrain text prints
            "+3% production" for every desert (SURVEYOR.C Surveyor_Terrain_Text, TERR_CAT_DESERT), so the display and
            the rules disagree for that one picture. (The manual's Table D says +10% for desert; its production
            figures differ from the game for every terrain - the game's own 3 / 5 % agree with the Surveyor.) Found
            10/23 while comparing the Surveyor texts with the rules for #272.
491. GAME    Inside a diplomacy audience the landmass map holds music. Diplo_Screen_Load (6ea7:14f3),
            src/wizards/DIPLOSCR.C, writes the world block to COMBAT.TMP (Combat_Tmp_Save) and then loads the
            partner's Good / Bad music (MUSIC.LBX 41 / 42 + 2 x portrait) into that block, over the map layers;
            Combat_Tmp_Restore puts them back when the audience ends. Diplo_Army_Near_Fortress (6ea7:1922) reads
            p_landmass_ids in between, so the army terms of a threat (Diplo_Threaten_Menu) and of the human's
            proposals (Diplo_Proposal_Response, DIPLOACT.C) count the units whose square holds the same MUSIC byte
            as the partner's fortress square, not the units on its continent: #50 / #51 describe the formula, but
            the armies fed to it inside an audience are arbitrary (fixed per partner portrait). AI_War_Check
            (DIPLOTRN.C) runs outside an audience and reads the real map. Found by the regression suite (N234):
            wizard 1 (portrait 1) - the 4800 bytes are the end of MUSIC entry 43 and the start of entry 44 (4714 of
            them differ from the map; the fortress square (49,14) Myrror reads 152 instead of landmass 14);
            COMBAT.TMP holds the real map and leaving restores it exactly.
            In game (2026-10-23, tools/harness/regress.py 491): fortress square (49,14) Myrror: 14 on the map, 152 in
            the audience, 14 after leaving; 4714 of 4800 bytes differ in the audience; Myrror half = MUSIC entry 44
            from byte 1040: True; restored exactly: True
