diff options
author | Nicholas Feinberg <pleasingfung@gmail.com> | 2014-07-22 18:33:43 -0700 |
---|---|---|
committer | Nicholas Feinberg <pleasingfung@gmail.com> | 2014-07-22 18:33:43 -0700 |
commit | 41533249142e46525d67ac2517898873ec4a17aa (patch) | |
tree | 7ec16b48098155799fd8c2d1d1c56d16beb1e699 /crawl-ref/source/player.cc | |
parent | d13cd90a4f68e267f9c28ffae8fdecf9d4a6e904 (diff) | |
download | crawl-ref-41533249142e46525d67ac2517898873ec4a17aa.tar.gz crawl-ref-41533249142e46525d67ac2517898873ec4a17aa.zip |
Don't trigger zot traps when losing flight (5090, wheals)
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r-- | crawl-ref/source/player.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 9598fc0855..83d9fd8fbf 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -503,8 +503,10 @@ void moveto_location_effects(dungeon_feature_type old_feat, } } - // Traps go off. - if (trap_def* ptrap = find_trap(you.pos())) + // Traps go off. (But magical traps don't go off again when losing flight + // - i.e., moving into the same tile) + trap_def* ptrap = find_trap(you.pos()); + if (ptrap && (old_pos != you.pos() || ptrap->ground_only())) ptrap->trigger(you, !stepped); // blinking makes it hard to evade if (stepped) |