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
|
|
@ -2122,56 +2122,6 @@ public class HumanPlayer extends PlayerImpl {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public UUID chooseAttackerOrder(java.util.List<Permanent> attackers, Game game) {
|
||||
if (gameInCheckPlayableState(game)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
while (canRespond()) {
|
||||
prepareForResponse(game);
|
||||
if (!isExecutingMacro()) {
|
||||
game.fireSelectTargetEvent(playerId, "Pick attacker", attackers, true);
|
||||
}
|
||||
waitForResponse(game);
|
||||
|
||||
UUID responseId = getFixedResponseUUID(game);
|
||||
if (responseId != null) {
|
||||
for (Permanent perm : attackers) {
|
||||
if (perm.getId().equals(responseId)) {
|
||||
return perm.getId();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UUID chooseBlockerOrder(java.util.List<Permanent> blockers, CombatGroup combatGroup, java.util.List<UUID> blockerOrder, Game game) {
|
||||
if (gameInCheckPlayableState(game)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
while (canRespond()) {
|
||||
prepareForResponse(game);
|
||||
if (!isExecutingMacro()) {
|
||||
game.fireSelectTargetEvent(playerId, "Pick blocker", blockers, true);
|
||||
}
|
||||
waitForResponse(game);
|
||||
|
||||
UUID responseId = getFixedResponseUUID(game);
|
||||
if (responseId != null) {
|
||||
for (Permanent perm : blockers) {
|
||||
if (perm.getId().equals(responseId)) {
|
||||
return perm.getId();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
protected void selectCombatGroup(UUID defenderId, UUID blockerId, Game game) {
|
||||
if (gameInCheckPlayableState(game)) {
|
||||
return;
|
||||
|
|
@ -2260,7 +2210,7 @@ public class HumanPlayer extends PlayerImpl {
|
|||
Game game
|
||||
) {
|
||||
int needCount = messages.size();
|
||||
List<Integer> defaultList = MultiAmountType.prepareDefaltValues(messages, totalMin, totalMax);
|
||||
List<Integer> defaultList = MultiAmountType.prepareDefaultValues(messages, totalMin, totalMax);
|
||||
if (needCount == 0 || (needCount == 1 && totalMin == totalMax)
|
||||
|| messages.stream().map(m -> m.min == m.max).reduce(true, Boolean::logicalAnd)) {
|
||||
// nothing to choose
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue