mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
Fix Adventure/Omen Permanent View
* Adventure/Omen Permanents no longer show rule text from the spell ability * Updated CardView variable for SpellOptionCard
This commit is contained in:
parent
3885e72aad
commit
6bf8aedce7
2 changed files with 14 additions and 7 deletions
|
|
@ -439,14 +439,14 @@ public class CardView extends SimpleCardView {
|
|||
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();
|
||||
SpellOptionCard spellOptionCard = mainCard.getSpellCard();
|
||||
rightSplitName = spellOptionCard.getName();
|
||||
rightSplitCostsStr = String.join("", spellOptionCard.getManaCostSymbols());
|
||||
rightSplitRules = spellOptionCard.getRules(game);
|
||||
rightSplitTypeLine = getCardTypeLine(game, spellOptionCard);
|
||||
fullCardName = mainCard.getName() + MockCard.CARD_WITH_SPELL_OPTION_NAME_SEPARATOR + spellOptionCard.getName();
|
||||
this.manaCostLeftStr = mainCard.getManaCostSymbols();
|
||||
this.manaCostRightStr = splitCardSpell.getManaCostSymbols();
|
||||
this.manaCostRightStr = spellOptionCard.getManaCostSymbols();
|
||||
} else if (card instanceof MockCard) {
|
||||
// deck editor cards
|
||||
fullCardName = ((MockCard) card).getFullName(true);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package mage.view;
|
||||
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardWithSpellOption;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.PermanentToken;
|
||||
|
|
@ -79,6 +80,12 @@ public class PermanentView extends CardView {
|
|||
this.alternateName = original.getName();
|
||||
}
|
||||
}
|
||||
|
||||
// for adventure/omen cards, remove spell card rules
|
||||
if (card instanceof CardWithSpellOption) {
|
||||
this.rules.removeIf(rule -> rule.startsWith("Adventure") || rule.startsWith("Omen"));
|
||||
}
|
||||
|
||||
if (permanent.getOwnerId() != null && !permanent.getOwnerId().equals(permanent.getControllerId())) {
|
||||
Player owner = game.getPlayer(permanent.getOwnerId());
|
||||
if (owner != null) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue