* @param tval 魔法書のtval
* @return 領域魔法の技能名称を保管した文字列ポインタ
*/
-cptr spell_category_name(int tval)
+cptr spell_category_name(OBJECT_TYPE_VALUE tval)
{
switch (tval)
{
* The "known" should be TRUE for cast/pray, FALSE for study
* </pre>
*/
-static int get_spell(int *sn, cptr prompt, int sval, bool learned, int use_realm)
+static int get_spell(int *sn, cptr prompt, OBJECT_SUBTYPE_VALUE sval, bool learned, int use_realm)
{
int i;
int spell = -1;
if (o_ptr->k_idx && check_book_realm(o_ptr->tval, o_ptr->sval)) return FALSE;
}
- for (i = cave[py][px].o_idx; i; i = o_ptr->next_o_idx)
+ for (i = cave[p_ptr->y][p_ptr->x].o_idx; i; i = o_ptr->next_o_idx)
{
o_ptr = &o_list[i];
if (o_ptr->k_idx && (o_ptr->marked & OM_FOUND) && check_book_realm(o_ptr->tval, o_ptr->sval)) return FALSE;
* @param next_realm 変更先の魔法領域ID
* @return なし
*/
-static void change_realm2(int next_realm)
+static void change_realm2(CHARACTER_IDX next_realm)
{
int i, j = 0;
char tmp[80];
}
/* Take a turn */
- energy_use = 100;
+ p_ptr->energy_use = 100;
switch (mp_ptr->spell_book)
{
static void wild_magic(int spell)
{
int counter = 0;
- int type = SUMMON_BIZARRE1 + randint0(6);
+ int type = SUMMON_MOLD + randint0(6);
- if (type < SUMMON_BIZARRE1) type = SUMMON_BIZARRE1;
- else if (type > SUMMON_BIZARRE6) type = SUMMON_BIZARRE6;
+ if (type < SUMMON_MOLD) type = SUMMON_MOLD;
+ else if (type > SUMMON_MIMIC) type = SUMMON_MIMIC;
switch (randint1(spell) + randint1(8) + 1)
{
break;
case 19:
case 20:
- trap_creation(py, px);
+ trap_creation(p_ptr->y, p_ptr->x);
break;
case 21:
case 22:
aggravate_monsters(0);
break;
case 26:
- earthquake(py, px, 5);
+ earthquake(p_ptr->y, p_ptr->x, 5);
break;
case 27:
case 28:
case 35:
while (counter++ < 8)
{
- (void)summon_specific(0, py, px, (dun_level * 3) / 2, type, (PM_ALLOW_GROUP | PM_NO_PET));
+ (void)summon_specific(0, p_ptr->y, p_ptr->x, (dun_level * 3) / 2, type, (PM_ALLOW_GROUP | PM_NO_PET));
}
break;
case 36:
case 37:
- activate_hi_summon(py, px, FALSE);
+ activate_hi_summon(p_ptr->y, p_ptr->x, FALSE);
break;
case 38:
- (void)summon_cyber(-1, py, px);
+ (void)summon_cyber(-1, p_ptr->y, p_ptr->x);
break;
default:
{
}
/* Take a turn */
- energy_use = 100;
+ p_ptr->energy_use = 100;
/* Over-exert the player */
{
monster_type *m_ptr;
bool all_pets = FALSE;
- int pet_ctr, i;
+ IDX pet_ctr;
+ int i;
int Dismissed = 0;
u16b *who;
cave_type *c_ptr;
/* Access the location */
- y = py + ddy_ddd[i];
- x = px + ddx_ddd[i];
+ y = p_ptr->y + ddy_ddd[i];
+ x = p_ptr->x + ddx_ddd[i];
c_ptr = &cave[y][x];
return FALSE;
}
- oy = py;
- ox = px;
+ oy = p_ptr->y;
+ ox = p_ptr->x;
- py = sy;
- px = sx;
+ p_ptr->y = sy;
+ p_ptr->x = sx;
/* Redraw the old spot */
lite_spot(oy, ox);
/* Redraw the new spot */
- lite_spot(py, px);
+ lite_spot(p_ptr->y, p_ptr->x);
/* Check for new panel */
verify_panel();
/* Move the player */
if (sy && !p_ptr->is_dead)
- (void)move_player_effect(py, px, MPE_DONT_PICKUP | MPE_DONT_SWAP_MON);
+ (void)move_player_effect(p_ptr->y, p_ptr->x, MPE_DONT_PICKUP | MPE_DONT_SWAP_MON);
return fall_dam;
}
monster_type *m_ptr;
if (!get_rep_dir2(&dir)) return FALSE;
- y = py + ddy[dir];
- x = px + ddx[dir];
+ y = p_ptr->y + ddy[dir];
+ x = p_ptr->x + ddx[dir];
c_ptr = &cave[y][x];
if (p_ptr->special_defense & KATA_MUSOU) set_action(ACTION_NONE);
return FALSE;
}
- if (!pattern_seq(py, px, y, x)) return FALSE;
+ if (!pattern_seq(p_ptr->y, p_ptr->x, y, x)) return FALSE;
if (c_ptr->m_idx)
{
/* Take a turn */
- energy_use = 100;
+ p_ptr->energy_use = 100;
/* Message */
msg_print(_("モンスターが立ちふさがっている!", "There is a monster in the way!"));
return FALSE;
}
- if (!pattern_seq(py, px, y, x)) return FALSE;
+ if (!pattern_seq(p_ptr->y, p_ptr->x, y, x)) return FALSE;
if (!player_can_ride_aux(c_ptr, TRUE))
{
if (r_info[m_ptr->r_idx].level > randint1((p_ptr->skill_exp[GINOU_RIDING] / 50 + p_ptr->lev / 2 + 20)))
{
msg_print(_("うまく乗れなかった。", "You failed to ride."));
- energy_use = 100;
+ p_ptr->energy_use = 100;
return FALSE;
}
if (p_ptr->riding == p_ptr->health_who) health_track(0);
}
- energy_use = 100;
+ p_ptr->energy_use = 100;
/* Mega-Hack -- Forget the view and lite */
p_ptr->update |= (PU_UN_VIEW | PU_UN_LITE);
m_ptr->nickname = quark_add(out_val);
if (record_named_pet)
{
- char m_name[80];
-
monster_desc(m_name, m_ptr, MD_INDEF_VISIBLE);
do_cmd_write_nikki(NIKKI_NAMED_PET, RECORD_NAMED_PET_NAME, m_name);
}
{
if (record_named_pet && old_name)
{
- char m_name[80];
-
monster_desc(m_name, m_ptr, MD_INDEF_VISIBLE);
do_cmd_write_nikki(NIKKI_NAMED_PET, RECORD_NAMED_PET_UNNAME, m_name);
}
/* Abort if needed */
if (!flag)
{
- energy_use = 0;
+ p_ptr->energy_use = 0;
return;
}