mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
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:
parent
f53e43fd46
commit
969ffa1c98
36 changed files with 323 additions and 503 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue