mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
commit
2487cf0645
161 changed files with 479 additions and 606 deletions
|
@ -29,22 +29,23 @@ package mage.cards.a;
|
|||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.continuous.BecomesCreatureIfVehicleEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.constants.AttachmentType;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -96,35 +97,3 @@ public class AerialModification extends CardImpl {
|
|||
return new AerialModification(this);
|
||||
}
|
||||
}
|
||||
|
||||
class BecomesCreatureIfVehicleEffect extends ContinuousEffectImpl {
|
||||
|
||||
private CardType addedType = CardType.CREATURE;
|
||||
|
||||
public BecomesCreatureIfVehicleEffect() {
|
||||
super(Duration.WhileOnBattlefield, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Benefit);
|
||||
this.staticText = "As long as enchanted permanent is a Vehicle, it's a creature in addition to its other types";
|
||||
}
|
||||
|
||||
public BecomesCreatureIfVehicleEffect(final BecomesCreatureIfVehicleEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent aura = game.getPermanent(source.getSourceId());
|
||||
if (aura != null && aura.getAttachedTo() != null) {
|
||||
Permanent enchanted = game.getPermanent(aura.getAttachedTo());
|
||||
if (enchanted != null && enchanted.getSubtype(game).contains("Vehicle")) {
|
||||
enchanted.getCardType().add(addedType);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BecomesCreatureIfVehicleEffect copy() {
|
||||
return new BecomesCreatureIfVehicleEffect(this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ public class AlabornVeteran extends CardImpl {
|
|||
|
||||
// {tap}: Target creature gets +2/+2 until end of turn. Activate this ability only during your turn, before attackers are declared.
|
||||
Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD,
|
||||
new BoostTargetEffect(2, 2, Duration.EndOfTurn), new TapSourceCost(), MyTurnBeforeAttackersDeclaredCondition.getInstance());
|
||||
new BoostTargetEffect(2, 2, Duration.EndOfTurn), new TapSourceCost(), MyTurnBeforeAttackersDeclaredCondition.instance);
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -27,17 +27,15 @@
|
|||
*/
|
||||
package mage.cards.a;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.CountType;
|
||||
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.IntCompareCondition;
|
||||
import mage.abilities.condition.common.YouGainedLifeCondition;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.token.AngelToken;
|
||||
import mage.watchers.common.PlayerGainedLifeWatcher;
|
||||
|
||||
|
@ -54,7 +52,7 @@ public class AngelicAccord extends CardImpl {
|
|||
|
||||
// At the beginning of each end step, if you gained 4 or more life this turn, create a 4/4 white Angel creature token with flying.
|
||||
this.addAbility(new BeginningOfEndStepTriggeredAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new AngelToken()), TargetController.ANY,
|
||||
new YouGainedLifeCondition(Condition.ComparisonType.GreaterThan, 3), false), new PlayerGainedLifeWatcher());
|
||||
new YouGainedLifeCondition(CountType.MORE_THAN, 3), false), new PlayerGainedLifeWatcher());
|
||||
}
|
||||
|
||||
public AngelicAccord(final AngelicAccord card) {
|
||||
|
@ -66,25 +64,3 @@ public class AngelicAccord extends CardImpl {
|
|||
return new AngelicAccord(this);
|
||||
}
|
||||
}
|
||||
|
||||
class YouGainedLifeCondition extends IntCompareCondition {
|
||||
|
||||
public YouGainedLifeCondition(Condition.ComparisonType type, int value) {
|
||||
super(type, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getInputValue(Game game, Ability source) {
|
||||
int gainedLife = 0;
|
||||
PlayerGainedLifeWatcher watcher = (PlayerGainedLifeWatcher) game.getState().getWatchers().get(PlayerGainedLifeWatcher.class.getName());
|
||||
if (watcher != null) {
|
||||
gainedLife = watcher.getLiveGained(source.getControllerId());
|
||||
}
|
||||
return gainedLife;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "if you gained 4 or more life this turn ";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -107,7 +107,7 @@ class AnimateArtifactContinuousEffect extends ContinuousEffectImpl {
|
|||
Permanent permanent = game.getPermanent(enchantment.getAttachedTo());
|
||||
if (permanent != null && !permanent.isCreature()) {
|
||||
if (sublayer == SubLayer.NA) {
|
||||
permanent.getCardType().add(CardType.CREATURE);
|
||||
permanent.addCardType(CardType.CREATURE);
|
||||
permanent.getPower().setValue(permanent.getConvertedManaCost());
|
||||
permanent.getToughness().setValue(permanent.getConvertedManaCost());
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ public class AnimateDead extends CardImpl {
|
|||
// under your control and attach Animate Dead to it. When Animate Dead leaves the battlefield, that creature's controller sacrifices it.
|
||||
Ability ability = new ConditionalTriggeredAbility(
|
||||
new EntersBattlefieldTriggeredAbility(new AnimateDeadReAttachEffect(), false),
|
||||
SourceOnBattlefieldCondition.getInstance(),
|
||||
SourceOnBattlefieldCondition.instance,
|
||||
"When {this} enters the battlefield, if it's on the battlefield, it loses \"enchant creature card in a graveyard\" and gains \"enchant creature put onto the battlefield with {this}.\" Return enchanted creature card to the battlefield under your control and attach {this} to it.");
|
||||
ability.addEffect(new AnimateDeadChangeAbilityEffect());
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -56,7 +56,7 @@ public class ApprenticeSorcerer extends CardImpl {
|
|||
|
||||
// {tap}: Apprentice Sorcerer deals 1 damage to target creature or player. Activate this ability only during your turn, before attackers are declared.
|
||||
Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD,
|
||||
new DamageTargetEffect(1), new TapSourceCost(), MyTurnBeforeAttackersDeclaredCondition.getInstance());
|
||||
new DamageTargetEffect(1), new TapSourceCost(), MyTurnBeforeAttackersDeclaredCondition.instance);
|
||||
ability.addTarget(new TargetCreatureOrPlayer());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -58,9 +58,9 @@ public class AuriokGlaivemaster extends CardImpl {
|
|||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
ConditionalContinuousEffect effect1 = new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), EquippedSourceCondition.getInstance(), rule1);
|
||||
ConditionalContinuousEffect effect1 = new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), EquippedSourceCondition.instance, rule1);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect1));
|
||||
ConditionalContinuousEffect effect2 = new ConditionalContinuousEffect(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance()), EquippedSourceCondition.getInstance(), rule2);
|
||||
ConditionalContinuousEffect effect2 = new ConditionalContinuousEffect(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance()), EquippedSourceCondition.instance, rule2);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect2));
|
||||
}
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ public class AuriokSteelshaper extends CardImpl {
|
|||
// As long as Auriok Steelshaper is equipped, each creature you control that's a Soldier or a Knight gets +1/+1.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
|
||||
new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, soldiersOrKnights, false),
|
||||
EquippedSourceCondition.getInstance(),
|
||||
EquippedSourceCondition.instance,
|
||||
"As long as {this} is equipped, each creature you control that's a Soldier or a Knight gets +1/+1"
|
||||
)));
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ public class AvacynianMissionaries extends CardImpl {
|
|||
|
||||
// At the beginning of your end step, if Avacynian Missionaries is equipped, transform it.
|
||||
this.addAbility(new TransformAbility());
|
||||
this.addAbility(new BeginningOfEndStepTriggeredAbility(Zone.BATTLEFIELD, new TransformSourceEffect(true), TargetController.YOU, new EquippedSourceCondition(), false));
|
||||
this.addAbility(new BeginningOfEndStepTriggeredAbility(Zone.BATTLEFIELD, new TransformSourceEffect(true), TargetController.YOU, EquippedSourceCondition.instance, false));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -28,9 +28,9 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.CountType;
|
||||
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||
import mage.abilities.common.PutCardIntoGraveFromAnywhereAllTriggeredAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.OpponentLostLifeCondition;
|
||||
import mage.abilities.condition.common.SourceHasCounterCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
|
@ -61,7 +61,7 @@ public class BloodchiefAscension extends CardImpl {
|
|||
this.addAbility(new BeginningOfEndStepTriggeredAbility(Zone.BATTLEFIELD,
|
||||
new AddCountersSourceEffect(CounterType.QUEST.createInstance(1), false),
|
||||
TargetController.ANY,
|
||||
new OpponentLostLifeCondition(Condition.ComparisonType.GreaterThan, 1),
|
||||
new OpponentLostLifeCondition(CountType.MORE_THAN, 1),
|
||||
true));
|
||||
|
||||
// Whenever a card is put into an opponent's graveyard from anywhere, if Bloodchief Ascension has three or more quest counters on it, you may have that player lose 2 life. If you do, you gain 2 life.
|
||||
|
|
|
@ -31,7 +31,7 @@ import mage.MageInt;
|
|||
import mage.abilities.common.CantBlockAbility;
|
||||
import mage.abilities.common.LandfallAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.TenOrLessLifeCondition;
|
||||
import mage.abilities.condition.common.XorLessLifeCondition;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffect;
|
||||
|
@ -64,7 +64,7 @@ public class Bloodghast extends CardImpl {
|
|||
// Bloodghast has haste as long as an opponent has 10 or less life.
|
||||
ContinuousEffect effect = new GainAbilitySourceEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(effect,
|
||||
new TenOrLessLifeCondition(TenOrLessLifeCondition.CheckType.AN_OPPONENT),
|
||||
new XorLessLifeCondition(XorLessLifeCondition.CheckType.AN_OPPONENT, 10),
|
||||
"Bloodghast has haste as long as an opponent has 10 or less life")));
|
||||
// Landfall — Whenever a land enters the battlefield under your control, you may return Bloodghast from your graveyard to the battlefield.
|
||||
this.addAbility(new LandfallAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToBattlefieldEffect(), true));
|
||||
|
|
|
@ -58,7 +58,7 @@ public class CaoCaoLordOfWei extends CardImpl {
|
|||
this.toughness = new MageInt(3);
|
||||
|
||||
// {tap}: Target opponent discards two cards. Activate this ability only during your turn, before attackers are declared.
|
||||
Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new DiscardTargetEffect(2), new TapSourceCost(), MyTurnBeforeAttackersDeclaredCondition.getInstance());
|
||||
Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new DiscardTargetEffect(2), new TapSourceCost(), MyTurnBeforeAttackersDeclaredCondition.instance);
|
||||
ability.addTarget(new TargetOpponent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ public class CapriciousSorcerer extends CardImpl {
|
|||
|
||||
// {tap}: Capricious Sorcerer deals 1 damage to target creature or player. Activate this ability only during your turn, before attackers are declared.
|
||||
Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD,
|
||||
new DamageTargetEffect(1), new TapSourceCost(), MyTurnBeforeAttackersDeclaredCondition.getInstance());
|
||||
new DamageTargetEffect(1), new TapSourceCost(), MyTurnBeforeAttackersDeclaredCondition.instance);
|
||||
ability.addTarget(new TargetCreatureOrPlayer());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -27,8 +27,6 @@
|
|||
*/
|
||||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DealsDamageToACreatureAttachedTriggeredAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
|
@ -36,13 +34,16 @@ import mage.abilities.condition.common.SourceOnBattlefieldCondition;
|
|||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.continuous.GainControlTargetEffect;
|
||||
import mage.constants.Outcome;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -65,7 +66,7 @@ public class Charisma extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
|
||||
// Whenever enchanted creature deals damage to a creature, gain control of the other creature for as long as Charisma remains on the battlefield.
|
||||
Condition condition = new SourceOnBattlefieldCondition();
|
||||
Condition condition = SourceOnBattlefieldCondition.instance;
|
||||
ConditionalContinuousEffect conditionalEffect = new ConditionalContinuousEffect(new GainControlTargetEffect(Duration.Custom), condition, rule);
|
||||
this.addAbility(new DealsDamageToACreatureAttachedTriggeredAbility(conditionalEffect, false, "enchanted creature", false, true));
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ class ChimericCoilsEffect extends ContinuousEffectImpl {
|
|||
switch (layer) {
|
||||
case TypeChangingEffects_4:
|
||||
if (sublayer == SubLayer.NA) {
|
||||
permanent.getCardType().add(CardType.CREATURE);
|
||||
permanent.addCardType(CardType.CREATURE);
|
||||
permanent.getSubtype(game).add("Construct");
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -85,7 +85,7 @@ class ChimericStaffEffect extends ContinuousEffectImpl {
|
|||
switch (layer) {
|
||||
case TypeChangingEffects_4:
|
||||
if (sublayer == SubLayer.NA) {
|
||||
permanent.getCardType().add(CardType.CREATURE);
|
||||
permanent.addCardType(CardType.CREATURE);
|
||||
permanent.getSubtype(game).add("Construct");
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -67,7 +67,7 @@ public class CoastalWizard extends CardImpl {
|
|||
Effect effect = new ReturnToHandSourceEffect(true);
|
||||
effect.setText("Return Coastal Wizard");
|
||||
Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD,
|
||||
effect, new TapSourceCost(), MyTurnBeforeAttackersDeclaredCondition.getInstance());
|
||||
effect, new TapSourceCost(), MyTurnBeforeAttackersDeclaredCondition.instance);
|
||||
effect = new ReturnToHandTargetEffect();
|
||||
effect.setText("and another target creature to their owners' hands");
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
|
|
|
@ -27,10 +27,9 @@
|
|||
*/
|
||||
package mage.cards.c;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbility;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.XorLessLifeCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
|
@ -39,7 +38,6 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.game.Game;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -56,7 +54,7 @@ public class ConvalescentCare extends CardImpl {
|
|||
Effect effect = new DrawCardSourceControllerEffect(1);
|
||||
TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new GainLifeEffect(3), TargetController.YOU, false);
|
||||
ability.addEffect(effect);
|
||||
this.addAbility(new ConditionalTriggeredAbility(ability, new FiveOrLessLifeCondition(), "At the beginning of your upkeep, if you have 5 or less life, you gain 3 life and draw a card."));
|
||||
this.addAbility(new ConditionalTriggeredAbility(ability, new XorLessLifeCondition(XorLessLifeCondition.CheckType.CONTROLLER, 5), "At the beginning of your upkeep, if you have 5 or less life, you gain 3 life and draw a card."));
|
||||
}
|
||||
|
||||
public ConvalescentCare(final ConvalescentCare card) {
|
||||
|
@ -68,11 +66,5 @@ public class ConvalescentCare extends CardImpl {
|
|||
return new ConvalescentCare(this);
|
||||
}
|
||||
|
||||
static class FiveOrLessLifeCondition implements Condition {
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return game.getPlayer(source.getControllerId()).getLife() <= 5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,8 +40,8 @@ import mage.constants.Outcome;
|
|||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.filter.predicate.Predicate;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.AttachmentAttachedToCardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.PermanentIdPredicate;
|
||||
import mage.game.Game;
|
||||
|
@ -85,31 +85,6 @@ public class CrownOfTheAges extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class AttachmentAttachedToCardTypePredicate implements Predicate<Permanent> {
|
||||
|
||||
private final CardType cardType;
|
||||
|
||||
public AttachmentAttachedToCardTypePredicate(CardType cardType) {
|
||||
this.cardType = cardType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Permanent input, Game game) {
|
||||
if (input.getAttachedTo() != null) {
|
||||
Permanent attachedTo = game.getPermanent(input.getAttachedTo());
|
||||
if (attachedTo != null && attachedTo.getCardType().contains(cardType)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "AttachmentAttachedToCardType(" + cardType + ')';
|
||||
}
|
||||
}
|
||||
|
||||
class CrownOfTheAgesEffect extends OneShotEffect {
|
||||
|
||||
public CrownOfTheAgesEffect() {
|
||||
|
|
|
@ -30,7 +30,7 @@ package mage.cards.c;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTappedAbility;
|
||||
import mage.abilities.condition.common.TenOrLessLifeCondition;
|
||||
import mage.abilities.condition.common.XorLessLifeCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.effects.common.LoseLifeAllPlayersEffect;
|
||||
import mage.abilities.effects.common.TransformSourceEffect;
|
||||
|
@ -68,7 +68,7 @@ public class CryptolithFragment extends CardImpl {
|
|||
this.addAbility(new TransformAbility());
|
||||
this.addAbility(new ConditionalTriggeredAbility(
|
||||
new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.YOU, false),
|
||||
new TenOrLessLifeCondition(TenOrLessLifeCondition.CheckType.EACH_PLAYER),
|
||||
new XorLessLifeCondition(XorLessLifeCondition.CheckType.EACH_PLAYER, 10),
|
||||
"At the beginning of your upkeep, if each player has 10 or less life, transform Cryptolith Fragment."));
|
||||
}
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ public class CunningAdvisor extends CardImpl {
|
|||
|
||||
// {tap}: Target opponent discards a card. Activate this ability only during your turn, before attackers are declared.
|
||||
Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD,
|
||||
new DiscardTargetEffect(1), new TapSourceCost(), MyTurnBeforeAttackersDeclaredCondition.getInstance());
|
||||
new DiscardTargetEffect(1), new TapSourceCost(), MyTurnBeforeAttackersDeclaredCondition.instance);
|
||||
ability.addTarget(new TargetOpponent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ public class CytoplastManipulator extends CardImpl {
|
|||
// {U}, {tap}: Gain control of target creature with a +1/+1 counter on it for as long as Cytoplast Manipulator remains on the battlefield.
|
||||
ConditionalContinuousEffect effect = new ConditionalContinuousEffect(
|
||||
new GainControlTargetEffect(Duration.Custom, true),
|
||||
new SourceOnBattlefieldCondition(),
|
||||
SourceOnBattlefieldCondition.instance,
|
||||
"gain control of target creature with a +1/+1 counter on it for as long as {this} remains on the battlefield");
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{U}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
|
|
|
@ -81,7 +81,7 @@ public class DanceOfTheDead extends CardImpl {
|
|||
// When Dance of the Dead enters the battlefield, if it's on the battlefield, it loses "enchant creature card in a graveyard" and gains "enchant creature put onto the battlefield with Dance of the Dead." Put enchanted creature card to the battlefield tapped under your control and attach Dance of the Dead to it. When Dance of the Dead leaves the battlefield, that creature's controller sacrifices it.
|
||||
Ability ability = new ConditionalTriggeredAbility(
|
||||
new EntersBattlefieldTriggeredAbility(new DanceOfTheDeadReAttachEffect(), false),
|
||||
SourceOnBattlefieldCondition.getInstance(),
|
||||
SourceOnBattlefieldCondition.instance,
|
||||
"When {this} enters the battlefield, if it's on the battlefield, it loses \"enchant creature card in a graveyard\" and gains \"enchant creature put onto the battlefield with {this}.\" Return enchanted creature card to the battlefield under your control and attach {this} to it.");
|
||||
ability.addEffect(new DanceOfTheDeadChangeAbilityEffect());
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -72,7 +72,7 @@ public class DeepSeaKraken extends CardImpl {
|
|||
this.addAbility(new SuspendAbility(9, new ManaCostsImpl("{2}{U}"), this));
|
||||
// Whenever an opponent casts a spell, if Deep-Sea Kraken is suspended, remove a time counter from it.
|
||||
this.addAbility(new ConditionalTriggeredAbility(
|
||||
new SpellCastAllTriggeredAbility(Zone.EXILED, new RemoveCounterSourceEffect(CounterType.TIME.createInstance()), filter, false, SetTargetPointer.NONE), SuspendedCondition.getInstance(),
|
||||
new SpellCastAllTriggeredAbility(Zone.EXILED, new RemoveCounterSourceEffect(CounterType.TIME.createInstance()), filter, false, SetTargetPointer.NONE), SuspendedCondition.instance,
|
||||
"Whenever an opponent casts a spell, if Deep-Sea Kraken is suspended, remove a time counter from it."));
|
||||
}
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ public class DiaochanArtfulBeauty extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// {tap}: Destroy target creature of your choice, then destroy target creature of an opponent's choice. Activate this ability only during your turn, before attackers are declared.
|
||||
Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new DiaochanArtfulBeautyDestroyEffect(), new TapSourceCost(), MyTurnBeforeAttackersDeclaredCondition.getInstance());
|
||||
Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new DiaochanArtfulBeautyDestroyEffect(), new TapSourceCost(), MyTurnBeforeAttackersDeclaredCondition.instance);
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
ability.addTarget(new TargetOpponentsChoicePermanent(1, 1, new FilterCreaturePermanent(), false, true));
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -88,7 +88,7 @@ public class EnchantedEvening extends CardImpl {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, game)) {
|
||||
if (permanent != null && !permanent.getCardType().contains(addedCardType)) {
|
||||
permanent.getCardType().add(addedCardType);
|
||||
permanent.addCardType(addedCardType);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -58,7 +58,7 @@ public class EnshroudingMist extends CardImpl {
|
|||
this.getSpellAbility().addEffect(effect);
|
||||
OneShotEffect effect2 = new UntapTargetEffect();
|
||||
effect2.setText("untap it");
|
||||
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(effect2, RenownedTargetCondition.getInstance()));
|
||||
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(effect2, RenownedTargetCondition.instance));
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ public class EntourageOfTrest extends CardImpl {
|
|||
|
||||
// Entourage of Trest can block an additional creature each combat as long as you're the monarch.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
|
||||
new CanBlockAdditionalCreatureEffect(1), MonarchIsSourceControllerCondition.getInstance(),
|
||||
new CanBlockAdditionalCreatureEffect(1), MonarchIsSourceControllerCondition.instance,
|
||||
"{this} can block an additional creature each combat as long as you're the monarch")));
|
||||
}
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ public class FireBowman extends CardImpl {
|
|||
|
||||
// Sacrifice Fire Bowman: Fire Bowman deals 1 damage to target creature or player. Activate this ability only during your turn, before attackers are declared.
|
||||
Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD,
|
||||
new DamageTargetEffect(1), new SacrificeSourceCost(), MyTurnBeforeAttackersDeclaredCondition.getInstance());
|
||||
new DamageTargetEffect(1), new SacrificeSourceCost(), MyTurnBeforeAttackersDeclaredCondition.instance);
|
||||
ability.addTarget(new TargetCreatureOrPlayer());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ public class ForgestokerDragon extends CardImpl {
|
|||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
// {1}{R}: Forgestoker Dragon deals 1 damage to target creature. That creature can't block this combat. Activate this ability only if Forgestoker Dragon is attacking.
|
||||
Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{1}{R}"), new SourceAttackingCondition());
|
||||
Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{1}{R}"), SourceAttackingCondition.instance);
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
Effect effect = new CantBlockTargetEffect(Duration.EndOfCombat);
|
||||
effect.setText("That creature can't block this combat");
|
||||
|
|
|
@ -65,7 +65,7 @@ public class FreneticSliver extends CardImpl {
|
|||
|
||||
// All Slivers have "{0}: If this permanent is on the battlefield, flip a coin. If you win the flip, exile this permanent and return it to the battlefield under its owner's control at the beginning of the next end step. If you lose the flip, sacrifice it."
|
||||
Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD,
|
||||
new FreneticSliverEffect(), new ManaCostsImpl("{0}"), SourceOnBattlefieldCondition.getInstance(), "{0}: If this permanent is on the battlefield, flip a coin. If you win the flip, exile this permanent and return it to the battlefield under its owner's control at the beginning of the next end step. If you lose the flip, sacrifice it.");
|
||||
new FreneticSliverEffect(), new ManaCostsImpl("{0}"), SourceOnBattlefieldCondition.instance, "{0}: If this permanent is on the battlefield, flip a coin. If you win the flip, exile this permanent and return it to the battlefield under its owner's control at the beginning of the next end step. If you lose the flip, sacrifice it.");
|
||||
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new GainAbilityAllEffect(ability, Duration.WhileOnBattlefield, filter, "All Slivers have \"{0}: If this permanent is on the battlefield, flip a coin. If you win the flip, exile this permanent and return it to the battlefield under its owner's control at the beginning of the next end step. If you lose the flip, sacrifice it.\"")));
|
||||
|
|
|
@ -78,7 +78,7 @@ public class GaeasLiege extends CardImpl {
|
|||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new ConditionalContinuousEffect(
|
||||
new SetPowerToughnessSourceEffect(new PermanentsOnBattlefieldCount(filterLands), Duration.EndOfGame),
|
||||
new SetPowerToughnessSourceEffect(new DefendersForestCount(), Duration.EndOfCombat),
|
||||
new InvertCondition(SourceAttackingCondition.getInstance()),
|
||||
new InvertCondition(SourceAttackingCondition.instance),
|
||||
"As long as {this} isn't attacking, its power and toughness are each equal to the number of Forests you control. As long as {this} is attacking, its power and toughness are each equal to the number of Forests defending player controls.")));
|
||||
// {tap}: Target land becomes a Forest until Gaea's Liege leaves the battlefield.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesBasicLandTargetEffect(Duration.WhileOnBattlefield, "Forest"), new TapSourceCost());
|
||||
|
|
|
@ -58,7 +58,7 @@ public class GarrulousSycophant extends CardImpl {
|
|||
|
||||
// At the beginning of your end step, if you're the monarch, each opponent loses 1 life and you gain 1 life.
|
||||
Ability ability = new BeginningOfEndStepTriggeredAbility(Zone.BATTLEFIELD, new LoseLifeOpponentsEffect(1),
|
||||
TargetController.YOU, MonarchIsSourceControllerCondition.getInstance(), false);
|
||||
TargetController.YOU, MonarchIsSourceControllerCondition.instance, false);
|
||||
Effect effect = new GainLifeEffect(1);
|
||||
effect.setText("and you gain 1 life");
|
||||
ability.addEffect(effect);
|
||||
|
|
|
@ -67,7 +67,7 @@ public class GerrardCapashen extends CardImpl {
|
|||
|
||||
// {3}{W}: Tap target creature. Activate this ability only if {this} is attacking.
|
||||
Ability ability2 = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(),
|
||||
new ManaCostsImpl("{3}{W}"), new SourceAttackingCondition());
|
||||
new ManaCostsImpl("{3}{W}"), SourceAttackingCondition.instance);
|
||||
ability2.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability2);
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
package mage.cards.g;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.CountType;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.IntCompareCondition;
|
||||
|
@ -76,7 +77,7 @@ public class GhirapurOrrery extends CardImpl {
|
|||
class GhirapurOrreryCondition extends IntCompareCondition {
|
||||
|
||||
GhirapurOrreryCondition() {
|
||||
super(ComparisonType.Equal, 0);
|
||||
super(CountType.EQUAL_TO, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -55,7 +55,7 @@ public class GoblinFirestarter extends CardImpl {
|
|||
|
||||
// Sacrifice Goblin Firestarter: Goblin Firestarter deals 1 damage to target creature or player. Activate this ability only during your turn, before attackers are declared.
|
||||
Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD,
|
||||
new DamageTargetEffect(1), new SacrificeSourceCost(), MyTurnBeforeAttackersDeclaredCondition.getInstance());
|
||||
new DamageTargetEffect(1), new SacrificeSourceCost(), MyTurnBeforeAttackersDeclaredCondition.instance);
|
||||
ability.addTarget(new TargetCreatureOrPlayer());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ public class GorillaWarCry extends CardImpl {
|
|||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}");
|
||||
|
||||
// Cast Gorilla War Cry only during combat before blockers are declared.
|
||||
this.addAbility(new CastOnlyDuringPhaseStepSourceAbility(TurnPhase.COMBAT, BeforeBlockersAreDeclaredCondition.getInstance()));
|
||||
this.addAbility(new CastOnlyDuringPhaseStepSourceAbility(TurnPhase.COMBAT, BeforeBlockersAreDeclaredCondition.instance));
|
||||
|
||||
// All creatures gain menace until end of turn. <i>(They can't be blocked except by two or more creatures.)</i>
|
||||
Effect effect = new GainAbilityAllEffect(new MenaceAbility(), Duration.EndOfTurn, new FilterCreaturePermanent());
|
||||
|
|
|
@ -117,7 +117,7 @@ class GraspOfFateExileEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (permanent != null) {
|
||||
return new ConditionalOneShotEffect(new ExileTargetEffect(CardUtil.getCardExileZoneId(game, source), permanent.getIdName(), Zone.BATTLEFIELD, true), new SourceOnBattlefieldCondition()).apply(game, source);
|
||||
return new ConditionalOneShotEffect(new ExileTargetEffect(CardUtil.getCardExileZoneId(game, source), permanent.getIdName(), Zone.BATTLEFIELD, true), SourceOnBattlefieldCondition.instance).apply(game, source);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ public class Groundswell extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
|
||||
new AddContinuousEffectToGame(new BoostTargetEffect(4, 4, Duration.EndOfTurn)),
|
||||
new AddContinuousEffectToGame(new BoostTargetEffect(2, 2, Duration.EndOfTurn)),
|
||||
LandfallCondition.getInstance(),
|
||||
LandfallCondition.instance,
|
||||
"Target creature gets +2/+2 until end of turn. <br><i>Landfall</i> — If you had a land enter the battlefield under your control this turn, that creature gets +4/+4 until end of turn instead"));
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ import mage.MageInt;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.TenOrLessLifeCondition;
|
||||
import mage.abilities.condition.common.XorLessLifeCondition;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||
|
@ -63,7 +63,7 @@ public class GuulDrazVampire extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// As long as an opponent has 10 or less life, Guul Draz Vampire gets +2/+1 and has intimidate. (It can't be blocked except by artifact creatures and/or creatures that share a color with it.)
|
||||
Condition condition = new TenOrLessLifeCondition(TenOrLessLifeCondition.CheckType.AN_OPPONENT);
|
||||
Condition condition = new XorLessLifeCondition(XorLessLifeCondition.CheckType.AN_OPPONENT, 10);
|
||||
ConditionalContinuousEffect effect1 = new ConditionalContinuousEffect(new BoostSourceEffect(2, 1, Duration.WhileOnBattlefield), condition, rule1);
|
||||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect1);
|
||||
ability.addEffect(new ConditionalContinuousEffect(new GainAbilitySourceEffect(IntimidateAbility.getInstance()), condition, rule2));
|
||||
|
|
|
@ -27,12 +27,9 @@
|
|||
*/
|
||||
package mage.cards.h;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.CountType;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.DevouredCreaturesCondition;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
import mage.abilities.effects.common.DevourEffect.DevourFactor;
|
||||
|
@ -42,6 +39,10 @@ import mage.abilities.keyword.FlyingAbility;
|
|||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -62,11 +63,11 @@ public class HellkiteHatchling extends CardImpl {
|
|||
// Hellkite Hatchling has flying and trample if it devoured a creature.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
|
||||
new GainAbilitySourceEffect(FlyingAbility.getInstance()),
|
||||
new DevouredCreaturesCondition(Condition.ComparisonType.GreaterThan, 0),
|
||||
new DevouredCreaturesCondition(CountType.MORE_THAN, 0),
|
||||
"{this} has flying if it devoured a creature")));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
|
||||
new GainAbilitySourceEffect(TrampleAbility.getInstance()),
|
||||
new DevouredCreaturesCondition(Condition.ComparisonType.GreaterThan, 0),
|
||||
new DevouredCreaturesCondition(CountType.MORE_THAN, 0),
|
||||
"{this} has trample if it devoured a creature")));
|
||||
}
|
||||
|
||||
|
|
|
@ -85,6 +85,6 @@ class CamaridToken extends Token {
|
|||
this.getToughness().modifyBaseValue(1);
|
||||
this.color.setBlue(true);
|
||||
this.getSubtype(null).add("Camarid");
|
||||
this.getCardType().add(CardType.CREATURE);
|
||||
this.addCardType(CardType.CREATURE);
|
||||
}
|
||||
}
|
|
@ -109,7 +109,7 @@ class HomuraReturnFlippedSourceEffect extends OneShotEffect {
|
|||
Card sourceCard = game.getCard(source.getSourceId());
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (sourceCard != null && controller != null && game.getState().getZone(source.getSourceId()) == Zone.GRAVEYARD) {
|
||||
ContinuousEffect effect = new ConditionalContinuousEffect(new CopyTokenEffect(flipToken), FlippedCondition.getInstance(), "");
|
||||
ContinuousEffect effect = new ConditionalContinuousEffect(new CopyTokenEffect(flipToken), FlippedCondition.instance, "");
|
||||
game.addEffect(effect, source);
|
||||
controller.moveCards(sourceCard, Zone.BATTLEFIELD, source, game);
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
|
|
|
@ -58,7 +58,7 @@ public class HuaTuoHonoredPhysician extends CardImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
// {tap}: Put target creature card from your graveyard on top of your library. Activate this ability only during your turn, before attackers are declared.
|
||||
Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new PutOnLibraryTargetEffect(true), new TapSourceCost(), MyTurnBeforeAttackersDeclaredCondition.getInstance());
|
||||
Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new PutOnLibraryTargetEffect(true), new TapSourceCost(), MyTurnBeforeAttackersDeclaredCondition.instance);
|
||||
ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -130,7 +130,7 @@ class BecomesColorlessLandEffect extends ContinuousEffectImpl {
|
|||
case TypeChangingEffects_4:
|
||||
boolean isLand = permanent.isLand();
|
||||
permanent.getCardType().clear();
|
||||
permanent.getCardType().add(CardType.LAND);
|
||||
permanent.addCardType(CardType.LAND);
|
||||
if (!isLand) {
|
||||
permanent.getSubtype(game).clear();
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ class CatWarriorToken extends Token {
|
|||
this.color.setGreen(true);
|
||||
this.getSubtype(null).add("Cat");
|
||||
this.getSubtype(null).add("Warrior");
|
||||
this.getCardType().add(CardType.CREATURE);
|
||||
this.addCardType(CardType.CREATURE);
|
||||
this.addAbility(new ForestwalkAbility());
|
||||
}
|
||||
}
|
|
@ -117,6 +117,6 @@ class RagavanToken extends Token {
|
|||
this.getToughness().modifyBaseValue(1);
|
||||
this.color.setRed(true);
|
||||
this.getSubtype(null).add("Monkey");
|
||||
this.getCardType().add(CardType.CREATURE);
|
||||
this.addCardType(CardType.CREATURE);
|
||||
}
|
||||
}
|
|
@ -110,7 +110,7 @@ class KarnSilverGolemEffect extends ContinuousEffectImpl {
|
|||
case TypeChangingEffects_4:
|
||||
if (sublayer == SubLayer.NA) {
|
||||
if (!artifact.isCreature()) {
|
||||
artifact.getCardType().add(CardType.CREATURE);
|
||||
artifact.addCardType(CardType.CREATURE);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
*/
|
||||
package mage.cards.k;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
|
@ -43,6 +42,8 @@ import mage.constants.TargetController;
|
|||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
|
@ -64,7 +65,7 @@ public class KeeperOfKeys extends CardImpl {
|
|||
// At the beginning of your upkeep, if you're the monarch, creatures you control can't be blocked this turn.
|
||||
this.addAbility(new ConditionalTriggeredAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD,
|
||||
new CantBeBlockedAllEffect(new FilterControlledCreaturePermanent("creatures you control"), Duration.EndOfTurn),
|
||||
TargetController.YOU, false), MonarchIsSourceControllerCondition.getInstance(),
|
||||
TargetController.YOU, false), MonarchIsSourceControllerCondition.instance,
|
||||
"At the beginning of your upkeep, if you're the monarch, creatures you control can't be blocked this turn."));
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
*/
|
||||
package mage.cards.k;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.ActivateIfConditionActivatedAbility;
|
||||
|
@ -42,6 +41,8 @@ import mage.filter.common.FilterCreaturePermanent;
|
|||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
|
@ -63,7 +64,7 @@ public class KingsAssassin extends CardImpl {
|
|||
|
||||
// {tap}: Destroy target tapped creature. Activate this ability only during your turn, before attackers are declared.
|
||||
Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD,
|
||||
new DestroyTargetEffect(), new TapSourceCost(), MyTurnBeforeAttackersDeclaredCondition.getInstance());
|
||||
new DestroyTargetEffect(), new TapSourceCost(), MyTurnBeforeAttackersDeclaredCondition.instance);
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -27,9 +27,6 @@
|
|||
*/
|
||||
package mage.cards.k;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.EquippedSourceCondition;
|
||||
|
@ -39,9 +36,12 @@ import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
|||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Loki
|
||||
|
@ -60,9 +60,9 @@ public class KitesailApprentice extends CardImpl {
|
|||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
ConditionalContinuousEffect effect1 = new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), EquippedSourceCondition.getInstance(), rule1);
|
||||
ConditionalContinuousEffect effect1 = new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), EquippedSourceCondition.instance, rule1);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect1));
|
||||
ConditionalContinuousEffect effect2 = new ConditionalContinuousEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance()), EquippedSourceCondition.getInstance(), rule2);
|
||||
ConditionalContinuousEffect effect2 = new ConditionalContinuousEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance()), EquippedSourceCondition.instance, rule2);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect2));
|
||||
}
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ import mage.constants.Outcome;
|
|||
import mage.constants.SuperType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterEnchantmentPermanent;
|
||||
import mage.filter.predicate.Predicate;
|
||||
import mage.filter.predicate.mageobject.AttachmentAttachedToCardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
@ -113,31 +113,6 @@ class AutumnTailKitsuneSage extends Token {
|
|||
}
|
||||
}
|
||||
|
||||
class AttachmentAttachedToCardTypePredicate implements Predicate<Permanent> {
|
||||
|
||||
private final CardType cardType;
|
||||
|
||||
public AttachmentAttachedToCardTypePredicate(CardType cardType) {
|
||||
this.cardType = cardType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Permanent input, Game game) {
|
||||
if (input.getAttachedTo() != null) {
|
||||
Permanent attachedTo = game.getPermanent(input.getAttachedTo());
|
||||
if (attachedTo != null && attachedTo.getCardType().contains(cardType)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "AttachmentAttachedToCardType(" + cardType + ')';
|
||||
}
|
||||
}
|
||||
|
||||
class AutumnTailEffect extends OneShotEffect {
|
||||
|
||||
public AutumnTailEffect() {
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
*/
|
||||
package mage.cards.k;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.SourceAttackingCondition;
|
||||
|
@ -39,6 +38,8 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
|
@ -54,7 +55,7 @@ public class KorScythemaster extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// Kor Scythemaster has first strike as long as its attacking.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance()), SourceAttackingCondition.getInstance(), "{this} has first strike as long as it's attacking")));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance()), SourceAttackingCondition.instance, "{this} has first strike as long as it's attacking")));
|
||||
}
|
||||
|
||||
public KorScythemaster(final KorScythemaster card) {
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
*/
|
||||
package mage.cards.l;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.ActivateIfConditionActivatedAbility;
|
||||
|
@ -45,6 +44,8 @@ import mage.filter.common.FilterCreaturePermanent;
|
|||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
|
@ -68,7 +69,7 @@ public class LadySun extends CardImpl {
|
|||
Effect effect = new ReturnToHandSourceEffect(true);
|
||||
effect.setText("Return Lady Sun");
|
||||
Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD,
|
||||
effect, new TapSourceCost(), MyTurnBeforeAttackersDeclaredCondition.getInstance());
|
||||
effect, new TapSourceCost(), MyTurnBeforeAttackersDeclaredCondition.instance);
|
||||
effect = new ReturnToHandTargetEffect();
|
||||
effect.setText("and another target creature to their owners' hands");
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
|
|
|
@ -27,9 +27,6 @@
|
|||
*/
|
||||
package mage.cards.l;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.EquippedSourceCondition;
|
||||
|
@ -39,9 +36,12 @@ import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
|||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Loki
|
||||
|
@ -61,9 +61,9 @@ public class LeoninDenGuard extends CardImpl {
|
|||
this.toughness = new MageInt(3);
|
||||
|
||||
// As long as Leonin Den-Guard is equipped, it gets +1/+1 and has vigilance.
|
||||
ConditionalContinuousEffect effect1 = new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), EquippedSourceCondition.getInstance(), rule1);
|
||||
ConditionalContinuousEffect effect1 = new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), EquippedSourceCondition.instance, rule1);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect1));
|
||||
ConditionalContinuousEffect effect2 = new ConditionalContinuousEffect(new GainAbilitySourceEffect(VigilanceAbility.getInstance()), EquippedSourceCondition.getInstance(), rule2);
|
||||
ConditionalContinuousEffect effect2 = new ConditionalContinuousEffect(new GainAbilitySourceEffect(VigilanceAbility.getInstance()), EquippedSourceCondition.instance, rule2);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect2));
|
||||
|
||||
}
|
||||
|
|
|
@ -28,8 +28,6 @@
|
|||
|
||||
package mage.cards.l;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.MageObjectReference;
|
||||
import mage.abilities.Ability;
|
||||
|
@ -39,12 +37,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
|||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Layer;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubLayer;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.game.Game;
|
||||
|
@ -56,6 +49,9 @@ import mage.game.permanent.token.Token;
|
|||
import mage.target.Target;
|
||||
import mage.target.common.TargetLandPermanent;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Loki
|
||||
|
@ -138,7 +134,7 @@ class LiegeOfTheTangleEffect extends ContinuousEffectImpl {
|
|||
switch (layer) {
|
||||
case TypeChangingEffects_4:
|
||||
if (sublayer == SubLayer.NA) {
|
||||
perm.getCardType().addAll(token.getCardType());
|
||||
perm.addCardTypes(token.getCardType());
|
||||
perm.getSubtype(game).addAll(token.getSubtype(game));
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -100,13 +100,13 @@ class LifeAndLimbEffect extends ContinuousEffectImpl {
|
|||
switch (layer) {
|
||||
case TypeChangingEffects_4:
|
||||
if (!permanent.isCreature()) {
|
||||
permanent.getCardType().add(CardType.CREATURE);
|
||||
permanent.addCardType(CardType.CREATURE);
|
||||
}
|
||||
if (!permanent.getSubtype(game).contains("Saproling")) {
|
||||
permanent.getSubtype(game).add("Saproling");
|
||||
}
|
||||
if (!permanent.isLand()) {
|
||||
permanent.getCardType().add(CardType.LAND);
|
||||
permanent.addCardType(CardType.LAND);
|
||||
}
|
||||
if (!permanent.getSubtype(game).contains("Forest")) {
|
||||
permanent.getSubtype(game).add("Forest");
|
||||
|
|
|
@ -27,13 +27,11 @@
|
|||
*/
|
||||
package mage.cards.l;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.CountType;
|
||||
import mage.abilities.TriggeredAbility;
|
||||
import mage.abilities.common.OnEventTriggeredAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.IntCompareCondition;
|
||||
import mage.abilities.condition.common.YouGainedLifeCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.effects.common.TransformSourceEffect;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
|
@ -43,10 +41,11 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.i.ItThatRidesAsOne;
|
||||
import mage.constants.CardType;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.watchers.common.PlayerGainedLifeWatcher;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
|
@ -74,7 +73,7 @@ public class LoneRider extends CardImpl {
|
|||
// At the beginning of the end step, if you gained 3 or more life this turn, transform Lone Rider.
|
||||
this.addAbility(new TransformAbility());
|
||||
TriggeredAbility triggered = new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new TransformSourceEffect(true));
|
||||
this.addAbility(new ConditionalTriggeredAbility(triggered, new YouGainedLifeCondition(Condition.ComparisonType.GreaterThan, 2), ruleText), new PlayerGainedLifeWatcher());
|
||||
this.addAbility(new ConditionalTriggeredAbility(triggered, new YouGainedLifeCondition(CountType.MORE_THAN, 2), ruleText), new PlayerGainedLifeWatcher());
|
||||
}
|
||||
|
||||
public LoneRider(final LoneRider card) {
|
||||
|
@ -86,25 +85,3 @@ public class LoneRider extends CardImpl {
|
|||
return new LoneRider(this);
|
||||
}
|
||||
}
|
||||
|
||||
class YouGainedLifeCondition extends IntCompareCondition {
|
||||
|
||||
public YouGainedLifeCondition(Condition.ComparisonType type, int value) {
|
||||
super(type, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getInputValue(Game game, Ability source) {
|
||||
int gainedLife = 0;
|
||||
PlayerGainedLifeWatcher watcher = (PlayerGainedLifeWatcher) game.getState().getWatchers().get(PlayerGainedLifeWatcher.class.getName());
|
||||
if (watcher != null) {
|
||||
gainedLife = watcher.getLiveGained(source.getControllerId());
|
||||
}
|
||||
return gainedLife;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "if you gained 3 or more life this turn ";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
*/
|
||||
package mage.cards.l;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.ActivateIfConditionActivatedAbility;
|
||||
|
@ -42,6 +41,8 @@ import mage.filter.common.FilterCreatureCard;
|
|||
import mage.filter.predicate.mageobject.SupertypePredicate;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
|
@ -63,7 +64,7 @@ public class LoyalRetainers extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// Sacrifice Loyal Retainers: Return target legendary creature card from your graveyard to the battlefield. Activate this ability only during your turn, before attackers are declared.
|
||||
Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new ReturnFromGraveyardToBattlefieldTargetEffect(), new SacrificeSourceCost(), MyTurnBeforeAttackersDeclaredCondition.getInstance());
|
||||
Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new ReturnFromGraveyardToBattlefieldTargetEffect(), new SacrificeSourceCost(), MyTurnBeforeAttackersDeclaredCondition.instance);
|
||||
ability.addTarget(new TargetCardInYourGraveyard(filter));
|
||||
this.addAbility(ability);
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ public class LuSuWuAdvisor extends CardImpl {
|
|||
|
||||
// {tap}: Draw a card. Activate this ability only during your turn, before attackers are declared.
|
||||
Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD,
|
||||
new DrawCardSourceControllerEffect(1), new TapSourceCost(), MyTurnBeforeAttackersDeclaredCondition.getInstance());
|
||||
new DrawCardSourceControllerEffect(1), new TapSourceCost(), MyTurnBeforeAttackersDeclaredCondition.instance);
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ class MarchOfTheMachinesEffect extends ContinuousEffectImpl {
|
|||
for(Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, game)){
|
||||
if(permanent != null){
|
||||
affectedObjectList.add(new MageObjectReference(permanent, game));
|
||||
permanent.getCardType().add(CardType.CREATURE);
|
||||
permanent.addCardType(CardType.CREATURE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,8 +27,8 @@
|
|||
*/
|
||||
package mage.cards.m;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.CountType;
|
||||
import mage.abilities.TriggeredAbility;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.condition.IntCompareCondition;
|
||||
|
@ -42,6 +42,8 @@ import mage.constants.TargetController;
|
|||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
|
@ -70,7 +72,7 @@ public class MaskOfIntolerance extends CardImpl {
|
|||
class MaskOfIntoleranceCondition extends IntCompareCondition {
|
||||
|
||||
public MaskOfIntoleranceCondition() {
|
||||
super(ComparisonType.GreaterThan, 3);
|
||||
super(CountType.MORE_THAN, 3);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -83,7 +83,7 @@ class PermanentsAreArtifactsEffect extends ContinuousEffectImpl {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
for (Permanent perm : game.getBattlefield().getActivePermanents(source.getControllerId(), game)) {
|
||||
perm.getCardType().add(CardType.ARTIFACT);
|
||||
perm.addCardType(CardType.ARTIFACT);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
*/
|
||||
package mage.cards.m;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
|
@ -45,6 +44,8 @@ import mage.filter.predicate.mageobject.NamePredicate;
|
|||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
|
@ -61,7 +62,7 @@ public class MyrServitor extends CardImpl {
|
|||
// At the beginning of your upkeep, if Myr Servitor is on the battlefield, each player returns all cards named Myr Servitor from his or her graveyard to the battlefield.
|
||||
this.addAbility(new ConditionalTriggeredAbility(
|
||||
new BeginningOfUpkeepTriggeredAbility(new MyrServitorReturnEffect(), TargetController.YOU, false),
|
||||
SourceOnBattlefieldCondition.getInstance(),
|
||||
SourceOnBattlefieldCondition.instance,
|
||||
"At the beginning of your upkeep, if {this} is on the battlefield, each player returns all cards named Myr Servitor from his or her graveyard to the battlefield"
|
||||
));
|
||||
|
||||
|
|
|
@ -27,15 +27,16 @@
|
|||
*/
|
||||
package mage.cards.m;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.abilities.condition.common.LandfallCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.watchers.common.LandfallWatcher;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
|
@ -48,7 +49,7 @@ public class MysteriesOfTheDeep extends CardImpl {
|
|||
// Draw two cards.
|
||||
// Landfall - If you had a land enter the battlefield under your control this turn, draw three cards instead.
|
||||
this.getSpellAbility().addWatcher(new LandfallWatcher());
|
||||
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new DrawCardSourceControllerEffect(3), new DrawCardSourceControllerEffect(2), LandfallCondition.getInstance(), "Draw 2 cards. Landfall - If you had a land enter the battlefield under your control this turn, draw three cards instead"));
|
||||
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new DrawCardSourceControllerEffect(3), new DrawCardSourceControllerEffect(2), LandfallCondition.instance, "Draw 2 cards. Landfall - If you had a land enter the battlefield under your control this turn, draw three cards instead"));
|
||||
}
|
||||
|
||||
public MysteriesOfTheDeep(final MysteriesOfTheDeep card) {
|
||||
|
|
|
@ -99,7 +99,7 @@ class BecomesCreatureAllEffect extends ContinuousEffectImpl {
|
|||
for (Iterator<MageObjectReference> it = affectedObjectList.iterator(); it.hasNext();) {
|
||||
Permanent permanent = it.next().getPermanent(game);
|
||||
if (permanent != null) {
|
||||
permanent.getCardType().add(CardType.CREATURE);
|
||||
permanent.addCardType(CardType.CREATURE);
|
||||
} else {
|
||||
it.remove();
|
||||
}
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
*/
|
||||
package mage.cards.n;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageObjectReference;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
|
@ -44,13 +43,7 @@ import mage.abilities.keyword.EnchantAbility;
|
|||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.DependencyType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Layer;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubLayer;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.*;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.PermanentIdPredicate;
|
||||
|
@ -61,6 +54,8 @@ import mage.target.Target;
|
|||
import mage.target.common.TargetCardInGraveyard;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
|
@ -79,7 +74,7 @@ public class Necromancy extends CardImpl {
|
|||
// When Necromancy leaves the battlefield, that creature's controller sacrifices it.
|
||||
Ability ability = new ConditionalTriggeredAbility(
|
||||
new EntersBattlefieldTriggeredAbility(new NecromancyReAttachEffect(), false),
|
||||
SourceOnBattlefieldCondition.getInstance(),
|
||||
SourceOnBattlefieldCondition.instance,
|
||||
"When {this} enters the battlefield, if it's on the battlefield, it becomes an Aura with \"enchant creature put onto the battlefield with {this}.\" Put target creature card from a graveyard onto the battlefield under your control and attach {this} to it.");
|
||||
ability.addTarget(new TargetCardInGraveyard(new FilterCreatureCard("creature card from a graveyard")));
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
*/
|
||||
package mage.cards.n;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DealsDamageToACreatureAttachedTriggeredAbility;
|
||||
import mage.abilities.common.DealsDamageToAPlayerAttachedTriggeredAbility;
|
||||
|
@ -35,8 +34,8 @@ import mage.abilities.condition.common.SourceOnBattlefieldCondition;
|
|||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.decorator.ConditionalContinuousRuleModifyingEffect;
|
||||
import mage.abilities.effects.ContinuousRuleModifyingEffect;
|
||||
import mage.abilities.effects.common.LoseLifeTargetEffect;
|
||||
import mage.abilities.effects.common.DontUntapInControllersUntapStepTargetEffect;
|
||||
import mage.abilities.effects.common.LoseLifeTargetEffect;
|
||||
import mage.abilities.effects.common.TapTargetEffect;
|
||||
import mage.abilities.keyword.EquipAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -45,6 +44,8 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
|
@ -58,7 +59,7 @@ public class NekoTe extends CardImpl {
|
|||
// Whenever equipped creature deals damage to a creature, tap that creature. That creature doesn't untap during its controller's untap step for as long as Neko-Te remains on the battlefield.
|
||||
ContinuousRuleModifyingEffect skipUntapEffect = new DontUntapInControllersUntapStepTargetEffect(Duration.WhileOnBattlefield);
|
||||
skipUntapEffect.setText("That creature doesn't untap during its controller's untap step for as long as {this} remains on the battlefield");
|
||||
ConditionalContinuousRuleModifyingEffect effect = new ConditionalContinuousRuleModifyingEffect(skipUntapEffect, new SourceOnBattlefieldCondition());
|
||||
ConditionalContinuousRuleModifyingEffect effect = new ConditionalContinuousRuleModifyingEffect(skipUntapEffect, SourceOnBattlefieldCondition.instance);
|
||||
Ability ability = new DealsDamageToACreatureAttachedTriggeredAbility(new TapTargetEffect("that creature"), false, "equipped creature", false, true);
|
||||
ability.addEffect(effect);
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
*/
|
||||
package mage.cards.n;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.PutCardIntoGraveFromAnywhereAllTriggeredAbility;
|
||||
import mage.abilities.condition.common.SuspendedCondition;
|
||||
|
@ -45,6 +44,8 @@ import mage.constants.Zone;
|
|||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterCard;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
|
@ -67,7 +68,7 @@ public class Nihilith extends CardImpl {
|
|||
this.addAbility(new ConditionalTriggeredAbility(
|
||||
new PutCardIntoGraveFromAnywhereAllTriggeredAbility(Zone.EXILED, new RemoveCounterSourceEffect(CounterType.TIME.createInstance()), true,
|
||||
new FilterCard(), TargetController.OPPONENT, SetTargetPointer.NONE),
|
||||
SuspendedCondition.getInstance(),
|
||||
SuspendedCondition.instance,
|
||||
"Whenever a card is put into an opponent's graveyard from anywhere, if {this} is suspended, you may remove a time counter from {this}."
|
||||
));
|
||||
|
||||
|
|
|
@ -132,7 +132,7 @@ class NissaSageAnimistToken extends Token {
|
|||
this.getToughness().modifyBaseValue(4);
|
||||
this.color.setGreen(true);
|
||||
this.getSubtype(null).add("Elemental");
|
||||
this.getCardType().add(CardType.CREATURE);
|
||||
this.addCardType(CardType.CREATURE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -160,7 +160,7 @@ class NissaSageAnimistMinusSevenEffect extends ContinuousEffectImpl {
|
|||
switch (layer) {
|
||||
case TypeChangingEffects_4:
|
||||
if (!permanent.isCreature()) {
|
||||
permanent.getCardType().add(CardType.CREATURE);
|
||||
permanent.addCardType(CardType.CREATURE);
|
||||
}
|
||||
if (!permanent.getSubtype(game).contains("Elemental")) {
|
||||
permanent.getSubtype(game).add("Elemental");
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
*/
|
||||
package mage.cards.n;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.common.ActivateIfConditionActivatedAbility;
|
||||
|
@ -41,6 +40,8 @@ import mage.constants.Zone;
|
|||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
|
@ -65,7 +66,7 @@ public class NorwoodPriestess extends CardImpl {
|
|||
Zone.BATTLEFIELD,
|
||||
new PutPermanentOnBattlefieldEffect(filter),
|
||||
new TapSourceCost(),
|
||||
MyTurnBeforeAttackersDeclaredCondition.getInstance()
|
||||
MyTurnBeforeAttackersDeclaredCondition.instance
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
@ -109,7 +109,7 @@ class OpalescenceEffect extends ContinuousEffectImpl {
|
|||
case TypeChangingEffects_4:
|
||||
if (sublayer == SubLayer.NA) {
|
||||
if (!permanent.isCreature()) {
|
||||
permanent.getCardType().add(CardType.CREATURE);
|
||||
permanent.addCardType(CardType.CREATURE);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -59,7 +59,7 @@ public class PangTongYoungPhoenix extends CardImpl {
|
|||
|
||||
// {tap}: Target creature gets +0/+2 until end of turn. Activate this ability only during your turn, before attackers are declared.
|
||||
Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD,
|
||||
new BoostTargetEffect(0, 2, Duration.EndOfTurn), new TapSourceCost(), MyTurnBeforeAttackersDeclaredCondition.getInstance());
|
||||
new BoostTargetEffect(0, 2, Duration.EndOfTurn), new TapSourceCost(), MyTurnBeforeAttackersDeclaredCondition.instance);
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
*/
|
||||
package mage.cards.p;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.CastOnlyDuringPhaseStepSourceAbility;
|
||||
import mage.abilities.common.delayed.AtTheBeginOfNextUpkeepDelayedTriggeredAbility;
|
||||
import mage.abilities.condition.common.BeforeBlockersAreDeclaredCondition;
|
||||
|
@ -41,6 +40,8 @@ import mage.constants.Duration;
|
|||
import mage.constants.TurnPhase;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
|
@ -51,7 +52,7 @@ public class Panic extends CardImpl {
|
|||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}");
|
||||
|
||||
// Cast Panic only during combat before blockers are declared.
|
||||
this.addAbility(new CastOnlyDuringPhaseStepSourceAbility(TurnPhase.COMBAT, BeforeBlockersAreDeclaredCondition.getInstance()));
|
||||
this.addAbility(new CastOnlyDuringPhaseStepSourceAbility(TurnPhase.COMBAT, BeforeBlockersAreDeclaredCondition.instance));
|
||||
|
||||
// Target creature can't block this turn.
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
*/
|
||||
package mage.cards.p;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
|
@ -43,17 +42,14 @@ import mage.abilities.keyword.SuspendAbility;
|
|||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.ColoredManaSymbol;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
|
@ -76,7 +72,7 @@ public class PardicDragon extends CardImpl {
|
|||
// Whenever an opponent casts a spell, if Pardic Dragon is suspended, that player may put a time counter on Pardic Dragon.
|
||||
this.addAbility(new ConditionalTriggeredAbility(
|
||||
new SpellCastOpponentTriggeredAbility(Zone.EXILED, new PardicDragonEffect(), new FilterSpell(), false, SetTargetPointer.PLAYER),
|
||||
SuspendedCondition.getInstance(),
|
||||
SuspendedCondition.instance,
|
||||
"Whenever an opponent casts a spell, if {this} is suspended, that player may put a time counter on {this}."
|
||||
));
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ public class PhyrexianMetamorph extends CardImpl {
|
|||
@Override
|
||||
public boolean apply(Game game, MageObject mageObject) {
|
||||
if (!mageObject.isArtifact()) {
|
||||
mageObject.getCardType().add(CardType.ARTIFACT);
|
||||
mageObject.addCardType(CardType.ARTIFACT);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
*/
|
||||
package mage.cards.r;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
|
@ -45,6 +44,8 @@ import mage.filter.common.FilterCreaturePermanent;
|
|||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Plopman
|
||||
|
@ -70,12 +71,12 @@ public class RakshaGoldenCub extends CardImpl {
|
|||
// As long as Raksha Golden Cub is equipped, Cat creatures you control get +2/+2 and have double strike.
|
||||
Effect effect1 = new ConditionalContinuousEffect(
|
||||
new BoostAllEffect(2, 2, Duration.WhileOnBattlefield, filter, false),
|
||||
EquippedSourceCondition.getInstance(),
|
||||
EquippedSourceCondition.instance,
|
||||
"As long as {this} is equipped, Cat creatures you control get +2/+2");
|
||||
|
||||
Effect effect2 = new ConditionalContinuousEffect(
|
||||
new GainAbilityAllEffect(DoubleStrikeAbility.getInstance(), Duration.WhileOnBattlefield, filter, false),
|
||||
EquippedSourceCondition.getInstance(),
|
||||
EquippedSourceCondition.instance,
|
||||
"As long as {this} is equipped, Cat creatures you control have double strike");
|
||||
effect2.setText("and have double strike");
|
||||
|
||||
|
|
|
@ -27,16 +27,17 @@
|
|||
*/
|
||||
package mage.cards.r;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.abilities.condition.common.LandfallCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.effects.common.GainLifeTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.target.TargetPlayer;
|
||||
import mage.watchers.common.LandfallWatcher;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Loki
|
||||
|
@ -49,7 +50,7 @@ public class RestForTheWeary extends CardImpl {
|
|||
// Target player gains 4 life.
|
||||
// Landfall - If you had a land enter the battlefield under your control this turn, that player gains 8 life instead.
|
||||
this.getSpellAbility().addWatcher(new LandfallWatcher());
|
||||
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new GainLifeTargetEffect(8), new GainLifeTargetEffect(4), LandfallCondition.getInstance(), "Target player gains 4 life. <br/>Landfall - If you had a land enter the battlefield under your control this turn, that player gains 8 life instead"));
|
||||
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new GainLifeTargetEffect(8), new GainLifeTargetEffect(4), LandfallCondition.instance, "Target player gains 4 life. <br/>Landfall - If you had a land enter the battlefield under your control this turn, that player gains 8 life instead"));
|
||||
this.getSpellAbility().addTarget(new TargetPlayer());
|
||||
}
|
||||
|
||||
|
|
|
@ -27,9 +27,6 @@
|
|||
*/
|
||||
package mage.cards.r;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.Mana;
|
||||
import mage.abilities.condition.common.LandfallCondition;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
|
@ -38,8 +35,12 @@ import mage.abilities.effects.common.BasicManaEffect;
|
|||
import mage.abilities.mana.ConditionalManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.watchers.common.LandfallWatcher;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
|
@ -53,7 +54,7 @@ public class RiverOfTears extends CardImpl {
|
|||
this.addAbility(new ConditionalManaAbility(Zone.BATTLEFIELD, new ConditionalManaEffect(
|
||||
new BasicManaEffect(Mana.BlackMana(1)),
|
||||
new BasicManaEffect(Mana.BlueMana(1)),
|
||||
LandfallCondition.getInstance(),
|
||||
LandfallCondition.instance,
|
||||
"Add {U} to your mana pool. If you played a land this turn, add {B} to your mana pool instead"),
|
||||
new TapSourceCost()),
|
||||
new LandfallWatcher());
|
||||
|
|
|
@ -27,17 +27,18 @@
|
|||
*/
|
||||
package mage.cards.r;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.TenOrLessLifeCondition;
|
||||
import mage.abilities.condition.common.XorLessLifeCondition;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -56,7 +57,7 @@ public class RuthlessCullblade extends CardImpl {
|
|||
// Ruthless Cullblade gets +2/+1 as long as an opponent has 10 or less life.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new ConditionalContinuousEffect(new BoostSourceEffect(2, 1, Duration.WhileOnBattlefield),
|
||||
new TenOrLessLifeCondition(TenOrLessLifeCondition.CheckType.AN_OPPONENT),
|
||||
new XorLessLifeCondition(XorLessLifeCondition.CheckType.AN_OPPONENT, 10),
|
||||
"{this} gets +2/+1 as long as an opponent has 10 or less life.")));
|
||||
}
|
||||
|
||||
|
|
|
@ -118,7 +118,7 @@ class SarkhanTheDragonspeakerEffect extends ContinuousEffectImpl {
|
|||
case TypeChangingEffects_4:
|
||||
if (sublayer == SubLayer.NA) {
|
||||
permanent.getCardType().clear();
|
||||
permanent.getCardType().add(CardType.CREATURE);
|
||||
permanent.addCardType(CardType.CREATURE);
|
||||
permanent.getSubtype(game).clear();
|
||||
permanent.getSubtype(game).add("Dragon");
|
||||
permanent.getSuperType().clear();
|
||||
|
|
|
@ -27,10 +27,9 @@
|
|||
*/
|
||||
package mage.cards.s;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbility;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.XorLessLifeCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.effects.common.SacrificeSourceEffect;
|
||||
import mage.abilities.effects.common.turn.AddExtraTurnControllerEffect;
|
||||
|
@ -39,7 +38,6 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -56,7 +54,7 @@ public class SecondChance extends CardImpl {
|
|||
// At the beginning of your upkeep, if you have 5 or less life, sacrifice Second Chance and take an extra turn after this one.
|
||||
TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new SacrificeSourceEffect(), TargetController.YOU, false);
|
||||
ability.addEffect(new AddExtraTurnControllerEffect());
|
||||
this.addAbility(new ConditionalTriggeredAbility(ability, new FiveOrLessLifeCondition(), "At the beginning of your upkeep, if you have 5 or less life, sacrifice {this} and take an extra turn after this one"));
|
||||
this.addAbility(new ConditionalTriggeredAbility(ability, new XorLessLifeCondition(XorLessLifeCondition.CheckType.CONTROLLER, 5), "At the beginning of your upkeep, if you have 5 or less life, sacrifice {this} and take an extra turn after this one"));
|
||||
|
||||
}
|
||||
|
||||
|
@ -69,11 +67,5 @@ public class SecondChance extends CardImpl {
|
|||
return new SecondChance(this);
|
||||
}
|
||||
|
||||
static class FiveOrLessLifeCondition implements Condition {
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return game.getPlayer(source.getControllerId()).getLife() <= 5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
*/
|
||||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.ActivateIfConditionActivatedAbility;
|
||||
|
@ -39,6 +38,8 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
|
@ -53,7 +54,7 @@ public class ShuFarmer extends CardImpl {
|
|||
|
||||
// {tap}: You gain 1 life. Activate this ability only during your turn, before attackers are declared.
|
||||
Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD,
|
||||
new GainLifeEffect(1), new TapSourceCost(), MyTurnBeforeAttackersDeclaredCondition.getInstance());
|
||||
new GainLifeEffect(1), new TapSourceCost(), MyTurnBeforeAttackersDeclaredCondition.instance);
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
*/
|
||||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.DamageAsThoughNotBlockedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
|
@ -41,6 +40,8 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
|
@ -62,7 +63,7 @@ public class SiegeBehemoth extends CardImpl {
|
|||
Zone.BATTLEFIELD,
|
||||
new ConditionalContinuousEffect(
|
||||
new GainAbilityControlledEffect(DamageAsThoughNotBlockedAbility.getInstance(), Duration.WhileOnBattlefield),
|
||||
SourceAttackingCondition.getInstance(),
|
||||
SourceAttackingCondition.instance,
|
||||
"As long as {this} is attacking, for each creature you control, you may have that creature assign its combat damage as though it weren't blocked"
|
||||
)));
|
||||
}
|
||||
|
|
|
@ -29,22 +29,23 @@ package mage.cards.s;
|
|||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.continuous.BecomesCreatureIfVehicleEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.constants.AttachmentType;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -95,35 +96,5 @@ public class SiegeModification extends CardImpl {
|
|||
return new SiegeModification(this);
|
||||
}
|
||||
|
||||
private static class BecomesCreatureIfVehicleEffect extends ContinuousEffectImpl {
|
||||
|
||||
private CardType addedType = CardType.CREATURE;
|
||||
|
||||
public BecomesCreatureIfVehicleEffect() {
|
||||
super(Duration.WhileOnBattlefield, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Benefit);
|
||||
this.staticText = "As long as enchanted permanent is a Vehicle, it's a creature in addition to its other types";
|
||||
}
|
||||
|
||||
public BecomesCreatureIfVehicleEffect(final BecomesCreatureIfVehicleEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent aura = game.getPermanent(source.getSourceId());
|
||||
if (aura != null && aura.getAttachedTo() != null) {
|
||||
Permanent enchanted = game.getPermanent(aura.getAttachedTo());
|
||||
if (enchanted != null && enchanted.getSubtype(game).contains("Vehicle")) {
|
||||
enchanted.getCardType().add(addedType);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BecomesCreatureIfVehicleEffect copy() {
|
||||
return new BecomesCreatureIfVehicleEffect(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
*/
|
||||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.EquippedSourceCondition;
|
||||
|
@ -41,6 +40,8 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Derpthemeus
|
||||
|
@ -58,9 +59,9 @@ public class SkyhunterCub extends CardImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
// As long as Skyhunter Cub is equipped, it gets +1/+1 and has flying.
|
||||
ConditionalContinuousEffect effect1 = new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), EquippedSourceCondition.getInstance(), rule1);
|
||||
ConditionalContinuousEffect effect1 = new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), EquippedSourceCondition.instance, rule1);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect1));
|
||||
ConditionalContinuousEffect effect2 = new ConditionalContinuousEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance()), EquippedSourceCondition.getInstance(), rule2);
|
||||
ConditionalContinuousEffect effect2 = new ConditionalContinuousEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance()), EquippedSourceCondition.instance, rule2);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect2));
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
*/
|
||||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
|
@ -43,6 +42,8 @@ import mage.constants.TargetController;
|
|||
import mage.constants.Zone;
|
||||
import mage.game.permanent.token.DragonToken2;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
|
@ -64,7 +65,7 @@ public class SkylineDespot extends CardImpl {
|
|||
// At the beginning of your upkeep, if you're the monarch, put a 5/5 red Dragon creature token with flying onto the battlefield.
|
||||
this.addAbility(new ConditionalTriggeredAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD,
|
||||
new CreateTokenEffect(new DragonToken2()),
|
||||
TargetController.YOU, false), MonarchIsSourceControllerCondition.getInstance(),
|
||||
TargetController.YOU, false), MonarchIsSourceControllerCondition.instance,
|
||||
"At the beginning of your upkeep, if you're the monarch, put a 5/5 red Dragon creature token with flying onto the battlefield."));
|
||||
|
||||
}
|
||||
|
|
|
@ -98,7 +98,7 @@ public class SlumberingTora extends CardImpl {
|
|||
switch (layer) {
|
||||
case TypeChangingEffects_4:
|
||||
if (sublayer == SubLayer.NA) {
|
||||
permanent.getCardType().add(CardType.CREATURE);
|
||||
permanent.addCardType(CardType.CREATURE);
|
||||
permanent.getSubtype(game).add("Cat");
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
*/
|
||||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.SourceAttackingCondition;
|
||||
|
@ -40,6 +39,8 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
|
@ -57,7 +58,7 @@ public class SoltariLancer extends CardImpl {
|
|||
this.addAbility(ShadowAbility.getInstance());
|
||||
|
||||
// Soltari Lancer has first strike as long as it's attacking.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance()), SourceAttackingCondition.getInstance(), "{this} has first strike as long as it's attacking")));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance()), SourceAttackingCondition.instance, "{this} has first strike as long as it's attacking")));
|
||||
}
|
||||
|
||||
public SoltariLancer(final SoltariLancer card) {
|
||||
|
|
|
@ -119,7 +119,7 @@ class BecomesColorlessForestLandEffect extends ContinuousEffectImpl {
|
|||
break;
|
||||
case TypeChangingEffects_4:
|
||||
permanent.getCardType().clear();
|
||||
permanent.getCardType().add(CardType.LAND);
|
||||
permanent.addCardType(CardType.LAND);
|
||||
permanent.getSubtype(game).clear();
|
||||
permanent.getSubtype(game).add("Forest");
|
||||
break;
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
*/
|
||||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
|
@ -44,6 +43,8 @@ import mage.constants.Outcome;
|
|||
import mage.game.Game;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Loki
|
||||
|
@ -65,7 +66,7 @@ public class SowerOfTemptation extends CardImpl {
|
|||
// remains on the battlefield, even if a different player gains control of Sower of Temptation itself.
|
||||
ConditionalContinuousEffect effect = new ConditionalContinuousEffect(
|
||||
new GainControlTargetEffect(Duration.Custom, true),
|
||||
new SourceOnBattlefieldCondition(),
|
||||
SourceOnBattlefieldCondition.instance,
|
||||
"gain control of target creature for as long as {this} remains on the battlefield");
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(effect, false);
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
|
@ -103,7 +104,7 @@ class SowerOfTemptationGainControlEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
ConditionalContinuousEffect effect = new ConditionalContinuousEffect(
|
||||
new GainControlTargetEffect(Duration.Custom),
|
||||
new SourceOnBattlefieldCondition(),
|
||||
SourceOnBattlefieldCondition.instance,
|
||||
"gain control of target creature for as long as {this} remains on the battlefield");
|
||||
game.addEffect(effect, source);
|
||||
return false;
|
||||
|
|
|
@ -27,11 +27,8 @@
|
|||
*/
|
||||
package mage.cards.s;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.CountType;
|
||||
import mage.abilities.common.ActivateIfConditionActivatedAbility;
|
||||
import mage.abilities.condition.IntCompareCondition;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
|
@ -50,14 +47,18 @@ import mage.game.events.GameEvent;
|
|||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.watchers.Watcher;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author emerald000
|
||||
*/
|
||||
public class SpinerockKnoll extends CardImpl {
|
||||
|
||||
public SpinerockKnoll(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.LAND},"");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
|
||||
|
||||
// Hideaway
|
||||
this.addAbility(new HideawayAbility());
|
||||
|
@ -88,7 +89,7 @@ public class SpinerockKnoll extends CardImpl {
|
|||
class SpinerockKnollCondition extends IntCompareCondition {
|
||||
|
||||
SpinerockKnollCondition() {
|
||||
super(ComparisonType.GreaterThan, 6);
|
||||
super(CountType.MORE_THAN, 6);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -96,7 +97,7 @@ class SpinerockKnollCondition extends IntCompareCondition {
|
|||
int maxDamageReceived = 0;
|
||||
SpinerockKnollWatcher watcher = (SpinerockKnollWatcher) game.getState().getWatchers().get("SpinerockKnollWatcher", source.getSourceId());
|
||||
if (watcher != null) {
|
||||
for (UUID opponentId: game.getOpponents(source.getControllerId())) {
|
||||
for (UUID opponentId : game.getOpponents(source.getControllerId())) {
|
||||
int damageReceived = watcher.getDamageReceived(opponentId);
|
||||
if (damageReceived > maxDamageReceived) {
|
||||
maxDamageReceived = damageReceived;
|
||||
|
@ -132,23 +133,15 @@ class SpinerockKnollWatcher extends Watcher {
|
|||
if (event.getType() == EventType.DAMAGED_PLAYER) {
|
||||
UUID playerId = event.getPlayerId();
|
||||
if (playerId != null) {
|
||||
Integer amount = amountOfDamageReceivedThisTurn.get(playerId);
|
||||
if (amount == null) {
|
||||
amount = event.getAmount();
|
||||
} else {
|
||||
Integer amount = amountOfDamageReceivedThisTurn.getOrDefault(playerId, 0);
|
||||
amount += event.getAmount();
|
||||
}
|
||||
amountOfDamageReceivedThisTurn.put(playerId, amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int getDamageReceived(UUID playerId) {
|
||||
Integer amount = amountOfDamageReceivedThisTurn.get(playerId);
|
||||
if (amount != null) {
|
||||
return amount;
|
||||
}
|
||||
return 0;
|
||||
return amountOfDamageReceivedThisTurn.getOrDefault(playerId, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -70,7 +70,7 @@ public class SpiritOfTheNight extends CardImpl {
|
|||
this.addAbility(ProtectionAbility.from(ObjectColor.BLACK));
|
||||
|
||||
// Spirit of the Night has first strike as long as it's attacking.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance()), SourceAttackingCondition.getInstance(), "{this} has first strike as long as it's attacking")));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance()), SourceAttackingCondition.instance, "{this} has first strike as long as it's attacking")));
|
||||
}
|
||||
|
||||
public SpiritOfTheNight(final SpiritOfTheNight card) {
|
||||
|
|
|
@ -133,7 +133,7 @@ class StarfieldOfNyxEffect extends ContinuousEffectImpl {
|
|||
case TypeChangingEffects_4:
|
||||
if (sublayer == SubLayer.NA) {
|
||||
if (!permanent.isCreature()) {
|
||||
permanent.getCardType().add(CardType.CREATURE);
|
||||
permanent.addCardType(CardType.CREATURE);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -91,8 +91,8 @@ class StartYourEnginesEffect extends ContinuousEffectImpl {
|
|||
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(source.getControllerId())) {
|
||||
if (permanent != null && permanent.getSubtype(game).contains("Vehicle")) {
|
||||
if (sublayer == SubLayer.NA) {
|
||||
permanent.getCardType().add(CardType.ARTIFACT);
|
||||
permanent.getCardType().add(CardType.CREATURE);// TODO: Chcek if giving CREATURE Type is correct
|
||||
permanent.addCardType(CardType.ARTIFACT);
|
||||
permanent.addCardType(CardType.CREATURE);// TODO: Chcek if giving CREATURE Type is correct
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
*/
|
||||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.ActivateIfConditionActivatedAbility;
|
||||
|
@ -42,6 +41,8 @@ import mage.filter.common.FilterCreaturePermanent;
|
|||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
|
@ -63,7 +64,7 @@ public class SteamCatapult extends CardImpl {
|
|||
|
||||
// {tap}: Destroy target tapped creature. Activate this ability only during your turn, before attackers are declared.
|
||||
Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD,
|
||||
new DestroyTargetEffect(), new TapSourceCost(), MyTurnBeforeAttackersDeclaredCondition.getInstance());
|
||||
new DestroyTargetEffect(), new TapSourceCost(), MyTurnBeforeAttackersDeclaredCondition.instance);
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
*/
|
||||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.ActivateIfConditionActivatedAbility;
|
||||
|
@ -41,6 +40,8 @@ import mage.constants.Duration;
|
|||
import mage.constants.Zone;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
|
@ -56,7 +57,7 @@ public class SternMarshal extends CardImpl {
|
|||
|
||||
// {tap}: Target creature gets +2/+2 until end of turn. Activate this ability only during your turn, before attackers are declared.
|
||||
Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD,
|
||||
new BoostTargetEffect(2, 2, Duration.EndOfTurn), new TapSourceCost(), MyTurnBeforeAttackersDeclaredCondition.getInstance());
|
||||
new BoostTargetEffect(2, 2, Duration.EndOfTurn), new TapSourceCost(), MyTurnBeforeAttackersDeclaredCondition.instance);
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
*/
|
||||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
|
@ -45,6 +44,8 @@ import mage.filter.predicate.mageobject.ColorPredicate;
|
|||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
|
@ -67,7 +68,7 @@ public class StoneCatapult extends CardImpl {
|
|||
|
||||
// {tap}: Destroy target tapped nonblack creature. Activate this ability only during your turn, before attackers are declared.
|
||||
Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD,
|
||||
new DestroyTargetEffect(), new TapSourceCost(), MyTurnBeforeAttackersDeclaredCondition.getInstance());
|
||||
new DestroyTargetEffect(), new TapSourceCost(), MyTurnBeforeAttackersDeclaredCondition.instance);
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
*/
|
||||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
|
@ -41,6 +40,8 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author nantuko
|
||||
|
@ -57,10 +58,10 @@ public class SunspearShikari extends CardImpl {
|
|||
|
||||
// As long as Sunspear Shikari is equipped, it has first strike and lifelink.
|
||||
ConditionalContinuousEffect effect1 = new ConditionalContinuousEffect(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance()),
|
||||
EquippedSourceCondition.getInstance(), "As long as {this} is equipped, it has first strike");
|
||||
EquippedSourceCondition.instance, "As long as {this} is equipped, it has first strike");
|
||||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect1);
|
||||
ConditionalContinuousEffect effect2 = new ConditionalContinuousEffect(new GainAbilitySourceEffect(LifelinkAbility.getInstance()),
|
||||
EquippedSourceCondition.getInstance(), "and lifelink");
|
||||
EquippedSourceCondition.instance, "and lifelink");
|
||||
ability.addEffect(effect2);
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -121,7 +121,7 @@ class SydriGalvanicGeniusEffect extends ContinuousEffectImpl {
|
|||
case TypeChangingEffects_4:
|
||||
if (sublayer == SubLayer.NA) {
|
||||
if (!artifact.isCreature()) {
|
||||
artifact.getCardType().add(CardType.CREATURE);
|
||||
artifact.addCardType(CardType.CREATURE);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue