"Goblin Man"
This commit is contained in:
@@ -0,0 +1,47 @@
|
|||||||
|
package com.gempukku.lotro.cards.effects;
|
||||||
|
|
||||||
|
import com.gempukku.lotro.game.PhysicalCard;
|
||||||
|
import com.gempukku.lotro.game.state.LotroGame;
|
||||||
|
import com.gempukku.lotro.logic.decisions.ArbitraryCardsSelectionDecision;
|
||||||
|
import com.gempukku.lotro.logic.decisions.DecisionResultInvalidException;
|
||||||
|
import com.gempukku.lotro.logic.timing.Effect;
|
||||||
|
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.LinkedList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class LookAtOpponentsHandEffect implements Effect {
|
||||||
|
private String _playerId;
|
||||||
|
private String _opponentId;
|
||||||
|
|
||||||
|
public LookAtOpponentsHandEffect(String playerId, String opponentId) {
|
||||||
|
_playerId = playerId;
|
||||||
|
_opponentId = opponentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getText(LotroGame game) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EffectResult.Type getType() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EffectResult[] playEffect(LotroGame game) {
|
||||||
|
if (game.getModifiersQuerying().canLookOrRevealCardsInHand(game.getGameState(), _opponentId)) {
|
||||||
|
List<PhysicalCard> opponentHand = new LinkedList<PhysicalCard>(game.getGameState().getHand(_opponentId));
|
||||||
|
|
||||||
|
game.getUserFeedback().sendAwaitingDecision(_playerId,
|
||||||
|
new ArbitraryCardsSelectionDecision(1, "Opponent's hand", opponentHand, Collections.<PhysicalCard>emptyList(), 0, 0) {
|
||||||
|
@Override
|
||||||
|
public void decisionMade(String result) throws DecisionResultInvalidException {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,7 +4,7 @@ import com.gempukku.lotro.cards.AbstractSite;
|
|||||||
import com.gempukku.lotro.cards.PlayConditions;
|
import com.gempukku.lotro.cards.PlayConditions;
|
||||||
import com.gempukku.lotro.cards.costs.ChooseAndExertCharactersCost;
|
import com.gempukku.lotro.cards.costs.ChooseAndExertCharactersCost;
|
||||||
import com.gempukku.lotro.cards.effects.ChooseOpponentEffect;
|
import com.gempukku.lotro.cards.effects.ChooseOpponentEffect;
|
||||||
import com.gempukku.lotro.cards.effects.RevealAndChooseCardsFromOpponentHandEffect;
|
import com.gempukku.lotro.cards.effects.LookAtOpponentsHandEffect;
|
||||||
import com.gempukku.lotro.common.Keyword;
|
import com.gempukku.lotro.common.Keyword;
|
||||||
import com.gempukku.lotro.common.Phase;
|
import com.gempukku.lotro.common.Phase;
|
||||||
import com.gempukku.lotro.common.Race;
|
import com.gempukku.lotro.common.Race;
|
||||||
@@ -43,12 +43,7 @@ public class Card1_351 extends AbstractSite {
|
|||||||
@Override
|
@Override
|
||||||
protected void opponentChosen(String opponentId) {
|
protected void opponentChosen(String opponentId) {
|
||||||
action.appendEffect(
|
action.appendEffect(
|
||||||
new RevealAndChooseCardsFromOpponentHandEffect(playerId, opponentId, "Opponent's hand", Filters.none(), 0, 0) {
|
new LookAtOpponentsHandEffect(playerId, opponentId));
|
||||||
@Override
|
|
||||||
protected void cardsSelected(List<PhysicalCard> selectedCards) {
|
|
||||||
// Do nothing, it's just to look at hand
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return Collections.singletonList(action);
|
return Collections.singletonList(action);
|
||||||
|
|||||||
@@ -0,0 +1,63 @@
|
|||||||
|
package com.gempukku.lotro.cards.set2.isengard;
|
||||||
|
|
||||||
|
import com.gempukku.lotro.cards.AbstractMinion;
|
||||||
|
import com.gempukku.lotro.cards.PlayConditions;
|
||||||
|
import com.gempukku.lotro.cards.costs.ExertCharactersCost;
|
||||||
|
import com.gempukku.lotro.cards.effects.LookAtOpponentsHandEffect;
|
||||||
|
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.game.PhysicalCard;
|
||||||
|
import com.gempukku.lotro.game.state.LotroGame;
|
||||||
|
import com.gempukku.lotro.logic.actions.ActivateCardAction;
|
||||||
|
import com.gempukku.lotro.logic.actions.RequiredTriggerAction;
|
||||||
|
import com.gempukku.lotro.logic.effects.DiscardCardsFromPlayEffect;
|
||||||
|
import com.gempukku.lotro.logic.timing.Action;
|
||||||
|
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set: Mines of Moria
|
||||||
|
* Side: Shadow
|
||||||
|
* Culture: Isengard
|
||||||
|
* Twilight Cost: 2
|
||||||
|
* Type: Minion • Orc
|
||||||
|
* Strength: 6
|
||||||
|
* Vitality: 2
|
||||||
|
* Site: 2
|
||||||
|
* Game Text: Discard this minion if underground. Shadow: Exert this minion to look at the Free Peoples player's hand.
|
||||||
|
*/
|
||||||
|
public class Card2_042 extends AbstractMinion {
|
||||||
|
public Card2_042() {
|
||||||
|
super(2, 6, 2, 2, Race.ORC, Culture.ISENGARD, "Goblin Man");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||||
|
if (game.getModifiersQuerying().hasKeyword(game.getGameState(), game.getGameState().getCurrentSite(), Keyword.UNDERGROUND)) {
|
||||||
|
RequiredTriggerAction action = new RequiredTriggerAction(self);
|
||||||
|
action.appendEffect(
|
||||||
|
new DiscardCardsFromPlayEffect(self, self));
|
||||||
|
return Collections.singletonList(action);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||||
|
if (PlayConditions.canUseShadowCardDuringPhase(game.getGameState(), Phase.SHADOW, self, 0)
|
||||||
|
&& PlayConditions.canExert(game.getGameState(), game.getModifiersQuerying(), self)) {
|
||||||
|
ActivateCardAction action = new ActivateCardAction(self, Keyword.SHADOW);
|
||||||
|
action.appendCost(
|
||||||
|
new ExertCharactersCost(playerId, self));
|
||||||
|
action.appendEffect(
|
||||||
|
new LookAtOpponentsHandEffect(playerId, game.getGameState().getCurrentPlayerId()));
|
||||||
|
|
||||||
|
return Collections.singletonList(action);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user