Skip to content

Commit

Permalink
Uncap PreAdv MP Restore Spending (#1376)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
CyberfoxStudios authored Oct 20, 2023
1 parent 3b095f9 commit c6213f2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion RELEASE/scripts/autoscend/auto_pre_adv.ash
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand Down
2 changes: 1 addition & 1 deletion RELEASE/scripts/autoscend/auto_restore.ash
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion RELEASE/scripts/autoscend/quests/level_09.ash
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion RELEASE/scripts/autoscend/quests/level_11.ash
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c6213f2

Please sign in to comment.