Court of Ambition - improved AI logic on usage;

This commit is contained in:
Oleg Agafonov 2020-12-25 21:55:38 +04:00
parent a1c82f91d7
commit 952655b16e

View file

@ -77,12 +77,12 @@ class CourtOfAmbitionEffect extends OneShotEffect {
if (player == null) { if (player == null) {
continue; continue;
} }
if (player.getHand().size() < discardCount || !player.chooseUse(outcome, message, source, game)) { if (player.getHand().size() < discardCount || !player.chooseUse(Outcome.LoseLife, message, source, game)) {
player.loseLife(discardCount * 3, game, source, false); player.loseLife(discardCount * 3, game, source, false);
continue; continue;
} }
TargetDiscard target = new TargetDiscard(discardCount, StaticFilters.FILTER_CARD, playerId); TargetDiscard target = new TargetDiscard(discardCount, StaticFilters.FILTER_CARD, playerId);
player.choose(outcome, target, source.getSourceId(), game); player.choose(Outcome.Discard, target, source.getSourceId(), game);
discardMap.put(playerId, new CardsImpl(target.getTargets())); discardMap.put(playerId, new CardsImpl(target.getTargets()));
} }
for (Map.Entry<UUID, Cards> entry : discardMap.entrySet()) { for (Map.Entry<UUID, Cards> entry : discardMap.entrySet()) {