Sunsword can be invoked to create a blinding ray
This commit is contained in:
@@ -1388,6 +1388,7 @@ if hero shattered an unseen monster's weapon, the [also unseen] weapon was
|
|||||||
described in the feedback
|
described in the feedback
|
||||||
don't self-genocide if a monk picks "master-lich" or "masterlich" as target
|
don't self-genocide if a monk picks "master-lich" or "masterlich" as target
|
||||||
(was matching "Master" rank)
|
(was matching "Master" rank)
|
||||||
|
Sunsword can be invoked to create a blinding ray
|
||||||
|
|
||||||
|
|
||||||
Fixes to 3.7.0-x General Problems Exposed Via git Repository
|
Fixes to 3.7.0-x General Problems Exposed Via git Repository
|
||||||
|
|||||||
@@ -64,7 +64,8 @@ enum invoke_prop_types {
|
|||||||
CREATE_PORTAL,
|
CREATE_PORTAL,
|
||||||
ENLIGHTENING,
|
ENLIGHTENING,
|
||||||
CREATE_AMMO,
|
CREATE_AMMO,
|
||||||
BANISH
|
BANISH,
|
||||||
|
BLINDING_RAY
|
||||||
};
|
};
|
||||||
|
|
||||||
/* clang-format on */
|
/* clang-format on */
|
||||||
|
|||||||
@@ -179,8 +179,8 @@ static NEARDATA struct artifact artilist[] = {
|
|||||||
/* Sunsword emits light when wielded (handled in the core rather than
|
/* Sunsword emits light when wielded (handled in the core rather than
|
||||||
via artifact fields), but that light has no particular color */
|
via artifact fields), but that light has no particular color */
|
||||||
A("Sunsword", LONG_SWORD, (SPFX_RESTR | SPFX_DFLAG2), 0, M2_UNDEAD,
|
A("Sunsword", LONG_SWORD, (SPFX_RESTR | SPFX_DFLAG2), 0, M2_UNDEAD,
|
||||||
PHYS(5, 0), DFNS(AD_BLND), NO_CARY, 0, A_LAWFUL, NON_PM, NON_PM, 1500L,
|
PHYS(5, 0), DFNS(AD_BLND), NO_CARY, BLINDING_RAY, A_LAWFUL, NON_PM,
|
||||||
NO_COLOR, SUNSWORD),
|
NON_PM, 1500L, NO_COLOR, SUNSWORD),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The artifacts for the quest dungeon, all self-willed.
|
* The artifacts for the quest dungeon, all self-willed.
|
||||||
|
|||||||
@@ -103,6 +103,7 @@ extern long timet_delta(time_t, time_t);
|
|||||||
|
|
||||||
/* ### apply.c ### */
|
/* ### apply.c ### */
|
||||||
|
|
||||||
|
extern void do_blinding_ray(struct obj *) NONNULLPTRS;
|
||||||
extern int doapply(void);
|
extern int doapply(void);
|
||||||
extern int dorub(void);
|
extern int dorub(void);
|
||||||
extern int dojump(void);
|
extern int dojump(void);
|
||||||
|
|||||||
27
src/apply.c
27
src/apply.c
@@ -54,11 +54,24 @@ staticfn boolean find_poleable_mon(coord *, int, int);
|
|||||||
static const char
|
static const char
|
||||||
no_elbow_room[] = "don't have enough elbow-room to maneuver.";
|
no_elbow_room[] = "don't have enough elbow-room to maneuver.";
|
||||||
|
|
||||||
|
void
|
||||||
|
do_blinding_ray(struct obj *obj)
|
||||||
|
{
|
||||||
|
struct monst *mtmp = bhit(u.dx, u.dy, COLNO, FLASHED_LIGHT,
|
||||||
|
(int (*) (MONST_P, OBJ_P)) 0,
|
||||||
|
(int (*) (OBJ_P, OBJ_P)) 0, &obj);
|
||||||
|
|
||||||
|
obj->ox = u.ux, obj->oy = u.uy; /* flash_hits_mon() wants this */
|
||||||
|
if (mtmp)
|
||||||
|
(void) flash_hits_mon(mtmp, obj);
|
||||||
|
/* normally bhit() would do this but for FLASHED_LIGHT we want it
|
||||||
|
to be deferred until after flash_hits_mon() */
|
||||||
|
transient_light_cleanup();
|
||||||
|
}
|
||||||
|
|
||||||
staticfn int
|
staticfn int
|
||||||
use_camera(struct obj *obj)
|
use_camera(struct obj *obj)
|
||||||
{
|
{
|
||||||
struct monst *mtmp;
|
|
||||||
|
|
||||||
if (Underwater) {
|
if (Underwater) {
|
||||||
pline("Using your camera underwater would void the warranty.");
|
pline("Using your camera underwater would void the warranty.");
|
||||||
return ECMD_OK;
|
return ECMD_OK;
|
||||||
@@ -83,15 +96,7 @@ use_camera(struct obj *obj)
|
|||||||
} else if (!u.dx && !u.dy) {
|
} else if (!u.dx && !u.dy) {
|
||||||
(void) zapyourself(obj, TRUE);
|
(void) zapyourself(obj, TRUE);
|
||||||
} else {
|
} else {
|
||||||
mtmp = bhit(u.dx, u.dy, COLNO, FLASHED_LIGHT,
|
do_blinding_ray(obj);
|
||||||
(int (*) (MONST_P, OBJ_P)) 0,
|
|
||||||
(int (*) (OBJ_P, OBJ_P)) 0, &obj);
|
|
||||||
obj->ox = u.ux, obj->oy = u.uy; /* flash_hits_mon() wants this */
|
|
||||||
if (mtmp)
|
|
||||||
(void) flash_hits_mon(mtmp, obj);
|
|
||||||
/* normally bhit() would do this but for FLASHED_LIGHT we want it
|
|
||||||
to be deferred until after flash_hits_mon() */
|
|
||||||
transient_light_cleanup();
|
|
||||||
}
|
}
|
||||||
return ECMD_TIME;
|
return ECMD_TIME;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1916,6 +1916,10 @@ arti_invoke(struct obj *obj)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case BLINDING_RAY:
|
||||||
|
if (getdir((char *) 0))
|
||||||
|
do_blinding_ray(obj);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
long eprop = (u.uprops[oart->inv_prop].extrinsic ^= W_ARTI),
|
long eprop = (u.uprops[oart->inv_prop].extrinsic ^= W_ARTI),
|
||||||
|
|||||||
Reference in New Issue
Block a user