* Fixed that testing framework does not support snow mana payment (fixes #3751).

This commit is contained in:
LevelX2 2017-07-28 12:47:00 +02:00
parent ffd0c24c9c
commit ea3d00a430
2 changed files with 16 additions and 9 deletions

View file

@ -1122,6 +1122,18 @@ public class ComputerPlayer extends PlayerImpl implements Player {
}
}
}
// pay snow covered mana
for (ActivatedManaAbilityImpl manaAbility : mageObject.getAbilities().getAvailableActivatedManaAbilities(Zone.BATTLEFIELD, game)) {
if (cost instanceof SnowManaCost) {
for (Mana netMana : manaAbility.getNetMana(game)) {
if (cost.testPay(netMana) || spendAnyMana) {
if (activateAbility(manaAbility, game)) {
return true;
}
}
}
}
}
// then pay hybrid
for (ActivatedManaAbilityImpl manaAbility : mageObject.getAbilities().getAvailableActivatedManaAbilities(Zone.BATTLEFIELD, game)) {
if (cost instanceof HybridManaCost) {

View file

@ -3,28 +3,25 @@ package org.mage.test.cards.single;
import mage.constants.PhaseStep;
import mage.constants.Zone;
import mage.counters.CounterType;
import org.junit.Ignore;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
/**
* @author JRHerlehy
* Created on 7/27/17.
* @author JRHerlehy Created on 7/27/17.
*/
public class RimescaleDragonTest extends CardTestPlayerBase {
// Flying
// {2}{S}: Tap target creature and put an ice counter on it.
// Creatures with ice counters on them don't untap during their controllers' untap steps.
private final String dragon = "Rimescale Dragon";
private final String snowMountain = "Snow-Covered Mountain";
private final String thopter = "Ornithopter";
private final String terror = "Terror";
private final String ability = "{2}{S}: Tap target";
//TODO: Remove ignore flags once snow mana payment is implemented for testing framework.
@Test
@Ignore
public void testActivatedAbility() {
this.setupTest();
@ -36,7 +33,6 @@ public class RimescaleDragonTest extends CardTestPlayerBase {
}
@Test
@Ignore
public void testStaticAbility() {
this.setupTest();
@ -48,7 +44,6 @@ public class RimescaleDragonTest extends CardTestPlayerBase {
}
@Test
@Ignore
public void testStaticAbilityEnded() {
this.setupTest();