#include "player-race.h"
#include "player-class.h"
#include "view-mainwindow.h"
+#include "world.h"
/*!
* @brief 装備耐性に準じたブレス効果の選択テーブル /
* <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>
*/
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;
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) */
- 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;
}
}
/* 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;
{
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];
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 != '#'))
{
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,
case ACT_QUAKE:
{
- earthquake(user_ptr->y, user_ptr->x, 5, 0);
+ earthquake(user_ptr, user_ptr->y, user_ptr->x, 5, 0);
break;
}
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;
}
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;
}
case ACT_CHOIR_SINGS:
{
msg_print(_("天国の歌が聞こえる...", "A heavenly choir sings..."));
- (void)cure_critical_wounds(777);
+ (void)cure_critical_wounds(user_ptr, 777);
(void)set_hero(user_ptr, randint1(25) + 25, FALSE);
break;
}
case ACT_CURE_MW:
{
msg_print(_("深紫色の光を発している...", "It radiates deep purple..."));
- (void)cure_serious_wounds(4, 8);
+ (void)cure_serious_wounds(user_ptr, 4, 8);
break;
}
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;
}
{
msg_print(_("深青色に輝いている...", "It glows deep blue..."));
msg_print(_("体内に暖かい鼓動が感じられる...", "You feel a warm tingling inside..."));
- (void)cure_critical_wounds(700);
+ (void)cure_critical_wounds(user_ptr, 700);
break;
}
{
msg_print(_("白く明るく輝いている...", "It glows a bright white..."));
msg_print(_("ひじょうに気分がよい...", "You feel much better..."));
- (void)cure_critical_wounds(1000);
+ (void)cure_critical_wounds(user_ptr, 1000);
break;
}
case ACT_BERSERK:
{
- (void)berserk(randint1(25) + 25);
+ (void)berserk(p_ptr, randint1(25) + 25);
break;
}
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..."));
- warding_glyph();
+ warding_glyph(user_ptr);
break;
}
{
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;
}
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;
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? ")))
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;
}
case ACT_TELEPORT_LEVEL:
{
if (!get_check(_("本当に他の階にテレポートしますか?", "Are you sure? (Teleport Level)"))) return FALSE;
- teleport_level(0);
+ teleport_level(user_ptr, 0);
break;
}
break;
case ACT_INROU:
- mitokohmon();
+ mitokohmon(user_ptr);
break;
case ACT_MURAMASA:
if (one_in_(2))
{
msg_print(_("村正は壊れた!", "The Muramasa is destroyed!"));
- curse_weapon_object(TRUE, o_ptr);
+ curse_weapon_object(user_ptr, TRUE, o_ptr);
}
}
break;
case ACT_CRIMSON:
if (o_ptr->name1 != ART_CRIMSON) return FALSE;
msg_print(_("せっかくだから『クリムゾン』をぶっぱなすぜ!", "I'll fire CRIMSON! SEKKAKUDAKARA!"));
- if (!fire_crimson()) return FALSE;
+ if (!fire_crimson(user_ptr)) return FALSE;
break;
default: