mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
Added more hint for cards;
This commit is contained in:
parent
5d2a56e542
commit
3f510e97c9
3 changed files with 29 additions and 13 deletions
|
@ -1,23 +1,28 @@
|
||||||
|
|
||||||
package mage.cards.c;
|
package mage.cards.c;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.dynamicvalue.DynamicValue;
|
||||||
|
import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount;
|
||||||
import mage.abilities.effects.common.cost.SourceCostReductionForEachCardInGraveyardEffect;
|
import mage.abilities.effects.common.cost.SourceCostReductionForEachCardInGraveyardEffect;
|
||||||
|
import mage.abilities.hint.ValueHint;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterInstantOrSorceryCard;
|
import mage.filter.common.FilterInstantOrSorceryCard;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author fireshoes
|
* @author fireshoes
|
||||||
*/
|
*/
|
||||||
public final class CrypticSerpent extends CardImpl {
|
public final class CrypticSerpent extends CardImpl {
|
||||||
|
|
||||||
|
private static final DynamicValue cardsCount = new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_INSTANT_OR_SORCERY);
|
||||||
|
|
||||||
public CrypticSerpent(UUID ownerId, CardSetInfo setInfo) {
|
public CrypticSerpent(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{U}{U}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{U}{U}");
|
||||||
|
|
||||||
|
@ -26,7 +31,8 @@ public final class CrypticSerpent extends CardImpl {
|
||||||
this.toughness = new MageInt(5);
|
this.toughness = new MageInt(5);
|
||||||
|
|
||||||
// Cryptic Serpent costs {1} less to cast for each instant and sorcery card in your graveyard.
|
// Cryptic Serpent costs {1} less to cast for each instant and sorcery card in your graveyard.
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SourceCostReductionForEachCardInGraveyardEffect(new FilterInstantOrSorceryCard())));
|
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SourceCostReductionForEachCardInGraveyardEffect(new FilterInstantOrSorceryCard()))
|
||||||
|
.addHint(new ValueHint("Instant and sorcery card in your graveyard", cardsCount)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public CrypticSerpent(final CrypticSerpent card) {
|
public CrypticSerpent(final CrypticSerpent card) {
|
||||||
|
|
|
@ -5,8 +5,11 @@ import mage.abilities.Ability;
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.dynamicvalue.DynamicValue;
|
||||||
|
import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount;
|
||||||
import mage.abilities.effects.common.cost.CostModificationEffectImpl;
|
import mage.abilities.effects.common.cost.CostModificationEffectImpl;
|
||||||
import mage.abilities.effects.keyword.AdaptEffect;
|
import mage.abilities.effects.keyword.AdaptEffect;
|
||||||
|
import mage.abilities.hint.ValueHint;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
@ -23,6 +26,8 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public final class Pteramander extends CardImpl {
|
public final class Pteramander extends CardImpl {
|
||||||
|
|
||||||
|
static final DynamicValue cardsCount = new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_INSTANT_OR_SORCERY);
|
||||||
|
|
||||||
public Pteramander(UUID ownerId, CardSetInfo setInfo) {
|
public Pteramander(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}");
|
||||||
|
|
||||||
|
@ -38,7 +43,8 @@ public final class Pteramander extends CardImpl {
|
||||||
// TODO: Make ability properly copiable
|
// TODO: Make ability properly copiable
|
||||||
Ability ability = new SimpleActivatedAbility(new AdaptEffect(4).setText("Adapt 4. This ability costs {1} less to activate for each instant and sorcery card in your graveyard."), new ManaCostsImpl("{7}{U}"));
|
Ability ability = new SimpleActivatedAbility(new AdaptEffect(4).setText("Adapt 4. This ability costs {1} less to activate for each instant and sorcery card in your graveyard."), new ManaCostsImpl("{7}{U}"));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new PteramanderCostIncreasingEffect(ability.getOriginalId())));
|
this.addAbility(new SimpleStaticAbility(Zone.ALL, new PteramanderCostIncreasingEffect(ability.getOriginalId()))
|
||||||
|
.addHint(new ValueHint("Instant and sorcery card in your graveyard", cardsCount)));
|
||||||
}
|
}
|
||||||
|
|
||||||
private Pteramander(final Pteramander card) {
|
private Pteramander(final Pteramander card) {
|
||||||
|
@ -69,7 +75,8 @@ class PteramanderCostIncreasingEffect extends CostModificationEffectImpl {
|
||||||
public boolean apply(Game game, Ability source, Ability abilityToModify) {
|
public boolean apply(Game game, Ability source, Ability abilityToModify) {
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
if (controller != null) {
|
if (controller != null) {
|
||||||
CardUtil.reduceCost(abilityToModify, controller.getGraveyard().count(StaticFilters.FILTER_CARD_INSTANT_OR_SORCERY, game));
|
int count = Pteramander.cardsCount.calculate(game, source, this);
|
||||||
|
CardUtil.reduceCost(abilityToModify, count);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,27 +1,30 @@
|
||||||
|
|
||||||
package mage.cards.r;
|
package mage.cards.r;
|
||||||
|
|
||||||
import java.util.UUID;
|
import mage.abilities.dynamicvalue.DynamicValue;
|
||||||
import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount;
|
import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount;
|
||||||
import mage.abilities.effects.common.CreateTokenEffect;
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
|
import mage.abilities.hint.ValueHint;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.filter.common.FilterInstantOrSorceryCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.permanent.token.ZombieToken;
|
import mage.game.permanent.token.ZombieToken;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author fireshoes
|
* @author fireshoes
|
||||||
*/
|
*/
|
||||||
public final class RiseFromTheTides extends CardImpl {
|
public final class RiseFromTheTides extends CardImpl {
|
||||||
|
|
||||||
|
private static final DynamicValue cardsCount = new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_INSTANT_OR_SORCERY);
|
||||||
|
|
||||||
public RiseFromTheTides(UUID ownerId, CardSetInfo setInfo) {
|
public RiseFromTheTides(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{5}{U}");
|
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{5}{U}");
|
||||||
|
|
||||||
// Create a tapped 2/2 black Zombie creature token for each instant and sorcery card in your graveyard.
|
// Create a tapped 2/2 black Zombie creature token for each instant and sorcery card in your graveyard.
|
||||||
CardsInControllerGraveyardCount value = new CardsInControllerGraveyardCount(new FilterInstantOrSorceryCard());
|
this.getSpellAbility().addEffect(new CreateTokenEffect(new ZombieToken(), cardsCount, true, false));
|
||||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new ZombieToken(), value, true, false));
|
this.getSpellAbility().addHint(new ValueHint("Instant and sorcery card in your graveyard", cardsCount));
|
||||||
}
|
}
|
||||||
|
|
||||||
public RiseFromTheTides(final RiseFromTheTides card) {
|
public RiseFromTheTides(final RiseFromTheTides card) {
|
||||||
|
|
Loading…
Reference in a new issue