mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
* Jeleva, Nephalia's Scourge and Knowledge Pool - Fixed a bug that created null pointer exception if card was cast from exile.
This commit is contained in:
parent
547d53a2ec
commit
14cd2dfa6d
3 changed files with 4 additions and 9 deletions
|
@ -160,7 +160,6 @@ class JelevaNephaliasCastEffect extends OneShotEffect {
|
|||
if (controller.choose(Outcome.PlayForFree, exileZone, target, game)) {
|
||||
Card card = game.getCard(target.getFirstTarget());
|
||||
if (card != null) {
|
||||
game.getExile().removeCard(card, game);
|
||||
return controller.cast(card.getSpellAbility(), game, true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -178,7 +178,6 @@ class KnowledgePoolEffect2 extends OneShotEffect {
|
|||
while (player.choose(Outcome.PlayForFree, game.getExile().getExileZone(exileZoneId), target, game)) {
|
||||
Card card = game.getCard(target.getFirstTarget());
|
||||
if (card != null && !card.getId().equals(spell.getSourceId())) {
|
||||
game.getExile().removeCard(card, game);
|
||||
return player.cast(card.getSpellAbility(), game, true);
|
||||
}
|
||||
target.clearChosen();
|
||||
|
|
|
@ -40,7 +40,6 @@ import java.util.List;
|
|||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Random;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import mage.ConditionalMana;
|
||||
|
@ -83,7 +82,6 @@ import mage.actions.MageDrawAction;
|
|||
import mage.cards.Card;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.cards.MeldCard;
|
||||
import mage.cards.SplitCard;
|
||||
import mage.cards.decks.Deck;
|
||||
import mage.constants.AbilityType;
|
||||
|
@ -118,7 +116,6 @@ import mage.game.events.ZoneChangeEvent;
|
|||
import mage.game.match.MatchPlayer;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.PermanentCard;
|
||||
import mage.game.permanent.PermanentMeld;
|
||||
import mage.game.stack.Spell;
|
||||
import mage.game.stack.StackAbility;
|
||||
import mage.game.stack.StackObject;
|
||||
|
@ -1852,7 +1849,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
returnCode = false;
|
||||
}
|
||||
}
|
||||
if(finalAmount > 0) {
|
||||
if (finalAmount > 0) {
|
||||
game.fireEvent(GameEvent.getEvent(EventType.COUNTERS_ADDED, playerId, playerId, counter.getName(), amount));
|
||||
}
|
||||
} else {
|
||||
|
@ -3161,9 +3158,9 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
if (permanent != null) {
|
||||
successfulMovedCards.add(permanent);
|
||||
if (!game.isSimulation()) {
|
||||
game.informPlayers(game.getPlayer(info.event.getPlayerId()) + " puts " +
|
||||
(info.faceDown ? "a card face down " : permanent.getLogName()) + " from " +
|
||||
fromZone.toString().toLowerCase(Locale.ENGLISH) + " onto the Battlefield");
|
||||
game.informPlayers(game.getPlayer(info.event.getPlayerId()) + " puts "
|
||||
+ (info.faceDown ? "a card face down " : permanent.getLogName()) + " from "
|
||||
+ fromZone.toString().toLowerCase(Locale.ENGLISH) + " onto the Battlefield");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue