Added Custom Adversary Types (#1048)

This commit is contained in:
WBHarry 2025-08-23 02:18:25 +02:00 committed by GitHub
parent ee786544c7
commit d5f7e17339
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 156 additions and 10 deletions

View file

@ -56,6 +56,7 @@ export default class AdversarySheet extends DHBaseActorSheet {
async _prepareContext(options) {
const context = await super._prepareContext(options);
context.systemFields.attack.fields = this.document.system.attack.schema.fields;
return context;
}
@ -65,6 +66,9 @@ export default class AdversarySheet extends DHBaseActorSheet {
switch (partId) {
case 'header':
await this._prepareHeaderContext(context, options);
const adversaryTypes = CONFIG.DH.ACTOR.allAdversaryTypes();
context.adversaryType = game.i18n.localize(adversaryTypes[this.document.system.type].label);
break;
case 'notes':
await this._prepareNotesContext(context, options);