Re-indent all files in the boe namespace

This commit is contained in:
2014-04-15 15:09:35 -04:00
parent ac3ac31f04
commit 62d6576187
20 changed files with 9017 additions and 8955 deletions

View File

@@ -40,20 +40,20 @@ short which;
{
short choice,i;
item_record_type treas[] = {
{0,0,0,0,0,0,0,0,0,0,0,0,false,false,false,{0,0},"",""}
};
{0,0,0,0,0,0,0,0,0,0,0,0,false,false,false,{0,0},"",""}
};
bool can_enter = true;
location where;
where = get_spec_loc(which);
switch (which) {
case 1:
break;
}
}
return can_enter;
} */
@@ -62,72 +62,72 @@ short which;
void activate_monster_enc(short enc_num,std::string list,short str,short strsnd,short *flip_bit)
{
if (*flip_bit == 0) {
cStrDlog display_enc_string(get_str(list,str),"","",8,PIC_DLOG);
display_enc_string.setSound(strsnd);
display_enc_string.show();
activate_monsters(enc_num,1);
*flip_bit = 20;
}
if (*flip_bit == 0) {
cStrDlog display_enc_string(get_str(list,str),"","",8,PIC_DLOG);
display_enc_string.setSound(strsnd);
display_enc_string.show();
activate_monsters(enc_num,1);
*flip_bit = 20;
}
}
bool run_trap(short pc_num,eTrapType trap_type,short trap_level,short diff)
//short pc_num; // 6 - BOOM! 7 - pick here
//short trap_type; // 0 - random 1 - blade 2 - dart 3 - gas 4 - boom 5 - paralyze 6 - no
// 7 - level drain 8 - alert 9 - big flames 10 - dumbfound 11 - disease 1
// 12 - disease all
//short trap_type; // 0 - random 1 - blade 2 - dart 3 - gas 4 - boom 5 - paralyze 6 - no
// 7 - level drain 8 - alert 9 - big flames 10 - dumbfound 11 - disease 1
// 12 - disease all
{
short r1,skill,i,num_hits = 1,i_level;
short trap_odds[30] = {5,30,35,42,48, 55,63,69,75,77,
78,80,82,84,86, 88,90,92,94,96,98,99,99,99,99,99,99,99,99,99};
78,80,82,84,86, 88,90,92,94,96,98,99,99,99,99,99,99,99,99,99};
if (pc_num > 7) { // Debug
// TODO: Play an error sound here
ASB("TRAP ERROR! REPORT!");
return true;
}
}
if (pc_num == 7) {
pc_num = select_pc(1,0);
if (pc_num == 6)
return false;
}
}
num_hits += trap_level;
if (trap_type == TRAP_RANDOM)
trap_type = (eTrapType) get_ran(1,1,4);
if (trap_type == TRAP_FALSE_ALARM)
return true;
if (pc_num < 6) {
i = stat_adj(pc_num,1);
if ((i_level = get_prot_level(pc_num,42)) > 0)
i = i + i_level / 2;
skill = minmax(0,20,univ.party[pc_num].skills[SKILL_DISARM_TRAPS] +
+ univ.party[pc_num].skills[SKILL_LUCK] / 2 + 1 - univ.town.difficulty + 2 * i);
r1 = get_ran(1,1,100) + diff;
// Nimble?
if (univ.party[pc_num].traits[TRAIT_NIMBLE])
r1 -= 6;
if (r1 < trap_odds[skill]) {
add_string_to_buf(" Trap disarmed. ");
return true;
}
else add_string_to_buf(" Disarm failed. ");
if (pc_num < 6) {
i = stat_adj(pc_num,1);
if ((i_level = get_prot_level(pc_num,42)) > 0)
i = i + i_level / 2;
skill = minmax(0,20,univ.party[pc_num].skills[SKILL_DISARM_TRAPS] +
+ univ.party[pc_num].skills[SKILL_LUCK] / 2 + 1 - univ.town.difficulty + 2 * i);
r1 = get_ran(1,1,100) + diff;
// Nimble?
if (univ.party[pc_num].traits[TRAIT_NIMBLE])
r1 -= 6;
if (r1 < trap_odds[skill]) {
add_string_to_buf(" Trap disarmed. ");
return true;
}
else add_string_to_buf(" Disarm failed. ");
}
switch (trap_type) {
case TRAP_BLADE:
for (i = 0; i < num_hits; i++) {
add_string_to_buf(" A knife flies out! ");
r1 = get_ran(2 + univ.town.difficulty / 14,1,10);
damage_pc(pc_num,r1,DAMAGE_WEAPON,MONSTER_TYPE_UNKNOWN,0);
}
add_string_to_buf(" A knife flies out! ");
r1 = get_ran(2 + univ.town.difficulty / 14,1,10);
damage_pc(pc_num,r1,DAMAGE_WEAPON,MONSTER_TYPE_UNKNOWN,0);
}
break;
case TRAP_DART:
@@ -144,13 +144,13 @@ bool run_trap(short pc_num,eTrapType trap_type,short trap_level,short diff)
for(i = 0; i < 6; i++)
poison_pc(i,r1);
break;
case TRAP_EXPLOSION:
case TRAP_EXPLOSION:
for (i = 0; i < num_hits; i++) {
add_string_to_buf(" There is an explosion. ");
r1 = get_ran(3 + univ.town.difficulty / 13,1,8);
hit_party(r1,DAMAGE_FIRE);
}
add_string_to_buf(" There is an explosion. ");
r1 = get_ran(3 + univ.town.difficulty / 13,1,8);
hit_party(r1,DAMAGE_FIRE);
}
break;
case TRAP_SLEEP_RAY:
@@ -165,18 +165,18 @@ bool run_trap(short pc_num,eTrapType trap_type,short trap_level,short diff)
r1 = r1 + trap_level * 30;
univ.party[pc_num].experience = max (0,univ.party[pc_num].experience - r1);
break;
case TRAP_ALERT:
add_string_to_buf(" An alarm goes off!!! ");
make_town_hostile();
break;
case TRAP_FLAMES:
case TRAP_FLAMES:
add_string_to_buf(" Flames shoot from the walls. ");
r1 = get_ran(10 + trap_level * 5,1,8);
hit_party(r1,DAMAGE_FIRE);
break;
case TRAP_DUMBFOUND:
case TRAP_DUMBFOUND:
add_string_to_buf(" You feel disoriented. ");
for(i = 0; i < 6; i++)
dumbfound_pc(i,2 + trap_level * 2);
@@ -199,7 +199,7 @@ bool run_trap(short pc_num,eTrapType trap_type,short trap_level,short diff)
default:
add_string_to_buf("ERROR: Invalid trap type."); // should never be reached
}
}
put_pc_screen();
put_item_screen(stat_window,0);
return true;