Some minor changes.

This commit is contained in:
LevelX2 2017-08-15 00:32:53 +02:00
parent 6f216ee764
commit 5cf3e4ed12
3 changed files with 22 additions and 25 deletions

View file

@ -42,6 +42,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.game.Game; import mage.game.Game;
import mage.players.Player; import mage.players.Player;
import mage.target.TargetPlayer; import mage.target.TargetPlayer;
@ -54,7 +55,7 @@ import mage.target.common.TargetCardInLibrary;
public class LilianaVess extends CardImpl { public class LilianaVess extends CardImpl {
public LilianaVess(UUID ownerId, CardSetInfo setInfo) { public LilianaVess(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{3}{B}{B}"); super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{3}{B}{B}");
this.subtype.add("Liliana"); this.subtype.add("Liliana");
this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(5)); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(5));
@ -96,19 +97,18 @@ class LilianaVessEffect extends OneShotEffect {
@Override @Override
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId()); Player controller = game.getPlayer(source.getControllerId());
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { if (controller != null) {
Player player = game.getPlayer(playerId); Set<Card> creatureCards = new LinkedHashSet<>();
if (player != null) { for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
Set<Card> creatureCards = new LinkedHashSet<>(); Player player = game.getPlayer(playerId);
for (Card card : player.getGraveyard().getCards(game)) { if (player != null) {
if (card.isCreature()) { creatureCards.addAll(player.getGraveyard().getCards(new FilterCreatureCard(), game));
creatureCards.add(card);
}
} }
controller.moveCards(creatureCards, Zone.BATTLEFIELD, source, game, false, false, false, null);
} }
controller.moveCards(creatureCards, Zone.BATTLEFIELD, source, game, false, false, false, null);
return true;
} }
return true; return false;
} }
@Override @Override

View file

@ -31,7 +31,6 @@ import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.TriggeredAbilityImpl; import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.costs.common.DiscardCardCost; import mage.abilities.costs.common.DiscardCardCost;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.CounterUnlessPaysEffect; import mage.abilities.effects.common.CounterUnlessPaysEffect;
import mage.abilities.keyword.HasteAbility; import mage.abilities.keyword.HasteAbility;
import mage.abilities.keyword.TrampleAbility; import mage.abilities.keyword.TrampleAbility;
@ -39,7 +38,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.FilterSpell;
import mage.game.Game; import mage.game.Game;
import mage.game.events.GameEvent; import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType; import mage.game.events.GameEvent.EventType;
@ -54,7 +52,7 @@ import mage.target.targetpointer.FixedTarget;
public class RealitySmasher extends CardImpl { public class RealitySmasher extends CardImpl {
public RealitySmasher(UUID ownerId, CardSetInfo setInfo) { public RealitySmasher(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{C}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{C}");
this.subtype.add("Eldrazi"); this.subtype.add("Eldrazi");
this.power = new MageInt(5); this.power = new MageInt(5);
this.toughness = new MageInt(5); this.toughness = new MageInt(5);
@ -79,8 +77,6 @@ public class RealitySmasher extends CardImpl {
class RealitySmasherTriggeredAbility extends TriggeredAbilityImpl { class RealitySmasherTriggeredAbility extends TriggeredAbilityImpl {
private static final FilterSpell spellCard = new FilterSpell("a spell");
public RealitySmasherTriggeredAbility() { public RealitySmasherTriggeredAbility() {
super(Zone.BATTLEFIELD, new CounterUnlessPaysEffect(new DiscardCardCost()), false); super(Zone.BATTLEFIELD, new CounterUnlessPaysEffect(new DiscardCardCost()), false);
} }
@ -106,11 +102,8 @@ class RealitySmasherTriggeredAbility extends TriggeredAbilityImpl {
return false; return false;
} else { } else {
if (event.getTargetId().equals(this.getSourceId()) if (event.getTargetId().equals(this.getSourceId())
&& game.getOpponents(this.controllerId).contains(event.getPlayerId()) && game.getOpponents(this.controllerId).contains(event.getPlayerId())) {
&& spellCard.match(spell, getSourceId(), getControllerId(), game)) { getEffects().setTargetPointer(new FixedTarget(spell.getId()));
for (Effect effect : getEffects()) {
effect.setTargetPointer(new FixedTarget(spell.getId()));
}
return true; return true;
} }
} }

View file

@ -77,6 +77,10 @@ sub get_name_of_card_from_class
} }
$card_name =~ s/(.)([A-Z])/$1 $2/g; $card_name =~ s/(.)([A-Z])/$1 $2/g;
$card_name =~ s/\d//g; $card_name =~ s/\d//g;
$card_name =~ s/ The / the /g;
$card_name =~ s/ Of / of /g;
$card_name =~ s/ To / to /g;
$card_name =~ s/ And / and /g;
return $card_name; return $card_name;
} }
return ""; return "";