mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
* Fixed the sometimes failing Spellskite Test.
This commit is contained in:
parent
497b977911
commit
7453d6a39e
2 changed files with 8 additions and 7 deletions
|
@ -116,8 +116,7 @@ class SpellskiteEffect extends OneShotEffect {
|
|||
// The source is still the spell on the stack
|
||||
target.addTarget(source.getSourceId(), stackObject.getStackAbility(), game);
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
for (Target target: targets) {
|
||||
for (UUID targetId: target.getTargets()) {
|
||||
|
@ -147,7 +146,7 @@ class SpellskiteEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
if (oldTarget != null) {
|
||||
game.informPlayers(new StringBuilder(sourceObject.getName()).append(": Changed target of ").append(stackObject.getName()).append(" from ").append(oldTarget.getName()).append(" to ").append(sourceObject.getName()).toString());
|
||||
game.informPlayers(sourceObject.getLogName() + ": Changed target of " +stackObject.getLogName() + " from " + oldTarget.getLogName() + " to " + sourceObject.getLogName());
|
||||
} else {
|
||||
if (twoTimesTarget) {
|
||||
game.informPlayers(sourceObject.getLogName() + ": Target not changed to " + sourceObject.getLogName() + " because its not valid to target it twice for " + stackObject.getName());
|
||||
|
|
|
@ -76,11 +76,12 @@ public class SpellskiteTest extends CardTestPlayerBase {
|
|||
*
|
||||
*/
|
||||
/**
|
||||
* TODO: This test fails sometimes when building the complete Tets Project -> Find reason
|
||||
* TODO: This test fails sometimes when building the complete Test Project -> Find the reason
|
||||
*/
|
||||
@Test
|
||||
public void testAfterChangeOfController() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1);
|
||||
// {T}: Add one mana of any color to your mana pool. Spend this mana only to cast a multicolored spell.
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Silvercoat Lion", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 3);
|
||||
// {2}, {tap}: Gain control of target creature with power less than or equal to the number of Islands you control for as long as Vedalken Shackles remains tapped.
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Vedalken Shackles", 1);
|
||||
|
@ -96,7 +97,7 @@ public class SpellskiteTest extends CardTestPlayerBase {
|
|||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2},{T}: Gain control", "Spellskite");
|
||||
|
||||
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Frost Titan");
|
||||
addTarget(playerB, "Mountain");
|
||||
addTarget(playerB, "Silvercoat Lion");
|
||||
|
||||
activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerA, "{UP}: Change a target", "stack ability (Whenever {this} enters ");
|
||||
|
||||
|
@ -107,7 +108,8 @@ public class SpellskiteTest extends CardTestPlayerBase {
|
|||
assertPermanentCount(playerB, "Frost Titan", 1);
|
||||
|
||||
assertTapped("Spellskite", true);
|
||||
assertTapped("Mountain", false);
|
||||
// (Battlefield) Tapped state is not equal (Silvercoat Lion) expected:<false> but was:<true>
|
||||
assertTapped("Silvercoat Lion", false);
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue