{{!log 'chat-message' this}}
<div class="{{cssClass}}">
  <div class="intro-chat">
    <div class="intro-img">
      <img src="{{actingCharImg}}" data-tooltip="{{actingCharName}}" />
    </div>
    <div class="intro-right">
      <ul>
        {{#if (eq rollType "char")}}
        <li><strong>{{localize "CTHULHUETERNAL.Label.charRoll"}}</strong></li>
        {{/if}}

        {{#if (eq rollType "skill")}}
        <li><strong>{{localize "CTHULHUETERNAL.Label.skillRoll"}}</strong></li>
        {{/if}}

        {{#if isNudgedRoll}}
        <li><strong>{{localize "CTHULHUETERNAL.Label.nudgedRoll"}} : {{wpCost}} WP spent</strong></li>
        {{/if}}

        {{#if weapon}}
        <li><strong>Weapon : {{weapon.name}}</strong></li>
        {{/if}}
        
        {{#if (eq rollType "resource")}}
        <li><strong>{{rollItem.name}} : {{initialScore}}</strong></li>
        {{else}}
        <li><strong>{{rollItem.name}} : {{initialScore}}%</strong></li>
        {{/if}}

        {{#if isZeroWP}}
        <li class="red-warning">Zero WP : Automatic failure (ie 0%)</li>
        {{else}}
        {{#if isLowWP}}
        <li class="orange-warning">Low WP : -20%</li>
        {{/if}}
        {{/if}}

        {{#if isExhausted}}
        <li class="orange-warning">Exhausted : -20%</li>
        {{/if}}

        {{#if  (eq rollType "resource")}}
        <li>{{localize "CTHULHUETERNAL.Label.multiplier"}} : {{multiplier}}</li>
        {{else}}
        <li>{{localize "CTHULHUETERNAL.Label.modifier"}} : {{modifier}}%</li>
        {{/if}}
  
        <li>{{localize "CTHULHUETERNAL.Label.targetScore"}} : {{targetScore}}%</li>
        {{#if isSuccess}}
        {{#if isCritical}}
        <li class="result-critical-success">{{localize "CTHULHUETERNAL.Label.criticalSuccess"}}</li>
        {{else}}
        <li class="result-success">
          {{localize "CTHULHUETERNAL.Label.success"}}
          {{#if isNudge}}
            <a class="nudge-roll"><i class="fa-solid fa-circle-sort-down"></i></a>
          {{/if}}
        </li>
        {{/if}}
        {{/if}}
        {{#if isFailure}}
        {{#if isCritical}}
        <li class="result-critical-failure">{{localize "CTHULHUETERNAL.Label.criticalFailure"}}</li>
        {{else}}
        <li class="result-failure">
          {{localize "CTHULHUETERNAL.Label.failure"}}
          {{#if isNudge}}
            <a class="nudge-roll"><i class="fa-solid fa-circle-sort-down"></i></a>
          {{/if}}
        </li>
        {{/if}}
        {{/if}}
      </ul>
    </div>
  </div>
  {{#if isDamage}}
  <div>
    {{#if (and isGM hasTarget)}}
    {{{localize "CTHULHUETERNAL.Roll.displayArmor" targetName=targetName targetArmor=targetArmor
    realDamage=realDamage}}}
    {{/if}}
  </div>
  {{/if}}
  {{#unless isPrivate}}
  <div class="dice-result">
    <h4 class="dice-total">{{total}}</h4>
    <div class="dice-formula">{{formula}}</div>
    {{{tooltip}}}
  </div>
  {{/unless}}
</div>