From 351738249bdb557e2042f80bc1be24323190e649 Mon Sep 17 00:00:00 2001 From: Freeyorp Date: Mon, 12 Apr 2010 16:54:35 +1200 Subject: More range checking --- npc/028-1/Doctor4.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'npc') diff --git a/npc/028-1/Doctor4.txt b/npc/028-1/Doctor4.txt index 4b63e128..9402dff8 100644 --- a/npc/028-1/Doctor4.txt +++ b/npc/028-1/Doctor4.txt @@ -208,6 +208,7 @@ L_lens_loop_post_water_choice: L_lens_loop_automodify: set @rounds, @rounds + 1; + if (@crystalEnergy < 0) set @crystalEnergy, 0; set @inc, rand(rand(@MAX_LENS_CRYSTAL_ENERGY_INCREASE / (1+(@crystalEnergy >> 2))) + 1); if (!(@pcmod & 1)) set @crystalEnergy, @crystalEnergy + @MAX_LENS_CRYSTAL_ENERGY_INCREASE * @inc / (2 + @inc); set @crystalEnergy, @crystalEnergy - rand(rand(@MAX_LENS_CRYSTAL_ENERGY_INCREASE) + 1); -- cgit v1.2.3-60-g2f50