diff --git a/js/bullet.js b/js/bullet.js index 7e121c8..d3ba176 100644 --- a/js/bullet.js +++ b/js/bullet.js @@ -675,7 +675,7 @@ const b = { frictionAir: FRICTION, restitution: 1, dmg: 0.28, //damage done in addition to the damage from momentum - lookFrequency: 100 + Math.floor(23 * Math.random()), + lookFrequency: 80 + Math.floor(23 * Math.random()), endCycle: game.cycle + Math.floor((1100 + 420 * Math.random()) * mod.isBulletsLastLonger), classType: "bullet", collisionFilter: { @@ -686,6 +686,7 @@ const b = { lockedOn: null, isFollowMouse: true, deathCycles: 110 + RADIUS * 5, + isImproved: false, onDmg(who) { //move away from target after hitting const unit = Vector.mult(Vector.normalise(Vector.sub(this.position, who.position)), -20) @@ -727,8 +728,7 @@ const b = { } } } - if (!this.lockedOn && !mod.isArmorFromPowerUps) { - //grab a power up if it is (ammo) or (a heal when player is low) + if (!this.lockedOn && !mod.isArmorFromPowerUps && !this.isImproved) { //grab a power up let closeDist = Infinity; for (let i = 0, len = powerUp.length; i < len; ++i) { if ( @@ -739,11 +739,19 @@ const b = { const TARGET_VECTOR = Vector.sub(this.position, powerUp[i].position) const DIST = Vector.magnitude(TARGET_VECTOR); if (DIST < closeDist) { - if (DIST < 60) { //eat the power up if close enough + if (DIST < 100) { //eat the power up if close enough powerUps.onPickUp(); powerUp[i].effect(); Matter.World.remove(engine.world, powerUp[i]); powerUp.splice(i, 1); + if (mod.isDroneGrab) { + this.isImproved = true; + const SCALE = 2 + Matter.Body.scale(this, SCALE, SCALE); + this.lookFrequency = 30; + this.endCycle = game.cycle + Math.floor((1100 + 420 * Math.random()) * mod.isBulletsLastLonger) * 2 //set to double a normal lifespan + // this.dmg *= 1.5; + } break; } closeDist = DIST; diff --git a/js/mods.js b/js/mods.js index 4ad0a02..f80e840 100644 --- a/js/mods.js +++ b/js/mods.js @@ -863,7 +863,7 @@ const mod = { maxCount: 1, count: 0, allowed() { - return !mod.isEnergyHealth + return !mod.isEnergyHealth && !mod.isDroneGrab }, requires: "not mass-energy equivalence", effect() { @@ -1802,6 +1802,22 @@ const mod = { mod.isFastDrones = false } }, + { + name: "harvester", + description: "when drones pick up power ups
improve drone size, lifespan, and vision rate", + maxCount: 1, + count: 0, + allowed() { + return !mod.isArmorFromPowerUps && (mod.haveGunCheck("drones") || (mech.fieldUpgrades[mech.fieldMode].name === "nano-scale manufacturing" && !(mod.isSporeField || mod.isMissileField || mod.isIceField))) + }, + requires: "drones", + effect() { + mod.isDroneGrab = true + }, + remove() { + mod.isDroneGrab = false + } + }, { name: "superfluidity", description: "freeze effects apply to mobs near it's target", @@ -2454,6 +2470,7 @@ const mod = { isMineDrop: null, isRerollBots: null, isRailTimeSlow: null, - isBotUpgrade: null + isBotUpgrade: null, + isDroneGrab: null // isMaxHealthRemove: null } \ No newline at end of file diff --git a/todo.txt b/todo.txt index 97e3ca5..94dba5d 100644 --- a/todo.txt +++ b/todo.txt @@ -1,8 +1,6 @@ -heal power ups scale in size to indicate mod effects, and level based heal scaling -testingChamber changes - ************** TODO - n-gon ************** + new gun - deploy a turret that last for 20 seconds fire nails at nearby targets once a second. use mine code and bot code