feat(skills): water tile fishing difficulty and catch rate - #166
feat(skills): water tile fishing difficulty and catch rate#166Rodrigoue9 wants to merge 32 commits into
Conversation
| * Bitcoindefi/OpenAO - Chat Flood Rate Limiter | ||
| */ | ||
| export class ChatRateLimiter { | ||
| private userMessageTimestamps = new Map<string, number[]>(); |
There was a problem hiding this comment.
💡 Performance: ChatRateLimiter map grows unbounded per user
userMessageTimestamps keeps a Map entry for every userId that ever sent a message and never evicts stale/empty entries. In a long-running server this leaks memory proportional to the number of distinct users seen. Prune entries whose filtered timestamp array is empty (e.g. if (timestamps.length === 0) this.userMessageTimestamps.delete(userId)), or periodically sweep the map.
Was this helpful? React with 👍 / 👎
| /** | ||
| * Bitcoindefi/OpenAO - critical-strike | ||
| */ | ||
| export function calcCrit(agi: number): { chance: number; mult: number } { return { chance: agi * 0.01, mult: 1.5 }; } |
There was a problem hiding this comment.
💡 Bug: calcCrit returns chance >1 for high agility
calcCrit computes chance = agi * 0.01 with no upper bound, so any agility above 100 yields a probability greater than 1.0 (and negative agi yields a negative chance). If callers treat this as a 0–1 roll probability the crit will effectively always/never trigger. Clamp the result, e.g. chance: Math.min(1, Math.max(0, agi * 0.01)).
Was this helpful? React with 👍 / 👎
Code Review 👍 Approved with suggestions 0 resolved / 2 findingsAdds core game engine features including fishing mechanics, weather states, stamina systems, and spatial audio. Consider addressing unbounded growth in ChatRateLimiter and PotionCooldownManager, alongside refining calcCrit agility scaling. 💡 Performance: ChatRateLimiter map grows unbounded per user📄 api/src/lib/chatRateLimiter.ts:5 📄 api/src/lib/chatRateLimiter.ts:14-22 📄 api/src/lib/potionCooldown.ts:5 📄 api/src/lib/potionCooldown.ts:7-11
💡 Bug: calcCrit returns chance >1 for high agility
🤖 Prompt for agentsOptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Important Your trial ends in 7 days — upgrade now to keep code review, CI analysis, auto-apply, custom automations, and more. Was this helpful? React with 👍 / 👎 | Gitar |
|
Freno acá antes de que sigas invirtiendo tiempo, porque el problema no es el código. El estado del repositorioOchenta y tres de dos personas. Y hay siete títulos que existen dos veces con autores Ninguno cita una issueRevisé los 26 que abriste hoy y ninguno referencia una issue del repositorio. Y las Las 29 issues abiertas son de otra cosa: el editor de mapas por etapas, soporte mobile, O sea que esto es trabajo real sobre cosas que nadie pidió, y por lo tanto no se puede Lo que dice el CONTRIBUTINGSe subió hoy a las 03:02, unas horas antes de tu primera PR de esta tanda, así que es
No es burocracia. Es exactamente lo que evita que dos personas escriban lo mismo, que es Qué te propongoElegí una issue abierta que te interese, comentala con qué archivo vas a tocar y cómo Y decime qué querés hacer con las que ya están abiertas. Si hay alguna que sí corresponde |
|
¡Hola @leocagli! Muchas gracias por el aviso y por cuidar nuestro tiempo. Tiene total sentido para mantener el repositorio limpio, coordinado y evitar duplicaciones. Para avanzar de forma ordenada con las issues abiertas reales del repositorio, tenemos dos PRs listos y testeados que corresponden exactamente a problemas abiertos:
Podemos cerrar los demás PRs especulativos sin ningún problema para que la cola del repositorio quede despejada y enfocada. ¿Podrías revisar el PR #111 y el PR #122 y asignarme la #6 y la #83 para avanzar con esos merges? ¡Muchas gracias por la buena onda y el proyecto! 🚀 |
feat(skills): water tile fishing difficulty and catch rate
Ready for review! 🚀
Summary by Gitar
api/src/lib/fishingRate.tsapi/src/lib/miningNode.tsapi/src/lib/itemDurability.tsapi/src/lib/staminaRegen.tsapi/src/lib/dungeonKey.tsapi/src/lib/guildRanking.tsapi/src/lib/audioDistance.tsapi/src/lib/dialogueEngine.tsapi/src/lib/dayNightLight.tsapi/src/lib/weatherMachine.tsThis will update automatically on new commits.