[ACR] Implement 4x Equipment-related cards (#12593)

* Assassin Gauntlet

* Fix many minor mistakes in ACR cards

* Battlefield Improvisation

* Phantom Blade

* Misthios's Fury

* Fix unset target tag, missing damage amount text

* Remove now-unneeded setText calls for DamageTargetControllerEffect
This commit is contained in:
ssk97 2024-07-22 23:20:18 -07:00 committed by GitHub
parent 88443f5fb4
commit 3933364e6e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 318 additions and 61 deletions

View file

@ -0,0 +1,64 @@
package mage.cards.a;
import mage.abilities.Ability;
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.DrawDiscardControllerEffect;
import mage.abilities.effects.common.TapAllTargetPlayerControlsEffect;
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
import mage.abilities.keyword.EquipAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AttachmentType;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.common.TargetOpponent;
import mage.target.targetpointer.SecondTargetPointer;
import java.util.UUID;
/**
*
* @author notgreat
*/
public final class AssassinGauntlet extends CardImpl {
public AssassinGauntlet(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}{U}");
this.subtype.add(SubType.EQUIPMENT);
// When Assassin Gauntlet enters the battlefield, attach it to up to one target creature you control. Tap all creatures target opponent controls.
Ability ability = new EntersBattlefieldTriggeredAbility(new AttachEffect(Outcome.BoostCreature).setText("attach it to up to one target creature you control"));
ability.addTarget(new TargetControlledCreaturePermanent(0, 1));
ability.addEffect(new TapAllTargetPlayerControlsEffect(StaticFilters.FILTER_PERMANENT_CREATURES).setTargetPointer(new SecondTargetPointer()));
ability.addTarget(new TargetOpponent());
this.addAbility(ability);
// Equipped creature gets +1/+1 and has "Whenever this creature deals combat damage to a player, draw a card, then discard a card."
Ability boostAbility = new SimpleStaticAbility(new BoostEquippedEffect(1, 1));
Ability subAbility = new DealsCombatDamageToAPlayerTriggeredAbility(new DrawDiscardControllerEffect());
boostAbility.addEffect(new GainAbilityAttachedEffect(subAbility, AttachmentType.EQUIPMENT)
.setText("and has \""+subAbility.getRule("this creature")+"\"").concatBy(""));
this.addAbility(boostAbility);
// Equip {2}
this.addAbility(new EquipAbility(2));
}
private AssassinGauntlet(final AssassinGauntlet card) {
super(card);
}
@Override
public AssassinGauntlet copy() {
return new AssassinGauntlet(this);
}
}

View file

@ -0,0 +1,81 @@
package mage.cards.b;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.filter.common.FilterControlledPermanent;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.Target;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author notgreat
*/
public final class BattlefieldImprovisation extends CardImpl {
public BattlefieldImprovisation(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{W}");
// Target creature gets +2/+2 until end of turn. If that creature is attacking, you may attach any number of Equipment you control to it.
this.getSpellAbility().addEffect(new BoostTargetEffect(2, 2));
this.getSpellAbility().addEffect(new BattlefieldImprovisationEquipEffect());
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
}
private BattlefieldImprovisation(final BattlefieldImprovisation card) {
super(card);
}
@Override
public BattlefieldImprovisation copy() {
return new BattlefieldImprovisation(this);
}
}
// Based on Armed And Armored
class BattlefieldImprovisationEquipEffect extends OneShotEffect {
BattlefieldImprovisationEquipEffect() {
super(Outcome.Benefit);
staticText = "If that creature is attacking, you may attach any number of Equipment you control to it.";
}
private BattlefieldImprovisationEquipEffect(final BattlefieldImprovisationEquipEffect effect) {
super(effect);
}
@Override
public BattlefieldImprovisationEquipEffect copy() {
return new BattlefieldImprovisationEquipEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller == null) {
return false;
}
FilterControlledPermanent equipmentFilter = new FilterControlledPermanent(SubType.EQUIPMENT);
Permanent attacker = game.getPermanent(this.getTargetPointer().getFirst(game, source));
if (attacker != null && attacker.isAttacking()) {
Target target = new TargetPermanent(0, Integer.MAX_VALUE, equipmentFilter, true);
target.withChooseHint("equip to " + attacker.getLogName());
controller.choose(outcome, target, source, game);
for (UUID targetId : target.getTargets()) {
attacker.addAttachment(targetId, source, game);
game.informPlayers(game.getPermanent(targetId).getLogName() + " was attached to " + attacker.getLogName());
}
}
return true;
}
}

View file

@ -1,8 +1,6 @@
package mage.cards.b;
import java.util.UUID;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DamageTargetControllerEffect;
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
import mage.cards.CardImpl;
@ -11,6 +9,8 @@ import mage.constants.CardType;
import mage.counters.CounterType;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
*
* @author ciaccona007
@ -22,9 +22,7 @@ public final class BlurOfBlades extends CardImpl {
// Put a -1/-1 counter on target creature. Blur of Blades deals 2 damage to that creature's controller.
getSpellAbility().addEffect(new AddCountersTargetEffect(CounterType.M1M1.createInstance(1)));
Effect effect = new DamageTargetControllerEffect(2);
effect.setText("{this} deals 2 damage to that creature's controller");
getSpellAbility().addEffect(effect);
getSpellAbility().addEffect(new DamageTargetControllerEffect(2));
getSpellAbility().addTarget(new TargetCreaturePermanent());
}

View file

@ -1,8 +1,6 @@
package mage.cards.c;
import java.util.UUID;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DamageTargetControllerEffect;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl;
@ -13,6 +11,8 @@ import mage.filter.common.FilterLandPermanent;
import mage.filter.predicate.Predicates;
import mage.target.common.TargetLandPermanent;
import java.util.UUID;
/**
*
* @author dustinconrad
@ -30,9 +30,7 @@ public final class Cryoclasm extends CardImpl {
// Destroy target Plains or Island. Cryoclasm deals 3 damage to that land's controller.
this.getSpellAbility().addEffect(new DestroyTargetEffect());
Effect effect = new DamageTargetControllerEffect(3);
effect.setText("{this} deals 3 damage to that land's controller");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addEffect(new DamageTargetControllerEffect(3, "land"));
this.getSpellAbility().addTarget(new TargetLandPermanent(filter));
}

View file

@ -1,8 +1,6 @@
package mage.cards.d;
import mage.abilities.dynamicvalue.common.GetXValue;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DamageTargetControllerEffect;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl;
@ -25,9 +23,7 @@ public final class Detonate extends CardImpl {
// Destroy target artifact with converted mana cost X. It can't be regenerated. Detonate deals X damage to that artifact's controller.
this.getSpellAbility().addEffect(new DestroyTargetEffect(true));
this.getSpellAbility().addTarget(new TargetArtifactPermanent(new FilterArtifactPermanent("artifact with mana value X")));
Effect effect = new DamageTargetControllerEffect(GetXValue.instance);
effect.setText("{this} deals X damage to that artifact's controller");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addEffect(new DamageTargetControllerEffect(GetXValue.instance, "artifact"));
this.getSpellAbility().addTarget(new TargetArtifactPermanent());
this.getSpellAbility().setTargetAdjuster(new XManaValueTargetAdjuster());
}

View file

@ -21,7 +21,7 @@ public final class DistractTheGuards extends CardImpl {
this.addAbility(new FreerunningAbility("{1}{W}"));
// Create three 1/1 white Human Rogue creature tokens.
this.getSpellAbility().addEffect(new CreateTokenEffect(new HumanRogueToken()));
this.getSpellAbility().addEffect(new CreateTokenEffect(new HumanRogueToken(), 3));
}
private DistractTheGuards(final DistractTheGuards card) {

View file

@ -1,7 +1,6 @@
package mage.cards.f;
import java.util.UUID;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.effects.common.DamageTargetControllerEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
@ -13,6 +12,8 @@ import mage.constants.SubType;
import mage.filter.FilterPermanent;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author BursegSardaukar
*/
@ -30,7 +31,7 @@ public final class FodderLaunch extends CardImpl {
//Target creature gets -5/-5 until end of turn. Fodder Launch deals 5 damage to that creature's controller.
this.getSpellAbility().addEffect(new BoostTargetEffect(-5, -5, Duration.EndOfTurn));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addEffect(new DamageTargetControllerEffect(5).setText("{this} deals 5 damage to that creature's controller"));
this.getSpellAbility().addEffect(new DamageTargetControllerEffect(5));
}
private FodderLaunch(final FodderLaunch card) {

View file

@ -1,13 +1,11 @@
package mage.cards.g;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DamageTargetControllerEffect;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.keyword.DefenderAbility;
@ -20,6 +18,8 @@ import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.AbilityPredicate;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
*
* @author North
@ -43,9 +43,7 @@ public final class GrotagSiegeRunner extends CardImpl {
// {R}, Sacrifice Grotag Siege-Runner: Destroy target creature with defender. Grotag Siege-Runner deals 2 damage to that creature's controller.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl<>("{R}"));
ability.addCost(new SacrificeSourceCost());
Effect effect = new DamageTargetControllerEffect(2);
effect.setText("{this} deals 2 damage to that creature's controller");
ability.addEffect(effect);
ability.addEffect(new DamageTargetControllerEffect(2));
ability.addTarget(new TargetCreaturePermanent(filter));
this.addAbility(ability);
}

View file

@ -26,7 +26,7 @@ import java.util.UUID;
*/
public final class HemlockVial extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent();
private static final FilterPermanent filter = new FilterPermanent("Each equipped creature and Equipment you control");
static {
filter.add(Predicates.or(

View file

@ -2,8 +2,6 @@
package mage.cards.m;
import java.util.UUID;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DamageTargetControllerEffect;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl;
@ -11,6 +9,8 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.target.common.TargetLandPermanent;
import java.util.UUID;
/**
*
* @author Loki
@ -22,9 +22,7 @@ public final class MeltTerrain extends CardImpl {
// Destroy target land. Melt Terrain deals 2 damage to that land's controller.
this.getSpellAbility().addEffect(new DestroyTargetEffect());
Effect effect = new DamageTargetControllerEffect(2);
effect.setText("{this} deals 2 damage to that land's controller");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addEffect(new DamageTargetControllerEffect(2, "land"));
this.getSpellAbility().addTarget(new TargetLandPermanent());
}

View file

@ -0,0 +1,38 @@
package mage.cards.m;
import mage.abilities.condition.common.YouControlPermanentCondition;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.DamageTargetControllerEffect;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.StaticFilters;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author notgreat
*/
public final class MisthiossFury extends CardImpl {
public MisthiossFury(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}");
// Misthios's Fury deals 3 damage to target creature. If you control an Equipment, Misthios's Fury also deals 2 damage to that creature's controller.
this.getSpellAbility().addEffect(new DamageTargetEffect(3));
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new DamageTargetControllerEffect(2),
new YouControlPermanentCondition(StaticFilters.FILTER_PERMANENT_EQUIPMENT)));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
}
private MisthiossFury(final MisthiossFury card) {
super(card);
}
@Override
public MisthiossFury copy() {
return new MisthiossFury(this);
}
}

View file

@ -1,8 +1,6 @@
package mage.cards.p;
import java.util.UUID;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DamageTargetControllerEffect;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl;
@ -12,6 +10,8 @@ import mage.constants.SubType;
import mage.filter.common.FilterLandPermanent;
import mage.target.common.TargetLandPermanent;
import java.util.UUID;
/**
*
* @author Plopman
@ -29,9 +29,7 @@ public final class PeakEruption extends CardImpl {
// Destroy target Mountain. Peak Eruption deals 3 damage to that land's controller.
this.getSpellAbility().addEffect(new DestroyTargetEffect());
Effect effect = new DamageTargetControllerEffect(3);
effect.setText("{this} deals 3 damage to that land's controller");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addEffect(new DamageTargetControllerEffect(3, "land"));
this.getSpellAbility().addTarget(new TargetLandPermanent(filter));
}

View file

@ -0,0 +1,61 @@
package mage.cards.p;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
import mage.abilities.keyword.EquipAbility;
import mage.abilities.keyword.MenaceAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AttachmentType;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.common.TargetCreaturePermanent;
import mage.target.targetpointer.SecondTargetPointer;
import java.util.UUID;
/**
* @author notgreat
*/
public final class PhantomBlade extends CardImpl {
public PhantomBlade(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}{B}");
this.subtype.add(SubType.EQUIPMENT);
// When Phantom Blade enters the battlefield, attach it to up to one target creature you control. Destroy up to one other target creature.
Ability ability = new EntersBattlefieldTriggeredAbility(new AttachEffect(Outcome.BoostCreature).setText("attach it to up to one target creature you control"));
ability.addTarget(new TargetControlledCreaturePermanent(0, 1).setTargetTag(1));
ability.addEffect(new DestroyTargetEffect().setTargetPointer(new SecondTargetPointer()));
ability.addTarget(new TargetCreaturePermanent(0, 1, StaticFilters.FILTER_ANOTHER_CREATURE_TARGET_2, false).setTargetTag(2));
this.addAbility(ability);
// Equipped creature gets +1/+1 and has menace.
Ability boostAbility = new SimpleStaticAbility(new BoostEquippedEffect(1, 1));
boostAbility.addEffect(new GainAbilityAttachedEffect(new MenaceAbility(), AttachmentType.EQUIPMENT).setText("and has menace"));
this.addAbility(boostAbility);
// Equip {2}
this.addAbility(new EquipAbility(2));
}
private PhantomBlade(final PhantomBlade card) {
super(card);
}
@Override
public PhantomBlade copy() {
return new PhantomBlade(this);
}
}

View file

@ -1,8 +1,6 @@
package mage.cards.p;
import java.util.UUID;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DamageTargetControllerEffect;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl;
@ -10,6 +8,8 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.target.common.TargetLandPermanent;
import java.util.UUID;
/**
*
* @author jeffwadsworth
@ -21,9 +21,7 @@ public final class PoisonTheWell extends CardImpl {
// Destroy target land. Poison the Well deals 2 damage to that land's controller.
this.getSpellAbility().addEffect(new DestroyTargetEffect());
Effect effect = new DamageTargetControllerEffect(2);
effect.setText("{this} deals 2 damage to that land's controller");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addEffect(new DamageTargetControllerEffect(2, "land"));
this.getSpellAbility().addTarget(new TargetLandPermanent());
}

View file

@ -35,7 +35,7 @@ public final class RavenClanWarAxe extends CardImpl {
this.subtype.add(SubType.EQUIPMENT);
// When Raven Clan War-Axe enters the battlefield, you may search your library and/or graveyard for a card named Eivor, Battle-Ready, reveal it, and put it into your hand. If you search your library this way, shuffle.
this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryGraveyardPutInHandEffect(filter)));
this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryGraveyardPutInHandEffect(filter, false, true)));
// Equipped creature gets +2/+0 and has trample.
Ability ability = new SimpleStaticAbility(new BoostEquippedEffect(2, 0));

View file

@ -14,7 +14,8 @@ import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.permanent.TappedPredicate;
import mage.target.common.TargetControlledPermanent;
import java.util.UUID;
@ -24,6 +25,13 @@ import java.util.UUID;
*/
public final class ShaoJun extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("untapped artifacts you control");
static {
filter.add(CardType.ARTIFACT.getPredicate());
filter.add(TappedPredicate.UNTAPPED);
}
public ShaoJun(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{R}");
@ -47,7 +55,7 @@ public final class ShaoJun extends CardImpl {
// Rope Dart -- Tap two untapped artifacts you control: Shao Jun deals 1 damage to each opponent.
this.addAbility(new SimpleActivatedAbility(
new DamagePlayersEffect(1, TargetController.OPPONENT),
new TapTargetCost(new TargetControlledPermanent(2, StaticFilters.FILTER_CONTROLLED_PERMANENT_ARTIFACTS))
new TapTargetCost(new TargetControlledPermanent(2, filter))
).withFlavorWord("Rope Dart"));
}

View file

@ -107,7 +107,7 @@ class SigurdJarlOfRavensthorpeTriggeredAbility extends TriggeredAbilityImpl {
SigurdJarlOfRavensthorpeTriggeredAbility() {
super(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P1P1.createInstance()));
this.addTarget(new TargetPermanent(0, 1, StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));
this.addTarget(new TargetPermanent(0, 1, StaticFilters.FILTER_ANOTHER_TARGET_CREATURE));
this.setTriggerPhrase("Whenever you put a lore counter on a Saga you control, ");
}

View file

@ -1,8 +1,6 @@
package mage.cards.s;
import java.util.UUID;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DamageTargetControllerEffect;
import mage.abilities.effects.common.ExileTargetEffect;
import mage.cards.CardImpl;
@ -12,6 +10,8 @@ import mage.filter.FilterPermanent;
import mage.filter.predicate.Predicates;
import mage.target.TargetPermanent;
import java.util.UUID;
/**
*
* @author fireshoes
@ -29,9 +29,7 @@ public final class StructuralDistortion extends CardImpl {
// Exile target artifact or land. Structural Distortion deals 2 damage to that permanent's controller.
this.getSpellAbility().addEffect(new ExileTargetEffect());
Effect effect = new DamageTargetControllerEffect(2);
effect.setText("{this} deals 2 damage to that permanent's controller");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addEffect(new DamageTargetControllerEffect(2, "permanent"));
this.getSpellAbility().addTarget(new TargetPermanent(FILTER));
}

View file

@ -1,17 +1,18 @@
package mage.cards.u;
import java.util.UUID;
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
import mage.abilities.condition.common.YouControlPermanentCondition;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.DamageTargetControllerEffect;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterControlledArtifactPermanent;
import mage.filter.common.FilterArtifactPermanent;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
*
* @author emerald000
@ -26,8 +27,7 @@ public final class UnlicensedDisintegration extends CardImpl {
this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
new DamageTargetControllerEffect(3),
new PermanentsOnTheBattlefieldCondition(new FilterControlledArtifactPermanent()),
"If you control an artifact, {this} deals 3 damage to that creature's controller"));
new YouControlPermanentCondition(new FilterArtifactPermanent())));
}

View file

@ -25,10 +25,12 @@ public final class AssassinsCreed extends ExpansionSet {
cards.add(new SetCardInfo("Achilles Davenport", 294, Rarity.RARE, mage.cards.a.AchillesDavenport.class));
cards.add(new SetCardInfo("Arno Dorian", 47, Rarity.UNCOMMON, mage.cards.a.ArnoDorian.class));
cards.add(new SetCardInfo("Assassin Den", 281, Rarity.UNCOMMON, mage.cards.a.AssassinDen.class));
cards.add(new SetCardInfo("Assassin Gauntlet", 12, Rarity.UNCOMMON, mage.cards.a.AssassinGauntlet.class));
cards.add(new SetCardInfo("Assassin's Trophy", 95, Rarity.RARE, mage.cards.a.AssassinsTrophy.class));
cards.add(new SetCardInfo("Aya of Alexandria", 48, Rarity.RARE, mage.cards.a.AyaOfAlexandria.class));
cards.add(new SetCardInfo("Ballad of the Black Flag", 13, Rarity.UNCOMMON, mage.cards.b.BalladOfTheBlackFlag.class));
cards.add(new SetCardInfo("Basim Ibn Ishaq", 49, Rarity.RARE, mage.cards.b.BasimIbnIshaq.class));
cards.add(new SetCardInfo("Battlefield Improvisation", 276, Rarity.COMMON, mage.cards.b.BattlefieldImprovisation.class));
cards.add(new SetCardInfo("Bayek of Siwa", 50, Rarity.RARE, mage.cards.b.BayekOfSiwa.class));
cards.add(new SetCardInfo("Black Market Connections", 87, Rarity.RARE, mage.cards.b.BlackMarketConnections.class));
cards.add(new SetCardInfo("Brotherhood Ambushers", 285, Rarity.UNCOMMON, mage.cards.b.BrotherhoodAmbushers.class));
@ -76,12 +78,14 @@ public final class AssassinsCreed extends ExpansionSet {
cards.add(new SetCardInfo("Lydia Frye", 60, Rarity.UNCOMMON, mage.cards.l.LydiaFrye.class));
cards.add(new SetCardInfo("Mary Read and Anne Bonny", 61, Rarity.RARE, mage.cards.m.MaryReadAndAnneBonny.class));
cards.add(new SetCardInfo("Merciless Harlequin", 287, Rarity.COMMON, mage.cards.m.MercilessHarlequin.class));
cards.add(new SetCardInfo("Misthios's Fury", 291, Rarity.COMMON, mage.cards.m.MisthiossFury.class));
cards.add(new SetCardInfo("Mortify", 96, Rarity.UNCOMMON, mage.cards.m.Mortify.class));
cards.add(new SetCardInfo("Mountain", 107, Rarity.LAND, mage.cards.basiclands.Mountain.class, FULL_ART_BFZ_VARIOUS));
cards.add(new SetCardInfo("Murder", 92, Rarity.UNCOMMON, mage.cards.m.Murder.class));
cards.add(new SetCardInfo("Nurturing Peatland", 114, Rarity.RARE, mage.cards.n.NurturingPeatland.class));
cards.add(new SetCardInfo("Origin of the Hidden Ones", 36, Rarity.UNCOMMON, mage.cards.o.OriginOfTheHiddenOnes.class));
cards.add(new SetCardInfo("Path to Exile", 81, Rarity.UNCOMMON, mage.cards.p.PathToExile.class));
cards.add(new SetCardInfo("Phantom Blade", 29, Rarity.UNCOMMON, mage.cards.p.PhantomBlade.class));
cards.add(new SetCardInfo("Plains", 101, Rarity.LAND, mage.cards.basiclands.Plains.class, FULL_ART_BFZ_VARIOUS));
cards.add(new SetCardInfo("Poison-Blade Mentor", 288, Rarity.UNCOMMON, mage.cards.p.PoisonBladeMentor.class));
cards.add(new SetCardInfo("Propaganda", 85, Rarity.UNCOMMON, mage.cards.p.Propaganda.class));

View file

@ -15,13 +15,18 @@ import mage.players.Player;
*/
public class DamageTargetControllerEffect extends OneShotEffect {
protected DynamicValue amount;
protected boolean preventable;
protected final DynamicValue amount;
protected final boolean preventable;
protected final String name;
public DamageTargetControllerEffect(int amount) {
this(StaticValue.get(amount), true);
}
public DamageTargetControllerEffect(int amount, String name) {
this(StaticValue.get(amount), true, name);
}
public DamageTargetControllerEffect(int amount, boolean preventable) {
this(StaticValue.get(amount), preventable);
}
@ -30,16 +35,26 @@ public class DamageTargetControllerEffect extends OneShotEffect {
this(amount, true);
}
public DamageTargetControllerEffect(DynamicValue amount, String name) {
this(amount, true, name);
}
public DamageTargetControllerEffect(DynamicValue amount, boolean preventable) {
this(amount, preventable, "creature");
}
public DamageTargetControllerEffect(DynamicValue amount, boolean preventable, String name) {
super(Outcome.Damage);
this.amount = amount;
this.preventable = preventable;
this.name = name;
}
protected DamageTargetControllerEffect(final DamageTargetControllerEffect effect) {
super(effect);
amount = effect.amount.copy();
preventable = effect.preventable;
this.amount = effect.amount.copy();
this.preventable = effect.preventable;
this.name = effect.name;
}
@Override
@ -65,9 +80,12 @@ public class DamageTargetControllerEffect extends OneShotEffect {
if (staticText != null && !staticText.isEmpty()) {
return staticText;
}
return "{this} deals " + amount.getMessage() + " damage to "
+ getTargetPointer().describeTargets(mode.getTargets(), "that creature")
+ "'s controller"
String message = amount.getMessage();
if (message.isEmpty()) {
message = amount.toString();
}
return "{this} deals " + message + " damage to that "
+ name + "'s controller"
+ (preventable ? "" : ". The damage can't be prevented");
}
}

View file

@ -11,7 +11,7 @@ import mage.constants.SubType;
public final class AssassinMenaceToken extends TokenImpl {
public AssassinMenaceToken() {
super("Assassin Token", "1/1 black Assassin creature token menace");
super("Assassin Token", "1/1 black Assassin creature token with menace");
cardType.add(CardType.CREATURE);
color.setBlack(true);
subtype.add(SubType.ASSASSIN);