/** * Main routine for very wet effects caused by weather. * Similar to generic_wet() but with more aggressive numbers. * @see fill_water_collectors * @see map::decay_fields_and_scent * @see player::drench */ void generic_very_wet(bool acid) { if ((!g->u.worn_with_flag("RAINPROOF") || one_in(50)) && (!g->u.weapon.has_flag("RAIN_PROTECT") || one_in(10)) && !g->u.has_trait("FEATHERS") && (g->u.warmth(bp_torso) * 4 / 5 + g->u.warmth(bp_head) / 5) < 60 && PLAYER_OUTSIDE) { if (g->u.weapon.has_flag("RAIN_PROTECT")) { // Umbrellas tend to protect one's head and torso pretty well g->u.drench(60 - ((g->u.warmth(bp_leg_l) + g->u.warmth(bp_leg_r)) * 2 / 5 + (g->u.warmth(bp_foot_l) + g->u.warmth(bp_foot_r)) / 10), mfb(bp_leg_l) | mfb(bp_leg_r), false ); } else { g->u.drench(60 - (g->u.warmth(bp_torso) * 4 / 5 + g->u.warmth(bp_head) / 5), mfb(bp_torso) | mfb(bp_arm_l) | mfb(bp_arm_r) | mfb(bp_head), false ); } } fill_water_collectors(8, acid); g->m.decay_fields_and_scent( 45 ); }
/** * Main routine for wet effects caused by weather. * Drenching the player is applied after checks against worn and held items. * * The warmth of armor is considered when determining how much drench happens. * * Note that this is not the only place where drenching can happen. For example, moving or swimming into water tiles will also cause drenching. * @see fill_water_collectors * @see map::decay_fields_and_scent * @see player::drench */ void generic_wet(bool acid) { if ((!g->u.worn_with_flag("RAINPROOF") || one_in(100)) && (!g->u.weapon.has_flag("RAIN_PROTECT") || one_in(20)) && !g->u.has_trait("FEATHERS") && (g->u.warmth(bp_torso) * 4 / 5 + g->u.warmth(bp_head) / 5) < 30 && PLAYER_OUTSIDE && one_in(2)) { if (g->u.weapon.has_flag("RAIN_PROTECT")) { // Umbrellas tend to protect one's head and torso pretty well g->u.drench(30 - (g->u.warmth(bp_leg_l) + (g->u.warmth(bp_leg_r)) * 2 / 5 + (g->u.warmth(bp_foot_l) + g->u.warmth(bp_foot_r)) / 10), mfb(bp_leg_l) | mfb(bp_leg_r)); } else { g->u.drench(30 - (g->u.warmth(bp_torso) * 4 / 5 + g->u.warmth(bp_head) / 5), mfb(bp_torso) | mfb(bp_arm_l) | mfb(bp_arm_r) | mfb(bp_head)); } } fill_water_collectors(4, acid); // fixme; consolidate drench and this. g->m.decay_fields_and_scent( 15 ); }
/** * Main routine for very wet effects caused by weather. * Similar to generic_wet() but with more aggressive numbers. */ void generic_very_wet( bool acid ) { fill_water_collectors( 8, acid ); g->m.decay_fields_and_scent( 45_turns ); wet_player( 60 ); }
/** * Main routine for wet effects caused by weather. */ void generic_wet( bool acid ) { fill_water_collectors( 4, acid ); g->m.decay_fields_and_scent( 15_turns ); wet_player( 30 ); }