restitution doesn't work with pilot wave
pilot wave energy is back to it's old energy settings tech: restitution - now only triggers power ups from blocks thrown by the player (this makes pilot wave and naturally falling blocks not spawn power ups. flywheel will work if a block was thrown in the last 3 seconds) standing wave harmonic has reduced blocking recoil
This commit is contained in:
@@ -190,7 +190,7 @@ function collisionChecks(event) {
|
||||
let dmg = 0.075 * b.dmgScale * v * obj.mass * tech.throwChargeRate;
|
||||
if (mob[k].isShielded) dmg *= 0.6
|
||||
mob[k].damage(dmg, true);
|
||||
if (tech.isBlockPowerUps && !mob[k].alive && mob[k].isDropPowerUp) {
|
||||
if (tech.isBlockPowerUps && !mob[k].alive && mob[k].isDropPowerUp && m.throwCycle > m.cycle) {
|
||||
let type = tech.isEnergyNoAmmo ? "heal" : "ammo"
|
||||
if (Math.random() < 0.4) {
|
||||
type = "heal"
|
||||
|
||||
@@ -15,12 +15,12 @@ const level = {
|
||||
// level.difficultyIncrease(30)
|
||||
// simulation.zoomScale = 1000;
|
||||
// simulation.setZoom();
|
||||
m.setField("pilot wave")
|
||||
// m.setField("pilot wave")
|
||||
// b.giveGuns("wave beam")
|
||||
// b.giveGuns("laser")
|
||||
// tech.isExplodeRadio = true
|
||||
// tech.giveTech("pulse")
|
||||
tech.giveTech("potential well")
|
||||
// tech.giveTech("potential well")
|
||||
// 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("bound state")
|
||||
|
||||
18
js/player.js
18
js/player.js
@@ -937,6 +937,7 @@ const m = {
|
||||
holdingTarget: null,
|
||||
timeSkipLastCycle: 0,
|
||||
// these values are set on reset by setHoldDefaults()
|
||||
blockingRecoil: 4,
|
||||
grabPowerUpRange2: 0,
|
||||
isFieldActive: false,
|
||||
fieldRange: 155,
|
||||
@@ -978,6 +979,7 @@ const m = {
|
||||
m.duplicateChance = 0
|
||||
powerUps.setDo();
|
||||
m.grabPowerUpRange2 = 156000;
|
||||
m.blockingRecoil = 4;
|
||||
m.fieldRange = 155;
|
||||
m.fieldFire = false;
|
||||
m.fieldCDcycle = 0;
|
||||
@@ -1174,6 +1176,7 @@ const m = {
|
||||
}
|
||||
|
||||
m.throwCharge = 0;
|
||||
m.throwCycle = m.cycle + 180 //used to detect if a block was thrown in the last 3 seconds
|
||||
Matter.Body.setVelocity(m.holdingTarget, {
|
||||
x: player.velocity.x * 0.5 + Math.cos(m.angle) * speed,
|
||||
y: player.velocity.y * 0.5 + Math.sin(m.angle) * speed
|
||||
@@ -1310,13 +1313,13 @@ const m = {
|
||||
});
|
||||
if (m.crouch) {
|
||||
Matter.Body.setVelocity(player, {
|
||||
x: player.velocity.x + 0.4 * unit.x * massRoot,
|
||||
y: player.velocity.y + 0.4 * unit.y * massRoot
|
||||
x: player.velocity.x + 0.1 * m.blockingRecoil * unit.x * massRoot,
|
||||
y: player.velocity.y + 0.1 * m.blockingRecoil * unit.y * massRoot
|
||||
});
|
||||
} else {
|
||||
Matter.Body.setVelocity(player, {
|
||||
x: player.velocity.x + 5 * unit.x * massRoot,
|
||||
y: player.velocity.y + 5 * unit.y * massRoot
|
||||
x: player.velocity.x + m.blockingRecoil * unit.x * massRoot,
|
||||
y: player.velocity.y + m.blockingRecoil * unit.y * massRoot
|
||||
});
|
||||
}
|
||||
} else {
|
||||
@@ -1488,11 +1491,12 @@ const m = {
|
||||
},
|
||||
{
|
||||
name: "standing wave harmonics",
|
||||
description: "<strong>3</strong> oscillating <strong>shields</strong> are permanently active<br><strong>blocking</strong> drains <strong class='color-f'>energy</strong> with no <strong>cool down</strong><br>reduce <strong class='color-harm'>harm</strong> by <strong>25%</strong>",
|
||||
description: "<strong>3</strong> oscillating <strong>shields</strong> are permanently active<br><strong>blocking</strong> drains <strong class='color-f'>energy</strong> with no <strong>cool down</strong><br>reduce <strong class='color-harm'>harm</strong> and blocking <strong>recoil</strong> by <strong>25%</strong>",
|
||||
effect: () => {
|
||||
// m.fieldHarmReduction = 0.80;
|
||||
m.fieldBlockCD = 0;
|
||||
m.fieldHarmReduction = 0.75;
|
||||
m.blockingRecoil = 1 //4 is normal
|
||||
m.fieldRange = 175 + 175 * 0.25 * tech.frequencyResonance
|
||||
m.fieldShieldingScale = Math.pow(0.5, tech.frequencyResonance)
|
||||
m.hold = function() {
|
||||
@@ -2306,7 +2310,7 @@ const m = {
|
||||
|
||||
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) {
|
||||
const DRAIN = speed * body[i].mass * 0.00001 * (1 + m.energy * m.energy) //drain more energy when you have more energy
|
||||
const DRAIN = speed * body[i].mass * 0.000013 // * (1 + m.energy * m.energy) //drain more energy when you have more energy
|
||||
if (m.energy > DRAIN) {
|
||||
m.energy -= DRAIN;
|
||||
Matter.Body.setVelocity(body[i], velocity); //give block mouse velocity
|
||||
@@ -2983,7 +2987,7 @@ const m = {
|
||||
let dmg = 0.05 * b.dmgScale * v * obj.mass * tech.throwChargeRate;
|
||||
if (mob[k].isShielded) dmg *= 0.35
|
||||
mob[k].damage(dmg, true);
|
||||
if (tech.isBlockPowerUps && !mob[k].alive && mob[k].isDropPowerUp) {
|
||||
if (tech.isBlockPowerUps && !mob[k].alive && mob[k].isDropPowerUp && m.throwCycle > m.cycle) {
|
||||
let type = tech.isEnergyNoAmmo ? "heal" : "ammo"
|
||||
if (Math.random() < 0.4) {
|
||||
type = "heal"
|
||||
|
||||
@@ -10,8 +10,8 @@ const spawn = {
|
||||
"stabber", "stabber",
|
||||
"launcher", "launcher",
|
||||
"springer", "springer",
|
||||
"sucker", "sucker",
|
||||
"pulsar", "pulsar",
|
||||
"sucker",
|
||||
"chaser",
|
||||
"sniper",
|
||||
"spinner",
|
||||
|
||||
@@ -84,6 +84,8 @@
|
||||
if (options.length > 0) {
|
||||
let newTech = options[Math.floor(Math.random() * options.length)]
|
||||
tech.giveTech(newTech)
|
||||
simulation.makeTextLog(`<span class='color-var'>tech</span>.giveTech("<span class='color-text'>${tech.tech[newTech].name}</span>")<em> //random tech</em>`);
|
||||
|
||||
}
|
||||
} else {
|
||||
if (isNaN(index)) { //find index by name
|
||||
@@ -98,6 +100,7 @@
|
||||
if (!found) return //if name not found don't give any tech
|
||||
}
|
||||
if (tech.isMetaAnalysis && tech.tech[index].isJunk) {
|
||||
simulation.makeTextLog(`//tech: meta-analysis replaced junk tech with random tech`);
|
||||
tech.giveTech('random')
|
||||
for (let i = 0; i < 2; i++) powerUps.spawn(m.pos.x + 10 * Math.random(), m.pos.y + 10 * Math.random(), "research");
|
||||
return
|
||||
@@ -1480,7 +1483,7 @@
|
||||
},
|
||||
{
|
||||
name: "restitution",
|
||||
description: "mobs killed by collisions with <strong>blocks</strong><br>spawn a <strong class='color-h'>heal</strong>, <strong class='color-g'>ammo</strong>, or <strong class='color-r'>research</strong>",
|
||||
description: "if a <strong>block</strong> you threw kills a mob<br>spawn a <strong class='color-h'>heal</strong>, <strong class='color-g'>ammo</strong>, or <strong class='color-r'>research</strong>",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 4,
|
||||
@@ -3922,7 +3925,7 @@
|
||||
},
|
||||
{
|
||||
name: "water shielding",
|
||||
description: "increase <strong>neutron bomb's</strong> range by <strong>20%</strong><br>player is <strong>immune</strong> to its harmful effects",
|
||||
description: "increase <strong>neutron bomb's</strong> range by <strong>20%</strong><br>you are <strong>immune</strong> to its harmful effects",
|
||||
isGunTech: true,
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
@@ -4067,7 +4070,7 @@
|
||||
},
|
||||
{
|
||||
name: "diplochory",
|
||||
description: "<strong class='color-p' style='letter-spacing: 2px;'>spores</strong> use the player for <strong>dispersal</strong><br>until they <strong>locate</strong> a viable host",
|
||||
description: "<strong class='color-p' style='letter-spacing: 2px;'>spores</strong> use you for <strong>dispersal</strong><br>until they <strong>locate</strong> a viable host",
|
||||
isGunTech: true,
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
|
||||
@@ -165,7 +165,7 @@ summary {
|
||||
z-index: 12;
|
||||
background-color: #444;
|
||||
display: none;
|
||||
grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
|
||||
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
|
||||
grid-auto-rows: minmax(auto, auto);
|
||||
font-size: 1.3em;
|
||||
/* box-shadow: 0px 0px 40px 20px rgba(255, 255, 255, 0.25); */
|
||||
@@ -200,7 +200,7 @@ summary {
|
||||
margin: 0px;
|
||||
|
||||
display: none;
|
||||
grid-template-columns: 316px;
|
||||
grid-template-columns: 320px;
|
||||
/* grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); */
|
||||
grid-auto-rows: minmax(auto, auto);
|
||||
grid-gap: 0px;
|
||||
@@ -239,7 +239,7 @@ summary {
|
||||
background-color: var(--build-bg-color);
|
||||
|
||||
display: none;
|
||||
grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
|
||||
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
|
||||
grid-auto-flow: row;
|
||||
grid-auto-rows: minmax(auto, auto);
|
||||
grid-gap: 0px;
|
||||
|
||||
17
todo.txt
17
todo.txt
@@ -1,13 +1,10 @@
|
||||
******************************************************** NEXT PATCH ********************************************************
|
||||
|
||||
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
|
||||
pilot wave energy is back to it's old energy settings
|
||||
tech: restitution - now only triggers power ups from blocks thrown by the player
|
||||
(this makes pilot wave and naturally falling blocks not spawn power ups. flywheel will work if a block was thrown in the last 3 seconds)
|
||||
|
||||
standing wave harmonic has reduced blocking recoil
|
||||
|
||||
******************************************************** BUGS ********************************************************
|
||||
|
||||
@@ -25,8 +22,6 @@ tech: strange attractor before at least 1 other tech
|
||||
crashed on this
|
||||
https://landgreen.github.io/sidescroller/index.html?&gun0=rail%20gun&tech1=mass%20driver&tech2=restitution&tech3=flywheel&tech4=Pauli%20exclusion&tech5=mass-energy%20equivalence&tech6=1st%20ionization%20energy&tech7=electrolytes&tech8=negative%20feedback&tech9=entropy%20exchange&tech10=anthropic%20principle&tech11=renormalization&tech12=Bayesian%20statistics&tech13=bubble%20fusion&tech14=replication&tech15=replication&tech16=futures%20exchange&tech17=commodities%20exchange&tech18=correlated%20damage&tech19=parthenogenesis&tech21=cardinality&tech22=half-wave%20rectifier&tech23=pair%20production&tech24=Lorentz%20transformation&tech25=time%20crystals&tech26=undefined&tech27=undefined&tech28=undefined&tech29=undefined&tech30=undefined&tech31=undefined&tech32=undefined&field=pilot%20wave&difficulty=6
|
||||
|
||||
increase the width on the grid by a few pixels so that very small screens or people with odd fonts don't goto a new line
|
||||
|
||||
you have to press z once to get copy to work for simulation.enableConstructMode() sometimes
|
||||
not sure how to reproduce, but it happens often on the first draw
|
||||
|
||||
@@ -55,9 +50,11 @@ is there a way to check if the player is stuck inside the map or block
|
||||
|
||||
******************************************************** TODO ********************************************************
|
||||
|
||||
pause should show the last in game console message
|
||||
|
||||
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
|
||||
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?
|
||||
|
||||
Reference in New Issue
Block a user