mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 03:22:00 -08:00
[AFC] Implemented Grim Hireling
This commit is contained in:
parent
8981bb8ad0
commit
c0b4790c4d
2 changed files with 86 additions and 0 deletions
85
Mage.Sets/src/mage/cards/g/GrimHireling.java
Normal file
85
Mage.Sets/src/mage/cards/g/GrimHireling.java
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
package mage.cards.g;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
|
||||
import mage.abilities.common.ControlledCreaturesDealCombatDamagePlayerTriggeredAbility;
|
||||
import mage.abilities.costs.common.SacrificeXTargetCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.GetXValue;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.token.TreasureToken;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class GrimHireling extends CardImpl {
|
||||
|
||||
private static final FilterControlledPermanent filter
|
||||
= new FilterControlledPermanent(SubType.TREASURE, "Treasures");
|
||||
|
||||
public GrimHireling(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}");
|
||||
|
||||
this.subtype.add(SubType.TIEFLING);
|
||||
this.subtype.add(SubType.ROGUE);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Whenever one or more creatures you control deal combat damage to a player, create two Treasure tokens.
|
||||
this.addAbility(new ControlledCreaturesDealCombatDamagePlayerTriggeredAbility(
|
||||
new CreateTokenEffect(new TreasureToken(), 2)
|
||||
));
|
||||
|
||||
// {B}, Sacrifice X Treasures: Target creature gets -X/-X until end of turn. Activate only as a sorcery.
|
||||
Ability ability = new ActivateAsSorceryActivatedAbility(new GrimHirelingEffect(), new ManaCostsImpl<>("{B}"));
|
||||
ability.addCost(new SacrificeXTargetCost(filter));
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private GrimHireling(final GrimHireling card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GrimHireling copy() {
|
||||
return new GrimHireling(this);
|
||||
}
|
||||
}
|
||||
|
||||
class GrimHirelingEffect extends OneShotEffect {
|
||||
|
||||
GrimHirelingEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "target creature gets -X/-X until end of turn";
|
||||
}
|
||||
|
||||
private GrimHirelingEffect(final GrimHirelingEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GrimHirelingEffect copy() {
|
||||
return new GrimHirelingEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
int xValue = GetXValue.instance.calculate(game, source, this);
|
||||
game.addEffect(new BoostTargetEffect(-xValue, -xValue), source);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -111,6 +111,7 @@ public final class ForgottenRealmsCommander extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Grasslands", 242, Rarity.UNCOMMON, mage.cards.g.Grasslands.class));
|
||||
cards.add(new SetCardInfo("Gratuitous Violence", 127, Rarity.RARE, mage.cards.g.GratuitousViolence.class));
|
||||
cards.add(new SetCardInfo("Greater Good", 160, Rarity.RARE, mage.cards.g.GreaterGood.class));
|
||||
cards.add(new SetCardInfo("Grim Hireling", 25, Rarity.RARE, mage.cards.g.GrimHireling.class));
|
||||
cards.add(new SetCardInfo("Gruul Signet", 207, Rarity.UNCOMMON, mage.cards.g.GruulSignet.class));
|
||||
cards.add(new SetCardInfo("Gruul Turf", 243, Rarity.UNCOMMON, mage.cards.g.GruulTurf.class));
|
||||
cards.add(new SetCardInfo("Gryff's Boon", 67, Rarity.UNCOMMON, mage.cards.g.GryffsBoon.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue