@@ -29,17 +29,11 @@ public class StatusRequestHandler extends LotroServerRequestHandler implements U
|
|||||||
@Override
|
@Override
|
||||||
public void handleRequest(String uri, HttpRequest request, Map<Type, Object> context, ResponseWriter responseWriter, MessageEvent e) throws Exception {
|
public void handleRequest(String uri, HttpRequest request, Map<Type, Object> context, ResponseWriter responseWriter, MessageEvent e) throws Exception {
|
||||||
if (uri.equals("") && request.getMethod() == HttpMethod.GET) {
|
if (uri.equals("") && request.getMethod() == HttpMethod.GET) {
|
||||||
QueryStringDecoder queryDecoder = new QueryStringDecoder(request.getUri());
|
|
||||||
String participantId = getQueryParameterSafely(queryDecoder, "participantId");
|
|
||||||
|
|
||||||
Player resourceOwner = getResourceOwnerSafely(request, participantId);
|
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
boolean admin = resourceOwner.getType().contains("a");
|
|
||||||
|
|
||||||
int day = 1000 * 60 * 60 * 24;
|
int day = 1000 * 60 * 60 * 24;
|
||||||
int week = 1000 * 60 * 60 * 24 * 7;
|
int week = 1000 * 60 * 60 * 24 * 7;
|
||||||
sb.append("Tables count: ").append(_hallServer.getTablesCount()).append(", players in hall: ").append(_chatServer.getChatRoom("Game Hall").getUsersInRoom(admin).size())
|
sb.append("Tables count: ").append(_hallServer.getTablesCount()).append(", players in hall: ").append(_chatServer.getChatRoom("Game Hall").getUsersInRoom(false).size())
|
||||||
.append(", games played in last 24 hours: ").append(_gameHistoryService.getGamesPlayedCount(System.currentTimeMillis() - day, day))
|
.append(", games played in last 24 hours: ").append(_gameHistoryService.getGamesPlayedCount(System.currentTimeMillis() - day, day))
|
||||||
.append(",<br/> active players in last week: ").append(_gameHistoryService.getActivePlayersCount(System.currentTimeMillis() - week, week));
|
.append(",<br/> active players in last week: ").append(_gameHistoryService.getActivePlayersCount(System.currentTimeMillis() - week, week));
|
||||||
|
|
||||||
|
|||||||
@@ -373,7 +373,7 @@
|
|||||||
},
|
},
|
||||||
"effect": {
|
"effect": {
|
||||||
"type": "heal",
|
"type": "heal",
|
||||||
"filter": "choose(companion, race(dwarf))",
|
"filter": "choose(companion,dwarf)",
|
||||||
"count": 2
|
"count": 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -954,14 +954,12 @@
|
|||||||
"type": "trigger",
|
"type": "trigger",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"trigger": {
|
"trigger": {
|
||||||
"type": "losesSkirmish",
|
"type": "winsSkirmish",
|
||||||
"filter": "or(companion,ally)",
|
"filter": "name(Smaug)"
|
||||||
"against": "name(Smaug)"
|
|
||||||
},
|
},
|
||||||
"effect": {
|
"effect": {
|
||||||
"type": "addBurdens",
|
"type": "addBurdens",
|
||||||
"amount": 1
|
"amount": 1
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -971,10 +969,13 @@
|
|||||||
"type": "killed",
|
"type": "killed",
|
||||||
"filter": "companion,culture(dwarven)"
|
"filter": "companion,culture(dwarven)"
|
||||||
},
|
},
|
||||||
|
"condition": {
|
||||||
|
"type": "canSpot",
|
||||||
|
"filter": "name(Smaug),inSkirmish"
|
||||||
|
},
|
||||||
"effect": {
|
"effect": {
|
||||||
"type": "addBurdens",
|
"type": "addBurdens",
|
||||||
"amount": 1
|
"amount": 1
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -984,7 +985,7 @@
|
|||||||
"filter": "name(Bilbo)",
|
"filter": "name(Bilbo)",
|
||||||
"condition": [
|
"condition": [
|
||||||
{
|
{
|
||||||
"type": "ringIsOn",
|
"type": "ringIsOn"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "canSpot",
|
"type": "canSpot",
|
||||||
|
|||||||
@@ -243,6 +243,7 @@
|
|||||||
<option value="towers_standard">Towers standard</option>
|
<option value="towers_standard">Towers standard</option>
|
||||||
<option value="ttt_standard">Towers standard - Sets 1-4</option>
|
<option value="ttt_standard">Towers standard - Sets 1-4</option>
|
||||||
<option value="bohd_standard">Towers standard - Sets 1-5</option>
|
<option value="bohd_standard">Towers standard - Sets 1-5</option>
|
||||||
|
<option value="ts_no_fotr">Towers standard - Sets 2-6</option>
|
||||||
<option value="ts_reflections">Towers standard - Sets 1-6,9,14&16</option>
|
<option value="ts_reflections">Towers standard - Sets 1-6,9,14&16</option>
|
||||||
<option value="king_block">King block</option>
|
<option value="king_block">King block</option>
|
||||||
<option value="king1_block">King block - Set 7</option>
|
<option value="king1_block">King block - Set 7</option>
|
||||||
|
|||||||
@@ -1,50 +0,0 @@
|
|||||||
package com.gempukku.lotro.cards.set32.smaug;
|
|
||||||
|
|
||||||
import com.gempukku.lotro.common.CardType;
|
|
||||||
import com.gempukku.lotro.common.Culture;
|
|
||||||
import com.gempukku.lotro.common.Side;
|
|
||||||
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.cardtype.AbstractPermanent;
|
|
||||||
import com.gempukku.lotro.logic.effects.AddBurdenEffect;
|
|
||||||
import com.gempukku.lotro.logic.effects.IncrementPhaseLimitEffect;
|
|
||||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
|
||||||
import com.gempukku.lotro.logic.timing.PlayConditions;
|
|
||||||
import com.gempukku.lotro.logic.timing.TriggerConditions;
|
|
||||||
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set: The Clouds Burst
|
|
||||||
* Side: Shadow
|
|
||||||
* Culture: Smaug
|
|
||||||
* Twilight Cost: 0
|
|
||||||
* Type: Condition • Support area
|
|
||||||
* Game Text: Each time Smaug wins a skirmish or kills a [Dwarven] companion in a skirmish, you may add a doubt.
|
|
||||||
* While Bilbo wears The One Ring, he cannot be wounded by Smaug.
|
|
||||||
*/
|
|
||||||
public class Card32_059 extends AbstractPermanent {
|
|
||||||
public Card32_059() {
|
|
||||||
super(Side.SHADOW, 0, CardType.CONDITION, Culture.GUNDABAD, "Dragon's Malice", null, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
|
||||||
if (TriggerConditions.forEachKilledBy(game, effectResult, Filters.name("Smaug"), Filters.and(CardType.COMPANION, Culture.DWARVEN))
|
|
||||||
|| TriggerConditions.losesSkirmishInvolving(game, effectResult, Filters.or(CardType.COMPANION, CardType.ALLY), Filters.name("Smaug"))) {
|
|
||||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
|
||||||
if (TriggerConditions.forEachKilledBy(game, effectResult, Filters.name("Smaug"), Filters.and(CardType.COMPANION, Culture.DWARVEN))) {
|
|
||||||
action.appendEffect(
|
|
||||||
new AddBurdenEffect(game.getGameState().getCurrentPlayerId(), self, 1));
|
|
||||||
} else if (TriggerConditions.losesSkirmishInvolving(game, effectResult, Filters.or(CardType.COMPANION, CardType.ALLY), Filters.name("Smaug"))) {
|
|
||||||
action.appendEffect(
|
|
||||||
new AddBurdenEffect(game.getGameState().getCurrentPlayerId(), self, 1));
|
|
||||||
}
|
|
||||||
return Collections.singletonList(action);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -13,29 +13,28 @@ public class LoggingProxy {
|
|||||||
private static final long DEBUG_LEVEL = 100;
|
private static final long DEBUG_LEVEL = 100;
|
||||||
|
|
||||||
public static <T> T createLoggingProxy(Class<T> clazz, T delegate) {
|
public static <T> T createLoggingProxy(Class<T> clazz, T delegate) {
|
||||||
return delegate;
|
final String simpleName = clazz.getSimpleName();
|
||||||
// final String simpleName = clazz.getSimpleName();
|
return (T) Proxy.newProxyInstance(LoggingProxy.class.getClassLoader(), new Class[]{clazz},
|
||||||
// return (T) Proxy.newProxyInstance(LoggingProxy.class.getClassLoader(), new Class[]{clazz},
|
(proxy, method, args) -> {
|
||||||
// (proxy, method, args) -> {
|
long start = System.currentTimeMillis();
|
||||||
// long start = System.currentTimeMillis();
|
try {
|
||||||
// try {
|
return method.invoke(delegate, args);
|
||||||
// return method.invoke(delegate, args);
|
} catch (InvocationTargetException exp) {
|
||||||
// } catch (InvocationTargetException exp) {
|
throw exp.getTargetException();
|
||||||
// throw exp.getTargetException();
|
} finally {
|
||||||
// } finally {
|
long time = System.currentTimeMillis() - start;
|
||||||
// long time = System.currentTimeMillis() - start;
|
String name = method.getName();
|
||||||
// String name = method.getName();
|
if (time >= ERROR_LEVEL)
|
||||||
// if (time >= ERROR_LEVEL)
|
logger.error(simpleName + "::" + name + "(...) " + time + "ms");
|
||||||
// logger.error(simpleName + "::" + name + "(...) " + time + "ms");
|
else if (time >= WARN_LEVEL)
|
||||||
// else if (time >= WARN_LEVEL)
|
logger.warn(simpleName + "::" + name + "(...) " + time + "ms");
|
||||||
// logger.warn(simpleName + "::" + name + "(...) " + time + "ms");
|
else if (time >= INFO_LEVEL)
|
||||||
// else if (time >= INFO_LEVEL)
|
logger.info(simpleName + "::" + name + "(...) " + time + "ms");
|
||||||
// logger.info(simpleName + "::" + name + "(...) " + time + "ms");
|
else if (time >= DEBUG_LEVEL)
|
||||||
// else if (time >= DEBUG_LEVEL)
|
logger.debug(simpleName + "::" + name + "(...) " + time + "ms");
|
||||||
// logger.debug(simpleName + "::" + name + "(...) " + time + "ms");
|
else
|
||||||
// else
|
logger.trace(simpleName + "::" + name + "(...) " + time + "ms");
|
||||||
// logger.trace(simpleName + "::" + name + "(...) " + time + "ms");
|
}
|
||||||
// }
|
});
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user