Make hostile monsters with launcher and ammo keep away
If a hostile monster is wielding a ranged weapon, and is carrying appropriate ammo for it, make the monster try to stay away, outside the melee range.
This commit is contained in:
@@ -999,6 +999,12 @@ register int after;
|
||||
> ((ygold = findgold(g.invent)) ? ygold->quan : 0L))))
|
||||
appr = -1;
|
||||
|
||||
/* hostile monsters with ranged thrown weapons try to stay away */
|
||||
if (!mtmp->mpeaceful
|
||||
&& (dist2(mtmp->mx, mtmp->my, mtmp->mux, mtmp->muy) < 5*5)
|
||||
&& m_canseeu(mtmp) && m_has_launcher_and_ammo(mtmp))
|
||||
appr = -1;
|
||||
|
||||
if (!should_see && can_track(ptr)) {
|
||||
register coord *cp;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user