-
-
Notifications
You must be signed in to change notification settings - Fork 148
Add Captain Marvel, Apex Avenger #6938
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
be6b736
474acc5
ac174eb
5618267
761474b
3018732
463a086
3e189a6
e77ae43
1575f4c
4870fa1
e12d4a7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -61,6 +61,7 @@ pub(super) fn handle_optional_effect_choice( | |
| let OptionalEffectFrame { | ||
| ability, | ||
| trigger_event: pending_event, | ||
| trigger_events: pending_events, | ||
| trigger_match_count: pending_count, | ||
| } = frame; | ||
| let choice = if accept { | ||
|
|
@@ -74,6 +75,12 @@ pub(super) fn handle_optional_effect_choice( | |
| // `TriggeringPlayer` and other event-context refs resolve correctly. | ||
| let previous_trigger_event = state.current_trigger_event.clone(); | ||
| state.current_trigger_event = pending_event; | ||
| // CR 603.2c + CR 608.2: restore the PLURAL batched-trigger event list | ||
| // too — an effect that folds the whole event batch (e.g. | ||
| // `Effect::ReproduceEventCounters` reading every `CounterAdded` | ||
| // occurrence) must see all occurrences, not just the singular event. | ||
| let previous_trigger_events = std::mem::take(&mut state.current_trigger_events); | ||
| state.current_trigger_events = pending_events; | ||
|
Comment on lines
+78
to
+83
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win Add a regression test for a non-empty trigger batch. The changed fixtures pass As per path instructions, tests must drive the production pipeline and prove the failure path; an empty 🤖 Prompt for AI AgentsSource: Path instructions |
||
| // CR 603.2c + CR 608.2: mirror restoration of the batched-trigger | ||
| // subject count so a `QuantityRef::EventContextAmount` resolved during | ||
| // the resumed sub-ability reads the same "that many" the pre-pause | ||
|
|
@@ -83,6 +90,7 @@ pub(super) fn handle_optional_effect_choice( | |
| let result = | ||
| effects::resolve_optional_effect_decision(state, *ability, choice, events, 1); | ||
| state.current_trigger_event = previous_trigger_event; | ||
| state.current_trigger_events = previous_trigger_events; | ||
| state.current_trigger_match_count = previous_trigger_match_count; | ||
| result.map_err(|e| EngineError::InvalidAction(format!("{e:?}")))?; | ||
| } else if state.pending_trigger.as_ref().is_some_and(|t| { | ||
|
|
@@ -2033,6 +2041,7 @@ mod tests { | |
| state.push_optional_effect_frame(OptionalEffectFrame { | ||
| ability: Box::new(optional), | ||
| trigger_event: None, | ||
| trigger_events: Vec::new(), | ||
| trigger_match_count: None, | ||
| }); | ||
| state.waiting_for = WaitingFor::OptionalEffectChoice { | ||
|
|
@@ -2063,6 +2072,7 @@ mod tests { | |
| state.push_optional_effect_frame(OptionalEffectFrame { | ||
| ability: Box::new(optional), | ||
| trigger_event: None, | ||
| trigger_events: Vec::new(), | ||
| trigger_match_count: None, | ||
| }); | ||
| state.waiting_for = WaitingFor::OptionalEffectChoice { | ||
|
|
@@ -2099,6 +2109,7 @@ mod tests { | |
| state.push_optional_effect_frame(OptionalEffectFrame { | ||
| ability: Box::new(optional), | ||
| trigger_event: None, | ||
| trigger_events: Vec::new(), | ||
| trigger_match_count: None, | ||
| }); | ||
| state.waiting_for = WaitingFor::OptionalEffectChoice { | ||
|
|
@@ -2132,6 +2143,7 @@ mod tests { | |
| state.push_optional_effect_frame(OptionalEffectFrame { | ||
| ability: Box::new(optional), | ||
| trigger_event: None, | ||
| trigger_events: Vec::new(), | ||
| trigger_match_count: None, | ||
| }); | ||
| state.waiting_for = WaitingFor::OptionalEffectChoice { | ||
|
|
@@ -2163,6 +2175,7 @@ mod tests { | |
| state.push_optional_effect_frame(OptionalEffectFrame { | ||
| ability: Box::new(optional), | ||
| trigger_event: None, | ||
| trigger_events: Vec::new(), | ||
| trigger_match_count: None, | ||
| }); | ||
| state.waiting_for = WaitingFor::OptionalEffectChoice { | ||
|
|
@@ -2193,6 +2206,7 @@ mod tests { | |
| state.push_optional_effect_frame(OptionalEffectFrame { | ||
| ability: Box::new(optional), | ||
| trigger_event: None, | ||
| trigger_events: Vec::new(), | ||
| trigger_match_count: None, | ||
| }); | ||
| state.waiting_for = WaitingFor::OptionalEffectChoice { | ||
|
|
@@ -2223,6 +2237,7 @@ mod tests { | |
| state.push_optional_effect_frame(OptionalEffectFrame { | ||
| ability: Box::new(optional), | ||
| trigger_event: None, | ||
| trigger_events: Vec::new(), | ||
| trigger_match_count: None, | ||
| }); | ||
| state.waiting_for = WaitingFor::OptionalEffectChoice { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift
Classify
ReproduceEventCountersasLiveBoardCensus, matchingMultiplyCounter.resolve_reproduce_event_countersresolves its recipients throughresolve_defined_or_targets(crates/engine/src/game/effects/counters.rs). That is the same resolver cited at lines 5275-5278 as the reasonMultiplyCounteris census-tagged: whenability.targets.is_empty()it mass-scansbattlefield_phased_in_ids(). No static field onReproduceEventCountersdiscriminates the announced-single mode from the mass mode, so the file's own fail-closed rule puts the whole variant in the census group.Placing it in the relax group can mint a false loop-firewall certificate for a reproduction effect that enumerates a growing battlefield.
The mirror entry at line 5776 must move with it;
census_partition_agrees_with_effect_target_ctxrequires the two partitions to stay byte-identical.🛡️ Proposed classification move
| Effect::MultiplyCounter { .. } + // CR 122.1 + CR 603.2c: `resolve_reproduce_event_counters` resolves its + // recipients through the same `resolve_defined_or_targets` mass-scan as + // MultiplyCounter when `ability.targets.is_empty()` ⇒ fail-closed census. + | Effect::ReproduceEventCounters { .. }Remove the corresponding entry from the
SnapshotOrEventgroup at line 5373 and from theBoundedOrNoPopulationgroup at line 5776, adding a matching census entry ineffect_census_role.🤖 Prompt for AI Agents