Skip to content

Commit

Permalink
D1 shen (#1355)
Browse files Browse the repository at this point in the history
* D1 Shen is now enabled
  • Loading branch information
dsimich authored Sep 10, 2023
1 parent bd7d1aa commit 2d6c32f
Show file tree
Hide file tree
Showing 12 changed files with 31 additions and 94 deletions.
1 change: 0 additions & 1 deletion BUILD/task_order/Avatar of Jarlsberg.dat
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,5 @@ L5_slayTheGoblinKing
L4_batCave
L3_tavern
setSoftblockDelay allowSoftblockDelay
setSoftblockShen allowSoftblockShen
L13_towerAscent
LX_attemptPowerLevel
1 change: 0 additions & 1 deletion BUILD/task_order/Legacy of Loathing.dat
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ L12_finalizeWar
L12_clearBattlefield
LX_koeInvaderHandler
setSoftblockDelay allowSoftblockDelay
setSoftblockShen allowSoftblockShen
LX_getDigitalKey
LX_getStarKey
L12_lastDitchFlyer
Expand Down
1 change: 0 additions & 1 deletion BUILD/task_order/Quantum Terrarium.dat
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,5 @@ L5_slayTheGoblinKing
L4_batCave
L3_tavern
setSoftblockDelay allowSoftblockDelay
setSoftblockShen allowSoftblockShen
L13_towerAscent
LX_attemptPowerLevel
1 change: 0 additions & 1 deletion BUILD/task_order/Zombie Slayer.dat
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,5 @@ L5_slayTheGoblinKing
L4_batCave
L3_tavern
setSoftblockDelay allowSoftblockDelay
setSoftblockShen allowSoftblockShen
L13_towerAscent
LX_attemptPowerLevel
1 change: 0 additions & 1 deletion BUILD/task_order/default.dat
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ L12_finalizeWar
L12_clearBattlefield
LX_koeInvaderHandler
setSoftblockDelay allowSoftblockDelay
setSoftblockShen allowSoftblockShen
LX_getDigitalKey
LX_getStarKey
L12_lastDitchFlyer
Expand Down
61 changes: 28 additions & 33 deletions RELEASE/data/autoscend_task_order.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,8 @@ Avatar of Jarlsberg 52 L5_slayTheGoblinKing
Avatar of Jarlsberg 53 L4_batCave
Avatar of Jarlsberg 54 L3_tavern
Avatar of Jarlsberg 55 setSoftblockDelay allowSoftblockDelay
Avatar of Jarlsberg 56 setSoftblockShen allowSoftblockShen
Avatar of Jarlsberg 57 L13_towerAscent
Avatar of Jarlsberg 58 LX_attemptPowerLevel
Avatar of Jarlsberg 56 L13_towerAscent
Avatar of Jarlsberg 57 LX_attemptPowerLevel

Legacy of Loathing 0 LX_freeCombatsTask
Legacy of Loathing 1 LX_unlockPirateRealm
Expand Down Expand Up @@ -157,18 +156,17 @@ Legacy of Loathing 81 L12_finalizeWar
Legacy of Loathing 82 L12_clearBattlefield
Legacy of Loathing 83 LX_koeInvaderHandler
Legacy of Loathing 84 setSoftblockDelay allowSoftblockDelay
Legacy of Loathing 85 setSoftblockShen allowSoftblockShen
Legacy of Loathing 86 LX_getDigitalKey
Legacy of Loathing 87 LX_getStarKey
Legacy of Loathing 88 L12_lastDitchFlyer
Legacy of Loathing 89 LX_bugbearInvasionFinale
Legacy of Loathing 90 L13_towerNSContests
Legacy of Loathing 91 L13_towerNSHedge
Legacy of Loathing 92 L13_sorceressDoor
Legacy of Loathing 93 L13_towerNSTower
Legacy of Loathing 94 L13_towerNSNagamar
Legacy of Loathing 95 L13_towerNSFinal
Legacy of Loathing 96 LX_attemptPowerLevel
Legacy of Loathing 85 LX_getDigitalKey
Legacy of Loathing 86 LX_getStarKey
Legacy of Loathing 87 L12_lastDitchFlyer
Legacy of Loathing 88 LX_bugbearInvasionFinale
Legacy of Loathing 89 L13_towerNSContests
Legacy of Loathing 90 L13_towerNSHedge
Legacy of Loathing 91 L13_sorceressDoor
Legacy of Loathing 92 L13_towerNSTower
Legacy of Loathing 93 L13_towerNSNagamar
Legacy of Loathing 94 L13_towerNSFinal
Legacy of Loathing 95 LX_attemptPowerLevel

Quantum Terrarium 0 LX_freeCombatsTask
Quantum Terrarium 1 LX_unlockPirateRealm
Expand Down Expand Up @@ -230,9 +228,8 @@ Quantum Terrarium 56 L5_slayTheGoblinKing
Quantum Terrarium 57 L4_batCave
Quantum Terrarium 58 L3_tavern
Quantum Terrarium 59 setSoftblockDelay allowSoftblockDelay
Quantum Terrarium 60 setSoftblockShen allowSoftblockShen
Quantum Terrarium 61 L13_towerAscent
Quantum Terrarium 62 LX_attemptPowerLevel
Quantum Terrarium 60 L13_towerAscent
Quantum Terrarium 61 LX_attemptPowerLevel

Zombie Slayer 0 LM_zombieSlayer
Zombie Slayer 1 LX_unlockPirateRealm
Expand Down Expand Up @@ -290,9 +287,8 @@ Zombie Slayer 52 L5_slayTheGoblinKing
Zombie Slayer 53 L4_batCave
Zombie Slayer 54 L3_tavern
Zombie Slayer 55 setSoftblockDelay allowSoftblockDelay
Zombie Slayer 56 setSoftblockShen allowSoftblockShen
Zombie Slayer 57 L13_towerAscent
Zombie Slayer 58 LX_attemptPowerLevel
Zombie Slayer 56 L13_towerAscent
Zombie Slayer 57 LX_attemptPowerLevel

default 0 LX_freeCombatsTask
default 1 LX_unlockPirateRealm
Expand Down Expand Up @@ -379,16 +375,15 @@ default 81 L12_finalizeWar
default 82 L12_clearBattlefield
default 83 LX_koeInvaderHandler
default 84 setSoftblockDelay allowSoftblockDelay
default 85 setSoftblockShen allowSoftblockShen
default 86 LX_getDigitalKey
default 87 LX_getStarKey
default 88 L12_lastDitchFlyer
default 89 LX_bugbearInvasionFinale
default 90 L13_towerNSContests
default 91 L13_towerNSHedge
default 92 L13_sorceressDoor
default 93 L13_towerNSTower
default 94 L13_towerNSNagamar
default 95 L13_towerNSFinal
default 96 LX_attemptPowerLevel
default 85 LX_getDigitalKey
default 86 LX_getStarKey
default 87 L12_lastDitchFlyer
default 88 LX_bugbearInvasionFinale
default 89 L13_towerNSContests
default 90 L13_towerNSHedge
default 91 L13_sorceressDoor
default 92 L13_towerNSTower
default 93 L13_towerNSNagamar
default 94 L13_towerNSFinal
default 95 LX_attemptPowerLevel

1 change: 0 additions & 1 deletion RELEASE/scripts/autoscend.ash
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ void initializeSettings() {
set_property("auto_pulls", "");

// Last level during which we ran out of stuff to do without pre-completing some Shen quests.
set_property("auto_shenSkipLastLevel", 0);
remove_property("auto_shenZonesTurnsSpent");
remove_property("auto_lastShenTurn");

Expand Down
21 changes: 0 additions & 21 deletions RELEASE/scripts/autoscend/auto_util.ash
Original file line number Diff line number Diff line change
Expand Up @@ -1619,27 +1619,6 @@ boolean inGnomeSign()
return $strings[Blender, Packrat, Wombat] contains my_sign();
}
boolean allowSoftblockShen()
{
//Some quests have a softblock on doing them because shen might need them. When we run out of things to do this softblock is released.
//Return true means the softblock is active. Return false means the softblock is released.
if(get_property("questL11Shen") == "finished")
{
return false; //shen quest is over. softblock not needed
}
//We tell users to disable the shen softblock by setting auto_shenSkipLastLevel to 999.
//This is why we want to return < my_level() and not != my_level()
return get_property("auto_shenSkipLastLevel").to_int() < my_level();
}
boolean setSoftblockShen()
{
auto_log_warning("I was trying to avoid zones that Shen might need, but I've run out of stuff to do. Releasing softblock.", "red");
set_property("auto_shenSkipLastLevel", my_level());
return true;
}
boolean instakillable(monster mon)
{
if(mon.boss)
Expand Down
2 changes: 0 additions & 2 deletions RELEASE/scripts/autoscend/autoscend_header.ash
Original file line number Diff line number Diff line change
Expand Up @@ -1671,8 +1671,6 @@ boolean isDesertAvailable();
boolean inKnollSign();
boolean inCanadiaSign();
boolean inGnomeSign();
boolean allowSoftblockShen();
boolean setSoftblockShen();
boolean instakillable(monster mon);
boolean stunnable(monster mon);
float combatItemDamageMultiplier();
Expand Down
10 changes: 0 additions & 10 deletions RELEASE/scripts/autoscend/paths/actually_ed_the_undying.ash
Original file line number Diff line number Diff line change
Expand Up @@ -1544,16 +1544,6 @@ boolean LM_edTheUndying()
return true;
}
if (!have_skill($skill[Even More Elemental Wards])) {
// if we don't have the last Elemental Resistance Upgrade, we still need Ka
// Thus we shouldn't block quests that Shen might request as almost all of them are Ka zones.
if(allowSoftblockShen()) {
auto_log_warning("I was trying to avoid zones that Shen might need, but I still need Ka for upgrades.", "red");
set_property("auto_shenSkipLastLevel", my_level());
return true;
}
}
// Crush the jackass adventurer!
if (L13_ed_towerHandler())
{
Expand Down
7 changes: 0 additions & 7 deletions RELEASE/scripts/autoscend/paths/low_key_summer.ash
Original file line number Diff line number Diff line change
Expand Up @@ -600,13 +600,6 @@ boolean LX_lowkeySummer() {
// Make sure to unlock Menagerie if it wasn't done while getting Knob labinet key
if (LX_unlockKnobMenagerie()) { return true; }
// Release the softblock on quests that are waiting for Shen quest.
// If anyone ever gets this far in this path I will be both surprised and weirdly impressed.
if (my_level() > get_property("auto_shenSkipLastLevel").to_int() && get_property("questL11Shen") != "finished") {
auto_log_warning("I was trying to avoid zones that Shen might need, but I've run out of stuff to do.", "red");
set_property("auto_shenSkipLastLevel", my_level());
return true;
}
// Make sure to go to war
if (L12_lastDitchFlyer()) { return true; }
Expand Down
18 changes: 3 additions & 15 deletions RELEASE/scripts/autoscend/quests/level_11.ash
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,6 @@ boolean[location] shenSnakeLocations(int day, int n_items_returned)

boolean[location] shenZonesToAvoidBecauseMaybeSnake()
{
if (!allowSoftblockShen())
{
boolean[location] empty;
return empty;
}
if (get_property("shenInitiationDay").to_int() > 0)
{
int day = get_property("shenInitiationDay").to_int();
Expand All @@ -186,11 +181,9 @@ boolean[location] shenZonesToAvoidBecauseMaybeSnake()
boolean[location] zones_to_avoid;
if (my_level() < 11)
{
//if it's day 1, don't count this day's snakes since it's leaving it until day 2
int fromThisDay = (my_daycount() == 1) ? 1 : 0;
//if level 10, assume shen today or tomorrow, otherwise up to two days from now
int beforeThatDay = (my_level() >= 10) ? 2 : 3;
for (int day=fromThisDay; day<beforeThatDay; day++)
for (int day=0; day<beforeThatDay; day++)
{
foreach z, _ in shenSnakeLocations(day+my_daycount(), 0)
{
Expand All @@ -202,8 +195,7 @@ boolean[location] shenZonesToAvoidBecauseMaybeSnake()
else
{
// if we're already level 11, well either be starting ASAP
// or leaving it until day 2 if we're on day 1
foreach z, _ in shenSnakeLocations(max(2, my_daycount()), 0)
foreach z, _ in shenSnakeLocations(my_daycount(), 0)
{
zones_to_avoid[z] = true;
}
Expand Down Expand Up @@ -2532,11 +2524,7 @@ boolean L11_shenStartQuest()
{
return false;
}
if (my_daycount() < 2 || !allowSoftblockShen())
{
// if you're fast enough to open it on day 1, maybe wait until day 2
return false;
}

auto_log_info("Going to see the World's Biggest Jerk about some snakes and stones and stuff.", "blue");
if (autoAdv($location[The Copperhead Club]))
{
Expand Down

0 comments on commit 2d6c32f

Please sign in to comment.