OSDN Git Service

[Refactor] #37353 phlogiston() to melee1.c.
authordeskull <deskull@users.sourceforge.jp>
Tue, 5 Mar 2019 14:18:00 +0000 (23:18 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Tue, 5 Mar 2019 14:18:00 +0000 (23:18 +0900)
src/externs.h
src/realm-arcane.c
src/spells-object.c
src/spells-object.h
src/spells3.c

index 5d0f85f..e2bfde9 100644 (file)
@@ -955,7 +955,6 @@ extern bool recall_player(player_type *creature_ptr, TIME_EFFECT turns);
 extern bool free_level_recall(player_type *creature_ptr);
 extern bool reset_recall(void);
 extern bool apply_disenchant(BIT_FLAGS mode);
-extern void phlogiston(void);
 extern void brand_weapon(int brand_type);
 extern void call_the_(void);
 extern void fetch(DIRECTION dir, WEIGHT wgt, bool require_los);
index b46eaac..92a9868 100644 (file)
@@ -1,10 +1,12 @@
 #include "angband.h"
 #include "cmd-spell.h"
-#include "spells-summon.h"
-#include "spells-status.h"
 #include "projection.h"
 #include "avatar.h"
+
 #include "spells-floor.h"
+#include "spells-object.h"
+#include "spells-summon.h"
+#include "spells-status.h"
 
 /*!
 * @brief 秘術領域魔法の各処理を行う
index 8db7b30..7e6687d 100644 (file)
@@ -872,4 +872,52 @@ void get_bloody_moon_flags(object_type *o_ptr)
        }
 }
 
+/*!
+ * @brief 寿命つき光源の燃素追加処理 /
+ * Charge a lite (torch or latern)
+ * @return なし
+ */
+void phlogiston(void)
+{
+       GAME_TURN max_flog = 0;
+       object_type * o_ptr = &inventory[INVEN_LITE];
+
+       /* It's a lamp */
+       if ((o_ptr->tval == TV_LITE) && (o_ptr->sval == SV_LITE_LANTERN))
+       {
+               max_flog = FUEL_LAMP;
+       }
+
+       /* It's a torch */
+       else if ((o_ptr->tval == TV_LITE) && (o_ptr->sval == SV_LITE_TORCH))
+       {
+               max_flog = FUEL_TORCH;
+       }
+
+       /* No torch to refill */
+       else
+       {
+               msg_print(_("燃素を消費するアイテムを装備していません。", "You are not wielding anything which uses phlogiston."));
+               return;
+       }
+
+       if (o_ptr->xtra4 >= max_flog)
+       {
+               msg_print(_("このアイテムにはこれ以上燃素を補充できません。", "No more phlogiston can be put in this item."));
+               return;
+       }
+
+       /* Refuel */
+       o_ptr->xtra4 += (XTRA16)(max_flog / 2);
+       msg_print(_("照明用アイテムに燃素を補充した。", "You add phlogiston to your light item."));
+
+       if (o_ptr->xtra4 >= max_flog)
+       {
+               o_ptr->xtra4 = (XTRA16)max_flog;
+               msg_print(_("照明用アイテムは満タンになった。", "Your light item is full."));
+       }
+
+       p_ptr->update |= (PU_TORCH);
+}
+
 
index 7d4c445..0fff322 100644 (file)
@@ -12,3 +12,5 @@ extern bool rustproof(void);
 extern bool brand_bolts(void);
 extern bool perilous_secrets(player_type *creature_ptr);
 extern void get_bloody_moon_flags(object_type *o_ptr);
+extern void phlogiston(void);
+
index 5ca0461..9cac278 100644 (file)
@@ -1093,56 +1093,6 @@ bool apply_disenchant(BIT_FLAGS mode)
 
 
 /*!
- * @brief 寿命つき光源の燃素追加処理 /
- * Charge a lite (torch or latern)
- * @return なし
- */
-void phlogiston(void)
-{
-       GAME_TURN max_flog = 0;
-       object_type * o_ptr = &inventory[INVEN_LITE];
-
-       /* It's a lamp */
-       if ((o_ptr->tval == TV_LITE) && (o_ptr->sval == SV_LITE_LANTERN))
-       {
-               max_flog = FUEL_LAMP;
-       }
-
-       /* It's a torch */
-       else if ((o_ptr->tval == TV_LITE) && (o_ptr->sval == SV_LITE_TORCH))
-       {
-               max_flog = FUEL_TORCH;
-       }
-
-       /* No torch to refill */
-       else
-       {
-               msg_print(_("燃素を消費するアイテムを装備していません。", "You are not wielding anything which uses phlogiston."));
-               return;
-       }
-
-       if (o_ptr->xtra4 >= max_flog)
-       {
-               msg_print(_("このアイテムにはこれ以上燃素を補充できません。", "No more phlogiston can be put in this item."));
-               return;
-       }
-
-       /* Refuel */
-       o_ptr->xtra4 += (XTRA16)(max_flog / 2);
-
-       msg_print(_("照明用アイテムに燃素を補充した。", "You add phlogiston to your light item."));
-
-       if (o_ptr->xtra4 >= max_flog)
-       {
-               o_ptr->xtra4 = (XTRA16)max_flog;
-               msg_print(_("照明用アイテムは満タンになった。", "Your light item is full."));
-       }
-
-       p_ptr->update |= (PU_TORCH);
-}
-
-
-/*!
  * @brief 武器へのエゴ付加処理 /
  * Brand the current weapon
  * @param brand_type エゴ化ID(e_info.txtとは連動していない)