diff options
author | Jesse Luehrs <doy@tozt.net> | 2014-08-16 19:38:03 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2014-08-16 19:38:03 -0400 |
commit | 0f3837eba8c8ccdc3414111f6f6312c6ffce6a15 (patch) | |
tree | 9a02c59d45dbf139aeb06a41c5871ae8a71393dc | |
parent | 2625ad16af54042859690e2629dd1a1c46ec9d56 (diff) | |
download | crawl-ref-0f3837eba8c8ccdc3414111f6f6312c6ffce6a15.tar.gz crawl-ref-0f3837eba8c8ccdc3414111f6f6312c6ffce6a15.zip |
makhleb's summons should also go hostile on excommunication (6124)
-rw-r--r-- | crawl-ref/source/dactions.cc | 9 | ||||
-rw-r--r-- | crawl-ref/source/enum.h | 1 | ||||
-rw-r--r-- | crawl-ref/source/religion.cc | 1 |
3 files changed, 9 insertions, 2 deletions
diff --git a/crawl-ref/source/dactions.cc b/crawl-ref/source/dactions.cc index 14419a4b80..5ebf25b50f 100644 --- a/crawl-ref/source/dactions.cc +++ b/crawl-ref/source/dactions.cc @@ -69,6 +69,7 @@ static const char *daction_names[] = "bribe timeout", "remove Gozag shops", "apply Gozag bribes", + "Makhleb's servants go hostile", }; #endif @@ -102,6 +103,8 @@ bool mons_matches_daction(const monster* mon, daction_type act) // Not a stored counter: case DACT_ALLY_TROG: return mon->friendly() && mons_is_god_gift(mon, GOD_TROG); + case DACT_ALLY_MAKHLEB: + return mon->friendly() && mons_is_god_gift(mon, GOD_MAKHLEB); case DACT_HOLY_PETS_GO_NEUTRAL: return mon->friendly() && !mon->has_ench(ENCH_CHARM) @@ -193,6 +196,7 @@ void apply_daction_to_mons(monster* mon, daction_type act, bool local, case DACT_ALLY_SLIME: case DACT_ALLY_PLANT: case DACT_ALLY_TROG: + case DACT_ALLY_MAKHLEB: dprf("going hostile: %s", mon->name(DESC_PLAIN, true).c_str()); mon->attitude = ATT_HOSTILE; mon->del_ench(ENCH_CHARM, true); @@ -206,8 +210,8 @@ void apply_daction_to_mons(monster* mon, daction_type act, bool local, if (act == DACT_ALLY_PLANT || act == DACT_ALLY_SLIME) mon->flags &= ~MF_ATT_CHANGE_ATTEMPT; - // No global message for Trog. - if (act == DACT_ALLY_TROG && local) + // No global message for Trog or Makhleb. + if ((act == DACT_ALLY_TROG || act == DACT_ALLY_MAKHLEB) && local) simple_monster_message(mon, " turns against you!"); break; @@ -276,6 +280,7 @@ static void _apply_daction(daction_type act) case DACT_ALLY_SLIME: case DACT_ALLY_PLANT: case DACT_ALLY_TROG: + case DACT_ALLY_MAKHLEB: case DACT_OLD_ENSLAVED_SOULS_POOF: case DACT_SLIME_NEW_ATTEMPT: case DACT_HOLY_PETS_GO_NEUTRAL: diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h index 930719aa8c..ae040919f4 100644 --- a/crawl-ref/source/enum.h +++ b/crawl-ref/source/enum.h @@ -4439,6 +4439,7 @@ enum daction_type DACT_BRIBE_TIMEOUT, DACT_REMOVE_GOZAG_SHOPS, DACT_SET_BRIBES, + DACT_ALLY_MAKHLEB, NUM_DACTIONS, // If you want to add a new daction, you need to // add a corresponding entry to *daction_names[] diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 39cfa849fc..a99f1a6f83 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -2791,6 +2791,7 @@ void excommunication(god_type new_god, bool immediate) case GOD_MAKHLEB: _set_penance(old_god, 25); + add_daction(DACT_ALLY_MAKHLEB); break; case GOD_TROG: |