|
From: <dsh...@us...> - 2007-04-03 17:56:19
|
Revision: 1203
http://svn.sourceforge.net/crawl-ref/?rev=1203&view=rev
Author: dshaligram
Date: 2007-04-03 10:56:15 -0700 (Tue, 03 Apr 2007)
Log Message:
-----------
Fixed cantrips used by friendly monsters.
Modified Paths:
--------------
trunk/crawl-ref/source/mstuff2.cc
Modified: trunk/crawl-ref/source/mstuff2.cc
===================================================================
--- trunk/crawl-ref/source/mstuff2.cc 2007-04-03 16:46:27 UTC (rev 1202)
+++ trunk/crawl-ref/source/mstuff2.cc 2007-04-03 17:56:15 UTC (rev 1203)
@@ -595,6 +595,9 @@
break;
case MS_CANTRIP:
+ {
+ const bool friendly = mons_friendly(monster);
+ bool need_friendly_stub = false;
// Monster spell of uselessness, just prints a message.
// This spell exists so that some monsters with really strong
// spells (ie orc priest) can be toned down a bit. -- bwr
@@ -607,10 +610,16 @@
MSGCH_MONSTER_ENCHANT );
break;
case 1:
- mpr( "You feel troubled." );
+ if (friendly)
+ need_friendly_stub = true;
+ else
+ mpr( "You feel troubled." );
break;
case 2:
- mpr( "You feel a wave of unholy energy pass over you." );
+ if (friendly)
+ need_friendly_stub = true;
+ else
+ mpr( "You feel a wave of unholy energy pass over you." );
break;
case 3:
simple_monster_message( monster, " looks stronger.",
@@ -626,14 +635,22 @@
break;
case 6:
default:
- if (one_chance_in(20))
+ if (friendly)
+ need_friendly_stub = true;
+ else if (one_chance_in(20))
mpr( "You resist (whatever that was supposed to do)." );
else
mpr( "You resist." );
break;
}
+
+ if (need_friendly_stub)
+ simple_monster_message(monster, " shimmers for a moment.",
+ MSGCH_MONSTER_ENCHANT);
+
return;
}
+ }
fire_beam( pbolt );
} // end mons_cast()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|