Fixed Pomeg Berry glitch

This commit is contained in:
Maruno17
2021-10-03 23:13:29 +01:00
parent 1f9ba94432
commit 3cc6a1201f

View File

@@ -1071,9 +1071,9 @@ class Pokemon
stats[s.id] = calcStat(base_stats[s.id], this_level, this_IV[s.id], @ev[s.id], nature_mod[s.id])
end
end
hpDiff = @totalhp - @hp
hp_difference = stats[:HP] - @totalhp
@totalhp = stats[:HP]
@hp = @totalhp - hpDiff
self.hp = [@hp + hp_difference, 1].max if @hp > 0 || hp_difference > 0
@attack = stats[:ATTACK]
@defense = stats[:DEFENSE]
@spatk = stats[:SPECIAL_ATTACK]