Skip to content

Commit

Permalink
SIT fix, g-lover fix, cook fix, 2002 fix, booze/food in locbar
Browse files Browse the repository at this point in the history
general requested fixes
  • Loading branch information
docrostov authored Aug 22, 2023
2 parents 7f979b8 + da84b8d commit 09e0658
Show file tree
Hide file tree
Showing 23 changed files with 96 additions and 55 deletions.
2 changes: 1 addition & 1 deletion Source/relay/TourGuide/Daily Resources.ash
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ void generateDailyResources(Checklist [int] checklists)
}

//Not sure how I feel about this. It's kind of extraneous?
if (get_property_int("telescopeUpgrades") > 0 && !get_property_boolean("telescopeLookedHigh") && __misc_state["in run"] && my_path().id != PATH_ACTUALLY_ED_THE_UNDYING && !in_bad_moon() && my_path().id != PATH_NUCLEAR_AUTUMN) {
if (get_property_int("telescopeUpgrades") > 0 && !get_property_boolean("telescopeLookedHigh") && __misc_state["in run"] && my_path().id != PATH_ACTUALLY_ED_THE_UNDYING && !in_bad_moon() && my_path().id != PATH_NUCLEAR_AUTUMN && my_path().id != PATH_G_LOVER) {
string [int] description;
int percentage = 5 * get_property_int("telescopeUpgrades");
description.listAppend("+" + (percentage == 25 ? "35% or +25" : percentage) + "% to all attributes. (10 turns)");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ void IOTMSmithsnessGenerateResource(ChecklistEntry [int] resource_entries)
smithsnessGenerateCoalSuggestions(coal_suggestions);
resource_entries.listAppend(ChecklistEntryMake("__item lump of Brituminous coal", "", ChecklistSubentryMake(pluralise($item[lump of Brituminous coal]), "", coal_suggestions.listJoinComponents("<hr>")), 10).ChecklistEntrySetIDTag("Smithsness brituminous suggestions"));
}
if ($item[flaskfull of hollow].available_amount() > 0 && $effect[Merry Smithsness].have_effect() < 25 && __misc_state["in run"])
if ($item[flaskfull of hollow].available_amount() > 0 && $effect[Merry Smithsness].have_effect() < 25 && __misc_state["in run"] && my_path().id != PATH_G_LOVER)
{
int turns_left = $effect[Merry Smithsness].have_effect();
string [int] details;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ void IOTMDeckOfEveryCardGenerateResource(ChecklistEntry [int] resource_entries)

if (!mafiaIsPastRevision(16018))
return;

if (my_path().id == PATH_G_LOVER) return; // cannot use in glover

int card_summons_left = clampi(15 - get_property_int("_deckCardsDrawn"), 0, 15);

Expand Down
4 changes: 3 additions & 1 deletion Source/relay/TourGuide/Items of the Month/2019/May Saber.ash
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ RegisterTaskGenerationFunction("IOTMMaySaberPartyGenerateTasks");
void IOTMMaySaberPartyGenerateTasks(ChecklistEntry [int] task_entries, ChecklistEntry [int] optional_task_entries, ChecklistEntry [int] future_task_entries)
{
if (!__iotms_usable[$item[Fourth of May Cosplay Saber]]) return;
if (my_path().id == PATH_G_LOVER) return; // cannot use saber in g-lover

if (get_property_int("_saberMod") == 0) {
string [int] options;
Expand Down Expand Up @@ -37,7 +38,8 @@ void IOTMMaySaberGenerateResource(ChecklistEntry [int] resource_entries)
if (!__iotms_usable[$item[Fourth of May Cosplay Saber]])
return;


if (my_path().id == PATH_G_LOVER) return; // cannot use saber in g-lover

int sabersEquipped = lookupItem("Fourth of May Cosplay Saber").equipped_amount() + lookupItem("replica Fourth of May Cosplay Saber").equipped_amount();

int uses_remaining = clampi(5 - get_property_int("_saberForceUses"), 0, 5);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ void IOTMRuneSpoonGenerateResource(ChecklistEntry [int] resource_entries)
{
item spoon = lookupItem("hewn moon-rune spoon");
if (!__iotms_usable[lookupItem("hewn moon-rune spoon")] && spoon.closet_amount() == 0 || my_sign().to_lower_case() == "bad moon") return;

if (my_path().id == PATH_G_LOVER) return; // glover does not get spoon tuning

// Use the right item ID depending on if you are using a replica or a non-replica
string activeSpoonID = lookupItem("replica hewn moon-rune spoon").available_amount() > 0 ? "11242" : "10254";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ RegisterResourceGenerationFunction("IOTMPowerfulGloveGenerateResource");
void IOTMPowerfulGloveGenerateResource(ChecklistEntry [int] resource_entries)
{
if (!__iotms_usable[$item[Powerful Glove]]) return;
if (my_path().id == PATH_G_LOVER) return; // while you can equip the glove, you can use none of the skills lol

int chargeLeft = 100 - get_property_int("_powerfulGloveBatteryPowerUsed");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ void IOTMPowerPlantGenerateResource(ChecklistEntry [int] resource_entries)
{
if (!lookupItem("potted power plant").have())
return;

// cannot use plant batteries in g-lover. if the user is at d7 of g-lover they probably
// should pick them but i don't want to enable this tile only if it's >d7.
if (my_path().id == PATH_G_LOVER) return;

// Title
string [int] description;
string batteriesToHarvest = (get_property("_pottedPowerPlant"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ RegisterResourceGenerationFunction("IOTMShortCookGenerateResource");
void IOTMShortCookGenerateResource(ChecklistEntry [int] resource_entries)
{
if (!__misc_state["in run"]) return;
if (!lookupFamiliar("Shorter-Order Cook").familiar_is_usable()) return;
if (my_path().id == PATH_G_LOVER) return; // no cook in glover

int shartCookCharge = get_property_int("_shortOrderCookCharge");
string [int] description;
string url = "familiar.php";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
RegisterTaskGenerationFunction("IOTMUndergroundFireworksShopGenerateTasks");
void IOTMUndergroundFireworksShopGenerateTasks(ChecklistEntry [int] task_entries, ChecklistEntry [int] optional_task_entries, ChecklistEntry [int] future_task_entries)
{
if (__misc_state["in run"] && __misc_state["can eat just about anything"] && available_amount($item[Clan VIP Lounge key]) > 0 && get_property("_fireworksShop").to_boolean())
if (__misc_state["in run"] && __misc_state["can eat just about anything"] && available_amount($item[Clan VIP Lounge key]) > 0 && get_property("_fireworksShop").to_boolean() && my_path().id != PATH_G_LOVER)
{
if ($effect[Ready to Eat].have_effect() > 0)
{
Expand Down Expand Up @@ -40,7 +40,8 @@ void IOTMUndergroundFireworksShopGenerateTasks(ChecklistEntry [int] task_entries
RegisterResourceGenerationFunction("IOTMUndergroundFireworksShopGenerateResource");
void IOTMUndergroundFireworksShopGenerateResource(ChecklistEntry [int] resource_entries)
{
if (!get_property_boolean("_fireworksShopEquipmentBought") && my_path().id != PATH_G_LOVER && available_amount($item[Clan VIP Lounge key]) > 0 && get_property("_fireworksShop").to_boolean() && my_path() != $path[Legacy of Loathing])
if (my_path().id == PATH_G_LOVER) return; // none of this stuff has G in it
if (!get_property_boolean("_fireworksShopEquipmentBought") && available_amount($item[Clan VIP Lounge key]) > 0 && get_property("_fireworksShop").to_boolean() && my_path() != $path[Legacy of Loathing])
{
string [int] description;
description.listAppend("Can buy one of the following (1000 meat):");
Expand All @@ -49,7 +50,7 @@ void IOTMUndergroundFireworksShopGenerateResource(ChecklistEntry [int] resource_
description.listAppend("Rocket boots: +100% initiative accessory");
resource_entries.listAppend(ChecklistEntryMake("__item oversized sparkler", "clan_viplounge.php?action=fwshop&whichfloor=2", ChecklistSubentryMake("Explosive equipment", description), 8).ChecklistEntrySetIDTag("Clan fireworks equipment resource"));
}
if (!get_property_boolean("_fireworksShopHatBought") && my_path().id != PATH_G_LOVER && available_amount($item[Clan VIP Lounge key]) > 0 && my_path() != $path[Legacy of Loathing])
if (!get_property_boolean("_fireworksShopHatBought") && available_amount($item[Clan VIP Lounge key]) > 0 && my_path() != $path[Legacy of Loathing])
{
string [int] description;
description.listAppend("Can buy one of the following (500 meat):");
Expand Down
8 changes: 5 additions & 3 deletions Source/relay/TourGuide/Items of the Month/2022/Autumnaton.ash
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
RegisterTaskGenerationFunction("IOTMAutumnatonGenerateTasks");
void IOTMAutumnatonGenerateTasks(ChecklistEntry [int] task_entries, ChecklistEntry [int] optional_task_entries, ChecklistEntry [int] future_task_entries)
{
#if (!__misc_state["in run"]) return;
if (!get_property_boolean("hasAutumnaton")) return;
if (my_path() == $path[Legacy of Loathing]) return;
# if (!__misc_state["in run"]) return; // Turned off because TES likes this tile to appear in aftercore
if (!get_property_boolean("hasAutumnaton")) return; // Don't show if they don't actually have Fall-E
if (my_path() == $path[Legacy of Loathing]) return; // Cannot use fall-e in LoL
if (my_path().id == PATH_G_LOVER) return; // Cannot use fall-e in G-Lover

int autobotsToday = get_property_int("_autumnatonQuests");
int turncountWhereAutobotReturns = get_property_int("autumnatonQuestTurn");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ void IOTMCosmicBowlingBallGenerateTasks(ChecklistEntry [int] task_entries, Check
if (!get_property_boolean("hasCosmicBowlingBall") == true)
return;
if (my_path() == $path[Legacy of Loathing]) return;
if (my_path().id == PATH_G_LOVER) return; // you can technically use it to bank buffs but the buffs don't work

int bowlingUses = get_property_int("_cosmicBowlingSkillsUsed");
int bowlingCooldown2 = bowlingUses * 2 + 5;
int bowlingCooldown = get_property_int("cosmicBowlingBallReturnCombats");
Expand Down Expand Up @@ -37,6 +39,7 @@ void IOTMCosmicBowlingBallGenerateResource(ChecklistEntry [int] resource_entries
if (!get_property_boolean("hasCosmicBowlingBall") == true)
return;
if (my_path() == $path[Legacy of Loathing]) return;
if (my_path().id == PATH_G_LOVER) return; // not generating tiles when nothing works right

// Entries
int bowlingUses = get_property_int("_cosmicBowlingSkillsUsed");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ void IOTMJurassicParkaGenerateResource(ChecklistEntry [int] resource_entries)
{
if (!__iotms_usable[$item[Jurassic Parka]]) return;
if (!__misc_state["in run"]) return;
if (my_path().id == PATH_G_LOVER) return; // cannot use parka in g-lover

string url;
string parkaMode = get_property("parkaMode");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
RegisterResourceGenerationFunction("IOTMUnbreakableUmbrellaGenerateResource");
void IOTMUnbreakableUmbrellaGenerateResource(ChecklistEntry [int] resource_entries)
{
item unbrella = lookupItem("unbreakable umbrella");
if (my_path().id == PATH_G_LOVER) return; // no umbrella in glover
item unbrella = lookupItem("unbreakable umbrella");
if (!unbrella.have()) return;
if (!__misc_state["in run"] && $item[unbreakable umbrella].equipped_amount() == 0) return;
string url;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ void IOTM2002MrStoreGenerateResource(ChecklistEntry [int] resource_entries)

string main_title = (Mr2002Credits + " 2002 Mr. Store credits");
string [int] description;
string url = "inv_use.php?pwd=" + my_hash() + "&which=3&whichitem=11280";

// Use the right item ID depending on if you are using a replica or a non-replica
string active2002ID = lookupItem("Replica 2002 Mr. Store Catalog").available_amount() > 0 ? "11280" : "11257";

string url = "inv_use.php?pwd=" + my_hash() + "&which=3&whichitem="+active2002ID;

if (Mr2002Credits > 0) {
description.listAppend("Spend credits on prehistoric IotMs!");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,6 @@ void IOTMAugustScepterGenerateResource(ChecklistEntry [int] resource_entries)
// WAFFLES!; 24, but the best guy here. 22/31
if (augSkillNumber == 24) usefulAugustSkills[24] = "3 waffles, for monster replacement";

// SERENDIPITY; cannot believe august 18th is the new meta 23/31
if (augSkillNumber == 18) usefulAugustSkills[18] = "random end-of-fight items";

// FREE TOOTH MONSTER; lol what the actual heck (22) 24/31
if (augSkillNumber == 22) usefulAugustSkills[22] = "free fight for teeeeeeeeeeeth";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ void IOTMClosedCircuitPayPhoneGenerateTasks(ChecklistEntry [int] task_entries, C
if (!lookupItem("closed-circuit pay phone").have())
return;

if (my_path().id == PATH_G_LOVER) return; // cannot use payphone in g-lover

string url = "inv_use.php?pwd=" + my_hash() + "&which=3&whichitem=11169";
QuestState state = parseRufusQuestState();

Expand Down Expand Up @@ -144,6 +146,8 @@ void IOTMClosedCircuitPayPhoneGenerateResource(ChecklistEntry [int] resource_ent

if (!lookupItem("closed-circuit pay phone").have())
return;

if (my_path().id == PATH_G_LOVER) return; // cannot use payphone in g-lover

string url = "inv_use.php?pwd=" + my_hash() + "&which=3&whichitem=11169";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,6 @@ void IOTMPatrioticEagleGenerateResource(ChecklistEntry [int] resource_entries)
string [int] constructOptions;
if (!__quest_state["Level 11 Palindome"].state_boolean["dr. awkward's office unlocked"])
constructOptions.listAppend(HTMLGenerateFutureTextByLocationAvailability("Whitey's Grove (1/4)", $location[Whitey's Grove]));
if (!$location[The Haunted Library].locationAvailable())
constructOptions.listAppend(HTMLGenerateFutureTextByLocationAvailability("Billiards Room (1/2)", $location[The Haunted Billiards Room]));
if (!$location[The Castle in the Clouds in the Sky (Basement)].locationAvailable())
beastOptions.listAppend(HTMLGenerateFutureTextByLocationAvailability("Airship (1/7)", $location[The Penultimate Fantasy Airship]));

Expand All @@ -120,9 +118,9 @@ void IOTMPatrioticEagleGenerateResource(ChecklistEntry [int] resource_entries)
undeadOptions.listAppend(HTMLGenerateFutureTextByLocationAvailability("Haunted Library (1/3)", $location[The Haunted Library]));
if (__quest_state["Level 11 Ron"].mafia_internal_step <= 4)
undeadOptions.listAppend(HTMLGenerateFutureTextByLocationAvailability("Red Zeppelin (1/5)", $location[The Red Zeppelin]));
if (__quest_state["Level 11 Manor"].mafia_internal_step < 3)
if (__quest_state["Level 11 Manor"].mafia_internal_step < 4)
undeadOptions.listAppend(HTMLGenerateFutureTextByLocationAvailability("Haunted Wine Cellar (1/3)", $location[The Haunted Wine Cellar]));
if (__quest_state["Level 11 Manor"].mafia_internal_step < 3)
if (__quest_state["Level 11 Manor"].mafia_internal_step < 4)
undeadOptions.listAppend(HTMLGenerateFutureTextByLocationAvailability("Haunted Boiler (1/3)", $location[The Haunted Boiler Room]));
if (!__quest_state["Level 11 Pyramid"].finished)
undeadOptions.listAppend(HTMLGenerateFutureTextByLocationAvailability("Pyramid Middle (1/3)", $location[The Middle Chamber]));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,49 +8,57 @@ boolean hasAnySkillOf(string [int] skillNames) {
return false;
}

// Prompt to register which SIT course you took
RegisterTaskGenerationFunction("IOTMSITCertificateGenerateTasks");
void IOTMSITCertificateGenerateTasks(ChecklistEntry [int] task_entries, ChecklistEntry [int] optional_task_entries, ChecklistEntry [int] future_task_entries) {
if (!lookupItem("S.I.T. Course Completion Certificate").have())
return;
// Don't generate a tile if the user doesn't have SIT.
if (!lookupItem("S.I.T. Course Completion Certificate").have()) return;

boolean completedSITToday = get_property_boolean("_sitCourseCompleted");
// Cannot use S.I.T. in G-Lover
if (my_path().id == PATH_G_LOVER) return;

// Nag if we haven't picked a skill during this ascension. Adding a daycount
// piece to the nag that ensures this shows up on D2, prompting users to
// change out their skill on D2. Not prompting on D3 or later, because
// there's really only two good ones.
string [int] skillNames = {"Psychogeologist", "Insectologist", "Cryptobotanist"};
if (hasAnySkillOf(skillNames) && my_daycount() >= 3) {
return;
}
boolean completedSITToday = get_property_boolean("_sitCourseCompleted");

// Don't generate a tile if the user has completed SIT already today
// Don't generate a tile if the user has completed SIT already today.
if (completedSITToday) return;

string [int] description;
string url = "inv_use.php?pwd=" + my_hash() + "&which=3&whichitem=11116";
string main_title = "S.I.T. Course Enrollment";
string main_title = "S.I.T. Course Enrollment";
string subtitle = "";

string [int] miscPhrases = {
"Don't play hooky!",
"You already paid for it.",
"This one time in college...",
"Bright college days, oh, carefree days that fly.", // <3 tom lehrer
"No child of mine is leaving here without a degree!",
"Make like a tree and leaf (through your papers)",
"Make like a tree and leaf (through your papers).",
};

string miscPhrase = miscPhrases[random(count(miscPhrases))];
description.listAppend(HTMLGenerateSpanFont(miscPhrase + " Take your S.I.T. course!", "red"));

string subtitle = "";

if (hasAnySkillOf(skillNames)) {
string [int] skillNames = {"Psychogeologist", "Insectologist", "Cryptobotanist"};

if (hasAnySkillOf(skillNames)) {
// If they already have a skill, generate an optional task or a less-shiny supernag
if (lookupSkill("Psychogeologist").have_skill()) subtitle = "you have ML; consider <b>Insectology</b>, for meat?";
if (lookupSkill("Insectologist").have_skill()) subtitle = "you have Meat; consider <b>Psychogeology</b>, for ML?";
if (lookupSkill("Cryptobotanist").have_skill()) subtitle = "you have Init; consider <b>Insectology</b>, for meat?";

if (__misc_state["in run"]) {
// If in-run, generate a supernag
description.listAppend("Try changing your S.I.T. course to accumulate different items.");
task_entries.listAppend(ChecklistEntryMake("__item S.I.T. Course Completion Certificate", url, ChecklistSubentryMake(main_title, subtitle, description), -11).ChecklistEntrySetIDTag("S.I.T. Course Completion Certificate"));
}
else {
// If not, generate an optional task
main_title = "Could change your S.I.T. skill, for new items...";
optional_task_entries.listAppend(ChecklistEntryMake("__item S.I.T. Course Completion Certificate", url, ChecklistSubentryMake(main_title, subtitle, description), 1).ChecklistEntrySetIDTag("S.I.T. Course Completion Certificate"));
}
}
else {
// If they don't have a skill, generate a supernag.
string miscPhrase = miscPhrases[random(count(miscPhrases))];
description.listAppend(HTMLGenerateSpanFont(miscPhrase + " Take your S.I.T. course!", "red"));
task_entries.listAppend(ChecklistEntryMake("__item S.I.T. Course Completion Certificate", url, ChecklistSubentryMake(main_title, subtitle, description), -11).ChecklistEntrySetIDTag("S.I.T. Course Completion Certificate"));
}

task_entries.listAppend(ChecklistEntryMake("__item S.I.T. Course Completion Certificate", url, ChecklistSubentryMake(main_title, subtitle, description), -11).ChecklistEntrySetIDTag("S.I.T. Course Completion Certificate"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ void PathAvatarOfWestOfLoathingGenerateTasks(ChecklistEntry [int] task_entries,
class_points[$class[Snake Oiler]] += get_property_int("awolPointsSnakeoiler");

item [class] tale_for_class;
tale_for_class[$class[Cow Puncher]] = $item[Tales of the West: \ Cow Punching];
tale_for_class[$class[Cow Puncher]] = $item[Tales of the West: Cow Punching];
tale_for_class[$class[Beanslinger]] = $item[Tales of the West: Beanslinging];
tale_for_class[$class[Snake Oiler]] = $item[Tales of the West: Snake Oiling];

Expand Down
Loading

0 comments on commit 09e0658

Please sign in to comment.