From c6213f2d11d906127256e2f63f6a0a208f6ac9fe Mon Sep 17 00:00:00 2001 From: CyberfoxStudios <64926558+CyberfoxStudios@users.noreply.github.com> Date: Fri, 20 Oct 2023 10:03:49 -0700 Subject: [PATCH] Uncap PreAdv MP Restore Spending (#1376) This commit changes the meat_reserve param for many locations of pre-adventure mp restore logic to 0, allowing autoscend to spend all available meat to ensure there is mp before adventuring. - Removes hardcoded 1k meat for acquireMP in auto_pre_adv - Removes meat_reserve check when restoring MP for to use skills to r0estore HP in auto_restore - Updates early acquireMP in level_09 to check for orc overkill to match pre_adv - Removes meat_reserve check when restoring MP to kill specters in level_11 --- RELEASE/scripts/autoscend/auto_pre_adv.ash | 2 +- RELEASE/scripts/autoscend/auto_restore.ash | 2 +- RELEASE/scripts/autoscend/quests/level_09.ash | 2 +- RELEASE/scripts/autoscend/quests/level_11.ash | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/RELEASE/scripts/autoscend/auto_pre_adv.ash b/RELEASE/scripts/autoscend/auto_pre_adv.ash index 812afa3d7..4bd123e0e 100644 --- a/RELEASE/scripts/autoscend/auto_pre_adv.ash +++ b/RELEASE/scripts/autoscend/auto_pre_adv.ash @@ -918,7 +918,7 @@ boolean auto_pre_adventure() borisWastedMP(); borisTrusty(); - acquireMP(32, 1000); + acquireMP(32, 0); if(in_hardcore() && (my_class() == $class[Sauceror]) && (my_mp() < 32)) { diff --git a/RELEASE/scripts/autoscend/auto_restore.ash b/RELEASE/scripts/autoscend/auto_restore.ash index 382de7ebb..33b3dd1c5 100644 --- a/RELEASE/scripts/autoscend/auto_restore.ash +++ b/RELEASE/scripts/autoscend/auto_restore.ash @@ -1544,7 +1544,7 @@ boolean __restore(string resource_type, int goal, int meat_reserve, boolean useF if(metadata.type == "skill") { skill s = to_skill(metadata.name); - if(my_mp() < mp_cost(s) && !acquireMP(mp_cost(s), meat_reserve, useFreeRests)) + if(my_mp() < mp_cost(s) && !acquireMP(mp_cost(s), 0, useFreeRests)) { auto_log_warning("Couldnt acquire enough MP to cast " + s, "red"); return false; diff --git a/RELEASE/scripts/autoscend/quests/level_09.ash b/RELEASE/scripts/autoscend/quests/level_09.ash index 0aea96333..c6fb7eafb 100644 --- a/RELEASE/scripts/autoscend/quests/level_09.ash +++ b/RELEASE/scripts/autoscend/quests/level_09.ash @@ -162,7 +162,7 @@ void prepareForSmutOrcs() // so let's not waste time and console spam when we're a class or path that can't do any of this. boolean useSpellsInOrcCamp = false; - acquireMP(32, 1000); //pre_adv will always do this later, but waiting for it may fail checks of ability to cast spells here + acquireMP(32, 0); //pre_adv will always do this later, but waiting for it may fail checks of ability to cast spells here if(setFlavour($element[cold]) && canUse($skill[Stuffed Mortar Shell])) { useSpellsInOrcCamp = true; diff --git a/RELEASE/scripts/autoscend/quests/level_11.ash b/RELEASE/scripts/autoscend/quests/level_11.ash index 857400ca1..96193b492 100644 --- a/RELEASE/scripts/autoscend/quests/level_11.ash +++ b/RELEASE/scripts/autoscend/quests/level_11.ash @@ -1673,7 +1673,7 @@ boolean L11_hiddenCity() if(!in_robot() && !in_darkGyffte() && weapon_ghost_dmg < 20 && //we can not rely on melee/ranged weapon to kill the ghost - !acquireMP(30)) //try getting some MP, relying on a spell to kill them instead. TODO verify we have a spell + !acquireMP(30, 0)) //try getting some MP, relying on a spell to kill them instead. TODO verify we have a spell { auto_log_warning("We can not reliably kill Specters in hidden city due to a shortage of MP and elemental weapon dmg. Delaying zone", "red"); return false;