mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
[KHM] Implemented Raiders' Karve
This commit is contained in:
parent
c346bebe9a
commit
b12bc1fc19
2 changed files with 90 additions and 0 deletions
89
Mage.Sets/src/mage/cards/r/RaidersKarve.java
Normal file
89
Mage.Sets/src/mage/cards/r/RaidersKarve.java
Normal file
|
@ -0,0 +1,89 @@
|
||||||
|
package mage.cards.r;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.MageObject;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.AttacksTriggeredAbility;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.keyword.CrewAbility;
|
||||||
|
import mage.cards.Card;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.CardsImpl;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.players.Player;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class RaidersKarve extends CardImpl {
|
||||||
|
|
||||||
|
public RaidersKarve(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.VEHICLE);
|
||||||
|
this.power = new MageInt(4);
|
||||||
|
this.toughness = new MageInt(4);
|
||||||
|
|
||||||
|
// Whenever Raiders' Karve attacks, look at the top card of your library. If it's a land card, you may put it onto the battlefield tapped.
|
||||||
|
this.addAbility(new AttacksTriggeredAbility(new RaidersKarveEffect(), false));
|
||||||
|
|
||||||
|
// Crew 3
|
||||||
|
this.addAbility(new CrewAbility(3));
|
||||||
|
}
|
||||||
|
|
||||||
|
private RaidersKarve(final RaidersKarve card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RaidersKarve copy() {
|
||||||
|
return new RaidersKarve(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class RaidersKarveEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
RaidersKarveEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
staticText = "look at the top card of your library. " +
|
||||||
|
"If it's a land card, you may put it onto the battlefield tapped";
|
||||||
|
}
|
||||||
|
|
||||||
|
private RaidersKarveEffect(final RaidersKarveEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RaidersKarveEffect copy() {
|
||||||
|
return new RaidersKarveEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
|
MageObject sourceObject = source.getSourceObject(game);
|
||||||
|
if (controller == null || sourceObject == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Card card = controller.getLibrary().getFromTop(game);
|
||||||
|
if (card == null) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
controller.lookAtCards(sourceObject.getIdName(), new CardsImpl(card), game);
|
||||||
|
if (!card.isLand()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
String message = "Put " + card.getLogName() + " onto the battlefield tapped?";
|
||||||
|
if (controller.chooseUse(Outcome.PutLandInPlay, message, source, game)) {
|
||||||
|
controller.moveCards(card, Zone.BATTLEFIELD, source, game, true, false, false, null);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
|
@ -173,6 +173,7 @@ public final class Kaldheim extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Pilfering Hawk", 71, Rarity.COMMON, mage.cards.p.PilferingHawk.class));
|
cards.add(new SetCardInfo("Pilfering Hawk", 71, Rarity.COMMON, mage.cards.p.PilferingHawk.class));
|
||||||
cards.add(new SetCardInfo("Plains", 394, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS));
|
cards.add(new SetCardInfo("Plains", 394, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS));
|
||||||
cards.add(new SetCardInfo("Pyre of Heroes", 241, Rarity.RARE, mage.cards.p.PyreOfHeroes.class));
|
cards.add(new SetCardInfo("Pyre of Heroes", 241, Rarity.RARE, mage.cards.p.PyreOfHeroes.class));
|
||||||
|
cards.add(new SetCardInfo("Raiders' Karve", 242, Rarity.COMMON, mage.cards.r.RaidersKarve.class));
|
||||||
cards.add(new SetCardInfo("Raise the Draugr", 105, Rarity.COMMON, mage.cards.r.RaiseTheDraugr.class));
|
cards.add(new SetCardInfo("Raise the Draugr", 105, Rarity.COMMON, mage.cards.r.RaiseTheDraugr.class));
|
||||||
cards.add(new SetCardInfo("Rally the Ranks", 20, Rarity.RARE, mage.cards.r.RallyTheRanks.class));
|
cards.add(new SetCardInfo("Rally the Ranks", 20, Rarity.RARE, mage.cards.r.RallyTheRanks.class));
|
||||||
cards.add(new SetCardInfo("Rampage of the Valkyries", 393, Rarity.UNCOMMON, mage.cards.r.RampageOfTheValkyries.class));
|
cards.add(new SetCardInfo("Rampage of the Valkyries", 393, Rarity.UNCOMMON, mage.cards.r.RampageOfTheValkyries.class));
|
||||||
|
|
Loading…
Reference in a new issue