Fix Wonderful objective eligibility and queued response outbox recovery (0.1.245 / 0.4.175)
Some checks are pending
Check / check (push) Waiting to run
Web viewer / verify (push) Waiting to run
Web viewer / smoke (node scripts/map-guide-smoke.mjs && node scripts/trade-routes-smoke.mjs && node scripts/raiders-smoke.mjs && node scripts/influence-bubble-smoke.mjs, map-overlays) (push) Blocked by required conditions
Web viewer / smoke (node scripts/research-card-smoke.mjs && node scripts/boarding-smoke.mjs && node scripts/embark-smoke.mjs && node scripts/ship-landing-smoke.mjs && node scripts/viking-cargo-smoke.mjs, cards-ships) (push) Blocked by required conditions
Web viewer / smoke (node scripts/resource-journal-smoke.mjs && node scripts/famine-journal-smoke.mjs && node scripts/construction-smoke.mjs && node scripts/great-architect-smoke.mjs && node scripts/provinces-smoke.mjs, journal-construction) (push) Blocked by required conditions
Web viewer / smoke (node scripts/withdrawal-smoke.mjs && node scripts/horse-master-smoke.mjs && node scripts/carthage-recruit-smoke.mjs && node scripts/payment-defaults-smoke.mjs && node scripts/wonder-payment-perf.mjs, combat-payments) (push) Blocked by required conditions
Some checks are pending
Check / check (push) Waiting to run
Web viewer / verify (push) Waiting to run
Web viewer / smoke (node scripts/map-guide-smoke.mjs && node scripts/trade-routes-smoke.mjs && node scripts/raiders-smoke.mjs && node scripts/influence-bubble-smoke.mjs, map-overlays) (push) Blocked by required conditions
Web viewer / smoke (node scripts/research-card-smoke.mjs && node scripts/boarding-smoke.mjs && node scripts/embark-smoke.mjs && node scripts/ship-landing-smoke.mjs && node scripts/viking-cargo-smoke.mjs, cards-ships) (push) Blocked by required conditions
Web viewer / smoke (node scripts/resource-journal-smoke.mjs && node scripts/famine-journal-smoke.mjs && node scripts/construction-smoke.mjs && node scripts/great-architect-smoke.mjs && node scripts/provinces-smoke.mjs, journal-construction) (push) Blocked by required conditions
Web viewer / smoke (node scripts/withdrawal-smoke.mjs && node scripts/horse-master-smoke.mjs && node scripts/carthage-recruit-smoke.mjs && node scripts/payment-defaults-smoke.mjs && node scripts/wonder-payment-perf.mjs, combat-payments) (push) Blocked by required conditions
This commit is contained in:
parent
26abf804d9
commit
e798ed2683
40 changed files with 767 additions and 47 deletions
2
.github/workflows/web-viewer.yml
vendored
2
.github/workflows/web-viewer.yml
vendored
|
|
@ -1,7 +1,7 @@
|
||||||
name: Web viewer
|
name: Web viewer
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
paths: ['web-client/**', 'server/**', 'scripts/status-phase-battle.test.cjs', 'scripts/postcombat-queue*.cjs', 'scripts/tributes.test.cjs', 'scripts/withdrawal.test.cjs', 'scripts/viking-cargo.test.cjs', 'scripts/aggressor.test.cjs', 'scripts/great-architect.test.cjs', 'scripts/provinces*.cjs', 'scripts/barbarian-movement.test.cjs', 'scripts/disembark-stack-limit.test.cjs', 'Cargo.*', '.github/workflows/web-viewer.yml']
|
paths: ['web-client/**', 'server/**', 'scripts/status-phase-battle.test.cjs', 'scripts/postcombat-queue*.cjs', 'scripts/tributes.test.cjs', 'scripts/withdrawal.test.cjs', 'scripts/viking-cargo.test.cjs', 'scripts/aggressor.test.cjs', 'scripts/great-architect.test.cjs', 'scripts/provinces*.cjs', 'scripts/barbarian-movement.test.cjs', 'scripts/disembark-stack-limit.test.cjs', 'scripts/wonderful-objective.test.cjs', 'Cargo.*', '.github/workflows/web-viewer.yml']
|
||||||
push:
|
push:
|
||||||
branches: [main, feat/3d-web-viewer]
|
branches: [main, feat/3d-web-viewer]
|
||||||
concurrency:
|
concurrency:
|
||||||
|
|
|
||||||
|
|
@ -1684,11 +1684,6 @@
|
||||||
"issue": "Current predicate includes the player's own ports and counts passengers as well as ships. Verify whether two ships must occupy one port or can occupy different ports.",
|
"issue": "Current predicate includes the player's own ports and counts passengers as well as ships. Verify whether two ships must occupy one port or can occupy different ports.",
|
||||||
"printed_sources_now_available": true
|
"printed_sources_now_available": true
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "Magnificent Culture",
|
|
||||||
"issue": "The status-phase predicate does not check that no other Wonder was built. Verify Monumental Edition wording before changing the condition.",
|
|
||||||
"printed_sources_now_available": true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "Mercenaries",
|
"name": "Mercenaries",
|
||||||
"issue": "Description names cities/army units for range; the code uses all owned units. Printed English wording is needed to resolve the difference.",
|
"issue": "Description names cities/army units for range; the code uses all owned units. Printed English wording is needed to resolve the difference.",
|
||||||
|
|
|
||||||
156
scripts/wonderful-objective.test.cjs
Normal file
156
scripts/wonderful-objective.test.cjs
Normal file
|
|
@ -0,0 +1,156 @@
|
||||||
|
// Real WASM engine tests for Wonderful (O32, internal "Magnificent Culture").
|
||||||
|
// Build with: bash web-client/scripts/build-bridge.sh
|
||||||
|
const assert = require('node:assert/strict');
|
||||||
|
const { test } = require('node:test');
|
||||||
|
const engine = require(process.env.CLASH_WASM || '../web-client/.engine/server.js');
|
||||||
|
const move = (game, action, player = 0) =>
|
||||||
|
JSON.parse(engine.tryMove(JSON.stringify(game), JSON.stringify(action), player));
|
||||||
|
|
||||||
|
const offered = (g) =>
|
||||||
|
(g.events || []).some((e) => e.event_type?.SelectObjectives?.shown_objective === 'Magnificent Culture');
|
||||||
|
|
||||||
|
const statusObjectiveOffered = (g, player) =>
|
||||||
|
(g.events || []).some(
|
||||||
|
(e) =>
|
||||||
|
e.player === player &&
|
||||||
|
e.event_type?.SelectObjectives?.shown_objective === 'Magnificent Culture',
|
||||||
|
);
|
||||||
|
|
||||||
|
function wonderLogAction(player, wonder = 'Pyramids') {
|
||||||
|
return {
|
||||||
|
action: { Playing: 'EndTurn' },
|
||||||
|
player,
|
||||||
|
active_events: 0,
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
player,
|
||||||
|
HandCard: {
|
||||||
|
card: { Wonder: wonder },
|
||||||
|
from: { Hand: player },
|
||||||
|
to: 'PlayToKeep',
|
||||||
|
},
|
||||||
|
origin: { Ability: 'Build Wonder' },
|
||||||
|
modifiers: [],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
log: [],
|
||||||
|
undo: [],
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
async function baseGame(seed) {
|
||||||
|
const game = JSON.parse(await engine.init(2, [], {}, seed, null));
|
||||||
|
game.current_player_index = 0;
|
||||||
|
game.starting_player_index = 0;
|
||||||
|
game.players[0].objective_cards = [32];
|
||||||
|
game.players[1].objective_cards = [32];
|
||||||
|
game.players[0].advances = ['Farming', 'Mining', 'Engineering', 'Myths', 'Rituals', 'Monuments', 'Arts', 'Sports'];
|
||||||
|
game.players[0].resources = { food: 10, wood: 10, ore: 10, ideas: 10, gold: 10, mood_tokens: 10, culture_tokens: 10 };
|
||||||
|
game.players[1].resources = { food: 10, wood: 10, ore: 10, ideas: 10, gold: 10, mood_tokens: 10, culture_tokens: 10 };
|
||||||
|
return game;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function buildWonder(game, wonder = 'Pyramids') {
|
||||||
|
game.players[0].wonder_cards = [wonder];
|
||||||
|
// A size-1 city needs a second owned city to construct a Wonder.
|
||||||
|
const secondPos = game.map.tiles.find(
|
||||||
|
([pos, terrain]) =>
|
||||||
|
terrain !== 'Water' &&
|
||||||
|
!game.players.some((p) => (p.cities || []).some((c) => c.position === pos)),
|
||||||
|
)[0];
|
||||||
|
game.players[0].cities.push({ mood_state: 'Neutral', position: secondPos });
|
||||||
|
game.players[0].cities[0].mood_state = 'Happy';
|
||||||
|
let next = move(game, { Playing: { WonderCard: wonder } }, 0);
|
||||||
|
const view = JSON.parse(engine.webView(JSON.stringify(next), 0));
|
||||||
|
const payment = view.decision?.fields?.[0]?.choices?.[0] ?? view.decision?.fields?.[0]?.initial;
|
||||||
|
assert.ok(payment, 'expected Wonder payment choice');
|
||||||
|
return move(next, { Response: { Payment: [payment] } }, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
test('Immediate: sole Wonder builder qualifies on 1st and 2nd Wonder, but not after opponent builds', async () => {
|
||||||
|
// 1st Wonder by player 0 -> offered.
|
||||||
|
const g1 = await buildWonder(await baseGame('wonderful-imm-1'), 'Pyramids');
|
||||||
|
assert.ok(offered(g1), '1st Wonder should offer Wonderful immediately');
|
||||||
|
|
||||||
|
// 2nd Wonder by player 0 (already built 1 earlier) -> still offered under corrected rules.
|
||||||
|
const g2Base = await baseGame('wonderful-imm-2');
|
||||||
|
const g2Turn = g2Base.log.at(-1).rounds.at(-1).turns.at(-1);
|
||||||
|
g2Turn.actions = [...(g2Turn.actions || []), wonderLogAction(0, 'Colosseum')];
|
||||||
|
g2Base.log_index = g2Turn.actions.length;
|
||||||
|
const g2 = await buildWonder(g2Base, 'Pyramids');
|
||||||
|
assert.ok(offered(g2), '2nd Wonder by sole builder should offer Wonderful immediately');
|
||||||
|
|
||||||
|
// Opponent built earlier -> NOT offered.
|
||||||
|
const g3Base = await baseGame('wonderful-imm-3');
|
||||||
|
const g3Turn = g3Base.log.at(-1).rounds.at(-1).turns.at(-1);
|
||||||
|
g3Turn.actions = [...(g3Turn.actions || []), wonderLogAction(1, 'Colosseum')];
|
||||||
|
g3Base.log_index = g3Turn.actions.length;
|
||||||
|
const g3 = await buildWonder(g3Base, 'Pyramids');
|
||||||
|
assert.ok(!offered(g3), 'should not offer Wonderful once another player built a Wonder');
|
||||||
|
});
|
||||||
|
|
||||||
|
async function runStatusPhase(seed, configureLog) {
|
||||||
|
const game = await baseGame(seed);
|
||||||
|
// Position at the final turn of Round 3 so EndTurn enters Status Phase directly.
|
||||||
|
game.round = 3;
|
||||||
|
game.current_player_index = 1;
|
||||||
|
game.actions_left = 0;
|
||||||
|
configureLog(game);
|
||||||
|
return move(game, { Playing: 'EndTurn' }, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
test('Status Phase: cross-round same-Age Wonder by opponent disqualifies both players', async () => {
|
||||||
|
const after = await runStatusPhase('wonderful-status-cross', (game) => {
|
||||||
|
game.log = [
|
||||||
|
{
|
||||||
|
age: 1,
|
||||||
|
rounds: [
|
||||||
|
{ round: 1, turns: [{ turn_type: { Player: 1 }, actions: [wonderLogAction(1, 'Colosseum')] }] },
|
||||||
|
{ round: 3, turns: [{ turn_type: { Player: 0 }, actions: [wonderLogAction(0, 'Pyramids')] }, { turn_type: { Player: 1 }, actions: [] }] },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
];
|
||||||
|
game.log_index = 0;
|
||||||
|
});
|
||||||
|
assert.ok(!statusObjectiveOffered(after, 0), 'P0 must not qualify when P1 built in R1 of same Age');
|
||||||
|
assert.ok(!statusObjectiveOffered(after, 1), 'P1 must not qualify when P0 built in R3 of same Age');
|
||||||
|
});
|
||||||
|
|
||||||
|
test('Status Phase: earlier-round sole Wonder builder qualifies even when no Wonder is built in R3', async () => {
|
||||||
|
const after = await runStatusPhase('wonderful-status-earlier', (game) => {
|
||||||
|
game.log = [
|
||||||
|
{
|
||||||
|
age: 1,
|
||||||
|
rounds: [
|
||||||
|
{ round: 1, turns: [{ turn_type: { Player: 0 }, actions: [wonderLogAction(0, 'Pyramids')] }] },
|
||||||
|
{ round: 3, turns: [{ turn_type: { Player: 1 }, actions: [] }] },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
];
|
||||||
|
game.log_index = 0;
|
||||||
|
});
|
||||||
|
assert.ok(statusObjectiveOffered(after, 0), 'P0 should qualify in Status Phase for R1 sole Wonder');
|
||||||
|
const claimed = move(after, { Response: { SelectHandCards: [{ ObjectiveCard: 32 }] } }, 0);
|
||||||
|
assert.deepEqual(claimed.players[0].completed_objectives, [{ card: 32, name: 'Magnificent Culture' }]);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('Status Phase: previous-Age Wonder by opponent does not disqualify sole builder in current Age', async () => {
|
||||||
|
const after = await runStatusPhase('wonderful-status-prev-age', (game) => {
|
||||||
|
game.age = 2;
|
||||||
|
game.log = [
|
||||||
|
{
|
||||||
|
age: 1,
|
||||||
|
rounds: [{ round: 2, turns: [{ turn_type: { Player: 1 }, actions: [wonderLogAction(1, 'Colosseum')] }] }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
age: 2,
|
||||||
|
rounds: [
|
||||||
|
{ round: 2, turns: [{ turn_type: { Player: 0 }, actions: [wonderLogAction(0, 'Pyramids')] }] },
|
||||||
|
{ round: 3, turns: [{ turn_type: { Player: 1 }, actions: [] }] },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
];
|
||||||
|
game.log_index = 0;
|
||||||
|
});
|
||||||
|
assert.ok(statusObjectiveOffered(after, 0), 'P0 should qualify in Age 2 despite P1 building in Age 1');
|
||||||
|
});
|
||||||
|
|
@ -76,20 +76,27 @@ pub(crate) fn magnificent_culture() -> Objective {
|
||||||
let name = "Magnificent Culture";
|
let name = "Magnificent Culture";
|
||||||
Objective::builder(
|
Objective::builder(
|
||||||
name,
|
name,
|
||||||
"Immediately after constructing the first Wonder in the game, or during the Status Phase if you were the only player to construct Wonders in the last round.",
|
"Immediately after constructing the first Wonder in the game, or during the Status Phase if you were the only player to construct Wonders this Age.",
|
||||||
)
|
)
|
||||||
.status_phase_check(|game, player| {
|
.status_phase_check(|game, player| {
|
||||||
let builders = wonder_builders(last_round(game).into_iter().flat_map(|turn| &turn.actions));
|
let builders = if wonderful_corrected(game) {
|
||||||
|
wonder_builders(current_age_actions(game).into_iter())
|
||||||
|
} else {
|
||||||
|
wonder_builders(last_round(game).into_iter().flat_map(|turn| &turn.actions))
|
||||||
|
};
|
||||||
!builders.is_empty() && builders.iter().all(|p| *p == player.index)
|
!builders.is_empty() && builders.iter().all(|p| *p == player.index)
|
||||||
})
|
})
|
||||||
.add_simple_persistent_event_listener(
|
.add_simple_persistent_event_listener(
|
||||||
|event| &mut event.play_wonder_card,
|
|event| &mut event.play_wonder_card,
|
||||||
0,
|
0,
|
||||||
|game, player, _| {
|
|game, player, _| {
|
||||||
let builders = wonder_builders(
|
let builders = wonder_builders(crate::log::linear_action_entries(game).into_iter());
|
||||||
crate::log::linear_action_entries(game).into_iter(),
|
let qualifies = if wonderful_corrected(game) {
|
||||||
);
|
!builders.is_empty() && builders.iter().all(|p| *p == player.index)
|
||||||
if builders == [player.index] {
|
} else {
|
||||||
|
builders == [player.index]
|
||||||
|
};
|
||||||
|
if qualifies {
|
||||||
objective_is_ready(player.get_mut(game), name);
|
objective_is_ready(player.get_mut(game), name);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -97,6 +104,32 @@ pub(crate) fn magnificent_culture() -> Objective {
|
||||||
.build()
|
.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn wonderful_corrected(game: &Game) -> bool {
|
||||||
|
game.wonderful_eligibility_from
|
||||||
|
.is_some_and(|from| crate::game_api::log_length(game) >= from)
|
||||||
|
}
|
||||||
|
|
||||||
|
fn current_age_actions(game: &Game) -> Vec<&ActionLogAction> {
|
||||||
|
let turns: Vec<_> = game
|
||||||
|
.log
|
||||||
|
.last()
|
||||||
|
.into_iter()
|
||||||
|
.flat_map(|age| age.rounds.iter().flat_map(|round| &round.turns))
|
||||||
|
.collect();
|
||||||
|
turns
|
||||||
|
.iter()
|
||||||
|
.enumerate()
|
||||||
|
.flat_map(|(i, turn)| {
|
||||||
|
let limit = if i + 1 == turns.len() {
|
||||||
|
game.log_index
|
||||||
|
} else {
|
||||||
|
turn.actions.len()
|
||||||
|
};
|
||||||
|
turn.actions.iter().take(limit)
|
||||||
|
})
|
||||||
|
.collect()
|
||||||
|
}
|
||||||
|
|
||||||
// Construction history remains valid even after a Wonder is captured or destroyed.
|
// Construction history remains valid even after a Wonder is captured or destroyed.
|
||||||
fn wonder_builders<'a>(actions: impl Iterator<Item = &'a ActionLogAction>) -> Vec<usize> {
|
fn wonder_builders<'a>(actions: impl Iterator<Item = &'a ActionLogAction>) -> Vec<usize> {
|
||||||
actions
|
actions
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ use crate::cache::Cache;
|
||||||
use crate::events::EventOrigin;
|
use crate::events::EventOrigin;
|
||||||
use crate::game::GameContext;
|
use crate::game::GameContext;
|
||||||
use crate::game_data::GameData;
|
use crate::game_data::GameData;
|
||||||
use crate::log::{ActionLogItem, ActionLogRound, current_turn_log_mut};
|
use crate::log::{ActionLogAge, ActionLogItem, ActionLogRound, current_turn_log_mut};
|
||||||
use crate::playing_actions::PlayingAction;
|
use crate::playing_actions::PlayingAction;
|
||||||
use crate::wonder::Wonder;
|
use crate::wonder::Wonder;
|
||||||
|
|
||||||
|
|
@ -15,17 +15,22 @@ fn game() -> Game {
|
||||||
.unwrap();
|
.unwrap();
|
||||||
let cache = Cache::new(&data.options);
|
let cache = Cache::new(&data.options);
|
||||||
let mut game = Game::from_data(data, cache, GameContext::Play);
|
let mut game = Game::from_data(data, cache, GameContext::Play);
|
||||||
game.log.last_mut().unwrap().rounds = vec![ActionLogRound {
|
game.wonderful_eligibility_from = Some(0);
|
||||||
round: 3,
|
game.log = vec![ActionLogAge {
|
||||||
turns: vec![ActionLogTurn {
|
age: 1,
|
||||||
turn_type: TurnType::Player(0),
|
rounds: vec![ActionLogRound {
|
||||||
actions: vec![],
|
round: 3,
|
||||||
|
turns: vec![ActionLogTurn {
|
||||||
|
turn_type: TurnType::Player(0),
|
||||||
|
actions: vec![],
|
||||||
|
}],
|
||||||
}],
|
}],
|
||||||
}];
|
}];
|
||||||
|
game.log_index = 0;
|
||||||
game
|
game
|
||||||
}
|
}
|
||||||
|
|
||||||
fn build(game: &mut Game, player: usize) {
|
fn wonder_action(player: usize) -> ActionLogAction {
|
||||||
let mut action = ActionLogAction::new(Action::Playing(PlayingAction::EndTurn), player, None, 0);
|
let mut action = ActionLogAction::new(Action::Playing(PlayingAction::EndTurn), player, None, 0);
|
||||||
action.items.push(ActionLogItem::new(
|
action.items.push(ActionLogItem::new(
|
||||||
player,
|
player,
|
||||||
|
|
@ -37,10 +42,35 @@ fn build(game: &mut Game, player: usize) {
|
||||||
EventOrigin::Ability("Build Wonder".into()),
|
EventOrigin::Ability("Build Wonder".into()),
|
||||||
vec![],
|
vec![],
|
||||||
));
|
));
|
||||||
|
action
|
||||||
|
}
|
||||||
|
|
||||||
|
fn build(game: &mut Game, player: usize) {
|
||||||
|
let action = wonder_action(player);
|
||||||
current_turn_log_mut(game).actions.push(action);
|
current_turn_log_mut(game).actions.push(action);
|
||||||
game.log_index += 1;
|
game.log_index += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn round_with_build(round: u32, player: usize) -> ActionLogRound {
|
||||||
|
ActionLogRound {
|
||||||
|
round,
|
||||||
|
turns: vec![ActionLogTurn {
|
||||||
|
turn_type: TurnType::Player(player),
|
||||||
|
actions: vec![wonder_action(player)],
|
||||||
|
}],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn empty_round(round: u32, player: usize) -> ActionLogRound {
|
||||||
|
ActionLogRound {
|
||||||
|
round,
|
||||||
|
turns: vec![ActionLogTurn {
|
||||||
|
turn_type: TurnType::Player(player),
|
||||||
|
actions: vec![],
|
||||||
|
}],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn only_builder_in_last_round_qualifies_even_with_multiple_wonders() {
|
fn only_builder_in_last_round_qualifies_even_with_multiple_wonders() {
|
||||||
let mut game = game();
|
let mut game = game();
|
||||||
|
|
@ -57,6 +87,90 @@ fn only_builder_in_last_round_qualifies_even_with_multiple_wonders() {
|
||||||
assert!(!check(&game, game.player(1)));
|
assert!(!check(&game, game.player(1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn cross_round_same_age_disqualifies_both_builders() {
|
||||||
|
let objective = magnificent_culture();
|
||||||
|
let check = objective.status_phase_check.unwrap();
|
||||||
|
for earlier_round in [1, 2] {
|
||||||
|
let mut game = game();
|
||||||
|
game.log = vec![ActionLogAge {
|
||||||
|
age: 1,
|
||||||
|
rounds: vec![round_with_build(earlier_round, 1), round_with_build(3, 0)],
|
||||||
|
}];
|
||||||
|
game.log_index = 1;
|
||||||
|
// Corrected: B built in R1/R2 and A built in R3 of the same Age → neither qualifies.
|
||||||
|
assert!(!check(&game, game.player(0)));
|
||||||
|
assert!(!check(&game, game.player(1)));
|
||||||
|
// Legacy boundary retains the old last-round-only behavior.
|
||||||
|
game.wonderful_eligibility_from = None;
|
||||||
|
assert!(check(&game, game.player(0)));
|
||||||
|
assert!(!check(&game, game.player(1)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn earlier_round_sole_builder_qualifies_in_status_phase() {
|
||||||
|
let objective = magnificent_culture();
|
||||||
|
let check = objective.status_phase_check.unwrap();
|
||||||
|
for earlier_round in [1, 2] {
|
||||||
|
let mut game = game();
|
||||||
|
game.log = vec![ActionLogAge {
|
||||||
|
age: 1,
|
||||||
|
rounds: vec![round_with_build(earlier_round, 0), empty_round(3, 0)],
|
||||||
|
}];
|
||||||
|
game.log_index = 0;
|
||||||
|
// Corrected: A built in R1/R2, nobody built in R3 → A qualifies.
|
||||||
|
assert!(check(&game, game.player(0)));
|
||||||
|
assert!(!check(&game, game.player(1)));
|
||||||
|
// Legacy boundary retains the old last-round-only behavior.
|
||||||
|
game.wonderful_eligibility_from = None;
|
||||||
|
assert!(!check(&game, game.player(0)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn previous_age_isolation_allows_sole_builder_in_current_age() {
|
||||||
|
let objective = magnificent_culture();
|
||||||
|
let check = objective.status_phase_check.unwrap();
|
||||||
|
let mut game = game();
|
||||||
|
game.log = vec![
|
||||||
|
ActionLogAge {
|
||||||
|
age: 1,
|
||||||
|
rounds: vec![round_with_build(2, 1)],
|
||||||
|
},
|
||||||
|
ActionLogAge {
|
||||||
|
age: 2,
|
||||||
|
rounds: vec![round_with_build(1, 0), empty_round(3, 0)],
|
||||||
|
},
|
||||||
|
];
|
||||||
|
game.log_index = 0;
|
||||||
|
assert!(check(&game, game.player(0)));
|
||||||
|
assert!(!check(&game, game.player(1)));
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn undo_buffer_safety_ignores_undone_wonder_in_redo_buffer() {
|
||||||
|
let objective = magnificent_culture();
|
||||||
|
let check = objective.status_phase_check.unwrap();
|
||||||
|
let mut game = game();
|
||||||
|
// Player 0 built in round 1; Player 1 built in round 3 then undid it (stays in redo buffer).
|
||||||
|
game.log = vec![ActionLogAge {
|
||||||
|
age: 1,
|
||||||
|
rounds: vec![round_with_build(1, 0), round_with_build(3, 1)],
|
||||||
|
}];
|
||||||
|
game.log_index = 0;
|
||||||
|
assert!(check(&game, game.player(0)));
|
||||||
|
assert!(!check(&game, game.player(1)));
|
||||||
|
|
||||||
|
// If only an undone Wonder exists in the current Age, nobody qualifies.
|
||||||
|
game.log = vec![ActionLogAge {
|
||||||
|
age: 1,
|
||||||
|
rounds: vec![round_with_build(3, 0)],
|
||||||
|
}];
|
||||||
|
game.log_index = 0;
|
||||||
|
assert!(!check(&game, game.player(0)));
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn first_construction_uses_history_not_current_ownership() {
|
fn first_construction_uses_history_not_current_ownership() {
|
||||||
let mut game = game();
|
let mut game = game();
|
||||||
|
|
@ -78,16 +192,26 @@ fn first_construction_uses_history_not_current_ownership() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn construction_event_offers_only_the_first_wonder() {
|
fn immediate_sole_builder_qualifies_until_another_player_builds() {
|
||||||
use crate::content::persistent_events::{EventResponse, PersistentEventType};
|
use crate::content::persistent_events::{EventResponse, PersistentEventType};
|
||||||
use crate::resource_pile::ResourcePile;
|
use crate::resource_pile::ResourcePile;
|
||||||
for earlier_builder in [None, Some(0), Some(1)] {
|
for (boundary, earlier_builder, expected) in [
|
||||||
|
// Corrected rules: 1st and 2nd Wonder by sole builder qualify; after opponent builds, false.
|
||||||
|
(Some(0), None, true),
|
||||||
|
(Some(0), Some(0), true),
|
||||||
|
(Some(0), Some(1), false),
|
||||||
|
// Legacy boundary: only the 1st Wonder in the game qualified.
|
||||||
|
(Some(usize::MAX), None, true),
|
||||||
|
(Some(usize::MAX), Some(0), false),
|
||||||
|
(Some(usize::MAX), Some(1), false),
|
||||||
|
] {
|
||||||
let data: GameData = serde_json::from_str(include_str!(
|
let data: GameData = serde_json::from_str(include_str!(
|
||||||
"../../../tests/test_games/wonders/pyramids.json"
|
"../../../tests/test_games/wonders/pyramids.json"
|
||||||
))
|
))
|
||||||
.unwrap();
|
.unwrap();
|
||||||
let cache = Cache::new(&data.options);
|
let cache = Cache::new(&data.options);
|
||||||
let mut game = Game::from_data(data, cache, GameContext::Play);
|
let mut game = Game::from_data(data, cache, GameContext::Play);
|
||||||
|
game.wonderful_eligibility_from = boundary;
|
||||||
if let Some(player) = earlier_builder {
|
if let Some(player) = earlier_builder {
|
||||||
build(&mut game, player);
|
build(&mut game, player);
|
||||||
}
|
}
|
||||||
|
|
@ -105,6 +229,64 @@ fn construction_event_offers_only_the_first_wonder() {
|
||||||
);
|
);
|
||||||
let offered = game.events.iter().any(|event| matches!(&event.event_type,
|
let offered = game.events.iter().any(|event| matches!(&event.event_type,
|
||||||
PersistentEventType::SelectObjectives(info) if info.shown_objective.as_deref() == Some("Magnificent Culture")));
|
PersistentEventType::SelectObjectives(info) if info.shown_objective.as_deref() == Some("Magnificent Culture")));
|
||||||
assert_eq!(offered, earlier_builder.is_none());
|
assert_eq!(
|
||||||
|
offered, expected,
|
||||||
|
"boundary={boundary:?}, earlier_builder={earlier_builder:?}"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn legacy_upgrade_undo_and_branch_preserve_wonderful_boundary() {
|
||||||
|
use crate::content::persistent_events::{EventResponse, PersistentEventType};
|
||||||
|
use crate::resource_pile::ResourcePile;
|
||||||
|
let reload = |g: Game| {
|
||||||
|
let json = serde_json::to_string(&crate::game_data::data(g)).unwrap();
|
||||||
|
let data: GameData = serde_json::from_str(&json).unwrap();
|
||||||
|
let cache = Cache::new(&data.options);
|
||||||
|
Game::from_data(data, cache, GameContext::Play)
|
||||||
|
};
|
||||||
|
let data: GameData = serde_json::from_str(include_str!(
|
||||||
|
"../../../tests/test_games/wonders/pyramids.json"
|
||||||
|
))
|
||||||
|
.unwrap();
|
||||||
|
let cache = Cache::new(&data.options);
|
||||||
|
let mut legacy = Game::from_data(data, cache, GameContext::Play);
|
||||||
|
// Simulate a legacy save where player 0 already built a Wonder and boundary was unset.
|
||||||
|
build(&mut legacy, 0);
|
||||||
|
legacy.wonderful_eligibility_from = None;
|
||||||
|
let initial_len = crate::game_api::log_length(&legacy);
|
||||||
|
// First new action on an unversioned live save adopts the boundary at next action.
|
||||||
|
let after_play = crate::game_api::execute(
|
||||||
|
reload(legacy),
|
||||||
|
Action::Playing(PlayingAction::WonderCard(Wonder::Pyramids)),
|
||||||
|
0,
|
||||||
|
);
|
||||||
|
assert_eq!(after_play.wonderful_eligibility_from, Some(initial_len + 1));
|
||||||
|
let after_pay = crate::game_api::execute(
|
||||||
|
after_play,
|
||||||
|
Action::Response(EventResponse::Payment(vec![ResourcePile::new(
|
||||||
|
2, 3, 6, 0, 1, 0, 5,
|
||||||
|
)])),
|
||||||
|
0,
|
||||||
|
);
|
||||||
|
let offered = after_pay.events.iter().any(|event| matches!(&event.event_type,
|
||||||
|
PersistentEventType::SelectObjectives(info) if info.shown_objective.as_deref() == Some("Magnificent Culture")));
|
||||||
|
assert!(offered);
|
||||||
|
// Undoing must not wipe wonderful_eligibility_from.
|
||||||
|
let mut undone = crate::game_api::execute(after_pay, Action::Undo, 0);
|
||||||
|
assert_eq!(undone.wonderful_eligibility_from, Some(initial_len + 1));
|
||||||
|
// Branching after undo clamps any future boundary down to the new action's log position.
|
||||||
|
undone.wonderful_eligibility_from = Some(usize::MAX);
|
||||||
|
let branched = crate::game_api::execute(
|
||||||
|
undone,
|
||||||
|
Action::Response(EventResponse::Payment(vec![ResourcePile::new(
|
||||||
|
2, 3, 6, 0, 1, 0, 5,
|
||||||
|
)])),
|
||||||
|
0,
|
||||||
|
);
|
||||||
|
assert_eq!(
|
||||||
|
branched.wonderful_eligibility_from,
|
||||||
|
Some(crate::game_api::log_length(&branched))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -161,6 +161,7 @@ pub struct Game {
|
||||||
pub aggressor_eligibility_from: Option<usize>,
|
pub aggressor_eligibility_from: Option<usize>,
|
||||||
pub provinces_from: Option<usize>,
|
pub provinces_from: Option<usize>,
|
||||||
pub barbarian_movement_from: Option<usize>,
|
pub barbarian_movement_from: Option<usize>,
|
||||||
|
pub wonderful_eligibility_from: Option<usize>,
|
||||||
pub home_layout: crate::map::HomeLayout,
|
pub home_layout: crate::map::HomeLayout,
|
||||||
pub version: u16, // JSON schema version
|
pub version: u16, // JSON schema version
|
||||||
pub state: GameState,
|
pub state: GameState,
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,8 @@ pub struct GameData {
|
||||||
provinces_from: Option<usize>,
|
provinces_from: Option<usize>,
|
||||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||||
barbarian_movement_from: Option<usize>,
|
barbarian_movement_from: Option<usize>,
|
||||||
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||||
|
wonderful_eligibility_from: Option<usize>,
|
||||||
#[serde(default, skip_serializing_if = "crate::map::HomeLayout::is_legacy")]
|
#[serde(default, skip_serializing_if = "crate::map::HomeLayout::is_legacy")]
|
||||||
home_layout: crate::map::HomeLayout,
|
home_layout: crate::map::HomeLayout,
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
|
|
@ -177,6 +179,7 @@ pub fn from_data(data: GameData, mut cache: Cache, context: GameContext) -> Game
|
||||||
aggressor_eligibility_from: data.aggressor_eligibility_from,
|
aggressor_eligibility_from: data.aggressor_eligibility_from,
|
||||||
provinces_from: data.provinces_from,
|
provinces_from: data.provinces_from,
|
||||||
barbarian_movement_from: data.barbarian_movement_from,
|
barbarian_movement_from: data.barbarian_movement_from,
|
||||||
|
wonderful_eligibility_from: data.wonderful_eligibility_from,
|
||||||
home_layout: data.home_layout,
|
home_layout: data.home_layout,
|
||||||
state: data.state,
|
state: data.state,
|
||||||
players: Vec::new(),
|
players: Vec::new(),
|
||||||
|
|
@ -245,6 +248,7 @@ pub fn data(game: Game) -> GameData {
|
||||||
aggressor_eligibility_from: game.aggressor_eligibility_from,
|
aggressor_eligibility_from: game.aggressor_eligibility_from,
|
||||||
provinces_from: game.provinces_from,
|
provinces_from: game.provinces_from,
|
||||||
barbarian_movement_from: game.barbarian_movement_from,
|
barbarian_movement_from: game.barbarian_movement_from,
|
||||||
|
wonderful_eligibility_from: game.wonderful_eligibility_from,
|
||||||
home_layout: game.home_layout,
|
home_layout: game.home_layout,
|
||||||
state: game.state,
|
state: game.state,
|
||||||
events: game.events,
|
events: game.events,
|
||||||
|
|
@ -299,6 +303,7 @@ pub fn cloned_data(game: &Game) -> GameData {
|
||||||
aggressor_eligibility_from: game.aggressor_eligibility_from,
|
aggressor_eligibility_from: game.aggressor_eligibility_from,
|
||||||
provinces_from: game.provinces_from,
|
provinces_from: game.provinces_from,
|
||||||
barbarian_movement_from: game.barbarian_movement_from,
|
barbarian_movement_from: game.barbarian_movement_from,
|
||||||
|
wonderful_eligibility_from: game.wonderful_eligibility_from,
|
||||||
home_layout: game.home_layout,
|
home_layout: game.home_layout,
|
||||||
state: game.state.clone(),
|
state: game.state.clone(),
|
||||||
events: game.events.clone(),
|
events: game.events.clone(),
|
||||||
|
|
|
||||||
|
|
@ -211,6 +211,7 @@ pub fn setup_game_with_cache(setup: &GameSetup, cache: Cache) -> Game {
|
||||||
aggressor_eligibility_from: Some(0),
|
aggressor_eligibility_from: Some(0),
|
||||||
provinces_from: Some(0),
|
provinces_from: Some(0),
|
||||||
barbarian_movement_from: Some(0),
|
barbarian_movement_from: Some(0),
|
||||||
|
wonderful_eligibility_from: Some(0),
|
||||||
version: JSON_SCHEMA_VERSION,
|
version: JSON_SCHEMA_VERSION,
|
||||||
options: GameOptions {
|
options: GameOptions {
|
||||||
legacy_undo: None,
|
legacy_undo: None,
|
||||||
|
|
|
||||||
|
|
@ -458,6 +458,7 @@ pub(crate) fn add_log_action(game: &mut Game, item: Action) {
|
||||||
game.aggressor_eligibility_from.get_or_insert(next);
|
game.aggressor_eligibility_from.get_or_insert(next);
|
||||||
game.provinces_from.get_or_insert(next);
|
game.provinces_from.get_or_insert(next);
|
||||||
game.barbarian_movement_from.get_or_insert(next);
|
game.barbarian_movement_from.get_or_insert(next);
|
||||||
|
game.wonderful_eligibility_from.get_or_insert(next);
|
||||||
let active_events = game.events.len();
|
let active_events = game.events.len();
|
||||||
let player = game.active_player();
|
let player = game.active_player();
|
||||||
let origin = action_origin(&item, game.player(player)).clone();
|
let origin = action_origin(&item, game.player(player)).clone();
|
||||||
|
|
@ -475,6 +476,8 @@ pub(crate) fn add_log_action(game: &mut Game, item: Action) {
|
||||||
game.aggressor_eligibility_from.map(|from| from.min(next));
|
game.aggressor_eligibility_from.map(|from| from.min(next));
|
||||||
game.provinces_from = game.provinces_from.map(|from| from.min(next));
|
game.provinces_from = game.provinces_from.map(|from| from.min(next));
|
||||||
game.barbarian_movement_from = game.barbarian_movement_from.map(|from| from.min(next));
|
game.barbarian_movement_from = game.barbarian_movement_from.map(|from| from.min(next));
|
||||||
|
game.wonderful_eligibility_from =
|
||||||
|
game.wonderful_eligibility_from.map(|from| from.min(next));
|
||||||
}
|
}
|
||||||
let l = &mut current_turn_log_mut(game).actions;
|
let l = &mut current_turn_log_mut(game).actions;
|
||||||
remove_redo_actions(l, i);
|
remove_redo_actions(l, i);
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,8 @@ pub struct ReplayGameData {
|
||||||
provinces_from: Option<usize>,
|
provinces_from: Option<usize>,
|
||||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||||
barbarian_movement_from: Option<usize>,
|
barbarian_movement_from: Option<usize>,
|
||||||
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||||
|
wonderful_eligibility_from: Option<usize>,
|
||||||
#[serde(default, skip_serializing_if = "crate::map::HomeLayout::is_legacy")]
|
#[serde(default, skip_serializing_if = "crate::map::HomeLayout::is_legacy")]
|
||||||
home_layout: crate::map::HomeLayout,
|
home_layout: crate::map::HomeLayout,
|
||||||
log: Vec<ActionLogAge>,
|
log: Vec<ActionLogAge>,
|
||||||
|
|
@ -158,6 +160,10 @@ pub fn replay(data: ReplayGameData, to: Option<usize>) -> Result<Game, String> {
|
||||||
data.barbarian_movement_from
|
data.barbarian_movement_from
|
||||||
.unwrap_or(actions.len().saturating_add(1)),
|
.unwrap_or(actions.len().saturating_add(1)),
|
||||||
);
|
);
|
||||||
|
game.wonderful_eligibility_from = Some(
|
||||||
|
data.wonderful_eligibility_from
|
||||||
|
.unwrap_or(actions.len().saturating_add(1)),
|
||||||
|
);
|
||||||
if data.options.civilization == CivSetupOption::DraftThree {
|
if data.options.civilization == CivSetupOption::DraftThree {
|
||||||
// Draft locks are private and absent from the action log; setup turns
|
// Draft locks are private and absent from the action log; setup turns
|
||||||
// record their final choices. Re-deal before locking to preserve the RNG.
|
// record their final choices. Re-deal before locking to preserve the RNG.
|
||||||
|
|
@ -236,6 +242,9 @@ pub fn replay(data: ReplayGameData, to: Option<usize>) -> Result<Game, String> {
|
||||||
game.barbarian_movement_from = game
|
game.barbarian_movement_from = game
|
||||||
.barbarian_movement_from
|
.barbarian_movement_from
|
||||||
.map(|from| from.min(to.saturating_add(1)));
|
.map(|from| from.min(to.saturating_add(1)));
|
||||||
|
game.wonderful_eligibility_from = game
|
||||||
|
.wonderful_eligibility_from
|
||||||
|
.map(|from| from.min(to.saturating_add(1)));
|
||||||
for player in data.players {
|
for player in data.players {
|
||||||
game.players[player.id].settings = player.settings;
|
game.players[player.id].settings = player.settings;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ use crate::movement::execute_movement_action;
|
||||||
use json_patch::{PatchOperation, patch};
|
use json_patch::{PatchOperation, patch};
|
||||||
use serde_json::Value;
|
use serde_json::Value;
|
||||||
|
|
||||||
const IGNORE_PATHS: [&str; 13] = [
|
const IGNORE_PATHS: [&str; 14] = [
|
||||||
"/calendar_knowledge",
|
"/calendar_knowledge",
|
||||||
"/log/",
|
"/log/",
|
||||||
"/log_index",
|
"/log_index",
|
||||||
|
|
@ -22,6 +22,7 @@ const IGNORE_PATHS: [&str; 13] = [
|
||||||
"/aggressor_eligibility_from",
|
"/aggressor_eligibility_from",
|
||||||
"/provinces_from",
|
"/provinces_from",
|
||||||
"/barbarian_movement_from",
|
"/barbarian_movement_from",
|
||||||
|
"/wonderful_eligibility_from",
|
||||||
];
|
];
|
||||||
|
|
||||||
pub(crate) fn clean_patch(mut patch: Vec<PatchOperation>) -> Vec<PatchOperation> {
|
pub(crate) fn clean_patch(mut patch: Vec<PatchOperation>) -> Vec<PatchOperation> {
|
||||||
|
|
|
||||||
|
|
@ -156,6 +156,30 @@ fn independent_barbarian_movement_boundary_survives_full_partial_and_new_history
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn independent_wonderful_boundary_survives_full_partial_and_new_history_replay() {
|
||||||
|
let fixture = fixture();
|
||||||
|
let before = fixture["before"].as_u64().unwrap() as usize;
|
||||||
|
for boundary in [0, before, before + 4] {
|
||||||
|
let mut history = fixture["history"].clone();
|
||||||
|
history["wonderful_eligibility_from"] = json!(boundary);
|
||||||
|
let partial = replay(
|
||||||
|
serde_json::from_value(history.clone()).unwrap(),
|
||||||
|
Some(before),
|
||||||
|
)
|
||||||
|
.unwrap();
|
||||||
|
assert_eq!(
|
||||||
|
partial.wonderful_eligibility_from,
|
||||||
|
Some(boundary.min(before + 1))
|
||||||
|
);
|
||||||
|
let full = replay(serde_json::from_value(history).unwrap(), None).unwrap();
|
||||||
|
assert_eq!(full.wonderful_eligibility_from, Some(boundary));
|
||||||
|
let saved = serde_json::to_value(full.cloned_data()).unwrap();
|
||||||
|
let replayed = replay(serde_json::from_value(saved).unwrap(), None).unwrap();
|
||||||
|
assert_eq!(replayed.wonderful_eligibility_from, Some(boundary));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn architect_redo_keeps_recorded_cost_policy_but_replacing_future_charges() {
|
fn architect_redo_keeps_recorded_cost_policy_but_replacing_future_charges() {
|
||||||
let fixture = fixture();
|
let fixture = fixture();
|
||||||
|
|
|
||||||
|
|
@ -167,6 +167,12 @@ fn clean_json(expected: &str) -> String {
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.remove("barbarian_movement_from");
|
.remove("barbarian_movement_from");
|
||||||
}
|
}
|
||||||
|
if value["wonderful_eligibility_from"] == serde_json::json!(usize::MAX) {
|
||||||
|
value
|
||||||
|
.as_object_mut()
|
||||||
|
.unwrap()
|
||||||
|
.remove("wonderful_eligibility_from");
|
||||||
|
}
|
||||||
// Only public action-log items qualify, never arbitrary arrays or game state.
|
// Only public action-log items qualify, never arbitrary arrays or game state.
|
||||||
if let Some(ages) = value
|
if let Some(ages) = value
|
||||||
.get_mut("log")
|
.get_mut("log")
|
||||||
|
|
@ -508,6 +514,9 @@ pub fn load_game(path: &GamePath) -> Game {
|
||||||
if game.barbarian_movement_from.is_none() {
|
if game.barbarian_movement_from.is_none() {
|
||||||
game.barbarian_movement_from = Some(usize::MAX);
|
game.barbarian_movement_from = Some(usize::MAX);
|
||||||
}
|
}
|
||||||
|
if game.wonderful_eligibility_from.is_none() {
|
||||||
|
game.wonderful_eligibility_from = Some(usize::MAX);
|
||||||
|
}
|
||||||
if update_expected() {
|
if update_expected() {
|
||||||
write_result(&to_json(&game), path);
|
write_result(&to_json(&game), path);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@
|
||||||
"aggressor_eligibility_from": 0,
|
"aggressor_eligibility_from": 0,
|
||||||
"provinces_from": 0,
|
"provinces_from": 0,
|
||||||
"barbarian_movement_from": 0,
|
"barbarian_movement_from": 0,
|
||||||
|
"wonderful_eligibility_from": 0,
|
||||||
"home_layout": "ClockwiseV1",
|
"home_layout": "ClockwiseV1",
|
||||||
"state": "ChooseCivilization",
|
"state": "ChooseCivilization",
|
||||||
"players": [
|
"players": [
|
||||||
|
|
|
||||||
|
|
@ -1915,3 +1915,25 @@ definitions, artwork 4, all 60 named assets, gallery, Standard options,
|
||||||
settings, and preferences. Only the artwork manifest's lockfile integrity pin
|
settings, and preferences. Only the artwork manifest's lockfile integrity pin
|
||||||
changes; no artwork is republished and no production moves, repairs, backfills,
|
changes; no artwork is republished and no production moves, repairs, backfills,
|
||||||
or historical rewrites are performed.
|
or historical rewrites are performed.
|
||||||
|
|
||||||
|
# Viewer 0.1.245 / engine 0.4.175 — Wonderful objective and queued response recovery
|
||||||
|
|
||||||
|
Engine objective `Wonderful` (`O32`, internal `"Magnificent Culture"`) now uses
|
||||||
|
an independent `wonderful_eligibility_from` rule boundary so new and upgraded
|
||||||
|
games evaluate the Status Phase across the whole current Age (excluding undone
|
||||||
|
redo-buffer entries) and allow immediate completion whenever the constructing
|
||||||
|
player is the sole Wonder builder in the game, while preserving legacy replay
|
||||||
|
determinism. All 17 viewer localization catalogs are updated to match `"this Age"`.
|
||||||
|
The viewer controller records pending decision identity on queued `Response`
|
||||||
|
outbox entries and safely re-submits a matching user response (such as
|
||||||
|
Metallurgy after Collect or Free Economy Collect) across an outbox prediction
|
||||||
|
mismatch instead of dropping it and reopening the popup, while discarding queued
|
||||||
|
responses whenever the authoritative state presents a different decision or no
|
||||||
|
matching prompt.
|
||||||
|
|
||||||
|
Require exact-commit Check and Web viewer CI green before publishing the frozen
|
||||||
|
viewer `0.1.245` and engine `0.4.175` together. Preserve catalog 8 / 46
|
||||||
|
definitions, artwork 4, all 60 named assets, gallery, Standard options,
|
||||||
|
settings, and preferences. Only the artwork manifest's lockfile integrity pin
|
||||||
|
changes; no artwork is republished and no production moves, repairs, backfills,
|
||||||
|
or historical rewrites are performed.
|
||||||
|
|
|
||||||
4
web-client/package-lock.json
generated
4
web-client/package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "@boardgamers/clash-web-client",
|
"name": "@boardgamers/clash-web-client",
|
||||||
"version": "0.1.244",
|
"version": "0.1.245",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@boardgamers/clash-web-client",
|
"name": "@boardgamers/clash-web-client",
|
||||||
"version": "0.1.244",
|
"version": "0.1.245",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@boardgamers/protocol": "0.11.0",
|
"@boardgamers/protocol": "0.11.0",
|
||||||
"lucide-svelte": "^0.577.0",
|
"lucide-svelte": "^0.577.0",
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
{
|
{
|
||||||
"name": "@boardgamers/clash-web-client",
|
"name": "@boardgamers/clash-web-client",
|
||||||
"version": "0.1.244",
|
"version": "0.1.245",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite --host 127.0.0.1 --port 8643",
|
"dev": "vite --host 127.0.0.1 --port 8643",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
"check": "svelte-check --tsconfig ./tsconfig.json",
|
"check": "svelte-check --tsconfig ./tsconfig.json",
|
||||||
"test": "node --experimental-strip-types --test src/*.test.ts && node --test scripts/publish-gallery.test.mjs scripts/boarding.test.mjs scripts/raiders.test.mjs && npm run test:achievement-assets && npm run test:locales && node scripts/exhausted-movement-check.mjs && CLASH_WASM=\"$PWD/.engine/server.js\" node --test ../scripts/status-phase-battle.test.cjs ../scripts/postcombat-queue.test.cjs ../scripts/tributes.test.cjs ../scripts/withdrawal.test.cjs ../scripts/viking-cargo.test.cjs ../scripts/aggressor.test.cjs ../scripts/great-architect.test.cjs ../scripts/provinces.test.cjs ../scripts/barbarian-movement.test.cjs ../scripts/disembark-stack-limit.test.cjs",
|
"test": "node --experimental-strip-types --test src/*.test.ts && node --test scripts/publish-gallery.test.mjs scripts/boarding.test.mjs scripts/raiders.test.mjs && npm run test:achievement-assets && npm run test:locales && node scripts/exhausted-movement-check.mjs && CLASH_WASM=\"$PWD/.engine/server.js\" node --test ../scripts/status-phase-battle.test.cjs ../scripts/postcombat-queue.test.cjs ../scripts/tributes.test.cjs ../scripts/withdrawal.test.cjs ../scripts/viking-cargo.test.cjs ../scripts/aggressor.test.cjs ../scripts/great-architect.test.cjs ../scripts/provinces.test.cjs ../scripts/barbarian-movement.test.cjs ../scripts/disembark-stack-limit.test.cjs ../scripts/wonderful-objective.test.cjs",
|
||||||
"test:boarding": "npm run build:bridge && npm run build && node --test scripts/boarding.test.mjs && node scripts/boarding-smoke.mjs",
|
"test:boarding": "npm run build:bridge && npm run build && node --test scripts/boarding.test.mjs && node scripts/boarding-smoke.mjs",
|
||||||
"test:home-orientation": "npm run build && node scripts/home-orientation-smoke.mjs",
|
"test:home-orientation": "npm run build && node scripts/home-orientation-smoke.mjs",
|
||||||
"build:achievement-assets": "node scripts/build-achievement-assets.mjs",
|
"build:achievement-assets": "node scripts/build-achievement-assets.mjs",
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
"web-client/src/civilization-emblems.ts": "01b0cbf3fa77a8466532ccd73d63c1a3ddc9bbc79fc06ce7224b425322a9c9f0",
|
"web-client/src/civilization-emblems.ts": "01b0cbf3fa77a8466532ccd73d63c1a3ddc9bbc79fc06ce7224b425322a9c9f0",
|
||||||
"web-client/src/civilization-flags.ts": "cd176076bfe05b3059093b80c88596b7ae46b77898695c6c7406cbe1a3a0f78b",
|
"web-client/src/civilization-flags.ts": "cd176076bfe05b3059093b80c88596b7ae46b77898695c6c7406cbe1a3a0f78b",
|
||||||
"server/src/content/civilizations.rs": "73602f3db506f3dc2dbc6de43d01179440fd3bb034c997ff209336faaef2a332",
|
"server/src/content/civilizations.rs": "73602f3db506f3dc2dbc6de43d01179440fd3bb034c997ff209336faaef2a332",
|
||||||
"web-client/package-lock.json": "02c9700cbef1545cc838e876e6317bdf8dae8a9ec95ec3e726c2136bd213ad69",
|
"web-client/package-lock.json": "c12575ead2355a7b6f82d47e22674695dc926544416a68f1a2cd1c01a0d26aa4",
|
||||||
"web-client/node_modules/lucide-svelte/dist/Icon.svelte": "f7b49ab842c143fa680fa8bd9a54a9efdc48c2e2d49fa574bd5ccf8f6cfca5be",
|
"web-client/node_modules/lucide-svelte/dist/Icon.svelte": "f7b49ab842c143fa680fa8bd9a54a9efdc48c2e2d49fa574bd5ccf8f6cfca5be",
|
||||||
"web-client/node_modules/lucide-svelte/dist/defaultAttributes.js": "5b8981c6e3434ae6538716af9e0403554e7708c4087f18d060950a7bef00d96a",
|
"web-client/node_modules/lucide-svelte/dist/defaultAttributes.js": "5b8981c6e3434ae6538716af9e0403554e7708c4087f18d060950a7bef00d96a",
|
||||||
"web-client/node_modules/lucide-svelte/LICENSE": "668dcc52803480e0a026b31140a4cae668772663cd764e5991d252eef03f98db"
|
"web-client/node_modules/lucide-svelte/LICENSE": "668dcc52803480e0a026b31140a4cae668772663cd764e5991d252eef03f98db"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@boardgamers/clash-server",
|
"name": "@boardgamers/clash-server",
|
||||||
"version": "0.4.174",
|
"version": "0.4.175",
|
||||||
"description": "Clash of Cultures: Monumental edition engine for Boardgamers Space",
|
"description": "Clash of Cultures: Monumental edition engine for Boardgamers Space",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
|
|
|
||||||
|
|
@ -3394,3 +3394,187 @@ test('Great Arena auto-pays single-option Free Economy and Arts quotes and keeps
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function metallurgyCollectSetup(freeEconomy = false) {
|
||||||
|
const game = JSON.parse(fixture('base/new_game'));
|
||||||
|
game.state = 'Playing';
|
||||||
|
game.current_player_index = 0;
|
||||||
|
game.starting_player_index = 0;
|
||||||
|
game.actions_left = 3;
|
||||||
|
game.players[0].civilization = 'Rome';
|
||||||
|
game.players[1].civilization = 'Greece';
|
||||||
|
const cityPos = game.players[0].cities[0].position;
|
||||||
|
game.players[0].cities[0].size = 2;
|
||||||
|
game.players[0].cities[0].mood_state = 'Happy';
|
||||||
|
game.players[0].advances = ['Farming', 'Mining', 'Metallurgy', ...(freeEconomy ? ['FreeEconomy'] : [])];
|
||||||
|
game.players[0].resources = { food: 2, wood: 2, ore: 0, ideas: 0, gold: 0, mood_tokens: freeEconomy ? 1 : 0, culture_tokens: 0 };
|
||||||
|
game.map.tiles = game.map.tiles.map(([pos, terrain]: [string, string]) => [
|
||||||
|
pos,
|
||||||
|
pos === cityPos ? terrain : 'Mountain',
|
||||||
|
]);
|
||||||
|
return JSON.stringify(game);
|
||||||
|
}
|
||||||
|
|
||||||
|
test('Metallurgy queued Response survives outbox prediction mismatch on Collect and Free Economy Collect', async () => {
|
||||||
|
// 1. Normal Collect >= 2 ore with Metallurgy
|
||||||
|
{
|
||||||
|
const app = paymentController(),
|
||||||
|
c = app.controller;
|
||||||
|
try {
|
||||||
|
let raw = metallurgyCollectSetup(false);
|
||||||
|
c.setPlayer(0);
|
||||||
|
await c.load(engine.stripSecret(raw, 0));
|
||||||
|
c.beginCollect(app.session().view!.cities[0].position);
|
||||||
|
const oreChoices = app
|
||||||
|
.session()
|
||||||
|
.view!.cities[0].choices.filter((ch) => (ch.pile.ore ?? 0) >= 1)
|
||||||
|
.slice(0, 2);
|
||||||
|
assert.equal(oreChoices.length, 2, 'expected two ore tiles adjacent to capital');
|
||||||
|
for (const ch of oreChoices) c.toggleChoice(ch);
|
||||||
|
c.collect();
|
||||||
|
assert.equal(app.sent.length, 1);
|
||||||
|
assert.match(app.session().view!.choiceDecision?.name ?? '', /convert 1 ore to 1 gold/i);
|
||||||
|
// User clicks Metallurgy "Yes" ({ Response: { Bool: true } }) while Collect is still in flight.
|
||||||
|
const convert = app.session().view!.choiceDecision!.choices.find(
|
||||||
|
(ch) => JSON.stringify(ch.action) === JSON.stringify({ Response: { Bool: true } }),
|
||||||
|
)!;
|
||||||
|
assert.ok(convert);
|
||||||
|
c.submit(convert.action);
|
||||||
|
assert.equal(app.sent.length, 1, 'Response waits behind in-flight Collect');
|
||||||
|
assert.equal(app.session().view!.choiceDecision ?? null, null, 'Metallurgy popup closed locally');
|
||||||
|
|
||||||
|
// Server confirms Collect, but with a mismatched fingerprint while Metallurgy is still pending.
|
||||||
|
raw = engine.tryMove(raw, app.sent[0], 0);
|
||||||
|
const mismatched = JSON.parse(raw);
|
||||||
|
mismatched.players[1].resources.food = (mismatched.players[1].resources.food ?? 0) + 1;
|
||||||
|
raw = JSON.stringify(mismatched);
|
||||||
|
await c.load(engine.stripSecret(raw, 0));
|
||||||
|
|
||||||
|
assert.equal(app.sent.length, 2, 'queued Metallurgy Response must be automatically re-submitted');
|
||||||
|
assert.deepEqual(JSON.parse(app.sent[1]), { Response: { Bool: true } });
|
||||||
|
assert.equal(app.session().view!.choiceDecision ?? null, null, 'Metallurgy popup must not reopen');
|
||||||
|
|
||||||
|
// Server confirms the Metallurgy Response.
|
||||||
|
raw = engine.tryMove(raw, app.sent[1], 0);
|
||||||
|
await c.load(engine.stripSecret(raw, 0));
|
||||||
|
assert.equal(app.session().view!.choiceDecision ?? null, null);
|
||||||
|
assert.ok((app.session().game!.players[0].resources?.gold ?? 0) >= 1);
|
||||||
|
} finally {
|
||||||
|
app.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. Free Economy Collect >= 2 ore with Metallurgy
|
||||||
|
{
|
||||||
|
const app = paymentController(),
|
||||||
|
c = app.controller;
|
||||||
|
try {
|
||||||
|
let raw = metallurgyCollectSetup(true);
|
||||||
|
c.setPlayer(0);
|
||||||
|
await c.load(engine.stripSecret(raw, 0));
|
||||||
|
const freeOffer = app.session().view!.collectActions!.find((a) => a.free)!;
|
||||||
|
assert.ok(freeOffer);
|
||||||
|
c.beginCollect(app.session().view!.cities[0].position);
|
||||||
|
c.switchCollectVariant(freeOffer.value);
|
||||||
|
const oreChoices = app
|
||||||
|
.session()
|
||||||
|
.view!.cities[0].choices.filter((ch) => (ch.pile.ore ?? 0) >= 1)
|
||||||
|
.slice(0, 2);
|
||||||
|
for (const ch of oreChoices) c.toggleChoice(ch);
|
||||||
|
c.collect();
|
||||||
|
assert.equal(app.sent.length, 1);
|
||||||
|
// Local prediction auto-paid the Free Economy fee and landed on Metallurgy.
|
||||||
|
assert.match(app.session().view!.choiceDecision?.name ?? '', /convert 1 ore to 1 gold/i);
|
||||||
|
c.submit({ Response: { Bool: true } });
|
||||||
|
assert.equal(app.sent.length, 1);
|
||||||
|
assert.equal(app.session().view!.choiceDecision ?? null, null);
|
||||||
|
|
||||||
|
// Server confirms Free Economy Collect with a mismatched fingerprint (Pay for action pending).
|
||||||
|
raw = engine.tryMove(raw, app.sent[0], 0);
|
||||||
|
const mismatched = JSON.parse(raw);
|
||||||
|
mismatched.players[1].resources.food = (mismatched.players[1].resources.food ?? 0) + 1;
|
||||||
|
raw = JSON.stringify(mismatched);
|
||||||
|
await c.load(engine.stripSecret(raw, 0));
|
||||||
|
|
||||||
|
// Automatic payment for Free Economy is sent first, and Metallurgy stays answered (popup stays closed).
|
||||||
|
assert.equal(app.sent.length, 2);
|
||||||
|
assert.deepEqual(JSON.parse(app.sent[1]), { Response: { Payment: [{ mood_tokens: 1 }] } });
|
||||||
|
assert.equal(app.session().view!.choiceDecision ?? null, null, 'Metallurgy popup must not reopen');
|
||||||
|
|
||||||
|
// Server confirms the Free Economy payment -> queued Metallurgy Response is sent next.
|
||||||
|
raw = engine.tryMove(raw, app.sent[1], 0);
|
||||||
|
await c.load(engine.stripSecret(raw, 0));
|
||||||
|
assert.equal(app.sent.length, 3);
|
||||||
|
assert.deepEqual(JSON.parse(app.sent[2]), { Response: { Bool: true } });
|
||||||
|
assert.equal(app.session().view!.choiceDecision ?? null, null);
|
||||||
|
} finally {
|
||||||
|
app.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
test('queued Response is discarded on outbox mismatch when server has a different decision or no prompt', async () => {
|
||||||
|
// 1. No pending decision / opponent turn
|
||||||
|
{
|
||||||
|
const app = paymentController(),
|
||||||
|
c = app.controller;
|
||||||
|
try {
|
||||||
|
const raw = metallurgyCollectSetup(false);
|
||||||
|
c.setPlayer(0);
|
||||||
|
await c.load(engine.stripSecret(raw, 0));
|
||||||
|
c.beginCollect(app.session().view!.cities[0].position);
|
||||||
|
const oreChoices = app
|
||||||
|
.session()
|
||||||
|
.view!.cities[0].choices.filter((ch) => (ch.pile.ore ?? 0) >= 1)
|
||||||
|
.slice(0, 2);
|
||||||
|
for (const ch of oreChoices) c.toggleChoice(ch);
|
||||||
|
c.collect();
|
||||||
|
assert.match(app.session().view!.choiceDecision?.name ?? '', /convert 1 ore to 1 gold/i);
|
||||||
|
c.submit({ Response: { Bool: true } });
|
||||||
|
assert.equal(app.sent.length, 1);
|
||||||
|
|
||||||
|
// Authoritative state has moved to opponent's turn with no pending prompt.
|
||||||
|
const opponentTurn = JSON.parse(raw);
|
||||||
|
opponentTurn.current_player_index = 1;
|
||||||
|
await c.load(engine.stripSecret(JSON.stringify(opponentTurn), 0));
|
||||||
|
assert.equal(app.sent.length, 1, 'must NOT submit queued Response on opponent turn / no prompt');
|
||||||
|
} finally {
|
||||||
|
app.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. Different pending decision (same player, but Pay for action instead of Metallurgy)
|
||||||
|
{
|
||||||
|
const app = paymentController(),
|
||||||
|
c = app.controller;
|
||||||
|
try {
|
||||||
|
const raw = metallurgyCollectSetup(true);
|
||||||
|
c.setPlayer(0);
|
||||||
|
await c.load(engine.stripSecret(raw, 0));
|
||||||
|
c.beginCollect(app.session().view!.cities[0].position);
|
||||||
|
// Use normal Collect (not Free Economy) so local prediction lands on Metallurgy.
|
||||||
|
const normalOffer = app.session().view!.collectActions!.find((a) => !a.free)!;
|
||||||
|
c.switchCollectVariant(normalOffer.value);
|
||||||
|
const oreChoices = app
|
||||||
|
.session()
|
||||||
|
.view!.cities[0].choices.filter((ch) => (ch.pile.ore ?? 0) >= 1)
|
||||||
|
.slice(0, 2);
|
||||||
|
for (const ch of oreChoices) c.toggleChoice(ch);
|
||||||
|
c.collect();
|
||||||
|
assert.match(app.session().view!.choiceDecision?.name ?? '', /convert 1 ore to 1 gold/i);
|
||||||
|
c.submit({ Response: { Bool: true } });
|
||||||
|
assert.equal(app.sent.length, 1);
|
||||||
|
|
||||||
|
// Authoritative state instead presents a Free Economy payment decision (different prompt).
|
||||||
|
const freeOffer = JSON.parse(engine.webView(raw, 0)).collectActions.find((a: { free?: boolean }) => a.free);
|
||||||
|
const altCollect = structuredClone(JSON.parse(app.sent[0]));
|
||||||
|
altCollect.Playing.Collect.action_type = freeOffer.value;
|
||||||
|
const diffDecisionRaw = engine.tryMove(raw, JSON.stringify(altCollect), 0);
|
||||||
|
await c.load(engine.stripSecret(diffDecisionRaw, 0));
|
||||||
|
assert.equal(app.sent.length, 1, 'must NOT submit queued Metallurgy Response to a different decision');
|
||||||
|
assert.equal(app.session().view!.decision?.name, 'Pay for action');
|
||||||
|
} finally {
|
||||||
|
app.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
|
||||||
|
|
@ -134,6 +134,7 @@ export class Controller {
|
||||||
print: string | null;
|
print: string | null;
|
||||||
announced: boolean;
|
announced: boolean;
|
||||||
continuation?: { actionPayment?: Pile; influenceRangePayment?: Pile; freeEducation?: Pile };
|
continuation?: { actionPayment?: Pile; influenceRangePayment?: Pile; freeEducation?: Pile };
|
||||||
|
responseDecision?: string;
|
||||||
}[] = [];
|
}[] = [];
|
||||||
private predictions: boolean;
|
private predictions: boolean;
|
||||||
private moveAnnounced = false;
|
private moveAnnounced = false;
|
||||||
|
|
@ -371,13 +372,94 @@ export class Controller {
|
||||||
// The server disagrees with the prediction (or another player moved first).
|
// The server disagrees with the prediction (or another player moved first).
|
||||||
// Rewind to the last confirmed position quietly, then show the server's state
|
// Rewind to the last confirmed position quietly, then show the server's state
|
||||||
// as a regular update so new draws, battles and recap effects are reported.
|
// as a regular update so new draws, battles and recap effects are reported.
|
||||||
|
const tail = this.outbox.slice(1);
|
||||||
this.outbox = [];
|
this.outbox = [];
|
||||||
if (this.raw !== base) this.apply(base, { quiet: true });
|
if (this.raw !== base) this.apply(base, { quiet: true });
|
||||||
this.restoreContinuation(head.continuation);
|
this.restoreContinuation(head.continuation);
|
||||||
this.apply(raw, { continuing: !!head.continuation });
|
this.apply(raw, { continuing: !!head.continuation });
|
||||||
|
// If the user already answered a pending prompt (e.g. Metallurgy) while an
|
||||||
|
// earlier move was in flight and the authoritative state still presents the
|
||||||
|
// exact same prompt for the same player, re-submit their Response cleanly
|
||||||
|
// instead of dropping it and reopening the popup.
|
||||||
|
const recovered =
|
||||||
|
this.outbox.length === 1 &&
|
||||||
|
tail[0] &&
|
||||||
|
JSON.stringify(tail[0].move) === JSON.stringify(this.outbox[0].move)
|
||||||
|
? tail[1]
|
||||||
|
: this.outbox.length === 0
|
||||||
|
? tail[0]
|
||||||
|
: undefined;
|
||||||
|
const after = get(this.session);
|
||||||
|
if (
|
||||||
|
recovered?.responseDecision &&
|
||||||
|
!after.error &&
|
||||||
|
recovered.responseDecision === this.pendingDecisionKey(after.view, after.seat) &&
|
||||||
|
this.canSubmitRecoveredResponse(recovered.move, after)
|
||||||
|
) {
|
||||||
|
this.submit(recovered.move);
|
||||||
|
}
|
||||||
if (!get(this.session).automaticPayment && !this.outbox.length) this.notify('Game updated.');
|
if (!get(this.session).automaticPayment && !this.outbox.length) this.notify('Game updated.');
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
private pendingDecisionKey(view: View | null | undefined, seat: number | undefined): string | undefined {
|
||||||
|
if (seat === undefined || !view || !(view.activePlayers ?? [view.activePlayer]).includes(seat))
|
||||||
|
return undefined;
|
||||||
|
if (view.choiceDecision) {
|
||||||
|
return JSON.stringify({
|
||||||
|
kind: 'choice',
|
||||||
|
seat,
|
||||||
|
name: view.choiceDecision.name,
|
||||||
|
binary: !!view.choiceDecision.binary,
|
||||||
|
choices: view.choiceDecision.choices.map((c) => ({ name: c.name, action: c.action })),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (view.decision) {
|
||||||
|
return JSON.stringify({
|
||||||
|
kind: 'decision',
|
||||||
|
seat,
|
||||||
|
name: view.decision.name,
|
||||||
|
origin: view.decision.origin ?? null,
|
||||||
|
reward: !!view.decision.reward,
|
||||||
|
min: view.decision.min ?? null,
|
||||||
|
max: view.decision.max ?? null,
|
||||||
|
options: view.decision.options.map((o) => ({ value: o.value, name: o.name })),
|
||||||
|
fields: view.decision.fields.map((f) => ({
|
||||||
|
name: f.name,
|
||||||
|
optional: !!f.optional,
|
||||||
|
choices: f.choices ?? null,
|
||||||
|
})),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (view.objectiveDecision) {
|
||||||
|
return JSON.stringify({
|
||||||
|
kind: 'objective',
|
||||||
|
seat,
|
||||||
|
name: view.objectiveDecision.name,
|
||||||
|
cards: view.objectiveDecision.cards.map((c) => c.id),
|
||||||
|
skip: view.objectiveDecision.skip,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (view.explorationDecision) {
|
||||||
|
return JSON.stringify({
|
||||||
|
kind: 'exploration',
|
||||||
|
seat,
|
||||||
|
start: view.explorationDecision.start,
|
||||||
|
destination: view.explorationDecision.destination,
|
||||||
|
choices: view.explorationDecision.choices.map((c) => ({ rotation: c.rotation, action: c.action })),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
private canSubmitRecoveredResponse(move: Move, s: Session): boolean {
|
||||||
|
if (s.pending || s.playback || s.analysis || s.seat === undefined) return false;
|
||||||
|
if (!this.engine?.tryMove || !this.raw) return true;
|
||||||
|
try {
|
||||||
|
this.engine.tryMove(this.raw, JSON.stringify(move), s.seat);
|
||||||
|
return true;
|
||||||
|
} catch {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
private restoreContinuation(continuation?: {
|
private restoreContinuation(continuation?: {
|
||||||
actionPayment?: Pile;
|
actionPayment?: Pile;
|
||||||
influenceRangePayment?: Pile;
|
influenceRangePayment?: Pile;
|
||||||
|
|
@ -1987,8 +2069,18 @@ export class Controller {
|
||||||
...(this.quotedFreeEducation ? { freeEducation: { ...this.quotedFreeEducation } } : {}),
|
...(this.quotedFreeEducation ? { freeEducation: { ...this.quotedFreeEducation } } : {}),
|
||||||
}
|
}
|
||||||
: undefined;
|
: undefined;
|
||||||
|
const responseDecision =
|
||||||
|
typeof move === 'object' && move !== null && 'Response' in move
|
||||||
|
? this.pendingDecisionKey(s.view, s.seat)
|
||||||
|
: undefined;
|
||||||
const predicted = this.predict(move, s);
|
const predicted = this.predict(move, s);
|
||||||
this.outbox.push({ move, print: predicted?.print ?? null, announced: !!predicted, continuation });
|
this.outbox.push({
|
||||||
|
move,
|
||||||
|
print: predicted?.print ?? null,
|
||||||
|
announced: !!predicted,
|
||||||
|
continuation,
|
||||||
|
responseDecision,
|
||||||
|
});
|
||||||
if (this.outbox.length === 1 && !this.sendHead()) return;
|
if (this.outbox.length === 1 && !this.sendHead()) return;
|
||||||
// Show the result immediately. Queries and follow-up moves use the predicted
|
// Show the result immediately. Queries and follow-up moves use the predicted
|
||||||
// state; the host still validates every move and its state stays authoritative.
|
// state; the host still validates every move and its state stays authoritative.
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
"No tactics": "Ingen taktik",
|
"No tactics": "Ingen taktik",
|
||||||
"Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "Vælg en anden spiller. I kan ikke angribe hinanden, medmindre angriberen betaler forsvareren 2 kulturpoletter. Kassér dette kort, hvis en af spillerne angriber den anden. Du kan kassere kortet som en almindelig handling.",
|
"Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "Vælg en anden spiller. I kan ikke angribe hinanden, medmindre angriberen betaler forsvareren 2 kulturpoletter. Kassér dette kort, hvis en af spillerne angriber den anden. Du kan kassere kortet som en almindelig handling.",
|
||||||
"{p0} Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "{p0} Vælg en anden spiller. I kan ikke angribe hinanden, medmindre angriberen betaler forsvareren 2 kulturpoletter. Kassér dette kort, hvis en af spillerne angriber den anden. Du kan kassere kortet som en almindelig handling.",
|
"{p0} Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "{p0} Vælg en anden spiller. I kan ikke angribe hinanden, medmindre angriberen betaler forsvareren 2 kulturpoletter. Kassér dette kort, hvis en af spillerne angriber den anden. Du kan kassere kortet som en almindelig handling.",
|
||||||
"Immediately after constructing the first Wonder in the game, or during the Status Phase if you were the only player to construct Wonders in the last round.": "Straks efter at have bygget spillets første vidunder, eller i statusfasen hvis du var den eneste spiller, der byggede vidundere i sidste runde.",
|
"Immediately after constructing the first Wonder in the game, or during the Status Phase if you were the only player to construct Wonders this Age.": "Straks efter at have bygget spillets første vidunder, eller i statusfasen hvis du var den eneste spiller, der byggede vidundere i denne Tidsalder.",
|
||||||
"Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).": "Umiddelbart efter et slag, hvor du blev angrebet og eliminerede mindst 2 hærenheder (inklusive barbarernes hærenheder).",
|
"Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).": "Umiddelbart efter et slag, hvor du blev angrebet og eliminerede mindst 2 hærenheder (inklusive barbarernes hærenheder).",
|
||||||
"# Arguments": "# Argumenter",
|
"# Arguments": "# Argumenter",
|
||||||
"# Errors": "# Fejl",
|
"# Errors": "# Fejl",
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
"No tactics": "Keine Taktik",
|
"No tactics": "Keine Taktik",
|
||||||
"Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "Wähle einen anderen Spieler. Ihr könnt euch nicht gegenseitig angreifen, es sei denn, der Angreifer zahlt dem Verteidiger 2 Kulturmarker. Lege diese Karte ab, falls ein Spieler den anderen angreift. Du darfst die Karte als reguläre Aktion ablegen.",
|
"Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "Wähle einen anderen Spieler. Ihr könnt euch nicht gegenseitig angreifen, es sei denn, der Angreifer zahlt dem Verteidiger 2 Kulturmarker. Lege diese Karte ab, falls ein Spieler den anderen angreift. Du darfst die Karte als reguläre Aktion ablegen.",
|
||||||
"{p0} Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "{p0} Wähle einen anderen Spieler. Ihr könnt euch nicht gegenseitig angreifen, es sei denn, der Angreifer zahlt dem Verteidiger 2 Kulturmarker. Lege diese Karte ab, falls ein Spieler den anderen angreift. Du darfst die Karte als reguläre Aktion ablegen.",
|
"{p0} Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "{p0} Wähle einen anderen Spieler. Ihr könnt euch nicht gegenseitig angreifen, es sei denn, der Angreifer zahlt dem Verteidiger 2 Kulturmarker. Lege diese Karte ab, falls ein Spieler den anderen angreift. Du darfst die Karte als reguläre Aktion ablegen.",
|
||||||
"Immediately after constructing the first Wonder in the game, or during the Status Phase if you were the only player to construct Wonders in the last round.": "Sofort nach dem Bau des ersten Weltwunders im Spiel oder in der Statusphase, wenn nur du in der letzten Runde Weltwunder gebaut hast.",
|
"Immediately after constructing the first Wonder in the game, or during the Status Phase if you were the only player to construct Wonders this Age.": "Sofort nach dem Bau des ersten Weltwunders im Spiel oder in der Statusphase, wenn nur du in diesem Zeitalter Weltwunder gebaut hast.",
|
||||||
"Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).": "Unmittelbar nach einer Schlacht, in der du angegriffen wurdest und mindestens 2 Armeeeinheiten eliminiert hast (einschließlich Barbarenarmeeeinheiten).",
|
"Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).": "Unmittelbar nach einer Schlacht, in der du angegriffen wurdest und mindestens 2 Armeeeinheiten eliminiert hast (einschließlich Barbarenarmeeeinheiten).",
|
||||||
"# Arguments": "# Argumente",
|
"# Arguments": "# Argumente",
|
||||||
"# Errors": "# Fehler",
|
"# Errors": "# Fehler",
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
"No tactics": "Χωρίς τακτική",
|
"No tactics": "Χωρίς τακτική",
|
||||||
"Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "Επίλεξε άλλον παίκτη. Δεν μπορείτε να επιτεθείτε ο ένας στον άλλον, εκτός αν ο επιτιθέμενος πληρώσει στον αμυνόμενο 2 μάρκες πολιτισμού. Απόρριψε αυτή την κάρτα αν κάποιος παίκτης επιτεθεί στον άλλον. Μπορείς να απορρίψεις την κάρτα ως κανονική ενέργεια.",
|
"Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "Επίλεξε άλλον παίκτη. Δεν μπορείτε να επιτεθείτε ο ένας στον άλλον, εκτός αν ο επιτιθέμενος πληρώσει στον αμυνόμενο 2 μάρκες πολιτισμού. Απόρριψε αυτή την κάρτα αν κάποιος παίκτης επιτεθεί στον άλλον. Μπορείς να απορρίψεις την κάρτα ως κανονική ενέργεια.",
|
||||||
"{p0} Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "{p0} Επίλεξε άλλον παίκτη. Δεν μπορείτε να επιτεθείτε ο ένας στον άλλον, εκτός αν ο επιτιθέμενος πληρώσει στον αμυνόμενο 2 μάρκες πολιτισμού. Απόρριψε αυτή την κάρτα αν κάποιος παίκτης επιτεθεί στον άλλον. Μπορείς να απορρίψεις την κάρτα ως κανονική ενέργεια.",
|
"{p0} Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "{p0} Επίλεξε άλλον παίκτη. Δεν μπορείτε να επιτεθείτε ο ένας στον άλλον, εκτός αν ο επιτιθέμενος πληρώσει στον αμυνόμενο 2 μάρκες πολιτισμού. Απόρριψε αυτή την κάρτα αν κάποιος παίκτης επιτεθεί στον άλλον. Μπορείς να απορρίψεις την κάρτα ως κανονική ενέργεια.",
|
||||||
"Immediately after constructing the first Wonder in the game, or during the Status Phase if you were the only player to construct Wonders in the last round.": "Αμέσως μετά την κατασκευή του πρώτου Θαύματος στο παιχνίδι, ή στη Φάση Κατάστασης αν ήσουν ο μόνος παίκτης που κατασκεύασε Θαύματα στον τελευταίο γύρο.",
|
"Immediately after constructing the first Wonder in the game, or during the Status Phase if you were the only player to construct Wonders this Age.": "Αμέσως μετά την κατασκευή του πρώτου Θαύματος στο παιχνίδι, ή στη Φάση Κατάστασης αν ήσουν ο μόνος παίκτης που κατασκεύασε Θαύματα αυτή την Εποχή.",
|
||||||
"Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).": "Αμέσως μετά από μάχη στην οποία δεχτήκατε επίθεση και εξοντώσατε τουλάχιστον 2 στρατιωτικές μονάδες (συμπεριλαμβανομένων των βαρβαρικών μονάδων).",
|
"Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).": "Αμέσως μετά από μάχη στην οποία δεχτήκατε επίθεση και εξοντώσατε τουλάχιστον 2 στρατιωτικές μονάδες (συμπεριλαμβανομένων των βαρβαρικών μονάδων).",
|
||||||
"# Arguments": "# Ορίσματα",
|
"# Arguments": "# Ορίσματα",
|
||||||
"# Errors": "# Σφάλματα",
|
"# Errors": "# Σφάλματα",
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
"No tactics": "No tactics",
|
"No tactics": "No tactics",
|
||||||
"Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.",
|
"Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.",
|
||||||
"{p0} Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "{p0} Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.",
|
"{p0} Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "{p0} Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.",
|
||||||
"Immediately after constructing the first Wonder in the game, or during the Status Phase if you were the only player to construct Wonders in the last round.": "Immediately after constructing the first Wonder in the game, or during the Status Phase if you were the only player to construct Wonders in the last round.",
|
"Immediately after constructing the first Wonder in the game, or during the Status Phase if you were the only player to construct Wonders this Age.": "Immediately after constructing the first Wonder in the game, or during the Status Phase if you were the only player to construct Wonders this Age.",
|
||||||
"Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).": "Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).",
|
"Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).": "Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).",
|
||||||
"_blank": "_blank",
|
"_blank": "_blank",
|
||||||
"_tokens": "_tokens",
|
"_tokens": "_tokens",
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
"No tactics": "بدون تاکتیک",
|
"No tactics": "بدون تاکتیک",
|
||||||
"Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "بازیکن دیگری انتخاب کنید. مگر با پرداخت ۲ نشان فرهنگ از مهاجم به مدافع، به هم حمله نمیکنید. اگر یکی حمله کرد، این کارت را دور بیندازید. میتوانید با اقدام عادی هم کارت را دور بیندازید.",
|
"Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "بازیکن دیگری انتخاب کنید. مگر با پرداخت ۲ نشان فرهنگ از مهاجم به مدافع، به هم حمله نمیکنید. اگر یکی حمله کرد، این کارت را دور بیندازید. میتوانید با اقدام عادی هم کارت را دور بیندازید.",
|
||||||
"{p0} Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "{p0} بازیکن دیگری انتخاب کنید. مگر با پرداخت ۲ نشان فرهنگ از مهاجم به مدافع، به هم حمله نمیکنید. اگر یکی حمله کرد، این کارت را دور بیندازید. میتوانید با اقدام عادی هم کارت را دور بیندازید.",
|
"{p0} Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "{p0} بازیکن دیگری انتخاب کنید. مگر با پرداخت ۲ نشان فرهنگ از مهاجم به مدافع، به هم حمله نمیکنید. اگر یکی حمله کرد، این کارت را دور بیندازید. میتوانید با اقدام عادی هم کارت را دور بیندازید.",
|
||||||
"Immediately after constructing the first Wonder in the game, or during the Status Phase if you were the only player to construct Wonders in the last round.": "بلافاصله پس از ساخت نخستین شگفتی بازی، یا در مرحله وضعیت اگر تنها بازیکنی بودید که در دور گذشته شگفتی ساخته است.",
|
"Immediately after constructing the first Wonder in the game, or during the Status Phase if you were the only player to construct Wonders this Age.": "بلافاصله پس از ساخت نخستین شگفتی بازی، یا در مرحله وضعیت اگر تنها بازیکنی بودید که در این عصر شگفتی ساخته است.",
|
||||||
"Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).": "بلافاصله پس از نبردی که در آن به شما حمله شده و دستکم ۲ واحد نظامی را نابود کردهاید (از جمله واحدهای نظامی بربر).",
|
"Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).": "بلافاصله پس از نبردی که در آن به شما حمله شده و دستکم ۲ واحد نظامی را نابود کردهاید (از جمله واحدهای نظامی بربر).",
|
||||||
"# Arguments": "# Arguments",
|
"# Arguments": "# Arguments",
|
||||||
"# Errors": "# Errors",
|
"# Errors": "# Errors",
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
"No tactics": "Aucune tactique",
|
"No tactics": "Aucune tactique",
|
||||||
"Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "Choisir un autre joueur. Vous ne pouvez pas vous attaquer, sauf si l’attaquant paie 2 jetons de culture au défenseur. Défaussez cette carte si l'un des joueurs attaque l'autre. Vous pouvez défausser la carte comme action normale.",
|
"Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "Choisir un autre joueur. Vous ne pouvez pas vous attaquer, sauf si l’attaquant paie 2 jetons de culture au défenseur. Défaussez cette carte si l'un des joueurs attaque l'autre. Vous pouvez défausser la carte comme action normale.",
|
||||||
"{p0} Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "{p0} Choisir un autre joueur. Vous ne pouvez pas vous attaquer, sauf si l’attaquant paie 2 jetons de culture au défenseur. Défaussez cette carte si l'un des joueurs attaque l'autre. Vous pouvez défausser la carte comme action normale.",
|
"{p0} Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "{p0} Choisir un autre joueur. Vous ne pouvez pas vous attaquer, sauf si l’attaquant paie 2 jetons de culture au défenseur. Défaussez cette carte si l'un des joueurs attaque l'autre. Vous pouvez défausser la carte comme action normale.",
|
||||||
"Immediately after constructing the first Wonder in the game, or during the Status Phase if you were the only player to construct Wonders in the last round.": "Immédiatement après avoir construit la première Merveille de la partie, ou en phase de statut si vous êtes le seul joueur à avoir construit des Merveilles lors de la dernière manche.",
|
"Immediately after constructing the first Wonder in the game, or during the Status Phase if you were the only player to construct Wonders this Age.": "Immédiatement après avoir construit la première Merveille de la partie, ou en phase de statut si vous êtes le seul joueur à avoir construit des Merveilles durant cet Âge.",
|
||||||
"Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).": "Immédiatement après une bataille où vous avez été attaqué et avez éliminé au moins 2 unités militaires (y compris les unités militaires barbares).",
|
"Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).": "Immédiatement après une bataille où vous avez été attaqué et avez éliminé au moins 2 unités militaires (y compris les unités militaires barbares).",
|
||||||
"# Arguments": "# Arguments",
|
"# Arguments": "# Arguments",
|
||||||
"# Errors": "# Erreurs",
|
"# Errors": "# Erreurs",
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
"No tactics": "कोई रणनीति नहीं",
|
"No tactics": "कोई रणनीति नहीं",
|
||||||
"Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "दूसरा खिलाड़ी चुनें। आप एक-दूसरे पर हमला नहीं कर सकते, जब तक कि हमलावर रक्षक को 2 संस्कृति टोकन का भुगतान न करे। यदि कोई भी खिलाड़ी दूसरे पर हमला करता है तो यह कार्ड त्याग दें। आप नियमित क्रिया के रूप में कार्ड त्याग सकते हैं।",
|
"Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "दूसरा खिलाड़ी चुनें। आप एक-दूसरे पर हमला नहीं कर सकते, जब तक कि हमलावर रक्षक को 2 संस्कृति टोकन का भुगतान न करे। यदि कोई भी खिलाड़ी दूसरे पर हमला करता है तो यह कार्ड त्याग दें। आप नियमित क्रिया के रूप में कार्ड त्याग सकते हैं।",
|
||||||
"{p0} Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "{p0} दूसरा खिलाड़ी चुनें। आप एक-दूसरे पर हमला नहीं कर सकते, जब तक कि हमलावर रक्षक को 2 संस्कृति टोकन का भुगतान न करे। यदि कोई भी खिलाड़ी दूसरे पर हमला करता है तो यह कार्ड त्याग दें। आप नियमित क्रिया के रूप में कार्ड त्याग सकते हैं।",
|
"{p0} Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "{p0} दूसरा खिलाड़ी चुनें। आप एक-दूसरे पर हमला नहीं कर सकते, जब तक कि हमलावर रक्षक को 2 संस्कृति टोकन का भुगतान न करे। यदि कोई भी खिलाड़ी दूसरे पर हमला करता है तो यह कार्ड त्याग दें। आप नियमित क्रिया के रूप में कार्ड त्याग सकते हैं।",
|
||||||
"Immediately after constructing the first Wonder in the game, or during the Status Phase if you were the only player to construct Wonders in the last round.": "खेल का पहला अजूबा बनाने के तुरंत बाद, या स्थिति चरण में यदि पिछले दौर में केवल आपने अजूबे बनाए थे।",
|
"Immediately after constructing the first Wonder in the game, or during the Status Phase if you were the only player to construct Wonders this Age.": "खेल का पहला अजूबा बनाने के तुरंत बाद, या स्थिति चरण में यदि इस युग में केवल आपने अजूबे बनाए थे।",
|
||||||
"Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).": "उस लड़ाई के तुरंत बाद जिसमें आप पर हमला हुआ और आपने कम से कम 2 सैन्य इकाइयाँ नष्ट कीं (बर्बर सैन्य इकाइयों सहित)।",
|
"Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).": "उस लड़ाई के तुरंत बाद जिसमें आप पर हमला हुआ और आपने कम से कम 2 सैन्य इकाइयाँ नष्ट कीं (बर्बर सैन्य इकाइयों सहित)।",
|
||||||
"# Arguments": "# तर्क",
|
"# Arguments": "# तर्क",
|
||||||
"# Errors": "# त्रुटियाँ",
|
"# Errors": "# त्रुटियाँ",
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
"No tactics": "Nessuna tattica",
|
"No tactics": "Nessuna tattica",
|
||||||
"Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "Scegli un altro giocatore. Non potete attaccarvi a vicenda, a meno che l'attaccante non paghi 2 segnalini cultura al difensore. Scarta questa carta se uno dei due giocatori attacca l'altro. Puoi scartare la carta come azione regolare.",
|
"Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "Scegli un altro giocatore. Non potete attaccarvi a vicenda, a meno che l'attaccante non paghi 2 segnalini cultura al difensore. Scarta questa carta se uno dei due giocatori attacca l'altro. Puoi scartare la carta come azione regolare.",
|
||||||
"{p0} Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "{p0} Scegli un altro giocatore. Non potete attaccarvi a vicenda, a meno che l'attaccante non paghi 2 segnalini cultura al difensore. Scarta questa carta se uno dei due giocatori attacca l'altro. Puoi scartare la carta come azione regolare.",
|
"{p0} Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "{p0} Scegli un altro giocatore. Non potete attaccarvi a vicenda, a meno che l'attaccante non paghi 2 segnalini cultura al difensore. Scarta questa carta se uno dei due giocatori attacca l'altro. Puoi scartare la carta come azione regolare.",
|
||||||
"Immediately after constructing the first Wonder in the game, or during the Status Phase if you were the only player to construct Wonders in the last round.": "Subito dopo aver costruito la prima Meraviglia della partita, oppure nella fase di stato se sei stato l'unico giocatore a costruire Meraviglie nell'ultimo round.",
|
"Immediately after constructing the first Wonder in the game, or during the Status Phase if you were the only player to construct Wonders this Age.": "Subito dopo aver costruito la prima Meraviglia della partita, oppure nella fase di stato se sei stato l'unico giocatore a costruire Meraviglie in questa Età.",
|
||||||
"Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).": "Immediatamente dopo una battaglia in cui sei stato attaccato e hai eliminato almeno 2 unità militari (comprese le unità militari barbare).",
|
"Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).": "Immediatamente dopo una battaglia in cui sei stato attaccato e hai eliminato almeno 2 unità militari (comprese le unità militari barbare).",
|
||||||
"# Arguments": "# Argomenti",
|
"# Arguments": "# Argomenti",
|
||||||
"# Errors": "# Errori",
|
"# Errors": "# Errori",
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
"No tactics": "전술 없음",
|
"No tactics": "전술 없음",
|
||||||
"Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "다른 플레이어를 선택하세요. 공격자가 방어자에게 문화 토큰 2개를 지불하지 않으면 서로 공격할 수 없습니다. 어느 플레이어가 다른 플레이어를 공격하면 이 카드를 버립니다. 일반 행동으로 카드를 버릴 수 있습니다.",
|
"Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "다른 플레이어를 선택하세요. 공격자가 방어자에게 문화 토큰 2개를 지불하지 않으면 서로 공격할 수 없습니다. 어느 플레이어가 다른 플레이어를 공격하면 이 카드를 버립니다. 일반 행동으로 카드를 버릴 수 있습니다.",
|
||||||
"{p0} Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "{p0} 다른 플레이어를 선택하세요. 공격자가 방어자에게 문화 토큰 2개를 지불하지 않으면 서로 공격할 수 없습니다. 어느 플레이어가 다른 플레이어를 공격하면 이 카드를 버립니다. 일반 행동으로 카드를 버릴 수 있습니다.",
|
"{p0} Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "{p0} 다른 플레이어를 선택하세요. 공격자가 방어자에게 문화 토큰 2개를 지불하지 않으면 서로 공격할 수 없습니다. 어느 플레이어가 다른 플레이어를 공격하면 이 카드를 버립니다. 일반 행동으로 카드를 버릴 수 있습니다.",
|
||||||
"Immediately after constructing the first Wonder in the game, or during the Status Phase if you were the only player to construct Wonders in the last round.": "게임의 첫 불가사의를 건설한 직후, 또는 지난 라운드에 불가사의를 건설한 유일한 플레이어라면 상태 단계에 달성합니다.",
|
"Immediately after constructing the first Wonder in the game, or during the Status Phase if you were the only player to construct Wonders this Age.": "게임의 첫 불가사의를 건설한 직후, 또는 이번 시대에 불가사의를 건설한 유일한 플레이어라면 상태 단계에 달성합니다.",
|
||||||
"Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).": "공격을 받아 군대 유닛을 2개 이상 제거한 전투 직후에 완료합니다(야만인 군대 유닛 포함).",
|
"Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).": "공격을 받아 군대 유닛을 2개 이상 제거한 전투 직후에 완료합니다(야만인 군대 유닛 포함).",
|
||||||
"# Arguments": "# 인수",
|
"# Arguments": "# 인수",
|
||||||
"# Errors": "# 오류",
|
"# Errors": "# 오류",
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
"No tactics": "Geen tactiek",
|
"No tactics": "Geen tactiek",
|
||||||
"Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "Kies een andere speler. Jullie kunnen elkaar niet aanvallen, tenzij de aanvaller de verdediger 2 cultuurfiches betaalt. Leg deze kaart af als een van beide spelers de ander aanvalt. Je mag de kaart afleggen als een gewone actie.",
|
"Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "Kies een andere speler. Jullie kunnen elkaar niet aanvallen, tenzij de aanvaller de verdediger 2 cultuurfiches betaalt. Leg deze kaart af als een van beide spelers de ander aanvalt. Je mag de kaart afleggen als een gewone actie.",
|
||||||
"{p0} Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "{p0} Kies een andere speler. Jullie kunnen elkaar niet aanvallen, tenzij de aanvaller de verdediger 2 cultuurfiches betaalt. Leg deze kaart af als een van beide spelers de ander aanvalt. Je mag de kaart afleggen als een gewone actie.",
|
"{p0} Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "{p0} Kies een andere speler. Jullie kunnen elkaar niet aanvallen, tenzij de aanvaller de verdediger 2 cultuurfiches betaalt. Leg deze kaart af als een van beide spelers de ander aanvalt. Je mag de kaart afleggen als een gewone actie.",
|
||||||
"Immediately after constructing the first Wonder in the game, or during the Status Phase if you were the only player to construct Wonders in the last round.": "Direct na het bouwen van het eerste wereldwonder in het spel, of in de statusfase als jij de enige speler was die in de laatste ronde wereldwonderen bouwde.",
|
"Immediately after constructing the first Wonder in the game, or during the Status Phase if you were the only player to construct Wonders this Age.": "Direct na het bouwen van het eerste wereldwonder in het spel, of in de statusfase als jij de enige speler was die in dit Tijdperk wereldwonderen bouwde.",
|
||||||
"Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).": "Direct na een gevecht waarin je werd aangevallen en minstens 2 legereenheden hebt uitgeschakeld (inclusief barbaarse legereenheden).",
|
"Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).": "Direct na een gevecht waarin je werd aangevallen en minstens 2 legereenheden hebt uitgeschakeld (inclusief barbaarse legereenheden).",
|
||||||
"# Arguments": "# Argumenten",
|
"# Arguments": "# Argumenten",
|
||||||
"# Errors": "# Fouten",
|
"# Errors": "# Fouten",
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
"No tactics": "Bez taktyki",
|
"No tactics": "Bez taktyki",
|
||||||
"Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "Wybierz innego gracza. Nie możecie się atakować, chyba że atakujący zapłaci obrońcy 2 żetony kultury. Odrzuć tę kartę, jeśli którykolwiek gracz zaatakuje drugiego. Możesz odrzucić kartę jako zwykłą akcję.",
|
"Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "Wybierz innego gracza. Nie możecie się atakować, chyba że atakujący zapłaci obrońcy 2 żetony kultury. Odrzuć tę kartę, jeśli którykolwiek gracz zaatakuje drugiego. Możesz odrzucić kartę jako zwykłą akcję.",
|
||||||
"{p0} Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "{p0} Wybierz innego gracza. Nie możecie się atakować, chyba że atakujący zapłaci obrońcy 2 żetony kultury. Odrzuć tę kartę, jeśli którykolwiek gracz zaatakuje drugiego. Możesz odrzucić kartę jako zwykłą akcję.",
|
"{p0} Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "{p0} Wybierz innego gracza. Nie możecie się atakować, chyba że atakujący zapłaci obrońcy 2 żetony kultury. Odrzuć tę kartę, jeśli którykolwiek gracz zaatakuje drugiego. Możesz odrzucić kartę jako zwykłą akcję.",
|
||||||
"Immediately after constructing the first Wonder in the game, or during the Status Phase if you were the only player to construct Wonders in the last round.": "Natychmiast po zbudowaniu pierwszego cudu w grze lub w fazie statusu, jeśli tylko ty zbudowałeś cuda w ostatniej rundzie.",
|
"Immediately after constructing the first Wonder in the game, or during the Status Phase if you were the only player to construct Wonders this Age.": "Natychmiast po zbudowaniu pierwszego cudu w grze lub w fazie statusu, jeśli tylko ty zbudowałeś cuda w tej Epoce.",
|
||||||
"Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).": "Natychmiast po bitwie, w której zostałeś zaatakowany i wyeliminowałeś co najmniej 2 jednostki wojskowe (wliczając jednostki wojskowe barbarzyńców).",
|
"Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).": "Natychmiast po bitwie, w której zostałeś zaatakowany i wyeliminowałeś co najmniej 2 jednostki wojskowe (wliczając jednostki wojskowe barbarzyńców).",
|
||||||
"# Arguments": "# Argumenty",
|
"# Arguments": "# Argumenty",
|
||||||
"# Errors": "# Błędy",
|
"# Errors": "# Błędy",
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
"No tactics": "Sem tática",
|
"No tactics": "Sem tática",
|
||||||
"Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "Escolha outro jogador. Vocês não podem atacar um ao outro, a menos que o atacante pague 2 fichas de cultura ao defensor. Descarte esta carta se qualquer jogador atacar o outro. Você pode descartar a carta como uma ação regular.",
|
"Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "Escolha outro jogador. Vocês não podem atacar um ao outro, a menos que o atacante pague 2 fichas de cultura ao defensor. Descarte esta carta se qualquer jogador atacar o outro. Você pode descartar a carta como uma ação regular.",
|
||||||
"{p0} Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "{p0} Escolha outro jogador. Vocês não podem atacar um ao outro, a menos que o atacante pague 2 fichas de cultura ao defensor. Descarte esta carta se qualquer jogador atacar o outro. Você pode descartar a carta como uma ação regular.",
|
"{p0} Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "{p0} Escolha outro jogador. Vocês não podem atacar um ao outro, a menos que o atacante pague 2 fichas de cultura ao defensor. Descarte esta carta se qualquer jogador atacar o outro. Você pode descartar a carta como uma ação regular.",
|
||||||
"Immediately after constructing the first Wonder in the game, or during the Status Phase if you were the only player to construct Wonders in the last round.": "Imediatamente após construir a primeira Maravilha da partida, ou na fase de status se você foi o único jogador a construir Maravilhas na última rodada.",
|
"Immediately after constructing the first Wonder in the game, or during the Status Phase if you were the only player to construct Wonders this Age.": "Imediatamente após construir a primeira Maravilha da partida, ou na fase de status se você foi o único jogador a construir Maravilhas nesta Era.",
|
||||||
"Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).": "Imediatamente após uma batalha em que você foi atacado e eliminou pelo menos 2 unidades militares (incluindo unidades militares bárbaras).",
|
"Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).": "Imediatamente após uma batalha em que você foi atacado e eliminou pelo menos 2 unidades militares (incluindo unidades militares bárbaras).",
|
||||||
"# Arguments": "# Argumentos",
|
"# Arguments": "# Argumentos",
|
||||||
"# Errors": "# Erros",
|
"# Errors": "# Erros",
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
"No tactics": "Fără tactică",
|
"No tactics": "Fără tactică",
|
||||||
"Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "Alege alt jucător. Nu vă puteți ataca reciproc, decât dacă atacatorul plătește apărătorului 2 jetoane de cultură. Aruncă această carte dacă oricare jucător îl atacă pe celălalt. Poți arunca cartea ca acțiune obișnuită.",
|
"Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "Alege alt jucător. Nu vă puteți ataca reciproc, decât dacă atacatorul plătește apărătorului 2 jetoane de cultură. Aruncă această carte dacă oricare jucător îl atacă pe celălalt. Poți arunca cartea ca acțiune obișnuită.",
|
||||||
"{p0} Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "{p0} Alege alt jucător. Nu vă puteți ataca reciproc, decât dacă atacatorul plătește apărătorului 2 jetoane de cultură. Aruncă această carte dacă oricare jucător îl atacă pe celălalt. Poți arunca cartea ca acțiune obișnuită.",
|
"{p0} Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "{p0} Alege alt jucător. Nu vă puteți ataca reciproc, decât dacă atacatorul plătește apărătorului 2 jetoane de cultură. Aruncă această carte dacă oricare jucător îl atacă pe celălalt. Poți arunca cartea ca acțiune obișnuită.",
|
||||||
"Immediately after constructing the first Wonder in the game, or during the Status Phase if you were the only player to construct Wonders in the last round.": "Imediat după construirea primei Minuni din joc sau în faza de statut dacă ai fost singurul jucător care a construit Minuni în ultima rundă.",
|
"Immediately after constructing the first Wonder in the game, or during the Status Phase if you were the only player to construct Wonders this Age.": "Imediat după construirea primei Minuni din joc sau în faza de statut dacă ai fost singurul jucător care a construit Minuni în această Epocă.",
|
||||||
"Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).": "Imediat după o bătălie în care ai fost atacat și ai eliminat cel puțin 2 unități militare (inclusiv unități militare barbare).",
|
"Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).": "Imediat după o bătălie în care ai fost atacat și ai eliminat cel puțin 2 unități militare (inclusiv unități militare barbare).",
|
||||||
"# Arguments": "# Argumente",
|
"# Arguments": "# Argumente",
|
||||||
"# Errors": "# Erori",
|
"# Errors": "# Erori",
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
"No tactics": "Без тактики",
|
"No tactics": "Без тактики",
|
||||||
"Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "Выберите другого игрока. Вы не можете атаковать друг друга, если атакующий не заплатит защитнику 2 жетона культуры. Сбросьте эту карту, если один из игроков атакует другого. Вы можете сбросить карту как обычное действие.",
|
"Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "Выберите другого игрока. Вы не можете атаковать друг друга, если атакующий не заплатит защитнику 2 жетона культуры. Сбросьте эту карту, если один из игроков атакует другого. Вы можете сбросить карту как обычное действие.",
|
||||||
"{p0} Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "{p0} Выберите другого игрока. Вы не можете атаковать друг друга, если атакующий не заплатит защитнику 2 жетона культуры. Сбросьте эту карту, если один из игроков атакует другого. Вы можете сбросить карту как обычное действие.",
|
"{p0} Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "{p0} Выберите другого игрока. Вы не можете атаковать друг друга, если атакующий не заплатит защитнику 2 жетона культуры. Сбросьте эту карту, если один из игроков атакует другого. Вы можете сбросить карту как обычное действие.",
|
||||||
"Immediately after constructing the first Wonder in the game, or during the Status Phase if you were the only player to construct Wonders in the last round.": "Сразу после постройки первого чуда в игре или в фазе статуса, если только вы строили чудеса в последнем раунде.",
|
"Immediately after constructing the first Wonder in the game, or during the Status Phase if you were the only player to construct Wonders this Age.": "Сразу после постройки первого чуда в игре или в фазе статуса, если только вы строили чудеса в этой Эпохе.",
|
||||||
"Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).": "Сразу после битвы, в которой на вас напали и вы уничтожили не менее 2 воинских отрядов (включая варварские).",
|
"Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).": "Сразу после битвы, в которой на вас напали и вы уничтожили не менее 2 воинских отрядов (включая варварские).",
|
||||||
"# Arguments": "# Аргументы",
|
"# Arguments": "# Аргументы",
|
||||||
"# Errors": "# Ошибки",
|
"# Errors": "# Ошибки",
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
"No tactics": "Không dùng chiến thuật",
|
"No tactics": "Không dùng chiến thuật",
|
||||||
"Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "Chọn người chơi khác. Các bạn không thể tấn công nhau, trừ khi người tấn công trả cho người phòng thủ 2 token văn hóa. Loại bỏ thẻ này nếu một trong hai người chơi tấn công người kia. Bạn có thể loại bỏ thẻ như một hành động thường.",
|
"Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "Chọn người chơi khác. Các bạn không thể tấn công nhau, trừ khi người tấn công trả cho người phòng thủ 2 token văn hóa. Loại bỏ thẻ này nếu một trong hai người chơi tấn công người kia. Bạn có thể loại bỏ thẻ như một hành động thường.",
|
||||||
"{p0} Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "{p0} Chọn người chơi khác. Các bạn không thể tấn công nhau, trừ khi người tấn công trả cho người phòng thủ 2 token văn hóa. Loại bỏ thẻ này nếu một trong hai người chơi tấn công người kia. Bạn có thể loại bỏ thẻ như một hành động thường.",
|
"{p0} Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "{p0} Chọn người chơi khác. Các bạn không thể tấn công nhau, trừ khi người tấn công trả cho người phòng thủ 2 token văn hóa. Loại bỏ thẻ này nếu một trong hai người chơi tấn công người kia. Bạn có thể loại bỏ thẻ như một hành động thường.",
|
||||||
"Immediately after constructing the first Wonder in the game, or during the Status Phase if you were the only player to construct Wonders in the last round.": "Ngay sau khi xây Kỳ quan đầu tiên của ván chơi, hoặc trong giai đoạn trạng thái nếu bạn là người duy nhất xây Kỳ quan trong vòng vừa qua.",
|
"Immediately after constructing the first Wonder in the game, or during the Status Phase if you were the only player to construct Wonders this Age.": "Ngay sau khi xây Kỳ quan đầu tiên của ván chơi, hoặc trong giai đoạn trạng thái nếu bạn là người duy nhất xây Kỳ quan trong Thời đại này.",
|
||||||
"Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).": "Ngay sau một trận chiến mà bạn bị tấn công và đã tiêu diệt ít nhất 2 đơn vị quân đội (bao gồm quân đội man tộc).",
|
"Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).": "Ngay sau một trận chiến mà bạn bị tấn công và đã tiêu diệt ít nhất 2 đơn vị quân đội (bao gồm quân đội man tộc).",
|
||||||
"# Arguments": "# Đối số",
|
"# Arguments": "# Đối số",
|
||||||
"# Errors": "# Lỗi",
|
"# Errors": "# Lỗi",
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
"No tactics": "不使用战术",
|
"No tactics": "不使用战术",
|
||||||
"Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "选择另一位玩家。除非攻击方向防守方支付2枚文化标记,否则你们不能互相攻击。任一玩家攻击另一方时弃置此卡。你也可以用一次常规行动弃置此卡。",
|
"Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "选择另一位玩家。除非攻击方向防守方支付2枚文化标记,否则你们不能互相攻击。任一玩家攻击另一方时弃置此卡。你也可以用一次常规行动弃置此卡。",
|
||||||
"{p0} Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "{p0} 选择另一位玩家。除非攻击方向防守方支付2枚文化标记,否则你们不能互相攻击。任一玩家攻击另一方时弃置此卡。你也可以用一次常规行动弃置此卡。",
|
"{p0} Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "{p0} 选择另一位玩家。除非攻击方向防守方支付2枚文化标记,否则你们不能互相攻击。任一玩家攻击另一方时弃置此卡。你也可以用一次常规行动弃置此卡。",
|
||||||
"Immediately after constructing the first Wonder in the game, or during the Status Phase if you were the only player to construct Wonders in the last round.": "建造本局首座奇迹后立即完成;或在状态阶段完成,条件是上一轮只有你建造过奇迹。",
|
"Immediately after constructing the first Wonder in the game, or during the Status Phase if you were the only player to construct Wonders this Age.": "建造本局首座奇迹后立即完成;或在状态阶段完成,条件是本时代只有你建造过奇迹。",
|
||||||
"Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).": "在你受到攻击并消灭了至少2个军队单位(包括蛮族军队单位)的战斗结束后立即完成。",
|
"Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).": "在你受到攻击并消灭了至少2个军队单位(包括蛮族军队单位)的战斗结束后立即完成。",
|
||||||
"_blank": "_blank",
|
"_blank": "_blank",
|
||||||
"_tokens": "_tokens",
|
"_tokens": "_tokens",
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
"No tactics": "不使用戰術",
|
"No tactics": "不使用戰術",
|
||||||
"Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "選擇另一位玩家。除非攻擊方向防守方支付2個文化標記,否則你們不能互相攻擊。若任一方攻擊另一方,棄掉此卡。你可以將棄掉此卡作為一個常規行動。",
|
"Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "選擇另一位玩家。除非攻擊方向防守方支付2個文化標記,否則你們不能互相攻擊。若任一方攻擊另一方,棄掉此卡。你可以將棄掉此卡作為一個常規行動。",
|
||||||
"{p0} Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "{p0} 選擇另一位玩家。除非攻擊方向防守方支付2個文化標記,否則你們不能互相攻擊。若任一方攻擊另一方,棄掉此卡。你可以將棄掉此卡作為一個常規行動。",
|
"{p0} Choose another player. You cannot attack each other, unless the attacker pays the defender 2 culture tokens. Discard this card if either player attacks the other. You may discard the card as a regular action.": "{p0} 選擇另一位玩家。除非攻擊方向防守方支付2個文化標記,否則你們不能互相攻擊。若任一方攻擊另一方,棄掉此卡。你可以將棄掉此卡作為一個常規行動。",
|
||||||
"Immediately after constructing the first Wonder in the game, or during the Status Phase if you were the only player to construct Wonders in the last round.": "建造本局首座奇觀後立即完成;或在狀態階段完成,條件是上一輪只有你建造過奇觀。",
|
"Immediately after constructing the first Wonder in the game, or during the Status Phase if you were the only player to construct Wonders this Age.": "建造本局首座奇觀後立即完成;或在狀態階段完成,條件是本時代只有你建造過奇觀。",
|
||||||
"Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).": "在你受到攻擊並消滅了至少2個軍隊單位(包含蠻族軍隊單位)的戰鬥結束後立即完成。",
|
"Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).": "在你受到攻擊並消滅了至少2個軍隊單位(包含蠻族軍隊單位)的戰鬥結束後立即完成。",
|
||||||
"# Arguments": "# 參數",
|
"# Arguments": "# 參數",
|
||||||
"# Errors": "# 錯誤",
|
"# Errors": "# 錯誤",
|
||||||
|
|
|
||||||
|
|
@ -957,6 +957,7 @@ test('predicted undo preserves all independent persisted rule boundaries', () =>
|
||||||
aggressor_eligibility_from: 1,
|
aggressor_eligibility_from: 1,
|
||||||
provinces_from: 1,
|
provinces_from: 1,
|
||||||
barbarian_movement_from: 2,
|
barbarian_movement_from: 2,
|
||||||
|
wonderful_eligibility_from: 6,
|
||||||
};
|
};
|
||||||
const current = {
|
const current = {
|
||||||
...previous,
|
...previous,
|
||||||
|
|
|
||||||
|
|
@ -202,6 +202,7 @@ export function predictUndo(previous: string, current: string): string | null {
|
||||||
'aggressor_eligibility_from',
|
'aggressor_eligibility_from',
|
||||||
'provinces_from',
|
'provinces_from',
|
||||||
'barbarian_movement_from',
|
'barbarian_movement_from',
|
||||||
|
'wonderful_eligibility_from',
|
||||||
]) {
|
]) {
|
||||||
if (after[field] !== undefined) before[field] = after[field];
|
if (after[field] !== undefined) before[field] = after[field];
|
||||||
else delete before[field];
|
else delete before[field];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue