From 560b2eb5acc42d3d5b2a95fba7eddce61c30d044 Mon Sep 17 00:00:00 2001 From: LeRatierBretonnien Date: Wed, 22 Jan 2025 20:23:59 +0100 Subject: [PATCH] Change cost per skill --- lang/en.json | 17 +++++++++++++++++ module/config/system.mjs | 10 ++++++++++ module/models/character.mjs | 1 + module/models/skill.mjs | 7 +++++++ .../lf-equipment/{000104.log => 000112.log} | 0 packs-system/lf-equipment/CURRENT | 2 +- packs-system/lf-equipment/LOG | 16 ++++++++-------- packs-system/lf-equipment/LOG.old | 16 ++++++++-------- packs-system/lf-equipment/MANIFEST-000102 | Bin 137 -> 0 bytes packs-system/lf-equipment/MANIFEST-000110 | Bin 0 -> 137 bytes .../lf-gifts/{000104.log => 000112.log} | 0 packs-system/lf-gifts/CURRENT | 2 +- packs-system/lf-gifts/LOG | 16 ++++++++-------- packs-system/lf-gifts/LOG.old | 16 ++++++++-------- packs-system/lf-gifts/MANIFEST-000102 | Bin 136 -> 0 bytes packs-system/lf-gifts/MANIFEST-000110 | Bin 0 -> 136 bytes .../lf-skills/{000104.log => 000112.log} | 0 packs-system/lf-skills/CURRENT | 2 +- packs-system/lf-skills/LOG | 16 ++++++++-------- packs-system/lf-skills/LOG.old | 16 ++++++++-------- packs-system/lf-skills/MANIFEST-000102 | Bin 137 -> 0 bytes packs-system/lf-skills/MANIFEST-000110 | Bin 0 -> 137 bytes .../{000104.log => 000112.log} | 0 packs-system/lf-vulnerabilities/CURRENT | 2 +- packs-system/lf-vulnerabilities/LOG | 16 ++++++++-------- packs-system/lf-vulnerabilities/LOG.old | 16 ++++++++-------- .../{MANIFEST-000102 => MANIFEST-000110} | Bin 137 -> 137 bytes system.json | 2 +- templates/character-biography.hbs | 4 ++++ templates/skill.hbs | 7 ++++++- 30 files changed, 114 insertions(+), 70 deletions(-) rename packs-system/lf-equipment/{000104.log => 000112.log} (100%) delete mode 100644 packs-system/lf-equipment/MANIFEST-000102 create mode 100644 packs-system/lf-equipment/MANIFEST-000110 rename packs-system/lf-gifts/{000104.log => 000112.log} (100%) delete mode 100644 packs-system/lf-gifts/MANIFEST-000102 create mode 100644 packs-system/lf-gifts/MANIFEST-000110 rename packs-system/lf-skills/{000104.log => 000112.log} (100%) delete mode 100644 packs-system/lf-skills/MANIFEST-000102 create mode 100644 packs-system/lf-skills/MANIFEST-000110 rename packs-system/lf-vulnerabilities/{000104.log => 000112.log} (100%) rename packs-system/lf-vulnerabilities/{MANIFEST-000102 => MANIFEST-000110} (73%) diff --git a/lang/en.json b/lang/en.json index f9df8eb..ae4979c 100644 --- a/lang/en.json +++ b/lang/en.json @@ -598,6 +598,23 @@ "cost": { "label": "Cost" }, + "classesCost": { + "fighter": { + "label": "Fighter Cost" + }, + "rogue": { + "label": "Rogue Cost" + }, + "ranger": { + "label": "Ranger Cost" + }, + "magicuser": { + "label": "Magic User Cost" + }, + "cleric": { + "label": "Cleric Cost" + } + }, "description": { "label": "Description" }, diff --git a/module/config/system.mjs b/module/config/system.mjs index 6ac0005..5b13d06 100644 --- a/module/config/system.mjs +++ b/module/config/system.mjs @@ -141,6 +141,15 @@ export const CHAR_CLASSES = { "magicuser": "Magic User" } +export const CHAR_CLASSES_DEFINES = { + "untrained": {id: "untrained", label: "Untrained"}, + "fighter": {id: "fighter", label: "Fighter"}, + "rogue": {id: "rogue", label: "Rogue"}, + "ranger": {id: "ranger", label: "Ranger"}, + "cleric": {id: "cleric", label: "Cleric"}, + "magicuser": {id: "magicuser", label: "Magic User"} +} + export const DICE_VALUES = { "d3": "D3", "d4": "D4", @@ -250,6 +259,7 @@ export const SYSTEM = { CHARACTERISTIC_DAMAGE, INITIATIVE_DICE_CHOICES_PER_CLASS, CHAR_CLASSES, + CHAR_CLASSES_DEFINES, MONEY, ASCII, CHOICE_MODIFIERS, diff --git a/module/models/character.mjs b/module/models/character.mjs index cc766c1..cf0b524 100644 --- a/module/models/character.mjs +++ b/module/models/character.mjs @@ -114,6 +114,7 @@ export default class LethalFantasyCharacter extends foundry.abstract.TypeDataMod alignment: new fields.StringField({ required: true, nullable: false, initial: "" }), age: new fields.NumberField({ ...requiredInteger, initial: 15, min: 6 }), height: new fields.NumberField({ ...requiredInteger, initial: 170, min: 50 }), + weight: new fields.StringField({ required: true, nullable: false, initial: "" }), eyes: new fields.StringField({ required: true, nullable: false, initial: "" }), hair: new fields.StringField({ required: true, nullable: false, initial: "" }), magicUser: new fields.BooleanField({ initial: false }), diff --git a/module/models/skill.mjs b/module/models/skill.mjs index 9c37f35..cd2b22c 100644 --- a/module/models/skill.mjs +++ b/module/models/skill.mjs @@ -10,6 +10,13 @@ export default class LethalFantasySkill extends foundry.abstract.TypeDataModel { schema.category = new fields.StringField({ required: true, initial: "layperson", choices: SYSTEM.SKILL_CATEGORY }) schema.base = new fields.StringField({ required: true, initial: "WIS" }) schema.bonus = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 }) + + schema.classesCost = new fields.SchemaField( + Object.values(SYSTEM.CHAR_CLASSES_DEFINES).reduce((obj, pcClass) => { + obj[pcClass.id] = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 }) + return obj + }, {}), + ) schema.cost = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 }) schema.weaponClass = new fields.StringField({ required: true, initial: "shortblade", choices: SYSTEM.WEAPON_CLASS }) diff --git a/packs-system/lf-equipment/000104.log b/packs-system/lf-equipment/000112.log similarity index 100% rename from packs-system/lf-equipment/000104.log rename to packs-system/lf-equipment/000112.log diff --git a/packs-system/lf-equipment/CURRENT b/packs-system/lf-equipment/CURRENT index e333c89..a451d53 100644 --- a/packs-system/lf-equipment/CURRENT +++ b/packs-system/lf-equipment/CURRENT @@ -1 +1 @@ -MANIFEST-000102 +MANIFEST-000110 diff --git a/packs-system/lf-equipment/LOG b/packs-system/lf-equipment/LOG index a365a2c..0f32a95 100644 --- a/packs-system/lf-equipment/LOG +++ b/packs-system/lf-equipment/LOG @@ -1,8 +1,8 @@ -2025/01/22-08:50:47.531510 7f6e76ffd6c0 Recovering log #100 -2025/01/22-08:50:47.542333 7f6e76ffd6c0 Delete type=3 #98 -2025/01/22-08:50:47.542398 7f6e76ffd6c0 Delete type=0 #100 -2025/01/22-08:58:23.847420 7f6e753ff6c0 Level-0 table #105: started -2025/01/22-08:58:23.847465 7f6e753ff6c0 Level-0 table #105: 0 bytes OK -2025/01/22-08:58:23.854185 7f6e753ff6c0 Delete type=0 #103 -2025/01/22-08:58:23.873021 7f6e753ff6c0 Manual compaction at level-0 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zFrygJ2TnrxchBai' @ 0 : 0; will stop at (end) -2025/01/22-08:58:23.873071 7f6e753ff6c0 Manual compaction at level-1 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zFrygJ2TnrxchBai' @ 0 : 0; will stop at (end) +2025/01/22-20:17:58.203511 7f6e75ffb6c0 Recovering log #108 +2025/01/22-20:17:58.226399 7f6e75ffb6c0 Delete type=3 #106 +2025/01/22-20:17:58.226464 7f6e75ffb6c0 Delete type=0 #108 +2025/01/22-20:20:23.551087 7f6e753ff6c0 Level-0 table #113: started +2025/01/22-20:20:23.551124 7f6e753ff6c0 Level-0 table #113: 0 bytes OK +2025/01/22-20:20:23.603743 7f6e753ff6c0 Delete type=0 #111 +2025/01/22-20:20:23.663905 7f6e753ff6c0 Manual compaction at level-0 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zFrygJ2TnrxchBai' @ 0 : 0; will stop at (end) +2025/01/22-20:20:23.663958 7f6e753ff6c0 Manual compaction at level-1 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zFrygJ2TnrxchBai' @ 0 : 0; will stop at (end) diff --git a/packs-system/lf-equipment/LOG.old b/packs-system/lf-equipment/LOG.old index 2cdfd1c..31bdad0 100644 --- a/packs-system/lf-equipment/LOG.old +++ b/packs-system/lf-equipment/LOG.old @@ -1,8 +1,8 @@ -2025/01/21-08:05:19.262536 7f6e75ffb6c0 Recovering log #96 -2025/01/21-08:05:19.272917 7f6e75ffb6c0 Delete type=3 #94 -2025/01/21-08:05:19.273013 7f6e75ffb6c0 Delete type=0 #96 -2025/01/21-08:09:47.062020 7f6e753ff6c0 Level-0 table #101: started -2025/01/21-08:09:47.062050 7f6e753ff6c0 Level-0 table #101: 0 bytes OK -2025/01/21-08:09:47.068775 7f6e753ff6c0 Delete type=0 #99 -2025/01/21-08:09:47.081051 7f6e753ff6c0 Manual compaction at level-0 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zFrygJ2TnrxchBai' @ 0 : 0; will stop at (end) -2025/01/21-08:09:47.081085 7f6e753ff6c0 Manual compaction at level-1 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zFrygJ2TnrxchBai' @ 0 : 0; will stop at (end) +2025/01/22-15:26:10.159662 7f6e75ffb6c0 Recovering log #104 +2025/01/22-15:26:10.260006 7f6e75ffb6c0 Delete type=3 #102 +2025/01/22-15:26:10.260101 7f6e75ffb6c0 Delete type=0 #104 +2025/01/22-15:29:24.725949 7f6e753ff6c0 Level-0 table #109: started +2025/01/22-15:29:24.725997 7f6e753ff6c0 Level-0 table #109: 0 bytes OK +2025/01/22-15:29:24.739763 7f6e753ff6c0 Delete type=0 #107 +2025/01/22-15:29:24.770273 7f6e753ff6c0 Manual compaction at level-0 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zFrygJ2TnrxchBai' @ 0 : 0; will stop at (end) +2025/01/22-15:29:24.770310 7f6e753ff6c0 Manual compaction at level-1 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zFrygJ2TnrxchBai' @ 0 : 0; will stop at (end) diff --git a/packs-system/lf-equipment/MANIFEST-000102 b/packs-system/lf-equipment/MANIFEST-000102 deleted file mode 100644 index 200369a90c2bf1bb4041774fe5bf0c9b918034a0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 137 zcmaEU;D&1o10$nUPHI_dPD+xVQ)NkNd1i5{bAE0?Vo_pAei1v9>GB7Rii&CZIVq_{ z#fpw0MV94J8R@2_Az>le#lDPU3}7Iym|2pVTdY{+R#chpWfYQERFRzFl$gn=36U@D eIQ)@=fsrYllYu#d#dURmp)iP>0pw<}xB>t}OeiG) diff --git a/packs-system/lf-equipment/MANIFEST-000110 b/packs-system/lf-equipment/MANIFEST-000110 new file mode 100644 index 0000000000000000000000000000000000000000..196988985e0429b8b1a780a78d824d4be090881c GIT binary patch literal 137 zcmaEU;D&1o10$nUPHI_dPD+xVQ)NkNd1i5{bAE0?Vo_pAei1v9>GB7Rii&CZIVq_{ z#fpw0MV94J8R@2_Az>le#lDPU3}7Iym|2pVTdY{+R#chpWfYQERFRzFl$gn=36cL% e_4_IZ10z#DCj)Z`pgoS$2eSd>_jU&PL2x}i)_F)cqQCAFwn zu`(dsy{y8+E6K&rBP=*Cl2L&H4CECvOHy--6|1t!+;g&ue6mf0i!+=pT^Ly)@~0H+ cpKvfRGNp4eFlVqRO!+=V0mRJ!a`pgoS$2eSd>_jU&PL2x}i)_F)cqQCAFwn zu`(dsy{y8+E6K&rBP=*Cl2L&H4CECvOHy--6|1t!+;g&ue6mf0i!+=pT^Ly)^6JX$ c4>%YYnesUqmI&j!0J&K#$pEoyCC>l= diff --git a/packs-system/lf-skills/MANIFEST-000110 b/packs-system/lf-skills/MANIFEST-000110 new file mode 100644 index 0000000000000000000000000000000000000000..32bde30deabc759b3f5d09c7e6b5089f7ba4d87a GIT binary patch literal 137 zcmYdufBGqffss)vC$%g!CnZVGsj?)sJhM2}IX|}`u_&=5zlfd5@L?mnqGDQpPD*M~ zv7&jFg@?IIQm#{yWoT8RQ3PW$0~p9FW|pMp7AsbjSQML^nwg{)82TidLgF4U}VbYWMD2}N#5B}bq>TW0CJ01k^#|BCxHL} literal 0 HcmV?d00001 diff --git a/packs-system/lf-vulnerabilities/000104.log b/packs-system/lf-vulnerabilities/000112.log similarity index 100% rename from packs-system/lf-vulnerabilities/000104.log rename to packs-system/lf-vulnerabilities/000112.log diff --git a/packs-system/lf-vulnerabilities/CURRENT b/packs-system/lf-vulnerabilities/CURRENT index e333c89..a451d53 100644 --- a/packs-system/lf-vulnerabilities/CURRENT +++ b/packs-system/lf-vulnerabilities/CURRENT @@ -1 +1 @@ -MANIFEST-000102 +MANIFEST-000110 diff --git a/packs-system/lf-vulnerabilities/LOG b/packs-system/lf-vulnerabilities/LOG index fdaff22..c584fef 100644 --- a/packs-system/lf-vulnerabilities/LOG +++ b/packs-system/lf-vulnerabilities/LOG @@ -1,8 +1,8 @@ -2025/01/22-08:50:47.558438 7f6e75ffb6c0 Recovering log #100 -2025/01/22-08:50:47.568545 7f6e75ffb6c0 Delete type=3 #98 -2025/01/22-08:50:47.568612 7f6e75ffb6c0 Delete type=0 #100 -2025/01/22-08:58:23.854343 7f6e753ff6c0 Level-0 table #105: started -2025/01/22-08:58:23.854385 7f6e753ff6c0 Level-0 table #105: 0 bytes OK -2025/01/22-08:58:23.860490 7f6e753ff6c0 Delete type=0 #103 -2025/01/22-08:58:23.873043 7f6e753ff6c0 Manual compaction at level-0 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end) -2025/01/22-08:58:23.873080 7f6e753ff6c0 Manual compaction at level-1 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end) +2025/01/22-20:17:58.254488 7f6e76ffd6c0 Recovering log #108 +2025/01/22-20:17:58.277962 7f6e76ffd6c0 Delete type=3 #106 +2025/01/22-20:17:58.278083 7f6e76ffd6c0 Delete type=0 #108 +2025/01/22-20:20:23.910111 7f6e753ff6c0 Level-0 table #113: started +2025/01/22-20:20:23.910147 7f6e753ff6c0 Level-0 table #113: 0 bytes OK +2025/01/22-20:20:24.027490 7f6e753ff6c0 Delete type=0 #111 +2025/01/22-20:20:24.027658 7f6e753ff6c0 Manual compaction at level-0 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end) +2025/01/22-20:20:24.027694 7f6e753ff6c0 Manual compaction at level-1 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end) diff --git a/packs-system/lf-vulnerabilities/LOG.old b/packs-system/lf-vulnerabilities/LOG.old index d2186d0..5de79aa 100644 --- a/packs-system/lf-vulnerabilities/LOG.old +++ b/packs-system/lf-vulnerabilities/LOG.old @@ -1,8 +1,8 @@ -2025/01/21-08:05:19.288005 7f6e76ffd6c0 Recovering log #96 -2025/01/21-08:05:19.298022 7f6e76ffd6c0 Delete type=3 #94 -2025/01/21-08:05:19.298088 7f6e76ffd6c0 Delete type=0 #96 -2025/01/21-08:09:47.074914 7f6e753ff6c0 Level-0 table #101: started -2025/01/21-08:09:47.074948 7f6e753ff6c0 Level-0 table #101: 0 bytes OK -2025/01/21-08:09:47.080933 7f6e753ff6c0 Delete type=0 #99 -2025/01/21-08:09:47.081071 7f6e753ff6c0 Manual compaction at level-0 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end) -2025/01/21-08:09:47.081093 7f6e753ff6c0 Manual compaction at level-1 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end) +2025/01/22-15:26:10.370654 7f6e76ffd6c0 Recovering log #104 +2025/01/22-15:26:10.468522 7f6e76ffd6c0 Delete type=3 #102 +2025/01/22-15:26:10.468644 7f6e76ffd6c0 Delete type=0 #104 +2025/01/22-15:29:24.760416 7f6e753ff6c0 Level-0 table #109: started +2025/01/22-15:29:24.760440 7f6e753ff6c0 Level-0 table #109: 0 bytes OK +2025/01/22-15:29:24.770164 7f6e753ff6c0 Delete type=0 #107 +2025/01/22-15:29:24.770304 7f6e753ff6c0 Manual compaction at level-0 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end) +2025/01/22-15:29:24.770324 7f6e753ff6c0 Manual compaction at level-1 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end) diff --git a/packs-system/lf-vulnerabilities/MANIFEST-000102 b/packs-system/lf-vulnerabilities/MANIFEST-000110 similarity index 73% rename from packs-system/lf-vulnerabilities/MANIFEST-000102 rename to packs-system/lf-vulnerabilities/MANIFEST-000110 index ce3ba3c40388584779af2024935bda6cd4bdb806..a5e2606f507a83e11ac8ae1e49912f8f1f4224ee 100644 GIT binary patch delta 37 pcmeBV>|~sfE%$8g$;%uJj7<5Q49o>AGUwN7%mZ-?fZQS$835l63C;ij delta 37 pcmeBV>|~sfE!Vx1@dF0~BU3sj19Jw8%+*K1q9AStkekIK0|3Bb2$28) diff --git a/system.json b/system.json index f00df9b..da40a8d 100644 --- a/system.json +++ b/system.json @@ -6,7 +6,7 @@ "download": "#{DOWNLOAD}#", "url": "#{URL}#", "license": "LICENSE", - "version": "12.0.26", + "version": "12.0.27", "authors": [ { "name": "Uberwald", diff --git a/templates/character-biography.hbs b/templates/character-biography.hbs index 52d3d41..8dccd76 100644 --- a/templates/character-biography.hbs +++ b/templates/character-biography.hbs @@ -27,6 +27,10 @@ Height {{formInput systemFields.biodata.fields.height value=system.biodata.height }} +
+ Weight + {{formInput systemFields.biodata.fields.weight value=system.biodata.weight }} +
Eyes {{formInput systemFields.biodata.fields.eyes value=system.biodata.eyes }} diff --git a/templates/skill.hbs b/templates/skill.hbs index 0630e9c..ee1ea6c 100644 --- a/templates/skill.hbs +++ b/templates/skill.hbs @@ -6,7 +6,12 @@ {{formField systemFields.category value=system.category localize=true}} {{formField systemFields.base value=system.base}} {{formField systemFields.bonus value=system.bonus}} - {{formField systemFields.cost value=system.cost}} + + {{formField systemFields.classesCost.fields.fighter value=system.classesCost.fighter}} + {{formField systemFields.classesCost.fields.rogue value=system.classesCost.rogue}} + {{formField systemFields.classesCost.fields.ranger value=system.classesCost.ranger}} + {{formField systemFields.classesCost.fields.cleric value=system.classesCost.cleric}} + {{formField systemFields.classesCost.fields.magicuser value=system.classesCost.magicuser}} {{#if (eq system.category "weapon")}} {{formField systemFields.weaponClass value=system.weaponClass localize=true}}