diff game/js/tower.js @ 15:c1c7e4f54bf6

balance work prep
author ark
date 2026-10-19 23:36 +0200
parents 8df95050fc8b
children
line wrap: on
line diff
--- a/game/js/tower.js	Mon Oct 19 22:50:52 2026 +0200
+++ b/game/js/tower.js	Mon Oct 19 23:36:08 2026 +0200
@@ -26,10 +26,9 @@
         };
     }
 
-    // cost of the next level, null at the top level. level n costs the
-    // base cost x n.
+    // cost of the next level, null at the top level
     function upgradeCost(t) {
-        return t.level < t.def.damage.length ? t.def.cost * (t.level + 1) : null;
+        return t.level < t.def.cost.length ? t.def.cost[t.level] : null;
     }
 
     // coins back for selling the tower: half of everything paid for it,