diff options
author | Stefan O'Rear <stefanor@cox.net> | 2009-11-06 18:08:44 -0800 |
---|---|---|
committer | Stefan O'Rear <stefanor@cox.net> | 2009-11-06 18:09:30 -0800 |
commit | 3a5f25a4a71abdf5d2ca747252fe926de65fa1f4 (patch) | |
tree | 583029e8582c38cbe83fbcdd296376151f61cd8b | |
parent | 0d1d7bc9535c3565c1c00cb616ed81d1b89f2189 (diff) | |
download | crawl-ref-3a5f25a4a71abdf5d2ca747252fe926de65fa1f4.tar.gz crawl-ref-3a5f25a4a71abdf5d2ca747252fe926de65fa1f4.zip |
Remove the relation between royal jelly spawns and attack sizes
It was too scummable, especially with Sticky Flames.
-rw-r--r-- | crawl-ref/source/monster.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc index 034a76ad46..e077ca32da 100644 --- a/crawl-ref/source/monster.cc +++ b/crawl-ref/source/monster.cc @@ -5626,13 +5626,17 @@ void monsters::react_to_damage(int damage, beam_type flavour, kill_category whos return; // The royal jelly objects to taking damage and will SULK. :-) - if (type == MONS_ROYAL_JELLY && flavour != BEAM_TORMENT_DAMAGE - && damage > 8 && x_chance_in_y(damage, 50)) + if (type == MONS_ROYAL_JELLY) { + int lobes = hit_points / 12; + int oldlobes = (hit_points + damage) / 12; + + if (lobes == oldlobes) + return; + mon_acting mact(this); - const int tospawn = - 1 + random2avg(1 + std::min((damage - 8) / 8, 5), 2); + const int tospawn = oldlobes - lobes; #ifdef DEBUG_DIAGNOSTICS mprf(MSGCH_DIAGNOSTICS, "Trying to spawn %d jellies.", tospawn); #endif |