* AI - FIxed a bug that prevented AI from using modes other than the first of modal spells.

This commit is contained in:
LevelX2 2015-07-12 09:06:31 +02:00
parent c9cc7d7920
commit 4dc70048d5

View file

@ -2608,8 +2608,10 @@ public abstract class PlayerImpl implements Player, Serializable {
}
private void addModeOptions(List<Ability> options, Ability option, Game game) {
// TODO: Support modal spells with more than one selectable mode
for (Mode mode : option.getModes().values()) {
Ability newOption = option.copy();
newOption.getModes().getSelectedModes().clear();
newOption.getModes().setMode(mode);
if (newOption.getTargets().getUnchosen().size() > 0) {
if (newOption.getManaCosts().getVariableCosts().size() > 0) {