Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LTC] Implement Legolas's Quick Reflexes #11215

Merged
merged 1 commit into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions Mage.Sets/src/mage/cards/l/LegolassQuickReflexes.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
package mage.cards.l;

import mage.abilities.TriggeredAbility;
import mage.abilities.common.BecomesTappedSourceTriggeredAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.SourcePermanentPowerCount;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.UntapTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.keyword.HexproofAbility;
import mage.abilities.keyword.ReachAbility;
import mage.abilities.keyword.SplitSecondAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.target.common.TargetCreaturePermanent;

import java.util.UUID;

/**
*
* @author Susucr
*/
public final class LegolassQuickReflexes extends CardImpl {

private static final DynamicValue xValue = new SourcePermanentPowerCount();

public LegolassQuickReflexes(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{G}");

// Split second
this.addAbility(new SplitSecondAbility());

// Untap target creature. Until end of turn, it gains hexproof, reach, and "Whenever this creature becomes tapped, it deals damage equal to its power to up to one target creature."
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addEffect(new UntapTargetEffect());
this.getSpellAbility().addEffect(new GainAbilityTargetEffect(
HexproofAbility.getInstance(), Duration.EndOfTurn
).setText("Until end of turn, it gains hexproof"));
this.getSpellAbility().addEffect(new GainAbilityTargetEffect(
ReachAbility.getInstance(), Duration.EndOfTurn
).setText(", reach"));

TriggeredAbility trigger = new BecomesTappedSourceTriggeredAbility(
new DamageTargetEffect(xValue)
.setText("it deals damage equal to its power to up to one target creature"),
false
);
trigger.addTarget(new TargetCreaturePermanent(0, 1));
this.getSpellAbility().addEffect(new GainAbilityTargetEffect(
trigger, Duration.EndOfTurn
).setText(", and \"Whenever this creature becomes tapped, "
+ "it deals damage equal to its power to up to one target creature.\""));
}

private LegolassQuickReflexes(final LegolassQuickReflexes card) {
super(card);
}

@Override
public LegolassQuickReflexes copy() {
return new LegolassQuickReflexes(this);
}
}
1 change: 1 addition & 0 deletions Mage.Sets/src/mage/sets/TalesOfMiddleEarthCommander.java
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ private TalesOfMiddleEarthCommander() {
cards.add(new SetCardInfo("Languish", 202, Rarity.RARE, mage.cards.l.Languish.class));
cards.add(new SetCardInfo("Learn from the Past", 192, Rarity.UNCOMMON, mage.cards.l.LearnFromThePast.class));
cards.add(new SetCardInfo("Legolas Greenleaf", 40, Rarity.RARE, mage.cards.l.LegolasGreenleaf.class));
cards.add(new SetCardInfo("Legolas's Quick Reflexes", 493, Rarity.RARE, mage.cards.l.LegolassQuickReflexes.class));
cards.add(new SetCardInfo("Lidless Gaze", 59, Rarity.RARE, mage.cards.l.LidlessGaze.class));
cards.add(new SetCardInfo("Lightning Greaves", 281, Rarity.UNCOMMON, mage.cards.l.LightningGreaves.class));
cards.add(new SetCardInfo("Lignify", 252, Rarity.COMMON, mage.cards.l.Lignify.class));
Expand Down