When an event is played, it triggers initiative lost, even if the card effect puts it back into hand.

This commit is contained in:
marcin.sciesinski
2018-05-21 10:17:31 -07:00
parent 0e25bb6837
commit 5f72f0155f

View File

@@ -7,6 +7,8 @@ import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.effects.PlayCardEffect;
import java.util.Collections;
public class PlayEventEffect extends PlayCardEffect {
private PhysicalCard _cardPlayed;
private PlayEventResult _playEventResult;
@@ -23,6 +25,12 @@ public class PlayEventEffect extends PlayCardEffect {
@Override
protected FullEffectResult playEffectReturningResult(LotroGame game) {
if (_cardPlayed.getZone() == Zone.VOID_FROM_HAND) {
// At this point, card should change initiative if played
game.getGameState().removeCardsFromZone(_cardPlayed.getOwner(), Collections.singleton(_cardPlayed));
game.getGameState().addCardToZone(game, _cardPlayed, Zone.VOID);
}
game.getActionsEnvironment().emitEffectResult(_playEventResult);
return new FullEffectResult(true);
}