Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There's a potential issue with items that cure sleep or dumbfounding #138

Closed
daerogami opened this issue Feb 15, 2018 · 4 comments · Fixed by #633
Closed

There's a potential issue with items that cure sleep or dumbfounding #138

daerogami opened this issue Feb 15, 2018 · 4 comments · Fixed by #633
Assignees
Labels
bug game Affects the game, as opposed to the editors
Milestone

Comments

@daerogami
Copy link
Contributor

They can also be used to gain hyperactivity or enlightenment; this is a departure from original behavior.


This is an item logged from the To-Do and was originally reported by (@CelticMinstrel?). If you are familiar with or can recreate this bug, please provide details here.

@CelticMinstrel CelticMinstrel added bug game Affects the game, as opposed to the editors labels Feb 16, 2018
@CelticMinstrel
Copy link
Member

I did change this more recently, but possibly not enough to consider this bug fixed.

@CelticMinstrel CelticMinstrel added this to the 2.0 milestone Feb 10, 2020
@NQNStudios NQNStudios self-assigned this Feb 17, 2025
@NQNStudios
Copy link
Collaborator

Confirmed.

@NQNStudios
Copy link
Collaborator

NQNStudios commented Feb 17, 2025

This is happening because opposite statuses are all on a spectrum now. Item abilities can only store whether they help/harm, they need to be able to store a maximum level for affecting the status. This seems tricky because it will mean expanding a struct which is serialized in scenarios and converted from legacy scenarios. Unless we just want to make curing sleep and curing dumbfounding hard-coded special cases.

But the pseudocode should be something like this:

// For an item that can only undo a negative affect:
if(help && has_max)
    status = max(current_status, // If current status is already positive, keep it
        max(item_max_status, // Cap the possible changed value to spectrum's neutral value (is this 0?)
            current_status + strength) // Value with help applied

This scenario has nodes to increase/decrease sleep and dumbfounding, plus some Potions of Clarity on the ground:
dumb.boes.zip

What's the item that cures sleep?

Special nodes that affect a status should also maybe be able to set a maximum changed value.

@CelticMinstrel
Copy link
Member

CelticMinstrel commented Feb 17, 2025

This is happening because opposite statuses are all on a spectrum now.

Opposite statuses were always on a spectrum. However, I think the original game actually treated "hyperactivity" as not a real status – the sleep status was considered an "unsigned" status, but the "hyperactivity" spell simply violated that contract and gave you negative sleep levels.

Unless we just want to make curing sleep and curing dumbfounding hard-coded special cases.

I don't think this would be a problem. It's not like we have any plans for custom status effects, as far as I know?

What's the item that cures sleep?

I'm not sure if there are any items in the bladbase that cure sleep, but there's things like Helm of Alertness that protect against sleep.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug game Affects the game, as opposed to the editors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants