mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
[C13] Added 5 cards.
This commit is contained in:
parent
9602ac4e76
commit
36ec4a678d
9 changed files with 926 additions and 0 deletions
116
Mage.Sets/src/mage/sets/commander2013/Crawlspace.java
Normal file
116
Mage.Sets/src/mage/sets/commander2013/Crawlspace.java
Normal file
|
@ -0,0 +1,116 @@
|
||||||
|
/*
|
||||||
|
* 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.commander2013;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.effects.ContinuousEffectImpl;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.Layer;
|
||||||
|
import static mage.constants.Layer.RulesEffects;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.Rarity;
|
||||||
|
import mage.constants.SubLayer;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.players.Player;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class Crawlspace extends CardImpl<Crawlspace> {
|
||||||
|
|
||||||
|
public Crawlspace(UUID ownerId) {
|
||||||
|
super(ownerId, 240, "Crawlspace", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{3}");
|
||||||
|
this.expansionSetCode = "C13";
|
||||||
|
|
||||||
|
// No more than two creatures can attack you each combat.
|
||||||
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ChangeMaxAttackedBySourceEffect(2)));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public Crawlspace(final Crawlspace card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Crawlspace copy() {
|
||||||
|
return new Crawlspace(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ChangeMaxAttackedBySourceEffect extends ContinuousEffectImpl<ChangeMaxAttackedBySourceEffect> {
|
||||||
|
|
||||||
|
private final int maxAttackedBy;
|
||||||
|
|
||||||
|
public ChangeMaxAttackedBySourceEffect(int maxAttackedBy) {
|
||||||
|
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||||
|
this.maxAttackedBy = maxAttackedBy;
|
||||||
|
staticText = "No more than two creatures can attack you each combat";
|
||||||
|
}
|
||||||
|
|
||||||
|
public ChangeMaxAttackedBySourceEffect(final ChangeMaxAttackedBySourceEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
this.maxAttackedBy = effect.maxAttackedBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ChangeMaxAttackedBySourceEffect copy() {
|
||||||
|
return new ChangeMaxAttackedBySourceEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) {
|
||||||
|
switch (layer) {
|
||||||
|
case RulesEffects:
|
||||||
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
|
if (controller != null) {
|
||||||
|
// Change the rule
|
||||||
|
if (controller.getMaxAttackedBy()> maxAttackedBy) {
|
||||||
|
controller.setMaxAttackedBy(maxAttackedBy);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasLayer(Layer layer) {
|
||||||
|
return layer == Layer.RulesEffects;
|
||||||
|
}
|
||||||
|
}
|
162
Mage.Sets/src/mage/sets/commander2013/OrderOfSuccession.java
Normal file
162
Mage.Sets/src/mage/sets/commander2013/OrderOfSuccession.java
Normal file
|
@ -0,0 +1,162 @@
|
||||||
|
/*
|
||||||
|
* 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.commander2013;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.effects.ContinuousEffect;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.continious.GainControlTargetEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.choices.ChoiceLeftOrRight;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.Rarity;
|
||||||
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.players.PlayerList;
|
||||||
|
import mage.target.Target;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
import mage.target.targetpointer.FixedTarget;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class OrderOfSuccession extends CardImpl<OrderOfSuccession> {
|
||||||
|
|
||||||
|
public OrderOfSuccession(UUID ownerId) {
|
||||||
|
super(ownerId, 52, "Order of Succession", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{3}{U}");
|
||||||
|
this.expansionSetCode = "C13";
|
||||||
|
|
||||||
|
this.color.setBlue(true);
|
||||||
|
|
||||||
|
// Choose left or right. Starting with you and proceeding in the chosen direction, each player chooses a creature controlled by the next player in that direction. Each player gains control of the creature he or she chose.
|
||||||
|
this.getSpellAbility().addChoice(new ChoiceLeftOrRight());
|
||||||
|
this.getSpellAbility().addEffect(new OrderOfSuccessionEffect());
|
||||||
|
}
|
||||||
|
|
||||||
|
public OrderOfSuccession(final OrderOfSuccession card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public OrderOfSuccession copy() {
|
||||||
|
return new OrderOfSuccession(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class OrderOfSuccessionEffect extends OneShotEffect<OrderOfSuccessionEffect> {
|
||||||
|
|
||||||
|
public OrderOfSuccessionEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
this.staticText = "Starting with you and proceeding in the chosen direction, each player chooses a creature controlled by the next player in that direction. Each player gains control of the creature he or she chose";
|
||||||
|
}
|
||||||
|
|
||||||
|
public OrderOfSuccessionEffect(final OrderOfSuccessionEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public OrderOfSuccessionEffect copy() {
|
||||||
|
return new OrderOfSuccessionEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
|
if (controller != null) {
|
||||||
|
Map<UUID, UUID> playerCreature = new HashMap<UUID,UUID>();
|
||||||
|
boolean left = source.getChoices().get(0).getChoice().equals("Left");
|
||||||
|
PlayerList playerList = game.getState().getPlayerList();
|
||||||
|
while (!playerList.get().equals(source.getControllerId()) && controller.isInGame()) {
|
||||||
|
playerList.getNext();
|
||||||
|
}
|
||||||
|
Player currentPlayer = game.getPlayer(playerList.get());
|
||||||
|
Player nextPlayer;
|
||||||
|
UUID firstNextPlayer = null;
|
||||||
|
|
||||||
|
while (!getNextPlayerInDirection(left, playerList, game).equals(firstNextPlayer) && controller.isInGame()){
|
||||||
|
nextPlayer = game.getPlayer(playerList.get());
|
||||||
|
if (nextPlayer == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (firstNextPlayer == null) {
|
||||||
|
firstNextPlayer = nextPlayer.getId();
|
||||||
|
}
|
||||||
|
// if player is in range he chooses an creature to control
|
||||||
|
if (controller.getInRange().contains(currentPlayer.getId())) {
|
||||||
|
if (currentPlayer != null && nextPlayer != null) {
|
||||||
|
FilterCreaturePermanent filter = new FilterCreaturePermanent(new StringBuilder("creature controlled by ").append(nextPlayer.getName()).toString());
|
||||||
|
filter.add(new ControllerIdPredicate(nextPlayer.getId()));
|
||||||
|
Target target = new TargetCreaturePermanent(filter, true);
|
||||||
|
target.setNotTarget(false);
|
||||||
|
if (target.canChoose(source.getSourceId(), currentPlayer.getId(), game)) {
|
||||||
|
if (currentPlayer.chooseTarget(outcome, target, source, game)) {
|
||||||
|
playerCreature.put(currentPlayer.getId(), target.getFirstTarget());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
currentPlayer = nextPlayer;
|
||||||
|
}
|
||||||
|
// change control of targets
|
||||||
|
for (Map.Entry<UUID, UUID> entry : playerCreature.entrySet()) {
|
||||||
|
Player player = game.getPlayer(entry.getKey());
|
||||||
|
if (player != null) {
|
||||||
|
Permanent creature = game.getPermanent(entry.getValue());
|
||||||
|
if (creature != null) {
|
||||||
|
ContinuousEffect effect = new GainControlTargetEffect(Duration.EndOfGame, player.getId());
|
||||||
|
effect.setTargetPointer(new FixedTarget(creature.getId()));
|
||||||
|
game.addEffect(effect, source);
|
||||||
|
game.informPlayers(new StringBuilder(player.getName()).append(" gains control of ").append(creature.getName()).toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private UUID getNextPlayerInDirection(boolean left, PlayerList playerList, Game game) {
|
||||||
|
UUID nextPlayerId;
|
||||||
|
if (left) {
|
||||||
|
nextPlayerId = playerList.getNext();
|
||||||
|
} else {
|
||||||
|
nextPlayerId = playerList.getPrevious();
|
||||||
|
}
|
||||||
|
return nextPlayerId;
|
||||||
|
}
|
||||||
|
}
|
52
Mage.Sets/src/mage/sets/commander2013/SpinalEmbrace.java
Normal file
52
Mage.Sets/src/mage/sets/commander2013/SpinalEmbrace.java
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
/*
|
||||||
|
* 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.commander2013;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class SpinalEmbrace extends mage.sets.invasion.SpinalEmbrace {
|
||||||
|
|
||||||
|
public SpinalEmbrace(UUID ownerId) {
|
||||||
|
super(ownerId);
|
||||||
|
this.cardNumber = 218;
|
||||||
|
this.expansionSetCode = "C13";
|
||||||
|
}
|
||||||
|
|
||||||
|
public SpinalEmbrace(final SpinalEmbrace card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SpinalEmbrace copy() {
|
||||||
|
return new SpinalEmbrace(this);
|
||||||
|
}
|
||||||
|
}
|
142
Mage.Sets/src/mage/sets/commander2013/TemptWithImmortality.java
Normal file
142
Mage.Sets/src/mage/sets/commander2013/TemptWithImmortality.java
Normal file
|
@ -0,0 +1,142 @@
|
||||||
|
/*
|
||||||
|
* 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.commander2013;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.cards.Card;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.Rarity;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.FilterCard;
|
||||||
|
import mage.filter.common.FilterCreatureCard;
|
||||||
|
import mage.filter.predicate.other.OwnerIdPredicate;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.Target;
|
||||||
|
import mage.target.common.TargetCardInGraveyard;
|
||||||
|
import mage.target.common.TargetCardInYourGraveyard;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class TemptWithImmortality extends CardImpl<TemptWithImmortality> {
|
||||||
|
|
||||||
|
public TemptWithImmortality(UUID ownerId) {
|
||||||
|
super(ownerId, 95, "Tempt with Immortality", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{4}{B}");
|
||||||
|
this.expansionSetCode = "C13";
|
||||||
|
|
||||||
|
this.color.setBlack(true);
|
||||||
|
|
||||||
|
// Tempting offer - Return a creature card from your graveyard to the battlefield. Each opponent may return a creature card from his or her graveyard to the battlefield. For each player who does, return a creature card from your graveyard to the battlefield.
|
||||||
|
this.getSpellAbility().addEffect(new TemptWithImmortalityEffect());
|
||||||
|
}
|
||||||
|
|
||||||
|
public TemptWithImmortality(final TemptWithImmortality card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TemptWithImmortality copy() {
|
||||||
|
return new TemptWithImmortality(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class TemptWithImmortalityEffect extends OneShotEffect<TemptWithImmortalityEffect> {
|
||||||
|
|
||||||
|
public TemptWithImmortalityEffect() {
|
||||||
|
super(Outcome.PutCreatureInPlay);
|
||||||
|
this.staticText = "<i>Tempting offer</i> - Return a creature card from your graveyard to the battlefield. Each opponent may return a creature card from his or her graveyard to the battlefield. For each player who does, return a creature card from your graveyard to the battlefield";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public TemptWithImmortalityEffect(final TemptWithImmortalityEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TemptWithImmortalityEffect copy() {
|
||||||
|
return new TemptWithImmortalityEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
|
if (controller != null) {
|
||||||
|
returnCreatureFromGraveToBattlefield(controller, source, game);
|
||||||
|
|
||||||
|
int opponentsReturnedCreatures = 0;
|
||||||
|
for (UUID playerId : game.getOpponents(controller.getId())) {
|
||||||
|
Player opponent = game.getPlayer(playerId);
|
||||||
|
if (opponent != null) {
|
||||||
|
FilterCard filter = new FilterCreatureCard("creature card from your graveyard");
|
||||||
|
filter.add(new OwnerIdPredicate(opponent.getId()));
|
||||||
|
Target targetOpponent = new TargetCardInGraveyard(filter);
|
||||||
|
targetOpponent.setRequired(true);
|
||||||
|
if (targetOpponent.canChoose(source.getSourceId(), opponent.getId(), game)) {
|
||||||
|
if (opponent.chooseUse(outcome, new StringBuilder("Return a creature card from your graveyard to the battlefield?").toString(), game)) {
|
||||||
|
if (opponent.chooseTarget(outcome, targetOpponent, source, game)) {
|
||||||
|
Card card = game.getCard(targetOpponent.getFirstTarget());
|
||||||
|
if (card != null) {
|
||||||
|
opponentsReturnedCreatures++;
|
||||||
|
card.moveToZone(Zone.BATTLEFIELD, source.getSourceId(), game, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (opponentsReturnedCreatures > 0) {
|
||||||
|
for (int i = 0; i < opponentsReturnedCreatures; i++) {
|
||||||
|
returnCreatureFromGraveToBattlefield(controller, source, game);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean returnCreatureFromGraveToBattlefield(Player player, Ability source, Game game) {
|
||||||
|
Target target = new TargetCardInYourGraveyard(new FilterCreatureCard());
|
||||||
|
target.setRequired(true);
|
||||||
|
if (target.canChoose(source.getSourceId(), source.getControllerId(), game)) {
|
||||||
|
if (player.chooseTarget(outcome, target, source, game)) {
|
||||||
|
Card card = game.getCard(target.getFirstTarget());
|
||||||
|
if (card != null) {
|
||||||
|
return card.moveToZone(Zone.BATTLEFIELD, source.getSourceId(), game, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
102
Mage.Sets/src/mage/sets/commander2013/WellOfLostDreams.java
Normal file
102
Mage.Sets/src/mage/sets/commander2013/WellOfLostDreams.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.sets.commander2013;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.GainLifeControllerTriggeredAbility;
|
||||||
|
import mage.abilities.costs.mana.GenericManaCost;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.Rarity;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.players.Player;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class WellOfLostDreams extends CardImpl<WellOfLostDreams> {
|
||||||
|
|
||||||
|
public WellOfLostDreams(UUID ownerId) {
|
||||||
|
super(ownerId, 271, "Well of Lost Dreams", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{4}");
|
||||||
|
this.expansionSetCode = "C13";
|
||||||
|
|
||||||
|
// Whenever you gain life, you may pay {X}, where X is less than or equal to the amount of life you gained. If you do, draw X cards.
|
||||||
|
this.addAbility(new GainLifeControllerTriggeredAbility(new WellOfLostDreamsEffect(), true, true));
|
||||||
|
}
|
||||||
|
|
||||||
|
public WellOfLostDreams(final WellOfLostDreams card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WellOfLostDreams copy() {
|
||||||
|
return new WellOfLostDreams(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class WellOfLostDreamsEffect extends OneShotEffect<WellOfLostDreamsEffect> {
|
||||||
|
|
||||||
|
public WellOfLostDreamsEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
this.staticText = "you may pay {X}, where X is less than or equal to the amount of life you gained. If you do, draw X cards";
|
||||||
|
}
|
||||||
|
|
||||||
|
public WellOfLostDreamsEffect(final WellOfLostDreamsEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WellOfLostDreamsEffect copy() {
|
||||||
|
return new WellOfLostDreamsEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
|
if (controller != null) {
|
||||||
|
int amount = (Integer) getValue("gainedLife");
|
||||||
|
if (amount > 0) {
|
||||||
|
int xValue = controller.announceXMana(0, amount, "Announce X Value", game, source);
|
||||||
|
if (xValue > 0) {
|
||||||
|
if (new GenericManaCost(xValue).pay(source, game, source.getSourceId(), controller.getId(), false)) {
|
||||||
|
game.informPlayers(new StringBuilder(controller.getName()).append(" payed {").append(xValue).append("}").toString());
|
||||||
|
controller.drawCards(xValue, game);
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
52
Mage.Sets/src/mage/sets/darksteel/WellOfLostDreams.java
Normal file
52
Mage.Sets/src/mage/sets/darksteel/WellOfLostDreams.java
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
/*
|
||||||
|
* 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.darksteel;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class WellOfLostDreams extends mage.sets.commander2013.WellOfLostDreams {
|
||||||
|
|
||||||
|
public WellOfLostDreams(UUID ownerId) {
|
||||||
|
super(ownerId);
|
||||||
|
this.cardNumber = 159;
|
||||||
|
this.expansionSetCode = "DST";
|
||||||
|
}
|
||||||
|
|
||||||
|
public WellOfLostDreams(final WellOfLostDreams card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WellOfLostDreams copy() {
|
||||||
|
return new WellOfLostDreams(this);
|
||||||
|
}
|
||||||
|
}
|
194
Mage.Sets/src/mage/sets/invasion/SpinalEmbrace.java
Normal file
194
Mage.Sets/src/mage/sets/invasion/SpinalEmbrace.java
Normal file
|
@ -0,0 +1,194 @@
|
||||||
|
/*
|
||||||
|
* 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.invasion;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.DelayedTriggeredAbility;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.common.delayed.AtEndOfTurnDelayedTriggeredAbility;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.ReplacementEffectImpl;
|
||||||
|
import mage.abilities.effects.common.UntapTargetEffect;
|
||||||
|
import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
|
||||||
|
import mage.abilities.effects.common.continious.GainControlTargetEffect;
|
||||||
|
import mage.abilities.keyword.HasteAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.Rarity;
|
||||||
|
import mage.constants.TargetController;
|
||||||
|
import mage.constants.TurnPhase;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.events.GameEvent;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
import mage.target.targetpointer.FixedTarget;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class SpinalEmbrace extends CardImpl<SpinalEmbrace> {
|
||||||
|
|
||||||
|
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you don't control");
|
||||||
|
static {
|
||||||
|
filter.add(new ControllerPredicate(TargetController.NOT_YOU));
|
||||||
|
}
|
||||||
|
|
||||||
|
public SpinalEmbrace(UUID ownerId) {
|
||||||
|
super(ownerId, 276, "Spinal Embrace", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{3}{U}");
|
||||||
|
this.expansionSetCode = "INV";
|
||||||
|
|
||||||
|
this.color.setBlue(true);
|
||||||
|
|
||||||
|
// Cast Spinal Embrace only during combat.
|
||||||
|
Ability ability = new SimpleStaticAbility(Zone.ALL, new SpinalEmbraceEffect());
|
||||||
|
ability.setRuleAtTheTop(true);
|
||||||
|
this.addAbility(ability);
|
||||||
|
// Untap target creature you don't control and gain control of it. It gains haste until end of turn. At the beginning of the next end step, sacrifice it. If you do, you gain life equal to its toughness.
|
||||||
|
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||||
|
this.getSpellAbility().addEffect(new UntapTargetEffect());
|
||||||
|
Effect effect = new GainControlTargetEffect(Duration.EndOfTurn);
|
||||||
|
effect.setText("and gain control of it");
|
||||||
|
this.getSpellAbility().addEffect(effect);
|
||||||
|
this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn));
|
||||||
|
this.getSpellAbility().addEffect(new SpinalEmbraceAddDelayedEffect());
|
||||||
|
}
|
||||||
|
|
||||||
|
public SpinalEmbrace(final SpinalEmbrace card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SpinalEmbrace copy() {
|
||||||
|
return new SpinalEmbrace(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class SpinalEmbraceEffect extends ReplacementEffectImpl<SpinalEmbraceEffect> {
|
||||||
|
SpinalEmbraceEffect() {
|
||||||
|
super(Duration.EndOfGame, Outcome.Detriment);
|
||||||
|
staticText = "Cast {this} only during combat";
|
||||||
|
}
|
||||||
|
|
||||||
|
SpinalEmbraceEffect(final SpinalEmbraceEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||||
|
if (event.getType().equals(GameEvent.EventType.CAST_SPELL) && event.getSourceId().equals(source.getSourceId())) {
|
||||||
|
return !game.getTurn().getPhaseType().equals(TurnPhase.COMBAT);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SpinalEmbraceEffect copy() {
|
||||||
|
return new SpinalEmbraceEffect(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class SpinalEmbraceAddDelayedEffect extends OneShotEffect<SpinalEmbraceAddDelayedEffect> {
|
||||||
|
|
||||||
|
public SpinalEmbraceAddDelayedEffect() {
|
||||||
|
super(Outcome.Sacrifice);
|
||||||
|
staticText = "At the beginning of the next end step, sacrifice it. If you do, you gain life equal to its toughness";
|
||||||
|
}
|
||||||
|
|
||||||
|
public SpinalEmbraceAddDelayedEffect(final SpinalEmbraceAddDelayedEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SpinalEmbraceAddDelayedEffect copy() {
|
||||||
|
return new SpinalEmbraceAddDelayedEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
SpinalEmbraceSacrificeEffect sacrificeEffect = new SpinalEmbraceSacrificeEffect();
|
||||||
|
sacrificeEffect.setTargetPointer(new FixedTarget(source.getFirstTarget()));
|
||||||
|
DelayedTriggeredAbility delayedAbility = new AtEndOfTurnDelayedTriggeredAbility(sacrificeEffect);
|
||||||
|
delayedAbility.setSourceId(source.getSourceId());
|
||||||
|
delayedAbility.setControllerId(source.getControllerId());
|
||||||
|
game.addDelayedTriggeredAbility(delayedAbility);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class SpinalEmbraceSacrificeEffect extends OneShotEffect<SpinalEmbraceSacrificeEffect> {
|
||||||
|
|
||||||
|
public SpinalEmbraceSacrificeEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
this.staticText = "sacrifice it. If you do, you gain life equal to its toughness";
|
||||||
|
}
|
||||||
|
|
||||||
|
public SpinalEmbraceSacrificeEffect(final SpinalEmbraceSacrificeEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SpinalEmbraceSacrificeEffect copy() {
|
||||||
|
return new SpinalEmbraceSacrificeEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
int affectedTargets = 0;
|
||||||
|
for (UUID permanentId : targetPointer.getTargets(game, source)) {
|
||||||
|
Permanent permanent = game.getPermanent(permanentId);
|
||||||
|
if (permanent != null) {
|
||||||
|
permanent.sacrifice(source.getSourceId(), game);
|
||||||
|
affectedTargets++;
|
||||||
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
|
if (controller != null) {
|
||||||
|
controller.gainLife(permanent.getPower().getValue(), game);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return affectedTargets > 0;
|
||||||
|
}
|
||||||
|
}
|
52
Mage.Sets/src/mage/sets/urzaslegacy/Crawlspace.java
Normal file
52
Mage.Sets/src/mage/sets/urzaslegacy/Crawlspace.java
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
/*
|
||||||
|
* 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.urzaslegacy;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class Crawlspace extends mage.sets.commander2013.Crawlspace {
|
||||||
|
|
||||||
|
public Crawlspace(UUID ownerId) {
|
||||||
|
super(ownerId);
|
||||||
|
this.cardNumber = 123;
|
||||||
|
this.expansionSetCode = "ULG";
|
||||||
|
}
|
||||||
|
|
||||||
|
public Crawlspace(final Crawlspace card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Crawlspace copy() {
|
||||||
|
return new Crawlspace(this);
|
||||||
|
}
|
||||||
|
}
|
54
Mage/src/mage/choices/ChoiceLeftOrRight.java
Normal file
54
Mage/src/mage/choices/ChoiceLeftOrRight.java
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
/*
|
||||||
|
* 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.choices;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class ChoiceLeftOrRight extends ChoiceImpl<ChoiceLeftOrRight> {
|
||||||
|
|
||||||
|
public ChoiceLeftOrRight() {
|
||||||
|
super(true);
|
||||||
|
this.choices.add("Left");
|
||||||
|
this.choices.add("Right");
|
||||||
|
this.message = "Choose left or right";
|
||||||
|
}
|
||||||
|
|
||||||
|
public ChoiceLeftOrRight(final ChoiceLeftOrRight choice) {
|
||||||
|
super(choice);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ChoiceLeftOrRight copy() {
|
||||||
|
return new ChoiceLeftOrRight(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in a new issue