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

{{ weapon.name }}

{% if weapon.weaponType %}{{ weapon.weaponType.name }}{% endif %} {% if weapon.elementModifier %}{{ weapon.elementModifier.name }}{% endif %} {{ rarity_stars(weapon.rarity, weapon.gameId) }}
{% if weapon.description %}

{{ weapon.description }}

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