more #tip, mostly container-to-container

Require a free hand when tipping a container into another container.
Presumeably you need to open the destination container and possibly
keep holding it open.

If you try to tip a carried container into an unknown bag of tricks,
apply the bag (once) instead of performing the tip.  (To 'open' the
destination as above.)  Possibly slightly confusing if bag is empty.

When tipping a container, always ask for the destination instead of
doing that only when carrying other containers.  Confirming floor
as destination can be annoying but having to do that sometimes and
skipping that sometimes is aggravating because it is error prone.
And floor is preselected so can be chosen with space or return.
(I wanted to change the selector letter for floor from '-' to '.'
and then keep '-' as an unseen group accelerator, but the latter
doesn't work for PICK_ONE so I've left '-' as-is.)

Don't display "monsters appear" after tipping a bag of tricks.
Monster creation gives feedback these days.  (Comparable to recent
"summon nasties" fix.)
This commit is contained in:
PatR
2022-09-15 12:30:44 -07:00
parent 48bd67a25f
commit 5b0f4a2e6d
2 changed files with 89 additions and 56 deletions

View File

@@ -2371,9 +2371,10 @@ set_mimic_sym(register struct monst *mtmp)
/* release monster from bag of tricks; return number of monsters created */
int
bagotricks(struct obj *bag,
boolean tipping, /* caller emptying entire contents; affects shop handling */
int *seencount) /* secondary output */
bagotricks(
struct obj *bag,
boolean tipping, /* caller emptying entirely; affects shop handling */
int *seencount) /* secondary output */
{
int moncount = 0;