From 80cfcc10e1bccdfc22ac94fb5de21e6853a9f345 Mon Sep 17 00:00:00 2001 From: Joe Kirchoff Date: Fri, 11 Oct 2024 11:51:04 -0700 Subject: [PATCH 01/16] Get free bat zone items with bat wings (#1510) * Update level_04.ash * fix parens * update since * autoForceEquip * add tracking * cannae * Update level_04.ash * Update level_04.ash --- RELEASE/scripts/autoscend.ash | 2 +- RELEASE/scripts/autoscend/quests/level_04.ash | 51 +++++++++++++++++-- 2 files changed, 47 insertions(+), 6 deletions(-) diff --git a/RELEASE/scripts/autoscend.ash b/RELEASE/scripts/autoscend.ash index 6d58a66f8..91da36d36 100644 --- a/RELEASE/scripts/autoscend.ash +++ b/RELEASE/scripts/autoscend.ash @@ -1,4 +1,4 @@ -since r28019; // feat: add avant guard path +since r28077; // feat: various iotm improvements /*** autoscend_header.ash must be first import All non-accessory scripts must be imported here diff --git a/RELEASE/scripts/autoscend/quests/level_04.ash b/RELEASE/scripts/autoscend/quests/level_04.ash index 7cb1d0021..b5cf0d5e0 100644 --- a/RELEASE/scripts/autoscend/quests/level_04.ash +++ b/RELEASE/scripts/autoscend/quests/level_04.ash @@ -1,3 +1,16 @@ +boolean provideGuanoStenchResistance() +{ + int [element] resGoal; + resGoal[$element[stench]] = 1; + // try to get the stench res without equipment, but use equipment if we must + if(!provideResistances(resGoal, $location[Guano Junction], false) && !provideResistances(resGoal, $location[Guano Junction], true)) + { + auto_log_warning("I cannae handle the stench of the Guano Junction!", "green"); + return false; + } + return true; +} + boolean L4_batCave() { if(internalQuestStatus("questL04Bat") < 0 || internalQuestStatus("questL04Bat") > 4) @@ -7,6 +20,38 @@ boolean L4_batCave() auto_log_info("In the bat hole!", "blue"); + if (possessEquipment($item[bat wings]) && auto_can_equip($item[bat wings])) + { + if (!get_property("batWingsBatHoleEntrance").to_boolean() && zone_available($location[The Bat Hole Entrance])) + { + autoForceEquip($item[bat wings]); + auto_log_info("Wearing bat wings to get a free bat wing", "green"); + handleTracker($item[bat wings], $item[bat wing], "auto_otherstuff"); + return autoAdv($location[The Bat Hole Entrance]); + } + else if (!get_property("batWingsGuanoJunction").to_boolean() && zone_available($location[Guano Junction]) && provideGuanoStenchResistance()) + { + autoForceEquip($item[bat wings]); + auto_log_info("Wearing bat wings to get a free sonar-in-a-biscuit", "green"); + handleTracker($item[bat wings], $item[sonar-in-a-biscuit], "auto_otherstuff"); + return autoAdv($location[Guano Junction]); + } + else if (!get_property("batWingsBatratBurrow").to_boolean() && zone_available($location[The Batrat and Ratbat Burrow])) + { + autoForceEquip($item[bat wings]); + auto_log_info("Wearing bat wings to get another free sonar-in-a-biscuit", "green"); + handleTracker($item[bat wings], $item[sonar-in-a-biscuit], "auto_otherstuff"); + return autoAdv($location[The Batrat and Ratbat Burrow]); + } + else if (!get_property("batWingsBeanbatChamber").to_boolean() && zone_available($location[The Beanbat Chamber])) + { + autoForceEquip($item[bat wings]); + auto_log_info("Wearing bat wings to get a free enchanted bean", "green"); + handleTracker($item[bat wings], $item[enchanted bean], "auto_otherstuff"); + return autoAdv($location[The Beanbat Chamber]); + } + } + if(considerGrimstoneGolem(true)) { handleBjornify($familiar[Grimstone Golem]); @@ -124,12 +169,8 @@ boolean L4_batCave() return true; } - int [element] resGoal; - resGoal[$element[stench]] = 1; - // try to get the stench res without equipment, but use equipment if we must - if(!provideResistances(resGoal, $location[Guano Junction], false) && !provideResistances(resGoal, $location[Guano Junction], true)) + if (!provideGuanoStenchResistance()) { - auto_log_warning("I can nae handle the stench of the Guano Junction!", "green"); return false; } From c3592c898519dbae83829dceda77eeb8879f4ecd Mon Sep 17 00:00:00 2001 From: Chris Midgley Date: Thu, 17 Oct 2024 17:05:10 +0100 Subject: [PATCH 02/16] feat: wereprof improvements (#1509) * feat: hunt is now tracked by Mafia * feat: buy hunt if possible * feat: don't use spikes / research in hospital * fix: don't get the monolith if no campground --------- Co-authored-by: Joe Kirchoff --- RELEASE/scripts/autoscend/auto_equipment.ash | 3 +- RELEASE/scripts/autoscend/auto_util.ash | 2 +- .../autoscend/combat/auto_combat_util.ash | 53 ++++++------------- RELEASE/scripts/autoscend/iotms/mr2023.ash | 2 +- .../scripts/autoscend/paths/wereprofessor.ash | 4 +- 5 files changed, 21 insertions(+), 43 deletions(-) diff --git a/RELEASE/scripts/autoscend/auto_equipment.ash b/RELEASE/scripts/autoscend/auto_equipment.ash index b1a483639..dba8097e1 100644 --- a/RELEASE/scripts/autoscend/auto_equipment.ash +++ b/RELEASE/scripts/autoscend/auto_equipment.ash @@ -752,9 +752,10 @@ void finalizeMaximize(boolean speculative) if(monseen == totalmob) nooculus = true; } //exclude certain locations as professor that require specific outfits (the War, the Goblin King) + //as we go through the hidden hospital we equip surgeon gear on the pants slot, so we can end up dying if we cast advanced research if(($locations[The Battlefield (Frat Uniform), The Battlefield (Hippy Uniform), Frat House, Hippy Camp, Frat House (Frat Disguise), Hippy Camp (Hippy Disguise), Next to that barrel with something burning in it, Out by that rusted-out car, over where the old tires are, near an abandoned refrigerator, Sonofa Beach, The Themthar Hills, McMillicancuddy's Barn, McMillicancuddy's Pond, McMillicancuddy's Back 40, - McMillicancuddy's Other Back 40, Cobb\'s Knob Barracks, Cobb\'s Knob Harem, Throne Room] contains my_location())) nooculus = true; + McMillicancuddy's Other Back 40, Cobb\'s Knob Barracks, Cobb\'s Knob Harem, Throne Room, The Hidden Hospital] contains my_location())) nooculus = true; if(!nooculus) { if(possessEquipment($item[biphasic molecular oculus])) diff --git a/RELEASE/scripts/autoscend/auto_util.ash b/RELEASE/scripts/autoscend/auto_util.ash index 22f361365..5329a5b6f 100644 --- a/RELEASE/scripts/autoscend/auto_util.ash +++ b/RELEASE/scripts/autoscend/auto_util.ash @@ -4128,7 +4128,7 @@ boolean _auto_forceNextNoncombat(location loc, boolean speculative) set_property("auto_forceNonCombatSource", "Apriling tuba"); return true; } - else if(auto_hasParka() && get_property("_spikolodonSpikeUses") < 5 && hasTorso()) + else if(auto_hasParka() && get_property("_spikolodonSpikeUses") < 5 && hasTorso() && (!in_wereprof() || !is_professor())) // if we're a professor, we can't use the spikes { if(speculative) return true; // parka spikes require a combat to active diff --git a/RELEASE/scripts/autoscend/combat/auto_combat_util.ash b/RELEASE/scripts/autoscend/combat/auto_combat_util.ash index 28bb68882..c557fc122 100644 --- a/RELEASE/scripts/autoscend/combat/auto_combat_util.ash +++ b/RELEASE/scripts/autoscend/combat/auto_combat_util.ash @@ -199,47 +199,25 @@ string useItems(item it1, item it2) boolean isSniffed(monster enemy, skill sk) { - //checks if the monster enemy is currently sniffed using the specific skill sk - boolean retval = false; - switch(sk) - { - case $skill[Transcendent Olfaction]: - retval = contains_text(get_property("olfactedMonster"), enemy); - break; - case $skill[Make Friends]: - retval = contains_text(get_property("makeFriendsMonster"), enemy); - break; - case $skill[Long Con]: - retval = contains_text(get_property("longConMonster"), enemy); - break; - case $skill[Perceive Soul]: - retval = contains_text(get_property("auto_bat_soulmonster"), enemy); - break; - case $skill[Gallapagosian Mating Call]: - retval = contains_text(get_property("_gallapagosMonster"), enemy); - break; - case $skill[Monkey Point]: - retval = contains_text(get_property("monkeyPointMonster"), enemy); - break; - case $skill[Get a Good Whiff of This Guy]: - retval = contains_text(get_property("nosyNoseMonster"), enemy) && my_familiar() == $familiar[Nosy Nose]; - break; - case $skill[Offer Latte to Opponent]: - retval = contains_text(get_property("_latteMonster"), enemy); - break; - case $skill[Motif]: - retval = contains_text(get_property("motifMonster"), enemy); - break; - default: - abort("isSniffed was asked to check an unidentified skill: " +sk); + string search; + if (sk == $skill[Get a Good Whiff of This Guy]) { + search = "Nosy Nose"; + } else { + search = sk.to_string(); + } + string[0] tracked = tracked_by(enemy); + foreach n in tracked { + if (tracked[n] == search) { + return true; + } } - return retval; + return false; } boolean isSniffed(monster enemy) { //checks if the monster enemy is currently sniffed using any of the sniff skills - foreach sk in $skills[Transcendent Olfaction, Make Friends, Long Con, Perceive Soul, Gallapagosian Mating Call, Monkey Point, Offer Latte to Opponent, Motif] + foreach sk in $skills[Transcendent Olfaction, Make Friends, Long Con, Perceive Soul, Gallapagosian Mating Call, Monkey Point, Offer Latte to Opponent, Motif, Hunt] { if(isSniffed(enemy, sk)) return true; } @@ -259,11 +237,10 @@ skill getSniffer(monster enemy, boolean inCombat) { return $skill[Make Friends]; //avatar of sneaky pete specific skill } - //commented out because Mafia doesn't track Hunt yet - /*if(canUse($skill[Hunt], true, inCombat) && have_effect($effect[Everything Looks Red]) == 0 && !isSniffed(enemy, $skill[Hunt])) + if(canUse($skill[Hunt], true, inCombat) && have_effect($effect[Everything Looks Red]) == 0 && !isSniffed(enemy, $skill[Hunt])) { return $skill[Hunt]; //WereProfessor Werewolf specific skill - }*/ + } if(canUse($skill[Long Con], true , inCombat) && get_property("_longConUsed").to_int() < 5 && !isSniffed(enemy, $skill[Long Con])) { return $skill[Long Con]; diff --git a/RELEASE/scripts/autoscend/iotms/mr2023.ash b/RELEASE/scripts/autoscend/iotms/mr2023.ash index cfdd239df..0203cc7e1 100644 --- a/RELEASE/scripts/autoscend/iotms/mr2023.ash +++ b/RELEASE/scripts/autoscend/iotms/mr2023.ash @@ -458,7 +458,7 @@ void auto_buyFrom2002MrStore() use(itemConsidering); } // giant black monlith. Mostly useful at low level for stats - if (my_level() < 13 || get_property("auto_disregardInstantKarma").to_boolean()) { + if (have_campground() && (my_level() < 13 || get_property("auto_disregardInstantKarma").to_boolean())) { itemConsidering = $item[giant black monolith]; if(remainingCatalogCredits() > 0 && !(auto_get_campground() contains itemConsidering) && auto_is_valid(itemConsidering)) { diff --git a/RELEASE/scripts/autoscend/paths/wereprofessor.ash b/RELEASE/scripts/autoscend/paths/wereprofessor.ash index 258df3c24..8ca2d2db9 100644 --- a/RELEASE/scripts/autoscend/paths/wereprofessor.ash +++ b/RELEASE/scripts/autoscend/paths/wereprofessor.ash @@ -144,9 +144,9 @@ void wereprof_buySkills() cantbuy = 0; //Priority is: Expanding organs, useful skills (banish, instakill, ELR CD), stat gains, +meat, DR, relatively useless skills and waiting on Mafia support skills foreach sk in $strings[stomach3, liver3, stomach2, liver2, stomach1, liver1, hp3, init3, hp2, init2, hp1, init1, mus3, - mox3, mus2, mox2, mus1, mox1, punt, slaughter, pureblood, kick3, kick2, kick1, rend3, rend2, rend1, items3, items2, items1, + mox3, mus2, mox2, mus1, mox1, punt, slaughter, pureblood, hunt, kick3, kick2, kick1, rend3, rend2, rend1, items3, items2, items1, res3, res2, res1, myst3, myst2, myst1, bite3, bite2, bite1, perfecthair, meat3, meat2, meat1, ml3, ml2, ml1, skin3, - skin2, skin1, hunt, feasting, skinheal, howl, feed] + skin2, skin1, feasting, skinheal, howl, feed] { if(contains_text(get_property("beastSkillsAvailable").to_string(), sk)) { From 64de5344347d645d589e59c6a0234aa81bb4a356 Mon Sep 17 00:00:00 2001 From: nasurte <111531909+nasurte@users.noreply.github.com> Date: Thu, 17 Oct 2024 19:07:14 +0300 Subject: [PATCH 03/16] ZS fixes (#1508) * misc ZS stuff * missed a bracket * jesus christ * don't remove thrice-cursed in the middle of the quest, don't abort on crackpot mystic * restore MP? * no real reason not to cast infectious bite every time +try to handle the wall of meat --------- Co-authored-by: Chris Midgley --- RELEASE/scripts/autoscend/auto_util.ash | 13 ++++++------- .../scripts/autoscend/combat/auto_combat_quest.ash | 6 ++++++ .../autoscend/combat/auto_combat_zombie_slayer.ash | 7 ++++++- RELEASE/scripts/autoscend/paths/zombie_slayer.ash | 6 +++--- RELEASE/scripts/autoscend/quests/level_11.ash | 6 +++--- RELEASE/scripts/autoscend/quests/level_12.ash | 9 ++++++++- RELEASE/scripts/autoscend/quests/level_13.ash | 5 +++++ RELEASE/scripts/autoscend/quests/level_any.ash | 2 +- 8 files changed, 38 insertions(+), 16 deletions(-) diff --git a/RELEASE/scripts/autoscend/auto_util.ash b/RELEASE/scripts/autoscend/auto_util.ash index 5329a5b6f..683a7fc66 100644 --- a/RELEASE/scripts/autoscend/auto_util.ash +++ b/RELEASE/scripts/autoscend/auto_util.ash @@ -1449,10 +1449,6 @@ boolean isGeneralStoreAvailable() { return false; } - if(in_zombieSlayer()) - { - return false; - } if(is_werewolf()) { return false; @@ -2579,9 +2575,12 @@ boolean woods_questStart() } visit_url("place.php?whichplace=woods"); visit_url("place.php?whichplace=forestvillage&action=fv_mystic"); - visit_url("choice.php?pwd=&whichchoice=664&option=1&choiceform1=Sure%2C+old+man.++Tell+me+all+about+it."); - visit_url("choice.php?pwd=&whichchoice=664&option=1&choiceform1=Against+my+better+judgment%2C+yes."); - visit_url("choice.php?pwd=&whichchoice=664&option=1&choiceform1=Er,+sure,+I+guess+so..."); + if (!in_zombieSlayer()) + { + visit_url("choice.php?pwd=&whichchoice=664&option=1&choiceform1=Sure%2C+old+man.++Tell+me+all+about+it."); + visit_url("choice.php?pwd=&whichchoice=664&option=1&choiceform1=Against+my+better+judgment%2C+yes."); + visit_url("choice.php?pwd=&whichchoice=664&option=1&choiceform1=Er,+sure,+I+guess+so..."); + } if(knoll_available()) { visit_url("place.php?whichplace=knoll_friendly&action=dk_innabox"); diff --git a/RELEASE/scripts/autoscend/combat/auto_combat_quest.ash b/RELEASE/scripts/autoscend/combat/auto_combat_quest.ash index 885faae7b..3a992050a 100644 --- a/RELEASE/scripts/autoscend/combat/auto_combat_quest.ash +++ b/RELEASE/scripts/autoscend/combat/auto_combat_quest.ash @@ -222,5 +222,11 @@ string auto_JunkyardCombatHandler(int round, monster enemy, string text) { return useSkill($skill[Toss], false); } + + if (canUse($skill[Plague Claws], false)) + { + return useSkill($skill[Plague Claws], false); + } + return "attack with weapon"; } diff --git a/RELEASE/scripts/autoscend/combat/auto_combat_zombie_slayer.ash b/RELEASE/scripts/autoscend/combat/auto_combat_zombie_slayer.ash index e1db0becf..f47323f16 100644 --- a/RELEASE/scripts/autoscend/combat/auto_combat_zombie_slayer.ash +++ b/RELEASE/scripts/autoscend/combat/auto_combat_zombie_slayer.ash @@ -44,10 +44,15 @@ string auto_combatZombieSlayerStage3(int round, monster enemy, string text) return ""; } - if(canUse($skill[Infectious Bite]) && zombieSlayer_canInfect(enemy) && canSurvive(4.0)) + if(canUse($skill[Infectious Bite]) && canSurvive(4.0)) { return useSkill($skill[Infectious Bite]); } + + if(canUse($skill[Meat Shields]) && enemy.boss && canSurvive(4.0)) + { + return useSkill($skill[Meat Shields]); + } // Just always use Bear-ly Legal for the delevel + meat, unless we want to Bear Hug or Kodiak Moment if (canUse($skill[Bear-ly Legal]) && !wantBearHug(enemy) && !wantKodiakMoment(enemy)) diff --git a/RELEASE/scripts/autoscend/paths/zombie_slayer.ash b/RELEASE/scripts/autoscend/paths/zombie_slayer.ash index d48bf3321..98eb77a65 100644 --- a/RELEASE/scripts/autoscend/paths/zombie_slayer.ash +++ b/RELEASE/scripts/autoscend/paths/zombie_slayer.ash @@ -165,7 +165,7 @@ boolean zombieSlayer_acquireMP(int goal, int meat_reserve) return false; } - if (my_hp() >= goal) return true; + if (my_mp() >= goal) return true; return lureMinions(goal) || summonMinions(goal, meat_reserve); } @@ -186,10 +186,10 @@ boolean zombieSlayer_acquireHP(int goal) int missingHP = goal - my_hp(); - // Devour Minions if you need at least 4 casts of Bite Minion + // Devour Minions if you need at least 4 casts of Bite Minion or if doing the Hidden Apartment Building if (auto_have_skill($skill[Devour Minions])) { - while (missingHP > floor(my_maxhp() * 0.3) && zombieSlayer_acquireMP(mp_cost($skill[Devour Minions]))) + while ((missingHP > floor(my_maxhp() * 0.3) || ((have_effect($effect[Thrice-Cursed]) > 0 || have_effect($effect[Twice-Cursed]) > 0 || have_effect($effect[Once-Cursed]) > 0) && !(internalQuestStatus("questL11Curses") > 1 || item_amount($item[Moss-Covered Stone Sphere]) > 0))) && zombieSlayer_acquireMP(mp_cost($skill[Devour Minions]))) { use_skill(1, $skill[Devour Minions]); if (my_hp() >= goal) break; diff --git a/RELEASE/scripts/autoscend/quests/level_11.ash b/RELEASE/scripts/autoscend/quests/level_11.ash index 08a37c5c8..c09e1a0dc 100644 --- a/RELEASE/scripts/autoscend/quests/level_11.ash +++ b/RELEASE/scripts/autoscend/quests/level_11.ash @@ -550,7 +550,7 @@ void hauntedBedroomChoiceHandler(int choice, string[int] options) else if(choice == 878) // One Ornate Nightstand (The Haunted Bedroom) { boolean needSpectacles = !possessEquipment($item[Lord Spookyraven\'s Spectacles]) && internalQuestStatus("questL11Manor") < 2; - if(is_boris() || in_wotsf() || (in_zombieSlayer() && in_hardcore()) || (in_nuclear() && in_hardcore())) + if(is_boris() || in_wotsf() || (in_nuclear() && in_hardcore())) { needSpectacles = false; } @@ -620,7 +620,7 @@ boolean LX_getLadySpookyravensFinestGown() { // Might not be worth it since we need to fight ornate nightstands for the spectacles and camera boolean needSpectacles = !possessEquipment($item[Lord Spookyraven\'s Spectacles]) && internalQuestStatus("questL11Manor") < 2; boolean needCamera = (item_amount($item[disposable instant camera]) == 0 && internalQuestStatus("questL11Palindome") < 1); - if (is_boris() || in_wotsf() || (in_zombieSlayer() && in_hardcore()) || (in_nuclear() && in_hardcore())) { + if (is_boris() || in_wotsf() || (in_nuclear() && in_hardcore())) { needSpectacles = false; } else if(needCamera && needSpectacles) { @@ -2315,7 +2315,7 @@ boolean L11_mauriceSpookyraven() } } - if(!possessEquipment($item[Lord Spookyraven\'s Spectacles]) || is_boris() || in_zombieSlayer() || in_wotsf() || in_bhy() || in_robot() || (in_nuclear() && !get_property("auto_haveoven").to_boolean())) + if(!possessEquipment($item[Lord Spookyraven\'s Spectacles]) || is_boris() || in_wotsf() || in_bhy() || in_robot() || (in_nuclear() && !get_property("auto_haveoven").to_boolean())) { auto_log_warning("Alternate fulminate pathway... how sad :(", "red"); # I suppose we can let anyone in without the Spectacles. diff --git a/RELEASE/scripts/autoscend/quests/level_12.ash b/RELEASE/scripts/autoscend/quests/level_12.ash index ca70308c0..92572057b 100644 --- a/RELEASE/scripts/autoscend/quests/level_12.ash +++ b/RELEASE/scripts/autoscend/quests/level_12.ash @@ -1179,7 +1179,14 @@ boolean L12_gremlins() { return false; } - if(in_glover()) + if (in_zombieSlayer()) + { + if(!auto_have_skill($skill[Plague Claws]) && item_amount($item[Seal Tooth]) == 0) + { + return false; + } + } + else if(in_glover()) { int need = 30 - item_amount($item[Doc Galaktik\'s Pungent Unguent]); if((need > 0) && (item_amount($item[Molybdenum Pliers]) == 0)) diff --git a/RELEASE/scripts/autoscend/quests/level_13.ash b/RELEASE/scripts/autoscend/quests/level_13.ash index 0eab99eeb..3d7872829 100644 --- a/RELEASE/scripts/autoscend/quests/level_13.ash +++ b/RELEASE/scripts/autoscend/quests/level_13.ash @@ -1460,6 +1460,11 @@ boolean L13_towerNSTower() equipBaseline(); provideMeat(626, true, false); + if(in_zombieSlayer()) + { + acquireMP(30,0); + } + acquireHP(); autoAdvBypass("place.php?whichplace=nstower&action=ns_06_monster2", $location[Noob Cave]); return true; diff --git a/RELEASE/scripts/autoscend/quests/level_any.ash b/RELEASE/scripts/autoscend/quests/level_any.ash index bcbebb639..6fe93ccf7 100644 --- a/RELEASE/scripts/autoscend/quests/level_any.ash +++ b/RELEASE/scripts/autoscend/quests/level_any.ash @@ -260,7 +260,7 @@ boolean LX_islandAccess() return false; } - if(in_lowkeysummer() || in_zombieSlayer()) + if(in_lowkeysummer()) { return LX_hippyBoatman(); } From 53b9e91b01b7666342f920f06284ae6c618d0af3 Mon Sep 17 00:00:00 2001 From: HippoKingKoL <83581028+HippoKingKoL@users.noreply.github.com> Date: Thu, 17 Oct 2024 17:09:07 +0100 Subject: [PATCH 04/16] Ed modernisation, free run expansion and other small fixes (#1507) * add speakeasy free fight function * several Ed path changes. 1) liver prioritised over stomach now we don't need fortune cookies. Drunk helps pool 2) Use speakeasy free fights when ka farming 3) Only prioritise pool unlock while under level 11 * copy/paste over new features from regular combat to Ed combat. 1) Free runaways 2) Darts 3) Spikolodon 4) just change a few variable names in banishing, so it's identical to the main one. No functional change here * expand list of free-run monsters * Ed doesn't need a digital key, don't delay in 8-bit * use polar vortex/mild evil to take warehouse pages in Ed * turn on shadow brick/mild evil/polar vortex use for Ed * don't drop force as Ed if we've already been beaten up twice * add bowling ball as free run source * add function to check if we still need 8-bit realm points, make delay dependent on it --------- Co-authored-by: Chris Midgley --- BUILD/monsters/freerun.dat | 11 ++ RELEASE/data/autoscend_monsters.txt | 11 ++ RELEASE/scripts/autoscend/auto_util.ash | 7 + RELEASE/scripts/autoscend/auto_zone.ash | 8 +- .../scripts/autoscend/autoscend_header.ash | 2 + .../autoscend/combat/auto_combat_ed.ash | 133 +++++++++++++++--- .../autoscend/combat/auto_combat_util.ash | 23 +++ RELEASE/scripts/autoscend/iotms/mr2022.ash | 14 ++ .../paths/actually_ed_the_undying.ash | 23 ++- RELEASE/scripts/autoscend/quests/level_13.ash | 15 +- 10 files changed, 218 insertions(+), 29 deletions(-) diff --git a/BUILD/monsters/freerun.dat b/BUILD/monsters/freerun.dat index 9b99e2213..e836170b1 100644 --- a/BUILD/monsters/freerun.dat +++ b/BUILD/monsters/freerun.dat @@ -31,3 +31,14 @@ animated rustic nightstand Wardröb nightstand drunken rat bunch of drunken rats +tapdancing skeleton +floating platter of hors d\'oeuvres +boaraffe +pygmy assault squad +pygmy blowgunner +Copperhead Club bartender +fan dancer +Mob Penguin Capo +ninja snowman (chopsticks) +ninja snowman janitor +ninja snowman weaponmaster diff --git a/RELEASE/data/autoscend_monsters.txt b/RELEASE/data/autoscend_monsters.txt index a52cf59cc..be3c7f0ad 100644 --- a/RELEASE/data/autoscend_monsters.txt +++ b/RELEASE/data/autoscend_monsters.txt @@ -89,6 +89,17 @@ freerun 29 animated rustic nightstand freerun 30 Wardröb nightstand freerun 31 drunken rat freerun 32 bunch of drunken rats +freerun 33 tapdancing skeleton +freerun 34 floating platter of hors d'oeuvres +freerun 35 boaraffe +freerun 36 pygmy assault squad +freerun 37 pygmy blowgunner +freerun 38 Copperhead Club bartender +freerun 39 fan dancer +freerun 40 Mob Penguin Capo +freerun 41 ninja snowman (chopsticks) +freerun 42 ninja snowman janitor +freerun 43 ninja snowman weaponmaster replace 0 Banshee Librarian item:Killing Jar>0 replace 1 Beefy Bodyguard Bat loc:The Boss Bat's Lair;turnsspent:The Boss Bat's Lair>=4;!path:Heavy Rains;!path:Actually Ed the Undying;!path:Pocket Familiars;!path:Dark Gyffte;!path:Path of the Plumber;!pathid:41;!path:Wildfire;!path:Fall of the Dinosaurs;!path:Avatar of Shadows Over Loathing;!path:Legacy of Loathing;!path:WereProfessor diff --git a/RELEASE/scripts/autoscend/auto_util.ash b/RELEASE/scripts/autoscend/auto_util.ash index 683a7fc66..ddb3eb410 100644 --- a/RELEASE/scripts/autoscend/auto_util.ash +++ b/RELEASE/scripts/autoscend/auto_util.ash @@ -950,6 +950,13 @@ string freeRunCombatString(monster enemy, location loc, boolean inCombat) { return "skill " + $skill[Peel Out]; } + + // Bowling ball is a banish as well, but is available enough that we want to use it as a free run source too + // bowling ball is only in inventory if it is available to use in combat. While on cooldown, it is not in inventory + if((inCombat ? auto_have_skill($skill[Bowl a Curveball]) : item_amount($item[Cosmic Bowling Ball]) > 0) && auto_is_valid($skill[Bowl a Curveball])) + { + return "skill " + $skill[Bowl a Curveball]; + } //Non-standard free-runs if(!inAftercore()) diff --git a/RELEASE/scripts/autoscend/auto_zone.ash b/RELEASE/scripts/autoscend/auto_zone.ash index 058310df7..8e97e8ef8 100644 --- a/RELEASE/scripts/autoscend/auto_zone.ash +++ b/RELEASE/scripts/autoscend/auto_zone.ash @@ -906,25 +906,25 @@ generic_t zone_delay(location loc) } break; case $location[Vanya\'s Castle]: - if (possessEquipment($item[Continuum Transfunctioner]) && (get_property("8BitColor") == "black" || get_property("8BitColor") == "")) + if (need8BitPoints() && possessEquipment($item[Continuum Transfunctioner]) && (get_property("8BitColor") == "black" || get_property("8BitColor") == "")) { value = 5 - get_property("8BitBonusTurns").to_int(); } break; case $location[The Fungus Plains]: - if (possessEquipment($item[Continuum Transfunctioner]) && get_property("8BitColor") == "red") + if (need8BitPoints() && possessEquipment($item[Continuum Transfunctioner]) && get_property("8BitColor") == "red") { value = 5 - get_property("8BitBonusTurns").to_int(); } break; case $location[Megalo-City]: - if (possessEquipment($item[Continuum Transfunctioner]) && get_property("8BitColor") == "blue") + if (need8BitPoints() && possessEquipment($item[Continuum Transfunctioner]) && get_property("8BitColor") == "blue") { value = 5 - get_property("8BitBonusTurns").to_int(); } break; case $location[Hero\'s Field]: - if (possessEquipment($item[Continuum Transfunctioner]) && get_property("8BitColor") == "green") + if (need8BitPoints() && possessEquipment($item[Continuum Transfunctioner]) && get_property("8BitColor") == "green") { value = 5 - get_property("8BitBonusTurns").to_int(); } diff --git a/RELEASE/scripts/autoscend/autoscend_header.ash b/RELEASE/scripts/autoscend/autoscend_header.ash index dcb6a2b97..2e65af303 100644 --- a/RELEASE/scripts/autoscend/autoscend_header.ash +++ b/RELEASE/scripts/autoscend/autoscend_header.ash @@ -485,6 +485,7 @@ boolean auto_sendAutumnaton(location loc); boolean auto_autumnatonQuest(); boolean auto_hasSpeakEasy(); int auto_remainingSpeakeasyFreeFights(); +boolean speakeasyCombat(); boolean auto_haveTrainSet(); @@ -1198,6 +1199,7 @@ boolean L12_islandWar(); //Defined in autoscend/quests/level_13.ash boolean needStarKey(); boolean needDigitalKey(); +boolean need8BitPoints(); int towerKeyCount(); int towerKeyCount(boolean effective); int EightBitScore(); diff --git a/RELEASE/scripts/autoscend/combat/auto_combat_ed.ash b/RELEASE/scripts/autoscend/combat/auto_combat_ed.ash index 2df4f6f4a..cc50108f7 100644 --- a/RELEASE/scripts/autoscend/combat/auto_combat_ed.ash +++ b/RELEASE/scripts/autoscend/combat/auto_combat_ed.ash @@ -322,6 +322,7 @@ string auto_edCombatHandler(int round, monster enemy, string text) } } + //yellowray instantly kills the enemy and makes them drop all items they can drop. if(!combat_status_check("yellowray") && auto_wantToYellowRay(enemy, my_location())) { string combatAction = yellowRayCombatString(enemy, true, $monsters[bearpig topiary animal, elephant (meatcar?) topiary animal, spider (duck?) topiary animal, Knight (Snake)] contains enemy); @@ -354,27 +355,80 @@ string auto_edCombatHandler(int round, monster enemy, string text) if(!combat_status_check("banishercheck") && auto_wantToBanish(enemy, my_location())) { - string combatAction = banisherCombatString(enemy, my_location(), true); - if(combatAction != "") + string banishAction = banisherCombatString(enemy, my_location(), true); + if(banishAction != "") { + auto_log_info("Looking at banishAction: " + banishAction, "green"); combat_status_add("banisher"); - if(index_of(combatAction, "skill") == 0) + if(index_of(banishAction, "skill") == 0) { - handleTracker(enemy, to_skill(substring(combatAction, 6)), "auto_banishes"); + handleTracker(enemy, to_skill(substring(banishAction, 6)), "auto_banishes"); } - else if(index_of(combatAction, "item") == 0) + else if(index_of(banishAction, "item") == 0) { - handleTracker(enemy, to_item(substring(combatAction, 5)), "auto_banishes"); + if(contains_text(banishAction, ", none")) + { + int commapos = index_of(banishAction, ", none"); + handleTracker(enemy, to_item(substring(banishAction, 5, commapos)), "auto_banishes"); + } + else + { + handleTracker(enemy, to_item(substring(banishAction, 5)), "auto_banishes"); + } } else { - auto_log_warning("Unable to track banisher behavior: " + combatAction, "red"); + auto_log_warning("Unable to track banisher behavior: " + banishAction, "red"); } - return combatAction; + return banishAction; } + //we wanted to banish an enemy and failed. set a property so we do not bother trying in subsequent rounds combat_status_add("banishercheck"); } + // Free run from monsters we want to banish but are unable to, or monsters on the free run list + if(!combat_status_check("freeruncheck") && (auto_wantToFreeRun(enemy, my_location()) || auto_wantToBanish(enemy, my_location()))) + { + string freeRunAction = freeRunCombatString(enemy, my_location(), true); + if(freeRunAction != "") + { + if (index_of(freeRunAction, "runaway familiar") == 0) + { + handleTracker(enemy, to_familiar(substring(freeRunAction, 17)), "auto_freeruns"); + freeRunAction = "runaway"; + } + else if (index_of(freeRunAction, "runaway item") == 0) + { + handleTracker(enemy, to_item(substring(freeRunAction, 13)), "auto_freeruns"); + freeRunAction = "runaway"; + } + else if(index_of(freeRunAction, "skill") == 0) + { + handleTracker(enemy, to_skill(substring(freeRunAction, 6)), "auto_freeruns"); + } + else if(index_of(freeRunAction, "item") == 0) + { + if(contains_text(freeRunAction, ", none")) + { + int commapos = index_of(freeRunAction, ", none"); + handleTracker(enemy, to_item(substring(freeRunAction, 5, commapos)), "auto_freeruns"); + } + else + { + handleTracker(enemy, to_item(substring(freeRunAction, 5)), "auto_freeruns"); + } + } + else + { + auto_log_warning("Unable to track runaway behavior: " + freeRunAction, "red"); + } + return freeRunAction; + } + + //we wanted to free run an enemy and failed. set a property so we do not bother trying in subsequent rounds + combat_status_add("freeruncheck"); + } + if (!combat_status_check("replacercheck") && auto_wantToReplace(enemy, my_location())) { string combatAction = replaceMonsterCombatString(enemy, true); @@ -438,7 +492,10 @@ string auto_edCombatHandler(int round, monster enemy, string text) if (!get_property("edUsedLash").to_boolean() && canUse($skill[Lash of the Cobra]) && get_property("_edLashCount").to_int() < 30) { boolean doLash = false; - + if(enemy == $monster[Shadow Slab]) + { + doLash = true; + } if((enemy == $monster[Big Wheelin\' Twins]) && !possessEquipment($item[Badge Of Authority])) { doLash = true; @@ -584,14 +641,6 @@ string auto_edCombatHandler(int round, monster enemy, string text) } } - if (canUse($item[Tattered Scrap of Paper], false) && have_effect($effect[Everything Looks Green]) == 0) - { - if($monsters[Bubblemint Twins, Bunch of Drunken Rats, Coaltergeist, Creepy Ginger Twin, Demoninja, Drunk Goat, Drunken Rat, Fallen Archfiend, Hellion, Knob Goblin Elite Guard, L imp, Mismatched Twins, Sabre-Toothed Goat, W imp] contains enemy) - { - return useItem($item[Tattered Scrap Of Paper]); - } - } - if (!combat_status_check("talismanofrenenutet") && canUse($item[Talisman of Renenutet])) { boolean doRenenutet = false; @@ -682,6 +731,14 @@ string auto_edCombatHandler(int round, monster enemy, string text) { return useItem($item[Short Writ of Habeas Corpus]); } + + if(canUse($skill[Darts: Aim for the Bullseye]) && have_effect($effect[Everything Looks Red]) == 0 && dartELRcd() <= 40) + { + set_property("auto_instakillSource", "darts bullseye"); + set_property("auto_instakillSuccess", true); + loopHandlerDelayAll(); + return useSkill($skill[Darts: Aim for the Bullseye]); + } // use cosmic bowling ball iotm if(auto_bowlingBallCombatString(my_location(), true) != "" && !enemy.boss) @@ -689,6 +746,14 @@ string auto_edCombatHandler(int round, monster enemy, string text) return auto_bowlingBallCombatString(my_location(), false); } + // prep parka NC forcing if requested + if(canUse($skill[Launch spikolodon spikes]) && get_property("auto_forceNonCombatSource") == "jurassic parka" + && !get_property("auto_parkaSpikesDeployed").to_boolean()) + { + set_property("auto_parkaSpikesDeployed", true); + return useSkill($skill[Launch spikolodon spikes]); + } + if(instakillable(enemy) && !isFreeMonster(enemy,my_location()) && doInstaKill) { if(!combat_status_check("batoomerang") && (item_amount($item[Replica Bat-oomerang]) > 0)) @@ -708,6 +773,13 @@ string auto_edCombatHandler(int round, monster enemy, string text) } } + if(canUse($item[shadow brick]) && (get_property("_shadowBricksUsed").to_int() < 13)) + { + handleTracker(enemy, $item[shadow brick], "auto_instakill"); + loopHandlerDelayAll(); + return useItems($item[shadow brick], $item[none]); + } + if(!combat_status_check("jokesterGun") && (equipped_item($slot[Weapon]) == $item[The Jokester\'s Gun]) && !get_property("_firedJokestersGun").to_boolean() && auto_have_skill($skill[Fire the Jokester\'s Gun])) { combat_status_add("jokesterGun"); @@ -745,6 +817,33 @@ string auto_edCombatHandler(int round, monster enemy, string text) return "skill Mild Curse; repeat; "; } + + //Everfull Dart Holder + if(have_equipped($item[Everfull Dart Holster]) && get_property("_dartsLeft").to_int() > 0) + { + return useSkill(dartSkill(), false); + } + + // Don't risk drop forcing if we've already been beaten up twice + if (get_property("_edDefeats").to_int()<2) + { + if(wantToForceDrop(enemy)) + { + boolean polarVortexAvailable = canUse($skill[Fire Extinguisher: Polar Vortex], false) && auto_fireExtinguisherCharges() > 10; + boolean mildEvilAvailable = canUse($skill[Perpetrate Mild Evil],false) && get_property("_mildEvilPerpetrated").to_int() < 3; + // mild evil only can pick pocket. Use it before fire extinguisher + if(mildEvilAvailable) + { + handleTracker(enemy, $skill[Perpetrate Mild Evil], "auto_otherstuff"); + return useSkill($skill[Perpetrate Mild Evil]); + } + if(polarVortexAvailable) + { + handleTracker(enemy, $skill[Fire Extinguisher: Polar Vortex], "auto_otherstuff"); + return useSkill($skill[Fire Extinguisher: Polar Vortex]); + } + } + } // Actually killing stuff starts here if(canUse(auto_spoonCombatSkill())) diff --git a/RELEASE/scripts/autoscend/combat/auto_combat_util.ash b/RELEASE/scripts/autoscend/combat/auto_combat_util.ash index c557fc122..1240df5f9 100644 --- a/RELEASE/scripts/autoscend/combat/auto_combat_util.ash +++ b/RELEASE/scripts/autoscend/combat/auto_combat_util.ash @@ -988,6 +988,29 @@ boolean wantToForceDrop(monster enemy) forceDrop = true; } } + + if(isActuallyEd() && my_location() == $location[The Secret Council Warehouse]) + { + int progress = get_property("warehouseProgress").to_int(); + if(enemy == $monster[Warehouse Guard]) + { + int n_pages = item_amount($item[warehouse map page]); + int progress_with_pages = progress+n_pages*8; + if (progress_with_pages<39) // need 40 to "win", will get +1 for this combat + { + forceDrop = true; + } + } + else if(enemy == $monster[Warehouse Clerk]) + { + int n_pages = item_amount($item[warehouse inventory page]); + int progress_with_pages = progress+n_pages*8; + if (progress_with_pages<39) // need 40 to "win", will get +1 for this combat + { + forceDrop = true; + } + } + } // ed warehouse return forceDrop; } diff --git a/RELEASE/scripts/autoscend/iotms/mr2022.ash b/RELEASE/scripts/autoscend/iotms/mr2022.ash index a71bc6b57..62051d0b9 100644 --- a/RELEASE/scripts/autoscend/iotms/mr2022.ash +++ b/RELEASE/scripts/autoscend/iotms/mr2022.ash @@ -754,6 +754,20 @@ int auto_remainingSpeakeasyFreeFights() return max(3 - get_property("_speakeasyFreeFights").to_int(), 0); } +boolean speakeasyCombat() +{ + if(!auto_hasSpeakEasy()) + { + return false; + } + + if(auto_remainingSpeakeasyFreeFights()>0) + { + return autoAdv($location[An Unusually Quiet Barroom Brawl]); + } + return false; +} + boolean auto_haveTrainSet() { return auto_get_campground() contains $item[model train set] && auto_is_valid($item[model train set]); //check if the model train set is in the campground diff --git a/RELEASE/scripts/autoscend/paths/actually_ed_the_undying.ash b/RELEASE/scripts/autoscend/paths/actually_ed_the_undying.ash index 68a1948ca..c1683be3c 100644 --- a/RELEASE/scripts/autoscend/paths/actually_ed_the_undying.ash +++ b/RELEASE/scripts/autoscend/paths/actually_ed_the_undying.ash @@ -578,9 +578,9 @@ skill ed_nextUpgrade() { return $skill[Another Extra Spleen]; // 10 Ka } - else if (!have_skill($skill[Replacement Stomach])) + else if (!have_skill($skill[Replacement Liver])) { - return $skill[Replacement Stomach]; // 30 Ka + return $skill[Replacement Liver]; // 30 Ka } else if (!have_skill($skill[Upgraded Legs])) { @@ -602,9 +602,9 @@ skill ed_nextUpgrade() { return $skill[Just One More Extra Spleen]; // 25 Ka } - else if (!have_skill($skill[Replacement Liver])) + else if (!have_skill($skill[Replacement Stomach])) { - return $skill[Replacement Liver]; // 30 Ka + return $skill[Replacement Stomach]; // 30 Ka } else if (!have_skill($skill[Elemental Wards])) { @@ -1116,7 +1116,10 @@ boolean L1_ed_islandFallback() //track that we are farming Ka as Ed set_property("_auto_farmingKaAsEd", true); - + if (auto_remainingSpeakeasyFreeFights() > 0) + { + return speakeasyCombat(); + } if (neverendingPartyAvailable()) { return neverendingPartyCombat(); @@ -1448,8 +1451,10 @@ boolean LM_edTheUndying() // we should open the manor second floor sooner rather than later as starting the level 11 quest // ruins our pool skill and having delay burning zones open is nice. - if (LX_unlockManorSecondFloor() || LX_unlockHauntedLibrary() || LX_unlockHauntedBilliardsRoom(true)) { - return true; + if(my_level()<11) { + if (LX_unlockManorSecondFloor() || LX_unlockHauntedLibrary() || LX_unlockHauntedBilliardsRoom(true)) { + return true; + } } // as we do hippy side, the war is a 2 Ka quest (excluding sidequests but that shouldn't matter) if (L12_islandWar()) @@ -1472,6 +1477,10 @@ boolean LM_edTheUndying() { return true; } + // If we didn't get the Spookyraven unlock done before level 11, do it now since airship is done and we want more delay zones open + if (LX_unlockManorSecondFloor() || LX_unlockHauntedLibrary() || LX_unlockHauntedBilliardsRoom(true)) { + return true; + } // Smut Orcs are 1 Ka so build the bridge. if (L9_ed_chasmStart() || L9_chasmBuild()) { diff --git a/RELEASE/scripts/autoscend/quests/level_13.ash b/RELEASE/scripts/autoscend/quests/level_13.ash index 3d7872829..1e51f8a36 100644 --- a/RELEASE/scripts/autoscend/quests/level_13.ash +++ b/RELEASE/scripts/autoscend/quests/level_13.ash @@ -13,6 +13,10 @@ boolean needStarKey() boolean needDigitalKey() { + if(isActuallyEd()) + { + return false; + } if(contains_text(get_property("nsTowerDoorKeysUsed"),"digital key")) { return false; @@ -21,10 +25,19 @@ boolean needDigitalKey() { return false; } - + return true; } +boolean need8BitPoints() +{ + if(get_property("8BitScore").to_int() >= 10000) + { + return false; + } + return needDigitalKey(); +} + int towerKeyCount() { return towerKeyCount(true); From 95bdbf56ac9d6de86f1bf3ed5a4d3b70ef0db822 Mon Sep 17 00:00:00 2001 From: VuvuzelaVirtuoso <54866751+VuvuzelaVirtuoso@users.noreply.github.com> Date: Thu, 17 Oct 2024 09:10:52 -0700 Subject: [PATCH 05/16] Bedtime reminder for unused August Scepter casts (#1472) * Update auto_bedtime.ash Not sure what the thoughts are toward the bedtime "resources are still available!" messages in this file; most are for stuff from back in 2015. But in that context, I've been running non-Standard runs and seeing reminders for Deck and Chateau use, I was considering the daily resources that are available that might be worth reminding users are available for manual intervention. A lot of these resources, even though they seem a bit wasted are also a bit trickier and maybe-not-advisable to tell a user to make use of (Carto mapping, making decisions about a random monster to reminisce about/fax, forcing NCs, clover uses), but I feel like August Scepter casts are a pretty fair one to remind users of? * Update RELEASE/scripts/autoscend/auto_bedtime.ash Co-authored-by: Malibu Stacey <50261170+Malibu-Stacey@users.noreply.github.com> --------- Co-authored-by: Malibu Stacey <50261170+Malibu-Stacey@users.noreply.github.com> Co-authored-by: Chris Midgley --- RELEASE/scripts/autoscend/auto_bedtime.ash | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/RELEASE/scripts/autoscend/auto_bedtime.ash b/RELEASE/scripts/autoscend/auto_bedtime.ash index 59d37ab2e..80b72a62b 100644 --- a/RELEASE/scripts/autoscend/auto_bedtime.ash +++ b/RELEASE/scripts/autoscend/auto_bedtime.ash @@ -1366,6 +1366,11 @@ boolean doBedtime() auto_log_info("You have a tea tree to shake!", "blue"); } + if (auto_haveAugustScepter() && get_property("_augSkillsCast").to_int() < 5) + { + auto_log_info("You still have " + (5 - get_property("_augSkillsCast").to_int()) + " August Scepter casts remaining! Perhaps consider casting Aug 13th/30th for more rollover adventures, and/or 7th for a buff for tomorrow?", "blue"); + } + if (get_property("spadingData") != "") { cli_execute("spade autoconfirm"); From e48010217039c832b2b45000586b4f4e92908e5c Mon Sep 17 00:00:00 2001 From: Alium58 Date: Thu, 17 Oct 2024 11:37:35 -0500 Subject: [PATCH 06/16] More Bat Wings Support (#1511) * free fights * use new has function in lvl4 quest * leap bridge * restore skill * start on airship support * airship support * fix how to force not equipping wings * fix to leaping bridge * fix L9 * pickpocket support * free fights no longer swallow bat wings free fights * name fix * minor cleanup * only sniff goat if need cheese * bump mafia verison * function for bridge goal * more spots for bridgeGoal() * account for skills that cost mp and have a daily limit --------- Co-authored-by: Chris Midgley --- BUILD/monsters/sniff.dat | 2 +- BUILD/restoration/skill.dat | 1 + RELEASE/data/autoscend_monsters.txt | 2 +- RELEASE/data/autoscend_restoration.txt | 1 + RELEASE/scripts/autoscend.ash | 2 +- RELEASE/scripts/autoscend/auto_acquire.ash | 6 +-- RELEASE/scripts/autoscend/auto_choice_adv.ash | 4 ++ RELEASE/scripts/autoscend/auto_equipment.ash | 6 +++ RELEASE/scripts/autoscend/auto_pre_adv.ash | 6 +++ RELEASE/scripts/autoscend/auto_restore.ash | 19 +++++++++- RELEASE/scripts/autoscend/auto_zone.ash | 4 +- .../scripts/autoscend/autoscend_header.ash | 3 ++ .../combat/auto_combat_default_stage2.ash | 2 +- .../combat/auto_combat_default_stage3.ash | 11 +++++- .../autoscend/combat/auto_combat_util.ash | 3 +- RELEASE/scripts/autoscend/iotms/mr2014.ash | 6 +-- RELEASE/scripts/autoscend/iotms/mr2021.ash | 2 +- RELEASE/scripts/autoscend/iotms/mr2024.ash | 23 +++++++++++ .../autoscend/paths/license_to_adventure.ash | 2 +- .../autoscend/paths/low_key_summer.ash | 2 +- RELEASE/scripts/autoscend/paths/you_robot.ash | 2 +- RELEASE/scripts/autoscend/quests/level_04.ash | 2 +- RELEASE/scripts/autoscend/quests/level_09.ash | 38 ++++++++++++------- 23 files changed, 115 insertions(+), 34 deletions(-) diff --git a/BUILD/monsters/sniff.dat b/BUILD/monsters/sniff.dat index 1f4194166..c59dc5b13 100644 --- a/BUILD/monsters/sniff.dat +++ b/BUILD/monsters/sniff.dat @@ -1,7 +1,7 @@ pygmy shaman loc:The Hidden Apartment Building;!effect:Thrice-Cursed;prop:hiddenApartmentProgress<7 Writing Desk prop:writingDesksDefeated<4 cabinet of Dr. Limpieza -Dairy Goat loc:The Goatlet +Dairy Goat loc:The Goatlet;item:goat cheese<3 Pygmy Bowler Pygmy Witch Surgeon pygmy witch accountant loc:The Hidden Office Building diff --git a/BUILD/restoration/skill.dat b/BUILD/restoration/skill.dat index adaca6040..aa4e21f3e 100644 --- a/BUILD/restoration/skill.dat +++ b/BUILD/restoration/skill.dat @@ -4,3 +4,4 @@ Shake it Off ALL 0 0 0 All Negative none Gelatinous Reconstruction 13 0 0 0 Beaten Up none Disco Nap 20 0 0 0 none none Lasagna Bandages 20 0 0 0 none none +Rest Upside Down 1000 1000 0 0 none none diff --git a/RELEASE/data/autoscend_monsters.txt b/RELEASE/data/autoscend_monsters.txt index be3c7f0ad..24ccab7a8 100644 --- a/RELEASE/data/autoscend_monsters.txt +++ b/RELEASE/data/autoscend_monsters.txt @@ -142,7 +142,7 @@ replace 34 trendy bugbear chef path:Bugbear Invasion;loc:Galley sniff 0 pygmy shaman loc:The Hidden Apartment Building;!effect:Thrice-Cursed;prop:hiddenApartmentProgress<7 sniff 1 Writing Desk prop:writingDesksDefeated<4 sniff 2 cabinet of Dr. Limpieza -sniff 3 Dairy Goat loc:The Goatlet +sniff 3 Dairy Goat loc:The Goatlet;item:goat cheese<3 sniff 4 Pygmy Bowler sniff 5 Pygmy Witch Surgeon sniff 6 pygmy witch accountant loc:The Hidden Office Building diff --git a/RELEASE/data/autoscend_restoration.txt b/RELEASE/data/autoscend_restoration.txt index 032bea615..7707c7fdf 100644 --- a/RELEASE/data/autoscend_restoration.txt +++ b/RELEASE/data/autoscend_restoration.txt @@ -117,4 +117,5 @@ skill 2 Shake it Off ALL 0 0 0 All Negative none skill 3 Gelatinous Reconstruction 13 0 0 0 Beaten Up none skill 4 Disco Nap 20 0 0 0 none none skill 5 Lasagna Bandages 20 0 0 0 none none +skill 6 Rest Upside Down 1000 1000 0 0 none none diff --git a/RELEASE/scripts/autoscend.ash b/RELEASE/scripts/autoscend.ash index 91da36d36..611758cfc 100644 --- a/RELEASE/scripts/autoscend.ash +++ b/RELEASE/scripts/autoscend.ash @@ -1,4 +1,4 @@ -since r28077; // feat: various iotm improvements +since r28084; // feat: make bat wings rest always available /*** autoscend_header.ash must be first import All non-accessory scripts must be imported here diff --git a/RELEASE/scripts/autoscend/auto_acquire.ash b/RELEASE/scripts/autoscend/auto_acquire.ash index 0b3debf27..600774e5b 100644 --- a/RELEASE/scripts/autoscend/auto_acquire.ash +++ b/RELEASE/scripts/autoscend/auto_acquire.ash @@ -813,7 +813,7 @@ 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() < 26 && fastenerCount() < 26) + if (canPull($item[smut orc keepsake box]) && (lumberCount() + 5 <= bridgeGoal()) && (fastenerCount() + 5 <= bridgeGoal())) { if (pullXWhenHaveY($item[smut orc keepsake box], 1, 0)) { @@ -844,10 +844,10 @@ boolean LX_craftAcquireItems() cli_execute("make 1 snow cleats"); } - if((item_amount($item[snow berries]) > 0) && (my_daycount() > 1) && (get_property("chasmBridgeProgress").to_int() >= 30) && (my_level() >= 9)) + if((item_amount($item[snow berries]) > 0) && (my_daycount() > 1) && (get_property("chasmBridgeProgress").to_int() >= bridgeGoal()) && (my_level() >= 9)) { visit_url("place.php?whichplace=orc_chasm"); - if(get_property("chasmBridgeProgress").to_int() >= 30) + if(get_property("chasmBridgeProgress").to_int() >= bridgeGoal()) { #if(in_hardcore() && isGuildClass()) if(isGuildClass()) diff --git a/RELEASE/scripts/autoscend/auto_choice_adv.ash b/RELEASE/scripts/autoscend/auto_choice_adv.ash index 9bb72a22c..bb1870e24 100644 --- a/RELEASE/scripts/autoscend/auto_choice_adv.ash +++ b/RELEASE/scripts/autoscend/auto_choice_adv.ash @@ -188,6 +188,10 @@ boolean auto_run_choice(int choice, string page) { run_choice(4); // get the model airship } + else if (options contains 6) + { + run_choice(6); // advance immateria quest + } else if (options contains 5) { run_choice(5); // get titanium umbrella, metallic A, SGEEA and a penultimate fantasy chest diff --git a/RELEASE/scripts/autoscend/auto_equipment.ash b/RELEASE/scripts/autoscend/auto_equipment.ash index dba8097e1..2967c662c 100644 --- a/RELEASE/scripts/autoscend/auto_equipment.ash +++ b/RELEASE/scripts/autoscend/auto_equipment.ash @@ -811,6 +811,12 @@ void finalizeMaximize(boolean speculative) addBonusToMaximize($item[spring shoes], 50); } } + + if(auto_haveBatWings() && get_property("_batWingsFreeFights").to_int() < 5) + { + addBonusToMaximize($item[bat wings], 200); // get the 5 free fights + } + // We still need pixels in KoE, badly. if(in_koe() && auto_hasPowerfulGlove()) { diff --git a/RELEASE/scripts/autoscend/auto_pre_adv.ash b/RELEASE/scripts/autoscend/auto_pre_adv.ash index c7b7a9d84..0e89bf18b 100644 --- a/RELEASE/scripts/autoscend/auto_pre_adv.ash +++ b/RELEASE/scripts/autoscend/auto_pre_adv.ash @@ -517,6 +517,12 @@ boolean auto_pre_adventure() addBonusToMaximize(exting, 200); // extinguisher prevents per-round hot damage in wildfire path } + if(place == $location[The Penultimate Fantasy Airship] && auto_haveBatWings()) + { + // only here to get immateria. Get it faster with bat wings + autoEquip($item[Bat Wings]); + } + if(in_plumber()) { diff --git a/RELEASE/scripts/autoscend/auto_restore.ash b/RELEASE/scripts/autoscend/auto_restore.ash index 89be94751..295c11b2b 100644 --- a/RELEASE/scripts/autoscend/auto_restore.ash +++ b/RELEASE/scripts/autoscend/auto_restore.ash @@ -677,7 +677,20 @@ __RestorationOptimization __calculate_objective_values(int hp_goal, int mp_goal, } else if(metadata.type == "skill") { - available = floor(get_value("mp_starting") / mp_cost(to_skill(metadata.name))); + int dailyLimit = to_skill(metadata.name).dailylimit; + int mpCost = mp_cost(to_skill(metadata.name)); + if(dailyLimit != -1 && mpCost > 0) + { + available = min(dailyLimit, floor(get_value("mp_starting") / mpCost)); + } + else if(dailyLimit != -1) + { + available = dailyLimit; + } + else + { + available = floor(get_value("mp_starting") / mpCost); + } } else if(metadata.name == __HOT_TUB) { @@ -955,6 +968,10 @@ __RestorationOptimization __calculate_objective_values(int hp_goal, int mp_goal, if(metadata.type == "skill") { skill s = to_skill(metadata.name); + if(s.dailylimit != -1) + { + return s.dailylimit > 0; + } if(my_maxmp() >= mp_cost(s)) { return true; diff --git a/RELEASE/scripts/autoscend/auto_zone.ash b/RELEASE/scripts/autoscend/auto_zone.ash index 8e97e8ef8..39de85888 100644 --- a/RELEASE/scripts/autoscend/auto_zone.ash +++ b/RELEASE/scripts/autoscend/auto_zone.ash @@ -173,7 +173,7 @@ generic_t zone_needItem(location loc) value = 20.0; break; case $location[The Smut Orc Logging Camp]: - if(get_property("chasmBridgeProgress").to_int() < 30) + if(get_property("chasmBridgeProgress").to_int() < bridgeGoal()) { value = 10.0; } @@ -870,7 +870,7 @@ generic_t zone_delay(location loc) } break; case $location[The Smut Orc Logging Camp]: - if (shenZones contains loc && get_property("chasmBridgeProgress").to_int() >= 30) + if (shenZones contains loc && get_property("chasmBridgeProgress").to_int() >= bridgeGoal()) { value = 3 - (loc.turns_spent - shenZones[loc]); } diff --git a/RELEASE/scripts/autoscend/autoscend_header.ash b/RELEASE/scripts/autoscend/autoscend_header.ash index 2e65af303..45d1f627d 100644 --- a/RELEASE/scripts/autoscend/autoscend_header.ash +++ b/RELEASE/scripts/autoscend/autoscend_header.ash @@ -569,6 +569,8 @@ boolean auto_MayamClaimBelt(); boolean auto_MayamClaimWhatever(); boolean auto_MayamClaimAll(); boolean auto_haveRoman(); +boolean auto_haveBatWings(); +boolean auto_canLeapBridge(); ######################################################################################################## //Defined in autoscend/paths/actually_ed_the_undying.ash @@ -1081,6 +1083,7 @@ boolean L8_trapperQuest(); boolean LX_loggingHatchet(); boolean L9_leafletQuest(); void L9_chasmMaximizeForNoncombat(); +int bridgeGoal(); int fastenerCount(); int lumberCount(); boolean finishBuildingSmutOrcBridge(); diff --git a/RELEASE/scripts/autoscend/combat/auto_combat_default_stage2.ash b/RELEASE/scripts/autoscend/combat/auto_combat_default_stage2.ash index 0638c62d6..aa76ca068 100644 --- a/RELEASE/scripts/autoscend/combat/auto_combat_default_stage2.ash +++ b/RELEASE/scripts/autoscend/combat/auto_combat_default_stage2.ash @@ -284,7 +284,7 @@ string auto_combatDefaultStage2(int round, monster enemy, string text) # Instakill handler boolean couldInstaKill = true; - if($monsters[Smut Orc Pipelayer,Smut Orc Jacker,Smut Orc Screwer,Smut Orc Nailer] contains enemy && get_property("chasmBridgeProgress").to_int() < 30) + if($monsters[Smut Orc Pipelayer,Smut Orc Jacker,Smut Orc Screwer,Smut Orc Nailer] contains enemy && get_property("chasmBridgeProgress").to_int() < bridgeGoal()) { //want to do cold damage in stage3 if(my_adventures() > 6) diff --git a/RELEASE/scripts/autoscend/combat/auto_combat_default_stage3.ash b/RELEASE/scripts/autoscend/combat/auto_combat_default_stage3.ash index cc704d122..e2ec3d583 100644 --- a/RELEASE/scripts/autoscend/combat/auto_combat_default_stage3.ash +++ b/RELEASE/scripts/autoscend/combat/auto_combat_default_stage3.ash @@ -177,7 +177,14 @@ string auto_combatDefaultStage3(int round, monster enemy, string text) { boolean polarVortexAvailable = canUse($skill[Fire Extinguisher: Polar Vortex], false) && auto_fireExtinguisherCharges() > 10; boolean mildEvilAvailable = canUse($skill[Perpetrate Mild Evil],false) && get_property("_mildEvilPerpetrated").to_int() < 3; - // mild evil only can pick pocket. Use it before fire extinguisher + boolean swoopAvailable = canUse($skill[Swoop like a Bat], true) && get_property("_batWingsSwoopUsed").to_int() < 11; + + // mild evil and swoop can only pick pocket. Use them before fire extinguisher + if(swoopAvailable) + { + handleTracker(enemy, $skill[Swoop like a Bat], "auto_otherstuff"); + return useSkill($skill[Swoop like a Bat]); + } if(mildEvilAvailable) { handleTracker(enemy, $skill[Perpetrate Mild Evil], "auto_otherstuff"); @@ -349,7 +356,7 @@ string auto_combatDefaultStage3(int round, monster enemy, string text) } } - if(my_location() == $location[The Smut Orc Logging Camp] && canSurvive(1.0) && get_property("chasmBridgeProgress").to_int() < 30) + if(my_location() == $location[The Smut Orc Logging Camp] && canSurvive(1.0) && get_property("chasmBridgeProgress").to_int() < bridgeGoal()) { boolean coldMortarShell = canUse($skill[Stuffed Mortar Shell]) && have_effect($effect[Spirit of Peppermint]) != 0; skill coldSkillToUse; diff --git a/RELEASE/scripts/autoscend/combat/auto_combat_util.ash b/RELEASE/scripts/autoscend/combat/auto_combat_util.ash index 1240df5f9..797409198 100644 --- a/RELEASE/scripts/autoscend/combat/auto_combat_util.ash +++ b/RELEASE/scripts/autoscend/combat/auto_combat_util.ash @@ -933,6 +933,7 @@ boolean wantToForceDrop(monster enemy) //skills that can be used on any combat round, repeatedly until an item is stolen //take into account if a yellow ray has been used. Must have been one that doesn't insta-kill boolean mildEvilAvailable = canUse($skill[Perpetrate Mild Evil],false) && get_property("_mildEvilPerpetrated").to_int() < 3; + boolean swoopAvailable = canUse($skill[Swoop like a Bat], true) && get_property("_batWingsSwoopUsed").to_int() < 11; boolean forceDrop = false; @@ -956,7 +957,7 @@ boolean wantToForceDrop(monster enemy) // polar vortex/mild evil is more likely to pocket an item the higher the drop rate. Unlike XO which has equal chance for all drops // reserve extinguisher 30 charge for filth worms - if(auto_fireExtinguisherCharges() > 20 || mildEvilAvailable) + if(auto_fireExtinguisherCharges() > 20 || mildEvilAvailable || swoopAvailable) { int dropsFromYR = 0; if(combat_status_check("yellowray")) diff --git a/RELEASE/scripts/autoscend/iotms/mr2014.ash b/RELEASE/scripts/autoscend/iotms/mr2014.ash index bb61679a2..aabacea26 100644 --- a/RELEASE/scripts/autoscend/iotms/mr2014.ash +++ b/RELEASE/scripts/autoscend/iotms/mr2014.ash @@ -69,12 +69,12 @@ boolean considerGrimstoneGolem(boolean bjornCrown) return false; } - if((get_property("desertExploration").to_int() >= 70) && (get_property("chasmBridgeProgress").to_int() >= 29)) + if((get_property("desertExploration").to_int() >= 70) && (get_property("chasmBridgeProgress").to_int() >= (bridgeGoal() - 1))) { return false; } - if(get_property("chasmBridgeProgress").to_int() >= 29) + if(get_property("chasmBridgeProgress").to_int() >= (bridgeGoal() - 1)) { if(!get_property("auto_grimstoneOrnateDowsingRod").to_boolean()) { @@ -407,7 +407,7 @@ boolean LX_ornateDowsingRod() boolean fancyOilPainting() { - if(get_property("chasmBridgeProgress").to_int() >= 30) + if(get_property("chasmBridgeProgress").to_int() >= bridgeGoal()) { return false; } diff --git a/RELEASE/scripts/autoscend/iotms/mr2021.ash b/RELEASE/scripts/autoscend/iotms/mr2021.ash index 9847f0e03..e8c9f9782 100644 --- a/RELEASE/scripts/autoscend/iotms/mr2021.ash +++ b/RELEASE/scripts/autoscend/iotms/mr2021.ash @@ -809,7 +809,7 @@ string auto_FireExtinguisherCombatString(location place) return "skill " + $skill[Fire Extinguisher: Zone Specific]; } - if(place == $location[The Smut Orc Logging Camp] && !get_property("fireExtinguisherChasmUsed").to_boolean() && get_property("chasmBridgeProgress").to_int() < 30 && !auto_hasAutumnaton()) + if(place == $location[The Smut Orc Logging Camp] && !get_property("fireExtinguisherChasmUsed").to_boolean() && get_property("chasmBridgeProgress").to_int() < bridgeGoal() && !auto_hasAutumnaton()) { return "skill " + $skill[Fire Extinguisher: Zone Specific]; } diff --git a/RELEASE/scripts/autoscend/iotms/mr2024.ash b/RELEASE/scripts/autoscend/iotms/mr2024.ash index faa445845..c1392eea4 100644 --- a/RELEASE/scripts/autoscend/iotms/mr2024.ash +++ b/RELEASE/scripts/autoscend/iotms/mr2024.ash @@ -358,3 +358,26 @@ boolean auto_haveRoman() } return false; } + +boolean auto_haveBatWings() +{ + if(auto_is_valid($item[Bat Wings]) && possessEquipment($item[Bat Wings])) + { + return true; + } + return false; +} + +boolean auto_canLeapBridge() +{ + // bat wings allow for us to leap bridge at 5/6 progress (25 of 30) + if(!auto_haveBatWings()) + { + return false; + } + if(fastenerCount() < 25 || lumberCount() < 25) + { + return false; + } + return true; +} diff --git a/RELEASE/scripts/autoscend/paths/license_to_adventure.ash b/RELEASE/scripts/autoscend/paths/license_to_adventure.ash index 63446309c..1f6603d38 100644 --- a/RELEASE/scripts/autoscend/paths/license_to_adventure.ash +++ b/RELEASE/scripts/autoscend/paths/license_to_adventure.ash @@ -93,7 +93,7 @@ boolean bond_buySkills() points -= 1; } } - else if(!get_property("bondBridge").to_boolean() && (get_property("chasmBridgeProgress").to_int() < 28)) + else if(!get_property("bondBridge").to_boolean() && (get_property("chasmBridgeProgress").to_int() < (bridgeGoal() - 2))) { if(points >= 3) { diff --git a/RELEASE/scripts/autoscend/paths/low_key_summer.ash b/RELEASE/scripts/autoscend/paths/low_key_summer.ash index 4d58b80e0..20b4c1a41 100644 --- a/RELEASE/scripts/autoscend/paths/low_key_summer.ash +++ b/RELEASE/scripts/autoscend/paths/low_key_summer.ash @@ -308,7 +308,7 @@ boolean LX_findHelpfulLowKey() } // cold spell damage before orcs. Ice Key needs The Icy Peak access - if (internalQuestStatus("questL09Topping") == 0 && get_property("chasmBridgeProgress").to_int() < 30) + if (internalQuestStatus("questL09Topping") == 0 && get_property("chasmBridgeProgress").to_int() < bridgeGoal()) { if (lowkey_keyAdv($item[Ice Key])) { return true; } } diff --git a/RELEASE/scripts/autoscend/paths/you_robot.ash b/RELEASE/scripts/autoscend/paths/you_robot.ash index 279fd3424..fa9d83c48 100644 --- a/RELEASE/scripts/autoscend/paths/you_robot.ash +++ b/RELEASE/scripts/autoscend/paths/you_robot.ash @@ -1323,7 +1323,7 @@ void robot_directive() boolean desert_ready = internalQuestStatus("questL11Desert") == 0; boolean desert_done = internalQuestStatus("questL11Desert") > 0; boolean chasm_offhand_slot_needed = possessEquipment($item[Loadstone]) || canPull($item[Loadstone]); - boolean chasm_ready = internalQuestStatus("questL09Topping") == 0 && get_property("chasmBridgeProgress").to_int() < 30 && !shenShouldDelayZone($location[The Smut Orc Logging Camp]); + boolean chasm_ready = internalQuestStatus("questL09Topping") == 0 && get_property("chasmBridgeProgress").to_int() < bridgeGoal() && !shenShouldDelayZone($location[The Smut Orc Logging Camp]); boolean chasm_done = internalQuestStatus("questL09Topping") > 0; if(directive == "chasm" && chasm_done) diff --git a/RELEASE/scripts/autoscend/quests/level_04.ash b/RELEASE/scripts/autoscend/quests/level_04.ash index b5cf0d5e0..f0c1489b3 100644 --- a/RELEASE/scripts/autoscend/quests/level_04.ash +++ b/RELEASE/scripts/autoscend/quests/level_04.ash @@ -20,7 +20,7 @@ boolean L4_batCave() auto_log_info("In the bat hole!", "blue"); - if (possessEquipment($item[bat wings]) && auto_can_equip($item[bat wings])) + if (auto_haveBatWings()) { if (!get_property("batWingsBatHoleEntrance").to_boolean() && zone_available($location[The Bat Hole Entrance])) { diff --git a/RELEASE/scripts/autoscend/quests/level_09.ash b/RELEASE/scripts/autoscend/quests/level_09.ash index 2e68d4bef..801b69dfe 100644 --- a/RELEASE/scripts/autoscend/quests/level_09.ash +++ b/RELEASE/scripts/autoscend/quests/level_09.ash @@ -120,6 +120,11 @@ void L9_chasmMaximizeForNoncombat() } } +int bridgeGoal() +{ + return (!auto_haveBatWings() ? 30 : 25); +} + int fastenerCount() { int base = get_property("chasmBridgeProgress").to_int(); @@ -144,7 +149,7 @@ int lumberCount() boolean finishBuildingSmutOrcBridge() { - if (internalQuestStatus("questL09Topping") != 0 || get_property("chasmBridgeProgress").to_int() >= 30) + if (internalQuestStatus("questL09Topping") != 0 || get_property("chasmBridgeProgress").to_int() >= bridgeGoal()) { return false; } @@ -160,6 +165,13 @@ boolean finishBuildingSmutOrcBridge() visit_url("place.php?whichplace=orc_chasm&action=bridge"+(to_int(get_property("chasmBridgeProgress")))); // finish chasm if we can + if(auto_canLeapBridge()) + { + autoForceEquip($item[bat wings]); + visit_url("place.php?whichplace=orc_chasm&action=bridge_jump"); + visit_url("place.php?whichplace=highlands&action=highlands_dude"); + return true; + } if(get_property("chasmBridgeProgress").to_int() >= 30) { visit_url("place.php?whichplace=highlands&action=highlands_dude"); @@ -173,7 +185,7 @@ boolean finishBuildingSmutOrcBridge() void prepareForSmutOrcs() { - if(lumberCount() >= 30 && fastenerCount() >= 30) + if(lumberCount() >= bridgeGoal() && fastenerCount() >= bridgeGoal()) { // must be here for shen snake and quest objective is already done // set blech NC and don't bother prepping for the zone @@ -270,11 +282,11 @@ void prepareForSmutOrcs() } } - if(fastenerCount() < 30) + if(fastenerCount() < bridgeGoal()) { autoEquip($item[Loadstone]); } - if(lumberCount() < 30) + if(lumberCount() < bridgeGoal()) { autoEquip($item[Logging Hatchet]); } @@ -282,7 +294,7 @@ void prepareForSmutOrcs() return; } - int need = (30 - get_property("chasmBridgeProgress").to_int()) / 5; + int need = (bridgeGoal() - get_property("chasmBridgeProgress").to_int()) / 5; if(need > 0) { while((need > 0) && (item_amount($item[Snow Berries]) >= 2)) @@ -293,13 +305,13 @@ void prepareForSmutOrcs() } } - if (get_property("chasmBridgeProgress").to_int() < 30) + if (get_property("chasmBridgeProgress").to_int() < bridgeGoal()) { - if(fastenerCount() < 30) + if(fastenerCount() < bridgeGoal()) { autoEquip($item[Loadstone]); } - if(lumberCount() < 30) + if(lumberCount() < bridgeGoal()) { autoEquip($item[Logging Hatchet]); } @@ -310,7 +322,7 @@ void prepareForSmutOrcs() boolean L9_chasmBuild() { - if (internalQuestStatus("questL09Topping") != 0 || get_property("chasmBridgeProgress").to_int() >= 30) + if (internalQuestStatus("questL09Topping") != 0 || get_property("chasmBridgeProgress").to_int() >= bridgeGoal()) { return false; } @@ -330,7 +342,7 @@ boolean L9_chasmBuild() return false; //delay for You, Robot path } if(auto_hasAutumnaton() && !isAboutToPowerlevel() && $location[The Smut Orc Logging Camp].turns_spent > 0 - && (fastenerCount() < 30 || lumberCount() < 30)) + && (fastenerCount() < bridgeGoal() || lumberCount() < bridgeGoal())) { // delay zone to allow autumnaton to grab bridge parts // unless we have ran out of other stuff to do @@ -895,7 +907,7 @@ boolean L9_oilPeak() { return false; } - else if(item_amount($item[Bubblin' Crude]) >= 12) + else if(item_amount($item[Bubblin\' Crude]) >= 12) { if(in_glover()) { @@ -916,7 +928,7 @@ boolean L9_oilPeak() } } } - else if(auto_is_valid($item[Bubblin' Crude]) && creatable_amount($item[Jar Of Oil]) > 0) + else if(auto_is_valid($item[Bubblin\' Crude]) && creatable_amount($item[Jar Of Oil]) > 0) { create(1, $item[Jar Of Oil]); } @@ -989,7 +1001,7 @@ boolean L9_highLandlord() { return false; } - if(get_property("chasmBridgeProgress").to_int() < 30) + if(get_property("chasmBridgeProgress").to_int() < bridgeGoal()) { return false; } From 739be92cc9a55693ef2835db8a3e8653fea7dc1e Mon Sep 17 00:00:00 2001 From: Chris Midgley Date: Thu, 17 Oct 2024 17:49:37 +0100 Subject: [PATCH 07/16] feat: never stun tool gremlins, and don't stasis them either (#1512) * feat: never stun tool gremlins, and don't stasis them either * feat: more seriously avoid avoiding attacks --- RELEASE/scripts/autoscend.ash | 2 +- .../autoscend/combat/auto_combat_quest.ash | 40 ++----------------- RELEASE/scripts/autoscend/quests/level_12.ash | 3 +- 3 files changed, 6 insertions(+), 39 deletions(-) diff --git a/RELEASE/scripts/autoscend.ash b/RELEASE/scripts/autoscend.ash index 611758cfc..a0426cd3a 100644 --- a/RELEASE/scripts/autoscend.ash +++ b/RELEASE/scripts/autoscend.ash @@ -1,4 +1,4 @@ -since r28084; // feat: make bat wings rest always available +since r28092; // feat: add 'avoid attack' modifier /*** autoscend_header.ash must be first import All non-accessory scripts must be imported here diff --git a/RELEASE/scripts/autoscend/combat/auto_combat_quest.ash b/RELEASE/scripts/autoscend/combat/auto_combat_quest.ash index 3a992050a..af1669683 100644 --- a/RELEASE/scripts/autoscend/combat/auto_combat_quest.ash +++ b/RELEASE/scripts/autoscend/combat/auto_combat_quest.ash @@ -57,36 +57,11 @@ string auto_JunkyardCombatHandler(int round, monster enemy, string text) return useItem($item[Molybdenum Magnet]); } - if (canUse($skill[Curse Of Weaksauce])) - { - return useSkill($skill[Curse Of Weaksauce]); - } - - if (canUse($skill[Curse Of The Marshmallow])) - { - return useSkill($skill[Curse Of The Marshmallow]); - } - if (canUse($skill[Summon Love Scarabs])) { return useSkill($skill[Summon Love Scarabs]); } - if (canUse($skill[Summon Love Gnats])) - { - return useSkill($skill[Summon Love Gnats]); - } - - if(canUse($skill[Beanscreen])) - { - return useSkill($skill[Beanscreen]); - } - - if(canUse($skill[Bad Medicine])) - { - return useSkill($skill[Bad Medicine]); - } - if(canUse($skill[Good Medicine]) && canSurvive(2.1)) { return useSkill($skill[Good Medicine]); @@ -142,20 +117,11 @@ string auto_JunkyardCombatHandler(int round, monster enemy, string text) } } - if (get_property("auto_gremlinMoly").to_boolean() && !canSurvive(20) && !stunned && !staggeringFlyer) //don't flyer tool gremlins if it's dangerous to survive them for long + if (get_property("auto_gremlinMoly").to_boolean()) //don't ever stun tool gremlins { - if(monster_attack() > ( my_buffedstat($stat[moxie]) + 10) && !canSurvive(10) && haveUsed($skill[Curse Of Weaksauce])) - { - //if after all deleveling it's still too strong to safely stasis let weaksauce delevel it more in exchange for a few turns - //except if stuck with an attack familiar or unforeseen passive damage effects that can kill the gremlin - if(!gremlinTakesDamage && round < 10 && stunner != $skill[none]) - { - combat_status_add("stunned"); - return useSkill(stunner); - } - } + stunner = $skill[none]; } - else if (canUse(flyer) && get_property("flyeredML").to_int() < 10000 && !get_property("auto_ignoreFlyer").to_boolean()) + if (canUse(flyer) && get_property("flyeredML").to_int() < 10000 && !get_property("auto_ignoreFlyer").to_boolean()) { if(!staggeringFlyer && stunner != $skill[none] && !stunned) { diff --git a/RELEASE/scripts/autoscend/quests/level_12.ash b/RELEASE/scripts/autoscend/quests/level_12.ash index 92572057b..a9cf7d648 100644 --- a/RELEASE/scripts/autoscend/quests/level_12.ash +++ b/RELEASE/scripts/autoscend/quests/level_12.ash @@ -1267,7 +1267,8 @@ boolean L12_gremlins() gremlinsFamiliar(); auto_log_info("Doing them gremlins", "blue"); - addToMaximize("20dr,1da 1000max,3hp,-3ml"); + // ideally we want to survive a single attack + addToMaximize("20dr,1da 1000max,-ml,-1000avoid attack"); acquireHP(); if(!bat_wantHowl($location[over where the old tires are])) { From 7999c8e9ac4b92202a95c5bfd4814cf2631e0d4f Mon Sep 17 00:00:00 2001 From: Alium58 Date: Sat, 19 Oct 2024 13:56:20 -0500 Subject: [PATCH 08/16] Add Item Provider (#1331) * created provideItem functions based on init, wip * fleshed out provideItem. Still need to update where it is called * make speculate work for fams and make provideItem validate * use new provideItem function * Typo fix and use squint * improve familiar handling * log familiar benefit * correct hero's field * syntax fix * remove dickstabbing * moved making gear to end of provider * help assessing if working right * change doEquip to doEverything * change doEquip to doEverything * typo * clarify filth worms * syntax fix * improve message * improved debugging * remove debugging code * no frosty for wereprof * add dance of sugar fairy * add glowing hands buff * new function auto_totalEffectWishesAvailable() * comment +item, add more item buff sources, and wishes * syntax fix * was too agressive with using limited resources * only cast august scepter skills if haven't already today * restore next adv location after getting shadow waters * fix shadow waters location properly --------- Co-authored-by: Chris Midgley --- RELEASE/scripts/autoscend/auto_buff.ash | 65 +++- RELEASE/scripts/autoscend/auto_pre_adv.ash | 60 +-- RELEASE/scripts/autoscend/auto_providers.ash | 359 +++++++++++++++++- RELEASE/scripts/autoscend/auto_util.ash | 5 + .../scripts/autoscend/autoscend_header.ash | 7 + RELEASE/scripts/autoscend/quests/level_07.ash | 5 +- RELEASE/scripts/autoscend/quests/level_09.ash | 6 +- RELEASE/scripts/autoscend/quests/level_11.ash | 21 +- RELEASE/scripts/autoscend/quests/level_12.ash | 32 +- RELEASE/scripts/autoscend/quests/optional.ash | 6 +- 10 files changed, 436 insertions(+), 130 deletions(-) diff --git a/RELEASE/scripts/autoscend/auto_buff.ash b/RELEASE/scripts/autoscend/auto_buff.ash index a4496b4f5..7f3b4f9f0 100644 --- a/RELEASE/scripts/autoscend/auto_buff.ash +++ b/RELEASE/scripts/autoscend/auto_buff.ash @@ -183,7 +183,11 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec useSkill = $skill[Astral Shell]; } break; case $effect[Attractive to Fire Ants]: useItem = $item[fire ant pheromones]; break; - case $effect[Aware of Bees]: useSkill = $skill[Aug. 19th: Honey Bee Awareness Day!];break; + case $effect[Aware of Bees]: + if(!get_property("_aug19Cast").to_boolean()) + { + useSkill = $skill[Aug. 19th: Honey Bee Awareness Day!]; + } break; case $effect[Baconstoned]: if(item_amount($item[Vial of Baconstone Juice]) > 0) { @@ -269,7 +273,11 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec case $effect[Clear Ears, Can\'t Lose]: useItem = $item[Ear Candle]; break; case $effect[Cletus\'s Canticle of Celerity]: useSkill = $skill[Cletus\'s Canticle of Celerity];break; case $effect[Cloak of Shadows]: useSkill = $skill[Blood Cloak]; break; - case $effect[Cloud of Mosquitos]: useSkill = $skill[Aug. 20th: Mosquito Day!]; break; + case $effect[Cloud of Mosquitos]: + if(!get_property("_aug20Cast").to_boolean()) + { + useSkill = $skill[Aug. 20th: Mosquito Day!]; + } break; case $effect[Clyde\'s Blessing]: useItem = $item[The Legendary Beat]; break; case $effect[Chalky Hand]: useItem = $item[Handful of Hand Chalk]; break; case $effect[Chocolatesphere]: useSkill = $skill[Chocolatesphere]; break; @@ -380,7 +388,11 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec case $effect[Football Eyes]: useItem = $item[Black Facepaint]; break; case $effect[Fortunate Resolve]: useItem = $item[Resolution: Be Luckier]; break; case $effect[Frenzied, Bloody]: useSkill = $skill[Blood Frenzy]; break; - case $effect[Fresh Breath]: useSkill = $skill[Aug. 6th: Fresh Breath Day!]; break; + case $effect[Fresh Breath]: + if(!get_property("_aug6Cast").to_boolean()) + { + useSkill = $skill[Aug. 6th: Fresh Breath Day!]; + } break; case $effect[Fresh Scent]: useItem = $item[deodorant]; break; case $effect[Frigidalmatian]: useSkill = $skill[Frigidalmatian]; break; case $effect[Frog in Your Throat]: useItem = $item[Frogade]; break; @@ -399,6 +411,7 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec } break; case $effect[The Glistening]: useItem = $item[Vial of the Glistening]; break; case $effect[Glittering Eyelashes]: useItem = $item[Glittery Mascara]; break; + case $effect[Glowing Hands]: useItem = $item[emergency glowstick]; break; case $effect[Go Get \'Em\, Tiger!]: useItem = $item[Ben-gal™ Balm]; break; case $effect[Good Things Are Coming, You Can Smell It]: useItem = $item[Smoldering Clover™ candle];break; case $effect[Got Milk]: useItem = $item[Milk of Magnesium]; break; @@ -422,7 +435,11 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec case $effect[Hardened Sweatshirt]: useSkill = $skill[Magic Sweat]; break; case $effect[Hardly Poisoned At All]: useSkill = $skill[Disco Nap]; break; case $effect[Healthy Blue Glow]: useItem = $item[gold star]; break; - case $effect[Hear Me Roar]: useSkill = $skill[Aug. 10th: World Lion Day!]; break; + case $effect[Hear Me Roar]: + if(!get_property("_aug10Cast").to_boolean()) + { + useSkill = $skill[Aug. 10th: World Lion Day!]; + } break; case $effect[Heightened Senses]: useItem = $item[airborne mutagen]; break; case $effect[Heart of Green]: useItem = $item[green candy heart]; break; case $effect[Heart of Lavender]: useItem = $item[lavender candy heart]; break; @@ -453,7 +470,11 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec case $effect[Inigo\'s Incantation of Inspiration]:useSkill = $skill[Inigo\'s Incantation of Inspiration];break; case $effect[Incredibly Healthy]: useItem = $item[mini kiwi illicit antibiotic]; break; case $effect[Incredibly Hulking]: useItem = $item[Ferrigno\'s Elixir of Power]; break; - case $effect[Incredibly Well Lit]: useSkill = $skill[Aug. 7th: Lighthouse Day!]; break; + case $effect[Incredibly Well Lit]: + if(!get_property("_aug7Cast").to_boolean()) + { + useSkill = $skill[Aug. 7th: Lighthouse Day!]; + } break; case $effect[Industrial Strength Starch]: useItem = $item[Industrial Strength Starch]; break; case $effect[Ink Cloud]: useSkill = $skill[Ink Gland]; break; case $effect[Inked Well]: useSkill = $skill[Squid Glands]; break; @@ -486,7 +507,11 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec case $effect[Living Fast]: useSkill = $skill[Live Fast]; break; case $effect[Locks Like the Raven]: useItem = $item[Black No. 2]; break; case $effect[Loded]: useItem = $item[lodestone]; break; - case $effect[Lost Stomach]: useSkill = $skill[Aug. 16th: Roller Coaster Day!];break; + case $effect[Lost Stomach]: + if(!get_property("_aug16Cast").to_boolean()) + { + useSkill = $skill[Aug. 16th: Roller Coaster Day!]; + } break; case $effect[Loyal as a Rock]: useItem = $item[lump of loyal latite]; break; case $effect[Loyal Tea]: useItem = $item[cuppa Loyal Tea]; break; case $effect[Lucky Struck]: useItem = $item[Lucky Strikes Holo-Record]; break; @@ -542,7 +567,11 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec case $effect[Oiled Skin]: useItem = $item[Skin Oil]; break; case $effect[Oiled-Up]: useItem = $item[Pec Oil]; break; case $effect[Oilsphere]: useSkill = $skill[Oilsphere]; break; - case $effect[Offhand Remarkable]: useSkill = $skill[Aug. 13th: Left\/Off Hander\'s Day!];break; + case $effect[Offhand Remarkable]: + if(!get_property("_aug13Cast").to_boolean()) + { + useSkill = $skill[Aug. 13th: Left\/Off Hander\'s Day!]; + } break; case $effect[OMG WTF]: useItem = $item[Confiscated Cell Phone]; break; case $effect[One Very Clear Eye]: useItem = $item[Cyclops Eyedrops]; break; case $effect[Orange Crusher]: useItem = $item[Pulled Orange Taffy]; break; @@ -672,7 +701,11 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec case $effect[Seeing Colors]: useItem = $item[Funky Dried Mushroom]; break; case $effect[Sepia Tan]: useItem = $item[Old Bronzer]; break; case $effect[Serendipi Tea]: useItem = $item[cuppa Serendipi tea]; break; - case $effect[Serendipity]: useSkill =$skill[Aug. 18th: Serendipity Day!]; break; + case $effect[Serendipity]: + if(!get_property("_aug18Cast").to_boolean()) + { + useSkill = $skill[Aug. 18th: Serendipity Day!]; + } break; case $effect[Seriously Mutated]: useItem = $item[Extra-Potent Gremlin Mutagen]; break; case $effect[Shadow Waters]: if(item_amount($item[Rufus\'s shadow lodestone]) > 0) @@ -682,9 +715,13 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec return true; } // lodestene will be consumed for a free NC to get this buff - set_property("auto_disableAdventureHandling", true); - autoAdv(auto_availableBrickRift()); - set_property("auto_disableAdventureHandling", false); + // save and restore our location as shadow rights has a large item penalty + // don't want it unless actually going to a shadow rift + location savedLoc = my_location(); + set_property("auto_disableAdventureHandling", true); + autoAdv(auto_availableBrickRift()); + set_property("auto_disableAdventureHandling", false); + set_location(savedLoc); } break; case $effect[Shells of the Damned]: useItem = $item[cyan seashell]; break; @@ -746,7 +783,11 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec { useSkill = $skill[Spiky Shell]; } break; - case $effect[Spirit of the Mountains]: useSkill = $skill[Aug. 1st: Mountain Climbing Day!];break; + case $effect[Spirit of the Mountains]: + if(!get_property("_aug1Cast").to_boolean()) + { + useSkill = $skill[Aug. 1st: Mountain Climbing Day!]; + } break; case $effect[Spiritually Awake]: useItem = $item[Holy Spring Water]; break; case $effect[Spiritually Aware]: useItem = $item[Spirit Beer]; break; case $effect[Spiritually Awash]: useItem = $item[Sacramental Wine]; break; diff --git a/RELEASE/scripts/autoscend/auto_pre_adv.ash b/RELEASE/scripts/autoscend/auto_pre_adv.ash index 0e89bf18b..d6dc47f71 100644 --- a/RELEASE/scripts/autoscend/auto_pre_adv.ash +++ b/RELEASE/scripts/autoscend/auto_pre_adv.ash @@ -85,6 +85,7 @@ void print_footer() } } auto_log_info(next_line, "blue"); + } void auto_ghost_prep(location place) @@ -274,8 +275,7 @@ boolean auto_pre_adventure() } if(place == $location[Hero\'s Field]) { - buffMaintain($effect[Fat Leon\'s Phat Loot Lyric], 30, 1, 1); - buffMaintain($effect[Singer\'s Faithful Ocelot], 30, 1, 1); + provideItem(400, $location[Hero\'s Field], true); addToMaximize("200item 500max"); } @@ -674,61 +674,7 @@ boolean auto_pre_adventure() generic_t itemNeed = zone_needItem(place); if(mayNeedItem && itemNeed._boolean) { - addToMaximize("50item " + (ceil(itemNeed._float) + 100.0) + "max"); // maximizer treats item drop as 100 higher than it actually is for some reason. - simMaximize(); - float itemDrop = simValue("Item Drop"); - if(itemDrop < itemNeed._float) - { - if (buffMaintain($effect[Fat Leon\'s Phat Loot Lyric], 20, 1, 10)) - { - itemDrop += 20.0; - } - if (buffMaintain($effect[Singer\'s Faithful Ocelot], 35, 1, 10)) - { - itemDrop += 10.0; - } - } - if(itemDrop < itemNeed._float && !haveAsdonBuff()) - { - asdonAutoFeed(37); - if(asdonBuff($effect[Driving Observantly])) - { - itemDrop += 50.0; - } - } - if(itemDrop < itemNeed._float) - { - //if general item modifier isn't enough check specific item drop bonus - generic_t itemFoodNeed = zone_needItemFood(place); - generic_t itemBoozeNeed = zone_needItemBooze(place); - float itemDropFood = itemDrop + simValue("Food Drop"); - float itemDropBooze = itemDrop + simValue("Booze Drop"); - if(itemFoodNeed._boolean && itemDropFood < itemFoodNeed._float) - { - auto_log_debug("Trying food drop supplements"); - //max at start of an expression with item and food drop is ineffective in combining them, have to let the maximizer try to add on top - addToMaximize("49food drop " + ceil(itemFoodNeed._float) + "max"); - simMaximize(); - itemDropFood = simValue("Item Drop") + simValue("Food Drop"); - } - if(itemBoozeNeed._boolean && itemDropBooze < itemBoozeNeed._float) - { - auto_log_debug("Trying booze drop supplements"); - addToMaximize("49booze drop " + ceil(itemBoozeNeed._float) + "max"); - simMaximize(); - itemDropBooze = simValue("Item Drop") + simValue("Booze Drop"); - //no zone item yet needs both food and booze, bottle of Chateau de Vinegar exception is a cooking ingredient but doesn't use food drop bonus - } - if((itemFoodNeed._boolean && itemDropFood >= itemFoodNeed._float) || - (itemBoozeNeed._boolean && itemDropBooze >= itemBoozeNeed._float)) - { - //the needed item was Food/Booze and need has been met with specific bonus - } - else - { - auto_log_debug("We can't cap this drop bear!", "purple"); - } - } + provideItem(ceil(itemNeed._float),place,false); } diff --git a/RELEASE/scripts/autoscend/auto_providers.ash b/RELEASE/scripts/autoscend/auto_providers.ash index 53b34a2a5..4c3f2c0d1 100644 --- a/RELEASE/scripts/autoscend/auto_providers.ash +++ b/RELEASE/scripts/autoscend/auto_providers.ash @@ -1252,7 +1252,7 @@ float provideMeat(int amt, location loc, boolean doEverything, boolean speculati if(pass()) return result(); - // don't craft equipment here. See how much +item we can get with gear on hand + // don't craft equipment here. See how much +meat we can get with gear on hand if(doEverything) { string max = "500meat " + (amt + 100) + "max"; @@ -1497,7 +1497,7 @@ float provideMeat(int amt, location loc, boolean doEverything, boolean speculati } if(pass()) return result(); - if(auto_monkeyPawWishesLeft() + auto_wishesAvailable() > 0) + if(auto_totalEffectWishesAvailable() > 0) { boolean success = true; int specwishes = 0; @@ -1523,7 +1523,7 @@ float provideMeat(int amt, location loc, boolean doEverything, boolean speculati if(!speculative) success = auto_wishForEffect(eff); specwishes +=1; - if(specwishes <= auto_monkeyPawWishesLeft() + auto_wishesAvailable()) + if(specwishes <= auto_totalEffectWishesAvailable()) { handleEffect(eff); if(pass()) @@ -1549,11 +1549,362 @@ float provideMeat(int amt, boolean doEverything, boolean speculative) { return provideMeat(amt, my_location(), doEverything, speculative); } + boolean provideMeat(int amt, location loc, boolean doEverything) { return provideMeat(amt, loc, doEverything, false) >= amt; } + boolean provideMeat(int amt, boolean doEverything) { return provideMeat(amt, my_location(), doEverything); -} \ No newline at end of file +} + +float provideItem(int amt, location loc, boolean doEverything, boolean speculative) +{ + //doEverything means use equipment, familiar slot, and limited buffs (ie steely eye squint) + auto_log_info((speculative ? "Checking if we can" : "Trying to") + " provide " + amt + " item, " + (doEverything ? "with" : "without") + " equipment, familiar, and limited buffs", "blue"); + + float alreadyHave = numeric_modifier("Item Drop"); + float need = amt - alreadyHave; + + if(need > 0) + { + auto_log_debug("We currently have " + alreadyHave + ", so we need an extra " + need); + } + else + { + auto_log_debug("We already have enough +item!"); + return alreadyHave; + } + + float delta = 0; + + float result() + { + return numeric_modifier("Item Drop") + delta; + } + + boolean pass() + { + return result() >= amt; + } + + if(pass()) + return result(); + + // don't craft equipment here. See how much +item we can get with gear on hand + if(doEverything) + { + string max = "500item " + (amt + 100) + "max"; + if(speculative) + { + simMaximizeWith(loc, max); + } + else + { + addToMaximize(max); + simMaximize(loc); + } + delta = simValue("Item Drop") - numeric_modifier("Item Drop"); + auto_log_debug("With existing gear we can get to " + result()); + + if(pass()) + return result(); + } + + //see how much familiar will help + if(doEverything && canChangeFamiliar()) + { + if(!speculative) + { + handleFamiliar("item"); + } + // fam isn't equipped immediatly even if we aren't speculating + // so add bonus from fam regardless of speculation + familiar target = lookupFamiliarDatafile("item"); + if(target != $familiar[none] && target != my_familiar()) + { + int famWeight = familiar_weight(target) + weight_adjustment(); + delta += numeric_modifier(target, "Item Drop",famWeight,$item[none]); + auto_log_debug("With using familiar: " + target + " we can get to " + result()); + } + else + { + auto_log_debug("Already have desired familar, " + target + ", active."); + } + + if(pass()) + return result(); + } + + void handleEffect(effect eff) + { + if(speculative) + { + delta += numeric_modifier(eff, "Item Drop"); + } + auto_log_debug("We " + (speculative ? "can gain" : "just gained") + " " + eff.to_string() + ", now we have " + result()); + } + + boolean tryEffects(boolean [effect] effects) + { + foreach eff in effects + { + if(buffMaintain(eff, 0, 1, 1, speculative)) + handleEffect(eff); + if(pass()) + return true; + } + return false; + } + + if(in_heavyrains()) + { + buffMaintain($effect[Fishy Whiskers]); // HR only + } + + // unlimited skills + if(tryEffects($effects[ + Fat Leon\'s Phat Loot Lyric, //20% item + Singer\'s Faithful Ocelot //10% item + ])) + return result(); + + if(canAsdonBuff($effect[Driving Observantly])) + { + //50% meat, 50% item, 50% booze drops + if(!speculative) + asdonBuff($effect[Driving Observantly]); + handleEffect($effect[Driving Observantly]); + } + if(pass()) + return result(); + + if(!bat_wantHowl(loc) && bat_formBats(speculative)) + { + //150% item, 150% init + handleEffect($effect[Bats Form]); + } + if(pass()) + return result(); + + if(auto_birdModifier("Item Drop") > 0) + { + //Can be 10/20/30/40/50% meat 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 + if(tryEffects($effects[Blessing of Your Favorite Bird])) + return result(); + } + + // items + if(tryEffects($effects[ + Unusual Perspective, //50% item + Five Sticky Fingers, //50% item + Wet and Greedy, //25% item + Serendipi Tea, //25% item + Glowing Hands, //25% item + Eagle Eyes, //20% item + Juiced and Jacked, //20% item + The Grass... \ Is Blue..., //40% meat, 20% item + Joyful Resolve, //15% item + Fortunate Resolve, //10% item + Human-Human Hybrid, //10% item + Heart of Lavender, //10% item + ])) + return result(); + + if(!in_wereprof()) + { + //wereprof doesn't like +ML effects outside of Werewolf + if(tryEffects($effects[Frosty])) //200% meat, 100% item, 100% init, 25 ML + return result(); + } + + if((auto_is_valid($item[possessed sugar cube]) && item_amount($item[possessed sugar cube]) > 0) && (have_effect($effect[Dance of the Sugar Fairy]) == 0)) + { + if(!speculative) + cli_execute("make sugar fairy"); + handleEffect($effect[Dance of the Sugar Fairy]); //25% item + if(pass()) + return result(); + } + + if(auto_sourceTerminalEnhanceLeft() > 0 && have_effect($effect[items.enh]) == 0 && auto_is_valid($effect[items.enh])) + { + if(!speculative) + auto_sourceTerminalEnhance("items"); //30% item + handleEffect($effect[items.enh]); + if(pass()) + return result(); + } + + //check specific item drop bonus + generic_t itemFoodNeed = zone_needItemFood(loc); + generic_t itemBoozeNeed = zone_needItemBooze(loc); + float itemDropFood = result() + simValue("Food Drop"); + float itemDropBooze = result() + simValue("Booze Drop"); + if(itemFoodNeed._boolean && itemDropFood < itemFoodNeed._float) + { + auto_log_debug("Trying food drop supplements"); + //max at start of an expression with item and food drop is ineffective in combining them, have to let the maximizer try to add on top + addToMaximize("49food drop " + ceil(itemFoodNeed._float) + "max"); + simMaximize(); + itemDropFood = simValue("Item Drop") + simValue("Food Drop"); + } + if(itemBoozeNeed._boolean && itemDropBooze < itemBoozeNeed._float) + { + auto_log_debug("Trying booze drop supplements"); + addToMaximize("49booze drop " + ceil(itemBoozeNeed._float) + "max"); + simMaximize(); + itemDropBooze = simValue("Item Drop") + simValue("Booze Drop"); + //no zone item yet needs both food and booze, bottle of Chateau de Vinegar exception is a cooking ingredient but doesn't use food drop bonus + } + if(pass()) + return result(); + + // craft equipment, even limited use, here + if(doEverything) + { + //craft IOTM derivative that gives high item bonus + if((!possessEquipment($item[A Light That Never Goes Out])) && (item_amount($item[Lump of Brituminous Coal]) > 0) && auto_is_valid($item[A Light That Never Goes Out])) + { + auto_buyUpTo(1, $item[third-hand lantern]); + autoCraft("smith", 1, $item[Lump of Brituminous Coal], $item[third-hand lantern]); + } + + if(auto_is_valid($item[Broken Champagne Bottle]) && get_property("garbageChampagneCharge").to_int() > 0) { + //fold and remove maximizer block on using IOTM with 9 charges a day that doubles item drop chance + januaryToteAcquire($item[Broken Champagne Bottle]); + } + + string max = "500item " + (amt + 100) + "max"; + if(speculative) + { + simMaximizeWith(loc, max); + } + else + { + addToMaximize(max); + simMaximize(loc); + } + delta = simValue("Item Drop") - numeric_modifier("Item Drop"); + auto_log_debug("With existing and crafted gear we can get to " + result()); + + if(pass()) + return result(); + } + + if(doEverything && amt >= 400) + { + if(!get_property("_steelyEyedSquintUsed").to_boolean() && buffMaintain($effect[Steely-Eyed Squint], 0, 1, 1, speculative)) + { + if(speculative) + delta += delta + numeric_modifier("Item Drop"); + auto_log_debug("With Steely Eyed Squint we " + (speculative ? "can get to" : "now have") + " " + result()); + } + if(pass()) + return result(); + } + + // Use limited resources + if(doEverything) + { + if(tryEffects($effects[ + 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 + ])) + if(pass()) + return result(); + if(zataraAvailable() && (0 == have_effect($effect[There\'s no N in Love])) & auto_is_valid($effect[There\'s no N in Love])) + { + if(!speculative) + { + zataraSeaside("item"); + } + handleEffect($effect[There\'s no N in Love]); //50% booze/food/item + if(pass()) + return result(); + } + if((get_property("sidequestArenaCompleted") == "hippy") && !get_property("concertVisited").to_boolean() && (have_effect($effect[Dilated Pupils]) == 0)) + { + if(is_professor()) + { + //Need to manually equip because professor + if(!have_equipped($item[reinforced beaded headband])) equip($item[reinforced beaded headband]); + if(!have_equipped($item[bullet-proof corduroys])) equip($item[bullet-proof corduroys]); + if(!have_equipped($item[round purple sunglasses])) equip($item[round purple sunglasses]); + } + else + { + outfit("War Hippy Fatigues"); + } + if(!speculative) + { + cli_execute("concert 2"); //20% item + } + handleEffect($effect[Dilated Pupils]); //20% item + if(pass()) + return result(); + } + if(pass()) + return result(); + if(auto_totalEffectWishesAvailable() > 0) + { + boolean success = true; + int specwishes = 0; + foreach eff in $effects[Frosty, //200% meat, 100% item, 25 ML, 100% init + One Very Clear Eye, //100% item + Let's Go Shopping!, //150% meat, 75% item, -300% myst + Always Be Collecting, //100% meat, 50% item + Incredibly Well Lit, //100% meat, 50% item + ]{ + if(eff == $effect[Frosty] && in_wereprof()) continue; //skip frosty in wereprof + if(have_effect(eff) == 0) + { + if(!speculative) + success = auto_wishForEffect(eff); + specwishes +=1; + if(specwishes <= auto_totalEffectWishesAvailable()) + { + handleEffect(eff); + if(pass()) + return result(); + } + else + { + success = false; + } + } + if(!success) break; + } + } + auto_log_debug("With limited buffs we can get to " + result()); + if(pass()) + return result(); + } + return result(); +} + +float provideItem(int amt, boolean doEverything, boolean speculative) +{ + return provideItem(amt, my_location(), doEverything, speculative); +} + +boolean provideItem(int amt, location loc, boolean doEverything) +{ + return provideItem(amt, loc, doEverything, false) >= amt; +} + +boolean provideItem(int amt, boolean doEverything) +{ + return provideItem(amt, my_location(), doEverything); +} diff --git a/RELEASE/scripts/autoscend/auto_util.ash b/RELEASE/scripts/autoscend/auto_util.ash index ddb3eb410..336ea88e6 100644 --- a/RELEASE/scripts/autoscend/auto_util.ash +++ b/RELEASE/scripts/autoscend/auto_util.ash @@ -4497,6 +4497,11 @@ boolean auto_wishForEffect(effect wish) return false; } +int auto_totalEffectWishesAvailable() +{ + return auto_monkeyPawWishesLeft() + auto_wishesAvailable(); +} + item wrap_item(item it) // convert an item into another item, used for replicas in LoL { if (in_lol()) diff --git a/RELEASE/scripts/autoscend/autoscend_header.ash b/RELEASE/scripts/autoscend/autoscend_header.ash index 45d1f627d..93f5c4194 100644 --- a/RELEASE/scripts/autoscend/autoscend_header.ash +++ b/RELEASE/scripts/autoscend/autoscend_header.ash @@ -1597,6 +1597,10 @@ float provideMoxie(int amt, location loc, boolean doEquips, boolean speculative) float provideMoxie(int amt, boolean doEquips, boolean speculative); boolean provideMoxie(int amt, location loc, boolean doEquips); boolean provideMoxie(int amt, boolean doEquips); +float provideItem(int amt, location loc, boolean doEverything, boolean speculative); +float provideItem(int amt, boolean doEverything, boolean speculative); +boolean provideItem(int amt, location loc, boolean doEverything); +boolean provideItem(int amt, boolean doEverything); float provideMeat(int amt, location loc, boolean doEverything, boolean speculative); float provideMeat(int amt, boolean doEverything, boolean speculative); boolean provideMeat(int amt, location loc, boolean doEverything); @@ -1679,6 +1683,8 @@ boolean zone_isAvailable(location loc, boolean unlockIfPossible); boolean zone_isAvailable(location loc); int[location] zone_delayable(); generic_t zone_needItem(location loc); +generic_t zone_needItemBooze(location loc); +generic_t zone_needItemFood(location loc); generic_t zone_combatMod(location loc); generic_t zone_delay(location loc); boolean zone_available(location loc); @@ -1871,6 +1877,7 @@ int poolSkillPracticeGains(); boolean hasUsefulShirt(); int meatReserve(); boolean auto_wishForEffect(effect wish); +int auto_totalEffectWishesAvailable(); item wrap_item(item it); boolean auto_burnMP(int mpToBurn); boolean can_read_skillbook(item it); diff --git a/RELEASE/scripts/autoscend/quests/level_07.ash b/RELEASE/scripts/autoscend/quests/level_07.ash index d7dc3caee..106ef0b19 100644 --- a/RELEASE/scripts/autoscend/quests/level_07.ash +++ b/RELEASE/scripts/autoscend/quests/level_07.ash @@ -226,9 +226,8 @@ boolean L7_crypt() if(get_property("cyrptNookEvilness").to_int() > (14 + evilBonus) && auto_is_valid($item[Evil Eye])) { - buffMaintain($effect[Joyful Resolve]); - bat_formBats(); - januaryToteAcquire($item[broken champagne bottle]); + //evil eyes have 20% drop rate + provideItem(400,$location[The Defiled Nook],false); } if(get_property("cyrptNookEvilness").to_int() <= 13) diff --git a/RELEASE/scripts/autoscend/quests/level_09.ash b/RELEASE/scripts/autoscend/quests/level_09.ash index 801b69dfe..0cc142d2f 100644 --- a/RELEASE/scripts/autoscend/quests/level_09.ash +++ b/RELEASE/scripts/autoscend/quests/level_09.ash @@ -393,7 +393,8 @@ boolean L9_aBooPeak() if (clueAmt < 3) { - januaryToteAcquire($item[Broken Champagne Bottle]); + // boo clues have 15% drop + provideItem(567, $location[A-Boo Peak], false); } return autoAdv(1, $location[A-Boo Peak]); @@ -675,7 +676,8 @@ boolean L9_aBooPeak() { if ($location[A-Boo Peak].turns_spent < 10) { - januaryToteAcquire($item[Broken Champagne Bottle]); + // boo clues have 15% drop + provideItem(567, $location[A-Boo Peak], false); } autoAdv(1, $location[A-Boo Peak]); diff --git a/RELEASE/scripts/autoscend/quests/level_11.ash b/RELEASE/scripts/autoscend/quests/level_11.ash index c09e1a0dc..7093f80e0 100644 --- a/RELEASE/scripts/autoscend/quests/level_11.ash +++ b/RELEASE/scripts/autoscend/quests/level_11.ash @@ -3301,25 +3301,8 @@ boolean L11_unlockEd() } if(total < 10) { - buffMaintain($effect[Joyful Resolve]); - buffMaintain($effect[One Very Clear Eye]); - buffMaintain($effect[Fishy Whiskers]); - buffMaintain($effect[Human-Fish Hybrid]); - buffMaintain($effect[Human-Human Hybrid]); - buffMaintain($effect[Unusual Perspective]); - if(!bat_wantHowl($location[The Middle Chamber])) - { - bat_formBats(); - } - if((auto_is_valid($item[possessed sugar cube]) && item_amount($item[possessed sugar cube]) > 0) && (have_effect($effect[Dance of the Sugar Fairy]) == 0)) - { - cli_execute("make sugar fairy"); - buffMaintain($effect[Dance of the Sugar Fairy]); - } - if(have_effect($effect[items.enh]) == 0 && auto_is_valid($effect[items.enh])) - { - auto_sourceTerminalEnhance("items"); - } + // tomb ratchets have 20% drop rate + provideItem(400, $location[The Middle Chamber], true); } if(get_property("controlRoomUnlock").to_boolean()) diff --git a/RELEASE/scripts/autoscend/quests/level_12.ash b/RELEASE/scripts/autoscend/quests/level_12.ash index a9cf7d648..ca55f2985 100644 --- a/RELEASE/scripts/autoscend/quests/level_12.ash +++ b/RELEASE/scripts/autoscend/quests/level_12.ash @@ -943,42 +943,16 @@ boolean L12_filthworms() } } - //todo check if provide item can simulate enough not to bother with delaying? - if(delayFilthworms) { auto_log_info("Delaying filthworms because Everything Looks Yellow"); return false; } } - - buffMaintain($effect[Joyful Resolve]); - buffMaintain($effect[Kindly Resolve]); - buffMaintain($effect[Fortunate Resolve]); - buffMaintain($effect[One Very Clear Eye]); - buffMaintain($effect[Human-Fish Hybrid]); - buffMaintain($effect[Human-Human Hybrid]); - buffMaintain($effect[Human-Machine Hybrid]); - buffMaintain($effect[Unusual Perspective]); - buffMaintain($effect[Eagle Eyes]); - buffMaintain($effect[Heart of Lavender]); - buffMaintain($effect[Five Sticky Fingers]); - asdonBuff($effect[Driving Observantly]); - bat_formBats(); - - if(!in_wereprof()) buffMaintain($effect[Frosty]); //wereprof doesn't like +ML effects outside of Werewolf - - //craft IOTM derivative that gives high item bonus - if((!possessEquipment($item[A Light That Never Goes Out])) && (item_amount($item[Lump of Brituminous Coal]) > 0)) - { - auto_buyUpTo(1, $item[third-hand lantern]); - autoCraft("smith", 1, $item[Lump of Brituminous Coal], $item[third-hand lantern]); - } - if(!canChangeToFamiliar($familiar[XO Skeleton]) && catBurglarHeistsLeft() < 1) { - //fold and remove maximizer block on using IOTM with 9 charges a day that doubles item drop chance - januaryToteAcquire($item[Broken Champagne Bottle]); - } + // filth worm glands have 10% drop rate + // getting here means we don't have a yellow ray, not delaying for the yr, and don't have enough +item yet + provideItem(900,$location[The Feeding Chamber], false); if(in_lar()) { diff --git a/RELEASE/scripts/autoscend/quests/optional.ash b/RELEASE/scripts/autoscend/quests/optional.ash index 7348e8d91..d9ce6dd7f 100644 --- a/RELEASE/scripts/autoscend/quests/optional.ash +++ b/RELEASE/scripts/autoscend/quests/optional.ash @@ -198,10 +198,8 @@ boolean LX_steelOrgan() auto_log_info("I am hungry for some steel.", "blue"); } - if(have_effect($effect[items.enh]) == 0 && auto_is_valid($effect[items.enh])) - { - auto_sourceTerminalEnhance("items"); - } + // typically getting steel organ means this is a long run, might as well use all options to get +item as sources refresh each day + provideItem(567, $location[The Laugh Floor], true); if(get_property("questM10Azazel") == "unstarted") { From 497fe6859791aa20e2828ac090469daa595a1b94 Mon Sep 17 00:00:00 2001 From: Alium58 Date: Tue, 22 Oct 2024 06:43:14 -0500 Subject: [PATCH 09/16] Support Sept-Ember Censer (#1516) * initial checkin * record cold res when using mouthwash * wish for more cold res --- RELEASE/scripts/autoscend.ash | 1 + .../scripts/autoscend/autoscend_header.ash | 3 + RELEASE/scripts/autoscend/iotms/mr2024.ash | 69 +++++++++++++++++++ 3 files changed, 73 insertions(+) diff --git a/RELEASE/scripts/autoscend.ash b/RELEASE/scripts/autoscend.ash index a0426cd3a..baeb40656 100644 --- a/RELEASE/scripts/autoscend.ash +++ b/RELEASE/scripts/autoscend.ash @@ -1177,6 +1177,7 @@ boolean dailyEvents() auto_useBlackMonolith(); auto_scepterSkills(); auto_getAprilingBandItems(); + auto_buyFromSeptEmberStore(); return true; } diff --git a/RELEASE/scripts/autoscend/autoscend_header.ash b/RELEASE/scripts/autoscend/autoscend_header.ash index 93f5c4194..f1ff62a85 100644 --- a/RELEASE/scripts/autoscend/autoscend_header.ash +++ b/RELEASE/scripts/autoscend/autoscend_header.ash @@ -571,6 +571,9 @@ boolean auto_MayamClaimAll(); boolean auto_haveRoman(); boolean auto_haveBatWings(); boolean auto_canLeapBridge(); +boolean auto_haveSeptEmberCenser(); +int remainingEmbers(); +void auto_buyFromSeptEmberStore(); ######################################################################################################## //Defined in autoscend/paths/actually_ed_the_undying.ash diff --git a/RELEASE/scripts/autoscend/iotms/mr2024.ash b/RELEASE/scripts/autoscend/iotms/mr2024.ash index c1392eea4..0bbdf7a0c 100644 --- a/RELEASE/scripts/autoscend/iotms/mr2024.ash +++ b/RELEASE/scripts/autoscend/iotms/mr2024.ash @@ -381,3 +381,72 @@ boolean auto_canLeapBridge() } return true; } + +boolean auto_haveSeptEmberCenser() +{ + if(auto_is_valid($item[Sept-Ember Censer]) && available_amount($item[Sept-Ember Censer]) > 0 ) + { + return true; + } + return false; +} + +int remainingEmbers() +{ + if(!auto_haveSeptEmberCenser()) + { + return 0; + } + if(!get_property("_septEmberBalanceChecked").to_boolean()) + { + // go to ember shop to check our balance + use($item[Sept-Ember Censer]); + } + return get_property("availableSeptEmbers").to_int(); +} + +void auto_buyFromSeptEmberStore() +{ + if(remainingEmbers() == 0) + { + return; + } + auto_log_debug("Have " + remainingEmbers() + " embers(s) to buy from Sept-Ember Censer. Let's spend them!"); + // get structural ember if can't cross bridge + item itemConsidering = $item[Structural ember]; + if(remainingEmbers() >= 4 && get_property("chasmBridgeProgress").to_int() < bridgeGoal() && + !get_property("_structuralEmberUsed").to_boolean() && auto_is_valid(itemConsidering)) + { + buy($coinmaster[Sept-Ember Censer], 1, itemConsidering); + use(itemConsidering); + } + // get 1 bembershoot to support mouthwash leveling or general quest help + itemConsidering = $item[bembershoot]; + if(remainingEmbers() >= 1 && !possessEquipment(itemConsidering) && auto_is_valid(itemConsidering)) + { + buy($coinmaster[Sept-Ember Censer], 1, itemConsidering); + } + // mouthwash for leveling + itemConsidering = $item[Mmm-brr! brand mouthwash]; + if(remainingEmbers() >= 2 && (my_level() < 13 || get_property("auto_disregardInstantKarma").to_boolean()) && auto_is_valid(itemConsidering)) + { + // get as much cold res as possible + int [element] resGoal; + resGoal[$element[cold]] = 100; + // get cold res. Use noob cave as generic place holder + auto_wishForEffect($effect[Fever From the Flavor]); + provideResistances(resGoal, $location[noob cave], true); + equipMaximizedGear(); + // buy mouthwash and use it + buy($coinmaster[Sept-Ember Censer], 1, itemConsidering); + auto_log_debug(`Using mouthwash with {numeric_modifier("cold Resistance")} cold resistance`); + use(itemConsidering); + } + // if still have embers, get hat for mp regen + itemConsidering = $item[Hat of remembering]; + if(remainingEmbers() >= 1 && !possessEquipment(itemConsidering) && auto_is_valid(itemConsidering)) + { + buy($coinmaster[Sept-Ember Censer], 1, itemConsidering); + } + // consider throwin' ember for banish or summoning charm for pickpocket in future PR +} From 74aecc01f3c9c2829e731b33d1b5d0192f4f875f Mon Sep 17 00:00:00 2001 From: VuvuzelaVirtuoso <54866751+VuvuzelaVirtuoso@users.noreply.github.com> Date: Tue, 22 Oct 2024 10:54:45 -0700 Subject: [PATCH 10/16] Update auto_consume.ash (#1517) Blacklisting bag of QWOP to prevent it from being consumed as it being consumed can cause combat issues/aborts due to abilities like Thrust-Smacks also being fumbling with the buff given by the food. --- RELEASE/scripts/autoscend/auto_consume.ash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE/scripts/autoscend/auto_consume.ash b/RELEASE/scripts/autoscend/auto_consume.ash index 2468edf86..1f8c64a2a 100644 --- a/RELEASE/scripts/autoscend/auto_consume.ash +++ b/RELEASE/scripts/autoscend/auto_consume.ash @@ -850,7 +850,7 @@ boolean loadConsumables(string _type, ConsumeAction[int] actions) boolean[item] blacklist; boolean[item] craftable_blacklist; - foreach it in $items[Cursed Punch, Unidentified Drink, FantasyRealm turkey leg, FantasyRealm mead, waffle] + foreach it in $items[Cursed Punch, Unidentified Drink, bag of QWOP, FantasyRealm turkey leg, FantasyRealm mead, waffle] { blacklist[it] = true; } From ed03bbdfeedfbbd73bc0d8eb6cc7fe04f3fd6d5e Mon Sep 17 00:00:00 2001 From: Chris Midgley Date: Tue, 22 Oct 2024 18:56:54 +0100 Subject: [PATCH 11/16] fix: clear portscan counter when encountering agent (#1514) --- RELEASE/scripts/autoscend/combat/auto_combat.ash | 1 + 1 file changed, 1 insertion(+) diff --git a/RELEASE/scripts/autoscend/combat/auto_combat.ash b/RELEASE/scripts/autoscend/combat/auto_combat.ash index 5f64319d2..1012e7332 100644 --- a/RELEASE/scripts/autoscend/combat/auto_combat.ash +++ b/RELEASE/scripts/autoscend/combat/auto_combat.ash @@ -41,6 +41,7 @@ void auto_combatInitialize(int round, monster enemy, string text) { case $monster[Government Agent]: set_property("_portscanPending", false); + stop_counter("portscan.edu"); break; case $monster[possessed wine rack]: set_property("auto_wineracksencountered", get_property("auto_wineracksencountered").to_int() + 1); From 9d4b878018dcfd6fae659e5d7bf41312164f5455 Mon Sep 17 00:00:00 2001 From: Chris Midgley Date: Tue, 22 Oct 2024 19:08:24 +0100 Subject: [PATCH 12/16] fix: buffMaintain should return true if it tried to do something (#1513) --- RELEASE/scripts/autoscend/auto_buff.ash | 33 ++++++++++++++++++++----- 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/RELEASE/scripts/autoscend/auto_buff.ash b/RELEASE/scripts/autoscend/auto_buff.ash index 7f3b4f9f0..ce0f9276f 100644 --- a/RELEASE/scripts/autoscend/auto_buff.ash +++ b/RELEASE/scripts/autoscend/auto_buff.ash @@ -153,6 +153,7 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec return false; } + boolean ret = false; switch(buff) { #Jalapeno Saucesphere @@ -168,9 +169,14 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec case $effect[Amazing]: useItem = $item[Pocket Maze]; break; case $effect[Angry]: useSkill = $skill[Anger Glands]; break; case $effect[Angry like the Wolf]: - if(auto_have_familiar($familiar[Grim Brother])) + if(auto_have_familiar($familiar[Grim Brother]) && !get_property("_grimBuff").to_boolean()) { + if(speculative) + { + return true; + } visit_url("choice.php?pwd&whichchoice=835&option=2", true); + ret = true; } break; case $effect[Antibiotic Saucesphere]: useSkill = $skill[Antibiotic Saucesphere]; break; case $effect[Arched Eyebrow of the Archmage]:useSkill = $skill[Arched Eyebrow of the Archmage];break; @@ -423,9 +429,14 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec case $effect[Gristlesphere]: useSkill = $skill[Gristlesphere]; break; case $effect[Gritty]: useItem = $item[pile of gritty sand]; break; case $effect[Grumpy and Ornery]: - if(auto_have_familiar($familiar[Grim Brother])) + if(auto_have_familiar($familiar[Grim Brother]) && !get_property("_grimBuff").to_boolean()) { + if(speculative) + { + return true; + } visit_url("choice.php?pwd&whichchoice=835&option=3", true); + ret = true; } break; case $effect[Gummed Shoes]: useItem = $item[Shoe Gum]; break; case $effect[Gummi-Grin]: useItem = $item[Gummi Turtle]; break; @@ -620,6 +631,7 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec return true; } cli_execute("loathingidol pop"); + ret = true; } break; case $effect[Power\, Man]: useItem = $item[Power-Guy 2000 Holo-Record]; break; case $effect[Power Ballad of the Arrowsmith]:useSkill = $skill[The Power Ballad of the Arrowsmith];break; @@ -674,6 +686,7 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec return true; } cli_execute("loathingidol ballad"); + ret = true; } break; case $effect[A Rose by Any Other Material]: useItem = $item[Squeaky Toy Rose]; break; case $effect[Rosewater Mark]: useItem = $item[Old Rosewater Cream]; break; @@ -714,14 +727,15 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec { return true; } - // lodestene will be consumed for a free NC to get this buff - // save and restore our location as shadow rights has a large item penalty + // lodestone will be consumed for a free NC to get this buff + // save and restore our location as shadow rifts have a 80% item drop penalty // don't want it unless actually going to a shadow rift location savedLoc = my_location(); set_property("auto_disableAdventureHandling", true); autoAdv(auto_availableBrickRift()); set_property("auto_disableAdventureHandling", false); set_location(savedLoc); + ret = true; } break; case $effect[Shells of the Damned]: useItem = $item[cyan seashell]; break; @@ -755,9 +769,14 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec case $effect[Snow Shoes]: useItem = $item[Snow Cleats]; break; case $effect[So You Can Work More...]: useItem = $item[Baggie of powdered sugar]; break; case $effect[Soles of Glass]: - if(auto_have_familiar($familiar[Grim Brother])) + if(auto_have_familiar($familiar[Grim Brother]) && !get_property("_grimBuff").to_boolean()) { + if(speculative) + { + return true; + } visit_url("choice.php?pwd&whichchoice=835&option=1", true); + ret = true; } break; case $effect[Somewhat Poisoned]: useSkill = $skill[Disco Nap]; break; case $effect[Song of Accompaniment]: useSkill = $skill[Song of Accompaniment]; break; @@ -800,6 +819,7 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec return true; } cli_execute("loathingidol rhyme"); + ret = true; } break; case $effect[Spooky Hands]: useItem = $item[Lotion of Spookiness]; break; case $effect[Spooky Weapon]: useItem = $item[Spooky Nuggets]; break; @@ -866,6 +886,7 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec return true; } cli_execute("loathingidol country"); + ret = true; } break; case $effect[Twen Tea]: useItem = $item[cuppa Twen tea]; break; case $effect[Twinkly Weapon]: useItem = $item[Twinkly Nuggets]; break; @@ -1092,7 +1113,7 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec { return buffMaintain(useSkill, buff, mustEquip, mp_min, casts, turns, speculative); } - return false; + return ret; } boolean buffMaintain(effect buff, int mp_min, int casts, int turns) From b6c42c2589a6d19ebefb4d22722b83c4994f2a9f Mon Sep 17 00:00:00 2001 From: Chris Midgley Date: Fri, 25 Oct 2024 05:49:31 +0100 Subject: [PATCH 13/16] feat: add a couple more item sources (#1518) --- RELEASE/scripts/autoscend/auto_providers.ash | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/RELEASE/scripts/autoscend/auto_providers.ash b/RELEASE/scripts/autoscend/auto_providers.ash index 4c3f2c0d1..966c395f4 100644 --- a/RELEASE/scripts/autoscend/auto_providers.ash +++ b/RELEASE/scripts/autoscend/auto_providers.ash @@ -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(); } @@ -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 @@ -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(); From 678f6a16158db2ba308a4f34593ef5af8b7dc0fd Mon Sep 17 00:00:00 2001 From: Busta Rhymes <79654812+bustarhymes69@users.noreply.github.com> Date: Wed, 30 Oct 2024 08:44:49 -0700 Subject: [PATCH 14/16] LoL Path Fixes (#1519) Fix issues with LoL --- RELEASE/scripts/autoscend/auto_acquire.ash | 215 +++++++++--------- RELEASE/scripts/autoscend/iotms/mr2023.ash | 9 +- RELEASE/scripts/autoscend/iotms/mr2024.ash | 2 +- .../autoscend/paths/legacy_of_loathing.ash | 2 +- 4 files changed, 117 insertions(+), 111 deletions(-) diff --git a/RELEASE/scripts/autoscend/auto_acquire.ash b/RELEASE/scripts/autoscend/auto_acquire.ash index 600774e5b..190ede66c 100644 --- a/RELEASE/scripts/autoscend/auto_acquire.ash +++ b/RELEASE/scripts/autoscend/auto_acquire.ash @@ -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; } @@ -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; } @@ -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; } @@ -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; @@ -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; @@ -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()) @@ -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])) { @@ -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); @@ -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™ lathe], 1, 0); + pullXWhenHaveY($item[Asdon Martin keyfob (on ring)], 1, 0); } } else if(day == 2) @@ -813,9 +812,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]); } @@ -975,7 +974,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]); } diff --git a/RELEASE/scripts/autoscend/iotms/mr2023.ash b/RELEASE/scripts/autoscend/iotms/mr2023.ash index 0203cc7e1..917641eb5 100644 --- a/RELEASE/scripts/autoscend/iotms/mr2023.ash +++ b/RELEASE/scripts/autoscend/iotms/mr2023.ash @@ -410,7 +410,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(); } diff --git a/RELEASE/scripts/autoscend/iotms/mr2024.ash b/RELEASE/scripts/autoscend/iotms/mr2024.ash index 0bbdf7a0c..e914ed2db 100644 --- a/RELEASE/scripts/autoscend/iotms/mr2024.ash +++ b/RELEASE/scripts/autoscend/iotms/mr2024.ash @@ -230,7 +230,7 @@ boolean dartEleDmg() boolean auto_haveMayamCalendar() { - if(auto_is_valid($item[Mayam Calendar]) && available_amount($item[Mayam Calendar]) > 0 ) + if(!in_lol() && auto_is_valid($item[Mayam Calendar]) && available_amount($item[Mayam Calendar]) > 0 ) { return true; } diff --git a/RELEASE/scripts/autoscend/paths/legacy_of_loathing.ash b/RELEASE/scripts/autoscend/paths/legacy_of_loathing.ash index 2fdc01245..c1a439b4a 100644 --- a/RELEASE/scripts/autoscend/paths/legacy_of_loathing.ash +++ b/RELEASE/scripts/autoscend/paths/legacy_of_loathing.ash @@ -427,7 +427,7 @@ item auto_ItemToReplica(item it) case $item[Cincho de Mayo]: return $item[replica Cincho de Mayo]; case $item[2002 Mr. Store Catalog]: - return $item[replica 2002 Mr. Store Catalog]; + return $item[Replica 2002 Mr. Store Catalog]; case $item[August Scepter]: return $item[replica August Scepter]; } From 9455ad0a695dca740208ecdac19f0fd40895ebd0 Mon Sep 17 00:00:00 2001 From: Alium58 Date: Thu, 7 Nov 2024 12:06:22 -0600 Subject: [PATCH 15/16] QT Fix (#1521) * don't do hidden city zones if not unlocked * refresh fam page in QT * only refresh fam page in QT --- RELEASE/scripts/autoscend.ash | 1 + RELEASE/scripts/autoscend/autoscend_header.ash | 1 + RELEASE/scripts/autoscend/paths/quantum_terrarium.ash | 9 +++++++++ RELEASE/scripts/autoscend/quests/level_11.ash | 8 ++++---- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/RELEASE/scripts/autoscend.ash b/RELEASE/scripts/autoscend.ash index baeb40656..a49fc3439 100644 --- a/RELEASE/scripts/autoscend.ash +++ b/RELEASE/scripts/autoscend.ash @@ -1831,6 +1831,7 @@ boolean doTasks() boris_buySkills(); pete_buySkills(); zombieSlayer_buySkills(); + auto_refreshQTFam(); lol_buyReplicas(); iluh_buyEquiq(); diff --git a/RELEASE/scripts/autoscend/autoscend_header.ash b/RELEASE/scripts/autoscend/autoscend_header.ash index f1ff62a85..d4d11832e 100644 --- a/RELEASE/scripts/autoscend/autoscend_header.ash +++ b/RELEASE/scripts/autoscend/autoscend_header.ash @@ -915,6 +915,7 @@ boolean LX_quantumTerrarium(); void qt_initializeSettings(); boolean qt_FamiliarAvailable (familiar fam); boolean qt_FamiliarSwap (familiar fam); +void auto_refreshQTFam(); ######################################################################################################## //Defined in autoscend/paths/the_source.ash diff --git a/RELEASE/scripts/autoscend/paths/quantum_terrarium.ash b/RELEASE/scripts/autoscend/paths/quantum_terrarium.ash index c085b6d3c..d532384df 100644 --- a/RELEASE/scripts/autoscend/paths/quantum_terrarium.ash +++ b/RELEASE/scripts/autoscend/paths/quantum_terrarium.ash @@ -111,3 +111,12 @@ boolean qt_FamiliarSwap (familiar fam) return false; } } + +void auto_refreshQTFam() +{ + if(in_quantumTerrarium()) + { + // go to familiar page to ensure QT mafia prefs are up to date + visit_url("familiar.php"); + } +} diff --git a/RELEASE/scripts/autoscend/quests/level_11.ash b/RELEASE/scripts/autoscend/quests/level_11.ash index 7093f80e0..f6866901c 100644 --- a/RELEASE/scripts/autoscend/quests/level_11.ash +++ b/RELEASE/scripts/autoscend/quests/level_11.ash @@ -1794,7 +1794,7 @@ boolean L11_hiddenCity() return false; } - if (internalQuestStatus("questL11Curses") < 2 && have_effect($effect[Ancient Fortitude]) == 0) + if (internalQuestStatus("questL11Curses") == 0 && have_effect($effect[Ancient Fortitude]) == 0) { auto_log_info("The idden [sic] apartment!", "blue"); @@ -1931,7 +1931,7 @@ boolean L11_hiddenCity() } } - if (internalQuestStatus("questL11Business") < 2 && (my_adventures() + $location[The Hidden Office Building].turns_spent) >= 11) + if (internalQuestStatus("questL11Business") == 0 && (my_adventures() + $location[The Hidden Office Building].turns_spent) >= 11) { auto_log_info("The idden [sic] office!", "blue"); @@ -2002,7 +2002,7 @@ boolean L11_hiddenCity() return autoAdv($location[The Hidden Office Building]); } - if (internalQuestStatus("questL11Spare") < 2) + if (internalQuestStatus("questL11Spare") == 0) { auto_log_info("The idden [sic] bowling alley!", "blue"); L11_hiddenTavernUnlock(true); @@ -2041,7 +2041,7 @@ boolean L11_hiddenCity() return autoAdv($location[The Hidden Bowling Alley]); } - if (internalQuestStatus("questL11Doctor") < 2) + if (internalQuestStatus("questL11Doctor") == 0) { if(item_amount($item[Dripping Stone Sphere]) > 0) { From e7eb2bc5256eab4d2d160badb2f57e253f1fcea8 Mon Sep 17 00:00:00 2001 From: dsimich <21962115+dsimich@users.noreply.github.com> Date: Fri, 8 Nov 2024 11:29:47 -0500 Subject: [PATCH 16/16] Tearaway Pants and Peace Turkey support (#1520) * Tearaway Pants and Peace Turkey support --- BUILD/familiars/drop.dat | 2 ++ BUILD/familiars/gremlins.dat | 1 + BUILD/familiars/regen.dat | 1 + RELEASE/data/autoscend_familiars.txt | 14 +++++---- RELEASE/data/autoscend_settings.txt | 1 + RELEASE/scripts/autoscend.ash | 2 +- RELEASE/scripts/autoscend/auto_buff.ash | 1 + RELEASE/scripts/autoscend/auto_familiar.ash | 5 ---- RELEASE/scripts/autoscend/auto_providers.ash | 29 +++++++++++++++++++ RELEASE/scripts/autoscend/auto_util.ash | 4 +++ .../scripts/autoscend/autoscend_header.ash | 1 + .../combat/auto_combat_default_stage3.ash | 6 ++++ .../autoscend/combat/auto_combat_util.ash | 4 +++ RELEASE/scripts/autoscend/iotms/mr2024.ash | 9 ++++++ RELEASE/scripts/autoscend/quests/level_11.ash | 28 ++++++++++++++++-- RELEASE/scripts/autoscend/quests/optional.ash | 14 ++++++++- 16 files changed, 108 insertions(+), 14 deletions(-) diff --git a/BUILD/familiars/drop.dat b/BUILD/familiars/drop.dat index bc3a01b9e..68c7730f5 100644 --- a/BUILD/familiars/drop.dat +++ b/BUILD/familiars/drop.dat @@ -67,3 +67,5 @@ Green Pixie prop:_absintheDrops<5 Galloping Grill prop:_hotAshesDrops<5 # If all else fails, keep generating CBB ingredients Cookbookbat !prop_boolean:auto_dontUseCookBookBat +# use a Peace turkey if all else fails +Peace Turkey diff --git a/BUILD/familiars/gremlins.dat b/BUILD/familiars/gremlins.dat index aef44bbe3..85401351f 100644 --- a/BUILD/familiars/gremlins.dat +++ b/BUILD/familiars/gremlins.dat @@ -2,5 +2,6 @@ Nosy Nose Plastic Pirate Skull Space Jellyfish +Peace Turkey Gelatinous Cubeling Barrrnacle diff --git a/BUILD/familiars/regen.dat b/BUILD/familiars/regen.dat index efcc874ae..cc3bef7a2 100644 --- a/BUILD/familiars/regen.dat +++ b/BUILD/familiars/regen.dat @@ -54,6 +54,7 @@ Mini-Trainbot # Marginally special whelps #Mutant Gila Monster grimdark:2 Pottery Barn Owl +Peace Turkey # Regular old whelps Pet Cheezling Ghuol Whelp diff --git a/RELEASE/data/autoscend_familiars.txt b/RELEASE/data/autoscend_familiars.txt index c6c96725d..cafe0eaae 100644 --- a/RELEASE/data/autoscend_familiars.txt +++ b/RELEASE/data/autoscend_familiars.txt @@ -89,13 +89,16 @@ drop 29 Green Pixie prop:_absintheDrops<5 drop 30 Galloping Grill prop:_hotAshesDrops<5 # If all else fails, keep generating CBB ingredients drop 31 Cookbookbat !prop_boolean:auto_dontUseCookBookBat +# use a Peace turkey if all else fails +drop 32 Peace Turkey # We want to delevel, but don't want to deal damage gremlins 0 Nosy Nose gremlins 1 Plastic Pirate Skull gremlins 2 Space Jellyfish -gremlins 3 Gelatinous Cubeling -gremlins 4 Barrrnacle +gremlins 3 Peace Turkey +gremlins 4 Gelatinous Cubeling +gremlins 5 Barrrnacle init 0 Xiblaxian Holo-Companion init 1 Cute Meteor @@ -313,11 +316,12 @@ regen 29 Mini-Trainbot # Marginally special whelps #Mutant Gila Monster grimdark:2 regen 30 Pottery Barn Owl +regen 31 Peace Turkey # Regular old whelps -regen 31 Pet Cheezling -regen 32 Ghuol Whelp +regen 32 Pet Cheezling +regen 33 Ghuol Whelp # The absolute default that everyone should have after their first run -regen 33 Mosquito +regen 34 Mosquito # Sombrero is desirable with a decent amount of ML stat 0 Galloping Grill ML:>=120 diff --git a/RELEASE/data/autoscend_settings.txt b/RELEASE/data/autoscend_settings.txt index 7fedcb64b..e5d3fb285 100644 --- a/RELEASE/data/autoscend_settings.txt +++ b/RELEASE/data/autoscend_settings.txt @@ -69,3 +69,4 @@ post 6 auto_wandOfNagamar boolean Do we need to get a Wand of Nagamar in this as pre 0 auto_getSteelOrgan_initialize boolean When we initialize an ascension this will be copied to auto_getSteelOrgan sharing 0 auto_disableExcavator boolean When set to true will disable automatically sending spading data via the Extractor script + diff --git a/RELEASE/scripts/autoscend.ash b/RELEASE/scripts/autoscend.ash index a49fc3439..a930395c4 100644 --- a/RELEASE/scripts/autoscend.ash +++ b/RELEASE/scripts/autoscend.ash @@ -1,4 +1,4 @@ -since r28092; // feat: add 'avoid attack' modifier +since r28114; // feat: track split pea soup banish /*** autoscend_header.ash must be first import All non-accessory scripts must be imported here diff --git a/RELEASE/scripts/autoscend/auto_buff.ash b/RELEASE/scripts/autoscend/auto_buff.ash index ce0f9276f..33be686b2 100644 --- a/RELEASE/scripts/autoscend/auto_buff.ash +++ b/RELEASE/scripts/autoscend/auto_buff.ash @@ -256,6 +256,7 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec case $effect[Bram\'s Bloody Bagatelle]: useSkill = $skill[Bram\'s Bloody Bagatelle]; break; case $effect[Brawnee\'s Anthem of Absorption]:useSkill = $skill[Brawnee\'s Anthem of Absorption];break; case $effect[Brilliant Resolve]: useItem = $item[Resolution: Be Smarter]; break; + case $effect[Brittled]: useItem = $item[pea brittle]; break; case $effect[Brooding]: useSkill = $skill[Brood]; break; case $effect[Browbeaten]: useItem = $item[Old Eyebrow Pencil]; break; case $effect[Burning Hands]: useItem = $item[sticky lava globs]; break; diff --git a/RELEASE/scripts/autoscend/auto_familiar.ash b/RELEASE/scripts/autoscend/auto_familiar.ash index c6fd12297..7fb4d4365 100644 --- a/RELEASE/scripts/autoscend/auto_familiar.ash +++ b/RELEASE/scripts/autoscend/auto_familiar.ash @@ -446,11 +446,6 @@ boolean autoChooseFamiliar(location place) if ($locations[Next to that Barrel with Something Burning in it, Out By that Rusted-Out Car, Over Where the Old Tires Are, Near an Abandoned Refrigerator] contains place) { famChoice = lookupFamiliarDatafile("gremlins"); } - - // places that benefit from + combat rate - if ($locations[Sonofa Beach, Lair of the Ninja Snowmen] contains place && zone_combatMod(place)._int > 0 && canChangeToFamiliar($familiar[Jumpsuited Hound Dog])) { - famChoice = $familiar[Jumpsuited Hound Dog]; - } // places where item drop is required to help save adventures. if ($locations[Guano Junction, The Beanbat Chamber, Cobb's Knob Harem, The Goatlet, Itznotyerzitz Mine, diff --git a/RELEASE/scripts/autoscend/auto_providers.ash b/RELEASE/scripts/autoscend/auto_providers.ash index 966c395f4..30d5fd0dd 100644 --- a/RELEASE/scripts/autoscend/auto_providers.ash +++ b/RELEASE/scripts/autoscend/auto_providers.ash @@ -146,6 +146,21 @@ float providePlusCombat(int amt, location loc, boolean doEquips, boolean specula return result(); } + if (!speculative) + { + //Prep for if other +combat familiars are added + foreach fam in $familiars[Jumpsuited Hound Dog] + { + if(canChangeToFamiliar(fam)) + { + handleFamiliar(fam); + if(pass()){ + return result(); + } + } + } + } + return result(); } @@ -355,6 +370,20 @@ float providePlusNonCombat(int amt, location loc, boolean doEquips, boolean spec return result(); } + if (!speculative) + { + foreach fam in $familiars[Peace Turkey, Disgeist] + { + if(canChangeToFamiliar(fam)) + { + handleFamiliar(fam); + if(pass()){ + return result(); + } + } + } + } + return result(); } diff --git a/RELEASE/scripts/autoscend/auto_util.ash b/RELEASE/scripts/autoscend/auto_util.ash index 336ea88e6..f8a517347 100644 --- a/RELEASE/scripts/autoscend/auto_util.ash +++ b/RELEASE/scripts/autoscend/auto_util.ash @@ -761,6 +761,10 @@ boolean adjustForBanish(string combat_string) { return autoEquip($item[cursed monkey\'s paw]); } + if(combat_string == "item " + $item[Handful of split pea soup] && item_amount($item[Handful of split pea soup]) == 0) + { + return create(1, $item[Handful of split pea soup]); + } return true; } diff --git a/RELEASE/scripts/autoscend/autoscend_header.ash b/RELEASE/scripts/autoscend/autoscend_header.ash index d4d11832e..5c341ca6f 100644 --- a/RELEASE/scripts/autoscend/autoscend_header.ash +++ b/RELEASE/scripts/autoscend/autoscend_header.ash @@ -574,6 +574,7 @@ boolean auto_canLeapBridge(); boolean auto_haveSeptEmberCenser(); int remainingEmbers(); void auto_buyFromSeptEmberStore(); +boolean auto_haveTearawayPants(); ######################################################################################################## //Defined in autoscend/paths/actually_ed_the_undying.ash diff --git a/RELEASE/scripts/autoscend/combat/auto_combat_default_stage3.ash b/RELEASE/scripts/autoscend/combat/auto_combat_default_stage3.ash index e2ec3d583..34730f047 100644 --- a/RELEASE/scripts/autoscend/combat/auto_combat_default_stage3.ash +++ b/RELEASE/scripts/autoscend/combat/auto_combat_default_stage3.ash @@ -583,6 +583,12 @@ string auto_combatDefaultStage3(int round, monster enemy, string text) return useItem($item[Tomayohawk-Style Reflex Hammer]); } + //If you have tearaway pants equipped, use its skill + if(canUse($skill[Tear Away your Pants!])) + { + return useSkill($skill[Tear Away your Pants!]); + } + // skills from Lathe weapons // Ebony Epee if(canUse($skill[Disarming Thrust])) diff --git a/RELEASE/scripts/autoscend/combat/auto_combat_util.ash b/RELEASE/scripts/autoscend/combat/auto_combat_util.ash index 797409198..1e1a05a47 100644 --- a/RELEASE/scripts/autoscend/combat/auto_combat_util.ash +++ b/RELEASE/scripts/autoscend/combat/auto_combat_util.ash @@ -553,6 +553,10 @@ string banisherCombatString(monster enemy, location loc, boolean inCombat) return "skill " + $skill[Howl of the Alpha]; } + if(inCombat ? item_amount($item[Handful of split pea soup]) > 0 && (!(used contains "Handful of split pea soup")) && auto_is_valid($item[Handful of split pea soup]) && useFree : (item_amount($item[Handful of split pea soup]) > 0 || item_amount($item[Whirled peas]) >= 2)) + { + return "item " + $item[Handful of split pea soup]; + } if((inCombat ? auto_have_skill($skill[Throw Latte on Opponent]) : possessEquipment($item[latte lovers member\'s mug])) && auto_is_valid($skill[Throw Latte On Opponent]) && !get_property("_latteBanishUsed").to_boolean() && !(used contains "Throw Latte on Opponent") && useFree) { return "skill " + $skill[Throw Latte on Opponent]; diff --git a/RELEASE/scripts/autoscend/iotms/mr2024.ash b/RELEASE/scripts/autoscend/iotms/mr2024.ash index e914ed2db..92d059c74 100644 --- a/RELEASE/scripts/autoscend/iotms/mr2024.ash +++ b/RELEASE/scripts/autoscend/iotms/mr2024.ash @@ -450,3 +450,12 @@ void auto_buyFromSeptEmberStore() } // consider throwin' ember for banish or summoning charm for pickpocket in future PR } + +boolean auto_haveTearawayPants() +{ + if(auto_is_valid($item[Tearaway Pants]) && available_amount($item[Tearaway Pants]) > 0 ) + { + return true; + } + return false; +} diff --git a/RELEASE/scripts/autoscend/quests/level_11.ash b/RELEASE/scripts/autoscend/quests/level_11.ash index f6866901c..74bf141b8 100644 --- a/RELEASE/scripts/autoscend/quests/level_11.ash +++ b/RELEASE/scripts/autoscend/quests/level_11.ash @@ -2129,6 +2129,10 @@ boolean L11_hiddenCityZones() boolean equipMachete() { + if(in_ag()) + { + return false; //combats aren't free so no point in equipping a Machete + } if (auto_can_equip($item[Antique Machete])) { if (possessEquipment($item[Antique Machete])) @@ -2154,7 +2158,7 @@ boolean L11_hiddenCityZones() L11_hiddenTavernUnlock(); - boolean canUseMachete = !is_boris() && !in_wotsf() && !in_pokefam(); + boolean canUseMachete = !is_boris() && !in_wotsf() && !in_pokefam() && !in_ag(); boolean needMachete = canUseMachete && !possessEquipment($item[Antique Machete]) && (in_hardcore() || in_lol()); boolean needRelocate = (get_property("relocatePygmyJanitor").to_int() != my_ascensions()); @@ -2181,6 +2185,10 @@ boolean L11_hiddenCityZones() if (canUseMachete && !equipMachete()) { return false; } + if(!canUseMachete && auto_haveTearawayPants()) + { + autoForceEquip($item[Tearaway Pants]); + } return autoAdv($location[An Overgrown Shrine (Northwest)]); } @@ -2188,6 +2196,10 @@ boolean L11_hiddenCityZones() if (canUseMachete && !equipMachete()) { return false; } + if(!canUseMachete && auto_haveTearawayPants()) + { + autoForceEquip($item[Tearaway Pants]); + } return autoAdv($location[An Overgrown Shrine (Northeast)]); } @@ -2195,6 +2207,10 @@ boolean L11_hiddenCityZones() if (canUseMachete && !equipMachete()) { return false; } + if(!canUseMachete && auto_haveTearawayPants()) + { + autoForceEquip($item[Tearaway Pants]); + } return autoAdv($location[An Overgrown Shrine (Southwest)]); } @@ -2202,13 +2218,21 @@ boolean L11_hiddenCityZones() if (canUseMachete && !equipMachete()) { return false; } + if(!canUseMachete && auto_haveTearawayPants()) + { + autoForceEquip($item[Tearaway Pants]); + } return autoAdv($location[An Overgrown Shrine (Southeast)]); } if (!get_property("auto_openedziggurat").to_boolean()) { - if (!equipMachete()) { + if (canUseMachete && !equipMachete()) { return false; } + if(!canUseMachete && auto_haveTearawayPants()) + { + autoForceEquip($item[Tearaway Pants]); + } boolean advSpent = autoAdv($location[A Massive Ziggurat]); if (get_property("lastEncounter") == "Legend of the Temple in the Hidden City" || (isActuallyEd() && get_property("lastEncounter") == "Temple of the Legend in the Hidden City")) { set_property("auto_openedziggurat", true); diff --git a/RELEASE/scripts/autoscend/quests/optional.ash b/RELEASE/scripts/autoscend/quests/optional.ash index d9ce6dd7f..438291d71 100644 --- a/RELEASE/scripts/autoscend/quests/optional.ash +++ b/RELEASE/scripts/autoscend/quests/optional.ash @@ -353,7 +353,7 @@ boolean LX_guildUnlock() { return false; } - if(!(in_picky() || in_lowkeysummer()) && get_property('auto_skipUnlockGuild').to_boolean()) + if(!(in_picky() || in_lowkeysummer()) && get_property('auto_skipUnlockGuild').to_boolean() && !(my_primestat() == $stat[Moxie] && auto_haveTearawayPants())) { return false; } @@ -365,6 +365,18 @@ boolean LX_guildUnlock() string pref; location loc = $location[None]; item goal = $item[none]; + if(my_primestat() == $stat[Moxie] && auto_haveTearawayPants()) + { + //Can bypass moxie test if we have the Tearaway Pants + if(autoForceEquip($item[Tearaway Pants])) + { + if (internalQuestStatus("questG08Moxie") < 1) + { + visit_url("guild.php?place=challenge"); + } + return true; + } + } switch(my_primestat()) { case $stat[Muscle]: