- "Hollowing of Isengard" now correctly discards itself upon use.

- Playing attached permanents now can have twilight cost modified (as for example per "Fell Voice on the Air"). 
- Now the cards played on a site are finally correctly displayed if in Adventure Path (this time I actually tested it).
This commit is contained in:
marcins78@gmail.com
2011-10-06 13:45:27 +00:00
parent d1cf2ddd65
commit 058b616fc7
5 changed files with 13 additions and 8 deletions

View File

@@ -93,7 +93,7 @@ public abstract class AbstractAttachable extends AbstractLotroCardBlueprint {
}
public AttachPermanentAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, Filter additionalAttachmentFilter, int twilightModifier) {
return new AttachPermanentAction(game, self, Filters.and(getFullValidTargetFilter(playerId, game, self), additionalAttachmentFilter), getAttachCostModifiers(playerId, game, self));
return new AttachPermanentAction(game, self, Filters.and(getFullValidTargetFilter(playerId, game, self), additionalAttachmentFilter), getAttachCostModifiers(playerId, game, self), twilightModifier);
}
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) {

View File

@@ -38,7 +38,7 @@ public class AttachPermanentAction extends AbstractCostToEffectAction {
private Effect _discardCardEffect;
private boolean _cardDiscarded;
public AttachPermanentAction(final LotroGame game, final PhysicalCard card, Filter filter, final Map<Filter, Integer> attachCostModifiers) {
public AttachPermanentAction(final LotroGame game, final PhysicalCard card, Filter filter, final Map<Filter, Integer> attachCostModifiers, final int twilightModifier) {
_source = card;
_removeCardEffect = new RemoveCardFromZoneEffect(card);
@@ -49,7 +49,7 @@ public class AttachPermanentAction extends AbstractCostToEffectAction {
protected void cardSelected(PhysicalCard target) {
_putCardIntoPlayEffect = new AttachCardEffect(_source, target);
int modifier = 0;
int modifier = twilightModifier;
for (Map.Entry<Filter, Integer> filterIntegerEntry : attachCostModifiers.entrySet())
if (filterIntegerEntry.getKey().accepts(game.getGameState(), game.getModifiersQuerying(), target))
modifier += filterIntegerEntry.getValue();

View File

@@ -38,7 +38,7 @@ public class Card3_054 extends AbstractPermanent {
if (PlayConditions.canUseShadowCardDuringPhase(game.getGameState(), Phase.SHADOW, self, 0)) {
ActivateCardAction action = new ActivateCardAction(self, Keyword.SHADOW);
action.appendCost(
new DiscardCardsFromPlayEffect(self));
new DiscardCardsFromPlayEffect(self, self));
action.appendEffect(
new AddTwilightEffect(self, 3));
return Collections.singletonList(action);

View File

@@ -1,4 +1,9 @@
<pre style="font-size:80%">
<b>6 Oct. 2011</b>
- "Hollowing of Isengard" now correctly discards itself upon use.
- Playing attached permanents now can have twilight cost modified (as for example per "Fell Voice on the Air").
- Now the cards played on a site are finally correctly displayed if in Adventure Path (this time I actually tested it).
<b>5 Oct. 2011</b>
- Added timestamps to the chat messages in GameHall.
- Multiple cards played on a site in adventure path should be now layed out correctly - all should be visible, rather

View File

@@ -133,7 +133,7 @@ var AdvPathCardGroup = CardGroup.extend({
index++;
} else {
for (var i = 0; i < cardData.attachedCards.length; i++) {
this.layoutCard(cardData.attachedCards[0], x + i * (this.width - cardHeight) / (cardData.attachedCards.length - 1), y - (this.width - cardHeight) / 2, cardHeight, this.width, index);
this.layoutCard(cardData.attachedCards[i], x + i * (this.width - cardHeight) / (cardData.attachedCards.length - 1), y - (this.width - cardHeight) / 2, cardHeight, this.width, index);
index++;
}
}
@@ -208,7 +208,7 @@ var NormalCardGroup = CardGroup.extend({
var cardWidth = cardData.getWidthForHeight(rowHeight);
var attachmentWidths = 0;
for (var i = 0; i < cardData.attachedCards.length; i++)
attachmentWidths += cardData.attachedCards[i].data("card").getWidthForHeight(this.height) * 0.2;
attachmentWidths += cardData.attachedCards[i].data("card").getWidthForHeight(rowHeight) * 0.2;
var cardWidthWithAttachments = cardWidth + attachmentWidths;
totalWidth += cardWidthWithAttachments;
if (totalWidth > this.width) {
@@ -264,7 +264,7 @@ var NormalCardGroup = CardGroup.extend({
var attachmentWidths = 0;
for (var i = 0; i < cardData.attachedCards.length; i++)
attachmentWidths += cardData.attachedCards[i].data("card").getWidthForHeight(this.height) * 0.2;
attachmentWidths += cardData.attachedCards[i].data("card").getWidthForHeight(rowHeight) * 0.2;
var cardWidthWithAttachments = cardWidth + attachmentWidths;
if (x + cardWidthWithAttachments > this.width) {
row++;
@@ -273,7 +273,7 @@ var NormalCardGroup = CardGroup.extend({
}
for (var i = 0; i < cardData.attachedCards.length; i++) {
var attachedCardWidth = cardData.attachedCards[i].data("card").getWidthForHeight(this.height);
var attachedCardWidth = cardData.attachedCards[i].data("card").getWidthForHeight(rowHeight);
this.layoutCard(cardData.attachedCards[i], this.x + x, this.y + y, attachedCardWidth, rowHeight, index);
x += Math.floor(attachedCardWidth * 0.2);
index++;