Blame 8Kingdoms-1.1.0-divide-by-zero.patch

59f77c8
diff -up ./res/xml/scripts/unit_recruit_elite.xml~ ./res/xml/scripts/unit_recruit_elite.xml
59f77c8
--- ./res/xml/scripts/unit_recruit_elite.xml~	2008-01-04 20:07:15.000000000 +0100
59f77c8
+++ ./res/xml/scripts/unit_recruit_elite.xml	2008-01-04 20:07:15.000000000 +0100
59f77c8
@@ -60,7 +60,7 @@
59f77c8
         # pomocna promenna pro uchovani poctu zbyvajicich zivotu
59f77c8
         set missing_lives [expr $max_lives - $unit(lives)];
59f77c8
     
59f77c8
-        if {$unit_types($unit(type), cure_cost) > 0} {
59f77c8
+        if {($unit_types($unit(type), cure_cost) > 0) && ($unit(level) > 0)} {
59f77c8
             # pomocna promenna pro uchovani maximalniho poctu zivotu, na ktere
59f77c8
             # ma hrac penize 
59f77c8
             set money [expr floor($player(money) / ($unit(level) * $unit_types($unit(type), cure_cost)))];