diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-05-09 17:50:45 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-05-09 17:50:45 +0000 |
commit | f24effa7e6806e80cca64a04a480e56b539c6999 (patch) | |
tree | ef5927676e181a4819a981ceb4b866d068e70ba1 /crawl-ref/source | |
parent | ed25e26edc8827c33dfb47bfe5940cf220863c12 (diff) | |
download | crawl-ref-f24effa7e6806e80cca64a04a480e56b539c6999.tar.gz crawl-ref-f24effa7e6806e80cca64a04a480e56b539c6999.zip |
* Monsters shout only when they notice you (i.e. you are in sight).
* Add a tile for out of range grids (lighter shade than out of sight).
* Make Xom's repel stairs effect only happen during tension.
* Add Z to keybind.txt.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9755 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/files.cc | 3 | ||||
-rw-r--r-- | crawl-ref/source/monstuff.cc | 7 | ||||
-rw-r--r-- | crawl-ref/source/player.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/rltiles/dc-misc.txt | 1 | ||||
-rw-r--r-- | crawl-ref/source/rltiles/dc-misc/out_of_range.png | bin | 0 -> 160 bytes | |||
-rw-r--r-- | crawl-ref/source/tilereg.cc | 3 | ||||
-rw-r--r-- | crawl-ref/source/tiles.h | 1 | ||||
-rw-r--r-- | crawl-ref/source/view.cc | 7 | ||||
-rw-r--r-- | crawl-ref/source/xom.cc | 2 |
9 files changed, 19 insertions, 7 deletions
diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc index db9b688ebf..e0fe414bde 100644 --- a/crawl-ref/source/files.cc +++ b/crawl-ref/source/files.cc @@ -973,7 +973,8 @@ static void _grab_followers() if (fmenv->type == MONS_PLAYER_GHOST && fmenv->hit_points < fmenv->max_hit_points / 2) { - mpr("The ghost fades into the shadows."); + if (player_monster_visible(fmenv)) + mpr("The ghost fades into the shadows."); monster_teleport(fmenv, true); } } diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index 3281ee0a7c..795c7304a7 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -2805,9 +2805,12 @@ void behaviour_event(monsters *mon, mon_event_type event, int src, _handle_behaviour(mon); ASSERT(in_bounds(mon->target) || mon->target.origin()); - // If it woke up, it might shout. - if (was_sleeping && !mons_is_sleeping(mon) && allow_shout) + // If it woke up and you're its new foe, it might shout. + if (was_sleeping && !mons_is_sleeping(mon) && allow_shout + && mon->foe == MHITYOU && !mons_wont_attack(mon)) + { handle_monster_shouts(mon); + } const bool wasLurking = (old_behaviour == BEH_LURK && !mons_is_lurking(mon)); diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 7d11542b83..8f63c80d8e 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -6198,7 +6198,7 @@ std::string player::shout_verb() const return "squeak"; default: // depends on SCREAM mutation int level = player_mutation_level(MUT_SCREAM); - if ( level <= 1) + if (level <= 1) return "shout"; else if (level == 2) return "yell"; diff --git a/crawl-ref/source/rltiles/dc-misc.txt b/crawl-ref/source/rltiles/dc-misc.txt index 922910a122..fa5e5575f1 100644 --- a/crawl-ref/source/rltiles/dc-misc.txt +++ b/crawl-ref/source/rltiles/dc-misc.txt @@ -61,6 +61,7 @@ flame FLAME may_stab_brand MAY_STAB_BRAND
stab_brand STAB_BRAND
out_of_sight MESH
+out_of_range OOR_MESH
magicmap MAGIC_MAP_MESH
something_under SOMETHING_UNDER
error ERROR
diff --git a/crawl-ref/source/rltiles/dc-misc/out_of_range.png b/crawl-ref/source/rltiles/dc-misc/out_of_range.png Binary files differnew file mode 100644 index 0000000000..69d74b449c --- /dev/null +++ b/crawl-ref/source/rltiles/dc-misc/out_of_range.png diff --git a/crawl-ref/source/tilereg.cc b/crawl-ref/source/tilereg.cc index 32a9cd30d5..04a3b08a82 100644 --- a/crawl-ref/source/tilereg.cc +++ b/crawl-ref/source/tilereg.cc @@ -542,6 +542,9 @@ void DungeonRegion::pack_foreground(unsigned int bg, unsigned int fg, int x, int if (bg & TILE_FLAG_UNSEEN && (bg != TILE_FLAG_UNSEEN || fg)) m_buf_main.add(TILE_MESH, x, y); + if (bg & TILE_FLAG_OOR && (bg != TILE_FLAG_OOR || fg)) + m_buf_main.add(TILE_OOR_MESH, x, y); + if (bg & TILE_FLAG_MM_UNSEEN && (bg != TILE_FLAG_MM_UNSEEN || fg)) m_buf_main.add(TILE_MAGIC_MAP_MESH, x, y); diff --git a/crawl-ref/source/tiles.h b/crawl-ref/source/tiles.h index 66162a03b2..7e84bbc775 100644 --- a/crawl-ref/source/tiles.h +++ b/crawl-ref/source/tiles.h @@ -173,6 +173,7 @@ enum tile_flags TILE_FLAG_SANCTUARY = 0x00200000, TILE_FLAG_TUT_CURSOR= 0x00400000, TILE_FLAG_RAY_OOR = 0x00800000, + TILE_FLAG_OOR = 0x01000000, // General TILE_FLAG_MASK = 0x000007FF diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc index 3f20c3b3b6..482fb298ff 100644 --- a/crawl-ref/source/view.cc +++ b/crawl-ref/source/view.cc @@ -1268,7 +1268,8 @@ void monster_grid(bool do_updates) || mons_is_wandering(monster)) && check_awaken(monster)) { - behaviour_event(monster, ME_ALERT, MHITYOU); + behaviour_event(monster, ME_ALERT, MHITYOU, you.pos(), false); + handle_monster_shouts(monster); } // [enne] - It's possible that mgrd and monster->x/y are out of @@ -5362,7 +5363,9 @@ void viewwindow(bool draw_it, bool do_updates) { buffy[bufcount + 1] = DARKGREY; #ifdef USE_TILE - tileb[bufcount + 1] |= TILE_FLAG_UNSEEN; +// tileb[bufcount + 1] |= TILE_FLAG_UNSEEN; + if (see_grid(gc)) + tileb[bufcount + 1] |= TILE_FLAG_OOR; #endif } diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc index 4411c83957..59b7360cc3 100644 --- a/crawl-ref/source/xom.cc +++ b/crawl-ref/source/xom.cc @@ -2733,7 +2733,7 @@ static bool _xom_is_bad(int sever, int tension) done = _xom_polymorph_nearby_monster(false); badness = 3; } - else if ((!nasty || tension > 0) && x_chance_in_y(11, sever)) + else if (tension > 0 && x_chance_in_y(11, sever)) { done = _repel_stairs(); badness = (you.duration[DUR_REPEL_STAIRS_CLIMB] ? 3 : 2); |