* If you control a commander - added card hints;

This commit is contained in:
Oleg Agafonov 2020-08-17 04:03:54 +04:00
parent fcaacd8c1e
commit a4af5501f9
6 changed files with 46 additions and 5 deletions

View file

@ -3,6 +3,7 @@ package mage.cards.d;
import mage.abilities.condition.common.ControlACommanderCondition;
import mage.abilities.costs.AlternativeCostSourceAbility;
import mage.abilities.effects.common.ExileTargetEffect;
import mage.abilities.hint.common.ControlACommanderHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
@ -19,7 +20,9 @@ public final class DeadlyRollick extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{B}");
// If you control a commander, you may cast this card without paying its mana cost
this.addAbility(new AlternativeCostSourceAbility(null, ControlACommanderCondition.instance));
this.addAbility(new AlternativeCostSourceAbility(null, ControlACommanderCondition.instance)
.addHint(ControlACommanderHint.instance)
);
// Exile target creature.
this.getSpellAbility().addEffect(new ExileTargetEffect());

View file

@ -3,6 +3,7 @@ package mage.cards.d;
import mage.abilities.condition.common.ControlACommanderCondition;
import mage.abilities.costs.AlternativeCostSourceAbility;
import mage.abilities.effects.common.ChooseNewTargetsTargetEffect;
import mage.abilities.hint.common.ControlACommanderHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
@ -19,7 +20,9 @@ public final class DeflectingSwat extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{R}");
// If you control a commander, you may cast this spell without paying its mana cost.
this.addAbility(new AlternativeCostSourceAbility(null, ControlACommanderCondition.instance));
this.addAbility(new AlternativeCostSourceAbility(null, ControlACommanderCondition.instance)
.addHint(ControlACommanderHint.instance)
);
// You may chose new targets for target spell or ability.
this.getSpellAbility().addTarget(new TargetStackObject());

View file

@ -3,6 +3,7 @@ package mage.cards.f;
import mage.abilities.condition.common.ControlACommanderCondition;
import mage.abilities.costs.AlternativeCostSourceAbility;
import mage.abilities.effects.common.CounterTargetEffect;
import mage.abilities.hint.common.ControlACommanderHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
@ -20,7 +21,9 @@ public final class FierceGuardianship extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{U}");
// If you control a commander, you may cast this spell without paying its mana cost.
this.addAbility(new AlternativeCostSourceAbility(null, ControlACommanderCondition.instance));
this.addAbility(new AlternativeCostSourceAbility(null, ControlACommanderCondition.instance)
.addHint(ControlACommanderHint.instance)
);
// Counter target noncreature spell.
this.getSpellAbility().addEffect(new CounterTargetEffect());

View file

@ -3,6 +3,7 @@ package mage.cards.f;
import mage.abilities.condition.common.ControlACommanderCondition;
import mage.abilities.costs.AlternativeCostSourceAbility;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.hint.common.ControlACommanderHint;
import mage.abilities.keyword.IndestructibleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@ -21,7 +22,9 @@ public final class FlawlessManeuver extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{W}");
// If you control a commander, you may cast this spell without paying its mana cost.
this.addAbility(new AlternativeCostSourceAbility(null, ControlACommanderCondition.instance));
this.addAbility(new AlternativeCostSourceAbility(null, ControlACommanderCondition.instance)
.addHint(ControlACommanderHint.instance)
);
// Creatures you control gain indestructible until end of turn.
this.getSpellAbility().addEffect(new GainAbilityControlledEffect(

View file

@ -3,6 +3,7 @@ package mage.cards.o;
import mage.abilities.condition.common.ControlACommanderCondition;
import mage.abilities.costs.AlternativeCostSourceAbility;
import mage.abilities.effects.common.PreventAllDamageByAllObjectsEffect;
import mage.abilities.hint.common.ControlACommanderHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
@ -24,7 +25,9 @@ public final class ObscuringHaze extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{G}");
// If you control a commander, you may cast this spell without paying its mana cost.
this.addAbility(new AlternativeCostSourceAbility(null, ControlACommanderCondition.instance));
this.addAbility(new AlternativeCostSourceAbility(null, ControlACommanderCondition.instance)
.addHint(ControlACommanderHint.instance)
);
// Prevent all damage that would be dealt this turn by creatures your opponents control.
this.getSpellAbility().addEffect(new PreventAllDamageByAllObjectsEffect(

View file

@ -0,0 +1,26 @@
package mage.abilities.hint.common;
import mage.abilities.Ability;
import mage.abilities.condition.common.ControlACommanderCondition;
import mage.abilities.hint.ConditionHint;
import mage.abilities.hint.Hint;
import mage.game.Game;
/**
* @author JayDi85
*/
public enum ControlACommanderHint implements Hint {
instance;
private static final ConditionHint hint = new ConditionHint(ControlACommanderCondition.instance, "You control a commander");
@Override
public String getText(Game game, Ability ability) {
return hint.getText(game, ability);
}
@Override
public Hint copy() {
return instance;
}
}