From 6adca344c8263f29907e8864467ee589aee4c286 Mon Sep 17 00:00:00 2001 From: Daniel Simich <21962115+dsimich@users.noreply.github.com> Date: Fri, 18 Oct 2024 09:38:45 -0400 Subject: [PATCH] Nuns in AG --- RELEASE/scripts/autoscend/auto_acquire.ash | 2 + .../scripts/autoscend/combat/auto_combat.ash | 3 +- .../combat/auto_combat_default_stage1.ash | 7 +++ .../scripts/autoscend/paths/avant_guard.ash | 5 +- RELEASE/scripts/autoscend/quests/level_12.ash | 53 +++++++++++++++++++ 5 files changed, 68 insertions(+), 2 deletions(-) diff --git a/RELEASE/scripts/autoscend/auto_acquire.ash b/RELEASE/scripts/autoscend/auto_acquire.ash index 600774e5b..06c1bec2d 100644 --- a/RELEASE/scripts/autoscend/auto_acquire.ash +++ b/RELEASE/scripts/autoscend/auto_acquire.ash @@ -810,6 +810,8 @@ int handlePulls(int day) { take_closet(1, $item[Fake Washboard]); } + // pulls for Avant Guard path + ag_pulls(); } // do this regardless of day if we still need to complete the bridge. diff --git a/RELEASE/scripts/autoscend/combat/auto_combat.ash b/RELEASE/scripts/autoscend/combat/auto_combat.ash index a4d66e2c4..287ecbe8a 100644 --- a/RELEASE/scripts/autoscend/combat/auto_combat.ash +++ b/RELEASE/scripts/autoscend/combat/auto_combat.ash @@ -119,7 +119,8 @@ string auto_combatHandler(int round, monster enemy, string text) } //If in Avant Guard, want to make sure the enemy is set correctly to the bodyguard - if(in_avantGuard() && ag_is_bodyguard()) + //If waffle has been used ignore and just use enemy as set in combat handler + if(in_avantGuard() && ag_is_bodyguard() && get_property("_auto_combatState") != "(it11311)") { enemy = to_monster(substring(get_property("lastEncounter"), 0, index_of(get_property("lastEncounter"), " acting as"))); } diff --git a/RELEASE/scripts/autoscend/combat/auto_combat_default_stage1.ash b/RELEASE/scripts/autoscend/combat/auto_combat_default_stage1.ash index 6a95658b1..fb9b0b1ef 100644 --- a/RELEASE/scripts/autoscend/combat/auto_combat_default_stage1.ash +++ b/RELEASE/scripts/autoscend/combat/auto_combat_default_stage1.ash @@ -39,6 +39,13 @@ string auto_combatDefaultStage1(int round, monster enemy, string text) retval = auto_combatWereProfessorStage1(round, enemy, text); if(retval != "") return retval; + //In Avant Guard, waffle the bodyguard in Themthar Hills ASAP to replace with the Dirty Thieving Brigand + if(in_avantGuard() && ag_is_bodyguard() && item_amount($item[waffle]) > 0 && my_location() == $location[The Themthar Hills] && enemy != $monster[Dirty Thieving Brigand]) + { + handleTracker(enemy, $item[waffle], "auto_replaces"); + return useItems($item[waffle], $item[none]); + } + if(enemy == $monster[Your Shadow]) { if(in_plumber()) diff --git a/RELEASE/scripts/autoscend/paths/avant_guard.ash b/RELEASE/scripts/autoscend/paths/avant_guard.ash index 81dff295c..c339ca6d2 100644 --- a/RELEASE/scripts/autoscend/paths/avant_guard.ash +++ b/RELEASE/scripts/autoscend/paths/avant_guard.ash @@ -13,7 +13,6 @@ void ag_initializeSettings() visit_url("inv_familiar.php?pwd=&which=3&whichitem=11631"); } //set_property("auto_100familiar", "Burly Bodyguard"); - set_property("auto_skipNuns", true); set_property("auto_skipUnlockGuild", true); set_property("auto_nonAdvLoc", false); } @@ -28,6 +27,10 @@ void ag_pulls() { pullXWhenHaveY($item[mini kiwi invisible dirigible], 1, 0); } + if(auto_is_valid($item[waffle]) && auto_haveAugustScepter()) //Only want waffles if we can summon them + { + pullXWhenHaveY($item[waffle],1,(my_daycount() - 1) * (3 + (my_daycount() > 1 ? 1 : 0))); //pull waffles everyday + } } } diff --git a/RELEASE/scripts/autoscend/quests/level_12.ash b/RELEASE/scripts/autoscend/quests/level_12.ash index f4cbb50df..48b0c2fec 100644 --- a/RELEASE/scripts/autoscend/quests/level_12.ash +++ b/RELEASE/scripts/autoscend/quests/level_12.ash @@ -1749,6 +1749,54 @@ boolean L12_themtharHills() auto_log_info("Themthar Nuns!", "blue"); } + //can only do this in Avant Guard in 6 turns in HC or 8 turns in Normal + set_property("auto_delayWar", false); + if(in_avantGuard()) + { + auto_log_info("Checking how much meat drop we can get"); + if((in_hardcore() && item_amount($item[waffle]) <= 6 && $location[The Themthar Hills].turns_spent + item_amount($item[waffle]) > 6) || + (item_amount($item[waffle]) <= 8 && $location[The Themthar Hills].turns_spent + item_amount($item[waffle]) > 8)) + { + return false; + } + int meatProvide = (in_hardcore() ? provideMeat(1800, true, true) : provideMeat(1600, true, true)); + if((in_hardcore() && !(meatProvide >= 1800)) || !(meatProvide >= 1600)) + { + int bonusMeat = 0; + boolean getInhaler = false; + boolean doRufus = false; + if(have_effect($effect[Sinuses For Miles]) <= 0 && item_amount($item[Mick\'s IcyVapoHotness Inhaler]) < 1 && auto_is_valid($item[Mick\'s IcyVapoHotness Inhaler]) && cloversAvailable() > 0 && zone_isAvailable($location[The Castle in the Clouds in the Sky (Top Floor)])) + { + bonusMeat += 200; + getInhaler = true; + } + if(auto_havePayPhone() && !(get_property("_shadowAffinityToday").to_boolean()) && item_amount($item[Rufus\'s shadow lodestone]) < 1 ) + { + bonusMeat += 200; + doRufus = true; + } + int bonusMeatNeeded = (in_hardcore() ? (1800 - meatProvide) : (1600 - meatProvide)); + if(bonusMeatNeeded - bonusMeat <= 0) + { + if(getInhaler) + { + auto_log_info("Getting Inhaler"); + return autoLuckyAdv($location[The Castle in the Clouds in the Sky (Top Floor)]); + } + if(doRufus) + { + auto_log_info("Doing Pay Phone Quest for Shadow Waters"); + return auto_doPhoneQuest(); + } + } + else + { + set_property("auto_delayWar", true); + return false; + } + } + } + // Target 1000 + 400% = 5000 meat per brigand. Of course we want more, but don\'t bother unless we can get this. float meat_need = 400.00; //count inhaler if we have one or if we have a clover to obtain one and can use one @@ -2357,6 +2405,11 @@ boolean L12_islandWar() { return false; //delay for You, Robot path } + if(get_property("auto_delayWar") == true) + { + set_property("auto_delayWar", false); + return false; //delay war at Nuns so we can maybe get the Inhaler + } if(L12_preOutfit() || L12_getOutfit() || L12_startWar()) { return true;