<p></p>
<p>In particular, <code>reset_enemy_state</code> sets <code>.vis = YES</code> but <code>check_death</code> is one of those places that ignores slots with <code>.id = -1</code>, so <code>vis = NO</code> is never reached.</p>
<p>I've said before that <code>.vis</code> is a big problem, it has different meanings in different places. I think we should replace various state variables (which can have invalid combinations of assignments), with a single enumeration of possible states, probably being: Empty, Dead (in future, not just heroes but also enemies), Appearing, Dying (including fleeing), On_Death (reached 0 HP but waiting on an on-death attack), Pending_Death  (has 0 HP but hasn't been processed for death yet), Alive.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/ohrrpgce/ohrrpgce/issues/1221#issuecomment-929752410">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AMWGWZTKOZ64DGFF5WO4OWTUEJVI3ANCNFSM5E6UPWHA">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<img src="https://github.com/notifications/beacon/AMWGWZUODEZMRF4QVXFMDO3UEJVI3A5CNFSM5E6UPWHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOG5VOKWQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/ohrrpgce/ohrrpgce/issues/1221#issuecomment-929752410",
"url": "https://github.com/ohrrpgce/ohrrpgce/issues/1221#issuecomment-929752410",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>