Fixed to show the multiple evolved forms properly, for Eevee and others.
This commit is contained in:
parent
e4fda1c309
commit
12e4cd3052
@ -12,9 +12,8 @@ Type aStats
|
|||||||
nAttack As Integer
|
nAttack As Integer
|
||||||
nDefense As Integer
|
nDefense As Integer
|
||||||
nTotal As Integer
|
nTotal As Integer
|
||||||
sEvolveInto As String
|
|
||||||
nEvolvedCP As Integer
|
|
||||||
nMaxCP As Integer
|
nMaxCP As Integer
|
||||||
|
maEvolvedForms () As aEvolveForm
|
||||||
End Type
|
End Type
|
||||||
|
|
||||||
' The amount of star dust to power-up.
|
' The amount of star dust to power-up.
|
||||||
@ -37,13 +36,19 @@ Type aFindIVParam
|
|||||||
bIsCancelled As Boolean
|
bIsCancelled As Boolean
|
||||||
End Type
|
End Type
|
||||||
|
|
||||||
|
Type aEvolveForm
|
||||||
|
sPokemon As String
|
||||||
|
nCP As Integer
|
||||||
|
nMaxCP As Integer
|
||||||
|
End Type
|
||||||
|
|
||||||
Private maBaseStats () As New aStats
|
Private maBaseStats () As New aStats
|
||||||
Private mCPM () As Double, mStarDust () As Integer
|
Private mCPM () As Double, mStarDust () As Integer
|
||||||
|
|
||||||
' subMain: The main program
|
' subMain: The main program
|
||||||
Sub subMain
|
Sub subMain
|
||||||
BasicLibraries.loadLibrary "XrayTool"
|
BasicLibraries.loadLibrary "XrayTool"
|
||||||
Dim maIVs As Variant, nI As Integer, sOutput As String
|
Dim maIVs As Variant, nI As Integer
|
||||||
Dim aQuery As New aFindIVParam, aBaseStats As New aStats
|
Dim aQuery As New aFindIVParam, aBaseStats As New aStats
|
||||||
|
|
||||||
aQuery = fnAskParam
|
aQuery = fnAskParam
|
||||||
@ -51,25 +56,7 @@ Sub subMain
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
maIVs = fnFindIV (aQuery)
|
maIVs = fnFindIV (aQuery)
|
||||||
sOutput = ""
|
If UBound (maIVs) = -1 Then
|
||||||
For nI = 0 To UBound (maIVs)
|
|
||||||
sOutput = sOutput _
|
|
||||||
& " Lv=" & maIVs (nI).fLevel _
|
|
||||||
& " Atk=" & maIVs (nI).nAttack _
|
|
||||||
& " Def=" & maIVs (nI).nDefense _
|
|
||||||
& " Sta=" & maIVs (nI).nStamina _
|
|
||||||
& " IV=" & fnFloor (maIVs (nI).nTotal * 100 / 45) & "%"
|
|
||||||
If aQuery.sPokemon <> maIVs (nI).sEvolveInto Then
|
|
||||||
aBaseStats = fnGetBaseStats (maIVs (nI).sEvolveInto)
|
|
||||||
sOutput = sOutput & " Ev=" & maIVs (nI).sEvolveInto _
|
|
||||||
& " " & maIVs (nI).nEvolvedCP
|
|
||||||
End If
|
|
||||||
If aQuery.nPlayerLevel <> 0 Then
|
|
||||||
sOutput = sOutput & " XCP=" & maIVs (nI).nMaxCP
|
|
||||||
End If
|
|
||||||
sOutput = sOutput & Chr (10)
|
|
||||||
Next nI
|
|
||||||
If sOutput = "" Then
|
|
||||||
MsgBox "Found no matching IV."
|
MsgBox "Found no matching IV."
|
||||||
Else
|
Else
|
||||||
subSaveIV (aQuery, maIVs)
|
subSaveIV (aQuery, maIVs)
|
||||||
@ -841,6 +828,7 @@ Function fnFindIV (aQuery As aFindIVParam) As Variant
|
|||||||
Dim nI As Integer, nJ As Integer
|
Dim nI As Integer, nJ As Integer
|
||||||
Dim fStep As Double, nCount As Integer
|
Dim fStep As Double, nCount As Integer
|
||||||
Dim aEvBaseStats As new aStats, aTempIV As New aStats
|
Dim aEvBaseStats As new aStats, aTempIV As New aStats
|
||||||
|
Dim maEvolvedForms () As New aEvolveForm
|
||||||
|
|
||||||
If aQuery.sPokemon = "" Then
|
If aQuery.sPokemon = "" Then
|
||||||
fnFindIV = maIV
|
fnFindIV = maIV
|
||||||
@ -852,14 +840,10 @@ Function fnFindIV (aQuery As aFindIVParam) As Variant
|
|||||||
fStep = 0.5
|
fStep = 0.5
|
||||||
End If
|
End If
|
||||||
aBaseStats = fnGetBaseStats (aQuery.sPokemon)
|
aBaseStats = fnGetBaseStats (aQuery.sPokemon)
|
||||||
aEvBaseStats = fnGetBaseStats (aBaseStats.sEvolveInto)
|
|
||||||
subReadStarDust
|
subReadStarDust
|
||||||
nCount = -1
|
nCount = -1
|
||||||
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
|
||||||
'For nI = 0 To UBound (maStarDust) Step nStep
|
|
||||||
' fLevel = maStarDust (nI).fLevel
|
|
||||||
' If maStarDust (nI).nStarDust = aQuery.nStarDust Then
|
|
||||||
For nStamina = 0 To 15
|
For nStamina = 0 To 15
|
||||||
If fnCalcHP (aBaseStats, fLevel, nStamina) = aQuery.nHP Then
|
If fnCalcHP (aBaseStats, fLevel, nStamina) = aQuery.nHP Then
|
||||||
For nAttack = 0 To 15
|
For nAttack = 0 To 15
|
||||||
@ -876,14 +860,23 @@ Function fnFindIV (aQuery As aFindIVParam) As Variant
|
|||||||
.nDefense = nDefense
|
.nDefense = nDefense
|
||||||
.nStamina = nStamina
|
.nStamina = nStamina
|
||||||
.nTotal = nAttack + nDefense + nStamina
|
.nTotal = nAttack + nDefense + nStamina
|
||||||
.sEvolveInto = aBaseStats.sEvolveInto
|
|
||||||
.nEvolvedCP = fnCalcCP (aEvBaseStats, fLevel, nAttack, nDefense, nStamina)
|
|
||||||
End With
|
End With
|
||||||
If aQuery.nPlayerLevel <> 0 Then
|
If aQuery.nPlayerLevel <> 0 Then
|
||||||
maIV (nCount).nMaxCP = fnCalcCP (aEvBaseStats, aQuery.nPlayerLevel + 1.5, nAttack, nDefense, nStamina)
|
maIV (nCount).nMaxCP = fnCalcCP (aBaseStats, aQuery.nPlayerLevel + 1.5, nAttack, nDefense, nStamina)
|
||||||
Else
|
Else
|
||||||
maIV (nCount).nMaxCP = -1
|
maIV (nCount).nMaxCP = -1
|
||||||
End If
|
End If
|
||||||
|
maIV (nCount).maEvolvedForms = fnGetEvolvedFormArray (UBound (aBaseStats.maEvolvedForms))
|
||||||
|
For nI = 0 To UBound (aBaseStats.maEvolvedForms)
|
||||||
|
maIV (nCount).maEvolvedForms (nI).sPokemon = aBaseStats.maEvolvedForms (nI).sPokemon
|
||||||
|
aEvBaseStats = fnGetBaseStats (aBaseStats.maEvolvedForms (nI).sPokemon)
|
||||||
|
maIV (nCount).maEvolvedForms (nI).nCP = fnCalcCP (aEvBaseStats, fLevel, nAttack, nDefense, nStamina)
|
||||||
|
If aQuery.nPlayerLevel <> 0 Then
|
||||||
|
maIV (nCount).maEvolvedForms (nI).nMaxCP = fnCalcCP (aEvBaseStats, aQuery.nPlayerLevel + 1.5, nAttack, nDefense, nStamina)
|
||||||
|
Else
|
||||||
|
maIV (nCount).maEvolvedForms (nI).nMaxCP = -1
|
||||||
|
End If
|
||||||
|
Next nI
|
||||||
End If
|
End If
|
||||||
Next nDefense
|
Next nDefense
|
||||||
Next nAttack
|
Next nAttack
|
||||||
@ -906,14 +899,42 @@ End Function
|
|||||||
|
|
||||||
' fnCompareIV: Compare two IVs for sorting
|
' fnCompareIV: Compare two IVs for sorting
|
||||||
Function fnCompareIV (aIVa As aStats, aIVb As aStats) As Double
|
Function fnCompareIV (aIVa As aStats, aIVb As aStats) As Double
|
||||||
fnCompareIV = aIVb.nMaxCP - aIVa.nMaxCP
|
Dim nCPa As Integer, nCPb As Integer, nI As Integer
|
||||||
|
|
||||||
|
nCPa = aIVa.nMaxCP
|
||||||
|
For nI = 0 To UBound (aIVa.maEvolvedForms)
|
||||||
|
If nCPa < aIVa.maEvolvedForms (nI).nMaxCP Then
|
||||||
|
nCPa = aIVa.maEvolvedForms (nI).nMaxCP
|
||||||
|
End If
|
||||||
|
Next nI
|
||||||
|
nCPb = aIVb.nMaxCP
|
||||||
|
For nI = 0 To UBound (aIVb.maEvolvedForms)
|
||||||
|
If nCPb < aIVb.maEvolvedForms (nI).nMaxCP Then
|
||||||
|
nCPb = aIVb.maEvolvedForms (nI).nMaxCP
|
||||||
|
End If
|
||||||
|
Next nI
|
||||||
|
fnCompareIV = nCPb - nCPa
|
||||||
If fnCompareIV <> 0 Then
|
If fnCompareIV <> 0 Then
|
||||||
Exit Function
|
Exit Function
|
||||||
End If
|
End If
|
||||||
fnCompareIV = aIVb.nEvolvedCP - aIVa.nEvolvedCP
|
|
||||||
|
nCPa = 0
|
||||||
|
For nI = 0 To UBound (aIVa.maEvolvedForms)
|
||||||
|
If nCPa < aIVa.maEvolvedForms (nI).nCP Then
|
||||||
|
nCPa = aIVa.maEvolvedForms (nI).nCP
|
||||||
|
End If
|
||||||
|
Next nI
|
||||||
|
nCPb = 0
|
||||||
|
For nI = 0 To UBound (aIVb.maEvolvedForms)
|
||||||
|
If nCPb < aIVb.maEvolvedForms (nI).nCP Then
|
||||||
|
nCPb = aIVb.maEvolvedForms (nI).nCP
|
||||||
|
End If
|
||||||
|
Next nI
|
||||||
|
fnCompareIV = nCPb - nCPa
|
||||||
If fnCompareIV <> 0 Then
|
If fnCompareIV <> 0 Then
|
||||||
Exit Function
|
Exit Function
|
||||||
End If
|
End If
|
||||||
|
|
||||||
fnCompareIV = aIVb.nTotal - aIVa.nTotal
|
fnCompareIV = aIVb.nTotal - aIVa.nTotal
|
||||||
If fnCompareIV <> 0 Then
|
If fnCompareIV <> 0 Then
|
||||||
Exit Function
|
Exit Function
|
||||||
@ -938,6 +959,8 @@ End Function
|
|||||||
|
|
||||||
' subCopyIV: Copies one IV to another
|
' subCopyIV: Copies one IV to another
|
||||||
Function subCopyIV (aFrom As aStats, aTo As aStats) As Double
|
Function subCopyIV (aFrom As aStats, aTo As aStats) As Double
|
||||||
|
Dim nI As Integer, maEvolvedForms () As New aEvolveForm
|
||||||
|
|
||||||
With aTo
|
With aTo
|
||||||
.sNo = aFrom.sNo
|
.sNo = aFrom.sNo
|
||||||
.sPokemon = aFrom.sPokemon
|
.sPokemon = aFrom.sPokemon
|
||||||
@ -946,40 +969,123 @@ Function subCopyIV (aFrom As aStats, aTo As aStats) As Double
|
|||||||
.nDefense = aFrom.nDefense
|
.nDefense = aFrom.nDefense
|
||||||
.nStamina = aFrom.nStamina
|
.nStamina = aFrom.nStamina
|
||||||
.nTotal = aFrom.nTotal
|
.nTotal = aFrom.nTotal
|
||||||
.sEvolveInto = aFrom.sEvolveInto
|
|
||||||
.nEvolvedCP = aFrom.nEvolvedCP
|
|
||||||
.nMaxCP = aFrom.nMaxCP
|
.nMaxCP = aFrom.nMaxCP
|
||||||
End With
|
End With
|
||||||
|
aTo.maEvolvedForms = fnGetEvolvedFormArray (UBound (aFrom.maEvolvedForms))
|
||||||
|
For nI = 0 To UBound (aFrom.maEvolvedForms)
|
||||||
|
With aTo.maEvolvedForms (nI)
|
||||||
|
.sPokemon = aFrom.maEvolvedForms (nI).sPokemon
|
||||||
|
.nCP = aFrom.maEvolvedForms (nI).nCP
|
||||||
|
.nMaxCP = aFrom.maEvolvedForms (nI).nMaxCP
|
||||||
|
End With
|
||||||
|
Next nI
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
' subSaveIV: Saves the found IV
|
' subSaveIV: Saves the found IV
|
||||||
Sub subSaveIV (aQuery As aFindIVParam, maIVs () As aStats)
|
Sub subSaveIV (aQuery As aFindIVParam, maIVs () As aStats)
|
||||||
Dim oDoc As Object, oSheet As Object, oRange As Object
|
Dim oDoc As Object, oSheet As Object
|
||||||
Dim nI As Integer, oColumns As Object
|
Dim oRange As Object, oColumns As Object, oRows As Object
|
||||||
Dim mData (Ubound (maIVs) + 1) As Variant
|
Dim nI As Integer, nJ As Integer, nFrontCols As Integer
|
||||||
|
Dim mData (Ubound (maIVs) + 1) As Variant, mRow () As Variant
|
||||||
Dim mProps () As New com.sun.star.beans.PropertyValue
|
Dim mProps () As New com.sun.star.beans.PropertyValue
|
||||||
|
|
||||||
oDoc = StarDesktop.loadComponentFromURL ( _
|
oDoc = StarDesktop.loadComponentFromURL ( _
|
||||||
"private:factory/scalc", "_default", 0, mProps)
|
"private:factory/scalc", "_default", 0, mProps)
|
||||||
oSheet = oDoc.getSheets.getByIndex (0)
|
oSheet = oDoc.getSheets.getByIndex (0)
|
||||||
mData (0) = Array ( _
|
|
||||||
"No", "Pokemon", "CP", "HP", _
|
mRow = Array ( _
|
||||||
"Lv", "Atk", "Def", "Sta", "IV", _
|
"No", "Pokemon", "CP", "HP", "Star dust", _
|
||||||
"Evolve Into", "Evolved CP", "Max CP")
|
"Lv", "Atk", "Def", "Sta", "IV")
|
||||||
mData (1) = Array ( _
|
nFrontCols = UBound (mRow)
|
||||||
maIVs (0).sNo, aQuery.sPokemon, aQuery.nCP, aQuery.nHP, _
|
If aQuery.sPokemon = "Eevee" Then
|
||||||
maIVs (0).fLevel, maIVs (0).nAttack, maIVs (0).nDefense, _
|
If aQuery.nPlayerLevel <> 0 Then
|
||||||
maIVs (0).nStamina, maIVs (0).nTotal / 45, _
|
ReDim Preserve mRow (nFrontCols + 6) As Variant
|
||||||
maIVs (0).sEvolveInto, maIVs (0).nEvolvedCP, _
|
mRow (nFrontCols + 1) = "CP as " & maIVs (0).maEvolvedForms (0).sPokemon
|
||||||
maIVs (0).nMaxCP)
|
mRow (nFrontCols + 2) = "Powered-up as " & maIVs (0).maEvolvedForms (0).sPokemon
|
||||||
For nI = 1 To UBound (maIVs)
|
mRow (nFrontCols + 3) = "CP as " & maIVs (0).maEvolvedForms (1).sPokemon
|
||||||
mData (nI + 1) = Array ( _
|
mRow (nFrontCols + 4) = "Powered-up as " & maIVs (0).maEvolvedForms (1).sPokemon
|
||||||
"", "", "", "", _
|
mRow (nFrontCols + 5) = "CP as " & maIVs (0).maEvolvedForms (2).sPokemon
|
||||||
|
mRow (nFrontCols + 6) = "Powered-up as " & maIVs (0).maEvolvedForms (2).sPokemon
|
||||||
|
Else
|
||||||
|
ReDim Preserve mRow (nFrontCols + 3) As Variant
|
||||||
|
mRow (nFrontCols + 1) = "CP as " & maIVs (0).maEvolvedForms (0).sPokemon
|
||||||
|
mRow (nFrontCols + 2) = "CP as " & maIVs (0).maEvolvedForms (1).sPokemon
|
||||||
|
mRow (nFrontCols + 3) = "CP as " & maIVs (0).maEvolvedForms (2).sPokemon
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If UBound (maIVs (0).maEvolvedForms) = -1 Then
|
||||||
|
If aQuery.nPlayerLevel <> 0 Then
|
||||||
|
ReDim Preserve mRow (nFrontCols + 1) As Variant
|
||||||
|
mRow (nFrontCols + 1) = "Powered-up"
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If aQuery.nPlayerLevel <> 0 Then
|
||||||
|
ReDim Preserve mRow (nFrontCols + UBound (maIVs (0).maEvolvedForms) + 2) As Variant
|
||||||
|
For nJ = 0 To UBound (maIVs (0).maEvolvedForms)
|
||||||
|
mRow (nFrontCols + nJ + 1) = "CP as " & maIVs (0).maEvolvedForms (nJ).sPokemon
|
||||||
|
Next nJ
|
||||||
|
mRow (UBound (mRow)) = "Powered-up as " & maIVs (0).maEvolvedForms (UBound (maIVs (0).maEvolvedForms)).sPokemon
|
||||||
|
Else
|
||||||
|
ReDim Preserve mRow (nFrontCols + UBound (maIVs (0).maEvolvedForms) + 1) As Variant
|
||||||
|
For nJ = 0 To UBound (maIVs (0).maEvolvedForms)
|
||||||
|
mRow (nFrontCols + nJ + 1) = "CP as " & maIVs (0).maEvolvedForms (nJ).sPokemon
|
||||||
|
Next nJ
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
mData (0) = mRow
|
||||||
|
|
||||||
|
For nI = 0 To UBound (maIVs)
|
||||||
|
mRow = Array ( _
|
||||||
|
"", "", "", "", "", _
|
||||||
maIVs (nI).fLevel, maIVs (nI).nAttack, maIVs (nI).nDefense, _
|
maIVs (nI).fLevel, maIVs (nI).nAttack, maIVs (nI).nDefense, _
|
||||||
maIVs (nI).nStamina, maIVs (nI).nTotal / 45, _
|
maIVs (nI).nStamina, maIVs (nI).nTotal / 45)
|
||||||
maIVs (nI).sEvolveInto, maIVs (nI).nEvolvedCP, _
|
If aQuery.sPokemon = "Eevee" Then
|
||||||
maIVs (nI).nMaxCP)
|
If aQuery.nPlayerLevel <> 0 Then
|
||||||
|
ReDim Preserve mRow (nFrontCols + 6) As Variant
|
||||||
|
mRow (nFrontCols + 1) = maIVs (nI).maEvolvedForms (0).nCP
|
||||||
|
mRow (nFrontCols + 2) = maIVs (nI).maEvolvedForms (0).nMaxCP
|
||||||
|
mRow (nFrontCols + 3) = maIVs (nI).maEvolvedForms (1).nCP
|
||||||
|
mRow (nFrontCols + 4) = maIVs (nI).maEvolvedForms (1).nMaxCP
|
||||||
|
mRow (nFrontCols + 5) = maIVs (nI).maEvolvedForms (2).nCP
|
||||||
|
mRow (nFrontCols + 6) = maIVs (nI).maEvolvedForms (2).nMaxCP
|
||||||
|
Else
|
||||||
|
ReDim Preserve mRow (nFrontCols + 3) As Variant
|
||||||
|
mRow (nFrontCols + 1) = maIVs (nI).maEvolvedForms (0).nCP
|
||||||
|
mRow (nFrontCols + 2) = maIVs (nI).maEvolvedForms (1).nCP
|
||||||
|
mRow (nFrontCols + 3) = maIVs (nI).maEvolvedForms (2).nCP
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If UBound (maIVs (nI).maEvolvedForms) = -1 Then
|
||||||
|
If aQuery.nPlayerLevel <> 0 Then
|
||||||
|
ReDim Preserve mRow (nFrontCols + 1) As Variant
|
||||||
|
mRow (nFrontCols + 1) = maIVs (nI).nMaxCP
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If aQuery.nPlayerLevel <> 0 Then
|
||||||
|
ReDim Preserve mRow (nFrontCols + UBound (maIVs (nI).maEvolvedForms) + 2) As Variant
|
||||||
|
For nJ = 0 To UBound (maIVs (nI).maEvolvedForms)
|
||||||
|
mRow (nFrontCols + nJ + 1) = maIVs (nI).maEvolvedForms (nJ).nCP
|
||||||
|
Next nJ
|
||||||
|
mRow (UBound (mRow)) = maIVs (nI).maEvolvedForms (UBound (maIVs (nI).maEvolvedForms)).nMaxCP
|
||||||
|
Else
|
||||||
|
ReDim Preserve mRow (nFrontCols + UBound (maIVs (nI).maEvolvedForms) + 1) As Variant
|
||||||
|
For nJ = 0 To UBound (maIVs (nI).maEvolvedForms)
|
||||||
|
mRow (nFrontCols + nJ + 1) = maIVs (nI).maEvolvedForms (nJ).nCP
|
||||||
|
Next nJ
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
mData (nI + 1) = mRow
|
||||||
Next nI
|
Next nI
|
||||||
|
|
||||||
|
' Fills the query information at the first row
|
||||||
|
mData (1) (0) = maIVs (0).sNo
|
||||||
|
mData (1) (1) = aQuery.sPokemon
|
||||||
|
mData (1) (2) = aQuery.nCP
|
||||||
|
mData (1) (3) = aQuery.nHP
|
||||||
|
mData (1) (4) = aQuery.nStarDust
|
||||||
|
|
||||||
oRange = oSheet.getCellRangeByPosition ( _
|
oRange = oSheet.getCellRangeByPosition ( _
|
||||||
0, 0, UBound (mData (0)), UBound (mData))
|
0, 0, UBound (mData (0)), UBound (mData))
|
||||||
oRange.setDataArray (mData)
|
oRange.setDataArray (mData)
|
||||||
@ -999,14 +1105,64 @@ Sub subSaveIV (aQuery As aFindIVParam, maIVs () As aStats)
|
|||||||
3, 1, 3, UBound (mData))
|
3, 1, 3, UBound (mData))
|
||||||
oRange.merge (True)
|
oRange.merge (True)
|
||||||
oRange = oSheet.getCellRangeByPosition ( _
|
oRange = oSheet.getCellRangeByPosition ( _
|
||||||
8, 1, 8, UBound (mData))
|
4, 1, 4, UBound (mData))
|
||||||
|
oRange.merge (True)
|
||||||
|
oRange = oSheet.getCellRangeByPosition ( _
|
||||||
|
9, 1, 9, UBound (mData))
|
||||||
oRange.setPropertyValue ("NumberFormat", 10)
|
oRange.setPropertyValue ("NumberFormat", 10)
|
||||||
|
|
||||||
|
If aQuery.sPokemon = "Eevee" Then
|
||||||
|
oRange = oSheet.getCellRangeByPosition ( _
|
||||||
|
10, 0, 15, 0)
|
||||||
|
Else
|
||||||
|
If UBound (maIVs (0).maEvolvedForms) = -1 Then
|
||||||
|
oRange = oSheet.getCellRangeByPosition ( _
|
||||||
|
10, 0, 10, 0)
|
||||||
|
Else
|
||||||
|
oRange = oSheet.getCellRangeByPosition ( _
|
||||||
|
10, 0, 10 + UBound (maIVs (0).maEvolvedForms) + 2, 0)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
oRange.setPropertyValue ("IsTextWrapped", True)
|
||||||
|
|
||||||
|
oRows = oSheet.getRows
|
||||||
|
oRows.getByIndex (0).setPropertyValue ("Height", 840)
|
||||||
oColumns = oSheet.getColumns
|
oColumns = oSheet.getColumns
|
||||||
For nI = 0 To UBound (mData (0))
|
oColumns.getByIndex (0).setPropertyValue ("Width", 890)
|
||||||
oColumns.getByIndex (nI).setPropertyValue ( _
|
oColumns.getByIndex (1).setPropertyValue ("Width", 2310)
|
||||||
"OptimalWidth", True)
|
oColumns.getByIndex (2).setPropertyValue ("Width", 890)
|
||||||
Next nI
|
oColumns.getByIndex (3).setPropertyValue ("Width", 890)
|
||||||
|
oColumns.getByIndex (4).setPropertyValue ("Width", 1780)
|
||||||
|
oColumns.getByIndex (5).setPropertyValue ("Width", 860)
|
||||||
|
oColumns.getByIndex (6).setPropertyValue ("Width", 860)
|
||||||
|
oColumns.getByIndex (7).setPropertyValue ("Width", 860)
|
||||||
|
oColumns.getByIndex (8).setPropertyValue ("Width", 860)
|
||||||
|
oColumns.getByIndex (9).setPropertyValue ("Width", 1030)
|
||||||
|
If aQuery.sPokemon = "Eevee" Then
|
||||||
|
If aQuery.nPlayerLevel <> 0 Then
|
||||||
|
For nI = 0 To 5 Step 2
|
||||||
|
oColumns.getByIndex (10 + nI).setPropertyValue ("Width", 2310)
|
||||||
|
oColumns.getByIndex (10 + nI + 1).setPropertyValue ("Width", 2810)
|
||||||
|
Next nI
|
||||||
|
Else
|
||||||
|
For nI = 0 To 2
|
||||||
|
oColumns.getByIndex (10 + nI).setPropertyValue ("Width", 2310)
|
||||||
|
Next nI
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If UBound (maIVs (0).maEvolvedForms) = -1 Then
|
||||||
|
If aQuery.nPlayerLevel <> 0 Then
|
||||||
|
oColumns.getByIndex (10).setPropertyValue ("Width", 2200)
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
For nI = 0 To UBound (maIVs (0).maEvolvedForms)
|
||||||
|
oColumns.getByIndex (10 + nI).setPropertyValue ("Width", 2310)
|
||||||
|
Next nI
|
||||||
|
If aQuery.nPlayerLevel <> 0 Then
|
||||||
|
oColumns.getByIndex (10 + UBound (maIVs (0).maEvolvedForms) + 1).setPropertyValue ("Width", 2810)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' fnFilterAppraisals: Filters the IV by the appraisals.
|
' fnFilterAppraisals: Filters the IV by the appraisals.
|
||||||
@ -1122,7 +1278,7 @@ End Function
|
|||||||
|
|
||||||
' subReadBaseStats: Reads the base stats table.
|
' subReadBaseStats: Reads the base stats table.
|
||||||
Sub subReadBaseStats
|
Sub subReadBaseStats
|
||||||
Dim mData As Variant, nI As Integer
|
Dim mData As Variant, nI As Integer, nJ As Integer
|
||||||
|
|
||||||
If UBound (maBaseStats) = -1 Then
|
If UBound (maBaseStats) = -1 Then
|
||||||
mData = fnGetBaseStatsData
|
mData = fnGetBaseStatsData
|
||||||
@ -1134,12 +1290,42 @@ Sub subReadBaseStats
|
|||||||
.nStamina = mData (nI) (2)
|
.nStamina = mData (nI) (2)
|
||||||
.nAttack = mData (nI) (3)
|
.nAttack = mData (nI) (3)
|
||||||
.nDefense = mData (nI) (4)
|
.nDefense = mData (nI) (4)
|
||||||
.sEvolveInto = mData (nI) (5)
|
|
||||||
End With
|
End With
|
||||||
|
maBaseStats (nI).maEvolvedForms = fnGetEvolvedFormArray (UBound (mData (nI) (5)))
|
||||||
|
For nJ = 0 To UBound (maBaseStats (nI).maEvolvedForms)
|
||||||
|
With maBaseStats (nI).maEvolvedForms (nJ)
|
||||||
|
.sPokemon = mData (nI) (5) (nJ)
|
||||||
|
.nCP = -1
|
||||||
|
.nMaxCP = -1
|
||||||
|
End With
|
||||||
|
Next nJ
|
||||||
Next nI
|
Next nI
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
' fnGetEvolvedFormArray: Obtains a blank aEvolveForm array
|
||||||
|
Function fnGetEvolvedFormArray (nUBound As Integer) As Variant
|
||||||
|
If nUBound = -1 Then
|
||||||
|
fnGetEvolvedFormArray = fnGetEmptyEvolvedFormArray
|
||||||
|
Else
|
||||||
|
fnGetEvolvedFormArray = fnGetNumberedEvolvedFormArray (nUBound)
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
|
||||||
|
' fnGetNumberedEvolvedFormArray: Obtains a numbered aEvolveForm array
|
||||||
|
Function fnGetNumberedEvolvedFormArray (nUBound As Integer) As Variant
|
||||||
|
Dim mData (nUBound) As New aEvolveForm
|
||||||
|
|
||||||
|
fnGetNumberedEvolvedFormArray = mData
|
||||||
|
End Function
|
||||||
|
|
||||||
|
' fnGetEmptyEvolvedFormArray: Obtains an empty aEvolveForm array
|
||||||
|
Function fnGetEmptyEvolvedFormArray () As Variant
|
||||||
|
Dim mData () As New aEvolveForm
|
||||||
|
|
||||||
|
fnGetEmptyEvolvedFormArray = mData
|
||||||
|
End Function
|
||||||
|
|
||||||
' subReadCPM: Reads the CPM table.
|
' subReadCPM: Reads the CPM table.
|
||||||
Sub subReadCPM
|
Sub subReadCPM
|
||||||
If UBound (mCPM) = -1 Then
|
If UBound (mCPM) = -1 Then
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
' 1Data: The Pokémon GO data for IV calculation
|
' 1Data: The Pokémon GO data for IV calculation
|
||||||
' by imacat <imacat@mail.imacat.idv.tw>, 2016-11-28
|
' by imacat <imacat@mail.imacat.idv.tw>, 2016-12-06
|
||||||
' Generated with 9Load.subReadDataSheets ()
|
' Generated with 9Load.subReadDataSheets ()
|
||||||
|
|
||||||
Option Explicit
|
Option Explicit
|
||||||
@ -7,157 +7,157 @@ Option Explicit
|
|||||||
' fnGetBaseStatsData: Returns the base stats data.
|
' fnGetBaseStatsData: Returns the base stats data.
|
||||||
Function fnGetBaseStatsData As Variant
|
Function fnGetBaseStatsData As Variant
|
||||||
fnGetBaseStatsData = Array( _
|
fnGetBaseStatsData = Array( _
|
||||||
Array ("Bulbasaur", "001", 90, 118, 118, "Venusaur"), _
|
Array ("Bulbasaur", "001", 90, 118, 118, Array ("Ivysaur", "Venusaur")), _
|
||||||
Array ("Ivysaur", "002", 120, 151, 151, "Venusaur"), _
|
Array ("Ivysaur", "002", 120, 151, 151, Array ("Venusaur")), _
|
||||||
Array ("Venusaur", "003", 160, 198, 198, "Venusaur"), _
|
Array ("Venusaur", "003", 160, 198, 198, Array ()), _
|
||||||
Array ("Charmander", "004", 78, 116, 96, "Charizard"), _
|
Array ("Charmander", "004", 78, 116, 96, Array ("Charmeleon", "Charizard")), _
|
||||||
Array ("Charmeleon", "005", 116, 158, 129, "Charizard"), _
|
Array ("Charmeleon", "005", 116, 158, 129, Array ("Charizard")), _
|
||||||
Array ("Charizard", "006", 156, 223, 176, "Charizard"), _
|
Array ("Charizard", "006", 156, 223, 176, Array ()), _
|
||||||
Array ("Squirtle", "007", 88, 94, 122, "Blastoise"), _
|
Array ("Squirtle", "007", 88, 94, 122, Array ("Wartortle", "Blastoise")), _
|
||||||
Array ("Wartortle", "008", 118, 126, 155, "Blastoise"), _
|
Array ("Wartortle", "008", 118, 126, 155, Array ("Blastoise")), _
|
||||||
Array ("Blastoise", "009", 158, 171, 210, "Blastoise"), _
|
Array ("Blastoise", "009", 158, 171, 210, Array ()), _
|
||||||
Array ("Caterpie", "010", 90, 55, 62, "Butterfree"), _
|
Array ("Caterpie", "010", 90, 55, 62, Array ("Metapod", "Butterfree")), _
|
||||||
Array ("Metapod", "011", 100, 45, 64, "Butterfree"), _
|
Array ("Metapod", "011", 100, 45, 64, Array ("Butterfree")), _
|
||||||
Array ("Butterfree", "012", 120, 167, 151, "Butterfree"), _
|
Array ("Butterfree", "012", 120, 167, 151, Array ()), _
|
||||||
Array ("Weedle", "013", 80, 63, 55, "Beedrill"), _
|
Array ("Weedle", "013", 80, 63, 55, Array ("Kakuna", "Beedrill")), _
|
||||||
Array ("Kakuna", "014", 90, 46, 86, "Beedrill"), _
|
Array ("Kakuna", "014", 90, 46, 86, Array ("Beedrill")), _
|
||||||
Array ("Beedrill", "015", 130, 169, 150, "Beedrill"), _
|
Array ("Beedrill", "015", 130, 169, 150, Array ()), _
|
||||||
Array ("Pidgey", "016", 80, 85, 76, "Pidgeot"), _
|
Array ("Pidgey", "016", 80, 85, 76, Array ("Pidgeotto", "Pidgeot")), _
|
||||||
Array ("Pidgeotto", "017", 126, 117, 108, "Pidgeot"), _
|
Array ("Pidgeotto", "017", 126, 117, 108, Array ("Pidgeot")), _
|
||||||
Array ("Pidgeot", "018", 166, 166, 157, "Pidgeot"), _
|
Array ("Pidgeot", "018", 166, 166, 157, Array ()), _
|
||||||
Array ("Rattata", "019", 60, 103, 70, "Raticate"), _
|
Array ("Rattata", "019", 60, 103, 70, Array ("Raticate")), _
|
||||||
Array ("Raticate", "020", 110, 161, 144, "Raticate"), _
|
Array ("Raticate", "020", 110, 161, 144, Array ()), _
|
||||||
Array ("Spearow", "021", 80, 112, 61, "Fearow"), _
|
Array ("Spearow", "021", 80, 112, 61, Array ("Fearow")), _
|
||||||
Array ("Fearow", "022", 130, 182, 135, "Fearow"), _
|
Array ("Fearow", "022", 130, 182, 135, Array ()), _
|
||||||
Array ("Ekans", "023", 70, 110, 102, "Arbok"), _
|
Array ("Ekans", "023", 70, 110, 102, Array ("Arbok")), _
|
||||||
Array ("Arbok", "024", 120, 167, 158, "Arbok"), _
|
Array ("Arbok", "024", 120, 167, 158, Array ()), _
|
||||||
Array ("Pikachu", "025", 70, 112, 101, "Raichu"), _
|
Array ("Pikachu", "025", 70, 112, 101, Array ("Raichu")), _
|
||||||
Array ("Raichu", "026", 120, 193, 165, "Raichu"), _
|
Array ("Raichu", "026", 120, 193, 165, Array ()), _
|
||||||
Array ("Sandshrew", "027", 100, 126, 145, "Sandslash"), _
|
Array ("Sandshrew", "027", 100, 126, 145, Array ("Sandslash")), _
|
||||||
Array ("Sandslash", "028", 150, 182, 202, "Sandslash"), _
|
Array ("Sandslash", "028", 150, 182, 202, Array ()), _
|
||||||
Array ("Nidoran♀", "029", 110, 86, 94, "Nidoqueen"), _
|
Array ("Nidoran♀", "029", 110, 86, 94, Array ("Nidorina", "Nidoqueen")), _
|
||||||
Array ("Nidorina", "030", 140, 117, 126, "Nidoqueen"), _
|
Array ("Nidorina", "030", 140, 117, 126, Array ("Nidoqueen")), _
|
||||||
Array ("Nidoqueen", "031", 180, 180, 174, "Nidoqueen"), _
|
Array ("Nidoqueen", "031", 180, 180, 174, Array ()), _
|
||||||
Array ("Nidoran♂", "032", 92, 105, 76, "Nidoking"), _
|
Array ("Nidoran♂", "032", 92, 105, 76, Array ("Nidorino", "Nidoking")), _
|
||||||
Array ("Nidorino", "033", 122, 137, 112, "Nidoking"), _
|
Array ("Nidorino", "033", 122, 137, 112, Array ("Nidoking")), _
|
||||||
Array ("Nidoking", "034", 162, 204, 157, "Nidoking"), _
|
Array ("Nidoking", "034", 162, 204, 157, Array ()), _
|
||||||
Array ("Clefairy", "035", 140, 107, 116, "Clefable"), _
|
Array ("Clefairy", "035", 140, 107, 116, Array ("Clefable")), _
|
||||||
Array ("Clefable", "036", 190, 178, 171, "Clefable"), _
|
Array ("Clefable", "036", 190, 178, 171, Array ()), _
|
||||||
Array ("Vulpix", "037", 76, 96, 122, "Ninetales"), _
|
Array ("Vulpix", "037", 76, 96, 122, Array ("Ninetales")), _
|
||||||
Array ("Ninetales", "038", 146, 169, 204, "Ninetales"), _
|
Array ("Ninetales", "038", 146, 169, 204, Array ()), _
|
||||||
Array ("Jigglypuff", "039", 230, 80, 44, "Wigglytuff"), _
|
Array ("Jigglypuff", "039", 230, 80, 44, Array ("Wigglytuff")), _
|
||||||
Array ("Wigglytuff", "040", 280, 156, 93, "Wigglytuff"), _
|
Array ("Wigglytuff", "040", 280, 156, 93, Array ()), _
|
||||||
Array ("Zubat", "041", 80, 83, 76, "Golbat"), _
|
Array ("Zubat", "041", 80, 83, 76, Array ("Golbat")), _
|
||||||
Array ("Golbat", "042", 150, 161, 153, "Golbat"), _
|
Array ("Golbat", "042", 150, 161, 153, Array ()), _
|
||||||
Array ("Oddish", "043", 90, 131, 116, "Vileplume"), _
|
Array ("Oddish", "043", 90, 131, 116, Array ("Gloom", "Vileplume")), _
|
||||||
Array ("Gloom", "044", 120, 153, 139, "Vileplume"), _
|
Array ("Gloom", "044", 120, 153, 139, Array ("Vileplume")), _
|
||||||
Array ("Vileplume", "045", 150, 202, 170, "Vileplume"), _
|
Array ("Vileplume", "045", 150, 202, 170, Array ()), _
|
||||||
Array ("Paras", "046", 70, 121, 99, "Parasect"), _
|
Array ("Paras", "046", 70, 121, 99, Array ("Parasect")), _
|
||||||
Array ("Parasect", "047", 120, 165, 146, "Parasect"), _
|
Array ("Parasect", "047", 120, 165, 146, Array ()), _
|
||||||
Array ("Venonat", "048", 120, 100, 102, "Venomoth"), _
|
Array ("Venonat", "048", 120, 100, 102, Array ("Venomoth")), _
|
||||||
Array ("Venomoth", "049", 140, 179, 150, "Venomoth"), _
|
Array ("Venomoth", "049", 140, 179, 150, Array ()), _
|
||||||
Array ("Diglett", "050", 20, 109, 88, "Dugtrio"), _
|
Array ("Diglett", "050", 20, 109, 88, Array ("Dugtrio")), _
|
||||||
Array ("Dugtrio", "051", 70, 167, 147, "Dugtrio"), _
|
Array ("Dugtrio", "051", 70, 167, 147, Array ()), _
|
||||||
Array ("Meowth", "052", 80, 92, 81, "Persian"), _
|
Array ("Meowth", "052", 80, 92, 81, Array ("Persian")), _
|
||||||
Array ("Persian", "053", 130, 150, 139, "Persian"), _
|
Array ("Persian", "053", 130, 150, 139, Array ()), _
|
||||||
Array ("Psyduck", "054", 100, 122, 96, "Golduck"), _
|
Array ("Psyduck", "054", 100, 122, 96, Array ("Golduck")), _
|
||||||
Array ("Golduck", "055", 160, 191, 163, "Golduck"), _
|
Array ("Golduck", "055", 160, 191, 163, Array ()), _
|
||||||
Array ("Mankey", "056", 80, 148, 87, "Primeape"), _
|
Array ("Mankey", "056", 80, 148, 87, Array ("Primeape")), _
|
||||||
Array ("Primeape", "057", 130, 207, 144, "Primeape"), _
|
Array ("Primeape", "057", 130, 207, 144, Array ()), _
|
||||||
Array ("Growlithe", "058", 110, 136, 96, "Arcanine"), _
|
Array ("Growlithe", "058", 110, 136, 96, Array ("Arcanine")), _
|
||||||
Array ("Arcanine", "059", 180, 227, 166, "Arcanine"), _
|
Array ("Arcanine", "059", 180, 227, 166, Array ()), _
|
||||||
Array ("Poliwag", "060", 80, 101, 82, "Poliwrath"), _
|
Array ("Poliwag", "060", 80, 101, 82, Array ("Poliwhirl", "Poliwrath")), _
|
||||||
Array ("Poliwhirl", "061", 130, 130, 130, "Poliwrath"), _
|
Array ("Poliwhirl", "061", 130, 130, 130, Array ("Poliwrath")), _
|
||||||
Array ("Poliwrath", "062", 180, 182, 187, "Poliwrath"), _
|
Array ("Poliwrath", "062", 180, 182, 187, Array ()), _
|
||||||
Array ("Abra", "063", 50, 195, 103, "Alakazam"), _
|
Array ("Abra", "063", 50, 195, 103, Array ("Kadabra", "Alakazam")), _
|
||||||
Array ("Kadabra", "064", 80, 232, 138, "Alakazam"), _
|
Array ("Kadabra", "064", 80, 232, 138, Array ("Alakazam")), _
|
||||||
Array ("Alakazam", "065", 110, 271, 194, "Alakazam"), _
|
Array ("Alakazam", "065", 110, 271, 194, Array ()), _
|
||||||
Array ("Machop", "066", 140, 137, 88, "Machamp"), _
|
Array ("Machop", "066", 140, 137, 88, Array ("Machoke", "Machamp")), _
|
||||||
Array ("Machoke", "067", 160, 177, 130, "Machamp"), _
|
Array ("Machoke", "067", 160, 177, 130, Array ("Machamp")), _
|
||||||
Array ("Machamp", "068", 180, 234, 162, "Machamp"), _
|
Array ("Machamp", "068", 180, 234, 162, Array ()), _
|
||||||
Array ("Bellsprout", "069", 100, 139, 64, "Victreebel"), _
|
Array ("Bellsprout", "069", 100, 139, 64, Array ("Weepinbell", "Victreebel")), _
|
||||||
Array ("Weepinbell", "070", 130, 172, 95, "Victreebel"), _
|
Array ("Weepinbell", "070", 130, 172, 95, Array ("Victreebel")), _
|
||||||
Array ("Victreebel", "071", 160, 207, 138, "Victreebel"), _
|
Array ("Victreebel", "071", 160, 207, 138, Array ()), _
|
||||||
Array ("Tentacool", "072", 80, 97, 182, "Tentacruel"), _
|
Array ("Tentacool", "072", 80, 97, 182, Array ("Tentacruel")), _
|
||||||
Array ("Tentacruel", "073", 160, 166, 237, "Tentacruel"), _
|
Array ("Tentacruel", "073", 160, 166, 237, Array ()), _
|
||||||
Array ("Geodude", "074", 80, 132, 163, "Golem"), _
|
Array ("Geodude", "074", 80, 132, 163, Array ("Graveler", "Golem")), _
|
||||||
Array ("Graveler", "075", 110, 164, 196, "Golem"), _
|
Array ("Graveler", "075", 110, 164, 196, Array ("Golem")), _
|
||||||
Array ("Golem", "076", 160, 211, 229, "Golem"), _
|
Array ("Golem", "076", 160, 211, 229, Array ()), _
|
||||||
Array ("Ponyta", "077", 100, 170, 132, "Rapidash"), _
|
Array ("Ponyta", "077", 100, 170, 132, Array ("Rapidash")), _
|
||||||
Array ("Rapidash", "078", 130, 207, 167, "Rapidash"), _
|
Array ("Rapidash", "078", 130, 207, 167, Array ()), _
|
||||||
Array ("Slowpoke", "079", 180, 109, 109, "Slowbro"), _
|
Array ("Slowpoke", "079", 180, 109, 109, Array ("Slowbro")), _
|
||||||
Array ("Slowbro", "080", 190, 177, 194, "Slowbro"), _
|
Array ("Slowbro", "080", 190, 177, 194, Array ()), _
|
||||||
Array ("Magnemite", "081", 50, 165, 128, "Magneton"), _
|
Array ("Magnemite", "081", 50, 165, 128, Array ("Magneton")), _
|
||||||
Array ("Magneton", "082", 100, 223, 182, "Magneton"), _
|
Array ("Magneton", "082", 100, 223, 182, Array ()), _
|
||||||
Array ("Farfetch'd", "083", 104, 124, 118, "Farfetch'd"), _
|
Array ("Farfetch'd", "083", 104, 124, 118, Array ()), _
|
||||||
Array ("Doduo", "084", 70, 158, 88, "Dodrio"), _
|
Array ("Doduo", "084", 70, 158, 88, Array ("Dodrio")), _
|
||||||
Array ("Dodrio", "085", 120, 218, 145, "Dodrio"), _
|
Array ("Dodrio", "085", 120, 218, 145, Array ()), _
|
||||||
Array ("Seel", "086", 130, 85, 128, "Dewgong"), _
|
Array ("Seel", "086", 130, 85, 128, Array ("Dewgong")), _
|
||||||
Array ("Dewgong", "087", 180, 139, 184, "Dewgong"), _
|
Array ("Dewgong", "087", 180, 139, 184, Array ()), _
|
||||||
Array ("Grimer", "088", 160, 135, 90, "Muk"), _
|
Array ("Grimer", "088", 160, 135, 90, Array ("Muk")), _
|
||||||
Array ("Muk", "089", 210, 190, 184, "Muk"), _
|
Array ("Muk", "089", 210, 190, 184, Array ()), _
|
||||||
Array ("Shellder", "090", 60, 116, 168, "Cloyster"), _
|
Array ("Shellder", "090", 60, 116, 168, Array ("Cloyster")), _
|
||||||
Array ("Cloyster", "091", 100, 186, 323, "Cloyster"), _
|
Array ("Cloyster", "091", 100, 186, 323, Array ()), _
|
||||||
Array ("Gastly", "092", 60, 186, 70, "Gengar"), _
|
Array ("Gastly", "092", 60, 186, 70, Array ("Haunter", "Gengar")), _
|
||||||
Array ("Haunter", "093", 90, 223, 112, "Gengar"), _
|
Array ("Haunter", "093", 90, 223, 112, Array ("Gengar")), _
|
||||||
Array ("Gengar", "094", 120, 261, 156, "Gengar"), _
|
Array ("Gengar", "094", 120, 261, 156, Array ()), _
|
||||||
Array ("Onix", "095", 70, 85, 288, "Onix"), _
|
Array ("Onix", "095", 70, 85, 288, Array ()), _
|
||||||
Array ("Drowzee", "096", 120, 89, 158, "Hypno"), _
|
Array ("Drowzee", "096", 120, 89, 158, Array ("Hypno")), _
|
||||||
Array ("Hypno", "097", 170, 144, 215, "Hypno"), _
|
Array ("Hypno", "097", 170, 144, 215, Array ()), _
|
||||||
Array ("Krabby", "098", 60, 181, 156, "Kingler"), _
|
Array ("Krabby", "098", 60, 181, 156, Array ("Kingler")), _
|
||||||
Array ("Kingler", "099", 110, 240, 214, "Kingler"), _
|
Array ("Kingler", "099", 110, 240, 214, Array ()), _
|
||||||
Array ("Voltorb", "100", 80, 109, 114, "Electrode"), _
|
Array ("Voltorb", "100", 80, 109, 114, Array ("Electrode")), _
|
||||||
Array ("Electrode", "101", 120, 173, 179, "Electrode"), _
|
Array ("Electrode", "101", 120, 173, 179, Array ()), _
|
||||||
Array ("Exeggcute", "102", 120, 107, 140, "Exeggutor"), _
|
Array ("Exeggcute", "102", 120, 107, 140, Array ("Exeggutor")), _
|
||||||
Array ("Exeggutor", "103", 190, 233, 158, "Exeggutor"), _
|
Array ("Exeggutor", "103", 190, 233, 158, Array ()), _
|
||||||
Array ("Cubone", "104", 100, 90, 165, "Marowak"), _
|
Array ("Cubone", "104", 100, 90, 165, Array ("Marowak")), _
|
||||||
Array ("Marowak", "105", 120, 144, 200, "Marowak"), _
|
Array ("Marowak", "105", 120, 144, 200, Array ()), _
|
||||||
Array ("Hitmonlee", "106", 100, 224, 211, "Hitmonlee"), _
|
Array ("Hitmonlee", "106", 100, 224, 211, Array ()), _
|
||||||
Array ("Hitmonchan", "107", 100, 193, 212, "Hitmonchan"), _
|
Array ("Hitmonchan", "107", 100, 193, 212, Array ()), _
|
||||||
Array ("Lickitung", "108", 180, 108, 137, "Lickitung"), _
|
Array ("Lickitung", "108", 180, 108, 137, Array ()), _
|
||||||
Array ("Koffing", "109", 80, 119, 164, "Weezing"), _
|
Array ("Koffing", "109", 80, 119, 164, Array ("Weezing")), _
|
||||||
Array ("Weezing", "110", 130, 174, 221, "Weezing"), _
|
Array ("Weezing", "110", 130, 174, 221, Array ()), _
|
||||||
Array ("Rhyhorn", "111", 160, 140, 157, "Rhydon"), _
|
Array ("Rhyhorn", "111", 160, 140, 157, Array ("Rhydon")), _
|
||||||
Array ("Rhydon", "112", 210, 222, 206, "Rhydon"), _
|
Array ("Rhydon", "112", 210, 222, 206, Array ()), _
|
||||||
Array ("Chansey", "113", 500, 60, 176, "Chansey"), _
|
Array ("Chansey", "113", 500, 60, 176, Array ()), _
|
||||||
Array ("Tangela", "114", 130, 183, 205, "Tangela"), _
|
Array ("Tangela", "114", 130, 183, 205, Array ()), _
|
||||||
Array ("Kangaskhan", "115", 210, 181, 165, "Kangaskhan"), _
|
Array ("Kangaskhan", "115", 210, 181, 165, Array ()), _
|
||||||
Array ("Horsea", "116", 60, 129, 125, "Seadra"), _
|
Array ("Horsea", "116", 60, 129, 125, Array ("Seadra")), _
|
||||||
Array ("Seadra", "117", 110, 187, 182, "Seadra"), _
|
Array ("Seadra", "117", 110, 187, 182, Array ()), _
|
||||||
Array ("Goldeen", "118", 90, 123, 115, "Seaking"), _
|
Array ("Goldeen", "118", 90, 123, 115, Array ("Seaking")), _
|
||||||
Array ("Seaking", "119", 160, 175, 154, "Seaking"), _
|
Array ("Seaking", "119", 160, 175, 154, Array ()), _
|
||||||
Array ("Staryu", "120", 60, 137, 112, "Starmie"), _
|
Array ("Staryu", "120", 60, 137, 112, Array ("Starmie")), _
|
||||||
Array ("Starmie", "121", 120, 210, 184, "Starmie"), _
|
Array ("Starmie", "121", 120, 210, 184, Array ()), _
|
||||||
Array ("Mr. Mime", "122", 80, 192, 233, "Mr. Mime"), _
|
Array ("Mr. Mime", "122", 80, 192, 233, Array ()), _
|
||||||
Array ("Scyther", "123", 140, 218, 170, "Scyther"), _
|
Array ("Scyther", "123", 140, 218, 170, Array ()), _
|
||||||
Array ("Jynx", "124", 130, 223, 182, "Jynx"), _
|
Array ("Jynx", "124", 130, 223, 182, Array ()), _
|
||||||
Array ("Electabuzz", "125", 130, 198, 173, "Electabuzz"), _
|
Array ("Electabuzz", "125", 130, 198, 173, Array ()), _
|
||||||
Array ("Magmar", "126", 130, 206, 169, "Magmar"), _
|
Array ("Magmar", "126", 130, 206, 169, Array ()), _
|
||||||
Array ("Pinsir", "127", 130, 238, 197, "Pinsir"), _
|
Array ("Pinsir", "127", 130, 238, 197, Array ()), _
|
||||||
Array ("Tauros", "128", 150, 198, 197, "Tauros"), _
|
Array ("Tauros", "128", 150, 198, 197, Array ()), _
|
||||||
Array ("Magikarp", "129", 40, 29, 102, "Gyarados"), _
|
Array ("Magikarp", "129", 40, 29, 102, Array ("Gyarados")), _
|
||||||
Array ("Gyarados", "130", 190, 237, 197, "Gyarados"), _
|
Array ("Gyarados", "130", 190, 237, 197, Array ()), _
|
||||||
Array ("Lapras", "131", 260, 186, 190, "Lapras"), _
|
Array ("Lapras", "131", 260, 186, 190, Array ()), _
|
||||||
Array ("Ditto", "132", 96, 91, 91, "Ditto"), _
|
Array ("Ditto", "132", 96, 91, 91, Array ()), _
|
||||||
Array ("Eevee", "133", 110, 104, 121, "Vaporeon"), _
|
Array ("Eevee", "133", 110, 104, 121, Array ("Vaporeon", "Jolteon", "Flareon")), _
|
||||||
Array ("Vaporeon", "134", 260, 205, 177, "Vaporeon"), _
|
Array ("Vaporeon", "134", 260, 205, 177, Array ()), _
|
||||||
Array ("Jolteon", "135", 130, 232, 201, "Jolteon"), _
|
Array ("Jolteon", "135", 130, 232, 201, Array ()), _
|
||||||
Array ("Flareon", "136", 130, 246, 204, "Flareon"), _
|
Array ("Flareon", "136", 130, 246, 204, Array ()), _
|
||||||
Array ("Porygon", "137", 130, 153, 139, "Porygon"), _
|
Array ("Porygon", "137", 130, 153, 139, Array ()), _
|
||||||
Array ("Omanyte", "138", 70, 155, 174, "Omastar"), _
|
Array ("Omanyte", "138", 70, 155, 174, Array ("Omastar")), _
|
||||||
Array ("Omastar", "139", 140, 207, 227, "Omastar"), _
|
Array ("Omastar", "139", 140, 207, 227, Array ()), _
|
||||||
Array ("Kabuto", "140", 60, 148, 162, "Kabutops"), _
|
Array ("Kabuto", "140", 60, 148, 162, Array ("Kabutops")), _
|
||||||
Array ("Kabutops", "141", 120, 220, 203, "Kabutops"), _
|
Array ("Kabutops", "141", 120, 220, 203, Array ()), _
|
||||||
Array ("Aerodactyl", "142", 160, 221, 164, "Aerodactyl"), _
|
Array ("Aerodactyl", "142", 160, 221, 164, Array ()), _
|
||||||
Array ("Snorlax", "143", 320, 190, 190, "Snorlax"), _
|
Array ("Snorlax", "143", 320, 190, 190, Array ()), _
|
||||||
Array ("Articuno", "144", 180, 192, 249, "Articuno"), _
|
Array ("Articuno", "144", 180, 192, 249, Array ()), _
|
||||||
Array ("Zapdos", "145", 180, 253, 188, "Zapdos"), _
|
Array ("Zapdos", "145", 180, 253, 188, Array ()), _
|
||||||
Array ("Moltres", "146", 180, 251, 184, "Moltres"), _
|
Array ("Moltres", "146", 180, 251, 184, Array ()), _
|
||||||
Array ("Dratini", "147", 82, 119, 94, "Dragonite"), _
|
Array ("Dratini", "147", 82, 119, 94, Array ("Dragonair", "Dragonite")), _
|
||||||
Array ("Dragonair", "148", 122, 163, 138, "Dragonite"), _
|
Array ("Dragonair", "148", 122, 163, 138, Array ("Dragonite")), _
|
||||||
Array ("Dragonite", "149", 182, 263, 201, "Dragonite"), _
|
Array ("Dragonite", "149", 182, 263, 201, Array ()), _
|
||||||
Array ("Mewtwo", "150", 212, 330, 200, "Mewtwo"), _
|
Array ("Mewtwo", "150", 212, 330, 200, Array ()), _
|
||||||
Array ("Mew", "151", 200, 210, 209, "Mew"))
|
Array ("Mew", "151", 200, 210, 209, Array ()))
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
' fnGetCPMData: Returns the combat power multiplier data.
|
' fnGetCPMData: Returns the combat power multiplier data.
|
||||||
|
@ -69,7 +69,8 @@ End Sub
|
|||||||
Function fnReadBaseStatsSheet As String
|
Function fnReadBaseStatsSheet As String
|
||||||
Dim oSheet As Object, oRange As Object, mData As Variant
|
Dim oSheet As Object, oRange As Object, mData As Variant
|
||||||
Dim nI As Integer, sOutput As String
|
Dim nI As Integer, sOutput As String
|
||||||
Dim nJ As Integer, sEvolveInto As String
|
Dim nJ As Integer, nStart As Integer, nEnd As Integer
|
||||||
|
Dim sEvolveForms As String
|
||||||
|
|
||||||
oSheet = ThisComponent.getSheets.getByName ("basestat")
|
oSheet = ThisComponent.getSheets.getByName ("basestat")
|
||||||
oRange = oSheet.getCellRangeByName ("BaseStats")
|
oRange = oSheet.getCellRangeByName ("BaseStats")
|
||||||
@ -80,38 +81,70 @@ Function fnReadBaseStatsSheet As String
|
|||||||
& "Function fnGetBaseStatsData As Variant" & Chr (10) _
|
& "Function fnGetBaseStatsData As Variant" & Chr (10) _
|
||||||
& Chr (9) & "fnGetBaseStatsData = Array( _" & Chr (10)
|
& Chr (9) & "fnGetBaseStatsData = Array( _" & Chr (10)
|
||||||
For nI = 1 To UBound (mData) - 1
|
For nI = 1 To UBound (mData) - 1
|
||||||
For nJ = 8 To 6 Step -1
|
sEvolveForms = fnFindEvolveForms (mData (nI))
|
||||||
If mData (nI) (nJ) <> "" Then
|
|
||||||
sEvolveInto = mData (nI) (nJ)
|
|
||||||
nJ = 5
|
|
||||||
End If
|
|
||||||
Next nJ
|
|
||||||
sOutput = sOutput _
|
sOutput = sOutput _
|
||||||
& Chr (9) & Chr (9) & "Array (""" & mData (nI) (0) _
|
& Chr (9) & Chr (9) & "Array (""" & mData (nI) (0) _
|
||||||
& """, """ & mData (nI) (1) _
|
& """, """ & mData (nI) (1) _
|
||||||
& """, " & mData (nI) (3) _
|
& """, " & mData (nI) (3) _
|
||||||
& ", " & mData (nI) (4) _
|
& ", " & mData (nI) (4) _
|
||||||
& ", " & mData (nI) (5) _
|
& ", " & mData (nI) (5) _
|
||||||
& ", """ & sEvolveInto & """), _" & Chr (10)
|
& ", " & sEvolveForms & "), _" & Chr (10)
|
||||||
Next nI
|
Next nI
|
||||||
nI = UBound (mData)
|
nI = UBound (mData)
|
||||||
For nJ = 8 To 6 Step -1
|
sEvolveForms = fnFindEvolveForms (mData (nI))
|
||||||
If mData (nI) (nJ) <> "" Then
|
|
||||||
sEvolveInto = mData (nI) (nJ)
|
|
||||||
nJ = 5
|
|
||||||
End If
|
|
||||||
Next nJ
|
|
||||||
sOutput = sOutput _
|
sOutput = sOutput _
|
||||||
& Chr (9) & Chr (9) & "Array (""" & mData (nI) (0) _
|
& Chr (9) & Chr (9) & "Array (""" & mData (nI) (0) _
|
||||||
& """, """ & mData (nI) (1) _
|
& """, """ & mData (nI) (1) _
|
||||||
& """, " & mData (nI) (3) _
|
& """, " & mData (nI) (3) _
|
||||||
& ", " & mData (nI) (4) _
|
& ", " & mData (nI) (4) _
|
||||||
& ", " & mData (nI) (5) _
|
& ", " & mData (nI) (5) _
|
||||||
& ", """ & sEvolveInto & """))" & Chr (10) _
|
& ", " & sEvolveForms & "))" & Chr (10) _
|
||||||
& "End Function"
|
& "End Function"
|
||||||
fnReadBaseStatsSheet = sOutput
|
fnReadBaseStatsSheet = sOutput
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Function fnFindEvolveForms (mData () As Variant) As String
|
||||||
|
Dim nJ As Integer, nStart As Integer, nEnd As Integer
|
||||||
|
Dim sEvolveForms As String
|
||||||
|
|
||||||
|
If mData (0) = "Eevee" Then
|
||||||
|
sEvolveForms = "Array (""Vaporeon"", ""Jolteon"", ""Flareon"")"
|
||||||
|
Else
|
||||||
|
For nJ = 6 To 8
|
||||||
|
If mData (nJ) = mData (0) Then
|
||||||
|
nStart = nJ + 1
|
||||||
|
nJ = 9
|
||||||
|
End If
|
||||||
|
Next nJ
|
||||||
|
If nStart = 9 Then
|
||||||
|
nEnd = 8
|
||||||
|
Else
|
||||||
|
For nJ = nStart To 8
|
||||||
|
If mData (nJ) = "" Then
|
||||||
|
nEnd = nJ - 1
|
||||||
|
nJ = 9
|
||||||
|
Else
|
||||||
|
If nJ = 8 Then
|
||||||
|
nEnd = 8
|
||||||
|
nJ = 9
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next nJ
|
||||||
|
End If
|
||||||
|
If nEnd = nStart - 1 Then
|
||||||
|
sEvolveForms = "Array ()"
|
||||||
|
Else
|
||||||
|
sEvolveForms = """" & mData (nStart) & """"
|
||||||
|
For nJ = nStart + 1 To nEnd
|
||||||
|
sEvolveForms = sEvolveForms _
|
||||||
|
& ", """ & mData (nJ) & """"
|
||||||
|
Next nJ
|
||||||
|
sEvolveForms = "Array (" & sEvolveForms & ")"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
fnFindEvolveForms = sEvolveForms
|
||||||
|
End Function
|
||||||
|
|
||||||
' fnReadCPMSheet: Reads the combat power multiplier sheet.
|
' fnReadCPMSheet: Reads the combat power multiplier sheet.
|
||||||
Function fnReadCPMSheet As String
|
Function fnReadCPMSheet As String
|
||||||
Dim oSheet As Object, oRange As Object, mData As Variant
|
Dim oSheet As Object, oRange As Object, mData As Variant
|
||||||
|
3
TODO
3
TODO
@ -1,6 +1,5 @@
|
|||||||
PokemonGoIV TODO
|
PokemonGoIV TODO
|
||||||
|
|
||||||
* Show images of teams, team leaders and Pokémons.
|
|
||||||
* Error messages.
|
* Error messages.
|
||||||
|
* Show images of teams, team leaders and Pokémons.
|
||||||
* Center the dialog.
|
* Center the dialog.
|
||||||
* Multiple evolved forms.
|
|
||||||
|
@ -14,9 +14,8 @@ Type aStats
|
|||||||
nAttack As Integer
|
nAttack As Integer
|
||||||
nDefense As Integer
|
nDefense As Integer
|
||||||
nTotal As Integer
|
nTotal As Integer
|
||||||
sEvolveInto As String
|
|
||||||
nEvolvedCP As Integer
|
|
||||||
nMaxCP As Integer
|
nMaxCP As Integer
|
||||||
|
maEvolvedForms () As aEvolveForm
|
||||||
End Type
|
End Type
|
||||||
|
|
||||||
' The amount of star dust to power-up.
|
' The amount of star dust to power-up.
|
||||||
@ -39,13 +38,19 @@ Type aFindIVParam
|
|||||||
bIsCancelled As Boolean
|
bIsCancelled As Boolean
|
||||||
End Type
|
End Type
|
||||||
|
|
||||||
|
Type aEvolveForm
|
||||||
|
sPokemon As String
|
||||||
|
nCP As Integer
|
||||||
|
nMaxCP As Integer
|
||||||
|
End Type
|
||||||
|
|
||||||
Private maBaseStats () As New aStats
|
Private maBaseStats () As New aStats
|
||||||
Private mCPM () As Double, mStarDust () As Integer
|
Private mCPM () As Double, mStarDust () As Integer
|
||||||
|
|
||||||
' subMain: The main program
|
' subMain: The main program
|
||||||
Sub subMain
|
Sub subMain
|
||||||
BasicLibraries.loadLibrary "XrayTool"
|
BasicLibraries.loadLibrary "XrayTool"
|
||||||
Dim maIVs As Variant, nI As Integer, sOutput As String
|
Dim maIVs As Variant, nI As Integer
|
||||||
Dim aQuery As New aFindIVParam, aBaseStats As New aStats
|
Dim aQuery As New aFindIVParam, aBaseStats As New aStats
|
||||||
|
|
||||||
aQuery = fnAskParam
|
aQuery = fnAskParam
|
||||||
@ -53,25 +58,7 @@ Sub subMain
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
maIVs = fnFindIV (aQuery)
|
maIVs = fnFindIV (aQuery)
|
||||||
sOutput = ""
|
If UBound (maIVs) = -1 Then
|
||||||
For nI = 0 To UBound (maIVs)
|
|
||||||
sOutput = sOutput _
|
|
||||||
& " Lv=" & maIVs (nI).fLevel _
|
|
||||||
& " Atk=" & maIVs (nI).nAttack _
|
|
||||||
& " Def=" & maIVs (nI).nDefense _
|
|
||||||
& " Sta=" & maIVs (nI).nStamina _
|
|
||||||
& " IV=" & fnFloor (maIVs (nI).nTotal * 100 / 45) & "%"
|
|
||||||
If aQuery.sPokemon <> maIVs (nI).sEvolveInto Then
|
|
||||||
aBaseStats = fnGetBaseStats (maIVs (nI).sEvolveInto)
|
|
||||||
sOutput = sOutput & " Ev=" & maIVs (nI).sEvolveInto _
|
|
||||||
& " " & maIVs (nI).nEvolvedCP
|
|
||||||
End If
|
|
||||||
If aQuery.nPlayerLevel <> 0 Then
|
|
||||||
sOutput = sOutput & " XCP=" & maIVs (nI).nMaxCP
|
|
||||||
End If
|
|
||||||
sOutput = sOutput & Chr (10)
|
|
||||||
Next nI
|
|
||||||
If sOutput = "" Then
|
|
||||||
MsgBox "Found no matching IV."
|
MsgBox "Found no matching IV."
|
||||||
Else
|
Else
|
||||||
subSaveIV (aQuery, maIVs)
|
subSaveIV (aQuery, maIVs)
|
||||||
@ -843,6 +830,7 @@ Function fnFindIV (aQuery As aFindIVParam) As Variant
|
|||||||
Dim nI As Integer, nJ As Integer
|
Dim nI As Integer, nJ As Integer
|
||||||
Dim fStep As Double, nCount As Integer
|
Dim fStep As Double, nCount As Integer
|
||||||
Dim aEvBaseStats As new aStats, aTempIV As New aStats
|
Dim aEvBaseStats As new aStats, aTempIV As New aStats
|
||||||
|
Dim maEvolvedForms () As New aEvolveForm
|
||||||
|
|
||||||
If aQuery.sPokemon = "" Then
|
If aQuery.sPokemon = "" Then
|
||||||
fnFindIV = maIV
|
fnFindIV = maIV
|
||||||
@ -854,14 +842,10 @@ Function fnFindIV (aQuery As aFindIVParam) As Variant
|
|||||||
fStep = 0.5
|
fStep = 0.5
|
||||||
End If
|
End If
|
||||||
aBaseStats = fnGetBaseStats (aQuery.sPokemon)
|
aBaseStats = fnGetBaseStats (aQuery.sPokemon)
|
||||||
aEvBaseStats = fnGetBaseStats (aBaseStats.sEvolveInto)
|
|
||||||
subReadStarDust
|
subReadStarDust
|
||||||
nCount = -1
|
nCount = -1
|
||||||
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
|
||||||
'For nI = 0 To UBound (maStarDust) Step nStep
|
|
||||||
' fLevel = maStarDust (nI).fLevel
|
|
||||||
' If maStarDust (nI).nStarDust = aQuery.nStarDust Then
|
|
||||||
For nStamina = 0 To 15
|
For nStamina = 0 To 15
|
||||||
If fnCalcHP (aBaseStats, fLevel, nStamina) = aQuery.nHP Then
|
If fnCalcHP (aBaseStats, fLevel, nStamina) = aQuery.nHP Then
|
||||||
For nAttack = 0 To 15
|
For nAttack = 0 To 15
|
||||||
@ -878,14 +862,23 @@ Function fnFindIV (aQuery As aFindIVParam) As Variant
|
|||||||
.nDefense = nDefense
|
.nDefense = nDefense
|
||||||
.nStamina = nStamina
|
.nStamina = nStamina
|
||||||
.nTotal = nAttack + nDefense + nStamina
|
.nTotal = nAttack + nDefense + nStamina
|
||||||
.sEvolveInto = aBaseStats.sEvolveInto
|
|
||||||
.nEvolvedCP = fnCalcCP (aEvBaseStats, fLevel, nAttack, nDefense, nStamina)
|
|
||||||
End With
|
End With
|
||||||
If aQuery.nPlayerLevel <> 0 Then
|
If aQuery.nPlayerLevel <> 0 Then
|
||||||
maIV (nCount).nMaxCP = fnCalcCP (aEvBaseStats, aQuery.nPlayerLevel + 1.5, nAttack, nDefense, nStamina)
|
maIV (nCount).nMaxCP = fnCalcCP (aBaseStats, aQuery.nPlayerLevel + 1.5, nAttack, nDefense, nStamina)
|
||||||
Else
|
Else
|
||||||
maIV (nCount).nMaxCP = -1
|
maIV (nCount).nMaxCP = -1
|
||||||
End If
|
End If
|
||||||
|
maIV (nCount).maEvolvedForms = fnGetEvolvedFormArray (UBound (aBaseStats.maEvolvedForms))
|
||||||
|
For nI = 0 To UBound (aBaseStats.maEvolvedForms)
|
||||||
|
maIV (nCount).maEvolvedForms (nI).sPokemon = aBaseStats.maEvolvedForms (nI).sPokemon
|
||||||
|
aEvBaseStats = fnGetBaseStats (aBaseStats.maEvolvedForms (nI).sPokemon)
|
||||||
|
maIV (nCount).maEvolvedForms (nI).nCP = fnCalcCP (aEvBaseStats, fLevel, nAttack, nDefense, nStamina)
|
||||||
|
If aQuery.nPlayerLevel <> 0 Then
|
||||||
|
maIV (nCount).maEvolvedForms (nI).nMaxCP = fnCalcCP (aEvBaseStats, aQuery.nPlayerLevel + 1.5, nAttack, nDefense, nStamina)
|
||||||
|
Else
|
||||||
|
maIV (nCount).maEvolvedForms (nI).nMaxCP = -1
|
||||||
|
End If
|
||||||
|
Next nI
|
||||||
End If
|
End If
|
||||||
Next nDefense
|
Next nDefense
|
||||||
Next nAttack
|
Next nAttack
|
||||||
@ -908,14 +901,42 @@ End Function
|
|||||||
|
|
||||||
' fnCompareIV: Compare two IVs for sorting
|
' fnCompareIV: Compare two IVs for sorting
|
||||||
Function fnCompareIV (aIVa As aStats, aIVb As aStats) As Double
|
Function fnCompareIV (aIVa As aStats, aIVb As aStats) As Double
|
||||||
fnCompareIV = aIVb.nMaxCP - aIVa.nMaxCP
|
Dim nCPa As Integer, nCPb As Integer, nI As Integer
|
||||||
|
|
||||||
|
nCPa = aIVa.nMaxCP
|
||||||
|
For nI = 0 To UBound (aIVa.maEvolvedForms)
|
||||||
|
If nCPa < aIVa.maEvolvedForms (nI).nMaxCP Then
|
||||||
|
nCPa = aIVa.maEvolvedForms (nI).nMaxCP
|
||||||
|
End If
|
||||||
|
Next nI
|
||||||
|
nCPb = aIVb.nMaxCP
|
||||||
|
For nI = 0 To UBound (aIVb.maEvolvedForms)
|
||||||
|
If nCPb < aIVb.maEvolvedForms (nI).nMaxCP Then
|
||||||
|
nCPb = aIVb.maEvolvedForms (nI).nMaxCP
|
||||||
|
End If
|
||||||
|
Next nI
|
||||||
|
fnCompareIV = nCPb - nCPa
|
||||||
If fnCompareIV <> 0 Then
|
If fnCompareIV <> 0 Then
|
||||||
Exit Function
|
Exit Function
|
||||||
End If
|
End If
|
||||||
fnCompareIV = aIVb.nEvolvedCP - aIVa.nEvolvedCP
|
|
||||||
|
nCPa = 0
|
||||||
|
For nI = 0 To UBound (aIVa.maEvolvedForms)
|
||||||
|
If nCPa < aIVa.maEvolvedForms (nI).nCP Then
|
||||||
|
nCPa = aIVa.maEvolvedForms (nI).nCP
|
||||||
|
End If
|
||||||
|
Next nI
|
||||||
|
nCPb = 0
|
||||||
|
For nI = 0 To UBound (aIVb.maEvolvedForms)
|
||||||
|
If nCPb < aIVb.maEvolvedForms (nI).nCP Then
|
||||||
|
nCPb = aIVb.maEvolvedForms (nI).nCP
|
||||||
|
End If
|
||||||
|
Next nI
|
||||||
|
fnCompareIV = nCPb - nCPa
|
||||||
If fnCompareIV <> 0 Then
|
If fnCompareIV <> 0 Then
|
||||||
Exit Function
|
Exit Function
|
||||||
End If
|
End If
|
||||||
|
|
||||||
fnCompareIV = aIVb.nTotal - aIVa.nTotal
|
fnCompareIV = aIVb.nTotal - aIVa.nTotal
|
||||||
If fnCompareIV <> 0 Then
|
If fnCompareIV <> 0 Then
|
||||||
Exit Function
|
Exit Function
|
||||||
@ -940,6 +961,8 @@ End Function
|
|||||||
|
|
||||||
' subCopyIV: Copies one IV to another
|
' subCopyIV: Copies one IV to another
|
||||||
Function subCopyIV (aFrom As aStats, aTo As aStats) As Double
|
Function subCopyIV (aFrom As aStats, aTo As aStats) As Double
|
||||||
|
Dim nI As Integer, maEvolvedForms () As New aEvolveForm
|
||||||
|
|
||||||
With aTo
|
With aTo
|
||||||
.sNo = aFrom.sNo
|
.sNo = aFrom.sNo
|
||||||
.sPokemon = aFrom.sPokemon
|
.sPokemon = aFrom.sPokemon
|
||||||
@ -948,40 +971,123 @@ Function subCopyIV (aFrom As aStats, aTo As aStats) As Double
|
|||||||
.nDefense = aFrom.nDefense
|
.nDefense = aFrom.nDefense
|
||||||
.nStamina = aFrom.nStamina
|
.nStamina = aFrom.nStamina
|
||||||
.nTotal = aFrom.nTotal
|
.nTotal = aFrom.nTotal
|
||||||
.sEvolveInto = aFrom.sEvolveInto
|
|
||||||
.nEvolvedCP = aFrom.nEvolvedCP
|
|
||||||
.nMaxCP = aFrom.nMaxCP
|
.nMaxCP = aFrom.nMaxCP
|
||||||
End With
|
End With
|
||||||
|
aTo.maEvolvedForms = fnGetEvolvedFormArray (UBound (aFrom.maEvolvedForms))
|
||||||
|
For nI = 0 To UBound (aFrom.maEvolvedForms)
|
||||||
|
With aTo.maEvolvedForms (nI)
|
||||||
|
.sPokemon = aFrom.maEvolvedForms (nI).sPokemon
|
||||||
|
.nCP = aFrom.maEvolvedForms (nI).nCP
|
||||||
|
.nMaxCP = aFrom.maEvolvedForms (nI).nMaxCP
|
||||||
|
End With
|
||||||
|
Next nI
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
' subSaveIV: Saves the found IV
|
' subSaveIV: Saves the found IV
|
||||||
Sub subSaveIV (aQuery As aFindIVParam, maIVs () As aStats)
|
Sub subSaveIV (aQuery As aFindIVParam, maIVs () As aStats)
|
||||||
Dim oDoc As Object, oSheet As Object, oRange As Object
|
Dim oDoc As Object, oSheet As Object
|
||||||
Dim nI As Integer, oColumns As Object
|
Dim oRange As Object, oColumns As Object, oRows As Object
|
||||||
Dim mData (Ubound (maIVs) + 1) As Variant
|
Dim nI As Integer, nJ As Integer, nFrontCols As Integer
|
||||||
|
Dim mData (Ubound (maIVs) + 1) As Variant, mRow () As Variant
|
||||||
Dim mProps () As New com.sun.star.beans.PropertyValue
|
Dim mProps () As New com.sun.star.beans.PropertyValue
|
||||||
|
|
||||||
oDoc = StarDesktop.loadComponentFromURL ( _
|
oDoc = StarDesktop.loadComponentFromURL ( _
|
||||||
"private:factory/scalc", "_default", 0, mProps)
|
"private:factory/scalc", "_default", 0, mProps)
|
||||||
oSheet = oDoc.getSheets.getByIndex (0)
|
oSheet = oDoc.getSheets.getByIndex (0)
|
||||||
mData (0) = Array ( _
|
|
||||||
"No", "Pokemon", "CP", "HP", _
|
mRow = Array ( _
|
||||||
"Lv", "Atk", "Def", "Sta", "IV", _
|
"No", "Pokemon", "CP", "HP", "Star dust", _
|
||||||
"Evolve Into", "Evolved CP", "Max CP")
|
"Lv", "Atk", "Def", "Sta", "IV")
|
||||||
mData (1) = Array ( _
|
nFrontCols = UBound (mRow)
|
||||||
maIVs (0).sNo, aQuery.sPokemon, aQuery.nCP, aQuery.nHP, _
|
If aQuery.sPokemon = "Eevee" Then
|
||||||
maIVs (0).fLevel, maIVs (0).nAttack, maIVs (0).nDefense, _
|
If aQuery.nPlayerLevel <> 0 Then
|
||||||
maIVs (0).nStamina, maIVs (0).nTotal / 45, _
|
ReDim Preserve mRow (nFrontCols + 6) As Variant
|
||||||
maIVs (0).sEvolveInto, maIVs (0).nEvolvedCP, _
|
mRow (nFrontCols + 1) = "CP as " & maIVs (0).maEvolvedForms (0).sPokemon
|
||||||
maIVs (0).nMaxCP)
|
mRow (nFrontCols + 2) = "Powered-up as " & maIVs (0).maEvolvedForms (0).sPokemon
|
||||||
For nI = 1 To UBound (maIVs)
|
mRow (nFrontCols + 3) = "CP as " & maIVs (0).maEvolvedForms (1).sPokemon
|
||||||
mData (nI + 1) = Array ( _
|
mRow (nFrontCols + 4) = "Powered-up as " & maIVs (0).maEvolvedForms (1).sPokemon
|
||||||
"", "", "", "", _
|
mRow (nFrontCols + 5) = "CP as " & maIVs (0).maEvolvedForms (2).sPokemon
|
||||||
|
mRow (nFrontCols + 6) = "Powered-up as " & maIVs (0).maEvolvedForms (2).sPokemon
|
||||||
|
Else
|
||||||
|
ReDim Preserve mRow (nFrontCols + 3) As Variant
|
||||||
|
mRow (nFrontCols + 1) = "CP as " & maIVs (0).maEvolvedForms (0).sPokemon
|
||||||
|
mRow (nFrontCols + 2) = "CP as " & maIVs (0).maEvolvedForms (1).sPokemon
|
||||||
|
mRow (nFrontCols + 3) = "CP as " & maIVs (0).maEvolvedForms (2).sPokemon
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If UBound (maIVs (0).maEvolvedForms) = -1 Then
|
||||||
|
If aQuery.nPlayerLevel <> 0 Then
|
||||||
|
ReDim Preserve mRow (nFrontCols + 1) As Variant
|
||||||
|
mRow (nFrontCols + 1) = "Powered-up"
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If aQuery.nPlayerLevel <> 0 Then
|
||||||
|
ReDim Preserve mRow (nFrontCols + UBound (maIVs (0).maEvolvedForms) + 2) As Variant
|
||||||
|
For nJ = 0 To UBound (maIVs (0).maEvolvedForms)
|
||||||
|
mRow (nFrontCols + nJ + 1) = "CP as " & maIVs (0).maEvolvedForms (nJ).sPokemon
|
||||||
|
Next nJ
|
||||||
|
mRow (UBound (mRow)) = "Powered-up as " & maIVs (0).maEvolvedForms (UBound (maIVs (0).maEvolvedForms)).sPokemon
|
||||||
|
Else
|
||||||
|
ReDim Preserve mRow (nFrontCols + UBound (maIVs (0).maEvolvedForms) + 1) As Variant
|
||||||
|
For nJ = 0 To UBound (maIVs (0).maEvolvedForms)
|
||||||
|
mRow (nFrontCols + nJ + 1) = "CP as " & maIVs (0).maEvolvedForms (nJ).sPokemon
|
||||||
|
Next nJ
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
mData (0) = mRow
|
||||||
|
|
||||||
|
For nI = 0 To UBound (maIVs)
|
||||||
|
mRow = Array ( _
|
||||||
|
"", "", "", "", "", _
|
||||||
maIVs (nI).fLevel, maIVs (nI).nAttack, maIVs (nI).nDefense, _
|
maIVs (nI).fLevel, maIVs (nI).nAttack, maIVs (nI).nDefense, _
|
||||||
maIVs (nI).nStamina, maIVs (nI).nTotal / 45, _
|
maIVs (nI).nStamina, maIVs (nI).nTotal / 45)
|
||||||
maIVs (nI).sEvolveInto, maIVs (nI).nEvolvedCP, _
|
If aQuery.sPokemon = "Eevee" Then
|
||||||
maIVs (nI).nMaxCP)
|
If aQuery.nPlayerLevel <> 0 Then
|
||||||
|
ReDim Preserve mRow (nFrontCols + 6) As Variant
|
||||||
|
mRow (nFrontCols + 1) = maIVs (nI).maEvolvedForms (0).nCP
|
||||||
|
mRow (nFrontCols + 2) = maIVs (nI).maEvolvedForms (0).nMaxCP
|
||||||
|
mRow (nFrontCols + 3) = maIVs (nI).maEvolvedForms (1).nCP
|
||||||
|
mRow (nFrontCols + 4) = maIVs (nI).maEvolvedForms (1).nMaxCP
|
||||||
|
mRow (nFrontCols + 5) = maIVs (nI).maEvolvedForms (2).nCP
|
||||||
|
mRow (nFrontCols + 6) = maIVs (nI).maEvolvedForms (2).nMaxCP
|
||||||
|
Else
|
||||||
|
ReDim Preserve mRow (nFrontCols + 3) As Variant
|
||||||
|
mRow (nFrontCols + 1) = maIVs (nI).maEvolvedForms (0).nCP
|
||||||
|
mRow (nFrontCols + 2) = maIVs (nI).maEvolvedForms (1).nCP
|
||||||
|
mRow (nFrontCols + 3) = maIVs (nI).maEvolvedForms (2).nCP
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If UBound (maIVs (nI).maEvolvedForms) = -1 Then
|
||||||
|
If aQuery.nPlayerLevel <> 0 Then
|
||||||
|
ReDim Preserve mRow (nFrontCols + 1) As Variant
|
||||||
|
mRow (nFrontCols + 1) = maIVs (nI).nMaxCP
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If aQuery.nPlayerLevel <> 0 Then
|
||||||
|
ReDim Preserve mRow (nFrontCols + UBound (maIVs (nI).maEvolvedForms) + 2) As Variant
|
||||||
|
For nJ = 0 To UBound (maIVs (nI).maEvolvedForms)
|
||||||
|
mRow (nFrontCols + nJ + 1) = maIVs (nI).maEvolvedForms (nJ).nCP
|
||||||
|
Next nJ
|
||||||
|
mRow (UBound (mRow)) = maIVs (nI).maEvolvedForms (UBound (maIVs (nI).maEvolvedForms)).nMaxCP
|
||||||
|
Else
|
||||||
|
ReDim Preserve mRow (nFrontCols + UBound (maIVs (nI).maEvolvedForms) + 1) As Variant
|
||||||
|
For nJ = 0 To UBound (maIVs (nI).maEvolvedForms)
|
||||||
|
mRow (nFrontCols + nJ + 1) = maIVs (nI).maEvolvedForms (nJ).nCP
|
||||||
|
Next nJ
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
mData (nI + 1) = mRow
|
||||||
Next nI
|
Next nI
|
||||||
|
|
||||||
|
' Fills the query information at the first row
|
||||||
|
mData (1) (0) = maIVs (0).sNo
|
||||||
|
mData (1) (1) = aQuery.sPokemon
|
||||||
|
mData (1) (2) = aQuery.nCP
|
||||||
|
mData (1) (3) = aQuery.nHP
|
||||||
|
mData (1) (4) = aQuery.nStarDust
|
||||||
|
|
||||||
oRange = oSheet.getCellRangeByPosition ( _
|
oRange = oSheet.getCellRangeByPosition ( _
|
||||||
0, 0, UBound (mData (0)), UBound (mData))
|
0, 0, UBound (mData (0)), UBound (mData))
|
||||||
oRange.setDataArray (mData)
|
oRange.setDataArray (mData)
|
||||||
@ -1001,14 +1107,64 @@ Sub subSaveIV (aQuery As aFindIVParam, maIVs () As aStats)
|
|||||||
3, 1, 3, UBound (mData))
|
3, 1, 3, UBound (mData))
|
||||||
oRange.merge (True)
|
oRange.merge (True)
|
||||||
oRange = oSheet.getCellRangeByPosition ( _
|
oRange = oSheet.getCellRangeByPosition ( _
|
||||||
8, 1, 8, UBound (mData))
|
4, 1, 4, UBound (mData))
|
||||||
|
oRange.merge (True)
|
||||||
|
oRange = oSheet.getCellRangeByPosition ( _
|
||||||
|
9, 1, 9, UBound (mData))
|
||||||
oRange.setPropertyValue ("NumberFormat", 10)
|
oRange.setPropertyValue ("NumberFormat", 10)
|
||||||
|
|
||||||
|
If aQuery.sPokemon = "Eevee" Then
|
||||||
|
oRange = oSheet.getCellRangeByPosition ( _
|
||||||
|
10, 0, 15, 0)
|
||||||
|
Else
|
||||||
|
If UBound (maIVs (0).maEvolvedForms) = -1 Then
|
||||||
|
oRange = oSheet.getCellRangeByPosition ( _
|
||||||
|
10, 0, 10, 0)
|
||||||
|
Else
|
||||||
|
oRange = oSheet.getCellRangeByPosition ( _
|
||||||
|
10, 0, 10 + UBound (maIVs (0).maEvolvedForms) + 2, 0)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
oRange.setPropertyValue ("IsTextWrapped", True)
|
||||||
|
|
||||||
|
oRows = oSheet.getRows
|
||||||
|
oRows.getByIndex (0).setPropertyValue ("Height", 840)
|
||||||
oColumns = oSheet.getColumns
|
oColumns = oSheet.getColumns
|
||||||
For nI = 0 To UBound (mData (0))
|
oColumns.getByIndex (0).setPropertyValue ("Width", 890)
|
||||||
oColumns.getByIndex (nI).setPropertyValue ( _
|
oColumns.getByIndex (1).setPropertyValue ("Width", 2310)
|
||||||
"OptimalWidth", True)
|
oColumns.getByIndex (2).setPropertyValue ("Width", 890)
|
||||||
Next nI
|
oColumns.getByIndex (3).setPropertyValue ("Width", 890)
|
||||||
|
oColumns.getByIndex (4).setPropertyValue ("Width", 1780)
|
||||||
|
oColumns.getByIndex (5).setPropertyValue ("Width", 860)
|
||||||
|
oColumns.getByIndex (6).setPropertyValue ("Width", 860)
|
||||||
|
oColumns.getByIndex (7).setPropertyValue ("Width", 860)
|
||||||
|
oColumns.getByIndex (8).setPropertyValue ("Width", 860)
|
||||||
|
oColumns.getByIndex (9).setPropertyValue ("Width", 1030)
|
||||||
|
If aQuery.sPokemon = "Eevee" Then
|
||||||
|
If aQuery.nPlayerLevel <> 0 Then
|
||||||
|
For nI = 0 To 5 Step 2
|
||||||
|
oColumns.getByIndex (10 + nI).setPropertyValue ("Width", 2310)
|
||||||
|
oColumns.getByIndex (10 + nI + 1).setPropertyValue ("Width", 2810)
|
||||||
|
Next nI
|
||||||
|
Else
|
||||||
|
For nI = 0 To 2
|
||||||
|
oColumns.getByIndex (10 + nI).setPropertyValue ("Width", 2310)
|
||||||
|
Next nI
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If UBound (maIVs (0).maEvolvedForms) = -1 Then
|
||||||
|
If aQuery.nPlayerLevel <> 0 Then
|
||||||
|
oColumns.getByIndex (10).setPropertyValue ("Width", 2200)
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
For nI = 0 To UBound (maIVs (0).maEvolvedForms)
|
||||||
|
oColumns.getByIndex (10 + nI).setPropertyValue ("Width", 2310)
|
||||||
|
Next nI
|
||||||
|
If aQuery.nPlayerLevel <> 0 Then
|
||||||
|
oColumns.getByIndex (10 + UBound (maIVs (0).maEvolvedForms) + 1).setPropertyValue ("Width", 2810)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' fnFilterAppraisals: Filters the IV by the appraisals.
|
' fnFilterAppraisals: Filters the IV by the appraisals.
|
||||||
@ -1124,7 +1280,7 @@ End Function
|
|||||||
|
|
||||||
' subReadBaseStats: Reads the base stats table.
|
' subReadBaseStats: Reads the base stats table.
|
||||||
Sub subReadBaseStats
|
Sub subReadBaseStats
|
||||||
Dim mData As Variant, nI As Integer
|
Dim mData As Variant, nI As Integer, nJ As Integer
|
||||||
|
|
||||||
If UBound (maBaseStats) = -1 Then
|
If UBound (maBaseStats) = -1 Then
|
||||||
mData = fnGetBaseStatsData
|
mData = fnGetBaseStatsData
|
||||||
@ -1136,12 +1292,42 @@ Sub subReadBaseStats
|
|||||||
.nStamina = mData (nI) (2)
|
.nStamina = mData (nI) (2)
|
||||||
.nAttack = mData (nI) (3)
|
.nAttack = mData (nI) (3)
|
||||||
.nDefense = mData (nI) (4)
|
.nDefense = mData (nI) (4)
|
||||||
.sEvolveInto = mData (nI) (5)
|
|
||||||
End With
|
End With
|
||||||
|
maBaseStats (nI).maEvolvedForms = fnGetEvolvedFormArray (UBound (mData (nI) (5)))
|
||||||
|
For nJ = 0 To UBound (maBaseStats (nI).maEvolvedForms)
|
||||||
|
With maBaseStats (nI).maEvolvedForms (nJ)
|
||||||
|
.sPokemon = mData (nI) (5) (nJ)
|
||||||
|
.nCP = -1
|
||||||
|
.nMaxCP = -1
|
||||||
|
End With
|
||||||
|
Next nJ
|
||||||
Next nI
|
Next nI
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
' fnGetEvolvedFormArray: Obtains a blank aEvolveForm array
|
||||||
|
Function fnGetEvolvedFormArray (nUBound As Integer) As Variant
|
||||||
|
If nUBound = -1 Then
|
||||||
|
fnGetEvolvedFormArray = fnGetEmptyEvolvedFormArray
|
||||||
|
Else
|
||||||
|
fnGetEvolvedFormArray = fnGetNumberedEvolvedFormArray (nUBound)
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
|
||||||
|
' fnGetNumberedEvolvedFormArray: Obtains a numbered aEvolveForm array
|
||||||
|
Function fnGetNumberedEvolvedFormArray (nUBound As Integer) As Variant
|
||||||
|
Dim mData (nUBound) As New aEvolveForm
|
||||||
|
|
||||||
|
fnGetNumberedEvolvedFormArray = mData
|
||||||
|
End Function
|
||||||
|
|
||||||
|
' fnGetEmptyEvolvedFormArray: Obtains an empty aEvolveForm array
|
||||||
|
Function fnGetEmptyEvolvedFormArray () As Variant
|
||||||
|
Dim mData () As New aEvolveForm
|
||||||
|
|
||||||
|
fnGetEmptyEvolvedFormArray = mData
|
||||||
|
End Function
|
||||||
|
|
||||||
' subReadCPM: Reads the CPM table.
|
' subReadCPM: Reads the CPM table.
|
||||||
Sub subReadCPM
|
Sub subReadCPM
|
||||||
If UBound (mCPM) = -1 Then
|
If UBound (mCPM) = -1 Then
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
|
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
|
||||||
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="1Data" script:language="StarBasic">' 1Data: The Pokémon GO data for IV calculation
|
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="1Data" script:language="StarBasic">' 1Data: The Pokémon GO data for IV calculation
|
||||||
' by imacat <imacat@mail.imacat.idv.tw>, 2016-11-28
|
' by imacat <imacat@mail.imacat.idv.tw>, 2016-12-06
|
||||||
' Generated with 9Load.subReadDataSheets ()
|
' Generated with 9Load.subReadDataSheets ()
|
||||||
|
|
||||||
Option Explicit
|
Option Explicit
|
||||||
@ -9,157 +9,157 @@ Option Explicit
|
|||||||
' fnGetBaseStatsData: Returns the base stats data.
|
' fnGetBaseStatsData: Returns the base stats data.
|
||||||
Function fnGetBaseStatsData As Variant
|
Function fnGetBaseStatsData As Variant
|
||||||
fnGetBaseStatsData = Array( _
|
fnGetBaseStatsData = Array( _
|
||||||
Array ("Bulbasaur", "001", 90, 118, 118, "Venusaur"), _
|
Array ("Bulbasaur", "001", 90, 118, 118, Array ("Ivysaur", "Venusaur")), _
|
||||||
Array ("Ivysaur", "002", 120, 151, 151, "Venusaur"), _
|
Array ("Ivysaur", "002", 120, 151, 151, Array ("Venusaur")), _
|
||||||
Array ("Venusaur", "003", 160, 198, 198, "Venusaur"), _
|
Array ("Venusaur", "003", 160, 198, 198, Array ()), _
|
||||||
Array ("Charmander", "004", 78, 116, 96, "Charizard"), _
|
Array ("Charmander", "004", 78, 116, 96, Array ("Charmeleon", "Charizard")), _
|
||||||
Array ("Charmeleon", "005", 116, 158, 129, "Charizard"), _
|
Array ("Charmeleon", "005", 116, 158, 129, Array ("Charizard")), _
|
||||||
Array ("Charizard", "006", 156, 223, 176, "Charizard"), _
|
Array ("Charizard", "006", 156, 223, 176, Array ()), _
|
||||||
Array ("Squirtle", "007", 88, 94, 122, "Blastoise"), _
|
Array ("Squirtle", "007", 88, 94, 122, Array ("Wartortle", "Blastoise")), _
|
||||||
Array ("Wartortle", "008", 118, 126, 155, "Blastoise"), _
|
Array ("Wartortle", "008", 118, 126, 155, Array ("Blastoise")), _
|
||||||
Array ("Blastoise", "009", 158, 171, 210, "Blastoise"), _
|
Array ("Blastoise", "009", 158, 171, 210, Array ()), _
|
||||||
Array ("Caterpie", "010", 90, 55, 62, "Butterfree"), _
|
Array ("Caterpie", "010", 90, 55, 62, Array ("Metapod", "Butterfree")), _
|
||||||
Array ("Metapod", "011", 100, 45, 64, "Butterfree"), _
|
Array ("Metapod", "011", 100, 45, 64, Array ("Butterfree")), _
|
||||||
Array ("Butterfree", "012", 120, 167, 151, "Butterfree"), _
|
Array ("Butterfree", "012", 120, 167, 151, Array ()), _
|
||||||
Array ("Weedle", "013", 80, 63, 55, "Beedrill"), _
|
Array ("Weedle", "013", 80, 63, 55, Array ("Kakuna", "Beedrill")), _
|
||||||
Array ("Kakuna", "014", 90, 46, 86, "Beedrill"), _
|
Array ("Kakuna", "014", 90, 46, 86, Array ("Beedrill")), _
|
||||||
Array ("Beedrill", "015", 130, 169, 150, "Beedrill"), _
|
Array ("Beedrill", "015", 130, 169, 150, Array ()), _
|
||||||
Array ("Pidgey", "016", 80, 85, 76, "Pidgeot"), _
|
Array ("Pidgey", "016", 80, 85, 76, Array ("Pidgeotto", "Pidgeot")), _
|
||||||
Array ("Pidgeotto", "017", 126, 117, 108, "Pidgeot"), _
|
Array ("Pidgeotto", "017", 126, 117, 108, Array ("Pidgeot")), _
|
||||||
Array ("Pidgeot", "018", 166, 166, 157, "Pidgeot"), _
|
Array ("Pidgeot", "018", 166, 166, 157, Array ()), _
|
||||||
Array ("Rattata", "019", 60, 103, 70, "Raticate"), _
|
Array ("Rattata", "019", 60, 103, 70, Array ("Raticate")), _
|
||||||
Array ("Raticate", "020", 110, 161, 144, "Raticate"), _
|
Array ("Raticate", "020", 110, 161, 144, Array ()), _
|
||||||
Array ("Spearow", "021", 80, 112, 61, "Fearow"), _
|
Array ("Spearow", "021", 80, 112, 61, Array ("Fearow")), _
|
||||||
Array ("Fearow", "022", 130, 182, 135, "Fearow"), _
|
Array ("Fearow", "022", 130, 182, 135, Array ()), _
|
||||||
Array ("Ekans", "023", 70, 110, 102, "Arbok"), _
|
Array ("Ekans", "023", 70, 110, 102, Array ("Arbok")), _
|
||||||
Array ("Arbok", "024", 120, 167, 158, "Arbok"), _
|
Array ("Arbok", "024", 120, 167, 158, Array ()), _
|
||||||
Array ("Pikachu", "025", 70, 112, 101, "Raichu"), _
|
Array ("Pikachu", "025", 70, 112, 101, Array ("Raichu")), _
|
||||||
Array ("Raichu", "026", 120, 193, 165, "Raichu"), _
|
Array ("Raichu", "026", 120, 193, 165, Array ()), _
|
||||||
Array ("Sandshrew", "027", 100, 126, 145, "Sandslash"), _
|
Array ("Sandshrew", "027", 100, 126, 145, Array ("Sandslash")), _
|
||||||
Array ("Sandslash", "028", 150, 182, 202, "Sandslash"), _
|
Array ("Sandslash", "028", 150, 182, 202, Array ()), _
|
||||||
Array ("Nidoran♀", "029", 110, 86, 94, "Nidoqueen"), _
|
Array ("Nidoran♀", "029", 110, 86, 94, Array ("Nidorina", "Nidoqueen")), _
|
||||||
Array ("Nidorina", "030", 140, 117, 126, "Nidoqueen"), _
|
Array ("Nidorina", "030", 140, 117, 126, Array ("Nidoqueen")), _
|
||||||
Array ("Nidoqueen", "031", 180, 180, 174, "Nidoqueen"), _
|
Array ("Nidoqueen", "031", 180, 180, 174, Array ()), _
|
||||||
Array ("Nidoran♂", "032", 92, 105, 76, "Nidoking"), _
|
Array ("Nidoran♂", "032", 92, 105, 76, Array ("Nidorino", "Nidoking")), _
|
||||||
Array ("Nidorino", "033", 122, 137, 112, "Nidoking"), _
|
Array ("Nidorino", "033", 122, 137, 112, Array ("Nidoking")), _
|
||||||
Array ("Nidoking", "034", 162, 204, 157, "Nidoking"), _
|
Array ("Nidoking", "034", 162, 204, 157, Array ()), _
|
||||||
Array ("Clefairy", "035", 140, 107, 116, "Clefable"), _
|
Array ("Clefairy", "035", 140, 107, 116, Array ("Clefable")), _
|
||||||
Array ("Clefable", "036", 190, 178, 171, "Clefable"), _
|
Array ("Clefable", "036", 190, 178, 171, Array ()), _
|
||||||
Array ("Vulpix", "037", 76, 96, 122, "Ninetales"), _
|
Array ("Vulpix", "037", 76, 96, 122, Array ("Ninetales")), _
|
||||||
Array ("Ninetales", "038", 146, 169, 204, "Ninetales"), _
|
Array ("Ninetales", "038", 146, 169, 204, Array ()), _
|
||||||
Array ("Jigglypuff", "039", 230, 80, 44, "Wigglytuff"), _
|
Array ("Jigglypuff", "039", 230, 80, 44, Array ("Wigglytuff")), _
|
||||||
Array ("Wigglytuff", "040", 280, 156, 93, "Wigglytuff"), _
|
Array ("Wigglytuff", "040", 280, 156, 93, Array ()), _
|
||||||
Array ("Zubat", "041", 80, 83, 76, "Golbat"), _
|
Array ("Zubat", "041", 80, 83, 76, Array ("Golbat")), _
|
||||||
Array ("Golbat", "042", 150, 161, 153, "Golbat"), _
|
Array ("Golbat", "042", 150, 161, 153, Array ()), _
|
||||||
Array ("Oddish", "043", 90, 131, 116, "Vileplume"), _
|
Array ("Oddish", "043", 90, 131, 116, Array ("Gloom", "Vileplume")), _
|
||||||
Array ("Gloom", "044", 120, 153, 139, "Vileplume"), _
|
Array ("Gloom", "044", 120, 153, 139, Array ("Vileplume")), _
|
||||||
Array ("Vileplume", "045", 150, 202, 170, "Vileplume"), _
|
Array ("Vileplume", "045", 150, 202, 170, Array ()), _
|
||||||
Array ("Paras", "046", 70, 121, 99, "Parasect"), _
|
Array ("Paras", "046", 70, 121, 99, Array ("Parasect")), _
|
||||||
Array ("Parasect", "047", 120, 165, 146, "Parasect"), _
|
Array ("Parasect", "047", 120, 165, 146, Array ()), _
|
||||||
Array ("Venonat", "048", 120, 100, 102, "Venomoth"), _
|
Array ("Venonat", "048", 120, 100, 102, Array ("Venomoth")), _
|
||||||
Array ("Venomoth", "049", 140, 179, 150, "Venomoth"), _
|
Array ("Venomoth", "049", 140, 179, 150, Array ()), _
|
||||||
Array ("Diglett", "050", 20, 109, 88, "Dugtrio"), _
|
Array ("Diglett", "050", 20, 109, 88, Array ("Dugtrio")), _
|
||||||
Array ("Dugtrio", "051", 70, 167, 147, "Dugtrio"), _
|
Array ("Dugtrio", "051", 70, 167, 147, Array ()), _
|
||||||
Array ("Meowth", "052", 80, 92, 81, "Persian"), _
|
Array ("Meowth", "052", 80, 92, 81, Array ("Persian")), _
|
||||||
Array ("Persian", "053", 130, 150, 139, "Persian"), _
|
Array ("Persian", "053", 130, 150, 139, Array ()), _
|
||||||
Array ("Psyduck", "054", 100, 122, 96, "Golduck"), _
|
Array ("Psyduck", "054", 100, 122, 96, Array ("Golduck")), _
|
||||||
Array ("Golduck", "055", 160, 191, 163, "Golduck"), _
|
Array ("Golduck", "055", 160, 191, 163, Array ()), _
|
||||||
Array ("Mankey", "056", 80, 148, 87, "Primeape"), _
|
Array ("Mankey", "056", 80, 148, 87, Array ("Primeape")), _
|
||||||
Array ("Primeape", "057", 130, 207, 144, "Primeape"), _
|
Array ("Primeape", "057", 130, 207, 144, Array ()), _
|
||||||
Array ("Growlithe", "058", 110, 136, 96, "Arcanine"), _
|
Array ("Growlithe", "058", 110, 136, 96, Array ("Arcanine")), _
|
||||||
Array ("Arcanine", "059", 180, 227, 166, "Arcanine"), _
|
Array ("Arcanine", "059", 180, 227, 166, Array ()), _
|
||||||
Array ("Poliwag", "060", 80, 101, 82, "Poliwrath"), _
|
Array ("Poliwag", "060", 80, 101, 82, Array ("Poliwhirl", "Poliwrath")), _
|
||||||
Array ("Poliwhirl", "061", 130, 130, 130, "Poliwrath"), _
|
Array ("Poliwhirl", "061", 130, 130, 130, Array ("Poliwrath")), _
|
||||||
Array ("Poliwrath", "062", 180, 182, 187, "Poliwrath"), _
|
Array ("Poliwrath", "062", 180, 182, 187, Array ()), _
|
||||||
Array ("Abra", "063", 50, 195, 103, "Alakazam"), _
|
Array ("Abra", "063", 50, 195, 103, Array ("Kadabra", "Alakazam")), _
|
||||||
Array ("Kadabra", "064", 80, 232, 138, "Alakazam"), _
|
Array ("Kadabra", "064", 80, 232, 138, Array ("Alakazam")), _
|
||||||
Array ("Alakazam", "065", 110, 271, 194, "Alakazam"), _
|
Array ("Alakazam", "065", 110, 271, 194, Array ()), _
|
||||||
Array ("Machop", "066", 140, 137, 88, "Machamp"), _
|
Array ("Machop", "066", 140, 137, 88, Array ("Machoke", "Machamp")), _
|
||||||
Array ("Machoke", "067", 160, 177, 130, "Machamp"), _
|
Array ("Machoke", "067", 160, 177, 130, Array ("Machamp")), _
|
||||||
Array ("Machamp", "068", 180, 234, 162, "Machamp"), _
|
Array ("Machamp", "068", 180, 234, 162, Array ()), _
|
||||||
Array ("Bellsprout", "069", 100, 139, 64, "Victreebel"), _
|
Array ("Bellsprout", "069", 100, 139, 64, Array ("Weepinbell", "Victreebel")), _
|
||||||
Array ("Weepinbell", "070", 130, 172, 95, "Victreebel"), _
|
Array ("Weepinbell", "070", 130, 172, 95, Array ("Victreebel")), _
|
||||||
Array ("Victreebel", "071", 160, 207, 138, "Victreebel"), _
|
Array ("Victreebel", "071", 160, 207, 138, Array ()), _
|
||||||
Array ("Tentacool", "072", 80, 97, 182, "Tentacruel"), _
|
Array ("Tentacool", "072", 80, 97, 182, Array ("Tentacruel")), _
|
||||||
Array ("Tentacruel", "073", 160, 166, 237, "Tentacruel"), _
|
Array ("Tentacruel", "073", 160, 166, 237, Array ()), _
|
||||||
Array ("Geodude", "074", 80, 132, 163, "Golem"), _
|
Array ("Geodude", "074", 80, 132, 163, Array ("Graveler", "Golem")), _
|
||||||
Array ("Graveler", "075", 110, 164, 196, "Golem"), _
|
Array ("Graveler", "075", 110, 164, 196, Array ("Golem")), _
|
||||||
Array ("Golem", "076", 160, 211, 229, "Golem"), _
|
Array ("Golem", "076", 160, 211, 229, Array ()), _
|
||||||
Array ("Ponyta", "077", 100, 170, 132, "Rapidash"), _
|
Array ("Ponyta", "077", 100, 170, 132, Array ("Rapidash")), _
|
||||||
Array ("Rapidash", "078", 130, 207, 167, "Rapidash"), _
|
Array ("Rapidash", "078", 130, 207, 167, Array ()), _
|
||||||
Array ("Slowpoke", "079", 180, 109, 109, "Slowbro"), _
|
Array ("Slowpoke", "079", 180, 109, 109, Array ("Slowbro")), _
|
||||||
Array ("Slowbro", "080", 190, 177, 194, "Slowbro"), _
|
Array ("Slowbro", "080", 190, 177, 194, Array ()), _
|
||||||
Array ("Magnemite", "081", 50, 165, 128, "Magneton"), _
|
Array ("Magnemite", "081", 50, 165, 128, Array ("Magneton")), _
|
||||||
Array ("Magneton", "082", 100, 223, 182, "Magneton"), _
|
Array ("Magneton", "082", 100, 223, 182, Array ()), _
|
||||||
Array ("Farfetch'd", "083", 104, 124, 118, "Farfetch'd"), _
|
Array ("Farfetch'd", "083", 104, 124, 118, Array ()), _
|
||||||
Array ("Doduo", "084", 70, 158, 88, "Dodrio"), _
|
Array ("Doduo", "084", 70, 158, 88, Array ("Dodrio")), _
|
||||||
Array ("Dodrio", "085", 120, 218, 145, "Dodrio"), _
|
Array ("Dodrio", "085", 120, 218, 145, Array ()), _
|
||||||
Array ("Seel", "086", 130, 85, 128, "Dewgong"), _
|
Array ("Seel", "086", 130, 85, 128, Array ("Dewgong")), _
|
||||||
Array ("Dewgong", "087", 180, 139, 184, "Dewgong"), _
|
Array ("Dewgong", "087", 180, 139, 184, Array ()), _
|
||||||
Array ("Grimer", "088", 160, 135, 90, "Muk"), _
|
Array ("Grimer", "088", 160, 135, 90, Array ("Muk")), _
|
||||||
Array ("Muk", "089", 210, 190, 184, "Muk"), _
|
Array ("Muk", "089", 210, 190, 184, Array ()), _
|
||||||
Array ("Shellder", "090", 60, 116, 168, "Cloyster"), _
|
Array ("Shellder", "090", 60, 116, 168, Array ("Cloyster")), _
|
||||||
Array ("Cloyster", "091", 100, 186, 323, "Cloyster"), _
|
Array ("Cloyster", "091", 100, 186, 323, Array ()), _
|
||||||
Array ("Gastly", "092", 60, 186, 70, "Gengar"), _
|
Array ("Gastly", "092", 60, 186, 70, Array ("Haunter", "Gengar")), _
|
||||||
Array ("Haunter", "093", 90, 223, 112, "Gengar"), _
|
Array ("Haunter", "093", 90, 223, 112, Array ("Gengar")), _
|
||||||
Array ("Gengar", "094", 120, 261, 156, "Gengar"), _
|
Array ("Gengar", "094", 120, 261, 156, Array ()), _
|
||||||
Array ("Onix", "095", 70, 85, 288, "Onix"), _
|
Array ("Onix", "095", 70, 85, 288, Array ()), _
|
||||||
Array ("Drowzee", "096", 120, 89, 158, "Hypno"), _
|
Array ("Drowzee", "096", 120, 89, 158, Array ("Hypno")), _
|
||||||
Array ("Hypno", "097", 170, 144, 215, "Hypno"), _
|
Array ("Hypno", "097", 170, 144, 215, Array ()), _
|
||||||
Array ("Krabby", "098", 60, 181, 156, "Kingler"), _
|
Array ("Krabby", "098", 60, 181, 156, Array ("Kingler")), _
|
||||||
Array ("Kingler", "099", 110, 240, 214, "Kingler"), _
|
Array ("Kingler", "099", 110, 240, 214, Array ()), _
|
||||||
Array ("Voltorb", "100", 80, 109, 114, "Electrode"), _
|
Array ("Voltorb", "100", 80, 109, 114, Array ("Electrode")), _
|
||||||
Array ("Electrode", "101", 120, 173, 179, "Electrode"), _
|
Array ("Electrode", "101", 120, 173, 179, Array ()), _
|
||||||
Array ("Exeggcute", "102", 120, 107, 140, "Exeggutor"), _
|
Array ("Exeggcute", "102", 120, 107, 140, Array ("Exeggutor")), _
|
||||||
Array ("Exeggutor", "103", 190, 233, 158, "Exeggutor"), _
|
Array ("Exeggutor", "103", 190, 233, 158, Array ()), _
|
||||||
Array ("Cubone", "104", 100, 90, 165, "Marowak"), _
|
Array ("Cubone", "104", 100, 90, 165, Array ("Marowak")), _
|
||||||
Array ("Marowak", "105", 120, 144, 200, "Marowak"), _
|
Array ("Marowak", "105", 120, 144, 200, Array ()), _
|
||||||
Array ("Hitmonlee", "106", 100, 224, 211, "Hitmonlee"), _
|
Array ("Hitmonlee", "106", 100, 224, 211, Array ()), _
|
||||||
Array ("Hitmonchan", "107", 100, 193, 212, "Hitmonchan"), _
|
Array ("Hitmonchan", "107", 100, 193, 212, Array ()), _
|
||||||
Array ("Lickitung", "108", 180, 108, 137, "Lickitung"), _
|
Array ("Lickitung", "108", 180, 108, 137, Array ()), _
|
||||||
Array ("Koffing", "109", 80, 119, 164, "Weezing"), _
|
Array ("Koffing", "109", 80, 119, 164, Array ("Weezing")), _
|
||||||
Array ("Weezing", "110", 130, 174, 221, "Weezing"), _
|
Array ("Weezing", "110", 130, 174, 221, Array ()), _
|
||||||
Array ("Rhyhorn", "111", 160, 140, 157, "Rhydon"), _
|
Array ("Rhyhorn", "111", 160, 140, 157, Array ("Rhydon")), _
|
||||||
Array ("Rhydon", "112", 210, 222, 206, "Rhydon"), _
|
Array ("Rhydon", "112", 210, 222, 206, Array ()), _
|
||||||
Array ("Chansey", "113", 500, 60, 176, "Chansey"), _
|
Array ("Chansey", "113", 500, 60, 176, Array ()), _
|
||||||
Array ("Tangela", "114", 130, 183, 205, "Tangela"), _
|
Array ("Tangela", "114", 130, 183, 205, Array ()), _
|
||||||
Array ("Kangaskhan", "115", 210, 181, 165, "Kangaskhan"), _
|
Array ("Kangaskhan", "115", 210, 181, 165, Array ()), _
|
||||||
Array ("Horsea", "116", 60, 129, 125, "Seadra"), _
|
Array ("Horsea", "116", 60, 129, 125, Array ("Seadra")), _
|
||||||
Array ("Seadra", "117", 110, 187, 182, "Seadra"), _
|
Array ("Seadra", "117", 110, 187, 182, Array ()), _
|
||||||
Array ("Goldeen", "118", 90, 123, 115, "Seaking"), _
|
Array ("Goldeen", "118", 90, 123, 115, Array ("Seaking")), _
|
||||||
Array ("Seaking", "119", 160, 175, 154, "Seaking"), _
|
Array ("Seaking", "119", 160, 175, 154, Array ()), _
|
||||||
Array ("Staryu", "120", 60, 137, 112, "Starmie"), _
|
Array ("Staryu", "120", 60, 137, 112, Array ("Starmie")), _
|
||||||
Array ("Starmie", "121", 120, 210, 184, "Starmie"), _
|
Array ("Starmie", "121", 120, 210, 184, Array ()), _
|
||||||
Array ("Mr. Mime", "122", 80, 192, 233, "Mr. Mime"), _
|
Array ("Mr. Mime", "122", 80, 192, 233, Array ()), _
|
||||||
Array ("Scyther", "123", 140, 218, 170, "Scyther"), _
|
Array ("Scyther", "123", 140, 218, 170, Array ()), _
|
||||||
Array ("Jynx", "124", 130, 223, 182, "Jynx"), _
|
Array ("Jynx", "124", 130, 223, 182, Array ()), _
|
||||||
Array ("Electabuzz", "125", 130, 198, 173, "Electabuzz"), _
|
Array ("Electabuzz", "125", 130, 198, 173, Array ()), _
|
||||||
Array ("Magmar", "126", 130, 206, 169, "Magmar"), _
|
Array ("Magmar", "126", 130, 206, 169, Array ()), _
|
||||||
Array ("Pinsir", "127", 130, 238, 197, "Pinsir"), _
|
Array ("Pinsir", "127", 130, 238, 197, Array ()), _
|
||||||
Array ("Tauros", "128", 150, 198, 197, "Tauros"), _
|
Array ("Tauros", "128", 150, 198, 197, Array ()), _
|
||||||
Array ("Magikarp", "129", 40, 29, 102, "Gyarados"), _
|
Array ("Magikarp", "129", 40, 29, 102, Array ("Gyarados")), _
|
||||||
Array ("Gyarados", "130", 190, 237, 197, "Gyarados"), _
|
Array ("Gyarados", "130", 190, 237, 197, Array ()), _
|
||||||
Array ("Lapras", "131", 260, 186, 190, "Lapras"), _
|
Array ("Lapras", "131", 260, 186, 190, Array ()), _
|
||||||
Array ("Ditto", "132", 96, 91, 91, "Ditto"), _
|
Array ("Ditto", "132", 96, 91, 91, Array ()), _
|
||||||
Array ("Eevee", "133", 110, 104, 121, "Vaporeon"), _
|
Array ("Eevee", "133", 110, 104, 121, Array ("Vaporeon", "Jolteon", "Flareon")), _
|
||||||
Array ("Vaporeon", "134", 260, 205, 177, "Vaporeon"), _
|
Array ("Vaporeon", "134", 260, 205, 177, Array ()), _
|
||||||
Array ("Jolteon", "135", 130, 232, 201, "Jolteon"), _
|
Array ("Jolteon", "135", 130, 232, 201, Array ()), _
|
||||||
Array ("Flareon", "136", 130, 246, 204, "Flareon"), _
|
Array ("Flareon", "136", 130, 246, 204, Array ()), _
|
||||||
Array ("Porygon", "137", 130, 153, 139, "Porygon"), _
|
Array ("Porygon", "137", 130, 153, 139, Array ()), _
|
||||||
Array ("Omanyte", "138", 70, 155, 174, "Omastar"), _
|
Array ("Omanyte", "138", 70, 155, 174, Array ("Omastar")), _
|
||||||
Array ("Omastar", "139", 140, 207, 227, "Omastar"), _
|
Array ("Omastar", "139", 140, 207, 227, Array ()), _
|
||||||
Array ("Kabuto", "140", 60, 148, 162, "Kabutops"), _
|
Array ("Kabuto", "140", 60, 148, 162, Array ("Kabutops")), _
|
||||||
Array ("Kabutops", "141", 120, 220, 203, "Kabutops"), _
|
Array ("Kabutops", "141", 120, 220, 203, Array ()), _
|
||||||
Array ("Aerodactyl", "142", 160, 221, 164, "Aerodactyl"), _
|
Array ("Aerodactyl", "142", 160, 221, 164, Array ()), _
|
||||||
Array ("Snorlax", "143", 320, 190, 190, "Snorlax"), _
|
Array ("Snorlax", "143", 320, 190, 190, Array ()), _
|
||||||
Array ("Articuno", "144", 180, 192, 249, "Articuno"), _
|
Array ("Articuno", "144", 180, 192, 249, Array ()), _
|
||||||
Array ("Zapdos", "145", 180, 253, 188, "Zapdos"), _
|
Array ("Zapdos", "145", 180, 253, 188, Array ()), _
|
||||||
Array ("Moltres", "146", 180, 251, 184, "Moltres"), _
|
Array ("Moltres", "146", 180, 251, 184, Array ()), _
|
||||||
Array ("Dratini", "147", 82, 119, 94, "Dragonite"), _
|
Array ("Dratini", "147", 82, 119, 94, Array ("Dragonair", "Dragonite")), _
|
||||||
Array ("Dragonair", "148", 122, 163, 138, "Dragonite"), _
|
Array ("Dragonair", "148", 122, 163, 138, Array ("Dragonite")), _
|
||||||
Array ("Dragonite", "149", 182, 263, 201, "Dragonite"), _
|
Array ("Dragonite", "149", 182, 263, 201, Array ()), _
|
||||||
Array ("Mewtwo", "150", 212, 330, 200, "Mewtwo"), _
|
Array ("Mewtwo", "150", 212, 330, 200, Array ()), _
|
||||||
Array ("Mew", "151", 200, 210, 209, "Mew"))
|
Array ("Mew", "151", 200, 210, 209, Array ()))
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
' fnGetCPMData: Returns the combat power multiplier data.
|
' fnGetCPMData: Returns the combat power multiplier data.
|
||||||
|
@ -71,7 +71,8 @@ End Sub
|
|||||||
Function fnReadBaseStatsSheet As String
|
Function fnReadBaseStatsSheet As String
|
||||||
Dim oSheet As Object, oRange As Object, mData As Variant
|
Dim oSheet As Object, oRange As Object, mData As Variant
|
||||||
Dim nI As Integer, sOutput As String
|
Dim nI As Integer, sOutput As String
|
||||||
Dim nJ As Integer, sEvolveInto As String
|
Dim nJ As Integer, nStart As Integer, nEnd As Integer
|
||||||
|
Dim sEvolveForms As String
|
||||||
|
|
||||||
oSheet = ThisComponent.getSheets.getByName ("basestat")
|
oSheet = ThisComponent.getSheets.getByName ("basestat")
|
||||||
oRange = oSheet.getCellRangeByName ("BaseStats")
|
oRange = oSheet.getCellRangeByName ("BaseStats")
|
||||||
@ -82,38 +83,70 @@ Function fnReadBaseStatsSheet As String
|
|||||||
& "Function fnGetBaseStatsData As Variant" & Chr (10) _
|
& "Function fnGetBaseStatsData As Variant" & Chr (10) _
|
||||||
& Chr (9) & "fnGetBaseStatsData = Array( _" & Chr (10)
|
& Chr (9) & "fnGetBaseStatsData = Array( _" & Chr (10)
|
||||||
For nI = 1 To UBound (mData) - 1
|
For nI = 1 To UBound (mData) - 1
|
||||||
For nJ = 8 To 6 Step -1
|
sEvolveForms = fnFindEvolveForms (mData (nI))
|
||||||
If mData (nI) (nJ) <> "" Then
|
|
||||||
sEvolveInto = mData (nI) (nJ)
|
|
||||||
nJ = 5
|
|
||||||
End If
|
|
||||||
Next nJ
|
|
||||||
sOutput = sOutput _
|
sOutput = sOutput _
|
||||||
& Chr (9) & Chr (9) & "Array (""" & mData (nI) (0) _
|
& Chr (9) & Chr (9) & "Array (""" & mData (nI) (0) _
|
||||||
& """, """ & mData (nI) (1) _
|
& """, """ & mData (nI) (1) _
|
||||||
& """, " & mData (nI) (3) _
|
& """, " & mData (nI) (3) _
|
||||||
& ", " & mData (nI) (4) _
|
& ", " & mData (nI) (4) _
|
||||||
& ", " & mData (nI) (5) _
|
& ", " & mData (nI) (5) _
|
||||||
& ", """ & sEvolveInto & """), _" & Chr (10)
|
& ", " & sEvolveForms & "), _" & Chr (10)
|
||||||
Next nI
|
Next nI
|
||||||
nI = UBound (mData)
|
nI = UBound (mData)
|
||||||
For nJ = 8 To 6 Step -1
|
sEvolveForms = fnFindEvolveForms (mData (nI))
|
||||||
If mData (nI) (nJ) <> "" Then
|
|
||||||
sEvolveInto = mData (nI) (nJ)
|
|
||||||
nJ = 5
|
|
||||||
End If
|
|
||||||
Next nJ
|
|
||||||
sOutput = sOutput _
|
sOutput = sOutput _
|
||||||
& Chr (9) & Chr (9) & "Array (""" & mData (nI) (0) _
|
& Chr (9) & Chr (9) & "Array (""" & mData (nI) (0) _
|
||||||
& """, """ & mData (nI) (1) _
|
& """, """ & mData (nI) (1) _
|
||||||
& """, " & mData (nI) (3) _
|
& """, " & mData (nI) (3) _
|
||||||
& ", " & mData (nI) (4) _
|
& ", " & mData (nI) (4) _
|
||||||
& ", " & mData (nI) (5) _
|
& ", " & mData (nI) (5) _
|
||||||
& ", """ & sEvolveInto & """))" & Chr (10) _
|
& ", " & sEvolveForms & "))" & Chr (10) _
|
||||||
& "End Function"
|
& "End Function"
|
||||||
fnReadBaseStatsSheet = sOutput
|
fnReadBaseStatsSheet = sOutput
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Function fnFindEvolveForms (mData () As Variant) As String
|
||||||
|
Dim nJ As Integer, nStart As Integer, nEnd As Integer
|
||||||
|
Dim sEvolveForms As String
|
||||||
|
|
||||||
|
If mData (0) = "Eevee" Then
|
||||||
|
sEvolveForms = "Array (""Vaporeon"", ""Jolteon"", ""Flareon"")"
|
||||||
|
Else
|
||||||
|
For nJ = 6 To 8
|
||||||
|
If mData (nJ) = mData (0) Then
|
||||||
|
nStart = nJ + 1
|
||||||
|
nJ = 9
|
||||||
|
End If
|
||||||
|
Next nJ
|
||||||
|
If nStart = 9 Then
|
||||||
|
nEnd = 8
|
||||||
|
Else
|
||||||
|
For nJ = nStart To 8
|
||||||
|
If mData (nJ) = "" Then
|
||||||
|
nEnd = nJ - 1
|
||||||
|
nJ = 9
|
||||||
|
Else
|
||||||
|
If nJ = 8 Then
|
||||||
|
nEnd = 8
|
||||||
|
nJ = 9
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next nJ
|
||||||
|
End If
|
||||||
|
If nEnd = nStart - 1 Then
|
||||||
|
sEvolveForms = "Array ()"
|
||||||
|
Else
|
||||||
|
sEvolveForms = """" & mData (nStart) & """"
|
||||||
|
For nJ = nStart + 1 To nEnd
|
||||||
|
sEvolveForms = sEvolveForms _
|
||||||
|
& ", """ & mData (nJ) & """"
|
||||||
|
Next nJ
|
||||||
|
sEvolveForms = "Array (" & sEvolveForms & ")"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
fnFindEvolveForms = sEvolveForms
|
||||||
|
End Function
|
||||||
|
|
||||||
' fnReadCPMSheet: Reads the combat power multiplier sheet.
|
' fnReadCPMSheet: Reads the combat power multiplier sheet.
|
||||||
Function fnReadCPMSheet As String
|
Function fnReadCPMSheet As String
|
||||||
Dim oSheet As Object, oRange As Object, mData As Variant
|
Dim oSheet As Object, oRange As Object, mData As Variant
|
||||||
|
@ -4,4 +4,5 @@
|
|||||||
<library:element library:name="0Main"/>
|
<library:element library:name="0Main"/>
|
||||||
<library:element library:name="1Data"/>
|
<library:element library:name="1Data"/>
|
||||||
<library:element library:name="9Load"/>
|
<library:element library:name="9Load"/>
|
||||||
|
<library:element library:name="2Data"/>
|
||||||
</library:library>
|
</library:library>
|
Loading…
Reference in New Issue
Block a user