diff options
author | Shayne Halvorson <N78291@gmail.com> | 2014-05-10 17:12:49 -0500 |
---|---|---|
committer | reaverb <reaverb.Crawl@gmail.com> | 2014-05-28 01:14:21 -0400 |
commit | f6e66672eb6195dab3d88cca6cb1366b2671b900 (patch) | |
tree | ac3cd42dca0ae21af9f455013e02db1613d9dcb2 /crawl-ref/source/mon-clone.cc | |
parent | 1ee73f30e7cf1ee6bcfe891003b226738c81bde5 (diff) | |
download | crawl-ref-f6e66672eb6195dab3d88cca6cb1366b2671b900.tar.gz crawl-ref-f6e66672eb6195dab3d88cca6cb1366b2671b900.zip |
New card: the Illusion
Summons an illusion of the player (like Mara's ability).
Diffstat (limited to 'crawl-ref/source/mon-clone.cc')
-rw-r--r-- | crawl-ref/source/mon-clone.cc | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/crawl-ref/source/mon-clone.cc b/crawl-ref/source/mon-clone.cc index 0f069d111a..3b0ef796f7 100644 --- a/crawl-ref/source/mon-clone.cc +++ b/crawl-ref/source/mon-clone.cc @@ -191,15 +191,26 @@ static void _mons_load_player_enchantments(monster* creator, monster* target) } void mons_summon_illusion_from(monster* mons, actor *foe, - spell_type spell_cast) + spell_type spell_cast, int card_power) { if (foe->is_player()) { + int abj = 6; + + if (card_power >= 0) + { + // card effect + abj = 2 + random2(card_power); + } + if (monster *clone = create_monster( mgen_data(MONS_PLAYER_ILLUSION, SAME_ATTITUDE(mons), mons, - 6, spell_cast, mons->pos(), mons->foe, 0))) + abj, spell_cast, mons->pos(), mons->foe, 0))) { - mprf(MSGCH_WARN, "There is a horrible, sudden wrenching feeling in your soul!"); + if (card_power >= 0) + mpr("Suddenly you stand beside yourself."); + else + mprf(MSGCH_WARN, "There is a horrible, sudden wrenching feeling in your soul!"); // Change type from player ghost. clone->type = MONS_PLAYER_ILLUSION; @@ -207,6 +218,8 @@ void mons_summon_illusion_from(monster* mons, actor *foe, get_monster_data(MONS_PLAYER_ILLUSION)); _mons_load_player_enchantments(mons, clone); } + else if (card_power >= 0) + mpr("You see a puff of smoke."); } else { |