"Merciless Uruk"
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
package com.gempukku.lotro.cards.effects;
|
||||
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.GameState;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.GameUtils;
|
||||
import com.gempukku.lotro.logic.timing.AbstractEffect;
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
public class PutCardFromPlayOnBottomOfDeckEffect extends AbstractEffect {
|
||||
private PhysicalCard _physicalCard;
|
||||
|
||||
public PutCardFromPlayOnBottomOfDeckEffect(PhysicalCard physicalCard) {
|
||||
_physicalCard = physicalCard;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPlayableInFull(LotroGame game) {
|
||||
return _physicalCard.getZone().isInPlay();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected FullEffectResult playEffectReturningResult(LotroGame game) {
|
||||
if (isPlayableInFull(game)) {
|
||||
GameState gameState = game.getGameState();
|
||||
gameState.sendMessage(_physicalCard.getOwner() + " puts " + GameUtils.getCardLink(_physicalCard) + " from play on the bottom of deck");
|
||||
gameState.removeCardsFromZone(_physicalCard.getOwner(), Collections.singleton(_physicalCard));
|
||||
gameState.putCardOnBottomOfDeck(_physicalCard);
|
||||
return new FullEffectResult(true, true);
|
||||
}
|
||||
return new FullEffectResult(false, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(LotroGame game) {
|
||||
return "Put " + GameUtils.getCardLink(_physicalCard) + " from play on bottom of deck";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Type getType() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.gempukku.lotro.cards.set12.uruk_hai;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractMinion;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.TriggerConditions;
|
||||
import com.gempukku.lotro.cards.effects.PutCardFromPlayOnBottomOfDeckEffect;
|
||||
import com.gempukku.lotro.common.CardType;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Keyword;
|
||||
import com.gempukku.lotro.common.Race;
|
||||
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.OptionalTriggerAction;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: Black Rider
|
||||
* Side: Shadow
|
||||
* Culture: Uruk-hai
|
||||
* Twilight Cost: 4
|
||||
* Type: Minion • Uruk-Hai
|
||||
* Strength: 11
|
||||
* Vitality: 3
|
||||
* Site: 5
|
||||
* Game Text: Damage +1. Each time this minion wins a skirmish, you may spot a companion who has resistance 4 or less
|
||||
* to place this minion on the bottom of your draw deck.
|
||||
*/
|
||||
public class Card12_142 extends AbstractMinion {
|
||||
public Card12_142() {
|
||||
super(4, 11, 3, 5, Race.URUK_HAI, Culture.URUK_HAI, "Merciless Uruk");
|
||||
addKeyword(Keyword.DAMAGE, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (TriggerConditions.winsSkirmish(game, effectResult, self)
|
||||
&& PlayConditions.canSpot(game, CardType.COMPANION, Filters.maxResistance(4))) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new PutCardFromPlayOnBottomOfDeckEffect(self));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user