#include "action/activation-execution.h"
#include "action/action-limited.h"
+#include "art-definition/random-art-effects.h"
#include "artifact/artifact-info.h"
#include "core/window-redrawer.h"
#include "effect/spells-effect-util.h"
#include "spell-realm/spells-hex.h"
#include "spell/spell-types.h"
#include "sv-definition/sv-lite-types.h"
+#include "sv-definition/sv-ring-types.h"
#include "system/artifact-type-definition.h"
#include "system/floor-type-definition.h"
#include "system/monster-type-definition.h"
return TRUE;
}
+/*!
+ * @brief \83A\83C\83e\83\80\82Ì\94\93®\8cø\89Ê\82ð\8f\88\97\9d\82·\82é\81B
+ * @param user_ptr \83v\83\8c\81[\83\84\81[\82Ö\82Ì\8eQ\8fÆ\83|\83C\83\93\83^
+ * @param o_ptr \91Î\8fÛ\82Ì\83I\83u\83W\83F\83N\83g\8d\\91¢\91Ì\83|\83C\83\93\83^
+ * @return \94\93®\8eÀ\8ds\82Ì\90¥\94ñ\82ð\95Ô\82·\81B
+ */
+static bool activate_artifact(player_type *user_ptr, object_type *o_ptr)
+{
+ concptr name = k_name + k_info[o_ptr->k_idx].name;
+ const activation_type *const act_ptr = find_activation_info(user_ptr, o_ptr);
+ if (!act_ptr) {
+ msg_print("Activation information is not found.");
+ return FALSE;
+ }
+
+ if (!switch_activation(user_ptr, o_ptr, act_ptr, name))
+ return FALSE;
+
+ if (act_ptr->timeout.constant >= 0) {
+ o_ptr->timeout = (s16b)act_ptr->timeout.constant;
+ if (act_ptr->timeout.dice > 0)
+ o_ptr->timeout += randint1(act_ptr->timeout.dice);
+
+ return TRUE;
+ }
+
+ switch (act_ptr->index) {
+ case ACT_BR_FIRE:
+ o_ptr->timeout = ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_FLAMES)) ? 200 : 250;
+ return TRUE;
+ case ACT_BR_COLD:
+ o_ptr->timeout = ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_ICE)) ? 200 : 250;
+ return TRUE;
+ case ACT_TERROR:
+ o_ptr->timeout = 3 * (user_ptr->lev + 10);
+ return TRUE;
+ case ACT_MURAMASA:
+ return TRUE;
+ default:
+ msg_format("Special timeout is not implemented: %d.", act_ptr->index);
+ return FALSE;
+ }
+}
+
static bool activate_whistle(player_type *user_ptr, ae_type *ae_ptr)
{
if (ae_ptr->o_ptr->tval != TV_WHISTLE)
return FALSE;
}
}
-
-/*!
- * @brief アイテムの発動効果を処理する。
- * @param user_ptr プレーヤーへの参照ポインタ
- * @param o_ptr 対象のオブジェクト構造体ポインタ
- * @return 発動実行の是非を返す。
- */
-bool activate_artifact(player_type *user_ptr, object_type *o_ptr)
-{
- concptr name = k_name + k_info[o_ptr->k_idx].name;
- const activation_type *const act_ptr = find_activation_info(user_ptr, o_ptr);
- if (!act_ptr) {
- msg_print("Activation information is not found.");
- return FALSE;
- }
-
- if (!switch_activation(user_ptr, o_ptr, act_ptr, name))
- return FALSE;
-
- if (act_ptr->timeout.constant >= 0) {
- o_ptr->timeout = (s16b)act_ptr->timeout.constant;
- if (act_ptr->timeout.dice > 0)
- o_ptr->timeout += randint1(act_ptr->timeout.dice);
-
- return TRUE;
- }
-
- switch (act_ptr->index) {
- case ACT_BR_FIRE:
- o_ptr->timeout = ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_FLAMES)) ? 200 : 250;
- return TRUE;
- case ACT_BR_COLD:
- o_ptr->timeout = ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_ICE)) ? 200 : 250;
- return TRUE;
- case ACT_TERROR:
- o_ptr->timeout = 3 * (user_ptr->lev + 10);
- return TRUE;
- case ACT_MURAMASA:
- return TRUE;
- default:
- msg_format("Special timeout is not implemented: %d.", act_ptr->index);
- return FALSE;
- }
-}