mirror of
https://github.com/correl/mage.git
synced 2025-01-13 03:00:10 +00:00
Merge branch 'master' of https://github.com/magefree/mage.git
This commit is contained in:
commit
1e9ccf06af
7 changed files with 373 additions and 5 deletions
|
@ -81,7 +81,7 @@ public class AwakenerDruid extends CardImpl<AwakenerDruid> {
|
|||
class AwakenerDruidToken extends Token {
|
||||
|
||||
public AwakenerDruidToken() {
|
||||
super("", "4/5 green Treefolk creature");
|
||||
super("", "4/5 green Treefolk creature as long as {this} is on the battlefield");
|
||||
cardType.add(CardType.CREATURE);
|
||||
subtype.add("Treefolk");
|
||||
color.setGreen(true);
|
||||
|
|
|
@ -77,7 +77,7 @@ public class LifesparkSpellbomb extends CardImpl<LifesparkSpellbomb> {
|
|||
class LifesparkSpellbombToken extends Token {
|
||||
|
||||
public LifesparkSpellbombToken() {
|
||||
super("", "3/3");
|
||||
super("", "3/3 creature");
|
||||
this.cardType.add(CardType.CREATURE);
|
||||
|
||||
this.power = new MageInt(3);
|
||||
|
|
78
Mage.Sets/src/mage/sets/worldwake/SummitApes.java
Normal file
78
Mage.Sets/src/mage/sets/worldwake/SummitApes.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.worldwake;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.ControlsPermanentCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.common.continious.CantBeBlockedByOneEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public class SummitApes extends CardImpl<SummitApes> {
|
||||
|
||||
private static final String rule = "As long as you control a Mountain, {this} can't be blocked except by two or more creatures";
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("a Mountain");
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Mountain"));
|
||||
}
|
||||
|
||||
public SummitApes(UUID ownerId) {
|
||||
super(ownerId, 114, "Summit Apes", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{G}");
|
||||
this.expansionSetCode = "WWK";
|
||||
this.subtype.add("Ape");
|
||||
|
||||
this.color.setGreen(true);
|
||||
this.power = new MageInt(5);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// As long as you control a Mountain, Summit Apes can't be blocked except by two or more creatures.
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD,
|
||||
new ConditionalContinousEffect(new CantBeBlockedByOneEffect(2), new ControlsPermanentCondition(filter), rule)));
|
||||
}
|
||||
|
||||
public SummitApes(final SummitApes card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SummitApes copy() {
|
||||
return new SummitApes(this);
|
||||
}
|
||||
}
|
118
Mage.Sets/src/mage/sets/worldwake/Terastodon.java
Normal file
118
Mage.Sets/src/mage/sets/worldwake/Terastodon.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.worldwake;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.ElephantToken;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public class Terastodon extends CardImpl<Terastodon> {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("noncreature permanent");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE)));
|
||||
}
|
||||
|
||||
public Terastodon(UUID ownerId) {
|
||||
super(ownerId, 115, "Terastodon", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{6}{G}{G}");
|
||||
this.expansionSetCode = "WWK";
|
||||
this.subtype.add("Elephant");
|
||||
|
||||
this.color.setGreen(true);
|
||||
this.power = new MageInt(9);
|
||||
this.toughness = new MageInt(9);
|
||||
|
||||
// When Terastodon enters the battlefield, you may destroy up to three target noncreature permanents. For each permanent put into a graveyard this way, its controller puts a 3/3 green Elephant creature token onto the battlefield.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new TerastodonEffect(), true);
|
||||
ability.addTarget(new TargetPermanent(0, 3, filter, true));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public Terastodon(final Terastodon card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Terastodon copy() {
|
||||
return new Terastodon(this);
|
||||
}
|
||||
}
|
||||
|
||||
class TerastodonEffect extends OneShotEffect<TerastodonEffect> {
|
||||
|
||||
public TerastodonEffect() {
|
||||
super(Outcome.DestroyPermanent);
|
||||
this.staticText = "you may destroy up to three target noncreature permanents. For each permanent put into a graveyard this way, its controller puts a 3/3 green Elephant creature token onto the battlefield";
|
||||
}
|
||||
|
||||
public TerastodonEffect(final TerastodonEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TerastodonEffect copy() {
|
||||
return new TerastodonEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
for (UUID targetID : this.targetPointer.getTargets(game, source)) {
|
||||
Permanent permanent = game.getPermanent(targetID);
|
||||
if (permanent != null) {
|
||||
if (permanent.destroy(source.getId(), game, false)) {
|
||||
if (game.getState().getZone(permanent.getId()) == Zone.GRAVEYARD) {
|
||||
Player controller = game.getPlayer(permanent.getControllerId());
|
||||
ElephantToken elephantToken = new ElephantToken();
|
||||
elephantToken.putOntoBattlefield(1, game, source.getSourceId(), controller.getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
68
Mage.Sets/src/mage/sets/worldwake/TombHex.java
Normal file
68
Mage.Sets/src/mage/sets/worldwake/TombHex.java
Normal file
|
@ -0,0 +1,68 @@
|
|||
/*
|
||||
* 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.worldwake;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.condition.common.LandfallCondition;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.common.continious.BoostTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.watchers.common.LandfallWatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public class TombHex extends CardImpl<TombHex> {
|
||||
|
||||
public TombHex(UUID ownerId) {
|
||||
super(ownerId, 69, "Tomb Hex", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{B}");
|
||||
this.expansionSetCode = "WWK";
|
||||
|
||||
this.color.setBlack(true);
|
||||
|
||||
// Target creature gets -2/-2 until end of turn.
|
||||
// Landfall - If you had a land enter the battlefield under your control this turn, that creature gets -4/-4 until end of turn instead.
|
||||
this.addWatcher(new LandfallWatcher());
|
||||
this.getSpellAbility().addEffect(new ConditionalContinousEffect(new BoostTargetEffect(-4, -4, Constants.Duration.EndOfTurn), new BoostTargetEffect(-2, -2, Constants.Duration.EndOfTurn), LandfallCondition.getInstance(), "Target creature gets -2/-2 until end of turn. Landfall - If you had a land enter the battlefield under your control this turn, that creature gets -4/-4 until end of turn instead"));
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
}
|
||||
|
||||
public TombHex(final TombHex card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TombHex copy() {
|
||||
return new TombHex(this);
|
||||
}
|
||||
}
|
104
Mage.Sets/src/mage/sets/worldwake/VastwoodAnimist.java
Normal file
104
Mage.Sets/src/mage/sets/worldwake/VastwoodAnimist.java
Normal file
|
@ -0,0 +1,104 @@
|
|||
/*
|
||||
* 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.worldwake;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.continious.BecomesCreatureTargetEffect;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public class VastwoodAnimist extends CardImpl<VastwoodAnimist> {
|
||||
|
||||
private final static FilterControlledPermanent filter = new FilterControlledLandPermanent();
|
||||
|
||||
public VastwoodAnimist(UUID ownerId) {
|
||||
super(ownerId, 116, "Vastwood Animist", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{G}");
|
||||
this.expansionSetCode = "WWK";
|
||||
this.subtype.add("Elf");
|
||||
this.subtype.add("Shaman");
|
||||
this.subtype.add("Ally");
|
||||
|
||||
this.color.setGreen(true);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// {tap}: Target land you control becomes an X/X Elemental creature until end of turn, where X is the number of Allies you control. It's still a land.
|
||||
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BecomesCreatureTargetEffect(new ElementalLandToken(), "land", Constants.Duration.EndOfTurn), new TapSourceCost());
|
||||
ability.addTarget(new TargetControlledPermanent(filter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public VastwoodAnimist(final VastwoodAnimist card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VastwoodAnimist copy() {
|
||||
return new VastwoodAnimist(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ElementalLandToken extends Token {
|
||||
|
||||
final static FilterControlledPermanent filterAllies = new FilterControlledPermanent("allies you control");
|
||||
|
||||
static {
|
||||
filterAllies.add(new SubtypePredicate("Ally"));
|
||||
}
|
||||
|
||||
ElementalLandToken() {
|
||||
super("", "X/X Elemental creature, where X is the number of Allies you control");
|
||||
cardType.add(CardType.CREATURE);
|
||||
subtype.add("Elemental");
|
||||
power = new MageInt(0);
|
||||
toughness = new MageInt(0);
|
||||
DynamicValue controlledAllies = new PermanentsOnBattlefieldCount(filterAllies);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(controlledAllies, controlledAllies, Duration.WhileOnBattlefield)));
|
||||
}
|
||||
}
|
|
@ -133,10 +133,10 @@ public class BecomesCreatureTargetEffect extends ContinuousEffectImpl<BecomesCre
|
|||
@Override
|
||||
public String getText(Mode mode) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(duration.toString());
|
||||
sb.append(" target ").append(mode.getTargets().get(0).getTargetName()).append(" becomes a ").append(token.getDescription());
|
||||
sb.append("Target ").append(mode.getTargets().get(0).getTargetName()).append(" becomes a ").append(token.getDescription());
|
||||
sb.append(" ").append(duration.toString());
|
||||
if (type != null && type.length() > 0)
|
||||
sb.append(" that's still a ").append(type);
|
||||
sb.append(". It's still a ").append(type);
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue