mirror of
https://github.com/correl/mage.git
synced 2025-03-30 17:00:10 -09:00
* Fixed Batwing Brume, CankerousThirst, Invert the Skies, Moonhold, Unnerving Assault, Tin Street Hooligan, Dawnglow Infusion, Firespout where the condition if a special kind of mana was paid was always false.
This commit is contained in:
parent
20b12a1aa9
commit
813841eccd
9 changed files with 96 additions and 1 deletions
Mage.Sets/src/mage/sets
eventide
guildpact
shadowmoor
Mage.Tests/src/test/java/org/mage/test/cards/conditional
|
@ -45,6 +45,7 @@ import mage.constants.Rarity;
|
|||
import mage.filter.common.FilterAttackingCreature;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.watchers.common.ManaSpentToCastWatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -69,6 +70,7 @@ public class BatwingBrume extends CardImpl {
|
|||
new BatwingBrumeEffect(),
|
||||
new ManaWasSpentCondition(ColoredManaSymbol.B), "Each player loses 1 life for each attacking creature he or she controls if {B} was spent to cast {this}"));
|
||||
this.addInfo("Info1", "<i>(Do both if {W}{B} was spent.)<i>");
|
||||
this.addWatcher(new ManaSpentToCastWatcher());
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -39,6 +39,7 @@ import mage.constants.Duration;
|
|||
import mage.constants.ManaType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.watchers.common.ManaSpentToCastWatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -65,6 +66,7 @@ public class CankerousThirst extends CardImpl {
|
|||
"If {G} was spent to cast {this}, you may have target creature get +3/+3 until end of turn"));
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
this.addInfo("Info1", "<i>(Do both if {B}{G} was spent.)<i>");
|
||||
this.addWatcher(new ManaSpentToCastWatcher());
|
||||
}
|
||||
|
||||
public CankerousThirst(final CankerousThirst card) {
|
||||
|
|
|
@ -47,6 +47,7 @@ import mage.constants.SubLayer;
|
|||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.watchers.common.ManaSpentToCastWatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -72,6 +73,7 @@ public class InvertTheSkies extends CardImpl {
|
|||
new LockedInCondition(new ManaWasSpentCondition(ColoredManaSymbol.U)),
|
||||
"and creatures you control gain flying until end of turn if {U} was spent to cast it"));
|
||||
this.addInfo("Info1", "<i>(Do both if {G}{U} was spent.)<i>");
|
||||
this.addWatcher(new ManaSpentToCastWatcher());
|
||||
}
|
||||
|
||||
public InvertTheSkies(final InvertTheSkies card) {
|
||||
|
|
|
@ -45,6 +45,7 @@ import mage.constants.Rarity;
|
|||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.target.TargetPlayer;
|
||||
import mage.watchers.common.ManaSpentToCastWatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -72,6 +73,7 @@ public class Moonhold extends CardImpl {
|
|||
new LockedInCondition(new ManaWasSpentCondition(ColoredManaSymbol.W))));
|
||||
this.getSpellAbility().addTarget(new TargetPlayer());
|
||||
this.addInfo("Info1", "<i>(Do both if {R}{W} was spent.)</i>");
|
||||
this.addWatcher(new ManaSpentToCastWatcher());
|
||||
}
|
||||
|
||||
public Moonhold(final Moonhold card) {
|
||||
|
|
|
@ -40,6 +40,7 @@ import mage.constants.Rarity;
|
|||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.watchers.common.ManaSpentToCastWatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -71,6 +72,7 @@ public class UnnervingAssault extends CardImpl {
|
|||
new BoostAllEffect(1, 0, Duration.EndOfTurn, filter2, false),
|
||||
new ManaWasSpentCondition(ColoredManaSymbol.R), " and creatures you control get +1/0 until end of turn if {R} was spent to cast it"));
|
||||
this.addInfo("Info1", "<i>(Do both if {U}{R} was spent.)</i>");
|
||||
this.addWatcher(new ManaSpentToCastWatcher());
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -39,6 +39,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.ColoredManaSymbol;
|
||||
import mage.constants.Rarity;
|
||||
import mage.target.common.TargetArtifactPermanent;
|
||||
import mage.watchers.common.ManaSpentToCastWatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -59,8 +60,9 @@ public class TinStreetHooligan extends CardImpl {
|
|||
// When Tin Street Hooligan enters the battlefield, if {G} was spent to cast Tin Street Hooligan, destroy target artifact.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new ConditionalOneShotEffect(new DestroyTargetEffect(), new ManaWasSpentCondition(ColoredManaSymbol.G),
|
||||
"if {G} was spent to cast {this}, destroy target artifact"), false);
|
||||
ability.addTarget(new TargetArtifactPermanent());
|
||||
ability.addTarget(new TargetArtifactPermanent());
|
||||
this.addAbility(ability);
|
||||
this.addWatcher(new ManaSpentToCastWatcher());
|
||||
}
|
||||
|
||||
public TinStreetHooligan(final TinStreetHooligan card) {
|
||||
|
|
|
@ -39,6 +39,7 @@ import mage.abilities.effects.common.GainLifeEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.constants.ColoredManaSymbol;
|
||||
import mage.constants.ManaType;
|
||||
import mage.watchers.common.ManaSpentToCastWatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -62,6 +63,7 @@ public class DawnglowInfusion extends CardImpl {
|
|||
new GainLifeEffect(xValue),
|
||||
new ManaWasSpentCondition(ColoredManaSymbol.W), " And X life if {W} was spent to cast it"));
|
||||
this.addInfo("Info1", "<i>(Do both if {G}{W} was spent.)</i>");
|
||||
this.addWatcher(new ManaSpentToCastWatcher());
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -39,6 +39,7 @@ import mage.constants.Rarity;
|
|||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||
import mage.watchers.common.ManaSpentToCastWatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -68,6 +69,7 @@ public class Firespout extends CardImpl {
|
|||
new DamageAllEffect(3, filter2),
|
||||
new ManaWasSpentCondition(ColoredManaSymbol.G), " And 3 damage to each creature with flying if {G} was spent to cast it"));
|
||||
this.addInfo("Info1", "<i>(Do both if {R}{G} was spent.)</i>");
|
||||
this.addWatcher(new ManaSpentToCastWatcher());
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,79 @@
|
|||
/*
|
||||
* 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 org.mage.test.cards.conditional;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
|
||||
public class ManaWasSpentToCastTest extends CardTestPlayerBase {
|
||||
|
||||
@Test
|
||||
public void testArtifactWillBeDestroyed() {
|
||||
// Tin Street Hooligan - Creature 2/1 {1}{R}
|
||||
// When Tin Street Hooligan enters the battlefield, if {G} was spent to cast Tin Street Hooligan, destroy target artifact.
|
||||
addCard(Zone.HAND, playerA, "Tin Street Hooligan");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Abzan Banner");
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Tin Street Hooligan");
|
||||
addTarget(playerA, "Abzan Banner");
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Tin Street Hooligan", 1);
|
||||
assertPermanentCount(playerB, "Abzan Banner", 0);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testArtifactWontBeDestroyed() {
|
||||
// Tin Street Hooligan - Creature 2/1 {1}{R}
|
||||
// When Tin Street Hooligan enters the battlefield, if {G} was spent to cast Tin Street Hooligan, destroy target artifact.
|
||||
addCard(Zone.HAND, playerA, "Tin Street Hooligan");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 2);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Abzan Banner");
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Tin Street Hooligan");
|
||||
addTarget(playerA, "Abzan Banner");
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Tin Street Hooligan", 1);
|
||||
assertPermanentCount(playerB, "Abzan Banner", 1);
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Reference in a new issue