mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-06-06 04:44:16 +02:00
Localize and finish dialog
This commit is contained in:
parent
632e33ecd6
commit
14e30d7b41
8 changed files with 107 additions and 54 deletions
15
lang/en.json
15
lang/en.json
|
|
@ -759,15 +759,20 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"GroupRollSelect": {
|
"GroupRollSelect": {
|
||||||
"title": "Group Roll",
|
"cancelConfirmText": "Are you sure you want to cancel the Group Roll? This will close it for all other players too.",
|
||||||
"aidingCharacters": "Aiding Characters",
|
"cancelConfirmTitle": "Cancel Group Roll",
|
||||||
|
"initializationTitle": "Character Selection",
|
||||||
|
"finishGroupRoll": "Finish Group Roll",
|
||||||
"leader": "Leader",
|
"leader": "Leader",
|
||||||
"leaderRoll": "Leader Roll",
|
"leaderRoll": "Leader Roll",
|
||||||
|
"members": "Members",
|
||||||
"openDialogForAll": "Open Dialog For All",
|
"openDialogForAll": "Open Dialog For All",
|
||||||
|
"removeRoll": "Remove Roll",
|
||||||
|
"resultsHint": "Results will appear when characters roll",
|
||||||
|
"selectLeaderHint": "Select one Character to be the leader",
|
||||||
|
"selectParticipantsHint": "Select one Character to be the leader",
|
||||||
"startGroupRoll": "Start Group Roll",
|
"startGroupRoll": "Start Group Roll",
|
||||||
"finishGroupRoll": "Finish Group Roll",
|
"title": "Group Roll"
|
||||||
"cancelConfirmTitle": "Cancel Group Roll",
|
|
||||||
"cancelConfirmText": "Are you sure you want to cancel the Group Roll? This will close it for all other players too."
|
|
||||||
},
|
},
|
||||||
"TokenConfig": {
|
"TokenConfig": {
|
||||||
"actorSizeUsed": "Actor size is set, determining the dimensions"
|
"actorSizeUsed": "Actor size is set, determining the dimensions"
|
||||||
|
|
|
||||||
|
|
@ -146,12 +146,10 @@ export default class GroupRollDialog extends HandlebarsApplicationMixin(Applicat
|
||||||
const leader = this.party.system.groupRoll.leader;
|
const leader = this.party.system.groupRoll.leader;
|
||||||
partContext.hasRolled =
|
partContext.hasRolled =
|
||||||
leader?.rollData ||
|
leader?.rollData ||
|
||||||
Object.values(this.party.system.groupRoll?.aidingCharacters ?? {}).some(
|
Object.values(this.party.system.groupRoll?.aidingCharacters ?? {}).some(x => x.successful !== null);
|
||||||
x => x.successfull !== null
|
|
||||||
);
|
|
||||||
const { modifierTotal, modifiers } = Object.values(this.party.system.groupRoll.aidingCharacters).reduce(
|
const { modifierTotal, modifiers } = Object.values(this.party.system.groupRoll.aidingCharacters).reduce(
|
||||||
(acc, curr) => {
|
(acc, curr) => {
|
||||||
const modifier = curr.successfull === true ? 1 : curr.successfull === false ? -1 : null;
|
const modifier = curr.successful === true ? 1 : curr.successful === false ? -1 : null;
|
||||||
if (modifier) {
|
if (modifier) {
|
||||||
acc.modifierTotal += modifier;
|
acc.modifierTotal += modifier;
|
||||||
acc.modifiers.push(modifier);
|
acc.modifiers.push(modifier);
|
||||||
|
|
@ -177,7 +175,7 @@ export default class GroupRollDialog extends HandlebarsApplicationMixin(Applicat
|
||||||
case 'footer':
|
case 'footer':
|
||||||
partContext.canFinishRoll =
|
partContext.canFinishRoll =
|
||||||
Boolean(this.party.system.groupRoll.leader?.rollData) &&
|
Boolean(this.party.system.groupRoll.leader?.rollData) &&
|
||||||
Object.values(this.party.system.groupRoll.aidingCharacters).every(x => x.successfull !== null);
|
Object.values(this.party.system.groupRoll.aidingCharacters).every(x => x.successful !== null);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -195,6 +193,10 @@ export default class GroupRollDialog extends HandlebarsApplicationMixin(Applicat
|
||||||
const actor = game.actors.get(data.id);
|
const actor = game.actors.get(data.id);
|
||||||
const isLeader = data === this.party.system.groupRoll.leader;
|
const isLeader = data === this.party.system.groupRoll.leader;
|
||||||
|
|
||||||
|
const roll = data.roll;
|
||||||
|
const withTypeSuffix = !roll ? null : roll.isCritical ? 'criticalShort' : roll.withHope ? 'hope' : 'fear';
|
||||||
|
const thing = withTypeSuffix ? _loc(`DAGGERHEART.GENERAL.${withTypeSuffix}`) : null;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...data,
|
...data,
|
||||||
type: isLeader ? 'leader' : 'aid',
|
type: isLeader ? 'leader' : 'aid',
|
||||||
|
|
@ -205,7 +207,8 @@ export default class GroupRollDialog extends HandlebarsApplicationMixin(Applicat
|
||||||
key: partId,
|
key: partId,
|
||||||
readyToRoll: Boolean(data.rollChoice),
|
readyToRoll: Boolean(data.rollChoice),
|
||||||
hasRolled: Boolean(data.rollData),
|
hasRolled: Boolean(data.rollData),
|
||||||
modifier: data.successfull ? 1 : data.successfull === false ? -1 : 0
|
modifier: data.successful ? 1 : data.successful === false ? -1 : 0,
|
||||||
|
withLabelShort: thing ? _loc('DAGGERHEART.GENERAL.withThing', { thing }) : null
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -298,6 +301,9 @@ export default class GroupRollDialog extends HandlebarsApplicationMixin(Applicat
|
||||||
static #toggleSelectMember(_, button) {
|
static #toggleSelectMember(_, button) {
|
||||||
const member = this.partyMembers.find(x => x.id === button.dataset.id);
|
const member = this.partyMembers.find(x => x.id === button.dataset.id);
|
||||||
member.selected = !member.selected;
|
member.selected = !member.selected;
|
||||||
|
if (this.leader?.memberId === member.id) {
|
||||||
|
this.leader = null;
|
||||||
|
}
|
||||||
this.render();
|
this.render();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -337,11 +343,14 @@ export default class GroupRollDialog extends HandlebarsApplicationMixin(Applicat
|
||||||
}
|
}
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
async makeRoll(button, characterData, path) {
|
/** @this GroupRollDialog */
|
||||||
const actor = game.actors.find(x => x.id === characterData.id);
|
static async #makeRoll(_event, button) {
|
||||||
|
const member = button.closest('[data-member-key]').dataset.memberKey;
|
||||||
|
const { data, basePath } = this.#getCharacterDataById(member);
|
||||||
|
const actor = game.actors.find(x => x.id === data.id);
|
||||||
if (!actor) return;
|
if (!actor) return;
|
||||||
|
|
||||||
const result = await actor.rollTrait(characterData.rollChoice, {
|
const result = await actor.rollTrait(data.rollChoice, {
|
||||||
skips: {
|
skips: {
|
||||||
createMessage: true,
|
createMessage: true,
|
||||||
resources: true,
|
resources: true,
|
||||||
|
|
@ -350,34 +359,30 @@ export default class GroupRollDialog extends HandlebarsApplicationMixin(Applicat
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!result) return;
|
if (!result) return;
|
||||||
|
// todo: move logic to actor.rollTrait() or actor.diceRoll()
|
||||||
if (!game.modules.get('dice-so-nice')?.active) foundry.audio.AudioHelper.play({ src: CONFIG.sounds.dice });
|
if (!game.modules.get('dice-so-nice')?.active) foundry.audio.AudioHelper.play({ src: CONFIG.sounds.dice });
|
||||||
|
|
||||||
const rollData = result.messageRoll.toJSON();
|
const rollData = result.messageRoll.toJSON();
|
||||||
delete rollData.options.messageRoll;
|
delete rollData.options.messageRoll;
|
||||||
this.updatePartyData(
|
this.updatePartyData(
|
||||||
{
|
{
|
||||||
[path]: rollData
|
[basePath]: { rollData, successful: null }
|
||||||
},
|
},
|
||||||
this.getUpdatingParts(button)
|
this.getUpdatingParts(button)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @this GroupRollDialog */
|
|
||||||
static async #makeRoll(_event, button) {
|
|
||||||
const { data, basePath } = this.#getCharacterDataById(button.dataset.member);
|
|
||||||
this.makeRoll(button, data, `${basePath}.rollData`);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @this GroupRollDialog */
|
/** @this GroupRollDialog */
|
||||||
static async #removeRoll(_event, button) {
|
static async #removeRoll(_event, button) {
|
||||||
const { basePath } = this.#getCharacterDataById(button.dataset.member);
|
const member = button.closest('[data-member-key]').dataset.memberKey;
|
||||||
|
const { basePath } = this.#getCharacterDataById(member);
|
||||||
this.updatePartyData(
|
this.updatePartyData(
|
||||||
{
|
{
|
||||||
[basePath]: {
|
[basePath]: {
|
||||||
rollData: null,
|
rollData: null,
|
||||||
rollChoice: null,
|
rollChoice: null,
|
||||||
selected: false,
|
selected: false,
|
||||||
successfull: null
|
successful: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
this.getUpdatingParts(button)
|
this.getUpdatingParts(button)
|
||||||
|
|
@ -409,11 +414,11 @@ export default class GroupRollDialog extends HandlebarsApplicationMixin(Applicat
|
||||||
|
|
||||||
static #markSuccessful(_event, button) {
|
static #markSuccessful(_event, button) {
|
||||||
const memberKey = button.closest('[data-member-key]').dataset.memberKey;
|
const memberKey = button.closest('[data-member-key]').dataset.memberKey;
|
||||||
const previousValue = this.party.system.groupRoll.aidingCharacters[memberKey].successfull;
|
const previousValue = this.party.system.groupRoll.aidingCharacters[memberKey].successful;
|
||||||
const newValue = Boolean(button.dataset.success === 'true');
|
const newValue = Boolean(button.dataset.success === 'true');
|
||||||
this.updatePartyData(
|
this.updatePartyData(
|
||||||
{
|
{
|
||||||
[`system.groupRoll.aidingCharacters.${memberKey}.successfull`]:
|
[`system.groupRoll.aidingCharacters.${memberKey}.successful`]:
|
||||||
previousValue === newValue ? null : newValue
|
previousValue === newValue ? null : newValue
|
||||||
},
|
},
|
||||||
this.getUpdatingParts(button)
|
this.getUpdatingParts(button)
|
||||||
|
|
@ -457,7 +462,7 @@ export default class GroupRollDialog extends HandlebarsApplicationMixin(Applicat
|
||||||
static async #finishRoll() {
|
static async #finishRoll() {
|
||||||
const totalRoll = this.party.system.groupRoll.leader.roll;
|
const totalRoll = this.party.system.groupRoll.leader.roll;
|
||||||
for (const character of Object.values(this.party.system.groupRoll.aidingCharacters)) {
|
for (const character of Object.values(this.party.system.groupRoll.aidingCharacters)) {
|
||||||
totalRoll.terms.push(new foundry.dice.terms.OperatorTerm({ operator: character.successfull ? '+' : '-' }));
|
totalRoll.terms.push(new foundry.dice.terms.OperatorTerm({ operator: character.successful ? '+' : '-' }));
|
||||||
totalRoll.terms.push(new foundry.dice.terms.NumericTerm({ number: 1 }));
|
totalRoll.terms.push(new foundry.dice.terms.NumericTerm({ number: 1 }));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ export class CharacterData extends foundry.abstract.DataModel {
|
||||||
}),
|
}),
|
||||||
rollData: new fields.JSONField({ nullable: true, initial: null }),
|
rollData: new fields.JSONField({ nullable: true, initial: null }),
|
||||||
selected: new fields.BooleanField({ initial: false }),
|
selected: new fields.BooleanField({ initial: false }),
|
||||||
successfull: new fields.BooleanField({ nullable: true, initial: null })
|
successful: new fields.BooleanField({ nullable: true, initial: null })
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -78,10 +78,9 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
height: 3.375rem;
|
min-height: 3.375rem;
|
||||||
|
|
||||||
&.inactive {
|
&.inactive {
|
||||||
opacity: 0.3;
|
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -109,10 +108,16 @@
|
||||||
|
|
||||||
.buttons {
|
.buttons {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: row;
|
||||||
button {
|
button {
|
||||||
|
--button-text-color: var(--color-text-primary);
|
||||||
--button-size: 1.5em;
|
--button-size: 1.5em;
|
||||||
padding: 0 var(--spacer-4);
|
padding: 0 var(--spacer-4);
|
||||||
|
img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -185,7 +190,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.buttons {
|
.buttons {
|
||||||
gap: 2px;
|
flex-direction: column;
|
||||||
button {
|
button {
|
||||||
color: var(--medium-red);
|
color: var(--medium-red);
|
||||||
&[data-success=true] {
|
&[data-success=true] {
|
||||||
|
|
@ -209,6 +214,16 @@
|
||||||
padding: 6px 12px;
|
padding: 6px 12px;
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
|
|
||||||
|
&.empty {
|
||||||
|
color: light-dark(@dark-blue-80, @beige-80);
|
||||||
|
border-radius: 3px;
|
||||||
|
justify-content: center;
|
||||||
|
border: 1px dashed light-dark(@dark-blue-80, @beige-80);
|
||||||
|
text-align: center;
|
||||||
|
height: 3.25rem;
|
||||||
|
font-family: @font-body;
|
||||||
|
}
|
||||||
|
|
||||||
.row {
|
.row {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,15 @@
|
||||||
<section class="initialization-container tab {{#if tabs.initialization.active}} active{{/if}}" data-group="{{tabs.initialization.group}}" data-tab="{{tabs.initialization.id}}">
|
<section class="initialization-container tab {{#if tabs.initialization.active}} active{{/if}}" data-group="{{tabs.initialization.group}}" data-tab="{{tabs.initialization.id}}">
|
||||||
<h1>Character Selection</h1>
|
<h1>{{localize "DAGGERHEART.APPLICATIONS.GroupRollSelect.initializationTitle"}}</h1>
|
||||||
<header><span>Leader</span></header>
|
<header><span>{{localize "DAGGERHEART.APPLICATIONS.GroupRollSelect.leader"}}</span></header>
|
||||||
<section class="main-roll {{#if selectedLeaderDisabled}}inactive{{/if}}">
|
<section class="main-roll {{#if selectedLeaderDisabled}}inactive{{/if}}">
|
||||||
<div class="hint">Select one Character to be the leader</div>
|
<div class="hint">{{localize "DAGGERHEART.APPLICATIONS.GroupRollSelect.selectLeaderHint"}}</div>
|
||||||
<select class="main-character-field" {{#if selectedLeaderDisabled}}disabled{{/if}}>
|
<select class="main-character-field" {{#if selectedLeaderDisabled}}disabled{{/if}}>
|
||||||
{{selectOptions selectedLeaderOptions selected=selectedLeader.memberId blank="" }}
|
{{selectOptions selectedLeaderOptions selected=selectedLeader.memberId blank="" }}
|
||||||
</select>
|
</select>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<header><span>Party Members</span></header>
|
<header><span>{{localize "DAGGERHEART.APPLICATIONS.GroupRollSelect.members"}}</span></header>
|
||||||
<div class="hint">Select all Characters who will participate in the roll</div>
|
<div class="hint">{{"DAGGERHEART.APPLICATIONS.GroupRollSelect.selectParticipantsHint"}}</div>
|
||||||
<div class="members-container">
|
<div class="members-container">
|
||||||
{{#each memberSelection as |member|}}
|
{{#each memberSelection as |member|}}
|
||||||
<button
|
<button
|
||||||
|
|
@ -19,7 +19,12 @@
|
||||||
{{#if (and (not member.selected) ../allSelected)}}disabled{{/if}}
|
{{#if (and (not member.selected) ../allSelected)}}disabled{{/if}}
|
||||||
>
|
>
|
||||||
<img class="portrait" src="{{member.img}}" />
|
<img class="portrait" src="{{member.img}}" />
|
||||||
<span class="name">{{member.name}}</span>
|
<span class="name">
|
||||||
|
{{member.name}}
|
||||||
|
{{#if (eq @root.selectedLeader.memberId member.id)}}
|
||||||
|
<i class="fa-solid fa-crown" inert></i>
|
||||||
|
{{/if}}
|
||||||
|
</span>
|
||||||
<input type="checkbox" {{#if member.selected}}checked{{/if}} />
|
<input type="checkbox" {{#if member.selected}}checked{{/if}} />
|
||||||
</button>
|
</button>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,15 @@
|
||||||
<section class="group-roll tab {{#if tabs.groupRoll.active}} active{{/if}}" data-group="{{tabs.groupRoll.group}}" data-tab="{{tabs.groupRoll.id}}">
|
<section class="group-roll tab {{#if tabs.groupRoll.active}} active{{/if}}" data-group="{{tabs.groupRoll.group}}" data-tab="{{tabs.groupRoll.id}}">
|
||||||
<h1>Group Roll</h1>
|
<h1>{{localize "DAGGERHEART.APPLICATIONS.GroupRollSelect.title"}}</h1>
|
||||||
<header><span>Members</span></header>
|
<header><span>{{localize "DAGGERHEART.APPLICATIONS.GroupRollSelect.members"}}</span></header>
|
||||||
<div class="aiding-members">
|
<div class="aiding-members">
|
||||||
{{#each aidKeys as |key|}}
|
{{#each aidKeys as |key|}}
|
||||||
<div data-application-part="{{key}}"></div>
|
<div data-application-part="{{key}}"></div>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<header><span>Leader</span></header>
|
<header><span>{{localize "DAGGERHEART.APPLICATIONS.GroupRollSelect.leader"}}</span></header>
|
||||||
<div data-application-part="leader"></div>
|
<div data-application-part="leader"></div>
|
||||||
<header><span>Result</span></header>
|
<header><span>{{localize "DAGGERHEART.GENERAL.result.single"}}</span></header>
|
||||||
<div data-application-part="result"></div>
|
<div data-application-part="result"></div>
|
||||||
<div data-application-part="footer"></div>
|
<div data-application-part="footer"></div>
|
||||||
</section>
|
</section>
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{{#with (ifThen (eq partId "leader") leader (lookup members partId))}}
|
{{#with (ifThen (eq partId "leader") leader (lookup members partId))}}
|
||||||
<section class="member-roll-container {{type}} {{#if @root.allHaveRolled}}select-padding{{/if}} {{#unless isEditable}}inactive{{/unless}}" data-member-key="{{@root.partId}}">
|
<section class="member-roll-container {{type}} {{#if @root.allHaveRolled}}select-padding{{/if}} {{#unless isEditable}}inactive{{/unless}}" data-member-key="{{@root.partId}}">
|
||||||
{{log this}}
|
|
||||||
<img class="portrait" src="{{img}}" />
|
<img class="portrait" src="{{img}}" />
|
||||||
<div class="name-area">
|
<div class="name-area">
|
||||||
<span class="name">{{name}}</span>
|
<span class="name">{{name}}</span>
|
||||||
|
|
@ -12,10 +11,23 @@
|
||||||
{{numberFormat modifier sign=true}}
|
{{numberFormat modifier sign=true}}
|
||||||
</span>
|
</span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
{{#if isEditable}}
|
||||||
|
<div class="buttons">
|
||||||
|
<button type="button" data-action="makeRoll" class="plain" data-tooltip="DAGGERHEART.GENERAL.Roll.basic">
|
||||||
|
<img class="roll-img duality" src="systems/daggerheart/assets/icons/dice/duality/DualityBW.svg" alt="2d12">
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
data-action="removeRoll"
|
||||||
|
class="plain icon fa-solid fa-trash"
|
||||||
|
data-tooltip="DAGGERHEART.APPLICATIONS.GroupRollSelect.removeRoll"
|
||||||
|
></button>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
{{else if readyToRoll}}
|
{{else if readyToRoll}}
|
||||||
<div class="trait">
|
<div class="trait">
|
||||||
Trait
|
{{localize "DAGGERHEART.CONFIG.RollTypes.trait.name" }}
|
||||||
<select name="{{basePath}}.rollChoice" {{#if hasRolled}}disabled{{/if}}>
|
<select name="{{basePath}}.rollChoice" {{#if hasRolled}}disabled{{/if}}>
|
||||||
{{selectOptions ../traitOptions selected=rollChoice localize=true}}
|
{{selectOptions ../traitOptions selected=rollChoice localize=true}}
|
||||||
</select>
|
</select>
|
||||||
|
|
@ -27,7 +39,7 @@
|
||||||
<div class="roll-data">
|
<div class="roll-data">
|
||||||
<div class="duality-label">
|
<div class="duality-label">
|
||||||
{{roll.total}}
|
{{roll.total}}
|
||||||
<span class="with">{{localize "DAGGERHEART.GENERAL.withThing" thing=roll.totalLabel}}</span>
|
<span class="with">{{withLabelShort}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="roll-dice-container">
|
<div class="roll-dice-container">
|
||||||
<a class="roll-dice" data-action="rerollDice" data-member="{{@root.partId}}" data-dice-type="hope">
|
<a class="roll-dice" data-action="rerollDice" data-member="{{@root.partId}}" data-dice-type="hope">
|
||||||
|
|
@ -49,15 +61,26 @@
|
||||||
<span class="roll-value">{{positive roll.modifierTotal}}</span>
|
<span class="roll-value">{{positive roll.modifierTotal}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{#if (and isEditable (ne ../partId "leader"))}}
|
{{#if (and @root.isGM (ne ../partId "leader"))}}
|
||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
<button type="button" data-action="markSuccessful" data-success="true" class="plain icon fa-solid fa-check {{#if modifier}}{{#if successfull}}active{{else}}inactive{{/if}}{{/if}}"></button>
|
<button
|
||||||
<button type="button" data-action="markSuccessful" class="plain icon fa-solid fa-times {{#if modifier}}{{#if successfull}}inactive{{else}}active{{/if}}{{/if}}"></button>
|
type="button"
|
||||||
|
data-action="markSuccessful"
|
||||||
|
data-success="true"
|
||||||
|
class="plain icon fa-solid fa-check {{#if modifier}}{{#if successful}}active{{else}}inactive{{/if}}{{/if}}"
|
||||||
|
data-tooltip="DAGGERHEART.GENERAL.success"
|
||||||
|
></button>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
data-action="markSuccessful"
|
||||||
|
class="plain icon fa-solid fa-times {{#if modifier}}{{#if successful}}inactive{{else}}active{{/if}}{{/if}}"
|
||||||
|
data-tooltip="DAGGERHEART.GENERAL.failure"
|
||||||
|
></button>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
{{else if readyToRoll}}
|
{{else if (and readyToRoll isEditable)}}
|
||||||
<a class="roll-button initial-roll" data-action="makeRoll" data-member="{{@root.partId}}">
|
<a class="roll-button initial-roll" data-action="makeRoll" data-member="{{@root.partId}}" data-tooltip="DAGGERHEART.GENERAL.Roll.basic">
|
||||||
<img class="roll-img duality" src="systems/daggerheart/assets/icons/dice/duality/DualityBW.svg" alt="2d12">
|
<img class="roll-img duality" src="systems/daggerheart/assets/icons/dice/duality/DualityBW.svg" alt="2d12">
|
||||||
</a>
|
</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,15 @@
|
||||||
|
|
||||||
{{#if hasRolled}}
|
{{#if (and hasRolled leader.roll)}}
|
||||||
<div class="group-roll-results with-result {{groupRoll.totalDualityClass}}">
|
<div class="group-roll-results with-result {{groupRoll.totalDualityClass}}">
|
||||||
<div class="row leader">
|
<div class="row leader">
|
||||||
<span class="label">Leader Roll</span>
|
<span class="label">{{localize "DAGGERHEART.APPLICATIONS.GroupRollSelect.leaderRoll"}}</span>
|
||||||
<span class="duality-label">
|
<span class="duality-label">
|
||||||
{{leader.roll.total}}
|
{{leader.roll.total}}
|
||||||
<span class="with">{{localize "DAGGERHEART.GENERAL.withThing" thing=leader.roll.totalLabel}}</span>
|
<span class="with">{{localize "DAGGERHEART.GENERAL.withThing" thing=leader.roll.totalLabel}}</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="row modifiers">
|
<div class="row modifiers">
|
||||||
<span class="label">Modifiers</span>
|
<span class="label">{{localize "DAGGERHEART.GENERAL.Modifier.plural"}}</span>
|
||||||
<div class="item-tags">
|
<div class="item-tags">
|
||||||
{{#each groupRoll.modifiers as |modifier|}}
|
{{#each groupRoll.modifiers as |modifier|}}
|
||||||
<span class="tag {{#if (gte modifier 0)}}success{{else}}failure{{/if}}">
|
<span class="tag {{#if (gte modifier 0)}}success{{else}}failure{{/if}}">
|
||||||
|
|
@ -20,12 +20,12 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
<div class="row total">
|
<div class="row total">
|
||||||
<span class="label">Total</span>
|
<span class="label">{{localize "DAGGERHEART.GENERAL.total"}}</span>
|
||||||
<span class="duality-label"><span class="value">{{groupRoll.total}}</span> {{groupRoll.totalLabel}}</span>
|
<span class="duality-label"><span class="value">{{groupRoll.total}}</span> {{groupRoll.totalLabel}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
<div class="group-roll-results empty">
|
<div class="group-roll-results empty">
|
||||||
Results will appear when characters roll
|
{{localize "DAGGERHEART.APPLICATIONS.GroupRollSelect.resultsHint"}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue