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;
|
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
|
// Only find cards with enough negative counters
|
||||||
// TODO: add ai for Chisei, Heart of Oceans
|
// TODO: add ai for Chisei, Heart of Oceans
|
||||||
return hperms.isEmpty() ? null : PaymentDecision.card(hperms);
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ package forge.game.cost;
|
|||||||
|
|
||||||
import com.google.common.base.Predicate;
|
import com.google.common.base.Predicate;
|
||||||
|
|
||||||
import forge.ai.ComputerUtil;
|
|
||||||
import forge.game.ability.AbilityUtils;
|
import forge.game.ability.AbilityUtils;
|
||||||
import forge.game.card.Card;
|
import forge.game.card.Card;
|
||||||
import forge.game.card.CardLists;
|
import forge.game.card.CardLists;
|
||||||
@@ -138,12 +137,7 @@ public class CostRemoveAnyCounter extends CostPartWithList {
|
|||||||
c = AbilityUtils.calculateAmount(source, amount, ability);
|
c = AbilityUtils.calculateAmount(source, amount, ability);
|
||||||
}
|
}
|
||||||
Card valid = decision.cards.get(0);
|
Card valid = decision.cards.get(0);
|
||||||
for (CounterType c1 : valid.getCounters().keySet()) {
|
counterType = decision.ct;
|
||||||
if (valid.getCounters(c1) >= c && ComputerUtil.isNegativeCounter(c1, valid)) {
|
|
||||||
counterType = c1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for (int i = 0; i < c; i++) {
|
for (int i = 0; i < c; i++) {
|
||||||
executePayment(ability, valid);
|
executePayment(ability, valid);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user