feat: bouton Épreuve dans le chat (remplace Sort)
Le bouton Sort était peu utile (personnage pas toujours défini).
Remplacé par Épreuve 🎲 qui ouvre le dialogue de jet standard,
accessible depuis le chat pour tous.
This commit is contained in:
+2
-7
@@ -237,14 +237,9 @@ function addChatTools() {
|
|||||||
game.system.api.openActionComplexe()
|
game.system.api.openActionComplexe()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
addBtn("fas fa-wand-magic-sparkles", "Sort", "Lancer un sort", () => {
|
addBtn("fas fa-dice", "Épreuve", "Lancer une épreuve standard", () => {
|
||||||
const actor = game.user?.character || game.actors?.find(a => a.type === "personnage")
|
const actor = game.user?.character || game.actors?.find(a => a.type === "personnage")
|
||||||
if (actor) {
|
if (actor) actor.system?.roll?.("stat", { name: "Épreuve", value: 0 })
|
||||||
const spell = actor.items.find(i => i.type === "sortilege")
|
|
||||||
if (spell) {
|
|
||||||
import("./module/applications/sortilege-casting.mjs").then(m => m.default.prompt(spell, actor))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
controls.parentNode.insertBefore(tools, controls)
|
controls.parentNode.insertBefore(tools, controls)
|
||||||
|
|||||||
Reference in New Issue
Block a user