mirror of
https://github.com/correl/mage.git
synced 2024-11-14 19:19:32 +00:00
[LTR] Implement Lost Isle Calling
This commit is contained in:
parent
a4d62f2ef3
commit
74f660dae0
2 changed files with 83 additions and 0 deletions
82
Mage.Sets/src/mage/cards/l/LostIsleCalling.java
Normal file
82
Mage.Sets/src/mage/cards/l/LostIsleCalling.java
Normal file
|
@ -0,0 +1,82 @@
|
|||
package mage.cards.l;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
|
||||
import mage.abilities.common.ScryTriggeredAbility;
|
||||
import mage.abilities.costs.common.ExileSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
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.game.turn.TurnMod;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class LostIsleCalling extends CardImpl {
|
||||
|
||||
public LostIsleCalling(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}");
|
||||
|
||||
// Whenever you scry, put a verse counter on Lost Isle Calling.
|
||||
this.addAbility(new ScryTriggeredAbility(new AddCountersSourceEffect(CounterType.VERSE.createInstance())));
|
||||
|
||||
// {4}{U}{U}, Exile Lost Isle Calling: Draw a card for each verse counter on Lost Isle Calling. If it had seven or more verse counters on it, take an extra turn after this one. Activate only as a sorcery.
|
||||
Ability ability = new ActivateAsSorceryActivatedAbility(
|
||||
new LostIsleCallingEffect(), new ManaCostsImpl<>("{4}{U}{U}")
|
||||
);
|
||||
ability.addCost(new ExileSourceCost());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private LostIsleCalling(final LostIsleCalling card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LostIsleCalling copy() {
|
||||
return new LostIsleCalling(this);
|
||||
}
|
||||
}
|
||||
|
||||
class LostIsleCallingEffect extends OneShotEffect {
|
||||
|
||||
LostIsleCallingEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "draw a card for each verse counter on {this}. " +
|
||||
"If it had seven or more verse counters on it, take an extra turn after this one";
|
||||
}
|
||||
|
||||
private LostIsleCallingEffect(final LostIsleCallingEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LostIsleCallingEffect copy() {
|
||||
return new LostIsleCallingEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
Permanent permanent = source.getSourcePermanentOrLKI(game);
|
||||
if (player == null || permanent == null) {
|
||||
return false;
|
||||
}
|
||||
int count = permanent.getCounters(game).getCount(CounterType.VERSE);
|
||||
player.drawCards(count, source, game);
|
||||
if (count >= 7) {
|
||||
game.getState().getTurnMods().add(new TurnMod(player.getId(), false));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -99,6 +99,7 @@ public final class TheLordOfTheRingsTalesOfMiddleEarth extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Legolas, Counter of Kills", 212, Rarity.UNCOMMON, mage.cards.l.LegolasCounterOfKills.class));
|
||||
cards.add(new SetCardInfo("Lobelia Sackville-Baggins", 93, Rarity.RARE, mage.cards.l.LobeliaSackvilleBaggins.class));
|
||||
cards.add(new SetCardInfo("Long List of the Ents", 174, Rarity.UNCOMMON, mage.cards.l.LongListOfTheEnts.class));
|
||||
cards.add(new SetCardInfo("Lost Isle Calling", 61, Rarity.RARE, mage.cards.l.LostIsleCalling.class));
|
||||
cards.add(new SetCardInfo("Lotho, Corrupt Shirriff", 213, Rarity.RARE, mage.cards.l.LothoCorruptShirriff.class));
|
||||
cards.add(new SetCardInfo("Many Partings", 176, Rarity.COMMON, mage.cards.m.ManyPartings.class));
|
||||
cards.add(new SetCardInfo("Mauhur, Uruk-hai Captain", 214, Rarity.UNCOMMON, mage.cards.m.MauhurUrukHaiCaptain.class));
|
||||
|
|
Loading…
Reference in a new issue