mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
removed another ai hook
This commit is contained in:
@@ -480,9 +480,21 @@ public class AiCostDecision extends CostDecisionMakerBase implements ICostVisito
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
if(hperms.isEmpty())
|
||||
return null;
|
||||
|
||||
PaymentDecision result = PaymentDecision.card(hperms);
|
||||
Card valid = hperms.get(0);
|
||||
for (CounterType c1 : valid.getCounters().keySet()) {
|
||||
if (valid.getCounters(c1) >= c && ComputerUtil.isNegativeCounter(c1, valid)) {
|
||||
result.ct = c1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// Only find cards with enough negative counters
|
||||
// TODO: add ai for Chisei, Heart of Oceans
|
||||
return hperms.isEmpty() ? null : PaymentDecision.card(hperms);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -19,7 +19,6 @@ package forge.game.cost;
|
||||
|
||||
import com.google.common.base.Predicate;
|
||||
|
||||
import forge.ai.ComputerUtil;
|
||||
import forge.game.ability.AbilityUtils;
|
||||
import forge.game.card.Card;
|
||||
import forge.game.card.CardLists;
|
||||
@@ -138,12 +137,7 @@ public class CostRemoveAnyCounter extends CostPartWithList {
|
||||
c = AbilityUtils.calculateAmount(source, amount, ability);
|
||||
}
|
||||
Card valid = decision.cards.get(0);
|
||||
for (CounterType c1 : valid.getCounters().keySet()) {
|
||||
if (valid.getCounters(c1) >= c && ComputerUtil.isNegativeCounter(c1, valid)) {
|
||||
counterType = c1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
counterType = decision.ct;
|
||||
for (int i = 0; i < c; i++) {
|
||||
executePayment(ability, valid);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user