Merge v1 #1
31
css/bol.css
31
css/bol.css
@ -255,22 +255,10 @@
|
||||
font-display: swap;
|
||||
src: url(https://fonts.gstatic.com/s/contrailone/v10/eLGbP-j_JA-kG0_Zo51noafdZQ.ttf) format('truetype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: "ImaginaryForces";
|
||||
src: url('../fonts/iforces.ttf');
|
||||
}
|
||||
@font-face {
|
||||
font-family: "OPTIFantastiK";
|
||||
src: url('../fonts/OPTIFantastiK.otf');
|
||||
}
|
||||
@font-face {
|
||||
font-family: "CCMeanwhile";
|
||||
src: url('../fonts/ccmeanwhile-regular.ttf');
|
||||
}
|
||||
@font-face {
|
||||
font-family: "Papyrus";
|
||||
src: url('../fonts/PAPYRUS.TTF');
|
||||
}
|
||||
@font-face {
|
||||
font-family: "Wolfsbane2";
|
||||
src: url('../fonts/wolfsbane2.ttf');
|
||||
@ -283,6 +271,9 @@
|
||||
font-family: "Wolfsbane2Expanded";
|
||||
src: url('../fonts/wolfsbane2expand.ttf');
|
||||
}
|
||||
/* ----------------------------------------- */
|
||||
/* TEXT STYLES */
|
||||
/* ----------------------------------------- */
|
||||
.bol.sheet.actor {
|
||||
min-width: 760px;
|
||||
min-height: 700px;
|
||||
@ -523,15 +514,6 @@
|
||||
min-width: 460px;
|
||||
min-height: 400px;
|
||||
}
|
||||
.bol.sheet.item .window-content {
|
||||
background-color: white;
|
||||
background-image: url("/systems/bol/ui/logo.webp");
|
||||
background-repeat: no-repeat;
|
||||
background-size: 190px 115px;
|
||||
height: 100%;
|
||||
padding: 5px;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
.bol.sheet.item .window-content form {
|
||||
height: 100%;
|
||||
}
|
||||
@ -549,3 +531,10 @@
|
||||
.bonus {
|
||||
color: darkgreen;
|
||||
}
|
||||
.chat-message .chat-icon {
|
||||
border: 0;
|
||||
padding: 2px 6px 2px 2px;
|
||||
float: left;
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
}
|
||||
|
@ -13,5 +13,9 @@
|
||||
"BOL.resources.faith": "Faith points",
|
||||
"BOL.resources.creation": "Creation points",
|
||||
"BOL.resources.power": "Power points",
|
||||
"BOL.traits.xp": "Experience"
|
||||
"BOL.traits.xp": "Experience",
|
||||
|
||||
"attribut": "Attribut",
|
||||
"rank": "Level",
|
||||
"subtype": "Type"
|
||||
}
|
78
lang/fr.json
78
lang/fr.json
@ -1,5 +1,5 @@
|
||||
{
|
||||
"BOL.attributes.vigor": "Force",
|
||||
"BOL.attributes.vigor": "Vigueur",
|
||||
"BOL.attributes.agility": "Agilité",
|
||||
"BOL.attributes.mind": "Esprit",
|
||||
"BOL.attributes.appeal": "Aura",
|
||||
@ -13,5 +13,79 @@
|
||||
"BOL.resources.faith": "Foi",
|
||||
"BOL.resources.creation": "Création",
|
||||
"BOL.resources.power": "Pouvoir",
|
||||
"BOL.traits.xp": "Expérience"
|
||||
"BOL.traits.xp": "Expérience",
|
||||
|
||||
"Careers": "Carrières",
|
||||
"Name": "Nom",
|
||||
"Boons": "Avantages",
|
||||
"Flaws": "Désavantages",
|
||||
"Inventory": "Inventaire",
|
||||
|
||||
"Career": "Carrière",
|
||||
"Boon": "Avantage",
|
||||
"Flaw": "Désavantage",
|
||||
|
||||
"d6B": "d6 Bonus",
|
||||
"d6M": "d6 Malus",
|
||||
"ranged": "A Distance",
|
||||
"melee": "Melée",
|
||||
"spell" : "Sort",
|
||||
"protection" : "Protectin",
|
||||
"weapon" : "Arme",
|
||||
"armor" : "Armure",
|
||||
"helm" : "Casque",
|
||||
"shield" : "Bouclier",
|
||||
|
||||
"equipable": "Equipable",
|
||||
"stackable": "Empilable",
|
||||
"consumable" : "Consommable",
|
||||
"magical" : "Magique",
|
||||
|
||||
"2H" : "A Deux Mains",
|
||||
"reloadable" : "A Recharger",
|
||||
"bow" : "Arc",
|
||||
"crossbow" : "Arbalète",
|
||||
"throwing" : "Lancer",
|
||||
|
||||
"rank": "Niveau",
|
||||
"attribut": "Attribut",
|
||||
"subtype": "Type",
|
||||
"Language": "Langue",
|
||||
"Level": "Niveau",
|
||||
"Roll": "Lancer",
|
||||
|
||||
"Melee": "Mêlée",
|
||||
"Ranged": "Tir",
|
||||
"Quantity": "Quantité",
|
||||
"Weight":"Poids",
|
||||
"Damage": "Dommages",
|
||||
"Two Hands": "A Deux Mains",
|
||||
"Thrown": "Peut-être lancé",
|
||||
"Range": "Portée (m.)",
|
||||
"Reload": "A Recharger",
|
||||
"Reload Duration": "Durée de rechargement (rounds)" ,
|
||||
"Can be hidden": "Peut être cachée",
|
||||
"Ignore Shield": "Ignore les boucliers",
|
||||
"Improvised": "Improvisée",
|
||||
"Properties": "Propriétés",
|
||||
"Protection Roll": "Jet de Protection",
|
||||
"Protection Fixed": "Protection statique (si pas de jet)",
|
||||
"None": "Aucun",
|
||||
"Social Malus": "Malus Social",
|
||||
"Agility Malus":"Malus d'Agilité",
|
||||
"Initiative Malus": "Malus d'Initiative",
|
||||
"Power Cost": "Cout en Points de Pouvoir",
|
||||
"Equipped": "Equipé",
|
||||
"Attack with": "Attaque avec",
|
||||
"Range Modifier": "Modificateur de portée",
|
||||
"Point Blank": "Bout portant",
|
||||
"Short": "Courte",
|
||||
"Medium": "Moyenne",
|
||||
"Long": "Long",
|
||||
"Very Long": "Très longue",
|
||||
"Extreme": "Extrême",
|
||||
"Maximum": "Maximale",
|
||||
"Defender": "Défenseur",
|
||||
"Defense score": "Score de défense",
|
||||
"Modifier": "Modificateur"
|
||||
}
|
@ -26,7 +26,9 @@ export class BoLActorSheet extends ActorSheet {
|
||||
actor.data.attributes = Object.values(actor.data.data.attributes);
|
||||
actor.data.aptitudes = Object.values(actor.data.data.aptitudes);
|
||||
actor.data.resources = Object.values(actor.data.data.resources);
|
||||
actor.data.equipment = actor.data.items.filter(i => i.type === "item");
|
||||
actor.data.equipment = actor.data.items.filter(i => i.type === "item" || i.type == 'weapon' || i.type == 'armor');
|
||||
actor.data.weapons = duplicate(actor.data.items.filter(i => i.type == 'weapon' ));
|
||||
actor.data.armors = duplicate(actor.data.items.filter(i => i.type == 'armor' ));
|
||||
actor.data.features = {
|
||||
"origin" : actor.data.items.find(i => i.type === "feature" && i.data.subtype === "origin"),
|
||||
"race" : actor.data.items.find(i => i.type === "feature" && i.data.subtype === "race"),
|
||||
@ -34,10 +36,7 @@ export class BoLActorSheet extends ActorSheet {
|
||||
"boons" : actor.data.items.filter(i => i.type === "feature" && i.data.subtype === "boon"),
|
||||
"flaws" : actor.data.items.filter(i => i.type === "feature" && i.data.subtype === "flaw")
|
||||
};
|
||||
// data.attributes = ["String", "Number", "Boolean"];
|
||||
// for (let attr of Object.values(data.data.attributes)) {
|
||||
// attr.isCheckbox = attr.dtype === "Boolean";
|
||||
// }
|
||||
|
||||
return actor;
|
||||
}
|
||||
|
||||
@ -58,7 +57,18 @@ export class BoLActorSheet extends ActorSheet {
|
||||
console.log(item);
|
||||
item.sheet.render(true);
|
||||
});
|
||||
|
||||
html.find('.roll-attribute').click(ev => {
|
||||
this.actor.rollAttributeAptitude( $(ev.currentTarget).data("attr-key") );
|
||||
});
|
||||
html.find('.roll-career').click(ev => {
|
||||
const li = $(ev.currentTarget).parents(".item");
|
||||
this.actor.rollCareer( li.data("itemId") );
|
||||
});
|
||||
html.find('.roll-weapon').click(ev => {
|
||||
const li = $(ev.currentTarget).parents(".item");
|
||||
this.actor.rollWeapon( li.data("itemId") );
|
||||
});
|
||||
|
||||
// Delete Inventory Item
|
||||
html.find('.item-delete').click(ev => {
|
||||
const li = $(ev.currentTarget).parents(".item");
|
||||
|
@ -1,8 +1,12 @@
|
||||
import { BoLRollDialog } from "../system/roll-dialog.js";
|
||||
import { BoLUtility } from "../system/bol-utility.js";
|
||||
|
||||
/**
|
||||
* Extend the base Actor entity by defining a custom roll data structure which is ideal for the Simple system.
|
||||
* @extends {Actor}
|
||||
*/
|
||||
export class BoLActor extends Actor {
|
||||
|
||||
/** @override */
|
||||
prepareData() {
|
||||
super.prepareData();
|
||||
@ -16,22 +20,138 @@ export class BoLActor extends Actor {
|
||||
|
||||
// Make separate methods for each Actor type (character, npc, etc.) to keep
|
||||
// things organized.
|
||||
// if (actorData.type === 'character') this._prepareCharacterData(actorData);
|
||||
if (actorData.type === 'character') {
|
||||
this._prepareCharacterData(actorData);
|
||||
}
|
||||
}
|
||||
|
||||
// /**
|
||||
// * Prepare Character type specific data
|
||||
// */
|
||||
// _prepareCharacterData(actorData) {
|
||||
// const data = actorData.data;
|
||||
//
|
||||
// // Make modifications to data here. For example:
|
||||
//
|
||||
// // Loop through ability scores, and add their modifiers to our sheet output.
|
||||
// for (let [key, ability] of Object.entries(data.abilities)) {
|
||||
// // Calculate the modifier using d20 rules.
|
||||
// ability.mod = Math.floor((ability.value - 10) / 2);
|
||||
// }
|
||||
// }
|
||||
/* -------------------------------------------- */
|
||||
_prepareCharacterData(actorData) {
|
||||
let newVitality = 10 + this.data.data.attributes.vigor.value;
|
||||
if ( newVitality != this.data.data.resources.hp.max) {
|
||||
this.data.data.resources.hp.max = newVitality;
|
||||
this.update( { 'data.resources.hp.max': newVitality});
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getBoons() {
|
||||
return this.data.items.filter(i => i.type === "feature" && i.data.subtype === "boon");
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
getFlaws() {
|
||||
return this.data.items.filter(i => i.type === "feature" && i.data.subtype === "flaw");
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
getCareers() {
|
||||
return this.data.items.filter(i => i.type === "feature" && i.data.subtype === "career");
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
saveRollData( rollData) {
|
||||
this.currentRollData = rollData;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async rollAttributeAptitude( attrKey ) {
|
||||
let attr = this.data.data.attributes[attrKey];
|
||||
if ( !attr) {
|
||||
attr = this.data.data.aptitudes[attrKey];
|
||||
}
|
||||
if (attr) {
|
||||
let rollData = {
|
||||
mode : "attribute",
|
||||
actorId: this.id,
|
||||
actorImg: this.img,
|
||||
attribute: duplicate(attr),
|
||||
boons : this.getBoons(),
|
||||
flaws : this.getFlaws(),
|
||||
d6Bonus: 0,
|
||||
d6Malus: 0,
|
||||
rollMode: game.settings.get("core", "rollMode"),
|
||||
title: game.i18n.localize(attr.label),
|
||||
optionsBonusMalus: BoLUtility.buildListOptions(-8, +2),
|
||||
bonusMalus: 0
|
||||
}
|
||||
let rollDialog = await BoLRollDialog.create( this, rollData);
|
||||
rollDialog.render( true );
|
||||
} else {
|
||||
ui.notifications.warn("Unable to find attribute " + attrKey );
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async rollCareer( careerId ) {
|
||||
let career = BoLUtility.data(this.data.items.find( item => item.type == 'feature' && item.id == careerId));
|
||||
if (career) {
|
||||
let rollData = {
|
||||
mode : "career",
|
||||
actorId: this.id,
|
||||
actorImg: this.img,
|
||||
career : career,
|
||||
rollAttribute: 'mind',
|
||||
attributes : duplicate(this.data.data.attributes),
|
||||
boons : this.getBoons(),
|
||||
flaws : this.getFlaws(),
|
||||
d6Bonus: 0,
|
||||
d6Malus: 0,
|
||||
rollMode: game.settings.get("core", "rollMode"),
|
||||
title: `${career.name} : ${career.data.rank}`,
|
||||
optionsBonusMalus: BoLUtility.buildListOptions(-8, +2),
|
||||
bonusMalus: 0
|
||||
}
|
||||
let rollDialog = await BoLRollDialog.create( this, rollData);
|
||||
rollDialog.render( true );
|
||||
} else {
|
||||
ui.notifications.warn("Unable to find career for actor " + this.name + " - Career ID " + careerId);
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async rollWeapon( weaponId ) {
|
||||
let weapon = BoLUtility.data(this.data.items.find( item => item.type == 'weapon' && item.id == weaponId));
|
||||
if (weapon) {
|
||||
let target = BoLUtility.getTarget();
|
||||
if ( !target) {
|
||||
ui.notifications.warn("You must have a target to attack with a Weapon");
|
||||
return;
|
||||
}
|
||||
let objectDefender = BoLUtility.data(game.actors.get(target.data.actorId));
|
||||
objectDefender = mergeObject(objectDefender, target.data.actorData);
|
||||
let rollData = {
|
||||
mode : "weapon",
|
||||
actorId: this.id,
|
||||
actorImg: this.img,
|
||||
weapon : weapon,
|
||||
target: target,
|
||||
isRanged: BoLUtility.isRangedWeapon( weapon ),
|
||||
defender: objectDefender,
|
||||
boons : this.getBoons(),
|
||||
flaws : this.getFlaws(),
|
||||
rollAttribute: 'agility',
|
||||
attributes: duplicate(this.data.data.attributes), // For damage bonus
|
||||
d6Bonus: 0,
|
||||
d6Malus: 0,
|
||||
rollMode: game.settings.get("core", "rollMode"),
|
||||
title: weapon.name,
|
||||
rangeModifier: 0,
|
||||
optionsBonusMalus: BoLUtility.buildListOptions(-8, +2),
|
||||
bonusMalus: 0
|
||||
}
|
||||
if ( weapon.data.type == 'melee') {
|
||||
rollData.aptitude = duplicate(this.data.data.aptitudes.melee);
|
||||
} else {
|
||||
rollData.aptitude = duplicate(this.data.data.aptitudes.ranged);
|
||||
}
|
||||
console.log("WEAPON ! ", rollData);
|
||||
let rollDialog = await BoLRollDialog.create( this, rollData);
|
||||
rollDialog.render( true );
|
||||
} else {
|
||||
ui.notifications.warn("Unable to find weapon for actor " + this.name + " - Weapon ID " + weaponId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -22,8 +22,8 @@ Hooks.once('init', async function () {
|
||||
* @type {String}
|
||||
*/
|
||||
CONFIG.Combat.initiative = {
|
||||
formula: "1d20",
|
||||
decimals: 2
|
||||
formula: "2d6+@attributes.mind.value+@aptitudes.init.value",
|
||||
decimals: 0
|
||||
};
|
||||
|
||||
// Define custom Entity classes
|
||||
|
@ -1,3 +1,5 @@
|
||||
import { BoLUtility } from "../system/bol-utility.js";
|
||||
|
||||
/**
|
||||
* Extend the basic ItemSheet with some very simple modifications
|
||||
* @extends {ItemSheet}
|
||||
@ -18,23 +20,37 @@ export class BoLItemSheet extends ItemSheet {
|
||||
get template() {
|
||||
const path = "systems/bol/templates/item";
|
||||
// Return a single sheet for all item types.
|
||||
return `${path}/item-sheet.hbs`;
|
||||
//return `${path}/item-sheet.hbs`;
|
||||
// Alternatively, you could use the following return statement to do a
|
||||
// unique item sheet by type, like `weapon-sheet.html`.
|
||||
|
||||
// return `${path}/${this.item.data.type}-sheet.html`;
|
||||
return `${path}/item-${this.item.data.type}-sheet.hbs`;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
/** @override */
|
||||
getData() {
|
||||
const item = super.getData();
|
||||
console.debug("Item getData");
|
||||
item.data.description = item.data.data.description;
|
||||
item.data.properties = item.data.data.properties;
|
||||
console.log(item.data);
|
||||
return item;
|
||||
const objectData = BoLUtility.data(this.object);
|
||||
|
||||
let itemData = foundry.utils.deepClone(BoLUtility.templateData(this.object));
|
||||
let formData = {
|
||||
title: this.title,
|
||||
id: this.id,
|
||||
type: objectData.type,
|
||||
img: objectData.img,
|
||||
name: objectData.name,
|
||||
editable: this.isEditable,
|
||||
cssClass: this.isEditable ? "editable" : "locked",
|
||||
data: itemData,
|
||||
limited: this.object.limited,
|
||||
options: this.options,
|
||||
owner: this.document.isOwner,
|
||||
isGM: game.user.isGM
|
||||
}
|
||||
console.log("ITEMDATA", formData);
|
||||
this.options.editable = !(this.object.data.origin == "embeddedItem");
|
||||
return formData;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
209
module/system/bol-utility.js
Normal file
209
module/system/bol-utility.js
Normal file
@ -0,0 +1,209 @@
|
||||
export class BoLUtility {
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async init() {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async ready() {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static templateData(it) {
|
||||
return BoLUtility.data(it)?.data ?? {}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static data(it) {
|
||||
if (it instanceof Actor || it instanceof Item || it instanceof Combatant) {
|
||||
return it.data;
|
||||
}
|
||||
return it;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static createDirectOptionList( min, max) {
|
||||
let options = {};
|
||||
for(let i=min; i<=max; i++) {
|
||||
options[`${i}`] = `${i}`;
|
||||
}
|
||||
return options;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static buildListOptions(min, max) {
|
||||
let options = ""
|
||||
for (let i = min; i <= max; i++) {
|
||||
options += `<option value="${i}">${i}</option>`
|
||||
}
|
||||
return options;
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
static async showDiceSoNice(roll, rollMode) {
|
||||
if (game.modules.get("dice-so-nice")?.active) {
|
||||
if (game.dice3d) {
|
||||
let whisper = null;
|
||||
let blind = false;
|
||||
rollMode = rollMode ?? game.settings.get("core", "rollMode");
|
||||
switch (rollMode) {
|
||||
case "blindroll": //GM only
|
||||
blind = true;
|
||||
case "gmroll": //GM + rolling player
|
||||
whisper = this.getUsers(user => user.isGM);
|
||||
break;
|
||||
case "roll": //everybody
|
||||
whisper = this.getUsers(user => user.active);
|
||||
break;
|
||||
case "selfroll":
|
||||
whisper = [game.user.id];
|
||||
break;
|
||||
}
|
||||
await game.dice3d.showForRoll(roll, game.user, true, whisper, blind);
|
||||
}
|
||||
}
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
static getUsers(filter) {
|
||||
return game.users.filter(filter).map(user => user.data._id);
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
static getWhisperRecipients(rollMode, name) {
|
||||
switch (rollMode) {
|
||||
case "blindroll": return this.getUsers(user => user.isGM);
|
||||
case "gmroll": return this.getWhisperRecipientsAndGMs(name);
|
||||
case "selfroll": return [game.user.id];
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
static getWhisperRecipientsAndGMs(name) {
|
||||
let recep1 = ChatMessage.getWhisperRecipients(name) || [];
|
||||
return recep1.concat(ChatMessage.getWhisperRecipients('GM'));
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static blindMessageToGM(chatOptions) {
|
||||
let chatGM = duplicate(chatOptions);
|
||||
chatGM.whisper = this.getUsers(user => user.isGM);
|
||||
chatGM.content = "Blinde message of " + game.user.name + "<br>" + chatOptions.content;
|
||||
console.log("blindMessageToGM", chatGM);
|
||||
game.socket.emit("system.fvtt-fragged-kingdom", { msg: "msg_gm_chat_message", data: chatGM });
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
static createChatMessage(name, rollMode, chatOptions) {
|
||||
switch (rollMode) {
|
||||
case "blindroll": // GM only
|
||||
if (!game.user.isGM) {
|
||||
this.blindMessageToGM(chatOptions);
|
||||
|
||||
chatOptions.whisper = [game.user.id];
|
||||
chatOptions.content = "Message only to the GM";
|
||||
}
|
||||
else {
|
||||
chatOptions.whisper = this.getUsers(user => user.isGM);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
chatOptions.whisper = this.getWhisperRecipients(rollMode, name);
|
||||
break;
|
||||
}
|
||||
chatOptions.alias = chatOptions.alias || name;
|
||||
ChatMessage.create(chatOptions);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static createChatWithRollMode(name, chatOptions) {
|
||||
this.createChatMessage(name, game.settings.get("core", "rollMode"), chatOptions);
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
static isRangedWeapon( weapon) {
|
||||
return weapon.data.type == 'ranged' || weapon.data.thrown;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static getTarget() {
|
||||
if (game.user.targets && game.user.targets.size == 1) {
|
||||
for (let target of game.user.targets) {
|
||||
return target;
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async rollBoL( rollData ) {
|
||||
|
||||
// Dice bonus/malus selection
|
||||
let nbDice = 2;
|
||||
let d6BM = 0;
|
||||
let mode = "";
|
||||
if ( rollData.d6Malus > rollData.d6Bonus){
|
||||
d6BM = rollData.d6Malus - rollData.d6Bonus;
|
||||
mode = "kl2";
|
||||
}
|
||||
if ( rollData.d6Bonus > rollData.d6Malus){
|
||||
d6BM = rollData.d6Bonus - rollData.d6Malus;
|
||||
mode = "kh2";
|
||||
}
|
||||
nbDice += d6BM;
|
||||
|
||||
// Final modifier
|
||||
let modifier = Number(rollData.bonusMalus);
|
||||
if ( rollData.mode == 'career') {
|
||||
modifier += Number(rollData.attributes[rollData.rollAttribute].value) + Number(rollData.career.data.rank);
|
||||
} else if ( rollData.mode == 'attribute' ) {
|
||||
modifier += rollData.attribute.value;
|
||||
} else if ( rollData.mode == 'weapon') {
|
||||
modifier += Number(rollData.attributes[rollData.rollAttribute].value) + Number(rollData.aptitude.value) + Number(rollData.rangeModifier);
|
||||
modifier -= rollData.defender.data.aptitudes.def.value;
|
||||
}
|
||||
|
||||
let formula = nbDice+"d6"+mode+"+"+modifier;
|
||||
|
||||
console.log("Going to roll ", formula, rollData.attributes, rollData.rollAttribute);
|
||||
let myRoll = new Roll(formula).roll( { async: false});
|
||||
await this.showDiceSoNice(myRoll, game.settings.get("core", "rollMode") );
|
||||
rollData.roll = myRoll;
|
||||
rollData.formula = formula;
|
||||
rollData.modifier = modifier;
|
||||
rollData.nbDice = nbDice;
|
||||
rollData.finalScore = myRoll.total;
|
||||
|
||||
let actor = game.actors.get(rollData.actorId);
|
||||
actor.saveRollData( rollData );
|
||||
|
||||
this.createChatWithRollMode( rollData.alias, {
|
||||
content: await renderTemplate(`systems/bol/templates/roll/chat-generic-result.hbs`, rollData)
|
||||
});
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async confirmDelete(actorSheet, li) {
|
||||
let itemId = li.data("item-id");
|
||||
let msgTxt = "<p>Are you sure to remove this Item ?";
|
||||
let buttons = {
|
||||
delete: {
|
||||
icon: '<i class="fas fa-check"></i>',
|
||||
label: "Yes, remove it",
|
||||
callback: () => {
|
||||
actorSheet.actor.deleteEmbeddedDocuments( "Item", [itemId] );
|
||||
li.slideUp(200, () => actorSheet.render(false));
|
||||
}
|
||||
},
|
||||
cancel: {
|
||||
icon: '<i class="fas fa-times"></i>',
|
||||
label: "Cancel"
|
||||
}
|
||||
}
|
||||
msgTxt += "</p>";
|
||||
let d = new Dialog({
|
||||
title: "Confirm removal",
|
||||
content: msgTxt,
|
||||
buttons: buttons,
|
||||
default: "cancel"
|
||||
});
|
||||
d.render(true);
|
||||
}
|
||||
|
||||
}
|
64
module/system/roll-dialog.js
Normal file
64
module/system/roll-dialog.js
Normal file
@ -0,0 +1,64 @@
|
||||
import { BoLUtility } from "../system/bol-utility.js";
|
||||
|
||||
export class BoLRollDialog extends Dialog {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async create(actor, rollData ) {
|
||||
|
||||
let options = { classes: ["BoL"], width: 600, height: 320, 'z-index': 99999 };
|
||||
let html = await renderTemplate(`systems/bol/templates/roll/roll-dialog-${rollData.mode}.hbs`, rollData);
|
||||
return new BoLRollDialog(actor, rollData, html, options );
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
constructor(actor, rollData, html, options, close = undefined) {
|
||||
let conf = {
|
||||
title: rollData.title,
|
||||
content: html,
|
||||
buttons: {
|
||||
roll: {
|
||||
icon: '<i class="fas fa-check"></i>',
|
||||
label: game.i18n.localize("Roll"),
|
||||
callback: () => { this.roll() }
|
||||
},
|
||||
cancel: {
|
||||
icon: '<i class="fas fa-times"></i>',
|
||||
label: game.i18n.localize("Cancel"),
|
||||
callback: () => { this.close() }
|
||||
} },
|
||||
default: "roll",
|
||||
close: close
|
||||
}
|
||||
|
||||
super(conf, options);
|
||||
|
||||
console.log("ROLLDATA ", rollData);
|
||||
this.actor = actor;
|
||||
this.rollData = rollData;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
roll () {
|
||||
BoLUtility.rollBoL( this.rollData )
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
activateListeners(html) {
|
||||
super.activateListeners(html);
|
||||
|
||||
var dialog = this;
|
||||
function onLoad() {
|
||||
}
|
||||
$(function () { onLoad(); });
|
||||
|
||||
html.find('#bonusMalus').change((event) => {
|
||||
this.rollData.bonusMalus = Number(event.currentTarget.value);
|
||||
});
|
||||
html.find('#d6Bonus').change((event) => {
|
||||
this.rollData.d6Bonus = Number(event.currentTarget.value);
|
||||
});
|
||||
html.find('#d6Malus').change((event) => {
|
||||
this.rollData.d6Malus = Number(event.currentTarget.value);
|
||||
});
|
||||
}
|
||||
}
|
@ -7,55 +7,6 @@ export const preloadHandlebarsTemplates = async function () {
|
||||
|
||||
// Define template paths to load
|
||||
const templatePaths = [
|
||||
// ACTOR
|
||||
"systems/cof/templates/actors/actor-sheet.hbs",
|
||||
"systems/cof/templates/actors/loot-sheet.hbs",
|
||||
"systems/cof/templates/actors/parts/actor-details.hbs",
|
||||
"systems/cof/templates/actors/parts/actor-tabs.hbs",
|
||||
"systems/cof/templates/actors/parts/actor-description.hbs",
|
||||
"systems/cof/templates/actors/parts/capacities/actor-capacities.hbs",
|
||||
"systems/cof/templates/actors/parts/capacities/actor-paths.hbs",
|
||||
"systems/cof/templates/actors/parts/combat/actor-combat.hbs",
|
||||
"systems/cof/templates/actors/parts/combat/actor-combat-item.hbs",
|
||||
"systems/cof/templates/actors/parts/combat/encounter-combat.hbs",
|
||||
"systems/cof/templates/actors/parts/details/actor-details.hbs",
|
||||
"systems/cof/templates/actors/parts/details/encounter-details.hbs",
|
||||
"systems/cof/templates/actors/parts/inventory/actor-inventory.hbs",
|
||||
"systems/cof/templates/actors/parts/inventory/actor-inventory-item.hbs",
|
||||
"systems/cof/templates/actors/parts/stats/actor-stats.hbs",
|
||||
"systems/cof/templates/actors/parts/stats/encounter-stats.hbs",
|
||||
|
||||
"systems/cof/templates/actors/parts/stats/actor-attacks.hbs",
|
||||
"systems/cof/templates/actors/parts/stats/actor-attributes.hbs",
|
||||
"systems/cof/templates/actors/parts/stats/actor-recovery.hbs",
|
||||
"systems/cof/templates/actors/parts/stats/actor-resources.hbs",
|
||||
"systems/cof/templates/actors/parts/stats/actor-vitality.hbs",
|
||||
"systems/cof/templates/actors/parts/stats/actor-defence.hbs",
|
||||
"systems/cof/templates/actors/parts/stats/actor-init.hbs",
|
||||
|
||||
// EFFECTS
|
||||
"systems/cof/templates/effects/effects.hbs",
|
||||
"systems/cof/templates/effects/effects-item.hbs",
|
||||
|
||||
// DIALOGS
|
||||
"systems/cof/templates/dialogs/parts/roll-dmg-fields.hbs",
|
||||
|
||||
// ITEMS PROPERTIES
|
||||
"systems/cof/templates/items/parts/properties/item-properties.hbs",
|
||||
|
||||
// ITEMS DETAILS
|
||||
"systems/cof/templates/items/parts/details/item-details.hbs",
|
||||
"systems/cof/templates/items/parts/details/capacity-details.hbs",
|
||||
"systems/cof/templates/items/parts/details/path-details.hbs",
|
||||
"systems/cof/templates/items/parts/details/profile-details.hbs",
|
||||
"systems/cof/templates/items/parts/details/ranged-details.hbs",
|
||||
"systems/cof/templates/items/parts/details/species-details.hbs",
|
||||
"systems/cof/templates/items/parts/details/equipment-details.hbs",
|
||||
"systems/cof/templates/items/parts/details/protection-details.hbs",
|
||||
"systems/cof/templates/items/parts/details/spell-details.hbs",
|
||||
"systems/cof/templates/items/parts/details/weapon-details.hbs",
|
||||
"systems/cof/templates/items/parts/details/usage-details.hbs",
|
||||
"systems/cof/templates/items/parts/details/effects-details.hbs",
|
||||
];
|
||||
|
||||
// Load the template parts
|
||||
|
7349
package-lock.json
generated
Normal file
7349
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -338,13 +338,6 @@
|
||||
}
|
||||
&.item {
|
||||
.window-content {
|
||||
background-color: white;
|
||||
background-image: url("/systems/bol/ui/logo.webp");
|
||||
background-repeat: no-repeat;
|
||||
background-size: @logo-width @logo-height;
|
||||
height: 100%;
|
||||
padding: 5px;
|
||||
overflow-y: hidden;
|
||||
|
||||
form {
|
||||
height: 100%;
|
||||
@ -374,4 +367,12 @@
|
||||
color: darkgreen;
|
||||
}
|
||||
|
||||
.chat-message .chat-icon {
|
||||
border: 0;
|
||||
padding: 2px 6px 2px 2px;
|
||||
float: left;
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
}
|
||||
|
||||
|
||||
|
@ -2,10 +2,10 @@
|
||||
"name": "bol",
|
||||
"title": "Barbarians of Lemuria",
|
||||
"description": "The Barbarians of Lemuria system for FoundryVTT!",
|
||||
"version": "0.8.8.1",
|
||||
"version": "0.8.8.7",
|
||||
"minimumCoreVersion": "0.8.6",
|
||||
"compatibleCoreVersion": "0.8.8",
|
||||
"templateVersion": 2,
|
||||
"compatibleCoreVersion": "0.8.9",
|
||||
"templateVersion": 8,
|
||||
"author": "Zigmund",
|
||||
"esmodules": ["module/bol.js"],
|
||||
"styles": ["css/bol.css"],
|
||||
|
@ -128,12 +128,15 @@
|
||||
}
|
||||
},
|
||||
"Item": {
|
||||
"types": ["item", "feature"],
|
||||
"types": ["item", "feature", "weapon", "armor"],
|
||||
"templates": {
|
||||
"base": {
|
||||
"subtype" : "default",
|
||||
"description": "",
|
||||
"properties" : {}
|
||||
"properties" : {
|
||||
"d6B": false,
|
||||
"d6M": false
|
||||
}
|
||||
},
|
||||
"equipment" : {
|
||||
"quantity": 1,
|
||||
@ -149,20 +152,14 @@
|
||||
"shield" : false,
|
||||
|
||||
"equipable": false,
|
||||
"stackable": false,
|
||||
"activable" : false,
|
||||
"consumable" : false,
|
||||
"magical" : false,
|
||||
"concealable" : false,
|
||||
"ignoreshield" : false,
|
||||
|
||||
"2H" : false,
|
||||
"reloadable" : false,
|
||||
"bow" : false,
|
||||
"crossbow" : false,
|
||||
"powder" : false,
|
||||
"throwing" : false,
|
||||
"bashing" : false
|
||||
"throwing" : false
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -171,7 +168,35 @@
|
||||
"quantity": 1,
|
||||
"weight": 0
|
||||
},
|
||||
"weapon": {
|
||||
"type": "",
|
||||
"quantity": 1,
|
||||
"weight": 0,
|
||||
"damage": "",
|
||||
"range": "",
|
||||
"thrown": false,
|
||||
"twohands": false,
|
||||
"reload": false,
|
||||
"reloadduration": 0,
|
||||
"canbehidden": false,
|
||||
"ignoreshield": false,
|
||||
"improvised": false,
|
||||
"equipped": false,
|
||||
"description": ""
|
||||
},
|
||||
"armor": {
|
||||
"type": "",
|
||||
"protectionroll": "",
|
||||
"protectionfixed": 0,
|
||||
"socialmalus": false,
|
||||
"agilitymalus": 0,
|
||||
"initmalus": 0,
|
||||
"powercost": 0,
|
||||
"equipped": false,
|
||||
"description": ""
|
||||
},
|
||||
"feature": {
|
||||
"rank": 0,
|
||||
"templates": ["base"]
|
||||
}
|
||||
}
|
||||
|
@ -24,8 +24,8 @@
|
||||
|
||||
{{!-- Sheet Tab Navigation --}}
|
||||
<nav class="sheet-tabs tabs" data-group="primary">
|
||||
<a class="item" data-tab="stats">Stats</a>
|
||||
<a class="item" data-tab="features">Traits</a>
|
||||
<a class="item" data-tab="stats">Attributs</a>
|
||||
<a class="item" data-tab="features">Actions</a>
|
||||
<a class="item" data-tab="equipment">Equipement</a>
|
||||
<a class="item" data-tab="description">Description</a>
|
||||
</nav>
|
||||
@ -35,7 +35,7 @@
|
||||
<div class="attributes flexrow">
|
||||
{{#each data.attributes as |attribute id|}}
|
||||
<div class="attribute stat flex1 flex-group-center {{key}}">
|
||||
<label class="stat-label">{{localize label}}</label><br/>
|
||||
<label class="stat-label"><a class="roll-attribute" data-attr-key="{{key}}">{{localize label}}</a></label><br/>
|
||||
<input class="stat-value rounded" type="text" name="data.attributes.{{key}}.value" value="{{numberFormat value decimals=0 sign=true}}" data-dtype="Number"/><br/>
|
||||
<span class="stat-roll malus rollable" title="2d6M" data-roll="3d6kh2+@attributes.{{key}}.value" data-label="{{key}}"><i class="fas fa-dice"></i></span>
|
||||
<span class="stat-roll rollable" title="2d6" data-roll="2d6+@attributes.{{key}}.value" data-label="{{key}}"><i class="fas fa-dice"></i></span>
|
||||
@ -47,7 +47,7 @@
|
||||
<div class="aptitudes flexrow">
|
||||
{{#each data.aptitudes as |aptitude id|}}
|
||||
<div class="aptitude stat flex1 flex-group-center">
|
||||
<label class="stat-label">{{localize label}}</label><br/>
|
||||
<label class="stat-label"><a class="roll-attribute" data-attr-key="{{key}}">{{localize label}}</a></label><br/>
|
||||
<input class="stat-value rounded-border" type="text" name="data.aptitudes.{{key}}.value" value="{{numberFormat value decimals=0 sign=true}}" data-dtype="Number"/><br/>
|
||||
<span class="stat-roll malus rollable" title="2d6M" data-roll="3d6kh2+@aptitudes.{{key}}.value" data-label="{{key}}"><i class="fas fa-dice"></i></span>
|
||||
<span class="stat-roll rollable" title="2d6" data-roll="2d6+@aptitudes.{{key}}.value" data-label="{{key}}"><i class="fas fa-dice"></i></span>
|
||||
@ -66,19 +66,19 @@
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab features" data-group="primary" data-tab="features">
|
||||
<ol class="items-list">
|
||||
<li class="item flexrow item-header">
|
||||
<div class="item-image">Careers</div>
|
||||
<div class="item-name">Name</div>
|
||||
<!-- <div class="item-controls">-->
|
||||
<!-- <a class="item-control item-create" title="Create item" data-type="item"><i class="fas fa-plus"></i> Add item</a>-->
|
||||
<!-- </div>-->
|
||||
<div class="item-image">{{localize "Careers"}}</div>
|
||||
<div class="item-name">{{localize "Name"}}</div>
|
||||
<div class="item-name">{{localize "Level"}}</div>
|
||||
</li>
|
||||
{{#each data.features.careers as |item id|}}
|
||||
<li class="item flexrow" data-item-id="{{item._id}}">
|
||||
<div class="item-image"><img src="{{item.img}}" title="{{item.name}}" width="24" height="24"/></div>
|
||||
<h4 class="item-name">{{item.name}}</h4>
|
||||
<h4 class="item-name"><a class="roll-career">{{item.name}}</a></h4>
|
||||
<span class="item-name">{{item.data.rank}}</span>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
@ -86,10 +86,30 @@
|
||||
</li>
|
||||
{{/each}}
|
||||
</ol>
|
||||
|
||||
<ol class="items-list">
|
||||
<li class="item flexrow item-header">
|
||||
<div class="item-image">Boons</div>
|
||||
<div class="item-name">Name</div>
|
||||
<div class="item-image">{{localize "Weapons"}}</div>
|
||||
<div class="item-name">{{localize "Name"}}</div>
|
||||
<div class="item-name">{{localize "Damage"}}</div>
|
||||
</li>
|
||||
{{#each data.weapons as |weapon id|}}
|
||||
<li class="item flexrow" data-item-id="{{weapon._id}}">
|
||||
<div class="item-image"><img src="{{weapon.img}}" title="{{weapon.name}}" width="24" height="24"/></div>
|
||||
<h4 class="item-name"><a class="roll-weapon">{{weapon.name}}</a></h4>
|
||||
<span class="item-name">{{weapon.data.damage}}</span>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ol>
|
||||
|
||||
<ol class="items-list">
|
||||
<li class="item flexrow item-header">
|
||||
<div class="item-image">{{localize "Boons"}}</div>
|
||||
<div class="item-name">{{localize "Name"}}</div>
|
||||
<!-- <div class="item-controls">-->
|
||||
<!-- <a class="item-control item-create" title="Create item" data-type="item"><i class="fas fa-plus"></i> Add item</a>-->
|
||||
<!-- </div>-->
|
||||
@ -107,8 +127,8 @@
|
||||
</ol>
|
||||
<ol class="items-list">
|
||||
<li class="item flexrow item-header">
|
||||
<div class="item-image">Flaws</div>
|
||||
<div class="item-name">Name</div>
|
||||
<div class="item-image">{{localize "Flaws"}}</div>
|
||||
<div class="item-name">{{localize "Name"}}</div>
|
||||
<!-- <div class="item-controls">-->
|
||||
<!-- <a class="item-control item-create" title="Create item" data-type="item"><i class="fas fa-plus"></i> Add item</a>-->
|
||||
<!-- </div>-->
|
||||
@ -128,8 +148,8 @@
|
||||
<div class="tab equipment" data-group="primary" data-tab="equipment">
|
||||
<ol class="items-list">
|
||||
<li class="item flexrow item-header">
|
||||
<div class="item-image">Inventory</div>
|
||||
<div class="item-name">Name</div>
|
||||
<div class="item-image">{{localize "Inventory"}}</div>
|
||||
<div class="item-name">{{localize "Name"}}</div>
|
||||
<!-- <div class="item-controls">-->
|
||||
<!-- <a class="item-control item-create" title="Create item" data-type="item"><i class="fas fa-plus"></i> Add item</a>-->
|
||||
<!-- </div>-->
|
||||
@ -139,6 +159,7 @@
|
||||
<div class="item-image"><img src="{{item.img}}" title="{{item.name}}" width="24" height="24"/></div>
|
||||
<h4 class="item-name">{{item.name}}</h4>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-equip" title="Worn">{{#if weapon.data.equipped}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
|
||||
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
|
98
templates/item/item-armor-sheet.hbs
Normal file
98
templates/item/item-armor-sheet.hbs
Normal file
@ -0,0 +1,98 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="profile-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>
|
||||
|
||||
{{!-- Sheet Tab Navigation --}}
|
||||
<nav class="sheet-tabs tabs" data-group="primary">
|
||||
<a class="item" data-tab="description">{{localize "Description"}}</a>
|
||||
<a class="item" data-tab="properties">{{localize "Properties"}}</a>
|
||||
</nav>
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
|
||||
{{!-- Description Tab --}}
|
||||
<div class="tab" data-group="primary" data-tab="description">
|
||||
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize "subtype"}}</label>
|
||||
<select name="data.subtype" value="{{data.subtype}}" data-dtype="String">
|
||||
{{#select data.subtype}}
|
||||
<option value="light">{{localize "Light Armor"}}</option>
|
||||
<option value="medium">{{localize "Medium Armor"}}</option>
|
||||
<option value="heavy">{{localize "Heavy Armor"}}</option>
|
||||
<option value="helm">{{localize "Helm"}}</option>
|
||||
<option value="smallshield">{{localize "Small Shield"}}</option>
|
||||
<option value="bigshield">{{localize "Big Shield"}}</option>
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
|
||||
</div>
|
||||
|
||||
{{!-- Attributes Tab --}}
|
||||
<div class="tab properties" data-group="primary" data-tab="properties">
|
||||
{{!-- As you add new fields, add them in here! --}}
|
||||
<!-- <div class="grid grid-2col">-->
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize "Quantity"}}</label>
|
||||
<input type="text" name="data.quantity" value="{{data.quantity}}" data-dtype="Number" />
|
||||
</div>
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize "Weight"}}</label>
|
||||
<input type="text" name="data.weight" value="{{data.weight}}" data-dtype="Number" />
|
||||
</div>
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize "Protection Roll"}}</label>
|
||||
<select name="data.damage" value="{{data.damage}}" data-dtype="String">
|
||||
{{#select data.damage}}
|
||||
<option value="none">{{localize "None"}}</option>
|
||||
<option value="1d6-3">d6-3</option>
|
||||
<option value="1d6-2">d6-2</option>
|
||||
<option value="1d6-1">d6-1</option>
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize "Protection Fixed"}}</label>
|
||||
<input type="text" name="data.protectionfixed" value="{{data.protectionfixed}}" data-dtype="Number" />
|
||||
</div>
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize "Social Malus"}}</label>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="data.socialmalus" value="{{data.socialmalus}}" data-dtype="checkbox" {{checked
|
||||
data.socialmalus}}/></label>
|
||||
</div>
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize "Agility Malus"}}</label>
|
||||
<input type="text" name="data.agilitymalus" value="{{data.agilitymalus}}" data-dtype="Number" />
|
||||
</div>
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize "Initiative Malus"}}</label>
|
||||
<input type="text" name="data.initmalus" value="{{data.initmalus}}" data-dtype="Number" />
|
||||
</div>
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize "Power Cost"}}</label>
|
||||
<input type="text" name="data.powercost" value="{{data.powercost}}" data-dtype="Number" />
|
||||
</div>
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize "Equipped"}}</label>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" class="checkbox" name="data.equipped" value="{{data.equipped}}" data-dtype="checkbox" {{checked
|
||||
data.equipped}}/></label>
|
||||
</div>
|
||||
|
||||
<!-- </div>-->
|
||||
{{#each data.properties as |property key|}}
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize key}}</label>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="data.properties.{{key}}" {{checked
|
||||
property}} /></label>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</section>
|
||||
</form>
|
65
templates/item/item-feature-sheet.hbs
Normal file
65
templates/item/item-feature-sheet.hbs
Normal file
@ -0,0 +1,65 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="profile-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>
|
||||
|
||||
{{!-- Sheet Tab Navigation --}}
|
||||
<nav class="sheet-tabs tabs" data-group="primary">
|
||||
<a class="item" data-tab="description">Description</a>
|
||||
<a class="item" data-tab="properties">Properties</a>
|
||||
</nav>
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
|
||||
{{!-- Description Tab --}}
|
||||
<div class="tab" data-group="primary" data-tab="description">
|
||||
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize "subtype"}}</label>
|
||||
<select name="data.subtype" value="{{data.subtype}}" data-dtype="String">
|
||||
{{#select data.subtype}}
|
||||
<option value="boon">{{localize "Avantage"}}</option>
|
||||
<option value="flaw">{{localize "Flaw"}}</option>
|
||||
<option value="career">{{localize "Career"}}</option>
|
||||
<option value="language">{{localize "Language"}}</option>
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
|
||||
</div>
|
||||
|
||||
{{!-- Attributes Tab --}}
|
||||
<div class="tab properties" data-group="primary" data-tab="properties">
|
||||
{{!-- As you add new fields, add them in here! --}}
|
||||
<!-- <div class="grid grid-2col">-->
|
||||
{{#if (eq data.subtype "career")}}
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize "rank"}}</label>
|
||||
<input type="text" name="data.rank" value="{{data.rank}}" data-dtype="Number"/>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">Quantity</label>
|
||||
<input type="text" name="data.quantity" value="{{data.quantity}}" data-dtype="Number"/>
|
||||
</div>
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">Weight</label>
|
||||
<input type="text" name="data.weight" value="{{data.weight}}" data-dtype="Number"/>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
<!-- </div>-->
|
||||
{{#each data.properties as |property key|}}
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize key}}</label>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="data.properties.{{key}}" {{checked property}}/></label>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</section>
|
||||
</form>
|
@ -1,8 +1,8 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}"/>
|
||||
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}"/>
|
||||
<div class="header-fields">
|
||||
<h1 class="charname"><input name="name" type="text" value="{{item.name}}" placeholder="Name"/></h1>
|
||||
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
@ -17,6 +17,19 @@
|
||||
|
||||
{{!-- Description Tab --}}
|
||||
<div class="tab" data-group="primary" data-tab="description">
|
||||
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize "subtype"}}</label>
|
||||
<select name="data.subtype" value="{{data.subtype}}" data-dtype="String">
|
||||
{{#select data.subtype}}
|
||||
<option value="boon">{{localize "Avantage"}}</option>
|
||||
<option value="flaw">{{localize "Flaw"}}</option>
|
||||
<option value="career">{{localize "Career"}}</option>
|
||||
<option value="language">{{localize "Language"}}</option>
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
|
||||
</div>
|
||||
|
||||
@ -33,6 +46,12 @@
|
||||
<input type="text" name="data.weight" value="{{data.weight}}" data-dtype="Number"/>
|
||||
</div>
|
||||
<!-- </div>-->
|
||||
{{#each data.properties as |property key|}}
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize key}}</label>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="data.properties.{{key}}" {{checked property}}/></label>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</section>
|
||||
</form>
|
111
templates/item/item-weapon-sheet.hbs
Normal file
111
templates/item/item-weapon-sheet.hbs
Normal file
@ -0,0 +1,111 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="profile-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>
|
||||
|
||||
{{!-- Sheet Tab Navigation --}}
|
||||
<nav class="sheet-tabs tabs" data-group="primary">
|
||||
<a class="item" data-tab="description">{{localize "Description"}}</a>
|
||||
<a class="item" data-tab="properties">{{localize "Properties"}}</a>
|
||||
</nav>
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
|
||||
{{!-- Description Tab --}}
|
||||
<div class="tab" data-group="primary" data-tab="description">
|
||||
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize "subtype"}}</label>
|
||||
<select name="data.subtype" value="{{data.subtype}}" data-dtype="String">
|
||||
{{#select data.subtype}}
|
||||
<option value="melee">{{localize "Melee"}}</option>
|
||||
<option value="ranged">{{localize "Ranged"}}</option>
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
|
||||
</div>
|
||||
|
||||
{{!-- Attributes Tab --}}
|
||||
<div class="tab properties" data-group="primary" data-tab="properties">
|
||||
{{!-- As you add new fields, add them in here! --}}
|
||||
<!-- <div class="grid grid-2col">-->
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize "Quantity"}}</label>
|
||||
<input type="text" name="data.quantity" value="{{data.quantity}}" data-dtype="Number" />
|
||||
</div>
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize "Weight"}}</label>
|
||||
<input type="text" name="data.weight" value="{{data.weight}}" data-dtype="Number" />
|
||||
</div>
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize "Damage"}}</label>
|
||||
<select name="data.damage" value="{{data.damage}}" data-dtype="String">
|
||||
{{#select data.damage}}
|
||||
<option value="1d3">d3</option>
|
||||
<option value="1d6">d6</option>
|
||||
<option value="1d6M">d6M</option>
|
||||
<option value="1d6B">d6B</option>
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize "Improvised"}}</label>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="data.improvised" value="{{data.improvised}}" data-dtype="checkbox" {{checked
|
||||
data.improvised}}/></label>
|
||||
</div>
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize "Range"}}</label>
|
||||
<input type="text" name="data.range" value="{{data.range}}" data-dtype="Number" />
|
||||
</div>
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize "Thrown"}}</label>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="data.thrown" value="{{data.thrown}}" data-dtype="checkbox" {{checked
|
||||
data.thrown}}/></label>
|
||||
</div>
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize "Two Hands"}}</label>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="data.twohands" value="{{data.twohands}}" data-dtype="checkbox" {{checked
|
||||
data.twohands}}/></label>
|
||||
</div>
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize "Reload"}}</label>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="data.reload" value="{{data.reload}}" data-dtype="checkbox" {{checked
|
||||
data.reload}}/></label>
|
||||
</div>
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize "Reload Duration"}}</label>
|
||||
<input type="text" name="data.reloadduration" value="{{data.reloadduration}}" data-dtype="Number"/>
|
||||
</div>
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize "Can be hidden"}}</label>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="data.canbehidden" value="{{data.canbehidden}}" data-dtype="checkbox" {{checked
|
||||
data.canbehidden}}/></label>
|
||||
</div>
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize "Ignore Shield"}}</label>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" class="checkbox" name="data.ignoreshield" value="{{data.ignoreshield}}" data-dtype="checkbox" {{checked
|
||||
data.ignoreshield}}/></label>
|
||||
</div>
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize "Equipped ?"}}</label>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" class="checkbox" name="data.equipped" value="{{data.equipped}}" data-dtype="checkbox" {{checked
|
||||
data.equipped}}/></label>
|
||||
</div>
|
||||
|
||||
<!-- </div>-->
|
||||
{{#each data.properties as |property key|}}
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize key}}</label>
|
||||
<label class="attribute-value checkbox"><input type="checkbox" name="data.properties.{{key}}" {{checked
|
||||
property}} /></label>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</section>
|
||||
</form>
|
31
templates/roll/chat-generic-result.hbs
Normal file
31
templates/roll/chat-generic-result.hbs
Normal file
@ -0,0 +1,31 @@
|
||||
<div class="chat-message-header">
|
||||
<img class="chat-icon" src="{{actorImg}}" alt="{{alias}}" />
|
||||
<h4 class=chat-actor-name>{{alias}}</h4>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div>
|
||||
<h3>
|
||||
{{#if (eq mode "attribute")}}
|
||||
{{localize attribute.label}}
|
||||
{{else}}
|
||||
{{#if (eq mode "career")}}
|
||||
{{localize "Career"}} : {{career.name}}
|
||||
{{else}}
|
||||
{{#if (eq mode "weapon")}}
|
||||
{{localize "Attack with"}} {{weapon.name}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</h3>
|
||||
|
||||
<div>
|
||||
<ul>
|
||||
<li>Formula : {{formula}}</li>
|
||||
<li>Modifier : {{modifier}} </li>
|
||||
<li><strong>Total Roll : {{finalScore}}</strong>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
39
templates/roll/roll-dialog-attribute.hbs
Normal file
39
templates/roll/roll-dialog-attribute.hbs
Normal file
@ -0,0 +1,39 @@
|
||||
<form class="skill-roll-dialog">
|
||||
<h2 class="dialog-roll-title">{{title}}</h2>
|
||||
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize "d6M"}}</label>
|
||||
<select id="d6Malus" value="d6Malus">
|
||||
{{#select d6Malus}}
|
||||
<option value="0">0</option>
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
<option value="4">4</option>
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize "d6B"}}</label>
|
||||
<select id="d6Bonus" value="d6Bonus">
|
||||
{{#select d6Bonus}}
|
||||
<option value="0">0</option>
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
<option value="4">4</option>
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize "Modifier"}}</label>
|
||||
<select id="bonusMalus" value="bonusMalus">
|
||||
{{#select bonusMalus}}
|
||||
{{{optionsBonusMalus}}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</form>
|
56
templates/roll/roll-dialog-career.hbs
Normal file
56
templates/roll/roll-dialog-career.hbs
Normal file
@ -0,0 +1,56 @@
|
||||
<form class="skill-roll-dialog">
|
||||
<h2 class="dialog-roll-title">{{title}}</h2>
|
||||
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize "rank"}}</label>
|
||||
<label class="property-label">{{career.data.rank}}</label>
|
||||
</div>
|
||||
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize "attribut"}}</label>
|
||||
<select id="rollAttribute" value="rollAttribute">
|
||||
{{#select rollAttribute}}
|
||||
<option value="vigor">{{localize "BOL.attributes.vigor"}}</option>
|
||||
<option value="agility">{{localize "BOL.attributes.agility"}}</option>
|
||||
<option value="mind">{{localize "BOL.attributes.mind"}}</option>
|
||||
<option value="appeal">{{localize "BOL.attributes.appeal"}}</option>
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize "d6M"}}</label>
|
||||
<select id="d6Malus" value="d6Malus">
|
||||
{{#select d6Malus}}
|
||||
<option value="0">0</option>
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
<option value="4">4</option>
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize "d6B"}}</label>
|
||||
<select id="d6Bonus" value="d6Bonus">
|
||||
{{#select d6Bonus}}
|
||||
<option value="0">0</option>
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
<option value="4">4</option>
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize "Modifier"}}</label>
|
||||
<select id="bonusMalus" value="bonusMalus">
|
||||
{{#select bonusMalus}}
|
||||
{{{optionsBonusMalus}}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</form>
|
8
templates/roll/roll-dialog-spell.hbs
Normal file
8
templates/roll/roll-dialog-spell.hbs
Normal file
@ -0,0 +1,8 @@
|
||||
<form class="skill-roll-dialog">
|
||||
<h2 class="dialog-roll-title">{{title}}</h2>
|
||||
|
||||
<div class="flexrow">
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
74
templates/roll/roll-dialog-weapon.hbs
Normal file
74
templates/roll/roll-dialog-weapon.hbs
Normal file
@ -0,0 +1,74 @@
|
||||
<form class="skill-roll-dialog">
|
||||
<h2 class="dialog-roll-title">{{title}}</h2>
|
||||
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize "Defender"}} : </label>
|
||||
<label class="property-label">{{defender.name}}</label>
|
||||
<label class="property-label">{{localize "Defense score"}}</label>
|
||||
<label class="property-label">{{defender.data.aptitudes.def.value}}</label>
|
||||
</div>
|
||||
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize "attribut"}}</label>
|
||||
<select id="rollAttribute" value="rollAttribute">
|
||||
{{#select rollAttribute}}
|
||||
<option value="vigor">{{localize "BOL.attributes.vigor"}}</option>
|
||||
<option value="agility">{{localize "BOL.attributes.agility"}}</option>
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize "d6M"}}</label>
|
||||
<select id="d6Malus" value="d6Malus">
|
||||
{{#select d6Malus}}
|
||||
<option value="0">0</option>
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
<option value="4">4</option>
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize "d6B"}}</label>
|
||||
<select id="d6Bonus" value="d6Bonus">
|
||||
{{#select d6Bonus}}
|
||||
<option value="0">0</option>
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
<option value="4">4</option>
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
{{#if isRangedWeapon}}
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize "Range Modifier"}}</label>
|
||||
<select id="rangeModifier" value="rangeModifier">
|
||||
{{#select rangeModifier}}
|
||||
<option value="1">{{localize "Point Blank"}}</option>
|
||||
<option value="0">{{localize "Short"}}</option>
|
||||
<option value="-1">{{localize "Medium"}}</option>
|
||||
<option value="-2">{{localize "Long"}}</option>
|
||||
<option value="-4">{{localize "Very Long"}}</option>
|
||||
<option value="-6">{{localize "Extreme"}}</option>
|
||||
<option value="-8">{{localize "Maximum"}}</option>
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize "Modifier"}}</label>
|
||||
<select id="bonusMalus" value="bonusMalus">
|
||||
{{#select bonusMalus}}
|
||||
{{{optionsBonusMalus}}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</form>
|
Loading…
Reference in New Issue
Block a user