forked from External/mage
* Fixed available mana generation for Caged Sun and storage lands (e.g. Calciform Pools) related to #6698.
This commit is contained in:
parent
08d1eb5319
commit
7ad7d5f03d
13 changed files with 383 additions and 157 deletions
|
|
@ -2890,11 +2890,24 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
boolean withCost = false;
|
||||
Abilities<ActivatedManaAbilityImpl> manaAbilities
|
||||
= permanent.getAbilities().getAvailableActivatedManaAbilities(Zone.BATTLEFIELD, game);
|
||||
for (ActivatedManaAbilityImpl ability : manaAbilities) {
|
||||
for (Iterator<ActivatedManaAbilityImpl> it = manaAbilities.iterator(); it.hasNext();) {
|
||||
ActivatedManaAbilityImpl ability = it.next();
|
||||
if (canUse == null) {
|
||||
canUse = permanent.canUseActivatedAbilities(game);
|
||||
}
|
||||
if (canUse && ability.canActivate(playerId, game).canActivate()) {
|
||||
// abilities without Tap costs have to be handled as separate sources, because they can be used also
|
||||
if (!availableMana.hasTapCost(ability)) {
|
||||
it.remove();
|
||||
Abilities<ActivatedManaAbilityImpl> noTapAbilities = new AbilitiesImpl<>(ability);
|
||||
if (ability.getManaCosts().isEmpty()) {
|
||||
sourceWithoutManaCosts.add(noTapAbilities);
|
||||
} else {
|
||||
sourceWithCosts.add(noTapAbilities);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
canAdd = true;
|
||||
if (!ability.getManaCosts().isEmpty()) {
|
||||
withCost = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue