mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Refactor - moved ZuberasDiedDynamicValue to shared area
This commit is contained in:
parent
8e6389040d
commit
b17b5c9e1a
5 changed files with 39 additions and 27 deletions
|
@ -30,6 +30,7 @@ package mage.sets.championsofkamigawa;
|
|||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.abilities.dynamicvalue.common.ZuberasDiedDynamicValue;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.MageInt;
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
package mage.sets.championsofkamigawa;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.abilities.dynamicvalue.common.ZuberasDiedDynamicValue;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.MageInt;
|
||||
|
|
|
@ -30,6 +30,7 @@ package mage.sets.championsofkamigawa;
|
|||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.abilities.dynamicvalue.common.ZuberasDiedDynamicValue;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.MageInt;
|
||||
|
|
|
@ -29,15 +29,12 @@
|
|||
package mage.sets.championsofkamigawa;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DiesTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.dynamicvalue.common.ZuberasDiedDynamicValue;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.game.Game;
|
||||
import mage.watchers.common.ZuberasDiedWatcher;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -70,26 +67,3 @@ public class FloatingDreamZubera extends CardImpl {
|
|||
}
|
||||
|
||||
|
||||
class ZuberasDiedDynamicValue implements DynamicValue {
|
||||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
ZuberasDiedWatcher watcher = (ZuberasDiedWatcher) game.getState().getWatchers().get("ZuberasDied");
|
||||
return watcher.zuberasDiedThisTurn;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ZuberasDiedDynamicValue copy() {
|
||||
return new ZuberasDiedDynamicValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "1";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "Zubera that died this turn";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
package mage.abilities.dynamicvalue.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.game.Game;
|
||||
import mage.watchers.common.ZuberasDiedWatcher;
|
||||
|
||||
/**
|
||||
* Created by Eric on 9/24/2016.
|
||||
*/
|
||||
public class ZuberasDiedDynamicValue implements DynamicValue {
|
||||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
ZuberasDiedWatcher watcher = (ZuberasDiedWatcher) game.getState().getWatchers().get("ZuberasDied");
|
||||
return watcher.zuberasDiedThisTurn;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ZuberasDiedDynamicValue copy() {
|
||||
return new ZuberasDiedDynamicValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "1";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "Zubera that died this turn";
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue