pilot wave adjustments
pilot is back to it's previous speed, and spawning at mouse pilot wave uses 50% less energy when you are low on energy, but it uses more energy then normal when you have more energy pilot wave tech lost: time crystals, Lorentz transformation, annihilation gained: degenerate matter - 60% harm reduction while field is active tech: potential well - blocks in pilot wave drift into the center of the field with a much higher force this lets you hold larger blocks and flick them much faster
This commit is contained in:
@@ -2500,7 +2500,7 @@ const b = {
|
|||||||
if (Vector.magnitude(Vector.sub(this.position, player.position)) < 250 && m.immuneCycle < m.cycle) { //give energy
|
if (Vector.magnitude(Vector.sub(this.position, player.position)) < 250 && m.immuneCycle < m.cycle) { //give energy
|
||||||
Matter.Body.setAngularVelocity(this, this.spin)
|
Matter.Body.setAngularVelocity(this, this.spin)
|
||||||
if (this.isUpgraded) {
|
if (this.isUpgraded) {
|
||||||
m.energy += 0.11
|
m.energy += 0.1
|
||||||
simulation.drawList.push({ //add dmg to draw queue
|
simulation.drawList.push({ //add dmg to draw queue
|
||||||
x: this.position.x,
|
x: this.position.x,
|
||||||
y: this.position.y,
|
y: this.position.y,
|
||||||
@@ -3111,7 +3111,7 @@ const b = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
range: 190 + 60 * tech.isOrbitBotUpgrade, //range is set in bot upgrade too! //150 + (80 + 100 * tech.isOrbitBotUpgrade) * Math.random(), // + 5 * tech.orbitBotCount,
|
range: 190 + 100 * tech.isOrbitBotUpgrade, //range is set in bot upgrade too! //150 + (80 + 100 * tech.isOrbitBotUpgrade) * Math.random(), // + 5 * tech.orbitBotCount,
|
||||||
orbitalSpeed: 0,
|
orbitalSpeed: 0,
|
||||||
phase: 2 * Math.PI * Math.random(),
|
phase: 2 * Math.PI * Math.random(),
|
||||||
do() {
|
do() {
|
||||||
|
|||||||
@@ -15,12 +15,12 @@ const level = {
|
|||||||
// level.difficultyIncrease(30)
|
// level.difficultyIncrease(30)
|
||||||
// simulation.zoomScale = 1000;
|
// simulation.zoomScale = 1000;
|
||||||
// simulation.setZoom();
|
// simulation.setZoom();
|
||||||
// m.setField("pilot wave")
|
m.setField("pilot wave")
|
||||||
// b.giveGuns("wave beam")
|
// b.giveGuns("wave beam")
|
||||||
// b.giveGuns("laser")
|
// b.giveGuns("laser")
|
||||||
// tech.isExplodeRadio = true
|
// tech.isExplodeRadio = true
|
||||||
// tech.giveTech("pulse")
|
// tech.giveTech("pulse")
|
||||||
// for (let i = 0; i < 3; i++) tech.giveTech("amplitude")
|
tech.giveTech("potential well")
|
||||||
// for (let i = 0; i < 3; i++) tech.giveTech("packet length")
|
// for (let i = 0; i < 3; i++) tech.giveTech("packet length")
|
||||||
// for (let i = 0; i < 3; i++) tech.giveTech("propagation")
|
// for (let i = 0; i < 3; i++) tech.giveTech("propagation")
|
||||||
// for (let i = 0; i < 3; i++) tech.giveTech("bound state")
|
// for (let i = 0; i < 3; i++) tech.giveTech("bound state")
|
||||||
|
|||||||
30
js/player.js
30
js/player.js
@@ -522,7 +522,7 @@ const m = {
|
|||||||
if (tech.isSpeedHarm) dmg *= 1 - Math.min(player.speed * 0.019, 0.60)
|
if (tech.isSpeedHarm) dmg *= 1 - Math.min(player.speed * 0.019, 0.60)
|
||||||
if (tech.isSlowFPS) dmg *= 0.8
|
if (tech.isSlowFPS) dmg *= 0.8
|
||||||
// if (tech.isPiezo) dmg *= 0.85
|
// if (tech.isPiezo) dmg *= 0.85
|
||||||
if (tech.isHarmReduce && input.field && m.fieldCDcycle < m.cycle) dmg *= 0.5
|
if (tech.isHarmReduce && input.field && m.fieldCDcycle < m.cycle) dmg *= 0.4
|
||||||
if (tech.isBotArmor) dmg *= 0.94 ** b.totalBots()
|
if (tech.isBotArmor) dmg *= 0.94 ** b.totalBots()
|
||||||
if (tech.isHarmArmor && m.lastHarmCycle + 600 > m.cycle) dmg *= 0.33;
|
if (tech.isHarmArmor && m.lastHarmCycle + 600 > m.cycle) dmg *= 0.33;
|
||||||
if (tech.isNoFireDefense && m.cycle > m.fireCDcycle + 120) dmg *= 0.34
|
if (tech.isNoFireDefense && m.cycle > m.fireCDcycle + 120) dmg *= 0.34
|
||||||
@@ -657,7 +657,7 @@ const m = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (tech.isEnergyHealth) {
|
if (tech.isEnergyHealth) {
|
||||||
m.energy -= dmg;
|
m.energy -= dmg * 1.1;
|
||||||
if (m.energy < 0 || isNaN(m.energy)) { //taking deadly damage
|
if (m.energy < 0 || isNaN(m.energy)) { //taking deadly damage
|
||||||
if (tech.isDeathAvoid && powerUps.research.count && !tech.isDeathAvoidedThisLevel) {
|
if (tech.isDeathAvoid && powerUps.research.count && !tech.isDeathAvoidedThisLevel) {
|
||||||
tech.isDeathAvoidedThisLevel = true
|
tech.isDeathAvoidedThisLevel = true
|
||||||
@@ -1827,7 +1827,7 @@ const m = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "time dilation field",
|
name: "time dilation field",
|
||||||
description: "use <strong class='color-f'>energy</strong> to <strong style='letter-spacing: 1px;'>stop time</strong><br><strong>move</strong> and <strong>fire</strong> while time is stopped",
|
description: "use <strong class='color-f'>energy</strong> to <strong style='letter-spacing: 1px;'>stop time</strong><br><strong>move</strong> and <strong>fire</strong> while time is stopped<br>mobs still do <strong class='color-harm'>harm</strong> while time is stopped",
|
||||||
effect: () => {
|
effect: () => {
|
||||||
// m.fieldMeterColor = "#000"
|
// m.fieldMeterColor = "#000"
|
||||||
m.fieldFire = true;
|
m.fieldFire = true;
|
||||||
@@ -2205,7 +2205,7 @@ const m = {
|
|||||||
// },
|
// },
|
||||||
{
|
{
|
||||||
name: "pilot wave",
|
name: "pilot wave",
|
||||||
description: "use <strong class='color-f'>energy</strong> to push <strong>blocks</strong> with your mouse<br>field <strong>radius</strong> decreases out of <strong>line of sight</strong><br>allows <strong class='color-m'>tech</strong> that normally require other <strong class='color-f'>fields</strong>",
|
description: "use <strong class='color-f'>energy</strong> to push <strong>blocks</strong> with your mouse<br>field <strong>radius</strong> decreases out of <strong>line of sight</strong><br><strong class='color-f'>energy</strong> drain scales with block <strong>mass</strong>",
|
||||||
effect: () => {
|
effect: () => {
|
||||||
m.fieldPhase = 0;
|
m.fieldPhase = 0;
|
||||||
m.fieldPosition = {
|
m.fieldPosition = {
|
||||||
@@ -2238,14 +2238,14 @@ const m = {
|
|||||||
|
|
||||||
if (!m.fieldOn) { // if field was off, and it starting up, teleport to new mouse location
|
if (!m.fieldOn) { // if field was off, and it starting up, teleport to new mouse location
|
||||||
m.fieldOn = true;
|
m.fieldOn = true;
|
||||||
m.fieldPosition = { //smooth the mouse position, set to starting at player
|
// m.fieldPosition = { //smooth the mouse position, set to starting at player
|
||||||
x: m.pos.x,
|
// x: m.pos.x,
|
||||||
y: m.pos.y
|
// y: m.pos.y
|
||||||
}
|
|
||||||
// m.fieldPosition = { //smooth the mouse position
|
|
||||||
// x: simulation.mouseInGame.x,
|
|
||||||
// y: simulation.mouseInGame.y
|
|
||||||
// }
|
// }
|
||||||
|
m.fieldPosition = { //smooth the mouse position, set to mouse's current location
|
||||||
|
x: simulation.mouseInGame.x,
|
||||||
|
y: simulation.mouseInGame.y
|
||||||
|
}
|
||||||
m.lastFieldPosition = { //used to find velocity of field changes
|
m.lastFieldPosition = { //used to find velocity of field changes
|
||||||
x: m.fieldPosition.x,
|
x: m.fieldPosition.x,
|
||||||
y: m.fieldPosition.y
|
y: m.fieldPosition.y
|
||||||
@@ -2255,7 +2255,7 @@ const m = {
|
|||||||
x: m.fieldPosition.x,
|
x: m.fieldPosition.x,
|
||||||
y: m.fieldPosition.y
|
y: m.fieldPosition.y
|
||||||
}
|
}
|
||||||
const smooth = isInMap ? 0.985 : 0.97;
|
const smooth = isInMap ? 0.985 : 0.96;
|
||||||
m.fieldPosition = { //smooth the mouse position
|
m.fieldPosition = { //smooth the mouse position
|
||||||
x: m.fieldPosition.x * smooth + simulation.mouseInGame.x * (1 - smooth),
|
x: m.fieldPosition.x * smooth + simulation.mouseInGame.x * (1 - smooth),
|
||||||
y: m.fieldPosition.y * smooth + simulation.mouseInGame.y * (1 - smooth),
|
y: m.fieldPosition.y * smooth + simulation.mouseInGame.y * (1 - smooth),
|
||||||
@@ -2293,7 +2293,7 @@ const m = {
|
|||||||
//find mouse velocity
|
//find mouse velocity
|
||||||
const diff = Vector.sub(m.fieldPosition, m.lastFieldPosition)
|
const diff = Vector.sub(m.fieldPosition, m.lastFieldPosition)
|
||||||
const speed = Vector.magnitude(diff)
|
const speed = Vector.magnitude(diff)
|
||||||
const velocity = Vector.mult(Vector.normalise(diff), Math.min(speed, 45)) //limit velocity
|
const velocity = Vector.mult(Vector.normalise(diff), Math.min(speed, 40)) //limit velocity
|
||||||
let radius, radiusSmooth
|
let radius, radiusSmooth
|
||||||
if (Matter.Query.ray(map, m.fieldPosition, player.position).length) { //is there something block the player's view of the field
|
if (Matter.Query.ray(map, m.fieldPosition, player.position).length) { //is there something block the player's view of the field
|
||||||
radius = 0
|
radius = 0
|
||||||
@@ -2306,7 +2306,7 @@ const m = {
|
|||||||
|
|
||||||
for (let i = 0, len = body.length; i < len; ++i) {
|
for (let i = 0, len = body.length; i < len; ++i) {
|
||||||
if (Vector.magnitude(Vector.sub(body[i].position, m.fieldPosition)) < m.fieldRadius && !body[i].isNotHoldable) {
|
if (Vector.magnitude(Vector.sub(body[i].position, m.fieldPosition)) < m.fieldRadius && !body[i].isNotHoldable) {
|
||||||
const DRAIN = speed * body[i].mass * 0.000013
|
const DRAIN = speed * body[i].mass * 0.00001 * (1 + m.energy * m.energy) //drain more energy when you have more energy
|
||||||
if (m.energy > DRAIN) {
|
if (m.energy > DRAIN) {
|
||||||
m.energy -= DRAIN;
|
m.energy -= DRAIN;
|
||||||
Matter.Body.setVelocity(body[i], velocity); //give block mouse velocity
|
Matter.Body.setVelocity(body[i], velocity); //give block mouse velocity
|
||||||
@@ -2314,7 +2314,7 @@ const m = {
|
|||||||
// body[i].force.y -= body[i].mass * simulation.g; //remove gravity effects
|
// body[i].force.y -= body[i].mass * simulation.g; //remove gravity effects
|
||||||
//blocks drift towards center of pilot wave
|
//blocks drift towards center of pilot wave
|
||||||
const sub = Vector.sub(m.fieldPosition, body[i].position)
|
const sub = Vector.sub(m.fieldPosition, body[i].position)
|
||||||
const unit = Vector.mult(Vector.normalise(sub), 0.00005 * Vector.magnitude(sub))
|
const unit = Vector.mult(Vector.normalise(sub), body[i].mass * tech.pilotForce * Vector.magnitude(sub))
|
||||||
body[i].force.x += unit.x
|
body[i].force.x += unit.x
|
||||||
body[i].force.y += unit.y - body[i].mass * simulation.g //remove gravity effects
|
body[i].force.y += unit.y - body[i].mass * simulation.g //remove gravity effects
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -2729,14 +2729,14 @@ const spawn = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
shieldingBoss(x, y, radius = 210) {
|
shieldingBoss(x, y, radius = 200) {
|
||||||
mobs.spawn(x, y, 9, radius, "rgb(150, 150, 255)");
|
mobs.spawn(x, y, 9, radius, "rgb(150, 150, 255)");
|
||||||
let me = mob[mob.length - 1];
|
let me = mob[mob.length - 1];
|
||||||
Matter.Body.rotate(me, Math.random() * 2 * Math.PI)
|
Matter.Body.rotate(me, Math.random() * 2 * Math.PI)
|
||||||
// me.stroke = "rgb(220,220,255)"
|
// me.stroke = "rgb(220,220,255)"
|
||||||
me.isBoss = true;
|
me.isBoss = true;
|
||||||
me.cycle = 0
|
me.cycle = 0
|
||||||
me.maxCycles = 120;
|
me.maxCycles = 150;
|
||||||
me.frictionStatic = 0;
|
me.frictionStatic = 0;
|
||||||
me.friction = 0;
|
me.friction = 0;
|
||||||
me.frictionAir = 0.5;
|
me.frictionAir = 0.5;
|
||||||
@@ -2744,7 +2744,7 @@ const spawn = {
|
|||||||
spawn.shield(me, x, y, 1);
|
spawn.shield(me, x, y, 1);
|
||||||
spawn.spawnOrbitals(me, radius + 50 + 200 * Math.random())
|
spawn.spawnOrbitals(me, radius + 50 + 200 * Math.random())
|
||||||
|
|
||||||
Matter.Body.setDensity(me, 0.004); //extra dense //normal is 0.001 //makes effective life much larger
|
Matter.Body.setDensity(me, 0.003); //extra dense //normal is 0.001 //makes effective life much larger
|
||||||
me.onDeath = function() {
|
me.onDeath = function() {
|
||||||
powerUps.spawnBossPowerUp(this.position.x, this.position.y)
|
powerUps.spawnBossPowerUp(this.position.x, this.position.y)
|
||||||
// this.vertices = Matter.Vertices.hull(Matter.Vertices.clockwiseSort(this.vertices)) //helps collisions functions work better after vertex have been changed
|
// this.vertices = Matter.Vertices.hull(Matter.Vertices.clockwiseSort(this.vertices)) //helps collisions functions work better after vertex have been changed
|
||||||
@@ -3158,8 +3158,7 @@ const spawn = {
|
|||||||
this.checkStatus();
|
this.checkStatus();
|
||||||
};
|
};
|
||||||
|
|
||||||
//move shield to the front of the array, so that mob is behind shield graphically
|
mob.unshift(me); //move shield to the front of the array, so that mob is behind shield graphically
|
||||||
mob.unshift(me);
|
|
||||||
|
|
||||||
//swap order of shield and mob, so that mob is behind shield graphically
|
//swap order of shield and mob, so that mob is behind shield graphically
|
||||||
// mob[mob.length - 1] = mob[mob.length - 2];
|
// mob[mob.length - 1] = mob[mob.length - 2];
|
||||||
|
|||||||
28
js/tech.js
28
js/tech.js
@@ -1239,7 +1239,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "orbital-bot upgrade",
|
name: "orbital-bot upgrade",
|
||||||
description: "<strong>convert</strong> all your bots to <strong>orbital-bots</strong><br>increase <strong class='color-d'>damage</strong> by <strong>200%</strong> and <strong>radius</strong> by <strong>30%</strong>",
|
description: "<strong>convert</strong> all your bots to <strong>orbital-bots</strong><br>increase <strong class='color-d'>damage</strong> by <strong>200%</strong> and <strong>radius</strong> by <strong>40%</strong>",
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
frequency: 2,
|
frequency: 2,
|
||||||
@@ -1298,7 +1298,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "dynamo-bot upgrade",
|
name: "dynamo-bot upgrade",
|
||||||
description: "<strong>convert</strong> your bots to <strong>dynamo-bots</strong><br>increase regen to <strong>22</strong> <strong class='color-f'>energy</strong> per second",
|
description: "<strong>convert</strong> your bots to <strong>dynamo-bots</strong><br>increase regen to <strong>20</strong> <strong class='color-f'>energy</strong> per second",
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
frequency: 2,
|
frequency: 2,
|
||||||
@@ -4848,7 +4848,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "degenerate matter",
|
name: "degenerate matter",
|
||||||
description: "reduce <strong class='color-harm'>harm</strong> by <strong>50%</strong> while your <strong class='color-f'>field</strong> is active",
|
description: "reduce <strong class='color-harm'>harm</strong> by <strong>60%</strong> while your <strong class='color-f'>field</strong> is active",
|
||||||
isFieldTech: true,
|
isFieldTech: true,
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
@@ -5005,7 +5005,7 @@
|
|||||||
count: 0,
|
count: 0,
|
||||||
frequency: 2,
|
frequency: 2,
|
||||||
allowed() {
|
allowed() {
|
||||||
return m.fieldUpgrades[m.fieldMode].name === "time dilation field" || m.fieldUpgrades[m.fieldMode].name === "pilot wave"
|
return m.fieldUpgrades[m.fieldMode].name === "time dilation field" // || m.fieldUpgrades[m.fieldMode].name === "pilot wave"
|
||||||
},
|
},
|
||||||
requires: "time dilation field",
|
requires: "time dilation field",
|
||||||
effect() {
|
effect() {
|
||||||
@@ -5029,7 +5029,7 @@
|
|||||||
count: 0,
|
count: 0,
|
||||||
frequency: 2,
|
frequency: 2,
|
||||||
allowed() {
|
allowed() {
|
||||||
return (m.fieldUpgrades[m.fieldMode].name === "time dilation field" || m.fieldUpgrades[m.fieldMode].name === "pilot wave") && tech.energyRegen !== 0;
|
return (m.fieldUpgrades[m.fieldMode].name === "time dilation field") && tech.energyRegen !== 0; //|| m.fieldUpgrades[m.fieldMode].name === "pilot wave"
|
||||||
},
|
},
|
||||||
requires: "time dilation field",
|
requires: "time dilation field",
|
||||||
effect: () => {
|
effect: () => {
|
||||||
@@ -5097,6 +5097,24 @@
|
|||||||
b.setFireCD();
|
b.setFireCD();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "potential well",
|
||||||
|
description: "the force that <strong>pilot wave</strong> generates<br>to <strong>trap blocks</strong> is greatly increased",
|
||||||
|
isFieldTech: true,
|
||||||
|
maxCount: 1,
|
||||||
|
count: 0,
|
||||||
|
frequency: 2,
|
||||||
|
allowed() {
|
||||||
|
return m.fieldUpgrades[m.fieldMode].name === "pilot wave"
|
||||||
|
},
|
||||||
|
requires: "metamaterial cloaking",
|
||||||
|
effect() {
|
||||||
|
tech.pilotForce = 0.0006
|
||||||
|
},
|
||||||
|
remove() {
|
||||||
|
tech.pilotForce = 0.00002
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "cosmic string",
|
name: "cosmic string",
|
||||||
description: "<strong>stun</strong> and do <strong class='color-p'>radioactive</strong> <strong class='color-d'>damage</strong> to <strong>mobs</strong><br>if you tunnel through them with a <strong class='color-worm'>wormhole</strong>",
|
description: "<strong>stun</strong> and do <strong class='color-p'>radioactive</strong> <strong class='color-d'>damage</strong> to <strong>mobs</strong><br>if you tunnel through them with a <strong class='color-worm'>wormhole</strong>",
|
||||||
|
|||||||
23
todo.txt
23
todo.txt
@@ -1,15 +1,13 @@
|
|||||||
******************************************************** NEXT PATCH ********************************************************
|
******************************************************** NEXT PATCH ********************************************************
|
||||||
|
|
||||||
spammable methods of energy generation no longer work while immune to damage
|
pilot is back to it's previous speed, and spawning at mouse
|
||||||
rail-gun, flip-flop, dynamo-bots, ice-IX, energy siphon
|
pilot wave uses 50% less energy when you are low on energy, but it uses more energy then normal when you have more energy
|
||||||
|
pilot wave tech
|
||||||
|
lost: time crystals, Lorentz transformation, annihilation
|
||||||
|
gained: degenerate matter - 60% harm reduction while field is active
|
||||||
|
tech: potential well - blocks in pilot wave drift into the center of the field with a much higher force
|
||||||
|
this lets you hold larger blocks and flick them much faster
|
||||||
|
|
||||||
pilot wave follows the mouse a bit slower
|
|
||||||
(I think this is actually a buff, because blocks stay in the field better)
|
|
||||||
a newly clicked pilot wave now begins at the player, not the mouse
|
|
||||||
(this is just because it looks cool)
|
|
||||||
|
|
||||||
tech: many worlds, now only spawns 1 tech
|
|
||||||
(use to spawn a heal, ammo, research too)
|
|
||||||
|
|
||||||
******************************************************** BUGS ********************************************************
|
******************************************************** BUGS ********************************************************
|
||||||
|
|
||||||
@@ -57,6 +55,13 @@ is there a way to check if the player is stuck inside the map or block
|
|||||||
|
|
||||||
******************************************************** TODO ********************************************************
|
******************************************************** TODO ********************************************************
|
||||||
|
|
||||||
|
Make ice crystal + rivet gun/needle gun launch freezing rivets/needles with increased energy drain
|
||||||
|
|
||||||
|
WIMPS are cool, but the 2-3 research isn't enough incentive
|
||||||
|
|
||||||
|
tech: pilot wave is projected from the player, not the mouse
|
||||||
|
give pilot wave a buff?
|
||||||
|
|
||||||
tech: MACHO - spawn a mob like WIMP that follows you and gives you a bonus
|
tech: MACHO - spawn a mob like WIMP that follows you and gives you a bonus
|
||||||
if it touches WIMP they explode
|
if it touches WIMP they explode
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user