- The AI is now taking damage already dealt into account when deciding to cast spDamageAll spells.

- Changed the targeting of players AI of spDamageTgt to what the comments say.
This commit is contained in:
jendave
2011-08-06 07:14:13 +00:00
parent b0b3af9611
commit 6c92cc0884

View File

@@ -1961,7 +1961,7 @@ public class CardFactory implements NewConstants {
if(hand.size() >= 7) // anti-discard-at-EOT if(hand.size() >= 7) // anti-discard-at-EOT
return true; return true;
if(AllZone.Human_Life.getLife() < (10 - damage)) // if damage from this spell would drop the human to less than 10 life if(AllZone.Human_Life.getLife() < (10 + damage)) // if damage from this spell would drop the human to less than 10 life
return true; return true;
return false; return false;
@@ -2202,7 +2202,11 @@ public class CardFactory implements NewConstants {
human = human.getValidCards(Tgts); human = human.getValidCards(Tgts);
human = human.canBeDamagedBy(card); human = human.canBeDamagedBy(card);
human = human.getNotKeyword("Indestructible"); human = human.getNotKeyword("Indestructible");
human = CardListUtil.filterToughness(human, ndam); // leaves all creatures that will be destroyed human = human.filter(new CardListFilter() {
public boolean addCard(Card c) {
return (c.getKillDamage() <= getNumDam());
}
}); // leaves all creatures that will be destroyed
int humanvalue = CardListUtil.sumCMC(human); int humanvalue = CardListUtil.sumCMC(human);
humanvalue += human.size(); humanvalue += human.size();
humanvalue += CardListUtil.sumAttack(human.getTokens()); humanvalue += CardListUtil.sumAttack(human.getTokens());
@@ -2213,7 +2217,11 @@ public class CardFactory implements NewConstants {
computer = computer.getValidCards(Tgts); computer = computer.getValidCards(Tgts);
computer = computer.canBeDamagedBy(card); computer = computer.canBeDamagedBy(card);
computer = computer.getNotKeyword("Indestructible"); computer = computer.getNotKeyword("Indestructible");
computer = CardListUtil.filterToughness(computer, ndam); // leaves all creatures that will be destroyed computer = computer.filter(new CardListFilter() {
public boolean addCard(Card c) {
return (c.getKillDamage() <= getNumDam());
}
}); // leaves all creatures that will be destroyed
int computervalue = CardListUtil.sumCMC(computer); int computervalue = CardListUtil.sumCMC(computer);
computervalue += computer.size(); computervalue += computer.size();
computervalue += CardListUtil.sumAttack(computer.getTokens()); computervalue += CardListUtil.sumAttack(computer.getTokens());