{% from 'search/_macros.html.twig' import stats, rarity_stars, icon_img, elemental_resistance, currency_pill %} {% for armor in results %}
{{ icon_img(armor) }}

{{ armor.name }}

{% if armor.armorType %}{{ armor.armorType.name }}{% endif %} {{ rarity_stars(armor.rarity, armor.gameId) }}
{% if armor.description %}

{{ armor.description }}

{% endif %} {% if armor.specialEffect %}
Effet spécial : {{ armor.specialEffect }}
{% endif %} {{ stats(armor.stats) }} {% set multMap = { 'PvMax': {label: 'PV Max', value: armor.multiplierPvMax}, 'EgMax': {label: 'EG Max', value: armor.multiplierEgMax}, 'Attaque': {label: 'Attaque', value: armor.multiplierAttaque}, 'Defense': {label: 'Défense', value: armor.multiplierDefense}, 'Arcane': {label: 'Arcane', value: armor.multiplierArcane}, 'Sagesse': {label: 'Sagesse', value: armor.multiplierSagesse}, 'Vitesse': {label: 'Vitesse', value: armor.multiplierVitesse}, 'Finesse': {label: 'Finesse', value: armor.multiplierFinesse}, } %} {% set hasMult = multMap|filter(m => m.value is not null)|length > 0 %} {% if hasMult %}
{% for _, m in multMap %} {% if m.value is not null %} {% set pct = ((m.value - 1) * 100)|round %} {{ m.label }} : {{ pct > 0 ? '+' }}{{ pct }}% {% endif %} {% endfor %}
{% endif %} {% if armor.physicalCounter is not null %}
Chances contre physique : {{ armor.physicalCounter > 0 ? '+' }}{{ armor.physicalCounter }}%
{% endif %} {% if armor.magicalCounter is not null %}
Chances contre magique : {{ armor.magicalCounter > 0 ? '+' }}{{ armor.magicalCounter }}%
{% endif %} {% if armor.criticalRate is not null %}
Taux crit. : {{ armor.criticalRate > 0 ? '+' }}{{ armor.criticalRate }}%
{% endif %} {% if armor.regenPv is not null or armor.regenEg is not null or armor.regenPower is not null or armor.regenRate is not null or armor.healingRate is not null or armor.egCost is not null or armor.powerGains is not null %}
{% if armor.regenPv is not null %}Rég. PV :{{ armor.regenPv > 0 ? '+' }}{{ armor.regenPv }}%{% endif %} {% if armor.regenEg is not null %}Rég. {{ ('resource.eg.' ~ armor.gameId)|trans({}, 'game') }} :{{ armor.regenEg > 0 ? '+' }}{{ armor.regenEg }}%{% endif %} {% if armor.regenPower is not null %}Rég. {{ ('resource.tp.' ~ armor.gameId)|trans({}, 'game') }} :{{ armor.regenPower > 0 ? '+' }}{{ armor.regenPower }}%{% endif %} {% if armor.regenRate is not null %}Taux rég. :×{{ armor.regenRate }}{% endif %} {% if armor.healingRate is not null %}Taux soin :×{{ armor.healingRate }}{% endif %} {% if armor.egCost is not null %}{% set pct = ((armor.egCost - 1) * 100)|round %}Coût {{ ('resource.eg.' ~ armor.gameId)|trans({}, 'game') }} :{{ pct > 0 ? '+' }}{{ pct }}%{% endif %} {% if armor.powerGains is not null %}Gains {{ ('resource.tp.' ~ armor.gameId)|trans({}, 'game') }} :×{{ armor.powerGains }}{% endif %}
{% endif %} {{ elemental_resistance(armor.elementalResistance, elementMap) }} {% if armor.statusImmunity %}
Immunités : {% for id in armor.statusImmunity %}{{ statusMap[id] ?? '?' }}{% if not loop.last %}, {% endif %}{% endfor %}
{% endif %} {% if armor.grantsSkills %}
Compétences : {% for id in armor.grantsSkills %}{{ skillMap[id] ?? '?' }}{% if not loop.last %}, {% endif %}{% endfor %}
{% endif %}
{% endfor %}