Opposed tests, ongoing process

This commit is contained in:
2021-02-11 00:07:13 +01:00
parent 42af291a7c
commit de104fb386
12 changed files with 264 additions and 25 deletions

View File

@ -116,6 +116,18 @@ export class SoSCombat extends Combat {
return 0;
}
/* -------------------------------------------- */
getAPFromActor( actorId ) {
for( let combatant of this.combatants) {
//console.log(combatant);
if ( combatant.actor.data._id == actorId ) {
let phase = this.phaseSetup[combatant._id];
return phase.remainingAP;
}
}
return 0;
}
/* -------------------------------------------- */
async setupActorActions(actionConf) {
console.log("Setting combat for phase : ", actionConf);
@ -124,7 +136,7 @@ export class SoSCombat extends Combat {
// Keep track
this.phaseSetup[actionConf.combatantId] = actionConf;
console.log( this.combatants);
console.log( this.combatants );
//let combatant = this.combatants.find( comb => comb._id == actionConf.combatantId);
await this.setInitiative( actionConf.combatantId, this.getPhaseRank( actionConf ) );