From 9087046ad1271b20f5ae88e32ef7f2b56f105ef4 Mon Sep 17 00:00:00 2001 From: ikonomov <5624187+ikonomov@users.noreply.github.com> Date: Thu, 14 Mar 2024 13:37:00 -0500 Subject: [PATCH] spectral damage and melee elemental damage the maximum damage is max-1 --- Source/player.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/player.cpp b/Source/player.cpp index 66261e5861b..a82f943c10c 100644 --- a/Source/player.cpp +++ b/Source/player.cpp @@ -600,7 +600,7 @@ bool PlrHitMonst(Player &player, Monster &monster, bool adjacentDamage = false) } if (gbIsHellfire && HasAllOf(player._pIFlags, ItemSpecialEffect::FireDamage | ItemSpecialEffect::LightningDamage)) { - int midam = player._pIFMinDam + GenerateRnd(player._pIFMaxDam - player._pIFMinDam); + int midam = player._pIFMinDam + GenerateRnd(player._pIFMaxDam - player._pIFMinDam + 1); AddMissile(player.position.tile, player.position.temp, player._pdir, MissileID::SpectralArrow, TARGET_MONSTERS, player, midam, 0); } int mind = player._pIMinDam; @@ -920,7 +920,7 @@ bool DoRangeAttack(Player &player) mistype = MissileID::LightningArrow; } if (HasAllOf(player._pIFlags, ItemSpecialEffect::FireArrows | ItemSpecialEffect::LightningArrows)) { - dmg = player._pIFMinDam + GenerateRnd(player._pIFMaxDam - player._pIFMinDam); + dmg = player._pIFMinDam + GenerateRnd(player._pIFMaxDam - player._pIFMinDam + 1); mistype = MissileID::SpectralArrow; }