diff options
author | Stefan O'Rear <stefanor@cox.net> | 2009-11-12 03:52:08 -0800 |
---|---|---|
committer | Stefan O'Rear <stefanor@cox.net> | 2009-11-12 03:53:13 -0800 |
commit | 078019644214628520c8116a9b4a16f30d8fadf2 (patch) | |
tree | df1fc93d35c6b39455445360e482be5c26e1e2ac /crawl-ref/source/religion.cc | |
parent | 7f502e207784d2c33ab38079dadfa298ab9fafc6 (diff) | |
download | crawl-ref-078019644214628520c8116a9b4a16f30d8fadf2.tar.gz crawl-ref-078019644214628520c8116a9b4a16f30d8fadf2.zip |
Add summoner and non_actor_summoner to mgen_data
Monsters now know who summoned them. This will be important later.
Probably breaks something; saves are not one of them.
Diffstat (limited to 'crawl-ref/source/religion.cc')
-rw-r--r-- | crawl-ref/source/religion.cc | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 2e7dc5eede..76a4c5af79 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -1121,7 +1121,11 @@ int yred_random_servants(int threshold, bool force_hostile) how_many = 2 + random2(4); mgen_data mg(mon_type, !force_hostile ? BEH_FRIENDLY : BEH_HOSTILE, - 0, 0, you.pos(), MHITYOU, 0, GOD_YREDELEMNUL); + !force_hostile ? &you : 0, 0, 0, you.pos(), MHITYOU, 0, + GOD_YREDELEMNUL); + + if (force_hostile) + mg.non_actor_summoner = "the anger of Yredelemnul"; int created = 0; if (force_hostile) @@ -1730,7 +1734,7 @@ static void _beogh_blessing_reinforcements() follower_type = RANDOM_ELEMENT(followers); _delayed_monster( - mgen_data(follower_type, BEH_FRIENDLY, 0, 0, + mgen_data(follower_type, BEH_FRIENDLY, &you, 0, 0, you.pos(), MHITYOU, 0, GOD_BEOGH), _beogh_reinf_callback); } @@ -2137,9 +2141,11 @@ static void _do_god_gift(bool prayed_for) int count_created = 0; for (; jelly_count > 0; --jelly_count) { - mgen_data mg(MONS_JELLY, BEH_STRICT_NEUTRAL, 0, 0, + mgen_data mg(MONS_JELLY, BEH_STRICT_NEUTRAL, 0, 0, 0, you.pos(), MHITNOT, 0, GOD_JIYVA); + mg.non_actor_summoner = "Jiyva"; + if (create_monster(mg) != -1) count_created++; @@ -5046,8 +5052,8 @@ void god_pitch(god_type which_god) if (!_has_jelly()) { monster_type mon = MONS_JELLY; - mgen_data mg(mon, BEH_STRICT_NEUTRAL, 0, 0, you.pos(), MHITNOT, 0, - GOD_JIYVA); + mgen_data mg(mon, BEH_STRICT_NEUTRAL, &you, 0, 0, you.pos(), + MHITNOT, 0, GOD_JIYVA); _delayed_monster(mg); simple_god_message(" grants you a jelly!"); |