Skip to content

Commit

Permalink
Initial Eagle Support, CMC change, and bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dsimich committed Oct 7, 2023
1 parent 8ad87f9 commit baa01e7
Show file tree
Hide file tree
Showing 8 changed files with 107 additions and 5 deletions.
12 changes: 12 additions & 0 deletions BUILD/monsters/phylumbanish.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
dude loc:The Black Forest
dude loc:Twin Peak
dude loc:Whitey's Grove
beast loc:The Hidden Park
beast loc:Inside the Palindome
beast loc:The Penultimate Fantasy Airship
construct loc:The Penultimate Fantasy Airship
undead loc:The Haunted Library
undead loc:The Red Zeppelin
undead loc:The Haunted Wine Cellar
undead loc:The Haunted Boiler Room
undead loc:The Middle Chamber
13 changes: 13 additions & 0 deletions RELEASE/scripts/autoscend/auto_util.ash
Original file line number Diff line number Diff line change
Expand Up @@ -841,6 +841,15 @@ boolean auto_wantToBanish(monster enemy, location loc)
return monstersToBanish[enemy];
}

boolean auto_wantPhylumBanish(phylum enemyphylum, location loc)
{
location locCache = my_location();
set_location(loc);
boolean [phylum] phylumToBanish = auto_getMonsters("phylumbanish");
set_location(locCache);
return phylumToBanish[enemyphylum];
}

boolean canBanish(monster enemy, location loc)
{
return banisherCombatString(enemy, loc) != "";
Expand Down Expand Up @@ -890,6 +899,10 @@ boolean adjustForBanish(string combat_string)
{
return autoEquip($item[Kremlin\'s Greatest Briefcase]);
}
if(combat_string == "skill" + $skill[%fn\, Release the Patriotic Screech!])
{
return use_familiar($familiar[Patriotic Eagle]);
}
if(combat_string == "skill " + $skill[Beancannon])
{
foreach beancan in $items[Frigid Northern Beans, Heimz Fortified Kidney Beans, Hellfire Spicy Beans, Mixed Garbanzos and Chickpeas, Pork 'n' Pork 'n' Pork 'n' Beans, Shrub's Premium Baked Beans, Tesla's Electroplated Beans, Trader Olaf's Exotic Stinkbeans, World's Blackest-Eyed Peas]
Expand Down
3 changes: 3 additions & 0 deletions RELEASE/scripts/autoscend/autoscend_header.ash
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,8 @@ void auto_useBlackMonolith();
boolean auto_haveAugustScepter();
void auto_scepterSkills();
void auto_lostStomach();
void auto_haveEagle();
boolean auto_getCitizenZone(string goal);

########################################################################################################
//Defined in autoscend/paths/actually_ed_the_undying.ash
Expand Down Expand Up @@ -1626,6 +1628,7 @@ boolean canYellowRay(monster target);
boolean canYellowRay();
boolean[string] auto_banishesUsedAt(location loc);
boolean auto_wantToBanish(monster enemy, location loc);
boolean auto_wantPhylumBanish(phylum enemyphylum, location loc);
boolean canBanish(monster enemy, location loc);
boolean adjustForBanish(string combat_string);
boolean adjustForBanishIfPossible(monster enemy, location loc);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,13 @@ 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 ($locations[The Haunted Library, The Haunted Laundry Room, Whitey\'s Grove, Lair of the Ninja Snowmen, The Hidden Hospital, The Haunted Bathroom, An Oasis, The Haunted Kitchen, Oil Peak] contains my_location() && canUse($skill[%fn\, let's pledge allegiance to a Zone]))
{
handleTracker($skill[%fn\, let's pledge allegiance to a Zone!], enemy, "auto_otherstuff");
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())
Expand Down
8 changes: 7 additions & 1 deletion RELEASE/scripts/autoscend/combat/auto_combat_util.ash
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,9 @@ string banisherCombatString(monster enemy, location loc, boolean inCombat)
if(!auto_wantToBanish(enemy, loc))
return "";

if(!auto_wantPhylumBanish(enemy.phylum, loc))
return "";

if(inCombat)
auto_log_info("Finding a banisher to use on " + enemy + " at " + loc, "green");

Expand Down Expand Up @@ -613,7 +616,10 @@ string banisherCombatString(monster enemy, location loc, boolean inCombat)
{
return "skill " + $skill[Show Your Boring Familiar Pictures];
}
if(auto_have_skill($skill[%fn\, Release the Patriotic Screech!]) && !(used contains "Release the Patriotic Screech!") && auto_wantPhylumBanish(enemy.phylum, loc))
{
return "skill" + $skill[%fn\, Release the Patriotic Screech!];
}
// 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"))
{
Expand Down
8 changes: 7 additions & 1 deletion RELEASE/scripts/autoscend/iotms/mr2021.ash
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,13 @@ void auto_CMCconsult()
else if(auto_CMCconsultsLeft() <= 2 && freeCrafts() >= 5 && possessEquipment($item[ice crown]) && my_meat() >= meatReserve())
{
//only looking for Breathitin from at least 11 fights spent underground
if(my_location().environment != "underground")
string[int] lCEMap;
lCEMap = split_string(get_property("lastCombatEnvironments",""));
int uTurns;
foreach turn in lCEMap {
if (lCEMap[turn] == "u") {uTurns +=1};
}
if(uTurns < 11)
{
//if Breathitin was not available last turn and last location was not underground it will still not be available now so no visit needed
return;
Expand Down
49 changes: 48 additions & 1 deletion RELEASE/scripts/autoscend/iotms/mr2023.ash
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ void auto_scepterSkills()
{
if(!is100FamRun())
{
handleFamiliar("stat"); //get any familiar equipped if not in a 100% run
use_familiar(findNonRockFamiliarInTerrarium()); //equip non-rock fam to ensure we get tiny gold medal
}
use_skill($skill[Aug. 28th: Race Your Mouse Day!]); //Fam equipment
}
Expand All @@ -474,3 +474,50 @@ void auto_lostStomach(boolean force)
use_skill($skill[Aug. 16th: Roller Coaster Day!]);
}
}

void auto_haveEagle()
{
if(auto_have_familiar($familiar[Patriotic Eagle]))
{
return true;
}
return false;
}

boolean auto_getCitizenZone(string goal)
{
familiar eagle = $familiar[Patriotic Eagle];
string activeCitZoneMod = get_property("auto_patEagleGoal").to_string();
if !auto_haveEagle()
{
return false;
}
if(have_effect($effect[Citizen of a Zone]) && goal == activeCitZoneMod)
{
return false;
}
if(goal != activeCitZoneMod && item_amount($item[Soft Green Echo Eyedrop Antidote]) > 0)
{
uneffect($effect[Citizen of a Zone]);
}
//Get +30% item
if(can_adventure($location[The Haunted Library]) && goal == "item")
{
use_familiar(eagle);
set_property("auto_patEagleGoal", "item")
return autoAdv($location[The Haunted Library]);
}
//Get +50% meat
if(can_adventure($location[Lair of the Ninja Snowmen]) && goal == "meat")
{
use_familiar(eagle);
return autoAdv($location[Lair of the Ninja Snowmen]);
}
//Get +100% initiative
if(can_adventure($location[The Haunted Kitchen]) && goal == "initiative")
{
use_familiar(eagle);
return autoAdv($location[The Haunted Kitchen]);
}
return false;
}
12 changes: 10 additions & 2 deletions RELEASE/scripts/autoscend/quests/level_07.ash
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,17 @@ boolean L7_crypt()
// crypt is underground so it will generate breathitins, 5 turns free outside
// allow adventuring in Alcove (above) since many backup charges get used for modern zmobies
// not delaying better distributes these charges across days
if(auto_is_valid($item[cold medicine cabinet]) && item_amount($item[cold medicine cabinet]) > 0 &&
// keep only 11 underground turns in the last 20 advs
string[int] lCEMap;
lCEMap = split_string(get_property("lastCombatEnvironments",""));
int uTurns;
foreach turn in lCEMap {
if (lCEMap[turn] == "u") {uTurns +=1};
}
if((auto_is_valid($item[cold medicine cabinet]) && item_amount($item[cold medicine cabinet]) > 0 &&
get_workshed() != $item[cold medicine cabinet] && !isAboutToPowerlevel() &&
(LX_getDesiredWorkshed() == $item[cold medicine cabinet] || LX_getDesiredWorkshed() == $item[none]))
(LX_getDesiredWorkshed() == $item[cold medicine cabinet] || LX_getDesiredWorkshed() == $item[none])) ||
(get_workshed() == $item[cold medicine cabinet] && uTurns > 11))
{
return false;
}
Expand Down

0 comments on commit baa01e7

Please sign in to comment.