trigger · night
Definition
- Supported scope:
COMBATANT - Supported target:
none
Description
check if combat is at night
nightCOMBATANTnonecheck if combat is at night
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
night 常用于为夜间战斗定制特殊 modifier 或触发专属事件,例如制作夜袭战术 trait 系统、或让特定部队在夜间获得额外增益的 on_combat_phase 触发器。它只在战斗 scope(COMBATANT)内有意义,通常嵌套在 limit 块中过滤战斗阶段逻辑。
# 示例:夜间战斗时,若为进攻方且已侦察优势,给予特殊战斗修正
on_combat_phase = {
limit = {
night = yes
is_attacker = yes
recon_advantage = yes
}
add_combat_modifier = {
modifier = night_assault_bonus
}
}
night = yes 可做"夜袭专家"trait 的激活条件。night 仅在 COMBATANT scope 下有效,若误写在国家 scope 或州 scope 的 trigger 块里,游戏不会报错但条件永远不会为真,导致效果完全失效,难以察觉。night = yes:该 trigger 判断的是"当前战斗是否处于夜间阶段",而非游戏内的时钟时间或日历,与日期、小时无关,不能用它来检测地图上是否是夜晚。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.
night is commonly used to customize special modifiers for nighttime combat or trigger exclusive events, such as creating a night raid tactic trait system or granting additional bonuses to specific units during nighttime via on_combat_phase triggers. It only has meaning within combat scope (COMBATANT) and is typically nested in limit blocks to filter combat phase logic.
# Example: During nighttime combat, if acting as attacker and possessing reconnaissance advantage, grant special combat modifier
on_combat_phase = {
limit = {
night = yes
is_attacker = yes
recon_advantage = yes
}
add_combat_modifier = {
modifier = night_assault_bonus
}
}
night = yes, this allows activation conditions for "night assault specialist" traits.night is only valid within COMBATANT scope. If mistakenly written in a trigger block within country or state scope, the game will not report an error but the condition will never evaluate to true, causing complete effect failure that is difficult to detect.night = yes: This trigger evaluates whether the current combat is in a nighttime phase, not the in-game clock time or calendar date. It has no relation to dates or hours and cannot be used to detect whether it is night on the map.