"Well-Traveled"

This commit is contained in:
marcins78
2013-01-29 17:03:21 +00:00
parent a2fe43dc6e
commit 379f38b156

View File

@@ -0,0 +1,52 @@
package com.gempukku.lotro.cards.set20.gondor;
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.PlayNextSiteEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Keyword;
import com.gempukku.lotro.common.Phase;
import com.gempukku.lotro.common.Side;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.GameUtils;
import com.gempukku.lotro.logic.effects.PlaySiteEffect;
/**
* 0
* Well-Traveled
* Gondor Event • Fellowship or Regroup
* To play, exert a [Gondor] ranger.
* If the fellowship is in region 1, play the fellowship's next 2 sites. Otherwise, play the fellowship's next site.
*/
public class Card20_208 extends AbstractEvent {
public Card20_208() {
super(Side.FREE_PEOPLE, 0, Culture.GONDOR, "Well-Traveled", Phase.FELLOWSHIP, Phase.REGROUP);
}
@Override
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int withTwilightRemoved, int twilightModifier, boolean ignoreRoamingPenalty, boolean ignoreCheckingDeadPile) {
return super.checkPlayRequirements(playerId, game, self, withTwilightRemoved, twilightModifier, ignoreRoamingPenalty, ignoreCheckingDeadPile)
&& PlayConditions.canExert(self, game, Culture.GONDOR, Keyword.RANGER);
}
@Override
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) {
PlayEventAction action = new PlayEventAction(self);
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Culture.GONDOR, Keyword.RANGER));
int region = GameUtils.getRegion(game.getGameState());
if (region == 1) {
action.appendEffect(
new PlaySiteEffect(action, playerId, null, game.getGameState().getCurrentSiteNumber() + 1));
action.appendEffect(
new PlaySiteEffect(action, playerId, null, game.getGameState().getCurrentSiteNumber() + 2));
} else
action.appendEffect(
new PlayNextSiteEffect(action, playerId));
return action;
}
}