mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-18 07:59:03 +01:00
n
This commit is contained in:
parent
6b7912f3f4
commit
d35b9e8eb3
2 changed files with 4 additions and 3 deletions
|
|
@ -113,7 +113,7 @@ export default class DHActorRoll extends foundry.abstract.TypeDataModel {
|
||||||
this.currentTargets = this.getTargetList();
|
this.currentTargets = this.getTargetList();
|
||||||
// this.registerTargetHook();
|
// this.registerTargetHook();
|
||||||
|
|
||||||
if (this.targetMode === true && this.hasRoll) {
|
if (this.hasRoll) {
|
||||||
this.targetShort = this.targets.reduce(
|
this.targetShort = this.targets.reduce(
|
||||||
(a, c) => {
|
(a, c) => {
|
||||||
if (c.hit) a.hit += 1;
|
if (c.hit) a.hit += 1;
|
||||||
|
|
@ -128,6 +128,7 @@ export default class DHActorRoll extends foundry.abstract.TypeDataModel {
|
||||||
|
|
||||||
this.canViewSecret = this.parent.speakerActor?.testUserPermission(game.user, 'OBSERVER');
|
this.canViewSecret = this.parent.speakerActor?.testUserPermission(game.user, 'OBSERVER');
|
||||||
this.canButtonApply = game.user.isGM;
|
this.canButtonApply = game.user.isGM;
|
||||||
|
this.isGM = game.user.isGM;
|
||||||
}
|
}
|
||||||
|
|
||||||
getTargetList() {
|
getTargetList() {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<div class="roll-part target-section dice-roll" data-action="expandRoll">
|
<div class="roll-part target-section dice-roll" data-action="expandRoll">
|
||||||
<div class="roll-part-header"><div><span>{{pluralize currentTargets.length "DAGGERHEART.GENERAL.Target"}}</span></div></div>
|
<div class="roll-part-header"><div><span>{{pluralize currentTargets.length "DAGGERHEART.GENERAL.Target"}}</span></div></div>
|
||||||
{{#if (or (and targets.length (or (gt targetShort.hit 0) (gt targetShort.miss 0))) (and hasSave pendingSaves))}}
|
{{#if isGM}}
|
||||||
<div class="roll-part-extra on-reduced">
|
<div class="roll-part-extra on-reduced">
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
{{#if (or (gt targetShort.hit 0) (gt targetShort.miss 0))}}
|
{{#if (or (gt targetShort.hit 0) (gt targetShort.miss 0))}}
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
<img class="target-img" src="{{img}}">
|
<img class="target-img" src="{{img}}">
|
||||||
<div class="target-data">
|
<div class="target-data">
|
||||||
<div class="target-name" data-perm-id="{{actorId}}"><span>{{name}}</span></div>
|
<div class="target-name" data-perm-id="{{actorId}}"><span>{{name}}</span></div>
|
||||||
{{#if (and ../targetMode ../hasRoll)}}
|
{{#if (and ../hasRoll (hasProperty this "hit"))}}
|
||||||
<div class="target-hit-status {{#if hit}}is-hit{{else}}is-miss{{/if}}">
|
<div class="target-hit-status {{#if hit}}is-hit{{else}}is-miss{{/if}}">
|
||||||
{{#if hit}}
|
{{#if hit}}
|
||||||
{{localize "DAGGERHEART.GENERAL.hit.single"}}
|
{{localize "DAGGERHEART.GENERAL.hit.single"}}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue