Skip to content

Commit

Permalink
Remove redundant "pets don't attack each other" check
Browse files Browse the repository at this point in the history
There were two copies of this check; take the one that looks like
vanilla, but I moved it up slightly to be outside the "Grudge patch"
comment.
  • Loading branch information
copperwater committed Mar 23, 2024
1 parent 4ef292b commit 4113e8f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/mon.c
Original file line number Diff line number Diff line change
Expand Up @@ -2396,18 +2396,15 @@ mm_aggression(
struct permonst *ma, *md;
ma = magr->data;
md = mdef->data;
/* Don't allow pets to fight each other. */

/* don't allow pets to fight each other */
if (magr->mtame && mdef->mtame)
return 0;

/* Grudge patch. */
/* Put one-way aggressions below here, and two-way aggressions in
* mm_2way_aggression. */

/* don't allow pets to fight each other */
if (magr->mtame && mdef->mtame)
return 0;

/* supposedly purple worms are attracted to shrieking because they
like to eat shriekers, so attack the latter when feasible */
if ((ma == &mons[PM_PURPLE_WORM] || ma == &mons[PM_BABY_PURPLE_WORM])
Expand Down

0 comments on commit 4113e8f

Please sign in to comment.