Skip to content

Commit

Permalink
Delay palindrome if out of pulls (#1523)
Browse files Browse the repository at this point in the history
* delay palindrome if out of pulls in a normal run

* allow for brute forcing if out of other things to do

* Refactored Wet Stunt Nut Stew code
Added additional conditions to getting wet stew
Don't instakill Bobs if we don't have their photo yet

* Need an = sign to actually access that

---------

Co-authored-by: dsimich <[email protected]>
Co-authored-by: Malibu Stacey <[email protected]>
  • Loading branch information
3 people authored Jan 9, 2025
1 parent 9ebb776 commit 3d72ba5
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 41 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
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,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
133 changes: 92 additions & 41 deletions RELEASE/scripts/autoscend/quests/level_11.ash
Original file line number Diff line number Diff line change
Expand Up @@ -2925,13 +2925,57 @@ 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]);
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 @@ -2941,39 +2985,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;
}
// +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 @@ -3042,16 +3061,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 @@ -3086,6 +3095,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 3d72ba5

Please sign in to comment.