mirror of
https://github.com/correl/mage.git
synced 2024-11-22 19:18:39 +00:00
Improved and fixed cards texts:
* fixed wrong texts for draw card abilities; * added multi-effects text generation instead copy-paste (concatBy).
This commit is contained in:
parent
83cf370cc6
commit
f6585ef734
23 changed files with 144 additions and 140 deletions
|
@ -1,7 +1,5 @@
|
||||||
|
|
||||||
package mage.cards.a;
|
package mage.cards.a;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||||
|
@ -13,8 +11,9 @@ import mage.constants.SubType;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.FilterSpell;
|
||||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Backfir3
|
* @author Backfir3
|
||||||
*/
|
*/
|
||||||
public final class ArgothianEnchantress extends CardImpl {
|
public final class ArgothianEnchantress extends CardImpl {
|
||||||
|
@ -26,16 +25,18 @@ public final class ArgothianEnchantress extends CardImpl {
|
||||||
}
|
}
|
||||||
|
|
||||||
public ArgothianEnchantress(UUID ownerId, CardSetInfo setInfo) {
|
public ArgothianEnchantress(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);
|
||||||
this.subtype.add(SubType.DRUID);
|
this.subtype.add(SubType.DRUID);
|
||||||
|
|
||||||
this.power = new MageInt(0);
|
this.power = new MageInt(0);
|
||||||
this.toughness = new MageInt(1);
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
|
// Shroud
|
||||||
this.addAbility(ShroudAbility.getInstance());
|
this.addAbility(ShroudAbility.getInstance());
|
||||||
|
|
||||||
// Whenever you cast an Enchantment spell, you draw a card.
|
// Whenever you cast an Enchantment spell, you draw a card.
|
||||||
this.addAbility(new SpellCastControllerTriggeredAbility(new DrawCardSourceControllerEffect(1), filter, false));
|
this.addAbility(new SpellCastControllerTriggeredAbility(new DrawCardSourceControllerEffect(1, "you"), filter, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
public ArgothianEnchantress(final ArgothianEnchantress card) {
|
public ArgothianEnchantress(final ArgothianEnchantress card) {
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
|
|
||||||
package mage.cards.a;
|
package mage.cards.a;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||||
|
@ -19,8 +17,9 @@ import mage.constants.ComparisonType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
|
* @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
|
||||||
*/
|
*/
|
||||||
public final class AsylumVisitor extends CardImpl {
|
public final class AsylumVisitor extends CardImpl {
|
||||||
|
@ -33,11 +32,11 @@ public final class AsylumVisitor extends CardImpl {
|
||||||
this.toughness = new MageInt(1);
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
// At the beginning of each player's upkeep, if that player has no cards in hand, you draw a card and you lose 1 life.
|
// At the beginning of each player's upkeep, if that player has no cards in hand, you draw a card and you lose 1 life.
|
||||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(new BeginningOfUpkeepTriggeredAbility(new DrawCardSourceControllerEffect(1), TargetController.ANY, false),
|
Ability ability = new ConditionalInterveningIfTriggeredAbility(
|
||||||
|
new BeginningOfUpkeepTriggeredAbility(new DrawCardSourceControllerEffect(1, "you"), TargetController.ANY, false),
|
||||||
new CardsInHandCondition(ComparisonType.EQUAL_TO, 0, null, TargetController.ACTIVE),
|
new CardsInHandCondition(ComparisonType.EQUAL_TO, 0, null, TargetController.ACTIVE),
|
||||||
"At the beginning of each player's upkeep, if that player has no cards in hand, you draw a card and you lose 1 life.");
|
"At the beginning of each player's upkeep, if that player has no cards in hand, you draw a card and you lose 1 life.");
|
||||||
Effect effect = new LoseLifeSourceControllerEffect(1);
|
Effect effect = new LoseLifeSourceControllerEffect(1);
|
||||||
effect.setText("and you lose 1 life");
|
|
||||||
ability.addEffect(effect);
|
ability.addEffect(effect);
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
|
|
||||||
package mage.cards.b;
|
package mage.cards.b;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||||
|
@ -14,24 +12,24 @@ import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
*/
|
*/
|
||||||
public final class BalefulForce extends CardImpl {
|
public final class BalefulForce extends CardImpl {
|
||||||
|
|
||||||
public BalefulForce(UUID ownerId, CardSetInfo setInfo) {
|
public BalefulForce(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}{B}{B}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{B}{B}{B}");
|
||||||
this.subtype.add(SubType.ELEMENTAL);
|
this.subtype.add(SubType.ELEMENTAL);
|
||||||
|
|
||||||
this.power = new MageInt(7);
|
this.power = new MageInt(7);
|
||||||
this.toughness = new MageInt(7);
|
this.toughness = new MageInt(7);
|
||||||
|
|
||||||
// At the beginning of each upkeep, you draw a card and you lose 1 life.
|
// At the beginning of each upkeep, you draw a card and you lose 1 life.
|
||||||
Ability ability = new BeginningOfUpkeepTriggeredAbility(new DrawCardSourceControllerEffect(1), TargetController.ANY, false);
|
Ability ability = new BeginningOfUpkeepTriggeredAbility(new DrawCardSourceControllerEffect(1, "you"), TargetController.ANY, false);
|
||||||
Effect effect = new LoseLifeSourceControllerEffect(1);
|
Effect effect = new LoseLifeSourceControllerEffect(1);
|
||||||
effect.setText("and you lose 1 life");
|
ability.addEffect(effect.concatBy("and"));
|
||||||
ability.addEffect(effect);
|
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
|
|
||||||
package mage.cards.b;
|
package mage.cards.b;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.BecomesTappedAttachedTriggeredAbility;
|
import mage.abilities.common.BecomesTappedAttachedTriggeredAbility;
|
||||||
import mage.abilities.effects.common.AttachEffect;
|
import mage.abilities.effects.common.AttachEffect;
|
||||||
|
@ -18,8 +16,9 @@ import mage.filter.predicate.permanent.ControllerPredicate;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author LoneFox
|
* @author LoneFox
|
||||||
*/
|
*/
|
||||||
public final class Betrayal extends CardImpl {
|
public final class Betrayal extends CardImpl {
|
||||||
|
@ -31,7 +30,7 @@ public final class Betrayal extends CardImpl {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Betrayal(UUID ownerId, CardSetInfo setInfo) {
|
public Betrayal(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{U}");
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{U}");
|
||||||
this.subtype.add(SubType.AURA);
|
this.subtype.add(SubType.AURA);
|
||||||
|
|
||||||
// Enchant creature an opponent controls
|
// Enchant creature an opponent controls
|
||||||
|
@ -40,8 +39,9 @@ public final class Betrayal extends CardImpl {
|
||||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment));
|
this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment));
|
||||||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
// Whenever enchanted creature becomes tapped, you draw a card.
|
// Whenever enchanted creature becomes tapped, you draw a card.
|
||||||
this.addAbility(new BecomesTappedAttachedTriggeredAbility(new DrawCardSourceControllerEffect(1), "enchanted creature"));
|
this.addAbility(new BecomesTappedAttachedTriggeredAbility(new DrawCardSourceControllerEffect(1, "you"), "enchanted creature"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public Betrayal(final Betrayal card) {
|
public Betrayal(final Betrayal card) {
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.b;
|
package mage.cards.b;
|
||||||
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
|
@ -22,7 +21,6 @@ import mage.target.common.TargetCreaturePermanent;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author TheElk801
|
* @author TheElk801
|
||||||
*/
|
*/
|
||||||
public final class BrassTalonChimera extends CardImpl {
|
public final class BrassTalonChimera extends CardImpl {
|
||||||
|
@ -43,9 +41,9 @@ public final class BrassTalonChimera extends CardImpl {
|
||||||
// First strike
|
// First strike
|
||||||
this.addAbility(FirstStrikeAbility.getInstance());
|
this.addAbility(FirstStrikeAbility.getInstance());
|
||||||
|
|
||||||
// Sacrifice Brass-Talon Chimera: Put a +2/+2 counter on target Chimera creature. It gains first strike.
|
// Sacrifice Brass-Talon Chimera: Put a +2/+2 counter on target Chimera creature. It gains first strike. (This effect lasts indefinitely.)
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P2P2.createInstance()), new SacrificeSourceCost());
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P2P2.createInstance()), new SacrificeSourceCost());
|
||||||
ability.addEffect(new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.WhileOnBattlefield).setText("It gains first strike. (This effect lasts indefinitely.)"));
|
ability.addEffect(new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.WhileOnBattlefield).setText("It gains first strike. <i>(This effect lasts indefinitely.)</i>"));
|
||||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||||
addAbility(ability);
|
addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
|
|
||||||
package mage.cards.c;
|
package mage.cards.c;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
@ -25,8 +23,9 @@ import mage.filter.predicate.permanent.TappedPredicate;
|
||||||
import mage.game.permanent.token.ZombieToken;
|
import mage.game.permanent.token.ZombieToken;
|
||||||
import mage.target.common.TargetControlledCreaturePermanent;
|
import mage.target.common.TargetControlledCreaturePermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author fireshoes
|
* @author fireshoes
|
||||||
*/
|
*/
|
||||||
public final class Cryptbreaker extends CardImpl {
|
public final class Cryptbreaker extends CardImpl {
|
||||||
|
@ -39,7 +38,7 @@ public final class Cryptbreaker extends CardImpl {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Cryptbreaker(UUID ownerId, CardSetInfo setInfo) {
|
public Cryptbreaker(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}");
|
||||||
this.subtype.add(SubType.ZOMBIE);
|
this.subtype.add(SubType.ZOMBIE);
|
||||||
this.power = new MageInt(1);
|
this.power = new MageInt(1);
|
||||||
this.toughness = new MageInt(1);
|
this.toughness = new MageInt(1);
|
||||||
|
@ -51,12 +50,10 @@ public final class Cryptbreaker extends CardImpl {
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
// Tap three untapped Zombies you control: You draw a card and you lose 1 life.
|
// Tap three untapped Zombies you control: You draw a card and you lose 1 life.
|
||||||
Effect effect = new DrawCardSourceControllerEffect(1);
|
Effect effect = new DrawCardSourceControllerEffect(1, "you");
|
||||||
effect.setText("You draw a card");
|
|
||||||
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapTargetCost(new TargetControlledCreaturePermanent(3, 3, filter, true)));
|
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapTargetCost(new TargetControlledCreaturePermanent(3, 3, filter, true)));
|
||||||
effect = new LoseLifeSourceControllerEffect(1);
|
effect = new LoseLifeSourceControllerEffect(1);
|
||||||
effect.setText("and you lose 1 life");
|
ability.addEffect(effect.concatBy("and"));
|
||||||
ability.addEffect(effect);
|
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
|
|
||||||
package mage.cards.d;
|
package mage.cards.d;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.DiesCreatureTriggeredAbility;
|
import mage.abilities.common.DiesCreatureTriggeredAbility;
|
||||||
import mage.abilities.effects.Effect;
|
import mage.abilities.effects.Effect;
|
||||||
|
@ -14,28 +12,27 @@ import mage.constants.TargetController;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
*/
|
*/
|
||||||
public final class DarkProphecy extends CardImpl {
|
public final class DarkProphecy extends CardImpl {
|
||||||
|
|
||||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature you control");
|
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature you control");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||||
}
|
}
|
||||||
|
|
||||||
public DarkProphecy(UUID ownerId, CardSetInfo setInfo) {
|
public DarkProphecy(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}{B}{B}");
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{B}{B}{B}");
|
||||||
|
|
||||||
|
|
||||||
// Whenever a creature you control dies, you draw a card and you lose 1 life.
|
// Whenever a creature you control dies, you draw a card and you lose 1 life.
|
||||||
Effect effect = new DrawCardSourceControllerEffect(1);
|
Effect effect = new DrawCardSourceControllerEffect(1, "you");
|
||||||
effect.setText("you draw a card");
|
|
||||||
Ability ability = new DiesCreatureTriggeredAbility(effect, false, filter);
|
Ability ability = new DiesCreatureTriggeredAbility(effect, false, filter);
|
||||||
effect = new LoseLifeSourceControllerEffect(1);
|
effect = new LoseLifeSourceControllerEffect(1);
|
||||||
effect.setText("and you lose 1 life");
|
ability.addEffect(effect.concatBy("and"));
|
||||||
ability.addEffect(effect);
|
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
|
|
||||||
package mage.cards.d;
|
package mage.cards.d;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||||
|
@ -9,20 +7,20 @@ import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.SubType;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author jeffwadsworth
|
* @author jeffwadsworth
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public final class DimirCutpurse extends CardImpl {
|
public final class DimirCutpurse extends CardImpl {
|
||||||
|
|
||||||
public DimirCutpurse(UUID ownerId, CardSetInfo setInfo) {
|
public DimirCutpurse(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{B}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{B}");
|
||||||
this.subtype.add(SubType.SPIRIT);
|
this.subtype.add(SubType.SPIRIT);
|
||||||
|
|
||||||
this.power = new MageInt(2);
|
this.power = new MageInt(2);
|
||||||
|
@ -30,7 +28,6 @@ public final class DimirCutpurse extends CardImpl {
|
||||||
|
|
||||||
// Whenever Dimir Cutpurse deals combat damage to a player, that player discards a card and you draw a card.
|
// Whenever Dimir Cutpurse deals combat damage to a player, that player discards a card and you draw a card.
|
||||||
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new DimirCutpurseEffect(), false, true));
|
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new DimirCutpurseEffect(), false, true));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public DimirCutpurse(final DimirCutpurse card) {
|
public DimirCutpurse(final DimirCutpurse card) {
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package mage.cards.d;
|
package mage.cards.d;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.TriggeredAbilityImpl;
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
|
@ -16,8 +15,9 @@ import mage.constants.Zone;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author TheElk801
|
* @author TheElk801
|
||||||
*/
|
*/
|
||||||
public final class DisinformationCampaign extends CardImpl {
|
public final class DisinformationCampaign extends CardImpl {
|
||||||
|
@ -27,11 +27,9 @@ public final class DisinformationCampaign extends CardImpl {
|
||||||
|
|
||||||
// When Disinformation Campaign enters the battlefield, you draw a card and each opponent discards a card.
|
// When Disinformation Campaign enters the battlefield, you draw a card and each opponent discards a card.
|
||||||
Ability ability = new EntersBattlefieldTriggeredAbility(
|
Ability ability = new EntersBattlefieldTriggeredAbility(
|
||||||
new DrawCardSourceControllerEffect(1).setText("you draw a card")
|
new DrawCardSourceControllerEffect(1, "you"));
|
||||||
);
|
|
||||||
ability.addEffect(new DiscardEachPlayerEffect(
|
ability.addEffect(new DiscardEachPlayerEffect(
|
||||||
new StaticValue(1), false, TargetController.OPPONENT
|
new StaticValue(1), false, TargetController.OPPONENT).concatBy("and"));
|
||||||
).setText("and each opponent discards a card"));
|
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
// Whenever you surveil, return Disinformation Campaign to its owner's hand.
|
// Whenever you surveil, return Disinformation Campaign to its owner's hand.
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
|
|
||||||
package mage.cards.d;
|
package mage.cards.d;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.DrawCardControllerTriggeredAbility;
|
import mage.abilities.common.DrawCardControllerTriggeredAbility;
|
||||||
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
|
||||||
|
@ -23,40 +21,46 @@ import mage.filter.FilterPermanent;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
*/
|
*/
|
||||||
public final class DivinersWand extends CardImpl {
|
public final class DivinersWand extends CardImpl {
|
||||||
|
|
||||||
private static final FilterPermanent filter = new FilterCreaturePermanent("a Wizard creature");
|
private static final FilterPermanent filter = new FilterCreaturePermanent("a Wizard creature");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(new SubtypePredicate(SubType.WIZARD));
|
filter.add(new SubtypePredicate(SubType.WIZARD));
|
||||||
}
|
}
|
||||||
|
|
||||||
public DivinersWand(UUID ownerId, CardSetInfo setInfo) {
|
public DivinersWand(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.ARTIFACT},"{3}");
|
super(ownerId, setInfo, new CardType[]{CardType.TRIBAL, CardType.ARTIFACT}, "{3}");
|
||||||
this.subtype.add(SubType.WIZARD);
|
this.subtype.add(SubType.WIZARD);
|
||||||
this.subtype.add(SubType.EQUIPMENT);
|
this.subtype.add(SubType.EQUIPMENT);
|
||||||
|
|
||||||
// Equipped creature has "Whenever you draw a card, this creature gets +1/+1 and gains flying until end of turn" and "{4}: Draw a card."
|
|
||||||
Ability gainedAbility = new DrawCardControllerTriggeredAbility(new BoostSourceEffect(1,1, Duration.EndOfTurn), false);
|
|
||||||
gainedAbility.addEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.EndOfTurn));
|
|
||||||
Effect effect = new GainAbilityAttachedEffect(gainedAbility, AttachmentType.EQUIPMENT);
|
|
||||||
effect.setText("Equipped creature has \"Whenever you draw a card, this creature gets +1/+1 and gains flying until end of turn\"");
|
|
||||||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
|
|
||||||
effect = new GainAbilityAttachedEffect(
|
|
||||||
new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new GenericManaCost(4)), AttachmentType.EQUIPMENT);
|
|
||||||
effect.setText("and \"{4}: Draw a card.\"");
|
|
||||||
ability.addEffect(effect);
|
|
||||||
this.addAbility(ability);
|
|
||||||
|
|
||||||
// Whenever a Wizard creature enters the battlefield, you may attach Diviner's Wand to it.
|
// Whenever a Wizard creature enters the battlefield, you may attach Diviner's Wand to it.
|
||||||
this.addAbility(new EntersBattlefieldAllTriggeredAbility(
|
this.addAbility(new EntersBattlefieldAllTriggeredAbility(
|
||||||
Zone.BATTLEFIELD, new AttachEffect(Outcome.Detriment, "attach {source} to it"),
|
Zone.BATTLEFIELD, new AttachEffect(Outcome.Detriment, "attach {source} to it"),
|
||||||
filter, true, SetTargetPointer.PERMANENT, null));
|
filter, true, SetTargetPointer.PERMANENT, null));
|
||||||
|
|
||||||
// Equip {3}
|
// Equip {3}
|
||||||
this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(3)));
|
this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(3)));
|
||||||
|
|
||||||
|
// Equipped creature has "Whenever you draw a card, this creature gets +1/+1 and gains flying until end of turn" and "{4}: Draw a card."
|
||||||
|
// new abilities
|
||||||
|
Ability newBoost = new DrawCardControllerTriggeredAbility(new BoostSourceEffect(1, 1, Duration.EndOfTurn), false);
|
||||||
|
newBoost.addEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.EndOfTurn).concatBy("and"));
|
||||||
|
Ability newDraw = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new GenericManaCost(4));
|
||||||
|
// gain new abilities
|
||||||
|
Effect effectBoost = new GainAbilityAttachedEffect(newBoost, AttachmentType.EQUIPMENT)
|
||||||
|
.setText("Equipped creature has \"Whenever you draw a card, this creature gets +1/+1 and gains flying until end of turn\"");
|
||||||
|
Effect effectDraw = new GainAbilityAttachedEffect(newDraw, AttachmentType.EQUIPMENT)
|
||||||
|
.setText("\"{4}: Draw a card.\"");
|
||||||
|
// total ability
|
||||||
|
Ability totalAbility = new SimpleStaticAbility(Zone.BATTLEFIELD, effectBoost);
|
||||||
|
totalAbility.addEffect(effectDraw.concatBy("and"));
|
||||||
|
this.addAbility(totalAbility);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DivinersWand(final DivinersWand card) {
|
public DivinersWand(final DivinersWand card) {
|
||||||
|
|
|
@ -1,24 +1,24 @@
|
||||||
|
|
||||||
package mage.cards.d;
|
package mage.cards.d;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.effects.Effect;
|
import mage.abilities.effects.Effect;
|
||||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||||
import mage.abilities.effects.common.LoseLifeSourceControllerEffect;
|
import mage.abilities.effects.common.LoseLifeSourceControllerEffect;
|
||||||
import mage.constants.*;
|
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author JayDi85
|
* @author JayDi85
|
||||||
*/
|
*/
|
||||||
public final class DuskLegionZealot extends CardImpl {
|
public final class DuskLegionZealot extends CardImpl {
|
||||||
|
|
||||||
public DuskLegionZealot (UUID ownerId, CardSetInfo setInfo) {
|
public DuskLegionZealot(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}");
|
||||||
|
|
||||||
this.subtype.add(SubType.VAMPIRE);
|
this.subtype.add(SubType.VAMPIRE);
|
||||||
|
@ -27,21 +27,19 @@ public final class DuskLegionZealot extends CardImpl {
|
||||||
this.toughness = new MageInt(1);
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
// When Dusk Legion Zealot enters the battlefield, you draw a card and you lose 1 life.
|
// When Dusk Legion Zealot enters the battlefield, you draw a card and you lose 1 life.
|
||||||
Effect drawEffect = new DrawCardSourceControllerEffect(1);
|
Effect drawEffect = new DrawCardSourceControllerEffect(1, "you");
|
||||||
drawEffect.setText("you draw a card");
|
|
||||||
Ability ability = new EntersBattlefieldTriggeredAbility(drawEffect);
|
Ability ability = new EntersBattlefieldTriggeredAbility(drawEffect);
|
||||||
Effect lifeEffect = new LoseLifeSourceControllerEffect(1);
|
Effect lifeEffect = new LoseLifeSourceControllerEffect(1);
|
||||||
lifeEffect.setText("and you lose 1 life");
|
ability.addEffect(lifeEffect.concatBy("and"));
|
||||||
ability.addEffect(lifeEffect);
|
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DuskLegionZealot (final DuskLegionZealot card) {
|
public DuskLegionZealot(final DuskLegionZealot card) {
|
||||||
super(card);
|
super(card);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DuskLegionZealot copy() {
|
public DuskLegionZealot copy() {
|
||||||
return new DuskLegionZealot (this);
|
return new DuskLegionZealot(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -29,7 +29,7 @@ public final class Foreshadow extends CardImpl {
|
||||||
|
|
||||||
// Choose a card name, then target opponent puts the top card of their library into their graveyard. If that card has the chosen name, you draw a card.
|
// Choose a card name, then target opponent puts the top card of their library into their graveyard. If that card has the chosen name, you draw a card.
|
||||||
this.getSpellAbility().addEffect(new ChooseACardNameEffect(ChooseACardNameEffect.TypeOfName.ALL));
|
this.getSpellAbility().addEffect(new ChooseACardNameEffect(ChooseACardNameEffect.TypeOfName.ALL));
|
||||||
this.getSpellAbility().addEffect(new ForeshadowEffect());
|
this.getSpellAbility().addEffect(new ForeshadowEffect().concatBy("then"));
|
||||||
this.getSpellAbility().addTarget(new TargetOpponent());
|
this.getSpellAbility().addTarget(new TargetOpponent());
|
||||||
|
|
||||||
// Draw a card at the beginning of the next turn's upkeep.
|
// Draw a card at the beginning of the next turn's upkeep.
|
||||||
|
@ -51,7 +51,7 @@ class ForeshadowEffect extends OneShotEffect {
|
||||||
|
|
||||||
public ForeshadowEffect() {
|
public ForeshadowEffect() {
|
||||||
super(Outcome.DrawCard);
|
super(Outcome.DrawCard);
|
||||||
this.staticText = ", then target opponent puts the top card of their library into their graveyard. If that card has the chosen name, you draw a card";
|
this.staticText = "target opponent puts the top card of their library into their graveyard. If that card has the chosen name, you draw a card";
|
||||||
}
|
}
|
||||||
|
|
||||||
public ForeshadowEffect(final ForeshadowEffect effect) {
|
public ForeshadowEffect(final ForeshadowEffect effect) {
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
|
|
||||||
package mage.cards.f;
|
package mage.cards.f;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||||
|
@ -16,14 +14,15 @@ import mage.constants.SubType;
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
*/
|
*/
|
||||||
public final class FretworkColony extends CardImpl {
|
public final class FretworkColony extends CardImpl {
|
||||||
|
|
||||||
public FretworkColony(UUID ownerId, CardSetInfo setInfo) {
|
public FretworkColony(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}");
|
||||||
this.subtype.add(SubType.INSECT);
|
this.subtype.add(SubType.INSECT);
|
||||||
this.power = new MageInt(1);
|
this.power = new MageInt(1);
|
||||||
this.toughness = new MageInt(1);
|
this.toughness = new MageInt(1);
|
||||||
|
@ -34,8 +33,7 @@ public final class FretworkColony extends CardImpl {
|
||||||
// At the beginning of your upkeep, put a +1/+1 counter on Fretwork Colony and you lose 1 life.
|
// At the beginning of your upkeep, put a +1/+1 counter on Fretwork Colony and you lose 1 life.
|
||||||
Ability ability = new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), TargetController.YOU, false);
|
Ability ability = new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), TargetController.YOU, false);
|
||||||
Effect effect = new LoseLifeSourceControllerEffect(1);
|
Effect effect = new LoseLifeSourceControllerEffect(1);
|
||||||
effect.setText("and you lose 1 life");
|
ability.addEffect(effect.concatBy("and"));
|
||||||
ability.addEffect(effect);
|
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
|
|
||||||
package mage.cards.f;
|
package mage.cards.f;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.ObjectColor;
|
import mage.ObjectColor;
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.common.SpellCastOpponentTriggeredAbility;
|
import mage.abilities.common.SpellCastOpponentTriggeredAbility;
|
||||||
|
@ -15,8 +13,9 @@ import mage.constants.CardType;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.FilterSpell;
|
||||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author TheElk801
|
* @author TheElk801
|
||||||
*/
|
*/
|
||||||
public final class FreyalisesCharm extends CardImpl {
|
public final class FreyalisesCharm extends CardImpl {
|
||||||
|
@ -33,7 +32,7 @@ public final class FreyalisesCharm extends CardImpl {
|
||||||
// Whenever an opponent casts a black spell, you may pay {G}{G}. If you do, you draw a card.
|
// Whenever an opponent casts a black spell, you may pay {G}{G}. If you do, you draw a card.
|
||||||
this.addAbility(new SpellCastOpponentTriggeredAbility(
|
this.addAbility(new SpellCastOpponentTriggeredAbility(
|
||||||
new DoIfCostPaid(
|
new DoIfCostPaid(
|
||||||
new DrawCardSourceControllerEffect(1),
|
new DrawCardSourceControllerEffect(1, "you"),
|
||||||
new ManaCostsImpl("{G}{G}")
|
new ManaCostsImpl("{G}{G}")
|
||||||
), filter, false
|
), filter, false
|
||||||
));
|
));
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
|
|
||||||
package mage.cards.g;
|
package mage.cards.g;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||||
import mage.abilities.common.EntersBattlefieldOrAttacksSourceTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldOrAttacksSourceTriggeredAbility;
|
||||||
|
@ -19,8 +17,9 @@ import mage.constants.SubType;
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author fireshoes
|
* @author fireshoes
|
||||||
*/
|
*/
|
||||||
public final class GlintSleeveSiphoner extends CardImpl {
|
public final class GlintSleeveSiphoner extends CardImpl {
|
||||||
|
@ -42,8 +41,7 @@ public final class GlintSleeveSiphoner extends CardImpl {
|
||||||
// At the beginning of your upkeep, you may pay {E}{E}. If you do, draw a card and you lose 1 life.
|
// At the beginning of your upkeep, you may pay {E}{E}. If you do, draw a card and you lose 1 life.
|
||||||
DoIfCostPaid doIfCostPaidEffect = new DoIfCostPaid(new DrawCardSourceControllerEffect(1), new PayEnergyCost(2));
|
DoIfCostPaid doIfCostPaidEffect = new DoIfCostPaid(new DrawCardSourceControllerEffect(1), new PayEnergyCost(2));
|
||||||
Effect effect = new LoseLifeSourceControllerEffect(1);
|
Effect effect = new LoseLifeSourceControllerEffect(1);
|
||||||
effect.setText("and you lose 1 life");
|
doIfCostPaidEffect.addEffect(effect.concatBy("and"));
|
||||||
doIfCostPaidEffect.addEffect(effect);
|
|
||||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, doIfCostPaidEffect, TargetController.YOU, false, false,
|
this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, doIfCostPaidEffect, TargetController.YOU, false, false,
|
||||||
"At the beginning of your upkeep, "));
|
"At the beginning of your upkeep, "));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
|
|
||||||
package mage.cards.m;
|
package mage.cards.m;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
@ -15,22 +13,21 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author emerald000
|
* @author emerald000
|
||||||
*/
|
*/
|
||||||
public final class MetalspinnersPuzzleknot extends CardImpl {
|
public final class MetalspinnersPuzzleknot extends CardImpl {
|
||||||
|
|
||||||
public MetalspinnersPuzzleknot(UUID ownerId, CardSetInfo setInfo) {
|
public MetalspinnersPuzzleknot(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}");
|
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
|
||||||
|
|
||||||
// When Metalspinner's Puzzleknot enters the battlefield, you draw a card and you lose 1 life.
|
// When Metalspinner's Puzzleknot enters the battlefield, you draw a card and you lose 1 life.
|
||||||
Effect drawEffect = new DrawCardSourceControllerEffect(1);
|
Effect drawEffect = new DrawCardSourceControllerEffect(1, "you");
|
||||||
drawEffect.setText("you draw a card");
|
|
||||||
Ability ability = new EntersBattlefieldTriggeredAbility(drawEffect);
|
Ability ability = new EntersBattlefieldTriggeredAbility(drawEffect);
|
||||||
Effect lifeEffect = new LoseLifeSourceControllerEffect(1);
|
Effect lifeEffect = new LoseLifeSourceControllerEffect(1);
|
||||||
lifeEffect.setText("and you lose 1 life");
|
ability.addEffect(lifeEffect.concatBy("and"));
|
||||||
ability.addEffect(lifeEffect);
|
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
// {2}{B}, Sacrifice Metalspinner's Puzzleknot: You draw a card and you lose 1 life.
|
// {2}{B}, Sacrifice Metalspinner's Puzzleknot: You draw a card and you lose 1 life.
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
|
|
||||||
package mage.cards.m;
|
package mage.cards.m;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.DiesThisOrAnotherCreatureTriggeredAbility;
|
import mage.abilities.common.DiesThisOrAnotherCreatureTriggeredAbility;
|
||||||
|
@ -17,8 +15,9 @@ import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Styxo
|
* @author Styxo
|
||||||
*/
|
*/
|
||||||
public final class MidnightEntourage extends CardImpl {
|
public final class MidnightEntourage extends CardImpl {
|
||||||
|
@ -42,10 +41,9 @@ public final class MidnightEntourage extends CardImpl {
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, 1, Duration.WhileOnBattlefield, filter, true)));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, 1, Duration.WhileOnBattlefield, filter, true)));
|
||||||
|
|
||||||
// Whenever Midnight Entourage or another Aetherborn you control dies, you draw a card and you lose 1 life.
|
// Whenever Midnight Entourage or another Aetherborn you control dies, you draw a card and you lose 1 life.
|
||||||
Ability ability = new DiesThisOrAnotherCreatureTriggeredAbility(new DrawCardSourceControllerEffect(1), false, filter);
|
Ability ability = new DiesThisOrAnotherCreatureTriggeredAbility(new DrawCardSourceControllerEffect(1, "you"), false, filter);
|
||||||
Effect effect = new LoseLifeSourceControllerEffect(1);
|
Effect effect = new LoseLifeSourceControllerEffect(1);
|
||||||
effect.setText("and you lose 1 life");
|
ability.addEffect(effect.concatBy("and"));
|
||||||
ability.addEffect(effect);
|
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
|
|
||||||
package mage.cards.o;
|
package mage.cards.o;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.LoyaltyAbility;
|
import mage.abilities.LoyaltyAbility;
|
||||||
import mage.abilities.common.PlaneswalkerEntersWithLoyaltyCountersAbility;
|
import mage.abilities.common.PlaneswalkerEntersWithLoyaltyCountersAbility;
|
||||||
import mage.abilities.effects.Effect;
|
import mage.abilities.effects.Effect;
|
||||||
|
@ -18,8 +16,9 @@ import mage.game.command.emblems.ObNixilisReignitedEmblem;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
import mage.target.common.TargetOpponent;
|
import mage.target.common.TargetOpponent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author fireshoes
|
* @author fireshoes
|
||||||
*/
|
*/
|
||||||
public final class ObNixilisReignited extends CardImpl {
|
public final class ObNixilisReignited extends CardImpl {
|
||||||
|
@ -32,12 +31,10 @@ public final class ObNixilisReignited extends CardImpl {
|
||||||
this.addAbility(new PlaneswalkerEntersWithLoyaltyCountersAbility(5));
|
this.addAbility(new PlaneswalkerEntersWithLoyaltyCountersAbility(5));
|
||||||
|
|
||||||
// +1: You draw a card and you lose 1 life.
|
// +1: You draw a card and you lose 1 life.
|
||||||
Effect effect = new DrawCardSourceControllerEffect(1);
|
Effect effect = new DrawCardSourceControllerEffect(1, "you");
|
||||||
effect.setText("You draw a card");
|
|
||||||
LoyaltyAbility ability1 = new LoyaltyAbility(effect, 1);
|
LoyaltyAbility ability1 = new LoyaltyAbility(effect, 1);
|
||||||
effect = new LoseLifeSourceControllerEffect(1);
|
effect = new LoseLifeSourceControllerEffect(1);
|
||||||
effect.setText("and you lose 1 life");
|
ability1.addEffect(effect.concatBy("and"));
|
||||||
ability1.addEffect(effect);
|
|
||||||
this.addAbility(ability1);
|
this.addAbility(ability1);
|
||||||
|
|
||||||
// -3: Destroy target creature.
|
// -3: Destroy target creature.
|
||||||
|
@ -47,7 +44,6 @@ public final class ObNixilisReignited extends CardImpl {
|
||||||
|
|
||||||
// -8: Target opponent gets an emblem with "Whenever a player draws a card, you lose 2 life."
|
// -8: Target opponent gets an emblem with "Whenever a player draws a card, you lose 2 life."
|
||||||
effect = new GetEmblemTargetPlayerEffect(new ObNixilisReignitedEmblem());
|
effect = new GetEmblemTargetPlayerEffect(new ObNixilisReignitedEmblem());
|
||||||
effect.setText("Target opponent gets an emblem with \"Whenever a player draws a card, you lose 2 life.\"");
|
|
||||||
LoyaltyAbility ability3 = new LoyaltyAbility(effect, -8);
|
LoyaltyAbility ability3 = new LoyaltyAbility(effect, -8);
|
||||||
ability3.addTarget(new TargetOpponent());
|
ability3.addTarget(new TargetOpponent());
|
||||||
this.addAbility(ability3);
|
this.addAbility(ability3);
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
|
|
||||||
package mage.abilities.effects;
|
package mage.abilities.effects;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.Mode;
|
import mage.abilities.Mode;
|
||||||
import mage.constants.EffectType;
|
import mage.constants.EffectType;
|
||||||
|
@ -10,8 +7,10 @@ import mage.constants.Outcome;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.target.targetpointer.TargetPointer;
|
import mage.target.targetpointer.TargetPointer;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author BetaSteward_at_googlemail.com
|
* @author BetaSteward_at_googlemail.com
|
||||||
*/
|
*/
|
||||||
public interface Effect extends Serializable {
|
public interface Effect extends Serializable {
|
||||||
|
@ -64,4 +63,7 @@ public interface Effect extends Serializable {
|
||||||
|
|
||||||
Effect copy();
|
Effect copy();
|
||||||
|
|
||||||
|
Effect concatBy(String concatPrefix);
|
||||||
|
|
||||||
|
String getConcatPrefix();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
|
|
||||||
package mage.abilities.effects;
|
package mage.abilities.effects;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.MageSingleton;
|
import mage.abilities.MageSingleton;
|
||||||
import mage.abilities.Mode;
|
import mage.abilities.Mode;
|
||||||
import mage.constants.EffectType;
|
import mage.constants.EffectType;
|
||||||
|
@ -11,8 +7,11 @@ import mage.constants.Outcome;
|
||||||
import mage.target.targetpointer.FirstTargetPointer;
|
import mage.target.targetpointer.FirstTargetPointer;
|
||||||
import mage.target.targetpointer.TargetPointer;
|
import mage.target.targetpointer.TargetPointer;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author BetaSteward_at_googlemail.com
|
* @author BetaSteward_at_googlemail.com
|
||||||
*/
|
*/
|
||||||
public abstract class EffectImpl implements Effect {
|
public abstract class EffectImpl implements Effect {
|
||||||
|
@ -23,7 +22,7 @@ public abstract class EffectImpl implements Effect {
|
||||||
protected TargetPointer targetPointer = FirstTargetPointer.getInstance();
|
protected TargetPointer targetPointer = FirstTargetPointer.getInstance();
|
||||||
protected String staticText = "";
|
protected String staticText = "";
|
||||||
protected Map<String, Object> values;
|
protected Map<String, Object> values;
|
||||||
protected boolean applyEffectsAfter = false;
|
protected String concatPrefix = ""; // combines multiple effects in text rule
|
||||||
|
|
||||||
public EffectImpl(Outcome outcome) {
|
public EffectImpl(Outcome outcome) {
|
||||||
this.id = UUID.randomUUID();
|
this.id = UUID.randomUUID();
|
||||||
|
@ -36,6 +35,7 @@ public abstract class EffectImpl implements Effect {
|
||||||
this.staticText = effect.staticText;
|
this.staticText = effect.staticText;
|
||||||
this.effectType = effect.effectType;
|
this.effectType = effect.effectType;
|
||||||
this.targetPointer = effect.targetPointer.copy();
|
this.targetPointer = effect.targetPointer.copy();
|
||||||
|
this.concatPrefix = effect.concatPrefix;
|
||||||
if (effect.values != null) {
|
if (effect.values != null) {
|
||||||
values = new HashMap<>();
|
values = new HashMap<>();
|
||||||
Map<String, Object> map = effect.values;
|
Map<String, Object> map = effect.values;
|
||||||
|
@ -43,7 +43,6 @@ public abstract class EffectImpl implements Effect {
|
||||||
values.put(entry.getKey(), entry.getValue());
|
values.put(entry.getKey(), entry.getValue());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.applyEffectsAfter = effect.applyEffectsAfter;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -112,4 +111,15 @@ public abstract class EffectImpl implements Effect {
|
||||||
}
|
}
|
||||||
return values.get(key);
|
return values.get(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Effect concatBy(String concatPrefix) {
|
||||||
|
this.concatPrefix = concatPrefix;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getConcatPrefix() {
|
||||||
|
return this.concatPrefix;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,6 +42,7 @@ public class Effects extends ArrayList<Effect> {
|
||||||
public String getText(Mode mode) {
|
public String getText(Mode mode) {
|
||||||
StringBuilder sbText = new StringBuilder();
|
StringBuilder sbText = new StringBuilder();
|
||||||
String lastRule = null;
|
String lastRule = null;
|
||||||
|
int effectNum = 0;
|
||||||
for (Effect effect : this) {
|
for (Effect effect : this) {
|
||||||
String endString = "";
|
String endString = "";
|
||||||
String nextRule = effect.getText(mode);
|
String nextRule = effect.getText(mode);
|
||||||
|
@ -50,9 +51,16 @@ public class Effects extends ArrayList<Effect> {
|
||||||
if (nextRule == null || nextRule.isEmpty()) {
|
if (nextRule == null || nextRule.isEmpty()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
effectNum++;
|
||||||
|
|
||||||
|
// concat effects (default: each effect with a new sentence)
|
||||||
|
String concatPrefix = effect.getConcatPrefix();
|
||||||
|
if (effectNum > 1 && !concatPrefix.isEmpty() && !concatPrefix.equals(".")) {
|
||||||
|
nextRule = concatPrefix + " " + nextRule;
|
||||||
|
}
|
||||||
|
|
||||||
if (nextRule != null) {
|
if (nextRule != null) {
|
||||||
if (nextRule.startsWith("and ") || nextRule.startsWith("with ")) {
|
if (nextRule.startsWith("and ") || nextRule.startsWith("with ") || nextRule.startsWith("then ")) {
|
||||||
endString = " ";
|
endString = " ";
|
||||||
} else if (nextRule.startsWith(",") || nextRule.startsWith(" ")) {
|
} else if (nextRule.startsWith(",") || nextRule.startsWith(" ")) {
|
||||||
endString = "";
|
endString = "";
|
||||||
|
|
|
@ -38,6 +38,7 @@ public class CopyTargetSpellEffect extends OneShotEffect {
|
||||||
super(effect);
|
super(effect);
|
||||||
this.useLKI = effect.useLKI;
|
this.useLKI = effect.useLKI;
|
||||||
this.useController = effect.useController;
|
this.useController = effect.useController;
|
||||||
|
this.copyThatSpellName = effect.copyThatSpellName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Effect withSpellName(String copyThatSpellName) {
|
public Effect withSpellName(String copyThatSpellName) {
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
|
|
||||||
package mage.abilities.effects.common;
|
package mage.abilities.effects.common;
|
||||||
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.dynamicvalue.DynamicValue;
|
import mage.abilities.dynamicvalue.DynamicValue;
|
||||||
import mage.abilities.dynamicvalue.common.MultikickerCount;
|
|
||||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
@ -18,20 +16,32 @@ import mage.util.CardUtil;
|
||||||
public class DrawCardSourceControllerEffect extends OneShotEffect {
|
public class DrawCardSourceControllerEffect extends OneShotEffect {
|
||||||
|
|
||||||
protected DynamicValue amount;
|
protected DynamicValue amount;
|
||||||
|
protected String whoDrawCard = "";
|
||||||
|
|
||||||
public DrawCardSourceControllerEffect(int amount) {
|
public DrawCardSourceControllerEffect(int amount) {
|
||||||
this(new StaticValue(amount));
|
this(amount, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
public DrawCardSourceControllerEffect(int amount, String whoDrawCard) {
|
||||||
|
this(new StaticValue(amount), whoDrawCard);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DrawCardSourceControllerEffect(DynamicValue amount) {
|
public DrawCardSourceControllerEffect(DynamicValue amount) {
|
||||||
|
this(amount, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
public DrawCardSourceControllerEffect(DynamicValue amount, String whoDrawCard) {
|
||||||
super(Outcome.DrawCard);
|
super(Outcome.DrawCard);
|
||||||
this.amount = amount.copy();
|
this.amount = amount.copy();
|
||||||
|
this.whoDrawCard = whoDrawCard;
|
||||||
setText();
|
setText();
|
||||||
}
|
}
|
||||||
|
|
||||||
public DrawCardSourceControllerEffect(final DrawCardSourceControllerEffect effect) {
|
public DrawCardSourceControllerEffect(final DrawCardSourceControllerEffect effect) {
|
||||||
super(effect);
|
super(effect);
|
||||||
this.amount = effect.amount.copy();
|
this.amount = effect.amount.copy();
|
||||||
|
this.whoDrawCard = effect.whoDrawCard;
|
||||||
|
setText();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -53,7 +63,7 @@ public class DrawCardSourceControllerEffect extends OneShotEffect {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
boolean oneCard = (amount instanceof StaticValue && amount.calculate(null, null, this) == 1)
|
boolean oneCard = (amount instanceof StaticValue && amount.calculate(null, null, this) == 1)
|
||||||
|| amount instanceof PermanentsOnBattlefieldCount || amount.toString().equals("1") || amount.toString().equals("a");
|
|| amount instanceof PermanentsOnBattlefieldCount || amount.toString().equals("1") || amount.toString().equals("a");
|
||||||
sb.append("draw ").append(oneCard ? "a" : CardUtil.numberToText(amount.toString())).append(" card");
|
sb.append(whoDrawCard.isEmpty() ? "" : whoDrawCard + " ").append("draw ").append(oneCard ? "a" : CardUtil.numberToText(amount.toString())).append(" card");
|
||||||
if (!oneCard) {
|
if (!oneCard) {
|
||||||
sb.append('s');
|
sb.append('s');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue