mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00: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;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public final class BaralChiefOfCompliance extends CardImpl {
|
||||
|
@ -35,7 +34,7 @@ public final class BaralChiefOfCompliance extends CardImpl {
|
|||
public BaralChiefOfCompliance(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}");
|
||||
|
||||
addSuperType(SuperType.LEGENDARY);
|
||||
addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.HUMAN, SubType.WIZARD);
|
||||
this.power = new MageInt(1);
|
||||
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)));
|
||||
|
||||
// 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) {
|
||||
|
|
|
@ -23,7 +23,7 @@ import mage.filter.FilterSpell;
|
|||
*/
|
||||
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 {
|
||||
filter.add(SubType.WIZARD.getPredicate());
|
||||
|
|
|
@ -41,7 +41,7 @@ public final class LamplighterOfSelhoff extends CardImpl {
|
|||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
triggeredAbility,
|
||||
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) {
|
||||
|
|
|
@ -34,7 +34,7 @@ public final class MaraudingLooter extends CardImpl {
|
|||
Ability ability = new ConditionalInterveningIfTriggeredAbility(
|
||||
new BeginningOfEndStepTriggeredAbility(new DrawDiscardControllerEffect(1, 1, true), TargetController.YOU, false),
|
||||
RaidCondition.instance,
|
||||
"<i>Raid</i> — At the beginning of your end step, "
|
||||
"At the beginning of your end step, "
|
||||
+ "if you attacked this turn, "
|
||||
+ "you may draw a card. If you do, discard a card.");
|
||||
ability.setAbilityWord(AbilityWord.RAID);
|
||||
|
|
|
@ -24,7 +24,7 @@ import mage.target.TargetSpell;
|
|||
*/
|
||||
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 {
|
||||
filter.add(Predicates.or(
|
||||
|
|
|
@ -32,7 +32,7 @@ public final class Probe extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
|
||||
new DiscardTargetEffect(2),
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
|
||||
|
||||
package mage.cards.r;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.effects.common.DrawDiscardControllerEffect;
|
||||
|
@ -10,15 +7,20 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.common.FilterArtifactSpell;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Loki, North
|
||||
*/
|
||||
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.ARTIFICER);
|
||||
|
||||
|
@ -26,10 +28,12 @@ public final class Riddlesmith extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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.
|
||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(
|
||||
new EntersBattlefieldTriggeredAbility(new DrawDiscardControllerEffect(1, 1, true)),
|
||||
RaidCondition.instance,
|
||||
"<i>Raid</i> — When {this} enters the battlefield, if you attacked this turn, you may draw a card. If you do, discard a card.");
|
||||
RaidCondition.instance, "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.addHint(RaidHint.instance);
|
||||
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.
|
||||
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) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
package mage.abilities.effects.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
|
@ -9,19 +9,22 @@ import mage.players.Player;
|
|||
import mage.util.CardUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class DrawDiscardControllerEffect extends OneShotEffect {
|
||||
|
||||
private int cardsToDraw;
|
||||
private int cardsToDiscard;
|
||||
private boolean optional;
|
||||
private final int cardsToDraw;
|
||||
private final int cardsToDiscard;
|
||||
private final boolean optional;
|
||||
|
||||
public DrawDiscardControllerEffect() {
|
||||
this(1, 1);
|
||||
}
|
||||
|
||||
public DrawDiscardControllerEffect(boolean optional) {
|
||||
this(1, 1, optional);
|
||||
}
|
||||
|
||||
public DrawDiscardControllerEffect(int cardsToDraw, int cardsToDiscard) {
|
||||
this(cardsToDraw, cardsToDiscard, false);
|
||||
}
|
||||
|
@ -31,14 +34,6 @@ public class DrawDiscardControllerEffect extends OneShotEffect {
|
|||
this.cardsToDraw = cardsToDraw;
|
||||
this.cardsToDiscard = cardsToDiscard;
|
||||
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) {
|
||||
|
@ -56,14 +51,31 @@ public class DrawDiscardControllerEffect extends OneShotEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null) {
|
||||
if (!optional || player.chooseUse(outcome, "Use draw, then discard effect?", source, game)) {
|
||||
player.drawCards(cardsToDraw, source, game);
|
||||
player.discard(cardsToDiscard, false, false, source, game);
|
||||
}
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
if (optional && !player.chooseUse(outcome, "Draw, then discard?", source, game)) {
|
||||
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…
Reference in a new issue