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 "system/player-type-definition.h"
10 #include "util/bit-flags-calculator.h"
11 #include "view/display-messages.h"
14 * @brief 固定アーティファクト『ブラッディムーン』の特性を変更する。
15 * @details スレイ2d2種、及びone_resistance()による耐性1d2種、pval2種を得る。
16 * @param o_ptr 対象のオブジェクト構造体 (ブラッディムーン)のポインタ
18 void get_bloody_moon_flags(object_type *o_ptr)
20 o_ptr->art_flags = a_info[ART_BLOOD].flags;
22 int dummy = randint1(2) + randint1(2);
23 for (int i = 0; i < dummy; i++) {
24 int flag = randint0(26);
26 o_ptr->art_flags.set(TR_KILL_UNDEAD + flag - 20);
28 o_ptr->art_flags.set(TR_KILL_ANIMAL);
30 o_ptr->art_flags.set(TR_SLAY_HUMAN);
32 o_ptr->art_flags.set(TR_CHAOTIC + flag);
36 for (int i = 0; i < dummy; i++)
37 one_resistance(o_ptr);
39 for (int i = 0; i < 2; i++) {
40 int tmp = randint0(11);
42 o_ptr->art_flags.set(TR_STR + tmp);
44 o_ptr->art_flags.set(TR_STEALTH + tmp - 6);
49 * @brief Let's dance a RONDO!!
50 * @param player_ptr プレイヤーへの参照ポインタ
51 * @param o_ptr ブラッディ・ムーンへの参照ポインタ
52 * @return オブジェクト情報に異常がない限りTRUE
54 bool activate_bloody_moon(player_type *player_ptr, object_type *o_ptr)
56 if (o_ptr->name1 != ART_BLOOD)
59 msg_print(_("鎌が明るく輝いた...", "Your scythe glows brightly!"));
60 get_bloody_moon_flags(o_ptr);
61 if (player_ptr->prace == PlayerRaceType::ANDROID)
62 calc_android_exp(player_ptr);
64 player_ptr->update |= PU_BONUS | PU_HP;