Localized the best stat appraisal.

This commit is contained in:
依瑪貓 2017-02-15 15:01:10 +08:00
parent ab16ff0d9c
commit 97a8aceaf6
3 changed files with 61 additions and 18 deletions

View File

@ -129,7 +129,7 @@ Function fnAskParam As aFindIVParam
bIsBestAttack = False
bIsBestDefense = False
bIsBestHP = False
If oDialog.getControl ("lstBest").getSelectedItem = "Attack" Then
If oDialog.getControl ("lstBest").getSelectedItemPos = 0 Then
bIsBestAttack = True
If oDialog.getControl ("cbxBest2").getState = 1 Then
bIsBestDefense = True
@ -138,7 +138,7 @@ Function fnAskParam As aFindIVParam
bIsBestHP = True
End If
End If
If oDialog.getControl ("lstBest").getSelectedItem = "Defense" Then
If oDialog.getControl ("lstBest").getSelectedItemPos = 1 Then
bIsBestDefense = True
If oDialog.getControl ("cbxBest2").getState = 1 Then
bIsBestAttack = True
@ -147,7 +147,7 @@ Function fnAskParam As aFindIVParam
bIsBestHP = True
End If
End If
If oDialog.getControl ("lstBest").getSelectedItem = "HP" Then
If oDialog.getControl ("lstBest").getSelectedItemPos = 2 Then
bIsBestHP = True
If oDialog.getControl ("cbxBest2").getState = 1 Then
bIsBestAttack = True
@ -238,7 +238,7 @@ Sub subRdoTeamValorItemChanged (oEvent As object)
' Updates the text of the best stat appraisal.
subUpdateBestStatAppraisal (oDialog, _
"Its", 8, "is its strongest feature.", 65)
fnGetResString ("AppraisalValorBest"))
mItems = Array ( _
fnGetResString ("AppraisalValorMax15"), _
@ -275,7 +275,7 @@ Sub subRdoTeamMysticItemChanged (oEvent As object)
' Updates the text of the best stat appraisal.
subUpdateBestStatAppraisal (oDialog, _
"I see that its best attribute is its", 85, ".", 5)
fnGetResString ("AppraisalMysticBest"))
mItems = Array ( _
fnGetResString ("AppraisalMysticMax15"), _
@ -312,7 +312,7 @@ Sub subRdoTeamInstinctItemChanged (oEvent As object)
' Updates the text of the best stat appraisal.
subUpdateBestStatAppraisal (oDialog, _
"Its best quality is", 45, ".", 5)
fnGetResString ("AppraisalInstinctBest"))
mItems = Array ( _
fnGetResString ("AppraisalInstinctMax15"), _
@ -326,12 +326,26 @@ Sub subRdoTeamInstinctItemChanged (oEvent As object)
End Sub
' subUpdateBestStatAppraisal: Updates the text of the best stat appraisal.
Sub subUpdateBestStatAppraisal (oDialog As Object, _
sBefore As String, nBeforeWidth As Integer, _
sAfter As String, nAfterWidth As Integer)
Sub subUpdateBestStatAppraisal (oDialog As Object, sAppraisal)
Dim oText As Object, oList As Object, nX As Integer
Dim sBefore As String, nBeforeWidth As Integer
Dim sAfter As String, nAfterWidth As Integer
Dim nPos As Integer
Dim mItems () As String
nPos = InStr (sAppraisal, "[Stat]")
sBefore = Left (sAppraisal, nPos - 1)
If Right (sBefore, 1) <> " " Then
sBefore = sBefore & " "
End If
nBeforeWidth = CInt (Len (sBefore) * 2.3)
sAfter = Right (sAppraisal, _
Len (sAppraisal) - nPos - Len ("[Stat]") + 1)
If Left (sAfter, 1) <> " " Then
sAfter = " " & sAfter
End If
nAfterWidth = CInt (Len (sAfter) * 2.3)
oText = oDialog.getControl ("txtBestBefore")
oText.getModel.setPropertyValue ("Width", nBeforeWidth)
oText.setVisible (True)

View File

@ -82,6 +82,11 @@
<value>Overall, your [Pokémon] may not be great in battle, but I still like it!</value>
</prop>
</node>
<node oor:name="AppraisalValorBest" oor:op="replace">
<prop oor:name="Text" oor:type="xs:string" oor:localized="true">
<value>Its [Stat] is its strongest feature.</value>
</prop>
</node>
<node oor:name="AppraisalValorBestToo" oor:op="replace">
<prop oor:name="Text" oor:type="xs:string" oor:localized="true">
<value>I'm just as impressed with its [Stat].</value>
@ -134,6 +139,11 @@
<value>Overall, your [Pokémon] is not likely to make much headway in battle.</value>
</prop>
</node>
<node oor:name="AppraisalMysticBest" oor:op="replace">
<prop oor:name="Text" oor:type="xs:string" oor:localized="true">
<value>I see that its best attribute is its [Stat].</value>
</prop>
</node>
<node oor:name="AppraisalMysticBestToo" oor:op="replace">
<prop oor:name="Text" oor:type="xs:string" oor:localized="true">
<value>It is matched equally by its [Stat].</value>
@ -186,6 +196,11 @@
<value>Overall, your [Pokémon] has room for improvement as far as battling goes.</value>
</prop>
</node>
<node oor:name="AppraisalInstinctBest" oor:op="replace">
<prop oor:name="Text" oor:type="xs:string" oor:localized="true">
<value>Its best quality is [Stat].</value>
</prop>
</node>
<node oor:name="AppraisalInstinctBestToo" oor:op="replace">
<prop oor:name="Text" oor:type="xs:string" oor:localized="true">
<value>Its [Stat] is great, too!</value>

View File

@ -131,7 +131,7 @@ Function fnAskParam As aFindIVParam
bIsBestAttack = False
bIsBestDefense = False
bIsBestHP = False
If oDialog.getControl (&quot;lstBest&quot;).getSelectedItem = &quot;Attack&quot; Then
If oDialog.getControl (&quot;lstBest&quot;).getSelectedItemPos = 0 Then
bIsBestAttack = True
If oDialog.getControl (&quot;cbxBest2&quot;).getState = 1 Then
bIsBestDefense = True
@ -140,7 +140,7 @@ Function fnAskParam As aFindIVParam
bIsBestHP = True
End If
End If
If oDialog.getControl (&quot;lstBest&quot;).getSelectedItem = &quot;Defense&quot; Then
If oDialog.getControl (&quot;lstBest&quot;).getSelectedItemPos = 1 Then
bIsBestDefense = True
If oDialog.getControl (&quot;cbxBest2&quot;).getState = 1 Then
bIsBestAttack = True
@ -149,7 +149,7 @@ Function fnAskParam As aFindIVParam
bIsBestHP = True
End If
End If
If oDialog.getControl (&quot;lstBest&quot;).getSelectedItem = &quot;HP&quot; Then
If oDialog.getControl (&quot;lstBest&quot;).getSelectedItemPos = 2 Then
bIsBestHP = True
If oDialog.getControl (&quot;cbxBest2&quot;).getState = 1 Then
bIsBestAttack = True
@ -240,7 +240,7 @@ Sub subRdoTeamValorItemChanged (oEvent As object)
&apos; Updates the text of the best stat appraisal.
subUpdateBestStatAppraisal (oDialog, _
&quot;Its&quot;, 8, &quot;is its strongest feature.&quot;, 65)
fnGetResString (&quot;AppraisalValorBest&quot;))
mItems = Array ( _
fnGetResString (&quot;AppraisalValorMax15&quot;), _
@ -277,7 +277,7 @@ Sub subRdoTeamMysticItemChanged (oEvent As object)
&apos; Updates the text of the best stat appraisal.
subUpdateBestStatAppraisal (oDialog, _
&quot;I see that its best attribute is its&quot;, 85, &quot;.&quot;, 5)
fnGetResString (&quot;AppraisalMysticBest&quot;))
mItems = Array ( _
fnGetResString (&quot;AppraisalMysticMax15&quot;), _
@ -314,7 +314,7 @@ Sub subRdoTeamInstinctItemChanged (oEvent As object)
&apos; Updates the text of the best stat appraisal.
subUpdateBestStatAppraisal (oDialog, _
&quot;Its best quality is&quot;, 45, &quot;.&quot;, 5)
fnGetResString (&quot;AppraisalInstinctBest&quot;))
mItems = Array ( _
fnGetResString (&quot;AppraisalInstinctMax15&quot;), _
@ -328,12 +328,26 @@ Sub subRdoTeamInstinctItemChanged (oEvent As object)
End Sub
&apos; subUpdateBestStatAppraisal: Updates the text of the best stat appraisal.
Sub subUpdateBestStatAppraisal (oDialog As Object, _
sBefore As String, nBeforeWidth As Integer, _
sAfter As String, nAfterWidth As Integer)
Sub subUpdateBestStatAppraisal (oDialog As Object, sAppraisal)
Dim oText As Object, oList As Object, nX As Integer
Dim sBefore As String, nBeforeWidth As Integer
Dim sAfter As String, nAfterWidth As Integer
Dim nPos As Integer
Dim mItems () As String
nPos = InStr (sAppraisal, &quot;[Stat]&quot;)
sBefore = Left (sAppraisal, nPos - 1)
If Right (sBefore, 1) &lt;&gt; &quot; &quot; Then
sBefore = sBefore &amp; &quot; &quot;
End If
nBeforeWidth = CInt (Len (sBefore) * 2.3)
sAfter = Right (sAppraisal, _
Len (sAppraisal) - nPos - Len (&quot;[Stat]&quot;) + 1)
If Left (sAfter, 1) &lt;&gt; &quot; &quot; Then
sAfter = &quot; &quot; &amp; sAfter
End If
nAfterWidth = CInt (Len (sAfter) * 2.3)
oText = oDialog.getControl (&quot;txtBestBefore&quot;)
oText.getModel.setPropertyValue (&quot;Width&quot;, nBeforeWidth)
oText.setVisible (True)