Increase support

This commit is contained in:
2020-05-22 22:37:02 +02:00
parent d7971d8920
commit c144b2473c
8 changed files with 150 additions and 63 deletions

View File

@ -2,7 +2,13 @@
* Extend the base Actor entity by defining a custom roll data structure which is ideal for the Simple system.
* @extends {Actor}
*/
import { RdDUtility } from "./rdd-utility.js";
export class RdDActor extends Actor {
/* -------------------------------------------- */
prepareData() {
super.prepareData();
@ -21,6 +27,33 @@ export class RdDActor extends Actor {
_prepareCharacterData(actorData) {
}
/* -------------------------------------------- */
rollCompetence( compName ) {
let compItem = RdDUtility.findCompetence( this.data.items, compName);
console.log("Roll !", compItem );
renderTemplate('systems/foundryvtt-reve-de-dragon/templates/dialog-competence.html', compItem).then(dlg =>
{
new Dialog(
{
title: "Test de compétence",
content: dlg,
buttons:
{
rollButton:
{
label: "Lancer"
//callback: html => dialogOptions.callback(html, roll)
}
},
default: "rollButton"
}).render(true);
});
}
/* -------------------------------------------- */
/** @override */
getRollData() {