#140 Permettre des jets de carac dérivées
This commit is contained in:
parent
cddc6a8e9b
commit
6675539c59
@ -2530,7 +2530,7 @@ export class RdDActor extends Actor {
|
||||
verifierForceMin( item ) {
|
||||
if ( item.type == 'arme' && item.data.force > this.data.data.carac.force.value ) {
|
||||
ChatMessage.create( { content: `<strong>${this.name} s'est équipé(e) de l'arme ${item.name}, mais n'a pas une force suffisante pour l'utiliser normalement </strong>
|
||||
(${item.data.force} nécessaire pour unr Force de ${this.data.data.carac.force.value})` } );
|
||||
(${item.data.force} nécessaire pour une Force de ${this.data.data.carac.force.value})` } );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4,12 +4,14 @@
|
||||
*/
|
||||
export class ChatUtility {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static onSocketMessage(sockmsg) {
|
||||
switch (sockmsg.msg) {
|
||||
case "msg_delete_chat_message": return ChatUtility.onRemoveMessages(sockmsg.part, sockmsg.gmId);
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static onRemoveMessages(part, gmId) {
|
||||
if (game.user._id == gmId) {
|
||||
const toDelete = game.messages.filter(it => it.data.content.includes(part));
|
||||
|
@ -300,4 +300,9 @@ Hooks.on("chatMessage", (html, content, msg) => {
|
||||
/* -------------------------------------------- */
|
||||
Hooks.on("getCombatTrackerEntryContext", (html, options) => {
|
||||
RdDUtility.pushInitiativeOptions(html, options);
|
||||
})
|
||||
});
|
||||
|
||||
/* -------------------------------------------- */
|
||||
Hooks.on("renderChatMessage", async (app, html, msg) => {
|
||||
RdDUtility.onRenderChatMessage(app, html, msg);
|
||||
});
|
||||
|
@ -1024,7 +1024,7 @@ export class RdDUtility {
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/*-------------------------------------------- */
|
||||
static checkThanatosXP(compName) {
|
||||
if ( compName.includes('Thanatos') ) {
|
||||
let message = "Vous avez mis des points d'Expérience dans la Voie de Thanatos !<br>Vous devez réduire manuellement d'un même montant d'XP une autre compétence Draconique.";
|
||||
@ -1034,4 +1034,11 @@ export class RdDUtility {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------- */
|
||||
static async onRenderChatMessage( app, html, msg ) {
|
||||
// TODO
|
||||
//console.log(app, html, msg);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -128,7 +128,7 @@
|
||||
<label class="carac-xp flexrow"/>
|
||||
{{else}}
|
||||
{{#if carac.derivee}}
|
||||
<span class="carac-label flexrow" name="data.carac.{{key}}.label">{{carac.label}}</span>
|
||||
<span class="carac-label flexrow" name="data.carac.{{key}}.label"> <a name={{key}}>{{carac.label}}</a></span>
|
||||
<label class="competence-value flexrow">{{carac.value}}</label>
|
||||
<label class="carac-xp flexrow"/>
|
||||
{{else}}
|
||||
|
Loading…
Reference in New Issue
Block a user