Monsters use wand of teleportation more
This commit is contained in:
@@ -1559,6 +1559,7 @@ monster elves shooting arrows weren't getting intended small to-hit and damage
|
|||||||
bonuses
|
bonuses
|
||||||
safe armor enchantment limit is lowered by one for magical armor
|
safe armor enchantment limit is lowered by one for magical armor
|
||||||
luck has a reduced effect on to-hit chance
|
luck has a reduced effect on to-hit chance
|
||||||
|
monsters use wand of teleportation to move hero away from item pile
|
||||||
|
|
||||||
|
|
||||||
Fixes to 3.7.0-x General Problems Exposed Via git Repository
|
Fixes to 3.7.0-x General Problems Exposed Via git Repository
|
||||||
|
|||||||
+26
@@ -29,6 +29,7 @@ staticfn boolean linedup_chk_corpse(coordxy, coordxy);
|
|||||||
staticfn void m_use_undead_turning(struct monst *, struct obj *);
|
staticfn void m_use_undead_turning(struct monst *, struct obj *);
|
||||||
staticfn boolean hero_behind_chokepoint(struct monst *);
|
staticfn boolean hero_behind_chokepoint(struct monst *);
|
||||||
staticfn boolean mon_has_friends(struct monst *);
|
staticfn boolean mon_has_friends(struct monst *);
|
||||||
|
staticfn boolean mon_likes_objpile_at(struct monst *mtmp, coordxy x, coordxy y) NONNULLARG1;
|
||||||
staticfn int mbhitm(struct monst *, struct obj *);
|
staticfn int mbhitm(struct monst *, struct obj *);
|
||||||
staticfn boolean fhito_loc(struct obj *obj, coordxy x, coordxy y,
|
staticfn boolean fhito_loc(struct obj *obj, coordxy x, coordxy y,
|
||||||
int (*fhito)(OBJ_P, OBJ_P));
|
int (*fhito)(OBJ_P, OBJ_P));
|
||||||
@@ -1388,6 +1389,30 @@ mon_has_friends(struct monst *mtmp)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* does monster like object pile at x,y? */
|
||||||
|
staticfn boolean
|
||||||
|
mon_likes_objpile_at(struct monst *mtmp, coordxy x, coordxy y)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
struct obj *otmp;
|
||||||
|
|
||||||
|
if (!isok(x,y) || !OBJ_AT(x,y))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
/* monster likes any of the top 3 items in the pile? */
|
||||||
|
for (i = 0, otmp = svl.level.objects[x][y]; otmp && i < 3; i++) {
|
||||||
|
if (mon_would_take_item(mtmp, otmp))
|
||||||
|
return TRUE;
|
||||||
|
otmp = otmp->nexthere;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* pile is larger than 3 stacks? */
|
||||||
|
if (i >= 3)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
/* Select an offensive item/action for a monster. Returns TRUE iff one is
|
/* Select an offensive item/action for a monster. Returns TRUE iff one is
|
||||||
* found.
|
* found.
|
||||||
*/
|
*/
|
||||||
@@ -1488,6 +1513,7 @@ find_offensive(struct monst *mtmp)
|
|||||||
/* do try to move hero to a more vulnerable spot */
|
/* do try to move hero to a more vulnerable spot */
|
||||||
&& (onscary(u.ux, u.uy, mtmp)
|
&& (onscary(u.ux, u.uy, mtmp)
|
||||||
|| (hero_behind_chokepoint(mtmp) && mon_has_friends(mtmp))
|
|| (hero_behind_chokepoint(mtmp) && mon_has_friends(mtmp))
|
||||||
|
|| mon_likes_objpile_at(mtmp, u.ux, u.uy)
|
||||||
|| stairway_at(u.ux, u.uy))) {
|
|| stairway_at(u.ux, u.uy))) {
|
||||||
gm.m.offensive = obj;
|
gm.m.offensive = obj;
|
||||||
gm.m.has_offense = MUSE_WAN_TELEPORTATION;
|
gm.m.has_offense = MUSE_WAN_TELEPORTATION;
|
||||||
|
|||||||
Reference in New Issue
Block a user