From ebe5e29212f88a4db612ffe5707c08aaa01f818e Mon Sep 17 00:00:00 2001 From: haranp Date: Wed, 20 Dec 2006 20:08:15 +0000 Subject: Refactored out branches into branch.h and branch.cc. NOTE: This commit is *buggy*; the final Hell vaults contain buggy runes now. Will fix later; this is a benchmark, since hopefully everything else works. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@682 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/spells3.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source/spells3.cc') diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc index 26581cf9e8..67caf85995 100644 --- a/crawl-ref/source/spells3.cc +++ b/crawl-ref/source/spells3.cc @@ -23,6 +23,7 @@ #include "abyss.h" #include "beam.h" +#include "branch.h" #include "cloud.h" #include "direct.h" #include "debug.h" @@ -564,8 +565,7 @@ bool allow_control_teleport( bool silent ) case BRANCH_ELVEN_HALLS: // Cannot raid the elven halls vaults until fountain drained - if (you.branch_stairs[STAIRS_ELVEN_HALLS] + - branch_depth(STAIRS_ELVEN_HALLS) == you.your_level) + if (player_branch_depth() == branches[BRANCH_ELVEN_HALLS].depth) { for (int x = 5; x < GXM - 5; x++) { @@ -580,8 +580,7 @@ bool allow_control_teleport( bool silent ) case BRANCH_HALL_OF_ZOT: // Cannot control teleport until the Orb is picked up - if (you.branch_stairs[STAIRS_HALL_OF_ZOT] + - branch_depth(STAIRS_HALL_OF_ZOT) == you.your_level + if (player_branch_depth() == branches[BRANCH_HALL_OF_ZOT].depth && you.char_direction != DIR_ASCENDING) { ret = false; -- cgit v1.2.3-54-g00ecf