Fix printed Defiance objective after defensive losses and draws
This commit is contained in:
parent
786352b34a
commit
d5f80abac5
23 changed files with 521 additions and 93 deletions
|
|
@ -314,21 +314,30 @@ pub(crate) fn barbarian_conquest() -> Objective {
|
|||
.build()
|
||||
}
|
||||
|
||||
// Printed as Defiance on objective cards 27 and 28.
|
||||
pub(crate) fn resistance() -> Objective {
|
||||
let name = "Resistance";
|
||||
Objective::builder(
|
||||
name,
|
||||
"You won a battle as defender and killed at least 2 enemy units.",
|
||||
"Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).",
|
||||
)
|
||||
.add_simple_persistent_event_listener(
|
||||
|event| &mut event.combat_end,
|
||||
12,
|
||||
|game, p, s| {
|
||||
let player = p.index;
|
||||
if s.is_winner(player)
|
||||
&& s.defender.player == player
|
||||
&& s.opponent(player).losses.amount() >= 2
|
||||
{
|
||||
if !s.is_battle() || s.defender.player != player {
|
||||
return;
|
||||
}
|
||||
|
||||
let army_losses: u8 = s
|
||||
.opponent(player)
|
||||
.losses
|
||||
.clone()
|
||||
.into_iter()
|
||||
.filter_map(|(unit, count)| unit.is_army_unit().then_some(count))
|
||||
.sum();
|
||||
if army_losses >= 2 {
|
||||
objective_is_ready(game.player_mut(player), name);
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,24 +1,27 @@
|
|||
use crate::action::Action;
|
||||
use crate::cache::Cache;
|
||||
use crate::card::HandCard;
|
||||
use crate::city::City;
|
||||
use crate::combat_listeners::{CombatResult, on_end_combat};
|
||||
use crate::combat_stats::{Battleground, CombatPlayerStats, CombatStats};
|
||||
use crate::content::persistent_events::{
|
||||
EventResponse, PersistentEventRequest, PersistentEventType,
|
||||
};
|
||||
use crate::game::{Game, GameContext};
|
||||
use crate::game_api;
|
||||
use crate::game_data::GameData;
|
||||
use crate::log::{ActionLogAction, current_turn_log_mut};
|
||||
use crate::leader::Leader;
|
||||
use crate::log::{ActionLogAction, current_turn_log_mut, current_turn_log_without_redo};
|
||||
use crate::movement::{MoveUnits, MovementAction};
|
||||
use crate::playing_actions::PlayingAction;
|
||||
use crate::position::Position;
|
||||
use crate::unit::Units;
|
||||
use crate::resource_pile::ResourcePile;
|
||||
use crate::unit::{Unit, UnitType, Units};
|
||||
|
||||
fn qualifies(
|
||||
defending: bool,
|
||||
result: CombatResult,
|
||||
losses: u8,
|
||||
battleground: Battleground,
|
||||
barbarians: bool,
|
||||
) -> bool {
|
||||
// Printed Defiance is internally Resistance, not the Defiance/Against All Odds objective.
|
||||
const CARDS: [u8; 2] = [27, 28];
|
||||
|
||||
fn test_game(owner: usize, cards: &[u8], barbarians: bool) -> Game {
|
||||
let mut data: serde_json::Value = serde_json::from_str(include_str!(
|
||||
"../../../tests/test_games/tactics_cards/heavy_resistance.json"
|
||||
))
|
||||
|
|
@ -28,13 +31,56 @@ fn qualifies(
|
|||
p["action_cards"] = serde_json::json!([]);
|
||||
p["advances"] = serde_json::json!(["Farming", "Mining", "Tactics"]);
|
||||
}
|
||||
data["players"][0]["objective_cards"] = serde_json::json!([28]);
|
||||
data["players"][owner]["objective_cards"] = serde_json::json!(cards);
|
||||
if barbarians {
|
||||
data["players"][1]["civilization"] = serde_json::json!("Barbarians");
|
||||
data["players"][1 - owner]["civilization"] = serde_json::json!("Barbarians");
|
||||
}
|
||||
let data: GameData = serde_json::from_value(data).unwrap();
|
||||
let cache = Cache::new(&data.options);
|
||||
let mut game = Game::from_data(data, cache, GameContext::Play);
|
||||
Game::from_data(data, cache, GameContext::Play)
|
||||
}
|
||||
|
||||
fn infantry(amount: u8) -> Units {
|
||||
Units {
|
||||
infantry: amount,
|
||||
..Units::empty()
|
||||
}
|
||||
}
|
||||
|
||||
fn combat_stats(
|
||||
defending: bool,
|
||||
result: CombatResult,
|
||||
losses: Units,
|
||||
battleground: Battleground,
|
||||
) -> CombatStats {
|
||||
let mut stats = CombatStats::new(
|
||||
battleground,
|
||||
false,
|
||||
CombatPlayerStats::new(
|
||||
usize::from(defending),
|
||||
infantry(3),
|
||||
Position::from_offset("C2"),
|
||||
),
|
||||
CombatPlayerStats::new(
|
||||
usize::from(!defending),
|
||||
infantry(2),
|
||||
Position::from_offset("C1"),
|
||||
),
|
||||
Some(result),
|
||||
None,
|
||||
);
|
||||
let opponent = if defending {
|
||||
&mut stats.attacker
|
||||
} else {
|
||||
&mut stats.defender
|
||||
};
|
||||
opponent.present = losses.clone();
|
||||
opponent.present.infantry += 1;
|
||||
opponent.losses = losses;
|
||||
stats
|
||||
}
|
||||
|
||||
fn finish_combat(mut game: Game, stats: CombatStats) -> Game {
|
||||
game.log_index = 1;
|
||||
current_turn_log_mut(&mut game)
|
||||
.actions
|
||||
|
|
@ -44,33 +90,6 @@ fn qualifies(
|
|||
None,
|
||||
0,
|
||||
));
|
||||
let mut stats = CombatStats::new(
|
||||
battleground,
|
||||
false,
|
||||
CombatPlayerStats::new(
|
||||
usize::from(defending),
|
||||
Units {
|
||||
infantry: 2,
|
||||
..Units::empty()
|
||||
},
|
||||
Position::from_offset("C2"),
|
||||
),
|
||||
CombatPlayerStats::new(
|
||||
usize::from(!defending),
|
||||
Units {
|
||||
infantry: 3,
|
||||
..Units::empty()
|
||||
},
|
||||
Position::from_offset("C1"),
|
||||
),
|
||||
Some(result),
|
||||
None,
|
||||
);
|
||||
if defending {
|
||||
stats.attacker.losses.infantry = losses;
|
||||
} else {
|
||||
stats.defender.losses.infantry = losses;
|
||||
}
|
||||
on_end_combat(&mut game, stats);
|
||||
// Barbarian rewards resolve before combat objectives are checked.
|
||||
while let Some(handler) = game.current_event_handler() {
|
||||
|
|
@ -81,48 +100,291 @@ fn qualifies(
|
|||
request.reward.payment_options.default.clone(),
|
||||
));
|
||||
let player = game.active_player();
|
||||
game = crate::game_api::execute(game, response, player);
|
||||
game = game_api::execute(game, response, player);
|
||||
}
|
||||
game.events.iter().any(|event| matches!(&event.event_type, PersistentEventType::SelectObjectives(info) if info.shown_objective.as_deref() == Some("Resistance")))
|
||||
game
|
||||
}
|
||||
|
||||
fn has_defiance_prompt(game: &Game) -> bool {
|
||||
game.events.iter().any(|event| {
|
||||
matches!(&event.event_type, PersistentEventType::SelectObjectives(info)
|
||||
if info.shown_objective.as_deref() == Some("Resistance"))
|
||||
})
|
||||
}
|
||||
|
||||
fn qualifies(card: u8, stats: CombatStats, barbarians: bool) -> bool {
|
||||
let game = finish_combat(test_game(0, &[card], barbarians), stats);
|
||||
has_defiance_prompt(&game)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn defiance_accepts_human_and_barbarian_attackers() {
|
||||
for barbarians in [false, true] {
|
||||
assert!(qualifies(
|
||||
true,
|
||||
CombatResult::DefenderWins,
|
||||
2,
|
||||
Battleground::Land,
|
||||
barbarians
|
||||
));
|
||||
assert!(qualifies(
|
||||
true,
|
||||
CombatResult::DefenderWins,
|
||||
2,
|
||||
Battleground::City,
|
||||
barbarians
|
||||
));
|
||||
assert!(!qualifies(
|
||||
true,
|
||||
CombatResult::DefenderWins,
|
||||
1,
|
||||
Battleground::City,
|
||||
barbarians
|
||||
));
|
||||
assert!(!qualifies(
|
||||
false,
|
||||
CombatResult::AttackerWins,
|
||||
2,
|
||||
Battleground::City,
|
||||
barbarians
|
||||
));
|
||||
assert!(!qualifies(
|
||||
true,
|
||||
CombatResult::AttackerWins,
|
||||
2,
|
||||
Battleground::City,
|
||||
barbarians
|
||||
));
|
||||
fn defiance_accepts_defender_wins_losses_and_draws_against_humans_and_barbarians() {
|
||||
for card in CARDS {
|
||||
for barbarians in [false, true] {
|
||||
for result in [
|
||||
CombatResult::DefenderWins,
|
||||
CombatResult::AttackerWins,
|
||||
CombatResult::Draw,
|
||||
] {
|
||||
for battleground in [
|
||||
Battleground::Land,
|
||||
Battleground::City,
|
||||
Battleground::CityWithFortress,
|
||||
] {
|
||||
assert!(
|
||||
qualifies(
|
||||
card,
|
||||
combat_stats(true, result.clone(), infantry(2), battleground),
|
||||
barbarians,
|
||||
),
|
||||
"card {card}, barbarians {barbarians}, {result:?}, {battleground:?}"
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn defiance_never_qualifies_as_attacker() {
|
||||
for card in CARDS {
|
||||
for barbarians in [false, true] {
|
||||
for result in [
|
||||
CombatResult::DefenderWins,
|
||||
CombatResult::AttackerWins,
|
||||
CombatResult::Draw,
|
||||
] {
|
||||
assert!(!qualifies(
|
||||
card,
|
||||
combat_stats(false, result, infantry(3), Battleground::Land),
|
||||
barbarians,
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn defiance_requires_two_army_casualties_not_just_two_units() {
|
||||
let insufficient_losses = [
|
||||
Units::empty(),
|
||||
infantry(1),
|
||||
Units {
|
||||
settlers: 2,
|
||||
..Units::empty()
|
||||
},
|
||||
Units {
|
||||
ships: 2,
|
||||
..Units::empty()
|
||||
},
|
||||
Units {
|
||||
infantry: 1,
|
||||
settlers: 1,
|
||||
..Units::empty()
|
||||
},
|
||||
Units {
|
||||
infantry: 1,
|
||||
ships: 1,
|
||||
..Units::empty()
|
||||
},
|
||||
Units {
|
||||
settlers: 2,
|
||||
ships: 2,
|
||||
leader: Some(Leader::Alexander),
|
||||
..Units::empty()
|
||||
},
|
||||
];
|
||||
for card in CARDS {
|
||||
for barbarians in [false, true] {
|
||||
for losses in &insufficient_losses {
|
||||
for battleground in [Battleground::Land, Battleground::Sea] {
|
||||
assert!(!qualifies(
|
||||
card,
|
||||
combat_stats(
|
||||
true,
|
||||
CombatResult::DefenderWins,
|
||||
losses.clone(),
|
||||
battleground,
|
||||
),
|
||||
barbarians,
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn defiance_counts_all_army_types_including_leaders_and_ignores_extra_nonarmy_losses() {
|
||||
for card in CARDS {
|
||||
for losses in [
|
||||
Units {
|
||||
cavalry: 1,
|
||||
elephants: 1,
|
||||
..Units::empty()
|
||||
},
|
||||
Units {
|
||||
infantry: 1,
|
||||
leader: Some(Leader::Alexander),
|
||||
..Units::empty()
|
||||
},
|
||||
Units {
|
||||
infantry: 2,
|
||||
settlers: 1,
|
||||
ships: 1,
|
||||
..Units::empty()
|
||||
},
|
||||
] {
|
||||
// The card has no land-battle restriction: count lost army units, not
|
||||
// fighter_losses(), which counts only ships in a sea battle.
|
||||
for battleground in [Battleground::Land, Battleground::Sea] {
|
||||
assert!(qualifies(
|
||||
card,
|
||||
combat_stats(true, CombatResult::Draw, losses.clone(), battleground),
|
||||
false,
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn defiance_does_not_count_own_losses_or_nonbattle_events() {
|
||||
for card in CARDS {
|
||||
let mut stats = combat_stats(
|
||||
true,
|
||||
CombatResult::AttackerWins,
|
||||
infantry(1),
|
||||
Battleground::Land,
|
||||
);
|
||||
stats.defender.losses = infantry(2);
|
||||
assert!(!qualifies(card, stats, false));
|
||||
|
||||
let mut stats = combat_stats(
|
||||
true,
|
||||
CombatResult::AttackerWins,
|
||||
infantry(2),
|
||||
Battleground::Land,
|
||||
);
|
||||
stats.defender.present = Units::empty();
|
||||
assert!(!stats.is_battle());
|
||||
assert!(!qualifies(card, stats, false));
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn defiance_description_and_both_card_mappings_match_the_printed_rule() {
|
||||
let game = test_game(0, &CARDS, false);
|
||||
for card in CARDS {
|
||||
let objective = game
|
||||
.cache
|
||||
.get_objective_card(card)
|
||||
.objectives
|
||||
.iter()
|
||||
.find(|o| o.name == "Resistance")
|
||||
.expect("both printed Defiance cards must use Resistance");
|
||||
assert_eq!(
|
||||
objective.description,
|
||||
"Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units)."
|
||||
);
|
||||
assert!(!objective.requires_player_combat);
|
||||
assert!(objective.status_phase_check.is_none());
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn defiance_can_be_claimed_after_a_real_defender_loss_or_draw_and_save_reload() {
|
||||
for card in CARDS {
|
||||
for result in [CombatResult::AttackerWins, CombatResult::Draw] {
|
||||
let mut game = test_game(1, &CARDS, false);
|
||||
let attacker_count = if result == CombatResult::AttackerWins {
|
||||
3
|
||||
} else {
|
||||
2
|
||||
};
|
||||
game.players[0].units = (0..attacker_count)
|
||||
.map(|id| Unit::new(0, Position::from_offset("C2"), UnitType::Infantry, id))
|
||||
.collect();
|
||||
game.players[0].next_unit_id = attacker_count;
|
||||
// A lost city offers a replacement settler before the objective prompt.
|
||||
for position in ["B1", "B3"] {
|
||||
game.players[1]
|
||||
.cities
|
||||
.push(City::new(1, Position::from_offset(position)));
|
||||
}
|
||||
// Two defending infantry eliminate two attackers, whether or not
|
||||
// an attacker survives to win. The defenders both die in either case.
|
||||
game.dice_roll_outcomes = vec![11; attacker_count as usize + 2];
|
||||
assert!(game.players[1].objective_opportunities.is_empty());
|
||||
let mut game = game_api::execute(
|
||||
game,
|
||||
Action::Movement(MovementAction::Move(MoveUnits::new(
|
||||
(0..attacker_count).collect(),
|
||||
Position::from_offset("C1"),
|
||||
None,
|
||||
ResourcePile::empty(),
|
||||
))),
|
||||
0,
|
||||
);
|
||||
let turn_log = current_turn_log_without_redo(&game);
|
||||
let stats = turn_log
|
||||
.actions
|
||||
.iter()
|
||||
.find_map(|action| action.combat_stats.as_ref())
|
||||
.expect("the actual battle must record its result and casualties");
|
||||
assert_eq!(stats.result, Some(result.clone()));
|
||||
assert_eq!(stats.attacker.losses, infantry(2));
|
||||
assert_eq!(stats.defender.losses, infantry(2));
|
||||
|
||||
if result == CombatResult::AttackerWins {
|
||||
assert!(matches!(
|
||||
game.current_event_handler().map(|h| &h.request),
|
||||
Some(PersistentEventRequest::SelectPositions(_))
|
||||
));
|
||||
assert!(!has_defiance_prompt(&game));
|
||||
assert!(game.players[1].objective_opportunities.is_empty());
|
||||
game = game_api::execute(
|
||||
game.clone(),
|
||||
Action::Response(EventResponse::SelectPositions(vec![Position::from_offset(
|
||||
"B1",
|
||||
)])),
|
||||
1,
|
||||
);
|
||||
}
|
||||
|
||||
assert!(has_defiance_prompt(&game));
|
||||
assert_eq!(game.active_player(), 1);
|
||||
let PersistentEventRequest::SelectHandCards(request) =
|
||||
&game.current_event_handler().unwrap().request
|
||||
else {
|
||||
panic!("expected a Defiance objective card choice");
|
||||
};
|
||||
assert_eq!(
|
||||
request.choices,
|
||||
vec![HandCard::ObjectiveCard(27), HandCard::ObjectiveCard(28)]
|
||||
);
|
||||
assert!(game.players[1].completed_objectives.is_empty());
|
||||
|
||||
let game = game_api::execute(
|
||||
game.clone(), // persistence must preserve the pending objective choice
|
||||
Action::Response(EventResponse::SelectHandCards(vec![
|
||||
HandCard::ObjectiveCard(card),
|
||||
])),
|
||||
1,
|
||||
);
|
||||
let completed = &game.players[1].completed_objectives;
|
||||
assert_eq!(completed.len(), 1);
|
||||
assert_eq!(completed[0].card, card);
|
||||
assert_eq!(completed[0].name, "Resistance");
|
||||
assert_eq!(
|
||||
game.players[1].objective_cards,
|
||||
CARDS
|
||||
.into_iter()
|
||||
.filter(|&id| id != card)
|
||||
.collect::<Vec<_>>(),
|
||||
"one battle only completes one copy of Defiance"
|
||||
);
|
||||
assert!(game.events.is_empty());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1044,3 +1044,32 @@ smoke still expects `Battle · C1` rather than `Battle · Round 1`, and the lega
|
|||
playback smoke still expects the board toolbar to be hidden. Both failures were
|
||||
reproduced against the hash-verified published 0.1.205 viewer and engine 0.4.138;
|
||||
neither assertion was changed or suppressed.
|
||||
|
||||
# Viewer 0.1.207 / engine 0.4.139
|
||||
|
||||
Printed Defiance (objective cards 27 and 28, internally `Resistance`) is available
|
||||
immediately after defending a battle and eliminating at least two opposing army
|
||||
units, including barbarian armies. Winning is not required: defensive losses and
|
||||
draws qualify. Infantry, cavalry, elephants and leaders count; settlers, ships
|
||||
and the defender's own casualties do not. The card adds no land-only restriction.
|
||||
The separate internal `Defiance` objective, printed Against All Odds, is unchanged.
|
||||
Both card copies and all 17 locale catalogs use the corrected rule.
|
||||
|
||||
Publish the matching viewer and engine together. Package the generated Node
|
||||
bridge as `@boardgamers/clash-server` 0.4.139, then run
|
||||
`npm run publish:bgs -- --engine=/absolute/path/to/package.tgz` (first with
|
||||
`--dry-run`). Preserve all unrelated metadata and creation options, including
|
||||
the exact game-length labels/order and Standard default. Existing saves and
|
||||
completed objectives remain compatible; historical battles are not replayed or
|
||||
repaired. No live game moves or smaller-city experiment are included.
|
||||
|
||||
Verified with Rust 1.94.1 build/format/Clippy and 471 native workspace tests (one
|
||||
existing ignored test), 1,034 frontend tests against the packed engine, all 17
|
||||
locale catalogs and four extraction tests, Svelte checks (zero errors/warnings),
|
||||
production build and engine protocol checks. Seven native Defiance tests and
|
||||
WASM regressions cover both cards, casualty types, attacker/nonbattle exclusions,
|
||||
real defensive losses/draws, pending-choice persistence and one claim per battle.
|
||||
Combat, playback, recap-layout, battle-dice and Subterfuge browser smokes all pass
|
||||
against the packed engine. The previously stale combat/playback assertions were
|
||||
corrected separately in `786352b3` to retain coverage of current behavior. Clippy
|
||||
retains existing warnings; expected invalid-move rejection tests log WASM panics.
|
||||
|
|
|
|||
4
web-client/package-lock.json
generated
4
web-client/package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "@boardgamers/clash-web-client",
|
||||
"version": "0.1.206",
|
||||
"version": "0.1.207",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@boardgamers/clash-web-client",
|
||||
"version": "0.1.206",
|
||||
"version": "0.1.207",
|
||||
"dependencies": {
|
||||
"@boardgamers/protocol": "0.9.0",
|
||||
"lucide-svelte": "^0.577.0",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@boardgamers/clash-web-client",
|
||||
"version": "0.1.206",
|
||||
"version": "0.1.207",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
|
|
|||
128
web-client/src/defiance.test.ts
Normal file
128
web-client/src/defiance.test.ts
Normal file
|
|
@ -0,0 +1,128 @@
|
|||
import { test } from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import { createRequire } from 'node:module';
|
||||
import { readFile } from 'node:fs/promises';
|
||||
import { printedCardName } from './card-names.ts';
|
||||
import { createTranslator, languages } from './localization/runtime.js';
|
||||
import type { View } from './types.ts';
|
||||
|
||||
const engine = createRequire(import.meta.url)('../.engine/server.js');
|
||||
const rule =
|
||||
'Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).';
|
||||
|
||||
test('both printed Defiance cards show the defender casualty condition, not a victory condition', async () => {
|
||||
const game = JSON.parse(await engine.init(2, [], {}, 'defiance-card-text', {}));
|
||||
game.players[0].objective_cards = [27, 28, 7];
|
||||
const view: View = JSON.parse(engine.webView(engine.stripSecret(JSON.stringify(game), 0), 0));
|
||||
for (const id of [27, 28]) {
|
||||
const card = view.objectiveCards.find((card) => card.id === id)!;
|
||||
assert.ok(card, `held objective card ${id}`);
|
||||
const defiance = card.objectives.find((objective) => objective.name === 'Resistance')!;
|
||||
assert.ok(defiance);
|
||||
assert.equal(printedCardName(defiance.name, 'objective'), 'Defiance');
|
||||
assert.equal(defiance.timing, 'Instant');
|
||||
assert.equal(defiance.description, rule);
|
||||
assert.doesNotMatch(defiance.description, /won|win|victory/i);
|
||||
}
|
||||
// The legacy engine name "Defiance" belongs to a different printed objective.
|
||||
// Its victory requirement must not be changed by the Resistance/Defiance fix.
|
||||
const againstAllOdds = view.objectiveCards
|
||||
.find((card) => card.id === 7)!
|
||||
.objectives.find((objective) => objective.name === 'Defiance')!;
|
||||
assert.equal(printedCardName(againstAllOdds.name, 'objective'), 'Against All Odds');
|
||||
assert.equal(
|
||||
againstAllOdds.description,
|
||||
'You won a battle against a human player despite having fewer units than them.',
|
||||
);
|
||||
});
|
||||
|
||||
test('the engine offers and persists one Defiance claim after an actual defensive loss or draw', async () => {
|
||||
const npcs = JSON.parse(await engine.init(2, [], {}, 'defiance-battles', {})).players.slice(2);
|
||||
for (const card of [27, 28]) {
|
||||
for (const attackerCount of [2, 3]) {
|
||||
const game = JSON.parse(
|
||||
await readFile(
|
||||
new URL('../../server/tests/test_games/tactics_cards/heavy_resistance.json', import.meta.url),
|
||||
'utf8',
|
||||
),
|
||||
);
|
||||
for (const player of game.players) {
|
||||
player.objective_cards = [];
|
||||
player.action_cards = [];
|
||||
player.advances = ['Farming', 'Mining', 'Tactics'];
|
||||
}
|
||||
for (const npc of npcs) {
|
||||
if (!game.players.some((player: any) => player.civilization === npc.civilization)) {
|
||||
game.players.push({ ...npc, id: game.players.length });
|
||||
}
|
||||
}
|
||||
game.players[1].objective_cards = [27, 28];
|
||||
const units = Array.from({ length: attackerCount }, (_, id) => id);
|
||||
game.players[0].units = units.map((id) => ({ id, unit_type: 'Infantry', position: 'C2' }));
|
||||
game.players[0].next_unit_id = attackerCount;
|
||||
game.players[1].cities.push(
|
||||
...['B1', 'B3'].map((position) => ({ position, mood_state: 'Neutral' })),
|
||||
);
|
||||
game.dice_roll_outcomes = Array(attackerCount + 2).fill(11);
|
||||
let state = engine.tryMove(
|
||||
JSON.stringify(game),
|
||||
JSON.stringify({ Movement: { Move: { units, destination: 'C1', payment: {} } } }),
|
||||
0,
|
||||
);
|
||||
const afterBattle = JSON.parse(state);
|
||||
const stats = afterBattle.log
|
||||
.flatMap((age: any) => age.rounds ?? [])
|
||||
.flatMap((round: any) => round.turns ?? [])
|
||||
.flatMap((turn: any) => turn.actions ?? [])
|
||||
.find((action: any) => action.combat_stats)?.combat_stats;
|
||||
assert.equal(stats.result, attackerCount === 3 ? 'AttackerWins' : 'Draw');
|
||||
assert.deepEqual(stats.attacker.losses, { infantry: 2 });
|
||||
assert.deepEqual(stats.defender.losses, { infantry: 2 });
|
||||
assert.equal(engine.currentPlayer(state), 1);
|
||||
if (attackerCount === 3) {
|
||||
const view: View = JSON.parse(engine.webView(engine.stripSecret(state, 1), 1));
|
||||
assert.equal(view.decision?.name, 'Place Settler');
|
||||
assert.ok(!afterBattle.events.some((event: any) => event.event_type.SelectObjectives));
|
||||
state = engine.tryMove(state, JSON.stringify({ Response: { SelectPositions: ['B1'] } }), 1);
|
||||
}
|
||||
const pending = JSON.parse(state);
|
||||
const objective = pending.events.find((event: any) => event.event_type.SelectObjectives);
|
||||
assert.equal(objective.event_type.SelectObjectives.shown_objective, 'Resistance');
|
||||
assert.deepEqual(objective.handler.request.SelectHandCards.choices, [
|
||||
{ ObjectiveCard: 27 },
|
||||
{ ObjectiveCard: 28 },
|
||||
]);
|
||||
// The WASM API reloads this serialized pending choice before claiming it.
|
||||
const claimed = JSON.parse(
|
||||
engine.tryMove(
|
||||
JSON.stringify(pending),
|
||||
JSON.stringify({ Response: { SelectHandCards: [{ ObjectiveCard: card }] } }),
|
||||
1,
|
||||
),
|
||||
);
|
||||
assert.equal(claimed.players[1].completed_objectives.length, 1);
|
||||
assert.equal(claimed.players[1].completed_objectives[0].name, 'Resistance');
|
||||
assert.equal(claimed.players[1].completed_objectives[0].card, card);
|
||||
assert.deepEqual(claimed.players[1].objective_cards, [card === 27 ? 28 : 27]);
|
||||
assert.equal(claimed.events?.length ?? 0, 0, 'the second copy is not offered again');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
test('the corrected Defiance rule is translated in every viewer locale', async () => {
|
||||
for (const locale of Object.keys(languages)) {
|
||||
const catalog = JSON.parse(
|
||||
await readFile(new URL(`./localization/${locale}.json`, import.meta.url), 'utf8'),
|
||||
);
|
||||
assert.ok(Object.hasOwn(catalog, rule), `${locale}: corrected rule exists`);
|
||||
const translator = createTranslator({ [locale]: catalog }, locale);
|
||||
assert.equal(translator.translate(rule), catalog[rule]);
|
||||
assert.ok(catalog[rule].length > 0);
|
||||
if (locale !== 'en') assert.notEqual(catalog[rule], rule, `${locale}: no English fallback`);
|
||||
assert.equal(
|
||||
Object.hasOwn(catalog, 'You won a battle as defender and killed at least 2 enemy units.'),
|
||||
false,
|
||||
`${locale}: obsolete victory rule removed`,
|
||||
);
|
||||
}
|
||||
});
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
"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.",
|
||||
"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.",
|
||||
"You won a battle as defender and killed at least 2 enemy units.": "Du vandt et slag som forsvarer og dræbte mindst 2 fjendtlige enheder.",
|
||||
"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",
|
||||
"# Errors": "# Fejl",
|
||||
"# Panics": "# Panikker",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"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.",
|
||||
"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.",
|
||||
"You won a battle as defender and killed at least 2 enemy units.": "Du hast als Verteidiger eine Schlacht gewonnen und mindestens 2 feindliche Einheiten vernichtet.",
|
||||
"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",
|
||||
"# Errors": "# Fehler",
|
||||
"# Panics": "# Paniken",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"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 μάρκες πολιτισμού. Απόρριψε αυτή την κάρτα αν κάποιος παίκτης επιτεθεί στον άλλον. Μπορείς να απορρίψεις την κάρτα ως κανονική ενέργεια.",
|
||||
"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.": "Αμέσως μετά την κατασκευή του πρώτου Θαύματος στο παιχνίδι, ή στη Φάση Κατάστασης αν ήσουν ο μόνος παίκτης που κατασκεύασε Θαύματα στον τελευταίο γύρο.",
|
||||
"You won a battle as defender and killed at least 2 enemy units.": "Κέρδισες μάχη ως αμυνόμενος και εξόντωσες τουλάχιστον 2 εχθρικές μονάδες.",
|
||||
"Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).": "Αμέσως μετά από μάχη στην οποία δεχτήκατε επίθεση και εξοντώσατε τουλάχιστον 2 στρατιωτικές μονάδες (συμπεριλαμβανομένων των βαρβαρικών μονάδων).",
|
||||
"# Arguments": "# Ορίσματα",
|
||||
"# Errors": "# Σφάλματα",
|
||||
"# Panics": "# Πανικοί",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"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.",
|
||||
"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.",
|
||||
"You won a battle as defender and killed at least 2 enemy units.": "You won a battle as defender and killed at least 2 enemy 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",
|
||||
"_tokens": "_tokens",
|
||||
"- all options are": "- all options are",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"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} بازیکن دیگری انتخاب کنید. مگر با پرداخت ۲ نشان فرهنگ از مهاجم به مدافع، به هم حمله نمیکنید. اگر یکی حمله کرد، این کارت را دور بیندازید. میتوانید با اقدام عادی هم کارت را دور بیندازید.",
|
||||
"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.": "بلافاصله پس از ساخت نخستین شگفتی بازی، یا در مرحله وضعیت اگر تنها بازیکنی بودید که در دور گذشته شگفتی ساخته است.",
|
||||
"You won a battle as defender and killed at least 2 enemy units.": "در یک نبرد بهعنوان مدافع پیروز شدید و دستکم ۲ واحد دشمن را از بین بردید.",
|
||||
"Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).": "بلافاصله پس از نبردی که در آن به شما حمله شده و دستکم ۲ واحد نظامی را نابود کردهاید (از جمله واحدهای نظامی بربر).",
|
||||
"# Arguments": "# Arguments",
|
||||
"# Errors": "# Errors",
|
||||
"# Panics": "# Panics",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"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.",
|
||||
"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.",
|
||||
"You won a battle as defender and killed at least 2 enemy units.": "Vous avez remporté une bataille en tant que défenseur et éliminé au moins 2 unités ennemies.",
|
||||
"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",
|
||||
"# Errors": "# Erreurs",
|
||||
"# Panics": "# Paniques",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"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 संस्कृति टोकन का भुगतान न करे। यदि कोई भी खिलाड़ी दूसरे पर हमला करता है तो यह कार्ड त्याग दें। आप नियमित क्रिया के रूप में कार्ड त्याग सकते हैं।",
|
||||
"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.": "खेल का पहला अजूबा बनाने के तुरंत बाद, या स्थिति चरण में यदि पिछले दौर में केवल आपने अजूबे बनाए थे।",
|
||||
"You won a battle as defender and killed at least 2 enemy units.": "आपने रक्षक के रूप में लड़ाई जीती और कम से कम 2 शत्रु इकाइयाँ नष्ट कीं।",
|
||||
"Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).": "उस लड़ाई के तुरंत बाद जिसमें आप पर हमला हुआ और आपने कम से कम 2 सैन्य इकाइयाँ नष्ट कीं (बर्बर सैन्य इकाइयों सहित)।",
|
||||
"# Arguments": "# तर्क",
|
||||
"# Errors": "# त्रुटियाँ",
|
||||
"# Panics": "# घबराहटें",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"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.",
|
||||
"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.",
|
||||
"You won a battle as defender and killed at least 2 enemy units.": "Hai vinto una battaglia come difensore ed eliminato almeno 2 unità nemiche.",
|
||||
"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",
|
||||
"# Errors": "# Errori",
|
||||
"# Panics": "# Panici",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"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개를 지불하지 않으면 서로 공격할 수 없습니다. 어느 플레이어가 다른 플레이어를 공격하면 이 카드를 버립니다. 일반 행동으로 카드를 버릴 수 있습니다.",
|
||||
"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.": "게임의 첫 불가사의를 건설한 직후, 또는 지난 라운드에 불가사의를 건설한 유일한 플레이어라면 상태 단계에 달성합니다.",
|
||||
"You won a battle as defender and killed at least 2 enemy units.": "방어자로서 전투에서 승리하고 적 유닛을 최소 2개 제거했습니다.",
|
||||
"Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).": "공격을 받아 군대 유닛을 2개 이상 제거한 전투 직후에 완료합니다(야만인 군대 유닛 포함).",
|
||||
"# Arguments": "# 인수",
|
||||
"# Errors": "# 오류",
|
||||
"# Panics": "# 패닉",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"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.",
|
||||
"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.",
|
||||
"You won a battle as defender and killed at least 2 enemy units.": "Je won een gevecht als verdediger en doodde minstens 2 vijandelijke eenheden.",
|
||||
"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",
|
||||
"# Errors": "# Fouten",
|
||||
"# Panics": "# Panieks",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"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ę.",
|
||||
"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.",
|
||||
"You won a battle as defender and killed at least 2 enemy units.": "Wygrałeś bitwę jako obrońca i zniszczyłeś co najmniej 2 wrogie jednostki.",
|
||||
"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",
|
||||
"# Errors": "# Błędy",
|
||||
"# Panics": "# Paniki",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"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.",
|
||||
"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.",
|
||||
"You won a battle as defender and killed at least 2 enemy units.": "Você venceu uma batalha como defensor e eliminou pelo menos 2 unidades inimigas.",
|
||||
"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",
|
||||
"# Errors": "# Erros",
|
||||
"# Panics": "# Pânicos",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"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ă.",
|
||||
"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ă.",
|
||||
"You won a battle as defender and killed at least 2 enemy units.": "Ai câștigat o bătălie ca apărător și ai eliminat cel puțin 2 unități inamice.",
|
||||
"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",
|
||||
"# Errors": "# Erori",
|
||||
"# Panics": "# Panici",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"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 жетона культуры. Сбросьте эту карту, если один из игроков атакует другого. Вы можете сбросить карту как обычное действие.",
|
||||
"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.": "Сразу после постройки первого чуда в игре или в фазе статуса, если только вы строили чудеса в последнем раунде.",
|
||||
"You won a battle as defender and killed at least 2 enemy units.": "Вы выиграли битву, в качестве защитника, и уничтожили не менее 2 вражеских отрядов.",
|
||||
"Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).": "Сразу после битвы, в которой на вас напали и вы уничтожили не менее 2 воинских отрядов (включая варварские).",
|
||||
"# Arguments": "# Аргументы",
|
||||
"# Errors": "# Ошибки",
|
||||
"# Panics": "# Паники",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"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.",
|
||||
"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.",
|
||||
"You won a battle as defender and killed at least 2 enemy units.": "Bạn thắng trận với vai trò phòng thủ và tiêu diệt ít nhất 2 đơn vị địch.",
|
||||
"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ố",
|
||||
"# Errors": "# Lỗi",
|
||||
"# Panics": "# Hoảng loạn",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"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枚文化标记,否则你们不能互相攻击。任一玩家攻击另一方时弃置此卡。你也可以用一次常规行动弃置此卡。",
|
||||
"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.": "建造本局首座奇迹后立即完成;或在状态阶段完成,条件是上一轮只有你建造过奇迹。",
|
||||
"You won a battle as defender and killed at least 2 enemy units.": "你作为防守方在战斗中获胜,并消灭了至少2个敌方单位。",
|
||||
"Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).": "在你受到攻击并消灭了至少2个军队单位(包括蛮族军队单位)的战斗结束后立即完成。",
|
||||
"_blank": "_blank",
|
||||
"_tokens": "_tokens",
|
||||
"- all options are": "- 所有选项均为",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"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個文化標記,否則你們不能互相攻擊。若任一方攻擊另一方,棄掉此卡。你可以將棄掉此卡作為一個常規行動。",
|
||||
"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.": "建造本局首座奇觀後立即完成;或在狀態階段完成,條件是上一輪只有你建造過奇觀。",
|
||||
"You won a battle as defender and killed at least 2 enemy units.": "你作為防守方在戰鬥中獲勝,並消滅了至少2個敵方單位。",
|
||||
"Immediately after a battle where you were attacked and eliminated at least 2 army units (including barbarian army units).": "在你受到攻擊並消滅了至少2個軍隊單位(包含蠻族軍隊單位)的戰鬥結束後立即完成。",
|
||||
"# Arguments": "# 參數",
|
||||
"# Errors": "# 錯誤",
|
||||
"# Panics": "# 恐慌",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue