mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-06-09 14:18:10 +02:00
Compare commits
No commits in common. "f45b1210c72a36451d59b2d9d916e913bfdb33b1" and "276aee4747005a83fc3909fc08dc8036ac05e9ef" have entirely different histories.
f45b1210c7
...
276aee4747
4 changed files with 7 additions and 16 deletions
|
|
@ -188,9 +188,8 @@ export default class SettingFeatureConfig extends HandlebarsApplicationMixin(App
|
||||||
if (type === 'effect') {
|
if (type === 'effect') {
|
||||||
const move = foundry.utils.getProperty(this.settings, this.movePath);
|
const move = foundry.utils.getProperty(this.settings, this.movePath);
|
||||||
for (const action of move.actions) {
|
for (const action of move.actions) {
|
||||||
const actionEffects = action.effects ?? [];
|
const remainingEffects = action.effects.filter(x => x._id !== id);
|
||||||
const remainingEffects = actionEffects.filter(x => x._id !== id);
|
if (action.effects.length !== remainingEffects.length) {
|
||||||
if (actionEffects.length !== remainingEffects.length) {
|
|
||||||
await action.update({
|
await action.update({
|
||||||
effects: remainingEffects.map(x => {
|
effects: remainingEffects.map(x => {
|
||||||
const { _id, ...rest } = x;
|
const { _id, ...rest } = x;
|
||||||
|
|
|
||||||
|
|
@ -453,7 +453,7 @@ export const allArmorFeatures = () => {
|
||||||
const feature = homebrewFeatures[key];
|
const feature = homebrewFeatures[key];
|
||||||
const actions = feature.actions.map(action => ({
|
const actions = feature.actions.map(action => ({
|
||||||
...action,
|
...action,
|
||||||
effects: action.effects?.map(effect => feature.effects.find(x => x.id === effect._id))??[],
|
effects: action.effects.map(effect => feature.effects.find(x => x.id === effect._id)),
|
||||||
type: action.type
|
type: action.type
|
||||||
}));
|
}));
|
||||||
const actionEffects = actions.flatMap(a => a.effects);
|
const actionEffects = actions.flatMap(a => a.effects);
|
||||||
|
|
@ -1407,7 +1407,7 @@ export const allWeaponFeatures = () => {
|
||||||
|
|
||||||
const actions = feature.actions.map(action => ({
|
const actions = feature.actions.map(action => ({
|
||||||
...action,
|
...action,
|
||||||
effects: action.effects?.map(effect => feature.effects.find(x => x.id === effect._id)) ?? [],
|
effects: action.effects.map(effect => feature.effects.find(x => x.id === effect._id)),
|
||||||
type: action.type
|
type: action.type
|
||||||
}));
|
}));
|
||||||
const actionEffects = actions.flatMap(a => a.effects);
|
const actionEffects = actions.flatMap(a => a.effects);
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,7 @@ export default class DhpActor extends Actor {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Configure prototype token settings
|
// Configure prototype token settings
|
||||||
if (['character', 'companion', 'party'].includes(this.type)) {
|
if (['character', 'companion', 'party'].includes(this.type))
|
||||||
Object.assign(update, {
|
Object.assign(update, {
|
||||||
prototypeToken: {
|
prototypeToken: {
|
||||||
sight: { enabled: true },
|
sight: { enabled: true },
|
||||||
|
|
@ -107,14 +107,6 @@ export default class DhpActor extends Actor {
|
||||||
disposition: CONST.TOKEN_DISPOSITIONS.FRIENDLY
|
disposition: CONST.TOKEN_DISPOSITIONS.FRIENDLY
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
if (this.type === 'party') {
|
|
||||||
Object.assign(update, {
|
|
||||||
'ownership.default': CONST.DOCUMENT_OWNERSHIP_LEVELS.OWNER,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
this.updateSource(update);
|
this.updateSource(update);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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.0",
|
"version": "2.1.2",
|
||||||
"compatibility": {
|
"compatibility": {
|
||||||
"minimum": "14.359",
|
"minimum": "14.359",
|
||||||
"verified": "14.360",
|
"verified": "14.360",
|
||||||
|
|
@ -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.0/system.zip",
|
"download": "https://github.com/Foundryborne/daggerheart/releases/download/2.1.2/system.zip",
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "WBHarry"
|
"name": "WBHarry"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue