From ecf76efc84b3775d2a94e60b2652b29cdf70c553 Mon Sep 17 00:00:00 2001 From: Erik Lunna Date: Fri, 13 Oct 2023 09:44:43 +0200 Subject: [PATCH] Refactored property names to be more readable or just be shorter. Also renamed resilience property to toughness, fixed the stat that vigilance grants, and changed the description of stone resistance to versus stone. --- include/obj.h | 61 ++++++++++++++++++++------------------ src/artifact.c | 40 ++++++++++++------------- src/do_wear.c | 32 ++++++++++---------- src/makemon.c | 2 +- src/objnam.c | 80 ++++++++++++++++++++++++-------------------------- src/pager.c | 20 ++++++------- src/trap.c | 8 ++--- src/wield.c | 46 +++++++++++++---------------- src/worn.c | 22 +++++++------- src/zap.c | 4 +-- 10 files changed, 155 insertions(+), 160 deletions(-) diff --git a/include/obj.h b/include/obj.h index 4211a34c1..d82eb0b6e 100644 --- a/include/obj.h +++ b/include/obj.h @@ -592,31 +592,34 @@ struct obj { #define ITEM_FROST 0x00000002L /* frost damage or resistance */ #define ITEM_SHOCK 0x00000004L /* shock damage or resistance */ #define ITEM_VENOM 0x00000008L /* poison damage or resistance */ -#define ITEM_ACID 0x00000010L /* acid damage or resistance */ +#define ITEM_SIZZLE 0x00000010L /* acid damage or resistance */ #define ITEM_SCREAM 0x00000020L /* sonic damage or resistance */ -#define ITEM_DRLI 0x00000040L /* drains life or resists it */ +#define ITEM_DECAY 0x00000040L /* drains life or resistance */ #define ITEM_OILSKIN 0x00000080L /* permanently greased */ -#define ITEM_ESP 0x00000100L /* extrinsic telepathy */ -#define ITEM_SEARCHING 0x00000200L /* extrinsic searching */ -#define ITEM_VIGIL 0x00000400L /* extrinsic warning */ -#define ITEM_EXCEL 0x00000800L /* confers luck, charisma boost */ -#define ITEM_FUMBLING 0x00001000L /* extrinsic fumbling */ -#define ITEM_HUNGER 0x00002000L /* extrinsic hunger */ -#define ITEM_STENCH 0x00004000L /* extrinsic aggravate monster */ -#define ITEM_TELE 0x00008000L /* extrinsic teleportitis */ -#define ITEM_SLOW 0x00010000L /* extrinsic slowness */ -#define ITEM_SUSTAIN 0x00020000L /* extrinsic sustain ability */ -#define ITEM_STEALTH 0x00040000L /* extrinsic stealth */ -#define ITEM_INSIGHT 0x00080000L /* extrinsic see invisible */ -#define ITEM_SLEEP 0x00100000L /* extrinsic sleep resistance */ -#define ITEM_STONE 0x00200000L /* extrinsic stoning resistance */ -#define ITEM_SICK 0x00400000L /* extrinsic sickness resistance */ -#define ITEM_STUN 0x00800000L /* extrinsic stun resistance */ -#define ITEM_STABLE 0x01000000L /* extrinsic clobber resistance */ -#define ITEM_WWALK 0x02000000L /* extrinsic water walking */ -#define ITEM_SWIM 0x04000000L /* extrinsic swimming */ -#define ITEM_RAGE 0x08000000L /* extrinsic rage and fearlessness */ -#define ITEM_TOUGH 0x10000000L /* extrinsic disintegration res */ +#define ITEM_ESP 0x00000100L /* telepathy */ +#define ITEM_SEARCH 0x00000200L /* searching */ +#define ITEM_VIGIL 0x00000400L /* warning, wisdom boost, flanking defense */ +#define ITEM_EXCEL 0x00000800L /* luck, charisma boost */ +#define ITEM_FUMBLE 0x00001000L /* fumbling */ +#define ITEM_HUNGER 0x00002000L /* hunger */ +#define ITEM_STENCH 0x00004000L /* aggravate monster, prevents digestion + * stenchy items cannot be eaten by players or monsters */ +#define ITEM_TELE 0x00008000L /* teleportitis */ +#define ITEM_SLOW 0x00010000L /* slowness */ +#define ITEM_SUSTAIN 0x00020000L /* sustain ability, items retain their enchantment level */ +#define ITEM_STEALTH 0x00040000L /* stealth */ +#define ITEM_INSIGHT 0x00080000L /* see invisible, magical vision */ +#define ITEM_SLEEP 0x00100000L /* sleep resistance */ +#define ITEM_FLEX 0x00200000L /* stoning resistance */ +#define ITEM_HEALTH 0x00400000L /* sickness resistance */ +#define ITEM_STUN 0x00800000L /* stun resistance */ +#define ITEM_STABLE 0x01000000L /* clobber resistance */ +#define ITEM_SURF 0x02000000L /* water walking */ +#define ITEM_SWIM 0x04000000L /* swimming */ +#define ITEM_RAGE 0x08000000L /* fearlessness, bloodthirsty + * makes your weapon deal max damage */ +#define ITEM_TOUGH 0x10000000L /* disintegration res + * Makes items erosionproof and indestructible */ #define ITEM_PROWESS 0x20000000L /* Speeds up tech cooldowns, skill bonuses */ #define ITEM_MAGICAL 0x80000000L /* known to have magical properties */ @@ -626,19 +629,19 @@ struct obj { /* Properties that grant both a worn resistance and attack type */ #define ITEM_RES_PROPS (ITEM_FIRE | ITEM_FROST | ITEM_SHOCK | ITEM_VENOM \ - | ITEM_ACID | ITEM_SCREAM | ITEM_DRLI \ - | ITEM_SLEEP | ITEM_STONE | ITEM_SICK \ + | ITEM_SIZZLE | ITEM_SCREAM | ITEM_DECAY \ + | ITEM_SLEEP | ITEM_FLEX | ITEM_HEALTH \ | ITEM_STUN) /* Positive properties */ -#define ITEM_GOOD_PROPS (ITEM_OILSKIN | ITEM_ESP | ITEM_SEARCHING \ +#define ITEM_GOOD_PROPS (ITEM_OILSKIN | ITEM_ESP | ITEM_SEARCH \ | ITEM_VIGIL | ITEM_EXCEL | ITEM_SUSTAIN \ | ITEM_STEALTH | ITEM_INSIGHT | ITEM_STABLE \ - | ITEM_WWALK | ITEM_SWIM | ITEM_RAGE | ITEM_TOUGH) + | ITEM_SURF | ITEM_SWIM | ITEM_RAGE | ITEM_TOUGH) /* Negative properties */ -#define ITEM_BAD_PROPS (ITEM_FUMBLING | ITEM_HUNGER | ITEM_STENCH \ +#define ITEM_BAD_PROPS (ITEM_FUMBLE | ITEM_HUNGER | ITEM_STENCH \ | ITEM_TELE | ITEM_SLOW) -#define NON_WEP_PROPS (ITEM_SLEEP | ITEM_STONE | ITEM_SICK | ITEM_STUN) +#define NON_WEP_PROPS (ITEM_SLEEP | ITEM_FLEX | ITEM_HEALTH | ITEM_STUN) #define ONLY_WEP_PROPS (ITEM_RAGE | ITEM_PROWESS) /* diff --git a/src/artifact.c b/src/artifact.c index 3c8a025d0..6adf0330f 100644 --- a/src/artifact.c +++ b/src/artifact.c @@ -505,7 +505,7 @@ int prop; { int i; /* Alchemy smock is the king of exceptions */ - if (otmp->otyp == ALCHEMY_SMOCK && (prop & (ITEM_ACID | ITEM_VENOM))) + if (otmp->otyp == ALCHEMY_SMOCK && (prop & (ITEM_SIZZLE | ITEM_VENOM))) return TRUE; for (i = 0; i < NUM_PROPERTIES; i++) { @@ -762,15 +762,15 @@ struct obj *otmp; return TRUE; if (adtyp == AD_DRST && (otmp->oprops & ITEM_VENOM)) return TRUE; - if (adtyp == AD_ACID && (otmp->oprops & ITEM_ACID)) + if (adtyp == AD_ACID && (otmp->oprops & ITEM_SIZZLE)) return TRUE; - if (adtyp == AD_DRLI && (otmp->oprops & ITEM_DRLI)) + if (adtyp == AD_DRLI && (otmp->oprops & ITEM_DECAY)) return TRUE; if (adtyp == AD_SLEE && (otmp->oprops & ITEM_SLEEP)) return TRUE; - if (adtyp == AD_STON && (otmp->oprops & ITEM_STONE)) + if (adtyp == AD_STON && (otmp->oprops & ITEM_FLEX)) return TRUE; - if (adtyp == AD_DISE && (otmp->oprops & ITEM_SICK)) + if (adtyp == AD_DISE && (otmp->oprops & ITEM_HEALTH)) return TRUE; if (adtyp == AD_STUN && (otmp->oprops & ITEM_STUN)) return TRUE; @@ -958,7 +958,7 @@ long wp_mask; if (oart) { spfx = (wp_mask != W_ART) ? oart->spfx : oart->cspfx; } else if (wp_mask == W_WEP || wp_mask == W_SWAPWEP) { - if (otmp->oprops & ITEM_SEARCHING) + if (otmp->oprops & ITEM_SEARCH) spfx |= SPFX_SEARCH; if (otmp->oprops & ITEM_VIGIL) spfx |= SPFX_WARN; @@ -1435,7 +1435,7 @@ int tmp; return dbon; } } - if ((otmp->oprops & ITEM_DRLI) + if ((otmp->oprops & ITEM_DECAY) && ((yours) ? (!Drain_resistance) : (!resists_drli(mon)))) { spec_dbon_applies = TRUE; return 0; @@ -2211,7 +2211,7 @@ int dieroll; /* needed for Magicbane and vorpal blades */ : "burns", hittee, !spec_dbon_applies ? '.' : '!'); } else if (otmp->oclass == WEAPON_CLASS - && (otmp->oprops & ITEM_ACID)) { + && (otmp->oprops & ITEM_SIZZLE)) { pline_The("acidic %s %s %s%c", distant_name(otmp, xname), !spec_dbon_applies ? "hits" @@ -2225,8 +2225,8 @@ int dieroll; /* needed for Magicbane and vorpal blades */ if (!rn2(5)) erode_armor(mdef, ERODE_CORRODE); } - if ((otmp->oprops & ITEM_ACID) && spec_dbon_applies) { - otmp->oprops_known |= ITEM_ACID; + if ((otmp->oprops & ITEM_SIZZLE) && spec_dbon_applies) { + otmp->oprops_known |= ITEM_SIZZLE; update_inventory(); } return realizes_damage; @@ -3014,7 +3014,7 @@ int dieroll; /* needed for Magicbane and vorpal blades */ pline_The("massive sword draws the %s from %s!", life, mon_nam(mdef)); else if (otmp->oclass == WEAPON_CLASS - && (otmp->oprops & ITEM_DRLI)) + && (otmp->oprops & ITEM_DECAY)) pline_The("deadly %s draws the %s from %s!", distant_name(otmp, xname), life, mon_nam(mdef)); @@ -3023,8 +3023,8 @@ int dieroll; /* needed for Magicbane and vorpal blades */ pline("%s draws the %s from %s!", The(distant_name(otmp, xname)), life, mon_nam(mdef)); - if (otmp->oprops & ITEM_DRLI) { - otmp->oprops_known |= ITEM_DRLI; + if (otmp->oprops & ITEM_DECAY) { + otmp->oprops_known |= ITEM_DECAY; update_inventory(); } } @@ -3059,15 +3059,15 @@ int dieroll; /* needed for Magicbane and vorpal blades */ else if (otmp->oartifact == ART_LIFESTEALER) pline_The("massive sword drains your %s!", life); else if (otmp->oclass == WEAPON_CLASS - && (otmp->oprops & ITEM_DRLI)) + && (otmp->oprops & ITEM_DECAY)) pline_The("deadly %s drains your %s!", distant_name(otmp, xname), life); /* The Staff of Aesculapius */ else pline("%s drains your %s!", The(distant_name(otmp, xname)), life); - if (otmp->oprops & ITEM_DRLI) { - otmp->oprops_known |= ITEM_DRLI; + if (otmp->oprops & ITEM_DECAY) { + otmp->oprops_known |= ITEM_DECAY; update_inventory(); } losexp("life drainage"); @@ -4119,10 +4119,10 @@ struct obj *obj; obj->oprops_known |= ITEM_SHOCK; return TRUE; } - if (ad_type == AD_DRLI || oprops & ITEM_DRLI) { + if (ad_type == AD_DRLI || oprops & ITEM_DECAY) { pline("%s thins the %s!", The(xname(obj)), hliquid("water")); if (oprops) - obj->oprops_known |= ITEM_DRLI; + obj->oprops_known |= ITEM_DECAY; return TRUE; } if (ad_type == AD_LOUD || oprops & ITEM_SCREAM) { @@ -4131,10 +4131,10 @@ struct obj *obj; obj->oprops_known |= ITEM_SCREAM; return TRUE; } - if (ad_type == AD_ACID || oprops & ITEM_ACID) { + if (ad_type == AD_ACID || oprops & ITEM_SIZZLE) { pline("The %s bubbles from contact with your %s!", hliquid("water"), xname(obj)); if (oprops) - obj->oprops_known |= ITEM_ACID; + obj->oprops_known |= ITEM_SIZZLE; return TRUE; } if (oprops & ITEM_RAGE) { diff --git a/src/do_wear.c b/src/do_wear.c index 387a692f0..bb2bde474 100644 --- a/src/do_wear.c +++ b/src/do_wear.c @@ -219,17 +219,17 @@ long mask; EShock_resistance |= mask; if (props & ITEM_VENOM) EPoison_resistance |= mask; - if (props & ITEM_ACID) + if (props & ITEM_SIZZLE) EAcid_resistance |= mask; if (props & ITEM_SCREAM) ESonic_resistance |= mask; - if (props & ITEM_DRLI) + if (props & ITEM_DECAY) EDrain_resistance |= mask; if (props & ITEM_SLEEP) ESleep_resistance |= mask; - if (props & ITEM_STONE) + if (props & ITEM_FLEX) EStone_resistance |= mask; - if (props & ITEM_SICK) + if (props & ITEM_HEALTH) ESick_resistance |= mask; if (props & ITEM_STUN) EStun_resistance |= mask; @@ -251,7 +251,7 @@ long mask; ETelepat |= mask; see_monsters(); } - if (props & ITEM_SEARCHING) + if (props & ITEM_SEARCH) ESearching |= mask; if (props & ITEM_INSIGHT) { @@ -271,7 +271,7 @@ long mask; if (props & ITEM_PROWESS) { (void) changes_stat(otmp, ITEM_PROWESS); } - if (props & ITEM_FUMBLING) { + if (props & ITEM_FUMBLE) { if (!EFumbling && !(HFumbling & ~TIMEOUT)) incr_itimeout(&HFumbling, rnd(20)); EFumbling |= mask; @@ -298,11 +298,11 @@ long mask; } if (props & ITEM_STABLE) EStable |= mask; - if (props & ITEM_WWALK) { + if (props & ITEM_SURF) { EWwalking |= mask; if (u.uinwater || is_lava(u.ux, u.uy) || is_sewage(u.ux, u.uy)) { spoteffects(TRUE); - otmp->oprops_known |= ITEM_WWALK; + otmp->oprops_known |= ITEM_SURF; } } if (props & ITEM_SWIM) { @@ -328,7 +328,7 @@ long mask; EFire_resistance &= ~mask; if (props & ITEM_FROST) ECold_resistance &= ~mask; - if (props & ITEM_DRLI) + if (props & ITEM_DECAY) EDrain_resistance &= ~mask; if (props & ITEM_SHOCK) EShock_resistance &= ~mask; @@ -336,13 +336,13 @@ long mask; ESonic_resistance &= ~mask; if (props & ITEM_VENOM) EPoison_resistance &= ~mask; - if (props & ITEM_ACID) + if (props & ITEM_SIZZLE) EAcid_resistance &= ~mask; if (props & ITEM_SLEEP) ESleep_resistance &= ~mask; - if (props & ITEM_STONE) + if (props & ITEM_FLEX) EStone_resistance &= ~mask; - if (props & ITEM_SICK) + if (props & ITEM_HEALTH) ESick_resistance &= ~mask; if (props & ITEM_STUN) EStun_resistance &= ~mask; @@ -356,7 +356,7 @@ long mask; ETelepat &= ~mask; see_monsters(); } - if (props & ITEM_SEARCHING) + if (props & ITEM_SEARCH) ESearching &= ~mask; if (props & ITEM_INSIGHT) { ESee_invisible &= ~mask; @@ -375,7 +375,7 @@ long mask; if (props & ITEM_PROWESS) { (void) changes_stat(otmp, ITEM_PROWESS); } - if (props & ITEM_FUMBLING) { + if (props & ITEM_FUMBLE) { EFumbling &= ~mask; if (!EFumbling && !(HFumbling & ~TIMEOUT)) HFumbling = EFumbling = 0; @@ -396,13 +396,13 @@ long mask; } if (props & ITEM_STABLE) EStable &= ~mask; - if (props & ITEM_WWALK) { + if (props & ITEM_SURF) { EWwalking &= ~mask; if ((is_pool(u.ux, u.uy) || is_lava(u.ux, u.uy)) && !Levitation && !Flying && !is_clinger(youmonst.data) && !context.takeoff.cancelled_don && !iflags.in_lava_effects) { - otmp->oprops_known |= ITEM_WWALK; + otmp->oprops_known |= ITEM_SURF; spoteffects(TRUE); } } diff --git a/src/makemon.c b/src/makemon.c index 8abc88264..b1e7b00fc 100644 --- a/src/makemon.c +++ b/src/makemon.c @@ -2641,7 +2641,7 @@ register struct monst *mtmp; (void) mpickobj(mtmp, otmp); } else if (ptr == &mons[PM_VECNA]) { otmp = mksobj(ROBE, FALSE, FALSE); - otmp->oprops = ITEM_DRLI; + otmp->oprops = ITEM_DECAY; otmp->oeroded2 = TRUE; curse(otmp); (void) mpickobj(mtmp, otmp); diff --git a/src/objnam.c b/src/objnam.c index 3fa20a5da..1dea79d9f 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -536,8 +536,8 @@ boolean has_of; Strcpy(of, " and"); } } - if (props & ITEM_DRLI) { - if ((props_known & ITEM_DRLI) || dump_prop_flag) { + if (props & ITEM_DECAY) { + if ((props_known & ITEM_DECAY) || dump_prop_flag) { Strcat(buf, of), Strcat(buf, weapon ? " decay" : " drain resistance"), Strcpy(of, " and"); @@ -564,8 +564,8 @@ boolean has_of; Strcpy(of, " and"); } } - if (props & ITEM_ACID) { - if ((props_known & ITEM_ACID) || dump_prop_flag) { + if (props & ITEM_SIZZLE) { + if ((props_known & ITEM_SIZZLE) || dump_prop_flag) { Strcat(buf, of), Strcat(buf, weapon ? " sizzle" : " acid resistance"), Strcpy(of, " and"); @@ -578,15 +578,13 @@ boolean has_of; Strcpy(of, " and"); } } - if (props & ITEM_STONE) { - if ((props_known & ITEM_STONE) || dump_prop_flag) { - Strcat(buf, of), - Strcat(buf, of), Strcat(buf, " stone resistance"), - Strcpy(of, " and"); + if (props & ITEM_FLEX) { + if ((props_known & ITEM_FLEX) || dump_prop_flag) { + Strcat(buf, " versus stone"), Strcpy(of, " and"); } } - if (props & ITEM_SICK) { - if ((props_known & ITEM_SICK) || dump_prop_flag) { + if (props & ITEM_HEALTH) { + if ((props_known & ITEM_HEALTH) || dump_prop_flag) { Strcat(buf, of), Strcat(buf, of), Strcat(buf, " sick resistance"), Strcpy(of, " and"); @@ -607,7 +605,7 @@ boolean has_of; } if (props & ITEM_TOUGH) { if ((props_known & ITEM_TOUGH) || dump_prop_flag) { - Strcat(buf, of), Strcat(buf, " resilience"), + Strcat(buf, of), Strcat(buf, " toughness"), Strcpy(of, " and"); } } @@ -623,8 +621,8 @@ boolean has_of; Strcpy(of, " and"); } } - if (props & ITEM_SEARCHING) { - if ((props_known & ITEM_SEARCHING) || dump_prop_flag) { + if (props & ITEM_SEARCH) { + if ((props_known & ITEM_SEARCH) || dump_prop_flag) { Strcat(buf, of), Strcat(buf, " searching"), Strcpy(of, " and"); } @@ -647,8 +645,8 @@ boolean has_of; Strcpy(of, " and"); } } - if (props & ITEM_FUMBLING) { - if ((props_known & ITEM_FUMBLING) || dump_prop_flag) { + if (props & ITEM_FUMBLE) { + if ((props_known & ITEM_FUMBLE) || dump_prop_flag) { Strcat(buf, of), Strcat(buf, " fumbling"), Strcpy(of, " and"); } @@ -695,8 +693,8 @@ boolean has_of; Strcpy(of, " and"); } } - if (props & ITEM_WWALK) { - if ((props_known & ITEM_WWALK) || dump_prop_flag) { + if (props & ITEM_SURF) { + if ((props_known & ITEM_SURF) || dump_prop_flag) { Strcat(buf, of), Strcat(buf, " surfing"), Strcpy(of, " and"); } @@ -4285,7 +4283,7 @@ struct obj *no_wish; } else if (!strncmpi((p + of), "drain", l = strlen("drain")) || !strncmpi((p + of), "decay", l = strlen("decay"))) { if (!objpropcount || wizard) - objprops |= ITEM_DRLI; + objprops |= ITEM_DECAY; objpropcount++; } else if (!strncmpi((p + of), "shock", l = strlen("shock")) || !strncmpi((p + of), "lightning", l = strlen("lightning"))) { @@ -4305,7 +4303,7 @@ struct obj *no_wish; } else if (!strncmpi((p + of), "acid", l = strlen("acid")) || !strncmpi((p + of), "sizzle", l = strlen("sizzle"))) { if (!objpropcount || wizard) - objprops |= ITEM_ACID; + objprops |= ITEM_SIZZLE; objpropcount++; } else if (!strncmpi((p + of), "sleep", l = strlen("sleep"))) { if (!objpropcount || wizard) @@ -4313,11 +4311,11 @@ struct obj *no_wish; objpropcount++; } else if (!strncmpi((p + of), "stone", l = strlen("stone"))) { if (!objpropcount || wizard) - objprops |= ITEM_STONE; + objprops |= ITEM_FLEX; objpropcount++; } else if (!strncmpi((p + of), "sick", l = strlen("sick"))) { if (!objpropcount || wizard) - objprops |= ITEM_SICK; + objprops |= ITEM_HEALTH; objpropcount++; } else if (!strncmpi((p + of), "stun", l = strlen("stun"))) { if (!objpropcount || wizard) @@ -4327,7 +4325,7 @@ struct obj *no_wish; if (!objpropcount || wizard) objprops |= ITEM_RAGE; objpropcount++; - } else if (!strncmpi((p + of), "resilience", l = strlen("resilience"))) { + } else if (!strncmpi((p + of), "toughness", l = strlen("toughness"))) { if (!objpropcount || wizard) objprops |= ITEM_TOUGH; objpropcount++; @@ -4343,7 +4341,7 @@ struct obj *no_wish; objpropcount++; } else if (!strncmpi((p + of), "searching", l = strlen("searching"))) { if (!objpropcount || wizard) - objprops |= ITEM_SEARCHING; + objprops |= ITEM_SEARCH; objpropcount++; } else if (!strncmpi((p + of), "insight", l = strlen("insight"))) { if (!objpropcount || wizard) @@ -4363,7 +4361,7 @@ struct obj *no_wish; as they don't exist, you'd wish for 'fumble boots' instead */ if (!objpropcount || wizard) - objprops |= ITEM_FUMBLING; + objprops |= ITEM_FUMBLE; objpropcount++; } else if (!strncmpi((p + of), "hunger", l = strlen("hunger"))) { if (!objpropcount || wizard) @@ -4396,7 +4394,7 @@ struct obj *no_wish; } else if (!strncmpi((p + of), "water walking", l = strlen("water walking")) || !strncmpi((p + of), "surfing", l = strlen("surfing"))) { if (!objpropcount || wizard) - objprops |= ITEM_WWALK; + objprops |= ITEM_SURF; objpropcount++; } else if (!strncmpi((p + of), "swimming", l = strlen("swimming"))) { if (!objpropcount || wizard) @@ -5384,22 +5382,22 @@ struct obj *no_wish; objprops &= ~(ITEM_RES_PROPS & ~ITEM_FROST); else if (objprops & ITEM_FIRE) objprops &= ~(ITEM_RES_PROPS & ~ITEM_FIRE); - else if (objprops & ITEM_DRLI) - objprops &= ~(ITEM_RES_PROPS & ~ITEM_DRLI); + else if (objprops & ITEM_DECAY) + objprops &= ~(ITEM_RES_PROPS & ~ITEM_DECAY); else if (objprops & ITEM_SHOCK) objprops &= ~(ITEM_RES_PROPS & ~ITEM_SHOCK); else if (objprops & ITEM_VENOM) objprops &= ~(ITEM_RES_PROPS & ~ITEM_VENOM); else if (objprops & ITEM_SCREAM) objprops &= ~(ITEM_RES_PROPS & ~ITEM_SCREAM); - else if (objprops & ITEM_ACID) - objprops &= ~(ITEM_RES_PROPS & ~ITEM_ACID); + else if (objprops & ITEM_SIZZLE) + objprops &= ~(ITEM_RES_PROPS & ~ITEM_SIZZLE); else if (objprops & ITEM_SLEEP) objprops &= ~(ITEM_RES_PROPS & ~ITEM_SLEEP); - else if (objprops & ITEM_STONE) - objprops &= ~(ITEM_RES_PROPS & ~ITEM_STONE); - else if (objprops & ITEM_SICK) - objprops &= ~(ITEM_RES_PROPS & ~ITEM_SICK); + else if (objprops & ITEM_FLEX) + objprops &= ~(ITEM_RES_PROPS & ~ITEM_FLEX); + else if (objprops & ITEM_HEALTH) + objprops &= ~(ITEM_RES_PROPS & ~ITEM_HEALTH); else if (objprops & ITEM_STUN) objprops &= ~(ITEM_RES_PROPS & ~ITEM_STUN); else if (objprops & ITEM_RAGE) @@ -5727,17 +5725,17 @@ long objprops; if (otmp->otyp == OILSKIN_CLOAK) objprops &= ~ITEM_OILSKIN; if (otmp->otyp == ROGUES_GLOVES) - objprops &= ~ITEM_SEARCHING; + objprops &= ~ITEM_SEARCH; if (otmp->otyp == ROGUES_GLOVES) - objprops &= ~ITEM_SEARCHING; + objprops &= ~ITEM_SEARCH; if (otmp->otyp == GAUNTLETS_OF_FUMBLING) - objprops &= ~ITEM_FUMBLING; + objprops &= ~ITEM_FUMBLE; if (otmp->otyp == GAUNTLETS_OF_SWIMMING) objprops &= ~ITEM_SWIM; if (otmp->otyp == FUMBLE_BOOTS) - objprops &= ~ITEM_FUMBLING; + objprops &= ~ITEM_FUMBLE; if (otmp->otyp == WATER_WALKING_BOOTS) - objprops &= ~ITEM_WWALK; + objprops &= ~ITEM_SURF; if (otmp->otyp == RESONANT_SHIELD) objprops &= ~ITEM_SCREAM; if (otmp->otyp == ELVEN_CLOAK) @@ -5745,13 +5743,13 @@ long objprops; if (otmp->otyp == ELVEN_BOOTS) objprops &= ~ITEM_STEALTH; if (otmp->otyp == ALCHEMY_SMOCK) - objprops &= ~(ITEM_ACID | ITEM_VENOM); + objprops &= ~(ITEM_SIZZLE | ITEM_VENOM); if (otmp->oclass == RING_CLASS) { /* TODO: Figure out how to loop over the props * and use obj_has_prop(obj, which) */ if (otmp->otyp == RIN_SEARCHING) - objprops &= ~ITEM_SEARCHING; + objprops &= ~ITEM_SEARCH; if (otmp->otyp == RIN_STEALTH) objprops &= ~ITEM_STEALTH; if (otmp->otyp == RIN_SUSTAIN_ABILITY) diff --git a/src/pager.c b/src/pager.c index b0b38265e..236937a78 100644 --- a/src/pager.c +++ b/src/pager.c @@ -1229,7 +1229,7 @@ char *usr_text; if (obj->oprops & ITEM_FROST) OBJPUTSTR("\t+1d5 + 3 cold damage"); if (obj->oprops & ITEM_SHOCK) OBJPUTSTR("\t+1d5 + 3 shock damage"); if (obj->oprops & ITEM_SCREAM) OBJPUTSTR("\t+1d5 + 3 sonic damage"); - if (obj->oprops & ITEM_ACID) OBJPUTSTR("\t+1d5 + 3 acid damage"); + if (obj->oprops & ITEM_SIZZLE) OBJPUTSTR("\t+1d5 + 3 acid damage"); if (obj->oprops & ITEM_VENOM) OBJPUTSTR("\tdoes 1d2 (+ 10% chance of 6-15 extra) poison damage; \n\t10% chance of instakill by poison"); /* - Sleep resistance is only defensive */ } @@ -1285,27 +1285,27 @@ char *usr_text; if (obj->oprops & ITEM_SHOCK) OBJPUTSTR("Grants shock resistance"); if (obj->oprops & ITEM_SCREAM) OBJPUTSTR("Grants sonic resistance"); if (obj->oprops & ITEM_VENOM) OBJPUTSTR("Grants poison resistance"); - if (obj->oprops & ITEM_ACID) OBJPUTSTR("Grants acid resistance"); - if (obj->oprops & ITEM_DRLI) OBJPUTSTR("Grants drain resistance"); + if (obj->oprops & ITEM_SIZZLE) OBJPUTSTR("Grants acid resistance"); + if (obj->oprops & ITEM_DECAY) OBJPUTSTR("Grants drain resistance"); if (obj->oprops & ITEM_SLEEP) OBJPUTSTR("Grants sleep resistance"); - if (obj->oprops & ITEM_STONE) OBJPUTSTR("Grants petrification resistance"); - if (obj->oprops & ITEM_SICK) OBJPUTSTR("Grants sickness resistance"); + if (obj->oprops & ITEM_FLEX) OBJPUTSTR("Grants petrification resistance"); + if (obj->oprops & ITEM_HEALTH) OBJPUTSTR("Grants sickness resistance"); if (obj->oprops & ITEM_STUN) OBJPUTSTR("Grants stun resistance"); if (obj->oprops & ITEM_RAGE) OBJPUTSTR("Grants rage and fearlessness"); if (obj->oprops & ITEM_PROWESS) OBJPUTSTR("Grants prowess in technical skills"); - if (obj->oprops & ITEM_TOUGH) OBJPUTSTR("Grants disintegration resistance"); + if (obj->oprops & ITEM_TOUGH) OBJPUTSTR("Grants disintegration resistance, indestructible item"); if (obj->oprops & ITEM_OILSKIN) OBJPUTSTR("Permanently greased"); - if (obj->oprops & ITEM_FUMBLING) OBJPUTSTR("Grants fumbling"); + if (obj->oprops & ITEM_FUMBLE) OBJPUTSTR("Grants fumbling"); } /* PROPERTY INFO */ if (dummy.oprops_known && (oc.oc_class == WEAPON_CLASS || oc.oc_class == ARMOR_CLASS)) { if (obj->oprops & ITEM_ESP) OBJPUTSTR("Grants telepathy"); - if (obj->oprops & ITEM_SEARCHING) OBJPUTSTR("Grants searching"); + if (obj->oprops & ITEM_SEARCH) OBJPUTSTR("Grants searching"); if (obj->oprops & ITEM_INSIGHT) OBJPUTSTR("Grants see invisible"); if (obj->oprops & ITEM_EXCEL) OBJPUTSTR("Grants luck/CHA adjustment"); - if (obj->oprops & ITEM_VIGIL) OBJPUTSTR("Grants warning/DEX adjustment"); + if (obj->oprops & ITEM_VIGIL) OBJPUTSTR("Grants warning/WIS adjustment"); if (obj->oprops & ITEM_HUNGER) OBJPUTSTR("Grants hunger"); if (obj->oprops & ITEM_STENCH) OBJPUTSTR("Grants aggravate monster"); if (obj->oprops & ITEM_TELE) OBJPUTSTR("Grants teleportation"); @@ -1313,7 +1313,7 @@ char *usr_text; if (obj->oprops & ITEM_SUSTAIN) OBJPUTSTR("Grants sustainability"); if (obj->oprops & ITEM_STEALTH) OBJPUTSTR("Grants stealth"); if (obj->oprops & ITEM_STABLE) OBJPUTSTR("Grants stability"); - if (obj->oprops & ITEM_WWALK) OBJPUTSTR("Grants water walking"); + if (obj->oprops & ITEM_SURF) OBJPUTSTR("Grants water walking"); if (obj->oprops & ITEM_SWIM) OBJPUTSTR("Grants swimming"); } diff --git a/src/trap.c b/src/trap.c index e5d73dfe2..4783403ec 100644 --- a/src/trap.c +++ b/src/trap.c @@ -163,7 +163,7 @@ int ef_flags; if (!otmp) return ER_NOTHING; - /* Resiliant items are immune to erosion. */ + /* Tough items are immune to erosion. */ if (otmp && otmp->oprops & ITEM_TOUGH) { otmp->oprops_known |= ITEM_TOUGH; return FALSE; @@ -4634,10 +4634,10 @@ drown() } else if (!HWwalking) { /* *Something* is keeping us afloat! */ for (otmp = invent; otmp; otmp = otmp->nobj) - if (otmp->oprops & ITEM_WWALK && is_worn(otmp) - && !(otmp->oprops_known & ITEM_WWALK)) { + if (otmp->oprops & ITEM_SURF && is_worn(otmp) + && !(otmp->oprops_known & ITEM_SURF)) { Your("%s keeps you from falling in the water!", xname(otmp)); - otmp->oprops_known |= ITEM_WWALK; + otmp->oprops_known |= ITEM_SURF; update_inventory(); } } diff --git a/src/wield.c b/src/wield.c index 2feb54acf..39c1db602 100644 --- a/src/wield.c +++ b/src/wield.c @@ -141,7 +141,7 @@ register struct obj *obj; EMagic_sense &= ~W_WEP; toggle_seeinv(olduwep, (ESee_invisible & ~W_WEP), FALSE); } - if (olduwep->oprops & ITEM_FUMBLING) { + if (olduwep->oprops & ITEM_FUMBLE) { if (!(HFumbling & ~TIMEOUT)) HFumbling = EFumbling = 0; EFumbling &= ~W_WEP; @@ -171,13 +171,13 @@ register struct obj *obj; if (olduwep->oprops & ITEM_STABLE) { EStable &= ~W_WEP; } - if (olduwep->oprops & ITEM_WWALK) { + if (olduwep->oprops & ITEM_SURF) { EWwalking &= ~W_WEP; if ((is_pool(u.ux, u.uy) || is_lava(u.ux, u.uy)) && !Levitation && !Flying && !is_clinger(youmonst.data) && !context.takeoff.cancelled_don && !iflags.in_lava_effects) { - olduwep->oprops_known |= ITEM_WWALK; + olduwep->oprops_known |= ITEM_SURF; spoteffects(TRUE); } } @@ -192,10 +192,10 @@ register struct obj *obj; if (olduwep->oprops & ITEM_SLEEP) { ESleep_resistance &= ~W_WEP; } - if (olduwep->oprops & ITEM_STONE) { + if (olduwep->oprops & ITEM_FLEX) { EStone_resistance &= ~W_WEP; } - if (olduwep->oprops & ITEM_SICK) { + if (olduwep->oprops & ITEM_HEALTH) { ESick_resistance &= ~W_WEP; } if (olduwep->oprops & ITEM_STUN) { @@ -227,7 +227,7 @@ register struct obj *obj; EMagic_sense |= W_WEP; toggle_seeinv(uwep, (ESee_invisible & ~W_WEP), TRUE); } - if (uwep->oprops & ITEM_FUMBLING) { + if (uwep->oprops & ITEM_FUMBLE) { if (!(HFumbling & ~TIMEOUT)) incr_itimeout(&HFumbling, rnd(20)); EFumbling |= W_WEP; @@ -263,11 +263,11 @@ register struct obj *obj; if (uwep->oprops & ITEM_STABLE) { EStable |= W_WEP; } - if (uwep->oprops & ITEM_WWALK) { + if (uwep->oprops & ITEM_SURF) { EWwalking |= W_WEP; if (u.uinwater || is_lava(u.ux, u.uy) || is_sewage(u.ux, u.uy)) { spoteffects(TRUE); - uwep->oprops_known |= ITEM_WWALK; + uwep->oprops_known |= ITEM_SURF; } } if (uwep->oprops & ITEM_SWIM) { @@ -282,10 +282,10 @@ register struct obj *obj; if (uwep->oprops & ITEM_SLEEP) { ESleep_resistance |= W_WEP; } - if (uwep->oprops & ITEM_STONE) { + if (uwep->oprops & ITEM_FLEX) { EStone_resistance |= W_WEP; } - if (uwep->oprops & ITEM_SICK) { + if (uwep->oprops & ITEM_HEALTH) { ESick_resistance |= W_WEP; } if (uwep->oprops & ITEM_STUN) { @@ -304,8 +304,6 @@ register struct obj *obj; } } - - /* Note: Explicitly wielding a pick-axe will not give a "bashing" * message. Wielding one via 'a'pplying it will. * 3.2.2: Wielding arbitrary objects will give bashing message too. @@ -521,7 +519,7 @@ register struct obj *obj; toggle_seeinv(olduswapwep, (ESee_invisible & ~W_SWAPWEP), FALSE); } /* Fumbling property */ - if (olduswapwep->oprops & ITEM_FUMBLING) { + if (olduswapwep->oprops & ITEM_FUMBLE) { if (!(HFumbling & ~TIMEOUT)) HFumbling = EFumbling = 0; EFumbling &= ~W_SWAPWEP; @@ -559,13 +557,13 @@ register struct obj *obj; HStable &= ~W_SWAPWEP; } /* Water walking */ - if (olduswapwep->oprops & ITEM_WWALK) { + if (olduswapwep->oprops & ITEM_SURF) { HWwalking &= ~W_SWAPWEP; if ((is_pool(u.ux, u.uy) || is_lava(u.ux, u.uy)) && !Levitation && !Flying && !is_clinger(youmonst.data) && !context.takeoff.cancelled_don && !iflags.in_lava_effects) { - olduswapwep->oprops_known |= ITEM_WWALK; + olduswapwep->oprops_known |= ITEM_SURF; spoteffects(TRUE); } } @@ -583,11 +581,11 @@ register struct obj *obj; ESleep_resistance &= ~W_SWAPWEP; } /* Stone resistance */ - if (olduswapwep->oprops & ITEM_STONE) { + if (olduswapwep->oprops & ITEM_FLEX) { EStone_resistance &= ~W_SWAPWEP; } /* Sickness resistance */ - if (olduswapwep->oprops & ITEM_SICK) { + if (olduswapwep->oprops & ITEM_HEALTH) { ESick_resistance &= ~W_SWAPWEP; } /* Stun resistance */ @@ -622,7 +620,7 @@ register struct obj *obj; EMagic_sense |= W_SWAPWEP; toggle_seeinv(uswapwep, (ESee_invisible & ~W_SWAPWEP), TRUE); } - if (uswapwep->oprops & ITEM_FUMBLING) { + if (uswapwep->oprops & ITEM_FUMBLE) { if (!(HFumbling & ~TIMEOUT)) incr_itimeout(&HFumbling, rnd(20)); EFumbling |= W_SWAPWEP; @@ -658,11 +656,11 @@ register struct obj *obj; if (uswapwep->oprops & ITEM_STABLE) { HStable |= W_SWAPWEP; } - if (uswapwep->oprops & ITEM_WWALK) { + if (uswapwep->oprops & ITEM_SURF) { HWwalking |= W_SWAPWEP; if (u.uinwater || is_lava(u.ux, u.uy) || is_sewage(u.ux, u.uy)) { spoteffects(TRUE); - uswapwep->oprops_known |= ITEM_WWALK; + uswapwep->oprops_known |= ITEM_SURF; } } if (uswapwep->oprops & ITEM_SWIM) { @@ -677,10 +675,10 @@ register struct obj *obj; if (uswapwep->oprops & ITEM_SLEEP) { ESleep_resistance |= W_SWAPWEP; } - if (uswapwep->oprops & ITEM_STONE) { + if (uswapwep->oprops & ITEM_FLEX) { EStone_resistance |= W_SWAPWEP; } - if (uswapwep->oprops & ITEM_SICK) { + if (uswapwep->oprops & ITEM_HEALTH) { ESick_resistance |= W_SWAPWEP; } if (uswapwep->oprops & ITEM_STUN) { @@ -698,10 +696,6 @@ register struct obj *obj; EDisint_resistance |= W_SWAPWEP; } } - - - - } /*** Commands to change particular slot(s) ***/ diff --git a/src/worn.c b/src/worn.c index 2c7e113a7..ff7ceadcc 100644 --- a/src/worn.c +++ b/src/worn.c @@ -353,18 +353,18 @@ struct obj *obj; /* item to make known if effect can be seen */ const struct PropTypes prop_lookup[NUM_PROPERTIES] = { { FIRE_RES, ITEM_FIRE }, { COLD_RES, ITEM_FROST }, - { DRAIN_RES, ITEM_DRLI }, + { DRAIN_RES, ITEM_DECAY }, { SHOCK_RES, ITEM_SHOCK }, { SONIC_RES, ITEM_SCREAM }, { POISON_RES, ITEM_VENOM }, - { ACID_RES, ITEM_ACID }, + { ACID_RES, ITEM_SIZZLE }, { SLEEP_RES, ITEM_SLEEP }, - { STONE_RES, ITEM_STONE }, - { SICK_RES, ITEM_SICK }, + { STONE_RES, ITEM_FLEX }, + { SICK_RES, ITEM_HEALTH }, { STUN_RES, ITEM_STUN }, { FEARLESS, ITEM_RAGE }, { TELEPAT, ITEM_ESP }, - { FUMBLING, ITEM_FUMBLING }, + { FUMBLING, ITEM_FUMBLE }, { HUNGER, ITEM_HUNGER }, { AGGRAVATE_MONSTER, ITEM_STENCH }, { TELEPORT, ITEM_TELE }, @@ -373,7 +373,7 @@ const struct PropTypes prop_lookup[NUM_PROPERTIES] = { { FIXED_ABIL, ITEM_SUSTAIN }, { STEALTH, ITEM_STEALTH }, { STABLE, ITEM_STABLE }, - { WWALKING, ITEM_WWALK }, + { WWALKING, ITEM_SURF }, { SWIMMING, ITEM_SWIM } }; @@ -618,7 +618,7 @@ boolean on, silently; if (obj->oclass != WEAPON_CLASS && !is_weptool(obj)) which = COLD_RES; break; - case ITEM_DRLI: + case ITEM_DECAY: if (obj->oclass != WEAPON_CLASS && !is_weptool(obj)) which = DRAIN_RES; break; @@ -634,7 +634,7 @@ boolean on, silently; if (obj->oclass != WEAPON_CLASS && !is_weptool(obj)) which = POISON_RES; break; - case ITEM_ACID: + case ITEM_SIZZLE: if (obj->oclass != WEAPON_CLASS && !is_weptool(obj)) which = ACID_RES; break; @@ -642,7 +642,7 @@ boolean on, silently; if (obj->oclass != WEAPON_CLASS && !is_weptool(obj)) which = SLEEP_RES; break; - case ITEM_STONE: + case ITEM_FLEX: if (obj->oclass != WEAPON_CLASS && !is_weptool(obj)) which = STONE_RES; break; @@ -660,7 +660,7 @@ boolean on, silently; case ITEM_EXCEL: which = ADORNED; break; - case ITEM_FUMBLING: + case ITEM_FUMBLE: which = FUMBLING; break; case ITEM_HUNGER: @@ -684,7 +684,7 @@ boolean on, silently; case ITEM_STABLE: which = STABLE; break; - case ITEM_WWALK: + case ITEM_SURF: which = WWALKING; break; case ITEM_SWIM: diff --git a/src/zap.c b/src/zap.c index dec185f0e..f32a5c676 100644 --- a/src/zap.c +++ b/src/zap.c @@ -1579,8 +1579,8 @@ struct obj *obj; if (context.bypasses && obj->bypass) return FALSE; - /* Sustainable or resilient items will not shudder. */ - if (obj->oprops & ITEM_SUSTAIN) + /* Sustainable or tough items will not shudder. */ + if (obj->oprops & ITEM_SUSTAIN && obj->oprops & ITEM_TOUGH) return FALSE; if (obj->oclass == WAND_CLASS)