From 5596c7bedaa1489e97b219d96eef3158b81ab026 Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Sun, 30 Oct 2022 23:14:27 +0100 Subject: [PATCH] Add RD display --- .../0018_character_damage_reduction.py | 18 ++++++++++++ src/character/migrations/max_migration.txt | 2 +- src/character/models/character.py | 1 + src/character/templates/character/view.html | 28 +++++++++++++------ 4 files changed, 39 insertions(+), 10 deletions(-) create mode 100644 src/character/migrations/0018_character_damage_reduction.py diff --git a/src/character/migrations/0018_character_damage_reduction.py b/src/character/migrations/0018_character_damage_reduction.py new file mode 100644 index 0000000..eeb278c --- /dev/null +++ b/src/character/migrations/0018_character_damage_reduction.py @@ -0,0 +1,18 @@ +# Generated by Django 4.1.2 on 2022-10-30 22:01 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("character", "0017_remove_character_luck_points_max"), + ] + + operations = [ + migrations.AddField( + model_name="character", + name="damage_reduction", + field=models.TextField(blank=True, verbose_name="réduction de dégâts"), + ), + ] diff --git a/src/character/migrations/max_migration.txt b/src/character/migrations/max_migration.txt index 88a85b5..d49abb0 100644 --- a/src/character/migrations/max_migration.txt +++ b/src/character/migrations/max_migration.txt @@ -1 +1 @@ -0017_remove_character_luck_points_max +0018_character_damage_reduction diff --git a/src/character/models/character.py b/src/character/models/character.py index c94e626..edb0e98 100644 --- a/src/character/models/character.py +++ b/src/character/models/character.py @@ -148,6 +148,7 @@ class Character(models.Model): ) notes = models.TextField(blank=True, verbose_name="notes") + damage_reduction = models.TextField(blank=True, verbose_name="réduction de dégâts") objects = CharacterManager() diff --git a/src/character/templates/character/view.html b/src/character/templates/character/view.html index f56f909..54eae64 100644 --- a/src/character/templates/character/view.html +++ b/src/character/templates/character/view.html @@ -255,15 +255,7 @@
-
-
-
{{ character.racial_capability.name }}
-
-

{{ character.racial_capability.description|capfirst }}

-
-
-
-
+
@@ -290,6 +282,24 @@
+
+
+
+
{{ character.racial_capability.name }}
+
+

{{ character.racial_capability.description|capfirst }}

+
+
+
+
+
+
Réduction de dégâts
+
+

{{ character.damage_reduction|linebreaksbr|default:"Rien ici..." }}

+
+
+
+