diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-03-02 18:35:22 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-03-02 18:35:22 +0000 |
commit | 52c7e79cd76a5205f72c43da92d9aa1297b1d3d4 (patch) | |
tree | ff906edd7976a830a817e2a15185b267e0bd881a /crawl-ref/source/newgame.cc | |
parent | da683c2f2f2474d0494eb280deae1fb11d6c8de2 (diff) | |
download | crawl-ref-52c7e79cd76a5205f72c43da92d9aa1297b1d3d4.tar.gz crawl-ref-52c7e79cd76a5205f72c43da92d9aa1297b1d3d4.zip |
Make artificers' rods of striking start with a constant number of
charges, as their wands do.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9312 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/newgame.cc')
-rw-r--r-- | crawl-ref/source/newgame.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/crawl-ref/source/newgame.cc b/crawl-ref/source/newgame.cc index 1fbeb6a888..2e63a2e2ff 100644 --- a/crawl-ref/source/newgame.cc +++ b/crawl-ref/source/newgame.cc @@ -3466,7 +3466,7 @@ static bool _give_wanderer_weapon( int slot, int wpn_skill ) return (ret); } -static void _make_rod(item_def &item, stave_type rod_type) +static void _make_rod(item_def &item, stave_type rod_type, int ncharges) { item.base_type = OBJ_STAVES; item.sub_type = rod_type; @@ -3474,7 +3474,7 @@ static void _make_rod(item_def &item, stave_type rod_type) item.special = you.item_description[IDESC_STAVES][rod_type]; item.colour = BROWN; - init_rod_mp(item); + init_rod_mp(item, ncharges); } // Creates an item of a given base and sub type. @@ -4381,7 +4381,7 @@ static bool _choose_wand() const wand_type startwand[5] = { WAND_ENSLAVEMENT, WAND_CONFUSION, WAND_MAGIC_DARTS, WAND_FROST, WAND_FLAME }; - _make_rod(you.inv[2], STAFF_STRIKING); + _make_rod(you.inv[2], STAFF_STRIKING, 8); const int num_choices = 6; int keyin = 0; @@ -4530,6 +4530,7 @@ static bool _choose_wand() ng_wand = keyin - 'a' + 1; wand_done: + if (keyin - 'a' == num_choices - 1) { // Choose the rod; we're all done. @@ -4538,10 +4539,10 @@ wand_done: // 1 wand of random effects and one chosen lesser wand const wand_type choice = startwand[keyin - 'a']; - int nCharges = 15; + int ncharges = 15; _newgame_make_item(2, EQ_NONE, OBJ_WANDS, WAND_RANDOM_EFFECTS, -1, 1, - nCharges, 0); - _newgame_make_item(3, EQ_NONE, OBJ_WANDS, choice, -1, 1, nCharges, 0); + ncharges, 0); + _newgame_make_item(3, EQ_NONE, OBJ_WANDS, choice, -1, 1, ncharges, 0); return (true); } |