You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Answer Value In Array on a non-array operand as a missing element #97
After #93 and #95, 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": "valueInArray on Null", "tick": 0,
"location": { "rule": 167, "name": "[Event/先知] Collapse undecided next event under observation", "eventPlayer": "p2", "condition": 1 } }
Condition 1 evaluates Value In Array(First Of((Event Player).playerTitles), True). playerTitles is unset (Null), so First Of returns Null and Value In Array receives a non-array. call.rs returns Null for an out-of-range index but stops not_modeled for any non-array operand.
Catalog evidence
valueInArray: "The value found at a specific element of an array. Results in 0 if the element does not exist."
firstOf: "The value at the start of the specified array. Results in 0 if the specified array is empty."
A non-array operand has no element at any index, so the catalog sentence for "the element does not exist" covers it. The catalog does not state this case explicitly.
Scope
Make Value In Array on a non-array operand (Null, number, text, vector, player, bool) answer the same value as an out-of-range index does today (Null, which compares equal to 0 as for the existing out-of-range case). Check that First Of on Null and on an empty array already answer the same way and make them consistent.
Record this in docs/findings.md as modeled, not measured, with the two catalog sentences as the basis, and add a probe request line if the repo keeps one for modeled-not-measured choices (follow the existing entries for out-of-range index).
Update the modeled-values list in docs/scenario-format.md or docs/simulator-interface.md wherever it states that a non-array operand stops the run.
Acceptance
Tests: non-array operand of each type; First Of of Null and of an empty array; the out-of-range cases unchanged; use inside Compare and Is True For Any.
Activity
feat(sim): answer Value In Array on a non-array operand as a missing …