[NEO] Implemented When We Were Young

This commit is contained in:
Evan Kranzler 2022-02-05 23:47:29 -05:00
parent 093a559ea9
commit 149c799926
2 changed files with 70 additions and 0 deletions

View file

@ -0,0 +1,69 @@
package mage.cards.w;
import mage.abilities.Ability;
import mage.abilities.condition.common.ControlArtifactAndEnchantmentCondition;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.hint.common.ControlArtifactAndEnchantmentHint;
import mage.abilities.keyword.LifelinkAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.game.Game;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class WhenWeWereYoung extends CardImpl {
public WhenWeWereYoung(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{W}");
// Up to two target creatures each get +2/+2 until end of turn. If you control an artifact and an enchantment, those creatures also gain lifelink until end of turn.
this.getSpellAbility().addEffect(new WhenWeWereYoungEffect());
this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 2));
this.getSpellAbility().addHint(ControlArtifactAndEnchantmentHint.instance);
}
private WhenWeWereYoung(final WhenWeWereYoung card) {
super(card);
}
@Override
public WhenWeWereYoung copy() {
return new WhenWeWereYoung(this);
}
}
class WhenWeWereYoungEffect extends OneShotEffect {
WhenWeWereYoungEffect() {
super(Outcome.Benefit);
staticText = "up to two target creatures each get +2/+2 until end of turn. " +
"If you control an artifact and an enchantment, " +
"those creatures also gain lifelink until end of turn";
}
private WhenWeWereYoungEffect(final WhenWeWereYoungEffect effect) {
super(effect);
}
@Override
public WhenWeWereYoungEffect copy() {
return new WhenWeWereYoungEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
game.addEffect(new BoostTargetEffect(2, 2), source);
if (ControlArtifactAndEnchantmentCondition.instance.apply(game, source)) {
game.addEffect(new GainAbilityTargetEffect(LifelinkAbility.getInstance()), source);
}
return true;
}
}

View file

@ -277,6 +277,7 @@ public final class KamigawaNeonDynasty extends ExpansionSet {
cards.add(new SetCardInfo("Wanderer's Intervention", 41, Rarity.COMMON, mage.cards.w.WanderersIntervention.class));
cards.add(new SetCardInfo("Weaver of Harmony", 213, Rarity.RARE, mage.cards.w.WeaverOfHarmony.class));
cards.add(new SetCardInfo("Webspinner Cuff", 214, Rarity.UNCOMMON, mage.cards.w.WebspinnerCuff.class));
cards.add(new SetCardInfo("When We Were Young", 43, Rarity.UNCOMMON, mage.cards.w.WhenWeWereYoung.class));
cards.add(new SetCardInfo("Wind-Scarred Crag", 282, Rarity.COMMON, mage.cards.w.WindScarredCrag.class));
cards.add(new SetCardInfo("You Are Already Dead", 129, Rarity.COMMON, mage.cards.y.YouAreAlreadyDead.class));