Simplifying Modifiers.

This commit is contained in:
marcins78@gmail.com
2011-08-29 13:39:38 +00:00
parent a6f015d17a
commit 0a93f4c402
10 changed files with 15 additions and 15 deletions

View File

@@ -7,8 +7,8 @@ import com.gempukku.lotro.logic.modifiers.AbstractModifier;
import com.gempukku.lotro.logic.modifiers.ModifiersQuerying; import com.gempukku.lotro.logic.modifiers.ModifiersQuerying;
public class AllyOnCurrentSiteModifier extends AbstractModifier { public class AllyOnCurrentSiteModifier extends AbstractModifier {
public AllyOnCurrentSiteModifier(PhysicalCard source, String text, Filter affectFilter) { public AllyOnCurrentSiteModifier(PhysicalCard source, Filter affectFilter) {
super(source, text, affectFilter); super(source, "Can participate in archery and skirmishes", affectFilter);
} }
@Override @Override

View File

@@ -7,8 +7,8 @@ import com.gempukku.lotro.logic.modifiers.AbstractModifier;
import com.gempukku.lotro.logic.modifiers.ModifiersQuerying; import com.gempukku.lotro.logic.modifiers.ModifiersQuerying;
public class CantTakeWoundsModifier extends AbstractModifier { public class CantTakeWoundsModifier extends AbstractModifier {
public CantTakeWoundsModifier(PhysicalCard source, String text, Filter affectFilter) { public CantTakeWoundsModifier(PhysicalCard source, Filter affectFilter) {
super(source, text, affectFilter); super(source, "Can't take wounds", affectFilter);
} }
@Override @Override

View File

@@ -10,8 +10,8 @@ import com.gempukku.lotro.logic.modifiers.ModifiersQuerying;
public class KeywordModifier extends AbstractModifier { public class KeywordModifier extends AbstractModifier {
private Keyword _keyword; private Keyword _keyword;
public KeywordModifier(PhysicalCard physicalCard, String text, Filter affectFilter, Keyword keyword) { public KeywordModifier(PhysicalCard physicalCard, Filter affectFilter, Keyword keyword) {
super(physicalCard, text, affectFilter); super(physicalCard, "Has " + keyword, affectFilter);
_keyword = keyword; _keyword = keyword;
} }

View File

@@ -8,8 +8,8 @@ import com.gempukku.lotro.logic.modifiers.ModifiersQuerying;
public class MoveLimitModifier extends AbstractModifier { public class MoveLimitModifier extends AbstractModifier {
private int _moveLimitModifier; private int _moveLimitModifier;
public MoveLimitModifier(PhysicalCard source, String text, int moveLimitModifier) { public MoveLimitModifier(PhysicalCard source, int moveLimitModifier) {
super(source, text, null); super(source, "Move limit " + ((moveLimitModifier < 0) ? moveLimitModifier : ("+" + moveLimitModifier)), null);
_moveLimitModifier = moveLimitModifier; _moveLimitModifier = moveLimitModifier;
} }

View File

@@ -49,7 +49,7 @@ public class Card1_015 extends AbstractAttachableFPPossession {
CostToEffectAction action = new CostToEffectAction(self, "Discard Gimli's Helm to prevent all wounds to him"); CostToEffectAction action = new CostToEffectAction(self, "Discard Gimli's Helm to prevent all wounds to him");
action.addCost(new DiscardCardFromPlayEffect(self)); action.addCost(new DiscardCardFromPlayEffect(self));
action.addEffect(new AddUntilEndOfPhaseModifierEffect( action.addEffect(new AddUntilEndOfPhaseModifierEffect(
new CantTakeWoundsModifier(self, "Prevent all wounds to him", Filters.sameCard(self.getAttachedTo())), Phase.SKIRMISH) new CantTakeWoundsModifier(self, Filters.sameCard(self.getAttachedTo())), Phase.SKIRMISH)
); );
actions.add(action); actions.add(action);
} }
@@ -62,7 +62,7 @@ public class Card1_015 extends AbstractAttachableFPPossession {
if (PlayConditions.isWounded(effectResult, self.getAttachedTo())) { if (PlayConditions.isWounded(effectResult, self.getAttachedTo())) {
CostToEffectAction action = new CostToEffectAction(self, "Apply damage prevention"); CostToEffectAction action = new CostToEffectAction(self, "Apply damage prevention");
action.addEffect(new AddUntilEndOfPhaseModifierEffect( action.addEffect(new AddUntilEndOfPhaseModifierEffect(
new CantTakeWoundsModifier(self, "Can't take more than 1 wound during each skirmish phase", Filters.sameCard(self.getAttachedTo())), Phase.SKIRMISH)); new CantTakeWoundsModifier(self, Filters.sameCard(self.getAttachedTo())), Phase.SKIRMISH));
return Collections.<Action>singletonList(action); return Collections.<Action>singletonList(action);
} }
return null; return null;

View File

@@ -43,6 +43,6 @@ public class Card1_021 extends AbstractLotroCardBlueprint {
@Override @Override
public Modifier getAlwaysOnEffect(PhysicalCard self) { public Modifier getAlwaysOnEffect(PhysicalCard self) {
return new KeywordModifier(self, "Each Dwarf is Damage +1", Filters.keyword(Keyword.DWARF), Keyword.DAMAGE); return new KeywordModifier(self, Filters.keyword(Keyword.DWARF), Keyword.DAMAGE);
} }
} }

View File

@@ -50,7 +50,7 @@ public class Card1_027 extends AbstractAlly {
action.addCost(new ExertCharacterEffect(self)); action.addCost(new ExertCharacterEffect(self));
action.addEffect( action.addEffect(
new AddUntilStartOfPhaseModifierEffect( new AddUntilStartOfPhaseModifierEffect(
new AllyOnCurrentSiteModifier(self, "Can participate in archery fire and skimishes", Filters.sameCard(self)), Phase.REGROUP)); new AllyOnCurrentSiteModifier(self, Filters.sameCard(self)), Phase.REGROUP));
} }
return actions; return actions;

View File

@@ -42,6 +42,6 @@ public class Card1_041 extends AbstractAttachableFPPossession {
@Override @Override
public Modifier getAlwaysOnEffect(PhysicalCard self) { public Modifier getAlwaysOnEffect(PhysicalCard self) {
return new KeywordModifier(self, "Bearer is an archer", Filters.sameCard(self.getAttachedTo()), Keyword.ARCHER); return new KeywordModifier(self, Filters.sameCard(self.getAttachedTo()), Keyword.ARCHER);
} }
} }

View File

@@ -59,7 +59,7 @@ public class Card1_046 extends AbstractLotroCardBlueprint {
public List<? extends Action> getRequiredWhenActions(LotroGame game, EffectResult effectResult, PhysicalCard self) { public List<? extends Action> getRequiredWhenActions(LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (effectResult.getType() == EffectResult.Type.WHEN_MOVE_FROM) { if (effectResult.getType() == EffectResult.Type.WHEN_MOVE_FROM) {
CostToEffectAction action = new CostToEffectAction(self, "Move limit for this turn is +1"); CostToEffectAction action = new CostToEffectAction(self, "Move limit for this turn is +1");
action.addEffect(new AddUntilEndOfTurnModifierEffect(new MoveLimitModifier(self, "Move limit for this turn is +1", 1))); action.addEffect(new AddUntilEndOfTurnModifierEffect(new MoveLimitModifier(self, 1)));
return Collections.singletonList(action); return Collections.singletonList(action);
} }
return null; return null;

View File

@@ -44,7 +44,7 @@ public class Card1_146 extends AbstractMinion {
&& Filters.countActive(lotroGame.getGameState(), lotroGame.getModifiersQuerying(), Filters.type(CardType.COMPANION)) >= 5) { && Filters.countActive(lotroGame.getGameState(), lotroGame.getModifiersQuerying(), Filters.type(CardType.COMPANION)) >= 5) {
CostToEffectAction action = new CostToEffectAction(self, "Spot 5 companions to make this minion fierce until the regroup phase"); CostToEffectAction action = new CostToEffectAction(self, "Spot 5 companions to make this minion fierce until the regroup phase");
action.addEffect(new AddUntilStartOfPhaseModifierEffect(new KeywordModifier(self, "Give Fierce until Regroup phase", Filters.sameCard(self), Keyword.FIERCE), Phase.REGROUP)); action.addEffect(new AddUntilStartOfPhaseModifierEffect(new KeywordModifier(self, Filters.sameCard(self), Keyword.FIERCE), Phase.REGROUP));
actions.add(action); actions.add(action);
} }