Add new stuff/compendium
This commit is contained in:
@ -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]) );
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user