mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
* If you control a commander - added card hints;
This commit is contained in:
parent
fcaacd8c1e
commit
a4af5501f9
6 changed files with 46 additions and 5 deletions
|
@ -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());
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue