Skip to content

Commit

Permalink
Add new forgotten adventures token artwork
Browse files Browse the repository at this point in the history
  • Loading branch information
aaclayton committed Jan 23, 2020
1 parent b3411ce commit 250ac8c
Show file tree
Hide file tree
Showing 20 changed files with 221 additions and 22 deletions.
7 changes: 4 additions & 3 deletions module/apps/ability-use-dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,20 @@ export class AbilityUseDialog extends Dialog {
});

// Create the Dialog and return as a Promise
return new Promise((resolve, reject) => {
return new Promise((resolve) => {
let formData = null;
const dlg = new this(item, {
title: `${item.name}: Ability Configuration`,
content: html,
buttons: {
use: {
icon: '<i class="fas fa-fist-raised"></i>',
label: "Use Ability",
callback: html => resolve(new FormData(html[0].querySelector("#ability-use-form")))
callback: html => formData = new FormData(html[0].querySelector("#ability-use-form"))
}
},
default: "use",
close: reject
close: () => resolve(formData)
});
dlg.render(true);
});
Expand Down
12 changes: 8 additions & 4 deletions module/item/entity.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,8 @@ export class Item5e extends Item {

// For feature items, optionally show an ability usage dialog
if (this.data.type === "feat") {
await this._rollFeat(configureDialog);
let configured = await this._rollFeat(configureDialog);
if ( configured === false ) return;
}

// Render the chat card template
Expand Down Expand Up @@ -242,6 +243,7 @@ export class Item5e extends Item {
/**
* Additional rolling steps when rolling a feat-type item
* @private
* @return {boolean} whether the roll should be prevented
*/
async _rollFeat(configureDialog) {
if ( this.data.type !== "feat" ) throw new Error("Wrong Item type");
Expand All @@ -253,9 +255,10 @@ export class Item5e extends Item {

// Determine whether the feat uses charges
if ( configureDialog ) {
const usageData = await AbilityUseDialog.create(this);
consume = Boolean(usageData.get("consume"));
placeTemplate = Boolean(usageData.get("placeTemplate"));
const usage = await AbilityUseDialog.create(this);
if ( usage === null ) return false;
consume = Boolean(usage.get("consume"));
placeTemplate = Boolean(usage.get("placeTemplate"));
}

// Update Item data
Expand All @@ -272,6 +275,7 @@ export class Item5e extends Item {
if ( template ) template.drawPreview(event);
if ( this.owner && this.owner.sheet ) this.owner.sheet.minimize();
}
return true;
}

/* -------------------------------------------- */
Expand Down
194 changes: 194 additions & 0 deletions packs/items.db

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions packs/monsters.db

Large diffs are not rendered by default.

Binary file added tokens/beast/DireWolf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tokens/beast/GiantBat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tokens/beast/GiantCentipede.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tokens/beast/GiantLizard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tokens/beast/GiantPoisonousSnake.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tokens/beast/Panther.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tokens/beast/SwarmBats.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tokens/beast/SwarmRats.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tokens/beast/SwarmRavens.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tokens/beast/WinterWolf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tokens/beast/Wolf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tokens/elemental/SteamMephit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tokens/humanoid/Grimlock.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tokens/plant/VioletFungus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tokens/undead/Skeleton.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tokens/undead/Zombie.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 250ac8c

Please sign in to comment.