Fix EiS spells + core spells + Tzeentch domain
This commit is contained in:
@ -27,6 +27,34 @@ const _patch_eis = () => {
|
||||
WFRP4E.difficultyLabels["impossible"] = "Impossible (-50)";
|
||||
|
||||
WFRP4E.loreEffect["tzeentch"] = "Les cibles des sorts de Tzeentch sont déchirées par la magie transformatrice du Chaos. Les cibles affectées par un sort du savoir de Tzeentch doivent réussir un test d'endurance Intermédiaire (+0) ou gagner +1 Point de Corruption. S'ils réussissent leur test, ils gagnent à la place +1 Point de Chance, qui peut être utilisé normalement. Tels sont les caprices de Tzeentch";
|
||||
|
||||
WFRP4E.loreEffects["tzeentch"] = {
|
||||
label: "Lore of Tzeentch",
|
||||
icon: "modules/wfrp4e-core/icons/spells/tzeentch.png",
|
||||
transfer: true,
|
||||
flags: {
|
||||
wfrp4e: {
|
||||
"effectApplication": "apply",
|
||||
"effectTrigger": "oneTime",
|
||||
"lore": true,
|
||||
"script": `
|
||||
if (this.actor.isOwner)
|
||||
args.actor.setupSkill("Résistance", {context : {failure: "1 Point de Corruption reçu", success : "1 Point de Chance gagné"}}).then(setupData => {
|
||||
args.actor.basicTest(setupData).then(test =>
|
||||
{
|
||||
if (test.result.result == "success" && args.actor.data.type == "character")
|
||||
{
|
||||
args.actor.update({"data.status.fortune.value" : args.actor.data.data.status.fortune.value + 1})
|
||||
}
|
||||
else if (test.result.result == "failure" && args.actor.data.type == "character")
|
||||
{
|
||||
args.actor.update({"data.status.corruption.value" : args.actor.data.data.status.corruption.value + 1})
|
||||
}
|
||||
})
|
||||
})`
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -233,10 +261,10 @@ const convertColumnToMulti = (table) => {
|
||||
|
||||
/************************************************************************************/
|
||||
const __patchStyleSheet = () => {
|
||||
for( let styleSheet of document.styleSheets) {
|
||||
if (styleSheet.href && styleSheet.href.includes("wfrp4e.css") ) {
|
||||
for (let styleSheet of document.styleSheets) {
|
||||
if (styleSheet.href && styleSheet.href.includes("wfrp4e.css")) {
|
||||
let found = 0
|
||||
for (let i=0; i<styleSheet.cssRules.length; i++) {
|
||||
for (let i = 0; i < styleSheet.cssRules.length; i++) {
|
||||
let rule = styleSheet.cssRules[i]
|
||||
if (rule.selectorText == '.sidebar-popout') {
|
||||
console.log("DELETE RULE", rule)
|
||||
@ -360,7 +388,7 @@ Hooks.once('ready', () => {
|
||||
setTimeout(__add_actors_translation, 21000, false, true);
|
||||
|
||||
//__patchStyleSheet()
|
||||
|
||||
|
||||
/* ATTEMPT !!
|
||||
loadCompendium("wfrp4e-core.spells").then( comp => {
|
||||
let sorted = {};
|
||||
|
Reference in New Issue
Block a user