8 attcks for monster + fix lethargy
All checks were successful
Release Creation / build (release) Successful in 46s

This commit is contained in:
LeRatierBretonnien 2025-04-22 23:44:04 +02:00
parent ccebf8dc1f
commit 16959dd52e
23 changed files with 82 additions and 75 deletions

View File

@ -490,8 +490,8 @@
"rollTypeNotFound": "Roll type not found",
"skillNotFound": "Skill not found",
"messageProgressionOK": "{name} can perform his action !",
"messageLethargyOK": "Lethargy ended. <br>{name} can perform a new action !",
"messageLethargyKO": "Lethargy stil ongoing ...",
"messageLethargyOK": "{spellName} : Lethargy ended ( dice result {roll}). <br>{name} can perform a new action !",
"messageLethargyKO": "{spellName} : Lethargy still ongoing ... ( dice result : {roll} )",
"messageProgressionKO": "{name} can't attack this second.",
"messageProgressionOKMonster": "{name} can attack this second with {weapon}.",
"messageProgressionKOMonster": "{name} can't attack this second (dice result {roll})."

View File

@ -734,7 +734,7 @@ export default class LethalFantasyRoll extends Roll {
actionItem.spellStatus = "castingTime"
// Set the flag on the combatant
await combatant.setFlag(SYSTEM.id, "currentAction", actionItem)
let message = `${combatant.name} action : ${selectedItem.name}, start rolling progression dice`
let message = `${combatant.name} action : ${selectedItem.name}, start rolling progression dice or casting time`
ChatMessage.create({ content: message, speaker: ChatMessage.getSpeaker({ actor: combatant.actor }) })
rollContext = (actionItem.type == "weapon") ? "rollProgressionDice" : "rollLethargyDice" // Set the roll context to rollProgressionDice
currentAction = actionItem
@ -774,11 +774,14 @@ export default class LethalFantasyRoll extends Roll {
let dice = LethalFantasyUtils.getLethargyDice(currentAction.system.level)
let roll = new Roll(dice)
await roll.evaluate()
if (game?.dice3d) {
await game.dice3d.showForRoll(roll)
}
let max = roll.dice[0].faces - 1
let toCompare = Math.min(options.rollProgressionCount, max)
let toCompare = Math.min(currentAction.progressionCount, max)
if (roll.total <= toCompare) {
// Notify that the player can act now with a chat message
let message = game.i18n.format("LETHALFANTASY.Notifications.messageLethargyOK", { name: combatant.actor.name, weapon: currentAction.name, roll: roll.total })
let message = game.i18n.format("LETHALFANTASY.Notifications.messageLethargyOK", { name: combatant.actor.name, spellName: currentAction.name, roll: roll.total })
ChatMessage.create({ content: message, speaker: ChatMessage.getSpeaker({ actor: combatant.actor }) })
// Update the combatant progression count
await combatant.setFlag(SYSTEM.id, "currentAction", "")
@ -787,8 +790,8 @@ export default class LethalFantasyRoll extends Roll {
} else {
// Notify that the player cannot act now with a chat message
currentAction.progressionCount += 1
combatant.setFlag(SYSTEM.id, "currentAction", foundry.utils.duplicate(currentAction))
let message = game.i18n.format("LETHALFANTASY.Notifications.messageLethargyKO", { name: combatant.actor.name, weapon: currentAction.name, roll: roll.total })
await combatant.setFlag(SYSTEM.id, "currentAction", foundry.utils.duplicate(currentAction))
let message = game.i18n.format("LETHALFANTASY.Notifications.messageLethargyKO", { name: combatant.actor.name, spellName: currentAction.name, roll: roll.total })
ChatMessage.create({ content: message, speaker: ChatMessage.getSpeaker({ actor: combatant.actor }) })
}
}

View File

@ -82,6 +82,10 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
attack2: attackField("2"),
attack3: attackField("3"),
attack4: attackField("4"),
attack5: attackField("5"),
attack6: attackField("6"),
attack7: attackField("7"),
attack8: attackField("8")
})
schema.perception = new fields.SchemaField({

View File

View File

@ -1 +1 @@
MANIFEST-000235
MANIFEST-000239

View File

@ -1,8 +1,8 @@
2025/04/22-16:10:04.887355 7f31467fc6c0 Recovering log #233
2025/04/22-16:10:04.897170 7f31467fc6c0 Delete type=3 #231
2025/04/22-16:10:04.897273 7f31467fc6c0 Delete type=0 #233
2025/04/22-16:24:56.381376 7f2ea7fff6c0 Level-0 table #238: started
2025/04/22-16:24:56.381413 7f2ea7fff6c0 Level-0 table #238: 0 bytes OK
2025/04/22-16:24:56.387438 7f2ea7fff6c0 Delete type=0 #236
2025/04/22-16:24:56.393346 7f2ea7fff6c0 Manual compaction at level-0 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!znm6T1ef4qQI8BX7' @ 0 : 0; will stop at (end)
2025/04/22-16:24:56.393372 7f2ea7fff6c0 Manual compaction at level-1 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!znm6T1ef4qQI8BX7' @ 0 : 0; will stop at (end)
2025/04/22-23:31:24.238771 7f31457fa6c0 Recovering log #237
2025/04/22-23:31:24.249942 7f31457fa6c0 Delete type=3 #235
2025/04/22-23:31:24.250077 7f31457fa6c0 Delete type=0 #237
2025/04/22-23:43:44.737443 7f2ea7fff6c0 Level-0 table #242: started
2025/04/22-23:43:44.737479 7f2ea7fff6c0 Level-0 table #242: 0 bytes OK
2025/04/22-23:43:44.744412 7f2ea7fff6c0 Delete type=0 #240
2025/04/22-23:43:44.750880 7f2ea7fff6c0 Manual compaction at level-0 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!znm6T1ef4qQI8BX7' @ 0 : 0; will stop at (end)
2025/04/22-23:43:44.750915 7f2ea7fff6c0 Manual compaction at level-1 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!znm6T1ef4qQI8BX7' @ 0 : 0; will stop at (end)

View File

@ -1,8 +1,8 @@
2025/04/22-15:52:11.355330 7f31467fc6c0 Recovering log #229
2025/04/22-15:52:11.365772 7f31467fc6c0 Delete type=3 #227
2025/04/22-15:52:11.365821 7f31467fc6c0 Delete type=0 #229
2025/04/22-15:54:39.193010 7f2ea7fff6c0 Level-0 table #234: started
2025/04/22-15:54:39.193041 7f2ea7fff6c0 Level-0 table #234: 0 bytes OK
2025/04/22-15:54:39.200273 7f2ea7fff6c0 Delete type=0 #232
2025/04/22-15:54:39.200435 7f2ea7fff6c0 Manual compaction at level-0 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!znm6T1ef4qQI8BX7' @ 0 : 0; will stop at (end)
2025/04/22-15:54:39.200463 7f2ea7fff6c0 Manual compaction at level-1 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!znm6T1ef4qQI8BX7' @ 0 : 0; will stop at (end)
2025/04/22-16:10:04.887355 7f31467fc6c0 Recovering log #233
2025/04/22-16:10:04.897170 7f31467fc6c0 Delete type=3 #231
2025/04/22-16:10:04.897273 7f31467fc6c0 Delete type=0 #233
2025/04/22-16:24:56.381376 7f2ea7fff6c0 Level-0 table #238: started
2025/04/22-16:24:56.381413 7f2ea7fff6c0 Level-0 table #238: 0 bytes OK
2025/04/22-16:24:56.387438 7f2ea7fff6c0 Delete type=0 #236
2025/04/22-16:24:56.393346 7f2ea7fff6c0 Manual compaction at level-0 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!znm6T1ef4qQI8BX7' @ 0 : 0; will stop at (end)
2025/04/22-16:24:56.393372 7f2ea7fff6c0 Manual compaction at level-1 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!znm6T1ef4qQI8BX7' @ 0 : 0; will stop at (end)

Binary file not shown.

View File

View File

@ -1 +1 @@
MANIFEST-000234
MANIFEST-000238

View File

@ -1,8 +1,8 @@
2025/04/22-16:10:04.899683 7f31457fa6c0 Recovering log #232
2025/04/22-16:10:04.910626 7f31457fa6c0 Delete type=3 #230
2025/04/22-16:10:04.910674 7f31457fa6c0 Delete type=0 #232
2025/04/22-16:24:56.374971 7f2ea7fff6c0 Level-0 table #237: started
2025/04/22-16:24:56.375019 7f2ea7fff6c0 Level-0 table #237: 0 bytes OK
2025/04/22-16:24:56.381214 7f2ea7fff6c0 Delete type=0 #235
2025/04/22-16:24:56.393338 7f2ea7fff6c0 Manual compaction at level-0 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!zjvGljrLk5SshC9D' @ 0 : 0; will stop at (end)
2025/04/22-16:24:56.393365 7f2ea7fff6c0 Manual compaction at level-1 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!zjvGljrLk5SshC9D' @ 0 : 0; will stop at (end)
2025/04/22-23:31:24.253009 7f3144ff96c0 Recovering log #236
2025/04/22-23:31:24.263050 7f3144ff96c0 Delete type=3 #234
2025/04/22-23:31:24.263096 7f3144ff96c0 Delete type=0 #236
2025/04/22-23:43:44.744546 7f2ea7fff6c0 Level-0 table #241: started
2025/04/22-23:43:44.744578 7f2ea7fff6c0 Level-0 table #241: 0 bytes OK
2025/04/22-23:43:44.750735 7f2ea7fff6c0 Delete type=0 #239
2025/04/22-23:43:44.750897 7f2ea7fff6c0 Manual compaction at level-0 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!zjvGljrLk5SshC9D' @ 0 : 0; will stop at (end)
2025/04/22-23:43:44.750924 7f2ea7fff6c0 Manual compaction at level-1 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!zjvGljrLk5SshC9D' @ 0 : 0; will stop at (end)

View File

@ -1,8 +1,8 @@
2025/04/22-15:52:11.369670 7f3145ffb6c0 Recovering log #228
2025/04/22-15:52:11.379132 7f3145ffb6c0 Delete type=3 #226
2025/04/22-15:52:11.379179 7f3145ffb6c0 Delete type=0 #228
2025/04/22-15:54:39.180592 7f2ea7fff6c0 Level-0 table #233: started
2025/04/22-15:54:39.180647 7f2ea7fff6c0 Level-0 table #233: 0 bytes OK
2025/04/22-15:54:39.186644 7f2ea7fff6c0 Delete type=0 #231
2025/04/22-15:54:39.200392 7f2ea7fff6c0 Manual compaction at level-0 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!zjvGljrLk5SshC9D' @ 0 : 0; will stop at (end)
2025/04/22-15:54:39.200456 7f2ea7fff6c0 Manual compaction at level-1 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!zjvGljrLk5SshC9D' @ 0 : 0; will stop at (end)
2025/04/22-16:10:04.899683 7f31457fa6c0 Recovering log #232
2025/04/22-16:10:04.910626 7f31457fa6c0 Delete type=3 #230
2025/04/22-16:10:04.910674 7f31457fa6c0 Delete type=0 #232
2025/04/22-16:24:56.374971 7f2ea7fff6c0 Level-0 table #237: started
2025/04/22-16:24:56.375019 7f2ea7fff6c0 Level-0 table #237: 0 bytes OK
2025/04/22-16:24:56.381214 7f2ea7fff6c0 Delete type=0 #235
2025/04/22-16:24:56.393338 7f2ea7fff6c0 Manual compaction at level-0 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!zjvGljrLk5SshC9D' @ 0 : 0; will stop at (end)
2025/04/22-16:24:56.393365 7f2ea7fff6c0 Manual compaction at level-1 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!zjvGljrLk5SshC9D' @ 0 : 0; will stop at (end)

Binary file not shown.

View File

View File

@ -1 +1 @@
MANIFEST-000234
MANIFEST-000238

View File

@ -1,8 +1,8 @@
2025/04/22-16:10:04.874243 7f3145ffb6c0 Recovering log #232
2025/04/22-16:10:04.884436 7f3145ffb6c0 Delete type=3 #230
2025/04/22-16:10:04.884505 7f3145ffb6c0 Delete type=0 #232
2025/04/22-16:24:56.387518 7f2ea7fff6c0 Level-0 table #237: started
2025/04/22-16:24:56.387539 7f2ea7fff6c0 Level-0 table #237: 0 bytes OK
2025/04/22-16:24:56.393264 7f2ea7fff6c0 Delete type=0 #235
2025/04/22-16:24:56.393353 7f2ea7fff6c0 Manual compaction at level-0 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)
2025/04/22-16:24:56.393378 7f2ea7fff6c0 Manual compaction at level-1 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)
2025/04/22-23:31:24.225117 7f31467fc6c0 Recovering log #236
2025/04/22-23:31:24.235493 7f31467fc6c0 Delete type=3 #234
2025/04/22-23:31:24.235550 7f31467fc6c0 Delete type=0 #236
2025/04/22-23:43:44.724728 7f2ea7fff6c0 Level-0 table #241: started
2025/04/22-23:43:44.724783 7f2ea7fff6c0 Level-0 table #241: 0 bytes OK
2025/04/22-23:43:44.730920 7f2ea7fff6c0 Delete type=0 #239
2025/04/22-23:43:44.750847 7f2ea7fff6c0 Manual compaction at level-0 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)
2025/04/22-23:43:44.750890 7f2ea7fff6c0 Manual compaction at level-1 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)

View File

@ -1,8 +1,8 @@
2025/04/22-15:52:11.340565 7f3144ff96c0 Recovering log #228
2025/04/22-15:52:11.351010 7f3144ff96c0 Delete type=3 #226
2025/04/22-15:52:11.351140 7f3144ff96c0 Delete type=0 #228
2025/04/22-15:54:39.186802 7f2ea7fff6c0 Level-0 table #233: started
2025/04/22-15:54:39.186835 7f2ea7fff6c0 Level-0 table #233: 0 bytes OK
2025/04/22-15:54:39.192886 7f2ea7fff6c0 Delete type=0 #231
2025/04/22-15:54:39.200400 7f2ea7fff6c0 Manual compaction at level-0 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)
2025/04/22-15:54:39.200450 7f2ea7fff6c0 Manual compaction at level-1 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)
2025/04/22-16:10:04.874243 7f3145ffb6c0 Recovering log #232
2025/04/22-16:10:04.884436 7f3145ffb6c0 Delete type=3 #230
2025/04/22-16:10:04.884505 7f3145ffb6c0 Delete type=0 #232
2025/04/22-16:24:56.387518 7f2ea7fff6c0 Level-0 table #237: started
2025/04/22-16:24:56.387539 7f2ea7fff6c0 Level-0 table #237: 0 bytes OK
2025/04/22-16:24:56.393264 7f2ea7fff6c0 Delete type=0 #235
2025/04/22-16:24:56.393353 7f2ea7fff6c0 Manual compaction at level-0 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)
2025/04/22-16:24:56.393378 7f2ea7fff6c0 Manual compaction at level-1 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)

Binary file not shown.

View File

@ -1 +1 @@
MANIFEST-000234
MANIFEST-000238

View File

@ -1,8 +1,8 @@
2025/04/22-16:10:04.912699 7f3144ff96c0 Recovering log #232
2025/04/22-16:10:04.923248 7f3144ff96c0 Delete type=3 #230
2025/04/22-16:10:04.923313 7f3144ff96c0 Delete type=0 #232
2025/04/22-16:24:56.367680 7f2ea7fff6c0 Level-0 table #237: started
2025/04/22-16:24:56.367779 7f2ea7fff6c0 Level-0 table #237: 0 bytes OK
2025/04/22-16:24:56.374777 7f2ea7fff6c0 Delete type=0 #235
2025/04/22-16:24:56.393329 7f2ea7fff6c0 Manual compaction at level-0 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
2025/04/22-16:24:56.393359 7f2ea7fff6c0 Manual compaction at level-1 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
2025/04/22-23:31:24.265717 7f3145ffb6c0 Recovering log #236
2025/04/22-23:31:24.276539 7f3145ffb6c0 Delete type=3 #234
2025/04/22-23:31:24.276606 7f3145ffb6c0 Delete type=0 #236
2025/04/22-23:43:44.731066 7f2ea7fff6c0 Level-0 table #241: started
2025/04/22-23:43:44.731099 7f2ea7fff6c0 Level-0 table #241: 0 bytes OK
2025/04/22-23:43:44.737300 7f2ea7fff6c0 Delete type=0 #239
2025/04/22-23:43:44.750866 7f2ea7fff6c0 Manual compaction at level-0 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
2025/04/22-23:43:44.750946 7f2ea7fff6c0 Manual compaction at level-1 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)

View File

@ -1,8 +1,8 @@
2025/04/22-15:52:11.381653 7f31457fa6c0 Recovering log #228
2025/04/22-15:52:11.391845 7f31457fa6c0 Delete type=3 #226
2025/04/22-15:52:11.391937 7f31457fa6c0 Delete type=0 #228
2025/04/22-15:54:39.174084 7f2ea7fff6c0 Level-0 table #233: started
2025/04/22-15:54:39.174143 7f2ea7fff6c0 Level-0 table #233: 0 bytes OK
2025/04/22-15:54:39.180452 7f2ea7fff6c0 Delete type=0 #231
2025/04/22-15:54:39.200380 7f2ea7fff6c0 Manual compaction at level-0 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
2025/04/22-15:54:39.200442 7f2ea7fff6c0 Manual compaction at level-1 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
2025/04/22-16:10:04.912699 7f3144ff96c0 Recovering log #232
2025/04/22-16:10:04.923248 7f3144ff96c0 Delete type=3 #230
2025/04/22-16:10:04.923313 7f3144ff96c0 Delete type=0 #232
2025/04/22-16:24:56.367680 7f2ea7fff6c0 Level-0 table #237: started
2025/04/22-16:24:56.367779 7f2ea7fff6c0 Level-0 table #237: 0 bytes OK
2025/04/22-16:24:56.374777 7f2ea7fff6c0 Delete type=0 #235
2025/04/22-16:24:56.393329 7f2ea7fff6c0 Manual compaction at level-0 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
2025/04/22-16:24:56.393359 7f2ea7fff6c0 Manual compaction at level-1 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)

Binary file not shown.