summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-16 15:57:55 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-16 15:57:55 +0000
commite5163195309880b00470c7f2ac11f24ff429d148 (patch)
tree65e915d0d096497b4382be8a74ed74a5f20c20d0 /crawl-ref/source
parentd114e117125b2cf4e6968978f51edfd379951657 (diff)
downloadcrawl-ref-e5163195309880b00470c7f2ac11f24ff429d148.tar.gz
crawl-ref-e5163195309880b00470c7f2ac11f24ff429d148.zip
Apply trunk r10233 to 0.5.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.5@10234 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/beam.cc4
-rw-r--r--crawl-ref/source/religion.cc9
-rw-r--r--crawl-ref/source/religion.h2
3 files changed, 9 insertions, 6 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index 365d48dd24..2dbf45d8fc 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -4812,14 +4812,14 @@ mon_resist_type bolt::apply_enchantment_to_monster(monsters* mon)
// The monster can be no more than lightly wounded/damaged,
// using the formula from monstuff.cc:mons_get_damage_level().
- if (mon->hit_points <= (mon->max_hit_points * 3) / 4)
+ if (mon->hit_points <= mon->max_hit_points * 3 / 4)
{
simple_monster_message(mon, "'s soul is too badly injured.");
return (MON_OTHER);
}
obvious_effect = true;
- const int duration = (you.skills[SK_INVOCATIONS] * 3) / 4 + 1;
+ const int duration = you.skills[SK_INVOCATIONS] * 3 / 4 + 1;
mon->add_ench(mon_enchant(ENCH_SOUL_RIPE, 0, KC_YOU, duration * 10));
simple_monster_message(mon, "'s soul is now ripe for the taking.");
return (MON_AFFECTED);
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index aa317e09bc..1592afa6f5 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -5756,9 +5756,9 @@ static bool _tso_holy_revenge()
}
void yred_make_enslaved_soul(monsters *mon, bool force_hostile,
- bool quiet, bool unlimited)
+ bool quiet, bool unrestricted)
{
- if (!unlimited)
+ if (!unrestricted)
_yred_souls_disappear();
const int type = mon->type;
@@ -5766,7 +5766,10 @@ void yred_make_enslaved_soul(monsters *mon, bool force_hostile,
const std::string whose =
you.can_see(mon) ? apostrophise(mon->name(DESC_CAP_THE))
: mon->pronoun(PRONOUN_CAP_POSSESSIVE);
- const bool twisted = coinflip();
+ const bool twisted =
+ !unrestricted ? x_chance_in_y(you.skills[SK_INVOCATIONS] * 20 / 9 + 20,
+ 100)
+ : false;
int corps = -1;
// If the monster's held in a net, get it out.
diff --git a/crawl-ref/source/religion.h b/crawl-ref/source/religion.h
index b9d8c297ca..80b26db688 100644
--- a/crawl-ref/source/religion.h
+++ b/crawl-ref/source/religion.h
@@ -106,7 +106,7 @@ bool beogh_water_walk();
void good_god_holy_attitude_change(monsters *holy);
void good_god_holy_fail_attitude_change(monsters *holy);
void yred_make_enslaved_soul(monsters *mon, bool force_hostile = false,
- bool quiet = false, bool unlimited = false);
+ bool quiet = false, bool unrestricted = false);
void beogh_convert_orc(monsters *orc, bool emergency,
bool converted_by_follower = false);
bool is_holy_item(const item_def& item);