Pet titan killed itself with a boulder
A pet titan dropped a boulder over a pool, and the code killed the titan, because the code was considering the titan to be in the water. If a flyer or a floater is over the pool, don't kill them off if a boulder is dropped in there. Also make the pet movement code handle the case where the pet might've died while dropping items.
This commit is contained in:
3
src/do.c
3
src/do.c
@@ -83,7 +83,8 @@ boulder_hits_pool(
|
||||
will be dead here; killing it again would yield impossible
|
||||
"dmonsfree: N removed doesn't match N+1 pending" when other
|
||||
monsters have finished their current turn */
|
||||
if ((mtmp = m_at(rx, ry)) != 0 && !DEADMONSTER(mtmp))
|
||||
if ((mtmp = m_at(rx, ry)) != 0 && !DEADMONSTER(mtmp)
|
||||
&& !m_in_air(mtmp))
|
||||
mondied(mtmp);
|
||||
|
||||
if (ttmp)
|
||||
|
||||
@@ -1010,8 +1010,8 @@ dog_move(
|
||||
|
||||
if (edog) {
|
||||
j = dog_invent(mtmp, edog, udist);
|
||||
if (j == 2)
|
||||
return MMOVE_DIED; /* died */
|
||||
if (j == 2 || mon_offmap(mtmp))
|
||||
return DEADMONSTER(mtmp) ? MMOVE_DIED : MMOVE_DONE;
|
||||
else if (j == 1)
|
||||
goto newdogpos; /* eating something */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user