Skip to content

Commit

Permalink
Tearaway Pants and Peace Turkey support (#1520)
Browse files Browse the repository at this point in the history
* Tearaway Pants and Peace Turkey support
  • Loading branch information
dsimich authored Nov 8, 2024
1 parent 9455ad0 commit e7eb2bc
Show file tree
Hide file tree
Showing 16 changed files with 108 additions and 14 deletions.
2 changes: 2 additions & 0 deletions BUILD/familiars/drop.dat
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,5 @@ Green Pixie prop:_absintheDrops<5
Galloping Grill prop:_hotAshesDrops<5
# If all else fails, keep generating CBB ingredients
Cookbookbat !prop_boolean:auto_dontUseCookBookBat
# use a Peace turkey if all else fails
Peace Turkey
1 change: 1 addition & 0 deletions BUILD/familiars/gremlins.dat
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
Nosy Nose
Plastic Pirate Skull
Space Jellyfish
Peace Turkey
Gelatinous Cubeling
Barrrnacle
1 change: 1 addition & 0 deletions BUILD/familiars/regen.dat
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Mini-Trainbot
# Marginally special whelps
#Mutant Gila Monster grimdark:2
Pottery Barn Owl
Peace Turkey
# Regular old whelps
Pet Cheezling
Ghuol Whelp
Expand Down
14 changes: 9 additions & 5 deletions RELEASE/data/autoscend_familiars.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,16 @@ drop 29 Green Pixie prop:_absintheDrops<5
drop 30 Galloping Grill prop:_hotAshesDrops<5
# If all else fails, keep generating CBB ingredients
drop 31 Cookbookbat !prop_boolean:auto_dontUseCookBookBat
# use a Peace turkey if all else fails
drop 32 Peace Turkey

# We want to delevel, but don't want to deal damage
gremlins 0 Nosy Nose
gremlins 1 Plastic Pirate Skull
gremlins 2 Space Jellyfish
gremlins 3 Gelatinous Cubeling
gremlins 4 Barrrnacle
gremlins 3 Peace Turkey
gremlins 4 Gelatinous Cubeling
gremlins 5 Barrrnacle

init 0 Xiblaxian Holo-Companion
init 1 Cute Meteor
Expand Down Expand Up @@ -313,11 +316,12 @@ regen 29 Mini-Trainbot
# Marginally special whelps
#Mutant Gila Monster grimdark:2
regen 30 Pottery Barn Owl
regen 31 Peace Turkey
# Regular old whelps
regen 31 Pet Cheezling
regen 32 Ghuol Whelp
regen 32 Pet Cheezling
regen 33 Ghuol Whelp
# The absolute default that everyone should have after their first run
regen 33 Mosquito
regen 34 Mosquito

# Sombrero is desirable with a decent amount of ML
stat 0 Galloping Grill ML:>=120
Expand Down
1 change: 1 addition & 0 deletions RELEASE/data/autoscend_settings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,4 @@ post 6 auto_wandOfNagamar boolean Do we need to get a Wand of Nagamar in this as
pre 0 auto_getSteelOrgan_initialize boolean When we initialize an ascension this will be copied to auto_getSteelOrgan

sharing 0 auto_disableExcavator boolean When set to true will disable automatically sending spading data via the Extractor script

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 r28092; // feat: add 'avoid attack' modifier
since r28114; // feat: track split pea soup banish
/***
autoscend_header.ash must be first import
All non-accessory scripts must be imported here
Expand Down
1 change: 1 addition & 0 deletions RELEASE/scripts/autoscend/auto_buff.ash
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec
case $effect[Bram\'s Bloody Bagatelle]: useSkill = $skill[Bram\'s Bloody Bagatelle]; break;
case $effect[Brawnee\'s Anthem of Absorption]:useSkill = $skill[Brawnee\'s Anthem of Absorption];break;
case $effect[Brilliant Resolve]: useItem = $item[Resolution: Be Smarter]; break;
case $effect[Brittled]: useItem = $item[pea brittle]; break;
case $effect[Brooding]: useSkill = $skill[Brood]; break;
case $effect[Browbeaten]: useItem = $item[Old Eyebrow Pencil]; break;
case $effect[Burning Hands]: useItem = $item[sticky lava globs]; break;
Expand Down
5 changes: 0 additions & 5 deletions RELEASE/scripts/autoscend/auto_familiar.ash
Original file line number Diff line number Diff line change
Expand Up @@ -446,11 +446,6 @@ boolean autoChooseFamiliar(location place)
if ($locations[Next to that Barrel with Something Burning in it, Out By that Rusted-Out Car, Over Where the Old Tires Are, Near an Abandoned Refrigerator] contains place) {
famChoice = lookupFamiliarDatafile("gremlins");
}

// places that benefit from + combat rate
if ($locations[Sonofa Beach, Lair of the Ninja Snowmen] contains place && zone_combatMod(place)._int > 0 && canChangeToFamiliar($familiar[Jumpsuited Hound Dog])) {
famChoice = $familiar[Jumpsuited Hound Dog];
}

// places where item drop is required to help save adventures.
if ($locations[Guano Junction, The Beanbat Chamber, Cobb's Knob Harem, The Goatlet, Itznotyerzitz Mine,
Expand Down
29 changes: 29 additions & 0 deletions RELEASE/scripts/autoscend/auto_providers.ash
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,21 @@ float providePlusCombat(int amt, location loc, boolean doEquips, boolean specula
return result();
}

if (!speculative)
{
//Prep for if other +combat familiars are added
foreach fam in $familiars[Jumpsuited Hound Dog]
{
if(canChangeToFamiliar(fam))
{
handleFamiliar(fam);
if(pass()){
return result();
}
}
}
}

return result();
}

Expand Down Expand Up @@ -355,6 +370,20 @@ float providePlusNonCombat(int amt, location loc, boolean doEquips, boolean spec
return result();
}

if (!speculative)
{
foreach fam in $familiars[Peace Turkey, Disgeist]
{
if(canChangeToFamiliar(fam))
{
handleFamiliar(fam);
if(pass()){
return result();
}
}
}
}

return result();
}

Expand Down
4 changes: 4 additions & 0 deletions RELEASE/scripts/autoscend/auto_util.ash
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,10 @@ boolean adjustForBanish(string combat_string)
{
return autoEquip($item[cursed monkey\'s paw]);
}
if(combat_string == "item " + $item[Handful of split pea soup] && item_amount($item[Handful of split pea soup]) == 0)
{
return create(1, $item[Handful of split pea soup]);
}
return true;
}
Expand Down
1 change: 1 addition & 0 deletions RELEASE/scripts/autoscend/autoscend_header.ash
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,7 @@ boolean auto_canLeapBridge();
boolean auto_haveSeptEmberCenser();
int remainingEmbers();
void auto_buyFromSeptEmberStore();
boolean auto_haveTearawayPants();

########################################################################################################
//Defined in autoscend/paths/actually_ed_the_undying.ash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,12 @@ string auto_combatDefaultStage3(int round, monster enemy, string text)
return useItem($item[Tomayohawk-Style Reflex Hammer]);
}

//If you have tearaway pants equipped, use its skill
if(canUse($skill[Tear Away your Pants!]))
{
return useSkill($skill[Tear Away your Pants!]);
}

// skills from Lathe weapons
// Ebony Epee
if(canUse($skill[Disarming Thrust]))
Expand Down
4 changes: 4 additions & 0 deletions RELEASE/scripts/autoscend/combat/auto_combat_util.ash
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,10 @@ string banisherCombatString(monster enemy, location loc, boolean inCombat)
return "skill " + $skill[Howl of the Alpha];
}

if(inCombat ? item_amount($item[Handful of split pea soup]) > 0 && (!(used contains "Handful of split pea soup")) && auto_is_valid($item[Handful of split pea soup]) && useFree : (item_amount($item[Handful of split pea soup]) > 0 || item_amount($item[Whirled peas]) >= 2))
{
return "item " + $item[Handful of split pea soup];
}
if((inCombat ? auto_have_skill($skill[Throw Latte on Opponent]) : possessEquipment($item[latte lovers member\'s mug])) && auto_is_valid($skill[Throw Latte On Opponent]) && !get_property("_latteBanishUsed").to_boolean() && !(used contains "Throw Latte on Opponent") && useFree)
{
return "skill " + $skill[Throw Latte on Opponent];
Expand Down
9 changes: 9 additions & 0 deletions RELEASE/scripts/autoscend/iotms/mr2024.ash
Original file line number Diff line number Diff line change
Expand Up @@ -450,3 +450,12 @@ void auto_buyFromSeptEmberStore()
}
// consider throwin' ember for banish or summoning charm for pickpocket in future PR
}

boolean auto_haveTearawayPants()
{
if(auto_is_valid($item[Tearaway Pants]) && available_amount($item[Tearaway Pants]) > 0 )
{
return true;
}
return false;
}
28 changes: 26 additions & 2 deletions RELEASE/scripts/autoscend/quests/level_11.ash
Original file line number Diff line number Diff line change
Expand Up @@ -2129,6 +2129,10 @@ boolean L11_hiddenCityZones()

boolean equipMachete()
{
if(in_ag())
{
return false; //combats aren't free so no point in equipping a Machete
}
if (auto_can_equip($item[Antique Machete]))
{
if (possessEquipment($item[Antique Machete]))
Expand All @@ -2154,7 +2158,7 @@ boolean L11_hiddenCityZones()

L11_hiddenTavernUnlock();

boolean canUseMachete = !is_boris() && !in_wotsf() && !in_pokefam();
boolean canUseMachete = !is_boris() && !in_wotsf() && !in_pokefam() && !in_ag();
boolean needMachete = canUseMachete && !possessEquipment($item[Antique Machete]) && (in_hardcore() || in_lol());
boolean needRelocate = (get_property("relocatePygmyJanitor").to_int() != my_ascensions());

Expand All @@ -2181,34 +2185,54 @@ boolean L11_hiddenCityZones()
if (canUseMachete && !equipMachete()) {
return false;
}
if(!canUseMachete && auto_haveTearawayPants())
{
autoForceEquip($item[Tearaway Pants]);
}
return autoAdv($location[An Overgrown Shrine (Northwest)]);
}

if (get_property("hiddenOfficeProgress").to_int() == 0) {
if (canUseMachete && !equipMachete()) {
return false;
}
if(!canUseMachete && auto_haveTearawayPants())
{
autoForceEquip($item[Tearaway Pants]);
}
return autoAdv($location[An Overgrown Shrine (Northeast)]);
}

if (get_property("hiddenHospitalProgress").to_int() == 0) {
if (canUseMachete && !equipMachete()) {
return false;
}
if(!canUseMachete && auto_haveTearawayPants())
{
autoForceEquip($item[Tearaway Pants]);
}
return autoAdv($location[An Overgrown Shrine (Southwest)]);
}

if (get_property("hiddenBowlingAlleyProgress").to_int() == 0) {
if (canUseMachete && !equipMachete()) {
return false;
}
if(!canUseMachete && auto_haveTearawayPants())
{
autoForceEquip($item[Tearaway Pants]);
}
return autoAdv($location[An Overgrown Shrine (Southeast)]);
}

if (!get_property("auto_openedziggurat").to_boolean()) {
if (!equipMachete()) {
if (canUseMachete && !equipMachete()) {
return false;
}
if(!canUseMachete && auto_haveTearawayPants())
{
autoForceEquip($item[Tearaway Pants]);
}
boolean advSpent = autoAdv($location[A Massive Ziggurat]);
if (get_property("lastEncounter") == "Legend of the Temple in the Hidden City" || (isActuallyEd() && get_property("lastEncounter") == "Temple of the Legend in the Hidden City")) {
set_property("auto_openedziggurat", true);
Expand Down
14 changes: 13 additions & 1 deletion RELEASE/scripts/autoscend/quests/optional.ash
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ boolean LX_guildUnlock()
{
return false;
}
if(!(in_picky() || in_lowkeysummer()) && get_property('auto_skipUnlockGuild').to_boolean())
if(!(in_picky() || in_lowkeysummer()) && get_property('auto_skipUnlockGuild').to_boolean() && !(my_primestat() == $stat[Moxie] && auto_haveTearawayPants()))
{
return false;
}
Expand All @@ -365,6 +365,18 @@ boolean LX_guildUnlock()
string pref;
location loc = $location[None];
item goal = $item[none];
if(my_primestat() == $stat[Moxie] && auto_haveTearawayPants())
{
//Can bypass moxie test if we have the Tearaway Pants
if(autoForceEquip($item[Tearaway Pants]))
{
if (internalQuestStatus("questG08Moxie") < 1)
{
visit_url("guild.php?place=challenge");
}
return true;
}
}
switch(my_primestat())
{
case $stat[Muscle]:
Expand Down

0 comments on commit e7eb2bc

Please sign in to comment.