mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 11:41:08 +01:00
159 - Companion (#224)
* Initial datamodel * Fixed attack * Temp * Fixed normal levelup * Fixed showing summary of new experiences * Touchups * level sync fixes * Reworked Action storage * Companions now take stress when damaged * Fixed Feature flow * Removed retroactive companion levelup * Restored delevel on partner removal * PR fixes * Added a check for card duplicates on character
This commit is contained in:
parent
6f1529fefe
commit
b7e4169079
57 changed files with 1682 additions and 1012 deletions
|
|
@ -96,7 +96,10 @@ export default class D20RollDialog extends HandlebarsApplicationMixin(Applicatio
|
|||
} else {
|
||||
this.config.experiences = [...this.config.experiences, button.dataset.key];
|
||||
} */
|
||||
this.config.experiences = this.config.experiences.indexOf(button.dataset.key) > -1 ? this.config.experiences.filter(x => x !== button.dataset.key) : [...this.config.experiences, button.dataset.key];
|
||||
this.config.experiences =
|
||||
this.config.experiences.indexOf(button.dataset.key) > -1
|
||||
? this.config.experiences.filter(x => x !== button.dataset.key)
|
||||
: [...this.config.experiences, button.dataset.key];
|
||||
this.render();
|
||||
}
|
||||
|
||||
|
|
@ -109,7 +112,7 @@ export default class D20RollDialog extends HandlebarsApplicationMixin(Applicatio
|
|||
if (!options.submitted) this.config = false;
|
||||
}
|
||||
|
||||
static async configure(roll, config = {}, options={}) {
|
||||
static async configure(roll, config = {}, options = {}) {
|
||||
return new Promise(resolve => {
|
||||
const app = new this(roll, config, options);
|
||||
app.addEventListener('close', () => resolve(app.config), { once: true });
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
const { ApplicationV2, HandlebarsApplicationMixin } = foundry.applications.api;
|
||||
|
||||
export default class DamageDialog extends HandlebarsApplicationMixin(ApplicationV2) {
|
||||
constructor(roll, config={}, options={}) {
|
||||
constructor(roll, config = {}, options = {}) {
|
||||
super(options);
|
||||
|
||||
this.roll = roll;
|
||||
|
|
@ -42,19 +42,19 @@ export default class DamageDialog extends HandlebarsApplicationMixin(Application
|
|||
}
|
||||
|
||||
static async submitRoll() {
|
||||
await this.close({ submitted: true });
|
||||
await this.close({ submitted: true });
|
||||
}
|
||||
|
||||
/** @override */
|
||||
_onClose(options={}) {
|
||||
if ( !options.submitted ) this.config = false;
|
||||
_onClose(options = {}) {
|
||||
if (!options.submitted) this.config = false;
|
||||
}
|
||||
|
||||
static async configure(roll, config={}) {
|
||||
static async configure(roll, config = {}) {
|
||||
return new Promise(resolve => {
|
||||
const app = new this(roll, config);
|
||||
app.addEventListener("close", () => resolve(app.config), { once: true });
|
||||
app.addEventListener('close', () => resolve(app.config), { once: true });
|
||||
app.render({ force: true });
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue