// Bionic "Internal Climate Control" says it is effective from 0F to 140F, these are the corresponding bodytemp values
if (u.has_bionic(bio_climate) && temperature > 0 && temperature < 140)
temp_conv = (9*BODYTEMP_NORM + temp_conv)/10; // Bionic "eases" the effects
// Bionic "Thermal Dissapation" says it prevents fire damage up to 2000F. 500 is picked at random...
if (u.has_bionic(bio_heatsink) && blister_count < 500)
blister_count = 0;
// Skin gets blisters from intense heat exposure.
if (blister_count - 10*u.resist(body_part(i)) > 20) u.add_disease(dis_type(blister_pen), 1, this);
// Increments current body temperature towards convergant.
int temp_difference = u.temp_cur[i] - temp_conv;
int temp_before = u.temp_cur[i];
// Bodytemp equalization code
if (i == bp_torso){u.temp_equalizer(bp_torso, bp_arms); u.temp_equalizer(bp_torso, bp_legs); u.temp_equalizer(bp_torso, bp_head);}
elseif (i == bp_head) {u.temp_equalizer(bp_head, bp_eyes); u.temp_equalizer(bp_head, bp_mouth);}
elseif (i == bp_arms) u.temp_equalizer(bp_arms, bp_hands);
elseif (i == bp_legs) u.temp_equalizer(bp_legs, bp_feet);
if (u.temp_cur[i] != temp_conv) u.temp_cur[i] = temp_difference*exp(-0.002) + temp_conv; // It takes half an hour for bodytemp to converge half way to its convergeance point (think half-life)
elseif (u.temp_cur[i] < BODYTEMP_COLD) {u.add_disease(dis_type(cold_pen), 1, this, 1, 3); u.frostbite_timer[i] += 1;} // Frostbite timer does not go down if you are still cold.
elseif (u.temp_cur[i] > BODYTEMP_SCORCHING) {u.add_disease(dis_type(hot_pen), 1, this, 3, 3); } // If body temp rises over 15000, disease.cpp (DI_HOT_HEAD) acts weird and the player will die
// Morale penalties : a negative morale_pen means the player is cold
// Intensity multiplier is negative for cold, positive for hot
int intensity_mult = -u.disease_intensity(dis_type(cold_pen)) + u.disease_intensity(dis_type(hot_pen));
if (u.has_disease(dis_type(cold_pen)) > 0 || u.has_disease(dis_type(hot_pen)) > 0) {
switch (i) {
case bp_head :
case bp_torso :
case bp_mouth : morale_pen += 2*intensity_mult;
case bp_arms :
case bp_legs : morale_pen += 1*intensity_mult;
case bp_hands:
case bp_feet : morale_pen += 1*intensity_mult;
}
}
// Frostbite (level 1 after 2 hours, level 2 after 4 hours)
if (u.frostbite_timer[i] > 0) u.frostbite_timer[i]--;
if (u.frostbite_timer[i] >= 240) {
if (u.disease_intensity(dis_type(frost_pen)) < 2 && i == bp_mouth) add_msg("Your %s hardens from the frostbite!", body_part_name(body_part(i), -1).c_str());
elseif (u.disease_intensity(dis_type(frost_pen)) < 2 && (i == bp_hands || i == bp_feet)) add_msg("Your %s harden from the frostbite!", body_part_name(body_part(i), -1).c_str());
if (temp_before > BODYTEMP_FREEZING && temp_after < BODYTEMP_FREEZING) add_msg("You feel your %s beginning to go numb from the cold!", body_part_name(body_part(i), -1).c_str());
elseif (temp_before > BODYTEMP_VERY_COLD && temp_after < BODYTEMP_VERY_COLD) add_msg("You feel your %s getting very cold.", body_part_name(body_part(i), -1).c_str());
elseif (temp_before < BODYTEMP_SCORCHING && temp_after > BODYTEMP_SCORCHING) add_msg("You feel your %s getting red hot from the heat!", body_part_name(body_part(i), -1).c_str());
elseif (temp_before < BODYTEMP_VERY_HOT && temp_after > BODYTEMP_VERY_HOT) add_msg("You feel your %s getting very hot.", body_part_name(body_part(i), -1).c_str());
case OPT_DELETE_WORLD: return"Delete saves upon player death\n0 - no\n1 - yes\n2 - query";
case OPT_INITIAL_POINTS: return"Initial points available on character\ngeneration. Default is 6";
case OPT_INITIAL_TIME: return"Initial starting time of day on character\ngeneration. Default is 8:00";
case OPT_VIEWPORT_X: return"Set the expansion of the viewport along\nthe X axis. Must restart for changes\nto take effect. Default is 12";
case OPT_VIEWPORT_Y: return"Set the expansion of the viewport along\nthe Y axis. Must restart for changes\nto take effect. Default is 12";
case OPT_VIEWPORT_X: return"WINDOWS ONLY: Set the expansion of the viewport along\nthe X axis. Must restart for changes\nto take effect. Default is 12. POSIX\nsystems will use terminal size at startup.";
case OPT_VIEWPORT_Y: return"WINDOWS ONLY: Set the expansion of the viewport along\nthe Y axis. Must restart for changes\nto take effect. Default is 12. POSIX\nsystems will use terminal size at startup.";
case OPT_STATIC_SPAWN: return"Spawn zombies at game start instead of\nduring game. Must delete save directory\nafter changing for it to take effect.\nDefault is F";
// Bionic "Internal Climate Control" says it is effective from 0F to 140F, these are the corresponding bodytemp values
if (has_bionic(bio_climate) && g->temperature > 0 && g->temperature < 140)
temp_conv = (9*BODYTEMP_NORM + temp_conv)/10; // Bionic "eases" the effects
// Bionic "Thermal Dissapation" says it prevents fire damage up to 2000F. 500 is picked at random...
if (has_bionic(bio_heatsink) && blister_count < 500)
blister_count = 0;
// Skin gets blisters from intense heat exposure.
if (blister_count - 10*resist(body_part(i)) > 20) add_disease(dis_type(blister_pen), 1, g);
// Increments current body temperature towards convergant.
int temp_difference = temp_cur[i] - temp_conv;
int temp_before = temp_cur[i];
// Bodytemp equalization code
if (i == bp_torso){temp_equalizer(bp_torso, bp_arms); temp_equalizer(bp_torso, bp_legs); temp_equalizer(bp_torso, bp_head);}
else if (i == bp_head) {temp_equalizer(bp_head, bp_eyes); temp_equalizer(bp_head, bp_mouth);}
else if (i == bp_arms) temp_equalizer(bp_arms, bp_hands);
else if (i == bp_legs) temp_equalizer(bp_legs, bp_feet);
if (temp_cur[i] != temp_conv) temp_cur[i] = temp_difference*exp(-0.002) + temp_conv; // It takes half an hour for bodytemp to converge half way to its convergeance point (think half-life)
else if (temp_cur[i] < BODYTEMP_COLD) {add_disease(dis_type(cold_pen), 1, g, 1, 3); frostbite_timer[i] += 1;} // Frostbite timer does not go down if you are still cold.
else if (temp_cur[i] > BODYTEMP_SCORCHING) {add_disease(dis_type(hot_pen), 1, g, 3, 3); } // If body temp rises over 15000, disease.cpp (DI_HOT_HEAD) acts weird and the player will die
// Morale penalties : a negative morale_pen means the player is cold
// Intensity multiplier is negative for cold, positive for hot
int intensity_mult = -disease_intensity(dis_type(cold_pen)) + disease_intensity(dis_type(hot_pen));
if (has_disease(dis_type(cold_pen)) > 0 || has_disease(dis_type(hot_pen)) > 0) {
switch (i) {
case bp_head :
case bp_torso :
case bp_mouth : morale_pen += 2*intensity_mult;
case bp_arms :
case bp_legs : morale_pen += 1*intensity_mult;
case bp_hands:
case bp_feet : morale_pen += 1*intensity_mult;
}
}
// Frostbite (level 1 after 2 hours, level 2 after 4 hours)
if (frostbite_timer[i] > 0) frostbite_timer[i]--;
if (frostbite_timer[i] >= 240) {
if (disease_intensity(dis_type(frost_pen)) < 2 && i == bp_mouth) g->add_msg("Your %s hardens from the frostbite!", body_part_name(body_part(i), -1).c_str());
else if (disease_intensity(dis_type(frost_pen)) < 2 && (i == bp_hands || i == bp_feet)) g->add_msg("Your %s harden from the frostbite!", body_part_name(body_part(i), -1).c_str());
add_disease(dis_type(frost_pen), 1, g, 2, 2);}
else if (frostbite_timer[i] >= 120) {
if (!has_disease(dis_type(frost_pen))) g->add_msg("You lose sensation in your %s.", body_part_name(body_part(i), -1).c_str());
add_disease(dis_type(frost_pen), 1, g, 1, 2);}
// Warn the player if condition worsens
if (temp_before > BODYTEMP_FREEZING && temp_after < BODYTEMP_FREEZING) g->add_msg("You feel your %s beginning to go numb from the cold!", body_part_name(body_part(i), -1).c_str());
else if (temp_before > BODYTEMP_VERY_COLD && temp_after < BODYTEMP_VERY_COLD) g->add_msg("You feel your %s getting very cold.", body_part_name(body_part(i), -1).c_str());
else if (temp_before > BODYTEMP_COLD && temp_after < BODYTEMP_COLD) g->add_msg("You feel your %s getting cold.", body_part_name(body_part(i), -1).c_str());
else if (temp_before < BODYTEMP_SCORCHING && temp_after > BODYTEMP_SCORCHING) g->add_msg("You feel your %s getting red hot from the heat!", body_part_name(body_part(i), -1).c_str());
else if (temp_before < BODYTEMP_VERY_HOT && temp_after > BODYTEMP_VERY_HOT) g->add_msg("You feel your %s getting very hot.", body_part_name(body_part(i), -1).c_str());
else if (temp_before < BODYTEMP_HOT && temp_after > BODYTEMP_HOT) g->add_msg("You feel your %s getting hot.", body_part_name(body_part(i), -1).c_str());
}
// Morale penalties, updated at the same rate morale is