* Updated that the maximum power-up level of a Pokémon is the trainer level + 2. It was the trainer level + 1.5 before.

* Updated to remember the last selected player level.  Player level rarely changes when calculating a bunch of Pokémons.
This commit is contained in:
依瑪貓 2017-11-30 17:33:13 +08:00
parent 2c5c0909e0
commit de7dbdd676
4 changed files with 20 additions and 10 deletions

View File

@ -18,7 +18,9 @@
Option Explicit
' Remembers the selected Pokémon for the next run.
Global sSelected As String
Global sLastSelected As String
' Remembers the selected player level for the next run.
Global sLastLevel As Integer
' The parameters to find the individual values.
Type aFindIVParam
@ -72,15 +74,18 @@ Function fnAskParam As aFindIVParam
"ImageURL", fnGetImageUrl ("Unknown"))
' Remembers the previously-selected Pokémon.
oDialog.getControl ("lstPokemon").selectItem (sSelected, True)
oDialog.getControl ("lstPokemon").selectItem (sLastSelected, True)
oDialog.getControl ("lstPlayerLevel").selectItem (sLastLevel, True)
If oDialog.execute = 0 Then
aQuery.bIsCancelled = True
sLastLevel = oDialog.getControl ("lstPlayerLevel").getSelectedItem
fnAskParam = aQuery
Exit Function
End If
subReadBaseStats
sLastLevel = oDialog.getControl ("lstPlayerLevel").getSelectedItem
nSelected = oDialog.getControl ("lstPokemon").getSelectedItemPos
With aQuery
.sPokemonId = maBaseStats (nSelected).sPokemonId
@ -175,9 +180,9 @@ Sub subLstPokemonSelected (oEvent As object)
oDialog = oEvent.Source.getContext
' Checks which Pokémon was selected.
sSelected = oDialog.getControl ("lstPokemon").getSelectedItem
sLastSelected = oDialog.getControl ("lstPokemon").getSelectedItem
nSelected = oDialog.getControl ("lstPokemon").getSelectedItemPos
' This happens at the beginning where sSelected is "".
' This happens at the beginning where sLastSelected is "".
If nSelected = -1 Then
Exit Sub
End If

View File

@ -100,7 +100,7 @@ Sub subCreateReport ( _
End If
If aQuery.nPlayerLevel <> 0 Then
fMaxLevel = aQuery.nPlayerLevel + 1.5
fMaxLevel = aQuery.nPlayerLevel + 2
If fMaxLevel > 40 Then
fMaxLevel = 40
End If

View File

@ -20,7 +20,9 @@
Option Explicit
&apos; Remembers the selected Pokémon for the next run.
Global sSelected As String
Global sLastSelected As String
&apos; Remembers the selected player level for the next run.
Global sLastLevel As Integer
&apos; The parameters to find the individual values.
Type aFindIVParam
@ -74,15 +76,18 @@ Function fnAskParam As aFindIVParam
&quot;ImageURL&quot;, fnGetImageUrl (&quot;Unknown&quot;))
&apos; Remembers the previously-selected Pokémon.
oDialog.getControl (&quot;lstPokemon&quot;).selectItem (sSelected, True)
oDialog.getControl (&quot;lstPokemon&quot;).selectItem (sLastSelected, True)
oDialog.getControl (&quot;lstPlayerLevel&quot;).selectItem (sLastLevel, True)
If oDialog.execute = 0 Then
aQuery.bIsCancelled = True
sLastLevel = oDialog.getControl (&quot;lstPlayerLevel&quot;).getSelectedItem
fnAskParam = aQuery
Exit Function
End If
subReadBaseStats
sLastLevel = oDialog.getControl (&quot;lstPlayerLevel&quot;).getSelectedItem
nSelected = oDialog.getControl (&quot;lstPokemon&quot;).getSelectedItemPos
With aQuery
.sPokemonId = maBaseStats (nSelected).sPokemonId
@ -177,9 +182,9 @@ Sub subLstPokemonSelected (oEvent As object)
oDialog = oEvent.Source.getContext
&apos; Checks which Pokémon was selected.
sSelected = oDialog.getControl (&quot;lstPokemon&quot;).getSelectedItem
sLastSelected = oDialog.getControl (&quot;lstPokemon&quot;).getSelectedItem
nSelected = oDialog.getControl (&quot;lstPokemon&quot;).getSelectedItemPos
&apos; This happens at the beginning where sSelected is &quot;&quot;.
&apos; This happens at the beginning where sLastSelected is &quot;&quot;.
If nSelected = -1 Then
Exit Sub
End If

View File

@ -102,7 +102,7 @@ Sub subCreateReport ( _
End If
If aQuery.nPlayerLevel &lt;&gt; 0 Then
fMaxLevel = aQuery.nPlayerLevel + 1.5
fMaxLevel = aQuery.nPlayerLevel + 2
If fMaxLevel &gt; 40 Then
fMaxLevel = 40
End If