- Small Tweak to AF_Damage to not allow AI to pay more than max mana

This commit is contained in:
jendave
2011-08-07 00:43:41 +00:00
parent 832127454d
commit 46cba601e6
2 changed files with 7 additions and 3 deletions

View File

@@ -1610,8 +1610,8 @@ public class Card extends MyObservable {
enchantCommandList.add(c);
}
public void removeEnchantCommand(Command c) {
enchantCommandList.add(c);
public void clearEnchantCommand() {
enchantCommandList.clear();
}
public void enchant() {
@@ -1623,6 +1623,10 @@ public class Card extends MyObservable {
unEnchantCommandList.add(c);
}
public void clearUnEnchantCommand() {
unEnchantCommandList.clear();
}
public void unEnchant() {
for(Command var:unEnchantCommandList)
var.execute();

View File

@@ -252,7 +252,7 @@ public class AbilityFactory_DealDamage {
ArrayList<Card> cards = tgt.getTargetCards();
for(Card c : cards){
int adjDamage = c.getEnoughDamageToKill(dmg, source, false, noPrevention);
if (adjDamage > actualPay)
if (adjDamage > actualPay && adjDamage <= dmg)
actualPay = adjDamage;
}