Add additional sink potion #dipping effects
Also put "Nothing seems to happen." into c_common_strings, since it's used all over several files.
This commit is contained in:
@@ -29,6 +29,7 @@ extern NEARDATA const struct c_color_names c_color_names;
|
|||||||
/* common_strings */
|
/* common_strings */
|
||||||
extern const struct c_common_strings c_common_strings;
|
extern const struct c_common_strings c_common_strings;
|
||||||
#define nothing_happens c_common_strings.c_nothing_happens
|
#define nothing_happens c_common_strings.c_nothing_happens
|
||||||
|
#define nothing_seems_to_happen c_common_strings.c_nothing_seems_to_happen
|
||||||
#define thats_enough_tries c_common_strings.c_thats_enough_tries
|
#define thats_enough_tries c_common_strings.c_thats_enough_tries
|
||||||
#define silly_thing_to c_common_strings.c_silly_thing_to
|
#define silly_thing_to c_common_strings.c_silly_thing_to
|
||||||
#define shudder_for_moment c_common_strings.c_shudder_for_moment
|
#define shudder_for_moment c_common_strings.c_shudder_for_moment
|
||||||
|
|||||||
@@ -977,6 +977,7 @@ extern int wash_hands(void);
|
|||||||
extern void breaksink(coordxy, coordxy);
|
extern void breaksink(coordxy, coordxy);
|
||||||
extern void drinksink(void);
|
extern void drinksink(void);
|
||||||
extern void dipsink(struct obj *);
|
extern void dipsink(struct obj *);
|
||||||
|
extern void sink_backs_up(coordxy, coordxy);
|
||||||
|
|
||||||
/* ### hack.c ### */
|
/* ### hack.c ### */
|
||||||
|
|
||||||
|
|||||||
+5
-5
@@ -270,11 +270,11 @@ struct c_color_names {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct c_common_strings {
|
struct c_common_strings {
|
||||||
const char *const c_nothing_happens, *const c_thats_enough_tries,
|
const char *const c_nothing_happens, *const c_nothing_seems_to_happen,
|
||||||
*const c_silly_thing_to, *const c_shudder_for_moment,
|
*const c_thats_enough_tries, *const c_silly_thing_to,
|
||||||
*const c_something, *const c_Something, *const c_You_can_move_again,
|
*const c_shudder_for_moment, *const c_something, *const c_Something,
|
||||||
*const c_Never_mind, *c_vision_clears, *const c_the_your[2],
|
*const c_You_can_move_again, *const c_Never_mind, *c_vision_clears,
|
||||||
*const c_fakename[2];
|
*const c_the_your[2], *const c_fakename[2];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct container {
|
struct container {
|
||||||
|
|||||||
+7
-8
@@ -49,7 +49,6 @@ static boolean get_valid_polearm_position(coordxy, coordxy);
|
|||||||
static boolean find_poleable_mon(coord *, int, int);
|
static boolean find_poleable_mon(coord *, int, int);
|
||||||
|
|
||||||
static const char
|
static const char
|
||||||
Nothing_seems_to_happen[] = "Nothing seems to happen.",
|
|
||||||
no_elbow_room[] = "don't have enough elbow-room to maneuver.";
|
no_elbow_room[] = "don't have enough elbow-room to maneuver.";
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@@ -1010,7 +1009,7 @@ use_mirror(struct obj *obj)
|
|||||||
if (!Blind)
|
if (!Blind)
|
||||||
pline_The("%s fogs up and doesn't reflect!", mirror);
|
pline_The("%s fogs up and doesn't reflect!", mirror);
|
||||||
else
|
else
|
||||||
pline("%s", Nothing_seems_to_happen);
|
pline("%s", nothing_seems_to_happen);
|
||||||
return ECMD_TIME;
|
return ECMD_TIME;
|
||||||
}
|
}
|
||||||
if (!u.dx && !u.dy && !u.dz) {
|
if (!u.dx && !u.dy && !u.dz) {
|
||||||
@@ -1629,7 +1628,7 @@ use_lamp(struct obj *obj)
|
|||||||
if (!Blind)
|
if (!Blind)
|
||||||
Your("lantern is out of power.");
|
Your("lantern is out of power.");
|
||||||
else
|
else
|
||||||
pline("%s", Nothing_seems_to_happen);
|
pline("%s", nothing_seems_to_happen);
|
||||||
} else {
|
} else {
|
||||||
pline("This %s has no oil.", xname(obj));
|
pline("This %s has no oil.", xname(obj));
|
||||||
}
|
}
|
||||||
@@ -1644,7 +1643,7 @@ use_lamp(struct obj *obj)
|
|||||||
pline("%s for a moment, then %s.", Tobjnam(obj, "flicker"),
|
pline("%s for a moment, then %s.", Tobjnam(obj, "flicker"),
|
||||||
otense(obj, "die"));
|
otense(obj, "die"));
|
||||||
} else {
|
} else {
|
||||||
pline("%s", Nothing_seems_to_happen);
|
pline("%s", nothing_seems_to_happen);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (lamp) { /* lamp or lantern */
|
if (lamp) { /* lamp or lantern */
|
||||||
@@ -2232,7 +2231,7 @@ use_unicorn_horn(struct obj **optr)
|
|||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
if (Deaf) /* make_deaf() won't give feedback when already deaf */
|
if (Deaf) /* make_deaf() won't give feedback when already deaf */
|
||||||
pline("%s", Nothing_seems_to_happen);
|
pline("%s", nothing_seems_to_happen);
|
||||||
make_deaf((HDeaf & TIMEOUT) + lcount, TRUE);
|
make_deaf((HDeaf & TIMEOUT) + lcount, TRUE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -2320,7 +2319,7 @@ use_unicorn_horn(struct obj **optr)
|
|||||||
if (did_prop)
|
if (did_prop)
|
||||||
gc.context.botl = TRUE;
|
gc.context.botl = TRUE;
|
||||||
else
|
else
|
||||||
pline("%s", Nothing_seems_to_happen);
|
pline("%s", nothing_seems_to_happen);
|
||||||
|
|
||||||
#undef PROP_COUNT
|
#undef PROP_COUNT
|
||||||
#undef prop_trouble
|
#undef prop_trouble
|
||||||
@@ -3519,7 +3518,7 @@ use_royal_jelly(struct obj **optr)
|
|||||||
if (eobj->timed || eobj->corpsenm != oldcorpsenm)
|
if (eobj->timed || eobj->corpsenm != oldcorpsenm)
|
||||||
pline("The %s %s feebly.", xname(eobj), otense(eobj, "quiver"));
|
pline("The %s %s feebly.", xname(eobj), otense(eobj, "quiver"));
|
||||||
else
|
else
|
||||||
pline("%s", Nothing_seems_to_happen);
|
pline("%s", nothing_seems_to_happen);
|
||||||
kill_egg(eobj);
|
kill_egg(eobj);
|
||||||
goto useup_jelly;
|
goto useup_jelly;
|
||||||
}
|
}
|
||||||
@@ -3538,7 +3537,7 @@ use_royal_jelly(struct obj **optr)
|
|||||||
|| eobj->corpsenm != oldcorpsenm)
|
|| eobj->corpsenm != oldcorpsenm)
|
||||||
pline("The %s %s briefly.", xname(eobj), otense(eobj, "quiver"));
|
pline("The %s %s briefly.", xname(eobj), otense(eobj, "quiver"));
|
||||||
else
|
else
|
||||||
pline("%s", Nothing_seems_to_happen);
|
pline("%s", nothing_seems_to_happen);
|
||||||
|
|
||||||
useup_jelly:
|
useup_jelly:
|
||||||
/* not useup() because we've already done freeinv() */
|
/* not useup() because we've already done freeinv() */
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ const char *c_obj_colors[] = {
|
|||||||
|
|
||||||
const struct c_common_strings c_common_strings =
|
const struct c_common_strings c_common_strings =
|
||||||
{ "Nothing happens.",
|
{ "Nothing happens.",
|
||||||
|
"Nothing seems to happen.",
|
||||||
"That's enough tries!",
|
"That's enough tries!",
|
||||||
"That is a silly thing to %s.",
|
"That is a silly thing to %s.",
|
||||||
"shudder for a moment.",
|
"shudder for a moment.",
|
||||||
|
|||||||
+1
-20
@@ -960,7 +960,6 @@ dokick(void)
|
|||||||
int glyph, oldglyph = -1;
|
int glyph, oldglyph = -1;
|
||||||
register struct monst *mtmp;
|
register struct monst *mtmp;
|
||||||
boolean no_kick = FALSE;
|
boolean no_kick = FALSE;
|
||||||
char buf[BUFSZ];
|
|
||||||
|
|
||||||
if (nolimbs(gy.youmonst.data) || slithy(gy.youmonst.data)) {
|
if (nolimbs(gy.youmonst.data) || slithy(gy.youmonst.data)) {
|
||||||
You("have no legs to kick with.");
|
You("have no legs to kick with.");
|
||||||
@@ -1421,25 +1420,7 @@ dokick(void)
|
|||||||
exercise(A_DEX, TRUE);
|
exercise(A_DEX, TRUE);
|
||||||
return ECMD_TIME;
|
return ECMD_TIME;
|
||||||
} else if (!rn2(3)) {
|
} else if (!rn2(3)) {
|
||||||
if (Blind && Deaf)
|
sink_backs_up(x, y);
|
||||||
Sprintf(buf, " %s", body_part(FACE));
|
|
||||||
else
|
|
||||||
buf[0] = '\0';
|
|
||||||
pline("%s%s%s.", !Deaf ? "Flupp! " : "",
|
|
||||||
!Blind
|
|
||||||
? "Muddy waste pops up from the drain"
|
|
||||||
: !Deaf
|
|
||||||
? "You hear a sloshing sound" /* Deaf-aware */
|
|
||||||
: "Something splashes you in the", buf);
|
|
||||||
if (!(gm.maploc->looted & S_LRING)) { /* once per sink */
|
|
||||||
if (!Blind)
|
|
||||||
You_see("a ring shining in its midst.");
|
|
||||||
(void) mkobj_at(RING_CLASS, x, y, TRUE);
|
|
||||||
newsym(x, y);
|
|
||||||
exercise(A_DEX, TRUE);
|
|
||||||
exercise(A_WIS, TRUE); /* a discovery! */
|
|
||||||
gm.maploc->looted |= S_LRING;
|
|
||||||
}
|
|
||||||
return ECMD_TIME;
|
return ECMD_TIME;
|
||||||
}
|
}
|
||||||
kick_ouch(x, y, "");
|
kick_ouch(x, y, "");
|
||||||
|
|||||||
+61
-2
@@ -535,7 +535,7 @@ dipfountain(register struct obj *obj)
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (er == ER_NOTHING)
|
if (er == ER_NOTHING)
|
||||||
pline("Nothing seems to happen.");
|
pline1(nothing_seems_to_happen);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
update_inventory();
|
update_inventory();
|
||||||
@@ -705,7 +705,7 @@ dipsink(struct obj *obj)
|
|||||||
} else if (obj->oclass != POTION_CLASS) {
|
} else if (obj->oclass != POTION_CLASS) {
|
||||||
You("hold %s under the tap.", the(xname(obj)));
|
You("hold %s under the tap.", the(xname(obj)));
|
||||||
if (water_damage(obj, (const char *) 0, TRUE) == ER_NOTHING)
|
if (water_damage(obj, (const char *) 0, TRUE) == ER_NOTHING)
|
||||||
pline("Nothing seems to happen.");
|
pline1(nothing_seems_to_happen);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -721,8 +721,43 @@ dipsink(struct obj *obj)
|
|||||||
if (!Blind) {
|
if (!Blind) {
|
||||||
pline("It leaves an oily film on the basin.");
|
pline("It leaves an oily film on the basin.");
|
||||||
try_call = TRUE;
|
try_call = TRUE;
|
||||||
|
} else {
|
||||||
|
pline1(nothing_seems_to_happen);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case POT_ACID:
|
||||||
|
/* acts like a drain cleaner product */
|
||||||
|
try_call = TRUE;
|
||||||
|
if (!Blind) {
|
||||||
|
pline_The("drain seems less clogged.");
|
||||||
|
} else if (!Deaf) {
|
||||||
|
You_hear("a sucking sound.");
|
||||||
|
} else {
|
||||||
|
pline1(nothing_seems_to_happen);
|
||||||
|
try_call = FALSE;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case POT_LEVITATION:
|
||||||
|
sink_backs_up(u.ux, u.uy);
|
||||||
|
try_call = TRUE;
|
||||||
|
break;
|
||||||
|
case POT_OBJECT_DETECTION:
|
||||||
|
if (!(levl[u.ux][u.uy].looted & S_LRING)) {
|
||||||
|
You("sense a ring lost down the drain.");
|
||||||
|
try_call = TRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
/* FALLTHRU */
|
||||||
|
case POT_GAIN_LEVEL:
|
||||||
|
case POT_GAIN_ENERGY:
|
||||||
|
case POT_MONSTER_DETECTION:
|
||||||
|
case POT_FRUIT_JUICE:
|
||||||
|
case POT_WATER:
|
||||||
|
/* potions with no potionbreathe() effects, plus water. if effects
|
||||||
|
are added to potionbreathe these should go to that instead (except
|
||||||
|
for water). */
|
||||||
|
pline1(nothing_seems_to_happen);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
/* hero can feel the vapor on her skin, so no need to check Blind or
|
/* hero can feel the vapor on her skin, so no need to check Blind or
|
||||||
breathless for this message */
|
breathless for this message */
|
||||||
@@ -737,4 +772,28 @@ dipsink(struct obj *obj)
|
|||||||
useup(obj);
|
useup(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
sink_backs_up(coordxy x, coordxy y)
|
||||||
|
{
|
||||||
|
char buf[BUFSZ];
|
||||||
|
|
||||||
|
if (!Blind)
|
||||||
|
Strcpy(buf, "Muddy waste pops up from the drain");
|
||||||
|
else if (!Deaf)
|
||||||
|
Strcpy(buf, "You hear a sloshing sound"); /* Deaf-aware */
|
||||||
|
else
|
||||||
|
Sprintf(buf, "Something splashes you in the %s", body_part(FACE));
|
||||||
|
pline("%s%s.", !Deaf ? "Flupp! " : "", buf);
|
||||||
|
|
||||||
|
if (!(levl[x][y].looted & S_LRING)) { /* once per sink */
|
||||||
|
if (!Blind)
|
||||||
|
You_see("a ring shining in its midst.");
|
||||||
|
(void) mkobj_at(RING_CLASS, x, y, TRUE);
|
||||||
|
newsym(x, y);
|
||||||
|
exercise(A_DEX, TRUE);
|
||||||
|
exercise(A_WIS, TRUE); /* a discovery! */
|
||||||
|
levl[x][y].looted |= S_LRING;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*fountain.c*/
|
/*fountain.c*/
|
||||||
|
|||||||
+1
-1
@@ -2422,7 +2422,7 @@ bagotricks(
|
|||||||
update_inventory(); /* for perm_invent */
|
update_inventory(); /* for perm_invent */
|
||||||
}
|
}
|
||||||
} else if (!tipping) {
|
} else if (!tipping) {
|
||||||
pline1(!moncount ? nothing_happens : "Nothing seems to happen.");
|
pline1(!moncount ? nothing_happens : nothing_seems_to_happen);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return moncount;
|
return moncount;
|
||||||
|
|||||||
+1
-1
@@ -3842,7 +3842,7 @@ tipcontainer_checks(
|
|||||||
|
|
||||||
if (box->spe < old_spe) {
|
if (box->spe < old_spe) {
|
||||||
if (bag && !totseen)
|
if (bag && !totseen)
|
||||||
pline("Nothing seems to happen.");
|
pline1(nothing_seems_to_happen);
|
||||||
/* check_unpaid wants to see a non-zero charge count */
|
/* check_unpaid wants to see a non-zero charge count */
|
||||||
box->spe = old_spe;
|
box->spe = old_spe;
|
||||||
check_unpaid_usage(box, TRUE);
|
check_unpaid_usage(box, TRUE);
|
||||||
|
|||||||
+1
-1
@@ -2405,7 +2405,7 @@ potion_dip(struct obj *obj, struct obj *potion)
|
|||||||
prinv((char *) 0, obj, 0L);
|
prinv((char *) 0, obj, 0L);
|
||||||
return ECMD_TIME;
|
return ECMD_TIME;
|
||||||
} else {
|
} else {
|
||||||
pline("Nothing seems to happen.");
|
pline1(nothing_seems_to_happen);
|
||||||
goto poof;
|
goto poof;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user