Fixed the estimated max CP where the level should be double, not integer. Advanced to version 0.5.1.

This commit is contained in:
依瑪貓 2017-05-19 16:17:54 +08:00
parent 3912a62184
commit 720376544c
4 changed files with 14 additions and 14 deletions

View File

@ -89,7 +89,7 @@ Function fnFindIV ( _
Dim fLevel As Double, nStamina As Integer Dim fLevel As Double, nStamina As Integer
Dim nAttack As Integer, nDefense As integer Dim nAttack As Integer, nDefense As integer
Dim nI As Integer, nJ As Integer Dim nI As Integer, nJ As Integer
Dim fStep As Double, nN As Integer, nMaxLevel As Integer Dim fStep As Double, nN As Integer, fMaxLevel As Double
If aQuery.sPokemonId = "" Then If aQuery.sPokemonId = "" Then
fnFindIV = maIV fnFindIV = maIV
@ -114,9 +114,9 @@ Function fnFindIV ( _
Next nI Next nI
End If End If
nN = -1 nN = -1
nMaxLevel = aQuery.nPlayerLevel + 1.5 fMaxLevel = aQuery.nPlayerLevel + 1.5
If nMaxLevel > 40 Then If fMaxLevel > 40 Then
nMaxLevel = 40 fMaxLevel = 40
End If End If
For fLevel = 1 To UBound (mStardust) Step fStep For fLevel = 1 To UBound (mStardust) Step fStep
If mStardust (CInt (fLevel - 0.5)) = aQuery.nStardust Then If mStardust (CInt (fLevel - 0.5)) = aQuery.nStardust Then
@ -138,7 +138,7 @@ Function fnFindIV ( _
End With End With
If aQuery.nPlayerLevel <> 0 Then If aQuery.nPlayerLevel <> 0 Then
maIV (nN).nMaxCP = fnCalcCP ( _ maIV (nN).nMaxCP = fnCalcCP ( _
aBaseStats, nMaxLevel, _ aBaseStats, fMaxLevel, _
nAttack, nDefense, nStamina) nAttack, nDefense, nStamina)
End If End If
maIV (nN).maEvolved _ maIV (nN).maEvolved _
@ -153,7 +153,7 @@ Function fnFindIV ( _
maIV (nN).maEvolved (nI).nMaxCP _ maIV (nN).maEvolved (nI).nMaxCP _
= fnCalcCP ( _ = fnCalcCP ( _
maEvBaseStats (nI), _ maEvBaseStats (nI), _
nMaxLevel, nAttack, _ fMaxLevel, nAttack, _
nDefense, nStamina) nDefense, nStamina)
End If End If
Next nI Next nI

View File

@ -1 +1 @@
0.5.0 0.5.1

View File

@ -91,7 +91,7 @@ Function fnFindIV ( _
Dim fLevel As Double, nStamina As Integer Dim fLevel As Double, nStamina As Integer
Dim nAttack As Integer, nDefense As integer Dim nAttack As Integer, nDefense As integer
Dim nI As Integer, nJ As Integer Dim nI As Integer, nJ As Integer
Dim fStep As Double, nN As Integer, nMaxLevel As Integer Dim fStep As Double, nN As Integer, fMaxLevel As Double
If aQuery.sPokemonId = &quot;&quot; Then If aQuery.sPokemonId = &quot;&quot; Then
fnFindIV = maIV fnFindIV = maIV
@ -116,9 +116,9 @@ Function fnFindIV ( _
Next nI Next nI
End If End If
nN = -1 nN = -1
nMaxLevel = aQuery.nPlayerLevel + 1.5 fMaxLevel = aQuery.nPlayerLevel + 1.5
If nMaxLevel &gt; 40 Then If fMaxLevel &gt; 40 Then
nMaxLevel = 40 fMaxLevel = 40
End If End If
For fLevel = 1 To UBound (mStardust) Step fStep For fLevel = 1 To UBound (mStardust) Step fStep
If mStardust (CInt (fLevel - 0.5)) = aQuery.nStardust Then If mStardust (CInt (fLevel - 0.5)) = aQuery.nStardust Then
@ -140,7 +140,7 @@ Function fnFindIV ( _
End With End With
If aQuery.nPlayerLevel &lt;&gt; 0 Then If aQuery.nPlayerLevel &lt;&gt; 0 Then
maIV (nN).nMaxCP = fnCalcCP ( _ maIV (nN).nMaxCP = fnCalcCP ( _
aBaseStats, nMaxLevel, _ aBaseStats, fMaxLevel, _
nAttack, nDefense, nStamina) nAttack, nDefense, nStamina)
End If End If
maIV (nN).maEvolved _ maIV (nN).maEvolved _
@ -155,7 +155,7 @@ Function fnFindIV ( _
maIV (nN).maEvolved (nI).nMaxCP _ maIV (nN).maEvolved (nI).nMaxCP _
= fnCalcCP ( _ = fnCalcCP ( _
maEvBaseStats (nI), _ maEvBaseStats (nI), _
nMaxLevel, nAttack, _ fMaxLevel, nAttack, _
nDefense, nStamina) nDefense, nStamina)
End If End If
Next nI Next nI

View File

@ -19,7 +19,7 @@
Option Explicit Option Explicit
&apos; subTestWidth: Tests the width of the dialog text &apos; subTestWidth: Tests the width of the dialog text.
Sub subTestWidth Sub subTestWidth
Dim oDialog As Object, oDialogModel As Object Dim oDialog As Object, oDialogModel As Object
Dim oTextModel As Object, oListModel As Object Dim oTextModel As Object, oListModel As Object