From 60a8a0995c121cb71519456cd92e378c919fbeed Mon Sep 17 00:00:00 2001 From: mdr55 <98430078+mdr55@users.noreply.github.com> Date: Fri, 31 Jan 2025 15:13:01 +1100 Subject: [PATCH 1/4] Update combat-trainer.lic --- combat-trainer.lic | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/combat-trainer.lic b/combat-trainer.lic index c27f688585..b4bc1052ee 100644 --- a/combat-trainer.lic +++ b/combat-trainer.lic @@ -1875,6 +1875,11 @@ class SpellProcess echo 'Preparing a sorcery spell, held items will be stowed to prevent item loss' if $debug_mode_ct game_state.casting_sorcery = true end + + # clear magic_gain_check variables for CST as we're not doing that currently. + @magic_last_spell = nil + @magic_last_exp = -1 + prepare_spell(data, game_state) Flags.reset('ct-spelllost') end From 01d5c7c0e89d4bd16b0fbe4c8d08a9643e33ec51 Mon Sep 17 00:00:00 2001 From: mdr55 <98430078+mdr55@users.noreply.github.com> Date: Fri, 31 Jan 2025 15:19:35 +1100 Subject: [PATCH 2/4] Update combat-trainer.lic --- combat-trainer.lic | 1 - 1 file changed, 1 deletion(-) diff --git a/combat-trainer.lic b/combat-trainer.lic index b4bc1052ee..01b40e6d09 100644 --- a/combat-trainer.lic +++ b/combat-trainer.lic @@ -1312,7 +1312,6 @@ class SpellProcess @magic_last_spell = nil @magic_last_exp = -1 - @magic_last_exp_sorc = -1 @magic_gain_check = settings.combat_trainer_magic_gain_check echo(" @magic_gain_check: #{@magic_gain_check}") if $debug_mode_ct From b541b126f781975e8219b404cf6e92894e859b14 Mon Sep 17 00:00:00 2001 From: mdr55 <98430078+mdr55@users.noreply.github.com> Date: Fri, 31 Jan 2025 15:45:57 +1100 Subject: [PATCH 3/4] Update combat-trainer.lic --- combat-trainer.lic | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/combat-trainer.lic b/combat-trainer.lic index 01b40e6d09..7669a38ab9 100644 --- a/combat-trainer.lic +++ b/combat-trainer.lic @@ -1875,10 +1875,6 @@ class SpellProcess game_state.casting_sorcery = true end - # clear magic_gain_check variables for CST as we're not doing that currently. - @magic_last_spell = nil - @magic_last_exp = -1 - prepare_spell(data, game_state) Flags.reset('ct-spelllost') end @@ -2113,6 +2109,10 @@ class SpellProcess DRC.message("WARNING: Suppressing #{@magic_last_spell['skill']} due to cast_only_to_train spells within that skill not gaining mindstates.") @offensive_spells.reject! { |spell| spell['skill'] == @magic_last_spell['skill'] } end + + # clear magic_gain_check variables and wait for them to be set by the next applicable casting def (OST only at this point) + @magic_last_spell = nil + @magic_last_exp = -1 end def check_offensive(game_state) From 9ca499095feef7f17abbc84b54e2224f4a47b2c1 Mon Sep 17 00:00:00 2001 From: mdr55 <98430078+mdr55@users.noreply.github.com> Date: Fri, 31 Jan 2025 16:06:02 +1100 Subject: [PATCH 4/4] Update combat-trainer.lic --- combat-trainer.lic | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/combat-trainer.lic b/combat-trainer.lic index 7669a38ab9..3357026c3c 100644 --- a/combat-trainer.lic +++ b/combat-trainer.lic @@ -2097,7 +2097,7 @@ class SpellProcess echo "Blacklisting non-training spells:" if $debug_mode_ct # if there has been no gain from last cast, and its been flagged with cast_only_to_train its a little black cross against the skill - if (DRSkill.getxp(@magic_last_spell['skill']) <= @magic_last_exp) && @magic_last_spell['cast_only_to_train'] && (DRSkill.getxp(@magic_last_spell['skill']) < 34) + if (DRSkill.getxp(@magic_last_spell['skill']) <= @magic_last_exp) && (@magic_last_spell['cast_only_to_train'] || @cast_only_to_train) && (DRSkill.getxp(@magic_last_spell['skill']) < 34) @magic_no_gain_list[@magic_last_spell['skill']] += 1 else @magic_no_gain_list[@magic_last_spell['skill']] = 0