super duper

tech: super duper - fire +0-2 extra super balls
  super balls no longer part of MIRV

bug fix for plasma extruder interaction with doors that collide with power ups
mantisBoss moves slower, can be damaged for longer time, has less total life, has a smaller punch range
This commit is contained in:
landgreen
2021-12-26 05:53:59 -08:00
parent fca1d2371a
commit 44ecb2437a
6 changed files with 85 additions and 62 deletions

View File

@@ -1789,8 +1789,8 @@ const b = {
collisionFilter: {
// category: 0,
// mask: 0, //cat.mob | cat.mobBullet | cat.mobShield
category: cat.bullet,
mask: cat.map, //cat.mob | cat.mobBullet | cat.mobShield
category: 0, //cat.bullet,
mask: 0, //cat.map, //cat.mob | cat.mobBullet | cat.mobShield
},
beforeDmg() {},
onEnd() {},
@@ -4879,7 +4879,7 @@ const b = {
const SPEED = input.down ? 43 : 36
m.fireCDcycle = m.cycle + Math.floor((input.down ? 23 : 15) * b.fireCDscale); // cool down
const SPREAD = input.down ? 0.08 : 0.13
const num = tech.missileCount + 2
const num = 3 + Math.floor(tech.extraSuperBalls * Math.random())
const radius = 11 * tech.bulletSize
let dir = m.angle - SPREAD * (num - 1) / 2;
for (let i = 0; i < num; i++) {
@@ -4912,7 +4912,7 @@ const b = {
const dir = m.angle
const x = m.pos.x
const y = m.pos.y
const num = tech.missileCount + 2
const num = 3 + Math.floor(tech.extraSuperBalls * Math.random())
const delay = Math.floor((input.down ? 18 : 12) * b.fireCDscale)
m.fireCDcycle = m.cycle + delay; // cool down

View File

@@ -18,10 +18,10 @@ const level = {
// localSettings.levelsClearedLastGame = 10
// level.difficultyIncrease(30) //30 is near max on hard //60 is near max on why
// simulation.isHorizontalFlipped = true
// m.setField("pilot wave")
// m.setField("plasma torch")
// b.giveGuns("harpoon")
tech.giveTech("relay switch")
tech.giveTech("thermocouple")
// tech.giveTech("extruder")
// tech.giveTech("thermocouple")
// for (let i = 0; i < 2; i++) powerUps.directSpawn(0, 0, "tech");
// for (let i = 0; i < 9; i++) tech.giveTech("annelids")
// tech.giveTech("tinsellated flagella")
@@ -30,7 +30,7 @@ const level = {
// for (let i = 0; i < 1; i++) tech.giveTech("reticulum")
// for (let i = 0; i < 2; i++) tech.giveTech("laser-bot")
// tech.tech[297].frequency = 100
// level.crouch();
// level.deflect();
if (simulation.isTraining) { level.walk(); } else { level.intro(); }
// level.testing(); //not in rotation, used for testing
@@ -671,6 +671,9 @@ const level = {
//exit room glow
ctx.fillStyle = "rgba(0,255,255,0.05)"
ctx.fillRect(1600, -400, 400, 400)
//center falling bullets
ctx.fillStyle = "rgba(255,0,255,0.013)" //pink?
ctx.fillRect(650, -2800, 600, 2800)
};
spawn.mapRect(-2750, -2800, 2600, 4600); //left wall
@@ -3491,9 +3494,9 @@ const level = {
// spawn.launcherBoss(3200, -500)
// spawn.blockBoss(1700, -500)
// spawn.blinkBoss(3200, -500)
// spawn.mantisBoss(1700, -500)
spawn.mantisBoss(1700, -500)
// spawn.tetherBoss(1700, -500) //go to actual level?
spawn.revolutionBoss(1900, -500)
// spawn.revolutionBoss(1900, -500)
// spawn.bomberBoss(1400, -500)
// spawn.cellBossCulture(1600, -500)
// spawn.shieldingBoss(1700, -500)

View File

@@ -1911,14 +1911,14 @@ const spawn = {
mobs.spawn(x, y, 5, radius, "#6ba");
let me = mob[mob.length - 1];
me.babyList = [] //list of mobs that are apart of this boss
Matter.Body.setDensity(me, 0.002); //extra dense //normal is 0.001 //makes effective life much larger and damage on collision
me.damageReduction = 0.1 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1) //normal is 1, most bosses have 0.25
Matter.Body.setDensity(me, 0.001); //extra dense //normal is 0.001 //makes effective life much larger and damage on collision
me.damageReduction = 0.15 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1) //normal is 1, most bosses have 0.25
me.isBoss = true;
me.friction = 0;
me.frictionAir = 0.0067;
me.g = 0.0002; //required if using this.gravity
me.seePlayerFreq = 300;
const springStiffness = 0.0004; //simulation.difficulty
const springStiffness = 0.0001; //simulation.difficulty
const springDampening = 0.005;
me.springTarget = {
@@ -2006,7 +2006,7 @@ const spawn = {
this.cons2.length = 100 + 1.5 * this.radius;
this.isInvulnerable = false
this.invulnerabilityCountDown = 40 + Math.max(0, 70 - simulation.difficulty * 2)
this.invulnerabilityCountDown = 45 + Math.max(0, 70 - simulation.difficulty)
this.damageReduction = this.startingDamageReduction
for (let i = 0; i < this.babyList.length; i++) {
if (this.babyList[i].alive) this.babyList[i].damageReduction = this.startingDamageReduction
@@ -2020,7 +2020,7 @@ const spawn = {
this.cons2.length = -200;
this.isInvulnerable = false
this.invulnerabilityCountDown = 40 + Math.max(0, 70 - simulation.difficulty * 2)
this.invulnerabilityCountDown = 45 + Math.max(0, 70 - simulation.difficulty)
this.damageReduction = this.startingDamageReduction
for (let i = 0; i < this.babyList.length; i++) {
if (this.babyList[i].alive) this.babyList[i].damageReduction = this.startingDamageReduction
@@ -2100,6 +2100,7 @@ const spawn = {
powerUps.spawnBossPowerUp(this.position.x, this.position.y)
for (let i = 0; i < this.babyList.length; i++) {
if (this.babyList[i].alive) {
this.babyList[i].collisionFilter.mask = cat.map | cat.bullet | cat.player
this.babyList[i].isInvulnerable = false
this.babyList[i].damageReduction = this.startingDamageReduction
this.babyList[i].collisionFilter.mask = cat.bullet | cat.player | cat.map | cat.body
@@ -2107,7 +2108,7 @@ const spawn = {
}
};
const sideLength = 120 // distance between each node mob
const sideLength = 80 // distance between each node mob
const nodes = 3
const angle = 2 * Math.PI / nodes
spawn.allowShields = false; //don't want shields on individual mobs, it messes with the constraints
@@ -2118,10 +2119,10 @@ const spawn = {
babyMob.fill = "rgb(68, 102, 119)"
babyMob.isBoss = true;
// Matter.Body.setDensity(babyMob, 0.001); //extra dense //normal is 0.001 //makes effective life much larger and increases damage
babyMob.damageReduction = 0.1 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1)
babyMob.damageReduction = this.startingDamageReduction
babyMob.collisionFilter.mask = cat.bullet | cat.player //can't touch other mobs //cat.map | cat.body |
babyMob.delay = 60 + 50 * simulation.CDScale;
babyMob.strikeRange = 600
babyMob.delay = 60 + 55 * simulation.CDScale + Math.floor(Math.random() * 20);
babyMob.strikeRange = 400
babyMob.onHit = function() {
this.cd = simulation.cycle + this.delay;
//dislodge ammo

View File

@@ -4230,33 +4230,6 @@ const tech = {
}
}
},
{
name: "super ball",
description: "fire just <strong>1 large</strong> super <strong>ball</strong><br>that <strong>stuns</strong> mobs for <strong>3</strong> second",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("super balls") && tech.missileCount === 1 && !tech.superBallDelay
},
requires: "super balls, but not MIRV or supertemporal",
effect() {
tech.oneSuperBall = true;
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
if (b.guns[i].name === "super balls") b.guns[i].chooseFireMethod()
}
},
remove() {
if (tech.oneSuperBall) {
tech.oneSuperBall = false;
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
if (b.guns[i].name === "super balls") b.guns[i].chooseFireMethod()
}
}
}
},
{
name: "super sized",
description: `increase <strong>super ball</strong> radius by <strong>14%</strong><br>increases <strong class='color-d'>damage</strong> by about <strong>27%</strong>`,
@@ -4276,6 +4249,52 @@ const tech = {
tech.bulletSize = 1;
}
},
{
name: "super duper",
description: `randomly fire <strong>+0</strong>, <strong>+1</strong>, or <strong>+2</strong> extra <strong>super balls</strong>`,
isGunTech: true,
maxCount: 9,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("super balls") && !tech.oneSuperBall
},
requires: "super balls, not super ball",
effect() {
tech.extraSuperBalls += 3
},
remove() {
tech.extraSuperBalls = 0;
}
},
{
name: "super ball",
description: "fire just <strong>1 large</strong> super <strong>ball</strong><br>that <strong>stuns</strong> mobs for <strong>3</strong> second",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("super balls") && !tech.extraSuperBalls && !tech.superBallDelay
},
requires: "super balls, not super duper or supertemporal",
effect() {
tech.oneSuperBall = true;
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
if (b.guns[i].name === "super balls") b.guns[i].chooseFireMethod()
}
},
remove() {
if (tech.oneSuperBall) {
tech.oneSuperBall = false;
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
if (b.guns[i].name === "super balls") b.guns[i].chooseFireMethod()
}
}
}
},
{
name: "phase velocity",
description: "matter wave <strong>propagates</strong> faster through <strong>solids</strong><br>increase matter wave <strong class='color-d'>damage</strong> by <strong>15%</strong>",
@@ -4486,9 +4505,9 @@ const tech = {
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("missiles") || tech.missileBotCount || tech.haveGunCheck("grenades") || (tech.haveGunCheck("super balls") && !tech.oneSuperBall)
return tech.haveGunCheck("missiles") || tech.missileBotCount || tech.haveGunCheck("grenades")
},
requires: "missiles, grenades, super balls, not super ball",
requires: "missiles, grenades",
effect() {
tech.missileCount++;
},
@@ -8861,7 +8880,7 @@ const tech = {
this.frequency = 0;
this.description = `<strong class="lore-text">null</strong> is open at level.final()`
} else {
this.frequency += lore.techGoal
this.frequency += lore.techGoal * 2
// for (let i = 0; i < tech.tech.length; i++) { //set name for all unchosen copies of this tech
// if (tech.tech[i].isLore && tech.tech[i].count === 0) tech.tech[i].description = `${lore.techCount+1}/${lore.techGoal}<br><em>add copies of <strong class="lore-text">this</strong> to the potential <strong class='color-m'>tech</strong> pool</em>`
// }
@@ -9203,5 +9222,6 @@ const tech = {
isBrainstorm: null,
isBrainstormActive: null,
brainStormDelay: null,
wormSize: null
wormSize: null,
extraSuperBalls: null
}