Skip to content

Commit

Permalink
Merge branch 'main' into ag-improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
midgleyc authored Oct 31, 2024
2 parents 48f2d36 + 678f6a1 commit b3e9f09
Show file tree
Hide file tree
Showing 5 changed files with 122 additions and 114 deletions.
215 changes: 107 additions & 108 deletions RELEASE/scripts/autoscend/auto_acquire.ash
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ boolean canPull(item it, boolean historical)
return false; //we do not have it in storage and we can not trade for it. gifts currently not handled
}

if (!auto_is_valid(it))
if(!auto_is_valid(it))
{
return false;
}
Expand All @@ -99,11 +99,11 @@ boolean canPull(item it, boolean historical)
{
return false; //a 0 or a -1 indicates the item is not available.
}
if (curPrice > get_property("autoBuyPriceLimit").to_int())
if(curPrice > get_property("autoBuyPriceLimit").to_int())
{
return false;
}
else if (curPrice < meat)
else if(curPrice < meat)
{
return true;
}
Expand Down Expand Up @@ -186,7 +186,7 @@ boolean pullXWhenHaveYCasual(item it, int howMany, int whenHave)
{
return false;
}
if (!auto_is_valid(it))
if(!auto_is_valid(it))
{
return false;
}
Expand Down Expand Up @@ -247,7 +247,7 @@ boolean pullXWhenHaveY(item it, int howMany, int whenHave)
meat = my_meat() - 5000;
getFromStorage = false;
}
if (curPrice >= priceLimit)
if(curPrice >= priceLimit)
{
auto_log_warning(it + " is too expensive at " + curPrice + " meat, we're gonna skip buying one in the mall.", "red");
break;
Expand Down Expand Up @@ -443,11 +443,11 @@ boolean acquireTotem()

foreach totem in $items[primitive alien totem, flail of the seven aspects, chelonian morningstar, mace of the tortoise, ouija board\, ouija board, turtle totem]
{
if (possessEquipment(totem))
if(possessEquipment(totem))
{
return true;
}
if (0 < closet_amount(totem))
if(0 < closet_amount(totem))
{
take_closet(1, totem);
return true;
Expand Down Expand Up @@ -510,7 +510,7 @@ boolean acquireHermitItem(item it)
{
return false;
}
if (it == $item[11-leaf clover] && get_property("_cloversPurchased") >= 3) {
if(it == $item[11-leaf clover] && get_property("_cloversPurchased") >= 3) {
return false;
}
if(!isGeneralStoreAvailable())
Expand Down Expand Up @@ -628,97 +628,106 @@ int handlePulls(int day)
// pulls for Avant Guard path
ag_pulls();

if((storage_amount($item[etched hourglass]) > 0) && auto_is_valid($item[etched hourglass]))
// generic pulls for any path are below
if(auto_is_valid($item[etched hourglass]))
{
pullXWhenHaveY($item[etched hourglass], 1, 0);
}

if((storage_amount($item[mafia thumb ring]) > 0) && auto_is_valid($item[mafia thumb ring]))
{
pullXWhenHaveY($item[mafia thumb ring], 1, 0);
}

if((storage_amount($item[can of rain-doh]) > 0) && auto_is_valid($item[Can Of Rain-Doh]) && (pullXWhenHaveY($item[can of Rain-doh], 1, 0)))
{
if(item_amount($item[Can of Rain-doh]) > 0)
{
use(1, $item[can of Rain-doh]);
put_closet(1, $item[empty rain-doh can]);
}
}
if(storage_amount($item[Buddy Bjorn]) > 0 && auto_is_valid($item[Buddy Bjorn]) && pathHasFamiliar())
{
pullXWhenHaveY($item[Buddy Bjorn], 1, 0);
}
if((storage_amount($item[Camp Scout Backpack]) > 0) && !possessEquipment($item[Buddy Bjorn]) && auto_is_valid($item[Camp Scout Backpack]))
{
pullXWhenHaveY($item[Camp Scout Backpack], 1, 0);
}

if(in_wotsf())
if(auto_is_valid($item[Infinite BACON Machine]))
{
pullXWhenHaveY($item[Bittycar Meatcar], 1, 0);
pullXWhenHaveY($item[Infinite BACON Machine], 1, 0);
}

if(!possessEquipment($item[Astral Shirt]))
// things we would always pull but cannot pull due to LoL usage restrictions
if(!in_lol())
{
boolean getPeteShirt = true;
if(!hasTorso())
if((storage_amount($item[mafia thumb ring]) > 0) && auto_is_valid($item[mafia thumb ring]))
{
getPeteShirt = false;
pullXWhenHaveY($item[mafia thumb ring], 1, 0);
}
if((my_primestat() == $stat[Muscle]) && get_property("loveTunnelAvailable").to_boolean())
if((storage_amount($item[can of rain-doh]) > 0) && auto_is_valid($item[Can Of Rain-Doh]) && (pullXWhenHaveY($item[can of Rain-doh], 1, 0)))
{
getPeteShirt = false;
if(item_amount($item[Can of Rain-doh]) > 0)
{
use(1, $item[can of Rain-doh]);
put_closet(1, $item[empty rain-doh can]);
}
}
if(in_glover())
if(storage_amount($item[Buddy Bjorn]) > 0 && auto_is_valid($item[Buddy Bjorn]) && pathHasFamiliar())
{
getPeteShirt = false;
pullXWhenHaveY($item[Buddy Bjorn], 1, 0);
}
if (storage_amount($item[Sneaky Pete\'s Leather Jacket]) == 0 && storage_amount($item[Sneaky Pete\'s Leather Jacket (Collar Popped)]) == 0)
if((storage_amount($item[Camp Scout Backpack]) > 0) && !possessEquipment($item[Buddy Bjorn]) && auto_is_valid($item[Camp Scout Backpack]))
{
getPeteShirt = false;
pullXWhenHaveY($item[Camp Scout Backpack], 1, 0);
}
if(getPeteShirt)
if(!possessEquipment($item[Astral Shirt]))
{
pullXWhenHaveY($item[Sneaky Pete\'s Leather Jacket], 1, 0);
if(item_amount($item[Sneaky Pete\'s Leather Jacket]) == 0)
boolean getPeteShirt = true;
if(!hasTorso())
{
pullXWhenHaveY($item[Sneaky Pete\'s Leather Jacket (Collar Popped)], 1, 0);
getPeteShirt = false;
}
else
if((my_primestat() == $stat[Muscle]) && get_property("loveTunnelAvailable").to_boolean())
{
auto_fold($item[Sneaky Pete\'s Leather Jacket (Collar Popped)]);
getPeteShirt = false;
}
if(in_glover())
{
getPeteShirt = false;
}
if(storage_amount($item[Sneaky Pete\'s Leather Jacket]) == 0 && storage_amount($item[Sneaky Pete\'s Leather Jacket (Collar Popped)]) == 0)
{
getPeteShirt = false;
}
if(getPeteShirt)
{
pullXWhenHaveY($item[Sneaky Pete\'s Leather Jacket], 1, 0);
if(item_amount($item[Sneaky Pete\'s Leather Jacket]) == 0)
{
pullXWhenHaveY($item[Sneaky Pete\'s Leather Jacket (Collar Popped)], 1, 0);
}
else
{
auto_fold($item[Sneaky Pete\'s Leather Jacket (Collar Popped)]);
}
}
}
}
if((in_picky() || !canChangeFamiliar()) && (item_amount(wrap_item($item[Deck of Every Card])) == 0) && (fullness_left() >= 4))
{
if((item_amount($item[Boris\'s Key]) == 0) && canEat($item[Boris\'s Key Lime Pie]) && !contains_text(get_property("nsTowerDoorKeysUsed"), $item[Boris\'s Key]))
if((equipped_item($slot[folder1]) == $item[folder (tranquil landscape)]) && (equipped_item($slot[folder2]) == $item[folder (skull and crossbones)]) && (equipped_item($slot[folder3]) == $item[folder (Jackass Plumber)]) && auto_is_valid(wrap_item($item[Over-The-Shoulder Folder Holder])))
{
pullXWhenHaveY($item[Boris\'s Key Lime Pie], 1, 0);
pullXWhenHaveY($item[over-the-shoulder folder holder], 1, 0);
}
if((item_amount($item[Sneaky Pete\'s Key]) == 0) && canEat($item[Sneaky Pete\'s Key Lime Pie]) && !contains_text(get_property("nsTowerDoorKeysUsed"), $item[Sneaky Pete\'s Key]))
if(auto_have_skill($skill[Summon Smithsness]))
{
pullXWhenHaveY($item[Sneaky Pete\'s Key Lime Pie], 1, 0);
pullXWhenHaveY($item[hand in glove], 1, 0);
}
if((item_amount($item[Jarlsberg\'s Key]) == 0) && canEat($item[Jarlsberg\'s Key Lime Pie]) && !contains_text(get_property("nsTowerDoorKeysUsed"), $item[Jarlsberg\'s Key]))
pullLegionKnife();
}
// pulls excluding a handful of paths are below
if(!in_heavyrains() && pathHasFamiliar())
{ // heavy rains familiars largely need miniature life preserver
if(!possessEquipment($item[Snow Suit]) && !possessEquipment($item[Astral Pet Sweater]) && auto_is_valid($item[Snow Suit]))
{
pullXWhenHaveY($item[Jarlsberg\'s Key Lime Pie], 1, 0);
pullXWhenHaveY($item[snow suit], 1, 0);
}
boolean famStatEq = possessEquipment($item[fuzzy polar bear ears]) || possessEquipment($item[miniature goose mask]) || possessEquipment($item[tiny glowing red nose]);
if(!possessEquipment($item[Snow Suit]) && !possessEquipment($item[Filthy Child Leash]) && !possessEquipment($item[Astral Pet Sweater]) &&
!famStatEq && auto_is_valid($item[Filthy Child Leash]))
{
pullXWhenHaveY($item[Filthy Child Leash], 1, 0);
}
}
if((equipped_item($slot[folder1]) == $item[folder (tranquil landscape)]) && (equipped_item($slot[folder2]) == $item[folder (skull and crossbones)]) && (equipped_item($slot[folder3]) == $item[folder (Jackass Plumber)]) && auto_is_valid(wrap_item($item[Over-The-Shoulder Folder Holder])))
{
pullXWhenHaveY($item[over-the-shoulder folder holder], 1, 0);
if(!in_pokefam() && auto_is_valid($item[Replica Bat-oomerang]))
{ // cannot use combat items in pokefam
pullXWhenHaveY($item[Replica Bat-oomerang], 1, 0);
}
if((my_primestat() == $stat[Muscle]) && !in_heavyrains() && !in_wotsf()) // no need for shields in way of the surprising fist
{
if((my_primestat() == $stat[Muscle]) && !in_wotsf() && !in_heavyrains() && !in_lol())
{ // no need for shields in WotSF; cannot pull them in LoL
if(possessEquipment($item[familiar scrapbook]) && auto_is_valid($item[familiar scrapbook]) && my_class() != $class[Turtle Tamer])
{
//familiar scrapbook will probably be equipped in preference to Fake Washboard
// familiar scrapbook will probably be equipped in preference to Fake Washboard
}
else if((closet_amount($item[Fake Washboard]) == 0) && auto_is_valid($item[Fake Washboard]))
{
Expand All @@ -740,15 +749,8 @@ int handlePulls(int day)
{
pullXWhenHaveY($item[Numberwang], 1, 0);
}
if(in_pokefam())
{
pullXWhenHaveY($item[Ring Of Detect Boring Doors], 1, 0);
pullXWhenHaveY($item[Pick-O-Matic Lockpicks], 1, 0);
pullXWhenHaveY($item[Eleven-Foot Pole], 1, 0);
}
if(((my_class() == $class[Sauceror]) || (my_class() == $class[Pastamancer])) && !in_wotsf()) // no need for offhands in way of the surprising fist
{
if(((my_class() == $class[Sauceror]) || (my_class() == $class[Pastamancer])) && !in_wotsf() && !in_lol())
{ // no need for offhands in WotSF; cannot pull items in LoL
if((item_amount(wrap_item($item[Deck of Every Card])) == 0) && !auto_have_skill($skill[Summon Smithsness]))
{
pullXWhenHaveY($item[Thor\'s Pliers], 1, 0);
Expand All @@ -759,49 +761,46 @@ int handlePulls(int day)
}
}
if(in_picky())
{
pullXWhenHaveY($item[gumshoes], 1, 0);
}
if(auto_have_skill($skill[Summon Smithsness]))
// path specific pulls are below
if(in_wotsf())
{
pullXWhenHaveY($item[hand in glove], 1, 0);
pullXWhenHaveY($item[Bittycar Meatcar], 1, 0);
}
if(!in_heavyrains() && pathHasFamiliar())
if((in_picky() || !canChangeFamiliar()) && (item_amount(wrap_item($item[Deck of Every Card])) == 0) && (fullness_left() >= 4))
{
if(!possessEquipment($item[Snow Suit]) && !possessEquipment($item[Astral Pet Sweater]) && auto_is_valid($item[Snow Suit]))
if((item_amount($item[Boris\'s Key]) == 0) && canEat($item[Boris\'s Key Lime Pie]) && !contains_text(get_property("nsTowerDoorKeysUsed"), $item[Boris\'s Key]))
{
pullXWhenHaveY($item[snow suit], 1, 0);
pullXWhenHaveY($item[Boris\'s Key Lime Pie], 1, 0);
}
boolean famStatEq = possessEquipment($item[fuzzy polar bear ears]) || possessEquipment($item[miniature goose mask]) || possessEquipment($item[tiny glowing red nose]);
if(!possessEquipment($item[Snow Suit]) && !possessEquipment($item[Filthy Child Leash]) && !possessEquipment($item[Astral Pet Sweater]) &&
!famStatEq && auto_is_valid($item[Filthy Child Leash]))
if((item_amount($item[Sneaky Pete\'s Key]) == 0) && canEat($item[Sneaky Pete\'s Key Lime Pie]) && !contains_text(get_property("nsTowerDoorKeysUsed"), $item[Sneaky Pete\'s Key]))
{
pullXWhenHaveY($item[Filthy Child Leash], 1, 0);
pullXWhenHaveY($item[Sneaky Pete\'s Key Lime Pie], 1, 0);
}
if((item_amount($item[Jarlsberg\'s Key]) == 0) && canEat($item[Jarlsberg\'s Key Lime Pie]) && !contains_text(get_property("nsTowerDoorKeysUsed"), $item[Jarlsberg\'s Key]))
{
pullXWhenHaveY($item[Jarlsberg\'s Key Lime Pie], 1, 0);
}
}
if(auto_is_valid($item[Infinite BACON Machine]))
if(in_picky())
{
pullXWhenHaveY($item[Infinite BACON Machine], 1, 0);
pullXWhenHaveY($item[gumshoes], 1, 0);
}
if(!in_pokefam() && auto_is_valid($item[Replica Bat-oomerang]))
if(in_pokefam())
{
pullXWhenHaveY($item[Replica Bat-oomerang], 1, 0);
pullXWhenHaveY($item[Ring Of Detect Boring Doors], 1, 0);
pullXWhenHaveY($item[Pick-O-Matic Lockpicks], 1, 0);
pullXWhenHaveY($item[Eleven-Foot Pole], 1, 0);
}
pullLegionKnife();
if(in_darkGyffte())
{
auto_log_info("You are a powerful vampire who is doing a softcore run. Turngen is busted in this path, so let's see how much we can get.", "blue");
if((storage_amount($item[mime army shotglass]) > 0) && is_unrestricted($item[mime army shotglass]))
{
pullXWhenHaveY($item[mime army shotglass], 1, 0);
}
pullXWhenHaveY($item[mime army shotglass], 1, 0);
}
if(in_lol())
{ // some items that can be pulled to help accelerate runs
pullXWhenHaveY($item[portable pantogram], 1, 0);
pullXWhenHaveY($item[SpinMaster&trade; lathe], 1, 0);
pullXWhenHaveY($item[Asdon Martin keyfob (on ring)], 1, 0);
}
}
else if(day == 2)
Expand All @@ -815,9 +814,9 @@ int handlePulls(int day)
}
// do this regardless of day if we still need to complete the bridge.
if (canPull($item[smut orc keepsake box]) && (lumberCount() + 5 <= bridgeGoal()) && (fastenerCount() + 5 <= bridgeGoal()))
if(canPull($item[smut orc keepsake box]) && (lumberCount() + 5 <= bridgeGoal()) && (fastenerCount() + 5 <= bridgeGoal()))
{
if (pullXWhenHaveY($item[smut orc keepsake box], 1, 0))
if(pullXWhenHaveY($item[smut orc keepsake box], 1, 0))
{
use(1, $item[smut orc keepsake box]);
}
Expand Down Expand Up @@ -977,7 +976,7 @@ boolean LX_craftAcquireItems()
if(in_koe())
{
if ((creatable_amount($item[Antique Accordion]) > 0 && !possessEquipment($item[Antique Accordion])) && auto_predictAccordionTurns() < 10)
if((creatable_amount($item[Antique Accordion]) > 0 && !possessEquipment($item[Antique Accordion])) && auto_predictAccordionTurns() < 10)
{
retrieve_item(1, $item[Antique Accordion]);
}
Expand Down
8 changes: 5 additions & 3 deletions RELEASE/scripts/autoscend/auto_providers.ash
Original file line number Diff line number Diff line change
Expand Up @@ -1691,14 +1691,14 @@ float provideItem(int amt, location loc, boolean doEverything, boolean speculati
if(auto_birdModifier("Item Drop") > 0)
{
//Can be 10/20/30/40/50% meat drop
//Can be 10/20/30/40/50% item drop
if(tryEffects($effects[Blessing of the Bird]))
return result();
}
if(auto_favoriteBirdModifier("Item Drop") > 0)
{
//Can be 10/20/30/40/50% meat drop
//Can be 10/20/30/40/50% item drop
if(tryEffects($effects[Blessing of Your Favorite Bird]))
return result();
}
Expand All @@ -1707,6 +1707,7 @@ float provideItem(int amt, location loc, boolean doEverything, boolean speculati
if(tryEffects($effects[
Unusual Perspective, //50% item
Five Sticky Fingers, //50% item
Spitting Rhymes, //50% item
Wet and Greedy, //25% item
Serendipi Tea, //25% item
Glowing Hands, //25% item
Expand Down Expand Up @@ -1820,7 +1821,8 @@ float provideItem(int amt, location loc, boolean doEverything, boolean speculati
shadow waters, //200% meat, 100% item, 100% init, -10% combat
One Very Clear Eye, //100% item
Car-Charged, //100% meat, 100% item, 5-10MP, 50% init, 50% spell dmg, +3 stats per fight
Incredibly Well Lit //100% meat, 50% item
Incredibly Well Lit, //100% meat, 50% item
Crunching Leaves //25% item, +5 combat
]))
if(pass())
return result();
Expand Down
9 changes: 8 additions & 1 deletion RELEASE/scripts/autoscend/iotms/mr2023.ash
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,14 @@ int remainingCatalogCredits()
if(!get_property("_2002MrStoreCreditsCollected").to_boolean())
{
// using item collects credits
use($item[2002 Mr. Store Catalog]);
if(in_lol())
{ //autoscend doesn't always trigger in LoL, switching to specify Replica
use($item[Replica 2002 Mr. Store Catalog]);
}
else
{
use($item[2002 Mr. Store Catalog]);
}
}
return get_property("availableMrStore2002Credits").to_int();
}
Expand Down
Loading

0 comments on commit b3e9f09

Please sign in to comment.