From 81848155e5f0c3fb69f493dbca1950e79b22759d Mon Sep 17 00:00:00 2001 From: LeRatierBretonnien Date: Tue, 10 Oct 2023 20:02:13 +0200 Subject: [PATCH] =?UTF-8?q?Am=C3=A9lirations=20des=20specialisations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lang/en.json | 3 ++- lang/fr.json | 3 ++- modules/actors/ecryme-actor-sheet.js | 6 ++++++ modules/actors/ecryme-actor.js | 11 +++++++++++ modules/common/ecryme-utility.js | 2 +- packs/equipment/{000092.log => 000108.log} | 0 packs/equipment/CURRENT | 2 +- packs/equipment/LOG | 14 +++++++------- packs/equipment/LOG.old | 14 +++++++------- .../{MANIFEST-000090 => MANIFEST-000106} | Bin 173 -> 173 bytes packs/help/{000028.log => 000044.log} | 0 packs/help/CURRENT | 2 +- packs/help/LOG | 16 ++++++++-------- packs/help/LOG.old | 16 ++++++++-------- packs/help/{MANIFEST-000026 => MANIFEST-000042} | Bin 161 -> 161 bytes packs/maneuvers/{000092.log => 000108.log} | 0 packs/maneuvers/CURRENT | 2 +- packs/maneuvers/LOG | 14 +++++++------- packs/maneuvers/LOG.old | 14 +++++++------- .../{MANIFEST-000090 => MANIFEST-000106} | Bin 168 -> 168 bytes packs/specialisation/{000092.log => 000108.log} | 0 packs/specialisation/CURRENT | 2 +- packs/specialisation/LOG | 14 +++++++------- packs/specialisation/LOG.old | 14 +++++++------- .../{MANIFEST-000090 => MANIFEST-000106} | Bin 170 -> 170 bytes packs/traits/{000092.log => 000108.log} | 0 packs/traits/CURRENT | 2 +- packs/traits/LOG | 14 +++++++------- packs/traits/LOG.old | 14 +++++++------- .../traits/{MANIFEST-000090 => MANIFEST-000106} | Bin 170 -> 170 bytes system.json | 4 ++-- template.json | 1 + templates/actors/actor-sheet.hbs | 6 +++--- templates/chat/chat-confrontation-pending.hbs | 2 +- templates/chat/chat-generic-result.hbs | 2 +- .../dialogs/partial-common-roll-dialog.hbs | 9 ++++++++- templates/items/item-specialization-sheet.hbs | 5 +++++ 37 files changed, 120 insertions(+), 88 deletions(-) rename packs/equipment/{000092.log => 000108.log} (100%) rename packs/equipment/{MANIFEST-000090 => MANIFEST-000106} (73%) rename packs/help/{000028.log => 000044.log} (100%) rename packs/help/{MANIFEST-000026 => MANIFEST-000042} (79%) rename packs/maneuvers/{000092.log => 000108.log} (100%) rename packs/maneuvers/{MANIFEST-000090 => MANIFEST-000106} (76%) rename packs/specialisation/{000092.log => 000108.log} (100%) rename packs/specialisation/{MANIFEST-000090 => MANIFEST-000106} (75%) rename packs/traits/{000092.log => 000108.log} (100%) rename packs/traits/{MANIFEST-000090 => MANIFEST-000106} (75%) diff --git a/lang/en.json b/lang/en.json index 052097b..ca52b75 100644 --- a/lang/en.json +++ b/lang/en.json @@ -165,7 +165,8 @@ "bornplace": "Born place", "residence": "Residence", "origin": "Origin", - "childhood": "Childhood" + "childhood": "Childhood", + "bonus": "Bonus" } } } \ No newline at end of file diff --git a/lang/fr.json b/lang/fr.json index 2f00167..51af19c 100644 --- a/lang/fr.json +++ b/lang/fr.json @@ -166,7 +166,8 @@ "bornplace": "Lieu de naissance", "residence": "RĂ©sidence", "origin": "Origine", - "childhood": "Enfance" + "childhood": "Enfance", + "bonus": "Bonus" } } } \ No newline at end of file diff --git a/modules/actors/ecryme-actor-sheet.js b/modules/actors/ecryme-actor-sheet.js index 372610b..fdb8b6e 100644 --- a/modules/actors/ecryme-actor-sheet.js +++ b/modules/actors/ecryme-actor-sheet.js @@ -129,6 +129,12 @@ export class EcrymeActorSheet extends ActorSheet { let skillKey = $(event.currentTarget).data("skill-key") this.actor.rollSkill(categKey, skillKey) }); + html.find('.roll-spec').click((event) => { + let categKey = $(event.currentTarget).data("category-key") + let skillKey = $(event.currentTarget).data("skill-key") + let specId = $(event.currentTarget).data("spec-id") + this.actor.rollSpec(categKey, skillKey, specId) + }); html.find('.roll-skill-confront').click((event) => { let categKey = $(event.currentTarget).data("category-key") let skillKey = $(event.currentTarget).data("skill-key") diff --git a/modules/actors/ecryme-actor.js b/modules/actors/ecryme-actor.js index 13a27d5..440cb30 100644 --- a/modules/actors/ecryme-actor.js +++ b/modules/actors/ecryme-actor.js @@ -410,6 +410,17 @@ export class EcrymeActor extends Actor { this.startRoll(rollData).catch("Error on startRoll") } + /* -------------------------------------------- */ + rollSpec(categKey, skillKey, specId) { + let rollData = this.getCommonSkill(categKey, skillKey) + let spec = this.items.find(it => it.type == "specialization" && it.id == specId) + rollData.mode = "skill" + rollData.selectedSpecs = [spec.id] + rollData.forcedSpec = duplicate(spec) + rollData.title = game.i18n.localize(rollData.skill.name) + this.startRoll(rollData).catch("Error on startRoll") + } + /* -------------------------------------------- */ async rollSkillConfront(categKey, skillKey) { let rollData = this.getCommonSkill(categKey, skillKey) diff --git a/modules/common/ecryme-utility.js b/modules/common/ecryme-utility.js index ac11454..ddd298f 100644 --- a/modules/common/ecryme-utility.js +++ b/modules/common/ecryme-utility.js @@ -516,7 +516,7 @@ export class EcrymeUtility { } if (rollData.selectedSpecs && rollData.selectedSpecs.length > 0) { rollData.spec = actor.getSpecialization(rollData.selectedSpecs[0]) - diceFormula += "+2" + diceFormula += "+" + (String(rollData.spec.system?.bonus) || "2") } rollData.bonusMalusTraits = 0 if (rollData.traitsBonus && rollData.traitsBonus.length > 0) { diff --git a/packs/equipment/000092.log b/packs/equipment/000108.log similarity index 100% rename from packs/equipment/000092.log rename to packs/equipment/000108.log diff --git a/packs/equipment/CURRENT b/packs/equipment/CURRENT index 2f2c868..abdfdfe 100644 --- a/packs/equipment/CURRENT +++ b/packs/equipment/CURRENT @@ -1 +1 @@ -MANIFEST-000090 +MANIFEST-000106 diff --git a/packs/equipment/LOG b/packs/equipment/LOG index 9ec9830..80d81e9 100644 --- a/packs/equipment/LOG +++ b/packs/equipment/LOG @@ -1,7 +1,7 @@ -2023/08/25-09:06:43.291745 7f42affff6c0 Recovering log #88 -2023/08/25-09:06:43.308894 7f42affff6c0 Delete type=3 #86 -2023/08/25-09:06:43.308951 7f42affff6c0 Delete type=0 #88 -2023/08/25-09:09:02.388289 7f42ae7fc6c0 Level-0 table #93: started -2023/08/25-09:09:02.388354 7f42ae7fc6c0 Level-0 table #93: 0 bytes OK -2023/08/25-09:09:02.396757 7f42ae7fc6c0 Delete type=0 #91 -2023/08/25-09:09:02.413788 7f42ae7fc6c0 Manual compaction at level-0 from '!folders!1GrTlI1xWvaxdKRI' @ 72057594037927935 : 1 .. '!items!zs7krgXhDRndtqbl' @ 0 : 0; will stop at (end) +2023/10/10-15:44:15.214470 7fb8baffd6c0 Recovering log #104 +2023/10/10-15:44:15.228942 7fb8baffd6c0 Delete type=3 #102 +2023/10/10-15:44:15.229018 7fb8baffd6c0 Delete type=0 #104 +2023/10/10-16:47:17.816560 7fb8b97fa6c0 Level-0 table #109: started +2023/10/10-16:47:17.816585 7fb8b97fa6c0 Level-0 table #109: 0 bytes OK +2023/10/10-16:47:17.822797 7fb8b97fa6c0 Delete type=0 #107 +2023/10/10-16:47:17.832584 7fb8b97fa6c0 Manual compaction at level-0 from '!folders!1GrTlI1xWvaxdKRI' @ 72057594037927935 : 1 .. '!items!zs7krgXhDRndtqbl' @ 0 : 0; will stop at (end) diff --git a/packs/equipment/LOG.old b/packs/equipment/LOG.old index 2360901..0dc5368 100644 --- a/packs/equipment/LOG.old +++ b/packs/equipment/LOG.old @@ -1,7 +1,7 @@ -2023/08/25-08:56:40.355200 7f45449ff6c0 Recovering log #84 -2023/08/25-08:56:40.368438 7f45449ff6c0 Delete type=3 #82 -2023/08/25-08:56:40.368595 7f45449ff6c0 Delete type=0 #84 -2023/08/25-09:05:19.712351 7f42ae7fc6c0 Level-0 table #89: started -2023/08/25-09:05:19.712385 7f42ae7fc6c0 Level-0 table #89: 0 bytes OK -2023/08/25-09:05:19.719168 7f42ae7fc6c0 Delete type=0 #87 -2023/08/25-09:05:19.719526 7f42ae7fc6c0 Manual compaction at level-0 from '!folders!1GrTlI1xWvaxdKRI' @ 72057594037927935 : 1 .. '!items!zs7krgXhDRndtqbl' @ 0 : 0; will stop at (end) +2023/10/10-14:47:37.319172 7fb8b9ffb6c0 Recovering log #100 +2023/10/10-14:47:37.374764 7fb8b9ffb6c0 Delete type=3 #98 +2023/10/10-14:47:37.374842 7fb8b9ffb6c0 Delete type=0 #100 +2023/10/10-15:44:02.360675 7fb8b97fa6c0 Level-0 table #105: started +2023/10/10-15:44:02.360734 7fb8b97fa6c0 Level-0 table #105: 0 bytes OK +2023/10/10-15:44:02.452513 7fb8b97fa6c0 Delete type=0 #103 +2023/10/10-15:44:02.600640 7fb8b97fa6c0 Manual compaction at level-0 from '!folders!1GrTlI1xWvaxdKRI' @ 72057594037927935 : 1 .. '!items!zs7krgXhDRndtqbl' @ 0 : 0; will stop at (end) diff --git a/packs/equipment/MANIFEST-000090 b/packs/equipment/MANIFEST-000106 similarity index 73% rename from packs/equipment/MANIFEST-000090 rename to packs/equipment/MANIFEST-000106 index 752f7067e152ff2c7e1adb5c68b6112a19869b5a..d36446521c4eb6838e9bfc58378c6dfbe7a83ace 100644 GIT binary patch delta 39 qcmZ3>xR!B3uY!M#*cVO)My6~|2Id@=b&QW$W%h&kIY53MkPiUY=LvZL delta 39 qcmZ3>xR!B3ufm6y>ZzOzj7-s-49qbs>lkek42?ki7$83m$Oi!2X9)!W diff --git a/packs/help/000028.log b/packs/help/000044.log similarity index 100% rename from packs/help/000028.log rename to packs/help/000044.log diff --git a/packs/help/CURRENT b/packs/help/CURRENT index 8b15215..8e0a062 100644 --- a/packs/help/CURRENT +++ b/packs/help/CURRENT @@ -1 +1 @@ -MANIFEST-000026 +MANIFEST-000042 diff --git a/packs/help/LOG b/packs/help/LOG index 61cca48..0e2c276 100644 --- a/packs/help/LOG +++ b/packs/help/LOG @@ -1,8 +1,8 @@ -2023/08/25-09:06:43.332086 7f42affff6c0 Recovering log #24 -2023/08/25-09:06:43.343333 7f42affff6c0 Delete type=3 #22 -2023/08/25-09:06:43.343425 7f42affff6c0 Delete type=0 #24 -2023/08/25-09:09:02.413816 7f42ae7fc6c0 Level-0 table #29: started -2023/08/25-09:09:02.413868 7f42ae7fc6c0 Level-0 table #29: 0 bytes OK -2023/08/25-09:09:02.420658 7f42ae7fc6c0 Delete type=0 #27 -2023/08/25-09:09:02.420945 7f42ae7fc6c0 Manual compaction at level-0 from '!journal!N3XOO6dRLuKwQfp2' @ 72057594037927935 : 1 .. '!journal.pages!N3XOO6dRLuKwQfp2.xhc7hqoL8kdW6lrD' @ 0 : 0; will stop at (end) -2023/08/25-09:09:02.420984 7f42ae7fc6c0 Manual compaction at level-1 from '!journal!N3XOO6dRLuKwQfp2' @ 72057594037927935 : 1 .. '!journal.pages!N3XOO6dRLuKwQfp2.xhc7hqoL8kdW6lrD' @ 0 : 0; will stop at (end) +2023/10/10-15:44:15.264794 7fb8bb7fe6c0 Recovering log #40 +2023/10/10-15:44:15.274945 7fb8bb7fe6c0 Delete type=3 #38 +2023/10/10-15:44:15.275026 7fb8bb7fe6c0 Delete type=0 #40 +2023/10/10-16:47:17.838950 7fb8b97fa6c0 Level-0 table #45: started +2023/10/10-16:47:17.838969 7fb8b97fa6c0 Level-0 table #45: 0 bytes OK +2023/10/10-16:47:17.846123 7fb8b97fa6c0 Delete type=0 #43 +2023/10/10-16:47:17.846349 7fb8b97fa6c0 Manual compaction at level-0 from '!journal!N3XOO6dRLuKwQfp2' @ 72057594037927935 : 1 .. '!journal.pages!N3XOO6dRLuKwQfp2.xhc7hqoL8kdW6lrD' @ 0 : 0; will stop at (end) +2023/10/10-16:47:17.846379 7fb8b97fa6c0 Manual compaction at level-1 from '!journal!N3XOO6dRLuKwQfp2' @ 72057594037927935 : 1 .. '!journal.pages!N3XOO6dRLuKwQfp2.xhc7hqoL8kdW6lrD' @ 0 : 0; will stop at (end) diff --git a/packs/help/LOG.old b/packs/help/LOG.old index 3a1d655..ce6d4ee 100644 --- a/packs/help/LOG.old +++ b/packs/help/LOG.old @@ -1,8 +1,8 @@ -2023/08/25-08:56:40.391655 7f45449ff6c0 Recovering log #20 -2023/08/25-08:56:40.402088 7f45449ff6c0 Delete type=3 #18 -2023/08/25-08:56:40.402156 7f45449ff6c0 Delete type=0 #20 -2023/08/25-09:05:19.719759 7f42ae7fc6c0 Level-0 table #25: started -2023/08/25-09:05:19.719808 7f42ae7fc6c0 Level-0 table #25: 0 bytes OK -2023/08/25-09:05:19.726375 7f42ae7fc6c0 Delete type=0 #23 -2023/08/25-09:05:19.739729 7f42ae7fc6c0 Manual compaction at level-0 from '!journal!N3XOO6dRLuKwQfp2' @ 72057594037927935 : 1 .. '!journal.pages!N3XOO6dRLuKwQfp2.xhc7hqoL8kdW6lrD' @ 0 : 0; will stop at (end) -2023/08/25-09:05:19.739776 7f42ae7fc6c0 Manual compaction at level-1 from '!journal!N3XOO6dRLuKwQfp2' @ 72057594037927935 : 1 .. '!journal.pages!N3XOO6dRLuKwQfp2.xhc7hqoL8kdW6lrD' @ 0 : 0; will stop at (end) +2023/10/10-14:47:37.522181 7fb8ba7fc6c0 Recovering log #36 +2023/10/10-14:47:37.575247 7fb8ba7fc6c0 Delete type=3 #34 +2023/10/10-14:47:37.575386 7fb8ba7fc6c0 Delete type=0 #36 +2023/10/10-15:44:02.669413 7fb8b97fa6c0 Level-0 table #41: started +2023/10/10-15:44:02.669471 7fb8b97fa6c0 Level-0 table #41: 0 bytes OK +2023/10/10-15:44:02.803436 7fb8b97fa6c0 Delete type=0 #39 +2023/10/10-15:44:02.803585 7fb8b97fa6c0 Manual compaction at level-0 from '!journal!N3XOO6dRLuKwQfp2' @ 72057594037927935 : 1 .. '!journal.pages!N3XOO6dRLuKwQfp2.xhc7hqoL8kdW6lrD' @ 0 : 0; will stop at (end) +2023/10/10-15:44:02.803610 7fb8b97fa6c0 Manual compaction at level-1 from '!journal!N3XOO6dRLuKwQfp2' @ 72057594037927935 : 1 .. '!journal.pages!N3XOO6dRLuKwQfp2.xhc7hqoL8kdW6lrD' @ 0 : 0; will stop at (end) diff --git a/packs/help/MANIFEST-000026 b/packs/help/MANIFEST-000042 similarity index 79% rename from packs/help/MANIFEST-000026 rename to packs/help/MANIFEST-000042 index d25ffc9fde5d51c682c44b723fde7fbdcfecda2c..83382f0eddd8511fa5c62ffd9ce87c4a4a32d801 100644 GIT binary patch delta 37 pcmZ3;xR7x|vz%Dy>1P}aj7-{`49q$#EX=zOD}%T?K&~DO3jnaI2P6Oh delta 37 pcmZ3;xR7x|v)t)#M`Ae`7@4Fw8JJ~QSoY04s{rE40J(B3ECA0;2ulC} diff --git a/packs/maneuvers/000092.log b/packs/maneuvers/000108.log similarity index 100% rename from packs/maneuvers/000092.log rename to packs/maneuvers/000108.log diff --git a/packs/maneuvers/CURRENT b/packs/maneuvers/CURRENT index 2f2c868..abdfdfe 100644 --- a/packs/maneuvers/CURRENT +++ b/packs/maneuvers/CURRENT @@ -1 +1 @@ -MANIFEST-000090 +MANIFEST-000106 diff --git a/packs/maneuvers/LOG b/packs/maneuvers/LOG index 37d3373..e3f0303 100644 --- a/packs/maneuvers/LOG +++ b/packs/maneuvers/LOG @@ -1,7 +1,7 @@ -2023/08/25-09:06:43.313751 7f45449ff6c0 Recovering log #88 -2023/08/25-09:06:43.332919 7f45449ff6c0 Delete type=3 #86 -2023/08/25-09:06:43.332977 7f45449ff6c0 Delete type=0 #88 -2023/08/25-09:09:02.396939 7f42ae7fc6c0 Level-0 table #93: started -2023/08/25-09:09:02.396976 7f42ae7fc6c0 Level-0 table #93: 0 bytes OK -2023/08/25-09:09:02.405091 7f42ae7fc6c0 Delete type=0 #91 -2023/08/25-09:09:02.420883 7f42ae7fc6c0 Manual compaction at level-0 from '!items!13IYF6BPUTivFZzB' @ 72057594037927935 : 1 .. '!items!oSutlbe9wyBZccmf' @ 0 : 0; will stop at (end) +2023/10/10-15:44:15.251468 7fb8ba7fc6c0 Recovering log #104 +2023/10/10-15:44:15.263005 7fb8ba7fc6c0 Delete type=3 #102 +2023/10/10-15:44:15.263083 7fb8ba7fc6c0 Delete type=0 #104 +2023/10/10-16:47:17.832601 7fb8b97fa6c0 Level-0 table #109: started +2023/10/10-16:47:17.832642 7fb8b97fa6c0 Level-0 table #109: 0 bytes OK +2023/10/10-16:47:17.838860 7fb8b97fa6c0 Delete type=0 #107 +2023/10/10-16:47:17.846327 7fb8b97fa6c0 Manual compaction at level-0 from '!items!13IYF6BPUTivFZzB' @ 72057594037927935 : 1 .. '!items!oSutlbe9wyBZccmf' @ 0 : 0; will stop at (end) diff --git a/packs/maneuvers/LOG.old b/packs/maneuvers/LOG.old index e600f2d..23e7076 100644 --- a/packs/maneuvers/LOG.old +++ b/packs/maneuvers/LOG.old @@ -1,7 +1,7 @@ -2023/08/25-08:56:40.374817 7f42aeffd6c0 Recovering log #84 -2023/08/25-08:56:40.392507 7f42aeffd6c0 Delete type=3 #82 -2023/08/25-08:56:40.392560 7f42aeffd6c0 Delete type=0 #84 -2023/08/25-09:05:19.732932 7f42ae7fc6c0 Level-0 table #89: started -2023/08/25-09:05:19.732977 7f42ae7fc6c0 Level-0 table #89: 0 bytes OK -2023/08/25-09:05:19.739465 7f42ae7fc6c0 Delete type=0 #87 -2023/08/25-09:05:19.739765 7f42ae7fc6c0 Manual compaction at level-0 from '!items!13IYF6BPUTivFZzB' @ 72057594037927935 : 1 .. '!items!oSutlbe9wyBZccmf' @ 0 : 0; will stop at (end) +2023/10/10-14:47:37.452515 7fb8baffd6c0 Recovering log #100 +2023/10/10-14:47:37.516010 7fb8baffd6c0 Delete type=3 #98 +2023/10/10-14:47:37.516087 7fb8baffd6c0 Delete type=0 #100 +2023/10/10-15:44:02.600756 7fb8b97fa6c0 Level-0 table #105: started +2023/10/10-15:44:02.600790 7fb8b97fa6c0 Level-0 table #105: 0 bytes OK +2023/10/10-15:44:02.669263 7fb8b97fa6c0 Delete type=0 #103 +2023/10/10-15:44:02.803564 7fb8b97fa6c0 Manual compaction at level-0 from '!items!13IYF6BPUTivFZzB' @ 72057594037927935 : 1 .. '!items!oSutlbe9wyBZccmf' @ 0 : 0; will stop at (end) diff --git a/packs/maneuvers/MANIFEST-000090 b/packs/maneuvers/MANIFEST-000106 similarity index 76% rename from packs/maneuvers/MANIFEST-000090 rename to packs/maneuvers/MANIFEST-000106 index 2a5a3d282498e361adeee6a5b55628a50ee02e68..447e038ad8c5c76ffa3b3eb69477afce31f46b46 100644 GIT binary patch delta 37 pcmZ3%xPoy)m)x$4Di$0Jj7-^_49qz!a_9AQK7+V9KyDt3900_`2(bVF delta 37 pcmZ3%xPoy)mmGVM9xn$2BU3ad19J?EoDi>C5QrNCcf=YqI7KyDt37Xa4e33~tl delta 37 pcmZ3*xQcN?kDTVzt&=$z7@49u8JJ^Oykvguxd!6K0J(82UI5Li33>nk diff --git a/system.json b/system.json index 1802899..769002e 100644 --- a/system.json +++ b/system.json @@ -111,7 +111,7 @@ }, "title": "Ecryme, le Jeu de RĂ´les", "url": "https://www.uberwald.me/gitea/public/fvtt-ecryme", - "version": "11.0.35", - "download": "https://www.uberwald.me/gitea/public/fvtt-ecryme/archive/fvtt-ecryme-v11.0.35.zip", + "version": "11.0.36", + "download": "https://www.uberwald.me/gitea/public/fvtt-ecryme/archive/fvtt-ecryme-v11.0.36.zip", "background": "systems/fvtt-ecryme/images/assets/ecryme_extract_panel_01.webp" } \ No newline at end of file diff --git a/template.json b/template.json index 8cc2da4..197b048 100644 --- a/template.json +++ b/template.json @@ -267,6 +267,7 @@ "effect": 0 }, "specialization": { + "bonus": 2, "templates": [ "common" ], diff --git a/templates/actors/actor-sheet.hbs b/templates/actors/actor-sheet.hbs index 0a88ca2..1bc0014 100644 --- a/templates/actors/actor-sheet.hbs +++ b/templates/actors/actor-sheet.hbs @@ -102,15 +102,15 @@