mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
- 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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user