v10 WIP
This commit is contained in:
@ -66,7 +66,7 @@ export class RdDCombatManager extends Combat {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async finDeRound(options = { terminer: false }) {
|
||||
for (let combatant of this.data.combatants) {
|
||||
for (let combatant of this.combatants) {
|
||||
if (combatant.actor) {
|
||||
await combatant.actor.finDeRound(options);
|
||||
}
|
||||
@ -78,7 +78,7 @@ export class RdDCombatManager extends Combat {
|
||||
|
||||
/************************************************************************************/
|
||||
async rollInitiative(ids, formula = undefined, messageOptions = {}) {
|
||||
console.log(`${game.data.system.data.title} | Combat.rollInitiative()`, ids, formula, messageOptions);
|
||||
console.log(`${game.system.title} | Combat.rollInitiative()`, ids, formula, messageOptions);
|
||||
// Structure input data
|
||||
ids = typeof ids === "string" ? [ids] : ids;
|
||||
const currentId = this.combatant._id;
|
||||
@ -249,9 +249,9 @@ export class RdDCombatManager extends Combat {
|
||||
static processPremierRoundInit() {
|
||||
// Check if we have the whole init !
|
||||
if (Misc.isUniqueConnectedGM() && game.combat.current.round == 1) {
|
||||
let initMissing = game.combat.data.combatants.find(it => !it.initiative);
|
||||
let initMissing = game.combat.combatants.find(it => !it.initiative);
|
||||
if (!initMissing) { // Premier round !
|
||||
for (let combatant of game.combat.data.combatants) {
|
||||
for (let combatant of game.combat.combatants) {
|
||||
let action = combatant.initiativeData?.arme;
|
||||
//console.log("Parsed !!!", combatant, initDone, game.combat.current, arme);
|
||||
if (action && action.type == "arme") {
|
||||
@ -415,7 +415,7 @@ export class RdDCombat {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static onUpdateCombat(combat, change, options, userId) {
|
||||
if (combat.data.round != 0 && combat.turns && combat.data.active) {
|
||||
if (combat.round != 0 && combat.turns && combat.active) {
|
||||
RdDCombat.combatNouveauTour(combat);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user