*
* Currently the "m" parameter is unused.
*/
-void scatter(int *yp, int *xp, int y, int x, int d, int m)
+void scatter(POSITION *yp, POSITION *xp, POSITION y, POSITION x, POSITION d, int m)
{
int nx, ny;
* @details
* If requested, count only trapped chests.
*/
-static int count_chests(int *y, int *x, bool trapped)
+static int count_chests(POSITION *y, POSITION *x, bool trapped)
{
- int d, count, o_idx;
+ int d, count;
+ IDX o_idx;
object_type *o_ptr;
bool add = TRUE;
- int plev = p_ptr->lev;
- int power;
+ PLAYER_LEVEL plev = p_ptr->lev;
+ HIT_POINT power;
switch (spell)
{
* setting the player to "dead".
*/
-int take_hit(int damage_type, int damage, cptr hit_from, int monspell)
+int take_hit(int damage_type, HIT_POINT damage, cptr hit_from, int monspell)
{
int old_chp = p_ptr->chp;
/* spells1.c */
extern bool in_disintegration_range(POSITION y1, POSITION x1, POSITION y2, POSITION x2);
extern void breath_shape(u16b *path_g, int dist, int *pgrids, byte *gx, byte *gy, byte *gm, int *pgm_rad, int rad, int y1, int x1, int y2, int x2, int typ);
-extern int take_hit(int damage_type, int damage, cptr kb_str, int monspell);
+extern int take_hit(int damage_type, HIT_POINT damage, cptr kb_str, int monspell);
extern u16b bolt_pict(POSITION y, POSITION x, POSITION ny, POSITION nx, int typ);
extern sint project_path(u16b *gp, POSITION range, POSITION y1, POSITION x1, POSITION y2, POSITION x2, int flg);
extern int dist_to_line(int y, int x, int y1, int x1, int y2, int x2);
}
else
{
- int j, d;
+ int j;
+ POSITION d;
for (d = 1; d < 6; d++)
{
bool touched = FALSE, fear = FALSE, alive = TRUE;
bool explode = FALSE;
bool do_silly_attack = (one_in_(2) && p_ptr->image);
- int get_damage = 0;
+ HIT_POINT get_damage = 0;
int abbreviate = 0;
/* Not allowed to attack */
{
bool obvious = FALSE;
- int power = 0;
- int damage = 0;
+ HIT_POINT power = 0;
+ HIT_POINT damage = 0;
cptr act = NULL;
static bool cast_mirror_spell(int spell)
{
int dir;
- int plev = p_ptr->lev;
+ PLAYER_LEVEL plev = p_ptr->lev;
int tmp;
TIME_EFFECT t;
int x, y;
for (x = 0; x < cur_wid; x++) {
for (y = 0; y < cur_hgt; y++) {
if (is_mirror_grid(&cave[y][x])) {
- project(0, 2, y, x, plev, GF_OLD_SLEEP, (PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_JUMP | PROJECT_NO_HANGEKI), -1);
+ project(0, 2, y, x, (HIT_POINT)plev, GF_OLD_SLEEP, (PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_JUMP | PROJECT_NO_HANGEKI), -1);
}
}
}
int hack_n = 0;
- byte hack_y[GROUP_MAX];
- byte hack_x[GROUP_MAX];
+ POSITION hack_y[GROUP_MAX];
+ POSITION hack_x[GROUP_MAX];
/* Pick a group size */
for (n = 0; (n < hack_n) && (hack_n < total); n++)
{
/* Grab the location */
- int hx = hack_x[n];
- int hy = hack_y[n];
+ POSITION hx = hack_x[n];
+ POSITION hy = hack_y[n];
/* Check each direction, up to total */
for (i = 0; (i < 8) && (hack_n < total); i++)
case TV_STATUE:
{
- int i = 1;
+ PARAMETER_VALUE i = 1;
monster_race *r_ptr;
{
char tmp_val[160];
int val;
- int get_to_h, get_to_d;
+ HIT_PROB get_to_h;
+ HIT_POINT get_to_d;
strcpy(tmp_val, "1");
if (!get_string(format(_("いくつ付加しますか? (1-%d):", "Enchant how many? (1-%d):"), p_ptr->lev/7+3), tmp_val, 2)) return;
* We return "TRUE" if any "obvious" effects were observed. XXX XXX Actually,
* we just assume that the effects were obvious, for historical reasons.
*/
-static bool project_p(int who, cptr who_name, int r, POSITION y, POSITION x, int dam, int typ, int flg, int monspell)
+static bool project_p(int who, cptr who_name, int r, POSITION y, POSITION x, HIT_POINT dam, int typ, int flg, int monspell)
{
int k = 0;
int rlev = 0;
CHARACTER_IDX realm2; /* Second magic realm */
CHARACTER_IDX oops; /* Unused */
- byte hitdie; /* Hit dice (sides) */
+ DICE_SID hitdie; /* Hit dice (sides) */
u16b expfact; /* Experience factor
* Note: was byte, causing overflow for Amberite
* characters (such as Amberite Paladins)
*/
void check_quest_completion(monster_type *m_ptr)
{
- int y, x;
+ POSITION y, x;
int quest_num;
{
if (!one_in_(7))
{
- int wy = y, wx = x;
+ POSITION wy = y, wx = x;
int attempts = 100;
bool pet = is_pet(m_ptr);