mirror of
https://github.com/correl/mage.git
synced 2025-04-02 03:18:09 -09:00
[MOM] Implement Omen Hawker
This commit is contained in:
parent
07f19b9e86
commit
372b088f2b
2 changed files with 88 additions and 0 deletions
Mage.Sets/src/mage
87
Mage.Sets/src/mage/cards/o/OmenHawker.java
Normal file
87
Mage.Sets/src/mage/cards/o/OmenHawker.java
Normal file
|
@ -0,0 +1,87 @@
|
|||
package mage.cards.o;
|
||||
|
||||
import mage.ConditionalMana;
|
||||
import mage.MageInt;
|
||||
import mage.Mana;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.mana.ConditionalColoredManaAbility;
|
||||
import mage.abilities.mana.builder.ConditionalManaBuilder;
|
||||
import mage.abilities.mana.conditional.ManaCondition;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AbilityType;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.game.Game;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class OmenHawker extends CardImpl {
|
||||
|
||||
public OmenHawker(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}");
|
||||
|
||||
this.subtype.add(SubType.CEPHALID);
|
||||
this.subtype.add(SubType.ADVISOR);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// {T}: Add {C}{U}. Spend this many only to activate abilities.
|
||||
this.addAbility(new ConditionalColoredManaAbility(
|
||||
new Mana(0, 1, 0, 0, 0, 0, 0, 1), new OmenHawkerManaBuilder()
|
||||
));
|
||||
}
|
||||
|
||||
private OmenHawker(final OmenHawker card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public OmenHawker copy() {
|
||||
return new OmenHawker(this);
|
||||
}
|
||||
}
|
||||
|
||||
class OmenHawkerManaBuilder extends ConditionalManaBuilder {
|
||||
|
||||
@Override
|
||||
public ConditionalMana build(Object... options) {
|
||||
return new OmenHawkerConditionalMana(this.mana);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Spend this mana only to activate abilities";
|
||||
}
|
||||
}
|
||||
|
||||
class OmenHawkerConditionalMana extends ConditionalMana {
|
||||
|
||||
OmenHawkerConditionalMana(Mana mana) {
|
||||
super(mana);
|
||||
staticText = "Spend this mana only to activate abilities";
|
||||
addCondition(new OmenHawkerManaCondition());
|
||||
}
|
||||
}
|
||||
|
||||
class OmenHawkerManaCondition extends ManaCondition implements Condition {
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
if (source != null) {
|
||||
return source.getAbilityType() == AbilityType.MANA
|
||||
|| source.getAbilityType() == AbilityType.ACTIVATED;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source, UUID originalId, Cost costsToPay) {
|
||||
return apply(game, source);
|
||||
}
|
||||
}
|
|
@ -53,6 +53,7 @@ public final class MarchOfTheMachine extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Mountain", 280, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Mutagen Connoisseur", 248, Rarity.UNCOMMON, mage.cards.m.MutagenConnoisseur.class));
|
||||
cards.add(new SetCardInfo("Negate", 68, Rarity.COMMON, mage.cards.n.Negate.class));
|
||||
cards.add(new SetCardInfo("Omen Hawker", 70, Rarity.UNCOMMON, mage.cards.o.OmenHawker.class));
|
||||
cards.add(new SetCardInfo("Oracle of Tragedy", 71, Rarity.UNCOMMON, mage.cards.o.OracleOfTragedy.class));
|
||||
cards.add(new SetCardInfo("Phyrexian Gargantua", 121, Rarity.UNCOMMON, mage.cards.p.PhyrexianGargantua.class));
|
||||
cards.add(new SetCardInfo("Phyrexian Pegasus", 324, Rarity.COMMON, mage.cards.p.PhyrexianPegasus.class));
|
||||
|
|
Loading…
Add table
Reference in a new issue