summaryrefslogtreecommitdiff
path: root/src/spells2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/spells2.c')
-rw-r--r--src/spells2.c330
1 files changed, 165 insertions, 165 deletions
diff --git a/src/spells2.c b/src/spells2.c
index 4455112e..80d55c44 100644
--- a/src/spells2.c
+++ b/src/spells2.c
@@ -91,9 +91,9 @@ void grow_grass(int rad)
/*
* Increase players hit points, notice effects
*/
-bool hp_player(int num)
+bool_ hp_player(int num)
{
- bool dead = p_ptr->chp < 0;
+ bool_ dead = p_ptr->chp < 0;
/* Healing needed */
if (p_ptr->chp < p_ptr->mhp)
@@ -225,9 +225,9 @@ static cptr desc_stat_neg[] =
/*
* Lose a "point"
*/
-bool do_dec_stat(int stat, int mode)
+bool_ do_dec_stat(int stat, int mode)
{
- bool sust = FALSE;
+ bool_ sust = FALSE;
/* Access the "sustain" */
switch (stat)
@@ -281,7 +281,7 @@ bool do_dec_stat(int stat, int mode)
/*
* Restore lost "points" in a stat
*/
-bool do_res_stat(int stat, bool full)
+bool_ do_res_stat(int stat, bool_ full)
{
/* Keep a copy of the current stat, so we can evaluate it if necessary */
int cur_stat = p_ptr->stat_cur[stat];
@@ -311,9 +311,9 @@ bool do_res_stat(int stat, bool full)
/*
* Gain a "point" in a stat
*/
-bool do_inc_stat(int stat)
+bool_ do_inc_stat(int stat)
{
- bool res;
+ bool_ res;
/* Restore strength */
res = res_stat(stat, TRUE);
@@ -427,7 +427,7 @@ static int enchant_table[16] =
1000
};
-bool remove_curse_object(object_type *o_ptr, bool all)
+bool_ remove_curse_object(object_type *o_ptr, bool_ all)
{
u32b f1, f2, f3, f4, f5, esp;
@@ -519,7 +519,7 @@ static int remove_curse_aux(int all)
/*
* Remove most curses
*/
-bool remove_curse(void)
+bool_ remove_curse(void)
{
return (remove_curse_aux(FALSE) ? TRUE : FALSE);
}
@@ -527,7 +527,7 @@ bool remove_curse(void)
/*
* Remove all curses
*/
-bool remove_all_curse(void)
+bool_ remove_all_curse(void)
{
return (remove_curse_aux(TRUE) ? TRUE : FALSE);
}
@@ -537,7 +537,7 @@ bool remove_all_curse(void)
/*
* Restores any drained experience
*/
-bool restore_level(void)
+bool_ restore_level(void)
{
/* Restore experience */
if (p_ptr->exp < p_ptr->max_exp)
@@ -560,12 +560,12 @@ bool restore_level(void)
}
-bool alchemy(void) /* Turns an object into gold, gain some of its value in a shop */
+bool_ alchemy(void) /* Turns an object into gold, gain some of its value in a shop */
{
int item, amt = 1;
int old_number;
long price;
- bool force = FALSE;
+ bool_ force = FALSE;
object_type *o_ptr;
char o_name[80];
char out_val[160];
@@ -1900,7 +1900,7 @@ void report_magics(void)
/*
* Forget everything
*/
-bool lose_all_info(void)
+bool_ lose_all_info(void)
{
int i;
@@ -1950,10 +1950,10 @@ bool lose_all_info(void)
/*
* Detect all traps on current panel
*/
-bool detect_traps(int rad)
+bool_ detect_traps(int rad)
{
int x, y;
- bool detect = FALSE;
+ bool_ detect = FALSE;
cave_type *c_ptr;
@@ -2018,11 +2018,11 @@ bool detect_traps(int rad)
/*
* Detect all doors on current panel
*/
-bool detect_doors(int rad)
+bool_ detect_doors(int rad)
{
int y, x;
- bool detect = FALSE;
+ bool_ detect = FALSE;
cave_type *c_ptr;
@@ -2083,11 +2083,11 @@ bool detect_doors(int rad)
/*
* Detect all stairs on current panel
*/
-bool detect_stairs(int rad)
+bool_ detect_stairs(int rad)
{
int y, x;
- bool detect = FALSE;
+ bool_ detect = FALSE;
cave_type *c_ptr;
@@ -2137,11 +2137,11 @@ bool detect_stairs(int rad)
/*
* Detect any treasure on the current panel
*/
-bool detect_treasure(int rad)
+bool_ detect_treasure(int rad)
{
int y, x;
- bool detect = FALSE;
+ bool_ detect = FALSE;
cave_type *c_ptr;
@@ -2204,12 +2204,12 @@ bool detect_treasure(int rad)
/*
* Detect all "gold" objects on the current panel
*/
-bool hack_no_detect_message = FALSE;
-bool detect_objects_gold(int rad)
+bool_ hack_no_detect_message = FALSE;
+bool_ detect_objects_gold(int rad)
{
int i, y, x;
- bool detect = FALSE;
+ bool_ detect = FALSE;
/* Scan objects */
@@ -2278,11 +2278,11 @@ bool detect_objects_gold(int rad)
/*
* Detect all "normal" objects on the current panel
*/
-bool detect_objects_normal(int rad)
+bool_ detect_objects_normal(int rad)
{
int i, y, x;
- bool detect = FALSE;
+ bool_ detect = FALSE;
/* Scan objects */
@@ -2357,11 +2357,11 @@ bool detect_objects_normal(int rad)
*
* It can probably be argued that this function is now too powerful.
*/
-bool detect_objects_magic(int rad)
+bool_ detect_objects_magic(int rad)
{
int i, y, x, tv;
- bool detect = FALSE;
+ bool_ detect = FALSE;
/* Scan all objects */
@@ -2434,11 +2434,11 @@ bool detect_objects_magic(int rad)
/*
* Detect all "normal" monsters on the current panel
*/
-bool detect_monsters_normal(int rad)
+bool_ detect_monsters_normal(int rad)
{
int i, y, x;
- bool flag = FALSE;
+ bool_ flag = FALSE;
/* Scan monsters */
@@ -2493,10 +2493,10 @@ bool detect_monsters_normal(int rad)
/*
* Detect all "invisible" monsters on current panel
*/
-bool detect_monsters_invis(int rad)
+bool_ detect_monsters_invis(int rad)
{
int i, y, x;
- bool flag = FALSE;
+ bool_ flag = FALSE;
/* Scan monsters */
for (i = 1; i < m_max; i++)
@@ -2560,10 +2560,10 @@ bool detect_monsters_invis(int rad)
/*
* Detect all "evil" monsters on current panel
*/
-bool detect_monsters_evil(int rad)
+bool_ detect_monsters_evil(int rad)
{
int i, y, x;
- bool flag = FALSE;
+ bool_ flag = FALSE;
/* Scan monsters */
@@ -2629,10 +2629,10 @@ bool detect_monsters_evil(int rad)
/*
* Detect all (string) monsters on current panel
*/
-bool detect_monsters_string(cptr chars, int rad)
+bool_ detect_monsters_string(cptr chars, int rad)
{
int i, y, x;
- bool flag = FALSE;
+ bool_ flag = FALSE;
/* Scan monsters */
@@ -2694,10 +2694,10 @@ bool detect_monsters_string(cptr chars, int rad)
/*
* A "generic" detect monsters routine, tagged to flags3
*/
-bool detect_monsters_xxx(u32b match_flag, int rad)
+bool_ detect_monsters_xxx(u32b match_flag, int rad)
{
int i, y, x;
- bool flag = FALSE;
+ bool_ flag = FALSE;
cptr desc_monsters = "weird monsters";
@@ -2773,7 +2773,7 @@ bool detect_monsters_xxx(u32b match_flag, int rad)
}
/* Detect good monsters */
-bool detect_monsters_good(int rad)
+bool_ detect_monsters_good(int rad)
{
return (detect_monsters_xxx(RF3_GOOD, rad));
}
@@ -2782,9 +2782,9 @@ bool detect_monsters_good(int rad)
/*
* Detect everything
*/
-bool detect_all(int rad)
+bool_ detect_all(int rad)
{
- bool detect = FALSE;
+ bool_ detect = FALSE;
/* Detect everything */
if (detect_traps(rad)) detect = TRUE;
@@ -2861,7 +2861,7 @@ void stair_creation(void)
/*
* Hook to specify "weapon"
*/
-static bool item_tester_hook_weapon(object_type *o_ptr)
+static bool_ item_tester_hook_weapon(object_type *o_ptr)
{
switch (o_ptr->tval)
{
@@ -2897,7 +2897,7 @@ static bool item_tester_hook_weapon(object_type *o_ptr)
/*
* Hook to specify "armour"
*/
-bool item_tester_hook_armour(object_type *o_ptr)
+bool_ item_tester_hook_armour(object_type *o_ptr)
{
switch (o_ptr->tval)
{
@@ -2933,7 +2933,7 @@ bool item_tester_hook_armour(object_type *o_ptr)
/*
* Check if an object is weapon or armour (but not arrow, bolt, or shot)
*/
-bool item_tester_hook_weapon_armour(object_type *o_ptr)
+bool_ item_tester_hook_weapon_armour(object_type *o_ptr)
{
return (item_tester_hook_weapon(o_ptr) ||
item_tester_hook_armour(o_ptr));
@@ -2942,7 +2942,7 @@ bool item_tester_hook_weapon_armour(object_type *o_ptr)
/*
* Check if an object is artifactable
*/
-bool item_tester_hook_artifactable(object_type *o_ptr)
+bool_ item_tester_hook_artifactable(object_type *o_ptr)
{
return ((item_tester_hook_weapon(o_ptr) ||
item_tester_hook_armour(o_ptr) ||
@@ -2968,11 +2968,11 @@ bool item_tester_hook_artifactable(object_type *o_ptr)
* Note that this function can now be used on "piles" of items, and
* the larger the pile, the lower the chance of success.
*/
-bool enchant(object_type *o_ptr, int n, int eflag)
+bool_ enchant(object_type *o_ptr, int n, int eflag)
{
int i, chance, prob;
- bool res = FALSE;
- bool a = (artifact_p(o_ptr) || o_ptr->art_name);
+ bool_ res = FALSE;
+ bool_ a = (artifact_p(o_ptr) || o_ptr->art_name);
u32b f1, f2, f3, f4, f5, esp;
@@ -3145,10 +3145,10 @@ bool enchant(object_type *o_ptr, int n, int eflag)
* Note that "num_ac" requires armour, else weapon
* Returns TRUE if attempted, FALSE if cancelled
*/
-bool enchant_spell(int num_hit, int num_dam, int num_ac, int num_pval)
+bool_ enchant_spell(int num_hit, int num_dam, int num_ac, int num_pval)
{
int item;
- bool okay = FALSE;
+ bool_ okay = FALSE;
object_type *o_ptr;
char o_name[80];
cptr q, s;
@@ -3227,7 +3227,7 @@ void curse_artifact(object_type * o_ptr)
* Should be merged with randart code.
* looks like BASIC coder's work...
*/
-void random_plus(object_type * o_ptr, bool is_scroll)
+void random_plus(object_type * o_ptr, bool_ is_scroll)
{
int this_type = (o_ptr->tval < TV_BOOTS ? 23 : 19);
@@ -3449,7 +3449,7 @@ void random_plus(object_type * o_ptr, bool is_scroll)
}
-void random_resistance (object_type * o_ptr, bool is_scroll, int specific)
+void random_resistance (object_type * o_ptr, bool_ is_scroll, int specific)
{
/* To avoid a number of possible bugs */
if (!specific)
@@ -3753,7 +3753,7 @@ void random_resistance (object_type * o_ptr, bool is_scroll, int specific)
}
}
-void random_misc(object_type * o_ptr, bool is_scroll)
+void random_misc(object_type * o_ptr, bool_ is_scroll)
{
if (artifact_bias == BIAS_RANGER)
@@ -3964,7 +3964,7 @@ void random_misc(object_type * o_ptr, bool is_scroll)
}
-void random_slay (object_type * o_ptr, bool is_scroll)
+void random_slay (object_type * o_ptr, bool_ is_scroll)
{
if (artifact_bias == BIAS_CHAOS && !(o_ptr->tval == TV_BOW))
{
@@ -4250,7 +4250,7 @@ void random_slay (object_type * o_ptr, bool is_scroll)
/*
* Determines if an item is not identified
*/
-static bool item_tester_hook_unknown(object_type *o_ptr)
+static bool_ item_tester_hook_unknown(object_type *o_ptr)
{
return (object_known_p(o_ptr) ? FALSE : TRUE);
}
@@ -4261,7 +4261,7 @@ static bool item_tester_hook_unknown(object_type *o_ptr)
* This routine does *not* automatically combine objects.
* Returns TRUE if something was identified, else FALSE.
*/
-bool ident_spell(void)
+bool_ ident_spell(void)
{
int item;
@@ -4344,7 +4344,7 @@ bool ident_spell(void)
/*
* Identify all objects in the level
*/
-bool ident_all(void)
+bool_ ident_all(void)
{
int i;
@@ -4383,7 +4383,7 @@ bool ident_all(void)
/*
* Determine if an object is not fully identified
*/
-static bool item_tester_hook_no_mental(object_type *o_ptr)
+static bool_ item_tester_hook_no_mental(object_type *o_ptr)
{
return ((o_ptr->ident & (IDENT_MENTAL)) ? FALSE : TRUE);
}
@@ -4392,7 +4392,7 @@ static bool item_tester_hook_no_mental(object_type *o_ptr)
* Fully "identify" an object in the inventory -BEN-
* This routine returns TRUE if an item was identified.
*/
-bool identify_fully(void)
+bool_ identify_fully(void)
{
int item;
object_type *o_ptr;
@@ -4478,7 +4478,7 @@ bool identify_fully(void)
/*
* Hook for "get_item()". Determine if something is rechargable.
*/
-bool item_tester_hook_recharge(object_type *o_ptr)
+bool_ item_tester_hook_recharge(object_type *o_ptr)
{
u32b f1, f2, f3, f4, f5, esp;
@@ -4522,12 +4522,12 @@ bool item_tester_hook_recharge(object_type *o_ptr)
*
* XXX XXX XXX Beware of "sliding index errors".
*/
-bool recharge(int power)
+bool_ recharge(int power)
{
int recharge_strength, recharge_amount;
int item, lev;
- bool fail = FALSE;
+ bool_ fail = FALSE;
byte fail_type = 1;
@@ -4823,11 +4823,11 @@ bool recharge(int power)
*
* Note that affected monsters are NOT auto-tracked by this usage.
*/
-bool project_hack(int typ, int dam)
+bool_ project_hack(int typ, int dam)
{
int i, x, y;
int flg = PROJECT_JUMP | PROJECT_KILL | PROJECT_HIDE;
- bool obvious = FALSE;
+ bool_ obvious = FALSE;
/* Affect all (nearby) monsters */
@@ -4891,7 +4891,7 @@ void project_meteor(int radius, int typ, int dam, u32b flg)
/*
* Speed monsters
*/
-bool speed_monsters(void)
+bool_ speed_monsters(void)
{
return (project_hack(GF_OLD_SPEED, p_ptr->lev));
}
@@ -4899,7 +4899,7 @@ bool speed_monsters(void)
/*
* Slow monsters
*/
-bool slow_monsters(void)
+bool_ slow_monsters(void)
{
return (project_hack(GF_OLD_SLOW, p_ptr->lev));
}
@@ -4907,7 +4907,7 @@ bool slow_monsters(void)
/*
* Paralyzation monsters
*/
-bool conf_monsters(void)
+bool_ conf_monsters(void)
{
return (project_hack(GF_OLD_CONF, p_ptr->lev));
}
@@ -4915,7 +4915,7 @@ bool conf_monsters(void)
/*
* Sleep monsters
*/
-bool sleep_monsters(void)
+bool_ sleep_monsters(void)
{
return (project_hack(GF_OLD_SLEEP, p_ptr->lev));
}
@@ -4923,7 +4923,7 @@ bool sleep_monsters(void)
/*
* Scare monsters
*/
-bool scare_monsters(void)
+bool_ scare_monsters(void)
{
return (project_hack(GF_FEAR, p_ptr->lev));
}
@@ -4932,7 +4932,7 @@ bool scare_monsters(void)
/*
* Banish evil monsters
*/
-bool banish_evil(int dist)
+bool_ banish_evil(int dist)
{
return (project_hack(GF_AWAY_EVIL, dist));
}
@@ -4941,7 +4941,7 @@ bool banish_evil(int dist)
/*
* Turn undead
*/
-bool turn_undead(void)
+bool_ turn_undead(void)
{
return (project_hack(GF_TURN_UNDEAD, p_ptr->lev));
}
@@ -4950,7 +4950,7 @@ bool turn_undead(void)
/*
* Dispel undead monsters
*/
-bool dispel_undead(int dam)
+bool_ dispel_undead(int dam)
{
return (project_hack(GF_DISP_UNDEAD, dam));
}
@@ -4958,7 +4958,7 @@ bool dispel_undead(int dam)
/*
* Dispel evil monsters
*/
-bool dispel_evil(int dam)
+bool_ dispel_evil(int dam)
{
return (project_hack(GF_DISP_EVIL, dam));
}
@@ -4966,7 +4966,7 @@ bool dispel_evil(int dam)
/*
* Dispel good monsters
*/
-bool dispel_good(int dam)
+bool_ dispel_good(int dam)
{
return (project_hack(GF_DISP_GOOD, dam));
}
@@ -4974,7 +4974,7 @@ bool dispel_good(int dam)
/*
* Dispel all monsters
*/
-bool dispel_monsters(int dam)
+bool_ dispel_monsters(int dam)
{
return (project_hack(GF_DISP_ALL, dam));
}
@@ -4982,7 +4982,7 @@ bool dispel_monsters(int dam)
/*
* Dispel 'living' monsters
*/
-bool dispel_living(int dam)
+bool_ dispel_living(int dam)
{
return (project_hack(GF_DISP_LIVING, dam));
}
@@ -4990,7 +4990,7 @@ bool dispel_living(int dam)
/*
* Dispel demons
*/
-bool dispel_demons(int dam)
+bool_ dispel_demons(int dam)
{
return (project_hack(GF_DISP_DEMON, dam));
}
@@ -5002,8 +5002,8 @@ bool dispel_demons(int dam)
void aggravate_monsters(int who)
{
int i;
- bool sleep = FALSE;
- bool speed = FALSE;
+ bool_ sleep = FALSE;
+ bool_ speed = FALSE;
/* Aggravate everyone nearby */
@@ -5060,7 +5060,7 @@ void aggravate_monsters(int who)
/*
* Generic genocide race selection
*/
-bool get_genocide_race(cptr msg, char *typ)
+bool_ get_genocide_race(cptr msg, char *typ)
{
int i, j;
cave_type *c_ptr;
@@ -5086,11 +5086,11 @@ bool get_genocide_race(cptr msg, char *typ)
/*
* Inflict dam damage of type typee to all monster of the given race
*/
-bool invoke(int dam, int typee)
+bool_ invoke(int dam, int typee)
{
int i;
char typ;
- bool result = FALSE;
+ bool_ result = FALSE;
int msec = delay_factor * delay_factor * delay_factor;
if (dungeon_flags2 & DF2_NO_GENO) return (FALSE);
@@ -5151,10 +5151,10 @@ bool invoke(int dam, int typee)
/*
* Delete all non-unique/non-quest monsters of a given "type" from the level
*/
-bool genocide_aux(bool player_cast, char typ)
+bool_ genocide_aux(bool_ player_cast, char typ)
{
int i;
- bool result = FALSE;
+ bool_ result = FALSE;
int msec = delay_factor * delay_factor * delay_factor;
int dam = 0;
@@ -5244,7 +5244,7 @@ bool genocide_aux(bool player_cast, char typ)
return (result);
}
-bool genocide(bool player_cast)
+bool_ genocide(bool_ player_cast)
{
char typ;
@@ -5267,10 +5267,10 @@ bool genocide(bool player_cast)
/*
* Delete all nearby (non-unique) monsters
*/
-bool mass_genocide(bool player_cast)
+bool_ mass_genocide(bool_ player_cast)
{
int i;
- bool result = FALSE;
+ bool_ result = FALSE;
int msec = delay_factor * delay_factor * delay_factor;
int dam = 0;
@@ -5410,11 +5410,11 @@ void do_probe(int m_idx)
/*
* Probe nearby monsters
*/
-bool probing(void)
+bool_ probing(void)
{
int i;
- bool probe = FALSE;
+ bool_ probe = FALSE;
/* Probe all (nearby) monsters */
@@ -5462,7 +5462,7 @@ void wipe(int y1, int x1, int r)
cave_type *c_ptr;
- bool flag = FALSE;
+ bool_ flag = FALSE;
if (dungeon_flags2 & DF2_NO_GENO)
{
@@ -5544,13 +5544,13 @@ void wipe(int y1, int x1, int r)
* Later we may use one function for both "destruction" and
* "earthquake" by using the "full" to select "destruction".
*/
-void destroy_area(int y1, int x1, int r, bool full, bool bypass)
+void destroy_area(int y1, int x1, int r, bool_ full, bool_ bypass)
{
int y, x, k, t;
cave_type *c_ptr;
- bool flag = FALSE;
+ bool_ flag = FALSE;
/* XXX XXX */
@@ -5704,9 +5704,9 @@ void earthquake(int cy, int cx, int r)
int i, t, y, x, yy, xx, dy, dx, oy, ox;
int damage = 0;
int sn = 0, sy = 0, sx = 0;
- bool hurt = FALSE;
+ bool_ hurt = FALSE;
cave_type *c_ptr;
- bool map[32][32];
+ bool_ map[32][32];
if (p_ptr->inside_quest)
{
@@ -6022,7 +6022,7 @@ void earthquake(int cy, int cx, int r)
/* Destroy location (if valid) */
if (cave_valid_bold(yy, xx))
{
- bool floor = cave_floor_bold(yy, xx);
+ bool_ floor = cave_floor_bold(yy, xx);
/* Delete objects */
delete_object(yy, xx);
@@ -6350,7 +6350,7 @@ void unlite_room(int y1, int x1)
* Hack -- call light around the player
* Affect all monsters in the projection radius
*/
-bool lite_area(int dam, int rad)
+bool_ lite_area(int dam, int rad)
{
int flg = PROJECT_GRID | PROJECT_KILL;
@@ -6375,7 +6375,7 @@ bool lite_area(int dam, int rad)
* Hack -- call darkness around the player
* Affect all monsters in the projection radius
*/
-bool unlite_area(int dam, int rad)
+bool_ unlite_area(int dam, int rad)
{
int flg = PROJECT_GRID | PROJECT_KILL;
@@ -6402,7 +6402,7 @@ bool unlite_area(int dam, int rad)
* Allow "target" mode to pass over monsters
* Affect grids, objects, and monsters
*/
-bool fire_ball(int typ, int dir, int dam, int rad)
+bool_ fire_ball(int typ, int dir, int dam, int rad)
{
int tx, ty;
@@ -6430,7 +6430,7 @@ bool fire_ball(int typ, int dir, int dam, int rad)
* Allow "target" mode to pass over monsters
* Affect grids, objects, and monsters
*/
-bool fire_cloud(int typ, int dir, int dam, int rad, int time)
+bool_ fire_cloud(int typ, int dir, int dam, int rad, int time)
{
int tx, ty;
@@ -6459,7 +6459,7 @@ bool fire_cloud(int typ, int dir, int dam, int rad, int time)
* Allow "target" mode to pass over monsters
* Affect grids, objects, and monsters
*/
-bool fire_wave(int typ, int dir, int dam, int rad, int time, s32b eff)
+bool_ fire_wave(int typ, int dir, int dam, int rad, int time, s32b eff)
{
project_time_effect = eff;
return (fire_cloud(typ, dir, dam, rad, time));
@@ -6470,7 +6470,7 @@ bool fire_wave(int typ, int dir, int dam, int rad, int time, s32b eff)
* Pass through monsters, as a "beam"
* Affect monsters (not grids or objects)
*/
-bool fire_wall(int typ, int dir, int dam, int time)
+bool_ fire_wall(int typ, int dir, int dam, int time)
{
int flg = PROJECT_BEAM | PROJECT_KILL | PROJECT_STAY | PROJECT_GRID;
project_time = time;
@@ -6483,7 +6483,7 @@ bool fire_wall(int typ, int dir, int dam, int time)
* Allow "target" mode to pass over monsters
* Affect grids, objects, and monsters
*/
-bool fire_druid_ball(int typ, int dir, int dam, int rad)
+bool_ fire_druid_ball(int typ, int dir, int dam, int rad)
{
int tx, ty;
@@ -6512,7 +6512,7 @@ bool fire_druid_ball(int typ, int dir, int dam, int rad)
* Allow "target" mode to pass over monsters
* Affect grids, objects, and monsters
*/
-bool fire_ball_beam(int typ, int dir, int dam, int rad)
+bool_ fire_ball_beam(int typ, int dir, int dam, int rad)
{
int tx, ty;
@@ -6749,7 +6749,7 @@ void swap_position(int lty, int ltx)
/*
* Hack -- apply a "projection()" in a direction (or at the target)
*/
-bool project_hook(int typ, int dir, int dam, int flg)
+bool_ project_hook(int typ, int dir, int dam, int flg)
{
int tx, ty;
@@ -6777,7 +6777,7 @@ bool project_hook(int typ, int dir, int dam, int flg)
* Stop if we hit a monster, as a "bolt"
* Affect monsters (not grids or objects)
*/
-bool fire_bolt(int typ, int dir, int dam)
+bool_ fire_bolt(int typ, int dir, int dam)
{
int flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(typ, dir, dam, flg));
@@ -6788,7 +6788,7 @@ bool fire_bolt(int typ, int dir, int dam)
* Stop if we hit a monster, as a "bolt"
* Affect monsters (not grids or objects)
*/
-bool fire_druid_bolt(int typ, int dir, int dam)
+bool_ fire_druid_bolt(int typ, int dir, int dam)
{
int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_MANA_PATH;
return (project_hook(typ, dir, dam, flg));
@@ -6800,7 +6800,7 @@ bool fire_druid_bolt(int typ, int dir, int dam)
* Pass through monsters, as a "beam"
* Affect monsters (not grids or objects)
*/
-bool fire_druid_beam(int typ, int dir, int dam)
+bool_ fire_druid_beam(int typ, int dir, int dam)
{
int flg = PROJECT_BEAM | PROJECT_KILL | PROJECT_MANA_PATH;
return (project_hook(typ, dir, dam, flg));
@@ -6811,7 +6811,7 @@ bool fire_druid_beam(int typ, int dir, int dam)
* Pass through monsters, as a "beam"
* Affect monsters (not grids or objects)
*/
-bool fire_beam(int typ, int dir, int dam)
+bool_ fire_beam(int typ, int dir, int dam)
{
int flg = PROJECT_BEAM | PROJECT_KILL;
return (project_hook(typ, dir, dam, flg));
@@ -6821,7 +6821,7 @@ bool fire_beam(int typ, int dir, int dam)
/*
* Cast a bolt spell, or rarely, a beam spell
*/
-bool fire_bolt_or_beam(int prob, int typ, int dir, int dam)
+bool_ fire_bolt_or_beam(int prob, int typ, int dir, int dam)
{
if (rand_int(100) < prob)
{
@@ -6833,14 +6833,14 @@ bool fire_bolt_or_beam(int prob, int typ, int dir, int dam)
}
}
-bool fire_godly_wrath(int y, int x, int typ, int rad, int dam)
+bool_ fire_godly_wrath(int y, int x, int typ, int rad, int dam)
{
int flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
return (project(0, rad, y, x, dam, typ, flg));
}
-bool fire_explosion(int y, int x, int typ, int rad, int dam)
+bool_ fire_explosion(int y, int x, int typ, int rad, int dam)
{
int flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
@@ -6850,126 +6850,126 @@ bool fire_explosion(int y, int x, int typ, int rad, int dam)
/*
* Some of the old functions
*/
-bool lite_line(int dir)
+bool_ lite_line(int dir)
{
int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_KILL;
return (project_hook(GF_LITE_WEAK, dir, damroll(6, 8), flg));
}
-bool drain_life(int dir, int dam)
+bool_ drain_life(int dir, int dam)
{
int flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(GF_OLD_DRAIN, dir, dam, flg));
}
-bool wall_to_mud(int dir)
+bool_ wall_to_mud(int dir)
{
int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
return (project_hook(GF_KILL_WALL, dir, 20 + randint(30), flg));
}
-bool wizard_lock(int dir)
+bool_ wizard_lock(int dir)
{
int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
return (project_hook(GF_JAM_DOOR, dir, 20 + randint(30), flg));
}
-bool destroy_door(int dir)
+bool_ destroy_door(int dir)
{
int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM;
return (project_hook(GF_KILL_DOOR, dir, 0, flg));
}
-bool disarm_trap(int dir)
+bool_ disarm_trap(int dir)
{
int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM;
return (project_hook(GF_KILL_TRAP, dir, 0, flg));
}
-bool heal_monster(int dir)
+bool_ heal_monster(int dir)
{
int flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(GF_OLD_HEAL, dir, damroll(4, 6), flg));
}
-bool speed_monster(int dir)
+bool_ speed_monster(int dir)
{
int flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(GF_OLD_SPEED, dir, p_ptr->lev, flg));
}
-bool slow_monster(int dir)
+bool_ slow_monster(int dir)
{
int flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(GF_OLD_SLOW, dir, p_ptr->lev, flg));
}
-bool sleep_monster(int dir)
+bool_ sleep_monster(int dir)
{
int flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(GF_OLD_SLEEP, dir, p_ptr->lev, flg));
}
-bool stasis_monster(int dir)
+bool_ stasis_monster(int dir)
{
int flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(GF_STASIS, dir, p_ptr->lev, flg));
}
-bool confuse_monster(int dir, int plev)
+bool_ confuse_monster(int dir, int plev)
{
int flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(GF_OLD_CONF, dir, plev, flg));
}
-bool stun_monster(int dir, int plev)
+bool_ stun_monster(int dir, int plev)
{
int flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(GF_STUN, dir, plev, flg));
}
-bool poly_monster(int dir)
+bool_ poly_monster(int dir)
{
int flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(GF_OLD_POLY, dir, p_ptr->lev, flg));
}
-bool clone_monster(int dir)
+bool_ clone_monster(int dir)
{
int flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(GF_OLD_CLONE, dir, 0, flg));
}
-bool fear_monster(int dir, int plev)
+bool_ fear_monster(int dir, int plev)
{
int flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(GF_TURN_ALL, dir, plev, flg));
}
-bool death_ray(int dir, int plev)
+bool_ death_ray(int dir, int plev)
{
int flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(GF_DEATH_RAY, dir, plev, flg));
}
-bool teleport_monster(int dir)
+bool_ teleport_monster(int dir)
{
int flg = PROJECT_BEAM | PROJECT_KILL;
@@ -6986,34 +6986,34 @@ bool teleport_monster(int dir)
/*
* Hooks -- affect adjacent grids (radius 1 ball attack)
*/
-bool door_creation(void)
+bool_ door_creation(void)
{
int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
return (project(0, 1, p_ptr->py, p_ptr->px, 0, GF_MAKE_DOOR, flg));
}
-bool trap_creation(void)
+bool_ trap_creation(void)
{
int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
return (project(0, 1, p_ptr->py, p_ptr->px, 0, GF_MAKE_TRAP, flg));
}
-bool glyph_creation(void)
+bool_ glyph_creation(void)
{
int flg = PROJECT_GRID | PROJECT_ITEM;
return (project(0, 1, p_ptr->py, p_ptr->px, 0, GF_MAKE_GLYPH, flg));
}
-bool wall_stone(int y, int x)
+bool_ wall_stone(int y, int x)
{
cave_type *c_ptr = &cave[y][x];
int flg = PROJECT_GRID | PROJECT_ITEM;
int featflags = f_info[c_ptr->feat].flags1;
- bool dummy = (project(0, 1, y, x, 0, GF_STONE_WALL, flg));
+ bool_ dummy = (project(0, 1, y, x, 0, GF_STONE_WALL, flg));
if (!(featflags & FF1_PERMANENT) && !(featflags & FF1_WALL))
cave_set_feat(y, x, FEAT_FLOOR);
@@ -7034,19 +7034,19 @@ bool wall_stone(int y, int x)
}
-bool destroy_doors_touch(void)
+bool_ destroy_doors_touch(void)
{
int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
return (project(0, 1, p_ptr->py, p_ptr->px, 0, GF_KILL_DOOR, flg));
}
-bool destroy_traps_touch(void)
+bool_ destroy_traps_touch(void)
{
int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
return (project(0, 1, p_ptr->py, p_ptr->px, 0, GF_KILL_TRAP, flg));
}
-bool sleep_monsters_touch(void)
+bool_ sleep_monsters_touch(void)
{
int flg = PROJECT_KILL | PROJECT_HIDE;
return (project(0, 1, p_ptr->py, p_ptr->px, p_ptr->lev, GF_OLD_SLEEP, flg));
@@ -7057,7 +7057,7 @@ void call_chaos(void)
{
int Chaos_type, dummy, dir;
int plev = p_ptr->lev;
- bool line_chaos = FALSE;
+ bool_ line_chaos = FALSE;
int hurt_types[30] =
{
@@ -7110,7 +7110,7 @@ void call_chaos(void)
void activate_ty_curse(void)
{
int i = 0;
- bool stop_ty = FALSE;
+ bool_ stop_ty = FALSE;
do
{
@@ -7189,7 +7189,7 @@ case 21: case 22: case 23:
void activate_dg_curse(void)
{
int i = 0;
- bool stop_dg = FALSE;
+ bool_ stop_dg = FALSE;
do
{
@@ -7507,7 +7507,7 @@ void bless_weapon(void)
}
else
{
- bool dis_happened = FALSE;
+ bool_ dis_happened = FALSE;
msg_print("The artifact resists your blessing!");
@@ -7558,10 +7558,10 @@ void bless_weapon(void)
/*
* Detect all "nonliving", "undead" or "demonic" monsters on current panel
*/
-bool detect_monsters_nonliving(int rad)
+bool_ detect_monsters_nonliving(int rad)
{
int i, y, x;
- bool flag = FALSE;
+ bool_ flag = FALSE;
/* Scan monsters */
for (i = 1; i < m_max; i++)
@@ -7623,7 +7623,7 @@ bool detect_monsters_nonliving(int rad)
/*
* Confuse monsters
*/
-bool confuse_monsters(int dam)
+bool_ confuse_monsters(int dam)
{
return (project_hack(GF_OLD_CONF, dam));
}
@@ -7632,7 +7632,7 @@ bool confuse_monsters(int dam)
/*
* Charm monsters
*/
-bool charm_monsters(int dam)
+bool_ charm_monsters(int dam)
{
return (project_hack(GF_CHARM, dam));
}
@@ -7641,7 +7641,7 @@ bool charm_monsters(int dam)
/*
* Charm animals
*/
-bool charm_animals(int dam)
+bool_ charm_animals(int dam)
{
return (project_hack(GF_CONTROL_ANIMAL, dam));
}
@@ -7649,7 +7649,7 @@ bool charm_animals(int dam)
/*
* Charm demons
*/
-bool charm_demons(int dam)
+bool_ charm_demons(int dam)
{
return (project_hack(GF_CONTROL_DEMON, dam));
}
@@ -7658,7 +7658,7 @@ bool charm_demons(int dam)
/*
* Stun monsters
*/
-bool stun_monsters(int dam)
+bool_ stun_monsters(int dam)
{
return (project_hack(GF_STUN, dam));
}
@@ -7667,7 +7667,7 @@ bool stun_monsters(int dam)
/*
* Stasis monsters
*/
-bool stasis_monsters(int dam)
+bool_ stasis_monsters(int dam)
{
return (project_hack(GF_STASIS, dam));
}
@@ -7676,7 +7676,7 @@ bool stasis_monsters(int dam)
/*
* Mindblast monsters
*/
-bool mindblast_monsters(int dam)
+bool_ mindblast_monsters(int dam)
{
return (project_hack(GF_PSI, dam));
}
@@ -7685,7 +7685,7 @@ bool mindblast_monsters(int dam)
/*
* Banish all monsters
*/
-bool banish_monsters(int dist)
+bool_ banish_monsters(int dist)
{
return (project_hack(GF_AWAY_ALL, dist));
}
@@ -7694,7 +7694,7 @@ bool banish_monsters(int dist)
/*
* Turn evil
*/
-bool turn_evil(int dam)
+bool_ turn_evil(int dam)
{
return (project_hack(GF_TURN_EVIL, dam));
}
@@ -7703,7 +7703,7 @@ bool turn_evil(int dam)
/*
* Turn everyone
*/
-bool turn_monsters(int dam)
+bool_ turn_monsters(int dam)
{
return (project_hack(GF_TURN_ALL, dam));
}
@@ -7712,33 +7712,33 @@ bool turn_monsters(int dam)
/*
* Death-ray all monsters (note: OBSCENELY powerful)
*/
-bool deathray_monsters(void)
+bool_ deathray_monsters(void)
{
return (project_hack(GF_DEATH_RAY, p_ptr->lev));
}
-bool charm_monster(int dir, int plev)
+bool_ charm_monster(int dir, int plev)
{
int flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(GF_CHARM, dir, plev, flg));
}
-bool star_charm_monster(int dir, int plev)
+bool_ star_charm_monster(int dir, int plev)
{
int flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(GF_STAR_CHARM, dir, plev, flg));
}
-bool control_one_undead(int dir, int plev)
+bool_ control_one_undead(int dir, int plev)
{
int flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(GF_CONTROL_UNDEAD, dir, plev, flg));
}
-bool charm_animal(int dir, int plev)
+bool_ charm_animal(int dir, int plev)
{
int flg = PROJECT_STOP | PROJECT_KILL;
return (project_hook(GF_CONTROL_ANIMAL, dir, plev, flg));
@@ -7789,7 +7789,7 @@ void alter_reality(void)
}
/* Heal insanity. */
-bool heal_insanity(int val)
+bool_ heal_insanity(int val)
{
if (p_ptr->csane < p_ptr->msane)
{
@@ -7831,11 +7831,11 @@ bool heal_insanity(int val)
* Send the player shooting through walls in the given direction until
* they reach a non-wall space, or a monster, or a permanent wall.
*/
-bool passwall(int dir, bool safe)
+bool_ passwall(int dir, bool_ safe)
{
int x = p_ptr->px, y = p_ptr->py, ox = p_ptr->px, oy = p_ptr->py, lx = p_ptr->px, ly = p_ptr->py;
cave_type *c_ptr;
- bool ok = FALSE;
+ bool_ ok = FALSE;
if (p_ptr->wild_mode) return FALSE;
if (p_ptr->inside_quest) return FALSE;
@@ -7925,7 +7925,7 @@ bool passwall(int dir, bool safe)
/*
* Print a batch of dungeons.
*/
-static void print_dungeon_batch(int *p, int start, int max, bool mode)
+static void print_dungeon_batch(int *p, int start, int max, bool_ mode)
{
char buf[80];
int i, j;
@@ -7963,7 +7963,7 @@ int reset_recall_aux()
int *p;
int max = 0, i, start = 0;
int ret;
- bool mode = FALSE;
+ bool_ mode = FALSE;
C_MAKE(p, max_d_idx, int);
@@ -8087,7 +8087,7 @@ int reset_recall_aux()
return ret;
}
-bool reset_recall(bool no_trepas_max_depth)
+bool_ reset_recall(bool_ no_trepas_max_depth)
{
int dun, depth, max;