"Citadel to Gate"

This commit is contained in:
marcins78@gmail.com
2011-10-28 10:30:45 +00:00
parent b40c0ee0ad
commit 927b807bfc
2 changed files with 56 additions and 1 deletions

View File

@@ -0,0 +1,54 @@
package com.gempukku.lotro.cards.set7.gandalf;
import com.gempukku.lotro.cards.AbstractEvent;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.actions.PlayEventAction;
import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect;
import com.gempukku.lotro.common.CardType;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Phase;
import com.gempukku.lotro.common.Side;
import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
import com.gempukku.lotro.logic.effects.HealCharactersEffect;
import com.gempukku.lotro.logic.effects.RemoveThreatsEffect;
/**
* Set: The Return of the King
* Side: Free
* Culture: Gandalf
* Twilight Cost: 5
* Type: Event • Fellowship
* Game Text: Exert Gandalf twice to remove all threats and to heal all companions of one culture (except [GANDALF]).
*/
public class Card7_033 extends AbstractEvent {
public Card7_033() {
super(Side.FREE_PEOPLE, 5, Culture.GANDALF, "Citadel to Gate", Phase.FELLOWSHIP);
}
@Override
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
return super.checkPlayRequirements(playerId, game, self, twilightModifier)
&& PlayConditions.canExert(self, game, 2, Filters.name("Gandalf"));
}
@Override
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, final PhysicalCard self, int twilightModifier) {
final PlayEventAction action = new PlayEventAction(self);
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, 2, Filters.name("Gandalf")));
action.appendEffect(
new RemoveThreatsEffect(self, Integer.MAX_VALUE));
action.appendEffect(
new ChooseActiveCardEffect(self, playerId, "Choose companion of culture you wish to heal", CardType.COMPANION, Filters.wounded, Filters.not(Culture.GANDALF)) {
@Override
protected void cardSelected(LotroGame game, PhysicalCard card) {
action.appendEffect(
new HealCharactersEffect(self, card.getBlueprint().getCulture()));
}
});
return action;
}
}

View File

@@ -1,5 +1,6 @@
package com.gempukku.lotro.logic.effects;
import com.gempukku.lotro.common.Filterable;
import com.gempukku.lotro.filters.Filter;
import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.game.PhysicalCard;
@@ -22,7 +23,7 @@ public class HealCharactersEffect extends AbstractPreventableCardEffect {
_source = source;
}
public HealCharactersEffect(PhysicalCard source, Filter filter) {
public HealCharactersEffect(PhysicalCard source, Filterable... filter) {
super(filter);
_source = source;
}