moved info from CardImpl to CardState and PermanentImpl + created InfoEffect for displaying rule info on Card

This commit is contained in:
betasteward 2015-03-10 14:57:55 -04:00
parent eb86378bc1
commit fe2cd395a6
55 changed files with 333 additions and 94 deletions

View file

@ -120,7 +120,7 @@ class CavernOfSoulsEffect extends OneShotEffect {
}
game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + typeChoice.getChoice());
game.getState().setValue(permanent.getId() + "_type", typeChoice.getChoice());
permanent.addInfo("chosen type", CardUtil.addToolTipMarkTags("Chosen type: " + typeChoice.getChoice()));
permanent.addInfo("chosen type", CardUtil.addToolTipMarkTags("Chosen type: " + typeChoice.getChoice()), game);
}
return false;
}

View file

@ -110,7 +110,7 @@ class RidersOfGavonyEffect extends OneShotEffect {
if (typeChoice.getChoice() != null) {
game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + typeChoice.getChoice());
game.getState().setValue(permanent.getId() + "_type", typeChoice.getChoice());
permanent.addInfo("chosen type", "<i>Chosen type: " + typeChoice.getChoice().toString() + "</i>");
permanent.addInfo("chosen type", "<i>Chosen type: " + typeChoice.getChoice().toString() + "</i>", game);
}
}
return false;

View file

@ -131,7 +131,7 @@ class KioraPreventionEffect extends PreventionEffectImpl {
for(UUID targetId :this.getTargetPointer().getTargets(game, source)) {
Permanent permanent = game.getPermanent(targetId);
if (permanent != null) {
permanent.addInfo(new StringBuilder("kioraPrevention").append(getId()).toString(),CardUtil.addToolTipMarkTags("All damage that would be dealt to and dealt by this permanent is prevented."));
permanent.addInfo(new StringBuilder("kioraPrevention").append(getId()).toString(),CardUtil.addToolTipMarkTags("All damage that would be dealt to and dealt by this permanent is prevented."), game);
}
}
}
@ -154,7 +154,7 @@ class KioraPreventionEffect extends PreventionEffectImpl {
for(UUID targetId :this.getTargetPointer().getTargets(game, source)) {
Permanent permanent = game.getPermanent(targetId);
if (permanent != null) {
permanent.addInfo(new StringBuilder("kioraPrevention").append(getId()).toString(),"");
permanent.addInfo(new StringBuilder("kioraPrevention").append(getId()).toString(),"", game);
}
}
return true;

View file

@ -113,7 +113,7 @@ class TrueNameNemesisChoosePlayerEffect extends OneShotEffect {
if (chosenPlayer != null) {
game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + chosenPlayer.getName());
game.getState().setValue(permanent.getId() + "_player", target.getFirstTarget());
permanent.addInfo("chosen player", "<i>Chosen player: " + chosenPlayer.getName() + "</i>");
permanent.addInfo("chosen player", "<i>Chosen player: " + chosenPlayer.getName() + "</i>", game);
return true;
}
}

View file

@ -103,7 +103,7 @@ class BitterFeudEntersBattlefieldEffect extends OneShotEffect {
game.getState().setValue(source.getSourceId() + "_player1", player1);
game.getState().setValue(source.getSourceId() + "_player2", player2);
game.informPlayers(permanent.getName() + ": " + controller.getName() + " has chosen " + player1.getName() + " and " + player2.getName());
permanent.addInfo("chosen players", "<font color = 'blue'>Chosen players: " + player1.getName() +", " + player2.getName() + "</font>");
permanent.addInfo("chosen players", "<font color = 'blue'>Chosen players: " + player1.getName() +", " + player2.getName() + "</font>", game);
return true;
}
}

View file

@ -115,7 +115,7 @@ class ChooseColorEffect extends OneShotEffect {
if (player.choose(Outcome.Neutral, colorChoice, game)) {
game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + colorChoice.getChoice());
game.getState().setValue(permanent.getId() + "_color", colorChoice.getColor());
permanent.addInfo("chosen color", "<font color = 'blue'>Chosen color: " + colorChoice.getColor().getDescription() + "</font>");
permanent.addInfo("chosen color", "<font color = 'blue'>Chosen color: " + colorChoice.getColor().getDescription() + "</font>", game);
}
}
return false;

View file

@ -35,6 +35,7 @@ import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.decorator.ConditionalReplacementEffect;
import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.InfoEffect;
import mage.abilities.effects.common.PreventAllDamageByAllEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
@ -69,7 +70,7 @@ public class BatwingBrume extends CardImpl {
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
new BatwingBrumeEffect(),
new ManaWasSpentCondition(ColoredManaSymbol.B), "Each player loses 1 life for each attacking creature he or she controls if {B} was spent to cast {this}"));
this.addInfo("Info1", "<i>(Do both if {W}{B} was spent.)<i>");
this.getSpellAbility().addEffect(new InfoEffect("<i>(Do both if {W}{B} was spent.)</i>"));
this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher());
}

View file

@ -31,6 +31,7 @@ import java.util.UUID;
import mage.abilities.condition.LockedInCondition;
import mage.abilities.condition.common.ManaWasSpentCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.InfoEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
@ -65,7 +66,7 @@ public class CankerousThirst extends CardImpl {
new LockedInCondition(new ManaWasSpentCondition(ColoredManaSymbol.G)),
"If {G} was spent to cast {this}, you may have target creature get +3/+3 until end of turn"));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.addInfo("Info1", "<i>(Do both if {B}{G} was spent.)<i>");
this.getSpellAbility().addEffect(new InfoEffect("<i>(Do both if {B}{G} was spent.)</i>"));
this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher());
}

View file

@ -34,6 +34,7 @@ import mage.abilities.condition.LockedInCondition;
import mage.abilities.condition.common.ManaWasSpentCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.ContinuousEffectImpl;
import mage.abilities.effects.common.InfoEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
@ -72,7 +73,7 @@ public class InvertTheSkies extends CardImpl {
new GainAbilityControlledEffect(FlyingAbility.getInstance(), Duration.EndOfTurn),
new LockedInCondition(new ManaWasSpentCondition(ColoredManaSymbol.U)),
"and creatures you control gain flying until end of turn if {U} was spent to cast it"));
this.addInfo("Info1", "<i>(Do both if {G}{U} was spent.)<i>");
this.getSpellAbility().addEffect(new InfoEffect("<i>(Do both if {G}{U} was spent.)</i>"));
this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher());
}

View file

@ -35,6 +35,7 @@ import mage.abilities.condition.common.ManaWasSpentCondition;
import mage.abilities.decorator.ConditionalContinuousRuleModifyingEffect;
import mage.abilities.effects.ContinuousRuleModifyingEffect;
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
import mage.abilities.effects.common.InfoEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.constants.CardType;
@ -72,7 +73,7 @@ public class Moonhold extends CardImpl {
effect2,
new LockedInCondition(new ManaWasSpentCondition(ColoredManaSymbol.W))));
this.getSpellAbility().addTarget(new TargetPlayer());
this.addInfo("Info1", "<i>(Do both if {R}{W} was spent.)</i>");
this.getSpellAbility().addEffect(new InfoEffect("<i>(Do both if {R}{W} was spent.)</i>"));
this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher());
}

View file

@ -30,6 +30,7 @@ package mage.sets.eventide;
import java.util.UUID;
import mage.abilities.condition.common.ManaWasSpentCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.InfoEffect;
import mage.abilities.effects.common.continuous.BoostAllEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
@ -71,7 +72,7 @@ public class UnnervingAssault extends CardImpl {
this.getSpellAbility().addEffect(new ConditionalContinuousEffect(
new BoostAllEffect(1, 0, Duration.EndOfTurn, filter2, false),
new ManaWasSpentCondition(ColoredManaSymbol.R), " and creatures you control get +1/0 until end of turn if {R} was spent to cast it"));
this.addInfo("Info1", "<i>(Do both if {U}{R} was spent.)</i>");
this.getSpellAbility().addEffect(new InfoEffect("<i>(Do both if {U}{R} was spent.)</i>"));
this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher());
}

View file

@ -102,7 +102,7 @@ class SummonersEggImprintEffect extends OneShotEffect {
Permanent permanent = game.getPermanent(source.getSourceId());
if (permanent != null) {
permanent.imprint(card.getId(), game);
permanent.addInfo("imprint", CardUtil.addToolTipMarkTags("[Imprinted card]"));
permanent.addInfo("imprint", CardUtil.addToolTipMarkTags("[Imprinted card]"), game);
}
}
}

View file

@ -107,7 +107,7 @@ class NevermoreEffect1 extends OneShotEffect {
String cardName = cardChoice.getChoice();
game.informPlayers(permanent.getLogName() + ", named card: [" + cardName + "]");
game.getState().setValue(source.getSourceId().toString(), cardName);
permanent.addInfo("named card", CardUtil.addToolTipMarkTags("Named card: [" + cardName +"]"));
permanent.addInfo("named card", CardUtil.addToolTipMarkTags("Named card: [" + cardName +"]"), game);
return true;
}
return false;

View file

@ -102,7 +102,7 @@ class HallOfTriumphEffect extends OneShotEffect {
if (colorChoice.getChoice() != null) {
game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + colorChoice.getChoice());
game.getState().setValue(permanent.getId() + "_color", colorChoice.getColor());
permanent.addInfo("chosen color", "<font color = 'blue'>Chosen color: " + colorChoice.getColor().getDescription() + "</font>");
permanent.addInfo("chosen color", "<font color = 'blue'>Chosen color: " + colorChoice.getColor().getDescription() + "</font>", game);
}
}
return false;

View file

@ -102,7 +102,7 @@ class AdaptiveAutomatonEffect extends OneShotEffect {
}
game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + typeChoice.getChoice());
game.getState().setValue(permanent.getId() + "_type", typeChoice.getChoice());
permanent.addInfo("chosen type", "<i>Chosen type: " + typeChoice.getChoice().toString() + "</i>");
permanent.addInfo("chosen type", "<i>Chosen type: " + typeChoice.getChoice().toString() + "</i>", game);
}
return false;
}

View file

@ -114,7 +114,7 @@ class ChooseCreatureTypeEffect extends OneShotEffect {
}
game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + typeChoice.getChoice());
game.getState().setValue(permanent.getId() + "_type", typeChoice.getChoice());
permanent.addInfo("chosen type", "<i>Chosen type: " + typeChoice.getChoice().toString() + "</i>");
permanent.addInfo("chosen type", "<i>Chosen type: " + typeChoice.getChoice().toString() + "</i>", game);
}
return false;
}

View file

@ -130,7 +130,7 @@ class EliteArcanistImprintEffect extends OneShotEffect {
Permanent permanent = game.getPermanent(source.getSourceId());
if (permanent != null) {
permanent.imprint(card.getId(), game);
permanent.addInfo("imprint", new StringBuilder("[Exiled card - ").append(card.getName()).append("]").toString());
permanent.addInfo("imprint", new StringBuilder("[Exiled card - ").append(card.getName()).append("]").toString(), game);
}
return true;
}

View file

@ -34,6 +34,7 @@ import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.InfoEffect;
import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
@ -70,7 +71,7 @@ public class ShadowbornApostle extends CardImpl {
this.toughness = new MageInt(1);
// A deck can have any number of cards named Shadowborn Apostle.
this.addInfo("rule", "A deck can have any number of cards named Shadowborn Apostle.");
this.getSpellAbility().addEffect(new InfoEffect("A deck can have any number of cards named Shadowborn Apostle."));
// {B}, Sacrifice six creatures named Shadowborn Apostle: Search your library for a Demon creature and put it onto the battlefield. Then shuffle your library.
Effect effect = new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(filter), false, true);
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{B}"));

View file

@ -111,7 +111,7 @@ class ObeliskOfUrdEnterBattlefieldEffect extends OneShotEffect {
}
game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + typeChoice.getChoice());
game.getState().setValue(permanent.getId() + "_type", typeChoice.getChoice());
permanent.addInfo("chosen type", "<i>Chosen type: " + typeChoice.getChoice() + "</i>");
permanent.addInfo("chosen type", "<i>Chosen type: " + typeChoice.getChoice() + "</i>", game);
}
return false;
}

View file

@ -109,7 +109,7 @@ class ExileTargetEffect extends OneShotEffect {
if (permanent != null) {
if(sourcePermananent != null){
sourcePermananent.imprint(permanent.getId(), game);
sourcePermananent.addInfo("imprint", new StringBuilder("[Imprinted card - ").append(permanent.getName()).append("]").toString());
sourcePermananent.addInfo("imprint", new StringBuilder("[Imprinted card - ").append(permanent.getName()).append("]").toString(), game);
}
return permanent.moveToExile(null, null, source.getSourceId(), game);
}

View file

@ -109,7 +109,7 @@ class ExtraplanarLensImprintEffect extends OneShotEffect {
if (targetLand != null) {
targetLand.moveToExile(null, extraplanarLens.getLogName() + " (Imprint)", source.getSourceId(), game);
extraplanarLens.imprint(targetLand.getId(), game);
extraplanarLens.addInfo("imprint", CardUtil.addToolTipMarkTags("[Imprinted card - " + targetLand.getLogName() + "]"));
extraplanarLens.addInfo("imprint", CardUtil.addToolTipMarkTags("[Imprinted card - " + targetLand.getLogName() + "]"), game);
}
}
return true;

View file

@ -113,7 +113,7 @@ class IsochronScepterImprintEffect extends OneShotEffect {
Permanent permanent = game.getPermanent(source.getSourceId());
if (permanent != null) {
permanent.imprint(card.getId(), game);
permanent.addInfo("imprint", CardUtil.addToolTipMarkTags("[Imprinted card - " + card.getLogName() + "]"));
permanent.addInfo("imprint", CardUtil.addToolTipMarkTags("[Imprinted card - " + card.getLogName() + "]"), game);
}
}
}

View file

@ -134,7 +134,7 @@ class SoulFoundryImprintEffect extends OneShotEffect {
Permanent permanent = game.getPermanent(source.getSourceId());
if (permanent != null) {
permanent.imprint(card.getId(), game);
permanent.addInfo("imprint", CardUtil.addToolTipMarkTags("[Imprinted card - " + card.getLogName() + "]"));
permanent.addInfo("imprint", CardUtil.addToolTipMarkTags("[Imprinted card - " + card.getLogName() + "]"), game);
}
}
}

View file

@ -110,7 +110,7 @@ class PhyrexianRevokerEffect1 extends OneShotEffect {
String cardName = cardChoice.getChoice();
game.informPlayers(permanent.getLogName() + ", named card: [" + cardName + "]");
game.getState().setValue(source.getSourceId().toString(), cardName);
permanent.addInfo("named card", CardUtil.addToolTipMarkTags("Named card: [" + cardName +"]"));
permanent.addInfo("named card", CardUtil.addToolTipMarkTags("Named card: [" + cardName +"]"), game);
return true;
}
return false;

View file

@ -104,7 +104,7 @@ class XenograftEffect extends OneShotEffect {
}
game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + typeChoice.getChoice());
game.getState().setValue(source.getSourceId() + "_XenograftType", typeChoice.getChoice());
permanent.addInfo("chosen type", "<i>Chosen type: " + typeChoice.getChoice().toString() + "</i>");
permanent.addInfo("chosen type", "<i>Chosen type: " + typeChoice.getChoice().toString() + "</i>", game);
}
return false;
}

View file

@ -111,7 +111,7 @@ class VoidstoneGargoyleChooseCardEffect extends OneShotEffect {
String cardName = cardChoice.getChoice();
game.informPlayers(permanent.getLogName() + ", named card: [" + cardName + "]");
game.getState().setValue(source.getSourceId().toString(), cardName);
permanent.addInfo("named card", CardUtil.addToolTipMarkTags("Named card: [" + cardName +"]"));
permanent.addInfo("named card", CardUtil.addToolTipMarkTags("Named card: [" + cardName +"]"), game);
return true;
}
return false;

View file

@ -97,7 +97,7 @@ class CurseOfWizardryChooseColorEffect extends OneShotEffect {
if (player.choose(Outcome.Detriment, colorChoice, game)) {
game.informPlayers(curseOfWizardry.getName() + ": " + player.getName() + " has chosen " + colorChoice.getChoice());
game.getState().setValue(curseOfWizardry.getId() + "_color", colorChoice.getColor());
curseOfWizardry.addInfo("chosen color", "<font color = 'blue'>Chosen color: " + colorChoice.getColor().getDescription() + "</font>");
curseOfWizardry.addInfo("chosen color", "<font color = 'blue'>Chosen color: " + colorChoice.getColor().getDescription() + "</font>", game);
}
}
return false;

View file

@ -36,6 +36,7 @@ import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.ManacostVariableValue;
import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.InfoEffect;
import mage.cards.CardImpl;
import mage.constants.ColoredManaSymbol;
import mage.constants.ManaType;
@ -62,7 +63,7 @@ public class DawnglowInfusion extends CardImpl {
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
new GainLifeEffect(xValue),
new ManaWasSpentCondition(ColoredManaSymbol.W), " And X life if {W} was spent to cast it"));
this.addInfo("Info1", "<i>(Do both if {G}{W} was spent.)</i>");
this.getSpellAbility().addEffect(new InfoEffect("<i>(Do both if {G}{W} was spent.)</i>"));
this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher());

View file

@ -31,6 +31,7 @@ import java.util.UUID;
import mage.abilities.condition.common.ManaWasSpentCondition;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.DamageAllEffect;
import mage.abilities.effects.common.InfoEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
@ -68,7 +69,7 @@ public class Firespout extends CardImpl {
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
new DamageAllEffect(3, filter2),
new ManaWasSpentCondition(ColoredManaSymbol.G), " And 3 damage to each creature with flying if {G} was spent to cast it"));
this.addInfo("Info1", "<i>(Do both if {R}{G} was spent.)</i>");
this.getSpellAbility().addEffect(new InfoEffect("<i>(Do both if {R}{G} was spent.)</i>"));
this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher());

View file

@ -100,7 +100,7 @@ class LureboundScarecrowChooseColorEffect extends OneShotEffect {
if (player.choose(Outcome.BoostCreature, colorChoice, game)) {
game.informPlayers(sourceStackObject.getName() + ": " + player.getName() + " has chosen " + colorChoice.getChoice());
game.getState().setValue(permanent.getId() + "_color", colorChoice.getColor());
permanent.addInfo("chosen color", new StringBuilder("<font color='blue'>Chosen color: ").append(colorChoice.getColor().getDescription()).append("</font>").toString());
permanent.addInfo("chosen color", new StringBuilder("<font color='blue'>Chosen color: ").append(colorChoice.getColor().getDescription()).append("</font>").toString(), game);
}
}
return false;

View file

@ -104,7 +104,7 @@ class ChooseColorEffect extends OneShotEffect {
if (player.choose(Outcome.Neutral, colorChoice, game)) {
game.informPlayers(new StringBuilder(permanent.getName()).append(": ").append(player.getName()).append(" has chosen ").append(colorChoice.getChoice()).toString());
game.getState().setValue(source.getSourceId() + "_color", colorChoice.getColor());
permanent.addInfo("chosen color", "<font color = 'blue'>Chosen color: " + colorChoice.getColor().getDescription() + "</font>");
permanent.addInfo("chosen color", "<font color = 'blue'>Chosen color: " + colorChoice.getColor().getDescription() + "</font>", game);
}
return true;
}

View file

@ -32,6 +32,7 @@ import mage.abilities.condition.common.ManaWasSpentCondition;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.CounterTargetEffect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.InfoEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.ColoredManaSymbol;
@ -64,7 +65,7 @@ public class RepelIntruders extends CardImpl {
new CounterTargetEffect(),
new ManaWasSpentCondition(ColoredManaSymbol.U), " Counter up to one target creature spell if {U} was spent to cast {this}"));
this.getSpellAbility().addTarget(target);
this.addInfo("Info1", "<i>(Do both if {W}{U} was spent.)</i>");
this.getSpellAbility().addEffect(new InfoEffect("<i>(Do both if {W}{U} was spent.)</i>"));
this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher());
}

View file

@ -32,6 +32,7 @@ import mage.abilities.Ability;
import mage.abilities.condition.common.ManaWasSpentCondition;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.InfoEffect;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
@ -74,7 +75,7 @@ public class RiversGrasp extends CardImpl {
this.getSpellAbility().addTarget(targetCreature);
this.getSpellAbility().addTarget(targetPlayer);
this.addInfo("Info1", "<i>(Do both if {U}{B} was spent.)</i>");
this.getSpellAbility().addEffect(new InfoEffect("<i>(Do both if {U}{B} was spent.)</i>"));
this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher());
}

View file

@ -33,6 +33,7 @@ import mage.abilities.condition.common.ManaWasSpentCondition;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.InfoEffect;
import mage.abilities.effects.common.ReturnToBattlefieldUnderYourControlTargetEffect;
import mage.abilities.effects.common.continuous.BoostAllEffect;
import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
@ -76,7 +77,7 @@ public class TorrentOfSouls extends CardImpl {
this.getSpellAbility().addTarget(targetCreature);
this.getSpellAbility().addTarget(targetPlayer);
this.addInfo("Info1", "<i>(Do both if {B}{R} was spent.)</i>");
this.getSpellAbility().addEffect(new InfoEffect("<i>(Do both if {B}{R} was spent.)</i>"));
this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher());
}

View file

@ -40,6 +40,7 @@ import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.ContinuousEffectImpl;
import mage.abilities.effects.common.InfoEffect;
import mage.cards.CardImpl;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.NamePredicate;
@ -70,7 +71,7 @@ public class RelentlessRats extends CardImpl {
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new RelentlessRatsEffect()));
// A deck can have any number of cards named Relentless Rats.
this.addInfo("rule", "A deck can have any number of cards named Relentless Rats.");
this.getSpellAbility().addEffect(new InfoEffect("A deck can have any number of cards named Relentless Rats."));
}
public RelentlessRats(final RelentlessRats card) {

View file

@ -107,7 +107,7 @@ class IonaShieldOfEmeriaChooseColorEffect extends OneShotEffect {
if (player.choose(Outcome.Detriment, colorChoice, game)) {
game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + colorChoice.getChoice());
game.getState().setValue(permanent.getId() + "_color", colorChoice.getColor());
permanent.addInfo("chosen color", CardUtil.addToolTipMarkTags("Chosen color: " + colorChoice.getColor().getDescription()));
permanent.addInfo("chosen color", CardUtil.addToolTipMarkTags("Chosen color: " + colorChoice.getColor().getDescription()), game);
}
return true;
}