forked from External/mage
[CMR] Implemented Kwain, Itinerant Meddler
This commit is contained in:
parent
d5c9297674
commit
c02399a402
2 changed files with 82 additions and 0 deletions
81
Mage.Sets/src/mage/cards/k/KwainItinerantMeddler.java
Normal file
81
Mage.Sets/src/mage/cards/k/KwainItinerantMeddler.java
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
package mage.cards.k;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class KwainItinerantMeddler extends CardImpl {
|
||||
|
||||
public KwainItinerantMeddler(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}{U}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.RABBIT);
|
||||
this.subtype.add(SubType.WIZARD);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// {T}: Each player may draw a card, then each player who drew a card this way gains 1 life.
|
||||
this.addAbility(new SimpleActivatedAbility(new KwainItinerantMeddlerEffect(), new TapSourceCost()));
|
||||
}
|
||||
|
||||
private KwainItinerantMeddler(final KwainItinerantMeddler card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public KwainItinerantMeddler copy() {
|
||||
return new KwainItinerantMeddler(this);
|
||||
}
|
||||
}
|
||||
|
||||
class KwainItinerantMeddlerEffect extends OneShotEffect {
|
||||
|
||||
KwainItinerantMeddlerEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "each player may draw a card, then each player who drew a card this way gains 1 life";
|
||||
}
|
||||
|
||||
private KwainItinerantMeddlerEffect(final KwainItinerantMeddlerEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public KwainItinerantMeddlerEffect copy() {
|
||||
return new KwainItinerantMeddlerEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Set<Player> players = new HashSet<>();
|
||||
for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null
|
||||
&& player.chooseUse(outcome, "Draw a card?", source, game)
|
||||
&& player.drawCards(1, source.getSourceId(), game) > 0) {
|
||||
players.add(player);
|
||||
}
|
||||
}
|
||||
for (Player player : players) {
|
||||
player.gainLife(1, game, source);
|
||||
}
|
||||
return !players.isEmpty();
|
||||
}
|
||||
}
|
||||
|
|
@ -251,6 +251,7 @@ public final class CommanderLegends extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Kor Cartographer", 30, Rarity.COMMON, mage.cards.k.KorCartographer.class));
|
||||
cards.add(new SetCardInfo("Krark, the Thumbless", 189, Rarity.RARE, mage.cards.k.KrarkTheThumbless.class));
|
||||
cards.add(new SetCardInfo("Kraum, Ludevic's Opus", 523, Rarity.MYTHIC, mage.cards.k.KraumLudevicsOpus.class));
|
||||
cards.add(new SetCardInfo("Kwain, Itinerant Meddler", 284, Rarity.RARE, mage.cards.k.KwainItinerantMeddler.class));
|
||||
cards.add(new SetCardInfo("Kydele, Chosen of Kruphix", 524, Rarity.MYTHIC, mage.cards.k.KydeleChosenOfKruphix.class));
|
||||
cards.add(new SetCardInfo("Laboratory Drudge", 78, Rarity.RARE, mage.cards.l.LaboratoryDrudge.class));
|
||||
cards.add(new SetCardInfo("Lathiel, the Bounteous Dawn", 285, Rarity.RARE, mage.cards.l.LathielTheBounteousDawn.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue