forked from External/mage
updated ManaSpentToCastWatcher to default watcher list, reworked it to be game scope
This commit is contained in:
parent
943c67fbca
commit
91eb324847
190 changed files with 272 additions and 280 deletions
|
|
@ -19,13 +19,11 @@ public enum SnowManaSpentValue implements DynamicValue {
|
|||
if (sourceAbility.getAbilityType() == AbilityType.SPELL) {
|
||||
return sourceAbility.getManaCostsToPay().getUsedManaToPay().getSnow();
|
||||
}
|
||||
ManaSpentToCastWatcher watcher = game.getState().getWatcher(
|
||||
ManaSpentToCastWatcher.class, sourceAbility.getSourceId()
|
||||
);
|
||||
ManaSpentToCastWatcher watcher = game.getState().getWatcher(ManaSpentToCastWatcher.class);
|
||||
if (watcher == null) {
|
||||
return 0;
|
||||
}
|
||||
Mana payment = watcher.getAndResetLastPayment();
|
||||
Mana payment = watcher.getAndResetLastPayment(sourceAbility.getSourceId());
|
||||
if (payment == null) {
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue