<ClCompile Include="..\..\src\effect\effect-player-curse.c" />\r
<ClCompile Include="..\..\src\effect\effect-player-oldies.c" />\r
<ClCompile Include="..\..\src\effect\effect-player-resist-hurt.c" />\r
+ <ClCompile Include="..\..\src\effect\effect-player-spirit.c" />\r
<ClCompile Include="..\..\src\effect\effect-player-switcher.c" />\r
<ClCompile Include="..\..\src\effect\effect-player.c" />\r
<ClCompile Include="..\..\src\effect\spells-effect-util.c" />\r
<ClInclude Include="..\..\src\effect\effect-player-curse.h" />\r
<ClInclude Include="..\..\src\effect\effect-player-oldies.h" />\r
<ClInclude Include="..\..\src\effect\effect-player-resist-hurt.h" />\r
+ <ClInclude Include="..\..\src\effect\effect-player-spirit.h" />\r
<ClInclude Include="..\..\src\effect\effect-player-switcher.h" />\r
<ClInclude Include="..\..\src\effect\effect-player-util.h" />\r
<ClInclude Include="..\..\src\effect\effect-player.h" />\r
<ClCompile Include="..\..\src\effect\effect-player-curse.c">
<Filter>effect</Filter>
</ClCompile>
+ <ClCompile Include="..\..\src\effect\effect-player-spirit.c">
+ <Filter>effect</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\gamevalue.h" />
<ClInclude Include="..\..\src\effect\effect-player-curse.h">
<Filter>effect</Filter>
</ClInclude>
+ <ClInclude Include="..\..\src\effect\effect-player-spirit.h">
+ <Filter>effect</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\..\src\wall.bmp" />
effect/effect-player-resist-hurt.c effect/effect-player-resist-hurt.h \
effect/effect-player-oldies.c effect/effect-player-oldies.h \
effect/effect-player-curse.c effect/effect-player-curse.h \
+ effect/effect-player-spirit.c effect/effect-player-spirit.h \
effect/effect-player-switcher.c effect/effect-player-switcher.h \
\
spell/technic-info-table.c spell/technic-info-table.h \
--- /dev/null
+#include "angband.h"
+#include "effect/effect-player-util.h"
+#include "effect/effect-player-spirit.h"
+#include "monster-spell.h"
+#include "player-damage.h"
+#include "player-effects.h"
+#include "world.h"
+
+void effect_player_drain_mana(player_type *target_ptr,
+ effect_player_type *ep_ptr) {
+ if (CHECK_MULTISHADOW(target_ptr)) {
+ msg_print(_("攻撃は幻影に命中し、あなたには届かなかった。",
+ "The attack hits Shadow, but you are unharmed!"));
+ ep_ptr->dam = 0;
+ return;
+ }
+
+ if (target_ptr->csp == 0) {
+ ep_ptr->dam = 0;
+ return;
+ }
+
+ if (ep_ptr->who > 0)
+ msg_format(_("%^sに精神エネルギーを吸い取られてしまった!",
+ "%^s draws psychic energy from you!"),
+ ep_ptr->m_name);
+ else
+ msg_print(_("精神エネルギーを吸い取られてしまった!",
+ "Your psychic energy is drawn!"));
+
+ if (ep_ptr->dam >= target_ptr->csp) {
+ ep_ptr->dam = target_ptr->csp;
+ target_ptr->csp = 0;
+ target_ptr->csp_frac = 0;
+ } else {
+ target_ptr->csp -= ep_ptr->dam;
+ }
+
+ learn_spell(target_ptr, ep_ptr->monspell);
+ target_ptr->redraw |= (PR_MANA);
+ target_ptr->window |= (PW_PLAYER | PW_SPELL);
+
+ if ((ep_ptr->who <= 0) || (ep_ptr->m_ptr->hp >= ep_ptr->m_ptr->maxhp)) {
+ ep_ptr->dam = 0;
+ return;
+ }
+
+ ep_ptr->m_ptr->hp += ep_ptr->dam;
+ if (ep_ptr->m_ptr->hp > ep_ptr->m_ptr->maxhp)
+ ep_ptr->m_ptr->hp = ep_ptr->m_ptr->maxhp;
+
+ if (target_ptr->health_who == ep_ptr->who)
+ target_ptr->redraw |= (PR_HEALTH);
+ if (target_ptr->riding == ep_ptr->who)
+ target_ptr->redraw |= (PR_UHEALTH);
+
+ if (ep_ptr->m_ptr->ml) {
+ msg_format(_("%^sは気分が良さそうだ。", "%^s appears healthier."),
+ ep_ptr->m_name);
+ }
+
+ ep_ptr->dam = 0;
+}
+
+void effect_player_mind_blast(player_type *target_ptr,
+ effect_player_type *ep_ptr) {
+ if ((randint0(100 + ep_ptr->rlev / 2) < MAX(5, target_ptr->skill_sav)) &&
+ !CHECK_MULTISHADOW(target_ptr)) {
+ msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
+ learn_spell(target_ptr, ep_ptr->monspell);
+ return;
+ }
+
+ if (CHECK_MULTISHADOW(target_ptr)) {
+ ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam,
+ ep_ptr->killer, ep_ptr->monspell);
+ return;
+ }
+
+ msg_print(_("霊的エネルギーで精神が攻撃された。",
+ "Your mind is blasted by psionic energy."));
+ if (!target_ptr->resist_conf) {
+ (void)set_confused(target_ptr, target_ptr->confused + randint0(4) + 4);
+ }
+
+ if (!target_ptr->resist_chaos && one_in_(3)) {
+ (void)set_image(target_ptr, target_ptr->image + randint0(250) + 150);
+ }
+
+ target_ptr->csp -= 50;
+ if (target_ptr->csp < 0) {
+ target_ptr->csp = 0;
+ target_ptr->csp_frac = 0;
+ }
+
+ target_ptr->redraw |= PR_MANA;
+ ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam,
+ ep_ptr->killer, ep_ptr->monspell);
+}
+
+void effect_player_brain_smash(player_type *target_ptr,
+ effect_player_type *ep_ptr) {
+ if ((randint0(100 + ep_ptr->rlev / 2) < MAX(5, target_ptr->skill_sav)) &&
+ !CHECK_MULTISHADOW(target_ptr)) {
+ msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
+ learn_spell(target_ptr, ep_ptr->monspell);
+ return;
+ }
+
+ if (!CHECK_MULTISHADOW(target_ptr)) {
+ msg_print(_("霊的エネルギーで精神が攻撃された。",
+ "Your mind is blasted by psionic energy."));
+
+ target_ptr->csp -= 100;
+ if (target_ptr->csp < 0) {
+ target_ptr->csp = 0;
+ target_ptr->csp_frac = 0;
+ }
+ target_ptr->redraw |= PR_MANA;
+ }
+
+ ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam,
+ ep_ptr->killer, ep_ptr->monspell);
+ if (CHECK_MULTISHADOW(target_ptr))
+ return;
+
+ if (!target_ptr->resist_blind) {
+ (void)set_blind(target_ptr, target_ptr->blind + 8 + randint0(8));
+ }
+
+ if (!target_ptr->resist_conf) {
+ (void)set_confused(target_ptr, target_ptr->confused + randint0(4) + 4);
+ }
+
+ if (!target_ptr->free_act) {
+ (void)set_paralyzed(target_ptr, target_ptr->paralyzed + randint0(4) + 4);
+ }
+
+ (void)set_slow(target_ptr, target_ptr->slow + randint0(4) + 4, FALSE);
+
+ while (randint0(100 + ep_ptr->rlev / 2) > (MAX(5, target_ptr->skill_sav)))
+ (void)do_dec_stat(target_ptr, A_INT);
+ while (randint0(100 + ep_ptr->rlev / 2) > (MAX(5, target_ptr->skill_sav)))
+ (void)do_dec_stat(target_ptr, A_WIS);
+
+ if (!target_ptr->resist_chaos) {
+ (void)set_image(target_ptr, target_ptr->image + randint0(250) + 150);
+ }
+}
--- /dev/null
+#pragma once
+
+void effect_player_drain_mana(player_type *target_ptr, effect_player_type *ep_ptr);
+void effect_player_mind_blast(player_type *target_ptr, effect_player_type *ep_ptr);
+void effect_player_brain_smash(player_type *target_ptr, effect_player_type *ep_ptr);
#include "effect/effect-player-switcher.h"
#include "effect/effect-player-oldies.h"
#include "effect/effect-player-resist-hurt.h"
+#include "effect/effect-player-spirit.h"
#include "monster-spell.h"
#include "object-broken.h"
#include "object-curse.h"
}
}
-void effect_player_drain_mana(player_type *target_ptr,
- effect_player_type *ep_ptr) {
- if (CHECK_MULTISHADOW(target_ptr)) {
- msg_print(_("\8dU\8c\82\82Í\8c¶\89e\82É\96½\92\86\82µ\81A\82 \82È\82½\82É\82Í\93Í\82©\82È\82©\82Á\82½\81B",
- "The attack hits Shadow, but you are unharmed!"));
- ep_ptr->dam = 0;
- return;
- }
-
- if (target_ptr->csp == 0) {
- ep_ptr->dam = 0;
- return;
- }
-
- if (ep_ptr->who > 0)
- msg_format(_("%^s\82É\90¸\90_\83G\83l\83\8b\83M\81[\82ð\8bz\82¢\8eæ\82ç\82ê\82Ä\82µ\82Ü\82Á\82½\81I",
- "%^s draws psychic energy from you!"),
- ep_ptr->m_name);
- else
- msg_print(_("\90¸\90_\83G\83l\83\8b\83M\81[\82ð\8bz\82¢\8eæ\82ç\82ê\82Ä\82µ\82Ü\82Á\82½\81I",
- "Your psychic energy is drawn!"));
-
- if (ep_ptr->dam >= target_ptr->csp) {
- ep_ptr->dam = target_ptr->csp;
- target_ptr->csp = 0;
- target_ptr->csp_frac = 0;
- } else {
- target_ptr->csp -= ep_ptr->dam;
- }
-
- learn_spell(target_ptr, ep_ptr->monspell);
- target_ptr->redraw |= (PR_MANA);
- target_ptr->window |= (PW_PLAYER | PW_SPELL);
-
- if ((ep_ptr->who <= 0) || (ep_ptr->m_ptr->hp >= ep_ptr->m_ptr->maxhp)) {
- ep_ptr->dam = 0;
- return;
- }
-
- ep_ptr->m_ptr->hp += ep_ptr->dam;
- if (ep_ptr->m_ptr->hp > ep_ptr->m_ptr->maxhp)
- ep_ptr->m_ptr->hp = ep_ptr->m_ptr->maxhp;
-
- if (target_ptr->health_who == ep_ptr->who)
- target_ptr->redraw |= (PR_HEALTH);
- if (target_ptr->riding == ep_ptr->who)
- target_ptr->redraw |= (PR_UHEALTH);
-
- if (ep_ptr->m_ptr->ml) {
- msg_format(_("%^s\82Í\8bC\95ª\82ª\97Ç\82³\82»\82¤\82¾\81B", "%^s appears healthier."),
- ep_ptr->m_name);
- }
-
- ep_ptr->dam = 0;
-}
-
-void effect_player_mind_blast(player_type *target_ptr,
- effect_player_type *ep_ptr) {
- if ((randint0(100 + ep_ptr->rlev / 2) < MAX(5, target_ptr->skill_sav)) &&
- !CHECK_MULTISHADOW(target_ptr)) {
- msg_print(_("\82µ\82©\82µ\8cø\97Í\82ð\92µ\82Ë\95Ô\82µ\82½\81I", "You resist the effects!"));
- learn_spell(target_ptr, ep_ptr->monspell);
- return;
- }
-
- if (CHECK_MULTISHADOW(target_ptr)) {
- ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam,
- ep_ptr->killer, ep_ptr->monspell);
- return;
- }
-
- msg_print(_("\97ì\93I\83G\83l\83\8b\83M\81[\82Å\90¸\90_\82ª\8dU\8c\82\82³\82ê\82½\81B",
- "Your mind is blasted by psionic energy."));
- if (!target_ptr->resist_conf) {
- (void)set_confused(target_ptr, target_ptr->confused + randint0(4) + 4);
- }
-
- if (!target_ptr->resist_chaos && one_in_(3)) {
- (void)set_image(target_ptr, target_ptr->image + randint0(250) + 150);
- }
-
- target_ptr->csp -= 50;
- if (target_ptr->csp < 0) {
- target_ptr->csp = 0;
- target_ptr->csp_frac = 0;
- }
-
- target_ptr->redraw |= PR_MANA;
- ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam,
- ep_ptr->killer, ep_ptr->monspell);
-}
-
-void effect_player_brain_smash(player_type *target_ptr,
- effect_player_type *ep_ptr) {
- if ((randint0(100 + ep_ptr->rlev / 2) < MAX(5, target_ptr->skill_sav)) &&
- !CHECK_MULTISHADOW(target_ptr)) {
- msg_print(_("\82µ\82©\82µ\8cø\97Í\82ð\92µ\82Ë\95Ô\82µ\82½\81I", "You resist the effects!"));
- learn_spell(target_ptr, ep_ptr->monspell);
- return;
- }
-
- if (!CHECK_MULTISHADOW(target_ptr)) {
- msg_print(_("\97ì\93I\83G\83l\83\8b\83M\81[\82Å\90¸\90_\82ª\8dU\8c\82\82³\82ê\82½\81B",
- "Your mind is blasted by psionic energy."));
-
- target_ptr->csp -= 100;
- if (target_ptr->csp < 0) {
- target_ptr->csp = 0;
- target_ptr->csp_frac = 0;
- }
- target_ptr->redraw |= PR_MANA;
- }
-
- ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam,
- ep_ptr->killer, ep_ptr->monspell);
- if (CHECK_MULTISHADOW(target_ptr))
- return;
-
- if (!target_ptr->resist_blind) {
- (void)set_blind(target_ptr, target_ptr->blind + 8 + randint0(8));
- }
-
- if (!target_ptr->resist_conf) {
- (void)set_confused(target_ptr, target_ptr->confused + randint0(4) + 4);
- }
-
- if (!target_ptr->free_act) {
- (void)set_paralyzed(target_ptr, target_ptr->paralyzed + randint0(4) + 4);
- }
-
- (void)set_slow(target_ptr, target_ptr->slow + randint0(4) + 4, FALSE);
-
- while (randint0(100 + ep_ptr->rlev / 2) > (MAX(5, target_ptr->skill_sav)))
- (void)do_dec_stat(target_ptr, A_INT);
- while (randint0(100 + ep_ptr->rlev / 2) > (MAX(5, target_ptr->skill_sav)))
- (void)do_dec_stat(target_ptr, A_WIS);
-
- if (!target_ptr->resist_chaos) {
- (void)set_image(target_ptr, target_ptr->image + randint0(250) + 150);
- }
-}
-
void effect_player_hand_doom(player_type *target_ptr,
effect_player_type *ep_ptr) {
if ((randint0(100 + ep_ptr->rlev / 2) < target_ptr->skill_sav) &&