1 #include "spell-realm/spells-arcane.h"
2 #include "inventory/inventory-slot-types.h"
3 #include "object/tval-types.h"
4 #include "sv-definition/sv-lite-types.h"
5 #include "system/item-entity.h"
6 #include "system/player-type-definition.h"
7 #include "system/redrawing-flags-updater.h"
8 #include "view/display-messages.h"
11 * @brief 寿命つき光源の燃素追加処理 /
12 * Charge a lite (torch or latern)
14 void phlogiston(PlayerType *player_ptr)
17 auto *o_ptr = &player_ptr->inventory_list[INVEN_LITE];
18 const auto &bi_key = o_ptr->bi_key;
19 if (bi_key == BaseitemKey(ItemKindType::LITE, SV_LITE_LANTERN)) {
21 } else if (bi_key == BaseitemKey(ItemKindType::LITE, SV_LITE_TORCH)) {
22 max_flog = FUEL_TORCH;
24 msg_print(_("燃素を消費するアイテムを装備していません。", "You are not wielding anything which uses phlogiston."));
28 if (o_ptr->fuel >= max_flog) {
29 msg_print(_("このアイテムにはこれ以上燃素を補充できません。", "No more phlogiston can be put in this item."));
33 o_ptr->fuel += max_flog / 2;
34 msg_print(_("照明用アイテムに燃素を補充した。", "You add phlogiston to your light."));
35 if (o_ptr->fuel >= max_flog) {
36 o_ptr->fuel = max_flog;
37 msg_print(_("照明用アイテムは満タンになった。", "Your light is full."));
40 RedrawingFlagsUpdater::get_instance().set_flag(StatusRedrawingFlag::TORCH);