Limit the max level of Pokémons to 40.

This commit is contained in:
依瑪貓 2017-03-24 17:17:08 +08:00
parent 15e2d5012e
commit 7b344747e9
2 changed files with 22 additions and 8 deletions

View File

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

View File

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