Jerakin / Pokedex5E

GNU General Public License v3.0
95 stars 30 forks source link

Existing pokemons' HP incorrect after update to 1.13.3 #711

Closed fdepaola closed 3 years ago

fdepaola commented 3 years ago

This may be specific to pokemon who had damage on them at the time of updating the app. Not sure what version I was on before updating to 1.13.3, though. Pasting the two examples that I noticed. When opening the app, the Abra showed -11/15 and Dratini showed 30/26.

The Dratini's HP max actually makes sense thanks to its Loyalty of +2 providing a +1 HP max, but the current was still wrong.

{"abilities":["Synchronize"],"attributes":{"CHA":0,"CON":0,"DEX":0,"INT":0,"STR":0,"WIS":0,"custom":{"CHA":0,"CON":0,"DEX":0,"INT":0,"STR":0,"WIS":0},"increased":{"CHA":0,"CON":0,"DEX":0,"INT":0,"STR":0,"WIS":0},"nature":{"DEX":-2,"STR":2}},"exp":7696,"feats":[],"hp":{"current":1,"edited":false,"max":20,"temp":0},"id":"0c48f0b954a2adb212c7ac5cfcc8628a","level":{"caught":4,"current":5,"evolved":[]},"location":1,"loyalty":0,"moves":{"Scratch":{"index":2,"pp":18},"Teleport":{"index":1,"pp":10}},"nature":"Reckless","number":11,"slot":2,"species":{"caught":"Abra","current":"Abra"},"statuses":[],"version":7}

{"abilities":["Shed Skin"],"attributes":{"CHA":0,"CON":0,"DEX":0,"INT":0,"STR":0,"WIS":0,"custom":{"CHA":0,"CON":0,"DEX":0,"INT":0,"STR":0,"WIS":0},"increased":{"CHA":0,"CON":0,"DEX":0,"INT":0,"STR":0,"WIS":0},"nature":{"AC":1,"DEX":-2}},"exp":400,"feats":[],"hp":{"current":25,"edited":false,"max":25,"temp":0},"id":"ac0e84ce984bc52e3c15157c69eed7b0","level":{"caught":1,"current":2,"evolved":[]},"location":1,"loyalty":2,"moves":{"Leer":{"index":1,"pp":15},"Thunder Wave":{"index":3,"pp":9},"Twister":{"index":4,"pp":10},"Wrap":{"index":2,"pp":14}},"nature":"Hardy","number":10,"slot":3,"species":{"caught":"Dratini","current":"Dratini"},"statuses":[],"version":7}

magroader commented 3 years ago

A level 5 Abra that I have is showing 15 HP, which should be 27 (15 + 44 - 14 with a d6 hit die and a -1 Con modifier), and a level 2 Dratini showing 26 when I believe it should be 25 (20 + 5 + 0 with a d8 hit die and a neutral Con modifier).

magroader commented 3 years ago

Abra was wrong due to a bug in the HP calculation taking into account Abra starting at when you CAUGHT it (level 4) rather than what an Abra should start at (level 1).

Dratini's 26 HP was correct. I'm not sure how it ended up with 30/26 - when I paste this one I get 25/26.