forked from public/bol
Combat Tracker + power enhancements
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import { BoLDefaultRoll } from "../controllers/bol-rolls.js";
|
||||
import { BoLRoll, BoLDefaultRoll } from "../controllers/bol-rolls.js";
|
||||
|
||||
// Spell circle to min PP cost
|
||||
const __circle2minpp = { 0: 0, 1: 2, 2: 6, 3: 11 }
|
||||
@ -26,6 +26,14 @@ export class BoLUtility {
|
||||
type: Boolean,
|
||||
onChange: lang => window.location.reload()
|
||||
})
|
||||
game.settings.register("bol", "auto-remove-dead", {
|
||||
name: "Enlever les PNJs morts automatiquement",
|
||||
hint: "Supprime les PNJ (piétaille, créatures, coriaces) automatiquement du combat lorsqu'ils sont à 0 Vitalité ou moins",
|
||||
scope: "world",
|
||||
config: true,
|
||||
default: false,
|
||||
type: Boolean
|
||||
})
|
||||
game.settings.register("bol", "dice-formula", {
|
||||
name: "Formule de dés",
|
||||
hint: "Sélectionne la formule de dés (par défaut 2d6)",
|
||||
@ -305,6 +313,14 @@ export class BoLUtility {
|
||||
let message = game.messages.get(messageId)
|
||||
return message.getFlag("world", "bol-roll-data")
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
static requestInitRoll(actorId, combatData ) {
|
||||
let actor = game.actors.get( actorId )
|
||||
if (actor && actor.isOwner) {
|
||||
ui.notifications.info(game.i18n.localize("BOL.ui.warninitiative"))
|
||||
BoLRoll.aptitudeCheck(actor, "init", undefined, combatData)
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static cleanupButtons(id) {
|
||||
@ -574,6 +590,9 @@ export class BoLUtility {
|
||||
if (sockmsg.name == "msg_cleanup_buttons") {
|
||||
$(`#${sockmsg.data.id}`).hide() // Hide the options roll buttons
|
||||
}
|
||||
if (sockmsg.name == "msg_request_init_roll") {
|
||||
this.requestInitRoll( sockmsg.data.actorId, sockmsg.data.combatData)
|
||||
}
|
||||
if (sockmsg.name == "msg_damage_handling") {
|
||||
BoLUtility.processDamageHandling(sockmsg.data.attackId, sockmsg.data.defenseMode, sockmsg.data.weaponId, sockmsg.data.msgId)
|
||||
}
|
||||
|
Reference in New Issue
Block a user