tech: ambush - cloaking damage effect is increase from 300% to 500%

several bug fixes
This commit is contained in:
landgreen
2021-08-10 06:38:54 -07:00
parent efa16c9ad5
commit 72c3ef2d04
9 changed files with 109 additions and 45 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@@ -1873,7 +1873,7 @@ const b = {
},
onEnd() {
if (tech.isMutualism && this.isMutualismActive && !tech.isEnergyHealth) {
m.health += 0.005 + 0.005 * tech.isSporeWorm
m.health += 0.01
if (m.health > m.maxHealth) m.health = m.maxHealth;
m.displayHealth();
}
@@ -1931,7 +1931,7 @@ const b = {
});
Composite.add(engine.world, bullet[bIndex]); //add bullet to world
if (tech.isMutualism && m.health > 0.02) {
m.health -= 0.005 - 0.005 * tech.isSporeWorm
m.health -= 0.01
m.displayHealth();
bullet[bIndex].isMutualismActive = true
}
@@ -1969,7 +1969,7 @@ const b = {
},
onEnd() {
if (tech.isMutualism && this.isMutualismActive && !tech.isEnergyHealth) {
m.health += 0.005 + 0.005 * tech.isSporeWorm
m.health += 0.005
if (m.health > m.maxHealth) m.health = m.maxHealth;
m.displayHealth();
}
@@ -2051,8 +2051,8 @@ const b = {
});
Composite.add(engine.world, bullet[bIndex]); //add bullet to world
if (tech.isMutualism && m.health > 0.02) {
m.health -= 0.005 - 0.005 * tech.isSporeWorm
if (tech.isMutualism && m.health > 0.01) {
m.health -= 0.005
m.displayHealth();
bullet[bIndex].isMutualismActive = true
}
@@ -5083,7 +5083,7 @@ const b = {
const previousCharge = this.charge
let smoothRate = (m.crouch ? 0.98 : 0.985) * (0.98 + 0.02 * b.fireCDscale) //small b.fireCDscale = faster shots, b.fireCDscale=1 = normal shot, big b.fireCDscale = slower chot
this.charge = this.charge * smoothRate + 1 - smoothRate
m.energy -= (this.charge - previousCharge) * (tech.isRailEnergyGain ? 1 : 0.33) //energy drain is proportional to charge gained, but doesn't stop normal m.fieldRegen
m.energy += (this.charge - previousCharge) * (tech.isRailEnergyGain ? 1 : -0.33) //energy drain is proportional to charge gained, but doesn't stop normal m.fieldRegen
//draw targeting
let best;
let range = 3000

View File

@@ -16,7 +16,7 @@ const level = {
// level.difficultyIncrease(30) //30 is near max on hard //60 is near max on why
// simulation.isHorizontalFlipped = true
// tech.isFieldFree = true
// m.setField("time dilation")
// m.setField("perfect diamagnetism")
// b.giveGuns("rail gun")
// tech.missileBotCount++;
// b.missileBot();
@@ -56,7 +56,7 @@ const level = {
// for (let i = 0; i < 30; i++) powerUps.spawn(player.position.x + Math.random() * 50, player.position.y - Math.random() * 50, "tech", false);
// for (let i = 0; i < 7; i++) tech.giveTech("undefined")
// lore.techCount = 6
simulation.enableConstructMode() //used to build maps in testing mode
// simulation.enableConstructMode() //used to build maps in testing mode
// simulation.isCheating = false //true;
// localSettings.loreCount = 3; //this sets what conversation is heard
@@ -2270,10 +2270,11 @@ const level = {
spawn.mapRect(5300, -275, 50, 175);
spawn.mapRect(5050, -100, 50, 150);
spawn.mapRect(4850, -275, 50, 175);
// level.difficultyIncrease(30) //30 is near max on hard //60 is near max on why
// spawn.starter(1900, -500, 200) //big boy
// spawn.growBossCulture(1900, -500)
spawn.growBossCulture(1900, -500)
// spawn.blinkBoss(1900, -500)
spawn.snakeSpitBoss(1900, -500)
// spawn.snakeSpitBoss(1900, -500)
// spawn.growBossCulture(1900, -500)
// spawn.sneaker(1900, -500)
// spawn.historyBoss(1200, -500)
@@ -2281,8 +2282,8 @@ const level = {
// spawn.focuser(1600, -500)
// spawn.laserTargetingBoss(1700, -120)
// spawn.bomberBoss(1400, -500)
// spawn.hopBoss(1800, -120)
spawn.streamBoss(1600, -500)
// spawn.beamer(1800, -120)
// spawn.orbitalBoss(1600, -500)
// spawn.powerUpBoss(1600, -500)
// spawn.cellBossCulture(1600, -500)
// spawn.laserTargetingBoss(1600, -500)

View File

@@ -458,7 +458,6 @@ const mobs = {
ctx.arc(m.pos.x, m.pos.y, 40, 0, 2 * Math.PI);
ctx.fillStyle = "rgba(255,0,170,0.15)";
ctx.fill();
}
ctx.beginPath();
ctx.arc(this.position.x, this.position.y, this.laserRange * 0.9, 0, 2 * Math.PI);

View File

@@ -1578,7 +1578,7 @@ const m = {
// description: "gain <strong class='color-f'>energy</strong> when <strong>blocking</strong><br>no <strong>recoil</strong> when <strong>blocking</strong>",
effect: () => {
m.fieldShieldingScale = 0;
m.fieldBlockCD = 4;
m.fieldBlockCD = 3;
m.grabPowerUpRange2 = 10000000
m.fieldPosition = { x: m.pos.x, y: m.pos.y }
m.fieldAngle = m.angle
@@ -1619,7 +1619,45 @@ const m = {
ctx.lineWidth = 3;
ctx.strokeStyle = "#f0f";
ctx.stroke();
} else if (!isFree) {
} else if (isFree) {
//when blocking draw this graphic
// const len = mob[i].vertices.length - 1;
ctx.fillStyle = "rgba(110,170,200," + (0.2 + 0.4 * Math.random()) + ")";
ctx.lineWidth = 2;
ctx.strokeStyle = "#000";
// const angleOff = m.fieldAngle + 2 * m.fieldArc * (Math.random() - 0.5)
// const off = {
// x: m.fieldRange * Math.cos(angleOff),
// y: m.fieldRange * Math.sin(angleOff),
// }
// const where = Vector.add(m.fieldPosition, off)
// ctx.beginPath();
// ctx.moveTo(where.x, where.y);
// ctx.lineTo(mob[i].vertices[len].x, mob[i].vertices[len].y);
// ctx.lineTo(mob[i].vertices[0].x, mob[i].vertices[0].y);
// ctx.fill();
// ctx.stroke();
// for (let j = 0; j < len; j++) {
// ctx.beginPath();
// ctx.moveTo(where.x, where.y);
// ctx.lineTo(mob[i].vertices[j].x, mob[i].vertices[j].y);
// ctx.lineTo(mob[i].vertices[j + 1].x, mob[i].vertices[j + 1].y);
// ctx.fill();
// ctx.stroke();
// }
const len = mob[i].vertices.length - 1;
const mag = mob[i].radius
ctx.beginPath();
ctx.moveTo(mob[i].vertices[len].x + mag * (Math.random() - 0.5), mob[i].vertices[len].y + mag * (Math.random() - 0.5))
for (let j = 0; j < len; j++) {
ctx.lineTo(mob[i].vertices[j].x + mag * (Math.random() - 0.5), mob[i].vertices[j].y + mag * (Math.random() - 0.5));
}
ctx.lineTo(mob[i].vertices[len].x + mag * (Math.random() - 0.5), mob[i].vertices[len].y + mag * (Math.random() - 0.5))
ctx.fill();
ctx.stroke();
} else {
//when blocking draw this graphic
const eye = 15;
const len = mob[i].vertices.length - 1;
@@ -1643,7 +1681,7 @@ const m = {
}
if (tech.isStunField) mobs.statusStun(mob[i], tech.isStunField)
//knock backs
const massRoot = Math.sqrt(Math.max(0.15, mob[i].mass)); // masses above 12 can start to overcome the push back
const massRoot = Math.sqrt(Math.max(0.15, mob[i].mass));
Matter.Body.setVelocity(mob[i], {
x: player.velocity.x - (20 * unit.x) / massRoot,
y: player.velocity.y - (20 * unit.y) / massRoot
@@ -1655,7 +1693,7 @@ const m = {
} else {
if (mob[i].isDropPowerUp && player.speed < 12) {
const massRootCap = Math.sqrt(Math.min(10, Math.max(0.4, mob[i].mass))); // masses above 12 can start to overcome the push back
const massRootCap = Math.sqrt(Math.min(10, Math.max(0.2, mob[i].mass)));
Matter.Body.setVelocity(player, {
x: 0.9 * player.velocity.x + 0.6 * unit.x * massRootCap,
y: 0.9 * player.velocity.y + 0.6 * unit.y * massRootCap
@@ -2155,7 +2193,7 @@ const m = {
m.holdingTarget = null; //clears holding target (this is so you only pick up right after the field button is released and a hold target exists)
}
//shooting (or using field) enable cloak
//not shooting (or using field) enable cloak
if (m.energy < 0.05 && m.fireCDcycle < m.cycle && !input.fire) m.fireCDcycle = m.cycle
if (m.fireCDcycle + 30 < m.cycle && !input.fire) { //automatically cloak if not firing
if (!m.isCloak) {

View File

@@ -456,7 +456,8 @@ const powerUps = {
} else if (powerUps.research.count) {
text += `<div class="choose-grid-module" onclick="powerUps.research.use('field')"><div class="grid-title"> <span style="position:relative;">`
for (let i = 0, len = Math.min(powerUps.research.count, 30); i < len; i++) text += `<div class="circle-grid research" style="position:absolute; top:0; left:${(18 - len*0.3)*i}px ;opacity:0.8; border: 1px #fff solid;"></div>`
text += `</span>&nbsp; <span class='research-select'>research</span></div></div>`
// text += `</span>&nbsp; <span class='research-select'>research</span></div></div>`
text += `</span>&nbsp; <span class='research-select'>${tech.isResearchReality?"<span class='alt'>alternate reality</span>": "research"}</span></div></div>`
}
//(${powerUps.research.count})
// text += `<div style = 'color:#fff'>${simulation.SVGrightMouse} activate the shield with the right mouse<br>fields shield you from damage <br>and let you pick up and throw blocks</div>`
@@ -589,7 +590,8 @@ const powerUps = {
} else if (powerUps.research.count) {
text += `<div class="choose-grid-module" onclick="powerUps.research.use('tech')"><div class="grid-title"> <span style="position:relative;">`
for (let i = 0, len = Math.min(powerUps.research.count, 30); i < len; i++) text += `<div class="circle-grid research" style="position:absolute; top:0; left:${(18 - len*0.3)*i}px;opacity:0.8; border: 1px #fff solid;"></div>`
text += `</span>&nbsp; <span class='research-select'>research</span></div></div>`
// text += `</span>&nbsp; <span class='research-select'>research</span></div></div>`
text += `</span>&nbsp; <span class='research-select'>${tech.isResearchReality?"<span class='alt'>alternate reality</span>": "research"}</span></div></div>`
}
document.getElementById("choose-grid").innerHTML = text
@@ -677,7 +679,7 @@ const powerUps = {
} else if (powerUps.research.count) {
text += `<div class="choose-grid-module" onclick="powerUps.research.use('gun')"><div class="grid-title"> <span style="position:relative;">`
for (let i = 0, len = Math.min(powerUps.research.count, 30); i < len; i++) text += `<div class="circle-grid research" style="position:absolute; top:0; left:${(18 - len*0.3)*i}px ;opacity:0.8; border: 1px #fff solid;"></div>`
text += `</span>&nbsp; <span class='research-select'>research</span></div></div>`
text += `</span>&nbsp; <span class='research-select'>${tech.isResearchReality?"<span class='alt'>alternate reality</span>": "research"}</span></div></div>`
}
// console.log(powerUps.gun.choiceLog)
// console.log(choice1, choice2, choice3)

View File

@@ -4041,7 +4041,7 @@ const spawn = {
},
orbitalBoss(x, y, radius = 88) {
const nodeBalance = Math.random()
const nodes = Math.min(15, Math.floor(1 + 5 * nodeBalance + 0.75 * Math.sqrt(simulation.difficulty)))
const nodes = Math.min(15, Math.floor(2 + 4 * nodeBalance + 0.75 * Math.sqrt(simulation.difficulty)))
mobs.spawn(x, y, nodes, radius, "rgb(255,0,150)");
let me = mob[mob.length - 1];
me.isBoss = true;
@@ -4051,8 +4051,8 @@ const spawn = {
me.stroke = "transparent"; //used for drawGhost
me.seeAtDistance2 = 2000000;
me.memory = Infinity;
me.frictionAir = 0.02;
me.accelMag = 0.00015 * Math.sqrt(simulation.accelScale)
me.frictionAir = 0.04;
me.accelMag = 0.0003 * simulation.accelScale
me.collisionFilter.mask = cat.player | cat.bullet //| cat.body
spawn.shield(me, x, y, 1);

View File

@@ -171,7 +171,7 @@
if (tech.isFlipFlopDamage && tech.isFlipFlopOn) dmg *= 1.45
if (tech.isAnthropicDamage && tech.isDeathAvoidedThisLevel) dmg *= 2.3703599
if (tech.isDamageAfterKill) dmg *= (m.lastKillCycle + 300 > m.cycle) ? 2 : 0.66
if (m.isSneakAttack && m.cycle > m.lastKillCycle + 240) dmg *= 4
if (m.isSneakAttack && m.cycle > m.lastKillCycle + 240) dmg *= tech.sneakAttackDmg
if (tech.isTechDamage) dmg *= 1.9
if (tech.isDupDamage) dmg *= 1 + Math.min(1, tech.duplicationChance())
if (tech.isLowEnergyDamage) dmg *= 1 + Math.max(0, 1 - m.energy) * 0.5
@@ -341,8 +341,8 @@
description: "spawn <strong>8</strong> <strong class='color-g'>guns</strong>, but you can't <strong>switch</strong> <strong class='color-g'>guns</strong><br><strong class='color-g'>guns</strong> cycle automatically with each new level",
maxCount: 1,
count: 0,
frequency: 3,
frequencyDefault: 3,
frequency: 2,
frequencyDefault: 2,
allowed() {
return (tech.isDamageForGuns || tech.isFireRateForGuns) && b.inventory.length + 5 < b.guns.length
},
@@ -365,7 +365,7 @@
description: "spawn a <strong class='color-g'>gun</strong> and </strong>double</strong> the <strong class='flicker'>frequency</strong><br>of finding <strong class='color-m'>tech</strong> for your <strong class='color-g'>guns</strong>",
maxCount: 1,
count: 0,
frequency: 2,
frequency: 1,
isNonRefundable: true,
// isExperimentHide: true,
isBadRandomOption: true,
@@ -383,17 +383,17 @@
remove() {}
},
{
name: "specialist",
name: "ad hoc",
description: "for every <strong class='color-g'>gun</strong> in your inventory spawn a<br><strong class='color-h'>heal</strong>, <strong class='color-r'>research</strong>, <strong class='color-f'>field</strong>, <strong class='color-g'>ammo</strong>, or <strong class='color-m'>tech</strong>",
maxCount: 1, //random power up
count: 0,
frequency: 2,
frequency: 1,
isNonRefundable: true,
// isExperimentHide: true,
allowed() {
return b.inventory.length > 3
return b.inventory.length > 1
},
requires: "at least 4 guns",
requires: "at least 2 guns",
effect() {
for (let i = 0; i < b.inventory.length; i++) {
if (Math.random() < 0.2) {
@@ -2582,7 +2582,7 @@
effect() {
tech.isFallingDamage = true;
m.setMaxHealth();
m.addHealth(1)
m.addHealth(1 / simulation.healScale)
},
remove() {
tech.isFallingDamage = false;
@@ -2800,9 +2800,9 @@
frequency: 1,
frequencyDefault: 1,
allowed() {
return !tech.isSwitchReality && !tech.isCollisionRealitySwitch
return !tech.isSwitchReality && !tech.isCollisionRealitySwitch && !tech.isJunkResearch
},
requires: "many-worlds, non-unitary",
requires: "many-worlds, non-unitary, not pseudoscience",
effect() {
tech.isResearchReality = true;
for (let i = 0; i < 16; i++) powerUps.spawn(m.pos.x + Math.random() * 60, m.pos.y + Math.random() * 60, "research", false);
@@ -2918,9 +2918,9 @@
frequency: 1,
frequencyDefault: 1,
allowed() {
return tech.isResearchBoss || tech.isMetaAnalysis || tech.isRerollBots || tech.isDeathAvoid || tech.isRerollDamage || build.isExperimentSelection
return !tech.isResearchReality //tech.isResearchBoss || tech.isMetaAnalysis || tech.isRerollBots || tech.isDeathAvoid || tech.isRerollDamage || build.isExperimentSelection
},
requires: "abiogenesis, meta-analysis, bot fabrication, anthropic principle, or Bayesian statistics",
requires: "not Ψ(t) collapse", //"abiogenesis, meta-analysis, bot fabrication, anthropic principle, or Bayesian statistics, not Ψ(t) collapse",
effect() {
tech.isJunkResearch = true;
},
@@ -3029,7 +3029,7 @@
effect() {
tech.duplicateChance += 0.1
powerUps.setDo(); //needed after adjusting duplication chance
tech.addJunkTechToPool(18)
tech.addJunkTechToPool(30)
},
remove() {
tech.duplicateChance = 0
@@ -4269,7 +4269,7 @@
},
{
name: "MIRV",
description: "launch <strong>+1</strong> <strong>missile</strong> at a time<br>decrease <strong>size</strong> and <strong>fire rate</strong> by <strong>10%</strong>",
description: "missile <strong class='color-g'>gun</strong> and <strong>bot</strong> launch <strong>+1</strong> <strong>missile</strong><br>decrease <strong>size</strong> and <strong>fire rate</strong> by <strong>10%</strong>",
isGunTech: true,
maxCount: 9,
count: 0,
@@ -5879,6 +5879,25 @@
tech.isCloakStun = false;
}
},
{
name: "ambush",
description: "metamaterial cloaking field <strong class='color-d'>damage</strong> effect<br>is increased from <span style = 'text-decoration: line-through;'>300%</span> to <strong>500%</strong>",
isFieldTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return m.fieldUpgrades[m.fieldMode].name === "metamaterial cloaking"
},
requires: "metamaterial cloaking",
effect() {
tech.sneakAttackDmg = 6
},
remove() {
tech.sneakAttackDmg = 4
}
},
{
name: "dynamical systems",
description: "use <strong>1</strong> <strong class='color-r'>research</strong><br>increase your <strong class='color-d'>damage</strong> by <strong>35%</strong>",
@@ -7443,7 +7462,7 @@
},
{
name: "quantum black hole",
description: "use your <strong class='color-f'>energy</strong> and <strong>1</strong> <strong class='color-r'>research</strong> to <strong>spawn</strong><br>inside the event horizon of a huge <strong>black hole</strong>",
description: "use your <strong class='color-f'>energy</strong> and <strong>4</strong> <strong class='color-r'>research</strong> to <strong>spawn</strong><br>inside the event horizon of a huge <strong>black hole</strong>",
maxCount: 9,
count: 0,
frequency: 0,
@@ -7451,13 +7470,13 @@
isExperimentHide: true,
isJunk: true,
allowed() {
return powerUps.research.count > 0
return powerUps.research.count > 3
},
requires: "at least 1 research",
requires: "at least 4 research",
effect() {
m.energy = 0
spawn.suckerBoss(m.pos.x, m.pos.y - 700)
powerUps.research.changeRerolls(-1)
powerUps.research.changeRerolls(-4)
simulation.makeTextLog(`<span class='color-var'>m</span>.<span class='color-r'>research</span> <span class='color-symbol'>--</span><br>${powerUps.research.count}`)
},
remove() {}

View File

@@ -1,10 +1,15 @@
******************************************************** NEXT PATCH ********************************************************
cloaking field no longer gets smaller when you are low on energy
invisible map element bug fixed
tech: ambush - cloaking damage effect is increase from 300% to 500%
several bug fixes
******************************************************** TODO ********************************************************
laser damage seems low based on 2 runs
history is low damage
drones can combine with other drones to get bigger?
drones that grab powers ups can grab more then one and get even bigger each time