diff options
author | Adam Borowski <kilobyte@angband.pl> | 2012-04-30 14:13:20 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2012-04-30 14:31:06 +0200 |
commit | 44ea9146fae515c8674888a4de7de6e42fe71c07 (patch) | |
tree | d58612cbf57f86c6b9bbbc9cba2a82851b26dd6a /crawl-ref/source/dactions.cc | |
parent | 81285d73ae17a275eec38f643d24878a071db6fc (diff) | |
download | crawl-ref-44ea9146fae515c8674888a4de7de6e42fe71c07.tar.gz crawl-ref-44ea9146fae515c8674888a4de7de6e42fe71c07.zip |
Fix the Tomb not losing -cTele on picking up the rune.
I did not reintroduce dynamic branch flags, but used a daction instead
to clear the flag on remaining levels.
Old games that have Tomb:3 already generated but didn't pick up the rune yet
will still get an error message when picking it up, but it's otherwise
harmless.
Diffstat (limited to 'crawl-ref/source/dactions.cc')
-rw-r--r-- | crawl-ref/source/dactions.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crawl-ref/source/dactions.cc b/crawl-ref/source/dactions.cc index 86d457a27a..35649c20de 100644 --- a/crawl-ref/source/dactions.cc +++ b/crawl-ref/source/dactions.cc @@ -10,6 +10,7 @@ #include "coordit.h" #include "debug.h" #include "decks.h" +#include "dungeon.h" #include "env.h" #include "libutil.h" #include "mon-behv.h" @@ -42,6 +43,7 @@ static const char *daction_names[] = "remove Jiyva altars", "Pikel's slaves go good-neutral", "corpses rot", + "Tomb loses -cTele", }; static bool _mons_matches_counter(const monster* mon, daction_type act) @@ -206,6 +208,10 @@ static void _apply_daction(daction_type act) if (mitm[i].base_type == OBJ_CORPSES && mitm[i].sub_type == CORPSE_BODY) mitm[i].special = 1; // thoroughly rotten break; + case DACT_TOMB_CTELE: + if (player_in_branch(BRANCH_TOMB)) + unset_level_flags(LFLAG_NO_TELE_CONTROL, you.depth != 3); + break; case NUM_DA_COUNTERS: case NUM_DACTIONS: ; |