Wiki

trigger · has_capitulated

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

checks if the country has capitulated

实战 · 配合 · 坑

实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。

实战用法

has_capitulated 常用于判断某国是否已经投降,从而触发后续的剧情事件、解锁决议或调整 AI 战略目标。例如在战争胜利后给玩家国家奖励,或者在盟友投降时触发特殊事件链。

# 在 focus 的 available 块中,确保目标国已投降才能选取该焦点
available = {
    FROM = {
        has_capitulated = yes
    }
}

配合关系

  • [days_since_capitulated](/wiki/trigger/days_since_capitulated):常与 has_capitulated 搭配,先用前者确认投降状态,再用后者判断投降已过多少天,避免在投降瞬间立刻触发后续逻辑。
  • [exists](/wiki/trigger/exists):投降国有时仍然 exists(尚未被吞并),两者一起使用可精确区分"已投降但仍存在"与"已被消灭"两种状态。
  • [any_enemy_country](/wiki/trigger/any_enemy_country):在循环检测敌对国时配合使用,可以快速筛选出所有已投降的敌国并进行统一处理。
  • [annex_country](/wiki/effect/annex_country):投降确认后执行吞并操作时的典型搭配,先用 has_capitulated 做门槛检查,再调用该 effect 完成并入。

常见坑

  1. 误以为投降等于被消灭has_capitulated = yes 只代表该国在当前战争中已投降,并不意味着其标签已从地图上消失;国家仍可能 exists = yes,若需要判断是否彻底灭亡应额外加上 exists = no
  2. 在非战争状态下使用:战争结束(和平会议结束)后,投降状态会被清除,has_capitulated 将返回 no;因此不能用它来"记录历史上曾经投降",如需持久记录应改用国家旗帜(set_country_flag / has_country_flag)。

Hands-On Notes

Hands-on notes are AI-generated and checked against the vanilla command vocabulary — treat them as a starting point, not authoritative reference. The definition above is the game's own documentation.

Hands-On Usage

has_capitulated is commonly used to check whether a country has surrendered, thereby triggering subsequent narrative events, unlocking decisions, or adjusting AI strategic objectives. For example, rewarding the player's country after a war victory, or triggering a special event chain when an ally surrenders.

# In the available block of a focus, ensure the target country has capitulated before selecting that focus
available = {
    FROM = {
        has_capitulated = yes
    }
}

Synergy

  • [days_since_capitulated](/wiki/trigger/days_since_capitulated): Often paired with has_capitulated; use the former to confirm capitulation status first, then the latter to determine how many days have passed since capitulation, avoiding immediate trigger of subsequent logic at the moment of surrender.
  • [exists](/wiki/trigger/exists): A capitulated country may still exists (not yet annexed). Using both together allows precise distinction between "capitulated but still exists" and "completely eliminated" states.
  • [any_enemy_country](/wiki/trigger/any_enemy_country): Used in conjunction when looping through enemy countries; allows quick filtering of all capitulated enemies for unified processing.
  • [annex_country](/wiki/effect/annex_country): Typical pairing when executing annexation after confirming capitulation; use has_capitulated as a gating check first, then call this effect to complete the annexation.

Common Pitfalls

  1. Mistaking capitulation for elimination: has_capitulated = yes only means the country has surrendered in the current war and does not mean its tag has vanished from the map; the country may still have exists = yes. If you need to check for complete elimination, additionally add exists = no.
  2. Using outside of war context: After war ends (peace conference concludes), the capitulation status is cleared, and has_capitulated will return no. Therefore, it cannot be used to "record a history of past capitulations." If persistent recording is needed, use country flags instead (set_country_flag / has_country_flag).