feat: add max magic speed#659
Conversation
Summary of ChangesHello @5Miro, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses an imbalance in skill scaling by introducing a maximum cap for 'MagicSpeed'. Previously, 'MagicSpeed' could scale indefinitely, unlike 'AttackSpeed', which was capped at 200. By setting a similar cap for 'MagicSpeed', the change ensures that both physical and magical skills scale consistently at higher agility levels, promoting balanced gameplay. The maximum value remains configurable via the admin panel. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request aims to balance gameplay by capping MagicSpeed at 200, similar to AttackSpeed. The change in Stats.cs correctly defines this cap. However, the update logic in FixAttackSpeedCalculationUpdate.cs has a flaw that will prevent this cap from being applied to existing installations that have already run this update script. I've provided a suggestion to fix this.
|
There is currently (hard code) a limit in Stat.cs: AttackSpeed MaximumValue = 200. |
|
| AddStatIfNotExists(context, gameConfiguration, Stats.WalkSpeed); | ||
|
|
||
| Stats.AttackSpeed.GetPersistent(gameConfiguration).MaximumValue = Stats.AttackSpeed.MaximumValue; | ||
| Stats.MagicSpeed.GetPersistent(gameConfiguration).MaximumValue = Stats.MagicSpeed.MaximumValue; |
There was a problem hiding this comment.
This will not work when someone has already run this update.
To make this work 100% correct, you'd need to add a new separate update plugin.
However, for such a small change, we can also ignore it.
|
Thank you :) |
|
No problem! I'm glad I was able to contribute :) |
Previously, AttackSpeed was capped at 200 while MagicSpeed had no cap,
causing an imbalance where physical skills (like Twisting Slash, Power Slash)
stopped scaling at high agility levels while magic spells (like Evil Spirit)
continued to scale indefinitely.
Changes:
This ensures both physical skills and magic spells scale consistently, balancing gameplay at high agility levels. Both values remain editablein the admin panel through the AttributeDefinition MaximumValue property.