forked from External/mage
Game: fixed rare bugs in some cards after rollback or cancel actions:
* Cumulative upkeep cost - fixed that it can lost payed state (cards: Aboroth, Karplusan Minotaur, Psychic Vortex, Sheltering Ancient); * Effects - fixed that it can lost selected targets or other settings (cards: Citadel of Pain, Crimson Honor Guard, Curfew, Leveler, Mana Cache, Monsoon, Paradigm Shift, Saprazzan Bailiff); * Exile all cards from graveyard ability - fixed that it can lost targets (example: Agent of Erebos); * Melee ability - fixed that it can lost targets (example: Adriana, Captain of the Guard).
This commit is contained in:
parent
82cc789534
commit
07ddad6e48
60 changed files with 163 additions and 224 deletions
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.abilities.keyword;
|
||||
|
||||
import java.util.*;
|
||||
|
|
@ -71,9 +70,19 @@ class MeleeWatcher extends Watcher {
|
|||
|
||||
class MeleeDynamicValue implements DynamicValue {
|
||||
|
||||
private boolean valueChecked = false;
|
||||
private boolean valueChecked;
|
||||
private int lockedInValue;
|
||||
|
||||
public MeleeDynamicValue() {
|
||||
super();
|
||||
}
|
||||
|
||||
protected MeleeDynamicValue(final MeleeDynamicValue dynamicValue) {
|
||||
super();
|
||||
valueChecked = dynamicValue.valueChecked;
|
||||
lockedInValue = dynamicValue.lockedInValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
MeleeWatcher watcher = game.getState().getWatcher(MeleeWatcher.class);
|
||||
|
|
@ -89,7 +98,7 @@ class MeleeDynamicValue implements DynamicValue {
|
|||
|
||||
@Override
|
||||
public MeleeDynamicValue copy() {
|
||||
return new MeleeDynamicValue();
|
||||
return new MeleeDynamicValue(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue