Add hindrance dice
This commit is contained in:
parent
c1eb33bc21
commit
ba98d9c264
BIN
images/dice/hindrance-dice-empty.png
Normal file
BIN
images/dice/hindrance-dice-empty.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.0 KiB |
25
modules/pegasus-hindrance-die.js
Normal file
25
modules/pegasus-hindrance-die.js
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
export class PegasusHindranceDie extends Die {
|
||||||
|
constructor(termData ) {
|
||||||
|
termData.faces=6;
|
||||||
|
super(termData);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
|
||||||
|
/** @override */
|
||||||
|
static DENOMINATION = "h";
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
|
||||||
|
/** @override */
|
||||||
|
getResultLabel(result) {
|
||||||
|
return {
|
||||||
|
"1": '<img src="systems/fvtt-pegasus-rpg/images/dice/hindrance-dice-empty.png" />',
|
||||||
|
"2": '<img src="systems/fvtt-pegasus-rpg/images/dice/hindrance-dice-empty.png" />',
|
||||||
|
"3": '<img src="systems/fvtt-pegasus-rpg/images/dice/hindrance-dice-empty.png" />',
|
||||||
|
"4": '<img src="systems/fvtt-pegasus-rpg/images/dice/hindrance-dice-empty.png" />',
|
||||||
|
"5": '<img src="systems/fvtt-pegasus-rpg/images/dice/hindrance-dice-empty.png" />',
|
||||||
|
"6": '<img src="systems/fvtt-pegasus-rpg/images/dice/hindrance-dice.png" />'
|
||||||
|
}[result.result];
|
||||||
|
}
|
||||||
|
}
|
@ -15,6 +15,7 @@ import { PegasusVehicleSheet } from "./pegasus-vehicle-sheet.js";
|
|||||||
import { PegasusUtility } from "./pegasus-utility.js";
|
import { PegasusUtility } from "./pegasus-utility.js";
|
||||||
import { PegasusCombatTracker,PegasusCombat } from "./pegasus-combat.js";
|
import { PegasusCombatTracker,PegasusCombat } from "./pegasus-combat.js";
|
||||||
import { PegasusItem } from "./pegasus-item.js";
|
import { PegasusItem } from "./pegasus-item.js";
|
||||||
|
import { PegasusHindranceDie } from "./pegasus-hindrance-die.js";
|
||||||
import { PEGASUS_CONFIG } from "./pegasus-config.js"
|
import { PEGASUS_CONFIG } from "./pegasus-config.js"
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
@ -57,6 +58,7 @@ Hooks.once("init", async function () {
|
|||||||
CONFIG.Actor.documentClass = PegasusActor
|
CONFIG.Actor.documentClass = PegasusActor
|
||||||
CONFIG.Item.documentClass = PegasusItem
|
CONFIG.Item.documentClass = PegasusItem
|
||||||
CONFIG.ui.combat = PegasusCombatTracker
|
CONFIG.ui.combat = PegasusCombatTracker
|
||||||
|
CONFIG.Dice.terms["h"] = PegasusHindranceDie
|
||||||
game.system.pegasus = {
|
game.system.pegasus = {
|
||||||
utility: PegasusUtility,
|
utility: PegasusUtility,
|
||||||
config: PEGASUS_CONFIG
|
config: PEGASUS_CONFIG
|
||||||
@ -74,7 +76,6 @@ Hooks.once("init", async function () {
|
|||||||
|
|
||||||
PegasusUtility.init()
|
PegasusUtility.init()
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
|
@ -26,6 +26,29 @@ export class PegasusUtility {
|
|||||||
/* Deprecated, no more used in rules Hooks.on("getCombatTrackerEntryContext", (html, options) => {
|
/* Deprecated, no more used in rules Hooks.on("getCombatTrackerEntryContext", (html, options) => {
|
||||||
PegasusUtility.pushInitiativeOptions(html, options);
|
PegasusUtility.pushInitiativeOptions(html, options);
|
||||||
});*/
|
});*/
|
||||||
|
Hooks.once('diceSoNiceReady', (dice3d) => {
|
||||||
|
dice3d.addSystem({ id: "pegasus-hindrance", name: "Hindrance Die" }, "preferred");
|
||||||
|
dice3d.addDicePreset({
|
||||||
|
type: "dh",
|
||||||
|
labels: [
|
||||||
|
'systems/fvtt-pegasus-rpg/images/dice/hindrance-dice-empty.png',
|
||||||
|
'systems/fvtt-pegasus-rpg/images/dice/hindrance-dice-empty.png',
|
||||||
|
'systems/fvtt-pegasus-rpg/images/dice/hindrance-dice-empty.png',
|
||||||
|
'systems/fvtt-pegasus-rpg/images/dice/hindrance-dice-empty.png',
|
||||||
|
'systems/fvtt-pegasus-rpg/images/dice/hindrance-dice-empty.png',
|
||||||
|
'systems/fvtt-pegasus-rpg/images/dice/hindrance-dice.png'
|
||||||
|
],
|
||||||
|
bumpMaps: [
|
||||||
|
'systems/fvtt-pegasus-rpg/images/dice/hindrance-dice-empty.png',
|
||||||
|
'systems/fvtt-pegasus-rpg/images/dice/hindrance-dice-empty.png',
|
||||||
|
'systems/fvtt-pegasus-rpg/images/dice/hindrance-dice-empty.png',
|
||||||
|
'systems/fvtt-pegasus-rpg/images/dice/hindrance-dice-empty.png',
|
||||||
|
'systems/fvtt-pegasus-rpg/images/dice/hindrance-dice-empty.png',
|
||||||
|
'systems/fvtt-pegasus-rpg/images/dice/hindrance-dice.png'
|
||||||
|
],
|
||||||
|
system: "pegasus-hindrance"
|
||||||
|
}, "d6")
|
||||||
|
})
|
||||||
Hooks.on("dropCanvasData", (canvas, data) => {
|
Hooks.on("dropCanvasData", (canvas, data) => {
|
||||||
PegasusUtility.dropItemOnToken(canvas, data)
|
PegasusUtility.dropItemOnToken(canvas, data)
|
||||||
});
|
});
|
||||||
|
@ -252,7 +252,7 @@
|
|||||||
],
|
],
|
||||||
"title": "Pegasus RPG",
|
"title": "Pegasus RPG",
|
||||||
"url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg",
|
"url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg",
|
||||||
"version": "11.0.5",
|
"version": "11.0.6",
|
||||||
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-pegasus-rpg/archive/fvtt-pegasus-rpg-v11.0.5.zip",
|
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-pegasus-rpg/archive/fvtt-pegasus-rpg-v11.0.6.zip",
|
||||||
"background": "systems/fvtt-pegasus-rpg/images/ui/pegasus_welcome_page.webp"
|
"background": "systems/fvtt-pegasus-rpg/images/ui/pegasus_welcome_page.webp"
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user