From 4f7f8a78b1ea63d2d3f42f262c034cc570cce99b Mon Sep 17 00:00:00 2001 From: quarklikeadork <78317908+quarklikeadork@users.noreply.github.com> Date: Sun, 13 Mar 2022 02:45:27 +0100 Subject: [PATCH 01/10] increase max MP for ode to booze --- RELEASE/scripts/autoscend/auto_consume.ash | 127 +++++++++++++++++++-- 1 file changed, 116 insertions(+), 11 deletions(-) diff --git a/RELEASE/scripts/autoscend/auto_consume.ash b/RELEASE/scripts/autoscend/auto_consume.ash index 07809b8c1..8cf588968 100644 --- a/RELEASE/scripts/autoscend/auto_consume.ash +++ b/RELEASE/scripts/autoscend/auto_consume.ash @@ -115,21 +115,126 @@ boolean autoDrink(int howMany, item toDrink, boolean silent) equip($slot[Acc3], $item[Mafia Pinky Ring]); } - if(canOde(toDrink) && possessEquipment($item[Wrist-Boy]) && (my_meat() > 6500)) + if(expectedInebriety == 1 && howMany == 1 && item_amount($item[mime army shotglass]) > 0 && !get_property("_mimeArmyShotglassUsed").to_boolean() && !get_property("_auto_mimeArmyShotglassUsed").to_boolean() && my_mp() < 200) { - if((have_effect($effect[Drunk and Avuncular]) < expectedInebriety) && (item_amount($item[Drunk Uncles Holo-Record]) == 0)) + set_property("_auto_mimeArmyShotglassUsed","true"); //in case the shotglass text didn't get tracked by mafia don't keep skipping ode + auto_log_debug("Not considering Ode to Booze effects for mime army shotglass drink"); + } + else if(canOde(toDrink)) + { + if(possessEquipment($item[Wrist-Boy]) && (my_meat() > 6500)) { - buyUpTo(1, $item[Drunk Uncles Holo-Record]); + if((have_effect($effect[Drunk and Avuncular]) < expectedInebriety) && (item_amount($item[Drunk Uncles Holo-Record]) == 0)) + { + buyUpTo(1, $item[Drunk Uncles Holo-Record]); + } + buffMaintain($effect[Drunk and Avuncular], 0, 1, expectedInebriety); } - buffMaintain($effect[Drunk and Avuncular], 0, 1, expectedInebriety); - } - if(canOde(toDrink) && auto_have_skill($skill[The Ode to Booze])) - { - shrugAT($effect[Ode to Booze]); - // get enough turns of ode - while(acquireMP(mp_cost($skill[The Ode to Booze]), 0) && buffMaintain($effect[Ode to Booze], mp_cost($skill[The Ode to Booze]), 1, expectedInebriety)) - /*do nothing, the loop condition is doing the work*/; + if(auto_have_skill($skill[The Ode to Booze])) + { + if(my_maxmp() < mp_cost($skill[The Ode to Booze])) + { + //ode is worth efforts to raise maxmp + //there could be a maxmp provider function but here we want exclusively maxmp to cast ode out of combat, not to add to other maximizer scores + //speculate with equipment and then a few effects available early + boolean pass() + { + int achievableMaxMP = simValue("Buffed MP Maximum"); + int neededMaxMP = mp_cost($skill[The Ode to Booze]) - (simValue("Mana Cost") + simValue("Stackable Mana Cost") - mana_cost_modifier()); + return (achievableMaxMP >= neededMaxMP); + } + simMaximizeWith(my_location(),"200mp, -200Mana Cost, -200Stackable Mana Cost"); //not capping to mp_cost() because restores that go over would be wasted + if(pass()) + { + auto_log_info("Using gear to raise maximum MP for Ode to Booze", "blue"); + equipMaximizedGear(); + } + else + { + //equipment is not enough, try with buffs too + string speculateString; + boolean weaponPicked; + boolean offhandPicked; + + //list the equipment picked by maximizer into speculateString, need this to make mafia speculate max MP from all relevant modifiers with equipment + buffs + foreach i,entry in maximize("200mp, -200Mana Cost, -200Stackable Mana Cost",0,0,true,true) //can't use autoMaximize "Aggregate reference expected" + { + if(i>15) + { + //there should not be more than 9 or 10 equipment slots and equipment entries come first. so equipment list is done + break; + } + item maximizerItem = entry.item; + if(maximizerItem == $item[none]) continue; + slot maximizerItemSlot = maximizerItem.to_slot(); + if(maximizerItemSlot == $slot[none]) continue; + string specifySlot = ""; + if(maximizerItemSlot == $slot[weapon]) + { + if(weaponPicked && offhandPicked) + { + //this must be familiar weapon + specifySlot = "[familiar] "; + } + else if(weaponPicked) + { + //this must be offhand weapon + specifySlot = "[off-hand] "; + offhandPicked = true; + } + else + { + weaponPicked = true; + } + } + if(maximizerItemSlot == $slot[off-hand]) + { + if(offhandPicked) + { + //this must be familiar offhand + specifySlot = "[familiar] "; + } + else + { + offhandPicked = true; + } + } + speculateString += " equip " + specifySlot + maximizerItem.to_string() + ";"; + } + boolean [effect] effectsThatIncreaseMaxMP = $effects[The Magical Mojomuscular Melody,Feeling Excited,Triple-Sized,Glittering Eyelashes,Big]; + foreach eff in effectsThatIncreaseMaxMP + { + if (buffMaintain(eff, 0, 1, 1, true)) //speculative + { + speculateString += " up " + eff + ";"; + } + } + cli_execute("speculate quiet; " + speculateString); + if(pass()) + { + auto_log_info("Using gear and buffs to raise maximum MP for Ode to Booze", "blue"); + equipMaximizedGear(); + foreach eff in effectsThatIncreaseMaxMP + { + if(my_maxmp() < mp_cost($skill[The Ode to Booze])) + { + buffMaintain(eff, 0, 1, 1, false); + } + } + } + } + } + shrugAT($effect[Ode to Booze]); + // get enough turns of ode + while(acquireMP(mp_cost($skill[The Ode to Booze]), 0) && buffMaintain($effect[Ode to Booze], mp_cost($skill[The Ode to Booze]), 1, expectedInebriety)) + { ///*do nothing, the loop condition is doing the work*/; + if(have_effect($effect[Ode to Booze]) >= expectedInebriety) + { + break; //but stop before the loop does an extra acquireMP + } + } + } } boolean retval = false; From dbe330af2cccb8e6dbf18eac4b87526e89fe7f35 Mon Sep 17 00:00:00 2001 From: quarklikeadork <78317908+quarklikeadork@users.noreply.github.com> Date: Mon, 4 Apr 2022 06:34:58 +0200 Subject: [PATCH 02/10] fix equipment speculate --- RELEASE/scripts/autoscend/auto_consume.ash | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/RELEASE/scripts/autoscend/auto_consume.ash b/RELEASE/scripts/autoscend/auto_consume.ash index c2bcad438..75cadc60f 100644 --- a/RELEASE/scripts/autoscend/auto_consume.ash +++ b/RELEASE/scripts/autoscend/auto_consume.ash @@ -175,12 +175,12 @@ boolean autoDrink(int howMany, item toDrink, boolean silent) if(weaponPicked && offhandPicked) { //this must be familiar weapon - specifySlot = "[familiar] "; + specifySlot = "familiar "; } else if(weaponPicked) { //this must be offhand weapon - specifySlot = "[off-hand] "; + specifySlot = "off-hand "; offhandPicked = true; } else @@ -188,18 +188,31 @@ boolean autoDrink(int howMany, item toDrink, boolean silent) weaponPicked = true; } } - if(maximizerItemSlot == $slot[off-hand]) + else if(maximizerItemSlot == $slot[off-hand]) { if(offhandPicked) { //this must be familiar offhand - specifySlot = "[familiar] "; + specifySlot = "familiar "; } else { offhandPicked = true; } } + else if(maximizerItemSlot == $slot[acc1]) + { + //accessory to slot always returns acc1 + specifySlot = "acc1 "; + if(contains_text(speculateString,"acc2")) + { + specifySlot = "acc3 "; + } + else if(contains_text(speculateString,"acc1")) + { + specifySlot = "acc2 "; + } + } speculateString += " equip " + specifySlot + maximizerItem.to_string() + ";"; } boolean [effect] effectsThatIncreaseMaxMP = $effects[The Magical Mojomuscular Melody,Feeling Excited,Triple-Sized,Glittering Eyelashes,Big]; From dcf35c6a01af95850d2e1c0ec76f1bbbd64472ba Mon Sep 17 00:00:00 2001 From: quarklikeadork <78317908+quarklikeadork@users.noreply.github.com> Date: Sat, 9 Apr 2022 22:18:22 +0200 Subject: [PATCH 03/10] use speculatedMaximizerEquipment() from PR #1112 --- RELEASE/scripts/autoscend/auto_consume.ash | 60 ++-------------------- 1 file changed, 3 insertions(+), 57 deletions(-) diff --git a/RELEASE/scripts/autoscend/auto_consume.ash b/RELEASE/scripts/autoscend/auto_consume.ash index 75cadc60f..7dad7fdfe 100644 --- a/RELEASE/scripts/autoscend/auto_consume.ash +++ b/RELEASE/scripts/autoscend/auto_consume.ash @@ -154,66 +154,12 @@ boolean autoDrink(int howMany, item toDrink, boolean silent) { //equipment is not enough, try with buffs too string speculateString; - boolean weaponPicked; - boolean offhandPicked; //list the equipment picked by maximizer into speculateString, need this to make mafia speculate max MP from all relevant modifiers with equipment + buffs - foreach i,entry in maximize("200mp, -200Mana Cost, -200Stackable Mana Cost",0,0,true,true) //can't use autoMaximize "Aggregate reference expected" + item[slot] MPequip = speculatedMaximizerEquipment("200mp, -200Mana Cost, -200Stackable Mana Cost"); + foreach sl in MPequip { - if(i>15) - { - //there should not be more than 9 or 10 equipment slots and equipment entries come first. so equipment list is done - break; - } - item maximizerItem = entry.item; - if(maximizerItem == $item[none]) continue; - slot maximizerItemSlot = maximizerItem.to_slot(); - if(maximizerItemSlot == $slot[none]) continue; - string specifySlot = ""; - if(maximizerItemSlot == $slot[weapon]) - { - if(weaponPicked && offhandPicked) - { - //this must be familiar weapon - specifySlot = "familiar "; - } - else if(weaponPicked) - { - //this must be offhand weapon - specifySlot = "off-hand "; - offhandPicked = true; - } - else - { - weaponPicked = true; - } - } - else if(maximizerItemSlot == $slot[off-hand]) - { - if(offhandPicked) - { - //this must be familiar offhand - specifySlot = "familiar "; - } - else - { - offhandPicked = true; - } - } - else if(maximizerItemSlot == $slot[acc1]) - { - //accessory to slot always returns acc1 - specifySlot = "acc1 "; - if(contains_text(speculateString,"acc2")) - { - specifySlot = "acc3 "; - } - else if(contains_text(speculateString,"acc1")) - { - specifySlot = "acc2 "; - } - } - speculateString += " equip " + specifySlot + maximizerItem.to_string() + ";"; + speculateString += " equip " + sl.to_string() + " " + MPequip[sl].to_string() + ";"; } boolean [effect] effectsThatIncreaseMaxMP = $effects[The Magical Mojomuscular Melody,Feeling Excited,Triple-Sized,Glittering Eyelashes,Big]; foreach eff in effectsThatIncreaseMaxMP From 78aadbe4946581efd58bc406536f188e525215e4 Mon Sep 17 00:00:00 2001 From: quarklikeadork <78317908+quarklikeadork@users.noreply.github.com> Date: Sat, 11 Jun 2022 07:04:22 +0200 Subject: [PATCH 04/10] add a maxMP provider --- RELEASE/scripts/autoscend/auto_providers.ash | 162 +++++++++++++++++++ 1 file changed, 162 insertions(+) diff --git a/RELEASE/scripts/autoscend/auto_providers.ash b/RELEASE/scripts/autoscend/auto_providers.ash index 1020cfc5c..93a32673c 100644 --- a/RELEASE/scripts/autoscend/auto_providers.ash +++ b/RELEASE/scripts/autoscend/auto_providers.ash @@ -1167,3 +1167,165 @@ boolean provideMoxie(int amt, boolean doEquips) return provideMoxie(amt, my_location(), doEquips); } +boolean provideMaxMP(int amt, location loc, boolean notForCombat, boolean doEquips, boolean speculative) +{ + if(notForCombat && my_maxmp() >= amt) + { + return true; + } + + auto_log_info((speculative ? "Checking if we can" : "Trying to") + " provide " + amt + " max MP " + + (notForCombat ? "out of combat" : "for the next adventure") + ", " + (doEquips ? "with" : "without") + " equipment", "blue"); + + + boolean pass() + { + int achievableMaxMP = simValue("Buffed MP Maximum"); + int costModifierCurrent = notForCombat ? mana_cost_modifier() : combat_mana_cost_modifier(); + //combat_mana_cost_modifier() includes mana_cost_modifier(), but simValue("Combat Mana Cost") does not include simValue("Mana Cost") + int costModifierSimulated = simValue("Mana Cost") + simValue("Stackable Mana Cost") + (notForCombat ? 0 : simValue("Combat Mana Cost")); + int costModifierDiff = costModifierSimulated - costModifierCurrent; + int neededMaxMP = amt + costModifierDiff; //requested amt should be a mp_cost(), so included the current cost modifier. only apply changes to cost modifier + auto_log_debug("We can achieve " + achievableMaxMP + " max MP" + (costModifierDiff == 0 ? "" : (" and " + costModifierDiff + " cost modifier")), "blue"); + return (achievableMaxMP >= neededMaxMP); + } + + string speculateString; + string max; + location locCache; + + if(doEquips) + { + //any maximizer parameters added by a quest script before calling this provider will be there but pre adv may add more for the zone later + //so the weight given to MP when trying to enable a skill for next adventure should be high enough to not get beaten by other weights added by pre adv + + //not capping value for NonCombatUse because restores that go over could be wasted?, cost modifiers are negative so for those maximum cap arguments are effectively not usable + //and not valuing mana cost modifiers when maximizing for next combat because values combined together with mp can't be given a common cap + + max = "999mp" + (notForCombat ? ",-999Mana Cost,-999Stackable Mana Cost" : ( " " + amt + "max")); + + if (notForCombat) + { + //when maximizing just to raise MP to cast something, don't use any recorded maximize parameters meant for the next adventure + maximize(max, true); + } + else + { + simMaximizeWith(loc,max); + } + + if(pass()) + { + if(!speculative) + { + if(notForCombat) //equip now for immediate use + { + auto_log_info("Using gear to raise maximum MP above " + amt, "blue"); + equipMaximizedGear(); + } + else //add to maximize + { + addToMaximize(max); + } + } + return true; + } + + //equipment is not enough, try with buffs + //list the equipment picked by maximizer into speculateString, need this to make mafia speculate max MP from all relevant modifiers with equipment + buffs + item[slot] MPequip; + if (notForCombat) + { + //don't use recorded maximize parameters meant for the next adventure + MPequip = speculatedMaximizerEquipment(max); + } + else + { + //set location and parameters like simMaximizeWith() but this is to use speculatedMaximizerEquipment instead of simMaximize + if (my_location() != loc) + { + //set the simulated location before speculating + locCache = my_location(); + set_location(loc); + } + //use recorded maximize parameters meant for the next adventure + MPequip = speculatedMaximizerEquipment(get_property("auto_maximize_current") + (get_property("auto_maximize_current") != "" ? "," : "") + max); + } + + foreach sl in MPequip + { + speculateString += " equip " + sl.to_string() + " " + MPequip[sl].to_string() + ";"; + } + } + else //if(!doEquips) + { //equipment is not being locked and may be changed in pre adv after the provider returns success + //under assumption that the worst case is for all of current gear to be removed, speculate removing it all + //but this speculation would give the wrong results if something that reduces MP or limits mysticality is and stays equipped + foreach sl in $slots[hat,weapon,off-hand,back,shirt,pants,acc1,acc2,acc3,familiar] + { + //simulate removing all gear regardless of individual modifiers, to account for everything including any outfit bonus + if(equipped_item(sl) != $item[none]) speculateString += "unequip " + sl + "; "; + } + //it is not necessary to speculate yet: the provider is going to speculate for effects and will include the unequips + } + + + //effects + boolean [effect] effectsThatIncreaseMaxMP = $effects[The Magical Mojomuscular Melody,Feeling Excited,Glittering Eyelashes,Big,Triple-Sized]; + foreach eff in effectsThatIncreaseMaxMP + { + if (buffMaintain(eff, 0, 1, 1, true)) //speculative + { + speculateString += " up " + eff + ";"; + } + } + if (my_location() != loc) + { + //set the simulated location before speculating + locCache = my_location(); + set_location(loc); + } + cli_execute("speculate quiet; " + speculateString); + if(pass()) + { + if(!speculative) + { + if(doEquips) + { + if(notForCombat) //equip now for immediate use + { + auto_log_info("Using gear and buffs to raise maximum MP above " + amt, "blue"); + equipMaximizedGear(); + } + else //add to maximize + { + addToMaximize(max); + } + } + else + { + auto_log_info("Buffing maximum MP above " + amt, "blue"); + } + foreach eff in effectsThatIncreaseMaxMP + { + if(my_maxmp() < (amt + (notForCombat ? mana_cost_modifier() : combat_mana_cost_modifier()))) + { + buffMaintain(eff, 0, 1, 1, false); + } + } + } + return true; + } + + if (locCache != $location[none]) + { + set_location(locCache); + } + return false; +} + +boolean provideMaxMP(int amt) +{ + //immediate equip attempt for casting a non combat spell + return provideMaxMP(amt, my_location(), true, true, false); +} From 343d4fcb9a356dd3eff5b7df851b2602610e3412 Mon Sep 17 00:00:00 2001 From: quarklikeadork <78317908+quarklikeadork@users.noreply.github.com> Date: Sat, 11 Jun 2022 07:05:16 +0200 Subject: [PATCH 05/10] Update autoscend_header.ash --- RELEASE/scripts/autoscend/autoscend_header.ash | 2 ++ 1 file changed, 2 insertions(+) diff --git a/RELEASE/scripts/autoscend/autoscend_header.ash b/RELEASE/scripts/autoscend/autoscend_header.ash index 5af8de782..793a68054 100644 --- a/RELEASE/scripts/autoscend/autoscend_header.ash +++ b/RELEASE/scripts/autoscend/autoscend_header.ash @@ -1439,6 +1439,8 @@ float provideMoxie(int amt, location loc, boolean doEquips, boolean speculative) float provideMoxie(int amt, boolean doEquips, boolean speculative); boolean provideMoxie(int amt, location loc, boolean doEquips); boolean provideMoxie(int amt, boolean doEquips); +boolean provideMaxMP(int amt, location loc, boolean notForCombat, boolean doEquips, boolean speculative); +boolean provideMaxMP(int amt); ######################################################################################################## //Defined in autoscend/auto_restore.ash From db3cd2679c7475f61ce4cda8c337f1358ff300d8 Mon Sep 17 00:00:00 2001 From: quarklikeadork <78317908+quarklikeadork@users.noreply.github.com> Date: Sat, 11 Jun 2022 07:07:14 +0200 Subject: [PATCH 06/10] use provider for ode MP --- RELEASE/scripts/autoscend/auto_consume.ash | 51 +--------------------- 1 file changed, 2 insertions(+), 49 deletions(-) diff --git a/RELEASE/scripts/autoscend/auto_consume.ash b/RELEASE/scripts/autoscend/auto_consume.ash index 6edc156fd..3f8f94c49 100644 --- a/RELEASE/scripts/autoscend/auto_consume.ash +++ b/RELEASE/scripts/autoscend/auto_consume.ash @@ -125,58 +125,11 @@ boolean autoDrink(int howMany, item toDrink, boolean silent) buffMaintain($effect[Drunk and Avuncular], 0, 1, expectedInebriety); } - if(auto_have_skill($skill[The Ode to Booze])) + if(auto_have_skill($skill[The Ode to Booze]) && have_effect($effect[Ode to Booze]) < expectedInebriety) { if(my_maxmp() < mp_cost($skill[The Ode to Booze])) { - //ode is worth efforts to raise maxmp - //there could be a maxmp provider function but here we want exclusively maxmp to cast ode out of combat, not to add to other maximizer scores - //speculate with equipment and then a few effects available early - boolean pass() - { - int achievableMaxMP = simValue("Buffed MP Maximum"); - int neededMaxMP = mp_cost($skill[The Ode to Booze]) - (simValue("Mana Cost") + simValue("Stackable Mana Cost") - mana_cost_modifier()); - return (achievableMaxMP >= neededMaxMP); - } - simMaximizeWith(my_location(),"200mp, -200Mana Cost, -200Stackable Mana Cost"); //not capping to mp_cost() because restores that go over would be wasted - if(pass()) - { - auto_log_info("Using gear to raise maximum MP for Ode to Booze", "blue"); - equipMaximizedGear(); - } - else - { - //equipment is not enough, try with buffs too - string speculateString; - - //list the equipment picked by maximizer into speculateString, need this to make mafia speculate max MP from all relevant modifiers with equipment + buffs - item[slot] MPequip = speculatedMaximizerEquipment("200mp, -200Mana Cost, -200Stackable Mana Cost"); - foreach sl in MPequip - { - speculateString += " equip " + sl.to_string() + " " + MPequip[sl].to_string() + ";"; - } - boolean [effect] effectsThatIncreaseMaxMP = $effects[The Magical Mojomuscular Melody,Feeling Excited,Triple-Sized,Glittering Eyelashes,Big]; - foreach eff in effectsThatIncreaseMaxMP - { - if (buffMaintain(eff, 0, 1, 1, true)) //speculative - { - speculateString += " up " + eff + ";"; - } - } - cli_execute("speculate quiet; " + speculateString); - if(pass()) - { - auto_log_info("Using gear and buffs to raise maximum MP for Ode to Booze", "blue"); - equipMaximizedGear(); - foreach eff in effectsThatIncreaseMaxMP - { - if(my_maxmp() < mp_cost($skill[The Ode to Booze])) - { - buffMaintain(eff, 0, 1, 1, false); - } - } - } - } + provideMaxMP(mp_cost($skill[The Ode to Booze])); } shrugAT($effect[Ode to Booze]); // get enough turns of ode From e5947b50bb31e1388877633611ea64bfd1113827 Mon Sep 17 00:00:00 2001 From: quarklikeadork <78317908+quarklikeadork@users.noreply.github.com> Date: Sat, 11 Jun 2022 07:16:28 +0200 Subject: [PATCH 07/10] max MP that L13 will be trying to acquire --- RELEASE/scripts/autoscend/quests/level_13.ash | 3 +++ 1 file changed, 3 insertions(+) diff --git a/RELEASE/scripts/autoscend/quests/level_13.ash b/RELEASE/scripts/autoscend/quests/level_13.ash index 8aebfea67..8e084adb1 100644 --- a/RELEASE/scripts/autoscend/quests/level_13.ash +++ b/RELEASE/scripts/autoscend/quests/level_13.ash @@ -1455,6 +1455,9 @@ boolean L13_towerNSTower() } //if we reached this spot we decided that we do not need a boning knife and intend to try to towerkill the wall of bones. + //raise to the max MP that will be trying to acquire + provideMaxMP(216, $location[Noob Cave], false, true, false); + uneffect($effect[Scarysauce]); uneffect($effect[Jalapeño Saucesphere]); uneffect($effect[Spiky Shell]); From d14ae7e9dbbc2ccff420a849b96360c98737d5a8 Mon Sep 17 00:00:00 2001 From: quarklikeadork <78317908+quarklikeadork@users.noreply.github.com> Date: Sun, 21 Aug 2022 18:35:56 +0200 Subject: [PATCH 08/10] maximizer comments --- RELEASE/scripts/autoscend/auto_providers.ash | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/RELEASE/scripts/autoscend/auto_providers.ash b/RELEASE/scripts/autoscend/auto_providers.ash index 93a32673c..764f1e39d 100644 --- a/RELEASE/scripts/autoscend/auto_providers.ash +++ b/RELEASE/scripts/autoscend/auto_providers.ash @@ -1198,8 +1198,10 @@ boolean provideMaxMP(int amt, location loc, boolean notForCombat, boolean doEqui { //any maximizer parameters added by a quest script before calling this provider will be there but pre adv may add more for the zone later //so the weight given to MP when trying to enable a skill for next adventure should be high enough to not get beaten by other weights added by pre adv + //note "max" argument doesn't make optimal combinations with other maximizer modifiers because most slots are scored without considering if other slots already satisfy the max + //with high mp weight a single maximize operation can equip several pieces of mp equipment over "max" needed mp. but being able to use desired combat spell is probably more important - //not capping value for NonCombatUse because restores that go over could be wasted?, cost modifiers are negative so for those maximum cap arguments are effectively not usable + //not capping value for notForCombat because restores that go over could be wasted?, cost modifiers are negative so for those maximum cap arguments are effectively not usable //and not valuing mana cost modifiers when maximizing for next combat because values combined together with mp can't be given a common cap max = "999mp" + (notForCombat ? ",-999Mana Cost,-999Stackable Mana Cost" : ( " " + amt + "max")); From 5329345b8f4000146541ff4d1d9e768a5b50eeff Mon Sep 17 00:00:00 2001 From: quarklikeadork <78317908+quarklikeadork@users.noreply.github.com> Date: Sun, 21 Aug 2022 18:39:55 +0200 Subject: [PATCH 09/10] maximizer comments --- RELEASE/scripts/autoscend/auto_providers.ash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE/scripts/autoscend/auto_providers.ash b/RELEASE/scripts/autoscend/auto_providers.ash index 764f1e39d..fe7975062 100644 --- a/RELEASE/scripts/autoscend/auto_providers.ash +++ b/RELEASE/scripts/autoscend/auto_providers.ash @@ -1198,7 +1198,7 @@ boolean provideMaxMP(int amt, location loc, boolean notForCombat, boolean doEqui { //any maximizer parameters added by a quest script before calling this provider will be there but pre adv may add more for the zone later //so the weight given to MP when trying to enable a skill for next adventure should be high enough to not get beaten by other weights added by pre adv - //note "max" argument doesn't make optimal combinations with other maximizer modifiers because most slots are scored without considering if other slots already satisfy the max + //note "max" argument doesn't make optimal combinations with other maximizer modifiers because most slots are scored without considering choices maximizer will make in other slots //with high mp weight a single maximize operation can equip several pieces of mp equipment over "max" needed mp. but being able to use desired combat spell is probably more important //not capping value for notForCombat because restores that go over could be wasted?, cost modifiers are negative so for those maximum cap arguments are effectively not usable From 07f4473483d2a76ac8abc700b07c3d623bd05eca Mon Sep 17 00:00:00 2001 From: quarklikeadork <78317908+quarklikeadork@users.noreply.github.com> Date: Sat, 15 Jul 2023 13:59:02 +0200 Subject: [PATCH 10/10] Update level_13.ash --- RELEASE/scripts/autoscend/quests/level_13.ash | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/RELEASE/scripts/autoscend/quests/level_13.ash b/RELEASE/scripts/autoscend/quests/level_13.ash index ed2c3ff54..0967792c2 100644 --- a/RELEASE/scripts/autoscend/quests/level_13.ash +++ b/RELEASE/scripts/autoscend/quests/level_13.ash @@ -1486,9 +1486,11 @@ boolean L13_towerNSTower() } //if we reached this spot we decided that we do not need a boning knife and intend to try to towerkill the wall of bones. + //raise to the max MP that will be trying to acquire - provideMaxMP(216, $location[Noob Cave], false, true, false); - + //maximizer parameters are not able to avoid overvaluing MP for all gear, so just try provider without gear + provideMaxMP(216, $location[Noob Cave], false, false, false); + uneffect($effect[Scarysauce]); uneffect($effect[Jalapeño Saucesphere]); uneffect($effect[Spiky Shell]);