<p></p>
<p>I've found that the cause of the bug is here in <code>pending_attacks_for_this_turn</code>:</p>
<pre><code> 'Check for queued attacks
 FOR i as integer = 0 TO UBOUND(atkq)
  WITH atkq(i)
   'Ignore unused atkq() slots, attacks with a turn delay, and stunned attackers
   IF atkq_attack_active(atkq(i), bslot()) THEN
    '--only blocking queued attacks are considered part of the current
    ' turn (although it is always perfectly possible for a nonblocking
    ' attack to happen in the current turn)
    ' FIXME: Why?! This doesn't look correct - won't it cause us to the next
    ' round even if there are attacks left?
    IF .blocking THEN RETURN YES
   END IF
  END WITH
 NEXT i
</code></pre>
<p>Replacing <code>IF .blocking THEN RETURN YES</code> with <code>RETURN YES</code> fixes the problem.<br>
So the bug doesn't happen if the attack is blocking. However there's no way I'm making that change right before release.</p>
<p>I added that FIXME comment a year and a half ago but because the comment above it so confidently claimed that this was correct I didn't want to change it.</p>
<p>Also in r10640 (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/ohrrpgce/ohrrpgce/commit/d82875bf296a66bd776a3bc54494b4bcb0498c9a/hovercard" href="https://github.com/ohrrpgce/ohrrpgce/commit/d82875bf296a66bd776a3bc54494b4bcb0498c9a"><tt>d82875b</tt></a>) I added a comment about attacks (in turn-based mode) getting "shunted" to the next round even if they don't have a turn delay, and fixed another resulting bug. I'm pretty sure I was referring to this behaviour. That fix might need revisiting too.</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/1118#issuecomment-619387402">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AMWGWZTXXADDJ2CZY6AF3UTROLXCPANCNFSM4MQGKNWA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AMWGWZW54VVAN76L47ABDDLROLXCPA5CNFSM4MQGKNWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOETVRUCQ.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/1118#issuecomment-619387402",
"url": "https://github.com/ohrrpgce/ohrrpgce/issues/1118#issuecomment-619387402",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>