2022-10-30 10:12:49 +01:00
{% extends "common/base.html" %}
2022-11-02 22:02:48 +01:00
{% load static %}
2022-10-31 23:23:28 +01:00
{% load django_bootstrap5 %}
2022-10-30 17:41:33 +01:00
{% load character_extras %}
2022-10-30 10:12:49 +01:00
{% block title %}{{ character.name }}{% endblock %}
{% block content %}
2022-10-30 10:43:50 +01:00
< h1 > {{ character.name }}< / h1 >
2022-11-06 15:44:55 +01:00
< p >
Joueur : {{ character.player.get_full_name|default:character.player.username }}
< / p >
{% if party %}
< p >
2022-11-22 13:27:56 +01:00
Groupe : < a href = "{{ party.get_absolute_url }}" > {{ party }}< / a >
•
Joueurs : {% for other in party.characters.all %}< a href = "{% url " character:view " pk = other.pk % } ? party = {{ party . pk } } " > {{ other }}< / a > {% if not forloop.last %}, {% endif %}{% endfor %}
2022-11-06 15:44:55 +01:00
< / p >
{% endif %}
2022-11-06 15:06:29 +01:00
{% if character|managed_by:user %}
< p >
2022-11-19 10:00:48 +01:00
< a href = "{% url " character:change " pk = character.pk % } " > Modifier< / a >
•
< a href = "{% url " character:reset_stats " pk = character.pk % } " id = "reset-stats" > Réinitialiser les stats< / a >
2022-11-06 15:06:29 +01:00
< / p >
{% endif %}
2022-10-30 10:54:28 +01:00
< p >
{{ character.race.name }} {{ character.profile.name }} niv. {{ character.level }}< br >
2022-11-02 13:12:47 +01:00
{{ character.get_gender_display }}, {{ character.age }} ans, {{ character.height_m }}m, {{ character.weight }}kg (IMC: {{ character.imc|floatformat }})
2022-10-30 10:54:28 +01:00
< / p >
2022-11-02 22:52:36 +01:00
{% include "character/snippets/character_details/states.html" %}
2022-10-30 15:50:53 +01:00
< div class = "row" >
2022-10-31 01:02:16 +01:00
< div class = "col-sm-12 col-md-6 col-lg-6 col-xl" >
2022-10-30 23:33:28 +01:00
< table id = "fight-table" class = "table table-hover table-sm" >
2022-10-30 15:50:53 +01:00
< thead >
2022-11-02 20:46:07 +01:00
< tr > < th scope = "col" colspan = "2" > Attaque< / th > < / tr >
2022-10-30 15:50:53 +01:00
< / thead >
< tbody class = "table-group-divider" >
< tr >
2022-11-02 13:03:20 +01:00
< th scope = "row" >
Initiative divers
2022-11-06 15:06:29 +01:00
{% if character|managed_by:user %}
< div class = "btn-group btn-group-sm float-end" role = "group" >
< button
hx-get="{% url "character:initiative_misc_change" pk=character.pk %}?value=ko"
hx-target="#initiative-misc"
hx-swap="innerHTML"
type="button"
class="btn btn-outline-danger">< i class = "fa-solid fa-battery-empty" > < / i > < / button >
< button
hx-get="{% url "character:initiative_misc_change" pk=character.pk %}?value=-1"
hx-target="#initiative-misc"
hx-swap="innerHTML"
type="button"
class="btn btn-danger">< i class = "fa-solid fa-minus" > < / i > < / button >
< button
hx-get="{% url "character:initiative_misc_change" pk=character.pk %}?value=1"
hx-target="#initiative-misc"
hx-swap="innerHTML"
type="button"
class="btn btn-success">< i class = "fa-solid fa-plus" > < / i > < / button >
< button
type="button"
disabled
class="btn btn-outline-secondary">< i class = "fa-solid fa-battery-full" > < / i > < / button >
< / div >
{% endif %}
2022-11-02 13:03:20 +01:00
< / th >
< td id = "initiative-misc" >
{{ character.initiative_misc }}
< / td >
< / tr >
< tr >
< th scope = "row" > Mod. initiative< / th >
2022-10-30 18:13:03 +01:00
< td data-bs-toggle = "tooltip"
2022-10-30 22:35:06 +01:00
data-bs-placement="left"
2022-11-02 13:03:20 +01:00
data-bs-title="{{ character.modifier_dexterity }} (mod. DEX) + {{ character.initiative_misc }} (divers)"
2022-11-06 15:06:29 +01:00
{% if character|managed_by:user %}
hx-get="{% url "character:get_initiative" pk=character.pk %}"
hx-trigger="update_initiative from:#fight-table"
{% endif %}>
2022-11-02 19:50:56 +01:00
{{ character.modifier_initiative|modifier }}
2022-10-30 18:13:03 +01:00
< / td >
2022-10-30 15:50:53 +01:00
< / tr >
< tr >
< th scope = "row" > Att. contact< / th >
2022-10-30 18:13:03 +01:00
< td data-bs-toggle = "tooltip"
2022-10-30 22:35:06 +01:00
data-bs-placement="left"
2022-10-30 18:13:03 +01:00
data-bs-title="{{ character.level }} (niveau) + {{ character.modifier_strength }} (mod. FOR)">
{{ character.attack_melee|modifier }}
< / td >
2022-10-30 15:50:53 +01:00
< / tr >
< tr >
< th scope = "row" > Att. distance< / th >
2022-10-30 18:13:03 +01:00
< td data-bs-toggle = "tooltip"
2022-10-30 22:35:06 +01:00
data-bs-placement="left"
2022-10-30 18:13:03 +01:00
data-bs-title="{{ character.level }} (niveau) + {{ character.modifier_dexterity }} (mod. DEX)">
{{ character.attack_range|modifier }}
< / td >
2022-10-30 15:50:53 +01:00
< / tr >
< tr >
< th scope = "row" > Att. magique< / th >
2022-10-30 18:13:03 +01:00
< td data-bs-toggle = "tooltip"
2022-10-30 22:35:06 +01:00
data-bs-placement="left"
2022-10-30 18:13:03 +01:00
data-bs-title="{{ character.level }} (niveau) + {{ character.attack_magic|sub:character.level }} (mod. {{ character.profile.magical_strength }})">
{{ character.attack_magic|modifier }}
< / td >
2022-10-30 15:50:53 +01:00
< / tr >
2022-11-02 20:46:07 +01:00
< / tbody >
< / table >
< / div >
< div class = "col-sm-12 col-md-6 col-lg-6 col-xl" >
< table id = "fight-table" class = "table table-hover table-sm" >
< thead >
< tr > < th scope = "col" colspan = "2" > Protection< / th > < / tr >
< / thead >
< tbody class = "table-group-divider" >
< tr >
< th scope = "row" >
Armure
2022-11-06 15:06:29 +01:00
{% if character|managed_by:user %}
< div class = "btn-group btn-group-sm float-end" role = "group" >
< button
hx-get="{% url "character:armor_change" pk=character.pk %}?value=ko"
hx-target="#armor"
hx-swap="innerHTML"
type="button"
class="btn btn-outline-danger">< i class = "fa-solid fa-battery-empty" > < / i > < / button >
< button
hx-get="{% url "character:armor_change" pk=character.pk %}?value=-1"
hx-target="#armor"
hx-swap="innerHTML"
type="button"
class="btn btn-danger">< i class = "fa-solid fa-minus" > < / i > < / button >
< button
hx-get="{% url "character:armor_change" pk=character.pk %}?value=1"
hx-target="#armor"
hx-swap="innerHTML"
type="button"
class="btn btn-success">< i class = "fa-solid fa-plus" > < / i > < / button >
< button
type="button"
disabled
class="btn btn-outline-secondary">< i class = "fa-solid fa-battery-full" > < / i > < / button >
< / div >
{% endif %}
2022-11-02 20:46:07 +01:00
< / th >
< td id = "armor" >
{{ character.armor }}
< / td >
< / tr >
2022-11-02 13:06:21 +01:00
< tr >
< th scope = "row" >
Bouclier
2022-11-06 15:06:29 +01:00
{% if character|managed_by:user %}
< div class = "btn-group btn-group-sm float-end" role = "group" >
< button
hx-get="{% url "character:shield_change" pk=character.pk %}?value=ko"
hx-target="#shield"
hx-swap="innerHTML"
type="button"
class="btn btn-outline-danger">< i class = "fa-solid fa-battery-empty" > < / i > < / button >
< button
hx-get="{% url "character:shield_change" pk=character.pk %}?value=-1"
hx-target="#shield"
hx-swap="innerHTML"
type="button"
class="btn btn-danger">< i class = "fa-solid fa-minus" > < / i > < / button >
< button
hx-get="{% url "character:shield_change" pk=character.pk %}?value=1"
hx-target="#shield"
hx-swap="innerHTML"
type="button"
class="btn btn-success">< i class = "fa-solid fa-plus" > < / i > < / button >
< button
type="button"
disabled
class="btn btn-outline-secondary">< i class = "fa-solid fa-battery-full" > < / i > < / button >
< / div >
{% endif %}
2022-11-02 13:06:21 +01:00
< / th >
< td id = "shield" >
{{ character.shield }}
< / td >
< / tr >
2022-10-30 23:33:28 +01:00
< tr >
< th scope = "row" >
Divers défense
2022-11-06 15:06:29 +01:00
{% if character|managed_by:user %}
< div class = "btn-group btn-group-sm float-end" role = "group" >
< button
hx-get="{% url "character:defense_misc_change" pk=character.pk %}?value=ko"
hx-target="#defense-misc"
hx-swap="innerHTML"
type="button"
class="btn btn-outline-danger">< i class = "fa-solid fa-battery-empty" > < / i > < / button >
< button
hx-get="{% url "character:defense_misc_change" pk=character.pk %}?value=-1"
hx-target="#defense-misc"
hx-swap="innerHTML"
type="button"
class="btn btn-danger">< i class = "fa-solid fa-minus" > < / i > < / button >
< button
hx-get="{% url "character:defense_misc_change" pk=character.pk %}?value=1"
hx-target="#defense-misc"
hx-swap="innerHTML"
type="button"
class="btn btn-success">< i class = "fa-solid fa-plus" > < / i > < / button >
< button
type="button"
disabled
class="btn btn-outline-secondary">< i class = "fa-solid fa-battery-full" > < / i > < / button >
< / div >
{% endif %}
2022-10-30 23:33:28 +01:00
< / th >
< td id = "defense-misc" >
{{ character.defense_misc }}
< / td >
< / tr >
2022-10-30 15:50:53 +01:00
< tr >
< th scope = "row" > Défense< / th >
2022-10-30 18:13:03 +01:00
< td data-bs-toggle = "tooltip"
2022-10-30 22:35:06 +01:00
data-bs-placement="left"
2022-11-02 20:46:07 +01:00
data-bs-title="10 + armure + bouclier + mod. DEX + divers"
2022-11-06 15:06:29 +01:00
{% if character|managed_by:user %}
hx-get="{% url "character:get_defense" pk=character.pk %}"
hx-trigger="update_defense from:#fight-table"
{% endif %}>
2022-10-30 18:13:03 +01:00
{{ character.defense }}
< / td >
2022-10-30 15:50:53 +01:00
< / tr >
< / tbody >
< / table >
< / div >
2022-11-02 20:51:23 +01:00
< div class = "col-sm-12 col-md-8 col-lg-6 col-xl" >
2022-10-30 15:50:53 +01:00
< table class = "table table-hover table-sm" >
< thead >
< tr > < th scope = "col" colspan = "2" > Énergie< / th > < / tr >
< / thead >
< tbody class = "table-group-divider" >
< tr >
2022-10-30 17:37:09 +01:00
< th scope = "row" >
2022-10-30 23:11:59 +01:00
Points de vie
2022-11-06 15:06:29 +01:00
{% if character|managed_by:user %}
< div class = "btn-group btn-group-sm float-end" role = "group" >
< button
hx-get="{% url "character:health_change" pk=character.pk %}?value=ko"
hx-target="#health-remaining"
hx-swap="innerHTML"
type="button"
class="btn btn-outline-danger">< i class = "fa-solid fa-battery-empty" > < / i > < / button >
< button
hx-get="{% url "character:health_change" pk=character.pk %}?value=-1"
hx-target="#health-remaining"
hx-swap="innerHTML"
type="button"
class="btn btn-danger">< i class = "fa-solid fa-minus" > < / i > < / button >
< button
hx-get="{% url "character:health_change" pk=character.pk %}?value=1"
hx-target="#health-remaining"
hx-swap="innerHTML"
type="button"
class="btn btn-success">< i class = "fa-solid fa-plus" > < / i > < / button >
< button
hx-get="{% url "character:health_change" pk=character.pk %}?value=max"
hx-target="#health-remaining"
hx-swap="innerHTML"
type="button"
class="btn btn-outline-success">< i class = "fa-solid fa-battery-full" > < / i > < / button >
< / div >
{% endif %}
2022-10-30 17:37:09 +01:00
< / th >
2022-10-30 22:35:06 +01:00
< td > < span id = "health-remaining" > {{ character.health_remaining }}< / span > / {{ character.health_max }}< / td >
2022-10-30 15:50:53 +01:00
< / tr >
< tr >
2022-11-06 16:22:54 +01:00
< td colspan = "2" >
{% include "character/snippets/character_details/health_bar.html" %}
2022-10-30 22:35:06 +01:00
< / td >
2022-10-30 23:11:59 +01:00
< / tr >
2022-11-06 16:22:54 +01:00
{% if character.mana_max > 0 %}
< tr >
< th scope = "row" >
Points de mana
{% if character|managed_by:user %}
< div class = "btn-group btn-group-sm float-end" role = "group" >
< button
hx-get="{% url "character:mana_change" pk=character.pk %}?value=ko"
hx-target="#mana-remaining"
hx-swap="innerHTML"
type="button"
class="btn btn-outline-danger">< i class = "fa-solid fa-battery-empty" > < / i > < / button >
< button
hx-get="{% url "character:mana_change" pk=character.pk %}?value=-1"
hx-target="#mana-remaining"
hx-swap="innerHTML"
type="button"
class="btn btn-danger">< i class = "fa-solid fa-minus" > < / i > < / button >
< button
hx-get="{% url "character:mana_change" pk=character.pk %}?value=1"
hx-target="#mana-remaining"
hx-swap="innerHTML"
type="button"
class="btn btn-success">< i class = "fa-solid fa-plus" > < / i > < / button >
< button
hx-get="{% url "character:mana_change" pk=character.pk %}?value=max"
hx-target="#mana-remaining"
hx-swap="innerHTML"
type="button"
class="btn btn-outline-success">< i class = "fa-solid fa-battery-full" > < / i > < / button >
< / div >
{% endif %}
< / th >
< td data-bs-toggle = "tooltip"
data-bs-placement="left"
{% if character.profile.mana_max_compute == 1 %}
data-bs-title="{{ character.level }} (niveau) + {{ character.modifier_magic }} (mod. {{ character.profile.magical_strength }})"
{% elif character.profile.mana_max_compute == 2 %}
data-bs-title="2 x {{ character.level }} (niveau) + {{ character.modifier_magic }} (mod. {{ character.profile.magical_strength }})"
{% endif %}
>
< span id = "mana-remaining" > {{ character.mana_remaining }}< / span > / {{ character.mana_max }}
< / td >
< / tr >
< tr >
< td colspan = "2" >
{% include "character/snippets/character_details/mana_bar.html" %}
< / td >
< / tr >
{% endif %}
2022-10-30 23:11:59 +01:00
< tr >
< th scope = "row" >
Points de récup.
2022-11-06 15:06:29 +01:00
{% if character|managed_by:user %}
< div class = "btn-group btn-group-sm float-end" role = "group" >
< button
type="button"
disabled
class="btn btn-outline-secondary">< i class = "fa-solid fa-battery-empty" > < / i > < / button >
< button
hx-get="{% url "character:recovery_points_change" pk=character.pk %}?value=-1"
hx-target="#recovery-points-remaining"
hx-swap="innerHTML"
type="button"
class="btn btn-danger">< i class = "fa-solid fa-minus" > < / i > < / button >
< button
hx-get="{% url "character:recovery_points_change" pk=character.pk %}?value=1"
hx-target="#recovery-points-remaining"
hx-swap="innerHTML"
type="button"
class="btn btn-success">< i class = "fa-solid fa-plus" > < / i > < / button >
< button
type="button"
disabled
class="btn btn-outline-secondary">< i class = "fa-solid fa-battery-full" > < / i > < / button >
< / div >
{% endif %}
2022-10-30 23:11:59 +01:00
< / th >
< td >
< span id = "recovery-points-remaining" > {{ character.recovery_points_remaining }}< / span > / {{ character.recovery_points_max }}< / td >
< / tr >
< tr >
< th scope = "row" >
Points de chance
2022-11-06 15:06:29 +01:00
{% if character|managed_by:user %}
< div class = "btn-group btn-group-sm float-end" role = "group" >
< button
type="button"
disabled
class="btn btn-outline-secondary">< i class = "fa-solid fa-battery-empty" > < / i > < / button >
< button
hx-get="{% url "character:luck_points_change" pk=character.pk %}?value=-1"
hx-target="#luck-points-remaining"
hx-swap="innerHTML"
type="button"
class="btn btn-danger">< i class = "fa-solid fa-minus" > < / i > < / button >
< button
hx-get="{% url "character:luck_points_change" pk=character.pk %}?value=1"
hx-target="#luck-points-remaining"
hx-swap="innerHTML"
type="button"
class="btn btn-success">< i class = "fa-solid fa-plus" > < / i > < / button >
< button
hx-get="{% url "character:luck_points_change" pk=character.pk %}?value=max"
hx-target="#luck-points-remaining"
hx-swap="innerHTML"
type="button"
class="btn btn-outline-success">< i class = "fa-solid fa-battery-full" > < / i > < / button >
< / div >
{% endif %}
2022-10-30 23:11:59 +01:00
< / th >
< td data-bs-toggle = "tooltip"
data-bs-placement="left"
data-bs-title="[1 dé de vie + {{ character.modifier_constitution|add:character.level }}] PV">
< span id = "luck-points-remaining" > {{ character.luck_points_remaining }}< / span > / {{ character.luck_points_max }}
< / td >
< / tr >
< / tbody >
< / table >
< / div >
< / div >
< div class = "row" >
2022-11-02 20:51:23 +01:00
< div class = "col-md-4" >
< table class = "table table-hover table-sm" >
< thead >
< tr >
< th scope = "col" > Carac< / th >
< th scope = "col" > Valeur< / th >
< th scope = "col" > Mod.< / th >
< / tr >
< / thead >
< tbody class = "table-group-divider" >
< tr >
< th scope = "row" > FOR< / th >
< td > {{ character.value_strength }}< / td >
< td > {{ character.modifier_strength|modifier }}< / td >
< / tr >
< tr >
< th scope = "row" > DEX< / th >
< td > {{ character.value_dexterity }}< / td >
< td > {{ character.modifier_dexterity|modifier }}< / td >
< / tr >
< tr >
< th scope = "row" > CON< / th >
< td > {{ character.value_constitution }}< / td >
< td > {{ character.modifier_constitution|modifier }}< / td >
< / tr >
< tr >
< th scope = "row" > INT< / th >
< td > {{ character.value_intelligence }}< / td >
< td > {{ character.modifier_intelligence|modifier }}< / td >
< / tr >
< tr >
< th scope = "row" > SAG< / th >
< td > {{ character.value_wisdom }}< / td >
< td > {{ character.modifier_wisdom|modifier }}< / td >
< / tr >
< tr >
< th scope = "row" > CHA< / th >
< td > {{ character.value_charisma }}< / td >
< td > {{ character.modifier_charisma|modifier }}< / td >
< / tr >
< / tbody >
< / table >
< / div >
< div class = "col-md-8" >
2022-10-30 23:11:59 +01:00
< table class = "table table-hover table-sm" >
< thead >
< tr >
< th scope = "col" > Arme< / th >
< th scope = "col" > Attaque< / th >
< th scope = "col" > DM< / th >
< th scope = "col" > Spécial< / th >
< / tr >
< / thead >
< tbody class = "table-group-divider" >
{% for weapon in character.weapons.all %}
< tr >
< th scope = "row" > {{ weapon.name }}< / th >
2022-10-31 00:20:55 +01:00
< td >
1D20
{{ character|weapon_modifier:weapon }}
< / td >
2022-10-30 23:11:59 +01:00
< td > {{ weapon.damage }}< / td >
< td > {{ weapon.special }}< / td >
< / tr >
{% empty %}
< tr >
< td colspan = "4" > Aucune arme< / td >
< / tr >
{% endfor %}
< / tbody >
< / table >
< / div >
2022-10-30 23:14:27 +01:00
< / div >
< div class = "row" >
2022-10-30 23:44:02 +01:00
< div class = "col-md-6 col-lg-4 mb-3" >
2022-10-30 23:14:27 +01:00
< div class = "card" >
< h5 class = "card-header" > {{ character.racial_capability.name }}< / h5 >
< div class = "card-body" >
< p class = "card-text" > {{ character.racial_capability.description|capfirst }}< / p >
< / div >
< / div >
< / div >
2022-10-30 23:44:02 +01:00
< div class = "col-md-6 col-lg-4 mb-3" >
2022-11-02 22:52:36 +01:00
{% include "character/snippets/character_details/damage_reduction_display.html" %}
2022-10-30 23:14:27 +01:00
< / div >
2022-10-30 23:44:02 +01:00
< div class = "col-md-12 col-lg-4 mb-3" >
2022-11-02 22:52:36 +01:00
{% include "character/snippets/character_details/equipment_display.html" %}
2022-10-30 23:11:59 +01:00
< / div >
< / div >
2022-11-02 22:52:36 +01:00
{% include "character/snippets/character_details/paths_and_capabilities.html" %}
2022-11-06 15:36:53 +01:00
{% if character|managed_by:user %}
{% include "character/snippets/character_details/notes_display.html" %}
{% endif %}
2022-10-30 10:12:49 +01:00
{% endblock %}