Skip to content

Commit

Permalink
Disease wording fixes and added Purblind localization (#41)
Browse files Browse the repository at this point in the history
* Disease wording fixes and added Purblind localization

* Added Purblind disease symptom code. Also minor standard formatting fixes

* Added 2 new symptoms Wasting and Dementia to en localization and disease code

* whooops. Capitalization matters. fix on localization string values

* whooops. So do perentheses. Fixed new single line if statements and added ws and bs to Wither symptom
  • Loading branch information
RassilonMonk authored Apr 29, 2024
1 parent 8bad0c7 commit 519bc36
Show file tree
Hide file tree
Showing 2 changed files with 108 additions and 5 deletions.
23 changes: 20 additions & 3 deletions dist/languages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -344,25 +344,42 @@
"Symptoms": {
"Vertigo": {
"Name": "Vertigo",
"Description": "You have trouble staying balanced and feel the sensation of spinning around. All <b>Weapon Tests</b>, as well as Tests based on either <b>Agility</b>, <b>Dexterity</b>, or <b>Intelligence</b> suffer a penalty of <b>2 SL</b> while you are dizzy.",
"Description": "You have trouble staying balanced and feel the sensation of spinning around. All <b>Weapon Tests</b>, as well as Tests based on either <b>Agility</b>, <b>Dexterity</b>, or <b>Intelligence</b> suffer a penalty of <b>-2 SL</b> while you are dizzy.",
"Treatment": "There is no treatment available for Vertigo, this symptom ends when the cause of it ends."
},
"Scarring": {
"Name": "Scarring",
"Description": "You have been horribly scarred by your ordeal and your appearance unsettles or disgusts other. As a result you suffer a <b>10</b> penalty to all <b>Fellowship Tests</b>.",
"Description": "You have been horribly scarred by your ordeal and your appearance unsettles or disgusts others. As a result you suffer a <b>-10</b> penalty to all <b>Fellowship Tests</b>.",
"Treatment": "Scarring is usually permanent barring special magic."
},
"Rashes": {
"Name": "Rashes",
"Description": "You have a number of red, itchy rashes. As a result your appearance is slightly marred and you lose some of your deftness as you scratch and squirm. Receive a <b>–5 modifier</b> to your <b>Dexterity</b> and <b>Fellowship</b> Characteristics.",
"Description": "You have numerous red, itchy rashes. As a result your appearance is slightly marred and you lose some of your deftness as you scratch and squirm. Receive a <b>-5</b> modifier to your <b>Dexterity</b> and <b>Fellowship</b> Characteristics.",
"Treatment": "Depending on the disease some herbs and alchemical mixes can alleviate rashes. Of course there are also many fake remedies available for sale that do nothing and a purchased treatment has a 10% chance of being snake-oil. Treatments cost from 10 brass pennies and upwards depending on the status of the purchaser and the reputation of the seller. Anyone with <b>Trade (Apothecary)</b> or <b>Trade (Alchemist)</b> with access to appropriate ingredients (costing 5 pennies) can create enough salve that when applied daily can alleviate the symptoms for a week."
},
"Taint": {
"Name": "Taint",
"Description": "This disease is tainted by the powers of Chaos and affects the very soul of the suffering victim. Unless the victim passes a <b>Challenging (+0) Endurance Test</b>, they suffer 1 point of @UUID[JournalEntry.NS3YGlJQxwTggjRX.JournalEntryPage.115GzWrmkD4viyy5]{Corruption}.",
"Treatment": "There is no treatment for the Taint.",
"Failure": "{character} gains 1 point of Corruption"
},
"Purblind": {
"Name": "Purblind",
"Description": "Your eyes have been afflicted causing them to swell and weep pus, blood or other fluids. You are blinded to a degree based on how severe it is. You suffer a <b>-10</b> penalty to all sight-based attributes and skill checks including attacks. This penalty rises to <b>-20</b> for Moderate, and <b>-30</b> for Severe levels of affliction.",
"Treatment": "This symptom lasts until the source of it has been dealt with. Cold cloths with a mix of medicinal herbs can be applied over the eyes to help relieve some of the pressure, but that will not help with the loss of sight."
},
"Wasting": {
"Name": "Wasting",
"Description": "This disease has attacked and atrophied your muscles and ligaments. As the disease progresses you are gradually wasting away and suffer from a <b>-10</b> penalty to your <b>Strength</b>, <b>Agility</b>, <b>Toughness</b> and <b>Dexterity</b>, as well as all <b>Weapon Tests</b>. This penalty grows to <b>-20</b> for Moderate and <b>-30</b> for Severe. Any victim whose <b>Toughness</b> is reduced to 0 eventually dies from the disease as it runs its course.",
"Treatment": "Wasting can only be cured by addressing the underlying disease. A subject who is being cared for and well fed above their normal intake (Requiring a status expenditure of <b>2 Standing levels</b> higher than your career) can make a weekly <b>Difficult (-10) Endurance Test</b> to temporarily reduce the effect by <b>10</b> for a week."
},
"Dementia": {
"Name": "Dementia",
"Description": "The disease has influenced your cognitive faculties. Your ability to think clearly, reason, or remember is adversely affected and you suffer a <b>-20</b> penalty to your <b>Intelligence</b> and <b>-15</b> to your <b>Initiative</b>.",
"Treatment": "There is no known treatment for Dementia, and it lasts for the duration of the disease affecting your thinking capacity."
}


},

"Settings": {
Expand Down
90 changes: 88 additions & 2 deletions dist/modules/features/Diseases.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export default class Diseases extends ForienBaseModule {
`
}
}
}
};
//#endregion

//#region Taint
Expand Down Expand Up @@ -134,7 +134,93 @@ export default class Diseases extends ForienBaseModule {
`
}
}
}
};
//#endregion

//#region Purblind
config.symptoms["purblind"] = game.i18n.localize("Forien.Armoury.Symptoms.Purblind.Name");
config.symptomDescriptions["purblind"] = game.i18n.localize("Forien.Armoury.Symptoms.Purblind.Description");
config.symptomTreatment["purblind"] = game.i18n.localize("Forien.Armoury.Symptoms.Purblind.Treatment");
config.symptomEffects["purblind"] = {
name: game.i18n.localize("Forien.Armoury.Symptoms.Purblind.Name"),
icon: "modules/wfrp4e-core/icons/diseases/disease.png",
transfer: true,
flags: {
wfrp4e: {
"effectApplication": "actor",
"effectTrigger": "prefillDialog",
"symptom": true,
"script": `
let modifier = -10;
if (this.effect.name.includes("Severe")) {
modifier = -30;
} else if (this.effect.name.includes("Moderate")) {
modifier = -20;
}
let applicableSkills = ["Art","Dodge","Drive","Evaluate","Melee","Navigation","Perception","Pick Lock","Ranged","Research","Ride","Row","Sail","Secret Signs","Set Trap","Stealth", "Track"];
let applicableCharacteristics = ["ws", "bs", "ag", "dex"];
if ((args.type === "weapon") || (args.type === "characteristic" && applicableCharacteristics.includes(args.item)) || (args.type === "skill" && applicableSkills.includes(args.item.name))) {
args.prefillModifiers.modifier += modifier;
}
`
}
}
};
//#endregion

//#region Wasting
config.symptoms["wasting"] = game.i18n.localize("Forien.Armoury.Symptoms.Wasting.Name");
config.symptomDescriptions["wasting"] = game.i18n.localize("Forien.Armoury.Symptoms.Wasting.Description");
config.symptomTreatment["wasting"] = game.i18n.localize("Forien.Armoury.Symptoms.Wasting.Treatment");
config.symptomEffects["wasting"] = {
name: game.i18n.localize("Forien.Armoury.Symptoms.Wasting.Name"),
icon: "modules/wfrp4e-core/icons/diseases/disease.png",
transfer: true,
flags: {
wfrp4e: {
"effectApplication": "actor",
"effectTrigger": "prefillDialog",
"symptom": true,
"script": `
let modifier = -10;
if (this.effect.name.includes("Severe")) {
modifier = -30;
} else if (this.effect.name.includes("Moderate")) {
modifier = -20;
}
let applicableCharacteristics = ["s", "t", "ag", "ws", "bs", "dex"];
if ((args.type === "weapon") || (args.type === "characteristic" && applicableCharacteristics.includes(args.item)) || (args.type === "skill" && applicableCharacteristics.includes(args.item.characteristic.key))) {
args.prefillModifiers.modifier += modifier;
}
`
}
}
};
//#endregion

//#region Dementia
config.symptoms["dementia"] = game.i18n.localize("Forien.Armoury.Symptoms.Dementia.Name");
config.symptomDescriptions["dementia"] = game.i18n.localize("Forien.Armoury.Symptoms.Dementia.Description");
config.symptomTreatment["dementia"] = game.i18n.localize("Forien.Armoury.Symptoms.Dementia.Treatment");
config.symptomEffects["dementia"] = {
name: game.i18n.localize("Forien.Armoury.Symptoms.Dementia.Name"),
icon: "modules/wfrp4e-core/icons/diseases/disease.png",
transfer: true,
flags: {
wfrp4e: {
"effectApplication": "actor",
"effectTrigger": "prePrepareData",
"symptom": true,
"script": `
args.actor.system.characteristics.i.modifier -= 15;
args.actor.system.characteristics.int.modifier -= 20;
`
}
}
};
//#endregion

return config;
Expand Down

0 comments on commit 519bc36

Please sign in to comment.