Update item sheets

This commit is contained in:
2024-12-04 03:06:33 +01:00
parent 91c468e736
commit 1cc3a0bc21
26 changed files with 6117 additions and 772 deletions

View File

@ -105,21 +105,21 @@ export default class CthulhuEternalRoll extends Roll {
switch (this.type) {
case ROLL_TYPE.SAVE:
const saveLabel = game.i18n.localize(`TENEBRIS.Character.FIELDS.caracteristiques.${this.target}.valeur.label`)
text = game.i18n.format("TENEBRIS.Roll.save", { save: saveLabel })
const saveLabel = game.i18n.localize(`CTHULHUETERNAL.Character.FIELDS.caracteristiques.${this.target}.valeur.label`)
text = game.i18n.format("CTHULHUETERNAL.Roll.save", { save: saveLabel })
text = text.concat("<br>").concat(`Seuil : ${this.treshold}`)
break
case ROLL_TYPE.RESOURCE:
const resourceLabel = game.i18n.localize(`TENEBRIS.Character.FIELDS.ressources.${this.target}.valeur.label`)
text = game.i18n.format("TENEBRIS.Roll.resource", { resource: resourceLabel })
const resourceLabel = game.i18n.localize(`CTHULHUETERNAL.Character.FIELDS.ressources.${this.target}.valeur.label`)
text = game.i18n.format("CTHULHUETERNAL.Roll.resource", { resource: resourceLabel })
break
case ROLL_TYPE.DAMAGE:
const damageLabel = this.target
text = game.i18n.format("TENEBRIS.Roll.damage", { item: damageLabel })
text = game.i18n.format("CTHULHUETERNAL.Roll.damage", { item: damageLabel })
break
case ROLL_TYPE.ATTACK:
const attackLabel = this.target
text = game.i18n.format("TENEBRIS.Roll.attack", { item: attackLabel })
text = game.i18n.format("CTHULHUETERNAL.Roll.attack", { item: attackLabel })
break
}
return text
@ -131,7 +131,7 @@ export default class CthulhuEternalRoll extends Roll {
* @returns {string} A formatted string containing the value, help, hindrance, and modifier.
*/
_createIntroTextTooltip() {
let tooltip = game.i18n.format("TENEBRIS.Tooltip.saveIntroTextTooltip", { value: this.value, aide: this.aide, gene: this.gene, modificateur: this.modificateur })
let tooltip = game.i18n.format("CTHULHUETERNAL.Tooltip.saveIntroTextTooltip", { value: this.value, aide: this.aide, gene: this.gene, modificateur: this.modificateur })
if (this.hasTarget) {
tooltip = tooltip.concat(`<br>Cible : ${this.targetName}`)
}
@ -160,9 +160,9 @@ export default class CthulhuEternalRoll extends Roll {
// Formula for a resource roll
if (options.rollType === ROLL_TYPE.RESOURCE) {
let ressource = game.i18n.localize(`TENEBRIS.Character.FIELDS.ressources.${options.rollTarget}.valeur.label`)
let ressource = game.i18n.localize(`CTHULHUETERNAL.Character.FIELDS.ressources.${options.rollTarget}.valeur.label`)
if (formula === "0" || formula === "") {
ui.notifications.warn(game.i18n.format("TENEBRIS.Warning.plusDeRessource", { ressource: ressource }))
ui.notifications.warn(game.i18n.format("CTHULHUETERNAL.Warning.plusDeRessource", { ressource: ressource }))
return null
}
}
@ -266,10 +266,10 @@ export default class CthulhuEternalRoll extends Roll {
const content = await renderTemplate("systems/fvtt-cthulhu-eternal/templates/roll-dialog.hbs", dialogContext)
const title = CthulhuEternalRoll.createTitle(options.rollType, options.rollTarget)
const label = game.i18n.localize("TENEBRIS.Roll.roll")
const label = game.i18n.localize("CTHULHUETERNAL.Roll.roll")
const rollContext = await foundry.applications.api.DialogV2.wait({
window: { title: title },
classes: ["lethalfantasy"],
classes: ["fvtt-cthulhu-eternal"],
content,
buttons: [
{
@ -429,15 +429,15 @@ export default class CthulhuEternalRoll extends Roll {
static createTitle(type, target) {
switch (type) {
case ROLL_TYPE.SAVE:
return `${game.i18n.localize("TENEBRIS.Dialog.titleSave")} : ${game.i18n.localize(`TENEBRIS.Manager.${target}`)}`
return `${game.i18n.localize("CTHULHUETERNAL.Dialog.titleSave")} : ${game.i18n.localize(`CTHULHUETERNAL.Manager.${target}`)}`
case ROLL_TYPE.RESOURCE:
return `${game.i18n.localize("TENEBRIS.Dialog.titleResource")} : ${game.i18n.localize(`TENEBRIS.Manager.${target}`)}`
return `${game.i18n.localize("CTHULHUETERNAL.Dialog.titleResource")} : ${game.i18n.localize(`CTHULHUETERNAL.Manager.${target}`)}`
case ROLL_TYPE.DAMAGE:
return `${game.i18n.localize("TENEBRIS.Dialog.titleDamage")} : ${target}`
return `${game.i18n.localize("CTHULHUETERNAL.Dialog.titleDamage")} : ${target}`
case ROLL_TYPE.ATTACK:
return `${game.i18n.localize("TENEBRIS.Dialog.titleAttack")} : ${target}`
return `${game.i18n.localize("CTHULHUETERNAL.Dialog.titleAttack")} : ${target}`
default:
return game.i18n.localize("TENEBRIS.Dialog.titleStandard")
return game.i18n.localize("CTHULHUETERNAL.Dialog.titleStandard")
}
}
@ -543,25 +543,25 @@ export default class CthulhuEternalRoll extends Roll {
static _convertAvantages(value) {
switch (value) {
case "1":
return game.i18n.localize("TENEBRIS.Roll.doubleDesavantage")
return game.i18n.localize("CTHULHUETERNAL.Roll.doubleDesavantage")
case "2":
return game.i18n.localize("TENEBRIS.Roll.desavantage")
return game.i18n.localize("CTHULHUETERNAL.Roll.desavantage")
case "3":
return game.i18n.localize("TENEBRIS.Roll.normal")
return game.i18n.localize("CTHULHUETERNAL.Roll.normal")
case "4":
return game.i18n.localize("TENEBRIS.Roll.avantage")
return game.i18n.localize("CTHULHUETERNAL.Roll.avantage")
case "5":
return game.i18n.localize("TENEBRIS.Roll.doubleAvantage")
return game.i18n.localize("CTHULHUETERNAL.Roll.doubleAvantage")
case "--":
return game.i18n.localize("TENEBRIS.Roll.doubleDesavantage")
return game.i18n.localize("CTHULHUETERNAL.Roll.doubleDesavantage")
case "-":
return game.i18n.localize("TENEBRIS.Roll.desavantage")
return game.i18n.localize("CTHULHUETERNAL.Roll.desavantage")
case "=":
return game.i18n.localize("TENEBRIS.Roll.normal")
return game.i18n.localize("CTHULHUETERNAL.Roll.normal")
case "+":
return game.i18n.localize("TENEBRIS.Roll.avantage")
return game.i18n.localize("CTHULHUETERNAL.Roll.avantage")
case "++":
return game.i18n.localize("TENEBRIS.Roll.doubleAvantage")
return game.i18n.localize("CTHULHUETERNAL.Roll.doubleAvantage")
}
}