Skip to content

Add support for the Reprise mechanic - #46

Open
Ellios77 wants to merge 2 commits into
forge-customfrom
codex/add-reprise-mechanic-to-custom-cards
Open

Add support for the Reprise mechanic#46
Ellios77 wants to merge 2 commits into
forge-customfrom
codex/add-reprise-mechanic-to-custom-cards

Conversation

@Ellios77

Copy link
Copy Markdown
Owner

Motivation

  • Implement the Reprise mechanic so instant and sorcery cards can be exiled from the graveyard to add their effects to another spell while paying an additional reprise cost.
  • Provide engine and UI hooks so cards and card scripts can detect and display reprised spells and enforce the one-card reprise limit.

Description

  • Register a new costed keyword REPRISE with reminder text in Keyword.java and mark it as modifiable in CardUtil.java so text-changing effects work correctly.
  • Add AbilityUtils.addRepriseEffect and AbilityUtils.addRepriseEffect(..., Card) to detect a single eligible graveyard card, append its subability to an instant/sorcery being cast, and add the exile + reprise cost to that spell.
  • Expose reprised state on SpellAbility via reprisedCards, addReprisedCard(...), getReprisedCards() and isReprising() and make SpellAbilityProperty recognize Reprise/Reprising checks.
  • Add a dedicated chooser API chooseCardForReprise to PlayerController and a human GUI implementation in PlayerControllerHuman that enforces selecting at most one card, and wire reprise selection into PlaySpellAbility so reprise is considered when casting.

Testing

  • Ran git diff --check to validate local code style and simple errors, which reported no check failures.
  • Attempted to compile with mvn -pl forge-game -am -DskipTests compile, but the build was blocked by Maven Central dependency resolution for the build extension org.apache.maven.wagon:wagon-ftp:3.5.3 in this environment, so a full compile could not be completed here.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant