From 0bf95af1537f5747f4f337f17c0c5cecb2c23ce6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Fri, 9 Dec 2016 15:30:34 +0800 Subject: [PATCH] Added the minimal HP of 10. --- PokemonGoIV/0Main.vb | 8 +++++++- oxt/PokemonGoIV/0Main.xba | 10 ++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/PokemonGoIV/0Main.vb b/PokemonGoIV/0Main.vb index 2cceb6c..8b143c5 100644 --- a/PokemonGoIV/0Main.vb +++ b/PokemonGoIV/0Main.vb @@ -947,8 +947,14 @@ End Function ' fnCalcHP: Calculates the hit points of the Pokémon 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)) + If nHP < 10 Then + nHP = 10 + End If + fnCalcHP = nHP End Function ' fnGetBaseStats: Returns the base stats of the Pokémon. diff --git a/oxt/PokemonGoIV/0Main.xba b/oxt/PokemonGoIV/0Main.xba index ce6cdfc..d1ccc47 100644 --- a/oxt/PokemonGoIV/0Main.xba +++ b/oxt/PokemonGoIV/0Main.xba @@ -949,8 +949,14 @@ End Function ' fnCalcHP: Calculates the hit points of the Pokémon 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)) + If nHP < 10 Then + nHP = 10 + End If + fnCalcHP = nHP End Function ' fnGetBaseStats: Returns the base stats of the Pokémon. @@ -1060,4 +1066,4 @@ Sub subReadStarDust mStarDust = fnGetStarDustData End If End Sub - + \ No newline at end of file