diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-11-29 16:07:18 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-11-29 16:07:18 +0000 |
commit | 52d10fd2208ea3aa0c8bc34948da77162c495d01 (patch) | |
tree | 9d696347dce0ac5a364d8b1969274843287ffbf7 /crawl-ref/source/decks.cc | |
parent | 924617910c24b48037fcd39793701d8e38485be6 (diff) | |
download | crawl-ref-52d10fd2208ea3aa0c8bc34948da77162c495d01.tar.gz crawl-ref-52d10fd2208ea3aa0c8bc34948da77162c495d01.zip |
Trowel now generates a friendly temporary golem if it creates a dangerous
statue.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2935 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/decks.cc')
-rw-r--r-- | crawl-ref/source/decks.cc | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/crawl-ref/source/decks.cc b/crawl-ref/source/decks.cc index 1cacc4423f..931736f73d 100644 --- a/crawl-ref/source/decks.cc +++ b/crawl-ref/source/decks.cc @@ -1985,22 +1985,41 @@ static void trowel_card(int power, deck_rarity_type rarity) { if (coinflip()) { - // Create a random bad statue - // This could be really bad, because it's placed adjacent + // Create a random bad statue and a friendly, timed golem. + // This could be really bad, because they're placed adjacent // to you... + int num_made = 0; + const monster_type statues[] = { MONS_ORANGE_STATUE, MONS_SILVER_STATUE, MONS_ICE_STATUE }; - const monster_type mons = RANDOM_ELEMENT(statues); - if ( create_monster(mons, 0, BEH_HOSTILE, you.x_pos, you.y_pos, - MHITYOU, 250) != -1 ) + + if ( create_monster(RANDOM_ELEMENT(statues), 0, BEH_HOSTILE, + you.x_pos, you.y_pos, MHITYOU, 250) != -1 ) { mpr("A menacing statue appears!"); - done_stuff = true; + num_made++; } + + const monster_type golems[] = { + MONS_CLAY_GOLEM, MONS_WOOD_GOLEM, MONS_STONE_GOLEM, + MONS_IRON_GOLEM, MONS_CRYSTAL_GOLEM, MONS_TOENAIL_GOLEM + }; + + if ( create_monster(RANDOM_ELEMENT(golems), 5, BEH_FRIENDLY, + you.x_pos, you.y_pos, MHITYOU, 250) != -1 ) + { + mpr("You construct a golem!"); + num_made++; + } + + if ( num_made == 2 ) + mpr("The constructs glare at each other."); + done_stuff = (num_made > 0); } else { + // Do-nothing (effectively): create a cosmetic feature coord_def pos = pick_adjacent_free_square(you.x_pos, you.y_pos); if ( pos.x >= 0 && pos.y >= 0 ) { |