summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells2.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-08-04 13:15:07 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-08-04 13:15:07 +0000
commit40e2d7d94c4dff6c8e9a0b31139d86adcbb91e7c (patch)
treead874947291db76da968d20c26cdc6507dccf13b /crawl-ref/source/spells2.cc
parent80c38b0682f61fc2901af257cc115676bacc9bde (diff)
downloadcrawl-ref-40e2d7d94c4dff6c8e9a0b31139d86adcbb91e7c.tar.gz
crawl-ref-40e2d7d94c4dff6c8e9a0b31139d86adcbb91e7c.zip
Part two of godly changes.
Trog's abilities Might and Haste have been replaced with Regeneration (Trog's Hand) and summoning (Brothers in Arms). Right now, berserking summonings don't behave as intended as they'd rather follow the player than attack a monster closer to them. Also, they should disappear when Berserk runs out. God gifts of Trog and Okawaru are now tweaked towards damage (Trog) or accuracy (Oki). In general, gifts no longer need praying to appear. Right now, this means that they're more likely (I think), so the gift timeout numbers will probably have to be changed. I've also done the much-needed update of tutorial.cc, so that it now gives correct information about praying, saccing and escape hatches. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1962 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells2.cc')
-rw-r--r--crawl-ref/source/spells2.cc58
1 files changed, 58 insertions, 0 deletions
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc
index fb93985dc0..a0a21181f3 100644
--- a/crawl-ref/source/spells2.cc
+++ b/crawl-ref/source/spells2.cc
@@ -1415,6 +1415,64 @@ void summon_ice_beast_etc(int pow, int ibc, bool divine_gift)
create_monster( ibc, numsc, beha, you.x_pos, you.y_pos, MHITYOU, 250 );
} // end summon_ice_beast_etc()
+// Trog sends some fighting buddies for his followers
+void summon_berserker()
+{
+ beh_type beha = BEH_GOD_GIFT;
+ int pow = you.piety + random2(you.piety/4) - random2(you.piety/4);
+ int numsc = std::min(2 + (random2(pow) / 4), 6);
+
+ int mon = MONS_TROLL;
+
+ if (pow <= 100)
+ { // bears
+ if (coinflip())
+ mon = MONS_BLACK_BEAR;
+ else
+ mon = MONS_GRIZZLY_BEAR;
+ }
+ else if (pow <= 140)
+ {
+ // ogres
+ if (one_chance_in(3))
+ mon = MONS_TWO_HEADED_OGRE;
+ else
+ mon = MONS_OGRE;
+ }
+ else if (pow <= 180)
+ {
+ // trolls
+ switch(random2(8))
+ {
+ case 0:
+ mon = MONS_DEEP_TROLL;
+ break;
+ case 1:
+ case 2:
+ mon = MONS_IRON_TROLL;
+ break;
+ case 3:
+ case 4:
+ mon = MONS_ROCK_TROLL;
+ break;
+ default:
+ mon = MONS_TROLL;
+ break;
+ }
+ }
+ else
+ {
+ // giants
+ if (coinflip())
+ mon = MONS_HILL_GIANT;
+ else
+ mon = MONS_STONE_GIANT;
+ }
+
+ int mons = create_monster( mon, numsc, beha, you.x_pos, you.y_pos, MHITYOU, 250 );
+ menv[mons].go_berserk(false);
+} // end summon_ice_beast_etc()
+
bool summon_swarm( int pow, bool unfriendly, bool god_gift )
{
int thing_called = MONS_PROGRAM_BUG; // error trapping {dlb}