Fix : prevent softlock with discard markers
release-tag / release-image (push) Successful in 36s

This commit is contained in:
2024-08-27 15:27:56 +02:00
parent 36a9a2e443
commit 6c1d4e9a53
+9 -1
View File
@@ -222,7 +222,15 @@ export class TurnController {
HttpStatus.FORBIDDEN,
);
}
if (
targetPlayer.fuckUMarkers + targetPlayer.discardMarkers >=
targetPlayer.hand.cards.length
) {
throw new HttpException(
'You cannot add more discard markers to this player',
HttpStatus.BAD_REQUEST,
);
}
const targetToken = game.currentTurn.tokens.find(
(t) => t.effect == CardEffects.MAKE_DISCARD,
);