[THS] Added Reaper of the Wilds and Spellheard Chimera.

This commit is contained in:
LevelX2 2013-09-13 08:37:49 +02:00
parent 12b8fc03a5
commit dbedca4eb8
5 changed files with 209 additions and 6 deletions

View file

@ -28,13 +28,13 @@
package mage.sets.magic2010; package mage.sets.magic2010;
import java.util.UUID; import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.MageInt; import mage.MageInt;
import mage.ObjectColor; import mage.ObjectColor;
import mage.abilities.common.SpellCastOpponentTriggeredAbility; import mage.abilities.common.SpellCastOpponentTriggeredAbility;
import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.filter.FilterSpell; import mage.filter.FilterSpell;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
@ -47,7 +47,6 @@ import mage.filter.predicate.mageobject.ColorPredicate;
public class MoldAdder extends CardImpl<MoldAdder> { public class MoldAdder extends CardImpl<MoldAdder> {
private static final FilterSpell filter = new FilterSpell("blue or black spell"); private static final FilterSpell filter = new FilterSpell("blue or black spell");
static { static {
filter.add(Predicates.or( filter.add(Predicates.or(
new ColorPredicate(ObjectColor.BLUE), new ColorPredicate(ObjectColor.BLUE),

View file

@ -0,0 +1,78 @@
/*
* 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.theros;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.DiesCreatureTriggeredAbility;
import mage.abilities.common.DiesTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.ScryEffect;
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
import mage.abilities.keyword.DeathtouchAbility;
import mage.abilities.keyword.HexproofAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.Zone;
/**
*
* @author LevelX2
*/
public class ReaperOfTheWilds extends CardImpl<ReaperOfTheWilds> {
public ReaperOfTheWilds(UUID ownerId) {
super(ownerId, 201, "Reaper of the Wilds", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{B}{G}");
this.expansionSetCode = "THS";
this.subtype.add("Gorgon");
this.color.setGreen(true);
this.color.setBlack(true);
this.power = new MageInt(4);
this.toughness = new MageInt(5);
// Whenever another creature dies, scry 1.</i>
this.addAbility(new DiesCreatureTriggeredAbility(new ScryEffect(1), false, true));
// {B}: Reaper of the Wilds gains deathtouch until end of turn.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(DeathtouchAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{B}")));
// {1}{G}: Reaper of the Wilds gains hexproof until end of turn.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(HexproofAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{1}{G}")));
}
public ReaperOfTheWilds(final ReaperOfTheWilds card) {
super(card);
}
@Override
public ReaperOfTheWilds copy() {
return new ReaperOfTheWilds(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.theros;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.ContinuousEffectImpl;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Layer;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.SubLayer;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.filter.common.FilterInstantOrSorceryCard;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
/**
*
* @author LevelX2
*/
public class SpellheartChimera extends CardImpl<SpellheartChimera> {
public SpellheartChimera(UUID ownerId) {
super(ownerId, 204, "Spellheart Chimera", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{U}{R}");
this.expansionSetCode = "THS";
this.subtype.add("Chimera");
this.color.setRed(true);
this.color.setBlue(true);
this.power = new MageInt(0);
this.toughness = new MageInt(3);
// Flying
this.addAbility(FlyingAbility.getInstance());
// Trample
this.addAbility(TrampleAbility.getInstance());
// Spellheart Chimera's power is equal to the number of instant and sorcery cards in your graveyard.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SpellheartChimeraEffect()));
}
public SpellheartChimera(final SpellheartChimera card) {
super(card);
}
@Override
public SpellheartChimera copy() {
return new SpellheartChimera(this);
}
}
class SpellheartChimeraEffect extends ContinuousEffectImpl<SpellheartChimeraEffect> {
private static final FilterCard filter = new FilterInstantOrSorceryCard();
public SpellheartChimeraEffect() {
super(Duration.WhileOnBattlefield, Layer.PTChangingEffects_7, SubLayer.SetPT_7b, Outcome.BoostCreature);
staticText = "{this}'s power is equal to the number of instant and sorcery cards in your graveyard";
}
public SpellheartChimeraEffect(final SpellheartChimeraEffect effect) {
super(effect);
}
@Override
public SpellheartChimeraEffect copy() {
return new SpellheartChimeraEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Permanent target = game.getPermanent(source.getSourceId());
if (target != null) {
int number = 0;
Player player = game.getPlayer(source.getControllerId());
if (player != null) {
number = player.getGraveyard().count(filter, game);
}
target.getPower().setValue(number);
return true;
}
return false;
}
}

View file

@ -84,10 +84,12 @@ public class SetPowerToughnessSourceEffect extends ContinuousEffectImpl<SetPower
return true; return true;
} }
else { else {
if (power != Integer.MIN_VALUE) if (power != Integer.MIN_VALUE) {
target.getPower().setValue(power); target.getPower().setValue(power);
if (toughness != Integer.MIN_VALUE) }
if (toughness != Integer.MIN_VALUE) {
target.getToughness().setValue(toughness); target.getToughness().setValue(toughness);
}
} }
} }
return false; return false;

View file

@ -402,7 +402,9 @@ public class CardUtil {
if (text != null) { if (text != null) {
uniqueString.append(text); uniqueString.append(text);
} }
uniqueString.append(cardId).append(card.getZoneChangeCounter()); uniqueString.append(card.getZoneChangeCounter());
} else {
uniqueString.append(cardId);
} }
return uniqueString.toString(); return uniqueString.toString();
} }