cantilever

new community level cantilever

extended tech sorting to experiment

acetone peroxide does 40->33% more explosion harm to player
fleas can do up to 30% more damage before they despawn
This commit is contained in:
landgreen
2023-06-17 15:48:38 -07:00
parent da559f44f6
commit 1d4b0c4430
6 changed files with 208 additions and 88 deletions

View File

@@ -397,7 +397,7 @@ const b = {
//player damage //player damage
if (Vector.magnitude(Vector.sub(where, player.position)) < radius) { if (Vector.magnitude(Vector.sub(where, player.position)) < radius) {
const DRAIN = (tech.isExplosionHarm ? 0.63 : 0.45) * (tech.isRadioactiveResistance ? 0.25 : 1) const DRAIN = (tech.isExplosionHarm ? 0.6 : 0.45) * (tech.isRadioactiveResistance ? 0.25 : 1)
if (m.immuneCycle < m.cycle) m.energy -= DRAIN if (m.immuneCycle < m.cycle) m.energy -= DRAIN
if (m.energy < 0) { if (m.energy < 0) {
m.energy = 0 m.energy = 0
@@ -446,7 +446,7 @@ const b = {
if (dist < radius) { if (dist < radius) {
if (simulation.dmgScale) { if (simulation.dmgScale) {
const harm = tech.isExplosionHarm ? 0.07 : 0.05 const harm = tech.isExplosionHarm ? 0.067 : 0.05
if (tech.isImmuneExplosion && m.energy > 0.25) { if (tech.isImmuneExplosion && m.energy > 0.25) {
// const mitigate = Math.min(1, Math.max(1 - m.energy * 0.5, 0)) // const mitigate = Math.min(1, Math.max(1 - m.energy * 0.5, 0))
m.energy -= 0.25 m.energy -= 0.25
@@ -3534,7 +3534,7 @@ const b = {
restitution: 0, restitution: 0,
density: 0.0005, // 0.001 is normal density density: 0.0005, // 0.001 is normal density
lookFrequency: 19 + Math.floor(7 * Math.random()), lookFrequency: 19 + Math.floor(7 * Math.random()),
endCycle: simulation.cycle + Math.floor((900 * tech.isBulletsLastLonger + 360 * Math.random()) + Math.max(0, 150 - bullet.length)), // 13 - 19s endCycle: simulation.cycle + Math.floor((900 * tech.isBulletsLastLonger + 420 * Math.random()) + Math.max(0, 150 - bullet.length)), // 13 - 19s
classType: "bullet", classType: "bullet",
collisionFilter: { collisionFilter: {
category: cat.bullet, category: cat.bullet,
@@ -3550,7 +3550,7 @@ const b = {
}, },
beforeDmg(who) { beforeDmg(who) {
Matter.Body.setVelocity(this, Vector.mult(Vector.normalise(Vector.sub(this.position, who.position)), 10 + 10 * Math.random())); //push away from target Matter.Body.setVelocity(this, Vector.mult(Vector.normalise(Vector.sub(this.position, who.position)), 10 + 10 * Math.random())); //push away from target
this.endCycle -= 180 this.endCycle -= 130
this.cd = simulation.cycle + this.delay; this.cd = simulation.cycle + this.delay;
if (tech.isSporeFreeze) mobs.statusSlow(who, 90) if (tech.isSporeFreeze) mobs.statusSlow(who, 90)
if (tech.isSpawnBulletsOnDeath && who.alive && who.isDropPowerUp) { if (tech.isSpawnBulletsOnDeath && who.alive && who.isDropPowerUp) {

View File

@@ -108,7 +108,7 @@ function getUrlVars() {
window.addEventListener('load', () => { window.addEventListener('load', () => {
const set = getUrlVars() const set = getUrlVars()
if (Object.keys(set).length !== 0) { if (Object.keys(set).length !== 0) {
build.populateGrid() //trying to solve a bug with this, but maybe it doesn't help // build.populateGrid() //trying to solve a bug with this, but maybe it doesn't help
openExperimentMenu(); openExperimentMenu();
//add experimental selections based on url //add experimental selections based on url
for (const property in set) { for (const property in set) {
@@ -166,6 +166,8 @@ window.addEventListener('load', () => {
// Math.seed = Math.abs(Math.hash(Math.initialSeed)) // Math.seed = Math.abs(Math.hash(Math.initialSeed))
// level.populateLevels() // level.populateLevels()
// } // }
requestAnimationFrame(() => { build.sortTech('have', true) });
} }
} else if (localSettings.isTrainingNotAttempted && localSettings.runCount < 30) { //make training button more obvious for new players } else if (localSettings.isTrainingNotAttempted && localSettings.runCount < 30) { //make training button more obvious for new players
// document.getElementById("training-button").style.border = "0px #333 solid"; // document.getElementById("training-button").style.border = "0px #333 solid";
@@ -457,7 +459,7 @@ ${simulation.isCheating ? "<br><br><em>lore disabled</em>" : ""}
<button onclick="build.sortTech('heal')" class='sort-button'><strong class='color-h'>heal</strong></button> <button onclick="build.sortTech('heal')" class='sort-button'><strong class='color-h'>heal</strong></button>
<button onclick="build.sortTech('defense')" class='sort-button'><strong style="letter-spacing: 1px;font-weight: 100;">defense</strong></button> <button onclick="build.sortTech('defense')" class='sort-button'><strong style="letter-spacing: 1px;font-weight: 100;">defense</strong></button>
<button onclick="build.sortTech('energy')" class='sort-button'><strong class='color-f'>energy</strong></button> <button onclick="build.sortTech('energy')" class='sort-button'><strong class='color-f'>energy</strong></button>
<input type="search" id="sort-input" style="width: 8em;font-size: 0.6em;color:#888;" placeholder="sort by"/> <input type="search" id="sort-input" style="width: 8em;font-size: 0.6em;color:#000;" placeholder="sort by"/>
<button onclick="build.sortTech('input')" class='sort-button' style="border-radius: 0em;border: 1.5px #000 solid;font-size: 0.6em;" value="damage">sort</button> <button onclick="build.sortTech('input')" class='sort-button' style="border-radius: 0em;border: 1.5px #000 solid;font-size: 0.6em;" value="damage">sort</button>
</div>`; </div>`;
// const style = (tech.isPauseEjectTech && !simulation.isChoosing) ? 'style="animation: techColorCycle 1s linear infinite alternate;"' : '' // const style = (tech.isPauseEjectTech && !simulation.isChoosing) ? 'style="animation: techColorCycle 1s linear infinite alternate;"' : ''
@@ -513,7 +515,7 @@ ${simulation.isCheating ? "<br><br><em>lore disabled</em>" : ""}
el.style.display = "grid" el.style.display = "grid"
el.innerHTML = text el.innerHTML = text
}, },
sortTech(find) { sortTech(find, isExperiment = false) {
const sortKeyword = (a, b) => { const sortKeyword = (a, b) => {
let aHasKeyword = (a.descriptionFunction ? a.descriptionFunction() : a.description).includes(find) || a.name.includes(find) let aHasKeyword = (a.descriptionFunction ? a.descriptionFunction() : a.description).includes(find) || a.name.includes(find)
let bHasKeyword = (b.descriptionFunction ? b.descriptionFunction() : b.description).includes(find) || b.name.includes(find) let bHasKeyword = (b.descriptionFunction ? b.descriptionFunction() : b.description).includes(find) || b.name.includes(find)
@@ -524,39 +526,89 @@ ${simulation.isCheating ? "<br><br><em>lore disabled</em>" : ""}
if (find === 'guntech') { if (find === 'guntech') {
tech.tech.sort((a, b) => { tech.tech.sort((a, b) => {
if (a.isGunTech && b.isGunTech) {
if (a.allowed() > b.allowed()) return -1; //sort to the top
if (!a.allowed() < b.allowed()) return 1; //sort to the bottom
}
if (a.isGunTech && !b.isGunTech) return -1; //sort to the top if (a.isGunTech && !b.isGunTech) return -1; //sort to the top
if (!a.isGunTech && b.isGunTech) return 1; //sort to the bottom if (!a.isGunTech && b.isGunTech) return 1; //sort to the bottom
return 0; return 0;
}); });
} else if (find === 'fieldtech') { } else if (find === 'fieldtech') {
tech.tech.sort((a, b) => { tech.tech.sort((a, b) => {
if (a.isFieldTech && b.isFieldTech) {
if (a.allowed() > b.allowed()) return -1; //sort to the top
if (!a.allowed() < b.allowed()) return 1; //sort to the bottom
}
if (a.isFieldTech && !b.isFieldTech) return -1; //sort to the top if (a.isFieldTech && !b.isFieldTech) return -1; //sort to the top
if (!a.isFieldTech && b.isFieldTech) return 1; //sort to the bottom if (!a.isFieldTech && b.isFieldTech) return 1; //sort to the bottom
return 0; return 0;
}); });
} else if (find === 'allowed') {
tech.tech.sort((a, b) => {
if (a.allowed() > b.allowed()) return -1; //sort to the top
if (!a.allowed() < b.allowed()) return 1; //sort to the bottom
return 0;
});
} else if (find === 'have') {
tech.tech.sort((a, b) => {
if (a.count > b.count) return -1; //sort to the top
if (!a.count < b.count) return 1; //sort to the bottom
return 0;
});
} else if (find === 'heal') {
tech.tech.sort((a, b) => {
if (a.isHealTech && b.isHealTech) {
if (a.allowed() > b.allowed()) return -1; //sort to the top
if (!a.allowed() < b.allowed()) return 1; //sort to the bottom
}
if (a.isHealTech && !b.isHealTech) return -1; //sort to the top
if (!a.isHealTech && b.isHealTech) return 1; //sort to the bottom
return 0;
});
} else if (find === 'bot') {
tech.tech.sort((a, b) => {
if (a.isBotTech && b.isBotTech) {
if (a.allowed() > b.allowed()) return -1; //sort to the top
if (!a.allowed() < b.allowed()) return 1; //sort to the bottom
}
if (a.isBotTech && !b.isBotTech) return -1; //sort to the top
if (!a.isBotTech && b.isBotTech) return 1; //sort to the bottom
return 0;
});
} else if (document.getElementById("sort-input").value === 'skin') {
tech.tech.sort((a, b) => {
if (a.isSkin && b.isSkin) {
if (a.allowed() > b.allowed()) return -1; //sort to the top
if (!a.allowed() < b.allowed()) return 1; //sort to the bottom
}
if (a.isSkin && !b.isSkin) return -1; //sort to the top
if (!a.isSkin && b.isSkin) return 1; //sort to the bottom
return 0;
});
} else if (document.getElementById("sort-input").value === 'junk') {
tech.tech.sort((a, b) => {
if (a.isJunk && !b.isJunk) return -1; //sort to the top
if (!a.isJunk && b.isJunk) return 1; //sort to the bottom
return 0;
});
} else if (find === 'damage') { } else if (find === 'damage') {
tech.tech.sort(sortKeyword); tech.tech.sort(sortKeyword);
} else if (find === 'defense') { } else if (find === 'defense') {
tech.tech.sort(sortKeyword); tech.tech.sort(sortKeyword);
} else if (find === 'energy') { } else if (find === 'energy') {
tech.tech.sort(sortKeyword); tech.tech.sort(sortKeyword);
} else if (find === 'heal') {
tech.tech.sort((a, b) => {
if (a.isHealTech && !b.isHealTech) return -1; //sort to the top
if (!a.isHealTech && b.isHealTech) return 1; //sort to the bottom
return 0;
});
} else if (find === 'bot') {
tech.tech.sort((a, b) => {
if (a.isBotTech && !b.isBotTech) return -1; //sort to the top
if (!a.isBotTech && b.isBotTech) return 1; //sort to the bottom
return 0;
});
} else if (find === 'input') { } else if (find === 'input') {
find = document.getElementById("sort-input").value; find = document.getElementById("sort-input").value;
tech.tech.sort(sortKeyword); tech.tech.sort(sortKeyword);
} }
build.generatePauseRight() //makes the right side of the pause menu with the tech if (isExperiment) {
build.populateGrid()
// build.updateExperimentText()
document.getElementById("tech-0").scrollIntoView(); //scroll to the first tech after sorting
} else {
build.generatePauseRight() //makes the right side of the pause menu with the tech
}
document.getElementById("sort-input").value = find; //make the sorted string display in the keyword search input field document.getElementById("sort-input").value = find; //make the sorted string display in the keyword search input field
}, },
unPauseGrid() { unPauseGrid() {
@@ -675,7 +727,9 @@ ${simulation.isCheating ? "<br><br><em>lore disabled</em>" : ""}
}, 50); }, 50);
} }
} }
//update tech text build.updateExperimentText(isAllowed)
},
updateExperimentText(isAllowed = false) {
for (let i = 0, len = tech.tech.length; i < len; i++) { for (let i = 0, len = tech.tech.length; i < len; i++) {
const techID = document.getElementById("tech-" + i) const techID = document.getElementById("tech-" + i)
if ((!tech.tech[i].isJunk || localSettings.isJunkExperiment) && !tech.tech[i].isLore) { if ((!tech.tech[i].isJunk || localSettings.isJunkExperiment) && !tech.tech[i].isLore) {
@@ -726,69 +780,76 @@ ${simulation.isCheating ? "<br><br><em>lore disabled</em>" : ""}
}, },
populateGrid() { //background-color:var(--build-bg-color); populateGrid() { //background-color:var(--build-bg-color);
let text = ` let text = `
<div class="experiment-start-box"> <div class="experiment-start-box">
<div> <div class="sort" style="border: 0px;">
<label for="difficulty-select" title="effects: number of mobs, damage done by mobs, damage done to mobs, mob speed, heal effects">difficulty:</label> <button onclick="build.sortTech('guntech', true)" class='sort-button'><strong class='color-g'>gun</strong><strong class='color-m'>tech</strong></button>
<select name="difficulty-select" id="difficulty-select-experiment"> <button onclick="build.sortTech('fieldtech', true)" class='sort-button'><strong class='color-f'>field</strong><strong class='color-m'>tech</strong></button>
<option value="1">easy</option> <button onclick="build.sortTech('damage', true)" class='sort-button'><strong class='color-d'>damage</strong></button>
<option value="2" selected>normal</option> <button onclick="build.sortTech('defense', true)" class='sort-button'><strong style="letter-spacing: 1px;font-weight: 100;">defense</strong></button>
<option value="4">hard</option> <button onclick="build.sortTech('have', true)" class='sort-button' style="letter-spacing: 1px;font-weight: 800;">have</button>
<option value="6">why?</option> <button onclick="build.sortTech('allowed', true)" class='sort-button' style="letter-spacing: 1px;font-weight: 400;">allowed</button>
</select> <input type="search" id="sort-input" style="width: 8.7em;font-size: 0.6em;color:#000;" placeholder="sort by"/>
</div> <button onclick="build.sortTech('input', true)" class='sort-button' style="border-radius: 0em;border: 1.5px #000 solid;font-size: 0.6em;" value="damage">sort</button>
</div>
<div> <div>
<label for="hide-images-experiment" title="reload experiment with no images for fields, guns, and tech">hide images:</label> <select name="difficulty-select" id="difficulty-select-experiment">
<input onclick="build.showImages('experiment')" type="checkbox" id="hide-images-experiment" name="hide-images-experiment" style="width:17px; height:17px; margin-bottom: 15px;" ${localSettings.isHideImages ? "checked" : ""}> <option value="1">easy</option>
</div> <option value="2" selected>normal</option>
<option value="4">hard</option>
<option value="6">why</option>
</select>
&nbsp; &nbsp;
<label for="hide-images-experiment" title="reload experiment with no images for fields, guns, and tech" style="font-size: 0.85em;">hide images</label>
<input onclick="build.showImages('experiment')" type="checkbox" id="hide-images-experiment" name="hide-images-experiment" style="width:13px; height:13px;" ${localSettings.isHideImages ? "checked" : ""}>
</div>
<div> <div>
<svg class="SVG-button" onclick="build.reset()" width="50" height="25"> <div style="display: grid;grid-template-columns: repeat(3, 1fr);row-gap: 10px;column-gap: 25px;grid-auto-rows: minmax(5px, auto);margin:-5px 0px 10px 25px;line-height: 100%;">
<g stroke='none' fill='#333' stroke-width="2" font-size="17px" font-family="Ariel, sans-serif"> <div style="grid-column: 1;grid-row: 2 / 4;">
<text x="5" y="18">reset</text> <svg class="SVG-button" onclick="build.startExperiment()" width="150" height="70" >
</g> <g stroke='none' fill='#333' stroke-width="2" font-size="65px" font-family="Ariel, sans-serif">
</svg> <text x="10" y="57">start</text>
&nbsp; &nbsp; </g>
<svg class="SVG-button" onclick="build.shareURL(true)" width="52" height="25"> </svg>
<g stroke='none' fill='#333' stroke-width="2" font-size="17px" font-family="Ariel, sans-serif"> </div>
<text x="5" y="18">share</text> <div style="grid-column: 2;grid-row: 2;">
</g> <svg class="SVG-button" onclick="build.reset()" width="50" height="25">
</svg> <g stroke='none' fill='#333' stroke-width="2" font-size="17px" font-family="Ariel, sans-serif">
</div> <text x="5" y="18">reset</text>
<div> </g>
<svg class="SVG-button" onclick="build.startExperiment()" width="165" height="70" > </svg>
<g stroke='none' fill='#333' stroke-width="2" font-size="65px" font-family="Ariel, sans-serif"> </div>
<text x="17" y="57">start</text> <div style="grid-column: 2;grid-row: 3/4;">
</g> <svg class="SVG-button" onclick="build.shareURL(true)" width="52" height="25">
</svg> <g stroke='none' fill='#333' stroke-width="2" font-size="17px" font-family="Ariel, sans-serif">
<text x="5" y="18">share</text>
</g>
</svg>
</div>
</div>
</div> </div>
</div>` </div>`
const hideStyle = `style="height:auto; border: none; background-color: transparent;"` const hideStyle = `style="height:auto; border: none; background-color: transparent;"`
for (let i = 0, len = m.fieldUpgrades.length; i < len; i++) { for (let i = 0, len = m.fieldUpgrades.length; i < len; i++) {
const style = localSettings.isHideImages ? hideStyle : `style="background-image: url('img/field/${m.fieldUpgrades[i].name}${i === 0 ? m.fieldUpgrades[0].imageNumber : ""}.webp');"` const style = localSettings.isHideImages ? hideStyle : `style="background-image: url('img/field/${m.fieldUpgrades[i].name}${i === 0 ? m.fieldUpgrades[0].imageNumber : ""}.webp');"`
//original text += `<div id="field-${i}" class="experiment-grid-module card-background ${m.fieldMode === i ? "build-field-selected" : ""}" onclick="build.choosePowerUp(${i},'field')" ${style} >
// text += powerUps.fieldText(i, `build.choosePowerUp(this,${i},'field')`)
// 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> &nbsp; ${build.nameLink(m.fieldUpgrades[i].name)}</div> ${m.fieldUpgrades[i].description}</div>`
text += `<div id="field-${i}" class="experiment-grid-module card-background" onclick="build.choosePowerUp(${i},'field')" ${style} >
<div class="card-text"> <div class="card-text">
<div class="grid-title"><div class="circle-grid field"></div> &nbsp; ${build.nameLink(m.fieldUpgrades[i].name)}</div> <div class="grid-title"><div class="circle-grid field"></div> &nbsp; ${build.nameLink(m.fieldUpgrades[i].name)}</div>
${m.fieldUpgrades[i].description}</div> </div>` ${m.fieldUpgrades[i].description}</div> </div>`
} }
for (let i = 0, len = b.guns.length; i < len; i++) { for (let i = 0, len = b.guns.length; i < len; i++) {
const style = localSettings.isHideImages ? hideStyle : `style="background-image: url('img/gun/${b.guns[i].name}.webp');"` const style = localSettings.isHideImages ? hideStyle : `style="background-image: url('img/gun/${b.guns[i].name}.webp');"`
text += `<div id="gun-${i}" class="experiment-grid-module card-background" onclick="build.choosePowerUp(${i},'gun')" ${style} > text += `<div id="gun-${i}" class="experiment-grid-module card-background ${b.guns[i].have ? "build-gun-selected" : ""}" onclick="build.choosePowerUp(${i},'gun')" ${style} >
<div class="card-text"> <div class="card-text">
<div class="grid-title"><div class="circle-grid gun"></div> &nbsp; ${build.nameLink(b.guns[i].name)}</div> <div class="grid-title"><div class="circle-grid gun"></div> &nbsp; ${build.nameLink(b.guns[i].name)}</div>
${b.guns[i].description}</div> </div>` ${b.guns[i].description}</div> </div>`
//original
// 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> &nbsp; ${build.nameLink(b.guns[i].name)}</div> ${b.guns[i].description}</div>`
} }
for (let i = 0, len = tech.tech.length; i < len; i++) { for (let i = 0, len = tech.tech.length; i < len; i++) {
if ((!tech.tech[i].isJunk || localSettings.isJunkExperiment) && !tech.tech[i].isLore) { if ((!tech.tech[i].isJunk || localSettings.isJunkExperiment) && !tech.tech[i].isLore) {
const style = (localSettings.isHideImages || tech.tech[i].isJunk) ? hideStyle : `style="background-image: url('img/${tech.tech[i].name}.webp');"` const style = (localSettings.isHideImages || tech.tech[i].isJunk) ? hideStyle : `style="background-image: url('img/${tech.tech[i].name}.webp');"`
if (tech.tech[i].allowed() && (!tech.tech[i].isNonRefundable || localSettings.isJunkExperiment)) { // || tech.tech[i].name === "+1 cardinality") { //|| tech.tech[i].name === "leveraged investment" if ((tech.tech[i].allowed() || tech.tech[i].count > 0) && (!tech.tech[i].isNonRefundable || localSettings.isJunkExperiment)) { // || tech.tech[i].name === "+1 cardinality") { //|| tech.tech[i].name === "leveraged investment"
text += `<div id="tech-${i}" class="experiment-grid-module card-background" onclick="build.choosePowerUp(${i},'tech')" ${style}>` text += `<div id="tech-${i}" class="experiment-grid-module card-background ${tech.tech[i].count ? "build-tech-selected" : ""}" onclick="build.choosePowerUp(${i},'tech')" ${style}>`
} else { //disabled } else { //disabled
text += `<div id="tech-${i}" class="experiment-grid-module card-background experiment-grid-disabled" ${style}>` text += `<div id="tech-${i}" class="experiment-grid-module card-background experiment-grid-disabled" ${style}>`
// text += `<div id="tech-${i}" class="experiment-grid-module card-background experiment-grid-disabled" onclick="build.choosePowerUp(${i},'tech')" ${style}>`
} }
if (tech.tech[i].isFieldTech) { if (tech.tech[i].isFieldTech) {
@@ -806,6 +867,11 @@ ${simulation.isCheating ? "<br><br><em>lore disabled</em>" : ""}
} }
} }
document.getElementById("experiment-grid").innerHTML = text document.getElementById("experiment-grid").innerHTML = text
// for (let i = 0, len = tech.tech.length; i < len; i++) {
// if (tech.tech[i].count)
// document.getElementById("tech-" + i).classList.add("build-tech-selected")
// }
document.getElementById("difficulty-select-experiment").value = document.getElementById("difficulty-select").value document.getElementById("difficulty-select-experiment").value = document.getElementById("difficulty-select").value
document.getElementById("difficulty-select-experiment").addEventListener("input", () => { document.getElementById("difficulty-select-experiment").addEventListener("input", () => {
simulation.difficultyMode = Number(document.getElementById("difficulty-select-experiment").value) simulation.difficultyMode = Number(document.getElementById("difficulty-select-experiment").value)
@@ -821,6 +887,8 @@ ${simulation.isCheating ? "<br><br><em>lore disabled</em>" : ""}
// document.getElementById(`tech-${i}`).setAttribute('title', tech.tech[i].requires); //add tooltip // document.getElementById(`tech-${i}`).setAttribute('title', tech.tech[i].requires); //add tooltip
} }
} }
//highlight selected
}, },
nameLink(text) { //converts text into a clickable wikipedia search 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' class="link">${text}</a>` return `<a target="_blank" href='https://en.wikipedia.org/w/index.php?search=${encodeURIComponent(text).replace(/'/g, '%27')}&title=Special:Search' class="link">${text}</a>`

View File

@@ -10,7 +10,7 @@ const level = {
// playableLevels: ["pavilion", "pavilion", "pavilion", "pavilion", "pavilion", "pavilion", "pavilion", "pavilion", "pavilion", "pavilion", "pavilion"], // playableLevels: ["pavilion", "pavilion", "pavilion", "pavilion", "pavilion", "pavilion", "pavilion", "pavilion", "pavilion", "pavilion", "pavilion"],
//see level.populateLevels: (intro, ... , reservoir or factory, reactor, ... , gauntlet, final) added later //see level.populateLevels: (intro, ... , reservoir or factory, reactor, ... , gauntlet, final) added later
playableLevels: ["labs", "rooftops", "skyscrapers", "warehouse", "highrise", "office", "aerie", "satellite", "sewers", "testChamber", "pavilion", "lock"], playableLevels: ["labs", "rooftops", "skyscrapers", "warehouse", "highrise", "office", "aerie", "satellite", "sewers", "testChamber", "pavilion", "lock"],
communityLevels: ["gauntlet", "stronghold", "basement", "crossfire", "vats", "run", "ngon", "house", "perplex", "coliseum", "tunnel", "islands", "temple", "dripp", "biohazard", "stereoMadness", "yingYang", "staircase", "fortress", "commandeer", "clock", "buttonbutton", "downpour", "superNgonBros", "underpass"], communityLevels: ["gauntlet", "stronghold", "basement", "crossfire", "vats", "run", "ngon", "house", "perplex", "coliseum", "tunnel", "islands", "temple", "dripp", "biohazard", "stereoMadness", "yingYang", "staircase", "fortress", "commandeer", "clock", "buttonbutton", "downpour", "superNgonBros", "underpass", "cantilever"],
trainingLevels: ["walk", "crouch", "jump", "hold", "throw", "throwAt", "deflect", "heal", "fire", "nailGun", "shotGun", "superBall", "matterWave", "missile", "stack", "mine", "grenades", "harpoon"], trainingLevels: ["walk", "crouch", "jump", "hold", "throw", "throwAt", "deflect", "heal", "fire", "nailGun", "shotGun", "superBall", "matterWave", "missile", "stack", "mine", "grenades", "harpoon"],
levels: [], levels: [],
start() { start() {
@@ -46,12 +46,7 @@ const level = {
// for (let i = 0; i < 3; i++) powerUps.directSpawn(450, -50, "tech"); // for (let i = 0; i < 3; i++) powerUps.directSpawn(450, -50, "tech");
// for (let i = 0; i < 10; i++) powerUps.directSpawn(1750, -500, "research"); // for (let i = 0; i < 10; i++) powerUps.directSpawn(1750, -500, "research");
// for (let i = 0; i < 10; i++) powerUps.directSpawn(1750, -500, "coupling"); // for (let i = 0; i < 10; i++) powerUps.directSpawn(1750, -500, "coupling");
// level.testing(); // level.subway();
// spawn.nodeGroup(3200, -300, "sniper")
// spawn.nodeGroup(2200, -300, "sniper")
// spawn.nodeGroup(2200, -300, "sniper")
// spawn.shareBoss(1900, -500)
// spawn.cellBoss(1900, -500)
// for (let i = 0; i < 2; ++i) spawn.starter(1900, -500, 50) // for (let i = 0; i < 2; ++i) spawn.starter(1900, -500, 50)
// spawn.sneaker(1900, -500, 25) // spawn.sneaker(1900, -500, 25)
// spawn.sniper(2000, -450) // spawn.sniper(2000, -450)
@@ -25187,6 +25182,70 @@ const level = {
// spawn.secondaryBossChance(100, -1500) // spawn.secondaryBossChance(100, -1500)
powerUps.addResearchToLevel() //needs to run after mobs are spawned powerUps.addResearchToLevel() //needs to run after mobs are spawned
}, },
cantilever() { // made by Eclipse#7932 on discord, (TheSpudguy)(@PurpleSunsetGames on github)
// simulation.enableConstructMode();
simulation.makeTextLog(`<strong>underpass</strong> by <span class='color-var'>Eclipse#7932</span>`);
level.setPosToSpawn(0, -50); //normal spawn
level.exit.x = 5500;
level.exit.y = 950;
spawn.mapRect(level.enter.x, level.enter.y + 20, 100, 20); //bump for level entrance
spawn.mapRect(level.exit.x, level.exit.y + 20, 100, 20); //bump for level exit
spawn.mapRect(level.exit.x - 50, level.exit.y + 30, 200, 100); // exit platform
spawn.mapRect(level.exit.x - 50, level.exit.y - 300, 200, 100); // exit platform roof
const endElevator = level.elevator(level.exit.x - 150, level.exit.y - 300, 100, 425, level.exit.y - 300); // end access door
spawn.randomMob(-200, 350, Infinity); // random mob at the beginning
spawn.mapRect(-100, 0, 600, 100); // main platform at start
spawn.bodyRect(0, 300, 50, 50); // little squares at start (one of these should be taken while crossing the cantilever to complete the level more easily)
spawn.bodyRect(100, 200, 50, 50);
spawn.bodyRect(50, 250, 50, 50);
spawn.mapRect(450, -20, 50, 20); // main platform ledge
spawn.mapRect(-200, 500, 2200, 100); // lower platform
spawn.mapRect(1850, 380, 100, 50); // cantilever block
spawn.bodyRect(80, -1300, 70, 1300, 1, { friction: .03, frictionAir: .001 }); // cantilever
spawn.mapRect(3400, 500, 300, 100); // lever platform
spawn.mapRect(3650, 500, 100, 800); // pit
spawn.mapRect(3650, 1300, 2600, 100);
spawn.mapRect(6150, 600, 100, 800);
spawn.mapRect(5650, 600, 100, 650);
spawn.randomMob(4700, 550, Infinity);
spawn.randomMob(4700, 450, Infinity);
spawn.randomMob(4600, 550, Infinity);
const toggle = level.toggle(3500, 500, false); // first lever
const button = level.button(5900, 1300);
const slidingWall = level.elevator(3750, -1200, 100, 1800, -1200); // first sliding wall
level.defaultZoom = 1500;
simulation.zoomTransition(level.defaultZoom);
document.body.style.backgroundColor = "#d8badf";
// color.map = "#444" //custom map color
level.custom = () => {
level.exit.drawAndCheck();
level.enter.draw();
};
level.customTopLayer = () => {
toggle.query();
button.query();
button.draw();
if (toggle.isOn) {
slidingWall.force.y -= 400;
}
if (!button.isUp) {
endElevator.force.y -= 100;
}
slidingWall.move();
endElevator.move()
};
powerUps.addResearchToLevel(); //needs to run after mobs are spawned
},
// ******************************************************************************************************** // ********************************************************************************************************
// ******************************************************************************************************** // ********************************************************************************************************
// ***************************************** training levels ********************************************** // ***************************************** training levels **********************************************

View File

@@ -5432,7 +5432,7 @@ const tech = {
}, },
{ {
name: "acetone peroxide", name: "acetone peroxide",
description: "<strong>+70%</strong> <strong class='color-e'>explosive</strong> <strong>radius</strong><br><strong>40%</strong> <strong class='color-e'>explosive</strong> <strong class='color-defense'>defense</strong>", description: "<strong>+70%</strong> <strong class='color-e'>explosive</strong> <strong>radius</strong><br><strong>33%</strong> <strong class='color-e'>explosive</strong> <strong class='color-defense'>defense</strong>",
isGunTech: true, isGunTech: true,
maxCount: 1, maxCount: 1,
count: 0, count: 0,
@@ -10413,7 +10413,6 @@ const tech = {
maxCount: 1, maxCount: 1,
count: 0, count: 0,
frequency: 0, frequency: 0,
isSkin: true,
isJunk: true, isJunk: true,
isNonRefundable: true, isNonRefundable: true,
allowed() { allowed() {
@@ -10434,7 +10433,6 @@ const tech = {
maxCount: 1, maxCount: 1,
count: 0, count: 0,
frequency: 0, frequency: 0,
isSkin: true,
isJunk: true, isJunk: true,
allowed() { allowed() {
return !m.isShipMode return !m.isShipMode
@@ -10453,7 +10451,6 @@ const tech = {
maxCount: 1, maxCount: 1,
count: 0, count: 0,
frequency: 0, frequency: 0,
isSkin: true,
isJunk: true, isJunk: true,
allowed() { allowed() {
return !m.isShipMode return !m.isShipMode
@@ -10472,7 +10469,6 @@ const tech = {
maxCount: 1, maxCount: 1,
count: 0, count: 0,
frequency: 0, frequency: 0,
isSkin: true,
isJunk: true, isJunk: true,
allowed() { allowed() {
return !m.isShipMode return !m.isShipMode
@@ -10491,7 +10487,6 @@ const tech = {
maxCount: 1, maxCount: 1,
count: 0, count: 0,
frequency: 0, frequency: 0,
isSkin: true,
isJunk: true, isJunk: true,
allowed() { allowed() {
return true return true
@@ -10510,7 +10505,6 @@ const tech = {
maxCount: 1, maxCount: 1,
count: 0, count: 0,
frequency: 0, frequency: 0,
isSkin: true,
isNonRefundable: true, isNonRefundable: true,
isJunk: true, isJunk: true,
allowed() { allowed() {

View File

@@ -376,8 +376,8 @@ summary {
top: 0; top: 0;
z-index: 10; z-index: 10;
align-self: start; align-self: start;
width: 195px; width: 276px;
line-height: 170%; line-height: 200%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
@@ -389,7 +389,7 @@ summary {
/* border-bottom-left-radius: 0px; */ /* border-bottom-left-radius: 0px; */
border-top-right-radius: 0px; border-top-right-radius: 0px;
padding: 0.2em 0px; padding: 0.2em 0px;
height: 190px; /* height: 210px; */
box-shadow: 8px 8px 7px rgba(0, 0, 50, 0.15); box-shadow: 8px 8px 7px rgba(0, 0, 50, 0.15);
} }

View File

@@ -1,17 +1,17 @@
******************************************************** NEXT PATCH ************************************************** ******************************************************** NEXT PATCH **************************************************
pause menu can sort tech by keywords new community level cantilever
tech: mechatronics - randomly add +(7 to 13)% damage extended tech sorting to experiment
a few new images
bug fixes
cherenkov radiation damage bug fixed it does much more damage and matches the description
acetone peroxide does 40->33% more explosion harm to player
fleas can do up to 30% more damage before they despawn
*********************************************************** TODO ***************************************************** *********************************************************** TODO *****************************************************
extend sort to experiments maybe reduce the fps on the line of sight graphics to make it look more like a sensor?
make a bot the follows the player the pov for line of sight levels, not the player
also need to make the vision a slice of a circle, not a full circle
aperture also increases and decreases vision range aperture also increases and decreases vision range
I think messing with vision range causes problems with the start of level vision code I think messing with vision range causes problems with the start of level vision code
@@ -31,10 +31,9 @@ mob non-combat behaviors, like Rain World
play play
fight other mobs fight other mobs
maybe reduce the fps on the line of sight graphics to make it look more like a sensor?
consider increasing the base player horizontal movement consider increasing the base player horizontal movement
maybe only increase ground movement, air control seems fine maybe only increase ground movement, air control seems fine
would this unbalance any maps?
level: subway - a map that uses the train level element and line of sight graphics level: subway - a map that uses the train level element and line of sight graphics
stations stations