diff options
author | Adam Borowski <kilobyte@angband.pl> | 2013-11-03 13:01:25 +0100 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2013-11-03 13:01:25 +0100 |
commit | 7047b33b2768a838b2cea28f8738936c08f1d406 (patch) | |
tree | 27a0d4712509390031464a0d05d8eacdd53d2096 /crawl-ref/source/traps.cc | |
parent | e06bfaaf8641758a91ec5978d28a55b4697be788 (diff) | |
download | crawl-ref-7047b33b2768a838b2cea28f8738936c08f1d406.tar.gz crawl-ref-7047b33b2768a838b2cea28f8738936c08f1d406.zip |
Shorten branch enums.
Seriously, even preparing this commit gave me a pain in the triangle between
the thumb and index finger's bases and the wrist.
Diffstat (limited to 'crawl-ref/source/traps.cc')
-rw-r--r-- | crawl-ref/source/traps.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/crawl-ref/source/traps.cc b/crawl-ref/source/traps.cc index c10e392e9b..7b44e5a656 100644 --- a/crawl-ref/source/traps.cc +++ b/crawl-ref/source/traps.cc @@ -1658,12 +1658,12 @@ bool is_valid_shaft_level(const level_id &place) // Enable shafts on D:14 again, to allow bypassing the rune lock. // They will always be known to the player, so no accidents. --dpeg - // if (place == BRANCH_MAIN_DUNGEON && you.depth == RUNE_LOCK_DEPTH) + // if (place == BRANCH_DUNGEON && you.depth == RUNE_LOCK_DEPTH) // return false; // Shafts are now allowed on the first two levels, as they have a // good chance of being detected. You'll also fall less deep. - /* if (place == BRANCH_MAIN_DUNGEON && you.depth < 3) + /* if (place == BRANCH_DUNGEON && you.depth < 3) return false; */ // Don't generate shafts in branches where teleport control @@ -1708,9 +1708,9 @@ static level_id _generic_shaft_dest(level_pos lpos, bool known = false) int curr_depth = lid.depth; int max_depth = brdepth[lid.branch]; - if (lid.branch == BRANCH_MAIN_DUNGEON and curr_depth == RUNE_LOCK_DEPTH) + if (lid.branch == BRANCH_DUNGEON and curr_depth == RUNE_LOCK_DEPTH) max_depth = RUNE_LOCK_DEPTH + 1; - if (lid.branch == BRANCH_MAIN_DUNGEON and curr_depth < RUNE_LOCK_DEPTH) + if (lid.branch == BRANCH_DUNGEON and curr_depth < RUNE_LOCK_DEPTH) max_depth = RUNE_LOCK_DEPTH; // Shaft traps' behavior depends on whether it is entered intentionally. @@ -1822,7 +1822,7 @@ int num_traps_for_place() { switch (you.where_are_you) { - case BRANCH_ECUMENICAL_TEMPLE: + case BRANCH_TEMPLE: return 0; default: if (!player_in_connected_branch()) @@ -1873,7 +1873,7 @@ static trap_type _random_trap_default(int level_number) type = TRAP_BLADE; if (random2(1 + level_number) > 14 && one_chance_in(3) - || (player_in_branch(BRANCH_HALL_OF_ZOT) && coinflip())) + || (player_in_branch(BRANCH_ZOT) && coinflip())) { type = TRAP_ZOT; } @@ -1892,7 +1892,7 @@ trap_type random_trap_for_place() { int level_number = env.absdepth0; - if (player_in_branch(BRANCH_SLIME_PITS)) + if (player_in_branch(BRANCH_SLIME)) return _random_trap_slime(level_number); return _random_trap_default(level_number); |