mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
- Added Monstrous Hound and Keeper of the Flame.
This commit is contained in:
parent
21c6afa1c7
commit
88578502ad
3 changed files with 144 additions and 0 deletions
79
Mage.Sets/src/mage/cards/k/KeeperOfTheFlame.java
Normal file
79
Mage.Sets/src/mage/cards/k/KeeperOfTheFlame.java
Normal file
|
@ -0,0 +1,79 @@
|
|||
package mage.cards.k;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.FilterOpponent;
|
||||
import mage.filter.predicate.ObjectSourcePlayer;
|
||||
import mage.filter.predicate.ObjectSourcePlayerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPlayer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public final class KeeperOfTheFlame extends CardImpl {
|
||||
|
||||
private static final FilterOpponent filter = new FilterOpponent();
|
||||
|
||||
static {
|
||||
filter.add(new KeeperOfTheFlamePredicate());
|
||||
}
|
||||
|
||||
public KeeperOfTheFlame(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}{R}");
|
||||
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.WIZARD);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// {R}, {tap}: Choose target opponent who had more life than you did as you activated this ability. Keeper of the Flame deals 2 damage to him or her.
|
||||
Ability ability = new SimpleActivatedAbility(
|
||||
new DamageTargetEffect(2).setText("Choose target opponent who had more life than you did as you activated this ability. {this} deals 2 damage to him or her"),
|
||||
new ManaCostsImpl("{R}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetPlayer(1, 1, false, filter));
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
||||
public KeeperOfTheFlame(final KeeperOfTheFlame card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public KeeperOfTheFlame copy() {
|
||||
return new KeeperOfTheFlame(this);
|
||||
}
|
||||
}
|
||||
|
||||
class KeeperOfTheFlamePredicate implements ObjectSourcePlayerPredicate<ObjectSourcePlayer<Player>> {
|
||||
|
||||
@Override
|
||||
public boolean apply(ObjectSourcePlayer<Player> input, Game game) {
|
||||
Player targetOpponent = input.getObject();
|
||||
Player controller = game.getPlayer(input.getPlayerId());
|
||||
if (targetOpponent == null
|
||||
|| controller == null
|
||||
|| !controller.hasOpponent(targetOpponent.getId(), game)) {
|
||||
return false;
|
||||
}
|
||||
return targetOpponent.getLife() > controller.getLife();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "opponent who had more life than you did as you activated this ability";
|
||||
}
|
||||
}
|
63
Mage.Sets/src/mage/cards/m/MonstrousHound.java
Normal file
63
Mage.Sets/src/mage/cards/m/MonstrousHound.java
Normal file
|
@ -0,0 +1,63 @@
|
|||
package mage.cards.m;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.ControlsPermanentsComparedToOpponentsCondition;
|
||||
import mage.abilities.decorator.ConditionalRestrictionEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.combat.CantAttackAnyPlayerSourceEffect;
|
||||
import mage.abilities.effects.common.combat.CantBlockSourceEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.ComparisonType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public final class MonstrousHound extends CardImpl {
|
||||
|
||||
public MonstrousHound(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}");
|
||||
|
||||
this.subtype.add(SubType.HOUND);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Monstrous Hound can't attack unless you control more lands than defending player.
|
||||
Effect effect = new ConditionalRestrictionEffect(
|
||||
new CantAttackAnyPlayerSourceEffect(Duration.WhileOnBattlefield),
|
||||
new ControlsPermanentsComparedToOpponentsCondition(
|
||||
ComparisonType.FEWER_THAN,
|
||||
new FilterLandPermanent()));
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
effect.setText("{this} can't attack unless you control more lands than defending player")));
|
||||
|
||||
// Monstrous Hound can't block unless you control more lands than attacking player.
|
||||
Effect effect2 = new ConditionalRestrictionEffect(
|
||||
new CantBlockSourceEffect(Duration.WhileOnBattlefield),
|
||||
new ControlsPermanentsComparedToOpponentsCondition(
|
||||
ComparisonType.FEWER_THAN,
|
||||
new FilterLandPermanent()));
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
effect2.setText("{this} can't block unless you control more lands than attacking player")));
|
||||
|
||||
}
|
||||
|
||||
public MonstrousHound(final MonstrousHound card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MonstrousHound copy() {
|
||||
return new MonstrousHound(this);
|
||||
}
|
||||
}
|
|
@ -70,6 +70,7 @@ public final class Exodus extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Jackalope Herd", 111, Rarity.COMMON, mage.cards.j.JackalopeHerd.class));
|
||||
cards.add(new SetCardInfo("Keeper of the Beasts", 112, Rarity.UNCOMMON, mage.cards.k.KeeperOfTheBeasts.class));
|
||||
cards.add(new SetCardInfo("Keeper of the Dead", 65, Rarity.UNCOMMON, mage.cards.k.KeeperOfTheDead.class));
|
||||
cards.add(new SetCardInfo("Keeper of the Flame", 85, Rarity.UNCOMMON, mage.cards.k.KeeperOfTheFlame.class));
|
||||
cards.add(new SetCardInfo("Keeper of the Light", 8, Rarity.UNCOMMON, mage.cards.k.KeeperOfTheLight.class));
|
||||
cards.add(new SetCardInfo("Keeper of the Mind", 36, Rarity.UNCOMMON, mage.cards.k.KeeperOfTheMind.class));
|
||||
cards.add(new SetCardInfo("Killer Whale", 37, Rarity.UNCOMMON, mage.cards.k.KillerWhale.class));
|
||||
|
@ -86,6 +87,7 @@ public final class Exodus extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Mirozel", 41, Rarity.UNCOMMON, mage.cards.m.Mirozel.class));
|
||||
cards.add(new SetCardInfo("Mirri, Cat Warrior", 114, Rarity.RARE, mage.cards.m.MirriCatWarrior.class));
|
||||
cards.add(new SetCardInfo("Mogg Assassin", 88, Rarity.UNCOMMON, mage.cards.m.MoggAssassin.class));
|
||||
cards.add(new SetCardInfo("Monstrous Hound", 89, Rarity.RARE, mage.cards.m.MonstrousHound.class));
|
||||
cards.add(new SetCardInfo("Nausea", 67, Rarity.COMMON, mage.cards.n.Nausea.class));
|
||||
cards.add(new SetCardInfo("Necrologia", 68, Rarity.UNCOMMON, mage.cards.n.Necrologia.class));
|
||||
cards.add(new SetCardInfo("Null Brooch", 136, Rarity.RARE, mage.cards.n.NullBrooch.class));
|
||||
|
|
Loading…
Reference in a new issue