diff options
author | Adam Borowski <kilobyte@angband.pl> | 2010-09-19 01:23:09 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2010-09-19 01:23:09 +0200 |
commit | 6ed97a1bdf4b1371e872369ba35f78f16713692a (patch) | |
tree | 44c6997578d31c56b75560117bf597a22f908209 /crawl-ref/source/attitude-change.cc | |
parent | 54a8d98ba0deb3b196c758677e890768e82ed014 (diff) | |
download | crawl-ref-6ed97a1bdf4b1371e872369ba35f78f16713692a.tar.gz crawl-ref-6ed97a1bdf4b1371e872369ba35f78f16713692a.zip |
Ring of charms: disallow transforms, try another formula for success.
The former would allow charming spiders while in spider form, liches
while necromutated, and so on.
The latter in turn made the ring useless for any monster with
non-negligible HD. Even an xl 27 merfolk had minimal changes with
base 9 HD merfolk. This formula is perhaps way too generous, but
it includes a hard cap. Improvements welcome.
Diffstat (limited to 'crawl-ref/source/attitude-change.cc')
-rw-r--r-- | crawl-ref/source/attitude-change.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/crawl-ref/source/attitude-change.cc b/crawl-ref/source/attitude-change.cc index 09669466ae..256b04736a 100644 --- a/crawl-ref/source/attitude-change.cc +++ b/crawl-ref/source/attitude-change.cc @@ -162,7 +162,8 @@ void passive_enslavement_convert(monster* mons) { if (you.are_charming() && mons->alive() - && is_player_same_species(mons->type, true) + && is_player_same_species(mons->type, false) + && !transform_changed_physiology(false) && mons->foe == MHITYOU && !mons->is_summoned() && !mons->is_shapeshifter() @@ -177,8 +178,9 @@ void passive_enslavement_convert(monster* mons) const int hd = mons->hit_dice; - if (random2(4 + you.experience_level / 3) - > random2(hd) + hd + random2(5)) + if (random2(random2(you.experience_level)) + > random2(hd) + hd + random2(5) + && hd * hd < you.experience_level * 7) { passive_enslavement_convert_monster(mons); stop_running(); |