feat(m80-i31): add interrupt-strike, interrupt-guard and movement-immunity rows
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
| 2026-09-15 | M79-F 区域 6 内容(数据/本地化/立绘/音乐/战场)+ 推进门到第十一份合同 + 注册表测试 R6 计修正 | `feat(m79-f)` `c728a49a`/`a4de1565` | `m79-region6` `20260915T050042Z-16542` | runtime_verified | 240 装备/45 遗物/74 敌人/12 Boss/12 合同/461 本地化;`contracts=11 region=RG-06`;15 marker 各 1 次 |
|
||||
| 2026-09-15 | M79-E 区域 5 内容(数据/本地化/立绘/音乐/战场)+ 推进门到第九份合同 + 注册表验证器修 13 敌人 | `feat(m79-e)` `aff0358b`/`6a9518e3` | `m79-region5` `20260915T023248Z-65213` | runtime_verified | 200 装备/37 遗物/61 敌人/10 Boss/10 合同/395 本地化;`contracts=9 region=RG-05`;15 marker 各 1 次 |
|
||||
| 2026-09-15 | M79-D 区域 4 美术+音乐+接线(含 R2/R3 姿态回填;risk 选项轮询去 flake) | `feat(m79-d)` `5f9723d2` + `test(m79-d)` `c7abcb97` | `m79-region4` `20260915T022134Z-55448` | runtime_verified | 28 张 R4 立绘+卷根战场+`battle_r4`/`boss_r4`;R2/R3 42 条姿态接线回填;15 marker 各 1 次 |
|
||||
| 2026-09-16 | M80-I31 打断/防护三类(EQ-062/090/222 转正) | `feat(m80-i31)` | runtime_verified | windup 门 `row_interrupt=true guard=delays`;implemented 269→272;15 门+探针绿 |
|
||||
| 2026-09-16 | M80-I30 站点扩展第二批(reach/heal/haste,9 行) | `feat(m80-i30)` | runtime_verified | implemented 260→269;三条站点断言;14 门+探针绿 |
|
||||
| 2026-09-16 | M80-I29 存留减伤池(EQ-044/EQ-187 转正) | `feat(m80-i29)` | runtime_verified | implemented 258→260;六门绿;池化与声明式等效有断言 |
|
||||
| 2026-09-16 | M80-I28 减伤行回归真实站点 + 减伤断言 | `feat(m80-i28)` | runtime_verified | implemented 256→258 |
|
||||
|
||||
@@ -113,6 +113,11 @@ reach/目标选择、Guard/护盾、伤害公式(含暴击与标签化随机
|
||||
条件 `enemy_major_windup`(major = ≥12 tick);门 `ABG_M80_WINDUP_OK` |
|
||||
| `M80-I14` | RESOLVED(2026-09-15)| 链接落地:`link`/`relink` 字段、`link_id` 绑定、`link_broken` 条件随绑定单位倒下而成立、PF-B08 三行可跑;
|
||||
门 `ABG_M80_LINK_OK`。**至此 23 个优先条件全部 enabled(pending=0)** |
|
||||
| `M80-I31` | RESOLVED(2026-09-16)| 装备效果类 ⑦ **打断与防护**(3 行):EQ-090 `interrupt_strike`(施法前声明的打断能力在下一次命中生效——
|
||||
注意顺序陷阱:**攻击记录构造时取值并清零**,早清零会让记录读到 false,我已按此修正)、EQ-062 `interrupt_guard`(被守卫的蓄力首次被打断改为
|
||||
`cast_delayed`/`INTERRUPT_GUARD` 并延长一个 MAJOR 窗口)、EQ-222 `movement_immunity`(倒下时让下一名同伴获得不可位移)。
|
||||
implemented 269→272;windup 门标记扩为 `row_interrupt=true guard=delays`,装备门加"倒下→同伴不可位移"断言。
|
||||
EQ-020(防止暴露低血同伴的换位)需"暴露评估"规则,登记待定 |
|
||||
| `M80-I30` | RESOLVED(2026-09-16)| 六种"站点不读"类的第二批(9 行):`before_cast` 现在就送准备度(`haste` 行 EQ-104/EQ-179 改点 `cooldown_cut`)、
|
||||
`on_summon` 与 `on_fallen` 送 **reach**(新 `_apply_reach_gain`,EQ-097/198/234)、`on_status_expire` 送 **heal**(EQ-308)、
|
||||
EQ-071/247(before_cast + tempo_bonus)与 EQ-095(before_target + reach_bonus)本就由现有站点覆盖、只是初版标错。implemented 260→269;
|
||||
|
||||
@@ -265,6 +265,8 @@ func _resolve_attack(actor: Dictionary, target: Dictionary, action: Dictionary)
|
||||
actor.pending_damage_bonus = 0
|
||||
action = action.duplicate(true)
|
||||
action["base"] = float(action.get("base", 0)) + float(banked_damage)
|
||||
if int(_trait_effect(actor, "before_cast").get("interrupt_strike", 0)) > 0:
|
||||
actor.pending_interrupt = true
|
||||
_apply_cooldown_cut(actor, "before_cast")
|
||||
_apply_reach_gain(actor, "before_cast")
|
||||
var cast_tempo := int(_trait_effect(actor, "before_cast").get("tempo_bonus", 0))
|
||||
@@ -327,6 +329,8 @@ func _resolve_attack(actor: Dictionary, target: Dictionary, action: Dictionary)
|
||||
var preview: Dictionary = damage_preview(actor, target, action, crit)
|
||||
if int(target.get("pending_reduction", 0)) > 0:
|
||||
target.pending_reduction = 0
|
||||
var interrupt_ready := bool(action.get("interrupt", false)) or bool(actor.get("pending_interrupt", false))
|
||||
actor.pending_interrupt = false
|
||||
return {
|
||||
"tick": tick,
|
||||
"actor": str(actor.id),
|
||||
@@ -339,7 +343,7 @@ func _resolve_attack(actor: Dictionary, target: Dictionary, action: Dictionary)
|
||||
"amount": int(preview.final),
|
||||
"status": _status_of(action),
|
||||
"cleanse": bool(action.get("cleanse", false)),
|
||||
"interrupt": bool(action.get("interrupt", false)),
|
||||
"interrupt": interrupt_ready,
|
||||
"link": bool(action.get("link", false)),
|
||||
"relink": bool(action.get("relink", false)),
|
||||
"extend_status": bool(action.get("extend_status", false)),
|
||||
@@ -413,6 +417,17 @@ func _apply_damage(record: Dictionary) -> void:
|
||||
"kind": "link", "repaired": bool(record.get("relink", false)), "amount": 0,
|
||||
"hp_after": int(victim.hp)})
|
||||
if bool(record.get("interrupt", false)) and not Dictionary(victim.cast).is_empty():
|
||||
if int(_trait_effect(victim, "on_interrupt").get("interrupt_guard", 0)) > 0 \
|
||||
and not bool(victim.get("interrupt_guard_spent", false)):
|
||||
victim.interrupt_guard_spent = true
|
||||
var held: Dictionary = Dictionary(victim.cast)
|
||||
held["ticks_left"] = int(held.get("ticks_left", 0)) + int(MAJOR_WINDUP_TICKS)
|
||||
victim.cast = held
|
||||
journal.append({"tick": tick, "actor": str(source.get("id", "")), "target": str(victim.id),
|
||||
"kind": "cast_delayed", "reason": "INTERRUPT_GUARD",
|
||||
"action": str(held.get("action_id", "")), "amount": 0})
|
||||
_apply_status_work(record, source, victim)
|
||||
return
|
||||
var cancelled: Dictionary = Dictionary(victim.cast)
|
||||
victim.cast = {}
|
||||
journal.append({
|
||||
@@ -607,6 +622,8 @@ func _fire_fallen_hooks(actor: Dictionary) -> void:
|
||||
survivor.guard = int(survivor.guard) + int(effect.guard_bonus)
|
||||
if int(effect.get("reach_bonus", 0)) > 0:
|
||||
survivor.reach = int(survivor.reach) + int(effect.reach_bonus)
|
||||
if int(effect.get("movement_immunity", 0)) > 0:
|
||||
survivor.immovable = true
|
||||
if not effect.is_empty():
|
||||
journal.append({"tick": tick, "actor": owner_id, "target": owner_id,
|
||||
"kind": "death_trigger", "hook": hook, "amount": 0, "hp_after": int(actor.hp)})
|
||||
@@ -837,7 +854,8 @@ func _trait_effect(actor: Dictionary, hook: String) -> Dictionary:
|
||||
var total := {"reach_bonus": 0, "damage_bonus": 0, "guard_bonus": 0, "heal_bonus": 0,
|
||||
"resource_gain": 0, "haste": 0, "damage_reduction": 0, "tempo_bonus": 0,
|
||||
"status_apply": 0, "movement_bonus": 0, "cooldown_cut": 0, "transfer": 0,
|
||||
"neighbor_guard_chip": 0, "rear_guard": 0}
|
||||
"neighbor_guard_chip": 0, "rear_guard": 0, "interrupt_strike": 0,
|
||||
"interrupt_guard": 0, "movement_immunity": 0}
|
||||
for row in Array(actor.get("traits", [])):
|
||||
var entry: Dictionary = Dictionary(row)
|
||||
if not bool(entry.get("implemented", false)) or String(entry.get("hook", "")) != hook:
|
||||
|
||||
@@ -60,7 +60,7 @@ const EXPLICIT := {
|
||||
"EQ-016": {"hook": "on_advance", "kind": "cooldown_cut", "implemented": true},
|
||||
"EQ-017": {"hook": "on_pull", "kind": "movement", "implemented": true},
|
||||
"EQ-018": {"hook": "on_advance", "kind": "cooldown_cut", "implemented": true},
|
||||
"EQ-020": {"hook": "on_advance", "kind": "protection", "implemented": false},
|
||||
"EQ-020": {"hook": "on_advance", "kind": "protection", "implemented": false, "reason": "battle_scoped:swap_veto_needs_exposure_evaluation"},
|
||||
"EQ-022": {"hook": "on_cast_complete", "kind": "mark", "implemented": false, "reason": "missing_system:per_recipient_marker"},
|
||||
"EQ-025": {"hook": "before_target", "kind": "targeting", "implemented": true, "rule": "tie_rearmost"},
|
||||
"EQ-029": {"hook": "before_target", "kind": "targeting", "implemented": false},
|
||||
@@ -69,14 +69,14 @@ const EXPLICIT := {
|
||||
"EQ-044": {"hook": "on_status_apply", "kind": "damage_reduction", "implemented": true},
|
||||
"EQ-047": {"hook": "before_damage", "kind": "damage_reduction", "implemented": true},
|
||||
"EQ-061": {"hook": "on_cast_complete", "kind": "haste", "implemented": true},
|
||||
"EQ-062": {"hook": "on_interrupt", "kind": "interrupt", "implemented": false},
|
||||
"EQ-062": {"hook": "on_interrupt", "kind": "interrupt_guard", "implemented": true},
|
||||
"EQ-066": {"hook": "before_cast", "kind": "haste", "implemented": true},
|
||||
"EQ-070": {"hook": "on_interrupt", "kind": "cooldown_cut", "implemented": true},
|
||||
"EQ-071": {"hook": "before_cast", "kind": "tempo_bonus", "implemented": true},
|
||||
"EQ-078": {"hook": "on_signature", "kind": "cooldown", "implemented": false, "reason": "missing_system:boss_telegraph_inspect"},
|
||||
"EQ-080": {"hook": "on_cast_complete", "kind": "haste", "implemented": true},
|
||||
"EQ-088": {"hook": "before_target", "kind": "targeting", "implemented": false},
|
||||
"EQ-090": {"hook": "before_cast", "kind": "interrupt", "implemented": false},
|
||||
"EQ-090": {"hook": "before_cast", "kind": "interrupt_strike", "implemented": true},
|
||||
"EQ-095": {"hook": "before_target", "kind": "reach_bonus", "implemented": true},
|
||||
"EQ-097": {"hook": "on_summon", "kind": "reach_bonus", "implemented": true},
|
||||
"EQ-101": {"hook": "on_advance", "kind": "movement", "implemented": true},
|
||||
@@ -105,7 +105,7 @@ const EXPLICIT := {
|
||||
"EQ-214": {"hook": "on_cast_complete", "kind": "cooldown_cut", "implemented": true},
|
||||
"EQ-217": {"hook": "on_cast_complete", "kind": "targeting", "implemented": false},
|
||||
"EQ-218": {"hook": "on_cast_complete", "kind": "status", "implemented": false, "reason": "missing_system:profession_tag_swap"},
|
||||
"EQ-222": {"hook": "on_fallen", "kind": "protection", "implemented": false},
|
||||
"EQ-222": {"hook": "on_fallen", "kind": "movement_immunity", "implemented": true},
|
||||
"EQ-233": {"hook": "on_fallen", "kind": "sound", "implemented": false},
|
||||
"EQ-234": {"hook": "on_fallen", "kind": "reach_bonus", "implemented": true},
|
||||
"EQ-237": {"hook": "on_fallen", "kind": "transfer", "implemented": true},
|
||||
@@ -178,7 +178,8 @@ const DECLARED_PENDING_KINDS := {
|
||||
|
||||
|
||||
const IMPLEMENTED_KINDS := ["guard_bonus", "heal_bonus", "reach_bonus", "resource_gain",
|
||||
"damage_bonus", "haste", "damage_reduction", "tempo_bonus", "movement"]
|
||||
"damage_bonus", "haste", "damage_reduction", "tempo_bonus", "movement",
|
||||
"interrupt_strike", "interrupt_guard", "movement_immunity"]
|
||||
|
||||
|
||||
static func classify(effect_text: String, tradeoff_text := "") -> Dictionary:
|
||||
|
||||
@@ -124,6 +124,18 @@ func _verify_site_coverage() -> void:
|
||||
hurt._fire_status_hook(hurt.allies[0], "on_status_expire")
|
||||
_expect(int(hurt.allies[0].hp) > wound, "an expiry row heals its owner (before=%d after=%d)" % [wound, int(hurt.allies[0].hp)])
|
||||
|
||||
# EQ-222: a defeat row can leave the next ally immovable.
|
||||
var loss_row := [{"hook": "on_fallen", "implemented": true,
|
||||
"effect": {"kind": "movement_immunity", "value": 1, "scope": "test"}}]
|
||||
var funeral: ABGBattleSimulation = Simulation.new()
|
||||
funeral.setup("site-defeat", [
|
||||
{"id": "ally-0", "position": 0, "profession_id": "PF-B01", "equipment_hooks": loss_row},
|
||||
{"id": "ally-1", "position": 1, "profession_id": "PF-B01"},
|
||||
], [])
|
||||
funeral.allies[0].fallen = true
|
||||
funeral._fire_fallen_hooks(funeral.allies[0])
|
||||
_expect(bool(funeral.allies[1].immovable), "a defeat row leaves the next ally immovable")
|
||||
|
||||
|
||||
func _expect(condition: bool, label: String) -> void:
|
||||
if not condition:
|
||||
|
||||
@@ -18,8 +18,10 @@ func _run() -> void:
|
||||
_verify_cast_resolves()
|
||||
_verify_interrupt_cancels()
|
||||
_verify_major_condition()
|
||||
_verify_row_interrupt()
|
||||
_verify_interrupt_guard()
|
||||
if failures.is_empty():
|
||||
print("ABG_M80_WINDUP_OK start=true resolve=true interrupt=AO_INTERRUPTED condition=major determinism=true")
|
||||
print("ABG_M80_WINDUP_OK start=true resolve=true interrupt=AO_INTERRUPTED condition=major row_interrupt=true guard=delays determinism=true")
|
||||
quit(0)
|
||||
return
|
||||
for failure in failures:
|
||||
@@ -99,6 +101,42 @@ func _verify_major_condition() -> void:
|
||||
caster.cast = {}
|
||||
|
||||
|
||||
func _verify_row_interrupt() -> void:
|
||||
# EQ-090: the interrupt capability comes from a row, not from the action.
|
||||
var enemy_action := {"id": "big_cast", "base": 40, "coefficient": 1.0, "kind": "damage", "reach": 1,
|
||||
"target": "frontmost", "power_source": "physical_power", "windup": 5}
|
||||
var ally_action := {"id": "spell", "base": 6, "coefficient": 1.0, "kind": "damage", "reach": 1,
|
||||
"target": "active_cast", "power_source": "physical_power"}
|
||||
var ally: Dictionary = _actor("ally-0", 0, ally_action, {
|
||||
"equipment_hooks": [{"hook": "before_cast", "implemented": true,
|
||||
"effect": {"kind": "interrupt_strike", "value": 1, "scope": "test"}}]})
|
||||
var enemy: Dictionary = _actor("enemy-0", 0, enemy_action,
|
||||
{"profession_base_hp": 4000, "profession_base_tempo": 90, "profession_base_initiative": 95})
|
||||
var simulation: ABGBattleSimulation = Simulation.new()
|
||||
simulation.setup("row-interrupt", [ally], [enemy])
|
||||
simulation.run()
|
||||
var cancelled := _first_of_kind(simulation.journal, "cast_cancelled")
|
||||
_expect(not cancelled.is_empty(), "a row-granted interrupt cancels the enemy cast")
|
||||
|
||||
|
||||
func _verify_interrupt_guard() -> void:
|
||||
# EQ-062: the first interrupt against a guarded wind-up delays it instead.
|
||||
var enemy_action := {"id": "big_cast", "base": 40, "coefficient": 1.0, "kind": "damage", "reach": 1,
|
||||
"target": "frontmost", "power_source": "physical_power", "windup": 5}
|
||||
var ally_action := {"id": "interrupt_thrust", "base": 6, "coefficient": 1.0, "kind": "damage", "reach": 1,
|
||||
"target": "active_cast", "power_source": "physical_power", "interrupt": true}
|
||||
var enemy: Dictionary = _actor("enemy-0", 0, enemy_action, {
|
||||
"profession_base_hp": 4000, "profession_base_tempo": 90, "profession_base_initiative": 95,
|
||||
"equipment_hooks": [{"hook": "on_interrupt", "implemented": true,
|
||||
"effect": {"kind": "interrupt_guard", "value": 1, "scope": "test"}}]})
|
||||
var simulation: ABGBattleSimulation = Simulation.new()
|
||||
simulation.setup("guard", [_actor("ally-0", 0, ally_action)], [enemy])
|
||||
simulation.run()
|
||||
var delayed := _first_of_kind(simulation.journal, "cast_delayed")
|
||||
_expect(not delayed.is_empty() and str(Dictionary(delayed).get("reason", "")) == "INTERRUPT_GUARD",
|
||||
"a guarded wind-up survives its first interrupt as a delay")
|
||||
|
||||
|
||||
func _first_of_kind(journal: Array, kind: String) -> Dictionary:
|
||||
for record in journal:
|
||||
var entry: Dictionary = Dictionary(record)
|
||||
|
||||
Reference in New Issue
Block a user