mirror of
https://github.com/correl/mage.git
synced 2024-12-25 19:25:41 +00:00
Implemented Cloudpiercer
This commit is contained in:
parent
aa1a3b3353
commit
00214ef80c
3 changed files with 89 additions and 0 deletions
49
Mage.Sets/src/mage/cards/c/Cloudpiercer.java
Normal file
49
Mage.Sets/src/mage/cards/c/Cloudpiercer.java
Normal file
|
@ -0,0 +1,49 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.MutatesSourceTriggeredAbility;
|
||||
import mage.abilities.costs.common.DiscardCardCost;
|
||||
import mage.abilities.effects.common.DoIfCostPaid;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.keyword.MutateAbility;
|
||||
import mage.abilities.keyword.ReachAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class Cloudpiercer extends CardImpl {
|
||||
|
||||
public Cloudpiercer(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}");
|
||||
|
||||
this.subtype.add(SubType.DINOSAUR);
|
||||
this.power = new MageInt(5);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Mutate {3}{R}
|
||||
this.addAbility(new MutateAbility(this, "{3}{R}"));
|
||||
|
||||
// Reach
|
||||
this.addAbility(ReachAbility.getInstance());
|
||||
|
||||
// Whenever this creature mutates, you may discard a card. If you do, draw a card.
|
||||
this.addAbility(new MutatesSourceTriggeredAbility(new DoIfCostPaid(
|
||||
new DrawCardSourceControllerEffect(1), new DiscardCardCost()
|
||||
)));
|
||||
}
|
||||
|
||||
private Cloudpiercer(final Cloudpiercer card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Cloudpiercer copy() {
|
||||
return new Cloudpiercer(this);
|
||||
}
|
||||
}
|
|
@ -27,6 +27,7 @@ public final class IkoriaLairOfBehemoths extends ExpansionSet {
|
|||
this.maxCardNumberInBooster = 274;
|
||||
|
||||
cards.add(new SetCardInfo("Bristling Boar", 146, Rarity.COMMON, mage.cards.b.BristlingBoar.class));
|
||||
cards.add(new SetCardInfo("Cloudpiercer", 112, Rarity.COMMON, mage.cards.c.Cloudpiercer.class));
|
||||
cards.add(new SetCardInfo("Essence Scatter", 49, Rarity.COMMON, mage.cards.e.EssenceScatter.class));
|
||||
cards.add(new SetCardInfo("Fully Grown", 154, Rarity.COMMON, mage.cards.f.FullyGrown.class));
|
||||
cards.add(new SetCardInfo("Gloom Pangolin", 89, Rarity.COMMON, mage.cards.g.GloomPangolin.class));
|
||||
|
|
39
Mage/src/main/java/mage/abilities/keyword/MutateAbility.java
Normal file
39
Mage/src/main/java/mage/abilities/keyword/MutateAbility.java
Normal file
|
@ -0,0 +1,39 @@
|
|||
package mage.abilities.keyword;
|
||||
|
||||
import mage.abilities.SpellAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.cards.Card;
|
||||
import mage.constants.SpellAbilityType;
|
||||
import mage.constants.TimingRule;
|
||||
|
||||
public class MutateAbility extends SpellAbility {
|
||||
|
||||
public MutateAbility(Card card, String manaString) {
|
||||
super(new ManaCostsImpl(manaString), card.getName() + " using mutate");
|
||||
this.spellAbilityType = SpellAbilityType.BASE_ALTERNATE;
|
||||
this.timing = TimingRule.SORCERY;
|
||||
// TODO: Implement this
|
||||
}
|
||||
|
||||
private MutateAbility(final MutateAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MutateAbility copy() {
|
||||
return new MutateAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule(boolean all) {
|
||||
return getRule();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Mutate " + getManaCostsToPay().getText() + " <i>(If you cast this spell for its mutate cost, " +
|
||||
"put it over or under target non-Human creature you own. " +
|
||||
"They mutate into the creature on top plus all abilities from under it.)</i>";
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue