Adds compendium and Distinct logic
This commit is contained in:
parent
928767e365
commit
bffd6bda85
11 changed files with 229 additions and 150 deletions
|
@ -56,7 +56,7 @@ export class BladesActorSheet extends ActorSheet {
|
|||
html.find('.item-delete').click(ev => {
|
||||
const element = $(ev.currentTarget).parents(".item");
|
||||
this.actor.deleteOwnedItem(element.data("itemId"));
|
||||
li.slideUp(200, () => this.render(false));
|
||||
element.slideUp(200, () => this.render(false));
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -162,34 +162,62 @@ export class BladesActorSheet extends ActorSheet {
|
|||
async _onDrop (event) {
|
||||
|
||||
event.preventDefault();
|
||||
const actor = this.actor;
|
||||
|
||||
// Get dropped data
|
||||
let data;
|
||||
let item;
|
||||
try {
|
||||
data = JSON.parse(event.dataTransfer.getData('text/plain'));
|
||||
} catch (err) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Add only Items.
|
||||
if (data.type === "Item") {
|
||||
|
||||
// Class must be distinct.
|
||||
let item = game.items.get(data.id);
|
||||
if (item.data.type === "class") {
|
||||
actor.items.forEach(i => {
|
||||
if (i.data.type === "class") {
|
||||
actor.deleteOwnedItem(i.id);
|
||||
}
|
||||
// Import from Compendium
|
||||
if (data.pack) {
|
||||
const pack = game.packs.find(p => p.collection === data.pack);
|
||||
await pack.getEntity(data.id).then(ent => {
|
||||
item = ent;
|
||||
});
|
||||
}
|
||||
// Get from Items list.
|
||||
else {
|
||||
// Class must be distinct.
|
||||
item = game.items.get(data.id);
|
||||
}
|
||||
|
||||
if (item) {
|
||||
this._removeDuplicatedItemType(item.data.type);
|
||||
}
|
||||
|
||||
// Call parent on drop logic
|
||||
return super._onDrop(event);
|
||||
}
|
||||
|
||||
// Call parent on drop logic
|
||||
return super._onDrop(event);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
/**
|
||||
* Removes a duplicate item type from charlist.
|
||||
*
|
||||
* @param {string} item_type
|
||||
*/
|
||||
_removeDuplicatedItemType(item_type) {
|
||||
|
||||
const actor = this.actor;
|
||||
let distinct_types = ["class", "heritage", "background", "vice"];
|
||||
|
||||
if (distinct_types.indexOf(item_type) >= 0) {
|
||||
actor.items.forEach(i => {
|
||||
if (i.data.type === item_type) {
|
||||
actor.deleteOwnedItem(i.id);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ export class BladesItemSheet extends ItemSheet {
|
|||
|
||||
/** @override */
|
||||
get template() {
|
||||
const path = "systems/blades-in-the-dark/templates/items/";
|
||||
const path = "systems/blades-in-the-dark/templates/items";
|
||||
return `${path}/${this.item.data.type}.html`;
|
||||
}
|
||||
|
||||
|
|
7
packs/backgrounds.db
Normal file
7
packs/backgrounds.db
Normal file
|
@ -0,0 +1,7 @@
|
|||
{"_id":"7q2RhjaBzYBoWmMa","name":"Law","permission":{"default":0},"type":"background","data":{"description":""},"folder":"YkuVHwuSV9IfsxU0","sort":300000,"flags":{}}
|
||||
{"_id":"7zLXN88TgLkP0JlK","name":"Noble","permission":{"default":0},"type":"background","data":{"description":""},"folder":"YkuVHwuSV9IfsxU0","sort":600000,"flags":{}}
|
||||
{"_id":"8bDf9RzcGeNz48Kp","name":"Underworld","permission":{"default":0},"type":"background","data":{"description":""},"folder":"YkuVHwuSV9IfsxU0","sort":700000,"flags":{}}
|
||||
{"_id":"S1CvKYfGwHFq9yxR","name":"Trade","permission":{"default":0},"type":"background","data":{"description":""},"folder":"YkuVHwuSV9IfsxU0","sort":400000,"flags":{}}
|
||||
{"_id":"ZplBgIXHxWLUXX1o","name":"Academic","permission":{"default":0},"type":"background","data":{"description":""},"folder":"YkuVHwuSV9IfsxU0","sort":100000,"flags":{}}
|
||||
{"_id":"ex7Mqv42SKZrfUL0","name":"Military","permission":{"default":0},"type":"background","data":{"description":""},"folder":"YkuVHwuSV9IfsxU0","sort":500000,"flags":{}}
|
||||
{"_id":"qGkgWsdxcnl0cFhm","name":"Labor","permission":{"default":0},"type":"background","data":{"description":""},"folder":"YkuVHwuSV9IfsxU0","sort":200000,"flags":{}}
|
8
packs/classes.db
Normal file
8
packs/classes.db
Normal file
|
@ -0,0 +1,8 @@
|
|||
{"_id":"8jExf4Zqad6e3bvn","name":"Leech","permission":{"default":0},"type":"class","data":{"description":"","base_skills":{"hunt":[0],"study":[0],"survey":[0],"tinker":[0],"finesse":[0],"prowl":[0],"skirmish":[0],"wreck":[0],"attune":[0],"command":[0],"consort":[0],"sway":[0]},"class_items":[]},"folder":"Q5shG4toM5PkRSnX","sort":400000,"flags":{}}
|
||||
{"_id":"CAHfNrPDJZKVNMrH","name":"Lurk","permission":{"default":0},"type":"class","data":{"description":"","base_skills":{"hunt":[0],"study":[0],"survey":[0],"tinker":[0],"finesse":[0],"prowl":[0],"skirmish":[0],"wreck":[0],"attune":[0],"command":[0],"consort":[0],"sway":[0]},"class_items":[]},"folder":"Q5shG4toM5PkRSnX","sort":500000,"flags":{}}
|
||||
{"_id":"JGxBjlbooxuUHe4E","name":"Hound","permission":{"default":0},"type":"class","data":{"description":"","base_skills":{"hunt":[0],"study":[0],"survey":[0],"tinker":[0],"finesse":[0],"prowl":[0],"skirmish":[0],"wreck":[0],"attune":[0],"command":[0],"consort":[0],"sway":[0]}},"folder":"Q5shG4toM5PkRSnX","sort":100000,"flags":{}}
|
||||
{"_id":"OKRtWdhpwIAdX3RS","name":"Itemko","permission":{"default":0},"type":"item","data":{"class_restriction":"","load":0,"description":""},"folder":"3Rl8reBeGom1vbie","sort":100000,"flags":{}}
|
||||
{"_id":"P6LMZBrG5U9eCjhX","name":"Spider","permission":{"default":0},"type":"class","data":{"description":"","base_skills":{"hunt":[0],"study":[0],"survey":[0],"tinker":[0],"finesse":[0],"prowl":[0],"skirmish":[0],"wreck":[0],"attune":[0],"command":[0],"consort":[0],"sway":[0]},"class_items":[]},"folder":"Q5shG4toM5PkRSnX","sort":700000,"flags":{}}
|
||||
{"_id":"YUGDdyADj0PTBVcP","name":"Slide","permission":{"default":0},"type":"class","data":{"description":"","base_skills":{"hunt":[0],"study":[0],"survey":[0],"tinker":[0],"finesse":[0],"prowl":[0],"skirmish":[0],"wreck":[0],"attune":[0],"command":[0],"consort":[0],"sway":[0]},"class_items":[]},"folder":"Q5shG4toM5PkRSnX","sort":600000,"flags":{}}
|
||||
{"_id":"tEob41rtEbHcswNM","name":"Cutter","permission":{"default":0},"type":"class","data":{"description":"","base_skills":{"hunt":[0],"study":[0],"survey":[0],"tinker":[0],"finesse":[0],"prowl":[0],"skirmish":[0],"wreck":[0],"attune":[0],"command":[0],"consort":[0],"sway":[0]},"class_items":[]},"folder":"Q5shG4toM5PkRSnX","sort":300000,"flags":{}}
|
||||
{"_id":"zOg14xy8ZEku6bNq","name":"Whisper","permission":{"default":0},"type":"class","data":{"description":"","base_skills":{"hunt":[0],"study":[0],"survey":[0],"tinker":[0],"finesse":[0],"prowl":[0],"skirmish":[0],"wreck":[0],"attune":[0],"command":[0],"consort":[0],"sway":[0]},"class_items":[]},"folder":"Q5shG4toM5PkRSnX","sort":200000,"flags":{}}
|
6
packs/heritages.db
Normal file
6
packs/heritages.db
Normal file
|
@ -0,0 +1,6 @@
|
|||
{"_id":"ANBgWHbSQVgUQecV","name":"Iruvia","permission":{"default":0},"type":"heritage","data":{"description":""},"folder":"2TX8ibE6E4CDUGYX","sort":300000,"flags":{}}
|
||||
{"_id":"RrvbKXClyyNBYFBB","name":"Severos","permission":{"default":0},"type":"heritage","data":{"description":""},"folder":"2TX8ibE6E4CDUGYX","sort":400000,"flags":{}}
|
||||
{"_id":"TiL4AssY9Ryty6f9","name":"The Dagger Isles","permission":{"default":0},"type":"heritage","data":{"description":""},"folder":"2TX8ibE6E4CDUGYX","sort":200000,"flags":{}}
|
||||
{"_id":"Tk61Y7K84GgQpqPz","name":"Skovlan","permission":{"default":0},"type":"heritage","data":{"description":""},"folder":"2TX8ibE6E4CDUGYX","sort":500000,"flags":{}}
|
||||
{"_id":"WRzLNozCfzFLg0d6","name":"Tycheros","permission":{"default":0},"type":"heritage","data":{"description":""},"folder":"2TX8ibE6E4CDUGYX","sort":600000,"flags":{}}
|
||||
{"_id":"fKEJOkqoAwinyzrm","name":"Akoros","permission":{"default":0},"type":"heritage","data":{"description":""},"folder":"2TX8ibE6E4CDUGYX","sort":100000,"flags":{}}
|
|
@ -1 +1,28 @@
|
|||
{"_id":"tXgoknEdkgZrDOiI","name":"Test item","permission":{"default":0},"type":"base","data":{},"folder":null,"sort":100001,"flags":{}}
|
||||
{"_id":"0GbyUKjjMof6D8fb","name":"Faith","permission":{"default":0},"type":"vice","data":{"description":""},"folder":"Jz1yD35kaDA2NZtZ","sort":100000,"flags":{}}
|
||||
{"_id":"43dWmFJgAeqcsOJl","name":"Pleasure","permission":{"default":0},"type":"vice","data":{"description":""},"folder":"Jz1yD35kaDA2NZtZ","sort":500000,"flags":{}}
|
||||
{"_id":"7q2RhjaBzYBoWmMa","name":"Law","permission":{"default":0},"type":"background","data":{"description":""},"folder":"YkuVHwuSV9IfsxU0","sort":300000,"flags":{}}
|
||||
{"_id":"7zLXN88TgLkP0JlK","name":"Noble","permission":{"default":0},"type":"background","data":{"description":""},"folder":"YkuVHwuSV9IfsxU0","sort":600000,"flags":{}}
|
||||
{"_id":"8bDf9RzcGeNz48Kp","name":"Underworld","permission":{"default":0},"type":"background","data":{"description":""},"folder":"YkuVHwuSV9IfsxU0","sort":700000,"flags":{}}
|
||||
{"_id":"8jExf4Zqad6e3bvn","name":"Leech","permission":{"default":0},"type":"class","data":{"description":"","base_skills":{"hunt":[0],"study":[0],"survey":[0],"tinker":[0],"finesse":[0],"prowl":[0],"skirmish":[0],"wreck":[0],"attune":[0],"command":[0],"consort":[0],"sway":[0]},"class_items":[]},"folder":"Q5shG4toM5PkRSnX","sort":400000,"flags":{}}
|
||||
{"_id":"ANBgWHbSQVgUQecV","name":"Iruvia","permission":{"default":0},"type":"heritage","data":{"description":""},"folder":"2TX8ibE6E4CDUGYX","sort":300000,"flags":{}}
|
||||
{"_id":"CAHfNrPDJZKVNMrH","name":"Lurk","permission":{"default":0},"type":"class","data":{"description":"","base_skills":{"hunt":[0],"study":[0],"survey":[0],"tinker":[0],"finesse":[0],"prowl":[0],"skirmish":[0],"wreck":[0],"attune":[0],"command":[0],"consort":[0],"sway":[0]},"class_items":[]},"folder":"Q5shG4toM5PkRSnX","sort":500000,"flags":{}}
|
||||
{"_id":"JGxBjlbooxuUHe4E","name":"Hound","permission":{"default":0},"type":"class","data":{"description":"","base_skills":{"hunt":[0],"study":[0],"survey":[0],"tinker":[0],"finesse":[0],"prowl":[0],"skirmish":[0],"wreck":[0],"attune":[0],"command":[0],"consort":[0],"sway":[0]}},"folder":"Q5shG4toM5PkRSnX","sort":100000,"flags":{}}
|
||||
{"_id":"Lp7ezgXB3USzviHa","name":"Obligation","permission":{"default":0},"type":"vice","data":{"description":""},"folder":"Jz1yD35kaDA2NZtZ","sort":400000,"flags":{}}
|
||||
{"_id":"OKRtWdhpwIAdX3RS","name":"Itemko","permission":{"default":0},"type":"item","data":{"class_restriction":"","load":0,"description":""},"folder":"3Rl8reBeGom1vbie","sort":100000,"flags":{}}
|
||||
{"_id":"P6LMZBrG5U9eCjhX","name":"Spider","permission":{"default":0},"type":"class","data":{"description":"","base_skills":{"hunt":[0],"study":[0],"survey":[0],"tinker":[0],"finesse":[0],"prowl":[0],"skirmish":[0],"wreck":[0],"attune":[0],"command":[0],"consort":[0],"sway":[0]},"class_items":[]},"folder":"Q5shG4toM5PkRSnX","sort":700000,"flags":{}}
|
||||
{"_id":"PJ4m6YEsMEzfgAqy","name":"Weird","permission":{"default":0},"type":"vice","data":{"description":""},"folder":"Jz1yD35kaDA2NZtZ","sort":700000,"flags":{}}
|
||||
{"_id":"RrvbKXClyyNBYFBB","name":"Severos","permission":{"default":0},"type":"heritage","data":{"description":""},"folder":"2TX8ibE6E4CDUGYX","sort":400000,"flags":{}}
|
||||
{"_id":"S1CvKYfGwHFq9yxR","name":"Trade","permission":{"default":0},"type":"background","data":{"description":""},"folder":"YkuVHwuSV9IfsxU0","sort":400000,"flags":{}}
|
||||
{"_id":"TiL4AssY9Ryty6f9","name":"The Dagger Isles","permission":{"default":0},"type":"heritage","data":{"description":""},"folder":"2TX8ibE6E4CDUGYX","sort":200000,"flags":{}}
|
||||
{"_id":"Tk61Y7K84GgQpqPz","name":"Skovlan","permission":{"default":0},"type":"heritage","data":{"description":""},"folder":"2TX8ibE6E4CDUGYX","sort":500000,"flags":{}}
|
||||
{"_id":"VNt88GVp0Td0Q8H6","name":"Luxury","permission":{"default":0},"type":"vice","data":{"description":""},"folder":"Jz1yD35kaDA2NZtZ","sort":300000,"flags":{}}
|
||||
{"_id":"WRzLNozCfzFLg0d6","name":"Tycheros","permission":{"default":0},"type":"heritage","data":{"description":""},"folder":"2TX8ibE6E4CDUGYX","sort":600000,"flags":{}}
|
||||
{"_id":"Y0aq94hQO9LyMJN9","name":"Stupor","permission":{"default":0},"type":"vice","data":{"description":""},"folder":"Jz1yD35kaDA2NZtZ","sort":600000,"flags":{}}
|
||||
{"_id":"YUGDdyADj0PTBVcP","name":"Slide","permission":{"default":0},"type":"class","data":{"description":"","base_skills":{"hunt":[0],"study":[0],"survey":[0],"tinker":[0],"finesse":[0],"prowl":[0],"skirmish":[0],"wreck":[0],"attune":[0],"command":[0],"consort":[0],"sway":[0]},"class_items":[]},"folder":"Q5shG4toM5PkRSnX","sort":600000,"flags":{}}
|
||||
{"_id":"ZplBgIXHxWLUXX1o","name":"Academic","permission":{"default":0},"type":"background","data":{"description":""},"folder":"YkuVHwuSV9IfsxU0","sort":100000,"flags":{}}
|
||||
{"_id":"ex7Mqv42SKZrfUL0","name":"Military","permission":{"default":0},"type":"background","data":{"description":""},"folder":"YkuVHwuSV9IfsxU0","sort":500000,"flags":{}}
|
||||
{"_id":"fKEJOkqoAwinyzrm","name":"Akoros","permission":{"default":0},"type":"heritage","data":{"description":""},"folder":"2TX8ibE6E4CDUGYX","sort":100000,"flags":{}}
|
||||
{"_id":"qGkgWsdxcnl0cFhm","name":"Labor","permission":{"default":0},"type":"background","data":{"description":""},"folder":"YkuVHwuSV9IfsxU0","sort":200000,"flags":{}}
|
||||
{"_id":"tEob41rtEbHcswNM","name":"Cutter","permission":{"default":0},"type":"class","data":{"description":"","base_skills":{"hunt":[0],"study":[0],"survey":[0],"tinker":[0],"finesse":[0],"prowl":[0],"skirmish":[0],"wreck":[0],"attune":[0],"command":[0],"consort":[0],"sway":[0]},"class_items":[]},"folder":"Q5shG4toM5PkRSnX","sort":300000,"flags":{}}
|
||||
{"_id":"ueBoUHFBMHlCowB0","name":"Gambling","permission":{"default":0},"type":"vice","data":{"description":""},"folder":"Jz1yD35kaDA2NZtZ","sort":200000,"flags":{}}
|
||||
{"_id":"zOg14xy8ZEku6bNq","name":"Whisper","permission":{"default":0},"type":"class","data":{"description":"","base_skills":{"hunt":[0],"study":[0],"survey":[0],"tinker":[0],"finesse":[0],"prowl":[0],"skirmish":[0],"wreck":[0],"attune":[0],"command":[0],"consort":[0],"sway":[0]},"class_items":[]},"folder":"Q5shG4toM5PkRSnX","sort":200000,"flags":{}}
|
||||
|
|
7
packs/vices.db
Normal file
7
packs/vices.db
Normal file
|
@ -0,0 +1,7 @@
|
|||
{"_id":"Lp7ezgXB3USzviHa","name":"Obligation","permission":{"default":0},"type":"vice","data":{"description":""},"folder":"Jz1yD35kaDA2NZtZ","sort":400000,"flags":{}}
|
||||
{"_id":"PJ4m6YEsMEzfgAqy","name":"Weird","permission":{"default":0},"type":"vice","data":{"description":""},"folder":"Jz1yD35kaDA2NZtZ","sort":700000,"flags":{}}
|
||||
{"_id":"VNt88GVp0Td0Q8H6","name":"Luxury","permission":{"default":0},"type":"vice","data":{"description":""},"folder":"Jz1yD35kaDA2NZtZ","sort":300000,"flags":{}}
|
||||
{"_id":"Y0aq94hQO9LyMJN9","name":"Stupor","permission":{"default":0},"type":"vice","data":{"description":""},"folder":"Jz1yD35kaDA2NZtZ","sort":600000,"flags":{}}
|
||||
{"_id":"ueBoUHFBMHlCowB0","name":"Gambling","permission":{"default":0},"type":"vice","data":{"description":""},"folder":"Jz1yD35kaDA2NZtZ","sort":200000,"flags":{}}
|
||||
{"_id":"43dWmFJgAeqcsOJl","name":"Pleasure","permission":{"default":0},"type":"vice","data":{"description":""},"folder":"Jz1yD35kaDA2NZtZ","sort":500000,"flags":{}}
|
||||
{"_id":"0GbyUKjjMof6D8fb","name":"Faith","permission":{"default":0},"type":"vice","data":{"description":""},"folder":"Jz1yD35kaDA2NZtZ","sort":100000,"flags":{}}
|
35
system.json
35
system.json
|
@ -9,10 +9,39 @@
|
|||
"author": "megastruktur",
|
||||
"esmodules": ["module/blades.js"],
|
||||
"styles": ["styles/blades.css"],
|
||||
"packs": [],
|
||||
"languages": [],
|
||||
"languages": ["en"],
|
||||
"gridDistance": 1,
|
||||
"gridUnits": "m",
|
||||
"primaryTokenAttribute": null,
|
||||
"secondaryTokenAttribute": null
|
||||
"secondaryTokenAttribute": null,
|
||||
"packs": [
|
||||
{
|
||||
"name": "Classes",
|
||||
"label": "Classes",
|
||||
"system": "blades-in-the-dark",
|
||||
"path": "./packs/classes.db",
|
||||
"entity": "Item"
|
||||
},
|
||||
{
|
||||
"name": "Heritages",
|
||||
"label": "Heritages",
|
||||
"system": "blades-in-the-dark",
|
||||
"path": "./packs/heritages.db",
|
||||
"entity": "Item"
|
||||
},
|
||||
{
|
||||
"name": "Vices",
|
||||
"label": "Vices",
|
||||
"system": "blades-in-the-dark",
|
||||
"path": "./packs/vices.db",
|
||||
"entity": "Item"
|
||||
},
|
||||
{
|
||||
"name": "Backgrounds",
|
||||
"label": "Backgrounds",
|
||||
"system": "blades-in-the-dark",
|
||||
"path": "./packs/backgrounds.db",
|
||||
"entity": "Item"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
100
template.json
100
template.json
|
@ -3,9 +3,6 @@
|
|||
"types": ["character", "crew"],
|
||||
"character": {
|
||||
"alias": "",
|
||||
"heritage": "",
|
||||
"background": "",
|
||||
"vice": "",
|
||||
"stress": [0],
|
||||
"traumas": [],
|
||||
"healing-clock": [0],
|
||||
|
@ -63,92 +60,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"heritages": {
|
||||
"akoros": {
|
||||
"label": "Akoros",
|
||||
"dtype": "String"
|
||||
},
|
||||
"the-dagger-isles": {
|
||||
"label": "The Dagger Isles",
|
||||
"dtype": "String"
|
||||
},
|
||||
"iruvia": {
|
||||
"label": "Iruvia",
|
||||
"dtype": "String"
|
||||
},
|
||||
"severos": {
|
||||
"label": "Severos",
|
||||
"dtype": "String"
|
||||
},
|
||||
"skovlan": {
|
||||
"label": "Skovlan",
|
||||
"dtype": "String"
|
||||
},
|
||||
"tycheros": {
|
||||
"label": "Tycheros",
|
||||
"dtype": "String"
|
||||
}
|
||||
},
|
||||
"backgrounds": {
|
||||
"academic": {
|
||||
"label": "Academic",
|
||||
"dtype": "String"
|
||||
},
|
||||
"labor": {
|
||||
"label": "Labor",
|
||||
"dtype": "String"
|
||||
},
|
||||
"law": {
|
||||
"label": "Law",
|
||||
"dtype": "String"
|
||||
},
|
||||
"trade": {
|
||||
"label": "Trade",
|
||||
"dtype": "String"
|
||||
},
|
||||
"military": {
|
||||
"label": "Military",
|
||||
"dtype": "String"
|
||||
},
|
||||
"noble": {
|
||||
"label": "Noble",
|
||||
"dtype": "String"
|
||||
},
|
||||
"underworld": {
|
||||
"label": "Underworld",
|
||||
"dtype": "String"
|
||||
}
|
||||
},
|
||||
"vices": {
|
||||
"faith": {
|
||||
"label": "Faith",
|
||||
"dtype": "String"
|
||||
},
|
||||
"gambling": {
|
||||
"label": "Gambling",
|
||||
"dtype": "String"
|
||||
},
|
||||
"luxury": {
|
||||
"label": "Luxury",
|
||||
"dtype": "String"
|
||||
},
|
||||
"obligation": {
|
||||
"label": "Obligation",
|
||||
"dtype": "String"
|
||||
},
|
||||
"pleasure": {
|
||||
"label": "Pleasure",
|
||||
"dtype": "String"
|
||||
},
|
||||
"stupor": {
|
||||
"label": "Stupor",
|
||||
"dtype": "String"
|
||||
},
|
||||
"weird": {
|
||||
"label": "Weird",
|
||||
"dtype": "String"
|
||||
}
|
||||
},
|
||||
"classes": {
|
||||
"cutter": {
|
||||
"skills": {
|
||||
|
@ -196,7 +107,7 @@
|
|||
}
|
||||
},
|
||||
"Item": {
|
||||
"types": ["item", "class", "ability", "heritages", "backgrounds", "vices"],
|
||||
"types": ["item", "class", "ability", "heritage", "background", "vice"],
|
||||
"item": {
|
||||
"class_restriction": "",
|
||||
"load": 0,
|
||||
|
@ -223,6 +134,15 @@
|
|||
"ability": {
|
||||
"class": "",
|
||||
"description": ""
|
||||
},
|
||||
"heritage": {
|
||||
"description": ""
|
||||
},
|
||||
"background": {
|
||||
"description": ""
|
||||
},
|
||||
"vice": {
|
||||
"description": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,52 +1,28 @@
|
|||
<form class="{{cssClass}}" autocomplete="off">
|
||||
|
||||
<div id="name-alias" class="section">
|
||||
<div>
|
||||
<label for="character-name">Name</label>
|
||||
<input type="text" id="character-name" name="name" value="{{actor.name}}">
|
||||
</div>
|
||||
<div>
|
||||
<img class="profile-img" src="{{actor.img}}" data-edit="img" title="{{actor.name}}" height="100" width="100"/>
|
||||
</div>
|
||||
<div>
|
||||
<label for="character-alias">Alias</label>
|
||||
<input type="text" id="character-alias" name="data.alias" value="{{data.alias}}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="dropdowns-details" class="section">
|
||||
<div>
|
||||
<label for="character-heritage">Heritage</label>
|
||||
<select id="character-heritage" name="data.heritage">
|
||||
{{#select data.heritage}}
|
||||
{{#each data.heritages as |heritage key|}}
|
||||
<option value="{{key}}">{{heritage.label}}</option>
|
||||
<div>
|
||||
<label for="character-name">Name</label>
|
||||
<input type="text" id="character-name" name="name" value="{{actor.name}}">
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
{{#each actor.items as |item id|}}
|
||||
{{#eq item.type "heritage"}}
|
||||
<div class="item flexrow" data-item-id="{{item._id}}">
|
||||
<div class="item-body">
|
||||
<img src="{{item.img}}" title="{{item.name}}" width="24" height="24"/>
|
||||
<h4 class="item-name">{{item.name}}</h4>
|
||||
</div>
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
{{/eq}}
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<label for="character-background">Background</label>
|
||||
<select id="character-background" name="data.background">
|
||||
{{#select data.background}}
|
||||
{{#each data.backgrounds as |background key|}}
|
||||
<option value="{{key}}">{{background.label}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<label for="character-vice">Vice</label>
|
||||
<select id="character-vice" name="data.vice">
|
||||
{{#select data.vice}}
|
||||
{{#each data.vices as |vice key|}}
|
||||
<option value="{{key}}">{{vice.label}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
{{#each actor.items as |item id|}}
|
||||
{{#eq item.type "class"}}
|
||||
|
||||
{{#each actor.items as |item id|}}
|
||||
{{#eq item.type "background"}}
|
||||
<div class="item flexrow" data-item-id="{{item._id}}">
|
||||
<div class="item-body">
|
||||
<img src="{{item.img}}" title="{{item.name}}" width="24" height="24"/>
|
||||
|
@ -55,7 +31,45 @@
|
|||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
{{/eq}}
|
||||
{{/each}}
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<img class="profile-img" src="{{actor.img}}" data-edit="img" title="{{actor.name}}" height="100" width="100"/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div>
|
||||
<label for="character-alias">Alias</label>
|
||||
<input type="text" id="character-alias" name="data.alias" value="{{data.alias}}">
|
||||
</div>
|
||||
<div class="section">
|
||||
{{#each actor.items as |item id|}}
|
||||
{{#eq item.type "vice"}}
|
||||
<div class="item flexrow" data-item-id="{{item._id}}">
|
||||
<div class="item-body">
|
||||
<img src="{{item.img}}" title="{{item.name}}" width="24" height="24"/>
|
||||
<h4 class="item-name">{{item.name}}</h4>
|
||||
</div>
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
{{/eq}}
|
||||
{{/each}}
|
||||
{{#each actor.items as |item id|}}
|
||||
{{#eq item.type "class"}}
|
||||
<div class="item flexrow" data-item-id="{{item._id}}">
|
||||
<div class="item-body">
|
||||
<img src="{{item.img}}" title="{{item.name}}" width="24" height="24"/>
|
||||
<h4 class="item-name">{{item.name}}</h4>
|
||||
</div>
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
{{/eq}}
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{{!-- Stress and Trauma --}}
|
||||
|
|
33
templates/parts/TEMP
Normal file
33
templates/parts/TEMP
Normal file
|
@ -0,0 +1,33 @@
|
|||
|
||||
"battleborn": {
|
||||
"label": "Battleborn",
|
||||
"description": "You may expend your special armor to reduce harm from an attack in combat or to push yourself during a fight."
|
||||
},
|
||||
"bodyguard": {
|
||||
"label": "Bodyguard",
|
||||
"description": "When you protect a teammate, take +1d to your resistance roll. When you gather info to anticipate possible threats in the current situation, you get +1 effect."
|
||||
},
|
||||
"ghost_fighter": {
|
||||
"label": "Ghost Fighter",
|
||||
"description": "You may imbue your hands, melee weapons, or tools with spirit energy. You gain potency in combat vs. the supernatural. You may grapple with spirits to restrain and capture them."
|
||||
},
|
||||
"leader": {
|
||||
"label": "Leader",
|
||||
"description": "When you Command a cohort in combat, they continue to fight when they would otherwise break (they're not taken out when they suffer level 3 harm). They gain +1 effect and 1 armor."
|
||||
},
|
||||
"mule": {
|
||||
"label": "Mule",
|
||||
"description": "Your load limits are higher. Light: 5. Normal: 7. Heavy: 8."
|
||||
},
|
||||
"not_to_be_trifled_with": {
|
||||
"label": "Not to be Trifled With",
|
||||
"description": "You can push yourself to do one of the following: perform a feat of physical force that verges on the superhuman—engage a small gang on equal footing in close combat."
|
||||
},
|
||||
"savage": {
|
||||
"label": "Savage",
|
||||
"description": "When you unleash physical violence, it's especially frightening. When you Command a frightened target, take +1d."
|
||||
},
|
||||
"vigorous": {
|
||||
"label": "Vigorous",
|
||||
"description": "Vigorous: You recover from harm faster. Permanently fill in one of your healing clock segments. Take +1d to healing treatment rolls."
|
||||
}
|
Reference in a new issue