Typos fixes and also fixing display of required actions.

This commit is contained in:
marcins78@gmail.com
2011-09-20 02:34:49 +00:00
parent 1dc876f000
commit cdfecd33c6
4 changed files with 21 additions and 9 deletions

View File

@@ -34,7 +34,7 @@ public class Card1_049 extends AbstractAttachable {
@Override
public Modifier getAlwaysOnEffect(PhysicalCard self) {
return new AbstractModifier(self, "Streng +1 for each Elf you can spot (limit +3)", Filters.hasAttached(self), new ModifierEffect[]{ModifierEffect.STRENGTH_MODIFIER}) {
return new AbstractModifier(self, "Strength +1 for each Elf you can spot (limit +3)", Filters.hasAttached(self), new ModifierEffect[]{ModifierEffect.STRENGTH_MODIFIER}) {
@Override
public int getStrength(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard physicalCard, int result) {
int count = Math.min(3, Filters.countActive(gameState, modifiersQuerying, Filters.race(Race.ELF)));

View File

@@ -128,20 +128,25 @@ public class GameState {
for (Map.Entry<String, Integer> stringIntegerEntry : _playerPosition.entrySet())
listener.setPlayerPosition(stringIntegerEntry.getKey(), stringIntegerEntry.getValue());
// First non-stacked non-attached cards
// First non-attached cards
for (List<PhysicalCardImpl> physicalCards : _inPlay.values())
for (PhysicalCardImpl physicalCard : physicalCards) {
if (physicalCard.getZone() != Zone.ATTACHED && physicalCard.getZone() != Zone.STACKED)
if (physicalCard.getZone() != Zone.ATTACHED)
listener.cardCreated(physicalCard);
}
// Now the stacked and attached ones
// Now the attached ones
for (List<PhysicalCardImpl> physicalCards : _inPlay.values())
for (PhysicalCardImpl physicalCard : physicalCards) {
if (physicalCard.getZone() == Zone.ATTACHED || physicalCard.getZone() == Zone.STACKED)
if (physicalCard.getZone() == Zone.ATTACHED)
listener.cardCreated(physicalCard);
}
// Finally the stacked ones
for (List<PhysicalCardImpl> physicalCards : _stacked.values())
for (PhysicalCardImpl physicalCard : physicalCards)
listener.cardCreated(physicalCard);
List<PhysicalCardImpl> hand = _hands.get(playerId);
if (hand != null) {
for (PhysicalCardImpl physicalCard : hand)

View File

@@ -107,7 +107,7 @@ public class DefaultLotroGame implements LotroGame {
public void playerLost(String playerId, String reason) {
_losers.put(playerId, reason);
if (_gameState != null)
_gameState.sendMessage(playerId + " lst due to: " + reason);
_gameState.sendMessage(playerId + " lost due to: " + reason);
if (_losers.size() + 1 == _allPlayers.size()) {
List<String> allPlayers = new LinkedList<String>(_allPlayers);

View File

@@ -1063,7 +1063,7 @@ var GempLotrGameUI = Class.extend({
$(".ui-dialog-titlebar").show();
this.cardActionDialog.dialog("open");
this.arbitraryDialogResize();
this.arbitraryDialogResize(false);
},
cardActionChoiceDecision: function (decision) {
@@ -1187,6 +1187,8 @@ var GempLotrGameUI = Class.extend({
$(".ui-dialog-titlebar").show();
this.cardActionDialog.dialog("open");
this.arbitraryDialogResize(true);
},
cardSelectionDecision: function(decision) {
@@ -1367,7 +1369,12 @@ var GempLotrGameUI = Class.extend({
group.setBounds(this.padding, this.padding, width - 2 * this.padding, height - 2 * this.padding);
},
arbitraryDialogResize: function() {
this.dialogResize(this.cardActionDialog, this.specialGroup);
arbitraryDialogResize: function(texts) {
if (texts) {
var width = this.cardActionDialog.width() + 10;
var height = this.cardActionDialog.height() - 10;
this.specialGroup.setBounds(this.padding, this.padding, width - 2 * this.padding, height - 2 * this.padding);
} else
this.dialogResize(this.cardActionDialog, this.specialGroup);
}
});