Assertion (timer > 0) failed in mon_inc_timed().
The context:
- first breath on a monster 3 squares away, monster is stunned
- second breath on the same monster, crash
The problem (project_m):
- a monster breathes force: do_stun = (randint1(15) + r) / (r + 1);
- cut in half if monster is already stunned: if (m_ptr->m_timed[MON_TMD_STUN]) do_stun /= 2;
- with r = 3 and randint1(15) < 5, do_stun = 0, assertion is triggered in mon_inc_timed()
The fix: ensure that effects are never 0
The context:
- first breath on a monster 3 squares away, monster is stunned
- second breath on the same monster, crash
The problem (project_m):
- a monster breathes force: do_stun = (randint1(15) + r) / (r + 1);
- cut in half if monster is already stunned: if (m_ptr->m_timed[MON_TMD_STUN]) do_stun /= 2;
- with r = 3 and randint1(15) < 5, do_stun = 0, assertion is triggered in mon_inc_timed()
The fix: ensure that effects are never 0
Comment