ChatMessage & takeDamage updates

This commit is contained in:
Dapoolp 2025-07-19 12:52:14 +02:00
parent 7e382d2e08
commit 92feddce1b
13 changed files with 158 additions and 90 deletions

View file

@ -163,6 +163,7 @@ export default class DHBaseAction extends foundry.abstract.DataModel {
}
getRollData(data = {}) {
if(!this.actor) return null;
const actorData = this.actor.getRollData(false);
// Add Roll results to RollDatas
@ -177,6 +178,8 @@ export default class DHBaseAction extends foundry.abstract.DataModel {
}
async use(event, ...args) {
if(!this.actor) throw new Error("An Action can't be used outside of an Actor context.");
const isFastForward = event.shiftKey || (!this.hasRoll && !this.hasSave);
// Prepare base Config
const initConfig = this.initActionConfig(event);

View file

@ -170,11 +170,10 @@ export default class DhCharacter extends BaseDataActor {
rules: new fields.SchemaField({
damageReduction: new fields.SchemaField({
maxArmorMarked: new fields.SchemaField({
value: new fields.NumberField({ required: true, integer: true, initial: 1 }),
bonus: new fields.NumberField({
value: new fields.NumberField({
required: true,
integer: true,
initial: 0,
initial: 1,
label: 'DAGGERHEART.GENERAL.Rules.damageReduction.maxArmorMarkedBonus'
}),
stressExtra: new fields.NumberField({