Additional #isSpecies? and #hasItem? refactoring

This commit is contained in:
jonisavo
2020-09-06 20:58:13 +03:00
parent 6252407160
commit 0b1bab3b5c
8 changed files with 13 additions and 17 deletions

View File

@@ -796,7 +796,7 @@ class PokeBattle_Pokemon
if gain>0
gain += 1 if @obtainMap==$game_map.map_id
gain += 1 if self.ballused==pbGetBallType(:LUXURYBALL)
gain = (gain*1.5).floor if isConst?(self.item,PBItems,:SOOTHEBELL)
gain = (gain*1.5).floor if self.hasItem?(:SOOTHEBELL)
end
@happiness += gain
@happiness = [[255,@happiness].min,0].max