<ClCompile Include="..\..\src\spell\spells-hex.c" />\r
<ClCompile Include="..\..\src\spell\spells-launcher.c" />\r
<ClCompile Include="..\..\src\spell\spells-lite.c" />\r
+ <ClCompile Include="..\..\src\spell\spells-pet.c" />\r
<ClCompile Include="..\..\src\spell\spells-sight.c" />\r
<ClCompile Include="..\..\src\spell\spells-staff-only.c" />\r
<ClCompile Include="..\..\src\spell\spells-teleport.c" />\r
<ClInclude Include="..\..\src\spell\spells-hex.h" />\r
<ClInclude Include="..\..\src\spell\spells-launcher.h" />\r
<ClInclude Include="..\..\src\spell\spells-lite.h" />\r
+ <ClInclude Include="..\..\src\spell\spells-pet.h" />\r
<ClInclude Include="..\..\src\spell\spells-sight.h" />\r
<ClInclude Include="..\..\src\spell\spells-staff-only.h" />\r
<ClInclude Include="..\..\src\spell\spells-teleport.h" />\r
<ClCompile Include="..\..\src\spell\spells-staff-only.c">
<Filter>spell</Filter>
</ClCompile>
+ <ClCompile Include="..\..\src\spell\spells-pet.c">
+ <Filter>spell</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\cmd\cmd-basic.h">
<ClInclude Include="..\..\src\spell\spells-staff-only.h">
<Filter>spell</Filter>
</ClInclude>
+ <ClInclude Include="..\..\src\spell\spells-pet.h">
+ <Filter>spell</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\..\src\wall.bmp" />
spell/spells-launcher.c spell/spells-launcher.h \
spell/spells-lite.c spell/spells-lite.h \
spell/spells-object.c spell/spells-object.h \
+ spell/spells-pet.c spell/spells-pet.h \
spell/spells-sight.c spell/spells-sight.h \
spell/spells-summon.c spell/spells-summon.h \
spell/spells-staff-only.c spell/spells-staff-only.h \
#include "spell/spells-floor.h"
#include "spell/spells-launcher.h"
#include "spell/spells-object.h"
+#include "spell/spells-pet.h"
#include "spell/spells-sight.h"
#include "spell/spells-status.h"
#include "spell/spells-summon.h"
--- /dev/null
+#include "spell/spells-pet.h"
+#include "effect/effect-characteristics.h"
+#include "floor/floor.h"
+#include "io/write-diary.h"
+#include "spell/process-effect.h"
+#include "spell/spells-type.h"
+
+/*!
+ * @brief ペット爆破処理 /
+ * @return なし
+ */
+void discharge_minion(player_type *caster_ptr)
+{
+ bool okay = TRUE;
+ for (MONSTER_IDX i = 1; i < caster_ptr->current_floor_ptr->m_max; i++) {
+ monster_type *m_ptr = &caster_ptr->current_floor_ptr->m_list[i];
+ if (!m_ptr->r_idx || !is_pet(m_ptr))
+ continue;
+ if (m_ptr->nickname)
+ okay = FALSE;
+ }
+
+ if (!okay || caster_ptr->riding) {
+ if (!get_check(_("本当に全ペットを爆破しますか?", "You will blast all pets. Are you sure? ")))
+ return;
+ }
+
+ for (MONSTER_IDX i = 1; i < caster_ptr->current_floor_ptr->m_max; i++) {
+ monster_type *m_ptr = &caster_ptr->current_floor_ptr->m_list[i];
+ if (!m_ptr->r_idx || !is_pet(m_ptr))
+ continue;
+
+ monster_race *r_ptr;
+ r_ptr = &r_info[m_ptr->r_idx];
+ if (r_ptr->flags1 & RF1_UNIQUE) {
+ GAME_TEXT m_name[MAX_NLEN];
+ monster_desc(caster_ptr, m_name, m_ptr, 0x00);
+ msg_format(_("%sは爆破されるのを嫌がり、勝手に自分の世界へと帰った。", "%^s resists being blasted and runs away."), m_name);
+ delete_monster_idx(caster_ptr, i);
+ continue;
+ }
+
+ HIT_POINT dam = m_ptr->maxhp / 2;
+ if (dam > 100)
+ dam = (dam - 100) / 2 + 100;
+ if (dam > 400)
+ dam = (dam - 400) / 2 + 400;
+ if (dam > 800)
+ dam = 800;
+ project(caster_ptr, i, 2 + (r_ptr->level / 20), m_ptr->fy, m_ptr->fx, dam, GF_PLASMA, PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL, -1);
+
+ if (record_named_pet && m_ptr->nickname) {
+ GAME_TEXT m_name[MAX_NLEN];
+
+ monster_desc(caster_ptr, m_name, m_ptr, MD_INDEF_VISIBLE);
+ exe_write_diary(caster_ptr, DIARY_NAMED_PET, RECORD_NAMED_PET_BLAST, m_name);
+ }
+
+ delete_monster_idx(caster_ptr, i);
+ }
+}
--- /dev/null
+#pragma once
+
+#include "system/angband.h"
+
+void discharge_minion(player_type *caster_ptr);
#include "world/world.h"
/*!
- * @brief ペット爆破処理 /
- * @return なし
- */
-void discharge_minion(player_type *caster_ptr)
-{
- bool okay = TRUE;
- for (MONSTER_IDX i = 1; i < caster_ptr->current_floor_ptr->m_max; i++)
- {
- monster_type *m_ptr = &caster_ptr->current_floor_ptr->m_list[i];
- if (!m_ptr->r_idx || !is_pet(m_ptr)) continue;
- if (m_ptr->nickname) okay = FALSE;
- }
-
- if (!okay || caster_ptr->riding)
- {
- if (!get_check(_("本当に全ペットを爆破しますか?", "You will blast all pets. Are you sure? ")))
- return;
- }
-
- for (MONSTER_IDX i = 1; i < caster_ptr->current_floor_ptr->m_max; i++)
- {
- monster_type *m_ptr = &caster_ptr->current_floor_ptr->m_list[i];
- if (!m_ptr->r_idx || !is_pet(m_ptr)) continue;
-
- monster_race *r_ptr;
- r_ptr = &r_info[m_ptr->r_idx];
- if (r_ptr->flags1 & RF1_UNIQUE)
- {
- GAME_TEXT m_name[MAX_NLEN];
- monster_desc(caster_ptr, m_name, m_ptr, 0x00);
- msg_format(_("%sは爆破されるのを嫌がり、勝手に自分の世界へと帰った。", "%^s resists being blasted and runs away."), m_name);
- delete_monster_idx(caster_ptr, i);
- continue;
- }
-
- HIT_POINT dam = m_ptr->maxhp / 2;
- if (dam > 100) dam = (dam - 100) / 2 + 100;
- if (dam > 400) dam = (dam - 400) / 2 + 400;
- if (dam > 800) dam = 800;
- project(caster_ptr, i, 2 + (r_ptr->level / 20), m_ptr->fy, m_ptr->fx, dam, GF_PLASMA,
- PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL, -1);
-
- if (record_named_pet && m_ptr->nickname)
- {
- GAME_TEXT m_name[MAX_NLEN];
-
- monster_desc(caster_ptr, m_name, m_ptr, MD_INDEF_VISIBLE);
- exe_write_diary(caster_ptr, DIARY_NAMED_PET, RECORD_NAMED_PET_BLAST, m_name);
- }
-
- delete_monster_idx(caster_ptr, i);
- }
-}
-
-
-/*!
* @brief 衰弱ボルト処理
* @param caster_ptr プレーヤーへの参照ポインタ
* @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
bool control_one_demon(player_type* caster_ptr, DIRECTION dir, PLAYER_LEVEL plev);
bool charm_animal(player_type* caster_ptr, DIRECTION dir, PLAYER_LEVEL plev);
bool eat_magic(player_type* caster_ptr, int power);
-void discharge_minion(player_type* caster_ptr);
void ring_of_power(player_type* caster_ptr, DIRECTION dir);
void wild_magic(player_type* caster_ptr, int spell);
void cast_meteor(player_type* caster_ptr, HIT_POINT dam, POSITION rad);