- User interface now displays damage bonuses in current skirmish (if any).
This commit is contained in:
@@ -62,6 +62,9 @@ public class EventSerializer {
|
||||
eventElem.setAttribute("fellowshipStrength", String.valueOf(gameStats.getFellowshipSkirmishStrength()));
|
||||
eventElem.setAttribute("shadowStrength", String.valueOf(gameStats.getShadowSkirmishStrength()));
|
||||
|
||||
eventElem.setAttribute("fellowshipDamageBonus", String.valueOf(gameStats.getFellowshipSkirmishDamageBonus()));
|
||||
eventElem.setAttribute("shadowDamageBonus", String.valueOf(gameStats.getShadowSkirmishDamageBonus()));
|
||||
|
||||
eventElem.setAttribute("fpOverwhelmed", String.valueOf(gameStats.isFpOverwhelmed()));
|
||||
|
||||
eventElem.setAttribute("moveLimit", String.valueOf(gameStats.getMoveLimit()));
|
||||
|
||||
@@ -22,6 +22,9 @@ public class GameStats {
|
||||
private int _fellowshipSkirmishStrength;
|
||||
private int _shadowSkirmishStrength;
|
||||
|
||||
private int _fellowshipSkirmishDamageBonus;
|
||||
private int _shadowSkirmishDamageBonus;
|
||||
|
||||
private boolean _fpOverwhelmed;
|
||||
|
||||
private Map<String, Map<Zone, Integer>> _zoneSizes = new HashMap<String, Map<Zone, Integer>>();
|
||||
@@ -70,6 +73,18 @@ public class GameStats {
|
||||
_shadowSkirmishStrength = newShadowStrength;
|
||||
}
|
||||
|
||||
int newFellowshipDamageBonus = RuleUtils.getFellowshipSkirmishDamageBonus(game);
|
||||
if (newFellowshipDamageBonus != _fellowshipSkirmishDamageBonus) {
|
||||
changed = true;
|
||||
_fellowshipSkirmishDamageBonus = newFellowshipDamageBonus;
|
||||
}
|
||||
|
||||
int newShadowDamageBonus = RuleUtils.getShadowSkirmishDamageBonus(game);
|
||||
if (newShadowDamageBonus != _shadowSkirmishDamageBonus) {
|
||||
changed = true;
|
||||
_shadowSkirmishDamageBonus = newShadowDamageBonus;
|
||||
}
|
||||
|
||||
boolean newFpOverwhelmed = false;
|
||||
Skirmish skirmish = game.getGameState().getSkirmish();
|
||||
if (skirmish != null) {
|
||||
@@ -147,6 +162,14 @@ public class GameStats {
|
||||
return _shadowSkirmishStrength;
|
||||
}
|
||||
|
||||
public int getFellowshipSkirmishDamageBonus() {
|
||||
return _fellowshipSkirmishDamageBonus;
|
||||
}
|
||||
|
||||
public int getShadowSkirmishDamageBonus() {
|
||||
return _shadowSkirmishDamageBonus;
|
||||
}
|
||||
|
||||
public boolean isFpOverwhelmed() {
|
||||
return _fpOverwhelmed;
|
||||
}
|
||||
@@ -167,10 +190,12 @@ public class GameStats {
|
||||
GameStats copy = new GameStats();
|
||||
copy._fellowshipArchery = _fellowshipArchery;
|
||||
copy._fellowshipSkirmishStrength = _fellowshipSkirmishStrength;
|
||||
copy._fellowshipSkirmishDamageBonus = _fellowshipSkirmishDamageBonus;
|
||||
copy._moveCount = _moveCount;
|
||||
copy._moveLimit = _moveLimit;
|
||||
copy._shadowArchery = _shadowArchery;
|
||||
copy._shadowSkirmishStrength = _shadowSkirmishStrength;
|
||||
copy._shadowSkirmishDamageBonus = _shadowSkirmishDamageBonus;
|
||||
copy._fpOverwhelmed = _fpOverwhelmed;
|
||||
copy._zoneSizes = _zoneSizes;
|
||||
copy._charStrengths = _charStrengths;
|
||||
|
||||
@@ -84,4 +84,27 @@ public class RuleUtils {
|
||||
|
||||
return totalStrength;
|
||||
}
|
||||
|
||||
public static int getFellowshipSkirmishDamageBonus(LotroGame game) {
|
||||
if (game.getGameState().getSkirmish() == null)
|
||||
return 0;
|
||||
|
||||
PhysicalCard fpChar = game.getGameState().getSkirmish().getFellowshipCharacter();
|
||||
if (fpChar == null)
|
||||
return 0;
|
||||
|
||||
return game.getModifiersQuerying().getKeywordCount(game.getGameState(), fpChar, Keyword.DAMAGE);
|
||||
}
|
||||
|
||||
public static int getShadowSkirmishDamageBonus(LotroGame game) {
|
||||
if (game.getGameState().getSkirmish() == null)
|
||||
return 0;
|
||||
|
||||
int totalBonus = 0;
|
||||
|
||||
for (PhysicalCard physicalCard : game.getGameState().getSkirmish().getShadowCharacters())
|
||||
totalBonus += game.getModifiersQuerying().getKeywordCount(game.getGameState(), physicalCard, Keyword.DAMAGE);
|
||||
|
||||
return totalBonus;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,203 +7,213 @@
|
||||
<meta http-equiv="pragma" content="no-cache"/>
|
||||
|
||||
<style type="text/css">
|
||||
body {
|
||||
font-size: 12px;
|
||||
}
|
||||
body {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.borderOverlay {
|
||||
border: solid #000000;
|
||||
}
|
||||
.borderOverlay {
|
||||
border: solid #000000;
|
||||
}
|
||||
|
||||
.highlightBorderOverlay {
|
||||
border: solid #ffffff;
|
||||
}
|
||||
.highlightBorderOverlay {
|
||||
border: solid #ffffff;
|
||||
}
|
||||
|
||||
.foilOverlay {
|
||||
opacity: 0.2;
|
||||
}
|
||||
.foilOverlay {
|
||||
opacity: 0.2;
|
||||
}
|
||||
|
||||
.cardHint {
|
||||
display: inline;
|
||||
color: #6f6fff;
|
||||
cursor: pointer;
|
||||
}
|
||||
.cardHint {
|
||||
display: inline;
|
||||
color: #6f6fff;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.cardStrength {
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
background-color: #7a6a53;
|
||||
opacity: 0.7;
|
||||
font-weight: bolder;
|
||||
color: #ffffff;
|
||||
}
|
||||
.cardStrength {
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
background-color: #7a6a53;
|
||||
opacity: 0.7;
|
||||
font-weight: bolder;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.cardVitality {
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
background-color: #8a1f0d;
|
||||
opacity: 0.7;
|
||||
font-weight: bolder;
|
||||
color: #ffffff;
|
||||
}
|
||||
.cardVitality {
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
background-color: #8a1f0d;
|
||||
opacity: 0.7;
|
||||
font-weight: bolder;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.selectableCard > .borderOverlay {
|
||||
border-color: #00af00;
|
||||
cursor: pointer;
|
||||
}
|
||||
.selectableCard > .borderOverlay {
|
||||
border-color: #00af00;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.selectedCard > .borderOverlay {
|
||||
border-color: #009f9f;
|
||||
}
|
||||
.selectedCard > .borderOverlay {
|
||||
border-color: #009f9f;
|
||||
}
|
||||
|
||||
.stats {
|
||||
text-align: center;
|
||||
padding: 2px;
|
||||
}
|
||||
.stats {
|
||||
text-align: center;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.fpArchery {
|
||||
display: inline-block;
|
||||
background-image: url('images/fpArchery.png');
|
||||
background-repeat: no-repeat;
|
||||
color: #007777;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
font-size: 200%;
|
||||
font-weight: bolder;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}
|
||||
.fpArchery {
|
||||
display: inline-block;
|
||||
background-image: url('images/fpArchery.png');
|
||||
background-repeat: no-repeat;
|
||||
color: #007777;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
font-size: 200%;
|
||||
font-weight: bolder;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.shadowArchery {
|
||||
display: inline-block;
|
||||
background-image: url('images/shadowArchery.png');
|
||||
background-repeat: no-repeat;
|
||||
color: #007777;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
font-size: 200%;
|
||||
font-weight: bolder;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}
|
||||
.shadowArchery {
|
||||
display: inline-block;
|
||||
background-image: url('images/shadowArchery.png');
|
||||
background-repeat: no-repeat;
|
||||
color: #007777;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
font-size: 200%;
|
||||
font-weight: bolder;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.move {
|
||||
display: inline-block;
|
||||
background-image: url('images/move.png');
|
||||
background-repeat: no-repeat;
|
||||
color: #007777;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
font-size: 200%;
|
||||
font-weight: bolder;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}
|
||||
.move {
|
||||
display: inline-block;
|
||||
background-image: url('images/move.png');
|
||||
background-repeat: no-repeat;
|
||||
color: #007777;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
font-size: 200%;
|
||||
font-weight: bolder;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.player {
|
||||
color: #ffffff;
|
||||
}
|
||||
.player {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.player {
|
||||
color: #ffffff;
|
||||
}
|
||||
.player {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.player.current {
|
||||
background-color: #ffffff;
|
||||
color: #000000;
|
||||
}
|
||||
.player.current {
|
||||
background-color: #ffffff;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.playerStats {
|
||||
font-size: 70%;
|
||||
}
|
||||
.playerStats {
|
||||
font-size: 70%;
|
||||
}
|
||||
|
||||
.playerStats .clickable {
|
||||
color: #7f7fff;
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
}
|
||||
.playerStats .clickable {
|
||||
color: #7f7fff;
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.phase {
|
||||
color: #ffffff;
|
||||
}
|
||||
.phase {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.phase.current {
|
||||
background-color: #ffffff;
|
||||
color: #000000;
|
||||
}
|
||||
.phase.current {
|
||||
background-color: #ffffff;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.twilightPool {
|
||||
float: right;
|
||||
font-size: 30px;
|
||||
width: 40px;
|
||||
border-radius: 7px;
|
||||
border: 1px solid #ffffff;
|
||||
background-color: #000000;
|
||||
color: #ffffff;
|
||||
padding: 2px;
|
||||
text-align: right;
|
||||
}
|
||||
.twilightPool {
|
||||
float: right;
|
||||
font-size: 30px;
|
||||
width: 40px;
|
||||
border-radius: 7px;
|
||||
border: 1px solid #ffffff;
|
||||
background-color: #000000;
|
||||
color: #ffffff;
|
||||
padding: 2px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.skirmish {
|
||||
}
|
||||
.skirmish {
|
||||
}
|
||||
|
||||
.fpStrength, .shadowStrength {
|
||||
border-radius: 6px;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
background-color: #ffffff;
|
||||
opacity: 0.7;
|
||||
color: #000000;
|
||||
font-size: 300%;
|
||||
}
|
||||
.fpDamageBonus, .shadowDamageBonus {
|
||||
border-radius: 6px;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
background-color: #cccccc;
|
||||
opacity: 0.7;
|
||||
color: #000000;
|
||||
font-size: 180%;
|
||||
}
|
||||
|
||||
.fpStrength.overwhelmed {
|
||||
border-radius: 6px;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
background-color: #ff3333;
|
||||
opacity: 0.7;
|
||||
color: #000000;
|
||||
font-size: 300%;
|
||||
}
|
||||
.fpStrength, .shadowStrength {
|
||||
border-radius: 6px;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
background-color: #ffffff;
|
||||
opacity: 0.7;
|
||||
color: #000000;
|
||||
font-size: 300%;
|
||||
}
|
||||
|
||||
#chatBox {
|
||||
font-size: 90%;
|
||||
}
|
||||
.fpStrength.overwhelmed {
|
||||
border-radius: 6px;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
background-color: #ff3333;
|
||||
opacity: 0.7;
|
||||
color: #000000;
|
||||
font-size: 300%;
|
||||
}
|
||||
|
||||
.chatMessage {
|
||||
color: #3fafff;
|
||||
}
|
||||
#chatBox {
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
.systemMessage {
|
||||
color: #5f5f5f;
|
||||
}
|
||||
.chatMessage {
|
||||
color: #3fafff;
|
||||
}
|
||||
|
||||
.gameMessage {
|
||||
font-size: 80%;
|
||||
}
|
||||
.systemMessage {
|
||||
color: #5f5f5f;
|
||||
}
|
||||
|
||||
.warningMessage {
|
||||
color: #ff0000;
|
||||
}
|
||||
.gameMessage {
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
.ui-tabs-nav li {
|
||||
font-size: 70%;
|
||||
}
|
||||
.warningMessage {
|
||||
color: #ff0000;
|
||||
}
|
||||
|
||||
#settingsBox label {
|
||||
font-size: 70%;
|
||||
}
|
||||
.ui-tabs-nav li {
|
||||
font-size: 70%;
|
||||
}
|
||||
|
||||
.clock {
|
||||
float: right;
|
||||
font-size: 100%;
|
||||
}
|
||||
#settingsBox label {
|
||||
font-size: 70%;
|
||||
}
|
||||
|
||||
.ui-button-text-only .ui-button-text {
|
||||
font-size: 70%;
|
||||
padding: .2em .5em;
|
||||
}
|
||||
.clock {
|
||||
float: right;
|
||||
font-size: 100%;
|
||||
}
|
||||
|
||||
.ui-button-text-only .ui-button-text {
|
||||
font-size: 70%;
|
||||
padding: .2em .5em;
|
||||
}
|
||||
</style>
|
||||
<link rel="stylesheet" type="text/css" href="css/dark-hive/jquery-ui-1.8.16.custom.css">
|
||||
<link rel="stylesheet" type="text/css" href="css/jquery.contextMenu.css">
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
against Nazgul.
|
||||
- "Orc Pillager" now correctly gives -1 for each attached card to the character in skirmish against it, rather than
|
||||
+1 strength to itself for each such card.
|
||||
- User interface now displays damage bonuses in current skirmish (if any).
|
||||
|
||||
<b>1 Nov. 2011</b>
|
||||
- Fixed "Theoden" (4P365) to not crash game due to testing if you can attach hides (also a possession, right?) to it.
|
||||
|
||||
@@ -526,12 +526,16 @@ var GameAnimations = Class.extend({
|
||||
});
|
||||
|
||||
that.game.fpStrengthDiv = $("<div class='fpStrength'></div>");
|
||||
that.game.fpDamageBonusDiv = $("<div class='fpDamageBonus'></div>");
|
||||
that.game.shadowStrengthDiv = $("<div class='shadowStrength'></div>");
|
||||
that.game.shadowDamageBonusDiv = $("<div class='shadowDamageBonus'></div>");
|
||||
|
||||
that.game.skirmishGroupDiv = $("<div class='ui-widget-content skirmish'></div>");
|
||||
that.game.skirmishGroupDiv.css({"border-radius": "7px", "border-color": "#ff0000"});
|
||||
that.game.skirmishGroupDiv.append(that.game.fpStrengthDiv);
|
||||
that.game.skirmishGroupDiv.append(that.game.fpDamageBonusDiv);
|
||||
that.game.skirmishGroupDiv.append(that.game.shadowStrengthDiv);
|
||||
that.game.skirmishGroupDiv.append(that.game.shadowDamageBonusDiv);
|
||||
$("#main").append(that.game.skirmishGroupDiv);
|
||||
|
||||
next();
|
||||
@@ -734,10 +738,29 @@ var GameAnimations = Class.extend({
|
||||
that.game.fpStrengthDiv.removeClass("overwhelmed");
|
||||
}
|
||||
}
|
||||
|
||||
var damageBonus = element.getAttribute("fellowshipDamageBonus");
|
||||
if (damageBonus != null) {
|
||||
that.game.fpDamageBonusDiv.text("+" + damageBonus);
|
||||
if (damageBonus == 0)
|
||||
that.game.fpDamageBonusDiv.css({visibility: "hidden"});
|
||||
else
|
||||
that.game.fpDamageBonusDiv.css({visibility: "visible"});
|
||||
}
|
||||
}
|
||||
if (that.game.shadowStrengthDiv != null)
|
||||
if (that.game.shadowStrengthDiv != null) {
|
||||
that.game.shadowStrengthDiv.text(element.getAttribute("shadowStrength"));
|
||||
|
||||
var damageBonus = element.getAttribute("shadowDamageBonus");
|
||||
if (damageBonus != null) {
|
||||
that.game.shadowDamageBonusDiv.text("+" + damageBonus);
|
||||
if (damageBonus == 0)
|
||||
that.game.shadowDamageBonusDiv.css({visibility: "hidden"});
|
||||
else
|
||||
that.game.shadowDamageBonusDiv.css({visibility: "visible"});
|
||||
}
|
||||
}
|
||||
|
||||
next();
|
||||
});
|
||||
},
|
||||
|
||||
@@ -35,7 +35,9 @@ var GempLotrGameUI = Class.extend({
|
||||
|
||||
skirmishGroupDiv: null,
|
||||
fpStrengthDiv: null,
|
||||
fpDamageBonusDiv: null,
|
||||
shadowStrengthDiv: null,
|
||||
shadowDamageBonusDiv: null,
|
||||
skirmishShadowGroup: null,
|
||||
skirmishFellowshipGroup: null,
|
||||
|
||||
@@ -488,16 +490,21 @@ var GempLotrGameUI = Class.extend({
|
||||
var y = currentPlayerTurn ? (padding * 3 + yScales[2] * heightPerScale) : (padding * 2 + yScales[1] * heightPerScale);
|
||||
this.skirmishGroupDiv.css({left:x + "px", top:y + "px", width: groupWidth, height: groupHeight, position: "absolute"});
|
||||
var strengthBoxSize = 40;
|
||||
var dmgBoxSize = 30;
|
||||
if (currentPlayerTurn) {
|
||||
this.skirmishShadowGroup.setBounds(x + 3, y + 3, groupWidth - 6, heightScales[2] * heightPerScale - 6);
|
||||
this.skirmishFellowshipGroup.setBounds(x + 3, y + heightScales[2] * heightPerScale + padding + 3, groupWidth - 6, heightScales[3] * heightPerScale - 6);
|
||||
this.fpStrengthDiv.css({position: "absolute", left: groupWidth - strengthBoxSize - 2 + "px", top: groupHeight - strengthBoxSize - 2 + "px", width: strengthBoxSize, height: strengthBoxSize, "z-index": 50});
|
||||
this.fpDamageBonusDiv.css({position: "absolute", left: groupWidth - strengthBoxSize - dmgBoxSize - 2 + "px", top: groupHeight - dmgBoxSize - 2 + "px", width: dmgBoxSize, height: dmgBoxSize, "z-index": 50});
|
||||
this.shadowStrengthDiv.css({position: "absolute", left: groupWidth - strengthBoxSize - 2 + "px", top: 2 + "px", width: strengthBoxSize, height: strengthBoxSize, "z-index": 50});
|
||||
this.shadowDamageBonusDiv.css({position: "absolute", left: groupWidth - strengthBoxSize - dmgBoxSize - 2 + "px", top: 2 + "px", width: dmgBoxSize, height: dmgBoxSize, "z-index": 50});
|
||||
} else {
|
||||
this.skirmishFellowshipGroup.setBounds(x + 3, y + 3, groupWidth - 6, heightScales[1] * heightPerScale - 6);
|
||||
this.skirmishShadowGroup.setBounds(x + 3, y + heightScales[1] * heightPerScale + padding + 3, groupWidth - 6, heightScales[2] * heightPerScale - 6);
|
||||
this.shadowStrengthDiv.css({position: "absolute", left: groupWidth - strengthBoxSize - 2 + "px", top: groupHeight - strengthBoxSize - 2 + "px", width: strengthBoxSize, height: strengthBoxSize, "z-index": 50});
|
||||
this.shadowDamageBonusDiv.css({position: "absolute", left: groupWidth - strengthBoxSize - dmgBoxSize - 2 + "px", top: groupHeight - dmgBoxSize - 2 + "px", width: dmgBoxSize, height: dmgBoxSize, "z-index": 50});
|
||||
this.fpStrengthDiv.css({position: "absolute", left: groupWidth - strengthBoxSize - 2 + "px", top: 2 + "px", width: strengthBoxSize, height: strengthBoxSize, "z-index": 50});
|
||||
this.fpDamageBonusDiv.css({position: "absolute", left: groupWidth - strengthBoxSize - dmgBoxSize - 2 + "px", top: 2 + "px", width: dmgBoxSize, height: dmgBoxSize, "z-index": 50});
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user