ActorSheet, WIP
This commit is contained in:
@ -11,10 +11,6 @@ export class HeritiersUtility {
|
||||
Hooks.on('renderChatLog', (log, html, data) => HeritiersUtility.chatListeners(html))
|
||||
Hooks.on("getChatLogEntryContext", (html, options) => HeritiersUtility.chatRollMenu(html, options))
|
||||
|
||||
Hooks.on("getCombatTrackerEntryContext", (html, options) => {
|
||||
HeritiersUtility.pushInitiativeOptions(html, options);
|
||||
})
|
||||
|
||||
this.rollDataStore = {}
|
||||
this.defenderStore = {}
|
||||
HeritiersCommands.init()
|
||||
@ -282,7 +278,10 @@ export class HeritiersUtility {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static computeResult(rollData) {
|
||||
rollData.diceResult = rollData.roll.terms[0].results[0].result
|
||||
rollData.diceResult = -1
|
||||
for ( let res of rollData.roll.terms[0].results) {
|
||||
rollData.diceResult = Math.max(res.result, rollData.diceResult)
|
||||
}
|
||||
if (rollData.mainDice.includes("d10")) {
|
||||
if ( rollData.diceResult == 1) {
|
||||
rollData.finalResult -= 3
|
||||
@ -292,6 +291,9 @@ export class HeritiersUtility {
|
||||
if ( rollData.diceResult == 1 || rollData.diceResult == 2) {
|
||||
rollData.finalResult -= 5
|
||||
}
|
||||
}
|
||||
if (rollData.useHeritage || rollData.useTricherie) {
|
||||
|
||||
}
|
||||
//rollData.finalResult = Math.max(rollData.finalResult, 0)
|
||||
//console.log("Result : ", rollData)
|
||||
@ -309,8 +311,9 @@ export class HeritiersUtility {
|
||||
let actor = this.getActorFromRollData(rollData)
|
||||
//rollData.actionImg = "systems/fvtt-les-heritiers/assets/icons/" + actor.system.attributs[rollData.attrKey].labelnorm + ".webp"
|
||||
rollData.carac = duplicate(actor.system.caracteristiques[rollData.caracKey])
|
||||
rollData.diceFormula = rollData.mainDice
|
||||
|
||||
rollData.nbDice = (rollData.useTricherie || rollData.useHeritage) ? 3 : 1
|
||||
rollData.diceFormula = rollData.nbDice + rollData.mainDice + "kh1"
|
||||
//console.log("BEFORE COMP", rollData)
|
||||
if (rollData.competence) {
|
||||
let compmod = (rollData.competence.system.niveau == 0) ? -3 : 0
|
||||
|
Reference in New Issue
Block a user