mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
commit
c91a93fb4e
8 changed files with 370 additions and 3 deletions
|
@ -105,7 +105,7 @@ class BomatCourierExileEffect extends OneShotEffect {
|
||||||
if (controller != null && sourceObject != null) {
|
if (controller != null && sourceObject != null) {
|
||||||
Card card = controller.getLibrary().getFromTop(game);
|
Card card = controller.getLibrary().getFromTop(game);
|
||||||
if (card != null) {
|
if (card != null) {
|
||||||
UUID exileZoneId = CardUtil.getCardExileZoneId(game, source);
|
UUID exileZoneId = CardUtil.getExileZoneId(game, source.getSourceId(), 0);
|
||||||
card.setFaceDown(true, game);
|
card.setFaceDown(true, game);
|
||||||
controller.moveCardsToExile(card, source, game, false, exileZoneId, sourceObject.getIdName());
|
controller.moveCardsToExile(card, source, game, false, exileZoneId, sourceObject.getIdName());
|
||||||
card.setFaceDown(true, game);
|
card.setFaceDown(true, game);
|
||||||
|
@ -136,7 +136,7 @@ class BomatCourierReturnEffect extends OneShotEffect {
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
if (controller != null) {
|
if (controller != null) {
|
||||||
ExileZone exileZone = game.getExile().getExileZone(CardUtil.getCardExileZoneId(game, source.getSourceId(), true));
|
ExileZone exileZone = game.getExile().getExileZone(CardUtil.getExileZoneId(game, source.getSourceId(), 0));
|
||||||
if (exileZone != null) {
|
if (exileZone != null) {
|
||||||
controller.moveCards(exileZone, Zone.HAND, source, game);
|
controller.moveCards(exileZone, Zone.HAND, source, game);
|
||||||
}
|
}
|
||||||
|
|
102
Mage.Sets/src/mage/cards/k/KindleTheCarnage.java
Normal file
102
Mage.Sets/src/mage/cards/k/KindleTheCarnage.java
Normal file
|
@ -0,0 +1,102 @@
|
||||||
|
/*
|
||||||
|
* 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.cards.k;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.DamageAllEffect;
|
||||||
|
import mage.cards.Card;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.Cards;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.players.Player;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jeffwadsworth
|
||||||
|
*/
|
||||||
|
public class KindleTheCarnage extends CardImpl {
|
||||||
|
|
||||||
|
public KindleTheCarnage(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{R}{R}");
|
||||||
|
|
||||||
|
// Discard a card at random. If you do, Kindle the Carnage deals damage equal to that card's converted mana cost to each creature. You may repeat this process any number of times.
|
||||||
|
this.getSpellAbility().addEffect(new KindleTheCarnageEffect());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public KindleTheCarnage(final KindleTheCarnage card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public KindleTheCarnage copy() {
|
||||||
|
return new KindleTheCarnage(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class KindleTheCarnageEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
public KindleTheCarnageEffect() {
|
||||||
|
super(Outcome.AIDontUseIt);
|
||||||
|
this.staticText = "Discard a card at random. If you do, {this} deals damage equal to that card's converted mana cost to each creature. You may repeat this process any number of times";
|
||||||
|
}
|
||||||
|
|
||||||
|
public KindleTheCarnageEffect(final KindleTheCarnageEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public KindleTheCarnageEffect copy() {
|
||||||
|
return new KindleTheCarnageEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
|
if (controller != null) {
|
||||||
|
Cards hand = controller.getHand();
|
||||||
|
while (hand != null
|
||||||
|
&& hand.size() > 0
|
||||||
|
&& controller.isInGame()
|
||||||
|
&& controller.chooseUse(Outcome.AIDontUseIt, "Discard a card randomly from your hand?", source, game)) {
|
||||||
|
Card discardedCard = controller.discardOne(true, source, game);
|
||||||
|
if (discardedCard != null) {
|
||||||
|
new DamageAllEffect(discardedCard.getConvertedManaCost(), new FilterCreaturePermanent()).apply(game, source);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
153
Mage.Sets/src/mage/cards/o/OathOfScholars.java
Normal file
153
Mage.Sets/src/mage/cards/o/OathOfScholars.java
Normal file
|
@ -0,0 +1,153 @@
|
||||||
|
/*
|
||||||
|
* 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.cards.o;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.MageObject;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.TargetController;
|
||||||
|
import mage.filter.FilterPlayer;
|
||||||
|
import mage.filter.predicate.ObjectSourcePlayer;
|
||||||
|
import mage.filter.predicate.ObjectSourcePlayerPredicate;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.TargetPlayer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jeffwadsworth
|
||||||
|
*/
|
||||||
|
public class OathOfScholars extends CardImpl {
|
||||||
|
|
||||||
|
private final UUID originalId;
|
||||||
|
private static final FilterPlayer filter = new FilterPlayer();
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(new OathOfScholarsPredicate());
|
||||||
|
}
|
||||||
|
|
||||||
|
public OathOfScholars(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{U}");
|
||||||
|
|
||||||
|
// At the beginning of each player's upkeep, that player chooses target player who has more cards in hand than he or she does and is his or her opponent. The first player may discard his or her hand and draw three cards.
|
||||||
|
Ability ability = new BeginningOfUpkeepTriggeredAbility(new OathOfScholarsEffect(), TargetController.ANY, false);
|
||||||
|
ability.addTarget(new TargetPlayer(1, 1, false, filter));
|
||||||
|
this.addAbility(ability);
|
||||||
|
originalId = ability.getOriginalId();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void adjustTargets(Ability ability, Game game) {
|
||||||
|
if (ability.getOriginalId().equals(originalId)) {
|
||||||
|
Player activePlayer = game.getPlayer(game.getActivePlayerId());
|
||||||
|
if (activePlayer != null) {
|
||||||
|
ability.setControllerId(activePlayer.getId());
|
||||||
|
ability.getTargets().clear();
|
||||||
|
TargetPlayer target = new TargetPlayer(1, 1, false, filter);
|
||||||
|
ability.getTargets().add(target);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public OathOfScholars(final OathOfScholars card) {
|
||||||
|
super(card);
|
||||||
|
this.originalId = card.originalId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public OathOfScholars copy() {
|
||||||
|
return new OathOfScholars(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class OathOfScholarsPredicate implements ObjectSourcePlayerPredicate<ObjectSourcePlayer<Player>> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(ObjectSourcePlayer<Player> input, Game game) {
|
||||||
|
Player targetPlayer = input.getObject();
|
||||||
|
Player firstPlayer = game.getPlayer(game.getActivePlayerId());
|
||||||
|
if (targetPlayer == null
|
||||||
|
|| firstPlayer == null
|
||||||
|
|| targetPlayer.getId().equals(firstPlayer.getId())
|
||||||
|
|| !game.getOpponents(targetPlayer.getId()).contains(firstPlayer.getId())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
int countHandTargetPlayer = targetPlayer.getHand().size();
|
||||||
|
int countHandFirstPlayer = firstPlayer.getHand().size();
|
||||||
|
|
||||||
|
return countHandTargetPlayer > countHandFirstPlayer;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "player who has more cards in hand than he or she does";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class OathOfScholarsEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
public OathOfScholarsEffect() {
|
||||||
|
super(Outcome.PutCardInPlay);
|
||||||
|
staticText = "that player chooses target player who has more cards in hand than he or she does and is his or her opponent. The first player may discard his or her hand and draw three cards";
|
||||||
|
}
|
||||||
|
|
||||||
|
public OathOfScholarsEffect(OathOfScholarsEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
MageObject sourceObject = game.getObject(source.getSourceId());
|
||||||
|
Player targetPlayer = game.getPlayer(source.getFirstTarget());
|
||||||
|
Player firstPlayer = game.getPlayer(game.getActivePlayerId());
|
||||||
|
if (sourceObject == null
|
||||||
|
|| targetPlayer == null
|
||||||
|
|| firstPlayer == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (firstPlayer.getHand().size() < targetPlayer.getHand().size() // the condition must be checked again on resolution
|
||||||
|
&& firstPlayer.chooseUse(Outcome.AIDontUseIt, "Do you wish to discard your hand and draw 3 cards?", source, game)) {
|
||||||
|
firstPlayer.discard(firstPlayer.getHand().size(), true, source, game);
|
||||||
|
firstPlayer.drawCards(3, game);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public OathOfScholarsEffect copy() {
|
||||||
|
return new OathOfScholarsEffect(this);
|
||||||
|
}
|
||||||
|
}
|
|
@ -32,6 +32,7 @@ import mage.ObjectColor;
|
||||||
import mage.abilities.AbilitiesImpl;
|
import mage.abilities.AbilitiesImpl;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
|
||||||
import mage.abilities.costs.Cost;
|
import mage.abilities.costs.Cost;
|
||||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
@ -65,7 +66,7 @@ public class OozeGarden extends CardImpl {
|
||||||
|
|
||||||
|
|
||||||
// {1}{G}, Sacrifice a non-Ooze creature: Create an X/X green Ooze creature token, where X is the sacrificed creature's power. Activate this ability only any time you could cast a sorcery.
|
// {1}{G}, Sacrifice a non-Ooze creature: Create an X/X green Ooze creature token, where X is the sacrificed creature's power. Activate this ability only any time you could cast a sorcery.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new OozeGardenCreateTokenEffect(), new ManaCostsImpl("{1}{G}"));
|
Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new OozeGardenCreateTokenEffect(), new ManaCostsImpl("{1}{G}"));
|
||||||
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, true)));
|
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, true)));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
108
Mage.Sets/src/mage/cards/r/RitesOfRefusal.java
Normal file
108
Mage.Sets/src/mage/cards/r/RitesOfRefusal.java
Normal 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.cards.r;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.costs.mana.GenericManaCost;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.Cards;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.stack.Spell;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.TargetSpell;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jeffwadsworth
|
||||||
|
*/
|
||||||
|
public class RitesOfRefusal extends CardImpl {
|
||||||
|
|
||||||
|
public RitesOfRefusal(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}");
|
||||||
|
|
||||||
|
// Discard any number of cards. Counter target spell unless its controller pays {3} for each card discarded this way.
|
||||||
|
this.getSpellAbility().addEffect(new RitesOfRefusalEffect());
|
||||||
|
this.getSpellAbility().addTarget(new TargetSpell());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public RitesOfRefusal(final RitesOfRefusal card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RitesOfRefusal copy() {
|
||||||
|
return new RitesOfRefusal(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class RitesOfRefusalEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
RitesOfRefusalEffect() {
|
||||||
|
super(Outcome.AIDontUseIt);
|
||||||
|
this.staticText = "Discard any number of cards. Counter target spell unless its controller pays {3} for each card discarded this way";
|
||||||
|
}
|
||||||
|
|
||||||
|
RitesOfRefusalEffect(final RitesOfRefusalEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RitesOfRefusalEffect copy() {
|
||||||
|
return new RitesOfRefusalEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
|
Spell targetSpell = game.getStack().getSpell(source.getFirstTarget());
|
||||||
|
if (targetSpell != null) {
|
||||||
|
Player controllerOfTargetedSpell = game.getPlayer(targetSpell.getControllerId());
|
||||||
|
if (controller != null
|
||||||
|
&& controllerOfTargetedSpell != null) {
|
||||||
|
int numToDiscard = controller.getAmount(0, controller.getHand().size(), "How many cards do you want to discard?", game);
|
||||||
|
Cards discardedCards = controller.discard(numToDiscard, false, source, game);
|
||||||
|
int actualNumberDiscarded = discardedCards.size();
|
||||||
|
GenericManaCost cost = new GenericManaCost(actualNumberDiscarded * 3);
|
||||||
|
if (controllerOfTargetedSpell.chooseUse(Outcome.AIDontUseIt, "Do you want to pay " + cost.convertedManaCost() + " to prevent " + targetSpell.getName() + " from gettting countered?", source, game)
|
||||||
|
&& cost.pay(source, game, source.getSourceId(), controllerOfTargetedSpell.getId(), false)) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
targetSpell.counter(source.getSourceId(), game);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
|
@ -115,6 +115,7 @@ public class Dissension extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Infernal Tutor", 46, Rarity.RARE, mage.cards.i.InfernalTutor.class));
|
cards.add(new SetCardInfo("Infernal Tutor", 46, Rarity.RARE, mage.cards.i.InfernalTutor.class));
|
||||||
cards.add(new SetCardInfo("Isperia the Inscrutable", 114, Rarity.RARE, mage.cards.i.IsperiaTheInscrutable.class));
|
cards.add(new SetCardInfo("Isperia the Inscrutable", 114, Rarity.RARE, mage.cards.i.IsperiaTheInscrutable.class));
|
||||||
cards.add(new SetCardInfo("Kill-Suit Cultist", 65, Rarity.COMMON, mage.cards.k.KillSuitCultist.class));
|
cards.add(new SetCardInfo("Kill-Suit Cultist", 65, Rarity.COMMON, mage.cards.k.KillSuitCultist.class));
|
||||||
|
cards.add(new SetCardInfo("Kindle the Carnage", 66, Rarity.UNCOMMON, mage.cards.k.KindleTheCarnage.class));
|
||||||
cards.add(new SetCardInfo("Leafdrake Roost", 116, Rarity.UNCOMMON, mage.cards.l.LeafdrakeRoost.class));
|
cards.add(new SetCardInfo("Leafdrake Roost", 116, Rarity.UNCOMMON, mage.cards.l.LeafdrakeRoost.class));
|
||||||
cards.add(new SetCardInfo("Loaming Shaman", 87, Rarity.RARE, mage.cards.l.LoamingShaman.class));
|
cards.add(new SetCardInfo("Loaming Shaman", 87, Rarity.RARE, mage.cards.l.LoamingShaman.class));
|
||||||
cards.add(new SetCardInfo("Lyzolda, the Blood Witch", 117, Rarity.RARE, mage.cards.l.LyzoldaTheBloodWitch.class));
|
cards.add(new SetCardInfo("Lyzolda, the Blood Witch", 117, Rarity.RARE, mage.cards.l.LyzoldaTheBloodWitch.class));
|
||||||
|
|
|
@ -108,6 +108,7 @@ public class Exodus extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Null Brooch", 136, Rarity.RARE, mage.cards.n.NullBrooch.class));
|
cards.add(new SetCardInfo("Null Brooch", 136, Rarity.RARE, mage.cards.n.NullBrooch.class));
|
||||||
cards.add(new SetCardInfo("Oath of Druids", 115, Rarity.RARE, mage.cards.o.OathOfDruids.class));
|
cards.add(new SetCardInfo("Oath of Druids", 115, Rarity.RARE, mage.cards.o.OathOfDruids.class));
|
||||||
cards.add(new SetCardInfo("Oath of Lieges", 11, Rarity.RARE, mage.cards.o.OathOfLieges.class));
|
cards.add(new SetCardInfo("Oath of Lieges", 11, Rarity.RARE, mage.cards.o.OathOfLieges.class));
|
||||||
|
cards.add(new SetCardInfo("Oath of Scholars", 42, Rarity.RARE, mage.cards.o.OathOfScholars.class));
|
||||||
cards.add(new SetCardInfo("Ogre Shaman", 91, Rarity.RARE, mage.cards.o.OgreShaman.class));
|
cards.add(new SetCardInfo("Ogre Shaman", 91, Rarity.RARE, mage.cards.o.OgreShaman.class));
|
||||||
cards.add(new SetCardInfo("Onslaught", 92, Rarity.COMMON, mage.cards.o.Onslaught.class));
|
cards.add(new SetCardInfo("Onslaught", 92, Rarity.COMMON, mage.cards.o.Onslaught.class));
|
||||||
cards.add(new SetCardInfo("Paladin en-Vec", 12, Rarity.RARE, mage.cards.p.PaladinEnVec.class));
|
cards.add(new SetCardInfo("Paladin en-Vec", 12, Rarity.RARE, mage.cards.p.PaladinEnVec.class));
|
||||||
|
|
|
@ -281,6 +281,7 @@ public class Odyssey extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Repentant Vampire", 157, Rarity.RARE, mage.cards.r.RepentantVampire.class));
|
cards.add(new SetCardInfo("Repentant Vampire", 157, Rarity.RARE, mage.cards.r.RepentantVampire.class));
|
||||||
cards.add(new SetCardInfo("Resilient Wanderer", 43, Rarity.UNCOMMON, mage.cards.r.ResilientWanderer.class));
|
cards.add(new SetCardInfo("Resilient Wanderer", 43, Rarity.UNCOMMON, mage.cards.r.ResilientWanderer.class));
|
||||||
cards.add(new SetCardInfo("Rites of Initiation", 217, Rarity.COMMON, mage.cards.r.RitesOfInitiation.class));
|
cards.add(new SetCardInfo("Rites of Initiation", 217, Rarity.COMMON, mage.cards.r.RitesOfInitiation.class));
|
||||||
|
cards.add(new SetCardInfo("Rites of Refusal", 99, Rarity.COMMON, mage.cards.r.RitesOfRefusal.class));
|
||||||
cards.add(new SetCardInfo("Roar of the Wurm", 266, Rarity.UNCOMMON, mage.cards.r.RoarOfTheWurm.class));
|
cards.add(new SetCardInfo("Roar of the Wurm", 266, Rarity.UNCOMMON, mage.cards.r.RoarOfTheWurm.class));
|
||||||
cards.add(new SetCardInfo("Rotting Giant", 158, Rarity.UNCOMMON, mage.cards.r.RottingGiant.class));
|
cards.add(new SetCardInfo("Rotting Giant", 158, Rarity.UNCOMMON, mage.cards.r.RottingGiant.class));
|
||||||
cards.add(new SetCardInfo("Sacred Rites", 44, Rarity.COMMON, mage.cards.s.SacredRites.class));
|
cards.add(new SetCardInfo("Sacred Rites", 44, Rarity.COMMON, mage.cards.s.SacredRites.class));
|
||||||
|
|
Loading…
Reference in a new issue