diff --git a/RELEASE/scripts/autoscend.ash b/RELEASE/scripts/autoscend.ash index 9f762fc7b..f1e5526d7 100644 --- a/RELEASE/scripts/autoscend.ash +++ b/RELEASE/scripts/autoscend.ash @@ -175,6 +175,7 @@ void initializeSettings() { remove_property("auto_beatenUpLocations"); set_property("auto_getBeehive", false); set_property("auto_bruteForcePalindome", false); + set_property("auto_doWhiteys", false); set_property("auto_cabinetsencountered", 0); set_property("auto_chasmBusted", true); set_property("auto_chewed", ""); diff --git a/RELEASE/scripts/autoscend/auto_restore.ash b/RELEASE/scripts/autoscend/auto_restore.ash index 295c11b2b..a304d6709 100644 --- a/RELEASE/scripts/autoscend/auto_restore.ash +++ b/RELEASE/scripts/autoscend/auto_restore.ash @@ -1708,6 +1708,20 @@ boolean __restore(string resource_type, int goal, int meat_reserve, boolean useF if(!success) { + // did we have exactly one option and fail to cast rest upside down because we have a back item with +HP/MP? + if (count(options) == 1 && options[0].metadata.name == "rest upside down") { + item current_back = equipped_item($slot[back]); + // do we have less than max minus what the back item provides + if (current_resource() < max_resource() - numeric_modifier(current_back, "Maximum " + resource_type)) + { + auto_log_info("Manually equipping the bat wings"); + equip($item[bat wings]); + recover_discount_pants(); + success = use_skill(1, $skill[rest upside down]); + equip(current_back); + return success; + } + } auto_log_warning("Target "+resource_type+" => " + goal + " - Uh oh. All restore options tried ("+count(options)+") failed. Sorry.", "red"); recover_discount_pants(); return false; diff --git a/RELEASE/scripts/autoscend/combat/auto_combat_default_stage2.ash b/RELEASE/scripts/autoscend/combat/auto_combat_default_stage2.ash index 9f9a918b7..09e6c4878 100644 --- a/RELEASE/scripts/autoscend/combat/auto_combat_default_stage2.ash +++ b/RELEASE/scripts/autoscend/combat/auto_combat_default_stage2.ash @@ -353,6 +353,11 @@ string auto_combatDefaultStage2(int round, monster enemy, string text) couldInstaKill = false; } } + else if($monsters[Racecar Bob, Bob Racecar] contains enemy && item_amount($item[photograph of a dog]) == 0 && internalQuestStatus("questL11Palindome") < 2) + { + //don't want to instakill if we haven't used the disposable camera yet + couldInstaKill = false; + } else if(wantToForceDrop(enemy)) { //want drops from this enemy diff --git a/RELEASE/scripts/autoscend/quests/level_11.ash b/RELEASE/scripts/autoscend/quests/level_11.ash index ff2230620..87604e6db 100644 --- a/RELEASE/scripts/autoscend/quests/level_11.ash +++ b/RELEASE/scripts/autoscend/quests/level_11.ash @@ -2943,13 +2943,63 @@ boolean L11_palindome() # In hardcore, guild-class, the right side of the or doesn't happen properly due us farming the # Mega Gem within the if, with pulls, it works fine. Need to fix this. This is bad. # - if((item_amount($item[Bird Rib]) > 0) && (item_amount($item[Lion Oil]) > 0) && (item_amount($item[Wet Stew]) == 0)) + boolean doWhiteys() { - autoCraft("cook", 1, $item[Bird Rib], $item[Lion Oil]); + //Can't do Whitey's Grove if beasts are banished + if(isBanishedPhyla($phylum[beast]) && get_property("screechCombats").to_int() > 0) + { + set_property("screechDelay", true); + return false; //If new phylum banishers come out, this should be updated. + } + if(item_amount($item[white page]) > 0) + { + set_property("choiceAdventure940", 1); + if(item_amount($item[Bird Rib]) > 0) + { + set_property("choiceAdventure940", 2); + } + + if(get_property("lastGuildStoreOpen").to_int() < my_ascensions()) + { + auto_log_warning("This is probably no longer needed as of r16907. Please remove me", "blue"); + auto_log_warning("Going to pretend we have unlocked the Guild because Mafia will assume we need to do that before going to Whitey's Grove and screw up us. We'll fix it afterwards.", "red"); + } + backupSetting("lastGuildStoreOpen", my_ascensions()); + string[int] pages; + pages[0] = "inv_use.php?pwd&which=3&whichitem=7555"; + pages[1] = "choice.php?pwd&whichchoice=940&option=" + get_property("choiceAdventure940"); + if(autoAdvBypass(0, pages, $location[Whitey\'s Grove], "")) {} + restoreSetting("lastGuildStoreOpen"); + return true; + } + // +item is nice to get that food + bat_formBats(); + auto_lostStomach(true); + auto_log_info("Off to the grove for some doofy food!", "blue"); + return autoAdv(1, $location[Whitey\'s Grove]); + } + + boolean makeWetStuntNutStew() + { + if((item_amount($item[Bird Rib]) > 0) && (item_amount($item[Lion Oil]) > 0) && (item_amount($item[Wet Stew]) == 0)) + { + autoCraft("cook", 1, $item[Bird Rib], $item[Lion Oil]); + } + + if((item_amount($item[Stunt Nuts]) > 0) && (item_amount($item[Wet Stew]) > 0) && (item_amount($item[Wet Stunt Nut Stew]) == 0)) + { + autoCraft("cook", 1, $item[wet stew], $item[stunt nuts]); + } + if(item_amount($item[wet stunt nut stew]) > 0) + { + return true; + } + return false; } - if((item_amount($item[Stunt Nuts]) > 0) && (item_amount($item[Wet Stew]) > 0) && (item_amount($item[Wet Stunt Nut Stew]) == 0)) + + if(item_amount($item[wet stunt nut stew]) == 0 && internalQuestStatus("questL11Palindome") >= 3) { - autoCraft("cook", 1, $item[wet stew], $item[stunt nuts]); + return makeWetStuntNutStew(); } if((item_amount($item[Wet Stunt Nut Stew]) > 0) && !possessEquipment($item[Mega Gem])) @@ -2959,44 +3009,14 @@ boolean L11_palindome() visit_url("place.php?whichplace=palindome&action=pal_mrlabel"); } - if((total == 0) && !possessEquipment($item[Mega Gem]) && lovemeDone && in_hardcore() && (item_amount($item[Wet Stunt Nut Stew]) == 0) && ((internalQuestStatus("questL11Palindome") >= 3) || isGuildClass()) && !get_property("auto_bruteForcePalindome").to_boolean()) + if((total == 0) && !possessEquipment($item[Mega Gem]) && lovemeDone && (in_hardcore() || get_property("auto_doWhiteys").to_boolean()) && (item_amount($item[Wet Stunt Nut Stew]) == 0) && ((internalQuestStatus("questL11Palindome") >= 3) || isGuildClass()) && !get_property("auto_bruteForcePalindome").to_boolean()) { if(item_amount($item[Wet Stunt Nut Stew]) == 0) { equipBaseline(); if((item_amount($item[Bird Rib]) == 0) || (item_amount($item[Lion Oil]) == 0)) { - if(item_amount($item[white page]) > 0) - { - set_property("choiceAdventure940", 1); - if(item_amount($item[Bird Rib]) > 0) - { - set_property("choiceAdventure940", 2); - } - - if(get_property("lastGuildStoreOpen").to_int() < my_ascensions()) - { - auto_log_warning("This is probably no longer needed as of r16907. Please remove me", "blue"); - auto_log_warning("Going to pretend we have unlocked the Guild because Mafia will assume we need to do that before going to Whitey's Grove and screw up us. We'll fix it afterwards.", "red"); - } - backupSetting("lastGuildStoreOpen", my_ascensions()); - string[int] pages; - pages[0] = "inv_use.php?pwd&which=3&whichitem=7555"; - pages[1] = "choice.php?pwd&whichchoice=940&option=" + get_property("choiceAdventure940"); - if(autoAdvBypass(0, pages, $location[Whitey\'s Grove], "")) {} - restoreSetting("lastGuildStoreOpen"); - return true; - } - if(isBanishedPhyla($phylum[beast]) && get_property("screechCombats").to_int() > 0) - { - set_property("screechDelay", true); - return false; //If new phylum banishers come out, this should be updated. - } - // +item is nice to get that food - bat_formBats(); - auto_lostStomach(true); - auto_log_info("Off to the grove for some doofy food!", "blue"); - autoAdv(1, $location[Whitey\'s Grove]); + doWhiteys(); } else if(item_amount($item[Stunt Nuts]) == 0) { @@ -3065,16 +3085,6 @@ boolean L11_palindome() } } - if((item_amount($item[Bird Rib]) > 0) && (item_amount($item[Lion Oil]) > 0) && (item_amount($item[Wet Stew]) == 0)) - { - autoCraft("cook", 1, $item[Bird Rib], $item[Lion Oil]); - } - - if((item_amount($item[Stunt Nuts]) > 0) && (item_amount($item[Wet Stew]) > 0) && (item_amount($item[Wet Stunt Nut Stew]) == 0)) - { - autoCraft("cook", 1, $item[wet stew], $item[stunt nuts]); - } - if(!possessEquipment($item[Mega Gem])) { if (equipped_amount($item[Talisman o\' Namsilat]) == 0) @@ -3109,6 +3119,48 @@ boolean L11_palindome() } else { + if(!in_hardcore() && pulls_remaining() == 0) + { + // used our pulls today before getting to palindrome. Delay until next day or run out of other stuff to do + if(!isAboutToPowerlevel()) + { + auto_log_debug("Delaying palindrome. In a normal run and don't have enough pulls to create wet stunt nut stew."); + return false; + } + else + { + //After we get the photos + //First try wishing, then try Whitey's if we have enough +item, then brute force. + //If we hit this, we should only need to finish the L11 quest so it won't hurt to do everything in provideItem + //since we will need +item for tomb rats in ~15 turns anyway. Buffs from wishes should still be active + //since they are 30 turns from monkey paw wishes and 20 turns from pocket/genie wishes. + if (internalQuestStatus("questL11Palindome") > 2) + { + if(auto_monkeyPawWishesLeft() > 0) + { + foreach it in $items[Lion Oil, Bird Rib] + { + if(item_amount(it) > 0) continue; + auto_makeMonkeyPawWish(it); + } + if(item_amount($item[Lion Oil]) > 0 && item_amount($item[Bird Rib]) > 0) + { + return makeWetStuntNutStew(); + } + return false; //wasn't able to make the stew + } + else if(provideItem(300, $location[Whitey's Grove], true, true) >= 300) + { + set_property("auto_doWhiteys", true); + return doWhiteys(); //Initial call to do Whitey's Grove + } + else + { + set_property("auto_bruteForcePalindome",true); + } + } + } + } if((my_mp() > 60) || considerGrimstoneGolem(true)) { handleBjornify($familiar[Grimstone Golem]);