mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
* Fixed that testing framework does not support snow mana payment (fixes #3751).
This commit is contained in:
parent
ffd0c24c9c
commit
ea3d00a430
2 changed files with 16 additions and 9 deletions
|
@ -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
|
// then pay hybrid
|
||||||
for (ActivatedManaAbilityImpl manaAbility : mageObject.getAbilities().getAvailableActivatedManaAbilities(Zone.BATTLEFIELD, game)) {
|
for (ActivatedManaAbilityImpl manaAbility : mageObject.getAbilities().getAvailableActivatedManaAbilities(Zone.BATTLEFIELD, game)) {
|
||||||
if (cost instanceof HybridManaCost) {
|
if (cost instanceof HybridManaCost) {
|
||||||
|
|
|
@ -3,28 +3,25 @@ package org.mage.test.cards.single;
|
||||||
import mage.constants.PhaseStep;
|
import mage.constants.PhaseStep;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import org.junit.Ignore;
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author JRHerlehy
|
* @author JRHerlehy Created on 7/27/17.
|
||||||
* Created on 7/27/17.
|
|
||||||
*/
|
*/
|
||||||
public class RimescaleDragonTest extends CardTestPlayerBase {
|
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 dragon = "Rimescale Dragon";
|
||||||
private final String snowMountain = "Snow-Covered Mountain";
|
private final String snowMountain = "Snow-Covered Mountain";
|
||||||
|
|
||||||
private final String thopter = "Ornithopter";
|
private final String thopter = "Ornithopter";
|
||||||
private final String terror = "Terror";
|
private final String terror = "Terror";
|
||||||
|
|
||||||
private final String ability = "{2}{S}: Tap target";
|
private final String ability = "{2}{S}: Tap target";
|
||||||
|
|
||||||
//TODO: Remove ignore flags once snow mana payment is implemented for testing framework.
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Ignore
|
|
||||||
public void testActivatedAbility() {
|
public void testActivatedAbility() {
|
||||||
this.setupTest();
|
this.setupTest();
|
||||||
|
|
||||||
|
@ -36,7 +33,6 @@ public class RimescaleDragonTest extends CardTestPlayerBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Ignore
|
|
||||||
public void testStaticAbility() {
|
public void testStaticAbility() {
|
||||||
this.setupTest();
|
this.setupTest();
|
||||||
|
|
||||||
|
@ -48,7 +44,6 @@ public class RimescaleDragonTest extends CardTestPlayerBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Ignore
|
|
||||||
public void testStaticAbilityEnded() {
|
public void testStaticAbilityEnded() {
|
||||||
this.setupTest();
|
this.setupTest();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue