Compare commits
8 Commits
fvtt-avd12
...
fvtt-avd12
Author | SHA1 | Date | |
---|---|---|---|
e796fac928 | |||
be555d5adc | |||
85f4ba0e99 | |||
17bfd3eecd | |||
5f0973290a | |||
88b869f5e5 | |||
1ec8ee6451 | |||
66ed4c12cc |
@ -7,10 +7,15 @@
|
|||||||
"TypeWeapon": "Weapon",
|
"TypeWeapon": "Weapon",
|
||||||
"TypeShield": "Shield",
|
"TypeShield": "Shield",
|
||||||
"TypeArmor": "Armor",
|
"TypeArmor": "Armor",
|
||||||
"TypeSkill": "Skill",
|
|
||||||
"TypeSpell": "Spell",
|
"TypeSpell": "Spell",
|
||||||
"TypeModule": "Module",
|
"TypeModule": "Module",
|
||||||
"TypeMoney": "Money",
|
"TypeMoney": "Money",
|
||||||
"TypeEquipment": "Equipment"
|
"TypeEquipment": "Equipment",
|
||||||
|
"TypeAction": "Action",
|
||||||
|
"TypeFreeaction": "Free Action",
|
||||||
|
"TypeReaction": "Reaction",
|
||||||
|
"TypeStance": "Stance",
|
||||||
|
"TypeTrait": "Trait",
|
||||||
|
"TypeCondition": "Condition"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,5 +1,7 @@
|
|||||||
import { Avd12Utility } from "./avd12-utility.js";
|
import { Avd12Utility } from "./avd12-utility.js";
|
||||||
|
|
||||||
|
const __ALLOWED_MODULE_TYPES = { "action": 1, "reaction": 1, "freeaction": 1, "trait": 1 }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extend the basic ItemSheet with some very simple modifications
|
* Extend the basic ItemSheet with some very simple modifications
|
||||||
* @extends {ItemSheet}
|
* @extends {ItemSheet}
|
||||||
@ -15,7 +17,7 @@ export class Avd12ItemSheet extends ItemSheet {
|
|||||||
dragDrop: [{ dragSelector: null, dropSelector: null }],
|
dragDrop: [{ dragSelector: null, dropSelector: null }],
|
||||||
width: 620,
|
width: 620,
|
||||||
height: 550,
|
height: 550,
|
||||||
tabs: [{navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description"}]
|
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -49,6 +51,15 @@ export class Avd12ItemSheet extends ItemSheet {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async getData() {
|
async getData() {
|
||||||
|
|
||||||
|
// Specific case for formating descriptions of sub-items
|
||||||
|
if (this.object.type == "module") {
|
||||||
|
for (let level of this.object.system.levels) {
|
||||||
|
for (let id in level.features) {
|
||||||
|
level.features[id].descriptionHTML = await TextEditor.enrichHTML(level.features[id].system.description, { async: true })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let formData = {
|
let formData = {
|
||||||
title: this.title,
|
title: this.title,
|
||||||
id: this.id,
|
id: this.id,
|
||||||
@ -61,6 +72,8 @@ export class Avd12ItemSheet extends ItemSheet {
|
|||||||
limited: this.object.limited,
|
limited: this.object.limited,
|
||||||
options: this.options,
|
options: this.options,
|
||||||
owner: this.document.isOwner,
|
owner: this.document.isOwner,
|
||||||
|
bonusList: Avd12Utility.buildBonusList(),
|
||||||
|
description: await TextEditor.enrichHTML(this.object.system.description, { async: true }),
|
||||||
isGM: game.user.isGM
|
isGM: game.user.isGM
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,6 +117,59 @@ export class Avd12ItemSheet extends ItemSheet {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
async _onDrop(event) {
|
||||||
|
|
||||||
|
const levelIndex = Number($(event.toElement).data("level-index"))
|
||||||
|
const choiceIndex = Number($(event.toElement).data("choice-index"))
|
||||||
|
let data = event.dataTransfer.getData('text/plain')
|
||||||
|
let dataItem = JSON.parse(data)
|
||||||
|
let item = fromUuidSync(dataItem.uuid)
|
||||||
|
if (item.pack) {
|
||||||
|
item = await Avd12Utility.searchItem(item)
|
||||||
|
}
|
||||||
|
if (!item) {
|
||||||
|
ui.notifications.warn("Unable to find relevant item - Aborting drag&drop " + data.uuid)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.object.type == "module" && __ALLOWED_MODULE_TYPES[item.type]) {
|
||||||
|
let levels = duplicate(this.object.system.levels)
|
||||||
|
levels[levelIndex].choices[choiceIndex].features[item.id] = duplicate(item)
|
||||||
|
this.object.update({ 'system.levels': levels })
|
||||||
|
return
|
||||||
|
}
|
||||||
|
ui.notifications.warn("This item is not allowed dropped here")
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
async viewSubitem(ev) {
|
||||||
|
let field = $(ev.currentTarget).data('type');
|
||||||
|
let idx = Number($(ev.currentTarget).data('index'));
|
||||||
|
let itemData = this.object.system[field][idx];
|
||||||
|
if (itemData.name != 'None') {
|
||||||
|
let spec = await Item.create(itemData, { temporary: true });
|
||||||
|
spec.system.origin = "embeddedItem";
|
||||||
|
new Avd12ItemSheet(spec).render(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
async deleteSubitem(ev) {
|
||||||
|
let field = $(ev.currentTarget).data('type');
|
||||||
|
let idx = Number($(ev.currentTarget).data('index'));
|
||||||
|
let oldArray = this.object.system[field];
|
||||||
|
let itemData = this.object.system[field][idx];
|
||||||
|
if (itemData.name != 'None') {
|
||||||
|
let newArray = [];
|
||||||
|
for (var i = 0; i < oldArray.length; i++) {
|
||||||
|
if (i != idx) {
|
||||||
|
newArray.push(oldArray[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.object.update({ [`system.${field}`]: newArray });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
/** @override */
|
/** @override */
|
||||||
activateListeners(html) {
|
activateListeners(html) {
|
||||||
@ -120,10 +186,6 @@ export class Avd12ItemSheet extends ItemSheet {
|
|||||||
item.sheet.render(true);
|
item.sheet.render(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
html.find('.delete-spec').click(ev => {
|
|
||||||
this.object.update({ "data.specialisation": [{ name: 'None' }] });
|
|
||||||
});
|
|
||||||
|
|
||||||
html.find('.delete-subitem').click(ev => {
|
html.find('.delete-subitem').click(ev => {
|
||||||
this.deleteSubitem(ev);
|
this.deleteSubitem(ev);
|
||||||
});
|
});
|
||||||
@ -139,14 +201,33 @@ export class Avd12ItemSheet extends ItemSheet {
|
|||||||
this.viewSubitem(ev);
|
this.viewSubitem(ev);
|
||||||
});
|
});
|
||||||
|
|
||||||
html.find('.view-spec').click(ev => {
|
html.find('.add-module-level').click(ev => {
|
||||||
this.manageSpec();
|
let levels = duplicate(this.object.system.levels)
|
||||||
});
|
levels.push({ choices: [ {selected: false, features: {} }, {selected: false, features: {} } ] })
|
||||||
|
this.object.update({ 'system.levels': levels })
|
||||||
|
})
|
||||||
|
|
||||||
|
html.find('.module-feature-delete').click(ev => {
|
||||||
|
let levels = duplicate(this.object.system.levels)
|
||||||
|
let levelIndex = Number($(ev.currentTarget).parents(".item").data("level-index"))
|
||||||
|
let choiceIndex = Number($(ev.currentTarget).parents(".item").data("choice-index"))
|
||||||
|
let featureId = $(ev.currentTarget).parents(".item").data("feature-id")
|
||||||
|
levels[levelIndex].choices[choiceIndex].features[featureId] = undefined
|
||||||
|
this.object.update({ 'system.levels': levels })
|
||||||
|
})
|
||||||
|
|
||||||
|
html.find('.choice-level-selected').change(ev => {
|
||||||
|
let levels = duplicate(this.object.system.levels)
|
||||||
|
let levelIndex = Number($(ev.currentTarget).parents(".item").data("level-index"))
|
||||||
|
let choiceIndex = Number($(ev.currentTarget).parents(".item").data("choice-index"))
|
||||||
|
for (let choice of levels[levelIndex].choices) {
|
||||||
|
choice.selected = false // Everybody to false
|
||||||
|
}
|
||||||
|
levels[levelIndex].choices[choiceIndex].selected = ev.currentTarget.value
|
||||||
|
this.object.update({ 'system.levels': levels })
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
get template() {
|
get template() {
|
||||||
let type = this.item.type;
|
let type = this.item.type;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { Avd12Utility } from "./avd12-utility.js";
|
import { Avd12Utility } from "./avd12-utility.js";
|
||||||
|
|
||||||
export const defaultItemImg = {
|
export const defaultItemImg = {
|
||||||
skill: "systems/fvtt-avd12/images/icons/skill1.webp",
|
//skill: "systems/fvtt-avd12/images/icons/skill1.webp",
|
||||||
armor: "systems/fvtt-avd12/images/icons/chest2.webp",
|
armor: "systems/fvtt-avd12/images/icons/chest2.webp",
|
||||||
shield: "systems/fvtt-avd12/images/icons/shield2.webp",
|
shield: "systems/fvtt-avd12/images/icons/shield2.webp",
|
||||||
weapon: "systems/fvtt-avd12/images/icons/weapon2.webp",
|
weapon: "systems/fvtt-avd12/images/icons/weapon2.webp",
|
||||||
|
@ -41,6 +41,9 @@ export class Avd12Utility {
|
|||||||
Handlebars.registerHelper('mul', function (a, b) {
|
Handlebars.registerHelper('mul', function (a, b) {
|
||||||
return parseInt(a) * parseInt(b);
|
return parseInt(a) * parseInt(b);
|
||||||
})
|
})
|
||||||
|
Handlebars.registerHelper('add', function (a, b) {
|
||||||
|
return parseInt(a) + parseInt(b);
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/*-------------------------------------------- */
|
/*-------------------------------------------- */
|
||||||
@ -62,6 +65,27 @@ export class Avd12Utility {
|
|||||||
return duplicate(this.shieldSkills)
|
return duplicate(this.shieldSkills)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
static buildBonusList() {
|
||||||
|
let bonusList = []
|
||||||
|
for(let key in game.system.model.Actor.character.bonus) {
|
||||||
|
let bonuses = game.system.model.Actor.character.bonus[key]
|
||||||
|
for (let bonus in bonuses) {
|
||||||
|
bonusList.push( key + "." + bonus )
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for(let key in game.system.model.Actor.character.attributes) {
|
||||||
|
let attrs = game.system.model.Actor.character.attributes[key]
|
||||||
|
for(let skillKey in attrs.skills) {
|
||||||
|
bonusList.push( key + ".skills." + skillKey + ".modifier" )
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for(let key in game.system.model.Actor.character.universal.skills) {
|
||||||
|
bonusList.push( "universal.skills." + key + ".modifier" )
|
||||||
|
}
|
||||||
|
return bonusList
|
||||||
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static async ready() {
|
static async ready() {
|
||||||
const skills = await Avd12Utility.loadCompendium("fvtt-avd12.skills")
|
const skills = await Avd12Utility.loadCompendium("fvtt-avd12.skills")
|
||||||
@ -133,6 +157,10 @@ export class Avd12Utility {
|
|||||||
'systems/fvtt-avd12/templates/items/partial-options-attributes.hbs',
|
'systems/fvtt-avd12/templates/items/partial-options-attributes.hbs',
|
||||||
'systems/fvtt-avd12/templates/items/partial-options-equipment-types.hbs',
|
'systems/fvtt-avd12/templates/items/partial-options-equipment-types.hbs',
|
||||||
'systems/fvtt-avd12/templates/items/partial-options-spell-types.hbs',
|
'systems/fvtt-avd12/templates/items/partial-options-spell-types.hbs',
|
||||||
|
'systems/fvtt-avd12/templates/items/partial-options-spell-levels.hbs',
|
||||||
|
'systems/fvtt-avd12/templates/items/partial-options-focus-bond.hbs',
|
||||||
|
'systems/fvtt-avd12/templates/items/partial-options-focus-treatment.hbs',
|
||||||
|
'systems/fvtt-avd12/templates/items/partial-options-focus-core.hbs',
|
||||||
]
|
]
|
||||||
return loadTemplates(templatePaths);
|
return loadTemplates(templatePaths);
|
||||||
}
|
}
|
||||||
|
@ -1299,3 +1299,10 @@ ul, li {
|
|||||||
min-width:2rem;
|
min-width:2rem;
|
||||||
max-width: 2rem;
|
max-width: 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.drop-module-step {
|
||||||
|
background: linear-gradient(to bottom, #6c95b9fc 5%, #105177ab 100%);
|
||||||
|
background-color: #7d5d3b00;
|
||||||
|
border-radius: 3px;
|
||||||
|
border: 2px ridge #846109;
|
||||||
|
}
|
||||||
|
14
system.json
14
system.json
@ -3,8 +3,8 @@
|
|||||||
"esmodules": [
|
"esmodules": [
|
||||||
"modules/avd12-main.js"
|
"modules/avd12-main.js"
|
||||||
],
|
],
|
||||||
"gridDistance": 5,
|
"gridDistance": 1,
|
||||||
"gridUnits": "m",
|
"gridUnits": "u",
|
||||||
"languages": [
|
"languages": [
|
||||||
{
|
{
|
||||||
"lang": "en",
|
"lang": "en",
|
||||||
@ -20,15 +20,13 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"license": "LICENSE.txt",
|
"license": "LICENSE.txt",
|
||||||
"manifest": "https://www.uberwald.me/gitea/uberwald/fvtt-avd12/raw/branch/master/system.json",
|
"manifest": "https://www.uberwald.me/gitea/public/fvtt-avd12/raw/branch/master/system.json",
|
||||||
"compatibility": {
|
"compatibility": {
|
||||||
"minimum": "10",
|
"minimum": "10",
|
||||||
"verified": "10",
|
"verified": "10",
|
||||||
"maximum": "10"
|
"maximum": "10"
|
||||||
},
|
},
|
||||||
"id": "fvtt-avd12",
|
"id": "fvtt-avd12",
|
||||||
"packs": [
|
|
||||||
],
|
|
||||||
"primaryTokenAttribute": "secondary.health",
|
"primaryTokenAttribute": "secondary.health",
|
||||||
"secondaryTokenAttribute": "secondary.delirium",
|
"secondaryTokenAttribute": "secondary.delirium",
|
||||||
"socket": true,
|
"socket": true,
|
||||||
@ -36,8 +34,8 @@
|
|||||||
"styles/simple.css"
|
"styles/simple.css"
|
||||||
],
|
],
|
||||||
"title": "AnyVenture D12 RPG",
|
"title": "AnyVenture D12 RPG",
|
||||||
"url": "https://www.uberwald.me/gitea/uberwald/fvtt-avd12",
|
"url": "https://www.uberwald.me/gitea/public/fvtt-avd12",
|
||||||
"version": "10.0.0",
|
"version": "10.0.6",
|
||||||
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-avd12/archive/fvtt-avd12-v10.0.0.zip",
|
"download": "https://www.uberwald.me/gitea/public/fvtt-avd12/archive/fvtt-avd12-v10.0.6.zip",
|
||||||
"background": "systems/fvtt-avd12/images/ui/avd12_welcome_page.webp"
|
"background": "systems/fvtt-avd12/images/ui/avd12_welcome_page.webp"
|
||||||
}
|
}
|
140
template.json
140
template.json
@ -26,7 +26,21 @@
|
|||||||
"value": 0,
|
"value": 0,
|
||||||
"bonuseffect": 0,
|
"bonuseffect": 0,
|
||||||
"mod": 0,
|
"mod": 0,
|
||||||
"col": 1
|
"col": 1,
|
||||||
|
"skills": {
|
||||||
|
"athletics": {
|
||||||
|
"modifier": 0,
|
||||||
|
"good": false
|
||||||
|
},
|
||||||
|
"block": {
|
||||||
|
"modifier": 0,
|
||||||
|
"good": false
|
||||||
|
},
|
||||||
|
"strength": {
|
||||||
|
"modifier": 0,
|
||||||
|
"good": false
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"agility": {
|
"agility": {
|
||||||
"label": "Agility",
|
"label": "Agility",
|
||||||
@ -34,7 +48,21 @@
|
|||||||
"value": 0,
|
"value": 0,
|
||||||
"bonuseffect": 0,
|
"bonuseffect": 0,
|
||||||
"col": 1,
|
"col": 1,
|
||||||
"mod": 0
|
"mod": 0,
|
||||||
|
"skills": {
|
||||||
|
"acrobatics": {
|
||||||
|
"modifier": 0 ,
|
||||||
|
"good": false
|
||||||
|
},
|
||||||
|
"stealth": {
|
||||||
|
"modifier": 0,
|
||||||
|
"good": false
|
||||||
|
},
|
||||||
|
"dodge": {
|
||||||
|
"modifier": 0,
|
||||||
|
"good": false
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"willpower": {
|
"willpower": {
|
||||||
"label": "Willpower",
|
"label": "Willpower",
|
||||||
@ -42,7 +70,21 @@
|
|||||||
"value": 0,
|
"value": 0,
|
||||||
"bonuseffect": 0,
|
"bonuseffect": 0,
|
||||||
"col": 1,
|
"col": 1,
|
||||||
"mod": 0
|
"mod": 0,
|
||||||
|
"skills": {
|
||||||
|
"concentration": {
|
||||||
|
"modifier": 0,
|
||||||
|
"good": false
|
||||||
|
},
|
||||||
|
"endurance": {
|
||||||
|
"modifier": 0 ,
|
||||||
|
"good": false
|
||||||
|
},
|
||||||
|
"resistance": {
|
||||||
|
"modifier": 0,
|
||||||
|
"good": false
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"knowledge": {
|
"knowledge": {
|
||||||
"label": "Knowledge",
|
"label": "Knowledge",
|
||||||
@ -50,7 +92,29 @@
|
|||||||
"value": 0,
|
"value": 0,
|
||||||
"bonuseffect": 0,
|
"bonuseffect": 0,
|
||||||
"col": 1,
|
"col": 1,
|
||||||
"mod": 0
|
"mod": 0,
|
||||||
|
"skills": {
|
||||||
|
"wilderness": {
|
||||||
|
"modifier": 0,
|
||||||
|
"good": false
|
||||||
|
},
|
||||||
|
"academic": {
|
||||||
|
"modifier": 0,
|
||||||
|
"good": false
|
||||||
|
},
|
||||||
|
"arcanum": {
|
||||||
|
"modifier": 0,
|
||||||
|
"good": false
|
||||||
|
},
|
||||||
|
"medicine": {
|
||||||
|
"modifier": 0,
|
||||||
|
"good": false
|
||||||
|
},
|
||||||
|
"thievery": {
|
||||||
|
"modifier": 0,
|
||||||
|
"good": false
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"social": {
|
"social": {
|
||||||
"label": "Social",
|
"label": "Social",
|
||||||
@ -58,7 +122,37 @@
|
|||||||
"value": 0,
|
"value": 0,
|
||||||
"bonuseffect": 0,
|
"bonuseffect": 0,
|
||||||
"col": 1,
|
"col": 1,
|
||||||
"mod": 0
|
"mod": 0,
|
||||||
|
"skills": {
|
||||||
|
"persuasion": {
|
||||||
|
"modifier": 0,
|
||||||
|
"good": false
|
||||||
|
},
|
||||||
|
"insight": {
|
||||||
|
"modifier": 0,
|
||||||
|
"good": false
|
||||||
|
},
|
||||||
|
"performance": {
|
||||||
|
"modifier": 0,
|
||||||
|
"good": false
|
||||||
|
},
|
||||||
|
"animals": {
|
||||||
|
"modifier": 0,
|
||||||
|
"good": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"universal": {
|
||||||
|
"skills": {
|
||||||
|
"search": {
|
||||||
|
"modifier": 0,
|
||||||
|
"good": false
|
||||||
|
},
|
||||||
|
"initiative": {
|
||||||
|
"modifier": 0,
|
||||||
|
"good": false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"size": {
|
"size": {
|
||||||
@ -220,7 +314,6 @@
|
|||||||
},
|
},
|
||||||
"Item": {
|
"Item": {
|
||||||
"types": [
|
"types": [
|
||||||
"skill",
|
|
||||||
"spell",
|
"spell",
|
||||||
"armor",
|
"armor",
|
||||||
"shield",
|
"shield",
|
||||||
@ -228,7 +321,12 @@
|
|||||||
"weapon",
|
"weapon",
|
||||||
"module",
|
"module",
|
||||||
"money",
|
"money",
|
||||||
"condition"
|
"condition",
|
||||||
|
"action",
|
||||||
|
"freeaction",
|
||||||
|
"reaction",
|
||||||
|
"stance",
|
||||||
|
"trait"
|
||||||
],
|
],
|
||||||
"templates": {
|
"templates": {
|
||||||
"commonitem": {
|
"commonitem": {
|
||||||
@ -272,15 +370,36 @@
|
|||||||
"value": 0
|
"value": 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"focus": {
|
||||||
|
"isfocus": false,
|
||||||
|
"core": "",
|
||||||
|
"treatment": "",
|
||||||
|
"bond": ""
|
||||||
|
},
|
||||||
"weight": 0,
|
"weight": 0,
|
||||||
"cost": 0,
|
"cost": 0,
|
||||||
"health": 0,
|
"health": 0,
|
||||||
"movespeed": 0
|
"movespeed": 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"skill": {
|
"action": {
|
||||||
"attribute": "",
|
"description": ""
|
||||||
"value": 0,
|
},
|
||||||
|
"reaction": {
|
||||||
|
"description": ""
|
||||||
|
},
|
||||||
|
"freeaction": {
|
||||||
|
"description": ""
|
||||||
|
},
|
||||||
|
"stance": {
|
||||||
|
"active": false,
|
||||||
|
"description": ""
|
||||||
|
},
|
||||||
|
"trait": {
|
||||||
|
"traittype": "",
|
||||||
|
"computebonus": false,
|
||||||
|
"bonusdata": "",
|
||||||
|
"bonusvalue": 0,
|
||||||
"description": ""
|
"description": ""
|
||||||
},
|
},
|
||||||
"spell": {
|
"spell": {
|
||||||
@ -352,6 +471,7 @@
|
|||||||
"description": ""
|
"description": ""
|
||||||
},
|
},
|
||||||
"module": {
|
"module": {
|
||||||
|
"levels": [],
|
||||||
"description": ""
|
"description": ""
|
||||||
},
|
},
|
||||||
"condition": {
|
"condition": {
|
||||||
|
30
templates/items/item-action-sheet.hbs
Normal file
30
templates/items/item-action-sheet.hbs
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<form class="{{cssClass}}" autocomplete="off">
|
||||||
|
<header class="sheet-header">
|
||||||
|
<img class="item-sheet-img" src="{{img}}" data-edit="img" title="{{name}}"/>
|
||||||
|
<div class="header-fields">
|
||||||
|
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
{{> systems/fvtt-avd12/templates/items/partial-item-nav.hbs}}
|
||||||
|
|
||||||
|
|
||||||
|
{{!-- Sheet Body --}}
|
||||||
|
<section class="sheet-body">
|
||||||
|
|
||||||
|
{{> systems/fvtt-avd12/templates/items/partial-item-description.hbs}}
|
||||||
|
|
||||||
|
<div class="tab details" data-group="primary" data-tab="details">
|
||||||
|
|
||||||
|
<div class="tab" data-group="primary">
|
||||||
|
<ul>
|
||||||
|
<li class="flexrow">
|
||||||
|
<label class="item-field-label-long">Selected</label>
|
||||||
|
<input type="checkbox" class="item-field-label-short" name="system.selected" {{checked system.selected}} />
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
</form>
|
30
templates/items/item-freeaction-sheet.hbs
Normal file
30
templates/items/item-freeaction-sheet.hbs
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<form class="{{cssClass}}" autocomplete="off">
|
||||||
|
<header class="sheet-header">
|
||||||
|
<img class="item-sheet-img" src="{{img}}" data-edit="img" title="{{name}}"/>
|
||||||
|
<div class="header-fields">
|
||||||
|
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
{{> systems/fvtt-avd12/templates/items/partial-item-nav.hbs}}
|
||||||
|
|
||||||
|
|
||||||
|
{{!-- Sheet Body --}}
|
||||||
|
<section class="sheet-body">
|
||||||
|
|
||||||
|
{{> systems/fvtt-avd12/templates/items/partial-item-description.hbs}}
|
||||||
|
|
||||||
|
<div class="tab details" data-group="primary" data-tab="details">
|
||||||
|
|
||||||
|
<div class="tab" data-group="primary">
|
||||||
|
<ul>
|
||||||
|
<li class="flexrow">
|
||||||
|
<label class="item-field-label-long">Selected</label>
|
||||||
|
<input type="checkbox" class="item-field-label-short" name="system.selected" {{checked system.selected}} />
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
</form>
|
@ -6,7 +6,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
{{> systems/fvtt-avd12/templates/items/partial-item-nav.hbs}}
|
{{> systems/fvtt-avd12/templates/items/partial-item-nav.hbs builder=true}}
|
||||||
|
|
||||||
|
|
||||||
{{!-- Sheet Body --}}
|
{{!-- Sheet Body --}}
|
||||||
@ -15,12 +15,53 @@
|
|||||||
{{> systems/fvtt-avd12/templates/items/partial-item-description.hbs}}
|
{{> systems/fvtt-avd12/templates/items/partial-item-description.hbs}}
|
||||||
|
|
||||||
<div class="tab details" data-group="primary" data-tab="details">
|
<div class="tab details" data-group="primary" data-tab="details">
|
||||||
|
TODO : The tre of module choices will be displayed here for players, with the "selected" option only
|
||||||
<div class="tab" data-group="primary">
|
|
||||||
<ul>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{#if isGM}}
|
||||||
|
<div class="tab builder" data-group="primary" data-tab="builder">
|
||||||
|
|
||||||
|
<div class="tab" data-group="primary">
|
||||||
|
<ul>
|
||||||
|
{{#each system.levels as |level index|}}
|
||||||
|
<hr>
|
||||||
|
<li class="flexrow">
|
||||||
|
<h2 class="item-field-label-long">Level {{add index 1}}</h2>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<ul class="ul-level1">
|
||||||
|
{{#each level.choices as |choice choiceIndex|}}
|
||||||
|
<li class="">
|
||||||
|
<h3 class="item-field-label-long">Level choice {{add choiceIndex 1}}</h3></li>
|
||||||
|
<li class="item flexrow" data-level-index="{{../index}}" data-choice-index="{{choiceIndex}}">
|
||||||
|
<div class="drop-module-step" data-choice-index="{{choiceIndex}}" data-level-index="{{../index}}">
|
||||||
|
<label data-choice-index="{{choiceIndex}}" data-level-index="{{../index}}">Drop traits/actions/... here !</label>
|
||||||
|
</div>
|
||||||
|
<span class="item-field-label-short"> </span>
|
||||||
|
<label class="item-field-label-short">Selected</label>
|
||||||
|
<input type="checkbox" class="item-field-label-short choice-level-selected" {{checked choice.selected}} />
|
||||||
|
</li>
|
||||||
|
{{#each choice.features as |feature id|}}
|
||||||
|
<li class="flexrow item" data-level-index="{{../index}}" data-choice-index="{{choiceIndex}}" data-feature-id="{{feature._id}}" >
|
||||||
|
<label class="item-field-label-medium">{{feature.name}}</label>
|
||||||
|
<label class="item-field-label-long2">{{{feature.descriptionHTML}}}</label>
|
||||||
|
<div class="item-controls item-controls-fixed">
|
||||||
|
<a class="item-control module-feature-delete" title="Delete Feature"><i class="fas fa-trash"></i></a>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
{{/each}}
|
||||||
|
{{/each}}
|
||||||
|
</ul>
|
||||||
|
{{/each}}
|
||||||
|
|
||||||
|
<li class="flexrow item">
|
||||||
|
<button class="chat-card-button add-module-level">Add a level</button>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
@ -19,18 +19,8 @@
|
|||||||
<div class="tab" data-group="primary">
|
<div class="tab" data-group="primary">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="flexrow">
|
<li class="flexrow">
|
||||||
<label class="item-field-label-long">Attribute</label>
|
<label class="item-field-label-long">Selected</label>
|
||||||
<select class="item-field-label-long" type="text" name="system.attribute" value="{{system.attribute}}" data-dtype="String">
|
<input type="checkbox" class="item-field-label-short" name="system.selected" {{checked system.selected}} />
|
||||||
{{#select system.attribute}}
|
|
||||||
{{> systems/fvtt-avd12/templates/items/partial-options-attributes.hbs}}
|
|
||||||
{{/select}}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="flexrow">
|
|
||||||
<label class="item-field-label-long">Level</label>
|
|
||||||
<input type="text" class="item-field-label-short" name="system.value" value="{{system.value}}" data-dtype="Number"/>
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
31
templates/items/item-stance-sheet.hbs
Normal file
31
templates/items/item-stance-sheet.hbs
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<form class="{{cssClass}}" autocomplete="off">
|
||||||
|
<header class="sheet-header">
|
||||||
|
<img class="item-sheet-img" src="{{img}}" data-edit="img" title="{{name}}"/>
|
||||||
|
<div class="header-fields">
|
||||||
|
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
{{> systems/fvtt-avd12/templates/items/partial-item-nav.hbs}}
|
||||||
|
|
||||||
|
|
||||||
|
{{!-- Sheet Body --}}
|
||||||
|
<section class="sheet-body">
|
||||||
|
|
||||||
|
{{> systems/fvtt-avd12/templates/items/partial-item-description.hbs}}
|
||||||
|
|
||||||
|
<div class="tab details" data-group="primary" data-tab="details">
|
||||||
|
|
||||||
|
<div class="tab" data-group="primary">
|
||||||
|
<ul>
|
||||||
|
<li class="flexrow">
|
||||||
|
<label class="item-field-label-long">Active</label>
|
||||||
|
<input type="checkbox" class="item-field-label-short" name="system.active" {{checked system.active}} />
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
</form>
|
53
templates/items/item-trait-sheet.hbs
Normal file
53
templates/items/item-trait-sheet.hbs
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
<form class="{{cssClass}}" autocomplete="off">
|
||||||
|
<header class="sheet-header">
|
||||||
|
<img class="item-sheet-img" src="{{img}}" data-edit="img" title="{{name}}"/>
|
||||||
|
<div class="header-fields">
|
||||||
|
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
{{> systems/fvtt-avd12/templates/items/partial-item-nav.hbs}}
|
||||||
|
|
||||||
|
|
||||||
|
{{!-- Sheet Body --}}
|
||||||
|
<section class="sheet-body">
|
||||||
|
|
||||||
|
{{> systems/fvtt-avd12/templates/items/partial-item-description.hbs}}
|
||||||
|
|
||||||
|
<div class="tab details" data-group="primary" data-tab="details">
|
||||||
|
|
||||||
|
<div class="tab" data-group="primary">
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class="flexrow">
|
||||||
|
<label class="item-field-label-long">Bonus automation</label>
|
||||||
|
<input type="checkbox" class="item-field-label-short" name="system.computebonus" {{checked system.computebonus}} />
|
||||||
|
</li>
|
||||||
|
{{#if system.computebonus}}
|
||||||
|
<li class="flexrow">
|
||||||
|
|
||||||
|
<label class="item-field-label-long">Bonus path</label>
|
||||||
|
<select class="item-field-label-long" type="text" name="system.bonusdata" value="{{system.bonusdata}}" data-dtype="String">
|
||||||
|
{{#select system.bonusdata}}
|
||||||
|
{{#each bonusList as |bonus idx|}}
|
||||||
|
<option value="{{bonus}}">{{bonus}}</option>
|
||||||
|
{{/each}}
|
||||||
|
{{/select}}
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
<li class="flexrow">
|
||||||
|
<label class="item-field-label-long">Bonus value</label>
|
||||||
|
<input type="text" class="item-field-label-short" name="system.bonusvalue" value="{{system.bonusvalue}}" data-dtype="Number"/>
|
||||||
|
</li>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
<li class="flexrow">
|
||||||
|
<label class="item-field-label-long">Selected</label>
|
||||||
|
<input type="checkbox" class="item-field-label-short" name="system.selected" {{checked system.selected}} />
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
</form>
|
@ -91,6 +91,33 @@
|
|||||||
{{/each}}
|
{{/each}}
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li class='flexrow'>
|
||||||
|
<h3 class='item-field-label-long'>
|
||||||
|
Focus
|
||||||
|
</h3>
|
||||||
|
<input type="checkbox" class="item-field-label-short" name="system.focus.isfocus" {{checked system.focus.isfocus}} />
|
||||||
|
</li>
|
||||||
|
|
||||||
|
{{#if system.focus.isfocus}}
|
||||||
|
<li class='flexrow'>
|
||||||
|
<select class="item-field-label-long" type="text" name="system.focus.core" value="{{system.focus.core}}" data-dtype="String">
|
||||||
|
{{#select system.focus.core}}
|
||||||
|
{{> systems/fvtt-avd12/templates/items/partial-options-focus-core.hbs}}
|
||||||
|
{{/select}}
|
||||||
|
</select>
|
||||||
|
<select class="item-field-label-long" type="text" name="system.focus.treatment" value="{{system.focus.treatment}}" data-dtype="String">
|
||||||
|
{{#select system.focus.treatment}}
|
||||||
|
{{> systems/fvtt-avd12/templates/items/partial-options-focus-treatment.hbs}}
|
||||||
|
{{/select}}
|
||||||
|
</select>
|
||||||
|
<select class="item-field-label-long" type="text" name="system.focus.bond" value="{{system.focus.bond}}" data-dtype="String">
|
||||||
|
{{#select system.focus.bond}}
|
||||||
|
{{> systems/fvtt-avd12/templates/items/partial-options-focus-bond.hbs}}
|
||||||
|
{{/select}}
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
<li class='flexrow'>
|
<li class='flexrow'>
|
||||||
<h3 class='item-field-label-long'>
|
<h3 class='item-field-label-long'>
|
||||||
Various
|
Various
|
||||||
|
@ -2,4 +2,7 @@
|
|||||||
<nav class="sheet-tabs tabs" data-group="primary">
|
<nav class="sheet-tabs tabs" data-group="primary">
|
||||||
<a class="item" data-tab="description">Description</a>
|
<a class="item" data-tab="description">Description</a>
|
||||||
<a class="item" data-tab="details">Details</a>
|
<a class="item" data-tab="details">Details</a>
|
||||||
|
{{#if builder}}
|
||||||
|
<a class="item" data-tab="builder">Builder (GM only)</a>
|
||||||
|
{{/if}}
|
||||||
</nav>
|
</nav>
|
||||||
|
8
templates/items/partial-options-focus-bond.hbs
Normal file
8
templates/items/partial-options-focus-bond.hbs
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<option value="bondnone">Bond: None</option>
|
||||||
|
<option value="bondeasy">Bond: Easy</option>
|
||||||
|
<option value="bondcommon">Bond: Common</option>
|
||||||
|
<option value="bonduncommon">Bond: Uncommon</option>
|
||||||
|
<option value="bondrare">Bond: Rare</option>
|
||||||
|
<option value="bondlegendary">Bond: Legendary</option>
|
||||||
|
<option value="bondmythic">Bond: Mythic</option>
|
||||||
|
<option value="bonddivine">Bond: Divine</option>
|
9
templates/items/partial-options-focus-core.hbs
Normal file
9
templates/items/partial-options-focus-core.hbs
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<option value="corenone">Core: None</option>
|
||||||
|
<option value="core1gp">Core: 1GP</option>
|
||||||
|
<option value="core5gp">Core: 5GP</option>
|
||||||
|
<option value="core50gp">Core: 50GP</option>
|
||||||
|
<option value="core100gp">Core: 100GP</option>
|
||||||
|
<option value="core300gp">Core: 300GP</option>
|
||||||
|
<option value="core500gp">Core: 500GP</option>
|
||||||
|
<option value="core800gp">Core: 800GP</option>
|
||||||
|
<option value="core1000gp">Core: 1000GP</option>
|
9
templates/items/partial-options-focus-treatment.hbs
Normal file
9
templates/items/partial-options-focus-treatment.hbs
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<option value="treatmentnone">Treatment: None</option>
|
||||||
|
<option value="treatment1gp">Treatment: Tin [1 GP]</option>
|
||||||
|
<option value="treatment4gp">Treatment: Copper [4 GP]</option>
|
||||||
|
<option value="treatment20gp">Treatment: Iron [20 GP]</option>
|
||||||
|
<option value="treatment50gp">Treatment: Silver [50 GP]</option>
|
||||||
|
<option value="treatment500gp">Treatment: Gold [500 GP]</option>
|
||||||
|
<option value="treatment1000gp">Treatment: Platinum [1000 GP]</option>
|
||||||
|
<option value="treatment5000gp">Treatment: Mithral [5000 GP]</option>
|
||||||
|
<option value="treatment10000gp">Treatment: Starsteel [10000 GP]</option>
|
@ -1,3 +1,4 @@
|
|||||||
|
<option value="unarmed">Unarmed</option>
|
||||||
<option value="ranged">Ranged</option>
|
<option value="ranged">Ranged</option>
|
||||||
<option value="blunt">Blunt</option>
|
<option value="blunt">Blunt</option>
|
||||||
<option value="slash">Slash</option>
|
<option value="slash">Slash</option>
|
||||||
|
Reference in New Issue
Block a user