OSDN Git Service
(root)
/
hengband
/
hengband.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[Fix] #39525 コメント置換ミス修正. / Fix comment replacing error.
[hengband/hengband.git]
/
src
/
cmd
/
cmd-activate.c
diff --git
a/src/cmd/cmd-activate.c
b/src/cmd/cmd-activate.c
index
87ad893
..
64dbce2
100644
(file)
--- a/
src/cmd/cmd-activate.c
+++ b/
src/cmd/cmd-activate.c
@@
-37,6
+37,7
@@
#include "player-race.h"
#include "player-class.h"
#include "view-mainwindow.h"
#include "player-race.h"
#include "player-class.h"
#include "view-mainwindow.h"
+#include "world.h"
/*!
* @brief 装備耐性に準じたブレス効果の選択テーブル /
/*!
* @brief 装備耐性に準じたブレス効果の選択テーブル /
@@
-343,7
+344,7
@@
const activation_type activation_info[] =
* <pre>
* Currently, only (some) artifacts, and Dragon Scale Mail, can be activated.
* But one could, for example, easily make an activatable "Ring of Plasma".
* <pre>
* Currently, only (some) artifacts, and Dragon Scale Mail, can be activated.
* But one could, for example, easily make an activatable "Ring of Plasma".
- * Note that it always takes a
current_world_ptr->game_
turn to activate an artifact, even if
+ * Note that it always takes a turn to activate an artifact, even if
* the user hits "escape" at the "direction" prompt.
* </pre>
*/
* the user hits "escape" at the "direction" prompt.
* </pre>
*/
@@
-355,7
+356,7
@@
void exe_activate(player_type *user_ptr, INVENTORY_IDX item)
object_type *o_ptr;
bool success;
object_type *o_ptr;
bool success;
- o_ptr = REF_ITEM(user_ptr, current_floor_ptr, item);
+ o_ptr = REF_ITEM(user_ptr,
user_ptr->
current_floor_ptr, item);
take_turn(user_ptr, 100);
lev = k_info[o_ptr->k_idx].level;
take_turn(user_ptr, 100);
lev = k_info[o_ptr->k_idx].level;
@@
-450,12
+451,12
@@
void exe_activate(player_type *user_ptr, INVENTORY_IDX item)
u16b dummy_why;
/* Allocate the "who" array */
u16b dummy_why;
/* Allocate the "who" array */
- C_MAKE(who, current_
floor
_ptr->max_m_idx, MONSTER_IDX);
+ C_MAKE(who, current_
world
_ptr->max_m_idx, MONSTER_IDX);
/* Process the monsters (backwards) */
/* Process the monsters (backwards) */
- for (pet_ctr = current_floor_ptr->m_max - 1; pet_ctr >= 1; pet_ctr--)
+ for (pet_ctr =
user_ptr->
current_floor_ptr->m_max - 1; pet_ctr >= 1; pet_ctr--)
{
{
- if (is_pet(¤t_floor_ptr->m_list[pet_ctr]) && (user_ptr->riding != pet_ctr))
+ if (is_pet(&
user_ptr->
current_floor_ptr->m_list[pet_ctr]) && (user_ptr->riding != pet_ctr))
who[max_pet++] = pet_ctr;
}
who[max_pet++] = pet_ctr;
}
@@
-469,7
+470,7
@@
void exe_activate(player_type *user_ptr, INVENTORY_IDX item)
}
/* Free the "who" array */
}
/* Free the "who" array */
- C_KILL(who, current_
floor
_ptr->max_m_idx, MONSTER_IDX);
+ C_KILL(who, current_
world
_ptr->max_m_idx, MONSTER_IDX);
}
o_ptr->timeout = 100 + randint1(100);
return;
}
o_ptr->timeout = 100 + randint1(100);
return;
@@
-540,10
+541,10
@@
void exe_activate(player_type *user_ptr, INVENTORY_IDX item)
{
if (place_monster_aux(0, user_ptr->y + ddy[dir], user_ptr->x + ddx[dir], o_ptr->pval, (PM_FORCE_PET | PM_NO_KAGE)))
{
{
if (place_monster_aux(0, user_ptr->y + ddy[dir], user_ptr->x + ddx[dir], o_ptr->pval, (PM_FORCE_PET | PM_NO_KAGE)))
{
- if (o_ptr->xtra3) current_floor_ptr->m_list[hack_m_idx_ii].mspeed = o_ptr->xtra3;
- if (o_ptr->xtra5) current_floor_ptr->m_list[hack_m_idx_ii].max_maxhp = o_ptr->xtra5;
- if (o_ptr->xtra4) current_floor_ptr->m_list[hack_m_idx_ii].hp = o_ptr->xtra4;
-
current_floor_ptr->m_list[hack_m_idx_ii].maxhp =
current_floor_ptr->m_list[hack_m_idx_ii].max_maxhp;
+ if (o_ptr->xtra3)
user_ptr->
current_floor_ptr->m_list[hack_m_idx_ii].mspeed = o_ptr->xtra3;
+ if (o_ptr->xtra5)
user_ptr->
current_floor_ptr->m_list[hack_m_idx_ii].max_maxhp = o_ptr->xtra5;
+ if (o_ptr->xtra4)
user_ptr->
current_floor_ptr->m_list[hack_m_idx_ii].hp = o_ptr->xtra4;
+
user_ptr->current_floor_ptr->m_list[hack_m_idx_ii].maxhp = user_ptr->
current_floor_ptr->m_list[hack_m_idx_ii].max_maxhp;
if (o_ptr->inscription)
{
char buf[80];
if (o_ptr->inscription)
{
char buf[80];
@@
-585,7
+586,7
@@
void exe_activate(player_type *user_ptr, INVENTORY_IDX item)
s--;
#endif
*s = '\0';
s--;
#endif
*s = '\0';
- current_floor_ptr->m_list[hack_m_idx_ii].nickname = quark_add(buf);
+
user_ptr->
current_floor_ptr->m_list[hack_m_idx_ii].nickname = quark_add(buf);
t = quark_str(o_ptr->inscription);
s = buf;
while(*t && (*t != '#'))
t = quark_str(o_ptr->inscription);
s = buf;
while(*t && (*t != '#'))
@@
-1009,7
+1010,7
@@
bool activate_artifact(player_type *user_ptr, object_type *o_ptr)
{
scatter(&y, &x, user_ptr->y, user_ptr->x, 4, 0);
if (!cave_have_flag_bold(y, x, FF_PROJECT)) continue;
{
scatter(&y, &x, user_ptr->y, user_ptr->x, 4, 0);
if (!cave_have_flag_bold(y, x, FF_PROJECT)) continue;
- if (!player_bold(y, x)) break;
+ if (!player_bold(
user_ptr,
y, x)) break;
}
project(0, 3, y, x, 150, GF_ELEC,
}
project(0, 3, y, x, 150, GF_ELEC,
@@
-1083,7
+1084,7
@@
bool activate_artifact(player_type *user_ptr, object_type *o_ptr)
case ACT_QUAKE:
{
case ACT_QUAKE:
{
- earthquake(user_ptr->y, user_ptr->x, 5, 0);
+ earthquake(user_ptr
, user_ptr
->y, user_ptr->x, 5, 0);
break;
}
break;
}
@@
-1191,7
+1192,7
@@
bool activate_artifact(player_type *user_ptr, object_type *o_ptr)
case ACT_SUMMON_PHANTOM:
{
msg_print(_("幻霊を召喚した。", "You summon a phantasmal servant."));
case ACT_SUMMON_PHANTOM:
{
msg_print(_("幻霊を召喚した。", "You summon a phantasmal servant."));
- (void)summon_specific(-1, user_ptr->y, user_ptr->x, current_floor_ptr->dun_level, SUMMON_PHANTOM, (PM_ALLOW_GROUP | PM_FORCE_PET));
+ (void)summon_specific(-1, user_ptr->y, user_ptr->x,
p_ptr->
current_floor_ptr->dun_level, SUMMON_PHANTOM, (PM_ALLOW_GROUP | PM_FORCE_PET));
break;
}
break;
}
@@
-1216,7
+1217,7
@@
bool activate_artifact(player_type *user_ptr, object_type *o_ptr)
case ACT_SUMMON_DAWN:
{
msg_print(_("暁の師団を召喚した。", "You summon the Legion of the Dawn."));
case ACT_SUMMON_DAWN:
{
msg_print(_("暁の師団を召喚した。", "You summon the Legion of the Dawn."));
- (void)summon_specific(-1, user_ptr->y, user_ptr->x, current_floor_ptr->dun_level, SUMMON_DAWN, (PM_ALLOW_GROUP | PM_FORCE_PET));
+ (void)summon_specific(-1, user_ptr->y, user_ptr->x,
p_ptr->
current_floor_ptr->dun_level, SUMMON_DAWN, (PM_ALLOW_GROUP | PM_FORCE_PET));
break;
}
break;
}
@@
-1266,7
+1267,7
@@
bool activate_artifact(player_type *user_ptr, object_type *o_ptr)
case ACT_REST_ALL:
{
msg_print(_("濃緑色に輝いている...", "It glows a deep green..."));
case ACT_REST_ALL:
{
msg_print(_("濃緑色に輝いている...", "It glows a deep green..."));
- (void)restore_all_status();
+ (void)restore_all_status(
user_ptr
);
(void)restore_level(user_ptr);
break;
}
(void)restore_level(user_ptr);
break;
}
@@
-1478,14
+1479,14
@@
bool activate_artifact(player_type *user_ptr, object_type *o_ptr)
case ACT_RUNE_EXPLO:
{
msg_print(_("明るい赤色に輝いている...", "It glows bright red..."));
case ACT_RUNE_EXPLO:
{
msg_print(_("明るい赤色に輝いている...", "It glows bright red..."));
- explosive_rune();
+ explosive_rune(
user_ptr->current_floor_ptr, user_ptr->y, user_ptr->x
);
break;
}
case ACT_RUNE_PROT:
{
msg_print(_("ブルーに明るく輝いている...", "It glows light blue..."));
break;
}
case ACT_RUNE_PROT:
{
msg_print(_("ブルーに明るく輝いている...", "It glows light blue..."));
- warding_glyph();
+ warding_glyph(
user_ptr
);
break;
}
break;
}
@@
-1571,7
+1572,7
@@
bool activate_artifact(player_type *user_ptr, object_type *o_ptr)
{
if (!get_aim_dir(&dir)) return FALSE;
msg_format(_("%sを伸ばした。", "You stretched your %s."), name);
{
if (!get_aim_dir(&dir)) return FALSE;
msg_format(_("%sを伸ばした。", "You stretched your %s."), name);
- fetch(dir, 500, TRUE);
+ fetch(
user_ptr,
dir, 500, TRUE);
break;
}
break;
}
@@
-1582,9
+1583,9
@@
bool activate_artifact(player_type *user_ptr, object_type *o_ptr)
monster_race *r_ptr;
msg_print(_("奇妙な場所が頭の中に浮かんだ...", "Some strange places show up in your mind. And you see ..."));
/* Process the monsters (backwards) */
monster_race *r_ptr;
msg_print(_("奇妙な場所が頭の中に浮かんだ...", "Some strange places show up in your mind. And you see ..."));
/* Process the monsters (backwards) */
- for (i = current_floor_ptr->m_max - 1; i >= 1; i--)
+ for (i =
p_ptr->
current_floor_ptr->m_max - 1; i >= 1; i--)
{
{
- m_ptr = ¤t_floor_ptr->m_list[i];
+ m_ptr = &
p_ptr->
current_floor_ptr->m_list[i];
/* Ignore "dead" monsters */
if (!monster_is_valid(m_ptr)) continue;
/* Ignore "dead" monsters */
if (!monster_is_valid(m_ptr)) continue;
@@
-1610,7
+1611,7
@@
bool activate_artifact(player_type *user_ptr, object_type *o_ptr)
teleport_player(222, 0L);
break;
case 11: case 12:
teleport_player(222, 0L);
break;
case 11: case 12:
- (void)stair_creation();
+ (void)stair_creation(
user_ptr
);
break;
default:
if (get_check(_("この階を去りますか?", "Leave this level? ")))
break;
default:
if (get_check(_("この階を去りますか?", "Leave this level? ")))
@@
-1625,7
+1626,7
@@
bool activate_artifact(player_type *user_ptr, object_type *o_ptr)
case ACT_DISP_CURSE_XTRA:
{
msg_format(_("%sが真実を照らし出す...", "The %s exhibits the truth..."), name);
case ACT_DISP_CURSE_XTRA:
{
msg_format(_("%sが真実を照らし出す...", "The %s exhibits the truth..."), name);
- (void)remove_all_curse();
+ (void)remove_all_curse(
user_ptr
);
(void)probing();
break;
}
(void)probing();
break;
}
@@
-1709,7
+1710,7
@@
bool activate_artifact(player_type *user_ptr, object_type *o_ptr)
case ACT_TELEPORT_LEVEL:
{
if (!get_check(_("本当に他の階にテレポートしますか?", "Are you sure? (Teleport Level)"))) return FALSE;
case ACT_TELEPORT_LEVEL:
{
if (!get_check(_("本当に他の階にテレポートしますか?", "Are you sure? (Teleport Level)"))) return FALSE;
- teleport_level(0);
+ teleport_level(
user_ptr,
0);
break;
}
break;
}
@@
-1728,7
+1729,7
@@
bool activate_artifact(player_type *user_ptr, object_type *o_ptr)
break;
case ACT_INROU:
break;
case ACT_INROU:
- mitokohmon();
+ mitokohmon(
user_ptr
);
break;
case ACT_MURAMASA:
break;
case ACT_MURAMASA: