1 #include "specific-object/bloody-moon.h"
2 #include "artifact/fixed-art-types.h"
3 #include "core/player-update-types.h"
4 #include "object-enchant/object-boost.h"
5 #include "object-enchant/tr-types.h"
6 #include "racial/racial-android.h"
7 #include "system/artifact-type-definition.h"
8 #include "system/object-type-definition.h"
9 #include "util/bit-flags-calculator.h"
10 #include "view/display-messages.h"
13 * @brief 固定アーティファクト『ブラッディムーン』の特性を変更する。
14 * @details スレイ2d2種、及びone_resistance()による耐性1d2種、pval2種を得る。
15 * @param o_ptr 対象のオブジェクト構造体 (ブラッディムーン)のポインタ
18 void get_bloody_moon_flags(object_type *o_ptr)
20 for (int i = 0; i < TR_FLAG_SIZE; i++)
21 o_ptr->art_flags[i] = a_info[ART_BLOOD].flags[i];
23 int dummy = randint1(2) + randint1(2);
24 for (int i = 0; i < dummy; i++) {
25 int flag = randint0(26);
27 add_flag(o_ptr->art_flags, TR_KILL_UNDEAD + flag - 20);
29 add_flag(o_ptr->art_flags, TR_KILL_ANIMAL);
31 add_flag(o_ptr->art_flags, TR_SLAY_HUMAN);
33 add_flag(o_ptr->art_flags, TR_CHAOTIC + flag);
37 for (int i = 0; i < dummy; i++)
38 one_resistance(o_ptr);
40 for (int i = 0; i < 2; i++) {
41 int tmp = randint0(11);
43 add_flag(o_ptr->art_flags, TR_STR + tmp);
45 add_flag(o_ptr->art_flags, TR_STEALTH + tmp - 6);
50 * @brief Let's dance a RONDO!!
51 * @param user_ptr プレーヤーへの参照ポインタ
52 * @param o_ptr ブラッディ・ムーンへの参照ポインタ
53 * @return オブジェクト情報に異常がない限りTRUE
55 bool activate_bloody_moon(player_type *user_ptr, object_type *o_ptr)
57 if (o_ptr->name1 != ART_BLOOD)
60 msg_print(_("鎌が明るく輝いた...", "Your scythe glows brightly!"));
61 get_bloody_moon_flags(o_ptr);
62 if (user_ptr->prace == RACE_ANDROID)
63 calc_android_exp(user_ptr);
65 user_ptr->update |= PU_BONUS | PU_HP;