mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
* AI: improved exile from graveyard cost (now AI can use it with more efficiency)
This commit is contained in:
parent
57ed834c14
commit
fc5d766ebd
1 changed files with 5 additions and 1 deletions
|
@ -396,12 +396,16 @@ public class ComputerPlayer extends PlayerImpl implements Player {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
while ((outcome.isGood() ? target.getTargets().size() < target.getMaxNumberOfTargets() : !target.isChosen())
|
// exile cost workaround: exile is bad, but exile from graveyard in most cases is good (more exiled -- more good things you get, e.g. delve's pay)
|
||||||
|
boolean isRealGood = outcome.isGood() || outcome == Outcome.Exile;
|
||||||
|
while ((isRealGood ? target.getTargets().size() < target.getMaxNumberOfTargets() : !target.isChosen())
|
||||||
&& !cards.isEmpty()) {
|
&& !cards.isEmpty()) {
|
||||||
Card pick = pickTarget(abilityControllerId, cards, outcome, target, null, game);
|
Card pick = pickTarget(abilityControllerId, cards, outcome, target, null, game);
|
||||||
if (pick != null) {
|
if (pick != null) {
|
||||||
target.addTarget(pick.getId(), null, game);
|
target.addTarget(pick.getId(), null, game);
|
||||||
cards.remove(pick);
|
cards.remove(pick);
|
||||||
|
} else {
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue