mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
Added Heartwood Storyteller, Jotun Grunt, Magnigoth Treefolk and Vedalken Orrery.
This commit is contained in:
parent
2ee9728cb3
commit
41b2d1a74e
8 changed files with 544 additions and 19 deletions
|
@ -27,26 +27,22 @@
|
||||||
*/
|
*/
|
||||||
package mage.sets.avacynrestored;
|
package mage.sets.avacynrestored;
|
||||||
|
|
||||||
import mage.constants.*;
|
import java.util.UUID;
|
||||||
import mage.abilities.Ability;
|
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.costs.CompositeCost;
|
import mage.abilities.costs.CompositeCost;
|
||||||
import mage.abilities.costs.common.TapSourceCost;
|
import mage.abilities.costs.common.TapSourceCost;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.abilities.effects.AsThoughEffectImpl;
|
|
||||||
import mage.abilities.effects.common.AddContinuousEffectToGame;
|
import mage.abilities.effects.common.AddContinuousEffectToGame;
|
||||||
import mage.abilities.mana.ColorlessManaAbility;
|
|
||||||
import mage.cards.Card;
|
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.game.Game;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.ObjectColor;
|
|
||||||
import mage.abilities.effects.common.continious.CastAsThoughItHadFlashAllEffect;
|
import mage.abilities.effects.common.continious.CastAsThoughItHadFlashAllEffect;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.abilities.mana.ColorlessManaAbility;
|
||||||
|
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.predicate.Predicates;
|
import mage.filter.predicate.Predicates;
|
||||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -55,7 +51,7 @@ import mage.filter.predicate.mageobject.ColorPredicate;
|
||||||
*/
|
*/
|
||||||
public class AlchemistsRefuge extends CardImpl {
|
public class AlchemistsRefuge extends CardImpl {
|
||||||
|
|
||||||
private static final FilterCreatureCard filter = new FilterCreatureCard("nonland cards");
|
private static final FilterCard filter = new FilterCard("nonland cards");
|
||||||
static {
|
static {
|
||||||
filter.add(Predicates.not(new CardTypePredicate(CardType.LAND)));
|
filter.add(Predicates.not(new CardTypePredicate(CardType.LAND)));
|
||||||
}
|
}
|
||||||
|
|
113
Mage.Sets/src/mage/sets/coldsnap/JotunGrunt.java
Normal file
113
Mage.Sets/src/mage/sets/coldsnap/JotunGrunt.java
Normal 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.coldsnap;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.costs.CostImpl;
|
||||||
|
import mage.abilities.keyword.CumulativeUpkeepAbility;
|
||||||
|
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.FilterCard;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.common.TargetCardInASingleGraveyard;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author emerald000
|
||||||
|
*/
|
||||||
|
public class JotunGrunt extends CardImpl {
|
||||||
|
|
||||||
|
public JotunGrunt(UUID ownerId) {
|
||||||
|
super(ownerId, 8, "Jotun Grunt", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{W}");
|
||||||
|
this.expansionSetCode = "CSP";
|
||||||
|
this.subtype.add("Giant");
|
||||||
|
this.subtype.add("Soldier");
|
||||||
|
this.power = new MageInt(4);
|
||||||
|
this.toughness = new MageInt(4);
|
||||||
|
|
||||||
|
// Cumulative upkeep-Put two cards from a single graveyard on the bottom of their owner's library.
|
||||||
|
this.addAbility(new CumulativeUpkeepAbility(new JotunGruntCost()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public JotunGrunt(final JotunGrunt card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JotunGrunt copy() {
|
||||||
|
return new JotunGrunt(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class JotunGruntCost extends CostImpl {
|
||||||
|
|
||||||
|
JotunGruntCost() {
|
||||||
|
this.addTarget(new TargetCardInASingleGraveyard(2, 2, new FilterCard()));
|
||||||
|
this.text = "Put two cards from a single graveyard on the bottom of their owner's library";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
JotunGruntCost(final JotunGruntCost cost) {
|
||||||
|
super(cost);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) {
|
||||||
|
Player controller = game.getPlayer(controllerId);
|
||||||
|
if (controller != null) {
|
||||||
|
if (targets.choose(Outcome.Removal, controllerId, sourceId, game)) {
|
||||||
|
for (UUID targetId: targets.get(0).getTargets()) {
|
||||||
|
Card card = game.getCard(targetId);
|
||||||
|
if (card == null || !game.getState().getZone(targetId).equals(Zone.GRAVEYARD)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
paid |= controller.moveCardToLibraryWithInfo(card, sourceId, game, Zone.GRAVEYARD, false, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return paid;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canPay(Ability ability, UUID sourceId, UUID controllerId, Game game) {
|
||||||
|
return targets.canChoose(controllerId, game);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JotunGruntCost copy() {
|
||||||
|
return new JotunGruntCost(this);
|
||||||
|
}
|
||||||
|
}
|
52
Mage.Sets/src/mage/sets/commander/JotunGrunt.java
Normal file
52
Mage.Sets/src/mage/sets/commander/JotunGrunt.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.commander;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author emerald000
|
||||||
|
*/
|
||||||
|
public class JotunGrunt extends mage.sets.coldsnap.JotunGrunt {
|
||||||
|
|
||||||
|
public JotunGrunt(UUID ownerId) {
|
||||||
|
super(ownerId);
|
||||||
|
this.cardNumber = 16;
|
||||||
|
this.expansionSetCode = "CMD";
|
||||||
|
}
|
||||||
|
|
||||||
|
public JotunGrunt(final JotunGrunt card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JotunGrunt copy() {
|
||||||
|
return new JotunGrunt(this);
|
||||||
|
}
|
||||||
|
}
|
52
Mage.Sets/src/mage/sets/conspiracy/VedalkenOrrery.java
Normal file
52
Mage.Sets/src/mage/sets/conspiracy/VedalkenOrrery.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.conspiracy;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author emerald000
|
||||||
|
*/
|
||||||
|
public class VedalkenOrrery extends mage.sets.fifthdawn.VedalkenOrrery {
|
||||||
|
|
||||||
|
public VedalkenOrrery(UUID ownerId) {
|
||||||
|
super(ownerId);
|
||||||
|
this.cardNumber = 206;
|
||||||
|
this.expansionSetCode = "CNS";
|
||||||
|
}
|
||||||
|
|
||||||
|
public VedalkenOrrery(final VedalkenOrrery card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public VedalkenOrrery copy() {
|
||||||
|
return new VedalkenOrrery(this);
|
||||||
|
}
|
||||||
|
}
|
69
Mage.Sets/src/mage/sets/fifthdawn/VedalkenOrrery.java
Normal file
69
Mage.Sets/src/mage/sets/fifthdawn/VedalkenOrrery.java
Normal file
|
@ -0,0 +1,69 @@
|
||||||
|
/*
|
||||||
|
* 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.fifthdawn;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.effects.common.continious.CastAsThoughItHadFlashAllEffect;
|
||||||
|
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.predicate.Predicates;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author emerald000
|
||||||
|
*/
|
||||||
|
public class VedalkenOrrery extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterCard filter = new FilterCard("nonland cards");
|
||||||
|
static {
|
||||||
|
filter.add(Predicates.not(new CardTypePredicate(CardType.LAND)));
|
||||||
|
}
|
||||||
|
|
||||||
|
public VedalkenOrrery(UUID ownerId) {
|
||||||
|
super(ownerId, 163, "Vedalken Orrery", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{4}");
|
||||||
|
this.expansionSetCode = "5DN";
|
||||||
|
|
||||||
|
// You may cast nonland cards as though they had flash.
|
||||||
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CastAsThoughItHadFlashAllEffect(Duration.WhileOnBattlefield, filter)));
|
||||||
|
}
|
||||||
|
|
||||||
|
public VedalkenOrrery(final VedalkenOrrery card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public VedalkenOrrery copy() {
|
||||||
|
return new VedalkenOrrery(this);
|
||||||
|
}
|
||||||
|
}
|
135
Mage.Sets/src/mage/sets/futuresight/HeartwoodStoryteller.java
Normal file
135
Mage.Sets/src/mage/sets/futuresight/HeartwoodStoryteller.java
Normal file
|
@ -0,0 +1,135 @@
|
||||||
|
/*
|
||||||
|
* 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.TriggeredAbilityImpl;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
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.events.GameEvent;
|
||||||
|
import mage.game.stack.Spell;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.targetpointer.FixedTarget;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author emerald000
|
||||||
|
*/
|
||||||
|
public class HeartwoodStoryteller extends CardImpl {
|
||||||
|
|
||||||
|
public HeartwoodStoryteller(UUID ownerId) {
|
||||||
|
super(ownerId, 127, "Heartwood Storyteller", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{G}{G}");
|
||||||
|
this.expansionSetCode = "FUT";
|
||||||
|
this.subtype.add("Treefolk");
|
||||||
|
this.power = new MageInt(2);
|
||||||
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
|
// Whenever a player casts a noncreature spell, each of that player's opponents may draw a card.
|
||||||
|
this.addAbility(new HeartwoodStorytellerTriggeredAbility());
|
||||||
|
}
|
||||||
|
|
||||||
|
public HeartwoodStoryteller(final HeartwoodStoryteller card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HeartwoodStoryteller copy() {
|
||||||
|
return new HeartwoodStoryteller(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class HeartwoodStorytellerTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
|
|
||||||
|
HeartwoodStorytellerTriggeredAbility() {
|
||||||
|
super(Zone.BATTLEFIELD, new HeartwoodStorytellerEffect(), false);
|
||||||
|
}
|
||||||
|
|
||||||
|
HeartwoodStorytellerTriggeredAbility(final HeartwoodStorytellerTriggeredAbility ability) {
|
||||||
|
super(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HeartwoodStorytellerTriggeredAbility copy() {
|
||||||
|
return new HeartwoodStorytellerTriggeredAbility(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
|
if (event.getType() == GameEvent.EventType.SPELL_CAST) {
|
||||||
|
Spell spell = game.getStack().getSpell(event.getTargetId());
|
||||||
|
if (spell != null && !spell.getCardType().contains(CardType.CREATURE)) {
|
||||||
|
for (Effect effect : this.getEffects()) {
|
||||||
|
effect.setTargetPointer(new FixedTarget(event.getPlayerId()));
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getRule() {
|
||||||
|
return "Whenever a player casts a noncreature spell, each of that player's opponents may draw a card.";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class HeartwoodStorytellerEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
HeartwoodStorytellerEffect() {
|
||||||
|
super(Outcome.DrawCard);
|
||||||
|
this.staticText = "Each of that player's opponents may draw a card";
|
||||||
|
}
|
||||||
|
|
||||||
|
HeartwoodStorytellerEffect(final HeartwoodStorytellerEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HeartwoodStorytellerEffect copy() {
|
||||||
|
return new HeartwoodStorytellerEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
for (UUID playerId : game.getOpponents(this.getTargetPointer().getFirst(game, source))) {
|
||||||
|
Player player = game.getPlayer(playerId);
|
||||||
|
if (player != null) {
|
||||||
|
player.drawCards(1, game);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
111
Mage.Sets/src/mage/sets/planeshift/MagnigothTreefolk.java
Normal file
111
Mage.Sets/src/mage/sets/planeshift/MagnigothTreefolk.java
Normal file
|
@ -0,0 +1,111 @@
|
||||||
|
/*
|
||||||
|
* 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.planeshift;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.effects.RestrictionEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.Rarity;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.common.FilterLandPermanent;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author emerald000
|
||||||
|
*/
|
||||||
|
public class MagnigothTreefolk extends CardImpl {
|
||||||
|
|
||||||
|
public MagnigothTreefolk(UUID ownerId) {
|
||||||
|
super(ownerId, 82, "Magnigoth Treefolk", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{G}");
|
||||||
|
this.expansionSetCode = "PLS";
|
||||||
|
this.subtype.add("Treefolk");
|
||||||
|
this.power = new MageInt(2);
|
||||||
|
this.toughness = new MageInt(6);
|
||||||
|
|
||||||
|
// Domain - For each basic land type among lands you control, Magnigoth Treefolk has landwalk of that type.
|
||||||
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new MagnigothTreefolkEffect()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public MagnigothTreefolk(final MagnigothTreefolk card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MagnigothTreefolk copy() {
|
||||||
|
return new MagnigothTreefolk(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class MagnigothTreefolkEffect extends RestrictionEffect {
|
||||||
|
|
||||||
|
private static final FilterLandPermanent filterPlains = new FilterLandPermanent("Plains", "Plains");
|
||||||
|
private static final FilterLandPermanent filterIsland = new FilterLandPermanent("Island", "Island");
|
||||||
|
private static final FilterLandPermanent filterSwamp = new FilterLandPermanent("Swamp", "Swamp");
|
||||||
|
private static final FilterLandPermanent filterMountain = new FilterLandPermanent("Mountain", "Mountain");
|
||||||
|
private static final FilterLandPermanent filterForest = new FilterLandPermanent("Forest", "Forest");
|
||||||
|
|
||||||
|
MagnigothTreefolkEffect() {
|
||||||
|
super(Duration.WhileOnBattlefield);
|
||||||
|
staticText = "Domain — For each basic land type among lands you control, {this} has landwalk of that type";
|
||||||
|
}
|
||||||
|
|
||||||
|
MagnigothTreefolkEffect(final MagnigothTreefolkEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canBeBlocked(Permanent attacker, Permanent blocker, Ability source, Game game) {
|
||||||
|
return !((game.getBattlefield().contains(filterPlains, blocker.getControllerId(), 1, game)
|
||||||
|
&& game.getBattlefield().contains(filterPlains, source.getControllerId(), 1, game))
|
||||||
|
|| (game.getBattlefield().contains(filterIsland, blocker.getControllerId(), 1, game)
|
||||||
|
&& game.getBattlefield().contains(filterIsland, source.getControllerId(), 1, game))
|
||||||
|
|| (game.getBattlefield().contains(filterSwamp, blocker.getControllerId(), 1, game)
|
||||||
|
&& game.getBattlefield().contains(filterSwamp, source.getControllerId(), 1, game))
|
||||||
|
|| (game.getBattlefield().contains(filterMountain, blocker.getControllerId(), 1, game)
|
||||||
|
&& game.getBattlefield().contains(filterMountain, source.getControllerId(), 1, game))
|
||||||
|
|| (game.getBattlefield().contains(filterForest, blocker.getControllerId(), 1, game)
|
||||||
|
&& game.getBattlefield().contains(filterForest, source.getControllerId(), 1, game)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean applies(Permanent permanent, Ability source, Game game) {
|
||||||
|
return permanent.getId().equals(source.getSourceId());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MagnigothTreefolkEffect copy() {
|
||||||
|
return new MagnigothTreefolkEffect(this);
|
||||||
|
}
|
||||||
|
}
|
|
@ -72,12 +72,9 @@ public class CumulativeUpkeepAbility extends BeginningOfUpkeepTriggeredAbility {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getRule() {
|
public String getRule() {
|
||||||
StringBuilder sb = new StringBuilder("Cumulative upkeep");
|
StringBuilder sb = new StringBuilder("Cumulative upkeep ");
|
||||||
if(cumulativeCost instanceof ManaCost){
|
if (!(cumulativeCost instanceof ManaCost)) {
|
||||||
sb.append(" ");
|
sb.append("— ");
|
||||||
}
|
|
||||||
else{
|
|
||||||
sb.append("-");
|
|
||||||
}
|
}
|
||||||
sb.append(cumulativeCost.getText());
|
sb.append(cumulativeCost.getText());
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
|
|
Loading…
Reference in a new issue