1
0
Fork 0
mirror of https://codeberg.org/noisytoot/notnotdnethack.git synced 2025-04-04 15:40:43 +01:00

Bring back force armor from ndnh1

3 AC, 3 DR, MC 3, heavy armor made of gemstone, future tech
Ana hlf starts with it
Knocks back and stuns attackers

Unlike in ndnh1, it is implemented mvm and uvm.  When worn by a
monster, it basically makes it unfightable in melee unless you have
stun resistance and are at least huge.  This isn't really a problem
since the only way to get it is to start as ana hlf or wish for it as
a tourist.
This commit is contained in:
Ron Nazarov 2024-04-22 19:39:38 +01:00
parent 236c0afa1e
commit 624869b8b2
Signed by: noisytoot
GPG key ID: 1D43EF4F4492268B
6 changed files with 45 additions and 7 deletions

View file

@ -39,7 +39,11 @@ Stacks with unknown but identical bknown and known merge
R'lyehian sight is implemented for players (as detection rather than vision)
Default ghost and shade symbols are now 8 and 6 respectively
New item: cloak of flight (from SpliceHack)
Same stats as cloak of MR, but provides flight instead of MR
Same stats as cloak of MR, but provides flight instead of MR
Bring back night vision goggles from ndnh1
Uses blindfold slot, provides extramission
Ana dwarves start with them and there is a pair on the home level (and on the android home level)
Uses blindfold slot, provides extramission, future tech
Ana dwarves start with them and there is a pair on the home level (and on the android home level)
Bring back force armor from ndnh1
3 AC, 3 DR, MC 3, heavy armor made of gemstone, future tech
Ana hlf starts with it
Knocks back and stuns attackers

View file

@ -671,7 +671,8 @@ struct obj {
typ == PROTEIN_PILL ||\
typ == ETHERBLADE || \
typ == KNUCKLE_DUSTERS || \
typ == POWER_ARMOR \
typ == POWER_ARMOR || \
typ == FORCE_ARMOR \
)
#define ensouled_item(otmp) (((otmp)->otyp >= WAGE_OF_SLOTH && (otmp)->otyp <= WAGE_OF_PRIDE)\

View file

@ -827,8 +827,8 @@ SUIT(("eilistran armor", "clockwork plate armor"),
0, 1, MZ_HUGE, ARMSZ_HEAVY, 0, 5, 250, 2000, 5, 5, 2, SILVER, HI_SILVER, O_POWER(FLYING)),
SUIT(("plasteel armor", "hard white armor", "armor"), /*Needs encyc entry*//*Needs tile*/
0, 0, MZ_HUGE, ARMSZ_MEDIUM, 0, 5, 100, 500, 5, 5, 3, PLASTIC, CLR_WHITE),
// ARMOR(("force armor", "gemstone-adorned clothing"), /* out of date structure -- rewrite if adding */
// 0, 0, 1, 0, 0, 5, 50, 1000, 9, 3, ARM_SUIT, GEMSTONE, CLR_BRIGHT_GREEN),
SUIT(("force armor", "gemstone-adorned clothing"),
0, 0, MZ_HUGE, ARMSZ_HEAVY, 0, 5, 50, 1000, 7, 3, 3, GEMSTONE, CLR_BRIGHT_GREEN),
SUIT(("splint mail"),
1, 0, MZ_HUGE, ARMSZ_HEAVY, 62, 5, 200, 80, 6, 5, 2, IRON, HI_METAL),
SUIT(("barnacle armor", "giant shell armor"),

View file

@ -5058,6 +5058,7 @@ int wishflags;
strncmpi(bp, "living arm", 10) &&
strncmpi(bp, "barnacle arm", 12) &&
strncmpi(bp, "power arm", 9) &&
strncmpi(bp, "force arm", 9) &&
strncmpi(bp, "tooled horn", 11) &&
strncmpi(bp, "food ration", 11) &&
strncmpi(bp, "meat ring", 9) &&

View file

@ -81,7 +81,7 @@ static struct trobj Anachrononaut_Hu[] = {
static struct trobj Anachrononaut_Hlf[] = {
{ AUTO_SHOTGUN, 3, WEAPON_CLASS, 1, 0 },
{ SHOTGUN_SHELL, 3, WEAPON_CLASS, 100, 0 },
{ SCALE_MAIL, 0, ARMOR_CLASS, 1, 0 },
{ FORCE_ARMOR, 0, ARMOR_CLASS, 1, 0 },
{ HELMET, 0, ARMOR_CLASS, 1, 0 },
{ GAUNTLETS, 0, ARMOR_CLASS, 1, 0 },
{ ARMORED_BOOTS, 0, ARMOR_CLASS, 1, 0 },

View file

@ -17577,6 +17577,38 @@ boolean endofchain; /* if the attacker has finished their attack chain */
}
}
}
/* Force armor */
otmp = (youdef ? uarm : which_armor(mdef, W_ARM));
if(otmp && otmp->otyp == FORCE_ARMOR && /* wearing force armor */
distmin(x(magr), y(magr), x(mdef), y(mdef)) == 1 && /* in close quarters */
!(result&MM_AGR_DIED) && /* attacker is still alive */
(result&MM_HIT) /* attacker hit */
){
int mdx=0, mdy=0, oldmx=x(magr), oldmy=y(magr),
hurtledist=(3 + max(rn2(otmp->spe),1));
pline("%s %s thrown back by %s armor's forcefield!",
!youagr ? Monnam(magr) : "You",
!youagr ? "is" : "are",
youdef ? "your" : s_suffix(mon_nam(mdef)));
if(x(mdef) - x(magr) < 0) mdx = -1;
else if(x(mdef) - x(magr) > 0) mdx = +1;
if(y(mdef) - y(magr) < 0) mdy = -1;
else if(y(mdef) - y(magr) > 0) mdy = +1;
if (youagr) {
/* mhurtle checks size but hurtle doesn't */
if (magr->data->msize < MZ_HUGE)
hurtle(-mdx, -mdy, hurtledist, FALSE, FALSE);
/* mhurtle stuns but hurtle doesn't */
if (!Stunned) make_stunned((long)rnd(5), TRUE);
} else {
mhurtle(magr, -mdx, -mdy, hurtledist, FALSE);
}
if (oldmx != x(magr) || oldmy != y(magr)) {
if (DEADMONSTER(magr)) result |= MM_AGR_DIED;
else result |= MM_AGR_STOP;
}
}
}
return result;
}