summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/newgame.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-30 14:32:21 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-30 14:32:21 +0000
commit0e65534b50e40a32611842551af39a089eff48af (patch)
treebd03973481f7ac07748fc1d15a119d680982f0ac /crawl-ref/source/newgame.cc
parentf69da63b88187593335b68ac29356b561662997c (diff)
downloadcrawl-ref-0e65534b50e40a32611842551af39a089eff48af.tar.gz
crawl-ref-0e65534b50e40a32611842551af39a089eff48af.zip
Enable Chaos Knights of Lugonu starting out in the Abyss.
I've marked these characters with GDT_GAME_START, so that * the player starts out on an altar to Lugonu * there's an exit back to the Dungeon near-by * returning into the Dungeon always places them into the entry vault on level 1 * no abyssal runes are ever generated * item generation matches that of level 1 * monster spawn rates are that of the orb run to enforce a quick return into the Dungeon Once the player returns to the Dungeon (via an exit or with Lugonu's first power) char_direction is properly set to GDT_DESCENDING and from then on the game continues as if they had started in the Dungeon. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6245 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/newgame.cc')
-rw-r--r--crawl-ref/source/newgame.cc47
1 files changed, 36 insertions, 11 deletions
diff --git a/crawl-ref/source/newgame.cc b/crawl-ref/source/newgame.cc
index 9e97a0b439..b2327bc9ae 100644
--- a/crawl-ref/source/newgame.cc
+++ b/crawl-ref/source/newgame.cc
@@ -1937,6 +1937,8 @@ static char_choice_restriction _book_restriction(int booktype,
return (CC_UNRESTRICTED);
default:
+ if (!summon_too && player_genus(GENPC_DRACONIAN))
+ return (CC_UNRESTRICTED);
return (CC_RESTRICTED);
}
break;
@@ -1965,6 +1967,8 @@ static char_choice_restriction _book_restriction(int booktype,
return (CC_UNRESTRICTED);
default:
+ if (!summon_too && player_genus(GENPC_DRACONIAN))
+ return (CC_UNRESTRICTED);
return (CC_RESTRICTED);
}
break;
@@ -1988,8 +1992,9 @@ static char_choice_restriction _book_restriction(int booktype,
break;
default:
- return (player_genus(GENPC_DRACONIAN) ? CC_UNRESTRICTED
- : CC_RESTRICTED);
+ if (player_genus(GENPC_DRACONIAN))
+ return (CC_UNRESTRICTED);
+ return (CC_RESTRICTED);
}
}
return (CC_RESTRICTED);
@@ -2076,9 +2081,9 @@ static bool _choose_book( item_def& book, int firstbook, int numbooks )
return (false);
case '\r':
case '\n':
- if ( Options.prev_book != SBT_NO_SELECTION )
+ if (Options.prev_book != SBT_NO_SELECTION)
{
- if ( Options.prev_book == SBT_RANDOM )
+ if (Options.prev_book == SBT_RANDOM)
keyin = '*';
else
keyin = ('a' + Options.prev_book - 1);
@@ -4228,6 +4233,7 @@ bool _give_items_skills()
keyn = '*'; // for ng_pr setting
// fall-through for random
case '*':
+ case '+':
you.religion = coinflip() ? GOD_ZIN : GOD_YREDELEMNUL;
if (you.species == SP_HILL_ORC && coinflip())
you.religion = GOD_BEOGH;
@@ -4906,7 +4912,9 @@ bool _give_items_skills()
}
else if (Options.random_pick || Options.chaos_knight == GOD_RANDOM)
{
- you.religion = coinflip() ? GOD_XOM : GOD_MAKHLEB;
+ you.religion = (one_chance_in(3) ? GOD_XOM :
+ coinflip() ? GOD_MAKHLEB
+ : GOD_LUGONU);
ng_ck = GOD_RANDOM;
}
else
@@ -4920,6 +4928,7 @@ bool _give_items_skills()
textcolor( LIGHTGREY );
cprintf("a - Xom of Chaos" EOL);
cprintf("b - Makhleb the Destroyer" EOL);
+ cprintf("c - Lugonu the Unformed" EOL);
textcolor( BROWN );
cprintf(EOL "* - Random choice; "
@@ -4931,7 +4940,8 @@ bool _give_items_skills()
textcolor(BROWN);
cprintf(EOL "Enter - %s" EOL,
Options.prev_ck == GOD_XOM ? "Xom" :
- Options.prev_ck == GOD_MAKHLEB ? "Makhleb"
+ Options.prev_ck == GOD_MAKHLEB ? "Makhleb" :
+ Options.prev_ck == GOD_LUGONU ? "Lugonu"
: "Random");
textcolor(LIGHTGREY);
}
@@ -4963,14 +4973,20 @@ bool _give_items_skills()
keyn = '*'; // for ng_ck setting
// fall-through for random
case '*':
- you.religion = (coinflip()? GOD_XOM : GOD_MAKHLEB);
+ case '+':
+ you.religion = (one_chance_in(3) ? GOD_XOM :
+ coinflip() ? GOD_MAKHLEB
+ : GOD_LUGONU);
break;
case 'a':
you.religion = GOD_XOM;
break;
case 'b':
you.religion = GOD_MAKHLEB;
- // fall through
+ break;
+ case 'c':
+ you.religion = GOD_LUGONU;
+ break;
default:
break;
}
@@ -4992,12 +5008,21 @@ bool _give_items_skills()
// (Namely, a countdown to becoming bored.)
you.gift_timeout = random2(40) + random2(40);
}
- else // Makhleb
+ else // Makhleb or Lugonu
{
- you.piety = 25;
you.skills[SK_INVOCATIONS] = 2;
- }
+ if (you.religion == GOD_LUGONU)
+ {
+ // Chaos Knights of Lugonu start in the Abyss. We need to mark
+ // this unusual occurence, so the player doesn't get early
+ // access to OOD items etc.
+ you.char_direction = GDT_GAME_START;
+ you.piety = 35;
+ }
+ else
+ you.piety = 25;
+ }
break;
case JOB_HEALER: