sound(SOUND_EAT);
/* Take a turn */
- energy_use = 100;
+ p_ptr->energy_use = 100;
/* Identity not known yet */
ident = FALSE;
object_prep(q_ptr, lookup_kind(o_ptr->tval, o_ptr->sval));
/* Drop the object from heaven */
- (void)drop_near(q_ptr, -1, py, px);
+ (void)drop_near(q_ptr, -1, p_ptr->y, p_ptr->x);
}
else
{
*/
void do_cmd_eat_food(void)
{
- int item;
+ OBJECT_IDX item;
cptr q, s;
item_tester_hook = item_tester_hook_eatable;
/* Get an item */
-#ifdef JP
- q = "どれを食べますか? ";
- s = "食べ物がない。";
-#else
- q = "Eat which item? ";
- s = "You have nothing to eat.";
-#endif
+ q = _("どれを食べますか? ", "Eat which item? ");
+ s = _("食べ物がない。", "You have nothing to eat.");
if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return;
/* Take a turn */
- energy_use = 100;
+ p_ptr->energy_use = 100;
if (world_player)
{
{
switch (q_ptr->sval)
{
-#ifdef JP
/* 飲みごたえをオリジナルより細かく表現 */
case SV_POTION_WATER:
- msg_print("口の中がさっぱりした。");
- msg_print("のどの渇きが少しおさまった。");
+ msg_print(_("口の中がさっぱりした。", ""));
+ msg_print(_("のどの渇きが少しおさまった。", "You feel less thirsty."));
ident = TRUE;
break;
case SV_POTION_APPLE_JUICE:
- msg_print("甘くてサッパリとしていて、とてもおいしい。");
- msg_print("のどの渇きが少しおさまった。");
- ident = TRUE;
- break;
-
- case SV_POTION_SLIME_MOLD:
- msg_print("なんとも不気味な味だ。");
- msg_print("のどの渇きが少しおさまった。");
+ msg_print(_("甘くてサッパリとしていて、とてもおいしい。", ""));
+ msg_print(_("のどの渇きが少しおさまった。", "You feel less thirsty."));
ident = TRUE;
break;
-#else
- case SV_POTION_WATER:
- case SV_POTION_APPLE_JUICE:
case SV_POTION_SLIME_MOLD:
- msg_print("You feel less thirsty.");
+ msg_print(_("なんとも不気味な味だ。", ""));
+ msg_print(_("のどの渇きが少しおさまった。", "You feel less thirsty."));
ident = TRUE;
break;
-#endif
case SV_POTION_SLOWNESS:
if (set_slow(randint1(25) + 15, FALSE)) ident = TRUE;
else wiz_dark();
(void)teleport_player_aux(100, TELEPORT_NONMAGICAL | TELEPORT_PASSIVE);
wiz_dark();
-#ifdef JP
- msg_print("知らない場所で目が醒めた。頭痛がする。");
- msg_print("何も思い出せない。どうやってここへ来たのかも分からない!");
-#else
- msg_print("You wake up somewhere with a sore head...");
- msg_print("You can't remember a thing, or how you got here!");
-#endif
-
+ msg_print(_("知らない場所で目が醒めた。頭痛がする。", "You wake up somewhere with a sore head..."));
+ msg_print(_("何も思い出せない。どうやってここへ来たのかも分からない!", "You can't remember a thing, or how you got here!"));
}
}
break;
{
msg_print(_("恐ろしい光景が頭に浮かんできた。", "A horrible vision enters your mind."));
- /* Pick a nightmare */
- get_mon_num_prep(get_nightmare, NULL);
-
/* Have some nightmares */
- have_nightmare(get_mon_num(MAX_DEPTH));
-
- /* Remove the monster restriction */
- get_mon_num_prep(NULL, NULL);
+ sanity_blast(NULL, FALSE);
}
if (set_paralyzed(p_ptr->paralyzed + randint0(4) + 4))
{
break;
case SV_POTION_RUINATION:
-#ifdef JP
- msg_print("身も心も弱ってきて、精気が抜けていくようだ。");
- take_hit(DAMAGE_LOSELIFE, damroll(10, 10), "破滅の薬", -1);
-#else
- msg_print("Your nerves and muscles feel weak and lifeless!");
- take_hit(DAMAGE_LOSELIFE, damroll(10, 10), "a potion of Ruination", -1);
-#endif
+ msg_print(_("身も心も弱ってきて、精気が抜けていくようだ。", "Your nerves and muscles feel weak and lifeless!"));
+ take_hit(DAMAGE_LOSELIFE, damroll(10, 10), _("破滅の薬", "a potion of Ruination"), -1);
(void)dec_stat(A_DEX, 25, TRUE);
(void)dec_stat(A_WIS, 25, TRUE);
break;
case SV_POTION_DETONATIONS:
-#ifdef JP
- msg_print("体の中で激しい爆発が起きた!");
- take_hit(DAMAGE_NOESCAPE, damroll(50, 20), "爆発の薬", -1);
-#else
- msg_print("Massive explosions rupture your body!");
- take_hit(DAMAGE_NOESCAPE, damroll(50, 20), "a potion of Detonation", -1);
-#endif
+ msg_print(_("体の中で激しい爆発が起きた!", "Massive explosions rupture your body!"));
+ take_hit(DAMAGE_NOESCAPE, damroll(50, 20), _("爆発の薬", "a potion of Detonation"), -1);
(void)set_stun(p_ptr->stun + 75);
(void)set_cut(p_ptr->cut + 5000);
case SV_POTION_DEATH:
chg_virtue(V_VITALITY, -1);
chg_virtue(V_UNLIFE, 5);
-#ifdef JP
- msg_print("死の予感が体中を駆けめぐった。");
- take_hit(DAMAGE_LOSELIFE, 5000, "死の薬", -1);
-#else
- msg_print("A feeling of Death flows through your body.");
- take_hit(DAMAGE_LOSELIFE, 5000, "a potion of Death", -1);
-#endif
-
+ msg_print(_("死の予感が体中を駆けめぐった。", "A feeling of Death flows through your body."));
+ take_hit(DAMAGE_LOSELIFE, 5000, _("死の薬", "a potion of Death"), -1);
ident = TRUE;
break;
}
for (; i < EATER_EXT*3; i++)
{
- int k_idx = lookup_kind(TV_ROD, i-EATER_EXT*2);
+ KIND_OBJECT_IDX k_idx = lookup_kind(TV_ROD, i-EATER_EXT*2);
p_ptr->magic_num1[i] -= ((p_ptr->magic_num2[i] < 10) ? EATER_ROD_CHARGE*3 : p_ptr->magic_num2[i]*EATER_ROD_CHARGE/3)*k_info[k_idx].pval;
if (p_ptr->magic_num1[i] < 0) p_ptr->magic_num1[i] = 0;
}
do_cmd_rerate(FALSE);
get_max_stats();
p_ptr->update |= PU_BONUS;
- if (p_ptr->muta1 || p_ptr->muta2 || p_ptr->muta3)
- {
- chg_virtue(V_CHANCE, -5);
- msg_print(_("全ての突然変異が治った。", "You are cured of all mutations."));
- p_ptr->muta1 = p_ptr->muta2 = p_ptr->muta3 = 0;
- p_ptr->update |= PU_BONUS;
- handle_stuff();
- mutant_regenerate_mod = calc_mutant_regenerate_mod();
- }
+ lose_all_mutations();
ident = TRUE;
break;
case SV_POTION_POLYMORPH:
if ((p_ptr->muta1 || p_ptr->muta2 || p_ptr->muta3) && one_in_(23))
{
- chg_virtue(V_CHANCE, -5);
- msg_print(_("全ての突然変異が治った。", "You are cured of all mutations."));
- p_ptr->muta1 = p_ptr->muta2 = p_ptr->muta3 = 0;
- p_ptr->update |= PU_BONUS;
- handle_stuff();
+ lose_all_mutations();
}
else
{
if (prace_is_(RACE_SKELETON))
{
msg_print(_("液体の一部はあなたのアゴを素通りして落ちた!", "Some of the fluid falls through your jaws!"));
- (void)potion_smash_effect(0, py, px, q_ptr->k_idx);
+ (void)potion_smash_effect(0, p_ptr->y, p_ptr->x, q_ptr->k_idx);
}
/* Combine / Reorder the pack (later) */
*/
void do_cmd_quaff_potion(void)
{
- int item;
+ OBJECT_IDX item;
cptr q, s;
if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
item_tester_hook = item_tester_hook_quaff;
/* Get an item */
-#ifdef JP
- q = "どの薬を飲みますか? ";
- s = "飲める薬がない。";
-#else
- q = "Quaff which potion? ";
- s = "You have no potions to quaff.";
-#endif
+ q = _("どの薬を飲みますか? ", "Quaff which potion? ");
+ s = _("飲める薬がない。", "You have no potions to quaff.");
if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return;
/* Take a turn */
- energy_use = 100;
+ p_ptr->energy_use = 100;
if (world_player)
{
{
for (k = 0; k < randint1(3); k++)
{
- if (summon_specific(0, py, px, dun_level, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET)))
+ if (summon_specific(0, p_ptr->y, p_ptr->x, dun_level, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET)))
{
ident = TRUE;
}
{
for (k = 0; k < randint1(3); k++)
{
- if (summon_specific(0, py, px, dun_level, SUMMON_UNDEAD, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET)))
+ if (summon_specific(0, p_ptr->y, p_ptr->x, dun_level, SUMMON_UNDEAD, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET)))
{
ident = TRUE;
}
case SV_SCROLL_SUMMON_PET:
{
- if (summon_specific(-1, py, px, dun_level, 0, (PM_ALLOW_GROUP | PM_FORCE_PET)))
+ if (summon_specific(-1, p_ptr->y, p_ptr->x, dun_level, 0, (PM_ALLOW_GROUP | PM_FORCE_PET)))
{
ident = TRUE;
}
case SV_SCROLL_SUMMON_KIN:
{
- if (summon_kin_player(p_ptr->lev, py, px, (PM_FORCE_PET | PM_ALLOW_GROUP)))
+ if (summon_kin_player(p_ptr->lev, p_ptr->y, p_ptr->x, (PM_FORCE_PET | PM_ALLOW_GROUP)))
{
ident = TRUE;
}
case SV_SCROLL_TRAP_CREATION:
{
- if (trap_creation(py, px)) ident = TRUE;
+ if (trap_creation(p_ptr->y, p_ptr->x)) ident = TRUE;
break;
}
case SV_SCROLL_STAR_DESTRUCTION:
{
- if (destroy_area(py, px, 13 + randint0(5), FALSE))
+ if (destroy_area(p_ptr->y, p_ptr->x, 13 + randint0(5), FALSE))
ident = TRUE;
else
msg_print(_("ダンジョンが揺れた...", "The dungeon trembles..."));
case SV_SCROLL_ACQUIREMENT:
{
- acquirement(py, px, 1, TRUE, FALSE, FALSE);
+ acquirement(p_ptr->y, p_ptr->x, 1, TRUE, FALSE, FALSE);
ident = TRUE;
break;
}
case SV_SCROLL_STAR_ACQUIREMENT:
{
- acquirement(py, px, randint1(2) + 1, TRUE, FALSE, FALSE);
+ acquirement(p_ptr->y, p_ptr->x, randint1(2) + 1, TRUE, FALSE, FALSE);
ident = TRUE;
break;
}
case SV_SCROLL_AMUSEMENT:
{
ident = TRUE;
- amusement(py, px, 1, FALSE);
+ amusement(p_ptr->y, p_ptr->x, 1, FALSE);
break;
}
case SV_SCROLL_STAR_AMUSEMENT:
{
ident = TRUE;
- amusement(py, px, randint1(2) + 1, FALSE);
+ amusement(p_ptr->y, p_ptr->x, randint1(2) + 1, FALSE);
break;
}
}
}
else if (o_ptr->name1 == ART_GHB)
{
-#ifdef JP
- msg_print("私は苦労して『グレーター・ヘル=ビースト』を倒した。");
- msg_print("しかし手に入ったのはこのきたないTシャツだけだった。");
-#else
- msg_print("I had a very hard time to kill the Greater hell-beast, ");
- msg_print("but all I got was this lousy t-shirt!");
-#endif
+ msg_print(_("私は苦労して『グレーター・ヘル=ビースト』を倒した。", "I had a very hard time to kill the Greater hell-beast, "));
+ msg_print(_("しかし手に入ったのはこのきたないTシャツだけだった。", "but all I got was this lousy t-shirt!"));
used_up = FALSE;
}
else if (o_ptr->name1 == ART_POWER)
{
-#ifdef JP
- msg_print("「一つの指輪は全てを統べ、");
- msg_print(NULL);
- msg_print("一つの指輪は全てを見つけ、");
- msg_print(NULL);
- msg_print("一つの指輪は全てを捕らえて");
+ msg_print(_("「一つの指輪は全てを統べ、", "'One Ring to rule them all, "));
msg_print(NULL);
- msg_print("暗闇の中に繋ぎとめる。」");
-#else
- msg_print("'One Ring to rule them all, ");
- msg_print(NULL);
- msg_print("One Ring to find them, ");
+ msg_print(_("一つの指輪は全てを見つけ、", "One Ring to find them, "));
msg_print(NULL);
- msg_print("One Ring to bring them all ");
+ msg_print(_("一つの指輪は全てを捕らえて", "One Ring to bring them all "));
msg_print(NULL);
- msg_print("and in the darkness bind them.'");
-#endif
+ msg_print(_("暗闇の中に繋ぎとめる。」", "and in the darkness bind them.'"));
used_up = FALSE;
}
else if (o_ptr->tval==TV_PARCHMENT)
void do_cmd_read_scroll(void)
{
object_type *o_ptr;
- int item;
+ OBJECT_IDX item;
cptr q, s;
if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
item_tester_hook = item_tester_hook_readable;
/* Get an item */
-#ifdef JP
- q = "どの巻物を読みますか? ";
- s = "読める巻物がない。";
-#else
- q = "Read which scroll? ";
- s = "You have no scrolls to read.";
-#endif
+ q = _("どの巻物を読みますか? ", "Read which scroll? ");
+ s = _("読める巻物がない。", "You have no scrolls to read.");
if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return;
* @param known 判明済ならばTRUE
* @return 発動により効果内容が確定したならばTRUEを返す
*/
-static int staff_effect(int sval, bool *use_charge, bool powerful, bool magic, bool known)
+static int staff_effect(OBJECT_SUBTYPE_VALUE sval, bool *use_charge, bool powerful, bool magic, bool known)
{
int k;
int ident = FALSE;
const int times = randint1(powerful ? 8 : 4);
for (k = 0; k < times; k++)
{
- if (summon_specific(0, py, px, dun_level, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET)))
+ if (summon_specific(0, p_ptr->y, p_ptr->x, dun_level, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET)))
{
ident = TRUE;
}
case SV_STAFF_STARLITE:
{
- int num = damroll(5, 3);
- int y, x;
+ HIT_POINT num = damroll(5, 3);
+ POSITION y = 0, x = 0;
int attempts;
if (!p_ptr->blind && !magic)
while (attempts--)
{
- scatter(&y, &x, py, px, 4, 0);
+ scatter(&y, &x, p_ptr->y, p_ptr->x, 4, 0);
if (!cave_have_flag_bold(y, x, FF_PROJECT)) continue;
case SV_STAFF_EARTHQUAKES:
{
- if (earthquake(py, px, (powerful ? 15 : 10)))
+ if (earthquake(p_ptr->y, p_ptr->x, (powerful ? 15 : 10)))
ident = TRUE;
else
msg_print(_("ダンジョンが揺れた。", "The dungeon trembles."));
case SV_STAFF_DESTRUCTION:
{
- if (destroy_area(py, px, (powerful ? 18 : 13) + randint0(5), FALSE))
+ if (destroy_area(p_ptr->y, p_ptr->x, (powerful ? 18 : 13) + randint0(5), FALSE))
ident = TRUE;
break;
case SV_STAFF_ANIMATE_DEAD:
{
- if (animate_dead(0, py, px))
+ if (animate_dead(0, p_ptr->y, p_ptr->x))
ident = TRUE;
break;
case SV_STAFF_MSTORM:
{
msg_print(_("強力な魔力が敵を引き裂いた!", "Mighty magics rend your enemies!"));
- project(0, (powerful ? 7 : 5), py, px,
+ project(0, (powerful ? 7 : 5), p_ptr->y, p_ptr->x,
(randint1(200) + (powerful ? 500 : 300)) * 2, GF_MANA, PROJECT_KILL | PROJECT_ITEM | PROJECT_GRID, -1);
if ((p_ptr->pclass != CLASS_MAGE) && (p_ptr->pclass != CLASS_HIGH_MAGE) && (p_ptr->pclass != CLASS_SORCERER) && (p_ptr->pclass != CLASS_MAGIC_EATER) && (p_ptr->pclass != CLASS_BLUE_MAGE))
{
/* Take a turn */
- energy_use = 100;
+ p_ptr->energy_use = 100;
/* Extract the item level */
lev = k_info[o_ptr->k_idx].level;
*/
void do_cmd_use_staff(void)
{
- int item;
+ OBJECT_IDX item;
cptr q, s;
if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
item_tester_tval = TV_STAFF;
/* Get an item */
-#ifdef JP
- q = "どの杖を使いますか? ";
- s = "使える杖がない。";
-#else
- q = "Use which staff? ";
- s = "You have no staff to use.";
-#endif
+ q = _("どの杖を使いますか? ", "Use which staff? ");
+ s = _("使える杖がない。", "You have no staff to use.");
if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return;
* @param magic 魔道具術上の処理ならばTRUE
* @return 発動により効果内容が確定したならばTRUEを返す
*/
-static int wand_effect(int sval, int dir, bool powerful, bool magic)
+static int wand_effect(OBJECT_SUBTYPE_VALUE sval, int dir, bool powerful, bool magic)
{
int ident = FALSE;
int lev = powerful ? p_ptr->lev * 2 : p_ptr->lev;
if (sval == SV_WAND_WONDER)
{
int vir = virtue_number(V_CHANCE);
- sval = randint0(SV_WAND_WONDER);
+ sval = (OBJECT_SUBTYPE_VALUE)randint0(SV_WAND_WONDER);
if (vir)
{
{
case SV_WAND_HEAL_MONSTER:
{
- int dam = damroll((powerful ? 20 : 10), 10);
+ HIT_POINT dam = damroll((powerful ? 20 : 10), 10);
if (heal_monster(dir, dam)) ident = TRUE;
break;
}
case SV_WAND_STONE_TO_MUD:
{
- int dam = powerful ? 40 + randint1(60) : 20 + randint1(30);
+ HIT_POINT dam = powerful ? 40 + randint1(60) : 20 + randint1(30);
if (wall_to_mud(dir, dam)) ident = TRUE;
break;
}
case SV_WAND_LITE:
{
- int dam = damroll((powerful ? 12 : 6), 8);
+ HIT_POINT dam = damroll((powerful ? 12 : 6), 8);
msg_print(_("青く輝く光線が放たれた。", "A line of blue shimmering light appears."));
(void)lite_line(dir, dam);
ident = TRUE;
break;
}
- case SV_WAND_DRAIN_LIFE:
+ case SV_WAND_HYPODYNAMIA:
{
- if (drain_life(dir, 80 + lev)) ident = TRUE;
+ if (hypodynamic_bolt(dir, 80 + lev)) ident = TRUE;
break;
}
case SV_WAND_DRAGON_FIRE:
{
- fire_ball(GF_FIRE, dir, (powerful ? 300 : 200), -3);
+ fire_breath(GF_FIRE, dir, (powerful ? 300 : 200), 3);
ident = TRUE;
break;
}
case SV_WAND_DRAGON_COLD:
{
- fire_ball(GF_COLD, dir, (powerful ? 270 : 180), -3);
+ fire_breath(GF_COLD, dir, (powerful ? 270 : 180), 3);
ident = TRUE;
break;
}
case SV_WAND_DRAGON_BREATH:
{
- int dam;
+ HIT_POINT dam;
int typ;
switch (randint1(5))
target_pet = old_target_pet;
/* Take a turn */
- energy_use = 100;
+ p_ptr->energy_use = 100;
/* Get the level */
lev = k_info[o_ptr->k_idx].level;
*/
void do_cmd_aim_wand(void)
{
- int item;
+ OBJECT_IDX item;
cptr q, s;
/* Restrict choices to wands */
}
/* Get an item */
-#ifdef JP
- q = "どの魔法棒で狙いますか? ";
- s = "使える魔法棒がない。";
-#else
- q = "Aim which wand? ";
- s = "You have no wand to aim.";
-#endif
-
+ q = _("どの魔法棒で狙いますか? ", "Aim which wand? ");
+ s = _("使える魔法棒がない。", "You have no wand to aim.");
+
if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return;
/* Aim the wand */
* @param magic 魔道具術上の処理ならばTRUE
* @return 発動により効果内容が確定したならばTRUEを返す
*/
-static int rod_effect(int sval, int dir, bool *use_charge, bool powerful, bool magic)
+static int rod_effect(OBJECT_SUBTYPE_VALUE sval, int dir, bool *use_charge, bool powerful, bool magic)
{
int ident = FALSE;
int lev = powerful ? p_ptr->lev * 2 : p_ptr->lev;
case SV_ROD_LITE:
{
- int dam = damroll((powerful ? 12 : 6), 8);
+ HIT_POINT dam = damroll((powerful ? 12 : 6), 8);
msg_print(_("青く輝く光線が放たれた。", "A line of blue shimmering light appears."));
(void)lite_line(dir, dam);
ident = TRUE;
break;
}
- case SV_ROD_DRAIN_LIFE:
+ case SV_ROD_HYPODYNAMIA:
{
- if (drain_life(dir, 70 + 3 * lev / 2)) ident = TRUE;
+ if (hypodynamic_bolt(dir, 70 + 3 * lev / 2)) ident = TRUE;
break;
}
case SV_ROD_STONE_TO_MUD:
{
- int dam = powerful ? 40 + randint1(60) : 20 + randint1(30);
+ HIT_POINT dam = powerful ? 40 + randint1(60) : 20 + randint1(30);
if (wall_to_mud(dir, dam)) ident = TRUE;
break;
}
/* Take a turn */
- energy_use = 100;
+ p_ptr->energy_use = 100;
/* Extract the item level */
lev = k_info[o_ptr->k_idx].level;
*/
void do_cmd_zap_rod(void)
{
- int item;
+ OBJECT_IDX item;
cptr q, s;
if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
item_tester_tval = TV_ROD;
/* Get an item */
-#ifdef JP
- q = "どのロッドを振りますか? ";
- s = "使えるロッドがない。";
-#else
- q = "Zap which rod? ";
- s = "You have no rod to zap.";
-#endif
+ q = _("どのロッドを振りますか? ", "Zap which rod? ");
+ s = _("使えるロッドがない。", "You have no rod to zap.");
if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return;
}
/* Take a turn */
- energy_use = 100;
+ p_ptr->energy_use = 100;
/* Extract the item level */
lev = k_info[o_ptr->k_idx].level;
((o_ptr->sval == SV_LITE_TORCH) || (o_ptr->sval == SV_LITE_LANTERN)))
{
msg_print(_("燃料がない。", "It has no fuel."));
- energy_use = 0;
+ p_ptr->energy_use = 0;
return;
}
else
#endif
{
- int pet_ctr, i;
- u16b *who;
+ IDX pet_ctr, i;
+ IDX *who;
int max_pet = 0;
u16b dummy_why;
/* Allocate the "who" array */
- C_MAKE(who, max_m_idx, u16b);
+ C_MAKE(who, max_m_idx, IDX);
/* Process the monsters (backwards) */
for (pet_ctr = m_max - 1; pet_ctr >= 1; pet_ctr--)
for (i = 0; i < max_pet; i++)
{
pet_ctr = who[i];
- teleport_monster_to(pet_ctr, py, px, 100, TELEPORT_PASSIVE);
+ teleport_monster_to(pet_ctr, p_ptr->y, p_ptr->x, 100, TELEPORT_PASSIVE);
}
/* Free the "who" array */
- C_KILL(who, max_m_idx, u16b);
+ C_KILL(who, max_m_idx, IDX);
}
o_ptr->timeout = 100+randint1(100);
return;
if(fire_ball(GF_CAPTURE, dir, 0, 0))
{
- o_ptr->pval = cap_mon;
- o_ptr->xtra3 = cap_mspeed;
- o_ptr->xtra4 = cap_hp;
- o_ptr->xtra5 = cap_maxhp;
+ o_ptr->pval = (PARAMETER_VALUE)cap_mon;
+ o_ptr->xtra3 = (XTRA8)cap_mspeed;
+ o_ptr->xtra4 = (XTRA16)cap_hp;
+ o_ptr->xtra5 = (XTRA16)cap_maxhp;
if (cap_nickname)
{
cptr t;
}
else
{
- bool success = FALSE;
+ success = FALSE;
if (!get_rep_dir2(&dir)) return;
- if (monster_can_enter(py + ddy[dir], px + ddx[dir], &r_info[o_ptr->pval], 0))
+ if (monster_can_enter(p_ptr->y + ddy[dir], p_ptr->x + ddx[dir], &r_info[o_ptr->pval], 0))
{
- if (place_monster_aux(0, py + ddy[dir], px + ddx[dir], o_ptr->pval, (PM_FORCE_PET | PM_NO_KAGE)))
+ if (place_monster_aux(0, p_ptr->y + ddy[dir], p_ptr->x + ddx[dir], o_ptr->pval, (PM_FORCE_PET | PM_NO_KAGE)))
{
if (o_ptr->xtra3) m_list[hack_m_idx_ii].mspeed = o_ptr->xtra3;
if (o_ptr->xtra5) m_list[hack_m_idx_ii].max_maxhp = o_ptr->xtra5;
if (!success)
msg_print(_("おっと、解放に失敗した。", "Oops. You failed to release your pet."));
}
+ calc_android_exp();
return;
}
*/
void do_cmd_activate(void)
{
- int item;
+ OBJECT_IDX item;
cptr q, s;
item_tester_hook = item_tester_hook_activate;
/* Get an item */
-#ifdef JP
- q = "どのアイテムを始動させますか? ";
- s = "始動できるアイテムを装備していない。";
-#else
- q = "Activate which item? ";
- s = "You have nothing to activate.";
-#endif
+ q = _("どのアイテムを始動させますか? ", "Activate which item? ");
+ s = _("始動できるアイテムを装備していない。", "You have nothing to activate.");
if (!get_item(&item, q, s, (USE_EQUIP))) return;
*/
void do_cmd_use(void)
{
- int item;
+ OBJECT_IDX item;
object_type *o_ptr;
cptr q, s;
item_tester_hook = item_tester_hook_use;
/* Get an item */
-#ifdef JP
-q = "どれを使いますか?";
-s = "使えるものがありません。";
-#else
- q = "Use which item? ";
- s = "You have nothing to use.";
-#endif
+ q = _("どれを使いますか?", "Use which item? ");
+ s = _("使えるものがありません。", "You have nothing to use.");
if (!get_item(&item, q, s, (USE_INVEN | USE_EQUIP | USE_FLOOR))) return;
* @param only_browse 閲覧するだけならばTRUE
* @return 選択した魔力のID、キャンセルならば-1を返す
*/
-static int select_magic_eater(bool only_browse)
+static OBJECT_SUBTYPE_VALUE select_magic_eater(bool only_browse)
{
- int ext=0;
+ OBJECT_SUBTYPE_VALUE ext = 0;
char choice;
bool flag, request_list;
- int tval = 0;
- int ask = TRUE, i = 0;
+ OBJECT_TYPE_VALUE tval = 0;
+ int ask = TRUE;
+ OBJECT_SUBTYPE_VALUE i = 0;
char out_val[160];
int menu_line = (use_menu ? 1 : 0);
#ifdef ALLOW_REPEAT
- int sn;
+ COMMAND_CODE sn;
if (repeat_pull(&sn))
{
/* Verify the spell */
if (request_list || use_menu)
{
byte y, x = 0;
- int ctr, chance;
- int k_idx;
+ OBJECT_SUBTYPE_VALUE ctr;
+ PERCENTAGE chance;
+ IDX k_idx;
char dummy[80];
- int x1, y1, level;
+ POSITION x1, y1;
+ int level;
byte col;
strcpy(dummy, "");
ask = (isupper(choice));
/* Lowercase */
- if (ask) choice = tolower(choice);
+ if (ask) choice = (char)tolower(choice);
/* Extract request */
i = (islower(choice) ? A2I(choice) : -1);
*/
bool do_cmd_magic_eater(bool only_browse, bool powerful)
{
- int item, chance, level, k_idx, tval, sval;
+ OBJECT_SUBTYPE_VALUE item;
+ PERCENTAGE chance;
+ DEPTH level;
+ IDX k_idx;
+ OBJECT_TYPE_VALUE tval;
+ OBJECT_SUBTYPE_VALUE sval;
bool use_charge = TRUE;
/* Not when confused */
item = select_magic_eater(only_browse);
if (item == -1)
{
- energy_use = 0;
+ p_ptr->energy_use = 0;
return FALSE;
}
if (item >= EATER_EXT*2) {tval = TV_ROD;sval = item - EATER_EXT*2;}
else if (item >= EATER_EXT) {tval = TV_WAND;sval = item - EATER_EXT;}
- else {tval = TV_STAFF;sval = item;}
+ else {tval = TV_STAFF; sval = item;}
k_idx = lookup_kind(tval, sval);
level = (tval == TV_ROD ? k_info[k_idx].level * 5 / 6 - 5 : k_info[k_idx].level);
sound(SOUND_FAIL);
if (randint1(100) >= chance)
chg_virtue(V_CHANCE,-1);
- energy_use = 100;
+ p_ptr->energy_use = 100;
return TRUE;
}
if (randint1(100) < chance)
chg_virtue(V_CHANCE,1);
}
- energy_use = 100;
+ p_ptr->energy_use = 100;
if (tval == TV_ROD) p_ptr->magic_num1[item] += k_info[k_idx].pval * EATER_ROD_CHARGE;
else p_ptr->magic_num1[item] -= EATER_CHARGE;