1 #include "spell-realm/spells-arcane.h"
2 #include "core/player-update-types.h"
3 #include "inventory/inventory-slot-types.h"
4 #include "sv-definition/sv-lite-types.h"
5 #include "system/object-type-definition.h"
6 #include "system/player-type-definition.h"
7 #include "view/display-messages.h"
10 * @brief 寿命つき光源の燃素追加処理 /
11 * Charge a lite (torch or latern)
13 void phlogiston(player_type *player_ptr)
15 GAME_TURN max_flog = 0;
16 object_type *o_ptr = &player_ptr->inventory_list[INVEN_LITE];
17 if ((o_ptr->tval == ItemKindType::LITE) && (o_ptr->sval == SV_LITE_LANTERN))
19 else if ((o_ptr->tval == ItemKindType::LITE) && (o_ptr->sval == SV_LITE_TORCH))
20 max_flog = FUEL_TORCH;
22 msg_print(_("燃素を消費するアイテムを装備していません。", "You are not wielding anything which uses phlogiston."));
26 if (o_ptr->xtra4 >= max_flog) {
27 msg_print(_("このアイテムにはこれ以上燃素を補充できません。", "No more phlogiston can be put in this item."));
31 o_ptr->xtra4 += (XTRA16)(max_flog / 2);
32 msg_print(_("照明用アイテムに燃素を補充した。", "You add phlogiston to your light."));
33 if (o_ptr->xtra4 >= max_flog) {
34 o_ptr->xtra4 = (XTRA16)max_flog;
35 msg_print(_("照明用アイテムは満タンになった。", "Your light is full."));
38 player_ptr->update |= PU_TORCH;