mirror of
https://github.com/correl/mage.git
synced 2025-03-16 09:16:26 -09:00
fixed text on various cards which draw and discard
This commit is contained in:
parent
c28da75ac1
commit
8da3a78273
10 changed files with 52 additions and 38 deletions
|
@ -18,7 +18,6 @@ import mage.filter.predicate.Predicates;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author fireshoes
|
* @author fireshoes
|
||||||
*/
|
*/
|
||||||
public final class BaralChiefOfCompliance extends CardImpl {
|
public final class BaralChiefOfCompliance extends CardImpl {
|
||||||
|
@ -35,7 +34,7 @@ public final class BaralChiefOfCompliance extends CardImpl {
|
||||||
public BaralChiefOfCompliance(UUID ownerId, CardSetInfo setInfo) {
|
public BaralChiefOfCompliance(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}");
|
||||||
|
|
||||||
addSuperType(SuperType.LEGENDARY);
|
addSuperType(SuperType.LEGENDARY);
|
||||||
this.subtype.add(SubType.HUMAN, SubType.WIZARD);
|
this.subtype.add(SubType.HUMAN, SubType.WIZARD);
|
||||||
this.power = new MageInt(1);
|
this.power = new MageInt(1);
|
||||||
this.toughness = new MageInt(3);
|
this.toughness = new MageInt(3);
|
||||||
|
@ -44,7 +43,7 @@ public final class BaralChiefOfCompliance extends CardImpl {
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SpellsCostReductionControllerEffect(filter, 1)));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SpellsCostReductionControllerEffect(filter, 1)));
|
||||||
|
|
||||||
// Whenever a spell or ability you control counters a spell, you may draw a card. If you do, discard a card.
|
// Whenever a spell or ability you control counters a spell, you may draw a card. If you do, discard a card.
|
||||||
this.addAbility(new SpellCounteredControllerTriggeredAbility(new DrawDiscardControllerEffect(), true));
|
this.addAbility(new SpellCounteredControllerTriggeredAbility(new DrawDiscardControllerEffect(true)));
|
||||||
}
|
}
|
||||||
|
|
||||||
private BaralChiefOfCompliance(final BaralChiefOfCompliance card) {
|
private BaralChiefOfCompliance(final BaralChiefOfCompliance card) {
|
||||||
|
|
|
@ -23,7 +23,7 @@ import mage.filter.FilterSpell;
|
||||||
*/
|
*/
|
||||||
public final class InspiredSprite extends CardImpl {
|
public final class InspiredSprite extends CardImpl {
|
||||||
|
|
||||||
private static final FilterSpell filter = new FilterSpell("Wizard");
|
private static final FilterSpell filter = new FilterSpell("a Wizard spell");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(SubType.WIZARD.getPredicate());
|
filter.add(SubType.WIZARD.getPredicate());
|
||||||
|
|
|
@ -41,7 +41,7 @@ public final class LamplighterOfSelhoff extends CardImpl {
|
||||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||||
triggeredAbility,
|
triggeredAbility,
|
||||||
new PermanentsOnTheBattlefieldCondition(filter),
|
new PermanentsOnTheBattlefieldCondition(filter),
|
||||||
"When {this} enters the battlefield, if you control another Zombie, you may a draw card. If you do, discard a card."));
|
"When {this} enters the battlefield, if you control another Zombie, you may draw a card. If you do, discard a card."));
|
||||||
}
|
}
|
||||||
|
|
||||||
private LamplighterOfSelhoff(final LamplighterOfSelhoff card) {
|
private LamplighterOfSelhoff(final LamplighterOfSelhoff card) {
|
||||||
|
|
|
@ -34,7 +34,7 @@ public final class MaraudingLooter extends CardImpl {
|
||||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(
|
Ability ability = new ConditionalInterveningIfTriggeredAbility(
|
||||||
new BeginningOfEndStepTriggeredAbility(new DrawDiscardControllerEffect(1, 1, true), TargetController.YOU, false),
|
new BeginningOfEndStepTriggeredAbility(new DrawDiscardControllerEffect(1, 1, true), TargetController.YOU, false),
|
||||||
RaidCondition.instance,
|
RaidCondition.instance,
|
||||||
"<i>Raid</i> — At the beginning of your end step, "
|
"At the beginning of your end step, "
|
||||||
+ "if you attacked this turn, "
|
+ "if you attacked this turn, "
|
||||||
+ "you may draw a card. If you do, discard a card.");
|
+ "you may draw a card. If you do, discard a card.");
|
||||||
ability.setAbilityWord(AbilityWord.RAID);
|
ability.setAbilityWord(AbilityWord.RAID);
|
||||||
|
|
|
@ -24,7 +24,7 @@ import mage.target.TargetSpell;
|
||||||
*/
|
*/
|
||||||
public final class NivixGuildmage extends CardImpl {
|
public final class NivixGuildmage extends CardImpl {
|
||||||
|
|
||||||
private static final FilterSpell filter = new FilterSpell("instant or sorcery spell");
|
private static final FilterSpell filter = new FilterSpell("instant or sorcery spell you control");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(Predicates.or(
|
filter.add(Predicates.or(
|
||||||
|
|
|
@ -32,7 +32,7 @@ public final class Probe extends CardImpl {
|
||||||
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
|
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
|
||||||
new DiscardTargetEffect(2),
|
new DiscardTargetEffect(2),
|
||||||
KickedCondition.instance,
|
KickedCondition.instance,
|
||||||
"<br><br>If this spell was kicked, target player discards two cards"));
|
"If this spell was kicked, target player discards two cards"));
|
||||||
this.getSpellAbility().setTargetAdjuster(ProbeAdjuster.instance);
|
this.getSpellAbility().setTargetAdjuster(ProbeAdjuster.instance);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
|
|
||||||
|
|
||||||
package mage.cards.r;
|
package mage.cards.r;
|
||||||
|
|
||||||
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.DrawDiscardControllerEffect;
|
import mage.abilities.effects.common.DrawDiscardControllerEffect;
|
||||||
|
@ -10,15 +7,20 @@ 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.FilterSpell;
|
||||||
import mage.filter.common.FilterArtifactSpell;
|
import mage.filter.common.FilterArtifactSpell;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Loki, North
|
* @author Loki, North
|
||||||
*/
|
*/
|
||||||
public final class Riddlesmith extends CardImpl {
|
public final class Riddlesmith extends CardImpl {
|
||||||
public Riddlesmith (UUID ownerId, CardSetInfo setInfo) {
|
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}");
|
private static final FilterSpell filter = new FilterArtifactSpell("an artifact spell");
|
||||||
|
|
||||||
|
public Riddlesmith(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}");
|
||||||
this.subtype.add(SubType.HUMAN);
|
this.subtype.add(SubType.HUMAN);
|
||||||
this.subtype.add(SubType.ARTIFICER);
|
this.subtype.add(SubType.ARTIFICER);
|
||||||
|
|
||||||
|
@ -26,10 +28,12 @@ public final class Riddlesmith extends CardImpl {
|
||||||
this.toughness = new MageInt(1);
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
// Whenever you cast an artifact spell, you may draw a card. If you do, discard a card.
|
// Whenever you cast an artifact spell, you may draw a card. If you do, discard a card.
|
||||||
this.addAbility(new SpellCastControllerTriggeredAbility(new DrawDiscardControllerEffect(), new FilterArtifactSpell("an artifact spell"), true));
|
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||||
|
new DrawDiscardControllerEffect(true), filter, false
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public Riddlesmith (final Riddlesmith card) {
|
public Riddlesmith(final Riddlesmith card) {
|
||||||
super(card);
|
super(card);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,8 +32,7 @@ public final class ShipwreckLooter extends CardImpl {
|
||||||
// Raid - When Shipwreck Looter enters the battlefield,if you attacked this turn, you may draw a card. If you do, discard a card.
|
// Raid - When Shipwreck Looter enters the battlefield,if you attacked this turn, you may draw a card. If you do, discard a card.
|
||||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(
|
Ability ability = new ConditionalInterveningIfTriggeredAbility(
|
||||||
new EntersBattlefieldTriggeredAbility(new DrawDiscardControllerEffect(1, 1, true)),
|
new EntersBattlefieldTriggeredAbility(new DrawDiscardControllerEffect(1, 1, true)),
|
||||||
RaidCondition.instance,
|
RaidCondition.instance, "When {this} enters the battlefield, if you attacked this turn, you may draw a card. If you do, discard a card.");
|
||||||
"<i>Raid</i> — When {this} enters the battlefield, if you attacked this turn, you may draw a card. If you do, discard a card.");
|
|
||||||
ability.setAbilityWord(AbilityWord.RAID);
|
ability.setAbilityWord(AbilityWord.RAID);
|
||||||
ability.addHint(RaidHint.instance);
|
ability.addHint(RaidHint.instance);
|
||||||
this.addAbility(ability, new PlayerAttackedWatcher());
|
this.addAbility(ability, new PlayerAttackedWatcher());
|
||||||
|
|
|
@ -32,7 +32,7 @@ public final class TrialOfKnowledge extends CardImpl {
|
||||||
|
|
||||||
// When a Cartouche enters the battlefield under your control, return Trial of Knowledge to its owner's hand.
|
// When a Cartouche enters the battlefield under your control, return Trial of Knowledge to its owner's hand.
|
||||||
this.addAbility(new EntersBattlefieldControlledTriggeredAbility(new ReturnToHandSourceEffect(), filter,
|
this.addAbility(new EntersBattlefieldControlledTriggeredAbility(new ReturnToHandSourceEffect(), filter,
|
||||||
"When a Cartouche enters the battlefield under your control, return {this} to its owner's hand"));
|
"When a Cartouche enters the battlefield under your control, return {this} to its owner's hand."));
|
||||||
}
|
}
|
||||||
|
|
||||||
private TrialOfKnowledge(final TrialOfKnowledge card) {
|
private TrialOfKnowledge(final TrialOfKnowledge card) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
package mage.abilities.effects.common;
|
package mage.abilities.effects.common;
|
||||||
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.Mode;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
|
@ -9,19 +9,22 @@ import mage.players.Player;
|
||||||
import mage.util.CardUtil;
|
import mage.util.CardUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author BetaSteward_at_googlemail.com
|
* @author BetaSteward_at_googlemail.com
|
||||||
*/
|
*/
|
||||||
public class DrawDiscardControllerEffect extends OneShotEffect {
|
public class DrawDiscardControllerEffect extends OneShotEffect {
|
||||||
|
|
||||||
private int cardsToDraw;
|
private final int cardsToDraw;
|
||||||
private int cardsToDiscard;
|
private final int cardsToDiscard;
|
||||||
private boolean optional;
|
private final boolean optional;
|
||||||
|
|
||||||
public DrawDiscardControllerEffect() {
|
public DrawDiscardControllerEffect() {
|
||||||
this(1, 1);
|
this(1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public DrawDiscardControllerEffect(boolean optional) {
|
||||||
|
this(1, 1, optional);
|
||||||
|
}
|
||||||
|
|
||||||
public DrawDiscardControllerEffect(int cardsToDraw, int cardsToDiscard) {
|
public DrawDiscardControllerEffect(int cardsToDraw, int cardsToDiscard) {
|
||||||
this(cardsToDraw, cardsToDiscard, false);
|
this(cardsToDraw, cardsToDiscard, false);
|
||||||
}
|
}
|
||||||
|
@ -31,14 +34,6 @@ public class DrawDiscardControllerEffect extends OneShotEffect {
|
||||||
this.cardsToDraw = cardsToDraw;
|
this.cardsToDraw = cardsToDraw;
|
||||||
this.cardsToDiscard = cardsToDiscard;
|
this.cardsToDiscard = cardsToDiscard;
|
||||||
this.optional = optional;
|
this.optional = optional;
|
||||||
staticText = new StringBuilder(optional ? "you may " : "")
|
|
||||||
.append("draw ")
|
|
||||||
.append(cardsToDraw == 1 ? "a" : CardUtil.numberToText(cardsToDraw))
|
|
||||||
.append(" card").append(cardsToDraw == 1 ? "" : "s")
|
|
||||||
.append(optional ? ", if you do" : ", then")
|
|
||||||
.append(" discard ")
|
|
||||||
.append(cardsToDiscard == 1 ? "a" : CardUtil.numberToText(cardsToDiscard))
|
|
||||||
.append(" card").append(cardsToDiscard == 1 ? "" : "s").toString();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public DrawDiscardControllerEffect(final DrawDiscardControllerEffect effect) {
|
public DrawDiscardControllerEffect(final DrawDiscardControllerEffect effect) {
|
||||||
|
@ -56,14 +51,31 @@ public class DrawDiscardControllerEffect extends OneShotEffect {
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player player = game.getPlayer(source.getControllerId());
|
Player player = game.getPlayer(source.getControllerId());
|
||||||
if (player != null) {
|
if (player == null) {
|
||||||
if (!optional || player.chooseUse(outcome, "Use draw, then discard effect?", source, game)) {
|
return false;
|
||||||
player.drawCards(cardsToDraw, source, game);
|
}
|
||||||
player.discard(cardsToDiscard, false, false, source, game);
|
if (optional && !player.chooseUse(outcome, "Draw, then discard?", source, game)) {
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
player.drawCards(cardsToDraw, source, game);
|
||||||
|
player.discard(cardsToDiscard, false, false, source, game);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getText(Mode mode) {
|
||||||
|
if (staticText != null && !staticText.isEmpty()) {
|
||||||
|
return staticText;
|
||||||
|
}
|
||||||
|
return (optional ? "you may " : "") +
|
||||||
|
"draw " +
|
||||||
|
(cardsToDraw == 1 ? "a" : CardUtil.numberToText(cardsToDraw)) +
|
||||||
|
" card" +
|
||||||
|
(cardsToDraw == 1 ? "" : "s") +
|
||||||
|
(optional ? ". If you do," : ", then") +
|
||||||
|
" discard " +
|
||||||
|
(cardsToDiscard == 1 ? "a" : CardUtil.numberToText(cardsToDiscard)) +
|
||||||
|
" card" +
|
||||||
|
(cardsToDiscard == 1 ? "" : "s");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue