forked from public/foundryvtt-reve-de-dragon
Increase support
This commit is contained in:
@ -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() {
|
||||
|
Reference in New Issue
Block a user