mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
Implemented Pteramander
This commit is contained in:
parent
2998121297
commit
7d210cd03a
4 changed files with 103 additions and 26 deletions
|
@ -1,28 +1,23 @@
|
|||
|
||||
package mage.cards.l;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.cost.CostModificationEffectImpl;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.CostModificationType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.*;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class LoreseekersStone extends CardImpl {
|
||||
|
@ -31,17 +26,14 @@ public final class LoreseekersStone extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{6}");
|
||||
|
||||
// {3}, {T}: Draw three cards. This ability costs {1} more to activate for each card in your hand.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(3), new GenericManaCost(3));
|
||||
// TODO: Make ability properly copiable
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(3).setText("Draw three cards. This ability costs {1} more to activate for each card in your hand"), new GenericManaCost(3));
|
||||
ability.addCost(new TapSourceCost());
|
||||
for (Effect effect : ability.getEffects()) {
|
||||
effect.setText("Draw three cards. This ability costs {1} more to activate for each card in your hand");
|
||||
}
|
||||
this.addAbility(ability);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new LoreseekersStoneCostIncreasingEffect(ability.getOriginalId())));
|
||||
|
||||
}
|
||||
|
||||
public LoreseekersStone(final LoreseekersStone card) {
|
||||
private LoreseekersStone(final LoreseekersStone card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
|
@ -60,7 +52,7 @@ class LoreseekersStoneCostIncreasingEffect extends CostModificationEffectImpl {
|
|||
this.originalId = originalId;
|
||||
}
|
||||
|
||||
LoreseekersStoneCostIncreasingEffect(final LoreseekersStoneCostIncreasingEffect effect) {
|
||||
private LoreseekersStoneCostIncreasingEffect(final LoreseekersStoneCostIncreasingEffect effect) {
|
||||
super(effect);
|
||||
this.originalId = effect.originalId;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.n;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
|
@ -11,19 +10,16 @@ import mage.abilities.effects.common.cost.SourceCostReductionForEachCardInGravey
|
|||
import mage.abilities.keyword.MonstrosityAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.CostModificationType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.*;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class NemesisOfMortals extends CardImpl {
|
||||
|
@ -41,6 +37,7 @@ public final class NemesisOfMortals extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
|
||||
// {7}{G}{G}: Monstrosity 5. This ability costs {1} less to activate for each creature card in your graveyard.
|
||||
// TODO: Make ability properly copiable
|
||||
ability = new MonstrosityAbility("{7}{G}{G}", 5);
|
||||
for (Effect effect : ability.getEffects()) {
|
||||
effect.setText("Monstrosity 5. This ability costs {1} less to activate for each creature card in your graveyard");
|
||||
|
@ -49,7 +46,7 @@ public final class NemesisOfMortals extends CardImpl {
|
|||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new NemesisOfMortalsCostReducingEffect(ability.getOriginalId())));
|
||||
}
|
||||
|
||||
public NemesisOfMortals(final NemesisOfMortals card) {
|
||||
private NemesisOfMortals(final NemesisOfMortals card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
|
@ -68,7 +65,7 @@ class NemesisOfMortalsCostReducingEffect extends CostModificationEffectImpl {
|
|||
this.originalId = originalId;
|
||||
}
|
||||
|
||||
NemesisOfMortalsCostReducingEffect(final NemesisOfMortalsCostReducingEffect effect) {
|
||||
private NemesisOfMortalsCostReducingEffect(final NemesisOfMortalsCostReducingEffect effect) {
|
||||
super(effect);
|
||||
this.originalId = effect.originalId;
|
||||
}
|
||||
|
@ -77,7 +74,7 @@ class NemesisOfMortalsCostReducingEffect extends CostModificationEffectImpl {
|
|||
public boolean apply(Game game, Ability source, Ability abilityToModify) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
CardUtil.reduceCost(abilityToModify, controller.getGraveyard().getCards(new FilterCreatureCard(), game).size());
|
||||
CardUtil.reduceCost(abilityToModify, controller.getGraveyard().count(StaticFilters.FILTER_CARD_CREATURE, game));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
87
Mage.Sets/src/mage/cards/p/Pteramander.java
Normal file
87
Mage.Sets/src/mage/cards/p/Pteramander.java
Normal file
|
@ -0,0 +1,87 @@
|
|||
package mage.cards.p;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.cost.CostModificationEffectImpl;
|
||||
import mage.abilities.effects.keyword.AdaptEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class Pteramander extends CardImpl {
|
||||
|
||||
public Pteramander(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}");
|
||||
|
||||
this.subtype.add(SubType.SALAMANDER);
|
||||
this.subtype.add(SubType.DRAKE);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// {7}{U}: Adapt 4. This ability costs {1} less to activate for each instant and sorcery card in your graveyard.
|
||||
// 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}"));
|
||||
this.addAbility(ability);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new PteramanderCostIncreasingEffect(ability.getOriginalId())));
|
||||
}
|
||||
|
||||
private Pteramander(final Pteramander card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Pteramander copy() {
|
||||
return new Pteramander(this);
|
||||
}
|
||||
}
|
||||
|
||||
class PteramanderCostIncreasingEffect extends CostModificationEffectImpl {
|
||||
|
||||
private final UUID originalId;
|
||||
|
||||
PteramanderCostIncreasingEffect(UUID originalId) {
|
||||
super(Duration.EndOfGame, Outcome.Benefit, CostModificationType.REDUCE_COST);
|
||||
this.originalId = originalId;
|
||||
}
|
||||
|
||||
private PteramanderCostIncreasingEffect(final PteramanderCostIncreasingEffect effect) {
|
||||
super(effect);
|
||||
this.originalId = effect.originalId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source, Ability abilityToModify) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
CardUtil.reduceCost(abilityToModify, controller.getGraveyard().count(StaticFilters.FILTER_CARD_INSTANT_OR_SORCERY, game));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(Ability abilityToModify, Ability source, Game game) {
|
||||
return abilityToModify.getOriginalId().equals(originalId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PteramanderCostIncreasingEffect copy() {
|
||||
return new PteramanderCostIncreasingEffect(this);
|
||||
}
|
||||
|
||||
}
|
|
@ -120,6 +120,7 @@ public final class RavnicaAllegiance extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Pitiless Pontiff", 194, Rarity.UNCOMMON, mage.cards.p.PitilessPontiff.class));
|
||||
cards.add(new SetCardInfo("Precognitive Perception", 45, Rarity.RARE, mage.cards.p.PrecognitivePerception.class));
|
||||
cards.add(new SetCardInfo("Prime Speaker Vannifar", 195, Rarity.MYTHIC, mage.cards.p.PrimeSpeakerVannifar.class));
|
||||
cards.add(new SetCardInfo("Pteramander", 47, Rarity.UNCOMMON, mage.cards.p.Pteramander.class));
|
||||
cards.add(new SetCardInfo("Quench", 48, Rarity.COMMON, mage.cards.q.Quench.class));
|
||||
cards.add(new SetCardInfo("Rafter Demon", 196, Rarity.COMMON, mage.cards.r.RafterDemon.class));
|
||||
cards.add(new SetCardInfo("Rakdos Firewheeler", 197, Rarity.UNCOMMON, mage.cards.r.RakdosFirewheeler.class));
|
||||
|
|
Loading…
Reference in a new issue