Skip to content

Commit

Permalink
Weapons cannot have the acid or sonic property.
Browse files Browse the repository at this point in the history
Balance tweak.
  • Loading branch information
elunna committed Aug 3, 2023
1 parent b9b7613 commit fa53bf5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
1 change: 1 addition & 0 deletions hackem_changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

Version 1.2.1 (unreleased)

Weapons cannot have the acid or sonic property.
Revert the sonic protection a toque grants back to just deafness.
Upgraded items rarely carry over properties if the result is a magical item.
Two alignment keys can be forged together to create The Key of Access.
Expand Down
2 changes: 1 addition & 1 deletion include/obj.h
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ 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 /* poison damage or resistance */
#define ITEM_ACID 0x00000010L /* acid damage or resistance */
#define ITEM_SCREAM 0x00000020L /* sonic damage or resistance */
#define ITEM_DRLI 0x00000040L /* drains life or resists it */
#define ITEM_OILSKIN 0x00000080L /* permanently greased */
Expand Down
2 changes: 1 addition & 1 deletion src/artifact.c
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ boolean allow_detrimental;

/* check for restrictions */
if ((otmp->oclass == WEAPON_CLASS || is_weptool(otmp))
&& (j & (ITEM_DRLI | ITEM_FUMBLING | ITEM_HUNGER)))
&& (j & (ITEM_DRLI | ITEM_SCREAM | ITEM_ACID | ITEM_FUMBLING | ITEM_HUNGER )))
continue;

if (is_launcher(otmp)
Expand Down
11 changes: 5 additions & 6 deletions src/objnam.c
Original file line number Diff line number Diff line change
Expand Up @@ -5459,8 +5459,7 @@ struct obj *no_wish;
otmp->oerodeproof = (Luck >= 0 || wizard);
}

if (otmp->oclass == WEAPON_CLASS || is_weptool(otmp)
|| otmp->oclass == ARMOR_CLASS) {
if (otmp->oclass == WEAPON_CLASS || is_weptool(otmp) || otmp->oclass == ARMOR_CLASS) {
/* check for restrictions */
if (objprops & ITEM_FROST)
objprops &= ~(ITEM_FIRE | ITEM_DRLI | ITEM_SHOCK | ITEM_SCREAM | ITEM_VENOM | ITEM_ACID);
Expand All @@ -5487,14 +5486,14 @@ struct obj *no_wish;
| ITEM_WARNING | ITEM_FUMBLING | ITEM_HUNGER | ITEM_EXCEL);

if (otmp->oclass == WEAPON_CLASS || is_weptool(otmp))
objprops &= ~(ITEM_DRLI | ITEM_FUMBLING | ITEM_HUNGER);
objprops &= ~(ITEM_DRLI | ITEM_ACID | ITEM_SCREAM | ITEM_FUMBLING | ITEM_HUNGER);

if (is_launcher(otmp))
objprops &= ~(ITEM_FIRE | ITEM_FROST | ITEM_DRLI | ITEM_SCREAM
| ITEM_SHOCK | ITEM_VENOM | ITEM_ACID | ITEM_OILSKIN);
objprops &= ~(ITEM_FIRE | ITEM_FROST | ITEM_DRLI | ITEM_SHOCK | ITEM_VENOM | ITEM_ACID | ITEM_SCREAM
| ITEM_OILSKIN);

if (is_ammo(otmp) || is_missile(otmp))
objprops &= ~(ITEM_DRLI | ITEM_OILSKIN | ITEM_ESP | ITEM_SEARCHING
objprops &= ~(ITEM_DRLI | ITEM_ACID | ITEM_SCREAM | ITEM_OILSKIN | ITEM_ESP | ITEM_SEARCHING
| ITEM_WARNING | ITEM_FUMBLING | ITEM_HUNGER | ITEM_EXCEL);

if (otmp->material != CLOTH)
Expand Down

0 comments on commit fa53bf5

Please sign in to comment.