Compare commits
4 Commits
bol-v10.1.
...
bol-v10.1.
Author | SHA1 | Date | |
---|---|---|---|
44952d4410 | |||
a7991bce92 | |||
a1c20019e8 | |||
af8576a4a1 |
@ -59,6 +59,8 @@ a:hover {
|
|||||||
top: -50px;
|
top: -50px;
|
||||||
left: calc(50% - 100px);
|
left: calc(50% - 100px);
|
||||||
opacity: 0.7;
|
opacity: 0.7;
|
||||||
|
-webkit-animation: rotation 10s infinite linear;
|
||||||
|
animation: rotation 10s infinite linear;
|
||||||
}
|
}
|
||||||
#pause h3 {
|
#pause h3 {
|
||||||
font-family: "IMFellDWPicaSC-Regular", serif;
|
font-family: "IMFellDWPicaSC-Regular", serif;
|
||||||
|
@ -15,7 +15,7 @@ export class BoLCombatManager extends Combat {
|
|||||||
|
|
||||||
/************************************************************************************/
|
/************************************************************************************/
|
||||||
async rollInitiative(ids, formula = undefined, messageOptions = {}) {
|
async rollInitiative(ids, formula = undefined, messageOptions = {}) {
|
||||||
console.log(`${game.data.system.data.title} | Combat.rollInitiative()`, ids, formula, messageOptions);
|
console.log(`${game.system.title} | Combat.rollInitiative()`, ids, formula, messageOptions);
|
||||||
// Structure input data
|
// Structure input data
|
||||||
ids = typeof ids === "string" ? [ids] : ids;
|
ids = typeof ids === "string" ? [ids] : ids;
|
||||||
const currentId = this.combatant._id;
|
const currentId = this.combatant._id;
|
||||||
@ -24,6 +24,7 @@ export class BoLCombatManager extends Combat {
|
|||||||
for (let cId = 0; cId < ids.length; cId++) {
|
for (let cId = 0; cId < ids.length; cId++) {
|
||||||
const combatant = this.combatants.get(ids[cId]);
|
const combatant = this.combatants.get(ids[cId]);
|
||||||
let fvttInit = 5
|
let fvttInit = 5
|
||||||
|
//console.log("TYPE", combatant.actor.type)
|
||||||
if (combatant.actor.type == 'character') {
|
if (combatant.actor.type == 'character') {
|
||||||
let initData = combatant.actor.getLastInitData()
|
let initData = combatant.actor.getLastInitData()
|
||||||
console.log("Init data !!!", initData)
|
console.log("Init data !!!", initData)
|
||||||
@ -37,11 +38,12 @@ export class BoLCombatManager extends Combat {
|
|||||||
fvttInit = 3
|
fvttInit = 3
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
fvttInit = 4 // Pietaille par defaut
|
fvttInit = 4 // Pietaille par defautco
|
||||||
if ( combatant.actor.getSubtype == 'adversary') {
|
//console.log("ACTOR", combatant.actor.getCharType())
|
||||||
|
if ( combatant.actor.getCharType() == 'adversary') {
|
||||||
fvttInit = 7
|
fvttInit = 7
|
||||||
}
|
}
|
||||||
if ( combatant.actor.getSubtype == 'tough') {
|
if ( combatant.actor.getCharType() == 'tough') {
|
||||||
fvttInit = 6
|
fvttInit = 6
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,21 @@ import { BoLRoll } from "../controllers/bol-rolls.js";
|
|||||||
|
|
||||||
export class BoLHotbar {
|
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
|
* Create a macro when dropping an entity on the hotbar
|
||||||
* Item - open roll dialog for item
|
* Item - open roll dialog for item
|
||||||
@ -10,55 +25,20 @@ export class BoLHotbar {
|
|||||||
*/
|
*/
|
||||||
static init( ) {
|
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
|
// Create item macro if rollable item - weapon, spell, prayer, trait, or skill
|
||||||
if (documentData.type == "Item") {
|
if (documentData.type == "Item") {
|
||||||
console.log("Drop done !!!", bar, documentData, slot)
|
let item = fromUuidSync(documentData.uuid)
|
||||||
let item = documentData.data
|
if (item == undefined) {
|
||||||
let command = `game.bol.BoLHotbar.rollMacro("${item.name}", "${item.type}");`
|
item = this.actor.items.get(documentData.uuid)
|
||||||
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 })
|
|
||||||
}
|
}
|
||||||
game.user.assignHotbarMacro(macro, slot);
|
if (item && (item.system.subtype === "weapon" || item.system.category === "spell")) {
|
||||||
}
|
this.assignToHotBar( item, slot )
|
||||||
// Create a macro to open the actor sheet of the actor dropped on the hotbar
|
return false
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Create a macro to open the journal sheet of the journal dropped on the hotbar
|
return true
|
||||||
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;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Roll macro */
|
/** Roll macro */
|
||||||
@ -76,10 +56,10 @@ export class BoLHotbar {
|
|||||||
return ui.notifications.warn(`Impossible de trouver l'objet de cette macro`)
|
return ui.notifications.warn(`Impossible de trouver l'objet de cette macro`)
|
||||||
}
|
}
|
||||||
// Trigger the item roll
|
// 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)
|
return BoLRoll.weaponCheckWithWeapon( actor, item)
|
||||||
}
|
}
|
||||||
if (item.data.data.category === "spell") {
|
if (item.system.category === "spell") {
|
||||||
return BoLRoll.spellCheckWithSpell( actor, item)
|
return BoLRoll.spellCheckWithSpell( actor, item)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,11 +14,9 @@
|
|||||||
],
|
],
|
||||||
"url": "https://www.uberwald.me/gitea/public/bol",
|
"url": "https://www.uberwald.me/gitea/public/bol",
|
||||||
"license": "LICENSE.txt",
|
"license": "LICENSE.txt",
|
||||||
"version": "10.1.0",
|
"version": "10.1.3",
|
||||||
"compatibility": {
|
"compatibility": {
|
||||||
"minimum": "10",
|
"minimum": "10"
|
||||||
"verified": "10.284",
|
|
||||||
"maximum": "10"
|
|
||||||
},
|
},
|
||||||
"esmodules": [
|
"esmodules": [
|
||||||
"module/bol.js"
|
"module/bol.js"
|
||||||
@ -194,7 +192,7 @@
|
|||||||
],
|
],
|
||||||
"socket": true,
|
"socket": true,
|
||||||
"manifest": "https://www.uberwald.me/gitea/public/bol/raw/v10/system.json",
|
"manifest": "https://www.uberwald.me/gitea/public/bol/raw/v10/system.json",
|
||||||
"download": "https://www.uberwald.me/gitea/public/bol/archive/bol-v10.1.0.zip",
|
"download": "https://www.uberwald.me/gitea/public/bol/archive/bol-v10.1.3.zip",
|
||||||
"background": "systems/images/map_lemurie.webp",
|
"background": "systems/images/map_lemurie.webp",
|
||||||
"gridDistance": 1.5,
|
"gridDistance": 1.5,
|
||||||
"gridUnits": "m",
|
"gridUnits": "m",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<div class="flexrow box-roll">
|
<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>
|
<label for="attr">{{localize 'BOL.ui.attribute'}}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex1 center cell">
|
<div class="flex1 center cell">
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{{#if (count boons)}}
|
{{#if (count boons)}}
|
||||||
<div class="flexrow roll-box" >
|
<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>
|
<label for="mod">{{localize 'BOL.ui.boons'}}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex1 center cell">
|
<div class="flex1 center cell">
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{{#if careers}}
|
{{#if careers}}
|
||||||
<div class="flexrow roll-box">
|
<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>
|
<label for="mod">{{localize 'BOL.ui.careers'}}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex1 center cell">
|
<div class="flex1 center cell">
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{{#if (count flaws)}}
|
{{#if (count flaws)}}
|
||||||
<div class="flexrow roll-box">
|
<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>
|
<label for="mod">{{localize 'BOL.ui.flaws'}}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex1 center cell">
|
<div class="flex1 center cell">
|
||||||
|
Reference in New Issue
Block a user