give a message if hero notices two globs merging [used to be in pline.c] */
| 3815 | |
| 3816 | /* give a message if hero notices two globs merging [used to be in pline.c] */ |
| 3817 | void |
| 3818 | pudding_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*/ |
no test coverage detected