heart-of-gold

Tactical RPG written in python, using pygame.
Log | Files | Refs | LICENSE

commit ab5d66fb6f889110148f82e8ad3f028da036d4c7
parent 70c0539b7eefdf13b6d13f0fb9e5d1226a32b88a
Author: Erik Letson <hmagellan@hmagellan.com>
Date:   Tue, 24 Nov 2020 18:04:20 -0600

fixed rounding error in critical hit calc

Diffstat:
Msrc/piece.py | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/piece.py b/src/piece.py @@ -497,7 +497,7 @@ class Piece(entity.Entity): raw_dam += round((self.active_stats[bon] + random.randint(0, self.active_stats["LUK"] // 2)) * 0.2) elif raw_dam < 0: raw_dam = 0 - self.attack_target.set_be_damaged_action(raw_dam * ca, notelist) + self.attack_target.set_be_damaged_action(round(raw_dam * ca), notelist) def set_be_damaged_action(self, raw_damage, notations): """