Skip to content

Add unit tests for battle damage calculation#367

Open
olijahwilliams23 wants to merge 2 commits into
lxgr-linux:masterfrom
squidaboni:buff-damage-197
Open

Add unit tests for battle damage calculation#367
olijahwilliams23 wants to merge 2 commits into
lxgr-linux:masterfrom
squidaboni:buff-damage-197

Conversation

@olijahwilliams23

Copy link
Copy Markdown
Contributor

Summary

This change continues work on Issue #197 by increasing battle damage so fights do not take as long.

Changes made

  • updated the get_hp(...) calculation in src/pokete/classes/fight/attack_process.py
  • kept missed attacks at 0
  • added a minimum damage floor of 4 for landed attacks
  • added unit tests for the damage calculation in src/tests/pokete/fight/test_attack_process.py

Validation

  • tested locally in battle
  • confirmed battles felt noticeably faster
  • added automated unit tests for get_hp(...)
  • verified that 4 unit tests passed locally

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.

1 participant