diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/effects/RemoveTwilightEffect.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/effects/RemoveTwilightEffect.java index 648663b9d..b1011564c 100644 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/effects/RemoveTwilightEffect.java +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/effects/RemoveTwilightEffect.java @@ -12,7 +12,8 @@ public class RemoveTwilightEffect extends UnrespondableEffect { @Override public boolean canPlayEffect(LotroGame game) { - return _twilight <= game.getGameState().getTwilightPool(); + return true; +// return _twilight <= game.getGameState().getTwilightPool(); } @Override diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set1/gandalf/Card1_075.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set1/gandalf/Card1_075.java index d84bdc844..5b9cc37a7 100644 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set1/gandalf/Card1_075.java +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set1/gandalf/Card1_075.java @@ -65,7 +65,7 @@ public class Card1_075 extends AbstractAttachableFPPossession { else keyword = Keyword.REGROUP; - final DefaultCostToEffectAction action = new DefaultCostToEffectAction(self, keyword, "Exert Frodo to reveal an opponent's hand. Remove (1) for each Orc revealed (limit (4))."); + final DefaultCostToEffectAction action = new DefaultCostToEffectAction(self, keyword, "Exert Gandalf to reveal an opponent's hand. Remove (1) for each Orc revealed."); action.addCost(new ExertCharacterEffect(playerId, self.getAttachedTo())); action.addEffect( new ChooseOpponentEffect(playerId) { diff --git a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/game/state/GameState.java b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/game/state/GameState.java index 6b86db9d5..44244a7e0 100644 --- a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/game/state/GameState.java +++ b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/game/state/GameState.java @@ -617,7 +617,7 @@ public class GameState { } public void removeTwilight(int twilight) { - setTwilight(_twilightPool - Math.max(0, twilight)); + setTwilight(_twilightPool - Math.min(Math.max(0, twilight), _twilightPool)); } public void assignToSkirmishes(PhysicalCard fp, List minions) { diff --git a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/timing/rules/ResolveSkirmishRule.java b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/timing/rules/ResolveSkirmishRule.java index 8179ff301..1e2e3256a 100644 --- a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/timing/rules/ResolveSkirmishRule.java +++ b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/timing/rules/ResolveSkirmishRule.java @@ -51,7 +51,7 @@ public class ResolveSkirmishRule { return actions; } else if (effectResult.getType() == EffectResult.Type.OVERWHELM_IN_SKIRMISH) { OverwhelmSkirmishResult skirmishResult = (OverwhelmSkirmishResult) effectResult; - List losers = skirmishResult.getLosers(); + List losers = new LinkedList(skirmishResult.getLosers()); RequiredTriggerAction action = new RequiredTriggerAction(null, null, "Kill overwhelmed characters"); action.addEffect(new KillEffect(losers)); diff --git a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/chat/ChatRoom.java b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/chat/ChatRoom.java index 04a42232f..9fe022633 100644 --- a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/chat/ChatRoom.java +++ b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/chat/ChatRoom.java @@ -3,7 +3,7 @@ package com.gempukku.lotro.chat; import java.util.*; public class ChatRoom { - private int _maxMessageCount = 10; + private int _maxMessageHistoryCount = 50; private LinkedList _lastMessages = new LinkedList(); private Map _chatRoomListeners = new HashMap(); @@ -34,7 +34,7 @@ public class ChatRoom { } private void shrinkLastMessages() { - while (_lastMessages.size() > _maxMessageCount) { + while (_lastMessages.size() > _maxMessageHistoryCount) { _lastMessages.removeFirst(); } } diff --git a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/db/CollectionDAO.java b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/db/CollectionDAO.java index 8ca2b5459..f37255e4a 100644 --- a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/db/CollectionDAO.java +++ b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/db/CollectionDAO.java @@ -15,16 +15,20 @@ import java.util.concurrent.ConcurrentHashMap; public class CollectionDAO { private DbAccess _dbAccess; + private CardCollection _defaultCollection; private CollectionSerializer _collectionSerializer; private Map> _collections = new ConcurrentHashMap>(); - public CollectionDAO(DbAccess dbAccess, LotroCardBlueprintLibrary library) { + public CollectionDAO(DbAccess dbAccess, LotroCardBlueprintLibrary library, CardCollection defaultCollection) { _dbAccess = dbAccess; + _defaultCollection = defaultCollection; _collectionSerializer = new CollectionSerializer(library); } public CardCollection getCollectionForPlayer(Player player, String type) { + if (type == null || type.equals("default")) + return _defaultCollection; Map playerCollections = _collections.get(player.getId()); if (playerCollections != null) { CardCollection collection = playerCollections.get(type); @@ -87,13 +91,15 @@ public class CollectionDAO { } public void setCollectionForPlayer(Player player, String type, CardCollection collection) { - storeCollectionToDB(player, type, collection); - Map collectionsByType = _collections.get(player.getId()); - if (collectionsByType == null) { - collectionsByType = new ConcurrentHashMap(); - _collections.put(player.getId(), collectionsByType); + if (!type.equals("default")) { + storeCollectionToDB(player, type, collection); + Map collectionsByType = _collections.get(player.getId()); + if (collectionsByType == null) { + collectionsByType = new ConcurrentHashMap(); + _collections.put(player.getId(), collectionsByType); + } + collectionsByType.put(type, collection); } - collectionsByType.put(type, collection); } private void storeCollectionToDB(Player player, String type, CardCollection collection) { diff --git a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/db/LeagueDAO.java b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/db/LeagueDAO.java index 3cc1816c9..083528388 100644 --- a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/db/LeagueDAO.java +++ b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/db/LeagueDAO.java @@ -8,9 +8,7 @@ import com.gempukku.lotro.game.MutableCardCollection; import java.io.IOException; import java.io.InputStream; import java.sql.*; -import java.util.Collections; -import java.util.HashSet; -import java.util.Set; +import java.util.*; public class LeagueDAO { private DbAccess _dbAccess; @@ -18,21 +16,14 @@ public class LeagueDAO { private CollectionSerializer _serializer; - private Set _leagues = new HashSet(); + private int _dateLoaded; + private Set _activeLeagues = new HashSet(); public LeagueDAO(DbAccess dbAccess, LotroCardBlueprintLibrary library) { _dbAccess = dbAccess; _library = library; _serializer = new CollectionSerializer(_library); - - try { - loadLeagues(); - } catch (SQLException e) { - throw new RuntimeException("Unable to load Leagues", e); - } catch (IOException e) { - throw new RuntimeException("Unable to load Leagues", e); - } } private void loadLeagues() throws SQLException, IOException { @@ -52,7 +43,7 @@ public class LeagueDAO { try { MutableCardCollection collection = _serializer.deserializeCollection(inputStream); - _leagues.add(new League(id, name, type, collection)); + _activeLeagues.add(new League(id, name, type, collection)); } finally { inputStream.close(); } @@ -71,7 +62,31 @@ public class LeagueDAO { } } - public Set getAllLeagues() { - return Collections.unmodifiableSet(_leagues); + private int getCurrentDate() { + Calendar date = new GregorianCalendar(TimeZone.getTimeZone("GMT")); + return date.get(Calendar.YEAR) * 10000 + (date.get(Calendar.MONTH) + 1) * 100 + date.get(Calendar.DAY_OF_MONTH); + } + + private synchronized void ensureLoadedCurrentLeagues() { + int currentDate = getCurrentDate(); + if (currentDate != _dateLoaded) { + try { + loadLeagues(); + _dateLoaded = currentDate; + } catch (SQLException e) { + throw new RuntimeException("Unable to load Leagues", e); + } catch (IOException e) { + throw new RuntimeException("Unable to load Leagues", e); + } + } + } + + public Set getActiveLeagues() { + if (getCurrentDate() == _dateLoaded) + return Collections.unmodifiableSet(_activeLeagues); + else { + ensureLoadedCurrentLeagues(); + return Collections.unmodifiableSet(_activeLeagues); + } } } diff --git a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/hall/AwaitingTable.java b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/hall/AwaitingTable.java index e7e03a3c8..802fd0bcb 100644 --- a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/hall/AwaitingTable.java +++ b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/hall/AwaitingTable.java @@ -6,13 +6,15 @@ import com.gempukku.lotro.game.formats.LotroFormat; import java.util.*; public class AwaitingTable { + private String _formatType; private String _formatName; private LotroFormat _lotroFormat; private Map _players = new HashMap(); private int _capacity = 2; - public AwaitingTable(String formatName, LotroFormat lotroFormat) { + public AwaitingTable(String formatType, String formatName, LotroFormat lotroFormat) { + _formatType = formatType; _formatName = formatName; _lotroFormat = lotroFormat; } @@ -39,6 +41,10 @@ public class AwaitingTable { return Collections.unmodifiableSet(new HashSet(_players.values())); } + public String getFormatType() { + return _formatType; + } + public String getFormatName() { return _formatName; } diff --git a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/hall/HallServer.java b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/hall/HallServer.java index ea3917bfc..bb2671677 100644 --- a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/hall/HallServer.java +++ b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/hall/HallServer.java @@ -2,11 +2,10 @@ package com.gempukku.lotro.hall; import com.gempukku.lotro.AbstractServer; import com.gempukku.lotro.chat.ChatServer; +import com.gempukku.lotro.db.CollectionDAO; import com.gempukku.lotro.db.vo.League; -import com.gempukku.lotro.game.DeckInvalidException; -import com.gempukku.lotro.game.LotroGameMediator; -import com.gempukku.lotro.game.LotroGameParticipant; -import com.gempukku.lotro.game.LotroServer; +import com.gempukku.lotro.db.vo.Player; +import com.gempukku.lotro.game.*; import com.gempukku.lotro.game.formats.FotRBlockFormat; import com.gempukku.lotro.game.formats.LotroFormat; import com.gempukku.lotro.game.formats.ModifiedFotRBlockFormat; @@ -19,8 +18,10 @@ import java.util.concurrent.ConcurrentHashMap; public class HallServer extends AbstractServer { private ChatServer _chatServer; private LeagueService _leagueService; + private CollectionDAO _collectionDao; private LotroServer _lotroServer; + private Map _supportedFormatNames = new HashMap(); private Map _supportedFormats = new HashMap(); private Map _awaitingTables = new ConcurrentHashMap(); @@ -31,48 +32,56 @@ public class HallServer extends AbstractServer { private Map _lastVisitedPlayers = Collections.synchronizedMap(new LinkedHashMap()); - public HallServer(LotroServer lotroServer, ChatServer chatServer, LeagueService leagueService, boolean test) { + public HallServer(LotroServer lotroServer, ChatServer chatServer, LeagueService leagueService, CollectionDAO collectionDao, boolean test) { _lotroServer = lotroServer; _chatServer = chatServer; _leagueService = leagueService; + _collectionDao = collectionDao; _chatServer.createChatRoom("Game Hall"); - _supportedFormats.put("FotR block", new FotRBlockFormat(_lotroServer.getLotroCardBlueprintLibrary())); - if (test) - _supportedFormats.put("Modified FotR block", new ModifiedFotRBlockFormat(_lotroServer.getLotroCardBlueprintLibrary())); + _supportedFormatNames.put("fotr_block", "FotR Block"); + _supportedFormats.put("fotr_block", new FotRBlockFormat(_lotroServer.getLotroCardBlueprintLibrary())); + if (test) { + _supportedFormatNames.put("m_fotr_block", "Modified FotR Block"); + _supportedFormats.put("m_fotr_block", new ModifiedFotRBlockFormat(_lotroServer.getLotroCardBlueprintLibrary())); + } } public int getTablesCount() { return _awaitingTables.size() + _runningTables.size(); } - public Map getSupportedFormats() { - return new TreeMap(_supportedFormats); + public Map getSupportedFormatNames() { + return Collections.unmodifiableMap(_supportedFormatNames); + } + + public LotroFormat getSupportedFormat(String type) { + return _supportedFormats.get(type); } public Set getRunningLeagues() { - return _leagueService.getAllLeagues(); + return _leagueService.getActiveLeagues(); } /** * @param playerId * @return If table created, otherwise false (if the user already is sitting at a table or playing). */ - public synchronized void createNewTable(String format, String playerId) throws HallException { - LotroFormat supportedFormat = _supportedFormats.get(format); + public synchronized void createNewTable(String type, String playerId) throws HallException { + LotroFormat supportedFormat = _supportedFormats.get(type); if (supportedFormat == null) - throw new HallException("This format is not supported: " + format); + throw new HallException("This format is not supported: " + type); - LotroDeck lotroDeck = validateUserAndDeck(supportedFormat, playerId); + LotroDeck lotroDeck = validateUserAndDeck(type, supportedFormat, playerId); String tableId = String.valueOf(_nextTableId++); - AwaitingTable table = new AwaitingTable(format, supportedFormat); + AwaitingTable table = new AwaitingTable(type, _supportedFormatNames.get(type), supportedFormat); _awaitingTables.put(tableId, table); joinTableInternal(tableId, playerId, table, lotroDeck); } - private LotroDeck validateUserAndDeck(LotroFormat format, String playerId) throws HallException { + private LotroDeck validateUserAndDeck(String type, LotroFormat format, String playerId) throws HallException { if (isPlayerBusy(playerId)) throw new HallException("You can't play more than one game at a time or wait at more than one table"); @@ -85,6 +94,11 @@ public class HallServer extends AbstractServer { } catch (DeckInvalidException e) { throw new HallException("Your registered deck is not valid for this format: " + e.getMessage()); } + + Player player = _lotroServer.getPlayerDao().getPlayer(playerId); + CardCollection collection = _collectionDao.getCollectionForPlayer(player, type); + // TODO check that player has cards in collection + return lotroDeck; } @@ -97,7 +111,7 @@ public class HallServer extends AbstractServer { if (awaitingTable == null) throw new HallException("Table is already taken or was removed"); - LotroDeck lotroDeck = validateUserAndDeck(awaitingTable.getLotroFormat(), playerId); + LotroDeck lotroDeck = validateUserAndDeck(awaitingTable.getFormatType(), awaitingTable.getLotroFormat(), playerId); joinTableInternal(tableId, playerId, awaitingTable, lotroDeck); diff --git a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/league/LeagueService.java b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/league/LeagueService.java index 3706bedbd..27a370334 100644 --- a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/league/LeagueService.java +++ b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/league/LeagueService.java @@ -22,8 +22,8 @@ public class LeagueService { _leagueDao = new LeagueDAO(dbAccess, library); } - public Set getAllLeagues() { - return _leagueDao.getAllLeagues(); + public Set getActiveLeagues() { + return _leagueDao.getActiveLeagues(); } public CardCollection getLeagueCollection(Player player, String type) { @@ -37,7 +37,7 @@ public class LeagueService { } private League getLeagueByType(String type) { - for (League league : getAllLeagues()) { + for (League league : getActiveLeagues()) { if (league.getType().equals(type)) return league; } diff --git a/gemp-lotr/gemp-lotr-web/src/main/java/com/gempukku/lotro/server/ServerResource.java b/gemp-lotr/gemp-lotr-web/src/main/java/com/gempukku/lotro/server/ServerResource.java index 38d403f28..3696b57d3 100644 --- a/gemp-lotr/gemp-lotr-web/src/main/java/com/gempukku/lotro/server/ServerResource.java +++ b/gemp-lotr/gemp-lotr-web/src/main/java/com/gempukku/lotro/server/ServerResource.java @@ -49,6 +49,7 @@ public class ServerResource { private LotroServer _lotroServer; private ChatServer _chatServer; private LeagueService _leagueService; + private CollectionDAO _collectionDao; public ServerResource() { _logger.debug("starting resource"); @@ -57,17 +58,17 @@ public class ServerResource { DbAccess dbAccess = new DbAccess(); _library = new LotroCardBlueprintLibrary(); - CollectionDAO collectionDao = new CollectionDAO(dbAccess, _library); - _chatServer = new ChatServer(); _chatServer.startServer(); _lotroServer = new LotroServer(dbAccess, _library, _chatServer); _lotroServer.startServer(); - _leagueService = new LeagueService(dbAccess, collectionDao, _library); + _collectionDao = new CollectionDAO(dbAccess, _library, _lotroServer.getDefaultCollection()); - _hallServer = new HallServer(_lotroServer, _chatServer, _leagueService, _test); + _leagueService = new LeagueService(dbAccess, _collectionDao, _library); + + _hallServer = new HallServer(_lotroServer, _chatServer, _leagueService, _collectionDao, _test); _hallServer.startServer(); } catch (RuntimeException exp) { _logger.error("Error while creating resource", exp); @@ -339,9 +340,9 @@ public class ServerResource { StringBuilder sb = new StringBuilder(); sb.append("Free People: " + fpCount + ", Shadow: " + shadowCount + "
"); - for (Map.Entry supportedFormats : _hallServer.getSupportedFormats().entrySet()) { - String formatName = supportedFormats.getKey(); - LotroFormat format = supportedFormats.getValue(); + for (Map.Entry supportedFormats : _hallServer.getSupportedFormatNames().entrySet()) { + String formatName = supportedFormats.getValue(); + LotroFormat format = _hallServer.getSupportedFormat(supportedFormats.getKey()); try { format.validateDeck(deck); sb.append("" + formatName + ": valid "); @@ -366,10 +367,13 @@ public class ServerResource { if (!_test) participantId = getLoggedUser(request); - if (collectionType == null || !collectionType.equals("default")) + + Player player = _lotroServer.getPlayerDao().getPlayer(participantId); + + CardCollection collection = _collectionDao.getCollectionForPlayer(player, collectionType); + if (collection == null) sendError(Response.Status.NOT_FOUND); - CardCollection collection = _lotroServer.getDefaultCollection(); List filteredResult = collection.getItems(filter); DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance(); @@ -482,9 +486,10 @@ public class ServerResource { Element hall = doc.createElement("hall"); _hallServer.processTables(participantId, new SerializeHallInfoVisitor(doc, hall)); - for (String format : _hallServer.getSupportedFormats().keySet()) { + for (Map.Entry format : _hallServer.getSupportedFormatNames().entrySet()) { Element formatElem = doc.createElement("format"); - formatElem.appendChild(doc.createTextNode(format)); + formatElem.setAttribute("type", format.getKey()); + formatElem.appendChild(doc.createTextNode(format.getValue())); hall.appendChild(formatElem); } for (League league : _hallServer.getRunningLeagues()) { diff --git a/gemp-lotr/gemp-lotr-web/src/main/webapp/includes/changeLog.html b/gemp-lotr/gemp-lotr-web/src/main/webapp/includes/changeLog.html index fe1ba2a69..0cdb064f4 100644 --- a/gemp-lotr/gemp-lotr-web/src/main/webapp/includes/changeLog.html +++ b/gemp-lotr/gemp-lotr-web/src/main/webapp/includes/changeLog.html @@ -1,6 +1,9 @@
 24 Sept. 2011
 - Visually separated Free People and Shadow cards in deck builder.
+- Game no longer freezes when FP overwhelms minions in skirmish.
+- Effect that removes twilight (Glamdring, Sting etc) no longer fails to remove twilight, when the pool has less tokens
+than the effect is trying to remove.
 
 23 Sept. 2011
 - If an action or effect has play card from non-deck zone as an effect or a cost, you have to have a playable card of
diff --git a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/hallUi.js b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/hallUi.js
index 4c02d7291..86af47174 100644
--- a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/hallUi.js
+++ b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/hallUi.js
@@ -124,7 +124,8 @@ var GempLotrHallUI = Class.extend({
                 var formats = root.getElementsByTagName("format");
                 for (var i = 0; i < formats.length; i++) {
                     var format = formats[i].childNodes[0].nodeValue;
-                    this.supportedFormatsSelect.append("");
+                    var type = formats[i].getAttribute("type");
+                    this.supportedFormatsSelect.append("");
                 }
                 this.supportedFormatsInitialized = true;
             }
diff --git a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/jCards.js b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/jCards.js
index 5b7f9af93..78b13d4fc 100644
--- a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/jCards.js
+++ b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/jCards.js
@@ -34,14 +34,14 @@ var Card = Class.extend({
         if (blueprintId == "rules") {
             this.imageUrl = "/gemp-lotr/images/rules.png";
         } else {
-            if (cardCache[blueprintId] != null) {
-                var cardFromCache = cardCache[blueprintId];
+            if (cardCache[this.blueprintId] != null) {
+                var cardFromCache = cardCache[this.blueprintId];
                 this.horizontal = cardFromCache.horizontal;
                 this.imageUrl = cardFromCache.imageUrl;
             } else {
-                this.imageUrl = this.getUrlByBlueprintId(blueprintId);
-                this.horizontal = this.isHorizontal(blueprintId);
-                cardCache[blueprintId] = {
+                this.imageUrl = this.getUrlByBlueprintId(this.blueprintId);
+                this.horizontal = this.isHorizontal(this.blueprintId);
+                cardCache[this.blueprintId] = {
                     imageUrl: this.imageUrl,
                     horizontal: this.horizontal
                 };
diff --git a/gemp-lotr/todo.txt b/gemp-lotr/todo.txt
index da97160d2..6e4015db3 100644
--- a/gemp-lotr/todo.txt
+++ b/gemp-lotr/todo.txt
@@ -49,3 +49,108 @@ multiple choices required.
 34. Player should be able to concede the game at any time.
 24. The events that are played and cards affected should be shown to the players briefly using animations to make it
  aestheticly pleasing.
+
+
+
+24-Sep-2011 22:10:19 com.sun.jersey.spi.container.ContainerResponse mapMappableContainerException
+SEVERE: The RuntimeException could not be mapped to a response, re-throwing to the HTTP container
+java.util.ConcurrentModificationException
+        at java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:761)
+        at java.util.LinkedList$ListItr.next(LinkedList.java:696)
+        at com.gempukku.lotro.logic.effects.KillEffect.playEffect(KillEffect.java:59)
+        at com.gempukku.lotro.logic.timing.TurnProcedure$PlayOutRecognizableEffect.nextEffect(TurnProcedure.java:112)
+        at com.gempukku.lotro.logic.timing.ActionStack.getNextEffect(ActionStack.java:14)
+        at com.gempukku.lotro.logic.timing.TurnProcedure.carryOutPendingActionsUntilDecisionNeeded(TurnProcedure.java:46
+)
+        at com.gempukku.lotro.logic.timing.DefaultLotroGame.carryOutPendingActionsUntilDecisionNeeded(DefaultLotroGame.j
+ava:88)
+        at com.gempukku.lotro.game.LotroGameMediator.playerAnswered(LotroGameMediator.java:196)
+        at com.gempukku.lotro.server.ServerResource.gameEvent(ServerResource.java:187)
+        at sun.reflect.GeneratedMethodAccessor33.invoke(Unknown Source)
+        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+        at java.lang.reflect.Method.invoke(Method.java:597)
+        at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
+        at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispa
+tch(AbstractResourceMethodDispatchProvider.java:185)
+        at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDisp
+atcher.java:75)
+        at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
+        at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
+        at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
+        at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
+        at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
+        at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469)
+        at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400)
+        at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
+        at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
+        at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
+        at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
+        at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699)
+        at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
+        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
+        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
+        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
+        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
+        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
+        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
+        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
+        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:851)
+        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
+        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
+        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:278)
+        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
+        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
+        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
+        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
+        at java.lang.Thread.run(Thread.java:662)
+24-Sep-2011 22:10:19 org.apache.catalina.core.StandardWrapperValve invoke
+SEVERE: Servlet.service() for servlet [jersey] in context with path [/gemp-lotr] threw exception
+java.util.ConcurrentModificationException
+        at java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:761)
+        at java.util.LinkedList$ListItr.next(LinkedList.java:696)
+        at com.gempukku.lotro.logic.effects.KillEffect.playEffect(KillEffect.java:59)
+        at com.gempukku.lotro.logic.timing.TurnProcedure$PlayOutRecognizableEffect.nextEffect(TurnProcedure.java:112)
+        at com.gempukku.lotro.logic.timing.ActionStack.getNextEffect(ActionStack.java:14)
+        at com.gempukku.lotro.logic.timing.TurnProcedure.carryOutPendingActionsUntilDecisionNeeded(TurnProcedure.java:46
+)
+        at com.gempukku.lotro.logic.timing.DefaultLotroGame.carryOutPendingActionsUntilDecisionNeeded(DefaultLotroGame.j
+ava:88)
+        at com.gempukku.lotro.game.LotroGameMediator.playerAnswered(LotroGameMediator.java:196)
+        at com.gempukku.lotro.server.ServerResource.gameEvent(ServerResource.java:187)
+        at sun.reflect.GeneratedMethodAccessor33.invoke(Unknown Source)
+        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+        at java.lang.reflect.Method.invoke(Method.java:597)
+        at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
+        at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispa
+tch(AbstractResourceMethodDispatchProvider.java:185)
+        at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDisp
+atcher.java:75)
+        at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
+        at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
+        at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
+        at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
+        at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
+        at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469)
+        at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400)
+        at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
+        at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
+        at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
+        at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
+        at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699)
+        at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
+        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
+        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
+        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
+        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
+        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
+        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
+        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
+        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:851)
+        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
+        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
+        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:278)
+        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
+        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
+        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
+        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
+        at java.lang.Thread.run(Thread.java:662)
\ No newline at end of file