* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "dunbash.h"
+#include "cavechop.h"
#include "bmagic.h"
#include "monsters.h"
#include "combat.h"
int cansee;
int range;
compute_directions(u.y, u.x, mptr->y, mptr->x, &dy, &dx, &sy, &sx, &meleerange, &oncardinal);
- cansee = inyourroom(mptr->y, mptr->x) || meleerange;
+ cansee = mon_visible(mon);
if ((dy * sy) >= (dx * sx))
{
range = dy * sy;
{
if ((mptr->hpcur < (mptr->hpmax * 25 / 100)) && (zero_die(10) < 4))
{
- to_cast = !zero_die(3) ? MS_TELEPORT_ESCAPE : MS_TELEPORT_AND_SUMMON;
+ to_cast = ((mptr->next_summon < game_tick) || !zero_die(3)) ? MS_TELEPORT_ESCAPE : MS_TELEPORT_AND_SUMMON;
}
else if (meleerange)
{
break;
case MS_TELEPORT_AND_SUMMON:
+ mptr->next_summon = game_tick + 1000;
/* Do the summoning... */
print_mon_name(mon, 3);
print_msg(" calls for help...\n");