mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
- Small Tweak to AF_Damage to not allow AI to pay more than max mana
This commit is contained in:
@@ -1610,8 +1610,8 @@ public class Card extends MyObservable {
|
|||||||
enchantCommandList.add(c);
|
enchantCommandList.add(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeEnchantCommand(Command c) {
|
public void clearEnchantCommand() {
|
||||||
enchantCommandList.add(c);
|
enchantCommandList.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void enchant() {
|
public void enchant() {
|
||||||
@@ -1623,6 +1623,10 @@ public class Card extends MyObservable {
|
|||||||
unEnchantCommandList.add(c);
|
unEnchantCommandList.add(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void clearUnEnchantCommand() {
|
||||||
|
unEnchantCommandList.clear();
|
||||||
|
}
|
||||||
|
|
||||||
public void unEnchant() {
|
public void unEnchant() {
|
||||||
for(Command var:unEnchantCommandList)
|
for(Command var:unEnchantCommandList)
|
||||||
var.execute();
|
var.execute();
|
||||||
|
|||||||
@@ -252,7 +252,7 @@ public class AbilityFactory_DealDamage {
|
|||||||
ArrayList<Card> cards = tgt.getTargetCards();
|
ArrayList<Card> cards = tgt.getTargetCards();
|
||||||
for(Card c : cards){
|
for(Card c : cards){
|
||||||
int adjDamage = c.getEnoughDamageToKill(dmg, source, false, noPrevention);
|
int adjDamage = c.getEnoughDamageToKill(dmg, source, false, noPrevention);
|
||||||
if (adjDamage > actualPay)
|
if (adjDamage > actualPay && adjDamage <= dmg)
|
||||||
actualPay = adjDamage;
|
actualPay = adjDamage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user