[KTK] Added 4 black cards.

This commit is contained in:
emerald000 2014-09-08 21:46:09 -04:00
parent 6e13b3ec14
commit f57d22501a
6 changed files with 395 additions and 6 deletions

View file

@ -0,0 +1,123 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.khansoftarkir;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.LoseLifeSourceControllerEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.Cards;
import mage.cards.CardsImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.game.Game;
import mage.players.Player;
import mage.target.TargetCard;
/**
*
* @author emerald000
*/
public class BitterRevelation extends CardImpl {
public BitterRevelation(UUID ownerId) {
super(ownerId, 65, "Bitter Revelation", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{3}{B}");
this.expansionSetCode = "KTK";
this.color.setBlack(true);
// Look at the top four cards of your library. Put two of them into your hand and the rest into your graveyard. You lose 2 life.
this.getSpellAbility().addEffect(new BitterRevelationEffect());
this.getSpellAbility().addEffect(new LoseLifeSourceControllerEffect(2));
}
public BitterRevelation(final BitterRevelation card) {
super(card);
}
@Override
public BitterRevelation copy() {
return new BitterRevelation(this);
}
}
class BitterRevelationEffect extends OneShotEffect {
BitterRevelationEffect() {
super(Outcome.Benefit);
this.staticText = "Look at the top four cards of your library. Put two of them into your hand and the rest into your graveyard. ";
}
BitterRevelationEffect(final BitterRevelationEffect effect) {
super(effect);
}
@Override
public BitterRevelationEffect copy() {
return new BitterRevelationEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player != null) {
Cards cards = new CardsImpl(Zone.PICK);
int cardsCount = Math.min(4, player.getLibrary().size());
for (int i = 0; i < cardsCount; i++) {
Card card = player.getLibrary().removeFromTop(game);
if (card != null) {
cards.add(card);
game.setZone(card.getId(), Zone.PICK);
}
}
if (cards.size() > 0) {
player.lookAtCards("Bitter Revelation", cards, game);
TargetCard target = new TargetCard(Math.min(2, cards.size()), Zone.PICK, new FilterCard("two cards to put in your hand"));
if (player.choose(Outcome.DrawCard, cards, target, game)) {
for (UUID targetId : target.getTargets()) {
Card card = cards.get(targetId, game);
if (card != null) {
card.moveToZone(Zone.HAND, source.getSourceId(), game, false);
cards.remove(card);
}
}
}
for (Card card : cards.getCards(game)) {
card.moveToZone(Zone.GRAVEYARD, source.getSourceId(), game, true);
}
}
return true;
}
return false;
}
}

View file

@ -0,0 +1,66 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.khansoftarkir;
import java.util.UUID;
import mage.abilities.dynamicvalue.common.ManacostVariableValue;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.keyword.DelveAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.game.permanent.token.ZombieToken;
/**
*
* @author emerald000
*/
public class EmptyThePits extends CardImpl {
public EmptyThePits(UUID ownerId) {
super(ownerId, 72, "Empty the Pits", Rarity.MYTHIC, new CardType[]{CardType.INSTANT}, "{X}{X}{B}{B}{B}{B}");
this.expansionSetCode = "KTK";
this.color.setBlack(true);
// Delve
this.addAbility(new DelveAbility());
// Put X 2/2 black Zombie creature tokens onto the battlefield tapped.
this.getSpellAbility().addEffect(new CreateTokenEffect(new ZombieToken(), new ManacostVariableValue(), true, false));
}
public EmptyThePits(final EmptyThePits card) {
super(card);
}
@Override
public EmptyThePits copy() {
return new EmptyThePits(this);
}
}

View file

@ -0,0 +1,108 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.khansoftarkir;
import java.util.UUID;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.common.PayLifeCost;
import mage.abilities.effects.common.DoIfCostPaid;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.continious.BoostControlledEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.events.DamagedPlayerEvent;
import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType;
import mage.game.permanent.Permanent;
/**
*
* @author emerald000
*/
public class RaidersSpoils extends CardImpl {
public RaidersSpoils(UUID ownerId) {
super(ownerId, 83, "Raiders' Spoils", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{3}{B}");
this.expansionSetCode = "KTK";
this.color.setBlack(true);
// Creatures you control get +1/+0.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 0, Duration.WhileOnBattlefield)));
// Whenever a Warrior you control deals combat damage to a player, you may pay 1 life. If you do, draw a card.
this.addAbility(new RaidersSpoilsTriggeredAbility());
}
public RaidersSpoils(final RaidersSpoils card) {
super(card);
}
@Override
public RaidersSpoils copy() {
return new RaidersSpoils(this);
}
}
class RaidersSpoilsTriggeredAbility extends TriggeredAbilityImpl {
RaidersSpoilsTriggeredAbility() {
super(Zone.BATTLEFIELD, new DoIfCostPaid(new DrawCardSourceControllerEffect(1), new PayLifeCost(1)), false);
}
RaidersSpoilsTriggeredAbility(final RaidersSpoilsTriggeredAbility ability) {
super(ability);
}
@Override
public RaidersSpoilsTriggeredAbility copy() {
return new RaidersSpoilsTriggeredAbility(this);
}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
if (event.getType() == EventType.DAMAGED_PLAYER) {
DamagedPlayerEvent damageEvent = (DamagedPlayerEvent) event;
Permanent permanent = game.getPermanent(event.getSourceId());
if (damageEvent.isCombatDamage() && permanent != null && permanent.hasSubtype("Warrior") && permanent.getControllerId().equals(controllerId)) {
return true;
}
}
return false;
}
@Override
public String getRule() {
return "Whenever a Warrior you control deals combat damage to a player, you may pay 1 life. If you do, draw a card";
}
}

View file

@ -0,0 +1,91 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.khansoftarkir;
import java.util.UUID;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.common.TurnedFaceUpTriggeredAbility;
import mage.abilities.costs.common.RevealTargetFromHandCost;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.LoseLifeTargetEffect;
import mage.abilities.keyword.DeathtouchAbility;
import mage.abilities.keyword.MorphAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.target.TargetPlayer;
import mage.target.common.TargetCardInHand;
/**
*
* @author emerald000
*/
public class RuthlessRipper extends CardImpl {
private final static FilterCard filter = new FilterCard("a black card in your hand");
static {
filter.add(new ColorPredicate(ObjectColor.BLACK));
}
public RuthlessRipper(UUID ownerId) {
super(ownerId, 88, "Ruthless Ripper", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{B}");
this.expansionSetCode = "KTK";
this.subtype.add("Human");
this.subtype.add("Assassin");
this.color.setBlack(true);
this.power = new MageInt(1);
this.toughness = new MageInt(1);
// Deathtouch
this.addAbility(DeathtouchAbility.getInstance());
// Morph - Reveal a black card in your hand.
this.addAbility(new MorphAbility(this, new RevealTargetFromHandCost(new TargetCardInHand(filter))));
// When Ruthless Ripper is turned face up, target player loses 2 life.
Effect effect = new LoseLifeTargetEffect(2);
effect.setText("target player loses 2 life");
Ability ability = new TurnedFaceUpTriggeredAbility(effect);
ability.addTarget(new TargetPlayer());
this.addAbility(ability);
}
public RuthlessRipper(final RuthlessRipper card) {
super(card);
}
@Override
public RuthlessRipper copy() {
return new RuthlessRipper(this);
}
}

View file

@ -29,10 +29,10 @@
package mage.sets.tenth;
import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.MageInt;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
/**
*
@ -44,7 +44,7 @@ public class GoblinPiker extends CardImpl {
super(ownerId, 209, "Goblin Piker", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{R}");
this.expansionSetCode = "10E";
this.subtype.add("Goblin");
this.subtype.add("Warrier");
this.subtype.add("Warrior");
this.color.setRed(true);
this.power = new MageInt(2);
this.toughness = new MageInt(1);

View file

@ -82,10 +82,11 @@ public class DoIfCostPaid extends OneShotEffect {
protected String getCostText() {
StringBuilder sb = new StringBuilder();
String costText = cost.getText();
if (costText != null &&
!costText.toLowerCase().startsWith("discard")
if (costText != null
&& !costText.toLowerCase().startsWith("discard")
&& !costText.toLowerCase().startsWith("sacrifice")
&& !costText.toLowerCase().startsWith("remove")) {
&& !costText.toLowerCase().startsWith("remove")
&& !costText.toLowerCase().startsWith("pay")) {
sb.append("pay ");
}
return sb.append(costText).toString();