From 5f04bc88bd62c8d162b3f4bd0f39ca0f5cc603c6 Mon Sep 17 00:00:00 2001 From: Sakan Nirattisaykul <94357278+sakan811@users.noreply.github.com> Date: Sun, 19 Jan 2025 02:08:10 +0700 Subject: [PATCH] Refactor TheHerta skill mechanics to introduce variable hit counts - Updated the skill to hit a random number of times (1 or 2) instead of a fixed 2 hits. - Enhanced comments to clarify the skill's behavior regarding hit counts, improving code readability. --- hsr_simulation/erudition/the_herta.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hsr_simulation/erudition/the_herta.py b/hsr_simulation/erudition/the_herta.py index c94bd3b..77f8f13 100644 --- a/hsr_simulation/erudition/the_herta.py +++ b/hsr_simulation/erudition/the_herta.py @@ -248,8 +248,9 @@ def _use_normal_skill(self) -> None: primary_target = self._get_priority_target() hit_enemies = set() - # Skill hits 2 times - for _ in range(2): + num_hits = random.randint(1, 2) + # Skill may hits 2 times at most + for _ in range(num_hits): # Primary target hit total_dmg += self._calculate_damage( skill_multiplier=self.SKILL_MULTIPLIER,