diff --git a/config.lua.dist b/config.lua.dist index 7d0360d9360..3a0ef0724f7 100644 --- a/config.lua.dist +++ b/config.lua.dist @@ -494,6 +494,7 @@ rateKillingInTheNameOfPoints = 1 -- Today regeneration condition over an loop every 1 second, -- So values which should regenerated less then 1 second or won't will work +-- ratePlayerAttack: multiplies the player's base damage rateHealthRegen = 1.0 rateHealthRegenSpeed = 1.0 rateManaRegen = 1.0 @@ -505,6 +506,7 @@ rateSpellCooldown = 1.0 rateAttackSpeed = 1.0 rateOfflineTrainingSpeed = rateAttackSpeed rateExerciseTrainingSpeed = rateAttackSpeed +ratePlayerAttack = 1 -- Monster rates rateMonsterHealth = 1.0 diff --git a/src/config/config_enums.hpp b/src/config/config_enums.hpp index 559045fdb9b..d3c2583bb90 100644 --- a/src/config/config_enums.hpp +++ b/src/config/config_enums.hpp @@ -221,6 +221,7 @@ enum ConfigKey_t : uint16_t { RATE_MONSTER_HEALTH, RATE_NPC_HEALTH, RATE_OFFLINE_TRAINING_SPEED, + RATE_PLAYER_ATTACK, RATE_SKILL, RATE_SOUL_REGEN_SPEED, RATE_SOUL_REGEN, diff --git a/src/config/configmanager.cpp b/src/config/configmanager.cpp index 1c00df76c2f..4aa55e5426b 100644 --- a/src/config/configmanager.cpp +++ b/src/config/configmanager.cpp @@ -188,6 +188,7 @@ bool ConfigManager::load() { loadFloatConfig(L, RATE_MONSTER_HEALTH, "rateMonsterHealth", 1.0); loadFloatConfig(L, RATE_NPC_HEALTH, "rateNpcHealth", 1.0); loadFloatConfig(L, RATE_OFFLINE_TRAINING_SPEED, "rateOfflineTrainingSpeed", 1.0); + loadFloatConfig(L, RATE_PLAYER_ATTACK, "ratePlayerAttack", 1.0); loadFloatConfig(L, RATE_SOUL_REGEN_SPEED, "rateSoulRegenSpeed", 1.0); loadFloatConfig(L, RATE_SOUL_REGEN, "rateSoulRegen", 1.0); loadFloatConfig(L, RATE_SPELL_COOLDOWN, "rateSpellCooldown", 1.0); diff --git a/src/creatures/combat/combat.cpp b/src/creatures/combat/combat.cpp index 6b7667a71a5..b81e7d99533 100644 --- a/src/creatures/combat/combat.cpp +++ b/src/creatures/combat/combat.cpp @@ -2279,6 +2279,11 @@ void Combat::applyExtensions(const std::shared_ptr &caster, const std: damage.primary.value *= monster->getAttackMultiplier(); damage.secondary.value *= monster->getAttackMultiplier(); } + + const double globalMultiplier = g_configManager().getFloat(RATE_PLAYER_ATTACK); + + damage.primary.value = static_cast(damage.primary.value * globalMultiplier); + damage.secondary.value = static_cast(damage.secondary.value * globalMultiplier); } MagicField::MagicField(uint16_t type) :