Cards played as attachment count for initiative until "Play" is triggered.

This commit is contained in:
marcins78@gmail.com
2011-12-05 05:46:24 +00:00
parent f5dc4da6f8
commit d3fb1d8b22

View File

@@ -117,7 +117,10 @@ public class AttachPermanentAction extends AbstractCostToEffectAction implements
public Effect nextEffect(LotroGame game) {
if (!_cardRemoved) {
_cardRemoved = true;
boolean fromHand = (_cardToAttach.getZone() == Zone.HAND);
game.getGameState().removeCardsFromZone(_cardToAttach.getOwner(), Collections.singleton(_cardToAttach));
if (fromHand)
game.getGameState().addCardToZone(game, _cardToAttach, Zone.VOID);
}
if (!_targetChosen) {
@@ -173,12 +176,16 @@ public class AttachPermanentAction extends AbstractCostToEffectAction implements
} else {
if (!_cardDiscarded) {
_cardDiscarded = true;
if (_cardToAttach.getZone() != null)
game.getGameState().removeCardsFromZone(_cardToAttach.getOwner(), Collections.singleton(_cardToAttach));
game.getGameState().addCardToZone(game, _cardToAttach, Zone.DISCARD);
}
}
} else {
if (!_cardDiscarded) {
_cardDiscarded = true;
if (_cardToAttach.getZone() != null)
game.getGameState().removeCardsFromZone(_cardToAttach.getOwner(), Collections.singleton(_cardToAttach));
game.getGameState().addCardToZone(game, _cardToAttach, Zone.DISCARD);
}
}