Repository navigation
Starts the implementation of retail fishing #11902
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
Draft
Frankie-hz
wants to merge
17
commits into
LandSandBoat:base
Choose a base branch
from
Frankie-hz:fishing
base: base
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,284
−1,633
Draft
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
e620054
Remove the unused Lua fishing data tables
Frankie-hz 17b203d
Remove fishing stock pools
Frankie-hz 2d4edc4
Remove moon phase fishing skillup modifiers
Frankie-hz e9ffffc
Remove quest gating from fishing NM hooks
Frankie-hz f122f06
Stop fishing lookups from inserting null catalog entries
Frankie-hz dbc024a
Block menu actions while fishing
Frankie-hz b6dac2a
Clean up fishing hook state between casts
Frankie-hz 83548e8
Land fished gil and Rare items correctly
Frankie-hz 331f08e
Let multi-hook bait reach its top hook count
Frankie-hz 4e36a6e
Show the fishing sweat animation to nearby players
Frankie-hz 52e5abc
Add fishing calculation and area tests
Frankie-hz a4d8870
Rework fishing loss, line snap and rod break chances
Frankie-hz de095fc
Adjust fishing rod max ranks
Frankie-hz 72fd812
Settle the fishing reel outcome when the fish bites
Frankie-hz 17675f4
Move quest fishing catches into the interaction framework
Skold177 29abdbc
Let Hook, Line, and Sinker anglers fish up the Qufim Kraken
Frankie-hz a2276d5
Add fishing fatigue and a daily catch limit
Frankie-hz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| -- Zone-wide quest catches ignore the fishing area | ||
| local anyArea = 1 | ||
|
|
||
| -- Flattens onFishingCheck answers the same way luautils::OnFishingCheck does | ||
| local function offeredCatches(player, areaId) | ||
| local catches = {} | ||
| for _, answer in ipairs(InteractionGlobal.onFishingCheck(player, areaId)) do | ||
| for _, catchId in ipairs(answer) do | ||
| catches[catchId] = true | ||
| end | ||
| end | ||
|
|
||
| return catches | ||
| end | ||
|
|
||
| describe('Quest fishing catches', function() | ||
| it('offers the Ripped Cap in Port Windurst until the angler holds one', function() | ||
| local player = xi.test.world:spawnPlayer({ zone = xi.zone.PORT_WINDURST }) | ||
| assert(offeredCatches(player, anyArea)[xi.item.RIPPED_CAP], 'Ripped Cap was not offered') | ||
|
|
||
| player:addItem(xi.item.RIPPED_CAP) | ||
| assert(not offeredCatches(player, anyArea)[xi.item.RIPPED_CAP], 'Ripped Cap was offered to an angler holding one') | ||
| end) | ||
|
|
||
| it('offers the Hydrogauge only while Navigating the Unfriendly Seas is accepted', function() | ||
| local player = xi.test.world:spawnPlayer({ zone = xi.zone.NASHMAU }) | ||
| assert(not offeredCatches(player, anyArea)[xi.item.HYDROGAUGE], 'Hydrogauge was offered before the quest') | ||
|
|
||
| player:addQuest(xi.questLog.AHT_URHGAN, xi.quest.id.ahtUrhgan.NAVIGATING_THE_UNFRIENDLY_SEAS) | ||
| assert(offeredCatches(player, anyArea)[xi.item.HYDROGAUGE], 'Hydrogauge was not offered during the quest') | ||
| end) | ||
|
|
||
| it('offers the Damp Scroll only in the pond under the bridge until Secret of the Damp Scroll is done', function() | ||
| local pond = 2 | ||
| local player = xi.test.world:spawnPlayer({ zone = xi.zone.SEA_SERPENT_GROTTO }) | ||
| assert(offeredCatches(player, pond)[xi.item.DAMP_SCROLL], 'Damp Scroll was not offered in the pond') | ||
| assert(not offeredCatches(player, 1)[xi.item.DAMP_SCROLL], 'Damp Scroll was offered outside the pond') | ||
|
|
||
| player:addItem(xi.item.DAMP_SCROLL) | ||
| assert(not offeredCatches(player, pond)[xi.item.DAMP_SCROLL], 'Damp Scroll was offered to an angler holding one') | ||
|
|
||
| player:delItem(xi.item.DAMP_SCROLL, 1) | ||
| player:completeQuest(xi.questLog.OUTLANDS, xi.quest.id.outlands.SECRET_OF_THE_DAMP_SCROLL) | ||
| assert(not offeredCatches(player, pond)[xi.item.DAMP_SCROLL], 'Damp Scroll was offered after the quest') | ||
| end) | ||
|
|
||
| it('offers both fished Krakens only while Hook, Line, and Sinker is accepted', function() | ||
| local qufimID = zones[xi.zone.QUFIM_ISLAND] | ||
| local player = xi.test.world:spawnPlayer({ zone = xi.zone.QUFIM_ISLAND }) | ||
| local krakens = qufimID.mob.KRAKEN_FISHED_NM | ||
|
|
||
| assert(#krakens == 2, 'expected two fished Krakens in Qufim Island') | ||
| for _, krakenId in ipairs(krakens) do | ||
| assert(krakenId ~= qufimID.mob.KRAKEN_NM, 'the roaming Kraken was listed as a fished one') | ||
| assert(not offeredCatches(player, anyArea)[krakenId], 'a Kraken was offered before the quest') | ||
| end | ||
|
|
||
| player:addQuest(xi.questLog.JEUNO, xi.quest.id.jeuno.HOOK_LINE_AND_SINKER) | ||
| for _, krakenId in ipairs(krakens) do | ||
| assert(offeredCatches(player, anyArea)[krakenId], 'a Kraken was not offered during the quest') | ||
| end | ||
|
|
||
| player:completeQuest(xi.questLog.JEUNO, xi.quest.id.jeuno.HOOK_LINE_AND_SINKER) | ||
| for _, krakenId in ipairs(krakens) do | ||
| assert(not offeredCatches(player, anyArea)[krakenId], 'a Kraken was offered after the quest') | ||
| end | ||
| end) | ||
| end) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.