Added the lower limit (10) of CP.

This commit is contained in:
依瑪貓 2016-12-08 07:39:31 +08:00
parent f4fb244dcf
commit a6dcb77760
5 changed files with 17 additions and 3 deletions

View File

@ -968,10 +968,16 @@ End Function
' fnCalcCP: Calculates the combat power of the Pokémon ' 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 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.nDefense + nDefense) ^ 0.5) _
* ((aBaseStats.nStamina + nStamina) ^ 0.5) _ * ((aBaseStats.nStamina + nStamina) ^ 0.5) _
* (fnGetCPM (fLevel) ^ 2) / 10) * (fnGetCPM (fLevel) ^ 2) / 10)
If nCP < 10 Then
nCP = 10
End If
fnCalcCP = nCP
End Function End Function
' fnCalcHP: Calculates the hit points of the Pokémon ' fnCalcHP: Calculates the hit points of the Pokémon

2
TODO
View File

@ -1,6 +1,6 @@
PokemonGoIV TODO PokemonGoIV TODO
* Added the lower limit (10) of CP. * Screen capture.
* Fix layout on MacOSX and MS-Windows. * Fix layout on MacOSX and MS-Windows.
* LibreOffice compability. * LibreOffice compability.
* Center the dialog. * Center the dialog.

View File

@ -970,10 +970,16 @@ End Function
&apos; fnCalcCP: Calculates the combat power of the Pokémon &apos; 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 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.nDefense + nDefense) ^ 0.5) _
* ((aBaseStats.nStamina + nStamina) ^ 0.5) _ * ((aBaseStats.nStamina + nStamina) ^ 0.5) _
* (fnGetCPM (fLevel) ^ 2) / 10) * (fnGetCPM (fLevel) ^ 2) / 10)
If nCP &lt; 10 Then
nCP = 10
End If
fnCalcCP = nCP
End Function End Function
&apos; fnCalcHP: Calculates the hit points of the Pokémon &apos; fnCalcHP: Calculates the hit points of the Pokémon

View File

@ -13,3 +13,4 @@
183.DlgMain.rdoTeamRed.Label=~Valor 183.DlgMain.rdoTeamRed.Label=~Valor
185.DlgMain.rdoTeamBlue.Label=~Mystic 185.DlgMain.rdoTeamBlue.Label=~Mystic
187.DlgMain.rdoTeamYellow.Label=~Instinct 187.DlgMain.rdoTeamYellow.Label=~Instinct
188.DlgMain.HelpText=

View File

@ -13,3 +13,4 @@
183.DlgMain.rdoTeamRed.Label=~Valor 183.DlgMain.rdoTeamRed.Label=~Valor
185.DlgMain.rdoTeamBlue.Label=~Mystic 185.DlgMain.rdoTeamBlue.Label=~Mystic
187.DlgMain.rdoTeamYellow.Label=~Instinct 187.DlgMain.rdoTeamYellow.Label=~Instinct
188.DlgMain.HelpText=