FDN New Combat Rules (#13279)

* Remove all combat ordering code

* Use MultiAmount division for damage

* Remove damage selection division skipping in tests

* Fix Banding, Multi-block, add tests

* Fix test

* Fix random iteration order, fix new tests

* Add more info to choose dialog, make MultiAmountType class instead of enum

* Don't prompt for trample damage assignment if none possible

* Mark "Assign default damage" on tests, minor other test improvements
This commit is contained in:
ssk97 2025-03-30 14:42:05 -07:00 committed by GitHub
parent f53e43fd46
commit 969ffa1c98
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
36 changed files with 323 additions and 503 deletions

View file

@ -2177,9 +2177,6 @@ public class ComputerPlayer extends PlayerImpl {
// TODO: add AI support with outcome and replace random with min/max
public int getAmount(int min, int max, String message, Game game) {
log.debug("getAmount");
if (message.startsWith("Assign damage to ")) {
return min;
}
if (min < max && min == 0) {
return RandomUtil.nextInt(CardUtil.overflowInc(max, 1));
}
@ -2192,7 +2189,7 @@ public class ComputerPlayer extends PlayerImpl {
log.debug("getMultiAmount");
int needCount = messages.size();
List<Integer> defaultList = MultiAmountType.prepareDefaltValues(messages, totalMin, totalMax);
List<Integer> defaultList = MultiAmountType.prepareDefaultValues(messages, totalMin, totalMax);
if (needCount == 0) {
return defaultList;
}
@ -2210,18 +2207,6 @@ public class ComputerPlayer extends PlayerImpl {
return MultiAmountType.prepareMaxValues(messages, totalMin, totalMax);
}
@Override
public UUID chooseAttackerOrder(List<Permanent> attackers, Game game) {
//TODO: improve this
return attackers.iterator().next().getId();
}
@Override
public UUID chooseBlockerOrder(List<Permanent> blockers, CombatGroup combatGroup, List<UUID> blockerOrder, Game game) {
//TODO: improve this
return blockers.iterator().next().getId();
}
@Override
public List<MageObject> getAvailableManaProducers(Game game) {
return super.getAvailableManaProducers(game);