<ClCompile Include="..\..\src\info-reader\race-reader.c" />\r
<ClCompile Include="..\..\src\info-reader\skill-reader.c" />\r
<ClCompile Include="..\..\src\info-reader\vault-reader.c" />\r
+ <ClCompile Include="..\..\src\lore\lore-util.c" />\r
<ClCompile Include="..\..\src\monster\monster-compaction.c" />\r
<ClCompile Include="..\..\src\monster\monster-death.c" />\r
<ClCompile Include="..\..\src\lore\lore-store.c" />\r
<ClInclude Include="..\..\src\info-reader\random-grid-effect-types.h" />\r
<ClInclude Include="..\..\src\info-reader\skill-reader.h" />\r
<ClInclude Include="..\..\src\info-reader\vault-reader.h" />\r
+ <ClInclude Include="..\..\src\lore\lore-util.h" />\r
<ClInclude Include="..\..\src\mind\drs-types.h" />\r
<ClInclude Include="..\..\src\mind\snipe-types.h" />\r
<ClInclude Include="..\..\src\monster\monster-compaction.h" />\r
<ClCompile Include="..\..\src\lore\monster-lore.c">
<Filter>lore</Filter>
</ClCompile>
+ <ClCompile Include="..\..\src\lore\lore-util.c">
+ <Filter>lore</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\cmd\cmd-basic.h">
<ClInclude Include="..\..\src\lore\monster-lore.h">
<Filter>lore</Filter>
</ClInclude>
+ <ClInclude Include="..\..\src\lore\lore-util.h">
+ <Filter>lore</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\..\src\wall.bmp" />
\
locale/japanese.c locale/japanese.h locale/english.c locale/english.h \
\
+ lore/lore-store.c lore/lore-store.h \
+ lore/lore-util.c lore/lore-util.h \
+ lore/monster-lore.c lore/monster-lore.h \
+ \
main.c main-x11.c main-gcu.c \
\
main/music-definitions-table.c main/music-definitions-table.h \
monster-attack/monster-attack-util.c monster-attack/monster-attack-util.h \
monster-attack/monster-eating.c monster-attack/monster-eating.h \
\
- lore/lore-store.c lore/lore-store.h \
- lore/monster-lore.c lore/monster-lore.h \
- \
monster-race/monster-race.c monster-race/monster-race.h \
monster-race/monster-race-hook.c monster-race/monster-race-hook.h \
monster-race/race-flags-resistance.h \
--- /dev/null
+#include "lore/lore-util.h"
+
+lore_type *initialize_lore_type(lore_type *lore_ptr, MONRACE_IDX r_idx, BIT_FLAGS mode)
+{
+ lore_ptr->nightmare = ironman_nightmare && !(mode & 0x02);
+ lore_ptr->r_ptr = &r_info[r_idx];
+ lore_ptr->speed = lore_ptr->nightmare ? lore_ptr->r_ptr->speed + 5 : lore_ptr->r_ptr->speed;
+ lore_ptr->drop_gold = lore_ptr->r_ptr->r_drop_gold;
+ lore_ptr->drop_item = lore_ptr->r_ptr->r_drop_item;
+ lore_ptr->flags1 = (lore_ptr->r_ptr->flags1 & lore_ptr->r_ptr->r_flags1);
+ lore_ptr->flags2 = (lore_ptr->r_ptr->flags2 & lore_ptr->r_ptr->r_flags2);
+ lore_ptr->flags3 = (lore_ptr->r_ptr->flags3 & lore_ptr->r_ptr->r_flags3);
+ lore_ptr->flags4 = (lore_ptr->r_ptr->flags4 & lore_ptr->r_ptr->r_flags4);
+ lore_ptr->a_ability_flags1 = (lore_ptr->r_ptr->a_ability_flags1 & lore_ptr->r_ptr->r_flags5);
+ lore_ptr->a_ability_flags2 = (lore_ptr->r_ptr->a_ability_flags2 & lore_ptr->r_ptr->r_flags6);
+ lore_ptr->flags7 = (lore_ptr->r_ptr->flags7 & lore_ptr->r_ptr->flags7);
+ lore_ptr->flagsr = (lore_ptr->r_ptr->flagsr & lore_ptr->r_ptr->r_flagsr);
+ lore_ptr->reinforce = FALSE;
+ return lore_ptr;
+}
--- /dev/null
+#pragma once
+
+#include "system/angband.h"
+#include "monster-race/monster-race.h"
+
+typedef struct lore_type {
+#ifdef JP
+ char jverb_buf[64];
+#else
+ bool sin = FALSE;
+#endif
+ bool nightmare;
+ monster_race *r_ptr;
+ SPEED speed;
+ ITEM_NUMBER drop_gold;
+ ITEM_NUMBER drop_item;
+ BIT_FLAGS flags1;
+ BIT_FLAGS flags2;
+ BIT_FLAGS flags3;
+ BIT_FLAGS flags4;
+ BIT_FLAGS a_ability_flags1;
+ BIT_FLAGS a_ability_flags2;
+ BIT_FLAGS flags7;
+ BIT_FLAGS flagsr;
+ bool reinforce;
+} lore_type;
+
+lore_type *initialize_lore_type(lore_type *lore_ptr, MONRACE_IDX r_idx, BIT_FLAGS mode);