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

Implement Hitting Streak and Damage Streak (when move-persistant effects are added). #59

Closed Loreinator closed 6 years ago

Loreinator commented 9 years ago

From /u/avengahM:

I wanted to ask if you know about all the little details to do with Hitting/Damage Streak? The formula is in the miscellaneous pastebin (I think it's damage*min(2, 1.2n)), but apart from that, there are a couple more things you should know about it.

Firstly, they don't piggyback off each other, so if you trigger one then the other, the chain breaks and it starts from x1.2 again. The chain is not broken if you directly match either coins or your evolved Mega. (However, making the final match to evolve your Mega WILL still break the chain.)

Finally, the chain will also break if the combo stops due to barriers melting, then starts again. Of course, if the Streak ability activates twice in the same turn like that, then the chain will continue and increment.

I hope that makes sense. Sorry if I've not been entirely clear. Here's some more:

http://www.gamefaqs.com/boards/114531-pokemon-shuffle/71868228

http://www.gamefaqs.com/boards/114531-pokemon-shuffle/72117496

avengah commented 9 years ago

That's 1.2^n; 1.2 to the power of n, by the way (did I mistype it or did the caret not paste properly?)

EDIT: Oh, I see. Reddit auto-formatted it as a superscript. Heh :/

Loreinator commented 9 years ago

Yup, so the damage multiplier would be:

0 prior streak: 1.2 1 prior streak: 1.44 2 prior streak: 1.728 3+ prior streak: 2

Pretty simple, I don't think I'll bother having a Math.pow, but rather do:

private static final double[] streakmulti = new double[]{1.2, 1.44, 1.728, 2.0};
...
double multiplier = streakmulti[Math.min(3, getStreakNum())];

Then it should be pretty efficient and bug-free (as long as getStreakNum() is well bounded internally to always return a non-negative integer.

Loreinator commented 9 years ago

How is this sort of thing handled by the double-match glitch on 3DS? Would the hitting streak count get incremented by 2, or just 1?

avengah commented 9 years ago

Just one. That glitch doesn't activate the ability twice; it just uses the single activation to affect both matches. Risk Taker is the only ability that has different multipliers for each line due to the randomness.

Just in case you need it: http://pastebin.com/u/xJakub

The miscellaneous one has a few formulas and the ability rates are there too, with a bit more info.