forked from External/mage
[SOI] refactor some TDFCs
This commit is contained in:
parent
94b71e4c67
commit
668e2bfe22
14 changed files with 126 additions and 196 deletions
|
|
@ -23,6 +23,8 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public final class AccursedWitch extends CardImpl {
|
public final class AccursedWitch extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterCard filter = new FilterCard("spells");
|
||||||
|
|
||||||
public AccursedWitch(UUID ownerId, CardSetInfo setInfo) {
|
public AccursedWitch(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}");
|
||||||
this.subtype.add(SubType.HUMAN);
|
this.subtype.add(SubType.HUMAN);
|
||||||
|
|
@ -34,7 +36,7 @@ public final class AccursedWitch extends CardImpl {
|
||||||
|
|
||||||
// Spells your opponents cast that target Accursed Witch cost {1} less to cast.
|
// Spells your opponents cast that target Accursed Witch cost {1} less to cast.
|
||||||
this.addAbility(new SimpleStaticAbility(
|
this.addAbility(new SimpleStaticAbility(
|
||||||
new SpellsCostModificationThatTargetSourceEffect(-1, new FilterCard("Spells"), TargetController.OPPONENT))
|
new SpellsCostModificationThatTargetSourceEffect(-1, filter, TargetController.OPPONENT))
|
||||||
);
|
);
|
||||||
|
|
||||||
// When Accursed Witch dies, return it to the battlefield transformed under your control attached to target opponent.
|
// When Accursed Witch dies, return it to the battlefield transformed under your control attached to target opponent.
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,7 @@
|
||||||
|
|
||||||
package mage.cards.a;
|
package mage.cards.a;
|
||||||
|
|
||||||
import java.util.UUID;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.LoyaltyAbility;
|
import mage.abilities.LoyaltyAbility;
|
||||||
import mage.abilities.effects.Effect;
|
|
||||||
import mage.abilities.effects.common.DamageTargetEffect;
|
import mage.abilities.effects.common.DamageTargetEffect;
|
||||||
import mage.abilities.effects.common.GetEmblemEffect;
|
import mage.abilities.effects.common.GetEmblemEffect;
|
||||||
import mage.abilities.effects.common.TransformSourceEffect;
|
import mage.abilities.effects.common.TransformSourceEffect;
|
||||||
|
|
@ -21,8 +19,9 @@ import mage.filter.StaticFilters;
|
||||||
import mage.game.command.emblems.ArlinnEmbracedByTheMoonEmblem;
|
import mage.game.command.emblems.ArlinnEmbracedByTheMoonEmblem;
|
||||||
import mage.target.common.TargetAnyTarget;
|
import mage.target.common.TargetAnyTarget;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author fireshoes
|
* @author fireshoes
|
||||||
*/
|
*/
|
||||||
public final class ArlinnEmbracedByTheMoon extends CardImpl {
|
public final class ArlinnEmbracedByTheMoon extends CardImpl {
|
||||||
|
|
@ -37,12 +36,14 @@ public final class ArlinnEmbracedByTheMoon extends CardImpl {
|
||||||
this.nightCard = true;
|
this.nightCard = true;
|
||||||
|
|
||||||
// +1: Creatures you control get +1/+1 and gain trample until end of turn.
|
// +1: Creatures you control get +1/+1 and gain trample until end of turn.
|
||||||
Effect effect = new BoostControlledEffect(1, 1, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURE);
|
Ability ability = new LoyaltyAbility(new BoostControlledEffect(
|
||||||
effect.setText("Creatures you control get +1/+1");
|
1, 1, Duration.EndOfTurn,
|
||||||
LoyaltyAbility ability = new LoyaltyAbility(effect, 1);
|
StaticFilters.FILTER_PERMANENT_CREATURE
|
||||||
effect = new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURE);
|
).setText("Creatures you control get +1/+1"), 1);
|
||||||
effect.setText("and gain trample until end of turn");
|
ability.addEffect(new GainAbilityControlledEffect(
|
||||||
ability.addEffect(effect);
|
TrampleAbility.getInstance(), Duration.EndOfTurn,
|
||||||
|
StaticFilters.FILTER_PERMANENT_CREATURE
|
||||||
|
).setText("and gain trample until end of turn"));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
// -1: Arlinn, Embraced by the Moon deals 3 damage to any target. Transform Arlinn, Embraced by the Moon.
|
// -1: Arlinn, Embraced by the Moon deals 3 damage to any target. Transform Arlinn, Embraced by the Moon.
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,7 @@
|
||||||
|
|
||||||
package mage.cards.a;
|
package mage.cards.a;
|
||||||
|
|
||||||
import java.util.UUID;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.LoyaltyAbility;
|
import mage.abilities.LoyaltyAbility;
|
||||||
import mage.abilities.effects.Effect;
|
|
||||||
import mage.abilities.effects.common.CreateTokenEffect;
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
import mage.abilities.effects.common.TransformSourceEffect;
|
import mage.abilities.effects.common.TransformSourceEffect;
|
||||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||||
|
|
@ -20,14 +18,15 @@ import mage.constants.SuperType;
|
||||||
import mage.game.permanent.token.WolfToken;
|
import mage.game.permanent.token.WolfToken;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author fireshoes
|
* @author fireshoes
|
||||||
*/
|
*/
|
||||||
public final class ArlinnKord extends CardImpl {
|
public final class ArlinnKord extends CardImpl {
|
||||||
|
|
||||||
public ArlinnKord(UUID ownerId, CardSetInfo setInfo) {
|
public ArlinnKord(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{2}{R}{G}");
|
super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{2}{R}{G}");
|
||||||
this.supertype.add(SuperType.LEGENDARY);
|
this.supertype.add(SuperType.LEGENDARY);
|
||||||
this.subtype.add(SubType.ARLINN);
|
this.subtype.add(SubType.ARLINN);
|
||||||
|
|
||||||
|
|
@ -36,15 +35,15 @@ public final class ArlinnKord extends CardImpl {
|
||||||
this.setStartingLoyalty(3);
|
this.setStartingLoyalty(3);
|
||||||
|
|
||||||
// +1: Until end of turn, up to one target creature gets +2/+2 and gains vigilance and haste.
|
// +1: Until end of turn, up to one target creature gets +2/+2 and gains vigilance and haste.
|
||||||
Effect effect = new BoostTargetEffect(2, 2, Duration.EndOfTurn);
|
Ability ability = new LoyaltyAbility(new BoostTargetEffect(
|
||||||
effect.setText("Until end of turn, up to one target creature gets +2/+2");
|
2, 2, Duration.EndOfTurn
|
||||||
LoyaltyAbility ability = new LoyaltyAbility(effect, 1);
|
).setText("until end of turn, up to one target creature gets +2/+2"), 1);
|
||||||
effect = new GainAbilityTargetEffect(VigilanceAbility.getInstance(), Duration.EndOfTurn);
|
ability.addEffect(new GainAbilityTargetEffect(
|
||||||
effect.setText("and gains vigilance");
|
VigilanceAbility.getInstance(), Duration.EndOfTurn
|
||||||
ability.addEffect(effect);
|
).setText("and gains vigilance"));
|
||||||
effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn);
|
ability.addEffect(new GainAbilityTargetEffect(
|
||||||
effect.setText("and haste");
|
HasteAbility.getInstance(), Duration.EndOfTurn
|
||||||
ability.addEffect(effect);
|
).setText("and haste"));
|
||||||
ability.addTarget(new TargetCreaturePermanent(0, 1));
|
ability.addTarget(new TargetCreaturePermanent(0, 1));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,44 +1,40 @@
|
||||||
|
|
||||||
package mage.cards.a;
|
package mage.cards.a;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.costs.mana.GenericManaCost;
|
|
||||||
import mage.abilities.effects.Effect;
|
|
||||||
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
||||||
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||||
import mage.abilities.keyword.EquipAbility;
|
import mage.abilities.keyword.EquipAbility;
|
||||||
import mage.abilities.keyword.FirstStrikeAbility;
|
import mage.abilities.keyword.FirstStrikeAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.*;
|
import mage.constants.AttachmentType;
|
||||||
import mage.target.common.TargetControlledCreaturePermanent;
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author fireshoes
|
* @author fireshoes
|
||||||
*/
|
*/
|
||||||
public final class AshmouthBlade extends CardImpl {
|
public final class AshmouthBlade extends CardImpl {
|
||||||
|
|
||||||
public AshmouthBlade(UUID ownerId, CardSetInfo setInfo) {
|
public AshmouthBlade(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"");
|
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "");
|
||||||
this.subtype.add(SubType.EQUIPMENT);
|
this.subtype.add(SubType.EQUIPMENT);
|
||||||
|
|
||||||
// this card is the second face of double-faced card
|
// this card is the second face of double-faced card
|
||||||
this.nightCard = true;
|
this.nightCard = true;
|
||||||
|
|
||||||
// Equipped creature gets +3/+3
|
// Equipped creature gets +3/+3 and has first strike.
|
||||||
Ability ability = new SimpleStaticAbility(new BoostEquippedEffect(3, 3));
|
Ability ability = new SimpleStaticAbility(new BoostEquippedEffect(3, 3));
|
||||||
|
ability.addEffect(new GainAbilityAttachedEffect(
|
||||||
|
FirstStrikeAbility.getInstance(), AttachmentType.EQUIPMENT
|
||||||
|
).setText("and has first strike"));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
// and has first strike.
|
|
||||||
Effect effect = new GainAbilityAttachedEffect(FirstStrikeAbility.getInstance(), AttachmentType.EQUIPMENT);
|
|
||||||
effect.setText("and has first strike");
|
|
||||||
ability.addEffect(effect);
|
|
||||||
|
|
||||||
// Equip {3}
|
// Equip {3}
|
||||||
this.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(3), new TargetControlledCreaturePermanent(), false));
|
this.addAbility(new EquipAbility(3, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
private AshmouthBlade(final AshmouthBlade card) {
|
private AshmouthBlade(final AshmouthBlade card) {
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,21 @@
|
||||||
package mage.cards.a;
|
package mage.cards.a;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
import mage.abilities.Ability;
|
|
||||||
import mage.abilities.dynamicvalue.common.CardTypesInGraveyardCount;
|
|
||||||
import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility;
|
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.condition.common.DeliriumCondition;
|
import mage.abilities.condition.common.DeliriumCondition;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.dynamicvalue.common.CardTypesInGraveyardCount;
|
||||||
import mage.abilities.effects.common.MillCardsControllerEffect;
|
import mage.abilities.effects.common.MillCardsControllerEffect;
|
||||||
import mage.abilities.effects.common.TransformSourceEffect;
|
import mage.abilities.effects.common.TransformSourceEffect;
|
||||||
import mage.abilities.keyword.TransformAbility;
|
import mage.abilities.keyword.TransformAbility;
|
||||||
|
import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.AbilityWord;
|
import mage.constants.AbilityWord;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
*/
|
*/
|
||||||
|
|
@ -31,10 +30,9 @@ public final class AutumnalGloom extends CardImpl {
|
||||||
|
|
||||||
// <i>Delirium</i> — At the beginning of your end step, if there are four or more card types among cards in your graveyard, transform Autumnal Gloom.
|
// <i>Delirium</i> — At the beginning of your end step, if there are four or more card types among cards in your graveyard, transform Autumnal Gloom.
|
||||||
this.addAbility(new TransformAbility());
|
this.addAbility(new TransformAbility());
|
||||||
Ability ability = new BeginningOfEndStepTriggeredAbility(TargetController.YOU, new TransformSourceEffect(), false, DeliriumCondition.instance);
|
this.addAbility(new BeginningOfEndStepTriggeredAbility(
|
||||||
ability.setAbilityWord(AbilityWord.DELIRIUM);
|
TargetController.YOU, new TransformSourceEffect(), false, DeliriumCondition.instance
|
||||||
ability.addHint(CardTypesInGraveyardCount.YOU.getHint());
|
).setAbilityWord(AbilityWord.DELIRIUM).addHint(CardTypesInGraveyardCount.YOU.getHint()));
|
||||||
this.addAbility(ability);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private AutumnalGloom(final AutumnalGloom card) {
|
private AutumnalGloom(final AutumnalGloom card) {
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,10 @@
|
||||||
|
|
||||||
package mage.cards.i;
|
package mage.cards.i;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.AttacksAndIsNotBlockedTriggeredAbility;
|
import mage.abilities.common.AttacksAndIsNotBlockedTriggeredAbility;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.abilities.effects.Effect;
|
|
||||||
import mage.abilities.effects.common.DoIfCostPaid;
|
import mage.abilities.effects.common.DoIfCostPaid;
|
||||||
import mage.abilities.effects.common.TransformSourceEffect;
|
import mage.abilities.effects.common.TransformSourceEffect;
|
||||||
import mage.abilities.effects.common.combat.CantBeBlockedSourceEffect;
|
import mage.abilities.effects.common.combat.CantBeBlockedSourceEffect;
|
||||||
|
|
@ -18,18 +15,18 @@ import mage.abilities.keyword.TransformAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.Zone;
|
import mage.constants.SubType;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author fireshoes
|
* @author fireshoes
|
||||||
*/
|
*/
|
||||||
public final class InsidiousMist extends CardImpl {
|
public final class InsidiousMist extends CardImpl {
|
||||||
|
|
||||||
public InsidiousMist(UUID ownerId, CardSetInfo setInfo) {
|
public InsidiousMist(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
|
||||||
this.subtype.add(SubType.ELEMENTAL);
|
this.subtype.add(SubType.ELEMENTAL);
|
||||||
this.power = new MageInt(0);
|
this.power = new MageInt(0);
|
||||||
this.toughness = new MageInt(1);
|
this.toughness = new MageInt(1);
|
||||||
|
|
@ -45,9 +42,7 @@ public final class InsidiousMist extends CardImpl {
|
||||||
|
|
||||||
// Insideous Mist can't block and can't be blocked.
|
// Insideous Mist can't block and can't be blocked.
|
||||||
Ability ability = new SimpleStaticAbility(new CantBlockSourceEffect(Duration.WhileOnBattlefield));
|
Ability ability = new SimpleStaticAbility(new CantBlockSourceEffect(Duration.WhileOnBattlefield));
|
||||||
Effect effect = new CantBeBlockedSourceEffect();
|
ability.addEffect(new CantBeBlockedSourceEffect().setText("and can't be blocked"));
|
||||||
effect.setText("and can't be blocked");
|
|
||||||
ability.addEffect(effect);
|
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
// Whenever Insideous Mist attacks and isn't blocked, you may pay {2}{B}. If you do, transform it.
|
// Whenever Insideous Mist attacks and isn't blocked, you may pay {2}{B}. If you do, transform it.
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,20 @@
|
||||||
package mage.cards.l;
|
package mage.cards.l;
|
||||||
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.common.WerewolfFrontTriggeredAbility;
|
import mage.abilities.common.WerewolfFrontTriggeredAbility;
|
||||||
import mage.abilities.effects.RestrictionEffect;
|
import mage.abilities.condition.Condition;
|
||||||
|
import mage.abilities.condition.InvertCondition;
|
||||||
|
import mage.abilities.condition.common.FerociousCondition;
|
||||||
|
import mage.abilities.decorator.ConditionalRestrictionEffect;
|
||||||
|
import mage.abilities.effects.common.combat.CantAttackSourceEffect;
|
||||||
|
import mage.abilities.hint.common.FerociousHint;
|
||||||
import mage.abilities.keyword.TransformAbility;
|
import mage.abilities.keyword.TransformAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.*;
|
import mage.constants.CardType;
|
||||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
import mage.constants.Duration;
|
||||||
import mage.filter.predicate.mageobject.PowerPredicate;
|
import mage.constants.SubType;
|
||||||
import mage.game.Game;
|
|
||||||
import mage.game.permanent.Permanent;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
|
@ -21,6 +23,8 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public final class LambholtPacifist extends CardImpl {
|
public final class LambholtPacifist extends CardImpl {
|
||||||
|
|
||||||
|
private static final Condition condition = new InvertCondition(FerociousCondition.instance);
|
||||||
|
|
||||||
public LambholtPacifist(UUID ownerId, CardSetInfo setInfo) {
|
public LambholtPacifist(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
|
||||||
this.subtype.add(SubType.HUMAN);
|
this.subtype.add(SubType.HUMAN);
|
||||||
|
|
@ -32,7 +36,10 @@ public final class LambholtPacifist extends CardImpl {
|
||||||
this.secondSideCardClazz = mage.cards.l.LambholtButcher.class;
|
this.secondSideCardClazz = mage.cards.l.LambholtButcher.class;
|
||||||
|
|
||||||
// Lambholt Pacifist can't attack unless you control a creature with power 4 or greater.
|
// Lambholt Pacifist can't attack unless you control a creature with power 4 or greater.
|
||||||
this.addAbility(new SimpleStaticAbility(new LambholtPacifistEffect()));
|
this.addAbility(new SimpleStaticAbility(new ConditionalRestrictionEffect(
|
||||||
|
new CantAttackSourceEffect(Duration.WhileOnBattlefield), condition,
|
||||||
|
"{this} can't attack unless you control a creature with power 4 or greater"
|
||||||
|
)).addHint(FerociousHint.instance));
|
||||||
|
|
||||||
// At the beginning of each upkeep, if no spells were cast last turn, transform Lambholt Pacifist.
|
// At the beginning of each upkeep, if no spells were cast last turn, transform Lambholt Pacifist.
|
||||||
this.addAbility(new TransformAbility());
|
this.addAbility(new TransformAbility());
|
||||||
|
|
@ -48,39 +55,3 @@ public final class LambholtPacifist extends CardImpl {
|
||||||
return new LambholtPacifist(this);
|
return new LambholtPacifist(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class LambholtPacifistEffect extends RestrictionEffect {
|
|
||||||
|
|
||||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("a creature with power 4 or greater");
|
|
||||||
|
|
||||||
static {
|
|
||||||
filter.add(new PowerPredicate(ComparisonType.MORE_THAN, 3));
|
|
||||||
}
|
|
||||||
|
|
||||||
public LambholtPacifistEffect() {
|
|
||||||
super(Duration.WhileOnBattlefield);
|
|
||||||
staticText = "{this} can't attack unless you control a creature with power 4 or greater";
|
|
||||||
}
|
|
||||||
|
|
||||||
private LambholtPacifistEffect(final LambholtPacifistEffect effect) {
|
|
||||||
super(effect);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public LambholtPacifistEffect copy() {
|
|
||||||
return new LambholtPacifistEffect(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean canAttack(Game game, boolean canUseChooseDialogs) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean applies(Permanent permanent, Ability source, Game game) {
|
|
||||||
if (permanent.getId().equals(source.getSourceId())) {
|
|
||||||
return game.getBattlefield().countAll(filter, source.getControllerId(), game) <= 0;
|
|
||||||
} // do not apply to other creatures.
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,7 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
|
||||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
@ -20,12 +18,6 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public final class LunarchInquisitors extends CardImpl {
|
public final class LunarchInquisitors extends CardImpl {
|
||||||
|
|
||||||
private static final FilterPermanent filter = new FilterCreaturePermanent("another target creature");
|
|
||||||
|
|
||||||
static {
|
|
||||||
filter.add(AnotherPredicate.instance);
|
|
||||||
}
|
|
||||||
|
|
||||||
public LunarchInquisitors(UUID ownerId, CardSetInfo setInfo) {
|
public LunarchInquisitors(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
|
||||||
this.subtype.add(SubType.HUMAN);
|
this.subtype.add(SubType.HUMAN);
|
||||||
|
|
@ -39,7 +31,7 @@ public final class LunarchInquisitors extends CardImpl {
|
||||||
|
|
||||||
// When this creature transforms into Lunarch Inquisitors, you may exile another target creature until Lunarch Inquisitors leaves the battlefield.
|
// When this creature transforms into Lunarch Inquisitors, you may exile another target creature until Lunarch Inquisitors leaves the battlefield.
|
||||||
Ability ability = new TransformIntoSourceTriggeredAbility(new ExileUntilSourceLeavesEffect(), true);
|
Ability ability = new TransformIntoSourceTriggeredAbility(new ExileUntilSourceLeavesEffect(), true);
|
||||||
ability.addTarget(new TargetPermanent(filter));
|
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@ package mage.cards.n;
|
||||||
|
|
||||||
import mage.abilities.TriggeredAbilityImpl;
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.costs.mana.GenericManaCost;
|
|
||||||
import mage.abilities.effects.common.TransformSourceEffect;
|
import mage.abilities.effects.common.TransformSourceEffect;
|
||||||
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
||||||
import mage.abilities.keyword.EquipAbility;
|
import mage.abilities.keyword.EquipAbility;
|
||||||
|
|
@ -10,13 +9,13 @@ import mage.abilities.keyword.TransformAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.target.common.TargetControlledCreaturePermanent;
|
import mage.game.permanent.Permanent;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -38,7 +37,7 @@ public final class NeglectedHeirloom extends CardImpl {
|
||||||
this.addAbility(new NeglectedHeirloomTriggeredAbility());
|
this.addAbility(new NeglectedHeirloomTriggeredAbility());
|
||||||
|
|
||||||
// Equip {1}
|
// Equip {1}
|
||||||
this.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(1), new TargetControlledCreaturePermanent(), false));
|
this.addAbility(new EquipAbility(1, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
private NeglectedHeirloom(final NeglectedHeirloom card) {
|
private NeglectedHeirloom(final NeglectedHeirloom card) {
|
||||||
|
|
@ -56,6 +55,7 @@ class NeglectedHeirloomTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
|
|
||||||
public NeglectedHeirloomTriggeredAbility() {
|
public NeglectedHeirloomTriggeredAbility() {
|
||||||
super(Zone.BATTLEFIELD, new TransformSourceEffect(), false);
|
super(Zone.BATTLEFIELD, new TransformSourceEffect(), false);
|
||||||
|
setTriggerPhrase("When equipped creature transforms, ");
|
||||||
}
|
}
|
||||||
|
|
||||||
private NeglectedHeirloomTriggeredAbility(final NeglectedHeirloomTriggeredAbility ability) {
|
private NeglectedHeirloomTriggeredAbility(final NeglectedHeirloomTriggeredAbility ability) {
|
||||||
|
|
@ -69,21 +69,15 @@ class NeglectedHeirloomTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
if (event.getType() == GameEvent.EventType.TRANSFORMED) {
|
return Optional
|
||||||
if (game.getPermanent(event.getTargetId()).getAttachments().contains(this.getSourceId())) {
|
.ofNullable(getSourcePermanentIfItStillExists(game))
|
||||||
return true;
|
.map(Permanent::getAttachedTo)
|
||||||
}
|
.filter(event.getTargetId()::equals)
|
||||||
}
|
.isPresent();
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public NeglectedHeirloomTriggeredAbility copy() {
|
public NeglectedHeirloomTriggeredAbility copy() {
|
||||||
return new NeglectedHeirloomTriggeredAbility(this);
|
return new NeglectedHeirloomTriggeredAbility(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getRule() {
|
|
||||||
return "When equipped creature transforms, transform {this}.";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,8 @@ import mage.MageInt;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.common.WerewolfFrontTriggeredAbility;
|
import mage.abilities.common.WerewolfFrontTriggeredAbility;
|
||||||
import mage.abilities.condition.common.TransformedCondition;
|
import mage.abilities.condition.common.NotTransformedCondition;
|
||||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||||
import mage.abilities.dynamicvalue.DynamicValue;
|
|
||||||
import mage.abilities.dynamicvalue.common.CardsInControllerHandCount;
|
import mage.abilities.dynamicvalue.common.CardsInControllerHandCount;
|
||||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||||
import mage.abilities.effects.common.continuous.SetBasePowerToughnessSourceEffect;
|
import mage.abilities.effects.common.continuous.SetBasePowerToughnessSourceEffect;
|
||||||
|
|
@ -35,10 +34,13 @@ public final class SageOfAncientLore extends CardImpl {
|
||||||
this.secondSideCardClazz = mage.cards.w.WerewolfOfAncientHunger.class;
|
this.secondSideCardClazz = mage.cards.w.WerewolfOfAncientHunger.class;
|
||||||
|
|
||||||
// Sage of Ancient Lore's power and toughness are each equal to the number of cards in your hand.
|
// Sage of Ancient Lore's power and toughness are each equal to the number of cards in your hand.
|
||||||
DynamicValue xValue = CardsInControllerHandCount.ANY;
|
this.addAbility(new SimpleStaticAbility(
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.ALL,
|
Zone.ALL,
|
||||||
new ConditionalContinuousEffect(new SetBasePowerToughnessSourceEffect(xValue),
|
new ConditionalContinuousEffect(
|
||||||
new TransformedCondition(true), "{this}'s power and toughness are each equal to the total number of cards in your hand")));
|
new SetBasePowerToughnessSourceEffect(CardsInControllerHandCount.ANY), NotTransformedCondition.instance,
|
||||||
|
"{this}'s power and toughness are each equal to the total number of cards in your hand"
|
||||||
|
)
|
||||||
|
));
|
||||||
|
|
||||||
// When Sage of Ancient Lore enters the battlefield, draw a card.
|
// When Sage of Ancient Lore enters the battlefield, draw a card.
|
||||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1), false));
|
this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1), false));
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
package mage.cards.s;
|
package mage.cards.s;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.condition.common.EquippedHasSubtypeCondition;
|
import mage.abilities.condition.common.EquippedHasSubtypeCondition;
|
||||||
import mage.abilities.costs.mana.GenericManaCost;
|
|
||||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||||
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
||||||
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||||
|
|
@ -13,17 +10,21 @@ import mage.abilities.keyword.EquipAbility;
|
||||||
import mage.abilities.keyword.MenaceAbility;
|
import mage.abilities.keyword.MenaceAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.*;
|
import mage.constants.AttachmentType;
|
||||||
import mage.target.common.TargetControlledCreaturePermanent;
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author fireshoes
|
* @author fireshoes
|
||||||
*/
|
*/
|
||||||
public final class ScroungedScythe extends CardImpl {
|
public final class ScroungedScythe extends CardImpl {
|
||||||
|
|
||||||
|
private static final Condition condition = new EquippedHasSubtypeCondition(SubType.HUMAN);
|
||||||
|
|
||||||
public ScroungedScythe(UUID ownerId, CardSetInfo setInfo) {
|
public ScroungedScythe(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"");
|
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "");
|
||||||
this.subtype.add(SubType.EQUIPMENT);
|
this.subtype.add(SubType.EQUIPMENT);
|
||||||
|
|
||||||
this.nightCard = true;
|
this.nightCard = true;
|
||||||
|
|
@ -32,15 +33,14 @@ public final class ScroungedScythe extends CardImpl {
|
||||||
this.addAbility(new SimpleStaticAbility(new BoostEquippedEffect(1, 1)));
|
this.addAbility(new SimpleStaticAbility(new BoostEquippedEffect(1, 1)));
|
||||||
|
|
||||||
// As long as equipped creature is a Human, it has menace.
|
// As long as equipped creature is a Human, it has menace.
|
||||||
this.addAbility(new SimpleStaticAbility(
|
this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect(
|
||||||
new ConditionalContinuousEffect(
|
new GainAbilityAttachedEffect(new MenaceAbility(false), AttachmentType.EQUIPMENT),
|
||||||
new GainAbilityAttachedEffect(new MenaceAbility(), AttachmentType.EQUIPMENT),
|
condition, "As long as equipped creature is a Human, it has menace. " +
|
||||||
new EquippedHasSubtypeCondition(SubType.HUMAN),
|
"<i>(It can't be blocked except by two or more creatures.)</i>"
|
||||||
"As long as equipped creature is a Human, it has menace. " +
|
)));
|
||||||
"<i>(It can't be blocked except by two or more creatures.)</i>")));
|
|
||||||
|
|
||||||
// Equip {2}
|
// Equip {2}
|
||||||
this.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(2), new TargetControlledCreaturePermanent(), false));
|
this.addAbility(new EquipAbility(2, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
private ScroungedScythe(final ScroungedScythe card) {
|
private ScroungedScythe(final ScroungedScythe card) {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ package mage.cards.w;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.common.WerewolfBackTriggeredAbility;
|
import mage.abilities.common.WerewolfBackTriggeredAbility;
|
||||||
import mage.abilities.condition.common.TransformedCondition;
|
import mage.abilities.condition.common.NotTransformedCondition;
|
||||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||||
import mage.abilities.dynamicvalue.common.CardsInAllHandsCount;
|
import mage.abilities.dynamicvalue.common.CardsInAllHandsCount;
|
||||||
import mage.abilities.effects.common.continuous.SetBasePowerToughnessSourceEffect;
|
import mage.abilities.effects.common.continuous.SetBasePowerToughnessSourceEffect;
|
||||||
|
|
@ -38,9 +38,13 @@ public final class WerewolfOfAncientHunger extends CardImpl {
|
||||||
this.addAbility(TrampleAbility.getInstance());
|
this.addAbility(TrampleAbility.getInstance());
|
||||||
|
|
||||||
// Werewolf of Ancient Hunger's power and toughness are each equal to the total number of cards in all players' hands.
|
// Werewolf of Ancient Hunger's power and toughness are each equal to the total number of cards in all players' hands.
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.ALL,
|
this.addAbility(new SimpleStaticAbility(
|
||||||
new ConditionalContinuousEffect(new SetBasePowerToughnessSourceEffect(CardsInAllHandsCount.instance),
|
Zone.ALL,
|
||||||
new TransformedCondition(false), "{this}'s power and toughness are each equal to the total number of cards in all players' hands")));
|
new ConditionalContinuousEffect(
|
||||||
|
new SetBasePowerToughnessSourceEffect(CardsInAllHandsCount.instance), NotTransformedCondition.instance,
|
||||||
|
"{this}'s power and toughness are each equal to the total number of cards in all players' hands"
|
||||||
|
)
|
||||||
|
));
|
||||||
|
|
||||||
// At the beginning of each upkeep, if a player cast two or more spells last turn, transform Werewolf of Ancient Hunger.
|
// At the beginning of each upkeep, if a player cast two or more spells last turn, transform Werewolf of Ancient Hunger.
|
||||||
this.addAbility(new WerewolfBackTriggeredAbility());
|
this.addAbility(new WerewolfBackTriggeredAbility());
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
package mage.abilities.condition.common;
|
||||||
|
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.condition.Condition;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author noxx
|
||||||
|
*/
|
||||||
|
public enum NotTransformedCondition implements Condition {
|
||||||
|
instance;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||||
|
return permanent != null && !permanent.isTransformed();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,43 +0,0 @@
|
||||||
|
|
||||||
package mage.abilities.condition.common;
|
|
||||||
|
|
||||||
import mage.abilities.Ability;
|
|
||||||
import mage.abilities.condition.Condition;
|
|
||||||
import mage.game.Game;
|
|
||||||
import mage.game.permanent.Permanent;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author noxx
|
|
||||||
*/
|
|
||||||
public class TransformedCondition implements Condition {
|
|
||||||
|
|
||||||
protected boolean notCondition;
|
|
||||||
|
|
||||||
public TransformedCondition() {
|
|
||||||
this(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The condition checks whether a permanent is transformed or not.
|
|
||||||
*
|
|
||||||
* @param notCondition if true the condition is true when the permanent is not transformed
|
|
||||||
* @return true if the condition is true, false if the condition is false
|
|
||||||
*/
|
|
||||||
public TransformedCondition(boolean notCondition) {
|
|
||||||
this.notCondition = notCondition;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean apply(Game game, Ability source) {
|
|
||||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
|
||||||
if (permanent != null) {
|
|
||||||
if (notCondition) {
|
|
||||||
return !permanent.isTransformed();
|
|
||||||
} else {
|
|
||||||
return permanent.isTransformed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue