From e752f7e1a818892cb047e601c9ccdcbd99527320 Mon Sep 17 00:00:00 2001 From: mdr55 <98430078+mdr55@users.noreply.github.com> Date: Sun, 26 Jan 2025 11:10:55 +1100 Subject: [PATCH] Update combat-trainer.lic --- combat-trainer.lic | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/combat-trainer.lic b/combat-trainer.lic index 043fd42145..03e754f463 100644 --- a/combat-trainer.lic +++ b/combat-trainer.lic @@ -4878,25 +4878,25 @@ class GameState # The code will allow CT to focus on a single weapon once we know all weapons are draining; # the focus means there is no weapon switching costs being incurred. - if (@focus_threshold > 10) - if !@focus_threshold_active && weapon_training.reject { |skill, _| DRSkill.getxp(skill) > @focus_threshold }.empty? - # all weapons above threshold - DRC.message("Focussing on single weapon") - @target_action_count = 1000 - @target_increment = 34 - @focus_threshold_active = true - return true - elsif @focus_threshold_active && weapon_training.any? { |skill, _| DRSkill.getxp(skill) < (@focus_threshold / 2) } - # any weapon below threshold/2 - DRC.message("Spreading attention to all weapons") - @target_action_count = settings.combat_trainer_action_count - @target_increment = settings.combat_trainer_target_increment - @focus_threshold_active = false - return true - else - return false + if (@focus_threshold > 10) + if !@focus_threshold_active && weapon_training.reject { |skill, _| DRSkill.getxp(skill) > @focus_threshold }.empty? + # all weapons above threshold + DRC.message("Focussing on single weapon") + @target_action_count = 1000 + @target_increment = 34 + @focus_threshold_active = true + return true + elsif @focus_threshold_active && weapon_training.any? { |skill, _| DRSkill.getxp(skill) < (@focus_threshold / 2) } + # any weapon below threshold/2 + DRC.message("Spreading attention to all weapons") + @target_action_count = settings.combat_trainer_action_count + @target_increment = settings.combat_trainer_target_increment + @focus_threshold_active = false + return true + else + return false + end end - end @action_count >= @target_action_count || current_exp >= @target_weapon_skill end