Added the minimal HP of 10.

This commit is contained in:
依瑪貓 2016-12-09 15:30:34 +08:00
parent 99a8ffd672
commit 0bf95af153
2 changed files with 15 additions and 3 deletions

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.

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.