mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
[PR] Adding the ability to target downtime actions. (#1475)
* Adding the ability to target downtime actions. * No longer using an arbitrary 100 healing. Changing the action's parent
This commit is contained in:
parent
e8c541c002
commit
3b7b6258a1
8 changed files with 69 additions and 16 deletions
|
|
@ -25,9 +25,12 @@ export default class TargetField extends fields.SchemaField {
|
|||
config.hasTarget = true;
|
||||
let targets;
|
||||
// If the Action is configured as self-targeted, set targets as the owner. Probably better way than to fallback to getDependentTokens
|
||||
if (this.target?.type === CONFIG.DH.GENERAL.targetTypes.self.id)
|
||||
if (this.target?.type === CONFIG.DH.GENERAL.targetTypes.self.id) {
|
||||
targets = [this.actor.token ?? this.actor.prototypeToken];
|
||||
else {
|
||||
} else if (config.targetUuid) {
|
||||
const actor = fromUuidSync(config.targetUuid);
|
||||
targets = [actor.token ?? actor.prototypeToken];
|
||||
} else {
|
||||
targets = Array.from(game.user.targets);
|
||||
if (this.target.type !== CONFIG.DH.GENERAL.targetTypes.any.id) {
|
||||
targets = targets.filter(target => TargetField.isTargetFriendly(this.actor, target, this.target.type));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue