trigger · has_capitulated
Definition
- Supported scope:
COUNTRY - Supported target:
none
Description
checks if the country has capitulated
has_capitulatedCOUNTRYnonechecks 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 完成并入。has_capitulated = yes 只代表该国在当前战争中已投降,并不意味着其标签已从地图上消失;国家仍可能 exists = yes,若需要判断是否彻底灭亡应额外加上 exists = no。has_capitulated 将返回 no;因此不能用它来"记录历史上曾经投降",如需持久记录应改用国家旗帜(set_country_flag / has_country_flag)。