Message sur D20 impair dans le tchat et corrections diverses
All checks were successful
Release Creation / build (release) Successful in 44s
All checks were successful
Release Creation / build (release) Successful in 44s
This commit is contained in:
@@ -220,14 +220,8 @@ export class WastelandActor extends Actor {
|
||||
prepareDerivedData() {
|
||||
|
||||
if (this.type == 'personnage') {
|
||||
let newSante = this.system.sante.bonus + (this.system.attributs.pui.value + this.system.attributs.tre.value) * 2 + 5
|
||||
if (this.system.sante.base != newSante) {
|
||||
this.update({ 'system.sante.base': newSante })
|
||||
}
|
||||
let newPsyche = ((this.system.attributs.cla.value + this.system.attributs.tre.value) * 2) + 5
|
||||
if (this.system.psyche.fullmax != newPsyche) {
|
||||
this.update({ 'system.psyche.fullmax': newPsyche })
|
||||
}
|
||||
this.system.sante.base = this.system.sante.bonus + (this.system.attributs.pui.value + this.system.attributs.tre.value) * 2 + 5
|
||||
this.system.psyche.fullmax = ((this.system.attributs.cla.value + this.system.attributs.tre.value) * 2) + 5
|
||||
}
|
||||
|
||||
super.prepareDerivedData()
|
||||
|
||||
@@ -89,7 +89,7 @@ export class WastelandCommands {
|
||||
if (command && command.func) {
|
||||
const result = command.func(content, msg, params);
|
||||
if (result == false) {
|
||||
RdDCommands._chatAnswer(msg, command.descr);
|
||||
WastelandCommands._chatAnswer(msg, command.descr);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -180,14 +180,14 @@ Hooks.once("ready", function () {
|
||||
ui.notifications.info("Attention ! Aucun personnage n'est relié au joueur !");
|
||||
ChatMessage.create({
|
||||
content: "<b>ATTENTION</b> Le joueur " + game.user.name + " n'est relié à aucun personnage !",
|
||||
user: game.user._id
|
||||
user: game.user.id
|
||||
});
|
||||
}
|
||||
if (!game.user.isGM && game.user.character && !game.user.character.prototypeToken.actorLink) {
|
||||
ui.notifications.info("Le token de du joueur n'est pas connecté à l'acteur !");
|
||||
ChatMessage.create({
|
||||
content: "<b>ATTENTION</b> Le token du joueur " + game.user.name + " n'est pas connecté à l'acteur !",
|
||||
user: game.user._id
|
||||
user: game.user.id
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -358,6 +358,7 @@ export class WastelandUtility {
|
||||
//console.log("PAIR/IMP", diceValue)
|
||||
if (diceValue % 2 == 1) {
|
||||
//console.log("PAIR/IMP2", diceValue)
|
||||
rollData.d20IsOdd = true
|
||||
rollData.finalResult -= rollData.roll.terms[0].results[0].result // Substract value
|
||||
if (diceValue == 1 || diceValue == 11) {
|
||||
rollData.isDramatique = true
|
||||
@@ -616,7 +617,7 @@ export class WastelandUtility {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static getUsers(filter) {
|
||||
return game.users.filter(filter).map(user => user.data._id);
|
||||
return game.users.filter(filter).map(user => user.id);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@@ -891,7 +892,7 @@ export class WastelandUtility {
|
||||
let message = game.messages.get($(li).attr("data-message-id"))
|
||||
let rollData = message.getFlag("world", "wasteland-roll")
|
||||
if (rollData.competence) {
|
||||
let nbPred = rollData.competence.data.predilections.filter(pred => !pred.used).length
|
||||
let nbPred = rollData.competence.system.predilections.filter(pred => !pred.used).length
|
||||
return (!rollData.isReroll && rollData.competence && nbPred > 0)
|
||||
}
|
||||
return false
|
||||
@@ -900,7 +901,7 @@ export class WastelandUtility {
|
||||
let message = game.messages.get($(li).attr("data-message-id"))
|
||||
let rollData = message.getFlag("world", "wasteland-roll")
|
||||
if (rollData.competence) {
|
||||
return rollData.competence.data.doublebonus
|
||||
return rollData.competence.system.doublebonus
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user