gegerlan / aog

Check out taber's updated 2022 version at taberenc/AOG_2022
https://github.com/taberenc/AOG_2022
44 stars 66 forks source link

Goblin vs Dogarnet #51

Closed ghost closed 12 years ago

ghost commented 12 years ago

Fighting as a dog against a Goblin throws this error (then crashes/closes):

NoMethodError occured while running script. undefined method `max_hp' for nil:NilClass

Edit: Same error fighting a zombie or ghost. Edit2: I can confirm that the error only occurs when at full health.

gegerlan commented 12 years ago

Thanks, I'll see what I can find later today.

gegerlan commented 12 years ago

Fixed in 346a2e0

The bug was related to a skill use rape, used to either trigger a scene, or destroy the armor worn. In this case the game tried to damage the body armor (max_hp is used to get the damage value), but since Dog Garnet can't wear any body armor (nothing = nil), the game couldn't process the request. The skill common event has been modified to make a proper check if the player character is actually wearing any body armor before damaging it.