Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cursed Phone Support #1375

Merged
merged 13 commits into from
Oct 20, 2023
1 change: 1 addition & 0 deletions RELEASE/scripts/autoscend.ash
Original file line number Diff line number Diff line change
Expand Up @@ -1853,6 +1853,7 @@ boolean doTasks()
if(auto_autumnatonQuest()) return true;
if(auto_smallCampgroundGear()) return true;
auto_lostStomach(false);
if(auto_doPhoneQuest()) return true;

if (process_tasks()) return true;

Expand Down
13 changes: 12 additions & 1 deletion RELEASE/scripts/autoscend/auto_buff.ash
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec
case $effect[Oiled Skin]: useItem = $item[Skin Oil]; break;
case $effect[Oiled-Up]: useItem = $item[Pec Oil]; break;
case $effect[Oilsphere]: useSkill = $skill[Oilsphere]; break;
case $effect[Offhand Remarkable]: useSkill = $skill[Aug. 13th: Left\/Off Hander's Day!];break;
case $effect[Offhand Remarkable]: useSkill = $skill[Aug. 13th: Left\/Off Hander\'s Day!];break;
case $effect[OMG WTF]: useItem = $item[Confiscated Cell Phone]; break;
case $effect[One Very Clear Eye]: useItem = $item[Cyclops Eyedrops]; break;
case $effect[Orange Crusher]: useItem = $item[Pulled Orange Taffy]; break;
Expand Down Expand Up @@ -670,6 +670,17 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec
case $effect[Serendipi Tea]: useItem = $item[cuppa Serendipi tea]; break;
case $effect[Serendipity]: useSkill =$skill[Aug. 18th: Serendipity Day!]; break;
case $effect[Seriously Mutated]: useItem = $item[Extra-Potent Gremlin Mutagen]; break;
case $effect[Shadow Waters]:
if(item_amount($item[Rufus\'s shadow lodestone]) > 0)
{
if(speculative)
{
return true;
}
// lodestene will be consumed for a free NC to get this buff
autoAdv(auto_availableBrickRift());
}
break;
case $effect[Shells of the Damned]: useItem = $item[cyan seashell]; break;
case $effect[Shield of the Pastalord]:
useSkill = $skill[Shield of the Pastalord];
Expand Down
8 changes: 8 additions & 0 deletions RELEASE/scripts/autoscend/auto_choice_adv.ash
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,14 @@ boolean auto_run_choice(int choice, string page)
run_choice(2); //Insectologist (S.I.T. Course)
}
break;
case 1497: // Calling Rufus
// get artifact quest
run_choice(2);
break;
case 1500: // Like a Loded Stone
// Only come here to get shadow waters buff
run_choice(2);
break;
default:
break;
}
Expand Down
3 changes: 3 additions & 0 deletions RELEASE/scripts/autoscend/auto_familiar.ash
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,9 @@ boolean autoChooseFamiliar(location place)
if (place == $location[The Red Zeppelin] && internalQuestStatus("questL11Ron") < 4) {
famChoice = lookupFamiliarDatafile("item"); //not useful for Ron Copperhead
}
if (place == auto_availableBrickRift()) {
famChoice = lookupFamiliarDatafile("item"); // get more shadow bricks
}

// If we're down to 1 evilness left before the boss in the Nook, it doesn't matter if we get an Evil Eye or not.
if ($location[The Defiled Nook] == place && get_property("cyrptNookEvilness").to_int() > 14)
Expand Down
4 changes: 4 additions & 0 deletions RELEASE/scripts/autoscend/auto_pre_adv.ash
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,10 @@ boolean auto_pre_adventure()
{
autoEquip(exting);
}
else if(auto_availableBrickRift() == place)
{
autoEquip(exting); // polar vortex for shadow bricks
}
else if(in_wildfire() && auto_haveFireExtinguisher() && place.fire_level > 3)
{
addBonusToMaximize(exting, 200); // extinguisher prevents per-round hot damage in wildfire path
Expand Down
20 changes: 18 additions & 2 deletions RELEASE/scripts/autoscend/auto_util.ash
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,7 @@ boolean canFreeRun(monster enemy, location loc)
// monsters that we want to run away from before banishing
string freeRunCombatStringPreBanish(monster enemy, location loc, boolean inCombat)
{
if (isFreeMonster(enemy)) return "";
if (isFreeMonster(enemy, loc)) return "";

// Prefer some specalized free run items before other sources
if (!inAftercore())
Expand All @@ -947,7 +947,7 @@ string freeRunCombatStringPreBanish(monster enemy, location loc, boolean inComba

string freeRunCombatString(monster enemy, location loc, boolean inCombat)
{
if (isFreeMonster(enemy)) return "";
if (isFreeMonster(enemy, my_location())) return "";
string pre_banish = freeRunCombatStringPreBanish(enemy, loc, inCombat);
if (pre_banish != "") return pre_banish;

Expand Down Expand Up @@ -1809,6 +1809,11 @@ int freeCrafts()
}

boolean isFreeMonster(monster mon)
{
return isFreeMonster(mon, $location[none]);
}

boolean isFreeMonster(monster mon, location loc)
{
if ($monsters[Angry Ghost, Annoyed Snake, Government Bureaucrat, Slime Blob, Terrible Mutant] contains mon && get_property("_voteFreeFights").to_int() < 3)
{
Expand Down Expand Up @@ -1843,6 +1848,17 @@ boolean isFreeMonster(monster mon)
return true;
}

if(get_property("breathitinCharges").to_int() > 0 && loc.environment == "outdoor")
{
return true;
}

if($locations[Shadow Rift (The Ancient Buried Pyramid), Shadow Rift (The Hidden City), Shadow Rift (The Misspelled Cemetary)] contains loc
&& have_effect($effect[shadow affinity]) > 0)
{
return true;
}

if (mon.random_modifiers["optimal"])
{
return true;
Expand Down
7 changes: 7 additions & 0 deletions RELEASE/scripts/autoscend/auto_zone.ash
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,13 @@ generic_t zone_needItem(location loc)
value = 50.0;
break;
// End A Shrunken Adventurer Am I (Small) Locations
// Shadow Rifts via cursed payphone or AoSOL path
case $location[Shadow Rift (The Ancient Buried Pyramid)]:
case $location[Shadow Rift (The Hidden City)]:
case $location[Shadow Rift (The Misspelled Cemetary)]:
value = 10.0;
break;
// End Shadow Rifts
default:
retval._error = true;
break;
Expand Down
7 changes: 7 additions & 0 deletions RELEASE/scripts/autoscend/autoscend_header.ash
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,11 @@ void pickRocks();
boolean wantToThrowGravel(location loc, monster enemy);
boolean auto_haveSITCourse();
void auto_SITCourse();
location auto_availableBrickRift();
int auto_neededShadowBricks();
boolean auto_havePayPhone();
boolean auto_getPhoneQuest();
boolean auto_doPhoneQuest();
boolean auto_haveMonkeyPaw();
boolean auto_makeMonkeyPawWish(effect wish);
boolean auto_makeMonkeyPawWish(item wish);
Expand All @@ -525,6 +530,7 @@ void auto_useBlackMonolith();
boolean auto_haveAugustScepter();
void auto_scepterSkills();
void auto_lostStomach();
boolean auto_haveBofa();
boolean auto_haveJillOfAllTrades();
void auto_handleJillOfAllTrades();

Expand Down Expand Up @@ -1683,6 +1689,7 @@ float combatItemDamageMultiplier();
float MLDamageToMonsterMultiplier();
int freeCrafts();
boolean isFreeMonster(monster mon);
boolean isFreeMonster(monster mon, location loc);
boolean declineTrades();
boolean auto_deleteMail(kmailObject msg);
boolean LX_summonMonster();
Expand Down
16 changes: 9 additions & 7 deletions RELEASE/scripts/autoscend/combat/auto_combat_default_stage2.ash
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,13 @@ string auto_combatDefaultStage2(int round, monster enemy, string text)
couldInstaKill = false;
}
}
else if(wantToForceDrop(enemy))
{
//want drops from this enemy
couldInstaKill = false;
}

if(instakillable(enemy) && !isFreeMonster(enemy) && couldInstaKill)
if(instakillable(enemy) && !isFreeMonster(enemy, my_location()) && couldInstaKill)
{
boolean wantFreeKillNowEspecially;

Expand Down Expand Up @@ -396,12 +401,9 @@ string auto_combatDefaultStage2(int round, monster enemy, string text)

if(canUse($item[shadow brick]) && (get_property("_shadowBricksUsed").to_int() < 13) && !reserveFreekills)
{
if(wantFreeKillNowEspecially || (my_adventures() < 20) || inAftercore() || (my_daycount() >= 3))
{
handleTracker(enemy, $item[shadow brick], "auto_instakill");
loopHandlerDelayAll();
return useItem($item[shadow brick]);
}
handleTracker(enemy, $item[shadow brick], "auto_instakill");
loopHandlerDelayAll();
return useItems($item[shadow brick], $item[none]);
}

if(canUse($skill[Fire the Jokester\'s Gun]) && !get_property("_firedJokestersGun").to_boolean())
Expand Down
63 changes: 9 additions & 54 deletions RELEASE/scripts/autoscend/combat/auto_combat_default_stage3.ash
Original file line number Diff line number Diff line change
Expand Up @@ -167,68 +167,23 @@ string auto_combatDefaultStage3(int round, monster enemy, string text)
}
}

//iotm skill that can be used on any combat round, repeatedly until an item is stolen
//prioritize XO over extinguisher since extinguisher has other uses
//take into account if a yellow ray has been used. Must have been one that doesn't insta-kill
if(canUse($skill[Fire Extinguisher: Polar Vortex], false) && auto_fireExtinguisherCharges() > 10)
if(wantToForceDrop(enemy))
{
boolean forceDrop = false;
//only force 1 scent gland from each filthworm
if(!combat_status_check("yellowray"))
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
if(mildEvilAvailable)
{
if(enemy == $monster[Larval Filthworm] && item_amount($item[filthworm hatchling scent gland]) < 1)
{
forceDrop = true;
}
if(enemy == $monster[Filthworm Drone] && item_amount($item[filthworm drone scent gland]) < 1)
{
forceDrop = true;
}
if(enemy == $monster[Filthworm Royal Guard] && item_amount($item[filthworm royal guard scent gland]) < 1)
{
forceDrop = true;
}
handleTracker(enemy, $skill[Perpetrate Mild Evil], "auto_otherstuff");
return useSkill($skill[Perpetrate Mild Evil]);
}


// polar vortex is more likely to pocket an item the higher the drop rate. Unlike XO which has equal chance for all drops
// reserve 30 charge for filth worms
if(auto_fireExtinguisherCharges() > 30)
{
int dropsFromYR = 0;
if(combat_status_check("yellowray"))
{
dropsFromYR = 1;
}

if($monsters[bearpig topiary animal, elephant (meatcar?) topiary animal, spider (duck?) topiary animal] contains enemy)
{
if(hedgeTrimmersNeeded() + dropsFromYR > 0)
{
forceDrop = true;
}
}

// Number of times bowled is 1 less than hiddenBowlingAlleyProgress. Need 5 bowling balls total, 5+1 = 6 needed in this conditional
if(enemy == $monster[Pygmy bowler] && (get_property("hiddenBowlingAlleyProgress").to_int() + item_amount($item[Bowling Ball]) + dropsFromYR) < 6)
{
forceDrop = true;
}

if(enemy == $monster[Dairy Goat] && (item_amount($item[Goat Cheese]) + dropsFromYR) < 3)
{
forceDrop = true;
}
}


if(forceDrop)
if(polarVortexAvailable)
{
handleTracker(enemy, $skill[Fire Extinguisher: Polar Vortex], "auto_otherstuff");
return useSkill($skill[Fire Extinguisher: Polar Vortex]);
}
}

//delevel ~3% per combat round for rest of combat.
//if sauceror and you kill enemy with a spell you regain up to 50MP. this is the primary source of MP for a sauceror.
//with itchy curse finger skill it will also stagger on the turn it is cast
Expand Down
2 changes: 1 addition & 1 deletion RELEASE/scripts/autoscend/combat/auto_combat_ed.ash
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ string auto_edCombatHandler(int round, monster enemy, string text)
return auto_bowlingBallCombatString(my_location(), false);
}

if(instakillable(enemy) && !isFreeMonster(enemy) && doInstaKill)
if(instakillable(enemy) && !isFreeMonster(enemy,my_location()) && doInstaKill)
{
if(!combat_status_check("batoomerang") && (item_amount($item[Replica Bat-oomerang]) > 0))
{
Expand Down
1 change: 1 addition & 0 deletions RELEASE/scripts/autoscend/combat/auto_combat_header.ash
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ string replaceMonsterCombatString();
float turns_to_kill(float dmg);
boolean combat_status_check(string mark);
void combat_status_add(string mark);
boolean wantToForceDrop(monster enemy);

#####################################################
//defined in /autoscend/combat/auto_combat_awol.ash
Expand Down
67 changes: 66 additions & 1 deletion RELEASE/scripts/autoscend/combat/auto_combat_util.ash
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ string yellowRayCombatString(monster target, boolean inCombat, boolean noForceDr
else return "";
}

boolean free_monster = (isFreeMonster(target) || (get_property("breathitinCharges").to_int() > 0 && my_location().environment == "outdoor"));
boolean free_monster = (isFreeMonster(target, my_location()) || (get_property("breathitinCharges").to_int() > 0 && my_location().environment == "outdoor"));

if(have_effect($effect[Everything Looks Yellow]) <= 0)
{
Expand Down Expand Up @@ -897,3 +897,68 @@ void combat_status_add(string mark)
}
set_property("_auto_combatState", st);
}

boolean wantToForceDrop(monster enemy)
{
//skills that can be used on any combat round, repeatedly until an item is stolen
//take into account if a yellow ray has been used. Must have been one that doesn't insta-kill
boolean mildEvilAvailable = canUse($skill[Perpetrate Mild Evil],false) && get_property("_mildEvilPerpetrated").to_int() < 3;

boolean forceDrop = false;

//only force 1 scent gland from each filthworm
if(!combat_status_check("yellowray"))
{
if(enemy == $monster[Larval Filthworm] && item_amount($item[filthworm hatchling scent gland]) < 1)
{
forceDrop = true;
}
if(enemy == $monster[Filthworm Drone] && item_amount($item[filthworm drone scent gland]) < 1)
{
forceDrop = true;
}
if(enemy == $monster[Filthworm Royal Guard] && item_amount($item[filthworm royal guard scent gland]) < 1)
{
forceDrop = true;
}
}


// polar vortex/mild evil is more likely to pocket an item the higher the drop rate. Unlike XO which has equal chance for all drops
// reserve extinguisher 30 charge for filth worms
if(auto_fireExtinguisherCharges() > 20 || mildEvilAvailable)
{
int dropsFromYR = 0;
if(combat_status_check("yellowray"))
{
dropsFromYR = 1;
}

if($monsters[bearpig topiary animal, elephant (meatcar?) topiary animal, spider (duck?) topiary animal] contains enemy)
{
if(hedgeTrimmersNeeded() + dropsFromYR > 0)
{
forceDrop = true;
}
}

// Number of times bowled is 1 less than hiddenBowlingAlleyProgress. Need 5 bowling balls total, 5+1 = 6 needed in this conditional
if(enemy == $monster[Pygmy bowler] && (get_property("hiddenBowlingAlleyProgress").to_int() + item_amount($item[Bowling Ball]) + dropsFromYR) < 6)
{
forceDrop = true;
}

if(enemy == $monster[Dairy Goat] && (item_amount($item[Goat Cheese]) + dropsFromYR) < 3)
{
forceDrop = true;
}

if((item_drops(enemy) contains $item[shadow brick]) && (auto_neededShadowBricks() + dropsFromYR) > 0)
{
forceDrop = true;
}
}

return forceDrop;
}

4 changes: 2 additions & 2 deletions RELEASE/scripts/autoscend/iotms/mr2021.ash
Original file line number Diff line number Diff line change
Expand Up @@ -767,12 +767,12 @@ string auto_FireExtinguisherCombatString(location place)
return "skill " + $skill[Fire Extinguisher: Zone Specific];
}

if(place == $location[The Smut Orc Logging Camp] && !get_property("fireExtinguisherChasmUsed").to_boolean() && get_property("chasmBridgeProgress").to_int() < 30)
if(place == $location[The Smut Orc Logging Camp] && !get_property("fireExtinguisherChasmUsed").to_boolean() && get_property("chasmBridgeProgress").to_int() < 30 && !auto_hasAutumnaton())
{
return "skill " + $skill[Fire Extinguisher: Zone Specific];
}

if(place == $location[The Arid\, Extra-Dry Desert] && $location[The Arid\, Extra-Dry Desert].turns_spent > 0 && !get_property("fireExtinguisherDesertUsed").to_boolean())
if(place == $location[The Arid\, Extra-Dry Desert] && $location[The Arid\, Extra-Dry Desert].turns_spent > 0 && !get_property("fireExtinguisherDesertUsed").to_boolean() && !auto_haveBofa())
{
return "skill " + $skill[Fire Extinguisher: Zone Specific];
}
Expand Down
Loading
Loading