This commit is contained in:
sladecraven 2022-08-31 22:24:56 +02:00
parent c552411d61
commit eeb0a906e7
4 changed files with 63 additions and 49 deletions

View File

@ -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 !")
}

View File

@ -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)
}
}

View File

@ -159,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

View File

@ -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.2",
"version": "10.0.3",
"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,15 +188,14 @@
"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.2.zip",
"protected": false,
"background": "images/map_lemurie.webp",
"download": "https://www.uberwald.me/gitea/public/bol/archive/bol-v10.0.3.zip",
"background": "systems/images/map_lemurie.webp",
"gridDistance": 1.5,
"gridUnits": "m",
"primaryTokenAttribute": "resources.hp",