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

Bounty hunting fixes #196

merged 28 commits into from
Nov 3, 2023

Conversation

Semenar
Copy link
Contributor

@Semenar Semenar commented Sep 22, 2023

  • switched to querying KoLmafia for bounty info, old method does not work anymore; as per KoLmafia wiki, it will return amount_needed = 0 and target_monster = none in case the bounty does not exist
  • fixed the suggestion to improve combat rate listing the current combat rate instead of the rate necessary to reach 100%
  • made it so the location will still be shown even if there is no chance to encounter the monster (e.g. it is banished). Otherwise, it looks weird ("From smut orc pipelayer in ."). -1.0 is used as infinity

- switched to querying KoLmafia for bounty info, old method does not work anymore; as per KoLmafia wiki, it will return amount_needed = 0 and target_monster = none in case the bounty does not exist
- fixed the suggestion to improve combat rate listing the current combat rate instead of the rate necessary to reach 100%
- made it so the location will still be shown even if there is no chance to encounter the monster (e.g. it is banished). Otherwise, it looks weird ("From smut orc pipelayer in ."). -1.0 is used as infinity
I got confused because it is named "combat rate", so needing to increase exactly by "combat rate" seems weird. But it actually was a "noncombat rate" all along. Replaced it with canonical combat_percent.

There is a bug with Smut Orc Logging Camp (stuck on 0% combat sometimes), but this will need fixing in Mafia.
- add a separator to the split_string function: it does not actually separate entries otherwise
- the one-liner is nice, but it does not work because it checks keys, not values - so the only items that would ever ring true for it have IDs from 0 to 19. Fixed to check values.
- do not propose to adventure there if already planted enough saplings
- show turns left in the task description
@Semenar Semenar requested a review from docrostov October 3, 2023 21:47
Semenar and others added 14 commits October 4, 2023 14:43
Mafia also logs into the zone queues noncombats that are item adjustments (for example), so an explicit check is better.
Also added a check to see if we are at the farm, to not hide the tip when on the last noncombat.
Cannot equip it in Avatar of Boris and Surprising Fist.
Appearance rates as returned by Mafia use a modified combat rate for noncombats, but unmodified one for combats. This caused bounty_appearance_rate to go above 1 in case only one monster is available, the place has skippable noncombats, and the player is running -combat.

Also renamed base_combat_rate below into combat_rate, because the previous name is misleading.
Is closed upon unlocking the White Citadel.
int_to_cardinal returned "" as 0 before, which resulted in such masterpieces as "seal screeches" instead of "Zero seal screeches".
Copy link
Member

@docrostov docrostov left a comment

Choose a reason for hiding this comment

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

a few very small changes -- if you think they aren't needed ping me on discord and i'll approve/push, but just a few small tweaks. overall good PR, thanks for all the stuff!

Source/relay/TourGuide/Daily Resources.ash Show resolved Hide resolved

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.

Source/relay/TourGuide/Quests/Level 12.ash Show resolved Hide resolved
Source/relay/TourGuide/Quests/Nemesis.ash Show resolved Hide resolved
Copy link
Member

@docrostov docrostov left a comment

Choose a reason for hiding this comment

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

looks good, thanks man

@docrostov docrostov merged commit b53a3b2 into main Nov 3, 2023
1 check passed
@docrostov docrostov deleted the bounty-hunter-fix branch August 13, 2024 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants