import { PegasusUtility } from "./pegasus-utility.js"; /* -------------------------------------------- */ export class PegasusCombat extends Combat { /* -------------------------------------------- */ async rollInitiative(ids, formula = undefined, messageOptions = {} ) { console.log("Initiative is requested !!!"); ids = typeof ids === "string" ? [ids] : ids; const currentId = this.combatant._id; for (let cId = 0; cId < ids.length; cId++) { const c = this.getCombatant(ids[cId]); let initBonus = c.actor ? c.actor.getInitiativeScore() : 0; await this.updateEmbeddedEntity("Combatant", { _id: c._id, initiative: initBonus }); } return this; } }