ranged attack in repertoire might not be used

Commit 22884522, ported (from Sporkhack, Evilhack), added the ability
for monsters to maintain awareness of player resistances that they
observed.

Since they will refrain from using a ranged attack that they deem
futile, take the specific monster's seen_resistance field into consideration
when choosing code paths based on the availability of ranged attacks.

Resolves #1307
This commit is contained in:
nhmall
2024-11-03 09:03:04 -05:00
parent 70a5b06c45
commit 9a42d70901
3 changed files with 64 additions and 2 deletions

View File

@@ -1485,6 +1485,11 @@ extern int gazemu(struct monst *, struct attack *) NONNULLARG12;
extern void mdamageu(struct monst *, int) NONNULLARG1;
extern int could_seduce(struct monst *, struct monst *, struct attack *) NONNULLARG12;
extern int doseduce(struct monst *) NONNULLARG1;
extern boolean mon_avoiding_this_attack(struct monst *, int) NONNULLARG1;
/* extern boolean ranged_attk_assessed(struct monst *mtmp,
boolean (*assessfunct)(struct monst *, int)) NONNULLARG1;
*/
extern boolean ranged_attk_available(struct monst *mtmp) NONNULLARG1;
/* ### minion.c ### */