mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-06-05 20:34:15 +02:00
Compare commits
4 commits
3fbc1e97c6
...
c8d0df87c8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c8d0df87c8 | ||
|
|
983f48b415 | ||
|
|
bfd483698b | ||
|
|
3eb33a71af |
5 changed files with 7 additions and 9 deletions
|
|
@ -41,7 +41,7 @@ export default class DhActiveEffectConfig extends foundry.applications.sheets.Ac
|
||||||
* @returns {ChangeChoice { value: string, label: string, hint: string, group: string }[]}
|
* @returns {ChangeChoice { value: string, label: string, hint: string, group: string }[]}
|
||||||
*/
|
*/
|
||||||
static getChangeChoices() {
|
static getChangeChoices() {
|
||||||
const ignoredActorKeys = ['config', 'DhEnvironment', 'DhParty'];
|
const ignoredActorKeys = ['config', 'DhEnvironment', 'DhParty', 'DhNPC'];
|
||||||
|
|
||||||
const getAllLeaves = (root, group, parentPath = '') => {
|
const getAllLeaves = (root, group, parentPath = '') => {
|
||||||
const leaves = [];
|
const leaves = [];
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
import { emitGMUpdate, GMUpdateEvent } from '../../../systemRegistration/socket.mjs';
|
|
||||||
|
|
||||||
const fields = foundry.data.fields;
|
const fields = foundry.data.fields;
|
||||||
|
|
||||||
export default class EffectsField extends fields.ArrayField {
|
export default class EffectsField extends fields.ArrayField {
|
||||||
|
|
@ -34,8 +32,7 @@ export default class EffectsField extends fields.ArrayField {
|
||||||
}
|
}
|
||||||
if (EffectsField.getAutomation() || force) {
|
if (EffectsField.getAutomation() || force) {
|
||||||
targets ??= (message.system?.targets ?? config.targets).filter(t => !config.hasRoll || t.hit);
|
targets ??= (message.system?.targets ?? config.targets).filter(t => !config.hasRoll || t.hit);
|
||||||
await emitGMUpdate(GMUpdateEvent.UpdateEffect, EffectsField.applyEffects.bind(this), targets, this.uuid);
|
EffectsField.applyEffects.call(this, targets);
|
||||||
// EffectsField.applyEffects.call(this, config.targets.filter(t => !config.hasRoll || t.hit));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -59,7 +56,7 @@ export default class EffectsField extends fields.ArrayField {
|
||||||
if (!token) return;
|
if (!token) return;
|
||||||
|
|
||||||
const messageToken = token.document ?? token;
|
const messageToken = token.document ?? token;
|
||||||
const conditionImmunities = messageToken.actor.system.rules.conditionImmunities ?? {};
|
const conditionImmunities = messageToken.actor.system.rules?.conditionImmunities ?? {};
|
||||||
messageTargets.push({
|
messageTargets.push({
|
||||||
token: messageToken,
|
token: messageToken,
|
||||||
conditionImmunities: Object.values(conditionImmunities).some(x => x)
|
conditionImmunities: Object.values(conditionImmunities).some(x => x)
|
||||||
|
|
|
||||||
|
|
@ -194,6 +194,7 @@
|
||||||
|
|
||||||
.roll-selection-container {
|
.roll-selection-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
gap: 16px;
|
||||||
|
|
||||||
.select-roll-button {
|
.select-roll-button {
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
"id": "daggerheart",
|
"id": "daggerheart",
|
||||||
"title": "Daggerheart",
|
"title": "Daggerheart",
|
||||||
"description": "An unofficial implementation of the Daggerheart system",
|
"description": "An unofficial implementation of the Daggerheart system",
|
||||||
"version": "2.2.7",
|
"version": "2.3.0",
|
||||||
"compatibility": {
|
"compatibility": {
|
||||||
"minimum": "14.361",
|
"minimum": "14.361",
|
||||||
"verified": "14.363",
|
"verified": "14.363",
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
},
|
},
|
||||||
"url": "https://github.com/Foundryborne/daggerheart",
|
"url": "https://github.com/Foundryborne/daggerheart",
|
||||||
"manifest": "https://raw.githubusercontent.com/Foundryborne/daggerheart/v14/system.json",
|
"manifest": "https://raw.githubusercontent.com/Foundryborne/daggerheart/v14/system.json",
|
||||||
"download": "https://github.com/Foundryborne/daggerheart/releases/download/2.2.7/system.zip",
|
"download": "https://github.com/Foundryborne/daggerheart/releases/download/2.3.0/system.zip",
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "WBHarry"
|
"name": "WBHarry"
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{#if part.modifierTotal}}
|
{{#if part.modifierTotal}}
|
||||||
<span class="roll-operator">{{#if (gte part.modifierTotal 0)}}+{{else}}-{{/if}}</span>
|
{{#if part.dice.length}}<span class="roll-operator">{{#if (gte part.modifierTotal 0)}}+{{else}}-{{/if}}</span>{{/if}}
|
||||||
<span class="roll-value">{{positive part.modifierTotal}}</span>
|
<span class="roll-value">{{positive part.modifierTotal}}</span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue