mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 14:36:13 +01:00
Restored delevel on partner removal
This commit is contained in:
parent
9905a38b7e
commit
9850d5f6e8
1 changed files with 5 additions and 1 deletions
|
|
@ -51,8 +51,8 @@ export default class DhCompanionSheet extends DaggerheartSheet(ActorSheetV2) {
|
|||
}
|
||||
|
||||
async onPartnerChange(event) {
|
||||
const partner = game.actors.find(a => a.uuid === event.target.value);
|
||||
if (event.target.value) {
|
||||
const partner = game.actors.find(a => a.uuid === event.target.value);
|
||||
await partner.update({ 'system.companion': this.document.uuid });
|
||||
} else {
|
||||
const update = { 'system.companion': null };
|
||||
|
|
@ -74,6 +74,10 @@ export default class DhCompanionSheet extends DaggerheartSheet(ActorSheetV2) {
|
|||
}
|
||||
|
||||
await this.document.update({ 'system.partner': event.target.value });
|
||||
|
||||
if (!partner) {
|
||||
await this.document.updateLevel(1);
|
||||
}
|
||||
}
|
||||
|
||||
static async attackRoll(event) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue