summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cave.cc20
-rw-r--r--src/cmd1.cc66
-rw-r--r--src/cmd2.cc20
-rw-r--r--src/cmd3.cc6
-rw-r--r--src/cmd4.cc8
-rw-r--r--src/cmd7.cc2
-rw-r--r--src/dungeon.cc6
-rw-r--r--src/files.cc4
-rw-r--r--src/generate.cc28
-rw-r--r--src/melee1.cc20
-rw-r--r--src/melee2.cc286
-rw-r--r--src/monster1.cc310
-rw-r--r--src/monster2.cc158
-rw-r--r--src/monster3.cc12
-rw-r--r--src/spells1.cc218
-rw-r--r--src/spells2.cc18
-rw-r--r--src/traps.cc6
-rw-r--r--src/wizard1.cc314
-rw-r--r--src/xtra2.cc28
19 files changed, 765 insertions, 765 deletions
diff --git a/src/cave.cc b/src/cave.cc
index 4c5c4ae0..09f5d843 100644
--- a/src/cave.cc
+++ b/src/cave.cc
@@ -1142,10 +1142,10 @@ static void map_info(int y, int x, byte *ap, char *cp)
}
/* Multi-hued monster */
- else if (r_ptr->flags1 & (RF1_ATTR_MULTI))
+ else if (r_ptr->flags1 & RF1_ATTR_MULTI)
{
/* Is it a shapechanger? */
- if (r_ptr->flags2 & (RF2_SHAPECHANGER))
+ if (r_ptr->flags2 & RF2_SHAPECHANGER)
{
image_random(ap, cp);
}
@@ -1153,7 +1153,7 @@ static void map_info(int y, int x, byte *ap, char *cp)
*cp = c;
/* Multi-hued attr */
- if (r_ptr->flags2 & (RF2_ATTR_ANY))
+ if (r_ptr->flags2 & RF2_ATTR_ANY)
{
*ap = randint(15);
}
@@ -1190,14 +1190,14 @@ static void map_info(int y, int x, byte *ap, char *cp)
else
{
/* Normal (non-clear char) monster */
- if (!(r_ptr->flags1 & (RF1_CHAR_CLEAR)))
+ if (!(r_ptr->flags1 & RF1_CHAR_CLEAR))
{
/* Normal char */
*cp = c;
}
/* Normal (non-clear attr) monster */
- else if (!(r_ptr->flags1 & (RF1_ATTR_CLEAR)))
+ else if (!(r_ptr->flags1 & RF1_ATTR_CLEAR))
{
/* Normal attr */
*ap = a;
@@ -1572,10 +1572,10 @@ void map_info_default(int y, int x, byte *ap, char *cp)
}
/* Multi-hued monster */
- else if (r_ptr->flags1 & (RF1_ATTR_MULTI))
+ else if (r_ptr->flags1 & RF1_ATTR_MULTI)
{
/* Is it a shapechanger? */
- if (r_ptr->flags2 & (RF2_SHAPECHANGER))
+ if (r_ptr->flags2 & RF2_SHAPECHANGER)
{
image_random(ap, cp);
}
@@ -1583,7 +1583,7 @@ void map_info_default(int y, int x, byte *ap, char *cp)
*cp = c;
/* Multi-hued attr */
- if (r_ptr->flags2 & (RF2_ATTR_ANY))
+ if (r_ptr->flags2 & RF2_ATTR_ANY)
{
*ap = randint(15);
}
@@ -1617,14 +1617,14 @@ void map_info_default(int y, int x, byte *ap, char *cp)
else
{
/* Normal (non-clear char) monster */
- if (!(r_ptr->flags1 & (RF1_CHAR_CLEAR)))
+ if (!(r_ptr->flags1 & RF1_CHAR_CLEAR))
{
/* Normal char */
*cp = c;
}
/* Normal (non-clear attr) monster */
- else if (!(r_ptr->flags1 & (RF1_ATTR_CLEAR)))
+ else if (!(r_ptr->flags1 & RF1_ATTR_CLEAR))
{
/* Normal attr */
*ap = a;
diff --git a/src/cmd1.cc b/src/cmd1.cc
index 112bd376..69592b71 100644
--- a/src/cmd1.cc
+++ b/src/cmd1.cc
@@ -259,68 +259,68 @@ s16b tot_dam_aux(object_type *o_ptr, int tdam, monster_type *m_ptr,
case TV_DIGGING:
{
/* Slay Animal */
- if ((f1 & (TR1_SLAY_ANIMAL)) && (r_ptr->flags3 & (RF3_ANIMAL)))
+ if ((f1 & (TR1_SLAY_ANIMAL)) && (r_ptr->flags3 & RF3_ANIMAL))
{
if (mult < 2) mult = 2;
}
/* Slay Evil */
- if ((f1 & (TR1_SLAY_EVIL)) && (r_ptr->flags3 & (RF3_EVIL)))
+ if ((f1 & (TR1_SLAY_EVIL)) && (r_ptr->flags3 & RF3_EVIL))
{
if (mult < 2) mult = 2;
}
/* Slay Undead */
- if ((f1 & (TR1_SLAY_UNDEAD)) && (r_ptr->flags3 & (RF3_UNDEAD)))
+ if ((f1 & (TR1_SLAY_UNDEAD)) && (r_ptr->flags3 & RF3_UNDEAD))
{
if (mult < 3) mult = 3;
}
/* Slay Demon */
- if ((f1 & (TR1_SLAY_DEMON)) && (r_ptr->flags3 & (RF3_DEMON)))
+ if ((f1 & (TR1_SLAY_DEMON)) && (r_ptr->flags3 & RF3_DEMON))
{
if (mult < 3) mult = 3;
}
/* Slay Orc */
- if ((f1 & (TR1_SLAY_ORC)) && (r_ptr->flags3 & (RF3_ORC)))
+ if ((f1 & (TR1_SLAY_ORC)) && (r_ptr->flags3 & RF3_ORC))
{
if (mult < 3) mult = 3;
}
/* Slay Troll */
- if ((f1 & (TR1_SLAY_TROLL)) && (r_ptr->flags3 & (RF3_TROLL)))
+ if ((f1 & (TR1_SLAY_TROLL)) && (r_ptr->flags3 & RF3_TROLL))
{
if (mult < 3) mult = 3;
}
/* Slay Giant */
- if ((f1 & (TR1_SLAY_GIANT)) && (r_ptr->flags3 & (RF3_GIANT)))
+ if ((f1 & (TR1_SLAY_GIANT)) && (r_ptr->flags3 & RF3_GIANT))
{
if (mult < 3) mult = 3;
}
/* Slay Dragon */
- if ((f1 & (TR1_SLAY_DRAGON)) && (r_ptr->flags3 & (RF3_DRAGON)))
+ if ((f1 & (TR1_SLAY_DRAGON)) && (r_ptr->flags3 & RF3_DRAGON))
{
if (mult < 3) mult = 3;
}
/* Execute Dragon */
- if ((f1 & (TR1_KILL_DRAGON)) && (r_ptr->flags3 & (RF3_DRAGON)))
+ if ((f1 & (TR1_KILL_DRAGON)) && (r_ptr->flags3 & RF3_DRAGON))
{
if (mult < 5) mult = 5;
}
/* Execute Undead */
- if ((f5 & (TR5_KILL_UNDEAD)) && (r_ptr->flags3 & (RF3_UNDEAD)))
+ if ((f5 & (TR5_KILL_UNDEAD)) && (r_ptr->flags3 & RF3_UNDEAD))
{
if (mult < 5) mult = 5;
}
/* Execute Demon */
- if ((f5 & (TR5_KILL_DEMON)) && (r_ptr->flags3 & (RF3_DEMON)))
+ if ((f5 & (TR5_KILL_DEMON)) && (r_ptr->flags3 & RF3_DEMON))
{
if (mult < 5) mult = 5;
}
@@ -329,11 +329,11 @@ s16b tot_dam_aux(object_type *o_ptr, int tdam, monster_type *m_ptr,
/* Brand (Acid) */
if (f1 & (TR1_BRAND_ACID))
{
- if (r_ptr->flags3 & (RF3_IM_ACID))
+ if (r_ptr->flags3 & RF3_IM_ACID)
{
// No additional multiplier
}
- else if (r_ptr->flags9 & (RF9_SUSCEP_ACID))
+ else if (r_ptr->flags9 & RF9_SUSCEP_ACID)
{
if (mult < 6) mult = 6;
}
@@ -346,11 +346,11 @@ s16b tot_dam_aux(object_type *o_ptr, int tdam, monster_type *m_ptr,
/* Brand (Elec) */
if (f1 & (TR1_BRAND_ELEC))
{
- if (r_ptr->flags3 & (RF3_IM_ELEC))
+ if (r_ptr->flags3 & RF3_IM_ELEC)
{
// No additional multiplier
}
- else if (r_ptr->flags9 & (RF9_SUSCEP_ELEC))
+ else if (r_ptr->flags9 & RF9_SUSCEP_ELEC)
{
if (mult < 6) mult = 6;
}
@@ -363,11 +363,11 @@ s16b tot_dam_aux(object_type *o_ptr, int tdam, monster_type *m_ptr,
/* Brand (Fire) */
if (f1 & (TR1_BRAND_FIRE))
{
- if (r_ptr->flags3 & (RF3_IM_FIRE))
+ if (r_ptr->flags3 & RF3_IM_FIRE)
{
// No additional multiplier
}
- else if (r_ptr->flags3 & (RF3_SUSCEP_FIRE))
+ else if (r_ptr->flags3 & RF3_SUSCEP_FIRE)
{
if (mult < 6) mult = 6;
}
@@ -380,11 +380,11 @@ s16b tot_dam_aux(object_type *o_ptr, int tdam, monster_type *m_ptr,
/* Brand (Cold) */
if (f1 & (TR1_BRAND_COLD))
{
- if (r_ptr->flags3 & (RF3_IM_COLD))
+ if (r_ptr->flags3 & RF3_IM_COLD)
{
// No additional multiplier
}
- else if (r_ptr->flags3 & (RF3_SUSCEP_COLD))
+ else if (r_ptr->flags3 & RF3_SUSCEP_COLD)
{
if (mult < 6) mult = 6;
}
@@ -397,11 +397,11 @@ s16b tot_dam_aux(object_type *o_ptr, int tdam, monster_type *m_ptr,
/* Brand (Poison) */
if (f1 & (TR1_BRAND_POIS) || (p_ptr->tim_poison))
{
- if (r_ptr->flags3 & (RF3_IM_POIS))
+ if (r_ptr->flags3 & RF3_IM_POIS)
{
// No additional damage
}
- else if (r_ptr->flags9 & (RF9_SUSCEP_POIS))
+ else if (r_ptr->flags9 & RF9_SUSCEP_POIS)
{
if (mult < 6) mult = 6;
if (magik(95)) *special |= SPEC_POIS;
@@ -416,7 +416,7 @@ s16b tot_dam_aux(object_type *o_ptr, int tdam, monster_type *m_ptr,
/* Wounding */
if (f5 & (TR5_WOUNDING))
{
- if (r_ptr->flags8 & (RF8_NO_CUT))
+ if (r_ptr->flags8 & RF8_NO_CUT)
{
// No additional damage
}
@@ -564,7 +564,7 @@ void touch_zap_player(monster_type *m_ptr)
{
auto r_ptr = m_ptr->race();
- if (r_ptr->flags2 & (RF2_AURA_FIRE))
+ if (r_ptr->flags2 & RF2_AURA_FIRE)
{
if (!(p_ptr->immune_fire))
{
@@ -588,7 +588,7 @@ void touch_zap_player(monster_type *m_ptr)
}
- if (r_ptr->flags2 & (RF2_AURA_ELEC))
+ if (r_ptr->flags2 & RF2_AURA_ELEC)
{
if (!(p_ptr->immune_elec))
{
@@ -1050,8 +1050,8 @@ static void carried_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
}
/* Aura elec */
- if ((tr_ptr->flags2 & (RF2_AURA_ELEC)) &&
- !(r_ptr->flags3 & (RF3_IM_ELEC)))
+ if ((tr_ptr->flags2 & RF2_AURA_ELEC) &&
+ !(r_ptr->flags3 & RF3_IM_ELEC))
{
if (t_ptr->ml)
{
@@ -1538,8 +1538,8 @@ static void incarnate_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
}
/* Aura elec */
- if ((tr_ptr->flags2 & (RF2_AURA_ELEC)) &&
- !(r_ptr->flags3 & (RF3_IM_ELEC)))
+ if ((tr_ptr->flags2 & RF2_AURA_ELEC) &&
+ !(r_ptr->flags3 & RF3_IM_ELEC))
{
if (t_ptr->ml)
{
@@ -1660,7 +1660,7 @@ void attack_special(monster_type *m_ptr, s32b special, int dam)
/* Special - Cut monster */
if (special & SPEC_CUT)
{
- if (r_ptr->flags8 & (RF8_NO_CUT))
+ if (r_ptr->flags8 & RF8_NO_CUT)
{
// No damage
}
@@ -1682,11 +1682,11 @@ void attack_special(monster_type *m_ptr, s32b special, int dam)
/* Special - Poison monster */
if (special & SPEC_POIS)
{
- if (r_ptr->flags3 & (RF3_IM_POIS))
+ if (r_ptr->flags3 & RF3_IM_POIS)
{
// No damage
}
- else if (r_ptr->flags9 & (RF9_SUSCEP_POIS))
+ else if (r_ptr->flags9 & RF9_SUSCEP_POIS)
{
if (m_ptr->poisoned)
{
@@ -2228,7 +2228,7 @@ void py_attack(int y, int x, int max_blow)
/* Stunning blow */
if (magik(get_skill(SKILL_STUN)) && (o_ptr->tval == TV_HAFTED) && (o_ptr->weight > 50) && done_crit)
{
- if (!(r_ptr->flags4 & (RF4_BR_SOUN)) && !(r_ptr->flags4 & (RF4_BR_WALL)) && k)
+ if (!(r_ptr->flags4 & RF4_BR_SOUN) && !(r_ptr->flags4 & RF4_BR_WALL) && k)
{
int tmp;
@@ -2449,7 +2449,7 @@ void py_attack(int y, int x, int max_blow)
}
/* Confuse the monster */
- if (r_ptr->flags3 & (RF3_NO_CONF))
+ if (r_ptr->flags3 & RF3_NO_CONF)
{
msg_format("%^s is unaffected.", m_name);
}
diff --git a/src/cmd2.cc b/src/cmd2.cc
index 023f49f7..d1f26cae 100644
--- a/src/cmd2.cc
+++ b/src/cmd2.cc
@@ -3355,9 +3355,9 @@ void do_cmd_fire(void)
cptr note_dies = " dies.";
/* Some monsters get "destroyed" */
- if ((r_ptr->flags3 & (RF3_DEMON)) ||
- (r_ptr->flags3 & (RF3_UNDEAD)) ||
- (r_ptr->flags2 & (RF2_STUPID)) ||
+ if ((r_ptr->flags3 & RF3_DEMON) ||
+ (r_ptr->flags3 & RF3_UNDEAD) ||
+ (r_ptr->flags2 & RF2_STUPID) ||
(strchr("Evg", r_ptr->d_char)))
{
/* Special note at death */
@@ -3769,9 +3769,9 @@ void do_cmd_throw(void)
cptr note_dies = " dies.";
/* Some monsters get "destroyed" */
- if ((r_ptr->flags3 & (RF3_DEMON)) ||
- (r_ptr->flags3 & (RF3_UNDEAD)) ||
- (r_ptr->flags2 & (RF2_STUPID)) ||
+ if ((r_ptr->flags3 & RF3_DEMON) ||
+ (r_ptr->flags3 & RF3_UNDEAD) ||
+ (r_ptr->flags2 & RF2_STUPID) ||
(strchr("Evg", r_ptr->d_char)))
{
/* Special note at death */
@@ -4096,9 +4096,9 @@ void do_cmd_boomerang(void)
cptr note_dies = " dies.";
/* Some monsters get "destroyed" */
- if ((r_ptr->flags3 & (RF3_DEMON)) ||
- (r_ptr->flags3 & (RF3_UNDEAD)) ||
- (r_ptr->flags2 & (RF2_STUPID)) ||
+ if ((r_ptr->flags3 & RF3_DEMON) ||
+ (r_ptr->flags3 & RF3_UNDEAD) ||
+ (r_ptr->flags2 & RF2_STUPID) ||
(strchr("Evg", r_ptr->d_char)))
{
/* Special note at death */
@@ -4781,7 +4781,7 @@ void do_cmd_steal()
}
/* The monster is immune */
- if (r_info[m_ptr->r_idx].flags7 & (RF7_NO_THEFT))
+ if (r_info[m_ptr->r_idx].flags7 & RF7_NO_THEFT)
{
msg_print("The monster is guarding the treasures.");
return;
diff --git a/src/cmd3.cc b/src/cmd3.cc
index ac27d926..51939fe6 100644
--- a/src/cmd3.cc
+++ b/src/cmd3.cc
@@ -1325,7 +1325,7 @@ static void roff_top(int r_idx)
Term_gotoxy(0, 0);
/* A title (use "The" for non-uniques) */
- if (!(r_ptr->flags1 & (RF1_UNIQUE)))
+ if (!(r_ptr->flags1 & RF1_UNIQUE))
{
Term_addstr( -1, TERM_WHITE, "The ");
}
@@ -1435,10 +1435,10 @@ void do_cmd_query_symbol(void)
monster_race *r_ptr = &r_info[i];
/* Require non-unique monsters if needed */
- if (norm && (r_ptr->flags1 & (RF1_UNIQUE))) continue;
+ if (norm && (r_ptr->flags1 & RF1_UNIQUE)) continue;
/* Require unique monsters if needed */
- if (uniq && !(r_ptr->flags1 & (RF1_UNIQUE))) continue;
+ if (uniq && !(r_ptr->flags1 & RF1_UNIQUE)) continue;
/* Require monsters with the name requested if needed */
if (name)
diff --git a/src/cmd4.cc b/src/cmd4.cc
index 27f2e46f..b63a2c2c 100644
--- a/src/cmd4.cc
+++ b/src/cmd4.cc
@@ -3276,7 +3276,7 @@ static void do_cmd_knowledge_uniques(void)
monster_race *r_ptr = &r_info[k];
/* Only print Uniques */
- if (r_ptr->flags1 & (RF1_UNIQUE) &&
+ if ((r_ptr->flags1 & RF1_UNIQUE) &&
!(r_ptr->flags7 & RF7_PET) &&
!(r_ptr->flags7 & RF7_NEUTRAL))
{
@@ -3298,7 +3298,7 @@ static void do_cmd_knowledge_uniques(void)
monster_race *r_ptr = &r_info[r_idx];
/* Only print Uniques */
- if (r_ptr->flags1 & (RF1_UNIQUE))
+ if (r_ptr->flags1 & RF1_UNIQUE)
{
bool_ dead = (r_ptr->max_num == 0);
@@ -3492,7 +3492,7 @@ static void do_cmd_knowledge_kill_count(void)
{
monster_race *r_ptr = &r_info[kk];
- if (r_ptr->flags1 & (RF1_UNIQUE))
+ if (r_ptr->flags1 & RF1_UNIQUE)
{
if (r_ptr->max_num == 0)
{
@@ -3526,7 +3526,7 @@ static void do_cmd_knowledge_kill_count(void)
{
monster_race *r_ptr = &r_info[k];
- if (r_ptr->flags1 & (RF1_UNIQUE))
+ if (r_ptr->flags1 & RF1_UNIQUE)
{
bool_ dead = (r_ptr->max_num == 0);
diff --git a/src/cmd7.cc b/src/cmd7.cc
index 6e7aefc3..5b1eaf02 100644
--- a/src/cmd7.cc
+++ b/src/cmd7.cc
@@ -3702,7 +3702,7 @@ void summon_true(int r_idx, int item)
/* Uniques are less likely to be nice */
- if (r_ptr->flags1 & (RF1_UNIQUE))
+ if (r_ptr->flags1 & RF1_UNIQUE)
{
/* Because it's unique, it will always be destroyed */
used = TRUE;
diff --git a/src/dungeon.cc b/src/dungeon.cc
index b2592979..cd904f29 100644
--- a/src/dungeon.cc
+++ b/src/dungeon.cc
@@ -791,7 +791,7 @@ static void regen_monsters(void)
if (!frac) frac = 1;
/* Hack -- Some monsters regenerate quickly */
- if (r_ptr->flags2 & (RF2_REGENERATE)) frac *= 2;
+ if (r_ptr->flags2 & RF2_REGENERATE) frac *= 2;
/* Hack -- Regenerate */
@@ -828,7 +828,7 @@ static void regen_monsters(void)
/* Hack -- Some monsters regenerate quickly */
auto const r_ptr = m_ptr->race();
- if (r_ptr->flags2 & (RF2_REGENERATE)) frac *= 2;
+ if (r_ptr->flags2 & RF2_REGENERATE) frac *= 2;
/* Hack -- Regenerate */
m_ptr->hp += frac;
@@ -4512,7 +4512,7 @@ static void process_player(void)
auto const r_ptr = m_ptr->race();
/* Skip non-multi-hued monsters */
- if (!(r_ptr->flags1 & (RF1_ATTR_MULTI))) continue;
+ if (!(r_ptr->flags1 & RF1_ATTR_MULTI)) continue;
/* Reset the flag */
shimmer_monsters = TRUE;
diff --git a/src/files.cc b/src/files.cc
index 576b8143..96269259 100644
--- a/src/files.cc
+++ b/src/files.cc
@@ -2701,7 +2701,7 @@ errr file_character(cptr name, bool_ full)
{
monster_race *r_ptr = &r_info[k];
- if (r_ptr->flags1 & (RF1_UNIQUE))
+ if (r_ptr->flags1 & RF1_UNIQUE)
{
bool_ dead = (r_ptr->max_num == 0);
if (dead)
@@ -4052,7 +4052,7 @@ static long total_points(void)
{
monster_race *r_ptr = &r_info[k];
- if (r_ptr->flags1 & (RF1_UNIQUE))
+ if (r_ptr->flags1 & RF1_UNIQUE)
{
bool_ dead = (r_ptr->max_num == 0);
diff --git a/src/generate.cc b/src/generate.cc
index ca0022e1..dc5005d0 100644
--- a/src/generate.cc
+++ b/src/generate.cc
@@ -2673,10 +2673,10 @@ static bool_ vault_aux_jelly(int r_idx)
monster_race *r_ptr = &r_info[r_idx];
/* Decline unique monsters */
- if (r_ptr->flags1 & (RF1_UNIQUE)) return (FALSE);
+ if (r_ptr->flags1 & RF1_UNIQUE) return (FALSE);
/* Also decline evil jellies (like death molds and shoggoths) */
- if (r_ptr->flags3 & (RF3_EVIL)) return (FALSE);
+ if (r_ptr->flags3 & RF3_EVIL) return (FALSE);
/* Require icky thing, jelly, mold, or mushroom */
if (!strchr("ijm,", r_ptr->d_char)) return (FALSE);
@@ -2694,10 +2694,10 @@ static bool_ vault_aux_animal(int r_idx)
monster_race *r_ptr = &r_info[r_idx];
/* Decline unique monsters */
- if (r_ptr->flags1 & (RF1_UNIQUE)) return (FALSE);
+ if (r_ptr->flags1 & RF1_UNIQUE) return (FALSE);
/* Require "animal" flag */
- if (!(r_ptr->flags3 & (RF3_ANIMAL))) return (FALSE);
+ if (!(r_ptr->flags3 & RF3_ANIMAL)) return (FALSE);
/* Okay */
return (TRUE);
@@ -2712,10 +2712,10 @@ static bool_ vault_aux_undead(int r_idx)
monster_race *r_ptr = &r_info[r_idx];
/* Decline unique monsters */
- if (r_ptr->flags1 & (RF1_UNIQUE)) return (FALSE);
+ if (r_ptr->flags1 & RF1_UNIQUE) return (FALSE);
/* Require Undead */
- if (!(r_ptr->flags3 & (RF3_UNDEAD))) return (FALSE);
+ if (!(r_ptr->flags3 & RF3_UNDEAD)) return (FALSE);
/* Okay */
return (TRUE);
@@ -2730,7 +2730,7 @@ static bool_ vault_aux_chapel(int r_idx)
monster_race *r_ptr = &r_info[r_idx];
/* Decline unique monsters */
- if (r_ptr->flags1 & (RF1_UNIQUE)) return (FALSE);
+ if (r_ptr->flags1 & RF1_UNIQUE) return (FALSE);
/* Require "priest" or Angel */
if (!((r_ptr->d_char == 'A') || strstr(r_ptr->name, "riest")))
@@ -2751,7 +2751,7 @@ static bool_ vault_aux_kennel(int r_idx)
monster_race *r_ptr = &r_info[r_idx];
/* Decline unique monsters */
- if (r_ptr->flags1 & (RF1_UNIQUE)) return (FALSE);
+ if (r_ptr->flags1 & RF1_UNIQUE) return (FALSE);
/* Require a Zephyr Hound or a dog */
return ((r_ptr->d_char == 'Z') || (r_ptr->d_char == 'C'));
@@ -2767,7 +2767,7 @@ static bool_ vault_aux_treasure(int r_idx)
monster_race *r_ptr = &r_info[r_idx];
/* Decline unique monsters */
- if (r_ptr->flags1 & (RF1_UNIQUE)) return (FALSE);
+ if (r_ptr->flags1 & RF1_UNIQUE) return (FALSE);
/* Require "priest" or Angel */
if (!((r_ptr->d_char == '!') || (r_ptr->d_char == '|') ||
@@ -2809,7 +2809,7 @@ static bool_ vault_aux_orc(int r_idx)
monster_race *r_ptr = &r_info[r_idx];
/* Decline unique monsters */
- if (r_ptr->flags1 & (RF1_UNIQUE)) return (FALSE);
+ if (r_ptr->flags1 & RF1_UNIQUE) return (FALSE);
/* Hack -- Require "o" monsters */
if (!strchr("o", r_ptr->d_char)) return (FALSE);
@@ -2828,7 +2828,7 @@ static bool_ vault_aux_troll(int r_idx)
monster_race *r_ptr = &r_info[r_idx];
/* Decline unique monsters */
- if (r_ptr->flags1 & (RF1_UNIQUE)) return (FALSE);
+ if (r_ptr->flags1 & RF1_UNIQUE) return (FALSE);
/* Hack -- Require "T" monsters */
if (!strchr("T", r_ptr->d_char)) return (FALSE);
@@ -2846,7 +2846,7 @@ static bool_ vault_aux_giant(int r_idx)
monster_race *r_ptr = &r_info[r_idx];
/* Decline unique monsters */
- if (r_ptr->flags1 & (RF1_UNIQUE)) return (FALSE);
+ if (r_ptr->flags1 & RF1_UNIQUE) return (FALSE);
/* Hack -- Require "P" monsters */
if (!strchr("P", r_ptr->d_char)) return (FALSE);
@@ -2870,7 +2870,7 @@ static bool_ vault_aux_dragon(int r_idx)
monster_race *r_ptr = &r_info[r_idx];
/* Decline unique monsters */
- if (r_ptr->flags1 & (RF1_UNIQUE)) return (FALSE);
+ if (r_ptr->flags1 & RF1_UNIQUE) return (FALSE);
/* Hack -- Require "d" or "D" monsters */
if (!strchr("Dd", r_ptr->d_char)) return (FALSE);
@@ -2891,7 +2891,7 @@ static bool_ vault_aux_demon(int r_idx)
monster_race *r_ptr = &r_info[r_idx];
/* Decline unique monsters */
- if (r_ptr->flags1 & (RF1_UNIQUE)) return (FALSE);
+ if (r_ptr->flags1 & RF1_UNIQUE) return (FALSE);
/* Hack -- Require "U" monsters */
if (!strchr("U", r_ptr->d_char)) return (FALSE);
diff --git a/src/melee1.cc b/src/melee1.cc
index 2753f78c..4dcf8fa0 100644
--- a/src/melee1.cc
+++ b/src/melee1.cc
@@ -235,7 +235,7 @@ bool_ carried_make_attack_normal(int r_idx)
bool_ alive = TRUE;
/* Not allowed to attack */
- if (r_ptr->flags1 & (RF1_NEVER_BLOW)) return (FALSE);
+ if (r_ptr->flags1 & RF1_NEVER_BLOW) return (FALSE);
/* Total armor */
ac = p_ptr->ac + p_ptr->to_a;
@@ -280,7 +280,7 @@ bool_ carried_make_attack_normal(int r_idx)
/* Hack -- Apply "protection from evil" */
if ((p_ptr->protevil > 0) &&
- (r_ptr->flags3 & (RF3_EVIL)) &&
+ (r_ptr->flags3 & RF3_EVIL) &&
(p_ptr->lev >= rlev) &&
((rand_int(100) + p_ptr->lev) > 50))
{
@@ -293,7 +293,7 @@ bool_ carried_make_attack_normal(int r_idx)
/* Hack -- Apply "protection from good" */
if ((p_ptr->protgood > 0) &&
- (r_ptr->flags3 & (RF3_GOOD)) &&
+ (r_ptr->flags3 & RF3_GOOD) &&
(p_ptr->lev >= rlev) &&
((rand_int(100) + p_ptr->lev) > 50))
{
@@ -1249,7 +1249,7 @@ bool_ make_attack_normal(int m_idx, byte divis)
/* Not allowed to attack? */
auto r_ptr = m_ptr->race();
- if (r_ptr->flags1 & (RF1_NEVER_BLOW)) return (FALSE);
+ if (r_ptr->flags1 & RF1_NEVER_BLOW) return (FALSE);
/* ...nor if friendly */
if (is_friend(m_ptr) >= 0)
@@ -1435,7 +1435,7 @@ bool_ make_attack_normal(int m_idx, byte divis)
if (chance > 50000) chance = 50000;
chance -= rlev * 300;
- if ((randint(100000) < chance) && (r_ptr->flags3 & (RF3_EVIL)))
+ if ((randint(100000) < chance) && (r_ptr->flags3 & RF3_EVIL))
{
/* Message */
msg_format("The hand of Eru Iluvatar stops %s blow.", m_name);
@@ -1447,7 +1447,7 @@ bool_ make_attack_normal(int m_idx, byte divis)
/* Hack -- Apply "protection from evil" */
if ((p_ptr->protevil > 0) &&
- (r_ptr->flags3 & (RF3_EVIL)) &&
+ (r_ptr->flags3 & RF3_EVIL) &&
(p_ptr->lev >= rlev) &&
((rand_int(100) + p_ptr->lev) > 50))
{
@@ -1460,7 +1460,7 @@ bool_ make_attack_normal(int m_idx, byte divis)
/* Hack -- Apply "protection from good" */
if ((p_ptr->protgood > 0) &&
- (r_ptr->flags3 & (RF3_GOOD)) &&
+ (r_ptr->flags3 & RF3_GOOD) &&
(p_ptr->lev >= rlev) &&
((rand_int(100) + p_ptr->lev) > 50))
{
@@ -1679,12 +1679,12 @@ bool_ make_attack_normal(int m_idx, byte divis)
{
black_breath_attack(4);
}
- else if ((m_ptr->level >= 35) && (r_ptr->flags3 & (RF3_UNDEAD)) &&
- (r_ptr->flags1 & (RF1_UNIQUE)))
+ else if ((m_ptr->level >= 35) && (r_ptr->flags3 & RF3_UNDEAD) &&
+ (r_ptr->flags1 & RF1_UNIQUE))
{
black_breath_attack(300 - m_ptr->level);
}
- else if ((m_ptr->level >= 40) && (r_ptr->flags3 & (RF3_UNDEAD)))
+ else if ((m_ptr->level >= 40) && (r_ptr->flags3 & RF3_UNDEAD))
{
black_breath_attack(450 - m_ptr->level);
}
diff --git a/src/melee2.cc b/src/melee2.cc
index 080208f1..522b2f47 100644
--- a/src/melee2.cc
+++ b/src/melee2.cc
@@ -118,10 +118,10 @@ bool_ mon_take_hit_mon(int s_idx, int m_idx, int dam, bool_ *fear, cptr note)
/* Do nothing */
}
/* Death by Physical attack -- non-living monster */
- else if ((r_ptr->flags3 & (RF3_DEMON)) ||
- (r_ptr->flags3 & (RF3_UNDEAD)) ||
- (r_ptr->flags2 & (RF2_STUPID)) ||
- (r_ptr->flags3 & (RF3_NONLIVING)) ||
+ else if ((r_ptr->flags3 & RF3_DEMON) ||
+ (r_ptr->flags3 & RF3_UNDEAD) ||
+ (r_ptr->flags2 & RF2_STUPID) ||
+ (r_ptr->flags3 & RF3_NONLIVING) ||
(strchr("Evg", r_ptr->d_char)))
{
cmonster_msg(TERM_L_RED, "%^s is destroyed.", m_name);
@@ -172,7 +172,7 @@ bool_ mon_take_hit_mon(int s_idx, int m_idx, int dam, bool_ *fear, cptr note)
}
/* When an Unique dies, it stays dead */
- if (r_ptr->flags1 & (RF1_UNIQUE))
+ if (r_ptr->flags1 & RF1_UNIQUE)
{
r_ptr->max_num = 0;
}
@@ -229,7 +229,7 @@ void mon_handle_fear(monster_type *m_ptr, int dam, bool_ *fear)
/* Sometimes a monster gets scared by damage */
auto const r_ptr = m_ptr->race();
- if (!m_ptr->monfear && !(r_ptr->flags3 & (RF3_NO_FEAR)))
+ if (!m_ptr->monfear && !(r_ptr->flags3 & RF3_NO_FEAR))
{
int percentage;
@@ -290,7 +290,7 @@ void mon_handle_fear(monster_type *m_ptr, int dam, bool_ *fear)
static bool_ int_outof(std::shared_ptr<monster_race> r_ptr, int prob)
{
/* Non-Smart monsters are half as "smart" */
- if (!(r_ptr->flags2 & (RF2_SMART))) prob = prob / 2;
+ if (!(r_ptr->flags2 & RF2_SMART)) prob = prob / 2;
/* Roll the dice */
return (rand_int(100) < prob);
@@ -314,7 +314,7 @@ static void remove_bad_spells(int m_idx, u32b *f4p, u32b *f5p, u32b *f6p)
/* Too stupid to know anything? */
auto const r_ptr = m_ptr->race();
- if (r_ptr->flags2 & (RF2_STUPID)) return;
+ if (r_ptr->flags2 & RF2_STUPID) return;
/* Must be cheating or learning */
@@ -338,178 +338,178 @@ static void remove_bad_spells(int m_idx, u32b *f4p, u32b *f5p, u32b *f6p)
if (smart & (SM_IMM_ACID))
{
- if (int_outof(r_ptr, 100)) f4 &= ~(RF4_BR_ACID);
- if (int_outof(r_ptr, 100)) f5 &= ~(RF5_BA_ACID);
- if (int_outof(r_ptr, 100)) f5 &= ~(RF5_BO_ACID);
+ if (int_outof(r_ptr, 100)) f4 &= ~RF4_BR_ACID;
+ if (int_outof(r_ptr, 100)) f5 &= ~RF5_BA_ACID;
+ if (int_outof(r_ptr, 100)) f5 &= ~RF5_BO_ACID;
}
else if ((smart & (SM_OPP_ACID)) && (smart & (SM_RES_ACID)))
{
- if (int_outof(r_ptr, 80)) f4 &= ~(RF4_BR_ACID);
- if (int_outof(r_ptr, 80)) f5 &= ~(RF5_BA_ACID);
- if (int_outof(r_ptr, 80)) f5 &= ~(RF5_BO_ACID);
+ if (int_outof(r_ptr, 80)) f4 &= ~RF4_BR_ACID;
+ if (int_outof(r_ptr, 80)) f5 &= ~RF5_BA_ACID;
+ if (int_outof(r_ptr, 80)) f5 &= ~RF5_BO_ACID;
}
else if ((smart & (SM_OPP_ACID)) || (smart & (SM_RES_ACID)))
{
- if (int_outof(r_ptr, 30)) f4 &= ~(RF4_BR_ACID);
- if (int_outof(r_ptr, 30)) f5 &= ~(RF5_BA_ACID);
- if (int_outof(r_ptr, 30)) f5 &= ~(RF5_BO_ACID);
+ if (int_outof(r_ptr, 30)) f4 &= ~RF4_BR_ACID;
+ if (int_outof(r_ptr, 30)) f5 &= ~RF5_BA_ACID;
+ if (int_outof(r_ptr, 30)) f5 &= ~RF5_BO_ACID;
}
if (smart & (SM_IMM_ELEC))
{
- if (int_outof(r_ptr, 100)) f4 &= ~(RF4_BR_ELEC);
- if (int_outof(r_ptr, 100)) f5 &= ~(RF5_BA_ELEC);
- if (int_outof(r_ptr, 100)) f5 &= ~(RF5_BO_ELEC);
+ if (int_outof(r_ptr, 100)) f4 &= ~RF4_BR_ELEC;
+ if (int_outof(r_ptr, 100)) f5 &= ~RF5_BA_ELEC;
+ if (int_outof(r_ptr, 100)) f5 &= ~RF5_BO_ELEC;
}
else if ((smart & (SM_OPP_ELEC)) && (smart & (SM_RES_ELEC)))
{
- if (int_outof(r_ptr, 80)) f4 &= ~(RF4_BR_ELEC);
- if (int_outof(r_ptr, 80)) f5 &= ~(RF5_BA_ELEC);
- if (int_outof(r_ptr, 80)) f5 &= ~(RF5_BO_ELEC);
+ if (int_outof(r_ptr, 80)) f4 &= ~RF4_BR_ELEC;
+ if (int_outof(r_ptr, 80)) f5 &= ~RF5_BA_ELEC;
+ if (int_outof(r_ptr, 80)) f5 &= ~RF5_BO_ELEC;
}
else if ((smart & (SM_OPP_ELEC)) || (smart & (SM_RES_ELEC)))
{
- if (int_outof(r_ptr, 30)) f4 &= ~(RF4_BR_ELEC);
- if (int_outof(r_ptr, 30)) f5 &= ~(RF5_BA_ELEC);
- if (int_outof(r_ptr, 30)) f5 &= ~(RF5_BO_ELEC);
+ if (int_outof(r_ptr, 30)) f4 &= ~RF4_BR_ELEC;
+ if (int_outof(r_ptr, 30)) f5 &= ~RF5_BA_ELEC;
+ if (int_outof(r_ptr, 30)) f5 &= ~RF5_BO_ELEC;
}
if (smart & (SM_IMM_FIRE))
{
- if (int_outof(r_ptr, 100)) f4 &= ~(RF4_BR_FIRE);
- if (int_outof(r_ptr, 100)) f5 &= ~(RF5_BA_FIRE);
- if (int_outof(r_ptr, 100)) f5 &= ~(RF5_BO_FIRE);
+ if (int_outof(r_ptr, 100)) f4 &= ~RF4_BR_FIRE;
+ if (int_outof(r_ptr, 100)) f5 &= ~RF5_BA_FIRE;
+ if (int_outof(r_ptr, 100)) f5 &= ~RF5_BO_FIRE;
}
else if ((smart & (SM_OPP_FIRE)) && (smart & (SM_RES_FIRE)))
{
- if (int_outof(r_ptr, 80)) f4 &= ~(RF4_BR_FIRE);
- if (int_outof(r_ptr, 80)) f5 &= ~(RF5_BA_FIRE);
- if (int_outof(r_ptr, 80)) f5 &= ~(RF5_BO_FIRE);
+ if (int_outof(r_ptr, 80)) f4 &= ~RF4_BR_FIRE;
+ if (int_outof(r_ptr, 80)) f5 &= ~RF5_BA_FIRE;
+ if (int_outof(r_ptr, 80)) f5 &= ~RF5_BO_FIRE;
}
else if ((smart & (SM_OPP_FIRE)) || (smart & (SM_RES_FIRE)))
{
- if (int_outof(r_ptr, 30)) f4 &= ~(RF4_BR_FIRE);
- if (int_outof(r_ptr, 30)) f5 &= ~(RF5_BA_FIRE);
- if (int_outof(r_ptr, 30)) f5 &= ~(RF5_BO_FIRE);
+ if (int_outof(r_ptr, 30)) f4 &= ~RF4_BR_FIRE;
+ if (int_outof(r_ptr, 30)) f5 &= ~RF5_BA_FIRE;
+ if (int_outof(r_ptr, 30)) f5 &= ~RF5_BO_FIRE;
}
if (smart & (SM_IMM_COLD))
{
- if (int_outof(r_ptr, 100)) f4 &= ~(RF4_BR_COLD);
- if (int_outof(r_ptr, 100)) f5 &= ~(RF5_BA_COLD);
- if (int_outof(r_ptr, 100)) f5 &= ~(RF5_BO_COLD);
- if (int_outof(r_ptr, 100)) f5 &= ~(RF5_BO_ICEE);
+ if (int_outof(r_ptr, 100)) f4 &= ~RF4_BR_COLD;
+ if (int_outof(r_ptr, 100)) f5 &= ~RF5_BA_COLD;
+ if (int_outof(r_ptr, 100)) f5 &= ~RF5_BO_COLD;
+ if (int_outof(r_ptr, 100)) f5 &= ~RF5_BO_ICEE;
}
else if ((smart & (SM_OPP_COLD)) && (smart & (SM_RES_COLD)))
{
- if (int_outof(r_ptr, 80)) f4 &= ~(RF4_BR_COLD);
- if (int_outof(r_ptr, 80)) f5 &= ~(RF5_BA_COLD);
- if (int_outof(r_ptr, 80)) f5 &= ~(RF5_BO_COLD);
- if (int_outof(r_ptr, 80)) f5 &= ~(RF5_BO_ICEE);
+ if (int_outof(r_ptr, 80)) f4 &= ~RF4_BR_COLD;
+ if (int_outof(r_ptr, 80)) f5 &= ~RF5_BA_COLD;
+ if (int_outof(r_ptr, 80)) f5 &= ~RF5_BO_COLD;
+ if (int_outof(r_ptr, 80)) f5 &= ~RF5_BO_ICEE;
}
else if ((smart & (SM_OPP_COLD)) || (smart & (SM_RES_COLD)))
{
- if (int_outof(r_ptr, 30)) f4 &= ~(RF4_BR_COLD);
- if (int_outof(r_ptr, 30)) f5 &= ~(RF5_BA_COLD);
- if (int_outof(r_ptr, 30)) f5 &= ~(RF5_BO_COLD);
- if (int_outof(r_ptr, 30)) f5 &= ~(RF5_BO_ICEE);
+ if (int_outof(r_ptr, 30)) f4 &= ~RF4_BR_COLD;
+ if (int_outof(r_ptr, 30)) f5 &= ~RF5_BA_COLD;
+ if (int_outof(r_ptr, 30)) f5 &= ~RF5_BO_COLD;
+ if (int_outof(r_ptr, 30)) f5 &= ~RF5_BO_ICEE;
}
if ((smart & (SM_OPP_POIS)) && (smart & (SM_RES_POIS)))
{
- if (int_outof(r_ptr, 80)) f4 &= ~(RF4_BR_POIS);
- if (int_outof(r_ptr, 80)) f5 &= ~(RF5_BA_POIS);
- if (int_outof(r_ptr, 40)) f4 &= ~(RF4_BA_NUKE);
- if (int_outof(r_ptr, 40)) f4 &= ~(RF4_BR_NUKE);
+ if (int_outof(r_ptr, 80)) f4 &= ~RF4_BR_POIS;
+ if (int_outof(r_ptr, 80)) f5 &= ~RF5_BA_POIS;
+ if (int_outof(r_ptr, 40)) f4 &= ~RF4_BA_NUKE;
+ if (int_outof(r_ptr, 40)) f4 &= ~RF4_BR_NUKE;
}
else if ((smart & (SM_OPP_POIS)) || (smart & (SM_RES_POIS)))
{
- if (int_outof(r_ptr, 30)) f4 &= ~(RF4_BR_POIS);
- if (int_outof(r_ptr, 30)) f5 &= ~(RF5_BA_POIS);
+ if (int_outof(r_ptr, 30)) f4 &= ~RF4_BR_POIS;
+ if (int_outof(r_ptr, 30)) f5 &= ~RF5_BA_POIS;
}
if (smart & (SM_RES_NETH))
{
- if (int_outof(r_ptr, 50)) f4 &= ~(RF4_BR_NETH);
- if (int_outof(r_ptr, 50)) f5 &= ~(RF5_BA_NETH);
- if (int_outof(r_ptr, 50)) f5 &= ~(RF5_BO_NETH);
+ if (int_outof(r_ptr, 50)) f4 &= ~RF4_BR_NETH;
+ if (int_outof(r_ptr, 50)) f5 &= ~RF5_BA_NETH;
+ if (int_outof(r_ptr, 50)) f5 &= ~RF5_BO_NETH;
}
if (smart & (SM_RES_LITE))
{
- if (int_outof(r_ptr, 50)) f4 &= ~(RF4_BR_LITE);
+ if (int_outof(r_ptr, 50)) f4 &= ~RF4_BR_LITE;
}
if (smart & (SM_RES_DARK))
{
- if (int_outof(r_ptr, 50)) f4 &= ~(RF4_BR_DARK);
- if (int_outof(r_ptr, 50)) f5 &= ~(RF5_BA_DARK);
+ if (int_outof(r_ptr, 50)) f4 &= ~RF4_BR_DARK;
+ if (int_outof(r_ptr, 50)) f5 &= ~RF5_BA_DARK;
}
if (smart & (SM_RES_FEAR))
{
- if (int_outof(r_ptr, 100)) f5 &= ~(RF5_SCARE);
+ if (int_outof(r_ptr, 100)) f5 &= ~RF5_SCARE;
}
if (smart & (SM_RES_CONF))
{
- if (int_outof(r_ptr, 100)) f5 &= ~(RF5_CONF);
- if (int_outof(r_ptr, 50)) f4 &= ~(RF4_BR_CONF);
+ if (int_outof(r_ptr, 100)) f5 &= ~RF5_CONF;
+ if (int_outof(r_ptr, 50)) f4 &= ~RF4_BR_CONF;
}
if (smart & (SM_RES_CHAOS))
{
- if (int_outof(r_ptr, 100)) f5 &= ~(RF5_CONF);
- if (int_outof(r_ptr, 50)) f4 &= ~(RF4_BR_CONF);
- if (int_outof(r_ptr, 50)) f4 &= ~(RF4_BR_CHAO);
- if (int_outof(r_ptr, 50)) f4 &= ~(RF4_BA_CHAO);
+ if (int_outof(r_ptr, 100)) f5 &= ~RF5_CONF;
+ if (int_outof(r_ptr, 50)) f4 &= ~RF4_BR_CONF;
+ if (int_outof(r_ptr, 50)) f4 &= ~RF4_BR_CHAO;
+ if (int_outof(r_ptr, 50)) f4 &= ~RF4_BA_CHAO;
}
if (smart & (SM_RES_DISEN))
{
- if (int_outof(r_ptr, 100)) f4 &= ~(RF4_BR_DISE);
+ if (int_outof(r_ptr, 100)) f4 &= ~RF4_BR_DISE;
}
if (smart & (SM_RES_BLIND))
{
- if (int_outof(r_ptr, 100)) f5 &= ~(RF5_BLIND);
+ if (int_outof(r_ptr, 100)) f5 &= ~RF5_BLIND;
}
if (smart & (SM_RES_NEXUS))
{
- if (int_outof(r_ptr, 50)) f4 &= ~(RF4_BR_NEXU);
- if (int_outof(r_ptr, 50)) f6 &= ~(RF6_TELE_LEVEL);
+ if (int_outof(r_ptr, 50)) f4 &= ~RF4_BR_NEXU;
+ if (int_outof(r_ptr, 50)) f6 &= ~RF6_TELE_LEVEL;
}
if (smart & (SM_RES_SOUND))
{
- if (int_outof(r_ptr, 50)) f4 &= ~(RF4_BR_SOUN);
+ if (int_outof(r_ptr, 50)) f4 &= ~RF4_BR_SOUN;
}
if (smart & (SM_RES_SHARD))
{
- if (int_outof(r_ptr, 50)) f4 &= ~(RF4_BR_SHAR);
- if (int_outof(r_ptr, 20)) f4 &= ~(RF4_ROCKET);
+ if (int_outof(r_ptr, 50)) f4 &= ~RF4_BR_SHAR;
+ if (int_outof(r_ptr, 20)) f4 &= ~RF4_ROCKET;
}
if (smart & (SM_IMM_REFLECT))
{
- if (int_outof(r_ptr, 100)) f5 &= ~(RF5_BO_COLD);
- if (int_outof(r_ptr, 100)) f5 &= ~(RF5_BO_FIRE);
- if (int_outof(r_ptr, 100)) f5 &= ~(RF5_BO_ACID);
- if (int_outof(r_ptr, 100)) f5 &= ~(RF5_BO_ELEC);
- if (int_outof(r_ptr, 100)) f5 &= ~(RF5_BO_POIS);
- if (int_outof(r_ptr, 100)) f5 &= ~(RF5_BO_NETH);
- if (int_outof(r_ptr, 100)) f5 &= ~(RF5_BO_WATE);
- if (int_outof(r_ptr, 100)) f5 &= ~(RF5_BO_MANA);
- if (int_outof(r_ptr, 100)) f5 &= ~(RF5_BO_PLAS);
- if (int_outof(r_ptr, 100)) f5 &= ~(RF5_BO_ICEE);
- if (int_outof(r_ptr, 100)) f5 &= ~(RF5_MISSILE);
+ if (int_outof(r_ptr, 100)) f5 &= ~RF5_BO_COLD;
+ if (int_outof(r_ptr, 100)) f5 &= ~RF5_BO_FIRE;
+ if (int_outof(r_ptr, 100)) f5 &= ~RF5_BO_ACID;
+ if (int_outof(r_ptr, 100)) f5 &= ~RF5_BO_ELEC;
+ if (int_outof(r_ptr, 100)) f5 &= ~RF5_BO_POIS;
+ if (int_outof(r_ptr, 100)) f5 &= ~RF5_BO_NETH;
+ if (int_outof(r_ptr, 100)) f5 &= ~RF5_BO_WATE;
+ if (int_outof(r_ptr, 100)) f5 &= ~RF5_BO_MANA;
+ if (int_outof(r_ptr, 100)) f5 &= ~RF5_BO_PLAS;
+ if (int_outof(r_ptr, 100)) f5 &= ~RF5_BO_ICEE;
+ if (int_outof(r_ptr, 100)) f5 &= ~RF5_MISSILE;
if (int_outof(r_ptr, 100)) f4 &= ~(RF4_ARROW_1);
if (int_outof(r_ptr, 100)) f4 &= ~(RF4_ARROW_2);
if (int_outof(r_ptr, 100)) f4 &= ~(RF4_ARROW_3);
@@ -518,13 +518,13 @@ static void remove_bad_spells(int m_idx, u32b *f4p, u32b *f5p, u32b *f6p)
if (smart & (SM_IMM_FREE))
{
- if (int_outof(r_ptr, 100)) f5 &= ~(RF5_HOLD);
- if (int_outof(r_ptr, 100)) f5 &= ~(RF5_SLOW);
+ if (int_outof(r_ptr, 100)) f5 &= ~RF5_HOLD;
+ if (int_outof(r_ptr, 100)) f5 &= ~RF5_SLOW;
}
if (smart & (SM_IMM_MANA))
{
- if (int_outof(r_ptr, 100)) f5 &= ~(RF5_DRAIN_MANA);
+ if (int_outof(r_ptr, 100)) f5 &= ~RF5_DRAIN_MANA;
}
/* XXX XXX XXX No spells left? */
@@ -770,7 +770,7 @@ static int choose_attack_spell(int m_idx, byte spells[], byte num)
/* Stupid monsters choose randomly */
auto const r_ptr = m_ptr->race();
- if (r_ptr->flags2 & (RF2_STUPID))
+ if (r_ptr->flags2 & RF2_STUPID)
{
/* Pick at random */
return (spells[rand_int(num)]);
@@ -884,7 +884,7 @@ static void breath(int m_idx, int typ, int dam_hp, int rad)
auto const r_ptr = m_ptr->race();
/* Determine the radius of the blast */
- if (rad < 1) rad = (r_ptr->flags2 & (RF2_POWERFUL)) ? 3 : 2;
+ if (rad < 1) rad = (r_ptr->flags2 & RF2_POWERFUL) ? 3 : 2;
/* Target the player with a ball attack */
(void)project(m_idx, rad, p_ptr->py, p_ptr->px, dam_hp, typ, flg);
@@ -904,7 +904,7 @@ static void monst_breath_monst(int m_idx, int y, int x, int typ, int dam_hp, int
auto const r_ptr = m_ptr->race();
/* Determine the radius of the blast */
- if (rad < 1) rad = (r_ptr->flags2 & (RF2_POWERFUL)) ? 3 : 2;
+ if (rad < 1) rad = (r_ptr->flags2 & RF2_POWERFUL) ? 3 : 2;
(void)project(m_idx, rad, y, x, dam_hp, typ, flg);
}
@@ -1065,14 +1065,14 @@ static bool_ monst_spell_monst(int m_idx)
f6 = r_ptr->flags6;
/* Hack -- allow "desperate" spells */
- if ((r_ptr->flags2 & (RF2_SMART)) &&
+ if ((r_ptr->flags2 & RF2_SMART) &&
(m_ptr->hp < m_ptr->maxhp / 10) &&
(rand_int(100) < 50))
{
/* Require intelligent spells */
- f4 &= (RF4_INT_MASK);
- f5 &= (RF5_INT_MASK);
- f6 &= (RF6_INT_MASK);
+ f4 &= RF4_INT_MASK;
+ f5 &= RF5_INT_MASK;
+ f6 &= RF6_INT_MASK;
/* No spells left */
if ((!f4 && !f5 && !f6) && (monst_spell_monst_spell == -1)) return (FALSE);
@@ -1708,8 +1708,8 @@ static bool_ monst_spell_monst(int m_idx)
}
/* Attempt a saving throw */
- if ((tr_ptr->flags1 & (RF1_UNIQUE)) ||
- (tr_ptr->flags3 & (RF3_NO_CONF)) ||
+ if ((tr_ptr->flags1 & RF1_UNIQUE) ||
+ (tr_ptr->flags3 & RF3_NO_CONF) ||
(t_ptr->level > randint((rlev - 10) < 1 ? 1 : (rlev - 10)) + 10))
{
/* No obvious effect */
@@ -1746,8 +1746,8 @@ static bool_ monst_spell_monst(int m_idx)
}
/* Attempt a saving throw */
- if ((tr_ptr->flags1 & (RF1_UNIQUE)) ||
- (tr_ptr->flags3 & (RF3_NO_CONF)) ||
+ if ((tr_ptr->flags1 & RF1_UNIQUE) ||
+ (tr_ptr->flags3 & RF3_NO_CONF) ||
(t_ptr->level > randint((rlev - 10) < 1 ? 1 : (rlev - 10)) + 10))
{
/* No obvious effect */
@@ -2279,9 +2279,9 @@ static bool_ monst_spell_monst(int m_idx)
monster_msg("%^s teleports %s away.", m_name, t_name);
- if (tr_ptr->flags3 & (RF3_RES_TELE))
+ if (tr_ptr->flags3 & RF3_RES_TELE)
{
- if (tr_ptr->flags1 & (RF1_UNIQUE))
+ if (tr_ptr->flags1 & RF1_UNIQUE)
{
if (see_t)
{
@@ -2948,14 +2948,14 @@ static bool_ make_attack_spell(int m_idx)
if (no_inate) f4 = 0L;
/* Hack -- allow "desperate" spells */
- if ((r_ptr->flags2 & (RF2_SMART)) &&
+ if ((r_ptr->flags2 & RF2_SMART) &&
(m_ptr->hp < m_ptr->maxhp / 10) &&
(rand_int(100) < 50))
{
/* Require intelligent spells */
- f4 &= (RF4_INT_MASK);
- f5 &= (RF5_INT_MASK);
- f6 &= (RF6_INT_MASK);
+ f4 &= RF4_INT_MASK;
+ f5 &= RF5_INT_MASK;
+ f6 &= RF6_INT_MASK;
/* No spells left */
if (!f4 && !f5 && !f6) return (FALSE);
@@ -2968,27 +2968,27 @@ static bool_ make_attack_spell(int m_idx)
if (!f4 && !f5 && !f6) return (FALSE);
/* Check for a clean bolt shot */
- if ((f4&(RF4_BOLT_MASK) || f5 & (RF5_BOLT_MASK) ||
- f6&(RF6_BOLT_MASK)) &&
- !(r_ptr->flags2 & (RF2_STUPID)) &&
+ if ((f4&RF4_BOLT_MASK || f5 & RF5_BOLT_MASK ||
+ f6&RF6_BOLT_MASK) &&
+ !(r_ptr->flags2 & RF2_STUPID) &&
!clean_shot(m_ptr->fy, m_ptr->fx, y, x))
{
/* Remove spells that will only hurt friends */
- f4 &= ~(RF4_BOLT_MASK);
- f5 &= ~(RF5_BOLT_MASK);
- f6 &= ~(RF6_BOLT_MASK);
+ f4 &= ~RF4_BOLT_MASK;
+ f5 &= ~RF5_BOLT_MASK;
+ f6 &= ~RF6_BOLT_MASK;
}
/* Check for a possible summon */
- if ((f4 & (RF4_SUMMON_MASK) || f5 & (RF5_SUMMON_MASK) ||
- f6 & (RF6_SUMMON_MASK)) &&
- !(r_ptr->flags2 & (RF2_STUPID)) &&
+ if ((f4 & RF4_SUMMON_MASK || f5 & RF5_SUMMON_MASK ||
+ f6 & RF6_SUMMON_MASK) &&
+ !(r_ptr->flags2 & RF2_STUPID) &&
!(summon_possible(y, x)))
{
/* Remove summoning spells */
- f4 &= ~(RF4_SUMMON_MASK);
- f5 &= ~(RF5_SUMMON_MASK);
- f6 &= ~(RF6_SUMMON_MASK);
+ f4 &= ~RF4_SUMMON_MASK;
+ f5 &= ~RF5_SUMMON_MASK;
+ f6 &= ~RF6_SUMMON_MASK;
}
/* No spells left */
@@ -3034,7 +3034,7 @@ static bool_ make_attack_spell(int m_idx)
failrate = 25 - (rlev + 3) / 4;
/* Hack -- Stupid monsters will never fail (for jellies and such) */
- if (r_ptr->flags2 & (RF2_STUPID)) failrate = 0;
+ if (r_ptr->flags2 & RF2_STUPID) failrate = 0;
/* Check for spell failure (inate attacks never fail) */
if ((thrown_spell >= 128) && (rand_int(100) < failrate))
@@ -5032,8 +5032,8 @@ static bool_ get_moves(int m_idx, int *mm)
*/
if ((r_ptr->flags1 & RF1_FRIENDS) &&
(r_ptr->flags3 & RF3_ANIMAL) &&
- !((r_ptr->flags2 & (RF2_PASS_WALL)) ||
- (r_ptr->flags2 & (RF2_KILL_WALL))))
+ !((r_ptr->flags2 & RF2_PASS_WALL) ||
+ (r_ptr->flags2 & RF2_KILL_WALL)))
{
int i, room = 0;
@@ -5767,7 +5767,7 @@ static bool_ monst_attack_monst(int m_idx, int t_idx)
}
/* Aura elec */
- if ((tr_ptr->flags2 & (RF2_AURA_ELEC)) && !(r_ptr->flags3 & (RF3_IM_ELEC)))
+ if ((tr_ptr->flags2 & RF2_AURA_ELEC) && !(r_ptr->flags3 & RF3_IM_ELEC))
{
if (m_ptr->ml || t_ptr->ml)
{
@@ -6142,7 +6142,7 @@ static void process_monster(int m_idx, bool_ is_frien)
/* Paranoia... no friendly uniques outside wizard mode -- TY */
if ((m_ptr->status > MSTATUS_NEUTRAL) && (m_ptr->status < MSTATUS_COMPANION) && !(wizard) &&
- (r_ptr->flags1 & (RF1_UNIQUE)) && !(r_ptr->flags7 & RF7_PET))
+ (r_ptr->flags1 & RF1_UNIQUE) && !(r_ptr->flags7 & RF7_PET))
gets_angry = TRUE;
if (gets_angry)
@@ -6198,7 +6198,7 @@ static void process_monster(int m_idx, bool_ is_frien)
ox = m_ptr->fx;
/* Attempt to "multiply" if able and allowed */
- if ((r_ptr->flags4 & (RF4_MULTIPLY)) && (num_repro < MAX_REPRO))
+ if ((r_ptr->flags4 & RF4_MULTIPLY) && (num_repro < MAX_REPRO))
{
if (ai_multiply(m_idx)) return;
}
@@ -6409,28 +6409,28 @@ static void process_monster(int m_idx, bool_ is_frien)
/* Some monsters can fly */
- else if ((f_info[c_ptr->feat].flags1 & FF1_CAN_LEVITATE) && (r_ptr->flags7 & (RF7_CAN_FLY)))
+ else if ((f_info[c_ptr->feat].flags1 & FF1_CAN_LEVITATE) && (r_ptr->flags7 & RF7_CAN_FLY))
{
/* Pass through walls/doors/rubble */
do_move = TRUE;
}
/* Some monsters can fly */
- else if ((f_info[c_ptr->feat].flags1 & FF1_CAN_FLY) && (r_ptr->flags7 & (RF7_CAN_FLY)))
+ else if ((f_info[c_ptr->feat].flags1 & FF1_CAN_FLY) && (r_ptr->flags7 & RF7_CAN_FLY))
{
/* Pass through trees/... */
do_move = TRUE;
}
/* Monster moves through walls (and doors) */
- else if ((f_info[c_ptr->feat].flags1 & FF1_CAN_PASS) && (r_ptr->flags2 & (RF2_PASS_WALL)))
+ else if ((f_info[c_ptr->feat].flags1 & FF1_CAN_PASS) && (r_ptr->flags2 & RF2_PASS_WALL))
{
/* Pass through walls/doors/rubble */
do_move = TRUE;
}
/* Monster destroys walls (and doors) */
- else if ((f_info[c_ptr->feat].flags1 & FF1_CAN_PASS) && (r_ptr->flags2 & (RF2_KILL_WALL)))
+ else if ((f_info[c_ptr->feat].flags1 & FF1_CAN_PASS) && (r_ptr->flags2 & RF2_KILL_WALL))
{
/* Eat through walls/doors/rubble */
do_move = TRUE;
@@ -6451,7 +6451,7 @@ static void process_monster(int m_idx, bool_ is_frien)
}
/* Monster moves through walls (and doors) */
- else if ((f_info[c_ptr->feat].flags1 & FF1_CAN_PASS) && (r_ptr->flags2 & (RF2_PASS_WALL)))
+ else if ((f_info[c_ptr->feat].flags1 & FF1_CAN_PASS) && (r_ptr->flags2 & RF2_PASS_WALL))
{
/* Pass through walls/doors/rubble */
do_move = TRUE;
@@ -6475,7 +6475,7 @@ static void process_monster(int m_idx, bool_ is_frien)
/* Take a turn */
do_turn = TRUE;
- if ((r_ptr->flags2 & (RF2_OPEN_DOOR)) &&
+ if ((r_ptr->flags2 & RF2_OPEN_DOOR) &&
((is_friend(m_ptr) <= 0) || p_ptr->pet_open_doors))
{
/* Closed doors and secret doors */
@@ -6745,7 +6745,7 @@ static void process_monster(int m_idx, bool_ is_frien)
if (do_move && (r_ptr->flags1 & RF1_NEVER_MOVE))
{
/* Hack -- memorize lack of attacks */
- /* if (m_ptr->ml) r_ptr->r_flags1 |= (RF1_NEVER_MOVE); */
+ /* if (m_ptr->ml) r_ptr->r_flags1 |= RF1_NEVER_MOVE; */
/* Do not move */
do_move = FALSE;
@@ -6846,9 +6846,9 @@ static void process_monster(int m_idx, bool_ is_frien)
/* Take or Kill objects on the floor */
/* rr9: Pets will no longer pick up/destroy items */
- if ((((r_ptr->flags2 & (RF2_TAKE_ITEM)) &&
+ if ((((r_ptr->flags2 & RF2_TAKE_ITEM) &&
((is_friend(m_ptr) <= 0) || p_ptr->pet_pickup_items)) ||
- (r_ptr->flags2 & (RF2_KILL_ITEM))) &&
+ (r_ptr->flags2 & RF2_KILL_ITEM)) &&
(is_friend(m_ptr) <= 0))
{
u32b f1, f2, f3, f4, f5, esp;
@@ -6868,23 +6868,23 @@ static void process_monster(int m_idx, bool_ is_frien)
monster_desc(m_name, m_ptr, 0x04);
/* React to objects that hurt the monster */
- if (f5 & (TR5_KILL_DEMON)) flg3 |= (RF3_DEMON);
- if (f5 & (TR5_KILL_UNDEAD)) flg3 |= (RF3_UNDEAD);
- if (f1 & (TR1_SLAY_DRAGON)) flg3 |= (RF3_DRAGON);
- if (f1 & (TR1_SLAY_TROLL)) flg3 |= (RF3_TROLL);
- if (f1 & (TR1_SLAY_GIANT)) flg3 |= (RF3_GIANT);
- if (f1 & (TR1_SLAY_ORC)) flg3 |= (RF3_ORC);
- if (f1 & (TR1_SLAY_DEMON)) flg3 |= (RF3_DEMON);
- if (f1 & (TR1_SLAY_UNDEAD)) flg3 |= (RF3_UNDEAD);
- if (f1 & (TR1_SLAY_ANIMAL)) flg3 |= (RF3_ANIMAL);
- if (f1 & (TR1_SLAY_EVIL)) flg3 |= (RF3_EVIL);
+ if (f5 & (TR5_KILL_DEMON)) flg3 |= RF3_DEMON;
+ if (f5 & (TR5_KILL_UNDEAD)) flg3 |= RF3_UNDEAD;
+ if (f1 & (TR1_SLAY_DRAGON)) flg3 |= RF3_DRAGON;
+ if (f1 & (TR1_SLAY_TROLL)) flg3 |= RF3_TROLL;
+ if (f1 & (TR1_SLAY_GIANT)) flg3 |= RF3_GIANT;
+ if (f1 & (TR1_SLAY_ORC)) flg3 |= RF3_ORC;
+ if (f1 & (TR1_SLAY_DEMON)) flg3 |= RF3_DEMON;
+ if (f1 & (TR1_SLAY_UNDEAD)) flg3 |= RF3_UNDEAD;
+ if (f1 & (TR1_SLAY_ANIMAL)) flg3 |= RF3_ANIMAL;
+ if (f1 & (TR1_SLAY_EVIL)) flg3 |= RF3_EVIL;
/* The object cannot be picked up by the monster */
if (artifact_p(o_ptr) || (r_ptr->flags3 & flg3) ||
(o_ptr->art_name))
{
/* Only give a message for "take_item" */
- if (r_ptr->flags2 & (RF2_TAKE_ITEM))
+ if (r_ptr->flags2 & RF2_TAKE_ITEM)
{
/* Describe observable situations */
if (m_ptr->ml && player_has_los_bold(ny, nx))
@@ -6897,7 +6897,7 @@ static void process_monster(int m_idx, bool_ is_frien)
}
/* Pick up the item */
- else if (r_ptr->flags2 & (RF2_TAKE_ITEM))
+ else if (r_ptr->flags2 & RF2_TAKE_ITEM)
{
/* Describe observable situations */
if (player_has_los_bold(ny, nx))
diff --git a/src/monster1.cc b/src/monster1.cc
index b1570382..0c94fb5a 100644
--- a/src/monster1.cc
+++ b/src/monster1.cc
@@ -73,17 +73,17 @@ static void roff_aux(std::shared_ptr<monster_race const> r_ptr)
/* Extract a gender (if applicable) */
int msex = 0;
- if (flags1 & (RF1_FEMALE))
+ if (flags1 & RF1_FEMALE)
{
msex = 2;
}
- else if (flags1 & (RF1_MALE))
+ else if (flags1 & RF1_MALE)
{
msex = 1;
}
/* Treat uniques differently */
- if (flags1 & (RF1_UNIQUE))
+ if (flags1 & RF1_UNIQUE)
{
if (r_ptr->max_num == 0)
{
@@ -218,7 +218,7 @@ static void roff_aux(std::shared_ptr<monster_race const> r_ptr)
}
/* The code above includes "attack speed" */
- if (flags1 & (RF1_NEVER_MOVE))
+ if (flags1 & RF1_NEVER_MOVE)
{
/* Introduce */
if (old)
@@ -246,7 +246,7 @@ static void roff_aux(std::shared_ptr<monster_race const> r_ptr)
/* Describe experience if known */
{
/* Introduction */
- if (flags1 & (RF1_UNIQUE))
+ if (flags1 & RF1_UNIQUE)
{
text_out("Killing this");
}
@@ -256,21 +256,21 @@ static void roff_aux(std::shared_ptr<monster_race const> r_ptr)
}
/* Describe the "quality" */
- if (flags2 & (RF2_ELDRITCH_HORROR)) text_out_c(TERM_VIOLET, " sanity-blasting");
- if (flags3 & (RF3_ANIMAL)) text_out_c(TERM_VIOLET, " natural");
- if (flags3 & (RF3_EVIL)) text_out_c(TERM_VIOLET, " evil");
- if (flags3 & (RF3_GOOD)) text_out_c(TERM_VIOLET, " good");
- if (flags3 & (RF3_UNDEAD)) text_out_c(TERM_VIOLET, " undead");
+ if (flags2 & RF2_ELDRITCH_HORROR) text_out_c(TERM_VIOLET, " sanity-blasting");
+ if (flags3 & RF3_ANIMAL) text_out_c(TERM_VIOLET, " natural");
+ if (flags3 & RF3_EVIL) text_out_c(TERM_VIOLET, " evil");
+ if (flags3 & RF3_GOOD) text_out_c(TERM_VIOLET, " good");
+ if (flags3 & RF3_UNDEAD) text_out_c(TERM_VIOLET, " undead");
/* Describe the "race" */
- if (flags3 & (RF3_DRAGON)) text_out_c(TERM_VIOLET, " dragon");
- else if (flags3 & (RF3_DEMON)) text_out_c(TERM_VIOLET, " demon");
- else if (flags3 & (RF3_GIANT)) text_out_c(TERM_VIOLET, " giant");
- else if (flags3 & (RF3_TROLL)) text_out_c(TERM_VIOLET, " troll");
- else if (flags3 & (RF3_ORC)) text_out_c(TERM_VIOLET, " orc");
- else if (flags3 & (RF3_THUNDERLORD))text_out_c(TERM_VIOLET, " Thunderlord");
- else if (flags7 & (RF7_SPIDER)) text_out_c(TERM_VIOLET, " spider");
- else if (flags7 & (RF7_NAZGUL)) text_out_c(TERM_VIOLET, " Nazgul");
+ if (flags3 & RF3_DRAGON) text_out_c(TERM_VIOLET, " dragon");
+ else if (flags3 & RF3_DEMON) text_out_c(TERM_VIOLET, " demon");
+ else if (flags3 & RF3_GIANT) text_out_c(TERM_VIOLET, " giant");
+ else if (flags3 & RF3_TROLL) text_out_c(TERM_VIOLET, " troll");
+ else if (flags3 & RF3_ORC) text_out_c(TERM_VIOLET, " orc");
+ else if (flags3 & RF3_THUNDERLORD)text_out_c(TERM_VIOLET, " Thunderlord");
+ else if (flags7 & RF7_SPIDER) text_out_c(TERM_VIOLET, " spider");
+ else if (flags7 & RF7_NAZGUL) text_out_c(TERM_VIOLET, " Nazgul");
else text_out(" creature");
/* Group some variables */
@@ -311,26 +311,26 @@ static void roff_aux(std::shared_ptr<monster_race const> r_ptr)
}
}
- if ((flags2 & (RF2_AURA_FIRE)) && (flags2 & (RF2_AURA_ELEC)))
+ if ((flags2 & RF2_AURA_FIRE) && (flags2 & RF2_AURA_ELEC))
{
text_out(format("%^s is surrounded by ", wd_he[msex]));
text_out_c(TERM_VIOLET, "flames and electricity");
text_out(". ");
}
- else if (flags2 & (RF2_AURA_FIRE))
+ else if (flags2 & RF2_AURA_FIRE)
{
text_out(format("%^s is surrounded by ", wd_he[msex]));
text_out_c(TERM_ORANGE, "flames");
text_out(". ");
}
- else if (flags2 & (RF2_AURA_ELEC))
+ else if (flags2 & RF2_AURA_ELEC)
{
text_out(format("%^s is surrounded by ", wd_he[msex]));
text_out_c(TERM_L_BLUE, "electricity");
text_out(". ");
}
- if (flags2 & (RF2_REFLECTING))
+ if (flags2 & RF2_REFLECTING)
{
text_out(format("%^s ", wd_he[msex]));
text_out_c(TERM_L_UMBER, "reflects");
@@ -339,14 +339,14 @@ static void roff_aux(std::shared_ptr<monster_race const> r_ptr)
/* Describe escorts */
- if ((flags1 & (RF1_ESCORT)) || (flags1 & (RF1_ESCORTS)))
+ if ((flags1 & RF1_ESCORT) || (flags1 & RF1_ESCORTS))
{
text_out(format("%^s usually appears with escorts. ",
wd_he[msex]));
}
/* Describe friends */
- else if ((flags1 & (RF1_FRIEND)) || (flags1 & (RF1_FRIENDS)))
+ else if ((flags1 & RF1_FRIEND) || (flags1 & RF1_FRIENDS))
{
text_out(format("%^s usually appears in groups. ",
wd_he[msex]));
@@ -355,8 +355,8 @@ static void roff_aux(std::shared_ptr<monster_race const> r_ptr)
/* Collect inate attacks */
vn = 0;
- if (flags4 & (RF4_SHRIEK)) vp[vn++] = "shriek for help";
- if (flags4 & (RF4_ROCKET)) vp[vn++] = "shoot a rocket";
+ if (flags4 & RF4_SHRIEK) vp[vn++] = "shriek for help";
+ if (flags4 & RF4_ROCKET) vp[vn++] = "shoot a rocket";
if (flags4 & (RF4_ARROW_1)) vp[vn++] = "fire an arrow";
if (flags4 & (RF4_ARROW_2)) vp[vn++] = "fire arrows";
if (flags4 & (RF4_ARROW_3)) vp[vn++] = "fire a missile";
@@ -387,28 +387,28 @@ static void roff_aux(std::shared_ptr<monster_race const> r_ptr)
/* Collect breaths */
vn = 0;
- if (flags4 & (RF4_BR_ACID)) vp[vn++] = "acid";
- if (flags4 & (RF4_BR_ELEC)) vp[vn++] = "lightning";
- if (flags4 & (RF4_BR_FIRE)) vp[vn++] = "fire";
- if (flags4 & (RF4_BR_COLD)) vp[vn++] = "frost";
- if (flags4 & (RF4_BR_POIS)) vp[vn++] = "poison";
- if (flags4 & (RF4_BR_NETH)) vp[vn++] = "nether";
- if (flags4 & (RF4_BR_LITE)) vp[vn++] = "light";
- if (flags4 & (RF4_BR_DARK)) vp[vn++] = "darkness";
- if (flags4 & (RF4_BR_CONF)) vp[vn++] = "confusion";
- if (flags4 & (RF4_BR_SOUN)) vp[vn++] = "sound";
- if (flags4 & (RF4_BR_CHAO)) vp[vn++] = "chaos";
- if (flags4 & (RF4_BR_DISE)) vp[vn++] = "disenchantment";
- if (flags4 & (RF4_BR_NEXU)) vp[vn++] = "nexus";
- if (flags4 & (RF4_BR_TIME)) vp[vn++] = "time";
- if (flags4 & (RF4_BR_INER)) vp[vn++] = "inertia";
- if (flags4 & (RF4_BR_GRAV)) vp[vn++] = "gravity";
- if (flags4 & (RF4_BR_SHAR)) vp[vn++] = "shards";
- if (flags4 & (RF4_BR_PLAS)) vp[vn++] = "plasma";
- if (flags4 & (RF4_BR_WALL)) vp[vn++] = "force";
- if (flags4 & (RF4_BR_MANA)) vp[vn++] = "mana";
- if (flags4 & (RF4_BR_NUKE)) vp[vn++] = "toxic waste";
- if (flags4 & (RF4_BR_DISI)) vp[vn++] = "disintegration";
+ if (flags4 & RF4_BR_ACID) vp[vn++] = "acid";
+ if (flags4 & RF4_BR_ELEC) vp[vn++] = "lightning";
+ if (flags4 & RF4_BR_FIRE) vp[vn++] = "fire";
+ if (flags4 & RF4_BR_COLD) vp[vn++] = "frost";
+ if (flags4 & RF4_BR_POIS) vp[vn++] = "poison";
+ if (flags4 & RF4_BR_NETH) vp[vn++] = "nether";
+ if (flags4 & RF4_BR_LITE) vp[vn++] = "light";
+ if (flags4 & RF4_BR_DARK) vp[vn++] = "darkness";
+ if (flags4 & RF4_BR_CONF) vp[vn++] = "confusion";
+ if (flags4 & RF4_BR_SOUN) vp[vn++] = "sound";
+ if (flags4 & RF4_BR_CHAO) vp[vn++] = "chaos";
+ if (flags4 & RF4_BR_DISE) vp[vn++] = "disenchantment";
+ if (flags4 & RF4_BR_NEXU) vp[vn++] = "nexus";
+ if (flags4 & RF4_BR_TIME) vp[vn++] = "time";
+ if (flags4 & RF4_BR_INER) vp[vn++] = "inertia";
+ if (flags4 & RF4_BR_GRAV) vp[vn++] = "gravity";
+ if (flags4 & RF4_BR_SHAR) vp[vn++] = "shards";
+ if (flags4 & RF4_BR_PLAS) vp[vn++] = "plasma";
+ if (flags4 & RF4_BR_WALL) vp[vn++] = "force";
+ if (flags4 & RF4_BR_MANA) vp[vn++] = "mana";
+ if (flags4 & RF4_BR_NUKE) vp[vn++] = "toxic waste";
+ if (flags4 & RF4_BR_DISI) vp[vn++] = "disintegration";
/* Describe breaths */
if (vn)
@@ -435,73 +435,73 @@ static void roff_aux(std::shared_ptr<monster_race const> r_ptr)
/* Collect spells */
vn = 0;
- if (flags5 & (RF5_BA_ACID)) vp[vn++] = "produce acid balls";
- if (flags5 & (RF5_BA_ELEC)) vp[vn++] = "produce lightning balls";
- if (flags5 & (RF5_BA_FIRE)) vp[vn++] = "produce fire balls";
- if (flags5 & (RF5_BA_COLD)) vp[vn++] = "produce frost balls";
- if (flags5 & (RF5_BA_POIS)) vp[vn++] = "produce poison balls";
- if (flags5 & (RF5_BA_NETH)) vp[vn++] = "produce nether balls";
- if (flags5 & (RF5_BA_WATE)) vp[vn++] = "produce water balls";
- if (flags4 & (RF4_BA_NUKE)) vp[vn++] = "produce balls of radiation";
- if (flags5 & (RF5_BA_MANA)) vp[vn++] = "invoke mana storms";
- if (flags5 & (RF5_BA_DARK)) vp[vn++] = "invoke darkness storms";
- if (flags4 & (RF4_BA_CHAO)) vp[vn++] = "invoke raw chaos";
- if (flags6 & (RF6_HAND_DOOM)) vp[vn++] = "invoke the Hand of Doom";
- if (flags5 & (RF5_DRAIN_MANA)) vp[vn++] = "drain mana";
- if (flags5 & (RF5_MIND_BLAST)) vp[vn++] = "cause mind blasting";
- if (flags5 & (RF5_BRAIN_SMASH)) vp[vn++] = "cause brain smashing";
+ if (flags5 & RF5_BA_ACID) vp[vn++] = "produce acid balls";
+ if (flags5 & RF5_BA_ELEC) vp[vn++] = "produce lightning balls";
+ if (flags5 & RF5_BA_FIRE) vp[vn++] = "produce fire balls";
+ if (flags5 & RF5_BA_COLD) vp[vn++] = "produce frost balls";
+ if (flags5 & RF5_BA_POIS) vp[vn++] = "produce poison balls";
+ if (flags5 & RF5_BA_NETH) vp[vn++] = "produce nether balls";
+ if (flags5 & RF5_BA_WATE) vp[vn++] = "produce water balls";
+ if (flags4 & RF4_BA_NUKE) vp[vn++] = "produce balls of radiation";
+ if (flags5 & RF5_BA_MANA) vp[vn++] = "invoke mana storms";
+ if (flags5 & RF5_BA_DARK) vp[vn++] = "invoke darkness storms";
+ if (flags4 & RF4_BA_CHAO) vp[vn++] = "invoke raw chaos";
+ if (flags6 & RF6_HAND_DOOM) vp[vn++] = "invoke the Hand of Doom";
+ if (flags5 & RF5_DRAIN_MANA) vp[vn++] = "drain mana";
+ if (flags5 & RF5_MIND_BLAST) vp[vn++] = "cause mind blasting";
+ if (flags5 & RF5_BRAIN_SMASH) vp[vn++] = "cause brain smashing";
if (flags5 & (RF5_CAUSE_1)) vp[vn++] = "cause light wounds and cursing";
if (flags5 & (RF5_CAUSE_2)) vp[vn++] = "cause serious wounds and cursing";
if (flags5 & (RF5_CAUSE_3)) vp[vn++] = "cause critical wounds and cursing";
if (flags5 & (RF5_CAUSE_4)) vp[vn++] = "cause mortal wounds";
- if (flags5 & (RF5_BO_ACID)) vp[vn++] = "produce acid bolts";
- if (flags5 & (RF5_BO_ELEC)) vp[vn++] = "produce lightning bolts";
- if (flags5 & (RF5_BO_FIRE)) vp[vn++] = "produce fire bolts";
- if (flags5 & (RF5_BO_COLD)) vp[vn++] = "produce frost bolts";
- if (flags5 & (RF5_BO_POIS)) vp[vn++] = "produce poison bolts";
- if (flags5 & (RF5_BO_NETH)) vp[vn++] = "produce nether bolts";
- if (flags5 & (RF5_BO_WATE)) vp[vn++] = "produce water bolts";
- if (flags5 & (RF5_BO_MANA)) vp[vn++] = "produce mana bolts";
- if (flags5 & (RF5_BO_PLAS)) vp[vn++] = "produce plasma bolts";
- if (flags5 & (RF5_BO_ICEE)) vp[vn++] = "produce ice bolts";
- if (flags5 & (RF5_MISSILE)) vp[vn++] = "produce magic missiles";
- if (flags5 & (RF5_SCARE)) vp[vn++] = "terrify";
- if (flags5 & (RF5_BLIND)) vp[vn++] = "blind";
- if (flags5 & (RF5_CONF)) vp[vn++] = "confuse";
- if (flags5 & (RF5_SLOW)) vp[vn++] = "slow";
- if (flags5 & (RF5_HOLD)) vp[vn++] = "paralyze";
- if (flags6 & (RF6_HASTE)) vp[vn++] = "haste-self";
- if (flags6 & (RF6_HEAL)) vp[vn++] = "heal-self";
- if (flags6 & (RF6_BLINK)) vp[vn++] = "blink-self";
- if (flags6 & (RF6_TPORT)) vp[vn++] = "teleport-self";
- if (flags6 & (RF6_S_BUG)) vp[vn++] = "summon software bugs";
- if (flags6 & (RF6_S_RNG)) vp[vn++] = "summon RNG";
- if (flags6 & (RF6_TELE_TO)) vp[vn++] = "teleport to";
- if (flags6 & (RF6_TELE_AWAY)) vp[vn++] = "teleport away";
- if (flags6 & (RF6_TELE_LEVEL)) vp[vn++] = "teleport level";
- if (flags6 & (RF6_S_THUNDERLORD)) vp[vn++] = "summon a Thunderlord";
- if (flags6 & (RF6_DARKNESS)) vp[vn++] = "create darkness";
- if (flags6 & (RF6_TRAPS)) vp[vn++] = "create traps";
- if (flags6 & (RF6_FORGET)) vp[vn++] = "cause amnesia";
- if (flags6 & (RF6_RAISE_DEAD)) vp[vn++] = "raise dead";
- if (flags6 & (RF6_S_MONSTER)) vp[vn++] = "summon a monster";
- if (flags6 & (RF6_S_MONSTERS)) vp[vn++] = "summon monsters";
- if (flags6 & (RF6_S_KIN)) vp[vn++] = "summon aid";
- if (flags6 & (RF6_S_ANT)) vp[vn++] = "summon ants";
- if (flags6 & (RF6_S_SPIDER)) vp[vn++] = "summon spiders";
- if (flags6 & (RF6_S_HOUND)) vp[vn++] = "summon hounds";
- if (flags6 & (RF6_S_HYDRA)) vp[vn++] = "summon hydras";
- if (flags6 & (RF6_S_ANGEL)) vp[vn++] = "summon an angel";
- if (flags6 & (RF6_S_DEMON)) vp[vn++] = "summon a demon";
- if (flags6 & (RF6_S_UNDEAD)) vp[vn++] = "summon an undead";
- if (flags6 & (RF6_S_DRAGON)) vp[vn++] = "summon a dragon";
- if (flags4 & (RF4_S_ANIMAL)) vp[vn++] = "summon animal";
- if (flags6 & (RF6_S_ANIMALS)) vp[vn++] = "summon animals";
- if (flags6 & (RF6_S_HI_UNDEAD)) vp[vn++] = "summon Greater Undead";
- if (flags6 & (RF6_S_HI_DRAGON)) vp[vn++] = "summon Ancient Dragons";
- if (flags6 & (RF6_S_HI_DEMON)) vp[vn++] = "summon Greater Demons";
- if (flags6 & (RF6_S_WRAITH)) vp[vn++] = "summon Ringwraith";
- if (flags6 & (RF6_S_UNIQUE)) vp[vn++] = "summon Unique Monsters";
+ if (flags5 & RF5_BO_ACID) vp[vn++] = "produce acid bolts";
+ if (flags5 & RF5_BO_ELEC) vp[vn++] = "produce lightning bolts";
+ if (flags5 & RF5_BO_FIRE) vp[vn++] = "produce fire bolts";
+ if (flags5 & RF5_BO_COLD) vp[vn++] = "produce frost bolts";
+ if (flags5 & RF5_BO_POIS) vp[vn++] = "produce poison bolts";
+ if (flags5 & RF5_BO_NETH) vp[vn++] = "produce nether bolts";
+ if (flags5 & RF5_BO_WATE) vp[vn++] = "produce water bolts";
+ if (flags5 & RF5_BO_MANA) vp[vn++] = "produce mana bolts";
+ if (flags5 & RF5_BO_PLAS) vp[vn++] = "produce plasma bolts";
+ if (flags5 & RF5_BO_ICEE) vp[vn++] = "produce ice bolts";
+ if (flags5 & RF5_MISSILE) vp[vn++] = "produce magic missiles";
+ if (flags5 & RF5_SCARE) vp[vn++] = "terrify";
+ if (flags5 & RF5_BLIND) vp[vn++] = "blind";
+ if (flags5 & RF5_CONF) vp[vn++] = "confuse";
+ if (flags5 & RF5_SLOW) vp[vn++] = "slow";
+ if (flags5 & RF5_HOLD) vp[vn++] = "paralyze";
+ if (flags6 & RF6_HASTE) vp[vn++] = "haste-self";
+ if (flags6 & RF6_HEAL) vp[vn++] = "heal-self";
+ if (flags6 & RF6_BLINK) vp[vn++] = "blink-self";
+ if (flags6 & RF6_TPORT) vp[vn++] = "teleport-self";
+ if (flags6 & RF6_S_BUG) vp[vn++] = "summon software bugs";
+ if (flags6 & RF6_S_RNG) vp[vn++] = "summon RNG";
+ if (flags6 & RF6_TELE_TO) vp[vn++] = "teleport to";
+ if (flags6 & RF6_TELE_AWAY) vp[vn++] = "teleport away";
+ if (flags6 & RF6_TELE_LEVEL) vp[vn++] = "teleport level";
+ if (flags6 & RF6_S_THUNDERLORD) vp[vn++] = "summon a Thunderlord";
+ if (flags6 & RF6_DARKNESS) vp[vn++] = "create darkness";
+ if (flags6 & RF6_TRAPS) vp[vn++] = "create traps";
+ if (flags6 & RF6_FORGET) vp[vn++] = "cause amnesia";
+ if (flags6 & RF6_RAISE_DEAD) vp[vn++] = "raise dead";
+ if (flags6 & RF6_S_MONSTER) vp[vn++] = "summon a monster";
+ if (flags6 & RF6_S_MONSTERS) vp[vn++] = "summon monsters";
+ if (flags6 & RF6_S_KIN) vp[vn++] = "summon aid";
+ if (flags6 & RF6_S_ANT) vp[vn++] = "summon ants";
+ if (flags6 & RF6_S_SPIDER) vp[vn++] = "summon spiders";
+ if (flags6 & RF6_S_HOUND) vp[vn++] = "summon hounds";
+ if (flags6 & RF6_S_HYDRA) vp[vn++] = "summon hydras";
+ if (flags6 & RF6_S_ANGEL) vp[vn++] = "summon an angel";
+ if (flags6 & RF6_S_DEMON) vp[vn++] = "summon a demon";
+ if (flags6 & RF6_S_UNDEAD) vp[vn++] = "summon an undead";
+ if (flags6 & RF6_S_DRAGON) vp[vn++] = "summon a dragon";
+ if (flags4 & RF4_S_ANIMAL) vp[vn++] = "summon animal";
+ if (flags6 & RF6_S_ANIMALS) vp[vn++] = "summon animals";
+ if (flags6 & RF6_S_HI_UNDEAD) vp[vn++] = "summon Greater Undead";
+ if (flags6 & RF6_S_HI_DRAGON) vp[vn++] = "summon Ancient Dragons";
+ if (flags6 & RF6_S_HI_DEMON) vp[vn++] = "summon Greater Demons";
+ if (flags6 & RF6_S_WRAITH) vp[vn++] = "summon Ringwraith";
+ if (flags6 & RF6_S_UNIQUE) vp[vn++] = "summon Unique Monsters";
/* Describe spells */
if (vn)
@@ -523,7 +523,7 @@ static void roff_aux(std::shared_ptr<monster_race const> r_ptr)
text_out(" magical, casting spells");
/* Adverb */
- if (flags2 & (RF2_SMART)) text_out_c(TERM_YELLOW, " intelligently");
+ if (flags2 & RF2_SMART) text_out_c(TERM_YELLOW, " intelligently");
/* Scan */
for (n = 0; n < vn; n++)
@@ -563,7 +563,7 @@ static void roff_aux(std::shared_ptr<monster_race const> r_ptr)
text_out_c(TERM_L_GREEN, format("%d", r_ptr->ac));
/* Maximized hitpoints */
- if (flags1 & (RF1_FORCE_MAXHP))
+ if (flags1 & RF1_FORCE_MAXHP)
{
text_out(" and a life rating of ");
text_out_c(TERM_L_GREEN, format("%d", r_ptr->hdice * r_ptr->hside));
@@ -583,15 +583,15 @@ static void roff_aux(std::shared_ptr<monster_race const> r_ptr)
/* Collect special abilities. */
vn = 0;
- if (flags2 & (RF2_OPEN_DOOR)) vp[vn++] = "open doors";
- if (flags2 & (RF2_BASH_DOOR)) vp[vn++] = "bash down doors";
- if (flags2 & (RF2_PASS_WALL)) vp[vn++] = "pass through walls";
- if (flags2 & (RF2_KILL_WALL)) vp[vn++] = "bore through walls";
- if (flags2 & (RF2_MOVE_BODY)) vp[vn++] = "push past weaker monsters";
- if (flags2 & (RF2_KILL_BODY)) vp[vn++] = "destroy weaker monsters";
- if (flags2 & (RF2_TAKE_ITEM)) vp[vn++] = "pick up objects";
- if (flags2 & (RF2_KILL_ITEM)) vp[vn++] = "destroy objects";
- if (flags9 & (RF9_HAS_LITE)) vp[vn++] = "illuminate the dungeon";
+ if (flags2 & RF2_OPEN_DOOR) vp[vn++] = "open doors";
+ if (flags2 & RF2_BASH_DOOR) vp[vn++] = "bash down doors";
+ if (flags2 & RF2_PASS_WALL) vp[vn++] = "pass through walls";
+ if (flags2 & RF2_KILL_WALL) vp[vn++] = "bore through walls";
+ if (flags2 & RF2_MOVE_BODY) vp[vn++] = "push past weaker monsters";
+ if (flags2 & RF2_KILL_BODY) vp[vn++] = "destroy weaker monsters";
+ if (flags2 & RF2_TAKE_ITEM) vp[vn++] = "pick up objects";
+ if (flags2 & RF2_KILL_ITEM) vp[vn++] = "destroy objects";
+ if (flags9 & RF9_HAS_LITE) vp[vn++] = "illuminate the dungeon";
/* Describe special abilities. */
if (vn)
@@ -617,31 +617,31 @@ static void roff_aux(std::shared_ptr<monster_race const> r_ptr)
/* Describe special abilities. */
- if (flags2 & (RF2_INVISIBLE))
+ if (flags2 & RF2_INVISIBLE)
{
text_out_c(TERM_GREEN, format("%^s is invisible. ", wd_he[msex]));
}
- if (flags2 & (RF2_COLD_BLOOD))
+ if (flags2 & RF2_COLD_BLOOD)
{
text_out(format("%^s is cold blooded. ", wd_he[msex]));
}
- if (flags2 & (RF2_EMPTY_MIND))
+ if (flags2 & RF2_EMPTY_MIND)
{
text_out(format("%^s is not detected by telepathy. ", wd_he[msex]));
}
- if (flags2 & (RF2_WEIRD_MIND))
+ if (flags2 & RF2_WEIRD_MIND)
{
text_out(format("%^s is rarely detected by telepathy. ", wd_he[msex]));
}
- if (flags4 & (RF4_MULTIPLY))
+ if (flags4 & RF4_MULTIPLY)
{
text_out_c(TERM_L_UMBER, format("%^s breeds explosively. ", wd_he[msex]));
}
- if (flags2 & (RF2_REGENERATE))
+ if (flags2 & RF2_REGENERATE)
{
text_out_c(TERM_L_WHITE, format("%^s regenerates quickly. ", wd_he[msex]));
}
- if (r_ptr->flags7 & (RF7_MORTAL))
+ if (r_ptr->flags7 & RF7_MORTAL)
{
text_out_c(TERM_RED, format("%^s is a mortal being. ", wd_he[msex]));
}
@@ -653,37 +653,37 @@ static void roff_aux(std::shared_ptr<monster_race const> r_ptr)
/* Collect susceptibilities */
vn = 0;
- if (flags3 & (RF3_HURT_ROCK))
+ if (flags3 & RF3_HURT_ROCK)
{
vp[vn++] = "rock remover";
color[vn - 1] = TERM_UMBER;
}
- if (flags3 & (RF3_HURT_LITE))
+ if (flags3 & RF3_HURT_LITE)
{
vp[vn++] = "bright light";
color[vn - 1] = TERM_YELLOW;
}
- if (flags3 & (RF3_SUSCEP_FIRE))
+ if (flags3 & RF3_SUSCEP_FIRE)
{
vp[vn++] = "fire";
color[vn - 1] = TERM_RED;
}
- if (flags3 & (RF3_SUSCEP_COLD))
+ if (flags3 & RF3_SUSCEP_COLD)
{
vp[vn++] = "cold";
color[vn - 1] = TERM_L_WHITE;
}
- if (flags9 & (RF9_SUSCEP_ACID))
+ if (flags9 & RF9_SUSCEP_ACID)
{
vp[vn++] = "acid";
color[vn - 1] = TERM_GREEN;
}
- if (flags9 & (RF9_SUSCEP_ELEC))
+ if (flags9 & RF9_SUSCEP_ELEC)
{
vp[vn++] = "lightning";
color[vn - 1] = TERM_L_BLUE;
}
- if (flags9 & (RF9_SUSCEP_POIS))
+ if (flags9 & RF9_SUSCEP_POIS)
{
vp[vn++] = "poison";
color[vn - 1] = TERM_L_GREEN;
@@ -714,27 +714,27 @@ static void roff_aux(std::shared_ptr<monster_race const> r_ptr)
/* Collect immunities */
vn = 0;
- if (flags3 & (RF3_IM_ACID))
+ if (flags3 & RF3_IM_ACID)
{
vp[vn++] = "acid";
color[vn - 1] = TERM_L_GREEN;
}
- if (flags3 & (RF3_IM_ELEC))
+ if (flags3 & RF3_IM_ELEC)
{
vp[vn++] = "lightning";
color[vn - 1] = TERM_L_BLUE;
}
- if (flags3 & (RF3_IM_FIRE))
+ if (flags3 & RF3_IM_FIRE)
{
vp[vn++] = "fire";
color[vn - 1] = TERM_L_RED;
}
- if (flags3 & (RF3_IM_COLD))
+ if (flags3 & RF3_IM_COLD)
{
vp[vn++] = "cold";
color[vn - 1] = TERM_L_BLUE;
}
- if (flags3 & (RF3_IM_POIS))
+ if (flags3 & RF3_IM_POIS)
{
vp[vn++] = "poison";
color[vn - 1] = TERM_L_GREEN;
@@ -765,12 +765,12 @@ static void roff_aux(std::shared_ptr<monster_race const> r_ptr)
/* Collect resistances */
vn = 0;
- if (flags3 & (RF3_RES_NETH)) vp[vn++] = "nether";
- if (flags3 & (RF3_RES_WATE)) vp[vn++] = "water";
- if (flags3 & (RF3_RES_PLAS)) vp[vn++] = "plasma";
- if (flags3 & (RF3_RES_NEXU)) vp[vn++] = "nexus";
- if (flags3 & (RF3_RES_DISE)) vp[vn++] = "disenchantment";
- if (flags3 & (RF3_RES_TELE)) vp[vn++] = "teleportation";
+ if (flags3 & RF3_RES_NETH) vp[vn++] = "nether";
+ if (flags3 & RF3_RES_WATE) vp[vn++] = "water";
+ if (flags3 & RF3_RES_PLAS) vp[vn++] = "plasma";
+ if (flags3 & RF3_RES_NEXU) vp[vn++] = "nexus";
+ if (flags3 & RF3_RES_DISE) vp[vn++] = "disenchantment";
+ if (flags3 & RF3_RES_TELE) vp[vn++] = "teleportation";
/* Describe resistances */
if (vn)
@@ -797,10 +797,10 @@ static void roff_aux(std::shared_ptr<monster_race const> r_ptr)
/* Collect non-effects */
vn = 0;
- if (flags3 & (RF3_NO_STUN)) vp[vn++] = "stunned";
- if (flags3 & (RF3_NO_FEAR)) vp[vn++] = "frightened";
- if (flags3 & (RF3_NO_CONF)) vp[vn++] = "confused";
- if (flags3 & (RF3_NO_SLEEP)) vp[vn++] = "slept";
+ if (flags3 & RF3_NO_STUN) vp[vn++] = "stunned";
+ if (flags3 & RF3_NO_FEAR) vp[vn++] = "frightened";
+ if (flags3 & RF3_NO_CONF) vp[vn++] = "confused";
+ if (flags3 & RF3_NO_SLEEP) vp[vn++] = "slept";
/* Describe non-effects */
if (vn)
@@ -924,13 +924,13 @@ static void roff_aux(std::shared_ptr<monster_race const> r_ptr)
/* Great */
- if (flags1 & (RF1_DROP_GREAT))
+ if (flags1 & RF1_DROP_GREAT)
{
p = " exceptional";
}
/* Good (no "n" needed) */
- else if (flags1 & (RF1_DROP_GOOD))
+ else if (flags1 & RF1_DROP_GOOD)
{
p = " good";
sin = FALSE;
@@ -1240,7 +1240,7 @@ static void roff_aux(std::shared_ptr<monster_race const> r_ptr)
}
/* Notice lack of attacks */
- else if (flags1 & (RF1_NEVER_BLOW))
+ else if (flags1 & RF1_NEVER_BLOW)
{
text_out(format("%^s has no physical attacks. ", wd_he[msex]));
}
@@ -1272,7 +1272,7 @@ static void roff_name(int r_idx, int ego)
const byte a2 = r_ptr->x_attr;
/* A title (use "The" for non-uniques) */
- if (!(r_ptr->flags1 & (RF1_UNIQUE)))
+ if (!(r_ptr->flags1 & RF1_UNIQUE))
{
Term_addstr( -1, TERM_WHITE, "The ");
}
diff --git a/src/monster2.cc b/src/monster2.cc
index 2beb671f..1b942a04 100644
--- a/src/monster2.cc
+++ b/src/monster2.cc
@@ -452,11 +452,11 @@ void delete_monster_idx(int i)
r_ptr->on_saved = FALSE;
/* Hack -- count the number of "reproducers" */
- if (r_ptr->flags4 & (RF4_MULTIPLY)) num_repro--;
+ if (r_ptr->flags4 & RF4_MULTIPLY) num_repro--;
/* XXX XXX XXX remove monster light source */
bool_ had_lite = FALSE;
- if (r_ptr->flags9 & (RF9_HAS_LITE)) had_lite = TRUE;
+ if (r_ptr->flags9 & RF9_HAS_LITE) had_lite = TRUE;
/* Hack -- remove target monster */
@@ -682,7 +682,7 @@ void compact_monsters(int size)
if ((m_ptr->mflag & MFLAG_QUEST) && (cnt < 1000)) chance = 100;
/* Try not to compact Unique Monsters */
- if (r_ptr->flags1 & (RF1_UNIQUE)) chance = 99;
+ if (r_ptr->flags1 & RF1_UNIQUE) chance = 99;
/* All monsters get a saving throw */
if (rand_int(100) < chance) continue;
@@ -1054,20 +1054,20 @@ s16b get_mon_num(int level)
r_ptr = &r_info[r_idx];
/* Hack -- "unique" monsters must be "unique" */
- if ((r_ptr->flags1 & (RF1_UNIQUE)) &&
+ if ((r_ptr->flags1 & RF1_UNIQUE) &&
(r_ptr->cur_num >= r_ptr->max_num))
{
continue;
}
/* Depth Monsters never appear out of depth */
- if ((r_ptr->flags1 & (RF1_FORCE_DEPTH)) && (r_ptr->level > dun_level))
+ if ((r_ptr->flags1 & RF1_FORCE_DEPTH) && (r_ptr->level > dun_level))
{
continue;
}
/* Depth Monsters never appear out of their depth */
- if ((r_ptr->flags9 & (RF9_ONLY_DEPTH)) && (r_ptr->level != dun_level))
+ if ((r_ptr->flags9 & RF9_ONLY_DEPTH) && (r_ptr->level != dun_level))
{
continue;
}
@@ -1278,8 +1278,8 @@ void monster_desc(char *desc, monster_type *m_ptr, int mode)
int kind = 0x00;
/* Extract the gender (if applicable) */
- if (r_ptr->flags1 & (RF1_FEMALE)) kind = 0x20;
- else if (r_ptr->flags1 & (RF1_MALE)) kind = 0x10;
+ if (r_ptr->flags1 & RF1_FEMALE) kind = 0x20;
+ else if (r_ptr->flags1 & RF1_MALE) kind = 0x10;
/* Ignore the gender (if desired) */
if (!m_ptr || !pron) kind = 0x00;
@@ -1379,8 +1379,8 @@ void monster_desc(char *desc, monster_type *m_ptr, int mode)
else if ((mode & 0x02) && (mode & 0x01))
{
/* The monster is visible, so use its gender */
- if (r_ptr->flags1 & (RF1_FEMALE)) strcpy(desc, "herself");
- else if (r_ptr->flags1 & (RF1_MALE)) strcpy(desc, "himself");
+ if (r_ptr->flags1 & RF1_FEMALE) strcpy(desc, "herself");
+ else if (r_ptr->flags1 & RF1_MALE) strcpy(desc, "himself");
else strcpy(desc, "itself");
}
@@ -1389,7 +1389,7 @@ void monster_desc(char *desc, monster_type *m_ptr, int mode)
else
{
/* It could be a Unique */
- if ((r_ptr->flags1 & (RF1_UNIQUE)) && !(p_ptr->image))
+ if ((r_ptr->flags1 & RF1_UNIQUE) && !(p_ptr->image))
{
/* Start with the name (thus nominative and objective) */
(void)strcpy(desc, name);
@@ -1761,13 +1761,13 @@ void update_mon(int m_idx, bool_ full)
if (can_esp)
{
/* Empty mind, no telepathy */
- if (r_ptr->flags2 & (RF2_EMPTY_MIND))
+ if (r_ptr->flags2 & RF2_EMPTY_MIND)
{
/* No telepathy */
}
/* Weird mind, occasional telepathy */
- else if (r_ptr->flags2 & (RF2_WEIRD_MIND))
+ else if (r_ptr->flags2 & RF2_WEIRD_MIND)
{
if (rand_int(100) < 10)
{
@@ -2146,7 +2146,7 @@ s16b place_monster_one(int y, int x, int r_idx, int ego, bool_ slp, int status)
}
/* Hack -- "unique" monsters must be "unique" */
- if ((r_ptr->flags1 & (RF1_UNIQUE)) && (r_ptr->max_num == -1) && (!m_allow_special[r_idx]))
+ if ((r_ptr->flags1 & RF1_UNIQUE) && (r_ptr->max_num == -1) && (!m_allow_special[r_idx]))
{
/* Cannot create */
if (wizard) cmsg_format(TERM_L_RED, "WARNING: Refused monster %d: unique not unique", r_idx);
@@ -2161,7 +2161,7 @@ s16b place_monster_one(int y, int x, int r_idx, int ego, bool_ slp, int status)
}
/* Hack -- "unique" monsters must be "unique" */
- if ((r_ptr->flags1 & (RF1_UNIQUE)) && (r_ptr->cur_num >= r_ptr->max_num) && (r_ptr->max_num != -1) && (!bypass_r_ptr_max_num))
+ if ((r_ptr->flags1 & RF1_UNIQUE) && (r_ptr->cur_num >= r_ptr->max_num) && (r_ptr->max_num != -1) && (!bypass_r_ptr_max_num))
{
/* Cannot create */
if (wizard) cmsg_format(TERM_L_RED, "WARNING: Refused monster %d: cur_num >= max_num", r_idx);
@@ -2169,7 +2169,7 @@ s16b place_monster_one(int y, int x, int r_idx, int ego, bool_ slp, int status)
}
/* Depth monsters may NOT be created out of depth */
- if ((r_ptr->flags1 & (RF1_FORCE_DEPTH)) && (dun_level < r_ptr->level))
+ if ((r_ptr->flags1 & RF1_FORCE_DEPTH) && (dun_level < r_ptr->level))
{
/* Cannot create */
if (wizard) cmsg_print(TERM_L_RED, "WARNING: FORCE_DEPTH");
@@ -2180,7 +2180,7 @@ s16b place_monster_one(int y, int x, int r_idx, int ego, bool_ slp, int status)
if (r_ptr->level > dun_level)
{
/* Unique monsters */
- if (r_ptr->flags1 & (RF1_UNIQUE))
+ if (r_ptr->flags1 & RF1_UNIQUE)
{
/* Message for cheaters */
if ((cheat_hear) || (p_ptr->precognition)) msg_format("Deep Unique (%s).", r_ptr->name);
@@ -2201,7 +2201,7 @@ s16b place_monster_one(int y, int x, int r_idx, int ego, bool_ slp, int status)
}
/* Note the monster */
- else if (r_ptr->flags1 & (RF1_UNIQUE))
+ else if (r_ptr->flags1 & RF1_UNIQUE)
{
/* Unique monsters induce message */
if ((cheat_hear) || (p_ptr->precognition)) msg_format("Unique (%s).", r_ptr->name);
@@ -2279,12 +2279,12 @@ s16b place_monster_one(int y, int x, int r_idx, int ego, bool_ slp, int status)
/* Only if not fated to die */
if ((dungeon_type != DUNGEON_DEATH) && (!place_monster_one_no_drop))
{
- const bool_ good = (r_ptr->flags1 & (RF1_DROP_GOOD)) ? TRUE : FALSE;
- const bool_ great = (r_ptr->flags1 & (RF1_DROP_GREAT)) ? TRUE : FALSE;
+ const bool_ good = (r_ptr->flags1 & RF1_DROP_GOOD) ? TRUE : FALSE;
+ const bool_ great = (r_ptr->flags1 & RF1_DROP_GREAT) ? TRUE : FALSE;
- const bool_ do_gold = (!(r_ptr->flags1 & (RF1_ONLY_ITEM)));
- const bool_ do_item = (!(r_ptr->flags1 & (RF1_ONLY_GOLD)));
- const bool_ do_mimic = (r_ptr->flags9 & (RF9_MIMIC));
+ const bool_ do_gold = (!(r_ptr->flags1 & RF1_ONLY_ITEM));
+ const bool_ do_item = (!(r_ptr->flags1 & RF1_ONLY_GOLD));
+ const bool_ do_mimic = (r_ptr->flags9 & RF9_MIMIC);
const int force_coin = get_coin_type(r_ptr);
@@ -2305,7 +2305,7 @@ s16b place_monster_one(int y, int x, int r_idx, int ego, bool_ slp, int status)
if (r_ptr->flags1 & (RF1_DROP_2D2)) number += damroll(2, 2);
if (r_ptr->flags1 & (RF1_DROP_3D2)) number += damroll(3, 2);
if (r_ptr->flags1 & (RF1_DROP_4D2)) number += damroll(4, 2);
- if (r_ptr->flags9 & (RF9_MIMIC)) number = 1;
+ if (r_ptr->flags9 & RF9_MIMIC) number = 1;
/* Hack -- handle creeping coins */
coin_type = force_coin;
@@ -2421,7 +2421,7 @@ s16b place_monster_one(int y, int x, int r_idx, int ego, bool_ slp, int status)
/* Assign maximal hitpoints */
- if (r_ptr->flags1 & (RF1_FORCE_MAXHP))
+ if (r_ptr->flags1 & RF1_FORCE_MAXHP)
{
m_ptr->maxhp = maxroll(r_ptr->hdice, r_ptr->hside);
}
@@ -2450,7 +2450,7 @@ s16b place_monster_one(int y, int x, int r_idx, int ego, bool_ slp, int status)
m_ptr->mspeed = m_ptr->speed;
/* Hack -- small racial variety */
- if (!(r_ptr->flags1 & (RF1_UNIQUE)))
+ if (!(r_ptr->flags1 & RF1_UNIQUE))
{
/* Allow some small variation per monster */
i = extract_energy[m_ptr->speed] / 10;
@@ -2481,7 +2481,7 @@ s16b place_monster_one(int y, int x, int r_idx, int ego, bool_ slp, int status)
m_ptr->energy = (byte)rand_int(100);
/* Force monster to wait for player */
- if (r_ptr->flags1 & (RF1_FORCE_SLEEP))
+ if (r_ptr->flags1 & RF1_FORCE_SLEEP)
{
/* Monster is still being nice */
m_ptr->mflag |= (MFLAG_NICE);
@@ -2503,11 +2503,11 @@ s16b place_monster_one(int y, int x, int r_idx, int ego, bool_ slp, int status)
/* Hack -- Count the number of "reproducers" */
- if (r_ptr->flags4 & (RF4_MULTIPLY)) num_repro++;
+ if (r_ptr->flags4 & RF4_MULTIPLY) num_repro++;
/* Hack -- Notice new multi-hued monsters */
- if (r_ptr->flags1 & (RF1_ATTR_MULTI)) shimmer_monsters = TRUE;
+ if (r_ptr->flags1 & RF1_ATTR_MULTI) shimmer_monsters = TRUE;
/* Count monsters on the level */
{
@@ -2655,7 +2655,7 @@ static bool_ place_monster_okay(int r_idx)
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);
@@ -2699,7 +2699,7 @@ bool_ place_monster_aux(int y, int x, int r_idx, bool_ slp, bool_ grp, int statu
/* Friends for certain monsters */
- if (r_ptr->flags1 & (RF1_FRIENDS))
+ if (r_ptr->flags1 & RF1_FRIENDS)
{
/* Attempt to place a group */
(void)place_monster_group(y, x, r_idx, slp, status);
@@ -2707,7 +2707,7 @@ bool_ place_monster_aux(int y, int x, int r_idx, bool_ slp, bool_ grp, int statu
/* Escorts for certain monsters */
- if (r_ptr->flags1 & (RF1_ESCORT))
+ if (r_ptr->flags1 & RF1_ESCORT)
{
old_get_mon_num_hook = get_mon_num_hook;
@@ -2752,8 +2752,8 @@ bool_ place_monster_aux(int y, int x, int r_idx, bool_ slp, bool_ grp, int statu
place_monster_one(ny, nx, z, pick_ego_monster(&r_info[z]), slp, status);
/* Place a "group" of escorts if needed */
- if ((r_info[z].flags1 & (RF1_FRIENDS)) ||
- (r_ptr->flags1 & (RF1_ESCORTS)))
+ if ((r_info[z].flags1 & RF1_FRIENDS) ||
+ (r_ptr->flags1 & RF1_ESCORTS))
{
/* Place a group of monsters */
(void)place_monster_group(ny, nx, z, slp, status);
@@ -2829,8 +2829,8 @@ bool_ alloc_horde(int y, int x)
r_ptr = &r_info[r_idx];
- if (!(r_ptr->flags1 & (RF1_UNIQUE))
- && !(r_ptr->flags1 & (RF1_ESCORTS)))
+ if (!(r_ptr->flags1 & RF1_UNIQUE)
+ && !(r_ptr->flags1 & RF1_ESCORTS))
break;
}
@@ -2953,56 +2953,56 @@ static bool_ summon_specific_okay(int r_idx)
case SUMMON_ANT:
{
okay = ((r_ptr->d_char == 'a') &&
- !(r_ptr->flags1 & (RF1_UNIQUE)));
+ !(r_ptr->flags1 & RF1_UNIQUE));
break;
}
case SUMMON_SPIDER:
{
okay = ((r_ptr->d_char == 'S') &&
- !(r_ptr->flags1 & (RF1_UNIQUE)));
+ !(r_ptr->flags1 & RF1_UNIQUE));
break;
}
case SUMMON_HOUND:
{
okay = (((r_ptr->d_char == 'C') || (r_ptr->d_char == 'Z')) &&
- !(r_ptr->flags1 & (RF1_UNIQUE)));
+ !(r_ptr->flags1 & RF1_UNIQUE));
break;
}
case SUMMON_HYDRA:
{
okay = ((r_ptr->d_char == 'M') &&
- !(r_ptr->flags1 & (RF1_UNIQUE)));
+ !(r_ptr->flags1 & RF1_UNIQUE));
break;
}
case SUMMON_ANGEL:
{
okay = ((r_ptr->d_char == 'A') &&
- !(r_ptr->flags1 & (RF1_UNIQUE)));
+ !(r_ptr->flags1 & RF1_UNIQUE));
break;
}
case SUMMON_DEMON:
{
- okay = ((r_ptr->flags3 & (RF3_DEMON)) &&
- !(r_ptr->flags1 & (RF1_UNIQUE)));
+ okay = ((r_ptr->flags3 & RF3_DEMON) &&
+ !(r_ptr->flags1 & RF1_UNIQUE));
break;
}
case SUMMON_UNDEAD:
{
- okay = ((r_ptr->flags3 & (RF3_UNDEAD)) &&
- !(r_ptr->flags1 & (RF1_UNIQUE)));
+ okay = ((r_ptr->flags3 & RF3_UNDEAD) &&
+ !(r_ptr->flags1 & RF1_UNIQUE));
break;
}
case SUMMON_DRAGON:
{
- okay = ((r_ptr->flags3 & (RF3_DRAGON)) &&
- !(r_ptr->flags1 & (RF1_UNIQUE)));
+ okay = ((r_ptr->flags3 & RF3_DRAGON) &&
+ !(r_ptr->flags1 & RF1_UNIQUE));
break;
}
@@ -3034,40 +3034,40 @@ static bool_ summon_specific_okay(int r_idx)
case SUMMON_UNIQUE:
{
- okay = (r_ptr->flags1 & (RF1_UNIQUE)) ? TRUE : FALSE;
+ okay = (r_ptr->flags1 & RF1_UNIQUE) ? TRUE : FALSE;
break;
}
case SUMMON_BIZARRE1:
{
okay = ((r_ptr->d_char == 'm') &&
- !(r_ptr->flags1 & (RF1_UNIQUE)));
+ !(r_ptr->flags1 & RF1_UNIQUE));
break;
}
case SUMMON_BIZARRE2:
{
okay = ((r_ptr->d_char == 'b') &&
- !(r_ptr->flags1 & (RF1_UNIQUE)));
+ !(r_ptr->flags1 & RF1_UNIQUE));
break;
}
case SUMMON_BIZARRE3:
{
okay = ((r_ptr->d_char == 'Q') &&
- !(r_ptr->flags1 & (RF1_UNIQUE)));
+ !(r_ptr->flags1 & RF1_UNIQUE));
break;
}
case SUMMON_BIZARRE4:
{
okay = ((r_ptr->d_char == 'v') &&
- !(r_ptr->flags1 & (RF1_UNIQUE)));
+ !(r_ptr->flags1 & RF1_UNIQUE));
break;
}
case SUMMON_BIZARRE5:
{
okay = ((r_ptr->d_char == '$') &&
- !(r_ptr->flags1 & (RF1_UNIQUE)));
+ !(r_ptr->flags1 & RF1_UNIQUE));
break;
}
@@ -3078,13 +3078,13 @@ static bool_ summon_specific_okay(int r_idx)
(r_ptr->d_char == '=') ||
(r_ptr->d_char == '$') ||
(r_ptr->d_char == '|')) &&
- !(r_ptr->flags1 & (RF1_UNIQUE)));
+ !(r_ptr->flags1 & RF1_UNIQUE));
break;
}
case SUMMON_HI_DEMON:
{
- okay = ((r_ptr->flags3 & (RF3_DEMON)) &&
+ okay = ((r_ptr->flags3 & RF3_DEMON) &&
(r_ptr->d_char == 'U') &&
!(r_ptr->flags1 & RF1_UNIQUE));
break;
@@ -3094,34 +3094,34 @@ static bool_ summon_specific_okay(int r_idx)
case SUMMON_KIN:
{
okay = ((r_ptr->d_char == summon_kin_type) &&
- !(r_ptr->flags1 & (RF1_UNIQUE)));
+ !(r_ptr->flags1 & RF1_UNIQUE));
break;
}
case SUMMON_DAWN:
{
okay = ((strstr(r_ptr->name, "the Dawn")) &&
- !(r_ptr->flags1 & (RF1_UNIQUE)));
+ !(r_ptr->flags1 & RF1_UNIQUE));
break;
}
case SUMMON_ANIMAL:
{
- okay = ((r_ptr->flags3 & (RF3_ANIMAL)) &&
- !(r_ptr->flags1 & (RF1_UNIQUE)));
+ okay = ((r_ptr->flags3 & RF3_ANIMAL) &&
+ !(r_ptr->flags1 & RF1_UNIQUE));
break;
}
case SUMMON_ANIMAL_RANGER:
{
- okay = ((r_ptr->flags3 & (RF3_ANIMAL)) &&
+ okay = ((r_ptr->flags3 & RF3_ANIMAL) &&
(strchr("abcflqrwBCIJKMRS", r_ptr->d_char)) &&
- !(r_ptr->flags3 & (RF3_DRAGON)) &&
- !(r_ptr->flags3 & (RF3_EVIL)) &&
- !(r_ptr->flags3 & (RF3_UNDEAD)) &&
- !(r_ptr->flags3 & (RF3_DEMON)) &&
+ !(r_ptr->flags3 & RF3_DRAGON) &&
+ !(r_ptr->flags3 & RF3_EVIL) &&
+ !(r_ptr->flags3 & RF3_UNDEAD) &&
+ !(r_ptr->flags3 & RF3_DEMON) &&
!(r_ptr->flags4 || r_ptr->flags5 || r_ptr->flags6) &&
- !(r_ptr->flags1 & (RF1_UNIQUE)));
+ !(r_ptr->flags1 & RF1_UNIQUE));
break;
}
@@ -3130,34 +3130,34 @@ static bool_ summon_specific_okay(int r_idx)
okay = (((r_ptr->d_char == 'L') ||
(r_ptr->d_char == 'V') ||
(r_ptr->d_char == 'W')) &&
- !(r_ptr->flags1 & (RF1_UNIQUE)));
+ !(r_ptr->flags1 & RF1_UNIQUE));
break;
}
case SUMMON_HI_DRAGON_NO_UNIQUES:
{
okay = ((r_ptr->d_char == 'D') &&
- !(r_ptr->flags1 & (RF1_UNIQUE)));
+ !(r_ptr->flags1 & RF1_UNIQUE));
break;
}
case SUMMON_NO_UNIQUES:
{
- okay = (!(r_ptr->flags1 & (RF1_UNIQUE)));
+ okay = (!(r_ptr->flags1 & RF1_UNIQUE));
break;
}
case SUMMON_PHANTOM:
{
okay = ((strstr(r_ptr->name, "Phantom")) &&
- !(r_ptr->flags1 & (RF1_UNIQUE)));
+ !(r_ptr->flags1 & RF1_UNIQUE));
break;
}
case SUMMON_ELEMENTAL:
{
okay = ((strstr(r_ptr->name, "lemental")) &&
- !(r_ptr->flags1 & (RF1_UNIQUE)));
+ !(r_ptr->flags1 & RF1_UNIQUE));
break;
}
@@ -3170,21 +3170,21 @@ static bool_ summon_specific_okay(int r_idx)
case SUMMON_BLUE_HORROR:
{
okay = ((strstr(r_ptr->name, "lue horror")) &&
- !(r_ptr->flags1 & (RF1_UNIQUE)));
+ !(r_ptr->flags1 & RF1_UNIQUE));
break;
}
case SUMMON_BUG:
{
okay = ((strstr(r_ptr->name, "Software bug")) &&
- !(r_ptr->flags1 & (RF1_UNIQUE)));
+ !(r_ptr->flags1 & RF1_UNIQUE));
break;
}
case SUMMON_RNG:
{
okay = ((strstr(r_ptr->name, "Random Number Generator")) &&
- !(r_ptr->flags1 & (RF1_UNIQUE)));
+ !(r_ptr->flags1 & RF1_UNIQUE));
break;
}
case SUMMON_MINE:
@@ -3196,21 +3196,21 @@ static bool_ summon_specific_okay(int r_idx)
case SUMMON_HUMAN:
{
okay = ((r_ptr->d_char == 'p') &&
- !(r_ptr->flags1 & (RF1_UNIQUE)));
+ !(r_ptr->flags1 & RF1_UNIQUE));
break;
}
case SUMMON_SHADOWS:
{
okay = ((r_ptr->d_char == 'G') &&
- !(r_ptr->flags1 & (RF1_UNIQUE)));
+ !(r_ptr->flags1 & RF1_UNIQUE));
break;
}
case SUMMON_QUYLTHULG:
{
okay = ((r_ptr->d_char == 'Q') &&
- !(r_ptr->flags1 & (RF1_UNIQUE)));
+ !(r_ptr->flags1 & RF1_UNIQUE));
break;
}
@@ -3519,7 +3519,7 @@ static bool_ mutate_monster_okay(int r_idx)
/* Hack - Only summon dungeon monsters */
if (!monster_dungeon(r_idx)) return (FALSE);
- okay = ((r_ptr->d_char == summon_kin_type) && !(r_ptr->flags1 & (RF1_UNIQUE))
+ okay = ((r_ptr->d_char == summon_kin_type) && !(r_ptr->flags1 & RF1_UNIQUE)
&& (r_ptr->level >= dun_level));
return okay;
@@ -3741,10 +3741,10 @@ void update_smart_learn(int m_idx, int what)
auto const r_ptr = m_ptr->race();
/* Too stupid to learn anything */
- if (r_ptr->flags2 & (RF2_STUPID)) return;
+ if (r_ptr->flags2 & RF2_STUPID) return;
/* Not intelligent, only learn sometimes */
- if (!(r_ptr->flags2 & (RF2_SMART)) && magik(50)) return;
+ if (!(r_ptr->flags2 & RF2_SMART) && magik(50)) return;
/* XXX XXX XXX */
diff --git a/src/monster3.cc b/src/monster3.cc
index d01545ec..c718c880 100644
--- a/src/monster3.cc
+++ b/src/monster3.cc
@@ -174,7 +174,7 @@ bool_ ai_possessor(int m_idx, int o_idx)
m_ptr->csleep = 0;
/* Assign maximal hitpoints */
- if (r_ptr->flags1 & (RF1_FORCE_MAXHP))
+ if (r_ptr->flags1 & RF1_FORCE_MAXHP)
{
m_ptr->maxhp = maxroll(r_ptr->hdice, r_ptr->hside);
}
@@ -205,10 +205,10 @@ bool_ ai_possessor(int m_idx, int o_idx)
m_ptr->energy = 0;
/* Hack -- Count the number of "reproducers" */
- if (r_ptr->flags4 & (RF4_MULTIPLY)) num_repro++;
+ if (r_ptr->flags4 & RF4_MULTIPLY) num_repro++;
/* Hack -- Notice new multi-hued monsters */
- if (r_ptr->flags1 & (RF1_ATTR_MULTI)) shimmer_monsters = TRUE;
+ if (r_ptr->flags1 & RF1_ATTR_MULTI) shimmer_monsters = TRUE;
/* Hack -- Count the monsters on the level */
r_ptr->cur_num++;
@@ -249,7 +249,7 @@ void ai_deincarnate(int m_idx)
m_ptr->csleep = 0;
/* Assign maximal hitpoints */
- if (r_ptr->flags1 & (RF1_FORCE_MAXHP))
+ if (r_ptr->flags1 & RF1_FORCE_MAXHP)
{
m_ptr->maxhp = maxroll(r_ptr->hdice, r_ptr->hside);
}
@@ -280,10 +280,10 @@ void ai_deincarnate(int m_idx)
m_ptr->energy = 0;
/* Hack -- Count the number of "reproducers" */
- if (r_ptr->flags4 & (RF4_MULTIPLY)) num_repro++;
+ if (r_ptr->flags4 & RF4_MULTIPLY) num_repro++;
/* Hack -- Notice new multi-hued monsters */
- if (r_ptr->flags1 & (RF1_ATTR_MULTI)) shimmer_monsters = TRUE;
+ if (r_ptr->flags1 & RF1_ATTR_MULTI) shimmer_monsters = TRUE;
/* Hack -- Count the monsters on the level */
r_ptr->cur_num++;
diff --git a/src/spells1.cc b/src/spells1.cc
index 3859ed65..cad09a92 100644
--- a/src/spells1.cc
+++ b/src/spells1.cc
@@ -108,7 +108,7 @@ s16b poly_r_idx(int r_idx)
r_ptr = &r_info[r];
/* Ignore unique monsters */
- if (r_ptr->flags1 & (RF1_UNIQUE)) continue;
+ if (r_ptr->flags1 & RF1_UNIQUE) continue;
/* Use that index */
r_idx = r;
@@ -4362,10 +4362,10 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
}
/* Some monsters get "destroyed" */
- if ((r_ptr->flags3 & (RF3_DEMON)) ||
- (r_ptr->flags3 & (RF3_UNDEAD)) ||
- (r_ptr->flags2 & (RF2_STUPID)) ||
- (r_ptr->flags3 & (RF3_NONLIVING)) ||
+ if ((r_ptr->flags3 & RF3_DEMON) ||
+ (r_ptr->flags3 & RF3_UNDEAD) ||
+ (r_ptr->flags2 & RF2_STUPID) ||
+ (r_ptr->flags3 & RF3_NONLIVING) ||
(strchr("Evg", r_ptr->d_char)))
{
/* Special note at death */
@@ -4400,11 +4400,11 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
get_angry = TRUE;
break;
case GF_KILL_WALL:
- if (r_ptr->flags3 & (RF3_HURT_ROCK))
+ if (r_ptr->flags3 & RF3_HURT_ROCK)
get_angry = TRUE;
break;
case GF_HOLY_FIRE:
- if (!(r_ptr->flags3 & (RF3_GOOD)))
+ if (!(r_ptr->flags3 & RF3_GOOD))
get_angry = TRUE;
break;
case GF_TURN_UNDEAD:
@@ -4427,17 +4427,17 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
break;
case GF_DISP_LIVING:
case GF_UNBREATH:
- if (!(r_ptr->flags3 & (RF3_UNDEAD)) &&
- !(r_ptr->flags3 & (RF3_NONLIVING)))
+ if (!(r_ptr->flags3 & RF3_UNDEAD) &&
+ !(r_ptr->flags3 & RF3_NONLIVING))
get_angry = TRUE;
break;
case GF_PSI:
case GF_PSI_DRAIN:
- if (!(r_ptr->flags2 & (RF2_EMPTY_MIND)))
+ if (!(r_ptr->flags2 & RF2_EMPTY_MIND))
get_angry = TRUE;
break;
case GF_DOMINATION:
- if (!(r_ptr->flags3 & (RF3_NO_CONF)))
+ if (!(r_ptr->flags3 & RF3_NO_CONF))
get_angry = TRUE;
break;
case GF_OLD_POLY:
@@ -4519,12 +4519,12 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
case GF_ACID:
{
if (seen) obvious = TRUE;
- if (r_ptr->flags9 & (RF9_SUSCEP_ACID))
+ if (r_ptr->flags9 & RF9_SUSCEP_ACID)
{
note = " is hit hard.";
dam *= 3;
}
- if (r_ptr->flags3 & (RF3_IM_ACID))
+ if (r_ptr->flags3 & RF3_IM_ACID)
{
note = " resists a lot.";
dam /= 9;
@@ -4536,12 +4536,12 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
case GF_ELEC:
{
if (seen) obvious = TRUE;
- if (r_ptr->flags9 & (RF9_SUSCEP_ELEC))
+ if (r_ptr->flags9 & RF9_SUSCEP_ELEC)
{
note = " is hit hard.";
dam *= 3;
}
- if (r_ptr->flags3 & (RF3_IM_ELEC))
+ if (r_ptr->flags3 & RF3_IM_ELEC)
{
note = " resists a lot.";
dam /= 9;
@@ -4553,12 +4553,12 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
case GF_FIRE:
{
if (seen) obvious = TRUE;
- if (r_ptr->flags3 & (RF3_SUSCEP_FIRE))
+ if (r_ptr->flags3 & RF3_SUSCEP_FIRE)
{
note = " is hit hard.";
dam *= 3;
}
- if (r_ptr->flags3 & (RF3_IM_FIRE))
+ if (r_ptr->flags3 & RF3_IM_FIRE)
{
note = " resists a lot.";
dam /= 9;
@@ -4570,12 +4570,12 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
case GF_COLD:
{
if (seen) obvious = TRUE;
- if (r_ptr->flags3 & (RF3_SUSCEP_COLD))
+ if (r_ptr->flags3 & RF3_SUSCEP_COLD)
{
note = " is hit hard.";
dam *= 3;
}
- if (r_ptr->flags3 & (RF3_IM_COLD))
+ if (r_ptr->flags3 & RF3_IM_COLD)
{
note = " resists a lot.";
dam /= 9;
@@ -4588,13 +4588,13 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
{
if (seen) obvious = TRUE;
if (magik(25)) do_pois = (10 + randint(11) + r) / (r + 1);
- if (r_ptr->flags9 & (RF9_SUSCEP_POIS))
+ if (r_ptr->flags9 & RF9_SUSCEP_POIS)
{
note = " is hit hard.";
dam *= 3;
do_pois *= 2;
}
- if (r_ptr->flags3 & (RF3_IM_POIS))
+ if (r_ptr->flags3 & RF3_IM_POIS)
{
note = " resists a lot.";
dam /= 9;
@@ -4609,7 +4609,7 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
{
if (seen) obvious = TRUE;
if (magik(15)) do_pois = (10 + randint(11) + r) / (r + 1);
- if ((r_ptr->flags3 & (RF3_NONLIVING)) || (r_ptr->flags3 & (RF3_UNDEAD)))
+ if ((r_ptr->flags3 & RF3_NONLIVING) || (r_ptr->flags3 & RF3_UNDEAD))
{
note = " is immune.";
dam = 0;
@@ -4623,7 +4623,7 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
{
if (seen) obvious = TRUE;
- if (r_ptr->flags3 & (RF3_IM_POIS))
+ if (r_ptr->flags3 & RF3_IM_POIS)
{
note = " resists.";
dam *= 3;
@@ -4637,7 +4637,7 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
case GF_HELL_FIRE:
{
if (seen) obvious = TRUE;
- if (r_ptr->flags3 & (RF3_EVIL))
+ if (r_ptr->flags3 & RF3_EVIL)
{
dam *= 2;
note = " is hit hard.";
@@ -4649,12 +4649,12 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
case GF_HOLY_FIRE:
{
if (seen) obvious = TRUE;
- if (r_ptr->flags3 & (RF3_GOOD))
+ if (r_ptr->flags3 & RF3_GOOD)
{
dam = 0;
note = " is immune.";
}
- else if (r_ptr->flags3 & (RF3_EVIL))
+ else if (r_ptr->flags3 & RF3_EVIL)
{
dam *= 2;
note = " is hit hard.";
@@ -4679,7 +4679,7 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
case GF_PLASMA:
{
if (seen) obvious = TRUE;
- if (r_ptr->flags3 & (RF3_RES_PLAS))
+ if (r_ptr->flags3 & RF3_RES_PLAS)
{
note = " resists.";
dam *= 3;
@@ -4692,18 +4692,18 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
case GF_NETHER:
{
if (seen) obvious = TRUE;
- if (r_ptr->flags3 & (RF3_UNDEAD))
+ if (r_ptr->flags3 & RF3_UNDEAD)
{
note = " is immune.";
dam = 0;
}
- else if (r_ptr->flags3 & (RF3_RES_NETH))
+ else if (r_ptr->flags3 & RF3_RES_NETH)
{
note = " resists.";
dam *= 3;
dam /= (randint(6) + 6);
}
- else if (r_ptr->flags3 & (RF3_EVIL))
+ else if (r_ptr->flags3 & RF3_EVIL)
{
dam /= 2;
note = " resists somewhat.";
@@ -4722,7 +4722,7 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
note = " is immune.";
dam = 0;
}
- else if (r_ptr->flags3 & (RF3_RES_WATE))
+ else if (r_ptr->flags3 & RF3_RES_WATE)
{
note = " resists.";
dam *= 3;
@@ -4742,7 +4742,7 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
note = " is immune.";
dam = 0;
}
- else if (r_ptr->flags3 & (RF3_RES_WATE))
+ else if (r_ptr->flags3 & RF3_RES_WATE)
{
note = " resists.";
dam *= 3;
@@ -4830,8 +4830,8 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
if (seen) obvious = TRUE;
do_poly = TRUE;
do_conf = (5 + randint(11) + r) / (r + 1);
- if ((r_ptr->flags4 & (RF4_BR_CHAO)) ||
- ((r_ptr->flags3 & (RF3_DEMON)) && (randint(3) == 1)))
+ if ((r_ptr->flags4 & RF4_BR_CHAO) ||
+ ((r_ptr->flags3 & RF3_DEMON) && (randint(3) == 1)))
{
note = " resists.";
dam *= 3;
@@ -4846,7 +4846,7 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
{
if (seen) obvious = TRUE;
if (magik(33)) do_cut = (10 + randint(15) + r) / (r + 1);
- if (r_ptr->flags4 & (RF4_BR_SHAR))
+ if (r_ptr->flags4 & RF4_BR_SHAR)
{
note = " resists.";
dam *= 3;
@@ -4862,7 +4862,7 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
if (seen) obvious = TRUE;
if (magik(12)) do_cut = (10 + randint(15) + r) / (r + 1);
- if (r_ptr->flags4 & (RF4_BR_SHAR))
+ if (r_ptr->flags4 & RF4_BR_SHAR)
{
note = " resists somewhat.";
dam /= 2;
@@ -4883,7 +4883,7 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
}
else
do_stun = (10 + randint(15) + r) / (r + 1);
- if (r_ptr->flags4 & (RF4_BR_SOUN))
+ if (r_ptr->flags4 & RF4_BR_SOUN)
{
note = " resists.";
dam *= 2;
@@ -4897,13 +4897,13 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
{
if (seen) obvious = TRUE;
do_conf = (10 + randint(15) + r) / (r + 1);
- if (r_ptr->flags4 & (RF4_BR_CONF))
+ if (r_ptr->flags4 & RF4_BR_CONF)
{
note = " resists.";
dam *= 2;
dam /= (randint(6) + 6);
}
- else if (r_ptr->flags3 & (RF3_NO_CONF))
+ else if (r_ptr->flags3 & RF3_NO_CONF)
{
note = " resists somewhat.";
dam /= 2;
@@ -4915,7 +4915,7 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
case GF_DISENCHANT:
{
if (seen) obvious = TRUE;
- if (r_ptr->flags3 & (RF3_RES_DISE))
+ if (r_ptr->flags3 & RF3_RES_DISE)
{
note = " resists.";
dam *= 3;
@@ -4928,7 +4928,7 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
case GF_NEXUS:
{
if (seen) obvious = TRUE;
- if (r_ptr->flags3 & (RF3_RES_NEXU))
+ if (r_ptr->flags3 & RF3_RES_NEXU)
{
note = " resists.";
dam *= 3;
@@ -5025,7 +5025,7 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
/* --hack-- Only stun if a monster fired it */
else do_stun = (randint(15) + r) / (r + 1);
- if (r_ptr->flags4 & (RF4_BR_WALL))
+ if (r_ptr->flags4 & RF4_BR_WALL)
{
note = " resists.";
dam *= 3;
@@ -5038,7 +5038,7 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
case GF_INERTIA:
{
if (seen) obvious = TRUE;
- if (r_ptr->flags4 & (RF4_BR_INER))
+ if (r_ptr->flags4 & RF4_BR_INER)
{
note = " resists.";
dam *= 3;
@@ -5065,7 +5065,7 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
case GF_TIME:
{
if (seen) obvious = TRUE;
- if (r_ptr->flags4 & (RF4_BR_TIME))
+ if (r_ptr->flags4 & RF4_BR_TIME)
{
note = " resists.";
dam *= 3;
@@ -5081,9 +5081,9 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
if (seen) obvious = TRUE;
- if (r_ptr->flags3 & (RF3_RES_TELE))
+ if (r_ptr->flags3 & RF3_RES_TELE)
{
- if (r_ptr->flags1 & (RF1_UNIQUE))
+ if (r_ptr->flags1 & RF1_UNIQUE)
{
note = " is unaffected!";
resist_tele = TRUE;
@@ -5098,7 +5098,7 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
if (!resist_tele) do_dist = 10;
else do_dist = 0;
- if (r_ptr->flags4 & (RF4_BR_GRAV))
+ if (r_ptr->flags4 & RF4_BR_GRAV)
{
note = " resists.";
dam *= 3;
@@ -5109,7 +5109,7 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
{
/* 1. slowness */
/* Powerful monsters can resist */
- if ((r_ptr->flags1 & (RF1_UNIQUE)) ||
+ if ((r_ptr->flags1 & RF1_UNIQUE) ||
(m_ptr->level > randint((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
{
obvious = FALSE;
@@ -5125,7 +5125,7 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
do_stun = damroll((p_ptr->lev / 10) + 3 , (dam)) + 1;
/* Attempt a saving throw */
- if ((r_ptr->flags1 & (RF1_UNIQUE)) ||
+ if ((r_ptr->flags1 & RF1_UNIQUE) ||
(m_ptr->level > randint((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
{
/* Resist */
@@ -5150,7 +5150,7 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
case GF_DISINTEGRATE:
{
if (seen) obvious = TRUE;
- if (r_ptr->flags3 & (RF3_HURT_ROCK))
+ if (r_ptr->flags3 & RF3_HURT_ROCK)
{
note = " loses some skin!";
note_dies = " evaporates!";
@@ -5170,7 +5170,7 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
case GF_FEAR:
{
- if (r_ptr->flags3 & (RF3_NO_FEAR))
+ if (r_ptr->flags3 & RF3_NO_FEAR)
note = " is unaffected.";
else
set_afraid(p_ptr->afraid + (dam / 2) + randint(dam / 2));
@@ -5228,7 +5228,7 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
break;
case 3:
{
- if (r_ptr->flags3 & (RF3_NO_FEAR))
+ if (r_ptr->flags3 & RF3_NO_FEAR)
note = " is unaffected.";
else
set_afraid(p_ptr->afraid + 3 + randint(dam));
@@ -5335,7 +5335,7 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
do_stun = damroll((p_ptr->lev / 10) + 3 , (dam)) + 1;
/* Attempt a saving throw */
- if ((r_ptr->flags1 & (RF1_UNIQUE)) ||
+ if ((r_ptr->flags1 & RF1_UNIQUE) ||
(m_ptr->level > 5 + randint(dam)))
{
/* Resist */
@@ -5359,8 +5359,8 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
if (seen) obvious = TRUE;
/* Attempt a saving throw */
- if ((r_ptr->flags1 & (RF1_UNIQUE)) ||
- (r_ptr->flags3 & (RF3_NO_CONF)) ||
+ if ((r_ptr->flags1 & RF1_UNIQUE) ||
+ (r_ptr->flags3 & RF3_NO_CONF) ||
(m_ptr->level > randint((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
{
/* Resist */
@@ -5396,7 +5396,7 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
break;
default:
{
- if (r_ptr->flags3 & (RF3_NO_FEAR))
+ if (r_ptr->flags3 & RF3_NO_FEAR)
note = " is unaffected.";
else
set_afraid(p_ptr->afraid + dam);
@@ -5449,13 +5449,13 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
if (seen) obvious = TRUE;
do_stun = (randint(15) + 1) / (r + 1);
if (magik(33)) do_cut = (10 + randint(15) + r) / (r + 1);
- if (r_ptr->flags3 & (RF3_SUSCEP_COLD))
+ if (r_ptr->flags3 & RF3_SUSCEP_COLD)
{
note = " is hit hard.";
dam *= 3;
do_cut *= 2;
}
- if (r_ptr->flags3 & (RF3_IM_COLD))
+ if (r_ptr->flags3 & RF3_IM_COLD)
{
note = " resists a lot.";
dam /= 9;
@@ -5470,9 +5470,9 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
{
if (seen) obvious = TRUE;
- if ((r_ptr->flags3 & (RF3_UNDEAD)) ||
- (r_ptr->flags3 & (RF3_DEMON)) ||
- (r_ptr->flags3 & (RF3_NONLIVING)) ||
+ if ((r_ptr->flags3 & RF3_UNDEAD) ||
+ (r_ptr->flags3 & RF3_DEMON) ||
+ (r_ptr->flags3 & RF3_NONLIVING) ||
(strchr("Egv", r_ptr->d_char)))
{
note = " is unaffected!";
@@ -5487,14 +5487,14 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
case GF_DEATH_RAY:
{
if (seen) obvious = TRUE;
- if ((r_ptr->flags3 & (RF3_UNDEAD)) ||
- (r_ptr->flags3 & (RF3_NONLIVING)))
+ if ((r_ptr->flags3 & RF3_UNDEAD) ||
+ (r_ptr->flags3 & RF3_NONLIVING))
{
note = " is immune.";
obvious = FALSE;
dam = 0;
}
- else if (((r_ptr->flags1 & (RF1_UNIQUE)) &&
+ else if (((r_ptr->flags1 & RF1_UNIQUE) &&
(randint(888) != 666)) ||
(((m_ptr->level + randint(20)) > randint((dam) + randint(10))) &&
randint(100) != 66 ))
@@ -5609,7 +5609,7 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
if (seen) obvious = TRUE;
/* Powerful monsters can resist */
- if ((r_ptr->flags1 & (RF1_UNIQUE)) ||
+ if ((r_ptr->flags1 & RF1_UNIQUE) ||
(m_ptr->level > randint((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
{
note = " is unaffected!";
@@ -5635,7 +5635,7 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
if (seen) obvious = TRUE;
/* Attempt a saving throw */
- if ((r_ptr->flags3 & (RF3_NO_SLEEP)) ||
+ if ((r_ptr->flags3 & RF3_NO_SLEEP) ||
(m_ptr->level > randint((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
{
/* No obvious effect */
@@ -5661,7 +5661,7 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
if (seen) obvious = TRUE;
/* Attempt a saving throw */
- if ((r_ptr->flags1 & (RF1_UNIQUE)) ||
+ if ((r_ptr->flags1 & RF1_UNIQUE) ||
(m_ptr->level > randint((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
{
note = " is unaffected!";
@@ -5823,10 +5823,10 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
if (seen) obvious = TRUE;
/* Attempt a saving throw */
- if ((r_ptr->flags1 & (RF1_UNIQUE)) ||
+ if ((r_ptr->flags1 & RF1_UNIQUE) ||
(m_ptr->mflag & MFLAG_QUEST) ||
- (!(r_ptr->flags3 & (RF3_ANIMAL))) ||
- (r_ptr->flags3 & (RF3_NO_CONF)) ||
+ (!(r_ptr->flags3 & RF3_ANIMAL)) ||
+ (r_ptr->flags3 & RF3_NO_CONF) ||
(m_ptr->level > randint((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
{
/* Resist */
@@ -5856,9 +5856,9 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
if (seen) obvious = TRUE;
/* Attempt a saving throw */
- if ((r_ptr->flags1 & (RF1_UNIQUE)) ||
+ if ((r_ptr->flags1 & RF1_UNIQUE) ||
(m_ptr->mflag & MFLAG_QUEST) ||
- (!(r_ptr->flags3 & (RF3_DEMON))) ||
+ (!(r_ptr->flags3 & RF3_DEMON)) ||
(m_ptr->level > randint((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
{
/* Resist */
@@ -5890,7 +5890,7 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
do_conf = damroll(3, (dam / 2)) + 1;
/* Attempt a saving throw */
- if ((r_ptr->flags3 & (RF3_NO_CONF)) ||
+ if ((r_ptr->flags3 & RF3_NO_CONF) ||
(m_ptr->level > randint((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
{
/* Resist */
@@ -5937,7 +5937,7 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
do_conf = damroll(3, (dam / 2)) + 1;
/* Attempt a saving throw */
- if ((r_ptr->flags3 & (RF3_NO_CONF)) ||
+ if ((r_ptr->flags3 & RF3_NO_CONF) ||
(m_ptr->level > randint((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
{
/* Resist */
@@ -5977,7 +5977,7 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
do_stun = damroll((p_ptr->lev / 10) + 3 , (dam)) + 1;
/* Attempt a saving throw */
- if ((r_ptr->flags1 & (RF1_UNIQUE)) ||
+ if ((r_ptr->flags1 & RF1_UNIQUE) ||
(m_ptr->level > randint((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
{
/* Resist */
@@ -5989,7 +5989,7 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
}
/* Non_living resists */
- if (r_ptr->flags3 & (RF3_NONLIVING))
+ if (r_ptr->flags3 & RF3_NONLIVING)
{
/* Resist */
do_stun = 0;
@@ -6011,7 +6011,7 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
do_conf = damroll(3, (dam / 2)) + 1;
/* Attempt a saving throw */
- if ((r_ptr->flags3 & (RF3_NO_CONF)) ||
+ if ((r_ptr->flags3 & RF3_NO_CONF) ||
(m_ptr->level > randint((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
{
/* Resist */
@@ -6042,7 +6042,7 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
case GF_LITE_WEAK:
{
/* Hurt by light */
- if (r_ptr->flags3 & (RF3_HURT_LITE))
+ if (r_ptr->flags3 & RF3_HURT_LITE)
{
/* Obvious effect */
if (seen) obvious = TRUE;
@@ -6068,13 +6068,13 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
case GF_LITE:
{
if (seen) obvious = TRUE;
- if (r_ptr->flags4 & (RF4_BR_LITE))
+ if (r_ptr->flags4 & RF4_BR_LITE)
{
note = " resists.";
dam *= 2;
dam /= (randint(6) + 6);
}
- else if (r_ptr->flags3 & (RF3_HURT_LITE))
+ else if (r_ptr->flags3 & RF3_HURT_LITE)
{
note = " cringes from the light!";
note_dies = " shrivels away in the light!";
@@ -6090,7 +6090,7 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
if (seen) obvious = TRUE;
/* Likes darkness... */
- if ((r_ptr->flags4 & (RF4_BR_DARK)) ||
+ if ((r_ptr->flags4 & RF4_BR_DARK) ||
(r_ptr->flags3 & RF3_ORC) ||
(r_ptr->flags3 & RF3_HURT_LITE))
{
@@ -6106,7 +6106,7 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
case GF_KILL_WALL:
{
/* Hurt by rock remover */
- if (r_ptr->flags3 & (RF3_HURT_ROCK))
+ if (r_ptr->flags3 & RF3_HURT_ROCK)
{
/* Notice effect */
if (seen) obvious = TRUE;
@@ -6133,13 +6133,13 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
if (dungeon_flags & DF_NO_TELEPORT) break; /* No teleport on special levels */
/* Only affect undead */
- if (r_ptr->flags3 & (RF3_UNDEAD))
+ if (r_ptr->flags3 & RF3_UNDEAD)
{
bool_ resists_tele = FALSE;
- if (r_ptr->flags3 & (RF3_RES_TELE))
+ if (r_ptr->flags3 & RF3_RES_TELE)
{
- if (r_ptr->flags1 & (RF1_UNIQUE))
+ if (r_ptr->flags1 & RF1_UNIQUE)
{
note = " is unaffected!";
resists_tele = TRUE;
@@ -6176,13 +6176,13 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
{
if (dungeon_flags & DF_NO_TELEPORT) break; /* No teleport on special levels */
/* Only affect evil */
- if (r_ptr->flags3 & (RF3_EVIL))
+ if (r_ptr->flags3 & RF3_EVIL)
{
bool_ resists_tele = FALSE;
- if (r_ptr->flags3 & (RF3_RES_TELE))
+ if (r_ptr->flags3 & RF3_RES_TELE)
{
- if (r_ptr->flags1 & (RF1_UNIQUE))
+ if (r_ptr->flags1 & RF1_UNIQUE)
{
note = " is unaffected!";
resists_tele = TRUE;
@@ -6220,9 +6220,9 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
bool_ resists_tele = FALSE;
if (dungeon_flags & DF_NO_TELEPORT) break; /* No teleport on special levels */
- if (r_ptr->flags3 & (RF3_RES_TELE))
+ if (r_ptr->flags3 & RF3_RES_TELE)
{
- if (r_ptr->flags1 & (RF1_UNIQUE))
+ if (r_ptr->flags1 & RF1_UNIQUE)
{
note = " is unaffected!";
resists_tele = TRUE;
@@ -6253,7 +6253,7 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
case GF_TURN_UNDEAD:
{
/* Only affect undead */
- if (r_ptr->flags3 & (RF3_UNDEAD))
+ if (r_ptr->flags3 & RF3_UNDEAD)
{
/* Obvious */
if (seen) obvious = TRUE;
@@ -6288,7 +6288,7 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
case GF_TURN_EVIL:
{
/* Only affect evil */
- if (r_ptr->flags3 & (RF3_EVIL))
+ if (r_ptr->flags3 & RF3_EVIL)
{
/* Obvious */
if (seen) obvious = TRUE;
@@ -6329,8 +6329,8 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
do_fear = damroll(3, (dam / 2)) + 1;
/* Attempt a saving throw */
- if ((r_ptr->flags1 & (RF1_UNIQUE)) ||
- (r_ptr->flags3 & (RF3_NO_FEAR)) ||
+ if ((r_ptr->flags1 & RF1_UNIQUE) ||
+ (r_ptr->flags3 & RF3_NO_FEAR) ||
(m_ptr->level > randint((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
{
/* No obvious effect */
@@ -6349,7 +6349,7 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
case GF_DISP_UNDEAD:
{
/* Only affect undead */
- if (r_ptr->flags3 & (RF3_UNDEAD))
+ if (r_ptr->flags3 & RF3_UNDEAD)
{
/* Obvious */
if (seen) obvious = TRUE;
@@ -6377,7 +6377,7 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
case GF_DISP_EVIL:
{
/* Only affect evil */
- if (r_ptr->flags3 & (RF3_EVIL))
+ if (r_ptr->flags3 & RF3_EVIL)
{
/* Obvious */
if (seen) obvious = TRUE;
@@ -6404,7 +6404,7 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
case GF_DISP_GOOD:
{
/* Only affect good */
- if (r_ptr->flags3 & (RF3_GOOD))
+ if (r_ptr->flags3 & RF3_GOOD)
{
/* Obvious */
if (seen) obvious = TRUE;
@@ -6431,8 +6431,8 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
case GF_DISP_LIVING:
{
/* Only affect non-undead */
- if (!(r_ptr->flags3 & (RF3_UNDEAD)) &&
- !(r_ptr->flags3 & (RF3_NONLIVING)))
+ if (!(r_ptr->flags3 & RF3_UNDEAD) &&
+ !(r_ptr->flags3 & RF3_NONLIVING))
{
/* Obvious */
if (seen) obvious = TRUE;
@@ -6459,7 +6459,7 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
case GF_DISP_DEMON:
{
/* Only affect demons */
- if (r_ptr->flags3 & (RF3_DEMON))
+ if (r_ptr->flags3 & RF3_DEMON)
{
/* Obvious */
if (seen) obvious = TRUE;
@@ -6526,9 +6526,9 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
if (seen) obvious = TRUE;
/* Check race */
- if ((r_ptr->flags1 & (RF1_UNIQUE)) ||
+ if ((r_ptr->flags1 & RF1_UNIQUE) ||
(m_ptr->mflag & MFLAG_QUEST) ||
- (!(r_ptr->flags3 & (RF3_DEMON))))
+ (!(r_ptr->flags3 & RF3_DEMON)))
{
/* No obvious effect */
note = " is unaffected!";
@@ -6597,7 +6597,7 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
/* "Unique" monsters cannot be polymorphed */
- if (r_ptr->flags1 & (RF1_UNIQUE)) do_poly = FALSE;
+ if (r_ptr->flags1 & RF1_UNIQUE) do_poly = FALSE;
/*
* "Quest" monsters cannot be polymorphed
@@ -6760,8 +6760,8 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
/* Sound and Impact breathers never stun */
else if (do_stun &&
- !(r_ptr->flags4 & (RF4_BR_SOUN)) &&
- !(r_ptr->flags4 & (RF4_BR_WALL)) && hurt_monster(m_ptr))
+ !(r_ptr->flags4 & RF4_BR_SOUN) &&
+ !(r_ptr->flags4 & RF4_BR_WALL) && hurt_monster(m_ptr))
{
/* Obvious */
if (seen) obvious = TRUE;
@@ -6784,9 +6784,9 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ)
/* Confusion and Chaos breathers (and sleepers) never confuse */
else if (do_conf &&
- !(r_ptr->flags3 & (RF3_NO_CONF)) &&
- !(r_ptr->flags4 & (RF4_BR_CONF)) &&
- !(r_ptr->flags4 & (RF4_BR_CHAO)) && hurt_monster(m_ptr))
+ !(r_ptr->flags3 & RF3_NO_CONF) &&
+ !(r_ptr->flags4 & RF4_BR_CONF) &&
+ !(r_ptr->flags4 & RF4_BR_CHAO) && hurt_monster(m_ptr))
{
/* Obvious */
if (seen) obvious = TRUE;
@@ -8487,7 +8487,7 @@ bool_ project(int who, int rad, int y, int x, int dam, int typ, int flg)
{
auto ref_ptr = m_list[cave[y][x].m_idx].race();
- if ((ref_ptr->flags2 & (RF2_REFLECTING)) && (randint(10) != 1)
+ if ((ref_ptr->flags2 & RF2_REFLECTING) && (randint(10) != 1)
&& (dist_hack > 1))
{
int t_y, t_x;
diff --git a/src/spells2.cc b/src/spells2.cc
index 5dfaa074..09374ceb 100644
--- a/src/spells2.cc
+++ b/src/spells2.cc
@@ -2484,7 +2484,7 @@ bool detect_objects_normal(int rad)
bool_ detect_monsters_normal(int rad)
{
auto predicate = [](monster_race *r_ptr) -> bool {
- return (!(r_ptr->flags2 & (RF2_INVISIBLE))) ||
+ return (!(r_ptr->flags2 & RF2_INVISIBLE)) ||
p_ptr->see_inv || p_ptr->tim_invis;
};
@@ -2507,7 +2507,7 @@ bool_ detect_monsters_normal(int rad)
bool_ detect_monsters_invis(int rad)
{
auto predicate = [](monster_race *r_ptr) -> bool {
- return (r_ptr->flags2 & (RF2_INVISIBLE));
+ return (r_ptr->flags2 & RF2_INVISIBLE);
};
if (detect_monsters_fn(rad, predicate))
@@ -3993,7 +3993,7 @@ bool_ genocide_aux(bool_ player_cast, char typ)
if (!m_ptr->r_idx) continue;
/* Hack -- Skip Unique Monsters */
- if (r_ptr->flags1 & (RF1_UNIQUE)) continue;
+ if (r_ptr->flags1 & RF1_UNIQUE) continue;
/* Hack -- Skip Quest Monsters */
if (m_ptr->mflag & MFLAG_QUEST) continue;
@@ -4119,7 +4119,7 @@ bool_ mass_genocide(bool_ player_cast)
if (!m_ptr->r_idx) continue;
/* Hack -- Skip unique monsters */
- if (r_ptr->flags1 & (RF1_UNIQUE)) continue;
+ if (r_ptr->flags1 & RF1_UNIQUE) continue;
/* Hack -- Skip Quest Monsters */
if (m_ptr->mflag & MFLAG_QUEST) continue;
@@ -4556,8 +4556,8 @@ void earthquake(int cy, int cx, int r)
auto const r_ptr = m_ptr->race();
/* Most monsters cannot co-exist with rock */
- if (!(r_ptr->flags2 & (RF2_KILL_WALL)) &&
- !(r_ptr->flags2 & (RF2_PASS_WALL)))
+ if (!(r_ptr->flags2 & RF2_KILL_WALL) &&
+ !(r_ptr->flags2 & RF2_PASS_WALL))
{
char m_name[80];
@@ -4565,7 +4565,7 @@ void earthquake(int cy, int cx, int r)
sn = 0;
/* Monster can move to escape the wall */
- if (!(r_ptr->flags1 & (RF1_NEVER_MOVE)))
+ if (!(r_ptr->flags1 & RF1_NEVER_MOVE))
{
/* Look for safety */
for (i = 0; i < 8; i++)
@@ -4807,10 +4807,10 @@ static void cave_temp_room_lite(void)
update_mon(c_ptr->m_idx, FALSE);
/* Stupid monsters rarely wake up */
- if (r_ptr->flags2 & (RF2_STUPID)) chance = 10;
+ if (r_ptr->flags2 & RF2_STUPID) chance = 10;
/* Smart monsters always wake up */
- if (r_ptr->flags2 & (RF2_SMART)) chance = 100;
+ if (r_ptr->flags2 & RF2_SMART) chance = 100;
/* Sometimes monsters wake up */
if (m_ptr->csleep && (rand_int(100) < chance))
diff --git a/src/traps.cc b/src/traps.cc
index 7b286434..7911ad2d 100644
--- a/src/traps.cc
+++ b/src/traps.cc
@@ -2823,9 +2823,9 @@ bool_ mon_hit_trap(int m_idx)
cptr note_dies = " dies.";
/* Some monsters get "destroyed" */
- if ((r_ptr->flags3 & (RF3_DEMON)) ||
- (r_ptr->flags3 & (RF3_UNDEAD)) ||
- (r_ptr->flags2 & (RF2_STUPID)) ||
+ if ((r_ptr->flags3 & RF3_DEMON) ||
+ (r_ptr->flags3 & RF3_UNDEAD) ||
+ (r_ptr->flags2 & RF2_STUPID) ||
(strchr("Evg", r_ptr->d_char)))
{
/* Special note at death */
diff --git a/src/wizard1.cc b/src/wizard1.cc
index 616a46cd..9624bcc2 100644
--- a/src/wizard1.cc
+++ b/src/wizard1.cc
@@ -1370,7 +1370,7 @@ static void spoil_mon_desc(cptr fname)
monster_race *r_ptr = &r_info[who_i];
/* Get the "name" */
- if (r_ptr->flags1 & (RF1_UNIQUE))
+ if (r_ptr->flags1 & RF1_UNIQUE)
{
sprintf(nam, "[U] %s", r_ptr->name);
}
@@ -1400,7 +1400,7 @@ static void spoil_mon_desc(cptr fname)
sprintf(ac, "%d", r_ptr->ac);
/* Hitpoints */
- if ((r_ptr->flags1 & (RF1_FORCE_MAXHP)) || (r_ptr->hside == 1))
+ if ((r_ptr->flags1 & RF1_FORCE_MAXHP) || (r_ptr->hside == 1))
{
sprintf(hp, "%d", r_ptr->hdice * r_ptr->hside);
}
@@ -1503,13 +1503,13 @@ static void spoil_mon_info(cptr fname)
magic = FALSE;
/* Extract a gender (if applicable) */
- if (flags1 & (RF1_FEMALE)) msex = 2;
- else if (flags1 & (RF1_MALE)) msex = 1;
+ if (flags1 & RF1_FEMALE) msex = 2;
+ else if (flags1 & RF1_MALE) msex = 1;
else msex = 0;
/* Prefix */
- if (flags1 & (RF1_UNIQUE))
+ if (flags1 & RF1_UNIQUE)
{
spoil_out("[U] ");
}
@@ -1558,7 +1558,7 @@ static void spoil_mon_info(cptr fname)
spoil_out(buf);
/* Hitpoints */
- if ((flags1 & (RF1_FORCE_MAXHP)) || (r_ptr->hside == 1))
+ if ((flags1 & RF1_FORCE_MAXHP) || (r_ptr->hside == 1))
{
sprintf(buf, "Hp:%d ", r_ptr->hdice * r_ptr->hside);
}
@@ -1584,18 +1584,18 @@ static void spoil_mon_info(cptr fname)
spoil_out("This");
- if (flags2 & (RF2_ELDRITCH_HORROR)) spoil_out (" sanity-blasting");
- if (flags3 & (RF3_ANIMAL)) spoil_out(" natural");
- if (flags3 & (RF3_EVIL)) spoil_out(" evil");
- if (flags3 & (RF3_GOOD)) spoil_out(" good");
- if (flags3 & (RF3_UNDEAD)) spoil_out(" undead");
-
- if (flags3 & (RF3_DRAGON)) spoil_out(" dragon");
- else if (flags3 & (RF3_DEMON)) spoil_out(" demon");
- else if (flags3 & (RF3_GIANT)) spoil_out(" giant");
- else if (flags3 & (RF3_TROLL)) spoil_out(" troll");
- else if (flags3 & (RF3_ORC)) spoil_out(" orc");
- else if (flags3 & (RF3_THUNDERLORD)) spoil_out (" Thunderlord");
+ if (flags2 & RF2_ELDRITCH_HORROR) spoil_out (" sanity-blasting");
+ if (flags3 & RF3_ANIMAL) spoil_out(" natural");
+ if (flags3 & RF3_EVIL) spoil_out(" evil");
+ if (flags3 & RF3_GOOD) spoil_out(" good");
+ if (flags3 & RF3_UNDEAD) spoil_out(" undead");
+
+ if (flags3 & RF3_DRAGON) spoil_out(" dragon");
+ else if (flags3 & RF3_DEMON) spoil_out(" demon");
+ else if (flags3 & RF3_GIANT) spoil_out(" giant");
+ else if (flags3 & RF3_TROLL) spoil_out(" troll");
+ else if (flags3 & RF3_ORC) spoil_out(" orc");
+ else if (flags3 & RF3_THUNDERLORD) spoil_out (" Thunderlord");
else spoil_out(" creature");
spoil_out(" moves");
@@ -1617,52 +1617,52 @@ static void spoil_mon_info(cptr fname)
spoil_out(" normally");
}
- if (flags1 & (RF1_NEVER_MOVE))
+ if (flags1 & RF1_NEVER_MOVE)
{
spoil_out(", but does not deign to chase intruders");
}
spoil_out(". ");
- if (!r_ptr->level || (flags1 & (RF1_FORCE_DEPTH)))
+ if (!r_ptr->level || (flags1 & RF1_FORCE_DEPTH))
{
sprintf(buf, "%s is never found out of depth. ", wd_che[msex]);
spoil_out(buf);
}
- if (flags1 & (RF1_FORCE_SLEEP))
+ if (flags1 & RF1_FORCE_SLEEP)
{
sprintf(buf, "%s is always created sluggish. ", wd_che[msex]);
spoil_out(buf);
}
- if (flags2 & (RF2_AURA_FIRE))
+ if (flags2 & RF2_AURA_FIRE)
{
sprintf(buf, "%s is surrounded by flames. ", wd_che[msex]);
spoil_out(buf);
}
- if (flags2 & (RF2_AURA_ELEC))
+ if (flags2 & RF2_AURA_ELEC)
{
sprintf(buf, "%s is surrounded by electricity. ", wd_che[msex]);
spoil_out(buf);
}
- if (flags2 & (RF2_REFLECTING))
+ if (flags2 & RF2_REFLECTING)
{
sprintf(buf, "%s reflects bolt spells. ", wd_che[msex]);
spoil_out(buf);
}
- if (flags1 & (RF1_ESCORT))
+ if (flags1 & RF1_ESCORT)
{
sprintf(buf, "%s usually appears with ", wd_che[msex]);
spoil_out(buf);
- if (flags1 & (RF1_ESCORTS)) spoil_out("escorts. ");
+ if (flags1 & RF1_ESCORTS) spoil_out("escorts. ");
else spoil_out("an escort. ");
}
- if ((flags1 & (RF1_FRIEND)) || (flags1 & (RF1_FRIENDS)))
+ if ((flags1 & RF1_FRIEND) || (flags1 & RF1_FRIENDS))
{
sprintf(buf, "%s usually appears in groups. ", wd_che[msex]);
spoil_out(buf);
@@ -1670,8 +1670,8 @@ static void spoil_mon_info(cptr fname)
/* Collect innate attacks */
vn = 0;
- if (flags4 & (RF4_SHRIEK)) vp[vn++] = "shriek for help";
- if (flags4 & (RF4_ROCKET)) vp[vn++] = "shoot a rocket";
+ if (flags4 & RF4_SHRIEK) vp[vn++] = "shriek for help";
+ if (flags4 & RF4_ROCKET) vp[vn++] = "shoot a rocket";
if (flags4 & (RF4_ARROW_1)) vp[vn++] = "fire arrows";
if (flags4 & (RF4_ARROW_2)) vp[vn++] = "fire arrows";
if (flags4 & (RF4_ARROW_3)) vp[vn++] = "fire missiles";
@@ -1692,28 +1692,28 @@ static void spoil_mon_info(cptr fname)
/* Collect breaths */
vn = 0;
- if (flags4 & (RF4_BR_ACID)) vp[vn++] = "acid";
- if (flags4 & (RF4_BR_ELEC)) vp[vn++] = "lightning";
- if (flags4 & (RF4_BR_FIRE)) vp[vn++] = "fire";
- if (flags4 & (RF4_BR_COLD)) vp[vn++] = "frost";
- if (flags4 & (RF4_BR_POIS)) vp[vn++] = "poison";
- if (flags4 & (RF4_BR_NETH)) vp[vn++] = "nether";
- if (flags4 & (RF4_BR_LITE)) vp[vn++] = "light";
- if (flags4 & (RF4_BR_DARK)) vp[vn++] = "darkness";
- if (flags4 & (RF4_BR_CONF)) vp[vn++] = "confusion";
- if (flags4 & (RF4_BR_SOUN)) vp[vn++] = "sound";
- if (flags4 & (RF4_BR_CHAO)) vp[vn++] = "chaos";
- if (flags4 & (RF4_BR_DISE)) vp[vn++] = "disenchantment";
- if (flags4 & (RF4_BR_NEXU)) vp[vn++] = "nexus";
- if (flags4 & (RF4_BR_TIME)) vp[vn++] = "time";
- if (flags4 & (RF4_BR_INER)) vp[vn++] = "inertia";
- if (flags4 & (RF4_BR_GRAV)) vp[vn++] = "gravity";
- if (flags4 & (RF4_BR_SHAR)) vp[vn++] = "shards";
- if (flags4 & (RF4_BR_PLAS)) vp[vn++] = "plasma";
- if (flags4 & (RF4_BR_WALL)) vp[vn++] = "force";
- if (flags4 & (RF4_BR_MANA)) vp[vn++] = "mana";
- if (flags4 & (RF4_BR_NUKE)) vp[vn++] = "toxic waste";
- if (flags4 & (RF4_BR_DISI)) vp[vn++] = "disintegration";
+ if (flags4 & RF4_BR_ACID) vp[vn++] = "acid";
+ if (flags4 & RF4_BR_ELEC) vp[vn++] = "lightning";
+ if (flags4 & RF4_BR_FIRE) vp[vn++] = "fire";
+ if (flags4 & RF4_BR_COLD) vp[vn++] = "frost";
+ if (flags4 & RF4_BR_POIS) vp[vn++] = "poison";
+ if (flags4 & RF4_BR_NETH) vp[vn++] = "nether";
+ if (flags4 & RF4_BR_LITE) vp[vn++] = "light";
+ if (flags4 & RF4_BR_DARK) vp[vn++] = "darkness";
+ if (flags4 & RF4_BR_CONF) vp[vn++] = "confusion";
+ if (flags4 & RF4_BR_SOUN) vp[vn++] = "sound";
+ if (flags4 & RF4_BR_CHAO) vp[vn++] = "chaos";
+ if (flags4 & RF4_BR_DISE) vp[vn++] = "disenchantment";
+ if (flags4 & RF4_BR_NEXU) vp[vn++] = "nexus";
+ if (flags4 & RF4_BR_TIME) vp[vn++] = "time";
+ if (flags4 & RF4_BR_INER) vp[vn++] = "inertia";
+ if (flags4 & RF4_BR_GRAV) vp[vn++] = "gravity";
+ if (flags4 & RF4_BR_SHAR) vp[vn++] = "shards";
+ if (flags4 & RF4_BR_PLAS) vp[vn++] = "plasma";
+ if (flags4 & RF4_BR_WALL) vp[vn++] = "force";
+ if (flags4 & RF4_BR_MANA) vp[vn++] = "mana";
+ if (flags4 & RF4_BR_NUKE) vp[vn++] = "toxic waste";
+ if (flags4 & RF4_BR_DISI) vp[vn++] = "disintegration";
if (vn)
{
@@ -1726,78 +1726,78 @@ static void spoil_mon_info(cptr fname)
else spoil_out(" or ");
spoil_out(vp[i]);
}
- if (flags2 & (RF2_POWERFUL)) spoil_out(" powerfully");
+ if (flags2 & RF2_POWERFUL) spoil_out(" powerfully");
}
/* Collect spells */
vn = 0;
- if (flags5 & (RF5_BA_ACID)) vp[vn++] = "produce acid balls";
- if (flags5 & (RF5_BA_ELEC)) vp[vn++] = "produce lightning balls";
- if (flags5 & (RF5_BA_FIRE)) vp[vn++] = "produce fire balls";
- if (flags5 & (RF5_BA_COLD)) vp[vn++] = "produce frost balls";
- if (flags5 & (RF5_BA_POIS)) vp[vn++] = "produce poison balls";
- if (flags5 & (RF5_BA_NETH)) vp[vn++] = "produce nether balls";
- if (flags5 & (RF5_BA_WATE)) vp[vn++] = "produce water balls";
- if (flags4 & (RF4_BA_NUKE)) vp[vn++] = "produce balls of radiation";
- if (flags5 & (RF5_BA_MANA)) vp[vn++] = "produce mana storms";
- if (flags5 & (RF5_BA_DARK)) vp[vn++] = "produce darkness storms";
- if (flags4 & (RF4_BA_CHAO)) vp[vn++] = "invoke raw Chaos";
- if (flags6 & (RF6_HAND_DOOM)) vp[vn++] = "invoke the Hand of Doom";
- if (flags5 & (RF5_DRAIN_MANA)) vp[vn++] = "drain mana";
- if (flags5 & (RF5_MIND_BLAST)) vp[vn++] = "cause mind blasting";
- if (flags5 & (RF5_BRAIN_SMASH)) vp[vn++] = "cause brain smashing";
+ if (flags5 & RF5_BA_ACID) vp[vn++] = "produce acid balls";
+ if (flags5 & RF5_BA_ELEC) vp[vn++] = "produce lightning balls";
+ if (flags5 & RF5_BA_FIRE) vp[vn++] = "produce fire balls";
+ if (flags5 & RF5_BA_COLD) vp[vn++] = "produce frost balls";
+ if (flags5 & RF5_BA_POIS) vp[vn++] = "produce poison balls";
+ if (flags5 & RF5_BA_NETH) vp[vn++] = "produce nether balls";
+ if (flags5 & RF5_BA_WATE) vp[vn++] = "produce water balls";
+ if (flags4 & RF4_BA_NUKE) vp[vn++] = "produce balls of radiation";
+ if (flags5 & RF5_BA_MANA) vp[vn++] = "produce mana storms";
+ if (flags5 & RF5_BA_DARK) vp[vn++] = "produce darkness storms";
+ if (flags4 & RF4_BA_CHAO) vp[vn++] = "invoke raw Chaos";
+ if (flags6 & RF6_HAND_DOOM) vp[vn++] = "invoke the Hand of Doom";
+ if (flags5 & RF5_DRAIN_MANA) vp[vn++] = "drain mana";
+ if (flags5 & RF5_MIND_BLAST) vp[vn++] = "cause mind blasting";
+ if (flags5 & RF5_BRAIN_SMASH) vp[vn++] = "cause brain smashing";
if (flags5 & (RF5_CAUSE_1)) vp[vn++] = "cause light wounds and cursing";
if (flags5 & (RF5_CAUSE_2)) vp[vn++] = "cause serious wounds and cursing";
if (flags5 & (RF5_CAUSE_3)) vp[vn++] = "cause critical wounds and cursing";
if (flags5 & (RF5_CAUSE_4)) vp[vn++] = "cause mortal wounds";
- if (flags5 & (RF5_BO_ACID)) vp[vn++] = "produce acid bolts";
- if (flags5 & (RF5_BO_ELEC)) vp[vn++] = "produce lightning bolts";
- if (flags5 & (RF5_BO_FIRE)) vp[vn++] = "produce fire bolts";
- if (flags5 & (RF5_BO_COLD)) vp[vn++] = "produce frost bolts";
- if (flags5 & (RF5_BO_POIS)) vp[vn++] = "produce poison bolts";
- if (flags5 & (RF5_BO_NETH)) vp[vn++] = "produce nether bolts";
- if (flags5 & (RF5_BO_WATE)) vp[vn++] = "produce water bolts";
- if (flags5 & (RF5_BO_MANA)) vp[vn++] = "produce mana bolts";
- if (flags5 & (RF5_BO_PLAS)) vp[vn++] = "produce plasma bolts";
- if (flags5 & (RF5_BO_ICEE)) vp[vn++] = "produce ice bolts";
- if (flags5 & (RF5_MISSILE)) vp[vn++] = "produce magic missiles";
- if (flags5 & (RF5_SCARE)) vp[vn++] = "terrify";
- if (flags5 & (RF5_BLIND)) vp[vn++] = "blind";
- if (flags5 & (RF5_CONF)) vp[vn++] = "confuse";
- if (flags5 & (RF5_SLOW)) vp[vn++] = "slow";
- if (flags5 & (RF5_HOLD)) vp[vn++] = "paralyse";
- if (flags6 & (RF6_HASTE)) vp[vn++] = "haste-self";
- if (flags6 & (RF6_HEAL)) vp[vn++] = "heal-self";
- if (flags6 & (RF6_BLINK)) vp[vn++] = "blink-self";
- if (flags6 & (RF6_TPORT)) vp[vn++] = "teleport-self";
- if (flags6 & (RF6_S_BUG)) vp[vn++] = "summon software bugs";
- if (flags6 & (RF6_S_RNG)) vp[vn++] = "summon RNGs";
- if (flags6 & (RF6_TELE_TO)) vp[vn++] = "teleport to";
- if (flags6 & (RF6_TELE_AWAY)) vp[vn++] = "teleport away";
- if (flags6 & (RF6_TELE_LEVEL)) vp[vn++] = "teleport level";
- if (flags6 & (RF6_DARKNESS)) vp[vn++] = "create darkness";
- if (flags6 & (RF6_TRAPS)) vp[vn++] = "create traps";
- if (flags6 & (RF6_FORGET)) vp[vn++] = "cause amnesia";
- if (flags6 & (RF6_RAISE_DEAD)) vp[vn++] = "raise dead";
- if (flags6 & (RF6_S_THUNDERLORD)) vp[vn++] = "summon a thunderlord";
- if (flags6 & (RF6_S_MONSTER)) vp[vn++] = "summon a monster";
- if (flags6 & (RF6_S_MONSTERS)) vp[vn++] = "summon monsters";
- if (flags6 & (RF6_S_KIN)) vp[vn++] = "summon aid";
- if (flags6 & (RF6_S_ANT)) vp[vn++] = "summon ants";
- if (flags6 & (RF6_S_SPIDER)) vp[vn++] = "summon spiders";
- if (flags6 & (RF6_S_HOUND)) vp[vn++] = "summon hounds";
- if (flags6 & (RF6_S_HYDRA)) vp[vn++] = "summon hydras";
- if (flags6 & (RF6_S_ANGEL)) vp[vn++] = "summon an angel";
- if (flags6 & (RF6_S_DEMON)) vp[vn++] = "summon a demon";
- if (flags6 & (RF6_S_UNDEAD)) vp[vn++] = "summon an undead";
- if (flags6 & (RF6_S_DRAGON)) vp[vn++] = "summon a dragon";
- if (flags4 & (RF4_S_ANIMAL)) vp[vn++] = "summon animal";
- if (flags6 & (RF6_S_ANIMALS)) vp[vn++] = "summon animals";
- if (flags6 & (RF6_S_HI_UNDEAD)) vp[vn++] = "summon greater undead";
- if (flags6 & (RF6_S_HI_DRAGON)) vp[vn++] = "summon ancient dragons";
- if (flags6 & (RF6_S_HI_DEMON)) vp[vn++] = "summon greater demons";
- if (flags6 & (RF6_S_WRAITH)) vp[vn++] = "summon Ringwraith";
- if (flags6 & (RF6_S_UNIQUE)) vp[vn++] = "summon unique monsters";
+ if (flags5 & RF5_BO_ACID) vp[vn++] = "produce acid bolts";
+ if (flags5 & RF5_BO_ELEC) vp[vn++] = "produce lightning bolts";
+ if (flags5 & RF5_BO_FIRE) vp[vn++] = "produce fire bolts";
+ if (flags5 & RF5_BO_COLD) vp[vn++] = "produce frost bolts";
+ if (flags5 & RF5_BO_POIS) vp[vn++] = "produce poison bolts";
+ if (flags5 & RF5_BO_NETH) vp[vn++] = "produce nether bolts";
+ if (flags5 & RF5_BO_WATE) vp[vn++] = "produce water bolts";
+ if (flags5 & RF5_BO_MANA) vp[vn++] = "produce mana bolts";
+ if (flags5 & RF5_BO_PLAS) vp[vn++] = "produce plasma bolts";
+ if (flags5 & RF5_BO_ICEE) vp[vn++] = "produce ice bolts";
+ if (flags5 & RF5_MISSILE) vp[vn++] = "produce magic missiles";
+ if (flags5 & RF5_SCARE) vp[vn++] = "terrify";
+ if (flags5 & RF5_BLIND) vp[vn++] = "blind";
+ if (flags5 & RF5_CONF) vp[vn++] = "confuse";
+ if (flags5 & RF5_SLOW) vp[vn++] = "slow";
+ if (flags5 & RF5_HOLD) vp[vn++] = "paralyse";
+ if (flags6 & RF6_HASTE) vp[vn++] = "haste-self";
+ if (flags6 & RF6_HEAL) vp[vn++] = "heal-self";
+ if (flags6 & RF6_BLINK) vp[vn++] = "blink-self";
+ if (flags6 & RF6_TPORT) vp[vn++] = "teleport-self";
+ if (flags6 & RF6_S_BUG) vp[vn++] = "summon software bugs";
+ if (flags6 & RF6_S_RNG) vp[vn++] = "summon RNGs";
+ if (flags6 & RF6_TELE_TO) vp[vn++] = "teleport to";
+ if (flags6 & RF6_TELE_AWAY) vp[vn++] = "teleport away";
+ if (flags6 & RF6_TELE_LEVEL) vp[vn++] = "teleport level";
+ if (flags6 & RF6_DARKNESS) vp[vn++] = "create darkness";
+ if (flags6 & RF6_TRAPS) vp[vn++] = "create traps";
+ if (flags6 & RF6_FORGET) vp[vn++] = "cause amnesia";
+ if (flags6 & RF6_RAISE_DEAD) vp[vn++] = "raise dead";
+ if (flags6 & RF6_S_THUNDERLORD) vp[vn++] = "summon a thunderlord";
+ if (flags6 & RF6_S_MONSTER) vp[vn++] = "summon a monster";
+ if (flags6 & RF6_S_MONSTERS) vp[vn++] = "summon monsters";
+ if (flags6 & RF6_S_KIN) vp[vn++] = "summon aid";
+ if (flags6 & RF6_S_ANT) vp[vn++] = "summon ants";
+ if (flags6 & RF6_S_SPIDER) vp[vn++] = "summon spiders";
+ if (flags6 & RF6_S_HOUND) vp[vn++] = "summon hounds";
+ if (flags6 & RF6_S_HYDRA) vp[vn++] = "summon hydras";
+ if (flags6 & RF6_S_ANGEL) vp[vn++] = "summon an angel";
+ if (flags6 & RF6_S_DEMON) vp[vn++] = "summon a demon";
+ if (flags6 & RF6_S_UNDEAD) vp[vn++] = "summon an undead";
+ if (flags6 & RF6_S_DRAGON) vp[vn++] = "summon a dragon";
+ if (flags4 & RF4_S_ANIMAL) vp[vn++] = "summon animal";
+ if (flags6 & RF6_S_ANIMALS) vp[vn++] = "summon animals";
+ if (flags6 & RF6_S_HI_UNDEAD) vp[vn++] = "summon greater undead";
+ if (flags6 & RF6_S_HI_DRAGON) vp[vn++] = "summon ancient dragons";
+ if (flags6 & RF6_S_HI_DEMON) vp[vn++] = "summon greater demons";
+ if (flags6 & RF6_S_WRAITH) vp[vn++] = "summon Ringwraith";
+ if (flags6 & RF6_S_UNIQUE) vp[vn++] = "summon unique monsters";
if (vn)
{
@@ -1813,7 +1813,7 @@ static void spoil_mon_info(cptr fname)
}
spoil_out(" magical, casting spells");
- if (flags2 & (RF2_SMART)) spoil_out(" intelligently");
+ if (flags2 & RF2_SMART) spoil_out(" intelligently");
for (i = 0; i < vn; i++)
{
@@ -1834,15 +1834,15 @@ static void spoil_mon_info(cptr fname)
/* Collect special abilities. */
vn = 0;
- if (flags2 & (RF2_OPEN_DOOR)) vp[vn++] = "open doors";
- if (flags2 & (RF2_BASH_DOOR)) vp[vn++] = "bash down doors";
- if (flags2 & (RF2_PASS_WALL)) vp[vn++] = "pass through walls";
- if (flags2 & (RF2_KILL_WALL)) vp[vn++] = "bore through walls";
- if (flags2 & (RF2_MOVE_BODY)) vp[vn++] = "push past weaker monsters";
- if (flags2 & (RF2_KILL_BODY)) vp[vn++] = "destroy weaker monsters";
- if (flags2 & (RF2_TAKE_ITEM)) vp[vn++] = "pick up objects";
- if (flags2 & (RF2_KILL_ITEM)) vp[vn++] = "destroy objects";
- if (flags9 & (RF9_HAS_LITE)) vp[vn++] = "illuminate the dungeon";
+ if (flags2 & RF2_OPEN_DOOR) vp[vn++] = "open doors";
+ if (flags2 & RF2_BASH_DOOR) vp[vn++] = "bash down doors";
+ if (flags2 & RF2_PASS_WALL) vp[vn++] = "pass through walls";
+ if (flags2 & RF2_KILL_WALL) vp[vn++] = "bore through walls";
+ if (flags2 & RF2_MOVE_BODY) vp[vn++] = "push past weaker monsters";
+ if (flags2 & RF2_KILL_BODY) vp[vn++] = "destroy weaker monsters";
+ if (flags2 & RF2_TAKE_ITEM) vp[vn++] = "pick up objects";
+ if (flags2 & RF2_KILL_ITEM) vp[vn++] = "destroy objects";
+ if (flags9 & RF9_HAS_LITE) vp[vn++] = "illuminate the dungeon";
if (vn)
{
@@ -1857,32 +1857,32 @@ static void spoil_mon_info(cptr fname)
spoil_out(". ");
}
- if (flags2 & (RF2_INVISIBLE))
+ if (flags2 & RF2_INVISIBLE)
{
spoil_out(wd_che[msex]);
spoil_out(" is invisible. ");
}
- if (flags2 & (RF2_COLD_BLOOD))
+ if (flags2 & RF2_COLD_BLOOD)
{
spoil_out(wd_che[msex]);
spoil_out(" is cold blooded. ");
}
- if (flags2 & (RF2_EMPTY_MIND))
+ if (flags2 & RF2_EMPTY_MIND)
{
spoil_out(wd_che[msex]);
spoil_out(" is not detected by telepathy. ");
}
- if (flags2 & (RF2_WEIRD_MIND))
+ if (flags2 & RF2_WEIRD_MIND)
{
spoil_out(wd_che[msex]);
spoil_out(" is rarely detected by telepathy. ");
}
- if (flags4 & (RF4_MULTIPLY))
+ if (flags4 & RF4_MULTIPLY)
{
spoil_out(wd_che[msex]);
spoil_out(" breeds explosively. ");
}
- if (flags2 & (RF2_REGENERATE))
+ if (flags2 & RF2_REGENERATE)
{
spoil_out(wd_che[msex]);
spoil_out(" regenerates quickly. ");
@@ -1890,10 +1890,10 @@ static void spoil_mon_info(cptr fname)
/* Collect susceptibilities */
vn = 0;
- if (flags3 & (RF3_HURT_ROCK)) vp[vn++] = "rock remover";
- if (flags3 & (RF3_HURT_LITE)) vp[vn++] = "bright light";
- if (flags3 & (RF3_SUSCEP_FIRE)) vp[vn++] = "fire";
- if (flags3 & (RF3_SUSCEP_COLD)) vp[vn++] = "cold";
+ if (flags3 & RF3_HURT_ROCK) vp[vn++] = "rock remover";
+ if (flags3 & RF3_HURT_LITE) vp[vn++] = "bright light";
+ if (flags3 & RF3_SUSCEP_FIRE) vp[vn++] = "fire";
+ if (flags3 & RF3_SUSCEP_COLD) vp[vn++] = "cold";
if (vn)
{
@@ -1910,11 +1910,11 @@ static void spoil_mon_info(cptr fname)
/* Collect immunities */
vn = 0;
- if (flags3 & (RF3_IM_ACID)) vp[vn++] = "acid";
- if (flags3 & (RF3_IM_ELEC)) vp[vn++] = "lightning";
- if (flags3 & (RF3_IM_FIRE)) vp[vn++] = "fire";
- if (flags3 & (RF3_IM_COLD)) vp[vn++] = "cold";
- if (flags3 & (RF3_IM_POIS)) vp[vn++] = "poison";
+ if (flags3 & RF3_IM_ACID) vp[vn++] = "acid";
+ if (flags3 & RF3_IM_ELEC) vp[vn++] = "lightning";
+ if (flags3 & RF3_IM_FIRE) vp[vn++] = "fire";
+ if (flags3 & RF3_IM_COLD) vp[vn++] = "cold";
+ if (flags3 & RF3_IM_POIS) vp[vn++] = "poison";
if (vn)
{
@@ -1931,12 +1931,12 @@ static void spoil_mon_info(cptr fname)
/* Collect resistances */
vn = 0;
- if (flags3 & (RF3_RES_NETH)) vp[vn++] = "nether";
- if (flags3 & (RF3_RES_WATE)) vp[vn++] = "water";
- if (flags3 & (RF3_RES_PLAS)) vp[vn++] = "plasma";
- if (flags3 & (RF3_RES_NEXU)) vp[vn++] = "nexus";
- if (flags3 & (RF3_RES_DISE)) vp[vn++] = "disenchantment";
- if (flags3 & (RF3_RES_TELE)) vp[vn++] = "teleportation";
+ if (flags3 & RF3_RES_NETH) vp[vn++] = "nether";
+ if (flags3 & RF3_RES_WATE) vp[vn++] = "water";
+ if (flags3 & RF3_RES_PLAS) vp[vn++] = "plasma";
+ if (flags3 & RF3_RES_NEXU) vp[vn++] = "nexus";
+ if (flags3 & RF3_RES_DISE) vp[vn++] = "disenchantment";
+ if (flags3 & RF3_RES_TELE) vp[vn++] = "teleportation";
if (vn)
{
@@ -1953,10 +1953,10 @@ static void spoil_mon_info(cptr fname)
/* Collect non-effects */
vn = 0;
- if (flags3 & (RF3_NO_STUN)) vp[vn++] = "stunned";
- if (flags3 & (RF3_NO_FEAR)) vp[vn++] = "frightened";
- if (flags3 & (RF3_NO_CONF)) vp[vn++] = "confused";
- if (flags3 & (RF3_NO_SLEEP)) vp[vn++] = "slept";
+ if (flags3 & RF3_NO_STUN) vp[vn++] = "stunned";
+ if (flags3 & RF3_NO_FEAR) vp[vn++] = "frightened";
+ if (flags3 & RF3_NO_CONF) vp[vn++] = "confused";
+ if (flags3 & RF3_NO_SLEEP) vp[vn++] = "slept";
if (vn)
{
@@ -2018,24 +2018,24 @@ static void spoil_mon_info(cptr fname)
spoil_out(buf);
}
- if (flags1 & (RF1_DROP_GREAT))
+ if (flags1 & RF1_DROP_GREAT)
{
if (sin) spoil_out("n");
spoil_out(" exceptional object");
}
- else if (flags1 & (RF1_DROP_GOOD))
+ else if (flags1 & RF1_DROP_GOOD)
{
spoil_out(" good object");
}
- else if (flags1 & (RF1_DROP_USEFUL))
+ else if (flags1 & RF1_DROP_USEFUL)
{
spoil_out(" useful object");
}
- else if (flags1 & (RF1_ONLY_ITEM))
+ else if (flags1 & RF1_ONLY_ITEM)
{
spoil_out(" object");
}
- else if (flags1 & (RF1_ONLY_GOLD))
+ else if (flags1 & RF1_ONLY_GOLD)
{
spoil_out(" treasure");
}
@@ -2048,7 +2048,7 @@ static void spoil_mon_info(cptr fname)
}
if (i > 1) spoil_out("s");
- if (flags1 & (RF1_DROP_CHOSEN))
+ if (flags1 & RF1_DROP_CHOSEN)
{
spoil_out(", in addition to chosen objects");
}
@@ -2295,7 +2295,7 @@ static void spoil_mon_info(cptr fname)
{
spoil_out(". ");
}
- else if (flags1 & (RF1_NEVER_BLOW))
+ else if (flags1 & RF1_NEVER_BLOW)
{
sprintf(buf, "%s has no physical attacks. ", wd_che[msex]);
spoil_out(buf);
diff --git a/src/xtra2.cc b/src/xtra2.cc
index 52e0fc7b..4f853928 100644
--- a/src/xtra2.cc
+++ b/src/xtra2.cc
@@ -2671,7 +2671,7 @@ void monster_death(int m_idx)
}
/* Mega-Hack -- drop "winner" treasures */
- else if (r_ptr->flags1 & (RF1_DROP_CHOSEN))
+ else if (r_ptr->flags1 & RF1_DROP_CHOSEN)
{
if (strstr(r_ptr->name, "Morgoth, Lord of Darkness"))
{
@@ -3074,7 +3074,7 @@ bool_ mon_take_hit(int m_idx, int dam, bool_ *fear, cptr note)
while (--curses);
}
- if (r_ptr->flags2 & (RF2_CAN_SPEAK))
+ if (r_ptr->flags2 & RF2_CAN_SPEAK)
{
char line_got[80];
/* Dump a message */
@@ -3100,10 +3100,10 @@ bool_ mon_take_hit(int m_idx, int dam, bool_ *fear, cptr note)
}
/* Death by Physical attack -- non-living monster */
- else if ((r_ptr->flags3 & (RF3_DEMON)) ||
- (r_ptr->flags3 & (RF3_UNDEAD)) ||
- (r_ptr->flags2 & (RF2_STUPID)) ||
- (r_ptr->flags3 & (RF3_NONLIVING)) ||
+ else if ((r_ptr->flags3 & RF3_DEMON) ||
+ (r_ptr->flags3 & RF3_UNDEAD) ||
+ (r_ptr->flags2 & RF2_STUPID) ||
+ (r_ptr->flags3 & RF3_NONLIVING) ||
(strchr("Evg", r_ptr->d_char)))
{
cmsg_format(TERM_L_RED, "You have destroyed %s.", m_name);
@@ -3164,7 +3164,7 @@ bool_ mon_take_hit(int m_idx, int dam, bool_ *fear, cptr note)
}
/* When the player kills a Unique, it stays dead */
- if (r_ptr->flags1 & (RF1_UNIQUE))
+ if (r_ptr->flags1 & RF1_UNIQUE)
{
r_ptr->max_num = 0;
}
@@ -3237,7 +3237,7 @@ bool_ mon_take_hit(int m_idx, int dam, bool_ *fear, cptr note)
* XXX XXX XXX Mega-Hack -- Remove random quest rendered
* impossible
*/
- if (r_ptr->flags1 & (RF1_UNIQUE))
+ if (r_ptr->flags1 & RF1_UNIQUE)
{
int i;
@@ -3276,7 +3276,7 @@ bool_ mon_take_hit(int m_idx, int dam, bool_ *fear, cptr note)
}
/* Recall even invisible uniques or winners */
- if (m_ptr->ml || (r_ptr->flags1 & (RF1_UNIQUE)))
+ if (m_ptr->ml || (r_ptr->flags1 & RF1_UNIQUE))
{
/* Count kills this life */
if (r_ptr->r_pkills < MAX_SHORT) r_ptr->r_pkills++;
@@ -3620,9 +3620,9 @@ static cptr look_mon_desc(int m_idx)
/* Determine if the monster is "living" (vs "undead") */
monster_type *m_ptr = &m_list[m_idx];
auto const r_ptr = m_ptr->race();
- if (r_ptr->flags3 & (RF3_UNDEAD)) living = FALSE;
- if (r_ptr->flags3 & (RF3_DEMON)) living = FALSE;
- if (r_ptr->flags3 & (RF3_NONLIVING)) living = FALSE;
+ if (r_ptr->flags3 & RF3_UNDEAD) living = FALSE;
+ if (r_ptr->flags3 & RF3_DEMON) living = FALSE;
+ if (r_ptr->flags3 & RF3_NONLIVING) living = FALSE;
if (strchr("Egv", r_ptr->d_char)) living = FALSE;
@@ -4137,8 +4137,8 @@ static int target_set_aux(int y, int x, int mode, cptr info)
s1 = "It is ";
/* Hack -- take account of gender */
- if (r_ptr->flags1 & (RF1_FEMALE)) s1 = "She is ";
- else if (r_ptr->flags1 & (RF1_MALE)) s1 = "He is ";
+ if (r_ptr->flags1 & RF1_FEMALE) s1 = "She is ";
+ else if (r_ptr->flags1 & RF1_MALE) s1 = "He is ";
/* Use a preposition */
s2 = "carrying ";