1
0
Fork 0
mirror of https://codeberg.org/noisytoot/notnotdnethack.git synced 2025-07-27 07:52:25 +01:00

Merge pull request #2020 from NeroOneTrueKing/patch-the-golden-knight

New artifact: "The Golden Knight"
This commit is contained in:
Chris-plus-alphanumericgibberish 2022-08-30 11:49:46 -04:00 committed by GitHub
commit 50eabf8bd2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 37 additions and 1 deletions

View file

@ -3757,6 +3757,14 @@ gold piece
coin and jewelry.
[ Webster's New International Dictionary
of the English Language, Second Edition ]
golden knight
Originally, it was created to constrain its user's power...
It has since absorbed enough of their strength that it radiates
strength back into the mortal wearer.
If you receive a fatal attack when you still have vigor left,
you can use the rest of the vigor to heal yourself to the state you
were in before you were attacked.
[ Kubera, by Currygom]
treasury golem
gold golem
The bellows he set away from the fire, and gathered all the tools
@ -4925,6 +4933,7 @@ stiletto
went into his back up to the butt.
[ Ulysses, by James Joyce ]
~death knight
~golden knight
knight
* knight
Here lies the noble fearless knight,

View file

@ -1088,6 +1088,18 @@ A("The Shield of Yggdrasil", ELVEN_SHIELD, (const char *)0,
HEALING, (ARTI_PLUSSEV)
),
/* grants 25 STR as gauntlets of power */
/* heals you when your hp would be depleted at the cost of pw */
A("The Golden Knight", BUCKLER, (const char *)0,
3000L, GOLD, MZ_DEFAULT, WT_DEFAULT,
A_NEUTRAL, NON_PM, NON_PM, TIER_B, NOFLAG,
NO_MONS(),
NO_ATTK(), NOFLAG,
PROPS(), NOFLAG,
PROPS(), NOFLAG,
QUAKE, (ARTI_PLUSSEV)
),
/*Needs encyc entry*/
A("Whisperfeet", SPEED_BOOTS, (const char *)0,
4000L, MT_DEFAULT, MZ_DEFAULT, WT_DEFAULT,

View file

@ -1267,7 +1267,8 @@ int x;
(uwep && uwep->oartifact == ART_STORMBRINGER) ||
// (uswapwep && uswapwep->oartifact == ART_STORMBRINGER) ||
(uwep && uwep->oartifact == ART_OGRESMASHER) ||
(uswapwep && uswapwep->oartifact == ART_OGRESMASHER)
(uswapwep && uswapwep->oartifact == ART_OGRESMASHER) ||
(uarms && uarms->oartifact == ART_GOLDEN_KNIGHT)
) return(125);
#ifdef WIN32_BUG
else return(x=((tmp >= 125) ? 125 : (tmp <= 3) ? 3 : tmp));

View file

@ -2643,6 +2643,12 @@ boolean k_format;
u.uhp -= n;
if(u.uhp > u.uhpmax) u.uhp = u.uhpmax; /* perhaps n was negative */
flags.botl = 1;
/* the golden knight saves you from dying from hp loss */
if (uarms && uarms->oartifact == ART_GOLDEN_KNIGHT && u.uhp < 1 && (u.uhp*-2 < u.uen) && !Upolyd)
{
Your("power pours into your shield, and your mortal wounds close!");
healup(u.uen, 0, FALSE, FALSE); losepw(u.uen);
}
if(u.uhp < 1) {
killer_format = k_format;
killer = knam; /* the thing that killed you */

View file

@ -3793,6 +3793,7 @@ winid *datawin;
if (otyp == GAUNTLETS_OF_POWER ||
oartifact == ART_SCEPTRE_OF_MIGHT ||
oartifact == ART_STORMBRINGER ||
oartifact == ART_GOLDEN_KNIGHT ||
oartifact == ART_OGRESMASHER) OBJPUTSTR("Greatly increases STR.");
if (oartifact == ART_STORMBRINGER ||
oartifact == ART_GREAT_CLAWS_OF_URDLEN ||

View file

@ -4148,6 +4148,7 @@ int wishflags;
&& strncmpi(bp, "golden scroll", 13) && strncmpi(bp, "Gold Scroll of Law", 18)
&& strncmpi(bp, "gold wand", 9) && strncmpi(bp, "gold piece", 10)
&& strncmpi(bp, "gold coin", 9) && strncmpi(bp, "Golden Sword of Y'ha-Talla", 26)
&& strncmpi(bp, "Golden Knight", 13)
&& strncmpi(bp, "gold golem", 10)
) {
mat = GOLD;

View file

@ -2874,6 +2874,12 @@ int dmg; /* damage to deal */
flags.botl = 1;
if (dmg > 0 && magr)
magr->mhurtu = TRUE;
/* the golden knight saves you from dying from hp loss */
if (uarms && uarms->oartifact == ART_GOLDEN_KNIGHT && u.uhp < 1 && (u.uhp*-2 < u.uen) && !Upolyd)
{
Your("power pours into your shield, and your mortal wounds close!");
healup(u.uen, 0, FALSE, FALSE); losepw(u.uen);
}
/* messages */
if ((dmg > 0) && (*hp(mdef) > 0) && (*hp(mdef) * 10 < *hpmax(mdef)) && !(Upolyd && !Unchanging))
maybe_wail();