Innoxia / liliths-throne-public

Public repository for Lilith's Throne. (18+)
Other
483 stars 434 forks source link

Overly Sleepy Enemies #1827

Open guiltygenie opened 5 months ago

guiltygenie commented 5 months ago

Description: Not a game breaking bug or anything, but certainly feels unintended. For eight hours each night starting at 11:00 PM, most non-unique enemies encountered in dangerous tiles are asleep. This happens after the standard scene where the player's assailant appears and speaks as though wide awake. Additionally, it seems that any character who is asleep in combat will never wake up as a result of being damaged or debuffed; passing turns also changes nothing. Since the effect removes 5 action points from its target, the sleeping character will never take any actions in combat.

Expected Behavior: While encountering a character sleeping in an alley late at night isn't an unreasonable occurrence, I would expect an alternate scene to indicate this along with the possibility of them waking up. Since sleeping was just added these features might already be planned (and a wakeUp method for characters already exists), but there should probably be a hotfix in the interim. This change means wandering the streets at night is much safer than during the day, and that XP and flames can be rapidly acquired from foes of any level since they won't ever actually attack you. From what I understand, this probably arises from the isConditionsMet method for the SLEEPING status (on line 2754 of StatusEffects.java) returning true when it shouldn't. What this being "fixed" looks like is honestly subjective (make characters wake up after taking damage, change sleep hours of alleyway attackers, etc.), I just found it to be a very jarring bug and figured I'd report it in case nobody else had.

To Reproduce: Load any save file and encounter an NPC in a dangerous tile between 11:00 PM and 7:00 AM in-game time. This was observed in game and confirmed by looking at the code that selects sleeping hours. The code also suggests that some subspecies will instead sleep from 9:00 AM to 3:00 PM, though I did not find any examples of this. Notably, enforcers do not seem to suffer from narcolepsy and will defend themselves as intended. The gang leaders in Submission also fight back properly regardless of the time of day, but their imp minions will all be asleep. Upon looking at the code again, this makes sense; unique characters who are neither owned by nor live with the player are entirely immune to sleep (as per the isAffectedBySleepStatusEffect method for GameCharacter).

Additional information:

Moth-GITHUB commented 5 months ago

happened before to an NPC in the gambling den for me. one of the dealers was asleep. but it didn't break anything there.

Weisskralle commented 5 months ago

Have encountered the same here. It's an interesting idea and I hope it get fixed soon in a hotfix. But good to know what caused that directly. So now I need to avoid fighting during sleep time huh.