mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 19:51:08 +01:00
Added countdown actions
This commit is contained in:
parent
a146132171
commit
dccb0bfa2d
16 changed files with 159 additions and 7 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import AttackAction from './attackAction.mjs';
|
||||
import BaseAction from './baseAction.mjs';
|
||||
import BeastformAction from './beastformAction.mjs';
|
||||
import CountdownAction from './countdownAction.mjs';
|
||||
import DamageAction from './damageAction.mjs';
|
||||
import EffectAction from './effectAction.mjs';
|
||||
import HealingAction from './healingAction.mjs';
|
||||
|
|
@ -10,6 +11,7 @@ import SummonAction from './summonAction.mjs';
|
|||
export const actionsTypes = {
|
||||
base: BaseAction,
|
||||
attack: AttackAction,
|
||||
countdown: CountdownAction,
|
||||
damage: DamageAction,
|
||||
healing: HealingAction,
|
||||
summon: SummonAction,
|
||||
|
|
|
|||
|
|
@ -43,6 +43,13 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
|
|||
return schemaFields;
|
||||
}
|
||||
|
||||
/**
|
||||
* The default values to supply to schema fields when they are created in the actionConfig. Defined by implementing classes.
|
||||
*/
|
||||
get defaultValues() {
|
||||
return {};
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a Map containing each Action step based on fields define in schema. Ordered by Fields order property.
|
||||
*
|
||||
|
|
|
|||
15
module/data/action/countdownAction.mjs
Normal file
15
module/data/action/countdownAction.mjs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import DHBaseAction from './baseAction.mjs';
|
||||
|
||||
export default class DhCountdownAction extends DHBaseAction {
|
||||
static extraSchemas = [...super.extraSchemas, 'countdown'];
|
||||
|
||||
get defaultValues() {
|
||||
return {
|
||||
...super.defaultValues,
|
||||
countdown: {
|
||||
name: this.parent.parent.name,
|
||||
img: this.img
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue