mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-24 00:13:39 +02:00
Reworked beastform to hold it's data entirely in the beastformEffect
This commit is contained in:
parent
3186468f28
commit
51bd7c18af
7 changed files with 76 additions and 60 deletions
|
|
@ -307,7 +307,7 @@ export default class CharacterSheet extends DaggerheartSheet(ActorSheetV2) {
|
|||
const itemId = listElement.dataset.itemId;
|
||||
if (listElement.dataset.type === 'effect') {
|
||||
return this.document.effects.get(itemId);
|
||||
} else if (listElement.dataset.type === 'features') {
|
||||
} else if (['armor', 'weapon', 'feature', 'consumable', 'miscellaneous'].includes(listElement.dataset.type)) {
|
||||
return this.document.items.get(itemId);
|
||||
} else {
|
||||
return this.document.system[listElement.dataset.type].system.actions.find(x => x.id === itemId);
|
||||
|
|
@ -618,7 +618,9 @@ export default class CharacterSheet extends DaggerheartSheet(ActorSheetV2) {
|
|||
if (!item) return;
|
||||
|
||||
// Should dandle its actions. Or maybe they'll be separate buttons as per an Issue on the board
|
||||
if (item.type === 'feature' || item instanceof ActiveEffect) {
|
||||
if (item.type === 'feature') {
|
||||
item.use(event);
|
||||
} else if (item instanceof ActiveEffect) {
|
||||
item.toChat(this);
|
||||
} else {
|
||||
const wasUsed = await item.use(event);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue