mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 19:51:08 +01:00
* Fix action for items * Cost & Range #1 * remove log * actions * Split methods * Roll classes * Begin damage * g * Actions * before main merge * Fix d20RollDialog costs check * Fix submit on close * Add uses in action dialog * Adversary Attack * 166 - Damage Reduction (#180) * Temp * Fixed Stress Reductions * Changed from index based to object * Fixed stress resources management for DamageReduction * Fix Adversary attack multiplier * Auto add Attack action to newly created weapon * Few fixes * 164 - Add Hope/Fear formula * 163 - Actor Sub Datas (#182) * Added rules/bonuses for all classes and subclasses * More * Add Save * Fix delete action button --------- Co-authored-by: WBHarry <williambjrklund@gmail.com> Co-authored-by: WBHarry <89362246+WBHarry@users.noreply.github.com>
38 lines
1.6 KiB
JavaScript
38 lines
1.6 KiB
JavaScript
export default class DHAdversaryRoll extends foundry.abstract.TypeDataModel {
|
|
static defineSchema() {
|
|
const fields = foundry.data.fields;
|
|
|
|
return {
|
|
title: new fields.StringField(),
|
|
roll: new fields.DataField(),
|
|
targets: new fields.ArrayField(
|
|
new fields.SchemaField({
|
|
id: new fields.StringField({}),
|
|
actorId: new fields.StringField({}),
|
|
name: new fields.StringField({}),
|
|
img: new fields.StringField({}),
|
|
difficulty: new fields.NumberField({ integer: true, nullable: true }),
|
|
evasion: new fields.NumberField({ integer: true }),
|
|
hit: new fields.BooleanField({ initial: false }),
|
|
saved: new fields.SchemaField({
|
|
result: new fields.NumberField(),
|
|
success: new fields.BooleanField({ nullable: true, initial: null })
|
|
})
|
|
})
|
|
),
|
|
hasDamage: new fields.BooleanField({ initial: false }),
|
|
hasHealing: new fields.BooleanField({ initial: false }),
|
|
hasEffect: new fields.BooleanField({ initial: false }),
|
|
hasSave: new fields.BooleanField({ initial: false }),
|
|
source: new fields.SchemaField({
|
|
actor: new fields.StringField(),
|
|
item: new fields.StringField(),
|
|
action: new fields.StringField()
|
|
})
|
|
};
|
|
}
|
|
|
|
get messageTemplate() {
|
|
return 'systems/daggerheart/templates/chat/adversary-roll.hbs';
|
|
}
|
|
}
|