travis-boyd / CSC492-How2

1 stars 0 forks source link

Health and Damage Calculations #31

Open AndGit-00 opened 11 months ago

AndGit-00 commented 11 months ago

This will apply to player character and mob enemies. Taking damage and recovering health should be the same technically.

travis-boyd commented 10 months ago

I just create the interfaces we designed in the Object Data Class Diagram, namely Entity -> Player, Mob. PR: #52

This includes a very basic HP logic: a method takesDamage(int dmg) that subtracts dmg from the currentHP, and calls the method Die() if currentHP <= 0. The Die() method will need to be implemented later. This method could be used for both positive damage and negative damage (healing). Potentially this is all we need for HP calculations, with known damages at least.

These classes aren't doing anything yet, but should come in handy soon