Added the minimal HP of 10.

This commit is contained in:
imacat committed 2016-12-09 15:30:34 +08:00
1 parent 99a8ffd672
commit 0bf95af153
2 files changed
+14 -2

No files matched your search

+7 -1
View File
@@ -947,8 +947,14 @@ End Function
' fnCalcHP: Calculates the hit points of the Pokémon ' fnCalcHP: Calculates the hit points of the Pokémon
Function fnCalcHP (aBaseStats As aStats, fLevel As Double, nStamina As Integer) As Integer Function fnCalcHP (aBaseStats As aStats, fLevel As Double, nStamina As Integer) As Integer
fnCalcHP = fnFloor ((aBaseStats.nStamina + nStamina) _ Dim nHP As Integer
nHP = fnFloor ((aBaseStats.nStamina + nStamina) _
* fnGetCPM (fLevel)) * fnGetCPM (fLevel))
If nHP < 10 Then
nHP = 10
End If
fnCalcHP = nHP
End Function End Function
' fnGetBaseStats: Returns the base stats of the Pokémon. ' fnGetBaseStats: Returns the base stats of the Pokémon.
+7 -1
View File
@@ -949,8 +949,14 @@ End Function
&apos; fnCalcHP: Calculates the hit points of the Pokémon &apos; fnCalcHP: Calculates the hit points of the Pokémon
Function fnCalcHP (aBaseStats As aStats, fLevel As Double, nStamina As Integer) As Integer Function fnCalcHP (aBaseStats As aStats, fLevel As Double, nStamina As Integer) As Integer
fnCalcHP = fnFloor ((aBaseStats.nStamina + nStamina) _ Dim nHP As Integer
nHP = fnFloor ((aBaseStats.nStamina + nStamina) _
* fnGetCPM (fLevel)) * fnGetCPM (fLevel))
If nHP &lt; 10 Then
nHP = 10
End If
fnCalcHP = nHP
End Function End Function
&apos; fnGetBaseStats: Returns the base stats of the Pokémon. &apos; fnGetBaseStats: Returns the base stats of the Pokémon.