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.Outcome;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.game.Game;
import mage.players.Player;
import mage.target.TargetPlayer;
@ -96,20 +97,19 @@ class LilianaVessEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
Set<Card> creatureCards = new LinkedHashSet<>();
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
Player player = game.getPlayer(playerId);
if (player != null) {
Set<Card> creatureCards = new LinkedHashSet<>();
for (Card card : player.getGraveyard().getCards(game)) {
if (card.isCreature()) {
creatureCards.add(card);
creatureCards.addAll(player.getGraveyard().getCards(new FilterCreatureCard(), game));
}
}
controller.moveCards(creatureCards, Zone.BATTLEFIELD, source, game, false, false, false, null);
}
}
return true;
}
return false;
}
@Override
public LilianaVessEffect copy() {

View file

@ -31,7 +31,6 @@ import java.util.UUID;
import mage.MageInt;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.costs.common.DiscardCardCost;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.CounterUnlessPaysEffect;
import mage.abilities.keyword.HasteAbility;
import mage.abilities.keyword.TrampleAbility;
@ -39,7 +38,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.filter.FilterSpell;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType;
@ -79,8 +77,6 @@ public class RealitySmasher extends CardImpl {
class RealitySmasherTriggeredAbility extends TriggeredAbilityImpl {
private static final FilterSpell spellCard = new FilterSpell("a spell");
public RealitySmasherTriggeredAbility() {
super(Zone.BATTLEFIELD, new CounterUnlessPaysEffect(new DiscardCardCost()), false);
}
@ -106,11 +102,8 @@ class RealitySmasherTriggeredAbility extends TriggeredAbilityImpl {
return false;
} else {
if (event.getTargetId().equals(this.getSourceId())
&& game.getOpponents(this.controllerId).contains(event.getPlayerId())
&& spellCard.match(spell, getSourceId(), getControllerId(), game)) {
for (Effect effect : getEffects()) {
effect.setTargetPointer(new FixedTarget(spell.getId()));
}
&& game.getOpponents(this.controllerId).contains(event.getPlayerId())) {
getEffects().setTargetPointer(new FixedTarget(spell.getId()));
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/\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 "";