ARTIFACT_IDX i;
/* No artifacts in the town */
- if (!p_ptr->current_floor_ptr->dun_level) return (FALSE);
+ if (!p_ptr->current_floor_ptr->dun_level) return FALSE;
/* Paranoia -- no "plural" artifacts */
- if (o_ptr->number != 1) return (FALSE);
+ if (o_ptr->number != 1) return FALSE;
/* Check the artifact list (skip the "specials") */
for (i = 0; i < max_a_idx; i++)
random_artifact_resistance(o_ptr, a_ptr);
/* Success */
- return (TRUE);
+ return TRUE;
}
/* Failure */
- return (FALSE);
+ return FALSE;
}
/*!
KIND_OBJECT_IDX k_idx = 0;
/*! @note 地上ではキャンセルする / No artifacts in the town */
- if (!p_ptr->current_floor_ptr->dun_level) return (FALSE);
+ if (!p_ptr->current_floor_ptr->dun_level) return FALSE;
/*! @note get_obj_num_hookによる指定がある場合は生成をキャンセルする / Themed object */
- if (get_obj_num_hook) return (FALSE);
+ if (get_obj_num_hook) return FALSE;
/*! @note 全固定アーティファクト中からIDの若い順に生成対象とその確率を走査する / Check the artifact list (just the "specials") */
for (i = 0; i < max_a_idx; i++)
o_ptr->name1 = i;
random_artifact_resistance(o_ptr, a_ptr);
- return (TRUE);
+ return TRUE;
}
/*! @note 全INSTA_ART固定アーティファクトを試行しても決まらなかった場合 FALSEを返す / Failure */
- return (FALSE);
+ return FALSE;
}
}
}
- return (TRUE);
+ return TRUE;
}
put_str(buf, 10, 10);
c = inkey();
if (c == 'Q') birth_quit();
- if (c == 'S') return (FALSE);
+ if (c == 'S') return FALSE;
if (c == ' ' || c == '\r' || c == '\n')
{
if(cs == MAX_RACES)
put_str(buf, 10, 10);
c = inkey();
if (c == 'Q') birth_quit();
- if (c == 'S') return (FALSE);
+ if (c == 'S') return FALSE;
if (c == ' ' || c == '\r' || c == '\n')
{
if(cs == MAX_CLASS_CHOICE)
put_str(buf, 10, 10);
c = inkey();
if (c == 'Q') birth_quit();
- if (c == 'S') return (FALSE);
+ if (c == 'S') return FALSE;
if (c == ' ' || c == '\r' || c == '\n')
{
if(cs == MAX_SEIKAKU)
case 'Q':
birth_quit();
case 'S':
- return (FALSE);
+ return FALSE;
case ESCAPE:
break; /*後でもう一回breakせんと*/
case ' ':
put_str(buf, 10, 10);
c = inkey();
if (c == 'Q') birth_quit();
- if (c == 'S') return (FALSE);
+ if (c == 'S') return FALSE;
if (c == ' ' || c == '\r' || c == '\n')
{
if(cs == MAX_SEXES)
if (c == 'Q') birth_quit();
/* Start over */
- if (c == 'S') return (FALSE);
+ if (c == 'S') return FALSE;
/* Escape accepts the roll */
if (c == '\r' || c == '\n' || c == ESCAPE) break;
if (c == 'Q') birth_quit();
/* Start over */
- if (c == 'S') return (FALSE);
+ if (c == 'S') return FALSE;
/* Initialize random quests */
previous_char.quick_ok = TRUE;
/* Accept */
- return (TRUE);
+ return TRUE;
}
/*!
c = inkey();
if (c == 'Q') quit(NULL);
- else if (c == 'S') return (FALSE);
+ else if (c == 'S') return FALSE;
else if (c == '?')
{
#ifdef JP
{
if (bldg->member_class[p_ptr->pclass] == BUILDING_OWNER)
{
- return (TRUE);
+ return TRUE;
}
if (bldg->member_race[p_ptr->prace] == BUILDING_OWNER)
{
- return (TRUE);
+ return TRUE;
}
if ((is_magic(p_ptr->realm1) && (bldg->member_realm[p_ptr->realm1] == BUILDING_OWNER)) ||
(is_magic(p_ptr->realm2) && (bldg->member_realm[p_ptr->realm2] == BUILDING_OWNER)))
{
- return (TRUE);
+ return TRUE;
}
- return (FALSE);
+ return FALSE;
}
/*!
{
if (bldg->member_class[p_ptr->pclass])
{
- return (TRUE);
+ return TRUE;
}
if (bldg->member_race[p_ptr->prace])
{
- return (TRUE);
+ return TRUE;
}
if ((is_magic(p_ptr->realm1) && bldg->member_realm[p_ptr->realm1]) ||
(is_magic(p_ptr->realm2) && bldg->member_realm[p_ptr->realm2]))
{
- return (TRUE);
+ return TRUE;
}
}
return OK;
}
- return (FALSE);
+ return FALSE;
}
/*!
msg_print(_("おい!金が足りないじゃないか!出ていけ!", "Hey! You don't have the gold - get out of here!"));
msg_print(NULL);
screen_load();
- return (FALSE);
+ return FALSE;
}
else if (wager > maxbet)
{
msg_print(NULL);
}
screen_load();
- return (TRUE);
+ return TRUE;
}
/*!
msg_print(NULL);
screen_load();
- return (FALSE);
+ return FALSE;
}
else if (wager > maxbet)
{
screen_load();
- return (TRUE);
+ return TRUE;
}
}
screen_load();
- return (FALSE);
+ return FALSE;
}
/*!
}
}
- return (TRUE);
+ return TRUE;
}
(void)inkey();
screen_load();
- return (TRUE);
+ return TRUE;
}
s = _("改良できるものがありません。", "You have nothing to improve.");
o_ptr = choose_object(player_ptr, &item, q, s, (USE_INVEN | USE_EQUIP | IGNORE_BOTHHAND_SLOT), item_tester_tval);
- if (!o_ptr) return (FALSE);
+ if (!o_ptr) return FALSE;
/* Check if the player has enough money */
if (player_ptr->au < (cost * o_ptr->number))
{
object_desc(tmp_str, o_ptr, OD_NAME_ONLY);
msg_format(_("%sを改良するだけのゴールドがありません!", "You do not have the gold to improve %s!"), tmp_str);
- return (FALSE);
+ return FALSE;
}
/* Enchant to hit */
{
if (flush_failure) flush();
msg_print(_("改良に失敗した。", "The improvement failed."));
- return (FALSE);
+ return FALSE;
}
else
{
if (item >= INVEN_RARM) calc_android_exp(player_ptr);
/* Something happened */
- return (TRUE);
+ return TRUE;
}
}
{
screen_load();
- return (FALSE);
+ return FALSE;
}
/* Find that character info, and describe it */
C_KILL(who, max_r_idx, MONRACE_IDX);
screen_load();
- return (FALSE);
+ return FALSE;
}
/* Sort by level */
char c = str[0];
int i;
- if (len < 2) return (FALSE);
+ if (len < 2) return FALSE;
#ifdef JP
- if (iskanji(c)) return (FALSE);
+ if (iskanji(c)) return FALSE;
#endif
for (i = 1; i < len; i++)
{
#ifdef JP
- if(c != str[i] || iskanji(str[i])) return (FALSE);
+ if(c != str[i] || iskanji(str[i])) return FALSE;
#else
- if(c != str[i]) return (FALSE);
+ if(c != str[i]) return FALSE;
#endif
}
- return (TRUE);
+ return TRUE;
}
static errr send_text_to_chuukei_server(TERM_LEN x, TERM_LEN y, int len, TERM_COLOR col, concptr str)
if (*ptr++ == '\0') break;
}
- if (buf[0] == 'd') return (FALSE);
+ if (buf[0] == 'd') return FALSE;
- return (TRUE);
+ return TRUE;
}
/* プレイホストのマップが大きいときクライアントのマップもリサイズする */
char buf[1024];
/* 書くデータなし */
- if (fresh_queue.next == fresh_queue.tail) return (FALSE);
+ if (fresh_queue.next == fresh_queue.tail) return FALSE;
/* まだ書くべき時でない */
- if (fresh_queue.time[fresh_queue.next] > get_current_time() - epoch_time) return (FALSE);
+ if (fresh_queue.time[fresh_queue.next] > get_current_time() - epoch_time) return FALSE;
/* 時間情報(区切り)が得られるまで書く */
while (get_nextbuf(buf))
fresh_queue.next++;
if (fresh_queue.next == FRESH_QUEUE_SIZE) fresh_queue.next = 0;
- return (TRUE);
+ return TRUE;
}
#ifdef CHUUKEI
{
msg_print(_("そこには何も見当たらない。", "You see nothing there."));
- return (FALSE);
+ return FALSE;
}
/* Must be a wall/door/etc */
{
msg_print(_("そこには掘るものが見当たらない。", "You see nothing there to tunnel."));
- return (FALSE);
+ return FALSE;
}
- return (TRUE);
+ return TRUE;
}
bool more = FALSE;
/* Verify legality */
- if (!do_cmd_tunnel_test(creature_ptr->current_floor_ptr, y, x)) return (FALSE);
+ if (!do_cmd_tunnel_test(creature_ptr->current_floor_ptr, y, x)) return FALSE;
take_turn(creature_ptr, 100);
/* Must be a closed door */
if (!is_closed_door(g_ptr->feat))
{
- return (FALSE);
+ return FALSE;
}
/* Jammed door */
sound(SOUND_OPENDOOR);
}
- return (TRUE);
+ return TRUE;
}
/*!
(*ip) = i;
/* Success */
- return (TRUE);
+ return TRUE;
}
}
- return (FALSE);
+ return FALSE;
}
if (technic_info[TECHNIC_HISSATSU][*sn].slevel <= plev)
{
/* Success */
- return (TRUE);
+ return TRUE;
}
}
case '0':
{
screen_load();
- return (FALSE);
+ return FALSE;
}
case '8':
handle_stuff(creature_ptr);
/* Abort if needed */
- if (!flag) return (FALSE);
+ if (!flag) return FALSE;
/* Save the choice */
(*sn) = j;
repeat_push((COMMAND_CODE)j);
/* Success */
- return (TRUE);
+ return TRUE;
}
handle_stuff(caster_ptr);
/* Abort if needed */
- if (!flag) return (FALSE);
+ if (!flag) return FALSE;
/* Save the choice */
(*sn) = i;
damage = (baigaesi ? caster_ptr->mane_dam[i]*2 : caster_ptr->mane_dam[i]);
/* Success */
- return (TRUE);
+ return TRUE;
}
}
/* Spell is illegal */
- if (s_ptr->slevel > caster_ptr->lev) return (FALSE);
+ if (s_ptr->slevel > caster_ptr->lev) return FALSE;
/* Spell is forgotten */
if ((use_realm == caster_ptr->realm2) ?
(caster_ptr->spell_forgotten1 & (1L << spell)))
{
/* Never okay */
- return (FALSE);
+ return FALSE;
}
- if (caster_ptr->pclass == CLASS_SORCERER) return (TRUE);
- if (caster_ptr->pclass == CLASS_RED_MAGE) return (TRUE);
+ if (caster_ptr->pclass == CLASS_SORCERER) return TRUE;
+ if (caster_ptr->pclass == CLASS_RED_MAGE) return TRUE;
/* Spell is learned */
if ((use_realm == caster_ptr->realm2) ?
if (spell_okay(caster_ptr, *sn, learned, FALSE, use_realm))
{
/* Success */
- return (TRUE);
+ return TRUE;
}
}
}
/* No "okay" spells */
- if (!okay) return (FALSE);
+ if (!okay) return FALSE;
if (((use_realm) != caster_ptr->realm1) && ((use_realm) != caster_ptr->realm2) && (caster_ptr->pclass != CLASS_SORCERER) && (caster_ptr->pclass != CLASS_RED_MAGE)) return FALSE;
if (((caster_ptr->pclass == CLASS_SORCERER) || (caster_ptr->pclass == CLASS_RED_MAGE)) && !is_magic(use_realm)) return FALSE;
if ((caster_ptr->pclass == CLASS_RED_MAGE) && ((use_realm) != REALM_ARCANE) && (sval > 1)) return FALSE;
ac = target_ptr->ac + target_ptr->to_a;
if (target_ptr->special_attack & ATTACK_SUIKEN) ac += (target_ptr->lev * 2);
- if ((i > 0) && (randint1(i) > ((ac * 3) / 4))) return (TRUE);
- return (FALSE);
+ if ((i > 0) && (randint1(i) > ((ac * 3) / 4))) return TRUE;
+ return FALSE;
}
/*!
if (k < 10) return (k < 5);
i = (power + (level * 3));
- if ((i > 0) && (randint1(i) > ((ac * 3) / 4))) return (TRUE);
- return (FALSE);
+ if ((i > 0) && (randint1(i) > ((ac * 3) / 4))) return TRUE;
+ return FALSE;
}
/*! モンスターの侮辱行為メッセージテーブル / Hack -- possible "insult" messages */
int abbreviate = 0; // 2回目以降の省略表現フラグ
/* Not allowed to attack */
- if (r_ptr->flags1 & (RF1_NEVER_BLOW)) return (FALSE);
+ if (r_ptr->flags1 & (RF1_NEVER_BLOW)) return FALSE;
- if (d_info[target_ptr->dungeon_idx].flags1 & DF1_NO_MELEE) return (FALSE);
+ if (d_info[target_ptr->dungeon_idx].flags1 & DF1_NO_MELEE) return FALSE;
/* ...nor if friendly */
if (!is_hostile(m_ptr)) return FALSE;
}
/* Assume we attacked */
- return (TRUE);
+ return TRUE;
}
/* Not allowed to attack */
if (r_ptr->flags1 & RF1_NEVER_BLOW) return FALSE;
- if (d_info[subject_ptr->dungeon_idx].flags1 & DF1_NO_MELEE) return (FALSE);
+ if (d_info[subject_ptr->dungeon_idx].flags1 & DF1_NO_MELEE) return FALSE;
/* Total armor */
ac = tr_ptr->ac;
k += shooter_ptr->concent;
/* Hack -- Instant miss or hit */
- if (k <= 5) return (FALSE);
- if (k > 95) return (TRUE);
+ if (k <= 5) return FALSE;
+ if (k > 95) return TRUE;
if (shooter_ptr->pseikaku == SEIKAKU_NAMAKE)
- if (one_in_(20)) return (FALSE);
+ if (one_in_(20)) return FALSE;
/* Never hit */
- if (chance <= 0) return (FALSE);
+ if (chance <= 0) return FALSE;
ac = r_ptr->ac;
if (shooter_ptr->concent)
monster_desc(m_name, m_ptr, 0);
msg_format(_("%sは%sを斬り捨てた!", "%s cuts down %s!"), m_name, o_name);
}
- return (FALSE);
+ return FALSE;
}
/* Assume hit */
- return (TRUE);
+ return TRUE;
}
/* Verify request */
if (!get_check(_("本当にウィザードモードに入りたいのですか? ", "Are you sure you want to enter wizard mode? ")))
{
- return (FALSE);
+ return FALSE;
}
exe_write_diary(p_ptr, NIKKI_BUNSHOU, 0, _("ウィザードモードに突入してスコアを残せなくなった。", "give up recording score to enter wizard mode."));
}
/* Success */
- return (TRUE);
+ return TRUE;
}
/* Verify request */
if (!get_check(_("本当にデバッグ・コマンドを使いますか? ", "Are you sure you want to use debug commands? ")))
{
- return (FALSE);
+ return FALSE;
}
exe_write_diary(p_ptr, NIKKI_BUNSHOU, 0, _("デバッグモードに突入してスコアを残せなくなった。", "give up sending score to use debug commands."));
}
/* Success */
- return (TRUE);
+ return TRUE;
}
/*
/* Verify request */
if (!get_check(_("本当にボーグ・コマンドを使いますか? ", "Are you sure you want to use borg commands? ")))
{
- return (FALSE);
+ return FALSE;
}
exe_write_diary(p_ptr, NIKKI_BUNSHOU, 0, _("ボーグ・コマンドを使用してスコアを残せなくなった。", "give up recording score to use borg commands."));
}
/* Success */
- return (TRUE);
+ return TRUE;
}
/*
{
/* Hack -- Verify space */
if (head->text_size + strlen(buf) + 8 > FAKE_TEXT_SIZE)
- return (FALSE);
+ return FALSE;
/* New text? */
if (*offset == 0)
head->text_size += strlen(buf);
/* Success */
- return (TRUE);
+ return TRUE;
}
{
/* Hack -- Verify space */
if (head->name_size + strlen(buf) + 8 > FAKE_NAME_SIZE)
- return (FALSE);
+ return FALSE;
/* New name? */
if (*offset == 0)
head->name_size += strlen(buf);
/* Success */
- return (TRUE);
+ return TRUE;
}
msg_format(_("'%s'をオープンできません。", "Cannot open '%s'."), name);
msg_print(NULL);
- return (TRUE);
+ return TRUE;
}
/* Hack -- Re-Open the file */
fff = my_fopen(path, "r");
- if (!fff) return (FALSE);
+ if (!fff) return FALSE;
/* File has been restarted */
next = 0;
my_fclose(fff);
/* Escape */
- if (skey == 'q') return (FALSE);
+ if (skey == 'q') return FALSE;
/* Normal return */
- return (TRUE);
+ return TRUE;
}
f2 = (cave_los_grid(g2_c_ptr));
/* Totally blocked by physical walls */
- if (!f1 && !f2) return (TRUE);
+ if (!f1 && !f2) return TRUE;
/* Check for visibility */
v2 = (f2 && (g2_c_ptr->info & (CAVE_VIEW)));
/* Totally blocked by "unviewable neighbors" */
- if (!v1 && !v2) return (TRUE);
+ if (!v1 && !v2) return TRUE;
g_ptr = &floor_ptr->grid_array[y][x];
/* Assume no line of sight. */
- return (TRUE);
+ return TRUE;
}
x = GRID_X(grid_g[grid_n - 1]);
/* May not end in an unrequested grid */
- if ((y != y2) || (x != x2)) return (FALSE);
+ if ((y != y2) || (x != x2)) return FALSE;
/* Assume okay */
- return (TRUE);
+ return TRUE;
}
OBJECT_IDX this_o_idx, next_o_idx = 0;
/* Forbid perma-grids */
- if (cave_perma_grid(g_ptr)) return (FALSE);
+ if (cave_perma_grid(g_ptr)) return FALSE;
/* Check objects */
for (this_o_idx = g_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
next_o_idx = o_ptr->next_o_idx;
/* Forbid artifact grids */
- if (object_is_artifact(o_ptr)) return (FALSE);
+ if (object_is_artifact(o_ptr)) return FALSE;
}
/* Accept */
- return (TRUE);
+ return TRUE;
}
/*
if (!in_bounds(floor_ptr, y, x))
{
/* Out of bounds */
- return (FALSE);
+ return FALSE;
}
/* Do the real check */
- if (is_floor_bold(floor_ptr, y, x)) return (TRUE);
+ if (is_floor_bold(floor_ptr, y, x)) return TRUE;
- return (FALSE);
+ return FALSE;
}
/*!
if (cave_have_flag_bold(floor_ptr, y - 1, x, FF_WALL) &&
cave_have_flag_bold(floor_ptr, y + 1, x, FF_WALL))
{
- return (TRUE);
+ return TRUE;
}
/* Check Horizontal */
if (cave_have_flag_bold(floor_ptr, y, x - 1, FF_WALL) &&
cave_have_flag_bold(floor_ptr, y, x + 1, FF_WALL))
{
- return (TRUE);
+ return TRUE;
}
}
/* No doorway */
- return (FALSE);
+ return FALSE;
}
/*!
static bool h_older_than(byte major, byte minor, byte patch, byte extra)
{
/* Much older, or much more recent */
- if (current_world_ptr->h_ver_major < major) return (TRUE);
- if (current_world_ptr->h_ver_major > major) return (FALSE);
+ if (current_world_ptr->h_ver_major < major) return TRUE;
+ if (current_world_ptr->h_ver_major > major) return FALSE;
/* Distinctly older, or distinctly more recent */
- if (current_world_ptr->h_ver_minor < minor) return (TRUE);
- if (current_world_ptr->h_ver_minor > minor) return (FALSE);
+ if (current_world_ptr->h_ver_minor < minor) return TRUE;
+ if (current_world_ptr->h_ver_minor > minor) return FALSE;
/* Barely older, or barely more recent */
- if (current_world_ptr->h_ver_patch < patch) return (TRUE);
- if (current_world_ptr->h_ver_patch > patch) return (FALSE);
+ if (current_world_ptr->h_ver_patch < patch) return TRUE;
+ if (current_world_ptr->h_ver_patch > patch) return FALSE;
/* Barely older, or barely more recent */
- if (current_world_ptr->h_ver_extra < extra) return (TRUE);
- if (current_world_ptr->h_ver_extra > extra) return (FALSE);
+ if (current_world_ptr->h_ver_extra < extra) return TRUE;
+ if (current_world_ptr->h_ver_extra > extra) return FALSE;
/* Identical versions */
- return (FALSE);
+ return FALSE;
}
static bool z_older_than(byte x, byte y, byte z)
{
/* Much older, or much more recent */
- if (current_world_ptr->z_major < x) return (TRUE);
- if (current_world_ptr->z_major > x) return (FALSE);
+ if (current_world_ptr->z_major < x) return TRUE;
+ if (current_world_ptr->z_major > x) return FALSE;
/* Distinctly older, or distinctly more recent */
- if (current_world_ptr->z_minor < y) return (TRUE);
- if (current_world_ptr->z_minor > y) return (FALSE);
+ if (current_world_ptr->z_minor < y) return TRUE;
+ if (current_world_ptr->z_minor > y) return FALSE;
/* Barely older, or barely more recent */
- if (current_world_ptr->z_patch < z) return (TRUE);
- if (current_world_ptr->z_patch > z) return (FALSE);
+ if (current_world_ptr->z_patch < z) return TRUE;
+ if (current_world_ptr->z_patch > z) return FALSE;
/* Identical versions */
- return (FALSE);
+ return FALSE;
}
attrib = GetFileAttributes(path);
/* Require valid filename */
- if (attrib == INVALID_FILE_NAME) return (FALSE);
+ if (attrib == INVALID_FILE_NAME) return FALSE;
/* Prohibit directory */
- if (attrib & FILE_ATTRIBUTE_DIRECTORY) return (FALSE);
+ if (attrib & FILE_ATTRIBUTE_DIRECTORY) return FALSE;
#else /* WIN32 */
/* Examine and verify */
- if (_dos_getfileattr(path, &attrib)) return (FALSE);
+ if (_dos_getfileattr(path, &attrib)) return FALSE;
/* Prohibit something */
- if (attrib & FA_LABEL) return (FALSE);
+ if (attrib & FA_LABEL) return FALSE;
/* Prohibit directory */
- if (attrib & FA_DIREC) return (FALSE);
+ if (attrib & FA_DIREC) return FALSE;
#endif /* WIN32 */
/* Success */
- return (TRUE);
+ return TRUE;
}
attrib = GetFileAttributes(path);
/* Require valid filename */
- if (attrib == INVALID_FILE_NAME) return (FALSE);
+ if (attrib == INVALID_FILE_NAME) return FALSE;
/* Require directory */
- if (!(attrib & FILE_ATTRIBUTE_DIRECTORY)) return (FALSE);
+ if (!(attrib & FILE_ATTRIBUTE_DIRECTORY)) return FALSE;
#else /* WIN32 */
/* Examine and verify */
- if (_dos_getfileattr(path, &attrib)) return (FALSE);
+ if (_dos_getfileattr(path, &attrib)) return FALSE;
/* Prohibit something */
- if (attrib & FA_LABEL) return (FALSE);
+ if (attrib & FA_LABEL) return FALSE;
/* Require directory */
- if (!(attrib & FA_DIREC)) return (FALSE);
+ if (!(attrib & FA_DIREC)) return FALSE;
#endif /* WIN32 */
/* Success */
- return (TRUE);
+ return TRUE;
}
/* This makes no sense */
- if (!paletted) return (TRUE);
+ if (!paletted) return TRUE;
/* No bitmap */
rnfree(lppe, lppeSize);
/* Fail */
- return (FALSE);
+ return FALSE;
}
}
hPal = hNewPal;
/* Success */
- return (TRUE);
+ return TRUE;
}
if (!ReadDIB(data[0].w, buf, &infGraph))
{
plog_fmt(_("ビットマップ '%s' を読み込めません。", "Cannot read bitmap file '%s'"), name);
- return (FALSE);
+ return FALSE;
}
/* Save the new sizes */
if (!ReadDIB(data[0].w, buf, &infMask))
{
plog_fmt("Cannot read bitmap file '%s'", buf);
- return (FALSE);
+ return FALSE;
}
}
if (arg_graphics == GRAPHICS_HENGBAND)
if (!ReadDIB(data[0].w, buf, &infMask))
{
plog_fmt("Cannot read bitmap file '%s'", buf);
- return (FALSE);
+ return FALSE;
}
}
/* Free bitmap */
plog(_("パレットを実現できません!", "Cannot activate palette!"));
- return (FALSE);
+ return FALSE;
}
/* Graphics available */
if (mind_ptr->info[*sn].min_lev <= plev)
{
/* Success */
- return (TRUE);
+ return TRUE;
}
}
case '0':
{
if (!only_browse) screen_load();
- return (FALSE);
+ return FALSE;
}
case '8':
handle_stuff(caster_ptr);
/* Abort if needed */
- if (!flag) return (FALSE);
+ if (!flag) return FALSE;
/* Save the choice */
(*sn) = i;
repeat_push((COMMAND_CODE)i);
/* Success */
- return (TRUE);
+ return TRUE;
}
/*!
}
/* Keep monsters from running too far away */
- if (m_ptr->cdis > MAX_SIGHT + 5) return (FALSE);
+ if (m_ptr->cdis > MAX_SIGHT + 5) return FALSE;
/* All "afraid" monsters will run away */
- if (MON_MONFEAR(m_ptr)) return (TRUE);
+ if (MON_MONFEAR(m_ptr)) return TRUE;
#ifdef ALLOW_TERROR
/* Nearby monsters will not become terrified */
- if (m_ptr->cdis <= 5) return (FALSE);
+ if (m_ptr->cdis <= 5) return FALSE;
/* Examine player power (level) */
p_lev = p_ptr->lev;
m_lev = r_ptr->level + (m_idx & 0x08) + 25;
/* Optimize extreme cases below */
- if (m_lev > p_lev + 4) return (FALSE);
- if (m_lev + 4 <= p_lev) return (TRUE);
+ if (m_lev > p_lev + 4) return FALSE;
+ if (m_lev + 4 <= p_lev) return TRUE;
/* Examine player health */
p_chp = p_ptr->chp;
m_val = (m_lev * m_mhp) + (m_chp << 2); /* div m_mhp */
/* Strong players scare strong monsters */
- if (p_val * m_mhp > m_val * p_mhp) return (TRUE);
+ if (p_val * m_mhp > m_val * p_mhp) return TRUE;
#endif
/* Assume no terror */
- return (FALSE);
+ return FALSE;
}
x1 = m_ptr->fx;
/* Monster can already cast spell to player */
- if (projectable(p_ptr->current_floor_ptr, y1, x1, p_ptr->y, p_ptr->x)) return (FALSE);
+ if (projectable(p_ptr->current_floor_ptr, y1, x1, p_ptr->y, p_ptr->x)) return FALSE;
/* Set current grid cost */
now_cost = p_ptr->current_floor_ptr->grid_array[y1][x1].cost;
if (!in_bounds2(p_ptr->current_floor_ptr, y, x)) continue;
/* Simply move to player */
- if (player_bold(p_ptr, y, x)) return (FALSE);
+ if (player_bold(p_ptr, y, x)) return FALSE;
g_ptr = &p_ptr->current_floor_ptr->grid_array[y][x];
}
/* No legal move (?) */
- if (best == 999) return (FALSE);
+ if (best == 999) return FALSE;
/* Success */
- return (TRUE);
+ return TRUE;
}
r_ptr->a_ability_flags2 & (RF6_ATTACK_MASK))
{
/* Can move spell castable grid? */
- if (get_moves_aux2(m_idx, yp, xp)) return (TRUE);
+ if (get_moves_aux2(m_idx, yp, xp)) return TRUE;
}
/* Monster can't flow */
- if (no_flow) return (FALSE);
+ if (no_flow) return FALSE;
/* Monster can go through rocks */
- if ((r_ptr->flags2 & RF2_PASS_WALL) && ((m_idx != p_ptr->riding) || p_ptr->pass_wall)) return (FALSE);
- if ((r_ptr->flags2 & RF2_KILL_WALL) && (m_idx != p_ptr->riding)) return (FALSE);
+ if ((r_ptr->flags2 & RF2_PASS_WALL) && ((m_idx != p_ptr->riding) || p_ptr->pass_wall)) return FALSE;
+ if ((r_ptr->flags2 & RF2_KILL_WALL) && (m_idx != p_ptr->riding)) return FALSE;
/* Monster location */
y1 = m_ptr->fy;
x1 = m_ptr->fx;
/* Hack -- Player can see us, run towards him */
- if (player_has_los_bold(p_ptr, y1, x1) && projectable(p_ptr->current_floor_ptr, p_ptr->y, p_ptr->x, y1, x1)) return (FALSE);
+ if (player_has_los_bold(p_ptr, y1, x1) && projectable(p_ptr->current_floor_ptr, p_ptr->y, p_ptr->x, y1, x1)) return FALSE;
/* Monster grid */
g_ptr = &p_ptr->current_floor_ptr->grid_array[y1][x1];
else if (g_ptr->when)
{
/* Too old smell */
- if (p_ptr->current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].when - g_ptr->when > 127) return (FALSE);
+ if (p_ptr->current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].when - g_ptr->when > 127) return FALSE;
use_scent = TRUE;
best = 0;
/* Otherwise, advance blindly */
else
{
- return (FALSE);
+ return FALSE;
}
/* Check nearby grids, diagonals first */
}
/* No legal move (?) */
- if (best == 999 || best == 0) return (FALSE);
+ if (best == 999 || best == 0) return FALSE;
/* Success */
- return (TRUE);
+ return TRUE;
}
}
/* No legal move (?) */
- if (score == -1) return (FALSE);
+ if (score == -1) return FALSE;
/* Find deltas */
(*yp) = fy - gy;
(*xp) = fx - gx;
/* Success */
- return (TRUE);
+ return TRUE;
}
/*
(*xp) = fx - gx;
/* Found safe place */
- return (TRUE);
+ return TRUE;
}
}
/* No safe place */
- return (FALSE);
+ return FALSE;
}
(*xp) = fx - gx;
/* Found good place */
- return (TRUE);
+ return TRUE;
}
}
/* No good place */
- return (FALSE);
+ return FALSE;
}
/* Check for no move */
- if (!x && !y) return (FALSE);
+ if (!x && !y) return FALSE;
/* Extract the "absolute distances" */
}
/* Wants to move... */
- return (TRUE);
+ return TRUE;
}
{
monster_type *m_ptr = &target_ptr->current_floor_ptr->m_list[hack_m_idx]; /* the world monster */
- if (current_world_ptr->timewalk_m_idx) return (FALSE);
+ if (current_world_ptr->timewalk_m_idx) return FALSE;
if (vs_player)
{
(*fear) = FALSE;
/* Monster is dead */
- return (TRUE);
+ return TRUE;
}
#endif
/* Not dead yet */
- return (FALSE);
+ return FALSE;
}
bool monster_is_valid(monster_type *m_ptr)
bool known = (r_ptr->r_cast_spell == MAX_UCHAR)? TRUE: FALSE;
- if (cheat_know || known) return (TRUE);
- if (kills > 304 / (4 + level)) return (TRUE);
- if (!(r_ptr->flags1 & RF1_UNIQUE)) return (FALSE);
- if (kills > 304 / (38 + (5 * level) / 4)) return (TRUE);
- return (FALSE);
+ if (cheat_know || known) return TRUE;
+ if (kills > 304 / (4 + level)) return TRUE;
+ if (!(r_ptr->flags1 & RF1_UNIQUE)) return FALSE;
+ if (kills > 304 / (38 + (5 * level) / 4)) return TRUE;
+ return FALSE;
}
s32b d = d1 * d2;
if (d >= ((4+level)*MAX_UCHAR)/80) d = ((4+level)*MAX_UCHAR-1)/80;
- if ((4 + level) * a > 80 * d) return (TRUE);
- if (!(r_ptr->flags1 & RF1_UNIQUE)) return (FALSE);
- if ((4 + level) * (2 * a) > 80 * d) return (TRUE);
+ if ((4 + level) * a > 80 * d) return TRUE;
+ if (!(r_ptr->flags1 & RF1_UNIQUE)) return FALSE;
+ if ((4 + level) * (2 * a) > 80 * d) return TRUE;
/* Assume false */
- return (FALSE);
+ return FALSE;
}
/* DO NOT PLACE A MONSTER IN THE SMALL SCALE WILDERNESS !!! */
if (p_ptr->wild_mode) return FALSE;
- if (!in_bounds(p_ptr->current_floor_ptr, y, x)) return (FALSE);
- if (!r_idx) return (FALSE);
- if (!r_ptr->name) return (FALSE);
+ if (!in_bounds(p_ptr->current_floor_ptr, y, x)) return FALSE;
+ if (!r_idx) return FALSE;
+ if (!r_ptr->name) return FALSE;
if (!(mode & PM_IGNORE_TERRAIN))
{
(r_ptr->cur_num >= r_ptr->max_num))
{
/* Cannot create */
- return (FALSE);
+ return FALSE;
}
if ((r_ptr->flags7 & (RF7_UNIQUE2)) &&
(r_ptr->cur_num >= 1))
{
- return (FALSE);
+ return FALSE;
}
if (r_idx == MON_BANORLUPART)
(!ironman_nightmare || (r_ptr->flags1 & (RF1_QUESTOR))))
{
/* Cannot create */
- return (FALSE);
+ return FALSE;
}
}
hack_m_idx_ii = g_ptr->m_idx;
/* Mega-Hack -- catch "failure" */
- if (!g_ptr->m_idx) return (FALSE);
+ if (!g_ptr->m_idx) return FALSE;
/* Get a new monster record */
}
/* Success */
- return (TRUE);
+ return TRUE;
}
/* Success */
- return (TRUE);
+ return TRUE;
}
/*!
monster_race *z_ptr = &r_info[r_idx];
/* Hack - Escorts have to have the same dungeon flag */
- if (mon_hook_dungeon(place_monster_idx) != mon_hook_dungeon(r_idx)) return (FALSE);
+ if (mon_hook_dungeon(place_monster_idx) != mon_hook_dungeon(r_idx)) return FALSE;
/* Require similar "race" */
- if (z_ptr->d_char != r_ptr->d_char) return (FALSE);
+ if (z_ptr->d_char != r_ptr->d_char) return FALSE;
/* Skip more advanced monsters */
- if (z_ptr->level > r_ptr->level) return (FALSE);
+ if (z_ptr->level > r_ptr->level) return FALSE;
/* Skip unique monsters */
- if (z_ptr->flags1 & RF1_UNIQUE) return (FALSE);
+ if (z_ptr->flags1 & RF1_UNIQUE) return FALSE;
/* Paranoia -- Skip identical monsters */
- if (place_monster_idx == r_idx) return (FALSE);
+ if (place_monster_idx == r_idx) return FALSE;
/* Skip different alignment */
if (monster_has_hostile_align(m_ptr, 0, 0, z_ptr)) return FALSE;
if ((r_ptr->flags7 & RF7_CHAMELEON) && !(z_ptr->flags7 & RF7_CHAMELEON))
return FALSE;
- return (TRUE);
+ return TRUE;
}
mode |= PM_KAGE;
/* Place one monster, or fail */
- if (!place_monster_one(who, y, x, r_idx, mode)) return (FALSE);
+ if (!place_monster_one(who, y, x, r_idx, mode)) return FALSE;
/* Require the "group" flag */
- if (!(mode & PM_ALLOW_GROUP)) return (TRUE);
+ if (!(mode & PM_ALLOW_GROUP)) return TRUE;
place_monster_m_idx = hack_m_idx_ii;
}
/* Success */
- return (TRUE);
+ return TRUE;
}
/*!
r_idx = get_mon_num(p_ptr->current_floor_ptr->monster_level);
/* Handle failure */
- if (!r_idx) return (FALSE);
+ if (!r_idx) return FALSE;
/* Attempt to place the monster */
- if (place_monster_aux(0, y, x, r_idx, mode)) return (TRUE);
+ if (place_monster_aux(0, y, x, r_idx, mode)) return TRUE;
- return (FALSE);
+ return FALSE;
}
/*!
r_idx = get_mon_num(p_ptr->current_floor_ptr->monster_level);
/* Handle failure */
- if (!r_idx) return (FALSE);
+ if (!r_idx) return FALSE;
r_ptr = &r_info[r_idx];
msg_print(_("警告!新たなモンスターを配置できません。小さい階ですか?", "Warning! Could not allocate a new monster. Small level?"));
}
- return (FALSE);
+ return FALSE;
}
{
if (alloc_horde(y, x))
{
- return (TRUE);
+ return TRUE;
}
}
else
{
/* Attempt to place the monster, allow groups */
- if (place_monster(y, x, (mode | PM_ALLOW_GROUP))) return (TRUE);
+ if (place_monster(y, x, (mode | PM_ALLOW_GROUP))) return TRUE;
}
- return (FALSE);
+ return FALSE;
}
monster_type *m_ptr = &p_ptr->current_floor_ptr->m_list[summon_specific_who];
/* Hack - Only summon dungeon monsters */
- if (!mon_hook_dungeon(r_idx)) return (FALSE);
+ if (!mon_hook_dungeon(r_idx)) return FALSE;
/* Hack -- identify the summoning monster */
if (summon_specific_who > 0)
if (!summon_unique_okay && ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_NAZGUL))) return FALSE;
/* Hack -- no specific type specified */
- if (!summon_specific_type) return (TRUE);
+ if (!summon_specific_type) return TRUE;
if ((summon_specific_who < 0) &&
((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_NAZGUL)) &&
POSITION x, y;
MONRACE_IDX r_idx;
- if (p_ptr->current_floor_ptr->inside_arena) return (FALSE);
+ if (p_ptr->current_floor_ptr->inside_arena) return FALSE;
if (!mon_scatter(0, &y, &x, y1, x1, 2)) return FALSE;
if (!r_idx)
{
summon_specific_type = 0;
- return (FALSE);
+ return FALSE;
}
if ((type == SUMMON_BLUE_HORROR) || (type == SUMMON_DAWN)) mode |= PM_NO_KAGE;
if (!place_monster_aux(who, y, x, r_idx, mode))
{
summon_specific_type = 0;
- return (FALSE);
+ return FALSE;
}
summon_specific_type = 0;
/* Success */
sound(SOUND_SUMMON);
- return (TRUE);
+ return TRUE;
}
bool vault_aux_jelly(MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
- if (!vault_monster_okay(r_idx)) return (FALSE);
- if ((r_ptr->flags2 & RF2_KILL_BODY) && !(r_ptr->flags1 & RF1_NEVER_BLOW)) return (FALSE);
- if (r_ptr->flags3 & (RF3_EVIL)) return (FALSE);
- if (!my_strchr("ijm,", r_ptr->d_char)) return (FALSE);
- return (TRUE);
+ if (!vault_monster_okay(r_idx)) return FALSE;
+ if ((r_ptr->flags2 & RF2_KILL_BODY) && !(r_ptr->flags1 & RF1_NEVER_BLOW)) return FALSE;
+ if (r_ptr->flags3 & (RF3_EVIL)) return FALSE;
+ if (!my_strchr("ijm,", r_ptr->d_char)) return FALSE;
+ return TRUE;
}
/*!
bool vault_aux_animal(MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
- if (!vault_monster_okay(r_idx)) return (FALSE);
- if (!(r_ptr->flags3 & (RF3_ANIMAL))) return (FALSE);
- return (TRUE);
+ if (!vault_monster_okay(r_idx)) return FALSE;
+ if (!(r_ptr->flags3 & (RF3_ANIMAL))) return FALSE;
+ return TRUE;
}
bool vault_aux_undead(MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
- if (!vault_monster_okay(r_idx)) return (FALSE);
- if (!(r_ptr->flags3 & (RF3_UNDEAD))) return (FALSE);
- return (TRUE);
+ if (!vault_monster_okay(r_idx)) return FALSE;
+ if (!(r_ptr->flags3 & (RF3_UNDEAD))) return FALSE;
+ return TRUE;
}
/*!
int i;
monster_race *r_ptr = &r_info[r_idx];
- if (!vault_monster_okay(r_idx)) return (FALSE);
- if (r_ptr->flags3 & (RF3_EVIL)) return (FALSE);
- if ((r_idx == MON_A_GOLD) || (r_idx == MON_A_SILVER)) return (FALSE);
+ if (!vault_monster_okay(r_idx)) return FALSE;
+ if (r_ptr->flags3 & (RF3_EVIL)) return FALSE;
+ if ((r_idx == MON_A_GOLD) || (r_idx == MON_A_SILVER)) return FALSE;
if (r_ptr->d_char == 'A') return TRUE;
for (i = 0; chapel_list[i]; i++)
if (r_idx == chapel_list[i]) return TRUE;
bool vault_aux_kennel(MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
- if (!vault_monster_okay(r_idx)) return (FALSE);
- if (!my_strchr("CZ", r_ptr->d_char)) return (FALSE);
- return (TRUE);
+ if (!vault_monster_okay(r_idx)) return FALSE;
+ if (!my_strchr("CZ", r_ptr->d_char)) return FALSE;
+ return TRUE;
}
/*!
bool vault_aux_mimic(MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
- if (!vault_monster_okay(r_idx)) return (FALSE);
- if (!my_strchr("!$&(/=?[\\|", r_ptr->d_char)) return (FALSE);
- return (TRUE);
+ if (!vault_monster_okay(r_idx)) return FALSE;
+ if (!my_strchr("!$&(/=?[\\|", r_ptr->d_char)) return FALSE;
+ return TRUE;
}
/*!
*/
bool vault_aux_clone(MONRACE_IDX r_idx)
{
- if (!vault_monster_okay(r_idx)) return (FALSE);
+ if (!vault_monster_okay(r_idx)) return FALSE;
return (r_idx == vault_aux_race);
}
bool vault_aux_symbol_e(MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
- if (!vault_monster_okay(r_idx)) return (FALSE);
- if ((r_ptr->flags2 & RF2_KILL_BODY) && !(r_ptr->flags1 & RF1_NEVER_BLOW)) return (FALSE);
- if (r_ptr->flags3 & (RF3_GOOD)) return (FALSE);
- if (r_ptr->d_char != vault_aux_char) return (FALSE);
- return (TRUE);
+ if (!vault_monster_okay(r_idx)) return FALSE;
+ if ((r_ptr->flags2 & RF2_KILL_BODY) && !(r_ptr->flags1 & RF1_NEVER_BLOW)) return FALSE;
+ if (r_ptr->flags3 & (RF3_GOOD)) return FALSE;
+ if (r_ptr->d_char != vault_aux_char) return FALSE;
+ return TRUE;
}
bool vault_aux_symbol_g(MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
- if (!vault_monster_okay(r_idx)) return (FALSE);
- if ((r_ptr->flags2 & RF2_KILL_BODY) && !(r_ptr->flags1 & RF1_NEVER_BLOW)) return (FALSE);
- if (r_ptr->flags3 & (RF3_EVIL)) return (FALSE);
- if (r_ptr->d_char != vault_aux_char) return (FALSE);
- return (TRUE);
+ if (!vault_monster_okay(r_idx)) return FALSE;
+ if ((r_ptr->flags2 & RF2_KILL_BODY) && !(r_ptr->flags1 & RF1_NEVER_BLOW)) return FALSE;
+ if (r_ptr->flags3 & (RF3_EVIL)) return FALSE;
+ if (r_ptr->d_char != vault_aux_char) return FALSE;
+ return TRUE;
}
bool vault_aux_orc(MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
- if (!vault_monster_okay(r_idx)) return (FALSE);
- if (!(r_ptr->flags3 & RF3_ORC)) return (FALSE);
- if (r_ptr->flags3 & RF3_UNDEAD) return (FALSE);
- return (TRUE);
+ if (!vault_monster_okay(r_idx)) return FALSE;
+ if (!(r_ptr->flags3 & RF3_ORC)) return FALSE;
+ if (r_ptr->flags3 & RF3_UNDEAD) return FALSE;
+ return TRUE;
}
bool vault_aux_troll(MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
- if (!vault_monster_okay(r_idx)) return (FALSE);
- if (!(r_ptr->flags3 & RF3_TROLL)) return (FALSE);
- if (r_ptr->flags3 & RF3_UNDEAD) return (FALSE);
- return (TRUE);
+ if (!vault_monster_okay(r_idx)) return FALSE;
+ if (!(r_ptr->flags3 & RF3_TROLL)) return FALSE;
+ if (r_ptr->flags3 & RF3_UNDEAD) return FALSE;
+ return TRUE;
}
bool vault_aux_giant(MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
- if (!vault_monster_okay(r_idx)) return (FALSE);
- if (!(r_ptr->flags3 & RF3_GIANT)) return (FALSE);
- if (r_ptr->flags3 & RF3_GOOD) return (FALSE);
- if (r_ptr->flags3 & RF3_UNDEAD) return (FALSE);
- return (TRUE);
+ if (!vault_monster_okay(r_idx)) return FALSE;
+ if (!(r_ptr->flags3 & RF3_GIANT)) return FALSE;
+ if (r_ptr->flags3 & RF3_GOOD) return FALSE;
+ if (r_ptr->flags3 & RF3_UNDEAD) return FALSE;
+ return TRUE;
}
bool vault_aux_dragon(MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
- if (!vault_monster_okay(r_idx)) return (FALSE);
- if (!(r_ptr->flags3 & RF3_DRAGON)) return (FALSE);
- if (r_ptr->flags4 != vault_aux_dragon_mask4) return (FALSE);
- if (r_ptr->flags3 & RF3_UNDEAD) return (FALSE);
- return (TRUE);
+ if (!vault_monster_okay(r_idx)) return FALSE;
+ if (!(r_ptr->flags3 & RF3_DRAGON)) return FALSE;
+ if (r_ptr->flags4 != vault_aux_dragon_mask4) return FALSE;
+ if (r_ptr->flags3 & RF3_UNDEAD) return FALSE;
+ return TRUE;
}
bool vault_aux_demon(MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
- if (!vault_monster_okay(r_idx)) return (FALSE);
- if ((r_ptr->flags2 & RF2_KILL_BODY) && !(r_ptr->flags1 & RF1_NEVER_BLOW)) return (FALSE);
- if (!(r_ptr->flags3 & RF3_DEMON)) return (FALSE);
- return (TRUE);
+ if (!vault_monster_okay(r_idx)) return FALSE;
+ if ((r_ptr->flags2 & RF2_KILL_BODY) && !(r_ptr->flags1 & RF1_NEVER_BLOW)) return FALSE;
+ if (!(r_ptr->flags3 & RF3_DEMON)) return FALSE;
+ return TRUE;
}
bool vault_aux_cthulhu(MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
- if (!vault_monster_okay(r_idx)) return (FALSE);
- if ((r_ptr->flags2 & RF2_KILL_BODY) && !(r_ptr->flags1 & RF1_NEVER_BLOW)) return (FALSE);
- if (!(r_ptr->flags2 & (RF2_ELDRITCH_HORROR))) return (FALSE);
- return (TRUE);
+ if (!vault_monster_okay(r_idx)) return FALSE;
+ if ((r_ptr->flags2 & RF2_KILL_BODY) && !(r_ptr->flags1 & RF1_NEVER_BLOW)) return FALSE;
+ if (!(r_ptr->flags2 & (RF2_ELDRITCH_HORROR))) return FALSE;
+ return TRUE;
}
/*!
monster_race *r_ptr = &r_info[r_idx];
/* Require eldritch horrors */
- if (!(r_ptr->flags2 & (RF2_ELDRITCH_HORROR))) return (FALSE);
+ if (!(r_ptr->flags2 & (RF2_ELDRITCH_HORROR))) return FALSE;
/* Require high level */
- if (r_ptr->level <= p_ptr->lev) return (FALSE);
+ if (r_ptr->level <= p_ptr->lev) return FALSE;
/* Accept this monster */
- return (TRUE);
+ return TRUE;
}
/*!
/* if (!mon_hook_dungeon(r_idx)) return FALSE; */
/* Decline unique monsters */
-/* if (r_ptr->flags1 & (RF1_UNIQUE)) return (FALSE); */
-/* if (r_ptr->flags7 & (RF7_NAZGUL)) return (FALSE); */
+/* if (r_ptr->flags1 & (RF1_UNIQUE)) return FALSE; */
+/* if (r_ptr->flags7 & (RF7_NAZGUL)) return FALSE; */
- if (r_ptr->flags1 & (RF1_NEVER_MOVE)) return (FALSE);
- if (r_ptr->flags2 & (RF2_MULTIPLY)) return (FALSE);
- if (r_ptr->flags2 & (RF2_QUANTUM)) return (FALSE);
- if (r_ptr->flags7 & (RF7_AQUATIC)) return (FALSE);
- if (r_ptr->flags7 & (RF7_CHAMELEON)) return (FALSE);
+ if (r_ptr->flags1 & (RF1_NEVER_MOVE)) return FALSE;
+ if (r_ptr->flags2 & (RF2_MULTIPLY)) return FALSE;
+ if (r_ptr->flags2 & (RF2_QUANTUM)) return FALSE;
+ if (r_ptr->flags7 & (RF7_AQUATIC)) return FALSE;
+ if (r_ptr->flags7 & (RF7_CHAMELEON)) return FALSE;
for (i = 0; i < 4; i++)
{
- if (r_ptr->blow[i].method == RBM_EXPLODE) return (FALSE);
+ if (r_ptr->blow[i].method == RBM_EXPLODE) return FALSE;
if (r_ptr->blow[i].effect != RBE_DR_MANA) dam += r_ptr->blow[i].d_dice;
}
- if (!dam && !(r_ptr->flags4 & (RF4_BOLT_MASK | RF4_BEAM_MASK | RF4_BALL_MASK | RF4_BREATH_MASK)) && !(r_ptr->a_ability_flags1 & (RF5_BOLT_MASK | RF5_BEAM_MASK | RF5_BALL_MASK | RF5_BREATH_MASK)) && !(r_ptr->a_ability_flags2 & (RF6_BOLT_MASK | RF6_BEAM_MASK | RF6_BALL_MASK | RF6_BREATH_MASK))) return (FALSE);
+ if (!dam && !(r_ptr->flags4 & (RF4_BOLT_MASK | RF4_BEAM_MASK | RF4_BALL_MASK | RF4_BREATH_MASK)) && !(r_ptr->a_ability_flags1 & (RF5_BOLT_MASK | RF5_BEAM_MASK | RF5_BALL_MASK | RF5_BREATH_MASK)) && !(r_ptr->a_ability_flags2 & (RF6_BOLT_MASK | RF6_BEAM_MASK | RF6_BALL_MASK | RF6_BREATH_MASK))) return FALSE;
- return (TRUE);
+ return TRUE;
}
/*!
monster_race *r_ptr = &r_info[r_idx];
/* No uniques */
- if (r_ptr->flags1 & RF1_UNIQUE) return (FALSE);
- if (r_ptr->flags7 & RF7_KAGE) return (FALSE);
- if (r_ptr->flagsr & RFR_RES_ALL) return (FALSE);
- if (r_ptr->flags7 & RF7_NAZGUL) return (FALSE);
- if (r_ptr->flags1 & RF1_FORCE_DEPTH) return (FALSE);
- if (r_ptr->flags7 & RF7_UNIQUE2) return (FALSE);
-
- return (TRUE);
+ if (r_ptr->flags1 & RF1_UNIQUE) return FALSE;
+ if (r_ptr->flags7 & RF7_KAGE) return FALSE;
+ if (r_ptr->flagsr & RFR_RES_ALL) return FALSE;
+ if (r_ptr->flags7 & RF7_NAZGUL) return FALSE;
+ if (r_ptr->flags1 & RF1_FORCE_DEPTH) return FALSE;
+ if (r_ptr->flags7 & RF7_UNIQUE2) return FALSE;
+
+ return TRUE;
}
if (pattern_tile(y, x)) continue;
/* Require empty floor grid in line of projection */
- if (cave_empty_bold(p_ptr->current_floor_ptr, y, x) && projectable(p_ptr->current_floor_ptr, y1, x1, y, x) && projectable(p_ptr->current_floor_ptr, y, x, y1, x1)) return (TRUE);
+ if (cave_empty_bold(p_ptr->current_floor_ptr, y, x) && projectable(p_ptr->current_floor_ptr, y1, x1, y, x) && projectable(p_ptr->current_floor_ptr, y, x, y1, x1)) return TRUE;
}
}
grid_n = project_path(p_ptr->current_floor_ptr, grid_g, MAX_RANGE, y1, x1, y2, x2, 0);
/* No grid is ever projectable from itself */
- if (!grid_n) return (FALSE);
+ if (!grid_n) return FALSE;
/* Final grid */
y = GRID_Y(grid_g[grid_n-1]);
x = GRID_X(grid_g[grid_n-1]);
/* May not end in an unrequested grid */
- if ((y != y2) || (x != x2)) return (FALSE);
+ if ((y != y2) || (x != x2)) return FALSE;
for (i = 0; i < grid_n; i++)
{
monster_type *m_ptr = &p_ptr->current_floor_ptr->m_list[p_ptr->current_floor_ptr->grid_array[y][x].m_idx];
if (is_friend == is_pet(m_ptr))
{
- return (FALSE);
+ return FALSE;
}
}
/* Pets may not shoot through the character - TNB */
if (player_bold(p_ptr, y, x))
{
- if (is_friend) return (FALSE);
+ if (is_friend) return FALSE;
}
}
- return (TRUE);
+ return TRUE;
}
/*!
static bool spell_attack(byte spell)
{
/* All RF4 spells hurt (except for shriek and dispel) */
- if (spell < 128 && spell > 98) return (TRUE);
+ if (spell < 128 && spell > 98) return TRUE;
/* Various "ball" spells */
- if (spell >= 128 && spell <= 128 + 8) return (TRUE);
+ if (spell >= 128 && spell <= 128 + 8) return TRUE;
/* "Cause wounds" and "bolt" spells */
- if (spell >= 128 + 12 && spell < 128 + 27) return (TRUE);
+ if (spell >= 128 + 12 && spell < 128 + 27) return TRUE;
/* Hand of Doom */
- if (spell == 160 + 1) return (TRUE);
+ if (spell == 160 + 1) return TRUE;
/* Psycho-Spear */
- if (spell == 160 + 11) return (TRUE);
+ if (spell == 160 + 11) return TRUE;
/* Doesn't hurt */
- return (FALSE);
+ return FALSE;
}
static bool spell_escape(byte spell)
{
/* Blink or Teleport */
- if (spell == 160 + 4 || spell == 160 + 5) return (TRUE);
+ if (spell == 160 + 4 || spell == 160 + 5) return TRUE;
/* Teleport the player away */
- if (spell == 160 + 9 || spell == 160 + 10) return (TRUE);
+ if (spell == 160 + 9 || spell == 160 + 10) return TRUE;
/* Isn't good for escaping */
- return (FALSE);
+ return FALSE;
}
/*!
static bool spell_annoy(byte spell)
{
/* Shriek */
- if (spell == 96 + 0) return (TRUE);
+ if (spell == 96 + 0) return TRUE;
/* Brain smash, et al (added curses) */
- if (spell >= 128 + 9 && spell <= 128 + 14) return (TRUE);
+ if (spell >= 128 + 9 && spell <= 128 + 14) return TRUE;
/* Scare, confuse, blind, slow, paralyze */
- if (spell >= 128 + 27 && spell <= 128 + 31) return (TRUE);
+ if (spell >= 128 + 27 && spell <= 128 + 31) return TRUE;
/* Teleport to */
- if (spell == 160 + 8) return (TRUE);
+ if (spell == 160 + 8) return TRUE;
/* Teleport level */
- if (spell == 160 + 10) return (TRUE);
+ if (spell == 160 + 10) return TRUE;
/* Darkness, make traps, cause amnesia */
- if (spell >= 160 + 12 && spell <= 160 + 14) return (TRUE);
+ if (spell >= 160 + 12 && spell <= 160 + 14) return TRUE;
/* Doesn't annoy */
- return (FALSE);
+ return FALSE;
}
/*!
static bool spell_summon(byte spell)
{
/* All summon spells */
- if (spell >= 160 + 16) return (TRUE);
+ if (spell >= 160 + 16) return TRUE;
/* Doesn't summon */
- return (FALSE);
+ return FALSE;
}
static bool spell_raise(byte spell)
{
/* All raise-dead spells */
- if (spell == 160 + 15) return (TRUE);
+ if (spell == 160 + 15) return TRUE;
/* Doesn't summon */
- return (FALSE);
+ return FALSE;
}
/*!
static bool spell_tactic(byte spell)
{
/* Blink */
- if (spell == 160 + 4) return (TRUE);
+ if (spell == 160 + 4) return TRUE;
/* Not good */
- return (FALSE);
+ return FALSE;
}
/*!
static bool spell_invulner(byte spell)
{
/* Invulnerability */
- if (spell == 160 + 3) return (TRUE);
+ if (spell == 160 + 3) return TRUE;
/* No invulnerability */
- return (FALSE);
+ return FALSE;
}
/*!
static bool spell_haste(byte spell)
{
/* Haste self */
- if (spell == 160 + 0) return (TRUE);
+ if (spell == 160 + 0) return TRUE;
/* Not a haste spell */
- return (FALSE);
+ return FALSE;
}
*/
static bool spell_world(byte spell)
{
- if (spell == 160 + 6) return (TRUE);
- return (FALSE);
+ if (spell == 160 + 6) return TRUE;
+ return FALSE;
}
static bool spell_special(byte spell)
{
if (p_ptr->phase_out) return FALSE;
- if (spell == 160 + 7) return (TRUE);
- return (FALSE);
+ if (spell == 160 + 7) return TRUE;
+ return FALSE;
}
static bool spell_psy_spe(byte spell)
{
/* world */
- if (spell == 160 + 11) return (TRUE);
+ if (spell == 160 + 11) return TRUE;
/* Not a haste spell */
- return (FALSE);
+ return FALSE;
}
static bool spell_heal(byte spell)
{
/* Heal */
- if (spell == 160 + 2) return (TRUE);
+ if (spell == 160 + 2) return TRUE;
/* No healing */
- return (FALSE);
+ return FALSE;
}
static bool spell_dispel(byte spell)
{
/* Dispel */
- if (spell == 96 + 2) return (TRUE);
+ if (spell == 96 + 2) return TRUE;
/* No dispel */
- return (FALSE);
+ return FALSE;
}
monster_race *r_ptr = &r_info[m_ptr->r_idx];
/* Invulnabilty (including the song) */
- if (IS_INVULN(creature_ptr)) return (TRUE);
+ if (IS_INVULN(creature_ptr)) return TRUE;
/* Wraith form */
- if (creature_ptr->wraith_form) return (TRUE);
+ if (creature_ptr->wraith_form) return TRUE;
/* Shield */
- if (creature_ptr->shield) return (TRUE);
+ if (creature_ptr->shield) return TRUE;
/* Magic defence */
- if (creature_ptr->magicdef) return (TRUE);
+ if (creature_ptr->magicdef) return TRUE;
/* Multi Shadow */
- if (creature_ptr->multishadow) return (TRUE);
+ if (creature_ptr->multishadow) return TRUE;
/* Robe of dust */
- if (creature_ptr->dustrobe) return (TRUE);
+ if (creature_ptr->dustrobe) return TRUE;
/* Berserk Strength */
- if (creature_ptr->shero && (creature_ptr->pclass != CLASS_BERSERKER)) return (TRUE);
+ if (creature_ptr->shero && (creature_ptr->pclass != CLASS_BERSERKER)) return TRUE;
/* Demon Lord */
- if (creature_ptr->mimic_form == MIMIC_DEMON_LORD) return (TRUE);
+ if (creature_ptr->mimic_form == MIMIC_DEMON_LORD) return TRUE;
/* Elemental resistances */
if (r_ptr->flags4 & RF4_BR_ACID)
{
- if (!creature_ptr->immune_acid && (creature_ptr->oppose_acid || music_singing(creature_ptr, MUSIC_RESIST))) return (TRUE);
- if (creature_ptr->special_defense & DEFENSE_ACID) return (TRUE);
+ if (!creature_ptr->immune_acid && (creature_ptr->oppose_acid || music_singing(creature_ptr, MUSIC_RESIST))) return TRUE;
+ if (creature_ptr->special_defense & DEFENSE_ACID) return TRUE;
}
if (r_ptr->flags4 & RF4_BR_FIRE)
{
if (!((creature_ptr->prace == RACE_DEMON) && creature_ptr->lev > 44))
{
- if (!creature_ptr->immune_fire && (creature_ptr->oppose_fire || music_singing(creature_ptr, MUSIC_RESIST))) return (TRUE);
- if (creature_ptr->special_defense & DEFENSE_FIRE) return (TRUE);
+ if (!creature_ptr->immune_fire && (creature_ptr->oppose_fire || music_singing(creature_ptr, MUSIC_RESIST))) return TRUE;
+ if (creature_ptr->special_defense & DEFENSE_FIRE) return TRUE;
}
}
if (r_ptr->flags4 & RF4_BR_ELEC)
{
- if (!creature_ptr->immune_elec && (creature_ptr->oppose_elec || music_singing(creature_ptr, MUSIC_RESIST))) return (TRUE);
- if (creature_ptr->special_defense & DEFENSE_ELEC) return (TRUE);
+ if (!creature_ptr->immune_elec && (creature_ptr->oppose_elec || music_singing(creature_ptr, MUSIC_RESIST))) return TRUE;
+ if (creature_ptr->special_defense & DEFENSE_ELEC) return TRUE;
}
if (r_ptr->flags4 & RF4_BR_COLD)
{
- if (!creature_ptr->immune_cold && (creature_ptr->oppose_cold || music_singing(creature_ptr, MUSIC_RESIST))) return (TRUE);
- if (creature_ptr->special_defense & DEFENSE_COLD) return (TRUE);
+ if (!creature_ptr->immune_cold && (creature_ptr->oppose_cold || music_singing(creature_ptr, MUSIC_RESIST))) return TRUE;
+ if (creature_ptr->special_defense & DEFENSE_COLD) return TRUE;
}
if (r_ptr->flags4 & (RF4_BR_POIS | RF4_BR_NUKE))
{
if (!((creature_ptr->pclass == CLASS_NINJA) && creature_ptr->lev > 44))
{
- if (creature_ptr->oppose_pois || music_singing(creature_ptr, MUSIC_RESIST)) return (TRUE);
- if (creature_ptr->special_defense & DEFENSE_POIS) return (TRUE);
+ if (creature_ptr->oppose_pois || music_singing(creature_ptr, MUSIC_RESIST)) return TRUE;
+ if (creature_ptr->special_defense & DEFENSE_POIS) return TRUE;
}
}
/* Ultimate resistance */
- if (creature_ptr->ult_res) return (TRUE);
+ if (creature_ptr->ult_res) return TRUE;
/* Potion of Neo Tsuyosi special */
- if (creature_ptr->tsuyoshi) return (TRUE);
+ if (creature_ptr->tsuyoshi) return TRUE;
/* Elemental Brands */
- if ((creature_ptr->special_attack & ATTACK_ACID) && !(r_ptr->flagsr & RFR_EFF_IM_ACID_MASK)) return (TRUE);
- if ((creature_ptr->special_attack & ATTACK_FIRE) && !(r_ptr->flagsr & RFR_EFF_IM_FIRE_MASK)) return (TRUE);
- if ((creature_ptr->special_attack & ATTACK_ELEC) && !(r_ptr->flagsr & RFR_EFF_IM_ELEC_MASK)) return (TRUE);
- if ((creature_ptr->special_attack & ATTACK_COLD) && !(r_ptr->flagsr & RFR_EFF_IM_COLD_MASK)) return (TRUE);
- if ((creature_ptr->special_attack & ATTACK_POIS) && !(r_ptr->flagsr & RFR_EFF_IM_POIS_MASK)) return (TRUE);
+ if ((creature_ptr->special_attack & ATTACK_ACID) && !(r_ptr->flagsr & RFR_EFF_IM_ACID_MASK)) return TRUE;
+ if ((creature_ptr->special_attack & ATTACK_FIRE) && !(r_ptr->flagsr & RFR_EFF_IM_FIRE_MASK)) return TRUE;
+ if ((creature_ptr->special_attack & ATTACK_ELEC) && !(r_ptr->flagsr & RFR_EFF_IM_ELEC_MASK)) return TRUE;
+ if ((creature_ptr->special_attack & ATTACK_COLD) && !(r_ptr->flagsr & RFR_EFF_IM_COLD_MASK)) return TRUE;
+ if ((creature_ptr->special_attack & ATTACK_POIS) && !(r_ptr->flagsr & RFR_EFF_IM_POIS_MASK)) return TRUE;
if (creature_ptr->pspeed < 145)
{
- if (IS_FAST(creature_ptr)) return (TRUE);
+ if (IS_FAST(creature_ptr)) return TRUE;
}
/* Light speed */
- if (creature_ptr->lightspeed && (m_ptr->mspeed < 136)) return (TRUE);
+ if (creature_ptr->lightspeed && (m_ptr->mspeed < 136)) return TRUE;
if (creature_ptr->riding && (creature_ptr->current_floor_ptr->m_list[creature_ptr->riding].mspeed < 135))
{
- if (MON_FAST(&creature_ptr->current_floor_ptr->m_list[creature_ptr->riding])) return (TRUE);
+ if (MON_FAST(&creature_ptr->current_floor_ptr->m_list[creature_ptr->riding])) return TRUE;
}
/* No need to cast dispel spell */
- return (FALSE);
+ return FALSE;
}
if (MON_CONFUSED(m_ptr))
{
reset_target(m_ptr);
- return (FALSE);
+ return FALSE;
}
/* Cannot cast spells when nice */
- if (m_ptr->mflag & MFLAG_NICE) return (FALSE);
- if (!is_hostile(m_ptr)) return (FALSE);
+ if (m_ptr->mflag & MFLAG_NICE) return FALSE;
+ if (!is_hostile(m_ptr)) return FALSE;
/* Sometimes forbid inate attacks (breaths) */
/*** require projectable player ***/
/* Check range */
- if ((m_ptr->cdis > MAX_RANGE) && !m_ptr->target_y) return (FALSE);
+ if ((m_ptr->cdis > MAX_RANGE) && !m_ptr->target_y) return FALSE;
/* Check path for lite breath */
if (f4 & RF4_BR_LITE)
}
/* No spells left */
- if (!f4 && !f5 && !f6) return (FALSE);
+ if (!f4 && !f5 && !f6) return FALSE;
/* Remove the "ineffective" spells */
remove_bad_spells(m_idx, target_ptr, &f4, &f5, &f6);
}
/* No spells left */
- if (!f4 && !f5 && !f6) return (FALSE);
+ if (!f4 && !f5 && !f6) return FALSE;
if (!(r_ptr->flags2 & RF2_STUPID))
{
}
/* No spells left */
- if (!f4 && !f5 && !f6) return (FALSE);
+ if (!f4 && !f5 && !f6) return FALSE;
}
/* Extract the "inate" spells */
}
/* No spells left */
- if (!num) return (FALSE);
+ if (!num) return FALSE;
/* Stop if player is dead or gone */
- if (!target_ptr->playing || target_ptr->is_dead) return (FALSE);
+ if (!target_ptr->playing || target_ptr->is_dead) return FALSE;
/* Stop if player is leaving */
- if (target_ptr->leaving) return (FALSE);
+ if (target_ptr->leaving) return FALSE;
/* Get the monster name (or "it") */
monster_desc(m_name, m_ptr, 0x00);
}
/* Abort if no spell was chosen */
- if (!thrown_spell) return (FALSE);
+ if (!thrown_spell) return FALSE;
/* Calculate spell failure rate */
failrate = 25 - (rlev + 3) / 4;
disturb(target_ptr, TRUE, TRUE);
msg_format(_("%^sは呪文を唱えようとしたが失敗した。", "%^s tries to cast a spell, but fails."), m_name);
- return (TRUE);
+ return TRUE;
}
/* Hex: Anti Magic Barrier */
if (!spell_is_inate(thrown_spell) && magic_barrier(p_ptr, m_idx))
{
msg_format(_("反魔法バリアが%^sの呪文をかき消した。", "Anti magic barrier cancels the spell which %^s casts."), m_name);
- return (TRUE);
+ return TRUE;
}
/* Projectable? */
case 160 + 11: /* RF6_PSY_SPEAR */
case 160 + 12: /* RF6_DARKNESS */
case 160 + 14: /* RF6_FORGET */
- return (FALSE);
+ return FALSE;
}
}
}
/* A spell was cast */
- return (TRUE);
+ return TRUE;
}
grid_n = project_path(p_ptr->current_floor_ptr, grid_g, MAX_RANGE, y1, x1, y2, x2, PROJECT_THRU);
/* No grid is ever projectable from itself */
- if (!grid_n) return (FALSE);
+ if (!grid_n) return FALSE;
for (i = 0; i < grid_n; i++)
{
bool can_remember;
/* Cannot cast spells when confused */
- if (MON_CONFUSED(m_ptr)) return (FALSE);
+ if (MON_CONFUSED(m_ptr)) return FALSE;
/* Extract the racial spell flags */
f4 = r_ptr->flags4;
}
/* No spells left */
- if (!num) return (FALSE);
+ if (!num) return FALSE;
/* Stop if player is dead or gone */
- if (!target_ptr->playing || target_ptr->is_dead) return (FALSE);
+ if (!target_ptr->playing || target_ptr->is_dead) return FALSE;
/* Handle "leaving" */
- if (target_ptr->leaving) return (FALSE);
+ if (target_ptr->leaving) return FALSE;
/* Get the monster name (or "it") */
monster_desc(m_name, m_ptr, 0x00);
if (see_m) msg_format(_("%^sは呪文を唱えようとしたが失敗した。",
"%^s tries to cast a spell, but fails."), m_name);
- return (TRUE);
+ return TRUE;
}
/* Hex: Anti Magic Barrier */
{
if (see_m) msg_format(_("反魔法バリアが%^sの呪文をかき消した。",
"Anti magic barrier cancels the spell which %^s casts."), m_name);
- return (TRUE);
+ return TRUE;
}
can_remember = is_original_ap_and_seen(m_ptr);
if (i == num)
{
msg_print(_("その種類の魔法は覚えていない!", "You don't know any spell of this type."));
- return (FALSE);
+ return FALSE;
}
/* Build a prompt (accept all spells) */
case '0':
{
screen_load();
- return (FALSE);
+ return FALSE;
}
case '8':
handle_stuff(caster_ptr);
/* Abort if needed */
- if (!flag) return (FALSE);
+ if (!flag) return FALSE;
/* Save the choice */
(*sn) = spellnum[i];
disturb(target_ptr, TRUE, TRUE);
if (m_ptr->r_idx == MON_DIO) who = 1;
else if (m_ptr->r_idx == MON_WONG) who = 3;
- if (!set_monster_timewalk(target_ptr, randint1(2) + 2, who, TRUE)) return (FALSE);
+ if (!set_monster_timewalk(target_ptr, randint1(2) + 2, who, TRUE)) return FALSE;
return who;
}
case TV_HARD_ARMOR:
case TV_DRAG_ARMOR:
{
- return (TRUE);
+ return TRUE;
}
/* Staffs/Scrolls are wood/paper */
case TV_STAFF:
case TV_SCROLL:
{
- return (TRUE);
+ return TRUE;
}
/* Ouch */
case TV_CHEST:
{
- return (TRUE);
+ return TRUE;
}
/* Junk is useless */
case TV_BOTTLE:
case TV_JUNK:
{
- return (TRUE);
+ return TRUE;
}
}
- return (FALSE);
+ return FALSE;
}
case TV_RING:
case TV_WAND:
{
- return (TRUE);
+ return TRUE;
}
}
- return (FALSE);
+ return FALSE;
}
case TV_CLOAK:
case TV_SOFT_ARMOR:
{
- return (TRUE);
+ return TRUE;
}
/* Books */
case TV_HISSATSU_BOOK:
case TV_HEX_BOOK:
{
- return (TRUE);
+ return TRUE;
}
/* Chests */
case TV_CHEST:
{
- return (TRUE);
+ return TRUE;
}
/* Staffs/Scrolls burn */
case TV_STAFF:
case TV_SCROLL:
{
- return (TRUE);
+ return TRUE;
}
}
- return (FALSE);
+ return FALSE;
}
case TV_FLASK:
case TV_BOTTLE:
{
- return (TRUE);
+ return TRUE;
}
}
- return (FALSE);
+ return FALSE;
}
int set_acid_destroy(object_type *o_ptr)
{
BIT_FLAGS flgs[TR_FLAG_SIZE];
- if (!hates_acid(o_ptr)) return (FALSE);
+ if (!hates_acid(o_ptr)) return FALSE;
object_flags(o_ptr, flgs);
- if (have_flag(flgs, TR_IGNORE_ACID)) return (FALSE);
- return (TRUE);
+ if (have_flag(flgs, TR_IGNORE_ACID)) return FALSE;
+ return TRUE;
}
int set_elec_destroy(object_type *o_ptr)
{
BIT_FLAGS flgs[TR_FLAG_SIZE];
- if (!hates_elec(o_ptr)) return (FALSE);
+ if (!hates_elec(o_ptr)) return FALSE;
object_flags(o_ptr, flgs);
- if (have_flag(flgs, TR_IGNORE_ELEC)) return (FALSE);
- return (TRUE);
+ if (have_flag(flgs, TR_IGNORE_ELEC)) return FALSE;
+ return TRUE;
}
int set_fire_destroy(object_type *o_ptr)
{
BIT_FLAGS flgs[TR_FLAG_SIZE];
- if (!hates_fire(o_ptr)) return (FALSE);
+ if (!hates_fire(o_ptr)) return FALSE;
object_flags(o_ptr, flgs);
- if (have_flag(flgs, TR_IGNORE_FIRE)) return (FALSE);
- return (TRUE);
+ if (have_flag(flgs, TR_IGNORE_FIRE)) return FALSE;
+ return TRUE;
}
int set_cold_destroy(object_type *o_ptr)
{
BIT_FLAGS flgs[TR_FLAG_SIZE];
- if (!hates_cold(o_ptr)) return (FALSE);
+ if (!hates_cold(o_ptr)) return FALSE;
object_flags(o_ptr, flgs);
- if (have_flag(flgs, TR_IGNORE_COLD)) return (FALSE);
- return (TRUE);
+ if (have_flag(flgs, TR_IGNORE_COLD)) return FALSE;
+ return TRUE;
}
/*!
case TV_HISSATSU_BOOK:
case TV_HEX_BOOK:
{
- return (TRUE);
+ return TRUE;
}
/* Simple items */
case TV_SPIKE:
case TV_WHISTLE:
{
- return (TRUE);
+ return TRUE;
}
/* All Food, Potions, Scrolls, Rods */
case TV_SCROLL:
case TV_ROD:
{
- return (TRUE);
+ return TRUE;
}
}
- return (FALSE);
+ return FALSE;
}
/*!
{
if (have_flag(flgs, fi_ptr->flag) &&
(fi_ptr->except_flag == -1 || !have_flag(flgs, fi_ptr->except_flag)))
- return (TRUE);
+ return TRUE;
fi_ptr++;
}
- return (FALSE);
+ return FALSE;
}
/*!
{
if ((o_ptr->tval == TV_JUNK) || (o_ptr->tval == TV_SKELETON)) return TRUE;
if ((o_ptr->tval == TV_CORPSE) && (o_ptr->sval == SV_SKELETON)) return TRUE;
- return (FALSE);
+ return FALSE;
}
/*!
case TV_POLEARM:
case TV_DIGGING:
{
- return (TRUE);
+ return TRUE;
}
case TV_SWORD:
{
- if (o_ptr->sval != SV_DOKUBARI) return (TRUE);
+ if (o_ptr->sval != SV_DOKUBARI) return TRUE;
}
}
- return (FALSE);
+ return FALSE;
}
/*!
bool item_tester_hook_melee_weapon(object_type *o_ptr)
{
/* Check for a usable slot */
- if ((o_ptr->tval >= TV_DIGGING) && (o_ptr->tval <= TV_SWORD)) return (TRUE);
- return (FALSE);
+ if ((o_ptr->tval >= TV_DIGGING) && (o_ptr->tval <= TV_SWORD)) return TRUE;
+ return FALSE;
}
case TV_ARROW:
case TV_BOLT:
{
- return (TRUE);
+ return TRUE;
}
}
- return (FALSE);
+ return FALSE;
}
/*!
*/
bool item_tester_hook_boomerang(object_type *o_ptr)
{
- if ((o_ptr->tval == TV_DIGGING) || (o_ptr->tval == TV_SWORD) || (o_ptr->tval == TV_POLEARM) || (o_ptr->tval == TV_HAFTED)) return (TRUE);
- return (FALSE);
+ if ((o_ptr->tval == TV_DIGGING) || (o_ptr->tval == TV_SWORD) || (o_ptr->tval == TV_POLEARM) || (o_ptr->tval == TV_HAFTED)) return TRUE;
+ return FALSE;
}
/*!
return TRUE;
}
- return (FALSE);
+ return FALSE;
}
/*!
/* Check for a usable slot */
if (((o_ptr->tval >= TV_DIGGING) && (o_ptr->tval <= TV_SWORD)) ||
(o_ptr->tval == TV_SHIELD) || (o_ptr->tval == TV_CAPTURE) ||
- (o_ptr->tval == TV_CARD)) return (TRUE);
- return (FALSE);
+ (o_ptr->tval == TV_CARD)) return TRUE;
+ return FALSE;
}
/*!
BIT_FLAGS flgs[TR_FLAG_SIZE];
/* Not known */
- if (!object_is_known(o_ptr)) return (FALSE);
+ if (!object_is_known(o_ptr)) return FALSE;
object_flags(o_ptr, flgs);
/* Check activation flag */
- if (have_flag(flgs, TR_ACTIVATE)) return (TRUE);
+ if (have_flag(flgs, TR_ACTIVATE)) return TRUE;
- return (FALSE);
+ return FALSE;
}
/*!
if (p_ptr->psex == SEX_MALE) return FALSE;
/* Check for a usable slot */
- if (wield_slot(p_ptr, o_ptr) >= INVEN_RARM) return (TRUE);
+ if (wield_slot(p_ptr, o_ptr) >= INVEN_RARM) return TRUE;
- return (FALSE);
+ return FALSE;
}
/* Ammo */
if (o_ptr->tval == p_ptr->tval_ammo)
- return (TRUE);
+ return TRUE;
/* Useable object */
switch (o_ptr->tval)
case TV_POTION:
case TV_FOOD:
{
- return (TRUE);
+ return TRUE;
}
default:
int i;
/* Not known */
- if (!object_is_known(o_ptr)) return (FALSE);
+ if (!object_is_known(o_ptr)) return FALSE;
/* HACK - only items from the equipment can be activated */
for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
object_flags(o_ptr, flgs);
/* Check activation flag */
- if (have_flag(flgs, TR_ACTIVATE)) return (TRUE);
+ if (have_flag(flgs, TR_ACTIVATE)) return TRUE;
}
}
}
}
- return (FALSE);
+ return FALSE;
}
*/
bool item_tester_hook_readable(object_type *o_ptr)
{
- if ((o_ptr->tval == TV_SCROLL) || (o_ptr->tval == TV_PARCHMENT) || (o_ptr->name1 == ART_GHB) || (o_ptr->name1 == ART_POWER)) return (TRUE);
- return (FALSE);
+ if ((o_ptr->tval == TV_SCROLL) || (o_ptr->tval == TV_PARCHMENT) || (o_ptr->name1 == ART_GHB) || (o_ptr->name1 == ART_POWER)) return TRUE;
+ return FALSE;
}
case TV_ARROW:
case TV_SHOT:
{
- return (TRUE);
+ return TRUE;
}
case TV_SWORD:
{
- if (o_ptr->sval != SV_DOKUBARI) return (TRUE);
+ if (o_ptr->sval != SV_DOKUBARI) return TRUE;
}
}
- return (FALSE);
+ return FALSE;
}
/*!
case TV_POLEARM:
case TV_DIGGING:
{
- return (TRUE);
+ return TRUE;
}
}
- return (FALSE);
+ return FALSE;
}
/*!
bool item_tester_hook_recharge(object_type *o_ptr)
{
/* Recharge staffs */
- if (o_ptr->tval == TV_STAFF) return (TRUE);
+ if (o_ptr->tval == TV_STAFF) return TRUE;
/* Recharge wands */
- if (o_ptr->tval == TV_WAND) return (TRUE);
+ if (o_ptr->tval == TV_WAND) return TRUE;
/* Hack -- Recharge rods */
- if (o_ptr->tval == TV_ROD) return (TRUE);
+ if (o_ptr->tval == TV_ROD) return TRUE;
- return (FALSE);
+ return FALSE;
}
/*!
}
}
- if ((o_ptr->tval < TV_LIFE_BOOK) || (o_ptr->tval > (TV_LIFE_BOOK + MAX_REALM - 1))) return (FALSE);
- if ((o_ptr->tval == TV_MUSIC_BOOK) && (p_ptr->pclass == CLASS_BARD)) return (TRUE);
+ if ((o_ptr->tval < TV_LIFE_BOOK) || (o_ptr->tval > (TV_LIFE_BOOK + MAX_REALM - 1))) return FALSE;
+ if ((o_ptr->tval == TV_MUSIC_BOOK) && (p_ptr->pclass == CLASS_BARD)) return TRUE;
else if (!is_magic(tval2realm(o_ptr->tval))) return FALSE;
- if ((REALM1_BOOK == o_ptr->tval) || (REALM2_BOOK == o_ptr->tval)) return (TRUE);
- if (choices & (0x0001 << (tval2realm(o_ptr->tval) - 1))) return (TRUE);
- return (FALSE);
+ if ((REALM1_BOOK == o_ptr->tval) || (REALM2_BOOK == o_ptr->tval)) return TRUE;
+ if (choices & (0x0001 << (tval2realm(o_ptr->tval) - 1))) return TRUE;
+ return FALSE;
}
/*!
bool item_tester_refill_lantern(object_type *o_ptr)
{
/* Flasks of oil are okay */
- if (o_ptr->tval == TV_FLASK) return (TRUE);
+ if (o_ptr->tval == TV_FLASK) return TRUE;
/* Laterns are okay */
if ((o_ptr->tval == TV_LITE) &&
- (o_ptr->sval == SV_LITE_LANTERN)) return (TRUE);
+ (o_ptr->sval == SV_LITE_LANTERN)) return TRUE;
/* Assume not okay */
- return (FALSE);
+ return FALSE;
}
{
/* Torches are okay */
if ((o_ptr->tval == TV_LITE) &&
- (o_ptr->sval == SV_LITE_TORCH)) return (TRUE);
+ (o_ptr->sval == SV_LITE_TORCH)) return TRUE;
/* Assume not okay */
- return (FALSE);
+ return FALSE;
}
bool item_tester_okay(object_type *o_ptr, OBJECT_TYPE_VALUE tval)
{
/* Hack -- allow listing empty slots */
- // if (item_tester_full) return (TRUE); // TODO:DELETE
+ // if (item_tester_full) return TRUE; // TODO:DELETE
/* Require an item */
- if (!o_ptr->k_idx) return (FALSE);
+ if (!o_ptr->k_idx) return FALSE;
/* Hack -- ignore "gold" */
if (o_ptr->tval == TV_GOLD)
/* See xtra2.c */
extern bool show_gold_on_floor;
- if (!show_gold_on_floor) return (FALSE);
+ if (!show_gold_on_floor) return FALSE;
}
/* Check the tval */
if ((tval <= TV_DEATH_BOOK) && (tval >= TV_LIFE_BOOK))
return check_book_realm(o_ptr->tval, o_ptr->sval);
else
- if (tval != o_ptr->tval) return (FALSE);
+ if (tval != o_ptr->tval) return FALSE;
}
/* Check the hook */
if (item_tester_hook)
{
- if (!(*item_tester_hook)(o_ptr)) return (FALSE);
+ if (!(*item_tester_hook)(o_ptr)) return FALSE;
}
/* Assume okay */
- return (TRUE);
+ return TRUE;
}
if (mode & SCROBJ_FORCE_DETAIL) trivial_info = 0;
/* No relevant informations */
- if (i <= trivial_info) return (FALSE);
+ if (i <= trivial_info) return FALSE;
screen_save();
Term_get_size(&wid, &hgt);
screen_load();
/* Gave knowledge */
- return (TRUE);
+ return TRUE;
}
/* Analyze the item type */
if (k_ptr->tval == TV_CLOAK)
{
- return (TRUE);
+ return TRUE;
}
/* Assume not good */
- return (FALSE);
+ return FALSE;
}
/* Analyze the item type */
if (k_ptr->tval == TV_POLEARM)
{
- return (TRUE);
+ return TRUE;
}
/* Assume not good */
- return (FALSE);
+ return FALSE;
}
/* Analyze the item type */
if ((k_ptr->tval == TV_SWORD) && (k_ptr->sval > 2))
{
- return (TRUE);
+ return TRUE;
}
/* Assume not good */
- return (FALSE);
+ return FALSE;
}
/* Analyze the item type */
if ((k_ptr->tval >= TV_LIFE_BOOK) && (k_ptr->tval <= TV_CRUSADE_BOOK))
{
- return (TRUE);
+ return TRUE;
}
/* Assume not good */
- return (FALSE);
+ return FALSE;
}
/* Analyze the item type */
if ((k_ptr->tval >= TV_LIFE_BOOK) && (k_ptr->tval <= TV_CRUSADE_BOOK) && (k_ptr->tval != TV_ARCANE_BOOK) && (k_ptr->sval > 1))
{
- return (TRUE);
+ return TRUE;
}
/* Assume not good */
- return (FALSE);
+ return FALSE;
}
/* Analyze the item type */
if (k_ptr->tval == TV_HARD_ARMOR)
{
- return (TRUE);
+ return TRUE;
}
/* Assume not good */
- return (FALSE);
+ return FALSE;
}
/* Analyze the item type */
if (k_ptr->tval == TV_HAFTED)
{
- return (TRUE);
+ return TRUE;
}
/* Assume not good */
- return (FALSE);
+ return FALSE;
}
/*
case TV_HELM:
case TV_CROWN:
{
- if (k_ptr->to_a < 0) return (FALSE);
- return (TRUE);
+ if (k_ptr->to_a < 0) return FALSE;
+ return TRUE;
}
/* Weapons -- Good unless damaged */
case TV_POLEARM:
case TV_DIGGING:
{
- if (k_ptr->to_h < 0) return (FALSE);
- if (k_ptr->to_d < 0) return (FALSE);
- return (TRUE);
+ if (k_ptr->to_h < 0) return FALSE;
+ if (k_ptr->to_d < 0) return FALSE;
+ return TRUE;
}
/* Ammo -- Arrows/Bolts are good */
case TV_BOLT:
case TV_ARROW:
{
- return (TRUE);
+ return TRUE;
}
/* Books -- High level books are good (except Arcane books) */
case TV_HISSATSU_BOOK:
case TV_HEX_BOOK:
{
- if (k_ptr->sval >= SV_BOOK_MIN_GOOD) return (TRUE);
- return (FALSE);
+ if (k_ptr->sval >= SV_BOOK_MIN_GOOD) return TRUE;
+ return FALSE;
}
/* Rings -- Rings of Speed are good */
case TV_RING:
{
- if (k_ptr->sval == SV_RING_SPEED) return (TRUE);
- if (k_ptr->sval == SV_RING_LORDLY) return (TRUE);
- return (FALSE);
+ if (k_ptr->sval == SV_RING_SPEED) return TRUE;
+ if (k_ptr->sval == SV_RING_LORDLY) return TRUE;
+ return FALSE;
}
/* Amulets -- Amulets of the Magi and Resistance are good */
case TV_AMULET:
{
- if (k_ptr->sval == SV_AMULET_THE_MAGI) return (TRUE);
- if (k_ptr->sval == SV_AMULET_RESISTANCE) return (TRUE);
- return (FALSE);
+ if (k_ptr->sval == SV_AMULET_THE_MAGI) return TRUE;
+ if (k_ptr->sval == SV_AMULET_RESISTANCE) return TRUE;
+ return FALSE;
}
}
/* Assume not good */
- return (FALSE);
+ return FALSE;
}
case 7: o_ptr = &creature_ptr->inventory_list[INVEN_FEET]; break;
}
- if (!o_ptr->k_idx) return (FALSE);
- if (!object_is_armour(o_ptr)) return (FALSE);
+ if (!o_ptr->k_idx) return FALSE;
+ if (!object_is_armour(o_ptr)) return FALSE;
object_desc(o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
object_flags(o_ptr, flgs);
if (o_ptr->ac + o_ptr->to_a <= 0)
{
msg_format(_("%sは既にボロボロだ!", "Your %s is already crumble!"), o_name);
- return (FALSE);
+ return FALSE;
}
/* Object resists */
if (have_flag(flgs, TR_IGNORE_ACID))
{
msg_format(_("しかし%sには効果がなかった!", "Your %s is unaffected!"), o_name);
- return (TRUE);
+ return TRUE;
}
msg_format(_("%sが酸で腐食した!", "Your %s is corroded!"), o_name);
calc_android_exp(creature_ptr);
/* Item was damaged */
- return (TRUE);
+ return TRUE;
}
creature_ptr->tim_mimic = v;
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
if (disturb_state) disturb(creature_ptr, FALSE, TRUE);
creature_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
/* Fully update the visuals */
creature_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
handle_stuff(creature_ptr);
creature_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
handle_stuff(creature_ptr);
creature_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
handle_stuff(creature_ptr);
creature_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
creature_ptr->redraw |= (PR_STATE);
creature_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
if (disturb_state) disturb(creature_ptr, FALSE, TRUE);
creature_ptr->fast = v;
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
creature_ptr->update |= (PU_BONUS);
creature_ptr->lightspeed = v;
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
creature_ptr->update |= (PU_BONUS);
creature_ptr->slow = v;
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
creature_ptr->update |= (PU_BONUS);
creature_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
creature_ptr->update |= (PU_BONUS);
creature_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
creature_ptr->update |= (PU_BONUS);
creature_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
creature_ptr->update |= (PU_BONUS);
creature_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
creature_ptr->update |= (PU_BONUS);
creature_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
creature_ptr->update |= (PU_BONUS);
creature_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
creature_ptr->update |= (PU_BONUS);
creature_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
handle_stuff(creature_ptr);
creature_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
creature_ptr->update |= (PU_BONUS);
creature_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
creature_ptr->update |= (PU_BONUS);
creature_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
creature_ptr->update |= (PU_BONUS);
creature_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
creature_ptr->update |= (PU_BONUS);
creature_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
creature_ptr->update |= (PU_BONUS);
creature_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
creature_ptr->update |= (PU_BONUS);
creature_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
creature_ptr->update |= (PU_BONUS);
}
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
creature_ptr->redraw |= (PR_STATUS);
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
creature_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
creature_ptr->update |= (PU_BONUS);
creature_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
handle_stuff(creature_ptr);
creature_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
creature_ptr->update |= (PU_BONUS);
creature_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
creature_ptr->update |= (PU_BONUS);
creature_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
creature_ptr->update |= (PU_BONUS);
creature_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
creature_ptr->update |= (PU_BONUS);
creature_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
creature_ptr->update |= (PU_BONUS);
creature_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
creature_ptr->update |= (PU_BONUS);
creature_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
creature_ptr->update |= (PU_BONUS);
creature_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
creature_ptr->update |= (PU_BONUS);
creature_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
creature_ptr->update |= (PU_BONUS);
creature_ptr->oppose_acid = v;
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
creature_ptr->redraw |= (PR_STATUS);
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
creature_ptr->oppose_elec = v;
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
creature_ptr->redraw |= (PR_STATUS);
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
creature_ptr->oppose_fire = v;
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
creature_ptr->redraw |= (PR_STATUS);
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
creature_ptr->oppose_cold = v;
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
creature_ptr->redraw |= (PR_STATUS);
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
creature_ptr->oppose_pois = v;
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
creature_ptr->redraw |= (PR_STATUS);
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
creature_ptr->stun = v;
/* No change */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
creature_ptr->update |= (PU_BONUS);
creature_ptr->cut = v;
/* No change */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
creature_ptr->update |= (PU_BONUS);
creature_ptr->food = v;
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
creature_ptr->update |= (PU_BONUS);
}
/* Nothing to gain */
- return (FALSE);
+ return FALSE;
}
/*!
}
/* Nothing to restore */
- return (FALSE);
+ return FALSE;
}
int vir;
vir = virtue_number(creature_ptr, V_VITALITY);
- if(num <= 0) return (FALSE);
+ if(num <= 0) return FALSE;
if(vir)
{
}
/* Ignore */
- return (FALSE);
+ return FALSE;
}
}
/* Nothing obvious */
- return (FALSE);
+ return FALSE;
}
}
/* Nothing obvious */
- return (FALSE);
+ return FALSE;
}
}
/* Nothing obvious */
- return (FALSE);
+ return FALSE;
}
}
/* No effect */
- return (FALSE);
+ return FALSE;
}
/*
creature_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
creature_ptr->update |= (PU_BONUS);
creature_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
creature_ptr->update |= (PU_BONUS);
creature_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
- if (!notice) return (FALSE);
+ if (!notice) return FALSE;
if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
creature_ptr->update |= (PU_BONUS);
bool get_item_okay(OBJECT_IDX i)
{
/* Illegal items */
- if ((i < 0) || (i >= INVEN_TOTAL)) return (FALSE);
+ if ((i < 0) || (i >= INVEN_TOTAL)) return FALSE;
if (select_ring_slot) return is_ring_slot(i);
/* Verify the item */
- if (!item_tester_okay(&p_ptr->inventory_list[i], item_tester_tval)) return (FALSE);
+ if (!item_tester_okay(&p_ptr->inventory_list[i], item_tester_tval)) return FALSE;
/* Assume okay */
- return (TRUE);
+ return TRUE;
}
/*!
*cp = i;
/* Success */
- return (TRUE);
+ return TRUE;
}
/* Find another '@' */
*cp = i;
/* Success */
- return (TRUE);
+ return TRUE;
}
/* Find another '@' */
}
/* No such tag */
- return (FALSE);
+ return FALSE;
}
*cp = i;
/* Success */
- return (TRUE);
+ return TRUE;
}
/* Find another '@' */
*cp = i;
/* Success */
- return (TRUE);
+ return TRUE;
}
/* Find another '@' */
}
/* No such tag */
- return (FALSE);
+ return FALSE;
}
/*!
}
/* No inscription */
- if (!o_ptr->inscription) return (TRUE);
+ if (!o_ptr->inscription) return TRUE;
/* Find a '!' */
s = my_strchr(quark_str(o_ptr->inscription), '!');
if ((s[1] == command_cmd) || (s[1] == '*'))
{
/* Verify the choice */
- if (!verify(_("本当に", "Really try"), item)) return (FALSE);
+ if (!verify(_("本当に", "Really try"), item)) return FALSE;
}
/* Find another '!' */
}
/* Allow it */
- return (TRUE);
+ return TRUE;
}
tval = 0;
item_tester_hook = NULL;
command_cmd = 0; /* Hack -- command_cmd is no longer effective */
- return (TRUE);
+ return TRUE;
}
/* Floor item? */
tval = 0;
item_tester_hook = NULL;
command_cmd = 0; /* Hack -- command_cmd is no longer effective */
- return (TRUE);
+ return TRUE;
}
/* Floor item? */
}
else
{
- return (FALSE);
+ return FALSE;
}
/* Pick up the object */
py_pickup_aux(p_ptr, this_o_idx);
- return (TRUE);
+ return TRUE;
}
/*!
x += ddx[dir];
/* Illegal grids are not known walls */
- if (!in_bounds2(p_ptr->current_floor_ptr, y, x)) return (FALSE);
+ if (!in_bounds2(p_ptr->current_floor_ptr, y, x)) return FALSE;
/* Access grid */
g_ptr = &p_ptr->current_floor_ptr->grid_array[y][x];
x += ddx[dir];
/* Illegal grids are unknown */
- if (!in_bounds2(p_ptr->current_floor_ptr, y, x)) return (TRUE);
+ if (!in_bounds2(p_ptr->current_floor_ptr, y, x)) return TRUE;
/* Memorized grids are always known */
- if (p_ptr->current_floor_ptr->grid_array[y][x].info & (CAVE_MARK)) return (FALSE);
+ if (p_ptr->current_floor_ptr->grid_array[y][x].info & (CAVE_MARK)) return FALSE;
/* Viewable door/wall grids are known */
- if (player_can_see_bold(p_ptr, y, x)) return (FALSE);
+ if (player_can_see_bold(p_ptr, y, x)) return FALSE;
/* Default */
- return (TRUE);
+ return TRUE;
}
monster_type *m_ptr = &p_ptr->current_floor_ptr->m_list[g_ptr->m_idx];
/* Visible monster */
- if (m_ptr->ml) return (TRUE);
+ if (m_ptr->ml) return TRUE;
}
/* Visible objects abort running */
next_o_idx = o_ptr->next_o_idx;
/* Visible object */
- if (o_ptr->marked & OM_FOUND) return (TRUE);
+ if (o_ptr->marked & OM_FOUND) return TRUE;
}
/* Assume unknown */
}
/* Interesting feature */
- if (notice) return (TRUE);
+ if (notice) return TRUE;
/* The grid is "visible" */
inv = FALSE;
/* Three new directions. Stop running. */
else if (option2)
{
- return (TRUE);
+ return TRUE;
}
/* Two non-adjacent new directions. Stop running. */
else if (option != cycle[chome[prev_dir] + i - 1])
{
- return (TRUE);
+ return TRUE;
}
/* Two new (adjacent) directions (case 1) */
/* Looking to break right */
if (find_breakright)
{
- return (TRUE);
+ return TRUE;
}
}
/* Looking to break left */
if (find_breakleft)
{
- return (TRUE);
+ return TRUE;
}
}
}
/* Looking to break left */
if (find_breakleft)
{
- return (TRUE);
+ return TRUE;
}
}
/* Looking to break right */
if (find_breakright)
{
- return (TRUE);
+ return TRUE;
}
}
}
/* No options */
if (!option)
{
- return (TRUE);
+ return TRUE;
}
/* One option */
/* STOP: we are next to an intersection or a room */
else
{
- return (TRUE);
+ return TRUE;
}
}
/* About to hit a known wall, stop */
if (see_wall(find_current, p_ptr->y, p_ptr->x))
{
- return (TRUE);
+ return TRUE;
}
/* Failure */
- return (FALSE);
+ return FALSE;
}
{
wsprintf(str, "Can't open file '%s'", (LPSTR)lpFileName);
MessageBox(NULL, str, "Error", MB_ICONSTOP | MB_OK);
- return (FALSE);
+ return FALSE;
}
pInfo->hDIB = GlobalAlloc(GHND, (DWORD)(sizeof(BITMAPINFOHEADER) +
256 * sizeof(RGBQUAD)));
if (!pInfo->hDIB)
- return (FALSE);
+ return FALSE;
lpbi = (LPBITMAPINFOHEADER)GlobalLock(pInfo->hDIB);
{
monster_race *r_ptr = &r_info[r_idx];
- if (!vault_monster_okay(r_idx)) return (FALSE);
+ if (!vault_monster_okay(r_idx)) return FALSE;
/* No wall passing monster */
- if (r_ptr->flags2 & (RF2_PASS_WALL | RF2_KILL_WALL)) return (FALSE);
+ if (r_ptr->flags2 & (RF2_PASS_WALL | RF2_KILL_WALL)) return FALSE;
- return (TRUE);
+ return TRUE;
}
/* Failure */
- if (!ok) return (FALSE);
+ if (!ok) return FALSE;
counts_write(0, current_world_ptr->play_time);
current_world_ptr->character_saved = TRUE;
/* Success */
- return (TRUE);
+ return TRUE;
}
/* Allow empty savefile name */
- if (!savefile[0]) return (TRUE);
+ if (!savefile[0]) return TRUE;
#if !defined(MACINTOSH) && !defined(WINDOWS)
msg_print(NULL);
/* Allow this */
- return (TRUE);
+ return TRUE;
}
#endif
msg_print(_("セーブファイルは現在使用中です。", "Savefile is currently in use."));
msg_print(NULL);
- return (FALSE);
+ return FALSE;
}
/* Create a lock file */
{
/* A character was loaded */
current_world_ptr->character_loaded = TRUE;
- return (TRUE);
+ return TRUE;
}
/* Player is no longer "dead" */
/* Count lives */
current_world_ptr->sf_lives++;
- return (TRUE);
+ return TRUE;
}
/* A character was loaded */
}
/* Success */
- return (TRUE);
+ return TRUE;
}
msg_print(NULL);
- return (FALSE);
+ return FALSE;
}
/*!
z2 = a_info[w2].tval;
/* Compare total kills */
- if (z1 < z2) return (TRUE);
- if (z1 > z2) return (FALSE);
+ if (z1 < z2) return TRUE;
+ if (z1 > z2) return FALSE;
}
z2 = a_info[w2].sval;
/* Compare levels */
- if (z1 < z2) return (TRUE);
- if (z1 > z2) return (FALSE);
+ if (z1 < z2) return TRUE;
+ if (z1 > z2) return FALSE;
}
z2 = a_info[w2].level;
/* Compare experience */
- if (z1 < z2) return (TRUE);
- if (z1 > z2) return (FALSE);
+ if (z1 < z2) return TRUE;
+ if (z1 > z2) return FALSE;
}
z2 = r_info[w2].r_pkills;
/* Compare player kills */
- if (z1 < z2) return (TRUE);
- if (z1 > z2) return (FALSE);
+ if (z1 < z2) return TRUE;
+ if (z1 > z2) return FALSE;
}
z2 = r_info[w2].r_tkills;
/* Compare total kills */
- if (z1 < z2) return (TRUE);
- if (z1 > z2) return (FALSE);
+ if (z1 < z2) return TRUE;
+ if (z1 > z2) return FALSE;
}
z2 = r_info[w2].level;
/* Compare levels */
- if (z1 < z2) return (TRUE);
- if (z1 > z2) return (FALSE);
+ if (z1 < z2) return TRUE;
+ if (z1 > z2) return FALSE;
}
z2 = r_info[w2].mexp;
/* Compare experience */
- if (z1 < z2) return (TRUE);
- if (z1 > z2) return (FALSE);
+ if (z1 < z2) return TRUE;
+ if (z1 > z2) return FALSE;
}
OBJECT_IDX item;
object_type *o_ptr;
o_ptr = choose_object(user_ptr, &item, q, s, (USE_INVEN | USE_FLOOR), 0);
- if (!o_ptr) return (FALSE);
+ if (!o_ptr) return FALSE;
if (o_ptr->tval == TV_STAFF && o_ptr->sval == SV_STAFF_NOTHING)
{
}
/* Failure */
- if (!res) return (FALSE);
+ if (!res) return FALSE;
caster_ptr->update |= (PU_BONUS | PU_COMBINE | PU_REORDER);
caster_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER);
calc_android_exp(caster_ptr);
/* Success */
- return (TRUE);
+ return TRUE;
}
OBJECT_IDX item;
object_type *o_ptr;
o_ptr = choose_object(caster_ptr, &item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT), 0);
- if (!o_ptr) return (FALSE);
+ if (!o_ptr) return FALSE;
GAME_TEXT o_name[MAX_NLEN];
object_desc(o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
bool item_tester_offer(object_type *o_ptr)
{
/* Flasks of oil are okay */
- if (o_ptr->tval != TV_CORPSE) return (FALSE);
- if (o_ptr->sval != SV_CORPSE) return (FALSE);
+ if (o_ptr->tval != TV_CORPSE) return FALSE;
+ if (o_ptr->sval != SV_CORPSE) return FALSE;
- if (my_strchr("pht", r_info[o_ptr->pval].d_char)) return (TRUE);
+ if (my_strchr("pht", r_info[o_ptr->pval].d_char)) return TRUE;
/* Assume not okay */
- return (FALSE);
+ return FALSE;
}
/*!
sprintf(ppp, "Dungeon Turn (0-%ld): ", (long)current_world_ptr->dungeon_turn_limit);
sprintf(tmp_val, "%ld", (long)current_world_ptr->dungeon_turn);
- if (!get_string(ppp, tmp_val, 10)) return (FALSE);
+ if (!get_string(ppp, tmp_val, 10)) return FALSE;
tmp_int = atoi(tmp_val);
/* Verify */
if (tmp_int >= current_world_ptr->dungeon_turn_limit) tmp_int = current_world_ptr->dungeon_turn_limit - 1;
else if (tmp_int < 0) tmp_int = 0;
current_world_ptr->dungeon_turn = current_world_ptr->game_turn = tmp_int;
- return (TRUE);
+ return TRUE;
}
DEPTH caster_lev = (who > 0) ? r_info[m_caster_ptr->r_idx].level : (caster_ptr->lev * 2);
/* Nobody here */
- if (!g_ptr->m_idx) return (FALSE);
+ if (!g_ptr->m_idx) return FALSE;
/* Never affect projector */
- if (who && (g_ptr->m_idx == who)) return (FALSE);
- if ((g_ptr->m_idx == caster_ptr->riding) && !who && !(typ == GF_OLD_HEAL) && !(typ == GF_OLD_SPEED) && !(typ == GF_STAR_HEAL)) return (FALSE);
+ if (who && (g_ptr->m_idx == who)) return FALSE;
+ if ((g_ptr->m_idx == caster_ptr->riding) && !who && !(typ == GF_OLD_HEAL) && !(typ == GF_OLD_SPEED) && !(typ == GF_STAR_HEAL)) return FALSE;
if (sukekaku && ((m_ptr->r_idx == MON_SUKE) || (m_ptr->r_idx == MON_KAKU))) return FALSE;
/* Don't affect already death monsters */
/* Prevents problems with chain reactions of exploding monsters */
- if (m_ptr->hp < 0) return (FALSE);
+ if (m_ptr->hp < 0) return FALSE;
/* Reduce damage by distance */
dam = (dam + r) / (r + 1);
delete_monster_idx(g_ptr->m_idx);
- return (TRUE);
+ return TRUE;
}
else
{
}
/* Absolutely no effect */
- if (skipped) return (FALSE);
+ if (skipped) return FALSE;
/* "Unique" monsters cannot be polymorphed */
if (r_ptr->flags1 & (RF1_UNIQUE)) do_poly = FALSE;
/* Player is not here */
- if (!player_bold(target_ptr, y, x)) return (FALSE);
+ if (!player_bold(target_ptr, y, x)) return FALSE;
if ((target_ptr->special_defense & NINJA_KAWARIMI) && dam && (randint0(55) < (target_ptr->lev * 3 / 5 + 20)) && who && (who != target_ptr->riding))
{
}
/* Player cannot hurt himself */
- if (!who) return (FALSE);
- if (who == target_ptr->riding) return (FALSE);
+ if (!who) return FALSE;
+ if (who == target_ptr->riding) return FALSE;
if ((target_ptr->reflect || ((target_ptr->special_defense & KATA_FUUJIN) && !target_ptr->blind)) && (flg & PROJECT_REFLECTABLE) && !one_in_(10))
{
ax = ABS(dx);
/* Handle adjacent (or identical) grids */
- if ((ax < 2) && (ay < 2)) return (TRUE);
+ if ((ax < 2) && (ay < 2)) return TRUE;
/* Paranoia -- require "safe" origin */
- /* if (!in_bounds(floor_ptr, y1, x1)) return (FALSE); */
+ /* if (!in_bounds(floor_ptr, y1, x1)) return FALSE; */
/* Directly South/North */
if (!dx)
{
for (ty = y1 + 1; ty < y2; ty++)
{
- if (cave_stop_disintegration(floor_ptr, ty, x1)) return (FALSE);
+ if (cave_stop_disintegration(floor_ptr, ty, x1)) return FALSE;
}
}
{
for (ty = y1 - 1; ty > y2; ty--)
{
- if (cave_stop_disintegration(floor_ptr, ty, x1)) return (FALSE);
+ if (cave_stop_disintegration(floor_ptr, ty, x1)) return FALSE;
}
}
/* Assume los */
- return (TRUE);
+ return TRUE;
}
/* Directly East/West */
{
for (tx = x1 + 1; tx < x2; tx++)
{
- if (cave_stop_disintegration(floor_ptr, y1, tx)) return (FALSE);
+ if (cave_stop_disintegration(floor_ptr, y1, tx)) return FALSE;
}
}
{
for (tx = x1 - 1; tx > x2; tx--)
{
- if (cave_stop_disintegration(floor_ptr, y1, tx)) return (FALSE);
+ if (cave_stop_disintegration(floor_ptr, y1, tx)) return FALSE;
}
}
/* Assume los */
- return (TRUE);
+ return TRUE;
}
/* Extract some signs */
{
if (ay == 2)
{
- if (!cave_stop_disintegration(floor_ptr, y1 + sy, x1)) return (TRUE);
+ if (!cave_stop_disintegration(floor_ptr, y1 + sy, x1)) return TRUE;
}
}
{
if (ax == 2)
{
- if (!cave_stop_disintegration(floor_ptr, y1, x1 + sx)) return (TRUE);
+ if (!cave_stop_disintegration(floor_ptr, y1, x1 + sx)) return TRUE;
}
}
/* the LOS exactly meets the corner of a tile. */
while (x2 - tx)
{
- if (cave_stop_disintegration(floor_ptr, ty, tx)) return (FALSE);
+ if (cave_stop_disintegration(floor_ptr, ty, tx)) return FALSE;
qy += m;
else if (qy > f2)
{
ty += sy;
- if (cave_stop_disintegration(floor_ptr, ty, tx)) return (FALSE);
+ if (cave_stop_disintegration(floor_ptr, ty, tx)) return FALSE;
qy -= f1;
tx += sx;
}
/* the LOS exactly meets the corner of a tile. */
while (y2 - ty)
{
- if (cave_stop_disintegration(floor_ptr, ty, tx)) return (FALSE);
+ if (cave_stop_disintegration(floor_ptr, ty, tx)) return FALSE;
qx += m;
else if (qx > f2)
{
tx += sx;
- if (cave_stop_disintegration(floor_ptr, ty, tx)) return (FALSE);
+ if (cave_stop_disintegration(floor_ptr, ty, tx)) return FALSE;
qx -= f1;
ty += sy;
}
}
/* Speed -- ignore "non-explosions" */
- if (!grids) return (FALSE);
+ if (!grids) return FALSE;
/* Display the "blast area" if requested */
if (is_special_floor)
{
msg_print(_("何も起きないようだ……", "It seems nothing happen here..."));
- return (FALSE);
+ return FALSE;
}
/* Mega-Hack -- Get a monster symbol */
object_type *o_ptr;
OBJECT_IDX item;
o_ptr = choose_object(caster_ptr, &item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT), 0);
- if (!o_ptr) return (FALSE);
+ if (!o_ptr) return FALSE;
if (object_is_known(o_ptr))
{
OBJECT_IDX item;
object_type *o_ptr;
o_ptr = choose_object(caster_ptr, &item, q, s, (USE_INVEN | USE_FLOOR), 0);
- if (!o_ptr) return (FALSE);
+ if (!o_ptr) return FALSE;
/* See how many items */
int amt = 1;
object_type *o_ptr;
OBJECT_IDX item;
o_ptr = choose_object(caster_ptr, &item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT), 0);
- if (!o_ptr) return (FALSE);
+ if (!o_ptr) return FALSE;
GAME_TEXT o_name[MAX_NLEN];
object_desc(o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
OBJECT_IDX item;
object_type *o_ptr;
o_ptr = choose_object(caster_ptr, &item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT), 0);
- if (!o_ptr) return (FALSE);
+ if (!o_ptr) return FALSE;
bool old_known = identify_item(caster_ptr, o_ptr);
concptr s = _("使えるものがありません。", "You have nothing you can use.");
o_ptr = choose_object(owner_ptr, &item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT), 0);
- if (!o_ptr) return (FALSE);
+ if (!o_ptr) return FALSE;
msg_print(_("まばゆい閃光が走った!", "There is a bright flash of light!"));
POSITION iy = o_ptr->iy;
OBJECT_IDX item;
object_type *o_ptr;
o_ptr = choose_object(caster_ptr, &item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT), 0);
- if (!o_ptr) return (FALSE);
+ if (!o_ptr) return FALSE;
bool old_known = identify_item(caster_ptr, o_ptr);
if (o_ptr->discount != j_ptr->discount) return (0);
/* They match, so they must be similar */
- return (TRUE);
+ return TRUE;
}
{
BIT_FLAGS flgs[TR_FLAG_SIZE];
object_flags(o_ptr, flgs);
- if (have_flag(flgs, TR_BLESSED)) return (TRUE);
- else return (FALSE);
+ if (have_flag(flgs, TR_BLESSED)) return TRUE;
+ else return FALSE;
}
static bool store_will_buy(object_type *o_ptr)
{
/* Hack -- The Home is simple */
- if ((cur_store_num == STORE_HOME) || (cur_store_num == STORE_MUSEUM)) return (TRUE);
+ if ((cur_store_num == STORE_HOME) || (cur_store_num == STORE_MUSEUM)) return TRUE;
/* Switch on the store */
switch (cur_store_num)
case TV_CARD:
break;
default:
- return (FALSE);
+ return FALSE;
}
break;
}
case TV_DRAG_ARMOR:
break;
default:
- return (FALSE);
+ return FALSE;
}
break;
}
break;
case TV_HAFTED:
{
- if(o_ptr->sval == SV_WIZSTAFF) return (FALSE);
+ if(o_ptr->sval == SV_WIZSTAFF) return FALSE;
}
break;
default:
- return (FALSE);
+ return FALSE;
}
break;
}
if (is_blessed(o_ptr)) break;
}
default:
- return (FALSE);
+ return FALSE;
}
break;
}
case TV_POTION:
break;
default:
- return (FALSE);
+ return FALSE;
}
break;
}
case TV_HAFTED:
{
if(o_ptr->sval == SV_WIZSTAFF) break;
- else return (FALSE);
+ else return FALSE;
}
default:
- return (FALSE);
+ return FALSE;
}
break;
}
case TV_HEX_BOOK:
break;
default:
- return (FALSE);
+ return FALSE;
}
break;
}
}
/* Ignore "worthless" items */
- if (object_value(o_ptr) <= 0) return (FALSE);
+ if (object_value(o_ptr) <= 0) return FALSE;
/* Assume okay */
- return (TRUE);
+ return TRUE;
}
int i, j;
/* Ego items are never crap */
- if (object_is_ego(o_ptr)) return (FALSE);
+ if (object_is_ego(o_ptr)) return FALSE;
/* Good items are never crap */
- if (o_ptr->to_a > 0) return (FALSE);
- if (o_ptr->to_h > 0) return (FALSE);
- if (o_ptr->to_d > 0) return (FALSE);
+ if (o_ptr->to_a > 0) return FALSE;
+ if (o_ptr->to_h > 0) return FALSE;
+ if (o_ptr->to_d > 0) return FALSE;
/* Check all stores */
for (i = 0; i < MAX_STORES; i++)
object_type *j_ptr = &town_info[p_ptr->town_num].store[i].stock[j];
/* Duplicate item "type", assume crappy */
- if (o_ptr->k_idx == j_ptr->k_idx) return (TRUE);
+ if (o_ptr->k_idx == j_ptr->k_idx) return TRUE;
}
}
/* Assume okay */
- return (FALSE);
+ return FALSE;
}
PRICE bad = st_ptr->bad_buy;
/* Cheap items are "boring" */
- if (minprice < 10L) return (TRUE);
+ if (minprice < 10L) return TRUE;
/* Perfect haggling */
- if (good == MAX_SHORT) return (TRUE);
+ if (good == MAX_SHORT) return TRUE;
/* Reward good haggles, punish bad haggles, notice price */
- if (good > ((3 * bad) + (5 + (minprice/50)))) return (TRUE);
+ if (good > ((3 * bad) + (5 + (minprice/50)))) return TRUE;
/* Return the flag */
- return (FALSE);
+ return FALSE;
}
if ((*com_val >= i) && (*com_val <= j))
{
/* Success */
- return (TRUE);
+ return TRUE;
}
}
msg_print(NULL);
/* Clear the prompt */
prt("", 0, 0);
- if (command == ESCAPE) return (FALSE);
+ if (command == ESCAPE) return FALSE;
repeat_push(*com_val);
/* Success */
- return (TRUE);
+ return TRUE;
}
st_ptr->store_open = current_world_ptr->game_turn + TURNS_PER_TICK*TOWN_DAWN/8 + randint1(TURNS_PER_TICK*TOWN_DAWN/8);
/* Closed */
- return (TRUE);
+ return TRUE;
}
/* Not closed */
- return (FALSE);
+ return FALSE;
}
static int haggle_insults(void)
{
/* Increase insults */
- if (increase_insults()) return (TRUE);
+ if (increase_insults()) return TRUE;
/* Display and flush insult */
say_comment_5();
/* Still okay */
- return (FALSE);
+ return FALSE;
}
}
/* Success */
- return (TRUE);
+ return TRUE;
}
while (TRUE)
{
/* Get a haggle (or cancel) */
- if (!get_haggle(pmt, poffer, price, final)) return (TRUE);
+ if (!get_haggle(pmt, poffer, price, final)) return TRUE;
/* Acceptable offer */
if (((*poffer) * factor) >= (last_offer * factor)) break;
/* Insult, and check for kicked out */
- if (haggle_insults()) return (TRUE);
+ if (haggle_insults()) return TRUE;
/* Reject offer (correctly) */
(*poffer) = last_offer;
}
/* Success */
- return (FALSE);
+ return FALSE;
}
}
}
- if (cancel) return (TRUE);
+ if (cancel) return TRUE;
updatebargain(*price, final_ask, o_ptr->number);
/* Do not cancel */
- return (FALSE);
+ return FALSE;
}
}
}
- if (cancel) return (TRUE);
+ if (cancel) return TRUE;
updatebargain(*price, final_ask, o_ptr->number);
/* Do not cancel */
- return (FALSE);
+ return FALSE;
}
if (k < 10) return (k < 5);
if (target_ptr->pseikaku == SEIKAKU_NAMAKE)
- if (one_in_(20)) return (TRUE);
+ if (one_in_(20)) return TRUE;
/* Paranoia -- No power */
- if (power <= 0) return (FALSE);
+ if (power <= 0) return FALSE;
/* Total armor */
ac = target_ptr->ac + target_ptr->to_a;
/* Power competes against Armor */
- if (randint1(power) > ((ac * 3) / 4)) return (TRUE);
+ if (randint1(power) > ((ac * 3) / 4)) return TRUE;
/* Assume miss */
- return (FALSE);
+ return FALSE;
}
prt("", 0, 0);
/* Handle "cancel" */
- if (*command == ESCAPE) return (FALSE);
- if (z_escape && ((*command == 'z') || (*command == 'Z'))) return (FALSE);
+ if (*command == ESCAPE) return FALSE;
+ if (z_escape && ((*command == 'z') || (*command == 'Z'))) return FALSE;
/* Success */
- return (TRUE);
+ return TRUE;
}
case 'I':
case 'O':
case 'U':
- return (TRUE);
+ return TRUE;
}
- return (FALSE);
+ return FALSE;
}
buf = my_strstr(buf, target);
/* No target found */
- if (!buf) return (FALSE);
+ if (!buf) return FALSE;
/* Be sure we have an insertion string */
if (!insert) insert = "";
for (i = 0; i < i_len; ++i) buf[i] = insert[i];
/* Successful operation */
- return (TRUE);
+ return TRUE;
}
bool repeat_pull(COMMAND_CODE *what)
{
/* All out of keys */
- if (repeat__idx == repeat__cnt) return (FALSE);
+ if (repeat__idx == repeat__cnt) return FALSE;
/* Grab the next key, advance */
*what = repeat__key[repeat__idx++];
/* Success */
- return (TRUE);
+ return TRUE;
}
void repeat_check(void)
handle_stuff(p_ptr);
/* Success */
- return (TRUE);
+ return TRUE;
}
/* No change */
- return (FALSE);
+ return FALSE;
}
/*!
/* Acquire the "kind" index */
i = lookup_kind(a_ptr->tval, a_ptr->sval);
- if (!i) return (FALSE);
+ if (!i) return FALSE;
object_prep(o_ptr, i);
o_ptr->weight = a_ptr->weight;
/* Success */
- return (TRUE);
+ return TRUE;
}
POSITION x = 0, y = 0;
if (!tgt_pt(caster_ptr, &x, &y)) return FALSE;
teleport_player_to(caster_ptr, y, x, TELEPORT_NONMAGICAL);
- return (TRUE);
+ return TRUE;
}
/*!
int slen = strlen(s);
/* Check for incompatible lengths */
- if (tlen > slen) return (FALSE);
+ if (tlen > slen) return FALSE;
/* Compare "t" to the end of "s" */
return (!strcmp(s + slen - tlen, t));
while (*t)
{
/* Compare content and length */
- if (*t++ != *s++) return (FALSE);
+ if (*t++ != *s++) return FALSE;
}
/* Matched, we have a prefix */
- return (TRUE);
+ return TRUE;
}