Skip to content

Commit

Permalink
fix some references from actor to combatant
Browse files Browse the repository at this point in the history
  • Loading branch information
ChunkLightTuna committed Aug 22, 2024
1 parent 04109ae commit a5b649b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/combat.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function parse_turn(combat, updateData) {
const combatant = c.turns[c.turn]
const actor = game.actors.find(a => a.id === combatant.actorId)

if (actor.hidden) return ''
if (combatant.hidden) return ''

const token = canvas.tokens.placeables.find(p => p.id === combatant.tokenId)
const discordId = actor_to_discord_ids(actor)
Expand All @@ -86,9 +86,9 @@ function parse_turn(combat, updateData) {
output += `# ${game.i18n.localize('oronder.Initiative')} ${combatant.initiative} ${game.i18n.localize('oronder.Round')} ${c.round}\n`

if (combatant.defeated) {
output += `${actor.name} <Defeated>\n`
output += `${combatant.name} <Defeated>\n`
} else if (token.document.hidden) {
output += `${actor.name} <Hidden>\n`
output += `${combatant.name} <Hidden>\n`
} else {
const hp = get_health(
{
Expand All @@ -98,7 +98,7 @@ function parse_turn(combat, updateData) {
healthSetting,
actor.type
)
output += `${actor.name} <${hp}>\n`
output += `${combatant.name} <${hp}>\n`
output += get_effects_in_markdown(actor, token)
}
output += '```\n'
Expand Down

0 comments on commit a5b649b

Please sign in to comment.