[LTR] Implement Mirkwood Channeler (#11218)

This commit is contained in:
Susucre 2023-09-29 00:49:00 +02:00 committed by GitHub
parent 30118dd515
commit b1db62d5d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 67 additions and 0 deletions

View file

@ -0,0 +1,66 @@
package mage.cards.m;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.BeginningOfCombatTriggeredAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.hint.Hint;
import mage.abilities.hint.ValueHint;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.TargetController;
import mage.filter.common.FilterControlledPermanent;
import mage.target.common.TargetControlledPermanent;
import java.util.UUID;
/**
* @author Susucr
*/
public final class MirkwoodChanneler extends CardImpl {
private static final FilterControlledPermanent filter =
new FilterControlledPermanent(SubType.ELF, "Elf you control");
private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(
new FilterControlledPermanent(SubType.FOREST, "Forests you control"), null
);
private static final Hint hint = new ValueHint("Forests you control", xValue);
public MirkwoodChanneler(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}");
this.subtype.add(SubType.ELF);
this.subtype.add(SubType.DRUID);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
// At the beginning of combat on your turn, target Elf you control gains trample and gets +X/+X until end of turn, where X is the number of Forests you control.
Ability ability = new BeginningOfCombatTriggeredAbility(
new GainAbilityTargetEffect(TrampleAbility.getInstance())
.setText("target Elf you control gains trample"),
TargetController.YOU, false
);
ability.addEffect(new BoostTargetEffect(xValue, xValue)
.setText("and gets +X/+X until end of turn, where X is the number of Forests you control")
);
ability.addTarget(new TargetControlledPermanent(filter));
ability.addHint(hint);
this.addAbility(ability);
}
private MirkwoodChanneler(final MirkwoodChanneler card) {
super(card);
}
@Override
public MirkwoodChanneler copy() {
return new MirkwoodChanneler(this);
}
}

View file

@ -284,6 +284,7 @@ public final class TheLordOfTheRingsTalesOfMiddleEarth extends ExpansionSet {
cards.add(new SetCardInfo("Mines of Moria", 753, Rarity.RARE, mage.cards.m.MinesOfMoria.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Mirkwood Bats", 421, Rarity.COMMON, mage.cards.m.MirkwoodBats.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Mirkwood Bats", 95, Rarity.COMMON, mage.cards.m.MirkwoodBats.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Mirkwood Channeler", 828, Rarity.RARE, mage.cards.m.MirkwoodChanneler.class));
cards.add(new SetCardInfo("Mirkwood Spider", 178, Rarity.COMMON, mage.cards.m.MirkwoodSpider.class));
cards.add(new SetCardInfo("Mirror of Galadriel", 244, Rarity.UNCOMMON, mage.cards.m.MirrorOfGaladriel.class));
cards.add(new SetCardInfo("Mirrormere Guardian", 179, Rarity.COMMON, mage.cards.m.MirrormereGuardian.class));