1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-03-13 01:09:53 -09:00

fixed Conjurer's Ban text

This commit is contained in:
Evan Kranzler 2020-05-01 18:31:29 -04:00
parent 4ceaeeebad
commit 11d71d061d

View file

@ -1,7 +1,5 @@
package mage.cards.c;
import java.util.UUID;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
@ -15,8 +13,9 @@ import mage.constants.Outcome;
import mage.game.Game;
import mage.game.events.GameEvent;
import java.util.UUID;
/**
*
* @author noahg
*/
public final class ConjurersBan extends CardImpl {
@ -24,7 +23,6 @@ public final class ConjurersBan extends CardImpl {
public ConjurersBan(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{W}{B}");
// Choose a card name. Until your next turn, spells with the chosen name cant be cast and lands with the chosen name cant be played.
this.getSpellAbility().addEffect(new ChooseACardNameEffect(ChooseACardNameEffect.TypeOfName.ALL));
this.getSpellAbility().addEffect(new ConjurersBanEffect());
@ -33,7 +31,7 @@ public final class ConjurersBan extends CardImpl {
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1));
}
public ConjurersBan(final ConjurersBan card) {
private ConjurersBan(final ConjurersBan card) {
super(card);
}
@ -45,12 +43,12 @@ public final class ConjurersBan extends CardImpl {
class ConjurersBanEffect extends ContinuousRuleModifyingEffectImpl {
public ConjurersBanEffect() {
ConjurersBanEffect() {
super(Duration.UntilYourNextTurn, Outcome.Detriment, true, false);
this.staticText = "spells with the chosen name can't be cast and lands with the chosen name can't be played";
this.staticText = "Until your next turn spells with the chosen name can't be cast and lands with the chosen name can't be played";
}
public ConjurersBanEffect(final ConjurersBanEffect effect) {
private ConjurersBanEffect(final ConjurersBanEffect effect) {
super(effect);
}
@ -77,9 +75,9 @@ class ConjurersBanEffect extends ContinuousRuleModifyingEffectImpl {
public String getInfoMessage(Ability source, GameEvent event, Game game) {
String namedCard = (String) game.getState().getValue(source.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY);
String playerName = game.getPlayer(source.getControllerId()).getName();
if (namedCard == null || playerName == null || source.getSourceObject(game) == null){
if (namedCard == null || playerName == null || source.getSourceObject(game) == null) {
return super.getInfoMessage(source, event, game);
}
return "Until "+playerName+"'s next turn, spells named "+namedCard+" can't be cast and lands named "+namedCard+" can't be played ("+source.getSourceObject(game).getIdName()+").";
return "Until " + playerName + "'s next turn, spells named " + namedCard + " can't be cast and lands named " + namedCard + " can't be played (" + source.getSourceObject(game).getIdName() + ").";
}
}