Skip to content

Commit

Permalink
Give leprechauns a one-way grudge against gold golems and gold dragons
Browse files Browse the repository at this point in the history
  • Loading branch information
Nephi Allred authored and copperwater committed Mar 23, 2024
1 parent 4a0ea58 commit 4ef292b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions doc/xnh-changelog-9.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ changes:
spellbook (via the dust making you sneeze) causes enough noise to wake nearby
monsters.
- Monsters stepping on a squeaky board near you can wake you up.
- Leprechauns have a one-sided grudge against gold golems and gold dragons.

### Interface changes

Expand Down
6 changes: 6 additions & 0 deletions src/mon.c
Original file line number Diff line number Diff line change
Expand Up @@ -2439,6 +2439,12 @@ mm_aggression(
if (ma == &mons[PM_GUARD] && md == &mons[PM_LEPRECHAUN])
return ALLOW_M|ALLOW_TM;

/* leprechans vs gold golems and (baby) gold dragons */
if (ma == &mons[PM_LEPRECHAUN]
&& (md == &mons[PM_GOLD_GOLEM] || md == &mons[PM_GOLD_DRAGON]
|| md == &mons[PM_BABY_GOLD_DRAGON]))
return ALLOW_M|ALLOW_TM;

/* now test all two-way aggressions both ways */
return (mm_2way_aggression(magr, mdef) | mm_2way_aggression(mdef, magr));
}
Expand Down

0 comments on commit 4ef292b

Please sign in to comment.