From 3a5f25a4a71abdf5d2ca747252fe926de65fa1f4 Mon Sep 17 00:00:00 2001 From: Stefan O'Rear Date: Fri, 6 Nov 2009 18:08:44 -0800 Subject: Remove the relation between royal jelly spawns and attack sizes It was too scummable, especially with Sticky Flames. --- crawl-ref/source/monster.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source/monster.cc') 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 -- cgit v1.2.3-54-g00ecf