Fixed playXMana (no X=0, put everything to X). updated first scenario.

This commit is contained in:
magenoxx 2011-02-23 10:50:42 +03:00
parent 9bd5e95bda
commit 3a11c59486
2 changed files with 10 additions and 5 deletions

View file

@ -666,10 +666,15 @@ public class ComputerPlayer<T extends ComputerPlayer<T>> extends PlayerImpl<T> i
//put everything into X //put everything into X
for (Permanent perm: this.getAvailableManaProducers(game)) { for (Permanent perm: this.getAvailableManaProducers(game)) {
for (ManaAbility ability: perm.getAbilities().getManaAbilities(Zone.BATTLEFIELD)) { for (ManaAbility ability: perm.getAbilities().getManaAbilities(Zone.BATTLEFIELD)) {
if (activateAbility(ability, game)) activateAbility(ability, game);
return true;
} }
} }
// don't allow X=0
if (getManaPool().count() == 0) {
return false;
}
cost.setPaid(); cost.setPaid();
return true; return true;
} }

View file

@ -1,14 +1,14 @@
### ComputerA ### ### ComputerA ###
# Battlefield # Battlefield
battlefield:ComputerA:Island:1 battlefield:ComputerA:Mountain:1
#battlefield:ComputerA:Goblin Guide:1 #battlefield:ComputerA:Goblin Guide:1
# Hand # Hand
hand:ComputerA:Mountain:2 hand:ComputerA:Mountain:2
hand:ComputerA:Hellspark Elemental:5 hand:ComputerA:Lightning Bolt:5
# Library # Library
# from down to top # from down to top
library:ComputerA:clear:0 library:ComputerA:clear:0
library:ComputerA:Hellspark Elemental:10 library:ComputerA:Lightning Bolt:10
### ComputerB ### ### ComputerB ###
# Battlefield # Battlefield