mirror of
https://github.com/magefree/mage.git
synced 2026-01-24 04:09:54 -08:00
[ECL] Implement Gloom Ripper (#14232)
This commit is contained in:
parent
d61dc0bb63
commit
15df981ebe
2 changed files with 78 additions and 0 deletions
76
Mage.Sets/src/mage/cards/g/GloomRipper.java
Normal file
76
Mage.Sets/src/mage/cards/g/GloomRipper.java
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
package mage.cards.g;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.AdditiveDynamicValue;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.dynamicvalue.common.SignInversionDynamicValue;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.abilities.hint.Hint;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetOpponentsCreaturePermanent;
|
||||
import mage.target.targetpointer.SecondTargetPointer;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author muz
|
||||
*/
|
||||
public final class GloomRipper extends CardImpl {
|
||||
|
||||
private static final FilterPermanent creatureFilter = new FilterControlledPermanent(SubType.ELF, "Elves you control");
|
||||
private static final FilterCard cardFilter = new FilterCard(SubType.ELF, "Elf cards");
|
||||
|
||||
private static final DynamicValue xValuePos = new AdditiveDynamicValue(
|
||||
new PermanentsOnBattlefieldCount(creatureFilter),
|
||||
new CardsInControllerGraveyardCount(cardFilter)
|
||||
);
|
||||
private static final DynamicValue xValueNeg = new SignInversionDynamicValue(xValuePos);
|
||||
|
||||
private static final Hint hint = new ValueHint("Elves you control plus the number of Elf cards in your graveyard", xValuePos);
|
||||
|
||||
public GloomRipper(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}");
|
||||
|
||||
this.subtype.add(SubType.ELF);
|
||||
this.subtype.add(SubType.ASSASSIN);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// When this creature enters, target creature you control gets +X/+0 until end of turn and up to one target creature an opponent controls gets -0/-X until end of turn, where X is the number of Elves you control plus the number of Elf cards in your graveyard.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(
|
||||
new BoostTargetEffect(xValuePos, StaticValue.get(0))
|
||||
.setText("until end of turn, target creature you control gets +X/+0")
|
||||
);
|
||||
ability.addTarget(new TargetControlledCreaturePermanent());
|
||||
ability.addEffect(
|
||||
new BoostTargetEffect(StaticValue.get(0), xValueNeg)
|
||||
.setText("and up to one target creature an opponent controls gets -0/-X, where X is the number of Elves you control plus the number of Elf cards in your graveyard")
|
||||
.setTargetPointer(new SecondTargetPointer())
|
||||
);
|
||||
ability.addTarget(new TargetOpponentsCreaturePermanent(0, 1));
|
||||
this.addAbility(ability.addHint(hint));
|
||||
}
|
||||
|
||||
private GloomRipper(final GloomRipper card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GloomRipper copy() {
|
||||
return new GloomRipper(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -151,6 +151,8 @@ public final class LorwynEclipsed extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Glen Elendra Guardian", 393, Rarity.MYTHIC, mage.cards.g.GlenElendraGuardian.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Glen Elendra Guardian", 51, Rarity.RARE, mage.cards.g.GlenElendraGuardian.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Glister Bairn", 227, Rarity.UNCOMMON, mage.cards.g.GlisterBairn.class));
|
||||
cards.add(new SetCardInfo("Gloom Ripper", 102, Rarity.RARE, mage.cards.g.GloomRipper.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Gloom Ripper", 312, Rarity.RARE, mage.cards.g.GloomRipper.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Gnarlbark Elm", 103, Rarity.UNCOMMON, mage.cards.g.GnarlbarkElm.class));
|
||||
cards.add(new SetCardInfo("Goatnap", 142, Rarity.UNCOMMON, mage.cards.g.Goatnap.class));
|
||||
cards.add(new SetCardInfo("Goldmeadow Nomad", 18, Rarity.COMMON, mage.cards.g.GoldmeadowNomad.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue