tellement de trucs
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 11 KiB |
@@ -1,4 +1,5 @@
|
||||
import { onManageActiveEffect, prepareActiveEffectCategories } from "../system/effects.mjs";
|
||||
import { preloadHandlebarsTemplates } from "../system/handlebars-manager.mjs";
|
||||
|
||||
/**
|
||||
* Extend the basic ActorSheet with some very simple modifications
|
||||
@@ -53,7 +54,7 @@ export class VermineActorSheet extends ActorSheet {
|
||||
/** @override */
|
||||
activateListeners(html) {
|
||||
super.activateListeners(html);
|
||||
|
||||
html.find('.min-max-edit').click(this._onMinMaxEdit.bind(this))
|
||||
// Render the item sheet for viewing/editing prior to the editable check.
|
||||
html.find('.item-edit').click(ev => {
|
||||
const li = $(ev.currentTarget).parents(".item");
|
||||
@@ -105,6 +106,35 @@ export class VermineActorSheet extends ActorSheet {
|
||||
this.actor.update(update)
|
||||
|
||||
}
|
||||
async _onMinMaxEdit(event) {
|
||||
event.preventDefault();
|
||||
let propPath = event.currentTarget.dataset.prop;
|
||||
let propName = propPath.split('.').slice(-1).pop()
|
||||
let data = {
|
||||
actorName: this.actor.name,
|
||||
propName: propName
|
||||
}
|
||||
let html = await renderTemplate('systems/vermine2047/templates/dialogs/min-max-edit.hbs', data);
|
||||
|
||||
let ui = new Dialog({
|
||||
title: "edit : " + propName,
|
||||
content: html,
|
||||
buttons: {
|
||||
roll: {
|
||||
label: "ok",
|
||||
callback: (html) => { }
|
||||
|
||||
|
||||
},
|
||||
cancel: {
|
||||
label: game.i18n.localize('Close'),
|
||||
callback: () => { }
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
ui.render(true)
|
||||
}
|
||||
async _onItemCreate(event) {
|
||||
event.preventDefault();
|
||||
const header = event.currentTarget;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { onManageActiveEffect, prepareActiveEffectCategories } from "../system/effects.mjs";
|
||||
import { VermineActorSheet } from "./actor-sheet.mjs";
|
||||
import { RollDialog } from "../system/dialogs.mjs";
|
||||
import RollDialog from "../system/dialogs/rollDialog.mjs";
|
||||
import { TotemPicker } from "../system/applications.mjs";
|
||||
|
||||
/**
|
||||
@@ -14,7 +14,8 @@ export class VermineCharacterSheet extends VermineActorSheet {
|
||||
return mergeObject(super.defaultOptions, {
|
||||
classes: ["vermine2047", "sheet", "character", "actor"],
|
||||
template: "systems/vermine2047/templates/actor/actor-sheet.hbs",
|
||||
|
||||
width: "fit-content",
|
||||
height: "fit-content",
|
||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "features" }]
|
||||
});
|
||||
}
|
||||
@@ -73,6 +74,14 @@ export class VermineCharacterSheet extends VermineActorSheet {
|
||||
for (let [k, v] of Object.entries(context.system.abilities)) {
|
||||
v.label = game.i18n.localize(context.system.abilities[k].label) ?? k;
|
||||
}
|
||||
for (let [k, v] of Object.entries(context.system.skills)) {
|
||||
if (v.value >= 2) {
|
||||
let spe = this.actor.items.filter(it => it.type == "specialty").filter(spec => spec.system.skill == k);
|
||||
v.specialties = spe
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -103,10 +112,23 @@ export class VermineCharacterSheet extends VermineActorSheet {
|
||||
// Choose Totem
|
||||
html.find('.chooseTotem').click(this._onTotemButton.bind(this));
|
||||
html.find('.ability .rollable').click(this._onRoll.bind(this));
|
||||
html.find('[data-totem-name]').click(this._onClickTotemDice.bind(this))
|
||||
html.find('[data-totem-name]').click(this._onClickTotemDice.bind(this));
|
||||
if (!this.actor.flags.world?.editMode) {
|
||||
this.disableInputs(html)
|
||||
}
|
||||
|
||||
}
|
||||
disableInputs(html) {
|
||||
for (let input of html.find('input')) {
|
||||
if (input.name != "flags.world.editMode") {
|
||||
input.setAttribute('disabled', true)
|
||||
}
|
||||
|
||||
}
|
||||
for (let select of html.find('select')) {
|
||||
select.setAttribute('disabled', true)
|
||||
}
|
||||
}
|
||||
async _onClickTotemDice(ev) {
|
||||
let el = ev.currentTarget;
|
||||
let totem = el.dataset.totemName;
|
||||
@@ -116,14 +138,17 @@ export class VermineCharacterSheet extends VermineActorSheet {
|
||||
if (value === oldValue) { value-- };
|
||||
let updates = {};
|
||||
updates[`system.adaptation.totems.${totem}.value`] = value;
|
||||
let totems = this.actor.system.adaptation.totems;
|
||||
let sumTotems = Object.keys(totems).reduce(function (previous, key) {
|
||||
return previous + totems[key].value;
|
||||
}, 0);
|
||||
if (sumTotems >5) {
|
||||
ui.notifications.warn('vous ne pouvez pas avoir plus de 5 dés totems')
|
||||
//verifier le max des dés totems
|
||||
let sum = value;
|
||||
switch (totem) {
|
||||
case "human":
|
||||
sum += this.actor.system.adaptation.totems.adapted.value;
|
||||
break;
|
||||
case "adapted":
|
||||
sum += this.actor.system.adaptation.totems.human.value;
|
||||
break;
|
||||
}
|
||||
console.log(sumTotems, updates)
|
||||
if (sum > 5) { return ui.notifications.warn("pas plus de 5 dés totems") }
|
||||
await this.actor.update(updates);
|
||||
}
|
||||
/**
|
||||
|
||||
@@ -9,7 +9,7 @@ export class VermineItemSheet extends ItemSheet {
|
||||
return mergeObject(super.defaultOptions, {
|
||||
classes: ["vermine2047", "sheet", "item"],
|
||||
width: 520,
|
||||
height: 480,
|
||||
height: "auto",
|
||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }]
|
||||
});
|
||||
}
|
||||
@@ -58,7 +58,19 @@ export class VermineItemSheet extends ItemSheet {
|
||||
|
||||
// Everything below here is only needed if the sheet is editable
|
||||
if (!this.isEditable) return;
|
||||
//click on wound radio
|
||||
html.find('.damages-row [type="radio"]').click(ev => {
|
||||
this._onClickDamage(ev)
|
||||
})
|
||||
|
||||
// Roll handlers, click handlers, etc. would go here.
|
||||
}
|
||||
async _onClickDamage(ev) {
|
||||
if (!ev.currentTarget.checked) { return }
|
||||
let prop = ev.currentTarget.name;
|
||||
let update = {};
|
||||
update[prop] = ev.currentTarget.value - 1
|
||||
|
||||
this.item.update(update)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,268 +35,3 @@ export class CombatResultDialog extends Dialog {
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Represents a dialog for rolling dice.
|
||||
*/
|
||||
export class RollDialog extends Dialog {
|
||||
|
||||
/**
|
||||
* Creates a new RollDialog instance.
|
||||
* @param {Object} data - The data for the dialog.
|
||||
* @param {HTMLElement} html - The HTML content of the dialog.
|
||||
* @param {Object} options - The options for the dialog.
|
||||
* @param {Function} close - The callback function for closing the dialog.
|
||||
*/
|
||||
|
||||
constructor(data, html, options, close = undefined) {
|
||||
let conf = {
|
||||
title: "jet de dés",
|
||||
content: html,
|
||||
buttons: {
|
||||
roll: {
|
||||
icon: '<i class="fas fa-check"></i>',
|
||||
label: "Lancer !",
|
||||
callback: () => {
|
||||
this.roll()
|
||||
}
|
||||
},
|
||||
cancel: {
|
||||
icon: '<i class="fas fa-times"></i>',
|
||||
label: "Annuler",
|
||||
callback: () => { this.close() }
|
||||
}
|
||||
},
|
||||
close: close,
|
||||
}
|
||||
return super({ ...conf, ...data }, options);
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a new RollDialog instance.
|
||||
* @param {Object} data - The data for the dialog.
|
||||
* @param {HTMLElement} html - The HTML content of the dialog.
|
||||
* @param {Object} options - The options for the dialog.
|
||||
* @param {Function} close - The callback function for closing the dialog.
|
||||
*/
|
||||
static async create(data = {
|
||||
label: null,
|
||||
rolltype: null,
|
||||
NoD: 1,
|
||||
Reroll: false,
|
||||
actorId: game.user.character.id
|
||||
}) {
|
||||
// Retrieve the actor data based on the actorId
|
||||
data.actor = await game.actors.get(data.actorId);
|
||||
data.config = CONFIG.VERMINE;
|
||||
// Define options for the dialog
|
||||
let options = { classes: ["nocDialog"], width: 420, height: 'fit-content', 'z-index': 99999 };
|
||||
// Render the HTML template for the dialog
|
||||
let html = await renderTemplate('systems/vermine2047/templates/roll-dialog.hbs', data);
|
||||
|
||||
// Return a new RollDialog instance with the provided data, HTML, and options
|
||||
return new RollDialog(data, html, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the default options for the RollDialog.
|
||||
*/
|
||||
static get defaultOptions() {
|
||||
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||
focus: true,
|
||||
classes: ["dialog vermine-roll"],
|
||||
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Retrieves the data for the dialog.
|
||||
* @returns {Object} The context data for the dialog.
|
||||
*/
|
||||
getData() {
|
||||
// Get the context data from the superclass
|
||||
let context = super.getData();
|
||||
context.data = this.data;
|
||||
context.config = CONFIG.VERMINE;
|
||||
return context;
|
||||
}
|
||||
|
||||
/**
|
||||
* Activates event listeners for the dialog.
|
||||
* @param {HTMLElement} html - The HTML element of the dialog.
|
||||
*/
|
||||
async activateListeners(html) {
|
||||
// Activate event listeners from the superclass
|
||||
super.activateListeners(html);
|
||||
// Retrieve roll data and set up event listeners
|
||||
await this.getRollData();
|
||||
let rollInputs = html.find('[data-roll');
|
||||
for (let inp of rollInputs) {
|
||||
// Add event listener for roll input changes
|
||||
inp.addEventListener('change', await this.getRollData.bind(this))
|
||||
};
|
||||
let selectAbil = html.find('#ability')[0];
|
||||
// Set the maximum value for self control based on ability value
|
||||
html.find("#self_control")[0].max = selectAbil.value;
|
||||
selectAbil.addEventListener('change', this._onChangeAbility.bind(this));
|
||||
let selfControl = html.find('#self_control')[0]
|
||||
// Add event listener for self control changes
|
||||
selfControl.addEventListener('change', this._onChangeSelfControl.bind(this));
|
||||
};
|
||||
|
||||
/**
|
||||
* Retrieves the roll data for the dialog.
|
||||
* @param {Event} ev - The event triggering the roll data retrieval.
|
||||
*/
|
||||
async getRollData(ev) {
|
||||
console.log(this)
|
||||
// Calculate and store the roll data
|
||||
this.rollData = {
|
||||
actor: this.data.actor,
|
||||
NoD: this.getDicePool(),
|
||||
Reroll: this.getReroll(),
|
||||
difficulty: this.getDifficulty(),
|
||||
rollLabel: this.data.labelKey,
|
||||
totems: this.getTotems(),
|
||||
self_control: this.getSelfControl(),
|
||||
max_effort: this.getMaxEffort()
|
||||
}
|
||||
};
|
||||
/**
|
||||
* Handles the change in self control value.
|
||||
* @param {Event} ev - The event triggering the change in self control value.
|
||||
*/
|
||||
_onChangeSelfControl(ev) {
|
||||
let html = this.element[0];
|
||||
// Update the displayed self control value based on the event
|
||||
html.querySelector('#self_control_value').innerText = ev.currentTarget.value;
|
||||
};
|
||||
|
||||
/**
|
||||
* Retrieves the self control value from the HTML element.
|
||||
* @returns {number} The self control value.
|
||||
*/
|
||||
getSelfControl() {
|
||||
let html = this.element[0];
|
||||
// Parse and return the self control value from the HTML element
|
||||
let selfControl = parseInt(html.querySelector('#self_control').value)
|
||||
return selfControl
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the maximum effort value from the HTML element.
|
||||
* @returns {number} The maximum effort value.
|
||||
*/
|
||||
getMaxEffort() {
|
||||
let html = this.element[0];
|
||||
// Retrieve and return the maximum effort value from the HTML element
|
||||
return parseInt(html.querySelector('#ability').value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the selected totems from the HTML element.
|
||||
* @returns {Object} An object containing the selected totems.
|
||||
*/
|
||||
getTotems() {
|
||||
let html = this.element[0];
|
||||
// Check and store the status of human and adapted totems
|
||||
let totems = {
|
||||
human: html.querySelector('#human-totem')?.checked,
|
||||
adapted: html.querySelector('#adapted-totem')?.checked,
|
||||
}
|
||||
return totems
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles the change in ability value.
|
||||
* @param {Event} ev - The event triggering the change in ability value.
|
||||
*/
|
||||
_onChangeAbility(ev) {
|
||||
let html = this.element[0];
|
||||
// Retrieve the selected ability score and update related elements
|
||||
let score = html.querySelector('#ability').options[html.querySelector('#ability').selectedIndex].value;
|
||||
// Check if the score is a number, otherwise set it to 0
|
||||
if (!typeof score == "number") {
|
||||
score = 0
|
||||
}
|
||||
html.querySelector('#abilityScore').value = score;
|
||||
html.querySelector('#self_control').max = score;
|
||||
}
|
||||
/**
|
||||
* Retrieves the total dice pool based on various factors.
|
||||
* @returns {number} The total dice pool value.
|
||||
*/
|
||||
getDicePool() {
|
||||
// Retrieve the HTML element
|
||||
let html = this.element[0];
|
||||
// Get the ability value or set to 0 if not found
|
||||
let abilValue = html.querySelector('#ability').options[html.querySelector('#ability').selectedIndex].value || 0;
|
||||
// Get the skill value or set to 0 if not found
|
||||
let skillValue = html.querySelector('#skill').options[html.querySelector('#skill').selectedIndex].dataset.pool || 0;
|
||||
// Get the self control value
|
||||
let selfControl = html.querySelector('#self_control').value;
|
||||
// Calculate bonuses based on certain conditions
|
||||
let bonuses =
|
||||
(html.querySelector('#usingSpecialization').checked ? 1 : 0) +
|
||||
(html.querySelector('#helped').checked ? 1 : 0) +
|
||||
(html.querySelector('#usingTools').checked ? 1 : 0);
|
||||
// Calculate the total dice pool
|
||||
let total = parseInt(abilValue) + parseInt(selfControl) + parseInt(skillValue) + bonuses;
|
||||
return total || 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the reroll value based on selected skill.
|
||||
* @returns {number} The reroll value.
|
||||
*/
|
||||
getReroll() {
|
||||
// Retrieve the HTML element
|
||||
let html = this.element[0];
|
||||
// Get the selected skill index
|
||||
let selected = html.querySelector('#skill').selectedIndex;
|
||||
// Get the reroll value from the selected skill or set to 0 if not found
|
||||
let reroll = html.querySelector('#skill').options[selected].dataset.reroll || 0;
|
||||
return parseInt(reroll) || 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the difficulty value based on selected option.
|
||||
* @returns {number} The difficulty value.
|
||||
*/
|
||||
|
||||
getDifficulty() {
|
||||
// Retrieve the HTML element
|
||||
let html = this.element[0];
|
||||
// Get the selected index for difficulty
|
||||
let selected = html.querySelector('#difficulty').selectedIndex;
|
||||
// Get the difficulty value from the selected option or set to 0 if not found
|
||||
let diff = html.querySelector('#difficulty').options[selected].value || 0;
|
||||
return parseInt(diff) || 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a dice roll based on the roll data and handles self control checks.
|
||||
* @returns {Promise} A promise that resolves with the result of the dice roll.
|
||||
*/
|
||||
async roll() {
|
||||
// Check if self control is required for the roll
|
||||
if (this.rollData.self_control > 0) {
|
||||
// Check if the actor has enough self control
|
||||
if (this.rollData.actor.system.attributes.self_control.value < this.rollData.self_control) {
|
||||
// Display a warning message if self control is insufficient
|
||||
ui.notifications.warn('vous navez pas assez de sang-froid');
|
||||
// Re-render the dialog
|
||||
this.render(true);
|
||||
return false; // Exit the function if self control is insufficient
|
||||
}
|
||||
}
|
||||
|
||||
// Deduct self control points if necessary
|
||||
if (this.rollData.self_control > 0) {
|
||||
// Update the actor's self control value
|
||||
await this.rollData.actor.update({ "system.attributes.self_control.value": this.rollData.actor.system.attributes.self_control.value - this.rollData.self_control });
|
||||
}
|
||||
|
||||
// Perform the dice roll using VermineUtils
|
||||
return VermineUtils.roll({ ...this.rollData });
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,316 @@
|
||||
import { VermineUtils } from "../roll.mjs";
|
||||
/**
|
||||
* Represents a dialog for rolling dice.
|
||||
*/
|
||||
export default class RollDialog extends Dialog {
|
||||
|
||||
/**
|
||||
* Creates a new RollDialog instance.
|
||||
* @param {Object} data - The data for the dialog.
|
||||
* @param {HTMLElement} html - The HTML content of the dialog.
|
||||
* @param {Object} options - The options for the dialog.
|
||||
* @param {Function} close - The callback function for closing the dialog.
|
||||
*/
|
||||
|
||||
constructor(data, html, options, close = undefined) {
|
||||
let conf = {
|
||||
title: "jet de dés",
|
||||
content: html,
|
||||
buttons: {
|
||||
roll: {
|
||||
icon: '<i class="fas fa-check"></i>',
|
||||
label: "Lancer !",
|
||||
callback: () => {
|
||||
this.roll()
|
||||
}
|
||||
},
|
||||
cancel: {
|
||||
icon: '<i class="fas fa-times"></i>',
|
||||
label: "Annuler",
|
||||
callback: () => { this.close() }
|
||||
}
|
||||
},
|
||||
close: close,
|
||||
}
|
||||
return super({ ...conf, ...data }, options);
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a new RollDialog instance.
|
||||
* @param {Object} data - The data for the dialog.
|
||||
* @param {HTMLElement} html - The HTML content of the dialog.
|
||||
* @param {Object} options - The options for the dialog.
|
||||
* @param {Function} close - The callback function for closing the dialog.
|
||||
*/
|
||||
static async create(data = {
|
||||
label: null,
|
||||
rolltype: null,
|
||||
NoD: 1,
|
||||
Reroll: false,
|
||||
actorId: game.user.character.id
|
||||
}) {
|
||||
// Retrieve the actor data based on the actorId
|
||||
data.actor = await game.actors.get(data.actorId);
|
||||
data.availableSpecialties = data.actor.items.filter(it => it.type == "specialty");
|
||||
data.availableItems = data.actor.items.filter(it => it.type == "item");
|
||||
data.config = CONFIG.VERMINE;
|
||||
// Define options for the dialog
|
||||
let options = { classes: ["vermineDialog"], width: "fit-content", height: 'fit-content', 'z-index': 99999 };
|
||||
// Render the HTML template for the dialog
|
||||
let html = await renderTemplate('systems/vermine2047/templates/dialogs/roll-dialog.hbs', data);
|
||||
|
||||
// Return a new RollDialog instance with the provided data, HTML, and options
|
||||
return new RollDialog(data, html, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the default options for the RollDialog.
|
||||
*/
|
||||
static get defaultOptions() {
|
||||
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||
focus: true,
|
||||
classes: ["dialog vermine-roll"],
|
||||
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Retrieves the data for the dialog.
|
||||
* @returns {Object} The context data for the dialog.
|
||||
*/
|
||||
getData() {
|
||||
// Get the context data from the superclass
|
||||
let context = super.getData();
|
||||
context.data = this.data;
|
||||
context.config = CONFIG.VERMINE;
|
||||
|
||||
// Return the context data
|
||||
return context;
|
||||
|
||||
}
|
||||
|
||||
prepareItems() {
|
||||
return this.data.actor.items.filter(it => it.type == "item")
|
||||
}
|
||||
prepareSpecialties() {
|
||||
return this.data.actor.items.filter(it => it.type == "specialty")
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Activates event listeners for the dialog.
|
||||
* @param {HTMLElement} html - The HTML element of the dialog.
|
||||
*/
|
||||
async activateListeners(html) {
|
||||
// Activate event listeners from the superclass
|
||||
super.activateListeners(html);
|
||||
// Retrieve roll data and set up event listeners
|
||||
await this.getRollData();
|
||||
let rollInputs = html.find('[data-roll');
|
||||
for (let inp of rollInputs) {
|
||||
// Add event listener for roll input changes
|
||||
inp.addEventListener('change', await this.getRollData.bind(this))
|
||||
};
|
||||
this.displaySpecialties();
|
||||
|
||||
let selectAbil = html.find('#ability')[0];
|
||||
// Set the maximum value for self control based on ability value
|
||||
html.find("#self_control")[0].max = selectAbil.value;
|
||||
selectAbil.addEventListener('change', this._onChangeAbility.bind(this));
|
||||
let selfControl = html.find('#self_control')[0]
|
||||
// Add event listener for self control changes
|
||||
selfControl.addEventListener('change', this._onChangeSelfControl.bind(this));
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Retrieves the roll data for the dialog.
|
||||
* @param {Event} ev - The event triggering the roll data retrieval.
|
||||
*/
|
||||
async getRollData(ev) {
|
||||
console.log(this)
|
||||
// Calculate and store the roll data
|
||||
this.rollData = {
|
||||
actor: this.data.actor,
|
||||
NoD: this.getDicePool(),
|
||||
Reroll: this.getReroll(),
|
||||
difficulty: this.getDifficulty(),
|
||||
handicap: this.getHandicap(),
|
||||
rollType: this.getRollType(),
|
||||
rollLabel: this.getLabel(),
|
||||
totems: this.getTotems(),
|
||||
self_control: this.getSelfControl(),
|
||||
max_effort: this.getMaxEffort()
|
||||
}
|
||||
this.displaySpecialties();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Handles the change in self control value.
|
||||
* @param {Event} ev - The event triggering the change in self control value.
|
||||
*/
|
||||
_onChangeSelfControl(ev) {
|
||||
let html = this.element[0];
|
||||
// Update the displayed self control value based on the event
|
||||
html.querySelector('#self_control_value').innerText = ev.currentTarget.value;
|
||||
};
|
||||
getHandicap() {
|
||||
let html = this.element[0];
|
||||
// Parse and return the self control value from the HTML element
|
||||
let handicap = parseInt(html.querySelector('#handicap').value)
|
||||
return handicap
|
||||
}
|
||||
getRollType() {
|
||||
let html = this.element[0];
|
||||
// Update the displayed self control value based on the event
|
||||
if (html.querySelector('select#skill').value) {
|
||||
return "skill"
|
||||
} return "ability"
|
||||
}
|
||||
getLabel() {
|
||||
let html = this.element[0];
|
||||
if (this.getRollType() == "skill") {
|
||||
return html.querySelector('select#skill').options[html.querySelector('select#skill').selectedIndex].dataset.label
|
||||
}
|
||||
return html.querySelector('select#ability').options[html.querySelector('select#ability').selectedIndex].dataset.label
|
||||
}
|
||||
displaySpecialties() {
|
||||
console.log(this)
|
||||
let specialties = this.element[0].querySelectorAll('[data-spec-skill]');
|
||||
for (let specEl of specialties) {
|
||||
if (specEl.dataset.specSkill != this.getLabel()) {
|
||||
specEl.style.display = "none";
|
||||
specEl.querySelector('input').checked = null;
|
||||
} else { specEl.style.display = "inline" }
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Retrieves the self control value from the HTML element.
|
||||
* @returns {number} The self control value.
|
||||
*/
|
||||
getSelfControl() {
|
||||
let html = this.element[0];
|
||||
// Parse and return the self control value from the HTML element
|
||||
let selfControl = parseInt(html.querySelector('#self_control').value)
|
||||
return selfControl
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the maximum effort value from the HTML element.
|
||||
* @returns {number} The maximum effort value.
|
||||
*/
|
||||
getMaxEffort() {
|
||||
let html = this.element[0];
|
||||
// Retrieve and return the maximum effort value from the HTML element
|
||||
return parseInt(html.querySelector('#ability').value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the selected totems from the HTML element.
|
||||
* @returns {Object} An object containing the selected totems.
|
||||
*/
|
||||
getTotems() {
|
||||
let html = this.element[0];
|
||||
// Check and store the status of human and adapted totems
|
||||
let totems = {
|
||||
human: html.querySelector('#human-totem')?.checked,
|
||||
adapted: html.querySelector('#adapted-totem')?.checked,
|
||||
}
|
||||
return totems
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles the change in ability value.
|
||||
* @param {Event} ev - The event triggering the change in ability value.
|
||||
*/
|
||||
_onChangeAbility(ev) {
|
||||
let html = this.element[0];
|
||||
// Retrieve the selected ability score and update related elements
|
||||
let score = html.querySelector('#ability').options[html.querySelector('#ability').selectedIndex].value;
|
||||
// Check if the score is a number, otherwise set it to 0
|
||||
if (!typeof score == "number") {
|
||||
score = 0
|
||||
}
|
||||
html.querySelector('#abilityScore').value = score;
|
||||
html.querySelector('#self_control').max = score;
|
||||
}
|
||||
/**
|
||||
* Retrieves the total dice pool based on various factors.
|
||||
* @returns {number} The total dice pool value.
|
||||
*/
|
||||
getDicePool() {
|
||||
// Retrieve the HTML element
|
||||
let html = this.element[0];
|
||||
// Get the ability value or set to 0 if not found
|
||||
let abilValue = html.querySelector('#ability').options[html.querySelector('#ability').selectedIndex].value || 0;
|
||||
// Get the skill value or set to 0 if not found
|
||||
let skillValue = html.querySelector('#skill').options[html.querySelector('#skill').selectedIndex].dataset.pool || 0;
|
||||
// Get the self control value
|
||||
let selfControl = html.querySelector('#self_control').value;
|
||||
// Calculate bonuses based on certain conditions
|
||||
console.log(html.querySelector('#usingTools').checked)
|
||||
let bonuses =
|
||||
(html.querySelector('#usingSpecialization')?.checked ? 1 : 0) +
|
||||
(html.querySelector('#helped').checked ? 1 : 0) +
|
||||
(html.querySelector('#usingTools').checked ? 1 : 0);
|
||||
// Calculate the total dice pool
|
||||
let total = parseInt(abilValue) + parseInt(selfControl) + parseInt(skillValue) + bonuses;
|
||||
return total || 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the reroll value based on selected skill.
|
||||
* @returns {number} The reroll value.
|
||||
*/
|
||||
getReroll() {
|
||||
// Retrieve the HTML element
|
||||
let html = this.element[0];
|
||||
// Get the selected skill index
|
||||
let selected = html.querySelector('#skill').selectedIndex;
|
||||
// Get the reroll value from the selected skill or set to 0 if not found
|
||||
let reroll = html.querySelector('#skill').options[selected].dataset.reroll || 0;
|
||||
return parseInt(reroll) || 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the difficulty value based on selected option.
|
||||
* @returns {number} The difficulty value.
|
||||
*/
|
||||
|
||||
getDifficulty() {
|
||||
// Retrieve the HTML element
|
||||
let html = this.element[0];
|
||||
// Get the selected index for difficulty
|
||||
let selected = html.querySelector('#difficulty').selectedIndex;
|
||||
// Get the difficulty value from the selected option or set to 0 if not found
|
||||
let diff = html.querySelector('#difficulty').options[selected].value || 0;
|
||||
return parseInt(diff) || 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a dice roll based on the roll data and handles self control checks.
|
||||
* @returns {Promise} A promise that resolves with the result of the dice roll.
|
||||
*/
|
||||
async roll() {
|
||||
// Check if self control is required for the roll
|
||||
if (this.rollData.self_control > 0) {
|
||||
// Check if the actor has enough self control
|
||||
if (this.rollData.actor.system.attributes.self_control.value < this.rollData.self_control) {
|
||||
// Display a warning message if self control is insufficient
|
||||
ui.notifications.warn('vous navez pas assez de sang-froid');
|
||||
// Re-render the dialog
|
||||
this.render(true);
|
||||
return false; // Exit the function if self control is insufficient
|
||||
}
|
||||
}
|
||||
|
||||
// Deduct self control points if necessary
|
||||
if (this.rollData.self_control > 0) {
|
||||
// Update the actor's self control value
|
||||
await this.rollData.actor.update({ "system.attributes.self_control.value": this.rollData.actor.system.attributes.self_control.value - this.rollData.self_control });
|
||||
}
|
||||
|
||||
// Perform the dice roll using VermineUtils
|
||||
return VermineUtils.roll({ ...this.rollData });
|
||||
}
|
||||
}
|
||||
@@ -10,32 +10,31 @@ export async function initUserDice(dice3d, user) {
|
||||
name: 'regular_' + user.name,
|
||||
description: "regular dice for " + user.name,
|
||||
category: "vermine 2047",
|
||||
foreground: '#9F8003',
|
||||
foreground: oppositeColor(baseColor),
|
||||
background: baseColor,
|
||||
outline: 'black',
|
||||
texture: 'none',
|
||||
material: 'plastic',
|
||||
visibility: 'visible'
|
||||
});
|
||||
visibility: 'visible',
|
||||
|
||||
}, "preferred");
|
||||
dice3d.addColorset({
|
||||
name: 'human_' + user.name,
|
||||
description: "human totem dice for " + user.name,
|
||||
category: "vermine 2047",
|
||||
foreground: '#9F8003',
|
||||
foreground: oppositeColor(lightenColor(baseColor, 60)),
|
||||
background: lightenColor(baseColor, 60),
|
||||
outline: 'black',
|
||||
material: 'plastic',
|
||||
visibility: 'visible'
|
||||
visibility: 'visible',
|
||||
|
||||
});
|
||||
dice3d.addColorset({
|
||||
name: 'adapted_' + user.name,
|
||||
description: "adapted totem dice for " + user.name,
|
||||
category: "vermine 2047",
|
||||
foreground: '#9F8003',
|
||||
foreground: oppositeColor(darkenColor(baseColor, 60)),
|
||||
background: darkenColor(baseColor, 60),
|
||||
outline: 'black',
|
||||
material: 'plastic',
|
||||
visibility: 'visible'
|
||||
visibility: 'visible',
|
||||
|
||||
});
|
||||
|
||||
await user.setFlag("world", "diceInit", true);
|
||||
@@ -58,3 +57,10 @@ export function lightenColor(color, percent) {
|
||||
const B = (num & 0x0000FF) - amt;
|
||||
return '#' + (0x1000000 + (R < 0 ? 0 : R > 255 ? 255 : R) * 0x10000 + (G < 0 ? 0 : G > 255 ? 255 : G) * 0x100 + (B < 0 ? 0 : B > 255 ? 255 : B)).toString(16).slice(1);
|
||||
}
|
||||
export function oppositeColor(color) {
|
||||
const num = parseInt(color.replace('#', ''), 16);
|
||||
const R = 255 - (num >> 16);
|
||||
const G = 255 - ((num >> 8) & 0x00FF);
|
||||
const B = 255 - (num & 0x0000FF);
|
||||
return '#' + (0x1000000 + R * 0x10000 + G * 0x100 + B).toString(16).slice(1);
|
||||
}
|
||||
@@ -35,8 +35,12 @@ export const preloadHandlebarsTemplates = async function () {
|
||||
// creature partials
|
||||
"systems/vermine2047/templates/actor/creature/creature-combat.hbs",
|
||||
|
||||
// additional templates
|
||||
"systems/vermine2047/templates/roll-dialog.hbs",
|
||||
// dialog templates
|
||||
"systems/vermine2047/templates/dialogs/roll-dialog.hbs",
|
||||
|
||||
//items damages
|
||||
"systems/vermine2047/templates/item/partials/damages.html",
|
||||
|
||||
]);
|
||||
};
|
||||
|
||||
@@ -98,7 +102,12 @@ export const registerHandlebarsHelpers = function () {
|
||||
return text;
|
||||
|
||||
});
|
||||
|
||||
//return damge data
|
||||
Handlebars.registerHelper('getDamagesData', function (damageObject, prop) {
|
||||
let propObject = damageObject[prop]
|
||||
let propValue = propObject[damageObject.value - 1]
|
||||
return propValue
|
||||
});
|
||||
// return threat level information
|
||||
Handlebars.registerHelper('threatLevel', function (property, level, options) {
|
||||
if (level < 1 || level > 4)
|
||||
@@ -218,17 +227,8 @@ export const registerHandlebarsHelpers = function () {
|
||||
});
|
||||
|
||||
|
||||
Handlebars.registerHelper('range', function () {
|
||||
var args = Array.prototype.slice.call(arguments),
|
||||
rangeArgs = args.slice(0, -1),
|
||||
options = args[args.length - 1];
|
||||
|
||||
return range.apply(null, rangeArgs)
|
||||
.map(function (num) { return options.fn(num); })
|
||||
.join('');
|
||||
});
|
||||
|
||||
// return age type information
|
||||
// booleans if if equal if greater etc...
|
||||
Handlebars.registerHelper('ife', function (arg1, arg2, options) {
|
||||
return (arg1 == arg2) ? options.fn(this) : options.inverse(this);
|
||||
});
|
||||
@@ -252,11 +252,34 @@ export const registerHandlebarsHelpers = function () {
|
||||
return (arg1.includes(arg2)) ? options.fn(this) : options.inverse(this);
|
||||
});
|
||||
|
||||
Handlebars.registerHelper('repeat', function (times, start, block) {
|
||||
|
||||
//math operations
|
||||
|
||||
Handlebars.registerHelper('math_add', function (a, b, options) {
|
||||
return (parseInt(a) + parseInt(b))
|
||||
});
|
||||
|
||||
Handlebars.registerHelper('math_subs', function (a, b, options) {
|
||||
return (parseInt(a) - parseInt(b))
|
||||
});
|
||||
|
||||
Handlebars.registerHelper('math_mult', function (a, b, options) {
|
||||
return (parseInt(a) * parseInt(b))
|
||||
});
|
||||
|
||||
Handlebars.registerHelper('math_div', function (a, b, options) {
|
||||
return (parseInt(a) / parseInt(b))
|
||||
});
|
||||
|
||||
|
||||
|
||||
// loop with named index
|
||||
Handlebars.registerHelper('repeat', function (times, start, indexLabel, block) {
|
||||
var accum = '';
|
||||
if (!indexLabel) { indexLabel = "index" }
|
||||
if (!start) { start = 0; }
|
||||
for (var i = start; i < times + start; ++i) {
|
||||
block.data.index = i;
|
||||
block.data[indexLabel] = i;
|
||||
block.data.first = i === start;
|
||||
block.data.last = i === (times + start - 1);
|
||||
accum += block.fn(this);
|
||||
@@ -264,4 +287,7 @@ export const registerHandlebarsHelpers = function () {
|
||||
return accum;
|
||||
});
|
||||
|
||||
Handlebars.registerHelper("setVar", function (varName, varValue, options) {
|
||||
options.data.root[varName] = varValue;
|
||||
});
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import { RollDialog } from "./dialogs.mjs";
|
||||
import RollDialog from "./dialogs/rollDialog.mjs";
|
||||
import { initUserDice } from "./dice3d.mjs";
|
||||
import { VermineUtils } from "./roll.mjs";
|
||||
import { registerTours } from "./tour.mjs";
|
||||
@@ -11,6 +11,11 @@ export const registerHooks = function () {
|
||||
Hooks.once('diceSoNiceReady', async (dice3d) => {
|
||||
dice3d.addSystem({ id: "Vermine2047", name: "Vermine 2047" }, "preferred");
|
||||
|
||||
|
||||
game.users.forEach(user => {
|
||||
initUserDice(dice3d, user)
|
||||
});
|
||||
|
||||
dice3d.addDicePreset({
|
||||
type: "d10",
|
||||
labels: [
|
||||
@@ -26,17 +31,17 @@ export const registerHooks = function () {
|
||||
"systems/vermine2047/assets/images/die/d10-0.webp",
|
||||
],
|
||||
|
||||
system: "Vermine2047"
|
||||
});
|
||||
system: "Vermine2047",
|
||||
|
||||
|
||||
game.users.forEach(user => {
|
||||
initUserDice(dice3d, user)
|
||||
});
|
||||
},);
|
||||
|
||||
});
|
||||
|
||||
Hooks.on('renderChatMessage', async (message, html, data) => {
|
||||
let rerollTitle = html[0].querySelector(".reroll-fromroll h4");
|
||||
if (rerollTitle) {
|
||||
rerollTitle.addEventListener("click", () => { html[0].querySelector(".reroll").classList.toggle('visible') })
|
||||
}
|
||||
if (message.user._id != game.user._id || !game.user.isGM) {
|
||||
html[0].querySelectorAll("input").forEach(inp => inp.disabled = true);
|
||||
html[0].querySelectorAll("div.reroll-from-effort").forEach(el => el.style.display = "none")
|
||||
@@ -101,6 +106,7 @@ export const registerHooks = function () {
|
||||
if (actor.img == "icons/svg/mystery-man.svg") {
|
||||
actor.updateSource({ "img": `systems/vermine2047/assets/icons/actors/${actor.type}.webp` });
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Hooks.on("preCreateItem", function (item) {
|
||||
@@ -136,18 +142,7 @@ export const registerHooks = function () {
|
||||
}*/
|
||||
}
|
||||
});
|
||||
|
||||
/* Hooks.on("chatCommandsReady", function (chatCommands) {
|
||||
chatCommands.registerCommand(chatCommands.createCommandFromData({
|
||||
commandKey: "/dr",
|
||||
invokeOnCommand: (chatlog, messageText, chatdata) => {
|
||||
Roll.get().parse(messageText);
|
||||
},
|
||||
shouldDisplayToChat: false,
|
||||
iconClass: "fa-dice-d6",
|
||||
description: "Roll Vermine 2047 check"
|
||||
}));
|
||||
});*/
|
||||
|
||||
|
||||
Hooks.on("createActor", function (actor, options, id) {
|
||||
actor.setFlag("world", "editMode", true)
|
||||
})
|
||||
}
|
||||
@@ -13,9 +13,7 @@ export class VermineUtils {
|
||||
if (totems.human) {
|
||||
NoD--;
|
||||
modFormula = "(1D10cs>=" + difficulty + `[human_${game.user.name}]*2)`;
|
||||
await actor.update({
|
||||
"system.adaptation.totems.human.value": actor.system.adaptation.totems.human.value - 1
|
||||
})
|
||||
|
||||
}
|
||||
// Vérification des totems adaptés
|
||||
if (totems.adapted) {
|
||||
@@ -26,9 +24,7 @@ export class VermineUtils {
|
||||
} else {
|
||||
modFormula = "(1D10cs>=" + difficulty + `[adapted_${game.user.name}]*2)`;
|
||||
}
|
||||
await actor.update({
|
||||
"system.adaptation.totems.adapted.value": actor.system.adaptation.totems.adapted.value - 1
|
||||
})
|
||||
|
||||
};
|
||||
|
||||
// Construction de la formule de base
|
||||
@@ -45,6 +41,7 @@ export class VermineUtils {
|
||||
let roll = new Roll(formula, actor.getRollData());
|
||||
//effectuer le lancé
|
||||
await roll.evaluate();
|
||||
roll.dice.forEach(die => die.options.appearance = { system: "vermine2047" })
|
||||
//afficher le lancer 3d
|
||||
await VermineUtils.showDiceSoNice(roll);
|
||||
// afficher le résultat dans le chat
|
||||
|
||||
@@ -18,7 +18,6 @@ import { VermineCombat, VermineCombatTracker } from "./system/fight.mjs";
|
||||
// Import helper/utility classes and constants.
|
||||
import { preloadHandlebarsTemplates, registerHandlebarsHelpers } from "./system/handlebars-manager.mjs";
|
||||
import { VERMINE } from "./system/config.mjs";
|
||||
import { initUserDice } from "./system/dice3d.mjs";
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/* Init Hook */
|
||||
|
||||
@@ -1 +1 @@
|
||||
MANIFEST-000177
|
||||
MANIFEST-000219
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
2024/04/28-09:24:23.659 2504 Recovering log #176
|
||||
2024/04/28-09:24:23.664 2504 Delete type=0 #176
|
||||
2024/04/28-09:24:23.664 2504 Delete type=3 #175
|
||||
2024/05/13-06:46:44.023 2f70 Recovering log #218
|
||||
2024/05/13-06:46:44.027 2f70 Delete type=0 #218
|
||||
2024/05/13-06:46:44.028 2f70 Delete type=3 #217
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
2024/04/26-22:48:34.076 b5c Recovering log #174
|
||||
2024/04/26-22:48:34.079 b5c Delete type=0 #174
|
||||
2024/04/26-22:48:34.081 b5c Delete type=3 #173
|
||||
2024/05/13-06:37:40.648 22bc Recovering log #216
|
||||
2024/05/13-06:37:40.650 22bc Delete type=0 #216
|
||||
2024/05/13-06:37:40.650 22bc Delete type=3 #215
|
||||
|
||||
@@ -1 +1 @@
|
||||
MANIFEST-000177
|
||||
MANIFEST-000219
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
2024/04/28-09:24:23.727 2504 Recovering log #176
|
||||
2024/04/28-09:24:23.733 2504 Delete type=0 #176
|
||||
2024/04/28-09:24:23.733 2504 Delete type=3 #175
|
||||
2024/05/13-06:46:44.093 2f70 Recovering log #218
|
||||
2024/05/13-06:46:44.098 2f70 Delete type=0 #218
|
||||
2024/05/13-06:46:44.098 2f70 Delete type=3 #217
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
2024/04/26-22:48:34.179 b5c Recovering log #174
|
||||
2024/04/26-22:48:34.188 b5c Delete type=0 #174
|
||||
2024/04/26-22:48:34.188 b5c Delete type=3 #173
|
||||
2024/05/13-06:37:40.710 22bc Recovering log #216
|
||||
2024/05/13-06:37:40.714 22bc Delete type=0 #216
|
||||
2024/05/13-06:37:40.715 22bc Delete type=3 #215
|
||||
|
||||
@@ -1 +1 @@
|
||||
MANIFEST-000161
|
||||
MANIFEST-000203
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
2024/04/28-09:24:23.680 2504 Recovering log #160
|
||||
2024/04/28-09:24:23.685 2504 Delete type=0 #160
|
||||
2024/04/28-09:24:23.685 2504 Delete type=3 #159
|
||||
2024/05/13-06:46:44.046 2f70 Recovering log #202
|
||||
2024/05/13-06:46:44.050 2f70 Delete type=0 #202
|
||||
2024/05/13-06:46:44.051 2f70 Delete type=3 #201
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
2024/04/26-22:48:34.099 b5c Recovering log #158
|
||||
2024/04/26-22:48:34.107 b5c Delete type=0 #158
|
||||
2024/04/26-22:48:34.107 b5c Delete type=3 #157
|
||||
2024/05/13-06:37:40.667 22bc Recovering log #200
|
||||
2024/05/13-06:37:40.671 22bc Delete type=0 #200
|
||||
2024/05/13-06:37:40.671 22bc Delete type=3 #199
|
||||
|
||||
@@ -1 +1 @@
|
||||
MANIFEST-000175
|
||||
MANIFEST-000217
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
2024/04/28-09:24:23.715 d84 Recovering log #174
|
||||
2024/04/28-09:24:23.721 d84 Delete type=0 #174
|
||||
2024/04/28-09:24:23.721 d84 Delete type=3 #173
|
||||
2024/05/13-06:46:44.082 3304 Recovering log #216
|
||||
2024/05/13-06:46:44.087 3304 Delete type=0 #216
|
||||
2024/05/13-06:46:44.087 3304 Delete type=3 #215
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
2024/04/26-22:48:34.159 1544 Recovering log #172
|
||||
2024/04/26-22:48:34.165 1544 Delete type=0 #172
|
||||
2024/04/26-22:48:34.166 1544 Delete type=3 #171
|
||||
2024/05/13-06:37:40.698 331c Recovering log #214
|
||||
2024/05/13-06:37:40.703 331c Delete type=0 #214
|
||||
2024/05/13-06:37:40.703 331c Delete type=3 #213
|
||||
|
||||
@@ -1 +1 @@
|
||||
MANIFEST-000071
|
||||
MANIFEST-000113
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
2024/04/28-09:24:23.691 d84 Recovering log #70
|
||||
2024/04/28-09:24:23.695 d84 Delete type=0 #70
|
||||
2024/04/28-09:24:23.695 d84 Delete type=3 #69
|
||||
2024/05/13-06:46:44.056 3304 Recovering log #112
|
||||
2024/05/13-06:46:44.062 3304 Delete type=0 #112
|
||||
2024/05/13-06:46:44.062 3304 Delete type=3 #111
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
2024/04/26-22:48:34.121 1544 Recovering log #68
|
||||
2024/04/26-22:48:34.127 1544 Delete type=0 #68
|
||||
2024/04/26-22:48:34.127 1544 Delete type=3 #67
|
||||
2024/05/13-06:37:40.677 331c Recovering log #110
|
||||
2024/05/13-06:37:40.682 331c Delete type=0 #110
|
||||
2024/05/13-06:37:40.682 331c Delete type=3 #109
|
||||
|
||||
@@ -1 +1 @@
|
||||
MANIFEST-000068
|
||||
MANIFEST-000110
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
2024/04/28-09:24:23.703 2504 Recovering log #67
|
||||
2024/04/28-09:24:23.708 2504 Delete type=0 #67
|
||||
2024/04/28-09:24:23.708 2504 Delete type=3 #66
|
||||
2024/05/13-06:46:44.069 2f70 Recovering log #109
|
||||
2024/05/13-06:46:44.074 2f70 Delete type=0 #109
|
||||
2024/05/13-06:46:44.075 2f70 Delete type=3 #108
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
2024/04/26-22:48:34.142 b5c Recovering log #65
|
||||
2024/04/26-22:48:34.148 b5c Delete type=0 #65
|
||||
2024/04/26-22:48:34.148 b5c Delete type=3 #64
|
||||
2024/05/13-06:37:40.684 22bc Recovering log #107
|
||||
2024/05/13-06:37:40.693 22bc Delete type=0 #107
|
||||
2024/05/13-06:37:40.693 22bc Delete type=3 #106
|
||||
|
||||
@@ -1 +1 @@
|
||||
MANIFEST-000175
|
||||
MANIFEST-000217
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
2024/04/28-09:24:23.670 d84 Recovering log #174
|
||||
2024/04/28-09:24:23.674 d84 Delete type=0 #174
|
||||
2024/04/28-09:24:23.675 d84 Delete type=3 #173
|
||||
2024/05/13-06:46:44.034 3304 Recovering log #216
|
||||
2024/05/13-06:46:44.038 3304 Delete type=0 #216
|
||||
2024/05/13-06:46:44.039 3304 Delete type=3 #215
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
2024/04/26-22:48:34.087 1544 Recovering log #172
|
||||
2024/04/26-22:48:34.091 1544 Delete type=0 #172
|
||||
2024/04/26-22:48:34.092 1544 Delete type=3 #171
|
||||
2024/05/13-06:37:40.650 331c Recovering log #214
|
||||
2024/05/13-06:37:40.662 331c Delete type=0 #214
|
||||
2024/05/13-06:37:40.662 331c Delete type=3 #213
|
||||
|
||||
@@ -23,6 +23,10 @@
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
img.profile-img {
|
||||
filter: drop-shadow(0px 0px 20px rgb(110, 133, 27))
|
||||
}
|
||||
|
||||
/* custom styles */
|
||||
body.system-vermine2047 img#logo {
|
||||
content: url("/systems/vermine2047/assets/images/ui/logo_vermine_foundry.webp");
|
||||
@@ -47,6 +51,8 @@ img {
|
||||
border: none;
|
||||
}
|
||||
|
||||
|
||||
|
||||
ul.unstyled {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
@@ -130,14 +136,11 @@ ul.unstyled li {
|
||||
h4 {
|
||||
position: absolute;
|
||||
transform: rotate(-8deg);
|
||||
opacity: 0.7;
|
||||
opacity: 1;
|
||||
transition: 0.2s;
|
||||
|
||||
}
|
||||
|
||||
&:hover h4 {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -263,6 +266,22 @@ ul.unstyled li {
|
||||
}
|
||||
}
|
||||
|
||||
.system-vermine2047 .sheet.actor .totem-details {
|
||||
position: relative;
|
||||
|
||||
img.img-totem {
|
||||
transform-origin: 50% 50%;
|
||||
filter: grayscale(1);
|
||||
opacity: 0.15;
|
||||
position: absolute;
|
||||
width: 30%;
|
||||
height: auto;
|
||||
pointer-events: none;
|
||||
aspect-ratio: 1/1;
|
||||
left: 35%;
|
||||
}
|
||||
}
|
||||
|
||||
.system-vermine2047 .sheet.actor div.minor-totems {
|
||||
position: relative;
|
||||
background-color: #929c6f85;
|
||||
@@ -279,8 +298,29 @@ ul.unstyled li {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
h5.human,
|
||||
h5.adapted {
|
||||
transition: 0.3s;
|
||||
|
||||
img.img-totem {
|
||||
filter: drop-shadow(0px 0px 20px rgb(0, 0, 0));
|
||||
}
|
||||
|
||||
&.major {
|
||||
transform: scale(1.1);
|
||||
|
||||
& img {
|
||||
filter: drop-shadow(0px 0px 10px red)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.totem-dice {
|
||||
|
||||
|
||||
|
||||
.human-dice,
|
||||
.adapted-dice {
|
||||
display: flex;
|
||||
@@ -559,6 +599,18 @@ ul.unstyled li {
|
||||
height: 54px;
|
||||
}
|
||||
|
||||
|
||||
//Query pour les lignes de caract
|
||||
@container ability-row (max-width: 240px) {
|
||||
|
||||
.skill-dots,
|
||||
span.hexa {
|
||||
display: none
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
.system-vermine2047 .sheet.actor .ability {
|
||||
padding-right: 0.6rem;
|
||||
font-size: 0.8rem;
|
||||
@@ -566,13 +618,23 @@ ul.unstyled li {
|
||||
box-shadow: 0px 0px 15px rgba(128, 128, 128, 0) inset;
|
||||
transition: 0.2s;
|
||||
position: relative;
|
||||
flex-wrap: nowrap;
|
||||
min-width: min-content;
|
||||
container-type: inline-size;
|
||||
container-name: ability-row;
|
||||
|
||||
|
||||
|
||||
&:hover {
|
||||
box-shadow: 0px 0px 15px gray inset;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
label {
|
||||
min-width: fit-content;
|
||||
min-width: 40%;
|
||||
flex: 1.3;
|
||||
|
||||
}
|
||||
|
||||
@@ -583,21 +645,6 @@ ul.unstyled li {
|
||||
flex: 0.5;
|
||||
}
|
||||
|
||||
.hexa {
|
||||
text-align: center;
|
||||
clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
|
||||
background: radial-gradient(circle, rgba(255, 255, 255, 0.425) 0%, rgba(0, 0, 0, 0.288) 100%);
|
||||
max-height: 1.2rem;
|
||||
max-width: 1.2rem;
|
||||
aspect-ratio: 1/1;
|
||||
color: black;
|
||||
vertical-align: center;
|
||||
|
||||
&.checked {
|
||||
background: radial-gradient(circle, rgb(0, 0, 0) 0%, rgba(0, 0, 0, 0.288) 100%);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
div.specialties {
|
||||
position: absolute;
|
||||
@@ -611,6 +658,7 @@ ul.unstyled li {
|
||||
height: 100%;
|
||||
align-self: center;
|
||||
flex: 1.5;
|
||||
min-width: fit-content;
|
||||
|
||||
&>div {
|
||||
|
||||
@@ -640,29 +688,68 @@ ul.unstyled li {
|
||||
}
|
||||
}
|
||||
|
||||
.vermine2047.sheet.actor input[type="radio"] {
|
||||
&::after {
|
||||
content: " ";
|
||||
display: block;
|
||||
width: 0.8rem;
|
||||
height: 0.8rem;
|
||||
background: radial-gradient(circle, rgba(217, 214, 204, 1) 0%, rgba(217, 214, 204, 1) 40%, rgb(85, 85, 85) 60%);
|
||||
border-radius: 50%;
|
||||
;
|
||||
.system-vermine2047 .sheet.actor .preferred {
|
||||
|
||||
h4,
|
||||
label {
|
||||
text-shadow: 0px 0px 5px rgba(0, 128, 0, 0.411)
|
||||
}
|
||||
}
|
||||
|
||||
.system-vermine2047 .sheet.actor #edit {
|
||||
background-color: black;
|
||||
color: white
|
||||
}
|
||||
|
||||
.system-vermine2047 .sheet.actor .reserve-grid {
|
||||
line-height: 0.5rem;
|
||||
transform-origin: 0% 50%;
|
||||
max-width: fit-content;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
div.flexrow,
|
||||
input,
|
||||
.hexa {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
min-width: 1rem;
|
||||
min-height: 1rem;
|
||||
}
|
||||
|
||||
&.checked {
|
||||
&::after {
|
||||
content: " ";
|
||||
display: block;
|
||||
width: 0.8rem;
|
||||
height: 0.8rem;
|
||||
background: radial-gradient(circle, rgb(75, 74, 74) 0%, rgb(27, 39, 28) 60%);
|
||||
border-radius: 50%;
|
||||
;
|
||||
&>.flexrow {
|
||||
position: relative;
|
||||
max-width: fit-content;
|
||||
justify-content: center;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.hexa {
|
||||
text-align: center;
|
||||
clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
|
||||
background: radial-gradient(circle, rgba(255, 255, 255, 0.425) 0%, rgba(0, 0, 0, 0.288) 100%);
|
||||
max-height: 1.2rem;
|
||||
max-width: 1.2rem;
|
||||
aspect-ratio: 1/1;
|
||||
color: black;
|
||||
vertical-align: center;
|
||||
|
||||
&.checked {
|
||||
background: radial-gradient(circle, rgb(0, 0, 0) 0%, rgba(0, 0, 0, 0.288) 100%);
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
input[type="radio"] {
|
||||
opacity: 0;
|
||||
|
||||
|
||||
&::after,
|
||||
&::before {
|
||||
display: none
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
.window-app.vermineDialog {
|
||||
.window-content {
|
||||
background: url(/systems/vermine2047/assets/images/ui/box_background.webp) repeat;
|
||||
|
||||
}
|
||||
|
||||
.flexrow,
|
||||
.grid {
|
||||
justify-content: space-around;
|
||||
box-shadow: 0px 1px 10px rgba(0, 0, 0, 0.555);
|
||||
align-items: center;
|
||||
padding: 0.5rem 0.2rem;
|
||||
|
||||
&>* {
|
||||
margin: 0 0.3rem;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
label {
|
||||
font-family: "DistressBlack",
|
||||
sans-serif;
|
||||
font-size: larger;
|
||||
|
||||
}
|
||||
|
||||
select {
|
||||
max-width: fit-content;
|
||||
|
||||
option {
|
||||
max-width: fit-content
|
||||
}
|
||||
}
|
||||
|
||||
.dialog-buttons {
|
||||
button {
|
||||
display: block;
|
||||
flex: 0.3
|
||||
}
|
||||
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
flex-direction: row;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
.sheet.item.vermine2047 {
|
||||
.window-content {
|
||||
.flexrow {
|
||||
align-items: center;
|
||||
box-shadow: 0px 5px 10px 0px black;
|
||||
margin: 1rem;
|
||||
}
|
||||
|
||||
header,
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5 {
|
||||
background: 50% 50%/cover no-repeat url(/systems/vermine2047/assets/images/ui/scotch.webp);
|
||||
text-transform: uppercase;
|
||||
font-family: "DistressBlack";
|
||||
margin-top: 1rem;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
h2,
|
||||
h3,
|
||||
h4 {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
h5 {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.resource {
|
||||
border: none;
|
||||
border-left: 1px solid gray;
|
||||
padding: 0.2rem 1rem;
|
||||
text-align: center;
|
||||
|
||||
.flexrow {
|
||||
min-width: 5rem;
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
.damages-row {
|
||||
margin: 0;
|
||||
|
||||
.radios {
|
||||
margin: 0;
|
||||
padding: 0.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
.damage-pannes,
|
||||
.damage-state,
|
||||
.damage-effect {
|
||||
text-align: center;
|
||||
font-family: "DistressBlack";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -23,7 +23,6 @@ ol#chat-log {
|
||||
margin-top: 1rem;
|
||||
border-bottom: none;
|
||||
font-weight: 900;
|
||||
font-weight: 900;
|
||||
background: 50% 0%/cover no-repeat url(/systems/vermine2047/assets/images/ui/scotch.webp);
|
||||
|
||||
&+span {
|
||||
@@ -48,35 +47,42 @@ ol#chat-log {
|
||||
}
|
||||
|
||||
h4 {
|
||||
text-align: end;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
div.roll-total {
|
||||
transform: rotate(-3deg) scale(1.3) translateX(2rem) translateY(0.5rem);
|
||||
transform: rotate(-3deg) scale(1.2) translateX(2rem) translateY(0.5rem);
|
||||
background: url(/systems/vermine2047/assets/images/ui/scotch.webp);
|
||||
background-position: center;
|
||||
background-size: 200%;
|
||||
margin-bottom: 2rem;
|
||||
padding: 0;
|
||||
z-index: +1;
|
||||
width: 75%;
|
||||
}
|
||||
|
||||
div.reroll {
|
||||
button {
|
||||
text-transform: uppercase;
|
||||
font-family: "DistressBlack";
|
||||
margin-top: 1rem;
|
||||
box-shadow: 0px 0px 3px black;
|
||||
padding: 0 1rem;
|
||||
max-width: fit-content;
|
||||
box-shadow: 0px 0px 2px black;
|
||||
background: 50% 0%/cover no-repeat url(/systems/vermine2047/assets/images/ui/scotch.webp);
|
||||
|
||||
}
|
||||
|
||||
padding: 0 2rem;
|
||||
padding-bottom: 2rem;
|
||||
transition:0.3s;
|
||||
max-height:1px;
|
||||
overflow: hidden;
|
||||
justify-content: end;
|
||||
text-align: center;
|
||||
align-items: center;
|
||||
|
||||
&.visible {
|
||||
max-height: 15rem;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,140 @@
|
||||
input[type="range"] {
|
||||
appearance: none;
|
||||
background: transparent;
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
|
||||
}
|
||||
|
||||
input[type="range"]::-webkit-slider-runnable-track {
|
||||
background: url(../assets/images/ui/scotch.webp) no-repeat center;
|
||||
background-size: 100% auto;
|
||||
height: 0.4rem;
|
||||
border: none;
|
||||
box-shadow: 0px 0px 13px rgba(31, 26, 26, 0.979) inset;
|
||||
}
|
||||
|
||||
input[type="range"]::-webkit-slider-thumb {
|
||||
|
||||
appearance: none;
|
||||
margin-top: -0.3rem;
|
||||
/* Centers thumb on the track */
|
||||
height: 1rem;
|
||||
width: 1rem;
|
||||
border: none;
|
||||
border-radius: 50%;
|
||||
background: url(/systems/vermine2047/assets/images/ui/totems/human.webp);
|
||||
background-size: cover;
|
||||
filter: contrast(2);
|
||||
box-shadow: 0px 0px 10px black
|
||||
}
|
||||
|
||||
input[type="range"]:focus::-webkit-slider-thumb {
|
||||
box-shadow: 0px 0px 10px yellow
|
||||
}
|
||||
|
||||
select {
|
||||
border: none;
|
||||
background: url(../assets/images/ui/scotch.webp);
|
||||
background-size: 100% 100%;
|
||||
box-shadow: 0px 0px 3px rgba(31, 26, 26, 0.979) inset;
|
||||
|
||||
&[disabled] {
|
||||
color: rgb(0, 0, 0);
|
||||
text-shadow: 0px 0px 15px black;
|
||||
}
|
||||
|
||||
option {
|
||||
appearance: none;
|
||||
border: none;
|
||||
background: url(../assets/images/ui/scotch.webp);
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
}
|
||||
|
||||
input[type="checkbox"],
|
||||
input[type="radio"] {
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
background: transparent;
|
||||
box-shadow: 0px 0px 3px rgb(133, 133, 78);
|
||||
cursor: pointer;
|
||||
width: 1.5rem;
|
||||
height: 1rem;
|
||||
border-radius: 0.4rem;
|
||||
transition: 0.3s;
|
||||
clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
|
||||
box-shadow: 0px 0px 6px black inset;
|
||||
background-color: rgba(61, 11, 11, 0.658);
|
||||
|
||||
&[disabled="true"] {
|
||||
filter: grayscale(1)
|
||||
}
|
||||
|
||||
&:after {
|
||||
content: " ";
|
||||
background: url(/systems/vermine2047/assets/images/ui/totems/human.webp);
|
||||
background-size: 50% 150%;
|
||||
background-repeat: no-repeat;
|
||||
position: relative;
|
||||
top: 10%;
|
||||
left: 0%;
|
||||
width: 100%;
|
||||
height: 80%;
|
||||
display: block;
|
||||
border-radius: 0%;
|
||||
padding: 0;
|
||||
transition: 0.3s;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
&:checked {
|
||||
background-color: rgba(26, 107, 12, 0.658);
|
||||
|
||||
|
||||
&:after {
|
||||
font-weight: 900;
|
||||
background-color: rgba(26, 1, 1, 0);
|
||||
left: 50%;
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
input[type="radio"] {
|
||||
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
|
||||
&:after {
|
||||
width: 0.8rem;
|
||||
background-size: 100% 100%;
|
||||
top: 5%;
|
||||
left: 5%;
|
||||
width: 90%;
|
||||
height: 90%;
|
||||
background-size: 30% 30%;
|
||||
background-position: center;
|
||||
|
||||
}
|
||||
|
||||
&:not([disabled]):hover::after {
|
||||
background-size: 90% 90%;
|
||||
|
||||
}
|
||||
|
||||
&:checked::after {
|
||||
content: "";
|
||||
background-size: 70% 70%;
|
||||
top: 5%;
|
||||
left: 5%;
|
||||
position: relative;
|
||||
background-color: rgba(26, 1, 1, 0);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,113 @@
|
||||
@import "./base_work.scss";
|
||||
@import "./style.scss";
|
||||
@import "./roll.scss"
|
||||
@import "./roll.scss";
|
||||
@import "item-sheet.scss";
|
||||
@import "dialog.scss";
|
||||
@import "special-inputs.scss";
|
||||
|
||||
|
||||
// overwrites variables
|
||||
:root {
|
||||
--color-text-light-highlight: #b0d9b0;
|
||||
--color-text-light-heading: #9fc7d8;
|
||||
--color-text-light-primary: #a4b5b3;
|
||||
--color-text-dark-primary: #131919;
|
||||
--color-text-dark-secondary: #444b4a;
|
||||
--color-text-dark-header: #1d2223;
|
||||
--color-text-dark-inactive: #71797a;
|
||||
--color-text-hyperlink: #0064ff;
|
||||
--color-text-light-0: #fff;
|
||||
--color-text-light-1: #e0f0f0;
|
||||
--color-text-light-2: #c0e0e0;
|
||||
--color-text-light-3: #a0d0d0;
|
||||
--color-text-light-4: #80c0c0;
|
||||
--color-text-light-5: #60b0b0;
|
||||
--color-text-light-6: #40a0a0;
|
||||
--color-text-light-7: #208080;
|
||||
--color-text-dark-1: #111;
|
||||
--color-text-dark-2: #222;
|
||||
--color-text-dark-3: #444;
|
||||
--color-text-dark-4: #555;
|
||||
--color-text-dark-5: #666;
|
||||
--color-text-dark-6: #777;
|
||||
--color-border-light-1: #b0d9b0;
|
||||
--color-border-light-2: #80c0c0;
|
||||
--color-border-dark-1: #131919;
|
||||
--color-border-dark-2: #1d2223;
|
||||
--color-border-dark-3: #2d3333;
|
||||
--color-border-dark-4: #3d4444;
|
||||
--color-border-dark-5: #668888;
|
||||
--color-shadow-primary: #0000ff;
|
||||
--color-shadow-highlight: #0064ff;
|
||||
--color-shadow-dark: #000;
|
||||
--color-underline-inactive: #71797a;
|
||||
--color-underline-active: #1a1944;
|
||||
--color-underline-header: #222782;
|
||||
--color-border-light-highlight: #b0d9b0;
|
||||
--color-border-light-primary: #a4b5b3;
|
||||
--color-border-light-secondary: #9fc7d8;
|
||||
--color-border-light-tertiary: #71797a;
|
||||
--color-border-dark: #000;
|
||||
--color-border-dark-primary: #131919;
|
||||
--color-border-dark-secondary: #1d2223;
|
||||
--color-border-dark-tertiary: #444b4a;
|
||||
--color-border-highlight: #0064ff;
|
||||
--color-border-highlight-alt: #0000ff;
|
||||
--color-bg-btn-minor-inactive: #9fc7d8;
|
||||
--color-bg-btn-minor-active: #a4b5b3;
|
||||
--color-bg-option: #ccdada;
|
||||
--color-checkbox-checked: #666;
|
||||
--color-ownership-none: #00ff55;
|
||||
--color-ownership-observer: #71797a;
|
||||
--color-ownership-owner: #a4b5b3;
|
||||
--z-index-canvas: 0;
|
||||
--z-index-app: 30;
|
||||
--z-index-ui: 60;
|
||||
--z-index-window: 100;
|
||||
--z-index-tooltip: 9999;
|
||||
--sidebar-width: 300px;
|
||||
--sidebar-header-height: 32px;
|
||||
--sidebar-item-height: 48px;
|
||||
--hotbar-height: 52px;
|
||||
--hotbar-width: 578px;
|
||||
--macro-size: 50px;
|
||||
--players-width: 200px;
|
||||
--form-field-height: 26px;
|
||||
--font-primary: "Signika", sans-serif;
|
||||
--font-mono: monospace;
|
||||
--font-awesome: "Font Awesome 6 Pro";
|
||||
--font-size-11: 0.6875rem;
|
||||
--font-size-12: 0.75rem;
|
||||
--font-size-13: 0.8125rem;
|
||||
--font-size-14: 0.875rem;
|
||||
--font-size-16: 1rem;
|
||||
--font-size-18: 1.125rem;
|
||||
--font-size-20: 1.25rem;
|
||||
--font-size-24: 1.5rem;
|
||||
--font-size-28: 1.75rem;
|
||||
--font-size-32: 2rem;
|
||||
--font-size-48: 3rem;
|
||||
--line-height-12: 0.75rem;
|
||||
--line-height-16: 1rem;
|
||||
--line-height-20: 1.25rem;
|
||||
--line-height-30: 1.875rem;
|
||||
--color-level-info: #b95c87;
|
||||
--color-level-warning: #04b184;
|
||||
--color-level-error: #03750;
|
||||
--color-level-success: #3c266c;
|
||||
}
|
||||
|
||||
/* ----------------------------------------- */
|
||||
/* Scrollbar
|
||||
/* ----------------------------------------- */
|
||||
::-webkit-scrollbar-thumb {
|
||||
outline: none;
|
||||
border-radius: 3px;
|
||||
background: #577822;
|
||||
border: 1px solid var(--color-border-highlight);
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 3px;
|
||||
height: 3px;
|
||||
}
|
||||
@@ -136,6 +136,33 @@
|
||||
"category": "social"
|
||||
}
|
||||
},
|
||||
"skill_categories": {
|
||||
"preferred": "",
|
||||
"man": {
|
||||
"label": "VERMINE.skill_category.man",
|
||||
"preferred": false
|
||||
},
|
||||
"animal": {
|
||||
"label": "VERMINE.skill_category.animal",
|
||||
"preferred": false
|
||||
},
|
||||
"tool": {
|
||||
"label": "VERMINE.skill_category.tool",
|
||||
"preferred": false
|
||||
},
|
||||
"weapon": {
|
||||
"label": "VERMINE.skill_category.weapon",
|
||||
"preferred": false
|
||||
},
|
||||
"survival": {
|
||||
"label": "VERMINE.skill_category.survival",
|
||||
"preferred": false
|
||||
},
|
||||
"world": {
|
||||
"label": "VERMINE.skill_category.world",
|
||||
"preferred": false
|
||||
}
|
||||
},
|
||||
"skills": {
|
||||
"arts": {
|
||||
"value": 0,
|
||||
|
||||
@@ -1,10 +1,21 @@
|
||||
<form class="{{cssClass}} {{actor.type}} flexcol form" autocomplete="off">
|
||||
|
||||
<div class="form">
|
||||
{{log this}}
|
||||
<aside>
|
||||
<div class="flexrow" id="edit">
|
||||
<span>mode jeu</span>
|
||||
<input type="checkbox" name="flags.world.editMode"
|
||||
{{#if actor.flags.world.editMode}}
|
||||
checked
|
||||
{{/if}} />
|
||||
<span>mode edit</span>
|
||||
|
||||
</div>
|
||||
<img class="logo mx-auto"
|
||||
src="systems/vermine2047/assets/images/ui/logo.webp" width="200"
|
||||
alt="logo Vermine" />
|
||||
|
||||
<div class="sidebar" data-group="dashboard" data-tab="sidebar">
|
||||
<!--ID -->
|
||||
{{> "systems/vermine2047/templates/actor/character/character-id.hbs"}}
|
||||
|
||||
@@ -1,71 +1,93 @@
|
||||
<div class="grid grid-2col">
|
||||
<div>
|
||||
<h4 class="align-center">{{ localize "VERMINE.self_control"}} :
|
||||
<div class="self-control-container">
|
||||
<h4 class="align-center">
|
||||
<a class="min-max-edit" data-prop="system.attributes.effort">
|
||||
<i class="fas fa-cogs"> </i>
|
||||
</a>
|
||||
|
||||
{{ localize "VERMINE.self_control"}} :
|
||||
{{@root.system.attributes.self_control.value}}/
|
||||
{{@root.system.attributes.self_control.max}}
|
||||
</h4>
|
||||
{{setVar "SCIndex" 1}}
|
||||
<div class="reserve-grid">
|
||||
{{#repeat 4 1 "row"}}
|
||||
|
||||
<div class="flexrow">
|
||||
{{#repeat 10 1}}
|
||||
<div class="hexa
|
||||
{{#iflteq @index @root.system.attributes.self_control.value }}
|
||||
<div class="flexrow">
|
||||
{{#repeat @row @root.SCIndex "case"}}
|
||||
{{log @root.SCIndex}}
|
||||
<div class="hexa
|
||||
{{#iflteq @case @root.system.attributes.self_control.value }}
|
||||
checked
|
||||
{{/iflteq}}
|
||||
{{#ifgt @index @root.system.attributes.self_control.max }}
|
||||
{{/iflteq}}
|
||||
{{#ifgt @case @root.system.attributes.self_control.max }}
|
||||
unavailable
|
||||
{{/ifgt}}">
|
||||
{{#iflteq @index @root.system.attributes.self_control.max }}
|
||||
<input type="radio" data-dtype="Number"
|
||||
name="system.attributes.self_control.value"
|
||||
value="{{@index}}" {{#ife @root.system.attributes.self_control.value
|
||||
@index
|
||||
}}checked="checked"{{/ife}}
|
||||
class="
|
||||
{{#iflteq @index @root.system.attributes.self_control.max }}
|
||||
{{/ifgt}}">
|
||||
{{#iflteq @row @root.system.attributes.self_control.max }}
|
||||
<input type="radio" data-dtype="Number"
|
||||
name="system.attributes.self_control.value"
|
||||
value="{{@case}}" {{#ife
|
||||
@root.system.attributes.self_control.value
|
||||
@root.selfControlIndex
|
||||
}}checked="checked"{{/ife}}
|
||||
class="
|
||||
{{#iflteq @case @root.system.attributes.self_control.max }}
|
||||
checked
|
||||
{{/iflteq}}
|
||||
|
||||
" />
|
||||
{{/iflteq}}
|
||||
|
||||
" />
|
||||
{{/iflteq}}
|
||||
|
||||
</div>
|
||||
{{setVar "SCIndex" (math_add @root.SCIndex 1)}}
|
||||
{{/repeat}}
|
||||
</div>
|
||||
{{/repeat}}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4 class="align-center">{{ localize "VERMINE.effort"}} :
|
||||
<div class="effort-container">
|
||||
<h4 class="align-center">
|
||||
<a class="min-max-edit" data-prop="system.attributes.effort">
|
||||
<i class="fas fa-cogs"></i>
|
||||
</a>
|
||||
{{ localize "VERMINE.effort"}} :
|
||||
{{@root.system.attributes.effort.value}}/
|
||||
{{@root.system.attributes.effort.max}}
|
||||
</h4>
|
||||
{{setVar "EffIndex" 1}}
|
||||
|
||||
<div class="flexrow">
|
||||
{{#repeat 10 1}}
|
||||
<div
|
||||
class="hexa
|
||||
{{#iflteq @index @root.system.attributes.effort.value }}
|
||||
<div class="reserve-grid">
|
||||
{{#repeat 4 1 "row"}}
|
||||
|
||||
<div class="flexrow">
|
||||
{{#repeat @row @root.EffIndex "case"}}
|
||||
{{log @root.EffIndex}}
|
||||
<div class="hexa
|
||||
{{#iflteq @case @root.system.attributes.effort.value }}
|
||||
checked
|
||||
{{/iflteq}}
|
||||
{{#ifgt @index @root.system.attributes.effort.max }}
|
||||
{{/iflteq}}
|
||||
{{#ifgt @case @root.system.attributes.effort.max }}
|
||||
unavailable
|
||||
{{/ifgt}}">
|
||||
{{#iflteq @index @root.system.attributes.effort.max }}
|
||||
<input type="radio" data-dtype="Number"
|
||||
name="system.attributes.effort.value"
|
||||
value="{{@index}}" {{#ife @root.system.attributes.effort.value
|
||||
@index
|
||||
}}checked="checked"{{/ife}}
|
||||
class="
|
||||
{{#iflteq @index @root.system.attributes.effort.value }}
|
||||
{{/ifgt}}">
|
||||
{{#iflteq @row @root.system.attributes.effort.max }}
|
||||
<input type="radio" data-dtype="Number"
|
||||
name="system.attributes.effort.value"
|
||||
value="{{@case}}" {{#ife
|
||||
@root.system.attributes.effort.value
|
||||
@root.selfControlIndex
|
||||
}}checked="checked"{{/ife}}
|
||||
class="
|
||||
{{#iflteq @case @root.system.attributes.effort.max }}
|
||||
checked
|
||||
{{/iflteq}}
|
||||
|
||||
" />
|
||||
{{/iflteq}}
|
||||
|
||||
" />
|
||||
{{/iflteq}}
|
||||
|
||||
</div>
|
||||
{{setVar "EffIndex" (math_add @root.EffIndex 1)}}
|
||||
{{/repeat}}
|
||||
</div>
|
||||
{{#ife @index 1}}
|
||||
<br />
|
||||
{{/ife}}
|
||||
{{/repeat}}
|
||||
</div>
|
||||
</div>
|
||||
@@ -77,7 +99,7 @@
|
||||
data-tooltip="seuil">({{
|
||||
system.minorWound.threshold }})</span>
|
||||
<div class="flexrow">
|
||||
{{#repeat system.minorWound.max 1}}
|
||||
{{#repeat system.minorWound.max 1 "minorwoundmax"}}
|
||||
<div class="hexa ability{{#iflteq @index @root.system.minorWound.value }}
|
||||
checked
|
||||
{{/iflteq}}">
|
||||
@@ -98,7 +120,7 @@
|
||||
<span>({{
|
||||
system.majorWound.threshold }})</span>
|
||||
<div class="flexrow">
|
||||
{{#repeat system.majorWound.max 1}}
|
||||
{{#repeat system.majorWound.max 1 majourwoundmax}}
|
||||
<div class="hexa ability{{#iflteq @index @root.system.majorWound.value }}
|
||||
checked
|
||||
{{/iflteq}}">
|
||||
@@ -119,7 +141,7 @@
|
||||
<li class="row mdb">{{ localize 'VERMINE.wounds.deadly'}}
|
||||
<span>({{system.deadlyWound.threshold }})</span>
|
||||
<div class="flexrow">
|
||||
{{#repeat system.deadlyWound.max 1}}
|
||||
{{#repeat system.deadlyWound.max 1 "deadlywoundmax"}}
|
||||
<div class="hexa ability{{#iflteq @index @root.system.deadlyWound.value }}
|
||||
checked
|
||||
{{/iflteq}}">
|
||||
|
||||
@@ -15,14 +15,25 @@
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
<h3>Compétences</h3>
|
||||
<div class="grid grid-2col">
|
||||
{{#each config.skillCategories as |skillCategory sckey|}}
|
||||
<div class="col">
|
||||
<h4>{{ smarttl "SKILLS_CATEGORIES" sckey }}</h4>
|
||||
{{#each system.skill_categories as |skillCategory sckey|}}
|
||||
{{#if skillCategory.label}}
|
||||
<div class="col
|
||||
{{#ife sckey @root.system.skill_categories.preferred}}
|
||||
preferred
|
||||
{{/ife}}">
|
||||
<h4>{{ smarttl "SKILLS_CATEGORIES" sckey }}
|
||||
<input type="radio" data-tooltip="domaine de prédilection ?"
|
||||
name="system.skill_categories.preferred" value="{{sckey}}"
|
||||
{{#ife sckey @root.system.skill_categories.preferred}}
|
||||
checked
|
||||
{{/ife}}>
|
||||
</h4>
|
||||
{{#each @root.system.skills as |skill skey|}}
|
||||
|
||||
{{#if (eq skill.category sckey) }}
|
||||
@@ -36,7 +47,11 @@
|
||||
|
||||
</label>
|
||||
<div class="specialties">
|
||||
{{#each @root.specialties as |spe ind|}}
|
||||
{{#ifgt skill.value 1}}
|
||||
<i class="fas fa-add add-specialty"
|
||||
data-tooltip="ajout de spécialité"></i>
|
||||
{{/ifgt}}
|
||||
{{#each skill.specialties as |spe ind|}}
|
||||
{{#ife spe.system.skill skey}}
|
||||
<i class="specialty"
|
||||
data-tooltip="spécialité utilisable">{{spe.name}}</i>
|
||||
@@ -53,11 +68,11 @@
|
||||
</select>
|
||||
<span class="hexa">{{skill.value}}</span>
|
||||
<div class="skill-dots flexrow">
|
||||
{{#repeat (skillLevel "dicePool" skill.value) 0}}
|
||||
{{#repeat (skillLevel "dicePool" skill.value) 0 "dicepool"}}
|
||||
<div class="dice-pool-dot"
|
||||
data-tooltip="{{localize "VERMINE.pool"}}"></div>
|
||||
{{/repeat}}
|
||||
{{#repeat (skillLevel "reroll" skill.value) 0}}
|
||||
{{#repeat (skillLevel "reroll" skill.value) 0 "dicereroll"}}
|
||||
<div class="dice-reroll-dot"
|
||||
data-tooltip="{{localize "VERMINE.reroll"}}">X</div>
|
||||
{{/repeat}}
|
||||
@@ -68,5 +83,6 @@
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</div>
|
||||
@@ -10,19 +10,21 @@
|
||||
major
|
||||
{{/ifgt}}
|
||||
">{{localize "TOTEMS.human.name"}}
|
||||
<img src="/systems/vermine2047/assets/images/ui/totems/human.webp" />
|
||||
<img class="img-totem"
|
||||
src="/systems/vermine2047/assets/images/ui/totems/human.webp" />
|
||||
</h5>
|
||||
|
||||
<h5 class="adapted
|
||||
{{#ifgt system.adaptation.totems.human.value system.adaptation.totems.adapted.value}}
|
||||
{{#ifgt system.adaptation.totems.adapted.value system.adaptation.totems.human.value}}
|
||||
major
|
||||
{{/ifgt}}">{{localize "TOTEMS.adapted.name"}}
|
||||
<img src="/systems/vermine2047/assets/images/ui/totems/adapted.webp" />
|
||||
<img class="img-totem"
|
||||
src="/systems/vermine2047/assets/images/ui/totems/adapted.webp" />
|
||||
</h5>
|
||||
|
||||
<div class="totem-dice flexrow flex-group-center">
|
||||
<div class="human-dice flexrow">
|
||||
{{#repeat system.adaptation.totems.human.max 1}}
|
||||
{{#repeat system.adaptation.totems.human.max 1 "humantotem"}}
|
||||
<div class="hexa" data-totem-name="human" data-totem-value="{{@index}}">
|
||||
{{#ifgteq system.adaptation.totems.human.value @index}}
|
||||
<div class="human-die"><i class="fas fa-dice-d10"></i></div>
|
||||
@@ -32,7 +34,7 @@
|
||||
</div>
|
||||
|
||||
<div class="adapted-dice flexrow">
|
||||
{{#repeat system.adaptation.totems.adapted.max 1}}
|
||||
{{#repeat system.adaptation.totems.adapted.max 1 "adaptedtotem"}}
|
||||
<div class="hexa" data-totem-name="adapted" data-totem-value="{{@index}}">
|
||||
{{#ifgteq system.adaptation.totems.adapted.value @index}}
|
||||
<div class="adapted-die"><i class="fas fa-dice-d10"></i></div>
|
||||
@@ -48,6 +50,7 @@
|
||||
<div class="flexcol flex-group-center items-center w-full">
|
||||
<h4>{{ smarttl 'TOTEMS' system.identity.totem 'name' }}</h4>
|
||||
<img
|
||||
class="img-totem"
|
||||
src="/systems/vermine2047/assets/images/ui/totems/{{ system.identity.totem }}.webp"
|
||||
alt="{{ smarttl 'TOTEMS' system.identity.totem 'name' }}" width="80"
|
||||
height="80" />
|
||||
|
||||
@@ -1,21 +1,35 @@
|
||||
{{#if system.identity.totem}}
|
||||
|
||||
<h4 class="align-center">
|
||||
{{ smarttl 'TOTEMS' system.identity.totem 'name' }}
|
||||
</h4>
|
||||
<p style="font-size:80%;">{{ smarttlk "TOTEMS" system.identity.totem
|
||||
"description"}}</p>
|
||||
<div class="grid grid-2col">
|
||||
<div class>
|
||||
<div class="item-name"><strong>Principes</strong><br />{{ smarttlk "TOTEMS"
|
||||
system.identity.totem "instincts"}}</div>
|
||||
</div>
|
||||
<div class>
|
||||
<div class="item-name"><strong>Interdits</strong><br />{{ smarttlk "TOTEMS"
|
||||
system.identity.totem "bans"}}</div>
|
||||
<div class="totem-details">
|
||||
<img
|
||||
class="img-totem"
|
||||
src="/systems/vermine2047/assets/images/ui/totems/{{ system.identity.totem }}.webp"
|
||||
alt="{{ smarttl 'TOTEMS' system.identity.totem 'name' }}" width="80"
|
||||
height="80" />
|
||||
<h4 class="align-center">
|
||||
{{ smarttl 'TOTEMS' system.identity.totem 'name' }}
|
||||
</h4>
|
||||
<p style="font-size:80%;">{{ smarttlk "TOTEMS" system.identity.totem
|
||||
"description"}}</p>
|
||||
<div class="grid grid-2col">
|
||||
<div class>
|
||||
<div class="item-name"><strong>Principes</strong><br />{{ smarttlk
|
||||
"TOTEMS"
|
||||
system.identity.totem "instincts"}}</div>
|
||||
</div>
|
||||
<div class>
|
||||
<div class="item-name"><strong>Interdits</strong><br />{{ smarttlk
|
||||
"TOTEMS"
|
||||
system.identity.totem "bans"}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
{{else}}
|
||||
|
||||
<h3>choisissez un totem</h3>
|
||||
|
||||
{{/if}}
|
||||
<div class="grid grid-2col">
|
||||
<div>
|
||||
<h4>
|
||||
@@ -129,8 +143,3 @@
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
|
||||
<h3>choisissez un totem</h3>
|
||||
|
||||
{{/if}}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<h2>edit {{actorName}} : {{propName}}</h2>
|
||||
@@ -0,0 +1,193 @@
|
||||
<form id="dice-pool-form" class="vermine form"
|
||||
data-actor-id="{{ speakerId }}">
|
||||
{{log this}}
|
||||
<input type="hidden" name="label" id="label" value="{{ label }}" />
|
||||
<input type="hidden" name="rollType" id="rollType" value="{{ rollType }}" />
|
||||
<input type="hidden" name="abilityScore" id="abilityScore"
|
||||
value="{{ abilityScore }}" />
|
||||
<input type="hidden" name="skillScore" id="skillScore"
|
||||
value="{{ skillScore }}" />
|
||||
<div class="dice-pool flexcol">
|
||||
<h1 class="flexrow row lgb flex-group-center">
|
||||
<span>Type de jet <strong>{{#if (eq rollType 'skill')}}{{ localize
|
||||
'VERMINE.skill_title' }}{{else}}{{ localize 'VERMINE.ability'
|
||||
}}{{/if}}</strong></span>
|
||||
|
||||
</h1>
|
||||
|
||||
<div class="flexrow">
|
||||
<label class="label">{{localize
|
||||
'VERMINE.difficulty'}}</label>
|
||||
<select class="info-value" data-roll="tue"
|
||||
data-dtype="String"
|
||||
type="number" name="difficulty" id="difficulty" min="3" max="10">
|
||||
{{#select difficulty }}
|
||||
<option value="{{ diffLevel 'difficulty' 1}}">{{ diffLevel 'label' 1}} -
|
||||
{{ diffLevel 'difficulty' 1}}</option>
|
||||
<option value="{{ diffLevel 'difficulty' 2}}">{{ diffLevel 'label' 2}} -
|
||||
{{ diffLevel 'difficulty' 2}}</option>
|
||||
<option value="{{ diffLevel 'difficulty' 3}}" selected>{{ diffLevel
|
||||
'label' 3}} - {{ diffLevel 'difficulty' 3}}</option>
|
||||
<option value="{{ diffLevel 'difficulty' 4}}">{{ diffLevel 'label' 4}} -
|
||||
{{ diffLevel 'difficulty' 4}}</option>
|
||||
<option value="{{ diffLevel 'difficulty' 5}}">{{ diffLevel 'label' 5}} -
|
||||
{{ diffLevel 'difficulty' 5}}</option>
|
||||
{{/select}}
|
||||
</select>
|
||||
<label for="handicap">Handicap</label>
|
||||
<select class="info-value" data-roll="tue"
|
||||
data-dtype="String"
|
||||
type="number" name="handicap" id="handicap" min="0" max="2">
|
||||
{{#select difficulty }}
|
||||
<option value="1" selected>aucun</option>
|
||||
<option value="2">(I)</option>
|
||||
<option value="3">(II)</option>
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
<div class="flexrow ">
|
||||
<h2 class="flexcol">
|
||||
<label class="label">{{localize
|
||||
'VERMINE.ability'}}</label>
|
||||
<select class="info-value" data-roll="true"
|
||||
data-dtype="String"
|
||||
type="number" name="ability" id="ability" min="1" max="5">
|
||||
<option value="0">-- Choisissez une caractéristique
|
||||
--</option>
|
||||
{{#each config.abilityCategories as |abilCategory catkey|}}
|
||||
|
||||
<optgroup label="{{ smarttlk 'ABILITY_CATEGORIES' catkey 'name' }}">
|
||||
{{#each @root.actor.system.abilities as |abil key|}}
|
||||
{{#ife abil.category catkey}}
|
||||
<option value="{{abil.value}}"
|
||||
data-label="{{key}}"
|
||||
{{#ife @root.rollType "ability"}}
|
||||
{{#ife @root.labelKey key}}
|
||||
selected="true"
|
||||
{{/ife}}
|
||||
{{/ife}}>{{ smarttlk 'ABILITIES' key 'name'
|
||||
}} / {{abil.value}}</option>
|
||||
{{/ife}}
|
||||
{{/each}}
|
||||
|
||||
</optgroup>
|
||||
|
||||
{{/each}}
|
||||
</select>
|
||||
</h2>
|
||||
<h3 class="flexcol">
|
||||
<label class="label">{{localize
|
||||
'VERMINE.skill_title'}}</label>
|
||||
<select class="info-value" data-roll="true"
|
||||
data-dtype="String"
|
||||
type="number" name="skill" id="skill" min="1" max="5">
|
||||
<option>-- Choisissez une caractéristique
|
||||
--</option>
|
||||
{{#each config.skillCategories as |skillCategory catkey|}}
|
||||
|
||||
<optgroup label="{{ smarttlk 'SKILLS_CATEGORIES' catkey 'name' }}">
|
||||
{{#each @root.actor.system.skills as |skill key|}}
|
||||
{{#ife skill.category catkey}}
|
||||
<option value="{{skill.value}}" data-pool="{{skillLevel "dicePool"
|
||||
skill.value}}"
|
||||
data-label="{{key}}"
|
||||
data-reroll="{{skillLevel "reroll" skill.value}}"
|
||||
{{#ife @root.rollType "skill"}}
|
||||
{{#ife @root.labelKey key}}
|
||||
selected="true"
|
||||
{{/ife}}
|
||||
{{/ife}}>
|
||||
<b>{{ smarttlk 'SKILLS' key 'name' }},</b>
|
||||
<i>dés:{{skillLevel "dicePool" skill.value}},
|
||||
relances:{{skillLevel "reroll" skill.value}}</i>
|
||||
</option>
|
||||
{{/ife}}
|
||||
{{/each}}
|
||||
</optgroup>
|
||||
{{/each}}
|
||||
</select>
|
||||
<label class="label">{{localize 'VERMINE.specialty'}} (+1D)</label>
|
||||
<div class="flexrow">
|
||||
{{#each availableSpecialties as |spec ind|}}
|
||||
<span data-spec-skill="{{spec.system.skill}}">
|
||||
<i>{{spec.name}}</i>
|
||||
<input type="radio" data-roll="true" name="usingSpecialization"
|
||||
id="usingSpecialization"
|
||||
value="{{spec.name}}" {{#if specialty}}checked{{/if}}>
|
||||
</span>
|
||||
{{/each}}
|
||||
|
||||
</div>
|
||||
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="grid grid-2col">
|
||||
<div class="flexrow row smb">
|
||||
<label class="label">{{localize 'VERMINE.help'}} (+1D)</label>
|
||||
<input type="checkbox" data-roll="true" name="helped" id="helped"
|
||||
value="1" {{#if
|
||||
help}}checked{{/if}}>
|
||||
</div>
|
||||
<div class="flexrow row mdb">
|
||||
<label class="label">{{localize
|
||||
'VERMINE.group'}}</label>
|
||||
<input type="number" data-roll="true" class="numeric-entry"
|
||||
style="text-align: center;"
|
||||
name="group" id="group" min="0" max="5" value="0">
|
||||
</div>
|
||||
<div class="flexrow row mdb">
|
||||
<label class="label">{{localize
|
||||
'VERMINE.self_control'}} + <span id="self_control_value">0</span>D
|
||||
</label>
|
||||
<input type="range" id="self_control" data-roll="true"
|
||||
name="self_control"
|
||||
min="0"
|
||||
max="0" value="0" />
|
||||
</div>
|
||||
<div class="flexrow row mdb">
|
||||
<label class="label">{{localize 'VERMINE.tooling'}} (+1D)</label>
|
||||
<span>
|
||||
<i>Auncun</i>
|
||||
<input type="radio" data-roll="true" name="usingTools"
|
||||
id="usingTools" value="0" checked>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="item-list grid grid-4col">
|
||||
{{#each availableItems as |item ind|}}
|
||||
<span>
|
||||
<i>{{item.name}}</i>
|
||||
<input type="radio" data-roll="true" name="usingTools"
|
||||
id="usingTools"
|
||||
value="{{item.name}}">
|
||||
</span>
|
||||
{{/each}}
|
||||
</div>
|
||||
|
||||
<div class="flexrow">
|
||||
<label class="label">utiliser des dés totems ?
|
||||
</label>
|
||||
{{#ifgt @root.actor.system.adaptation.totems.human.value 0}}
|
||||
<div class="totem-human">
|
||||
<h4 for="human-totem">totem humain </h4>
|
||||
<input type="checkbox" data-roll="true" name="human-totem"
|
||||
id="human-totem"
|
||||
value="1">
|
||||
</div>
|
||||
{{/ifgt}}
|
||||
{{#ifgt @root.actor.system.adaptation.totems.adapted.value 0}}
|
||||
<div class="totem-adapted">
|
||||
<h4 for="human-totem">totem adapté </h4>
|
||||
<input type="checkbox" data-roll="true" name="adapted-totem"
|
||||
id="adapted-totem"
|
||||
value="1">
|
||||
</div>
|
||||
{{/ifgt}}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<p><input type="hidden" name="speakerId" value="{{ speakerId }}" />
|
||||
<input type="hidden" name="skillLabel" value="{{ skill }}" /></p>
|
||||
</form>
|
||||
@@ -61,5 +61,7 @@
|
||||
<h2>description</h2>
|
||||
{{editor system.description target="system.description" rollData=rollData button=true owner=owner editable=editable}}
|
||||
</div>
|
||||
{{> "systems/vermine2047/templates/item/partials/damages.html"}}
|
||||
|
||||
</section>
|
||||
</form>
|
||||
@@ -67,5 +67,6 @@
|
||||
<h2>Description</h2>
|
||||
{{editor system.description target="system.description" rollData=rollData button=true owner=owner editable=editable}}
|
||||
|
||||
{{> "systems/vermine2047/templates/item/partials/damages.html"}}
|
||||
</section>
|
||||
</form>
|
||||
@@ -28,9 +28,9 @@
|
||||
{{#ife skill.category sckey}}
|
||||
<option value="{{key}}">{{ smarttlk 'SKILLS' key 'name' }}</option>
|
||||
{{/ife}}
|
||||
{{/each}}
|
||||
</optgroup>
|
||||
{{/each}}
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
|
||||
|
||||
@@ -57,5 +57,7 @@
|
||||
<h2>Description</h2>
|
||||
{{editor system.description target="system.description" rollData=rollData button=true owner=owner editable=editable}}
|
||||
</div>
|
||||
{{> "systems/vermine2047/templates/item/partials/damages.html"}}
|
||||
|
||||
</section>
|
||||
</form>
|
||||
@@ -82,5 +82,7 @@
|
||||
<h2>description</h2>
|
||||
{{editor system.description target="system.description" rollData=rollData button=true owner=owner editable=editable}}
|
||||
</div>
|
||||
{{> "systems/vermine2047/templates/item/partials/damages.html"}}
|
||||
|
||||
</section>
|
||||
</form>
|
||||
@@ -0,0 +1,33 @@
|
||||
<h3>dommages</h3>
|
||||
<div class="damages-row flexrow">
|
||||
<div class="radios flexrow">
|
||||
{{#repeat system.damages.max 1 index}}
|
||||
<div class="hexa
|
||||
{{#ifgteq system.damages.value @index }}
|
||||
checked
|
||||
{{/ifgteq }}">
|
||||
<input
|
||||
type="radio"
|
||||
name="system.damages.value"
|
||||
value="{{@index}}"
|
||||
{{#ife system.damages.value @index }}
|
||||
checked="true"
|
||||
{{/ife }}
|
||||
>
|
||||
</div>
|
||||
{{/repeat}}
|
||||
</div>
|
||||
<div class="damage-pannes">
|
||||
<h4>pannes :</h4>
|
||||
{{getDamagesData system.damages "pannes"}}
|
||||
</div>
|
||||
<div class="damage-state">
|
||||
<h4>état :</h4>
|
||||
{{getDamagesData system.damages "state"}}
|
||||
</div>
|
||||
<div class="damage-effect">
|
||||
<h4> effets : </h4>
|
||||
{{getDamagesData system.damages "effect"}}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -1,168 +0,0 @@
|
||||
<form id="dice-pool-form" class="vermine form"
|
||||
data-actor-id="{{ speakerId }}">
|
||||
|
||||
<input type="hidden" name="label" id="label" value="{{ label }}" />
|
||||
<input type="hidden" name="rollType" id="rollType" value="{{ rollType }}" />
|
||||
<input type="hidden" name="abilityScore" id="abilityScore"
|
||||
value="{{ abilityScore }}" />
|
||||
<input type="hidden" name="skillScore" id="skillScore"
|
||||
value="{{ skillScore }}" />
|
||||
<div class="dice-pool flexcol">
|
||||
<div class="flexrow row lgb flex-group-center">
|
||||
<span>Type de jet <strong>{{#if (eq rollType 'skill')}}{{ localize
|
||||
'VERMINE.skill_title' }}{{else}}{{ localize 'VERMINE.ability'
|
||||
}}{{/if}}</strong></span>
|
||||
<span>{{#if (eq rollType 'skill')}}{{ localize 'VERMINE.skill_title'
|
||||
}}{{else}}{{ localize 'VERMINE.ability' }}{{/if}}
|
||||
<strong>{{#if (eq rollType 'skill')}}{{ smarttl "SKILLS" label
|
||||
}}{{else}}{{ smarttl "ABILITIES" label }}{{/if}}</strong> </span>
|
||||
</div>
|
||||
|
||||
<div class="flexrow form-group row mdb">
|
||||
<label class="label" style="flex: 60%;">{{localize
|
||||
'VERMINE.difficulty'}}</label>
|
||||
<select class="info-value" data-roll="tue" style="max-width: 40%;"
|
||||
data-dtype="String"
|
||||
type="number" name="difficulty" id="difficulty" min="3" max="10">
|
||||
{{#select difficulty }}
|
||||
<option value="{{ diffLevel 'difficulty' 1}}">{{ diffLevel 'label' 1}} -
|
||||
{{ diffLevel 'difficulty' 1}}</option>
|
||||
<option value="{{ diffLevel 'difficulty' 2}}">{{ diffLevel 'label' 2}} -
|
||||
{{ diffLevel 'difficulty' 2}}</option>
|
||||
<option value="{{ diffLevel 'difficulty' 3}}" selected>{{ diffLevel
|
||||
'label' 3}} - {{ diffLevel 'difficulty' 3}}</option>
|
||||
<option value="{{ diffLevel 'difficulty' 4}}">{{ diffLevel 'label' 4}} -
|
||||
{{ diffLevel 'difficulty' 4}}</option>
|
||||
<option value="{{ diffLevel 'difficulty' 5}}">{{ diffLevel 'label' 5}} -
|
||||
{{ diffLevel 'difficulty' 5}}</option>
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
<div class="flexrow row mdb">
|
||||
<label class="label" style="flex: 60%;">{{localize
|
||||
'VERMINE.ability'}}</label>
|
||||
<select class="info-value" data-roll="true" style="max-width: 40%;"
|
||||
data-dtype="String"
|
||||
type="number" name="ability" id="ability" min="1" max="5">
|
||||
<option value="0">-- Choisissez une caractéristique
|
||||
--</option>
|
||||
{{#each config.abilityCategories as |abilCategory catkey|}}
|
||||
|
||||
<optgroup label="{{ smarttlk 'ABILITY_CATEGORIES' catkey 'name' }}">
|
||||
{{#each @root.actor.system.abilities as |abil key|}}
|
||||
{{#ife abil.category catkey}}
|
||||
<option value="{{abil.value}}"
|
||||
{{#ife @root.rollType "ability"}}
|
||||
{{#ife @root.labelKey key}}
|
||||
selected="true"
|
||||
{{/ife}}
|
||||
{{/ife}}>{{ smarttlk 'ABILITIES' key 'name'
|
||||
}} / {{abil.value}}</option>
|
||||
{{/ife}}
|
||||
{{/each}}
|
||||
|
||||
</optgroup>
|
||||
|
||||
{{/each}}
|
||||
</select>
|
||||
</div>
|
||||
<div class="flexrow row mdb">
|
||||
<label class="label" style="flex: 60%;">{{localize
|
||||
'VERMINE.skill_title'}}</label>
|
||||
<select class="info-value" data-roll="true" style="max-width: 40%;"
|
||||
data-dtype="String"
|
||||
type="number" name="skill" id="skill" min="1" max="5">
|
||||
<option>-- Choisissez une caractéristique
|
||||
--</option>
|
||||
{{#each config.skillCategories as |skillCategory catkey|}}
|
||||
|
||||
<optgroup label="{{ smarttlk 'SKILLS_CATEGORIES' catkey 'name' }}">
|
||||
{{#each @root.actor.system.skills as |skill key|}}
|
||||
{{#ife skill.category catkey}}
|
||||
<option value="{{skill.value}}" data-pool="{{skillLevel "dicePool"
|
||||
skill.value}}"
|
||||
data-reroll="{{skillLevel "reroll" skill.value}}"
|
||||
{{#ife @root.rollType "skill"}}
|
||||
{{#ife @root.labelKey key}}
|
||||
selected="true"
|
||||
{{/ife}}
|
||||
{{/ife}}>
|
||||
<b>{{ smarttlk 'SKILLS' key 'name' }},</b>
|
||||
<i>dés:{{skillLevel "dicePool" skill.value}},
|
||||
relances:{{skillLevel "reroll" skill.value}}</i>
|
||||
</option>
|
||||
{{/ife}}
|
||||
{{/each}}
|
||||
|
||||
</optgroup>
|
||||
|
||||
{{/each}}
|
||||
</select>
|
||||
</div>
|
||||
<div class="flexrow row lgb">
|
||||
<span id="skillLevel">{{#if (ne skillScore 0)}}{{ skillLevel 'label'
|
||||
skillScore }}{{/if}}</span>
|
||||
<span>{{localize 'VERMINE.bonus'}} : <em id="skillDicePool">{{#if (ne
|
||||
skillScore 0)}}{{ skillLevel 'dicePool' skillScore
|
||||
}}{{else}}0{{/if}}</em></span>
|
||||
<span>{{localize 'VERMINE.reroll'}} : <em id="skillReroll">{{#if (ne
|
||||
skillScore 0)}}{{ skillLevel 'reroll' skillScore
|
||||
}}{{else}}0{{/if}}</em></span>
|
||||
</div>
|
||||
<div class="flexrow row smb">
|
||||
<label class="label">{{localize 'VERMINE.specialty'}} (+1D)</label>
|
||||
<input type="checkbox" data-roll="true" name="usingSpecialization"
|
||||
id="usingSpecialization"
|
||||
value="1" {{#if specialty}}checked{{/if}}>
|
||||
</div>
|
||||
<div class="flexrow row smb">
|
||||
<label class="label">{{localize 'VERMINE.help'}} (+1D)</label>
|
||||
<input type="checkbox" data-roll="true" name="helped" id="helped"
|
||||
value="1" {{#if
|
||||
help}}checked{{/if}}>
|
||||
</div>
|
||||
<div class="flexrow row mdb">
|
||||
<label class="label">{{localize 'VERMINE.tooling'}} (+1D)</label>
|
||||
<input type="checkbox" data-roll="true" name="usingTools" id="usingTools"
|
||||
value="1" {{#if
|
||||
help}}checked{{/if}}>
|
||||
</div>
|
||||
<div class="flexrow row mdb">
|
||||
<label class="label" style="flex: 80%;">{{localize
|
||||
'VERMINE.self_control'}} <span id="self_control_value"></span>
|
||||
</label>
|
||||
<input type="range" id="self_control" data-roll="true" name="self_control"
|
||||
min="0"
|
||||
max="0" value="0" />
|
||||
</div>
|
||||
<div class="flexrow">
|
||||
<h4 class="label">utiliser des dés totems ?
|
||||
</h4>
|
||||
{{#ifgt @root.actor.system.adaptation.totems.human.value 0}}
|
||||
<div class="totem-human">
|
||||
<label for="human-totem">totem humain </label>
|
||||
<input type="checkbox" data-roll="true" name="human-totem"
|
||||
id="human-totem"
|
||||
value="1">
|
||||
</div>
|
||||
{{/ifgt}}
|
||||
{{#ifgt @root.actor.system.adaptation.totems.adapted.value 0}}
|
||||
<div class="totem-adapted">
|
||||
<label for="human-totem">totem adapté </label>
|
||||
<input type="checkbox" data-roll="true" name="adapted-totem"
|
||||
id="adapted-totem"
|
||||
value="1">
|
||||
</div>
|
||||
{{/ifgt}}
|
||||
</div>
|
||||
<div class="flexrow row mdb">
|
||||
<label class="label" style="flex: 80%;">{{localize
|
||||
'VERMINE.group'}}</label>
|
||||
<input type="number" data-roll="true" class="numeric-entry"
|
||||
style="text-align: center;"
|
||||
name="group" id="group" min="0" max="5" value="0">
|
||||
</div>
|
||||
</div>
|
||||
<p><input type="hidden" name="speakerId" value="{{ speakerId }}" />
|
||||
<input type="hidden" name="skillLabel" value="{{ skill }}" /></p>
|
||||
</form>
|
||||
@@ -4,6 +4,30 @@
|
||||
<div class="flexrow">
|
||||
<h4>difficulté</h4>
|
||||
<span id="difficulty">{{param.difficulty}}</span>
|
||||
</div>
|
||||
<div class="reroll-fromroll">
|
||||
<h4>relances possibles : <span id="allowed_reroll">{{param.Reroll}}</span></h4>
|
||||
<div class="reroll flexrow">
|
||||
<div class="reroll-from-effort flexrow">
|
||||
<h4 class="flexcol">
|
||||
<span>effort</span>
|
||||
</h4>
|
||||
<input type="range" min="0"
|
||||
{{#iflt param.max_effort param.actor.system.attributes.effort.value}}
|
||||
max="{{param.max_effort}}"
|
||||
{{/iflt}}
|
||||
{{#iflteq param.actor.system.attributes.effort.value param.max_effort }}
|
||||
max="{{param.actor.system.attributes.effort.value}}"
|
||||
{{/iflteq}}
|
||||
value="0"
|
||||
id="effort-reroll">
|
||||
</input>
|
||||
<button class="grant-reroll" data-tooltip="s'accorder des relances"> <span id="granted-reroll">0</span> </button>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<ul class="flexrow roll-results initial-roll"
|
||||
data-difficulty="{{param.difficulty}}">
|
||||
@@ -41,32 +65,14 @@
|
||||
{{/each}}
|
||||
</ul>
|
||||
<div class="roll-total flexrow">
|
||||
<h4>nombre de succès :</h4>
|
||||
<span id="total">{{roll._total}}</span>
|
||||
<div class="flexcol">
|
||||
<h4>nombre de succès :</h4>
|
||||
<span id="total">{{roll._total}}</span>
|
||||
</div>
|
||||
<div class="flexcol">
|
||||
<h4>succès <br> requis :</h4>
|
||||
<span id="total">{{param.handicap}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="reroll flexrow">
|
||||
<div class="reroll-from-effort ">
|
||||
<div class="flexcol">
|
||||
<h4 class="flexcol">
|
||||
<span>effort</span>
|
||||
</h4>
|
||||
<input type="range" min="0"
|
||||
{{#iflt param.max_effort param.actor.system.attributes.effort.value}}
|
||||
max="{{param.max_effort}}"
|
||||
{{/iflt}}
|
||||
{{#iflteq param.actor.system.attributes.effort.value param.max_effort }}
|
||||
max="{{param.actor.system.attributes.effort.value}}"
|
||||
{{/iflteq}}
|
||||
value="0"
|
||||
id="effort-reroll">
|
||||
</input>
|
||||
|
||||
</div>
|
||||
<button class="grant-reroll" data-tooltip="s'accorder des relances"> <span id="granted-reroll">0</span> </button>
|
||||
</div>
|
||||
<div class="reroll-fromroll">
|
||||
<h4>relances possibles : </h4>
|
||||
<span id="allowed_reroll">{{param.Reroll}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||