Removing card duplicates.

This commit is contained in:
marcins78@gmail.com
2012-03-12 14:42:27 +00:00
parent 46ab7ecf35
commit df491a7e61
11 changed files with 33 additions and 226 deletions

View File

@@ -11,18 +11,20 @@ public class LotroCardBlueprintLibraryTest {
LotroCardBlueprintLibrary library = new LotroCardBlueprintLibrary(); LotroCardBlueprintLibrary library = new LotroCardBlueprintLibrary();
Map<String, String> cardNames = new HashMap<String, String>(); Map<String, String> cardNames = new HashMap<String, String>();
for (int i = 1; i <= 1; i++) { for (int i = 0; i <= 19; i++) {
for (int j = 1; j <= 365; j++) { for (int j = 1; j <= 365; j++) {
String blueprintId = i + "_" + j; String blueprintId = i + "_" + j;
try { try {
LotroCardBlueprint cardBlueprint = library.getLotroCardBlueprint(blueprintId); if (blueprintId.equals(library.getBaseBlueprintId(blueprintId))) {
String cardName = cardBlueprint.getName(); LotroCardBlueprint cardBlueprint = library.getLotroCardBlueprint(blueprintId);
if (cardNames.containsKey(cardName)) String cardName = cardBlueprint.getName();
System.out.println("Multiple detected - " + cardName + ": " + cardNames.get(cardName) + " and " + blueprintId); if (cardNames.containsKey(cardName) && !cardBlueprint.isUnique())
else System.out.println("Multiple detected - " + cardName + ": " + cardNames.get(cardName) + " and " + blueprintId);
cardNames.put(cardName, blueprintId); else
cardNames.put(cardName, blueprintId);
}
} catch (IllegalArgumentException exp) { } catch (IllegalArgumentException exp) {
exp.printStackTrace(); //exp.printStackTrace();
} }
} }
} }

View File

@@ -1,41 +0,0 @@
package com.gempukku.lotro.cards.set15.gandalf;
import com.gempukku.lotro.cards.AbstractCompanion;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Race;
import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.GameState;
import com.gempukku.lotro.logic.modifiers.Condition;
import com.gempukku.lotro.logic.modifiers.Modifier;
import com.gempukku.lotro.logic.modifiers.ModifiersQuerying;
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
/**
* Set: The Hunters
* Side: Free
* Culture: Gandalf
* Twilight Cost: 4
* Type: Companion • Ent
* Strength: 6
* Vitality: 4
* Resistance: 6
* Game Text: While you can spot 3 Ents, this companion is strength +2.
*/
public class Card15_028 extends AbstractCompanion {
public Card15_028() {
super(4, 6, 4, 6, Culture.GANDALF, Race.ENT, null, "Ent Avenger");
}
@Override
public Modifier getAlwaysOnModifier(PhysicalCard self) {
return new StrengthModifier(self, self,
new Condition() {
@Override
public boolean isFullfilled(GameState gameState, ModifiersQuerying modifiersQuerying) {
return Filters.countActive(gameState, modifiersQuerying, Race.ENT)
+ modifiersQuerying.getSpotBonus(gameState, Race.ENT) >= 3;
}
}, 2);
}
}

View File

@@ -22,7 +22,7 @@ import com.gempukku.lotro.logic.modifiers.StrengthModifier;
*/ */
public class Card18_124 extends AbstractMinion { public class Card18_124 extends AbstractMinion {
public Card18_124() { public Card18_124() {
super(3, 8, 2, 5, Race.URUK_HAI, Culture.URUK_HAI, "White Hand Attacker"); super(3, 8, 2, 5, Race.URUK_HAI, Culture.URUK_HAI, "White Hand Attacker(2)");
addKeyword(Keyword.DAMAGE, 1); addKeyword(Keyword.DAMAGE, 1);
} }

View File

@@ -1,12 +1,10 @@
package com.gempukku.lotro.cards.set4.raider; package com.gempukku.lotro.cards.set4.raider;
import com.gempukku.lotro.cards.AbstractMinion; import com.gempukku.lotro.cards.AbstractMinion;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.TriggerConditions; import com.gempukku.lotro.cards.TriggerConditions;
import com.gempukku.lotro.cards.effects.RemoveTwilightEffect; import com.gempukku.lotro.cards.effects.RemoveTwilightEffect;
import com.gempukku.lotro.common.Culture; import com.gempukku.lotro.common.*;
import com.gempukku.lotro.common.Keyword;
import com.gempukku.lotro.common.Phase;
import com.gempukku.lotro.common.Race;
import com.gempukku.lotro.filters.Filters; import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.game.PhysicalCard; import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame; import com.gempukku.lotro.game.state.LotroGame;
@@ -38,13 +36,13 @@ public class Card4_220 extends AbstractMinion {
@Override @Override
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) { public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.startOfPhase(game, effectResult, Phase.SKIRMISH) if (TriggerConditions.startOfPhase(game, effectResult, Phase.SKIRMISH)
&& game.getGameState().getSkirmish().getShadowCharacters().contains(self) && PlayConditions.canSpot(game, self, Filters.inSkirmish)
&& game.getGameState().getTwilightPool() >= 3) { && game.getGameState().getTwilightPool() >= 3) {
OptionalTriggerAction action = new OptionalTriggerAction(self); OptionalTriggerAction action = new OptionalTriggerAction(self);
action.appendCost( action.appendCost(
new RemoveTwilightEffect(3)); new RemoveTwilightEffect(3));
action.appendEffect( action.appendEffect(
new ChooseAndWoundCharactersEffect(action, playerId, 1, 1, Filters.inSkirmishAgainst(self))); new ChooseAndWoundCharactersEffect(action, playerId, 1, 1, Filters.or(CardType.COMPANION, CardType.ALLY), Filters.inSkirmishAgainst(self)));
return Collections.singletonList(action); return Collections.singletonList(action);
} }
return null; return null;

View File

@@ -1,12 +1,10 @@
package com.gempukku.lotro.cards.set4.raider; package com.gempukku.lotro.cards.set4.raider;
import com.gempukku.lotro.cards.AbstractMinion; import com.gempukku.lotro.cards.AbstractMinion;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.TriggerConditions; import com.gempukku.lotro.cards.TriggerConditions;
import com.gempukku.lotro.cards.effects.RemoveTwilightEffect; import com.gempukku.lotro.cards.effects.RemoveTwilightEffect;
import com.gempukku.lotro.common.Culture; import com.gempukku.lotro.common.*;
import com.gempukku.lotro.common.Keyword;
import com.gempukku.lotro.common.Phase;
import com.gempukku.lotro.common.Race;
import com.gempukku.lotro.filters.Filters; import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.game.PhysicalCard; import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame; import com.gempukku.lotro.game.state.LotroGame;
@@ -38,13 +36,13 @@ public class Card4_221 extends AbstractMinion {
@Override @Override
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) { public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.startOfPhase(game, effectResult, Phase.SKIRMISH) if (TriggerConditions.startOfPhase(game, effectResult, Phase.SKIRMISH)
&& game.getGameState().getSkirmish().getShadowCharacters().contains(self) && PlayConditions.canSpot(game, self, Filters.inSkirmish)
&& game.getGameState().getTwilightPool() >= 3) { && game.getGameState().getTwilightPool() >= 3) {
OptionalTriggerAction action = new OptionalTriggerAction(self); OptionalTriggerAction action = new OptionalTriggerAction(self);
action.appendCost( action.appendCost(
new RemoveTwilightEffect(3)); new RemoveTwilightEffect(3));
action.appendEffect( action.appendEffect(
new ChooseAndWoundCharactersEffect(action, playerId, 1, 1, Filters.inSkirmishAgainst(self))); new ChooseAndWoundCharactersEffect(action, playerId, 1, 1, Filters.or(CardType.COMPANION, CardType.ALLY), Filters.inSkirmishAgainst(self)));
return Collections.singletonList(action); return Collections.singletonList(action);
} }
return null; return null;

View File

@@ -43,9 +43,6 @@ public class Card4_265 extends AbstractCompanion {
@Override @Override
public List<? extends Modifier> getAlwaysOnModifiers(LotroGame game, PhysicalCard self) { public List<? extends Modifier> getAlwaysOnModifiers(LotroGame game, PhysicalCard self) {
return Collections.singletonList( return Collections.singletonList(
new StrengthModifier(self, new StrengthModifier(self, Filters.and(self, Filters.inSkirmishAgainst(CardType.MINION, Filters.wounded)), 2));
Filters.and(
self,
Filters.inSkirmishAgainst(CardType.MINION, Filters.wounded)), 2));
} }
} }

View File

@@ -6,15 +6,11 @@ import com.gempukku.lotro.common.Race;
import com.gempukku.lotro.filters.Filters; import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.game.PhysicalCard; import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.GameState; import com.gempukku.lotro.game.state.GameState;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.modifiers.Condition; import com.gempukku.lotro.logic.modifiers.Condition;
import com.gempukku.lotro.logic.modifiers.Modifier; import com.gempukku.lotro.logic.modifiers.Modifier;
import com.gempukku.lotro.logic.modifiers.ModifiersQuerying; import com.gempukku.lotro.logic.modifiers.ModifiersQuerying;
import com.gempukku.lotro.logic.modifiers.StrengthModifier; import com.gempukku.lotro.logic.modifiers.StrengthModifier;
import java.util.Collections;
import java.util.List;
/** /**
* Set: Ents of Fangorn * Set: Ents of Fangorn
* Side: Free * Side: Free
@@ -32,15 +28,14 @@ public class Card6_027 extends AbstractCompanion {
} }
@Override @Override
public List<? extends Modifier> getAlwaysOnModifiers(LotroGame game, PhysicalCard self) { public Modifier getAlwaysOnModifier(PhysicalCard self) {
return Collections.singletonList( return new StrengthModifier(self, self,
new StrengthModifier(self, self, new Condition() {
new Condition() { @Override
@Override public boolean isFullfilled(GameState gameState, ModifiersQuerying modifiersQuerying) {
public boolean isFullfilled(GameState gameState, ModifiersQuerying modifiersQuerying) { return Filters.countActive(gameState, modifiersQuerying, Race.ENT)
return Filters.countActive(gameState, modifiersQuerying, Race.ENT) + modifiersQuerying.getSpotBonus(gameState, Race.ENT) >= 3;
+ modifiersQuerying.getSpotBonus(gameState, Race.ENT) >= 3; }
} }, 2);
}, 2));
} }
} }

View File

@@ -1,49 +0,0 @@
package com.gempukku.lotro.cards.set7.raider;
import com.gempukku.lotro.cards.AbstractMinion;
import com.gempukku.lotro.cards.TriggerConditions;
import com.gempukku.lotro.cards.effects.RemoveTwilightEffect;
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.actions.OptionalTriggerAction;
import com.gempukku.lotro.logic.effects.ChooseAndWoundCharactersEffect;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collections;
import java.util.List;
/**
* Set: The Return of the King
* Side: Shadow
* Culture: Raider
* Twilight Cost: 4
* Type: Minion • Man
* Strength: 9
* Vitality: 2
* Site: 4
* Game Text: Southron. At the start of each skirmish involving this minion, you may remove (3) to wound a companion
* or ally he is skirmishing.
*/
public class Card7_136 extends AbstractMinion {
public Card7_136() {
super(4, 9, 2, 4, Race.MAN, Culture.RAIDER, "Desert Soldier");
addKeyword(Keyword.SOUTHRON);
}
@Override
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.startOfPhase(game, effectResult, Phase.SKIRMISH)
&& Filters.inSkirmish.accepts(game.getGameState(), game.getModifiersQuerying(), self)
&& game.getGameState().getTwilightPool() >= 3) {
OptionalTriggerAction action = new OptionalTriggerAction(self);
action.appendCost(
new RemoveTwilightEffect(3));
action.appendEffect(
new ChooseAndWoundCharactersEffect(action, playerId, 1, 1, Filters.or(CardType.COMPANION, CardType.ALLY), Filters.inSkirmishAgainst(self)));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,49 +0,0 @@
package com.gempukku.lotro.cards.set7.raider;
import com.gempukku.lotro.cards.AbstractMinion;
import com.gempukku.lotro.cards.TriggerConditions;
import com.gempukku.lotro.cards.effects.RemoveTwilightEffect;
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.actions.OptionalTriggerAction;
import com.gempukku.lotro.logic.effects.ChooseAndWoundCharactersEffect;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collections;
import java.util.List;
/**
* Set: The Return of the King
* Side: Shadow
* Culture: Raider
* Twilight Cost: 3
* Type: Minion • Man
* Strength: 8
* Vitality: 2
* Site: 4
* Game Text: Southron. At the start of each skirmish involving this minion, you may remove (3) to wound a companion
* or ally he is skirmishing.
*/
public class Card7_137 extends AbstractMinion {
public Card7_137() {
super(3, 8, 2, 4, Race.MAN, Culture.RAIDER, "Desert Spearman");
addKeyword(Keyword.SOUTHRON);
}
@Override
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.startOfPhase(game, effectResult, Phase.SKIRMISH)
&& Filters.inSkirmish.accepts(game.getGameState(), game.getModifiersQuerying(), self)
&& game.getGameState().getTwilightPool() >= 3) {
OptionalTriggerAction action = new OptionalTriggerAction(self);
action.appendCost(
new RemoveTwilightEffect(3));
action.appendEffect(
new ChooseAndWoundCharactersEffect(action, playerId, 1, 1, Filters.or(CardType.COMPANION, CardType.ALLY), Filters.inSkirmishAgainst(self)));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,48 +0,0 @@
package com.gempukku.lotro.cards.set7.rohan;
import com.gempukku.lotro.cards.AbstractCompanion;
import com.gempukku.lotro.common.CardType;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Phase;
import com.gempukku.lotro.common.Race;
import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.GameState;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.modifiers.Modifier;
import com.gempukku.lotro.logic.modifiers.ModifiersQuerying;
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
import java.util.Collections;
import java.util.List;
/**
* Set: The Return of the King
* Side: Free
* Culture: Rohan
* Twilight Cost: 3
* Type: Companion • Man
* Strength: 6
* Vitality: 3
* Resistance: 6
* Game Text: When this companion is in your starting fellowship, his twilight cost is -1. While skirmishing a wounded
* minion, this companion is strength +2.
*/
public class Card7_225 extends AbstractCompanion {
public Card7_225() {
super(3, 6, 3, 6, Culture.ROHAN, Race.MAN, null, "Elite Rider");
}
@Override
public int getTwilightCostModifier(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard self) {
if (gameState.getCurrentPhase() == Phase.PLAY_STARTING_FELLOWSHIP)
return -1;
return 0;
}
@Override
public List<? extends Modifier> getAlwaysOnModifiers(LotroGame game, PhysicalCard self) {
return Collections.singletonList(
new StrengthModifier(self, Filters.and(self, Filters.inSkirmishAgainst(CardType.MINION, Filters.wounded)), 2));
}
}

View File

@@ -144,7 +144,10 @@
7_41,1_76 7_41,1_76
7_52,2_29 7_52,2_29
7_84,1_102 7_84,1_102
7_136,4_220
7_137,4_221
7_207,1_226 7_207,1_226
7_225,4_265
7_297,3_94 7_297,3_94
7_319,1_299 7_319,1_299
7_322,1_304 7_322,1_304
@@ -186,6 +189,7 @@
# The Hunters set # The Hunters set
15_2,1_2 15_2,1_2
15_13,1_41 15_13,1_41
15_28,6_27
15_133,4_287 15_133,4_287
15_145,1_299 15_145,1_299
# Masterworks in The Hunters # Masterworks in The Hunters