diff --git a/src/module/actor/character-sheet.js b/src/module/actor/character-sheet.js
index 3b34a94..d755b6f 100644
--- a/src/module/actor/character-sheet.js
+++ b/src/module/actor/character-sheet.js
@@ -39,10 +39,6 @@ export class OseActorSheetCharacter extends OseActorSheet {
getData() {
const data = super.getData();
- for (let [a, score] of Object.entries(data.data.scores)) {
- data.data.scores[a].label = game.i18n.localize(`OSE.scores.${a}`);
- }
-
// Settings
data.config.variableWeaponDamage = game.settings.get(
"ose",
diff --git a/src/module/config.js b/src/module/config.js
index 8313424..8332845 100644
--- a/src/module/config.js
+++ b/src/module/config.js
@@ -1,17 +1,24 @@
export const OSE = {
- scores: {
- str: "OSE.scores.str.long",
- int: "OSE.scores.int.long",
- dex: "OSE.scores.dex.long",
- wis: "OSE.scores.wis.long",
- con: "OSE.scores.con.long",
- cha: "OSE.scores.cha.long"
- },
- saves: {
- death: "OSE.saves.death.short",
- wand: "OSE.saves.wand.short",
- paralysis: "OSE.saves.paralysis.short",
- breath: "OSE.saves.breath.short",
- spell: "OSE.saves.spell.short"
- }
-};
\ No newline at end of file
+ scores: {
+ str: "OSE.scores.str.long",
+ int: "OSE.scores.int.long",
+ dex: "OSE.scores.dex.long",
+ wis: "OSE.scores.wis.long",
+ con: "OSE.scores.con.long",
+ cha: "OSE.scores.cha.long",
+ },
+ saves_short: {
+ death: "OSE.saves.death.short",
+ wand: "OSE.saves.wand.short",
+ paralysis: "OSE.saves.paralysis.short",
+ breath: "OSE.saves.breath.short",
+ spell: "OSE.saves.spell.short",
+ },
+ saves_long: {
+ death: "OSE.saves.death.long",
+ wand: "OSE.saves.wand.long",
+ paralysis: "OSE.saves.paralysis.long",
+ breath: "OSE.saves.breath.long",
+ spell: "OSE.saves.spell.long",
+ },
+};
diff --git a/src/module/item/entity.js b/src/module/item/entity.js
index 35eed8c..4b9d796 100644
--- a/src/module/item/entity.js
+++ b/src/module/item/entity.js
@@ -48,6 +48,7 @@ export class OseItem extends Item {
}
rollWeapon() {
+ console.log("WEAPON");
if (this.data.data.missile) {
this.actor.rollAttack({type: 'missile', label: this.name, dmg: this.data.data.damage});
} else if (this.data.data.melee) {
@@ -59,6 +60,7 @@ export class OseItem extends Item {
}
async rollFormula(options={}) {
+ console.log("FORMULA");
if ( !this.data.data.roll ) {
throw new Error("This Item does not have a formula to roll!");
}
@@ -99,6 +101,7 @@ export class OseItem extends Item {
hasDamage: this.hasDamage,
isSpell: this.data.type === "spell",
hasSave: this.hasSave,
+ config: CONFIG.OSE
};
// Render the chat card template
@@ -137,7 +140,11 @@ export class OseItem extends Item {
const header = event.currentTarget;
const card = header.closest(".chat-card");
const content = card.querySelector(".card-content");
- content.style.display = content.style.display === "none" ? "block" : "none";
+ if (content.style.display == "none") {
+ $(content).slideDown(200);
+ } else {
+ $(content).slideUp(200);
+ }
}
@@ -170,20 +177,20 @@ export class OseItem extends Item {
let targets = [];
if ( isTargetted ) {
targets = this._getChatCardTargets(card);
+ }
+
+ // Attack and Damage Rolls
+ if ( action === "damage" ) await item.rollDamage({event});
+ else if ( action === "formula" ) await item.rollFormula({event});
+
+ // Saving Throws for card targets
+ else if ( action == "save" ) {
if ( !targets.length ) {
ui.notifications.warn(`You must have one or more controlled Tokens in order to use this option.`);
return button.disabled = false;
}
- }
-
- // Attack and Damage Rolls
- else if ( action === "damage" ) await item.rollDamage({event});
- else if ( action === "formula" ) await item.rollFormula({event});
-
- // Saving Throws for card targets
- else if ( action === "save" ) {
for ( let t of targets ) {
- await t.rollAbilitySave(button.dataset.ability, {event});
+ await t.rollSave(button.dataset.save, {event});
}
}
diff --git a/src/ose.js b/src/ose.js
index be24242..664ee2a 100644
--- a/src/ose.js
+++ b/src/ose.js
@@ -55,9 +55,9 @@ Hooks.once("init", async function () {
*/
Hooks.once("setup", function () {
// Localize CONFIG objects once up-front
- const toLocalize = [];
+ const toLocalize = ["saves_short", "saves_long", "scores"];
for (let o of toLocalize) {
- CONFIG.MAJI[o] = Object.entries(CONFIG.OSE[o]).reduce((obj, e) => {
+ CONFIG.OSE[o] = Object.entries(CONFIG.OSE[o]).reduce((obj, e) => {
obj[e[0]] = game.i18n.localize(e[1]);
return obj;
}, {});
diff --git a/src/scss/apps.scss b/src/scss/apps.scss
index 0222691..9f15969 100644
--- a/src/scss/apps.scss
+++ b/src/scss/apps.scss
@@ -47,7 +47,6 @@
color: $colorOlive;
&:hover {
color: #111;
- text-shadow: 0 0 10px red;
}
}
}
diff --git a/src/templates/chat/item-card.html b/src/templates/chat/item-card.html
index d4d9a4f..1a93f7b 100644
--- a/src/templates/chat/item-card.html
+++ b/src/templates/chat/item-card.html
@@ -2,7 +2,7 @@
{{#if tokenId}}data-token-id="{{tokenId}}" {{/if}}>
-
{{item.name}}
+ {{item.name}}