github pull request #1107 - flipping coins

Pull request from NullCGT:  applying gold from inventory will flip
one coin and report "heads" or "tails".  If impaired, that coin will
be dropped, otherwise it will remain part of the stack in inventory.
Can be done via 'a $' or with context-senstive item action via 'i $ a'.

I've used 'git merge --squash' and 'git commit -C <commit#>' to
flatten four commits into one and it seems to have accomplished what
I wanted, including retaining the log message from <commit#>.

I also changed
|You flip a gold piece.  The gold pieces slips between your fingers.
to
|You flip a gold piece.  It slips between your fingers.
when impaired and applying one from a stack.

Closes #1107
This commit is contained in:
PatR
2023-10-14 01:13:24 -07:00
parent 358e17b323
commit ef22d87e26
2 changed files with 7 additions and 5 deletions

View File

@@ -4327,13 +4327,13 @@ flip_coin(struct obj *obj)
struct obj *otmp = obj;
boolean lose_coin = FALSE;
You("flip %s.", an(cxname_singular(obj)));
You("flip %s.", an(singular(obj, xname)));
if (Underwater) {
pline_The("%s floats away.", xname(obj));
pline("It tumbles away.");
lose_coin = TRUE;
} else if (Glib || Fumbling || (ACURR(A_DEX) < 10 && !rn2(ACURR(A_DEX)))) {
pline_The("%s slips between your %s.", xname(obj),
fingers_or_gloves(FALSE));
} else if (Glib || Fumbling
|| (ACURR(A_DEX) < 10 && !rn2(ACURR(A_DEX)))) {
pline("It slips between your %s.", fingers_or_gloves(FALSE));
lose_coin = TRUE;
}