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

Bounty hunting fixes #196

Merged
merged 28 commits into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
63ccbb9
Bounty hunting fixes
Semenar Sep 22, 2023
19fb989
oops infinite priority
Semenar Sep 22, 2023
fa5a6c3
Only show +combat tip if we did not max +combat
Semenar Sep 22, 2023
ba47832
Fix combat rate calculations
Semenar Sep 22, 2023
481b66f
Pull limit code fixes
Semenar Sep 23, 2023
c979084
Arrrbor Day fixes
Semenar Oct 1, 2023
8a5dcf7
Cargo Cultist Shorts - do not show pockets that are already used
Semenar Oct 2, 2023
f9c43af
rwbMonsterCount starts at 2 now
Semenar Oct 2, 2023
670e5f8
Add a rule for the Road to White Citadel availability
Semenar Oct 2, 2023
8b69606
Fix typo in Patriotic Eagle banish suggestions
Semenar Oct 2, 2023
bf80beb
Fix overcounting cinch from free rests if some of them were wasted
Semenar Oct 2, 2023
d2a7aab
Nemesis quest chapter 1 - added the puzzle answer
Semenar Oct 3, 2023
ef67557
Do not suggest to buy a ticket if no Black Market access
Semenar Oct 4, 2023
05d0bb7
Fix the Farm NC reminder show rules
Semenar Oct 4, 2023
12b75c8
Do not offer to visit hippy store in Surprising Fist
Semenar Oct 5, 2023
b578e40
Do not show the scalpel as an option without hands
Semenar Oct 5, 2023
80d2353
Nemesis Quest: tell which two items to combine
Semenar Oct 5, 2023
36b26a9
Fix appearance rate calculations
Semenar Oct 5, 2023
b96f2b5
oops did not correct the check
Semenar Oct 5, 2023
eb5d160
Fix the Road to White Citadel availability condition
Semenar Oct 6, 2023
71740ac
Elemental race wish suggestions
Semenar Oct 14, 2023
8d9d101
oops fix the color
Semenar Oct 14, 2023
6fe6fc6
Fix 11th Cincho rest granting 0% cinch instead of 5%
Semenar Oct 26, 2023
e300d57
Zero exists
Semenar Nov 1, 2023
3bd59ca
Merge branch 'main' into bounty-hunter-fix
docrostov Nov 2, 2023
6829e18
Gingerbread fix by Scotch
Semenar Nov 2, 2023
f514fe6
very small priority tweak
docrostov Nov 2, 2023
bd04e32
Do not show Fifty Ways for the sleaze race if other wish suggestions …
Semenar Nov 2, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Source/relay/TourGuide/Daily Resources.ash
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ void generateDailyResources(Checklist [int] checklists)
resource_entries.listAppend(ChecklistEntryMake(image_name, "place.php?whichplace=nstower", ChecklistSubentryMake("1 Prism", "", description), 10).ChecklistEntrySetIDTag("This is his home now"));
}

if ((get_property("sidequestOrchardCompleted") == "hippy" || get_property("sidequestOrchardCompleted") == "fratboy") && !get_property_boolean("_hippyMeatCollected")) {
resource_entries.listAppend(ChecklistEntryMake("__item herbs", "island.php", ChecklistSubentryMake("Meat from the hippy store", "", "~4500 free meat."), 5).ChecklistEntrySetIDTag("Island orchard meat cut")); //FIXME consider shop.php?whichshop=hippy
if ((get_property("sidequestOrchardCompleted") == "hippy" || get_property("sidequestOrchardCompleted") == "fratboy") && !get_property_boolean("_hippyMeatCollected") && my_path().id != PATH_WAY_OF_THE_SURPRISING_FIST) {
Semenar marked this conversation as resolved.
Show resolved Hide resolved
resource_entries.listAppend(ChecklistEntryMake("__item herbs", "island.php", ChecklistSubentryMake("Meat from the hippy store", "", "~4500 free meat."), 8).ChecklistEntrySetIDTag("Island orchard meat cut")); //FIXME consider shop.php?whichshop=hippy
}
if ((get_property("sidequestArenaCompleted") == "hippy" || get_property("sidequestArenaCompleted") == "fratboy") && !get_property_boolean("concertVisited")) {
string [int] description;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
RegisterTaskGenerationFunction("IOTMGingerbreadCityGenerateTasks");
void IOTMGingerbreadCityGenerateTasks(ChecklistEntry [int] task_entries, ChecklistEntry [int] optional_task_entries, ChecklistEntry [int] future_task_entries)
{
#if (get_property_boolean("gingerbreadCityAvailable") == false) return;
if (!__iotms_usable[$item[Build-a-City Gingerbread kit]]) return;

string [int] description;
string [int] GCTurnsLeftdescription;
string [int] trainOptions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,31 @@ void IOTMCargoCultistShortsGenerateResource(ChecklistEntry [int] resource_entrie

if (!get_property_boolean("_cargoPocketEmptied")) {
string image_name = "__item cargo cultist shorts";

boolean [int] empty_pockets;
Semenar marked this conversation as resolved.
Show resolved Hide resolved
string [int] empty_pocket_list = split_string(get_property("cargoPocketsEmptied"), ",");
foreach pocket in split_string(get_property("cargoPocketsEmptied"), ",") {
empty_pockets[to_int(empty_pocket_list[i])] = true;
}

string [int] options;
string [int] description;
description.listAppend("Pick a pocket for something useful! Too many to list!");
if (__misc_state["in run"] && my_path().id != PATH_COMMUNITY_SERVICE)
{
if (locationAvailable($location[The royal guard Chamber]) == true)
if (locationAvailable($location[The royal guard Chamber]) == true && !(empty_pockets contains 343))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i am assuming you've checked this tweak operates correctly? part of me thinks that given how you factored this, instead of doing a contains logic like this, you should just do && !empty_pockets[343] because it's slightly more fitting. i think the syntax you have here works but that feels slightly cleaner to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I checked that this works.

{
options.listAppend(HTMLGenerateSpanOfClass("343 - Filthworm Drone Stench:", "r_bold") + " Stinky!");
}
if ($item[star chart].available_amount() == 0 && $item[richard's star key].available_amount() == 0)
if ($item[star chart].available_amount() == 0 && $item[richard's star key].available_amount() == 0 && !(empty_pockets contains 533))
{
options.listAppend(HTMLGenerateSpanOfClass("533 - greasy desk bell:", "r_bold") + " star key components");
}
if (locationAvailable($location[The eXtreme Slope]) == false)
if (locationAvailable($location[The eXtreme Slope]) == false && !(empty_pockets contains 565))
{
options.listAppend(HTMLGenerateSpanOfClass("565 - mountain man:", "r_bold") + " YR for 2x ore");
}
if (locationAvailable($location[The Battlefield (Frat Uniform)]) == false)
if (locationAvailable($location[The Battlefield (Frat Uniform)]) == false && !(empty_pockets contains 589))
{
options.listAppend(HTMLGenerateSpanOfClass("589 - Green Ops Soldier:", "r_bold") + " olfact for funny meme strategies.");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ void IOTMCinchoDeMayoGenerateResource(ChecklistEntry [int] resource_entries)
int freeRestsRemaining = __misc_state_int["free rests remaining"];
int cinchoRests = get_property_int('_cinchoRests');
int cinchUsed = get_property_int('_cinchUsed');

// Resting when Cincho is full might burn some of the Cincho rests
freeRests = min(freeRests, cinchoRests + freeRestsRemaining);

// Since the pref is weird, this tells you your current total cinch
int currentCinch = 100 - cinchUsed;
Expand All @@ -22,7 +25,7 @@ void IOTMCinchoDeMayoGenerateResource(ChecklistEntry [int] resource_entries)
// This while loop expands your possible cinch starting at rests you haven't used.
while (rest < freeRests)
{
int cinchAmount = rest > count(cinchLevels) ? 5 : cinchLevels[rest];
int cinchAmount = rest >= count(cinchLevels) ? 5 : cinchLevels[rest];
Semenar marked this conversation as resolved.
Show resolved Hide resolved
totalCinch += cinchAmount;
rest += 1;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,47 @@ void IOTMCursedMonkeysPawGenerateResource(ChecklistEntry [int] resource_entries)
get_property("8BitScore") < 10000,
true
),
new MonkeyWish(
$item[none],
$effect[Staying Frosty],
HTMLGenerateSpanFont("cold damage race", "blue"),
!__quest_state["Level 13"].state_boolean["Elemental damage race completed"] &&
__quest_state["Level 13"].state_string["Elemental damage race type"] == "cold",
true
),
new MonkeyWish(
$item[none],
$effect[Dragged Through the Coals],
HTMLGenerateSpanFont("hot damage race", "red"),
!__quest_state["Level 13"].state_boolean["Elemental damage race completed"] &&
__quest_state["Level 13"].state_string["Elemental damage race type"] == "hot",
true
),
new MonkeyWish(
$item[none],
$effect[Bored Stiff],
HTMLGenerateSpanFont("spooky damage race", "gray"),
!__quest_state["Level 13"].state_boolean["Elemental damage race completed"] &&
__quest_state["Level 13"].state_string["Elemental damage race type"] == "spooky",
true
),
new MonkeyWish(
$item[none],
$effect[Sewer-Drenched],
HTMLGenerateSpanFont("stench damage race", "green"),
!__quest_state["Level 13"].state_boolean["Elemental damage race completed"] &&
__quest_state["Level 13"].state_string["Elemental damage race type"] == "stench",
true
),
new MonkeyWish(
Semenar marked this conversation as resolved.
Show resolved Hide resolved
$item[none],
$effect[Fifty Ways to Bereave Your Lover],
HTMLGenerateSpanFont("sleaze damage race", "purple"),
!__quest_state["Level 13"].state_boolean["Elemental damage race completed"] &&
__quest_state["Level 13"].state_string["Elemental damage race type"] == "sleaze" &&
get_property_int("zeppelinProtestors") > 79,
true
),
new MonkeyWish(
$item[lowercase N],
$effect[none],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ void IOTMPatrioticEagleGenerateTasks(ChecklistEntry [int] task_entries, Checklis
monster RWB_monster = get_property_monster("rwbMonster");

if (RWB_monster != $monster[none]) {
// Have to subtract 1; mafia pref starts at 3 but only increments on start-of-fight text, which happens on 2 of them.
int fights_left = clampi(get_property_int("rwbMonsterCount"), 0, 2) - 1;
int fights_left = clampi(get_property_int("rwbMonsterCount"), 0, 2);

// Use ezan's weird location-finding-thing
location [int] possible_appearance_locations = RWB_monster.getPossibleLocationsMonsterCanAppearInNaturally().listInvert();
Expand Down Expand Up @@ -111,7 +110,7 @@ void IOTMPatrioticEagleGenerateResource(ChecklistEntry [int] resource_entries)
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 Castle in the Clouds in the Sky (Basement)].locationAvailable())
beastOptions.listAppend(HTMLGenerateFutureTextByLocationAvailability("Airship (1/7)", $location[The Penultimate Fantasy Airship]));
constructOptions.listAppend(HTMLGenerateFutureTextByLocationAvailability("Airship (1/7)", $location[The Penultimate Fantasy Airship]));

string [int] undeadOptions;
if (!$location[The Haunted Bathroom].locationAvailable())
Expand Down
9 changes: 6 additions & 3 deletions Source/relay/TourGuide/Pulls.ash
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,14 @@ int pullable_amount(item it, int maximum_total_wanted)
{
// Hooray for removing already-pulled stuff!
string ronin_storage_pulls = get_property("_roninStoragePulls");
string[int] already_pulled = split_string(ronin_storage_pulls);
string[int] already_pulled = split_string(ronin_storage_pulls, ",");
int requested_item = it.to_int();

// Using the one-line if statement logic because I like it slightly better for this.
amount = already_pulled contains requested_item ? 0 : 1;
boolean already_pulled_this_item = false;
foreach key in already_pulled {
if (already_pulled[key] == requested_item) already_pulled_this_item = true;
}
amount = already_pulled_this_item ? 0 : 1;
}

return min(__misc_state_int["pulls available"], amount);
Expand Down
6 changes: 3 additions & 3 deletions Source/relay/TourGuide/Quests/Level 11 - Copperhead.ash
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,11 @@ void QLevel11RonGenerateTasks(ChecklistEntry [int] task_entries, ChecklistEntry
}

if ($item[red zeppelin ticket].available_amount() == 0) {
if ($item[priceless diamond].available_amount() > 0)
if ($item[priceless diamond].available_amount() > 0 && black_market_available())
subentry.entries.listAppend("Trade in your priceless diamond for a red zeppelin ticket.");
else if (my_meat() >= $item[red zeppelin ticket].npc_price() && my_meat() >= 4000)
else if (my_meat() >= $item[red zeppelin ticket].npc_price() && my_meat() >= 4000 && black_market_available())
subentry.entries.listAppend("Purchase a red zeppelin ticket in the black market.");
else if (!__quest_state["Level 11 Shen"].finished)
else if (!__quest_state["Level 11 Shen"].finished && black_market_available())
subentry.entries.listAppend("Could adventure in the Copperhead Club first for a ticket. (greatly speeds up area)");
else
subentry.entries.listAppend("No ticket.");
Expand Down
7 changes: 6 additions & 1 deletion Source/relay/TourGuide/Quests/Level 11 - Hidden City.ash
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,12 @@ void QLevel11HiddenCityGenerateTasks(ChecklistEntry [int] task_entries, Checklis
} else if (hospital_progress == 0) {
generateHiddenAreaUnlockForShrine(subentry.entries,$location[an overgrown shrine (Southwest)]);
} else {
boolean [item] outfitPieces = $items[bloodied surgical dungarees,surgical mask,head mirror,half-size scalpel].makeConstantItemArrayMutable();
boolean [item] outfitPieces = $items[bloodied surgical dungarees,surgical mask,head mirror].makeConstantItemArrayMutable();

# TODO maybe support it differently, the scalpel will still drop in that case
Semenar marked this conversation as resolved.
Show resolved Hide resolved
if (__misc_state["can equip just about any weapon"]) {
outfitPieces[$item[half-size scalpel]] = true;
}

if (__misc_state["Torso aware"]) {
outfitPieces[$item[surgical apron]] = true;
Expand Down
14 changes: 12 additions & 2 deletions Source/relay/TourGuide/Quests/Level 12.ash
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,19 @@ void QLevel12GenerateTasksSidequests(ChecklistEntry [int] task_entries, Checklis
modifiers.listAppend("+meat");

string [int] tasks;
int ncs_seen = $location[McMillicancuddy's Barn].noncombatTurnsAttemptedInLocation();

Semenar marked this conversation as resolved.
Show resolved Hide resolved
boolean [string] area_known_ncs = $strings[Cornered!,Cornered Again!,How Many Corners Does this Stupid Barn Have!?];
int ncs_seen = 0;
string [int] location_ncs = $location[McMillicancuddy's Barn].locationSeenNoncombats();
foreach key, s in location_ncs
{
if (area_known_ncs contains s)
{
ncs_seen += 1;
}
}

if (ncs_seen < 3)
if (ncs_seen < 3 || my_location() == $location[McMillicancuddy's Barn])
{
tasks.listAppend("make a fence out of the barbed wire");
tasks.listAppend("knock over the lantern");
Expand Down
33 changes: 30 additions & 3 deletions Source/relay/TourGuide/Quests/Nemesis.ash
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ void QNemesisGenerateTasks(ChecklistEntry [int] task_entries, ChecklistEntry [in

item [class] class_epic_weapons;
item [class] class_legendary_epic_weapons;
item [class] class_legendary_epic_weapon_craftable_sources;
item [class] class_ultimate_legendary_epic_weapons;

class_epic_weapons[$class[seal clubber]] = $item[bjorn's hammer];
Expand All @@ -465,7 +466,15 @@ void QNemesisGenerateTasks(ChecklistEntry [int] task_entries, ChecklistEntry [in
class_legendary_epic_weapons[$class[disco bandit]] = $item[shagadelic disco banjo];
class_legendary_epic_weapons[$class[accordion thief]] = $item[squeezebox of the ages];
item legendary_epic_weapon = class_legendary_epic_weapons[my_class()];



class_legendary_epic_weapon_craftable_sources[$class[seal clubber]] = $item[distilled seal blood];
class_legendary_epic_weapon_craftable_sources[$class[turtle tamer]] = $item[turtle chain];
class_legendary_epic_weapon_craftable_sources[$class[pastamancer]] = $item[high-octane olive oil];
class_legendary_epic_weapon_craftable_sources[$class[sauceror]] = $item[peppercorns of power];
class_legendary_epic_weapon_craftable_sources[$class[disco bandit]] = $item[vial of mojo];
class_legendary_epic_weapon_craftable_sources[$class[accordion thief]] = $item[golden reeds];
item legendary_epic_weapon_craftable_source = class_legendary_epic_weapon_craftable_sources[my_class()];


class_ultimate_legendary_epic_weapons[$class[seal clubber]] = $item[Sledgehammer of the V&aelig;lkyr];
Expand Down Expand Up @@ -534,10 +543,26 @@ void QNemesisGenerateTasks(ChecklistEntry [int] task_entries, ChecklistEntry [in
subentry.entries.listAppend("Acquire a " + starter_item_needed + ".");
else if ($location[The Unquiet Garves].noncombat_queue.contains_text("Tomb of the Unknown Your Class Here"))
{
subentry.entries.listAppend("Solve the three puzzles at the unknown tomb.");
subentry.entries.listAppend("Solve the puzzle at the unknown tomb.");
Semenar marked this conversation as resolved.
Show resolved Hide resolved

string puzzle_answer;
if (my_class() == $class[seal clubber])
puzzle_answer = "The answer is \"Boredom\".";
else if (my_class() == $class[turtle tamer])
puzzle_answer = "The answer is \"Friendship\".";
else if (my_class() == $class[pastamancer])
puzzle_answer = "The answer is \"Binding pasta thralls\".";
else if (my_class() == $class[sauceror])
puzzle_answer = "The answer is \"Power\".";
else if (my_class() == $class[disco bandit])
puzzle_answer = "The answer is \"Me. Duh\".";
else if (my_class() == $class[accordion thief])
puzzle_answer = "The answer is \"Music\".";
string puzzle_answer_html = HTMLGenerateSpanOfClass(HTMLGenerateSpanOfClass(puzzle_answer, "r_tooltip_inner_class") + "Hover over to see the answer.", "r_tooltip_outer_class");
subentry.entries.listAppend(puzzle_answer_html);
}
else {
subentry.entries.listAppend("Adventure in the Unquiet Garves until you unlock the tomb of the unknown, then solve the three puzzles.");
subentry.entries.listAppend("Adventure in the Unquiet Garves until you unlock the tomb of the unknown, then solve the puzzle.");
if (__quest_state["Level 11 Shen"].state_int.getFutureShenAssignments().listInvert() contains $location[The VERY Unquiet Garves])
subentry.entries.listAppend("Could wait before going there? Shen will send you to the garves later.");
}
Expand Down Expand Up @@ -565,6 +590,8 @@ void QNemesisGenerateTasks(ChecklistEntry [int] task_entries, ChecklistEntry [in
else
{
subentry.entries.listAppend("Make " + legendary_epic_weapon + ".");
subentry.entries.listAppend("Recipe is " + epic_weapon + " + " + legendary_epic_weapon_craftable_source + ".");
url = "craft.php?mode=smith";
}
}
else if (base_quest_state.mafia_internal_step == 10)
Expand Down
Loading
Loading