Files
macros_foundry/Taverne Ecarlate/macros/aiderPartialSuccess.js
2026-05-12 18:43:59 +02:00

27 lines
1.1 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
const _name = name
const _roll = roll
const _threshold = threshold
const _desc = `Sur une réussite partielle : votre aide est utile. Choisissez 1 option :
Vous offrez un bonus de 10
Vous accélérer laction réalisée
Le MJ donne une surprise bénéfique en cas de réussite`
const couleur = "#EF9F27";
const content = `<div style=\'border-left:4px solid ${_couleur};background:${_couleur}18;border-radius:4px;padding:10px 14px;\'>
<div style=\'font-size:11px;color:#aaa;margin-bottom:4px;text-transform:uppercase;letter-spacing:.05em\'>Réussite partielle — ${_name}</div>
<div style=\'font-size:15px;font-weight:700;color:${_couleur};margin-bottom:8px\'>◈ Réussite partielle</div>
<div style=\'display:flex;gap:16px;font-size:12px;margin-bottom:8px\'>
<span>Seuil : <b>${_threshold}</b></span>
<span>Résultat : <b>${_roll}</b></span>
</div>
<div style=\'font-size:12px;border-top:1px solid ${_couleur}44;padding-top:6px;color:${_couleur}cc\'>${_desc}</div>
</div>`;
ChatMessage.create({
content: content,
speaker: ChatMessage.getSpeaker(),
style:CONST.CHAT_MESSAGE_STYLES.OTHER,
whisper: [],
})