Skip to content

Add mob count modifier for quests. Adjust static final DIRECTORY so t…#331

Open
jimmyhong94 wants to merge 1 commit intoP0nk:masterfrom
jimmyhong94:config_defined_mob_count_on_kill
Open

Add mob count modifier for quests. Adjust static final DIRECTORY so t…#331
jimmyhong94 wants to merge 1 commit intoP0nk:masterfrom
jimmyhong94:config_defined_mob_count_on_kill

Conversation

@jimmyhong94
Copy link

@jimmyhong94 jimmyhong94 commented Nov 17, 2025

…ests run successfully

Description

On quests where a monster count is required for completion (99 / 999 quests, etc) a new config variable can be set to increase the amount 1 monster counts toward the quest requirement. Defaulted to 1 like normal and any integer is valid (10000 can be used, quest limit is maximum).

I chose to let negative values be valid as well since it's unlikely a user will ever do this unintentionally so, didn't add code to prevent this.

I made modifications to the DIRECTORY variable in WZfiles.java because it was caching with my new test class inappropriately (Quest in my test class cached DIRECTORY for subsequent tests). In isolation, these tests they ran successfully. In unison, the failed without my changes. All tests now run successfully with my changes.

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have tested my changes
  • I have added unit tests that prove my changes work

Screenshots

Spawned 10 evil eyes for quest with a 5 used for the new modifier. Got 50 added to quest requirement on !killall used on the 10.
ModifierWorking


Item counts unaffected (only kill counts)
Quest Item Count Unaffected


-1 used for this example successfully:
Negative Count Scenario

…ests run in isolation

Adjusted test code

Add QUEST_MOB_COUNT_MODIFIER for quest requiring monster kills

Added description to new config QUEST_MOB_COUNT_MODIFIER variable
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.

1 participant