forked from External/mage
* Enters battlefield, played land triggered abilities - fixed multiple rollback errors on missing target;
This commit is contained in:
parent
9cf1ee2f42
commit
49ea0205d0
18 changed files with 89 additions and 106 deletions
|
|
@ -1,7 +1,5 @@
|
||||||
|
|
||||||
package mage.cards.a;
|
package mage.cards.a;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.TriggeredAbilityImpl;
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
import mage.abilities.effects.Effect;
|
import mage.abilities.effects.Effect;
|
||||||
|
|
@ -20,8 +18,9 @@ import mage.game.events.GameEvent.EventType;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.target.common.TargetOpponentOrPlaneswalker;
|
import mage.target.common.TargetOpponentOrPlaneswalker;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
|
* @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
|
||||||
*/
|
*/
|
||||||
public final class AetherCharge extends CardImpl {
|
public final class AetherCharge extends CardImpl {
|
||||||
|
|
@ -69,7 +68,7 @@ class AetherChargeTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
@Override
|
@Override
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
Permanent permanent = game.getPermanent(event.getTargetId());
|
Permanent permanent = game.getPermanent(event.getTargetId());
|
||||||
if (permanent.isCreature() && permanent.hasSubtype(SubType.BEAST, game)
|
if (permanent != null && permanent.isCreature() && permanent.hasSubtype(SubType.BEAST, game)
|
||||||
&& permanent.isControlledBy(this.controllerId)) {
|
&& permanent.isControlledBy(this.controllerId)) {
|
||||||
Effect effect = this.getEffects().get(0);
|
Effect effect = this.getEffects().get(0);
|
||||||
effect.setValue("damageSource", event.getTargetId());
|
effect.setValue("damageSource", event.getTargetId());
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
|
|
||||||
package mage.cards.a;
|
package mage.cards.a;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.TriggeredAbilityImpl;
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
|
@ -16,14 +14,15 @@ import mage.game.events.GameEvent.EventType;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Backfir3
|
* @author Backfir3
|
||||||
*/
|
*/
|
||||||
public final class AngelicChorus extends CardImpl {
|
public final class AngelicChorus extends CardImpl {
|
||||||
|
|
||||||
public AngelicChorus(UUID ownerId, CardSetInfo setInfo) {
|
public AngelicChorus(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{W}{W}");
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}{W}");
|
||||||
|
|
||||||
// Whenever a creature enters the battlefield under your control, you gain life equal to its toughness.
|
// Whenever a creature enters the battlefield under your control, you gain life equal to its toughness.
|
||||||
this.addAbility(new AngelicChorusTriggeredAbility());
|
this.addAbility(new AngelicChorusTriggeredAbility());
|
||||||
|
|
@ -57,7 +56,8 @@ class AngelicChorusTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
@Override
|
@Override
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
Permanent permanent = game.getPermanent(event.getTargetId());
|
Permanent permanent = game.getPermanent(event.getTargetId());
|
||||||
if (permanent.isCreature()
|
if (permanent != null
|
||||||
|
&& permanent.isCreature()
|
||||||
&& permanent.isControlledBy(this.controllerId)) {
|
&& permanent.isControlledBy(this.controllerId)) {
|
||||||
this.getEffects().get(0).setValue("lifeSource", event.getTargetId());
|
this.getEffects().get(0).setValue("lifeSource", event.getTargetId());
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
|
|
||||||
package mage.cards.a;
|
package mage.cards.a;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.TriggeredAbilityImpl;
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
import mage.abilities.effects.common.GainLifeEffect;
|
import mage.abilities.effects.common.GainLifeEffect;
|
||||||
|
|
@ -16,6 +14,8 @@ import mage.game.events.GameEvent;
|
||||||
import mage.game.events.GameEvent.EventType;
|
import mage.game.events.GameEvent.EventType;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Loki
|
* @author Loki
|
||||||
*/
|
*/
|
||||||
|
|
@ -66,7 +66,8 @@ class ArchonOfRedemptionTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
@Override
|
@Override
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
Permanent permanent = game.getPermanent(event.getTargetId());
|
Permanent permanent = game.getPermanent(event.getTargetId());
|
||||||
if (permanent.isControlledBy(getControllerId())
|
if (permanent != null
|
||||||
|
&& permanent.isControlledBy(getControllerId())
|
||||||
&& permanent.isCreature()
|
&& permanent.isCreature()
|
||||||
&& (permanent.getId().equals(getSourceId())
|
&& (permanent.getId().equals(getSourceId())
|
||||||
|| (permanent.getAbilities().contains(FlyingAbility.getInstance())))) {
|
|| (permanent.getAbilities().contains(FlyingAbility.getInstance())))) {
|
||||||
|
|
|
||||||
|
|
@ -1,29 +1,28 @@
|
||||||
package mage.cards.a;
|
package mage.cards.a;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.costs.mana.ManaCosts;
|
import mage.abilities.costs.mana.ManaCosts;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.abilities.effects.PayCostToAttackBlockEffectImpl;
|
import mage.abilities.effects.PayCostToAttackBlockEffectImpl;
|
||||||
import mage.abilities.effects.PayCostToAttackBlockEffectImpl.RestrictType;
|
|
||||||
import mage.abilities.effects.common.AttachEffect;
|
import mage.abilities.effects.common.AttachEffect;
|
||||||
import mage.constants.Outcome;
|
|
||||||
import mage.target.TargetPermanent;
|
|
||||||
import mage.abilities.keyword.EnchantAbility;
|
import mage.abilities.keyword.EnchantAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.SubType;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author jeffwadsworth
|
* @author jeffwadsworth
|
||||||
*/
|
*/
|
||||||
public final class AwesomePresence extends CardImpl {
|
public final class AwesomePresence extends CardImpl {
|
||||||
|
|
@ -63,7 +62,7 @@ class AwesomePresenceRestrictionEffect extends PayCostToAttackBlockEffectImpl {
|
||||||
+ " can't be blocked "
|
+ " can't be blocked "
|
||||||
+ "unless defending player pays "
|
+ "unless defending player pays "
|
||||||
+ (manaCosts == null ? "" : manaCosts.getText()
|
+ (manaCosts == null ? "" : manaCosts.getText()
|
||||||
+ " for each creature they control that's blocking it");
|
+ " for each creature they control that's blocking it");
|
||||||
}
|
}
|
||||||
|
|
||||||
public AwesomePresenceRestrictionEffect(AwesomePresenceRestrictionEffect effect) {
|
public AwesomePresenceRestrictionEffect(AwesomePresenceRestrictionEffect effect) {
|
||||||
|
|
@ -77,13 +76,12 @@ class AwesomePresenceRestrictionEffect extends PayCostToAttackBlockEffectImpl {
|
||||||
Permanent enchantment = game.getPermanent(source.getSourceId());
|
Permanent enchantment = game.getPermanent(source.getSourceId());
|
||||||
if (blockingCreature != null
|
if (blockingCreature != null
|
||||||
&& enchantedAttackingCreature != null
|
&& enchantedAttackingCreature != null
|
||||||
|
&& enchantment != null
|
||||||
&& enchantment.isAttachedTo(enchantedAttackingCreature.getId())) {
|
&& enchantment.isAttachedTo(enchantedAttackingCreature.getId())) {
|
||||||
Player defendingPlayer = game.getPlayer(blockingCreature.getControllerId());
|
Player defendingPlayer = game.getPlayer(blockingCreature.getControllerId());
|
||||||
if (defendingPlayer != null) {
|
if (defendingPlayer != null) {
|
||||||
if (manaCosts.canPay(source, source.getSourceId(), defendingPlayer.getId(), game)
|
return !manaCosts.canPay(source, source.getSourceId(), defendingPlayer.getId(), game)
|
||||||
&& manaCosts.pay(source, game, source.getSourceId(), defendingPlayer.getId(), false)) {
|
|| !manaCosts.pay(source, game, source.getSourceId(), defendingPlayer.getId(), false);
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
|
|
||||||
package mage.cards.b;
|
package mage.cards.b;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.TriggeredAbilityImpl;
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
import mage.abilities.effects.common.PutCardFromHandOntoBattlefieldEffect;
|
import mage.abilities.effects.common.PutCardFromHandOntoBattlefieldEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
|
@ -14,6 +12,8 @@ import mage.game.events.GameEvent;
|
||||||
import mage.game.events.GameEvent.EventType;
|
import mage.game.events.GameEvent.EventType;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author duncant
|
* @author duncant
|
||||||
*/
|
*/
|
||||||
|
|
@ -54,7 +54,7 @@ class BurgeoningTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
@Override
|
@Override
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
Permanent land = game.getPermanent(event.getTargetId());
|
Permanent land = game.getPermanent(event.getTargetId());
|
||||||
return game.getOpponents(controllerId).contains(land.getControllerId());
|
return land != null && game.getOpponents(controllerId).contains(land.getControllerId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,5 @@
|
||||||
|
|
||||||
package mage.cards.c;
|
package mage.cards.c;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.Mana;
|
import mage.Mana;
|
||||||
import mage.abilities.TriggeredAbilityImpl;
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
import mage.abilities.costs.common.TapSourceCost;
|
import mage.abilities.costs.common.TapSourceCost;
|
||||||
|
|
@ -17,14 +14,16 @@ import mage.game.events.GameEvent;
|
||||||
import mage.game.events.GameEvent.EventType;
|
import mage.game.events.GameEvent.EventType;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author jeffwadsworth
|
* @author jeffwadsworth
|
||||||
*/
|
*/
|
||||||
public final class CityOfTraitors extends CardImpl {
|
public final class CityOfTraitors extends CardImpl {
|
||||||
|
|
||||||
public CityOfTraitors(UUID ownerId, CardSetInfo setInfo) {
|
public CityOfTraitors(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.LAND},"");
|
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
|
||||||
|
|
||||||
// When you play another land, sacrifice City of Traitors.
|
// When you play another land, sacrifice City of Traitors.
|
||||||
this.addAbility(new CityOfTraitorsTriggeredAbility());
|
this.addAbility(new CityOfTraitorsTriggeredAbility());
|
||||||
|
|
@ -61,7 +60,8 @@ class CityOfTraitorsTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
@Override
|
@Override
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
Permanent land = game.getPermanent(event.getTargetId());
|
Permanent land = game.getPermanent(event.getTargetId());
|
||||||
return land.isLand()
|
return land != null
|
||||||
|
&& land.isLand()
|
||||||
&& land.isControlledBy(this.controllerId)
|
&& land.isControlledBy(this.controllerId)
|
||||||
&& !Objects.equals(event.getTargetId(), this.getSourceId());
|
&& !Objects.equals(event.getTargetId(), this.getSourceId());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
|
|
||||||
package mage.cards.d;
|
package mage.cards.d;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.TriggeredAbilityImpl;
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||||
|
|
@ -16,14 +14,15 @@ import mage.game.events.GameEvent;
|
||||||
import mage.game.events.GameEvent.EventType;
|
import mage.game.events.GameEvent.EventType;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author fireshoes
|
* @author fireshoes
|
||||||
*/
|
*/
|
||||||
public final class DirtcowlWurm extends CardImpl {
|
public final class DirtcowlWurm extends CardImpl {
|
||||||
|
|
||||||
public DirtcowlWurm(UUID ownerId, CardSetInfo setInfo) {
|
public DirtcowlWurm(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}");
|
||||||
this.subtype.add(SubType.WURM);
|
this.subtype.add(SubType.WURM);
|
||||||
this.power = new MageInt(3);
|
this.power = new MageInt(3);
|
||||||
this.toughness = new MageInt(4);
|
this.toughness = new MageInt(4);
|
||||||
|
|
@ -59,7 +58,7 @@ class DirtcowlWurmTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
@Override
|
@Override
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
Permanent land = game.getPermanent(event.getTargetId());
|
Permanent land = game.getPermanent(event.getTargetId());
|
||||||
return game.getOpponents(controllerId).contains(land.getControllerId());
|
return land != null && game.getOpponents(controllerId).contains(land.getControllerId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
|
|
||||||
package mage.cards.f;
|
package mage.cards.f;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.TriggeredAbilityImpl;
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
|
|
@ -11,8 +9,8 @@ import mage.abilities.keyword.UndyingAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.EntersTheBattlefieldEvent;
|
import mage.game.events.EntersTheBattlefieldEvent;
|
||||||
|
|
@ -22,14 +20,15 @@ import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.common.TargetAnyTarget;
|
import mage.target.common.TargetAnyTarget;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author BetaSteward
|
* @author BetaSteward
|
||||||
*/
|
*/
|
||||||
public final class FlayerOfTheHatebound extends CardImpl {
|
public final class FlayerOfTheHatebound extends CardImpl {
|
||||||
|
|
||||||
public FlayerOfTheHatebound(UUID ownerId, CardSetInfo setInfo) {
|
public FlayerOfTheHatebound(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{R}");
|
||||||
this.subtype.add(SubType.DEVIL);
|
this.subtype.add(SubType.DEVIL);
|
||||||
|
|
||||||
this.power = new MageInt(4);
|
this.power = new MageInt(4);
|
||||||
|
|
@ -71,7 +70,8 @@ class FlayerTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
@Override
|
@Override
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
Permanent permanent = game.getPermanent(event.getTargetId());
|
Permanent permanent = game.getPermanent(event.getTargetId());
|
||||||
if (((EntersTheBattlefieldEvent) event).getFromZone() == Zone.GRAVEYARD
|
if (permanent != null
|
||||||
|
&& ((EntersTheBattlefieldEvent) event).getFromZone() == Zone.GRAVEYARD
|
||||||
&& permanent.isOwnedBy(controllerId)
|
&& permanent.isOwnedBy(controllerId)
|
||||||
&& permanent.isCreature()) {
|
&& permanent.isCreature()) {
|
||||||
Effect effect = this.getEffects().get(0);
|
Effect effect = this.getEffects().get(0);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
package mage.cards.f;
|
package mage.cards.f;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.BecomesTappedTriggeredAbility;
|
import mage.abilities.common.BecomesTappedTriggeredAbility;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
|
@ -9,19 +8,16 @@ import mage.abilities.effects.ReplacementEffectImpl;
|
||||||
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.*;
|
||||||
import mage.constants.Duration;
|
|
||||||
import mage.constants.Outcome;
|
|
||||||
import mage.constants.PhaseStep;
|
|
||||||
import mage.constants.Zone;
|
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author jeffwadsworth
|
* @author jeffwadsworth
|
||||||
*/
|
*/
|
||||||
public final class FreyalisesWinds extends CardImpl {
|
public final class FreyalisesWinds extends CardImpl {
|
||||||
|
|
@ -73,8 +69,11 @@ class FreyalisesWindsReplacementEffect extends ReplacementEffectImpl {
|
||||||
@Override
|
@Override
|
||||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||||
Permanent permanentUntapping = game.getPermanent(event.getTargetId());
|
Permanent permanentUntapping = game.getPermanent(event.getTargetId());
|
||||||
permanentUntapping.removeCounters(CounterType.WIND.createInstance(), game);
|
if (permanentUntapping != null) {
|
||||||
return true;
|
permanentUntapping.removeCounters(CounterType.WIND.createInstance(), game);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.j;
|
package mage.cards.j;
|
||||||
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
|
|
@ -27,7 +26,6 @@ import mage.target.common.TargetControlledPermanent;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author fireshoes
|
* @author fireshoes
|
||||||
*/
|
*/
|
||||||
public final class Jokulmorder extends CardImpl {
|
public final class Jokulmorder extends CardImpl {
|
||||||
|
|
@ -85,7 +83,8 @@ class JokulmorderTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
@Override
|
@Override
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
Permanent land = game.getPermanent(event.getTargetId());
|
Permanent land = game.getPermanent(event.getTargetId());
|
||||||
return land.hasSubtype(SubType.ISLAND, game)
|
return land != null
|
||||||
|
&& land.hasSubtype(SubType.ISLAND, game)
|
||||||
&& land.isControlledBy(this.controllerId);
|
&& land.isControlledBy(this.controllerId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
|
|
||||||
package mage.cards.l;
|
package mage.cards.l;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
|
@ -18,15 +16,15 @@ import mage.game.events.GameEvent;
|
||||||
import mage.game.events.GameEvent.EventType;
|
import mage.game.events.GameEvent.EventType;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
|
|
||||||
/**
|
import java.util.UUID;
|
||||||
*
|
|
||||||
* @author LoneFox
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author LoneFox
|
||||||
*/
|
*/
|
||||||
public final class LashknifeBarrier extends CardImpl {
|
public final class LashknifeBarrier extends CardImpl {
|
||||||
|
|
||||||
public LashknifeBarrier(UUID ownerId, CardSetInfo setInfo) {
|
public LashknifeBarrier(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}");
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}");
|
||||||
|
|
||||||
// When Lashknife Barrier enters the battlefield, draw a card.
|
// When Lashknife Barrier enters the battlefield, draw a card.
|
||||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1)));
|
this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1)));
|
||||||
|
|
@ -79,7 +77,7 @@ class LashknifeBarrierEffect extends ReplacementEffectImpl {
|
||||||
@Override
|
@Override
|
||||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||||
Permanent creature = game.getPermanent(event.getTargetId());
|
Permanent creature = game.getPermanent(event.getTargetId());
|
||||||
return creature.isControlledBy(source.getControllerId());
|
return creature != null && creature.isControlledBy(source.getControllerId());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
|
|
||||||
package mage.cards.r;
|
package mage.cards.r;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.TriggeredAbilityImpl;
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
|
@ -12,8 +10,8 @@ import mage.abilities.keyword.EquipAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
|
|
@ -22,23 +20,24 @@ import mage.game.permanent.Permanent;
|
||||||
import mage.target.Target;
|
import mage.target.Target;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
*/
|
*/
|
||||||
public final class RoninWarclub extends CardImpl {
|
public final class RoninWarclub extends CardImpl {
|
||||||
|
|
||||||
public RoninWarclub(UUID ownerId, CardSetInfo setInfo) {
|
public RoninWarclub(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}");
|
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
|
||||||
this.subtype.add(SubType.EQUIPMENT);
|
this.subtype.add(SubType.EQUIPMENT);
|
||||||
// Equipped creature gets +2/+1.
|
// Equipped creature gets +2/+1.
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 1)));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 1)));
|
||||||
|
|
||||||
// Whenever a creature enters the battlefield under your control, attach Ronin Warclub to that creature.
|
// Whenever a creature enters the battlefield under your control, attach Ronin Warclub to that creature.
|
||||||
Ability ability = new RoninWarclubTriggeredAbility();
|
Ability ability = new RoninWarclubTriggeredAbility();
|
||||||
ability.addTarget(new TargetCreaturePermanent());
|
ability.addTarget(new TargetCreaturePermanent());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
// Equip {5} ({5}: Attach to target creature you control. Equip only as a sorcery.)
|
// Equip {5} ({5}: Attach to target creature you control. Equip only as a sorcery.)
|
||||||
this.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(5)));
|
this.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(5)));
|
||||||
}
|
}
|
||||||
|
|
@ -51,11 +50,11 @@ public final class RoninWarclub extends CardImpl {
|
||||||
public RoninWarclub copy() {
|
public RoninWarclub copy() {
|
||||||
return new RoninWarclub(this);
|
return new RoninWarclub(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
private class RoninWarclubTriggeredAbility extends TriggeredAbilityImpl {
|
private class RoninWarclubTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
|
|
||||||
public RoninWarclubTriggeredAbility() {
|
public RoninWarclubTriggeredAbility() {
|
||||||
super(Zone.BATTLEFIELD, new RoninWarclubAttachEffect(), false);
|
super(Zone.BATTLEFIELD, new RoninWarclubAttachEffect(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public RoninWarclubTriggeredAbility(RoninWarclubTriggeredAbility ability) {
|
public RoninWarclubTriggeredAbility(RoninWarclubTriggeredAbility ability) {
|
||||||
|
|
@ -70,8 +69,9 @@ public final class RoninWarclub extends CardImpl {
|
||||||
@Override
|
@Override
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
Permanent permanent = game.getPermanent(event.getTargetId());
|
Permanent permanent = game.getPermanent(event.getTargetId());
|
||||||
if (permanent.isCreature()
|
if (permanent != null
|
||||||
&& (permanent.isControlledBy(this.controllerId))) {
|
&& permanent.isCreature()
|
||||||
|
&& permanent.isControlledBy(this.controllerId)) {
|
||||||
|
|
||||||
if (!this.getTargets().isEmpty()) {
|
if (!this.getTargets().isEmpty()) {
|
||||||
// remove previous target
|
// remove previous target
|
||||||
|
|
@ -94,7 +94,7 @@ public final class RoninWarclub extends CardImpl {
|
||||||
return new RoninWarclubTriggeredAbility(this);
|
return new RoninWarclubTriggeredAbility(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class RoninWarclubAttachEffect extends OneShotEffect {
|
private static class RoninWarclubAttachEffect extends OneShotEffect {
|
||||||
|
|
||||||
public RoninWarclubAttachEffect() {
|
public RoninWarclubAttachEffect() {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package mage.cards.s;
|
package mage.cards.s;
|
||||||
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
|
import mage.MageObject;
|
||||||
import mage.abilities.TriggeredAbilityImpl;
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
import mage.abilities.effects.Effect;
|
import mage.abilities.effects.Effect;
|
||||||
import mage.abilities.effects.common.CreateTokenEffect;
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
|
|
@ -14,14 +15,12 @@ import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.game.permanent.token.WolfToken;
|
import mage.game.permanent.token.WolfToken;
|
||||||
import mage.game.stack.Spell;
|
|
||||||
import mage.target.targetpointer.FixedTarget;
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageObject;
|
|
||||||
import mage.game.stack.StackObject;
|
import mage.game.stack.StackObject;
|
||||||
|
import mage.target.targetpointer.FixedTarget;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author fireshoes
|
* @author fireshoes
|
||||||
*/
|
*/
|
||||||
public final class SilverfurPartisan extends CardImpl {
|
public final class SilverfurPartisan extends CardImpl {
|
||||||
|
|
@ -79,8 +78,7 @@ class CreaturesYouControlBecomesTargetTriggeredAbility extends TriggeredAbilityI
|
||||||
&& permanent.isControlledBy(this.controllerId)
|
&& permanent.isControlledBy(this.controllerId)
|
||||||
&& (permanent.hasSubtype(SubType.WOLF, game)
|
&& (permanent.hasSubtype(SubType.WOLF, game)
|
||||||
|| permanent.hasSubtype(SubType.WEREWOLF, game))) {
|
|| permanent.hasSubtype(SubType.WEREWOLF, game))) {
|
||||||
if (object instanceof Spell
|
if (object instanceof StackObject) {
|
||||||
|| object instanceof StackObject) {
|
|
||||||
if (object.isInstant()
|
if (object.isInstant()
|
||||||
|| object.isSorcery()) {
|
|| object.isSorcery()) {
|
||||||
if (getTargets().isEmpty()) {
|
if (getTargets().isEmpty()) {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
|
|
||||||
package mage.cards.u;
|
package mage.cards.u;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.TriggeredAbilityImpl;
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.abilities.effects.Effect;
|
import mage.abilities.effects.Effect;
|
||||||
|
|
@ -24,8 +22,9 @@ import mage.game.events.GameEvent.EventType;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author spjspj
|
* @author spjspj
|
||||||
*/
|
*/
|
||||||
public final class UnconventionalTactics extends CardImpl {
|
public final class UnconventionalTactics extends CardImpl {
|
||||||
|
|
@ -91,12 +90,10 @@ class UnconventionalTacticsTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
@Override
|
@Override
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
Permanent permanent = game.getPermanent(event.getTargetId());
|
Permanent permanent = game.getPermanent(event.getTargetId());
|
||||||
if (permanent.isCreature()
|
return permanent != null
|
||||||
|
&& permanent.isCreature()
|
||||||
&& permanent.isControlledBy(this.controllerId)
|
&& permanent.isControlledBy(this.controllerId)
|
||||||
&& filter.match(permanent, game)) {
|
&& filter.match(permanent, game);
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
|
|
||||||
package mage.cards.w;
|
package mage.cards.w;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.TriggeredAbilityImpl;
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
import mage.abilities.effects.Effect;
|
import mage.abilities.effects.Effect;
|
||||||
|
|
@ -18,14 +16,15 @@ import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.common.TargetAnyTarget;
|
import mage.target.common.TargetAnyTarget;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author North
|
* @author North
|
||||||
*/
|
*/
|
||||||
public final class WarstormSurge extends CardImpl {
|
public final class WarstormSurge extends CardImpl {
|
||||||
|
|
||||||
public WarstormSurge(UUID ownerId, CardSetInfo setInfo) {
|
public WarstormSurge(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{5}{R}");
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{5}{R}");
|
||||||
|
|
||||||
// Whenever a creature enters the battlefield under your control, it deals damage equal to its power to any target.
|
// Whenever a creature enters the battlefield under your control, it deals damage equal to its power to any target.
|
||||||
Ability ability = new WarstormSurgeTriggeredAbility();
|
Ability ability = new WarstormSurgeTriggeredAbility();
|
||||||
|
|
@ -61,7 +60,8 @@ class WarstormSurgeTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
@Override
|
@Override
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
Permanent permanent = game.getPermanent(event.getTargetId());
|
Permanent permanent = game.getPermanent(event.getTargetId());
|
||||||
if (permanent.isCreature()
|
if (permanent != null
|
||||||
|
&& permanent.isCreature()
|
||||||
&& permanent.isControlledBy(this.controllerId)) {
|
&& permanent.isControlledBy(this.controllerId)) {
|
||||||
Effect effect = this.getEffects().get(0);
|
Effect effect = this.getEffects().get(0);
|
||||||
effect.setValue("damageSource", event.getTargetId());
|
effect.setValue("damageSource", event.getTargetId());
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@ import mage.game.events.GameEvent.EventType;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author jeffwadsworth
|
* @author jeffwadsworth
|
||||||
*/
|
*/
|
||||||
public class ControllerPlaysLandTriggeredAbility extends TriggeredAbilityImpl {
|
public class ControllerPlaysLandTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
|
|
@ -35,7 +34,7 @@ public class ControllerPlaysLandTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
@Override
|
@Override
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
Permanent land = game.getPermanent(event.getTargetId());
|
Permanent land = game.getPermanent(event.getTargetId());
|
||||||
return land.getControllerId().equals(controllerId);
|
return land != null && land.getControllerId().equals(controllerId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ import mage.game.events.GameEvent;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author jeffwadsworth
|
* @author jeffwadsworth
|
||||||
*/
|
*/
|
||||||
public class OpponentPlaysLandTriggeredAbility extends TriggeredAbilityImpl {
|
public class OpponentPlaysLandTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
|
|
@ -34,7 +33,7 @@ public class OpponentPlaysLandTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
@Override
|
@Override
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
Permanent land = game.getPermanent(event.getTargetId());
|
Permanent land = game.getPermanent(event.getTargetId());
|
||||||
return game.getOpponents(controllerId).contains(land.getControllerId());
|
return land != null && game.getOpponents(controllerId).contains(land.getControllerId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
|
|
||||||
|
|
||||||
package mage.abilities.common;
|
package mage.abilities.common;
|
||||||
|
|
||||||
import mage.MageObject;
|
import mage.MageObject;
|
||||||
|
|
@ -14,7 +12,6 @@ import mage.game.permanent.Permanent;
|
||||||
import mage.target.targetpointer.FixedTarget;
|
import mage.target.targetpointer.FixedTarget;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -27,7 +24,7 @@ public class TurnedFaceUpAllTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
this(effect, filter, false);
|
this(effect, filter, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public TurnedFaceUpAllTriggeredAbility(Effect effect, FilterPermanent filter, boolean setTargetPointer) {
|
public TurnedFaceUpAllTriggeredAbility(Effect effect, FilterPermanent filter, boolean setTargetPointer) {
|
||||||
this(Zone.BATTLEFIELD, effect, filter, setTargetPointer, false);
|
this(Zone.BATTLEFIELD, effect, filter, setTargetPointer, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -60,7 +57,7 @@ public class TurnedFaceUpAllTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
if (!event.getTargetId().equals(getSourceId())) {
|
if (!event.getTargetId().equals(getSourceId())) {
|
||||||
MageObject sourceObj = this.getSourceObject(game);
|
MageObject sourceObj = this.getSourceObject(game);
|
||||||
if (sourceObj != null) {
|
if (sourceObj != null) {
|
||||||
if (sourceObj instanceof Card && ((Card)sourceObj).isFaceDown(game)) {
|
if (sourceObj instanceof Card && ((Card) sourceObj).isFaceDown(game)) {
|
||||||
// if face down and it's not itself that is turned face up, it does not trigger
|
// if face down and it's not itself that is turned face up, it does not trigger
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -70,9 +67,9 @@ public class TurnedFaceUpAllTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Permanent permanent = game.getPermanent(event.getTargetId());
|
Permanent permanent = game.getPermanent(event.getTargetId());
|
||||||
if (filter.match(permanent, getSourceId(), getControllerId(), game)) {
|
if (permanent != null && filter.match(permanent, getSourceId(), getControllerId(), game)) {
|
||||||
if (setTargetPointer) {
|
if (setTargetPointer) {
|
||||||
for (Effect effect: getEffects()) {
|
for (Effect effect : getEffects()) {
|
||||||
effect.setTargetPointer(new FixedTarget(event.getTargetId()));
|
effect.setTargetPointer(new FixedTarget(event.getTargetId()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue