dev-jjjjjeong-bin / Invaders-SDP

3 stars 15 forks source link

[BUG] Heart Item Pickup Does Not Increase Life #55

Closed Dream-no24 closed 1 week ago

Dream-no24 commented 1 week ago

Problem Description

When a heart item is picked up, a log message "get heart item" appears, but the player's life does not increase as expected. This is causing an issue with the item functionality.

Todo List

Feature Description

Ensure that when a heart item is picked up, it correctly increases the player's life, and the appropriate log message is displayed.

Additional Information

The heart item pickup currently triggers a log message, but there seems to be a disconnect between the item pickup and the life increment functionality.

ise-e commented 1 week ago

After checking, it was confirmed that physical strength was recovered properly.

Is it true that you acquired the item while the player's health was low?

When picking up an item while your current health is 3, it is by design that health does not regenerate.

Dream-no24 commented 1 week ago

Oh, I opened the issue after confirming that even if I ate the item when my physical strength was 2 or 1, my physical strength would not increase. But I confirmed that the heart item was working normally.

I think the file of src/inventory_develop/ItemBarrierAndHeart.java that is in charge of this is found to have been added in #51 PR, and it seems that such a bug appeared unreflected in our forked repo.

Sorry for the confusion, thank you for checking!