From 46402ba7078897454afeb2f6a45c890a3a983d65 Mon Sep 17 00:00:00 2001 From: Meridian Date: Wed, 25 Mar 2026 14:31:47 +0000 Subject: [PATCH] balance: tune monk, rp, and knight sustain --- data/scripts/actions/items/potions.lua | 2 +- data/scripts/spells/attack/chained_penance.lua | 4 ++-- .../spells/attack/devastating_knockout.lua | 4 ++-- data/scripts/spells/attack/double_jab.lua | 4 ++-- data/scripts/spells/attack/flurry_of_blows.lua | 4 ++-- data/scripts/spells/attack/forceful_uppercut.lua | 4 ++-- .../spells/attack/greater_flurry_of_blows.lua | 4 ++-- .../scripts/spells/attack/greater_tiger_clash.lua | 4 ++-- data/scripts/spells/attack/spiritual_outburst.lua | 4 ++-- data/scripts/spells/attack/sweeping_takedown.lua | 4 ++-- data/scripts/spells/attack/swift_jab.lua | 4 ++-- data/scripts/spells/attack/tiger_clash.lua | 4 ++-- src/creatures/combat/combat.cpp | 15 +++++++++------ src/io/io_wheel.cpp | 2 +- 14 files changed, 33 insertions(+), 30 deletions(-) diff --git a/data/scripts/actions/items/potions.lua b/data/scripts/actions/items/potions.lua index 7dd1aa114..dafc8c5d1 100644 --- a/data/scripts/actions/items/potions.lua +++ b/data/scripts/actions/items/potions.lua @@ -44,7 +44,7 @@ end local potions = { [236] = { health = { 250, 350 }, vocations = { VOCATION.BASE_ID.PALADIN, VOCATION.BASE_ID.KNIGHT, VOCATION.BASE_ID.MONK }, level = 50, flask = 283, description = "Only knights, monks and paladins of level 50 or above may drink this fluid." }, [237] = { mana = { 115, 185 }, level = 50, flask = 283, description = "Only players of level 50 or above may drink this fluid." }, - [238] = { mana = { 150, 250 }, vocations = { VOCATION.BASE_ID.SORCERER, VOCATION.BASE_ID.DRUID, VOCATION.BASE_ID.PALADIN, VOCATION.BASE_ID.MONK }, level = 80, flask = 284, description = "Only sorcerers, druids, monks and paladins of level 80 or above may drink this fluid." }, + [238] = { mana = { 150, 250 }, vocations = { VOCATION.BASE_ID.SORCERER, VOCATION.BASE_ID.DRUID, VOCATION.BASE_ID.PALADIN, VOCATION.BASE_ID.MONK, VOCATION.BASE_ID.KNIGHT }, level = 80, flask = 284, description = "Only sorcerers, druids, knights, monks and paladins of level 80 or above may drink this fluid." }, [239] = { health = { 425, 575 }, vocations = { VOCATION.BASE_ID.KNIGHT }, level = 80, flask = 284, description = "Only knights of level 80 or above may drink this fluid." }, [266] = { health = { 125, 175 }, flask = 285 }, [268] = { mana = { 75, 125 }, flask = 285 }, diff --git a/data/scripts/spells/attack/chained_penance.lua b/data/scripts/spells/attack/chained_penance.lua index 5d05dada1..ef9888eb4 100644 --- a/data/scripts/spells/attack/chained_penance.lua +++ b/data/scripts/spells/attack/chained_penance.lua @@ -110,7 +110,7 @@ local config = { } local function onGetFormulaValues(player, weaponDamage) - local basePower = 70 + local basePower = 78 --[[ local helmetItem = player:getSlotItem(CONST_SLOT_HEAD) @@ -123,7 +123,7 @@ local function onGetFormulaValues(player, weaponDamage) local skill = player:getSkillLevel(SKILL_FIRST) local attackValue = calculateAttackValue(player, skill, weaponDamage) - local spellFactor = 2.0 + local spellFactor = 2.15 local total = (basePower * attackValue) / 100 + (spellFactor * attackValue) local minDamage = -total * 0.9 diff --git a/data/scripts/spells/attack/devastating_knockout.lua b/data/scripts/spells/attack/devastating_knockout.lua index 00ca642d8..adc23a616 100644 --- a/data/scripts/spells/attack/devastating_knockout.lua +++ b/data/scripts/spells/attack/devastating_knockout.lua @@ -13,9 +13,9 @@ combatEarth:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) combatEarth:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GREEN_TIGERCLASH) function onGetFormulaValues(player, skill, weaponDamage, attackFactor) - local basePower = 62 + local basePower = 70 local attackValue = calculateAttackValue(player, skill, weaponDamage) - local spellFactor = 1.0 + local spellFactor = 1.1 local total = (basePower * attackValue) / 100 + (spellFactor * attackValue) return -total * 0.9, -total * 1.1 end diff --git a/data/scripts/spells/attack/double_jab.lua b/data/scripts/spells/attack/double_jab.lua index b79a249d2..51c1adb5c 100644 --- a/data/scripts/spells/attack/double_jab.lua +++ b/data/scripts/spells/attack/double_jab.lua @@ -13,9 +13,9 @@ combatEarth:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) combatEarth:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GREEN_TIGERCLASH) function onGetFormulaValues(player, skill, weaponDamage, attackFactor) - local basePower = 40 + local basePower = 48 local attackValue = calculateAttackValue(player, skill, weaponDamage) - local spellFactor = 0.9 + local spellFactor = 1.0 local total = (basePower * attackValue) / 100 + (spellFactor * attackValue) return -total * 0.9, -total * 1.1 end diff --git a/data/scripts/spells/attack/flurry_of_blows.lua b/data/scripts/spells/attack/flurry_of_blows.lua index 7709dfc46..ea410c318 100644 --- a/data/scripts/spells/attack/flurry_of_blows.lua +++ b/data/scripts/spells/attack/flurry_of_blows.lua @@ -24,9 +24,9 @@ combatEarth:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GREEN_FLURRYOFBLOWS) combatEarth:setArea(createCombatArea(AREA_WAVE)) function onGetFormulaValues(player, skill, weaponDamage, attackFactor) - local basePower = 55 + local basePower = 60 local attackValue = calculateAttackValue(player, skill, weaponDamage) - local spellFactor = 0.6 + local spellFactor = 0.7 local total = (basePower * attackValue) / 100 + (spellFactor * attackValue) return -total * 0.9, -total * 1.1 end diff --git a/data/scripts/spells/attack/forceful_uppercut.lua b/data/scripts/spells/attack/forceful_uppercut.lua index 881cc48af..fb7cef837 100644 --- a/data/scripts/spells/attack/forceful_uppercut.lua +++ b/data/scripts/spells/attack/forceful_uppercut.lua @@ -13,9 +13,9 @@ combatEarth:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) combatEarth:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GREEN_TIGERCLASH) function onGetFormulaValues(player, skill, weaponDamage, attackFactor) - local basePower = 135 + local basePower = 150 local attackValue = calculateAttackValue(player, skill, weaponDamage) - local spellFactor = 0.7 + local spellFactor = 0.8 local total = (basePower * attackValue) / 100 + (spellFactor * attackValue) return -total * 0.9, -total * 1.1 end diff --git a/data/scripts/spells/attack/greater_flurry_of_blows.lua b/data/scripts/spells/attack/greater_flurry_of_blows.lua index 6edb3502a..29bbf578d 100644 --- a/data/scripts/spells/attack/greater_flurry_of_blows.lua +++ b/data/scripts/spells/attack/greater_flurry_of_blows.lua @@ -24,9 +24,9 @@ combatEarth:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GREEN_FLURRYOFBLOWS) combatEarth:setArea(createCombatArea(AREA_WAVE)) function onGetFormulaValues(player, skill, weaponDamage, attackFactor) - local basePower = 86 + local basePower = 95 local attackValue = calculateAttackValue(player, skill, weaponDamage) - local spellFactor = 3 + local spellFactor = 3.25 local total = (basePower * attackValue) / 100 + (spellFactor * attackValue) return -total * 0.9, -total * 1.1 end diff --git a/data/scripts/spells/attack/greater_tiger_clash.lua b/data/scripts/spells/attack/greater_tiger_clash.lua index 9ff24c31d..e28d34ec8 100644 --- a/data/scripts/spells/attack/greater_tiger_clash.lua +++ b/data/scripts/spells/attack/greater_tiger_clash.lua @@ -13,9 +13,9 @@ combatEarth:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) combatEarth:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GREEN_TIGERCLASH) function onGetFormulaValues(player, skill, weaponDamage, attackFactor) - local basePower = 44 + local basePower = 50 local attackValue = calculateAttackValue(player, skill, weaponDamage) - local spellFactor = 0.9 + local spellFactor = 1.0 local total = (basePower * attackValue) / 100 + (spellFactor * attackValue) return -total * 0.9, -total * 1.1 end diff --git a/data/scripts/spells/attack/spiritual_outburst.lua b/data/scripts/spells/attack/spiritual_outburst.lua index d6227def7..03d45a934 100644 --- a/data/scripts/spells/attack/spiritual_outburst.lua +++ b/data/scripts/spells/attack/spiritual_outburst.lua @@ -103,12 +103,12 @@ local config = { } local function onGetFormulaValues(player, weaponDamage) - local basePower = 42 + local basePower = 45 local skill = player:getSkillLevel(SKILL_FIRST) local attackValue = calculateAttackValue(player, skill, weaponDamage) - local spellFactor = 2.5 + local spellFactor = 2.65 local total = (basePower * attackValue) / 100 + (spellFactor * attackValue) local minDamage = -total * 0.9 diff --git a/data/scripts/spells/attack/sweeping_takedown.lua b/data/scripts/spells/attack/sweeping_takedown.lua index 2661e16d0..a6a023d0d 100644 --- a/data/scripts/spells/attack/sweeping_takedown.lua +++ b/data/scripts/spells/attack/sweeping_takedown.lua @@ -45,9 +45,9 @@ combatEarth2:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GREEN_EXPLOSIONHIT) combatEarth2:setArea(createCombatArea(AREA_WAVE_2)) function onGetFormulaValues(player, skill, weaponDamage, attackFactor) - local basePower = 48 + local basePower = 52 local attackValue = calculateAttackValue(player, skill, weaponDamage) - local spellFactor = 1.0 + local spellFactor = 1.05 local total = (basePower * attackValue) / 100 + (spellFactor * attackValue) return -total * 0.9, -total * 1.1 end diff --git a/data/scripts/spells/attack/swift_jab.lua b/data/scripts/spells/attack/swift_jab.lua index 79ede50d7..4a28ccac7 100644 --- a/data/scripts/spells/attack/swift_jab.lua +++ b/data/scripts/spells/attack/swift_jab.lua @@ -13,9 +13,9 @@ combatEarth:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) combatEarth:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GREEN_TIGERCLASH) function onGetFormulaValues(player, skill, weaponDamage, attackFactor) - local basePower = 12 + local basePower = 14 local attackValue = calculateAttackValue(player, skill, weaponDamage) - local spellFactor = 0.7 + local spellFactor = 0.8 local total = (basePower * attackValue) / 100 + (spellFactor * attackValue) return -total * 0.9, -total * 1.1 end diff --git a/data/scripts/spells/attack/tiger_clash.lua b/data/scripts/spells/attack/tiger_clash.lua index 4645f9d52..2ecf21938 100644 --- a/data/scripts/spells/attack/tiger_clash.lua +++ b/data/scripts/spells/attack/tiger_clash.lua @@ -13,9 +13,9 @@ combatEarth:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) combatEarth:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GREEN_TIGERCLASH) function onGetFormulaValues(player, skill, weaponDamage, attackFactor) - local basePower = 18 + local basePower = 22 local attackValue = calculateAttackValue(player, skill, weaponDamage) - local spellFactor = 0.7 + local spellFactor = 0.8 local total = (basePower * attackValue) / 100 + (spellFactor * attackValue) return -total * 0.9, -total * 1.1 end diff --git a/src/creatures/combat/combat.cpp b/src/creatures/combat/combat.cpp index 42ce88d93..4910198c4 100644 --- a/src/creatures/combat/combat.cpp +++ b/src/creatures/combat/combat.cpp @@ -78,22 +78,25 @@ static void applyImproveMonkAttackSpender(const std::shared_ptr &player, return; } - uint8_t baseHarmonyBonusPercent = 7; // 7, 14, 28, 56, 112 + // Flat base curve by harmony points: 1->8, 2->16, 3->26, 4->38, 5->52 + static constexpr uint8_t baseByHarmony[] = {0, 8, 16, 26, 38, 52}; + uint8_t virtueBonus = 0; if (player->getVirtue() == VIRTUE_HARMONY) { - baseHarmonyBonusPercent += (player->isSerene() ? 6 : 3); + virtueBonus = player->isSerene() ? 6 : 3; } + uint8_t asceticBonus = 0; const uint8_t stage = player->wheel()->getStage(WheelStage_t::ASCETIC); if (stage >= 3) { - baseHarmonyBonusPercent += 3; + asceticBonus = 3; } else if (stage >= 2) { - baseHarmonyBonusPercent += 2; + asceticBonus = 2; } else if (stage >= 1) { - baseHarmonyBonusPercent += 1; + asceticBonus = 1; } - const int32_t totalBonusPercent = static_cast(baseHarmonyBonusPercent * (1 << (harmonyPoints - 1))); + const int32_t totalBonusPercent = static_cast(baseByHarmony[harmonyPoints] + virtueBonus + asceticBonus); const float multiplier = 1.0f + (totalBonusPercent / 100.0f); damage.primary.value = static_cast(damage.primary.value * multiplier); diff --git a/src/io/io_wheel.cpp b/src/io/io_wheel.cpp index dfc9dc929..76b7090c5 100644 --- a/src/io/io_wheel.cpp +++ b/src/io/io_wheel.cpp @@ -287,7 +287,7 @@ void IOWheel::initializePaladinSpells() { m_wheelBonusData.spells.paladin[1].name = "Strong Ethereal Spear"; m_wheelBonusData.spells.paladin[1].grade[1].decrease.cooldown = 2; - m_wheelBonusData.spells.paladin[1].grade[2].increase.damage = 380; + m_wheelBonusData.spells.paladin[1].grade[2].increase.damage = 240; m_wheelBonusData.spells.paladin[2].name = "Divine Dazzle"; m_wheelBonusData.spells.paladin[2].grade[1].increase.aditionalTarget = 1;