mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
Added additional fixes for getSpellAbility() usage, related to ce3cf742c9
This commit is contained in:
parent
ce3cf742c9
commit
499f21778d
4 changed files with 4 additions and 4 deletions
|
@ -80,7 +80,7 @@ class GhastlyConscriptionEffect extends OneShotEffect {
|
|||
for (Card card : cardsToManifest) {
|
||||
ManaCosts manaCosts = null;
|
||||
if (card.isCreature(game)) {
|
||||
manaCosts = card.getSpellAbility().getManaCosts();
|
||||
manaCosts = card.getSpellAbility() != null ? card.getSpellAbility().getManaCosts() : null;
|
||||
if (manaCosts == null) {
|
||||
manaCosts = new ManaCostsImpl<>("{0}");
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ class IceCaveEffect extends OneShotEffect {
|
|||
Spell spell = (Spell) game.getStack().getStackObject(targetPointer.getFirst(game, source));
|
||||
if (sourcePermanent != null && spell != null && controller != null) {
|
||||
Player spellController = game.getPlayer(spell.getControllerId());
|
||||
Cost cost = new ManaCostsImpl<>(spell.getSpellAbility().getManaCosts().getText());
|
||||
Cost cost = new ManaCostsImpl<>(spell.getSpellAbility() == null ? "" : spell.getSpellAbility().getManaCosts().getText());
|
||||
if (spellController != null) {
|
||||
for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
|
|
|
@ -100,7 +100,7 @@ class JeskaiInfiltratorEffect extends OneShotEffect {
|
|||
exileZone.getCards(game).forEach(card -> {
|
||||
ManaCosts manaCosts = null;
|
||||
if (card.isCreature(game)) {
|
||||
manaCosts = card.getSpellAbility().getManaCosts();
|
||||
manaCosts = card.getSpellAbility() != null ? card.getSpellAbility().getManaCosts() : null;
|
||||
if (manaCosts == null) {
|
||||
manaCosts = new ManaCostsImpl<>("{0}");
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ public class ManifestTargetPlayerEffect extends OneShotEffect {
|
|||
for (Card card : cards) {
|
||||
ManaCosts manaCosts = null;
|
||||
if (card.isCreature(game)) {
|
||||
manaCosts = card.getSpellAbility().getManaCosts();
|
||||
manaCosts = card.getSpellAbility() != null ? card.getSpellAbility().getManaCosts() : null;
|
||||
if (manaCosts == null) {
|
||||
manaCosts = new ManaCostsImpl<>("{0}");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue