Skip to content

Sandbox: "Turn Face Up" only clears the flag, so the real card is never restored (SetFaceState, cf. #3284) #7539

Description

@cuinhellcat

Summary

The sandbox card menu's Turn Face Up entry clears face_down and nothing else. The permanent's real characteristics stay in back_face, so the card remains a nameless 2/2 with no abilities — visually nothing happens, and no CR 701.27 / CR 708 turn-face-up trigger or replacement fires.

Cause

game/engine_debug.rs, the DebugAction::SetFaceState arm:

if let Some(fd) = face_down {
    validate_object_mut(state, object_id)?.face_down = fd;
}

Two branches below, the transformed arm already carries the fix for exactly this class, with the reason stated:

// CR 701.27a: toggling `transformed` on a DFC must swap
// printed faces, not just flip the flag — a flag-only write
// leaves zone-exit revert applying the wrong characteristics
// (issue #3290 / debug transform tool, issue #3284).

That was #3284, fixed by #3684 by routing through transform::transform_permanent. The face_down branch was never carried over.

Expected

Route a face_down: Some(false) write on a battlefield permanent through morph::turn_face_up, the existing single authority — it restores the stored face, draws the CR 613.7f timestamp, applies the "as ~ is turned face up" replacement, and emits GameEvent::TurnedFaceUp. The flag-only write stays correct only where no stored face exists.

face_down: Some(true) is out of scope here: turning a permanent face down in place has no general engine authority today.

Steps to reproduce

  1. Sandbox, click mode on.
  2. Put any morph/manifest permanent on the battlefield face down.
  3. Card menu → Turn Face Up.
  4. The card does not change. Transform on the same card does flip it, because that path goes through the real authority — but it is a transform, not a turn-face-up, so no turn-face-up trigger fires there either.

Not this issue

The separate defect that the engine never offers GameAction::TurnFaceUp in normal play is the still-open half of #6732 / #4381 (see the evidence posted there). This report is only about the sandbox debug action.

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