power up selection code rewrite

rewrite of the tech,gun,field selection code
  odds of new bugs is pretty high, but the code is shorter and faster, so easier to fix
path integral is no longer a JUNK tech
  lets you choose from every option on next tech
emergence is stackable
  +2 power up choices per stack

tech: integrated circuit - if ON +7 power up choices  if OFF -1

update matter.js engine 0.17.1 -> 0.18.0
  shouldn't change anything
big fixes
This commit is contained in:
landgreen
2022-06-22 07:21:26 -07:00
parent 698c18482b
commit 784c933260
8 changed files with 984 additions and 385 deletions

View File

@@ -3367,7 +3367,7 @@ const m = {
const drain = m.fieldRegen + 0.0004
if (m.energy > drain) {
m.energy -= drain
if (m.immuneCycle < m.cycle + 1) m.immuneCycle = m.cycle + 1; //player is immune to damage for 1/4 seconds // and can't regen
if (m.immuneCycle < m.cycle + 1) m.immuneCycle = m.cycle + 1; //player is immune to damage for 1 cycle
m.isBodiesAsleep = true;
function sleep(who) {
@@ -3469,7 +3469,7 @@ const m = {
x: velocity.x,
y: velocity.y - 4 //an extra vertical kick so the player hangs in place longer
});
if (m.immuneCycle < m.cycle + 15) m.immuneCycle = m.cycle + 15; //player is immune to damage for 1/4 seconds
if (m.immuneCycle < m.cycle + 5) m.immuneCycle = m.cycle + 5; //player is immune to damage for 1/4 seconds
// move bots to player
for (let i = 0; i < bullet.length; i++) {
if (bullet[i].botType) {