Corrections sur attaque, equipement et compétences à 7
This commit is contained in:
@@ -6,7 +6,7 @@ export class YggdrasillCombat extends Combat {
|
||||
/* -------------------------------------------- */
|
||||
async rollInitiative(ids, formula = undefined, messageOptions = {} ) {
|
||||
ids = typeof ids === "string" ? [ids] : ids;
|
||||
const currentId = this.combatant._id;
|
||||
const currentId = this.combatant?.id;
|
||||
for (let cId = 0; cId < ids.length; cId++) {
|
||||
const c = this.combatants.get(ids[cId]);
|
||||
let initBonus = c.actor ? c.actor.getInitiativeScore() : 0;
|
||||
@@ -17,7 +17,7 @@ export class YggdrasillCombat extends Combat {
|
||||
}
|
||||
if (roll.total <= 0) roll.total = 0;
|
||||
//console.log("Compute init for", roll.total);
|
||||
let id = c._id || c.id;
|
||||
let id = c.id;
|
||||
await this.updateEmbeddedDocuments("Combatant", [{ _id: id, initiative: roll.total }]);
|
||||
|
||||
// Send a chat message
|
||||
@@ -25,9 +25,9 @@ export class YggdrasillCombat extends Combat {
|
||||
let messageData = foundry.utils.mergeObject(
|
||||
{
|
||||
speaker: {
|
||||
scene: canvas.scene._id,
|
||||
actor: c.actor ? c.actor._id : null,
|
||||
token: c.token._id,
|
||||
scene: canvas.scene.id,
|
||||
actor: c.actor ? c.actor.id : null,
|
||||
token: c.token.id,
|
||||
alias: c.token.name,
|
||||
sound: CONFIG.sounds.dice,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user