forked from External/mage
[MOM] Implement Ancient Imperiosaur
This commit is contained in:
parent
2c0486673f
commit
7a3841c45c
3 changed files with 101 additions and 0 deletions
59
Mage.Sets/src/mage/cards/a/AncientImperiosaur.java
Normal file
59
Mage.Sets/src/mage/cards/a/AncientImperiosaur.java
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.MultipliedValue;
|
||||
import mage.abilities.dynamicvalue.common.ConvokedSourceCount;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.keyword.ConvokeAbility;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.abilities.keyword.WardAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class AncientImperiosaur extends CardImpl {
|
||||
|
||||
private static final DynamicValue xValue = new MultipliedValue(ConvokedSourceCount.SPELL, 2);
|
||||
|
||||
public AncientImperiosaur(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}{G}");
|
||||
|
||||
this.subtype.add(SubType.DINOSAUR);
|
||||
this.power = new MageInt(6);
|
||||
this.toughness = new MageInt(6);
|
||||
|
||||
// Convoke
|
||||
this.addAbility(new ConvokeAbility());
|
||||
|
||||
// Trample
|
||||
this.addAbility(TrampleAbility.getInstance());
|
||||
|
||||
// Ward {2}
|
||||
this.addAbility(new WardAbility(new ManaCostsImpl<>("{2}"), false));
|
||||
|
||||
// Ancient Imperiosaur enters the battlefield with two +1/+1 counters on it for each creature that convoked it.
|
||||
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(
|
||||
CounterType.P1P1.createInstance(), xValue, true
|
||||
), null, "{this} enters the battlefield with two " +
|
||||
"+1/+1 counters on it for each creature that convoked it", null));
|
||||
}
|
||||
|
||||
private AncientImperiosaur(final AncientImperiosaur card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AncientImperiosaur copy() {
|
||||
return new AncientImperiosaur(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -30,6 +30,7 @@ public final class MarchOfTheMachine extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Akki Scrapchomper", 130, Rarity.COMMON, mage.cards.a.AkkiScrapchomper.class));
|
||||
cards.add(new SetCardInfo("Alabaster Host Intercessor", 3, Rarity.COMMON, mage.cards.a.AlabasterHostIntercessor.class));
|
||||
cards.add(new SetCardInfo("Alabaster Host Sanctifier", 4, Rarity.COMMON, mage.cards.a.AlabasterHostSanctifier.class));
|
||||
cards.add(new SetCardInfo("Ancient Imperiosaur", 174, Rarity.RARE, mage.cards.a.AncientImperiosaur.class));
|
||||
cards.add(new SetCardInfo("Arachnoid Adaptation", 175, Rarity.COMMON, mage.cards.a.ArachnoidAdaptation.class));
|
||||
cards.add(new SetCardInfo("Archangel Elspeth", 6, Rarity.MYTHIC, mage.cards.a.ArchangelElspeth.class));
|
||||
cards.add(new SetCardInfo("Archpriest of Shadows", 89, Rarity.RARE, mage.cards.a.ArchpriestOfShadows.class));
|
||||
|
|
|
|||
|
|
@ -0,0 +1,41 @@
|
|||
package mage.abilities.dynamicvalue.common;
|
||||
|
||||
import mage.MageObjectReference;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.game.Game;
|
||||
import mage.watchers.common.ConvokeWatcher;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public enum ConvokedSourceCount implements DynamicValue {
|
||||
PERMANENT(-1),
|
||||
SPELL(0);
|
||||
private final int offset;
|
||||
|
||||
ConvokedSourceCount(int offset) {
|
||||
this.offset = offset;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
return ConvokeWatcher.getConvokingCreatures(new MageObjectReference(sourceAbility, offset), game).size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConvokedSourceCount copy() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "creature that convoked it";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "1";
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue