Skip to content

Regular dmg button while BlindRoll #254

@bb46003

Description

@bb46003

Hi when rolling damage as blind roll cannot apply redular damage to token becouse value of regular dmg is "?" not a number.

in template damage.hbs

<div class="demonlord" {{#if actor.id}}data-actor-id="{{actor.id}}" {{/if}}
  {{#if item.id}}data-item-id="{{item.id}}" {{/if}} {{#if tokenId}}data-token-id="{{tokenId}}" {{/if}}>
  <div class="showlessinfo">{{data.actorInfo}}</div>
  <header class="card-headersmall tooltip">
    <div class="attackbox">
      <div class="header">{{data.damagetype}} {{localize "DL.DamageRollText"}}: {{data.damageTotal}}</div>
      {{#if data.isCreature}}
        <div class="gmonly">
                    <span class="tooltiptext">
                      {{#each diceData.dice}}
                        <div class="{{#if this.dice}}dice{{else}}modifier{{/if}}">
                            <label style="color:{{this.color}};">
                              {{this.result}}
                            </label>
                          {{#if this.img}}
                            <img src='{{this.img}}'/>
                          {{/if}}
                        </div>
                      {{/each}}
                    </span>
        </div>
      {{else}}
        <span class="tooltiptext">
          {{#each diceData.dice}}
            <div class="{{#if this.dice}}dice{{else}}modifier{{/if}}">
                        <label style="color:{{this.color}};">
                          {{this.result}}
                        </label>
              {{#if this.img}}
                <img src='{{this.img}}'/>
              {{/if}}
                    </div>
          {{/each}}
        </span>
      {{/if}}
    </div>
  </header>
  <div class="gmonly">
    <div class="damageaction apply-damage">
      <div class="header" data-damage="{{data.damageTotal}}">//here if roll is blind data.damageTotal is "?" not a number
        <div class="fas fa-tint blood"></div>
        <div>{{localize "DL.DialogTalentApplyDamage"}} ({{data.damageTotal}})</div>
      </div>
    </div>
    <div class="damageaction apply-damage">
      <div class="header" data-damage="{{data.damageDouble}}">
        <div class="fas fa-tint blood"></div>
        <div>{{localize "DL.DialogTalentApplyDoubleDamage"}} ({{data.damageDouble}})</div>
      </div>
    </div>
    <div class="damageaction apply-damage">
      <div class="header" data-damage="{{data.damageHalf}}">
        <div class="fas fa-tint blood"></div>
        <div>{{localize "DL.DialogTalentApplyHalfDamage"}} ({{data.damageHalf}})</div>
      </div>
    </div>
  </div>
</div>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions