mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
[ALA] Added all green cards (6 cards=
This commit is contained in:
parent
90640b0a05
commit
a200afabe5
6 changed files with 769 additions and 0 deletions
200
Mage.Sets/src/mage/sets/shardsofalara/KeeperOfProgenitus.java
Normal file
200
Mage.Sets/src/mage/sets/shardsofalara/KeeperOfProgenitus.java
Normal file
|
@ -0,0 +1,200 @@
|
|||
/*
|
||||
* 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.shardsofalara;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.Mana;
|
||||
import mage.abilities.Abilities;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.common.ManaEffect;
|
||||
import mage.abilities.mana.ManaAbility;
|
||||
import mage.abilities.mana.TriggeredManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.choices.Choice;
|
||||
import mage.choices.ChoiceImpl;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Plopman
|
||||
*/
|
||||
public class KeeperOfProgenitus extends CardImpl<KeeperOfProgenitus> {
|
||||
|
||||
public KeeperOfProgenitus(UUID ownerId) {
|
||||
super(ownerId, 135, "Keeper of Progenitus", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{G}");
|
||||
this.expansionSetCode = "ALA";
|
||||
this.subtype.add("Elf");
|
||||
this.subtype.add("Druid");
|
||||
|
||||
this.color.setGreen(true);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Whenever a player taps a Mountain, Forest, or Plains for mana, that player adds one mana to his or her mana pool of any type that land produced.
|
||||
this.addAbility(new HeartbeatOfSpringAbility());
|
||||
}
|
||||
|
||||
public KeeperOfProgenitus(final KeeperOfProgenitus card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public KeeperOfProgenitus copy() {
|
||||
return new KeeperOfProgenitus(this);
|
||||
}
|
||||
}
|
||||
|
||||
class HeartbeatOfSpringAbility extends TriggeredManaAbility<HeartbeatOfSpringAbility> {
|
||||
|
||||
private static final String staticText = "Whenever a player taps a Mountain, Forest, or Plains for mana, that player adds one mana to his or her mana pool of any type that land produced.";
|
||||
|
||||
public HeartbeatOfSpringAbility() {
|
||||
super(Zone.BATTLEFIELD, new HeartbeatOfSpringEffect());
|
||||
}
|
||||
|
||||
public HeartbeatOfSpringAbility(HeartbeatOfSpringAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getType() == GameEvent.EventType.TAPPED_FOR_MANA ) {
|
||||
Permanent permanent = game.getPermanent(event.getSourceId());
|
||||
if (permanent == null) {
|
||||
permanent = (Permanent) game.getLastKnownInformation(event.getSourceId(), Zone.BATTLEFIELD);
|
||||
}
|
||||
if (permanent != null && permanent.getCardType().contains(CardType.LAND)){
|
||||
if(permanent.getSubtype().contains("Mountain") || permanent.getSubtype().contains("Forest") || permanent.getSubtype().contains("Plains")){
|
||||
getEffects().get(0).setTargetPointer(new FixedTarget(permanent.getId()));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HeartbeatOfSpringAbility copy() {
|
||||
return new HeartbeatOfSpringAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return staticText;
|
||||
}
|
||||
}
|
||||
|
||||
class HeartbeatOfSpringEffect extends ManaEffect<HeartbeatOfSpringEffect> {
|
||||
|
||||
public HeartbeatOfSpringEffect() {
|
||||
super();
|
||||
staticText = "that player adds one mana to his or her mana pool of any type that land produced";
|
||||
}
|
||||
|
||||
public HeartbeatOfSpringEffect(final HeartbeatOfSpringEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent land = game.getPermanent(this.targetPointer.getFirst(game, source));
|
||||
Player player = game.getPlayer(land.getControllerId());
|
||||
Abilities<ManaAbility> mana = land.getAbilities().getManaAbilities(Zone.BATTLEFIELD);
|
||||
Mana types = new Mana();
|
||||
for (ManaAbility ability: mana) {
|
||||
types.add(ability.getNetMana(game));
|
||||
}
|
||||
Choice choice = new ChoiceImpl(true);
|
||||
choice.setMessage("Pick a mana color");
|
||||
if (types.getBlack() > 0) {
|
||||
choice.getChoices().add("Black");
|
||||
}
|
||||
if (types.getRed() > 0) {
|
||||
choice.getChoices().add("Red");
|
||||
}
|
||||
if (types.getBlue() > 0) {
|
||||
choice.getChoices().add("Blue");
|
||||
}
|
||||
if (types.getGreen() > 0) {
|
||||
choice.getChoices().add("Green");
|
||||
}
|
||||
if (types.getWhite() > 0) {
|
||||
choice.getChoices().add("White");
|
||||
}
|
||||
if (types.getColorless() > 0) {
|
||||
choice.getChoices().add("Colorless");
|
||||
}
|
||||
if (choice.getChoices().size() > 0) {
|
||||
if (choice.getChoices().size() == 1) {
|
||||
choice.setChoice(choice.getChoices().iterator().next());
|
||||
}
|
||||
else {
|
||||
player.choose(outcome, choice, game);
|
||||
}
|
||||
if (choice.getChoice().equals("Black")) {
|
||||
player.getManaPool().addMana(Mana.BlackMana, game, source);
|
||||
return true;
|
||||
}
|
||||
else if (choice.getChoice().equals("Blue")) {
|
||||
player.getManaPool().addMana(Mana.BlueMana, game, source);
|
||||
return true;
|
||||
}
|
||||
else if (choice.getChoice().equals("Red")) {
|
||||
player.getManaPool().addMana(Mana.RedMana, game, source);
|
||||
return true;
|
||||
}
|
||||
else if (choice.getChoice().equals("Green")) {
|
||||
player.getManaPool().addMana(Mana.GreenMana, game, source);
|
||||
return true;
|
||||
}
|
||||
else if (choice.getChoice().equals("White")) {
|
||||
player.getManaPool().addMana(Mana.WhiteMana, game, source);
|
||||
return true;
|
||||
}
|
||||
else if (choice.getChoice().equals("Colorless")) {
|
||||
player.getManaPool().addMana(Mana.ColorlessMana, game, source);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HeartbeatOfSpringEffect copy() {
|
||||
return new HeartbeatOfSpringEffect(this);
|
||||
}
|
||||
|
||||
}
|
110
Mage.Sets/src/mage/sets/shardsofalara/Manaplasm.java
Normal file
110
Mage.Sets/src/mage/sets/shardsofalara/Manaplasm.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.shardsofalara;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.EmptyEffect;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.stack.Spell;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Plopman
|
||||
*/
|
||||
public class Manaplasm extends CardImpl<Manaplasm> {
|
||||
|
||||
public Manaplasm(UUID ownerId) {
|
||||
super(ownerId, 138, "Manaplasm", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{G}");
|
||||
this.expansionSetCode = "ALA";
|
||||
this.subtype.add("Ooze");
|
||||
|
||||
this.color.setGreen(true);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// Whenever you cast a spell, Manaplasm gets +X/+X until end of turn, where X is that spell's converted mana cost.
|
||||
this.addAbility(new ManaplasmAbility());
|
||||
|
||||
}
|
||||
|
||||
public Manaplasm(final Manaplasm card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Manaplasm copy() {
|
||||
return new Manaplasm(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class ManaplasmAbility extends TriggeredAbilityImpl<ManaplasmAbility> {
|
||||
|
||||
public ManaplasmAbility() {
|
||||
super(Constants.Zone.BATTLEFIELD, new EmptyEffect("{this} gets +X/+X until end of turn, where X is that spell's converted mana cost"), false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public ManaplasmAbility(final ManaplasmAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@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.getControllerId().equals(controllerId)) {
|
||||
this.getEffects().remove(0);
|
||||
this.addEffect(new BoostSourceEffect(spell.getManaCost().convertedManaCost(), spell.getManaCost().convertedManaCost(), Constants.Duration.EndOfTurn));
|
||||
this.getEffects().get(0).setTargetPointer(new FixedTarget(event.getPlayerId()));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever you cast a spell, {this} gets +X/+X until end of turn, where X is that spell's converted mana cost";
|
||||
}
|
||||
|
||||
@Override
|
||||
public ManaplasmAbility copy() {
|
||||
return new ManaplasmAbility(this);
|
||||
}
|
||||
}
|
152
Mage.Sets/src/mage/sets/shardsofalara/MightyEmergence.java
Normal file
152
Mage.Sets/src/mage/sets/shardsofalara/MightyEmergence.java
Normal file
|
@ -0,0 +1,152 @@
|
|||
/*
|
||||
* 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.shardsofalara;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.filter.predicate.mageobject.PowerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Plopman
|
||||
*/
|
||||
public class MightyEmergence extends CardImpl<MightyEmergence> {
|
||||
|
||||
public MightyEmergence(UUID ownerId) {
|
||||
super(ownerId, 137, "Mighty Emergence", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}");
|
||||
this.expansionSetCode = "ALA";
|
||||
|
||||
this.color.setGreen(true);
|
||||
|
||||
// Whenever a creature with power 5 or greater enters the battlefield under your control, you may put two +1/+1 counters on it.
|
||||
this.addAbility(new MightyEmergenceTriggeredAbility());
|
||||
}
|
||||
|
||||
public MightyEmergence(final MightyEmergence card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MightyEmergence copy() {
|
||||
return new MightyEmergence(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class MightyEmergenceTriggeredAbility extends TriggeredAbilityImpl<MightyEmergenceTriggeredAbility> {
|
||||
private static final FilterCreatureCard filter = new FilterCreatureCard("creature with power 5 or greater");
|
||||
static {
|
||||
filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 4));
|
||||
}
|
||||
|
||||
public MightyEmergenceTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new AddCountersTargetEffect(), true);
|
||||
}
|
||||
|
||||
public MightyEmergenceTriggeredAbility(MightyEmergenceTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getType() == GameEvent.EventType.ENTERS_THE_BATTLEFIELD) {
|
||||
UUID targetId = event.getTargetId();
|
||||
Permanent permanent = game.getPermanent(targetId);
|
||||
if (filter.match(permanent, getSourceId(), getControllerId(), game)) {
|
||||
if (getTargets().size() == 0) {
|
||||
for (Effect effect : this.getEffects()) {
|
||||
effect.setTargetPointer(new FixedTarget(targetId));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever a creature with power 5 or greater enters the battlefield under your control, you may put two +1/+1 counters on it";
|
||||
}
|
||||
|
||||
@Override
|
||||
public MightyEmergenceTriggeredAbility copy() {
|
||||
return new MightyEmergenceTriggeredAbility(this);
|
||||
}
|
||||
}
|
||||
|
||||
class AddCountersTargetEffect extends OneShotEffect<AddCountersTargetEffect> {
|
||||
|
||||
|
||||
|
||||
public AddCountersTargetEffect() {
|
||||
super(Constants.Outcome.Benefit);
|
||||
}
|
||||
|
||||
public AddCountersTargetEffect(final AddCountersTargetEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source));
|
||||
if (permanent != null) {
|
||||
permanent.addCounters(CounterType.P1P1.createInstance(2), game);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return "put two +1/+1 counters on it";
|
||||
}
|
||||
|
||||
@Override
|
||||
public AddCountersTargetEffect copy() {
|
||||
return new AddCountersTargetEffect(this);
|
||||
}
|
||||
|
||||
|
||||
}
|
120
Mage.Sets/src/mage/sets/shardsofalara/OozeGarden.java
Normal file
120
Mage.Sets/src/mage/sets/shardsofalara/OozeGarden.java
Normal file
|
@ -0,0 +1,120 @@
|
|||
/*
|
||||
* 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.shardsofalara;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.AbilitiesImpl;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Plopman
|
||||
*/
|
||||
public class OozeGarden extends CardImpl<OozeGarden> {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("non-Ooze creature");
|
||||
static{
|
||||
filter.add(Predicates.not(new SubtypePredicate("Ooze")));
|
||||
}
|
||||
public OozeGarden(UUID ownerId) {
|
||||
super(ownerId, 143, "Ooze Garden", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}");
|
||||
this.expansionSetCode = "ALA";
|
||||
|
||||
this.color.setGreen(true);
|
||||
|
||||
// {1}{G}, Sacrifice a non-Ooze creature: Put an X/X green Ooze creature token onto the battlefield, where X is the sacrificed creature's power. Activate this ability only any time you could cast a sorcery.
|
||||
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new CreateTokenEffect(), new ManaCostsImpl("{1}{G}"));
|
||||
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, true)));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public OozeGarden(final OozeGarden card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public OozeGarden copy() {
|
||||
return new OozeGarden(this);
|
||||
}
|
||||
}
|
||||
|
||||
class CreateTokenEffect extends OneShotEffect<CreateTokenEffect> {
|
||||
|
||||
public CreateTokenEffect() {
|
||||
super(Constants.Outcome.PutCreatureInPlay);
|
||||
staticText = "Put an X/X green Ooze creature token onto the battlefield, where X is the sacrificed creature's power";
|
||||
}
|
||||
|
||||
public CreateTokenEffect(final CreateTokenEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CreateTokenEffect copy() {
|
||||
return new CreateTokenEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
int value = 0;
|
||||
for(Cost cost : source.getCosts()){
|
||||
if(cost instanceof SacrificeTargetCost){
|
||||
value = ((SacrificeTargetCost)cost).getPermanents().get(0).getPower().getValue();
|
||||
}
|
||||
}
|
||||
ArrayList<String> list = new ArrayList<String>();
|
||||
list.add("Ooze");
|
||||
Token token = new Token("Ooze", "X/X green Ooze creature token onto the battlefield, where X is the sacrificed creature's power", ObjectColor.GREEN, list, value, value, new AbilitiesImpl()) {
|
||||
|
||||
|
||||
};
|
||||
token.getAbilities().newId(); // neccessary if token has ability like DevourAbility()
|
||||
token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
109
Mage.Sets/src/mage/sets/shardsofalara/SacellumGodspeaker.java
Normal file
109
Mage.Sets/src/mage/sets/shardsofalara/SacellumGodspeaker.java
Normal file
|
@ -0,0 +1,109 @@
|
|||
/*
|
||||
* 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.shardsofalara;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.Mana;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.common.ManaEffect;
|
||||
import mage.abilities.mana.SimpleManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.filter.predicate.mageobject.PowerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.target.common.TargetCardInHand;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Plopman
|
||||
*/
|
||||
public class SacellumGodspeaker extends CardImpl<SacellumGodspeaker> {
|
||||
|
||||
public SacellumGodspeaker(UUID ownerId) {
|
||||
super(ownerId, 146, "Sacellum Godspeaker", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{G}");
|
||||
this.expansionSetCode = "ALA";
|
||||
this.subtype.add("Elf");
|
||||
this.subtype.add("Druid");
|
||||
|
||||
this.color.setGreen(true);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// {tap}: Reveal any number of creature cards with power 5 or greater from your hand. Add {G} to your mana pool for each card revealed this way.
|
||||
this.addAbility(new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new SacellumGodspeakerEffect(), new TapSourceCost()));
|
||||
}
|
||||
|
||||
public SacellumGodspeaker(final SacellumGodspeaker card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SacellumGodspeaker copy() {
|
||||
return new SacellumGodspeaker(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class SacellumGodspeakerEffect extends ManaEffect<SacellumGodspeakerEffect> {
|
||||
|
||||
|
||||
private static final FilterCreatureCard filter = new FilterCreatureCard("creature cards with power 5 or greater from your hand");
|
||||
static {
|
||||
filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 4));
|
||||
}
|
||||
|
||||
public SacellumGodspeakerEffect() {
|
||||
super();
|
||||
staticText = "Reveal any number of creature cards with power 5 or greater from your hand. Add {G} to your mana pool for each card revealed this way";
|
||||
}
|
||||
|
||||
public SacellumGodspeakerEffect(final SacellumGodspeakerEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SacellumGodspeakerEffect copy() {
|
||||
return new SacellumGodspeakerEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
TargetCardInHand target = new TargetCardInHand(0,Integer.MAX_VALUE, filter);
|
||||
if (target.choose(Constants.Outcome.Benefit, source.getControllerId(), source.getId(), game)) {
|
||||
game.getPlayer(source.getControllerId()).getManaPool().addMana(Mana.GreenMana(target.getTargets().size()), game, source);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
78
Mage.Sets/src/mage/sets/shardsofalara/TopanAscetic.java
Normal file
78
Mage.Sets/src/mage/sets/shardsofalara/TopanAscetic.java
Normal file
|
@ -0,0 +1,78 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.shardsofalara;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapTargetCost;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Plopman
|
||||
*/
|
||||
public class TopanAscetic extends CardImpl<TopanAscetic> {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("untapped creature you control");
|
||||
static{
|
||||
filter.add(Predicates.not(new TappedPredicate()));
|
||||
}
|
||||
|
||||
|
||||
public TopanAscetic(UUID ownerId) {
|
||||
super(ownerId, 151, "Topan Ascetic", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{G}");
|
||||
this.expansionSetCode = "ALA";
|
||||
this.subtype.add("Human");
|
||||
this.subtype.add("Monk");
|
||||
|
||||
this.color.setGreen(true);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Tap an untapped creature you control: Topan Ascetic gets +1/+1 until end of turn.
|
||||
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BoostSourceEffect(1, 1, Constants.Duration.EndOfTurn), new TapTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, true))));
|
||||
}
|
||||
|
||||
public TopanAscetic(final TopanAscetic card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TopanAscetic copy() {
|
||||
return new TopanAscetic(this);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue