31 lines
1.2 KiB
JavaScript
31 lines
1.2 KiB
JavaScript
|
import { SoSCardDeck } from "./sos-card-deck.js";
|
||
|
import { SoSUtility } from "./sos-utility.js";
|
||
|
import { SoSFlipDialog } from "./sos-flip-dialog.js";
|
||
|
import { SoSDialogCombatActions } from "./sos-dialog-combat-actions.js";
|
||
|
|
||
|
/* -------------------------------------------- */
|
||
|
export class SoSCombat extends Combat {
|
||
|
|
||
|
/* -------------------------------------------- */
|
||
|
async nextRound() {
|
||
|
console.log("NEXT ROUND !!!!");
|
||
|
|
||
|
if ( game.user.isGM ) {
|
||
|
ChatMessage.create( { content: `New round !! Click on the button below to declare your actions for round ${this.round} !<br>
|
||
|
<a class='chat-card-button' id='button-declare-actions' data-combat-id='${this._id} data-round='${this.round}'>Declare actions</a>`,
|
||
|
whisper: game.users.map(user => user.data._id) } );
|
||
|
}
|
||
|
super.nextRound();
|
||
|
}
|
||
|
|
||
|
/* -------------------------------------------- */
|
||
|
setupActorActions(actionConf) {
|
||
|
if ( !this.phaseSetup) this.phaseSetup = []; // Opportunistic init
|
||
|
if ( !this.phaseSetup[this.round] ) this.phaseSetup[this.round] = {}; // Bis
|
||
|
|
||
|
// Keep track
|
||
|
this.phaseSetup[this.round][actionConf.userId] = actionConf;
|
||
|
}
|
||
|
|
||
|
}
|