mirror of
https://github.com/correl/mage.git
synced 2025-03-13 01:09:53 -09:00
bug fixes for ConfrontTheUnknown, RelenlessDead. Card implementation HarvestHand and nightside fix for it
This commit is contained in:
parent
5400d312c2
commit
5b96b6ccb1
4 changed files with 117 additions and 4 deletions
Mage.Sets/src/mage/sets/shadowsoverinnistrad
|
@ -60,7 +60,7 @@ public class ConfrontTheUnknown extends CardImpl {
|
||||||
Effect effect = new InvestigateEffect();
|
Effect effect = new InvestigateEffect();
|
||||||
effect.setText("Investigate");
|
effect.setText("Investigate");
|
||||||
getSpellAbility().addEffect(effect);
|
getSpellAbility().addEffect(effect);
|
||||||
effect = new BoostTargetEffect(new PermanentsOnBattlefieldCount(filter), new PermanentsOnBattlefieldCount(filter), Duration.EndOfTurn);
|
effect = new BoostTargetEffect(new PermanentsOnBattlefieldCount(filter), new PermanentsOnBattlefieldCount(filter), Duration.EndOfTurn, true);
|
||||||
effect.setText(", then target creature gets +1/+1 until end of turn for each Clue you control. <i>(To investigate, "
|
effect.setText(", then target creature gets +1/+1 until end of turn for each Clue you control. <i>(To investigate, "
|
||||||
+ "put a colorless Clue artifact token onto the battlefield with \"{2}, Sacrifice this artifact: Draw a card.\")</i>");
|
+ "put a colorless Clue artifact token onto the battlefield with \"{2}, Sacrifice this artifact: Draw a card.\")</i>");
|
||||||
getSpellAbility().addEffect(effect);
|
getSpellAbility().addEffect(effect);
|
||||||
|
|
108
Mage.Sets/src/mage/sets/shadowsoverinnistrad/HarvestHand.java
Normal file
108
Mage.Sets/src/mage/sets/shadowsoverinnistrad/HarvestHand.java
Normal file
|
@ -0,0 +1,108 @@
|
||||||
|
/*
|
||||||
|
* 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.shadowsoverinnistrad;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.DiesTriggeredAbility;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.keyword.TransformAbility;
|
||||||
|
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.players.Player;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author halljared
|
||||||
|
*/
|
||||||
|
public class HarvestHand extends CardImpl {
|
||||||
|
|
||||||
|
public HarvestHand(UUID ownerId) {
|
||||||
|
super(ownerId, 256, "Harvest Hand", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}");
|
||||||
|
this.expansionSetCode = "SOI";
|
||||||
|
this.subtype.add("Scarecrow");
|
||||||
|
this.power = new MageInt(2);
|
||||||
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
|
this.canTransform = true;
|
||||||
|
this.secondSideCard = new ScroungedScythe(ownerId);
|
||||||
|
|
||||||
|
// When Harvest Hand dies, return it to the battlefield transformed under your control.
|
||||||
|
this.addAbility(new TransformAbility());
|
||||||
|
this.addAbility(new DiesTriggeredAbility(new HarvestHandReturnTransformedEffect()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public HarvestHand(final HarvestHand card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HarvestHand copy() {
|
||||||
|
return new HarvestHand(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class HarvestHandReturnTransformedEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
public HarvestHandReturnTransformedEffect() {
|
||||||
|
super(Outcome.PutCardInPlay);
|
||||||
|
this.staticText = "Return {this} to the battlefield transformed under your control";
|
||||||
|
}
|
||||||
|
|
||||||
|
public HarvestHandReturnTransformedEffect(final HarvestHandReturnTransformedEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HarvestHandReturnTransformedEffect copy() {
|
||||||
|
return new HarvestHandReturnTransformedEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
|
if (controller != null) {
|
||||||
|
if (game.getState().getZone(source.getSourceId()).equals(Zone.GRAVEYARD)) {
|
||||||
|
game.getState().setValue(TransformAbility.VALUE_KEY_ENTER_TRANSFORMED + source.getSourceId(), Boolean.TRUE);
|
||||||
|
Card card = game.getCard(source.getSourceId());
|
||||||
|
if (card != null) {
|
||||||
|
controller.moveCards(card, Zone.BATTLEFIELD, source, game);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -46,6 +46,7 @@ import mage.constants.Rarity;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.Filter;
|
import mage.filter.Filter;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
|
import mage.filter.predicate.mageobject.AnotherCardPredicate;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
||||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
|
@ -105,13 +106,14 @@ class RelentlessDeadEffect extends OneShotEffect {
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
if (controller != null) {
|
if (controller != null) {
|
||||||
if (controller.chooseUse(Outcome.BoostCreature, "Do you want to to pay {X}?", source, game)) {
|
if (controller.chooseUse(Outcome.BoostCreature, "Do you want to pay {X}?", source, game)) {
|
||||||
int costX = controller.announceXMana(0, Integer.MAX_VALUE, "Announce the value for {X}", game, source);
|
int costX = controller.announceXMana(0, Integer.MAX_VALUE, "Announce the value for {X}", game, source);
|
||||||
Cost cost = new GenericManaCost(costX);
|
Cost cost = new GenericManaCost(costX);
|
||||||
if (cost.pay(source, game, source.getSourceId(), source.getControllerId(), false, null)) {
|
if (cost.pay(source, game, source.getSourceId(), source.getControllerId(), false, null)) {
|
||||||
FilterCard filter = new FilterCard("Zombie card with converted mana cost " + costX);
|
FilterCard filter = new FilterCard("Another target Zombie card with converted mana cost " + costX);
|
||||||
filter.add(new SubtypePredicate("Zombie"));
|
filter.add(new SubtypePredicate("Zombie"));
|
||||||
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, costX));
|
filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, costX));
|
||||||
|
filter.add(new AnotherCardPredicate());
|
||||||
TargetCardInYourGraveyard target = new TargetCardInYourGraveyard(filter);
|
TargetCardInYourGraveyard target = new TargetCardInYourGraveyard(filter);
|
||||||
if (controller.chooseTarget(outcome, target, source, game)) {
|
if (controller.chooseTarget(outcome, target, source, game)) {
|
||||||
Card card = game.getCard(target.getFirstTarget());
|
Card card = game.getCard(target.getFirstTarget());
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -56,6 +57,8 @@ public class ScroungedScythe extends CardImpl {
|
||||||
this.expansionSetCode = "SOI";
|
this.expansionSetCode = "SOI";
|
||||||
this.subtype.add("Equipment");
|
this.subtype.add("Equipment");
|
||||||
|
|
||||||
|
this.nightCard = true;
|
||||||
|
|
||||||
// Equipped creature gets +1/+1.
|
// Equipped creature gets +1/+1.
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 1)));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 1)));
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue