Loreinator / Shuffle-Move

Program to help choose moves in the Pokemon Shuffle puzzle game
GNU General Public License v3.0
95 stars 18 forks source link

Account for potential double ability activations arising from unfreeze-drop delay #33

Closed JustAnotherRandomLad closed 9 years ago

JustAnotherRandomLad commented 9 years ago

Described in this bug report: http://ge.tt/6cLsjiM2/v/0

I mentioned it on Reddit a while ago - it's the "game treats turn as over if the only icons to fall are still unfreezing" thing, which can actually cause abilities to activate twice in one turn.

Loreinator commented 9 years ago

I'm not quite sure how to reliably detect that, we should compile all available information on the phenomenon for future inclusion - if we implement it wrong it could be worse than not implementing it at all.

JustAnotherRandomLad commented 9 years ago

If you wanted to handle it exactly the way the game does, you could have Shuffle Move "end" the move when the only icons still airborne are the unfreezing ones, and then just let the board "settle" for the next "move" and allow whatever lines up first to trigger an ability as if it was the result of a move. This would be especially appropriate if the glitch allows icons to be moved around while the unfrozen ones are still falling, which I'm about to try testing right now.

EDIT: Just realized this would screw over overall damage calculations. The suggestion immediately below is much better.

Loreinator commented 9 years ago

I guess...

Maybe have it check that the only thing on the queues is an 'erase' task without anything to erase (that's how the program tracks unfreezing), then store the current chain count and reset the accessible chain count to force it to consider the next combos as 'first combos'.

JustAnotherRandomLad commented 9 years ago

That's how the game does it, so sounds good to me.

Results of my first test attempt at moving on the fly were ambiguous, but lean toward being negative. I'm going to try again in a few minutes.

EDIT: Nope, you can't make a move while this is happening - the screen lighting back up is purely cosmetic.

Loreinator commented 9 years ago

Do we know the exact situation when this will occur? I.e. where exactly should I put the SimulationState.setChainPause() call? This is when it sets a counter to note when the last time the chain started over was - which is used to get the actual combo number for a given simulation (when equal to zero it allows effect activation).

JustAnotherRandomLad commented 9 years ago

If there is any moment at which nothing is falling and the only things being erased are barriers, that moment (which will be the very last frame of an unfreeze) is when the combo resets.

Loreinator commented 9 years ago

Pretty sure this is fixed in the next release. If it isn't please reopen this issue and we'll investigate a better place to put the check.

Loreinator commented 9 years ago

Nevermind, wrong issue.