Merge branch 'pr/52'
commit
c101c65cd3
10
src/acks.css
10
src/acks.css
|
@ -78,13 +78,14 @@
|
||||||
animation: 0.8s ease-in 1s infinite alternate notify;
|
animation: 0.8s ease-in 1s infinite alternate notify;
|
||||||
}
|
}
|
||||||
.acks.sheet.actor .sheet-tabs {
|
.acks.sheet.actor .sheet-tabs {
|
||||||
|
border-bottom: none;
|
||||||
|
justify-content: flex-end;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
transform: rotate(90deg);
|
transform: rotate(90deg);
|
||||||
top: 365px;
|
top: 365px;
|
||||||
right: -169px;
|
right: -169px;
|
||||||
width: 320px;
|
width: 320px;
|
||||||
border-top: none;
|
border-top: none;
|
||||||
height: 18px;
|
|
||||||
z-index: -1;
|
z-index: -1;
|
||||||
}
|
}
|
||||||
.acks.sheet.actor .sheet-tabs .item {
|
.acks.sheet.actor .sheet-tabs .item {
|
||||||
|
@ -95,7 +96,6 @@
|
||||||
background: url("/ui/parchment.jpg");
|
background: url("/ui/parchment.jpg");
|
||||||
border-top-right-radius: 4px;
|
border-top-right-radius: 4px;
|
||||||
border-top-left-radius: 80px;
|
border-top-left-radius: 80px;
|
||||||
border-bottom: 1px solid rgba(0, 0, 0, 0.15);
|
|
||||||
box-shadow: 0 0 6px 1px rgba(0, 0, 0, 0.9);
|
box-shadow: 0 0 6px 1px rgba(0, 0, 0, 0.9);
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
filter: brightness(0.9);
|
filter: brightness(0.9);
|
||||||
|
@ -107,6 +107,9 @@
|
||||||
text-shadow: none;
|
text-shadow: none;
|
||||||
margin-bottom: -1px;
|
margin-bottom: -1px;
|
||||||
}
|
}
|
||||||
|
.acks.sheet.actor .sheet-tabs .item:not(.active) {
|
||||||
|
border-bottom: 1px solid rgba(0, 0, 0, 0.15);
|
||||||
|
}
|
||||||
.acks.sheet.actor .sheet-body {
|
.acks.sheet.actor .sheet-body {
|
||||||
height: calc(100% - 140px);
|
height: calc(100% - 140px);
|
||||||
}
|
}
|
||||||
|
@ -491,7 +494,7 @@
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
background: url("/systems/acks/assets/treasure.png") no-repeat center;
|
background: url("/systems/acks/assets/treasure.png") no-repeat center;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
padding: 5px 8px;
|
padding: 16px 8px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
filter: grayscale(1) opacity(0.5);
|
filter: grayscale(1) opacity(0.5);
|
||||||
}
|
}
|
||||||
|
@ -633,7 +636,6 @@
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
.acks.chat-card .card-content .treasure-list .treasure div {
|
.acks.chat-card .card-content .treasure-list .treasure div {
|
||||||
text-indent: 10px;
|
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
16
src/acks.js
16
src/acks.js
|
@ -40,8 +40,8 @@ Hooks.once("init", async function () {
|
||||||
// Register custom system settings
|
// Register custom system settings
|
||||||
registerSettings();
|
registerSettings();
|
||||||
|
|
||||||
CONFIG.Actor.entityClass = AcksActor;
|
CONFIG.Actor.documentClass = AcksActor;
|
||||||
CONFIG.Item.entityClass = AcksItem;
|
CONFIG.Item.documentClass = AcksItem;
|
||||||
|
|
||||||
// Register sheet application classes
|
// Register sheet application classes
|
||||||
Actors.unregisterSheet("core", ActorSheet);
|
Actors.unregisterSheet("core", ActorSheet);
|
||||||
|
@ -54,7 +54,9 @@ Hooks.once("init", async function () {
|
||||||
makeDefault: true,
|
makeDefault: true,
|
||||||
});
|
});
|
||||||
Items.unregisterSheet("core", ItemSheet);
|
Items.unregisterSheet("core", ItemSheet);
|
||||||
Items.registerSheet("acks", AcksItemSheet, { makeDefault: true });
|
Items.registerSheet("acks", AcksItemSheet, {
|
||||||
|
makeDefault: true,
|
||||||
|
});
|
||||||
|
|
||||||
await preloadHandlebarsTemplates();
|
await preloadHandlebarsTemplates();
|
||||||
});
|
});
|
||||||
|
@ -86,10 +88,10 @@ Hooks.on("renderSidebarTab", async (object, html) => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Hooks.on("preCreateCombatant", (combat, data, options, id) => {
|
Hooks.on("createCombatant", async (combatant, options, userId) => {
|
||||||
let init = game.settings.get("acks", "initiative");
|
const init = game.settings.get("acks", "initiative");
|
||||||
if (init == "group") {
|
if (init === "group") {
|
||||||
AcksCombat.addCombatant(combat, data, options, id);
|
await AcksCombat.addCombatant(combatant, options, userId);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,7 @@ export class AcksActorSheet extends ActorSheet {
|
||||||
_onItemSummary(event) {
|
_onItemSummary(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
let li = $(event.currentTarget).parents(".item"),
|
let li = $(event.currentTarget).parents(".item"),
|
||||||
item = this.actor.getOwnedItem(li.data("item-id")),
|
item = this.actor.items.get(li.data("item-id")),
|
||||||
description = TextEditor.enrichHTML(item.data.data.description);
|
description = TextEditor.enrichHTML(item.data.data.description);
|
||||||
// Toggle summary
|
// Toggle summary
|
||||||
if (li.hasClass("expanded")) {
|
if (li.hasClass("expanded")) {
|
||||||
|
@ -94,7 +94,7 @@ export class AcksActorSheet extends ActorSheet {
|
||||||
async _onSpellChange(event) {
|
async _onSpellChange(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
const itemId = event.currentTarget.closest(".item").dataset.itemId;
|
const itemId = event.currentTarget.closest(".item").dataset.itemId;
|
||||||
const item = this.actor.getOwnedItem(itemId);
|
const item = this.actor.items.get(itemId);
|
||||||
if (event.target.dataset.field == "cast") {
|
if (event.target.dataset.field == "cast") {
|
||||||
return item.update({ "data.cast": parseInt(event.target.value) });
|
return item.update({ "data.cast": parseInt(event.target.value) });
|
||||||
} else if (event.target.dataset.field == "memorize") {
|
} else if (event.target.dataset.field == "memorize") {
|
||||||
|
@ -110,7 +110,7 @@ export class AcksActorSheet extends ActorSheet {
|
||||||
.find(".item");
|
.find(".item");
|
||||||
spells.each((_, el) => {
|
spells.each((_, el) => {
|
||||||
let itemId = el.dataset.itemId;
|
let itemId = el.dataset.itemId;
|
||||||
const item = this.actor.getOwnedItem(itemId);
|
const item = this.actor.items.get(itemId);
|
||||||
item.update({
|
item.update({
|
||||||
_id: item.id,
|
_id: item.id,
|
||||||
"data.cast": 0,
|
"data.cast": 0,
|
||||||
|
@ -130,7 +130,7 @@ export class AcksActorSheet extends ActorSheet {
|
||||||
|
|
||||||
html.find(".item .item-controls .item-show").click(async (ev) => {
|
html.find(".item .item-controls .item-show").click(async (ev) => {
|
||||||
const li = $(ev.currentTarget).parents(".item");
|
const li = $(ev.currentTarget).parents(".item");
|
||||||
const item = this.actor.getOwnedItem(li.data("itemId"));
|
const item = this.actor.items.get(li.data("itemId"));
|
||||||
item.show();
|
item.show();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -143,7 +143,7 @@ export class AcksActorSheet extends ActorSheet {
|
||||||
|
|
||||||
html.find(".item .item-rollable .item-image").click(async (ev) => {
|
html.find(".item .item-rollable .item-image").click(async (ev) => {
|
||||||
const li = $(ev.currentTarget).parents(".item");
|
const li = $(ev.currentTarget).parents(".item");
|
||||||
const item = this.actor.getOwnedItem(li.data("itemId"));
|
const item = this.actor.items.get(li.data("itemId"));
|
||||||
if (item.type == "weapon") {
|
if (item.type == "weapon") {
|
||||||
if (this.actor.data.type === "monster") {
|
if (this.actor.data.type === "monster") {
|
||||||
item.update({
|
item.update({
|
||||||
|
|
|
@ -121,7 +121,7 @@ export class AcksActorSheetCharacter extends AcksActorSheet {
|
||||||
async _onQtChange(event) {
|
async _onQtChange(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
const itemId = event.currentTarget.closest(".item").dataset.itemId;
|
const itemId = event.currentTarget.closest(".item").dataset.itemId;
|
||||||
const item = this.actor.getOwnedItem(itemId);
|
const item = this.actor.items.get(itemId);
|
||||||
return item.update({ "data.quantity.value": parseInt(event.target.value) });
|
return item.update({ "data.quantity.value": parseInt(event.target.value) });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -198,14 +198,16 @@ export class AcksActorSheetCharacter extends AcksActorSheet {
|
||||||
// Update Inventory Item
|
// Update Inventory Item
|
||||||
html.find(".item-edit").click((ev) => {
|
html.find(".item-edit").click((ev) => {
|
||||||
const li = $(ev.currentTarget).parents(".item");
|
const li = $(ev.currentTarget).parents(".item");
|
||||||
const item = this.actor.getOwnedItem(li.data("itemId"));
|
const item = this.actor.items.get(li.data("itemId"));
|
||||||
item.sheet.render(true);
|
item.sheet.render(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Delete Inventory Item
|
// Delete Inventory Item
|
||||||
html.find(".item-delete").click((ev) => {
|
html.find(".item-delete").click((ev) => {
|
||||||
const li = $(ev.currentTarget).parents(".item");
|
const li = $(ev.currentTarget).parents(".item");
|
||||||
this.actor.deleteOwnedItem(li.data("itemId"));
|
this.actor.deleteEmbeddedDocuments("Item", [
|
||||||
|
li.data("itemId"),
|
||||||
|
]);
|
||||||
li.slideUp(200, () => this.render(false));
|
li.slideUp(200, () => this.render(false));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -226,7 +228,7 @@ export class AcksActorSheetCharacter extends AcksActorSheet {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
html.find(".item-create").click((event) => {
|
html.find(".item-create").click(async (event) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
const header = event.currentTarget;
|
const header = event.currentTarget;
|
||||||
const type = header.dataset.type;
|
const type = header.dataset.type;
|
||||||
|
@ -236,14 +238,16 @@ export class AcksActorSheetCharacter extends AcksActorSheet {
|
||||||
data: duplicate(header.dataset),
|
data: duplicate(header.dataset),
|
||||||
};
|
};
|
||||||
delete itemData.data["type"];
|
delete itemData.data["type"];
|
||||||
return this.actor.createOwnedItem(itemData);
|
await this.actor.createEmbeddedDocuments("Item", [
|
||||||
|
itemData,
|
||||||
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
//Toggle Equipment
|
//Toggle Equipment
|
||||||
html.find(".item-toggle").click(async (ev) => {
|
html.find(".item-toggle").click(async (ev) => {
|
||||||
const li = $(ev.currentTarget).parents(".item");
|
const li = $(ev.currentTarget).parents(".item");
|
||||||
const item = this.actor.getOwnedItem(li.data("itemId"));
|
const item = this.actor.items.get(li.data("itemId"));
|
||||||
await this.actor.updateOwnedItem({
|
await item.update({
|
||||||
_id: li.data("itemId"),
|
_id: li.data("itemId"),
|
||||||
data: {
|
data: {
|
||||||
equipped: !item.data.data.equipped,
|
equipped: !item.data.data.equipped,
|
||||||
|
|
|
@ -35,24 +35,26 @@ export class AcksActor extends Actor {
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
/* Socket Listeners and Handlers
|
/* Socket Listeners and Handlers
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
getExperience(value, options = {}) {
|
async getExperience(value, options = {}) {
|
||||||
if (this.data.type != "character") {
|
if (this.data.type != "character") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let modified = Math.floor(
|
let modified = Math.floor(
|
||||||
value + (this.data.data.details.xp.bonus * value) / 100
|
value + (this.data.data.details.xp.bonus * value) / 100
|
||||||
);
|
);
|
||||||
return this.update({
|
|
||||||
|
await this.update({
|
||||||
"data.details.xp.value": modified + this.data.data.details.xp.value,
|
"data.details.xp.value": modified + this.data.data.details.xp.value,
|
||||||
}).then(() => {
|
});
|
||||||
const speaker = ChatMessage.getSpeaker({ actor: this });
|
|
||||||
ChatMessage.create({
|
const speaker = ChatMessage.getSpeaker({ actor: this });
|
||||||
content: game.i18n.format("ACKS.messages.GetExperience", {
|
await ChatMessage.create({
|
||||||
name: this.name,
|
content: game.i18n.format("ACKS.messages.GetExperience", {
|
||||||
value: modified,
|
name: this.name,
|
||||||
}),
|
value: modified,
|
||||||
speaker,
|
}),
|
||||||
});
|
speaker,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,7 +75,7 @@ export class AcksActor extends Actor {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
generateSave(hd) {
|
async generateSave(hd) {
|
||||||
let saves = {};
|
let saves = {};
|
||||||
for (let i = 0; i <= hd; i++) {
|
for (let i = 0; i <= hd; i++) {
|
||||||
let tmp = CONFIG.ACKS.monster_saves[i];
|
let tmp = CONFIG.ACKS.monster_saves[i];
|
||||||
|
@ -81,7 +83,8 @@ export class AcksActor extends Actor {
|
||||||
saves = tmp;
|
saves = tmp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.update({
|
|
||||||
|
await this.update({
|
||||||
"data.saves": {
|
"data.saves": {
|
||||||
death: {
|
death: {
|
||||||
value: saves.d,
|
value: saves.d,
|
||||||
|
@ -106,9 +109,13 @@ export class AcksActor extends Actor {
|
||||||
/* Rolls */
|
/* Rolls */
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
|
|
||||||
rollHP(options = {}) {
|
async rollHP(options = {}) {
|
||||||
let roll = new Roll(this.data.data.hp.hd).roll();
|
let roll = new Roll(this.data.data.hp.hd);
|
||||||
return this.update({
|
await roll.evaluate({
|
||||||
|
async: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
await this.update({
|
||||||
data: {
|
data: {
|
||||||
hp: {
|
hp: {
|
||||||
max: roll.total,
|
max: roll.total,
|
||||||
|
@ -572,7 +579,7 @@ export class AcksActor extends Actor {
|
||||||
const dh = Math.clamped(hp.value - amount, -99, hp.max);
|
const dh = Math.clamped(hp.value - amount, -99, hp.max);
|
||||||
|
|
||||||
// Update the Actor
|
// Update the Actor
|
||||||
return this.update({
|
await this.update({
|
||||||
"data.hp.value": dh,
|
"data.hp.value": dh,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -698,10 +705,10 @@ export class AcksActor extends Actor {
|
||||||
// Compute treasure
|
// Compute treasure
|
||||||
let total = 0;
|
let total = 0;
|
||||||
let treasure = this.data.items.filter(
|
let treasure = this.data.items.filter(
|
||||||
(i) => i.type == "item" && i.data.treasure
|
(i) => i.data.type == "item" && i.data.data.treasure
|
||||||
);
|
);
|
||||||
treasure.forEach((item) => {
|
treasure.forEach((item) => {
|
||||||
total += item.data.quantity.value * item.data.cost
|
total += item.data.data.quantity.value * item.data.data.cost
|
||||||
});
|
});
|
||||||
data.treasure = total;
|
data.treasure = total;
|
||||||
}
|
}
|
||||||
|
@ -718,14 +725,14 @@ export class AcksActor extends Actor {
|
||||||
const data = this.data.data;
|
const data = this.data.data;
|
||||||
data.aac.naked = baseAac + data.scores.dex.mod;
|
data.aac.naked = baseAac + data.scores.dex.mod;
|
||||||
data.ac.naked = baseAc - data.scores.dex.mod;
|
data.ac.naked = baseAc - data.scores.dex.mod;
|
||||||
const armors = this.data.items.filter((i) => i.type == "armor");
|
const armors = this.data.items.filter((i) => i.data.type == "armor");
|
||||||
armors.forEach((a) => {
|
armors.forEach((a) => {
|
||||||
if (a.data.equipped && a.data.type != "shield") {
|
if (a.data.data.equipped && a.data.type != "shield") {
|
||||||
baseAc = a.data.ac.value;
|
baseAc = a.data.data.ac;
|
||||||
baseAac = a.data.aac.value;
|
baseAac = a.data.data.aac.value;
|
||||||
} else if (a.data.equipped && a.data.type == "shield") {
|
} else if (a.data.data.equipped && a.data.type == "shield") {
|
||||||
AcShield = a.data.ac.value;
|
AcShield = a.data.data.ac;
|
||||||
AacShield = a.data.aac.value;
|
AacShield = a.data.data.aac.value;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
data.aac.value = baseAac + data.scores.dex.mod + AacShield + data.aac.mod;
|
data.aac.value = baseAac + data.scores.dex.mod + AacShield + data.aac.mod;
|
||||||
|
|
|
@ -76,12 +76,11 @@ export class AcksActorSheetMonster extends AcksActorSheet {
|
||||||
|
|
||||||
// Settings
|
// Settings
|
||||||
data.config.morale = game.settings.get("acks", "morale");
|
data.config.morale = game.settings.get("acks", "morale");
|
||||||
data.data.details.treasure.link = TextEditor.enrichHTML(data.data.details.treasure.table);
|
data.data.data.details.treasure.link = TextEditor.enrichHTML(data.data.data.details.treasure.table);
|
||||||
data.isNew = this.actor.isNew();
|
data.isNew = this.actor.isNew();
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async _onDrop(event) {
|
async _onDrop(event) {
|
||||||
super._onDrop(event);
|
super._onDrop(event);
|
||||||
let data;
|
let data;
|
||||||
|
@ -137,13 +136,11 @@ export class AcksActorSheetMonster extends AcksActorSheet {
|
||||||
}
|
}
|
||||||
|
|
||||||
async _resetCounters(event) {
|
async _resetCounters(event) {
|
||||||
const weapons = this.actor.data.items.filter(i => i.type === 'weapon');
|
for (const weapon of this.actor.itemTypes["weapon"]) {
|
||||||
for (let wp of weapons) {
|
await weapon.update({
|
||||||
const item = this.actor.getOwnedItem(wp._id);
|
|
||||||
await item.update({
|
|
||||||
data: {
|
data: {
|
||||||
counter: {
|
counter: {
|
||||||
value: parseInt(wp.data.counter.max),
|
value: parseInt(weapon.data.data.counter.max, 10),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -153,7 +150,7 @@ export class AcksActorSheetMonster extends AcksActorSheet {
|
||||||
async _onCountChange(event) {
|
async _onCountChange(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
const itemId = event.currentTarget.closest(".item").dataset.itemId;
|
const itemId = event.currentTarget.closest(".item").dataset.itemId;
|
||||||
const item = this.actor.getOwnedItem(itemId);
|
const item = this.actor.items.get(itemId);
|
||||||
if (event.target.dataset.field == "value") {
|
if (event.target.dataset.field == "value") {
|
||||||
return item.update({
|
return item.update({
|
||||||
"data.counter.value": parseInt(event.target.value),
|
"data.counter.value": parseInt(event.target.value),
|
||||||
|
@ -194,18 +191,20 @@ export class AcksActorSheetMonster extends AcksActorSheet {
|
||||||
// Update Inventory Item
|
// Update Inventory Item
|
||||||
html.find(".item-edit").click((ev) => {
|
html.find(".item-edit").click((ev) => {
|
||||||
const li = $(ev.currentTarget).parents(".item");
|
const li = $(ev.currentTarget).parents(".item");
|
||||||
const item = this.actor.getOwnedItem(li.data("itemId"));
|
const item = this.actor.items.get(li.data("itemId"));
|
||||||
item.sheet.render(true);
|
item.sheet.render(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Delete Inventory Item
|
// Delete Inventory Item
|
||||||
html.find(".item-delete").click((ev) => {
|
html.find(".item-delete").click((ev) => {
|
||||||
const li = $(ev.currentTarget).parents(".item");
|
const li = $(ev.currentTarget).parents(".item");
|
||||||
this.actor.deleteOwnedItem(li.data("itemId"));
|
this.actor.deleteEmbeddedDocuments("Item", [
|
||||||
|
li.data("itemId"),
|
||||||
|
]);
|
||||||
li.slideUp(200, () => this.render(false));
|
li.slideUp(200, () => this.render(false));
|
||||||
});
|
});
|
||||||
|
|
||||||
html.find(".item-create").click((event) => {
|
html.find(".item-create").click(async (event) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
const header = event.currentTarget;
|
const header = event.currentTarget;
|
||||||
const type = header.dataset.type;
|
const type = header.dataset.type;
|
||||||
|
@ -224,14 +223,18 @@ export class AcksActorSheetMonster extends AcksActorSheet {
|
||||||
// Getting back to main logic
|
// Getting back to main logic
|
||||||
if (type == "choice") {
|
if (type == "choice") {
|
||||||
const choices = header.dataset.choices.split(",");
|
const choices = header.dataset.choices.split(",");
|
||||||
this._chooseItemType(choices).then((dialogInput) => {
|
this._chooseItemType(choices).then(async (dialogInput) => {
|
||||||
const itemData = createItem(dialogInput.type, dialogInput.name);
|
const itemData = createItem(dialogInput.type, dialogInput.name);
|
||||||
this.actor.createOwnedItem(itemData, {});
|
await this.actor.createEmbeddedDocuments("Item", [
|
||||||
|
itemData,
|
||||||
|
]);
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const itemData = createItem(type);
|
const itemData = createItem(type);
|
||||||
return this.actor.createOwnedItem(itemData, {});
|
await this.actor.createEmbeddedDocuments("Item", [
|
||||||
|
itemData,
|
||||||
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
html.find(".item-reset").click((ev) => {
|
html.find(".item-reset").click((ev) => {
|
||||||
|
@ -250,7 +253,7 @@ export class AcksActorSheetMonster extends AcksActorSheet {
|
||||||
|
|
||||||
html.find(".item-pattern").click(ev => {
|
html.find(".item-pattern").click(ev => {
|
||||||
const li = $(ev.currentTarget).parents(".item");
|
const li = $(ev.currentTarget).parents(".item");
|
||||||
const item = this.actor.getOwnedItem(li.data("itemId"));
|
const item = this.actor.items.get(li.data("itemId"));
|
||||||
let currentColor = item.data.data.pattern;
|
let currentColor = item.data.data.pattern;
|
||||||
let colors = Object.keys(CONFIG.ACKS.colors);
|
let colors = Object.keys(CONFIG.ACKS.colors);
|
||||||
let index = colors.indexOf(currentColor);
|
let index = colors.indexOf(currentColor);
|
||||||
|
|
|
@ -1,79 +1,112 @@
|
||||||
export class AcksCombat {
|
export class AcksCombat {
|
||||||
static rollInitiative(combat, data) {
|
static async rollInitiative(combat, data) {
|
||||||
// Check groups
|
// Initialize groups.
|
||||||
data.combatants = [];
|
data.combatants = [];
|
||||||
let groups = {};
|
let groups = {};
|
||||||
combat.data.combatants.forEach((cbt) => {
|
combat.data.combatants.forEach((cbt) => {
|
||||||
groups[cbt.flags.acks.group] = { present: true };
|
groups[cbt.data.flags.acks.group] = {present: true};
|
||||||
data.combatants.push(cbt);
|
data.combatants.push(cbt);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Roll init
|
// Roll initiative for each group.
|
||||||
Object.keys(groups).forEach((group) => {
|
for (const group in groups) {
|
||||||
let roll = new Roll("1d6").roll();
|
const roll = new Roll("1d6");
|
||||||
roll.toMessage({
|
await roll.evaluate({async: true});
|
||||||
flavor: game.i18n.format('ACKS.roll.initiative', { group: CONFIG["ACKS"].colors[group] }),
|
await roll.toMessage({
|
||||||
|
flavor: game.i18n.format('ACKS.roll.initiative', {
|
||||||
|
group: CONFIG["ACKS"].colors[group],
|
||||||
|
}),
|
||||||
});
|
});
|
||||||
groups[group].initiative = roll.total;
|
|
||||||
});
|
|
||||||
|
|
||||||
// Set init
|
groups[group].initiative = roll.total;
|
||||||
for (let i = 0; i < data.combatants.length; ++i) {
|
}
|
||||||
if (!data.combatants[i].actor) {
|
|
||||||
|
// Set the inititative for each group combatant.
|
||||||
|
for (const combatant of data.combatants) {
|
||||||
|
if (!combatant.actor) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
data.combatants[i].initiative =
|
|
||||||
groups[data.combatants[i].flags.acks.group].initiative;
|
let initiative = groups[combatant.data.flags.acks.group].initiative;
|
||||||
if (data.combatants[i].actor.data.data.isSlow) {
|
if (combatant.actor.data.data.isSlow) {
|
||||||
data.combatants[i].initiative -= 1;
|
initiative -= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await combatant.update({
|
||||||
|
initiative: initiative,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
combat.setupTurns();
|
combat.setupTurns();
|
||||||
}
|
}
|
||||||
|
|
||||||
static async resetInitiative(combat, data) {
|
static async resetInitiative(combat, data) {
|
||||||
let reroll = game.settings.get("acks", "initiative");
|
const reroll = game.settings.get("acks", "initiativePersistence");
|
||||||
if (!["reset", "reroll"].includes(reroll)) {
|
if (!["reset", "reroll"].includes(reroll)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
combat.resetAll();
|
combat.resetAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
static async individualInitiative(combat, data) {
|
static async individualInitiative(combat, data) {
|
||||||
let updates = [];
|
const updates = [];
|
||||||
let messages = [];
|
const messages = [];
|
||||||
combat.data.combatants.forEach((c, i) => {
|
|
||||||
// This comes from foundry.js, had to remove the update turns thing
|
let index = 0;
|
||||||
// Roll initiative
|
|
||||||
const cf = combat._getInitiativeFormula(c);
|
for (const [id, combatant] of combat.data.combatants.entries()) {
|
||||||
const roll = combat._getInitiativeRoll(c, cf);
|
const roll = combatant.getInitiativeRoll();
|
||||||
|
await roll.evaluate({async: true});
|
||||||
let value = roll.total;
|
let value = roll.total;
|
||||||
if (combat.settings.skipDefeated && c.defeated) {
|
|
||||||
|
if (combat.settings.skipDefeated && combatant.defeated) {
|
||||||
value = -790;
|
value = -790;
|
||||||
}
|
}
|
||||||
updates.push({ _id: c._id, initiative: value });
|
|
||||||
|
updates.push({
|
||||||
|
_id: id,
|
||||||
|
initiative: value,
|
||||||
|
});
|
||||||
|
|
||||||
// Determine the roll mode
|
// Determine the roll mode
|
||||||
let rollMode = game.settings.get("core", "rollMode");
|
let rollMode = game.settings.get("core", "rollMode");
|
||||||
if ((c.token.hidden || c.hidden) && (rollMode === "roll")) rollMode = "gmroll";
|
if ((combatant.token.hidden || combatant.hidden)
|
||||||
|
&& (rollMode === "roll")) {
|
||||||
|
rollMode = "gmroll";
|
||||||
|
}
|
||||||
|
|
||||||
// Construct chat message data
|
// Construct chat message data
|
||||||
let messageData = mergeObject({
|
const messageData = mergeObject({
|
||||||
speaker: {
|
speaker: {
|
||||||
scene: canvas.scene._id,
|
scene: canvas.scene._id,
|
||||||
actor: c.actor ? c.actor._id : null,
|
actor: combatant.actor?.id || null,
|
||||||
token: c.token._id,
|
token: combatant.token.id,
|
||||||
alias: c.token.name
|
alias: combatant.token.name
|
||||||
},
|
},
|
||||||
flavor: game.i18n.format('ACKS.roll.individualInit', { name: c.token.name })
|
flavor: game.i18n.format('ACKS.roll.individualInit', {
|
||||||
|
name: combatant.token.name,
|
||||||
|
}),
|
||||||
}, {});
|
}, {});
|
||||||
const chatData = roll.toMessage(messageData, { rollMode, create: false });
|
|
||||||
|
|
||||||
if (i > 0) chatData.sound = null; // Only play 1 sound for the whole set
|
const chatData = await roll.toMessage(messageData, {
|
||||||
|
rollMode,
|
||||||
|
create: false,
|
||||||
|
});
|
||||||
|
|
||||||
|
// Only play one sound for the whole set.
|
||||||
|
if (index > 0) {
|
||||||
|
chatData.sound = null;
|
||||||
|
}
|
||||||
|
|
||||||
messages.push(chatData);
|
messages.push(chatData);
|
||||||
});
|
|
||||||
await combat.updateEmbeddedEntity("Combatant", updates);
|
++index;
|
||||||
await CONFIG.ChatMessage.entityClass.create(messages);
|
}
|
||||||
|
|
||||||
|
await combat.updateEmbeddedDocuments("Combatant", updates);
|
||||||
|
await CONFIG.ChatMessage.documentClass.create(messages);
|
||||||
|
|
||||||
data.turn = 0;
|
data.turn = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,20 +125,21 @@ export class AcksCombat {
|
||||||
html.find(".combatant").each((_, ct) => {
|
html.find(".combatant").each((_, ct) => {
|
||||||
// Append spellcast and retreat
|
// Append spellcast and retreat
|
||||||
const controls = $(ct).find(".combatant-controls .combatant-control");
|
const controls = $(ct).find(".combatant-controls .combatant-control");
|
||||||
const cmbtant = object.combat.getCombatant(ct.dataset.combatantId);
|
const cmbtant = game.combat.combatants.get(ct.dataset.combatantId);
|
||||||
const moveActive = cmbtant.flags.acks && cmbtant.flags.acks.moveInCombat ? "active" : "";
|
const moveActive = cmbtant.data.flags.acks?.moveInCombat ? "active" : "";
|
||||||
controls.eq(1).after(
|
controls.eq(1).after(
|
||||||
`<a class='combatant-control move-combat ${moveActive}'><i class='fas fa-running'></i></a>`
|
`<a class='combatant-control move-combat ${moveActive}'><i class='fas fa-running'></i></a>`
|
||||||
);
|
);
|
||||||
const spellActive = cmbtant.flags.acks && cmbtant.flags.acks.prepareSpell ? "active" : "";
|
const spellActive = cmbtant.data.flags.acks?.prepareSpell ? "active" : "";
|
||||||
controls.eq(1).after(
|
controls.eq(1).after(
|
||||||
`<a class='combatant-control prepare-spell ${spellActive}'><i class='fas fa-magic'></i></a>`
|
`<a class='combatant-control prepare-spell ${spellActive}'><i class='fas fa-magic'></i></a>`
|
||||||
);
|
);
|
||||||
const holdActive = cmbtant.flags.acks && cmbtant.flags.acks.holdTurn ? "active" : "";
|
const holdActive = cmbtant.data.flags.acks?.holdTurn ? "active" : "";
|
||||||
controls.eq(1).after(
|
controls.eq(1).after(
|
||||||
`<a class='combatant-control hold-turn ${holdActive}'><i class='fas fa-pause-circle'></i></a>`
|
`<a class='combatant-control hold-turn ${holdActive}'><i class='fas fa-pause-circle'></i></a>`
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
AcksCombat.announceListener(html);
|
AcksCombat.announceListener(html);
|
||||||
|
|
||||||
let init = game.settings.get("acks", "initiative") === "group";
|
let init = game.settings.get("acks", "initiative") === "group";
|
||||||
|
@ -127,8 +161,8 @@ export class AcksCombat {
|
||||||
$(ct).find(".roll").remove();
|
$(ct).find(".roll").remove();
|
||||||
|
|
||||||
// Get group color
|
// Get group color
|
||||||
const cmbtant = object.combat.getCombatant(ct.dataset.combatantId);
|
const combatant = object.viewed.combatants.get(ct.dataset.combatantId);
|
||||||
let color = cmbtant.flags.acks.group;
|
let color = combatant.data.flags.acks?.group;
|
||||||
|
|
||||||
// Append colored flag
|
// Append colored flag
|
||||||
let controls = $(ct).find(".combatant-controls");
|
let controls = $(ct).find(".combatant-controls");
|
||||||
|
@ -136,6 +170,7 @@ export class AcksCombat {
|
||||||
`<a class='combatant-control flag' style='color:${color}' title="${CONFIG.ACKS.colors[color]}"><i class='fas fa-flag'></i></a>`
|
`<a class='combatant-control flag' style='color:${color}' title="${CONFIG.ACKS.colors[color]}"><i class='fas fa-flag'></i></a>`
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
AcksCombat.addListeners(html);
|
AcksCombat.addListeners(html);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -155,7 +190,7 @@ export class AcksCombat {
|
||||||
ct.initiative &&
|
ct.initiative &&
|
||||||
ct.initiative != "-789.00" &&
|
ct.initiative != "-789.00" &&
|
||||||
ct._id != data._id &&
|
ct._id != data._id &&
|
||||||
ct.flags.acks.group == combatant.flags.acks.group
|
ct.data.flags.acks.group == combatant.data.flags.acks.group
|
||||||
) {
|
) {
|
||||||
groupInit = ct.initiative;
|
groupInit = ct.initiative;
|
||||||
// Set init
|
// Set init
|
||||||
|
@ -166,75 +201,109 @@ export class AcksCombat {
|
||||||
}
|
}
|
||||||
|
|
||||||
static announceListener(html) {
|
static announceListener(html) {
|
||||||
html.find(".combatant-control.hold-turn").click((ev) => {
|
html.find(".combatant-control.hold-turn").click(async (event) => {
|
||||||
ev.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
// Toggle hold announcement
|
// Toggle hold announcement
|
||||||
let id = $(ev.currentTarget).closest(".combatant")[0].dataset.combatantId;
|
const id = $(event.currentTarget).closest(".combatant")[0].dataset.combatantId;
|
||||||
let isActive = ev.currentTarget.classList.contains('active');
|
const isActive = event.currentTarget.classList.contains('active');
|
||||||
game.combat.updateCombatant({
|
const combatant = game.combat.combatants.get(id);
|
||||||
|
await combatant.update({
|
||||||
_id: id,
|
_id: id,
|
||||||
flags: { acks: { holdTurn: !isActive } },
|
flags: {
|
||||||
|
acks: {
|
||||||
|
holdTurn: !isActive,
|
||||||
|
},
|
||||||
|
},
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
html.find(".combatant-control.prepare-spell").click((ev) => {
|
|
||||||
ev.preventDefault();
|
html.find(".combatant-control.prepare-spell").click(async (event) => {
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
// Toggle spell announcement
|
// Toggle spell announcement
|
||||||
let id = $(ev.currentTarget).closest(".combatant")[0].dataset.combatantId;
|
const id = $(event.currentTarget).closest(".combatant")[0].dataset.combatantId;
|
||||||
let isActive = ev.currentTarget.classList.contains('active');
|
const isActive = event.currentTarget.classList.contains('active');
|
||||||
game.combat.updateCombatant({
|
const combatant = game.combat.combatants.get(id);
|
||||||
|
await combatant.update({
|
||||||
_id: id,
|
_id: id,
|
||||||
flags: { acks: { prepareSpell: !isActive } },
|
flags: {
|
||||||
|
acks: {
|
||||||
|
prepareSpell: !isActive,
|
||||||
|
},
|
||||||
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
html.find(".combatant-control.move-combat").click((ev) => {
|
|
||||||
ev.preventDefault();
|
html.find(".combatant-control.move-combat").click(async (event) => {
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
// Toggle retreat announcement
|
// Toggle retreat announcement
|
||||||
let id = $(ev.currentTarget).closest(".combatant")[0].dataset.combatantId;
|
const id = $(event.currentTarget).closest(".combatant")[0].dataset.combatantId;
|
||||||
let isActive = ev.currentTarget.classList.contains('active');
|
const isActive = event.currentTarget.classList.contains('active');
|
||||||
game.combat.updateCombatant({
|
const combatant = game.combat.combatants.get(id);
|
||||||
|
await combatant.update({
|
||||||
_id: id,
|
_id: id,
|
||||||
flags: { acks: { moveInCombat: !isActive } },
|
flags: {
|
||||||
|
acks: {
|
||||||
|
moveInCombat: !isActive,
|
||||||
|
},
|
||||||
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
static addListeners(html) {
|
static addListeners(html) {
|
||||||
// Cycle through colors
|
// Cycle through colors
|
||||||
html.find(".combatant-control.flag").click((ev) => {
|
html.find(".combatant-control.flag").click(async (event) => {
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
if (!game.user.isGM) {
|
if (!game.user.isGM) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let currentColor = ev.currentTarget.style.color;
|
|
||||||
let colors = Object.keys(CONFIG.ACKS.colors);
|
const currentColor = event.currentTarget.style.color;
|
||||||
|
const colors = Object.keys(CONFIG.ACKS.colors);
|
||||||
let index = colors.indexOf(currentColor);
|
let index = colors.indexOf(currentColor);
|
||||||
if (index + 1 == colors.length) {
|
if (index + 1 == colors.length) {
|
||||||
index = 0;
|
index = 0;
|
||||||
} else {
|
} else {
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
let id = $(ev.currentTarget).closest(".combatant")[0].dataset.combatantId;
|
|
||||||
game.combat.updateCombatant({
|
const id = $(event.currentTarget).closest(".combatant")[0].dataset.combatantId;
|
||||||
|
const combatant = game.combat.combatants.get(id);
|
||||||
|
await combatant.update({
|
||||||
_id: id,
|
_id: id,
|
||||||
flags: { acks: { group: colors[index] } },
|
flags: {
|
||||||
|
acks: {
|
||||||
|
group: colors[index],
|
||||||
|
},
|
||||||
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
html.find('.combat-control[data-control="reroll"]').click((ev) => {
|
html.find('.combat-control[data-control="reroll"]').click(async (event) => {
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
if (!game.combat) {
|
if (!game.combat) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let data = {};
|
|
||||||
|
const data = {};
|
||||||
AcksCombat.rollInitiative(game.combat, data);
|
AcksCombat.rollInitiative(game.combat, data);
|
||||||
game.combat.update({ data: data }).then(() => {
|
|
||||||
game.combat.setupTurns();
|
await game.combat.update({
|
||||||
});
|
data: data,
|
||||||
|
})
|
||||||
|
|
||||||
|
game.combat.setupTurns();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
static addCombatant(combat, data, options, id) {
|
static async addCombatant(combatant, options, userId) {
|
||||||
let token = canvas.tokens.get(data.tokenId);
|
|
||||||
let color = "black";
|
let color = "black";
|
||||||
switch (token.data.disposition) {
|
switch (combatant.token.data.disposition) {
|
||||||
case -1:
|
case -1:
|
||||||
color = "red";
|
color = "red";
|
||||||
break;
|
break;
|
||||||
|
@ -245,12 +314,16 @@ export class AcksCombat {
|
||||||
color = "green";
|
color = "green";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
data.flags = {
|
|
||||||
acks: {
|
await combatant.update({
|
||||||
group: color,
|
flags: {
|
||||||
|
acks: {
|
||||||
|
group: color,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
static activateCombatant(li) {
|
static activateCombatant(li) {
|
||||||
const turn = game.combat.turns.findIndex(turn => turn._id === li.data('combatant-id'));
|
const turn = game.combat.turns.findIndex(turn => turn._id === li.data('combatant-id'));
|
||||||
game.combat.update({turn: turn})
|
game.combat.update({turn: turn})
|
||||||
|
@ -265,12 +338,13 @@ export class AcksCombat {
|
||||||
}
|
}
|
||||||
|
|
||||||
static async preUpdateCombat(combat, data, diff, id) {
|
static async preUpdateCombat(combat, data, diff, id) {
|
||||||
let init = game.settings.get("acks", "initiative");
|
|
||||||
let reroll = game.settings.get("acks", "initiative");
|
|
||||||
if (!data.round) {
|
if (!data.round) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data.round !== 1) {
|
if (data.round !== 1) {
|
||||||
|
const reroll = game.settings.get("acks", "initiativePersistence");
|
||||||
|
|
||||||
if (reroll === "reset") {
|
if (reroll === "reset") {
|
||||||
AcksCombat.resetInitiative(combat, data, diff, id);
|
AcksCombat.resetInitiative(combat, data, diff, id);
|
||||||
return;
|
return;
|
||||||
|
@ -278,6 +352,9 @@ export class AcksCombat {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const init = game.settings.get("acks", "initiative");
|
||||||
|
|
||||||
if (init === "group") {
|
if (init === "group") {
|
||||||
AcksCombat.rollInitiative(combat, data, diff, id);
|
AcksCombat.rollInitiative(combat, data, diff, id);
|
||||||
} else if (init === "individual") {
|
} else if (init === "individual") {
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
import { AcksActor } from '../actor/entity.js';
|
|
||||||
import { AcksDice } from "../dice.js";
|
import { AcksDice } from "../dice.js";
|
||||||
|
|
||||||
export class AcksCharacterCreator extends FormApplication {
|
export class AcksCharacterCreator extends FormApplication {
|
||||||
static get defaultOptions() {
|
static get defaultOptions() {
|
||||||
const options = super.defaultOptions;
|
const options = super.defaultOptions;
|
||||||
options.classes = ["acks", "dialog", "creator"],
|
options.classes = ["acks", "dialog", "creator"],
|
||||||
options.id = 'character-creator';
|
options.id = 'character-creator';
|
||||||
options.template =
|
options.template = 'systems/acks/templates/actors/dialogs/character-creation.html';
|
||||||
'systems/acks/templates/actors/dialogs/character-creation.html';
|
|
||||||
options.width = 235;
|
options.width = 235;
|
||||||
return options;
|
return options;
|
||||||
}
|
}
|
||||||
|
@ -169,7 +167,10 @@ export class AcksCharacterCreator extends FormApplication {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this.object.createOwnedItem(itemData);
|
|
||||||
|
await this.object.createEmbeddedDocuments("Item", [
|
||||||
|
itemData,
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* This method is called upon form submission after form data is validated
|
* This method is called upon form submission after form data is validated
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
import { AcksActor } from '../actor/entity.js';
|
|
||||||
|
|
||||||
export class AcksCharacterModifiers extends FormApplication {
|
export class AcksCharacterModifiers extends FormApplication {
|
||||||
static get defaultOptions() {
|
static get defaultOptions() {
|
||||||
const options = super.defaultOptions;
|
const options = super.defaultOptions;
|
||||||
|
@ -29,8 +27,10 @@ export class AcksCharacterModifiers extends FormApplication {
|
||||||
* @return {Object}
|
* @return {Object}
|
||||||
*/
|
*/
|
||||||
getData() {
|
getData() {
|
||||||
let data = this.object.data;
|
const data = this.object.data;
|
||||||
|
|
||||||
data.user = game.user;
|
data.user = game.user;
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
import { AcksActor } from '../actor/entity.js';
|
|
||||||
|
|
||||||
export class AcksEntityTweaks extends FormApplication {
|
export class AcksEntityTweaks extends FormApplication {
|
||||||
static get defaultOptions() {
|
static get defaultOptions() {
|
||||||
const options = super.defaultOptions;
|
const options = super.defaultOptions;
|
||||||
|
@ -28,12 +26,15 @@ export class AcksEntityTweaks extends FormApplication {
|
||||||
* @return {Object}
|
* @return {Object}
|
||||||
*/
|
*/
|
||||||
getData() {
|
getData() {
|
||||||
let data = this.object.data;
|
const data = this.object.data;
|
||||||
|
|
||||||
if (this.object.data.type === 'character') {
|
if (this.object.data.type === 'character') {
|
||||||
data.isCharacter = true;
|
data.isCharacter = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
data.user = game.user;
|
data.user = game.user;
|
||||||
data.config = CONFIG.ACKS;
|
data.config = CONFIG.ACKS;
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,9 +53,11 @@ export class AcksEntityTweaks extends FormApplication {
|
||||||
*/
|
*/
|
||||||
async _updateObject(event, formData) {
|
async _updateObject(event, formData) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
// Update the actor
|
|
||||||
|
// Update the actor.
|
||||||
this.object.update(formData);
|
this.object.update(formData);
|
||||||
// Re-draw the updated sheet
|
|
||||||
|
// Render the updated sheet.
|
||||||
this.object.sheet.render(true);
|
this.object.sheet.render(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,12 +30,14 @@ export class AcksPartySheet extends FormApplication {
|
||||||
const settings = {
|
const settings = {
|
||||||
ascending: game.settings.get('acks', 'ascendingAC')
|
ascending: game.settings.get('acks', 'ascendingAC')
|
||||||
};
|
};
|
||||||
let data = {
|
|
||||||
|
const data = {
|
||||||
data: this.object,
|
data: this.object,
|
||||||
config: CONFIG.ACKS,
|
config: CONFIG.ACKS,
|
||||||
user: game.user,
|
user: game.user,
|
||||||
settings: settings
|
settings: settings
|
||||||
};
|
};
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,15 +57,18 @@ export class AcksPartySheet extends FormApplication {
|
||||||
_dealXP(ev) {
|
_dealXP(ev) {
|
||||||
// Grab experience
|
// Grab experience
|
||||||
const template = `
|
const template = `
|
||||||
<form>
|
<form>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Amount</label>
|
<label>Amount</label>
|
||||||
<input name="total" placeholder="0" type="text"/>
|
<input name="total" placeholder="0" type="text"/>
|
||||||
</div>
|
</div>
|
||||||
</form>`;
|
</form>
|
||||||
let pcs = this.object.entities.filter((e) => {
|
`;
|
||||||
return e.getFlag('acks', 'party') && e.data.type == "character";
|
|
||||||
|
let pcs = this.object.documents.filter((actor) => {
|
||||||
|
return actor.getFlag('acks', 'party') && actor.data.type === "character";
|
||||||
});
|
});
|
||||||
|
|
||||||
new Dialog({
|
new Dialog({
|
||||||
title: "Deal Experience",
|
title: "Deal Experience",
|
||||||
content: template,
|
content: template,
|
||||||
|
@ -89,11 +94,13 @@ export class AcksPartySheet extends FormApplication {
|
||||||
}).render(true);
|
}).render(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
async _selectActors(ev) {
|
async _selectActors(event) {
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
const template = "/systems/acks/templates/apps/party-select.html";
|
const template = "/systems/acks/templates/apps/party-select.html";
|
||||||
const templateData = {
|
const templateData = {
|
||||||
actors: this.object.entities
|
actors: this.object.documents,
|
||||||
}
|
};
|
||||||
const content = await renderTemplate(template, templateData);
|
const content = await renderTemplate(template, templateData);
|
||||||
new Dialog({
|
new Dialog({
|
||||||
title: "Select Party Characters",
|
title: "Select Party Characters",
|
||||||
|
@ -106,7 +113,7 @@ export class AcksPartySheet extends FormApplication {
|
||||||
let checks = html.find("input[data-action='select-actor']");
|
let checks = html.find("input[data-action='select-actor']");
|
||||||
checks.each(async (_, c) => {
|
checks.each(async (_, c) => {
|
||||||
let key = c.getAttribute('name');
|
let key = c.getAttribute('name');
|
||||||
await this.object.entities[key].setFlag('acks', 'party', c.checked);
|
await this.object.documents[key].setFlag('acks', 'party', c.checked);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -117,11 +124,12 @@ export class AcksPartySheet extends FormApplication {
|
||||||
/** @override */
|
/** @override */
|
||||||
activateListeners(html) {
|
activateListeners(html) {
|
||||||
super.activateListeners(html);
|
super.activateListeners(html);
|
||||||
|
|
||||||
html
|
html
|
||||||
.find(".item-controls .item-control .select-actors")
|
.find(".item-controls .item-control .select-actors")
|
||||||
.click(this._selectActors.bind(this));
|
.click(this._selectActors.bind(this));
|
||||||
|
|
||||||
html.find(".item-controls .item-control .deal-xp").click(this._dealXP.bind(this));
|
html.find(".item-controls .item-control .deal-xp").click(this._dealXP.bind(this));
|
||||||
|
|
||||||
html.find("a.resync").click(() => this.render(true));
|
html.find("a.resync").click(() => this.render(true));
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ export class AcksDice {
|
||||||
const template = "systems/acks/templates/chat/roll-result.html";
|
const template = "systems/acks/templates/chat/roll-result.html";
|
||||||
|
|
||||||
let chatData = {
|
let chatData = {
|
||||||
user: game.user._id,
|
user: game.user.id,
|
||||||
speaker: speaker,
|
speaker: speaker,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -78,7 +78,10 @@ export class AcksDice {
|
||||||
parts.push(form.bonus.value);
|
parts.push(form.bonus.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
const roll = new Roll(parts.join("+"), data).roll();
|
const roll = new Roll(parts.join("+"), data);
|
||||||
|
await roll.evaluate({
|
||||||
|
async: true,
|
||||||
|
});
|
||||||
|
|
||||||
// Convert the roll to a chat message and return the roll
|
// Convert the roll to a chat message and return the roll
|
||||||
let rollMode = game.settings.get("core", "rollMode");
|
let rollMode = game.settings.get("core", "rollMode");
|
||||||
|
@ -89,10 +92,13 @@ export class AcksDice {
|
||||||
rollMode = game.user.isGM ? "selfroll" : "blindroll";
|
rollMode = game.user.isGM ? "selfroll" : "blindroll";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (["gmroll", "blindroll"].includes(rollMode))
|
if (["gmroll", "blindroll"].includes(rollMode)) {
|
||||||
chatData["whisper"] = ChatMessage.getWhisperRecipients("GM");
|
chatData["whisper"] = ChatMessage.getWhisperRecipients("GM");
|
||||||
if (rollMode === "selfroll") chatData["whisper"] = [game.user._id];
|
}
|
||||||
if (rollMode === "blindroll") {
|
|
||||||
|
if (rollMode === "selfroll") {
|
||||||
|
chatData["whisper"] = [game.user.id];
|
||||||
|
} else if (rollMode === "blindroll") {
|
||||||
chatData["blind"] = true;
|
chatData["blind"] = true;
|
||||||
data.roll.blindroll = true;
|
data.roll.blindroll = true;
|
||||||
}
|
}
|
||||||
|
@ -230,8 +236,15 @@ export class AcksDice {
|
||||||
// Optionally include a situational bonus
|
// Optionally include a situational bonus
|
||||||
if (form !== null && form.bonus.value) parts.push(form.bonus.value);
|
if (form !== null && form.bonus.value) parts.push(form.bonus.value);
|
||||||
|
|
||||||
const roll = new Roll(parts.join("+"), data).roll();
|
const roll = new Roll(parts.join("+"), data);
|
||||||
const dmgRoll = new Roll(data.roll.dmg.join("+"), data).roll();
|
await roll.evaluate({
|
||||||
|
async: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
const dmgRoll = new Roll(data.roll.dmg.join("+"), data);
|
||||||
|
await dmgRoll.evaluate({
|
||||||
|
async: true,
|
||||||
|
});
|
||||||
|
|
||||||
// Add minimal damage of 1
|
// Add minimal damage of 1
|
||||||
if (dmgRoll.total < 1) {
|
if (dmgRoll.total < 1) {
|
||||||
|
|
|
@ -47,8 +47,8 @@ export const registerHelpers = async function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
Handlebars.registerHelper("getTagIcon", function (tag) {
|
Handlebars.registerHelper("getTagIcon", function (tag) {
|
||||||
let idx = Object.keys(CONFIG.ACKS.tags).find(k => (CONFIG.ACKS.tags[k] == tag));
|
const index = Object.keys(CONFIG.ACKS.tags).find(k => (CONFIG.ACKS.tags[k] == tag));
|
||||||
return CONFIG.ACKS.tag_images[idx];
|
return CONFIG.ACKS.tag_images[index];
|
||||||
});
|
});
|
||||||
|
|
||||||
Handlebars.registerHelper("counter", function (status, value, max) {
|
Handlebars.registerHelper("counter", function (status, value, max) {
|
||||||
|
|
|
@ -280,7 +280,7 @@ export class AcksItem extends Item {
|
||||||
const token = this.actor.token;
|
const token = this.actor.token;
|
||||||
const templateData = {
|
const templateData = {
|
||||||
actor: this.actor,
|
actor: this.actor,
|
||||||
tokenId: token ? `${token.scene._id}.${token.id}` : null,
|
tokenId: token ? `${token.parent.id}.${token.id}` : null,
|
||||||
item: this.data,
|
item: this.data,
|
||||||
data: this.getChatData(),
|
data: this.getChatData(),
|
||||||
labels: this.labels,
|
labels: this.labels,
|
||||||
|
@ -297,11 +297,11 @@ export class AcksItem extends Item {
|
||||||
|
|
||||||
// Basic chat message data
|
// Basic chat message data
|
||||||
const chatData = {
|
const chatData = {
|
||||||
user: game.user._id,
|
user: game.user.id,
|
||||||
type: CONST.CHAT_MESSAGE_TYPES.OTHER,
|
type: CONST.CHAT_MESSAGE_TYPES.OTHER,
|
||||||
content: html,
|
content: html,
|
||||||
speaker: {
|
speaker: {
|
||||||
actor: this.actor._id,
|
actor: this.actor.id,
|
||||||
token: this.actor.token,
|
token: this.actor.token,
|
||||||
alias: this.actor.name,
|
alias: this.actor.name,
|
||||||
},
|
},
|
||||||
|
@ -311,7 +311,7 @@ export class AcksItem extends Item {
|
||||||
let rollMode = game.settings.get("core", "rollMode");
|
let rollMode = game.settings.get("core", "rollMode");
|
||||||
if (["gmroll", "blindroll"].includes(rollMode))
|
if (["gmroll", "blindroll"].includes(rollMode))
|
||||||
chatData["whisper"] = ChatMessage.getWhisperRecipients("GM");
|
chatData["whisper"] = ChatMessage.getWhisperRecipients("GM");
|
||||||
if (rollMode === "selfroll") chatData["whisper"] = [game.user._id];
|
if (rollMode === "selfroll") chatData["whisper"] = [game.user.id];
|
||||||
if (rollMode === "blindroll") chatData["blind"] = true;
|
if (rollMode === "blindroll") chatData["blind"] = true;
|
||||||
|
|
||||||
// Create the chat message
|
// Create the chat message
|
||||||
|
@ -355,7 +355,7 @@ export class AcksItem extends Item {
|
||||||
if (!actor) return;
|
if (!actor) return;
|
||||||
|
|
||||||
// Get the Item
|
// Get the Item
|
||||||
const item = actor.getOwnedItem(card.dataset.itemId);
|
const item = actor.items.get(card.dataset.itemId);
|
||||||
if (!item) {
|
if (!item) {
|
||||||
return ui.notifications.error(
|
return ui.notifications.error(
|
||||||
`The requested item ${card.dataset.itemId} no longer exists on Actor ${actor.name}`
|
`The requested item ${card.dataset.itemId} no longer exists on Actor ${actor.name}`
|
||||||
|
@ -395,7 +395,7 @@ export class AcksItem extends Item {
|
||||||
const [sceneId, tokenId] = tokenKey.split(".");
|
const [sceneId, tokenId] = tokenKey.split(".");
|
||||||
const scene = game.scenes.get(sceneId);
|
const scene = game.scenes.get(sceneId);
|
||||||
if (!scene) return null;
|
if (!scene) return null;
|
||||||
const tokenData = scene.getEmbeddedEntity("Token", tokenId);
|
const tokenData = scene.tokens.get(tokenId);
|
||||||
if (!tokenData) return null;
|
if (!tokenData) return null;
|
||||||
const token = new Token(tokenData);
|
const token = new Token(tokenData);
|
||||||
return token.actor;
|
return token.actor;
|
||||||
|
|
|
@ -17,7 +17,7 @@ export async function createAcksMacro(data, slot) {
|
||||||
|
|
||||||
// Create the macro command
|
// Create the macro command
|
||||||
const command = `game.acks.rollItemMacro("${item.name}");`;
|
const command = `game.acks.rollItemMacro("${item.name}");`;
|
||||||
let macro = game.macros.entities.find(m => (m.name === item.name) && (m.command === command));
|
let macro = game.macros.find(m => (m.name === item.name) && (m.command === command));
|
||||||
if ( !macro ) {
|
if ( !macro ) {
|
||||||
macro = await Macro.create({
|
macro = await Macro.create({
|
||||||
name: item.name,
|
name: item.name,
|
||||||
|
|
|
@ -9,7 +9,6 @@ export const addControl = (object, html) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const showPartySheet = (object) => {
|
export const showPartySheet = (object) => {
|
||||||
event.preventDefault();
|
|
||||||
new AcksPartySheet(object, {
|
new AcksPartySheet(object, {
|
||||||
top: window.screen.height / 2 - 180,
|
top: window.screen.height / 2 - 180,
|
||||||
left:window.screen.width / 2 - 140,
|
left:window.screen.width / 2 - 140,
|
||||||
|
|
|
@ -1,6 +1,18 @@
|
||||||
export const registerSettings = function () {
|
export const registerSettings = () => {
|
||||||
|
|
||||||
game.settings.register("acks", "initiative", {
|
game.settings.register("acks", "initiative", {
|
||||||
|
name: game.i18n.localize("ACKS.Setting.Initiative"),
|
||||||
|
hint: game.i18n.localize("ACKS.Setting.InitiativeHint"),
|
||||||
|
default: "individual",
|
||||||
|
scope: "world",
|
||||||
|
type: String,
|
||||||
|
config: true,
|
||||||
|
choices: {
|
||||||
|
individual: "ACKS.Setting.InitiativeIndividual",
|
||||||
|
group: "ACKS.Setting.InitiativeGroup",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
game.settings.register("acks", "initiativePersistence", {
|
||||||
name: game.i18n.localize("ACKS.Setting.RerollInitiative"),
|
name: game.i18n.localize("ACKS.Setting.RerollInitiative"),
|
||||||
hint: game.i18n.localize("ACKS.Setting.RerollInitiativeHint"),
|
hint: game.i18n.localize("ACKS.Setting.RerollInitiativeHint"),
|
||||||
default: "reset",
|
default: "reset",
|
||||||
|
|
|
@ -25,44 +25,46 @@ export const augmentTable = (table, html, data) => {
|
||||||
html.find(".sheet-footer .roll").replaceWith(roll);
|
html.find(".sheet-footer .roll").replaceWith(roll);
|
||||||
}
|
}
|
||||||
|
|
||||||
html.find(".roll-treasure").click((ev) => {
|
html.find(".roll-treasure").click(async (event) => {
|
||||||
rollTreasure(table.object, { event: ev });
|
await rollTreasure(table.object, { event: event });
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
function drawTreasure(table, data) {
|
async function drawTreasure(table, data) {
|
||||||
const percent = (chance) => {
|
|
||||||
const roll = new Roll("1d100").roll();
|
|
||||||
return roll.total <= chance;
|
|
||||||
};
|
|
||||||
data.treasure = {};
|
data.treasure = {};
|
||||||
if (table.getFlag('acks', 'treasure')) {
|
if (table.getFlag('acks', 'treasure')) {
|
||||||
table.results.forEach((r) => {
|
for (const result of table.results) {
|
||||||
if (percent(r.weight)) {
|
const roll = new Roll("1d100");
|
||||||
const text = table._getResultChatText(r);
|
await roll.evaluate({async: true});
|
||||||
data.treasure[r._id] = ({
|
|
||||||
img: r.img,
|
if (roll.total <= result.data.weight) {
|
||||||
|
const text = result.getChatText();
|
||||||
|
data.treasure[result.id] = ({
|
||||||
|
img: result.img,
|
||||||
text: TextEditor.enrichHTML(text),
|
text: TextEditor.enrichHTML(text),
|
||||||
});
|
});
|
||||||
if ((r.type === CONST.TABLE_RESULT_TYPES.ENTITY) && (r.collection === "RollTable")) {
|
|
||||||
const embeddedTable = game.tables.get(r.resultId);
|
if ((result.data.type === CONST.TABLE_RESULT_TYPES.DOCUMENT)
|
||||||
drawTreasure(embeddedTable, data.treasure[r._id]);
|
&& (result.collection === "RollTable")) {
|
||||||
|
const embeddedTable = game.tables.get(result.resultId);
|
||||||
|
drawTreasure(embeddedTable, data.treasure[result.id]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
} else {
|
} else {
|
||||||
const results = table.roll().results;
|
const results = await table.roll().results;
|
||||||
results.forEach((s) => {
|
results.forEach((result) => {
|
||||||
const text = TextEditor.enrichHTML(table._getResultChatText(s));
|
const text = TextEditor.enrichHTML(result.getChatText());
|
||||||
data.treasure[s._id] = {img: s.img, text: text};
|
data.treasure[result.id] = {img: result.img, text: text};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function rollTreasure(table, options = {}) {
|
async function rollTreasure(table, options = {}) {
|
||||||
// Draw treasure
|
// Draw treasure
|
||||||
const data = drawTreasure(table, {});
|
const data = await drawTreasure(table, {});
|
||||||
let templateData = {
|
let templateData = {
|
||||||
treasure: data.treasure,
|
treasure: data.treasure,
|
||||||
table: table,
|
table: table,
|
||||||
|
@ -70,7 +72,7 @@ async function rollTreasure(table, options = {}) {
|
||||||
|
|
||||||
// Animation
|
// Animation
|
||||||
if (options.event) {
|
if (options.event) {
|
||||||
let results = $(event.currentTarget.parentElement)
|
let results = $(options.event.currentTarget.parentElement)
|
||||||
.prev()
|
.prev()
|
||||||
.find(".table-result");
|
.find(".table-result");
|
||||||
results.each((_, item) => {
|
results.each((_, item) => {
|
||||||
|
@ -83,7 +85,7 @@ async function rollTreasure(table, options = {}) {
|
||||||
|
|
||||||
let html = await renderTemplate(
|
let html = await renderTemplate(
|
||||||
"systems/acks/templates/chat/roll-treasure.html",
|
"systems/acks/templates/chat/roll-treasure.html",
|
||||||
templateData
|
templateData,
|
||||||
);
|
);
|
||||||
|
|
||||||
let chatData = {
|
let chatData = {
|
||||||
|
@ -93,7 +95,7 @@ async function rollTreasure(table, options = {}) {
|
||||||
|
|
||||||
let rollMode = game.settings.get("core", "rollMode");
|
let rollMode = game.settings.get("core", "rollMode");
|
||||||
if (["gmroll", "blindroll"].includes(rollMode)) chatData["whisper"] = ChatMessage.getWhisperRecipients("GM");
|
if (["gmroll", "blindroll"].includes(rollMode)) chatData["whisper"] = ChatMessage.getWhisperRecipients("GM");
|
||||||
if (rollMode === "selfroll") chatData["whisper"] = [game.user._id];
|
if (rollMode === "selfroll") chatData["whisper"] = [game.user.id];
|
||||||
if (rollMode === "blindroll") chatData["blind"] = true;
|
if (rollMode === "blindroll") chatData["blind"] = true;
|
||||||
|
|
||||||
ChatMessage.create(chatData);
|
ChatMessage.create(chatData);
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
"title": "Adventurer Conqueror King System",
|
"title": "Adventurer Conqueror King System",
|
||||||
"description": "Play B/X or other OSR compatible content using the ACKS system",
|
"description": "Play B/X or other OSR compatible content using the ACKS system",
|
||||||
"version": "0.7.5",
|
"version": "0.7.5",
|
||||||
"minimumCoreVersion": "0.7.4",
|
"minimumCoreVersion": "9",
|
||||||
"compatibleCoreVersion": "0.7.9",
|
"compatibleCoreVersion": "9",
|
||||||
"templateVersion": 2,
|
"templateVersion": 2,
|
||||||
"author": "The Happy Anarchist",
|
"author": "The Happy Anarchist",
|
||||||
"esmodules": ["acks.js"],
|
"esmodules": ["acks.js"],
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<a class="item" data-tab="abilities">
|
<a class="item" data-tab="abilities">
|
||||||
{{localize "ACKS.category.abilities"}}
|
{{localize "ACKS.category.abilities"}}
|
||||||
</a>
|
</a>
|
||||||
{{#if data.spells.enabled}}
|
{{#if data.data.spells.enabled}}
|
||||||
<a class="item" data-tab="spells">
|
<a class="item" data-tab="spells">
|
||||||
{{localize "ACKS.category.spells"}}
|
{{localize "ACKS.category.spells"}}
|
||||||
</a>
|
</a>
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
<div class="tab" data-group="primary" data-tab="abilities">
|
<div class="tab" data-group="primary" data-tab="abilities">
|
||||||
{{> "systems/acks/templates/actors/partials/character-abilities-tab.html"}}
|
{{> "systems/acks/templates/actors/partials/character-abilities-tab.html"}}
|
||||||
</div>
|
</div>
|
||||||
{{#if data.spells.enabled}}
|
{{#if data.data.spells.enabled}}
|
||||||
<div class="tab" data-group="primary" data-tab="spells">
|
<div class="tab" data-group="primary" data-tab="spells">
|
||||||
{{> "systems/acks/templates/actors/partials/character-spells-tab.html"}}
|
{{> "systems/acks/templates/actors/partials/character-spells-tab.html"}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<a class="item" data-tab="attributes">
|
<a class="item" data-tab="attributes">
|
||||||
{{localize "ACKS.category.attributes"}}
|
{{localize "ACKS.category.attributes"}}
|
||||||
</a>
|
</a>
|
||||||
{{#if data.spells.enabled}}
|
{{#if data.data.spells.enabled}}
|
||||||
<a class="item" data-tab="spells">
|
<a class="item" data-tab="spells">
|
||||||
{{localize "ACKS.category.spells"}}
|
{{localize "ACKS.category.spells"}}
|
||||||
</a>
|
</a>
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
<div class="tab" data-group="primary" data-tab="attributes">
|
<div class="tab" data-group="primary" data-tab="attributes">
|
||||||
{{> "systems/acks/templates/actors/partials/monster-attributes-tab.html"}}
|
{{> "systems/acks/templates/actors/partials/monster-attributes-tab.html"}}
|
||||||
</div>
|
</div>
|
||||||
{{#if data.spells.enabled}}
|
{{#if data.data.spells.enabled}}
|
||||||
<div class="tab" data-group="primary" data-tab="spells">
|
<div class="tab" data-group="primary" data-tab="spells">
|
||||||
{{> "systems/acks/templates/actors/partials/character-spells-tab.html"}}
|
{{> "systems/acks/templates/actors/partials/character-spells-tab.html"}}
|
||||||
</div>
|
</div>
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
<div class="inventory">
|
<div class="inventory">
|
||||||
<div class="item-titles">{{localize "ACKS.category.notes"}}</div>
|
<div class="item-titles">{{localize "ACKS.category.notes"}}</div>
|
||||||
<div class="resizable-editor" data-editor-size="320">
|
<div class="resizable-editor" data-editor-size="320">
|
||||||
{{editor content=data.details.biography target="data.details.biography"
|
{{editor content=data.data.details.biography target="data.details.biography"
|
||||||
button=true owner=owner editable=editable}}
|
button=true owner=owner editable=editable}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -2,28 +2,28 @@
|
||||||
<li class="attribute flexrow" data-exploration="ld">
|
<li class="attribute flexrow" data-exploration="ld">
|
||||||
<h4 class="attribute-name box-title" title="({{localize 'ACKS.exploration.ld.abrev'}}) {{localize 'ACKS.exploration.ld.long'}}"><a>{{ localize "ACKS.exploration.ld.short" }}</a></h4>
|
<h4 class="attribute-name box-title" title="({{localize 'ACKS.exploration.ld.abrev'}}) {{localize 'ACKS.exploration.ld.long'}}"><a>{{ localize "ACKS.exploration.ld.short" }}</a></h4>
|
||||||
<div class="attribute-value">
|
<div class="attribute-value">
|
||||||
<input name="data.exploration.ld" type="text" value="{{data.exploration.ld}}" value="18" data-dtype="Number" placeholder="0" />
|
<input name="data.exploration.ld" type="text" value="{{data.data.exploration.ld}}" value="18" data-dtype="Number" placeholder="0" />
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="attribute flexrow" data-exploration="od">
|
<li class="attribute flexrow" data-exploration="od">
|
||||||
<h4 class="attribute-name box-title" title="({{localize 'ACKS.exploration.od.abrev'}}) {{localize 'ACKS.exploration.od.long'}}"><a>{{ localize "ACKS.exploration.od.short" }}</a>
|
<h4 class="attribute-name box-title" title="({{localize 'ACKS.exploration.od.abrev'}}) {{localize 'ACKS.exploration.od.long'}}"><a>{{ localize "ACKS.exploration.od.short" }}</a>
|
||||||
</h4>
|
</h4>
|
||||||
<div class="attribute-value">
|
<div class="attribute-value">
|
||||||
<input name="data.exploration.od" type="text" value="{{data.exploration.od}}" value="18" placeholder="0" data-dtype="String" />
|
<input name="data.exploration.od" type="text" value="{{data.data.exploration.od}}" value="18" placeholder="0" data-dtype="String" />
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="attribute flexrow" data-exploration="sd">
|
<li class="attribute flexrow" data-exploration="sd">
|
||||||
<h4 class="attribute-name box-title" title="({{localize 'ACKS.exploration.sd.abrev'}}) {{localize 'ACKS.exploration.sd.long'}}"><a>{{ localize "ACKS.exploration.sd.short" }}</a>
|
<h4 class="attribute-name box-title" title="({{localize 'ACKS.exploration.sd.abrev'}}) {{localize 'ACKS.exploration.sd.long'}}"><a>{{ localize "ACKS.exploration.sd.short" }}</a>
|
||||||
</h4>
|
</h4>
|
||||||
<div class="attribute-value">
|
<div class="attribute-value">
|
||||||
<input name="data.exploration.sd" type="text" value="{{data.exploration.sd}}" value="18" placeholder="0" data-dtype="String" />
|
<input name="data.exploration.sd" type="text" value="{{data.data.exploration.sd}}" value="18" placeholder="0" data-dtype="String" />
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="attribute flexrow" data-exploration="ft">
|
<li class="attribute flexrow" data-exploration="ft">
|
||||||
<h4 class="attribute-name box-title" title="({{localize 'ACKS.exploration.ft.abrev'}}) {{localize 'ACKS.exploration.ft.long'}}"><a>{{ localize "ACKS.exploration.ft.short" }}</a>
|
<h4 class="attribute-name box-title" title="({{localize 'ACKS.exploration.ft.abrev'}}) {{localize 'ACKS.exploration.ft.long'}}"><a>{{ localize "ACKS.exploration.ft.short" }}</a>
|
||||||
</h4>
|
</h4>
|
||||||
<div class="attribute-value">
|
<div class="attribute-value">
|
||||||
<input name="data.exploration.ft" type="text" value="{{data.exploration.ft}}" value="18" placeholder="0" data-dtype="String" />
|
<input name="data.exploration.ft" type="text" value="{{data.data.exploration.ft}}" value="18" placeholder="0" data-dtype="String" />
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
{{#each abilities as |item|}}
|
{{#each abilities as |item|}}
|
||||||
<li class="item-entry">
|
<li class="item-entry">
|
||||||
<div class="item flexrow" data-item-id="{{item._id}}">
|
<div class="item flexrow" data-item-id="{{item._id}}">
|
||||||
<div class="item-name {{#if item.data.roll}}item-rollable{{/if}} flexrow">
|
<div class="item-name {{#if item.data.data.roll}}item-rollable{{/if}} flexrow">
|
||||||
<div class="item-image" style="background-image: url({{item.img}})"></div>
|
<div class="item-image" style="background-image: url({{item.img}})"></div>
|
||||||
<a>
|
<a>
|
||||||
<h4 title="{{item.name}}">
|
<h4 title="{{item.name}}">
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<h4 class="attribute-name box-title" title="{{ localize 'ACKS.scores.str.long' }}">
|
<h4 class="attribute-name box-title" title="{{ localize 'ACKS.scores.str.long' }}">
|
||||||
<a>{{ localize "ACKS.scores.str.short" }}</a></h4>
|
<a>{{ localize "ACKS.scores.str.short" }}</a></h4>
|
||||||
<div class="attribute-value">
|
<div class="attribute-value">
|
||||||
<input name="data.scores.str.value" type="text" value="{{data.scores.str.value}}" placeholder="0"
|
<input name="data.scores.str.value" type="text" value="{{data.data.scores.str.value}}" placeholder="0"
|
||||||
data-dtype="Number" />
|
data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
@ -21,7 +21,7 @@
|
||||||
<h4 class="attribute-name box-title" title="{{ localize 'ACKS.scores.int.long' }}">
|
<h4 class="attribute-name box-title" title="{{ localize 'ACKS.scores.int.long' }}">
|
||||||
<a>{{ localize "ACKS.scores.int.short" }}</a></h4>
|
<a>{{ localize "ACKS.scores.int.short" }}</a></h4>
|
||||||
<div class="attribute-value">
|
<div class="attribute-value">
|
||||||
<input name="data.scores.int.value" type="text" value="{{data.scores.int.value}}" placeholder="0"
|
<input name="data.scores.int.value" type="text" value="{{data.data.scores.int.value}}" placeholder="0"
|
||||||
data-dtype="Number" />
|
data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
<h4 class="attribute-name box-title" title="{{ localize 'ACKS.scores.wis.long' }}">
|
<h4 class="attribute-name box-title" title="{{ localize 'ACKS.scores.wis.long' }}">
|
||||||
<a>{{ localize "ACKS.scores.wis.short" }}</a></h4>
|
<a>{{ localize "ACKS.scores.wis.short" }}</a></h4>
|
||||||
<div class="attribute-value">
|
<div class="attribute-value">
|
||||||
<input name="data.scores.wis.value" type="text" value="{{data.scores.wis.value}}" placeholder="0"
|
<input name="data.scores.wis.value" type="text" value="{{data.data.scores.wis.value}}" placeholder="0"
|
||||||
data-dtype="Number" />
|
data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
<h4 class="attribute-name box-title" title="{{ localize 'ACKS.scores.dex.long' }}">
|
<h4 class="attribute-name box-title" title="{{ localize 'ACKS.scores.dex.long' }}">
|
||||||
<a>{{ localize "ACKS.scores.dex.short" }}</a></h4>
|
<a>{{ localize "ACKS.scores.dex.short" }}</a></h4>
|
||||||
<div class="attribute-value">
|
<div class="attribute-value">
|
||||||
<input name="data.scores.dex.value" type="text" value="{{data.scores.dex.value}}" placeholder="0"
|
<input name="data.scores.dex.value" type="text" value="{{data.data.scores.dex.value}}" placeholder="0"
|
||||||
data-dtype="Number" />
|
data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
<h4 class="attribute-name box-title" title="{{ localize 'ACKS.scores.con.long' }}">
|
<h4 class="attribute-name box-title" title="{{ localize 'ACKS.scores.con.long' }}">
|
||||||
<a>{{ localize "ACKS.scores.con.short" }}</a></h4>
|
<a>{{ localize "ACKS.scores.con.short" }}</a></h4>
|
||||||
<div class="attribute-value">
|
<div class="attribute-value">
|
||||||
<input name="data.scores.con.value" type="text" value="{{data.scores.con.value}}" placeholder="0"
|
<input name="data.scores.con.value" type="text" value="{{data.data.scores.con.value}}" placeholder="0"
|
||||||
data-dtype="Number" />
|
data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
<h4 class="attribute-name box-title" title="{{ localize 'ACKS.scores.cha.long' }}">
|
<h4 class="attribute-name box-title" title="{{ localize 'ACKS.scores.cha.long' }}">
|
||||||
<a>{{ localize "ACKS.scores.cha.short" }}</a></h4>
|
<a>{{ localize "ACKS.scores.cha.short" }}</a></h4>
|
||||||
<div class="attribute-value">
|
<div class="attribute-value">
|
||||||
<input name="data.scores.cha.value" type="text" value="{{data.scores.cha.value}}" placeholder="0"
|
<input name="data.scores.cha.value" type="text" value="{{data.data.scores.cha.value}}" placeholder="0"
|
||||||
data-dtype="Number" />
|
data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
@ -63,25 +63,25 @@
|
||||||
<div class="resources">
|
<div class="resources">
|
||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
<div class="health">
|
<div class="health">
|
||||||
<input class="health-value health-top" name="data.hp.value" type="text" value="{{data.hp.value}}"
|
<input class="health-value health-top" name="data.hp.value" type="text" value="{{data.data.hp.value}}"
|
||||||
data-dtype="Number" placeholder="0" title="{{localize 'ACKS.Health'}}" />
|
data-dtype="Number" placeholder="0" title="{{localize 'ACKS.Health'}}" />
|
||||||
<input class="health-value health-bottom" name="data.hp.max" type="text" value="{{data.hp.max}}"
|
<input class="health-value health-bottom" name="data.hp.max" type="text" value="{{data.data.hp.max}}"
|
||||||
data-dtype="Number" placeholder="0" title="{{localize 'ACKS.HealthMax'}}" />
|
data-dtype="Number" placeholder="0" title="{{localize 'ACKS.HealthMax'}}" />
|
||||||
<div class="health-empty" style="height:{{counter false data.hp.value data.hp.max}}%"></div>
|
<div class="health-empty" style="height:{{counter false data.data.hp.value data.data.hp.max}}%"></div>
|
||||||
<div class="health-full" style="height:{{counter true data.hp.value data.hp.max}}%"></div>
|
<div class="health-full" style="height:{{counter true data.data.hp.value data.data.hp.max}}%"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="health armor-class">
|
<div class="health armor-class">
|
||||||
{{#if config.ascendingAC}}
|
{{#if config.ascendingAC}}
|
||||||
<div class="health-value health-top" title="{{localize 'ACKS.ArmorClass'}}">{{data.aac.value}}</div>
|
<div class="health-value health-top" title="{{localize 'ACKS.ArmorClass'}}">{{data.data.aac.value}}</div>
|
||||||
<div class="health-value health-bottom" title="{{localize 'ACKS.ArmorClassNaked'}}">
|
<div class="health-value health-bottom" title="{{localize 'ACKS.ArmorClassNaked'}}">
|
||||||
{{data.aac.naked}}</div>
|
{{data.data.aac.naked}}</div>
|
||||||
{{#if data.aac.shield}}<div class="shield" title="{{localize 'ACKS.items.hasShield'}} ({{data.aac.shield}})"><i
|
{{#if data.data.aac.shield}}<div class="shield" title="{{localize 'ACKS.items.hasShield'}} ({{data.data.aac.shield}})"><i
|
||||||
class="fas fa-shield-alt"></i></div>{{/if}}
|
class="fas fa-shield-alt"></i></div>{{/if}}
|
||||||
{{else}}
|
{{else}}
|
||||||
<div class="health-value health-top" title="{{localize 'ACKS.ArmorClass'}}">{{data.ac.value}}</div>
|
<div class="health-value health-top" title="{{localize 'ACKS.ArmorClass'}}">{{data.data.ac.value}}</div>
|
||||||
<div class="health-value health-bottom" title="{{localize 'ACKS.ArmorClassNaked'}}">
|
<div class="health-value health-bottom" title="{{localize 'ACKS.ArmorClassNaked'}}">
|
||||||
{{data.ac.naked}}</div>
|
{{data.data.ac.naked}}</div>
|
||||||
{{#if data.ac.shield}}<div class="shield" title="{{localize 'ACKS.items.hasShield'}} ({{data.ac.shield}})"><i
|
{{#if data.data.ac.shield}}<div class="shield" title="{{localize 'ACKS.items.hasShield'}} ({{data.data.ac.shield}})"><i
|
||||||
class="fas fa-shield-alt"></i></div>{{/if}}
|
class="fas fa-shield-alt"></i></div>{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
@ -93,7 +93,7 @@
|
||||||
<a>{{ localize "ACKS.HitDiceShort" }}</a>
|
<a>{{ localize "ACKS.HitDiceShort" }}</a>
|
||||||
</h4>
|
</h4>
|
||||||
<div class="attribute-value">
|
<div class="attribute-value">
|
||||||
<input name="data.hp.hd" type="text" value="{{data.hp.hd}}" placeholder=""
|
<input name="data.hp.hd" type="text" value="{{data.data.hp.hd}}" placeholder=""
|
||||||
data-dtype="String" />
|
data-dtype="String" />
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
@ -103,8 +103,8 @@
|
||||||
<a>{{ localize "ACKS.BHRShort" }}</a>
|
<a>{{ localize "ACKS.BHRShort" }}</a>
|
||||||
</h4>
|
</h4>
|
||||||
<div class="attribute-value"
|
<div class="attribute-value"
|
||||||
title="Calculated from {{data.hp.max}} HP">
|
title="Calculated from {{data.data.hp.max}} HP">
|
||||||
{{data.hp.bhr}}
|
{{data.data.hp.bhr}}
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -113,8 +113,8 @@
|
||||||
<h4 class="attribute-name box-title" title="{{ localize 'ACKS.Initiative' }}">
|
<h4 class="attribute-name box-title" title="{{ localize 'ACKS.Initiative' }}">
|
||||||
{{ localize "ACKS.InitiativeShort" }}</h4>
|
{{ localize "ACKS.InitiativeShort" }}</h4>
|
||||||
<div class="attribute-value"
|
<div class="attribute-value"
|
||||||
title="{{localize 'ACKS.scores.dex.long'}}({{data.scores.dex.init}}) + {{localize 'ACKS.Modifier'}}({{data.initiative.mod}})">
|
title="{{localize 'ACKS.scores.dex.long'}}({{data.data.scores.dex.init}}) + {{localize 'ACKS.Modifier'}}({{data.data.initiative.mod}})">
|
||||||
{{add data.scores.dex.init data.initiative.mod}}
|
{{add data.data.scores.dex.init data.data.initiative.mod}}
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -127,8 +127,8 @@
|
||||||
<a>{{localize 'ACKS.MeleeShort'}}</a></h4>
|
<a>{{localize 'ACKS.MeleeShort'}}</a></h4>
|
||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
<div class="attribute-value"
|
<div class="attribute-value"
|
||||||
title="{{localize 'ACKS.scores.str.long'}}({{data.scores.str.mod}}) + {{localize 'ACKS.Modifier'}}({{data.thac0.mod.melee}})">
|
title="{{localize 'ACKS.scores.str.long'}}({{data.data.scores.str.mod}}) + {{localize 'ACKS.Modifier'}}({{data.data.thac0.mod.melee}})">
|
||||||
{{add data.scores.str.mod data.thac0.mod.melee}}
|
{{add data.data.scores.str.mod data.data.thac0.mod.melee}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
@ -138,7 +138,7 @@
|
||||||
</h4>
|
</h4>
|
||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
<div class="attribute-value">
|
<div class="attribute-value">
|
||||||
<input name="data.thac0.throw" type="text" value="{{data.thac0.throw}}" placeholder=""
|
<input name="data.thac0.throw" type="text" value="{{data.data.thac0.throw}}" placeholder=""
|
||||||
data-dtype="Number" +/>
|
data-dtype="Number" +/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -149,7 +149,7 @@
|
||||||
</h4>
|
</h4>
|
||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
<div class="attribute-value">
|
<div class="attribute-value">
|
||||||
<input name="data.thac0.value" type="text" value="{{data.thac0.value}}" placeholder="0"
|
<input name="data.thac0.value" type="text" value="{{data.data.thac0.value}}" placeholder="0"
|
||||||
data-dtype="Number" />
|
data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -160,8 +160,8 @@
|
||||||
<a>{{localize 'ACKS.MissileShort'}}</a></h4>
|
<a>{{localize 'ACKS.MissileShort'}}</a></h4>
|
||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
<div class="attribute-value"
|
<div class="attribute-value"
|
||||||
title="{{localize 'ACKS.scores.dex.long'}}({{data.scores.dex.mod}}) + {{localize 'ACKS.Modifier'}}({{data.thac0.mod.missile}})">
|
title="{{localize 'ACKS.scores.dex.long'}}({{data.data.scores.dex.mod}}) + {{localize 'ACKS.Modifier'}}({{data.data.thac0.mod.missile}})">
|
||||||
{{add data.scores.dex.mod data.thac0.mod.missile}}
|
{{add data.data.scores.dex.mod data.data.thac0.mod.missile}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
@ -174,7 +174,7 @@
|
||||||
{{localize 'ACKS.movement.overland.short'}}</h4>
|
{{localize 'ACKS.movement.overland.short'}}</h4>
|
||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
<div class="attribute-value">
|
<div class="attribute-value">
|
||||||
{{divide data.movement.base 5}}
|
{{divide data.data.movement.base 5}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
@ -182,8 +182,8 @@
|
||||||
<h4 class="attribute-name box-title" title="{{ localize 'ACKS.movement.exploration.long' }}">
|
<h4 class="attribute-name box-title" title="{{ localize 'ACKS.movement.exploration.long' }}">
|
||||||
{{ localize "ACKS.movement.exploration.short" }}</h4>
|
{{ localize "ACKS.movement.exploration.short" }}</h4>
|
||||||
<div class="attribute-value flexrow">
|
<div class="attribute-value flexrow">
|
||||||
<input name="data.movement.base" type="text" value="{{data.movement.base}}" placeholder="0"
|
<input name="data.movement.base" type="text" value="{{data.data.movement.base}}" placeholder="0"
|
||||||
data-dtype="Number" {{#if data.config.movementAuto}}disabled{{/if}} />
|
data-dtype="Number" {{#if data.data.config.movementAuto}}disabled{{/if}} />
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="attribute attribute-secondaries">
|
<li class="attribute attribute-secondaries">
|
||||||
|
@ -191,7 +191,7 @@
|
||||||
{{localize 'ACKS.movement.encounter.short'}}</h4>
|
{{localize 'ACKS.movement.encounter.short'}}</h4>
|
||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
<div class="attribute-value">
|
<div class="attribute-value">
|
||||||
{{divide data.movement.base 3}}
|
{{divide data.data.movement.base 3}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
@ -205,43 +205,43 @@
|
||||||
<h4 class="attribute-name box-title">
|
<h4 class="attribute-name box-title">
|
||||||
<a>{{ localize "ACKS.saves.paralysis.long" }}</a></h4>
|
<a>{{ localize "ACKS.saves.paralysis.long" }}</a></h4>
|
||||||
<div class="attribute-value">
|
<div class="attribute-value">
|
||||||
<input name="data.saves.paralysis.value" type="text" value="{{data.saves.paralysis.value}}"
|
<input name="data.saves.paralysis.value" type="text" value="{{data.data.saves.paralysis.value}}"
|
||||||
placeholder="0" data-dtype="Number" />
|
placeholder="0" data-dtype="Number" />
|
||||||
</li>
|
</li>
|
||||||
<li class="attribute saving-throw" data-save="death">
|
<li class="attribute saving-throw" data-save="death">
|
||||||
<h4 class="attribute-name box-title">
|
<h4 class="attribute-name box-title">
|
||||||
<a>{{ localize "ACKS.saves.death.long" }}</a></h4>
|
<a>{{ localize "ACKS.saves.death.long" }}</a></h4>
|
||||||
<div class="attribute-value">
|
<div class="attribute-value">
|
||||||
<input name="data.saves.death.value" type="text" value="{{data.saves.death.value}}" placeholder="0"
|
<input name="data.saves.death.value" type="text" value="{{data.data.saves.death.value}}" placeholder="0"
|
||||||
data-dtype="Number" />
|
data-dtype="Number" />
|
||||||
</li>
|
</li>
|
||||||
<li class="attribute saving-throw" data-save="breath">
|
<li class="attribute saving-throw" data-save="breath">
|
||||||
<h4 class="attribute-name box-title">
|
<h4 class="attribute-name box-title">
|
||||||
<a>{{ localize "ACKS.saves.breath.long" }}</a></h4>
|
<a>{{ localize "ACKS.saves.breath.long" }}</a></h4>
|
||||||
<div class="attribute-value">
|
<div class="attribute-value">
|
||||||
<input name="data.saves.breath.value" type="text" value="{{data.saves.breath.value}}"
|
<input name="data.saves.breath.value" type="text" value="{{data.data.saves.breath.value}}"
|
||||||
placeholder="0" data-dtype="Number" />
|
placeholder="0" data-dtype="Number" />
|
||||||
</li>
|
</li>
|
||||||
<li class="attribute saving-throw" data-save="wand">
|
<li class="attribute saving-throw" data-save="wand">
|
||||||
<h4 class="attribute-name box-title">
|
<h4 class="attribute-name box-title">
|
||||||
<a>{{ localize "ACKS.saves.wand.long" }}</a></h4>
|
<a>{{ localize "ACKS.saves.wand.long" }}</a></h4>
|
||||||
<div class="attribute-value">
|
<div class="attribute-value">
|
||||||
<input name="data.saves.wand.value" type="text" value="{{data.saves.wand.value}}" placeholder="0"
|
<input name="data.saves.wand.value" type="text" value="{{data.data.saves.wand.value}}" placeholder="0"
|
||||||
data-dtype="Number" />
|
data-dtype="Number" />
|
||||||
</li>
|
</li>
|
||||||
<li class="attribute saving-throw" data-save="spell">
|
<li class="attribute saving-throw" data-save="spell">
|
||||||
<h4 class="attribute-name box-title">
|
<h4 class="attribute-name box-title">
|
||||||
<a>{{ localize "ACKS.saves.spell.long" }}</a></h4>
|
<a>{{ localize "ACKS.saves.spell.long" }}</a></h4>
|
||||||
<div class="attribute-value">
|
<div class="attribute-value">
|
||||||
<input name="data.saves.spell.value" type="text" value="{{data.saves.spell.value}}"
|
<input name="data.saves.spell.value" type="text" value="{{data.data.saves.spell.value}}"
|
||||||
placeholder="0" />
|
placeholder="0" />
|
||||||
</li>
|
</li>
|
||||||
{{#unless config.removeMagicBonus}}
|
{{#unless config.removeMagicBonus}}
|
||||||
<li class="attribute saving-throw">
|
<li class="attribute saving-throw">
|
||||||
<h4 class="attribute-name box-title" title="{{ localize 'ACKS.saves.magic.long' }}">
|
<h4 class="attribute-name box-title" title="{{ localize 'ACKS.saves.magic.long' }}">
|
||||||
{{ localize "ACKS.saves.magic.long"}}</h4>
|
{{ localize "ACKS.saves.magic.long"}}</h4>
|
||||||
<div class="attribute-value flat" title="{{localize 'ACKS.scores.wis.long'}}({{data.scores.wis.mod}})">
|
<div class="attribute-value flat" title="{{localize 'ACKS.scores.wis.long'}}({{data.data.scores.wis.mod}})">
|
||||||
{{mod data.scores.wis.mod}}
|
{{mod data.data.scores.wis.mod}}
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
|
|
|
@ -4,36 +4,36 @@
|
||||||
<input name="name" type="text" value="{{actor.name}}" placeholder="{{localize 'ACKS.details.name'}}" data-dtype="String" />
|
<input name="name" type="text" value="{{actor.name}}" placeholder="{{localize 'ACKS.details.name'}}" data-dtype="String" />
|
||||||
</h1>
|
</h1>
|
||||||
<ul class="summary flexrow">
|
<ul class="summary flexrow">
|
||||||
{{#if data.retainer.enabled}}
|
{{#if data.data.retainer.enabled}}
|
||||||
<li>
|
<li>
|
||||||
<input type="text" name="data.retainer.wage" value="{{data.retainer.wage}}" data-dtype="String"
|
<input type="text" name="data.retainer.wage" value="{{data.data.retainer.wage}}" data-dtype="String"
|
||||||
/>
|
/>
|
||||||
<label>{{localize 'ACKS.RetainerWage'}}</label>
|
<label>{{localize 'ACKS.RetainerWage'}}</label>
|
||||||
</li>
|
</li>
|
||||||
{{else}}
|
{{else}}
|
||||||
<li>
|
<li>
|
||||||
<input type="text" name="data.details.title" value="{{data.details.title}}" data-dtype="String"
|
<input type="text" name="data.details.title" value="{{data.data.details.title}}" data-dtype="String"
|
||||||
/>
|
/>
|
||||||
<label>{{localize 'ACKS.details.title'}}</label>
|
<label>{{localize 'ACKS.details.title'}}</label>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<li>
|
<li>
|
||||||
<input type="text" name="data.details.alignment" value="{{data.details.alignment}}" data-dtype="String"
|
<input type="text" name="data.details.alignment" value="{{data.data.details.alignment}}" data-dtype="String"
|
||||||
/>
|
/>
|
||||||
<label>{{localize 'ACKS.details.alignment'}}</label>
|
<label>{{localize 'ACKS.details.alignment'}}</label>
|
||||||
</li>
|
</li>
|
||||||
{{#if data.retainer.enabled}}
|
{{#if data.data.retainer.enabled}}
|
||||||
<li class="flexrow check-field">
|
<li class="flexrow check-field">
|
||||||
<div class="check morale-check" title="{{localize 'ACKS.roll.morale'}}"><a><i class="fas fa-dice"></i></a></div>
|
<div class="check morale-check" title="{{localize 'ACKS.roll.morale'}}"><a><i class="fas fa-dice"></i></a></div>
|
||||||
<div>
|
<div>
|
||||||
<input type="text" name="data.details.morale" value="{{data.details.morale}}" />
|
<input type="text" name="data.details.morale" value="{{data.data.details.morale}}" />
|
||||||
<label>{{localize 'ACKS.details.morale'}}</label>
|
<label>{{localize 'ACKS.details.morale'}}</label>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="flex2 check-field" data-stat="lr">
|
<li class="flex2 check-field" data-stat="lr">
|
||||||
<div class="check loyalty-check" title="{{localize 'ACKS.loyalty.check'}}"><a><i class="fas fa-dice"></i></a></div>
|
<div class="check loyalty-check" title="{{localize 'ACKS.loyalty.check'}}"><a><i class="fas fa-dice"></i></a></div>
|
||||||
<div class="attribute-value">
|
<div class="attribute-value">
|
||||||
<input name="data.retainer.loyalty" type="text" value="{{data.retainer.loyalty}}" placeholder="Loyal" data-dtype="String" />
|
<input name="data.retainer.loyalty" type="text" value="{{data.data.retainer.loyalty}}" placeholder="Loyal" data-dtype="String" />
|
||||||
<label>{{localize 'ACKS.Loyalty'}}</label>
|
<label>{{localize 'ACKS.Loyalty'}}</label>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
@ -41,21 +41,21 @@
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="summary flexrow">
|
<ul class="summary flexrow">
|
||||||
<li class="flex3">
|
<li class="flex3">
|
||||||
<input type="text" name="data.details.class" value="{{data.details.class}}" data-dtype="String"
|
<input type="text" name="data.details.class" value="{{data.data.details.class}}" data-dtype="String"
|
||||||
/>
|
/>
|
||||||
<label>{{localize 'ACKS.details.class'}}</label>
|
<label>{{localize 'ACKS.details.class'}}</label>
|
||||||
</li>
|
</li>
|
||||||
<li class="{{#if (gt data.details.xp.value data.details.xp.next)}}notify{{/if}}">
|
<li class="{{#if (gt data.data.details.xp.value data.data.details.xp.next)}}notify{{/if}}">
|
||||||
<input type="text" name="data.details.level" value="{{data.details.level}}" data-dtype="Number"
|
<input type="text" name="data.details.level" value="{{data.data.details.level}}" data-dtype="Number"
|
||||||
/>
|
/>
|
||||||
<label>{{localize 'ACKS.details.level'}}</label>
|
<label>{{localize 'ACKS.details.level'}}</label>
|
||||||
</li>
|
</li>
|
||||||
<li class="flex2">
|
<li class="flex2">
|
||||||
<input type="text" name="data.details.xp.value" value="{{data.details.xp.value}}" data-dtype="Number"
|
<input type="text" name="data.details.xp.value" value="{{data.data.details.xp.value}}" data-dtype="Number"
|
||||||
/>
|
/>
|
||||||
<label>{{localize 'ACKS.details.experience.base'}}</label>
|
<label>{{localize 'ACKS.details.experience.base'}}</label>
|
||||||
{{#if data.details.xp.bonus}}
|
{{#if data.data.details.xp.bonus}}
|
||||||
<span class="xp-bonus">+{{data.details.xp.bonus}}%</span>
|
<span class="xp-bonus">+{{data.data.details.xp.bonus}}%</span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -31,8 +31,6 @@
|
||||||
{{#each item.data.tags as |tag|}}
|
{{#each item.data.tags as |tag|}}
|
||||||
{{#unless (getTagIcon tag.value)}}
|
{{#unless (getTagIcon tag.value)}}
|
||||||
<span title="{{tag.title}}">{{tag.value}}{{#unless @last}},{{/unless}}</span>
|
<span title="{{tag.title}}">{{tag.value}}{{#unless @last}},{{/unless}}</span>
|
||||||
|
|
||||||
|
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</div>
|
</div>
|
||||||
|
@ -155,7 +153,7 @@
|
||||||
<li class="item-titles flexrow">
|
<li class="item-titles flexrow">
|
||||||
<div class="item-caret"><i class="fas fa-caret-down"></i></div>
|
<div class="item-caret"><i class="fas fa-caret-down"></i></div>
|
||||||
<div class="item-name">{{localize "ACKS.items.Treasure"}}</div>
|
<div class="item-name">{{localize "ACKS.items.Treasure"}}</div>
|
||||||
<div class="field-long">{{roundTreas data.treasure}} <i class="fas fa-circle"></i></div>
|
<div class="field-long">{{roundTreas data.data.treasure}} <i class="fas fa-circle"></i></div>
|
||||||
<div class="field-short"><i class="fas fa-hashtag"></i></div>
|
<div class="field-short"><i class="fas fa-hashtag"></i></div>
|
||||||
<div class="field-short"><i class="fas fa-weight-hanging"></i></div>
|
<div class="field-short"><i class="fas fa-weight-hanging"></i></div>
|
||||||
<div class="item-controls">
|
<div class="item-controls">
|
||||||
|
@ -198,7 +196,7 @@
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section>
|
<section>
|
||||||
{{#with data.encumbrance}}
|
{{#with data.data.encumbrance}}
|
||||||
<div class="encumbrance {{#if encumbered}}encumbered{{/if}}">
|
<div class="encumbrance {{#if encumbered}}encumbered{{/if}}">
|
||||||
<span class="encumbrance-bar" style="width:{{pct}}%"></span>
|
<span class="encumbrance-bar" style="width:{{pct}}%"></span>
|
||||||
<span class="encumbrance-label">{{value}} / {{max}}</span>
|
<span class="encumbrance-label">{{value}} / {{max}}</span>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<ol>
|
<ol>
|
||||||
{{#each data.languages.value as |lang|}}
|
{{#each data.data.languages.value as |lang|}}
|
||||||
<li class="item flexrow" data-lang="{{lang}}">
|
<li class="item flexrow" data-lang="{{lang}}">
|
||||||
<div class="item-name">
|
<div class="item-name">
|
||||||
{{lang}}
|
{{lang}}
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
<div class="flex3 description">
|
<div class="flex3 description">
|
||||||
<div class="item-titles">{{localize "ACKS.category.description"}}</div>
|
<div class="item-titles">{{localize "ACKS.category.description"}}</div>
|
||||||
<div>
|
<div>
|
||||||
{{editor content=data.details.description target="data.details.description"
|
{{editor content=data.data.details.description target="data.details.description"
|
||||||
button=true owner=owner editable=editable}}
|
button=true owner=owner editable=editable}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
<div class="inventory notes">
|
<div class="inventory notes">
|
||||||
<div class="item-titles">{{localize "ACKS.category.notes"}}</div>
|
<div class="item-titles">{{localize "ACKS.category.notes"}}</div>
|
||||||
<div class="resizable-editor" data-editor-size="140">
|
<div class="resizable-editor" data-editor-size="140">
|
||||||
{{editor content=data.details.notes target="data.details.notes"
|
{{editor content=data.data.details.notes target="data.details.notes"
|
||||||
button=true owner=owner editable=editable}}
|
button=true owner=owner editable=editable}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<div class="field-short">{{localize 'ACKS.spells.Slots'}}</div>
|
<div class="field-short">{{localize 'ACKS.spells.Slots'}}</div>
|
||||||
<div class="field-long flexrow">
|
<div class="field-long flexrow">
|
||||||
<input type="text" value="{{lookup @root.slots.used @key}}" name="data.spells.{{id}}.value" data-dtype="Number"
|
<input type="text" value="{{lookup @root.slots.used @key}}" name="data.spells.{{id}}.value" data-dtype="Number"
|
||||||
placeholder="0" disabled>/<input type="text" value="{{lookup (lookup ../actor.data.spells @key) 'max'}}"
|
placeholder="0" disabled>/<input type="text" value="{{lookup (lookup ../actor.data.data.spells @key) 'max'}}"
|
||||||
name="data.spells.{{id}}.max" data-dtype="Number" placeholder="0"></div>
|
name="data.spells.{{id}}.max" data-dtype="Number" placeholder="0"></div>
|
||||||
<div class="item-controls">
|
<div class="item-controls">
|
||||||
<a class="item-control item-create" data-type="spell" data-lvl="{{id}}" title="{{localize 'ACKS.Add'}}"><i
|
<a class="item-control item-create" data-type="spell" data-lvl="{{id}}" title="{{localize 'ACKS.Add'}}"><i
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="field-short memorize flexrow">
|
<div class="field-short memorize flexrow">
|
||||||
<input type="text" value="{{item.data.cast}}" data-dtype="Number" placeholder="0" data-field="cast"
|
<input type="text" value="{{item.data.data.cast}}" data-dtype="Number" placeholder="0" data-field="cast"
|
||||||
title="{{localize 'ACKS.spells.Cast'}}"></div>
|
title="{{localize 'ACKS.spells.Cast'}}"></div>
|
||||||
<div class="item-controls">
|
<div class="item-controls">
|
||||||
{{#if ../../owner}}
|
{{#if ../../owner}}
|
||||||
|
|
|
@ -5,10 +5,10 @@
|
||||||
<h4 class="attribute-name box-title" title="{{localize 'ACKS.Health'}}">{{ localize "ACKS.HealthShort" }}
|
<h4 class="attribute-name box-title" title="{{localize 'ACKS.Health'}}">{{ localize "ACKS.HealthShort" }}
|
||||||
<a class="hp-roll"><i class="fas fa-dice"></i></a></h4>
|
<a class="hp-roll"><i class="fas fa-dice"></i></a></h4>
|
||||||
<div class="attribute-value flexrow">
|
<div class="attribute-value flexrow">
|
||||||
<input name="data.hp.value" type="text" value="{{data.hp.value}}" data-dtype="Number"
|
<input name="data.hp.value" type="text" value="{{data.data.hp.value}}" data-dtype="Number"
|
||||||
placeholder="0" />
|
placeholder="0" />
|
||||||
<span class="sep"> / </span>
|
<span class="sep"> / </span>
|
||||||
<input name="data.hp.max" type="text" value="{{data.hp.max}}" data-dtype="Number" placeholder="0" />
|
<input name="data.hp.max" type="text" value="{{data.data.hp.max}}" data-dtype="Number" placeholder="0" />
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="attribute hit-dice">
|
<li class="attribute hit-dice">
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
<a>{{ localize "ACKS.HitDiceShort" }}</a>
|
<a>{{ localize "ACKS.HitDiceShort" }}</a>
|
||||||
</h4>
|
</h4>
|
||||||
<div class="attribute-value">
|
<div class="attribute-value">
|
||||||
<input name="data.hp.hd" type="text" value="{{data.hp.hd}}" data-dtype="String" />
|
<input name="data.hp.hd" type="text" value="{{data.data.hp.hd}}" data-dtype="String" />
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="attribute">
|
<li class="attribute">
|
||||||
|
@ -24,14 +24,14 @@
|
||||||
<h4 class="attribute-name box-title" title="{{ localize 'ACKS.ArmorClass' }}">
|
<h4 class="attribute-name box-title" title="{{ localize 'ACKS.ArmorClass' }}">
|
||||||
{{ localize "ACKS.AscArmorClassShort" }}</h4>
|
{{ localize "ACKS.AscArmorClassShort" }}</h4>
|
||||||
<div class="attribute-value">
|
<div class="attribute-value">
|
||||||
<input name="data.aac.value" type="text" value="{{data.aac.value}}" data-dtype="Number"
|
<input name="data.aac.value" type="text" value="{{data.data.aac.value}}" data-dtype="Number"
|
||||||
placeholder="10" data-dtype="Number" />
|
placeholder="10" data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
<h4 class="attribute-name box-title" title="{{ localize 'ACKS.ArmorClass' }}">
|
<h4 class="attribute-name box-title" title="{{ localize 'ACKS.ArmorClass' }}">
|
||||||
{{ localize "ACKS.ArmorClassShort" }}</h4>
|
{{ localize "ACKS.ArmorClassShort" }}</h4>
|
||||||
<div class="attribute-value">
|
<div class="attribute-value">
|
||||||
<input name="data.ac.value" type="text" value="{{data.ac.value}}" data-dtype="Number"
|
<input name="data.ac.value" type="text" value="{{data.data.ac.value}}" data-dtype="Number"
|
||||||
placeholder="9" data-dtype="Number" />
|
placeholder="9" data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -41,25 +41,25 @@
|
||||||
<h4 class="attribute-name box-title" title="{{localize 'ACKS.AB'}}"><a>{{ localize "ACKS.ABShort" }}</a>
|
<h4 class="attribute-name box-title" title="{{localize 'ACKS.AB'}}"><a>{{ localize "ACKS.ABShort" }}</a>
|
||||||
</h4>
|
</h4>
|
||||||
<div class="attribute-value">
|
<div class="attribute-value">
|
||||||
<input name="data.thac0.throw" type="text" value="{{data.thac0.throw}}" placeholder=""
|
<input name="data.thac0.throw" type="text" value="{{data.data.thac0.throw}}" placeholder=""
|
||||||
data-dtype="Number" />
|
data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
<h4 class="attribute-name box-title" title="{{localize 'ACKS.Thac0'}}"><a>{{ localize "ACKS.Thac0" }}</a>
|
<h4 class="attribute-name box-title" title="{{localize 'ACKS.Thac0'}}"><a>{{ localize "ACKS.Thac0" }}</a>
|
||||||
</h4>
|
</h4>
|
||||||
<div class="attribute-value">
|
<div class="attribute-value">
|
||||||
<input name="data.thac0.value" type="text" value="{{data.thac0.value}}" placeholder="0"
|
<input name="data.thac0.value" type="text" value="{{data.data.thac0.value}}" placeholder="0"
|
||||||
data-dtype="Number" />
|
data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</li>
|
</li>
|
||||||
{{#if data.retainer.enabled}}
|
{{#if data.data.retainer.enabled}}
|
||||||
<li class="attribute">
|
<li class="attribute">
|
||||||
<h4 class="attribute-name box-title" title="{{ localize 'ACKS.Loyalty' }}">
|
<h4 class="attribute-name box-title" title="{{ localize 'ACKS.Loyalty' }}">
|
||||||
{{ localize "ACKS.LoyaltyShort" }}
|
{{ localize "ACKS.LoyaltyShort" }}
|
||||||
</h4>
|
</h4>
|
||||||
<div class="attribute-value">
|
<div class="attribute-value">
|
||||||
<input name="data.retainer.loyalty" type="text" value="{{data.retainer.loyalty}}" placeholder="0"
|
<input name="data.retainer.loyalty" type="text" value="{{data.data.retainer.loyalty}}" placeholder="0"
|
||||||
data-dtype="Number" />
|
data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
@ -69,7 +69,7 @@
|
||||||
{{ localize "ACKS.movement.short" }}
|
{{ localize "ACKS.movement.short" }}
|
||||||
</h4>
|
</h4>
|
||||||
<div class="attribute-value">
|
<div class="attribute-value">
|
||||||
<input name="data.movement.base" type="text" value="{{data.movement.base}}" placeholder="0"
|
<input name="data.movement.base" type="text" value="{{data.data.movement.base}}" placeholder="0"
|
||||||
data-dtype="Number" />
|
data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
@ -95,7 +95,7 @@
|
||||||
<li class="item-entry">
|
<li class="item-entry">
|
||||||
<div class="item flexrow" data-item-id="{{item._id}}">
|
<div class="item flexrow" data-item-id="{{item._id}}">
|
||||||
<div class="item-pattern" title="{{localize 'ACKS.items.pattern'}}" style="background:linear-gradient(0.25turn, {{item.data.pattern}}, transparent)"></div>
|
<div class="item-pattern" title="{{localize 'ACKS.items.pattern'}}" style="background:linear-gradient(0.25turn, {{item.data.pattern}}, transparent)"></div>
|
||||||
<div class="item-name {{#if item.data.roll}}item-rollable{{/if}} flexrow">
|
<div class="item-name {{#if item.data.data.roll}}item-rollable{{/if}} flexrow">
|
||||||
<div class="item-image" style="background-image: url({{item.img}})"></div>
|
<div class="item-image" style="background-image: url({{item.img}})"></div>
|
||||||
<h4 title="{{item.name}}">
|
<h4 title="{{item.name}}">
|
||||||
{{item.name~}}
|
{{item.name~}}
|
||||||
|
@ -157,7 +157,7 @@
|
||||||
<li class="attacks-description">
|
<li class="attacks-description">
|
||||||
{{#unless isNew}}
|
{{#unless isNew}}
|
||||||
<label>{{ localize "ACKS.movement.details" }}</label>
|
<label>{{ localize "ACKS.movement.details" }}</label>
|
||||||
<input name="data.movement.value" type="text" value="{{data.movement.value}}" data-dtype="String" />
|
<input name="data.movement.value" type="text" value="{{data.data.movement.value}}" data-dtype="String" />
|
||||||
{{else}}
|
{{else}}
|
||||||
<button data-action="generate-saves">{{localize "ACKS.dialog.generateSaves"}}</button>
|
<button data-action="generate-saves">{{localize "ACKS.dialog.generateSaves"}}</button>
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
|
@ -166,35 +166,35 @@
|
||||||
<h4 class="attribute-name box-title">
|
<h4 class="attribute-name box-title">
|
||||||
<a>{{ localize "ACKS.saves.death.long" }}</a></h4>
|
<a>{{ localize "ACKS.saves.death.long" }}</a></h4>
|
||||||
<div class="attribute-value">
|
<div class="attribute-value">
|
||||||
<input name="data.saves.death.value" type="text" value="{{data.saves.death.value}}"
|
<input name="data.saves.death.value" type="text" value="{{data.data.saves.death.value}}"
|
||||||
placeholder="0" data-dtype="Number" />
|
placeholder="0" data-dtype="Number" />
|
||||||
</li>
|
</li>
|
||||||
<li class="attribute saving-throw" data-save="wand">
|
<li class="attribute saving-throw" data-save="wand">
|
||||||
<h4 class="attribute-name box-title">
|
<h4 class="attribute-name box-title">
|
||||||
<a>{{ localize "ACKS.saves.wand.long" }}</a></h4>
|
<a>{{ localize "ACKS.saves.wand.long" }}</a></h4>
|
||||||
<div class="attribute-value">
|
<div class="attribute-value">
|
||||||
<input name="data.saves.wand.value" type="text" value="{{data.saves.wand.value}}"
|
<input name="data.saves.wand.value" type="text" value="{{data.data.saves.wand.value}}"
|
||||||
placeholder="0" data-dtype="Number" />
|
placeholder="0" data-dtype="Number" />
|
||||||
</li>
|
</li>
|
||||||
<li class="attribute saving-throw" data-save="paralysis">
|
<li class="attribute saving-throw" data-save="paralysis">
|
||||||
<h4 class="attribute-name box-title">
|
<h4 class="attribute-name box-title">
|
||||||
<a>{{ localize "ACKS.saves.paralysis.long" }}</a></h4>
|
<a>{{ localize "ACKS.saves.paralysis.long" }}</a></h4>
|
||||||
<div class="attribute-value">
|
<div class="attribute-value">
|
||||||
<input name="data.saves.paralysis.value" type="text" value="{{data.saves.paralysis.value}}"
|
<input name="data.saves.paralysis.value" type="text" value="{{data.data.saves.paralysis.value}}"
|
||||||
placeholder="0" data-dtype="Number" />
|
placeholder="0" data-dtype="Number" />
|
||||||
</li>
|
</li>
|
||||||
<li class="attribute saving-throw" data-save="breath">
|
<li class="attribute saving-throw" data-save="breath">
|
||||||
<h4 class="attribute-name box-title">
|
<h4 class="attribute-name box-title">
|
||||||
<a>{{ localize "ACKS.saves.breath.long" }}</a></h4>
|
<a>{{ localize "ACKS.saves.breath.long" }}</a></h4>
|
||||||
<div class="attribute-value">
|
<div class="attribute-value">
|
||||||
<input name="data.saves.breath.value" type="text" value="{{data.saves.breath.value}}"
|
<input name="data.saves.breath.value" type="text" value="{{data.data.saves.breath.value}}"
|
||||||
placeholder="0" data-dtype="Number" />
|
placeholder="0" data-dtype="Number" />
|
||||||
</li>
|
</li>
|
||||||
<li class="attribute saving-throw" data-save="spell">
|
<li class="attribute saving-throw" data-save="spell">
|
||||||
<h4 class="attribute-name box-title">
|
<h4 class="attribute-name box-title">
|
||||||
<a>{{ localize "ACKS.saves.spell.long" }}</a></h4>
|
<a>{{ localize "ACKS.saves.spell.long" }}</a></h4>
|
||||||
<div class="attribute-value">
|
<div class="attribute-value">
|
||||||
<input name="data.saves.spell.value" type="text" value="{{data.saves.spell.value}}"
|
<input name="data.saves.spell.value" type="text" value="{{data.data.saves.spell.value}}"
|
||||||
placeholder="0" />
|
placeholder="0" />
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -6,26 +6,26 @@
|
||||||
<ul class="summary flexrow">
|
<ul class="summary flexrow">
|
||||||
<li class="flex2 flexrow check-field">
|
<li class="flex2 flexrow check-field">
|
||||||
<div>
|
<div>
|
||||||
<input type="text" name="data.details.alignment" value="{{data.details.alignment}}" />
|
<input type="text" name="data.details.alignment" value="{{data.data.details.alignment}}" />
|
||||||
<label>{{localize 'ACKS.details.alignment'}}</label>
|
<label>{{localize 'ACKS.details.alignment'}}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="check reaction-check" title="{{localize 'ACKS.roll.reaction'}}"><a><i class="fas fa-dice"></i></a></div>
|
<div class="check reaction-check" title="{{localize 'ACKS.roll.reaction'}}"><a><i class="fas fa-dice"></i></a></div>
|
||||||
</li>
|
</li>
|
||||||
<li class="flexrow check-field" data-check="dungeon">
|
<li class="flexrow check-field" data-check="dungeon">
|
||||||
<div>
|
<div>
|
||||||
<input type="text" name="data.details.appearing.d" value="{{data.details.appearing.d}}" />
|
<input type="text" name="data.details.appearing.d" value="{{data.data.details.appearing.d}}" />
|
||||||
<label>{{localize 'ACKS.details.appearing'}}</label>
|
<label>{{localize 'ACKS.details.appearing'}}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="check appearing-check" title="{{localize 'ACKS.roll.appearing'}}"><a><i class="fas fa-dice"></i></a></div>
|
<div class="check appearing-check" title="{{localize 'ACKS.roll.appearing'}}"><a><i class="fas fa-dice"></i></a></div>
|
||||||
</li>
|
</li>
|
||||||
<li class="flexrow check-field" data-check="wilderness">
|
<li class="flexrow check-field" data-check="wilderness">
|
||||||
(<div><input type="text" name="data.details.appearing.w" value="{{data.details.appearing.w}}" /></div>)
|
(<div><input type="text" name="data.details.appearing.w" value="{{data.data.details.appearing.w}}" /></div>)
|
||||||
<div class="check appearing-check" title="{{localize 'ACKS.roll.appearing'}}"><a><i class="fas fa-dice"></i></a></div>
|
<div class="check appearing-check" title="{{localize 'ACKS.roll.appearing'}}"><a><i class="fas fa-dice"></i></a></div>
|
||||||
</li>
|
</li>
|
||||||
{{#if config.morale}}
|
{{#if config.morale}}
|
||||||
<li class="flexrow check-field">
|
<li class="flexrow check-field">
|
||||||
<div>
|
<div>
|
||||||
<input type="text" name="data.details.morale" value="{{data.details.morale}}" />
|
<input type="text" name="data.details.morale" value="{{data.data.details.morale}}" />
|
||||||
<label>{{localize 'ACKS.details.morale'}}</label>
|
<label>{{localize 'ACKS.details.morale'}}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="check morale-check" title="{{localize 'ACKS.roll.morale'}}"><a><i class="fas fa-dice"></i></a></div>
|
<div class="check morale-check" title="{{localize 'ACKS.roll.morale'}}"><a><i class="fas fa-dice"></i></a></div>
|
||||||
|
@ -34,11 +34,11 @@
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="summary flexrow">
|
<ul class="summary flexrow">
|
||||||
<li>
|
<li>
|
||||||
<input type="text" name="data.details.xp" value="{{data.details.xp}}" />
|
<input type="text" name="data.details.xp" value="{{data.data.details.xp}}" />
|
||||||
<label>{{localize 'ACKS.details.experience.award'}}</label>
|
<label>{{localize 'ACKS.details.experience.award'}}</label>
|
||||||
</li>
|
</li>
|
||||||
<li class="treasure-table" title="{{localize 'ACKS.details.treasureTableHint'}}">
|
<li class="treasure-table" title="{{localize 'ACKS.details.treasureTableHint'}}">
|
||||||
<div>{{{data.details.treasure.link}}}</div>
|
<div>{{{data.data.details.treasure.link}}}</div>
|
||||||
<label>{{localize 'ACKS.details.treasure'}}</label>
|
<label>{{localize 'ACKS.details.treasure'}}</label>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -15,10 +15,10 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
<ol class="actor-list">
|
<ol class="actor-list">
|
||||||
{{#each data.entities as |e|}} {{#if e.data.flags.acks.party}}
|
{{#each data.documents as |actor|}} {{#if actor.data.flags.acks.party}}
|
||||||
<li class="actor flexrow" data-actor-id="{{e.id}}">
|
<li class="actor flexrow" data-actor-id="{{actor.id}}">
|
||||||
<div class="field-img">
|
<div class="field-img">
|
||||||
<img src="{{e.img}}" />
|
<img src="{{actor.img}}" />
|
||||||
<div class="img-btns flexrow">
|
<div class="img-btns flexrow">
|
||||||
<button type="button" data-action="open-sheet"><i class="fas fa-user"></i></button>
|
<button type="button" data-action="open-sheet"><i class="fas fa-user"></i></button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -26,17 +26,17 @@
|
||||||
<div class="fields">
|
<div class="fields">
|
||||||
<div class="flexrow field-row">
|
<div class="flexrow field-row">
|
||||||
<div class="field-name flex2">
|
<div class="field-name flex2">
|
||||||
<strong>{{e.name}}</strong>
|
<strong>{{actor.name}}</strong>
|
||||||
</div>
|
</div>
|
||||||
<div class="field-long" title="{{localize 'ACKS.Health'}}">
|
<div class="field-long" title="{{localize 'ACKS.Health'}}">
|
||||||
<i class="fas fa-heart"></i>
|
<i class="fas fa-heart"></i>
|
||||||
{{e.data.data.hp.value}}/{{e.data.data.hp.max}}
|
{{actor.data.data.hp.value}}/{{actor.data.data.hp.max}}
|
||||||
</div>
|
</div>
|
||||||
<div class="field-short" title="{{localize 'ACKS.ArmorClass'}}">
|
<div class="field-short" title="{{localize 'ACKS.ArmorClass'}}">
|
||||||
<i class="fas fa-shield-alt"></i>
|
<i class="fas fa-shield-alt"></i>
|
||||||
{{#if @root.settings.ascending}}<strong>{{e.data.data.aac.value}}</strong>
|
{{#if @root.settings.ascending}}<strong>{{actor.data.data.aac.value}}</strong>
|
||||||
<sub>{{e.data.data.aac.naked}}</sub>
|
<sub>{{actor.data.data.aac.naked}}</sub>
|
||||||
{{else}}<strong>{{e.data.data.ac.value}}</strong> <sub>{{e.data.data.ac.naked}}</sub>
|
{{else}}<strong>{{actor.data.data.ac.value}}</strong> <sub>{{actor.data.data.ac.naked}}</sub>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -44,40 +44,40 @@
|
||||||
<div class="field-short" title="{{localize 'ACKS.Thac0'}}">
|
<div class="field-short" title="{{localize 'ACKS.Thac0'}}">
|
||||||
<i class="fas fa-crosshairs"></i>
|
<i class="fas fa-crosshairs"></i>
|
||||||
{{#unless @root.settings.ascending}}
|
{{#unless @root.settings.ascending}}
|
||||||
{{e.data.data.thac0.value}}
|
{{actor.data.data.thac0.value}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{e.data.data.thac0.throw}}
|
{{actor.data.data.thac0.throw}}
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
</div>
|
</div>
|
||||||
{{#if (eq e.data.type 'character')}}
|
{{#if (eq actor.data.type 'character')}}
|
||||||
<div class="field-short" title="{{localize 'ACKS.Melee'}}">
|
<div class="field-short" title="{{localize 'ACKS.Melee'}}">
|
||||||
<i class="fas fa-fist-raised"></i>
|
<i class="fas fa-fist-raised"></i>
|
||||||
{{add e.data.data.scores.str.mod e.data.data.thac0.mod.melee}}
|
{{add actor.data.data.scores.str.mod actor.data.data.thac0.mod.melee}}
|
||||||
</div>
|
</div>
|
||||||
<div class="field-short" title="{{localize 'ACKS.Missile'}}">
|
<div class="field-short" title="{{localize 'ACKS.Missile'}}">
|
||||||
<i class="fas fa-bullseye"></i>
|
<i class="fas fa-bullseye"></i>
|
||||||
{{add e.data.data.scores.dex.mod e.data.data.thac0.mod.missile}}
|
{{add actor.data.data.scores.dex.mod actor.data.data.thac0.mod.missile}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<div class="field-short flex2">
|
<div class="field-short flex2">
|
||||||
<i class="fas fa-shoe-prints" title="{{localize 'ACKS.movement.base'}}"></i>
|
<i class="fas fa-shoe-prints" title="{{localize 'ACKS.movement.base'}}"></i>
|
||||||
<span title="{{localize 'ACKS.movement.encounter.long'}}">{{e.data.data.movement.encounter}}</span> <sub
|
<span title="{{localize 'ACKS.movement.encounter.long'}}">{{actor.data.data.movement.encounter}}</span> <sub
|
||||||
title="{{localize 'ACKS.movement.exploration.long'}}">{{e.data.data.movement.base}}</sub>
|
title="{{localize 'ACKS.movement.exploration.long'}}">{{actor.data.data.movement.base}}</sub>
|
||||||
</div>
|
</div>
|
||||||
{{#if (eq e.data.type 'character')}}
|
{{#if (eq actor.data.type 'character')}}
|
||||||
<div class="field-short flex2">
|
<div class="field-short flex2">
|
||||||
<i class="fas fa-weight-hanging" title="{{localize 'ACKS.Encumbrance'}}"></i>
|
<i class="fas fa-weight-hanging" title="{{localize 'ACKS.Encumbrance'}}"></i>
|
||||||
{{roundWeight e.data.data.encumbrance.value}}k
|
{{roundWeight actor.data.data.encumbrance.value}}k
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
<div class="flexrow field-row">
|
<div class="flexrow field-row">
|
||||||
<div class="field-longer flexrow">
|
<div class="field-longer flexrow">
|
||||||
{{#each e.data.data.saves as |s i|}}
|
{{#each actor.data.data.saves as |s i|}}
|
||||||
<span title="{{lookup @root.config.saves_long i}}">{{lookup @root.config.saves_short i}} {{s.value}}</span>
|
<span title="{{lookup @root.config.saves_long i}}">{{lookup @root.config.saves_short i}} {{s.value}}</span>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{#if (eq e.data.type 'character')}}<span><i class="fas fa-magic"
|
{{#if (eq actor.data.type 'character')}}<span><i class="fas fa-magic"
|
||||||
title="{{localize 'ACKS.saves.magic.long'}}"></i>{{mod e.data.data.scores.wis.mod}}</span>{{/if}}
|
title="{{localize 'ACKS.saves.magic.long'}}"></i>{{mod actor.data.data.scores.wis.mod}}</span>{{/if}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="acks chat-card item-card" data-actor-id="{{actor._id}}" data-item-id="{{item._id}}"
|
<div class="acks chat-card item-card" data-actor-id="{{actor.id}}" data-item-id="{{item._id}}"
|
||||||
{{#if tokenId}}data-token-id="{{tokenId}}" {{/if}}>
|
{{#if tokenId}}data-token-id="{{tokenId}}" {{/if}}>
|
||||||
<header class="card-header flexrow">
|
<header class="card-header flexrow">
|
||||||
<img src="{{item.img}}" title="{{item.name}}" width="36" height="36" />
|
<img src="{{item.img}}" title="{{item.name}}" width="36" height="36" />
|
||||||
|
|
|
@ -13,20 +13,20 @@
|
||||||
<div class="form-group block-input">
|
<div class="form-group block-input">
|
||||||
<label>{{localize 'ACKS.abilities.Requirements'}}</label>
|
<label>{{localize 'ACKS.abilities.Requirements'}}</label>
|
||||||
<div class="form-fields">
|
<div class="form-fields">
|
||||||
<input type="text" name="data.requirements" value="{{data.requirements}}" data-dtype="String" />
|
<input type="text" name="data.requirements" value="{{data.data.requirements}}" data-dtype="String" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group block-input">
|
<div class="form-group block-input">
|
||||||
<label>{{localize 'ACKS.items.Roll'}}</label>
|
<label>{{localize 'ACKS.items.Roll'}}</label>
|
||||||
<div class="form-fields">
|
<div class="form-fields">
|
||||||
<input type="text" name="data.roll" value="{{data.roll}}" data-dtype="String" />
|
<input type="text" name="data.roll" value="{{data.data.roll}}" data-dtype="String" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>{{localize 'ACKS.items.RollType'}}</label>
|
<label>{{localize 'ACKS.items.RollType'}}</label>
|
||||||
<div class="form-fields">
|
<div class="form-fields">
|
||||||
<select name="data.rollType">
|
<select name="data.rollType">
|
||||||
{{#select data.rollType}}
|
{{#select data.data.rollType}}
|
||||||
{{#each config.roll_type as |t a|}}
|
{{#each config.roll_type as |t a|}}
|
||||||
<option value="{{a}}">{{t}}</option>
|
<option value="{{a}}">{{t}}</option>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
@ -37,20 +37,20 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>{{localize 'ACKS.items.RollTarget'}}</label>
|
<label>{{localize 'ACKS.items.RollTarget'}}</label>
|
||||||
<div class="form-fields">
|
<div class="form-fields">
|
||||||
<input type="text" name="data.rollTarget" value="{{data.rollTarget}}" data-dtype="Number" />
|
<input type="text" name="data.rollTarget" value="{{data.data.rollTarget}}" data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>{{localize 'ACKS.items.BlindRoll'}}</label>
|
<label>{{localize 'ACKS.items.BlindRoll'}}</label>
|
||||||
<div class="form-fields">
|
<div class="form-fields">
|
||||||
<input type="checkbox" name="data.blindroll" value="{{data.blindroll}}" {{checked data.blindroll}} data-dtype="Number"/>
|
<input type="checkbox" name="data.blindroll" value="{{data.data.blindroll}}" {{checked data.data.blindroll}} data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>{{localize 'ACKS.spells.Save'}}</label>
|
<label>{{localize 'ACKS.spells.Save'}}</label>
|
||||||
<div class="form-fields">
|
<div class="form-fields">
|
||||||
<select name="data.save">
|
<select name="data.save">
|
||||||
{{#select data.save}}
|
{{#select data.data.save}}
|
||||||
<option value=""></option>
|
<option value=""></option>
|
||||||
{{#each config.saves_short as |save a|}}
|
{{#each config.saves_short as |save a|}}
|
||||||
<option value="{{a}}">{{save}}</option>
|
<option value="{{a}}">{{save}}</option>
|
||||||
|
@ -61,7 +61,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
{{editor content=data.description target="data.description" button=true
|
{{editor content=data.data.description target="data.description" button=true
|
||||||
owner=owner editable=editable}}
|
owner=owner editable=editable}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -13,14 +13,14 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>{{localize 'ACKS.items.ArmorAAC'}}</label>
|
<label>{{localize 'ACKS.items.ArmorAAC'}}</label>
|
||||||
<div class="form-fields">
|
<div class="form-fields">
|
||||||
<input type="text" name="data.aac.value" value="{{data.aac.value}}" data-dtype="Number" />
|
<input type="text" name="data.aac.value" value="{{data.data.aac.value}}" data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>{{localize 'ACKS.armor.type'}}</label>
|
<label>{{localize 'ACKS.armor.type'}}</label>
|
||||||
<div class="form-fields">
|
<div class="form-fields">
|
||||||
<select name="data.type">
|
<select name="data.type">
|
||||||
{{#select data.type}}
|
{{#select data.data.type}}
|
||||||
<option value=""></option>
|
<option value=""></option>
|
||||||
{{#each config.armor as |armor a|}}
|
{{#each config.armor as |armor a|}}
|
||||||
<option value="{{a}}">{{armor}}</option>
|
<option value="{{a}}">{{armor}}</option>
|
||||||
|
@ -32,18 +32,18 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>{{localize 'ACKS.items.Cost'}}</label>
|
<label>{{localize 'ACKS.items.Cost'}}</label>
|
||||||
<div class="form-fields">
|
<div class="form-fields">
|
||||||
<input type="text" name="data.cost" value="{{data.cost}}" data-dtype="Number" />
|
<input type="text" name="data.cost" value="{{data.data.cost}}" data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>{{localize 'ACKS.items.Weight'}}</label>
|
<label>{{localize 'ACKS.items.Weight'}}</label>
|
||||||
<div class="form-fields">
|
<div class="form-fields">
|
||||||
<input type="text" name="data.weight" value="{{data.weight}}" data-dtype="Number" />
|
<input type="text" name="data.weight" value="{{data.data.weight}}" data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
{{editor content=data.description target="data.description" button=true
|
{{editor content=data.data.description target="data.description" button=true
|
||||||
owner=owner editable=editable}}
|
owner=owner editable=editable}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -13,30 +13,30 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>{{localize 'ACKS.items.Quantity'}}</label>
|
<label>{{localize 'ACKS.items.Quantity'}}</label>
|
||||||
<div class="form-fields">
|
<div class="form-fields">
|
||||||
<input type="text" name="data.quantity.value" value="{{data.quantity.value}}" data-dtype="Number" />/<input type="text" name="data.quantity.max" value="{{data.quantity.max}}" data-dtype="Number" />
|
<input type="text" name="data.quantity.value" value="{{data.data.quantity.value}}" data-dtype="Number" />/<input type="text" name="data.quantity.max" value="{{data.data.quantity.max}}" data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>{{localize 'ACKS.items.Treasure'}}</label>
|
<label>{{localize 'ACKS.items.Treasure'}}</label>
|
||||||
<div class="form-fields">
|
<div class="form-fields">
|
||||||
<input type="checkbox" name="data.treasure" value="{{data.treasure}}" {{checked data.treasure}} data-dtype="Boolean"/>
|
<input type="checkbox" name="data.treasure" value="{{data.data.treasure}}" {{checked data.data.treasure}} data-dtype="Boolean"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>{{localize 'ACKS.items.Cost'}}</label>
|
<label>{{localize 'ACKS.items.Cost'}}</label>
|
||||||
<div class="form-fields">
|
<div class="form-fields">
|
||||||
<input type="text" name="data.cost" value="{{data.cost}}" data-dtype="Number" />
|
<input type="text" name="data.cost" value="{{data.data.cost}}" data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>{{localize 'ACKS.items.Weight'}}</label>
|
<label>{{localize 'ACKS.items.Weight'}}</label>
|
||||||
<div class="form-fields">
|
<div class="form-fields">
|
||||||
<input type="text" name="data.weight" value="{{data.weight}}" data-dtype="Number" />
|
<input type="text" name="data.weight" value="{{data.data.weight}}" data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="description weapon-editor">
|
<div class="description weapon-editor">
|
||||||
{{editor content=data.description target="data.description" button=true
|
{{editor content=data.data.description target="data.description" button=true
|
||||||
owner=owner editable=editable}}
|
owner=owner editable=editable}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -13,32 +13,32 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>{{localize 'ACKS.spells.Level'}}</label>
|
<label>{{localize 'ACKS.spells.Level'}}</label>
|
||||||
<div class="form-fields">
|
<div class="form-fields">
|
||||||
<input type="text" name="data.lvl" value="{{data.lvl}}" data-dtype="Number" />
|
<input type="text" name="data.lvl" value="{{data.data.lvl}}" data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group block-input">
|
<div class="form-group block-input">
|
||||||
<label>{{localize 'ACKS.spells.Class'}}</label>
|
<label>{{localize 'ACKS.spells.Class'}}</label>
|
||||||
<div class="form-fields">
|
<div class="form-fields">
|
||||||
<input type="text" name="data.class" value="{{data.class}}" data-dtype="String" />
|
<input type="text" name="data.class" value="{{data.data.class}}" data-dtype="String" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group block-input">
|
<div class="form-group block-input">
|
||||||
<label>{{localize 'ACKS.spells.Duration'}}</label>
|
<label>{{localize 'ACKS.spells.Duration'}}</label>
|
||||||
<div class="form-fields">
|
<div class="form-fields">
|
||||||
<input type="text" name="data.duration" value="{{data.duration}}" data-dtype="String" />
|
<input type="text" name="data.duration" value="{{data.data.duration}}" data-dtype="String" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group block-input">
|
<div class="form-group block-input">
|
||||||
<label>{{localize 'ACKS.spells.Range'}}</label>
|
<label>{{localize 'ACKS.spells.Range'}}</label>
|
||||||
<div class="form-fields">
|
<div class="form-fields">
|
||||||
<input type="text" name="data.range" value="{{data.range}}" data-dtype="String" />
|
<input type="text" name="data.range" value="{{data.data.range}}" data-dtype="String" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>{{localize 'ACKS.spells.Save'}}</label>
|
<label>{{localize 'ACKS.spells.Save'}}</label>
|
||||||
<div class="form-fields">
|
<div class="form-fields">
|
||||||
<select name="data.save">
|
<select name="data.save">
|
||||||
{{#select data.save}}
|
{{#select data.data.save}}
|
||||||
<option value=""></option>
|
<option value=""></option>
|
||||||
{{#each config.saves_short as |save a|}}
|
{{#each config.saves_short as |save a|}}
|
||||||
<option value="{{a}}">{{save}}</option>
|
<option value="{{a}}">{{save}}</option>
|
||||||
|
@ -50,12 +50,12 @@
|
||||||
<div class="form-group block-input">
|
<div class="form-group block-input">
|
||||||
<label>{{localize 'ACKS.items.Roll'}}</label>
|
<label>{{localize 'ACKS.items.Roll'}}</label>
|
||||||
<div class="form-fields">
|
<div class="form-fields">
|
||||||
<input type="text" name="data.roll" value="{{data.roll}}" data-dtype="String" />
|
<input type="text" name="data.roll" value="{{data.data.roll}}" data-dtype="String" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
{{editor content=data.description target="data.description" button=true
|
{{editor content=data.data.description target="data.description" button=true
|
||||||
owner=owner editable=editable}}
|
owner=owner editable=editable}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
name="data.cost"
|
name="data.cost"
|
||||||
value="{{data.cost}}"
|
value="{{data.data.cost}}"
|
||||||
data-dtype="Number"
|
data-dtype="Number"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
name="data.weight"
|
name="data.weight"
|
||||||
value="{{data.weight}}"
|
value="{{data.data.weight}}"
|
||||||
data-dtype="Number"
|
data-dtype="Number"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -44,7 +44,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<ol class="tag-list">
|
<ol class="tag-list">
|
||||||
{{#each data.tags as |tag|}}
|
{{#each data.data.tags as |tag|}}
|
||||||
<li class="tag" title="{{tag.title}}" data-tag="{{tag.value}}">
|
<li class="tag" title="{{tag.title}}" data-tag="{{tag.value}}">
|
||||||
<span>{{tag.value}}</span>
|
<span>{{tag.value}}</span>
|
||||||
<a class="tag-delete"><i class="fas fa-times"></i></a>
|
<a class="tag-delete"><i class="fas fa-times"></i></a>
|
||||||
|
@ -72,7 +72,7 @@
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
name="data.damage"
|
name="data.damage"
|
||||||
value="{{data.damage}}"
|
value="{{data.data.damage}}"
|
||||||
data-dtype="String"
|
data-dtype="String"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -84,39 +84,39 @@
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
name="data.bonus"
|
name="data.bonus"
|
||||||
value="{{data.bonus}}"
|
value="{{data.data.bonus}}"
|
||||||
data-dtype="Number"
|
data-dtype="Number"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group attack-type">
|
<div class="form-group attack-type">
|
||||||
<a title="{{localize 'ACKS.items.Melee'}}" class="melee-toggle {{#if
|
<a title="{{localize 'ACKS.items.Melee'}}" class="melee-toggle {{#if
|
||||||
data.melee}}active{{/if}}"><i class="fas fa-fist-raised"></i></a>
|
data.data.melee}}active{{/if}}"><i class="fas fa-fist-raised"></i></a>
|
||||||
<a title="{{localize 'ACKS.items.Missile'}}" class="missile-toggle
|
<a title="{{localize 'ACKS.items.Missile'}}" class="missile-toggle
|
||||||
{{#if data.missile}}active{{/if}}"><i class="fas fa-bullseye"></i></a>
|
{{#if data.data.missile}}active{{/if}}"><i class="fas fa-bullseye"></i></a>
|
||||||
</div>
|
</div>
|
||||||
{{#if data.missile}}
|
{{#if data.data.missile}}
|
||||||
<div class="form-group block-input">
|
<div class="form-group block-input">
|
||||||
<label>{{localize 'ACKS.items.Range'}}</label>
|
<label>{{localize 'ACKS.items.Range'}}</label>
|
||||||
<div class="form-fields range">
|
<div class="form-fields range">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
name="data.range.short"
|
name="data.range.short"
|
||||||
value="{{data.range.short}}"
|
value="{{data.data.range.short}}"
|
||||||
data-dtype="Number"
|
data-dtype="Number"
|
||||||
/>
|
/>
|
||||||
<div class="sep"></div>
|
<div class="sep"></div>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
name="data.range.medium"
|
name="data.range.medium"
|
||||||
value="{{data.range.medium}}"
|
value="{{data.data.range.medium}}"
|
||||||
data-dtype="Number"
|
data-dtype="Number"
|
||||||
/>
|
/>
|
||||||
<div class="sep"></div>
|
<div class="sep"></div>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
name="data.range.long"
|
name="data.range.long"
|
||||||
value="{{data.range.long}}"
|
value="{{data.data.range.long}}"
|
||||||
data-dtype="Number"
|
data-dtype="Number"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -126,7 +126,7 @@
|
||||||
<label>{{localize 'ACKS.spells.Save'}}</label>
|
<label>{{localize 'ACKS.spells.Save'}}</label>
|
||||||
<div class="form-fields">
|
<div class="form-fields">
|
||||||
<select name="data.save">
|
<select name="data.save">
|
||||||
{{#select data.save}}
|
{{#select data.data.save}}
|
||||||
<option value=""></option>
|
<option value=""></option>
|
||||||
{{#each config.saves_short as |save a|}}
|
{{#each config.saves_short as |save a|}}
|
||||||
<option value="{{a}}">{{save}}</option>
|
<option value="{{a}}">{{save}}</option>
|
||||||
|
@ -141,16 +141,16 @@
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
name="data.slow"
|
name="data.slow"
|
||||||
value="{{data.slow}}"
|
value="{{data.data.slow}}"
|
||||||
{{checked
|
{{checked
|
||||||
data.slow}}
|
data.data.slow}}
|
||||||
data-dtype="Number"
|
data-dtype="Number"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="description weapon-editor">
|
<div class="description weapon-editor">
|
||||||
{{editor content=data.description target="data.description" button=true
|
{{editor content=data.data.description target="data.description" button=true
|
||||||
owner=owner editable=editable}}
|
owner=owner editable=editable}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue