Code lift and review of old cards.

This commit is contained in:
marcins78
2013-02-14 16:30:48 +00:00
parent 3e637a41af
commit 926b7badb4
45 changed files with 53 additions and 53 deletions

View File

@@ -38,7 +38,7 @@ public class Card4_151 extends AbstractOldEvent {
int bonus = (game.getModifiersQuerying().hasKeyword(game.getGameState(), game.getGameState().getCurrentSite(), Keyword.BATTLEGROUND)) ? 3 : 2;
action.insertEffect(
new AddUntilEndOfPhaseModifierEffect(
new StrengthModifier(self, Filters.sameCard(card), bonus), Phase.SKIRMISH));
new StrengthModifier(self, Filters.sameCard(card), bonus)));
}
});
return action;

View File

@@ -35,7 +35,7 @@ public class Card4_152 extends AbstractOldEvent {
protected void cardSelected(LotroGame game, PhysicalCard card) {
action.insertEffect(
new AddUntilEndOfPhaseModifierEffect(
new CantBeAssignedToSkirmishModifier(self, Filters.sameCard(card)), Phase.ASSIGNMENT));
new CantBeAssignedToSkirmishModifier(self, Filters.sameCard(card))));
}
});
return action;

View File

@@ -37,7 +37,7 @@ public class Card4_156 extends AbstractOldEvent {
(Filters.inSkirmishAgainst(Filters.hasAttached(Keyword.SEARCH)).accepts(game.getGameState(), game.getModifiersQuerying(), card)) ? 4 : 2;
action.insertEffect(
new AddUntilEndOfPhaseModifierEffect(
new StrengthModifier(self, Filters.sameCard(card), bonus), Phase.SKIRMISH));
new StrengthModifier(self, Filters.sameCard(card), bonus)));
}
});
return action;

View File

@@ -49,7 +49,7 @@ public class Card4_160 extends AbstractMinion {
protected void cardSelected(LotroGame game, PhysicalCard card) {
action.insertEffect(
new AddUntilEndOfPhaseModifierEffect(
new CantTakeWoundsModifier(self, Filters.sameCard(card)), Phase.SKIRMISH));
new CantTakeWoundsModifier(self, Filters.sameCard(card))));
}
});
return Collections.singletonList(action);

View File

@@ -42,7 +42,7 @@ public class Card4_161 extends AbstractOldEvent {
protected void cardSelected(LotroGame game, PhysicalCard card) {
action.insertEffect(
new AddUntilEndOfPhaseModifierEffect(
new StrengthModifier(self, Filters.sameCard(card), -2), Phase.SKIRMISH));
new StrengthModifier(self, Filters.sameCard(card), -2)));
}
});
return action;

View File

@@ -56,7 +56,7 @@ public class Card4_169 extends AbstractMinion {
new ChooseAndWoundCharactersEffect(action, game.getGameState().getCurrentPlayerId(), 1, 1, Filters.unboundCompanion));
action.appendEffect(
new AddUntilEndOfPhaseModifierEffect(
new DoesNotAddToArcheryTotalModifier(self, self), Phase.ARCHERY));
new DoesNotAddToArcheryTotalModifier(self, self)));
return Collections.singletonList(action);
}
return null;

View File

@@ -52,7 +52,7 @@ public class Card4_175 extends AbstractOldEvent {
protected void cardSelected(LotroGame game, PhysicalCard card) {
action.insertEffect(
new AddUntilEndOfPhaseModifierEffect(
new StrengthModifier(self, Filters.sameCard(card), 3), Phase.SKIRMISH));
new StrengthModifier(self, Filters.sameCard(card), 3)));
}
});
}

View File

@@ -48,7 +48,7 @@ public class Card4_183 extends AbstractMinion {
new ChooseAndWoundCharactersEffect(action, game.getGameState().getCurrentPlayerId(), 1, 1, Filters.unboundCompanion));
action.appendEffect(
new AddUntilEndOfPhaseModifierEffect(
new DoesNotAddToArcheryTotalModifier(self, self), Phase.ARCHERY));
new DoesNotAddToArcheryTotalModifier(self, self)));
return Collections.singletonList(action);
}
return null;

View File

@@ -50,7 +50,7 @@ public class Card4_184 extends AbstractMinion {
protected void cardSelected(LotroGame game, PhysicalCard card) {
action.insertEffect(
new AddUntilEndOfPhaseModifierEffect(
new StrengthModifier(self, Filters.sameCard(card), 2), Phase.SKIRMISH));
new StrengthModifier(self, Filters.sameCard(card), 2)));
}
});
return Collections.singletonList(action);

View File

@@ -50,7 +50,7 @@ public class Card4_191 extends AbstractMinion {
protected void cardSelected(LotroGame game, PhysicalCard card) {
action.insertEffect(
new AddUntilEndOfPhaseModifierEffect(
new StrengthModifier(self, Filters.sameCard(card), 1), Phase.SKIRMISH));
new StrengthModifier(self, Filters.sameCard(card), 1)));
}
});
return Collections.singletonList(action);

View File

@@ -36,7 +36,7 @@ public class Card4_208 extends AbstractOldEvent {
int bonus = 2 * Filters.countActive(game.getGameState(), game.getModifiersQuerying(), Filters.attachedTo(Filters.inSkirmishAgainst(card)));
action.insertEffect(
new AddUntilEndOfPhaseModifierEffect(
new StrengthModifier(self, Filters.sameCard(card), bonus), Phase.SKIRMISH));
new StrengthModifier(self, Filters.sameCard(card), bonus)));
}
});
return action;

View File

@@ -34,11 +34,11 @@ public class Card4_210 extends AbstractOldEvent {
boolean controlsSite = Filters.countActive(game.getGameState(), game.getModifiersQuerying(), Filters.siteControlled(playerId)) > 0;
action.insertEffect(
new AddUntilEndOfPhaseModifierEffect(
new StrengthModifier(self, card, 2), Phase.SKIRMISH));
new StrengthModifier(self, card, 2)));
if (controlsSite)
action.appendEffect(
new AddUntilEndOfPhaseModifierEffect(
new KeywordModifier(self, card, Keyword.DAMAGE), Phase.SKIRMISH));
new KeywordModifier(self, card, Keyword.DAMAGE)));
}
});
return action;

View File

@@ -52,7 +52,7 @@ public class Card4_211 extends AbstractPermanent {
new RemoveTokenEffect(self, self, Token.ISENGARD, 2));
action.appendEffect(
new AddUntilEndOfPhaseModifierEffect(
new ArcheryTotalModifier(self, Side.SHADOW, 2), Phase.ARCHERY));
new ArcheryTotalModifier(self, Side.SHADOW, 2)));
action.appendEffect(
new SelfDiscardEffect(self));
return Collections.singletonList(action);

View File

@@ -46,7 +46,7 @@ public class Card4_219 extends AbstractMinion {
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, CardType.COMPANION, Filters.not(Filters.ringBearer)));
action.appendEffect(
new AddUntilEndOfPhaseModifierEffect(
new DoesNotAddToArcheryTotalModifier(self, self), Phase.ARCHERY));
new DoesNotAddToArcheryTotalModifier(self, self)));
return Collections.singletonList(action);
}
return null;

View File

@@ -56,7 +56,7 @@ public class Card4_225 extends AbstractMinion {
protected void cardSelected(LotroGame game, PhysicalCard card) {
action.insertEffect(
new AddUntilEndOfPhaseModifierEffect(
new StrengthModifier(self, Filters.sameCard(card), 2), Phase.SKIRMISH));
new StrengthModifier(self, Filters.sameCard(card), 2)));
}
});
actions.add(action);
@@ -72,7 +72,7 @@ public class Card4_225 extends AbstractMinion {
protected void cardSelected(LotroGame game, PhysicalCard card) {
action.insertEffect(
new AddUntilEndOfPhaseModifierEffect(
new StrengthModifier(self, Filters.sameCard(card), 3), Phase.SKIRMISH));
new StrengthModifier(self, Filters.sameCard(card), 3)));
}
});
actions.add(action);
@@ -88,7 +88,7 @@ public class Card4_225 extends AbstractMinion {
protected void cardSelected(LotroGame game, PhysicalCard card) {
action.insertEffect(
new AddUntilEndOfPhaseModifierEffect(
new StrengthModifier(self, Filters.sameCard(card), 4), Phase.SKIRMISH));
new StrengthModifier(self, Filters.sameCard(card), 4)));
}
});
actions.add(action);

View File

@@ -46,7 +46,7 @@ public class Card4_232 extends AbstractMinion {
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, CardType.COMPANION, Filters.not(Filters.ringBearer)));
action.appendEffect(
new AddUntilEndOfPhaseModifierEffect(
new DoesNotAddToArcheryTotalModifier(self, self), Phase.ARCHERY));
new DoesNotAddToArcheryTotalModifier(self, self)));
return Collections.singletonList(action);
}
return null;

View File

@@ -44,7 +44,7 @@ public class Card4_233 extends AbstractOldEvent {
int bonus = Math.min(5, game.getGameState().getBurdens());
action.insertEffect(
new AddUntilEndOfPhaseModifierEffect(
new StrengthModifier(self, card, bonus), Phase.SKIRMISH));
new StrengthModifier(self, card, bonus)));
}
});
possibleEffects.add(
@@ -58,7 +58,7 @@ public class Card4_233 extends AbstractOldEvent {
protected void cardSelected(LotroGame game, PhysicalCard card) {
action.insertEffect(
new AddUntilEndOfPhaseModifierEffect(
new StrengthModifier(self, card, 2), Phase.SKIRMISH));
new StrengthModifier(self, card, 2)));
}
});
action.appendEffect(

View File

@@ -64,7 +64,7 @@ public class Card4_237 extends AbstractPermanent {
protected void cardSelected(LotroGame game, PhysicalCard card) {
action.insertEffect(
new AddUntilEndOfPhaseModifierEffect(
new StrengthModifier(self, card, 2), Phase.SKIRMISH));
new StrengthModifier(self, card, 2)));
}
});
return Collections.singletonList(action);

View File

@@ -35,7 +35,7 @@ public class Card4_239 extends AbstractOldEvent {
int bonus = (game.getGameState().getBurdens() >= 4) ? 4 : 3;
action.appendEffect(
new AddUntilEndOfPhaseModifierEffect(
new StrengthModifier(self, card, bonus), Phase.SKIRMISH));
new StrengthModifier(self, card, bonus)));
}
});
return action;

View File

@@ -34,7 +34,7 @@ public class Card4_241 extends AbstractOldEvent {
int bonus = (PlayConditions.canSpot(game, 6, CardType.COMPANION)) ? 5 : 3;
action.insertEffect(
new AddUntilEndOfPhaseModifierEffect(
new StrengthModifier(self, Filters.sameCard(card), bonus), Phase.SKIRMISH));
new StrengthModifier(self, Filters.sameCard(card), bonus)));
}
});
return action;

View File

@@ -40,7 +40,7 @@ public class Card4_243 extends AbstractOldEvent {
int total = Math.min(5, game.getGameState().getBurdens());
action.appendEffect(
new AddUntilEndOfPhaseModifierEffect(
new ArcheryTotalModifier(self, Side.SHADOW, total), Phase.ARCHERY));
new ArcheryTotalModifier(self, Side.SHADOW, total)));
return action;
}

View File

@@ -46,7 +46,7 @@ public class Card4_248 extends AbstractMinion {
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, CardType.COMPANION, Filters.not(Filters.ringBearer)));
action.appendEffect(
new AddUntilEndOfPhaseModifierEffect(
new DoesNotAddToArcheryTotalModifier(self, self), Phase.ARCHERY));
new DoesNotAddToArcheryTotalModifier(self, self)));
return Collections.singletonList(action);
}
return null;

View File

@@ -69,7 +69,7 @@ public class Card4_261 extends AbstractPermanent {
protected void cardSelected(LotroGame game, PhysicalCard card) {
action.insertEffect(
new AddUntilEndOfPhaseModifierEffect(
new StrengthModifier(self, Filters.sameCard(card), 2), Phase.SKIRMISH));
new StrengthModifier(self, Filters.sameCard(card), 2)));
}
});
return Collections.singletonList(action);

View File

@@ -40,7 +40,7 @@ public class Card4_262 extends AbstractAlly {
new SelfExertEffect(action, self));
action.appendEffect(
new AddUntilEndOfPhaseModifierEffect(
new ArcheryTotalModifier(self, Side.FREE_PEOPLE, 1), Phase.ARCHERY));
new ArcheryTotalModifier(self, Side.FREE_PEOPLE, 1)));
return Collections.singletonList(action);
}
return null;

View File

@@ -33,7 +33,7 @@ public class Card4_273 extends AbstractOldEvent {
int bonus = Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Keyword.VILLAGER) ? 3 : 2;
action.insertEffect(
new AddUntilEndOfPhaseModifierEffect(
new StrengthModifier(self, Filters.sameCard(card), bonus), Phase.SKIRMISH));
new StrengthModifier(self, Filters.sameCard(card), bonus)));
}
});
return action;

View File

@@ -50,7 +50,7 @@ public class Card4_281 extends AbstractAlly {
protected void cardSelected(LotroGame game, PhysicalCard card) {
action.insertEffect(
new AddUntilEndOfPhaseModifierEffect(
new StrengthModifier(self, Filters.sameCard(card), 2), Phase.SKIRMISH));
new StrengthModifier(self, Filters.sameCard(card), 2)));
}
});
return Collections.singletonList(action);

View File

@@ -33,13 +33,13 @@ public class Card4_297 extends AbstractEvent {
protected void cardSelected(LotroGame game, PhysicalCard card) {
action.insertEffect(
new AddUntilEndOfPhaseModifierEffect(
new StrengthModifier(self, Filters.sameCard(card), 2), Phase.SKIRMISH));
new StrengthModifier(self, Filters.sameCard(card), 2)));
boolean mounted = Filters.mounted.accepts(game.getGameState(), game.getModifiersQuerying(), card);
if (mounted)
action.appendEffect(
new AddUntilEndOfPhaseModifierEffect(
new KeywordModifier(self, Filters.sameCard(card), Keyword.DAMAGE, 2), Phase.SKIRMISH));
new KeywordModifier(self, Filters.sameCard(card), Keyword.DAMAGE, 2)));
}
});
return action;

View File

@@ -50,7 +50,7 @@ public class Card4_307 extends AbstractEvent {
protected void forEachCardExertedCallback(final PhysicalCard character) {
action.appendEffect(
new AddUntilEndOfPhaseModifierEffect(
new StrengthModifier(self, Filters.sameCard(character), 3), Phase.SKIRMISH));
new StrengthModifier(self, Filters.sameCard(character), 3)));
action.appendEffect(
new AddUntilEndOfPhaseActionProxyEffect(
new AbstractActionProxy() {

View File

@@ -40,7 +40,7 @@ public class Card4_319 extends AbstractEvent {
protected void cardSelected(LotroGame game, PhysicalCard card) {
action.insertEffect(
new AddUntilEndOfPhaseModifierEffect(
new OverwhelmedByMultiplierModifier(self, Filters.sameCard(card), 3), Phase.SKIRMISH));
new OverwhelmedByMultiplierModifier(self, Filters.sameCard(card), 3)));
}
});
}

View File

@@ -39,7 +39,7 @@ public class Card4_321 extends AbstractEvent {
protected void cardSelected(LotroGame game, final PhysicalCard hobbit) {
action.insertEffect(
new AddUntilEndOfPhaseModifierEffect(
new CantTakeMoreThanXWoundsModifier(self, Phase.SKIRMISH, 1, hobbit), Phase.SKIRMISH));
new CantTakeMoreThanXWoundsModifier(self, Phase.SKIRMISH, 1, hobbit)));
}
});
}

View File

@@ -36,7 +36,7 @@ public class Card5_011 extends AbstractEvent {
new ChooseAndExertCharactersEffect(action, playerId, 3, 3, Race.ELF, CardType.COMPANION));
action.appendEffect(
new AddUntilEndOfPhaseModifierEffect(
new ArcheryTotalModifier(self, Side.FREE_PEOPLE, 2), Phase.ARCHERY));
new ArcheryTotalModifier(self, Side.FREE_PEOPLE, 2)));
return action;
}
}

View File

@@ -76,7 +76,7 @@ public class Card5_015 extends AbstractCompanion {
new ChoiceEffect(action, playerId, possibleCosts));
action.appendEffect(
new AddUntilEndOfPhaseModifierEffect(
new UnhastyCompanionParticipatesInSkirmishedModifier(self, self), Phase.ASSIGNMENT));
new UnhastyCompanionParticipatesInSkirmishedModifier(self, self)));
return Collections.singletonList(action);
}
return null;

View File

@@ -65,7 +65,7 @@ public class Card5_017 extends AbstractCompanion {
new ChoiceEffect(action, playerId, possibleCosts));
action.appendEffect(
new AddUntilEndOfPhaseModifierEffect(
new UnhastyCompanionParticipatesInSkirmishedModifier(self, self), Phase.ASSIGNMENT));
new UnhastyCompanionParticipatesInSkirmishedModifier(self, self)));
return Collections.singletonList(action);
}
return null;

View File

@@ -64,7 +64,7 @@ public class Card5_019 extends AbstractCompanion {
new ChoiceEffect(action, playerId, possibleCosts));
action.appendEffect(
new AddUntilEndOfPhaseModifierEffect(
new UnhastyCompanionParticipatesInSkirmishedModifier(self, self), Phase.ASSIGNMENT));
new UnhastyCompanionParticipatesInSkirmishedModifier(self, self)));
return Collections.singletonList(action);
}
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.SKIRMISH, self)

View File

@@ -57,7 +57,7 @@ public class Card5_027 extends AbstractAttachable {
protected void cardSelected(LotroGame game, PhysicalCard card) {
action.insertEffect(
new AddUntilEndOfPhaseModifierEffect(
new KeywordModifier(self, Filters.sameCard(card), Keyword.DAMAGE), Phase.SKIRMISH));
new KeywordModifier(self, Filters.sameCard(card), Keyword.DAMAGE)));
}
});
return Collections.singletonList(action);

View File

@@ -52,10 +52,10 @@ public class Card5_029 extends AbstractCompanion {
new AddBurdenEffect(self.getOwner(), self, 1));
action.appendEffect(
new AddUntilEndOfPhaseModifierEffect(
new StrengthModifier(self, self, 2), Phase.SKIRMISH));
new StrengthModifier(self, self, 2)));
action.appendEffect(
new AddUntilEndOfPhaseModifierEffect(
new CantTakeWoundsModifier(self, self), Phase.SKIRMISH));
new CantTakeWoundsModifier(self, self)));
return Collections.singletonList(action);
}
return null;

View File

@@ -54,7 +54,7 @@ public class Card5_044 extends AbstractPermanent {
protected void cardSelected(LotroGame game, PhysicalCard card) {
action.insertEffect(
new AddUntilEndOfPhaseModifierEffect(
new KeywordModifier(self, Filters.sameCard(card), Keyword.DAMAGE), Phase.SKIRMISH));
new KeywordModifier(self, Filters.sameCard(card), Keyword.DAMAGE)));
}
});
action.appendEffect(

View File

@@ -68,7 +68,7 @@ public class Card5_046 extends AbstractMinion {
new SelfExertEffect(action, self));
action.appendEffect(
new AddUntilEndOfPhaseModifierEffect(
new StrengthModifier(self, self, 8), Phase.SKIRMISH));
new StrengthModifier(self, self, 8)));
return Collections.singletonList(action);
}
return null;

View File

@@ -37,7 +37,7 @@ public class Card5_068 extends AbstractEvent {
boolean isMounted = Filters.mounted.accepts(game.getGameState(), game.getModifiersQuerying(), card);
action.insertEffect(
new AddUntilEndOfPhaseModifierEffect(
new StrengthModifier(self, Filters.sameCard(card), 2), Phase.SKIRMISH));
new StrengthModifier(self, Filters.sameCard(card), 2)));
if (isMounted)
action.appendEffect(
new HealCharactersEffect(self, card));

View File

@@ -61,10 +61,10 @@ public class Card5_082 extends AbstractCompanion {
});
action.appendEffect(
new AddUntilEndOfPhaseModifierEffect(
new StrengthModifier(self, self, 2), Phase.SKIRMISH));
new StrengthModifier(self, self, 2)));
action.appendEffect(
new AddUntilEndOfPhaseModifierEffect(
new KeywordModifier(self, self, Keyword.DAMAGE), Phase.SKIRMISH));
new KeywordModifier(self, self, Keyword.DAMAGE)));
return Collections.singletonList(action);
}
return null;

View File

@@ -48,7 +48,7 @@ public class Card5_087 extends AbstractPermanent {
});
possibleEffects.add(
new AddUntilEndOfPhaseModifierEffect(
new ArcheryTotalModifier(self, Side.SHADOW, -3), Phase.ARCHERY) {
new ArcheryTotalModifier(self, Side.SHADOW, -3)) {
@Override
public String getText(LotroGame game) {
return "Make the minion archery total -3";

View File

@@ -45,7 +45,7 @@ public class Card5_094 extends AbstractPermanent {
boolean atPlains = game.getModifiersQuerying().hasKeyword(game.getGameState(), game.getGameState().getCurrentSite(), Keyword.PLAINS);
action.insertEffect(
new AddUntilEndOfPhaseModifierEffect(
new StrengthModifier(self, Filters.sameCard(card), 3), Phase.SKIRMISH));
new StrengthModifier(self, Filters.sameCard(card), 3)));
if (atPlains)
action.appendEffect(
new HealCharactersEffect(self, card));

View File

@@ -41,7 +41,7 @@ public class Card5_096 extends AbstractEvent {
int ringBoundCompanions = Filters.countActive(game.getGameState(), game.getModifiersQuerying(), CardType.COMPANION, Keyword.RING_BOUND);
action.insertEffect(
new AddUntilEndOfPhaseModifierEffect(
new StrengthModifier(self, Filters.sameCard(card), -ringBoundCompanions), Phase.SKIRMISH));
new StrengthModifier(self, Filters.sameCard(card), -ringBoundCompanions)));
}
});
return action;

View File

@@ -52,11 +52,11 @@ public class Card5_116 extends AbstractAttachableFPPossession {
if (card.getBlueprint().getName().equals("Smeagol"))
action.insertEffect(
new AddUntilEndOfPhaseModifierEffect(
new StrengthModifier(self, Filters.sameCard(card), 2), Phase.SKIRMISH));
new StrengthModifier(self, Filters.sameCard(card), 2)));
else
action.insertEffect(
new AddUntilEndOfPhaseModifierEffect(
new StrengthModifier(self, Filters.sameCard(card), -2), Phase.SKIRMISH));
new StrengthModifier(self, Filters.sameCard(card), -2)));
}
});
return Collections.singletonList(action);

View File

@@ -41,7 +41,7 @@ public class Card5_118 extends AbstractSite {
new RemoveTwilightEffect(9));
action.appendEffect(
new AddUntilEndOfPhaseModifierEffect(
new SpecialFlagModifier(self, ModifierFlag.HAS_TO_MOVE_IF_POSSIBLE), Phase.REGROUP));
new SpecialFlagModifier(self, ModifierFlag.HAS_TO_MOVE_IF_POSSIBLE)));
return Collections.singletonList(action);
}
return null;