[LTR] Implement Hobbit's Sting

This commit is contained in:
theelk801 2023-06-11 09:18:50 -04:00
parent 2e2166eb70
commit d5f93ec8f4
2 changed files with 48 additions and 0 deletions

View file

@ -0,0 +1,47 @@
package mage.cards.h;
import mage.abilities.dynamicvalue.AdditiveDynamicValue;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.CreaturesYouControlCount;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.hint.Hint;
import mage.abilities.hint.ValueHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterControlledPermanent;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class HobbitsSting extends CardImpl {
private static final DynamicValue xValue = new AdditiveDynamicValue(
CreaturesYouControlCount.instance,
new PermanentsOnBattlefieldCount(new FilterControlledPermanent(SubType.FOOD))
);
private static final Hint hint = new ValueHint("Creatures and Foods you control", xValue);
public HobbitsSting(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{W}");
// Hobbit's Sting deals X damage to target creature, where X is the number of creatures you control plus the number of Foods you control.
this.getSpellAbility().addEffect(new DamageTargetEffect(xValue).setText("{this} deals X damage to target creature, where X is the number of creatures you control plus the number of Foods you control"));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addHint(hint);
}
private HobbitsSting(final HobbitsSting card) {
super(card);
}
@Override
public HobbitsSting copy() {
return new HobbitsSting(this);
}
}

View file

@ -104,6 +104,7 @@ public final class TheLordOfTheRingsTalesOfMiddleEarth extends ExpansionSet {
cards.add(new SetCardInfo("Haradrim Spearmaster", 135, Rarity.COMMON, mage.cards.h.HaradrimSpearmaster.class));
cards.add(new SetCardInfo("Hew the Entwood", 136, Rarity.MYTHIC, mage.cards.h.HewTheEntwood.class));
cards.add(new SetCardInfo("Hithlain Knots", 54, Rarity.COMMON, mage.cards.h.HithlainKnots.class));
cards.add(new SetCardInfo("Hobbit's Sting", 20, Rarity.COMMON, mage.cards.h.HobbitsSting.class));
cards.add(new SetCardInfo("Horn of Gondor", 240, Rarity.RARE, mage.cards.h.HornOfGondor.class));
cards.add(new SetCardInfo("Horses of the Bruinen", 55, Rarity.UNCOMMON, mage.cards.h.HorsesOfTheBruinen.class));
cards.add(new SetCardInfo("Improvised Club", 137, Rarity.COMMON, mage.cards.i.ImprovisedClub.class));