Skip to content

Commit

Permalink
Changed the stability property to the burden property. This makes its…
Browse files Browse the repository at this point in the history
… a bit more negative, since the burdened item will weigh 4x as much.
  • Loading branch information
elunna committed Oct 13, 2023
1 parent ecf76ef commit 875b2d9
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 17 deletions.
4 changes: 2 additions & 2 deletions include/obj.h
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ struct obj {
#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_BURDEN 0x01000000L /* clobber resistance */
#define ITEM_SURF 0x02000000L /* water walking */
#define ITEM_SWIM 0x04000000L /* swimming */
#define ITEM_RAGE 0x08000000L /* fearlessness, bloodthirsty
Expand All @@ -635,7 +635,7 @@ struct obj {
/* Positive properties */
#define ITEM_GOOD_PROPS (ITEM_OILSKIN | ITEM_ESP | ITEM_SEARCH \
| ITEM_VIGIL | ITEM_EXCEL | ITEM_SUSTAIN \
| ITEM_STEALTH | ITEM_INSIGHT | ITEM_STABLE \
| ITEM_STEALTH | ITEM_INSIGHT | ITEM_BURDEN \
| ITEM_SURF | ITEM_SWIM | ITEM_RAGE | ITEM_TOUGH)
/* Negative properties */
#define ITEM_BAD_PROPS (ITEM_FUMBLE | ITEM_HUNGER | ITEM_STENCH \
Expand Down
4 changes: 2 additions & 2 deletions src/do_wear.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ long mask;
} else
toggle_stealth(otmp, (EStealth & ~mask), TRUE);
}
if (props & ITEM_STABLE)
if (props & ITEM_BURDEN)
EStable |= mask;
if (props & ITEM_SURF) {
EWwalking |= mask;
Expand Down Expand Up @@ -394,7 +394,7 @@ long mask;
EStealth &= ~mask;
toggle_stealth(otmp, (EStealth & ~mask), FALSE);
}
if (props & ITEM_STABLE)
if (props & ITEM_BURDEN)
EStable &= ~mask;
if (props & ITEM_SURF) {
EWwalking &= ~mask;
Expand Down
5 changes: 5 additions & 0 deletions src/mkobj.c
Original file line number Diff line number Diff line change
Expand Up @@ -1831,6 +1831,11 @@ register struct obj *obj;
} else if (obj->otyp == CANDELABRUM_OF_INVOCATION && obj->spe) {
return wt + obj->spe * (int) objects[TALLOW_CANDLE].oc_weight;
}

/* Items with burden property */
if (obj->oprops & ITEM_BURDEN)
wt *= 4;

return (wt ? wt * (int) obj->quan : ((int) obj->quan + 1) >> 1);
}

Expand Down
10 changes: 5 additions & 5 deletions src/objnam.c
Original file line number Diff line number Diff line change
Expand Up @@ -687,9 +687,9 @@ boolean has_of;
Strcpy(of, " and");
}
}
if (props & ITEM_STABLE) {
if ((props_known & ITEM_STABLE) || dump_prop_flag) {
Strcat(buf, of), Strcat(buf, " stability"),
if (props & ITEM_BURDEN) {
if ((props_known & ITEM_BURDEN) || dump_prop_flag) {
Strcat(buf, of), Strcat(buf, " burden"),
Strcpy(of, " and");
}
}
Expand Down Expand Up @@ -4387,9 +4387,9 @@ struct obj *no_wish;
if (!objpropcount || wizard)
objprops |= ITEM_STEALTH;
objpropcount++;
} else if (!strncmpi((p + of), "stability", l = strlen("stability"))) {
} else if (!strncmpi((p + of), "burden", l = strlen("burden"))) {
if (!objpropcount || wizard)
objprops |= ITEM_STABLE;
objprops |= ITEM_BURDEN;
objpropcount++;
} else if (!strncmpi((p + of), "water walking", l = strlen("water walking"))
|| !strncmpi((p + of), "surfing", l = strlen("surfing"))) {
Expand Down
2 changes: 1 addition & 1 deletion src/pager.c
Original file line number Diff line number Diff line change
Expand Up @@ -1312,7 +1312,7 @@ char *usr_text;
if (obj->oprops & ITEM_SLOW) OBJPUTSTR("Grants lethargy");
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_BURDEN) OBJPUTSTR("Grants stability, weights 4x more");
if (obj->oprops & ITEM_SURF) OBJPUTSTR("Grants water walking");
if (obj->oprops & ITEM_SWIM) OBJPUTSTR("Grants swimming");
}
Expand Down
10 changes: 5 additions & 5 deletions src/wield.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ register struct obj *obj;
EStealth &= ~W_WEP;
toggle_stealth(olduwep, (EStealth & ~W_WEP), FALSE);
}
if (olduwep->oprops & ITEM_STABLE) {
if (olduwep->oprops & ITEM_BURDEN) {
EStable &= ~W_WEP;
}
if (olduwep->oprops & ITEM_SURF) {
Expand Down Expand Up @@ -260,7 +260,7 @@ register struct obj *obj;
} else
toggle_stealth(uwep, (EStealth & ~W_WEP), TRUE);
}
if (uwep->oprops & ITEM_STABLE) {
if (uwep->oprops & ITEM_BURDEN) {
EStable |= W_WEP;
}
if (uwep->oprops & ITEM_SURF) {
Expand Down Expand Up @@ -552,8 +552,8 @@ register struct obj *obj;
EStealth &= ~W_SWAPWEP;
toggle_stealth(olduswapwep, (EStealth & ~W_SWAPWEP), TRUE);
}
/* Stability property */
if (olduswapwep->oprops & ITEM_STABLE) {
/* Burden/stability property */
if (olduswapwep->oprops & ITEM_BURDEN) {
HStable &= ~W_SWAPWEP;
}
/* Water walking */
Expand Down Expand Up @@ -653,7 +653,7 @@ register struct obj *obj;
} else
toggle_stealth(uswapwep, (EStealth & ~W_SWAPWEP), TRUE);
}
if (uswapwep->oprops & ITEM_STABLE) {
if (uswapwep->oprops & ITEM_BURDEN) {
HStable |= W_SWAPWEP;
}
if (uswapwep->oprops & ITEM_SURF) {
Expand Down
4 changes: 2 additions & 2 deletions src/worn.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ const struct PropTypes prop_lookup[NUM_PROPERTIES] = {
{ ADORNED, ITEM_EXCEL },
{ FIXED_ABIL, ITEM_SUSTAIN },
{ STEALTH, ITEM_STEALTH },
{ STABLE, ITEM_STABLE },
{ STABLE, ITEM_BURDEN },
{ WWALKING, ITEM_SURF },
{ SWIMMING, ITEM_SWIM }
};
Expand Down Expand Up @@ -681,7 +681,7 @@ boolean on, silently;
case ITEM_STEALTH:
which = STEALTH;
break;
case ITEM_STABLE:
case ITEM_BURDEN:
which = STABLE;
break;
case ITEM_SURF:
Expand Down

0 comments on commit 875b2d9

Please sign in to comment.