mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 11:41:08 +01:00
140/141 - Class/Subclass Actions/Effects (#142)
* Added Actions and effects * Added class hopeFeatures and classFeatures
This commit is contained in:
parent
0fbba51ad7
commit
f80a849b73
15 changed files with 281 additions and 74 deletions
|
|
@ -55,6 +55,7 @@ export class DHBaseAction extends foundry.abstract.DataModel {
|
|||
static defineSchema() {
|
||||
return {
|
||||
_id: new fields.DocumentIdField(),
|
||||
systemPath: new fields.StringField({ required: true, initial: 'actions' }),
|
||||
type: new fields.StringField({ initial: undefined, readonly: true, required: true }),
|
||||
name: new fields.StringField({ initial: undefined }),
|
||||
img: new fields.FilePathField({ initial: undefined, categories: ['IMAGE'], base64: false }),
|
||||
|
|
@ -93,7 +94,7 @@ export class DHBaseAction extends foundry.abstract.DataModel {
|
|||
prepareData() {}
|
||||
|
||||
get index() {
|
||||
return this.parent.actions.indexOf(this);
|
||||
return foundry.utils.getProperty(this.parent, this.systemPath).indexOf(this);
|
||||
}
|
||||
|
||||
get item() {
|
||||
|
|
@ -203,7 +204,7 @@ export class DHAttackAction extends DHBaseAction {
|
|||
static getRollType() {
|
||||
return 'weapon';
|
||||
}
|
||||
|
||||
|
||||
get chatTitle() {
|
||||
return game.i18n.format('DAGGERHEART.Chat.AttackRoll.Title', {
|
||||
attack: this.item.name
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue