#include "trap.h"
#include "object-curse.h"
#include "player-damage.h"
+
+#include "monster.h"
+#include "monster-status.h"
+#include "spells-summon.h"
#include "monsterrace-hook.h"
+
#include "melee.h"
+#include "world.h"
+#include "projection.h"
+#include "mutation.h"
+#include "rooms.h"
static int rakubadam_m; /*!< 振り落とされた際のダメージ量 */
* @param cury 現在の鏡のy座標
* @param curx 現在の鏡のx座標
*/
-static void next_mirror(int* next_y, int* next_x, int cury, int curx)
+static void next_mirror(POSITION* next_y, POSITION* next_x, POSITION cury, POSITION curx)
{
- int mirror_x[10], mirror_y[10]; /* 鏡はもっと少ない */
+ POSITION mirror_x[10], mirror_y[10]; /* 鏡はもっと少ない */
int mirror_num = 0; /* 鏡の数 */
POSITION x, y;
int num;
SYMBOL_CODE c;
/* Lookup the default colors for this type */
- cptr s = quark_str(gf_color[type]);
+ concptr s = quark_str(gf_color[type]);
if (!s) return (TERM_WHITE);
if (have_flag(f_ptr->flags, FF_TREE))
{
- cptr message;
+ concptr message;
switch (typ)
{
case GF_POIS:
bool ignore = FALSE;
bool do_kill = FALSE;
- cptr note_kill = NULL;
+ concptr note_kill = NULL;
#ifndef JP
/* Get the "plural"-ness */
/* Acquire next object */
next_o_idx = o_ptr->next_o_idx;
-
- /* Extract the flags */
object_flags(o_ptr, flgs);
/* Check for artifact */
bool heal_leper = FALSE;
/* Hold the monster name */
- GAME_TEXT m_name[80];
+ GAME_TEXT m_name[MAX_NLEN];
char m_poss[10];
PARAMETER_VALUE photo = 0;
/* Assume no note */
- cptr note = NULL;
+ concptr note = NULL;
/* Assume a default death */
- cptr note_dies = extract_note_dies(real_r_idx(m_ptr));
+ concptr note_dies = extract_note_dies(real_r_idx(m_ptr));
POSITION ty = m_ptr->fy;
POSITION tx = m_ptr->fx;
else if (dam > 0)
{
int b = damroll(5, dam) / 4;
- cptr str = (p_ptr->pclass == CLASS_MINDCRAFTER) ? _("超能力パワー", "psychic energy") : _("魔力", "mana");
- cptr msg = _("あなたは%sの苦痛を%sに変換した!",
+ concptr str = (p_ptr->pclass == CLASS_MINDCRAFTER) ? _("超能力パワー", "psychic energy") : _("魔力", "mana");
+ concptr msg = _("あなたは%sの苦痛を%sに変換した!",
(seen ? "You convert %s's pain into %s!" :
"You convert %ss pain into %s!"));
msg_format(msg, m_name, str);
/* Special message */
if (see_s_msg)
{
- /* Get the monster name */
monster_desc(killer, caster_ptr, 0);
msg_format(_("%^sは気分が良さそうだ。", "%^s appears healthier."), killer);
}
if (record_named_pet && is_pet(m_ptr) && m_ptr->nickname)
{
- char m2_name[80];
+ char m2_name[MAX_NLEN];
monster_desc(m2_name, m_ptr, MD_INDEF_VISIBLE);
do_cmd_write_nikki(NIKKI_NAMED_PET, RECORD_NAMED_PET_HEAL_LEPER, m2_name);
if (pet) mode |= PM_FORCE_PET;
else mode |= (PM_NO_PET | PM_FORCE_FRIENDLY);
- count += summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, (pet ? p_ptr->lev*2/3+randint1(p_ptr->lev/2) : dun_level), 0, mode);
+ count += summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, (pet ? p_ptr->lev*2/3+randint1(p_ptr->lev/2) : dun_level), 0, mode, '\0');
if (!one_in_(6)) break;
}
case 23: case 24: case 25:
int i = 0;
if (one_in_(13))
{
- while (i < 6)
+ while (i < A_MAX)
{
do
{
/* Mark the item as fully known */
q_ptr->ident |= (IDENT_MENTAL);
-
- /* Drop it in the dungeon */
(void)drop_near(q_ptr, -1, p_ptr->y, p_ptr->x);
}
* We return "TRUE" if any "obvious" effects were observed. XXX XXX Actually,
* we just assume that the effects were obvious, for historical reasons.
*/
-static bool project_p(MONSTER_IDX who, cptr who_name, int r, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID typ, BIT_FLAGS flg, int monspell)
+static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID typ, BIT_FLAGS flg, int monspell)
{
int k = 0;
DEPTH rlev = 0;
monster_type *m_ptr = NULL;
/* Monster name (for attacks) */
- GAME_TEXT m_name[80];
+ GAME_TEXT m_name[MAX_NLEN];
/* Monster name (for damage) */
char killer[80];
/* Hack -- messages */
- cptr act = NULL;
+ concptr act = NULL;
int get_damage = 0;
if (who > 0)
{
- /* Get the source monster */
m_ptr = &m_list[who];
- /* Extract the monster level */
rlev = (((&r_info[m_ptr->r_idx])->level >= 1) ? (&r_info[m_ptr->r_idx])->level : 1);
-
- /* Get the monster name */
monster_desc(m_name, m_ptr, 0);
/* Get the monster's real name (gotten before polymorph!) */
if (fuzzy) msg_print(_("何か湿ったもので攻撃された!", "You are hit by something wet!"));
if (!CHECK_MULTISHADOW())
{
- if (!p_ptr->resist_sound)
+ if (!p_ptr->resist_sound && !p_ptr->resist_water)
{
set_stun(p_ptr->stun + randint1(40));
}
- if (!p_ptr->resist_conf)
+ if (!p_ptr->resist_conf && !p_ptr->resist_water)
{
set_confused(p_ptr->confused + randint1(5) + 5);
}
- if (one_in_(5))
+ if (one_in_(5) && !p_ptr->resist_water)
{
inven_damage(set_cold_destroy, 3);
}
+
+ if (p_ptr->resist_water) get_damage /= 4;
}
get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
msg_print(_("あなたは以前ほど力強くなくなってしまった...。",
"You're not as powerful as you used to be..."));
- for (k = 0; k < 6; k++)
+ for (k = 0; k < A_MAX; k++)
{
p_ptr->stat_cur[k] = (p_ptr->stat_cur[k] * 7) / 8;
if (p_ptr->stat_cur[k] < 3) p_ptr->stat_cur[k] = 3;
bool jump = FALSE;
/* Attacker's name (prepared before polymorph)*/
- GAME_TEXT who_name[80];
+ GAME_TEXT who_name[MAX_NLEN];
/* Can the player see the source of this effect? */
bool see_s_msg = TRUE;
{
u16b p;
- byte a;
- char c;
+ TERM_COLOR a;
+ SYMBOL_CODE c;
/* Obtain the bolt pict */
p = bolt_pict(oy, ox, y, x, typ);
u16b p;
TERM_COLOR a;
- char c;
+ SYMBOL_CODE c;
/* Obtain the bolt pict */
p = bolt_pict(oy, ox, y, x, typ);
{
u16b p;
- byte a;
- char c;
+ TERM_COLOR a;
+ SYMBOL_CODE c;
/* Obtain the bolt pict */
p = bolt_pict(oy, ox, y, x, typ);
u16b p;
TERM_COLOR a;
- char c;
+ SYMBOL_CODE c;
drawn = TRUE;
}
}
-
- /* Update stuff if needed */
- if (p_ptr->update) handle_stuff();
-
+ update_creature(p_ptr);
if (flg & PROJECT_KILL)
{
}
}
- /* Update stuff if needed */
- if (p_ptr->update) handle_stuff();
+ update_creature(p_ptr);
/* Check objects */
if (flg & (PROJECT_ITEM))
if (p_ptr->riding)
{
- GAME_TEXT m_name[80];
+ GAME_TEXT m_name[MAX_NLEN];
monster_desc(m_name, &m_list[p_ptr->riding], 0);