@@ -842,10 +842,11 @@ local function canDig(player)
842842 updatePlayerDigCount (player , 0 )
843843 digCount = 0
844844 end
845-
846845 -- neither player nor zone have reached their dig limit
847846
848- if (digCount < 100 and zoneItemsDug < 20 ) or DIG_FATIGUE == 0 then
847+ -- https://ffxiclopedia.fandom.com/wiki/Chocobo_Digging_Guide
848+ -- states 20-50... lets just go with 50?
849+ if (digCount < 100 and zoneItemsDug < 50 ) or DIG_FATIGUE == 0 then
849850 -- pesky delays
850851 if (zoneInTime + areaDigDelay ) <= currentTime and (lastDigTime + digDelay ) <= currentTime then
851852 return true
@@ -986,12 +987,31 @@ dsp.chocoboDig.start = function(player, precheck)
986987 end
987988
988989 updatePlayerDigCount (player , 1 )
989- -- updateZoneDigCount(zoneId, 1) -- TODO: implement mechanic for resetting zone dig count. until then, leave this commented out
990+ updateZoneDigCount (zoneId , 1 )
990991 -- TODO: learn abilities from chocobo raising
991992 end
992993
993994 calculateSkillUp (player )
994995
995996 return true
996997 end
998+ end
999+
1000+ -- https://ffxiclopedia.fandom.com/wiki/Chocobo_Digging_Guide
1001+ -- 2 - 8 items depending on MoonPhase
1002+ function updateDigZones ()
1003+ for zoneId , _ in pairs (digInfo ) do
1004+ local serverVar = ' [DIG]ZONE' .. zoneId .. ' _ITEMS'
1005+ local zoneItemsDug = GetServerVariable (serverVar )
1006+
1007+ if zoneItemsDug ~= 0 then
1008+ local newItems = 2 + (6 * (VanadielMoonPhase ()/ 100 ))
1009+
1010+ zoneItemsDug = zoneItemsDug - newItems
1011+ if zoneItemsDug < 0 then
1012+ zoneItemsDug = 0
1013+ end
1014+ SetServerVariable (serverVar , zoneItemsDug )
1015+ end
1016+ end
9971017end
0 commit comments