summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/newgame.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-24 20:50:29 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-24 20:50:29 +0000
commit3175aaabe8c2c1226ad0bcda432c9f1a406cf4fb (patch)
treea0c95cb358abb57a82e07fb2f680d10063b80089 /crawl-ref/source/newgame.cc
parent5bbfb3bae5fca6de837c1f1617404889952045b2 (diff)
downloadcrawl-ref-3175aaabe8c2c1226ad0bcda432c9f1a406cf4fb.tar.gz
crawl-ref-3175aaabe8c2c1226ad0bcda432c9f1a406cf4fb.zip
Add minor cosmetic fixes.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8720 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/newgame.cc')
-rw-r--r--crawl-ref/source/newgame.cc26
1 files changed, 13 insertions, 13 deletions
diff --git a/crawl-ref/source/newgame.cc b/crawl-ref/source/newgame.cc
index 0d760180e8..0acf44dcbf 100644
--- a/crawl-ref/source/newgame.cc
+++ b/crawl-ref/source/newgame.cc
@@ -904,7 +904,7 @@ static void _racialise_starting_equipment()
// skill levels.
static void _reassess_starting_skills()
{
- for (int i = 0; i < NUM_SKILLS; i++)
+ for (int i = 0; i < NUM_SKILLS; ++i)
{
if (you.skills[i] == 0
&& (you.species != SP_VAMPIRE || i != SK_UNARMED_COMBAT))
@@ -913,28 +913,21 @@ static void _reassess_starting_skills()
}
// Grant the amount of skill points required for a human.
- const int points = skill_exp_needed( you.skills[i] );
- you.skill_points[i] = (points * species_skills(i, SP_HUMAN))/100 + 1;
+ const int points = skill_exp_needed(you.skills[i]);
+ you.skill_points[i] = (points * species_skills(i, SP_HUMAN)) / 100 + 1;
// Find out what level that earns this character.
- const int sp_diff = species_skills( i, you.species );
+ const int sp_diff = species_skills(i, you.species);
you.skills[i] = 0;
- for (int lvl = 1; lvl <= 8; lvl++)
+ for (int lvl = 1; lvl <= 8; ++lvl)
{
- if (you.skill_points[i] > (skill_exp_needed(lvl) * sp_diff)/100)
+ if (you.skill_points[i] > (skill_exp_needed(lvl) * sp_diff) / 100)
you.skills[i] = lvl;
else
break;
}
- // Spellcasters should always have Spellcasting skill.
- if (i == SK_SPELLCASTING && you.skills[i] < 1)
- {
- you.skill_points[i] = (skill_exp_needed(1) * sp_diff) / 100;
- you.skills[i] = 1;
- }
-
// Vampires should always have Unarmed Combat skill.
if (you.species == SP_VAMPIRE && i == SK_UNARMED_COMBAT
&& you.skills[i] < 2)
@@ -942,6 +935,13 @@ static void _reassess_starting_skills()
you.skill_points[i] = (skill_exp_needed(2) * sp_diff) / 100;
you.skills[i] = 2;
}
+
+ // Spellcasters should always have Spellcasting skill.
+ if (i == SK_SPELLCASTING && you.skills[i] < 1)
+ {
+ you.skill_points[i] = (skill_exp_needed(1) * sp_diff) / 100;
+ you.skills[i] = 1;
+ }
}
}