forked from External/mage
Convert SpellAbility keywords to costs tag system
This commit is contained in:
parent
f3d5faf199
commit
ad873863fa
6 changed files with 9 additions and 62 deletions
|
|
@ -10,8 +10,6 @@ import mage.game.Game;
|
|||
import mage.players.Player;
|
||||
import mage.watchers.common.CastSpellLastTurnWatcher;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
|
|
@ -65,15 +63,9 @@ public class SurgeAbility extends SpellAbility {
|
|||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public boolean activate(Game game, boolean noMana) {
|
||||
if (super.activate(game, noMana)) {
|
||||
List<Integer> surgeActivations = (ArrayList) game.getState().getValue(SURGE_ACTIVATION_VALUE_KEY + getSourceId());
|
||||
if (surgeActivations == null) {
|
||||
surgeActivations = new ArrayList<>(); // zoneChangeCounter
|
||||
game.getState().setValue(SURGE_ACTIVATION_VALUE_KEY + getSourceId(), surgeActivations);
|
||||
}
|
||||
surgeActivations.add(game.getState().getZoneChangeCounter(getSourceId()));
|
||||
this.setCostsTag(SURGE_ACTIVATION_VALUE_KEY, null);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue