OSDN Git Service

Merge pull request #3569 from sikabane-works/release/3.0.0.88-alpha
[hengbandforosx/hengbandosx.git] / src / specific-object / muramasa.cpp
1 #include "specific-object/muramasa.h"
2 #include "artifact/fixed-art-types.h"
3 #include "core/asking-player.h"
4 #include "spell/spells-object.h"
5 #include "status/base-status.h"
6 #include "system/item-entity.h"
7 #include "system/player-type-definition.h"
8 #include "view/display-messages.h"
9
10 bool activate_muramasa(PlayerType *player_ptr, ItemEntity *o_ptr)
11 {
12     if (!o_ptr->is_specific_artifact(FixedArtifactId::MURAMASA)) {
13         return false;
14     }
15
16     if (!input_check(_("本当に使いますか?", "Are you sure?! "))) {
17         return true;
18     }
19
20     msg_print(_("村正が震えた...", "The Muramasa pulsates..."));
21     do_inc_stat(player_ptr, A_STR);
22     if (one_in_(2)) {
23         msg_print(_("村正は壊れた!", "The Muramasa is destroyed!"));
24         curse_weapon_object(player_ptr, true, o_ptr);
25     }
26
27     return true;
28 }