- Improved some of the CanPlayAI cost evaluations of the bounce, fetch and draw abilities.

This commit is contained in:
jendave
2011-08-06 10:32:07 +00:00
parent bae26a95bf
commit 33ca7ef739
3 changed files with 9 additions and 4 deletions

View File

@@ -143,7 +143,10 @@ public class AbilityFactory_Bounce {
if (abCost.getSacCost()){
return false;
}
if (abCost.getLifeCost()) return false;
if (abCost.getLifeCost()){
if (AllZone.ComputerPlayer.getLife() - abCost.getLifeAmount() < 4)
return false;
}
if (abCost.getDiscardCost()) return false;
if (abCost.getSubCounter()){

View File

@@ -191,7 +191,7 @@ public class AbilityFactory_Fetch {
// Sac is ok in general, but should add some decision making based off SacType and Fetch Type
}
if (abCost.getLifeCost()){
if (AllZone.ComputerPlayer.getLife() < 5)
if (AllZone.ComputerPlayer.getLife() - abCost.getLifeAmount() < 4)
return false;
}
if (abCost.getDiscardCost()) return false;

View File

@@ -87,12 +87,14 @@ public class AbilityFactory_ZoneAffecting {
return false;
}
if (abCost.getLifeCost()){
if (AllZone.ComputerPlayer.getLife() < 5)
if (AllZone.ComputerPlayer.getLife() - abCost.getLifeAmount() < 4)
return false;
}
if (abCost.getDiscardCost()) return false;
if (abCost.getSubCounter()) return false;
if (abCost.getSubCounter()) {
if (abCost.getCounterType().equals(Counters.P1P1)) return false; // Other counters should be used
}
}