Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into ag-improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
midgleyc committed Oct 17, 2024
2 parents cae01d5 + e480102 commit bf6bd14
Show file tree
Hide file tree
Showing 38 changed files with 397 additions and 122 deletions.
11 changes: 11 additions & 0 deletions BUILD/monsters/freerun.dat
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion BUILD/monsters/sniff.dat
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions BUILD/restoration/skill.dat
Original file line number Diff line number Diff line change
Expand Up @@ -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
13 changes: 12 additions & 1 deletion RELEASE/data/autoscend_monsters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,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
Expand Down Expand Up @@ -141,7 +152,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
Expand Down
1 change: 1 addition & 0 deletions RELEASE/data/autoscend_restoration.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

2 changes: 1 addition & 1 deletion RELEASE/scripts/autoscend.ash
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
since r28082; // Fixes for Avant Guard council text
since r28084; // feat: make bat wings rest always available
/***
autoscend_header.ash must be first import
All non-accessory scripts must be imported here
Expand Down
6 changes: 3 additions & 3 deletions RELEASE/scripts/autoscend/auto_acquire.ash
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand Down Expand Up @@ -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())
Expand Down
5 changes: 5 additions & 0 deletions RELEASE/scripts/autoscend/auto_bedtime.ash
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
4 changes: 4 additions & 0 deletions RELEASE/scripts/autoscend/auto_choice_adv.ash
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 8 additions & 1 deletion RELEASE/scripts/autoscend/auto_equipment.ash
Original file line number Diff line number Diff line change
Expand Up @@ -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]))
Expand Down Expand Up @@ -810,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())
{
Expand Down
6 changes: 6 additions & 0 deletions RELEASE/scripts/autoscend/auto_pre_adv.ash
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,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())
{
Expand Down
19 changes: 18 additions & 1 deletion RELEASE/scripts/autoscend/auto_restore.ash
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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;
Expand Down
22 changes: 14 additions & 8 deletions RELEASE/scripts/autoscend/auto_util.ash
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down Expand Up @@ -1473,10 +1480,6 @@ boolean isGeneralStoreAvailable()
{
return false;
}
if(in_zombieSlayer())
{
return false;
}
if(is_werewolf())
{
return false;
Expand Down Expand Up @@ -2619,9 +2622,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");
Expand Down Expand Up @@ -4183,7 +4189,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
Expand Down
12 changes: 6 additions & 6 deletions RELEASE/scripts/autoscend/auto_zone.ash
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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]);
}
Expand Down Expand Up @@ -906,25 +906,25 @@ generic_t zone_delay(location loc)
}
break;
case $location[Vanya\'s Castle]:
if (possessEquipment($item[Continuum Transfunctioner]) && EightBitScore() < 10000 && (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]) && EightBitScore() < 10000 && 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]) && EightBitScore() < 10000 && 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]) && EightBitScore() < 10000 && get_property("8BitColor") == "green")
if (need8BitPoints() && possessEquipment($item[Continuum Transfunctioner]) && get_property("8BitColor") == "green")
{
value = 5 - get_property("8BitBonusTurns").to_int();
}
Expand Down
5 changes: 5 additions & 0 deletions RELEASE/scripts/autoscend/autoscend_header.ash
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,7 @@ boolean auto_sendAutumnaton(location loc);
boolean auto_autumnatonQuest();
boolean auto_hasSpeakEasy();
int auto_remainingSpeakeasyFreeFights();
boolean speakeasyCombat();


boolean auto_haveTrainSet();
Expand Down Expand Up @@ -568,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
Expand Down Expand Up @@ -1083,6 +1086,7 @@ boolean L8_trapperQuest();
boolean LX_loggingHatchet();
boolean L9_leafletQuest();
void L9_chasmMaximizeForNoncombat();
int bridgeGoal();
int fastenerCount();
int lumberCount();
boolean finishBuildingSmutOrcBridge();
Expand Down Expand Up @@ -1201,6 +1205,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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,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)
Expand Down
11 changes: 9 additions & 2 deletions RELEASE/scripts/autoscend/combat/auto_combat_default_stage3.ash
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,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");
Expand Down Expand Up @@ -356,7 +363,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;
Expand Down
Loading

0 comments on commit bf6bd14

Please sign in to comment.