"Saruman's Staff"

This commit is contained in:
marcins78@gmail.com
2011-10-10 19:23:03 +00:00
parent 599f40c238
commit 18c13599bb
2 changed files with 8 additions and 7 deletions

View File

@@ -31,12 +31,7 @@ public class Card1_213 extends AbstractEvent {
new ChooseActiveCardEffect(self, playerId, "Choose a Nazgul", Filters.race(Race.NAZGUL)) {
@Override
protected void cardSelected(PhysicalCard nazgul) {
boolean notAssigned = Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.keyword(Keyword.RING_BEARER), Filters.notAssigned());
if (notAssigned) {
PhysicalCard fpChar = game.getGameState().getSkirmish().getFellowshipCharacter();
if (fpChar != null && game.getModifiersQuerying().hasKeyword(game.getGameState(), fpChar, Keyword.RING_BEARER))
notAssigned = false;
}
boolean notAssigned = Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.keyword(Keyword.RING_BEARER), Filters.notAssignedToSkirmish());
action.appendEffect(
new AddUntilEndOfPhaseModifierEffect(
new StrengthModifier(self, Filters.sameCard(nazgul), notAssigned ? 2 : 3), Phase.SKIRMISH));

View File

@@ -157,7 +157,7 @@ public class Filters {
};
}
public static Filter notAssigned() {
public static Filter notAssignedToSkirmish() {
return new Filter() {
@Override
public boolean accepts(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard physicalCard) {
@@ -166,6 +166,12 @@ public class Filters {
|| assignment.getShadowCharacters().contains(physicalCard))
return false;
}
Skirmish skirmish = gameState.getSkirmish();
if (skirmish != null) {
if (skirmish.getFellowshipCharacter() == physicalCard
|| skirmish.getShadowCharacters().contains(physicalCard))
return false;
}
return true;
}
};