diff --git a/PokemonGoIV/0Main.vb b/PokemonGoIV/0Main.vb index 0e2ff55..ad0c8f0 100644 --- a/PokemonGoIV/0Main.vb +++ b/PokemonGoIV/0Main.vb @@ -968,10 +968,16 @@ End Function ' fnCalcCP: Calculates the combat power of the Pokémon Function fnCalcCP (aBaseStats As aStats, fLevel As Double, nAttack As Integer, nDefense As Integer, nStamina As Integer) As Integer - fnCalcCP = fnFloor ((aBaseStats.nAttack + nAttack) _ + Dim nCP As Integer + + nCP = fnFloor ((aBaseStats.nAttack + nAttack) _ * ((aBaseStats.nDefense + nDefense) ^ 0.5) _ * ((aBaseStats.nStamina + nStamina) ^ 0.5) _ * (fnGetCPM (fLevel) ^ 2) / 10) + If nCP < 10 Then + nCP = 10 + End If + fnCalcCP = nCP End Function ' fnCalcHP: Calculates the hit points of the Pokémon diff --git a/TODO b/TODO index ef09df6..1fce8a5 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,6 @@ PokemonGoIV TODO -* Added the lower limit (10) of CP. +* Screen capture. * Fix layout on MacOSX and MS-Windows. * LibreOffice compability. * Center the dialog. diff --git a/oxt/PokemonGoIV/0Main.xba b/oxt/PokemonGoIV/0Main.xba index 73aef5a..1751ffb 100644 --- a/oxt/PokemonGoIV/0Main.xba +++ b/oxt/PokemonGoIV/0Main.xba @@ -970,10 +970,16 @@ End Function ' fnCalcCP: Calculates the combat power of the Pokémon Function fnCalcCP (aBaseStats As aStats, fLevel As Double, nAttack As Integer, nDefense As Integer, nStamina As Integer) As Integer - fnCalcCP = fnFloor ((aBaseStats.nAttack + nAttack) _ + Dim nCP As Integer + + nCP = fnFloor ((aBaseStats.nAttack + nAttack) _ * ((aBaseStats.nDefense + nDefense) ^ 0.5) _ * ((aBaseStats.nStamina + nStamina) ^ 0.5) _ * (fnGetCPM (fLevel) ^ 2) / 10) + If nCP < 10 Then + nCP = 10 + End If + fnCalcCP = nCP End Function ' fnCalcHP: Calculates the hit points of the Pokémon diff --git a/oxt/PokemonGoIV/DialogStrings_en_US.properties b/oxt/PokemonGoIV/DialogStrings_en_US.properties index 32c6d4b..20f68ac 100644 --- a/oxt/PokemonGoIV/DialogStrings_en_US.properties +++ b/oxt/PokemonGoIV/DialogStrings_en_US.properties @@ -13,3 +13,4 @@ 183.DlgMain.rdoTeamRed.Label=~Valor 185.DlgMain.rdoTeamBlue.Label=~Mystic 187.DlgMain.rdoTeamYellow.Label=~Instinct +188.DlgMain.HelpText= diff --git a/oxt/PokemonGoIV/DialogStrings_zh_TW.properties b/oxt/PokemonGoIV/DialogStrings_zh_TW.properties index 1a1edce..5aca11b 100644 --- a/oxt/PokemonGoIV/DialogStrings_zh_TW.properties +++ b/oxt/PokemonGoIV/DialogStrings_zh_TW.properties @@ -13,3 +13,4 @@ 183.DlgMain.rdoTeamRed.Label=~Valor 185.DlgMain.rdoTeamBlue.Label=~Mystic 187.DlgMain.rdoTeamYellow.Label=~Instinct +188.DlgMain.HelpText=