IPVGO: Ensure favor text is only shown for even-numbered winstreaks, not even loss streaks (#1110)

closes #1109

Ensure that loss streak tracking does not display the favor gain text, to avoid misleading players
This commit is contained in:
Michael Ficocelli 2024-02-20 17:36:06 -05:00 committed by GitHub
parent 47cf5c1610
commit ac05135f59
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -25,6 +25,8 @@ export const GoScorePowerSummary = ({ finalScore, opponent }: IProps) => {
const difficultyMultiplier = getDifficultyMultiplier(whiteScore.komi, Player.go.boardState.board[0].length);
const winstreakMultiplier = getWinstreakMultiplier(winStreak, oldWinStreak);
const nodePowerIncrease = formatNumber(blackScore.sum * difficultyMultiplier * winstreakMultiplier, 2);
const showFavorGain =
winStreak > 0 && winStreak % 2 === 0 && Player.factions.includes(opponent as unknown as FactionName);
return (
<>
@ -89,7 +91,7 @@ export const GoScorePowerSummary = ({ finalScore, opponent }: IProps) => {
</Tooltip>
</TableBody>
</Table>
{winStreak && winStreak % 2 === 0 && Player.factions.includes(opponent as unknown as FactionName) ? (
{showFavorGain ? (
<Tooltip
title={
<>