Loreinator / Shuffle-Move

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

"Shot skills", Super Tackle #281

Closed Manitary closed 7 years ago

Manitary commented 7 years ago

Among the new skills, these 2 may need some coding from you:

Barrier/Block/Rock Shot: removes 2 barriers/blocks/rocks, and (if successful) deals 2x damage. Boosting the skill increases the bonus damage. So it's a mix of Barrier Bash (skill level increases the damage), but with bonus damage even at SL1, which I don't know how to handle in the code.

Super Tackle: 4-matches deals increased damage. The problem here is that, unlike Po4/Po4+/4Up, skill boosting increases the rates, so I think that with the current code it would get an increase on all match sizes instead of just 4.

p.s.: I committed the stuff I already wrote for the update here, I'll make the request after I get more boards, and confirmations about some skills.

Loreinator commented 7 years ago

I've implemented SUPER_TACKLE on the main branch. Basically, to enforce that the odds only go above 0 for a 4-match, use this code snippet:

      @Override
      protected double getOdds(SimulationTask task, ActivateComboEffect e) {
         if (e.getNumBlocks() == 4) {
            return super.getOdds(task, e);
         } else {
            return 0;
         }
      }
Loreinator commented 7 years ago

Regarding the Barrier/Block/Rock Shot skills, you can just increase the base multiplier to 200. The rest of the code should work more-or-less by copying it from the other skills.

For example, ROCK_BREAK: STRING ROCK_BREAK 100 100 100 100 150 170 180 200 MULT Can be converted to ROCK_SHOT by, for example, multiplying the multipliers by 2: STRING ROCK_SHOT 100 100 100 200 300 340 360 400 MULT

As for the code side, that "canActivate" not only controls activation, but score. If there are no blocks to erase, the multiplier won't take effect. It should work without any special handling beyond what is already done for the ROCK_BREAK, etc. effects.

Manitary commented 7 years ago

Super Tackle works fine, it will get an update since the multiplier was wrong.

Shot skills don't work properly, hopefully this log will help (the description I put should be clear enough anyway to replicate it).

bugReport_20170510_124138_BST.zip

Loreinator commented 7 years ago

Implemented what I think is a fix for this now, can you check the next development build?

I took the code used for barrier bash + and block smash + to adjust the code of the shot skills, but forcing the number replaced to always be 2.

Regarding the multipliers, the "MULT" indicates that the last 4 numbers are interpreted as the multiplier used instead of the multiplier. The effect definition is:

STRING EFFECT_NAME Odds_3match Odds_4match Odds_5match Multiplier Level2 Level3 Level4 Level5 Designator

Multiplier could be either a number of blocks (Quirky++), a score multiplier on a match (power of 4), or a score additive on a match (Heracross). The Designator defines what the LevelX fields mean. ODDS states that they boost the Odds_Xmatch values. MULT instead makes them replace the "Multiplier" for those skill levels.

So the correct shot entries are:

STRING BARRIER_SHOT 60 100 100 200 300 400 600 800 MULT
STRING BLOCK_SHOT 60 100 100 200 300 400 600 800 MULT
STRING ROCK_SHOT 60 100 100 200 300 400 600 800 MULT
Loreinator commented 7 years ago

Shuffle Move v0.3.104.377.zip

Try this and let me know if the issue is fixed

Manitary commented 7 years ago

It looks like it's working correctly now

ZeroRin commented 7 years ago

dwqnmi 5l3b wg 2y

still not working i suppose tested on v0.3.106

Loreinator commented 7 years ago

What's the issue? 5 blocks removed. Should non-support species removed be counted as disruptions?

Manitary commented 7 years ago

It should add extra damage (200 300 400 600 800 MULT), my guess is that it doesn't work because I copied the code from Quirky+ and that does not include calculation of any extra damage.

ZeroRin commented 7 years ago

the damage wasn't calculated properly, it should be 90*2=180

Loreinator commented 7 years ago

Try the development version, with the fix for the multiplier handling added:

Google drive link is: https://drive.google.com/uc?id=0Bwi_f200YyRqRC1KWGtjMzU3LWs&export=download

MD5Sum is: 5B78742B8C0A2ED70CCE41B90EAB2728

ZeroRin commented 7 years ago

it works for me now ^_^