diff --git a/src/simulator/api-gdext/tests/ai_controller.rs b/src/simulator/api-gdext/tests/ai_controller.rs index c70eaa4a..c702e809 100644 --- a/src/simulator/api-gdext/tests/ai_controller.rs +++ b/src/simulator/api-gdext/tests/ai_controller.rs @@ -27,9 +27,13 @@ fn constructor_smoke_player_index_bounds() { player_index_to_slot((MAX_PLAYERS - 1) as i64).unwrap(), MAX_PLAYERS - 1 ); - assert!( - player_index_to_slot(MAX_PLAYERS as i64).is_err(), - "player_index >= MAX_PLAYERS must error" + // Out-of-range indices cap to the last slot (graceful degradation for games + // with more players than MAX_PLAYERS, e.g. the 5-clan demo) rather than + // erroring and taking no actions — see player_index_to_slot in ai.rs. + assert_eq!( + player_index_to_slot(MAX_PLAYERS as i64).unwrap(), + MAX_PLAYERS - 1, + "player_index >= MAX_PLAYERS must cap to the last slot" ); } diff --git a/src/simulator/crates/mc-player-api/tests/full_game_transcript.rs b/src/simulator/crates/mc-player-api/tests/full_game_transcript.rs index 38d42169..27e21a6f 100644 --- a/src/simulator/crates/mc-player-api/tests/full_game_transcript.rs +++ b/src/simulator/crates/mc-player-api/tests/full_game_transcript.rs @@ -1372,6 +1372,7 @@ fn ai_action_signature(action: &mc_ai::tactical::Action) -> String { A::DeploySiege { .. } => "deploy_siege".into(), A::PackSiege { .. } => "pack_siege".into(), A::Bombard { .. } => "bombard".into(), + A::DeclareWar { target } => format!("declare_war:{target}"), } }