"Treebeard"

This commit is contained in:
marcins78@gmail.com
2011-10-20 16:30:27 +00:00
parent 206dc19d30
commit 2fabb7d0f1

View File

@@ -0,0 +1,72 @@
package com.gempukku.lotro.cards.set6.gandalf;
import com.gempukku.lotro.cards.AbstractCompanion;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.effects.AddUntilEndOfPhaseModifierEffect;
import com.gempukku.lotro.cards.effects.ExertCharactersEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect;
import com.gempukku.lotro.cards.modifiers.ParticipatesInSkirmishesModifier;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Keyword;
import com.gempukku.lotro.common.Phase;
import com.gempukku.lotro.common.Race;
import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.actions.ActivateCardAction;
import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
import com.gempukku.lotro.logic.modifiers.KeywordModifier;
import com.gempukku.lotro.logic.timing.Action;
import java.util.Collections;
import java.util.List;
/**
* Set: Ents of Fangorn
* Side: Free
* Culture: Gandalf
* Twilight Cost: 5
* Type: Companion • Ent
* Strength: 12
* Vitality: 4
* Resistance: 6
* Game Text: Unhasty. Assignment: Exert an unbound Hobbit to allow Treebeard to skirmish. Skirmish: Exert Treebeard
* to make an Ent damage +1.
*/
public class Card6_037 extends AbstractCompanion {
public Card6_037() {
super(5, 12, 4, Culture.GANDALF, Race.ENT, null, "Treebeard", true);
addKeyword(Keyword.UNHASTY);
}
@Override
protected List<? extends Action> getExtraInPlayPhaseActions(String playerId, LotroGame game, final PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.ASSIGNMENT, self)
&& PlayConditions.canExert(self, game, Race.HOBBIT, Filters.unboundCompanion)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Race.HOBBIT, Filters.unboundCompanion));
action.appendEffect(
new AddUntilEndOfPhaseModifierEffect(
new ParticipatesInSkirmishesModifier(self, Filters.sameCard(self)), Phase.ASSIGNMENT));
return Collections.singletonList(action);
}
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.SKIRMISH, self)
&& PlayConditions.canSelfExert(self, game)) {
final ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ExertCharactersEffect(self, self));
action.appendEffect(
new ChooseActiveCardEffect(self, playerId, "Choose and Ent", Race.ENT) {
@Override
protected void cardSelected(LotroGame game, PhysicalCard card) {
action.insertEffect(
new AddUntilEndOfPhaseModifierEffect(
new KeywordModifier(self, card, Keyword.DAMAGE, 1), Phase.SKIRMISH));
}
});
return Collections.singletonList(action);
}
return null;
}
}