First flip management

This commit is contained in:
2021-01-24 23:18:50 +01:00
parent 8cd9d638b9
commit 05a2b02482
8 changed files with 252 additions and 38 deletions

View File

@ -141,7 +141,8 @@ export class SoSActor extends Actor {
mode: 'stat',
stat: duplicate(this.data.data.stats[statKey]),
actor: this,
modifierList: SoSUtility.fillRange(-10, +10)
modifierList: SoSUtility.fillRange(-10, +10),
tnList: SoSUtility.fillRange(6, 20)
}
let html = await renderTemplate('systems/foundryvtt-shadows-over-sol/templates/dialog-flip.html', flipData);
new SoSFlipDialog(flipData, html).render(true);
@ -149,5 +150,18 @@ export class SoSActor extends Actor {
//console.log("STAT", this);
//let result = this.cardDeck.doFlipStat( duplicate(this.data.data.stat[statKey]) );
}
/* -------------------------------------------- */
async rollSkill( skill ) {
let flipData = {
mode: 'skill',
statList: duplicate(this.data.data.stats),
skill: duplicate(skill),
actor: this,
modifierList: SoSUtility.fillRange(-10, +10),
tnList: SoSUtility.fillRange(6, 20)
}
let html = await renderTemplate('systems/foundryvtt-shadows-over-sol/templates/dialog-flip.html', flipData);
new SoSFlipDialog(flipData, html).render(true);
}
}