pseudoscience

tech: pseudoscience - renewing power up choices costs no research, but adds 1-5 JUNK to the potential tech pool

>update text now shows the last 20 updates and has a scroll bar
This commit is contained in:
landgreen
2021-07-01 07:41:16 -07:00
parent a2b56d1f7e
commit 8b73c9ffc4
8 changed files with 69 additions and 68 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@@ -202,7 +202,7 @@
<div> <div>
<details id="updates"> <details id="updates">
<summary>updates</summary> <summary>updates</summary>
<div id="updates-div" class="details-div" style="font-size: 70%;"> <div id="updates-div" class="details-div" style="font-size: 70%;height: 400px;overflow: scroll;">
</div> </div>
</details> </details>

View File

@@ -1152,7 +1152,7 @@ document.getElementById("updates").addEventListener("toggle", function() {
loadJSON('https://api.github.com/repos/landgreen/n-gon/commits', loadJSON('https://api.github.com/repos/landgreen/n-gon/commits',
function(data) { function(data) {
// console.log(data) // console.log(data)
for (let i = 0, len = 3; i < len; i++) { for (let i = 0, len = 20; i < len; i++) {
text += "<strong>" + data[i].commit.author.date.substr(0, 10) + "</strong> - "; //+ "<br>" text += "<strong>" + data[i].commit.author.date.substr(0, 10) + "</strong> - "; //+ "<br>"
text += data[i].commit.message text += data[i].commit.message
if (i < len - 1) text += "<hr>" if (i < len - 1) text += "<hr>"

View File

@@ -9,7 +9,6 @@ const level = {
levelsCleared: 0, levelsCleared: 0,
playableLevels: ["skyscrapers", "rooftops", "warehouse", "highrise", "office", "aerie", "satellite", "sewers", "testChamber"], playableLevels: ["skyscrapers", "rooftops", "warehouse", "highrise", "office", "aerie", "satellite", "sewers", "testChamber"],
levels: [], levels: [],
start() { start() {
if (level.levelsCleared === 0) { //this code only runs on the first level if (level.levelsCleared === 0) { //this code only runs on the first level
// simulation.enableConstructMode() //used to build maps in testing mode // simulation.enableConstructMode() //used to build maps in testing mode

View File

@@ -1572,7 +1572,7 @@ const m = {
if (input.field) { if (input.field) {
const oldHarmonicRadius = m.harmonicRadius const oldHarmonicRadius = m.harmonicRadius
m.harmonicRadius = 0.985 * m.harmonicRadius + 0.015 * 2.5 m.harmonicRadius = 0.985 * m.harmonicRadius + 0.015 * 2.5
m.energy -= 0.45 * (m.harmonicRadius - oldHarmonicRadius) m.energy -= 0.35 * (m.harmonicRadius - oldHarmonicRadius)
} else { } else {
m.harmonicRadius = 0.997 * m.harmonicRadius + 0.003 * 1 m.harmonicRadius = 0.997 * m.harmonicRadius + 0.003 * 1
} }
@@ -2488,9 +2488,9 @@ const m = {
}, },
{ {
name: "wormhole", name: "wormhole",
description: "use <strong class='color-f'>energy</strong> to <strong>tunnel</strong> through a <strong class='color-worm'>wormhole</strong><br><strong class='color-worm'>wormholes</strong> attract <strong class='color-block'>blocks</strong> and power ups<br><strong>10%</strong> chance to <strong class='color-dup'>duplicate</strong> spawned <strong>power ups</strong>", //<br>bullets may also traverse <strong class='color-worm'>wormholes</strong> description: "use <strong class='color-f'>energy</strong> to <strong>tunnel</strong> through a <strong class='color-worm'>wormhole</strong><br><strong class='color-worm'>wormholes</strong> attract <strong class='color-block'>blocks</strong> and power ups<br><strong>11%</strong> chance to <strong class='color-dup'>duplicate</strong> spawned <strong>power ups</strong>", //<br>bullets may also traverse <strong class='color-worm'>wormholes</strong>
effect: function() { effect: function() {
m.duplicateChance = 0.1 m.duplicateChance = 0.11
powerUps.setDo(); //needed after adjusting duplication chance powerUps.setDo(); //needed after adjusting duplication chance
m.hold = function() { m.hold = function() {
@@ -2539,7 +2539,7 @@ const m = {
dyP = dyP2 dyP = dyP2
} }
dist2 = dxP * dxP + dyP * dyP; dist2 = dxP * dxP + dyP * dyP;
if (dist2 < 600000 && !(m.health === m.maxHealth && powerUp[i].name === "heal")) { if (dist2 < 600000) { //&& !(m.health === m.maxHealth && powerUp[i].name === "heal")
powerUp[i].force.x += 4 * (dxP / dist2) * powerUp[i].mass; // float towards hole powerUp[i].force.x += 4 * (dxP / dist2) * powerUp[i].mass; // float towards hole
powerUp[i].force.y += 4 * (dyP / dist2) * powerUp[i].mass - powerUp[i].mass * simulation.g; //negate gravity powerUp[i].force.y += 4 * (dyP / dist2) * powerUp[i].mass - powerUp[i].mass * simulation.g; //negate gravity
Matter.Body.setVelocity(powerUp[i], { //extra friction Matter.Body.setVelocity(powerUp[i], { //extra friction

View File

@@ -248,7 +248,11 @@ const powerUps = {
} }
}, },
use(type) { //runs when you actually research a list of selections, type can be field, gun, or tech use(type) { //runs when you actually research a list of selections, type can be field, gun, or tech
if (tech.isJunkResearch) {
tech.addJunkTechToPool(tech.junkResearchNumber)
} else {
powerUps.research.changeRerolls(-1) powerUps.research.changeRerolls(-1)
}
// simulation.makeTextLog(`<span class='color-var'>m</span>.<span class='color-r'>research</span><span class='color-symbol'>--</span> // simulation.makeTextLog(`<span class='color-var'>m</span>.<span class='color-r'>research</span><span class='color-symbol'>--</span>
// <br>${powerUps.research.count}`) // <br>${powerUps.research.count}`)
if (tech.isBanish && type === 'tech') { // banish researched tech if (tech.isBanish && type === 'tech') { // banish researched tech
@@ -402,7 +406,12 @@ const powerUps = {
powerUps.field.choiceLog.push(choice2) powerUps.field.choiceLog.push(choice2)
powerUps.field.choiceLog.push(choice3) powerUps.field.choiceLog.push(choice3)
if (powerUps.research.count) { if (tech.isJunkResearch) {
tech.junkResearchNumber = Math.ceil(5 * Math.random())
text += `<div class="choose-grid-module" onclick="powerUps.research.use('field')"><div class="grid-title"> <span style="position:relative;">`
for (let i = 0; i < tech.junkResearchNumber; i++) text += `<div class="circle-grid junk" style="position:absolute; top:0; left:${15*i}px ;opacity:0.8; border: 1px #fff solid;"></div>`
text += `</span>&nbsp; <span class='research-select'>pseudoscience</span></div></div>`
} else if (powerUps.research.count) {
text += `<div class="choose-grid-module" onclick="powerUps.research.use('field')"><div class="grid-title"> <span style="position:relative;">` 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>` 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>`
@@ -510,26 +519,15 @@ const powerUps = {
powerUps.tech.choiceLog.push(choice3) powerUps.tech.choiceLog.push(choice3)
// if (powerUps.research.count) text += `<div class="choose-grid-module" onclick="powerUps.research.use('tech')"><div class="grid-title"><div class="circle-grid research"></div> &nbsp; research <span class="research-select">${powerUps.research.count}</span></div></div>` // if (powerUps.research.count) text += `<div class="choose-grid-module" onclick="powerUps.research.use('tech')"><div class="grid-title"><div class="circle-grid research"></div> &nbsp; research <span class="research-select">${powerUps.research.count}</span></div></div>`
if (powerUps.research.count) { if (tech.isJunkResearch) {
tech.junkResearchNumber = Math.ceil(5 * Math.random())
text += `<div class="choose-grid-module" onclick="powerUps.research.use('tech')"><div class="grid-title"> <span style="position:relative;">`
for (let i = 0; i < tech.junkResearchNumber; i++) text += `<div class="circle-grid junk" style="position:absolute; top:0; left:${15*i}px ;opacity:0.8; border: 1px #fff solid;"></div>`
text += `</span>&nbsp; <span class='research-select'>pseudoscience</span></div></div>`
} else if (powerUps.research.count) {
text += `<div class="choose-grid-module" onclick="powerUps.research.use('tech')"><div class="grid-title"> <span style="position:relative;">` 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>` 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 += `
// <div class="choose-grid-module" onclick="powerUps.research.use('tech')"><div class="grid-title">
// <span style="position:relative;">
// <div class="circle-grid research" style="position:absolute; top:0; left:5px;opacity:0.8; border: 1px #fff solid;"></div>
// <div class="circle-grid research" style="position:absolute; top:0; left:5px;opacity:0.8; border: 1px #fff solid;"></div>
// </span>
// &nbsp; <span class='research-select'>research</span></div></div>`
// text += `<div class="choose-grid-module" onclick="powerUps.choose('tech',${choose})"><div class="grid-title">
// <span style="position:relative;">
// <div class="circle-grid tech" style="position:absolute; top:0; left:0;opacity:0.8;"></div>
// <div class="circle-grid gun" style="position:absolute; top:0; left:10px; opacity:0.65;"></div>
// </span>
// &nbsp; &nbsp; &nbsp; &nbsp; ${tech.tech[choose].name} ${isCount}</div>${tech.tech[choose].description}</div></div>`
} }
document.getElementById("choose-grid").innerHTML = text document.getElementById("choose-grid").innerHTML = text
@@ -612,7 +610,13 @@ const powerUps = {
powerUps.gun.choiceLog.push(choice2) powerUps.gun.choiceLog.push(choice2)
powerUps.gun.choiceLog.push(choice3) powerUps.gun.choiceLog.push(choice3)
// if (powerUps.research.count) text += `<div class="choose-grid-module" onclick="powerUps.research.use('gun')"><div class="grid-title"><div class="circle-grid research"></div> &nbsp; research <span class="research-select">${powerUps.research.count}</span></div></div>` // if (powerUps.research.count) text += `<div class="choose-grid-module" onclick="powerUps.research.use('gun')"><div class="grid-title"><div class="circle-grid research"></div> &nbsp; research <span class="research-select">${powerUps.research.count}</span></div></div>`
if (powerUps.research.count) {
if (tech.isJunkResearch) {
tech.junkResearchNumber = Math.ceil(5 * Math.random())
text += `<div class="choose-grid-module" onclick="powerUps.research.use('gun')"><div class="grid-title"> <span style="position:relative;">`
for (let i = 0; i < tech.junkResearchNumber; i++) text += `<div class="circle-grid junk" style="position:absolute; top:0; left:${15*i}px ;opacity:0.8; border: 1px #fff solid;"></div>`
text += `</span>&nbsp; <span class='research-select'>pseudoscience</span></div></div>`
} else if (powerUps.research.count) {
text += `<div class="choose-grid-module" onclick="powerUps.research.use('gun')"><div class="grid-title"> <span style="position:relative;">` 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>` 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>`

View File

@@ -2799,6 +2799,24 @@
tech.isRerollDamage = false; tech.isRerollDamage = false;
} }
}, },
{
name: "pseudoscience",
description: "renewing power up choices costs no <strong class='color-r'>research</strong><br>but adds <strong>1-5</strong> <strong class='color-j'>JUNK</strong> to the potential <strong class='color-m'>tech</strong> pool",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return tech.isResearchBoss || tech.isMetaAnalysis || tech.isRerollBots || tech.isDeathAvoid || tech.isRerollDamage || build.isExperimentSelection
},
requires: "abiogenesis, meta-analysis, bot fabrication, anthropic principle, or Bayesian statistics",
effect() {
tech.isJunkResearch = true;
},
remove() {
tech.isJunkResearch = false;
}
},
{ {
name: "Born rule", name: "Born rule",
description: "<strong>remove</strong> all current <strong class='color-m'>tech</strong><br>spawn new <strong class='color-m'>tech</strong> to replace them", description: "<strong>remove</strong> all current <strong class='color-m'>tech</strong><br>spawn new <strong class='color-m'>tech</strong> to replace them",
@@ -3184,18 +3202,6 @@
} }
} }
}, },
// allowed() {
// return (b.totalBots() > 1 && powerUps.research.count > 0) || build.isExperimentSelection
// },
// requires: "at least 2 bots, 1 research",
// effect: () => {
// if (powerUps.research.count > 0) {
// powerUps.research.changeRerolls(-1)
// b.randomBot()
// }
{ {
name: "backward induction", name: "backward induction",
description: "use <strong>2</strong> <strong class='color-r'>research</strong> to <strong>choose</strong> all the unchosen<br> <strong class='color-m'>tech</strong> from your previous <strong class='color-m'>tech</strong> selection", description: "use <strong>2</strong> <strong class='color-r'>research</strong> to <strong>choose</strong> all the unchosen<br> <strong class='color-m'>tech</strong> from your previous <strong class='color-m'>tech</strong> selection",
@@ -6930,7 +6936,7 @@
remove() {} remove() {}
}, },
{ {
name: "quantum black hole", name: "quantum 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>1</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, maxCount: 9,
count: 0, count: 0,
@@ -7293,5 +7299,7 @@
isDroneRadioactive: null, isDroneRadioactive: null,
droneRadioDamage: null, droneRadioDamage: null,
isFoamTeleport: null, isFoamTeleport: null,
isResearchBoss: null isResearchBoss: null,
isJunkResearch: null,
junkResearchNumber: null
} }

View File

@@ -1,31 +1,32 @@
******************************************************** NEXT PATCH ******************************************************** ******************************************************** NEXT PATCH ********************************************************
tech: abiogenesis - spawn a second level boss on each level, but costs 5 research or if you don't have the research add 49 JUNK tech to the pool tech: pseudoscience - renewing power up choices costs no research, but adds 1-5 JUNK to the potential tech pool
note to level builders I rewrote the add duplicate boss code in all levels: spawn.secondaryBossChance(x,y)
foam tech: uncertainty principle - foam bullets change position randomly, increase foam damage by 66% >update text now shows the last 20 updates and has a scroll bar
throwing blocks now charges faster with reduced fire cooldown
tech renormalization now has a 40% chance to refund a research (was 37%)
performance- now precalculate player gradient fill
******************************************************** TODO ******************************************************** ******************************************************** TODO ********************************************************
should ammo apply to all guns, or just one of your guns? add a short pause before selection menu pops up
if one gun only, it would make multi-gun builds weaker this stops a second selection popping up and a possible wrong selection
make a tech that improves all charge guns
for: pulse, foam, rail gun
effect:
faster charge rate?
fire speed already does that...
harm reduction while charging
less ammo/energy used while charging?
researching new tech doesn't cost any research, but adds 5-10 JUNK to the potential tech pool
in testing mode console log the body you click on in testing mode console log the body you click on
throwing a block removes the block and rewinds time 10 seconds (including health and energy)
requires CPT, CPT gun, time dilation?
tech plasma : plasma length increases then decreases as you hold down the field button (like stabbing with a spear) tech plasma : plasma length increases then decreases as you hold down the field button (like stabbing with a spear)
grows to 1.5 longer after 0.3 seconds, then returns to normal length over 1 second, until field is pressed again grows to 1.5 longer after 0.3 seconds, then returns to normal length over 1 second, until field is pressed again
extra energy is drained when field is longer extra energy is drained when field is longer
energy conservation 6% damage recovered as energy energy conservation 6% damage recovered as energy
add a negative effect: there is space for a negative effect in the text
junk tech
Weak Anthropic Principle: you get a second chance at life, but .... Weak Anthropic Principle: you get a second chance at life, but ....
@@ -35,8 +36,6 @@ tech: use the ability for power ups to have custom code
attracted to other power ups attracted to other power ups
explode if they touch? explode if they touch?
tech: wormhole through walls?
pause should show the last in game console message pause should show the last in game console message
nail-gun, or .... nail-gun, or ....
@@ -47,14 +46,6 @@ nail-gun, or ....
current location or location when fired? current location or location when fired?
explode when turning back explode when turning back
make a tech that improves all charge guns
for: pulse, foam, rail gun
effect:
faster charge rate?
fire speed already does that...
harm reduction while charging
less ammo/energy used while charging?
apply the new gun.do functions to other guns apply the new gun.do functions to other guns
rail gun rail gun
crouching missile? crouching missile?
@@ -78,9 +69,6 @@ add back in gamepad support
but does anyone care? but does anyone care?
https://github.com/landgreen/landgreen.github.io/search?q=gamepadconnected https://github.com/landgreen/landgreen.github.io/search?q=gamepadconnected
rename intro level to something lore related
RPG default or tech: grenades detonate on your cursor / where your cursor was when they were fired RPG default or tech: grenades detonate on your cursor / where your cursor was when they were fired
tech: time dilation - when you exit time dilation rewind to the state you entered tech: time dilation - when you exit time dilation rewind to the state you entered
@@ -206,6 +194,8 @@ is there a way to check if the player is stuck inside the map or block
******************************************************** LEVELS ******************************************************** ******************************************************** LEVELS ********************************************************
rename intro level to something lore related
labs - procedural generation labs - procedural generation
bugs bugs
mob spawns shouldn't be based on probability? mob spawns shouldn't be based on probability?