M007 S04: Contingency condition type "spell-completed-against" always returns true — is a stub #11

Closed
opened 2026-05-15 19:21:33 +00:00 by Mark · 0 comments
Owner

Severity: LOW
File: src/engine/openings.ts:119-121

Problem

The spell-completed-against condition type in evaluateCondition() always returns true regardless of context:

case "spell-completed-against":
  return true;

This means any spell completion by the opponent triggers the branch. There is no logic to check which spell was completed, its severity, or which hand it was on. The condition type exists in the editor but is non-functional — it fires on every opponent completion.

Fix

If this condition type is meant to be specific, add logic to check the actual spell completed (by name, damage threshold, or hand). If it is intentionally a broad catch-all, document it as such in the code.

**Severity:** LOW **File:** src/engine/openings.ts:119-121 ## Problem The `spell-completed-against` condition type in `evaluateCondition()` always returns `true` regardless of context: ```ts case "spell-completed-against": return true; ``` This means any spell completion by the opponent triggers the branch. There is no logic to check *which* spell was completed, its severity, or which hand it was on. The condition type exists in the editor but is non-functional — it fires on every opponent completion. ## Fix If this condition type is meant to be specific, add logic to check the actual spell completed (by name, damage threshold, or hand). If it is intentionally a broad catch-all, document it as such in the code.
Mark closed this issue 2026-05-16 17:23:30 +00:00
Sign in to join this conversation.
No description provided.