mirror of
https://github.com/Crocmagnon/charasheet.git
synced 2024-11-22 22:48:03 +01:00
Fix character creation
This commit is contained in:
parent
6158002796
commit
c43c33f06f
3 changed files with 2 additions and 2 deletions
|
@ -80,7 +80,6 @@ class CharacterCreateForm(forms.ModelForm):
|
||||||
"armor",
|
"armor",
|
||||||
"shield",
|
"shield",
|
||||||
"defense_misc",
|
"defense_misc",
|
||||||
"initiative_misc",
|
|
||||||
"equipment",
|
"equipment",
|
||||||
"money_pp",
|
"money_pp",
|
||||||
"money_po",
|
"money_po",
|
||||||
|
|
|
@ -318,7 +318,7 @@ class Character(models.Model):
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def luck_points_max(self) -> int:
|
def luck_points_max(self) -> int:
|
||||||
return 3 + self.modifier_charisma
|
return max([3 + self.modifier_charisma, 0])
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def health_remaining_percent(self) -> float:
|
def health_remaining_percent(self) -> float:
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1>Création de personnage</h1>
|
<h1>Création de personnage</h1>
|
||||||
<form action="" method="post">
|
<form action="" method="post">
|
||||||
|
{% bootstrap_form_errors form %}
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<h2>Identité</h2>
|
<h2>Identité</h2>
|
||||||
{% bootstrap_field form.name %}
|
{% bootstrap_field form.name %}
|
||||||
|
|
Loading…
Reference in a new issue