return FALSE;
}
+static bool check_activation_conditions(player_type *user_ptr, ae_type *ae_ptr)
+{
+ if (!check_activation_success(ae_ptr))
+ return FALSE;
+
+ if (ae_ptr->o_ptr->timeout) {
+ msg_print(_("\82»\82ê\82Í\94÷\82©\82É\89¹\82ð\97§\82Ä\81A\8bP\82«\81A\8fÁ\82¦\82½...", "It whines, glows and fades..."));
+ return FALSE;
+ }
+
+ if (!ae_ptr->o_ptr->xtra4 && (ae_ptr->o_ptr->tval == TV_FLASK) && ((ae_ptr->o_ptr->sval == SV_LITE_TORCH) || (ae_ptr->o_ptr->sval == SV_LITE_LANTERN))) {
+ msg_print(_("\94R\97¿\82ª\82È\82¢\81B", "It has no fuel."));
+ free_turn(user_ptr);
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
/*!
* @brief \91\95\94õ\82ð\94\93®\82·\82é\83R\83}\83\93\83h\82Ì\83T\83u\83\8b\81[\83`\83\93 /
* Activate a wielded object. Wielded objects never stack.
return;
decide_activation_success(user_ptr, ae_ptr);
- if (!check_activation_success(ae_ptr))
+ if (!check_activation_conditions(user_ptr, ae_ptr))
return;
- if (ae_ptr->o_ptr->timeout) {
- msg_print(_("\82»\82ê\82Í\94÷\82©\82É\89¹\82ð\97§\82Ä\81A\8bP\82«\81A\8fÁ\82¦\82½...", "It whines, glows and fades..."));
- return;
- }
-
- if (!ae_ptr->o_ptr->xtra4 && (ae_ptr->o_ptr->tval == TV_FLASK) && ((ae_ptr->o_ptr->sval == SV_LITE_TORCH) || (ae_ptr->o_ptr->sval == SV_LITE_LANTERN))) {
- msg_print(_("\94R\97¿\82ª\82È\82¢\81B", "It has no fuel."));
- free_turn(user_ptr);
- return;
- }
-
msg_print(_("\8en\93®\82³\82¹\82½...", "You activate it..."));
sound(SOUND_ZAP);
if (activation_index(user_ptr, ae_ptr->o_ptr)) {