AI fixes:

* Gain control abilities - fixed wrong target chooses by AI (selects weakest permanent instead most powerful);
* Target of an opponent’s choice abilities - fixed that AI was able to cancel card cast, fixed wrong target chooses (Evangelize, Echo Chamber, Arena, Preacher, etc);
This commit is contained in:
Oleg Agafonov 2020-01-04 22:37:16 +04:00
parent bcb37992cc
commit bb59cedbd9
12 changed files with 137 additions and 93 deletions

View file

@ -2512,16 +2512,10 @@ public class ComputerPlayer extends PlayerImpl implements Player {
goodList.sort(comparator);
badList.sort(comparator);
// real sort
if (outcome.isGood()) {
// good effect -- most valueable goes first
Collections.reverse(goodList);
// Collections.reverse(badList);
} else {
// bad effect - most weakest goes first, no need in reverse
// Collections.reverse(goodList);
Collections.reverse(badList);
}
// most valueable goes first in good list
Collections.reverse(goodList);
// most weakest goes first in bad list (no need to reverse)
//Collections.reverse(badList);
allList.addAll(goodList);
allList.addAll(badList);