Correction sur blessures et actions restantes
All checks were successful
Release Creation / build (release) Successful in 53s
All checks were successful
Release Creation / build (release) Successful in 53s
This commit is contained in:
@@ -10,6 +10,7 @@ export class TeDeumCombat extends Combat {
|
||||
for (let cId of ids) {
|
||||
const c = this.combatants.get(cId);
|
||||
let initBonus = c.actor ? c.actor.getInitiativeScore(this.id, cId) : -1;
|
||||
console.log("Init Bonus : ", c.name, initBonus)
|
||||
await this.updateEmbeddedDocuments("Combatant", [{ _id: cId, initiative: initBonus }]);
|
||||
}
|
||||
|
||||
@@ -31,8 +32,12 @@ export class TeDeumCombat extends Combat {
|
||||
}
|
||||
if (ca.nbActionsMainGauche < 0) ca.nbActionsMainGauche = 0
|
||||
if (ca.nbActions < 0) ca.nbActions = 0
|
||||
await combatant.setFlag("world", "available-actions", ca)
|
||||
await combatant.update({ name: `${combatant.token.name} (${ca.nbActions} / ${ca.nbActionsMainGauche})` })
|
||||
console.log("Modify Action : ", combatant.name, ca)
|
||||
if (game.user.isGM) {
|
||||
await TeDeumUtility.updateCombatantActions(combatant, ca)
|
||||
} else {
|
||||
game.socket.emit("system.fvtt-te-deum", { msg: "msg_modify_combat_action", data: { combatantId: combatantId, ca: ca } })
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
Reference in New Issue
Block a user