From 0b2d0e002bc6e1bf03589bbca7baa55833ad9fe0 Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Wed, 2 Nov 2022 12:57:03 +0100 Subject: [PATCH] Fix weapons attack : add level to modifier --- .gitignore | 1 + src/character/models/character.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 5822946..5a55d6e 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,4 @@ test_reports/ dashboard_templates/backup_*.zip .hypothesis +.idea/sonarlint/ diff --git a/src/character/models/character.py b/src/character/models/character.py index de95af0..a805bad 100644 --- a/src/character/models/character.py +++ b/src/character/models/character.py @@ -283,7 +283,7 @@ class Character(models.Model): Weapon.Category.MELEE: self.modifier_strength, Weapon.Category.NONE: 0, } - return modifier_map.get(Weapon.Category(weapon.category), 0) + return modifier_map.get(Weapon.Category(weapon.category), 0) + self.level def get_capabilities_by_path(self) -> dict[Path, list[Capability]]: capabilities_by_path = collections.defaultdict(list)