"King's Room"
This commit is contained in:
@@ -0,0 +1,41 @@
|
|||||||
|
package com.gempukku.lotro.cards.set4.site;
|
||||||
|
|
||||||
|
import com.gempukku.lotro.cards.AbstractSite;
|
||||||
|
import com.gempukku.lotro.cards.effects.ExertCharactersEffect;
|
||||||
|
import com.gempukku.lotro.common.Block;
|
||||||
|
import com.gempukku.lotro.common.CardType;
|
||||||
|
import com.gempukku.lotro.common.Culture;
|
||||||
|
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.RequiredTriggerAction;
|
||||||
|
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set: The Two Towers
|
||||||
|
* Twilight Cost: 6
|
||||||
|
* Type: Site
|
||||||
|
* Site: 7T
|
||||||
|
* Game Text: When the fellowship moves to King's Room without a [ROHAN] companion, each unbound companion must exert.
|
||||||
|
*/
|
||||||
|
public class Card4_357 extends AbstractSite {
|
||||||
|
public Card4_357() {
|
||||||
|
super("King's Room", Block.TWO_TOWERS, 7, 6, Direction.RIGHT);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||||
|
if (effectResult.getType() == EffectResult.Type.WHEN_MOVE_TO
|
||||||
|
&& game.getGameState().getCurrentSite() == self
|
||||||
|
&& Filters.countActive(game.getGameState(), game.getModifiersQuerying(), Culture.ROHAN, CardType.COMPANION) == 0) {
|
||||||
|
RequiredTriggerAction action = new RequiredTriggerAction(self);
|
||||||
|
action.appendEffect(
|
||||||
|
new ExertCharactersEffect(self, Filters.unboundCompanion));
|
||||||
|
return Collections.singletonList(action);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -49,7 +49,7 @@ public class Filters {
|
|||||||
return visitor.getCard();
|
return visitor.getCard();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int countActive(GameState gameState, ModifiersQuerying modifiersQuerying, Filter... filters) {
|
public static int countActive(GameState gameState, ModifiersQuerying modifiersQuerying, Filterable... filters) {
|
||||||
GetCardsMatchingFilterVisitor matchingFilterVisitor = new GetCardsMatchingFilterVisitor(gameState, modifiersQuerying, Filters.and(filters));
|
GetCardsMatchingFilterVisitor matchingFilterVisitor = new GetCardsMatchingFilterVisitor(gameState, modifiersQuerying, Filters.and(filters));
|
||||||
gameState.iterateActiveCards(matchingFilterVisitor);
|
gameState.iterateActiveCards(matchingFilterVisitor);
|
||||||
return matchingFilterVisitor.getCounter();
|
return matchingFilterVisitor.getCounter();
|
||||||
|
|||||||
Reference in New Issue
Block a user