[code]void iexamine::safe(player *p, map *m, int examx, int examy)
{
if (!p->has_amount(“stethoscope”, 1)) {
add_msg(m_info, _(“You need a stethoscope for safecracking.”));
return;
}
if (query_yn(_("Attempt to crack the safe?"))) {
bool success = true;
if (p->is_deaf()) {
add_msg(m_info, _("You can't crack a safe while deaf!"));
return;
}
if (success) {
m->furn_set(examx, examy, f_safe_o);
add_msg(m_good, _("You successfully crack the safe!"));
} else {
add_msg(_("The safe resists your attempt at cracking it."));
}
}
}
[/code]
What’s the point of having ELSE clause if it always successes?