mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
[GTC] Added Aetherize, Consuming Aberration, Dimir Charm, Enter the Infinity, Ogre Slumlord and Stolen Edentity
This commit is contained in:
parent
e91a86b5a1
commit
852b5a8eb8
7 changed files with 853 additions and 0 deletions
62
Mage.Sets/src/mage/sets/gatecrash/AEtherize.java
Normal file
62
Mage.Sets/src/mage/sets/gatecrash/AEtherize.java
Normal file
|
@ -0,0 +1,62 @@
|
|||
/*
|
||||
* 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.gatecrash;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.effects.common.ReturnToHandAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterAttackingCreature;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class AEtherize extends CardImpl<AEtherize> {
|
||||
|
||||
public AEtherize(UUID ownerId) {
|
||||
super(ownerId, 29, "AEtherize", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{3}{U}");
|
||||
this.expansionSetCode = "GTC";
|
||||
|
||||
this.color.setBlue(true);
|
||||
|
||||
// Return all attacking creatures to their owners' hands.
|
||||
this.getSpellAbility().addEffect(new ReturnToHandAllEffect(new FilterAttackingCreature("attacking creatures")));
|
||||
}
|
||||
|
||||
public AEtherize(final AEtherize card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AEtherize copy() {
|
||||
return new AEtherize(this);
|
||||
}
|
||||
}
|
||||
|
166
Mage.Sets/src/mage/sets/gatecrash/ConsumingAberration.java
Normal file
166
Mage.Sets/src/mage/sets/gatecrash/ConsumingAberration.java
Normal file
|
@ -0,0 +1,166 @@
|
|||
/*
|
||||
/*
|
||||
* 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.gatecrash;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.common.SpellCastTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continious.SetPowerToughnessSourceEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Plopman
|
||||
*/
|
||||
public class ConsumingAberration extends CardImpl<ConsumingAberration> {
|
||||
|
||||
public ConsumingAberration(UUID ownerId) {
|
||||
super(ownerId, 152, "Consuming Aberrtion", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{U}{B}");
|
||||
this.expansionSetCode = "GTC";
|
||||
|
||||
this.subtype.add("horror");
|
||||
|
||||
this.color.setBlack(true);
|
||||
this.color.setBlue(true);
|
||||
|
||||
this.power = new MageInt(0);
|
||||
this.toughness = new MageInt(0);
|
||||
|
||||
//Consuming Aberration's power and toughness are each equal to the number of cards in your opponents' graveyards.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new CardsInOpponentsGraveyardsCount(), Constants.Duration.WhileOnBattlefield)));
|
||||
//Whenever you cast a spell, each opponent reveals cards from the top of his or her library until he or she reveals a land card, then puts those cards into his or her graveyard.
|
||||
this.addAbility(new SpellCastTriggeredAbility(new ConsumingAberrationEffect(), false));
|
||||
}
|
||||
|
||||
public ConsumingAberration(final ConsumingAberration card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConsumingAberration copy() {
|
||||
return new ConsumingAberration(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class ConsumingAberrationEffect extends OneShotEffect<ConsumingAberrationEffect> {
|
||||
|
||||
public ConsumingAberrationEffect() {
|
||||
super(Outcome.PutCardInPlay);
|
||||
this.staticText = "each opponent reveals cards from the top of his or her library until he or she reveals a land card, then puts those cards into his or her graveyard";
|
||||
}
|
||||
|
||||
public ConsumingAberrationEffect(final ConsumingAberrationEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConsumingAberrationEffect copy() {
|
||||
return new ConsumingAberrationEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
for (UUID opponentId : game.getOpponents(source.getControllerId())) {
|
||||
Player player = game.getPlayer(opponentId);
|
||||
if (player == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Cards cards = new CardsImpl();
|
||||
while(player.getLibrary().size() > 0){
|
||||
Card card = player.getLibrary().removeFromTop(game);
|
||||
if (card != null) {
|
||||
cards.add(card);
|
||||
if(card.getCardType().contains(CardType.LAND)){
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
player.revealCards("Undercity Informer", cards, game);
|
||||
for(Card card : cards.getCards(game)){
|
||||
if(card != null){
|
||||
card.moveToZone(Zone.GRAVEYARD, id, game, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class CardsInOpponentsGraveyardsCount implements DynamicValue {
|
||||
|
||||
public CardsInOpponentsGraveyardsCount(){
|
||||
super();
|
||||
}
|
||||
public CardsInOpponentsGraveyardsCount(DynamicValue count){
|
||||
super();
|
||||
}
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility) {
|
||||
int amount = 0;
|
||||
for (UUID playerUUID : game.getOpponents(sourceAbility.getControllerId())) {
|
||||
Player player = game.getPlayer(playerUUID);
|
||||
if (player != null) {
|
||||
amount += player.getGraveyard().size();
|
||||
}
|
||||
}
|
||||
return amount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DynamicValue copy() {
|
||||
return new CardsInOpponentsGraveyardsCount(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "1";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "cards in your opponents' graveyards";
|
||||
}
|
||||
}
|
161
Mage.Sets/src/mage/sets/gatecrash/DimirCharm.java
Normal file
161
Mage.Sets/src/mage/sets/gatecrash/DimirCharm.java
Normal file
|
@ -0,0 +1,161 @@
|
|||
/*
|
||||
* 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.gatecrash;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CounterTargetEffect;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.PowerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
import mage.target.TargetPlayer;
|
||||
import mage.target.TargetSpell;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Plopman
|
||||
*/
|
||||
public class DimirCharm extends CardImpl<DimirCharm> {
|
||||
|
||||
private static final FilterSpell filterSorcery = new FilterSpell("sorcery spell");
|
||||
private static final FilterCreaturePermanent filterCreature = new FilterCreaturePermanent("creature with power 2 or less");
|
||||
|
||||
static {
|
||||
filterSorcery.add(new CardTypePredicate(CardType.SORCERY));
|
||||
filterCreature.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3));
|
||||
}
|
||||
|
||||
public DimirCharm (UUID ownerId) {
|
||||
super(ownerId, 154, "Dimir Charm", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{U}{B}");
|
||||
this.expansionSetCode = "GTC";
|
||||
|
||||
this.color.setBlue(true);
|
||||
this.color.setBlack(true);
|
||||
|
||||
//Choose one - Counter target sorcery spell
|
||||
this.getSpellAbility().addEffect(new CounterTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetSpell(filterSorcery));
|
||||
//or destroy target creature with power 2 or less
|
||||
Mode mode = new Mode();
|
||||
mode.getEffects().add(new DestroyTargetEffect());
|
||||
mode.getTargets().add(new TargetCreaturePermanent(filterCreature));
|
||||
this.getSpellAbility().addMode(mode);
|
||||
//or look at the top three cards of target player's library, then put one back and the rest into that player's graveyard
|
||||
Mode mode2 = new Mode();
|
||||
mode2.getEffects().add(new DimirCharmEffect());
|
||||
mode2.getTargets().add(new TargetPlayer());
|
||||
this.getSpellAbility().addMode(mode2);
|
||||
}
|
||||
|
||||
public DimirCharm(final DimirCharm card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DimirCharm copy() {
|
||||
return new DimirCharm(this);
|
||||
}
|
||||
}
|
||||
|
||||
class DimirCharmEffect extends OneShotEffect {
|
||||
|
||||
|
||||
public DimirCharmEffect() {
|
||||
super(Constants.Outcome.Benefit);
|
||||
|
||||
}
|
||||
|
||||
public DimirCharmEffect(final DimirCharmEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DimirCharmEffect copy() {
|
||||
return new DimirCharmEffect(this);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getFirstTarget());
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if(player != null && controller != null){
|
||||
Cards cards = new CardsImpl();
|
||||
for(int i = 0; i < 3; i++){
|
||||
Card card = player.getLibrary().removeFromTop(game);
|
||||
if(card != null){
|
||||
cards.add(card);
|
||||
}
|
||||
}
|
||||
|
||||
if(cards.size() > 0){
|
||||
TargetCard target = new TargetCard(Constants.Zone.PICK, new FilterCard("Card to put on top"));
|
||||
target.setRequired(true);
|
||||
if(controller.choose(Outcome.Neutral, cards, target, game)){
|
||||
Card card = cards.get(target.getFirstTarget(), game);
|
||||
if(card != null){
|
||||
card.moveToZone(Constants.Zone.LIBRARY, source.getId(), game, true);
|
||||
cards.remove(card);
|
||||
}
|
||||
for(Card card2 : cards.getCards(game)){
|
||||
if(card2 != null){
|
||||
card2.moveToZone(Constants.Zone.GRAVEYARD, source.getId(), game, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return "look at the top three cards of target player's library, then put one back and the rest into that player's graveyard";
|
||||
}
|
||||
|
||||
}
|
166
Mage.Sets/src/mage/sets/gatecrash/EnterTheInfinite.java
Normal file
166
Mage.Sets/src/mage/sets/gatecrash/EnterTheInfinite.java
Normal file
|
@ -0,0 +1,166 @@
|
|||
/*
|
||||
* 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.gatecrash;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DrawCardControllerEffect;
|
||||
import mage.abilities.effects.common.continious.MaximumHandSizeControllerEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.Game;
|
||||
import mage.game.turn.Step;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInHand;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class EnterTheInfinite extends CardImpl<EnterTheInfinite> {
|
||||
|
||||
public EnterTheInfinite(UUID ownerId) {
|
||||
super(ownerId, 34, "Enter the Infinite", Rarity.MYTHIC, new CardType[]{CardType.SORCERY}, "{8}{U}{U}{U}{U}");
|
||||
this.expansionSetCode = "GTC";
|
||||
|
||||
this.color.setBlue(true);
|
||||
|
||||
// Draw cards equal to the number of cards in your library,
|
||||
this.getSpellAbility().addEffect(new DrawCardControllerEffect(new CardsInControllerLibraryCount()));
|
||||
//then put a card from your hand on top of your library.
|
||||
this.getSpellAbility().addEffect(new PutCardOnLibraryEffect());
|
||||
//You have no maximum hand size until your next turn.
|
||||
this.getSpellAbility().addEffect(new MaximumHandSizeEffect());
|
||||
}
|
||||
|
||||
public EnterTheInfinite(final EnterTheInfinite card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnterTheInfinite copy() {
|
||||
return new EnterTheInfinite(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class CardsInControllerLibraryCount implements DynamicValue {
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility) {
|
||||
if (sourceAbility != null) {
|
||||
Player controller = game.getPlayer(sourceAbility.getControllerId());
|
||||
if (controller != null) {
|
||||
return controller.getLibrary().size();
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DynamicValue copy() {
|
||||
return new CardsInControllerLibraryCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "card in your library";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "1";
|
||||
}
|
||||
}
|
||||
|
||||
class PutCardOnLibraryEffect extends OneShotEffect<PutCardOnLibraryEffect> {
|
||||
|
||||
public PutCardOnLibraryEffect() {
|
||||
super(Constants.Outcome.DrawCard);
|
||||
staticText = "Then put a card from your hand on top of your library";
|
||||
}
|
||||
|
||||
public PutCardOnLibraryEffect(final PutCardOnLibraryEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PutCardOnLibraryEffect copy() {
|
||||
return new PutCardOnLibraryEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null) {
|
||||
TargetCardInHand target = new TargetCardInHand();
|
||||
target.setRequired(true);
|
||||
player.chooseTarget(Constants.Outcome.ReturnToHand, target, source, game);
|
||||
Card card = player.getHand().get(target.getFirstTarget(), game);
|
||||
if (card != null) {
|
||||
player.getHand().remove(card);
|
||||
card.moveToZone(Constants.Zone.LIBRARY, source.getId(), game, true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class MaximumHandSizeEffect extends MaximumHandSizeControllerEffect{
|
||||
|
||||
public MaximumHandSizeEffect(){
|
||||
super(Integer.MAX_VALUE, Constants.Duration.Custom, MaximumHandSizeControllerEffect.HandSizeModification.SET);
|
||||
staticText = "You have no maximum hand size until your next turn";
|
||||
}
|
||||
|
||||
public MaximumHandSizeEffect(final MaximumHandSizeEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInactive(Ability source, Game game) {
|
||||
if (game.getPhase().getStep().getType() == Constants.PhaseStep.UNTAP && game.getStep().getStepPart() == Step.StepPart.PRE)
|
||||
{
|
||||
if (game.getActivePlayerId().equals(source.getControllerId())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MaximumHandSizeEffect copy() {
|
||||
return new MaximumHandSizeEffect(this);
|
||||
}
|
||||
}
|
107
Mage.Sets/src/mage/sets/gatecrash/OgreSlumlord.java
Normal file
107
Mage.Sets/src/mage/sets/gatecrash/OgreSlumlord.java
Normal file
|
@ -0,0 +1,107 @@
|
|||
/*
|
||||
* 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.gatecrash;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.common.DiesCreatureTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityAllEffect;
|
||||
import mage.abilities.keyword.DeathtouchAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.filter.predicate.permanent.TokenPredicate;
|
||||
import mage.game.permanent.token.Token;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class OgreSlumlord extends CardImpl<OgreSlumlord> {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another nontoken creature you control ");
|
||||
private static final FilterControlledPermanent filter2 = new FilterControlledPermanent("Rats you control");
|
||||
static {
|
||||
filter.add(new ControllerPredicate(Constants.TargetController.YOU));
|
||||
filter.add(Predicates.not(new TokenPredicate()));
|
||||
filter.add(new AnotherPredicate());
|
||||
|
||||
filter2.add(new SubtypePredicate("Rat"));
|
||||
}
|
||||
|
||||
|
||||
public OgreSlumlord(UUID ownerId) {
|
||||
super(ownerId, 74, "Ogre Slumlord", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{B}{B}");
|
||||
this.expansionSetCode = "GTC";
|
||||
this.subtype.add("Ogre");
|
||||
this.subtype.add("Rogue");
|
||||
|
||||
this.color.setBlack(true);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
this.color.setBlack(true);
|
||||
|
||||
// Whenever another nontoken creature you control dies, put a 1/1 black Rat creature token onto the battlefield.
|
||||
this.addAbility(new DiesCreatureTriggeredAbility(new CreateTokenEffect(new RatToken()), false, filter));
|
||||
// Rats you control have deathtouch.
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new GainAbilityAllEffect(DeathtouchAbility.getInstance(), Constants.Duration.WhileOnBattlefield, filter2)));
|
||||
|
||||
}
|
||||
|
||||
public OgreSlumlord(final OgreSlumlord card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public OgreSlumlord copy() {
|
||||
return new OgreSlumlord(this);
|
||||
}
|
||||
}
|
||||
|
||||
class RatToken extends Token {
|
||||
|
||||
public RatToken() {
|
||||
super("Rat", "1/1 black Rat creature token");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color = ObjectColor.BLACK;
|
||||
subtype.add("Rat");
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
}
|
||||
}
|
119
Mage.Sets/src/mage/sets/gatecrash/StolenIdentity.java
Normal file
119
Mage.Sets/src/mage/sets/gatecrash/StolenIdentity.java
Normal file
|
@ -0,0 +1,119 @@
|
|||
/*
|
||||
* 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.gatecrash;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CipherEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.sets.tokens.EmptyToken;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class StolenIdentity extends CardImpl<StolenIdentity> {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or creature");
|
||||
static {
|
||||
filter.add(Predicates.or(new CardTypePredicate(CardType.ARTIFACT), new CardTypePredicate(CardType.CREATURE)));
|
||||
}
|
||||
|
||||
public StolenIdentity(UUID ownerId) {
|
||||
super(ownerId, 53, "Stolen Identity", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{4}{U}{U}");
|
||||
this.expansionSetCode = "GTC";
|
||||
|
||||
this.color.setBlue(true);
|
||||
|
||||
// Put a token onto the battlefield that's a copy of target artifact or creature.
|
||||
this.getSpellAbility().addEffect(new StolenIdentityEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
// Cipher
|
||||
this.getSpellAbility().addEffect(new CipherEffect());
|
||||
}
|
||||
|
||||
public StolenIdentity(final StolenIdentity card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StolenIdentity copy() {
|
||||
return new StolenIdentity(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class StolenIdentityEffect extends OneShotEffect<StolenIdentityEffect> {
|
||||
|
||||
|
||||
|
||||
public StolenIdentityEffect() {
|
||||
super(Constants.Outcome.PutCreatureInPlay);
|
||||
this.staticText = "Put a token onto the battlefield that's a copy of target artifact or creature";
|
||||
}
|
||||
|
||||
public StolenIdentityEffect(final StolenIdentityEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StolenIdentityEffect copy() {
|
||||
return new StolenIdentityEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
||||
if (permanent == null) {
|
||||
permanent = (Permanent) game.getLastKnownInformation(source.getFirstTarget(), Zone.BATTLEFIELD);
|
||||
}
|
||||
|
||||
if (permanent != null) {
|
||||
EmptyToken token = new EmptyToken();
|
||||
CardUtil.copyTo(token).from(permanent);
|
||||
|
||||
token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
/*
|
||||
* 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.abilities.effects.common;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Plopman
|
||||
*/
|
||||
|
||||
|
||||
public class ReturnToHandAllEffect extends OneShotEffect<ReturnToHandAllEffect> {
|
||||
|
||||
private FilterPermanent filter;
|
||||
|
||||
public ReturnToHandAllEffect(FilterPermanent filter) {
|
||||
super(Constants.Outcome.ReturnToHand);
|
||||
this.filter = filter;
|
||||
staticText = "Return all " + filter.getMessage() + " to their owners' hands";
|
||||
}
|
||||
|
||||
public ReturnToHandAllEffect(final ReturnToHandAllEffect effect) {
|
||||
super(effect);
|
||||
this.filter = effect.filter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, source.getControllerId(), game)) {
|
||||
permanent.moveToZone(Constants.Zone.HAND, source.getSourceId(), game, true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReturnToHandAllEffect copy() {
|
||||
return new ReturnToHandAllEffect(this);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in a new issue