"Anger"
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
package com.gempukku.lotro.cards.set4.dunland;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractEvent;
|
||||
import com.gempukku.lotro.cards.actions.PlayEventAction;
|
||||
import com.gempukku.lotro.cards.effects.AddUntilStartOfPhaseModifierEffect;
|
||||
import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
|
||||
import com.gempukku.lotro.logic.modifiers.KeywordModifier;
|
||||
|
||||
/**
|
||||
* Set: The Two Towers
|
||||
* Side: Shadow
|
||||
* Culture: Dunland
|
||||
* Twilight Cost: 0
|
||||
* Type: Event
|
||||
* Game Text: Skirmish: Spot 3 [DUNLAND] minions or a site you control to make a [DUNLAND] Man fierce until the regroup phase.
|
||||
*/
|
||||
public class Card4_003 extends AbstractEvent {
|
||||
public Card4_003() {
|
||||
super(Side.SHADOW, Culture.DUNLAND, "Anger", Phase.SKIRMISH);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
|
||||
return super.checkPlayRequirements(playerId, game, self, twilightModifier)
|
||||
&& (
|
||||
Filters.countSpottable(game.getGameState(), game.getModifiersQuerying(), Filters.culture(Culture.DUNLAND), Filters.type(CardType.MINION)) >= 3
|
||||
|| Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.siteControlled(playerId)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTwilightCost() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, final PhysicalCard self, int twilightModifier) {
|
||||
final PlayEventAction action = new PlayEventAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseActiveCardEffect(self, playerId, "Choose DUNLAND Man", Filters.culture(Culture.DUNLAND), Filters.race(Race.MAN)) {
|
||||
@Override
|
||||
protected void cardSelected(PhysicalCard card) {
|
||||
action.appendEffect(
|
||||
new AddUntilStartOfPhaseModifierEffect(
|
||||
new KeywordModifier(self, Filters.sameCard(card), Keyword.FIERCE), Phase.REGROUP));
|
||||
}
|
||||
});
|
||||
return action;
|
||||
}
|
||||
}
|
||||
@@ -359,6 +359,15 @@ public class Filters {
|
||||
};
|
||||
}
|
||||
|
||||
public static Filter siteControlled(final String playerId) {
|
||||
return new Filter() {
|
||||
@Override
|
||||
public boolean accepts(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard physicalCard) {
|
||||
return physicalCard.getBlueprint().getCardType() == CardType.SITE && playerId.equals(physicalCard.getController());
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public static Filter culture(final Culture culture) {
|
||||
return new Filter() {
|
||||
@Override
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.util.Map;
|
||||
public class LotroCardBlueprintLibrary {
|
||||
private String[] _packageNames =
|
||||
new String[]{
|
||||
"", ".dwarven", ".elven", ".gandalf", ".gondor", ".isengard", ".moria", ".wraith", ".sauron", ".shire", ".site"
|
||||
"", ".dwarven", ".dunland", ".elven", ".gandalf", ".gondor", ".isengard", ".moria", ".wraith", ".sauron", ".shire", ".site"
|
||||
};
|
||||
private Map<String, LotroCardBlueprint> _blueprintMap = new HashMap<String, LotroCardBlueprint>();
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@ public interface PhysicalCard {
|
||||
|
||||
public String getOwner();
|
||||
|
||||
public String getController();
|
||||
|
||||
public int getCardId();
|
||||
|
||||
public LotroCardBlueprint getBlueprint();
|
||||
|
||||
@@ -12,6 +12,7 @@ public class PhysicalCardImpl implements PhysicalCard {
|
||||
private int _cardId;
|
||||
private String _blueprintId;
|
||||
private String _owner;
|
||||
private String _controller;
|
||||
private Zone _zone;
|
||||
private LotroCardBlueprint _blueprint;
|
||||
|
||||
@@ -49,6 +50,15 @@ public class PhysicalCardImpl implements PhysicalCard {
|
||||
return _owner;
|
||||
}
|
||||
|
||||
public void setController(String controller) {
|
||||
_controller = controller;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getController() {
|
||||
return _controller;
|
||||
}
|
||||
|
||||
public void startAffectingGame(ModifiersEnvironment modifiersEnvironment) {
|
||||
List<? extends Modifier> modifiers = _blueprint.getAlwaysOnModifiers(this);
|
||||
if (modifiers != null) {
|
||||
|
||||
Reference in New Issue
Block a user