[TDM] Implement omen mechanic (#13501)

* Abstract AdventureCard to SingleFaceSplitCard

* Fix AdventureCardSpellImpl

* Finish converting adventure card and adventure spell

* Update Brightcap Badger

change finalize call to adventure card

* Update Darksteel Monolith

being cast from hand condition referencing AdventureCardSpell

* Update Tlincalli Hunter

exiled creature condition referencing AdventureCardSpell

* Update Twice Upon a Time

finalizeAdventure called from Adventure card

* Finish abstracting Adventure

missed some more references to adventure cards

* Implement Omen cards

* Implement Dirgur Island Dragon

* Missed some adventureSpellName references

* OmenCardSpell had wrong comma symbol

* Add tests for Omen Cards

* Rename two part card components

change from SingleFaceSplitCard to CardWithSpellOption

* Update comments and variable name
This commit is contained in:
Jmlundeen 2025-04-08 07:54:18 -05:00 committed by GitHub
parent e3937e31c1
commit 0df5f17603
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
36 changed files with 637 additions and 264 deletions

View file

@ -432,21 +432,21 @@ public class CardView extends SimpleCardView {
fullCardName = mainCard.getLeftHalfCard().getName() + MockCard.MODAL_DOUBLE_FACES_NAME_SEPARATOR + mainCard.getRightHalfCard().getName();
this.manaCostLeftStr = mainCard.getLeftHalfCard().getManaCostSymbols();
this.manaCostRightStr = mainCard.getRightHalfCard().getManaCostSymbols();
} else if (card instanceof AdventureCard) {
} else if (card instanceof CardWithSpellOption) {
this.isSplitCard = true;
AdventureCard adventureCard = ((AdventureCard) card);
leftSplitName = adventureCard.getName();
leftSplitCostsStr = String.join("", adventureCard.getManaCostSymbols());
leftSplitRules = adventureCard.getSharedRules(game);
leftSplitTypeLine = getCardTypeLine(game, adventureCard);
AdventureCardSpell adventureCardSpell = adventureCard.getSpellCard();
rightSplitName = adventureCardSpell.getName();
rightSplitCostsStr = String.join("", adventureCardSpell.getManaCostSymbols());
rightSplitRules = adventureCardSpell.getRules(game);
rightSplitTypeLine = getCardTypeLine(game, adventureCardSpell);
fullCardName = adventureCard.getName() + MockCard.ADVENTURE_NAME_SEPARATOR + adventureCardSpell.getName();
this.manaCostLeftStr = adventureCard.getManaCostSymbols();
this.manaCostRightStr = adventureCardSpell.getManaCostSymbols();
CardWithSpellOption mainCard = ((CardWithSpellOption) card);
leftSplitName = mainCard.getName();
leftSplitCostsStr = String.join("", mainCard.getManaCostSymbols());
leftSplitRules = mainCard.getSharedRules(game);
leftSplitTypeLine = getCardTypeLine(game, mainCard);
SpellOptionCard splitCardSpell = mainCard.getSpellCard();
rightSplitName = splitCardSpell.getName();
rightSplitCostsStr = String.join("", splitCardSpell.getManaCostSymbols());
rightSplitRules = splitCardSpell.getRules(game);
rightSplitTypeLine = getCardTypeLine(game, splitCardSpell);
fullCardName = mainCard.getName() + MockCard.CARD_WITH_SPELL_OPTION_NAME_SEPARATOR + splitCardSpell.getName();
this.manaCostLeftStr = mainCard.getManaCostSymbols();
this.manaCostRightStr = splitCardSpell.getManaCostSymbols();
} else if (card instanceof MockCard) {
// deck editor cards
fullCardName = ((MockCard) card).getFullName(true);