Skip to content

Commit

Permalink
Merge branch 'main' into EagleScepter
Browse files Browse the repository at this point in the history
  • Loading branch information
dsimich committed Jan 9, 2025
2 parents b28bbc9 + 54510b8 commit bfaa02c
Show file tree
Hide file tree
Showing 4 changed files with 118 additions and 46 deletions.
1 change: 1 addition & 0 deletions RELEASE/scripts/autoscend.ash
Original file line number Diff line number Diff line change
Expand Up @@ -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", "");
Expand Down
14 changes: 14 additions & 0 deletions RELEASE/scripts/autoscend/auto_restore.ash
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
144 changes: 98 additions & 46 deletions RELEASE/scripts/autoscend/quests/level_11.ash
Original file line number Diff line number Diff line change
Expand Up @@ -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]))
Expand All @@ -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)
{
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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]);
Expand Down

0 comments on commit bfaa02c

Please sign in to comment.