Skip to content

Commit

Permalink
fix(bell): fix mooching fishes' condition not inherited
Browse files Browse the repository at this point in the history
  • Loading branch information
ClayLivince committed Jan 6, 2022
1 parent efd9fa3 commit 2d724c6
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 41 deletions.
5 changes: 2 additions & 3 deletions Garland.Data/Modules/FishingSpots.cs
Original file line number Diff line number Diff line change
Expand Up @@ -235,16 +235,15 @@ void BuildSupplementalFishData()
foreach (string possibleBaitRaw in bait.Split(','))
{
string possibleBait = possibleBaitRaw.Trim();
if (name == possibleBait)
continue;
// If not otherwise specified, fish should inherit the time
// and weather restrictions of restricted bait (like predators).
if (!_builder.Db.ItemsByName.TryGetValue(possibleBait, out var baitItem))
throw new InvalidOperationException($"Can't find bait {possibleBait} for {name} at {currentFishingSpot.en.name}. Is the spelling correct?");

if (baitItem.fish != null)
{
if (baitItem.en.name.Value == possibleBait)
continue;

dynamic baitSpotView = ((JArray)baitItem.fish?.spots)?.FirstOrDefault(s => s["spot"] == spot.spot && s["node"] == spot.node);
if (baitSpotView == null)
throw new InvalidOperationException($"Can't find mooch {possibleBait} for {name} at {currentFishingSpot.en.name}. Did you forget to add it to the spot?");
Expand Down
103 changes: 69 additions & 34 deletions Garland.Web/bell/fish.js
Original file line number Diff line number Diff line change
Expand Up @@ -15204,6 +15204,10 @@ gt.bell.fish = [
"Fullmoon Sardine"
]
],
"during": {
"start": 18,
"end": 6
},
"hookset": "Powerful Hookset",
"tug": "Medium",
"id": 4906,
Expand All @@ -15230,6 +15234,10 @@ gt.bell.fish = [
"Fullmoon Sardine"
]
],
"during": {
"start": 18,
"end": 6
},
"hookset": "Powerful Hookset",
"tug": "Medium",
"id": 4906,
Expand All @@ -15256,6 +15264,10 @@ gt.bell.fish = [
"Fullmoon Sardine"
]
],
"during": {
"start": 18,
"end": 6
},
"hookset": "Powerful Hookset",
"tug": "Medium",
"id": 4906,
Expand Down Expand Up @@ -15387,6 +15399,10 @@ gt.bell.fish = [
"Fullmoon Sardine"
]
],
"during": {
"start": 18,
"end": 6
},
"hookset": "Powerful Hookset",
"tug": "Medium",
"id": 4918,
Expand Down Expand Up @@ -24368,6 +24384,13 @@ gt.bell.fish = [
"Mahar"
]
],
"weather": [
"Blizzards"
],
"transition": [
"Clear Skies",
"Fair Skies"
],
"hookset": "Powerful Hookset",
"tug": "Heavy",
"id": 8772,
Expand Down Expand Up @@ -38752,6 +38775,10 @@ gt.bell.fish = [
"Red Prismfish"
]
],
"during": {
"start": 4,
"end": 8
},
"hookset": "Powerful Hookset",
"tug": "Medium",
"id": 23055,
Expand Down Expand Up @@ -38779,6 +38806,10 @@ gt.bell.fish = [
"Red Prismfish"
]
],
"during": {
"start": 4,
"end": 8
},
"hookset": "Precision Hookset",
"tug": "Light",
"id": 23056,
Expand Down Expand Up @@ -38806,6 +38837,10 @@ gt.bell.fish = [
"Violet Prismfish"
]
],
"during": {
"start": 0,
"end": 4
},
"hookset": "Precision Hookset",
"tug": "Light",
"id": 24203,
Expand Down Expand Up @@ -49254,7 +49289,7 @@ gt.bell.fish = [
"scrip": "White Gatherers' Scrip"
},
{
"name": "Fate's Design",
"name": "Shadowdart Sardine",
"patch": 6.0,
"baits": [
[
Expand All @@ -49273,8 +49308,8 @@ gt.bell.fish = [
],
"hookset": "Powerful Hookset",
"tug": "Medium",
"id": 36425,
"icon": 28045,
"id": 36426,
"icon": 28046,
"func": "fish",
"rarity": 1,
"title": "The Thavnairian Coast",
Expand All @@ -49289,7 +49324,7 @@ gt.bell.fish = [
"zone": "Thavnair"
},
{
"name": "Shadowdart Sardine",
"name": "Fate's Design",
"patch": 6.0,
"baits": [
[
Expand All @@ -49308,8 +49343,8 @@ gt.bell.fish = [
],
"hookset": "Powerful Hookset",
"tug": "Medium",
"id": 36426,
"icon": 28046,
"id": 36425,
"icon": 28045,
"func": "fish",
"rarity": 1,
"title": "The Thavnairian Coast",
Expand Down Expand Up @@ -50861,7 +50896,7 @@ gt.bell.fish = [
"zone": "Mare Lamentorum"
},
{
"name": "Feverfish",
"name": "Calicia",
"patch": 6.0,
"baits": [
[
Expand All @@ -50872,16 +50907,12 @@ gt.bell.fish = [
],
[
"Versatile Lure"
],
[
"Grey Worm",
"Calicia"
]
],
"hookset": "Powerful Hookset",
"tug": "Medium",
"id": 36468,
"icon": 29315,
"hookset": "Precision Hookset",
"tug": "Light",
"id": 36470,
"icon": 29763,
"func": "fish",
"rarity": 1,
"title": "The Chlorophospond",
Expand All @@ -50896,7 +50927,7 @@ gt.bell.fish = [
"zone": "Mare Lamentorum"
},
{
"name": "Feverfish",
"name": "Calicia",
"patch": 6.0,
"baits": [
[
Expand All @@ -50907,16 +50938,12 @@ gt.bell.fish = [
],
[
"Versatile Lure"
],
[
"Grey Worm",
"Calicia"
]
],
"hookset": "Powerful Hookset",
"tug": "Medium",
"id": 36468,
"icon": 29315,
"hookset": "Precision Hookset",
"tug": "Light",
"id": 36470,
"icon": 29763,
"func": "fish",
"rarity": 1,
"title": "The Frozen Fissure",
Expand All @@ -50931,7 +50958,7 @@ gt.bell.fish = [
"zone": "Mare Lamentorum"
},
{
"name": "Calicia",
"name": "Feverfish",
"patch": 6.0,
"baits": [
[
Expand All @@ -50942,12 +50969,16 @@ gt.bell.fish = [
],
[
"Versatile Lure"
],
[
"Grey Worm",
"Calicia"
]
],
"hookset": "Precision Hookset",
"tug": "Light",
"id": 36470,
"icon": 29763,
"hookset": "Powerful Hookset",
"tug": "Medium",
"id": 36468,
"icon": 29315,
"func": "fish",
"rarity": 1,
"title": "The Chlorophospond",
Expand All @@ -50962,7 +50993,7 @@ gt.bell.fish = [
"zone": "Mare Lamentorum"
},
{
"name": "Calicia",
"name": "Feverfish",
"patch": 6.0,
"baits": [
[
Expand All @@ -50973,12 +51004,16 @@ gt.bell.fish = [
],
[
"Versatile Lure"
],
[
"Grey Worm",
"Calicia"
]
],
"hookset": "Precision Hookset",
"tug": "Light",
"id": 36470,
"icon": 29763,
"hookset": "Powerful Hookset",
"tug": "Medium",
"id": 36468,
"icon": 29315,
"func": "fish",
"rarity": 1,
"title": "The Frozen Fissure",
Expand Down
8 changes: 4 additions & 4 deletions Supplemental/FFXIV Data - Fishing.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -2298,8 +2298,8 @@ Pantherscale Grouper Shrimp Ball, Mackerel Strip, Versatile Lure !! Powerfu
The Thavnairian Coast
Thavnairian Goby Shrimp Ball, Mackerel Strip, Versatile Lure ! Precision 6 - 12 seconds
Qeyiq Sole Shrimp Ball, Mackerel Strip, Versatile Lure ! Precision 8 - 15 seconds
Fate's Design Shrimp Ball, Mackerel Strip, Versatile Lure, Shadowdart Sardine !! Powerful 14 - 24 seconds
Shadowdart Sardine Shrimp Ball, Mackerel Strip, Versatile Lure, Shadowdart Sardine !! Powerful 11 - 19 seconds
Fate's Design Shrimp Ball, Mackerel Strip, Versatile Lure, Shadowdart Sardine !! Powerful 14 - 24 seconds
Paksa Fish Shrimp Ball, Mackerel Strip, Versatile Lure, Shadowdart Sardine !! Powerful 19 - 27 seconds
The Great Runoff
Thavnairian Goby Shrimp Ball, Mackerel Strip, Versatile Lure ! Precision 8 - 12 seconds
Expand Down Expand Up @@ -2359,13 +2359,13 @@ Lunar Cichlid Gold Salmon Roe, Leech, Sky Spoon Lure, Mayfly, Versatile Lure
Teareye Gold Salmon Roe, Leech, Sky Spoon Lure, Mayfly, Versatile Lure ! Precision 12 - 24 seconds
Replipirarucu Gold Salmon Roe, Leech, Sky Spoon Lure, Mayfly, Versatile Lure !! Powerful 20 - 30 seconds
The Chlorophospond
Feverfish Grey Worm, Chimera Worm, Versatile Lure, Calicia !! Powerful 7 - 10 seconds
Calicia Grey Worm, Chimera Worm, Versatile Lure ! Precision 10 - 24 seconds
Feverfish Grey Worm, Chimera Worm, Versatile Lure, Calicia !! Powerful 7 - 10 seconds
Protomyke #987 Grey Worm, Chimera Worm, Versatile Lure !! Powerful 13 - 25 seconds
Lunar Deathworm Calicia Fair Skies !!! Powerful 21 - 32 seconds
The Frozen Fissure
Feverfish Grey Worm, Chimera Worm, Versatile Lure, Calicia !! Powerful 7 - 10 seconds
Calicia Grey Worm, Chimera Worm, Versatile Lure ! Precision 12 - 18 seconds
Feverfish Grey Worm, Chimera Worm, Versatile Lure, Calicia !! Powerful 7 - 10 seconds
Fleeting Brand Grey Worm, Chimera Worm, Versatile Lure, Calicia !! Powerful 12 - 22 seconds
Regotoise Grey Worm, Chimera Worm, Versatile Lure !! Powerful 16 - 20 seconds
Lunar Lamenter Grey Worm, Versatile Lure !! Powerful 26+ seconds
Expand Down Expand Up @@ -2432,8 +2432,8 @@ Alyketos Stardust, Versatile Lure !! Powerful 22 - 30 seconds
Limne 3-β
Wormhole Worm Panic Jig, Stardust, Versatile Lure ! Precision 8 - 18 seconds
Unidentified Flying Biomass II Panic Jig, Stardust, Versatile Lure ! Precision 8 - 19 seconds
Triaina Panic Jig, Stardust, Versatile Lure, Horizon Event !! Powerful 7 - 15 seconds (up to 16 seconds when from a Mooch)
Horizon Event Panic Jig, Stardust, Versatile Lure !! Powerful 8 - 18 seconds
Triaina Panic Jig, Stardust, Versatile Lure, Horizon Event !! Powerful 7 - 15 seconds (up to 16 seconds when from a Mooch)
E.B.E.-9318 Panic Jig, Stardust, Versatile Lure !! Powerful 11 - 24 seconds
Unbegotten Horizon Event !! Powerful 17 - 31 seconds
Phallaina Horizon Event 22 4 !!! Powerful 25 - 38 seconds

0 comments on commit 2d724c6

Please sign in to comment.