diff options
author | David Lawrence Ramsey <dolorous@users.sourceforge.net> | 2009-11-05 12:57:13 -0600 |
---|---|---|
committer | David Lawrence Ramsey <dolorous@users.sourceforge.net> | 2009-11-05 12:57:13 -0600 |
commit | 51ded013829b4cd8f73fa7f6313e73d2f7550aa5 (patch) | |
tree | 58a2f3973efdd6fb016f3ab7a3a71809d0d888d0 /crawl-ref/source/tutorial.cc | |
parent | 418a2664a3de915971c847d9fb16e93bc263661e (diff) | |
download | crawl-ref-51ded013829b4cd8f73fa7f6313e73d2f7550aa5.tar.gz crawl-ref-51ded013829b4cd8f73fa7f6313e73d2f7550aa5.zip |
Make many checks for monster (non)existence on squares use monster_at().
Not all are changed yet, as there are several index checks still needed
for debugging purposes.
Also, make many checks for player/monster (non)existence use actor_at().
Diffstat (limited to 'crawl-ref/source/tutorial.cc')
-rw-r--r-- | crawl-ref/source/tutorial.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crawl-ref/source/tutorial.cc b/crawl-ref/source/tutorial.cc index d011841572..e1607229cc 100644 --- a/crawl-ref/source/tutorial.cc +++ b/crawl-ref/source/tutorial.cc @@ -1407,7 +1407,7 @@ void tutorial_first_item(const item_def &item) // corpse is first seen. if (!Options.tut_just_triggered && item.base_type == OBJ_CORPSES - && monster_at(item.pos) == NULL) + && !monster_at(item.pos)) { learned_something_new(TUT_SEEN_CARRION, item.pos); } @@ -2135,7 +2135,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc) case TUT_STAIR_BRAND: // Monster or player standing on stairs. - if (monster_at(gc) || you.pos() == gc) + if (actor_at(gc)) DELAY_EVENT; viewwindow(true, false); @@ -2152,7 +2152,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc) case TUT_HEAP_BRAND: // Monster or player standing on heap. - if (monster_at(gc) || you.pos() == gc) + if (actor_at(gc)) DELAY_EVENT; viewwindow(true, false); @@ -2174,7 +2174,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc) return; #else // Monster or player standing on trap. - if (monster_at(gc) || (you.pos() == gc)) + if (actor_at(gc)) DELAY_EVENT; viewwindow(true, false); @@ -4460,7 +4460,7 @@ static bool _water_is_disturbed(int x, int y) const coord_def c(x,y); const monsters *mon = monster_at(c); - if (mon == NULL || grd(c) != DNGN_SHALLOW_WATER || !see_cell(c)) + if (!mon || grd(c) != DNGN_SHALLOW_WATER || !see_cell(c)) return (false); return (!mon->visible_to(&you) && !mons_flies(mon)); |