forked from External/mage
[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:
parent
e3937e31c1
commit
0df5f17603
36 changed files with 637 additions and 264 deletions
|
|
@ -1272,7 +1272,7 @@ public final class CardUtil {
|
|||
Card permCard;
|
||||
if (card instanceof SplitCard) {
|
||||
permCard = card;
|
||||
} else if (card instanceof AdventureCard) {
|
||||
} else if (card instanceof CardWithSpellOption) {
|
||||
permCard = card;
|
||||
} else if (card instanceof ModalDoubleFacedCard) {
|
||||
permCard = ((ModalDoubleFacedCard) card).getLeftHalfCard();
|
||||
|
|
@ -1460,9 +1460,9 @@ public final class CardUtil {
|
|||
if (cardToCast instanceof CardWithHalves) {
|
||||
cards.add(((CardWithHalves) cardToCast).getLeftHalfCard());
|
||||
cards.add(((CardWithHalves) cardToCast).getRightHalfCard());
|
||||
} else if (cardToCast instanceof AdventureCard) {
|
||||
} else if (cardToCast instanceof CardWithSpellOption) {
|
||||
cards.add(cardToCast);
|
||||
cards.add(((AdventureCard) cardToCast).getSpellCard());
|
||||
cards.add(((CardWithSpellOption) cardToCast).getSpellCard());
|
||||
} else {
|
||||
cards.add(cardToCast);
|
||||
}
|
||||
|
|
@ -1651,9 +1651,9 @@ public final class CardUtil {
|
|||
}
|
||||
|
||||
// handle adventure cards
|
||||
if (card instanceof AdventureCard) {
|
||||
if (card instanceof CardWithSpellOption) {
|
||||
Card creatureCard = card.getMainCard();
|
||||
Card spellCard = ((AdventureCard) card).getSpellCard();
|
||||
Card spellCard = ((CardWithSpellOption) card).getSpellCard();
|
||||
if (manaCost != null) {
|
||||
// get additional cost if any
|
||||
Costs<Cost> additionalCostsCreature = creatureCard.getSpellAbility().getCosts();
|
||||
|
|
@ -1691,9 +1691,9 @@ public final class CardUtil {
|
|||
game.getState().setValue("PlayFromNotOwnHandZone" + leftHalfCard.getId(), null);
|
||||
game.getState().setValue("PlayFromNotOwnHandZone" + rightHalfCard.getId(), null);
|
||||
}
|
||||
if (card instanceof AdventureCard) {
|
||||
if (card instanceof CardWithSpellOption) {
|
||||
Card creatureCard = card.getMainCard();
|
||||
Card spellCard = ((AdventureCard) card).getSpellCard();
|
||||
Card spellCard = ((CardWithSpellOption) card).getSpellCard();
|
||||
game.getState().setValue("PlayFromNotOwnHandZone" + creatureCard.getId(), null);
|
||||
game.getState().setValue("PlayFromNotOwnHandZone" + spellCard.getId(), null);
|
||||
}
|
||||
|
|
@ -2078,8 +2078,8 @@ public final class CardUtil {
|
|||
res.add(mainCard);
|
||||
res.add(mainCard.getLeftHalfCard());
|
||||
res.add(mainCard.getRightHalfCard());
|
||||
} else if (object instanceof AdventureCard || object instanceof AdventureCardSpell) {
|
||||
AdventureCard mainCard = (AdventureCard) ((Card) object).getMainCard();
|
||||
} else if (object instanceof CardWithSpellOption || object instanceof SpellOptionCard) {
|
||||
CardWithSpellOption mainCard = (CardWithSpellOption) ((Card) object).getMainCard();
|
||||
res.add(mainCard);
|
||||
res.add(mainCard.getSpellCard());
|
||||
} else if (object instanceof Spell) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue