Order
Unit #117
| HP | PWR | CP | Speed | Range | Tier |
|---|---|---|---|---|---|
| 6 | 2 | 1 | Slow | Any | D |
Abilities
Conformity — 0 AP
q: Conformity: 0 AP - a: Replace Any 1 demon card with 1 Conformity Familiar. (Order card has 4 Conformity Familiars.)
Engine Implementation
def _order_conformity(
state: GameState, demon: DemonInstance, targets, choices, rng
) -> GameState:
"""#117 Order — Conformity
Familiar: 0 AP, (exhaust): Replace Any 1 demon card with 1 Conformity Familiar.
targets[0] = the demon to be replaced.
The target demon is removed from the field; a Conformity familiar is deployed
in its lane (same owner, readied). The replaced demon is sent to graveyard/familiar_deck.
choices["conformity_id"] = specific Conformity familiar ID (117_1 through 117_4).
"""
from engine.operations import deploy_familiar, resolve_fatally_wounded
if not targets:
return state
target = targets[0]
t_current = next(
(d for d in state.demons if d.instance_id == target.instance_id), None
)
if t_current is None:
return state
target_lane = t_current.lane
target_owner = t_current.owner
# Remove the target demon (no CP gained — it's "replaced" not "killed")
new_state = copy.deepcopy(state)
t_in_new = next(
(d for d in new_state.demons if d.instance_id == target.instance_id), None
)
if t_in_new is None:
return state
new_state.demons = [d for d in new_state.demons if d.instance_id != target.instance_id]
if t_in_new.is_familiar:
new_state.players[target_owner].familiar_deck.append(t_in_new.unit_id)
else:
new_state.players[target_owner].graveyard.append(t_in_new.unit_id)
# Deploy a Conformity familiar in its place
CONFORMITY_IDS = ["117_1", "117_2", "117_3", "117_4"]
conformity_id = choices.get("conformity_id") if choices else None
owner = demon.owner
if conformity_id is None:
# Pick first available
for cid in CONFORMITY_IDS:
if cid in new_state.players[owner].familiar_deck:
conformity_id = cid
break
if conformity_id is None:
return new_state # No Conformity available
if conformity_id not in new_state.players[owner].familiar_deck:
return new_state
return deploy_familiar(new_state, owner, conformity_id, target_lane)
register_ability("117", 0, _order_conformity)
Reminder
(A Conformity Familiar normally replaces a demon card. Remove the old demon card from play and put a Conformity in its place. Damage, e effects (even from h actions), exhaustion, and control do not change. The old demon card is not considered to have died.)