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

BUGFIX: Add mksartifact function so that artifact creation is less techi, use it to make heartcleaver

This commit is contained in:
ChrisANG 2021-09-25 00:56:11 -04:00
parent 252d4e4150
commit 20ddc04157
3 changed files with 11 additions and 2 deletions

View file

@ -94,6 +94,7 @@ E const char *FDECL(artifact_name, (const char *,short *));
E boolean FDECL(art_already_exists, (int));
E boolean FDECL(art_already_exists_byname, (int,const char *));
E void FDECL(artifact_exists, (struct obj *,const char *,BOOLEAN_P));
E struct obj * FDECL(mksartifact, (int));
E void FDECL(get_art_property_list, (int *, int, BOOLEAN_P));
E int NDECL(nartifact_exist);
E boolean FDECL(arti_gen_prop, (struct obj *, unsigned long));

View file

@ -1474,6 +1474,15 @@ register boolean mod;
return;
}
struct obj *
mksartifact(art_id)
int art_id;
{
struct obj *otmp = mksobj(artilist[art_id].otyp, MKOBJ_NOINIT);
otmp = oname(otmp, artiname(art_id));
return otmp;
}
/*
* Fills an int array of all the properties (that are in prop.h) an artifact has (either while equiped or while carried)
* If while_carried == TRUE, do not list properties that require the artifact to be wielded / worn

View file

@ -8136,8 +8136,7 @@ int faction;
// (void) mongets(mtmp, POT_FULL_HEALING, mkobjflags);
break;
case PM_BAPHOMET:
otmp = mksobj(HALBERD, mkobjflags);
otmp = oname(otmp, artiname(ART_HEARTCLEAVER));
otmp = mksartifact(ART_HEARTCLEAVER);
otmp->blessed = FALSE;
otmp->cursed = FALSE;
(void) mpickobj(mtmp,otmp);