1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-04-12 01:01:04 -09:00

Implemented Glissa Sunseeker, Phyrexian Furnace, Flickering Ward, Cho-Manno's Blessing, Meng Huo Barbarian King, Sword of the Chosen, Pentarch Ward, Order of the Stars, Ancestral Mask, Jedit Ojanen of Efrava, Krosan Restorer, & Nature's Kiss. Added set Battle for Zendikar and spoiled Evolving Wilds.

This commit is contained in:
fireshoes 2015-07-24 00:21:32 -05:00
parent d92b7bfc54
commit 5897f1595a
24 changed files with 1432 additions and 6 deletions

View file

@ -48,7 +48,8 @@ public class GathererSets implements Iterable<DownloadJob> {
"MMA", "MM2",
"THS", "BNG", "JOU",
"CNS", "VMA", "TPR",
"KTK", "FRF", "DTK"};
"KTK", "FRF", "DTK",
"BFZ"};
private static final HashMap<String, String> symbolsReplacements = new HashMap<>();
static {

View file

@ -16,6 +16,7 @@ public class MagicCardsImageSource implements CardImageSource {
private static final Map<String, String> setNameTokenReplacement = new HashMap<String, String>() {
{
put("BFZ", "battle-for-zendikar");
put("FVL", "from-the-vault-legends");
put("FVD", "from-the-vault-dragons");
put("FVE", "from-the-vault-exiled");

View file

@ -92,6 +92,7 @@ public class WizardCardsImageSource implements CardImageSource {
setsAliases.put("ATH", "Anthologies");
setsAliases.put("ATQ", "Antiquities");
setsAliases.put("AVR", "Avacyn Restored");
setsAliases.put("BFZ", "Battle for Zendikar");
setsAliases.put("BNG", "Born of the Gods");
setsAliases.put("BOK", "Betrayers of Kamigawa");
setsAliases.put("BRB", "Battle Royale Box Set");

View file

@ -26,7 +26,20 @@
#Generate|TOK:TPR|Thopter|
#Generate|TOK:TPR|Zombie|
#|Generate|TOK:ORI|Ashaya, the Awoken World|
#|Generate|TOK:ORI|Angel|
#|Generate|TOK:ORI|Demon|
#|Generate|TOK:ORI|Elemental|
#|Generate|TOK:ORI|Elf Warrior|
#|Generate|TOK:ORI|Goblin|
#|Generate|TOK:ORI|Knight|
#|Generate|TOK:ORI|Soldier|
#|Generate|TOK:ORI|Thopter 1|
#|Generate|TOK:ORI|Thopter 2|
#|Generate|TOK:ORI|Zombie|
#|Generate|EMBLEM!:ORI|Emblem Chandra, Roaring Flame|
#|Generate|EMBLEM!:ORI|Emblem Jace, Telepath Unbound|
#|Generate|EMBLEM!:ORI|Emblem Liliana, Defiant Necromancer|
#|Generate|TOK:PTC|Angel|
#|Generate|TOK:PTC|Avatar|

View file

@ -64,6 +64,6 @@ ddd=gvl
unh=uh
dde=pvc
# Remove setname as soon as the images can be downloaded
ignore.urls=TOK,MM2,V15
ignore.urls=TOK,MM2,V15,BFZ
# sets ordered by release time (newest goes first)
token.lookup.order=FVD,FVE,FVL,FVR,V12,V13,V14,V15,TPR,MPRP,DD3,DDO,ORI,MM2,PTC,DTK,FRF,KTK,M15,VMA,CNS,JOU,BNG,THS,DDL,M14,MMA,DGM,GTC,RTR,M13,AVR,DDI,DKA,ISD,M12,NPH,MBS,SOM,M11,ROE,DDE,WWK,ZEN,M10,GVL,ARB,DVD,CFX,JVC,ALA,EVE,SHM,EVG,MOR,LRW,10E,CLS,CHK,GRC
token.lookup.order=BFZ,FVD,FVE,FVL,FVR,V12,V13,V14,V15,TPR,MPRP,DD3,DDO,ORI,MM2,PTC,DTK,FRF,KTK,M15,VMA,CNS,JOU,BNG,THS,DDL,M14,MMA,DGM,GTC,RTR,M13,AVR,DDI,DKA,ISD,M12,NPH,MBS,SOM,M11,ROE,DDE,WWK,ZEN,M10,GVL,ARB,DVD,CFX,JVC,ALA,EVE,SHM,EVG,MOR,LRW,10E,CLS,CHK,GRC

View file

@ -0,0 +1,60 @@
/*
* 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;
import java.util.GregorianCalendar;
import mage.cards.ExpansionSet;
import mage.constants.SetType;
/**
*
* @author fireshoes
*/
public class BattleForZendikar extends ExpansionSet {
private static final BattleForZendikar fINSTANCE = new BattleForZendikar();
public static BattleForZendikar getInstance() {
return fINSTANCE;
}
private BattleForZendikar() {
super("Battle for Zendikar", "BFZ", "mage.sets.battleforzendikar", new GregorianCalendar(2015, 10, 2).getTime(), SetType.EXPANSION);
this.blockName = "Battle for Zendikar";
this.hasBoosters = true;
this.hasBasicLands = true;
this.numBoosterLands = 1;
this.numBoosterCommon = 10;
this.numBoosterUncommon = 3;
this.numBoosterRare = 1;
this.ratioBoosterMythic = 8;
}
}

View 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.battleforzendikar;
import java.util.UUID;
/**
*
* @author fireshoes
*/
public class EvolvingWilds extends mage.sets.riseoftheeldrazi.EvolvingWilds {
public EvolvingWilds(UUID ownerId) {
super(ownerId);
this.cardNumber = 236;
this.expansionSetCode = "BFZ";
}
public EvolvingWilds(final EvolvingWilds card) {
super(card);
}
@Override
public EvolvingWilds copy() {
return new EvolvingWilds(this);
}
}

View 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.guildpact;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.AsEntersBattlefieldAbility;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.keyword.DefenderAbility;
import mage.abilities.keyword.ProtectionAbility;
import mage.cards.CardImpl;
import mage.choices.ChoiceColor;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.game.Game;
import mage.players.Player;
/**
*
* @author fireshoes
*/
public class OrderOfTheStars extends CardImpl {
public OrderOfTheStars(UUID ownerId) {
super(ownerId, 13, "Order of the Stars", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{W}");
this.expansionSetCode = "GPT";
this.subtype.add("Human");
this.subtype.add("Cleric");
this.power = new MageInt(0);
this.toughness = new MageInt(1);
// Defender
this.addAbility(DefenderAbility.getInstance());
// As Order of the Stars enters the battlefield, choose a color.
// Order of the Stars has protection from the chosen color.
this.addAbility(new AsEntersBattlefieldAbility(new OrderOfTheStarsEffect()));
}
public OrderOfTheStars(final OrderOfTheStars card) {
super(card);
}
@Override
public OrderOfTheStars copy() {
return new OrderOfTheStars(this);
}
}
class OrderOfTheStarsEffect extends OneShotEffect {
public OrderOfTheStarsEffect() {
super(Outcome.Protect);
this.staticText = "{this} gains protection from the color of your choice";
}
public OrderOfTheStarsEffect(final OrderOfTheStarsEffect effect) {
super(effect);
}
@Override
public OrderOfTheStarsEffect copy() {
return new OrderOfTheStarsEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
ChoiceColor choice = new ChoiceColor();
choice.setMessage("Choose color to get protection from");
Player controller = game.getPlayer(source.getControllerId());
if (controller != null && controller.choose(outcome, choice, game)) {
FilterCard protectionFilter = new FilterCard();
protectionFilter.add(new ColorPredicate(choice.getColor()));
protectionFilter.setMessage(choice.getChoice().toLowerCase());
ContinuousEffect effect = new GainAbilitySourceEffect(new ProtectionAbility(protectionFilter), Duration.WhileOnBattlefield);
game.addEffect(effect, source);
return true;
}
return false;
}
}

View 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.masterseditioniii;
import java.util.UUID;
/**
*
* @author fireshoes
*/
public class MengHuoBarbarianKing extends mage.sets.portalthreekingdoms.MengHuoBarbarianKing {
public MengHuoBarbarianKing(UUID ownerId) {
super(ownerId);
this.cardNumber = 128;
this.expansionSetCode = "ME3";
}
public MengHuoBarbarianKing(final MengHuoBarbarianKing card) {
super(card);
}
@Override
public MengHuoBarbarianKing copy() {
return new MengHuoBarbarianKing(this);
}
}

View file

@ -0,0 +1,83 @@
/*
* 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.mercadianmasques;
import java.util.UUID;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
import mage.abilities.keyword.EnchantAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.common.FilterEnchantmentPermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author fireshoes
*/
public class AncestralMask extends CardImpl {
private static final FilterEnchantmentPermanent filter = new FilterEnchantmentPermanent("each other enchantment on the battlefield");
static {
filter.add(new AnotherPredicate());
}
public AncestralMask(UUID ownerId) {
super(ownerId, 229, "Ancestral Mask", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}");
this.expansionSetCode = "MMQ";
this.subtype.add("Aura");
// Enchant creature
TargetPermanent auraTarget = new TargetCreaturePermanent();
this.getSpellAbility().addTarget(auraTarget);
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
this.addAbility(new EnchantAbility(auraTarget.getTargetName()));
// Enchanted creature gets +2/+2 for each other enchantment on the battlefield.
PermanentsOnBattlefieldCount countEnchantments = new PermanentsOnBattlefieldCount(new FilterEnchantmentPermanent(filter), 2);
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(countEnchantments, countEnchantments, Duration.WhileOnBattlefield)));
}
public AncestralMask(final AncestralMask card) {
super(card);
}
@Override
public AncestralMask copy() {
return new AncestralMask(this);
}
}

View file

@ -0,0 +1,122 @@
/*
* 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.mercadianmasques;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.AsEntersBattlefieldAbility;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
import mage.abilities.keyword.EnchantAbility;
import mage.abilities.keyword.FlashAbility;
import mage.abilities.keyword.ProtectionAbility;
import mage.cards.CardImpl;
import mage.choices.ChoiceColor;
import mage.constants.AttachmentType;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.game.Game;
import mage.players.Player;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author fireshoes
*/
public class ChoMannosBlessing extends CardImpl {
public ChoMannosBlessing(UUID ownerId) {
super(ownerId, 12, "Cho-Manno's Blessing", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{W}{W}");
this.expansionSetCode = "MMQ";
this.subtype.add("Aura");
// Flash
this.addAbility(FlashAbility.getInstance());
// Enchant creature
TargetPermanent auraTarget = new TargetCreaturePermanent();
this.getSpellAbility().addTarget(auraTarget);
this.getSpellAbility().addEffect(new AttachEffect(Outcome.Protect));
this.addAbility(new EnchantAbility(auraTarget.getTargetName()));
// As Cho-Manno's Blessing enters the battlefield, choose a color.
// Enchanted creature has protection from the chosen color. This effect doesn't remove Cho-Manno's Blessing.
this.addAbility(new AsEntersBattlefieldAbility(new ChoMannosBlessingEffect()));
}
public ChoMannosBlessing(final ChoMannosBlessing card) {
super(card);
}
@Override
public ChoMannosBlessing copy() {
return new ChoMannosBlessing(this);
}
}
class ChoMannosBlessingEffect extends OneShotEffect {
public ChoMannosBlessingEffect() {
super(Outcome.Protect);
this.staticText = "enchanted creature has protection from the chosen color. This effect doesn't remove {this}";
}
public ChoMannosBlessingEffect(final ChoMannosBlessingEffect effect) {
super(effect);
}
@Override
public ChoMannosBlessingEffect copy() {
return new ChoMannosBlessingEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
ChoiceColor choice = new ChoiceColor();
choice.setMessage("Choose color to get protection from");
Player controller = game.getPlayer(source.getControllerId());
if (controller != null && controller.choose(outcome, choice, game)) {
FilterCard protectionFilter = new FilterCard();
protectionFilter.add(new ColorPredicate(choice.getColor()));
protectionFilter.setMessage(choice.getChoice().toLowerCase());
ProtectionAbility protectionAbility = new ProtectionAbility(protectionFilter);
protectionAbility.setRemovesAuras(false);
ContinuousEffect effect = new GainAbilityAttachedEffect(protectionAbility, AttachmentType.AURA, Duration.WhileOnBattlefield);
game.addEffect(effect, source);
return true;
}
return false;
}
}

View 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.mirrodin;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.keyword.FirstStrikeAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.ManaPool;
import mage.players.Player;
import mage.target.common.TargetArtifactPermanent;
/**
*
* @author fireshoes
*/
public class GlissaSunseeker extends CardImpl {
public GlissaSunseeker(UUID ownerId) {
super(ownerId, 120, "Glissa Sunseeker", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{G}{G}");
this.expansionSetCode = "MRD";
this.supertype.add("Legendary");
this.subtype.add("Elf");
this.power = new MageInt(3);
this.toughness = new MageInt(2);
// First strike
this.addAbility(FirstStrikeAbility.getInstance());
// {tap}: Destroy target artifact if its converted mana cost is equal to the amount of mana in your mana pool.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GlissaSunseekerEffect(), new TapSourceCost());
ability.addTarget(new TargetArtifactPermanent());
this.addAbility(ability);
}
public GlissaSunseeker(final GlissaSunseeker card) {
super(card);
}
@Override
public GlissaSunseeker copy() {
return new GlissaSunseeker(this);
}
}
class GlissaSunseekerEffect extends OneShotEffect {
public GlissaSunseekerEffect() {
super(Outcome.DestroyPermanent);
this.staticText = "Destroy target artifact if its converted mana cost is equal to the amount of mana in your mana pool";
}
public GlissaSunseekerEffect(final GlissaSunseekerEffect effect) {
super(effect);
}
@Override
public GlissaSunseekerEffect copy() {
return new GlissaSunseekerEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
ManaPool pool = controller.getManaPool();
int blackMana = pool.getBlack();
int whiteMana = pool.getWhite();
int blueMana = pool.getBlue();
int greenMana = pool.getGreen();
int redMana = pool.getRed();
int colorlessMana = pool.getColorless();
int manaPoolTotal = blackMana + whiteMana + blueMana + greenMana + redMana + colorlessMana;
Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source));
if (controller != null) {
if (permanent.getManaCost().convertedManaCost() == manaPoolTotal) {
return permanent.destroy(source.getSourceId(), game, false);
}
}
return false;
}
}

View file

@ -0,0 +1,85 @@
/*
* 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.planarchaos;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.AttacksOrBlocksTriggeredAbility;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.keyword.ForestwalkAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.game.permanent.token.Token;
/**
*
* @author fireshoes
*/
public class JeditOjanenOfEfrava extends CardImpl {
public JeditOjanenOfEfrava(UUID ownerId) {
super(ownerId, 131, "Jedit Ojanen of Efrava", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{G}{G}{G}");
this.expansionSetCode = "PLC";
this.supertype.add("Legendary");
this.subtype.add("Cat");
this.subtype.add("Warrior");
this.power = new MageInt(5);
this.toughness = new MageInt(5);
// Forestwalk
this.addAbility(new ForestwalkAbility());
// Whenever Jedit Ojanen of Efrava attacks or blocks, put a 2/2 green Cat Warrior creature token with forestwalk onto the battlefield.
this.addAbility(new AttacksOrBlocksTriggeredAbility(new CreateTokenEffect(new CatWarriorToken()), false));
}
public JeditOjanenOfEfrava(final JeditOjanenOfEfrava card) {
super(card);
}
@Override
public JeditOjanenOfEfrava copy() {
return new JeditOjanenOfEfrava(this);
}
}
class CatWarriorToken extends Token {
CatWarriorToken() {
super("Cat Warrior", "2/2 green Cat Warrior creature token with forestwalk");
this.setOriginalExpansionSetCode("PLC");
this.getPower().initValue(2);
this.getToughness().initValue(2);
this.color.setGreen(true);
this.getSubtype().add("Cat");
this.getSubtype().add("Warrior");
this.getCardType().add(CardType.CREATURE);
this.addAbility(new ForestwalkAbility());
}
}

View file

@ -30,7 +30,7 @@ package mage.sets.planeshift;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.common.AsEntersBattlefieldAbility;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
@ -64,7 +64,7 @@ public class VoiceOfAll extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
// As Voice of All enters the battlefield, choose a color.
// Voice of All has protection from the chosen color.
this.addAbility(new EntersBattlefieldAbility(new VoiceOfAllEffect()));
this.addAbility(new AsEntersBattlefieldAbility(new VoiceOfAllEffect()));
}
public VoiceOfAll(final VoiceOfAll card) {

View file

@ -0,0 +1,80 @@
/*
* 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.portalthreekingdoms;
import java.util.UUID;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.continuous.BoostAllEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.predicate.permanent.ControllerPredicate;
/**
*
* @author fireshoes
*/
public class MengHuoBarbarianKing extends CardImpl {
private static final FilterCreaturePermanent filterGreen = new FilterCreaturePermanent("green creatures you control");
static {
filterGreen.add(new ColorPredicate(ObjectColor.GREEN));
filterGreen.add(new ControllerPredicate(TargetController.YOU));
}
public MengHuoBarbarianKing(UUID ownerId) {
super(ownerId, 142, "Meng Huo, Barbarian King", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{G}{G}");
this.expansionSetCode = "PTK";
this.supertype.add("Legendary");
this.subtype.add("Human");
this.subtype.add("Barbarian");
this.subtype.add("Soldier");
this.power = new MageInt(4);
this.toughness = new MageInt(4);
// Other green creatures you control get +1/+1.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, 1, Duration.WhileOnBattlefield, filterGreen, true)));
}
public MengHuoBarbarianKing(final MengHuoBarbarianKing card) {
super(card);
}
@Override
public MengHuoBarbarianKing copy() {
return new MengHuoBarbarianKing(this);
}
}

View file

@ -0,0 +1,75 @@
/*
* 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.stronghold;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SupertypePredicate;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author fireshoes
*/
public class SwordOfTheChosen extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("legendary creature");
static {
filter.add(new SupertypePredicate("Legendary"));
}
public SwordOfTheChosen(UUID ownerId) {
super(ownerId, 135, "Sword of the Chosen", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{2}");
this.expansionSetCode = "STH";
this.supertype.add("Legendary");
// {tap}: Target legendary creature gets +2/+2 until end of turn.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(2, 2, Duration.EndOfTurn), new TapSourceCost());
ability.addTarget(new TargetCreaturePermanent(filter));
this.addAbility(ability);
}
public SwordOfTheChosen(final SwordOfTheChosen card) {
super(card);
}
@Override
public SwordOfTheChosen copy() {
return new SwordOfTheChosen(this);
}
}

View file

@ -0,0 +1,125 @@
/*
* 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.tempest;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.AsEntersBattlefieldAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.ReturnToHandSourceEffect;
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
import mage.abilities.keyword.EnchantAbility;
import mage.abilities.keyword.ProtectionAbility;
import mage.cards.CardImpl;
import mage.choices.ChoiceColor;
import mage.constants.AttachmentType;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.game.Game;
import mage.players.Player;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author fireshoes
*/
public class FlickeringWard extends CardImpl {
public FlickeringWard(UUID ownerId) {
super(ownerId, 231, "Flickering Ward", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{W}");
this.expansionSetCode = "TMP";
this.subtype.add("Aura");
// Enchant creature
TargetPermanent auraTarget = new TargetCreaturePermanent();
this.getSpellAbility().addTarget(auraTarget);
this.getSpellAbility().addEffect(new AttachEffect(Outcome.Protect));
this.addAbility(new EnchantAbility(auraTarget.getTargetName()));
// As Flickering Ward enters the battlefield, choose a color.
// Enchanted creature has protection from the chosen color. This effect doesn't remove Flickering Ward.
this.addAbility(new AsEntersBattlefieldAbility(new FlickeringWardEffect()));
// {W}: Return Flickering Ward to its owner's hand.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(), new ManaCostsImpl("{W}")));
}
public FlickeringWard(final FlickeringWard card) {
super(card);
}
@Override
public FlickeringWard copy() {
return new FlickeringWard(this);
}
}
class FlickeringWardEffect extends OneShotEffect {
public FlickeringWardEffect() {
super(Outcome.Protect);
this.staticText = "enchanted creature has protection from the chosen color. This effect doesn't remove {this}";
}
public FlickeringWardEffect(final FlickeringWardEffect effect) {
super(effect);
}
@Override
public FlickeringWardEffect copy() {
return new FlickeringWardEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
ChoiceColor choice = new ChoiceColor();
choice.setMessage("Choose color to get protection from");
Player controller = game.getPlayer(source.getControllerId());
if (controller != null && controller.choose(outcome, choice, game)) {
FilterCard protectionFilter = new FilterCard();
protectionFilter.add(new ColorPredicate(choice.getColor()));
protectionFilter.setMessage(choice.getChoice().toLowerCase());
ProtectionAbility protectionAbility = new ProtectionAbility(protectionFilter);
protectionAbility.setRemovesAuras(false);
ContinuousEffect effect = new GainAbilityAttachedEffect(protectionAbility, AttachmentType.AURA, Duration.WhileOnBattlefield);
game.addEffect(effect, source);
return true;
}
return false;
}
}

View file

@ -0,0 +1,123 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.timespiral;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.AsEntersBattlefieldAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
import mage.abilities.keyword.EnchantAbility;
import mage.abilities.keyword.ProtectionAbility;
import mage.cards.CardImpl;
import mage.choices.ChoiceColor;
import mage.constants.AttachmentType;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.game.Game;
import mage.players.Player;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author fireshoes
*/
public class PentarchWard extends CardImpl {
public PentarchWard(UUID ownerId) {
super(ownerId, 33, "Pentarch Ward", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}");
this.expansionSetCode = "TSP";
this.subtype.add("Aura");
// Enchant creature
TargetPermanent auraTarget = new TargetCreaturePermanent();
this.getSpellAbility().addTarget(auraTarget);
this.getSpellAbility().addEffect(new AttachEffect(Outcome.Protect));
this.addAbility(new EnchantAbility(auraTarget.getTargetName()));
// When Pentarch Ward enters the battlefield, draw a card.
this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1)));
// As Pentarch Ward enters the battlefield, choose a color.
// Enchanted creature has protection from the chosen color. This effect doesn't remove Pentarch Ward.
this.addAbility(new AsEntersBattlefieldAbility(new PentarchWardEffect()));
}
public PentarchWard(final PentarchWard card) {
super(card);
}
@Override
public PentarchWard copy() {
return new PentarchWard(this);
}
}
class PentarchWardEffect extends OneShotEffect {
public PentarchWardEffect() {
super(Outcome.Protect);
this.staticText = "enchanted creature has protection from the chosen color. This effect doesn't remove {this}";
}
public PentarchWardEffect(final PentarchWardEffect effect) {
super(effect);
}
@Override
public PentarchWardEffect copy() {
return new PentarchWardEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
ChoiceColor choice = new ChoiceColor();
choice.setMessage("Choose color to get protection from");
Player controller = game.getPlayer(source.getControllerId());
if (controller != null && controller.choose(outcome, choice, game)) {
FilterCard protectionFilter = new FilterCard();
protectionFilter.add(new ColorPredicate(choice.getColor()));
protectionFilter.setMessage(choice.getChoice().toLowerCase());
ProtectionAbility protectionAbility = new ProtectionAbility(protectionFilter);
protectionAbility.setRemovesAuras(false);
ContinuousEffect effect = new GainAbilityAttachedEffect(protectionAbility, AttachmentType.AURA, Duration.WhileOnBattlefield);
game.addEffect(effect, source);
return true;
}
return false;
}
}

View file

@ -0,0 +1,82 @@
/*
* 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.torment;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.condition.common.CardsInControllerGraveCondition;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.decorator.ConditionalActivatedAbility;
import mage.abilities.effects.common.UntapTargetEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.common.FilterLandPermanent;
import mage.target.common.TargetLandPermanent;
/**
*
* @author fireshoes
*/
public class KrosanRestorer extends CardImpl {
public KrosanRestorer(UUID ownerId) {
super(ownerId, 130, "Krosan Restorer", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{G}");
this.expansionSetCode = "TOR";
this.subtype.add("Human");
this.subtype.add("Druid");
this.power = new MageInt(1);
this.toughness = new MageInt(2);
// {tap}: Untap target land.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new TapSourceCost());
ability.addTarget(new TargetLandPermanent());
this.addAbility(ability);
// Threshold - {tap}: Untap up to three target lands. Activate this ability only if seven or more cards are in your graveyard.
ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD,
new UntapTargetEffect(),
new TapSourceCost(),
new CardsInControllerGraveCondition(7),
"<i>Threshold</i> - {T}: Untap up to three target lands. Activate this ability only if seven or more cards are in your graveyard.");
ability.addTarget(new TargetLandPermanent(0, 3, new FilterLandPermanent(), false));
this.addAbility(ability);
}
public KrosanRestorer(final KrosanRestorer card) {
super(card);
}
@Override
public KrosanRestorer copy() {
return new KrosanRestorer(this);
}
}

View file

@ -0,0 +1,126 @@
/*
* 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.weatherlight;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.CostImpl;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
import mage.abilities.keyword.EnchantAbility;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.game.Game;
import mage.players.Player;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author fireshoes
*/
public class NaturesKiss extends CardImpl {
public NaturesKiss(UUID ownerId) {
super(ownerId, 78, "Nature's Kiss", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}");
this.expansionSetCode = "WTH";
this.subtype.add("Aura");
// Enchant creature
TargetPermanent auraTarget = new TargetCreaturePermanent();
this.getSpellAbility().addTarget(auraTarget);
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
this.addAbility(new EnchantAbility(auraTarget.getTargetName()));
// {1}, Exile the top card of your graveyard: Enchanted creature gets +1/+1 until end of turn.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 1, Duration.EndOfTurn), new ManaCostsImpl("{1}"));
ability.addCost(new ExileFromTopOfGraveyardCost(1));
this.addAbility(ability);
}
public NaturesKiss(final NaturesKiss card) {
super(card);
}
@Override
public NaturesKiss copy() {
return new NaturesKiss(this);
}
}
class ExileFromTopOfGraveyardCost extends CostImpl {
private final int amount;
public ExileFromTopOfGraveyardCost(int amount) {
this.amount = amount;
this.text = "Exile the top card of your graveyard";
}
public ExileFromTopOfGraveyardCost(ExileFromTopOfGraveyardCost cost) {
super(cost);
this.amount = cost.amount;
}
@Override
public boolean canPay(Ability ability, UUID sourceId, UUID controllerId, Game game) {
Player controller = game.getPlayer(controllerId);
if(controller == null) {
return false;
}
return controller.getGraveyard().size() >= amount;
}
@Override
public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) {
Player controller = game.getPlayer(controllerId);
if(controller != null) {
Card topCard = null;
for (Card card :controller.getGraveyard().getCards(game)) {
topCard = card;
}
if (topCard != null) {
controller.moveCardToExileWithInfo(topCard, null, "", ability.getSourceId(), game, Zone.GRAVEYARD, true);
paid = true;
}
}
return paid;
}
@Override
public ExileFromTopOfGraveyardCost copy() {
return new ExileFromTopOfGraveyardCost(this);
}
}

View 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.weatherlight;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.ExileTargetEffect;
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.game.Game;
import mage.players.Player;
import mage.target.TargetPlayer;
import mage.target.common.TargetCardInGraveyard;
/**
*
* @author fireshoes
*/
public class PhyrexianFurnace extends CardImpl {
public PhyrexianFurnace(UUID ownerId) {
super(ownerId, 155, "Phyrexian Furnace", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{1}");
this.expansionSetCode = "WTH";
// {tap}: Exile the bottom card of target player's graveyard.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PhyrexianFurnaceEffect(), new TapSourceCost());
ability.addTarget(new TargetPlayer());
this.addAbility(ability);
// {1}, Sacrifice Phyrexian Furnace: Exile target card from a graveyard. Draw a card.
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileTargetEffect(), new ManaCostsImpl("{1}"));
ability.addTarget(new TargetCardInGraveyard());
ability.addEffect(new DrawCardSourceControllerEffect(1));
this.addAbility(ability);
}
public PhyrexianFurnace(final PhyrexianFurnace card) {
super(card);
}
@Override
public PhyrexianFurnace copy() {
return new PhyrexianFurnace(this);
}
}
class PhyrexianFurnaceEffect extends OneShotEffect {
public PhyrexianFurnaceEffect() {
super(Outcome.Benefit);
this.staticText = "exile the bottom card of target player's graveyard";
}
public PhyrexianFurnaceEffect(final PhyrexianFurnaceEffect effect) {
super(effect);
}
@Override
public PhyrexianFurnaceEffect copy() {
return new PhyrexianFurnaceEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getFirstTarget());
if (player != null) {
Card bottomCard = null;
for (Card card :player.getGraveyard().getCards(game)) {
bottomCard = card;
break;
}
if (bottomCard != null) {
return player.moveCardToExileWithInfo(bottomCard, null, "", source.getSourceId(), game, Zone.GRAVEYARD, true);
}
return true;
}
return false;
}
}

View file

@ -5,6 +5,7 @@ Apocalypse|apocalypse|
Archenemy|archenemy|
Arabian Nights|arabiannights|
Avacyn Restored|avacynrestored|
Battle for Zendikar|battleforzendikar|
Betrayers of Kamigawa|betrayersofkamigawa|
Born of the Gods|bornofthegods|
Champions of Kamigawa|championsofkamigawa|

View file

@ -27236,4 +27236,5 @@ Forest|Premium Deck Series: Slivers|41|L||Basic Land - Forest|||G|
Akroma, Angel of Fury|From the Vault: Angels|1|M|{5}{R}{R}{R}|Legendary Creature - Angel|6|6|Akroma, Angel of Fury can't be countered.$Flying, trample, protection from white and from blue${R}: Akroma, Angel of Fury gets +1/+0 until end of turn.$Morph {3}{R}{R}{R} <i>You may cast this card face downn as a 2/2 creature for {3}. Turn it face up any time for its morph cost.)</i>|
Akroma, Angel of Wrath|From the Vault: Angels|2|M|{5}{W}{W}{W}|Legendary Creature - Angel|6|6|Flying, first strike, vigilance, trample, haste, protection from black and from red|
Avacyn, Angel of Hope|From the Vault: Angels|5|M|{5}{W}{W}{W}|Legendary Creature - Angel|8|8|Flying, vigilance$Avacyn, Angel of Hope and other permanents you control are indestructible.|
Iona, Shield of Emeria|From the Vault: Angels|9|M|{6}{W}{W}{W}|Legendary Creature - Angel|7|7|Flying$As Iona, Shield of Emeria enters the battlefield, choose a color.$Your opponents can't cast spells of the chosen color.|
Iona, Shield of Emeria|From the Vault: Angels|9|M|{6}{W}{W}{W}|Legendary Creature - Angel|7|7|Flying$As Iona, Shield of Emeria enters the battlefield, choose a color.$Your opponents can't cast spells of the chosen color.|
Evolving Wilds|Battle for Zendikar|236|C||Land|||{T}, Sacrifice Evolving Wilds: Search your library for a basic land card and put it onto the battlefield tapped. Then shuffle your library.|

View file

@ -15,6 +15,7 @@ Anthologies|ATH|
Antiquities|ATQ|
Archenemy|ARC|
Avacyn Restored|AVR|
Battle for Zendikar|BFZ|
Betrayers of Kamigawa|BOK|
Battle Royale Box Set|BRB|
Beatdown Box Set|BTD|