summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/art-func.h
diff options
context:
space:
mode:
authorChris Campbell <chriscampbell89@gmail.com>2011-12-05 20:14:51 +0000
committerChris Campbell <chriscampbell89@gmail.com>2011-12-05 20:17:20 +0000
commitd5ebb7f6f54999811b9dbca58d0598f103b4e208 (patch)
tree9d8921f802af5448e200ed36b49787a45801506b /crawl-ref/source/art-func.h
parentc7535c24eebd89f9e5f3658d3aa653e2a09ea0d7 (diff)
downloadcrawl-ref-d5ebb7f6f54999811b9dbca58d0598f103b4e208.tar.gz
crawl-ref-d5ebb7f6f54999811b9dbca58d0598f103b4e208.zip
Make sceptre of Asmodeus success depend on evocations skill
Diffstat (limited to 'crawl-ref/source/art-func.h')
-rw-r--r--crawl-ref/source/art-func.h61
1 files changed, 29 insertions, 32 deletions
diff --git a/crawl-ref/source/art-func.h b/crawl-ref/source/art-func.h
index 2184568165..0fbbddd398 100644
--- a/crawl-ref/source/art-func.h
+++ b/crawl-ref/source/art-func.h
@@ -70,42 +70,39 @@ static void _ASMODEUS_melee_effect(item_def* weapon, actor* attacker,
static bool _evoke_sceptre_of_asmodeus()
{
- bool rc = false;
- if (one_chance_in(3))
+ if (!x_chance_in_y(you.skill(SK_EVOCATIONS, 100), 3000))
+ return (false);
+
+ const monster_type mon = random_choose_weighted(
+ 3, MONS_EFREET,
+ 3, MONS_SUN_DEMON,
+ 2, MONS_BALRUG,
+ 2, MONS_HELLION,
+ 1, MONS_PIT_FIEND,
+ 1, MONS_BRIMSTONE_FIEND,
+ 0);
+
+ mgen_data mg(mon, BEH_CHARMED, &you,
+ 0, 0, you.pos(), MHITYOU,
+ MG_FORCE_BEH, you.religion);
+
+ const int mons = create_monster(mg);
+
+ if (mons != -1)
{
- const monster_type mon = random_choose_weighted(
- 3, MONS_EFREET,
- 3, MONS_SUN_DEMON,
- 2, MONS_BALRUG,
- 2, MONS_HELLION,
- 1, MONS_PIT_FIEND,
- 1, MONS_BRIMSTONE_FIEND,
- 0);
-
- mgen_data mg(mon, BEH_CHARMED, &you,
- 0, 0, you.pos(), MHITYOU,
- MG_FORCE_BEH, you.religion);
-
- const int mons = create_monster(mg);
-
- if (mons != -1)
- {
- rc = true;
- mpr("The Sceptre summons one of its servants.");
- did_god_conduct(DID_UNHOLY, 3);
+ mpr("The Sceptre summons one of its servants.");
+ did_god_conduct(DID_UNHOLY, 3);
- monster* m = &menv[mons];
- m->add_ench(mon_enchant(ENCH_FAKE_ABJURATION, 6));
+ monster* m = &menv[mons];
+ m->add_ench(mon_enchant(ENCH_FAKE_ABJURATION, 6));
- if (!player_angers_monster(m))
- {
- mpr("You don't feel so good about this...");
- }
- }
- else
- mpr("The air shimmers briefly.");
+ if (!player_angers_monster(m))
+ mpr("You don't feel so good about this...");
}
- return (rc);
+ else
+ mpr("The air shimmers briefly.");
+
+ return (true);
}