wikipedia links
tech, field, and gun names are now clickable wikipedia searches works in pause and experiment modes several names have also been adjusted
This commit is contained in:
@@ -102,7 +102,7 @@ const b = {
|
||||
for (let i = 0; i < 4; i++) powerUps.spawn(m.pos.x + 50 * (Math.random() - 0.5), m.pos.y + 50 * (Math.random() - 0.5), "ammo");
|
||||
}
|
||||
},
|
||||
refundAmmo() { //triggers after firing when you removed ammo for a gun, but didn't need to (like a rail gun misfire)
|
||||
refundAmmo() { //triggers after firing when you removed ammo for a gun, but didn't need to (like a railgun misfire)
|
||||
if (tech.isCrouchAmmo && input.down) {
|
||||
tech.isCrouchAmmo--
|
||||
if ((tech.isCrouchAmmo) % 2) {
|
||||
@@ -4430,7 +4430,7 @@ const b = {
|
||||
fire() {}
|
||||
},
|
||||
{
|
||||
name: "wave beam",
|
||||
name: "matter wave",
|
||||
description: "emit a <strong>wave packet</strong> of oscillating particles<br>that propagates through <strong>solids</strong>",
|
||||
ammo: 0,
|
||||
ammoPack: 120,
|
||||
@@ -5189,7 +5189,7 @@ const b = {
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "rail gun",
|
||||
name: "railgun",
|
||||
description: "use <strong class='color-f'>energy</strong> to launch a high-speed <strong>dense</strong> rod<br><strong>hold</strong> left mouse to charge, <strong>release</strong> to fire",
|
||||
ammo: 0,
|
||||
ammoPack: 3.5,
|
||||
|
||||
36
js/index.js
36
js/index.js
@@ -172,6 +172,13 @@ window.onresize = () => {
|
||||
//**********************************************************************
|
||||
// experimental build grid display and pause
|
||||
//**********************************************************************
|
||||
//set wikipedia link
|
||||
for (let i = 0, len = tech.tech.length; i < len; i++) {
|
||||
if (!tech.tech[i].link) {
|
||||
tech.tech[i].link = `<a target="_blank" href='https://en.wikipedia.org/w/index.php?search=${encodeURIComponent(tech.tech[i].name).replace(/'/g, '%27')}&title=Special:Search' style="color: #000;">${tech.tech[i].name}</a>`
|
||||
}
|
||||
}
|
||||
|
||||
const build = {
|
||||
// onLoadPowerUps() {
|
||||
// const set = getUrlVars()
|
||||
@@ -241,7 +248,7 @@ const build = {
|
||||
</svg>
|
||||
</div>`;
|
||||
for (let i = 0, len = b.inventory.length; i < len; i++) {
|
||||
text += `<div class="pause-grid-module"><div class="grid-title"><div class="circle-grid gun"></div> ${b.guns[b.inventory[i]].name} - <span style="font-size:100%;font-weight: 100;">${b.guns[b.inventory[i]].ammo}</span></div> ${b.guns[b.inventory[i]].description}</div>`
|
||||
text += `<div class="pause-grid-module"><div class="grid-title"><div class="circle-grid gun"></div> ${build.nameLink(b.guns[b.inventory[i]].name)} - <span style="font-size:100%;font-weight: 100;">${b.guns[b.inventory[i]].ammo}</span></div> ${b.guns[b.inventory[i]].description}</div>`
|
||||
}
|
||||
let el = document.getElementById("pause-grid-left")
|
||||
el.style.display = "grid"
|
||||
@@ -249,7 +256,7 @@ const build = {
|
||||
|
||||
//left side
|
||||
text = "";
|
||||
text += `<div class="pause-grid-module" id ="pause-field"><div class="grid-title"><div class="circle-grid field"></div> ${m.fieldUpgrades[m.fieldMode].name}</div> ${m.fieldUpgrades[m.fieldMode].description}</div>`
|
||||
text += `<div class="pause-grid-module" id ="pause-field"><div class="grid-title"><div class="circle-grid field"></div> ${build.nameLink(m.fieldUpgrades[m.fieldMode].name)}</div> ${m.fieldUpgrades[m.fieldMode].description}</div>`
|
||||
for (let i = 0, len = tech.tech.length; i < len; i++) {
|
||||
if (tech.tech[i].count > 0 && !tech.tech[i].isNonRefundable) {
|
||||
const isCount = tech.tech[i].count > 1 ? `(${tech.tech[i].count}x)` : "";
|
||||
@@ -259,23 +266,23 @@ const build = {
|
||||
<div class="circle-grid tech" style="position:absolute; top:0; left:0;opacity:0.8;"></div>
|
||||
<div class="circle-grid field" style="position:absolute; top:0; left:10px;opacity:0.65;"></div>
|
||||
</span>
|
||||
${tech.tech[i].name} ${isCount}</div>${tech.tech[i].description}</div></div>`
|
||||
${tech.tech[i].link} ${isCount}</div>${tech.tech[i].description}</div></div>`
|
||||
} else if (tech.tech[i].isGunTech) {
|
||||
text += `<div class="pause-grid-module"><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[i].name} ${isCount}</div>${tech.tech[i].description}</div></div>`
|
||||
${tech.tech[i].link} ${isCount}</div>${tech.tech[i].description}</div></div>`
|
||||
} else if (tech.tech[i].isLore) {
|
||||
text += `<div class="pause-grid-module"><div class="grid-title lore-text"><div class="circle-grid lore"></div> ${tech.tech[i].name} ${isCount}</div>${tech.tech[i].description}</div></div>`
|
||||
// } else if (tech.tech[i].isJunk) {
|
||||
// text += `<div class="pause-grid-module"><div class="grid-title"><div class="circle-grid junk"></div> ${tech.tech[i].name} ${isCount}</div>${tech.tech[i].description}</div></div>`
|
||||
} else {
|
||||
text += `<div class="pause-grid-module"><div class="grid-title"><div class="circle-grid tech"></div> ${tech.tech[i].name} ${isCount}</div>${tech.tech[i].description}</div></div>`
|
||||
text += `<div class="pause-grid-module"><div class="grid-title"><div class="circle-grid tech"></div> ${tech.tech[i].link} ${isCount}</div>${tech.tech[i].description}</div></div>`
|
||||
}
|
||||
} else if (tech.tech[i].isLost) {
|
||||
text += `<div class="pause-grid-module" style="text-decoration: line-through;"><div class="grid-title">${tech.tech[i].name}</div>${tech.tech[i].description}</div></div>`
|
||||
text += `<div class="pause-grid-module" style="text-decoration: line-through;"><div class="grid-title">${tech.tech[i].link}</div>${tech.tech[i].description}</div></div>`
|
||||
}
|
||||
}
|
||||
el = document.getElementById("pause-grid-right")
|
||||
@@ -369,7 +376,7 @@ const build = {
|
||||
<div class="circle-grid tech" style="position:absolute; top:0; left:0;opacity:0.8;"></div>
|
||||
<div class="circle-grid field" style="position:absolute; top:0; left:10px;opacity:0.65;"></div>
|
||||
</span>
|
||||
${tech.tech[i].name} ${isCount}</div>${tech.tech[i].description}
|
||||
${tech.tech[i].link} ${isCount}</div>${tech.tech[i].description}
|
||||
</div>`
|
||||
// <div class="circle-grid gun" style="position:absolute; top:-3px; left:-3px; opacity:1; height: 33px; width:33px;"></div>
|
||||
// <div class="circle-grid tech" style="position:absolute; top:5px; left:5px;opacity:1;height: 20px; width:20px;border: #fff solid 2px;"></div>
|
||||
@@ -382,18 +389,18 @@ const build = {
|
||||
<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[i].name} ${isCount}</div>${tech.tech[i].description}
|
||||
${tech.tech[i].link} ${isCount}</div>${tech.tech[i].description}
|
||||
</div>`
|
||||
} else
|
||||
if (tech.tech[i].isJunk) {
|
||||
// text += `<div class="pause-grid-module"><div class="grid-title"><div class="circle-grid junk"></div> ${tech.tech[i].name} ${isCount}</div>${tech.tech[i].description}</div></div>`
|
||||
techID.innerHTML = `<div class="grid-title"><div class="circle-grid junk"></div> ${tech.tech[i].name} ${isCount}</div>${tech.tech[i].description}</div>`
|
||||
techID.innerHTML = `<div class="grid-title"><div class="circle-grid junk"></div> ${tech.tech[i].link} ${isCount}</div>${tech.tech[i].description}</div>`
|
||||
} else if (tech.tech[i].isExperimentalMode) {
|
||||
// techID.innerHTML = `${tech.tech[i].description}</div>`
|
||||
techID.innerHTML = `<div class="grid-title">${tech.tech[i].name}</div>${tech.tech[i].description}</div>`
|
||||
// text += `<div class="grid-title">${tech.tech[i].name}</div> ${tech.tech[i].description}</div>`
|
||||
} else {
|
||||
techID.innerHTML = `<div class="grid-title"><div class="circle-grid tech"></div> ${tech.tech[i].name} ${isCount}</div>${tech.tech[i].description}</div>`
|
||||
techID.innerHTML = `<div class="grid-title"><div class="circle-grid tech"></div> ${tech.tech[i].link} ${isCount}</div>${tech.tech[i].description}</div>`
|
||||
}
|
||||
//deselect selected tech options if you don't have the tech any more // for example: when bot techs are converted after a bot upgrade tech is taken
|
||||
if (tech.tech[i].count === 0 && techID.classList.contains("build-tech-selected")) techID.classList.remove("build-tech-selected");
|
||||
@@ -455,10 +462,10 @@ const build = {
|
||||
</div>
|
||||
</div>`
|
||||
for (let i = 0, len = m.fieldUpgrades.length; i < len; i++) {
|
||||
text += `<div id ="field-${i}" class="experiment-grid-module" onclick="build.choosePowerUp(this,${i},'field')"><div class="grid-title"><div class="circle-grid field"></div> ${m.fieldUpgrades[i].name}</div> ${m.fieldUpgrades[i].description}</div>`
|
||||
text += `<div id ="field-${i}" class="experiment-grid-module" onclick="build.choosePowerUp(this,${i},'field')"><div class="grid-title"><div class="circle-grid field"></div> ${build.nameLink(m.fieldUpgrades[i].name)}</div> ${m.fieldUpgrades[i].description}</div>`
|
||||
}
|
||||
for (let i = 0, len = b.guns.length; i < len; i++) {
|
||||
text += `<div id = "gun-${i}" class="experiment-grid-module" onclick="build.choosePowerUp(this,${i},'gun')"><div class="grid-title"><div class="circle-grid gun"></div> ${b.guns[i].name}</div> ${b.guns[i].description}</div>`
|
||||
text += `<div id = "gun-${i}" class="experiment-grid-module" onclick="build.choosePowerUp(this,${i},'gun')"><div class="grid-title"><div class="circle-grid gun"></div> ${build.nameLink(b.guns[i].name)}</div> ${b.guns[i].description}</div>`
|
||||
}
|
||||
for (let i = 0, len = tech.tech.length; i < len; i++) {
|
||||
if (!tech.tech[i].isExperimentHide && (!tech.tech[i].isNonRefundable || tech.tech[i].isExperimentalMode)) {
|
||||
@@ -466,7 +473,7 @@ const build = {
|
||||
if (tech.tech[i].isExperimentalMode) {
|
||||
text += `<div id="tech-${i}" class="experiment-grid-module" onclick="build.choosePowerUp(this,${i},'tech')"><div class="grid-title">${tech.tech[i].name}</div> ${tech.tech[i].description}</div>`
|
||||
} else {
|
||||
text += `<div id="tech-${i}" class="experiment-grid-module" onclick="build.choosePowerUp(this,${i},'tech')"><div class="grid-title"><div class="circle-grid tech"></div> ${tech.tech[i].name}</div> ${tech.tech[i].description}</div>`
|
||||
text += `<div id="tech-${i}" class="experiment-grid-module" onclick="build.choosePowerUp(this,${i},'tech')"><div class="grid-title"><div class="circle-grid tech"></div> ${tech.tech[i].link}</div> ${tech.tech[i].description}</div>`
|
||||
}
|
||||
} else {
|
||||
text += `<div id="tech-${i}" class="experiment-grid-module experiment-grid-disabled"><div class="grid-title"> ${tech.tech[i].name}</div> ${tech.tech[i].description}</div>`
|
||||
@@ -497,6 +504,9 @@ const build = {
|
||||
}
|
||||
}
|
||||
},
|
||||
nameLink(text) { //converts text into a clickable wikipedia search
|
||||
return `<a target="_blank" href='https://en.wikipedia.org/w/index.php?search=${encodeURIComponent(text).replace(/'/g, '%27')}&title=Special:Search' style="color: #000;">${text}</a>`
|
||||
},
|
||||
reset() {
|
||||
simulation.startGame(true); //starts game, but pauses it
|
||||
build.isExperimentSelection = true;
|
||||
|
||||
@@ -1471,7 +1471,7 @@ const m = {
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "standing wave harmonics",
|
||||
name: "standing wave",
|
||||
description: "<strong>3</strong> oscillating <strong>shields</strong> are permanently active<br><strong>deflecting</strong> protects you in every <strong>direction</strong><br><strong>deflecting</strong> has <strong>50%</strong> less <strong>recoil</strong>", //drains <strong class='color-f'>energy</strong>
|
||||
drainCD: 0,
|
||||
effect: () => {
|
||||
@@ -1757,7 +1757,7 @@ const m = {
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "negative mass field",
|
||||
name: "negative mass",
|
||||
description: "use <strong class='color-f'>energy</strong> to nullify <strong style='letter-spacing: 7px;'>gravity</strong><br>reduce <strong class='color-harm'>harm</strong> by <strong>55%</strong><br>hold <strong class='color-block'>blocks</strong> as if they have a lower <strong>mass</strong>",
|
||||
fieldDrawRadius: 0,
|
||||
effect: () => {
|
||||
@@ -1907,7 +1907,7 @@ const m = {
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "nano-scale manufacturing",
|
||||
name: "molecular assembler",
|
||||
description: "excess <strong class='color-f'>energy</strong> used to build <strong>drones</strong><br>use <strong class='color-f'>energy</strong> to <strong>deflect</strong> mobs<br><strong>double</strong> your default <strong class='color-f'>energy</strong> regeneration",
|
||||
effect: () => {
|
||||
// m.fieldMeterColor = "#0c5"
|
||||
|
||||
@@ -388,9 +388,9 @@ const simulation = {
|
||||
}
|
||||
},
|
||||
switchGun() {
|
||||
if (tech.isLongitudinal && b.guns[b.activeGun].name === "wave beam") {
|
||||
if (tech.isLongitudinal && b.guns[b.activeGun].name === "matter wave") {
|
||||
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
|
||||
if (b.guns[i].name === "wave beam") {
|
||||
if (b.guns[i].name === "matter wave") {
|
||||
b.guns[i].waves = []; //empty array of wave bullets
|
||||
break;
|
||||
}
|
||||
@@ -746,7 +746,7 @@ const simulation = {
|
||||
if (m.alive) {
|
||||
if (tech.isLongitudinal) {
|
||||
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
|
||||
if (b.guns[i].name === "wave beam") {
|
||||
if (b.guns[i].name === "matter wave") {
|
||||
b.guns[i].waves = []; //empty array of wave bullets
|
||||
break;
|
||||
}
|
||||
|
||||
267
js/tech.js
267
js/tech.js
File diff suppressed because it is too large
Load Diff
21
todo.txt
21
todo.txt
@@ -1,13 +1,16 @@
|
||||
******************************************************** NEXT PATCH **************************************************
|
||||
|
||||
new boss: slasherBoss - radially waving short distance lasers
|
||||
|
||||
aerogel 250%->150% foam damage
|
||||
|
||||
bug fixes
|
||||
tech, field, and gun names are now clickable wikipedia searches
|
||||
works in pause and experiment modes
|
||||
several names have also been adjusted
|
||||
|
||||
******************************************************** TODO ********************************************************
|
||||
|
||||
bad links:
|
||||
|
||||
add link URL to all tech guns and field on page load
|
||||
but only if URL is undefined so hard to search names can be added in by hand
|
||||
|
||||
slasherBoss
|
||||
sine wave of lasers that travel around vertexes
|
||||
10+ sided
|
||||
@@ -84,7 +87,7 @@ Pilot wave tech
|
||||
make experiment and understand vibe more obvious
|
||||
mostly in early game or first time players
|
||||
|
||||
look into 360 wave beam lag
|
||||
look into 360 matter wave lag
|
||||
|
||||
aoe effect pushes mobs away, then rapidly pulls them in
|
||||
for mines?
|
||||
@@ -99,7 +102,7 @@ it would be helpful if there was a mechanism to recover mobs that fly off the ma
|
||||
make non moving bosses not move after getting hit
|
||||
shooter, shielding,
|
||||
|
||||
buff rail gun
|
||||
buff railgun
|
||||
|
||||
scrolling console history in pause menu?
|
||||
pause should at least show the last in game console message
|
||||
@@ -114,7 +117,7 @@ tech: quantized shields - harmonic standing wave field can only lose 33 energy p
|
||||
doesn't stack with spherical tech
|
||||
|
||||
make a tech that improves all charge guns
|
||||
for: pulse, foam, rail gun
|
||||
for: pulse, foam, railgun
|
||||
effect:
|
||||
faster charge rate?
|
||||
fire speed already does that...
|
||||
@@ -135,7 +138,7 @@ tech: use the ability for power ups to have custom code
|
||||
explode if they touch?
|
||||
|
||||
apply the new gun.do functions to other guns
|
||||
rail gun
|
||||
railgun
|
||||
crouching missile?
|
||||
works similar to foam
|
||||
performance issues?
|
||||
|
||||
Reference in New Issue
Block a user