Tomb Titivator
Posts: 799
Joined: Saturday, 23rd February 2013, 22:25
ctd help
Is there some way to get an error log?
Questions, Explanations, Howtos
Tomb Titivator
Posts: 799
Joined: Saturday, 23rd February 2013, 22:25
Ziggurat Zagger
Posts: 3163
Joined: Friday, 6th January 2012, 18:45
Tomb Titivator
Posts: 799
Joined: Saturday, 23rd February 2013, 22:25
case SP_MUMMY:
if (you.experience_level == 13 || you.experience_level == 26)
{
mpr("You feel more in touch with the powers of death.",
MSGCH_INTRINSIC_GAIN);
}
if (you.experience_level == mummyspacing*journal){
if (journal == 1){mpr("Allthough much has been lost to the sands of time you still see glimpses of a fleeting past.",
MSGCH_INTRINSIC_GAIN);mummyskills();journal = journal + 1;
}
else if (journal == 2){mpr("You begin to remember more of your hidden past, regaining skills once thought lost.",
MSGCH_INTRINSIC_GAIN);mummyskills();journal = journal + 1;}
else if (journal == 3){mpr("Through flashes and short glimpses, you now know secrets lost to the ages.",
MSGCH_INTRINSIC_GAIN);mummyskills();journal = journal + 1;}
else if (journal == 4){mpr("The ghosts of amnesia are no match for your vast intellect. You know who you are. More importantly, you know who you were.",
MSGCH_INTRINSIC_GAIN);mummyskills();journal = journal + 1;}
else if (journal < 7){mpr("Allthough you allready remember your past, you still gain a flash of insight on your road to ultimate power.",
MSGCH_INTRINSIC_GAIN);mummyskills();journal = journal + 1;}
}
if (you.experience_level == 13) // level 13 for now -- bwr
{
mpr("You can now infuse your body with magic to restore "
"decomposition.", MSGCH_INTRINSIC_GAIN);
}
break;
static void mummyskills(){
int totalweight = 0;
int c = random2(10) + 1;
skill_type result = SK_NONE;
for (int i = SK_FIRST_SKILL; i < NUM_SKILLS; ++i)
{
skill_type s = static_cast<skill_type>(i);
if (skill_name(s) == NULL || is_useless_skill(s))
continue;
if (you.skills[s] < MAX_SKILL_LEVEL)
{
// Choosing a skill is likelier if you are somewhat skilled in it.
const int curweight = 1 + you.skills[s] * (40 - you.skills[s]) * c;
totalweight += curweight;
if (x_chance_in_y(curweight, totalweight))
result = s;
}
}
if (you.skills[result] + 4 < 28){
you.skills[result] = you.skills[result] +4;
}
else{
you.skills[result] = 27;
}
}
Dungeon Master
Posts: 1531
Joined: Saturday, 5th March 2011, 06:29
Tomb Titivator
Posts: 799
Joined: Saturday, 23rd February 2013, 22:25
Dungeon Master
Posts: 1531
Joined: Saturday, 5th March 2011, 06:29
Tomb Titivator
Posts: 799
Joined: Saturday, 23rd February 2013, 22:25
Ziggurat Zagger
Posts: 3163
Joined: Friday, 6th January 2012, 18:45
Dungeon Master
Posts: 1531
Joined: Saturday, 5th March 2011, 06:29
Ziggurat Zagger
Posts: 3163
Joined: Friday, 6th January 2012, 18:45
Tomb Titivator
Posts: 799
Joined: Saturday, 23rd February 2013, 22:25
Spider Stomper
Posts: 243
Joined: Sunday, 28th August 2011, 14:04
Tomb Titivator
Posts: 799
Joined: Saturday, 23rd February 2013, 22:25
Dungeon Master
Posts: 1531
Joined: Saturday, 5th March 2011, 06:29
CommanderC wrote:3) As mumra said, result can be SK_NONE after leaving the for loop.
Tomb Titivator
Posts: 799
Joined: Saturday, 23rd February 2013, 22:25
Users browsing this forum: No registered users and 19 guests