mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 19:51:08 +01:00
Actions
This commit is contained in:
parent
385d414d7d
commit
1695c80388
10 changed files with 157 additions and 55 deletions
|
|
@ -271,7 +271,8 @@ export default class DhpActor extends Actor {
|
|||
// data: {
|
||||
...config,
|
||||
/* action, */
|
||||
actor: this.getRollData(),
|
||||
// actor: this.getRollData(),
|
||||
actor: this.system
|
||||
// },
|
||||
// options: {
|
||||
// dialog: false,
|
||||
|
|
@ -507,13 +508,13 @@ export default class DhpActor extends Actor {
|
|||
async takeDamage(damage, type) {
|
||||
const hpDamage =
|
||||
damage >= this.system.damageThresholds.severe
|
||||
? 3
|
||||
? -3
|
||||
: damage >= this.system.damageThresholds.major
|
||||
? 2
|
||||
? -2
|
||||
: damage >= this.system.damageThresholds.minor
|
||||
? 1
|
||||
? -1
|
||||
: 0;
|
||||
await this.modifyResource({value: hpDamage, type});
|
||||
await this.modifyResource([{value: hpDamage, type}]);
|
||||
/* const update = {
|
||||
'system.resources.hitPoints.value': Math.min(
|
||||
this.system.resources.hitPoints.value + hpDamage,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue