forked from public/bol
Compare commits
7 Commits
bol-v10.0.
...
bol-v10.0.
Author | SHA1 | Date | |
---|---|---|---|
36b905134e | |||
eeb0a906e7 | |||
c552411d61 | |||
d3ae59f70d | |||
cf7d76fdba | |||
89ec404ca8 | |||
8f60aa95ee |
@ -769,7 +769,7 @@ body.system-bol img#logo {
|
||||
min-height: 700px;
|
||||
height: 700px;
|
||||
}
|
||||
.bol.sheet.actor .window-content form {
|
||||
.bol.sheet.actor .window-content .bol-actor-form {
|
||||
background-image: url("/systems/bol/ui/logo.webp");
|
||||
background-repeat: no-repeat;
|
||||
background-size: 190px 115px;
|
||||
|
4
images/.directory
Normal file
4
images/.directory
Normal file
@ -0,0 +1,4 @@
|
||||
[Dolphin]
|
||||
Timestamp=2022,7,17,14,58,4.757
|
||||
Version=4
|
||||
VisibleRoles=Details_text,Details_size,Details_modificationtime,Details_creationtime,CustomizedDetails
|
@ -25,6 +25,13 @@ export class BoLActorSheet extends ActorSheet {
|
||||
activateListeners(html) {
|
||||
super.activateListeners(html);
|
||||
|
||||
function onLoad() {
|
||||
let logoSheet = BoLUtility.getLogoActorSheet()
|
||||
$(".bol-actor-form").css("backgroundImage",`url(${logoSheet})`)
|
||||
}
|
||||
// Setup everything onload
|
||||
$(function () { onLoad(); });
|
||||
|
||||
// Everything below here is only needed if the sheet is editable
|
||||
if (!this.options.editable) return;
|
||||
|
||||
|
@ -26,7 +26,7 @@ export class BoLActor extends Actor {
|
||||
if (this.type === 'character') {
|
||||
return 'player'
|
||||
}
|
||||
return 'tough'
|
||||
return this.system.chartype
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
getVillainy() {
|
||||
@ -347,7 +347,7 @@ export class BoLActor extends Actor {
|
||||
spendPowerPoint(ppCost) {
|
||||
let newPP = this.system.resources.power.value - ppCost
|
||||
newPP = (newPP < 0) ? 0 : newPP
|
||||
this.update({ 'data.resources.power.value': newPP })
|
||||
this.update({ 'system.resources.power.value': newPP })
|
||||
return newPP
|
||||
}
|
||||
|
||||
@ -355,7 +355,7 @@ export class BoLActor extends Actor {
|
||||
resetAlchemyStatus(alchemyId) {
|
||||
let alchemy = this.items.get(alchemyId)
|
||||
if (alchemy) {
|
||||
this.updateEmbeddedDocuments('Item', [{ _id: alchemy.id, 'data.properties.pccurrent': 0 }])
|
||||
this.updateEmbeddedDocuments('Item', [{ _id: alchemy.id, 'system.properties.pccurrent': 0 }])
|
||||
}
|
||||
}
|
||||
|
||||
@ -369,7 +369,7 @@ export class BoLActor extends Actor {
|
||||
newPC = (newPC < 0) ? 0 : newPC
|
||||
this.update({ 'data.resources.alchemypoints.value': newPC })
|
||||
newPC = alchemy.system.properties.pccurrent + pcCost
|
||||
await this.updateEmbeddedDocuments('Item', [{ _id: alchemy.id, 'data.properties.pccurrent': newPC }])
|
||||
await this.updateEmbeddedDocuments('Item', [{ _id: alchemy.id, 'system.properties.pccurrent': newPC }])
|
||||
} else {
|
||||
ui.notifications.warn("Plus assez de Points de Création !")
|
||||
}
|
||||
|
@ -90,6 +90,9 @@ function registerUsageCount( registerKey ) {
|
||||
}
|
||||
// Simple API counter
|
||||
let regURL = `https://www.uberwald.me/fvtt_appcount/count.php?name="${registerKey}"&worldKey="${worldKey}"&version="${game.release.generation}.${game.release.build}"&system="${game.system.id}"&systemversion="${game.system.version}"`
|
||||
//$.ajaxSetup({
|
||||
//headers: { 'Access-Control-Allow-Origin': '*' }
|
||||
//})
|
||||
$.ajax(regURL)
|
||||
}
|
||||
}
|
||||
@ -110,8 +113,10 @@ function welcomeMessage() {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
Hooks.once('ready', async function () {
|
||||
BoLUtility.ready()
|
||||
registerUsageCount('bol')
|
||||
|
||||
|
||||
welcomeMessage()
|
||||
})
|
||||
|
||||
|
@ -564,6 +564,7 @@ export class BoLDefaultRoll {
|
||||
speaker: ChatMessage.getSpeaker({ actor: actor }),
|
||||
flags: { msgType: "default" }
|
||||
})
|
||||
this.rollData.actor = undefined // Cleanup
|
||||
msg.setFlag("world", "bol-roll-data", this.rollData)
|
||||
})
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ export class BoLUtility {
|
||||
default: true,
|
||||
type: Boolean,
|
||||
onChange: lang => window.location.reload()
|
||||
});
|
||||
})
|
||||
game.settings.register("bol", "useBougette", {
|
||||
name: "Utiliser la Bougette (règle fan-made)",
|
||||
hint: "Utilise un indicateur de Bougette, comme décrit dans l'aide de jeu Gold&Glory du RatierBretonnien (https://www.lahiette.com/leratierbretonnien/)",
|
||||
@ -27,14 +27,32 @@ export class BoLUtility {
|
||||
default: false,
|
||||
type: Boolean,
|
||||
onChange: lang => window.location.reload()
|
||||
});
|
||||
})
|
||||
game.settings.register("bol", "logoActorSheet", {
|
||||
name: "Chemin du logo des fiches de perso",
|
||||
hint: "Vous pouvez changer le logo BoL des fiches de perso, pour jouer dans un autre univers (idéalement 346 x 200, défaut : /systems/bol/ui/logo.webp)",
|
||||
scope: "world",
|
||||
config: true,
|
||||
default: "/systems/bol/ui/logo.webp",
|
||||
type: String,
|
||||
onChange: lang => window.location.reload()
|
||||
})
|
||||
game.settings.register("bol", "logoTopLeft", {
|
||||
name: "Chemin du logo haut gauche",
|
||||
hint: "Vous pouvez changer le logo BoL en haut à gauche de chaque écran (idéalement 718 x 416, défaut : /systems/bol/ui/logo2.webp)",
|
||||
scope: "world",
|
||||
config: true,
|
||||
default: "/systems/bol/ui/logo2.webp",
|
||||
type: String,
|
||||
onChange: lang => window.location.reload()
|
||||
})
|
||||
|
||||
this.rollArmor = game.settings.get("bol", "rollArmor") // Roll armor or not
|
||||
this.useBougette = game.settings.get("bol", "useBougette") // Use optionnal bougette rules
|
||||
|
||||
this.actorSheetLogo = game.settings.get("bol", "logoActorSheet") || "/systems/bol/ui/logo.webp"
|
||||
this.logoTopLeft = game.settings.get("bol", "logoTopLeft") || "/systems/bol/ui/logo2.webp"
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static getRollArmor() {
|
||||
return this.rollArmor
|
||||
@ -43,9 +61,19 @@ export class BoLUtility {
|
||||
static getUseBougette() {
|
||||
return this.useBougette
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static getLogoActorSheet() {
|
||||
return this.actorSheetLogo
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
static getLogoTopLeft() {
|
||||
return this.logoTopLeft
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async ready() {
|
||||
//$("#logo").attr("src", this.getLogoTopLeft() )
|
||||
$("#logo").css("content",`url(${this.getLogoTopLeft()})`)
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -131,7 +159,7 @@ export class BoLUtility {
|
||||
let users = []
|
||||
for (let user of game.users) {
|
||||
if (!user.isGM && user.name != name) {
|
||||
users.push(user.data._id)
|
||||
users.push(user.id)
|
||||
}
|
||||
}
|
||||
return users
|
||||
@ -484,11 +512,21 @@ export class BoLUtility {
|
||||
nbDice++
|
||||
modIndex = 4
|
||||
}
|
||||
if (res[3] == 'MM') {
|
||||
postForm = 'kl' + nbDice
|
||||
nbDice += 2
|
||||
modIndex = 4
|
||||
}
|
||||
if (res[3] == 'B') {
|
||||
postForm = 'kh' + nbDice
|
||||
nbDice++
|
||||
modIndex = 4
|
||||
}
|
||||
if (res[3] == 'BB') {
|
||||
postForm = 'kh' + nbDice
|
||||
nbDice += 2
|
||||
modIndex = 4
|
||||
}
|
||||
}
|
||||
formula = "(" + nbDice + "d" + res[2] + reroll + postForm + "+" + modifier + ") *" + multiplier
|
||||
}
|
||||
|
101
system.json
101
system.json
@ -2,23 +2,24 @@
|
||||
"id": "bol",
|
||||
"title": "Barbarians of Lemuria",
|
||||
"description": "The Barbarians of Lemuria system for FoundryVTT!",
|
||||
"author": "LeRatierBretonnien,Zigmund",
|
||||
"authors": [
|
||||
{
|
||||
"name": "LeRatierBretonnien"
|
||||
"name": "LeRatierBretonnien",
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "Zigmund"
|
||||
"name": "Zigmund",
|
||||
"flags": {}
|
||||
}
|
||||
],
|
||||
"url": "https://www.uberwald.me/gitea/public/bol",
|
||||
"license": "LICENSE.txt",
|
||||
"flags": {},
|
||||
"version": "10.0.1",
|
||||
"version": "10.0.4",
|
||||
"compatibility": {
|
||||
"minimum": 10
|
||||
"minimum": "10",
|
||||
"verified": "10.279",
|
||||
"maximum": "10"
|
||||
},
|
||||
"scripts": [],
|
||||
"esmodules": [
|
||||
"module/bol.js"
|
||||
],
|
||||
@ -29,17 +30,20 @@
|
||||
{
|
||||
"lang": "en",
|
||||
"name": "English",
|
||||
"path": "lang/en.json"
|
||||
"path": "lang/en.json",
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"lang": "fr",
|
||||
"name": "Français",
|
||||
"path": "lang/fr.json"
|
||||
"path": "lang/fr.json",
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"lang": "de",
|
||||
"name": "Deutsch",
|
||||
"path": "lang/de.json"
|
||||
"path": "lang/de.json",
|
||||
"flags": {}
|
||||
}
|
||||
],
|
||||
"packs": [
|
||||
@ -47,64 +51,64 @@
|
||||
"name": "boons",
|
||||
"label": "Avantages",
|
||||
"system": "bol",
|
||||
"path": "./packs/boons.db",
|
||||
"tag": "boon",
|
||||
"path": "packs/boons.db",
|
||||
"type": "Item",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "boonsflawscreatures",
|
||||
"label": "Avantages/Désavantages de Créatures",
|
||||
"system": "bol",
|
||||
"path": "./packs/boonsflawscreatures.db",
|
||||
"tag": "boon",
|
||||
"path": "packs/boonsflawscreatures.db",
|
||||
"type": "Item",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "flaws",
|
||||
"label": "Désavantages",
|
||||
"system": "bol",
|
||||
"path": "./packs/flaws.db",
|
||||
"tag": "flaw",
|
||||
"path": "packs/flaws.db",
|
||||
"type": "Item",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "careers",
|
||||
"label": "Carrières héroïques",
|
||||
"system": "bol",
|
||||
"path": "./packs/careers.db",
|
||||
"tag": "career",
|
||||
"path": "packs/careers.db",
|
||||
"type": "Item",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "origins",
|
||||
"label": "Origines",
|
||||
"system": "bol",
|
||||
"path": "./packs/origins.db",
|
||||
"tag": "origin",
|
||||
"path": "packs/origins.db",
|
||||
"type": "Item",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "races",
|
||||
"label": "Races",
|
||||
"system": "bol",
|
||||
"path": "./packs/races.db",
|
||||
"tag": "race",
|
||||
"path": "packs/races.db",
|
||||
"type": "Item",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "equipment",
|
||||
"label": "Equipement",
|
||||
"system": "bol",
|
||||
"path": "./packs/equipment.db",
|
||||
"tag": "item",
|
||||
"path": "packs/equipment.db",
|
||||
"type": "Item",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"label": "Aides de Jeu",
|
||||
@ -112,7 +116,8 @@
|
||||
"name": "aides-de-jeu",
|
||||
"path": "packs/aides-de-jeu.db",
|
||||
"system": "bol",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"label": "Cartes",
|
||||
@ -120,7 +125,8 @@
|
||||
"name": "cartes",
|
||||
"path": "packs/cartes.db",
|
||||
"system": "bol",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"label": "Langues",
|
||||
@ -128,7 +134,8 @@
|
||||
"name": "languages",
|
||||
"path": "packs/languages.db",
|
||||
"system": "bol",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"label": "Sorts",
|
||||
@ -136,7 +143,8 @@
|
||||
"name": "spells",
|
||||
"path": "packs/spells.db",
|
||||
"system": "bol",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"label": "Dieux",
|
||||
@ -144,7 +152,8 @@
|
||||
"name": "godsfaith",
|
||||
"path": "packs/godsfaith.db",
|
||||
"system": "bol",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"label": "Options de Combat",
|
||||
@ -152,7 +161,8 @@
|
||||
"name": "fightoptions",
|
||||
"path": "packs/fightoptions.db",
|
||||
"system": "bol",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"label": "Alchimie - Potions",
|
||||
@ -160,7 +170,8 @@
|
||||
"name": "potions-alchimie",
|
||||
"path": "packs/potions-alchimie.db",
|
||||
"system": "bol",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"label": "Alchimie - Objets",
|
||||
@ -168,7 +179,8 @@
|
||||
"name": "objets-alchimie",
|
||||
"path": "packs/objets-alchimie.db",
|
||||
"system": "bol",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"label": "Créatures",
|
||||
@ -176,17 +188,16 @@
|
||||
"name": "creatures",
|
||||
"path": "packs/creatures.db",
|
||||
"system": "bol",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
}
|
||||
],
|
||||
"relationships": { },
|
||||
"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.0.1.zip",
|
||||
"protected": false,
|
||||
"background": "images/map_lemurie.webp",
|
||||
"download": "https://www.uberwald.me/gitea/public/bol/archive/bol-v10.0.4.zip",
|
||||
"background": "systems/images/map_lemurie.webp",
|
||||
"gridDistance": 1.5,
|
||||
"gridUnits": "m",
|
||||
"primaryTokenAttribute": "resources.hp",
|
||||
"secondaryTokenAttribute": "resources.hero"
|
||||
}
|
||||
}
|
@ -1,8 +1,10 @@
|
||||
<form class="{{cssClass}} flexcol" autocomplete="off">
|
||||
<form class="{{cssClass}} flexcol bol-actor-form" autocomplete="off">
|
||||
<!--<img class="system-img" src="/systems/bol/ui/logo.webp" height="115" width="190"/> -->
|
||||
|
||||
<div class="wrap flexrow">
|
||||
|
||||
{{!-- Sidebar --}}
|
||||
<div class="sidebar flex0">
|
||||
<div class="sidebar flex0 bol-actor-sidebar">
|
||||
<img class="profile-img" src="{{actor.img}}" data-edit="img" title="{{actor.name}}" height="100" width="100"
|
||||
style="border:1px outset lightgray; box-shadow: 5px 5px 5px gray" />
|
||||
</div>
|
||||
|
@ -6,7 +6,7 @@
|
||||
<input class="charname flex6" name="name" type="text" value="{{actor.name}}" placeholder="Name"/>
|
||||
</div>
|
||||
|
||||
{{#if (eq data.type "player")}}
|
||||
{{#if (eq charType "player")}}
|
||||
<div class="header-field-group flexrow">
|
||||
<label class="header-field-label flex2">{{localize "BOL.ui.xp"}}</label><br/>
|
||||
<div class="header-field-group flex3">
|
||||
@ -21,8 +21,8 @@
|
||||
{{else}}
|
||||
<div class="header-field-group flexrow">
|
||||
<label class="header-field-label flex2">Type : </label><br/>
|
||||
<select class="field-value" name="data.type" data-dtype="String">
|
||||
{{#select data.type}}
|
||||
<select class="field-value" name="system.chartype" data-dtype="String">
|
||||
{{#select charType}}
|
||||
<option value="creature">Créature</option>
|
||||
<option value="base">Piétaille</option>
|
||||
<option value="tough">Coriace</option>
|
||||
|
Reference in New Issue
Block a user