Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support rates for regen, spell, speed and trainings #32

Merged

Conversation

gtkatakura
Copy link
Contributor

@gtkatakura gtkatakura commented Aug 31, 2021

BASED PR: opentibiabr/otservbr-global-archived#2686

Description

  • Support to configure into config.lua new variables related to regens, spell cooldown and attack speed
rateHealthRegen = 1.0
rateHealthRegenSpeed = 1.0
rateManaRegen = 1.0
rateManaRegenSpeed = 1.0
rateSoulRegen = 1.0
rateSoulRegenSpeed = 1.0

rateSpellCooldown = 1.0
rateAttackSpeed = 1.0
rateOfflineTrainingSpeed = rateAttackSpeed
rateExerciseTrainingSpeed = rateAttackSpeed

Behaviour

Actual

  • We need to manually change health/mana gain on items.xml and vocations.xml.
  • We need to manually change all cooldown values on spells.xml

Expected

  • Now we can just set the variables rateHealthRegen/rateManaRegen, so items and vocation will change the related regen mana/health attributes
  • Now we can just set the variable rateSpellCooldown and all spells will be divided by the variable

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

rateHealthRegen, rateHealthRegenSpeed, rateManaRegen and rateManaRegenSpeed

  • Eat food to see the mana/health regen of the vocation
  • Use some item like a life ring to see the mana/health regen
  • Use the bed, the mana/health factor must by applied

rateSoulRegen/rateSoulRegenSpeed

  • Kill a monster and see if the soul regen factor is applied
  • Use the bed, the soul factor must by applied

rateSpellCooldown

  • Spawn spells to see the factor applied
  • Spawn one buff spell (utura, utura gran, utori mas sio), the value configured should be applied over the regen ticks of the magic

rateOfflineTrainingSpeed

  • Do offline training of some arm skill, the attack speed factor must use the rateOfflineTrainingSpeed

rateExerciseTrainingSpeed

  • Use an exercise weapon , the attack speed factor must use the rateExerciseTrainingSpeed

Test Configuration:

  • Server Version: 12.64
  • Client: 12.64
  • Operating System: Windows/Ubuntu

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I checked the PR checks reports
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

@sonarqubecloud

This comment has been minimized.

@Costallat Costallat force-pushed the master branch 4 times, most recently from 70cfa99 to ccd27ed Compare September 24, 2021 18:26
@Costallat Costallat force-pushed the master branch 20 times, most recently from 29e30e0 to 55e6789 Compare October 5, 2021 17:14
@sonarqubecloud

This comment has been minimized.

@github-actions
Copy link
Contributor

This PR is stale because it has been open 45 days with no activity.

@github-actions github-actions bot added the Stale No activity label Nov 28, 2021
@dudantas dudantas marked this pull request as ready for review January 6, 2022 00:25
dudantas added a commit that referenced this pull request Feb 4, 2022
ConfigManager class decoupled in a true singleton, thus allowing direct calls without needing to instantiate in each file.

Modification required for pull request: #32
This is optional, just to solve a sonar check issue.

Credits to @lgrossi for made the decouple logic.
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 4, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 19 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@dudantas dudantas merged commit 11ef421 into opentibiabr:master Feb 5, 2022
luan pushed a commit that referenced this pull request Jul 11, 2023
ConfigManager class decoupled in a true singleton, thus allowing direct calls without needing to instantiate in each file.

Modification required for pull request: #32
This is optional, just to solve a sonar check issue.

Credits to @lgrossi for made the decouple logic.
luan pushed a commit that referenced this pull request Jul 11, 2023
)

Support to configure into config.lua new variables related to regen, spell cooldown, attack speed and trainings

rateHealthRegen = 1.0
rateHealthRegenSpeed = 1.0
rateManaRegen = 1.0
rateManaRegenSpeed = 1.0
rateSoulRegen = 1.0
rateSoulRegenSpeed = 1.0

rateSpellCooldown = 1.0
rateAttackSpeed = 1.0
rateOfflineTrainingSpeed = rateAttackSpeed
rateExerciseTrainingSpeed = rateAttackSpeed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants