forked from public/foundryvtt-wh4-lang-fr-fr
Fix effects in translated compendiums
This commit is contained in:
@@ -64,7 +64,7 @@
|
||||
"effectApplication": "actor",
|
||||
"effectTrigger": "rollChannellingTest",
|
||||
"preventDuplicateEffects": true,
|
||||
"script": "// Remove the miscast if doubles rolled and succeeded\nif(args.result.result == \"success\" && args.result.extra.minormis && args.result.roll % 11 == 0)\n{\n delete args.result.extra.minormis\n}\n// Decrement the major miscast to minor miscast\nelse if(args.result.result == \"success\" && args.result.extra.majormis && args.result.roll % 11 == 0)\n{\n delete args.result.extra.majormis\n args.result.extra.minormis = game.i18n.localize(\"ROLL.MinorMis\")\n}"
|
||||
"script": "// Remove the miscast if doubles rolled and succeeded\nif(args.test.result.outcome == \"success\" && args.test.result.minormis && args.test.result.roll % 11 == 0)\n{\n delete args.test.result.minormis\n}\n// Decrement the major miscast to minor miscast\nelse if(args.test.result.outcome == \"success\" && args.test.result.majormis && args.test.result.roll % 11 == 0)\n{\n delete args.test.result.majormis\n args.test.result.minormis = game.i18n.localize(\"ROLL.MinorMis\")\n}"
|
||||
}
|
||||
},
|
||||
"icon": "modules/wfrp4e-core/icons/talents/aethyric-attunement.png",
|
||||
@@ -97,7 +97,7 @@
|
||||
"effectApplication": "actor",
|
||||
"effectTrigger": "preRollTest",
|
||||
"preventDuplicateEffects": true,
|
||||
"script": "if (args.testData.extra.skill && args.testData.extra.skill.name == \"Discrétion (Urbain)\")\n args.testData.extra.canReverse = true"
|
||||
"script": "if (args.test.item && args.test.item.name == \"Discrétion (Urbain)\")\n args.test.extra.canReverse = true"
|
||||
}
|
||||
},
|
||||
"icon": "modules/wfrp4e-core/icons/talents/alley-cat.png",
|
||||
@@ -176,7 +176,7 @@
|
||||
"effectApplication": "actor",
|
||||
"effectTrigger": "preRollTest",
|
||||
"preventDuplicateEffects": true,
|
||||
"script": "if (args.testData.extra.skill && args.testData.extra.skill.name == \"Charme\" && (args.testData.roll <= 5 || args.testData.roll <= args.testData.target))\n{\n\nlet SL = Math.floor(args.testData.target / 10) - Math.floor(args.testData.roll / 10)\nlet ones = Number(args.testData.roll.toString().split(\"\").pop())\n\nif (ones > SL)\n args.testData.extra.other.push(`<b>${this.effect.label}</b>: Peut utiliser l'unité comme DR de base (+${args.testData.successBonus + args.testData.slBonus} bonus DR) lors d'un débat.`)\n}"
|
||||
"script": "if (args.test.item && args.test.item.name == \"Charme\" && (args.test.result.roll <= 5 || args.test.result.roll <= args.test.target))\n{\n\nlet SL = Math.floor(args.test.target / 10) - Math.floor(args.test.result.roll / 10)\nlet ones = Number(args.test.result.roll.toString().split(\"\").pop())\n\nif (ones > SL)\n args.test.result.other.push(`<b>${this.effect.label}</b>: Peut utiliser l'unité comme DR de base (+${args.test.successBonus + args.test.slBonus} bonus DR) lors d'un débat.`)\n}"
|
||||
}
|
||||
},
|
||||
"icon": "modules/wfrp4e-core/icons/talents/argumentative.png",
|
||||
@@ -216,7 +216,7 @@
|
||||
"effectApplication": "actor",
|
||||
"effectTrigger": "preRollTest",
|
||||
"preventDuplicateEffects": true,
|
||||
"script": "if (args.testData.extra.skill && args.testData.extra.skill.name == \"Charme\" && (args.testData.roll <= 5 || args.testData.roll <= args.testData.target))\n{\n\nlet SL = Math.floor(args.testData.target / 10) - Math.floor(args.testData.roll / 10)\nlet ones = Number(args.testData.roll.toString().split(\"\").pop())\n\nif (ones > SL)\n args.testData.extra.other.push(`<b>${this.effect.label}</b>: Peut utiliser les unités comme DR de base (+${args.testData.successBonus + args.testData.slBonus} bonus DR) si la cible est attirée par vous.`)\n}"
|
||||
"script": "if (args.test.item && args.test.item.name == \"Charme\" && (args.test.result.roll <= 5 || args.test.result.roll <= args.test.target))\n{\n\nlet SL = Math.floor(args.test.target / 10) - Math.floor(args.test.result.roll / 10)\nlet ones = Number(args.test.result.roll.toString().split(\"\").pop())\n\nif (ones > SL)\n args.test.result.other.push(`<b>${this.effect.label}</b>: Peut utiliser les unités comme DR de base (+${args.test.successBonus + args.test.slBonus} bonus DR) si la cible est attirée par vous.`)\n}"
|
||||
}
|
||||
},
|
||||
"icon": "modules/wfrp4e-core/icons/talents/attractive.png",
|
||||
@@ -270,7 +270,7 @@
|
||||
"effectApplication": "actor",
|
||||
"effectTrigger": "rollWeaponTest",
|
||||
"preventDuplicateEffects": false,
|
||||
"script": "if (args.result.charging)\n{\n args.result.damage += 1\n args.additionalDamage += 1\n}"
|
||||
"script": "if (args.test.result.charging)\n{\n args.test.result.damage += 1\n args.additionalDamage += 1\n}"
|
||||
}
|
||||
},
|
||||
"icon": "modules/wfrp4e-core/icons/talents/berserk-charge.png",
|
||||
@@ -317,7 +317,7 @@
|
||||
"effectApplication": "actor",
|
||||
"effectTrigger": "preRollTest",
|
||||
"preventDuplicateEffects": true,
|
||||
"script": "if (args.testData.extra.skill && args.testData.extra.skill.name == \"Recherche\")\n args.testData.extra.canReverse = true"
|
||||
"script": "if (args.test.item && args.test.item.name == \"Recherche\")\n args.test.extra.canReverse = true"
|
||||
}
|
||||
},
|
||||
"icon": "modules/wfrp4e-core/icons/talents/bookish.png",
|
||||
@@ -393,7 +393,7 @@
|
||||
"effectApplication": "actor",
|
||||
"effectTrigger": "preRollTest",
|
||||
"preventDuplicateEffects": false,
|
||||
"script": "if (args.testData.extra.skill && args.testData.extra.skill.name == \"Résistance à l'alcool\")\n args.testData.extra.canReverse = true"
|
||||
"script": "if (args.test.item && args.test.item.name == \"Résistance à l'alcool\")\n args.test.extra.canReverse = true"
|
||||
}
|
||||
},
|
||||
"icon": "modules/wfrp4e-core/icons/talents/carouser.png",
|
||||
@@ -746,7 +746,7 @@
|
||||
"effectApplication": "actor",
|
||||
"effectTrigger": "prePrepareData",
|
||||
"preventDuplicateEffects": false,
|
||||
"script": "args.actor.data.data.details.move.value += 1"
|
||||
"script": "args.actor.details.move.value += 1"
|
||||
}
|
||||
},
|
||||
"icon": "modules/wfrp4e-core/icons/talents/fleet-footed.png",
|
||||
@@ -779,7 +779,7 @@
|
||||
"effectApplication": "actor",
|
||||
"effectTrigger": "prePrepareItems",
|
||||
"preventDuplicateEffects": false,
|
||||
"script": "args.actor.data.data.characteristics.s.bonus += 1\nargs.actor.data.data.characteristics.s.calculationBonusModifier -= 1"
|
||||
"script": "args.actor.characteristics.s.bonus += 1\nargs.actor.characteristics.s.calculationBonusModifier -= 1"
|
||||
}
|
||||
},
|
||||
"icon": "modules/wfrp4e-core/icons/talents/frenzy.png",
|
||||
@@ -826,7 +826,7 @@
|
||||
"effectApplication": "actor",
|
||||
"effectTrigger": "preRollTest",
|
||||
"preventDuplicateEffects": true,
|
||||
"script": "if (args.testData.extra.skill && args.testData.extra.skill.name == \"Ragot\")\n args.testData.extra.canReverse = true"
|
||||
"script": "if (args.test.item && args.test.item.name == \"Ragot\")\n args.test.extra.canReverse = true"
|
||||
}
|
||||
},
|
||||
"icon": "modules/wfrp4e-core/icons/talents/gregarious.png",
|
||||
@@ -859,7 +859,7 @@
|
||||
"effectApplication": "actor",
|
||||
"effectTrigger": "prefillDialog",
|
||||
"preventDuplicateEffects": false,
|
||||
"script": "if (args.options.reload && args.options.weapon && args.options.weapon.data.weaponGroup.value == \"blackpowder\")\n args.prefillModifiers.slBonus += 1"
|
||||
"script": "if (args.options.reload && args.options.weapon && args.options.weapon.weaponGroup.value == \"blackpowder\")\n args.prefillModifiers.slBonus += 1"
|
||||
}
|
||||
},
|
||||
"icon": "modules/wfrp4e-core/icons/talents/gunner.png",
|
||||
@@ -932,7 +932,7 @@
|
||||
"effectApplication": "actor",
|
||||
"effectTrigger": "prePrepareItem",
|
||||
"preventDuplicateEffects": false,
|
||||
"script": "if (args.item.type == \"prayer\" && (args.item.data.damage.value || args.item.data.damage.dice))\n args.item.data.damage.value += \"+1\""
|
||||
"script": "if (args.item.type == \"prayer\" && (args.item.damage.value || args.item.damage.dice))\n args.item.damage.value += \"+1\""
|
||||
}
|
||||
},
|
||||
"icon": "modules/wfrp4e-core/icons/talents/holy-hatred.png",
|
||||
@@ -1033,7 +1033,7 @@
|
||||
"effectApplication": "actor",
|
||||
"effectTrigger": "rollCastTest",
|
||||
"preventDuplicateEffects": true,
|
||||
"script": "// Remove the miscast if doubles rolled and succeeded\nif(args.result.result == \"success\" && args.result.extra.minormis && args.result.roll % 11 == 0)\n{\n delete args.result.extra.minormis\n}\n// Decrement the major miscast to minor miscast\nelse if(args.result.result == \"success\" && args.result.extra.majormis && args.result.roll % 11 == 0)\n{\n delete args.result.extra.majormis\n args.result.extra.minormis = game.i18n.localize(\"ROLL.MinorMis\")\n}"
|
||||
"script": "// Remove the miscast if doubles rolled and succeeded\nif(args.test.result.outcome == \"success\" && args.test.result.minormis && args.test.result.roll % 11 == 0)\n{\n delete args.test.result.minormis\n}\n// Decrement the major miscast to minor miscast\nelse if(args.test.result.outcome == \"success\" && args.test.result.majormis && args.test.result.roll % 11 == 0)\n{\n delete args.test.result.majormis\n args.test.result.minormis = game.i18n.localize(\"ROLL.MinorMis\")\n}"
|
||||
}
|
||||
},
|
||||
"icon": "modules/wfrp4e-core/icons/talents/instinctive-diction.png",
|
||||
@@ -1463,7 +1463,7 @@
|
||||
"effectApplication": "actor",
|
||||
"effectTrigger": "prepareData",
|
||||
"preventDuplicateEffects": false,
|
||||
"script": "args.actor.data.data.status.corruption.max += 1"
|
||||
"script": "args.actor.status.corruption.max += 1"
|
||||
}
|
||||
},
|
||||
"icon": "modules/wfrp4e-core/icons/talents/pure-soul.png",
|
||||
@@ -1557,7 +1557,7 @@
|
||||
"effectApplication": "actor",
|
||||
"effectTrigger": "rollWeaponTest",
|
||||
"preventDuplicateEffects": false,
|
||||
"script": "if (args.result.charging)\n{\n args.result.damage += 1\n args.additionalDamage += 1\n}"
|
||||
"script": "if (args.test.result.charging)\n{\n args.test.result.damage += 1\n args.additionalDamage += 1\n}"
|
||||
}
|
||||
},
|
||||
"icon": "modules/wfrp4e-core/icons/talents/resolute.png",
|
||||
@@ -1611,7 +1611,7 @@
|
||||
"effectApplication": "actor",
|
||||
"effectTrigger": "takeDamage",
|
||||
"preventDuplicateEffects": false,
|
||||
"script": "args.totalWoundLoss -= 1\nargs.messageElements.push(\"1 Robuste\")\n\nif (args.totalWoundLoss <= 0)\n{\nlet weapon = args.opposeData.attackerTestResult.weapon\nif \n(weapon && weapon.properties.flaws.includes(game.i18n.localize(\"PROPERTY.Undamaging\")))\n args.totalWoundLoss = 0\nelse\n args.totalWoundLoss = 1\n}"
|
||||
"script": "args.totalWoundLoss -= 1\nargs.messageElements.push(\"1 Robuste\")\n\nif (args.totalWoundLoss <= 0)\n{\nlet weapon = args.opposedTest.attackerTest.item\nif \n(weapon && weapon.properties.flaws.includes(game.i18n.localize(\"PROPERTY.Undamaging\")))\n args.totalWoundLoss = 0\nelse\n args.totalWoundLoss = 1\n}"
|
||||
}
|
||||
},
|
||||
"icon": "modules/wfrp4e-core/icons/talents/robust.png",
|
||||
@@ -1795,7 +1795,7 @@
|
||||
"effectApplication": "actor",
|
||||
"effectTrigger": "opposedDefender",
|
||||
"preventDuplicateEffects": true,
|
||||
"script": "if (args.opposeResult.winner == \"attacker\") {\n if (args.opposeResult.defenderTestResult.weapon && args.opposeResult.defenderTestResult.weapon.properties.qualities.find(q => q.includes(\"Shield\"))) {\n let shieldsman = this.actor.data.talents.find(t => t.name == this.effect.label)\n ui.notifications.notify(`<b>${this.effect.label}</b>: Gain de ${shieldsman.data.advances.value} avantages`)\n this.actor.modifyAdvantage(shieldsman.data.advances.value)\n }\n}"
|
||||
"script": "if (args.opposedTest.result.winner == \"attacker\") {\n if (args.opposedTest.result.defenderTest.item && args.opposedTest.result.defenderTest.item.properties.qualities.find(q => q.includes(\"Shield\"))) {\n let shieldsman = this.actor.data.talents.find(t => t.name == this.effect.label)\n ui.notifications.notify(`<b>${this.effect.label}</b>: Gain de ${shieldsman.data.advances.value} avantages`)\n this.actor.modifyAdvantage(shieldsman.data.advances.value)\n }\n}"
|
||||
}
|
||||
},
|
||||
"icon": "modules/wfrp4e-core/icons/talents/shieldsman.png",
|
||||
@@ -1835,7 +1835,7 @@
|
||||
"effectApplication": "actor",
|
||||
"effectTrigger": "calculateOpposedDamage",
|
||||
"preventDuplicateEffects": false,
|
||||
"script": "if (args.sizeDiff <= -2 && args.opposeData.attackerTestResult.extra.critical)\n args.damageMultiplier = Math.abs(args.sizeDiff)\n\n let sBonusDiff = args.opposeData.defenderTestResult.actor.data.characteristics.t.bonus - args.opposeData.attackerTestResult.actor.data.characteristics.s.bonus\n let weapon = args.opposeData.attackerTestResult.weapon\n if (sBonusDiff > 0 && weapon && weapon.data.damage.value.includes(\"SB\"))\n args.damage += sBonusDiff"
|
||||
"script": "if (args.sizeDiff <= -2 && args.opposedTest.attackerTest.result.critical)\n args.damageMultiplier = Math.abs(args.sizeDiff)\n\n let sBonusDiff = args.opposedTest.defenderTest.result.actor.characteristics.t.bonus - args.opposedTest.attackerTest.result.actor.characteristics.s.bonus\n let weapon = args.opposedTest.attackerTest.item\n if (sBonusDiff > 0 && weapon && weapon.damage.value.includes(\"SB\"))\n args.damage += sBonusDiff"
|
||||
}
|
||||
},
|
||||
"icon": "modules/wfrp4e-core/icons/talents/slayer.png",
|
||||
@@ -1889,7 +1889,7 @@
|
||||
"effectApplication": "actor",
|
||||
"effectTrigger": "prepareData",
|
||||
"preventDuplicateEffects": false,
|
||||
"script": "args.actor.data.data.details.move.run += 2"
|
||||
"script": "args.actor.details.move.run += 2"
|
||||
}
|
||||
},
|
||||
"icon": "modules/wfrp4e-core/icons/talents/sprinter.png",
|
||||
@@ -1989,7 +1989,7 @@
|
||||
"effectApplication": "actor",
|
||||
"effectTrigger": "rollWeaponTest",
|
||||
"preventDuplicateEffects": false,
|
||||
"script": "if(args.result.extra.critical)\n{\n args.result.damage +=1 \n args.result.additionalDamage += 1\n}"
|
||||
"script": "if(args.test.result.critical)\n{\n args.test.result.damage +=1 \n args.test.result.additionalDamage += 1\n}"
|
||||
}
|
||||
},
|
||||
"icon": "modules/wfrp4e-core/icons/talents/strike-to-injure.png",
|
||||
@@ -2060,7 +2060,7 @@
|
||||
"effectApplication": "actor",
|
||||
"effectTrigger": "prePrepareItems",
|
||||
"preventDuplicateEffects": false,
|
||||
"script": "args.actor.data.data.status.encumbrance.max += 1"
|
||||
"script": "args.actor.status.encumbrance.max += 1"
|
||||
}
|
||||
},
|
||||
"icon": "modules/wfrp4e-core/icons/talents/strong-back.png",
|
||||
@@ -2146,7 +2146,7 @@
|
||||
"effectApplication": "actor",
|
||||
"effectTrigger": "prePrepareItems",
|
||||
"preventDuplicateEffects": false,
|
||||
"script": "args.actor.data.data.status.encumbrance.max += 2"
|
||||
"script": "args.actor.status.encumbrance.max += 2"
|
||||
}
|
||||
},
|
||||
"icon": "modules/wfrp4e-core/icons/talents/sturdy.png",
|
||||
@@ -2223,7 +2223,7 @@
|
||||
"effectApplication": "actor",
|
||||
"effectTrigger": "preRollTest",
|
||||
"preventDuplicateEffects": true,
|
||||
"script": "if (args.testData.extra.skill && args.testData.extra.skill.data.characteristic.value == \"fel\" && (args.testData.roll <= 5 || args.testData.roll <= args.testData.target))\n{\n\nlet SL = Math.floor(args.testData.target / 10) - Math.floor(args.testData.roll / 10)\nlet ones = Number(args.testData.roll.toString().split(\"\").pop())\n\nif (ones > SL)\n args.testData.extra.other.push(`<b>${this.effect.label}</b>: Peu utiliser l'unité comme DR de base (+${args.testData.successBonus + args.testData.slBonus} bonus DR)lorsque vous influencez des PNJs avec un statut social plus élevé.`)\n}"
|
||||
"script": "if (args.test.item && args.test.item.data.characteristic.value == \"fel\" && (args.test.result.roll <= 5 || args.test.result.roll <= args.test.target))\n{\n\nlet SL = Math.floor(args.test.target / 10) - Math.floor(args.test.result.roll / 10)\nlet ones = Number(args.test.result.roll.toString().split(\"\").pop())\n\nif (ones > SL)\n args.test.result.other.push(`<b>${this.effect.label}</b>: Peu utiliser l'unité comme DR de base (+${args.test.successBonus + args.test.slBonus} bonus DR)lorsque vous influencez des PNJs avec un statut social plus élevé.`)\n}"
|
||||
}
|
||||
},
|
||||
"icon": "modules/wfrp4e-core/icons/talents/supportive.png",
|
||||
|
||||
Reference in New Issue
Block a user