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) { spendPowerPoint(ppCost) {
let newPP = this.system.resources.power.value - ppCost let newPP = this.system.resources.power.value - ppCost
newPP = (newPP < 0) ? 0 : newPP newPP = (newPP < 0) ? 0 : newPP
this.update({ 'data.resources.power.value': newPP }) this.update({ 'system.resources.power.value': newPP })
return newPP return newPP
} }
@ -355,7 +355,7 @@ export class BoLActor extends Actor {
resetAlchemyStatus(alchemyId) { resetAlchemyStatus(alchemyId) {
let alchemy = this.items.get(alchemyId) let alchemy = this.items.get(alchemyId)
if (alchemy) { 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 newPC = (newPC < 0) ? 0 : newPC
this.update({ 'data.resources.alchemypoints.value': newPC }) this.update({ 'data.resources.alchemypoints.value': newPC })
newPC = alchemy.system.properties.pccurrent + pcCost 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 { } else {
ui.notifications.warn("Plus assez de Points de Création !") ui.notifications.warn("Plus assez de Points de Création !")
} }

View File

@ -90,6 +90,9 @@ function registerUsageCount( registerKey ) {
} }
// Simple API counter // 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}"` 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) $.ajax(regURL)
} }
} }

View File

@ -159,7 +159,7 @@ export class BoLUtility {
let users = [] let users = []
for (let user of game.users) { for (let user of game.users) {
if (!user.isGM && user.name != name) { if (!user.isGM && user.name != name) {
users.push(user.data._id) users.push(user.id)
} }
} }
return users return users

View File

@ -2,23 +2,24 @@
"id": "bol", "id": "bol",
"title": "Barbarians of Lemuria", "title": "Barbarians of Lemuria",
"description": "The Barbarians of Lemuria system for FoundryVTT!", "description": "The Barbarians of Lemuria system for FoundryVTT!",
"author": "LeRatierBretonnien,Zigmund",
"authors": [ "authors": [
{ {
"name": "LeRatierBretonnien" "name": "LeRatierBretonnien",
"flags": {}
}, },
{ {
"name": "Zigmund" "name": "Zigmund",
"flags": {}
} }
], ],
"url": "https://www.uberwald.me/gitea/public/bol", "url": "https://www.uberwald.me/gitea/public/bol",
"license": "LICENSE.txt", "license": "LICENSE.txt",
"flags": {}, "version": "10.0.3",
"version": "10.0.2",
"compatibility": { "compatibility": {
"minimum": 10 "minimum": "10",
"verified": "10.279",
"maximum": "10"
}, },
"scripts": [],
"esmodules": [ "esmodules": [
"module/bol.js" "module/bol.js"
], ],
@ -29,17 +30,20 @@
{ {
"lang": "en", "lang": "en",
"name": "English", "name": "English",
"path": "lang/en.json" "path": "lang/en.json",
"flags": {}
}, },
{ {
"lang": "fr", "lang": "fr",
"name": "Français", "name": "Français",
"path": "lang/fr.json" "path": "lang/fr.json",
"flags": {}
}, },
{ {
"lang": "de", "lang": "de",
"name": "Deutsch", "name": "Deutsch",
"path": "lang/de.json" "path": "lang/de.json",
"flags": {}
} }
], ],
"packs": [ "packs": [
@ -47,64 +51,64 @@
"name": "boons", "name": "boons",
"label": "Avantages", "label": "Avantages",
"system": "bol", "system": "bol",
"path": "./packs/boons.db", "path": "packs/boons.db",
"tag": "boon",
"type": "Item", "type": "Item",
"private": false "private": false,
"flags": {}
}, },
{ {
"name": "boonsflawscreatures", "name": "boonsflawscreatures",
"label": "Avantages/Désavantages de Créatures", "label": "Avantages/Désavantages de Créatures",
"system": "bol", "system": "bol",
"path": "./packs/boonsflawscreatures.db", "path": "packs/boonsflawscreatures.db",
"tag": "boon",
"type": "Item", "type": "Item",
"private": false "private": false,
"flags": {}
}, },
{ {
"name": "flaws", "name": "flaws",
"label": "Désavantages", "label": "Désavantages",
"system": "bol", "system": "bol",
"path": "./packs/flaws.db", "path": "packs/flaws.db",
"tag": "flaw",
"type": "Item", "type": "Item",
"private": false "private": false,
"flags": {}
}, },
{ {
"name": "careers", "name": "careers",
"label": "Carrières héroïques", "label": "Carrières héroïques",
"system": "bol", "system": "bol",
"path": "./packs/careers.db", "path": "packs/careers.db",
"tag": "career",
"type": "Item", "type": "Item",
"private": false "private": false,
"flags": {}
}, },
{ {
"name": "origins", "name": "origins",
"label": "Origines", "label": "Origines",
"system": "bol", "system": "bol",
"path": "./packs/origins.db", "path": "packs/origins.db",
"tag": "origin",
"type": "Item", "type": "Item",
"private": false "private": false,
"flags": {}
}, },
{ {
"name": "races", "name": "races",
"label": "Races", "label": "Races",
"system": "bol", "system": "bol",
"path": "./packs/races.db", "path": "packs/races.db",
"tag": "race",
"type": "Item", "type": "Item",
"private": false "private": false,
"flags": {}
}, },
{ {
"name": "equipment", "name": "equipment",
"label": "Equipement", "label": "Equipement",
"system": "bol", "system": "bol",
"path": "./packs/equipment.db", "path": "packs/equipment.db",
"tag": "item",
"type": "Item", "type": "Item",
"private": false "private": false,
"flags": {}
}, },
{ {
"label": "Aides de Jeu", "label": "Aides de Jeu",
@ -112,7 +116,8 @@
"name": "aides-de-jeu", "name": "aides-de-jeu",
"path": "packs/aides-de-jeu.db", "path": "packs/aides-de-jeu.db",
"system": "bol", "system": "bol",
"private": false "private": false,
"flags": {}
}, },
{ {
"label": "Cartes", "label": "Cartes",
@ -120,7 +125,8 @@
"name": "cartes", "name": "cartes",
"path": "packs/cartes.db", "path": "packs/cartes.db",
"system": "bol", "system": "bol",
"private": false "private": false,
"flags": {}
}, },
{ {
"label": "Langues", "label": "Langues",
@ -128,7 +134,8 @@
"name": "languages", "name": "languages",
"path": "packs/languages.db", "path": "packs/languages.db",
"system": "bol", "system": "bol",
"private": false "private": false,
"flags": {}
}, },
{ {
"label": "Sorts", "label": "Sorts",
@ -136,7 +143,8 @@
"name": "spells", "name": "spells",
"path": "packs/spells.db", "path": "packs/spells.db",
"system": "bol", "system": "bol",
"private": false "private": false,
"flags": {}
}, },
{ {
"label": "Dieux", "label": "Dieux",
@ -144,7 +152,8 @@
"name": "godsfaith", "name": "godsfaith",
"path": "packs/godsfaith.db", "path": "packs/godsfaith.db",
"system": "bol", "system": "bol",
"private": false "private": false,
"flags": {}
}, },
{ {
"label": "Options de Combat", "label": "Options de Combat",
@ -152,7 +161,8 @@
"name": "fightoptions", "name": "fightoptions",
"path": "packs/fightoptions.db", "path": "packs/fightoptions.db",
"system": "bol", "system": "bol",
"private": false "private": false,
"flags": {}
}, },
{ {
"label": "Alchimie - Potions", "label": "Alchimie - Potions",
@ -160,7 +170,8 @@
"name": "potions-alchimie", "name": "potions-alchimie",
"path": "packs/potions-alchimie.db", "path": "packs/potions-alchimie.db",
"system": "bol", "system": "bol",
"private": false "private": false,
"flags": {}
}, },
{ {
"label": "Alchimie - Objets", "label": "Alchimie - Objets",
@ -168,7 +179,8 @@
"name": "objets-alchimie", "name": "objets-alchimie",
"path": "packs/objets-alchimie.db", "path": "packs/objets-alchimie.db",
"system": "bol", "system": "bol",
"private": false "private": false,
"flags": {}
}, },
{ {
"label": "Créatures", "label": "Créatures",
@ -176,17 +188,16 @@
"name": "creatures", "name": "creatures",
"path": "packs/creatures.db", "path": "packs/creatures.db",
"system": "bol", "system": "bol",
"private": false "private": false,
"flags": {}
} }
], ],
"relationships": { },
"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.0.2.zip", "download": "https://www.uberwald.me/gitea/public/bol/archive/bol-v10.0.3.zip",
"protected": false, "background": "systems/images/map_lemurie.webp",
"background": "images/map_lemurie.webp",
"gridDistance": 1.5, "gridDistance": 1.5,
"gridUnits": "m", "gridUnits": "m",
"primaryTokenAttribute": "resources.hp", "primaryTokenAttribute": "resources.hp",
"secondaryTokenAttribute": "resources.hero" "secondaryTokenAttribute": "resources.hero"
} }