19506jk / Nirvana

Written from Louis & Danny's code
Apache License 2.0
2 stars 1 forks source link

Player is dealing no damage when attacking monsters. #6

Closed rainybreeze777 closed 10 years ago

rainybreeze777 commented 10 years ago

When issuing attack command, the player successfully landed a hit on the target monster; however, no damage have been actually dealt to the monsters, thus leading to the result that monsters are invulnerable.

rainybreeze777 commented 10 years ago

Bug fixed. Cause: in PlayerInteraction.java, function combat(), after damage dealt to enemy has been calculated, enemy.changehp(damage) was not called afterwards, thus no hp change to target enemy.

Solution: Added enemy.changehp(damage).