D1 Skill Bonus
Moderator: AceCombat
D1 Skill Bonus
I was just wondering how the skill bonus is calculated at the end of each level in Descent 1.
- NUMBERZero
- DBB Ace
- Posts: 288
- Joined: Tue Sep 08, 2009 3:12 pm
- Location: Florida
- Contact:
- DarkFlameWolf
- DBB Admiral
- Posts: 1022
- Joined: Sat Mar 13, 2004 9:21 pm
- Location: North Carolina
Relevant code from D1:
Difficulty levels go from 0 (Trainee) upward, so there is no skill bonus for Trainee or Rookie. However, it's only based on your score for that level, multiplied by a factor dependent on the difficulty level, and rounded down to the nearest 100. Deaths don't affect it (they do on the last level, where you get a ship bonus), nor does time taken.
Code: Select all
level_points = Players[Player_num].score-Players[Player_num].last_score;
if (!Cheats_enabled) {
if (Difficulty_level > 1) {
skill_points = level_points*(Difficulty_level-1)/2;
skill_points -= skill_points % 100;
} else
skill_points = 0;
shield_points = f2i(Players[Player_num].shields) * 10 * (Difficulty_level+1);
energy_points = f2i(Players[Player_num].energy) * 5 * (Difficulty_level+1);
hostage_points = Players[Player_num].hostages_on_board * 500 * (Difficulty_level+1);
} else {
skill_points = 0;
shield_points = 0;
energy_points = 0;
hostage_points = 0;
}