Fixed "star dust" to "stardust".

This commit is contained in:
依瑪貓 2017-02-16 11:39:23 +08:00
parent df06388e83
commit 95fc3c85f0
9 changed files with 54 additions and 54 deletions

View File

@ -49,7 +49,7 @@ Type aFindIVParam
sPokemon As String
nCP As Integer
nHP As Integer
nStarDust As Integer
nStardust As Integer
nPlayerLevel As Integer
bIsNew As Boolean
nTotal As Integer
@ -59,7 +59,7 @@ Type aFindIVParam
End Type
Private maBaseStats () As New aStats
Private mCPM () As Double, mStarDust () As Integer
Private mCPM () As Double, mStardust () As Integer
' subMain: The main program
Sub subMain
@ -113,7 +113,7 @@ Function fnAskParam As aFindIVParam
.sPokemon = oDialog.getControl ("lstPokemon").getSelectedItem
.nCP = oDialog.getControl ("numCP").getValue
.nHP = oDialog.getControl ("numHP").getValue
.nStarDust = CInt (oDialog.getControl ("lstStarDust").getSelectedItem)
.nStardust = CInt (oDialog.getControl ("lstStardust").getSelectedItem)
.nPlayerLevel = CInt (oDialog.getControl ("lstPlayerLevel").getSelectedItem)
.nTotal = oDialog.getControl ("lstTotal").getSelectedItemPos + 1
.nMax = oDialog.getControl ("lstMax").getSelectedItemPos + 1
@ -174,19 +174,19 @@ End Function
Sub subBtnOKCheck (oEvent As object)
Dim oDialog As Object
Dim oPokemon As Object, oCP As Object
Dim oHP As Object, oStarDust As Object, oOK As Object
Dim oHP As Object, oStardust As Object, oOK As Object
oDialog = oEvent.Source.getContext
oPokemon = oDialog.getControl ("lstPokemon")
oCP = oDialog.getControl ("numCP")
oHP = oDialog.getControl ("numHP")
oStarDust = oDialog.getControl ("lstStarDust")
oStardust = oDialog.getControl ("lstStardust")
oOK = oDialog.getControl ("btnOK")
If oPokemon.getSelectedItemPos <> -1 _
And oCP.getText <> "" _
And oHP.getText <> "" _
And oStarDust.getSelectedItemPos <> -1 Then
And oStardust.getSelectedItemPos <> -1 Then
oOK.setEnable (True)
Else
oOK.setEnable (False)
@ -571,7 +571,7 @@ Function fnFindIV ( _
Else
fStep = 0.5
End If
subReadStarDust
subReadStardust
nEvolved = UBound (aBaseStats.mEvolved)
If nEvolved > -1 Then
ReDim Preserve maEvBaseStats (nEvolved) As New aStats
@ -585,8 +585,8 @@ Function fnFindIV ( _
Next nI
End If
nN = -1
For fLevel = 1 To UBound (mStarDust) Step fStep
If mStarDust (CInt (fLevel - 0.5)) = aQuery.nStarDust Then
For fLevel = 1 To UBound (mStardust) Step fStep
If mStardust (CInt (fLevel - 0.5)) = aQuery.nStardust Then
For nStamina = 0 To 15
If fnCalcHP (aBaseStats, fLevel, nStamina) = aQuery.nHP Then
For nAttack = 0 To 15
@ -740,7 +740,7 @@ Sub subSaveIV ( _
nEvolved = UBound (maIVs (0).maEvolved) + 1
mRow = Array ( _
"No", "Pokemon", "CP", "HP", "Star dust", _
"No", "Pokemon", "CP", "HP", "Stardust", _
"Lv", "Atk", "Def", "Sta", "IV")
nFront = UBound (mRow)
If aQuery.sPokemon = "Eevee" Then
@ -843,7 +843,7 @@ Sub subSaveIV ( _
mData (1) (1) = aQuery.sPokemon
mData (1) (2) = aQuery.nCP
mData (1) (3) = aQuery.nHP
mData (1) (4) = aQuery.nStarDust
mData (1) (4) = aQuery.nStardust
oRange = oSheet.getCellRangeByPosition ( _
0, 0, UBound (mData (0)), UBound (mData))
@ -1154,9 +1154,9 @@ Sub subReadCPM
End If
End Sub
' subReadStarDust: Reads the star dust table.
Sub subReadStarDust
If UBound (mStarDust) = -1 Then
mStarDust = fnGetStarDustData
' subReadStardust: Reads the stardust table.
Sub subReadStardust
If UBound (mStardust) = -1 Then
mStardust = fnGetStardustData
End If
End Sub

View File

@ -228,9 +228,9 @@ Function fnGetCPMData As Variant
0.78463697)
End Function
' fnGetStarDustData: Returns the star dust data.
Function fnGetStarDustData As Variant
fnGetStarDustData = Array( _
' fnGetStardustData: Returns the stardust data.
Function fnGetStardustData As Variant
fnGetStardustData = Array( _
-1, _
200, _
200, _

View File

@ -44,7 +44,7 @@ Sub subReadDataSheets
& "Option Explicit"
sOutput = sOutput & Chr (10) & Chr (10) & fnReadBaseStatsSheet
sOutput = sOutput & Chr (10) & Chr (10) & fnReadCPMSheet
sOutput = sOutput & Chr (10) & Chr (10) & fnReadStarDustSheet
sOutput = sOutput & Chr (10) & Chr (10) & fnReadStardustSheet
subShowBasicData (sOutput)
End Sub
@ -203,8 +203,8 @@ Function fnReadCPMSheet As String
fnReadCPMSheet = sOutput
End Function
' fnReadStarDustSheet: Reads the star dust sheet.
Function fnReadStarDustSheet As String
' fnReadStardustSheet: Reads the stardust sheet.
Function fnReadStardustSheet As String
Dim oSheet As Object, oRange As Object, mData As Variant
Dim nI As Integer, sOutput As String
@ -213,9 +213,9 @@ Function fnReadStarDustSheet As String
mData = oRange.getDataArray
sOutput = "" _
& "' fnGetStarDustData: Returns the star dust data." & Chr (10) _
& "Function fnGetStarDustData As Variant" & Chr (10) _
& Chr (9) & "fnGetStarDustData = Array( _" & Chr (10) _
& "' fnGetStardustData: Returns the stardust data." & Chr (10) _
& "Function fnGetStardustData As Variant" & Chr (10) _
& Chr (9) & "fnGetStardustData = Array( _" & Chr (10) _
& Chr (9) & Chr (9) & "-1, _" & Chr (10)
For nI = 1 To UBound (mData) - 1 Step 2
sOutput = sOutput _
@ -225,5 +225,5 @@ Function fnReadStarDustSheet As String
sOutput = sOutput _
& Chr (9) & Chr (9) & mData (nI) (2) & ")" & Chr (10) _
& "End Function"
fnReadStarDustSheet = sOutput
fnReadStardustSheet = sOutput
End Function

View File

@ -51,7 +51,7 @@ Type aFindIVParam
sPokemon As String
nCP As Integer
nHP As Integer
nStarDust As Integer
nStardust As Integer
nPlayerLevel As Integer
bIsNew As Boolean
nTotal As Integer
@ -61,7 +61,7 @@ Type aFindIVParam
End Type
Private maBaseStats () As New aStats
Private mCPM () As Double, mStarDust () As Integer
Private mCPM () As Double, mStardust () As Integer
&apos; subMain: The main program
Sub subMain
@ -115,7 +115,7 @@ Function fnAskParam As aFindIVParam
.sPokemon = oDialog.getControl (&quot;lstPokemon&quot;).getSelectedItem
.nCP = oDialog.getControl (&quot;numCP&quot;).getValue
.nHP = oDialog.getControl (&quot;numHP&quot;).getValue
.nStarDust = CInt (oDialog.getControl (&quot;lstStarDust&quot;).getSelectedItem)
.nStardust = CInt (oDialog.getControl (&quot;lstStardust&quot;).getSelectedItem)
.nPlayerLevel = CInt (oDialog.getControl (&quot;lstPlayerLevel&quot;).getSelectedItem)
.nTotal = oDialog.getControl (&quot;lstTotal&quot;).getSelectedItemPos + 1
.nMax = oDialog.getControl (&quot;lstMax&quot;).getSelectedItemPos + 1
@ -176,19 +176,19 @@ End Function
Sub subBtnOKCheck (oEvent As object)
Dim oDialog As Object
Dim oPokemon As Object, oCP As Object
Dim oHP As Object, oStarDust As Object, oOK As Object
Dim oHP As Object, oStardust As Object, oOK As Object
oDialog = oEvent.Source.getContext
oPokemon = oDialog.getControl (&quot;lstPokemon&quot;)
oCP = oDialog.getControl (&quot;numCP&quot;)
oHP = oDialog.getControl (&quot;numHP&quot;)
oStarDust = oDialog.getControl (&quot;lstStarDust&quot;)
oStardust = oDialog.getControl (&quot;lstStardust&quot;)
oOK = oDialog.getControl (&quot;btnOK&quot;)
If oPokemon.getSelectedItemPos &lt;&gt; -1 _
And oCP.getText &lt;&gt; &quot;&quot; _
And oHP.getText &lt;&gt; &quot;&quot; _
And oStarDust.getSelectedItemPos &lt;&gt; -1 Then
And oStardust.getSelectedItemPos &lt;&gt; -1 Then
oOK.setEnable (True)
Else
oOK.setEnable (False)
@ -573,7 +573,7 @@ Function fnFindIV ( _
Else
fStep = 0.5
End If
subReadStarDust
subReadStardust
nEvolved = UBound (aBaseStats.mEvolved)
If nEvolved &gt; -1 Then
ReDim Preserve maEvBaseStats (nEvolved) As New aStats
@ -587,8 +587,8 @@ Function fnFindIV ( _
Next nI
End If
nN = -1
For fLevel = 1 To UBound (mStarDust) Step fStep
If mStarDust (CInt (fLevel - 0.5)) = aQuery.nStarDust Then
For fLevel = 1 To UBound (mStardust) Step fStep
If mStardust (CInt (fLevel - 0.5)) = aQuery.nStardust Then
For nStamina = 0 To 15
If fnCalcHP (aBaseStats, fLevel, nStamina) = aQuery.nHP Then
For nAttack = 0 To 15
@ -742,7 +742,7 @@ Sub subSaveIV ( _
nEvolved = UBound (maIVs (0).maEvolved) + 1
mRow = Array ( _
&quot;No&quot;, &quot;Pokemon&quot;, &quot;CP&quot;, &quot;HP&quot;, &quot;Star dust&quot;, _
&quot;No&quot;, &quot;Pokemon&quot;, &quot;CP&quot;, &quot;HP&quot;, &quot;Stardust&quot;, _
&quot;Lv&quot;, &quot;Atk&quot;, &quot;Def&quot;, &quot;Sta&quot;, &quot;IV&quot;)
nFront = UBound (mRow)
If aQuery.sPokemon = &quot;Eevee&quot; Then
@ -845,7 +845,7 @@ Sub subSaveIV ( _
mData (1) (1) = aQuery.sPokemon
mData (1) (2) = aQuery.nCP
mData (1) (3) = aQuery.nHP
mData (1) (4) = aQuery.nStarDust
mData (1) (4) = aQuery.nStardust
oRange = oSheet.getCellRangeByPosition ( _
0, 0, UBound (mData (0)), UBound (mData))
@ -1156,10 +1156,10 @@ Sub subReadCPM
End If
End Sub
&apos; subReadStarDust: Reads the star dust table.
Sub subReadStarDust
If UBound (mStarDust) = -1 Then
mStarDust = fnGetStarDustData
&apos; subReadStardust: Reads the stardust table.
Sub subReadStardust
If UBound (mStardust) = -1 Then
mStardust = fnGetStardustData
End If
End Sub
</script:module>

View File

@ -230,9 +230,9 @@ Function fnGetCPMData As Variant
0.78463697)
End Function
&apos; fnGetStarDustData: Returns the star dust data.
Function fnGetStarDustData As Variant
fnGetStarDustData = Array( _
&apos; fnGetStardustData: Returns the stardust data.
Function fnGetStardustData As Variant
fnGetStardustData = Array( _
-1, _
200, _
200, _

View File

@ -46,7 +46,7 @@ Sub subReadDataSheets
&amp; &quot;Option Explicit&quot;
sOutput = sOutput &amp; Chr (10) &amp; Chr (10) &amp; fnReadBaseStatsSheet
sOutput = sOutput &amp; Chr (10) &amp; Chr (10) &amp; fnReadCPMSheet
sOutput = sOutput &amp; Chr (10) &amp; Chr (10) &amp; fnReadStarDustSheet
sOutput = sOutput &amp; Chr (10) &amp; Chr (10) &amp; fnReadStardustSheet
subShowBasicData (sOutput)
End Sub
@ -205,8 +205,8 @@ Function fnReadCPMSheet As String
fnReadCPMSheet = sOutput
End Function
&apos; fnReadStarDustSheet: Reads the star dust sheet.
Function fnReadStarDustSheet As String
&apos; fnReadStardustSheet: Reads the stardust sheet.
Function fnReadStardustSheet As String
Dim oSheet As Object, oRange As Object, mData As Variant
Dim nI As Integer, sOutput As String
@ -215,9 +215,9 @@ Function fnReadStarDustSheet As String
mData = oRange.getDataArray
sOutput = &quot;&quot; _
&amp; &quot;&apos; fnGetStarDustData: Returns the star dust data.&quot; &amp; Chr (10) _
&amp; &quot;Function fnGetStarDustData As Variant&quot; &amp; Chr (10) _
&amp; Chr (9) &amp; &quot;fnGetStarDustData = Array( _&quot; &amp; Chr (10) _
&amp; &quot;&apos; fnGetStardustData: Returns the stardust data.&quot; &amp; Chr (10) _
&amp; &quot;Function fnGetStardustData As Variant&quot; &amp; Chr (10) _
&amp; Chr (9) &amp; &quot;fnGetStardustData = Array( _&quot; &amp; Chr (10) _
&amp; Chr (9) &amp; Chr (9) &amp; &quot;-1, _&quot; &amp; Chr (10)
For nI = 1 To UBound (mData) - 1 Step 2
sOutput = sOutput _
@ -227,6 +227,6 @@ Function fnReadStarDustSheet As String
sOutput = sOutput _
&amp; Chr (9) &amp; Chr (9) &amp; mData (nI) (2) &amp; &quot;)&quot; &amp; Chr (10) _
&amp; &quot;End Function&quot;
fnReadStarDustSheet = sOutput
fnReadStardustSheet = sOutput
End Function
</script:module>

View File

@ -3,7 +3,7 @@
2.DlgMain.txtPokemon.Label=~Pok\u00e9mon:
3.DlgMain.txtCP.Label=~CP:
4.DlgMain.txtHP.Label=~HP:
5.DlgMain.txtStarDust.Label=S~tar dust:
5.DlgMain.txtStardust.Label=S~tardust:
6.DlgMain.txtPlayerLevel.Label=Player ~level:
7.DlgMain.cbxIsNew.Label=This Pok\u00e9mon has ~not been powered-up yet.
8.DlgMain.grpAppraisals.Label=Team Leader Appraisal

View File

@ -3,7 +3,7 @@
2.DlgMain.txtPokemon.Label=\u5bf6\u53ef\u5922(~P)\uff1a
3.DlgMain.txtCP.Label=~CP:
4.DlgMain.txtHP.Label=~HP:
5.DlgMain.txtStarDust.Label=S~tar dust:
5.DlgMain.txtStardust.Label=S~tardust:
6.DlgMain.txtPlayerLevel.Label=\u73a9\u5bb6\u7b49\u7d1a(~L)\uff1a
7.DlgMain.cbxIsNew.Label=\u9019\u96bb\u5bf6\u53ef\u5922\u9084\u6c92\u5f37\u5316\u904e(~N)\u3002
8.DlgMain.grpAppraisals.Label=\u968a\u9577\u8a55\u50f9

View File

@ -181,8 +181,8 @@
<dlg:numericfield dlg:id="numHP" dlg:tab-index="2" dlg:left="65" dlg:top="39" dlg:width="15" dlg:height="12" dlg:decimal-accuracy="0" dlg:value-min="10" dlg:value-max="500">
<script:event script:event-name="on-textchange" script:macro-name="vnd.sun.star.script:PokemonGoIV.0Main.subBtnOKCheck?language=Basic&amp;location=application" script:language="Script"/>
</dlg:numericfield>
<dlg:text dlg:id="txtStarDust" dlg:tab-index="19" dlg:left="90" dlg:top="41" dlg:width="30" dlg:height="8" dlg:value="&amp;5.DlgMain.txtStarDust.Label"/>
<dlg:menulist dlg:id="lstStarDust" dlg:tab-index="3" dlg:left="120" dlg:top="39" dlg:width="35" dlg:height="12" dlg:spin="true">
<dlg:text dlg:id="txtStardust" dlg:tab-index="19" dlg:left="90" dlg:top="41" dlg:width="30" dlg:height="8" dlg:value="&amp;5.DlgMain.txtStardust.Label"/>
<dlg:menulist dlg:id="lstStardust" dlg:tab-index="3" dlg:left="120" dlg:top="39" dlg:width="35" dlg:height="12" dlg:spin="true">
<dlg:menupopup>
<dlg:menuitem dlg:value="200"/>
<dlg:menuitem dlg:value="400"/>