From 68310c7d793776ea50f39332042a5f2e2974e7fc Mon Sep 17 00:00:00 2001 From: arromdee Date: Sat, 6 Apr 2002 04:00:04 +0000 Subject: [PATCH] monster spells (insects, nasties) This throttles insect creation through monster spell casting. Especially insects. It was creating m_lev worth of insects--for a 25th level priest, that means every batch of insects was size 25! I also lowered the range for nasties creation for similar reasons. --- doc/fixes34.1 | 1 + src/mcastu.c | 5 ++++- src/monmove.c | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/fixes34.1 b/doc/fixes34.1 index cc0090ee0..dec2cc3bf 100644 --- a/doc/fixes34.1 +++ b/doc/fixes34.1 @@ -51,6 +51,7 @@ avoid dmonsfree impossible message due to migrating a dead monster via avoid temporary disappearing Burdened message due to updating status line midway thru in_container don't credit player's wisdom when makelevel creates random Elbereth engravings +reduce insect/monster creation from monster spells Platform- and/or Interface-Specific Fixes diff --git a/src/mcastu.c b/src/mcastu.c index 13827d482..8ef47773b 100644 --- a/src/mcastu.c +++ b/src/mcastu.c @@ -542,9 +542,12 @@ int spellnum; boolean success; int i; coord bypos; + int quan; + quan = (mtmp->m_lev < 2) ? 1 : rnd((int)mtmp->m_lev / 2); + if (quan < 3) quan = 3; success = pm ? TRUE : FALSE; - for (i = 0; i <= (int) mtmp->m_lev; i++) { + for (i = 0; i <= quan; i++) { if (!enexto(&bypos, mtmp->mux, mtmp->muy, mtmp->data)) break; if ((pm = mkclass(let,0)) != 0 && diff --git a/src/monmove.c b/src/monmove.c index 04b48065a..1e3bad4d2 100644 --- a/src/monmove.c +++ b/src/monmove.c @@ -491,7 +491,7 @@ toofar: /* arbitrary distance restriction to keep monster far away from you from having cast dozens of sticks-to-snakes or similar spells by the time you reach it */ - if (dist2(mtmp->mx, mtmp->my, u.ux, u.uy) <= 64 && !mtmp->mspec_used) { + if (dist2(mtmp->mx, mtmp->my, u.ux, u.uy) <= 49 && !mtmp->mspec_used) { struct attack *a; for (a = &mdat->mattk[0]; a < &mdat->mattk[NATTK]; a++) {