trigger · is_navy_leader
Definition
- Supported scope:
CHARACTER - Supported target:
none
Description
is_navy_leader = yes/no - Checks if the current character is a navy leader
is_navy_leaderCHARACTERnoneis_navy_leader = yes/no - Checks if the current character is a navy leader
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
is_navy_leader 常用于限制某些特质、晋升路径或事件选项只对海军将领生效,例如在动态修饰符触发条件或顾问角色校验中区分兵种。比如在角色事件中,只有当前角色是海军将领时才允许赋予某条海军专属特质:
# 在角色事件的触发条件中限制作用对象
trigger = {
is_navy_leader = yes
has_trait = bold
}
# 通过校验后为其添加海军特质
effect = {
add_unit_leader_trait = naval_invincibility
}
[is_unit_leader](/wiki/trigger/is_unit_leader):先确认角色是单位指挥官,再用 is_navy_leader 细化兵种,避免误判未分配兵种类型的角色。[has_trait](/wiki/trigger/has_trait):常与特质检测联用,筛选"既是海军将领又持有特定特质"的角色作为事件或决议的目标。[add_naval_commander_role](/wiki/effect/add_naval_commander_role):配合使用时可先通过 is_navy_leader = no 排除已经是海军将领的角色,再安全地赋予海军指挥官角色,防止重复叠加。[add_unit_leader_trait](/wiki/effect/add_unit_leader_trait):在 limit 块中用 is_navy_leader = yes 限定后,才为其附加海军专属特质,确保不会误赋给陆军或空军将领。is_unit_leader 混淆:is_navy_leader 专指海军将领(admiral),is_unit_leader 则对所有单位指挥官返回真。新手有时误用 is_unit_leader 来过滤海军将领,导致陆军将领也被误匹配进逻辑分支。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.
is_navy_leader is commonly used to restrict certain traits, promotion paths, or event options to naval leaders only, such as in dynamic modifier trigger conditions or advisor role validation to differentiate unit types. For example, in character events, you can grant a naval-exclusive trait only when the current character is a naval leader:
# Restrict the scope of action in character event trigger conditions
trigger = {
is_navy_leader = yes
has_trait = bold
}
# After validation, add a naval trait to the character
effect = {
add_unit_leader_trait = naval_invincibility
}
[is_unit_leader](/wiki/trigger/is_unit_leader): First confirm the character is a unit commander, then use is_navy_leader to refine by unit type and avoid misidentifying characters without assigned unit types.[has_trait](/wiki/trigger/has_trait): Commonly used together with trait detection to filter characters that are "both naval leaders and possess specific traits" as targets for events or decisions.[add_naval_commander_role](/wiki/effect/add_naval_commander_role): When used in combination, you can first exclude characters already serving as naval leaders using is_navy_leader = no, then safely assign the naval commander role to prevent stacking duplicates.[add_unit_leader_trait](/wiki/effect/add_unit_leader_trait): After restricting with is_navy_leader = yes in a limit block, attach naval-exclusive traits to ensure they are not mistakenly assigned to army or air force leaders.is_unit_leader: is_navy_leader specifically refers to naval leaders (admirals), while is_unit_leader returns true for all unit commanders. Beginners sometimes mistakenly use is_unit_leader to filter naval leaders, causing army leaders to be incorrectly matched into logic branches.