mirror of
https://github.com/correl/mage.git
synced 2024-12-25 19:25:41 +00:00
Implemented Marauding Raptor
This commit is contained in:
parent
d5c7fbfd0f
commit
a9238aba9d
2 changed files with 92 additions and 0 deletions
91
Mage.Sets/src/mage/cards/m/MaraudingRaptor.java
Normal file
91
Mage.Sets/src/mage/cards/m/MaraudingRaptor.java
Normal file
|
@ -0,0 +1,91 @@
|
|||
package mage.cards.m;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.cost.SpellsCostReductionControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class MaraudingRaptor extends CardImpl {
|
||||
|
||||
private static final FilterCard filter = new FilterCreatureCard("creature spells");
|
||||
private static final FilterPermanent filter2 = new FilterCreaturePermanent("another creature");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
public MaraudingRaptor(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}");
|
||||
|
||||
this.subtype.add(SubType.DINOSAUR);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Creature spells you cast cost {1} less to cast.
|
||||
this.addAbility(new SimpleStaticAbility(new SpellsCostReductionControllerEffect(filter, 1)));
|
||||
|
||||
// Whenever another creature enters the battlefield under your control, Marauding Raptor deals 2 damage to it. If a Dinosaur is dealt damage this way, Marauding Raptor gets +2/+0 until end of turn.
|
||||
this.addAbility(new EntersBattlefieldControlledTriggeredAbility(
|
||||
Zone.BATTLEFIELD, new MaraudingRaptorEffect(),
|
||||
filter2, false, SetTargetPointer.PERMANENT,
|
||||
"Whenever another creature enters the battlefield under your control, " +
|
||||
"{this} deals 2 damage to it. If a Dinosaur is dealt damage this way, " +
|
||||
"{this} gets +2/+0 until end of turn."
|
||||
));
|
||||
}
|
||||
|
||||
private MaraudingRaptor(final MaraudingRaptor card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MaraudingRaptor copy() {
|
||||
return new MaraudingRaptor(this);
|
||||
}
|
||||
}
|
||||
|
||||
class MaraudingRaptorEffect extends OneShotEffect {
|
||||
|
||||
MaraudingRaptorEffect() {
|
||||
super(Outcome.Benefit);
|
||||
}
|
||||
|
||||
private MaraudingRaptorEffect(final MaraudingRaptorEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MaraudingRaptorEffect copy() {
|
||||
return new MaraudingRaptorEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(targetPointer.getFirst(game, source));
|
||||
if (permanent == null) {
|
||||
return false;
|
||||
}
|
||||
if (permanent.damage(2, source.getSourceId(), game) > 0 && permanent.hasSubtype(SubType.DINOSAUR, game)) {
|
||||
game.addEffect(new BoostSourceEffect(2, 0, Duration.EndOfTurn), source);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -100,6 +100,7 @@ public final class CoreSet2020 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Loxodon Lifechanter", 27, Rarity.RARE, mage.cards.l.LoxodonLifechanter.class));
|
||||
cards.add(new SetCardInfo("Loyal Pegasus", 28, Rarity.UNCOMMON, mage.cards.l.LoyalPegasus.class));
|
||||
cards.add(new SetCardInfo("Manifold Key", 230, Rarity.UNCOMMON, mage.cards.m.ManifoldKey.class));
|
||||
cards.add(new SetCardInfo("Marauding Raptor", 150, Rarity.RARE, mage.cards.m.MaraudingRaptor.class));
|
||||
cards.add(new SetCardInfo("Mask of Immolation", 151, Rarity.UNCOMMON, mage.cards.m.MaskOfImmolation.class));
|
||||
cards.add(new SetCardInfo("Moat Piranhas", 67, Rarity.COMMON, mage.cards.m.MoatPiranhas.class));
|
||||
cards.add(new SetCardInfo("Moldervine Reclamation", 214, Rarity.UNCOMMON, mage.cards.m.MoldervineReclamation.class));
|
||||
|
|
Loading…
Reference in a new issue