Buff Grimtooth with poison

Grimtooth is now permanently poisoned, protects the wielder from
poison, and can be invoked to throw poison.

Permapoison code comes from xNetHack by copperwater <aosdict@gmail.com>.
This commit is contained in:
Pasi Kallinen
2025-04-12 19:24:36 +03:00
parent 48d1b8617e
commit 8f7258dc35
10 changed files with 96 additions and 27 deletions
+22
View File
@@ -283,6 +283,8 @@ mk_artifact(
otmp = 0;
} /* otherwise, otmp has not changed; just fallthrough to return it */
}
if (permapoisoned(otmp))
otmp->opoisoned = 1;
return otmp;
}
@@ -2009,6 +2011,19 @@ arti_invoke(struct obj *obj)
}
break;
}
case FLING_POISON:
if (getdir((char *) 0)) {
int venom = rn2(2) ? BLINDING_VENOM : ACID_VENOM;
struct obj *otmp = mksobj(venom, TRUE, FALSE);
otmp->spe = 1; /* the poison is yours */
throwit(otmp, 0L, FALSE, (struct obj *) 0);
} else {
/* no direction picked */
pline("%s", Never_mind);
obj->age = svm.moves;
}
break;
case BLINDING_RAY:
if (getdir((char *) 0)) {
if (u.dx || u.dy) {
@@ -2699,4 +2714,11 @@ get_artifact(struct obj *obj)
}
return &artilist[ART_NONARTIFACT];
}
/* is object permanently poisoned? (currently only Grimtooth) */
boolean
permapoisoned(struct obj *obj)
{
return (obj && is_art(obj, ART_GRIMTOOTH));
}
/*artifact.c*/