mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 13:02:06 -08:00
* Selvala, Explorer Returned - Fixed that library top cards were revealead without using the mana ability. Possible mana from this source is no longer calculated for possible mana pool. Tapping for man can no longer be undone.(#2191).
This commit is contained in:
parent
9716ac3541
commit
8d06c23602
5 changed files with 40 additions and 17 deletions
|
|
@ -98,6 +98,11 @@ public abstract class ActivatedManaAbilityImpl extends ActivatedAbilityImpl impl
|
|||
return netMana.size() > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is it allowed to undo the mana creation.
|
||||
* It's e.g. not allowed if some game revealing information is related (like reveal the top card of the library)
|
||||
* @return
|
||||
*/
|
||||
public boolean isUndoPossible() {
|
||||
return undoPossible;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,17 +43,32 @@ import mage.game.Game;
|
|||
*/
|
||||
public class SimpleManaAbility extends ActivatedManaAbilityImpl {
|
||||
|
||||
private boolean predictable;
|
||||
|
||||
public SimpleManaAbility(Zone zone, ManaEffect effect, Cost cost) {
|
||||
this(zone, effect, cost, true);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param zone
|
||||
* @param effect
|
||||
* @param cost
|
||||
* @param predictable set to false if definig the mana type or amount needs to reveal information and can't be predicted
|
||||
*/
|
||||
public SimpleManaAbility(Zone zone, ManaEffect effect, Cost cost, boolean predictable) {
|
||||
super(zone, effect, cost);
|
||||
this.predictable = predictable;
|
||||
}
|
||||
|
||||
public SimpleManaAbility(Zone zone, Mana mana, Cost cost) {
|
||||
super(zone, new BasicManaEffect(mana), cost);
|
||||
this.netMana.add(mana.copy());
|
||||
this.predictable = true;
|
||||
}
|
||||
|
||||
public SimpleManaAbility(final SimpleManaAbility ability) {
|
||||
super(ability);
|
||||
this.predictable = ability.predictable;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -63,7 +78,7 @@ public class SimpleManaAbility extends ActivatedManaAbilityImpl {
|
|||
|
||||
@Override
|
||||
public List<Mana> getNetMana(Game game) {
|
||||
if (netMana.isEmpty()) {
|
||||
if (netMana.isEmpty() && predictable) {
|
||||
for (Effect effect: getEffects()) {
|
||||
if (effect instanceof ManaEffect) {
|
||||
Mana effectMana =((ManaEffect)effect).getMana(game, this);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue