"Halbarad"
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
package com.gempukku.lotro.cards.set14.gondor;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractCompanion;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.TriggerConditions;
|
||||
import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.GameState;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.actions.OptionalTriggerAction;
|
||||
import com.gempukku.lotro.logic.effects.ChooseAndDiscardCardsFromHandEffect;
|
||||
import com.gempukku.lotro.logic.effects.ChooseAndHealCharactersEffect;
|
||||
import com.gempukku.lotro.logic.modifiers.ModifiersQuerying;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: Expanded Middle-earth
|
||||
* Side: Free
|
||||
* Culture: Gondor
|
||||
* Twilight Cost: 3
|
||||
* Type: Companion • Man
|
||||
* Strength: 7
|
||||
* Vitality: 3
|
||||
* Resistance: 6
|
||||
* Game Text: Ranger. While the Ring-bearer has resistance 9 or more, Halbarad's twilight cost is -1. At the start of
|
||||
* the maneuver phase, you may discard a [GONDOR] card from hand to heal a [GONDOR] companion.
|
||||
*/
|
||||
public class Card14_009 extends AbstractCompanion {
|
||||
public Card14_009() {
|
||||
super(3, 7, 3, 6, Culture.GONDOR, Race.MAN, null, "Halbarad", true);
|
||||
addKeyword(Keyword.RANGER);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTwilightCostModifier(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard self) {
|
||||
if (modifiersQuerying.getResistance(gameState, gameState.getRingBearer(gameState.getCurrentPlayerId())) >= 9)
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (TriggerConditions.startOfPhase(game, effectResult, Phase.MANEUVER)
|
||||
&& PlayConditions.canDiscardFromHand(game, playerId, 1, Culture.GONDOR)) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendCost(
|
||||
new ChooseAndDiscardCardsFromHandEffect(action, playerId, false, 1, Culture.GONDOR));
|
||||
action.appendEffect(
|
||||
new ChooseAndHealCharactersEffect(action, playerId, Culture.GONDOR, CardType.COMPANION));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user