Skip to content

Commit

Permalink
autoscend turbo
Browse files Browse the repository at this point in the history
  • Loading branch information
dsimich committed Nov 4, 2024
1 parent 9d387dc commit 71dbe17
Show file tree
Hide file tree
Showing 9 changed files with 179 additions and 23 deletions.
26 changes: 21 additions & 5 deletions RELEASE/scripts/autoscend.ash
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ void initializeSettings() {
remove_property("auto_saveSausage");
remove_property("auto_saveVintage");
set_property("auto_dontUseCookBookBat", false);
set_property("auto_turbo", false);
set_property("auto_dietpills", 0);
beehiveConsider();

Expand Down Expand Up @@ -1956,6 +1957,7 @@ boolean doTasks()
if(auto_autumnatonQuest()) return true;
if(auto_smallCampgroundGear()) return true;
auto_lostStomach(false);
autoCleanse(); //running turbo only
if(auto_doPhoneQuest()) return true;

if(auto_doTempleSummit()) return true;
Expand Down Expand Up @@ -2132,11 +2134,25 @@ void main(string... input)
backupSetting("printStackOnAbort", true);

// parse input
if(count(input) > 0 && input[0] == "sim")
{
// display useful items/skills/perms/etc and if the user has them
printSim();
return;
switch(input[0])
{
case "sim":
// display useful items/skills/perms/etc and if the user has them
printSim();
return;
case "turbo":
// gotta go faaaaaast. Doing a double confirm because of the nature of this parameter.
user_confirm("This will get expensive for you. This should only be used if you are trying to go for a 1-day and don't care about expenses. Do you really want to do this? Will default to 'No' in 15 seconds.", 15000, false);
{
user_confirm("This will use UMSBs and Spice Melanges if you have them. If you are ok with this, you have 15 seconds to hit 'Yes'", 15000, false);
{
set_property("auto_turbo", true);
auto_log_info("Ka-chow! Gotta go fast.");
break;
}
}
default:
auto_log_info("Running normal autoscend because you didn't enter in a valid parameter");
}

print_help_text();
Expand Down
26 changes: 26 additions & 0 deletions RELEASE/scripts/autoscend/auto_acquire.ash
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,32 @@ int handlePulls(int day)
auto_log_info("I assume you've handled your pulls yourself... who knows.");
return 0;
}
if(auto_turbo())
{
//Pull expensive organ cleansers first if you are running turbo and you own them
foreach it in $items[Spice Melange, Ultra Mega Sour Ball, Alien plant pod, Alien animal milk]
{
if(storage_amount(it) > 0 && auto_is_valid(it) && !pulledToday(it))
{
user_confirm("Pulling a " + it + ". If you are ok with this, you have 15 seconds to hit 'Yes'", 15000, false);
{
pullXWhenHaveY(it, 1, 0);
}
}
}
pullXWhenHaveY($item[Dieting Pill], 1, 0);
//Make sure we have the legendary pizzas if we want to/can consume them so we take full advantage of the dieting pills
if(!get_property("auto_dontConsumeLegendPizzas").to_boolean())
{
foreach it in $items[Pizza of Legend, Calzone of Legend, Deep Dish of Legend]
{
if(auto_is_valid(it) && !pulledToday(it))
{
pullXWhenHaveY(it, 1, 0);
}
}
}
}

// pulls for small path
auto_SmallPulls();
Expand Down
48 changes: 48 additions & 0 deletions RELEASE/scripts/autoscend/auto_consume.ash
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,54 @@ boolean canOde(item toDrink)
return true;
}

boolean autoCleanse()
{
if(!(auto_turbo()))
{
return false;
}

boolean wantToCleanseStomach = false;
boolean wantToCleanseLiver = false;

if(my_fullness() > 3 && fullness_left() < 4)
{
wantToCleanseStomach = true;
}
if(my_inebriety() > 3 && inebriety_left() < 4)
{
wantToCleanseLiver = true;
}

boolean wantToCleanse = wantToCleanseLiver && wantToCleanseStomach; //want to cleanse both

if(wantToCleanse && item_amount($item[Spice Melange]) > 0 && !(get_property("spiceMelangeUsed").to_boolean()))
{
handleTracker("Cleansed with " + $item[Spice Melange], "auto_otherstuff");
return use(1, $item[Spice Melange]);
}

if(wantToCleanse && item_amount($item[Ultra Mega Sour Ball]) > 0 && !(get_property("_ultraMegaSourBallUsed").to_boolean()))
{
handleTracker("Cleansed with " + $item[Ultra Mega Sour Ball], "auto_otherstuff");
return use(1, $item[Ultra Mega Sour Ball]);
}

if(wantToCleanseLiver && item_amount($item[Alien plant pod]) > 0 && !(get_property("_alienPlantPodUsed").to_boolean()))
{
handleTracker("Cleansed with " + $item[Alien plant pod], "auto_otherstuff");
return use(1, $item[Alien plant pod]);
}

if(wantToCleanseStomach && item_amount($item[Alien animal milk]) > 0 && !(get_property("_alienAnimalMilkUsed").to_boolean()))
{
handleTracker("Cleansed with " + $item[Alien animal milk], "auto_otherstuff");
return use(1, $item[Alien animal milk]);
}

return false;
}

boolean autoDrink(int howMany, item toDrink)
{
return autoDrink(howMany, toDrink, false);
Expand Down
5 changes: 5 additions & 0 deletions RELEASE/scripts/autoscend/auto_util.ash
Original file line number Diff line number Diff line change
Expand Up @@ -3166,6 +3166,11 @@ void auto_log_debug(string s)
auto_log(s, "black", 3);
}
boolean auto_turbo()
{
return get_property("auto_turbo").to_boolean();
}
boolean auto_can_equip(item it)
{
return auto_can_equip(it, it.to_slot());
Expand Down
2 changes: 2 additions & 0 deletions RELEASE/scripts/autoscend/autoscend_header.ash
Original file line number Diff line number Diff line change
Expand Up @@ -1361,6 +1361,7 @@ int inebriety_left();
boolean saucemavenApplies(item it);
float expectedAdventuresFrom(item it);
boolean canOde(item toDrink);
boolean autoCleanse();
boolean autoDrink(int howMany, item toDrink);
boolean autoDrink(int howMany, item toDrink, boolean silent);
boolean autoOverdrink(int howMany, item toOverdrink);
Expand Down Expand Up @@ -1845,6 +1846,7 @@ void auto_log_info(string s, string color);
void auto_log_info(string s);
void auto_log_debug(string s, string color);
void auto_log_debug(string s);
boolean auto_turbo();
boolean auto_can_equip(item it);
boolean auto_can_equip(item it, slot s);
boolean auto_check_conditions(string conds);
Expand Down
11 changes: 5 additions & 6 deletions RELEASE/scripts/autoscend/paths/avant_guard.ash
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,18 @@ void ag_initializeSettings()
//set_property("auto_100familiar", "Burly Bodyguard");
set_property("auto_skipUnlockGuild", true);
set_property("auto_nonAdvLoc", false);
if(auto_turbo())
{
set_property("auto_skipNuns", "true");
}
}
}

void ag_pulls()
{
if (in_avantGuard())
{
//SUPER helpful for gremlins
if(auto_is_valid($item[mini kiwi invisible dirigible]))
{
pullXWhenHaveY($item[mini kiwi invisible dirigible], 1, 0);
}
if(auto_is_valid($item[waffle]) && auto_haveAugustScepter()) //Only want waffles if we can summon them
if(auto_is_valid($item[waffle]) && auto_haveAugustScepter() && !(auto_turbo())) //Only want waffles if we can summon them and not going for a 1 day
{
pullXWhenHaveY($item[waffle],1,(my_daycount() - 1) * (3 + (my_daycount() > 1 ? 1 : 0))); //pull waffles everyday
}
Expand Down
76 changes: 68 additions & 8 deletions RELEASE/scripts/autoscend/quests/level_07.ash
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,45 @@ void cyrptChoiceHandler(int choice)
}
else if(choice == 523) // Death Rattlin' (The Defiled Cranny)
{
if(in_darkGyffte() && have_skill($skill[Flock of Bats Form]) && have_skill($skill[Sharp Eyes]))
if((in_darkGyffte() && have_skill($skill[Flock of Bats Form]) && have_skill($skill[Sharp Eyes])) || auto_turbo())
{
int desired_pills = in_hardcore() ? 6 : 4;
desired_pills -= my_fullness()/2;
auto_log_info("We want " + desired_pills + " dieting pills and have " + item_amount($item[dieting pill]), "blue");
if(item_amount($item[dieting pill]) < desired_pills)
int desiredPills = in_hardcore() ? 6 : (auto_turbo() ? 3 : 4);
int dietingPillsUsed;
if(get_property("auto_chewed") == "")
{
if(!bat_wantHowl($location[The Defiled Cranny]))
dietingPillsUsed = 0;
}
else
{
foreach str in split_string(get_property("auto_chewed"), ",")
{
bat_formBats();
if(contains_text(str.to_lower_case(), "dieting pill"))
{
dietingPillsUsed += 1;
}
}
}
run_choice(6); // if meets thresholds, skip to farm more dieting pills in DG
if(!(auto_turbo()))
{
desiredPills -= my_fullness()/2;
}
else
{
desiredPills -= dietingPillsUsed;
}
auto_log_info("We want " + desiredPills + " dieting pills and have " + item_amount($item[dieting pill]), "blue");
if(item_amount($item[dieting pill]) < desiredPills)
{
run_choice(6); // if meets thresholds, skip to farm more dieting pills in DG
}
else if(available_choice_options() contains 5)
{
run_choice(5); // -11 evil, +50 each substat with Candy Cane Sword Cane
}
else
{
run_choice(4); // fight swarm of ghuol whelps
}
}
else if(available_choice_options() contains 5)
{
Expand Down Expand Up @@ -299,6 +325,40 @@ boolean L7_defiledCranny()
useNightmareFuelIfPossible();
}

if((in_darkGyffte() && have_skill($skill[Flock of Bats Form]) && have_skill($skill[Sharp Eyes])) || auto_turbo())
{
int desiredPills = in_hardcore() ? 6 : (auto_turbo() ? 3 : 4);
int dietingPillsUsed;
if(get_property("auto_chewed") == "")
{
dietingPillsUsed = 0;
}
else
{
foreach str in split_string(get_property("auto_chewed"), ",")
{
if(contains_text(str.to_lower_case(), "dieting pill"))
{
dietingPillsUsed += 1;
}
}
}
if(!(auto_turbo()))
{
desiredPills -= my_fullness()/2;
}
else
{
desiredPills -= dietingPillsUsed;
}
auto_log_info("We want " + desiredPills + " dieting pills and have " + item_amount($item[dieting pill]), "blue");
if(item_amount($item[dieting pill]) < desiredPills)
{
//dieting pills have 10% drop rate
provideItem(900, $location[The Defiled Cranny], false);
}
}

auto_MaxMLToCap(auto_convertDesiredML(149), true);

addToMaximize("200ml " + auto_convertDesiredML(149) + "max");
Expand Down
4 changes: 2 additions & 2 deletions RELEASE/scripts/autoscend/quests/level_12.ash
Original file line number Diff line number Diff line change
Expand Up @@ -1723,9 +1723,9 @@ boolean L12_themtharHills()
auto_log_info("Themthar Nuns!", "blue");
}
//can only do this in Avant Guard in 6 turns in HC or 8 turns in Normal. Need the August Scepter
//can only do this in Avant Guard in 6 turns in HC or 8 turns in Normal. Need the August Scepter. If going turbo, can't get enough waffles so don't even bother with this
set_property("auto_delayWar", false);
if(in_avantGuard() && auto_haveAugustScepter())
if(in_avantGuard() && auto_haveAugustScepter() && !(auto_turbo()))
{
auto_log_info("Checking how much meat drop we can get");
if((in_hardcore() && item_amount($item[waffle]) <= 6 && $location[The Themthar Hills].turns_spent + item_amount($item[waffle]) > 6) ||
Expand Down
4 changes: 2 additions & 2 deletions RELEASE/scripts/autoscend/quests/level_any.ash
Original file line number Diff line number Diff line change
Expand Up @@ -541,9 +541,9 @@ boolean LX_fatLootToken()
//wait until daily dungeon is done before considering doing fantasy realm
if(fantasyRealmToken()) return true;
}
if(internalQuestStatus("questL13Final") == 5)
if(internalQuestStatus("questL13Final") == 5 || auto_turbo())
{
// at NS tower door and still need hero keys
// at NS tower door and still need hero keys or going for turbo
// summon and copy fantasy realm bandit. Allows for getting fantasy realm token without having FR available
if(!acquiredFantasyRealmToken() && ((auto_haveBackupCamera() && auto_backupUsesLeft() >= (4 - fantasyBanditsFought())) || auto_canHabitat()) && canSummonMonster($monster[fantasy bandit]))
Expand Down

0 comments on commit 71dbe17

Please sign in to comment.