mirror of
https://github.com/magefree/mage.git
synced 2026-01-24 12:19:59 -08:00
Fixed Warriors' Lesson to only trigger on combat damage instead of all damage.[EMN] Added a few more cards.
This commit is contained in:
parent
1670ad712f
commit
9c0e73dfdb
9 changed files with 598 additions and 2 deletions
|
|
@ -0,0 +1,88 @@
|
|||
/*
|
||||
* 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.eldritchmoon;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.CastSourceTriggeredAbility;
|
||||
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||
import mage.abilities.keyword.EmergeAbility;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class DecimatorOfTheProvinces extends CardImpl {
|
||||
|
||||
public DecimatorOfTheProvinces(UUID ownerId) {
|
||||
super(ownerId, 2, "Decimator of the Provinces", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{10}");
|
||||
this.expansionSetCode = "EMN";
|
||||
this.subtype.add("Eldrazi");
|
||||
this.subtype.add("Boar");
|
||||
this.power = new MageInt(7);
|
||||
this.toughness = new MageInt(7);
|
||||
|
||||
// Emerge {6}{G}{G}{G}
|
||||
this.addAbility(new EmergeAbility(this, new ManaCostsImpl<>("{6}{G}{G}{G}")));
|
||||
|
||||
// When you cast Decimator of the Provinces, creatures you control get +2/+2 and gain trample until end of turn.
|
||||
Effect effect = new BoostControlledEffect(2, 2, Duration.EndOfTurn);
|
||||
effect.setText("creatures you control get +2/+2");
|
||||
Ability ability = new CastSourceTriggeredAbility(effect);
|
||||
effect = new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, new FilterCreaturePermanent());
|
||||
effect.setText("and gain trample until end of turn");
|
||||
ability.addEffect(effect);
|
||||
this.addAbility(ability);
|
||||
|
||||
// Trample
|
||||
this.addAbility(TrampleAbility.getInstance());
|
||||
|
||||
// Haste
|
||||
this.addAbility(HasteAbility.getInstance());
|
||||
}
|
||||
|
||||
public DecimatorOfTheProvinces(final DecimatorOfTheProvinces card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DecimatorOfTheProvinces copy() {
|
||||
return new DecimatorOfTheProvinces(this);
|
||||
}
|
||||
}
|
||||
144
Mage.Sets/src/mage/sets/eldritchmoon/DistendedMindbender.java
Normal file
144
Mage.Sets/src/mage/sets/eldritchmoon/DistendedMindbender.java
Normal file
|
|
@ -0,0 +1,144 @@
|
|||
/*
|
||||
* 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.eldritchmoon;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CastSourceTriggeredAbility;
|
||||
import mage.abilities.keyword.EmergeAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class DistendedMindbender extends CardImpl {
|
||||
|
||||
public DistendedMindbender(UUID ownerId) {
|
||||
super(ownerId, 3, "Distended Mindbender", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{8}");
|
||||
this.expansionSetCode = "EMN";
|
||||
this.subtype.add("Eldrazi");
|
||||
this.subtype.add("Insect");
|
||||
this.power = new MageInt(5);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
// Emerge {5}{B}{B}
|
||||
this.addAbility(new EmergeAbility(this, new ManaCostsImpl<>("{5}{B}{B}")));
|
||||
|
||||
// When controller cast Distended Mindbender, target opponent reveals his or her hand. You choose from it a nonland card with converted mana cost 3 or less
|
||||
// and a card with converted mana cost 4 or greater. That player discards those cards.
|
||||
Ability ability = new CastSourceTriggeredAbility(new DistendedMindbenderEffect());
|
||||
ability.addTarget(new TargetOpponent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public DistendedMindbender(final DistendedMindbender card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DistendedMindbender copy() {
|
||||
return new DistendedMindbender(this);
|
||||
}
|
||||
}
|
||||
|
||||
class DistendedMindbenderEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterCard filterFourOrGreater = new FilterCard("a card from it with converted mana cost 4 or greater");
|
||||
private static final FilterCard filterThreeOrLess = new FilterCard("a nonland card from it with converted mana cost 3 or less");
|
||||
|
||||
static {
|
||||
filterFourOrGreater.add(new ConvertedManaCostPredicate(Filter.ComparisonType.GreaterThan, 3));
|
||||
filterThreeOrLess.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, 4));
|
||||
filterThreeOrLess.add(Predicates.not(new CardTypePredicate(CardType.LAND)));
|
||||
}
|
||||
|
||||
public DistendedMindbenderEffect() {
|
||||
super(Outcome.Discard);
|
||||
this.staticText = "target opponent reveals his or her hand. You choose from it a nonland card with converted mana cost 3 or less and a card with "
|
||||
+ "converted mana cost 4 or greater. That player discards those cards.";
|
||||
}
|
||||
|
||||
public DistendedMindbenderEffect(final DistendedMindbenderEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DistendedMindbenderEffect copy() {
|
||||
return new DistendedMindbenderEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player opponent = game.getPlayer(source.getFirstTarget());
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (opponent != null && controller != null) {
|
||||
opponent.revealCards("Distended Mindbender", opponent.getHand(), game);
|
||||
TargetCard targetThreeOrLess = new TargetCard(1, Zone.HAND, filterThreeOrLess);
|
||||
TargetCard targetFourOrGreater = new TargetCard(1, Zone.HAND, filterFourOrGreater);
|
||||
if (controller.choose(Outcome.Benefit, opponent.getHand(), targetThreeOrLess, game)) {
|
||||
List<UUID> targets = targetThreeOrLess.getTargets();
|
||||
for (UUID targetId : targets) {
|
||||
Card card = opponent.getHand().get(targetId, game);
|
||||
if (card != null) {
|
||||
opponent.discard(card, source, game);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (controller.choose(Outcome.Benefit, opponent.getHand(), targetFourOrGreater, game)) {
|
||||
List<UUID> targets = targetFourOrGreater.getTargets();
|
||||
for (UUID targetId : targets) {
|
||||
Card card = opponent.getHand().get(targetId, game);
|
||||
if (card != null) {
|
||||
opponent.discard(card, source, game);
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
52
Mage.Sets/src/mage/sets/eldritchmoon/PeaceOfMind.java
Normal file
52
Mage.Sets/src/mage/sets/eldritchmoon/PeaceOfMind.java
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.eldritchmoon;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class PeaceOfMind extends mage.sets.ninthedition.PeaceOfMind {
|
||||
|
||||
public PeaceOfMind(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 36;
|
||||
this.expansionSetCode = "EMN";
|
||||
}
|
||||
|
||||
public PeaceOfMind(final PeaceOfMind card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PeaceOfMind copy() {
|
||||
return new PeaceOfMind(this);
|
||||
}
|
||||
}
|
||||
52
Mage.Sets/src/mage/sets/eldritchmoon/PreyUpon.java
Normal file
52
Mage.Sets/src/mage/sets/eldritchmoon/PreyUpon.java
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.eldritchmoon;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class PreyUpon extends mage.sets.innistrad.PreyUpon {
|
||||
|
||||
public PreyUpon(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 166;
|
||||
this.expansionSetCode = "EMN";
|
||||
}
|
||||
|
||||
public PreyUpon(final PreyUpon card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PreyUpon copy() {
|
||||
return new PreyUpon(this);
|
||||
}
|
||||
}
|
||||
123
Mage.Sets/src/mage/sets/eldritchmoon/TreeOfPerdition.java
Normal file
123
Mage.Sets/src/mage/sets/eldritchmoon/TreeOfPerdition.java
Normal 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.eldritchmoon;
|
||||
|
||||
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.effects.common.continuous.SetPowerToughnessSourceEffect;
|
||||
import mage.abilities.keyword.DefenderAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.SubLayer;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class TreeOfPerdition extends CardImpl {
|
||||
|
||||
public TreeOfPerdition(UUID ownerId) {
|
||||
super(ownerId, 109, "Tree of Perdition", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{3}{B}");
|
||||
this.expansionSetCode = "EMN";
|
||||
this.subtype.add("Plant");
|
||||
this.power = new MageInt(0);
|
||||
this.toughness = new MageInt(13);
|
||||
|
||||
// Defender
|
||||
this.addAbility(DefenderAbility.getInstance());
|
||||
|
||||
// {tap}: Exchange target opponent's life total with Tree of Perdition's toughness.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TreeOfPerditionEffect(), new TapSourceCost());
|
||||
ability.addTarget(new TargetOpponent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public TreeOfPerdition(final TreeOfPerdition card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TreeOfPerdition copy() {
|
||||
return new TreeOfPerdition(this);
|
||||
}
|
||||
}
|
||||
|
||||
class TreeOfPerditionEffect extends OneShotEffect {
|
||||
|
||||
public TreeOfPerditionEffect() {
|
||||
super(Outcome.Neutral);
|
||||
staticText = "Exchange target opponent's life total with Tree of Perdition's toughness";
|
||||
}
|
||||
|
||||
public TreeOfPerditionEffect(final TreeOfPerditionEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player opponent = game.getPlayer(source.getFirstTarget());
|
||||
if (opponent != null && opponent.isLifeTotalCanChange()) {
|
||||
Permanent perm = game.getPermanent(source.getSourceId());
|
||||
if (perm != null) {
|
||||
int amount = perm.getToughness().getValue();
|
||||
int life = opponent.getLife();
|
||||
if (life == amount) {
|
||||
return false;
|
||||
}
|
||||
if (life < amount && !opponent.isCanGainLife()) {
|
||||
return false;
|
||||
}
|
||||
if (life > amount && !opponent.isCanLoseLife()) {
|
||||
return false;
|
||||
}
|
||||
opponent.setLife(amount, game);
|
||||
game.addEffect(new SetPowerToughnessSourceEffect(Integer.MIN_VALUE, life, Duration.WhileOnBattlefield, SubLayer.SetPT_7b), source);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TreeOfPerditionEffect copy() {
|
||||
return new TreeOfPerditionEffect(this);
|
||||
}
|
||||
|
||||
}
|
||||
63
Mage.Sets/src/mage/sets/eldritchmoon/WailingGhoul.java
Normal file
63
Mage.Sets/src/mage/sets/eldritchmoon/WailingGhoul.java
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
* 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.eldritchmoon;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class WailingGhoul extends CardImpl {
|
||||
|
||||
public WailingGhoul(UUID ownerId) {
|
||||
super(ownerId, 112, "Wailing Ghoul", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{B}");
|
||||
this.expansionSetCode = "EMN";
|
||||
this.subtype.add("Zombie");
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// When Wailing Ghoul enters the battlefield, put the top two cards of your library into your graveyard.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new PutTopCardOfLibraryIntoGraveControllerEffect(2)));
|
||||
}
|
||||
|
||||
public WailingGhoul(final WailingGhoul card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WailingGhoul copy() {
|
||||
return new WailingGhoul(this);
|
||||
}
|
||||
}
|
||||
73
Mage.Sets/src/mage/sets/eldritchmoon/WretchedGryff.java
Normal file
73
Mage.Sets/src/mage/sets/eldritchmoon/WretchedGryff.java
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
/*
|
||||
* 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.eldritchmoon;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.CastSourceTriggeredAbility;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.keyword.EmergeAbility;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class WretchedGryff extends CardImpl {
|
||||
|
||||
public WretchedGryff(UUID ownerId) {
|
||||
super(ownerId, 12, "Wretched Gryff", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{7}");
|
||||
this.expansionSetCode = "EMN";
|
||||
this.subtype.add("Eldrazi");
|
||||
this.subtype.add("Hippogriff");
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Emerge {5}{U}
|
||||
this.addAbility(new EmergeAbility(this, new ManaCostsImpl<>("{5}{U}")));
|
||||
|
||||
// When you cast Wretched Gryff, draw a card.
|
||||
this.addAbility(new CastSourceTriggeredAbility(new DrawCardSourceControllerEffect(1)));
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
}
|
||||
|
||||
public WretchedGryff(final WretchedGryff card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WretchedGryff copy() {
|
||||
return new WretchedGryff(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -29,7 +29,7 @@ package mage.sets.theros;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DealsDamageToAPlayerTriggeredAbility;
|
||||
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
|
|
@ -51,7 +51,7 @@ public class WarriorsLesson extends CardImpl {
|
|||
|
||||
|
||||
// Until end of turn, up to two target creatures you control each gain "Whenever this creature deals combat damage to a player, draw a card."
|
||||
Ability ability = new DealsDamageToAPlayerTriggeredAbility(new DrawCardSourceControllerEffect(1),false);
|
||||
Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(new DrawCardSourceControllerEffect(1),false);
|
||||
Effect effect = new GainAbilityTargetEffect(ability, Duration.EndOfTurn);
|
||||
effect.setText("Until end of turn, up to two target creatures you control each gain \"Whenever this creature deals combat damage to a player, draw a card.\"");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue