#include "angband.h"
#include "grid.h"
#include "trap.h"
+#include "monsterrace-hook.h"
+#include "melee.h"
/*!
*/
static bool detect_feat_flag(POSITION range, int flag, bool known)
{
- int x, y;
- bool detect = FALSE;
+ POSITION x, y;
+ bool detect = FALSE;
cave_type *c_ptr;
if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
{
int dist = distance(p_ptr->y, p_ptr->x, y, x);
if (dist > range) continue;
-
- /* Access the grid */
c_ptr = &cave[y][x];
/* Hack -- Safe */
c_ptr->info &= ~(CAVE_UNSAFE);
- /* Redraw */
lite_spot(y, x);
}
}
/* Hack -- Memorize */
c_ptr->info |= (CAVE_MARK);
- /* Redraw */
lite_spot(y, x);
- /* Obvious */
detect = TRUE;
}
}
}
-
- /* Result */
return detect;
}
if (known) p_ptr->dtrap = TRUE;
if (music_singing(MUSIC_DETECT) && SINGING_COUNT(p_ptr) > 0) detect = FALSE;
-
- /* Describe */
if (detect)
{
msg_print(_("トラップの存在を感じとった!", "You sense the presence of traps!"));
}
-
- /* Result */
return detect;
}
bool detect = detect_feat_flag(range, FF_DOOR, TRUE);
if (music_singing(MUSIC_DETECT) && SINGING_COUNT(p_ptr) > 0) detect = FALSE;
-
- /* Describe */
if (detect)
{
msg_print(_("ドアの存在を感じとった!", "You sense the presence of doors!"));
}
-
- /* Result */
return detect;
}
bool detect = detect_feat_flag(range, FF_STAIRS, TRUE);
if (music_singing(MUSIC_DETECT) && SINGING_COUNT(p_ptr) > 0) detect = FALSE;
-
- /* Describe */
if (detect)
{
msg_print(_("階段の存在を感じとった!", "You sense the presence of stairs!"));
}
-
- /* Result */
return detect;
}
bool detect = detect_feat_flag(range, FF_HAS_GOLD, TRUE);
if (music_singing(MUSIC_DETECT) && SINGING_COUNT(p_ptr) > 6) detect = FALSE;
-
- /* Describe */
if (detect)
{
msg_print(_("埋蔵された財宝の存在を感じとった!", "You sense the presence of buried treasure!"));
}
-
- /* Result */
return detect;
}
*/
bool detect_objects_gold(POSITION range)
{
- int i, y, x;
+ OBJECT_IDX i;
+ POSITION y, x;
POSITION range2 = range;
bool detect = FALSE;
/* Skip held objects */
if (o_ptr->held_m_idx) continue;
- /* Location */
y = o_ptr->iy;
x = o_ptr->ix;
/* Detect "gold" objects */
if (o_ptr->tval == TV_GOLD)
{
- /* Hack -- memorize it */
o_ptr->marked |= OM_FOUND;
-
- /* Redraw */
lite_spot(y, x);
-
- /* Detect */
detect = TRUE;
}
}
if (music_singing(MUSIC_DETECT) && SINGING_COUNT(p_ptr) > 6) detect = FALSE;
-
- /* Describe */
if (detect)
{
msg_print(_("財宝の存在を感じとった!", "You sense the presence of treasure!"));
{
detect = TRUE;
}
-
- /* Result */
return (detect);
}
*/
bool detect_objects_normal(POSITION range)
{
- int i, y, x;
+ OBJECT_IDX i;
+ POSITION y, x;
POSITION range2 = range;
bool detect = FALSE;
/* Skip held objects */
if (o_ptr->held_m_idx) continue;
- /* Location */
y = o_ptr->iy;
x = o_ptr->ix;
/* Detect "real" objects */
if (o_ptr->tval != TV_GOLD)
{
- /* Hack -- memorize it */
o_ptr->marked |= OM_FOUND;
-
- /* Redraw */
lite_spot(y, x);
-
- /* Detect */
detect = TRUE;
}
}
if (music_singing(MUSIC_DETECT) && SINGING_COUNT(p_ptr) > 6) detect = FALSE;
-
- /* Describe */
if (detect)
{
msg_print(_("アイテムの存在を感じとった!", "You sense the presence of objects!"));
{
detect = TRUE;
}
-
- /* Result */
return (detect);
}
*/
bool detect_objects_magic(POSITION range)
{
- int i, y, x, tv;
+ OBJECT_TYPE_VALUE tv;
+ OBJECT_IDX i;
+ POSITION y, x;
bool detect = FALSE;
/* Skip held objects */
if (o_ptr->held_m_idx) continue;
- /* Location */
y = o_ptr->iy;
x = o_ptr->ix;
{
/* Memorize the item */
o_ptr->marked |= OM_FOUND;
-
- /* Redraw */
lite_spot(y, x);
-
- /* Detect */
detect = TRUE;
}
}
-
- /* Describe */
if (detect)
{
msg_print(_("魔法のアイテムの存在を感じとった!", "You sense the presence of magic objects!"));
{
MONSTER_IDX i;
POSITION y, x;
-
bool flag = FALSE;
if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
- /* Scan monsters */
for (i = 1; i < m_max; i++)
{
monster_type *m_ptr = &m_list[i];
/* Skip dead monsters */
if (!m_ptr->r_idx) continue;
- /* Location */
y = m_ptr->fy;
x = m_ptr->fx;
/* Repair visibility later */
repair_monsters = TRUE;
- /* Hack -- Detect monster */
m_ptr->mflag2 |= (MFLAG2_MARK | MFLAG2_SHOW);
-
- /* Update the monster */
- update_mon(i, FALSE);
-
- /* Detect */
+ update_monster(i, FALSE);
flag = TRUE;
}
}
if (music_singing(MUSIC_DETECT) && SINGING_COUNT(p_ptr) > 3) flag = FALSE;
-
- /* Describe */
if (flag)
{
- /* Describe result */
msg_print(_("モンスターの存在を感じとった!", "You sense the presence of monsters!"));
}
-
- /* Result */
return (flag);
}
if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
- /* Scan monsters */
for (i = 1; i < m_max; i++)
{
monster_type *m_ptr = &m_list[i];
/* Skip dead monsters */
if (!m_ptr->r_idx) continue;
- /* Location */
y = m_ptr->fy;
x = m_ptr->fx;
/* Update monster recall window */
if (p_ptr->monster_race_idx == m_ptr->r_idx)
{
- /* Window stuff */
p_ptr->window |= (PW_MONSTER);
}
/* Repair visibility later */
repair_monsters = TRUE;
- /* Hack -- Detect monster */
m_ptr->mflag2 |= (MFLAG2_MARK | MFLAG2_SHOW);
-
- /* Update the monster */
- update_mon(i, FALSE);
-
- /* Detect */
+ update_monster(i, FALSE);
flag = TRUE;
}
}
if (music_singing(MUSIC_DETECT) && SINGING_COUNT(p_ptr) > 3) flag = FALSE;
-
- /* Describe */
if (flag)
{
- /* Describe result */
msg_print(_("透明な生物の存在を感じとった!", "You sense the presence of invisible creatures!"));
}
-
- /* Result */
return (flag);
}
if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
- /* Scan monsters */
for (i = 1; i < m_max; i++)
{
monster_type *m_ptr = &m_list[i];
/* Skip dead monsters */
if (!m_ptr->r_idx) continue;
- /* Location */
y = m_ptr->fy;
x = m_ptr->fx;
/* Update monster recall window */
if (p_ptr->monster_race_idx == m_ptr->r_idx)
{
- /* Window stuff */
p_ptr->window |= (PW_MONSTER);
}
}
/* Repair visibility later */
repair_monsters = TRUE;
- /* Hack -- Detect monster */
m_ptr->mflag2 |= (MFLAG2_MARK | MFLAG2_SHOW);
-
- /* Update the monster */
- update_mon(i, FALSE);
-
- /* Detect */
+ update_monster(i, FALSE);
flag = TRUE;
}
}
-
- /* Describe */
if (flag)
{
- /* Describe result */
msg_print(_("邪悪なる生物の存在を感じとった!", "You sense the presence of evil creatures!"));
}
-
- /* Result */
return (flag);
}
if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
- /* Scan monsters */
for (i = 1; i < m_max; i++)
{
monster_type *m_ptr = &m_list[i];
- monster_race *r_ptr = &r_info[m_ptr->r_idx];
/* Skip dead monsters */
if (!m_ptr->r_idx) continue;
- /* Location */
y = m_ptr->fy;
x = m_ptr->fx;
if (distance(p_ptr->y, p_ptr->x, y, x) > range) continue;
/* Detect non-living monsters */
- if (!monster_living(r_ptr))
+ if (!monster_living(m_ptr->r_idx))
{
/* Update monster recall window */
if (p_ptr->monster_race_idx == m_ptr->r_idx)
{
- /* Window stuff */
p_ptr->window |= (PW_MONSTER);
}
/* Repair visibility later */
repair_monsters = TRUE;
- /* Hack -- Detect monster */
m_ptr->mflag2 |= (MFLAG2_MARK | MFLAG2_SHOW);
-
- /* Update the monster */
- update_mon(i, FALSE);
-
- /* Detect */
+ update_monster(i, FALSE);
flag = TRUE;
}
}
-
- /* Describe */
if (flag)
{
- /* Describe result */
msg_print(_("自然でないモンスターの存在を感じた!", "You sense the presence of unnatural beings!"));
}
-
- /* Result */
return (flag);
}
{
MONSTER_IDX i;
POSITION y, x;
- bool flag = FALSE;
+ bool flag = FALSE;
if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
- /* Scan monsters */
for (i = 1; i < m_max; i++)
{
monster_type *m_ptr = &m_list[i];
/* Skip dead monsters */
if (!m_ptr->r_idx) continue;
- /* Location */
y = m_ptr->fy;
x = m_ptr->fx;
/* Update monster recall window */
if (p_ptr->monster_race_idx == m_ptr->r_idx)
{
- /* Window stuff */
p_ptr->window |= (PW_MONSTER);
}
/* Repair visibility later */
repair_monsters = TRUE;
- /* Hack -- Detect monster */
m_ptr->mflag2 |= (MFLAG2_MARK | MFLAG2_SHOW);
-
- /* Update the monster */
- update_mon(i, FALSE);
-
- /* Detect */
+ update_monster(i, FALSE);
flag = TRUE;
}
}
-
- /* Describe */
if (flag)
{
- /* Describe result */
msg_print(_("殺気を感じとった!", "You sense the presence of someone's mind!"));
}
-
- /* Result */
return (flag);
}
if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
- /* Scan monsters */
for (i = 1; i < m_max; i++)
{
monster_type *m_ptr = &m_list[i];
/* Skip dead monsters */
if (!m_ptr->r_idx) continue;
- /* Location */
y = m_ptr->fy;
x = m_ptr->fx;
/* Update monster recall window */
if (p_ptr->monster_race_idx == m_ptr->r_idx)
{
- /* Window stuff */
p_ptr->window |= (PW_MONSTER);
}
/* Repair visibility later */
repair_monsters = TRUE;
- /* Hack -- Detect monster */
m_ptr->mflag2 |= (MFLAG2_MARK | MFLAG2_SHOW);
-
- /* Update the monster */
- update_mon(i, FALSE);
-
- /* Detect */
+ update_monster(i, FALSE);
flag = TRUE;
}
}
if (music_singing(MUSIC_DETECT) && SINGING_COUNT(p_ptr) > 3) flag = FALSE;
-
- /* Describe */
if (flag)
{
- /* Describe result */
msg_print(_("モンスターの存在を感じとった!", "You sense the presence of monsters!"));
}
-
- /* Result */
return (flag);
}
if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
- /* Scan monsters */
for (i = 1; i < m_max; i++)
{
monster_type *m_ptr = &m_list[i];
/* Skip dead monsters */
if (!m_ptr->r_idx) continue;
- /* Location */
y = m_ptr->fy;
x = m_ptr->fx;
/* Update monster recall window */
if (p_ptr->monster_race_idx == m_ptr->r_idx)
{
- /* Window stuff */
p_ptr->window |= (PW_MONSTER);
}
}
/* Repair visibility later */
repair_monsters = TRUE;
- /* Hack -- Detect monster */
m_ptr->mflag2 |= (MFLAG2_MARK | MFLAG2_SHOW);
-
- /* Update the monster */
- update_mon(i, FALSE);
-
- /* Detect */
+ update_monster(i, FALSE);
flag = TRUE;
}
}
-
- /* Describe */
if (flag)
{
switch (match_flag)
break;
}
- /* Describe result */
msg_format(_("%sの存在を感じとった!", "You sense the presence of %s!"), desc_monsters);
msg_print(NULL);
}
-
- /* Result */
return (flag);
}
if (detect_objects_normal(range)) detect = TRUE;
if (detect_monsters_invis(range)) detect = TRUE;
if (detect_monsters_normal(range)) detect = TRUE;
-
- /* Result */
return (detect);
}
* this is done in two passes. -- JDL
* </pre>
*/
-bool project_hack(int typ, HIT_POINT dam)
+bool project_all_los(EFFECT_ID typ, HIT_POINT dam)
{
- int i, x, y;
- int flg = PROJECT_JUMP | PROJECT_KILL | PROJECT_HIDE;
- bool obvious = FALSE;
+ MONSTER_IDX i;
+ POSITION x, y;
+ BIT_FLAGS flg = PROJECT_JUMP | PROJECT_KILL | PROJECT_HIDE;
+ bool obvious = FALSE;
/* Mark all (nearby) monsters */
/* Paranoia -- Skip dead monsters */
if (!m_ptr->r_idx) continue;
- /* Location */
y = m_ptr->fy;
x = m_ptr->fx;
/* Remove mark */
m_ptr->mflag &= ~(MFLAG_TEMP);
- /* Location */
y = m_ptr->fy;
x = m_ptr->fx;
/* Jump directly to the target monster */
if (project(0, 0, y, x, dam, typ, flg, -1)) obvious = TRUE;
}
-
- /* Result */
return (obvious);
}
*/
bool speed_monsters(void)
{
- return (project_hack(GF_OLD_SPEED, p_ptr->lev));
+ return (project_all_los(GF_OLD_SPEED, p_ptr->lev));
}
/*!
*/
bool slow_monsters(int power)
{
- return (project_hack(GF_OLD_SLOW, power));
+ return (project_all_los(GF_OLD_SLOW, power));
}
/*!
*/
bool sleep_monsters(int power)
{
- return (project_hack(GF_OLD_SLEEP, power));
+ return (project_all_los(GF_OLD_SLEEP, power));
}
/*!
*/
bool banish_evil(int dist)
{
- return (project_hack(GF_AWAY_EVIL, dist));
+ return (project_all_los(GF_AWAY_EVIL, dist));
}
/*!
*/
bool turn_undead(void)
{
- bool tester = (project_hack(GF_TURN_UNDEAD, p_ptr->lev));
+ bool tester = (project_all_los(GF_TURN_UNDEAD, p_ptr->lev));
if (tester)
chg_virtue(V_UNLIFE, -1);
return tester;
*/
bool dispel_undead(HIT_POINT dam)
{
- bool tester = (project_hack(GF_DISP_UNDEAD, dam));
+ bool tester = (project_all_los(GF_DISP_UNDEAD, dam));
if (tester)
chg_virtue(V_UNLIFE, -2);
return tester;
*/
bool dispel_evil(HIT_POINT dam)
{
- return (project_hack(GF_DISP_EVIL, dam));
+ return (project_all_los(GF_DISP_EVIL, dam));
}
/*!
*/
bool dispel_good(HIT_POINT dam)
{
- return (project_hack(GF_DISP_GOOD, dam));
+ return (project_all_los(GF_DISP_GOOD, dam));
}
/*!
*/
bool dispel_monsters(HIT_POINT dam)
{
- return (project_hack(GF_DISP_ALL, dam));
+ return (project_all_los(GF_DISP_ALL, dam));
}
/*!
*/
bool dispel_living(HIT_POINT dam)
{
- return (project_hack(GF_DISP_LIVING, dam));
+ return (project_all_los(GF_DISP_LIVING, dam));
}
/*!
*/
bool dispel_demons(HIT_POINT dam)
{
- return (project_hack(GF_DISP_DEMON, dam));
+ return (project_all_los(GF_DISP_DEMON, dam));
}
/*!
*/
bool crusade(void)
{
- return (project_hack(GF_CRUSADE, p_ptr->lev*4));
+ return (project_all_los(GF_CRUSADE, p_ptr->lev*4));
}
/*!
bool sleep = FALSE;
bool speed = FALSE;
-
/* Aggravate everyone nearby */
for (i = 1; i < m_max; i++)
{
- monster_type *m_ptr = &m_list[i];
-/* monster_race *r_ptr = &r_info[m_ptr->r_idx]; */
+ monster_type *m_ptr = &m_list[i];
/* Paranoia -- Skip dead monsters */
if (!m_ptr->r_idx) continue;
}
}
- /* Messages */
-#ifdef JP
- if (speed) msg_print("付近で何かが突如興奮したような感じを受けた!");
- else if (sleep) msg_print("何かが突如興奮したような騒々しい音が遠くに聞こえた!");
-#else
- if (speed) msg_print("You feel a sudden stirring nearby!");
- else if (sleep) msg_print("You hear a sudden stirring in the distance!");
-#endif
+ if (speed) msg_print(_("付近で何かが突如興奮したような感じを受けた!", "You feel a sudden stirring nearby!"));
+ else if (sleep) msg_print(_("何かが突如興奮したような騒々しい音が遠くに聞こえた!", "You hear a sudden stirring in the distance!"));
if (p_ptr->riding) p_ptr->update |= PU_BONUS;
}
/* Hack -- Skip Unique Monsters or Quest Monsters */
if (r_ptr->flags1 & (RF1_UNIQUE | RF1_QUESTOR)) resist = TRUE;
-
else if (r_ptr->flags7 & RF7_UNIQUE2) resist = TRUE;
-
else if (m_idx == p_ptr->riding) resist = TRUE;
-
else if ((p_ptr->inside_quest && !random_quest_number(dun_level)) || p_ptr->inside_arena || p_ptr->inside_battle) resist = TRUE;
-
else if (player_cast && (r_ptr->level > randint0(power))) resist = TRUE;
-
else if (player_cast && (m_ptr->mflag2 & MFLAG2_NOGENO)) resist = TRUE;
- /* Delete the monster */
+
else
{
if (record_named_pet && is_pet(m_ptr) && m_ptr->nickname)
if (player_cast)
{
- /* Take damage */
take_hit(DAMAGE_GENO, randint1(dam_side), format(_("%^sの呪文を唱えた疲労", "the strain of casting %^s"), spell_name), -1);
}
/* Visual feedback */
move_cursor_relative(p_ptr->y, p_ptr->x);
- /* Redraw */
p_ptr->redraw |= (PR_HP);
-
- /* Window stuff */
p_ptr->window |= (PW_PLAYER);
- /* Handle */
handle_stuff();
-
- /* Fresh */
Term_fresh();
- /* Delay */
Term_xtra(TERM_XTRA_DELAY, msec);
return !resist;
/* Skip "wrong" monsters */
if (r_ptr->d_char != typ) continue;
- /* Take note */
result |= genocide_aux(i, power, player_cast, 4, _("抹殺", "Genocide"));
}
*/
bool probing(void)
{
- int i, speed;
+ int i;
+ int speed; /* TODO */
bool_hack cu, cv;
bool probe = FALSE;
char buf[256];
if (ironman_nightmare) speed += 5;
/* Get the monster's alignment */
-#ifdef JP
- if ((r_ptr->flags3 & (RF3_EVIL | RF3_GOOD)) == (RF3_EVIL | RF3_GOOD)) align = "善悪";
- else if (r_ptr->flags3 & RF3_EVIL) align = "邪悪";
- else if (r_ptr->flags3 & RF3_GOOD) align = "善良";
- else if ((m_ptr->sub_align & (SUB_ALIGN_EVIL | SUB_ALIGN_GOOD)) == (SUB_ALIGN_EVIL | SUB_ALIGN_GOOD)) align = "中立(善悪)";
- else if (m_ptr->sub_align & SUB_ALIGN_EVIL) align = "中立(邪悪)";
- else if (m_ptr->sub_align & SUB_ALIGN_GOOD) align = "中立(善良)";
- else align = "中立";
-#else
- if ((r_ptr->flags3 & (RF3_EVIL | RF3_GOOD)) == (RF3_EVIL | RF3_GOOD)) align = "good&evil";
- else if (r_ptr->flags3 & RF3_EVIL) align = "evil";
- else if (r_ptr->flags3 & RF3_GOOD) align = "good";
- else if ((m_ptr->sub_align & (SUB_ALIGN_EVIL | SUB_ALIGN_GOOD)) == (SUB_ALIGN_EVIL | SUB_ALIGN_GOOD)) align = "neutral(good&evil)";
- else if (m_ptr->sub_align & SUB_ALIGN_EVIL) align = "neutral(evil)";
- else if (m_ptr->sub_align & SUB_ALIGN_GOOD) align = "neutral(good)";
- else align = "neutral";
-#endif
+ if ((r_ptr->flags3 & (RF3_EVIL | RF3_GOOD)) == (RF3_EVIL | RF3_GOOD)) align = _("善悪", "good&evil");
+ else if (r_ptr->flags3 & RF3_EVIL) align = _("邪悪", "evil");
+ else if (r_ptr->flags3 & RF3_GOOD) align = _("善良", "good");
+ else if ((m_ptr->sub_align & (SUB_ALIGN_EVIL | SUB_ALIGN_GOOD)) == (SUB_ALIGN_EVIL | SUB_ALIGN_GOOD)) _(align = "中立(善悪)", "neutral(good&evil)");
+ else if (m_ptr->sub_align & SUB_ALIGN_EVIL) align = _("中立(邪悪)", "neutral(evil)");
+ else if (m_ptr->sub_align & SUB_ALIGN_GOOD) align = _("中立(善良)", "neutral(good)");
+ else align = _("中立", "neutral");
/* Describe the monster */
sprintf(buf,_("%s ... 属性:%s HP:%d/%d AC:%d 速度:%s%d 経験:", "%s ... align:%s HP:%d/%d AC:%d speed:%s%d exp:"),
strcat(buf, "xxx ");
}
-#ifdef JP
- if (MON_CSLEEP(m_ptr)) strcat(buf,"睡眠 ");
- if (MON_STUNNED(m_ptr)) strcat(buf,"朦朧 ");
- if (MON_MONFEAR(m_ptr)) strcat(buf,"恐怖 ");
- if (MON_CONFUSED(m_ptr)) strcat(buf,"混乱 ");
- if (MON_INVULNER(m_ptr)) strcat(buf,"無敵 ");
-#else
- if (MON_CSLEEP(m_ptr)) strcat(buf,"sleeping ");
- if (MON_STUNNED(m_ptr)) strcat(buf,"stunned ");
- if (MON_MONFEAR(m_ptr)) strcat(buf,"scared ");
- if (MON_CONFUSED(m_ptr)) strcat(buf,"confused ");
- if (MON_INVULNER(m_ptr)) strcat(buf,"invulnerable ");
-#endif
+ if (MON_CSLEEP(m_ptr)) strcat(buf,_("睡眠 ", "sleeping "));
+ if (MON_STUNNED(m_ptr)) strcat(buf, _("朦朧 ", "stunned "));
+ if (MON_MONFEAR(m_ptr)) strcat(buf, _("恐怖 ", "scared "));
+ if (MON_CONFUSED(m_ptr)) strcat(buf, _("混乱 ", "confused "));
+ if (MON_INVULNER(m_ptr)) strcat(buf, _("無敵 ", "invulnerable "));
buf[strlen(buf)-1] = '\0';
- prt(buf,0,0);
+ prt(buf, 0, 0);
/* HACK : Add the line to message buffer */
message_add(buf);
+
p_ptr->window |= (PW_MESSAGE);
- window_stuff();
+ handle_stuff();
if (m_ptr->ml) move_cursor_relative(m_ptr->fy, m_ptr->fx);
inkey();
Term->scr->cv = cv;
Term_fresh();
- /* Done */
if (probe)
{
chg_virtue(V_KNOWLEDGE, 1);
msg_print(_("これで全部です。", "That's all."));
}
-
- /* Result */
return (probe);
}
POSITION y, x;
int k, t;
cave_type *c_ptr;
- bool flag = FALSE;
+ bool flag = FALSE;
/* Prevent destruction of quest levels and town */
if ((p_ptr->inside_quest && is_fixed_quest_idx(p_ptr->inside_quest)) || !dun_level)
/* Stay in the circle of death */
if (k > r) continue;
-
- /* Access the grid */
c_ptr = &cave[y][x];
/* Lose room and vault */
/* During generation, destroyed artifacts are "preserved" */
if (preserve_mode || in_generate)
{
- s16b this_o_idx, next_o_idx = 0;
+ OBJECT_IDX this_o_idx, next_o_idx = 0;
/* Scan all objects in the grid */
for (this_o_idx = c_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
{
object_type *o_ptr;
-
- /* Acquire object */
o_ptr = &o_list[this_o_idx];
/* Acquire next object */
/* Stay in the circle of death */
if (k > r) continue;
-
- /* Access the grid */
c_ptr = &cave[y][x];
if (is_mirror_grid(c_ptr)) c_ptr->info |= CAVE_GLOW;
/* Hack -- Affect player */
if (flag)
{
- /* Message */
msg_print(_("燃えるような閃光が発生した!", "There is a searing blast of light!"));
/* Blind the player */
/* Mega-Hack -- Forget the view and lite */
p_ptr->update |= (PU_UN_VIEW | PU_UN_LITE);
- /* Update stuff */
p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MON_LITE | PU_MONSTERS);
- /* Redraw map */
p_ptr->redraw |= (PR_MAP);
- /* Window stuff */
p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
if (p_ptr->special_defense & NINJA_S_STEALTH)
*/
bool earthquake_aux(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx)
{
- int i, t;
+ DIRECTION i;
+ int t;
POSITION y, x, yy, xx, dy, dx;
int damage = 0;
int sn = 0;
/* Skip distant grids */
if (distance(cy, cx, yy, xx) > r) continue;
-
- /* Access the grid */
c_ptr = &cave[yy][xx];
/* Lose room and vault */
/* Important -- no wall on player */
map[16+p_ptr->y-cy][16+p_ptr->x-cx] = FALSE;
- /* Take some damage */
if (damage)
{
cptr killer;
/* Skip unaffected grids */
if (!map[16+yy-cy][16+xx-cx]) continue;
-
- /* Access the grid */
c_ptr = &cave[yy][xx];
if (c_ptr->m_idx == p_ptr->riding) continue;
/* Look for safety */
for (i = 0; i < 8; i++)
{
- /* Access the grid */
y = yy + ddy_ddd[i];
x = xx + ddx_ddd[i];
/* Delete (not kill) "dead" monsters */
if (m_ptr->hp < 0)
{
- /* Message */
if (!ignore_unview || is_seen(m_ptr))
msg_format(_("%^sは岩石に埋もれてしまった!", "%^s is embedded in the rock!"), m_name);
}
}
- /* Delete the monster */
+
delete_monster(yy, xx);
/* No longer safe */
m_ptr->fx = sx;
/* Update the monster (new location) */
- update_mon(m_idx, TRUE);
+ update_monster(m_idx, TRUE);
/* Redraw the old grid */
lite_spot(yy, xx);
/* Skip distant grids */
if (distance(cy, cx, yy, xx) > r) continue;
-
- /* Access the grid */
c_ptr = &cave[yy][xx];
if (is_mirror_grid(c_ptr)) c_ptr->info |= CAVE_GLOW;
/* Mega-Hack -- Forget the view and lite */
p_ptr->update |= (PU_UN_VIEW | PU_UN_LITE);
- /* Update stuff */
p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MON_LITE | PU_MONSTERS);
/* Update the health bar */
p_ptr->redraw |= (PR_HEALTH | PR_UHEALTH);
- /* Redraw map */
p_ptr->redraw |= (PR_MAP);
- /* Window stuff */
p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
if (p_ptr->special_defense & NINJA_S_STEALTH)
monster_type *m_ptr = &m_list[c_ptr->m_idx];
monster_race *r_ptr = &r_info[m_ptr->r_idx];
-
- /* Update the monster */
- update_mon(c_ptr->m_idx, FALSE);
+ update_monster(c_ptr->m_idx, FALSE);
/* Stupid monsters rarely wake up */
if (r_ptr->flags2 & (RF2_STUPID)) chance = 10;
if (m_ptr->ml)
{
char m_name[80];
-
- /* Acquire the monster name */
monster_desc(m_name, m_ptr, 0);
-
- /* Dump a message */
msg_format(_("%^sが目を覚ました。", "%^s wakes up."), m_name);
}
}
/* Note */
note_spot(y, x);
- /* Redraw */
lite_spot(y, x);
update_local_illumination(y, x);
/* Forget the grid */
if (!view_torch_grids) c_ptr->info &= ~(CAVE_MARK);
- /* Notice */
note_spot(y, x);
}
/* Process affected monsters */
if (c_ptr->m_idx)
{
- /* Update the monster */
- update_mon(c_ptr->m_idx, FALSE);
+ update_monster(c_ptr->m_idx, FALSE);
}
- /* Redraw */
lite_spot(y, x);
update_local_illumination(y, x);
static int next_to_open(POSITION cy, POSITION cx, bool (*pass_bold)(POSITION, POSITION))
{
int i;
-
POSITION y, x;
-
int len = 0;
int blen = 0;
* @param rad 効果半径
* @return 作用が実際にあった場合TRUEを返す
*/
-bool lite_area(HIT_POINT dam, int rad)
+bool lite_area(HIT_POINT dam, POSITION rad)
{
BIT_FLAGS flg = PROJECT_GRID | PROJECT_KILL;
* @param rad 効果半径
* @return 作用が実際にあった場合TRUEを返す
*/
-bool unlite_area(HIT_POINT dam, int rad)
+bool unlite_area(HIT_POINT dam, POSITION rad)
{
BIT_FLAGS flg = PROJECT_GRID | PROJECT_KILL;
* Affect grids, objects, and monsters
* </pre>
*/
-bool fire_ball(int typ, int dir, HIT_POINT dam, int rad)
+bool fire_ball(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad)
{
- int tx, ty;
+ POSITION tx, ty;
BIT_FLAGS flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
* Affect grids, objects, and monsters
* </pre>
*/
-bool fire_breath(int typ, int dir, HIT_POINT dam, int rad)
+bool fire_breath(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad)
{
return fire_ball(typ, dir, dam, -rad);
}
* Affect grids, objects, and monsters
* </pre>
*/
-bool fire_rocket(int typ, int dir, HIT_POINT dam, int rad)
+bool fire_rocket(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad)
{
- int tx, ty;
-
+ POSITION tx, ty;
BIT_FLAGS flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
/* Use the given direction */
* Affect grids, objects, and monsters
* </pre>
*/
-bool fire_ball_hide(int typ, int dir, HIT_POINT dam, int rad)
+bool fire_ball_hide(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad)
{
- int tx, ty;
-
+ POSITION tx, ty;
BIT_FLAGS flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_HIDE;
/* Use the given direction */
* @param dev 回数分散
* @return 作用が実際にあった場合TRUEを返す
*/
-bool fire_blast(int typ, int dir, int dd, int ds, int num, int dev)
+bool fire_blast(EFFECT_ID typ, DIRECTION dir, int dd, int ds, int num, int dev)
{
- int ly, lx, ld;
- int ty, tx, y, x;
+ POSITION ly, lx;
+ int ld;
+ POSITION ty, tx, y, x;
int i;
BIT_FLAGS flg = PROJECT_FAST | PROJECT_THRU | PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE | PROJECT_GRID;
* @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
* @return 作用が実際にあった場合TRUEを返す
*/
-bool teleport_swap(int dir)
+bool teleport_swap(DIRECTION dir)
{
- int tx, ty;
- cave_type * c_ptr;
- monster_type * m_ptr;
- monster_race * r_ptr;
+ POSITION tx, ty;
+ cave_type* c_ptr;
+ monster_type* m_ptr;
+ monster_race* r_ptr;
if ((dir == 5) && target_okay())
{
* @param flg フラグ
* @return 作用が実際にあった場合TRUEを返す
*/
-bool project_hook(int typ, int dir, HIT_POINT dam, BIT_FLAGS flg)
+bool project_hook(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, BIT_FLAGS flg)
{
int tx, ty;
* Affect monsters and grids (not objects).
* </pre>
*/
-bool fire_bolt(int typ, int dir, HIT_POINT dam)
+bool fire_bolt(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam)
{
BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_GRID;
if (typ != GF_ARROW) flg |= PROJECT_REFLECTABLE;
* Affect monsters, grids and objects.
* </pre>
*/
-bool fire_beam(int typ, int dir, HIT_POINT dam)
+bool fire_beam(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam)
{
BIT_FLAGS flg = PROJECT_BEAM | PROJECT_KILL | PROJECT_GRID | PROJECT_ITEM;
return (project_hook(typ, dir, dam, flg));
* Affect monsters, grids and objects.
* </pre>
*/
-bool fire_bolt_or_beam(int prob, int typ, int dir, HIT_POINT dam)
+bool fire_bolt_or_beam(PERCENTAGE prob, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam)
{
if (randint0(100) < prob)
{
* @param dam 威力
* @return 作用が実際にあった場合TRUEを返す
*/
-bool lite_line(int dir, HIT_POINT dam)
+bool lite_line(DIRECTION dir, HIT_POINT dam)
{
BIT_FLAGS flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_KILL;
return (project_hook(GF_LITE_WEAK, dir, dam, flg));
* @param dam 威力
* @return 作用が実際にあった場合TRUEを返す
*/
-bool hypodynamic_bolt(int dir, HIT_POINT dam)
+bool hypodynamic_bolt(DIRECTION dir, HIT_POINT dam)
{
BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
return (project_hook(GF_HYPODYNAMIA, dir, dam, flg));
* @param dam 威力
* @return 作用が実際にあった場合TRUEを返す
*/
-bool wall_to_mud(int dir, HIT_POINT dam)
+bool wall_to_mud(DIRECTION dir, HIT_POINT dam)
{
BIT_FLAGS flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
return (project_hook(GF_KILL_WALL, dir, dam, flg));
* @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
* @return 作用が実際にあった場合TRUEを返す
*/
-bool wizard_lock(int dir)
+bool wizard_lock(DIRECTION dir)
{
BIT_FLAGS flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
return (project_hook(GF_JAM_DOOR, dir, 20 + randint1(30), flg));
* @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
* @return 作用が実際にあった場合TRUEを返す
*/
-bool destroy_door(int dir)
+bool destroy_door(DIRECTION dir)
{
BIT_FLAGS flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM;
return (project_hook(GF_KILL_DOOR, dir, 0, flg));
* @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
* @return 作用が実際にあった場合TRUEを返す
*/
-bool disarm_trap(int dir)
+bool disarm_trap(DIRECTION dir)
{
BIT_FLAGS flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM;
return (project_hook(GF_KILL_TRAP, dir, 0, flg));
* @param dam 威力
* @return 作用が実際にあった場合TRUEを返す
*/
-bool heal_monster(int dir, HIT_POINT dam)
+bool heal_monster(DIRECTION dir, HIT_POINT dam)
{
BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
return (project_hook(GF_OLD_HEAL, dir, dam, flg));
* @param power 効力
* @return 作用が実際にあった場合TRUEを返す
*/
-bool speed_monster(int dir, int power)
+bool speed_monster(DIRECTION dir, int power)
{
BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
return (project_hook(GF_OLD_SPEED, dir, power, flg));
* @param power 効力
* @return 作用が実際にあった場合TRUEを返す
*/
-bool slow_monster(int dir, int power)
+bool slow_monster(DIRECTION dir, int power)
{
BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
return (project_hook(GF_OLD_SLOW, dir, power, flg));
* @param power 効力
* @return 作用が実際にあった場合TRUEを返す
*/
-bool sleep_monster(int dir, int power)
+bool sleep_monster(DIRECTION dir, int power)
{
BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
return (project_hook(GF_OLD_SLEEP, dir, power, flg));
* @return 作用が実際にあった場合TRUEを返す
* @details 威力はプレイヤーレベル*2に固定
*/
-bool stasis_monster(int dir)
+bool stasis_monster(DIRECTION dir)
{
return (fire_ball_hide(GF_STASIS, dir, p_ptr->lev*2, 0));
}
* @return 作用が実際にあった場合TRUEを返す
* @details 威力はプレイヤーレベル*2に固定
*/
-bool stasis_evil(int dir)
+bool stasis_evil(DIRECTION dir)
{
return (fire_ball_hide(GF_STASIS_EVIL, dir, p_ptr->lev*2, 0));
}
* @param plev プレイヤーレベル(=効力)
* @return 作用が実際にあった場合TRUEを返す
*/
-bool confuse_monster(int dir, int plev)
+bool confuse_monster(DIRECTION dir, PLAYER_LEVEL plev)
{
BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
return (project_hook(GF_OLD_CONF, dir, plev, flg));
* @param plev プレイヤーレベル(=効力)
* @return 作用が実際にあった場合TRUEを返す
*/
-bool stun_monster(int dir, int plev)
+bool stun_monster(DIRECTION dir, PLAYER_LEVEL plev)
{
BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
return (project_hook(GF_STUN, dir, plev, flg));
* @param power 効力
* @return 作用が実際にあった場合TRUEを返す
*/
-bool poly_monster(int dir, int power)
+bool poly_monster(DIRECTION dir, int power)
{
BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
bool tester = (project_hook(GF_OLD_POLY, dir, power, flg));
* @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
* @return 作用が実際にあった場合TRUEを返す
*/
-bool clone_monster(int dir)
+bool clone_monster(DIRECTION dir)
{
BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
return (project_hook(GF_OLD_CLONE, dir, 0, flg));
* @param plev プレイヤーレベル(=効力)
* @return 作用が実際にあった場合TRUEを返す
*/
-bool fear_monster(int dir, int plev)
+bool fear_monster(DIRECTION dir, PLAYER_LEVEL plev)
{
BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
return (project_hook(GF_TURN_ALL, dir, plev, flg));
* @param plev プレイヤーレベル(効力はplev*200)
* @return 作用が実際にあった場合TRUEを返す
*/
-bool death_ray(int dir, int plev)
+bool death_ray(DIRECTION dir, PLAYER_LEVEL plev)
{
BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
return (project_hook(GF_DEATH_RAY, dir, plev * 200, flg));
* @param distance 移動距離
* @return 作用が実際にあった場合TRUEを返す
*/
-bool teleport_monster(int dir, int distance)
+bool teleport_monster(DIRECTION dir, int distance)
{
BIT_FLAGS flg = PROJECT_BEAM | PROJECT_KILL;
return (project_hook(GF_AWAY_ALL, dir, distance, flg));
bool dummy = (project(0, 1, p_ptr->y, p_ptr->x, 0, GF_STONE_WALL, flg, -1));
- /* Update stuff */
p_ptr->update |= (PU_FLOW);
- /* Redraw map */
p_ptr->redraw |= (PR_MAP);
return dummy;
/*!
* @brief 死者復活処理(起点より周囲5マス)
- * @param who è¡\93è\80\85ã\83¢ã\83³ã\82¹ã\82¿ã\83¼ID(0ã\81ªã\82\89ã\81°ã\83\97ã\83¬ã\82¤ã\82\84ー)
+ * @param who è¡\93è\80\85ã\83¢ã\83³ã\82¹ã\82¿ã\83¼ID(0ã\81ªã\82\89ã\81°ã\83\97ã\83¬ã\82¤ã\83¤ー)
* @param y 起点Y座標
* @param x 起点X座標
* @return 作用が実際にあった場合TRUEを返す
void call_chaos(void)
{
int Chaos_type, dummy, dir;
- int plev = p_ptr->lev;
+ PLAYER_LEVEL plev = p_ptr->lev;
bool line_chaos = FALSE;
int hurt_types[31] =
*/
bool confuse_monsters(HIT_POINT dam)
{
- return (project_hack(GF_OLD_CONF, dam));
+ return (project_all_los(GF_OLD_CONF, dam));
}
*/
bool charm_monsters(HIT_POINT dam)
{
- return (project_hack(GF_CHARM, dam));
+ return (project_all_los(GF_CHARM, dam));
}
*/
bool charm_animals(HIT_POINT dam)
{
- return (project_hack(GF_CONTROL_ANIMAL, dam));
+ return (project_all_los(GF_CONTROL_ANIMAL, dam));
}
*/
bool stun_monsters(HIT_POINT dam)
{
- return (project_hack(GF_STUN, dam));
+ return (project_all_los(GF_STUN, dam));
}
*/
bool stasis_monsters(HIT_POINT dam)
{
- return (project_hack(GF_STASIS, dam));
+ return (project_all_los(GF_STASIS, dam));
}
*/
bool mindblast_monsters(HIT_POINT dam)
{
- return (project_hack(GF_PSI, dam));
+ return (project_all_los(GF_PSI, dam));
}
*/
bool banish_monsters(int dist)
{
- return (project_hack(GF_AWAY_ALL, dist));
+ return (project_all_los(GF_AWAY_ALL, dist));
}
*/
bool turn_evil(HIT_POINT dam)
{
- return (project_hack(GF_TURN_EVIL, dam));
+ return (project_all_los(GF_TURN_EVIL, dam));
}
*/
bool turn_monsters(HIT_POINT dam)
{
- return (project_hack(GF_TURN_ALL, dam));
+ return (project_all_los(GF_TURN_ALL, dam));
}
*/
bool deathray_monsters(void)
{
- return (project_hack(GF_DEATH_RAY, p_ptr->lev * 200));
+ return (project_all_los(GF_DEATH_RAY, p_ptr->lev * 200));
}
/*!
* @param plev パワー
* @return 作用が実際にあった場合TRUEを返す
*/
-bool charm_monster(int dir, int plev)
+bool charm_monster(DIRECTION dir, PLAYER_LEVEL plev)
{
BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(GF_CHARM, dir, plev, flg));
* @param plev パワー
* @return 作用が実際にあった場合TRUEを返す
*/
-bool control_one_undead(int dir, int plev)
+bool control_one_undead(DIRECTION dir, PLAYER_LEVEL plev)
{
BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(GF_CONTROL_UNDEAD, dir, plev, flg));
* @param plev パワー
* @return 作用が実際にあった場合TRUEを返す
*/
-bool control_one_demon(int dir, int plev)
+bool control_one_demon(DIRECTION dir, PLAYER_LEVEL plev)
{
BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(GF_CONTROL_DEMON, dir, plev, flg));
* @param plev パワー
* @return 作用が実際にあった場合TRUEを返す
*/
-bool charm_animal(int dir, int plev)
+bool charm_animal(DIRECTION dir, PLAYER_LEVEL plev)
{
BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(GF_CONTROL_ANIMAL, dir, plev, flg));
{
object_type forge;
object_type *q_ptr = &forge;
- int y, x;
+ POSITION y, x;
if (p_ptr->is_dead) return FALSE;
if (p_ptr->confused || p_ptr->blind || p_ptr->paralyzed || p_ptr->image) return FALSE;
*/
bool rush_attack(bool *mdeath)
{
- int dir;
+ DIRECTION dir;
int tx, ty;
int tm_idx = 0;
u16b path_g[32];
/* Move player before updating the monster */
if (!player_bold(ty, tx)) teleport_player_to(ty, tx, TELEPORT_NONMAGICAL);
-
- /* Update the monster */
- update_mon(cave[ny][nx].m_idx, TRUE);
+ update_monster(cave[ny][nx].m_idx, TRUE);
/* Found a monster */
m_ptr = &m_list[cave[ny][nx].m_idx];
* @param dir 発動の方向ID
* @return なし
*/
-void ring_of_power(int dir)
+void ring_of_power(DIRECTION dir)
{
/* Pick a random effect */
switch (randint1(10))
case 1:
case 2:
{
- /* Message */
msg_print(_("あなたは悪性のオーラに包み込まれた。", "You are surrounded by a malignant aura."));
sound(SOUND_EVIL);
case 3:
{
- /* Message */
msg_print(_("あなたは強力なオーラに包み込まれた。", "You are surrounded by a powerful aura."));
/* Dispel monsters */
* @param rad 効力の半径
* @return なし
*/
-void cast_meteor(HIT_POINT dam, int rad)
+void cast_meteor(HIT_POINT dam, POSITION rad)
{
int i;
int b = 10 + randint1(10);
* @param rad 効力の半径
* @return ターゲットを指定し、実行したならばTRUEを返す。
*/
-bool cast_wrath_of_the_god(HIT_POINT dam, int rad)
+bool cast_wrath_of_the_god(HIT_POINT dam, POSITION rad)
{
POSITION x, y, tx, ty;
POSITION nx, ny;
* while keeping the results quite random. It also allows some potent\n
* effects only at high level.
*/
-void cast_wonder(int dir)
+void cast_wonder(DIRECTION dir)
{
- int plev = p_ptr->lev;
+ PLAYER_LEVEL plev = p_ptr->lev;
int die = randint1(100) + plev / 5;
int vir = virtue_number(V_CHANCE);
* @param dir 方向ID
* @return なし
*/
-void cast_invoke_spirits(int dir)
+void cast_invoke_spirits(DIRECTION dir)
{
- int plev = p_ptr->lev;
+ PLAYER_LEVEL plev = p_ptr->lev;
int die = randint1(100) + plev / 5;
int vir = virtue_number(V_CHANCE);
*/
void cast_shuffle(void)
{
- int plev = p_ptr->lev;
- int dir;
+ PLAYER_LEVEL plev = p_ptr->lev;
+ DIRECTION dir;
int die;
int vir = virtue_number(V_CHANCE);
int i;
(void)set_cut(0);
(void)restore_all_status();
(void)set_shero(0, TRUE);
- update_stuff();
+ handle_stuff();
hp_player(5000);
return TRUE;
return ident;
}
-bool_hack cure_light_wounds(int dice, int sides)
+bool_hack cure_light_wounds(DICE_NUMBER dice, DICE_SID sides)
{
bool_hack ident = FALSE;
if (hp_player(damroll(dice, sides))) ident = TRUE;
return ident;
}
-bool_hack cure_serious_wounds(int dice, int sides)
+bool_hack cure_serious_wounds(DICE_NUMBER dice, DICE_SID sides)
{
bool_hack ident = FALSE;
if (hp_player(damroll(dice, sides))) ident = TRUE;
}
/* Only works on adjacent monsters */
- if (!get_rep_dir2(&dir)) return FALSE;
+ if (!get_direction(&dir, FALSE, FALSE)) return FALSE;
y = p_ptr->y + ddy[dir];
x = p_ptr->x + ddx[dir];
c_ptr = &cave[y][x];
DIRECTION dir;
POSITION x, y;
- if (!get_rep_dir2(&dir)) return FALSE;
+ if (!get_direction(&dir, FALSE, FALSE)) return FALSE;
y = p_ptr->y + ddy[dir];
x = p_ptr->x + ddx[dir];
if (cave[y][x].m_idx)
cptr q, s;
bool okay = FALSE;
- item_tester_no_ryoute = TRUE;
- /* Get an item */
q = _("どのアイテムを調べますか?", "Meditate on which item? ");
s = _("調べるアイテムがありません。", "You have nothing appropriate.");
- if (!get_item(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR))) return (FALSE);
+ if (!get_item(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT))) return (FALSE);
/* Get the item (in the pack) */
if (item >= 0)
/* Combine / Reorder the pack (later) */
p_ptr->notice |= (PN_COMBINE | PN_REORDER);
- /* Window stuff */
p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER);
/* Valid "tval" codes */