mirror of
https://codeberg.org/noisytoot/notnotdnethack.git
synced 2025-08-05 12:15:26 +01:00
This commit is contained in:
commit
0eb1d934bd
8 changed files with 150 additions and 99 deletions
|
@ -1001,6 +1001,7 @@ blue jelly
|
|||
[ Hypothermia, Frostbite, and Other Cold Injuries:
|
||||
Prevention, Survival, Rescue and Treatment
|
||||
by Gordon G. Giesbrecht, James A. Wilkerson ]
|
||||
~crystal ooze
|
||||
blob
|
||||
* blob
|
||||
ooze
|
||||
|
@ -2281,6 +2282,16 @@ disenchanter
|
|||
|
||||
"Ask not, what your magic can do to it.
|
||||
Ask what it can do to your magic."
|
||||
diskos
|
||||
And here I must make known that these weapons did not shoot; but had a
|
||||
disk of grey metal, sharp and wonderful, that spun in the end of a rod
|
||||
of grey metal, and were someways charged by the Earth-Current, so that
|
||||
were any but stricken thereby, they were cut in twain so easy as aught.
|
||||
And the weapons were contrived to the repelling of any Army of Monsters
|
||||
that might make to win entrance to the Redoubt. And to the eye they had
|
||||
somewhat the look of strange battle-axes, and might be lengthened by
|
||||
the pulling out of the handles.
|
||||
[ The Night Land, by William Hope Hodgson ]
|
||||
dispater
|
||||
The Roman ruler of the underworld and fortune, similar to the Greek
|
||||
Hades. Every hundred years, the Ludi Tarentini were celebrated in his
|
||||
|
@ -3091,9 +3102,9 @@ fallen angel
|
|||
enemy. The demon race was bred to overthrow this enemy and
|
||||
take its throne and whatever else we forget, we should
|
||||
never forget that destiny. A full third of the Host fell,
|
||||
according to some accounts. For their sins <EFBFBD> for pride,
|
||||
according to some accounts. For their sins - for pride,
|
||||
for rebellion, for desiring to be like God, for unknowable
|
||||
and ineffable reasons <EFBFBD> they were banished and they fell.
|
||||
and ineffable reasons - they were banished and they fell.
|
||||
[ Infernum, Book of the Tormentor, by Gareth Hanrahan ]
|
||||
fedora
|
||||
Some hats can only be worn if you're willing to be jaunty, to set
|
||||
|
@ -8592,6 +8603,7 @@ forked polearm
|
|||
\H/
|
||||
H
|
||||
~phase spider
|
||||
~mirkwood spider
|
||||
*spider
|
||||
Eight legged creature capable of spinning webs to trap prey.
|
||||
|
||||
|
|
8
src/do.c
8
src/do.c
|
@ -1960,6 +1960,14 @@ int different;
|
|||
struct obj *nobj;
|
||||
for(cur = level.objects[ox][oy]; cur; cur = nobj){
|
||||
nobj = cur->nexthere;
|
||||
/* Monsters don't pick up your ball and chain */
|
||||
if(cur == uball || cur == uchain)
|
||||
continue;
|
||||
|
||||
/* Monsters don't pick up bolted magic chests */
|
||||
if(cur->otyp == MAGIC_CHEST && cur->obolted)
|
||||
continue;
|
||||
|
||||
if(likes_obj(mtmp, cur) || can_equip(mtmp, cur)){
|
||||
obj_extract_self(cur);
|
||||
mpickobj(mtmp, cur);
|
||||
|
|
|
@ -1007,6 +1007,7 @@ register int after; /* this is extra fast monster movement */
|
|||
if (appr == -2) return(0);
|
||||
|
||||
#ifdef BARD
|
||||
/*NOTE: This may make pets skip their turns IF YOU ARE SINGING (pet_can_sing checks). */
|
||||
if (pet_can_sing(mtmp, FALSE))
|
||||
return(3);
|
||||
/* lose tameness if under effects of taming song */
|
||||
|
@ -1015,6 +1016,7 @@ register int after; /* this is extra fast monster movement */
|
|||
if (wizard) pline("[%s friend for %d(%d)]", Monnam(mtmp), mtmp->mtame, EDOG(mtmp)->waspeaceful);
|
||||
if (mtmp->mtame <= 0) {
|
||||
untame(mtmp, EDOG(mtmp)->waspeaceful);
|
||||
return(3);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
196
src/invent.c
196
src/invent.c
|
@ -2586,6 +2586,7 @@ winid *datawin;
|
|||
: (oc.oc_dir == IMMEDIATE ? "Beam"
|
||||
: "Ray"));
|
||||
int goatweaponturn = 0;
|
||||
boolean printed_type = FALSE;
|
||||
|
||||
if(check_oprop(obj,OPROP_GOATW))
|
||||
goatweaponturn = goat_weapon_damage_turn(obj);
|
||||
|
@ -2624,55 +2625,61 @@ winid *datawin;
|
|||
}
|
||||
|
||||
/* Object classes currently with no special messages here: amulets. */
|
||||
if (olet == WEAPON_CLASS || (olet == TOOL_CLASS && oc.oc_skill) || otyp == HEAVY_IRON_BALL || olet == GEM_CLASS) {
|
||||
if (olet == WEAPON_CLASS || (olet == TOOL_CLASS && oc.oc_skill) || otyp == HEAVY_IRON_BALL || olet == GEM_CLASS || oartifact == ART_WAND_OF_ORCUS) {
|
||||
int mask = attack_mask(obj, otyp, oartifact);
|
||||
boolean otyp_is_blaster = (otyp == HAND_BLASTER || otyp == ARM_BLASTER || otyp == MASS_SHADOW_PISTOL || otyp == CUTTING_LASER || otyp == RAYGUN);
|
||||
boolean otyp_is_launcher = (((oc.oc_skill >= P_BOW && oc.oc_skill <= P_CROSSBOW) || otyp == ATLATL) && !otyp_is_blaster);
|
||||
|
||||
/* get damage type */
|
||||
buf2[0] = '\0';
|
||||
int i;
|
||||
static const char * damagetypes[] = { "blunt", "piercing", "slashing", "energy" };
|
||||
for (i = 0; i < 4; i++) {
|
||||
if (mask & (1 << i)) {
|
||||
if (eos(buf2) != buf2)
|
||||
Strcat(buf2, "/");
|
||||
Strcat(buf2, damagetypes[i]);
|
||||
/* print type */
|
||||
if (!printed_type) {
|
||||
buf2[0] = '\0';
|
||||
int i;
|
||||
static const char * damagetypes[] = { "blunt", "piercing", "slashing", "energy" };
|
||||
for (i = 0; i < 4; i++) {
|
||||
if (mask & (1 << i)) {
|
||||
if (eos(buf2) != buf2)
|
||||
Strcat(buf2, "/");
|
||||
Strcat(buf2, damagetypes[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (otyp == FRAG_GRENADE || otyp == GAS_GRENADE || otyp == ROCKET || otyp == STICK_OF_DYNAMITE)
|
||||
Strcpy(buf2, "explosive");
|
||||
Strcat(buf2, " ");
|
||||
if (otyp == FRAG_GRENADE || otyp == GAS_GRENADE || otyp == ROCKET || otyp == STICK_OF_DYNAMITE)
|
||||
Strcpy(buf2, "explosive");
|
||||
Strcat(buf2, " ");
|
||||
|
||||
if (oc.oc_skill > 0) {
|
||||
if (obj) {
|
||||
Sprintf(buf, "%s-handed %s%s%s.",
|
||||
((obj ? bimanual(obj, youmonst.data) : oc.oc_bimanual) ? "Two" : "One"),
|
||||
(otyp_is_blaster || otyp_is_launcher) ? "" : buf2,
|
||||
(otyp_is_blaster ? "blaster" : otyp_is_launcher ? "launcher" : "weapon"),
|
||||
((obj && is_weptool(obj)) && !otyp_is_launcher ? "-tool" : "")
|
||||
);
|
||||
if (oc.oc_skill > 0) {
|
||||
if (obj) {
|
||||
Sprintf(buf, "%s-handed %s%s%s.",
|
||||
((obj ? bimanual(obj, youmonst.data) : oc.oc_bimanual) ? "Two" : "One"),
|
||||
(otyp_is_blaster || otyp_is_launcher) ? "" : buf2,
|
||||
(otyp_is_blaster ? "blaster" : otyp_is_launcher ? "launcher" : "weapon"),
|
||||
((obj && is_weptool(obj)) && !otyp_is_launcher ? "-tool" : "")
|
||||
);
|
||||
}
|
||||
else {
|
||||
Sprintf(buf, "%s-handed %s%s%s.",
|
||||
(oc.oc_bimanual ? "Two" : "Single"),
|
||||
(otyp_is_blaster || otyp_is_launcher) ? "" : buf2,
|
||||
(otyp_is_launcher ? "launcher" : "weapon"),
|
||||
((olet == TOOL_CLASS && oc.oc_skill) ? "-tool" : ""));
|
||||
}
|
||||
}
|
||||
else if (oc.oc_skill <= -P_BOW && oc.oc_skill >= -P_CROSSBOW) {
|
||||
Sprintf(buf, "%sammunition.", upstart(buf2));
|
||||
}
|
||||
else if (olet == WAND_CLASS) {
|
||||
Sprintf(buf, "%s wand.", dir);
|
||||
}
|
||||
else {
|
||||
Sprintf(buf, "%s-handed %s%s%s.",
|
||||
(oc.oc_bimanual ? "Two" : "Single"),
|
||||
(otyp_is_blaster || otyp_is_launcher) ? "" : buf2,
|
||||
(otyp_is_launcher ? "launcher" : "weapon"),
|
||||
((olet == TOOL_CLASS && oc.oc_skill) ? "-tool" : ""));
|
||||
Sprintf(buf, "Thrown %smissile.", buf2);
|
||||
}
|
||||
/* special cases */
|
||||
if (oartifact == ART_PEN_OF_THE_VOID && obj && (obj->ovar1 & SEAL_EVE))
|
||||
Strcpy(eos(buf)-1, ", and launcher.");
|
||||
if (oartifact == ART_LIECLEAVER || oartifact == ART_ROGUE_GEAR_SPIRITS || oartifact == ART_WAND_OF_ORCUS)
|
||||
Sprintf(eos(buf)-1, ", and %smelee weapon.", buf2);
|
||||
OBJPUTSTR(buf);
|
||||
printed_type = TRUE;
|
||||
}
|
||||
else if (oc.oc_skill <= -P_BOW && oc.oc_skill >= -P_CROSSBOW) {
|
||||
Sprintf(buf, "%sammunition.", upstart(buf2));
|
||||
}
|
||||
else {
|
||||
Sprintf(buf, "Thrown %smissile.", buf2);
|
||||
}
|
||||
/* special cases */
|
||||
if (oartifact == ART_PEN_OF_THE_VOID && obj && (obj->ovar1 & SEAL_EVE))
|
||||
Strcpy(eos(buf)-1, ", and launcher.");
|
||||
if (oartifact == ART_LIECLEAVER || oartifact == ART_ROGUE_GEAR_SPIRITS || oartifact == ART_WAND_OF_ORCUS)
|
||||
Sprintf(eos(buf)-1, ", and %smelee weapon.", buf2);
|
||||
OBJPUTSTR(buf);
|
||||
|
||||
/* what skill does it use? */
|
||||
if (obj ? weapon_type(obj) : oc.oc_skill != P_NONE) {
|
||||
|
@ -2686,9 +2693,6 @@ winid *datawin;
|
|||
case ART_ROGUE_GEAR_SPIRITS:
|
||||
Strcpy(buf2, " at range, and your pickaxe skill in melee.");
|
||||
break;
|
||||
case ART_WAND_OF_ORCUS:
|
||||
Strcpy(buf2, " at range, and your mace skill in melee.");
|
||||
break;
|
||||
case ART_PEN_OF_THE_VOID:
|
||||
if(obj->ovar1 & SEAL_EVE) {
|
||||
Strcpy(buf2, " in melee, and your ammo's skill at range.");
|
||||
|
@ -3223,27 +3227,30 @@ winid *datawin;
|
|||
/* Armor type */
|
||||
/* Indexes here correspond to ARM_SHIELD, etc; not the W_* masks.
|
||||
* Expects ARM_SUIT = 0, all the way up to ARM_SHIRT = 6. */
|
||||
const char* armorslots[] = {
|
||||
"torso", "shield", "helm", "gloves", "boots", "cloak", "shirt"
|
||||
};
|
||||
if (obj) {
|
||||
Sprintf(buf, "%s, worn in the %s slot.",
|
||||
(oc.oc_armcat != ARM_SUIT ? "Armor" :
|
||||
is_light_armor(obj) ? "Light armor" :
|
||||
is_medium_armor(obj) ? "Medium armor" :
|
||||
"Heavy armor"),
|
||||
armorslots[oc.oc_armcat]);
|
||||
if (!printed_type) {
|
||||
const char* armorslots[] = {
|
||||
"torso", "shield", "helm", "gloves", "boots", "cloak", "shirt"
|
||||
};
|
||||
if (obj) {
|
||||
Sprintf(buf, "%s, worn in the %s slot.",
|
||||
(oc.oc_armcat != ARM_SUIT ? "Armor" :
|
||||
is_light_armor(obj) ? "Light armor" :
|
||||
is_medium_armor(obj) ? "Medium armor" :
|
||||
"Heavy armor"),
|
||||
armorslots[oc.oc_armcat]);
|
||||
}
|
||||
else {
|
||||
/* currently, the is_x_armor checks wouldn't actually need an obj,
|
||||
* but there's no sense in rewriting perfectly good code to fit
|
||||
* immediate needs and possibly prevent future changes that would
|
||||
* like details from the obj itself
|
||||
*/
|
||||
Sprintf(buf, "Armor, worn in the %s slot.",
|
||||
armorslots[oc.oc_armcat]);
|
||||
}
|
||||
OBJPUTSTR(buf);
|
||||
printed_type = TRUE;
|
||||
}
|
||||
else {
|
||||
/* currently, the is_x_armor checks wouldn't actually need an obj,
|
||||
* but there's no sense in rewriting perfectly good code to fit
|
||||
* immediate needs and possibly prevent future changes that would
|
||||
* like details from the obj itself
|
||||
*/
|
||||
Sprintf(buf, "Armor, worn in the %s slot.",
|
||||
armorslots[oc.oc_armcat]);
|
||||
}
|
||||
OBJPUTSTR(buf);
|
||||
/* Defense */
|
||||
if (obj && obj->known) {// calculate the actual AC and DR this armor gives
|
||||
if(is_shield(obj) && obj->objsize != youracedata->msize){
|
||||
|
@ -3419,40 +3426,44 @@ winid *datawin;
|
|||
}
|
||||
}
|
||||
if (olet == SPBOOK_CLASS) {
|
||||
if (otyp == SPE_BLANK_PAPER)
|
||||
{
|
||||
OBJPUTSTR("Empty book.");
|
||||
}
|
||||
else if (otyp == SPE_BOOK_OF_THE_DEAD)
|
||||
{
|
||||
OBJPUTSTR("Ancient tome.");
|
||||
}
|
||||
else if (oartifact || otyp == SPE_SECRETS)
|
||||
{
|
||||
OBJPUTSTR("Ancient tome.");
|
||||
switch (oartifact)
|
||||
{
|
||||
case ART_NECRONOMICON:
|
||||
OBJPUTSTR("What dark secrets still lurk in its pages?");
|
||||
if (!printed_type) {
|
||||
switch(otyp) {
|
||||
case SPE_BLANK_PAPER:
|
||||
OBJPUTSTR("Empty book.");
|
||||
break;
|
||||
case ART_BOOK_OF_LOST_NAMES:
|
||||
OBJPUTSTR("Spirits from the void call out from its pages.");
|
||||
case SPE_BOOK_OF_THE_DEAD:
|
||||
OBJPUTSTR("Ancient tome.");
|
||||
break;
|
||||
case ART_BOOK_OF_INFINITE_SPELLS:
|
||||
OBJPUTSTR("Arcane magics fill its endless pages.");
|
||||
case SPE_SECRETS:
|
||||
OBJPUTSTR("Ancient tome.");
|
||||
break;
|
||||
default:
|
||||
Sprintf(buf, "Level %d spellbook, in the %s school. %s spell.",
|
||||
oc.oc_level, spelltypemnemonic(oc.oc_skill), dir);
|
||||
OBJPUTSTR(buf);
|
||||
break;
|
||||
}
|
||||
printed_type = TRUE;
|
||||
}
|
||||
else
|
||||
switch (oartifact)
|
||||
{
|
||||
Sprintf(buf, "Level %d spellbook, in the %s school. %s spell.",
|
||||
oc.oc_level, spelltypemnemonic(oc.oc_skill), dir);
|
||||
OBJPUTSTR(buf);
|
||||
case ART_NECRONOMICON:
|
||||
OBJPUTSTR("What dark secrets still lurk in its pages?");
|
||||
break;
|
||||
case ART_BOOK_OF_LOST_NAMES:
|
||||
OBJPUTSTR("Spirits from the void call out from its pages.");
|
||||
break;
|
||||
case ART_BOOK_OF_INFINITE_SPELLS:
|
||||
OBJPUTSTR("Arcane magics fill its endless pages.");
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (olet == WAND_CLASS) {
|
||||
Sprintf(buf, "%s wand.", dir);
|
||||
OBJPUTSTR(buf);
|
||||
if (!printed_type) {
|
||||
Sprintf(buf, "%s wand.", dir);
|
||||
OBJPUTSTR(buf);
|
||||
printed_type = TRUE;
|
||||
}
|
||||
}
|
||||
if (olet == RING_CLASS) {
|
||||
if (oc.oc_charged && otyp != RIN_WISHES)
|
||||
|
@ -3471,14 +3482,17 @@ winid *datawin;
|
|||
OBJPUTSTR(buf);
|
||||
OBJPUTSTR("Apply to crush the stone and expend the trapped soul.");
|
||||
}
|
||||
else if (oc.oc_material == MINERAL) {
|
||||
else if (oc.oc_material == MINERAL && !printed_type) {
|
||||
OBJPUTSTR("Type of stone.");
|
||||
printed_type = TRUE;
|
||||
}
|
||||
else if (oc.oc_material == GLASS) {
|
||||
else if (oc.oc_material == GLASS && !printed_type) {
|
||||
OBJPUTSTR("Piece of colored glass.");
|
||||
printed_type = TRUE;
|
||||
}
|
||||
else {
|
||||
else if (!printed_type) {
|
||||
OBJPUTSTR("Precious gem.");
|
||||
printed_type = TRUE;
|
||||
}
|
||||
}
|
||||
if (olet == SCOIN_CLASS) {
|
||||
|
@ -3513,7 +3527,7 @@ winid *datawin;
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (olet == TOOL_CLASS && !(olet == TOOL_CLASS && oc.oc_skill)) {
|
||||
if (olet == TOOL_CLASS && !printed_type) {
|
||||
const char* subclass = "tool";
|
||||
switch (otyp) {
|
||||
case BLINDFOLD:
|
||||
|
|
|
@ -3666,7 +3666,7 @@ struct monst *mtmp;
|
|||
&& which_armor(mtmp, W_ARMC)->oartifact == ART_SPELL_WARDED_WRAPPINGS_OF_
|
||||
)
|
||||
lifesavers |= LSVD_NBW;
|
||||
if (mtmp->mspec_used == 0 && (is_uvuudaum(mtmp->data) || mtmp->mtyp == PM_PRAYERFUL_THING))
|
||||
if (mtmp->mspec_used == 0 && (is_uvuudaum(mtmp->data) || mtmp->mtyp == PM_PRAYERFUL_THING) && !mtmp->mcan)
|
||||
lifesavers |= LSVD_UVU;
|
||||
if (lifesave)
|
||||
lifesavers |= LSVD_OBJ;
|
||||
|
@ -3677,11 +3677,11 @@ struct monst *mtmp;
|
|||
lifesavers |= LSVD_ALA;
|
||||
if (Infuture && mtmp->mpeaceful && !is_myrkalfr(mtmp) && !nonliving(mtmp->data) && !is_android(mtmp->data))
|
||||
lifesavers |= LSVD_FLS;
|
||||
if (has_template(mtmp, FRACTURED) && !rn2(2))
|
||||
if (has_template(mtmp, FRACTURED) && !rn2(2) && !mtmp->mcan)
|
||||
lifesavers |= LSVD_FRC;
|
||||
if (mtmp->ispolyp)
|
||||
lifesavers |= LSVD_PLY;
|
||||
if (has_template(mtmp, ILLUMINATED))
|
||||
if (has_template(mtmp, ILLUMINATED) && !mtmp->mcan)
|
||||
lifesavers |= LSVD_ILU;
|
||||
if (mtmp->zombify && is_kamerel(mtmp->data))
|
||||
lifesavers |= LSVD_KAM;
|
||||
|
|
12
src/muse.c
12
src/muse.c
|
@ -2558,6 +2558,10 @@ can_equip(mon, obj)
|
|||
struct monst *mon;
|
||||
struct obj *obj;
|
||||
{
|
||||
/* Monsters csn't equip your ball and chain */
|
||||
if(obj == uball || obj == uchain)
|
||||
return FALSE;
|
||||
|
||||
if(mon->mtyp == PM_CATHEZAR && obj->otyp == CHAIN)
|
||||
return TRUE;
|
||||
if(obj->oclass == WEAPON_CLASS || is_weptool(obj))
|
||||
|
@ -2587,6 +2591,14 @@ struct monst *mon;
|
|||
struct obj *obj;
|
||||
{
|
||||
struct permonst *ptr = mon->data;
|
||||
/* Monsters don't want your ball and chain */
|
||||
if(obj == uball || obj == uchain)
|
||||
return FALSE;
|
||||
|
||||
/* Monsters don't want bolted magic chests */
|
||||
if(obj->otyp == MAGIC_CHEST && obj->obolted)
|
||||
return FALSE;
|
||||
|
||||
switch(obj->oclass){
|
||||
case WEAPON_CLASS:
|
||||
return likes_objs(ptr);
|
||||
|
|
|
@ -3223,7 +3223,7 @@ struct obj *obj;
|
|||
if ((obj->otyp == CHAIN) && (Role_if(PM_CONVICT) || u.sealsActive&SEAL_AHAZU))
|
||||
return objects[obj->otyp].oc_skill;
|
||||
if (obj->oclass != WEAPON_CLASS && obj->oclass != TOOL_CLASS &&
|
||||
obj->oclass != GEM_CLASS)
|
||||
obj->oclass != GEM_CLASS && obj->oartifact != ART_WAND_OF_ORCUS)
|
||||
/* Not a weapon, weapon-tool, or ammo */
|
||||
return (P_NONE);
|
||||
|
||||
|
@ -3249,6 +3249,9 @@ struct obj *obj;
|
|||
else if(obj->oartifact == ART_SINGING_SWORD){
|
||||
type = P_MUSICALIZE;
|
||||
}
|
||||
else if(obj->oartifact == ART_WAND_OF_ORCUS){
|
||||
type = P_MACE;
|
||||
}
|
||||
|
||||
if(obj->otyp == DOUBLE_LIGHTSABER){
|
||||
if(!obj->altmode)
|
||||
|
|
|
@ -782,10 +782,10 @@ int *container_nesting;
|
|||
*/
|
||||
struct monst *
|
||||
revive(obj, dolls)
|
||||
register struct obj *obj;
|
||||
struct obj *obj;
|
||||
boolean dolls;
|
||||
{
|
||||
register struct monst *mtmp = (struct monst *)0;
|
||||
struct monst *mtmp = (struct monst *)0;
|
||||
struct obj *container = (struct obj *)0;
|
||||
int container_nesting = 0;
|
||||
schar savetame = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue