
# assert_continue_next_turn.txt — Field-level assertions for the Continue + Next Turn test.
#
# Each non-comment, non-blank line is a "field = expected_value" assertion.
# The check_save_fields tool looks up each field in the dump and reports
# any mismatches with exact field names, actual values, and expected values.
#
# This file extends the assertions from assert_continue_save.txt with the
# state changes caused by pressing Next Turn once.
#
# Direct causes:
#   - City name popup: `Claudesville` typed into city[0].name
#   - Patrol click: the human's capital stack (unit[0] + unit[5]) gets status=1, finished=1
#   - Next Turn click: game.turn advances, AI gives movement orders to its units
#   - Research picker: human clicks top-left spell (Resist Magic, idx 41)
#   - AI research: each AI selects a spell via AI_Spell_Research_Select

# --- Game state ---
game.turn = 1

# ==========================================================================
#  Player 0 — Rjak (Human)
# ==========================================================================

# Identity (sanity check, unchanged from new game config)
player[0].name = Rjak
player[0].wizard_id = 6
player[0].capital_race = 12
player[0].banner_id = 4

# Research pick: Resist Magic selected via click (54,38) on picker
# NONDET player[0].researching_spell_idx -- observed values across 5 runs: 43, 82, 41, 81, 2  (set aside until determinism is restored)
# player[0].researching_spell_idx = 43

# Resource calculations after turn 1
# power_base = sum of spellbooks (2+4+3+1+0 = 10) from fortress
player[0].power_base = 10
# 33/33/33 split of power_base 10: each gets 3
player[0].mana_reserve = 3
player[0].spell_casting_skill = 384
# gold: 75 + income - maintenance - upkeep (tracks current worldgen/economy;
# re-derive the exact breakdown if needed)
player[0].gold_reserve = 76
# research_cost_remaining = Resist Magic base cost (just selected, no progress yet)
# NONDET player[0].research_cost_remaining -- observed values across 5 runs: 60, 40, 20, 20, 40  (set aside until determinism is restored)
# player[0].research_cost_remaining = 60

# Home city: renamed via popup
city[0].name = Claudesville
city[0].owner_idx = 0
city[0].race = 12

# Patrol click set status=1 on the human's capital stack: unit[0] and unit[5]
# (both at the capital, both finished=1).  Units pair as unit[N]/unit[N+5] for player N.
unit[0].owner_idx = 0
unit[0].wx = 18
unit[0].wy = 24
unit[0].wp = 0
unit[0].status = 1
unit[0].finished = 1

unit[5].owner_idx = 0
unit[5].wx = 18
unit[5].wy = 24
unit[5].wp = 0
unit[5].status = 1
unit[5].finished = 1

# ==========================================================================
#  Player 1
# ==========================================================================

# NONDET player[1].researching_spell_idx -- observed values across 5 runs: 210, 2, 211, 2, 7  (set aside until determinism is restored)
# player[1].researching_spell_idx = 210

unit[1].owner_idx = 1
unit[1].wx = 51
unit[1].wy = 11
unit[1].wp = 0
unit[1].status = 0

# ==========================================================================
#  Player 2
# ==========================================================================

# NONDET player[2].researching_spell_idx -- observed values across 5 runs: 169, 202, 161, 203, 203  (set aside until determinism is restored)
# player[2].researching_spell_idx = 169

unit[2].owner_idx = 2
unit[2].wx = 36
unit[2].wy = 12
unit[2].wp = 0
unit[2].status = 0

# ==========================================================================
#  Player 3
# ==========================================================================

# NONDET player[3].researching_spell_idx -- observed values across 5 runs: 211, 122, 207, 205, 212  (set aside until determinism is restored)
# player[3].researching_spell_idx = 211

unit[3].owner_idx = 3
unit[3].wx = 45
unit[3].wy = 14
unit[3].wp = 1
unit[3].status = 0

# ==========================================================================
#  Player 4
# ==========================================================================

# NONDET player[4].researching_spell_idx -- observed values across 5 runs: 7, 6, 8, 2, 207  (set aside until determinism is restored)
# player[4].researching_spell_idx = 7

unit[4].owner_idx = 4
unit[4].wx = 40
unit[4].wy = 30
unit[4].wp = 0
unit[4].status = 0
