diff --git a/BUILD/phylums/banish.dat b/BUILD/phylums/banish.dat new file mode 100644 index 000000000..7aabfdac9 --- /dev/null +++ b/BUILD/phylums/banish.dat @@ -0,0 +1,12 @@ +dude loc:The Black Forest +dude loc:Twin Peak +dude loc:The Red Zeppelin;sniffed:Red Butler;item:Glark Cable>2 +dude loc:Whitey's Grove;quest:questL11Palindome<=3 +beast loc:The Hidden Park +beast loc:Inside the Palindome;quest:questL11Palindome<=3 +beast loc:The Penultimate Fantasy Airship +undead loc:The Haunted Library item:Killing Jar>0 +undead loc:The Haunted Wine Cellar +undead loc:The Haunted Boiler Room +undead loc:The Middle Chamber +construct loc:Noob Cave diff --git a/BUILD/phylums/header.txt b/BUILD/phylums/header.txt new file mode 100644 index 000000000..c2639599e --- /dev/null +++ b/BUILD/phylums/header.txt @@ -0,0 +1 @@ +# See auto_check_conditions for conditional options diff --git a/BUILD/task_order/A Shrunken Adventurer am I.dat b/BUILD/task_order/A Shrunken Adventurer am I.dat index de0909343..b22617c35 100644 --- a/BUILD/task_order/A Shrunken Adventurer am I.dat +++ b/BUILD/task_order/A Shrunken Adventurer am I.dat @@ -82,6 +82,8 @@ L3_tavern L2_mosquito # "win" the contests, navigate the maze, unlock the door, climb the tower, commit sorceresscide. L13_towerAscent +# not powerlevelling but something that needs to be done if nothing else is available +LX_lastChance # release the hounds! auto_softBlockHandler # if all else fails, powerlevel like there's no tomorrow. diff --git a/BUILD/task_order/Avatar of Jarlsberg.dat b/BUILD/task_order/Avatar of Jarlsberg.dat index 4978bd42a..f48297ad2 100644 --- a/BUILD/task_order/Avatar of Jarlsberg.dat +++ b/BUILD/task_order/Avatar of Jarlsberg.dat @@ -53,5 +53,6 @@ L5_slayTheGoblinKing L4_batCave L3_tavern L13_towerAscent +LX_lastChance auto_softBlockHandler LX_attemptPowerLevel diff --git a/BUILD/task_order/Legacy of Loathing.dat b/BUILD/task_order/Legacy of Loathing.dat index 4714fb05b..cd940bae0 100644 --- a/BUILD/task_order/Legacy of Loathing.dat +++ b/BUILD/task_order/Legacy of Loathing.dat @@ -94,5 +94,6 @@ L13_sorceressDoor L13_towerNSTower L13_towerNSNagamar L13_towerNSFinal +LX_lastChance auto_softBlockHandler LX_attemptPowerLevel diff --git a/BUILD/task_order/Quantum Terrarium.dat b/BUILD/task_order/Quantum Terrarium.dat index 5c4cee161..4b3196d3e 100644 --- a/BUILD/task_order/Quantum Terrarium.dat +++ b/BUILD/task_order/Quantum Terrarium.dat @@ -57,5 +57,7 @@ L5_slayTheGoblinKing L4_batCave L3_tavern L13_towerAscent +# not powerlevelling but something that needs to be done if nothing else is available +LX_lastChance auto_softBlockHandler LX_attemptPowerLevel diff --git a/BUILD/task_order/WereProfessor.dat b/BUILD/task_order/WereProfessor.dat index 5fd749b8f..3f3eee3e1 100644 --- a/BUILD/task_order/WereProfessor.dat +++ b/BUILD/task_order/WereProfessor.dat @@ -98,6 +98,8 @@ LX_getStarKey LX_getDigitalKey # "win" the contests, navigate the maze, unlock the door, climb the tower, commit sorceresscide. L13_towerAscent +# not powerlevelling but something that needs to be done if nothing else is available +LX_lastChance # release the hounds! auto_softBlockHandler # if all else fails, powerlevel like there's no tomorrow. diff --git a/BUILD/task_order/Zombie Slayer.dat b/BUILD/task_order/Zombie Slayer.dat index fbb2b7993..48b769b82 100644 --- a/BUILD/task_order/Zombie Slayer.dat +++ b/BUILD/task_order/Zombie Slayer.dat @@ -53,5 +53,7 @@ L5_slayTheGoblinKing L4_batCave L3_tavern L13_towerAscent +# not powerlevelling but something that needs to be done if nothing else is available +LX_lastChance auto_softBlockHandler LX_attemptPowerLevel diff --git a/BUILD/task_order/default.dat b/BUILD/task_order/default.dat index fce9b75d6..62a3337e5 100644 --- a/BUILD/task_order/default.dat +++ b/BUILD/task_order/default.dat @@ -88,6 +88,8 @@ L2_mosquito LX_koeInvaderHandler # "win" the contests, navigate the maze, unlock the door, climb the tower, commit sorceresscide. L13_towerAscent +# not powerlevelling but something that needs to be done if nothing else is available +LX_lastChance # release the hounds! auto_softBlockHandler # if all else fails, powerlevel like there's no tomorrow. diff --git a/RELEASE/data/autoscend_phylums.txt b/RELEASE/data/autoscend_phylums.txt new file mode 100644 index 000000000..00e0bacd9 --- /dev/null +++ b/RELEASE/data/autoscend_phylums.txt @@ -0,0 +1,17 @@ +# THIS FILE IS GENERATED BY BUILD/assemble.sh +# DO NOT EDIT THIS FILE DIRECTLY. EDIT THE .DAT FILES IN THE /BUILD/ FOLDER THEN RUN assemble.sh + +# See auto_check_conditions for conditional options +banish 0 dude loc:The Black Forest +banish 1 dude loc:Twin Peak +banish 2 dude loc:The Red Zeppelin;sniffed:Red Butler;item:Glark Cable>2 +banish 3 dude loc:Whitey's Grove;quest:questL11Palindome<=3 +banish 4 beast loc:The Hidden Park +banish 5 beast loc:Inside the Palindome;quest:questL11Palindome<=3 +banish 6 beast loc:The Penultimate Fantasy Airship +banish 7 undead loc:The Haunted Library item:Killing Jar>0 +banish 8 undead loc:The Haunted Wine Cellar +banish 9 undead loc:The Haunted Boiler Room +banish 10 undead loc:The Middle Chamber +banish 11 construct loc:Noob Cave + diff --git a/RELEASE/data/autoscend_task_order.txt b/RELEASE/data/autoscend_task_order.txt index 4fdeb8687..8c84ccb4d 100644 --- a/RELEASE/data/autoscend_task_order.txt +++ b/RELEASE/data/autoscend_task_order.txt @@ -88,10 +88,12 @@ A Shrunken Adventurer am I 53 L3_tavern A Shrunken Adventurer am I 54 L2_mosquito # "win" the contests, navigate the maze, unlock the door, climb the tower, commit sorceresscide. A Shrunken Adventurer am I 55 L13_towerAscent +# not powerlevelling but something that needs to be done if nothing else is available +A Shrunken Adventurer am I 56 LX_lastChance # release the hounds! -A Shrunken Adventurer am I 56 auto_softBlockHandler +A Shrunken Adventurer am I 57 auto_softBlockHandler # if all else fails, powerlevel like there's no tomorrow. -A Shrunken Adventurer am I 57 LX_attemptPowerLevel +A Shrunken Adventurer am I 58 LX_attemptPowerLevel Avant Guard 0 LX_freeCombatsTask Avant Guard 1 woods_questStart @@ -250,8 +252,106 @@ Avatar of Jarlsberg 51 L5_slayTheGoblinKing Avatar of Jarlsberg 52 L4_batCave Avatar of Jarlsberg 53 L3_tavern Avatar of Jarlsberg 54 L13_towerAscent -Avatar of Jarlsberg 55 auto_softBlockHandler -Avatar of Jarlsberg 56 LX_attemptPowerLevel +Avatar of Jarlsberg 55 LX_lastChance +Avatar of Jarlsberg 56 auto_softBlockHandler +Avatar of Jarlsberg 57 LX_attemptPowerLevel + +default 0 LX_freeCombatsTask +default 1 woods_questStart +default 2 LX_unlockPirateRealm +default 3 catBurglarHeist +default 4 auto_breakfastCounterVisit +default 5 chateauPainting +default 6 LX_setWorkshed +default 7 LX_galaktikSubQuest +default 8 L9_leafletQuest +default 9 L5_findKnob +default 10 L12_sonofaPrefix +default 11 LX_burnDelay +default 12 LX_summonMonster +# path handling which should be in it's own task order but pre-dates task order functionality (tech debt FTW). +default 13 LM_edTheUndying +default 14 LX_bugbearInvasion +default 15 LX_lowkeySummer +# make sure we don't waste turns of Ultrahydrated doing something else. +default 16 L11_aridDesert L11_hasUltrahydrated +# Lock in the Shen zones as soon as we can as it (potentially) unlocks a bunch of stuff. +default 17 L11_shenStartQuest +# Build the Bridge when we have enough parts as we may want to spend daily resources at the peaks. +default 18 finishBuildingSmutOrcBridge +# Call quest handlers based on current state if applicable +default 19 auto_earlyRoutingHandling +# Guild access. +default 20 LX_guildUnlock +# Desert access, Daily Dungeon and other early random stuff that we don't want to miss. +default 21 LX_unlockDesert +default 22 LX_lockPicking +default 23 LX_fatLootToken +# Get the Steel Organ if the user wants it (needs L6 quest complete) +default 24 LX_steelOrgan +# open up delay zones. +default 25 LX_spookyravenManorFirstFloor +# open up zones where we want to force non-combats. +# Open up underground zones so they are available for Breathitin. +default 26 L5_getEncryptionKey +default 27 L5_findKnob +# Do the War early. Access to the Orchard is useful for booze/potions and maybe we can make use of the green smoke bombs? +default 28 L12_islandWar +# Start the macguffin quest +default 29 L11_blackMarket +default 30 L11_forgedDocuments +default 31 L11_mcmuffinDiary +default 32 L11_getBeehive +# open the hidden city up (delay zones) +default 33 L2_mosquito +default 34 LX_unlockHiddenTemple +default 35 L6_dakotaFanning +default 36 L11_unlockHiddenCity +# Murder pygmies for the ancient amulet. +default 37 L11_hiddenCityZones +default 38 L11_hiddenCity +# Dance with lady spookyraven so we can go murder her undead husband and take the Eye of Ed +default 39 LX_spookyravenManorSecondFloor +default 40 L11_mauriceSpookyraven +# Lay the smack down on those Jerk Copperhead twins +default 41 L11_talismanOfNam +# Open up the top of the beanstalk. +default 42 L10_plantThatBean +# Clean up the plains +default 43 L10_rainOnThePlains +# Get Black Angus his pizza +default 44 L9_chasmBuild +default 45 L9_highLandlord +# Kill Groar because *we* are the monsters. +default 46 L8_trapperQuest +# Kill the undead? Is this an oxymoron? +default 47 L7_crypt +# Cleanse the taint. +default 48 L6_friarsGetParts +# Finish the other Macguffin zones so we can beat Ed to death repeatedly and waste all his Ka coins. +default 49 L11_palindome +default 50 L11_aridDesert +default 51 L11_unlockPyramid +default 52 L11_unlockEd +default 53 L11_defeatEd +# Finish off the Goblin King. +default 54 L5_slayTheGoblinKing +# Show the Boss bat who's boss. +default 55 L4_batCave +# Fix that dripping tap. +default 56 L3_tavern +# Basic fetch quest is the first thing the council demand of you. Is this 2002 or what? +default 57 L2_mosquito +# There's an extra task in KoE +default 58 LX_koeInvaderHandler +# "win" the contests, navigate the maze, unlock the door, climb the tower, commit sorceresscide. +default 59 L13_towerAscent +# not powerlevelling but something that needs to be done if nothing else is available +default 60 LX_lastChance +# release the hounds! +default 61 auto_softBlockHandler +# if all else fails, powerlevel like there's no tomorrow. +default 62 LX_attemptPowerLevel Legacy of Loathing 0 LX_freeCombatsTask Legacy of Loathing 1 woods_questStart @@ -349,8 +449,9 @@ Legacy of Loathing 84 L13_sorceressDoor Legacy of Loathing 85 L13_towerNSTower Legacy of Loathing 86 L13_towerNSNagamar Legacy of Loathing 87 L13_towerNSFinal -Legacy of Loathing 88 auto_softBlockHandler -Legacy of Loathing 89 LX_attemptPowerLevel +Legacy of Loathing 88 LX_lastChance +Legacy of Loathing 89 auto_softBlockHandler +Legacy of Loathing 90 LX_attemptPowerLevel Quantum Terrarium 0 LX_freeCombatsTask Quantum Terrarium 1 woods_questStart @@ -411,8 +512,10 @@ Quantum Terrarium 55 L5_slayTheGoblinKing Quantum Terrarium 56 L4_batCave Quantum Terrarium 57 L3_tavern Quantum Terrarium 58 L13_towerAscent -Quantum Terrarium 59 auto_softBlockHandler -Quantum Terrarium 60 LX_attemptPowerLevel +# not powerlevelling but something that needs to be done if nothing else is available +Quantum Terrarium 59 LX_lastChance +Quantum Terrarium 60 auto_softBlockHandler +Quantum Terrarium 61 LX_attemptPowerLevel WereProfessor 0 LM_wereprof WereProfessor 1 LX_freeCombatsTask @@ -514,10 +617,12 @@ WereProfessor 65 LX_getStarKey WereProfessor 66 LX_getDigitalKey # "win" the contests, navigate the maze, unlock the door, climb the tower, commit sorceresscide. WereProfessor 67 L13_towerAscent +# not powerlevelling but something that needs to be done if nothing else is available +WereProfessor 68 LX_lastChance # release the hounds! -WereProfessor 68 auto_softBlockHandler +WereProfessor 69 auto_softBlockHandler # if all else fails, powerlevel like there's no tomorrow. -WereProfessor 69 LX_attemptPowerLevel +WereProfessor 70 LX_attemptPowerLevel Zombie Slayer 0 LM_zombieSlayer Zombie Slayer 1 woods_questStart @@ -574,101 +679,8 @@ Zombie Slayer 51 L5_slayTheGoblinKing Zombie Slayer 52 L4_batCave Zombie Slayer 53 L3_tavern Zombie Slayer 54 L13_towerAscent -Zombie Slayer 55 auto_softBlockHandler -Zombie Slayer 56 LX_attemptPowerLevel - -default 0 LX_freeCombatsTask -default 1 woods_questStart -default 2 LX_unlockPirateRealm -default 3 catBurglarHeist -default 4 auto_breakfastCounterVisit -default 5 chateauPainting -default 6 LX_setWorkshed -default 7 LX_galaktikSubQuest -default 8 L9_leafletQuest -default 9 L5_findKnob -default 10 L12_sonofaPrefix -default 11 LX_burnDelay -default 12 LX_summonMonster -# path handling which should be in it's own task order but pre-dates task order functionality (tech debt FTW). -default 13 LM_edTheUndying -default 14 LX_bugbearInvasion -default 15 LX_lowkeySummer -# make sure we don't waste turns of Ultrahydrated doing something else. -default 16 L11_aridDesert L11_hasUltrahydrated -# Lock in the Shen zones as soon as we can as it (potentially) unlocks a bunch of stuff. -default 17 L11_shenStartQuest -# Build the Bridge when we have enough parts as we may want to spend daily resources at the peaks. -default 18 finishBuildingSmutOrcBridge -# Call quest handlers based on current state if applicable -default 19 auto_earlyRoutingHandling -# Guild access. -default 20 LX_guildUnlock -# Desert access, Daily Dungeon and other early random stuff that we don't want to miss. -default 21 LX_unlockDesert -default 22 LX_lockPicking -default 23 LX_fatLootToken -# Get the Steel Organ if the user wants it (needs L6 quest complete) -default 24 LX_steelOrgan -# open up delay zones. -default 25 LX_spookyravenManorFirstFloor -# open up zones where we want to force non-combats. -# Open up underground zones so they are available for Breathitin. -default 26 L5_getEncryptionKey -default 27 L5_findKnob -# Do the War early. Access to the Orchard is useful for booze/potions and maybe we can make use of the green smoke bombs? -default 28 L12_islandWar -# Start the macguffin quest -default 29 L11_blackMarket -default 30 L11_forgedDocuments -default 31 L11_mcmuffinDiary -default 32 L11_getBeehive -# open the hidden city up (delay zones) -default 33 L2_mosquito -default 34 LX_unlockHiddenTemple -default 35 L6_dakotaFanning -default 36 L11_unlockHiddenCity -# Murder pygmies for the ancient amulet. -default 37 L11_hiddenCityZones -default 38 L11_hiddenCity -# Dance with lady spookyraven so we can go murder her undead husband and take the Eye of Ed -default 39 LX_spookyravenManorSecondFloor -default 40 L11_mauriceSpookyraven -# Lay the smack down on those Jerk Copperhead twins -default 41 L11_talismanOfNam -# Open up the top of the beanstalk. -default 42 L10_plantThatBean -# Clean up the plains -default 43 L10_rainOnThePlains -# Get Black Angus his pizza -default 44 L9_chasmBuild -default 45 L9_highLandlord -# Kill Groar because *we* are the monsters. -default 46 L8_trapperQuest -# Kill the undead? Is this an oxymoron? -default 47 L7_crypt -# Cleanse the taint. -default 48 L6_friarsGetParts -# Finish the other Macguffin zones so we can beat Ed to death repeatedly and waste all his Ka coins. -default 49 L11_palindome -default 50 L11_aridDesert -default 51 L11_unlockPyramid -default 52 L11_unlockEd -default 53 L11_defeatEd -# Finish off the Goblin King. -default 54 L5_slayTheGoblinKing -# Show the Boss bat who's boss. -default 55 L4_batCave -# Fix that dripping tap. -default 56 L3_tavern -# Basic fetch quest is the first thing the council demand of you. Is this 2002 or what? -default 57 L2_mosquito -# There's an extra task in KoE -default 58 LX_koeInvaderHandler -# "win" the contests, navigate the maze, unlock the door, climb the tower, commit sorceresscide. -default 59 L13_towerAscent -# release the hounds! -default 60 auto_softBlockHandler -# if all else fails, powerlevel like there's no tomorrow. -default 61 LX_attemptPowerLevel +# not powerlevelling but something that needs to be done if nothing else is available +Zombie Slayer 55 LX_lastChance +Zombie Slayer 56 auto_softBlockHandler +Zombie Slayer 57 LX_attemptPowerLevel diff --git a/RELEASE/scripts/autoscend.ash b/RELEASE/scripts/autoscend.ash index 779b0603f..9f762fc7b 100644 --- a/RELEASE/scripts/autoscend.ash +++ b/RELEASE/scripts/autoscend.ash @@ -1431,7 +1431,7 @@ boolean adventureFailureHandler() } } - if(last_monster() == $monster[Crate] && (in_wereprof() && !($location[Noob Cave].turns_spent < 8))) //want 7 turns of Noob Cave in Wereprof for Smashed Scientific Equipment + if(last_monster() == $monster[Crate] && !(get_property("screechDelay").to_boolean()) && (in_wereprof() && !($location[Noob Cave].turns_spent < 8))) //want 7 turns of Noob Cave in Wereprof for Smashed Scientific Equipment { if(get_property("auto_newbieOverride").to_boolean()) { diff --git a/RELEASE/scripts/autoscend/auto_bedtime.ash b/RELEASE/scripts/autoscend/auto_bedtime.ash index d4e013918..8f4f1a30d 100644 --- a/RELEASE/scripts/autoscend/auto_bedtime.ash +++ b/RELEASE/scripts/autoscend/auto_bedtime.ash @@ -725,6 +725,7 @@ boolean doBedtime() } //We are committing to end of day now... + auto_scepterRollover(); //Use the rest of the August Scepter's charges getSpaceJelly(); while(acquireHermitItem($item[11-leaf Clover])); diff --git a/RELEASE/scripts/autoscend/auto_familiar.ash b/RELEASE/scripts/autoscend/auto_familiar.ash index 451d591e4..c71a369d5 100644 --- a/RELEASE/scripts/autoscend/auto_familiar.ash +++ b/RELEASE/scripts/autoscend/auto_familiar.ash @@ -485,6 +485,8 @@ boolean autoChooseFamiliar(location place) } } } + + famChoice = auto_forceEagle(); // force Patriotic Eagle if we have a >0 combats until we can screech again // Gremlins have special familiar handling. 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) { @@ -769,7 +771,7 @@ void preAdvUpdateFamiliar(location place) { handleFamiliar(get_property("auto_100familiar").to_familiar()); //do not break 100 familiar runs } - + //familiar requirement to adventure in a zone, override everything else. if(place == $location[The Deep Machine Tunnels]) { diff --git a/RELEASE/scripts/autoscend/auto_powerlevel.ash b/RELEASE/scripts/autoscend/auto_powerlevel.ash index bf7a483de..8e99553aa 100644 --- a/RELEASE/scripts/autoscend/auto_powerlevel.ash +++ b/RELEASE/scripts/autoscend/auto_powerlevel.ash @@ -57,6 +57,7 @@ boolean LX_attemptPowerLevel() { return LX_robot_powerlevel(); //leveling works very differently in You, Robot path } + if (my_level() > 12) { return false; @@ -91,11 +92,6 @@ boolean LX_attemptPowerLevel() //The Source path specific powerleveling LX_attemptPowerLevelTheSource(); - if (LX_getDigitalKey() || LX_getStarKey()) - { - return true; - } - //August Scepter Power Levelling if(auto_haveAugustScepter() && get_property("_augSkillsCast").to_int() < 5){ if(my_primestat() == $stat[Muscle]) @@ -189,6 +185,7 @@ boolean LX_attemptPowerLevel() if(autoAdv($location[The Haunted Gallery])) return true; } } + return false; } diff --git a/RELEASE/scripts/autoscend/auto_pre_adv.ash b/RELEASE/scripts/autoscend/auto_pre_adv.ash index f67152ec1..33526568b 100644 --- a/RELEASE/scripts/autoscend/auto_pre_adv.ash +++ b/RELEASE/scripts/autoscend/auto_pre_adv.ash @@ -353,10 +353,10 @@ boolean auto_pre_adventure() } // this calls the appropriate provider for +combat or -combat depending on the zone we are about to adventure in.. - boolean burningDelay = ((auto_voteMonster(true) || isOverdueDigitize() || auto_sausageGoblin() || auto_backupTarget() || auto_voidMonster()) && place == solveDelayZone()); - boolean gettingLucky = (have_effect($effect[Lucky!]) > 0 && zone_hasLuckyAdventure(place)); + boolean burningDelay = auto_burningDelay(); + boolean gettingLucky = auto_gettingLucky(); boolean forcedNonCombat = auto_haveQueuedForcedNonCombat(); - boolean zoneQueueIgnored = (burningDelay || gettingLucky || forcedNonCombat); + boolean zoneQueueIgnored = auto_queueIgnore(); generic_t combatModifier = zone_combatMod(place); if (combatModifier._boolean && !zoneQueueIgnored) { acquireCombatMods(combatModifier._int, true); @@ -408,8 +408,14 @@ boolean auto_pre_adventure() adjustForYellowRayIfPossible(mon); zoneHasWantedMonsters = true; } + if(auto_wantToBanish(monster_phylum(mon), place)) + { + // attempt to prepare for banishing, but if we can not try free running + boolean canBanish = adjustForBanishIfPossible(monster_phylum(mon), place); + zoneHasUnwantedMonsters = true; + } boolean wantToBanish = auto_wantToBanish(mon, place); - boolean wantToFreeRun = auto_wantToFreeRun(mon, place); + boolean wantToFreeRun = auto_wantToFreeRun(mon, place) || auto_forceFreeRun(false); if(wantToBanish || wantToFreeRun) { // attempt to prepare for banishing, but if we can not try free running diff --git a/RELEASE/scripts/autoscend/auto_util.ash b/RELEASE/scripts/autoscend/auto_util.ash index aa8d63bd7..d36721963 100644 --- a/RELEASE/scripts/autoscend/auto_util.ash +++ b/RELEASE/scripts/autoscend/auto_util.ash @@ -500,6 +500,31 @@ boolean isBanished(monster enemy) return (banishedMonsters() contains enemy); } +int[phylum] banishedPhyla() +{ + int[phylum] retval; + string[int] data = split_string(get_property("banishedPhyla"), ":"); + + if(get_property("banishedPhyla") == "") + { + return retval; + } + + int i=0; + while(i 0 && zone_hasLuckyAdventure(my_location())) + { + return true; + } + return false; +} + +boolean auto_queueIgnore() +{ + if(auto_burningDelay() || auto_gettingLucky() || auto_haveQueuedForcedNonCombat()) + { + return true; + } + return false; +} boolean auto_deleteMail(kmailObject msg) { @@ -3399,6 +3497,8 @@ boolean auto_check_conditions(string conds) return true; if(get_property("motifMonster").to_monster() == check_sniffed) return true; + if(get_property("rwbMonster").to_monster() == check_sniffed) + return true; return false; // data: Doesn't matter, but put something so I don't have to support dataless conditions // True when you expect a protonic ghost report @@ -3482,6 +3582,27 @@ boolean [monster] auto_getMonsters(string category) return res; } +boolean [phylum] auto_getPhylum(string category) +{ + boolean [phylum] res; + string [string,int,string] phylum_text; + if(!file_to_map("autoscend_phylums.txt", phylum_text)) + auto_log_error("Could not load autoscend_phylums.txt. This is bad!"); + foreach i,name,conds in phylum_text[category] + { + phylum thisPhylum = name.to_phylum(); + if(thisPhylum == $phylum[none]) + { + auto_log_warning('"' + name + '" does not convert to a phylum properly!', "red"); + continue; + } + if(!auto_check_conditions(conds)) + continue; + res[thisPhylum] = true; + } + return res; +} + boolean auto_wantToSniff(monster enemy, location loc) { location locCache = my_location(); diff --git a/RELEASE/scripts/autoscend/autoscend_header.ash b/RELEASE/scripts/autoscend/autoscend_header.ash index 0e8007dd4..f6a975bf4 100644 --- a/RELEASE/scripts/autoscend/autoscend_header.ash +++ b/RELEASE/scripts/autoscend/autoscend_header.ash @@ -525,6 +525,7 @@ void auto_buyFrom2002MrStore(); void auto_useBlackMonolith(); boolean auto_haveAugustScepter(); void auto_scepterSkills(); +void auto_scepterRollover(); void auto_lostStomach(); boolean auto_haveBofa(); boolean auto_canHabitat(); @@ -534,6 +535,12 @@ monster auto_habitatMonster(); boolean auto_canCircadianRhythm(); boolean auto_circadianRhythmTarget(monster target); boolean auto_circadianRhythmTarget(phylum target); +boolean auto_haveEagle(); +string activeCitZoneMod(); +boolean auto_citizenZonePrep(string goal); +boolean auto_getCitizenZone(location loc); +boolean auto_getCitizenZone(string goal); +familiar auto_forceEagle(); boolean auto_haveJillOfAllTrades(); void auto_handleJillOfAllTrades(); boolean auto_haveBurningLeaves(); @@ -1257,6 +1264,7 @@ boolean LX_meatMaid(); item LX_getDesiredWorkshed(); boolean LX_setWorkshed(); boolean LX_dronesOut(); +boolean LX_lastChance(); ######################################################################################################## //Defined in autoscend/quests/optional.ash @@ -1729,6 +1737,8 @@ boolean loopHandlerDelayAll(); string reverse(string s); int[monster] banishedMonsters(); boolean isBanished(monster enemy); +int[phylum] banishedPhyla(); +boolean isBanishedPhyla(phylum monsterPhylum); int autoCraft(string mode, int count, item item1, item item2); int internalQuestStatus(string prop); boolean canYellowRay(monster target); @@ -1737,9 +1747,13 @@ float[monster] auto_combat_appearance_rates(location place, boolean queue); float[monster] auto_combat_appearance_rates(location place); boolean[string] auto_banishesUsedAt(location loc); boolean auto_wantToBanish(monster enemy, location loc); +boolean auto_wantToBanish(phylum enemyphylum, location loc); boolean canBanish(monster enemy, location loc); +boolean canBanish(phylum enemyphylum, location loc); boolean adjustForBanish(string combat_string); boolean adjustForBanishIfPossible(monster enemy, location loc); +boolean adjustForBanishIfPossible(phylum enemyphylum, location loc); +boolean auto_forceFreeRun(boolean combat); boolean auto_wantToFreeRun(monster enemy, location loc); boolean canFreeRun(monster enemy, location loc); string freeRunCombatStringPreBanish(monster enemy, location loc, boolean inCombat); @@ -1794,6 +1808,9 @@ float MLDamageToMonsterMultiplier(); int freeCrafts(); boolean isFreeMonster(monster mon); boolean isFreeMonster(monster mon, location loc); +boolean auto_burningDelay(); +boolean auto_gettingLucky(); +boolean auto_queueIgnore(); boolean auto_deleteMail(kmailObject msg); boolean LX_summonMonster(); boolean canSummonMonster(monster mon); @@ -1853,6 +1870,7 @@ boolean auto_can_equip(item it); boolean auto_can_equip(item it, slot s); boolean auto_check_conditions(string conds); boolean [monster] auto_getMonsters(string category); +boolean [phylum] auto_getPhylum(string category); boolean auto_wantToSniff(monster enemy, location loc); boolean auto_wantToYellowRay(monster enemy, location loc); boolean auto_wantToReplace(monster enemy, location loc); diff --git a/RELEASE/scripts/autoscend/combat/auto_combat_default_stage1.ash b/RELEASE/scripts/autoscend/combat/auto_combat_default_stage1.ash index fb9b0b1ef..0934be9b9 100644 --- a/RELEASE/scripts/autoscend/combat/auto_combat_default_stage1.ash +++ b/RELEASE/scripts/autoscend/combat/auto_combat_default_stage1.ash @@ -266,6 +266,12 @@ string auto_combatDefaultStage1(int round, monster enemy, string text) handleTracker($skill[%fn\, spit on them!], enemy, "auto_otherstuff"); return useSkill($skill[%fn\, spit on them!], true); } + + //[Patriotic Eagle] familiar skill that gives a useful buff + if (canUse($skill[%fn\, let\'s pledge allegiance to a Zone])) + { + return useSkill($skill[%fn\, let\'s pledge allegiance to a Zone], true); + } //duplicate turns the enemy from a single enemy into a mob containing 2 copies of this enemy. Doubling their stats and doubling their drops if(canUse($skill[Duplicate]) && (get_property("_sourceTerminalDuplicateUses").to_int() == 0) && !inAftercore() && !in_nuclear()) diff --git a/RELEASE/scripts/autoscend/combat/auto_combat_default_stage2.ash b/RELEASE/scripts/autoscend/combat/auto_combat_default_stage2.ash index 03251e85c..9f9a918b7 100644 --- a/RELEASE/scripts/autoscend/combat/auto_combat_default_stage2.ash +++ b/RELEASE/scripts/autoscend/combat/auto_combat_default_stage2.ash @@ -145,6 +145,31 @@ string auto_combatDefaultStage2(int round, monster enemy, string text) } } + if(!combat_status_check("banishercheck") && auto_wantToBanish(monster_phylum(enemy), my_location())) + { + string banishAction = banisherCombatString(monster_phylum(enemy), my_location(), true); + if(banishAction != "") + { + auto_log_info("Looking at banishAction: " + banishAction, "green"); + combat_status_add("banisher"); + if(index_of(banishAction, "skill") == 0) + { + handleTracker(monster_phylum(enemy), to_skill(substring(banishAction, 6)), "auto_banishes"); + } + else if(index_of(banishAction, "item") == 0) + { + handleTracker(monster_phylum(enemy), to_item(substring(banishAction, 5)), "auto_banishes"); + } + else + { + auto_log_warning("Unable to track banisher behavior: " + banishAction, "red"); + } + 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("phylumbanishercheck"); + } + // Free run in Avant Guard from Bodyguard before banishing for a few monsters if(!combat_status_check("banishercheck") && auto_wantToBanish(guardee, my_location())) { @@ -201,8 +226,8 @@ string auto_combatDefaultStage2(int round, monster enemy, string text) 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())) || (auto_wantToFreeRun(guardee, my_location()) || auto_wantToBanish(guardee, my_location())))) + // Free run from monsters we want to banish/phylumbanish but are unable to, or monsters on the free run list + if(!combat_status_check("freeruncheck") && ((auto_wantToFreeRun(enemy, my_location()) || auto_forceFreeRun(true) || auto_wantToBanish(enemy, my_location()) || auto_wantToBanish(monster_phylum(enemy), my_location())) || (auto_wantToFreeRun(guardee, my_location()) || auto_wantToBanish(guardee, my_location())))) { string freeRunAction = freeRunCombatString(enemy, my_location(), true); if(freeRunAction != "") diff --git a/RELEASE/scripts/autoscend/combat/auto_combat_header.ash b/RELEASE/scripts/autoscend/combat/auto_combat_header.ash index ec6b5640f..89ce11cee 100644 --- a/RELEASE/scripts/autoscend/combat/auto_combat_header.ash +++ b/RELEASE/scripts/autoscend/combat/auto_combat_header.ash @@ -39,7 +39,10 @@ boolean canSurvive(float mult); boolean hasClubEquipped(); string auto_saberTrickMeteorShowerCombatHandler(int round, monster enemy, string text); string findBanisher(int round, monster enemy, string text); +string findPhylumBanisher(int round, phylum enemyphylum, string text); +string banisherCombatString(phylum enemyphylum, location loc, boolean inCombat); string banisherCombatString(monster enemy, location loc, boolean inCombat); +string banisherCombatString(phylum enemyphylum, location loc); string banisherCombatString(monster enemy, location loc); string yellowRayCombatString(monster target, boolean inCombat, boolean noForceDrop); string yellowRayCombatString(monster target, boolean inCombat); diff --git a/RELEASE/scripts/autoscend/combat/auto_combat_util.ash b/RELEASE/scripts/autoscend/combat/auto_combat_util.ash index d2f52acfb..dc3d1c800 100644 --- a/RELEASE/scripts/autoscend/combat/auto_combat_util.ash +++ b/RELEASE/scripts/autoscend/combat/auto_combat_util.ash @@ -217,7 +217,7 @@ boolean isSniffed(monster enemy, skill sk) 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, Hunt] + foreach sk in $skills[Transcendent Olfaction, %fn\, fire a Red\, White and Blue Blast, Make Friends, Long Con, Perceive Soul, Gallapagosian Mating Call, Monkey Point, Offer Latte to Opponent, Motif, Hunt] { if(isSniffed(enemy, sk)) return true; } @@ -233,6 +233,10 @@ skill getSniffer(monster enemy, boolean inCombat) { return $skill[Transcendent Olfaction]; } + if(canUse($skill[%fn\, fire a Red, White and Blue Blast], true, inCombat) && !(have_effect($effect[Everything Looks Red, White and Blue]) > 0) && enemy.copyable) + { + return $skill[%fn\, fire a Red, White and Blue Blast]; + } if(canUse($skill[Make Friends], true , inCombat) && my_audience() >= 20 && !isSniffed(enemy, $skill[Make Friends])) { return $skill[Make Friends]; //avatar of sneaky pete specific skill @@ -490,6 +494,29 @@ string auto_saberTrickMeteorShowerCombatHandler(int round, monster enemy, string return "abort"; //must have a return } +string findPhylumBanisher(int round, monster enemy, string text) +{ + string banishAction = banisherCombatString(monster_phylum(enemy), my_location(), true); + if(banishAction != "") + { + auto_log_info("Looking at banishAction: " + banishAction, "green"); + if(index_of(banishAction, "skill") == 0) + { + handleTracker(monster_phylum(enemy), to_skill(substring(banishAction, 6)), "auto_banishes"); + } + else if(index_of(banishAction, "item") == 0) + { + handleTracker(monster_phylum(enemy), to_item(substring(banishAction, 5)), "auto_banishes"); + } + else + { + auto_log_warning("Unable to track banisher behavior: " + banishAction, "red"); + } + return banishAction; + } + return auto_combatHandler(round, enemy, text); +} + string findBanisher(int round, monster enemy, string text) { string banishAction = banisherCombatString(enemy, my_location(), true); @@ -517,6 +544,33 @@ string findBanisher(int round, monster enemy, string text) return auto_combatHandler(round, enemy, text); } +string banisherCombatString(phylum enemyPhylum, location loc, boolean inCombat) +{ + if(inAftercore()) + { + return ""; + } + + if(in_pokefam()) + { + return ""; + } + + //Check that we actually want to banish this thing. + if(!auto_wantToBanish(enemyPhylum, loc)) + return ""; + + if(inCombat) + auto_log_info("Finding a phylum banisher to use on " + enemyPhylum + " at " + loc, "green"); + + if(inCombat ? (my_familiar() == $familiar[Patriotic Eagle] && get_property("screechCombats").to_int() == 0) : (auto_have_familiar($familiar[Patriotic Eagle]) && (get_property("screechCombats").to_int() == 0))) + { + return "skill" + $skill[%fn\, Release the Patriotic Screech!]; + } + + return ""; +} + string banisherCombatString(monster enemy, location loc, boolean inCombat) { if(inAftercore()) @@ -667,7 +721,6 @@ string banisherCombatString(monster enemy, location loc, boolean inCombat) { return "skill " + $skill[Show Your Boring Familiar Pictures]; } - // 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]) && !(used contains "Bowl a Curveball") && useFree) { @@ -787,6 +840,11 @@ string banisherCombatString(monster enemy, location loc, boolean inCombat) return ""; } +string banisherCombatString(phylum enemyPhylum, location loc) +{ + return banisherCombatString(enemyPhylum, loc, false); +} + string banisherCombatString(monster enemy, location loc) { return banisherCombatString(enemy, loc, false); diff --git a/RELEASE/scripts/autoscend/iotms/mr2021.ash b/RELEASE/scripts/autoscend/iotms/mr2021.ash index e8c9f9782..1eccd499c 100644 --- a/RELEASE/scripts/autoscend/iotms/mr2021.ash +++ b/RELEASE/scripts/autoscend/iotms/mr2021.ash @@ -62,7 +62,7 @@ boolean auto_allowCrystalBall(monster predicted_monster, location loc) //if already forced by something else, no need to handle your ball //pre_adv, or simulatePreAdvForCrystalBall, handles this as it already tracks burningDelay and forced encounters - if(is_banished(predicted_monster) || auto_wantToReplace(predicted_monster,loc) || auto_wantToBanish(predicted_monster,loc)) + if(is_banished(predicted_monster) || auto_wantToReplace(predicted_monster,loc) || auto_wantToBanish(predicted_monster,loc) || auto_wantToBanish(monster_phylum(predicted_monster), loc)) { // next prediction is unwanted, do not allow return false; @@ -114,10 +114,10 @@ void simulatePreAdvForCrystalBall(location place) // used only when simulating maximizer equipment // replicates most of pre_adv monster queue checks in order to know if miniature crystal ball will be allowed - boolean burningDelay = ((auto_voteMonster(true) || isOverdueDigitize() || auto_sausageGoblin() || auto_backupTarget()) && place == solveDelayZone()); - boolean gettingLucky = (have_effect($effect[Lucky!]) > 0 && zone_hasLuckyAdventure(place)); + boolean burningDelay = auto_burningDelay(); + boolean gettingLucky = auto_gettingLucky(); boolean forcedNonCombat = auto_haveQueuedForcedNonCombat(); - boolean zoneQueueIgnored = (burningDelay || gettingLucky || forcedNonCombat); + boolean zoneQueueIgnored = auto_queueIgnore(); boolean considerCrystalBallBonus; if(!zoneQueueIgnored && get_property("auto_nextEncounter").to_monster() == $monster[none] && diff --git a/RELEASE/scripts/autoscend/iotms/mr2023.ash b/RELEASE/scripts/autoscend/iotms/mr2023.ash index 8485fb429..44b9c1a58 100644 --- a/RELEASE/scripts/autoscend/iotms/mr2023.ash +++ b/RELEASE/scripts/autoscend/iotms/mr2023.ash @@ -568,53 +568,63 @@ void auto_scepterSkills() { return; } - //Day 1 skills - if(my_daycount() == 1) + + if(canUse($skill[Aug. 24th: Waffle Day!]) && !get_property("_aug24Cast").to_boolean()) { - if(canUse($skill[Aug. 24th: Waffle Day!]) && !get_property("_aug24Cast").to_boolean()) - { - use_skill($skill[Aug. 24th: Waffle Day!]); //get some waffles to hopefully change some bad monsters to better ones - } - if(canUse($skill[Aug. 30th: Beach Day!]) && !get_property("_aug30Cast").to_boolean()) + use_skill($skill[Aug. 24th: Waffle Day!]); //get some waffles to hopefully change some bad monsters to better ones + } + if(canUse($skill[Aug. 28th: Race Your Mouse Day!]) && !get_property("_aug28Cast").to_boolean() && pathHasFamiliar()) + { + familiar hundred_fam = to_familiar(get_property("auto_100familiar")); + if (((in_avantGuard() && in_hardcore()) || (hundred_fam != $familiar[none] && (isAttackFamiliar(hundred_fam) || hundred_fam.block))) && have_familiar(findRockFamiliarInTerrarium())) { - use_skill($skill[Aug. 30th: Beach Day!]); //Rollover adventures + use_familiar(findRockFamiliarInTerrarium()); + use_skill($skill[Aug. 28th: Race Your Mouse Day!]); //Fam equipment to lower weight of attack familiar or Burly bodyguard (Avant Guard) for Gremlins } - if(canUse($skill[Aug. 28th: Race Your Mouse Day!]) && !get_property("_aug28Cast").to_boolean() && pathHasFamiliar()) + else if((!auto_hasStillSuit() && item_amount($item[Astral pet sweater]) == 0) || in_small()) { - familiar hundred_fam = to_familiar(get_property("auto_100familiar")); - if (((in_avantGuard() && in_hardcore()) || (hundred_fam != $familiar[none] && (isAttackFamiliar(hundred_fam) || hundred_fam.block))) && have_familiar(findRockFamiliarInTerrarium())) + if(!is100FamRun()) { - use_familiar(findRockFamiliarInTerrarium()); - use_skill($skill[Aug. 28th: Race Your Mouse Day!]); //Fam equipment to lower weight of attack familiar or Burly bodyguard (Avant Guard) for Gremlins + use_familiar(findNonRockFamiliarInTerrarium()); //equip non-rock fam to ensure we get tiny gold medal } - else if((!auto_hasStillSuit() && item_amount($item[Astral pet sweater]) == 0) || in_small()) + else { - if(!is100FamRun()) - { - use_familiar(findNonRockFamiliarInTerrarium()); //equip non-rock fam to ensure we get tiny gold medal - } - else - { - use_familiar(hundred_fam); // assuming non-rock familiar - } - use_skill($skill[Aug. 28th: Race Your Mouse Day!]); //Fam equipment + use_familiar(hundred_fam); // assuming non-rock familiar } + use_skill($skill[Aug. 28th: Race Your Mouse Day!]); //Fam equipment } } - //Day 2+ skills - if(my_daycount() >= 2) + if(canUse($skill[Aug. 30th: Beach Day!]) && !get_property("_aug30Cast").to_boolean() && get_property("_augSkillsCast").to_int()< 5) + { + use_skill($skill[Aug. 30th: Beach Day!]); //Rollover adventures + } +} + +void auto_scepterRollover() +{ + if(canUse($skill[Aug. 13th: Left\/Off Hander\'s Day!]) && !get_property("_aug13Cast").to_boolean() && + get_property("_augSkillsCast").to_int()< 5 && numeric_modifier(equipped_item($slot[off-hand]),"Adventures") > 0 && weapon_hands(equipped_item($slot[off-hand])) == 0) + { + use_skill($skill[Aug. 13th: Left\/Off Hander\'s Day!]); //bump up the off-hand + } + if(canUse($skill[Aug. 27th: Just Because Day!]) && !get_property("_aug27Cast").to_boolean() && get_property("_augSkillsCast").to_int()< 5) + { + use_skill($skill[Aug. 27th: Just Because Day!]); //3 random buffs + } + //Get mainstats as a last resort + if(get_property("_augSkillsCast").to_int()< 5) { - if(canUse($skill[Aug. 24th: Waffle Day!]) && !get_property("_aug24Cast").to_boolean()) + if(canUse($skill[Aug. 12th: Elephant Day!]) && !get_property("_aug12Cast").to_boolean() && my_primestat() == $stat[muscle]) { - use_skill($skill[Aug. 24th: Waffle Day!]); //get some waffles to hopefully change some bad monsters to better ones + use_skill($skill[Aug. 12th: Elephant Day!]); //get muscle stubstats } - if(canUse($skill[Aug. 28th: Race Your Mouse Day!]) && !get_property("_aug28Cast").to_boolean() && ((!auto_hasStillSuit() && item_amount($item[Astral pet sweater]) == 0) || in_small())) + if(canUse($skill[Aug. 11th: Presidential Joke Day!]) && !get_property("_aug11Cast").to_boolean() && my_primestat() == $stat[mysticality]) { - if(!is100FamRun()) - { - handleFamiliar("stat"); //get any familiar equipped if not in a 100% run - } - use_skill($skill[Aug. 28th: Race Your Mouse Day!]); //Fam equipment + use_skill($skill[Aug. 11th: Presidential Joke Day!]); //get mysticality stubstats + } + if(canUse($skill[Aug. 23rd: Ride the Wind Day!]) && !get_property("_aug23Cast").to_boolean() && my_primestat() == $stat[moxie]) + { + use_skill($skill[Aug. 23rd: Ride the Wind Day!]); //get moxies stubstats } } } @@ -834,6 +844,281 @@ void auto_handleJillOfAllTrades() return; } +boolean auto_haveEagle() +{ + if(auto_have_familiar($familiar[Patriotic Eagle])) + { + return true; + } + return false; +} + +string activeCitZoneMod() // get the active Citizen of a Zone mods, if any +{ + if(!auto_haveEagle() || have_effect($effect[Citizen of a Zone]) == 0) + { + return "none"; + } + visit_url("desc_effect.php?whicheffect=9391a5f7577e30ac3af6309804da6944"); // visit url to refresh Mafia's _citizenZoneMods preference + string activeCitZoneMod = get_property("_citizenZoneMods").to_lower_case(); + return activeCitZoneMod; +} + +boolean auto_citizenZonePrep(string goal) +{ + string activeCitZoneMod = activeCitZoneMod(); + if(my_meat() < meatReserve() && goal != "mp") + { + return false; //don't attempt to change if we don't have a lot of meat and we are going for something other than mp + } + if(have_effect($effect[Citizen of a Zone]) > 0 && contains_text(activeCitZoneMod, goal)) + { + auto_log_info("No need to remove Citizen of a Zone"); + return false; + } + if(have_effect($effect[Citizen of a Zone]) > 0 && !contains_text(activeCitZoneMod, goal) && item_amount($item[Soft Green Echo Eyedrop Antidote]) == 0) + { + auto_log_info("Can't remove Citizen of a Zone"); + return false; + } + if(!contains_text(activeCitZoneMod, goal) && item_amount($item[Soft Green Echo Eyedrop Antidote]) > 0) //try to remove Citizen of a Zone + { + uneffect($effect[Citizen of a Zone]); + if(have_effect($effect[Citizen of a Zone]) > 0) + { + auto_log_debug("Tried to remove Citizen of a Zone but couldn't"); + return false; + } + } + return true; +} + +boolean auto_getCitizenZone(location loc) +{ + familiar eagle = $familiar[Patriotic Eagle]; + //zones are approximately organized by autoscend level quest structure + boolean[location] meatZones = $locations[The Battlefield (Frat Uniform), The Hidden Hospital, The Haunted Bathroom, The Castle in the Clouds in the Sky (Basement), + Lair of the Ninja Snowmen, The Defiled Cranny, The Laugh Floor, The Batrat and Ratbat Burrow, The Sleazy Back Alley]; + boolean[location] itemZones = $locations[A Massive Ziggurat, The Haunted Laundry Room, Whitey's Grove, The Icy Peak, Itznotyerzitz Mine, + The Dark Heart of the Woods, The Hidden Temple, The Haunted Library, The Bat Hole Entrance, Noob Cave]; + boolean[location] initZones = $locations[The Feeding Chamber, An Unusually Quiet Barroom Brawl, An Overgrown Shrine (Northeast), + Oil Peak, Cobb's Knob Kitchens, The VERY Unquiet Garves, The Haunted Kitchen]; + //mp zones are organized by 20-30 mp regen then 10-15 mp regen and then approximately autoscend level quest structure + boolean[location] mpZones = $locations[Sonofa Beach, The Themthar Hills, The Upper Chamber, Inside the Palindome, An Overgrown Shrine (Northwest), A-boo Peak, Hippy Camp, + Megalo-City, Shadow Rift, Vanya's Castle, The Hatching Chamber, Wartime Hippy Camp (Frat Disguise), Frat House, The Middle Chamber, The Black Forest, + The Haunted Ballroom, The Red Zeppelin, An Overgrown Shrine (Southwest), The Hidden Park, Twin Peak, The Smut Orc Logging Camp, The Daily Dungeon, The Spooky Forest]; + string activeCitZoneMod = activeCitZoneMod(); + string goal; + + if(!can_adventure(loc)) + { + return false; + } + //set goal for tracking + if(meatZones contains loc) + { + goal = "meat"; + } + else if(itemZones contains loc) + { + goal = "item"; + } + else if(initZones contains loc) + { + goal = "init"; + } + else if(mpZones contains loc) + { + goal = "mp"; + } + else + { + //if for some reason we make it into the location getCitizenZone and it's not in any of the defined zones, get the item buff + auto_getCitizenZone("item"); + } + if(!auto_citizenZonePrep(goal)) + { + return false; + } + handleFamiliar(eagle); + set_property("auto_forceFreeRun", true); + if(autoAdv(loc)) + { + activeCitZoneMod = activeCitZoneMod(); + if(contains_text(activeCitZoneMod, goal)) //need this if statement separate in case we hit a non-combat + { + handleTracker("Citizen of a Zone: " + goal, "auto_otherstuff"); + return true; + } + else + { + auto_log_debug("Attempted to get citizen of a zone buff " + goal + " however we failed."); + return false; + } + } + else + { + auto_log_debug("Attempted to get citizen of a zone buff " + goal + " however we failed."); + return false; + } +} + +boolean auto_getCitizenZone(string goal) +{ + familiar eagle = $familiar[Patriotic Eagle]; + //zones are approximately organized by autoscend level quest structure + boolean[location] meatZones = $locations[The Battlefield (Frat Uniform), The Hidden Hospital, The Haunted Bathroom, The Castle in the Clouds in the Sky (Basement), + Lair of the Ninja Snowmen, The Defiled Cranny, The Laugh Floor, The Batrat and Ratbat Burrow, The Sleazy Back Alley]; + boolean[location] itemZones = $locations[A Massive Ziggurat, The Haunted Laundry Room, Whitey's Grove, The Icy Peak, Itznotyerzitz Mine, + The Dark Heart of the Woods, The Hidden Temple, The Haunted Library, The Bat Hole Entrance, Noob Cave]; + boolean[location] initZones = $locations[The Feeding Chamber, An Unusually Quiet Barroom Brawl, An Overgrown Shrine (Northeast), + Oil Peak, Cobb's Knob Kitchens, The VERY Unquiet Garves, The Haunted Kitchen]; + //mp zones are organized by 20-30 mp regen then 10-15 mp regen and then approximately autoscend level quest structure + boolean[location] mpZones = $locations[Sonofa Beach, The Themthar Hills, The Upper Chamber, Inside the Palindome, An Overgrown Shrine (Northwest), A-boo Peak, Hippy Camp, + Megalo-City, Shadow Rift, Vanya's Castle, The Hatching Chamber, Wartime Hippy Camp (Frat Disguise), Frat House, The Middle Chamber, The Black Forest, + The Haunted Ballroom, The Red Zeppelin, An Overgrown Shrine (Southwest), The Hidden Park, Twin Peak, The Smut Orc Logging Camp, The Daily Dungeon, The Spooky Forest]; + string activeCitZoneMod = activeCitZoneMod(); + + if(!auto_citizenZonePrep(goal)) + { + return false; + } + switch(goal) + { + case "meat": //Get +50% meat + foreach loc in meatZones + { + if(!can_adventure(loc)) + { + continue; + } + handleFamiliar(eagle); + set_property("auto_forceFreeRun", true); + if(autoAdv(loc)) + { + activeCitZoneMod = activeCitZoneMod(); + if(contains_text(activeCitZoneMod, goal)) //need this if statement separate in case we hit a non-combat + { + handleTracker("Citizen of a Zone: " + goal, "auto_otherstuff"); + return true; + } + else + { + auto_log_debug("Attempted to get citizen of a zone buff " + goal + " however we failed."); + return false; + } + } + else + { + auto_log_debug("Attempted to get citizen of a zone buff " + goal + " however we failed."); + return false; + } + } + break; + case "initiative": //Get +100% initiative. Give the option to add this to a quest later, but currently unused + foreach loc in initZones + { + if(!can_adventure(loc)) + { + continue; + } + handleFamiliar(eagle); + set_property("auto_forceFreeRun", true); + if(autoAdv(loc)) + { + activeCitZoneMod = activeCitZoneMod(); + if(contains_text(activeCitZoneMod, goal)) //need this if statement separate in case we hit a non-combat + { + handleTracker("Citizen of a Zone: " + goal, "auto_otherstuff"); + return true; + } + else + { + auto_log_debug("Attempted to get citizen of a zone buff " + goal + " however we failed."); + return false; + } + } + else + { + auto_log_debug("Attempted to get citizen of a zone buff " + goal + " however we failed."); + return false; + } + } + break; + case "mp": //Get 20-30 mp regen or 10-15 mp regen. Currently only gets 10-15 mp regen in The Spooky Forest + foreach loc in mpZones + { + if(!can_adventure(loc)) + { + continue; + } + handleFamiliar(eagle); + set_property("auto_forceFreeRun", true); + if(autoAdv(loc)) + { + activeCitZoneMod = activeCitZoneMod(); + if(contains_text(activeCitZoneMod, goal)) //need this if statement separate in case we hit a non-combat + { + handleTracker("Citizen of a Zone: " + goal, "auto_otherstuff"); + return true; + } + else + { + auto_log_debug("Attempted to get citizen of a zone buff " + goal + " however we failed."); + return false; + } + } + else + { + auto_log_debug("Attempted to get citizen of a zone buff " + goal + " however we failed."); + return false; + } + } + break; + default: //Get +30% item by default + foreach loc in itemZones + { + if(!can_adventure(loc)) + { + continue; + } + handleFamiliar(eagle); + set_property("auto_forceFreeRun", true); + if(autoAdv(loc)) + { + activeCitZoneMod = activeCitZoneMod(); + if(contains_text(activeCitZoneMod, goal)) //need this if statement separate in case we hit a non-combat + { + handleTracker("Citizen of a Zone: " + goal, "auto_otherstuff"); + return true; + } + else + { + auto_log_debug("Attempted to get citizen of a zone buff " + goal + " however we failed."); + return false; + } + } + else + { + auto_log_debug("Attempted to get citizen of a zone buff " + goal + " however we failed."); + return false; + } + } + break; + } + return false; +} + +familiar auto_forceEagle() +{ + //Force the Patriotic Eagle if we used a banish recently and can't use one until we burn 11 combats with the Eagle + if(auto_haveEagle() && get_property("screechCombats").to_int() > 0 && !auto_queueIgnore()) + { + return $familiar[Patriotic Eagle]; + } + return $familiar[none]; +} + boolean auto_haveBurningLeaves() { return auto_is_valid($item[A Guide to Burning Leaves]) && get_campground() contains $item[A Guide to Burning Leaves]; diff --git a/RELEASE/scripts/autoscend/paths/dark_gyffte.ash b/RELEASE/scripts/autoscend/paths/dark_gyffte.ash index c75186c00..7e085590b 100644 --- a/RELEASE/scripts/autoscend/paths/dark_gyffte.ash +++ b/RELEASE/scripts/autoscend/paths/dark_gyffte.ash @@ -43,7 +43,7 @@ boolean bat_wantHowl(location loc) monster[int] monsters = get_monsters(loc); foreach i in monsters { - if (!(banished contains monsters[i]) && (auto_wantToBanish(monsters[i], loc))) { + if (!(banished contains monsters[i]) && (auto_wantToBanish(monsters[i], loc) || auto_wantToBanish(monster_phylum(monsters[i]), loc))) { return true; } } diff --git a/RELEASE/scripts/autoscend/quests/level_02.ash b/RELEASE/scripts/autoscend/quests/level_02.ash index 115d72049..6b02ec49e 100644 --- a/RELEASE/scripts/autoscend/quests/level_02.ash +++ b/RELEASE/scripts/autoscend/quests/level_02.ash @@ -103,6 +103,12 @@ boolean L2_mosquito() // Arboreal Respite choice adventure has a delay of 5 adventures. return false; } + + if(activeCitZoneMod() == "none") //if we don't already have a Citizen of a Zone buff, might as well get this + { + auto_getCitizenZone($location[The Spooky Forest]); + } + auto_log_info("Trying to find a mosquito.", "blue"); if(autoAdv($location[The Spooky Forest])) { diff --git a/RELEASE/scripts/autoscend/quests/level_07.ash b/RELEASE/scripts/autoscend/quests/level_07.ash index 5f7d62ae7..916fc855e 100644 --- a/RELEASE/scripts/autoscend/quests/level_07.ash +++ b/RELEASE/scripts/autoscend/quests/level_07.ash @@ -159,6 +159,12 @@ boolean L7_defiledAlcove() return false; } + if (isBanishedPhyla($phylum[undead]) && get_property("screechCombats").to_int() > 0) + { + set_property("screechDelay", true); + return false; //No sense in trying to go to the cyrpt if undead are banished + } + if (get_property("cyrptAlcoveEvilness").to_int() > (14 + evilBonus)) { provideInitiative(850, $location[The Defiled Alcove], true); @@ -385,6 +391,12 @@ boolean L7_crypt() return false; } + if (isBanishedPhyla($phylum[undead]) && get_property("screechCombats").to_int() > 0) + { + set_property("screechDelay", true); + return false; //No sense in trying to go to the cyrpt if undead are banished + } + // make sure quest status is correct before we attempt to adventure. visit_url("crypt.php"); use(1, $item[Evilometer]); diff --git a/RELEASE/scripts/autoscend/quests/level_08.ash b/RELEASE/scripts/autoscend/quests/level_08.ash index c155fb0e2..637095f3d 100644 --- a/RELEASE/scripts/autoscend/quests/level_08.ash +++ b/RELEASE/scripts/autoscend/quests/level_08.ash @@ -668,6 +668,8 @@ boolean L8_trapperNinjaLair() adjustEdHat("myst"); } + auto_getCitizenZone($location[Lair of the Ninja Snowmen]); //since we want to adventure in the Lair anyway + if(autoAdv($location[Lair of the Ninja Snowmen])) { return true; diff --git a/RELEASE/scripts/autoscend/quests/level_11.ash b/RELEASE/scripts/autoscend/quests/level_11.ash index 3e1a5bbaa..ff2230620 100644 --- a/RELEASE/scripts/autoscend/quests/level_11.ash +++ b/RELEASE/scripts/autoscend/quests/level_11.ash @@ -492,6 +492,7 @@ boolean LX_unlockManorSecondFloor() { auto_log_info("Attemping to use Map the Monsters to olfact a writing desk."); } } + auto_getCitizenZone($location[The Haunted Library]); //since want to adventure in the Haunted Library anyway return autoAdv($location[The Haunted Library]); } @@ -814,6 +815,11 @@ boolean L11_blackMarket() { return false; } + if (isBanishedPhyla($phylum[beast]) && get_property("screechCombats").to_int() > 0) + { + set_property("screechDelay", true); + return false; // Can't get the reassembled blackbird if beasts are banished + } if ($location[The Black Forest].turns_spent > 12 && !in_avantGuard()) { @@ -2758,6 +2764,12 @@ boolean L11_shenCopperhead() return false; } + if (isBanishedPhyla($phylum[dude])) // No need to check for Screech Combats because there's nothing in here we want to screech away + { + set_property("screechDelay", true); + return false; //Probably should delay the Copperhead Club because dudes are important here + } + if (internalQuestStatus("questL11Shen") == 2 || internalQuestStatus("questL11Shen") == 4 || internalQuestStatus("questL11Shen") == 6) { if(is_professor()) @@ -2913,6 +2925,12 @@ boolean L11_palindome() total = total + item_amount($item[Photograph Of God]); total = total + item_amount($item[Photograph Of A Dog]); + if(isBanishedPhyla($phylum[dude]) && get_property("screechCombats").to_int() > 0) + { + set_property("screechDelay", true); + return false; //If new phylum banishers come out, this should be updated. + } + boolean lovemeDone = hasILoveMeVolI() || (internalQuestStatus("questL11Palindome") >= 1); if(!lovemeDone && (get_property("palindomeDudesDefeated").to_int() >= 5)) { @@ -2969,6 +2987,11 @@ boolean L11_palindome() restoreSetting("lastGuildStoreOpen"); return true; } + if(isBanishedPhyla($phylum[beast]) && get_property("screechCombats").to_int() > 0) + { + set_property("screechDelay", true); + return false; //If new phylum banishers come out, this should be updated. + } // +item is nice to get that food bat_formBats(); auto_lostStomach(true); diff --git a/RELEASE/scripts/autoscend/quests/level_12.ash b/RELEASE/scripts/autoscend/quests/level_12.ash index 5ca6a725e..e0ade3a37 100644 --- a/RELEASE/scripts/autoscend/quests/level_12.ash +++ b/RELEASE/scripts/autoscend/quests/level_12.ash @@ -1843,6 +1843,7 @@ boolean L12_themtharHills() return autoLuckyAdv($location[The Castle in the Clouds in the Sky (Top Floor)]); } + auto_getCitizenZone("meat"); //because it can take a turn, get this before getting any other buffs provideMeat(1800, true, false); // Do as much as possible to get meat drops { diff --git a/RELEASE/scripts/autoscend/quests/level_13.ash b/RELEASE/scripts/autoscend/quests/level_13.ash index 2b1012750..6731ec57d 100644 --- a/RELEASE/scripts/autoscend/quests/level_13.ash +++ b/RELEASE/scripts/autoscend/quests/level_13.ash @@ -101,6 +101,9 @@ boolean EightBitRealmHandler() case "red": // limited buff that is helpful for 3 of 4 8-bit zones buffMaintain($effect[shadow waters]); + if(meat_drop_modifier() < 395){ + auto_getCitizenZone("meat"); + } adv_spent = autoAdv($location[The Fungus Plains]); break; case "blue": @@ -109,6 +112,9 @@ boolean EightBitRealmHandler() case "green": // limited buff that is helpful for 3 of 4 8-bit zones buffMaintain($effect[shadow waters]); + /*if(item_drop_modifier() < 370){ + auto_getCitizenZone("item"); + }*/ adv_spent = autoAdv($location[Hero\'s Field]); break; default: @@ -1472,6 +1478,9 @@ boolean L13_towerNSTower() } equipBaseline(); provideMeat(626, true, false); + if(meat_drop_modifier() < 475){ + auto_getCitizenZone("meat"); + } if(in_zombieSlayer()) { diff --git a/RELEASE/scripts/autoscend/quests/level_any.ash b/RELEASE/scripts/autoscend/quests/level_any.ash index 6753cfeec..6b5942671 100644 --- a/RELEASE/scripts/autoscend/quests/level_any.ash +++ b/RELEASE/scripts/autoscend/quests/level_any.ash @@ -608,10 +608,18 @@ boolean LX_dailyDungeonToken() { return false; //can switch to cubeling so wait until we have all the tool drops before doing daily dungeon } + boolean needPole = true; + if(auto_haveCCSC()) + { + needPole = false; // candy cane sword cane can act as an eleven-foot pole so don't buy if we already have it + } if(can_interact()) //if you can not use cubeling then mallbuy missing tools in casual and postronin { - auto_buyUpTo(1, $item[Eleven-Foot Pole]); + if(needPole) + { + auto_buyUpTo(1, $item[Eleven-Foot Pole]); + } auto_buyUpTo(1, $item[Pick-O-Matic Lockpicks]); if(!possessEquipment($item[Ring of Detect Boring Doors])) //do not buy a second one if already equipped { @@ -620,8 +628,8 @@ boolean LX_dailyDungeonToken() } //if you can not use the cubeling then pull the missing tools if possible - if (!auto_haveCCSC() && item_amount($item[Eleven-Foot Pole]) == 0) { - // don't need the Eleven-foot Pole if we have the Candy Cane Sword Cane as it adds turn free NCs. + if(needPole) + { pullXWhenHaveY($item[Eleven-Foot Pole], 1, 0); } if(!possessEquipment($item[Ring of Detect Boring Doors])) //do not pull a second one if already equipped @@ -1071,3 +1079,42 @@ boolean LX_dronesOut() } return false; } + +boolean LX_lastChance() +{ + //miscellaneous calls that aren't powerlevelling but need to be done at some point based on certain conditions + if(get_property("screechDelay").to_boolean()) + { + auto_log_warning("Patriotic Eagle's screech banished something we need and we can't adventure anywhere else"); + while(get_property("screechCombats").to_int() > 0 && my_adventures() > 2) + { + handleFamiliar($familiar[Patriotic Eagle]); //force eagle to be used + if(LX_getDigitalKey() || LX_getStarKey()) + { + continue; + } + else + { + //Nothing else to do but go here + autoAdv($location[Noob Cave]); + continue; + } + } + if(get_property("screechCombats").to_int() > 0) + { + auto_log_warning("Couldn't clear screech delay without running out of adventures"); + return false; + } + autoAdv($location[Noob Cave]); //adventure here to banish constructs and be able to progress other quests + set_property("screechDelay", false); + return true; + } + + // Need the digital key and star key so if we have nothing to do before the L13 quest, might as well do them here + if (LX_getDigitalKey() || LX_getStarKey()) + { + return true; + } + + return false; +} \ No newline at end of file