{% extends 'entity/layout.html.twig' %} {% set entityName = enemy.name %} {% block stylesheets %} {{ parent() }} {% include 'entity/_element_weakness_styles.html.twig' %} {% endblock %} {% block body %}
Ennemis / {{ enemy.name }}
{% if enemy.appearance %} {{ enemy.name }} {% else %}
☠
{% endif %}

{{ enemy.name }} {% include 'entity/_favorite_star.html.twig' with {favType: 'enemy', favEntityId: enemy.id} only %}

{% if enemy.isSuperboss or enemy.isBoss %}
{% if enemy.isSuperboss %}Superboss{% endif %} {% if enemy.isBoss and not enemy.isSuperboss %}Boss{% endif %}
{% endif %} {% if enemy.xpGainBase is not null or enemy.moneyGain is not null %}
{% if enemy.xpGainBase is not null %} XP : {{ enemy.xpGainBase }} {% endif %} {% if enemy.moneyGain is not null %} {{ ('currency.name.' ~ enemy.gameId)|trans({}, 'game') }} : {{ enemy.moneyGain }} {% endif %}
{% endif %}
{% if enemy.description %}

{{ enemy.description }}

{% endif %} {# ── Base stats ── #} {% with {s: enemy.stats} %} {% if s.pvMax or s.egMax or s.attaque or s.defense or s.arcane or s.sagesse or s.vitesse or s.finesse %}
Stats de base
PV {{ s.pvMax != 0 ? s.pvMax : '—' }}
EG {{ s.egMax != 0 ? s.egMax : '—' }}
ATQ{{ s.attaque != 0 ? s.attaque : '—' }}
DEF{{ s.defense != 0 ? s.defense : '—' }}
ARC{{ s.arcane != 0 ? s.arcane : '—' }}
SAG{{ s.sagesse != 0 ? s.sagesse : '—' }}
VIT{{ s.vitesse != 0 ? s.vitesse : '—' }}
FIN{{ s.finesse != 0 ? s.finesse : '—' }}
{% endif %} {% endwith %} {# ── Weaknesses & Resistances (calculées via elementalTypes × element_relation) ── #} {% if (weaknesses|length + resistances|length) > 0 %}
Résistances et faiblesses
{% if weaknesses|length > 0 %}
Faiblesses
    {% for atkId, mult in weaknesses %} {% set e = elementMap[atkId] ?? null %}
  • {% if e and e.iconUrl %} {% elseif e and e.color %} {% endif %} {{ e.name ?? '?' }} × {{ mult }}
  • {% endfor %}
{% endif %} {% if resistances|length > 0 %}
Résistances
    {% for atkId, mult in resistances %} {% set e = elementMap[atkId] ?? null %}
  • {% if e and e.iconUrl %} {% elseif e and e.color %} {% endif %} {{ e.name ?? '?' }} × {{ mult == 0 ? '0 (immunité)' : mult }}
  • {% endfor %}
{% endif %}
{% endif %} {# ── Elemental resistances (overrides explicites depuis la DB) ── #} {% if enemy.elementalResistance %}
Résistances exceptionnelles
{% for entry in enemy.elementalResistance %} {% set res = ((entry.multiplier - 1) * 100)|round %}
{{ elementMap[entry.element_id].name ?? '?' }} : {{ res > 0 ? '+' }}{{ res }}%
{% endfor %}
{% endif %} {# ── Status immunities ── #} {% if enemy.statusImmunity %}
Immunités aux statuts
{% for statusId in enemy.statusImmunity %} {{ statusMap[statusId] ?? '?' }} {% endfor %}
{% endif %} {# ── Combat characteristics ── #} {% set hasCombat = enemy.accuracy is not null or enemy.evasion is not null or enemy.criticalRate is not null or enemy.criticalEvasion is not null or enemy.magicEvasion is not null or enemy.physicalCounter is not null or enemy.magicalCounter is not null or enemy.regenPv is not null or enemy.regenEg is not null or enemy.regenPower is not null or enemy.physicalTaken is not null or enemy.magicalTaken is not null %} {% if hasCombat %}
Statistiques de combat
{% if enemy.accuracy is not null %}Précision :{{ enemy.accuracy }}%{% endif %} {% if enemy.evasion is not null %}Esquive :{{ enemy.evasion }}%{% endif %} {% if enemy.criticalRate is not null %}Critique :{{ enemy.criticalRate }}%{% endif %} {% if enemy.criticalEvasion is not null %}Anti-critique :{{ enemy.criticalEvasion }}%{% endif %} {% if enemy.magicEvasion is not null %}Esquive magique :{{ enemy.magicEvasion }}%{% endif %} {% if enemy.physicalCounter is not null %}Contre physique :{{ enemy.physicalCounter }}%{% endif %} {% if enemy.magicalCounter is not null %}Contre magique :{{ enemy.magicalCounter }}%{% endif %} {% if enemy.regenPv is not null %}Rég. PV :{{ enemy.regenPv > 0 ? '+' }}{{ enemy.regenPv }}%{% endif %} {% if enemy.regenEg is not null %}Rég. EG :{{ enemy.regenEg > 0 ? '+' }}{{ enemy.regenEg }}%{% endif %} {% if enemy.regenPower is not null %}Rég. {{ ('resource.tp.' ~ enemy.gameId)|trans({}, 'game') }} :{{ enemy.regenPower > 0 ? '+' }}{{ enemy.regenPower }}%{% endif %} {% if enemy.physicalTaken is not null %}Dég. phys. reçus :×{{ enemy.physicalTaken }}{% endif %} {% if enemy.magicalTaken is not null %}Dég. mag. reçus :×{{ enemy.magicalTaken }}{% endif %}
{% endif %} {# ── Skills used ── #} {% if enemy.learnSpells %}
Sorts utilisés
{% for skillId in enemy.learnSpells %} {{ skillMap[skillId] ?? '?' }} {% endfor %}
{% endif %} {% if enemy.grantsSkills %}
Compétences accordées
{% for id in enemy.grantsSkills %} {{ skillMap[id] ?? '?' }} {% endfor %}
{% endif %} {# ── Drops ── #} {% if enemy.drops %}
Drops
{% set routeMap = {weapon: 'weapon_show', item: 'item_show', armor: 'armor_show'} %} {% for drop in enemy.drops %} {% set entity = dropMap[drop.type][drop.id] ?? null %} {% endfor %}
ObjetProbabilité
{% if entity %} {{ entity.name }} {% else %} {{ drop.type }} #{{ drop.id }} {% endif %} {{ (drop.probability * 100)|round(1) }}%
{% endif %}
{% endblock %}