factory
factory: rewrote the end clock gating was removed because it's annoying liquid cooling -> refrigerant - freezes mobs after losing at least 5% health mass-energy gets more effect from defense (0.13 -> 0.19) ternary 84 -> 77% damage dark patterns 15 -> 17% damage and JUNK Maxwell's demon 3% -> 1% energy loss above max exciton 16 -> 14% chance to drop 10% increase in overall mob health new images bug fixes
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 38 KiB |
BIN
img/colony.webp
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 65 KiB |
BIN
img/field/field emitter20.webp
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
img/field/field emitter21.webp
Normal file
|
After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 64 KiB |
BIN
img/refrigerant.webp
Normal file
|
After Width: | Height: | Size: 56 KiB |
74
index.html
@@ -52,10 +52,10 @@
|
|||||||
<div style="line-height: 150%;" class="details-div">
|
<div style="line-height: 150%;" class="details-div">
|
||||||
<label for="difficulty-select" title="effects: number of mobs, damage done by mobs, damage done to mobs, mob speed, heal effects">combat difficulty:</label>
|
<label for="difficulty-select" title="effects: number of mobs, damage done by mobs, damage done to mobs, mob speed, heal effects">combat difficulty:</label>
|
||||||
<select name="difficulty-select" id="difficulty-select" style="background-color: #fff">
|
<select name="difficulty-select" id="difficulty-select" style="background-color: #fff">
|
||||||
<option value="1">easy</option>
|
<option value="1">easy ⚆</option>
|
||||||
<option value="2" selected>normal</option>
|
<option value="2" selected>normal ⚆</option>
|
||||||
<option value="4">hard</option>
|
<option value="4">hard ⚇</option>
|
||||||
<option value="6">why?</option>
|
<option value="6">why ⚉</option>
|
||||||
</select>
|
</select>
|
||||||
<br>
|
<br>
|
||||||
<label for="fps-select" title="use this to slow the game down">limit frames per second:</label>
|
<label for="fps-select" title="use this to slow the game down">limit frames per second:</label>
|
||||||
@@ -67,6 +67,24 @@
|
|||||||
<option value="30">30 fps</option>
|
<option value="30">30 fps</option>
|
||||||
</select>
|
</select>
|
||||||
<br>
|
<br>
|
||||||
|
<label for="classic-select" title="play older versions of n-gon">classic n-gon:</label>
|
||||||
|
<select name="classic-select" id="classic-select" onChange="window.location.href=this.value">
|
||||||
|
<option value="https://scratch.mit.edu/projects/14005697/fullscreen/">mech: 2014</option>
|
||||||
|
<option value="https://scratch.mit.edu/projects/22573757/fullscreen/">spacetime: 2015</option>
|
||||||
|
<option value="https://scratch.mit.edu/projects/41429974/fullscreen/">ballistics: 2015</option>
|
||||||
|
<option value="https://scratch.mit.edu/projects/43690666/fullscreen/">portal: 2016</option>
|
||||||
|
<option value="https://codepen.io/lilgreenland/full/ozXNWZ">side scroller: 2016</option>
|
||||||
|
<option value="https://codepen.io/lilgreenland/full/wzARJY">side scroller: 2016</option>
|
||||||
|
<option value="classic/7-1-2017/">LandGame: 2017</option>
|
||||||
|
<option value="classic/4-15-2018/">n-gon: 2018</option>
|
||||||
|
<option value="classic/7-11-2019/">n-gon: summer-2019</option>
|
||||||
|
<option value="classic/9-8-2019/">n-gon: fall-2019</option>
|
||||||
|
<option value="classic/7-15-2020/">n-gon: summer-2020</option>
|
||||||
|
<option value="classic/6-1-2021/">n-gon: spring-2021</option>
|
||||||
|
<option value="classic/11-1-2022/">n-gon: fall-2022</option>
|
||||||
|
<option value="" selected>current version</option>
|
||||||
|
</select>
|
||||||
|
<br>
|
||||||
<label for="seed" title="the randoms seed determines level order, tech choices, and mob types">randomization seed:</label>
|
<label for="seed" title="the randoms seed determines level order, tech choices, and mob types">randomization seed:</label>
|
||||||
<input type="text" id="seed" name="seed" autocomplete="off" spellcheck="false" minlength="1" style="width: 120px;">
|
<input type="text" id="seed" name="seed" autocomplete="off" spellcheck="false" minlength="1" style="width: 120px;">
|
||||||
<br>
|
<br>
|
||||||
@@ -79,13 +97,15 @@
|
|||||||
<br>
|
<br>
|
||||||
<input type="checkbox" id="community-maps" name="community-maps" style="width:17px; height:17px;">
|
<input type="checkbox" id="community-maps" name="community-maps" style="width:17px; height:17px;">
|
||||||
<label for="community-maps" title="add about 12 player made levels the random n-gon level pool">community maps</label>
|
<label for="community-maps" title="add about 12 player made levels the random n-gon level pool">community maps</label>
|
||||||
|
<!-- style="font-size: 1.5em; color: #058;" -->
|
||||||
|
|
||||||
<!-- <br>
|
<!-- <br>
|
||||||
<label for="body-damage" title="allow damage from the ground and large fast moving blocks">collision damage from blocks:</label>
|
<label for="body-damage" title="allow damage from the ground and large fast moving blocks">collision damage from blocks:</label>
|
||||||
<input type="checkbox" id="body-damage" name="body-damage" checked style="width:17px; height:17px;"> -->
|
<input type="checkbox" id="body-damage" name="body-damage" checked style="width:17px; height:17px;"> -->
|
||||||
<br>
|
<br>
|
||||||
<label for="banned" title="type banned levels with a space between them. Example: run temple biohazard">banned levels:</label>
|
<label for="banned" title="type banned levels with a space between them. Example: run temple biohazard">banned levels:</label>
|
||||||
<input list="ban-suggest" id="banned" name="banned" placeholder="list levels by name" autocomplete="off" spellcheck="false" style="width: 182px;" />
|
<input id="banned" name="banned" placeholder="list levels by name" autocomplete="off" spellcheck="false" style="width: 182px;" />
|
||||||
|
<!-- <input list="ban-suggest" id="banned" name="banned" placeholder="list levels by name" autocomplete="off" spellcheck="false" style="width: 182px;" />
|
||||||
<datalist id="ban-suggest">
|
<datalist id="ban-suggest">
|
||||||
<option value="testChamber">
|
<option value="testChamber">
|
||||||
<option value="lock">
|
<option value="lock">
|
||||||
@@ -124,49 +144,7 @@
|
|||||||
<option value="crossfire">
|
<option value="crossfire">
|
||||||
<option value="temple">
|
<option value="temple">
|
||||||
<option value="run">
|
<option value="run">
|
||||||
<!--
|
</datalist> -->
|
||||||
fortress
|
|
||||||
biohazard
|
|
||||||
islands
|
|
||||||
tunnel
|
|
||||||
clock
|
|
||||||
coliseum
|
|
||||||
staircase
|
|
||||||
perplex
|
|
||||||
n-gon
|
|
||||||
vats
|
|
||||||
yingYang
|
|
||||||
basement
|
|
||||||
stronghold
|
|
||||||
commandeer
|
|
||||||
stereoMadness
|
|
||||||
buttonbutton
|
|
||||||
downpour
|
|
||||||
house
|
|
||||||
dripp
|
|
||||||
crossfire
|
|
||||||
temple
|
|
||||||
run
|
|
||||||
-->
|
|
||||||
</datalist>
|
|
||||||
<br>
|
|
||||||
<label for="classic-select" title="play older versions of n-gon">classic n-gon:</label>
|
|
||||||
<select name="classic-select" id="classic-select" onChange="window.location.href=this.value">
|
|
||||||
<option value="https://scratch.mit.edu/projects/14005697/fullscreen/">mech: 2014</option>
|
|
||||||
<option value="https://scratch.mit.edu/projects/22573757/fullscreen/">spacetime: 2015</option>
|
|
||||||
<option value="https://scratch.mit.edu/projects/41429974/fullscreen/">ballistics: 2015</option>
|
|
||||||
<option value="https://scratch.mit.edu/projects/43690666/fullscreen/">portal: 2016</option>
|
|
||||||
<option value="https://codepen.io/lilgreenland/full/ozXNWZ">side scroller: 2016</option>
|
|
||||||
<option value="https://codepen.io/lilgreenland/full/wzARJY">side scroller: 2016</option>
|
|
||||||
<option value="classic/7-1-2017/">LandGame: 2017</option>
|
|
||||||
<option value="classic/4-15-2018/">n-gon: 2018</option>
|
|
||||||
<option value="classic/7-11-2019/">n-gon: summer-2019</option>
|
|
||||||
<option value="classic/9-8-2019/">n-gon: fall-2019</option>
|
|
||||||
<option value="classic/7-15-2020/">n-gon: summer-2020</option>
|
|
||||||
<option value="classic/6-1-2021/">n-gon: spring-2021</option>
|
|
||||||
<option value="classic/11-1-2022/">n-gon: fall-2022</option>
|
|
||||||
<option value="" selected>current version</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
</div>
|
||||||
</details>
|
</details>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
144
js/level.js
@@ -27,15 +27,15 @@ const level = {
|
|||||||
// m.immuneCycle = Infinity //you can't take damage
|
// m.immuneCycle = Infinity //you can't take damage
|
||||||
// tech.tech[297].frequency = 100
|
// tech.tech[297].frequency = 100
|
||||||
// m.couplingChange(10)
|
// m.couplingChange(10)
|
||||||
// m.setField("metamaterial cloaking") //1 standing wave 2 perfect diamagnetism 3 negative mass 4 molecular assembler 5 plasma torch 6 time dilation 7 metamaterial cloaking 8 pilot wave 9 wormhole
|
// m.setField("time dilation") //1 standing wave 2 perfect diamagnetism 3 negative mass 4 molecular assembler 5 plasma torch 6 time dilation 7 metamaterial cloaking 8 pilot wave 9 wormhole
|
||||||
// m.energy = 0
|
// m.energy = 0
|
||||||
// simulation.molecularMode = 2
|
// simulation.molecularMode = 2
|
||||||
// m.damage(0.1);
|
// m.damage(0.1);
|
||||||
// b.giveGuns("harpoon") //0 nail gun 1 shotgun 2 super balls 3 wave 4 missiles 5 grenades 6 spores 7 drones 8 foam 9 harpoon 10 mine 11 laser
|
// b.giveGuns("harpoon") //0 nail gun 1 shotgun 2 super balls 3 wave 4 missiles 5 grenades 6 spores 7 drones 8 foam 9 harpoon 10 mine 11 laser
|
||||||
// b.giveGuns("shotgun") //0 nail gun 1 shotgun 2 super balls 3 wave 4 missiles 5 grenades 6 spores 7 drones 8 foam 9 harpoon 10 mine 11 laser
|
// b.giveGuns("shotgun") //0 nail gun 1 shotgun 2 super balls 3 wave 4 missiles 5 grenades 6 spores 7 drones 8 foam 9 harpoon 10 mine 11 laser
|
||||||
// b.guns[3].ammo = 100000000
|
// b.guns[3].ammo = 100000000
|
||||||
// tech.giveTech("accretion")
|
// tech.giveTech("Maxwells demon")
|
||||||
// tech.giveTech("metastability")
|
// tech.giveTech("missile-bot")
|
||||||
// for (let i = 0; i < 6; ++i) tech.giveTech("replication")
|
// for (let i = 0; i < 6; ++i) tech.giveTech("replication")
|
||||||
// for (let i = 0; i < 1; ++i) tech.giveTech("waste heat recovery")
|
// for (let i = 0; i < 1; ++i) tech.giveTech("waste heat recovery")
|
||||||
// requestAnimationFrame(() => { for (let i = 0; i < 1; i++) tech.giveTech("foam-bot") });
|
// requestAnimationFrame(() => { for (let i = 0; i < 1; i++) tech.giveTech("foam-bot") });
|
||||||
@@ -44,11 +44,11 @@ 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.underpass();
|
// level.factory();
|
||||||
// spawn.nodeGroup(3200, -300, "sniper")
|
// spawn.nodeGroup(3200, -300, "sniper")
|
||||||
// spawn.nodeGroup(2200, -300, "sniper")
|
// spawn.nodeGroup(2200, -300, "sniper")
|
||||||
// spawn.nodeGroup(2200, -300, "sniper")
|
// spawn.nodeGroup(2200, -300, "sniper")
|
||||||
// spawn.mantisBoss(1900, -500)
|
// spawn.shareBoss(1900, -500)
|
||||||
// spawn.cellBoss(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)
|
||||||
@@ -198,7 +198,7 @@ const level = {
|
|||||||
difficultyIncrease(num = 1) {
|
difficultyIncrease(num = 1) {
|
||||||
for (let i = 0; i < num; i++) {
|
for (let i = 0; i < num; i++) {
|
||||||
simulation.difficulty++
|
simulation.difficulty++
|
||||||
m.dmgScale *= 0.922; //damage done by player decreases each level
|
m.dmgScale *= 0.9; //damage done by player decreases each level
|
||||||
if (simulation.accelScale < 6) simulation.accelScale *= 1.024 //mob acceleration increases each level
|
if (simulation.accelScale < 6) simulation.accelScale *= 1.024 //mob acceleration increases each level
|
||||||
if (simulation.CDScale > 0.15) simulation.CDScale *= 0.964 //mob CD time decreases each level
|
if (simulation.CDScale > 0.15) simulation.CDScale *= 0.964 //mob CD time decreases each level
|
||||||
}
|
}
|
||||||
@@ -209,7 +209,7 @@ const level = {
|
|||||||
difficultyDecrease(num = 1) { //used in easy mode for simulation.reset()
|
difficultyDecrease(num = 1) { //used in easy mode for simulation.reset()
|
||||||
for (let i = 0; i < num; i++) {
|
for (let i = 0; i < num; i++) {
|
||||||
simulation.difficulty--
|
simulation.difficulty--
|
||||||
m.dmgScale /= 0.922; //damage done by player decreases each level
|
m.dmgScale /= 0.9; //damage done by player decreases each level
|
||||||
if (simulation.accelScale > 1) simulation.accelScale /= 1.024 //mob acceleration increases each level
|
if (simulation.accelScale > 1) simulation.accelScale /= 1.024 //mob acceleration increases each level
|
||||||
if (simulation.CDScale < 1) simulation.CDScale /= 0.964 //mob CD time decreases each level
|
if (simulation.CDScale < 1) simulation.CDScale /= 0.964 //mob CD time decreases each level
|
||||||
}
|
}
|
||||||
@@ -292,20 +292,28 @@ const level = {
|
|||||||
if (document.getElementById("banned").value) { //remove levels from ban list in settings
|
if (document.getElementById("banned").value) { //remove levels from ban list in settings
|
||||||
const banList = document.getElementById("banned").value.replace(/,/g, ' ').replace(/\s\s+/g, ' ').replace(/[^\w\s]/g, '') //replace commas with spaces, replace double spaces with single, remove strange symbols
|
const banList = document.getElementById("banned").value.replace(/,/g, ' ').replace(/\s\s+/g, ' ').replace(/[^\w\s]/g, '') //replace commas with spaces, replace double spaces with single, remove strange symbols
|
||||||
const remove = banList.split(" ");
|
const remove = banList.split(" ");
|
||||||
console.log('remove these', remove)
|
// console.log('remove these', remove)
|
||||||
console.log('community levels before', level.communityLevels)
|
// console.log('community levels before', level.communityLevels)
|
||||||
for (let i = 0; i < remove.length; i++) {
|
for (let i = 0; i < remove.length; i++) {
|
||||||
const index = level.communityLevels.indexOf(remove[i])
|
const index = level.communityLevels.indexOf(remove[i])
|
||||||
if (index !== -1) level.communityLevels.splice(index, 1);
|
if (index !== -1) {
|
||||||
|
level.communityLevels.splice(index, 1);
|
||||||
|
// console.log('removed level:', remove[i])
|
||||||
|
requestAnimationFrame(() => { simulation.makeTextLog(`banned level: <strong style="color: '#f00';">${remove[i]}</strong>`); });
|
||||||
}
|
}
|
||||||
console.log('community levels after', level.communityLevels)
|
}
|
||||||
console.log('Landgreen levels before', level.playableLevels)
|
// console.log('community levels after', level.communityLevels)
|
||||||
|
// console.log('Landgreen levels before', level.playableLevels)
|
||||||
for (let i = 0; i < remove.length; i++) {
|
for (let i = 0; i < remove.length; i++) {
|
||||||
if (level.playableLevels.length + level.communityLevels.length * simulation.isCommunityMaps < 10) break //can't remove too many levels
|
if (level.playableLevels.length + level.communityLevels.length * simulation.isCommunityMaps < 10) break //can't remove too many levels
|
||||||
const index = level.playableLevels.indexOf(remove[i])
|
const index = level.playableLevels.indexOf(remove[i])
|
||||||
if (index !== -1) level.playableLevels.splice(index, 1);
|
if (index !== -1) {
|
||||||
|
level.playableLevels.splice(index, 1);
|
||||||
|
// console.log('removed level:', remove[i])
|
||||||
|
requestAnimationFrame(() => { simulation.makeTextLog(`banned level: <strong style="color: '#f00';">${remove[i]}</strong>`); });
|
||||||
}
|
}
|
||||||
console.log('Landgreen levels after', level.playableLevels)
|
}
|
||||||
|
// console.log('Landgreen levels after', level.playableLevels)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (document.getElementById("seed").value) { //check for player entered seed in settings
|
if (document.getElementById("seed").value) { //check for player entered seed in settings
|
||||||
@@ -1607,15 +1615,11 @@ const level = {
|
|||||||
pushBlock(blocks[i].bodyA)
|
pushBlock(blocks[i].bodyA)
|
||||||
pushBlock(blocks[i].bodyB)
|
pushBlock(blocks[i].bodyB)
|
||||||
}
|
}
|
||||||
|
|
||||||
const mobTargets = Matter.Query.collides(this, mob)
|
const mobTargets = Matter.Query.collides(this, mob)
|
||||||
for (let i = 0; i < mobTargets.length; i++) {
|
for (let i = 0; i < mobTargets.length; i++) {
|
||||||
pushBlock(mobTargets[i].bodyA)
|
pushBlock(mobTargets[i].bodyA)
|
||||||
pushBlock(mobTargets[i].bodyB)
|
pushBlock(mobTargets[i].bodyB)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let pushPowerUp = (who) => {
|
let pushPowerUp = (who) => {
|
||||||
if (!who.isMover) {
|
if (!who.isMover) {
|
||||||
if ((this.VxGoal > 0 && who.velocity.x < this.VxGoal) || (this.VxGoal < 0 && who.velocity.x > this.VxGoal)) {
|
if ((this.VxGoal > 0 && who.velocity.x < this.VxGoal) || (this.VxGoal < 0 && who.velocity.x > this.VxGoal)) {
|
||||||
@@ -3398,34 +3402,45 @@ const level = {
|
|||||||
|
|
||||||
level.setPosToSpawn(2235, -1375); //normal spawn
|
level.setPosToSpawn(2235, -1375); //normal spawn
|
||||||
spawn.mapRect(level.enter.x, level.enter.y + 20, 100, 20); //bump for level entrance
|
spawn.mapRect(level.enter.x, level.enter.y + 20, 100, 20); //bump for level entrance
|
||||||
level.exit.x = 5150;
|
level.exit.x = 7875;
|
||||||
level.exit.y = -2705;
|
level.exit.y = -2480;
|
||||||
|
|
||||||
spawn.mapRect(level.exit.x, level.exit.y + 20, 100, 20); //bump for level exit
|
spawn.mapRect(level.exit.x, level.exit.y + 20, 100, 20); //bump for level exit
|
||||||
level.defaultZoom = 1800
|
level.defaultZoom = 1500
|
||||||
simulation.zoomTransition(level.defaultZoom)
|
simulation.zoomTransition(level.defaultZoom)
|
||||||
document.body.style.backgroundColor = "#d8d9dc";
|
document.body.style.backgroundColor = "#d0d2d4s";
|
||||||
color.map = "#262a2f"
|
// color.map = "#262a2f"
|
||||||
|
|
||||||
let isPowerLeft = true
|
let isPowerLeft = true
|
||||||
|
|
||||||
const movers = []
|
const movers = []
|
||||||
const moveSpeed = -5
|
//left side
|
||||||
movers.push(level.mover(125, -140, 925, 35, moveSpeed))
|
movers.push(level.mover(125, -140, 925, 35, -5))
|
||||||
movers.push(level.mover(1100, -437, 1100, 35, moveSpeed))
|
movers.push(level.mover(1100, -437, 1100, 35, -5))
|
||||||
movers.push(level.mover(2000, -600, 850, 35, moveSpeed))
|
movers.push(level.mover(2000, -600, 850, 35, -5))
|
||||||
|
//right side
|
||||||
const moveSpeedStopGo = 8
|
const moveSpeedStopGo = 8
|
||||||
movers.push(level.mover(2700, -200, 3600, 35, 0))
|
movers.push(level.mover(2700, -200, 3600, 35, 0))
|
||||||
const leftMoverSpeed = 6
|
|
||||||
movers.push(level.mover(6750, -450, 425, 350, leftMoverSpeed))
|
|
||||||
movers.push(level.mover(7675, -725, 500, 410, -leftMoverSpeed))
|
|
||||||
movers.push(level.mover(6750, -1075, 425, 50, -leftMoverSpeed))
|
|
||||||
movers.push(level.mover(5525, -1075, 450, 50, leftMoverSpeed))
|
|
||||||
movers.push(level.mover(7175, -215, 2275, 50, 3))
|
movers.push(level.mover(7175, -215, 2275, 50, 3))
|
||||||
movers.push(level.mover(6475, -215, 275, 100, -3))
|
movers.push(level.mover(6475, -215, 275, 100, -3))
|
||||||
|
movers.push(level.mover(6725, -500, 500, 375, 3))
|
||||||
|
|
||||||
const trains = []
|
movers.push(level.mover(7675, -725, 500, 410, 0))
|
||||||
trains.push(level.transport(6275, -2100, 600, 50, 8 + simulation.difficultyMode))
|
movers.push(level.mover(6775, -1075, 375, 50, 0))
|
||||||
trains.push(level.transport(6275, -2425, 600, 50, -8 - simulation.difficultyMode))
|
movers.push(level.mover(5525, -1075, 450, 50, 0))
|
||||||
|
movers.push(level.mover(6775, -2100, 375, 50, 0))
|
||||||
|
movers.push(level.mover(5450, -1900, 525, 50, 0))
|
||||||
|
|
||||||
|
function setMoverDirection(VxGoal) {
|
||||||
|
for (let i = 7; i < movers.length; i++) {
|
||||||
|
movers[i].VxGoal = VxGoal
|
||||||
|
}
|
||||||
|
}
|
||||||
|
setMoverDirection(0)
|
||||||
|
|
||||||
|
const buttonRight = level.button(7735, -1825)
|
||||||
|
buttonRight.isUp = true
|
||||||
|
const buttonLeft = level.button(5275, -1900)
|
||||||
|
|
||||||
const lasers = []
|
const lasers = []
|
||||||
const laserX = 3390 //3882 - 1130 / 2
|
const laserX = 3390 //3882 - 1130 / 2
|
||||||
@@ -3454,15 +3469,15 @@ const level = {
|
|||||||
if (isPowerLeft) {
|
if (isPowerLeft) {
|
||||||
if (!(simulation.cycle % 90)) spawnBlock(2730, -1600);
|
if (!(simulation.cycle % 90)) spawnBlock(2730, -1600);
|
||||||
} else {
|
} else {
|
||||||
for (let i = 0; i < trains.length; i++) {
|
// for (let i = 0; i < trains.length; i++) {
|
||||||
//oscillate back and forth
|
// //oscillate back and forth
|
||||||
if (trains[i].position.x < 5275) {
|
// if (trains[i].position.x < 5275) {
|
||||||
trains[i].changeDirection(true) //go right
|
// trains[i].changeDirection(true) //go right
|
||||||
} else if (trains[i].position.x > 7875) {
|
// } else if (trains[i].position.x > 7875) {
|
||||||
trains[i].changeDirection(false) //go left
|
// trains[i].changeDirection(false) //go left
|
||||||
}
|
// }
|
||||||
trains[i].move();
|
// trains[i].move();
|
||||||
}
|
// }
|
||||||
|
|
||||||
const rate = 160 //multiples of 32!
|
const rate = 160 //multiples of 32!
|
||||||
if ((simulation.cycle % rate) === 80) {
|
if ((simulation.cycle % rate) === 80) {
|
||||||
@@ -3513,6 +3528,20 @@ const level = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (buttonRight.isUp) {
|
||||||
|
buttonRight.query();
|
||||||
|
if (!buttonRight.isUp) {
|
||||||
|
buttonLeft.isUp = true //flip the other button up
|
||||||
|
setMoverDirection(-7)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (buttonLeft.isUp) {
|
||||||
|
buttonLeft.query();
|
||||||
|
if (!buttonLeft.isUp) {
|
||||||
|
buttonRight.isUp = true //flip the other button up
|
||||||
|
setMoverDirection(7)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (button1.isUp) {
|
if (button1.isUp) {
|
||||||
button1.query();
|
button1.query();
|
||||||
@@ -3544,19 +3573,20 @@ const level = {
|
|||||||
powerUps.addResearchToLevel() //needs to run after mobs are spawned
|
powerUps.addResearchToLevel() //needs to run after mobs are spawned
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
buttonRight.draw();
|
||||||
|
buttonLeft.draw();
|
||||||
button1.draw();
|
button1.draw();
|
||||||
for (let i = 0; i < movers.length; i++) movers[i].push();
|
for (let i = 0; i < movers.length; i++) movers[i].push();
|
||||||
level.exit.drawAndCheck();
|
level.exit.drawAndCheck();
|
||||||
level.enter.draw();
|
level.enter.draw();
|
||||||
ctx.fillStyle = "rgba(0,0,0,0.1)"
|
ctx.fillStyle = "rgba(0,0,0,0.1)"
|
||||||
ctx.fillRect(6937, -1050, 50, 675);
|
ctx.fillRect(6937, -2075, 50, 1775); //6937, -1050, 50, 675);
|
||||||
ctx.fillStyle = "rgba(0,255,255,0.15)" // ctx.fillStyle = "#f2f2f2"
|
ctx.fillStyle = "rgba(0,255,255,0.15)" // ctx.fillStyle = "#f2f2f2"
|
||||||
ctx.fillRect(4975, -3050, 475, 375); //exit room
|
ctx.fillRect(7675, -2875, 500, 425); //exit room
|
||||||
|
|
||||||
};
|
};
|
||||||
level.customTopLayer = () => {
|
level.customTopLayer = () => {
|
||||||
if (isPowerLeft) {
|
if (isPowerLeft) {
|
||||||
ctx.fillStyle = "rgba(0,0,0,0.1)"
|
ctx.fillStyle = "rgba(0,0,0,0.2)"
|
||||||
ctx.fillRect(2400, -1650, 7050, 2750) //right side
|
ctx.fillRect(2400, -1650, 7050, 2750) //right side
|
||||||
ctx.fillRect(4950, -3075, 3225, 1425);
|
ctx.fillRect(4950, -3075, 3225, 1425);
|
||||||
ctx.beginPath()
|
ctx.beginPath()
|
||||||
@@ -3572,7 +3602,7 @@ const level = {
|
|||||||
ctx.lineTo(2452, 65)
|
ctx.lineTo(2452, 65)
|
||||||
ctx.fill();
|
ctx.fill();
|
||||||
} else {
|
} else {
|
||||||
for (let i = 0; i < trains.length; i++) trains[i].draw()
|
// for (let i = 0; i < trains.length; i++) trains[i].draw()
|
||||||
ctx.beginPath()
|
ctx.beginPath()
|
||||||
ctx.moveTo(2526, -589);
|
ctx.moveTo(2526, -589);
|
||||||
ctx.lineTo(2531, -597)
|
ctx.lineTo(2531, -597)
|
||||||
@@ -3583,14 +3613,14 @@ const level = {
|
|||||||
ctx.lineTo(6618, 857)
|
ctx.lineTo(6618, 857)
|
||||||
ctx.lineTo(6622, 1100)
|
ctx.lineTo(6622, 1100)
|
||||||
ctx.lineTo(2521, 1100)
|
ctx.lineTo(2521, 1100)
|
||||||
ctx.fillStyle = "rgba(0,0,0,0.1)"
|
ctx.fillStyle = "rgba(0,0,0,0.2)"
|
||||||
ctx.fill();
|
ctx.fill();
|
||||||
ctx.fillRect(-100, -1650, 2625, 2750) //left side
|
ctx.fillRect(-100, -1650, 2625, 2750) //left side
|
||||||
for (let i = 0; i < lasers.length; i++) lasers[i].opticalQuery()
|
for (let i = 0; i < lasers.length; i++) lasers[i].opticalQuery()
|
||||||
}
|
}
|
||||||
ctx.fillStyle = "rgba(0,0,0,0.07)"
|
ctx.fillStyle = "rgba(0,0,0,0.07)"
|
||||||
ctx.fillRect(7675, -1825, 1775, 1650);
|
ctx.fillRect(7675, -2200, 1775, 2025);
|
||||||
ctx.fillRect(4975, -1900, 475, 825);
|
ctx.fillRect(4950, -2075, 500, 1000);
|
||||||
ctx.fillRect(2050, -1650, 350, 325) //entrance room
|
ctx.fillRect(2050, -1650, 350, 325) //entrance room
|
||||||
for (let i = 0; i < movers.length; i++) movers[i].draw();
|
for (let i = 0; i < movers.length; i++) movers[i].draw();
|
||||||
};
|
};
|
||||||
@@ -3609,8 +3639,6 @@ const level = {
|
|||||||
spawn.mapRect(4975, -1087, 550, 62);
|
spawn.mapRect(4975, -1087, 550, 62);
|
||||||
spawn.mapRect(4975, -1100, 500, 75);
|
spawn.mapRect(4975, -1100, 500, 75);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
spawn.mapRect(7875, -1100, 175, 25); //right 3 hop stairs
|
spawn.mapRect(7875, -1100, 175, 25); //right 3 hop stairs
|
||||||
spawn.mapRect(8075, -1450, 200, 25);
|
spawn.mapRect(8075, -1450, 200, 25);
|
||||||
spawn.mapRect(7675, -1825, 375, 25);
|
spawn.mapRect(7675, -1825, 375, 25);
|
||||||
@@ -3620,9 +3648,13 @@ const level = {
|
|||||||
spawn.mapRect(4900, -1575, 175, 25);
|
spawn.mapRect(4900, -1575, 175, 25);
|
||||||
spawn.mapRect(5125, -1900, 325, 25);
|
spawn.mapRect(5125, -1900, 325, 25);
|
||||||
spawn.mapRect(5225, -1875, 225, 625);
|
spawn.mapRect(5225, -1875, 225, 625);
|
||||||
|
spawn.mapRect(4950, -3075, 500, 1000);
|
||||||
|
|
||||||
|
//exit
|
||||||
|
spawn.mapRect(7675, -2450, 525, 250);
|
||||||
|
spawn.mapRect(7675, -3050, 550, 175);
|
||||||
|
spawn.mapRect(7675, -2925, 50, 175);
|
||||||
|
|
||||||
spawn.mapRect(5400, -3100, 50, 250); //exit
|
|
||||||
spawn.mapRect(4875, -2675, 675, 50); //exit
|
|
||||||
spawn.mapRect(1925, -1325, 550, 50); //entrance
|
spawn.mapRect(1925, -1325, 550, 50); //entrance
|
||||||
spawn.mapRect(2050, -1675, 50, 175); //entrance
|
spawn.mapRect(2050, -1675, 50, 175); //entrance
|
||||||
spawn.mapRect(1700, -200, 750, 275); //button shelf
|
spawn.mapRect(1700, -200, 750, 275); //button shelf
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ const mobs = {
|
|||||||
|
|
||||||
function applySlow(whom) {
|
function applySlow(whom) {
|
||||||
if (!whom.shield && !whom.isShielded && whom.alive) {
|
if (!whom.shield && !whom.isShielded && whom.alive) {
|
||||||
if (tech.isIceMaxHealthLoss && whom.health > 0.65 && whom.damageReduction > 0) whom.health = 0.66
|
if (tech.isIceMaxHealthLoss && whom.health > 0.66 && whom.damageReduction > 0) whom.health = 0.66
|
||||||
if (tech.isIceKill && whom.health < 0.34 && whom.damageReduction > 0 && whom.alive) {
|
if (tech.isIceKill && whom.health < 0.34 && whom.damageReduction > 0 && whom.alive) {
|
||||||
// whom.death();
|
// whom.death();
|
||||||
whom.damage(Infinity);
|
whom.damage(Infinity);
|
||||||
|
|||||||
52
js/player.js
@@ -546,7 +546,6 @@ const m = {
|
|||||||
if (tech.isFieldHarmReduction) dmg *= 0.5
|
if (tech.isFieldHarmReduction) dmg *= 0.5
|
||||||
if (tech.isHarmMACHO) dmg *= 0.4
|
if (tech.isHarmMACHO) dmg *= 0.4
|
||||||
if (tech.isImmortal) dmg *= 0.67
|
if (tech.isImmortal) dmg *= 0.67
|
||||||
if (tech.isSlowFPS) dmg *= 0.8
|
|
||||||
if (tech.energyRegen === 0) dmg *= 0.34
|
if (tech.energyRegen === 0) dmg *= 0.34
|
||||||
// if (tech.healthDrain) dmg *= 1 + 3.33 * tech.healthDrain //tech.healthDrain = 0.03 at one stack //cause more damage
|
// if (tech.healthDrain) dmg *= 1 + 3.33 * tech.healthDrain //tech.healthDrain = 0.03 at one stack //cause more damage
|
||||||
if (m.fieldMode === 0 || m.fieldMode === 3) dmg *= 0.973 ** m.coupling
|
if (m.fieldMode === 0 || m.fieldMode === 3) dmg *= 0.973 ** m.coupling
|
||||||
@@ -563,7 +562,7 @@ const m = {
|
|||||||
if (tech.isTurret && m.crouch) dmg *= 0.34;
|
if (tech.isTurret && m.crouch) dmg *= 0.34;
|
||||||
if (tech.isFirstDer && b.inventory[0] === b.activeGun) dmg *= 0.85 ** b.inventory.length
|
if (tech.isFirstDer && b.inventory[0] === b.activeGun) dmg *= 0.85 ** b.inventory.length
|
||||||
if (tech.isEnergyHealth) {
|
if (tech.isEnergyHealth) {
|
||||||
return Math.pow(dmg, 0.13) //defense has less effect
|
return Math.pow(dmg, 0.19) //defense has less effect
|
||||||
} else {
|
} else {
|
||||||
return dmg
|
return dmg
|
||||||
}
|
}
|
||||||
@@ -782,26 +781,37 @@ const m = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (m.defaultFPSCycle < m.cycle) requestAnimationFrame(normalFPS);
|
if (m.defaultFPSCycle < m.cycle) requestAnimationFrame(normalFPS);
|
||||||
if (tech.isSlowFPS) { // slow game
|
|
||||||
simulation.fpsCap = 30 //new fps
|
|
||||||
simulation.fpsInterval = 1000 / simulation.fpsCap;
|
|
||||||
//how long to wait to return to normal fps
|
|
||||||
m.defaultFPSCycle = m.cycle + 20 + Math.min(90, Math.floor(200 * dmg))
|
|
||||||
if (tech.isHarmFreeze) { //freeze all mobs
|
|
||||||
for (let i = 0, len = mob.length; i < len; i++) {
|
|
||||||
mobs.statusSlow(mob[i], 450)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (dmg > 0.05) { // freeze game for high damage hits
|
if (dmg > 0.05) { // freeze game for high damage hits
|
||||||
simulation.fpsCap = 4 //40 - Math.min(25, 100 * dmg)
|
simulation.fpsCap = 4 //40 - Math.min(25, 100 * dmg)
|
||||||
simulation.fpsInterval = 1000 / simulation.fpsCap;
|
simulation.fpsInterval = 1000 / simulation.fpsCap;
|
||||||
|
if (tech.isHarmFreeze) {
|
||||||
|
for (let i = 0, len = mob.length; i < len; i++) mobs.statusSlow(mob[i], 480) //freeze all mobs
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
simulation.fpsCap = simulation.fpsCapDefault
|
simulation.fpsCap = simulation.fpsCapDefault
|
||||||
simulation.fpsInterval = 1000 / simulation.fpsCap;
|
simulation.fpsInterval = 1000 / simulation.fpsCap;
|
||||||
}
|
}
|
||||||
m.defaultFPSCycle = m.cycle
|
m.defaultFPSCycle = m.cycle
|
||||||
}
|
// if (tech.isSlowFPS) { // slow game
|
||||||
|
// simulation.fpsCap = 30 //new fps
|
||||||
|
// simulation.fpsInterval = 1000 / simulation.fpsCap;
|
||||||
|
// //how long to wait to return to normal fps
|
||||||
|
// m.defaultFPSCycle = m.cycle + 20 + Math.min(90, Math.floor(200 * dmg))
|
||||||
|
// if (tech.isHarmFreeze) { //freeze all mobs
|
||||||
|
// for (let i = 0, len = mob.length; i < len; i++) {
|
||||||
|
// mobs.statusSlow(mob[i], 450)
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// if (dmg > 0.05) { // freeze game for high damage hits
|
||||||
|
// simulation.fpsCap = 4 //40 - Math.min(25, 100 * dmg)
|
||||||
|
// simulation.fpsInterval = 1000 / simulation.fpsCap;
|
||||||
|
// } else {
|
||||||
|
// simulation.fpsCap = simulation.fpsCapDefault
|
||||||
|
// simulation.fpsInterval = 1000 / simulation.fpsCap;
|
||||||
|
// }
|
||||||
|
// m.defaultFPSCycle = m.cycle
|
||||||
|
// }
|
||||||
// if (!noTransition) {
|
// if (!noTransition) {
|
||||||
// document.getElementById("health").style.transition = "width 0s ease-out"
|
// document.getElementById("health").style.transition = "width 0s ease-out"
|
||||||
// } else {
|
// } else {
|
||||||
@@ -2235,16 +2245,14 @@ const m = {
|
|||||||
// float towards player if looking at and in range or if very close to player
|
// float towards player if looking at and in range or if very close to player
|
||||||
if (
|
if (
|
||||||
dist2 < m.grabPowerUpRange2 &&
|
dist2 < m.grabPowerUpRange2 &&
|
||||||
(m.lookingAt(powerUp[i]) || dist2 < 1000) &&
|
(m.lookingAt(powerUp[i]) || dist2 < 10000) &&
|
||||||
Matter.Query.ray(map, powerUp[i].position, m.pos).length === 0
|
Matter.Query.ray(map, powerUp[i].position, m.pos).length === 0
|
||||||
) {
|
) {
|
||||||
|
if (!tech.isHealAttract || powerUp[i].name !== "heal") { //if you have accretion heals are already pulled in a different way
|
||||||
powerUp[i].force.x += 0.04 * (dxP / Math.sqrt(dist2)) * powerUp[i].mass;
|
powerUp[i].force.x += 0.04 * (dxP / Math.sqrt(dist2)) * powerUp[i].mass;
|
||||||
powerUp[i].force.y += 0.04 * (dyP / Math.sqrt(dist2)) * powerUp[i].mass - powerUp[i].mass * simulation.g; //negate gravity
|
powerUp[i].force.y += 0.04 * (dyP / Math.sqrt(dist2)) * powerUp[i].mass - powerUp[i].mass * simulation.g; //negate gravity
|
||||||
//extra friction
|
Matter.Body.setVelocity(powerUp[i], { x: powerUp[i].velocity.x * 0.11, y: powerUp[i].velocity.y * 0.11 }); //extra friction
|
||||||
Matter.Body.setVelocity(powerUp[i], {
|
}
|
||||||
x: powerUp[i].velocity.x * 0.11,
|
|
||||||
y: powerUp[i].velocity.y * 0.11
|
|
||||||
});
|
|
||||||
if ( //use power up if it is close enough
|
if ( //use power up if it is close enough
|
||||||
dist2 < 5000 &&
|
dist2 < 5000 &&
|
||||||
!simulation.isChoosing &&
|
!simulation.isChoosing &&
|
||||||
@@ -3784,7 +3792,7 @@ const m = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "metamaterial cloaking",
|
name: "metamaterial cloaking",
|
||||||
description: "when not firing activate <strong class='color-cloaked'>cloaking</strong><br>after <strong class='color-cloaked'>decloaking</strong> <strong>+333%</strong> <strong class='color-d'>damage</strong> for <strong>2</strong> s<br>generate <strong>6</strong> <strong class='color-f'>energy</strong> per second",
|
description: "<strong>+50%</strong> <strong class='color-defense'>defense</strong> while <strong class='color-cloaked'>cloaked</strong><br>after <strong class='color-cloaked'>decloaking</strong> <strong>+333%</strong> <strong class='color-d'>damage</strong> for <strong>2</strong> s<br>generate <strong>6</strong> <strong class='color-f'>energy</strong> per second",
|
||||||
effect: () => {
|
effect: () => {
|
||||||
m.fieldFire = true;
|
m.fieldFire = true;
|
||||||
m.fieldMeterColor = "#333";
|
m.fieldMeterColor = "#333";
|
||||||
@@ -3957,7 +3965,7 @@ const m = {
|
|||||||
//<br><strong class='color-block'>blocks</strong> can't <strong>collide</strong> with <strong>intangible</strong> mobs
|
//<br><strong class='color-block'>blocks</strong> can't <strong>collide</strong> with <strong>intangible</strong> mobs
|
||||||
//field <strong>radius</strong> decreases out of <strong>line of sight</strong>
|
//field <strong>radius</strong> decreases out of <strong>line of sight</strong>
|
||||||
//<strong>unlock</strong> <strong class='color-m'>tech</strong> from other <strong class='color-f'>fields</strong>
|
//<strong>unlock</strong> <strong class='color-m'>tech</strong> from other <strong class='color-f'>fields</strong>
|
||||||
description: "use <strong class='color-f'>energy</strong> to guide <strong class='color-block'>blocks</strong><br><strong class='color-m'>tech</strong>, <strong class='color-f'>fields</strong>, and <strong class='color-g'>guns</strong> have <strong>+2</strong> <strong>choice</strong><br>generate <strong>10</strong> <strong class='color-f'>energy</strong> per second",
|
description: "use <strong class='color-f'>energy</strong> to guide <strong class='color-block'>blocks</strong><br><strong class='color-m'>tech</strong>, <strong class='color-f'>fields</strong>, and <strong class='color-g'>guns</strong> have <strong>+2</strong> <strong>choices</strong><br>generate <strong>10</strong> <strong class='color-f'>energy</strong> per second",
|
||||||
effect: () => {
|
effect: () => {
|
||||||
m.fieldMeterColor = "#333"
|
m.fieldMeterColor = "#333"
|
||||||
m.eyeFillColor = m.fieldMeterColor
|
m.eyeFillColor = m.fieldMeterColor
|
||||||
|
|||||||
@@ -516,7 +516,7 @@ const powerUps = {
|
|||||||
const overHeal = m.health + heal * simulation.healScale - m.maxHealth //used with tech.isOverHeal
|
const overHeal = m.health + heal * simulation.healScale - m.maxHealth //used with tech.isOverHeal
|
||||||
const healOutput = Math.min(m.maxHealth - m.health, heal) * simulation.healScale
|
const healOutput = Math.min(m.maxHealth - m.health, heal) * simulation.healScale
|
||||||
m.addHealth(heal);
|
m.addHealth(heal);
|
||||||
simulation.makeTextLog(`<span class='color-var'>m</span>.health <span class='color-symbol'>+=</span> ${(healOutput).toFixed(3)}`) // <br>${m.health.toFixed(3)}
|
if (healOutput > 0) simulation.makeTextLog(`<span class='color-var'>m</span>.health <span class='color-symbol'>+=</span> ${(healOutput).toFixed(3)}`) // <br>${m.health.toFixed(3)}
|
||||||
if (tech.isOverHeal && overHeal > 0) { //tech quenching
|
if (tech.isOverHeal && overHeal > 0) { //tech quenching
|
||||||
const scaledOverHeal = overHeal * 0.9
|
const scaledOverHeal = overHeal * 0.9
|
||||||
m.damage(scaledOverHeal);
|
m.damage(scaledOverHeal);
|
||||||
@@ -582,7 +582,6 @@ const powerUps = {
|
|||||||
tech.healMaxEnergyBonus += 0.08 * tech.largerHeals * (tech.isHalfHeals ? 0.5 : 1)
|
tech.healMaxEnergyBonus += 0.08 * tech.largerHeals * (tech.isHalfHeals ? 0.5 : 1)
|
||||||
m.setMaxEnergy();
|
m.setMaxEnergy();
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
spawn(x, y, size) { //used to spawn a heal with a specific size / heal amount, not normally used
|
spawn(x, y, size) { //used to spawn a heal with a specific size / heal amount, not normally used
|
||||||
powerUps.directSpawn(x, y, "heal", false, null, size)
|
powerUps.directSpawn(x, y, "heal", false, null, size)
|
||||||
@@ -1313,7 +1312,7 @@ const powerUps = {
|
|||||||
powerUps.spawn(x, y, "coupling");
|
powerUps.spawn(x, y, "coupling");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (tech.isBoostPowerUps && Math.random() < 0.16) {
|
if (tech.isBoostPowerUps && Math.random() < 0.14) {
|
||||||
powerUps.spawn(x, y, "boost");
|
powerUps.spawn(x, y, "boost");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -765,8 +765,8 @@ const simulation = {
|
|||||||
|
|
||||||
input.endKeySensing();
|
input.endKeySensing();
|
||||||
simulation.ephemera = []
|
simulation.ephemera = []
|
||||||
b.removeAllGuns();
|
|
||||||
tech.setupAllTech(); //sets tech to default values
|
tech.setupAllTech(); //sets tech to default values
|
||||||
|
b.removeAllGuns();
|
||||||
tech.duplication = 0;
|
tech.duplication = 0;
|
||||||
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
|
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
|
||||||
if (b.guns[i].name === "laser") b.guns[i].chooseFireMethod()
|
if (b.guns[i].name === "laser") b.guns[i].chooseFireMethod()
|
||||||
|
|||||||
73
js/tech.js
@@ -228,7 +228,7 @@ const tech = {
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
if (tech.isDivisor && b.guns[b.activeGun].ammo % 3 === 0) dmg *= 1.83
|
if (tech.isDivisor && b.activeGun && b.guns[b.activeGun].ammo % 3 === 0) dmg *= 1.77
|
||||||
if (tech.isNoGroundDamage) dmg *= m.onGround ? 0.78 : 1.88
|
if (tech.isNoGroundDamage) dmg *= m.onGround ? 0.78 : 1.88
|
||||||
if (tech.isDilate) dmg *= 1.5 + 0.6 * Math.sin(m.cycle * 0.0075)
|
if (tech.isDilate) dmg *= 1.5 + 0.6 * Math.sin(m.cycle * 0.0075)
|
||||||
if (tech.isGunChoice && tech.buffedGun === b.inventoryGun) dmg *= 1 + 0.31 * b.inventory.length
|
if (tech.isGunChoice && tech.buffedGun === b.inventoryGun) dmg *= 1 + 0.31 * b.inventory.length
|
||||||
@@ -407,7 +407,7 @@ const tech = {
|
|||||||
{
|
{
|
||||||
name: "mass-energy equivalence",
|
name: "mass-energy equivalence",
|
||||||
// description: "<strong class='color-f'>energy</strong> protects you instead of <strong class='color-h'>health</strong><br>√ of <strong class='color-defense'>defense</strong> <strong>reduction</strong> reduces max <strong class='color-f'>energy</strong>",
|
// description: "<strong class='color-f'>energy</strong> protects you instead of <strong class='color-h'>health</strong><br>√ of <strong class='color-defense'>defense</strong> <strong>reduction</strong> reduces max <strong class='color-f'>energy</strong>",
|
||||||
description: "<strong class='color-f'>energy</strong> protects you instead of <strong class='color-h'>health</strong><br>exponentially <strong>reduced</strong> <strong class='color-defense'>defense</strong> <em>(~ x^0.13)</em>",
|
description: "<strong class='color-f'>energy</strong> protects you instead of <strong class='color-h'>health</strong><br>exponentially <strong>reduced</strong> <strong class='color-defense'>defense</strong> <em>(~ x^0.19)</em>",
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
frequency: 1,
|
frequency: 1,
|
||||||
@@ -542,7 +542,7 @@ const tech = {
|
|||||||
{
|
{
|
||||||
name: "ternary", //"divisor",
|
name: "ternary", //"divisor",
|
||||||
descriptionFunction() {
|
descriptionFunction() {
|
||||||
return `<strong>+83%</strong> <strong class='color-d'>damage</strong> while your current <strong class='color-g'>gun</strong><br>has <strong class='color-ammo'>ammo</strong> divisible by <strong>3</strong>`
|
return `<strong>+77%</strong> <strong class='color-d'>damage</strong> while your current <strong class='color-g'>gun</strong><br>has <strong class='color-ammo'>ammo</strong> divisible by <strong>3</strong>`
|
||||||
},
|
},
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
@@ -2475,16 +2475,16 @@ const tech = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "liquid cooling",
|
name: "refrigerant",
|
||||||
description: `after losing <strong class='color-h'>health</strong><br><strong class='color-s'>freeze</strong> all mobs for <strong>7</strong> seconds`,
|
description: `after losing at least <strong>5%</strong> <strong class='color-h'>health</strong><br><strong class='color-s'>freeze</strong> all mobs for <strong>7</strong> seconds`,
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
frequency: 2,
|
frequency: 1,
|
||||||
frequencyDefault: 2,
|
frequencyDefault: 1,
|
||||||
allowed() {
|
allowed() {
|
||||||
return tech.isSlowFPS
|
return true
|
||||||
},
|
},
|
||||||
requires: "clock gating",
|
requires: "",
|
||||||
effect() {
|
effect() {
|
||||||
tech.isHarmFreeze = true;
|
tech.isHarmFreeze = true;
|
||||||
},
|
},
|
||||||
@@ -2492,24 +2492,24 @@ const tech = {
|
|||||||
tech.isHarmFreeze = false;
|
tech.isHarmFreeze = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
name: "clock gating",
|
// name: "clock gating",
|
||||||
description: `after losing <strong class='color-h'>health</strong> <strong>slow</strong> <strong>time</strong> by <strong>50%</strong><br><strong>+20%</strong> <strong class='color-defense'>defense</strong>`,
|
// description: `after losing <strong class='color-h'>health</strong> <strong>slow</strong> <strong>time</strong> by <strong>50%</strong><br><strong>+20%</strong> <strong class='color-defense'>defense</strong>`,
|
||||||
maxCount: 1,
|
// maxCount: 1,
|
||||||
count: 0,
|
// count: 0,
|
||||||
frequency: 1,
|
// frequency: 1,
|
||||||
frequencyDefault: 1,
|
// frequencyDefault: 1,
|
||||||
allowed() {
|
// allowed() {
|
||||||
return simulation.fpsCapDefault > 45
|
// return simulation.fpsCapDefault > 45
|
||||||
},
|
// },
|
||||||
requires: "FPS above 45",
|
// requires: "FPS above 45",
|
||||||
effect() {
|
// effect() {
|
||||||
tech.isSlowFPS = true;
|
// tech.isSlowFPS = true;
|
||||||
},
|
// },
|
||||||
remove() {
|
// remove() {
|
||||||
tech.isSlowFPS = false;
|
// tech.isSlowFPS = false;
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
|
|
||||||
{
|
{
|
||||||
name: "piezoelectricity",
|
name: "piezoelectricity",
|
||||||
@@ -2639,7 +2639,7 @@ const tech = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Maxwells demon",
|
name: "Maxwells demon",
|
||||||
description: "<strong class='color-f'>energy</strong> above your max decays <strong>96%</strong> slower<br><strong>+5%</strong> <strong class='color-junk'>JUNK</strong> to <strong class='color-m'>tech</strong> pool",
|
description: "<strong class='color-f'>energy</strong> above max decays by <strong style = 'text-decoration: line-through;'>30%</strong> <strong>1%</strong> per second<br><strong>+5%</strong> <strong class='color-junk'>JUNK</strong> to <strong class='color-m'>tech</strong> pool",
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
frequency: 2,
|
frequency: 2,
|
||||||
@@ -2649,7 +2649,7 @@ const tech = {
|
|||||||
},
|
},
|
||||||
requires: "energy above your max",
|
requires: "energy above your max",
|
||||||
effect() {
|
effect() {
|
||||||
tech.overfillDrain = 0.94 //70% = 1-(1-0.75)/(1-0.15) //92% = 1-(1-0.75)/(1-0.87)
|
tech.overfillDrain = 0.99 //70% = 1-(1-0.75)/(1-0.15) //92% = 1-(1-0.75)/(1-0.87)
|
||||||
this.refundAmount += tech.addJunkTechToPool(0.05)
|
this.refundAmount += tech.addJunkTechToPool(0.05)
|
||||||
},
|
},
|
||||||
refundAmount: 0,
|
refundAmount: 0,
|
||||||
@@ -3574,7 +3574,7 @@ const tech = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "dark patterns",
|
name: "dark patterns",
|
||||||
description: "<strong>+15%</strong> <strong class='color-d'>damage</strong><br><strong>+15%</strong> <strong class='color-junk'>JUNK</strong> to <strong class='color-m'>tech</strong> pool",
|
description: "<strong>+17%</strong> <strong class='color-d'>damage</strong><br><strong>+17%</strong> <strong class='color-junk'>JUNK</strong> to <strong class='color-m'>tech</strong> pool",
|
||||||
maxCount: 9,
|
maxCount: 9,
|
||||||
count: 0,
|
count: 0,
|
||||||
frequency: 1,
|
frequency: 1,
|
||||||
@@ -3583,10 +3583,10 @@ const tech = {
|
|||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
requires: "",
|
requires: "",
|
||||||
damage: 1.15,
|
damage: 1.17,
|
||||||
effect() {
|
effect() {
|
||||||
tech.damage *= this.damage
|
tech.damage *= this.damage
|
||||||
this.refundAmount += tech.addJunkTechToPool(0.15)
|
this.refundAmount += tech.addJunkTechToPool(0.17)
|
||||||
},
|
},
|
||||||
refundAmount: 0,
|
refundAmount: 0,
|
||||||
remove() {
|
remove() {
|
||||||
@@ -3599,7 +3599,7 @@ const tech = {
|
|||||||
{
|
{
|
||||||
name: "exciton",
|
name: "exciton",
|
||||||
descriptionFunction() {
|
descriptionFunction() {
|
||||||
return `<span style = 'font-size:94%;'>after mobs <strong>die</strong> they have a <strong>16%</strong> chance to<br>spawn ${powerUps.orb.boost(1)} that give <strong>+${(powerUps.boost.damage * 100).toFixed(0)}%</strong> <strong class='color-d'>damage</strong> for <strong>${(powerUps.boost.duration / 60).toFixed(0)}</strong> seconds</span>`
|
return `<span style = 'font-size:94%;'>after mobs <strong>die</strong> they have a <strong>14%</strong> chance to<br>spawn ${powerUps.orb.boost(1)} that give <strong>+${(powerUps.boost.damage * 100).toFixed(0)}%</strong> <strong class='color-d'>damage</strong> for <strong>${(powerUps.boost.duration / 60).toFixed(0)}</strong> seconds</span>`
|
||||||
},
|
},
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
@@ -4181,8 +4181,8 @@ const tech = {
|
|||||||
}
|
}
|
||||||
powerUps.spawn(m.pos.x, m.pos.y, "gun");
|
powerUps.spawn(m.pos.x, m.pos.y, "gun");
|
||||||
// powerUps.spawn(m.pos.x, m.pos.y, "gun");
|
// powerUps.spawn(m.pos.x, m.pos.y, "gun");
|
||||||
tech.tech[choose].count = 0;
|
|
||||||
tech.tech[choose].remove(); // remove a random tech form the list of tech you have
|
tech.tech[choose].remove(); // remove a random tech form the list of tech you have
|
||||||
|
// tech.tech[choose].count = 0;
|
||||||
tech.tech[choose].isLost = true
|
tech.tech[choose].isLost = true
|
||||||
simulation.updateTechHUD();
|
simulation.updateTechHUD();
|
||||||
},
|
},
|
||||||
@@ -7502,7 +7502,8 @@ const tech = {
|
|||||||
{
|
{
|
||||||
name: "dynamic equilibrium",
|
name: "dynamic equilibrium",
|
||||||
descriptionFunction() {
|
descriptionFunction() {
|
||||||
return `increase <strong class='color-d'>damage</strong> by your <strong class='color-defense'>defense</strong> and<br><strong>5%</strong> of your last ${tech.isEnergyHealth ? "<strong class='color-f'>energy</strong>" : "<strong class='color-h'>health</strong>"} loss <em style = 'font-size:94%;'>(+${(100 * Math.max(5, tech.lastHitDamage) * m.lastHit * (2 - m.defense())).toFixed(0)}% damage)</em>`
|
// return `increase <strong class='color-d'>damage</strong> by your <strong class='color-defense'>defense</strong> and<br><strong>5%</strong> of your last ${tech.isEnergyHealth ? "<strong class='color-f'>energy</strong>" : "<strong class='color-h'>health</strong>"} loss <em style = 'font-size:94%;'>(+${(100 * Math.max(5, tech.lastHitDamage) * m.lastHit * (2 - m.defense())).toFixed(0)}% damage)</em>`
|
||||||
|
return `increase <strong class='color-d'>damage</strong> by your last ${tech.isEnergyHealth ? "<strong class='color-f'>energy</strong>" : "<strong class='color-h'>health</strong>"} loss<br> scales with <strong class='color-defense'>defense</strong> <em style = 'font-size:94%;'>(+${(100 * Math.max(5, tech.lastHitDamage) * m.lastHit * (2 - m.defense())).toFixed(0)}% damage)</em>`
|
||||||
}, // = <strong>+${10*m.defense()}%</strong>
|
}, // = <strong>+${10*m.defense()}%</strong>
|
||||||
// descriptionFunction() { return `increase <strong class='color-d'>damage</strong> by your last ${tech.isEnergyHealth ? "<strong class='color-f'>energy</strong>" : "<strong class='color-h'>health</strong>"} loss<br><strong style = 'font-size:90%;'>(${(tech.lastHitDamage).toFixed(0)}%)(${(100*m.lastHit).toFixed(0)} ${tech.isEnergyHealth ? "<strong class='color-f'>energy</strong>" : "<strong class='color-h'>health</strong>"})(${2 - m.defense()} <strong class='color-defense'>defense</strong>) = ${(100*tech.lastHitDamage * m.lastHit * (2 - m.defense())).toFixed(0)}% <strong class='color-d'>damage</strong></strong> ` }, // = <strong>+${10*m.defense()}%</strong>
|
// descriptionFunction() { return `increase <strong class='color-d'>damage</strong> by your last ${tech.isEnergyHealth ? "<strong class='color-f'>energy</strong>" : "<strong class='color-h'>health</strong>"} loss<br><strong style = 'font-size:90%;'>(${(tech.lastHitDamage).toFixed(0)}%)(${(100*m.lastHit).toFixed(0)} ${tech.isEnergyHealth ? "<strong class='color-f'>energy</strong>" : "<strong class='color-h'>health</strong>"})(${2 - m.defense()} <strong class='color-defense'>defense</strong>) = ${(100*tech.lastHitDamage * m.lastHit * (2 - m.defense())).toFixed(0)}% <strong class='color-d'>damage</strong></strong> ` }, // = <strong>+${10*m.defense()}%</strong>
|
||||||
isFieldTech: true,
|
isFieldTech: true,
|
||||||
@@ -7515,7 +7516,7 @@ const tech = {
|
|||||||
},
|
},
|
||||||
requires: "negative mass, pilot wave, not patch",
|
requires: "negative mass, pilot wave, not patch",
|
||||||
effect() {
|
effect() {
|
||||||
tech.lastHitDamage += 5;
|
tech.lastHitDamage += 4;
|
||||||
},
|
},
|
||||||
remove() {
|
remove() {
|
||||||
tech.lastHitDamage = 0;
|
tech.lastHitDamage = 0;
|
||||||
|
|||||||
26
todo.txt
@@ -1,18 +1,18 @@
|
|||||||
******************************************************** NEXT PATCH **************************************************
|
******************************************************** NEXT PATCH **************************************************
|
||||||
|
|
||||||
new community map!! underpass by Richard0820
|
factory: rewrote the end
|
||||||
|
|
||||||
duplicated power ups aren't circles
|
clock gating was removed because it's annoying
|
||||||
metastability makes power ups triangles instead of circles
|
liquid cooling -> refrigerant - freezes mobs after losing at least 5% health
|
||||||
3->4 seconds of half life before exploding
|
mass-energy gets more effect from defense (0.13 -> 0.19)
|
||||||
only metastability duplicated power ups have the lighting graphic
|
ternary 84 -> 77% damage
|
||||||
|
dark patterns 15 -> 17% damage and JUNK
|
||||||
|
Maxwell's demon 3% -> 1% energy loss above max
|
||||||
|
exciton 16 -> 14% chance to drop
|
||||||
|
|
||||||
mob's that fall off the map now die instead of just being removed
|
10% increase in overall mob health
|
||||||
so they can still spawn power ups
|
new images
|
||||||
you can pick up power ups from slightly farther away (450)
|
bug fixes
|
||||||
but less far away when not facing the power up (100)
|
|
||||||
accretion has less lag at high amounts of heal power ups following you
|
|
||||||
several other bug fixes
|
|
||||||
|
|
||||||
*********************************************************** TODO *****************************************************
|
*********************************************************** TODO *****************************************************
|
||||||
|
|
||||||
@@ -34,9 +34,6 @@ mobs attack mines
|
|||||||
mines periodically set all mobs to have player location to be the mine
|
mines periodically set all mobs to have player location to be the mine
|
||||||
is this going to work with all mob vision types?
|
is this going to work with all mob vision types?
|
||||||
|
|
||||||
maybe use ⚆ in game text?
|
|
||||||
increase font?
|
|
||||||
|
|
||||||
rework quantum eraser
|
rework quantum eraser
|
||||||
|
|
||||||
test bremsstrahlung damage
|
test bremsstrahlung damage
|
||||||
@@ -1229,7 +1226,6 @@ if pause is pressed while selecting power ups, display pause menu on top of sele
|
|||||||
***past style themes***
|
***past style themes***
|
||||||
field emitter - bipedal white robot spherical gun turret on bird legs
|
field emitter - bipedal white robot spherical gun turret on bird legs
|
||||||
damaged dirty white robot spherical gun turret on bird legs in the style of Solarpunk
|
damaged dirty white robot spherical gun turret on bird legs in the style of Solarpunk
|
||||||
a white spherical bipedal mech standing motionless while black lines travel quickly in the background, minimalist style --no arms --v5
|
|
||||||
standing wave - a 3-D cyan transparent nested concentric aligned centered sphere with rings
|
standing wave - a 3-D cyan transparent nested concentric aligned centered sphere with rings
|
||||||
by Philippe Starck
|
by Philippe Starck
|
||||||
perfect diamagnetism - physics magnetic field chalk diagram
|
perfect diamagnetism - physics magnetic field chalk diagram
|
||||||
|
|||||||