summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/newgame.cc
diff options
context:
space:
mode:
authorDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2009-10-11 23:25:52 -0500
committerDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2009-10-11 23:25:52 -0500
commite9a682d0b4089efac1360eb5bbc90ecb12ff1334 (patch)
tree06bf80c43a7861620ff869bbe6b15bea64457f92 /crawl-ref/source/newgame.cc
parent6d1d871771181e033b34e41d416d25097039004c (diff)
downloadcrawl-ref-e9a682d0b4089efac1360eb5bbc90ecb12ff1334.tar.gz
crawl-ref-e9a682d0b4089efac1360eb5bbc90ecb12ff1334.zip
Since corpse sacrifices for Trog no longer require butchery, let
berserkers start with maces/flails instead of axes if they have higher skills in the former.
Diffstat (limited to 'crawl-ref/source/newgame.cc')
-rw-r--r--crawl-ref/source/newgame.cc28
1 files changed, 19 insertions, 9 deletions
diff --git a/crawl-ref/source/newgame.cc b/crawl-ref/source/newgame.cc
index 5edfba55f8..e8219cb908 100644
--- a/crawl-ref/source/newgame.cc
+++ b/crawl-ref/source/newgame.cc
@@ -530,12 +530,12 @@ int give_first_conjuration_book()
}
else if (you.skills[SK_FIRE_MAGIC] == 0 && you.skills[SK_EARTH_MAGIC] == 0)
{
- // If we're here its because we were going to default to the
+ // If we're here it's because we were going to default to the
// fire/earth book... but we don't have those skills. So we
// choose randomly based on the species weighting, again
- // ignoring air/earth which are secondary in these books. -- bwr
- if (random2( species_skills( SK_ICE_MAGIC, you.species ) )
- < random2( species_skills( SK_FIRE_MAGIC, you.species ) ))
+ // ignoring air/earth which are secondary in these books. - bwr
+ if (random2(species_skills(SK_ICE_MAGIC, you.species)) <
+ random2(species_skills(SK_FIRE_MAGIC, you.species)))
{
book = BOOK_CONJURATIONS_II;
}
@@ -2385,8 +2385,8 @@ static bool _choose_weapon()
if (claws_allowed)
{
- for (int i = 3; i >= 0; i--)
- startwep[i+1] = startwep[i];
+ for (int i = 3; i >= 0; --i)
+ startwep[i + 1] = startwep[i];
startwep[0] = WPN_UNARMED;
}
@@ -4168,7 +4168,7 @@ void _wanderer_decent_equipment(skill_type & skill,
// If we already gave an item for this type, just give the player
// a consumable.
- if((skill == SK_DODGING || skill == SK_STEALTH)
+ if ((skill == SK_DODGING || skill == SK_STEALTH)
&& gift_skills.find(SK_ARMOUR) != gift_skills.end())
{
skill = SK_TRAPS_DOORS;
@@ -4194,7 +4194,7 @@ void _wanderer_decent_equipment(skill_type & skill,
int max_sklev = 0;
skill_type max_skill = SK_NONE;
- for (int i = 0;i < total_weapons; ++i)
+ for (int i = 0; i < total_weapons; ++i)
{
if (you.skills[combined_weapon_skills[i]] >= max_sklev)
{
@@ -5340,7 +5340,17 @@ bool _give_items_skills()
if (you.has_claws())
you.equip[EQ_WEAPON] = -1; // Trolls/Ghouls fight unarmed.
else
- _newgame_make_item(0, EQ_WEAPON, OBJ_WEAPONS, WPN_HAND_AXE);
+ {
+ // Races skilled with maces/flails get one, the others axes.
+ weapon_type startwep = WPN_HAND_AXE;
+ if (species_skills(SK_MACES_FLAILS, you.species) <
+ species_skills(SK_AXES, you.species))
+ {
+ startwep = (player_genus(GENPC_OGRE)) ? WPN_ANKUS : WPN_MACE;
+ }
+
+ _newgame_make_item(0, EQ_WEAPON, OBJ_WEAPONS, startwep);
+ }
// ARMOUR
_newgame_make_item(1, EQ_BODY_ARMOUR, OBJ_ARMOUR, ARM_ANIMAL_SKIN);