mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
159 - Companion (#224)
* Initial datamodel * Fixed attack * Temp * Fixed normal levelup * Fixed showing summary of new experiences * Touchups * level sync fixes * Reworked Action storage * Companions now take stress when damaged * Fixed Feature flow * Removed retroactive companion levelup * Restored delevel on partner removal * PR fixes * Added a check for card duplicates on character
This commit is contained in:
parent
6f1529fefe
commit
b7e4169079
57 changed files with 1682 additions and 1012 deletions
|
|
@ -20,7 +20,7 @@ export default class BaseDataItem extends foundry.abstract.TypeDataModel {
|
|||
type: 'base',
|
||||
hasDescription: false,
|
||||
isQuantifiable: false,
|
||||
isInventoryItem: false,
|
||||
isInventoryItem: false
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -54,9 +54,9 @@ export default class BaseDataItem extends foundry.abstract.TypeDataModel {
|
|||
const data = { ...actorRollData, item: { ...this } };
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
async _preCreate(data, options, user) {
|
||||
if(!this.constructor.metadata.hasInitialAction || !foundry.utils.isEmpty(this.actions)) return;
|
||||
if (!this.constructor.metadata.hasInitialAction || !foundry.utils.isEmpty(this.actions)) return;
|
||||
const actionType = {
|
||||
weapon: 'attack'
|
||||
}[this.constructor.metadata.type],
|
||||
|
|
@ -72,6 +72,6 @@ export default class BaseDataItem extends foundry.abstract.TypeDataModel {
|
|||
parent: this.parent
|
||||
}
|
||||
);
|
||||
this.updateSource({actions: [action]});
|
||||
this.updateSource({ actions: [action] });
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue