From 58091287822c0d28f5f68622b269e87aa33fcd8c Mon Sep 17 00:00:00 2001 From: Xaver-DaRed Date: Sun, 26 Apr 2026 16:36:44 +0200 Subject: [PATCH] Limit HQ2 and HQ3 results depending on HQ tier --- src/map/utils/synthutils.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/map/utils/synthutils.cpp b/src/map/utils/synthutils.cpp index 09814284a65..bfd567b25fa 100644 --- a/src/map/utils/synthutils.cpp +++ b/src/map/utils/synthutils.cpp @@ -579,9 +579,16 @@ auto calculateSynthResult(CCharEntity* PChar) -> uint8 return SYNTHESIS_SUCCESS; } + // Early return: T0 cannot upgrade HQ. + if (finalHQTier <= 1) + { + return SYNTHESIS_HQ; + } + // Calculate HQ2 and HQ3 upgrades. - uint8 upgradeHQ = 0; - for (uint8 tries = 0; tries < 2; ++tries) + uint8 allowedUpgrades = (finalHQTier == 2 ? 1 : 2); + uint8 upgradeHQ = 0; + for (uint8 tries = 0; tries < allowedUpgrades; ++tries) { if (xirand::GetRandomNumber(0.0f, 100.f) <= 25.0f) // 25% Chance to upgrade HQ {