"Orc Footman"
This commit is contained in:
@@ -206,6 +206,11 @@ public abstract class AbstractLotroCardBlueprint implements LotroCardBlueprint {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OptionalTriggerAction getDiscardedFromPlayOptionalTrigger(String playerId, LotroGame game, PhysicalCard self) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OptionalTriggerAction getKilledOptionalTrigger(String playerId, LotroGame game, PhysicalCard self) {
|
||||
return null;
|
||||
|
||||
@@ -132,6 +132,11 @@ public class SimpleLotroCardBlueprint implements LotroCardBlueprint {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OptionalTriggerAction getDiscardedFromPlayOptionalTrigger(String playerId, LotroGame game, PhysicalCard self) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OptionalTriggerAction getKilledOptionalTrigger(String playerId, LotroGame game, PhysicalCard self) {
|
||||
return null;
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.gempukku.lotro.cards.set12.orc;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractMinion;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.effects.ShuffleCardsFromDiscardIntoDeckEffect;
|
||||
import com.gempukku.lotro.common.CardType;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
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 java.util.Collections;
|
||||
|
||||
/**
|
||||
* Set: Black Rider
|
||||
* Side: Shadow
|
||||
* Culture: Orc
|
||||
* Twilight Cost: 3
|
||||
* Type: Minion • Orc
|
||||
* Strength: 8
|
||||
* Vitality: 2
|
||||
* Site: 4
|
||||
* Game Text: When this minion is discarded from play, you may spot a companion who has resistance 4 or less to shuffle
|
||||
* this minion into your draw deck.
|
||||
*/
|
||||
public class Card12_093 extends AbstractMinion {
|
||||
public Card12_093() {
|
||||
super(3, 8, 2, 4, Race.ORC, Culture.ORC, "Orc Footman");
|
||||
}
|
||||
|
||||
@Override
|
||||
public OptionalTriggerAction getDiscardedFromPlayOptionalTrigger(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canSpot(game, CardType.COMPANION, Filters.maxResistance(4))) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new ShuffleCardsFromDiscardIntoDeckEffect(self, playerId, Collections.singleton(self)));
|
||||
return action;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -73,6 +73,8 @@ public interface LotroCardBlueprint {
|
||||
|
||||
public RequiredTriggerAction getDiscardedFromPlayRequiredTrigger(LotroGame game, PhysicalCard self);
|
||||
|
||||
public OptionalTriggerAction getDiscardedFromPlayOptionalTrigger(String playerId, LotroGame game, PhysicalCard self);
|
||||
|
||||
public OptionalTriggerAction getKilledOptionalTrigger(String playerId, LotroGame game, PhysicalCard self);
|
||||
|
||||
public Block getSiteBlock();
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.gempukku.lotro.game.AbstractActionProxy;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.game.state.actions.DefaultActionsEnvironment;
|
||||
import com.gempukku.lotro.logic.actions.OptionalTriggerAction;
|
||||
import com.gempukku.lotro.logic.actions.RequiredTriggerAction;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
import com.gempukku.lotro.logic.timing.results.DiscardCardsFromPlayResult;
|
||||
@@ -32,6 +33,22 @@ public class DiscardedCardRule {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult) {
|
||||
if (effectResult.getType() == EffectResult.Type.FOR_EACH_DISCARDED_FROM_PLAY) {
|
||||
DiscardCardsFromPlayResult discardResult = (DiscardCardsFromPlayResult) effectResult;
|
||||
final PhysicalCard discardedCard = discardResult.getDiscardedCard();
|
||||
if (discardedCard.getOwner().equals(playerId)) {
|
||||
OptionalTriggerAction trigger = discardedCard.getBlueprint().getDiscardedFromPlayOptionalTrigger(playerId, game, discardedCard);
|
||||
if (trigger != null) {
|
||||
trigger.setVirtualCardAction(true);
|
||||
return Collections.singletonList(trigger);
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user