mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
[KHM] Implemented Littjara Mirrorlake
This commit is contained in:
parent
c3a862d336
commit
7e7078b0ae
3 changed files with 94 additions and 1 deletions
88
Mage.Sets/src/mage/cards/l/LittjaraMirrorlake.java
Normal file
88
Mage.Sets/src/mage/cards/l/LittjaraMirrorlake.java
Normal file
|
@ -0,0 +1,88 @@
|
|||
package mage.cards.l;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTappedAbility;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CreateTokenCopyTargetEffect;
|
||||
import mage.abilities.mana.BlueManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class LittjaraMirrorlake extends CardImpl {
|
||||
|
||||
public LittjaraMirrorlake(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
|
||||
|
||||
// Littjara Mirrorlake enters the battlefield tapped.
|
||||
this.addAbility(new EntersBattlefieldTappedAbility());
|
||||
|
||||
// {T}: Add {U}.
|
||||
this.addAbility(new BlueManaAbility());
|
||||
|
||||
// {2}{G}{G}{U}, {T}, Sacrifice Littjara Mirrorlake: Create a token that's a copy of target creature you control, except it enters the battlefield with an additional +1/+1 counter on it. Activate this ability only any time you could cast a sorcery.
|
||||
Ability ability = new ActivateAsSorceryActivatedAbility(
|
||||
new LittjaraMirrorlakeEffect(), new ManaCostsImpl<>("{2}{G}{G}{U}")
|
||||
);
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
ability.addTarget(new TargetControlledCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private LittjaraMirrorlake(final LittjaraMirrorlake card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LittjaraMirrorlake copy() {
|
||||
return new LittjaraMirrorlake(this);
|
||||
}
|
||||
}
|
||||
|
||||
class LittjaraMirrorlakeEffect extends OneShotEffect {
|
||||
|
||||
LittjaraMirrorlakeEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "create a token that's a copy of target creature you control, " +
|
||||
"except it enters the battlefield with an additional +1/+1 counter on it";
|
||||
}
|
||||
|
||||
private LittjaraMirrorlakeEffect(final LittjaraMirrorlakeEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LittjaraMirrorlakeEffect copy() {
|
||||
return new LittjaraMirrorlakeEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect();
|
||||
effect.setTargetPointer(new FixedTarget(source.getFirstTarget(), game));
|
||||
effect.apply(game, source);
|
||||
for (Permanent permanent : effect.getAddedPermanent()) {
|
||||
if (permanent == null) {
|
||||
continue;
|
||||
}
|
||||
permanent.addCounters(CounterType.P1P1.createInstance(), source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -228,6 +228,7 @@ public final class Kaldheim extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Koma, Cosmos Serpent", 221, Rarity.MYTHIC, mage.cards.k.KomaCosmosSerpent.class));
|
||||
cards.add(new SetCardInfo("Littjara Glade-Warden", 182, Rarity.UNCOMMON, mage.cards.l.LittjaraGladeWarden.class));
|
||||
cards.add(new SetCardInfo("Littjara Kinseekers", 66, Rarity.COMMON, mage.cards.l.LittjaraKinseekers.class));
|
||||
cards.add(new SetCardInfo("Littjara Mirrorlake", 264, Rarity.UNCOMMON, mage.cards.l.LittjaraMirrorlake.class));
|
||||
cards.add(new SetCardInfo("Magda, Brazen Outlaw", 142, Rarity.RARE, mage.cards.m.MagdaBrazenOutlaw.class));
|
||||
cards.add(new SetCardInfo("Maja, Bretagard Protector", 222, Rarity.UNCOMMON, mage.cards.m.MajaBretagardProtector.class));
|
||||
cards.add(new SetCardInfo("Mammoth Growth", 183, Rarity.COMMON, mage.cards.m.MammothGrowth.class));
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.abilities.common;
|
||||
|
||||
import mage.abilities.ActivatedAbilityImpl;
|
||||
|
@ -8,6 +7,11 @@ import mage.constants.TimingRule;
|
|||
import mage.constants.Zone;
|
||||
|
||||
public class ActivateAsSorceryActivatedAbility extends ActivatedAbilityImpl {
|
||||
|
||||
public ActivateAsSorceryActivatedAbility(Effect effect, Cost cost) {
|
||||
this(Zone.BATTLEFIELD, effect, cost);
|
||||
}
|
||||
|
||||
public ActivateAsSorceryActivatedAbility(Zone zone, Effect effect, Cost cost) {
|
||||
super(zone, effect, cost);
|
||||
timing = TimingRule.SORCERY;
|
||||
|
|
Loading…
Reference in a new issue