Skip to content
This repository has been archived by the owner on Nov 19, 2019. It is now read-only.

Commit

Permalink
Angered quest guardians will no longer go berserk
Browse files Browse the repository at this point in the history
  • Loading branch information
matkoniecz committed Feb 23, 2013
1 parent 08bedab commit 1fda60c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/mon.c
Original file line number Diff line number Diff line change
Expand Up @@ -1224,11 +1224,13 @@ struct monst *magr, /* monster that is currently deciding where to move */
return ALLOW_M|ALLOW_TM;

/* Since the quest guardians are under siege, it makes sense to have
them fight hostiles. (But we don't want the quest leader to be in danger.) */
if(ma->msound==MS_GUARDIAN && mdef->mpeaceful==FALSE)
them fight hostiles. (But we don't want the quest leader to be in danger.)
additional checks are to keep angry quest guardians from attacking other angry quest guardians/leader
(attacking your own quest leader will anger his or her guardians, quest gurdian agered by you should not be attacked by other quest guardians) */
if(ma->msound==MS_GUARDIAN && mdef->mpeaceful==FALSE && md->msound!=MS_GUARDIAN && md->msound!=MS_LEADER)
return ALLOW_M|ALLOW_TM;
/* and vice versa */
if(md->msound==MS_GUARDIAN && magr->mpeaceful==FALSE)
if(md->msound==MS_GUARDIAN && magr->mpeaceful==FALSE && ma->msound!=MS_GUARDIAN)
return ALLOW_M|ALLOW_TM;

/* elves vs. orcs */
Expand Down

0 comments on commit 1fda60c

Please sign in to comment.