"Battle Tested"
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package com.gempukku.lotro.cards.modifiers.evaluator;
|
||||
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.GameState;
|
||||
import com.gempukku.lotro.logic.modifiers.Condition;
|
||||
import com.gempukku.lotro.logic.modifiers.ModifiersQuerying;
|
||||
import com.gempukku.lotro.logic.modifiers.evaluator.Evaluator;
|
||||
|
||||
public class ConditionEvaluator implements Evaluator {
|
||||
private int _default;
|
||||
private int _conditionFullfilled;
|
||||
private Condition _condition;
|
||||
|
||||
public ConditionEvaluator(int aDefault, int conditionFullfilled, Condition condition) {
|
||||
_default = aDefault;
|
||||
_conditionFullfilled = conditionFullfilled;
|
||||
_condition = condition;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int evaluateExpression(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard self) {
|
||||
if (_condition.isFullfilled(gameState, modifiersQuerying))
|
||||
return _conditionFullfilled;
|
||||
return _default;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.gempukku.lotro.cards.set7.dwarven;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractEvent;
|
||||
import com.gempukku.lotro.cards.actions.PlayEventAction;
|
||||
import com.gempukku.lotro.cards.effects.choose.ChooseAndAddUntilEOPStrengthBonusEffect;
|
||||
import com.gempukku.lotro.cards.modifiers.evaluator.ConditionEvaluator;
|
||||
import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.modifiers.SpotCondition;
|
||||
|
||||
/**
|
||||
* Set: The Return of the King
|
||||
* Side: Free
|
||||
* Culture: Dwarven
|
||||
* Twilight Cost: 0
|
||||
* Type: Event • Skirmish
|
||||
* Game Text: Make a Dwarf strength +2 (+4 if you spot a card stacked on a [DWARVEN] condition).
|
||||
*/
|
||||
public class Card7_003 extends AbstractEvent {
|
||||
public Card7_003() {
|
||||
super(Side.FREE_PEOPLE, 0, Culture.DWARVEN, "Battle Tested", Phase.SKIRMISH);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
|
||||
PlayEventAction action = new PlayEventAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseAndAddUntilEOPStrengthBonusEffect(action, self, playerId,
|
||||
new ConditionEvaluator(2, 4, new SpotCondition(CardType.CONDITION, Culture.DWARVEN, Filters.hasStacked(Filters.any))), Race.DWARF));
|
||||
return action;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user