mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
Added Dark Depths, Spoils of the Vault, Entomb, Beseech the Queen, Tomb of Urami and Exhume
This commit is contained in:
parent
96c4c0bb04
commit
0074e48645
9 changed files with 767 additions and 1 deletions
132
Mage.Sets/src/mage/sets/coldsnap/DarkDepths.java
Normal file
132
Mage.Sets/src/mage/sets/coldsnap/DarkDepths.java
Normal file
|
@ -0,0 +1,132 @@
|
|||
/*
|
||||
* 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.coldsnap;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.StateTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.SacrificeSourceEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.effects.common.counter.RemoveCounterSourceEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.Token;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Plopman
|
||||
*/
|
||||
public class DarkDepths extends CardImpl<DarkDepths> {
|
||||
|
||||
public DarkDepths(UUID ownerId) {
|
||||
super(ownerId, 145, "Dark Depths", Rarity.RARE, new CardType[]{CardType.LAND}, "");
|
||||
this.expansionSetCode = "CSP";
|
||||
this.supertype.add("Legendary");
|
||||
this.supertype.add("Snow");
|
||||
|
||||
// Dark Depths enters the battlefield with ten ice counters on it.
|
||||
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.ICE.createInstance(10)), "with ten ice counters on it"));
|
||||
// {3}: Remove an ice counter from Dark Depths.
|
||||
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new RemoveCounterSourceEffect(CounterType.ICE.createInstance(1)), new ManaCostsImpl("{3}")));
|
||||
// When Dark Depths has no ice counters on it, sacrifice it. If you do, put a legendary 20/20 black Avatar creature token with flying and "This creature is indestructible" named Marit Lage onto the battlefield.
|
||||
this.addAbility(new DarkDepthsAbility());
|
||||
}
|
||||
|
||||
public DarkDepths(final DarkDepths card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DarkDepths copy() {
|
||||
return new DarkDepths(this);
|
||||
}
|
||||
}
|
||||
|
||||
class DarkDepthsAbility extends StateTriggeredAbility<DarkDepthsAbility> {
|
||||
|
||||
public DarkDepthsAbility() {
|
||||
super(Constants.Zone.BATTLEFIELD, new SacrificeSourceEffect());
|
||||
this.addEffect(new CreateTokenEffect(new MaritLageToken()));
|
||||
}
|
||||
|
||||
public DarkDepthsAbility(final DarkDepthsAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DarkDepthsAbility copy() {
|
||||
return new DarkDepthsAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Permanent permanent = game.getPermanent(getSourceId());
|
||||
if(permanent != null && permanent.getCounters().getCount(CounterType.ICE) == 0){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "When Dark Depths has no ice counters on it, sacrifice it. If you do, put a legendary 20/20 black Avatar creature token with flying and \"This creature is indestructible\" named Marit Lage onto the battlefield";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
class MaritLageToken extends Token {
|
||||
|
||||
public MaritLageToken() {
|
||||
super("Marit Lage", "legendary 20/20 black Avatar creature token with flying and \"This creature is indestructible\" named Marit Lage");
|
||||
cardType.add(CardType.CREATURE);
|
||||
subtype.add("Avatar");
|
||||
supertype.add("Legendary");
|
||||
|
||||
|
||||
color = ObjectColor.BLACK;
|
||||
power = new MageInt(20);
|
||||
toughness = new MageInt(20);
|
||||
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
this.addAbility(new IndestructibleAbility());
|
||||
}
|
||||
}
|
138
Mage.Sets/src/mage/sets/mirrodin/SpoilsOfTheVault.java
Normal file
138
Mage.Sets/src/mage/sets/mirrodin/SpoilsOfTheVault.java
Normal file
|
@ -0,0 +1,138 @@
|
|||
/*
|
||||
* 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.mirrodin;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.cards.repository.CardRepository;
|
||||
import mage.choices.Choice;
|
||||
import mage.choices.ChoiceImpl;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Plopman
|
||||
*/
|
||||
public class SpoilsOfTheVault extends CardImpl<SpoilsOfTheVault> {
|
||||
|
||||
public SpoilsOfTheVault(UUID ownerId) {
|
||||
super(ownerId, 78, "Spoils of the Vault", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{B}");
|
||||
this.expansionSetCode = "MRD";
|
||||
|
||||
this.color.setBlack(true);
|
||||
|
||||
// Name a card. Reveal cards from the top of your library until you reveal the named card, then put that card into your hand. Exile all other cards revealed this way, and you lose 1 life for each of the exiled cards.
|
||||
this.getSpellAbility().addEffect(new SpoilsOfTheVaultEffect());
|
||||
}
|
||||
|
||||
public SpoilsOfTheVault(final SpoilsOfTheVault card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SpoilsOfTheVault copy() {
|
||||
return new SpoilsOfTheVault(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class SpoilsOfTheVaultEffect extends OneShotEffect<SpoilsOfTheVaultEffect> {
|
||||
|
||||
public SpoilsOfTheVaultEffect() {
|
||||
super(Constants.Outcome.Damage);
|
||||
this.staticText = "Name a card. Reveal cards from the top of your library until you reveal the named card, then put that card into your hand. Exile all other cards revealed this way, and you lose 1 life for each of the exiled cards";
|
||||
}
|
||||
|
||||
public SpoilsOfTheVaultEffect(final SpoilsOfTheVaultEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SpoilsOfTheVaultEffect copy() {
|
||||
return new SpoilsOfTheVaultEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
String cardName;
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller == null) {
|
||||
return false;
|
||||
}
|
||||
else{
|
||||
Choice cardChoice = new ChoiceImpl();
|
||||
cardChoice.setChoices(CardRepository.instance.getNames());
|
||||
cardChoice.clearChoice();
|
||||
while (!controller.choose(Constants.Outcome.Detriment, cardChoice, game)) {
|
||||
game.debugMessage("player canceled choosing name. retrying.");
|
||||
}
|
||||
cardName = cardChoice.getChoice();
|
||||
game.informPlayers("Spoils of the Vault, named card: [" + cardName + "]");
|
||||
}
|
||||
Card sourceCard = game.getCard(source.getSourceId());
|
||||
|
||||
if (cardName == null || sourceCard == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Cards cards = new CardsImpl(Constants.Zone.PICK);
|
||||
while (controller.getLibrary().size() > 0) {
|
||||
Card card = controller.getLibrary().removeFromTop(game);
|
||||
if (card != null) {
|
||||
cards.add(card);
|
||||
if(card.getName().equals(cardName)){
|
||||
card.moveToZone(Constants.Zone.HAND, source.getId(), game, false);
|
||||
break;
|
||||
}
|
||||
else{
|
||||
card.moveToExile(null, sourceCard.getName(), source.getId(), game);
|
||||
}
|
||||
}
|
||||
else{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
controller.revealCards(sourceCard.getName(), cards, game);
|
||||
controller.loseLife(cards.size(), game);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
113
Mage.Sets/src/mage/sets/odyssey/Entomb.java
Normal file
113
Mage.Sets/src/mage/sets/odyssey/Entomb.java
Normal file
|
@ -0,0 +1,113 @@
|
|||
/*
|
||||
* 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.odyssey;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.SearchEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Plopman
|
||||
*/
|
||||
public class Entomb extends CardImpl<Entomb> {
|
||||
|
||||
public Entomb(UUID ownerId) {
|
||||
super(ownerId, 132, "Entomb", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{B}");
|
||||
this.expansionSetCode = "ODY";
|
||||
|
||||
this.color.setBlack(true);
|
||||
|
||||
// Search your library for a card and put that card into your graveyard. Then shuffle your library.
|
||||
this.getSpellAbility().addEffect(new SearchLibraryPutInGraveyard());
|
||||
}
|
||||
|
||||
public Entomb(final Entomb card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Entomb copy() {
|
||||
return new Entomb(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class SearchLibraryPutInGraveyard extends SearchEffect<SearchLibraryPutInGraveyard> {
|
||||
|
||||
public SearchLibraryPutInGraveyard() {
|
||||
super(new TargetCardInLibrary(new FilterCreatureCard()), Constants.Outcome.Neutral);
|
||||
staticText = "Search your library for a card and put that card into your graveyard. Then shuffle your library";
|
||||
}
|
||||
|
||||
public SearchLibraryPutInGraveyard(final SearchLibraryPutInGraveyard effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SearchLibraryPutInGraveyard copy() {
|
||||
return new SearchLibraryPutInGraveyard(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
if (player.searchLibrary(target, game)) {
|
||||
if (target.getTargets().size() > 0) {
|
||||
Cards cards = new CardsImpl();
|
||||
for (UUID cardId: (List<UUID>)target.getTargets()) {
|
||||
Card card = player.getLibrary().remove(cardId, game);
|
||||
if (card != null){
|
||||
card.moveToZone(Constants.Zone.GRAVEYARD, source.getId(), game, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
player.shuffleLibrary(game);
|
||||
return true;
|
||||
}
|
||||
player.shuffleLibrary(game);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
52
Mage.Sets/src/mage/sets/planechase/BeseechTheQueen.java
Normal file
52
Mage.Sets/src/mage/sets/planechase/BeseechTheQueen.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.planechase;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Plopman
|
||||
*/
|
||||
public class BeseechTheQueen extends mage.sets.shadowmoor.BeseechTheQueen {
|
||||
|
||||
public BeseechTheQueen(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 19;
|
||||
this.expansionSetCode = "HOP";
|
||||
}
|
||||
|
||||
public BeseechTheQueen(final BeseechTheQueen card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BeseechTheQueen copy() {
|
||||
return new BeseechTheQueen(this);
|
||||
}
|
||||
}
|
134
Mage.Sets/src/mage/sets/saviorsofkamigawa/TombOfUrami.java
Normal file
134
Mage.Sets/src/mage/sets/saviorsofkamigawa/TombOfUrami.java
Normal file
|
@ -0,0 +1,134 @@
|
|||
/*
|
||||
* 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.saviorsofkamigawa;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.CostImpl;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.DamageControllerEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.mana.BlackManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.Token;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Plopman
|
||||
*/
|
||||
public class TombOfUrami extends CardImpl<TombOfUrami> {
|
||||
|
||||
public TombOfUrami(UUID ownerId) {
|
||||
super(ownerId, 165, "Tomb of Urami", Rarity.RARE, new CardType[]{CardType.LAND}, "");
|
||||
this.expansionSetCode = "SOK";
|
||||
this.supertype.add("Legendary");
|
||||
|
||||
// {tap}: Add {B} to your mana pool. Tomb of Urami deals 1 damage to you if you don't control an Ogre.
|
||||
Ability ability = new BlackManaAbility();
|
||||
ability.addEffect(new DamageControllerEffect(1));
|
||||
this.addAbility(ability);
|
||||
// {2}{B}{B}, {tap}, Sacrifice all lands you control: Put a legendary 5/5 black Demon Spirit creature token with flying named Urami onto the battlefield.
|
||||
Ability ability2 = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new CreateTokenEffect(new UramiToken()), new ManaCostsImpl("{2}{B}{B}"));
|
||||
ability2.addCost(new TapSourceCost());
|
||||
ability2.addCost(new SacrificeAllLandCost());
|
||||
this.addAbility(ability2);
|
||||
}
|
||||
|
||||
public TombOfUrami(final TombOfUrami card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TombOfUrami copy() {
|
||||
return new TombOfUrami(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class SacrificeAllLandCost extends CostImpl<SacrificeAllLandCost> {
|
||||
|
||||
public SacrificeAllLandCost() {
|
||||
this.text = "Sacrifice all lands you control";
|
||||
}
|
||||
|
||||
public SacrificeAllLandCost(SacrificeAllLandCost cost) {
|
||||
super(cost);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) {
|
||||
for(Permanent permanent : game.getBattlefield().getActivePermanents(new FilterControlledLandPermanent(), ability.getControllerId(), game)){
|
||||
paid |= permanent.sacrifice(sourceId, game);
|
||||
}
|
||||
return paid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPay(UUID sourceId, UUID controllerId, Game game) {
|
||||
if (!game.getPlayer(controllerId).canPaySacrificeCost()) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SacrificeAllLandCost copy() {
|
||||
return new SacrificeAllLandCost(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
class UramiToken extends Token {
|
||||
|
||||
public UramiToken() {
|
||||
super("Urami", "legendary 5/5 black Demon Spirit creature token with flying named Urami");
|
||||
cardType.add(CardType.CREATURE);
|
||||
subtype.add("Demon");
|
||||
subtype.add("Spirit");
|
||||
supertype.add("Legendary");
|
||||
|
||||
|
||||
color = ObjectColor.BLACK;
|
||||
power = new MageInt(5);
|
||||
toughness = new MageInt(5);
|
||||
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
}
|
||||
}
|
89
Mage.Sets/src/mage/sets/shadowmoor/BeseechTheQueen.java
Normal file
89
Mage.Sets/src/mage/sets/shadowmoor/BeseechTheQueen.java
Normal file
|
@ -0,0 +1,89 @@
|
|||
/*
|
||||
* 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.shadowmoor;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.predicate.Predicate;
|
||||
import mage.game.Game;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Plopman
|
||||
*/
|
||||
public class BeseechTheQueen extends CardImpl<BeseechTheQueen> {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("card with converted mana cost less than or equal to the number of lands you control");
|
||||
static{
|
||||
filter.add(new BeseechTheQueenPredicate());
|
||||
}
|
||||
public BeseechTheQueen(UUID ownerId) {
|
||||
super(ownerId, 57, "Beseech the Queen", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{2/B}{2/B}{2/B}");
|
||||
this.expansionSetCode = "SHM";
|
||||
|
||||
this.color.setBlack(true);
|
||||
|
||||
// <i>({2B} can be paid with any two mana or with {B}. This card's converted mana cost is 6.)</i>
|
||||
// Search your library for a card with converted mana cost less than or equal to the number of lands you control, reveal it, and put it into your hand. Then shuffle your library.
|
||||
this.getSpellAbility().addEffect(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filter), true, true));
|
||||
}
|
||||
|
||||
public BeseechTheQueen(final BeseechTheQueen card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BeseechTheQueen copy() {
|
||||
return new BeseechTheQueen(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class BeseechTheQueenPredicate implements Predicate<Card> {
|
||||
|
||||
|
||||
@Override
|
||||
public final boolean apply(Card input, Game game) {
|
||||
if(input.getManaCost().convertedManaCost() <= game.getBattlefield().getAllActivePermanents(new FilterControlledLandPermanent(), input.getOwnerId(), game).size()){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "card with converted mana cost less than or equal to the number of lands you control";
|
||||
}
|
||||
}
|
58
Mage.Sets/src/mage/sets/urzassaga/Exhume.java
Normal file
58
Mage.Sets/src/mage/sets/urzassaga/Exhume.java
Normal file
|
@ -0,0 +1,58 @@
|
|||
/*
|
||||
* 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.urzassaga;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.cards.CardImpl;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Plopman
|
||||
*/
|
||||
public class Exhume extends CardImpl<Exhume> {
|
||||
|
||||
public Exhume(UUID ownerId) {
|
||||
super(ownerId, 134, "Exhume", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{1}{B}");
|
||||
this.expansionSetCode = "USG";
|
||||
|
||||
this.color.setBlack(true);
|
||||
|
||||
// Each player puts a creature card from his or her graveyard onto the battlefield.
|
||||
}
|
||||
|
||||
public Exhume(final Exhume card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Exhume copy() {
|
||||
return new Exhume(this);
|
||||
}
|
||||
}
|
|
@ -71,7 +71,8 @@ public enum CounterType {
|
|||
MINING(new MiningCounter().name),
|
||||
THEFT(new TheftCounter().name),
|
||||
AGE(new AgeCounter().name),
|
||||
BLAZE(new BlazeCounter().name);
|
||||
BLAZE(new BlazeCounter().name),
|
||||
ICE(new IceCounter().name);
|
||||
|
||||
private String name;
|
||||
|
||||
|
@ -177,6 +178,8 @@ public enum CounterType {
|
|||
return new AgeCounter(amount);
|
||||
case BLAZE:
|
||||
return new BlazeCounter(amount);
|
||||
case ICE:
|
||||
return new IceCounter(amount);
|
||||
|
||||
}
|
||||
return null;
|
||||
|
|
47
Mage/src/mage/counters/common/IceCounter.java
Normal file
47
Mage/src/mage/counters/common/IceCounter.java
Normal file
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
* 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.counters.common;
|
||||
|
||||
import mage.counters.Counter;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Plopman
|
||||
*/
|
||||
public class IceCounter extends Counter<IceCounter> {
|
||||
|
||||
public IceCounter() {
|
||||
super("Ice");
|
||||
this.count = 1;
|
||||
}
|
||||
|
||||
public IceCounter(int amount) {
|
||||
super("Ice");
|
||||
this.count = amount;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue