metamaterial cloaking now does 300% more damage

added 50% chance for elevators on warehouse level

metamaterial cloaking now does 300% more damage if a mob has not died in the last 4 seconds
  removed: tech: combinatorial optimization - increase damage by 66% if a mob hasn't died in the last 5 seconds

fixed bug with experiment not loading tech
This commit is contained in:
landgreen
2021-05-30 14:14:29 -07:00
parent d54ca92cf7
commit 69fec1cde7
7 changed files with 153 additions and 73 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@@ -300,6 +300,7 @@ const build = {
} else if (type === "tech") { } else if (type === "tech") {
if (tech.tech[index].count < tech.tech[index].maxCount) { if (tech.tech[index].count < tech.tech[index].maxCount) {
if (!tech.tech[index].isLore && !tech.tech[index].isNonRefundable && !who.classList.contains("build-tech-selected")) who.classList.add("build-tech-selected"); if (!tech.tech[index].isLore && !tech.tech[index].isNonRefundable && !who.classList.contains("build-tech-selected")) who.classList.add("build-tech-selected");
tech.giveTech(index)
} else if (!tech.tech[index].isNonRefundable) { } else if (!tech.tech[index].isNonRefundable) {
tech.totalCount -= tech.tech[index].count tech.totalCount -= tech.tech[index].count
tech.removeTech(index); tech.removeTech(index);
@@ -311,6 +312,27 @@ const build = {
}, 50); }, 50);
} }
} }
// } else if (type === "tech") { //remove tech if you have too many
// if (tech.tech[index].count < tech.tech[index].maxCount) {
// if (!who.classList.contains("build-tech-selected")) who.classList.add("build-tech-selected");
// tech.giveTech(index)
// } else if (!tech.tech[index].isNonRefundable) {
// tech.totalCount -= tech.tech[index].count
// tech.removeTech(index);
// who.classList.remove("build-tech-selected");
// } else {
// who.classList.remove("build-tech-selected")
// setTimeout(() => { //return energy
// who.classList.add("build-tech-selected")
// }, 50);
// }
// }
//update tech text //disable not allowed tech //update tech text //disable not allowed tech
for (let i = 0, len = tech.tech.length; i < len; i++) { for (let i = 0, len = tech.tech.length; i < len; i++) {
const techID = document.getElementById("tech-" + i) const techID = document.getElementById("tech-" + i)

View File

@@ -16,7 +16,7 @@ const level = {
// level.difficultyIncrease(30) // level.difficultyIncrease(30)
// simulation.zoomScale = 1000; // simulation.zoomScale = 1000;
// simulation.setZoom(); // simulation.setZoom();
// m.setField("pilot wave") // m.setField("metamaterial cloaking")
// b.giveGuns("laser") // b.giveGuns("laser")
// tech.isExplodeRadio = true // tech.isExplodeRadio = true
// tech.giveTech("WIMPs") // tech.giveTech("WIMPs")
@@ -52,7 +52,7 @@ const level = {
// level.coliseum() //community level // level.coliseum() //community level
// level.crossfire() //community level // level.crossfire() //community level
// level.vats() //community level // level.vats() //community level
// level.n_gon() //community level // level["n-gon"]() //community level
// powerUps.directSpawn(simulation.mouseInGame.x, simulation.mouseInGame.y, "tech"); // powerUps.directSpawn(simulation.mouseInGame.x, simulation.mouseInGame.y, "tech");
// tech.giveTech("undefined") // tech.giveTech("undefined")
@@ -2934,46 +2934,77 @@ const level = {
// spawn.mapRect(-1950, -400, 100, 25); // spawn.mapRect(-1950, -400, 100, 25);
spawn.mapRect(-3150, 50, 775, 100); spawn.mapRect(-3150, 50, 775, 100);
spawn.mapRect(-2600, -250, 775, 100); spawn.mapRect(-2600, -250, 775, 100);
spawn.bodyRect(-1450, -125, 125, 125, 1, spawn.propsSlide); //weight
spawn.bodyRect(-1800, 0, 300, 100, 1, spawn.propsHoist); //hoist
cons[cons.length] = Constraint.create({
pointA: {
x: -1650,
y: -500
},
bodyB: body[body.length - 1],
stiffness: 0.0001815,
length: 1
});
World.add(engine.world, cons[cons.length - 1]);
spawn.bodyRect(600, 525, 125, 125, 1, spawn.propsSlide); //weight if (Math.random() < 0.5) {
spawn.bodyRect(800, 600, 300, 100, 1, spawn.propsHoist); //hoist const elevator1 = level.elevator(-1780, 500, 260, 40, 7, 0.0003)
cons[cons.length] = Constraint.create({ const elevator2 = level.elevator(820, 1300, 260, 40, 607, 0.0003)
pointA: { const elevator3 = level.elevator(-2755, 1260, 160, 40, 1000, 0.006)
x: 950, spawn.bodyRect(-2375, 1300, 100, 100);
y: 100 spawn.bodyRect(-2325, 1250, 50, 50);
}, spawn.bodyRect(-2275, 1350, 125, 50);
bodyB: body[body.length - 1],
stiffness: 0.0001815,
length: 1
});
World.add(engine.world, cons[cons.length - 1]);
spawn.bodyRect(-2700, 1150, 100, 160, 1, spawn.propsSlide); //weight level.custom = () => {
spawn.bodyRect(-2550, 1150, 200, 100, 1, spawn.propsSlide); //weight elevator1.move();
spawn.bodyRect(-2775, 1300, 400, 100, 1, spawn.propsHoist); //hoist elevator1.drawTrack();
cons[cons.length] = Constraint.create({ elevator2.move();
pointA: { elevator2.drawTrack();
x: -2575, elevator3.move();
y: 150 elevator3.drawTrack();
},
bodyB: body[body.length - 1],
stiffness: 0.0005,
length: 566
});
World.add(engine.world, cons[cons.length - 1]);
ctx.fillStyle = "#444" //light fixtures
ctx.fillRect(-920, -505, 40, 10)
ctx.fillRect(-920, 95, 40, 10)
ctx.fillRect(180, 95, 40, 10)
ctx.fillRect(-20, 695, 40, 10)
ctx.fillRect(-2320, 945, 40, 10)
ctx.fillStyle = "#cff" //exit
ctx.fillRect(300, -250, 350, 250)
level.playerExitCheck();
level.exit.draw();
level.enter.draw();
};
} else {
spawn.bodyRect(-1450, -125, 125, 125, 1, spawn.propsSlide); //weight
spawn.bodyRect(-1800, 0, 300, 100, 1, spawn.propsHoist); //hoist
cons[cons.length] = Constraint.create({
pointA: {
x: -1650,
y: -500
},
bodyB: body[body.length - 1],
stiffness: 0.0001815,
length: 1
});
World.add(engine.world, cons[cons.length - 1]);
spawn.bodyRect(600, 525, 125, 125, 1, spawn.propsSlide); //weight
spawn.bodyRect(800, 600, 300, 100, 1, spawn.propsHoist); //hoist
cons[cons.length] = Constraint.create({
pointA: {
x: 950,
y: 100
},
bodyB: body[body.length - 1],
stiffness: 0.0001815,
length: 1
});
World.add(engine.world, cons[cons.length - 1]);
spawn.bodyRect(-2700, 1150, 100, 160, 1, spawn.propsSlide); //weight
spawn.bodyRect(-2550, 1150, 200, 100, 1, spawn.propsSlide); //weight
spawn.bodyRect(-2775, 1300, 400, 100, 1, spawn.propsHoist); //hoist
cons[cons.length] = Constraint.create({
pointA: {
x: -2575,
y: 150
},
bodyB: body[body.length - 1],
stiffness: 0.0005,
length: 566
});
World.add(engine.world, cons[cons.length - 1]);
}
@@ -5418,7 +5449,7 @@ const level = {
portal2[2].draw() portal2[2].draw()
} }
}, },
n_gon() { // Made by Oranger on Discord "n-gon"() { // Made by Oranger on Discord
let needGravity = []; let needGravity = [];
let s = { //mech statue let s = { //mech statue
x: -200, x: -200,

View File

@@ -943,7 +943,8 @@ const m = {
isFieldActive: false, isFieldActive: false,
fieldRange: 155, fieldRange: 155,
fieldShieldingScale: 1, fieldShieldingScale: 1,
fieldDamage: 1, // fieldDamage: 1,
isSneakAttack: false,
duplicateChance: 0, duplicateChance: 0,
energy: 0, energy: 0,
fieldRegen: 0, fieldRegen: 0,
@@ -976,7 +977,7 @@ const m = {
m.fieldShieldingScale = 1; m.fieldShieldingScale = 1;
m.fieldBlockCD = 10; m.fieldBlockCD = 10;
m.fieldHarmReduction = 1; m.fieldHarmReduction = 1;
m.fieldDamage = 1 m.isSneakAttack = false
m.duplicateChance = 0 m.duplicateChance = 0
powerUps.setDo(); powerUps.setDo();
m.grabPowerUpRange2 = 156000; m.grabPowerUpRange2 = 156000;
@@ -1952,7 +1953,7 @@ const m = {
}, },
{ {
name: "metamaterial cloaking", //"weak photonic coupling" "electromagnetically induced transparency" "optical non-coupling" "slow light field" "electro-optic transparency" name: "metamaterial cloaking", //"weak photonic coupling" "electromagnetically induced transparency" "optical non-coupling" "slow light field" "electro-optic transparency"
description: "<strong class='color-cloaked'>cloak</strong> after not using your gun or field<br>while <strong class='color-cloaked'>cloaked</strong> mobs can't see you<br>increase <strong class='color-d'>damage</strong> by <strong>146%</strong>", description: "when not firing activate a <strong class='color-cloaked'>cloaking</strong> effect<br>if a mob has <strong>not died</strong> in the last <strong>4 seconds</strong><br>increase <strong class='color-d'>damage</strong> by <strong>300%</strong>",
effect: () => { effect: () => {
m.fieldFire = true; m.fieldFire = true;
m.fieldMeterColor = "#333"; m.fieldMeterColor = "#333";
@@ -1960,8 +1961,9 @@ const m = {
// m.eyeFillColor = '#333' // m.eyeFillColor = '#333'
m.fieldPhase = 0; m.fieldPhase = 0;
m.isCloak = false m.isCloak = false
m.fieldDamage = 2.46 // 1 + 146/100 // m.fieldDamage = 2.46 // 1 + 146/100
m.fieldDrawRadius = 0 m.fieldDrawRadius = 0
m.isSneakAttack = true;
const drawRadius = 1000 const drawRadius = 1000
m.hold = function() { m.hold = function() {
@@ -2080,9 +2082,9 @@ const m = {
if (m.energy < 0) m.energy = 0 if (m.energy < 0) m.energy = 0
const xOff = m.pos.x - m.radius * m.maxEnergy const xOff = m.pos.x - m.radius * m.maxEnergy
const yOff = m.pos.y - 50 const yOff = m.pos.y - 50
ctx.fillStyle = "rgba(0, 0, 0, 0.3)"; ctx.fillStyle = "rgba(0, 0, 0, 0.3)" //
ctx.fillRect(xOff, yOff, 60 * m.maxEnergy, 10); ctx.fillRect(xOff, yOff, 60 * m.maxEnergy, 10);
ctx.fillStyle = "#fff"; ctx.fillStyle = "#fff" //m.cycle > m.lastKillCycle + 300 ? "#000" : "#fff" //"#fff";
ctx.fillRect(xOff, yOff, 60 * m.energy, 10); ctx.fillRect(xOff, yOff, 60 * m.energy, 10);
ctx.beginPath() ctx.beginPath()
ctx.rect(xOff, yOff, 60 * m.maxEnergy, 10); ctx.rect(xOff, yOff, 60 * m.maxEnergy, 10);
@@ -2090,6 +2092,15 @@ const m = {
ctx.lineWidth = 1; ctx.lineWidth = 1;
ctx.stroke(); ctx.stroke();
} }
//show sneak attack status
if (m.cycle > m.lastKillCycle + 300) {
ctx.strokeStyle = "rgba(0,0,0,0.4)" //m.fieldMeterColor; //"rgba(255,255,0,0.2)" //ctx.strokeStyle = `rgba(0,0,255,${0.5+0.5*Math.random()})`
ctx.beginPath();
ctx.arc(m.pos.x, m.pos.y, 28, 0, 2 * Math.PI);
ctx.lineWidth = 2
ctx.stroke();
}
} }
} }
}, },

View File

@@ -525,7 +525,7 @@ const simulation = {
level.levels.push("basement"); level.levels.push("basement");
level.levels.push("crossfire"); level.levels.push("crossfire");
level.levels.push("vats") level.levels.push("vats")
level.levels.push("n_gon") level.levels.push("n-gon")
level.levels.push("house"); level.levels.push("house");
level.levels.push("perplex"); level.levels.push("perplex");
level.levels.push("coliseum"); level.levels.push("coliseum");

View File

@@ -147,11 +147,11 @@
return false return false
}, },
damageFromTech() { damageFromTech() {
let dmg = m.fieldDamage let dmg = 1 //m.fieldDamage
if (tech.isFlipFlopDamage && tech.isFlipFlopOn) dmg *= 1.45 if (tech.isFlipFlopDamage && tech.isFlipFlopOn) dmg *= 1.45
if (tech.isAnthropicDamage && tech.isDeathAvoidedThisLevel) dmg *= 2.3703599 if (tech.isAnthropicDamage && tech.isDeathAvoidedThisLevel) dmg *= 2.3703599
if (tech.isDamageAfterKill) dmg *= (m.lastKillCycle + 300 > m.cycle) ? 1.5 : 0.85 if (tech.isDamageAfterKill) dmg *= (m.lastKillCycle + 300 > m.cycle) ? 1.5 : 0.85
if (tech.isSneakAttack && m.cycle > m.lastKillCycle + 300) dmg *= 1.66 if (m.isSneakAttack && m.cycle > m.lastKillCycle + 240) dmg *= 4
if (tech.isTechDamage) dmg *= 1.9 if (tech.isTechDamage) dmg *= 1.9
if (tech.isDupDamage) dmg *= 1 + Math.min(1, tech.duplicationChance()) if (tech.isDupDamage) dmg *= 1 + Math.min(1, tech.duplicationChance())
if (tech.isLowEnergyDamage) dmg *= 1 + Math.max(0, 1 - m.energy) * 0.5 if (tech.isLowEnergyDamage) dmg *= 1 + Math.max(0, 1 - m.energy) * 0.5
@@ -170,7 +170,6 @@
if (tech.isNoFireDamage && m.cycle > m.fireCDcycle + 120) dmg *= 1.9 if (tech.isNoFireDamage && m.cycle > m.fireCDcycle + 120) dmg *= 1.9
if (tech.isSpeedDamage) dmg *= 1 + Math.min(0.43, player.speed * 0.015) if (tech.isSpeedDamage) dmg *= 1 + Math.min(0.43, player.speed * 0.015)
if (tech.isBotDamage) dmg *= 1 + 0.05 * b.totalBots() if (tech.isBotDamage) dmg *= 1 + 0.05 * b.totalBots()
return dmg * tech.slowFire * tech.aimDamage return dmg * tech.slowFire * tech.aimDamage
}, },
duplicationChance() { duplicationChance() {
@@ -5106,24 +5105,24 @@
tech.isCloakStun = false; tech.isCloakStun = false;
} }
}, },
{ // {
name: "combinatorial optimization", // name: "combinatorial optimization",
description: "increase <strong class='color-d'>damage</strong> by <strong>66%</strong><br>if a mob has <strong>not died</strong> in the last <strong>5 seconds</strong>", // description: "increase <strong class='color-d'>damage</strong> by <strong>66%</strong><br>if a mob has <strong>not died</strong> in the last <strong>5 seconds</strong>",
isFieldTech: true, // isFieldTech: true,
maxCount: 1, // maxCount: 1,
count: 0, // count: 0,
frequency: 2, // frequency: 2,
allowed() { // allowed() {
return m.fieldUpgrades[m.fieldMode].name === "metamaterial cloaking" // return m.fieldUpgrades[m.fieldMode].name === "metamaterial cloaking"
}, // },
requires: "metamaterial cloaking or pilot wave", // requires: "metamaterial cloaking or pilot wave",
effect() { // effect() {
tech.isSneakAttack = true; // tech.isSneakAttack = true;
}, // },
remove() { // remove() {
tech.isSneakAttack = false; // tech.isSneakAttack = false;
} // }
}, // },
{ {
name: "discrete optimization", name: "discrete optimization",
description: "increase <strong class='color-d'>damage</strong> by <strong>50%</strong><br><strong>50%</strong> increased <strong><em>delay</em></strong> after firing", description: "increase <strong class='color-d'>damage</strong> by <strong>50%</strong><br><strong>50%</strong> increased <strong><em>delay</em></strong> after firing",

View File

@@ -1,12 +1,11 @@
******************************************************** NEXT PATCH ******************************************************** ******************************************************** NEXT PATCH ********************************************************
"cloak" and "alternate reality" now have styled text added 50% chance for elevators on warehouse level
metamaterial field damage increased to 146% (was 121%) metamaterial cloaking now does 300% more damage if a mob has not died in the last 4 seconds
tech: combinatorial optimization - increase damage by 66% if a mob hasn't died in the last 5 seconds removed: tech: combinatorial optimization - increase damage by 66% if a mob hasn't died in the last 5 seconds
fix bugs where some shared build URLs were crashing on some unusual tech, like lore tech and nonrefundable tech fixed bug with experiment not loading tech
junk tech: not a bug - crashes the game
******************************************************** BUGS ******************************************************** ******************************************************** BUGS ********************************************************
@@ -36,6 +35,24 @@ is there a way to check if the player is stuck inside the map or block
******************************************************** TODO ******************************************************** ******************************************************** TODO ********************************************************
MACHOs might clash with cloaking field graphic
things to avoid when designing a map:
avoid a single path through the map
instead have multiple paths through the map
or randomize parts of the map
avoid isolated floating rectangles
instead imagine what story you are trying to tell about the buildings and tell that story
draw: shadows, color inside of buildings, structural support, pillars, ...
avoid simple repetitive platforms
instead of - -- - try -:_-L -_
avoid large flat areas; this doesn't produce fun combat
instead produce complex places for the player to hide
break these rules when its important to make a statement in your level
flip left right on some maps flip left right on some maps
some mobs use the original x parameter in their loop, but it doesn't get flipped some mobs use the original x parameter in their loop, but it doesn't get flipped
manually edit each mob's logic manually edit each mob's logic