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:
@@ -202,7 +202,7 @@
|
||||
<div>
|
||||
<details id="updates">
|
||||
<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>
|
||||
</details>
|
||||
|
||||
@@ -1152,7 +1152,7 @@ document.getElementById("updates").addEventListener("toggle", function() {
|
||||
loadJSON('https://api.github.com/repos/landgreen/n-gon/commits',
|
||||
function(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 += data[i].commit.message
|
||||
if (i < len - 1) text += "<hr>"
|
||||
|
||||
@@ -9,7 +9,6 @@ const level = {
|
||||
levelsCleared: 0,
|
||||
playableLevels: ["skyscrapers", "rooftops", "warehouse", "highrise", "office", "aerie", "satellite", "sewers", "testChamber"],
|
||||
levels: [],
|
||||
|
||||
start() {
|
||||
if (level.levelsCleared === 0) { //this code only runs on the first level
|
||||
// simulation.enableConstructMode() //used to build maps in testing mode
|
||||
|
||||
@@ -1572,7 +1572,7 @@ const m = {
|
||||
if (input.field) {
|
||||
const oldHarmonicRadius = m.harmonicRadius
|
||||
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 {
|
||||
m.harmonicRadius = 0.997 * m.harmonicRadius + 0.003 * 1
|
||||
}
|
||||
@@ -2488,9 +2488,9 @@ const m = {
|
||||
},
|
||||
{
|
||||
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() {
|
||||
m.duplicateChance = 0.1
|
||||
m.duplicateChance = 0.11
|
||||
powerUps.setDo(); //needed after adjusting duplication chance
|
||||
|
||||
m.hold = function() {
|
||||
@@ -2539,7 +2539,7 @@ const m = {
|
||||
dyP = dyP2
|
||||
}
|
||||
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.y += 4 * (dyP / dist2) * powerUp[i].mass - powerUp[i].mass * simulation.g; //negate gravity
|
||||
Matter.Body.setVelocity(powerUp[i], { //extra friction
|
||||
|
||||
@@ -248,7 +248,11 @@ const powerUps = {
|
||||
}
|
||||
},
|
||||
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)
|
||||
}
|
||||
// simulation.makeTextLog(`<span class='color-var'>m</span>.<span class='color-r'>research</span><span class='color-symbol'>--</span>
|
||||
// <br>${powerUps.research.count}`)
|
||||
if (tech.isBanish && type === 'tech') { // banish researched tech
|
||||
@@ -402,7 +406,12 @@ const powerUps = {
|
||||
powerUps.field.choiceLog.push(choice2)
|
||||
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> <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;">`
|
||||
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> <span class='research-select'>research</span></div></div>`
|
||||
@@ -510,26 +519,15 @@ const powerUps = {
|
||||
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> 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> <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;">`
|
||||
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> <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>
|
||||
// <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>
|
||||
// ${tech.tech[choose].name} ${isCount}</div>${tech.tech[choose].description}</div></div>`
|
||||
}
|
||||
|
||||
document.getElementById("choose-grid").innerHTML = text
|
||||
@@ -612,7 +610,13 @@ const powerUps = {
|
||||
powerUps.gun.choiceLog.push(choice2)
|
||||
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> 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> <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;">`
|
||||
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> <span class='research-select'>research</span></div></div>`
|
||||
|
||||
36
js/tech.js
36
js/tech.js
@@ -2799,6 +2799,24 @@
|
||||
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",
|
||||
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",
|
||||
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() {}
|
||||
},
|
||||
{
|
||||
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>",
|
||||
maxCount: 9,
|
||||
count: 0,
|
||||
@@ -7293,5 +7299,7 @@
|
||||
isDroneRadioactive: null,
|
||||
droneRadioDamage: null,
|
||||
isFoamTeleport: null,
|
||||
isResearchBoss: null
|
||||
isResearchBoss: null,
|
||||
isJunkResearch: null,
|
||||
junkResearchNumber: null
|
||||
}
|
||||
44
todo.txt
44
todo.txt
@@ -1,31 +1,32 @@
|
||||
******************************************************** 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
|
||||
note to level builders I rewrote the add duplicate boss code in all levels: spawn.secondaryBossChance(x,y)
|
||||
tech: pseudoscience - renewing power up choices costs no research, but adds 1-5 JUNK to the potential tech pool
|
||||
|
||||
foam tech: uncertainty principle - foam bullets change position randomly, increase foam damage by 66%
|
||||
|
||||
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
|
||||
>update text now shows the last 20 updates and has a scroll bar
|
||||
|
||||
******************************************************** TODO ********************************************************
|
||||
|
||||
should ammo apply to all guns, or just one of your guns?
|
||||
if one gun only, it would make multi-gun builds weaker
|
||||
add a short pause before selection menu pops up
|
||||
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
|
||||
|
||||
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)
|
||||
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
|
||||
|
||||
energy conservation 6% damage recovered as energy
|
||||
add a negative effect:
|
||||
junk tech
|
||||
there is space for a negative effect in the text
|
||||
|
||||
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
|
||||
explode if they touch?
|
||||
|
||||
tech: wormhole through walls?
|
||||
|
||||
pause should show the last in game console message
|
||||
|
||||
nail-gun, or ....
|
||||
@@ -47,14 +46,6 @@ nail-gun, or ....
|
||||
current location or location when fired?
|
||||
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
|
||||
rail gun
|
||||
crouching missile?
|
||||
@@ -78,9 +69,6 @@ add back in gamepad support
|
||||
but does anyone care?
|
||||
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
|
||||
|
||||
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 ********************************************************
|
||||
|
||||
rename intro level to something lore related
|
||||
|
||||
labs - procedural generation
|
||||
bugs
|
||||
mob spawns shouldn't be based on probability?
|
||||
|
||||
Reference in New Issue
Block a user