Add new stuff/compendium

This commit is contained in:
2021-01-21 17:16:01 +01:00
parent 8c5b6e9c82
commit 934e959dfb
58 changed files with 510 additions and 116 deletions

View File

@ -1,5 +1,6 @@
import { SoSCardDeck } from "./sos-card-deck.js";
import { SoSUtility } from "./sos-utility.js";
import { SoSFlipDialog } from "./sos-flip-dialog.js";
/* -------------------------------------------- */
@ -57,7 +58,7 @@ export class SoSActor extends Actor {
/* -------------------------------------------- */
resetDeck( ) {
this.cardDeck.shuffleDeck();
this.cardDeck.drawEdge();
this.cardDeck.drawEdge( this.data.data.scores.edge.value );
this.saveDeck();
}
@ -134,9 +135,19 @@ export class SoSActor extends Actor {
}
/* -------------------------------------------- */
rollStat( statKey ) {
console.log("STAT", this);
let result = this.cardDeck.doFlipStat( duplicate(this.data.data.stat[statKey]) );
async rollStat( statKey ) {
let flipData = {
mode: 'stat',
stat: duplicate(this.data.data.stats[statKey]),
actor: this,
modifierList: SoSUtility.fillRange(-10, +10)
}
let html = await renderTemplate('systems/foundryvtt-shadows-over-sol/templates/dialog-flip.html', flipData);
new SoSFlipDialog(flipData, html).render(true);
//console.log("STAT", this);
//let result = this.cardDeck.doFlipStat( duplicate(this.data.data.stat[statKey]) );
}
}