Smujb / powered-pixel-dungeon

Powered Pixel Dungeon - a mod of Shattered Pixel Dungeon that reworks many aspects of gameplay.
GNU General Public License v3.0
9 stars 2 forks source link

[Request] Customizable waiting duration #55

Open vi opened 4 years ago

vi commented 4 years ago

If a fast hero waits an enemy at the door, pressing "wait" should only wait for enough time for enemy to appear at the door, not also attack or walk away.

Smujb commented 4 years ago

Are you sure the enemy wasn't hasted or a Crab and you weren't slowed? The wait button is bound 100% of the time to "spendAndNext(1f)" with nothing complicated going on in the background. The only way this could be happening is:

vi commented 4 years ago

Probably it's because of while pressing the wait button I sometimes want to wait for less than 1 full move. Instead I want to wait for the next event.

This happens with the Ring of Haste more.

Smujb commented 4 years ago

Ah okay. Well, that'd be super difficult to program. I suppose I could try to add a way to wait half a turn, or have a customizable wait length.

Smujb commented 4 years ago

Keeping the issue open as a suggestion not a bug report, as it's not a bug but is potentially an interesting QoL feature

vi commented 4 years ago

Well, that'd be super difficult to program.

Long-press wait typically waits until something happens, i.e. enemy is noticed.

Maybe short-press wait should be like long-press wait, but not more than 1 full move?

Another idea is to wait until current move number becomes integer (i.e. that circular thing at the top shows no fractional move status), then waiting for 1 full turn if it is already integer.

Smujb commented 4 years ago

That last one could certainly work. As for the first, that would still be difficult to program because of the way resting is implemented (badly)

vi commented 4 years ago

Can't there be resting + an "alarm clock" for 1 move ahead.

Smujb commented 4 years ago

Not really... ? The game just sets "resting" to true, it doesn't know when a turn has passed, needs a callback to be called from elsewhere to say an enemy has arrived.

vi commented 4 years ago

For example, resting automatically stops when "Starving" buff appears.

Maybe "alarm clock" can also be implemented as a hidden technical buff?


Maybe the proper place to fix it is Shattered Pixel Dungeon - the problem is also reproducible there and Powered merges back changes from it.

Fixing it in Shattered would avoid upstream discrepancy, unless Shattered readily accepts fixes from downstream projects.

Smujb commented 4 years ago

Yes, but other factors affect duration of buffs and it would be unlikely to spend exactly a turn as all actors are desynced from each other. You'd spend like .999999999 or 1.00000001 of a turn.

vi commented 4 years ago

Shouldn't .999999999 or 1.00000001 of a turn be considered equivalent - they are both almost "1.0".

When in doubt, waiting should err on the side of waiting less rather than more.

Smujb commented 4 years ago

No. No actor in the system has the same time. The difference is entirely random and out of my control, unless I add a manual exception for it like the hero always acting first which would get messy reallly fast.

vi commented 4 years ago

I often notice that short-pressing the wait button makes enemies that are typically moving one tile at a time move two tiles, as if it waits for 1.5-2 full moves instead.