Exemplo n.º 1
0
void weather_effect::light_acid(game *g)
{
    generic_wet(g, true);
    if (int(g->turn) % 10 == 0 && PLAYER_OUTSIDE) {
        if (g->u.weapon.has_flag("RAIN_PROTECT") && one_in(2)) {
            g->add_msg(_("Your %s protects you from the acidic drizzle."), g->u.weapon.name.c_str());
        } else {
            if (g->u.is_wearing("coat_rain") && !one_in(3)) {
                g->add_msg(_("Your raincoat protects you from the acidic drizzle."));
            } else {
                bool has_helmet = false;
                if (g->u.is_wearing_power_armor(&has_helmet) && (has_helmet || !one_in(4))) {
                    g->add_msg(_("Your power armor protects you from the acidic drizzle."));
                } else {
                    g->add_msg(_("The acid rain stings, but is mostly harmless for now..."));
                    if (one_in(10) && (g->u.pain < 10)) {g->u.pain++;}
                }
            }
        }
    }
}
Exemplo n.º 2
0
/**
 * Acid drizzle.
 * Causes minor pain only.
 */
void weather_effect::light_acid()
{
    generic_wet(true);
    if( calendar::once_every(MINUTES(1)) && PLAYER_OUTSIDE ) {
        if (g->u.weapon.has_flag("RAIN_PROTECT") && !one_in(3)) {
            add_msg(_("Your %s protects you from the acidic drizzle."), g->u.weapon.tname().c_str());
        } else {
            if (g->u.worn_with_flag("RAINPROOF") && !one_in(4)) {
                add_msg(_("Your clothing protects you from the acidic drizzle."));
            } else {
                bool has_helmet = false;
                if (g->u.is_wearing_power_armor(&has_helmet) && (has_helmet || !one_in(4))) {
                    add_msg(_("Your power armor protects you from the acidic drizzle."));
                } else {
                    add_msg(m_warning, _("The acid rain stings, but is mostly harmless for now..."));
                    if (one_in(10) && (g->u.pain < 10)) {
                        g->u.mod_pain(1);
                    }
                }
            }
        }
    }
}
Exemplo n.º 3
0
void weather_effect::light_acid(game *g)
{
    generic_wet(g, true);
    if (int(g->turn) % 10 == 0 && PLAYER_OUTSIDE)
    {
        if (g->u.weapon.has_flag("RAIN_PROTECT") && one_in(2))
        {
            g->add_msg(_("Your umbrella protects you from the acidic drizzle."));
        }
        else
        {
            if (g->u.is_wearing("coat_rain") && !one_in(3))
            {
                g->add_msg(_("Your raincoat protects you from the acidic drizzle."));
            }
            else
            {
                g->add_msg(_("The acid rain stings, but is mostly harmless for now..."));
                if (one_in(10) && (g->u.pain < 10)) {g->u.pain++;}
            }
        }
    }
}
Exemplo n.º 4
0
/**
 * Wet.
 * @see generic_wet
 */
void weather_effect::wet()
{
    generic_wet(false);
}
Exemplo n.º 5
0
void weather_effect::wet(game *g)
{
    generic_wet(g, false);
}