MCPcopy Index your code
hub / github.com/NetHack/NetHack / pudding_merge_message

Function pudding_merge_message

src/mkobj.c:3817–3849  ·  view source on GitHub ↗

give a message if hero notices two globs merging [used to be in pline.c] */

Source from the content-addressed store, hash-verified

3815
3816/* give a message if hero notices two globs merging [used to be in pline.c] */
3817void
3818pudding_merge_message(struct obj *otmp, struct obj *otmp2)
3819{
3820 boolean visible = (cansee(otmp->ox, otmp->oy)
3821 || cansee(otmp2->ox, otmp2->oy)),
3822 onfloor = (otmp->where == OBJ_FLOOR || otmp2->where == OBJ_FLOOR),
3823 inpack = (carried(otmp) || carried(otmp2));
3824
3825 /* the player will know something happened inside his own inventory */
3826 if ((!Blind && visible) || inpack) {
3827 if (Hallucination) {
3828 if (onfloor) {
3829 You_see("parts of the floor melting!");
3830 } else if (inpack) {
3831 Your("pack reaches out and grabs something!");
3832 }
3833 /* even though we can see where they should be,
3834 * they'll be out of our view (minvent or container)
3835 * so don't actually show anything */
3836 } else if (onfloor || inpack) {
3837 boolean adj = ((otmp->ox != u.ux || otmp->oy != u.uy)
3838 && (otmp2->ox != u.ux || otmp2->oy != u.uy));
3839
3840 pline("The %s%s coalesce%s.",
3841 (onfloor && adj) ? "adjacent " : "",
3842 makeplural(obj_typename(otmp->otyp)),
3843 inpack ? " inside your pack" : "");
3844 }
3845 } else {
3846 Soundeffect(se_faint_sloshing, 25);
3847 You_hear("a faint sloshing sound.");
3848 }
3849}
3850
3851/*mkobj.c*/

Callers 3

flooreffectsFunction · 0.85
mergedFunction · 0.85
make_corpseFunction · 0.85

Calls 6

You_seeFunction · 0.85
YourFunction · 0.85
makepluralFunction · 0.85
obj_typenameFunction · 0.85
You_hearFunction · 0.85
plineFunction · 0.70

Tested by

no test coverage detected