<ClCompile Include="..\..\src\mind\racial-force-trainer.c" />\r
<ClCompile Include="..\..\src\mind\racial-mirror-master.c" />\r
<ClCompile Include="..\..\src\mind\monk-attack.c" />\r
+ <ClCompile Include="..\..\src\mind\racial-ninja.c" />\r
<ClCompile Include="..\..\src\mind\racial-samurai.c" />\r
<ClCompile Include="..\..\src\mind\samurai-slaying.c" />\r
<ClCompile Include="..\..\src\mind\surprise-attack.c" />\r
<ClInclude Include="..\..\src\mind\racial-force-trainer.h" />\r
<ClInclude Include="..\..\src\mind\racial-mirror-master.h" />\r
<ClInclude Include="..\..\src\mind\monk-attack.h" />\r
+ <ClInclude Include="..\..\src\mind\racial-ninja.h" />\r
<ClInclude Include="..\..\src\mind\racial-samurai.h" />\r
<ClInclude Include="..\..\src\mind\samurai-slaying.h" />\r
<ClInclude Include="..\..\src\mind\surprise-attack.h" />\r
<ClCompile Include="..\..\src\specific-object\torch.c">
<Filter>specific-object</Filter>
</ClCompile>
+ <ClCompile Include="..\..\src\mind\racial-ninja.c">
+ <Filter>mind</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\cmd\cmd-basic.h">
<ClInclude Include="..\..\src\specific-object\torch.h">
<Filter>specific-object</Filter>
</ClInclude>
+ <ClInclude Include="..\..\src\mind\racial-ninja.h">
+ <Filter>mind</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\..\src\wall.bmp" />
market/building-actions-table.h \
\
mind/mind.c mind/mind.h \
+ mind/monk-attack.c mind/monk-attack.h \
mind/racial.c mind/racial.h \
mind/racial-cavalry.c mind/racial-cavalry.h \
- mind/racial-samurai.c mind/racial-samurai.h \
- mind/racial-mirror-master.c mind/racial-mirror-master.h \
mind/racial-force-trainer.c mind/racial-force-trainer.h \
- mind/monk-attack.c mind/monk-attack.h \
+ mind/racial-mirror-master.c mind/racial-mirror-master.h \
+ mind/racial-ninja.c mind/racial-ninja.h \
+ mind/racial-samurai.c mind/racial-samurai.h \
mind/samurai-slaying.c mind/samurai-slaying.h \
mind/surprise-attack.c mind/surprise-attack.h \
\
#include "dungeon/dungeon.h"
#include "effect/effect-characteristics.h"
#include "main/sound-definitions-table.h"
+#include "mind/racial-ninja.h"
#include "mind/racial-samurai.h"
#include "monster/monster-status.h"
#include "pet/pet-fall-off.h"
-#include "system/angband.h"
-#include "effect-player-util.h"
-#include "effect/effect-player-curse.h"
#include "effect/effect-player-switcher.h"
+#include "cmd-action/cmd-attack.h"
+#include "effect/effect-player-curse.h"
#include "effect/effect-player-oldies.h"
#include "effect/effect-player-resist-hurt.h"
#include "effect/effect-player-spirit.h"
+#include "inventory/inventory-damage.h"
+#include "mind/racial-mirror-master.h"
#include "mspell/monster-spell.h"
-#include "object/object-broken.h"
#include "object-enchant/object-curse.h"
+#include "object/object-broken.h"
+#include "player/mimic-info-table.h"
#include "player/player-damage.h"
-#include "mind/racial-mirror-master.h"
-#include "inventory/inventory-damage.h"
#include "player/player-effects.h"
-#include "player/mimic-info-table.h"
+#include "player/player-races-table.h"
#include "spell/spells-type.h"
#include "world/world.h"
-#include "player/player-races-table.h"
-#include "cmd-action/cmd-attack.h"
void effect_player_mana(player_type *target_ptr, effect_player_type *ep_ptr) {
if (target_ptr->blind)
#pragma once
+#include "system/angband.h"
+#include "effect-player-util.h"
+
void switch_effects_player(player_type *target_ptr, effect_player_type *ep_ptr);
#pragma once
+#include "system/angband.h"
+
typedef struct effect_player_type
{
DEPTH rlev; // モンスターのレベル (但し0のモンスターは1になる).
* @author Hourier
*/
-#include "system/angband.h"
-#include "effect/effect-player-util.h"
#include "effect/effect-player.h"
+#include "effect/effect-characteristics.h"
#include "effect/effect-player-switcher.h"
-#include "main/sound-definitions-table.h"
-#include "realm/realm-hex-numbers.h"
+#include "effect/effect-player-util.h"
#include "effect/spells-effect-util.h"
+#include "main/sound-definitions-table.h"
+#include "mind/racial-ninja.h"
+#include "player/player-effects.h"
#include "player/player-move.h"
+#include "realm/realm-hex-numbers.h"
#include "spell/spells-hex.h"
#include "spell/spells-type.h"
-#include "spell/spells2.h"
-#include "player/player-effects.h"
-#include "effect/effect-characteristics.h"
typedef enum effect_player_check_result
{
#pragma once
-typedef bool (*project_func)(player_type *caster_ptr, MONSTER_IDX who, POSITION rad,
- POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID typ,
- BIT_FLAGS flag, int monspell);
-bool affect_player(MONSTER_IDX who, player_type *target_ptr, concptr who_name,
- int r, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID typ,
- BIT_FLAGS flag, int monspell, project_func project);
+#include "system/angband.h"
+
+typedef bool (*project_func)(
+ player_type *caster_ptr, MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID typ, BIT_FLAGS flag, int monspell);
+
+bool affect_player(MONSTER_IDX who, player_type *target_ptr, concptr who_name, int r, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID typ, BIT_FLAGS flag,
+ int monspell, project_func project);
#include "io/targeting.h"
#include "main/sound-definitions-table.h"
#include "mind/racial-force-trainer.h"
+#include "mind/racial-ninja.h"
#include "monster/monster-status.h"
#include "player/avatar.h"
#include "player/player-class.h"
--- /dev/null
+#include "mind/racial-ninja.h"
+#include "cmd-action/cmd-attack.h"
+#include "combat/combat-options-type.h"
+#include "floor/floor-object.h"
+#include "io/targeting.h"
+#include "effect/effect-characteristics.h"
+#include "effect/spells-effect-util.h"
+#include "object/object-generator.h"
+#include "object/object-kind-hook.h"
+#include "spell/spells3.h"
+
+/*!
+ * @brief 変わり身処理
+ * @param caster_ptr プレーヤーへの参照ポインタ
+ * @param success 判定成功上の処理ならばTRUE
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+bool kawarimi(player_type *caster_ptr, bool success)
+{
+ object_type forge;
+ object_type *q_ptr = &forge;
+
+ if (caster_ptr->is_dead)
+ return FALSE;
+ if (caster_ptr->confused || caster_ptr->blind || caster_ptr->paralyzed || caster_ptr->image)
+ return FALSE;
+ if (randint0(200) < caster_ptr->stun)
+ return FALSE;
+
+ if (!success && one_in_(3)) {
+ msg_print(_("失敗!逃げられなかった。", "Failed! You couldn't run away."));
+ caster_ptr->special_defense &= ~(NINJA_KAWARIMI);
+ caster_ptr->redraw |= (PR_STATUS);
+ return FALSE;
+ }
+
+ POSITION y = caster_ptr->y;
+ POSITION x = caster_ptr->x;
+
+ teleport_player(caster_ptr, 10 + randint1(90), TELEPORT_SPONTANEOUS);
+ object_wipe(q_ptr);
+ const int SV_WOODEN_STATUE = 0;
+ object_prep(q_ptr, lookup_kind(TV_STATUE, SV_WOODEN_STATUE));
+
+ q_ptr->pval = MON_NINJA;
+ (void)drop_near(caster_ptr, q_ptr, -1, y, x);
+
+ if (success)
+ msg_print(_("攻撃を受ける前に素早く身をひるがえした。", "You have turned around just before the attack hit you."));
+ else
+ msg_print(_("失敗!攻撃を受けてしまった。", "Failed! You are hit by the attack."));
+
+ caster_ptr->special_defense &= ~(NINJA_KAWARIMI);
+ caster_ptr->redraw |= (PR_STATUS);
+ return TRUE;
+}
+
+/*!
+ * @brief 入身処理 / "Rush Attack" routine for Samurai or Ninja
+ * @param caster_ptr プレーヤーへの参照ポインタ
+ * @param mdeath 目標モンスターが死亡したかを返す
+ * @return 作用が実際にあった場合TRUEを返す / Return value is for checking "done"
+ */
+bool rush_attack(player_type *attacker_ptr, bool *mdeath)
+{
+ if (mdeath)
+ *mdeath = FALSE;
+
+ project_length = 5;
+ DIRECTION dir;
+ if (!get_aim_dir(attacker_ptr, &dir))
+ return FALSE;
+
+ int tx = attacker_ptr->x + project_length * ddx[dir];
+ int ty = attacker_ptr->y + project_length * ddy[dir];
+
+ if ((dir == 5) && target_okay(attacker_ptr)) {
+ tx = target_col;
+ ty = target_row;
+ }
+
+ int tm_idx = 0;
+ floor_type *floor_ptr = attacker_ptr->current_floor_ptr;
+ if (in_bounds(floor_ptr, ty, tx))
+ tm_idx = floor_ptr->grid_array[ty][tx].m_idx;
+
+ u16b path_g[32];
+ int path_n = project_path(attacker_ptr, path_g, project_length, attacker_ptr->y, attacker_ptr->x, ty, tx, PROJECT_STOP | PROJECT_KILL);
+ project_length = 0;
+ if (!path_n)
+ return TRUE;
+
+ ty = attacker_ptr->y;
+ tx = attacker_ptr->x;
+ bool tmp_mdeath = FALSE;
+ bool moved = FALSE;
+ for (int i = 0; i < path_n; i++) {
+ monster_type *m_ptr;
+
+ int ny = GRID_Y(path_g[i]);
+ int nx = GRID_X(path_g[i]);
+
+ if (is_cave_empty_bold(attacker_ptr, ny, nx) && player_can_enter(attacker_ptr, floor_ptr->grid_array[ny][nx].feat, 0)) {
+ ty = ny;
+ tx = nx;
+ continue;
+ }
+
+ if (!floor_ptr->grid_array[ny][nx].m_idx) {
+ if (tm_idx) {
+ msg_print(_("失敗!", "Failed!"));
+ } else {
+ msg_print(_("ここには入身では入れない。", "You can't move to that place."));
+ }
+
+ break;
+ }
+
+ if (!player_bold(attacker_ptr, ty, tx))
+ teleport_player_to(attacker_ptr, ty, tx, TELEPORT_NONMAGICAL);
+ update_monster(attacker_ptr, floor_ptr->grid_array[ny][nx].m_idx, TRUE);
+
+ m_ptr = &floor_ptr->m_list[floor_ptr->grid_array[ny][nx].m_idx];
+ if (tm_idx != floor_ptr->grid_array[ny][nx].m_idx) {
+#ifdef JP
+ msg_format("%s%sが立ちふさがっている!", tm_idx ? "別の" : "", m_ptr->ml ? "モンスター" : "何か");
+#else
+ msg_format("There is %s in the way!", m_ptr->ml ? (tm_idx ? "another monster" : "a monster") : "someone");
+#endif
+ } else if (!player_bold(attacker_ptr, ty, tx)) {
+ GAME_TEXT m_name[MAX_NLEN];
+ monster_desc(attacker_ptr, m_name, m_ptr, 0);
+ msg_format(_("素早く%sの懐に入り込んだ!", "You quickly jump in and attack %s!"), m_name);
+ }
+
+ if (!player_bold(attacker_ptr, ty, tx))
+ teleport_player_to(attacker_ptr, ty, tx, TELEPORT_NONMAGICAL);
+ moved = TRUE;
+ tmp_mdeath = do_cmd_attack(attacker_ptr, ny, nx, HISSATSU_NYUSIN);
+
+ break;
+ }
+
+ if (!moved && !player_bold(attacker_ptr, ty, tx))
+ teleport_player_to(attacker_ptr, ty, tx, TELEPORT_NONMAGICAL);
+
+ if (mdeath)
+ *mdeath = tmp_mdeath;
+ return TRUE;
+}
--- /dev/null
+#pragma once
+
+#include "system/angband.h"
+
+bool kawarimi(player_type *caster_ptr, bool success);
+bool rush_attack(player_type *attacker_ptr, bool *mdeath);
-#include "system/angband.h"
-#include "core/stuff-handler.h"
-#include "util/util.h"
-
+#include "cmd-action/cmd-attack.h"
#include "cmd-action/cmd-spell.h"
#include "cmd/cmd-basic.h"
+#include "combat/combat-options-type.h"
+#include "core/stuff-handler.h"
#include "dungeon/dungeon.h"
#include "effect/effect-characteristics.h"
+#include "effect/spells-effect-util.h"
+#include "grid/feature.h"
+#include "grid/grid.h"
+#include "io/targeting.h"
+#include "mind/racial-ninja.h"
#include "monster/monster-race-hook.h"
-#include "object-enchant/artifact.h"
#include "monster/monster.h"
+#include "object-enchant/artifact.h"
+#include "object-enchant/tr-types.h"
+#include "player/player-damage.h"
+#include "player/player-effects.h"
#include "player/player-move.h"
#include "player/player-status.h"
-#include "player/player-effects.h"
-#include "player/player-damage.h"
-#include "grid/feature.h"
-#include "spell/technic-info-table.h"
-#include "grid/grid.h"
-#include "io/targeting.h"
-#include "view/display-main-window.h"
+#include "spell/process-effect.h"
+#include "spell/spells-detection.h"
#include "spell/spells-floor.h"
-#include "world/world.h"
-#include "effect/spells-effect-util.h"
-#include "spell/spells-util.h"
#include "spell/spells-type.h"
-#include "spell/process-effect.h"
+#include "spell/spells-util.h"
#include "spell/spells2.h"
#include "spell/spells3.h"
-#include "spell/spells-detection.h"
-#include "combat/combat-options-type.h"
-#include "cmd-action/cmd-attack.h"
-#include "object-enchant/tr-types.h"
+#include "spell/technic-info-table.h"
+#include "util/util.h"
+#include "view/display-main-window.h"
+#include "world/world.h"
/*!
* @brief 剣術の各処理を行う
#pragma once
+#include "system/angband.h"
#include "spell/spells-util.h"
concptr do_hissatsu_spell(player_type *caster_ptr, SPELL_IDX spell, spell_type mode);
#include "view/display-main-window.h"
#include "world/world.h"
-#define SV_WOODEN_STATUE 0
-
/*!
* @brief 視界内モンスターに魔法効果を与える / Apply a "project()" directly to all viewable monsters
* @param typ 属性効果
/*!
- * @brief 変わり身処理
- * @param caster_ptr プレーヤーへの参照ポインタ
- * @param success 判定成功上の処理ならばTRUE
- * @return 作用が実際にあった場合TRUEを返す
- */
-bool kawarimi(player_type *caster_ptr, bool success)
-{
- object_type forge;
- object_type *q_ptr = &forge;
-
- if (caster_ptr->is_dead) return FALSE;
- if (caster_ptr->confused || caster_ptr->blind || caster_ptr->paralyzed || caster_ptr->image) return FALSE;
- if (randint0(200) < caster_ptr->stun) return FALSE;
-
- if (!success && one_in_(3))
- {
- msg_print(_("失敗!逃げられなかった。", "Failed! You couldn't run away."));
- caster_ptr->special_defense &= ~(NINJA_KAWARIMI);
- caster_ptr->redraw |= (PR_STATUS);
- return FALSE;
- }
-
- POSITION y = caster_ptr->y;
- POSITION x = caster_ptr->x;
-
- teleport_player(caster_ptr, 10 + randint1(90), TELEPORT_SPONTANEOUS);
- object_wipe(q_ptr);
- object_prep(q_ptr, lookup_kind(TV_STATUE, SV_WOODEN_STATUE));
-
- q_ptr->pval = MON_NINJA;
- (void)drop_near(caster_ptr, q_ptr, -1, y, x);
-
- if (success) msg_print(_("攻撃を受ける前に素早く身をひるがえした。", "You have turned around just before the attack hit you."));
- else msg_print(_("失敗!攻撃を受けてしまった。", "Failed! You are hit by the attack."));
-
- caster_ptr->special_defense &= ~(NINJA_KAWARIMI);
- caster_ptr->redraw |= (PR_STATUS);
- return TRUE;
-}
-
-
-/*!
- * @brief 入身処理 / "Rush Attack" routine for Samurai or Ninja
- * @param caster_ptr プレーヤーへの参照ポインタ
- * @param mdeath 目標モンスターが死亡したかを返す
- * @return 作用が実際にあった場合TRUEを返す / Return value is for checking "done"
- */
-bool rush_attack(player_type *attacker_ptr, bool *mdeath)
-{
- if (mdeath) *mdeath = FALSE;
-
- project_length = 5;
- DIRECTION dir;
- if (!get_aim_dir(attacker_ptr, &dir)) return FALSE;
-
- int tx = attacker_ptr->x + project_length * ddx[dir];
- int ty = attacker_ptr->y + project_length * ddy[dir];
-
- if ((dir == 5) && target_okay(attacker_ptr))
- {
- tx = target_col;
- ty = target_row;
- }
-
- int tm_idx = 0;
- floor_type *floor_ptr = attacker_ptr->current_floor_ptr;
- if (in_bounds(floor_ptr, ty, tx)) tm_idx = floor_ptr->grid_array[ty][tx].m_idx;
-
- u16b path_g[32];
- int path_n = project_path(attacker_ptr, path_g, project_length, attacker_ptr->y, attacker_ptr->x, ty, tx, PROJECT_STOP | PROJECT_KILL);
- project_length = 0;
- if (!path_n) return TRUE;
-
- ty = attacker_ptr->y;
- tx = attacker_ptr->x;
- bool tmp_mdeath = FALSE;
- bool moved = FALSE;
- for (int i = 0; i < path_n; i++)
- {
- monster_type *m_ptr;
-
- int ny = GRID_Y(path_g[i]);
- int nx = GRID_X(path_g[i]);
-
- if (is_cave_empty_bold(attacker_ptr, ny, nx) && player_can_enter(attacker_ptr, floor_ptr->grid_array[ny][nx].feat, 0))
- {
- ty = ny;
- tx = nx;
- continue;
- }
-
- if (!floor_ptr->grid_array[ny][nx].m_idx)
- {
- if (tm_idx)
- {
- msg_print(_("失敗!", "Failed!"));
- }
- else
- {
- msg_print(_("ここには入身では入れない。", "You can't move to that place."));
- }
-
- break;
- }
-
- if (!player_bold(attacker_ptr, ty, tx)) teleport_player_to(attacker_ptr, ty, tx, TELEPORT_NONMAGICAL);
- update_monster(attacker_ptr, floor_ptr->grid_array[ny][nx].m_idx, TRUE);
-
- m_ptr = &floor_ptr->m_list[floor_ptr->grid_array[ny][nx].m_idx];
- if (tm_idx != floor_ptr->grid_array[ny][nx].m_idx)
- {
-#ifdef JP
- msg_format("%s%sが立ちふさがっている!", tm_idx ? "別の" : "", m_ptr->ml ? "モンスター" : "何か");
-#else
- msg_format("There is %s in the way!", m_ptr->ml ? (tm_idx ? "another monster" : "a monster") : "someone");
-#endif
- }
- else if (!player_bold(attacker_ptr, ty, tx))
- {
- GAME_TEXT m_name[MAX_NLEN];
- monster_desc(attacker_ptr, m_name, m_ptr, 0);
- msg_format(_("素早く%sの懐に入り込んだ!", "You quickly jump in and attack %s!"), m_name);
- }
-
- if (!player_bold(attacker_ptr, ty, tx)) teleport_player_to(attacker_ptr, ty, tx, TELEPORT_NONMAGICAL);
- moved = TRUE;
- tmp_mdeath = do_cmd_attack(attacker_ptr, ny, nx, HISSATSU_NYUSIN);
-
- break;
- }
-
- if (!moved && !player_bold(attacker_ptr, ty, tx)) teleport_player_to(attacker_ptr, ty, tx, TELEPORT_NONMAGICAL);
-
- if (mdeath) *mdeath = tmp_mdeath;
- return TRUE;
-}
-
-
-/*!
* @brief 全鏡の消去 / Remove all mirrors in this floor
* @param caster_ptr プレーヤーへの参照ポインタ
* @param explode 爆発処理を伴うならばTRUE
bool project_all_los(player_type* caster_ptr, EFFECT_ID typ, HIT_POINT dam);
bool eat_magic(player_type* caster_ptr, int power);
void discharge_minion(player_type* caster_ptr);
-bool kawarimi(player_type* caster_ptr, bool success);
-bool rush_attack(player_type* attacker_ptr, bool* mdeath);
void remove_all_mirrors(player_type* caster_ptr, bool explode);
void ring_of_power(player_type* caster_ptr, DIRECTION dir);
void wild_magic(player_type* caster_ptr, int spell);