diff --git a/modules/pegasus-combat.js b/modules/pegasus-combat.js index c69deb7..0ba1543 100644 --- a/modules/pegasus-combat.js +++ b/modules/pegasus-combat.js @@ -69,8 +69,8 @@ export class PegasusCombat extends Combat { } const combatant = game.combat.combatants.get(combatantId) if (combatant) { - await combatant.setFlag("world", "tic1", { revealed: false, text: rollData.tic1 }) - await combatant.setFlag("world", "tic2", { revealed: false, text: rollData.tic2 }) + await combatant.setFlag("world", "tic1", { revealed: false, text: rollData.tic1, displayed: false }) + await combatant.setFlag("world", "tic2", { revealed: false, text: rollData.tic2, displayed: false }) } } @@ -83,24 +83,27 @@ export class PegasusCombat extends Combat { if (combatant) { let ticData = combatant.getFlag("world", "tic" + num) if (ticData) { - let ticText = "ACTED" - /* returns if revealed or if GM and NPC or if player and owner */ + /* returns if revealed */ + if (ticData.revealed && ticData.displayed) { + return "ACTED" + } if (ticData.revealed && !ticData.displayed) { ticData.displayed = true - combatant.setFlag("world", "tic" + num, ticData ) - let chatData = { - user: game.user.id, - alias: combatant.actor.name, - rollMode: game.settings.get("core", "rollMode"), - whisper: [game.user.id].concat(ChatMessage.getWhisperRecipients('GM')), - content: `
${combatant.actor.name} is performing ${ticData.text} { + let chatData = { + user: game.user.id, + alias: combatant.actor.name, + rollMode: game.settings.get("core", "rollMode"), + whisper: [game.user.id].concat(ChatMessage.getWhisperRecipients('GM')), + content: `
${combatant.actor.name} is performing ${ticData.text} {{/if}} -
+
{{getTIC 1 this.id}} {{#if (isCharacter this.id)}} {{getTIC 2 this.id}}