"Summit of Amon Hen"
This commit is contained in:
@@ -1,6 +1,18 @@
|
||||
package com.gempukku.lotro.cards.set1.site;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractSite;
|
||||
import com.gempukku.lotro.cards.GameUtils;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.actions.CostToEffectAction;
|
||||
import com.gempukku.lotro.logic.decisions.MultipleChoiceAwaitingDecision;
|
||||
import com.gempukku.lotro.logic.effects.DrawCardEffect;
|
||||
import com.gempukku.lotro.logic.effects.PlayoutDecisionEffect;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: The Fellowship of the Ring
|
||||
@@ -13,4 +25,36 @@ public class Card1_362 extends AbstractSite {
|
||||
public Card1_362() {
|
||||
super("Summit of Amon Hen", 9, 8, Direction.LEFT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getRequiredWhenActions(LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (effectResult.getType() == EffectResult.Type.WHEN_MOVE_TO
|
||||
&& game.getGameState().getCurrentSite() == self) {
|
||||
List<Action> actions = new LinkedList<Action>();
|
||||
|
||||
String fpPlayerId = game.getGameState().getCurrentPlayerId();
|
||||
final int burdens = game.getGameState().getBurdens(fpPlayerId);
|
||||
|
||||
String[] opponents = GameUtils.getOpponents(game, fpPlayerId);
|
||||
for (String opponent : opponents) {
|
||||
final String opp = opponent;
|
||||
final CostToEffectAction action = new CostToEffectAction(self, null, "Shadow player may draw a card for each burden.");
|
||||
action.addEffect(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), opponent,
|
||||
new MultipleChoiceAwaitingDecision(1, "Do you want to draw a card for each burder?", new String[]{"Yes", "No"}) {
|
||||
@Override
|
||||
protected void validDecisionMade(int index, String result) {
|
||||
if (result.equals("Yes")) {
|
||||
for (int i = 0; i < burdens; i++)
|
||||
action.addEffect(new DrawCardEffect(opp));
|
||||
}
|
||||
}
|
||||
}));
|
||||
actions.add(action);
|
||||
}
|
||||
|
||||
return actions;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user