mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
[NEW] Added Grandeur ability word and the five cards using it.
This commit is contained in:
parent
bf7fe02a32
commit
ccef0f4fb2
6 changed files with 753 additions and 0 deletions
137
Mage.Sets/src/mage/sets/futuresight/BaruFistOfKrosa.java
Normal file
137
Mage.Sets/src/mage/sets/futuresight/BaruFistOfKrosa.java
Normal file
|
@ -0,0 +1,137 @@
|
||||||
|
/*
|
||||||
|
* 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.futuresight;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.ObjectColor;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.abilityword.GrandeurAbility;
|
||||||
|
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.continious.BoostControlledEffect;
|
||||||
|
import mage.abilities.effects.common.continious.GainAbilityControlledEffect;
|
||||||
|
import mage.abilities.keyword.TrampleAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.Rarity;
|
||||||
|
import mage.constants.TargetController;
|
||||||
|
import mage.filter.common.FilterControlledLandPermanent;
|
||||||
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
import mage.filter.common.FilterLandPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||||
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
|
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.token.Token;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author emerald000
|
||||||
|
*/
|
||||||
|
public class BaruFistOfKrosa extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterLandPermanent forestFilter = new FilterLandPermanent("Forest");
|
||||||
|
private static final FilterCreaturePermanent greenCreatureFilter = new FilterCreaturePermanent("green creatures you control");
|
||||||
|
static {
|
||||||
|
forestFilter.add(new SubtypePredicate("Forest"));
|
||||||
|
greenCreatureFilter.add(new ControllerPredicate(TargetController.YOU));
|
||||||
|
greenCreatureFilter.add(new ColorPredicate(ObjectColor.GREEN));
|
||||||
|
}
|
||||||
|
|
||||||
|
public BaruFistOfKrosa(UUID ownerId) {
|
||||||
|
super(ownerId, 142, "Baru, Fist of Krosa", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{G}{G}");
|
||||||
|
this.expansionSetCode = "FUT";
|
||||||
|
this.supertype.add("Legendary");
|
||||||
|
this.subtype.add("Human");
|
||||||
|
this.subtype.add("Druid");
|
||||||
|
|
||||||
|
this.color.setGreen(true);
|
||||||
|
this.power = new MageInt(4);
|
||||||
|
this.toughness = new MageInt(4);
|
||||||
|
|
||||||
|
// Whenever a Forest enters the battlefield, green creatures you control get +1/+1 and gain trample until end of turn.
|
||||||
|
Ability ability = new EntersBattlefieldAllTriggeredAbility(new BoostControlledEffect(1, 1, Duration.EndOfTurn, greenCreatureFilter), forestFilter, "Whenever a Forest enters the battlefield, green creatures you control get +1/+1 and gain trample until end of turn.");
|
||||||
|
ability.addEffect(new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, greenCreatureFilter));
|
||||||
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
// Grandeur - Discard another card named Baru, Fist of Krosa: Put an X/X green Wurm creature token onto the battlefield, where X is the number of lands you control.
|
||||||
|
this.addAbility(new GrandeurAbility(new BaruFistOfKrosaEffect(), "Baru, Fist of Krosa"));
|
||||||
|
}
|
||||||
|
|
||||||
|
public BaruFistOfKrosa(final BaruFistOfKrosa card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BaruFistOfKrosa copy() {
|
||||||
|
return new BaruFistOfKrosa(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class BaruFistOfKrosaEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
final static FilterControlledPermanent filter = new FilterControlledLandPermanent("lands you control");
|
||||||
|
|
||||||
|
BaruFistOfKrosaEffect() {
|
||||||
|
super(Outcome.PutCreatureInPlay);
|
||||||
|
this.staticText = "Put an X/X green Wurm creature token onto the battlefield, where X is the number of lands you control.";
|
||||||
|
}
|
||||||
|
|
||||||
|
BaruFistOfKrosaEffect(final BaruFistOfKrosaEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BaruFistOfKrosaEffect copy() {
|
||||||
|
return new BaruFistOfKrosaEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
int xValue = game.getBattlefield().countAll(filter, source.getControllerId(), game);
|
||||||
|
Token token = new BaruFistOfKrosaToken(xValue);
|
||||||
|
token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class BaruFistOfKrosaToken extends Token {
|
||||||
|
|
||||||
|
BaruFistOfKrosaToken(int xValue) {
|
||||||
|
super("Wurm", "a X/X green Wurm creature token onto the battlefield, where X is the number of lands you control");
|
||||||
|
cardType.add(CardType.CREATURE);
|
||||||
|
color.setGreen(true);
|
||||||
|
subtype.add("Wurm");
|
||||||
|
power = new MageInt(xValue);
|
||||||
|
toughness = new MageInt(xValue);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,98 @@
|
||||||
|
/*
|
||||||
|
* 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.futuresight;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.abilityword.GrandeurAbility;
|
||||||
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
|
import mage.abilities.effects.common.RegenerateSourceEffect;
|
||||||
|
import mage.abilities.effects.common.continious.SetPowerToughnessSourceEffect;
|
||||||
|
import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.Rarity;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.FilterCard;
|
||||||
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.common.FilterLandCard;
|
||||||
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
|
import mage.target.common.TargetCardInLibrary;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author emerald000
|
||||||
|
*/
|
||||||
|
public class KorlashHeirToBlackblade extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterControlledPermanent filterPermanent = new FilterControlledPermanent("Swamps you control");
|
||||||
|
private static final FilterCard filterCard = new FilterLandCard("Swamp cards");
|
||||||
|
static {
|
||||||
|
filterPermanent.add(new SubtypePredicate("Swamp"));
|
||||||
|
filterCard.add(new SubtypePredicate("Swamp"));
|
||||||
|
}
|
||||||
|
|
||||||
|
public KorlashHeirToBlackblade(UUID ownerId) {
|
||||||
|
super(ownerId, 87, "Korlash, Heir to Blackblade", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{B}{B}");
|
||||||
|
this.expansionSetCode = "FUT";
|
||||||
|
this.supertype.add("Legendary");
|
||||||
|
this.subtype.add("Zombie");
|
||||||
|
this.subtype.add("Warrior");
|
||||||
|
|
||||||
|
this.color.setBlack(true);
|
||||||
|
this.power = new MageInt(0);
|
||||||
|
this.toughness = new MageInt(0);
|
||||||
|
|
||||||
|
// Korlash, Heir to Blackblade's power and toughness are each equal to the number of Swamps you control.
|
||||||
|
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new PermanentsOnBattlefieldCount(filterPermanent), Duration.EndOfGame)));
|
||||||
|
|
||||||
|
// {1}{B}: Regenerate Korlash.
|
||||||
|
Effect effect = new RegenerateSourceEffect();
|
||||||
|
effect.setText("Regenerate Korlash.");
|
||||||
|
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{1}{B}")));
|
||||||
|
|
||||||
|
// Grandeur - Discard another card named Korlash, Heir to Blackblade: Search your library for up to two Swamp cards, put them onto the battlefield tapped, then shuffle your library.
|
||||||
|
effect = new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0, 2, filterCard), true, true);
|
||||||
|
effect.setText("Search your library for up to two Swamp cards, put them onto the battlefield tapped, then shuffle your library.");
|
||||||
|
this.addAbility(new GrandeurAbility(effect, "Korlash, Heir to Blackblade"));
|
||||||
|
}
|
||||||
|
|
||||||
|
public KorlashHeirToBlackblade(final KorlashHeirToBlackblade card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public KorlashHeirToBlackblade copy() {
|
||||||
|
return new KorlashHeirToBlackblade(this);
|
||||||
|
}
|
||||||
|
}
|
181
Mage.Sets/src/mage/sets/futuresight/LinessaZephyrMage.java
Normal file
181
Mage.Sets/src/mage/sets/futuresight/LinessaZephyrMage.java
Normal file
|
@ -0,0 +1,181 @@
|
||||||
|
/*
|
||||||
|
* 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.futuresight;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.abilityword.GrandeurAbility;
|
||||||
|
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.ReturnToHandTargetEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.Rarity;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.Filter.ComparisonType;
|
||||||
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
|
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.Target;
|
||||||
|
import mage.target.TargetPlayer;
|
||||||
|
import mage.target.common.TargetControlledCreaturePermanent;
|
||||||
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author emerald000
|
||||||
|
*/
|
||||||
|
public class LinessaZephyrMage extends CardImpl {
|
||||||
|
|
||||||
|
public LinessaZephyrMage(UUID ownerId) {
|
||||||
|
super(ownerId, 51, "Linessa, Zephyr Mage", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{U}");
|
||||||
|
this.expansionSetCode = "FUT";
|
||||||
|
this.supertype.add("Legendary");
|
||||||
|
this.subtype.add("Human");
|
||||||
|
this.subtype.add("Wizard");
|
||||||
|
|
||||||
|
this.color.setBlue(true);
|
||||||
|
this.power = new MageInt(3);
|
||||||
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
|
// {X}{U}{U}, {tap}: Return target creature with converted mana cost X to its owner's hand.
|
||||||
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), new ManaCostsImpl("{X}{U}{U}"));
|
||||||
|
ability.addCost(new TapSourceCost());
|
||||||
|
ability.addTarget(new TargetCreaturePermanent());
|
||||||
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
// Grandeur - Discard another card named Linessa, Zephyr Mage: Target player returns a creature he or she controls to its owner's hand, then repeats this process for an artifact, an enchantment, and a land.
|
||||||
|
ability = new GrandeurAbility(new LinessaZephyrMageEffect(), "Linessa, Zephyr Mage");
|
||||||
|
ability.addTarget(new TargetPlayer());
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
public LinessaZephyrMage(final LinessaZephyrMage card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void adjustTargets(Ability ability, Game game) {
|
||||||
|
if (ability instanceof SimpleActivatedAbility) {
|
||||||
|
int xValue = ability.getManaCostsToPay().getX();
|
||||||
|
ability.getTargets().clear();
|
||||||
|
FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with converted mana cost " + xValue);
|
||||||
|
filter.add(new ConvertedManaCostPredicate(ComparisonType.Equal, xValue));
|
||||||
|
ability.getTargets().add(new TargetCreaturePermanent(filter));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public LinessaZephyrMage copy() {
|
||||||
|
return new LinessaZephyrMage(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class LinessaZephyrMageEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
LinessaZephyrMageEffect() {
|
||||||
|
super(Outcome.ReturnToHand);
|
||||||
|
this.staticText = "Target player returns a creature he or she controls to its owner's hand, then repeats this process for an artifact, an enchantment, and a land";
|
||||||
|
}
|
||||||
|
|
||||||
|
LinessaZephyrMageEffect(final LinessaZephyrMageEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public LinessaZephyrMageEffect copy() {
|
||||||
|
return new LinessaZephyrMageEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
|
if (controller != null) {
|
||||||
|
Player targetPlayer = game.getPlayer(source.getFirstTarget());
|
||||||
|
if (targetPlayer != null) {
|
||||||
|
// Target player returns a creature he or she controls to its owner's hand,
|
||||||
|
Target target = new TargetControlledCreaturePermanent();
|
||||||
|
target.setNotTarget(true);
|
||||||
|
if (target.choose(Outcome.ReturnToHand, targetPlayer.getId(), source.getSourceId(), game)) {
|
||||||
|
Permanent permanent = game.getPermanent(target.getFirstTarget());
|
||||||
|
if (permanent != null) {
|
||||||
|
targetPlayer.moveCardToHandWithInfo(permanent, source.getSourceId(), game, Zone.BATTLEFIELD);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// then repeats this process for an artifact,
|
||||||
|
FilterControlledPermanent filter = new FilterControlledPermanent("artifact you control");
|
||||||
|
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||||
|
target = new TargetControlledPermanent(filter);
|
||||||
|
target.setNotTarget(true);
|
||||||
|
if (target.choose(Outcome.ReturnToHand, targetPlayer.getId(), source.getSourceId(), game)) {
|
||||||
|
Permanent permanent = game.getPermanent(target.getFirstTarget());
|
||||||
|
if (permanent != null) {
|
||||||
|
targetPlayer.moveCardToHandWithInfo(permanent, source.getSourceId(), game, Zone.BATTLEFIELD);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// an enchantment,
|
||||||
|
filter = new FilterControlledPermanent("enchantment you control");
|
||||||
|
filter.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||||
|
target = new TargetControlledPermanent(filter);
|
||||||
|
target.setNotTarget(true);
|
||||||
|
if (target.choose(Outcome.ReturnToHand, targetPlayer.getId(), source.getSourceId(), game)) {
|
||||||
|
Permanent permanent = game.getPermanent(target.getFirstTarget());
|
||||||
|
if (permanent != null) {
|
||||||
|
targetPlayer.moveCardToHandWithInfo(permanent, source.getSourceId(), game, Zone.BATTLEFIELD);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// and a land.
|
||||||
|
filter = new FilterControlledPermanent("land you control");
|
||||||
|
filter.add(new CardTypePredicate(CardType.LAND));
|
||||||
|
target = new TargetControlledPermanent(filter);
|
||||||
|
target.setNotTarget(true);
|
||||||
|
if (target.choose(Outcome.ReturnToHand, targetPlayer.getId(), source.getSourceId(), game)) {
|
||||||
|
Permanent permanent = game.getPermanent(target.getFirstTarget());
|
||||||
|
if (permanent != null) {
|
||||||
|
targetPlayer.moveCardToHandWithInfo(permanent, source.getSourceId(), game, Zone.BATTLEFIELD);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
154
Mage.Sets/src/mage/sets/futuresight/OrissSamiteGuardian.java
Normal file
154
Mage.Sets/src/mage/sets/futuresight/OrissSamiteGuardian.java
Normal file
|
@ -0,0 +1,154 @@
|
||||||
|
/*
|
||||||
|
* 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.futuresight;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.abilityword.GrandeurAbility;
|
||||||
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
import mage.abilities.costs.common.TapSourceCost;
|
||||||
|
import mage.abilities.effects.ContinuousRuleModifiyingEffectImpl;
|
||||||
|
import mage.abilities.effects.common.PreventDamageToTargetEffect;
|
||||||
|
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.game.events.GameEvent;
|
||||||
|
import mage.game.events.GameEvent.EventType;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.TargetPlayer;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author emerald000
|
||||||
|
*/
|
||||||
|
public class OrissSamiteGuardian extends CardImpl {
|
||||||
|
|
||||||
|
public OrissSamiteGuardian(UUID ownerId) {
|
||||||
|
super(ownerId, 28, "Oriss, Samite Guardian", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{W}{W}");
|
||||||
|
this.expansionSetCode = "FUT";
|
||||||
|
this.supertype.add("Legendary");
|
||||||
|
this.subtype.add("Human");
|
||||||
|
this.subtype.add("Cleric");
|
||||||
|
|
||||||
|
this.color.setWhite(true);
|
||||||
|
this.power = new MageInt(1);
|
||||||
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
|
// {tap}: Prevent all damage that would be dealt to target creature this turn.
|
||||||
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, Integer.MAX_VALUE), new TapSourceCost());
|
||||||
|
ability.addTarget(new TargetCreaturePermanent());
|
||||||
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
// Grandeur - Discard another card named Oriss, Samite Guardian: Target player can't cast spells this turn, and creatures that player controls can't attack this turn.
|
||||||
|
ability = new GrandeurAbility(new OrissSamiteGuardianCantCastEffect(), "Oriss, Samite Guardian");
|
||||||
|
ability.addEffect(new OrissSamiteGuardianCantAttackEffect());
|
||||||
|
ability.addTarget(new TargetPlayer());
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
public OrissSamiteGuardian(final OrissSamiteGuardian card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public OrissSamiteGuardian copy() {
|
||||||
|
return new OrissSamiteGuardian(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class OrissSamiteGuardianCantCastEffect extends ContinuousRuleModifiyingEffectImpl {
|
||||||
|
|
||||||
|
OrissSamiteGuardianCantCastEffect() {
|
||||||
|
super(Duration.EndOfTurn, Outcome.Detriment);
|
||||||
|
staticText = "Target player can't cast spells this turn";
|
||||||
|
}
|
||||||
|
|
||||||
|
OrissSamiteGuardianCantCastEffect(final OrissSamiteGuardianCantCastEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public OrissSamiteGuardianCantCastEffect copy() {
|
||||||
|
return new OrissSamiteGuardianCantCastEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||||
|
if (event.getType() == EventType.CAST_SPELL) {
|
||||||
|
Player player = game.getPlayer(getTargetPointer().getFirst(game, source));
|
||||||
|
if (player != null && player.getId().equals(event.getPlayerId())) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class OrissSamiteGuardianCantAttackEffect extends ContinuousRuleModifiyingEffectImpl {
|
||||||
|
|
||||||
|
OrissSamiteGuardianCantAttackEffect() {
|
||||||
|
super(Duration.EndOfTurn, Outcome.Detriment);
|
||||||
|
staticText = ", and creatures that player controls can't attack this turn";
|
||||||
|
}
|
||||||
|
|
||||||
|
OrissSamiteGuardianCantAttackEffect(final OrissSamiteGuardianCantAttackEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public OrissSamiteGuardianCantAttackEffect copy() {
|
||||||
|
return new OrissSamiteGuardianCantAttackEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||||
|
if (event.getType() == EventType.DECLARE_ATTACKER) {
|
||||||
|
Player player = game.getPlayer(getTargetPointer().getFirst(game, source));
|
||||||
|
if (player != null && player.getId().equals(event.getPlayerId())) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
110
Mage.Sets/src/mage/sets/futuresight/TaroxBladewing.java
Normal file
110
Mage.Sets/src/mage/sets/futuresight/TaroxBladewing.java
Normal file
|
@ -0,0 +1,110 @@
|
||||||
|
/*
|
||||||
|
* 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.futuresight;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.abilityword.GrandeurAbility;
|
||||||
|
import mage.abilities.effects.ContinuousEffectImpl;
|
||||||
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
|
import mage.abilities.keyword.HasteAbility;
|
||||||
|
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.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author emerald000
|
||||||
|
*/
|
||||||
|
public class TaroxBladewing extends CardImpl {
|
||||||
|
|
||||||
|
public TaroxBladewing(UUID ownerId) {
|
||||||
|
super(ownerId, 123, "Tarox Bladewing", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{R}{R}{R}");
|
||||||
|
this.expansionSetCode = "FUT";
|
||||||
|
this.supertype.add("Legendary");
|
||||||
|
this.subtype.add("Dragon");
|
||||||
|
|
||||||
|
this.color.setRed(true);
|
||||||
|
this.power = new MageInt(4);
|
||||||
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
|
// Flying
|
||||||
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
|
|
||||||
|
// Haste
|
||||||
|
this.addAbility(HasteAbility.getInstance());
|
||||||
|
|
||||||
|
// Grandeur - Discard another card named Tarox Bladewing: Tarox Bladewing gets +X/+X until end of turn, where X is its power.
|
||||||
|
this.addAbility(new GrandeurAbility(new TaroxBladewingEffect(), "Tarox Bladewing"));
|
||||||
|
}
|
||||||
|
|
||||||
|
public TaroxBladewing(final TaroxBladewing card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TaroxBladewing copy() {
|
||||||
|
return new TaroxBladewing(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class TaroxBladewingEffect extends ContinuousEffectImpl {
|
||||||
|
|
||||||
|
TaroxBladewingEffect() {
|
||||||
|
super(Duration.EndOfTurn, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, Outcome.BoostCreature);
|
||||||
|
staticText = "{this} gets +X/+X until end of turn, where X is its power";
|
||||||
|
}
|
||||||
|
|
||||||
|
TaroxBladewingEffect(final TaroxBladewingEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TaroxBladewingEffect copy() {
|
||||||
|
return new TaroxBladewingEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||||
|
if (permanent != null) {
|
||||||
|
int power = permanent.getPower().getValue();
|
||||||
|
permanent.addPower(power);
|
||||||
|
permanent.addToughness(power);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
73
Mage/src/mage/abilities/abilityword/GrandeurAbility.java
Normal file
73
Mage/src/mage/abilities/abilityword/GrandeurAbility.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.abilities.abilityword;
|
||||||
|
|
||||||
|
import mage.abilities.ActivatedAbilityImpl;
|
||||||
|
import mage.abilities.costs.common.DiscardTargetCost;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.FilterCard;
|
||||||
|
import mage.filter.predicate.mageobject.AnotherCardPredicate;
|
||||||
|
import mage.filter.predicate.mageobject.NamePredicate;
|
||||||
|
import mage.target.common.TargetCardInHand;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author emerald000
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class GrandeurAbility extends ActivatedAbilityImpl {
|
||||||
|
|
||||||
|
protected final String cardName;
|
||||||
|
|
||||||
|
public GrandeurAbility(Effect effect, String cardName) {
|
||||||
|
super(Zone.BATTLEFIELD, effect);
|
||||||
|
this.cardName = cardName;
|
||||||
|
|
||||||
|
FilterCard filter = new FilterCard("another card named " + cardName);
|
||||||
|
filter.add(new NamePredicate(cardName));
|
||||||
|
filter.add(new AnotherCardPredicate());
|
||||||
|
this.addCost(new DiscardTargetCost(new TargetCardInHand(filter)));
|
||||||
|
}
|
||||||
|
|
||||||
|
public GrandeurAbility(final GrandeurAbility ability) {
|
||||||
|
super(ability);
|
||||||
|
this.cardName = ability.cardName;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GrandeurAbility copy() {
|
||||||
|
return new GrandeurAbility(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getRule() {
|
||||||
|
return new StringBuilder("<i>Grandeur</i> — ").append(super.getRule()).toString();
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue