vanish platform

new training levels "stack", "mine", "grenades", "harpoon"

new map element vanish goes away after you touch it, returns in 3 seconds
bug fixes
This commit is contained in:
landgreen
2021-12-28 21:03:06 -08:00
parent 44ecb2437a
commit 7d1b212c8a
8 changed files with 1579 additions and 1172 deletions

View File

@@ -5453,7 +5453,7 @@ const b = {
} else {
const bodyCollisions = Matter.Query.collides(this, body)
if (bodyCollisions.length) {
if (!bodyCollisions[0].bodyA.isComposite) {
if (!bodyCollisions[0].bodyA.isNonStick) {
onCollide(this)
this.stuckTo = bodyCollisions[0].bodyA
//find the relative position for when the mob is at angle zero by undoing the mobs rotation

File diff suppressed because it is too large Load Diff

View File

@@ -593,6 +593,7 @@ const simulation = {
}, 1000);
},
startGame(isBuildRun = false, isTrainingRun = false) {
simulation.isTextLogOpen = true
simulation.clearMap()
if (!isBuildRun) { //if a build run logic flow returns to "experiment-button").addEventListener
document.body.style.cursor = "none";

View File

@@ -1146,14 +1146,14 @@ const spawn = {
powerUps.spawnRandomPowerUp(this.position.x, this.position.y) // manual power up spawn to avoid spawning too many tech with "symbiosis"
}
}
me.damageReduction = 0.2 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1)
me.damageReduction = 0.23 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1)
//required setup for invulnerable
me.isInvulnerable = false
me.invulnerabilityCountDown = 0
me.do = function() {
if (this.isInvulnerable) {
if (this.invulnerabilityCountDown > 0) {
this.invulnerabilityCountDown--
if (!m.isBodiesAsleep) this.invulnerabilityCountDown--
ctx.beginPath();
let vertices = this.vertices;
ctx.moveTo(vertices[0].x, vertices[0].y);
@@ -1234,7 +1234,7 @@ const spawn = {
me.do = function() {
if (this.isInvulnerable) {
if (this.invulnerabilityCountDown > 0) {
this.invulnerabilityCountDown--
if (!m.isBodiesAsleep) this.invulnerabilityCountDown--
ctx.beginPath();
let vertices = this.vertices;
ctx.moveTo(vertices[0].x, vertices[0].y);
@@ -1982,7 +1982,7 @@ const spawn = {
ctx.strokeStyle = "rgba(255,255,255,0.7)";
ctx.stroke();
} else if (this.invulnerabilityCountDown > 0) {
this.invulnerabilityCountDown--
if (!m.isBodiesAsleep) this.invulnerabilityCountDown--
} else {
this.isInvulnerable = true
if (this.damageReduction) this.startingDamageReduction = this.damageReduction
@@ -3401,7 +3401,7 @@ const spawn = {
}
if (this.isInvulnerable) {
if (this.invulnerabilityCountDown > 0) {
this.invulnerabilityCountDown--
if (!m.isBodiesAsleep) this.invulnerabilityCountDown--
//graphics //draw a super shield?
ctx.beginPath();
let vertices = this.vertices;

View File

@@ -4498,7 +4498,7 @@ const tech = {
},
{
name: "MIRV",
description: "fire <strong>+1</strong> <strong>missile</strong>, <strong>grenade</strong>, and <strong>super ball</strong><br>decrease <strong class='color-e'>explosion</strong> <strong>radius</strong> up to <strong>10%</strong>",
description: "fire <strong>+1</strong> <strong>missile</strong> and <strong>grenade</strong><br>decrease <strong class='color-e'>explosion</strong> <strong>radius</strong> up to <strong>10%</strong>",
isGunTech: true,
maxCount: 9,
count: 0,
@@ -8834,7 +8834,7 @@ const tech = {
},
{
name: "black hole cluster",
description: `<strong>spawn</strong> nearby <strong>black holes</strong>`,
description: `spawn <strong>30</strong> nearby <strong>black holes</strong>`,
maxCount: 1,
count: 0,
frequency: 0,
@@ -8847,7 +8847,7 @@ const tech = {
const unit = { x: 1, y: 0 }
for (let i = 0; i < 30; i++) {
const where = Vector.add(m.pos, Vector.mult(Vector.rotate(unit, Math.random() * 2 * Math.PI), 2000 + 1200 * Math.random()))
spawn.sucker(where.x, where.y, 200)
spawn.sucker(where.x, where.y, 140)
const who = mob[mob.length - 1]
who.locatePlayer()
// who.damageReduction = 0.2