#include "monsterrace-hook.h"
#include "melee.h"
#include "world.h"
+#include "projection.h"
/*!
* @param Match 対応シンボルの混じったモンスター文字列(複数指定化)
* @return 効力があった場合TRUEを返す
*/
-bool detect_monsters_string(POSITION range, cptr Match)
+bool detect_monsters_string(POSITION range, concptr Match)
{
MONSTER_IDX i;
POSITION y, x;
MONSTER_IDX i;
POSITION y, x;
bool flag = FALSE;
- cptr desc_monsters = _("変なモンスター", "weird monsters");
+ concptr desc_monsters = _("変なモンスター", "weird monsters");
if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
* @param spell_name 抹殺効果を起こした魔法の名前
* @return 効力があった場合TRUEを返す
*/
-bool genocide_aux(MONSTER_IDX m_idx, int power, bool player_cast, int dam_side, cptr spell_name)
+bool genocide_aux(MONSTER_IDX m_idx, int power, bool player_cast, int dam_side, concptr spell_name)
{
int msec = delay_factor * delay_factor * delay_factor;
monster_type *m_ptr = &m_list[m_idx];
bool_hack cu, cv;
bool probe = FALSE;
char buf[256];
- cptr align;
+ concptr align;
cu = Term->scr->cu;
cv = Term->scr->cv;
if (damage)
{
- cptr killer;
+ concptr killer;
if (m_idx)
{
}
}
-
delete_monster(yy, xx);
/* No longer safe */
m_ptr->fy = sy;
m_ptr->fx = sx;
- /* Update the monster (new location) */
update_monster(m_idx, TRUE);
-
- /* Redraw the old grid */
lite_spot(yy, xx);
-
- /* Redraw the new grid */
lite_spot(sy, sx);
}
}
if (c_ptr->m_idx)
{
int chance = 25;
-
monster_type *m_ptr = &m_list[c_ptr->m_idx];
-
monster_race *r_ptr = &r_info[m_ptr->r_idx];
update_monster(c_ptr->m_idx, FALSE);
(*count) += activate_hi_summon(p_ptr->y, p_ptr->x, FALSE);
if (!one_in_(6)) break;
case 7: case 8: case 9: case 18:
- (*count) += summon_specific(0, p_ptr->y, p_ptr->x, dun_level, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
+ (*count) += summon_specific(0, p_ptr->y, p_ptr->x, dun_level, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET), '\0');
if (!one_in_(6)) break;
case 10: case 11: case 12:
msg_print(_("経験値が体から吸い取られた気がする!", "You feel your experience draining away..."));
}
if (!one_in_(6)) break;
default:
- while (i < 6)
+ while (i < A_MAX)
{
do
{
switch (randint1(25) + (dun_level / 20))
{
case 1: case 2:
- count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_ANT, mode);
+ count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_ANT, mode, '\0');
break;
case 3: case 4:
- count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_SPIDER, mode);
+ count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_SPIDER, mode, '\0');
break;
case 5: case 6:
- count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_HOUND, mode);
+ count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_HOUND, mode, '\0');
break;
case 7: case 8:
- count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_HYDRA, mode);
+ count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_HYDRA, mode, '\0');
break;
case 9: case 10:
- count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_ANGEL, mode);
+ count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_ANGEL, mode, '\0');
break;
case 11: case 12:
- count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_UNDEAD, mode);
+ count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_UNDEAD, mode, '\0');
break;
case 13: case 14:
- count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_DRAGON, mode);
+ count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_DRAGON, mode, '\0');
break;
case 15: case 16:
- count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_DEMON, mode);
+ count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_DEMON, mode, '\0');
break;
case 17:
if (can_pet) break;
- count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_AMBERITES, (mode | PM_ALLOW_UNIQUE));
+ count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_AMBERITES, (mode | PM_ALLOW_UNIQUE), '\0');
break;
case 18: case 19:
if (can_pet) break;
- count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_UNIQUE, (mode | PM_ALLOW_UNIQUE));
+ count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_UNIQUE, (mode | PM_ALLOW_UNIQUE), '\0');
break;
case 20: case 21:
if (!can_pet) mode |= PM_ALLOW_UNIQUE;
- count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_HI_UNDEAD, mode);
+ count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_HI_UNDEAD, mode, '\0');
break;
case 22: case 23:
if (!can_pet) mode |= PM_ALLOW_UNIQUE;
- count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_HI_DRAGON, mode);
+ count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_HI_DRAGON, mode, '\0');
break;
case 24:
- count += summon_specific((pet ? -1 : 0), y, x, 100, SUMMON_CYBER, mode);
+ count += summon_specific((pet ? -1 : 0), y, x, 100, SUMMON_CYBER, mode, '\0');
break;
default:
if (!can_pet) mode |= PM_ALLOW_UNIQUE;
- count += summon_specific((pet ? -1 : 0), y, x,pet ? summon_lev : (((summon_lev * 3) / 2) + 5), 0, mode);
+ count += summon_specific((pet ? -1 : 0), y, x,pet ? summon_lev : (((summon_lev * 3) / 2) + 5), 0, mode, '\0');
}
}
for (i = 0; i < max_cyber; i++)
{
- count += summon_specific(who, y, x, 100, SUMMON_CYBER, mode);
+ count += summon_specific(who, y, x, 100, SUMMON_CYBER, mode, '\0');
}
return count;
x = p_ptr->x;
teleport_player(10 + randint1(90), 0L);
-
object_wipe(q_ptr);
-
object_prep(q_ptr, lookup_kind(TV_STATUE, SV_WOODEN_STATUE));
q_ptr->pval = MON_NINJA;
-
- /* Drop it in the dungeon */
(void)drop_near(q_ptr, -1, y, x);
-#ifdef JP
- if (success) msg_print("攻撃を受ける前に素早く身をひるがえした。");
- else msg_print("失敗!攻撃を受けてしまった。");
-#else
- if (success) msg_print("You have turned around just before the attack hit you.");
- else msg_print("Failed! You are hit by the attack.");
-#endif
+ if (success) msg_print(_("攻撃を受ける前に素早く身をひるがえした。", "You have turned around just before the attack hit you."));
+ else msg_print(_("失敗!攻撃を受けてしまった。", "Failed! You are hit by the attack."));
p_ptr->special_defense &= ~(NINJA_KAWARIMI);
p_ptr->redraw |= (PR_STATUS);
if (tm_idx != cave[ny][nx].m_idx)
{
#ifdef JP
- msg_format("%s%sが立ちふさがっている!", tm_idx ? "別の" : "",
- m_ptr->ml ? "モンスター" : "何か");
+ msg_format("%s%sが立ちふさがっている!", tm_idx ? "別の" : "", m_ptr->ml ? "モンスター" : "何か");
#else
msg_format("There is %s in the way!", m_ptr->ml ? (tm_idx ? "another monster" : "a monster") : "someone");
#endif
case 35:
while (counter++ < 8)
{
- (void)summon_specific(0, p_ptr->y, p_ptr->x, (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), '\0');
}
break;
case 36:
msg_print(_("なんてこった!あなたの周りの地面から朽ちた人影が立ち上がってきた!",
"Oh no! Mouldering forms rise from the earth around you!"));
- (void)summon_specific(0, p_ptr->y, p_ptr->x, dun_level, SUMMON_UNDEAD, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
+ (void)summon_specific(0, p_ptr->y, p_ptr->x, dun_level, SUMMON_UNDEAD, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET), '\0');
chg_virtue(V_UNLIFE, 1);
}
else if (die < 14)
else if (die < 14)
{
msg_print(_("なんてこった!《悪魔》だ!", "Oh no! It's the Devil!"));
- summon_specific(0, p_ptr->y, p_ptr->x, dun_level, SUMMON_DEMON, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
+ summon_specific(0, p_ptr->y, p_ptr->x, dun_level, SUMMON_DEMON, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET), '\0');
}
else if (die < 18)
{
}
}
-bool_hack life_stream(bool_hack message, bool_hack virtue)
+bool_hack life_stream(bool_hack message, bool_hack virtue_change)
{
- if(virtue)
+ if(virtue_change)
{
chg_virtue(V_VITALITY, 1);
chg_virtue(V_UNLIFE, -5);
object_type *o_ptr;
GAME_TEXT o_name[MAX_NLEN];
byte feel;
- cptr q, s;
+ concptr q, s;
bool okay = FALSE;
q = _("どのアイテムを調べますか?", "Meditate on which item? ");
s = _("調べるアイテムがありません。", "You have nothing appropriate.");
- 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)
- {
- o_ptr = &inventory[item];
- }
-
- /* Get the item (on the floor) */
- else
- {
- o_ptr = &o_list[0 - item];
- }
+ o_ptr = choose_object(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT));
+ if (!o_ptr) return (FALSE);
/* It is fully known, no information needed */
if (object_is_known(o_ptr))
}
#ifdef JP
- msg_format("%sは%sという感じがする...",
- o_name, game_inscriptions[feel]);
+ msg_format("%sは%sという感じがする...", o_name, game_inscriptions[feel]);
#else
msg_format("You feel that the %s %s %s...",
- o_name, ((o_ptr->number == 1) ? "is" : "are"),
- game_inscriptions[feel]);
+ o_name, ((o_ptr->number == 1) ? "is" : "are"), game_inscriptions[feel]);
#endif
o_ptr->marked |= OM_TOUCHED;
/* Combine / Reorder the pack (later) */
- p_ptr->notice |= (PN_COMBINE | PN_REORDER);
+ p_ptr->update |= (PU_COMBINE | PU_REORDER);
p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER);