program towards Interface rather than implementations

This commit is contained in:
Ingmar Goudt 2020-02-10 10:39:56 +01:00
parent b04c436801
commit ae7919cd07
100 changed files with 218 additions and 209 deletions

View file

@ -10,6 +10,7 @@ import mage.constants.Zone;
import mage.game.Game;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
@ -56,7 +57,7 @@ public class SpectacleAbility extends SpellAbility {
@SuppressWarnings("unchecked")
public boolean activate(Game game, boolean noMana) {
if (super.activate(game, noMana)) {
ArrayList<Integer> spectacleActivations = (ArrayList) game.getState().getValue(SPECTACLE_ACTIVATION_VALUE_KEY + getSourceId());
List<Integer> spectacleActivations = (ArrayList) game.getState().getValue(SPECTACLE_ACTIVATION_VALUE_KEY + getSourceId());
if (spectacleActivations == null) {
spectacleActivations = new ArrayList<>(); // zoneChangeCounter
game.getState().setValue(SPECTACLE_ACTIVATION_VALUE_KEY + getSourceId(), spectacleActivations);