* Eldrazi Temple - Fixed that the first ability was automatically used for spells (fixes #908) .

This commit is contained in:
LevelX2 2015-05-24 18:56:34 +02:00
parent 454df4505c
commit c3447ccff0
5 changed files with 26 additions and 27 deletions

View file

@ -35,7 +35,8 @@ import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
/**
*
* This test checks if the calculated possible mana options are correct related to the given mana sources available.
*
* @author LevelX2
*/
public class ManaOptionsTest extends CardTestPlayerBase {

View file

@ -46,6 +46,8 @@ public class ManaUtilTest extends CardTestPlayerBase {
testManaToPayVsLand("{1}{R}", "Cavern of Souls", 2, 2); // can't auto choose to pay
testManaToPayVsLand("{2}", "Cavern of Souls", 2, 2); // can't auto choose to pay
testManaToPayVsLand("{2}", "Eldrazi Temple", 2, 2); // can't auto choose to pay
// hybrid mana
testManaToPayVsLand("{W/R}{W/R}{W/R}", "Sacred Foundry", 2, 1); // auto choose for hybrid mana: choose any
testManaToPayVsLand("{R}{W/R}", "Sacred Foundry", 2, RedManaAbility.class); // auto choose for hybrid mana: we should choose {R}
@ -122,7 +124,7 @@ public class ManaUtilTest extends CardTestPlayerBase {
* @return
*/
private HashMap<UUID, ManaAbility> getManaAbilities(Card card) {
HashMap<UUID, ManaAbility> useableAbilities = new LinkedHashMap<UUID, ManaAbility>();
HashMap<UUID, ManaAbility> useableAbilities = new LinkedHashMap<>();
for (Ability ability: card.getAbilities()) {
if (ability instanceof ManaAbility) {
ability.newId(); // we need to assign id manually as we are not in game