summaryrefslogtreecommitdiff
path: root/src/main/java/org/luxons/sevenwonders
diff options
context:
space:
mode:
authorjbion <joffrey.bion@amadeus.com>2017-01-13 09:22:36 +0100
committerjbion <joffrey.bion@amadeus.com>2017-01-13 09:22:36 +0100
commitc3aeba77be8e524d48de10c899fdde0200026873 (patch)
tree33eefc78a1ccd27615208f9d95f3d8fcde63c621 /src/main/java/org/luxons/sevenwonders
parentSeparate CustomizableSettings and actual Settings (diff)
downloadseven-wonders-c3aeba77be8e524d48de10c899fdde0200026873.tar.gz
seven-wonders-c3aeba77be8e524d48de10c899fdde0200026873.tar.bz2
seven-wonders-c3aeba77be8e524d48de10c899fdde0200026873.zip
Add special ability activation in the corresponding effect
Diffstat (limited to 'src/main/java/org/luxons/sevenwonders')
-rw-r--r--src/main/java/org/luxons/sevenwonders/game/data/definitions/EffectsDefinition.java4
-rw-r--r--src/main/java/org/luxons/sevenwonders/game/effects/SpecialAbilityActivation.java (renamed from src/main/java/org/luxons/sevenwonders/game/effects/SpecialAbilityTrigger.java)6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/org/luxons/sevenwonders/game/data/definitions/EffectsDefinition.java b/src/main/java/org/luxons/sevenwonders/game/data/definitions/EffectsDefinition.java
index 2df07db4..e35463d4 100644
--- a/src/main/java/org/luxons/sevenwonders/game/data/definitions/EffectsDefinition.java
+++ b/src/main/java/org/luxons/sevenwonders/game/data/definitions/EffectsDefinition.java
@@ -13,7 +13,7 @@ import org.luxons.sevenwonders.game.effects.ProductionIncrease;
import org.luxons.sevenwonders.game.effects.RawPointsIncrease;
import org.luxons.sevenwonders.game.effects.ScienceProgress;
import org.luxons.sevenwonders.game.effects.SpecialAbility;
-import org.luxons.sevenwonders.game.effects.SpecialAbilityTrigger;
+import org.luxons.sevenwonders.game.effects.SpecialAbilityActivation;
@SuppressWarnings("unused") // the fields are injected by Gson
public class EffectsDefinition implements Definition<List<Effect>> {
@@ -59,7 +59,7 @@ public class EffectsDefinition implements Definition<List<Effect>> {
effects.add(points);
}
if (action != null) {
- effects.add(new SpecialAbilityTrigger(action));
+ effects.add(new SpecialAbilityActivation(action));
}
return effects;
}
diff --git a/src/main/java/org/luxons/sevenwonders/game/effects/SpecialAbilityTrigger.java b/src/main/java/org/luxons/sevenwonders/game/effects/SpecialAbilityActivation.java
index e68e71e9..18e7496f 100644
--- a/src/main/java/org/luxons/sevenwonders/game/effects/SpecialAbilityTrigger.java
+++ b/src/main/java/org/luxons/sevenwonders/game/effects/SpecialAbilityActivation.java
@@ -2,11 +2,11 @@ package org.luxons.sevenwonders.game.effects;
import org.luxons.sevenwonders.game.api.Table;
-public class SpecialAbilityTrigger implements Effect {
+public class SpecialAbilityActivation implements Effect {
private final SpecialAbility specialAbility;
- public SpecialAbilityTrigger(SpecialAbility specialAbility) {
+ public SpecialAbilityActivation(SpecialAbility specialAbility) {
this.specialAbility = specialAbility;
}
@@ -16,7 +16,7 @@ public class SpecialAbilityTrigger implements Effect {
@Override
public void apply(Table table, int playerIndex) {
- // TODO do something to activate the special action
+ specialAbility.apply(table.getBoard(playerIndex));
}
@Override
bgstack15