[Feature] 1766 - Group Attack (#1770)

* Implemented group attack logic

* Updated all minions in the SRD to use the group attack functionality

* .

* Renamed groupAttack.nr to groupAttack.numAttackers

* Moved the flag vs global setting logic to documents/scene

* .
This commit is contained in:
WBHarry 2026-04-09 22:07:51 +02:00 committed by GitHub
parent b505e15eb2
commit ae480157d1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
32 changed files with 1286 additions and 220 deletions

View file

@ -280,6 +280,26 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
}
};
if (this.damage) {
config.isDirect = this.damage.direct;
const groupAttackTokens = this.damage.groupAttack
? game.system.api.fields.ActionFields.DamageField.getGroupAttackTokens(
this.actor.id,
this.damage.groupAttack
)
: null;
config.damageOptions = {
groupAttack: this.damage.groupAttack
? {
numAttackers: Math.max(groupAttackTokens.length, 1),
range: this.damage.groupAttack
}
: null
};
}
DHBaseAction.applyKeybindings(config);
return config;
}