Compare commits
7 Commits
bol-v10.1.
...
bol-v10.2.
Author | SHA1 | Date | |
---|---|---|---|
edf8325109 | |||
895aa01419 | |||
9631e5e72a | |||
716cc53b29 | |||
44952d4410 | |||
a7991bce92 | |||
a1c20019e8 |
@ -40,4 +40,4 @@ Maps : Emmanuel Roudier.
|
||||
|
||||
# Developmement
|
||||
|
||||
Zigmund, LeRatierBretonnien
|
||||
LeRatierBretonnien, Zigmund (historical)
|
||||
|
@ -389,16 +389,16 @@ ul.no-bullets {
|
||||
background-color: lightgray;
|
||||
}
|
||||
.bol h1.form-header {
|
||||
font-size: 2.5em;
|
||||
font-size: 2.2em;
|
||||
font-weight: 700;
|
||||
}
|
||||
.bol h2.form-header {
|
||||
font-size: 2em;
|
||||
font-size: 1.8em;
|
||||
font-weight: 500;
|
||||
border-bottom: 1px groove #eeede0;
|
||||
}
|
||||
.bol h3.form-header {
|
||||
font-size: 1.5em;
|
||||
font-size: 1.2em;
|
||||
font-weight: 500;
|
||||
border-bottom: 1px groove #eeede0;
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ export class BoLActorSheet extends ActorSheet {
|
||||
return mergeObject(super.defaultOptions, {
|
||||
classes: ["bol", "sheet", "actor"],
|
||||
template: "systems/bol/templates/actor/actor-sheet.hbs",
|
||||
width: 600,
|
||||
width: 860,
|
||||
height: 600,
|
||||
dragDrop: [{ dragSelector: ".items-list .item", dropSelector: null }],
|
||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "stats" }]
|
||||
@ -114,7 +114,7 @@ export class BoLActorSheet extends ActorSheet {
|
||||
/* -------------------------------------------- */
|
||||
|
||||
/** @override */
|
||||
getData(options) {
|
||||
async getData(options) {
|
||||
const data = super.getData(options)
|
||||
const actorData = duplicate(data)
|
||||
let formData = duplicate(data)
|
||||
@ -148,8 +148,9 @@ export class BoLActorSheet extends ActorSheet {
|
||||
formData.editScore = this.options.editScore
|
||||
formData.useBougette = BoLUtility.getUseBougette()
|
||||
formData.charType = this.actor.getCharType()
|
||||
formData.villainy = this.actor.getVillainy()
|
||||
|
||||
formData.villainy = this.actor.getVillainy()
|
||||
formData.biography = await TextEditor.enrichHTML(this.object.system.details.biography, {async: true})
|
||||
formData.notes = await TextEditor.enrichHTML(this.object.system.details.notes, {async: true})
|
||||
formData.isSorcerer = this.actor.isSorcerer()
|
||||
formData.isAlchemist = this.actor.isAlchemist()
|
||||
formData.isPriest = this.actor.isPriest()
|
||||
|
@ -19,7 +19,7 @@ export class BoLItemSheet extends ItemSheet {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/** @override */
|
||||
getData(options) {
|
||||
async getData(options) {
|
||||
const data = super.getData(options)
|
||||
let itemData = duplicate(data.document)
|
||||
data.config = game.bol.config
|
||||
@ -27,6 +27,7 @@ export class BoLItemSheet extends ItemSheet {
|
||||
data.category = itemData.system.category
|
||||
data.isGM = game.user.isGM;
|
||||
data.itemProperties = this.item.itemProperties;
|
||||
data.description = await TextEditor.enrichHTML(this.object.system.description, {async: true})
|
||||
|
||||
// Dynamic default data fix/adapt
|
||||
if (itemData.type == "item") {
|
||||
|
@ -24,6 +24,7 @@ export class BoLCombatManager extends Combat {
|
||||
for (let cId = 0; cId < ids.length; cId++) {
|
||||
const combatant = this.combatants.get(ids[cId]);
|
||||
let fvttInit = 5
|
||||
//console.log("TYPE", combatant.actor.type)
|
||||
if (combatant.actor.type == 'character') {
|
||||
let initData = combatant.actor.getLastInitData()
|
||||
console.log("Init data !!!", initData)
|
||||
@ -37,11 +38,12 @@ export class BoLCombatManager extends Combat {
|
||||
fvttInit = 3
|
||||
}
|
||||
} else {
|
||||
fvttInit = 4 // Pietaille par defaut
|
||||
if ( combatant.actor.getSubtype == 'adversary') {
|
||||
fvttInit = 4 // Pietaille par defautco
|
||||
//console.log("ACTOR", combatant.actor.getCharType())
|
||||
if ( combatant.actor.getCharType() == 'adversary') {
|
||||
fvttInit = 7
|
||||
}
|
||||
if ( combatant.actor.getSubtype == 'tough') {
|
||||
if ( combatant.actor.getCharType() == 'tough') {
|
||||
fvttInit = 6
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,21 @@ import { BoLRoll } from "../controllers/bol-rolls.js";
|
||||
|
||||
export class BoLHotbar {
|
||||
|
||||
|
||||
static async assignToHotBar( item, slot) {
|
||||
let command = `game.bol.BoLHotbar.rollMacro("${item.name}", "${item.type}");`
|
||||
let macro = game.macros.contents.find(m => (m.name === item.name) && (m.command === command))
|
||||
if (!macro) {
|
||||
macro = await Macro.create({
|
||||
name: item.name,
|
||||
type: "script",
|
||||
img: item.img,
|
||||
command: command
|
||||
}, { displaySheet: false })
|
||||
}
|
||||
await game.user.assignHotbarMacro(macro, slot);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a macro when dropping an entity on the hotbar
|
||||
* Item - open roll dialog for item
|
||||
@ -10,55 +25,20 @@ export class BoLHotbar {
|
||||
*/
|
||||
static init( ) {
|
||||
|
||||
Hooks.on("hotbarDrop", async (bar, documentData, slot) => {
|
||||
Hooks.on("hotbarDrop", (bar, documentData, slot) => {
|
||||
// Create item macro if rollable item - weapon, spell, prayer, trait, or skill
|
||||
if (documentData.type == "Item") {
|
||||
console.log("Drop done !!!", bar, documentData, slot)
|
||||
let item = documentData.data
|
||||
let command = `game.bol.BoLHotbar.rollMacro("${item.name}", "${item.type}");`
|
||||
let macro = game.macros.contents.find(m => (m.name === item.name) && (m.command === command))
|
||||
if (!macro) {
|
||||
macro = await Macro.create({
|
||||
name: item.name,
|
||||
type: "script",
|
||||
img: item.img,
|
||||
command: command
|
||||
}, { displaySheet: false })
|
||||
let item = fromUuidSync(documentData.uuid)
|
||||
if (item == undefined) {
|
||||
item = this.actor.items.get(documentData.uuid)
|
||||
}
|
||||
game.user.assignHotbarMacro(macro, slot);
|
||||
}
|
||||
// Create a macro to open the actor sheet of the actor dropped on the hotbar
|
||||
else if (documentData.type == "Actor") {
|
||||
let actor = game.actors.get(documentData.id);
|
||||
let command = `game.actors.get("${documentData.id}").sheet.render(true)`
|
||||
let macro = game.macros.contents.find(m => (m.name === actor.name) && (m.command === command));
|
||||
if (!macro) {
|
||||
macro = await Macro.create({
|
||||
name: actor.data.name,
|
||||
type: "script",
|
||||
img: actor.data.img,
|
||||
command: command
|
||||
}, { displaySheet: false })
|
||||
game.user.assignHotbarMacro(macro, slot);
|
||||
if (item && (item.system.subtype === "weapon" || item.system.category === "spell")) {
|
||||
this.assignToHotBar( item, slot )
|
||||
return false
|
||||
}
|
||||
}
|
||||
// Create a macro to open the journal sheet of the journal dropped on the hotbar
|
||||
else if (documentData.type == "JournalEntry") {
|
||||
let journal = game.journal.get(documentData.id);
|
||||
let command = `game.journal.get("${documentData.id}").sheet.render(true)`
|
||||
let macro = game.macros.contents.find(m => (m.name === journal.name) && (m.command === command));
|
||||
if (!macro) {
|
||||
macro = await Macro.create({
|
||||
name: journal.data.name,
|
||||
type: "script",
|
||||
img: "systems/bol/icons/images/icone_parchement_vierge.webp",
|
||||
command: command
|
||||
}, { displaySheet: false })
|
||||
game.user.assignHotbarMacro(macro, slot);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
});
|
||||
return true
|
||||
})
|
||||
}
|
||||
|
||||
/** Roll macro */
|
||||
@ -76,10 +56,10 @@ export class BoLHotbar {
|
||||
return ui.notifications.warn(`Impossible de trouver l'objet de cette macro`)
|
||||
}
|
||||
// Trigger the item roll
|
||||
if (item.data.data.category === "equipment" && item.data.data.subtype === "weapon") {
|
||||
if (item.system.category === "equipment" && item.system.subtype === "weapon") {
|
||||
return BoLRoll.weaponCheckWithWeapon( actor, item)
|
||||
}
|
||||
if (item.data.data.category === "spell") {
|
||||
if (item.system.category === "spell") {
|
||||
return BoLRoll.spellCheckWithSpell( actor, item)
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,7 @@
|
||||
],
|
||||
"url": "https://www.uberwald.me/gitea/public/bol",
|
||||
"license": "LICENSE.txt",
|
||||
"version": "10.1.1",
|
||||
"version": "10.2.0",
|
||||
"compatibility": {
|
||||
"minimum": "10"
|
||||
},
|
||||
@ -192,7 +192,7 @@
|
||||
],
|
||||
"socket": true,
|
||||
"manifest": "https://www.uberwald.me/gitea/public/bol/raw/v10/system.json",
|
||||
"download": "https://www.uberwald.me/gitea/public/bol/archive/bol-v10.1.1.zip",
|
||||
"download": "https://www.uberwald.me/gitea/public/bol/archive/bol-v10.2.0.zip",
|
||||
"background": "systems/images/map_lemurie.webp",
|
||||
"gridDistance": 1.5,
|
||||
"gridUnits": "m",
|
||||
|
@ -40,7 +40,7 @@
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
{{editor details.biography target="system.details.biography" button=true owner=owner
|
||||
{{editor biography target="system.details.biography" button=true owner=owner
|
||||
editable=editable}}
|
||||
|
||||
<ol class="items-list">
|
||||
@ -49,4 +49,4 @@ editable=editable}}
|
||||
<div class="item-field flex1 right"></div>
|
||||
</li>
|
||||
</ol>
|
||||
{{editor details.notes target="system.details.notes" button=true owner=owner editable=editable}}
|
||||
{{editor notes target="system.details.notes" button=true owner=owner editable=editable}}
|
@ -1,5 +1,5 @@
|
||||
<div class="flexrow box-roll">
|
||||
<div class="flex1 center bg-darkred">
|
||||
<div class="flex1 center bg-darkred" >
|
||||
<label for="attr">{{localize 'BOL.ui.attribute'}}</label>
|
||||
</div>
|
||||
<div class="flex1 center cell">
|
||||
|
@ -1,6 +1,6 @@
|
||||
{{#if (count boons)}}
|
||||
<div class="flexrow roll-box" >
|
||||
<div class="flex1 center bg-darkred">
|
||||
<div class="flex1 center bg-darkred" data-tooltip-direction="LEFT" data-tooltip="Click-gauche pour sélectionner, CTRL+Click gauche pour déselectionner">
|
||||
<label for="mod">{{localize 'BOL.ui.boons'}}</label>
|
||||
</div>
|
||||
<div class="flex1 center cell">
|
||||
|
@ -1,6 +1,6 @@
|
||||
{{#if careers}}
|
||||
<div class="flexrow roll-box">
|
||||
<div class="flex1 center bg-darkred">
|
||||
<div class="flex1 center bg-darkred" data-tooltip-direction="LEFT" data-tooltip="Click-gauche pour selectionner, CTRL+Click gauche pour déselectionner">
|
||||
<label for="mod">{{localize 'BOL.ui.careers'}}</label>
|
||||
</div>
|
||||
<div class="flex1 center cell">
|
||||
|
@ -1,6 +1,6 @@
|
||||
{{#if (count flaws)}}
|
||||
<div class="flexrow roll-box">
|
||||
<div class="flex1 center bg-darkred">
|
||||
<div class="flex1 center bg-darkred" data-tooltip-direction="LEFT" data-tooltip="Click-gauche pour selectionner, CTRL+Click gauche pour déselectionner">
|
||||
<label for="mod">{{localize 'BOL.ui.flaws'}}</label>
|
||||
</div>
|
||||
<div class="flex1 center cell">
|
||||
|
@ -20,7 +20,7 @@
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{editor item.system.description target="system.description" button=true owner=owner editable=editable}}
|
||||
{{editor description target="system.description" button=true owner=owner editable=editable}}
|
||||
</div>
|
||||
<div class="tab properties" data-group="primary" data-tab="properties">
|
||||
{{#if (eq item.type "item")}}
|
||||
|
Reference in New Issue
Block a user