Cards played as attachment count for initiative until "Play" is triggered.
This commit is contained in:
@@ -117,7 +117,10 @@ public class AttachPermanentAction extends AbstractCostToEffectAction implements
|
|||||||
public Effect nextEffect(LotroGame game) {
|
public Effect nextEffect(LotroGame game) {
|
||||||
if (!_cardRemoved) {
|
if (!_cardRemoved) {
|
||||||
_cardRemoved = true;
|
_cardRemoved = true;
|
||||||
|
boolean fromHand = (_cardToAttach.getZone() == Zone.HAND);
|
||||||
game.getGameState().removeCardsFromZone(_cardToAttach.getOwner(), Collections.singleton(_cardToAttach));
|
game.getGameState().removeCardsFromZone(_cardToAttach.getOwner(), Collections.singleton(_cardToAttach));
|
||||||
|
if (fromHand)
|
||||||
|
game.getGameState().addCardToZone(game, _cardToAttach, Zone.VOID);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_targetChosen) {
|
if (!_targetChosen) {
|
||||||
@@ -173,12 +176,16 @@ public class AttachPermanentAction extends AbstractCostToEffectAction implements
|
|||||||
} else {
|
} else {
|
||||||
if (!_cardDiscarded) {
|
if (!_cardDiscarded) {
|
||||||
_cardDiscarded = true;
|
_cardDiscarded = true;
|
||||||
|
if (_cardToAttach.getZone() != null)
|
||||||
|
game.getGameState().removeCardsFromZone(_cardToAttach.getOwner(), Collections.singleton(_cardToAttach));
|
||||||
game.getGameState().addCardToZone(game, _cardToAttach, Zone.DISCARD);
|
game.getGameState().addCardToZone(game, _cardToAttach, Zone.DISCARD);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!_cardDiscarded) {
|
if (!_cardDiscarded) {
|
||||||
_cardDiscarded = true;
|
_cardDiscarded = true;
|
||||||
|
if (_cardToAttach.getZone() != null)
|
||||||
|
game.getGameState().removeCardsFromZone(_cardToAttach.getOwner(), Collections.singleton(_cardToAttach));
|
||||||
game.getGameState().addCardToZone(game, _cardToAttach, Zone.DISCARD);
|
game.getGameState().addCardToZone(game, _cardToAttach, Zone.DISCARD);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user