Combat.getAttackers and Combat.getBlockers now return a Set instead of a List, so that two-headed blockers aren't included twice

This commit is contained in:
Alex W. Jackson 2022-09-07 22:36:05 -04:00
parent efaccf8564
commit a6c5209a2a
20 changed files with 192 additions and 354 deletions

View file

@ -2815,7 +2815,7 @@ public class ComputerPlayer extends PlayerImpl implements Player {
log.debug(sb.toString());
}
private void playRemoval(List<UUID> creatures, Game game) {
private void playRemoval(Set<UUID> creatures, Game game) {
for (UUID creatureId : creatures) {
for (Card card : this.playableInstant) {
if (card.getSpellAbility().canActivate(playerId, game).canActivate()) {
@ -2833,7 +2833,7 @@ public class ComputerPlayer extends PlayerImpl implements Player {
}
}
private void playDamage(List<UUID> creatures, Game game) {
private void playDamage(Set<UUID> creatures, Game game) {
for (UUID creatureId : creatures) {
Permanent creature = game.getPermanent(creatureId);
for (Card card : this.playableInstant) {