Skip to content

Commit

Permalink
πŸ› Fix stealth tag accounting for rounds
Browse files Browse the repository at this point in the history
  • Loading branch information
MathiasGruber committed Oct 19, 2024
1 parent bc05bd1 commit 9050f61
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/src/libs/combat/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,13 @@ export const isUserStealthed = (
userEffects: UserEffect[] | undefined,
) => {
return userEffects?.some(
(e) => e.type === "stealth" && e.targetId === userId && !e.castThisRound,
(e) =>
e.type === "stealth" &&
e.targetId === userId &&
!e.castThisRound &&
"rounds" in e &&
e.rounds &&
e.rounds > 0,
);
};

Expand Down

0 comments on commit 9050f61

Please sign in to comment.