mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
Merge branch 'main' into feature/death-moves
This commit is contained in:
commit
cee79ac4c2
4 changed files with 19 additions and 11 deletions
|
|
@ -2,7 +2,7 @@ export const actionTypes = {
|
||||||
attack: {
|
attack: {
|
||||||
id: 'attack',
|
id: 'attack',
|
||||||
name: 'DAGGERHEART.ACTIONS.TYPES.attack.name',
|
name: 'DAGGERHEART.ACTIONS.TYPES.attack.name',
|
||||||
icon: 'fa-khanda',
|
icon: 'fa-hand-fist',
|
||||||
tooltip: 'DAGGERHEART.ACTIONS.TYPES.attack.tooltip'
|
tooltip: 'DAGGERHEART.ACTIONS.TYPES.attack.tooltip'
|
||||||
},
|
},
|
||||||
countdown: {
|
countdown: {
|
||||||
|
|
|
||||||
|
|
@ -164,14 +164,13 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
|
||||||
getRollData(data = {}) {
|
getRollData(data = {}) {
|
||||||
const actorData = this.actor ? this.actor.getRollData(false) : {};
|
const actorData = this.actor ? this.actor.getRollData(false) : {};
|
||||||
|
|
||||||
return {
|
actorData.result = data.roll?.total ?? 1;
|
||||||
...actorData,
|
actorData.scale = data.costs?.length // Right now only return the first scalable cost.
|
||||||
result: data.roll?.total ?? 1,
|
? (data.costs.find(c => c.scalable)?.total ?? 1)
|
||||||
scale: data.costs?.length // Right now only return the first scalable cost.
|
: 1;
|
||||||
? (data.costs.find(c => c.scalable)?.total ?? 1)
|
actorData.roll = {};
|
||||||
: 1,
|
|
||||||
roll: {}
|
return actorData;
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -539,7 +539,10 @@ export default class DhpActor extends Actor {
|
||||||
|
|
||||||
/**@inheritdoc */
|
/**@inheritdoc */
|
||||||
getRollData() {
|
getRollData() {
|
||||||
const rollData = super.getRollData().clone();
|
const rollData = foundry.utils.deepClone(super.getRollData());
|
||||||
|
/* system gets repeated infinately which causes issues when trying to use the data for document creation */
|
||||||
|
delete rollData.system;
|
||||||
|
|
||||||
rollData.name = this.name;
|
rollData.name = this.name;
|
||||||
rollData.system = this.system.getRollData();
|
rollData.system = this.system.getRollData();
|
||||||
rollData.prof = this.system.proficiency ?? 1;
|
rollData.prof = this.system.proficiency ?? 1;
|
||||||
|
|
|
||||||
|
|
@ -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": "1.4.1",
|
"version": "1.4.2",
|
||||||
"compatibility": {
|
"compatibility": {
|
||||||
"minimum": "13.346",
|
"minimum": "13.346",
|
||||||
"verified": "13.351",
|
"verified": "13.351",
|
||||||
|
|
@ -54,6 +54,12 @@
|
||||||
{
|
{
|
||||||
"name": "chrisryan10",
|
"name": "chrisryan10",
|
||||||
"discord": "lazjen"
|
"discord": "lazjen"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "nsalyzyn",
|
||||||
|
"url": "https://github.com/nsalyzyn",
|
||||||
|
"email": "nsalyzyn@gmail.com",
|
||||||
|
"discord": "nsalyzyn"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"esmodules": ["build/daggerheart.js"],
|
"esmodules": ["build/daggerheart.js"],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue