Confirm diplomatic attacks and discard Great Diplomat when agreements end

This commit is contained in:
coyotte508 2026-10-08 23:25:48 +02:00
commit 54b2fc98a9
29 changed files with 286 additions and 50 deletions

View file

@ -590,7 +590,13 @@ pub(crate) fn move_with_possible_combat(game: &mut Game, player_index: usize, m:
return;
}
// there was no combat
// Capturing an undefended city or settlers is still an attack, even
// though it skips the combat-start listeners.
crate::content::incidents::great_diplomat::end_diplomatic_relations_on_attack(
game,
player_index,
defender,
);
let mut stats = new_combat_stats(
game,
defender,

View file

@ -1,8 +1,12 @@
use crate::ability_initializer::AbilityInitializerSetup;
use crate::action_card::ActionCard;
use crate::action_card::{ActionCard, discard_action_card};
use crate::card::HandCardLocation;
use crate::content::ability::Ability;
use crate::content::effects::PermanentEffect;
use crate::content::incidents::great_persons::{GreatPersonType, great_person_card};
use crate::content::incidents::great_persons::{
GREAT_PERSON_OFFSET, GreatPersonType, great_person_card,
};
use crate::events::{EventOrigin, EventPlayer};
use crate::game::Game;
use crate::incident::IncidentBuilder;
use crate::player_events::IncidentTarget;
@ -31,7 +35,7 @@ pub(crate) fn great_diplomat() -> ActionCard {
|game, p, _| {
p.log(game, "Ended diplomatic relations.");
remove_element_by(&mut game.permanent_effects, |e| {
matches!(e, PermanentEffect::DiplomaticRelations(_))
matches!(e, PermanentEffect::DiplomaticRelations(r) if r.active_player == p.index)
});
},
)
@ -97,24 +101,51 @@ pub(crate) fn use_diplomatic_relations() -> Ability {
.add_simple_persistent_event_listener(
|e| &mut e.combat_start,
2,
|game, p, _| {
if let Some(partner) = diplomatic_relations_partner(game, p.index) {
p.log(
game,
&format!(
"Diplomatic relations with {} ended with a surprise attack.",
game.player_name(partner),
),
);
remove_element_by(&mut game.permanent_effects, |e| {
matches!(e, PermanentEffect::DiplomaticRelations(_))
});
}
|game, _, combat| {
end_diplomatic_relations_on_attack(game, combat.attacker(), combat.defender());
},
)
.build()
}
pub(crate) fn end_diplomatic_relations_on_attack(
game: &mut Game,
attacker: usize,
defender: usize,
) {
let Some(PermanentEffect::DiplomaticRelations(relations)) = remove_element_by(
&mut game.permanent_effects,
|e| matches!(e, PermanentEffect::DiplomaticRelations(r) if r.partner(attacker) == Some(defender)),
) else {
return;
};
let player = EventPlayer::new(
attacker,
EventOrigin::Ability("Diplomatic Relations".into()),
);
player.log(
game,
&format!(
"Diplomatic relations with {} ended with a surprise attack.",
game.player_name(defender),
),
);
let card = DIPLOMAT_ID + GREAT_PERSON_OFFSET;
if game
.player(relations.active_player)
.action_cards
.contains(&card)
{
discard_action_card(
game,
relations.active_player,
card,
&player.origin,
HandCardLocation::DiscardPile,
);
}
}
pub(crate) fn diplomatic_relations_partner(game: &Game, p: usize) -> Option<usize> {
game.permanent_effects.iter().find_map(|e| {
if let PermanentEffect::DiplomaticRelations(d) = e {

View file

@ -84,7 +84,9 @@ fn add_diplomatic_relations(player: &Player, game: &Game, base: &mut Vec<MoveRou
if let Some(partner) = diplomatic_relations_partner(game, player.index) {
let partner = game.player(partner);
for r in base {
if !partner.get_units(r.destination).is_empty() {
if !partner.get_units(r.destination).is_empty()
|| partner.try_get_city(r.destination).is_some()
{
r.cost.default += ResourcePile::culture_tokens(2);
r.cost.modifiers.push(EventOrigin::Incident(DIPLOMAT_ID));
}

View file

@ -239,7 +239,14 @@ pub fn movement(game: &Game, seat: usize, units: Vec<u32>) -> Result<Value, Stri
for carrier in carriers {
for route in possible_move_routes(p, game, &units, start, carrier).unwrap_or_default() {
if let Some(payment) = route.cost.first_valid_payment(&p.resources) {
let offer = json!({"position":route.destination,"terrain":game.map.get(route.destination),"terrainNotes":terrain_notes(game,p,&units,route.destination),"payment":payment,"carrier":carrier,"attack":game.enemy_player(seat,route.destination).is_some(),
let breaks_diplomacy =
route
.cost
.modifiers
.contains(&crate::events::EventOrigin::Incident(
crate::content::incidents::great_diplomat::DIPLOMAT_ID,
));
let offer = json!({"position":route.destination,"terrain":game.map.get(route.destination),"terrainNotes":terrain_notes(game,p,&units,route.destination),"payment":payment,"carrier":carrier,"attack":game.enemy_player(seat,route.destination).is_some(),"breaksDiplomacy":breaks_diplomacy,
"action":Action::Movement(MovementAction::Move(MoveUnits::new(units.clone(),route.destination,carrier,payment)))});
if !destinations.contains(&offer) {
destinations.push(offer);

View file

@ -94,9 +94,6 @@
"Tactics"
],
"incident_tokens": 3,
"action_cards": [
157
],
"next_unit_id": 8
},
{
@ -470,6 +467,21 @@
"Ability": "Diplomatic Relations"
}
},
{
"player": 0,
"HandCard": {
"card": {
"ActionCard": 157
},
"from": {
"Hand": 0
},
"to": "DiscardPile"
},
"origin": {
"Ability": "Diplomatic Relations"
}
},
{
"player": 0,
"CombatRoll": {
@ -585,6 +597,9 @@
"wonders_left": [
"Pyramids"
],
"action_cards_discarded": [
157
],
"incidents_discarded": [
57
]

View file

@ -71,3 +71,5 @@ Viewer 0.1.35 and engine 0.4.44 explain why a Settler cannot found a city. Inste
Viewer 0.1.36 and engine 0.4.45 fix collecting multiple resources from a single tile by selecting another tile in between. The engine totals all selections by position, regardless of their order. In normal collection, clicking another resource on the same tile replaces its previous choice, even at full city capacity; Production Focus still permits repeated collections within its limits. The controls, bonus hints and storage previews share the same selection logic. Publish the matching viewer and engine together.
Viewer 0.1.37 and engine 0.4.46 skip the payment prompt when New Ideas or Synergies researches a resource-free advance, including Math, Astronomy and Priesthood discounts. Research bonuses still resolve, New Ideas still grants 2 ideas, and Priesthood's once-per-turn use is recorded. The research confirmation says Free for these choices. Already-saved zero-cost payment prompts remain valid and are labelled Free. Publish the matching viewer and engine together.
Viewer 0.1.38 and engine 0.4.47 explicitly confirm attacks that break Great Diplomat agreements, explaining the 2-culture cost and card discard with resource icons. Capturing an undefended city or settlers now ends the agreement and discards its owner's Great Diplomat, just like a battle with defenders. Empty cities also require the diplomatic payment. Attacks involving a third party preserve the agreement. All supported locales include the confirmation. Publish the matching viewer and engine together.

View file

@ -1,12 +1,12 @@
{
"name": "@boardgamers/clash-web-client",
"version": "0.1.37",
"version": "0.1.38",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@boardgamers/clash-web-client",
"version": "0.1.37",
"version": "0.1.38",
"dependencies": {
"@boardgamers/protocol": "0.9.0",
"lucide-svelte": "^0.577.0",

View file

@ -1,6 +1,6 @@
{
"name": "@boardgamers/clash-web-client",
"version": "0.1.37",
"version": "0.1.38",
"private": true,
"type": "module",
"scripts": {

View file

@ -13,6 +13,7 @@
} from 'lucide-svelte';
import type { Controller } from './controller';
import ResourceAmount from './ResourceAmount.svelte';
import ResourceText from './ResourceText.svelte';
import TerrainIcon from './TerrainIcon.svelte';
import TerrainRules from './TerrainRules.svelte';
import UnitPicker from './UnitPicker.svelte';
@ -200,6 +201,21 @@
terrain={destination.terrain}
notes={destination.terrainNotes}
/>{/if}
{#if destination?.breaksDiplomacy}
<div class="diplomacy-warning" role="alert">
<strong><TriangleAlert size={16} />Great Diplomat</strong>
<p>
<ResourceText
text="This attack costs 2 culture tokens, ends your diplomatic agreement and discards Great Diplomat."
/>
</p>
<button
class="secondary"
disabled={$session.pending}
onclick={() => controller.patch({ moveTarget: null, moveDestination: null })}>Cancel</button
>
</div>
{/if}
{#if destination}<div class="settler-confirm">
{#if Object.values(destination.payment).some(Boolean)}<ResourceAmount pile={destination.payment} />{/if}
<button
@ -207,15 +223,17 @@
disabled={$session.pending}
onclick={() => controller.submit(destination.action)}
>
{destination.attack
? 'Attack'
: destination.carrier != null || destination.pirateCarrier != null
? 'Board ship'
: destination.terrain === 'Unexplored'
? 'Explore'
: disembarking
? 'Disembark'
: 'Move here'}
{destination.breaksDiplomacy
? 'Break agreement & attack'
: destination.attack
? 'Attack'
: destination.carrier != null || destination.pirateCarrier != null
? 'Board ship'
: destination.terrain === 'Unexplored'
? 'Explore'
: disembarking
? 'Disembark'
: 'Move here'}
{#if !$session.view?.stopMovement}<span class="settler-action-cost" aria-label="Costs 1 action"
><Zap size={13} />1</span
>{/if}<ArrowRight size={16} />

View file

@ -277,6 +277,37 @@ test('turning off move confirmation submits plain map moves but still confirms a
}
});
test('a diplomatic attack waits for explicit confirmation even with move confirmation disabled', async () => {
const app = paymentController(),
c = app.controller;
try {
const game = JSON.parse(fixture('movement/movement'));
game.players[0].advances.push('Tactics');
game.players[1].units = [];
game.players[1].action_cards = [157];
game.permanent_effects = [{ DiplomaticRelations: { active_player: 1, passive_player: 0 } }];
c.setPlayer(0);
await c.load(engine.stripSecret(JSON.stringify(game), 0));
c.setPreferences({ confirmMoves: false });
c.openUnits([0]);
c.selectTile('C1');
const destination = app.session().moveDestinations[app.session().moveDestination!];
assert.equal(destination.breaksDiplomacy, true);
assert.deepEqual(destination.payment, { culture_tokens: 2 });
assert.deepEqual(app.sent, []);
c.patch({ moveTarget: null, moveDestination: null });
assert.deepEqual(app.sent, [], 'Cancel leaves the agreement and units untouched');
c.selectTile('C1');
c.submit(destination.action);
assert.deepEqual(
app.sent.map((s) => JSON.parse(s)),
[destination.action],
);
} finally {
app.close();
}
});
test('map happiness selects multiple cities, preserves them across variants, and confirms together', async () => {
const app = paymentController(),
c = app.controller;

View file

@ -0,0 +1,73 @@
import { test } from 'node:test';
import assert from 'node:assert/strict';
import { createRequire } from 'node:module';
import { readFileSync } from 'node:fs';
import { instantMove } from './map-actions.ts';
const engine = createRequire(import.meta.url)('../.engine/server.js');
const npcs = JSON.parse(await engine.init(2, [], {}, 'diplomacy', {})).players.slice(2);
function fixture(owner = 0, target = 'army') {
const game = JSON.parse(
readFileSync(new URL('../../server/tests/test_games/movement/movement.json', import.meta.url), 'utf8'),
);
game.players.push(...structuredClone(npcs));
game.players[0].advances.push('Tactics');
game.players[owner].action_cards = [157];
game.permanent_effects = [{ DiplomaticRelations: { active_player: owner, passive_player: 1 - owner } }];
if (target !== 'army') game.players[1].units = [];
if (target === 'settler') {
game.players[1].cities[0].position = 'A3';
game.players[1].units = [{ id: 0, position: 'C1', unit_type: 'Settler' }];
}
if (target === 'fortress') game.players[1].cities[0].city_pieces = { fortress: 1 };
return game;
}
function destinations(game: unknown) {
const raw = JSON.stringify(game);
return JSON.parse(
engine.webQuery(engine.stripSecret(raw, 0), 0, JSON.stringify({ kind: 'movement', units: [0] })),
).destinations;
}
const move = (game: unknown, action: unknown) =>
JSON.parse(engine.tryMove(JSON.stringify(game), JSON.stringify(action), 0));
for (const owner of [0, 1]) {
for (const target of ['army', 'city', 'settler', 'fortress']) {
test(`attacking a linked ${target} discards Great Diplomat held by player ${owner}`, () => {
const game = fixture(owner, target);
const offered = destinations(game);
const attack = offered.find((d: any) => d.position === 'C1');
assert.ok(attack?.attack);
assert.equal(attack.breaksDiplomacy, true);
assert.deepEqual(attack.payment, { culture_tokens: 2 });
assert.equal(instantMove(offered, 'C1'), null, 'Breaking diplomacy always requires confirmation');
const after = move(game, attack.action);
assert.equal(after.players[0].resources.culture_tokens, game.players[0].resources.culture_tokens - 2);
assert.ok(!after.permanent_effects?.some((e: any) => e.DiplomaticRelations));
assert.ok(!after.players[owner].action_cards?.includes(157));
assert.equal(after.action_cards_discarded.filter((id: number) => id === 157).length, 1);
if (target === 'city') assert.ok(after.players[0].cities.some((c: any) => c.position === 'C1'));
});
}
}
test('an undefended linked city still requires the diplomatic payment', () => {
const game = fixture(1, 'city');
game.players[0].resources.culture_tokens = 1;
assert.ok(!destinations(game).some((d: any) => d.position === 'C1'));
assert.throws(() => move(game, { Movement: { Move: { units: [0], destination: 'C1' } } }));
});
test('attacking barbarians preserves diplomatic relations with another player and their card', () => {
const game = fixture(1);
const barbarians = game.players.find((p: any) => p.civilization === 'Barbarians');
barbarians.units = [{ id: 0, position: 'B1', unit_type: 'Infantry' }];
const attack = destinations(game).find((d: any) => d.position === 'B1');
assert.ok(attack?.attack);
assert.equal(attack.breaksDiplomacy, false);
assert.deepEqual(attack.payment, {});
const after = move(game, attack.action);
assert.deepEqual(after.permanent_effects, game.permanent_effects);
assert.ok(after.players[1].action_cards.includes(157));
assert.ok(!after.action_cards_discarded?.includes(157));
});

View file

@ -4646,5 +4646,7 @@
"Remove 1 Obelisk from your supply and gain 1 objective point.": "Fjern 1 Obelisk fra dit lager, og få 1 målpoint.",
"Keep the Obelisk in your supply; gain no point.": "Behold Obelisken i dit lager; få intet point.",
"Click a highlighted city or building on the map, or choose below.": "Klik på en fremhævet by eller bygning på kortet, eller vælg nedenfor.",
"Choose target": "Vælg mål"
"Choose target": "Vælg mål",
"Break agreement & attack": "Bryd aftalen og angrib",
"This attack costs 2 culture tokens, ends your diplomatic agreement and discards Great Diplomat.": "Dette angreb koster 2 kulturpoletter, afslutter jeres diplomatiske aftale og kasserer Stor diplomat."
}

View file

@ -4646,5 +4646,7 @@
"Remove 1 Obelisk from your supply and gain 1 objective point.": "Entferne 1 Obelisken aus deinem Vorrat und erhalte 1 Zielpunkt.",
"Keep the Obelisk in your supply; gain no point.": "Behalte den Obelisken in deinem Vorrat; du erhältst keinen Punkt.",
"Click a highlighted city or building on the map, or choose below.": "Klicke auf eine hervorgehobene Stadt oder ein Gebäude auf der Karte oder wähle unten aus.",
"Choose target": "Ziel wählen"
"Choose target": "Ziel wählen",
"Break agreement & attack": "Abkommen brechen und angreifen",
"This attack costs 2 culture tokens, ends your diplomatic agreement and discards Great Diplomat.": "Dieser Angriff kostet 2 Kulturmarker, beendet euer diplomatisches Abkommen und wirft den Großen Diplomaten ab."
}

View file

@ -4646,5 +4646,7 @@
"Remove 1 Obelisk from your supply and gain 1 objective point.": "Αφαίρεσε 1 Οβελίσκο από το απόθεμά σου και κέρδισε 1 πόντο στόχου.",
"Keep the Obelisk in your supply; gain no point.": "Κράτησε τον Οβελίσκο στο απόθεμά σου· δεν κερδίζεις πόντο.",
"Click a highlighted city or building on the map, or choose below.": "Κάντε κλικ σε μια επισημασμένη πόλη ή ένα κτίριο στον χάρτη ή επιλέξτε παρακάτω.",
"Choose target": "Επιλογή στόχου"
"Choose target": "Επιλογή στόχου",
"Break agreement & attack": "Λήξη συμφωνίας και επίθεση",
"This attack costs 2 culture tokens, ends your diplomatic agreement and discards Great Diplomat.": "Αυτή η επίθεση κοστίζει 2 δείκτες πολιτισμού, τερματίζει τη διπλωματική σας συμφωνία και απορρίπτει τον Μεγάλο Διπλωμάτη."
}

View file

@ -4646,5 +4646,7 @@
"Remove 1 Obelisk from your supply and gain 1 objective point.": "Remove 1 Obelisk from your supply and gain 1 objective point.",
"Keep the Obelisk in your supply; gain no point.": "Keep the Obelisk in your supply; gain no point.",
"Click a highlighted city or building on the map, or choose below.": "Click a highlighted city or building on the map, or choose below.",
"Choose target": "Choose target"
"Choose target": "Choose target",
"Break agreement & attack": "Break agreement & attack",
"This attack costs 2 culture tokens, ends your diplomatic agreement and discards Great Diplomat.": "This attack costs 2 culture tokens, ends your diplomatic agreement and discards Great Diplomat."
}

View file

@ -4646,5 +4646,7 @@
"Remove 1 Obelisk from your supply and gain 1 objective point.": "۱ ابلیسک از ذخیرهٔ خود حذف کنید و ۱ امتیاز هدف بگیرید.",
"Keep the Obelisk in your supply; gain no point.": "ابلیسک را در ذخیرهٔ خود نگه دارید؛ امتیازی نمی‌گیرید.",
"Click a highlighted city or building on the map, or choose below.": "روی شهر یا ساختمان مشخص‌شده روی نقشه کلیک کنید یا از پایین انتخاب کنید.",
"Choose target": "انتخاب هدف"
"Choose target": "انتخاب هدف",
"Break agreement & attack": "پایان توافق و حمله",
"This attack costs 2 culture tokens, ends your diplomatic agreement and discards Great Diplomat.": "این حمله 2 نشان فرهنگ هزینه دارد، توافق دیپلماتیک شما را پایان می‌دهد و کارت دیپلمات بزرگ را دور می‌اندازد."
}

View file

@ -4646,5 +4646,7 @@
"Remove 1 Obelisk from your supply and gain 1 objective point.": "Retirez 1 Obélisque de votre réserve et gagnez 1 point d’objectif.",
"Keep the Obelisk in your supply; gain no point.": "Gardez l’Obélisque dans votre réserve ; vous ne gagnez aucun point.",
"Click a highlighted city or building on the map, or choose below.": "Cliquez sur une ville ou un bâtiment en surbrillance sur la carte, ou choisissez ci-dessous.",
"Choose target": "Choisir la cible"
"Choose target": "Choisir la cible",
"Break agreement & attack": "Rompre l’accord et attaquer",
"This attack costs 2 culture tokens, ends your diplomatic agreement and discards Great Diplomat.": "Cette attaque coûte 2 jetons de culture, met fin à votre accord diplomatique et défausse le Grand diplomate."
}

View file

@ -4646,5 +4646,7 @@
"Remove 1 Obelisk from your supply and gain 1 objective point.": "आपूर्ति से 1 ओबिलिस्क हटाएँ और 1 उद्देश्य अंक पाएँ।",
"Keep the Obelisk in your supply; gain no point.": "ओबिलिस्क आपूर्ति में रखें; कोई अंक नहीं मिलता।",
"Click a highlighted city or building on the map, or choose below.": "मानचित्र पर हाइलाइट किए गए नगर या भवन पर क्लिक करें, या नीचे से चुनें।",
"Choose target": "लक्ष्य चुनें"
"Choose target": "लक्ष्य चुनें",
"Break agreement & attack": "समझौता तोड़ें और हमला करें",
"This attack costs 2 culture tokens, ends your diplomatic agreement and discards Great Diplomat.": "इस हमले में 2 संस्कृति टोकन खर्च होंगे, आपका राजनयिक समझौता समाप्त होगा और महान राजनयिक कार्ड त्याग दिया जाएगा।"
}

View file

@ -4646,5 +4646,7 @@
"Remove 1 Obelisk from your supply and gain 1 objective point.": "Rimuovi 1 Obelisco dalla tua riserva e ottieni 1 punto obiettivo.",
"Keep the Obelisk in your supply; gain no point.": "Tieni l’Obelisco nella tua riserva; non ottieni punti.",
"Click a highlighted city or building on the map, or choose below.": "Fai clic su una città o un edificio evidenziato sulla mappa, oppure scegli qui sotto.",
"Choose target": "Scegli il bersaglio"
"Choose target": "Scegli il bersaglio",
"Break agreement & attack": "Rompi l’accordo e attacca",
"This attack costs 2 culture tokens, ends your diplomatic agreement and discards Great Diplomat.": "Questo attacco costa 2 segnalini cultura, pone fine al vostro accordo diplomatico e scarta il Grande Diplomatico."
}

View file

@ -4646,5 +4646,7 @@
"Remove 1 Obelisk from your supply and gain 1 objective point.": "공급처에서 오벨리스크 1개를 제거하고 목표 점수 1점을 얻습니다.",
"Keep the Obelisk in your supply; gain no point.": "오벨리스크를 공급처에 유지합니다. 점수를 얻지 않습니다.",
"Click a highlighted city or building on the map, or choose below.": "지도에서 강조된 도시나 건물을 클릭하거나 아래에서 선택하세요.",
"Choose target": "대상 선택"
"Choose target": "대상 선택",
"Break agreement & attack": "협정을 깨고 공격",
"This attack costs 2 culture tokens, ends your diplomatic agreement and discards Great Diplomat.": "이 공격은 문화 토큰 2개를 소비하고 외교 협정을 종료하며 위대한 외교관 카드를 버립니다."
}

View file

@ -4646,5 +4646,7 @@
"Remove 1 Obelisk from your supply and gain 1 objective point.": "Verwijder 1 Obelisk uit je voorraad en ontvang 1 doeloverwinningspunt.",
"Keep the Obelisk in your supply; gain no point.": "Behoud de Obelisk in je voorraad; je ontvangt geen punt.",
"Click a highlighted city or building on the map, or choose below.": "Klik op een gemarkeerde stad of een gemarkeerd gebouw op de kaart, of kies hieronder.",
"Choose target": "Doel kiezen"
"Choose target": "Doel kiezen",
"Break agreement & attack": "Verbreek overeenkomst en val aan",
"This attack costs 2 culture tokens, ends your diplomatic agreement and discards Great Diplomat.": "Deze aanval kost 2 cultuurfiches, beëindigt jullie diplomatieke overeenkomst en legt Groot Diplomaat af."
}

View file

@ -4646,5 +4646,7 @@
"Remove 1 Obelisk from your supply and gain 1 objective point.": "Usuń 1 Obelisk ze swojej rezerwy i zdobądź 1 punkt celu.",
"Keep the Obelisk in your supply; gain no point.": "Zachowaj Obelisk w swojej rezerwie; nie zdobywasz punktu.",
"Click a highlighted city or building on the map, or choose below.": "Kliknij podświetlone miasto lub budynek na mapie albo wybierz poniżej.",
"Choose target": "Wybierz cel"
"Choose target": "Wybierz cel",
"Break agreement & attack": "Zerwij porozumienie i zaatakuj",
"This attack costs 2 culture tokens, ends your diplomatic agreement and discards Great Diplomat.": "Ten atak kosztuje 2 żetony kultury, kończy wasze porozumienie dyplomatyczne i powoduje odrzucenie Wielkiego dyplomaty."
}

View file

@ -4646,5 +4646,7 @@
"Remove 1 Obelisk from your supply and gain 1 objective point.": "Remova 1 Obelisco da sua reserva e ganhe 1 ponto de objetivo.",
"Keep the Obelisk in your supply; gain no point.": "Mantenha o Obelisco na sua reserva; não ganhe ponto.",
"Click a highlighted city or building on the map, or choose below.": "Clique em uma cidade ou construção destacada no mapa ou escolha abaixo.",
"Choose target": "Escolher alvo"
"Choose target": "Escolher alvo",
"Break agreement & attack": "Romper acordo e atacar",
"This attack costs 2 culture tokens, ends your diplomatic agreement and discards Great Diplomat.": "Este ataque custa 2 fichas de cultura, encerra seu acordo diplomático e descarta o Grande Diplomata."
}

View file

@ -4646,5 +4646,7 @@
"Remove 1 Obelisk from your supply and gain 1 objective point.": "Elimină 1 Obelisc din rezerva ta și câștigă 1 punct de obiectiv.",
"Keep the Obelisk in your supply; gain no point.": "Păstrează Obeliscul în rezerva ta; nu câștigi niciun punct.",
"Click a highlighted city or building on the map, or choose below.": "Dă clic pe un oraș sau o clădire evidențiată pe hartă ori alege mai jos.",
"Choose target": "Alege ținta"
"Choose target": "Alege ținta",
"Break agreement & attack": "Rupe acordul și atacă",
"This attack costs 2 culture tokens, ends your diplomatic agreement and discards Great Diplomat.": "Acest atac costă 2 jetoane de cultură, încheie acordul vostru diplomatic și aruncă Marele diplomat."
}

View file

@ -4646,5 +4646,7 @@
"Remove 1 Obelisk from your supply and gain 1 objective point.": "Уберите 1 Обелиск из своего запаса и получите 1 очко цели.",
"Keep the Obelisk in your supply; gain no point.": "Сохраните Обелиск в запасе; очко не начисляется.",
"Click a highlighted city or building on the map, or choose below.": "Нажмите на выделенный город или здание на карте или выберите ниже.",
"Choose target": "Выбрать цель"
"Choose target": "Выбрать цель",
"Break agreement & attack": "Разорвать соглашение и атаковать",
"This attack costs 2 culture tokens, ends your diplomatic agreement and discards Great Diplomat.": "Эта атака стоит 2 жетона культуры, прекращает ваше дипломатическое соглашение и сбрасывает Великого дипломата."
}

View file

@ -4646,5 +4646,7 @@
"Remove 1 Obelisk from your supply and gain 1 objective point.": "Bỏ 1 Đài tưởng niệm khỏi kho và nhận 1 điểm mục tiêu.",
"Keep the Obelisk in your supply; gain no point.": "Giữ Đài tưởng niệm trong kho; không nhận điểm.",
"Click a highlighted city or building on the map, or choose below.": "Nhấp vào thành phố hoặc công trình được làm nổi bật trên bản đồ, hoặc chọn bên dưới.",
"Choose target": "Chọn mục tiêu"
"Choose target": "Chọn mục tiêu",
"Break agreement & attack": "Phá bỏ thỏa thuận và tấn công",
"This attack costs 2 culture tokens, ends your diplomatic agreement and discards Great Diplomat.": "Cuộc tấn công này tốn 2 token văn hóa, chấm dứt thỏa thuận ngoại giao và bỏ lá Đại Ngoại giao."
}

View file

@ -4646,5 +4646,7 @@
"Remove 1 Obelisk from your supply and gain 1 objective point.": "從供應區移除1個方尖碑,獲得1目標分。",
"Keep the Obelisk in your supply; gain no point.": "將方尖碑保留在供應區;不獲得分數。",
"Click a highlighted city or building on the map, or choose below.": "點擊地圖上標示的城市或建築,或從下方選擇。",
"Choose target": "選擇目標"
"Choose target": "選擇目標",
"Break agreement & attack": "解除協議並攻擊",
"This attack costs 2 culture tokens, ends your diplomatic agreement and discards Great Diplomat.": "這次攻擊花費 2 個文化標記,結束你們的外交協議並棄置大外交家。"
}

View file

@ -327,6 +327,24 @@
display: grid;
gap: 10px;
}
.diplomacy-warning {
display: grid;
gap: 8px;
padding: 10px;
border: 1px solid var(--gold);
border-radius: 5px;
background: var(--paper2);
font-size: 13px;
line-height: 1.5;
}
.diplomacy-warning strong {
display: flex;
align-items: center;
gap: 6px;
}
.diplomacy-warning p {
margin: 0;
}
.collection-tile-options {
display: flex;
flex-wrap: wrap;

View file

@ -630,6 +630,7 @@ export interface HappinessPreview {
reason: string | null;
}
export interface MoveDestination {
breaksDiplomacy?: boolean;
terrainNotes?: string[];
label?: string;
pirateCarrier?: number;