diff options
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/monplace.cc | 9 | ||||
-rw-r--r-- | crawl-ref/source/monstuff.cc | 7 | ||||
-rw-r--r-- | crawl-ref/source/view.cc | 2 |
3 files changed, 15 insertions, 3 deletions
diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc index 985dab7cc0..85e000dc33 100644 --- a/crawl-ref/source/monplace.cc +++ b/crawl-ref/source/monplace.cc @@ -2116,11 +2116,14 @@ int mons_place(mgen_data mg) if (creation->type == MONS_RAKSHASA_FAKE && !one_chance_in(3)) creation->add_ench(ENCH_INVIS); - if (!(mg.flags & MG_FORCE_BEH)) + if (!(mg.flags & MG_FORCE_BEH) && !crawl_state.arena) player_angers_monster(creation); - // Make summoned being aware of player's presence. - behaviour_event(creation, ME_ALERT, MHITYOU); + if (crawl_state.arena) + behaviour_event(creation, ME_EVAL); + else + // Make summoned being aware of player's presence. + behaviour_event(creation, ME_ALERT, MHITYOU); } return (mid); diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index 9c79bdccc0..b0ca5be470 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -2291,6 +2291,10 @@ static bool _wounded_damaged(int monster_type) void behaviour_event(monsters *mon, int event, int src, coord_def src_pos) { + ASSERT(src >= 0 && src <= MHITYOU); + ASSERT(!crawl_state.arena || src != MHITYOU); + ASSERT(in_bounds(src_pos) || src_pos == coord_def()); + beh_type old_behaviour = mon->behaviour; bool isSmart = (mons_intel(mon) > I_ANIMAL); @@ -2488,6 +2492,9 @@ void behaviour_event(monsters *mon, int event, int src, // unsubmerge. mon->behaviour = BEH_LURK; } + + ASSERT(!crawl_state.arena + || mon->foe != MHITYOU && mon->target != you.pos()); } static bool _choose_random_patrol_target_grid(monsters *mon) diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc index ce20205bca..bf46e7af64 100644 --- a/crawl-ref/source/view.cc +++ b/crawl-ref/source/view.cc @@ -1213,6 +1213,8 @@ inline static bool _update_monster_grid(const monsters *monster) void monster_grid(bool do_updates) { + do_updates = do_updates && !crawl_state.arena; + monsters *monster = NULL; for (int s = 0; s < MAX_MONSTERS; s++) |