This commit is contained in:
@ -743,14 +743,15 @@ export default class LethalFantasyRoll extends Roll {
|
||||
if (currentAction) {
|
||||
if (rollContext === "rollLethargyDice") {
|
||||
if (currentAction.spellStatus === "castingTime") {
|
||||
if (currentAction.castingTime < currentAction.system.castingTime) {
|
||||
let message = `Casting time : ${currentAction.name}, count : ${currentAction.castingTime}/${currentAction.system.castingTime}`
|
||||
let time = currentAction.type === "spell" ? currentAction.system.castingTime : currentAction.system.prayerTime
|
||||
if (currentAction.castingTime < time) {
|
||||
let message = `Casting time : ${currentAction.name}, count : ${currentAction.castingTime}/${time}`
|
||||
ChatMessage.create({ content: message, speaker: ChatMessage.getSpeaker({ actor: combatant.actor }) })
|
||||
currentAction.castingTime += 1
|
||||
await combatant.setFlag(SYSTEM.id, "currentAction", foundry.utils.duplicate(currentAction))
|
||||
return
|
||||
} else {
|
||||
let message = `Spell ${currentAction.name} ready to be cast on next second !`
|
||||
let message = `Spell/Miracle ${currentAction.name} ready to be cast on next second !`
|
||||
ChatMessage.create({ content: message, speaker: ChatMessage.getSpeaker({ actor: combatant.actor }) })
|
||||
currentAction.castingTime = 1
|
||||
currentAction.spellStatus = "toBeCasted"
|
||||
@ -890,7 +891,7 @@ export default class LethalFantasyRoll extends Roll {
|
||||
},
|
||||
{
|
||||
action: "cast",
|
||||
label: "Cast a spell",
|
||||
label: "Cast a spell/Miracle",
|
||||
callback: (event, button, dialog) => {
|
||||
return "casting"
|
||||
},
|
||||
|
Reference in New Issue
Block a user