mirror of
https://github.com/correl/mage.git
synced 2025-01-11 11:05:23 +00:00
* Changed indestructible to an ability according M14 rule change. Also fixed that for indestructible permanents the DESTROY_PERMANENT event was triggered what led to bugs with abilities like Totem Armor.
This commit is contained in:
parent
d6813e47c3
commit
5addb63757
64 changed files with 224 additions and 479 deletions
|
@ -1108,7 +1108,7 @@ public class ComputerPlayer6 extends ComputerPlayer<ComputerPlayer6> implements
|
|||
|| blocker.getAbilities().containsKey(DoubleStrikeAbility.getInstance().getId())
|
||||
|| blocker.getAbilities().contains(new ExaltedAbility())
|
||||
|| blocker.getAbilities().containsKey(DeathtouchAbility.getInstance().getId())
|
||||
|| blocker.getAbilities().contains(new IndestructibleAbility())
|
||||
|| blocker.getAbilities().containsKey(IndestructibleAbility.getInstance().getId())
|
||||
|| !attacker.getAbilities().containsKey(FirstStrikeAbility.getInstance().getId())
|
||||
|| !attacker.getAbilities().containsKey(DoubleStrikeAbility.getInstance().getId())
|
||||
|| !attacker.getAbilities().contains(new ExaltedAbility())) {
|
||||
|
@ -1116,7 +1116,7 @@ public class ComputerPlayer6 extends ComputerPlayer<ComputerPlayer6> implements
|
|||
}
|
||||
}
|
||||
if (attacker.getAbilities().containsKey(DeathtouchAbility.getInstance().getId())
|
||||
|| attacker.getAbilities().contains(new IndestructibleAbility())) {
|
||||
|| attacker.getAbilities().containsKey(IndestructibleAbility.getInstance().getId())) {
|
||||
safeToAttack = true;
|
||||
}
|
||||
if (attacker.getAbilities().containsKey(FlyingAbility.getInstance().getId())
|
||||
|
|
|
@ -22,7 +22,7 @@ public class MagicAbility {
|
|||
put(FlyingAbility.getInstance().getRule(), 50);
|
||||
put(new ForestwalkAbility().getRule(), 10);
|
||||
put(HasteAbility.getInstance().getRule(), 0);
|
||||
put(new IndestructibleAbility().getRule(), 150);
|
||||
put(IndestructibleAbility.getInstance().getRule(), 150);
|
||||
put(InfectAbility.getInstance().getRule(), 60);
|
||||
put(IntimidateAbility.getInstance().getRule(), 50);
|
||||
put(new IslandwalkAbility().getRule(), 10);
|
||||
|
|
|
@ -35,7 +35,9 @@ import mage.Constants.Zone;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.effects.common.IndestructibleAllEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityAllEffect;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
|
@ -59,9 +61,9 @@ public class DauntlessEscort extends CardImpl<DauntlessEscort> {
|
|||
|
||||
// Sacrifice Dauntless Escort: Creatures you control are indestructible this turn.
|
||||
FilterPermanent filter = new FilterControlledCreaturePermanent("Creatures you control");
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new IndestructibleAllEffect(filter, Duration.EndOfTurn),
|
||||
new SacrificeSourceCost()));
|
||||
Effect effect = new GainAbilityAllEffect(IndestructibleAbility.getInstance(), Duration.WhileOnBattlefield, filter, false);
|
||||
effect.setText("Creatures you control are indestructible this turn");
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new SacrificeSourceCost()));
|
||||
}
|
||||
|
||||
public DauntlessEscort(final DauntlessEscort card) {
|
||||
|
|
|
@ -27,18 +27,21 @@
|
|||
*/
|
||||
package mage.sets.avacynrestored;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.IndestructibleAllEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityAllEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author noxx
|
||||
|
@ -60,7 +63,9 @@ public class AvacynAngelOfHope extends CardImpl<AvacynAngelOfHope> {
|
|||
|
||||
// Avacyn, Angel of Hope and other permanents you control are indestructible.
|
||||
FilterControlledPermanent filter = new FilterControlledPermanent("Avacyn, Angel of Hope and other permanents you control");
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new IndestructibleAllEffect(filter)));
|
||||
Effect effect = new GainAbilityAllEffect(IndestructibleAbility.getInstance(), Constants.Duration.WhileOnBattlefield, filter, false);
|
||||
effect.setText("{this} and other permanents you control are indestructible");
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
}
|
||||
|
||||
public AvacynAngelOfHope(final AvacynAngelOfHope card) {
|
||||
|
|
|
@ -36,8 +36,10 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.IndestructibleAllEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityAllEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
|
@ -73,7 +75,10 @@ public class ThatWhichWasTaken extends CardImpl<ThatWhichWasTaken> {
|
|||
this.addAbility(ability);
|
||||
|
||||
// Each permanent with a divinity counter on it is indestructible.
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new IndestructibleAllEffect(filterIndestructible)));
|
||||
Effect effect = new GainAbilityAllEffect(IndestructibleAbility.getInstance(), Constants.Duration.WhileOnBattlefield, filterIndestructible, false);
|
||||
effect.setText("Each permanent with a divinity counter on it is indestructible");
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD,
|
||||
effect));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
package mage.sets.championsofkamigawa;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
|
@ -54,7 +53,7 @@ public class KondaLordOfEiganjo extends CardImpl<KondaLordOfEiganjo> {
|
|||
this.toughness = new MageInt(3);
|
||||
this.addAbility(VigilanceAbility.getInstance());
|
||||
this.addAbility(new BushidoAbility(5));
|
||||
this.addAbility(new IndestructibleAbility());
|
||||
this.addAbility(IndestructibleAbility.getInstance());
|
||||
}
|
||||
|
||||
public KondaLordOfEiganjo(final KondaLordOfEiganjo card) {
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
package mage.sets.championsofkamigawa;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
|
@ -76,7 +75,7 @@ public class MyojinOfCleansingFire extends CardImpl<MyojinOfCleansingFire> {
|
|||
// Myojin of Cleansing Fire enters the battlefield with a divinity counter on it if you cast it from your hand.
|
||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.DIVINITY.createInstance()), new CastFromHandCondition(), ""), "{this} enters the battlefield with a divinity counter on it if you cast it from your hand"));
|
||||
// Myojin of Cleansing Fire is indestructible as long as it has a divinity counter on it.
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new ConditionalContinousEffect(new GainAbilitySourceEffect(new IndestructibleAbility(), Constants.Duration.WhileOnBattlefield),
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new ConditionalContinousEffect(new GainAbilitySourceEffect(IndestructibleAbility.getInstance(), Constants.Duration.WhileOnBattlefield),
|
||||
new HasCounterCondition(CounterType.DIVINITY), "{this} is indestructible as long as it has a divinity counter on it")));
|
||||
// Remove a divinity counter from Myojin of Cleansing Fire: Destroy all other creatures.
|
||||
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new DestroyAllEffect(filter), new RemoveCountersSourceCost(CounterType.DIVINITY.createInstance())));
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
package mage.sets.championsofkamigawa;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
|
@ -72,7 +71,7 @@ public class MyojinOfInfiniteRage extends CardImpl<MyojinOfInfiniteRage> {
|
|||
// Myojin of Infinite Rage enters the battlefield with a divinity counter on it if you cast it from your hand.
|
||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.DIVINITY.createInstance()), new CastFromHandCondition(), ""), "{this} enters the battlefield with a divinity counter on it if you cast it from your hand"));
|
||||
// Myojin of Infinite Rage is indestructible as long as it has a divinity counter on it.
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new ConditionalContinousEffect(new GainAbilitySourceEffect(new IndestructibleAbility(), Constants.Duration.WhileOnBattlefield),
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new ConditionalContinousEffect(new GainAbilitySourceEffect(IndestructibleAbility.getInstance(), Constants.Duration.WhileOnBattlefield),
|
||||
new HasCounterCondition(CounterType.DIVINITY), "{this} is indestructible as long as it has a divinity counter on it")));
|
||||
// Remove a divinity counter from Myojin of Infinite Rage: Destroy all lands.
|
||||
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new DestroyAllEffect(filter), new RemoveCountersSourceCost(CounterType.DIVINITY.createInstance())));
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
package mage.sets.championsofkamigawa;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
|
@ -82,7 +81,7 @@ public class MyojinOfLifesWeb extends CardImpl<MyojinOfLifesWeb> {
|
|||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.DIVINITY.createInstance()), new CastFromHandCondition(), ""), "{this} enters the battlefield with a divinity counter on it if you cast it from your hand"));
|
||||
// Myojin of Life's Web is indestructible as long as it has a divinity counter on it.
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD,
|
||||
new ConditionalContinousEffect(new GainAbilitySourceEffect(new IndestructibleAbility(), Constants.Duration.WhileOnBattlefield),
|
||||
new ConditionalContinousEffect(new GainAbilitySourceEffect(IndestructibleAbility.getInstance(), Constants.Duration.WhileOnBattlefield),
|
||||
new HasCounterCondition(CounterType.DIVINITY), "{this} is indestructible as long as it has a divinity counter on it")));
|
||||
// Remove a divinity counter from Myojin of Life's Web: Put any number of creature cards from your hand onto the battlefield.
|
||||
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new PutOntoBattlefieldTargetEffect(false), new RemoveCountersSourceCost(CounterType.DIVINITY.createInstance()));
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
package mage.sets.championsofkamigawa;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
|
@ -73,7 +72,7 @@ public class MyojinOfNightsReach extends CardImpl<MyojinOfNightsReach> {
|
|||
// Myojin of Night's Reach enters the battlefield with a divinity counter on it if you cast it from your hand.
|
||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.DIVINITY.createInstance()), new CastFromHandCondition(), ""), "{this} enters the battlefield with a divinity counter on it if you cast it from your hand"));
|
||||
// Myojin of Night's Reach is indestructible as long as it has a divinity counter on it.
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new ConditionalContinousEffect(new GainAbilitySourceEffect(new IndestructibleAbility(), Constants.Duration.WhileOnBattlefield),
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new ConditionalContinousEffect(new GainAbilitySourceEffect(IndestructibleAbility.getInstance(), Constants.Duration.WhileOnBattlefield),
|
||||
new HasCounterCondition(CounterType.DIVINITY), "{this} is indestructible as long as it has a divinity counter on it")));
|
||||
// Remove a divinity counter from Myojin of Night's Reach: Each opponent discards his or her hand.
|
||||
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new MyojinOfNightsReachEffect(), new RemoveCountersSourceCost(CounterType.DIVINITY.createInstance()));
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
package mage.sets.championsofkamigawa;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
|
@ -79,7 +78,7 @@ public class MyojinOfSeeingWinds extends CardImpl<MyojinOfSeeingWinds> {
|
|||
// Myojin of Seeing Winds enters the battlefield with a divinity counter on it if you cast it from your hand.
|
||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.DIVINITY.createInstance()), new CastFromHandCondition(), ""), "{this} enters the battlefield with a divinity counter on it if you cast it from your hand"));
|
||||
// Myojin of Seeing Winds is indestructible as long as it has a divinity counter on it.
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new ConditionalContinousEffect(new GainAbilitySourceEffect(new IndestructibleAbility(), Constants.Duration.WhileOnBattlefield),
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new ConditionalContinousEffect(new GainAbilitySourceEffect(IndestructibleAbility.getInstance(), Constants.Duration.WhileOnBattlefield),
|
||||
new HasCounterCondition(CounterType.DIVINITY), "{this} is indestructible as long as it has a divinity counter on it")));
|
||||
// Remove a divinity counter from Myojin of Seeing Winds: Draw a card for each permanent you control.
|
||||
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new DrawCardControllerEffect(new PermanentsOnBattlefieldCount(filter, 1)), new RemoveCountersSourceCost(CounterType.DIVINITY.createInstance()));
|
||||
|
|
|
@ -127,6 +127,6 @@ class MaritLageToken extends Token {
|
|||
toughness = new MageInt(20);
|
||||
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
this.addAbility(new IndestructibleAbility());
|
||||
this.addAbility(IndestructibleAbility.getInstance());
|
||||
}
|
||||
}
|
|
@ -60,7 +60,7 @@ public class Thornling extends CardImpl<Thornling> {
|
|||
this.toughness = new MageInt(4);
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(HasteAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{G}")));
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{G}")));
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(new IndestructibleAbility(), Duration.EndOfTurn), new ManaCostsImpl("{G}")));
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{G}")));
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, -1, Duration.EndOfTurn), new ManaCostsImpl("{1}")));
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(-1, 1, Duration.EndOfTurn), new ManaCostsImpl("{1}")));
|
||||
}
|
||||
|
|
|
@ -33,8 +33,9 @@ import mage.Constants.Duration;
|
|||
import mage.Constants.Rarity;
|
||||
import mage.abilities.condition.common.FatefulHourCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.common.IndestructibleAllEffect;
|
||||
import mage.abilities.effects.common.continious.BoostControlledEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityAllEffect;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
|
||||
|
@ -55,7 +56,7 @@ public class BreakOfDay extends CardImpl<BreakOfDay> {
|
|||
this.getSpellAbility().addEffect(new BoostControlledEffect(1, 1, Duration.EndOfTurn));
|
||||
// Fateful hour - If you have 5 or less life, those creatures also are indestructible this turn.
|
||||
this.getSpellAbility().addEffect(new ConditionalContinousEffect(
|
||||
new IndestructibleAllEffect(new FilterControlledCreaturePermanent("creatures you control"), Duration.EndOfTurn),
|
||||
new GainAbilityAllEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn, new FilterControlledCreaturePermanent("creatures you control"), false),
|
||||
FatefulHourCondition.getInstance(),
|
||||
"If you have 5 or less life, those creatures also are indestructible this turn", true));
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ public class FalkenrathAristocrat extends CardImpl<FalkenrathAristocrat> {
|
|||
// Sacrifice a creature: Falkenrath Aristocrat is indestructible this turn.
|
||||
// If the sacrificed creature was a Human, put a +1/+1 counter on Falkenrath Aristocrat.
|
||||
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new GainAbilitySourceEffect(new IndestructibleAbility(), Duration.EndOfTurn),
|
||||
new GainAbilitySourceEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn),
|
||||
new SacrificeTargetCost(new TargetControlledCreaturePermanent()));
|
||||
ability.addEffect(new FalkenrathAristocratEffect());
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -54,7 +54,7 @@ public class PredatorOoze extends CardImpl<PredatorOoze> {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// Predator Ooze is indestructible.
|
||||
this.addAbility(new IndestructibleAbility());
|
||||
this.addAbility(IndestructibleAbility.getInstance());
|
||||
|
||||
// Whenever Predator Ooze attacks, put a +1/+1 counter on it.
|
||||
this.addAbility(new AttacksTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false));
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
package mage.sets.darksteel;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Duration;
|
||||
|
@ -51,7 +50,7 @@ public class DarksteelBrute extends CardImpl<DarksteelBrute> {
|
|||
public DarksteelBrute (UUID ownerId) {
|
||||
super(ownerId, 108, "Darksteel Brute", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{2}");
|
||||
this.expansionSetCode = "DST";
|
||||
this.addAbility(new IndestructibleAbility());
|
||||
this.addAbility(IndestructibleAbility.getInstance());
|
||||
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new DarksteelBruteToken(), "", Duration.EndOfTurn), new GenericManaCost(3)));
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ public class DarksteelCitadel extends CardImpl<DarksteelCitadel> {
|
|||
public DarksteelCitadel (UUID ownerId) {
|
||||
super(ownerId, 164, "Darksteel Citadel", Rarity.COMMON, new CardType[]{CardType.ARTIFACT, CardType.LAND}, null);
|
||||
this.expansionSetCode = "DST";
|
||||
this.addAbility(new IndestructibleAbility());
|
||||
this.addAbility(IndestructibleAbility.getInstance());
|
||||
this.addAbility(new ColorlessManaAbility());
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
package mage.sets.darksteel;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
|
@ -58,7 +57,7 @@ public class DarksteelColossus extends CardImpl<DarksteelColossus> {
|
|||
this.power = new MageInt(11);
|
||||
this.toughness = new MageInt(11);
|
||||
this.addAbility(TrampleAbility.getInstance());
|
||||
this.addAbility(new IndestructibleAbility());
|
||||
this.addAbility(IndestructibleAbility.getInstance());
|
||||
this.addAbility(new PutIntoGraveFromAnywhereTriggeredAbility(new DarksteelColossusEffect(), false));
|
||||
}
|
||||
|
||||
|
|
|
@ -31,10 +31,13 @@ package mage.sets.darksteel;
|
|||
import java.util.UUID;
|
||||
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.IndestructibleAllEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityAllEffect;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
|
@ -55,7 +58,9 @@ public class DarksteelForge extends CardImpl<DarksteelForge> {
|
|||
this.expansionSetCode = "DST";
|
||||
|
||||
// Artifacts you control are indestructible.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new IndestructibleAllEffect(filter)));
|
||||
Effect effect = new GainAbilityAllEffect(IndestructibleAbility.getInstance(), Duration.WhileOnBattlefield, filter, false);
|
||||
effect.setText("Artifacts you control are indestructible");
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ public class DarksteelGargoyle extends CardImpl<DarksteelGargoyle> {
|
|||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
this.addAbility(new IndestructibleAbility());
|
||||
this.addAbility(IndestructibleAbility.getInstance());
|
||||
}
|
||||
|
||||
public DarksteelGargoyle(final DarksteelGargoyle card) {
|
||||
|
|
|
@ -44,7 +44,7 @@ public class DarksteelIngot extends CardImpl<DarksteelIngot> {
|
|||
public DarksteelIngot(UUID ownerId) {
|
||||
super(ownerId, 112, "Darksteel Ingot", Constants.Rarity.COMMON, new Constants.CardType[]{Constants.CardType.ARTIFACT}, "{3}");
|
||||
this.expansionSetCode = "DST";
|
||||
this.addAbility(new IndestructibleAbility());
|
||||
this.addAbility(IndestructibleAbility.getInstance());
|
||||
this.addAbility(new AnyColorManaAbility());
|
||||
}
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ public class DarksteelReactor extends CardImpl<DarksteelReactor> {
|
|||
this.expansionSetCode = "DST";
|
||||
|
||||
// Darksteel Reactor is indestructible.
|
||||
this.addAbility(new IndestructibleAbility());
|
||||
this.addAbility(IndestructibleAbility.getInstance());
|
||||
// At the beginning of your upkeep, you may put a charge counter on Darksteel Reactor.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), TargetController.YOU, true));
|
||||
// When Darksteel Reactor has twenty or more charge counters on it, you win the game.
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
package mage.sets.darksteel;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
|
@ -59,7 +58,7 @@ public class MyrMatrix extends CardImpl<MyrMatrix> {
|
|||
public MyrMatrix (UUID ownerId) {
|
||||
super(ownerId, 132, "Myr Matrix", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{5}");
|
||||
this.expansionSetCode = "DST";
|
||||
this.addAbility(new IndestructibleAbility());
|
||||
this.addAbility(IndestructibleAbility.getInstance());
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new BoostAllEffect(1, 1, Constants.Duration.WhileOnBattlefield, filter, false)));
|
||||
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new CreateTokenEffect(new MyrToken()), new GenericManaCost(5)));
|
||||
|
||||
|
|
|
@ -28,16 +28,20 @@
|
|||
package mage.sets.darksteel;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.AttachmentType;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.IndestructibleAllEffect;
|
||||
import mage.abilities.effects.common.IndestructibleAttachedEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityAllEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityAttachedEffect;
|
||||
import mage.abilities.keyword.EquipAbility;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
|
@ -67,9 +71,13 @@ public class ShieldOfKaldra extends CardImpl<ShieldOfKaldra> {
|
|||
this.subtype.add("Equipment");
|
||||
|
||||
// Equipment named Sword of Kaldra, Shield of Kaldra, and Helm of Kaldra are indestructible.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new IndestructibleAllEffect(filter)));
|
||||
Effect effect = new GainAbilityAllEffect(IndestructibleAbility.getInstance(), Duration.WhileOnBattlefield, filter, false);
|
||||
effect.setText("Equipment named Sword of Kaldra, Shield of Kaldra, and Helm of Kaldra are indestructible");
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
// Equipped creature is indestructible.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new IndestructibleAttachedEffect(AttachmentType.EQUIPMENT)));
|
||||
effect = new GainAbilityAttachedEffect(IndestructibleAbility.getInstance(), AttachmentType.EQUIPMENT, Constants.Duration.WhileOnBattlefield);
|
||||
effect.setText("Equipped creature is indestructible");
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
// Equip {4}
|
||||
this.addAbility(new EquipAbility(Outcome.Benefit, new GenericManaCost(4)));
|
||||
}
|
||||
|
|
|
@ -38,7 +38,9 @@ import mage.MageInt;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.effects.common.IndestructibleTargetEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
|
@ -70,9 +72,10 @@ public class SlobadGoblinTinkerer extends CardImpl<SlobadGoblinTinkerer> {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
// Sacrifice an artifact: Target artifact is indestructible this turn.
|
||||
Effect effect = new GainAbilityTargetEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn);
|
||||
effect.setText("Target artifact is indestructible this turn");
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new IndestructibleTargetEffect(Duration.EndOfTurn),
|
||||
new SacrificeTargetCost(new TargetControlledPermanent(filterControlled)));
|
||||
effect, new SacrificeTargetCost(new TargetControlledPermanent(filterControlled)));
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -28,15 +28,15 @@
|
|||
package mage.sets.dragonsmaze;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.IndestructibleAllEffect;
|
||||
import mage.abilities.effects.common.UntapAllControllerEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityAllEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityControlledEffect;
|
||||
import mage.abilities.keyword.DeathtouchAbility;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.abilities.keyword.LifelinkAbility;
|
||||
import mage.cards.SplitCard;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
|
@ -60,7 +60,8 @@ public class ReadyWilling extends SplitCard<ReadyWilling> {
|
|||
// Creatures you control are indestructible this turn. Untap each creature you control.
|
||||
getLeftHalfCard().getColor().setGreen(true);
|
||||
getLeftHalfCard().getColor().setWhite(true);
|
||||
getLeftHalfCard().getSpellAbility().addEffect(new IndestructibleAllEffect(new FilterControlledCreaturePermanent("Creatures you controll"), Constants.Duration.EndOfTurn));
|
||||
getLeftHalfCard().getSpellAbility().addEffect(
|
||||
new GainAbilityAllEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn, new FilterControlledCreaturePermanent("Creatures you controll"), false));
|
||||
getLeftHalfCard().getSpellAbility().addEffect(new UntapAllControllerEffect(new FilterControlledCreaturePermanent(),"Untap each creature you control"));
|
||||
|
||||
// Willing
|
||||
|
|
|
@ -56,7 +56,7 @@ public class TajicBladeOfTheLegion extends CardImpl<TajicBladeOfTheLegion> {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
// Tajic, Blade of the Legion is indestructible.
|
||||
this.addAbility(new IndestructibleAbility());
|
||||
this.addAbility(IndestructibleAbility.getInstance());
|
||||
|
||||
// Battalion - Whenever Tajic and at least two other creatures attack, Tajic gets +5/+5 until end of turn.
|
||||
this.addAbility(new BattalionAbility(new BoostSourceEffect(5, 5, Duration.EndOfTurn)));
|
||||
|
|
|
@ -30,12 +30,15 @@ package mage.sets.gatecrash;
|
|||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.IndestructibleAllEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityAllEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
|
||||
import mage.abilities.keyword.DoubleStrikeAbility;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.target.TargetPlayer;
|
||||
|
@ -59,7 +62,9 @@ public class BorosCharm extends CardImpl<BorosCharm> {
|
|||
this.getSpellAbility().addTarget(new TargetPlayer());
|
||||
//or permanents you control are indestructible this turn
|
||||
Mode mode = new Mode();
|
||||
mode.getEffects().add(new IndestructibleAllEffect(new FilterControlledPermanent(), Constants.Duration.EndOfTurn));
|
||||
Effect effect = new GainAbilityAllEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn, new FilterControlledPermanent(), false);
|
||||
effect.setText("permanents you control are indestructible this turn");
|
||||
mode.getEffects().add(effect);
|
||||
this.getSpellAbility().addMode(mode);
|
||||
//or target creature gains double strike until end of turn.
|
||||
Mode mode2 = new Mode();
|
||||
|
|
|
@ -30,15 +30,18 @@ package mage.sets.gatecrash;
|
|||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.CounterUnlessPaysEffect;
|
||||
import mage.abilities.effects.common.IndestructibleAllEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityAllEffect;
|
||||
import mage.abilities.keyword.BattalionAbility;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
|
@ -68,7 +71,9 @@ public class FrontlineMedic extends CardImpl<FrontlineMedic> {
|
|||
this.toughness = new MageInt(3);
|
||||
|
||||
// Battalion - Whenever Frontline Medic and at least two other creatures attack, creatures you control are indestructible this turn.
|
||||
this.addAbility(new BattalionAbility(new IndestructibleAllEffect(new FilterControlledCreaturePermanent(), Constants.Duration.EndOfTurn)));
|
||||
Effect effect = new GainAbilityAllEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn, new FilterControlledCreaturePermanent(), false);
|
||||
effect.setText("creatures you control are indestructible this turn");
|
||||
this.addAbility(new BattalionAbility(effect));
|
||||
|
||||
// Sacrifice Frontline Medic: Counter target spell with {X} in its mana cost unless its controller pays 3.
|
||||
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new CounterUnlessPaysEffect(new GenericManaCost(3)), new SacrificeSourceCost());
|
||||
|
|
|
@ -162,7 +162,7 @@ class GideonChampionOfJusticeToken extends Token {
|
|||
power = new MageInt(0);
|
||||
toughness = new MageInt(0);
|
||||
|
||||
this.addAbility(new IndestructibleAbility());
|
||||
this.addAbility(IndestructibleAbility.getInstance());
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.ALL, new SetPowerToughnessSourceEffect(new CountersCount(CounterType.LOYALTY), Constants.Duration.WhileOnBattlefield)));
|
||||
}
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ public class AngelicOverseer extends CardImpl<AngelicOverseer> {
|
|||
// As long as you control a Human, Angelic Overseer has hexproof and is indestructible.
|
||||
ConditionalContinousEffect effect1 = new ConditionalContinousEffect(new GainAbilitySourceEffect(HexproofAbility.getInstance()), new ControlsPermanentCondition(filter), rule1);
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, effect1));
|
||||
ConditionalContinousEffect effect2 = new ConditionalContinousEffect(new GainAbilitySourceEffect(new IndestructibleAbility()), new ControlsPermanentCondition(filter), rule2);
|
||||
ConditionalContinousEffect effect2 = new ConditionalContinousEffect(new GainAbilitySourceEffect(IndestructibleAbility.getInstance()), new ControlsPermanentCondition(filter), rule2);
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, effect2));
|
||||
|
||||
}
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.innistrad;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
|
@ -59,7 +58,7 @@ public class CreepyDoll extends CardImpl<CreepyDoll> {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// Creepy Doll is indestructible.
|
||||
this.addAbility(new IndestructibleAbility());
|
||||
this.addAbility(IndestructibleAbility.getInstance());
|
||||
|
||||
// Whenever Creepy Doll deals combat damage to a creature, flip a coin. If you win the flip, destroy that creature.
|
||||
this.addAbility(new CreepyDollTriggeredAbility());
|
||||
|
|
|
@ -71,7 +71,7 @@ public class ManorGargoyle extends CardImpl<ManorGargoyle> {
|
|||
|
||||
this.addAbility(DefenderAbility.getInstance());
|
||||
// Manor Gargoyle is indestructible as long as it has defender.
|
||||
ConditionalContinousEffect effect = new ConditionalContinousEffect(new GainAbilitySourceEffect(new IndestructibleAbility()), HasDefenderCondition.getInstance(), rule);
|
||||
ConditionalContinousEffect effect = new ConditionalContinousEffect(new GainAbilitySourceEffect(IndestructibleAbility.getInstance()), HasDefenderCondition.getInstance(), rule);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
// {1}: Until end of turn, Manor Gargoyle loses defender and gains flying.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GargoyleSentinelEffect(), new ManaCostsImpl("{1}")));
|
||||
|
|
|
@ -34,8 +34,10 @@ import mage.Constants.Rarity;
|
|||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.IndestructibleAllEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continious.BoostControlledEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityAllEffect;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
|
@ -72,7 +74,9 @@ public class TimberProtector extends CardImpl<TimberProtector> {
|
|||
// Other Treefolk creatures you control get +1/+1.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filterTreefolk, true)));
|
||||
// Other Treefolk and Forests you control are indestructible.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new IndestructibleAllEffect(filterBoth)));
|
||||
Effect effect = new GainAbilityAllEffect(IndestructibleAbility.getInstance(), Duration.WhileOnBattlefield, filterBoth, true);
|
||||
effect.setText("Other Treefolk and Forests you control are indestructible");
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
}
|
||||
|
||||
public TimberProtector(final TimberProtector card) {
|
||||
|
|
|
@ -30,13 +30,16 @@ package mage.sets.magic2010;
|
|||
import java.util.UUID;
|
||||
import mage.Constants.AttachmentType;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.IndestructibleAttachedEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityAttachedEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
|
@ -59,7 +62,9 @@ public class Indestructibility extends CardImpl<Indestructibility> {
|
|||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.Benefit));
|
||||
this.addAbility(new EnchantAbility(auraTarget.getTargetName()));
|
||||
// Enchanted permanent is indestructible.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new IndestructibleAttachedEffect(AttachmentType.AURA)));
|
||||
Effect effect = new GainAbilityAttachedEffect(IndestructibleAbility.getInstance(), AttachmentType.AURA, Duration.WhileOnBattlefield);
|
||||
effect.setText("Enchanted permanent is indestructible");
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
}
|
||||
|
||||
public Indestructibility(final Indestructibility card) {
|
||||
|
|
|
@ -36,9 +36,11 @@ import mage.Constants.TargetController;
|
|||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.IndestructibleAllEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continious.BoostControlledEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityAllEffect;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
|
@ -74,7 +76,10 @@ public class KnightExemplar extends CardImpl<KnightExemplar> {
|
|||
indestructibleFilter.add(new AnotherPredicate());
|
||||
indestructibleFilter.add(new ControllerPredicate(TargetController.YOU));
|
||||
indestructibleFilter.setMessage("Other Knight creatures you control");
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new IndestructibleAllEffect(indestructibleFilter)));
|
||||
Effect effect = new GainAbilityAllEffect(IndestructibleAbility.getInstance(), Duration.WhileOnBattlefield, indestructibleFilter, false);
|
||||
effect.setText("Other Knight creatures you control are indestructible");
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
|
||||
}
|
||||
|
||||
public KnightExemplar(final KnightExemplar card) {
|
||||
|
|
|
@ -65,7 +65,7 @@ public class PhylacteryLich extends CardImpl<PhylacteryLich> {
|
|||
this.toughness = new MageInt(5);
|
||||
|
||||
this.addAbility(new AsEntersBattlefieldAbility(new PhylacteryLichEffect(), "put a phylactery counter on an artifact you control"));
|
||||
this.addAbility(new IndestructibleAbility());
|
||||
this.addAbility(IndestructibleAbility.getInstance());
|
||||
this.addAbility(new PhylacteryLichAbility());
|
||||
}
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ public class BlightsteelColossus extends CardImpl<BlightsteelColossus> {
|
|||
this.toughness = new MageInt(11);
|
||||
this.addAbility(TrampleAbility.getInstance());
|
||||
this.addAbility(InfectAbility.getInstance());
|
||||
this.addAbility(new IndestructibleAbility());
|
||||
this.addAbility(IndestructibleAbility.getInstance());
|
||||
this.addAbility(new PutIntoGraveFromAnywhereTriggeredAbility(new BlightsteelColossusEffect(), false));
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
package mage.sets.mirrodinbesieged;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.AttachmentType;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Outcome;
|
||||
|
@ -37,7 +37,7 @@ import mage.Constants.Rarity;
|
|||
import mage.Constants.Zone;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.IndestructibleAttachedEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityAttachedEffect;
|
||||
import mage.abilities.keyword.EquipAbility;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -54,9 +54,10 @@ public class DarksteelPlate extends CardImpl<DarksteelPlate> {
|
|||
this.subtype.add("Equipment");
|
||||
|
||||
// Darksteel Plate is indestructible.
|
||||
this.addAbility(new IndestructibleAbility());
|
||||
this.addAbility(IndestructibleAbility.getInstance());
|
||||
// Equipped creature is indestructible.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new IndestructibleAttachedEffect(AttachmentType.EQUIPMENT)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new GainAbilityAttachedEffect(IndestructibleAbility.getInstance(), AttachmentType.EQUIPMENT, Constants.Duration.WhileOnBattlefield)));
|
||||
// Equip {2}
|
||||
this.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(2)));
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ public class DarksteelRelic extends CardImpl<DarksteelRelic> {
|
|||
super(ownerId, 134, "Darksteel Relic", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{0}");
|
||||
this.expansionSetCode = "NPH";
|
||||
|
||||
this.addAbility(new IndestructibleAbility());
|
||||
this.addAbility(IndestructibleAbility.getInstance());
|
||||
}
|
||||
|
||||
public DarksteelRelic(final DarksteelRelic card) {
|
||||
|
|
|
@ -31,8 +31,10 @@ import java.util.UUID;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.effects.common.IndestructibleAllEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.PopulateEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityAllEffect;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
|
||||
|
@ -53,7 +55,10 @@ public class RootbornDefenses extends CardImpl<RootbornDefenses> {
|
|||
// token you control. Damage and effects that say "destroy" don't destroy
|
||||
// indestructible creatures.)
|
||||
this.getSpellAbility().addEffect(new PopulateEffect());
|
||||
this.getSpellAbility().addEffect(new IndestructibleAllEffect(new FilterControlledCreaturePermanent(), Duration.EndOfTurn));
|
||||
Effect effect = new GainAbilityAllEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn, new FilterControlledCreaturePermanent(), false);
|
||||
effect.setText("Creatures you control are indestructible this turn");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
|
||||
}
|
||||
|
||||
public RootbornDefenses(final RootbornDefenses card) {
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
package mage.sets.riseoftheeldrazi;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Rarity;
|
||||
|
@ -38,8 +37,10 @@ import mage.MageInt;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.IndestructibleTargetEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
|
@ -60,9 +61,9 @@ public class DeathlessAngel extends CardImpl<DeathlessAngel> {
|
|||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
// {W}{W}: Target creature is indestructible this turn.
|
||||
Effect effect = new GainAbilityTargetEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn, "Target creature is indestructible this turn");
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new IndestructibleTargetEffect(Duration.EndOfTurn),
|
||||
new ManaCostsImpl("{W}{W}"));
|
||||
effect, new ManaCostsImpl("{W}{W}"));
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ public class TranscendentMaster extends LevelerCard<TranscendentMaster> {
|
|||
Abilities<Ability> abilities1 = new AbilitiesImpl<Ability>(LifelinkAbility.getInstance());
|
||||
Abilities<Ability> abilities2 = new AbilitiesImpl<Ability>(
|
||||
LifelinkAbility.getInstance(),
|
||||
new IndestructibleAbility());
|
||||
IndestructibleAbility.getInstance());
|
||||
|
||||
LevelerCardBuilder.construct(this,
|
||||
new LevelerCardBuilder.LevelAbility(6, 11, abilities1, 6, 6),
|
||||
|
|
|
@ -67,7 +67,7 @@ public class UlamogTheInfiniteGyre extends CardImpl<UlamogTheInfiniteGyre> {
|
|||
|
||||
this.addAbility(new UlamogTheInfiniteGyreDestroyOnCastAbility());
|
||||
this.addAbility(new AnnihilatorAbility(4));
|
||||
this.addAbility(new IndestructibleAbility());
|
||||
this.addAbility(IndestructibleAbility.getInstance());
|
||||
this.addAbility(new ZoneChangeTriggeredAbility(Zone.GRAVEYARD, new UlamogTheInfiniteGyreEnterGraveyardEffect(), effectText, false));
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
package mage.sets.scarsofmirrodin;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
|
@ -51,7 +50,7 @@ public class DarksteelAxe extends CardImpl<DarksteelAxe> {
|
|||
super(ownerId, 149, "Darksteel Axe", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{1}");
|
||||
this.expansionSetCode = "SOM";
|
||||
this.subtype.add("Equipment");
|
||||
this.addAbility(new IndestructibleAbility());
|
||||
this.addAbility(IndestructibleAbility.getInstance());
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 0)));
|
||||
this.addAbility(new EquipAbility(Constants.Outcome.AddAbility, new GenericManaCost(2)));
|
||||
}
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
package mage.sets.scarsofmirrodin;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
|
@ -63,7 +62,7 @@ public class DarksteelJuggernaut extends CardImpl<DarksteelJuggernaut> {
|
|||
|
||||
SetPowerToughnessSourceEffect effect = new SetPowerToughnessSourceEffect(new PermanentsOnBattlefieldCount(filter), Constants.Duration.EndOfGame);
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.ALL, effect));
|
||||
this.addAbility(new IndestructibleAbility());
|
||||
this.addAbility(IndestructibleAbility.getInstance());
|
||||
this.addAbility(new AttacksEachTurnStaticAbility());
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ public class DarksteelMyr extends CardImpl<DarksteelMyr> {
|
|||
this.subtype.add("Myr");
|
||||
this.power = new MageInt(0);
|
||||
this.toughness = new MageInt(1);
|
||||
this.addAbility(new IndestructibleAbility());
|
||||
this.addAbility(IndestructibleAbility.getInstance());
|
||||
}
|
||||
|
||||
public DarksteelMyr (final DarksteelMyr card) {
|
||||
|
|
|
@ -51,7 +51,7 @@ public class DarksteelSentinel extends CardImpl<DarksteelSentinel> {
|
|||
this.toughness = new MageInt(3);
|
||||
this.addAbility(FlashAbility.getInstance());
|
||||
this.addAbility(VigilanceAbility.getInstance());
|
||||
this.addAbility(new IndestructibleAbility());
|
||||
this.addAbility(IndestructibleAbility.getInstance());
|
||||
}
|
||||
|
||||
public DarksteelSentinel (final DarksteelSentinel card) {
|
||||
|
|
|
@ -32,7 +32,9 @@ import java.util.UUID;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.effects.common.IndestructibleTargetEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
|
@ -48,7 +50,9 @@ public class WithstandDeath extends CardImpl<WithstandDeath> {
|
|||
this.color.setGreen(true);
|
||||
|
||||
// Target creature is indestructible this turn.
|
||||
this.getSpellAbility().addEffect(new IndestructibleTargetEffect(Duration.EndOfTurn));
|
||||
Effect effect = new GainAbilityTargetEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn);
|
||||
effect.setText("Target creature is indestructible this turn");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
}
|
||||
|
||||
|
|
|
@ -36,14 +36,16 @@ import mage.Constants.Zone;
|
|||
import mage.abilities.LoyaltyAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.Effects;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.GetEmblemEffect;
|
||||
import mage.abilities.effects.common.IndestructibleAllEffect;
|
||||
import mage.abilities.effects.common.continious.BoostTargetEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityAllEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
|
@ -102,6 +104,8 @@ class ElspethKnightErrantEmblem extends Emblem {
|
|||
new CardTypePredicate(CardType.CREATURE),
|
||||
new CardTypePredicate(CardType.ENCHANTMENT),
|
||||
new CardTypePredicate(CardType.LAND)));
|
||||
this.getAbilities().add(new SimpleStaticAbility(Zone.COMMAND, new IndestructibleAllEffect(filter)));
|
||||
Effect effect = new GainAbilityAllEffect(IndestructibleAbility.getInstance(), Duration.WhileOnBattlefield, filter, false);
|
||||
effect.setText("Artifacts, creatures, enchantments, and lands you control are indestructible");
|
||||
this.getAbilities().add(new SimpleStaticAbility(Zone.COMMAND, effect));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ import mage.Constants.Zone;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.IndestructibleTargetEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter.ComparisonType;
|
||||
|
@ -65,10 +65,10 @@ public class SpearbreakerBehemoth extends CardImpl<SpearbreakerBehemoth> {
|
|||
this.toughness = new MageInt(5);
|
||||
|
||||
// Spearbreaker Behemoth is indestructible.
|
||||
this.addAbility(new IndestructibleAbility());
|
||||
this.addAbility(IndestructibleAbility.getInstance());
|
||||
// {1}: Target creature with power 5 or greater is indestructible this turn.
|
||||
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new IndestructibleTargetEffect(Duration.EndOfTurn),
|
||||
new GainAbilityTargetEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn),
|
||||
new ManaCostsImpl("{1}"));
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -64,7 +64,7 @@ public class StuffyDoll extends CardImpl<StuffyDoll> {
|
|||
// As Stuffy Doll enters the battlefield, choose a player.
|
||||
this.addAbility(new AsEntersBattlefieldAbility(new StuffyDollChoosePlayerEffect()));
|
||||
// Stuffy Doll is indestructible.
|
||||
this.addAbility(new IndestructibleAbility());
|
||||
this.addAbility(IndestructibleAbility.getInstance());
|
||||
// Whenever Stuffy Doll is dealt damage, it deals that much damage to the chosen player.
|
||||
this.addAbility(new StuffyDollTriggeredAbility());
|
||||
// {tap}: Stuffy Doll deals 1 damage to itself.
|
||||
|
|
|
@ -29,10 +29,13 @@ package mage.sets.worldwake;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.IndestructibleAllEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityAllEffect;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
|
||||
|
@ -50,7 +53,9 @@ public class TerraEternal extends CardImpl<TerraEternal> {
|
|||
|
||||
// All lands are indestructible.
|
||||
FilterLandPermanent filter = new FilterLandPermanent("All lands");
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new IndestructibleAllEffect(filter)));
|
||||
Effect effect = new GainAbilityAllEffect(IndestructibleAbility.getInstance(), Duration.WhileOnBattlefield, filter, false);
|
||||
effect.setText("All lands are indestructible");
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
}
|
||||
|
||||
public TerraEternal(final TerraEternal card) {
|
||||
|
|
|
@ -37,11 +37,13 @@ import mage.Constants.Zone;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.OnEventTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.IndestructibleAllEffect;
|
||||
import mage.abilities.effects.common.continious.BoostControlledEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityAllEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityControlledEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
|
@ -65,7 +67,9 @@ public class EldraziMonument extends CardImpl<EldraziMonument> {
|
|||
// Creatures you control get +1/+1, have flying, and are indestructible.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, new FilterCreaturePermanent(), false)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield, new FilterCreaturePermanent())));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new IndestructibleAllEffect(new FilterControlledCreaturePermanent("Creatures you control"))));
|
||||
Effect effect = new GainAbilityAllEffect(IndestructibleAbility.getInstance(), Duration.WhileOnBattlefield, new FilterControlledCreaturePermanent("Creatures you control"), false);
|
||||
effect.setText("Creatures you control are indestructible");
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
// At the beginning of your upkeep, sacrifice a creature. If you can't, sacrifice Eldrazi Monument.
|
||||
this.addAbility(new OnEventTriggeredAbility(EventType.UPKEEP_STEP_PRE, "beginning of your upkeep", new EldraziMonumentEffect()));
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ public class LevelUpAbilityTest extends CardTestPlayerBase {
|
|||
Assert.assertEquals(3, master.getPower().getValue());
|
||||
Assert.assertEquals(3, master.getToughness().getValue());
|
||||
Assert.assertFalse(master.getAbilities().contains(LifelinkAbility.getInstance()));
|
||||
Assert.assertFalse(master.getAbilities().contains(new IndestructibleAbility()));
|
||||
Assert.assertFalse(master.getAbilities().contains(IndestructibleAbility.getInstance()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -53,7 +53,7 @@ public class LevelUpAbilityTest extends CardTestPlayerBase {
|
|||
Assert.assertEquals(3, master.getPower().getValue());
|
||||
Assert.assertEquals(3, master.getToughness().getValue());
|
||||
Assert.assertFalse(master.getAbilities().contains(LifelinkAbility.getInstance()));
|
||||
Assert.assertFalse(master.getAbilities().contains(new IndestructibleAbility()));
|
||||
Assert.assertFalse(master.getAbilities().contains(IndestructibleAbility.getInstance()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -79,7 +79,7 @@ public class LevelUpAbilityTest extends CardTestPlayerBase {
|
|||
// since now Lifelink will appear
|
||||
Assert.assertTrue(master.getAbilities().contains(LifelinkAbility.getInstance()));
|
||||
// but still no Indestructible
|
||||
Assert.assertFalse(master.getAbilities().contains(new IndestructibleAbility()));
|
||||
Assert.assertFalse(master.getAbilities().contains(IndestructibleAbility.getInstance()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -103,7 +103,7 @@ public class LevelUpAbilityTest extends CardTestPlayerBase {
|
|||
Assert.assertEquals("Power different", 9, master.getPower().getValue());
|
||||
Assert.assertEquals("Toughness different", 9, master.getToughness().getValue());
|
||||
Assert.assertTrue(master.getAbilities().contains(LifelinkAbility.getInstance()));
|
||||
Assert.assertTrue(master.getAbilities().containsRule(new IndestructibleAbility()));
|
||||
Assert.assertTrue(master.getAbilities().containsRule(IndestructibleAbility.getInstance()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -127,7 +127,7 @@ public class LevelUpAbilityTest extends CardTestPlayerBase {
|
|||
Assert.assertEquals("Power different", 9, master.getPower().getValue());
|
||||
Assert.assertEquals("Toughness different", 9, master.getToughness().getValue());
|
||||
Assert.assertTrue(master.getAbilities().contains(LifelinkAbility.getInstance()));
|
||||
Assert.assertTrue(master.getAbilities().containsRule(new IndestructibleAbility()));
|
||||
Assert.assertTrue(master.getAbilities().containsRule(IndestructibleAbility.getInstance()));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -84,13 +84,13 @@ public class PhantasmalImageTest extends CardTestPlayerBase {
|
|||
Assert.assertEquals("Power different", 9, master.getPower().getValue());
|
||||
Assert.assertEquals("Toughness different", 9, master.getToughness().getValue());
|
||||
Assert.assertTrue(master.getAbilities().contains(LifelinkAbility.getInstance()));
|
||||
Assert.assertTrue(master.getAbilities().containsRule(new IndestructibleAbility()));
|
||||
Assert.assertTrue(master.getAbilities().containsRule(IndestructibleAbility.getInstance()));
|
||||
|
||||
// But copied one should not
|
||||
Assert.assertEquals("Power different", 3, masterCopied.getPower().getValue());
|
||||
Assert.assertEquals("Toughness different", 3, masterCopied.getToughness().getValue());
|
||||
Assert.assertFalse(masterCopied.getAbilities().contains(LifelinkAbility.getInstance()));
|
||||
Assert.assertFalse(masterCopied.getAbilities().containsRule(new IndestructibleAbility()));
|
||||
Assert.assertFalse(masterCopied.getAbilities().containsRule(IndestructibleAbility.getInstance()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,99 +0,0 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.abilities.effects.common;
|
||||
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class IndestructibleAllEffect extends ReplacementEffectImpl<IndestructibleAllEffect> {
|
||||
|
||||
private FilterPermanent filter;
|
||||
|
||||
/**
|
||||
* duration = WhileOnBattlefield
|
||||
*
|
||||
* @param filter
|
||||
*/
|
||||
public IndestructibleAllEffect(FilterPermanent filter) {
|
||||
this(filter, Duration.WhileOnBattlefield);
|
||||
}
|
||||
|
||||
public IndestructibleAllEffect(FilterPermanent filter, Duration duration) {
|
||||
super(duration, Outcome.Benefit);
|
||||
this.filter = filter;
|
||||
|
||||
if (filter.getMessage().startsWith("Each")) {
|
||||
this.staticText = filter.getMessage() + " is indestructible";
|
||||
}
|
||||
else {
|
||||
this.staticText = filter.getMessage() + " are indestructible";
|
||||
}
|
||||
if (duration.equals(Duration.EndOfTurn)) {
|
||||
this.staticText += " this turn";
|
||||
}
|
||||
}
|
||||
|
||||
public IndestructibleAllEffect(IndestructibleAllEffect effect) {
|
||||
super(effect);
|
||||
this.filter = effect.filter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IndestructibleAllEffect copy() {
|
||||
return new IndestructibleAllEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (event.getType().equals(GameEvent.EventType.DESTROY_PERMANENT)) {
|
||||
Permanent permanent = game.getPermanent(event.getTargetId());
|
||||
return permanent != null && filter.match(permanent, source.getSourceId(), source.getControllerId(), game);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -1,82 +0,0 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.abilities.effects.common;
|
||||
|
||||
import mage.Constants.AttachmentType;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class IndestructibleAttachedEffect extends ReplacementEffectImpl<IndestructibleAttachedEffect> {
|
||||
|
||||
public IndestructibleAttachedEffect(AttachmentType attachmentType) {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
if (attachmentType.equals(AttachmentType.AURA)) {
|
||||
this.staticText = "Enchanted permanent is indestructible";
|
||||
} else {
|
||||
this.staticText = "Equiped creature is indestructible";
|
||||
}
|
||||
}
|
||||
|
||||
public IndestructibleAttachedEffect(IndestructibleAttachedEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IndestructibleAttachedEffect copy() {
|
||||
return new IndestructibleAttachedEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (event.getType().equals(GameEvent.EventType.DESTROY_PERMANENT)) {
|
||||
Permanent attachment = game.getPermanent(source.getSourceId());
|
||||
return attachment != null && attachment.getAttachedTo() != null
|
||||
&& attachment.getAttachedTo().equals(event.getTargetId());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -1,72 +0,0 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.abilities.effects.common;
|
||||
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class IndestructibleSourceEffect extends ReplacementEffectImpl<IndestructibleSourceEffect> {
|
||||
|
||||
public IndestructibleSourceEffect(Duration duration) {
|
||||
super(duration, Outcome.Benefit);
|
||||
this.staticText = "{this} is indestructible";
|
||||
}
|
||||
|
||||
public IndestructibleSourceEffect(IndestructibleSourceEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IndestructibleSourceEffect copy() {
|
||||
return new IndestructibleSourceEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
return event.getType().equals(GameEvent.EventType.DESTROY_PERMANENT)
|
||||
&& event.getTargetId().equals(source.getSourceId());
|
||||
}
|
||||
}
|
|
@ -1,101 +0,0 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.abilities.effects.common;
|
||||
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.target.Target;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class IndestructibleTargetEffect extends ReplacementEffectImpl<IndestructibleTargetEffect> {
|
||||
|
||||
public IndestructibleTargetEffect(Duration duration) {
|
||||
super(duration, Outcome.Benefit);
|
||||
}
|
||||
|
||||
public IndestructibleTargetEffect(IndestructibleTargetEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IndestructibleTargetEffect copy() {
|
||||
return new IndestructibleTargetEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
return event.getType().equals(GameEvent.EventType.DESTROY_PERMANENT)
|
||||
&& this.targetPointer.getTargets(game, source).contains(event.getTargetId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
if (mode.getTargets().isEmpty()) {
|
||||
return "";
|
||||
}
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
Target target = mode.getTargets().get(0);
|
||||
if (target.getMaxNumberOfTargets() > 1) {
|
||||
if (target.getMaxNumberOfTargets() != target.getNumberOfTargets()) {
|
||||
sb.append("up to ");
|
||||
}
|
||||
sb.append(target.getMaxNumberOfTargets()).append(" ");
|
||||
}
|
||||
sb.append("target ").append(mode.getTargets().get(0).getTargetName());
|
||||
if (target.getMaxNumberOfTargets() > 1) {
|
||||
sb.append("s are indestructible");
|
||||
} else {
|
||||
sb.append(" is indestructible");
|
||||
}
|
||||
|
||||
if (Duration.EndOfTurn.equals(this.duration)) {
|
||||
sb.append(" this turn");
|
||||
}
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
package mage.abilities.effects.common.continious;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Layer;
|
||||
import mage.Constants.Outcome;
|
||||
|
@ -39,7 +40,7 @@ import mage.game.Game;
|
|||
import mage.game.permanent.Permanent;
|
||||
import mage.target.Target;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -48,8 +49,6 @@ import java.util.UUID;
|
|||
public class GainAbilityTargetEffect extends ContinuousEffectImpl<GainAbilityTargetEffect> {
|
||||
|
||||
protected Ability ability;
|
||||
protected String rule;
|
||||
protected boolean hasRule;
|
||||
|
||||
public GainAbilityTargetEffect(Ability ability, Duration duration) {
|
||||
super(duration, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA,
|
||||
|
@ -61,15 +60,12 @@ public class GainAbilityTargetEffect extends ContinuousEffectImpl<GainAbilityTar
|
|||
super(duration, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA,
|
||||
ability.getEffects().size() > 0 ? ability.getEffects().get(0).getOutcome() : Outcome.AddAbility);
|
||||
this.ability = ability;
|
||||
this.rule = rule;
|
||||
this.hasRule = true;
|
||||
staticText = rule;
|
||||
}
|
||||
|
||||
public GainAbilityTargetEffect(final GainAbilityTargetEffect effect) {
|
||||
super(effect);
|
||||
this.ability = effect.ability.copy();
|
||||
this.rule = effect.rule;
|
||||
this.hasRule = effect.hasRule;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -98,8 +94,8 @@ public class GainAbilityTargetEffect extends ContinuousEffectImpl<GainAbilityTar
|
|||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
if (hasRule) {
|
||||
return rule;
|
||||
if (staticText != null && !staticText.isEmpty()) {
|
||||
return staticText;
|
||||
}
|
||||
StringBuilder sb = new StringBuilder();
|
||||
Target target = mode.getTargets().get(0);
|
||||
|
@ -115,4 +111,4 @@ public class GainAbilityTargetEffect extends ContinuousEffectImpl<GainAbilityTar
|
|||
return sb.toString();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,27 +27,59 @@
|
|||
*/
|
||||
package mage.abilities.keyword;
|
||||
|
||||
import mage.Constants.Duration;
|
||||
import java.io.ObjectStreamException;
|
||||
import mage.Constants.Zone;
|
||||
import mage.abilities.StaticAbility;
|
||||
import mage.abilities.effects.common.IndestructibleSourceEffect;
|
||||
|
||||
/**
|
||||
* OLD RULES:
|
||||
* 700.4. If a permanent is indestructible, rules and effects can't destroy it. (See rule 701.6, "Destroy.")
|
||||
* Such permanents are not destroyed by lethal damage, and they ignore the lethal-damage state-based action
|
||||
* (see rule 704.5g). Rules or effects may cause an indestructible permanent to be sacrificed, put into a
|
||||
* graveyard, or exiled. #
|
||||
*
|
||||
* 700.4a Although the text "[This permanent] is indestructible" is an ability, actually being
|
||||
* indestructible is neither an ability nor a characteristic. It's just something that's true
|
||||
* about a permanent.
|
||||
*
|
||||
* NEW RULES
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
|
||||
public class IndestructibleAbility extends StaticAbility<IndestructibleAbility> {
|
||||
|
||||
public IndestructibleAbility() {
|
||||
super(Zone.BATTLEFIELD, new IndestructibleSourceEffect(Duration.WhileOnBattlefield));
|
||||
private static final IndestructibleAbility fINSTANCE;
|
||||
|
||||
static {
|
||||
fINSTANCE = new IndestructibleAbility();
|
||||
}
|
||||
|
||||
private IndestructibleAbility(IndestructibleAbility ability) {
|
||||
super(ability);
|
||||
private Object readResolve() throws ObjectStreamException {
|
||||
return fINSTANCE;
|
||||
}
|
||||
|
||||
public static IndestructibleAbility getInstance() {
|
||||
return fINSTANCE;
|
||||
}
|
||||
|
||||
private IndestructibleAbility() {
|
||||
super(Zone.BATTLEFIELD, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IndestructibleAbility copy() {
|
||||
return new IndestructibleAbility(this);
|
||||
return fINSTANCE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "{this} is indestructible.";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -785,6 +785,11 @@ public abstract class PermanentImpl<T extends PermanentImpl<T>> extends CardImpl
|
|||
public boolean destroy(UUID sourceId, Game game, boolean noRegen) {
|
||||
//20091005 - 701.6
|
||||
//TODO: handle noRegen
|
||||
|
||||
if(abilities.containsKey(IndestructibleAbility.getInstance().getId())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!game.replaceEvent(GameEvent.getEvent(EventType.DESTROY_PERMANENT, objectId, sourceId, controllerId, noRegen ? 1 : 0))) {
|
||||
if (moveToZone(Zone.GRAVEYARD, sourceId, game, false)) {
|
||||
game.fireEvent(GameEvent.getEvent(EventType.DESTROYED_PERMANENT, objectId, sourceId, controllerId));
|
||||
|
|
Loading…
Reference in a new issue