[TPR] Added Wood Sage, Vhat-Il Dal and Soltari Guerillas.

This commit is contained in:
LevelX2 2015-04-02 08:35:54 +02:00
parent 34b1632f02
commit 2d274ec39a
15 changed files with 681 additions and 13 deletions

View file

@ -1,4 +1,5 @@
woogerworks (North America/USA) :xmage.woogerworks.com:17171
Xmage.de 1 (Europe/Germany) :xmage.de:17171
XMage.info 1 (Europe/France) :176.31.186.181:17171
XMage.info 2 (Europe/France) :176.31.186.181:17000
IceMage (Europe/Netherlands) :ring0.cc:17171

View file

@ -0,0 +1,54 @@
/*
* 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;
import mage.constants.Rarity;
/**
*
* @author LevelX2
*/
public class WoodSage extends mage.sets.tempest.WoodSage {
public WoodSage(UUID ownerId) {
super(ownerId);
this.cardNumber = 195;
this.expansionSetCode = "CNS";
this.rarity = Rarity.UNCOMMON;
}
public WoodSage(final WoodSage card) {
super(card);
}
@Override
public WoodSage copy() {
return new WoodSage(this);
}
}

View file

@ -54,9 +54,6 @@ public class RevivingVapors extends CardImpl {
super(ownerId, 265, "Reviving Vapors", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{W}{U}");
this.expansionSetCode = "INV";
this.color.setBlue(true);
this.color.setWhite(true);
// Reveal the top three cards of your library and put one of them into your hand. You gain life equal to that card's converted mana cost. Put all other cards revealed this way into your graveyard.
this.getSpellAbility().addEffect(new RevivingVaporsEffect());
}

View file

@ -137,7 +137,7 @@ class ShamanEnKorReplacementEffect extends ReplacementEffectImpl {
ShamanEnKorReplacementEffect() {
super(Duration.EndOfTurn, Outcome.RedirectDamage);
staticText = "The next time a source of your choice would deal damage to target creature this turn, that damage is dealt to {this} instead.";
staticText = "The next time a source of your choice would deal damage to target creature this turn, that damage is dealt to {this} instead";
}
ShamanEnKorReplacementEffect(final ShamanEnKorReplacementEffect effect) {

View file

@ -0,0 +1,132 @@
/*
* 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.tempest;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.PreventionEffectData;
import mage.abilities.effects.PreventionEffectImpl;
import mage.abilities.keyword.ShadowAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.events.DamageEvent;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author LevelX2
*/
public class SoltariGuerrillas extends CardImpl {
public SoltariGuerrillas(UUID ownerId) {
super(ownerId, 347, "Soltari Guerrillas", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{R}{W}");
this.expansionSetCode = "TMP";
this.subtype.add("Soltari");
this.subtype.add("Soldier");
this.power = new MageInt(3);
this.toughness = new MageInt(2);
// Shadow
this.addAbility(ShadowAbility.getInstance());
// {0}: The next time Soltari Guerrillas would deal combat damage to an opponent this turn, it deals that damage to target creature instead.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SoltariGuerrillasReplacementEffect(), new GenericManaCost(0));
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
}
public SoltariGuerrillas(final SoltariGuerrillas card) {
super(card);
}
@Override
public SoltariGuerrillas copy() {
return new SoltariGuerrillas(this);
}
}
class SoltariGuerrillasReplacementEffect extends PreventionEffectImpl {
SoltariGuerrillasReplacementEffect() {
super(Duration.EndOfTurn, Integer.MAX_VALUE, true, false);
staticText = "The next time {this} would deal combat damage to an opponent this turn, it deals that damage to target creature instead";
}
SoltariGuerrillasReplacementEffect(final SoltariGuerrillasReplacementEffect effect) {
super(effect);
}
@Override
public boolean checksEventType(GameEvent event, Game game) {
return event.getType().equals(GameEvent.EventType.DAMAGED_PLAYER);
}
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
if (event.getSourceId().equals(source.getSourceId())) {
Player controller = game.getPlayer(source.getControllerId());
return controller.hasOpponent(event.getTargetId(), game);
}
return false;
}
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
PreventionEffectData preventionResult = preventDamageAction(event, source, game);
if (preventionResult.getPreventedDamage() > 0) {
Permanent redirectTo = game.getPermanent(getTargetPointer().getFirst(game, source));
if (redirectTo != null) {
game.informPlayers("Dealing " + preventionResult.getPreventedDamage() + " to " + redirectTo.getLogName() + " instead.");
DamageEvent damageEvent = (DamageEvent) event;
redirectTo.damage(preventionResult.getPreventedDamage(), event.getSourceId(), game, damageEvent.isCombatDamage(), damageEvent.isPreventable(), event.getAppliedEffects());
}
discard(); // (only once)
}
return false;
}
@Override
public boolean apply(Game game, Ability source) {
return true;
}
@Override
public SoltariGuerrillasReplacementEffect copy() {
return new SoltariGuerrillasReplacementEffect(this);
}
}

View file

@ -0,0 +1,114 @@
/*
* 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.tempest;
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.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.StaticValue;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.continuous.SetPowerToughnessTargetEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.game.Game;
import mage.players.Player;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author LevelX2
*/
public class VhatiIlDal extends CardImpl {
public VhatiIlDal(UUID ownerId) {
super(ownerId, 349, "Vhati il-Dal", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{B}{G}");
this.expansionSetCode = "TMP";
this.supertype.add("Legendary");
this.subtype.add("Human");
this.subtype.add("Warrior");
this.power = new MageInt(3);
this.toughness = new MageInt(3);
// {tap}: Until end of turn, target creature has base power 1 or base toughness 1.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new VhatiIlDalEffect(), new TapSourceCost());
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
}
public VhatiIlDal(final VhatiIlDal card) {
super(card);
}
@Override
public VhatiIlDal copy() {
return new VhatiIlDal(this);
}
}
class VhatiIlDalEffect extends OneShotEffect {
public VhatiIlDalEffect() {
super(Outcome.BoostCreature);
this.staticText = "Until end of turn, target creature has base power 1 or base toughness 1";
}
public VhatiIlDalEffect(final VhatiIlDalEffect effect) {
super(effect);
}
@Override
public VhatiIlDalEffect copy() {
return new VhatiIlDalEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
DynamicValue power = null;
DynamicValue toughness = null;
if (controller.chooseUse(outcome, "Set power? (otherwise toughness is set)", game)) {
power = new StaticValue(1);
} else {
toughness = new StaticValue(1);
}
ContinuousEffect effect = new SetPowerToughnessTargetEffect(power, toughness, Duration.EndOfTurn);
game.addEffect(effect, source);
return true;
}
return false;
}
}

View file

@ -0,0 +1,133 @@
/*
* 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.tempest;
import java.util.UUID;
import mage.MageInt;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.Cards;
import mage.cards.CardsImpl;
import mage.cards.repository.CardRepository;
import mage.choices.Choice;
import mage.choices.ChoiceImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.game.Game;
import mage.players.Player;
/**
*
* @author LevelX2
*/
public class WoodSage extends CardImpl {
public WoodSage(UUID ownerId) {
super(ownerId, 350, "Wood Sage", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{G}{U}");
this.expansionSetCode = "TMP";
this.subtype.add("Human");
this.subtype.add("Druid");
this.power = new MageInt(1);
this.toughness = new MageInt(1);
// {tap}: Name a creature card. Reveal the top four cards of your library and put all of them with that name into your hand. Put the rest into your graveyard.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new WoodSageEffect(), new TapSourceCost()));
}
public WoodSage(final WoodSage card) {
super(card);
}
@Override
public WoodSage copy() {
return new WoodSage(this);
}
}
class WoodSageEffect extends OneShotEffect {
public WoodSageEffect() {
super(Outcome.DrawCard);
this.staticText = "Name a creature card. Reveal the top four cards of your library and put all of them with that name into your hand. Put the rest into your graveyard";
}
public WoodSageEffect(final WoodSageEffect effect) {
super(effect);
}
@Override
public WoodSageEffect copy() {
return new WoodSageEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
MageObject sourceObject = game.getObject(source.getSourceId());
if (controller != null && sourceObject != null) {
Choice cardChoice = new ChoiceImpl();
cardChoice.setChoices(CardRepository.instance.getCreatureNames());
cardChoice.setMessage("Name a creature card");
while (!controller.choose(Outcome.Detriment, cardChoice, game)) {
if (!controller.isInGame()) {
return false;
}
}
String cardName = cardChoice.getChoice();
if (!game.isSimulation()) {
game.informPlayers(sourceObject.getLogName() + ", named card: [" + cardName + "]");
}
Cards cards = new CardsImpl();
cards.addAll(controller.getLibrary().getTopCards(game, 4));
if (!cards.isEmpty()) {
controller.revealCards(sourceObject.getLogName(), cards, game);
for (Card card: cards.getCards(game)) {
if (card.getName().equals(cardName)) {
controller.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY, true);
cards.remove(card);
}
}
controller.moveCardsToGraveyardWithInfo(cards, source, game, Zone.LIBRARY);
}
return true;
}
return false;
}
}

View 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.tempestremastered;
import java.util.UUID;
/**
*
* @author LevelX2
*/
public class SoltariGuerrillas extends mage.sets.tempest.SoltariGuerrillas {
public SoltariGuerrillas(UUID ownerId) {
super(ownerId);
this.cardNumber = 212;
this.expansionSetCode = "TPR";
}
public SoltariGuerrillas(final SoltariGuerrillas card) {
super(card);
}
@Override
public SoltariGuerrillas copy() {
return new SoltariGuerrillas(this);
}
}

View 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.tempestremastered;
import java.util.UUID;
/**
*
* @author LevelX2
*/
public class VhatiIlDal extends mage.sets.tempest.VhatiIlDal {
public VhatiIlDal(UUID ownerId) {
super(ownerId);
this.cardNumber = 214;
this.expansionSetCode = "TPR";
}
public VhatiIlDal(final VhatiIlDal card) {
super(card);
}
@Override
public VhatiIlDal copy() {
return new VhatiIlDal(this);
}
}

View 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.tempestremastered;
import java.util.UUID;
/**
*
* @author LevelX2
*/
public class WoodSage extends mage.sets.tempest.WoodSage {
public WoodSage(UUID ownerId) {
super(ownerId);
this.cardNumber = 216;
this.expansionSetCode = "TPR";
}
public WoodSage(final WoodSage card) {
super(card);
}
@Override
public WoodSage copy() {
return new WoodSage(this);
}
}

View file

@ -0,0 +1,54 @@
/*
* 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.timeshifted;
import java.util.UUID;
import mage.constants.Rarity;
/**
*
* @author LevelX2
*/
public class VhatiIlDal extends mage.sets.tempest.VhatiIlDal {
public VhatiIlDal(UUID ownerId) {
super(ownerId);
this.cardNumber = 104;
this.expansionSetCode = "TSB";
this.rarity = Rarity.SPECIAL;
}
public VhatiIlDal(final VhatiIlDal card) {
super(card);
}
@Override
public VhatiIlDal copy() {
return new VhatiIlDal(this);
}
}

View file

@ -50,7 +50,8 @@ public class NameACardEffect extends OneShotEffect {
public enum TypeOfName {
ALL,
NON_LAND_NAME,
NON_LAND_AND_NON_CREATURE_NAME
NON_LAND_AND_NON_CREATURE_NAME,
CREATURE_NAME
}
private final TypeOfName typeOfName;
@ -85,6 +86,10 @@ public class NameACardEffect extends OneShotEffect {
cardChoice.setChoices(CardRepository.instance.getNonLandNames());
cardChoice.setMessage("Name a non land card");
break;
case CREATURE_NAME:
cardChoice.setChoices(CardRepository.instance.getCreatureNames());
cardChoice.setMessage("Name a creature card");
break;
}
cardChoice.clearChoice();
while (!controller.choose(Outcome.Detriment, cardChoice, game)) {
@ -93,8 +98,9 @@ public class NameACardEffect extends OneShotEffect {
}
}
String cardName = cardChoice.getChoice();
if (!game.isSimulation())
if (!game.isSimulation()) {
game.informPlayers(sourceObject.getLogName() + ", named card: [" + cardName + "]");
}
game.getState().setValue(source.getSourceId().toString() + INFO_KEY, cardName);
if (sourceObject instanceof Permanent) {
((Permanent)sourceObject).addInfo(INFO_KEY, CardUtil.addToolTipMarkTags("Named card: " + cardName), game);

View file

@ -77,8 +77,12 @@ public class SetPowerToughnessTargetEffect extends ContinuousEffectImpl {
for (UUID targetId: this.getTargetPointer().getTargets(game, source)) {
Permanent target = game.getPermanent(targetId);
if (target != null) {
target.getPower().setValue(power.calculate(game, source, this));
target.getToughness().setValue(toughness.calculate(game, source, this));
if (power != null) {
target.getPower().setValue(power.calculate(game, source, this));
}
if (toughness != null) {
target.getToughness().setValue(toughness.calculate(game, source, this));
}
result = true;
}
}

View file

@ -89,7 +89,7 @@ public class DynamicManaAbility extends ManaAbility {
public List<Mana> getNetMana(Game game) {
List<Mana> newNetMana = new ArrayList<>();
if (game != null) {
// TODO: effects from replacement effects like Mana Refelection are not considered yet
// TODO: effects from replacement effects like Mana Reflection are not considered yet
newNetMana.add(manaEffect.computeMana(true, game, this));
}
return newNetMana;

View file

@ -165,6 +165,27 @@ public enum CardRepository {
}
return names;
}
public Set<String> getCreatureNames() {
Set<String> names = new TreeSet<>();
try {
QueryBuilder<CardInfo, Object> qb = cardDao.queryBuilder();
qb.distinct().selectColumns("name");
qb.where().like("types", new SelectArg('%' + CardType.CREATURE.name() + '%'));
List<CardInfo> results = cardDao.query(qb.prepare());
for (CardInfo card : results) {
int result = card.getName().indexOf(" // ");
if (result > 0) {
names.add(card.getName().substring(0, result));
names.add(card.getName().substring(result+4));
} else {
names.add(card.getName());
}
}
} catch (SQLException ex) {
}
return names;
}
public Set<String> getNonLandAndNonCreatureNames() {
Set<String> names = new TreeSet<>();
@ -173,10 +194,6 @@ public enum CardRepository {
qb.distinct().selectColumns("name");
Where where = qb.where();
where.and(where.not().like("types", '%' + CardType.CREATURE.name() +'%'),where.not().like("types", '%' + CardType.LAND.name() + '%'));
// qb.where()
// .not().like("types", '%' + CardType.CREATURE.name() + '%')
// .and()
// .not().like("types", '%' + CardType.LAND.name() + '%');
List<CardInfo> results = cardDao.query(qb.prepare());
for (CardInfo card : results) {
int result = card.getName().indexOf(" // ");