Compare commits
No commits in common. "master" and "fvtt-malefices-v10.0.1" have entirely different histories.
master
...
fvtt-malef
33
README.md
@ -1,33 +0,0 @@
|
||||
# Système Foundry pour Maléfices (French RPG, Arkhane Asylum Publishing)
|
||||
|
||||
[Vue du système](https://www.lahiette.com/leratierbretonnien/wp-content/uploads/2023/02/malefices_snapshot.webp)
|
||||
|
||||
## EN
|
||||
|
||||
Unofficial system for Maléfices v4 (French version from Arkhane Asylum Publishing).
|
||||
|
||||
This system has been approved by Arkhane Asylum Publishing ( https://arkhane-asylum.fr ), thanks !
|
||||
The Tarot assets, as well as other graphical elements has been provide by Arkhane Asylum.
|
||||
|
||||
Books are mandatory to play and are available at : https://arkhane-asylum.fr/en/malefices
|
||||
|
||||
## FR
|
||||
|
||||
Système non-officiel pour le JDR Maléfices, version 4 (Arkhane Asylum Publishing).
|
||||
|
||||
Ce système a été autorisé par le Arkhane Asylum Publishing ( https://arkhane-asylum.fr ), merci à eux !
|
||||
Les images du Tarot et autres éléments graphiques ont été fournis par Arkhane Asylum.
|
||||
|
||||
Les livres du jeu sont nécessaires pour jouer, et sont disponibles ici : https://arkhane-asylum.fr/fr/malefices
|
||||
|
||||
# Credits
|
||||
|
||||
Maléfices, le jeu de rôle qui sent le souffre, is a property of Arkhane Asylum Publishing.
|
||||
|
||||
# Developmement
|
||||
|
||||
LeRatierBretonnien
|
||||
|
||||
# Tests, icones et saisie des données
|
||||
|
||||
Dame du Lac, Malik
|
@ -1,6 +0,0 @@
|
||||
[Dolphin]
|
||||
SortRole=modificationtime
|
||||
Timestamp=2023,2,26,15,32,34.892
|
||||
Version=4
|
||||
ViewMode=1
|
||||
VisibleRoles=Details_text,Details_size,Details_modificationtime,Details_creationtime,CustomizedDetails
|
Before Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 423 KiB |
Before Width: | Height: | Size: 488 KiB |
Before Width: | Height: | Size: 492 KiB |
Before Width: | Height: | Size: 538 KiB |
Before Width: | Height: | Size: 525 KiB |
Before Width: | Height: | Size: 494 KiB |
Before Width: | Height: | Size: 549 KiB |
Before Width: | Height: | Size: 473 KiB |
Before Width: | Height: | Size: 394 KiB |
Before Width: | Height: | Size: 482 KiB |
Before Width: | Height: | Size: 538 KiB |
Before Width: | Height: | Size: 546 KiB |
Before Width: | Height: | Size: 449 KiB |
Before Width: | Height: | Size: 537 KiB |
Before Width: | Height: | Size: 533 KiB |
Before Width: | Height: | Size: 527 KiB |
Before Width: | Height: | Size: 517 KiB |
Before Width: | Height: | Size: 531 KiB |
Before Width: | Height: | Size: 571 KiB |
Before Width: | Height: | Size: 506 KiB |
Before Width: | Height: | Size: 521 KiB |
Before Width: | Height: | Size: 437 KiB |
Before Width: | Height: | Size: 50 KiB |
BIN
images/ui/D12_Black.png
Normal file
After Width: | Height: | Size: 60 KiB |
BIN
images/ui/D12_Black.webp
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
images/ui/D12_White.png
Normal file
After Width: | Height: | Size: 40 KiB |
BIN
images/ui/D12_White.webp
Normal file
After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 132 KiB |
Before Width: | Height: | Size: 138 KiB |
BIN
images/ui/logo.png
Normal file
After Width: | Height: | Size: 268 KiB |
BIN
images/ui/logo.webp
Normal file
After Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 5.7 KiB |
31
lang/fr.json
@ -1,15 +1,22 @@
|
||||
{
|
||||
"TYPES": {
|
||||
"Actor": {
|
||||
"personnage" : "Personnage"
|
||||
},
|
||||
"Item": {
|
||||
"arme" : "Arme",
|
||||
"equipement" : "Equipement",
|
||||
"tarot" : "Tarot",
|
||||
"elementbio" : "Elément Biographique",
|
||||
"archetype" : "Archetype",
|
||||
"sortilege" : "Sortilège"
|
||||
}
|
||||
"ACTOR": {
|
||||
"TypeCharacter": "Character",
|
||||
"TypeNpc": "NPC"
|
||||
},
|
||||
"ITEM": {
|
||||
"TypeWeapon": "Weapon",
|
||||
"TypeShield": "Shield",
|
||||
"TypeArmor": "Armor",
|
||||
"TypeSpell": "Spell",
|
||||
"TypeModule": "Module",
|
||||
"TypeMoney": "Money",
|
||||
"TypeEquipment": "Equipment",
|
||||
"TypeAction": "Action",
|
||||
"TypeFreeaction": "Free Action",
|
||||
"TypeReaction": "Reaction",
|
||||
"TypeStance": "Stance",
|
||||
"TypeTrait": "Trait",
|
||||
"TypeCondition": "Condition",
|
||||
"TypeCraftingskill": "Crafting Skill"
|
||||
}
|
||||
}
|
@ -11,11 +11,11 @@ export class MaleficesActorSheet extends ActorSheet {
|
||||
/** @override */
|
||||
static get defaultOptions() {
|
||||
|
||||
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||
classes: ["fvtt-malefices", "sheet", "actor", "malefices-actor-sheet"],
|
||||
return mergeObject(super.defaultOptions, {
|
||||
classes: ["fvtt-malefices", "sheet", "actor"],
|
||||
template: "systems/fvtt-malefices/templates/actors/actor-sheet.hbs",
|
||||
width: 640,
|
||||
height:680,
|
||||
height: 640,
|
||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "skills" }],
|
||||
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: null }],
|
||||
editScore: true
|
||||
@ -33,20 +33,12 @@ export class MaleficesActorSheet extends ActorSheet {
|
||||
name: this.actor.name,
|
||||
editable: this.isEditable,
|
||||
cssClass: this.isEditable ? "editable" : "locked",
|
||||
system: foundry.utils.duplicate(this.object.system),
|
||||
system: duplicate(this.object.system),
|
||||
limited: this.object.limited,
|
||||
armes: foundry.utils.duplicate(this.actor.getArmes()),
|
||||
tarots: foundry.utils.duplicate(this.actor.getTarots()),
|
||||
tarotsCache: foundry.utils.duplicate(this.actor.getHiddenTarots()),
|
||||
archetype: foundry.utils.duplicate(this.actor.getArchetype()),
|
||||
equipements: foundry.utils.duplicate(this.actor.getEquipements()),
|
||||
subActors: foundry.utils.duplicate(this.actor.getSubActors()),
|
||||
phyMalus: this.actor.getPhysiqueMalus(),
|
||||
elementsbio: this.actor.getElementsBio(),
|
||||
sorts: this.actor.getSorts(),
|
||||
description: await TextEditor.enrichHTML(this.object.system.biodata.description, { async: true }),
|
||||
notes: await TextEditor.enrichHTML(this.object.system.biodata.notes, { async: true }),
|
||||
equipementlibre: await TextEditor.enrichHTML(this.object.system.equipementlibre, { async: true }),
|
||||
armes: duplicate(this.actor.getArmes()),
|
||||
equipements: duplicate(this.actor.getEquipements()),
|
||||
subActors: duplicate(this.actor.getSubActors()),
|
||||
encCurrent: this.actor.encCurrent,
|
||||
options: this.options,
|
||||
owner: this.document.isOwner,
|
||||
editScore: this.options.editScore,
|
||||
@ -54,7 +46,7 @@ export class MaleficesActorSheet extends ActorSheet {
|
||||
}
|
||||
this.formData = formData;
|
||||
|
||||
console.log("PC : ", formData, this.object );
|
||||
console.log("PC : ", formData, this.object);
|
||||
return formData;
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@ export class MaleficesActor extends Actor {
|
||||
if (data instanceof Array) {
|
||||
return super.create(data, options);
|
||||
}
|
||||
// If the created actor has items (only applicable to foundry.utils.duplicated actors) bypass the new actor creation logic
|
||||
// If the created actor has items (only applicable to duplicated actors) bypass the new actor creation logic
|
||||
if (data.items) {
|
||||
let actor = super.create(data, options);
|
||||
return actor;
|
||||
@ -86,40 +86,9 @@ export class MaleficesActor extends Actor {
|
||||
MaleficesUtility.sortArrayObjectsByName(comp)
|
||||
return comp;
|
||||
}
|
||||
getSorts() {
|
||||
let comp = this.items.filter(item => item.type == 'sortilege');
|
||||
MaleficesUtility.sortArrayObjectsByName(comp)
|
||||
return comp;
|
||||
}
|
||||
getArchetype() {
|
||||
let comp = foundry.utils.duplicate(this.items.find(item => item.type == 'archetype') || {name: "Pas d'archetype"})
|
||||
if (comp && comp.system) {
|
||||
comp.tarot = MaleficesUtility.getTarot(comp.system.lametutelaire)
|
||||
}
|
||||
|
||||
return comp;
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
getElementsBio() {
|
||||
let comp = foundry.utils.duplicate(this.items.filter(item => item.type == 'elementbio') || [])
|
||||
MaleficesUtility.sortArrayObjectsByName(comp)
|
||||
return comp;
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
getTarots() {
|
||||
let comp = foundry.utils.duplicate(this.items.filter(item => item.type == 'tarot' && !item.system.isgm) || [])
|
||||
MaleficesUtility.sortArrayObjectsByName(comp)
|
||||
return comp;
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
getHiddenTarots() {
|
||||
let comp = foundry.utils.duplicate(this.items.filter(item => item.type == 'tarot' && item.system.isgm) || [])
|
||||
MaleficesUtility.sortArrayObjectsByName(comp)
|
||||
return comp;
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
getArmes() {
|
||||
let comp = foundry.utils.duplicate(this.items.filter(item => item.type == 'arme') || [])
|
||||
let comp = duplicate(this.items.filter(item => item.type == 'arme') || [])
|
||||
MaleficesUtility.sortArrayObjectsByName(comp)
|
||||
return comp;
|
||||
}
|
||||
@ -127,7 +96,7 @@ export class MaleficesActor extends Actor {
|
||||
getItemById(id) {
|
||||
let item = this.items.find(item => item.id == id);
|
||||
if (item) {
|
||||
item = foundry.utils.duplicate(item)
|
||||
item = duplicate(item)
|
||||
}
|
||||
return item;
|
||||
}
|
||||
@ -173,7 +142,7 @@ export class MaleficesActor extends Actor {
|
||||
|
||||
/* ------------------------------------------- */
|
||||
async buildContainerTree() {
|
||||
let equipments = foundry.utils.duplicate(this.items.filter(item => item.type == "equipment") || [])
|
||||
let equipments = duplicate(this.items.filter(item => item.type == "equipment") || [])
|
||||
for (let equip1 of equipments) {
|
||||
if (equip1.system.iscontainer) {
|
||||
equip1.system.contents = []
|
||||
@ -229,22 +198,22 @@ export class MaleficesActor extends Actor {
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
getInitiativeScore(combatId, combatantId) {
|
||||
let init = Math.floor( (this.system.attributs.physique.value+this.system.attributs.habilite.value) / 2)
|
||||
let init = Math.floor(this.system.attributs.physique.value+this.system.attributs.habilete.value)
|
||||
let subvalue = new Roll("1d20").roll({async: false})
|
||||
return init + (subvalue.total / 100)
|
||||
return init + (subvalue / 100)
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getSubActors() {
|
||||
let subActors = [];
|
||||
for (let id of this.system.subactors) {
|
||||
subActors.push(foundry.utils.duplicate(game.actors.get(id)))
|
||||
subActors.push(duplicate(game.actors.get(id)))
|
||||
}
|
||||
return subActors;
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
async addSubActor(subActorId) {
|
||||
let subActors = foundry.utils.duplicate(this.system.subactors);
|
||||
let subActors = duplicate(this.system.subactors);
|
||||
subActors.push(subActorId);
|
||||
await this.update({ 'system.subactors': subActors });
|
||||
}
|
||||
@ -272,29 +241,7 @@ export class MaleficesActor extends Actor {
|
||||
await this.createEmbeddedDocuments('Item', [newItem]);
|
||||
}
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
incDecFluide(value) {
|
||||
let fluide = this.system.fluide + value
|
||||
this.update( {'system.fluide': fluide} )
|
||||
}
|
||||
incDecDestin(value) {
|
||||
let destin = this.system.pointdestin + value
|
||||
this.update( {'system.pointdestin': destin} )
|
||||
}
|
||||
incDecMPMB(value) {
|
||||
let mpmb = this.system.mpmb + value
|
||||
this.update( {'system.mpmb': mpmb} )
|
||||
}
|
||||
incDecMPMN(value) {
|
||||
let mpmn = this.system.mpmn + value
|
||||
this.update( {'system.mpmn': mpmn} )
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
incDecAttr(attrKey, value) {
|
||||
let attr = foundry.utils.duplicate(this.system.attributs[attrKey])
|
||||
attr.value += value
|
||||
this.update( { [`system.attributs.${attrKey}`]: attr})
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async incDecQuantity(objetId, incDec = 0) {
|
||||
let objetQ = this.items.get(objetId)
|
||||
@ -321,12 +268,6 @@ export class MaleficesActor extends Actor {
|
||||
return `systems/fvtt-malefices/images/icons/${attrKey}.webp`
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
incDecDestin( value) {
|
||||
let newValue = Math.max( this.system.pointdestin + value, 0)
|
||||
this.update( {'system.pointdestin': newValue})
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getCommonRollData() {
|
||||
|
||||
@ -336,12 +277,6 @@ export class MaleficesActor extends Actor {
|
||||
rollData.actorId = this.id
|
||||
rollData.img = this.img
|
||||
rollData.phyMalus = this.getPhysiqueMalus()
|
||||
rollData.elementsbio = this.getElementsBio()
|
||||
rollData.destin = this.system.pointdestin
|
||||
rollData.isReroll = false
|
||||
rollData.confrontationDegre = 0
|
||||
rollData.confrontationModif = 0
|
||||
rollData.config = game.system.malefices.config
|
||||
|
||||
console.log("ROLLDATA", rollData)
|
||||
|
||||
@ -359,7 +294,7 @@ export class MaleficesActor extends Actor {
|
||||
rollAttribut(attrKey) {
|
||||
let attr = this.system.attributs[attrKey]
|
||||
let rollData = this.getCommonRollData()
|
||||
rollData.attr = foundry.utils.duplicate(attr)
|
||||
rollData.attr = duplicate(attr)
|
||||
rollData.mode = "attribut"
|
||||
rollData.title = attr.label
|
||||
rollData.img = this.getAtttributImage(attrKey)
|
||||
@ -370,12 +305,12 @@ export class MaleficesActor extends Actor {
|
||||
rollArme(weaponId) {
|
||||
let arme = this.items.get(weaponId)
|
||||
if (arme) {
|
||||
arme = foundry.utils.duplicate(arme)
|
||||
arme = duplicate(arme)
|
||||
let rollData = this.getCommonRollData()
|
||||
if (arme.system.armetype == "mainsnues" || arme.system.armetype == "epee") {
|
||||
rollData.attr = { label: "(Physique+Habilité)/2", value: Math.floor( (this.getPhysiqueMalus()+this.system.attributs.physique.value+this.system.attributs.habilite.value) / 2) }
|
||||
rollData.attr = { label: "(Physique+Habilité)/2", value: Math.floor( (this.getPhysiqueMalus()+this.system.attributs.physique+this.system.attributs.habilite) / 2) }
|
||||
} else {
|
||||
rollData.attr = foundry.utils.duplicate(this.system.attributs.habilite)
|
||||
rollData.attr = duplicate(this.system.attributs.habilite)
|
||||
}
|
||||
rollData.mode = "arme"
|
||||
rollData.arme = arme
|
||||
|
@ -2,8 +2,6 @@
|
||||
|
||||
import { MaleficesUtility } from "./malefices-utility.js";
|
||||
import { MaleficesRollDialog } from "./malefices-roll-dialog.js";
|
||||
import { MaleficesTirageTarotDialog } from "./malefices-tirage-tarot-dialog.js"
|
||||
import { MaleficesCharacterSummary } from "./malefices-summary-app.js"
|
||||
|
||||
/* -------------------------------------------- */
|
||||
export class MaleficesCommands {
|
||||
@ -11,9 +9,8 @@ export class MaleficesCommands {
|
||||
static init() {
|
||||
if (!game.system.malefices.commands) {
|
||||
const commands = new MaleficesCommands();
|
||||
commands.registerCommand({ path: ["/tirage"], func: (content, msg, params) => MaleficesCommands.createTirage(msg), descr: "Tirage des tarots" });
|
||||
commands.registerCommand({ path: ["/carte"], func: (content, msg, params) => MaleficesCommands.tirerCarte(msg), descr: "Tirer une carte" });
|
||||
commands.registerCommand({ path: ["/resume"], func: (content, msg, params) => MaleficesCharacterSummary.displayPCSummary(), descr: "Affiche la liste des PJs!" });
|
||||
//crucibleCommands.registerCommand({ path: ["/char"], func: (content, msg, params) => crucibleCommands.createChar(msg), descr: "Create a new character" });
|
||||
//crucibleCommands.registerCommand({ path: ["/pool"], func: (content, msg, params) => crucibleCommands.poolRoll(msg), descr: "Generic Roll Window" });
|
||||
game.system.malefices.commands = commands;
|
||||
}
|
||||
}
|
||||
@ -103,45 +100,18 @@ export class MaleficesCommands {
|
||||
static _chatAnswer(msg, content) {
|
||||
msg.whisper = [game.user.id];
|
||||
msg.content = content;
|
||||
ChatMessage.create(msg);
|
||||
ChatMessage.create(msg);
|
||||
}
|
||||
|
||||
/* --------------------------------------------- */
|
||||
static async createTirage(msg) {
|
||||
if (game.user.isGM) {
|
||||
let tirageData = {
|
||||
state: 'select-player',
|
||||
nbCard: 0,
|
||||
maxPlayerCard: 4,
|
||||
maxSecretCard: 1,
|
||||
cards: [],
|
||||
players: foundry.utils.duplicate(game.users),
|
||||
secretCards: [],
|
||||
deck: MaleficesUtility.getTarots()
|
||||
}
|
||||
for (let i = 0; i < 4; i++) {
|
||||
tirageData.cards.push({ name: "???", img: "systems/fvtt-malefices/images/tarots/background.webp" })
|
||||
}
|
||||
tirageData.secretCards.push({ name: "???", img: "systems/fvtt-malefices/images/tarots/background.webp" })
|
||||
|
||||
let tirageDialog = await MaleficesTirageTarotDialog.create(this, tirageData)
|
||||
tirageDialog.render(true)
|
||||
}
|
||||
}
|
||||
/* --------------------------------------------- */
|
||||
static async tirerCarte(msg) {
|
||||
let deck = MaleficesUtility.getTarots()
|
||||
let index = Math.round(Math.random() * (deck.length-1))
|
||||
let selectedCard = deck[index]
|
||||
selectedCard.system.ispositif = true
|
||||
if ( selectedCard.system.isdualside) { // Cas des cartes pouvant avoir 2 sens
|
||||
selectedCard.system.ispositif = (Math.random() > 0.5)
|
||||
}
|
||||
selectedCard.system.isgm = false
|
||||
selectedCard.value = (selectedCard.system.ispositif)? selectedCard.system.numericvalueup : selectedCard.system.numericvaluedown
|
||||
MaleficesUtility.createChatMessage(game.user.name, "", {
|
||||
content: await renderTemplate(`systems/fvtt-malefices/templates/chat/display-tarot-card.hbs`, selectedCard)
|
||||
})
|
||||
/* -------------------------------------------- */
|
||||
async poolRoll( msg) {
|
||||
let rollData = MaleficesUtility.getBasicRollData()
|
||||
rollData.alias = "Dice Pool Roll",
|
||||
rollData.mode = "generic"
|
||||
rollData.title = `Dice Pool Roll`;
|
||||
|
||||
let rollDialog = await MaleficesRollDialog.create( this, rollData);
|
||||
rollDialog.render( true );
|
||||
}
|
||||
|
||||
}
|
@ -1,20 +1,5 @@
|
||||
|
||||
export const MALEFICES_CONFIG = {
|
||||
attributs: {
|
||||
"constitution": "Cons",
|
||||
"physique": "Phy",
|
||||
"culturegenerale": "CGén",
|
||||
"habilite": "Hab",
|
||||
"perception": "Per",
|
||||
"spiritualite": "Spi",
|
||||
"rationnalite": "Rat"
|
||||
},
|
||||
|
||||
tarotType: {
|
||||
"majeur": "Arcane Majeur",
|
||||
"mineur": "Arcane Mineur",
|
||||
"metier": "Arcane de Métier",
|
||||
},
|
||||
|
||||
armeTypes : {
|
||||
"fusilchasse": "Fusil de Chasse",
|
||||
@ -27,41 +12,4 @@ export const MALEFICES_CONFIG = {
|
||||
"epee": "Epée, sabre, javelot, etc",
|
||||
"mainsnues": "Mains Nues"
|
||||
},
|
||||
|
||||
confrontationDegreOptions :{
|
||||
"0": "0",
|
||||
"1": "1",
|
||||
"2": "2",
|
||||
"3": "3",
|
||||
"4": "4",
|
||||
"5": "5"
|
||||
},
|
||||
|
||||
confrontationModifOptions: {
|
||||
"-1": "-1",
|
||||
"0": "0",
|
||||
"1": "+1"
|
||||
},
|
||||
|
||||
bonusMalusPersoOptions: [
|
||||
{value: "-3", label: "-3"},
|
||||
{value: "-2", label: "-2"},
|
||||
{value: "-1", label: "-1"},
|
||||
{value: "0", label: "0"},
|
||||
{value: "+1", label: "+1"},
|
||||
{value: "+2", label: "+2"},
|
||||
{value: "+3", label: "+3"}
|
||||
],
|
||||
bonusMalusDefOptions: [
|
||||
{value: "-6", label: "-6 (réussite critique)"},
|
||||
{value: "-3", label: "-3 (réussite)"},
|
||||
{value: "0", label: "0 (echec ou pas d'esquive)"},
|
||||
{value: "+3", label: "+3 (echec critique)"}
|
||||
],
|
||||
bonusMalusPorteeOptions: [
|
||||
{value: "1", label: "+1 (Portée courte)"},
|
||||
{value: "0", label: "0 (Portée moyenne)"},
|
||||
{value: "-1", label: "-1 (Portée longue)"}
|
||||
]
|
||||
|
||||
}
|
@ -9,16 +9,30 @@ export class MaleficesItemSheet extends ItemSheet {
|
||||
/** @override */
|
||||
static get defaultOptions() {
|
||||
|
||||
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||
return mergeObject(super.defaultOptions, {
|
||||
classes: ["fvtt-malefices", "sheet", "item"],
|
||||
template: "systems/fvtt-malefices/templates/item-sheet.hbs",
|
||||
dragDrop: [{ dragSelector: null, dropSelector: null }],
|
||||
width: 620,
|
||||
height: 580,
|
||||
height: 480,
|
||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }]
|
||||
});
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
_getHeaderButtons() {
|
||||
let buttons = super._getHeaderButtons();
|
||||
// Add "Post to chat" button
|
||||
// We previously restricted this to GM and editable items only. If you ever find this comment because it broke something: eh, sorry!
|
||||
buttons.unshift(
|
||||
{
|
||||
class: "post",
|
||||
icon: "fas fa-comment",
|
||||
onclick: ev => { }
|
||||
})
|
||||
return buttons
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/** @override */
|
||||
setPosition(options = {}) {
|
||||
@ -43,20 +57,15 @@ export class MaleficesItemSheet extends ItemSheet {
|
||||
name: this.object.name,
|
||||
editable: this.isEditable,
|
||||
cssClass: this.isEditable ? "editable" : "locked",
|
||||
system: foundry.utils.duplicate(this.object.system),
|
||||
config: foundry.utils.duplicate(game.system.malefices.config),
|
||||
system: duplicate(this.object.system),
|
||||
config: duplicate(game.system.malefices.config),
|
||||
limited: this.object.limited,
|
||||
options: this.options,
|
||||
owner: this.document.isOwner,
|
||||
description: await TextEditor.enrichHTML(this.object.system.description, { async: true }),
|
||||
notes: await TextEditor.enrichHTML(this.object.system.notes, { async: true }),
|
||||
isGM: game.user.isGM
|
||||
}
|
||||
|
||||
if ( this.object.type == "archetype") {
|
||||
formData.tarots = MaleficesUtility.getTarots()
|
||||
}
|
||||
|
||||
this.options.editable = !(this.object.origin == "embeddedItem");
|
||||
console.log("ITEM DATA", formData, this);
|
||||
return formData;
|
||||
@ -76,7 +85,7 @@ export class MaleficesItemSheet extends ItemSheet {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
postItem() {
|
||||
let chatData = foundry.utils.duplicate(this.item)
|
||||
let chatData = duplicate(this.item)
|
||||
if (this.actor) {
|
||||
chatData.actor = { id: this.actor.id };
|
||||
}
|
||||
|
@ -1,12 +1,8 @@
|
||||
import { MaleficesUtility } from "./malefices-utility.js";
|
||||
|
||||
export const defaultItemImg = {
|
||||
arme: "systems/fvtt-malefices/images/icons/arme.webp",
|
||||
equipement: "systems/fvtt-malefices/images/icons/equipement.webp",
|
||||
elementbio: "systems/fvtt-malefices/images/icons/wisdom.webp",
|
||||
archetype: "systems/fvtt-malefices/images/icons/archetype.webp",
|
||||
tarot: "systems/fvtt-malefices/images/icons/tarot.webp",
|
||||
sortilege: "systems/fvtt-malefices/images/icons/sortilege.webp",
|
||||
//skill: "systems/fvtt-malefices/images/icons/skill1.webp",
|
||||
arme: "systems/fvtt-malefices/images/icones/arme.webp"
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -16,9 +16,7 @@ import { MaleficesUtility } from "./malefices-utility.js";
|
||||
import { MaleficesCombat } from "./malefices-combat.js";
|
||||
import { MaleficesItem } from "./malefices-item.js";
|
||||
import { MaleficesHotbar } from "./malefices-hotbar.js"
|
||||
import { MaleficesCharacterSummary } from "./malefices-summary-app.js"
|
||||
import { MALEFICES_CONFIG } from "./malefices-config.js"
|
||||
import { ClassCounter} from "https://www.uberwald.me/fvtt_appcount/count-class-ready.js"
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/* Foundry VTT Initialization */
|
||||
@ -28,7 +26,7 @@ import { ClassCounter} from "https://www.uberwald.me/fvtt_appcount/count-class-r
|
||||
Hooks.once("init", async function () {
|
||||
|
||||
console.log(`Initializing Malefices RPG`);
|
||||
|
||||
|
||||
game.system.malefices = {
|
||||
config: MALEFICES_CONFIG,
|
||||
MaleficesHotbar
|
||||
@ -66,22 +64,16 @@ Hooks.once("init", async function () {
|
||||
Items.registerSheet("fvtt-malefices", MaleficesItemSheet, { makeDefault: true });
|
||||
|
||||
MaleficesUtility.init()
|
||||
|
||||
});
|
||||
|
||||
/* -------------------------------------------- */
|
||||
function welcomeMessage() {
|
||||
if (game.user.isGM) {
|
||||
ChatMessage.create({
|
||||
user: game.user.id,
|
||||
whisper: [game.user.id],
|
||||
content: `<div id="welcome-message-malefices"><span class="rdd-roll-part">
|
||||
<strong>Bienvenu dans Malefices, le JDR qui sent le souffre !</strong>
|
||||
<p>Le Livre de Base de Maléfices v4 est nécessaire pour jouer : https://arkhane-asylum.fr/en/malefices/</p>
|
||||
<p>Maléfices et un jeu de rôle publié par Arkhane Asylum Publishing, tout les droits leur appartiennent.</p>
|
||||
<p>Système développé par LeRatierBretonnien avec l'aide de la Dame du Lac et Malik, support sur le <a href="https://discord.gg/pPSDNJk">Discord FR de Foundry</a>.</p>
|
||||
<p>Commandes : /tirage pour le tirage des tarots, /carte pour tirer une simple carte et /resume pour le résumé des PJs (MJ seulement)` });
|
||||
}
|
||||
ChatMessage.create({
|
||||
user: game.user.id,
|
||||
whisper: [game.user.id],
|
||||
content: `<div id="welcome-message-Malefices"><span class="rdd-roll-part">
|
||||
<strong>Bienvenu dans Malefices, le JDR qui sent le souffre !</strong>
|
||||
` });
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -97,15 +89,18 @@ Hooks.once("ready", function () {
|
||||
user: game.user._id
|
||||
});
|
||||
}
|
||||
|
||||
// CSS patch for v9
|
||||
if (game.version) {
|
||||
let sidebar = document.getElementById("sidebar");
|
||||
sidebar.style.width = "min-content";
|
||||
}
|
||||
|
||||
ClassCounter.registerUsageCount();
|
||||
welcomeMessage();
|
||||
MaleficesUtility.ready()
|
||||
MaleficesCharacterSummary.ready()
|
||||
|
||||
MaleficesUtility.init()
|
||||
})
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/* Foundry VTT Initialization */
|
||||
/* -------------------------------------------- */
|
||||
@ -113,7 +108,7 @@ Hooks.on("chatMessage", (html, content, msg) => {
|
||||
if (content[0] == '/') {
|
||||
let regExp = /(\S+)/g;
|
||||
let commands = content.match(regExp);
|
||||
if (game.system.malefices.commands.processChatCommand(commands, content, msg)) {
|
||||
if (game.system.Malefices.commands.processChatCommand(commands, content, msg)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ export class MaleficesNPCSheet extends ActorSheet {
|
||||
/** @override */
|
||||
static get defaultOptions() {
|
||||
|
||||
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||
return mergeObject(super.defaultOptions, {
|
||||
classes: ["Malefices", "sheet", "actor"],
|
||||
template: "systems/fvtt-malefices/templates/npc-sheet.html",
|
||||
width: 640,
|
||||
@ -25,7 +25,7 @@ export class MaleficesNPCSheet extends ActorSheet {
|
||||
/* -------------------------------------------- */
|
||||
async getData() {
|
||||
const objectData = this.object.system
|
||||
let actorData = foundry.utils.duplicate(objectData)
|
||||
let actorData = duplicate(objectData)
|
||||
|
||||
let formData = {
|
||||
title: this.title,
|
||||
@ -38,16 +38,16 @@ export class MaleficesNPCSheet extends ActorSheet {
|
||||
data: actorData,
|
||||
limited: this.object.limited,
|
||||
skills: this.actor.getSkills( ),
|
||||
weapons: this.actor.checkAndPrepareEquipments( foundry.utils.duplicate(this.actor.getWeapons()) ),
|
||||
armors: this.actor.checkAndPrepareEquipments( foundry.utils.duplicate(this.actor.getArmors())),
|
||||
shields: this.actor.checkAndPrepareEquipments( foundry.utils.duplicate(this.actor.getShields())),
|
||||
spells: this.actor.checkAndPrepareEquipments( foundry.utils.duplicate(this.actor.getLore())),
|
||||
equipments: this.actor.checkAndPrepareEquipments(foundry.utils.duplicate(this.actor.getEquipmentsOnly()) ),
|
||||
equippedWeapons: this.actor.checkAndPrepareEquipments(foundry.utils.duplicate(this.actor.getEquippedWeapons()) ),
|
||||
weapons: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getWeapons()) ),
|
||||
armors: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getArmors())),
|
||||
shields: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getShields())),
|
||||
spells: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getLore())),
|
||||
equipments: this.actor.checkAndPrepareEquipments(duplicate(this.actor.getEquipmentsOnly()) ),
|
||||
equippedWeapons: this.actor.checkAndPrepareEquipments(duplicate(this.actor.getEquippedWeapons()) ),
|
||||
equippedArmor: this.actor.getEquippedArmor(),
|
||||
equippedShield: this.actor.getEquippedShield(),
|
||||
subActors: foundry.utils.duplicate(this.actor.getSubActors()),
|
||||
moneys: foundry.utils.duplicate(this.actor.getMoneys()),
|
||||
subActors: duplicate(this.actor.getSubActors()),
|
||||
moneys: duplicate(this.actor.getMoneys()),
|
||||
encCapacity: this.actor.getEncumbranceCapacity(),
|
||||
saveRolls: this.actor.getSaveRoll(),
|
||||
conditions: this.actor.getConditions(),
|
||||
|
@ -5,32 +5,26 @@ export class MaleficesRollDialog extends Dialog {
|
||||
/* -------------------------------------------- */
|
||||
static async create(actor, rollData) {
|
||||
|
||||
let options = { classes: ["MaleficesDialog"], width: 540, height: 'fit-content', 'z-index': 99999 }
|
||||
let html
|
||||
if (rollData.attr && rollData.attr.iscard) {
|
||||
html = await renderTemplate('systems/fvtt-malefices/templates/dialogs/confrontation-dialog.hbs', rollData);
|
||||
} else {
|
||||
html = await renderTemplate('systems/fvtt-malefices/templates/dialogs/roll-dialog-generic.hbs', rollData);
|
||||
}
|
||||
let options = { classes: ["MaleficesDialog"], width: 540, height: 'fit-content', 'z-index': 99999 };
|
||||
let html = await renderTemplate('systems/fvtt-malefices/templates/dialogs/roll-dialog-generic.hbs', rollData);
|
||||
|
||||
return new MaleficesRollDialog(actor, rollData, html, options);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
constructor(actor, rollData, html, options, close = undefined) {
|
||||
let isCard = rollData.attr && rollData.attr.iscard
|
||||
let conf = {
|
||||
title: (isCard) ? "Jet" : "Tirage",
|
||||
title: (rollData.mode == "skill") ? "Skill" : "Attribute",
|
||||
content: html,
|
||||
buttons: {
|
||||
roll: {
|
||||
icon: '<i class="fas fa-check"></i>',
|
||||
label: (isCard) ? "Tirer une carte" : "Lancer le dé",
|
||||
label: "Roll !",
|
||||
callback: () => { this.roll() }
|
||||
},
|
||||
cancel: {
|
||||
icon: '<i class="fas fa-times"></i>',
|
||||
label: "Annuler",
|
||||
label: "Cancel",
|
||||
callback: () => { this.close() }
|
||||
}
|
||||
},
|
||||
@ -45,12 +39,7 @@ export class MaleficesRollDialog extends Dialog {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
roll() {
|
||||
let isCard = this.rollData.attr && this.rollData.attr.iscard
|
||||
if (isCard) {
|
||||
MaleficesUtility.tirageConfrontationMalefices(this.rollData)
|
||||
} else {
|
||||
MaleficesUtility.rollMalefices(this.rollData)
|
||||
}
|
||||
MaleficesUtility.rollMalefices(this.rollData)
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -78,15 +67,6 @@ export class MaleficesRollDialog extends Dialog {
|
||||
html.find('#bonusMalusDef').change((event) => {
|
||||
this.rollData.bonusMalusDef = Number(event.currentTarget.value)
|
||||
})
|
||||
html.find('#bonusMalusPortee').change((event) => {
|
||||
this.rollData.bonusMalusPortee = Number(event.currentTarget.value)
|
||||
})
|
||||
html.find('#confrontationDegre').change((event) => {
|
||||
this.rollData.confrontationDegre = Number(event.currentTarget.value)
|
||||
})
|
||||
html.find('#confrontationModif').change((event) => {
|
||||
this.rollData.confrontationModif = Number(event.currentTarget.value)
|
||||
})
|
||||
|
||||
}
|
||||
}
|
@ -1,134 +0,0 @@
|
||||
/* -------------------------------------------- */
|
||||
import { MaleficesUtility } from "./malefices-utility.js";
|
||||
|
||||
/* -------------------------------------------- */
|
||||
export class MaleficesCharacterSummary extends Application {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static displayPCSummary() {
|
||||
if (game.user.isGM) {
|
||||
game.system.malefices.charSummary.render(true)
|
||||
} else {
|
||||
ui.notifications.info("Commande /tirage réservée au MJ !")
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
updatePCSummary() {
|
||||
if (this.rendered) {
|
||||
this.render(true)
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static createSummaryPos() {
|
||||
return { top: 200, left: 200 };
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static ready() {
|
||||
if (!game.user.isGM) { // Uniquement si GM
|
||||
return
|
||||
}
|
||||
let charSummary = new MaleficesCharacterSummary()
|
||||
game.system.malefices.charSummary = charSummary
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
constructor() {
|
||||
super();
|
||||
//game.settings.set("world", "character-summary-data", {npcList: [], x:0, y:0})
|
||||
this.settings = game.settings.get("world", "character-summary-data")
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static get defaultOptions() {
|
||||
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||
template: "systems/fvtt-malefices/templates/dialogs/character-summary.hbs",
|
||||
popOut: true,
|
||||
resizable: true,
|
||||
dragDrop: [{ dragSelector: ".items-list .item", dropSelector: null }],
|
||||
classes: ["bol", "dialog"], width: 920, height: 'fit-content'
|
||||
})
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getData() {
|
||||
let formData = super.getData();
|
||||
|
||||
formData.pcs = game.actors.filter(ac => ac.type == "personnage" && ac.hasPlayerOwner)
|
||||
formData.npcs = []
|
||||
let newList = []
|
||||
let toUpdate = false
|
||||
for (let actorId of this.settings.npcList) {
|
||||
let actor = game.actors.get(actorId)
|
||||
if (actor) {
|
||||
formData.npcs.push(actor)
|
||||
newList.push(actorId)
|
||||
} else {
|
||||
toUpdate = true
|
||||
}
|
||||
}
|
||||
formData.config = game.system.malefices.config
|
||||
|
||||
if (toUpdate) {
|
||||
this.settings.npcList = newList
|
||||
//console.log("Going to update ...", this.settings)
|
||||
game.settings.set("world", "character-summary-data", this.settings)
|
||||
}
|
||||
|
||||
return formData
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
updateNPC() {
|
||||
game.settings.set("world", "character-summary-data", game.system.malefices.charSummary.settings)
|
||||
game.system.malefices.charSummary.close()
|
||||
setTimeout(function () { game.system.malefices.charSummary.render(true) }, 500)
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async _onDrop(event) {
|
||||
//console.log("Dragged data are : ", dragData)
|
||||
let data = event.dataTransfer.getData('text/plain')
|
||||
let dataItem = JSON.parse(data)
|
||||
let actor = fromUuidSync(dataItem.uuid)
|
||||
if (actor) {
|
||||
game.system.malefices.charSummary.settings.npcList.push(actor.id)
|
||||
game.system.malefices.charSummary.updateNPC()
|
||||
|
||||
} else {
|
||||
ui.notifications.warn("Pas d'acteur trouvé")
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/** @override */
|
||||
async activateListeners(html) {
|
||||
super.activateListeners(html);
|
||||
|
||||
html.find('.actor-open').click((event) => {
|
||||
const li = $(event.currentTarget).parents(".item")
|
||||
const actor = game.actors.get(li.data("actor-id"))
|
||||
actor.sheet.render(true)
|
||||
})
|
||||
|
||||
html.find('.summary-roll').click((event) => {
|
||||
const li = $(event.currentTarget).parents(".item")
|
||||
const actor = game.actors.get(li.data("actor-id"))
|
||||
let type = $(event.currentTarget).data("type")
|
||||
let key = $(event.currentTarget).data("key")
|
||||
actor.rollAttribut(key)
|
||||
})
|
||||
|
||||
html.find('.actor-delete').click(event => {
|
||||
const li = $(event.currentTarget).parents(".item");
|
||||
let actorId = li.data("actor-id")
|
||||
let newList = game.system.malefices.charSummary.settings.npcList.filter(id => id != actorId)
|
||||
game.system.malefices.charSummary.settings.npcList = newList
|
||||
game.system.malefices.charSummary.updateNPC()
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -1,155 +0,0 @@
|
||||
import { MaleficesUtility } from "./malefices-utility.js";
|
||||
|
||||
export class MaleficesTirageTarotDialog extends Dialog {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async create(actor, tirageData) {
|
||||
|
||||
let options = { classes: ["MaleficesDialog"], width: 720, height: 740, 'z-index': 99999 };
|
||||
let html = await renderTemplate('systems/fvtt-malefices/templates/dialogs/tirage-tarot-dialog.hbs', tirageData);
|
||||
|
||||
return new MaleficesTirageTarotDialog(actor, tirageData, html, options);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
constructor(actor, tirageData, html, options, close = undefined) {
|
||||
let conf = {
|
||||
title: "Tirage des tarots",
|
||||
content: html,
|
||||
buttons: {
|
||||
cancel: {
|
||||
icon: '<i class="fas fa-times"></i>',
|
||||
label: "Fermer/Annuler",
|
||||
callback: () => { this.close() }
|
||||
}
|
||||
},
|
||||
close: close
|
||||
}
|
||||
|
||||
super(conf, options);
|
||||
|
||||
this.actor = actor;
|
||||
this.tirageData = tirageData;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async sendCardRequest() {
|
||||
this.tirageData.state = 'waiting-user-card'
|
||||
let msg = await MaleficesUtility.createChatMessage(this.tirageData.user.name, "useronly", {
|
||||
content: await renderTemplate(`systems/fvtt-malefices/templates/chat/request-tarot-card.hbs`, this.tirageData)
|
||||
})
|
||||
//msg.setFlag("world", "tirage-data", this.tirageData)
|
||||
console.log("MSG IS", msg)
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
drawCard() {
|
||||
let index = Math.round(Math.random() * (this.tirageData.deck.length-1))
|
||||
let selectedCard = this.tirageData.deck[index]
|
||||
selectedCard.system.ispositif = true
|
||||
if ( selectedCard.system.isdualside) { // Cas des cartes pouvant avoir 2 sens
|
||||
selectedCard.system.ispositif = (Math.random() > 0.5)
|
||||
}
|
||||
console.log("CARD SELECTED:", selectedCard)
|
||||
// Cas spécial de la Roue de la Fortune
|
||||
if ( selectedCard.name.toLowerCase().includes("fortune")) {
|
||||
this.tirageData.maxPlayerCard += 1
|
||||
this.tirageData.maxSecretCard += 1
|
||||
}
|
||||
let newList = []
|
||||
for(let card of this.tirageData.deck) {
|
||||
if (card.name != selectedCard.name) {
|
||||
newList.push(card)
|
||||
}
|
||||
}
|
||||
this.tirageData.deck = newList
|
||||
|
||||
return selectedCard
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async addCard( msgId ) {
|
||||
MaleficesUtility.removeChatMessageId(msgId)
|
||||
|
||||
let selectedCard = this.drawCard()
|
||||
selectedCard.system.isgm = false
|
||||
await MaleficesUtility.createChatMessage(this.tirageData.user.name, "gmroll", {
|
||||
content: await renderTemplate(`systems/fvtt-malefices/templates/chat/display-tarot-card.hbs`, selectedCard)
|
||||
})
|
||||
if (this.tirageData.cards[0].name == "???") {
|
||||
this.tirageData.cards.shift()
|
||||
}
|
||||
this.tirageData.cards.push(selectedCard)
|
||||
this.tirageData.nbCard++
|
||||
|
||||
if (this.tirageData.nbCard == this.tirageData.maxPlayerCard) {
|
||||
for (let i=0; i<this.tirageData.maxSecretCard; i++) {
|
||||
let selectedCard = this.drawCard()
|
||||
selectedCard.system.isgm = true
|
||||
await MaleficesUtility.createChatMessage(this.tirageData.user.name, "blindroll", {
|
||||
content: await renderTemplate(`systems/fvtt-malefices/templates/chat/display-tarot-card.hbs`, selectedCard)
|
||||
})
|
||||
if (this.tirageData.secretCards[0].name == "???") {
|
||||
this.tirageData.secretCards.shift()
|
||||
}
|
||||
this.tirageData.secretCards.push(selectedCard)
|
||||
}
|
||||
this.tirageData.actors = foundry.utils.duplicate(game.actors)
|
||||
this.tirageData.state = 'attribute-to-actor'
|
||||
}else {
|
||||
this.sendCardRequest()
|
||||
}
|
||||
this.refreshDialog()
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async processSelectedPlayer() {
|
||||
let user = game.users.get(this.tirageData.playerId)
|
||||
this.tirageData.user = user
|
||||
this.tirageData.players = null
|
||||
console.log("Going to work with ", user.name)
|
||||
game.system.malefices.currentTirage = this
|
||||
this.refreshDialog()
|
||||
this.sendCardRequest()
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
attributeToActor(actorId) {
|
||||
let actor = game.actors.get(actorId)
|
||||
if (actor) {
|
||||
actor.createEmbeddedDocuments('Item', this.tirageData.cards)
|
||||
actor.createEmbeddedDocuments('Item', this.tirageData.secretCards)
|
||||
ui.notifications.info("Les cartes ont été attribuées à " + actor.name)
|
||||
}
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
async refreshDialog() {
|
||||
const content = await renderTemplate("systems/fvtt-malefices/templates/dialogs/tirage-tarot-dialog.hbs", this.tirageData)
|
||||
this.data.content = content
|
||||
this.render(true)
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
activateListeners(html) {
|
||||
super.activateListeners(html);
|
||||
|
||||
var dialog = this;
|
||||
function onLoad() {
|
||||
}
|
||||
$(function () { onLoad(); });
|
||||
|
||||
html.find('#playerId').change((event) => {
|
||||
if ( event.currentTarget.value != "none") {
|
||||
dialog.tirageData.playerId = event.currentTarget.value
|
||||
dialog.processSelectedPlayer()
|
||||
}
|
||||
})
|
||||
html.find('#actorId').change((event) => {
|
||||
if ( event.currentTarget.value != "none") {
|
||||
let actorId = event.currentTarget.value
|
||||
dialog.attributeToActor(actorId)
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
}
|
@ -1,22 +1,23 @@
|
||||
/* -------------------------------------------- */
|
||||
import { MaleficesCombat } from "./malefices-combat.js";
|
||||
import { MaleficesCommands } from "./malefices-commands.js";
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
export class MaleficesUtility {
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async init() {
|
||||
Hooks.on('renderChatLog', (log, html, data) => MaleficesUtility.chatListeners(html));
|
||||
/*Hooks.on("dropCanvasData", (canvas, data) => {
|
||||
MaleficesUtility.dropItemOnToken(canvas, data)
|
||||
});*/
|
||||
|
||||
this.rollDataStore = {}
|
||||
this.defenderStore = {}
|
||||
|
||||
MaleficesCommands.init();
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async ready() {
|
||||
|
||||
Handlebars.registerHelper('count', function (list) {
|
||||
return list.length;
|
||||
@ -43,18 +44,6 @@ export class MaleficesUtility {
|
||||
Handlebars.registerHelper('add', function (a, b) {
|
||||
return parseInt(a) + parseInt(b);
|
||||
})
|
||||
|
||||
game.settings.register("world", "character-summary-data", {
|
||||
name: "character-summary-data",
|
||||
scope: "world",
|
||||
config: false,
|
||||
default: { npcList: [], x: 200, y: 200 },
|
||||
type: Object
|
||||
})
|
||||
|
||||
const tarots = await MaleficesUtility.loadCompendium("fvtt-malefices.malefices-tarots")
|
||||
this.tarots = tarots.map(i => i.toObject())
|
||||
|
||||
}
|
||||
|
||||
/*-------------------------------------------- */
|
||||
@ -64,11 +53,54 @@ export class MaleficesUtility {
|
||||
}
|
||||
|
||||
/*-------------------------------------------- */
|
||||
static getTarots() {
|
||||
return foundry.utils.duplicate(this.tarots)
|
||||
static getSkills() {
|
||||
return duplicate(this.skills)
|
||||
}
|
||||
static getTarot(tId) {
|
||||
return this.tarots.find(t => t._id == tId)
|
||||
/*-------------------------------------------- */
|
||||
static getWeaponSkills() {
|
||||
return duplicate(this.weaponSkills)
|
||||
}
|
||||
/*-------------------------------------------- */
|
||||
static getShieldSkills() {
|
||||
return duplicate(this.shieldSkills)
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static isModuleItemAllowed(type) {
|
||||
return __ALLOWED_MODULE_TYPES[type]
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static buildBonusList() {
|
||||
let bonusList = []
|
||||
for (let key in game.system.model.Actor.character.bonus) {
|
||||
let bonuses = game.system.model.Actor.character.bonus[key]
|
||||
for (let bonus in bonuses) {
|
||||
bonusList.push(key + "." + bonus)
|
||||
}
|
||||
}
|
||||
for (let key in game.system.model.Actor.character.attributes) {
|
||||
let attrs = game.system.model.Actor.character.attributes[key]
|
||||
for (let skillKey in attrs.skills) {
|
||||
bonusList.push(key + ".skills." + skillKey + ".modifier")
|
||||
}
|
||||
}
|
||||
for (let key in game.system.model.Actor.character.universal.skills) {
|
||||
bonusList.push("universal.skills." + key + ".modifier")
|
||||
}
|
||||
return bonusList
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async ready() {
|
||||
const skills = await MaleficesUtility.loadCompendium("fvtt-malefices.skills")
|
||||
this.skills = skills.map(i => i.toObject())
|
||||
this.weaponSkills = duplicate(this.skills.filter(item => item.system.isweaponskill))
|
||||
this.shieldSkills = duplicate(this.skills.filter(item => item.system.isshieldskill))
|
||||
|
||||
const rollTables = await MaleficesUtility.loadCompendium("fvtt-malefices.rolltables")
|
||||
this.rollTables = rollTables.map(i => i.toObject())
|
||||
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -84,42 +116,37 @@ export class MaleficesUtility {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static getActorFromRollData(rollData) {
|
||||
let actor = game.actors.get(rollData.actorId)
|
||||
if (rollData.tokenId) {
|
||||
let token = canvas.tokens.placeables.find(t => t.id == rollData.tokenId)
|
||||
if (token) {
|
||||
actor = token.actor
|
||||
}
|
||||
}
|
||||
return actor
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
static drawDeckCard(msgId) {
|
||||
if (game.user.isGM) {
|
||||
game.system.malefices.currentTirage.addCard(msgId)
|
||||
} else {
|
||||
game.socket.emit( "system.fvtt-malefices", {name: "msg-draw-card", data: {msgId: msgId}})
|
||||
static isArmorLight(armor) {
|
||||
if (armor && (armor.system.armortype.includes("light") || armor.system.armortype.includes("clothes"))) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async chatListeners(html) {
|
||||
|
||||
html.on("click", '.roll-destin', event => {
|
||||
let messageId = MaleficesUtility.findChatMessageId(event.currentTarget)
|
||||
let message = game.messages.get(messageId)
|
||||
let rollData = message.getFlag("world", "rolldata")
|
||||
let actor = this.getActorFromRollData(rollData)
|
||||
actor.incDecDestin(-1)
|
||||
rollData.isReroll = true
|
||||
this.rollMalefices(rollData)
|
||||
html.on("click", '.view-item-from-chat', event => {
|
||||
game.system.Malefices.creator.openItemView(event)
|
||||
})
|
||||
html.on("click", '.draw-tarot-card', event => {
|
||||
let messageId = MaleficesUtility.findChatMessageId(event.currentTarget)
|
||||
this.drawDeckCard(messageId)
|
||||
html.on("click", '.roll-defense-melee', event => {
|
||||
let rollId = $(event.currentTarget).data("roll-id")
|
||||
let rollData = MaleficesUtility.getRollData(rollId)
|
||||
rollData.defenseWeaponId = $(event.currentTarget).data("defense-weapon-id")
|
||||
let actor = game.canvas.tokens.get(rollData.defenderTokenId).actor
|
||||
if (actor && (game.user.isGM || actor.isOwner)) {
|
||||
actor.rollDefenseMelee(rollData)
|
||||
}
|
||||
})
|
||||
|
||||
html.on("click", '.roll-defense-ranged', event => {
|
||||
let rollId = $(event.currentTarget).data("roll-id")
|
||||
let rollData = MaleficesUtility.getRollData(rollId)
|
||||
let defender = game.canvas.tokens.get(rollData.defenderTokenId).actor
|
||||
if (defender && (game.user.isGM || defender.isOwner)) {
|
||||
defender.rollDefenseRanged(rollData)
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -196,18 +223,180 @@ export class MaleficesUtility {
|
||||
|
||||
let id = rollData.rollId
|
||||
let oldRollData = this.rollDataStore[id] || {}
|
||||
let newRollData = foundry.utils.mergeObject(oldRollData, rollData)
|
||||
let newRollData = mergeObject(oldRollData, rollData)
|
||||
this.rollDataStore[id] = newRollData
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
static saveRollData(rollData) {
|
||||
game.socket.emit("system.fvtt-malefices", {
|
||||
name: "msg_update_roll", data: rollData
|
||||
}); // Notify all other clients of the roll
|
||||
this.updateRollData(rollData)
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static getRollData(id) {
|
||||
return this.rollDataStore[id]
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async displayDefenseMessage(rollData) {
|
||||
if (rollData.mode == "weapon" && rollData.defenderTokenId) {
|
||||
let defender = game.canvas.tokens.get(rollData.defenderTokenId).actor
|
||||
if (game.user.isGM || (game.user.character && game.user.character.id == defender.id)) {
|
||||
rollData.defender = defender
|
||||
rollData.defenderWeapons = defender.getEquippedWeapons()
|
||||
rollData.isRangedAttack = rollData.weapon?.system.isranged
|
||||
this.createChatWithRollMode(defender.name, {
|
||||
name: defender.name,
|
||||
alias: defender.name,
|
||||
//user: defender.id,
|
||||
content: await renderTemplate(`systems/fvtt-malefices/templates/chat-request-defense.html`, rollData),
|
||||
whisper: [defender.id].concat(ChatMessage.getWhisperRecipients('GM')),
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static getSuccessResult(rollData) {
|
||||
if (rollData.sumSuccess <= -3) {
|
||||
if (rollData.attackRollData.weapon.system.isranged) {
|
||||
return { result: "miss", fumble: true, hpLossType: "melee" }
|
||||
} else {
|
||||
return { result: "miss", fumble: true, attackerHPLoss: "2d3", hpLossType: "melee" }
|
||||
}
|
||||
}
|
||||
if (rollData.sumSuccess == -2) {
|
||||
if (rollData.attackRollData.weapon.system.isranged) {
|
||||
return { result: "miss", dangerous_fumble: true }
|
||||
} else {
|
||||
return { result: "miss", dangerous_fumble: true, attackerHPLoss: "1d3", hpLossType: "melee" }
|
||||
}
|
||||
}
|
||||
if (rollData.sumSuccess == -1) {
|
||||
return { result: "miss" }
|
||||
}
|
||||
if (rollData.sumSuccess == 0) {
|
||||
if (rollData.attackRollData.weapon.system.isranged) {
|
||||
return { result: "target_space", aoe: true }
|
||||
} else {
|
||||
return { result: "clash", hack_vs_shields: true }
|
||||
}
|
||||
}
|
||||
if (rollData.sumSuccess == 1) {
|
||||
return { result: "hit", defenderDamage: "1", entangle: true, knockback: true }
|
||||
}
|
||||
if (rollData.sumSuccess == 2) {
|
||||
return { result: "hit", defenderDamage: "2", critical_1: true, entangle: true, knockback: true, penetrating_impale: true, hack_armors: true }
|
||||
}
|
||||
if (rollData.sumSuccess >= 3) {
|
||||
return { result: "hit", defenderDamage: "3", critical_2: true, entangle: true, knockback: true, penetrating_impale: true, hack_armors: true }
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async getFumble(weapon) {
|
||||
const pack = game.packs.get("fvtt-malefices.rolltables")
|
||||
const index = await pack.getIndex()
|
||||
let entry
|
||||
|
||||
if (weapon.isranged) {
|
||||
entry = index.find(e => e.name === "Fumble! (ranged)")
|
||||
}
|
||||
if (!weapon.isranged) {
|
||||
entry = index.find(e => e.name === "Fumble! (melee)")
|
||||
}
|
||||
let table = await pack.getDocument(entry._id)
|
||||
const draw = await table.draw({ displayChat: false, rollMode: "gmroll" })
|
||||
return draw.results.length > 0 ? draw.results[0] : undefined
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async processSuccessResult(rollData) {
|
||||
if (game.user.isGM) { // Only GM process this
|
||||
let result = rollData.successDetails
|
||||
let attacker = game.actors.get(rollData.actorId)
|
||||
let defender = game.canvas.tokens.get(rollData.attackRollData.defenderTokenId).actor
|
||||
|
||||
if (attacker && result.attackerHPLoss) {
|
||||
result.attackerHPLossValue = await attacker.incDecHP("-" + result.attackerHPLoss)
|
||||
}
|
||||
if (attacker && defender && result.defenderDamage) {
|
||||
let dmgDice = (rollData.attackRollData.weapon.system.isranged) ? "d6" : "d8"
|
||||
result.damageWeaponFormula = result.defenderDamage + dmgDice
|
||||
result.defenderHPLossValue = await defender.incDecHP("-" + result.damageWeaponFormula)
|
||||
}
|
||||
if (result.fumble || (result.dangerous_fumble && MaleficesUtility.isWeaponDangerous(rollData.attackRollData.weapon))) {
|
||||
result.fumbleDetails = await this.getFumble(rollData.weapon)
|
||||
}
|
||||
if (result.critical_1 || result.critical_2) {
|
||||
let isDeadly = MaleficesUtility.isWeaponDeadly(rollData.attackRollData.weapon)
|
||||
result.critical = await this.getCritical((result.critical_1) ? "I" : "II", rollData.attackRollData.weapon)
|
||||
result.criticalText = result.critical.text
|
||||
}
|
||||
this.createChatWithRollMode(rollData.alias, {
|
||||
content: await renderTemplate(`systems/fvtt-malefices/templates/chat-attack-defense-result.html`, rollData)
|
||||
})
|
||||
console.log("Results processed", rollData)
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async processAttackDefense(rollData) {
|
||||
if (rollData.attackRollData) {
|
||||
//console.log("Defender token, ", rollData, rollData.defenderTokenId)
|
||||
let defender = game.canvas.tokens.get(rollData.attackRollData.defenderTokenId).actor
|
||||
let sumSuccess = rollData.attackRollData.nbSuccess - rollData.nbSuccess
|
||||
if (sumSuccess > 0) {
|
||||
let armorResult = await defender.rollArmorDie(rollData)
|
||||
rollData.armorResult = armorResult
|
||||
sumSuccess += rollData.armorResult.nbSuccess
|
||||
if (sumSuccess < 0) { // Never below 0
|
||||
sumSuccess = 0
|
||||
}
|
||||
}
|
||||
rollData.sumSuccess = sumSuccess
|
||||
rollData.successDetails = this.getSuccessResult(rollData)
|
||||
if (game.user.isGM) {
|
||||
this.processSuccessResult(rollData)
|
||||
} else {
|
||||
game.socket.emit("system.fvtt-malefices", { msg: "msg_gm_process_attack_defense", data: rollData });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async onSocketMesssage(msg) {
|
||||
console.log("SOCKET MESSAGE", msg.name)
|
||||
if (msg.name == "msg-draw-card") {
|
||||
if ( game.user.isGM && game.system.malefices.currentTirage) {
|
||||
game.system.malefices.currentTirage.addCard(msg.data.msgId)
|
||||
}
|
||||
if (msg.name == "msg_update_roll") {
|
||||
this.updateRollData(msg.data)
|
||||
}
|
||||
if (msg.name == "msg_gm_process_attack_defense") {
|
||||
this.processSuccessResult(msg.data)
|
||||
}
|
||||
if (msg.name == "msg_gm_item_drop" && game.user.isGM) {
|
||||
let actor = game.actors.get(msg.data.actorId)
|
||||
let item
|
||||
if (msg.data.isPack) {
|
||||
item = await fromUuid("Compendium." + msg.data.isPack + "." + msg.data.itemId)
|
||||
} else {
|
||||
item = game.items.get(msg.data.itemId)
|
||||
}
|
||||
this.addItemDropToActor(actor, item)
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static computeFocusData(focus) {
|
||||
let focusData = {
|
||||
focusPoints: __focusCore[focus.core] + __focusPointTreatment[focus.treatment],
|
||||
burnChance: __burnChanceTreatment[focus.treatment],
|
||||
focusRegen: __focusRegenBond[focus.bond],
|
||||
spellAttackBonus: __bonusSpellAttackBond[focus.bond],
|
||||
spellDamageBonus: __bonusSpellDamageBond[focus.bond]
|
||||
}
|
||||
return focusData
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -223,6 +412,19 @@ export class MaleficesUtility {
|
||||
return item
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static getSpellCost(spell) {
|
||||
return __spellCost[spell.system.level]
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static getArmorPenalty( item ) {
|
||||
if (item && (item.type == "shield" || item.type == "armor")) {
|
||||
return __armorPenalties[item.system.category]
|
||||
}
|
||||
return {}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static chatDataSetup(content, modeOverride, isRoll = false, forceWhisper) {
|
||||
let chatData = {
|
||||
@ -269,152 +471,67 @@ export class MaleficesUtility {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static processSpecialCard(actor, rollData) {
|
||||
if (rollData.selectedCard.name.toLowerCase().includes("archange")) {
|
||||
let actorCard = actor.items.find( c => c.type =="tarot" && c.name.toLowerCase().includes("archange"))
|
||||
if (actorCard) {
|
||||
MaleficesUtility.createChatMessage(actor.name, "gmroll", {
|
||||
content: `Conséquence supplémentaire ! <br>L'Archange : ${actor.name} gagne 1 point de Spiritualité.` })
|
||||
actor.incDecAttr("spiritualite", 1)
|
||||
}
|
||||
}
|
||||
if (rollData.selectedCard.name.toLowerCase().includes("vicaire")) {
|
||||
let actorCard = actor.items.find( c => c.type =="tarot" && c.name.toLowerCase().includes("vicaire"))
|
||||
if (actorCard) {
|
||||
MaleficesUtility.createChatMessage(actor.name, "blindroll", {
|
||||
content: `Conséquence supplémentaire ! <br>Le Vicaire : ${actor.name} vient de gagner 1 point en Pratique de la Magie Blanche (MPMB, secret).` })
|
||||
actor.incDecMPMB(1)
|
||||
}
|
||||
}
|
||||
if (rollData.selectedCard.name.toLowerCase().includes("chance")) {
|
||||
let actorCard = actor.items.find( c => c.type =="tarot" && c.name.toLowerCase().includes("chance"))
|
||||
if (actorCard) {
|
||||
MaleficesUtility.createChatMessage(actor.name, "gmroll", {
|
||||
content: `Conséquence supplémentaire ! <br>La Chance : ${actor.name} a gagné 1 point de Destin.` })
|
||||
actor.incDecDestin(1)
|
||||
}
|
||||
}
|
||||
if (rollData.selectedCard.name.toLowerCase().includes("mort")) {
|
||||
let actorCard = actor.items.find( c => c.type =="tarot" && c.name.toLowerCase().includes("mort"))
|
||||
if (actorCard) {
|
||||
MaleficesUtility.createChatMessage(actor.name, "gmroll", {
|
||||
content: `Conséquence supplémentaire ! <br>La Mort : ${actor.name} est pétrifié par la peur.` })
|
||||
actor.incDecDestin(1)
|
||||
}
|
||||
}
|
||||
if (rollData.selectedCard.name.toLowerCase().includes("diable")) {
|
||||
let actorCard = actor.items.find( c => c.type =="tarot" && c.name.toLowerCase().includes("diable"))
|
||||
if (actorCard) {
|
||||
MaleficesUtility.createChatMessage(actor.name, "gmroll", {
|
||||
content: `Conséquence supplémentaire ! <br>Le Diable : ${actor.name} gagne 1 point de Rationnalité.` })
|
||||
actor.incDecAttr("rationnalite", 1)
|
||||
}
|
||||
}
|
||||
if (rollData.selectedCard.name.toLowerCase().includes("lune noire")) {
|
||||
let actorCard = actor.items.find( c => c.type =="tarot" && c.name.toLowerCase().includes("lune noire"))
|
||||
if (actorCard) {
|
||||
MaleficesUtility.createChatMessage(actor.name, "blindroll", {
|
||||
content: `Conséquence supplémentaire ! <br>La Lune Noire : ${actor.name} vient de gagner 1 point de Fluide (secret).` })
|
||||
actor.incDecFluide(1)
|
||||
}
|
||||
}
|
||||
if (rollData.selectedCard.name.toLowerCase().includes("grand livre")) {
|
||||
let actorCard = actor.items.find( c => c.type =="tarot" && c.name.toLowerCase().includes("grand livre"))
|
||||
if (actorCard) {
|
||||
MaleficesUtility.createChatMessage(actor.name, "blindroll", {
|
||||
content: `Conséquence supplémentaire ! <br>La Lune Noire : ${actor.name} vient de gagner 1 point de Fluide (secret).` })
|
||||
actor.incDecFluide(1)
|
||||
}
|
||||
}
|
||||
if (rollData.selectedCard.name.toLowerCase().includes("sorcier")) {
|
||||
let actorCard = actor.items.find( c => c.type =="tarot" && c.name.toLowerCase().includes("sorcier"))
|
||||
if (actorCard) {
|
||||
MaleficesUtility.createChatMessage(actor.name, "blindroll", {
|
||||
content: `Conséquence supplémentaire ! <br>Le Vicaire : ${actor.name} vient de gagner 1 point en Pratique de la Magie Noire (MPMN, secret).` })
|
||||
actor.incDecMPMN(1)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
static updateSkill(skill) {
|
||||
skill.system.level = skill.system.background + skill.system.basic + skill.system.class + skill.system.explevel
|
||||
if (skill.system.level > 7) { skill.system.level = 7 }
|
||||
skill.system.skilldice = __skillLevel2Dice[skill.system.level]
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static computeResults(rollData) {
|
||||
rollData.isSuccess = false
|
||||
if (rollData.total <= rollData.target) {
|
||||
rollData.isSuccess = true
|
||||
}
|
||||
if (rollData.total == 1) {
|
||||
rollData.isSuccess = true
|
||||
rollData.isCritical = true
|
||||
}
|
||||
if (rollData.total == 20) {
|
||||
rollData.isSuccess = false
|
||||
rollData.isFumble = true
|
||||
}
|
||||
if (rollData.total <= Math.floor(rollData.target / 3)) {
|
||||
rollData.isPart = true
|
||||
}
|
||||
static getDiceFromCover(cover) {
|
||||
if (cover == "cover50") return 1
|
||||
return 0
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
static async tirageConfrontationMalefices(rollData) {
|
||||
let actor = game.actors.get(rollData.actorId)
|
||||
|
||||
rollData.target = rollData.attr.value - rollData.confrontationDegre + rollData.confrontationModif
|
||||
|
||||
let deck = this.getTarots()
|
||||
let index = Math.round(Math.random() * (deck.length-1))
|
||||
let selectedCard = deck[index]
|
||||
selectedCard.system.ispositif = (Math.random() > 0.5)
|
||||
selectedCard.value = (selectedCard.system.ispositif)? selectedCard.system.numericvalueup : selectedCard.system.numericvaluedown
|
||||
rollData.total = selectedCard.value
|
||||
rollData.selectedCard = selectedCard
|
||||
await MaleficesUtility.createChatMessage(actor.name, "gmroll", {
|
||||
content: await renderTemplate(`systems/fvtt-malefices/templates/chat/display-tarot-card.hbs`, selectedCard)
|
||||
})
|
||||
|
||||
this.computeResults(rollData)
|
||||
|
||||
if (rollData.isSuccess) {
|
||||
rollData.gainAttr = Math.ceil(rollData.confrontationDegre/2) + ((rollData.isCritical ) ? 1 : 0)
|
||||
actor.incDecAttr(rollData.attr.abbrev, rollData.gainAttr )
|
||||
} else {
|
||||
rollData.gainAttr = rollData.confrontationDegre
|
||||
actor.incDecAttr(rollData.attr.abbrev, -rollData.gainAttr )
|
||||
}
|
||||
|
||||
await MaleficesUtility.createChatMessage(actor.name, "gmroll", {
|
||||
content: await renderTemplate(`systems/fvtt-malefices/templates/chat/chat-confrontation-result.hbs`, rollData)
|
||||
})
|
||||
this.processSpecialCard(actor, rollData)
|
||||
static getDiceFromSituational(cover) {
|
||||
if (cover == "prone") return 1
|
||||
if (cover == "dodge") return 1
|
||||
if (cover == "moving") return 1
|
||||
if (cover == "engaged") return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async rollMalefices(rollData) {
|
||||
|
||||
let actor = game.actors.get(rollData.actorId)
|
||||
|
||||
|
||||
// Build the dice formula
|
||||
let diceFormula = "1d20"
|
||||
rollData.target = rollData.attr.value + rollData.bonusMalusPerso + rollData.bonusMalusSituation + rollData.bonusMalusDef + rollData.bonusMalusPortee
|
||||
if (rollData.attr.abbrev == "physique") {
|
||||
rollData.target += rollData.phyMalus
|
||||
}
|
||||
rollData.target = rollData.attr.value + rollData.bonusMalusPerso + rollData.bonusMalusSituation + rollData.bonusMalusDef
|
||||
rollData.diceFormula = diceFormula
|
||||
|
||||
// Performs roll
|
||||
console.log("Roll formula", diceFormula)
|
||||
let myRoll = await new Roll(diceFormula).roll()
|
||||
await this.showDiceSoNice(myRoll, game.settings.get("core", "rollMode"))
|
||||
rollData.roll = foundry.utils.duplicate(myRoll)
|
||||
rollData.total = myRoll.total
|
||||
let myRoll = rollData.roll
|
||||
if (!myRoll) { // New rolls only of no rerolls
|
||||
myRoll = new Roll(diceFormula).roll({ async: false })
|
||||
await this.showDiceSoNice(myRoll, game.settings.get("core", "rollMode"))
|
||||
}
|
||||
rollData.roll = myRoll
|
||||
|
||||
this.computeResults(rollData)
|
||||
rollData.isSuccess = false
|
||||
if (myRoll.total <= rollData.target ) {
|
||||
rollData.isSuccess = true
|
||||
}
|
||||
if (myRoll.total == 1 ) {
|
||||
rollData.isSuccess = true
|
||||
rollData.isCritical = true
|
||||
}
|
||||
if (myRoll.total == 20 ) {
|
||||
rollData.isSuccess = false
|
||||
rollData.isFumble = true
|
||||
}
|
||||
if (myRoll.total <= Math.floor(rollData.target/3) ) {
|
||||
rollData.isPart = true
|
||||
}
|
||||
|
||||
let msg = await this.createChatWithRollMode(rollData.alias, {
|
||||
content: await renderTemplate(`systems/fvtt-malefices/templates/chat/chat-generic-result.hbs`, rollData)
|
||||
})
|
||||
msg.setFlag("world", "rolldata", rollData)
|
||||
if (rollData.mode == "initiative") {
|
||||
actor.setFlag("world", "initiative", myRoll.total)
|
||||
actor.setFlag("world", "initiative", myRoll.total)
|
||||
}
|
||||
|
||||
console.log("Rolldata result", rollData)
|
||||
@ -444,17 +561,11 @@ export class MaleficesUtility {
|
||||
switch (rollMode) {
|
||||
case "blindroll": return this.getUsers(user => user.isGM);
|
||||
case "gmroll": return this.getWhisperRecipientsAndGMs(name);
|
||||
case "useronly": return this.getWhisperRecipientsOnly(name);
|
||||
case "selfroll": return [game.user.id];
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
static getWhisperRecipientsOnly(name) {
|
||||
let recep1 = ChatMessage.getWhisperRecipients(name) || [];
|
||||
return recep1
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
static getWhisperRecipientsAndGMs(name) {
|
||||
let recep1 = ChatMessage.getWhisperRecipients(name) || [];
|
||||
return recep1.concat(ChatMessage.getWhisperRecipients('GM'));
|
||||
@ -462,7 +573,7 @@ export class MaleficesUtility {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static blindMessageToGM(chatOptions) {
|
||||
let chatGM = foundry.utils.duplicate(chatOptions);
|
||||
let chatGM = duplicate(chatOptions);
|
||||
chatGM.whisper = this.getUsers(user => user.isGM);
|
||||
chatGM.content = "Blinde message of " + game.user.name + "<br>" + chatOptions.content;
|
||||
console.log("blindMessageToGM", chatGM);
|
||||
@ -488,7 +599,7 @@ export class MaleficesUtility {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async createChatMessage(name, rollMode, chatOptions) {
|
||||
static createChatMessage(name, rollMode, chatOptions) {
|
||||
switch (rollMode) {
|
||||
case "blindroll": // GM only
|
||||
if (!game.user.isGM) {
|
||||
@ -506,17 +617,16 @@ export class MaleficesUtility {
|
||||
break;
|
||||
}
|
||||
chatOptions.alias = chatOptions.alias || name;
|
||||
return await ChatMessage.create(chatOptions);
|
||||
return ChatMessage.create(chatOptions);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static getBasicRollData() {
|
||||
let rollData = {
|
||||
rollId: foundry.utils.randomID(16),
|
||||
rollId: randomID(16),
|
||||
bonusMalusPerso: 0,
|
||||
bonusMalusSituation: 0,
|
||||
bonusMalusDef: 0,
|
||||
bonusMalusPortee: 0,
|
||||
rollMode: game.settings.get("core", "rollMode")
|
||||
}
|
||||
MaleficesUtility.updateWithTarget(rollData)
|
||||
@ -532,8 +642,8 @@ export class MaleficesUtility {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async createChatWithRollMode(name, chatOptions) {
|
||||
return await this.createChatMessage(name, game.settings.get("core", "rollMode"), chatOptions)
|
||||
static createChatWithRollMode(name, chatOptions) {
|
||||
return this.createChatMessage(name, game.settings.get("core", "rollMode"), chatOptions)
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
@ -1 +0,0 @@
|
||||
MANIFEST-000018
|
@ -1,15 +0,0 @@
|
||||
2024/04/26-18:07:32.626395 7efdd82006c0 Recovering log #16
|
||||
2024/04/26-18:07:32.637138 7efdd82006c0 Delete type=3 #14
|
||||
2024/04/26-18:07:32.637193 7efdd82006c0 Delete type=0 #16
|
||||
2024/04/26-18:35:17.538874 7efdd72006c0 Level-0 table #21: started
|
||||
2024/04/26-18:35:17.542754 7efdd72006c0 Level-0 table #21: 50638 bytes OK
|
||||
2024/04/26-18:35:17.548838 7efdd72006c0 Delete type=0 #19
|
||||
2024/04/26-18:35:17.591000 7efdd72006c0 Manual compaction at level-0 from '!items!2HWSdXDSFei9KC6y' @ 72057594037927935 : 1 .. '!items!xtYE2kVIfNtrXSoU' @ 0 : 0; will stop at (end)
|
||||
2024/04/26-18:35:17.591055 7efdd72006c0 Manual compaction at level-1 from '!items!2HWSdXDSFei9KC6y' @ 72057594037927935 : 1 .. '!items!xtYE2kVIfNtrXSoU' @ 0 : 0; will stop at '!items!xtYE2kVIfNtrXSoU' @ 46 : 1
|
||||
2024/04/26-18:35:17.591063 7efdd72006c0 Compacting 1@1 + 1@2 files
|
||||
2024/04/26-18:35:17.595486 7efdd72006c0 Generated table #22@1: 23 keys, 50638 bytes
|
||||
2024/04/26-18:35:17.595513 7efdd72006c0 Compacted 1@1 + 1@2 files => 50638 bytes
|
||||
2024/04/26-18:35:17.602259 7efdd72006c0 compacted to: files[ 0 0 1 0 0 0 0 ]
|
||||
2024/04/26-18:35:17.602378 7efdd72006c0 Delete type=2 #5
|
||||
2024/04/26-18:35:17.602577 7efdd72006c0 Delete type=2 #21
|
||||
2024/04/26-18:35:17.632494 7efdd72006c0 Manual compaction at level-1 from '!items!xtYE2kVIfNtrXSoU' @ 46 : 1 .. '!items!xtYE2kVIfNtrXSoU' @ 0 : 0; will stop at (end)
|
@ -1,8 +0,0 @@
|
||||
2023/10/26-09:14:30.238994 7f5603fff6c0 Recovering log #12
|
||||
2023/10/26-09:14:30.250498 7f5603fff6c0 Delete type=3 #10
|
||||
2023/10/26-09:14:30.250614 7f5603fff6c0 Delete type=0 #12
|
||||
2023/10/26-09:23:17.065670 7f56037fe6c0 Level-0 table #17: started
|
||||
2023/10/26-09:23:17.065742 7f56037fe6c0 Level-0 table #17: 0 bytes OK
|
||||
2023/10/26-09:23:17.072462 7f56037fe6c0 Delete type=0 #15
|
||||
2023/10/26-09:23:17.079476 7f56037fe6c0 Manual compaction at level-0 from '!items!2HWSdXDSFei9KC6y' @ 72057594037927935 : 1 .. '!items!xtYE2kVIfNtrXSoU' @ 0 : 0; will stop at (end)
|
||||
2023/10/26-09:23:17.079561 7f56037fe6c0 Manual compaction at level-1 from '!items!2HWSdXDSFei9KC6y' @ 72057594037927935 : 1 .. '!items!xtYE2kVIfNtrXSoU' @ 0 : 0; will stop at (end)
|
@ -1,9 +0,0 @@
|
||||
{"name":"Pistolet (Petit calibre)","type":"arme","img":"systems/fvtt-malefices/images/icons/revolver.webp","system":{"armetype":"pistoletpetit","porteecourte":5,"porteemoyenne":30,"dommagenormale":3,"dommagepart":5,"dommagecritique":0,"dommagecritiqueKO":false,"dommagecritiquemort":true,"description":""},"effects":[],"flags":{"core":{"sourceId":"Item.JVpvjDTWDo4boT7A"}},"_stats":{"systemId":"fvtt-malefices","systemVersion":"10.0.4","coreVersion":"10.291","createdTime":1675260395590,"modifiedTime":1675372799547,"lastModifiedBy":"R9gIh86vXDB4IFn1"},"folder":null,"sort":0,"ownership":{"default":0,"R9gIh86vXDB4IFn1":3},"_id":"5J6qIaWdnhEGMAXJ"}
|
||||
{"name":"Arc","type":"arme","img":"systems/fvtt-malefices/images/icons/arc.webp","system":{"armetype":"arc","porteecourte":10,"porteemoyenne":30,"dommagenormale":3,"dommagepart":5,"dommagecritique":0,"dommagecritiqueKO":false,"dommagecritiquemort":true,"description":""},"effects":[],"flags":{"core":{"sourceId":"Item.JVpvjDTWDo4boT7A"}},"_stats":{"systemId":"fvtt-malefices","systemVersion":"10.0.4","coreVersion":"10.291","createdTime":1675260395590,"modifiedTime":1675372799550,"lastModifiedBy":"R9gIh86vXDB4IFn1"},"folder":null,"sort":0,"ownership":{"default":0,"R9gIh86vXDB4IFn1":3},"_id":"7keD0tMsa49zblQQ"}
|
||||
{"name":"Fusil de Guerre","type":"arme","img":"systems/fvtt-malefices/images/icons/fusil.webp","system":{"armetype":"fusilguerre","porteecourte":50,"porteemoyenne":200,"dommagenormale":6,"dommagepart":8,"dommagecritique":0,"dommagecritiqueKO":false,"dommagecritiquemort":true,"description":""},"effects":[],"flags":{"core":{"sourceId":"Item.JVpvjDTWDo4boT7A"}},"_stats":{"systemId":"fvtt-malefices","systemVersion":"10.0.4","coreVersion":"10.291","createdTime":1675260395590,"modifiedTime":1675372799544,"lastModifiedBy":"R9gIh86vXDB4IFn1"},"folder":null,"sort":0,"ownership":{"default":0,"R9gIh86vXDB4IFn1":3},"_id":"CSwB7XBdCzNVmQg5"}
|
||||
{"name":"Pistolet (Moyen calibre)","type":"arme","img":"systems/fvtt-malefices/images/icons/revolver.webp","system":{"armetype":"pistoletmoyen","porteecourte":5,"porteemoyenne":30,"dommagenormale":4,"dommagepart":6,"dommagecritique":0,"dommagecritiqueKO":false,"dommagecritiquemort":true,"description":""},"effects":[],"flags":{"core":{"sourceId":"Item.JVpvjDTWDo4boT7A"}},"_stats":{"systemId":"fvtt-malefices","systemVersion":"10.0.4","coreVersion":"10.291","createdTime":1675260395590,"modifiedTime":1675372799546,"lastModifiedBy":"R9gIh86vXDB4IFn1"},"folder":null,"sort":0,"ownership":{"default":0,"R9gIh86vXDB4IFn1":3},"_id":"CT2fhwqIafHniF8e"}
|
||||
{"name":"Epée","type":"arme","img":"systems/fvtt-malefices/images/icons/epee.webp","system":{"armetype":"arc","porteecourte":1,"porteemoyenne":1,"dommagenormale":4,"dommagepart":5,"dommagecritique":6,"dommagecritiqueKO":true,"dommagecritiquemort":false,"description":""},"effects":[],"flags":{"core":{"sourceId":"Item.JVpvjDTWDo4boT7A"}},"_stats":{"systemId":"fvtt-malefices","systemVersion":"10.0.4","coreVersion":"10.291","createdTime":1675260395590,"modifiedTime":1675372799550,"lastModifiedBy":"R9gIh86vXDB4IFn1"},"folder":null,"sort":0,"ownership":{"default":0,"R9gIh86vXDB4IFn1":3},"_id":"V3rk42gTKrm3O8Tj"}
|
||||
{"name":"Pistolet (Gros calibre)","type":"arme","img":"systems/fvtt-malefices/images/icons/revolver.webp","system":{"armetype":"pistoletgros","porteecourte":5,"porteemoyenne":30,"dommagenormale":5,"dommagepart":7,"dommagecritique":0,"dommagecritiqueKO":false,"dommagecritiquemort":true,"description":""},"effects":[],"flags":{"core":{"sourceId":"Item.JVpvjDTWDo4boT7A"}},"_stats":{"systemId":"fvtt-malefices","systemVersion":"10.0.4","coreVersion":"10.291","createdTime":1675260395590,"modifiedTime":1675372799545,"lastModifiedBy":"R9gIh86vXDB4IFn1"},"folder":null,"sort":0,"ownership":{"default":0,"R9gIh86vXDB4IFn1":3},"_id":"d9D0KtChngKMBoqQ"}
|
||||
{"name":"Fusil de Chasse","type":"arme","img":"systems/fvtt-malefices/images/icons/fusil.webp","system":{"armetype":"fusilchasse","porteecourte":30,"porteemoyenne":120,"dommagenormale":5,"dommagepart":7,"dommagecritique":0,"dommagecritiqueKO":false,"dommagecritiquemort":true,"description":""},"effects":[],"flags":{"core":{"sourceId":"Item.nz5QUOYDWhfuuoB6"}},"_stats":{"systemId":"fvtt-malefices","systemVersion":"10.0.4","coreVersion":"10.291","createdTime":1675260395590,"modifiedTime":1675372799545,"lastModifiedBy":"R9gIh86vXDB4IFn1"},"folder":null,"sort":0,"ownership":{"default":0,"R9gIh86vXDB4IFn1":3},"_id":"kywMcn4Jxr5JonVt"}
|
||||
{"name":"Arbalete","type":"arme","img":"systems/fvtt-malefices/images/icons/arbalete.webp","system":{"armetype":"arbalete","porteecourte":10,"porteemoyenne":30,"dommagenormale":4,"dommagepart":6,"dommagecritique":0,"dommagecritiqueKO":false,"dommagecritiquemort":true,"description":""},"effects":[],"flags":{"core":{"sourceId":"Item.JVpvjDTWDo4boT7A"}},"_stats":{"systemId":"fvtt-malefices","systemVersion":"10.0.4","coreVersion":"10.291","createdTime":1675260395590,"modifiedTime":1675372799549,"lastModifiedBy":"R9gIh86vXDB4IFn1"},"folder":null,"sort":0,"ownership":{"default":0,"R9gIh86vXDB4IFn1":3},"_id":"lULKUHca9kDlhnxl"}
|
||||
{"name":"Mains Nues","type":"arme","img":"systems/fvtt-malefices/images/icons/mainsnues.webp","system":{"armetype":"mainsnues","porteecourte":1,"porteemoyenne":1,"dommagenormale":2,"dommagepart":4,"dommagecritique":5,"dommagecritiqueKO":true,"dommagecritiquemort":false,"description":""},"effects":[],"flags":{"core":{"sourceId":"Item.JVpvjDTWDo4boT7A"}},"_stats":{"systemId":"fvtt-malefices","systemVersion":"10.0.4","coreVersion":"10.291","createdTime":1675260395590,"modifiedTime":1675372799551,"lastModifiedBy":"R9gIh86vXDB4IFn1"},"folder":null,"sort":0,"ownership":{"default":0,"R9gIh86vXDB4IFn1":3},"_id":"nkRQU81L1gWOfaeo"}
|
@ -1 +0,0 @@
|
||||
MANIFEST-000018
|
@ -1,15 +0,0 @@
|
||||
2024/04/26-18:07:32.613484 7efdd96006c0 Recovering log #16
|
||||
2024/04/26-18:07:32.623734 7efdd96006c0 Delete type=3 #14
|
||||
2024/04/26-18:07:32.623791 7efdd96006c0 Delete type=0 #16
|
||||
2024/04/26-18:35:17.569282 7efdd72006c0 Level-0 table #21: started
|
||||
2024/04/26-18:35:17.582262 7efdd72006c0 Level-0 table #21: 2093 bytes OK
|
||||
2024/04/26-18:35:17.590842 7efdd72006c0 Delete type=0 #19
|
||||
2024/04/26-18:35:17.591036 7efdd72006c0 Manual compaction at level-0 from '!items!5J6qIaWdnhEGMAXJ' @ 72057594037927935 : 1 .. '!items!nkRQU81L1gWOfaeo' @ 0 : 0; will stop at (end)
|
||||
2024/04/26-18:35:17.612788 7efdd72006c0 Manual compaction at level-1 from '!items!5J6qIaWdnhEGMAXJ' @ 72057594037927935 : 1 .. '!items!nkRQU81L1gWOfaeo' @ 0 : 0; will stop at '!items!nkRQU81L1gWOfaeo' @ 18 : 1
|
||||
2024/04/26-18:35:17.612797 7efdd72006c0 Compacting 1@1 + 1@2 files
|
||||
2024/04/26-18:35:17.615928 7efdd72006c0 Generated table #22@1: 9 keys, 2093 bytes
|
||||
2024/04/26-18:35:17.615956 7efdd72006c0 Compacted 1@1 + 1@2 files => 2093 bytes
|
||||
2024/04/26-18:35:17.622427 7efdd72006c0 compacted to: files[ 0 0 1 0 0 0 0 ]
|
||||
2024/04/26-18:35:17.622520 7efdd72006c0 Delete type=2 #5
|
||||
2024/04/26-18:35:17.622620 7efdd72006c0 Delete type=2 #21
|
||||
2024/04/26-18:35:17.632530 7efdd72006c0 Manual compaction at level-1 from '!items!nkRQU81L1gWOfaeo' @ 18 : 1 .. '!items!nkRQU81L1gWOfaeo' @ 0 : 0; will stop at (end)
|
@ -1,8 +0,0 @@
|
||||
2023/10/26-09:14:30.225660 7f56117fa6c0 Recovering log #12
|
||||
2023/10/26-09:14:30.236009 7f56117fa6c0 Delete type=3 #10
|
||||
2023/10/26-09:14:30.236095 7f56117fa6c0 Delete type=0 #12
|
||||
2023/10/26-09:23:17.051895 7f56037fe6c0 Level-0 table #17: started
|
||||
2023/10/26-09:23:17.051934 7f56037fe6c0 Level-0 table #17: 0 bytes OK
|
||||
2023/10/26-09:23:17.058810 7f56037fe6c0 Delete type=0 #15
|
||||
2023/10/26-09:23:17.072664 7f56037fe6c0 Manual compaction at level-0 from '!items!5J6qIaWdnhEGMAXJ' @ 72057594037927935 : 1 .. '!items!nkRQU81L1gWOfaeo' @ 0 : 0; will stop at (end)
|
||||
2023/10/26-09:23:17.079499 7f56037fe6c0 Manual compaction at level-1 from '!items!5J6qIaWdnhEGMAXJ' @ 72057594037927935 : 1 .. '!items!nkRQU81L1gWOfaeo' @ 0 : 0; will stop at (end)
|
@ -1,3 +0,0 @@
|
||||
{"name":"Résumé des PJs pour le MJ","type":"chat","scope":"global","author":"R9gIh86vXDB4IFn1","img":"systems/fvtt-malefices/images/icons/resume.webp","command":"/resume","flags":{"core":{"sourceId":"Macro.ulj2PgchTQVE1VV4"}},"_stats":{"systemId":"fvtt-malefices","systemVersion":"10.1.1","coreVersion":"10.291","createdTime":1677422022018,"modifiedTime":1677422143283,"lastModifiedBy":"R9gIh86vXDB4IFn1"},"ownership":{"default":0,"R9gIh86vXDB4IFn1":3},"folder":null,"sort":0,"_id":"ESV4er8Hy6liMOC3"}
|
||||
{"name":"Tirage des tarots","type":"chat","scope":"global","author":"R9gIh86vXDB4IFn1","img":"systems/fvtt-malefices/images/icons/tirage.webp","command":"/tirage","flags":{"core":{"sourceId":"Macro.ulj2PgchTQVE1VV4"}},"_stats":{"systemId":"fvtt-malefices","systemVersion":"10.1.1","coreVersion":"10.291","createdTime":1677422022018,"modifiedTime":1677422144635,"lastModifiedBy":"R9gIh86vXDB4IFn1"},"ownership":{"default":0,"R9gIh86vXDB4IFn1":3},"folder":null,"sort":0,"_id":"sVKXJsiG9KAaBglV"}
|
||||
{"name":"Tirer une carte","type":"chat","command":"/carte","author":"R9gIh86vXDB4IFn1","img":"systems/fvtt-malefices/images/icons/tirer.webp","scope":"global","flags":{"core":{"sourceId":"Macro.P2dPA3CA5ZjOwDeE"}},"_stats":{"systemId":"fvtt-malefices","systemVersion":"10.1.1","coreVersion":"10.291","createdTime":1677421496447,"modifiedTime":1677422146138,"lastModifiedBy":"R9gIh86vXDB4IFn1"},"ownership":{"default":0,"R9gIh86vXDB4IFn1":3},"folder":null,"sort":0,"_id":"zDPgmHiwNxBWhoYz"}
|
@ -1 +0,0 @@
|
||||
MANIFEST-000018
|
@ -1,15 +0,0 @@
|
||||
2024/04/26-18:07:32.640485 7efdd8c006c0 Recovering log #16
|
||||
2024/04/26-18:07:32.650356 7efdd8c006c0 Delete type=3 #14
|
||||
2024/04/26-18:07:32.650410 7efdd8c006c0 Delete type=0 #16
|
||||
2024/04/26-18:35:17.622677 7efdd72006c0 Level-0 table #21: started
|
||||
2024/04/26-18:35:17.625968 7efdd72006c0 Level-0 table #21: 855 bytes OK
|
||||
2024/04/26-18:35:17.632284 7efdd72006c0 Delete type=0 #19
|
||||
2024/04/26-18:35:17.632542 7efdd72006c0 Manual compaction at level-0 from '!macros!ESV4er8Hy6liMOC3' @ 72057594037927935 : 1 .. '!macros!zDPgmHiwNxBWhoYz' @ 0 : 0; will stop at (end)
|
||||
2024/04/26-18:35:17.632580 7efdd72006c0 Manual compaction at level-1 from '!macros!ESV4er8Hy6liMOC3' @ 72057594037927935 : 1 .. '!macros!zDPgmHiwNxBWhoYz' @ 0 : 0; will stop at '!macros!zDPgmHiwNxBWhoYz' @ 6 : 1
|
||||
2024/04/26-18:35:17.632588 7efdd72006c0 Compacting 1@1 + 1@2 files
|
||||
2024/04/26-18:35:17.635838 7efdd72006c0 Generated table #22@1: 3 keys, 855 bytes
|
||||
2024/04/26-18:35:17.635878 7efdd72006c0 Compacted 1@1 + 1@2 files => 855 bytes
|
||||
2024/04/26-18:35:17.642105 7efdd72006c0 compacted to: files[ 0 0 1 0 0 0 0 ]
|
||||
2024/04/26-18:35:17.642236 7efdd72006c0 Delete type=2 #5
|
||||
2024/04/26-18:35:17.642702 7efdd72006c0 Delete type=2 #21
|
||||
2024/04/26-18:35:17.667688 7efdd72006c0 Manual compaction at level-1 from '!macros!zDPgmHiwNxBWhoYz' @ 6 : 1 .. '!macros!zDPgmHiwNxBWhoYz' @ 0 : 0; will stop at (end)
|
@ -1,8 +0,0 @@
|
||||
2023/10/26-09:14:30.253493 7f5610ff96c0 Recovering log #12
|
||||
2023/10/26-09:14:30.264581 7f5610ff96c0 Delete type=3 #10
|
||||
2023/10/26-09:14:30.264682 7f5610ff96c0 Delete type=0 #12
|
||||
2023/10/26-09:23:17.058988 7f56037fe6c0 Level-0 table #17: started
|
||||
2023/10/26-09:23:17.059024 7f56037fe6c0 Level-0 table #17: 0 bytes OK
|
||||
2023/10/26-09:23:17.065403 7f56037fe6c0 Delete type=0 #15
|
||||
2023/10/26-09:23:17.079441 7f56037fe6c0 Manual compaction at level-0 from '!macros!ESV4er8Hy6liMOC3' @ 72057594037927935 : 1 .. '!macros!zDPgmHiwNxBWhoYz' @ 0 : 0; will stop at (end)
|
||||
2023/10/26-09:23:17.079539 7f56037fe6c0 Manual compaction at level-1 from '!macros!ESV4er8Hy6liMOC3' @ 72057594037927935 : 1 .. '!macros!zDPgmHiwNxBWhoYz' @ 0 : 0; will stop at (end)
|
@ -1,22 +0,0 @@
|
||||
{"name":"Le Moine","type":"tarot","img":"systems/fvtt-malefices/images/tarots/Malefice_Tarot_Moine_600%20dpi.webp","system":{"tarottype":"metier","numericvalueup":9,"numericvaluedown":14,"isdualside":true,"ispositif":true,"isgm":false,"description":"","numericvalue":0,"isreversed":false},"effects":[],"flags":{},"_stats":{"systemId":"fvtt-malefices","systemVersion":"10.0.21","coreVersion":"10.291","createdTime":1675369447354,"modifiedTime":1675867789474,"lastModifiedBy":"R9gIh86vXDB4IFn1"},"folder":null,"sort":0,"ownership":{"default":0,"R9gIh86vXDB4IFn1":3},"_id":"1DRKmbzGzbCRCswc"}
|
||||
{"name":"La Lune Noire","type":"tarot","img":"systems/fvtt-malefices/images/tarots/Malefice_Tarot_Lune%20Noire_600%20dpi.webp","system":{"tarottype":"majeur","numericvalueup":18,"numericvaluedown":5,"isdualside":false,"ispositif":true,"isgm":false,"description":"","numericvalue":0,"isreversed":false},"effects":[],"flags":{},"_stats":{"systemId":"fvtt-malefices","systemVersion":"10.0.21","coreVersion":"10.291","createdTime":1675369447354,"modifiedTime":1675867789473,"lastModifiedBy":"R9gIh86vXDB4IFn1"},"folder":null,"sort":0,"ownership":{"default":0,"R9gIh86vXDB4IFn1":3},"_id":"6jHm4eWelq7eLKwU"}
|
||||
{"name":"Hippocrate","type":"tarot","img":"systems/fvtt-malefices/images/tarots/Malefice_Tarot_Hippocrate_600%20dpi.webp","system":{"tarottype":"metier","numericvalueup":16,"numericvaluedown":7,"isdualside":true,"ispositif":true,"isgm":false,"description":"","numericvalue":0,"isreversed":false},"effects":[],"flags":{},"_stats":{"systemId":"fvtt-malefices","systemVersion":"10.0.21","coreVersion":"10.291","createdTime":1675369447354,"modifiedTime":1675867789472,"lastModifiedBy":"R9gIh86vXDB4IFn1"},"folder":null,"sort":0,"ownership":{"default":0,"R9gIh86vXDB4IFn1":3},"_id":"BCQenQMvFjLKkl56"}
|
||||
{"name":"Eve","type":"tarot","img":"systems/fvtt-malefices/images/tarots/Malefice_Tarot_Eve_600%20dpi.webp","system":{"tarottype":"mineur","numericvalueup":3,"numericvaluedown":20,"isdualside":false,"ispositif":true,"isgm":false,"description":"","numericvalue":0,"isreversed":false},"effects":[],"flags":{},"_stats":{"systemId":"fvtt-malefices","systemVersion":"10.0.21","coreVersion":"10.291","createdTime":1675369447354,"modifiedTime":1675867789472,"lastModifiedBy":"R9gIh86vXDB4IFn1"},"folder":null,"sort":0,"ownership":{"default":0,"R9gIh86vXDB4IFn1":3},"_id":"IJaK9oxcsamMs4pw"}
|
||||
{"name":"Le Sorcier","type":"tarot","img":"systems/fvtt-malefices/images/tarots/Malefice_Tarot_Sorcier_600%20dpi.webp","system":{"tarottype":"majeur","numericvalueup":22,"numericvaluedown":1,"isdualside":false,"ispositif":true,"isgm":false,"description":"","numericvalue":0,"isreversed":false},"effects":[],"flags":{},"_stats":{"systemId":"fvtt-malefices","systemVersion":"10.0.21","coreVersion":"10.291","createdTime":1675369447354,"modifiedTime":1675867789474,"lastModifiedBy":"R9gIh86vXDB4IFn1"},"folder":null,"sort":0,"ownership":{"default":0,"R9gIh86vXDB4IFn1":3},"_id":"IwsZkMHLKGuCGUf7"}
|
||||
{"name":"La Mort","type":"tarot","img":"systems/fvtt-malefices/images/tarots/Malefice_Tarot_La%20Mort_600%20dpi.webp","system":{"tarottype":"majeur","numericvalueup":13,"numericvaluedown":10,"isdualside":false,"ispositif":true,"isgm":false,"description":"","numericvalue":0,"isreversed":false},"effects":[],"flags":{},"_stats":{"systemId":"fvtt-malefices","systemVersion":"10.0.21","coreVersion":"10.291","createdTime":1675369447354,"modifiedTime":1675867789473,"lastModifiedBy":"R9gIh86vXDB4IFn1"},"folder":null,"sort":0,"ownership":{"default":0,"R9gIh86vXDB4IFn1":3},"_id":"MHdmnX0tbbjhPbA0"}
|
||||
{"name":"L'Artiste","type":"tarot","img":"systems/fvtt-malefices/images/tarots/Malefice_Tarot_Artiste_600%20dpi.webp","system":{"tarottype":"metier","numericvalueup":1,"numericvaluedown":22,"isdualside":true,"ispositif":true,"isgm":false,"description":"","numericvalue":0,"isreversed":false},"effects":[],"flags":{},"_stats":{"systemId":"fvtt-malefices","systemVersion":"10.0.21","coreVersion":"10.291","createdTime":1675369447354,"modifiedTime":1675867789472,"lastModifiedBy":"R9gIh86vXDB4IFn1"},"folder":null,"sort":0,"ownership":{"default":0,"R9gIh86vXDB4IFn1":3},"_id":"NQBZmrYhEiyNxEo2"}
|
||||
{"name":"Le Savetier","type":"tarot","img":"systems/fvtt-malefices/images/tarots/Malefice_Tarot_Savetier_600%20dpi%20copie.webp","system":{"tarottype":"metier","numericvalueup":12,"numericvaluedown":11,"isdualside":true,"ispositif":true,"isgm":false,"description":"","numericvalue":0,"isreversed":false},"effects":[],"flags":{},"_stats":{"systemId":"fvtt-malefices","systemVersion":"10.0.21","coreVersion":"10.291","createdTime":1675369447354,"modifiedTime":1675867789474,"lastModifiedBy":"R9gIh86vXDB4IFn1"},"folder":null,"sort":0,"ownership":{"default":0,"R9gIh86vXDB4IFn1":3},"_id":"SClVaCgZjZoR1WiD"}
|
||||
{"name":"La Roue de la Fortune","type":"tarot","img":"systems/fvtt-malefices/images/tarots/Malefice_Tarot_La%20roue%20de%20la%20fortune_600%20dpi.webp","system":{"tarottype":"mineur","numericvalueup":10,"numericvaluedown":13,"isdualside":true,"ispositif":true,"isgm":false,"description":"","numericvalue":0,"isreversed":false},"effects":[],"flags":{},"_stats":{"systemId":"fvtt-malefices","systemVersion":"10.0.21","coreVersion":"10.291","createdTime":1675369447354,"modifiedTime":1675867789473,"lastModifiedBy":"R9gIh86vXDB4IFn1"},"folder":null,"sort":0,"ownership":{"default":0,"R9gIh86vXDB4IFn1":3},"_id":"WRILaKwS1cjxZGRk"}
|
||||
{"name":"L'Alchimiste","type":"tarot","img":"systems/fvtt-malefices/images/tarots/Malefice_Tarot_Alchimiste_600%20dpi.webp","system":{"tarottype":"mineur","numericvalueup":19,"numericvaluedown":4,"isdualside":true,"ispositif":true,"isgm":false,"description":"","numericvalue":0,"isreversed":false},"effects":[],"flags":{},"_stats":{"systemId":"fvtt-malefices","systemVersion":"10.0.21","coreVersion":"10.291","createdTime":1675369447354,"modifiedTime":1675867789472,"lastModifiedBy":"R9gIh86vXDB4IFn1"},"folder":null,"sort":0,"ownership":{"default":0,"R9gIh86vXDB4IFn1":3},"_id":"WlsCeal346QfJweB"}
|
||||
{"name":"L'Archange","type":"tarot","img":"systems/fvtt-malefices/images/tarots/Malefice_Tarot_Archange_600%20dpi.webp","system":{"tarottype":"majeur","numericvalueup":2,"numericvaluedown":21,"isdualside":false,"ispositif":true,"isgm":false,"description":"","numericvalue":0,"isreversed":false},"effects":[],"flags":{},"_stats":{"systemId":"fvtt-malefices","systemVersion":"10.0.21","coreVersion":"10.291","createdTime":1675369447354,"modifiedTime":1675867789472,"lastModifiedBy":"R9gIh86vXDB4IFn1"},"folder":null,"sort":0,"ownership":{"default":0,"R9gIh86vXDB4IFn1":3},"_id":"bVvGkOVe3BQeK7HR"}
|
||||
{"name":"La Chance","type":"tarot","img":"systems/fvtt-malefices/images/tarots/Malefice_Tarot_Chance_600%20dpi.webp","system":{"tarottype":"majeur","numericvalueup":7,"numericvaluedown":16,"isdualside":false,"ispositif":true,"isgm":false,"description":"","numericvalue":0,"isreversed":false},"effects":[],"flags":{},"_stats":{"systemId":"fvtt-malefices","systemVersion":"10.0.21","coreVersion":"10.291","createdTime":1675369447354,"modifiedTime":1675867789473,"lastModifiedBy":"R9gIh86vXDB4IFn1"},"folder":null,"sort":0,"ownership":{"default":0,"R9gIh86vXDB4IFn1":3},"_id":"ba7fmG0dYpV2jpIv"}
|
||||
{"name":"Le Vicaire","type":"tarot","img":"systems/fvtt-malefices/images/tarots/Malefice_Tarot_Vicaire_600%20dpi.webp","system":{"tarottype":"majeur","numericvalueup":5,"numericvaluedown":18,"isdualside":false,"ispositif":true,"isgm":false,"description":"","numericvalue":0,"isreversed":false},"effects":[],"flags":{},"_stats":{"systemId":"fvtt-malefices","systemVersion":"10.0.21","coreVersion":"10.291","createdTime":1675369447354,"modifiedTime":1675867789474,"lastModifiedBy":"R9gIh86vXDB4IFn1"},"folder":null,"sort":0,"ownership":{"default":0,"R9gIh86vXDB4IFn1":3},"_id":"dbc8W1qD0kj5rQ4s"}
|
||||
{"name":"Le Juge","type":"tarot","img":"systems/fvtt-malefices/images/tarots/Malefice_Tarot_Le%20Juge_600%20dpi.webp","system":{"tarottype":"metier","numericvalueup":8,"numericvaluedown":15,"isdualside":true,"ispositif":true,"isgm":false,"description":"","numericvalue":0,"isreversed":false},"effects":[],"flags":{},"_stats":{"systemId":"fvtt-malefices","systemVersion":"10.0.21","coreVersion":"10.291","createdTime":1675369447354,"modifiedTime":1675867789473,"lastModifiedBy":"R9gIh86vXDB4IFn1"},"folder":null,"sort":0,"ownership":{"default":0,"R9gIh86vXDB4IFn1":3},"_id":"dkvHSWzgbOqbykUL"}
|
||||
{"name":"Le Diable","type":"tarot","img":"systems/fvtt-malefices/images/tarots/Malefice_Tarot_Diable_600%20dpi.webp","system":{"tarottype":"majeur","numericvalueup":15,"numericvaluedown":8,"isdualside":false,"ispositif":true,"isgm":false,"description":"","numericvalue":0,"isreversed":false},"effects":[],"flags":{},"_stats":{"systemId":"fvtt-malefices","systemVersion":"10.0.21","coreVersion":"10.291","createdTime":1675369447354,"modifiedTime":1675867789473,"lastModifiedBy":"R9gIh86vXDB4IFn1"},"folder":null,"sort":0,"ownership":{"default":0,"R9gIh86vXDB4IFn1":3},"_id":"earXcKB3NZ9sM8S7"}
|
||||
{"name":"Le Centurion","type":"tarot","img":"systems/fvtt-malefices/images/tarots/Malefice_Tarot_Centurion_600%20dpi.webp","system":{"tarottype":"metier","numericvalueup":11,"numericvaluedown":12,"isdualside":true,"ispositif":true,"isgm":false,"description":"","numericvalue":0,"isreversed":false},"effects":[],"flags":{},"_stats":{"systemId":"fvtt-malefices","systemVersion":"10.0.21","coreVersion":"10.291","createdTime":1675369447354,"modifiedTime":1675867789473,"lastModifiedBy":"R9gIh86vXDB4IFn1"},"folder":null,"sort":0,"ownership":{"default":0,"R9gIh86vXDB4IFn1":3},"_id":"fIHWGqwcubToEjOK"}
|
||||
{"name":"Le Cabaliste","type":"tarot","img":"systems/fvtt-malefices/images/tarots/Malefice_Tarot_Cabaliste_600%20dpi.webp","system":{"tarottype":"mineur","numericvalueup":17,"numericvaluedown":6,"isdualside":true,"ispositif":true,"isgm":false,"description":"","numericvalue":0,"isreversed":false},"effects":[],"flags":{},"_stats":{"systemId":"fvtt-malefices","systemVersion":"10.0.21","coreVersion":"10.291","createdTime":1675369447354,"modifiedTime":1675867789473,"lastModifiedBy":"R9gIh86vXDB4IFn1"},"folder":null,"sort":0,"ownership":{"default":0,"R9gIh86vXDB4IFn1":3},"_id":"gS7fULIr9lPCl5Vb"}
|
||||
{"name":"Adam","type":"tarot","img":"systems/fvtt-malefices/images/tarots/Malefice_Tarot_Adam_600%20dpi.webp","system":{"tarottype":"mineur","numericvalueup":4,"numericvaluedown":19,"isdualside":false,"ispositif":true,"isgm":false,"description":"","numericvalue":0,"isreversed":false},"effects":[],"flags":{},"_stats":{"systemId":"fvtt-malefices","systemVersion":"10.0.21","coreVersion":"10.291","createdTime":1675369447354,"modifiedTime":1675867789472,"lastModifiedBy":"R9gIh86vXDB4IFn1"},"folder":null,"sort":0,"ownership":{"default":0,"R9gIh86vXDB4IFn1":3},"_id":"ooRr6cSNg73cPyaU"}
|
||||
{"name":"Le Medium","type":"tarot","img":"systems/fvtt-malefices/images/tarots/Malefice_Tarot_Medium_600%20dpi.webp","system":{"tarottype":"mineur","numericvalueup":6,"numericvaluedown":17,"isdualside":true,"ispositif":true,"isgm":false,"description":"","numericvalue":0,"isreversed":false},"effects":[],"flags":{},"_stats":{"systemId":"fvtt-malefices","systemVersion":"10.0.21","coreVersion":"10.291","createdTime":1675369447354,"modifiedTime":1675867789474,"lastModifiedBy":"R9gIh86vXDB4IFn1"},"folder":null,"sort":0,"ownership":{"default":0,"R9gIh86vXDB4IFn1":3},"_id":"rOgagyXv5RWxvyBa"}
|
||||
{"name":"L'Archiviste","type":"tarot","img":"systems/fvtt-malefices/images/tarots/Malefice_Tarot_Archiviste_600%20dpi.webp","system":{"tarottype":"metier","numericvalueup":14,"numericvaluedown":9,"isdualside":true,"ispositif":true,"isgm":false,"description":"","numericvalue":0,"isreversed":false},"effects":[],"flags":{},"_stats":{"systemId":"fvtt-malefices","systemVersion":"10.0.21","coreVersion":"10.291","createdTime":1675369447354,"modifiedTime":1675867789472,"lastModifiedBy":"R9gIh86vXDB4IFn1"},"folder":null,"sort":0,"ownership":{"default":0,"R9gIh86vXDB4IFn1":3},"_id":"wHc7WwyWPZIqt219"}
|
||||
{"name":"Le Laboureur","type":"tarot","img":"systems/fvtt-malefices/images/tarots/Malefice_Tarot_Laboureur_600%20dpi.webp","system":{"tarottype":"metier","numericvalueup":21,"numericvaluedown":2,"isdualside":true,"ispositif":true,"isgm":false,"description":"","numericvalue":0,"isreversed":false},"effects":[],"flags":{},"_stats":{"systemId":"fvtt-malefices","systemVersion":"10.0.21","coreVersion":"10.291","createdTime":1675369447354,"modifiedTime":1675867789474,"lastModifiedBy":"R9gIh86vXDB4IFn1"},"folder":null,"sort":0,"ownership":{"default":0,"R9gIh86vXDB4IFn1":3},"_id":"wLFdvRd9eLiCtc7b"}
|
||||
{"name":"Le Grand Livre","type":"tarot","img":"systems/fvtt-malefices/images/tarots/Malefice_Tarot_Grand%20Livre_600%20dpi.webp","system":{"tarottype":"majeur","numericvalueup":20,"numericvaluedown":3,"isdualside":false,"ispositif":true,"isgm":false,"description":"","numericvalue":0,"isreversed":false},"effects":[],"flags":{},"_stats":{"systemId":"fvtt-malefices","systemVersion":"10.0.21","coreVersion":"10.291","createdTime":1675369447354,"modifiedTime":1675867789473,"lastModifiedBy":"R9gIh86vXDB4IFn1"},"folder":null,"sort":0,"ownership":{"default":0,"R9gIh86vXDB4IFn1":3},"_id":"zbGGMEQFdwVdlKAf"}
|