From 8fba61b5b6a4b45f750215b4e7dbfaa10aa4539a Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Tue, 19 Feb 2019 00:29:20 +0100 Subject: [PATCH] avg? --- utils/cast.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/utils/cast.py b/utils/cast.py index ea52b062..7cb7d2a7 100644 --- a/utils/cast.py +++ b/utils/cast.py @@ -50,6 +50,10 @@ class DamageComponent: self.damage_types_qty = random.sample(self.damage_types_distribution, 1)[0] self.damage_types = random.sample(self.all_damage_types, self.damage_types_qty) + @property + def avg(self): + return self.dice_number * (self.dice_type + 1) / 2 + def stringify(self) -> str: string = "" if self.constant > 0: