diff options
author | David Lawrence Ramsey <dolorous@users.sourceforge.net> | 2009-11-10 13:23:24 -0600 |
---|---|---|
committer | David Lawrence Ramsey <dolorous@users.sourceforge.net> | 2009-11-10 13:23:24 -0600 |
commit | 626505ac84f09909b7bc74ba2a74a2f93ad091ff (patch) | |
tree | 436df3bad08b79ab609b951c9737cbb6246594bc /crawl-ref | |
parent | 777fefa8f1af43ad3836e442b2f478e2e68ed621 (diff) | |
download | crawl-ref-626505ac84f09909b7bc74ba2a74a2f93ad091ff.tar.gz crawl-ref-626505ac84f09909b7bc74ba2a74a2f93ad091ff.zip |
Improve Yred's choosing of hostile skeleton types.
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/godwrath.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/crawl-ref/source/godwrath.cc b/crawl-ref/source/godwrath.cc index 5a9ec116c0..371dfc2b45 100644 --- a/crawl-ref/source/godwrath.cc +++ b/crawl-ref/source/godwrath.cc @@ -47,10 +47,14 @@ static bool _tso_holy_revenge(); static bool _yred_random_zombified_hostile() { - monster_type z_type = MONS_PROGRAM_BUG; - monster_type z_base = pick_random_zombie(); + const bool skel = one_chance_in(4); - const bool skel = mons_skeleton(z_base) && one_chance_in(4); + monster_type z_base; + monster_type z_type; + + do + z_base = pick_random_zombie(); + while (skel && !mons_skeleton(z_base)); if (mons_zombie_size(z_base) == Z_BIG) z_type = skel ? MONS_SKELETON_LARGE : MONS_ZOMBIE_LARGE; |