Compare commits
7 Commits
fvtt-malef
...
fvtt-malef
Author | SHA1 | Date | |
---|---|---|---|
165c836f39 | |||
cb8e70c6c1 | |||
b2a9d8cb75 | |||
6d75c8532c | |||
dce8ad025b | |||
6e4cd71b99 | |||
e62480efb0 |
@ -1,5 +1,7 @@
|
|||||||
# Système Foundry pour Maléfices (French RPG, Arkhane Asylum Publishing)
|
# 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
|
## EN
|
||||||
|
|
||||||
Unofficial system for Maléfices v4 (French version from Arkhane Asylum Publishing).
|
Unofficial system for Maléfices v4 (French version from Arkhane Asylum Publishing).
|
||||||
|
6
images/icons/.directory
Normal file
6
images/icons/.directory
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
[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
|
BIN
images/icons/resume.webp
Normal file
BIN
images/icons/resume.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 31 KiB |
BIN
images/icons/tirage.webp
Normal file
BIN
images/icons/tirage.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 40 KiB |
BIN
images/icons/tirer.webp
Normal file
BIN
images/icons/tirer.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 40 KiB |
@ -44,6 +44,9 @@ export class MaleficesActorSheet extends ActorSheet {
|
|||||||
phyMalus: this.actor.getPhysiqueMalus(),
|
phyMalus: this.actor.getPhysiqueMalus(),
|
||||||
elementsbio: this.actor.getElementsBio(),
|
elementsbio: this.actor.getElementsBio(),
|
||||||
sorts: this.actor.getSorts(),
|
sorts: this.actor.getSorts(),
|
||||||
|
description: await TextEditor.enrichHTML(this.object.system.description, { async: true }),
|
||||||
|
notes: await TextEditor.enrichHTML(this.object.system.notes, { async: true }),
|
||||||
|
equipementlibre: await TextEditor.enrichHTML(this.object.system.equipementlibre, { async: true }),
|
||||||
options: this.options,
|
options: this.options,
|
||||||
owner: this.document.isOwner,
|
owner: this.document.isOwner,
|
||||||
editScore: this.options.editScore,
|
editScore: this.options.editScore,
|
||||||
|
@ -229,9 +229,9 @@ export class MaleficesActor extends Actor {
|
|||||||
}
|
}
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
getInitiativeScore(combatId, combatantId) {
|
getInitiativeScore(combatId, combatantId) {
|
||||||
let init = Math.floor(this.system.attributs.physique.value+this.system.attributs.habilete.value)
|
let init = Math.floor( (this.system.attributs.physique.value+this.system.attributs.habilite.value) / 2)
|
||||||
let subvalue = new Roll("1d20").roll({async: false})
|
let subvalue = new Roll("1d20").roll({async: false})
|
||||||
return init + (subvalue / 100)
|
return init + (subvalue.total / 100)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
|
@ -12,6 +12,7 @@ export class MaleficesCommands {
|
|||||||
if (!game.system.malefices.commands) {
|
if (!game.system.malefices.commands) {
|
||||||
const commands = new MaleficesCommands();
|
const commands = new MaleficesCommands();
|
||||||
commands.registerCommand({ path: ["/tirage"], func: (content, msg, params) => MaleficesCommands.createTirage(msg), descr: "Tirage des tarots" });
|
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!" });
|
commands.registerCommand({ path: ["/resume"], func: (content, msg, params) => MaleficesCharacterSummary.displayPCSummary(), descr: "Affiche la liste des PJs!" });
|
||||||
game.system.malefices.commands = commands;
|
game.system.malefices.commands = commands;
|
||||||
}
|
}
|
||||||
@ -105,7 +106,7 @@ export class MaleficesCommands {
|
|||||||
ChatMessage.create(msg);
|
ChatMessage.create(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* --------------------------------------------- */
|
||||||
static async createTirage(msg) {
|
static async createTirage(msg) {
|
||||||
if (game.user.isGM) {
|
if (game.user.isGM) {
|
||||||
let tirageData = {
|
let tirageData = {
|
||||||
@ -127,5 +128,20 @@ export class MaleficesCommands {
|
|||||||
tirageDialog.render(true)
|
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)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -64,11 +64,11 @@ Hooks.once("init", async function () {
|
|||||||
Items.unregisterSheet("core", ItemSheet);
|
Items.unregisterSheet("core", ItemSheet);
|
||||||
Items.registerSheet("fvtt-malefices", MaleficesItemSheet, { makeDefault: true });
|
Items.registerSheet("fvtt-malefices", MaleficesItemSheet, { makeDefault: true });
|
||||||
|
|
||||||
MaleficesUtility.init()
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
function welcomeMessage() {
|
function welcomeMessage() {
|
||||||
|
if (game.user.isGM) {
|
||||||
ChatMessage.create({
|
ChatMessage.create({
|
||||||
user: game.user.id,
|
user: game.user.id,
|
||||||
whisper: [game.user.id],
|
whisper: [game.user.id],
|
||||||
@ -77,9 +77,9 @@ function welcomeMessage() {
|
|||||||
<p>Le Livre de Base de Maléfices v4 est nécessaire pour jouer : https://arkhane-asylum.fr/en/malefices/</p>
|
<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>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>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)` });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
// Register world usage statistics
|
// Register world usage statistics
|
||||||
function registerUsageCount(registerKey) {
|
function registerUsageCount(registerKey) {
|
||||||
@ -129,7 +129,6 @@ Hooks.once("ready", function () {
|
|||||||
registerUsageCount('fvtt-malefices')
|
registerUsageCount('fvtt-malefices')
|
||||||
welcomeMessage();
|
welcomeMessage();
|
||||||
MaleficesUtility.ready()
|
MaleficesUtility.ready()
|
||||||
MaleficesUtility.init()
|
|
||||||
MaleficesCharacterSummary.ready()
|
MaleficesCharacterSummary.ready()
|
||||||
|
|
||||||
})
|
})
|
||||||
|
@ -6,8 +6,13 @@ export class MaleficesCharacterSummary extends Application {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static displayPCSummary() {
|
static displayPCSummary() {
|
||||||
|
if (game.user.isGM) {
|
||||||
game.system.malefices.charSummary.render(true)
|
game.system.malefices.charSummary.render(true)
|
||||||
|
} else {
|
||||||
|
ui.notifications.info("Commande /tirage réservée au MJ !")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
updatePCSummary() {
|
updatePCSummary() {
|
||||||
if (this.rendered) {
|
if (this.rendered) {
|
||||||
|
@ -7,7 +7,7 @@ export class MaleficesUtility {
|
|||||||
|
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static async init() {
|
static async ready() {
|
||||||
Hooks.on('renderChatLog', (log, html, data) => MaleficesUtility.chatListeners(html));
|
Hooks.on('renderChatLog', (log, html, data) => MaleficesUtility.chatListeners(html));
|
||||||
/*Hooks.on("dropCanvasData", (canvas, data) => {
|
/*Hooks.on("dropCanvasData", (canvas, data) => {
|
||||||
MaleficesUtility.dropItemOnToken(canvas, data)
|
MaleficesUtility.dropItemOnToken(canvas, data)
|
||||||
@ -51,6 +51,10 @@ export class MaleficesUtility {
|
|||||||
default: { npcList: [], x: 200, y: 200 },
|
default: { npcList: [], x: 200, y: 200 },
|
||||||
type: Object
|
type: Object
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const tarots = await MaleficesUtility.loadCompendium("fvtt-malefices.malefices-tarots")
|
||||||
|
this.tarots = tarots.map(i => i.toObject())
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*-------------------------------------------- */
|
/*-------------------------------------------- */
|
||||||
@ -67,13 +71,6 @@ export class MaleficesUtility {
|
|||||||
return this.tarots.find(t => t._id == tId)
|
return this.tarots.find(t => t._id == tId)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
|
||||||
static async ready() {
|
|
||||||
const tarots = await MaleficesUtility.loadCompendium("fvtt-malefices.malefices-tarots")
|
|
||||||
this.tarots = tarots.map(i => i.toObject())
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static async loadCompendiumData(compendium) {
|
static async loadCompendiumData(compendium) {
|
||||||
const pack = game.packs.get(compendium)
|
const pack = game.packs.get(compendium)
|
||||||
|
3
packs/malefices-macros.db
Normal file
3
packs/malefices-macros.db
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{"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"}
|
@ -754,6 +754,10 @@ ul, li {
|
|||||||
#token-hud .status-effects.active{
|
#token-hud .status-effects.active{
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
}
|
}
|
||||||
|
.token-sheet .window-content .flexcol .sheet-tabs {
|
||||||
|
font-size: 0.8rem;
|
||||||
|
}
|
||||||
|
|
||||||
/* ======================================== */
|
/* ======================================== */
|
||||||
.item-checkbox {
|
.item-checkbox {
|
||||||
height: 25px;
|
height: 25px;
|
||||||
|
16
system.json
16
system.json
@ -46,14 +46,22 @@
|
|||||||
"system": "fvtt-malefices",
|
"system": "fvtt-malefices",
|
||||||
"private": false,
|
"private": false,
|
||||||
"flags": {}
|
"flags": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Macro",
|
||||||
|
"label": "Macros",
|
||||||
|
"name": "malefices-macros",
|
||||||
|
"path": "packs/malefices-macros.db",
|
||||||
|
"system": "fvtt-malefices",
|
||||||
|
"private": false,
|
||||||
|
"flags": {}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"license": "LICENSE.txt",
|
"license": "LICENSE.txt",
|
||||||
"manifest": "https://www.uberwald.me/gitea/public/fvtt-malefices/raw/branch/master/system.json",
|
"manifest": "https://www.uberwald.me/gitea/public/fvtt-malefices/raw/branch/master/system.json",
|
||||||
"compatibility": {
|
"compatibility": {
|
||||||
"minimum": "10",
|
"minimum": "10",
|
||||||
"verified": "10",
|
"verified": "10"
|
||||||
"maximum": "10"
|
|
||||||
},
|
},
|
||||||
"id": "fvtt-malefices",
|
"id": "fvtt-malefices",
|
||||||
"primaryTokenAttribute": "secondary.health",
|
"primaryTokenAttribute": "secondary.health",
|
||||||
@ -64,7 +72,7 @@
|
|||||||
],
|
],
|
||||||
"title": "Maléfices, le Jeu de Rôle",
|
"title": "Maléfices, le Jeu de Rôle",
|
||||||
"url": "https://www.uberwald.me/gitea/public/fvtt-malefices",
|
"url": "https://www.uberwald.me/gitea/public/fvtt-malefices",
|
||||||
"version": "10.0.23",
|
"version": "10.1.2",
|
||||||
"download": "https://www.uberwald.me/gitea/public/fvtt-malefices/archive/fvtt-malefices-v10.0.23.zip",
|
"download": "https://www.uberwald.me/gitea/public/fvtt-malefices/archive/fvtt-malefices-v10.1.2.zip",
|
||||||
"background": "systems/fvtt-malefices/images/ui/malefice_welcome_page.webp"
|
"background": "systems/fvtt-malefices/images/ui/malefice_welcome_page.webp"
|
||||||
}
|
}
|
@ -83,7 +83,8 @@
|
|||||||
"value": 0,
|
"value": 0,
|
||||||
"max": 0
|
"max": 0
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"equipementlibre": ""
|
||||||
},
|
},
|
||||||
"npccore": {
|
"npccore": {
|
||||||
"npctype": "",
|
"npctype": "",
|
||||||
|
@ -145,6 +145,13 @@
|
|||||||
{{!-- Equipement Tab --}}
|
{{!-- Equipement Tab --}}
|
||||||
<div class="tab equipements" data-group="primary" data-tab="equipements">
|
<div class="tab equipements" data-group="primary" data-tab="equipements">
|
||||||
|
|
||||||
|
<span class="item-name-label-header items-title-bg">
|
||||||
|
<h3><label class="items-title-text">Equipements (saisie libre)</label></h3>
|
||||||
|
</span>
|
||||||
|
<div class="form-group small-editor">
|
||||||
|
{{editor equipementlibre target="system.equipementlibre" button=true owner=owner editable=editable}}
|
||||||
|
</div>
|
||||||
|
|
||||||
<ul class="item-list alternate-list">
|
<ul class="item-list alternate-list">
|
||||||
<li class="item flexrow list-item items-title-bg">
|
<li class="item flexrow list-item items-title-bg">
|
||||||
<span class="item-name-label-header">
|
<span class="item-name-label-header">
|
||||||
@ -183,7 +190,7 @@
|
|||||||
<ul class="item-list alternate-list">
|
<ul class="item-list alternate-list">
|
||||||
<li class="item flexrow list-item items-title-bg">
|
<li class="item flexrow list-item items-title-bg">
|
||||||
<span class="item-name-label-header">
|
<span class="item-name-label-header">
|
||||||
<h3><label class="items-title-text">Equipements</label></h3>
|
<h3><label class="items-title-text">Equipements (Items)</label></h3>
|
||||||
</span>
|
</span>
|
||||||
<span class="item-field-label-long">
|
<span class="item-field-label-long">
|
||||||
<label class="short-label">Q.</label>
|
<label class="short-label">Q.</label>
|
||||||
@ -347,6 +354,7 @@
|
|||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
{{#if isGM}}
|
||||||
<ul class="item-list alternate-list">
|
<ul class="item-list alternate-list">
|
||||||
<li class="item flexrow list-item items-title-bg">
|
<li class="item flexrow list-item items-title-bg">
|
||||||
<span class="item-name-label-header">
|
<span class="item-name-label-header">
|
||||||
@ -374,6 +382,7 @@
|
|||||||
</li>
|
</li>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user