From 8d11a092bd164bed97a8a5625d8dd587abd665c2 Mon Sep 17 00:00:00 2001 From: Anton Simakov <67688115+GuardianDll@users.noreply.github.com> Date: Sun, 7 Apr 2024 17:46:52 +0200 Subject: [PATCH] limit amount of cut damage glass applies on you --- src/melee.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/melee.cpp b/src/melee.cpp index 333f31e78ef2b..54cb454c2038f 100644 --- a/src/melee.cpp +++ b/src/melee.cpp @@ -2413,7 +2413,7 @@ std::string Character::melee_special_effects( Creature &t, damage_instance &d, i weap.spill_contents( pos() ); // Take damage damage_instance di = damage_instance(); - di.add_damage( damage_cut, rng( 0, vol * 2 ) ); + di.add_damage( damage_cut, std::clamp( rng( 0, vol * 2 ), 0, 7 ) ); deal_damage( nullptr, bodypart_id( "arm_r" ), di ); if( weap.is_two_handed( *this ) ) { // Hurt left arm too, if it was big //redeclare shatter_dam because deal_damage mutates it