Skip to content

Commit

Permalink
Merge pull request #91 from McGregor777/1.0.2
Browse files Browse the repository at this point in the history
1.0.2
  • Loading branch information
McGregor777 authored Aug 14, 2024
2 parents b5abe73 + 196098b commit adaebeb
Show file tree
Hide file tree
Showing 70 changed files with 1,931 additions and 2,069 deletions.
10 changes: 7 additions & 3 deletions lang/en-EN.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,14 @@
"ACTIONSELECTOR.SelectedAction": "Selected Action:",
"ACTIONSELECTOR.Title": "Action Selector",

"APPLICATION.BUTTON.BasicSkillsAdding": "Add Basic Skills",
"APPLICATION.BUTTON.DeleteItem": "Delete Item",
"APPLICATION.BUTTON.EditItem": "Edit Item",
"APPLICATION.BUTTON.Expand": "More",
"APPLICATION.BUTTON.RollItem": "Roll Item",
"APPLICATION.TITLE.ActionUsage": "Action Usage Confirmation",
"APPLICATION.TITLE.BasicSkillsAdding": "Basic Skills Adding",
"APPLICATION.TITLE.DeleteItem": "Delete Item Confirmation",
"APPLICATION.TITLE.MemberRemoval": "Member Removal Confirmation",
"APPLICATION.DESCRIPTION.ActionUsage": "Do you really want to use {action}?",
"APPLICATION.DESCRIPTION.BasicSkillsAdding": "<em><strong>{actor}</em></strong> has no skill. Do you wish to give <em><strong>{actor}</em></strong> all the basic skills?",
"APPLICATION.DESCRIPTION.DeleteItem": "Do you really want to delete <em><strong>{item}</em></strong>?",
"APPLICATION.DESCRIPTION.MemberRemoval": "Do you really wish to remove <em><strong>{actor}</em></strong> from the party?",

Expand Down Expand Up @@ -158,10 +155,12 @@
"CHARACTER.IMPAIRMENT.Stress": "Stress",
"CHARACTER.IMPAIRMENT.FatigueTokens": "Fatigue Tokens",
"CHARACTER.IMPAIRMENT.StressTokens": "Stress Tokens",
"CHARACTER.SHEET.AddBasicSkills": "Add Basic Skills",
"CHARACTER.SHEET.AddRemoveConservativeSegment": "Add/Remove Conservative Segment",
"CHARACTER.SHEET.AddRemoveRecklessSegment": "Add/Remove Reckless Segment",
"CHARACTER.SHEET.MinimumSegmentWarning": "You cannot remove any more segment.",
"CHARACTER.SHEET.NoExperienceLeft": "You have no Experience left.",
"CHARACTER.SHEET.NoSkill": "<em><strong>{actor}</em></strong> has no skill. Do you wish to give <em><strong>{actor}</em></strong> all the basic skills?",

"CHARACTERGENERATOR.Actions": "Action Cards",
"CHARACTERGENERATOR.Acquired": "Acquired",
Expand Down Expand Up @@ -245,9 +244,11 @@
"CREATURE.DamageRating": "Damage Rating",
"CREATURE.DefenceValue": "Defence Value",
"CREATURE.Details": "Details",
"CREATURE.Nemesis": "Nemesis",
"CREATURE.SoakValue": "Soak Value",
"CREATURE.Stance": "Stance",
"CREATURE.ThreatRating": "Threat Rating",
"CREATURE.Trappings": "Trappings",
"CREATURE.WoundsThreshold": "Wounds Threshold",
"CREATURE.WoundsValue": "Wounds Value",
"CREATURE.ABBREVIATION.DamageRating": "DR",
Expand Down Expand Up @@ -564,9 +565,12 @@
"WEAPON.CriticalRating": "Critical Rating",
"WEAPON.DamageRating": "Damage Rating",
"WEAPON.Group": "Group",
"WEAPON.Improvised": "Improvised",
"WEAPON.ImprovisedWeapon": "Improvised Weapon",
"WEAPON.Qualities": "Qualities",
"WEAPON.Range": "Range",
"WEAPON.Rating": "Rating",
"WEAPON.Unarmed": "Unarmed",
"WEAPON.ABBREVIATION.CriticalRating": "CR",
"WEAPON.ABBREVIATION.DamageRating": "DR",
"WEAPON.GROUP.Blackpowder": "Blackpowder",
Expand Down
76 changes: 40 additions & 36 deletions lang/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,19 @@
"ACTIONSELECTOR.ChooseANewAction": "Choisissez une nouvelle action",
"ACTIONSELECTOR.NoActionSelected": "Aucune",
"ACTIONSELECTOR.NoActionSelectedWarning": "Vous devez sélectionner une carte d'action.",
"ACTIONSELECTOR.SelectedAction": "Action sélectionnée :",
"ACTIONSELECTOR.SelectedAction": "Action sélectionnée:",
"ACTIONSELECTOR.Title": "Sélecteur d'action",

"APPLICATION.BUTTON.BasicSkillsAdding": "Add Basic Skills",
"APPLICATION.BUTTON.DeleteItem": "Delete Item",
"APPLICATION.BUTTON.EditItem": "Edit Item",
"APPLICATION.BUTTON.Expand": "More",
"APPLICATION.BUTTON.RollItem": "Roll Item",
"APPLICATION.TITLE.ActionUsage": "Action Usage Confirmation",
"APPLICATION.TITLE.BasicSkillsAdding": "Basic Skills Adding",
"APPLICATION.TITLE.DeleteItem": "Delete Item Confirmation",
"APPLICATION.TITLE.MemberRemoval": "Member Removal Confirmation",
"APPLICATION.DESCRIPTION.ActionUsage": "Do you really want to use {action}?",
"APPLICATION.DESCRIPTION.BasicSkillsAdding": "<em><strong>{actor}</em></strong> has no skill. Do you wish to give <em><strong>{actor}</em></strong> all the basic skills?",
"APPLICATION.DESCRIPTION.DeleteItem": "Do you really want to delete <em><strong>{item}</em></strong>?",
"APPLICATION.DESCRIPTION.MemberRemoval": "Do you really wish to remove <em><strong>{actor}</em></strong> from the party?",
"APPLICATION.BUTTON.DeleteItem": "Supprimer l'objet",
"APPLICATION.BUTTON.EditItem": "Modifier l'objet",
"APPLICATION.BUTTON.Expand": "Plus",
"APPLICATION.BUTTON.RollItem": "Faire un test",
"APPLICATION.TITLE.ActionUsage": "Confirmation de l'utilisation de l'action",
"APPLICATION.TITLE.DeleteItem": "Confirmation de la suppression de l'objet",
"APPLICATION.TITLE.MemberRemoval": "Confirmation du retrait du membre",
"APPLICATION.DESCRIPTION.ActionUsage": "Souhaitez-vous vraiment utiliser {action} ?",
"APPLICATION.DESCRIPTION.DeleteItem": "Souhaitez-vous vraiment supprimer <em><strong>{item}</em></strong> ?",
"APPLICATION.DESCRIPTION.MemberRemoval": "Souhaitez-vous vraiment retirer <em><strong>{actor}</em></strong> du groupe ?",

"ARMOUR.Defence": "Défense",
"ARMOUR.Soak": "Encaissement",
Expand Down Expand Up @@ -120,7 +117,7 @@
"CAREERSELECTOR.NotEnoughExperiencePoint": "Vous n'avez pas assez d'expérience pour entamer cette carrière.",
"CAREERSELECTOR.NoCareerSelected": "Aucune",
"CAREERSELECTOR.NoCareerSelectedWarning": "Vous devez sélectionner une fiche de carrière.",
"CAREERSELECTOR.SelectedCareer": "Carrière sélectionnée :",
"CAREERSELECTOR.SelectedCareer": "Carrière sélectionnée:",
"CAREERSELECTOR.Title": "Selecteur de carrière",

"CHARACTER.Abilities": "Aptitudes",
Expand Down Expand Up @@ -158,10 +155,12 @@
"CHARACTER.IMPAIRMENT.Stress": "Stress",
"CHARACTER.IMPAIRMENT.FatigueTokens": "Jetons de Fatigue",
"CHARACTER.IMPAIRMENT.StressTokens": "Jetons de Stress",
"CHARACTER.SHEET.AddBasicSkills": "Ajouter les compétences de base",
"CHARACTER.SHEET.AddRemoveConservativeSegment": "Ajouter/retirer un segment de prudence",
"CHARACTER.SHEET.AddRemoveRecklessSegment": "Ajouter/retirer un segment de témérité",
"CHARACTER.SHEET.MinimumSegmentWarning": "Vous ne pouvez pas retirer davantage de segments.",
"CHARACTER.SHEET.NoExperienceLeft": "Vous n'avez pas d'expérience à dépenser.",
"CHARACTER.SHEET.NoSkill": "<em><strong>{actor}</em></strong> ne possède aucune compétence. Souhaitez-vous donner les compétences de base à <em><strong>{actor}</em></strong> ?",

"CHARACTERGENERATOR.Actions": "Cartes d'action",
"CHARACTERGENERATOR.Acquired": "Acquis",
Expand All @@ -177,23 +176,23 @@
"CHARACTERGENERATOR.TrainingLevel": "Niveau de formation",
"CHARACTERGENERATOR.Title": "Générateur de personnage",
"CHARACTERGENERATOR.Wealth": "Richesse",
"CHARACTERGENERATOR.CorruptionThreshold": "Plafond de Corruption : ",
"CHARACTERGENERATOR.WoundThreshold": "Plafond de Blessures : ",
"CHARACTERGENERATOR.CorruptionThreshold": "Plafond de Corruption: ",
"CHARACTERGENERATOR.WoundThreshold": "Plafond de Blessures: ",
"CHARACTERGENERATOR.PlusToughnessRating": "{value} + Toughness rating",
"CHARACTERGENERATOR.CurrentlySelectedCareer": "Carrière sélectionnée : ",
"CHARACTERGENERATOR.CurrentlySelectedOrigin": "Origine sélectionnée : ",
"CHARACTERGENERATOR.CurrentlySelectedCareer": "Carrière sélectionnée: ",
"CHARACTERGENERATOR.CurrentlySelectedOrigin": "Origine sélectionnée: ",
"CHARACTERGENERATOR.RemainingActions": "Actions restantes: ",
"CHARACTERGENERATOR.RemainingCreationPoints": "Points de création restants : ",
"CHARACTERGENERATOR.RemainingSkillTrainings": "Formation de compétences restantes : ",
"CHARACTERGENERATOR.RemainingSpecialisations": "Spécialisations restantes : ",
"CHARACTERGENERATOR.RemainingTalents": "Talents restants : ",
"CHARACTERGENERATOR.RemainingFaithTalents": "Talents de Foi restants : ",
"CHARACTERGENERATOR.RemainingFocusTalents": "Talents d'Affinité restants : ",
"CHARACTERGENERATOR.RemainingOrderTalents": "Talents d'Ordre restants : ",
"CHARACTERGENERATOR.RemainingCreationPoints": "Points de création restants: ",
"CHARACTERGENERATOR.RemainingSkillTrainings": "Formation de compétences restantes: ",
"CHARACTERGENERATOR.RemainingSpecialisations": "Spécialisations restantes: ",
"CHARACTERGENERATOR.RemainingTalents": "Talents restants: ",
"CHARACTERGENERATOR.RemainingFaithTalents": "Talents de Foi restants: ",
"CHARACTERGENERATOR.RemainingFocusTalents": "Talents d'Affinité restants: ",
"CHARACTERGENERATOR.RemainingOrderTalents": "Talents d'Ordre restants: ",
"CHARACTERGENERATOR.RemainingInsanityTalents": "Folies restantes: ",
"CHARACTERGENERATOR.STEP.ActionsSelection": "Choisissez vos cartes d'action",
"CHARACTERGENERATOR.STEP.CareerSelection": "Choisissez votre carrière",
"CHARACTERGENERATOR.STEP.Confirm": "Votre personnage vous convient-il ?",
"CHARACTERGENERATOR.STEP.Confirm": "Votre personnage vous convient-il?",
"CHARACTERGENERATOR.STEP.CreationPointsInvestment": "Distribuez vos points de création",
"CHARACTERGENERATOR.STEP.OriginSelection": "Choisissez votre origine",
"CHARACTERGENERATOR.STEP.SkillTraining": "Entraînez vos compétences",
Expand Down Expand Up @@ -230,7 +229,7 @@
"CHARACTERISTICUPGRADER.IncreaseFortune": "Dé de Fortune +1",
"CHARACTERISTICUPGRADER.IncreaseRating": "Valeur +1",
"CHARACTERISTICUPGRADER.NoUpgradeSelected": "Aucune augmentation sélectionnée",
"CHARACTERISTICUPGRADER.SelectedUpgrade": "Augmentation sélectionnée : ",
"CHARACTERISTICUPGRADER.SelectedUpgrade": "Augmentation sélectionnée: ",
"CHARACTERISTICUPGRADER.Title": "Améliorateur de caractéristique",
"CHARACTERISTICUPGRADER.UpgradeACharacteristic": "Améliorer une caractéristique",

Expand All @@ -245,9 +244,11 @@
"CREATURE.DamageRating": "Niveaux de Dégâts",
"CREATURE.DefenceValue": "Valeur de Défense",
"CREATURE.Details": "Détails",
"CREATURE.Nemesis": "Nemesis",
"CREATURE.SoakValue": "Valeur d'Encaissement",
"CREATURE.Stance": "Attitude",
"CREATURE.ThreatRating": "Niveau de Menace",
"CREATURE.Trappings": "Dotations",
"CREATURE.WoundsThreshold": "Plafond de Blessure",
"CREATURE.WoundsValue": "Points de Blessures",
"CREATURE.ABBREVIATION.DamageRating": "ND",
Expand Down Expand Up @@ -326,10 +327,10 @@
"ORIGIN.Ulthuan": "Haut Elfe d'Ulthuan",
"ORIGIN.Reiklander": "Reiklander",
"ORIGIN.AthelLoren": "Elfe Sylvain d'Athel Loren",
"ORIGIN.INTRODUCTION.KarakAzgaraz": "Les nains de Karak Azgaraz bénéficient des aptitudes raciales suivantes, reflétant leur témérité et leurs fières traditions :",
"ORIGIN.INTRODUCTION.Ulthuan": "Les personnages hauts elfes bénéficient des aptitudes raciales suivantes, qui représentent leur éducation ainsi que leur riche histoire :",
"ORIGIN.INTRODUCTION.Reiklander": "Les personnages du Reikland disposent des aptitudes raciales suivantes, reflétant leur éducation et leur caractère :",
"ORIGIN.INTRODUCTION.AthelLoren": "Les personnages elfes sylvains bénéficient des aptitudes raciales suivantes, reflétant leur lien avec la nature et les traditions qui régissent leur culture :",
"ORIGIN.INTRODUCTION.KarakAzgaraz": "Les nains de Karak Azgaraz bénéficient des aptitudes raciales suivantes, reflétant leur témérité et leurs fières traditions:",
"ORIGIN.INTRODUCTION.Ulthuan": "Les personnages hauts elfes bénéficient des aptitudes raciales suivantes, qui représentent leur éducation ainsi que leur riche histoire:",
"ORIGIN.INTRODUCTION.Reiklander": "Les personnages du Reikland disposent des aptitudes raciales suivantes, reflétant leur éducation et leur caractère:",
"ORIGIN.INTRODUCTION.AthelLoren": "Les personnages elfes sylvains bénéficient des aptitudes raciales suivantes, reflétant leur lien avec la nature et les traditions qui régissent leur culture :",

"PARTY.FortunePool": "Réserve de Fortune",
"PARTY.FortuneToken": "Jeton de Fortune",
Expand Down Expand Up @@ -412,7 +413,7 @@
"ROLL.DICEPOOLBUILDER.Options": "Options",
"ROLL.DICEPOOLBUILDER.RollCheck": "Lancer le test",
"ROLL.DICEPOOLBUILDER.Specialisations": "Spécialisations",
"ROLL.DICEPOOLBUILDER.Skill": "Skill",
"ROLL.DICEPOOLBUILDER.Skill": "Compétence",
"ROLL.DICEPOOLBUILDER.StartingResults": "Pictogrammes de départ",
"ROLL.DICEPOOLBUILDER.Weapon": "Arme",
"ROLL.DIE.ChallengeDice": "dés de défi",
Expand Down Expand Up @@ -490,7 +491,7 @@
"SKILL.AdvancedSkill": "Compétence Avancée",
"SKILL.Characteristic": "Caractéristique",
"SKILL.Name": "Nom",
"SKILL.SpecialisationList": "Spécialisations : {specialisations}",
"SKILL.SpecialisationList": "Spécialisations: {specialisations}",
"SKILL.Specialisations": "Spécialisations",
"SKILL.TrainingLevel": "Formation",
"SKILL.ABBREVIATION.Characteristic": "Car.",
Expand All @@ -511,7 +512,7 @@
"TALENTSELECTOR.ChooseANewTalent": "Choisissez un nouveau talent",
"TALENTSELECTOR.NoTalentSelected": "Aucun",
"TALENTSELECTOR.NoTalentSelectedWarning": "Vous devez sélectionner une carte de talent.",
"TALENTSELECTOR.SelectedTalent": "Talent sélectionné :",
"TALENTSELECTOR.SelectedTalent": "Talent sélectionné:",
"TALENTSELECTOR.Title": "Sélecteur de talent",

"TRAININGSELECTOR.Acquired": "Acquis",
Expand All @@ -521,7 +522,7 @@
"TRAININGSELECTOR.NewSpecialisation": "Spécialisation {specialisation}",
"TRAININGSELECTOR.NoTrainingSelected": "Aucune",
"TRAININGSELECTOR.NoTrainingSelectedWarning": "Vous devez sélectionner une formation.",
"TRAININGSELECTOR.SelectedTraining": "Formation sélectionnée :",
"TRAININGSELECTOR.SelectedTraining": "Formation sélectionnée:",
"TRAININGSELECTOR.Specialisations": "Spécialisations",
"TRAININGSELECTOR.Title": "Sélecteur de formation",
"TRAININGSELECTOR.TrainingLevel": "Niveau de formation",
Expand Down Expand Up @@ -564,9 +565,12 @@
"WEAPON.CriticalRating": "Niveau Critique",
"WEAPON.DamageRating": "Niveau de Dégâts",
"WEAPON.Group": "Groupe",
"WEAPON.Improvised": "Improvised",
"WEAPON.ImprovisedWeapon": "Arme improvisée",
"WEAPON.Qualities": "Attributs",
"WEAPON.Range": "Portée",
"WEAPON.Rating": "Niveau",
"WEAPON.Unarmed": "Mains nues",
"WEAPON.ABBREVIATION.CriticalRating": "NC",
"WEAPON.ABBREVIATION.DamageRating": "ND",
"WEAPON.GROUP.Blackpowder": "Poudre Noire",
Expand Down
32 changes: 19 additions & 13 deletions modules/CheckHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,7 @@ export default class CheckHelper
if(match) {
const characteristicName = checkData.action.system.type === "ranged" ? "agility" : "strength";
outcome.targetDamages = actor.system.characteristics[characteristicName].rating +
(checkData.weapon?.system.damageRating ?? 0) +
(actor.system.damageRating ?? 0) +
(checkData.weapon ? checkData.weapon.system.damageRating : actor.system.damageRating ?? 0) +
parseInt(match[1]);
}

Expand All @@ -422,17 +421,14 @@ export default class CheckHelper
match = effectDescription.match(new RegExp(game.i18n.localize("ROLL.REGEX.ForMinusAmountDamage"), "u"));
if(match) {
const characteristicName = checkData.action.system.type === "ranged" ? "agility" : "strength";
console.
outcome.targetDamages = actor.system.characteristics[characteristicName].rating +
(checkData.weapon?.system.damageRating ?? 0) +
(actor.system.damageRating ?? 0) +
(checkData.weapon ? checkData.weapon.system.damageRating : actor.system.damageRating ?? 0) +
parseInt(match[1]);
}

match = effectDescription.match(new RegExp(game.i18n.localize("ROLL.REGEX.ForNormalDamage"), "u"));
if(match) {
const characteristicName = checkData.action.system.type === "ranged" ? "agility" : "strength";
console.log(actor.system.characteristics[characteristicName].rating, checkData.weapon?.system.damageRating, actor.system.damageRating)
outcome.targetDamages = actor.system.characteristics[characteristicName].rating +
(checkData.weapon?.system.damageRating ?? 0) +
(actor.system.damageRating ?? 0);
Expand Down Expand Up @@ -505,9 +501,7 @@ export default class CheckHelper
if(targetActor) {
// If the attack inflicts damages, reduce them by Toughness and Soak values.
if(outcome.targetDamages > 0) {
outcome.targetDamages -= targetActor.system.characteristics.toughness.rating +
(targetActor.system.totalSoak ?? 0) +
(targetActor.system.soakValue ?? 0);
outcome.targetDamages -= targetActor.system.characteristics.toughness.rating + targetActor.system.totalSoak;

// If the attack still inflicts more damages than the target's wound threshold, the target suffers from a critical wound
// (in addition to those coming from effects).
Expand Down Expand Up @@ -537,11 +531,23 @@ export default class CheckHelper
}
}

if(outcome.targetFatigue > 0 || outcome.targetFatigue < 0)
targetUpdates.system.impairments = {fatigue: targetActor.system.impairments.fatigue + outcome.targetFatigue};
if(outcome.targetFatigue > 0 || outcome.targetFatigue < 0) {
if(targetActor.type === "creature" && !targetActor.system.nemesis)
targetUpdates.system.impairments = {fatigue: targetActor.system.impairments.fatigue + outcome.targetFatigue};
else if(targetActor.system.wounds.value)
targetUpdates.system.wounds.value -= outcome.targetFatigue;
else
targetUpdates.system.wounds = {value: targetActor.system.wounds.value - outcome.targetFatigue};
}

if(outcome.targetStress > 0 || outcome.targetStress < 0)
targetUpdates.system.impairments = {stress: targetActor.system.impairments.stress + outcome.targetStress};
if(outcome.targetStress > 0 || outcome.targetStress < 0) {
if(targetActor.type === "creature" && !targetActor.system.nemesis)
targetUpdates.system.impairments = {stress: targetActor.system.impairments.stress + outcome.targetStress};
else if(targetActor.system.wounds.value)
targetUpdates.system.wounds.value -= outcome.targetStress;
else
targetUpdates.system.wounds = {value: targetActor.system.wounds.value - outcome.targetStress};
}

targetActor.update(targetUpdates);
}
Expand Down
2 changes: 1 addition & 1 deletion modules/applications/CharacterGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ export default class CharacterGenerator extends FormApplication

do {
await startingCareerRollTable.draw({displayChat: false}).then(async tableResult => {
if(tableResult.results[0].type === 2 && !drawnCareers.has(tableResult.results[0].documentId))
if(tableResult.results[0].type === "pack" && !drawnCareers.has(tableResult.results[0].documentId))
drawnCareers.set(
tableResult.results[0].documentId,
await game.packs.get("wfrp3e.items").getDocument(tableResult.results[0].documentId)
Expand Down
Loading

0 comments on commit adaebeb

Please sign in to comment.