Cosmetic changes.

This commit is contained in:
marcins78@gmail.com
2011-09-22 21:41:00 +00:00
parent f0f3f39555
commit 72ed85fb6e
8 changed files with 185 additions and 124 deletions

View File

@@ -17,6 +17,11 @@
<artifactId>gemp-lotr-common</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
</dependency>
</dependencies>
</project>

View File

@@ -16,10 +16,13 @@ import com.gempukku.lotro.logic.modifiers.ModifiersEnvironment;
import com.gempukku.lotro.logic.modifiers.ModifiersLogic;
import com.gempukku.lotro.logic.modifiers.ModifiersQuerying;
import com.gempukku.lotro.logic.vo.LotroDeck;
import org.apache.log4j.Logger;
import java.util.*;
public class DefaultLotroGame implements LotroGame {
private static final Logger log = Logger.getLogger(DefaultLotroGame.class);
private GameState _gameState;
private ModifiersLogic _modifiersLogic = new ModifiersLogic();
private DefaultActionsEnvironment _actionsEnvironment;
@@ -106,6 +109,7 @@ public class DefaultLotroGame implements LotroGame {
@Override
public void playerLost(String playerId, String reason) {
if (_losers.get(playerId) == null) {
log.debug("Player " + playerId + " lost due to: " + reason);
_losers.put(playerId, reason);
if (_gameState != null)
_gameState.sendMessage(playerId + " lost due to: " + reason);

View File

@@ -23,7 +23,6 @@ public class LotroServer extends AbstractServer {
private Map<String, LotroGameMediator> _runningGames = new ConcurrentHashMap<String, LotroGameMediator>();
private final Map<String, Date> _finishedGamesTime = new LinkedHashMap<String, Date>();
private final long _timeToGameDeath = 1000 * 60 * 5; // 5 minutes

View File

@@ -9,6 +9,7 @@
<style type="text/css">
body {
font-size: 12px;
background-color: #000000;
}
.tableStatus {
@@ -38,6 +39,10 @@
font-size: 80%;
}
.ui-tabs-nav li {
font-size: 70%;
}
.ui-button-text-only .ui-button-text {
font-size: 70%;
padding: .2em .5em;
@@ -74,21 +79,35 @@
$(document).ready(
function() {
$("#user").append("Create a table or join one where other player is waiting to start a game.");
// $("#user").append("Create a table or join one where other player is waiting to start a game.");
var chat = new ChatBoxUI("Game Hall", $("#chat"), "/gemp-lotr/server", true);
chat.setBounds(2, 2, 780 - 4, 200 - 4);
var hall = new GempLotrHallUI($("#hall"), "/gemp-lotr/server", chat);
$("#tabs").tabs();
});
</script>
</head>
<body bgcolor="#000000">
<div id="user" style="position:absolute;left:0px;top:0px;width:780px;height:60px;color:#ffffff;"></div>
<div id="hall" class="ui-widget-content" style="position:absolute;left:0px;top:60px;width:780px;height:260px;"></div>
<div id="chat" class="ui-widget-content" style="position:absolute;left:0px;top:320px;width:780px;height:200px;"></div>
<div id="disclaimer" style="position:absolute;left:0px;top:540px;width:780px;height:20px;">
<body>
<div id="tabs" width="100%" height="800">
<ul>
<li><a href="#gameHall">Game Hall</a></li>
<li><a href="includes/leagueRules.html">League Rules</a></li>
<li><a href="includes/contribute.html">Contribute</a></li>
<li><a href="includes/changeLog.html">Change Log</a></li>
</ul>
<div id="gameHall">
<div id="user" style="width:780px;height:60px;"></div>
<div id="hall" class="ui-widget-content"
style="width:780px;height:260px;"></div>
<div id="chat" class="ui-widget-content"
style="position:relative;width:780px;height:200px;"></div>
</div>
</div>
<div id="disclaimer">
The information presented on this site about LotR TCG, both literal and graphical, is copyrighted by Decipher Inc.
This website is not produced, endorsed, supported, or affiliated with Decipher.
</div>

View File

@@ -1,4 +1,9 @@
<pre style="position:absolute;left:0px;top:580px;width:780px;height:200px;scroll:auto;">
<pre>
22 Sept. 2011
- Changed the main page after logging in to give access to additional documents.
- Changed the play event animation so that player might actually recognize the card.
- The animations are no longer shown to the player who initiated the effect, he should know what he played.
21 Sept. 2011
- Increased the time per game per player to 40 minutes, as 30 seems not enough.
- Added animated effect when card affects other card.

View File

@@ -1,7 +1,8 @@
<h1>How can I help?</h1>
<p>You can contribute in multiple ways:</p>
<ul>
<li>If you have a bit of time and have at least a bit of <b>artistic talent</b> and <b>computer graphics skill</b>,
<li>If you have a bit of time and have at least a bit of <b style="color:#009f9f">artistic talent</b> and <b
style="color:#009f9f">computer graphics skill</b>,
I currently need the following:
<ol>
<li>PNG icons of all cultures on transparent background with the height of exactly 16 pixels
@@ -25,7 +26,8 @@
<li>Any other graphics you think might improve the look of the user interface.</li>
</ol>
</li>
<li>I need help with <b>hosting of the server</b> (at the moment I use my home PC and host it from home). If I don't
<li>I need help with <b style="color:#009f9f">hosting of the server</b> (at the moment I use my home PC and host it
from home). If I don't
find any, I will have to set it up on Amazon EC2 which is quite expensive ($300 per year or so). If you can help
out with hosting of the server, here are the requirements:
<ol>
@@ -34,13 +36,16 @@
</ol>
</li>
<li>
If you know how to <b>program in Java</b> and have at least a bit of experience, you can help out with
If you know how to <b style="color:#009f9f">program in Java</b> and have at least a bit of experience, you can
help out with
implementation of the card sets. About 95% of cards in a set is just a matter of a few easy lines of code. The
only problem is, that this also takes a huge amount of time. Consider a small set with 120 cards, each card
taking 5 minutes to implement (easy - right?), it's still 10 hours.<br/>
If you wish to help out with that, I promise I will do the more difficult cards (like Return to Its Master).
</li>
<li>If you enjoy playing LotR and have <b>plenty of free time</b>, you may just test and report the problems.</li>
<li>If you enjoy playing LotR and have <b style="color:#009f9f">plenty of free time</b>, you may just test and
report the problems.
</li>
<li>Donations? Well I do spend a lot of time working on it, but I love (almost) every moment of doing it. If I will
have to host it on Amazon I might really use some financial support though...
</li>

View File

@@ -4,63 +4,74 @@
<ol>
<li>Definitions:
<ol type="a">
<li><b>League</b> consists of multiple <b>League series</b> (number - to be announced).</li>
<li>Each <b>League serie</b> lasts a fixed amount of days (to be announced).</li>
<li><b style="color:#009f9f">League</b> consists of multiple <b style="color:#009f9f">League series</b>
(number - to be announced).
</li>
<li>Each <b style="color:#009f9f">League serie</b> lasts a fixed amount of days (to be announced).</li>
</ol>
</li>
<li>Participation:
<ol type="a">
<li><b>League</b> starts at an announced date and lasts until specified number of <b>League series</b> are
<li><b style="color:#009f9f">League</b> starts at an announced date and lasts until specified number of <b
style="color:#009f9f">League series</b> are
played out.
</li>
<li>Player joining a <b>League</b> during a first serie is given a specified for that <b>League</b> amount
<li>Player joining a <b style="color:#009f9f">League</b> during a first serie is given a specified for that
<b style="color:#009f9f">League</b> amount
and type of virtual product (boosters and fixed cards).
</li>
<li>At the beginning of each subsequent serie, each player participating in the <b>League</b> is given the
<li>At the beginning of each subsequent serie, each player participating in the <b style="color:#009f9f">League</b>
is given the
same amount and type of virtual product (boosters and/or fixed cards).
</li>
<li>Player who chooses to join a league after the first serie, is given a product that is a sum of all the
virtual product he/she would have been given if he joined during a first serie up until the point in
time he/she has chosen to join. This product WILL NOT contain any prizes given to participants of the
<b>League</b>.
<b style="color:#009f9f">League</b>.
</li>
</ol>
</li>
<li>
Deck building:
<ol type="a">
<li>Each player builds a deck from the virtual product he/she owns within that <b>League</b>.</li>
<li>Deck in a <b>League</b> can be changed at any time. When you create or join a table with a deck, that
<li>Each player builds a deck from the virtual product he/she owns within that <b style="color:#009f9f">League</b>.
</li>
<li>Deck in a <b style="color:#009f9f">League</b> can be changed at any time. When you create or join a
table with a deck, that
deck is set at that point and any changes done to the deck afterwards, will not be reflected in the game
on that table. If you wish to use a different deck for that game before it starts, leave and rejoin a
table after modifying your deck.
</li>
<li>Virtual cards given out as prizes for that <b>League</b> are LEGAL for playing in the <b>League</b>.
<li>Virtual cards given out as prizes for that <b style="color:#009f9f">League</b> are LEGAL for playing in
the <b style="color:#009f9f">League</b>.
</li>
<li>There is no limitation to the number of multiples of the same card (with the same card name) you can
play in your deck, except sites. If you happen to have 10 copies of a card in your <b>League</b>
play in your deck, except sites. If you happen to have 10 copies of a card in your <b
style="color:#009f9f">League</b>
product, you can play all 10 of them. If more than 4 non-unique copies of the same card are in play, all
of them influence the game (this contradicts the rules, where maximum 4 copies of the same card can be
active at a time).
</li>
<li><b>League</b> has no X or R lists, so all cards are legal.</li>
<li><b style="color:#009f9f">League</b> has no X or R lists, so all cards are legal.</li>
<li>All the other rules of deck building - minimum 60 cards deck, even FP/Shadow cards split, etc. apply.
</li>
</ol>
</li>
<li>Earning points:
<ol type="a">
<li>Each calendar day (in GMT+0 time-zone), every <b>League</b> participant can play a maximum of fixed (to
<li>Each calendar day (in GMT+0 time-zone), every <b style="color:#009f9f">League</b> participant can play a
maximum of fixed (to
be announced) rated games.
</li>
<li>In addition to rated games, player can choose to play any number of non-rated games with other
<b>League</b> players.
<b style="color:#009f9f">League</b> players.
</li>
<li>Only first game played against the same opponent on the same day can be rated. Any subsequent games
against the same opponent on the same day will be treated as non-rated.
</li>
<li>Winner of each rated game in a <b>League</b> gains 2 <b>League serie</b> points. Rated game loser
gains 1 <b>League serie</b> points.
<li>Winner of each rated game in a <b style="color:#009f9f">League</b> gains 2 <b style="color:#009f9f">League
serie</b> points. Rated game loser
gains 1 <b style="color:#009f9f">League serie</b> points.
</li>
</ol>
</li>
@@ -70,13 +81,17 @@
(ability to change 1 non-foil card in your collection into a foil version of the same card), preview
cards from next expansions, etc.
</li>
<li>At the end of each <b>League serie</b>, points for that serie are totalled and prizes are given to
participants based on the total points gathered in this <b>League serie</b>.
<li>At the end of each <b style="color:#009f9f">League serie</b>, points for that serie are totalled and
prizes are given to
participants based on the total points gathered in this <b style="color:#009f9f">League serie</b>.
</li>
<li>After all the series end within a <b>League</b>, in addition to prizes for the last serie, players are
given (substiantially bigger) prizes based on the total of points in all series in this <b>League</b>.
<li>After all the series end within a <b style="color:#009f9f">League</b>, in addition to prizes for the
last serie, players are
given (substiantially bigger) prizes based on the total of points in all series in this <b
style="color:#009f9f">League</b>.
</li>
<li>After the <b>League</b> ends, all the cards players have in a League are added to a permanent collection
<li>After the <b style="color:#009f9f">League</b> ends, all the cards players have in a League are added to
a permanent collection
of the player.
</li>
</ol>
@@ -84,13 +99,15 @@
<li>
Cheating:
<ol type="a">
<li><b>Cheating will not be tolerated</b> - period.</li>
<li>Cheating includes, but is not limited to - entering <b>League</b> with more than one account, knowingly
<li><b style="color:#009f9f">Cheating will not be tolerated</b> - period.</li>
<li>Cheating includes, but is not limited to - entering <b style="color:#009f9f">League</b> with more than
one account, knowingly
exploiting a system or a card bug, game fixing (deciding the outcome of a rated game in other way than
playing it out) with other players.
</li>
<li>Players found cheating (or believed to be - at the administrator/moderator discretion) will be removed
from the <b>League</b> and their accounts will be deleted. This is a friendly environment, where
from the <b style="color:#009f9f">League</b> and their accounts will be deleted. This is a friendly
environment, where
everyone wants to have some fun, so don't spoil it for others.
</li>
</ol>

View File

@@ -1,7 +1,7 @@
var GameAnimations = Class.extend({
game: null,
playEventDuration: 500,
cardAffectsCardDuration: 500,
playEventDuration: 1500,
cardAffectsCardDuration: 1200,
init: function(gameUI) {
this.game = gameUI;
@@ -13,59 +13,63 @@ var GameAnimations = Class.extend({
var participantId = element.getAttribute("participantId");
var blueprintId = element.getAttribute("blueprintId");
var card = new Card(blueprintId, "ANIMATION", "anim", participantId);
var cardDiv = createSimpleCardDiv(card.imageUrl);
// Play-out game event animation only if it's not the player who initiated it
if (this.game.spectatorMode || (participantId != this.game.bottomPlayerId)) {
var card = new Card(blueprintId, "ANIMATION", "anim", participantId);
var cardDiv = createSimpleCardDiv(card.imageUrl);
$("#main").queue(
function(next) {
cardDiv.data("card", card);
$("#main").append(cardDiv);
$("#main").queue(
function(next) {
cardDiv.data("card", card);
$("#main").append(cardDiv);
var gameWidth = $("#main").width();
var gameHeight = $("#main").height();
var gameWidth = $("#main").width();
var gameHeight = $("#main").height();
var cardWidth = card.getWidthForHeight(gameHeight / 2);
var cardHeight = (gameHeight / 2);
var cardWidth = card.getWidthForHeight(cardHeight);
$(cardDiv).css(
{
position: "absolute",
left: 0,
top: gameHeight / 4,
width: cardWidth,
height: gameHeight / 2,
"z-index": 100,
opacity: 0});
$(cardDiv).css(
{
position: "absolute",
left: (gameWidth / 2 - cardWidth / 4),
top: gameHeight * (3 / 8),
width: cardWidth / 2,
height: cardHeight / 2,
"z-index": 100,
opacity: 0});
$(cardDiv).animate(
{
left: "+=" + (gameWidth - cardWidth)},
{
duration: that.playEventDuration,
easing: "linear",
queue: false,
complete: next});
$(cardDiv).animate(
{
opacity: 1},
{
duration: that.playEventDuration / 2,
easing: "easeOutQuart",
queue: false,
complete: function() {
$(cardDiv).animate(
{
opacity: 0},
{
duration: that.playEventDuration / 2,
easing: "easeInQuart",
queue: false
});
}});
}).queue(
function(next) {
$(cardDiv).remove();
next();
});
$(cardDiv).animate(
{
left: "-=" + cardWidth / 4,
top: "-=" + (gameHeight / 8),
width: "+=" + (cardWidth / 2),
height: "+=" + (cardHeight / 2),
opacity: 1},
{
duration: that.playEventDuration / 8,
easing: "linear",
queue: false,
complete: next});
}).queue(
function(next) {
setTimeout(next, that.playEventDuration * (5 / 8));
}).queue(
function(next) {
$(cardDiv).animate(
{
opacity: 0},
{
duration: that.playEventDuration / 4,
easing: "easeOutQuart",
queue: false,
complete: next});
}).queue(
function(next) {
$(cardDiv).remove();
next();
});
}
},
cardAffectsCard: function(element) {
@@ -75,48 +79,51 @@ var GameAnimations = Class.extend({
var blueprintId = element.getAttribute("blueprintId");
var targetCardId = element.getAttribute("targetCardId");
var card = new Card(blueprintId, "ANIMATION", "anim", participantId);
var cardDiv = createSimpleCardDiv(card.imageUrl);
// Play-out card affects card animation only if it's not the player who initiated it
if (this.game.spectatorMode || (participantId != this.game.bottomPlayerId)) {
var card = new Card(blueprintId, "ANIMATION", "anim", participantId);
var cardDiv = createSimpleCardDiv(card.imageUrl);
$("#main").queue(
function(next) {
var targetCard = $(".card:cardId(" + targetCardId + ")");
if (targetCard.length > 0) {
cardDiv.data("card", card);
$("#main").append(cardDiv);
$("#main").queue(
function(next) {
var targetCard = $(".card:cardId(" + targetCardId + ")");
if (targetCard.length > 0) {
cardDiv.data("card", card);
$("#main").append(cardDiv);
targetCard = targetCard[0];
var targetCardWidth = $(targetCard).width();
var targetCardHeight = $(targetCard).height();
targetCard = targetCard[0];
var targetCardWidth = $(targetCard).width();
var targetCardHeight = $(targetCard).height();
$(cardDiv).css(
{
position: "absolute",
left: $(targetCard).position().left,
top: $(targetCard).position().top,
width: targetCardWidth,
height: targetCardHeight,
"z-index": 100,
opacity: 1});
$(cardDiv).animate(
{
opacity: 0,
left: "-=" + (targetCardWidth / 2),
top: "-=" + (targetCardHeight / 2),
width: "+=" + targetCardWidth,
height: "+=" + targetCardHeight},
{
duration: that.cardAffectsCardDuration,
easing: "easeInQuart",
queue: false,
complete: next});
} else {
$(cardDiv).css(
{
position: "absolute",
left: $(targetCard).position().left,
top: $(targetCard).position().top,
width: targetCardWidth,
height: targetCardHeight,
"z-index": 100,
opacity: 1});
$(cardDiv).animate(
{
opacity: 0,
left: "-=" + (targetCardWidth / 2),
top: "-=" + (targetCardHeight / 2),
width: "+=" + targetCardWidth,
height: "+=" + targetCardHeight},
{
duration: that.cardAffectsCardDuration,
easing: "easeInQuart",
queue: false,
complete: next});
} else {
next();
}
}).queue(
function(next) {
$(cardDiv).remove();
next();
}
}).queue(
function(next) {
$(cardDiv).remove();
next();
});
});
}
}
});