Upgrade
This commit is contained in:
@ -5,12 +5,14 @@ export class SoSDialogCombatActions extends Dialog {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async create( combatId, combatantId, round, uniqId ) {
|
||||
|
||||
let combat = game.combats.get( combatId);
|
||||
|
||||
let combatActions = {
|
||||
actionsList: await SoSUtility.loadCompendium( 'foundryvtt-shadows-over-sol.combat-actions' ),
|
||||
actionPoints: SoSUtility.fillRange(0, 6),
|
||||
combatId: combatId,
|
||||
combatId: combatId,
|
||||
combatantId: combatantId,
|
||||
combatantsList: combat.data.combatants,
|
||||
uniqId: uniqId,
|
||||
round: round
|
||||
}
|
||||
@ -22,7 +24,7 @@ export class SoSDialogCombatActions extends Dialog {
|
||||
|
||||
//console.log("ACTIONS", combatActions.actionsList );
|
||||
let html = await renderTemplate('systems/foundryvtt-shadows-over-sol/templates/dialog-combat-actions.html', combatActions);
|
||||
return new SoSDialogCombatActions(combatActions, html );
|
||||
return new SoSDialogCombatActions(combatActions, html , { width: 640, height: 320} );
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -56,6 +58,10 @@ export class SoSDialogCombatActions extends Dialog {
|
||||
let action2 = duplicate(this.combatActions.actionsList[action2Index]);
|
||||
let action1Index = $('#action1').val();
|
||||
let action1 = duplicate(this.combatActions.actionsList[action1Index]);
|
||||
|
||||
let combatant3Id = $('#combatant3').val();
|
||||
let combatant2Id = $('#combatant2').val();
|
||||
let combatant1Id = $('#combatant1').val();
|
||||
|
||||
let msgdata = {
|
||||
combatId: this.combatActions.combatId,
|
||||
@ -63,6 +69,7 @@ export class SoSDialogCombatActions extends Dialog {
|
||||
uniqId: this.combatActions.uniqId,
|
||||
userId: game.userId,
|
||||
phaseArray: [ action1, action2, action3],
|
||||
targetArray: [ combatant1Id, combatant2Id, combatant3Id],
|
||||
remainingAP: ap
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user