Skip to content

feat: add max magic speed#659

Merged
sven-n merged 2 commits intoMUnique:masterfrom
5Miro:feat-add-max-magic-speed
Nov 21, 2025
Merged

feat: add max magic speed#659
sven-n merged 2 commits intoMUnique:masterfrom
5Miro:feat-add-max-magic-speed

Conversation

@5Miro
Copy link
Copy Markdown
Contributor

@5Miro 5Miro commented Nov 18, 2025

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:

  • Added MagicSpeed MaximumValue of 200 in Stats.cs (previously uncapped)
  • Added MagicSpeed MaximumValue initialization in FixAttackSpeedCalculationUpdate

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.

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @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

  • Magic Speed Cap Introduction: Introduced a maximum value of 200 for the 'MagicSpeed' attribute, aligning it with the existing 'AttackSpeed' cap to prevent indefinite scaling.
  • Persistent Configuration Update: Ensured the newly defined 'MagicSpeed' maximum value is correctly applied and persisted within the game configuration during initialization, making the cap effective upon game startup.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@jkok25
Copy link
Copy Markdown

jkok25 commented Nov 18, 2025

There is currently (hard code) a limit in Stat.cs: AttackSpeed MaximumValue = 200.
If we limit MagicSpeed MaximumValue = 200 in Stat.cs, it will not be possible to increase it in the AdminPanel - Stats.MagicSpeed.MaximumValue.
I think the limit in Stat.cs: AttackSpeed MaximumValue = 200 should be removed, and the Stats.MagicSpeed.MaximumValue and Stats.AttackSpeed.MaximumValue limits can be limited in the AdminPanel -> Full Configuration -> Attributes -> Edit Attributes: 'Attack Speed'; 'Magic Speed'

@5Miro 5Miro changed the title Feat add max magic speed feat: add max magic speed Nov 18, 2025
@sven-n
Copy link
Copy Markdown
Member

sven-n commented Nov 21, 2025

There is currently (hard code) a limit in Stat.cs: AttackSpeed MaximumValue = 200. If we limit MagicSpeed MaximumValue = 200 in Stat.cs, it will not be possible to increase it in the AdminPanel - Stats.MagicSpeed.MaximumValue. I think the limit in Stat.cs: AttackSpeed MaximumValue = 200 should be removed, and the Stats.MagicSpeed.MaximumValue and Stats.AttackSpeed.MaximumValue limits can be limited in the AdminPanel -> Full Configuration -> Attributes -> Edit Attributes: 'Attack Speed'; 'Magic Speed'

It's a bug, see #663 and #664

AddStatIfNotExists(context, gameConfiguration, Stats.WalkSpeed);

Stats.AttackSpeed.GetPersistent(gameConfiguration).MaximumValue = Stats.AttackSpeed.MaximumValue;
Stats.MagicSpeed.GetPersistent(gameConfiguration).MaximumValue = Stats.MagicSpeed.MaximumValue;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@sven-n sven-n merged commit 580f415 into MUnique:master Nov 21, 2025
2 checks passed
@sven-n
Copy link
Copy Markdown
Member

sven-n commented Nov 21, 2025

Thank you :)

@5Miro
Copy link
Copy Markdown
Contributor Author

5Miro commented Nov 21, 2025

No problem! I'm glad I was able to contribute :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants