From a2364e125246a711670f4a418b34b1b55472151e Mon Sep 17 00:00:00 2001 From: LeRatierBretonnien Date: Tue, 22 Apr 2025 15:48:25 +0200 Subject: [PATCH] Fix spells --- lang/en.json | 1 + module/documents/roll.mjs | 18 +++++++++++++----- .../lf-equipment/{000225.log => 000228.log} | 0 packs-system/lf-equipment/CURRENT | 2 +- packs-system/lf-equipment/LOG | 11 +++-------- packs-system/lf-equipment/LOG.old | 16 ++++++++-------- .../{MANIFEST-000223 => MANIFEST-000227} | Bin 176 -> 159 bytes .../lf-gifts/{000224.log => 000227.log} | 0 packs-system/lf-gifts/CURRENT | 2 +- packs-system/lf-gifts/LOG | 11 +++-------- packs-system/lf-gifts/LOG.old | 16 ++++++++-------- packs-system/lf-gifts/MANIFEST-000222 | Bin 140 -> 0 bytes packs-system/lf-gifts/MANIFEST-000226 | Bin 0 -> 123 bytes .../lf-skills/{000224.log => 000227.log} | 0 packs-system/lf-skills/CURRENT | 2 +- packs-system/lf-skills/LOG | 11 +++-------- packs-system/lf-skills/LOG.old | 16 ++++++++-------- packs-system/lf-skills/MANIFEST-000222 | Bin 141 -> 0 bytes packs-system/lf-skills/MANIFEST-000226 | Bin 0 -> 124 bytes .../{000224.log => 000227.log} | 0 packs-system/lf-vulnerabilities/CURRENT | 2 +- packs-system/lf-vulnerabilities/LOG | 11 +++-------- packs-system/lf-vulnerabilities/LOG.old | 16 ++++++++-------- .../{MANIFEST-000222 => MANIFEST-000226} | Bin 141 -> 124 bytes templates/roll-dialog.hbs | 4 ++-- 25 files changed, 64 insertions(+), 75 deletions(-) rename packs-system/lf-equipment/{000225.log => 000228.log} (100%) rename packs-system/lf-equipment/{MANIFEST-000223 => MANIFEST-000227} (72%) rename packs-system/lf-gifts/{000224.log => 000227.log} (100%) delete mode 100644 packs-system/lf-gifts/MANIFEST-000222 create mode 100644 packs-system/lf-gifts/MANIFEST-000226 rename packs-system/lf-skills/{000224.log => 000227.log} (100%) delete mode 100644 packs-system/lf-skills/MANIFEST-000222 create mode 100644 packs-system/lf-skills/MANIFEST-000226 rename packs-system/lf-vulnerabilities/{000224.log => 000227.log} (100%) rename packs-system/lf-vulnerabilities/{MANIFEST-000222 => MANIFEST-000226} (71%) diff --git a/lang/en.json b/lang/en.json index 8fb0a9b..4174a10 100644 --- a/lang/en.json +++ b/lang/en.json @@ -288,6 +288,7 @@ "spell-attack": "Spell - Attack", "miracle-power": "Miracle - Power", "miracle-attack": "Miracle - Attack", + "spell": "Spell", "will":"Will", "dodge":"Dodge", "toughness":"Toughness", diff --git a/module/documents/roll.mjs b/module/documents/roll.mjs index 648f063..43cace4 100644 --- a/module/documents/roll.mjs +++ b/module/documents/roll.mjs @@ -222,8 +222,12 @@ export default class LethalFantasyRoll extends Roll { options.rollTarget.value = options.rollTarget.actorModifiers.levelSpellModifier + options.rollTarget.actorModifiers.intSpellModifier options.rollTarget.charModifier = options.rollTarget.actorModifiers.intSpellModifier hasStaticModifier = options.rollType === "spell-power" - hasModifier = options.rollType !== "spell-attack" - options.rollTarget.staticModifier = options.rollTarget.actorLevel + //hasModifier = options.rollType !== "spell-attack" + if ( hasStaticModifier ) { + options.rollTarget.staticModifier = options.rollTarget.actorLevel + } else { + options.rollTarget.staticModifier = 0 + } } else if (options.rollType === "miracle" || options.rollType === "miracle-attack" || options.rollType === "miracle-power") { hasD30 = true @@ -234,9 +238,13 @@ export default class LethalFantasyRoll extends Roll { hasChangeDice = false options.rollTarget.value = options.rollTarget.actorModifiers.levelMiracleModifier + options.rollTarget.actorModifiers.chaMiracleModifier options.rollTarget.charModifier = options.rollTarget.actorModifiers.chaMiracleModifier - hasStaticModifier = options.rollType === "spell-power" - hasModifier = options.rollType !== "miracle-attack" - options.rollTarget.staticModifier = options.rollTarget.actorLevel + hasStaticModifier = options.rollType === "miracle-power" + //hasModifier = options.rollType !== "miracle-attack" + if ( hasStaticModifier ) { + options.rollTarget.staticModifier = options.rollTarget.actorLevel + } else { + options.rollTarget.staticModifier = 0 + } } else if (options.rollType === "shield-roll") { hasD30 = false diff --git a/packs-system/lf-equipment/000225.log b/packs-system/lf-equipment/000228.log similarity index 100% rename from packs-system/lf-equipment/000225.log rename to packs-system/lf-equipment/000228.log diff --git a/packs-system/lf-equipment/CURRENT b/packs-system/lf-equipment/CURRENT index 449897e..ca06e10 100644 --- a/packs-system/lf-equipment/CURRENT +++ b/packs-system/lf-equipment/CURRENT @@ -1 +1 @@ -MANIFEST-000223 +MANIFEST-000227 diff --git a/packs-system/lf-equipment/LOG b/packs-system/lf-equipment/LOG index 107f827..cb0034b 100644 --- a/packs-system/lf-equipment/LOG +++ b/packs-system/lf-equipment/LOG @@ -1,8 +1,3 @@ -2025/04/22-07:53:33.108355 7f5dcf7fe6c0 Recovering log #221 -2025/04/22-07:53:33.118876 7f5dcf7fe6c0 Delete type=3 #219 -2025/04/22-07:53:33.119001 7f5dcf7fe6c0 Delete type=0 #221 -2025/04/22-08:41:45.602694 7f5dcd3ff6c0 Level-0 table #226: started -2025/04/22-08:41:45.602769 7f5dcd3ff6c0 Level-0 table #226: 0 bytes OK -2025/04/22-08:41:45.608936 7f5dcd3ff6c0 Delete type=0 #224 -2025/04/22-08:41:45.629902 7f5dcd3ff6c0 Manual compaction at level-0 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!znm6T1ef4qQI8BX7' @ 0 : 0; will stop at (end) -2025/04/22-08:41:45.629976 7f5dcd3ff6c0 Manual compaction at level-1 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!znm6T1ef4qQI8BX7' @ 0 : 0; will stop at (end) +2025/04/22-15:21:55.489075 7f31467fc6c0 Recovering log #225 +2025/04/22-15:21:55.498564 7f31467fc6c0 Delete type=3 #223 +2025/04/22-15:21:55.498630 7f31467fc6c0 Delete type=0 #225 diff --git a/packs-system/lf-equipment/LOG.old b/packs-system/lf-equipment/LOG.old index abcf656..107f827 100644 --- a/packs-system/lf-equipment/LOG.old +++ b/packs-system/lf-equipment/LOG.old @@ -1,8 +1,8 @@ -2025/04/21-17:09:30.765172 7f5dceffd6c0 Recovering log #217 -2025/04/21-17:09:30.774995 7f5dceffd6c0 Delete type=3 #215 -2025/04/21-17:09:30.775106 7f5dceffd6c0 Delete type=0 #217 -2025/04/21-17:40:19.481504 7f5dcd3ff6c0 Level-0 table #222: started -2025/04/21-17:40:19.481549 7f5dcd3ff6c0 Level-0 table #222: 0 bytes OK -2025/04/21-17:40:19.518709 7f5dcd3ff6c0 Delete type=0 #220 -2025/04/21-17:40:19.572101 7f5dcd3ff6c0 Manual compaction at level-0 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!znm6T1ef4qQI8BX7' @ 0 : 0; will stop at (end) -2025/04/21-17:40:19.634424 7f5dcd3ff6c0 Manual compaction at level-1 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!znm6T1ef4qQI8BX7' @ 0 : 0; will stop at (end) +2025/04/22-07:53:33.108355 7f5dcf7fe6c0 Recovering log #221 +2025/04/22-07:53:33.118876 7f5dcf7fe6c0 Delete type=3 #219 +2025/04/22-07:53:33.119001 7f5dcf7fe6c0 Delete type=0 #221 +2025/04/22-08:41:45.602694 7f5dcd3ff6c0 Level-0 table #226: started +2025/04/22-08:41:45.602769 7f5dcd3ff6c0 Level-0 table #226: 0 bytes OK +2025/04/22-08:41:45.608936 7f5dcd3ff6c0 Delete type=0 #224 +2025/04/22-08:41:45.629902 7f5dcd3ff6c0 Manual compaction at level-0 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!znm6T1ef4qQI8BX7' @ 0 : 0; will stop at (end) +2025/04/22-08:41:45.629976 7f5dcd3ff6c0 Manual compaction at level-1 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!znm6T1ef4qQI8BX7' @ 0 : 0; will stop at (end) diff --git a/packs-system/lf-equipment/MANIFEST-000223 b/packs-system/lf-equipment/MANIFEST-000227 similarity index 72% rename from packs-system/lf-equipment/MANIFEST-000223 rename to packs-system/lf-equipment/MANIFEST-000227 index f686d8ce757e32bc23b9bc53d53be7e7786d887a..439cd17d472008261304f5050daef7baf748d42f 100644 GIT binary patch delta 24 gcmdnMIG=GspP=W8Bko)bj7(1$IT@IrGO~mL0AUdZy8r+H delta 41 scmbQwxPfs(pHkC9=cil@j7$$0IT@HAGO~ny^t$Q|5_kv_cnlN(02uHK=Kufz diff --git a/packs-system/lf-gifts/000224.log b/packs-system/lf-gifts/000227.log similarity index 100% rename from packs-system/lf-gifts/000224.log rename to packs-system/lf-gifts/000227.log diff --git a/packs-system/lf-gifts/CURRENT b/packs-system/lf-gifts/CURRENT index a8d01b2..72f074e 100644 --- a/packs-system/lf-gifts/CURRENT +++ b/packs-system/lf-gifts/CURRENT @@ -1 +1 @@ -MANIFEST-000222 +MANIFEST-000226 diff --git a/packs-system/lf-gifts/LOG b/packs-system/lf-gifts/LOG index f718874..43bc09d 100644 --- a/packs-system/lf-gifts/LOG +++ b/packs-system/lf-gifts/LOG @@ -1,8 +1,3 @@ -2025/04/22-07:53:33.123478 7f5dceffd6c0 Recovering log #220 -2025/04/22-07:53:33.137098 7f5dceffd6c0 Delete type=3 #218 -2025/04/22-07:53:33.137188 7f5dceffd6c0 Delete type=0 #220 -2025/04/22-08:41:45.623210 7f5dcd3ff6c0 Level-0 table #225: started -2025/04/22-08:41:45.623299 7f5dcd3ff6c0 Level-0 table #225: 0 bytes OK -2025/04/22-08:41:45.629704 7f5dcd3ff6c0 Delete type=0 #223 -2025/04/22-08:41:45.629962 7f5dcd3ff6c0 Manual compaction at level-0 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!zjvGljrLk5SshC9D' @ 0 : 0; will stop at (end) -2025/04/22-08:41:45.630021 7f5dcd3ff6c0 Manual compaction at level-1 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!zjvGljrLk5SshC9D' @ 0 : 0; will stop at (end) +2025/04/22-15:21:55.503043 7f3145ffb6c0 Recovering log #224 +2025/04/22-15:21:55.514229 7f3145ffb6c0 Delete type=3 #222 +2025/04/22-15:21:55.514364 7f3145ffb6c0 Delete type=0 #224 diff --git a/packs-system/lf-gifts/LOG.old b/packs-system/lf-gifts/LOG.old index a0c2de4..f718874 100644 --- a/packs-system/lf-gifts/LOG.old +++ b/packs-system/lf-gifts/LOG.old @@ -1,8 +1,8 @@ -2025/04/21-17:09:30.778463 7f5dcdffb6c0 Recovering log #216 -2025/04/21-17:09:30.789411 7f5dcdffb6c0 Delete type=3 #214 -2025/04/21-17:09:30.789468 7f5dcdffb6c0 Delete type=0 #216 -2025/04/21-17:40:19.406720 7f5dcd3ff6c0 Level-0 table #221: started -2025/04/21-17:40:19.406774 7f5dcd3ff6c0 Level-0 table #221: 0 bytes OK -2025/04/21-17:40:19.446347 7f5dcd3ff6c0 Delete type=0 #219 -2025/04/21-17:40:19.572073 7f5dcd3ff6c0 Manual compaction at level-0 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!zjvGljrLk5SshC9D' @ 0 : 0; will stop at (end) -2025/04/21-17:40:19.572119 7f5dcd3ff6c0 Manual compaction at level-1 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!zjvGljrLk5SshC9D' @ 0 : 0; will stop at (end) +2025/04/22-07:53:33.123478 7f5dceffd6c0 Recovering log #220 +2025/04/22-07:53:33.137098 7f5dceffd6c0 Delete type=3 #218 +2025/04/22-07:53:33.137188 7f5dceffd6c0 Delete type=0 #220 +2025/04/22-08:41:45.623210 7f5dcd3ff6c0 Level-0 table #225: started +2025/04/22-08:41:45.623299 7f5dcd3ff6c0 Level-0 table #225: 0 bytes OK +2025/04/22-08:41:45.629704 7f5dcd3ff6c0 Delete type=0 #223 +2025/04/22-08:41:45.629962 7f5dcd3ff6c0 Manual compaction at level-0 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!zjvGljrLk5SshC9D' @ 0 : 0; will stop at (end) +2025/04/22-08:41:45.630021 7f5dcd3ff6c0 Manual compaction at level-1 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!zjvGljrLk5SshC9D' @ 0 : 0; will stop at (end) diff --git a/packs-system/lf-gifts/MANIFEST-000222 b/packs-system/lf-gifts/MANIFEST-000222 deleted file mode 100644 index 54abe038ee84d1029b2b4b87c22c3026b8d92750..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 140 zcmZQ=x?Pvdz{n_-lUkOVlai$8R9TW*o>`pgoS$2eSd>_jU&PL2x}i)_F)cqQCAFwn zu`(dsy{y8+E6K&rBP=*Cl2L&H4CECvOHy--6|1t!+;g&ue6mf0i!+=pT^Ly)@~XV5 fEL;qXO!pZ%8JHh1vM7|a|Go(lcmNW31QY-O?tdn( diff --git a/packs-system/lf-gifts/MANIFEST-000226 b/packs-system/lf-gifts/MANIFEST-000226 new file mode 100644 index 0000000000000000000000000000000000000000..9ac9cf81fe0747be43b98ec601d9ca909a67662a GIT binary patch literal 123 zcmZQ=x?Pvdz{n_-lUkOVlai$8R9TW*o>`pgoS$2eSd>_jU&PL2x}i)_F)cqQCAFwn zu`(dsy{y8+E6K&rBP=*Cl2L&H4CECvOHy--6|1t!+;g&ue6mf0i!+=pT^Ly)@(Myh T>$n&gnI1E8GB7`3WKjSBgMcEv literal 0 HcmV?d00001 diff --git a/packs-system/lf-skills/000224.log b/packs-system/lf-skills/000227.log similarity index 100% rename from packs-system/lf-skills/000224.log rename to packs-system/lf-skills/000227.log diff --git a/packs-system/lf-skills/CURRENT b/packs-system/lf-skills/CURRENT index a8d01b2..72f074e 100644 --- a/packs-system/lf-skills/CURRENT +++ b/packs-system/lf-skills/CURRENT @@ -1 +1 @@ -MANIFEST-000222 +MANIFEST-000226 diff --git a/packs-system/lf-skills/LOG b/packs-system/lf-skills/LOG index 7ea5322..67d54c0 100644 --- a/packs-system/lf-skills/LOG +++ b/packs-system/lf-skills/LOG @@ -1,8 +1,3 @@ -2025/04/22-07:53:33.091484 7f5dce7fc6c0 Recovering log #220 -2025/04/22-07:53:33.102983 7f5dce7fc6c0 Delete type=3 #218 -2025/04/22-07:53:33.103111 7f5dce7fc6c0 Delete type=0 #220 -2025/04/22-08:41:45.609074 7f5dcd3ff6c0 Level-0 table #225: started -2025/04/22-08:41:45.609111 7f5dcd3ff6c0 Level-0 table #225: 0 bytes OK -2025/04/22-08:41:45.615192 7f5dcd3ff6c0 Delete type=0 #223 -2025/04/22-08:41:45.629926 7f5dcd3ff6c0 Manual compaction at level-0 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end) -2025/04/22-08:41:45.629989 7f5dcd3ff6c0 Manual compaction at level-1 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end) +2025/04/22-15:21:55.474637 7f31457fa6c0 Recovering log #224 +2025/04/22-15:21:55.485024 7f31457fa6c0 Delete type=3 #222 +2025/04/22-15:21:55.485072 7f31457fa6c0 Delete type=0 #224 diff --git a/packs-system/lf-skills/LOG.old b/packs-system/lf-skills/LOG.old index 0f07f91..7ea5322 100644 --- a/packs-system/lf-skills/LOG.old +++ b/packs-system/lf-skills/LOG.old @@ -1,8 +1,8 @@ -2025/04/21-17:09:30.749204 7f5dce7fc6c0 Recovering log #216 -2025/04/21-17:09:30.759893 7f5dce7fc6c0 Delete type=3 #214 -2025/04/21-17:09:30.760044 7f5dce7fc6c0 Delete type=0 #216 -2025/04/21-17:40:19.292988 7f5dcd3ff6c0 Level-0 table #221: started -2025/04/21-17:40:19.293026 7f5dcd3ff6c0 Level-0 table #221: 0 bytes OK -2025/04/21-17:40:19.329102 7f5dcd3ff6c0 Delete type=0 #219 -2025/04/21-17:40:19.406586 7f5dcd3ff6c0 Manual compaction at level-0 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end) -2025/04/21-17:40:19.406620 7f5dcd3ff6c0 Manual compaction at level-1 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end) +2025/04/22-07:53:33.091484 7f5dce7fc6c0 Recovering log #220 +2025/04/22-07:53:33.102983 7f5dce7fc6c0 Delete type=3 #218 +2025/04/22-07:53:33.103111 7f5dce7fc6c0 Delete type=0 #220 +2025/04/22-08:41:45.609074 7f5dcd3ff6c0 Level-0 table #225: started +2025/04/22-08:41:45.609111 7f5dcd3ff6c0 Level-0 table #225: 0 bytes OK +2025/04/22-08:41:45.615192 7f5dcd3ff6c0 Delete type=0 #223 +2025/04/22-08:41:45.629926 7f5dcd3ff6c0 Manual compaction at level-0 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end) +2025/04/22-08:41:45.629989 7f5dcd3ff6c0 Manual compaction at level-1 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end) diff --git a/packs-system/lf-skills/MANIFEST-000222 b/packs-system/lf-skills/MANIFEST-000222 deleted file mode 100644 index 037b884bad938a82b2d6e38c8f11057aefc6845d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 141 zcmYdufBGqffss)vC$%g!CnZVGsj?)sJhM2}IX|}`u_&=5zlfd5@L?mnqGDQpPD*M~ zv7&jFg@?IIQm#{yWoT8RQ3PW$0~p9FW|pMp7AsbjSQML^nwg{)82TidLnq)U}U<_$jQL`fRQD6v2u1FNZFWt@<$^yKhkel7+^ru&SX49pK0S!A{b+1>*QJOBwi0tx^C0>=v4 diff --git a/templates/roll-dialog.hbs b/templates/roll-dialog.hbs index b36ca6c..3afcd11 100644 --- a/templates/roll-dialog.hbs +++ b/templates/roll-dialog.hbs @@ -4,10 +4,10 @@ {{localize (concat "LETHALFANTASY.Label." rollType)}} - {{actorName}} {{#if (match rollType "attack")}} -
Attack roll !
+
Attack roll ! - {{rollTarget.name}}
{{/if}} {{#if (match rollType "defense")}} -
Defense roll !
+
Defense roll ! - {{rollTarget.name}}
{{/if}} {{#if hasModifier}}