github pull request #102 - Popeye vs Fixed_abil

Fixes #102

This is a simplified version of the code in pull request #102,
which replaces "You feel like Popeye!" with "You feel like {Olive
Oyl or Bluto}!" if eating spinach fails to provide a strength gain.
I think you should still feel like Popeye if the lack of gain is
due to already being at maximum, so I left out the change to make
gainstr() return a value which indicates whether a change took place.

Unfortunately, if you're both already at maximum and have attribute
changes suppressed by Fixed_abil, the latter overrides and you'll
feel like Olive Oyl or Bluto.  I think that situation is too obscure
to bother with the complexity of figuring out if you're at maximum
for the purpose of a silly message.
This commit is contained in:
PatR
2018-07-10 17:14:36 -07:00
parent e9ee20bc18
commit 6d3760b923
2 changed files with 12 additions and 1 deletions

View File

@@ -70,6 +70,8 @@ attempting to update permanent inventory window during restore had problems
were restored) and named fruit
remembered corpse which isn't there anymore would be described by farlook as
the corpse of a random monster type
when eating a tin of spinach, don't "feel like Popeye" is sustain-abilities
prevents any strength gain
Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository

View File

@@ -1395,7 +1395,16 @@ const char *mesg;
u.uconduct.food++; /* don't need vegetarian checks for spinach */
if (!tin->cursed)
pline("This makes you feel like %s!",
Hallucination ? "Swee'pea" : "Popeye");
/* "Swee'pea" is a character from the Popeye cartoons */
Hallucination ? "Swee'pea"
/* "feel like Popeye" unless sustain ability suppresses
any attribute change; this slightly oversimplifies
things: we want "Popeye" if no strength increase
occurs due to already being at maximum, but we won't
get it if at-maximum and fixed-abil both apply */
: !Fixed_abil ? "Popeye"
/* no gain, feel like another character from Popeye */
: (flags.female ? "Olive Oyl" : "Bluto"));
gainstr(tin, 0, FALSE);
tin = costly_tin(COST_OPEN);