Skip to content

Wire BattleRuntime directly to MoveRuntimeExecutionMode #552

Open

Description

@Teffa14

Bounded follow-up after merged #551. Current main eb5daaf7a487bbccf75dc9c70ac90d64d7e53ad0 still carries spendOrdinaryMoveResources, runPreDamageReactions, and declaredChoiceAlreadyValidated independently inside BattleRuntime.applyAuthoritativeMoveInternal, and selects declaration validation from those booleans. This leaves committed-reaction execution unable to enter the ordinary single-target resolver without the ambiguous legacy tuple.

Pinned Python oracle inspected: Teffa14/AutoPTU@16d228efa63aabecb67fa788959a359aac7f8f03.

Bounded implementation contract:

  1. Change the authoritative internal move resolver to receive one MoveRuntimeExecutionMode (or MoveRuntimeExecutionPolicy) instead of the three independent ownership/validation booleans.
  2. Call MoveRuntimeExecutionPolicy.requireValidDeclaration(...) exactly once before RNG consumption.
  3. Derive ordinary action/frequency ownership only from policy.spendOrdinaryMoveResources().
  4. Derive PRE-damage reaction execution only from policy.runPreDamageReactions().
  5. Preserve ORDINARY, AREA_RESOLVED, and DELAYED behavior and event/RNG ordering.
  6. Add a committed-reaction runtime ingress that uses CommittedReactionRuntimeIngress.resolveExecutionMode(...) and COMMITTED_REACTION, never the legacy tuple.
  7. Freeze an AoO Python-oracle fixture comparing action budget, move frequency, RNG draw order, accuracy/evasion, hook order, damage, HP/injury/history, ordered semantic events, and final state.
  8. Keep Minecraft/Cobblemon/Craftics outside the rules path.

Acceptance gates: compile, targeted Java tests, Java Core Parity, existing area/delayed regressions, Python-oracle parity, applicable rulebook conformance, and deterministic trace parity. Do not merge if any relevant gate is red.

Permanent audit category: terrain/weather/hazards/zones/forced movement/reactions. Cross-cutting unlock: full damage pipeline.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions