Minor enhancements

This commit is contained in:
2025-09-04 20:57:54 +02:00
parent c8a0dc7168
commit 9653672372
6 changed files with 22 additions and 29 deletions

View File

@@ -202,9 +202,9 @@ export default class HellbornRoll extends Roll {
options.nbDisadvantages = Number(options.nbDisadvantages)
let dice = 3;
let keep = ""
if ( (options.nbAdvantages !== options.nbDisadvantages) && options.nbAdvantages > 0 || options.nbDisadvantages > 0) {
dice = 4;
if ( options.nbAdvantages > options.nbDisadvantages) {
if ((options.nbAdvantages !== options.nbDisadvantages) && options.nbAdvantages > 0 || options.nbDisadvantages > 0) {
dice = 3 + Math.abs(options.nbAdvantages - options.nbDisadvantages)
if (options.nbAdvantages > options.nbDisadvantages) {
keep = "kh3"
} else if (options.nbAdvantages < options.nbDisadvantages) {
keep = "kl3"
@@ -246,13 +246,13 @@ export default class HellbornRoll extends Roll {
commonResult = Object.entries(commonResult).reduce((a, b) => (a[1] > b[1]) ? a : b)[0]
let nbEqual = workResults.filter(r => Number(r.result) === Number(commonResult)).length
if (commonResult >= 4 && nbEqual >= 3) {
if (resultType === "success" && commonResult >= 4 && nbEqual >= 3) {
this.options.satanicSuccess = true
if (this.options.satanicSuccess) {
resultType = "success"
}
}
if (commonResult <= 3 && nbEqual >= 3) {
if (resultType === "failure" && commonResult <= 3 && nbEqual >= 3) {
this.options.fiendishFailure = true
if (this.options.fiendishFailure) {
resultType = "failure"

View File

@@ -1 +1 @@
MANIFEST-000015
MANIFEST-000019

View File

@@ -1,8 +1,8 @@
2025/06/30-22:25:13.089120 7f07937fe6c0 Recovering log #12
2025/06/30-22:25:13.141380 7f07937fe6c0 Delete type=3 #10
2025/06/30-22:25:13.141434 7f07937fe6c0 Delete type=0 #12
2025/06/30-22:34:15.665682 7f07923ff6c0 Level-0 table #18: started
2025/06/30-22:34:15.665712 7f07923ff6c0 Level-0 table #18: 0 bytes OK
2025/06/30-22:34:15.671514 7f07923ff6c0 Delete type=0 #16
2025/06/30-22:34:15.696997 7f07923ff6c0 Manual compaction at level-0 from '!folders!0d8PWsAGxiRfOlkP' @ 72057594037927935 : 1 .. '!items!zCOHBP3SYlGAY6zI' @ 0 : 0; will stop at (end)
2025/06/30-22:34:15.707753 7f07923ff6c0 Manual compaction at level-1 from '!folders!0d8PWsAGxiRfOlkP' @ 72057594037927935 : 1 .. '!items!zCOHBP3SYlGAY6zI' @ 0 : 0; will stop at (end)
2025/07/01-14:30:17.386227 7f0793fff6c0 Recovering log #17
2025/07/01-14:30:17.395654 7f0793fff6c0 Delete type=3 #15
2025/07/01-14:30:17.395704 7f0793fff6c0 Delete type=0 #17
2025/07/01-14:30:49.376073 7f07923ff6c0 Level-0 table #22: started
2025/07/01-14:30:49.376135 7f07923ff6c0 Level-0 table #22: 0 bytes OK
2025/07/01-14:30:49.383661 7f07923ff6c0 Delete type=0 #20
2025/07/01-14:30:49.406833 7f07923ff6c0 Manual compaction at level-0 from '!folders!0d8PWsAGxiRfOlkP' @ 72057594037927935 : 1 .. '!items!zCOHBP3SYlGAY6zI' @ 0 : 0; will stop at (end)
2025/07/01-14:30:49.417059 7f07923ff6c0 Manual compaction at level-1 from '!folders!0d8PWsAGxiRfOlkP' @ 72057594037927935 : 1 .. '!items!zCOHBP3SYlGAY6zI' @ 0 : 0; will stop at (end)

View File

@@ -1,15 +1,8 @@
2025/06/30-20:37:58.108400 7f0798bfa6c0 Recovering log #8
2025/06/30-20:37:58.118139 7f0798bfa6c0 Delete type=3 #6
2025/06/30-20:37:58.118202 7f0798bfa6c0 Delete type=0 #8
2025/06/30-21:11:07.629621 7f07923ff6c0 Level-0 table #13: started
2025/06/30-21:11:07.632961 7f07923ff6c0 Level-0 table #13: 19920 bytes OK
2025/06/30-21:11:07.639130 7f07923ff6c0 Delete type=0 #11
2025/06/30-21:11:07.658870 7f07923ff6c0 Manual compaction at level-0 from '!folders!0d8PWsAGxiRfOlkP' @ 72057594037927935 : 1 .. '!items!zCOHBP3SYlGAY6zI' @ 0 : 0; will stop at (end)
2025/06/30-21:11:07.675316 7f07923ff6c0 Manual compaction at level-1 from '!folders!0d8PWsAGxiRfOlkP' @ 72057594037927935 : 1 .. '!items!zCOHBP3SYlGAY6zI' @ 0 : 0; will stop at '!items!xiuPJDuvpdMEtiPe' @ 284 : 1
2025/06/30-21:11:07.675323 7f07923ff6c0 Compacting 1@1 + 1@2 files
2025/06/30-21:11:07.680513 7f07923ff6c0 Generated table #14@1: 267 keys, 115927 bytes
2025/06/30-21:11:07.680536 7f07923ff6c0 Compacted 1@1 + 1@2 files => 115927 bytes
2025/06/30-21:11:07.686716 7f07923ff6c0 compacted to: files[ 0 0 1 0 0 0 0 ]
2025/06/30-21:11:07.686840 7f07923ff6c0 Delete type=2 #5
2025/06/30-21:11:07.686988 7f07923ff6c0 Delete type=2 #13
2025/06/30-21:11:07.693807 7f07923ff6c0 Manual compaction at level-1 from '!items!xiuPJDuvpdMEtiPe' @ 284 : 1 .. '!items!zCOHBP3SYlGAY6zI' @ 0 : 0; will stop at (end)
2025/06/30-22:25:13.089120 7f07937fe6c0 Recovering log #12
2025/06/30-22:25:13.141380 7f07937fe6c0 Delete type=3 #10
2025/06/30-22:25:13.141434 7f07937fe6c0 Delete type=0 #12
2025/06/30-22:34:15.665682 7f07923ff6c0 Level-0 table #18: started
2025/06/30-22:34:15.665712 7f07923ff6c0 Level-0 table #18: 0 bytes OK
2025/06/30-22:34:15.671514 7f07923ff6c0 Delete type=0 #16
2025/06/30-22:34:15.696997 7f07923ff6c0 Manual compaction at level-0 from '!folders!0d8PWsAGxiRfOlkP' @ 72057594037927935 : 1 .. '!items!zCOHBP3SYlGAY6zI' @ 0 : 0; will stop at (end)
2025/06/30-22:34:15.707753 7f07923ff6c0 Manual compaction at level-1 from '!folders!0d8PWsAGxiRfOlkP' @ 72057594037927935 : 1 .. '!items!zCOHBP3SYlGAY6zI' @ 0 : 0; will stop at (end)