mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Implemented Aeromunculus
This commit is contained in:
parent
ed461efc79
commit
fd25ac8ccb
3 changed files with 94 additions and 0 deletions
45
Mage.Sets/src/mage/cards/a/Aeromunculus.java
Normal file
45
Mage.Sets/src/mage/cards/a/Aeromunculus.java
Normal file
|
@ -0,0 +1,45 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.keyword.AdaptEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
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 Aeromunculus extends CardImpl {
|
||||
|
||||
public Aeromunculus(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{U}");
|
||||
|
||||
this.subtype.add(SubType.HOMUNCULUS);
|
||||
this.subtype.add(SubType.MUTANT);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// {2}{G}{U}: Adapt 1.
|
||||
this.addAbility(new SimpleActivatedAbility(
|
||||
new AdaptEffect(1), new ManaCostsImpl("{2}{G}{U}")
|
||||
));
|
||||
}
|
||||
|
||||
public Aeromunculus(final Aeromunculus card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Aeromunculus copy() {
|
||||
return new Aeromunculus(this);
|
||||
}
|
||||
}
|
|
@ -32,6 +32,7 @@ public final class RavnicaAllegiance extends ExpansionSet {
|
|||
this.ratioBoosterMythic = 8;
|
||||
this.maxCardNumberInBooster = 259;
|
||||
|
||||
cards.add(new SetCardInfo("Aeromunculus", 152, Rarity.COMMON, mage.cards.a.Aeromunculus.class));
|
||||
cards.add(new SetCardInfo("Gate Colossus", 232, Rarity.UNCOMMON, mage.cards.g.GateColossus.class));
|
||||
cards.add(new SetCardInfo("Growth Spiral", 178, Rarity.COMMON, mage.cards.g.GrowthSpiral.class));
|
||||
cards.add(new SetCardInfo("Imperious Oligarch", 184, Rarity.COMMON, mage.cards.i.ImperiousOligarch.class));
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
package mage.abilities.effects.keyword;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.constants.Outcome;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class AdaptEffect extends OneShotEffect {
|
||||
|
||||
private final int adaptNumber;
|
||||
|
||||
public AdaptEffect(int adaptNumber) {
|
||||
super(Outcome.BoostCreature);
|
||||
this.adaptNumber = adaptNumber;
|
||||
staticText = "Adapt " + adaptNumber +
|
||||
" <i>(If this creature has no +1/+1 counters on it, put " +
|
||||
CardUtil.numberToText(adaptNumber) + " +1/+1 counter" +
|
||||
(adaptNumber > 1 ? "s" : "") + " on it.)</i>";
|
||||
}
|
||||
|
||||
private AdaptEffect(final AdaptEffect effect) {
|
||||
super(effect);
|
||||
this.adaptNumber = effect.adaptNumber;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AdaptEffect copy() {
|
||||
return new AdaptEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (permanent == null) {
|
||||
return false;
|
||||
}
|
||||
if (permanent.getCounters(game).getCount(CounterType.P1P1) == 0) {
|
||||
permanent.addCounters(CounterType.P1P1.createInstance(adaptNumber), source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue