<ClCompile Include="..\..\src\mind\mind-power-getter.c" />\r
<ClCompile Include="..\..\src\mind\mind-priest.c" />\r
<ClCompile Include="..\..\src\mind\mind-weaponsmith.c" />\r
+ <ClCompile Include="..\..\src\monster-floor\monster-death-util.c" />\r
<ClCompile Include="..\..\src\monster-floor\monster-lite-util.c" />\r
<ClCompile Include="..\..\src\monster-floor\monster-lite.c" />\r
<ClCompile Include="..\..\src\monster\monster-status-setter.c" />\r
<ClInclude Include="..\..\src\mind\mind-priest.h" />\r
<ClInclude Include="..\..\src\mind\mind-types.h" />\r
<ClInclude Include="..\..\src\mind\mind-weaponsmith.h" />\r
+ <ClInclude Include="..\..\src\monster-floor\monster-death-util.h" />\r
<ClInclude Include="..\..\src\monster-floor\monster-lite-util.h" />\r
<ClInclude Include="..\..\src\monster-floor\monster-lite.h" />\r
<ClInclude Include="..\..\src\monster\monster-status-setter.h" />\r
<ClCompile Include="..\..\src\mind\mind-hobbit.c">
<Filter>mind</Filter>
</ClCompile>
+ <ClCompile Include="..\..\src\monster-floor\monster-death-util.c">
+ <Filter>monster-floor</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\combat\shoot.h">
<ClInclude Include="..\..\src\mind\mind-hobbit.h">
<Filter>mind</Filter>
</ClInclude>
+ <ClInclude Include="..\..\src\monster-floor\monster-death-util.h">
+ <Filter>monster-floor</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\..\src\wall.bmp" />
monster-attack/monster-eating.c monster-attack/monster-eating.h \
\
monster-floor/monster-death.c monster-floor/monster-death.h \
+ monster-floor/monster-death-util.c monster-floor/monster-death-util.h \
monster-floor/monster-direction.c monster-floor/monster-direction.h \
monster-floor/monster-dist-offsets.c monster-floor/monster-dist-offsets.h \
monster-floor/monster-generator.c monster-floor/monster-generator.h \
--- /dev/null
+#include "monster-floor/monster-death-util.h"
+#include "monster-race/monster-race.h"
+#include "monster-race/race-flags1.h"
+#include "monster-race/race-indice-types.h"
+#include "monster/monster-info.h"
+#include "monster/smart-learn-types.h"
+#include "system/floor-type-definition.h"
+#include "system/monster-type-definition.h"
+
+/*!
+ * @brief \83\82\83\93\83X\83^\81[\82ð\93|\82µ\82½\8dÛ\82Ì\8dà\95ósval\82ð\95Ô\82·
+ * @param r_idx \93|\82µ\82½\83\82\83\93\83X\83^\81[\82Ì\8eí\91°ID
+ * @return \8dà\95ó\82Ìsval
+ * @details
+ * Hack -- Return the "automatic coin type" of a monster race
+ * Used to allocate proper treasure when "Creeping coins" die
+ * Note the use of actual "monster names"
+ */
+static OBJECT_SUBTYPE_VALUE get_coin_type(MONRACE_IDX r_idx)
+{
+ switch (r_idx) {
+ case MON_COPPER_COINS:
+ return 2;
+ case MON_SILVER_COINS:
+ return 5;
+ case MON_GOLD_COINS:
+ return 10;
+ case MON_MITHRIL_COINS:
+ case MON_MITHRIL_GOLEM:
+ return 16;
+ case MON_ADAMANT_COINS:
+ return 17;
+ }
+
+ return MON_PLAYER;
+}
+
+monster_death_type *initialize_monster_death_type(player_type *player_ptr, monster_death_type *md_ptr, MONSTER_IDX m_idx, bool drop_item)
+{
+ floor_type *floor_ptr = player_ptr->current_floor_ptr;
+ md_ptr->m_ptr = &floor_ptr->m_list[m_idx];
+ md_ptr->r_ptr = &r_info[md_ptr->m_ptr->r_idx];
+ md_ptr->do_gold = (!(md_ptr->r_ptr->flags1 & RF1_ONLY_ITEM));
+ md_ptr->do_item = (!(md_ptr->r_ptr->flags1 & RF1_ONLY_GOLD));
+ md_ptr->cloned = (md_ptr->m_ptr->smart & SM_CLONED) ? TRUE : FALSE;
+ md_ptr->force_coin = get_coin_type(md_ptr->m_ptr->r_idx);
+ md_ptr->drop_chosen_item = drop_item && !md_ptr->cloned && !floor_ptr->inside_arena && !player_ptr->phase_out && !is_pet(md_ptr->m_ptr);
+ return md_ptr;
+}
--- /dev/null
+#pragma once
+
+#include "system/angband.h"
+
+typedef struct monster_type monster_type;
+typedef struct monster_race monster_race;
+typedef struct monster_death_type {
+ monster_type *m_ptr;
+ monster_race *r_ptr;
+ bool do_gold;
+ bool do_item;
+ bool cloned;
+ int force_coin;
+ bool drop_chosen_item;
+ POSITION md_y;
+ POSITION md_x;
+} monster_death_type;
+
+monster_death_type *initialize_monster_death_type(player_type *player_ptr, monster_death_type *md_ptr, MONSTER_IDX m_idx, bool drop_item);
#include "main/music-definitions-table.h"
#include "main/sound-of-music.h"
#include "market/arena-info-table.h"
+#include "monster-floor/monster-death-util.h"
#include "monster-floor/monster-object.h"
#include "monster-floor/monster-summon.h"
#include "monster-floor/place-monster-types.h"
#include "view/display-messages.h"
#include "world/world.h"
-typedef struct monster_death_type {
- monster_type *m_ptr;
- monster_race *r_ptr;
- bool do_gold;
- bool do_item;
- bool cloned;
- int force_coin;
- bool drop_chosen_item;
- POSITION md_y;
- POSITION md_x;
-} monster_death_type;
-
-monster_death_type *initialize_monster_death_type(player_type *player_ptr, monster_death_type *md_ptr, MONSTER_IDX m_idx, bool drop_item)
-{
- floor_type *floor_ptr = player_ptr->current_floor_ptr;
- md_ptr->m_ptr = &floor_ptr->m_list[m_idx];
- md_ptr->r_ptr = &r_info[md_ptr->m_ptr->r_idx];
- md_ptr->do_gold = (!(md_ptr->r_ptr->flags1 & RF1_ONLY_ITEM));
- md_ptr->do_item = (!(md_ptr->r_ptr->flags1 & RF1_ONLY_GOLD));
- md_ptr->cloned = (md_ptr->m_ptr->smart & SM_CLONED) ? TRUE : FALSE;
- md_ptr->force_coin = get_coin_type(md_ptr->m_ptr->r_idx);
- md_ptr->drop_chosen_item = drop_item && !md_ptr->cloned && !floor_ptr->inside_arena && !player_ptr->phase_out && !is_pet(md_ptr->m_ptr);
- return md_ptr;
-}
-
-/*!
- * @brief モンスターを倒した際の財宝svalを返す
- * @param r_idx 倒したモンスターの種族ID
- * @return 財宝のsval
- * @details
- * Hack -- Return the "automatic coin type" of a monster race
- * Used to allocate proper treasure when "Creeping coins" die
- * Note the use of actual "monster names"
- */
-static OBJECT_SUBTYPE_VALUE get_coin_type(MONRACE_IDX r_idx)
-{
- switch (r_idx) {
- case MON_COPPER_COINS:
- return 2;
- case MON_SILVER_COINS:
- return 5;
- case MON_GOLD_COINS:
- return 10;
- case MON_MITHRIL_COINS:
- case MON_MITHRIL_GOLEM:
- return 16;
- case MON_ADAMANT_COINS:
- return 17;
- }
-
- return 0;
-}
-
/*!
* @brief モンスターが死亡した時の処理 /
* Handle the "death" of a monster.
#pragma once
typedef enum monster_race_type {
+ MON_PLAYER = 0, // Dummy.
MON_BEGGAR = 12,
MON_LEPER = 13,
MON_LION_HEART = 19,