mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
- Added Biting Tether, Briarberry Cohort, Consign to Dream, Drowner Initiate, Safehold Sentry, Twilight Shepherd, and Woeleecher.
This commit is contained in:
parent
2bcf0022c8
commit
b59c76196c
7 changed files with 709 additions and 0 deletions
118
Mage.Sets/src/mage/sets/shadowmoor/BitingTether.java
Normal file
118
Mage.Sets/src/mage/sets/shadowmoor/BitingTether.java
Normal file
|
@ -0,0 +1,118 @@
|
|||
/*
|
||||
* 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.shadowmoor;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.continious.ControlEnchantedEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*
|
||||
*/
|
||||
public class BitingTether extends CardImpl<BitingTether> {
|
||||
|
||||
public BitingTether(UUID ownerId) {
|
||||
super(ownerId, 29, "Biting Tether", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{4}{U}");
|
||||
this.expansionSetCode = "SHM";
|
||||
this.subtype.add("Aura");
|
||||
|
||||
this.color.setBlue(true);
|
||||
|
||||
// Enchant creature
|
||||
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment));
|
||||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||
this.addAbility(ability);
|
||||
|
||||
// You control enchanted creature.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ControlEnchantedEffect()));
|
||||
|
||||
// At the beginning of your upkeep, put a -1/-1 counter on enchanted creature.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new BitingTetherEffect(), TargetController.YOU, false));
|
||||
|
||||
}
|
||||
|
||||
public BitingTether(final BitingTether card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BitingTether copy() {
|
||||
return new BitingTether(this);
|
||||
}
|
||||
}
|
||||
|
||||
class BitingTetherEffect extends OneShotEffect<BitingTetherEffect> {
|
||||
|
||||
public BitingTetherEffect() {
|
||||
super(Outcome.Neutral);
|
||||
this.staticText = "put a -1/-1 counter on enchanted creature";
|
||||
}
|
||||
|
||||
public BitingTetherEffect(final BitingTetherEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BitingTetherEffect copy() {
|
||||
return new BitingTetherEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent bitingTether = game.getPermanent(source.getSourceId());
|
||||
if (bitingTether == null) {
|
||||
return false;
|
||||
}
|
||||
Permanent enchantedCreature = game.getPermanent(bitingTether.getAttachedTo());
|
||||
if (enchantedCreature != null) {
|
||||
enchantedCreature.addCounters(CounterType.M1M1.createInstance(), game);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
94
Mage.Sets/src/mage/sets/shadowmoor/BriarberryCohort.java
Normal file
94
Mage.Sets/src/mage/sets/shadowmoor/BriarberryCohort.java
Normal file
|
@ -0,0 +1,94 @@
|
|||
/*
|
||||
* 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.shadowmoor;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.ControlsPermanentCondition;
|
||||
import mage.abilities.condition.common.ControlsPermanentCondition.CountType;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
|
||||
*/
|
||||
public class BriarberryCohort extends CardImpl<BriarberryCohort> {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent();
|
||||
|
||||
static {
|
||||
filter.add(new ColorPredicate(ObjectColor.BLUE));
|
||||
filter.add(new AnotherPredicate());
|
||||
}
|
||||
|
||||
private String rule = "{this} gets +1/+1 as long as you control another blue creature";
|
||||
|
||||
public BriarberryCohort(UUID ownerId) {
|
||||
super(ownerId, 30, "Briarberry Cohort", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{U}");
|
||||
this.expansionSetCode = "SHM";
|
||||
this.subtype.add("Faerie");
|
||||
this.subtype.add("Soldier");
|
||||
|
||||
this.color.setBlue(true);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Briarberry Cohort gets +1/+1 as long as you control another blue creature.
|
||||
Condition condition = new ControlsPermanentCondition(filter, CountType.MORE_THAN, 0);
|
||||
Effect effect = new ConditionalContinousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), condition, rule);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
|
||||
}
|
||||
|
||||
public BriarberryCohort(final BriarberryCohort card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BriarberryCohort copy() {
|
||||
return new BriarberryCohort(this);
|
||||
}
|
||||
}
|
103
Mage.Sets/src/mage/sets/shadowmoor/ConsignToDream.java
Normal file
103
Mage.Sets/src/mage/sets/shadowmoor/ConsignToDream.java
Normal file
|
@ -0,0 +1,103 @@
|
|||
/*
|
||||
* 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.shadowmoor;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
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.permanent.Permanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*
|
||||
*/
|
||||
public class ConsignToDream extends CardImpl<ConsignToDream> {
|
||||
|
||||
public ConsignToDream(UUID ownerId) {
|
||||
super(ownerId, 32, "Consign to Dream", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{U}");
|
||||
this.expansionSetCode = "SHM";
|
||||
|
||||
this.color.setBlue(true);
|
||||
|
||||
// Return target permanent to its owner's hand. If that permanent is red or green, put it on top of its owner's library instead.
|
||||
this.getSpellAbility().addEffect(new ConsignToDreamEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(true));
|
||||
|
||||
}
|
||||
|
||||
public ConsignToDream(final ConsignToDream card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConsignToDream copy() {
|
||||
return new ConsignToDream(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ConsignToDreamEffect extends OneShotEffect<ConsignToDreamEffect> {
|
||||
|
||||
boolean applied = false;
|
||||
|
||||
public ConsignToDreamEffect() {
|
||||
super(Outcome.ReturnToHand);
|
||||
this.staticText = "Return target permanent to its owner's hand. If that permanent is red or green, put it on top of its owner's library instead";
|
||||
}
|
||||
|
||||
public ConsignToDreamEffect(final ConsignToDreamEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConsignToDreamEffect copy() {
|
||||
return new ConsignToDreamEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent target = game.getPermanent(source.getFirstTarget());
|
||||
if (target != null) {
|
||||
if (target.getColor().contains(ObjectColor.RED)
|
||||
|| target.getColor().contains(ObjectColor.GREEN)) {
|
||||
applied = target.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
|
||||
} else {
|
||||
applied = target.moveToZone(Zone.HAND, source.getSourceId(), game, false);
|
||||
}
|
||||
}
|
||||
return applied;
|
||||
}
|
||||
}
|
83
Mage.Sets/src/mage/sets/shadowmoor/DrownerInitiate.java
Normal file
83
Mage.Sets/src/mage/sets/shadowmoor/DrownerInitiate.java
Normal file
|
@ -0,0 +1,83 @@
|
|||
/*
|
||||
* 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.shadowmoor;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SpellCastAllTriggeredAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.DoIfCostPaid;
|
||||
import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.target.TargetPlayer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
|
||||
*/
|
||||
public class DrownerInitiate extends CardImpl<DrownerInitiate> {
|
||||
|
||||
private static final FilterSpell filter = new FilterSpell("a blue spell");
|
||||
|
||||
static {
|
||||
filter.add(new ColorPredicate(ObjectColor.BLUE));
|
||||
}
|
||||
|
||||
public DrownerInitiate(UUID ownerId) {
|
||||
super(ownerId, 36, "Drowner Initiate", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{U}");
|
||||
this.expansionSetCode = "SHM";
|
||||
this.subtype.add("Merfolk");
|
||||
this.subtype.add("Wizard");
|
||||
|
||||
this.color.setBlue(true);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// Whenever a player casts a blue spell, you may pay {1}. If you do, target player puts the top two cards of his or her library into his or her graveyard.
|
||||
Ability ability = new SpellCastAllTriggeredAbility(new DoIfCostPaid(new PutLibraryIntoGraveTargetEffect(2), new ManaCostsImpl("{1}")), filter, true);
|
||||
ability.addTarget(new TargetPlayer(true));
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
||||
public DrownerInitiate(final DrownerInitiate card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DrownerInitiate copy() {
|
||||
return new DrownerInitiate(this);
|
||||
}
|
||||
}
|
75
Mage.Sets/src/mage/sets/shadowmoor/SafeholdSentry.java
Normal file
75
Mage.Sets/src/mage/sets/shadowmoor/SafeholdSentry.java
Normal file
|
@ -0,0 +1,75 @@
|
|||
/*
|
||||
* 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.shadowmoor;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.UntapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
|
||||
*/
|
||||
public class SafeholdSentry extends CardImpl<SafeholdSentry> {
|
||||
|
||||
public SafeholdSentry(UUID ownerId) {
|
||||
super(ownerId, 22, "Safehold Sentry", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{W}");
|
||||
this.expansionSetCode = "SHM";
|
||||
this.subtype.add("Elf");
|
||||
this.subtype.add("Warrior");
|
||||
|
||||
this.color.setWhite(true);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// {2}{W}, {untap}: Safehold Sentry gets +0/+2 until end of turn.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(0, 2, Duration.EndOfTurn), new ManaCostsImpl("{2}{W}"));
|
||||
ability.addCost(new UntapSourceCost());
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
||||
public SafeholdSentry(final SafeholdSentry card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SafeholdSentry copy() {
|
||||
return new SafeholdSentry(this);
|
||||
}
|
||||
}
|
120
Mage.Sets/src/mage/sets/shadowmoor/TwilightShepherd.java
Normal file
120
Mage.Sets/src/mage/sets/shadowmoor/TwilightShepherd.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.shadowmoor;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.abilities.keyword.PersistAbility;
|
||||
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.game.Game;
|
||||
import mage.watchers.common.CardsPutIntoGraveyardWatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*
|
||||
*/
|
||||
public class TwilightShepherd extends CardImpl<TwilightShepherd> {
|
||||
|
||||
public TwilightShepherd(UUID ownerId) {
|
||||
super(ownerId, 25, "Twilight Shepherd", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{W}{W}{W}");
|
||||
this.expansionSetCode = "SHM";
|
||||
this.subtype.add("Angel");
|
||||
|
||||
this.color.setWhite(true);
|
||||
this.power = new MageInt(5);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Vigilance
|
||||
this.addAbility(VigilanceAbility.getInstance());
|
||||
|
||||
// When Twilight Shepherd enters the battlefield, return to your hand all cards in your graveyard that were put there from the battlefield this turn.
|
||||
this.addWatcher(new CardsPutIntoGraveyardWatcher());
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new TwilightShepherdEffect(), false));
|
||||
|
||||
// Persist
|
||||
this.addAbility(new PersistAbility());
|
||||
}
|
||||
|
||||
public TwilightShepherd(final TwilightShepherd card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TwilightShepherd copy() {
|
||||
return new TwilightShepherd(this);
|
||||
}
|
||||
}
|
||||
|
||||
class TwilightShepherdEffect extends OneShotEffect<TwilightShepherdEffect> {
|
||||
|
||||
boolean applied = false;
|
||||
|
||||
public TwilightShepherdEffect() {
|
||||
super(Outcome.ReturnToHand);
|
||||
this.staticText = "return to your hand all cards in your graveyard that were put there from the battlefield this turn";
|
||||
}
|
||||
|
||||
public TwilightShepherdEffect(final TwilightShepherdEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TwilightShepherdEffect copy() {
|
||||
return new TwilightShepherdEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
CardsPutIntoGraveyardWatcher watcher = (CardsPutIntoGraveyardWatcher) game.getState().getWatchers().get("CardsPutIntoGraveyardWatcher");
|
||||
if (watcher != null) {
|
||||
Set<UUID> cardsInGraveyardId = watcher.getCardsPutToGraveyardFromBattlefield();
|
||||
for (UUID cardId : cardsInGraveyardId) {
|
||||
Card card = game.getCard(cardId);
|
||||
if (card != null && card.getOwnerId().equals(source.getControllerId())) {
|
||||
applied = card.moveToZone(Zone.HAND, source.getSourceId(), game, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
return applied;
|
||||
}
|
||||
}
|
116
Mage.Sets/src/mage/sets/shadowmoor/Woeleecher.java
Normal file
116
Mage.Sets/src/mage/sets/shadowmoor/Woeleecher.java
Normal file
|
@ -0,0 +1,116 @@
|
|||
/*
|
||||
* 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.shadowmoor;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
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.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*
|
||||
*/
|
||||
public class Woeleecher extends CardImpl<Woeleecher> {
|
||||
|
||||
public Woeleecher(UUID ownerId) {
|
||||
super(ownerId, 27, "Woeleecher", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{5}{W}");
|
||||
this.expansionSetCode = "SHM";
|
||||
this.subtype.add("Elemental");
|
||||
|
||||
this.color.setWhite(true);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
// {W}, {tap}: Remove a -1/-1 counter from target creature. If you do, you gain 2 life.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new WoeleecherEffect(), new ManaCostsImpl("{W}"));
|
||||
ability.addTarget(new TargetCreaturePermanent(true));
|
||||
ability.addCost(new TapSourceCost());
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
||||
public Woeleecher(final Woeleecher card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Woeleecher copy() {
|
||||
return new Woeleecher(this);
|
||||
}
|
||||
}
|
||||
|
||||
class WoeleecherEffect extends OneShotEffect<WoeleecherEffect> {
|
||||
|
||||
private int numberCountersOriginal = 0;
|
||||
private int numberCountersAfter = 0;
|
||||
|
||||
public WoeleecherEffect() {
|
||||
super(Outcome.ReturnToHand);
|
||||
this.staticText = "Remove a -1/-1 counter from target creature. If you do, you gain 2 life";
|
||||
}
|
||||
|
||||
public WoeleecherEffect(final WoeleecherEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WoeleecherEffect copy() {
|
||||
return new WoeleecherEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent target = game.getPermanent(source.getFirstTarget());
|
||||
Player you = game.getPlayer(source.getControllerId());
|
||||
if (target != null) {
|
||||
numberCountersOriginal = target.getCounters().getCount(CounterType.M1M1);
|
||||
target.removeCounters(CounterType.M1M1.createInstance(), game);
|
||||
numberCountersAfter = target.getCounters().getCount(CounterType.M1M1);
|
||||
if (numberCountersAfter < numberCountersOriginal && you != null) {
|
||||
you.gainLife(2, game);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue