From 006c19100924678f8aff88880fd1317bba7454a2 Mon Sep 17 00:00:00 2001 From: lilgreenland Date: Thu, 31 Oct 2019 07:08:58 -0700 Subject: [PATCH] spore mod balance --- js/bullets.js | 4 ++-- js/index.js | 1 + js/mobs.js | 6 +++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/js/bullets.js b/js/bullets.js index 3ea8a87..fecdb8d 100644 --- a/js/bullets.js +++ b/js/bullets.js @@ -105,10 +105,10 @@ const b = { }, { name: "Zoospore Vector", - description: "when an enemy dies it has a 50% chance to release a spore", + description: "when an enemy dies it has a 20% chance to release spores", have: false, effect: () => { - b.modSpores = 0.5; //good late game maybe? + b.modSpores = 0.2; //good late game maybe? } }, // () => { diff --git a/js/index.js b/js/index.js index c5e0044..a50d567 100644 --- a/js/index.js +++ b/js/index.js @@ -3,6 +3,7 @@ ***************************************************** make power ups keep moving to player if the field is turned off + not sure how to do this without adding a constant check levels spawn by having the map aspects randomly fly into place diff --git a/js/mobs.js b/js/mobs.js index 3774531..30cfd8a 100644 --- a/js/mobs.js +++ b/js/mobs.js @@ -917,7 +917,11 @@ const mobs = { this.alive = false; if (this.dropPowerUp) { powerUps.spawnRandomPowerUp(this.position.x, this.position.y, this.mass, radius); - if (Math.random() < b.modSpores) b.spore(this) //spawn drone + if (Math.random() < b.modSpores) { + for (let i = 0, len = Math.floor(3 + this.mass * Math.random()); i < len; i++) { + b.spore(this) //spawn drone + } + } } },