"Not the First Halfling"

This commit is contained in:
marcins78@gmail.com
2011-11-11 16:19:15 +00:00
parent da538cba24
commit 76394a382c
5 changed files with 64 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
package com.gempukku.lotro.cards.set8.elven;
package com.gempukku.lotro.cards.set8.gandalf;
import com.gempukku.lotro.cards.AbstractEvent;
import com.gempukku.lotro.cards.actions.PlayEventAction;

View File

@@ -1,4 +1,4 @@
package com.gempukku.lotro.cards.set8.elven;
package com.gempukku.lotro.cards.set8.gandalf;
import com.gempukku.lotro.cards.AbstractCompanion;
import com.gempukku.lotro.common.Culture;

View File

@@ -1,4 +1,4 @@
package com.gempukku.lotro.cards.set8.elven;
package com.gempukku.lotro.cards.set8.gandalf;
import com.gempukku.lotro.cards.AbstractEvent;
import com.gempukku.lotro.cards.PlayConditions;

View File

@@ -1,4 +1,4 @@
package com.gempukku.lotro.cards.set8.elven;
package com.gempukku.lotro.cards.set8.gandalf;
import com.gempukku.lotro.cards.AbstractEvent;
import com.gempukku.lotro.cards.PlayConditions;

View File

@@ -0,0 +1,60 @@
package com.gempukku.lotro.cards.set8.gandalf;
import com.gempukku.lotro.cards.AbstractPermanent;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.effects.AddTokenEffect;
import com.gempukku.lotro.cards.effects.RemoveTokenEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndAddUntilEOPStrengthBonusEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect;
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.actions.ActivateCardAction;
import com.gempukku.lotro.logic.timing.Action;
import java.util.Collections;
import java.util.List;
/**
* Set: Siege of Gondor
* Side: Free
* Culture: Gandalf
* Twilight Cost: 1
* Type: Condition • Support Area
* Game Text: Fellowship: Exert Gandalf and either an [ELVEN] companion or a [SHIRE] companion to add a [GANDALF] token
* here. Skirmish: Remove a [GANDALF] token here to make a minion skirmishing an unbound companion strength -2.
*/
public class Card8_018 extends AbstractPermanent {
public Card8_018() {
super(Side.FREE_PEOPLE, 1, CardType.CONDITION, Culture.GANDALF, Zone.SUPPORT, "Not the First Halfling");
}
@Override
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.FELLOWSHIP, self)
&& PlayConditions.canExert(self, game, Filters.gandalf)
&& PlayConditions.canExert(self, game, CardType.COMPANION, Filters.or(Culture.ELVEN, Culture.SHIRE))) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Filters.gandalf));
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, CardType.COMPANION, Filters.or(Culture.ELVEN, Culture.SHIRE)));
action.appendEffect(
new AddTokenEffect(self, self, Token.GANDALF));
return Collections.singletonList(action);
}
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.SKIRMISH, self)
&& PlayConditions.canRemoveTokens(game, Token.GANDALF, 1, self)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new RemoveTokenEffect(self, self, Token.GANDALF));
action.appendEffect(
new ChooseAndAddUntilEOPStrengthBonusEffect(action, self, playerId, -2, CardType.MINION, Filters.inSkirmishAgainst(Filters.unboundCompanion)));
return Collections.singletonList(action);
}
return null;
}
}