summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells3.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-03 23:02:32 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-03 23:02:32 +0000
commit49815faa5cfe1cce614f4d2bbab9341613a662c5 (patch)
tree9bf29a86509e1cbbf39674875d832d080fb0bdda /crawl-ref/source/spells3.cc
parent72aae92fdbbe1afa692ebe0bf9dc32e59ae9e368 (diff)
downloadcrawl-ref-49815faa5cfe1cce614f4d2bbab9341613a662c5.tar.gz
crawl-ref-49815faa5cfe1cce614f4d2bbab9341613a662c5.zip
[2070013]: newly created, animated, etc. friendly monsters now default to
'follow me' behaviour, rather than following your last command (even if was before they were summoned.) Their behaviour can still be changed by giving them commands, of course. The previous behaviour was clearly intentional so I'm not too sure about this change; feel free to revert if I'm missing something. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8886 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells3.cc')
-rw-r--r--crawl-ref/source/spells3.cc25
1 files changed, 9 insertions, 16 deletions
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc
index da8b438a4d..a80762d568 100644
--- a/crawl-ref/source/spells3.cc
+++ b/crawl-ref/source/spells3.cc
@@ -404,10 +404,8 @@ bool cast_call_imp(int pow, god_type god)
const int monster =
create_monster(
- mgen_data(mon, BEH_FRIENDLY,
- dur, SPELL_CALL_IMP,
- you.pos(), you.pet_target,
- MG_FORCE_BEH, god));
+ mgen_data(mon, BEH_FRIENDLY, dur, SPELL_CALL_IMP,
+ you.pos(), MHITYOU, MG_FORCE_BEH, god));
if (monster != -1)
{
@@ -436,10 +434,7 @@ static bool _summon_demon_wrapper(int pow, god_type god, int spell,
mgen_data(mon,
friendly ? BEH_FRIENDLY :
charmed ? BEH_CHARMED : BEH_HOSTILE,
- dur, spell,
- you.pos(),
- friendly ? you.pet_target : MHITYOU,
- MG_FORCE_BEH, god));
+ dur, spell, you.pos(), MHITYOU, MG_FORCE_BEH, god));
if (monster != -1)
{
@@ -550,7 +545,7 @@ bool cast_shadow_creatures(god_type god)
create_monster(
mgen_data(RANDOM_MONSTER, BEH_FRIENDLY,
2, SPELL_SHADOW_CREATURES,
- you.pos(), you.pet_target,
+ you.pos(), MHITYOU,
MG_FORCE_BEH, god), false);
if (monster == -1)
@@ -595,7 +590,7 @@ bool cast_summon_horrible_things(int pow, god_type god)
if (create_monster(
mgen_data(MONS_TENTACLED_MONSTROSITY, BEH_FRIENDLY,
6, SPELL_SUMMON_HORRIBLE_THINGS,
- you.pos(), you.pet_target,
+ you.pos(), MHITYOU,
0, god)) != -1)
{
count++;
@@ -609,7 +604,7 @@ bool cast_summon_horrible_things(int pow, god_type god)
if (create_monster(
mgen_data(MONS_ABOMINATION_LARGE, BEH_FRIENDLY,
6, SPELL_SUMMON_HORRIBLE_THINGS,
- you.pos(), you.pet_target,
+ you.pos(), MHITYOU,
0, god)) != -1)
{
count++;
@@ -1003,7 +998,7 @@ bool cast_simulacrum(int pow, god_type god)
if (create_monster(
mgen_data(MONS_SIMULACRUM_SMALL, BEH_FRIENDLY,
6, SPELL_SIMULACRUM,
- you.pos(), you.pet_target,
+ you.pos(), MHITYOU,
0, god, mon)) != -1)
{
count++;
@@ -1088,7 +1083,7 @@ bool cast_twisted_resurrection(int pow, god_type god)
create_monster(
mgen_data(mon, BEH_FRIENDLY,
0, SPELL_TWISTED_RESURRECTION,
- you.pos(), you.pet_target,
+ you.pos(), MHITYOU,
MG_FORCE_BEH, god,
MONS_PROGRAM_BUG, 0, colour));
@@ -1140,9 +1135,7 @@ bool cast_summon_wraiths(int pow, god_type god)
mgen_data(mon,
friendly ? BEH_FRIENDLY : BEH_HOSTILE,
5, SPELL_SUMMON_WRAITHS,
- you.pos(),
- friendly ? you.pet_target : MHITYOU,
- MG_FORCE_BEH, god));
+ you.pos(), MHITYOU, MG_FORCE_BEH, god));
if (monster != -1)
{