- "We Are the Fighting Uruk-hai" correctly adds bonuses to the Uruk-hai.

- Liberating a site should no longer freeze the game.
This commit is contained in:
marcins78@gmail.com
2011-10-24 22:06:48 +00:00
parent 6407dcd6df
commit ef1a899801
6 changed files with 14 additions and 8 deletions

View File

@@ -36,9 +36,9 @@ public class LiberateASiteEffect extends AbstractEffect {
for (String playerId : game.getGameState().getPlayerOrder().getAllPlayers())
maxUnoccupiedSite = Math.min(maxUnoccupiedSite, game.getGameState().getPlayerPosition(playerId) - 1);
for (int i = maxUnoccupiedSite; i >= 1; i++) {
for (int i = maxUnoccupiedSite; i >= 1; i--) {
PhysicalCard site = game.getGameState().getSite(i);
if (site.getCardController() != null
if (site != null && site.getCardController() != null
&& !site.getCardController().equals(game.getGameState().getCurrentPlayerId()))
return site;
}

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, Filters.sameCard(self), 2), Phase.SKIRMISH));
new StrengthModifier(self, card, 2), Phase.SKIRMISH));
if (controlsSite)
action.appendEffect(
new AddUntilEndOfPhaseModifierEffect(
new KeywordModifier(self, Filters.sameCard(self), Keyword.DAMAGE), Phase.SKIRMISH));
new KeywordModifier(self, card, Keyword.DAMAGE), Phase.SKIRMISH));
}
});
return action;

View File

@@ -8,10 +8,11 @@ import java.util.concurrent.ConcurrentHashMap;
public class ChatServer extends AbstractServer {
private Map<String, ChatRoomMediator> _chatRooms = new ConcurrentHashMap<String, ChatRoomMediator>();
public void createChatRoom(String name) {
public ChatRoomMediator createChatRoom(String name) {
ChatRoomMediator chatRoom = new ChatRoomMediator();
chatRoom.sendMessage("System", "Welcome to room: " + name);
_chatRooms.put(name, chatRoom);
return chatRoom;
}
public ChatRoomMediator getChatRoom(String name) {

View File

@@ -1,6 +1,7 @@
package com.gempukku.lotro.game;
import com.gempukku.lotro.AbstractServer;
import com.gempukku.lotro.chat.ChatRoomMediator;
import com.gempukku.lotro.chat.ChatServer;
import com.gempukku.lotro.common.CardType;
import com.gempukku.lotro.common.Keyword;
@@ -98,13 +99,15 @@ public class LotroServer extends AbstractServer {
return "Game" + gameId;
}
public synchronized String createNewGame(LotroFormat lotroFormat, LotroGameParticipant[] participants) {
public synchronized String createNewGame(LotroFormat lotroFormat, String formatName, LotroGameParticipant[] participants) {
if (participants.length < 2)
throw new IllegalArgumentException("There has to be at least two players");
final String gameId = String.valueOf(_nextGameId);
String chatRoomName = getChatRoomName(gameId);
_chatServer.createChatRoom(chatRoomName);
ChatRoomMediator room = _chatServer.createChatRoom(chatRoomName);
room.sendMessage("System", "You're starting a game of " + formatName);
LotroGameMediator lotroGameMediator = new LotroGameMediator(lotroFormat, participants, _lotroCardBlueprintLibrary,
new GameResultListener() {
@Override

View File

@@ -138,7 +138,7 @@ public class HallServer extends AbstractServer {
private void createGame(String tableId, AwaitingTable awaitingTable) {
Set<LotroGameParticipant> players = awaitingTable.getPlayers();
LotroGameParticipant[] participants = players.toArray(new LotroGameParticipant[players.size()]);
String gameId = _lotroServer.createNewGame(awaitingTable.getLotroFormat(), participants);
String gameId = _lotroServer.createNewGame(awaitingTable.getLotroFormat(), awaitingTable.getFormatName(), participants);
LotroGameMediator lotroGameMediator = _lotroServer.getGameById(gameId);
lotroGameMediator.startGame();
_runningTables.put(tableId, gameId);

View File

@@ -8,6 +8,8 @@
a site.
- "Saruman, Rabble Rouser" now properly exerts itself for the ability.
- Added multi-deck support (ugly but hopefully working).
- "We Are the Fighting Uruk-hai" correctly adds bonuses to the Uruk-hai.
- Liberating a site should no longer freeze the game.
<b>23 Oct. 2011</b>
- "Hornburg Causeway" now adds +2 to archery for each unbound companion over 3, instead of +1.