Skip to content

Read a player's lobby slot from the scenario for Slot Of #99

Closed

Description

@e54-bot

Problem

After #97, Bastion on athena main (docs/scenario-examples/valid/bastion.json plus buttons for every slot on both players) ends not_modeled at tick 0:

{ "status": "not_modeled", "construct": "value getSlot", "tick": 0,
  "location": { "rule": 168, "name": "[Event/先知] Attach prophet next-event text", "eventPlayer": "p2", "action": 0 } }

Bastion calls Slot Of(Event Player) / Slot Of(Victim) in many places (e.g. staggering Wait(Multiply(Slot Of(Event Player), 0.032) ...)).

Design

A player's lobby slot is a scenario fact the simulator cannot derive; roster order is not a measured slot. Follow the invariant for absent inputs: add an optional player field slot (integer, 0..=11) in the scenario format. Slot Of(player) reads it; when the player has no slot, the run ends missing_input with input name slot for that player (no default from roster order). An out-of-range or non-integer slot is rejected at load. Two players with the same slot are rejected at load.

Scope

  • scenario.rs: parse and validate slot; eval/call.rs: implement getSlot for a player operand; non-player operand stays not_modeled.
  • Docs: docs/scenario-format.md (field table, modeled-reads list, missing-input list), docs/simulator-interface.md if it lists reads.
  • Leave the Slot N rule filter as is (still not_modeled) unless it is a small change to match on the declared slot; if so, do it and document it, otherwise note it in the PR.
  • Add slot to docs/scenario-examples/valid/bastion.json players (distinct values), plus a v1 example test if examples are tested.

Acceptance

  • Tests: slot present yields the number; absent yields missing_input naming slot; duplicate and out-of-range slots rejected; non-player operand not_modeled.
  • Bastion rerun with buttons for every slot: report the new first stop, or completion. Parent: Run Bastion to completion on athena-sim #45.
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions