Skip to content

Commit

Permalink
Also add support for arcana and dances as skill events
Browse files Browse the repository at this point in the history
  • Loading branch information
Azurelol committed Mar 1, 2025
1 parent fa8d27e commit e3b5704
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 4 additions & 2 deletions module/checks/common-events.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,12 @@ function spell(actor, item) {
*/
function skill(actor, item) {
/** @type SkillDataModel **/
const spell = item.system;
const skill = item.system;
const traits = new Set();
traits.add('skill');
traits.add(spell.cost.resource);
if (skill.cost) {
traits.add(skill.cost.resource);
}

const targets = Targeting.getSerializedTargetData();
const eventTargets = getEventTargets(targets);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { RollableClassFeatureDataModel } from '../class-feature-data-model.mjs';
import { SYSTEM } from '../../../../helpers/config.mjs';
import { Flags } from '../../../../helpers/flags.mjs';
import { CommonEvents } from '../../../../checks/common-events.mjs';

/**
* @extends ClassFeatureDataModel
Expand Down Expand Up @@ -68,6 +69,7 @@ export class ArcanumDataModel extends RollableClassFeatureDataModel {
flags: { [SYSTEM]: { [Flags.ChatMessage.Item]: item } },
};

CommonEvents.skill(item.actor, item);
ChatMessage.create(chatMessage);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { RollableClassFeatureDataModel } from '../class-feature-data-model.mjs';
import { Flags } from '../../../../helpers/flags.mjs';
import { SYSTEM } from '../../../../helpers/config.mjs';
import { CommonEvents } from '../../../../checks/common-events.mjs';

const durations = {
instant: 'FU.ClassFeatureDanceDurationInstant',
Expand Down Expand Up @@ -55,6 +56,7 @@ export class DanceDataModel extends RollableClassFeatureDataModel {
},
};

CommonEvents.skill(item.actor, item);
ChatMessage.create(chatMessage);
}
}

0 comments on commit e3b5704

Please sign in to comment.