diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-08 12:27:59 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-08 12:27:59 +0000 |
commit | f9b9c28845db9d3eb50ed242a14327305a617850 (patch) | |
tree | a072582ecd9caba662e58d88da354f692ca17511 /crawl-ref/source | |
parent | d8a3aef168a6f025525282d57a4649c01439404d (diff) | |
download | crawl-ref-f9b9c28845db9d3eb50ed242a14327305a617850.tar.gz crawl-ref-f9b9c28845db9d3eb50ed242a14327305a617850.zip |
Don't equip Spriggans with knives since they don't need a butchering
tool, and make pure casters not wield said knife (they're unarmed
instead). Hunters now start wielding their sling/bow/crossbow. Hunters
starting without a launcher will still be wielding their dagger.
Update the tutorial accordingly, i.e. you might not have to switch
weapons now to fire your bow.
Also, unrestrict Centaur Paladins.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6455 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/newgame.cc | 71 | ||||
-rw-r--r-- | crawl-ref/source/tutorial.cc | 17 |
2 files changed, 70 insertions, 18 deletions
diff --git a/crawl-ref/source/newgame.cc b/crawl-ref/source/newgame.cc index c26a006d94..bf08614904 100644 --- a/crawl-ref/source/newgame.cc +++ b/crawl-ref/source/newgame.cc @@ -1435,7 +1435,6 @@ static char_choice_restriction _class_allowed( species_type speci, case SP_KOBOLD: case SP_SPRIGGAN: case SP_NAGA: - case SP_CENTAUR: case SP_OGRE: case SP_OGRE_MAGE: case SP_TROLL: @@ -4013,6 +4012,24 @@ job_query: return (you.char_class != JOB_UNKNOWN && you.species != SP_UNKNOWN); } +bool _needs_butchering_tool() +{ + // Mummies/Vampires don't eat. + // Ghouls have claws (see below). + if (you.is_undead) + return (false); + + // Trolls have claws. + if (you.has_claws()) + return (false); + + // Spriggans don't eat meat. + if (you.mutation[MUT_HERBIVOROUS] == 3) + return (false); + + return (true); +} + bool _give_items_skills() { char keyn; @@ -4624,8 +4641,9 @@ bool _give_items_skills() break; case JOB_WIZARD: - if (!you.is_undead && !you.has_claws()) - _newgame_make_item(0, EQ_WEAPON, OBJ_WEAPONS, WPN_KNIFE); + // The knife is a tool, not a weapon, so don't start wielding it. + if (_needs_butchering_tool()) + _newgame_make_item(0, EQ_NONE, OBJ_WEAPONS, WPN_KNIFE); _newgame_make_item(1, EQ_BODY_ARMOUR, OBJ_ARMOUR, ARM_ROBE); _newgame_make_item(2, EQ_HELMET, OBJ_ARMOUR, ARM_WIZARD_HAT); @@ -4658,8 +4676,9 @@ bool _give_items_skills() break; case JOB_CONJURER: - if (!you.is_undead && !you.has_claws()) - _newgame_make_item(0, EQ_WEAPON, OBJ_WEAPONS, WPN_KNIFE); + // The knife is a tool, not a weapon, so don't start wielding it. + if (_needs_butchering_tool()) + _newgame_make_item(0, EQ_NONE, OBJ_WEAPONS, WPN_KNIFE); _newgame_make_item(1, EQ_BODY_ARMOUR, OBJ_ARMOUR, ARM_ROBE); @@ -4701,8 +4720,9 @@ bool _give_items_skills() break; case JOB_SUMMONER: - if (!you.is_undead && !you.has_claws()) - _newgame_make_item(0, EQ_WEAPON, OBJ_WEAPONS, WPN_KNIFE); + // The knife is a tool, not a weapon, so don't start wielding it. + if (_needs_butchering_tool()) + _newgame_make_item(0, EQ_NONE, OBJ_WEAPONS, WPN_KNIFE); _newgame_make_item(1, EQ_BODY_ARMOUR, OBJ_ARMOUR, ARM_ROBE); _newgame_make_item(2, EQ_NONE, OBJ_BOOKS, BOOK_CALLINGS); @@ -4714,8 +4734,9 @@ bool _give_items_skills() break; case JOB_NECROMANCER: - if (!you.is_undead && !you.has_claws()) - _newgame_make_item(0, EQ_WEAPON, OBJ_WEAPONS, WPN_KNIFE); + // The knife is a tool, not a weapon, so don't start wielding it. + if (_needs_butchering_tool()) + _newgame_make_item(0, EQ_NONE, OBJ_WEAPONS, WPN_KNIFE); _newgame_make_item(1, EQ_BODY_ARMOUR, OBJ_ARMOUR, ARM_ROBE); _newgame_make_item(2, EQ_NONE, OBJ_BOOKS, BOOK_NECROMANCY); @@ -4783,8 +4804,9 @@ bool _give_items_skills() break; case JOB_FIRE_ELEMENTALIST: - if (!you.is_undead && !you.has_claws()) - _newgame_make_item(0, EQ_WEAPON, OBJ_WEAPONS, WPN_KNIFE); + // The knife is a tool, not a weapon, so don't start wielding it. + if (_needs_butchering_tool()) + _newgame_make_item(0, EQ_NONE, OBJ_WEAPONS, WPN_KNIFE); _newgame_make_item(1, EQ_BODY_ARMOUR, OBJ_ARMOUR, ARM_ROBE); _newgame_make_item(2, EQ_NONE, OBJ_BOOKS, BOOK_FLAMES); @@ -4797,8 +4819,9 @@ bool _give_items_skills() break; case JOB_ICE_ELEMENTALIST: - if (!you.is_undead && !you.has_claws()) - _newgame_make_item(0, EQ_WEAPON, OBJ_WEAPONS, WPN_KNIFE); + // The knife is a tool, not a weapon, so don't start wielding it. + if (_needs_butchering_tool()) + _newgame_make_item(0, EQ_NONE, OBJ_WEAPONS, WPN_KNIFE); _newgame_make_item(1, EQ_BODY_ARMOUR, OBJ_ARMOUR, ARM_ROBE); _newgame_make_item(2, EQ_NONE, OBJ_BOOKS, BOOK_FROST); @@ -4811,7 +4834,10 @@ bool _give_items_skills() break; case JOB_AIR_ELEMENTALIST: - _newgame_make_item(0, EQ_WEAPON, OBJ_WEAPONS, WPN_KNIFE); + // The knife is a tool, not a weapon, so don't start wielding it. + if (_needs_butchering_tool()) + _newgame_make_item(0, EQ_NONE, OBJ_WEAPONS, WPN_KNIFE); + _newgame_make_item(1, EQ_BODY_ARMOUR, OBJ_ARMOUR, ARM_ROBE); _newgame_make_item(2, EQ_NONE, OBJ_BOOKS, BOOK_AIR); @@ -4823,8 +4849,9 @@ bool _give_items_skills() break; case JOB_EARTH_ELEMENTALIST: - if (!you.is_undead && !you.has_claws()) - _newgame_make_item(0, EQ_WEAPON, OBJ_WEAPONS, WPN_KNIFE); + // The knife is a tool, not a weapon, so don't start wielding it. + if (_needs_butchering_tool()) + _newgame_make_item(0, EQ_NONE, OBJ_WEAPONS, WPN_KNIFE); _newgame_make_item(1, EQ_BODY_ARMOUR, OBJ_ARMOUR, ARM_ROBE); _newgame_make_item(2, EQ_NONE, OBJ_BOOKS, BOOK_GEOMANCY); @@ -4930,7 +4957,8 @@ bool _give_items_skills() _newgame_make_item(0, EQ_WEAPON, OBJ_WEAPONS, WPN_DAGGER); switch (you.species) - { case SP_MOUNTAIN_DWARF: + { + case SP_MOUNTAIN_DWARF: case SP_HILL_ORC: case SP_CENTAUR: case SP_OGRE: @@ -4967,18 +4995,27 @@ bool _give_items_skills() _newgame_make_item(1, EQ_NONE, OBJ_WEAPONS, WPN_SLING); _newgame_make_item(2, EQ_NONE, OBJ_MISSILES, MI_SLING_BULLET, -1, 15 + random2avg(21, 5) + random2avg(15, 2)); + + // Wield the sling instead. + you.equip[EQ_WEAPON] = 1; break; case SP_MOUNTAIN_DWARF: _newgame_make_item(1, EQ_NONE, OBJ_WEAPONS, WPN_CROSSBOW); _newgame_make_item(2, EQ_NONE, OBJ_MISSILES, MI_BOLT, -1, 15 + random2avg(21, 5)); + + // Wield the crossbow instead. + you.equip[EQ_WEAPON] = 1; break; default: _newgame_make_item(1, EQ_NONE, OBJ_WEAPONS, WPN_BOW); _newgame_make_item(2, EQ_NONE, OBJ_MISSILES, MI_ARROW, -1, 15 + random2avg(21, 5)); + + // Wield the bow instead. + you.equip[EQ_WEAPON] = 1; break; } diff --git a/crawl-ref/source/tutorial.cc b/crawl-ref/source/tutorial.cc index d817947e01..66beec0fa4 100644 --- a/crawl-ref/source/tutorial.cc +++ b/crawl-ref/source/tutorial.cc @@ -1239,13 +1239,28 @@ void tutorial_first_monster(const monsters &mon) text = "However, as a hunter you will want to deal with it using your " "bow. If you have a look at your bow from your " "<w>i</w>nventory, you'll find an explanation of how to do " - "this. First <w>w</w>ield it, then follow the instructions."; + "this. "; + + if (you.equip[EQ_WEAPON] == -1 + || you.inv[you.equip[EQ_WEAPON]].base_type != OBJ_WEAPONS + || you.inv[you.equip[EQ_WEAPON]].sub_type != WPN_BOW) + { + text += "First <w>w</w>ield it, then follow the instructions."; #ifdef USE_TILE text += EOL "As a short-cut you can also <w>right-click</w> on your " "bow to read its description, and <w>left-click</w> to wield " "it."; #endif + } +#ifdef USE_TILE + else + { + text += "Clicking with your <w>right mouse button</w> on your bow " + "will also let you read its description."; + } +#endif + formatted_message_history(text, MSGCH_TUTORIAL, 0, _get_tutorial_cols()); |