fix(engine): Halana and Alena Partners where-X counter count (#1993) - #2270
Conversation
…s#1993) Truncate where-X clauses at the next sentence so multi-sentence combat triggers bind X to source power instead of an unresolved Variable string.
There was a problem hiding this comment.
Code Review
This pull request implements support for parsing printed-name possessives in where-X bindings (e.g., "Halana and Alena's power") to refer to the ability source under CR 107.3i, and updates strip_trailing_where_x to handle where-X clauses that are not the final sentence. Feedback highlights violations of Rule R1 regarding the use of non-nom string operations (.starts_with(), .strip_suffix(), and .split_once()) for parsing dispatch and processing, and flags a duplicate #[test] attribute in the unit tests.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
🤖 Architecture Review (automated)Verdict: Seam: CONCERN — semantic binding (printed name → ability source via Reconciled with existing reviews (Gemini):
Findings
Semantics verified correct otherwise: |
…rop duplicate test Rewrite printed-name possessive where-X dispatch with nom combinators, truncate mid-sentence bindings via TextPair::split_around, and fix the duplicate #[test] that failed clippy under -D warnings.
|
Hi, @matthewevans Duplicate #[test] — removed (CI blocker). CR citations updated to 107.3f (where-X value definition) and 113.7 (ability source) instead of 107.3i for the possessive binding. Sentence-boundary stripping is cited as 608.2c (instruction order), not 107.3i. Semantics unchanged: Power { scope: Source } for the Partners trigger, with the existing regression tests still passing. |
…-partners # Conflicts: # crates/engine/src/parser/oracle_effect/lower.rs
|
Maintainer update pushed in What changed:
Review notes:
Local verification run:
|
matthewevans
left a comment
There was a problem hiding this comment.
Approved after maintainer pass: review comments resolved, focused parser/runtime regressions pass locally, and CI is running on the pushed head.
Summary
Fixes #1993 — Halana and Alena, Partners triggered at beginning of combat with correct targeting, but no +1/+1 counters were applied.
Root cause: Multi-sentence oracle text (
… where X is ~'s power. That creature gains haste …) madestrip_trailing_where_xcapture the haste sentence into the X binding. Runtime resolved that bogusVariablename as 0 counters.Changes:
.) instrip_trailing_where_x.Halana and Alena's power) toPower { scope: Source }before self-ref normalization.Test plan
cargo test -p engine --lib strip_trailing_where_x_stops_at_next_sentencecargo test -p engine --lib where_x_printed_name_possessive_power_is_sourcecargo test -p engine --lib halana_alena_partners_combat_trigger_puts_source_power_counters