- Allowing Charms to have subAbilities be chosen more than once (AI support needs improving to actually filter through all the permutations)

This commit is contained in:
Sol
2015-11-10 03:10:53 +00:00
parent 27a80bbae9
commit 022041a2f6
6 changed files with 19 additions and 14 deletions

View File

@@ -1082,7 +1082,7 @@ public class PlayerControllerHuman
* @see forge.game.player.PlayerController#chooseModeForAbility(forge.card.spellability.SpellAbility, java.util.List, int, int)
*/
@Override
public List<AbilitySub> chooseModeForAbility(final SpellAbility sa, final int min, final int num) {
public List<AbilitySub> chooseModeForAbility(final SpellAbility sa, final int min, final int num, boolean allowRepeat) {
final List<AbilitySub> choices = CharmEffect.makePossibleOptions(sa);
final String modeTitle = String.format("%s activated %s - Choose a mode", sa.getActivatingPlayer(), sa.getHostCard());
final List<AbilitySub> chosen = Lists.newArrayListWithCapacity(num);
@@ -1098,7 +1098,9 @@ public class PlayerControllerHuman
break;
}
choices.remove(a);
if (!allowRepeat) {
choices.remove(a);
}
chosen.add(a);
}
return chosen;