if (known) p_ptr->dtrap = TRUE;
- if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 0) detect = FALSE;
+ if (music_singing(MUSIC_DETECT) && SINGING_COUNT(p_ptr) > 0) detect = FALSE;
/* Describe */
if (detect)
{
bool detect = detect_feat_flag(range, FF_DOOR, TRUE);
- if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 0) detect = FALSE;
+ if (music_singing(MUSIC_DETECT) && SINGING_COUNT(p_ptr) > 0) detect = FALSE;
/* Describe */
if (detect)
{
bool detect = detect_feat_flag(range, FF_STAIRS, TRUE);
- if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 0) detect = FALSE;
+ if (music_singing(MUSIC_DETECT) && SINGING_COUNT(p_ptr) > 0) detect = FALSE;
/* Describe */
if (detect)
{
bool detect = detect_feat_flag(range, FF_HAS_GOLD, TRUE);
- if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 6) detect = FALSE;
+ if (music_singing(MUSIC_DETECT) && SINGING_COUNT(p_ptr) > 6) detect = FALSE;
/* Describe */
if (detect)
}
}
- if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 6) detect = FALSE;
+ if (music_singing(MUSIC_DETECT) && SINGING_COUNT(p_ptr) > 6) detect = FALSE;
/* Describe */
if (detect)
}
}
- if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 6) detect = FALSE;
+ if (music_singing(MUSIC_DETECT) && SINGING_COUNT(p_ptr) > 6) detect = FALSE;
/* Describe */
if (detect)
}
}
- if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 3) flag = FALSE;
+ if (music_singing(MUSIC_DETECT) && SINGING_COUNT(p_ptr) > 3) flag = FALSE;
/* Describe */
if (flag)
}
}
- if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 3) flag = FALSE;
+ if (music_singing(MUSIC_DETECT) && SINGING_COUNT(p_ptr) > 3) flag = FALSE;
/* Describe */
if (flag)
}
}
- if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 3) flag = FALSE;
+ if (music_singing(MUSIC_DETECT) && SINGING_COUNT(p_ptr) > 3) flag = FALSE;
/* Describe */
if (flag)
*/
bool probing(void)
{
- int i, speed;
- int cu, cv;
- bool probe = FALSE;
+ int i, speed;
+ bool_hack cu, cv;
+ bool probe = FALSE;
char buf[256];
cptr align;
speed = m_ptr->mspeed - 110;
if (MON_FAST(m_ptr)) speed += 10;
if (MON_SLOW(m_ptr)) speed -= 10;
+ if (ironman_nightmare) speed += 5;
/* Get the monster's alignment */
#ifdef JP
*/
bool lite_area(HIT_POINT dam, int rad)
{
- int flg = PROJECT_GRID | PROJECT_KILL;
+ BIT_FLAGS flg = PROJECT_GRID | PROJECT_KILL;
if (d_info[dungeon_type].flags1 & DF1_DARKNESS)
{
*/
bool unlite_area(HIT_POINT dam, int rad)
{
- int flg = PROJECT_GRID | PROJECT_KILL;
+ BIT_FLAGS flg = PROJECT_GRID | PROJECT_KILL;
/* Hack -- Message */
if (!p_ptr->blind)
{
int tx, ty;
- int flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
+ BIT_FLAGS flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
- if (typ == GF_CONTROL_LIVING) flg|= PROJECT_HIDE;
+ if (typ == GF_CHARM_LIVING) flg|= PROJECT_HIDE;
/* Use the given direction */
tx = p_ptr->x + 99 * ddx[dir];
ty = p_ptr->y + 99 * ddy[dir];
return (project(0, rad, ty, tx, dam, typ, flg, -1));
}
+/*!
+* @brief ブレス系スペルの発動 / Cast a breath spell
+* @param typ 効果属性
+* @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+* @param dam 威力
+* @param rad 半径
+* @return 作用が実際にあった場合TRUEを返す
+* @details
+* <pre>
+* Stop if we hit a monster, act as a "ball"
+* Allow "target" mode to pass over monsters
+* Affect grids, objects, and monsters
+* </pre>
+*/
+bool fire_breath(int typ, int dir, HIT_POINT dam, int rad)
+{
+ fire_ball(typ, dir, dam, -rad);
+}
/*!
{
int tx, ty;
- int flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
+ BIT_FLAGS flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
/* Use the given direction */
tx = p_ptr->x + 99 * ddx[dir];
{
int tx, ty;
- int flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_HIDE;
+ BIT_FLAGS flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_HIDE;
/* Use the given direction */
tx = p_ptr->x + 99 * ddx[dir];
*/
bool fire_meteor(MONSTER_IDX who, EFFECT_ID typ, POSITION y, POSITION x, HIT_POINT dam, POSITION rad)
{
- int flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
+ BIT_FLAGS flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
/* Analyze the "target" and the caster. */
return (project(who, rad, y, x, dam, typ, flg, -1));
int ty, tx, y, x;
int i;
- int flg = PROJECT_FAST | PROJECT_THRU | PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE | PROJECT_GRID;
+ BIT_FLAGS flg = PROJECT_FAST | PROJECT_THRU | PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE | PROJECT_GRID;
/* Assume okay */
bool result = TRUE;
* @param flg フラグ
* @return 作用が実際にあった場合TRUEを返す
*/
-bool project_hook(int typ, int dir, HIT_POINT dam, int flg)
+bool project_hook(int typ, int dir, HIT_POINT dam, BIT_FLAGS flg)
{
int tx, ty;
*/
bool fire_bolt(int typ, int dir, HIT_POINT dam)
{
- int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_GRID;
+ BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_GRID;
if (typ != GF_ARROW) flg |= PROJECT_REFLECTABLE;
return (project_hook(typ, dir, dam, flg));
}
*/
bool fire_beam(int typ, int dir, HIT_POINT dam)
{
- int flg = PROJECT_BEAM | PROJECT_KILL | PROJECT_GRID | PROJECT_ITEM;
+ BIT_FLAGS flg = PROJECT_BEAM | PROJECT_KILL | PROJECT_GRID | PROJECT_ITEM;
return (project_hook(typ, dir, dam, flg));
}
*/
bool lite_line(int dir, HIT_POINT dam)
{
- int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_KILL;
+ BIT_FLAGS flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_KILL;
return (project_hook(GF_LITE_WEAK, dir, dam, flg));
}
/*!
- * @brief 吸血ボルト処理
+ * @brief 衰弱ボルト処理
* @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
* @param dam 威力
* @return 作用が実際にあった場合TRUEを返す
*/
-bool drain_life(int dir, HIT_POINT dam)
+bool hypodynamic_bolt(int dir, HIT_POINT dam)
{
- int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
- return (project_hook(GF_OLD_DRAIN, dir, dam, flg));
+ BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
+ return (project_hook(GF_HYPODYNAMIA, dir, dam, flg));
}
/*!
*/
bool wall_to_mud(int dir, HIT_POINT dam)
{
- int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
+ BIT_FLAGS flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
return (project_hook(GF_KILL_WALL, dir, dam, flg));
}
*/
bool wizard_lock(int dir)
{
- int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
+ BIT_FLAGS flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
return (project_hook(GF_JAM_DOOR, dir, 20 + randint1(30), flg));
}
*/
bool destroy_door(int dir)
{
- int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM;
+ BIT_FLAGS flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM;
return (project_hook(GF_KILL_DOOR, dir, 0, flg));
}
*/
bool disarm_trap(int dir)
{
- int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM;
+ BIT_FLAGS flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM;
return (project_hook(GF_KILL_TRAP, dir, 0, flg));
}
*/
bool heal_monster(int dir, HIT_POINT dam)
{
- int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
+ BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
return (project_hook(GF_OLD_HEAL, dir, dam, flg));
}
*/
bool speed_monster(int dir, int power)
{
- int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
+ BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
return (project_hook(GF_OLD_SPEED, dir, power, flg));
}
*/
bool slow_monster(int dir, int power)
{
- int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
+ BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
return (project_hook(GF_OLD_SLOW, dir, power, flg));
}
*/
bool sleep_monster(int dir, int power)
{
- int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
+ BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
return (project_hook(GF_OLD_SLEEP, dir, power, flg));
}
*/
bool confuse_monster(int dir, int plev)
{
- int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
+ BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
return (project_hook(GF_OLD_CONF, dir, plev, flg));
}
*/
bool stun_monster(int dir, int plev)
{
- int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
+ BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
return (project_hook(GF_STUN, dir, plev, flg));
}
*/
bool poly_monster(int dir, int power)
{
- int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
+ BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
bool tester = (project_hook(GF_OLD_POLY, dir, power, flg));
if (tester)
chg_virtue(V_CHANCE, 1);
*/
bool clone_monster(int dir)
{
- int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
+ BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
return (project_hook(GF_OLD_CLONE, dir, 0, flg));
}
*/
bool fear_monster(int dir, int plev)
{
- int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
+ BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
return (project_hook(GF_TURN_ALL, dir, plev, flg));
}
*/
bool death_ray(int dir, int plev)
{
- int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
+ BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
return (project_hook(GF_DEATH_RAY, dir, plev * 200, flg));
}
*/
bool teleport_monster(int dir, int distance)
{
- int flg = PROJECT_BEAM | PROJECT_KILL;
+ BIT_FLAGS flg = PROJECT_BEAM | PROJECT_KILL;
return (project_hook(GF_AWAY_ALL, dir, distance, flg));
}
*/
bool door_creation(void)
{
- int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
+ BIT_FLAGS flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
return (project(0, 1, p_ptr->y, p_ptr->x, 0, GF_MAKE_DOOR, flg, -1));
}
*/
bool trap_creation(int y, int x)
{
- int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
+ BIT_FLAGS flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
return (project(0, 1, y, x, 0, GF_MAKE_TRAP, flg, -1));
}
*/
bool tree_creation(void)
{
- int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
+ BIT_FLAGS flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
return (project(0, 1, p_ptr->y, p_ptr->x, 0, GF_MAKE_TREE, flg, -1));
}
*/
bool glyph_creation(void)
{
- int flg = PROJECT_GRID | PROJECT_ITEM;
+ BIT_FLAGS flg = PROJECT_GRID | PROJECT_ITEM;
return (project(0, 1, p_ptr->y, p_ptr->x, 0, GF_MAKE_GLYPH, flg, -1));
}
*/
bool wall_stone(void)
{
- int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
+ BIT_FLAGS flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
bool dummy = (project(0, 1, p_ptr->y, p_ptr->x, 0, GF_STONE_WALL, flg, -1));
*/
bool destroy_doors_touch(void)
{
- int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
+ BIT_FLAGS flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
return (project(0, 1, p_ptr->y, p_ptr->x, 0, GF_KILL_DOOR, flg, -1));
}
*/
bool disarm_traps_touch(void)
{
- int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
+ BIT_FLAGS flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
return (project(0, 1, p_ptr->y, p_ptr->x, 0, GF_KILL_TRAP, flg, -1));
}
*/
bool sleep_monsters_touch(void)
{
- int flg = PROJECT_KILL | PROJECT_HIDE;
+ BIT_FLAGS flg = PROJECT_KILL | PROJECT_HIDE;
return (project(0, 1, p_ptr->y, p_ptr->x, p_ptr->lev, GF_OLD_SLEEP, flg, -1));
}
*/
bool animate_dead(MONSTER_IDX who, POSITION y, POSITION x)
{
- int flg = PROJECT_ITEM | PROJECT_HIDE;
+ BIT_FLAGS flg = PROJECT_ITEM | PROJECT_HIDE;
return (project(who, 5, y, x, 0, GF_ANIM_DEAD, flg, -1));
}
{
int i = 0;
- int flg = (PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_JUMP);
+ BIT_FLAGS flg = (PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_JUMP);
do
{
int i;
int count = 0;
DEPTH summon_lev;
- u32b mode = PM_ALLOW_GROUP;
+ BIT_FLAGS mode = PM_ALLOW_GROUP;
bool pet = FALSE;
if (can_pet)
int i;
int max_cyber = (easy_band ? 1 : (dun_level / 50) + randint1(2));
int count = 0;
- u32b mode = PM_ALLOW_GROUP;
+ BIT_FLAGS mode = PM_ALLOW_GROUP;
/* Summoned by a monster */
if (who > 0)
*/
bool charm_monster(int dir, int plev)
{
- int flg = PROJECT_STOP | PROJECT_KILL;
+ BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(GF_CHARM, dir, plev, flg));
}
*/
bool control_one_undead(int dir, int plev)
{
- int flg = PROJECT_STOP | PROJECT_KILL;
+ BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(GF_CONTROL_UNDEAD, dir, plev, flg));
}
*/
bool control_one_demon(int dir, int plev)
{
- int flg = PROJECT_STOP | PROJECT_KILL;
+ BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(GF_CONTROL_DEMON, dir, plev, flg));
}
*/
bool charm_animal(int dir, int plev)
{
- int flg = PROJECT_STOP | PROJECT_KILL;
+ BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(GF_CONTROL_ANIMAL, dir, plev, flg));
}
-/*!
- * @brief 生物支配(1体)
- * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
- * @param plev パワー
- * @return 作用が実際にあった場合TRUEを返す
- */
-bool charm_living(int dir, int plev)
-{
- int flg = PROJECT_STOP | PROJECT_KILL;
- return (project_hook(GF_CONTROL_LIVING, dir, plev, flg));
-}
/*!
* @brief 変わり身処理