}
}
public void addMana(List<ManaAbility> abilities, Game game) {
if (isEmpty())
this.add(new Mana());
if (!abilities.isEmpty()) {
if (abilities.size() == 1) {
//if there is only one mana option available add it to all the existing options
addMana(abilities.get(0).getNetMana(game));
}
else if (abilities.size() > 1) {
//perform a union of all existing options and the new options
List<Mana> copy = copy();
this.clear();
for (ManaAbility ability: abilities) {
for (Mana mana: copy) {
Mana newMana = new Mana();
newMana.add(mana);
newMana.add(ability.getNetMana(game));
this.add(newMana);
}
}
}
}