Skip to content

Conversation

@kphoenix137
Copy link
Collaborator

@kphoenix137 kphoenix137 commented Dec 27, 2025

DamageWeapon() is very repetitive and has some bugs:

  • Dual wielding can result in the right hand item not losing damage %/durability on attacks
  • Indestructible items with a current durability < 255 can lose durability and be destroyed
  • Inconsistent durability conditions (<= 0 VS == 0)

DecayWeapon() isn't really needed and just adds additional complexity. It can safely be nested in DamageWeapon()'s for loop in the refactored function, preventing the need for an additional for loop for the purpose of checking all hand items while dual wielding.

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