play
@@ -2531,8 +2529,8 @@ const level = {
//bonus power ups for clearing runs in the last game
if (!simulation.isCheating && localSettings.levelsClearedLastGame > 1) {
for (let i = 0; i < localSettings.levelsClearedLastGame / 3; i++) powerUps.spawn(2095 + 2 * Math.random(), -1270 - 50 * i, "tech", false); //spawn a tech for levels cleared in last game
- simulation.makeTextLog(`for (let i
= 0; i
< localSettings.levelsClearedLastGame
/ 3; i
++)`);
- simulation.makeTextLog(`{ powerUps.spawn(m.pos.x, m.pos.y, "tech")
//simulation superposition}`);
+ simulation.inGameConsole(`for (let i
= 0; i
< localSettings.levelsClearedLastGame
/ 3; i
++)`);
+ simulation.inGameConsole(`{ powerUps.spawn(m.pos.x, m.pos.y, "tech")
//simulation superposition}`);
localSettings.levelsClearedLastGame = 0 //after getting bonus power ups reset run history
if (localSettings.isAllowed) localStorage.setItem("localSettings", JSON.stringify(localSettings)); //update local storage
}
@@ -2981,7 +2979,7 @@ const level = {
if (gateButton.isUp) {
gateButton.query();
if (!gateButton.isUp) {
- simulation.makeTextLog(`station gate opened`, 360);
+ simulation.inGameConsole(`station gate opened`, 360);
if (stationNumber > 0) {
if (!isExitOpen && gatesOpenRight < stationNumber) level.newLevelOrPhase() //run some new level tech effects
gatesOpenRight = stationNumber
@@ -2993,7 +2991,7 @@ const level = {
gatesOpenRight = stationNumber
}
if (Math.abs(stationNumber) > 0 && ((Math.abs(stationNumber) + 1) % stationList.length) === 0) {
- simulation.makeTextLog(`level exit opened`, 360);
+ simulation.inGameConsole(`level exit opened`, 360);
isExitOpen = true;
}
}
@@ -8574,7 +8572,7 @@ const level = {
},
stronghold() { // player made level by Francois 👑 from discord
- simulation.makeTextLog(`
stronghold by
Francois`);
+ simulation.inGameConsole(`
stronghold by
Francois`);
const boost1 = level.boost(1470, -250, 1080)
const boost2 = level.boost(-370, 0, 800)
@@ -8744,7 +8742,7 @@ const level = {
powerUps.addResearchToLevel() //needs to run after mobs are spawned
},
basement() { // player made level by Francois 👑 from discord
- simulation.makeTextLog(`
basement by
Francois`);
+ simulation.inGameConsole(`
basement by
Francois`);
let button, door, buttonDoor, buttonPlateformEnd, doorPlateform
let isLevelReversed = Math.random();
if (isLevelReversed < 0.7) {
@@ -9028,7 +9026,7 @@ const level = {
powerUps.chooseRandomPowerUp(3100, 1630);
},
// detours() { //by Francois from discord
- // simulation.makeTextLog(`
detours by
Francois`);
+ // simulation.inGameConsole(`
detours by
Francois`);
// level.setPosToSpawn(0, 0); //lower start
// level.exit.y = 150;
// spawn.mapRect(level.enter.x, 45, 100, 20);
@@ -9341,7 +9339,7 @@ const level = {
// }
// },
house() { //by Francois from discord
- simulation.makeTextLog(`
house by
Francois`);
+ simulation.inGameConsole(`
house by
Francois`);
const rotor = level.rotor(4251, -325, 120, 20, 200, 0, 0.01, 0, -0.0001);
const hazard = level.hazard(4350, -1000, 300, 110);
const doorBedroom = level.door(1152, -1150, 25, 250, 250);
@@ -9817,7 +9815,7 @@ const level = {
}
},
perplex() { //by Oranger from discord
- simulation.makeTextLog(`
perplex by
Oranger`);
+ simulation.inGameConsole(`
perplex by
Oranger`);
document.body.style.backgroundColor = "#dcdcde";
level.setPosToSpawn(-600, 400);
spawn.mapRect(level.enter.x, level.enter.y + 20, 100, 20);
@@ -10003,7 +10001,7 @@ const level = {
spawn.secondaryBossChance(7725, 2275)
},
coliseum() {
- simulation.makeTextLog(`
coliseum by
iNoobBoi`);
+ simulation.inGameConsole(`
coliseum by
iNoobBoi`);
level.custom = () => {
level.exit.drawAndCheck();
@@ -10154,7 +10152,7 @@ const level = {
spawn.secondaryBossChance(6600, 600)
},
crossfire() {
- simulation.makeTextLog(`
crossfire by
iNoobBoi`);
+ simulation.inGameConsole(`
crossfire by
iNoobBoi`);
//*1.5
//Level Setup
@@ -10319,7 +10317,7 @@ const level = {
spawn.debris(9300, -900, 400, debrisCount);
},
vats() { // Made by Dablux#6610 on Discord
- simulation.makeTextLog(`
vats by
Dablux`);
+ simulation.inGameConsole(`
vats by
Dablux`);
simulation.zoomScale = 1500;
level.setPosToSpawn(4400, -1060)
@@ -10761,7 +10759,7 @@ const level = {
}
},
ngon() { //make by Oranger
- simulation.makeTextLog(`
"ngon" by
Oranger`);
+ simulation.inGameConsole(`
"ngon" by
Oranger`);
document.body.style.backgroundColor = "#dcdcde";
let needGravity = [];
@@ -11166,7 +11164,7 @@ const level = {
}
},
tunnel() { // by Scarlettt
- simulation.makeTextLog(`
tunnel by
Scarlettt`);
+ simulation.inGameConsole(`
tunnel by
Scarlettt`);
level.custom = () => {
level.exit.drawAndCheck();
@@ -11640,7 +11638,7 @@ const level = {
}
},
run() {
- simulation.makeTextLog(`
run by
iNoobBoi`);
+ simulation.inGameConsole(`
run by
iNoobBoi`);
addPartToMap = (len) => { //adds new map elements to the level while the level is already running //don't forget to run simulation.draw.setPaths() after you all the the elements so they show up visually
map[len].collisionFilter.category = cat.map;
@@ -11689,14 +11687,14 @@ const level = {
addPartToMap(map.length - 1);
simulation.draw.setPaths();
- simulation.makeTextLog(`
UNKNOWN: "Well done. Now climb."`, 600);
- simulation.makeTextLog(`
UNKNOWN: "I left a gift at the top."`, 600);
+ simulation.inGameConsole(`
UNKNOWN: "Well done. Now climb."`, 600);
+ simulation.inGameConsole(`
UNKNOWN: "I left a gift at the top."`, 600);
climbTime = true;
} //toggles on a mapRect when player passes a certain area
if (m.pos.x > 9000 && endTime === false) {
- simulation.makeTextLog("
UNKNOWN: \"Good luck. I hope you get out of here.\"", 600);
+ simulation.inGameConsole("
UNKNOWN: \"Good luck. I hope you get out of here.\"", 600);
endTime = true;
}
@@ -11877,11 +11875,11 @@ const level = {
//Mob Spawning
setTimeout(() => {
- simulation.makeTextLog("
UNKNOWN: \"You cannot kill them.\"", 600);
+ simulation.inGameConsole("
UNKNOWN: \"You cannot kill them.\"", 600);
}, 2000);
setTimeout(() => {
- simulation.makeTextLog("
UNKNOWN: \"But I have slowed them down for you.\"", 600);
+ simulation.inGameConsole("
UNKNOWN: \"But I have slowed them down for you.\"", 600);
}, 6000);
@@ -11897,7 +11895,7 @@ const level = {
spawn[runMobList[Math.floor(Math.random() * runMobList.length)]](6600, -1000);
setTimeout(() => {
- simulation.makeTextLog("
UNKNOWN: \"Run.\"", 600);
+ simulation.inGameConsole("
UNKNOWN: \"Run.\"", 600);
}, 10000);
} //some of the mobs
if (simulation.difficulty > 20) {
@@ -11907,7 +11905,7 @@ const level = {
spawn[runMobList[Math.floor(Math.random() * runMobList.length)]](7400, -800);
setTimeout(() => {
- simulation.makeTextLog("
UNKNOWN: \"RUN!\"", 600);
+ simulation.inGameConsole("
UNKNOWN: \"RUN!\"", 600);
}, 11000);
} //most of the mobs
if (simulation.difficulty > 30) {
@@ -11917,7 +11915,7 @@ const level = {
spawn[runMobList[Math.floor(Math.random() * runMobList.length)]](7500, -300);
setTimeout(() => {
- simulation.makeTextLog("
UNKNOWN: \"GET OUT OF HERE.\"", 600);
+ simulation.inGameConsole("
UNKNOWN: \"GET OUT OF HERE.\"", 600);
}, 12000);
} //all the mobs
@@ -11926,7 +11924,7 @@ const level = {
spawn.randomLevelBoss(-2200, -700, ["powerUpBossBaby", "blockBoss", "revolutionBoss"]);
setTimeout(() => {
- simulation.makeTextLog("
UNKNOWN: \"They are coming for you.\"", 600);
+ simulation.inGameConsole("
UNKNOWN: \"They are coming for you.\"", 600);
}, 14000);
}
anotherBoss(-1800, -700); //custom second boss spawn
@@ -11982,7 +11980,7 @@ const level = {
}
},
islands() {
- simulation.makeTextLog(`
islands by
Richard0820`);
+ simulation.inGameConsole(`
islands by
Richard0820`);
const boost1 = level.boost(58500, -18264, 1300);
let portal2, portal3;
@@ -12327,7 +12325,7 @@ const level = {
powerUps.spawn(3000, -230, "heal");
},
temple() {
- simulation.makeTextLog(`
temple by
Scar1337`);
+ simulation.inGameConsole(`
temple by
Scar1337`);
const V = Vector;
const Equation = (function () {
@@ -13489,7 +13487,7 @@ const level = {
if (!isInBounds) {
m.damage(0.1 * simulation.difficultyMode);
trapPlayer(level.enter.x, level.enter.y);
- simulation.makeTextLog("
" + name + ": You thought I could let you get away with that?");
+ simulation.inGameConsole("
" + name + ": You thought I could let you get away with that?");
}
},
room0() {
@@ -13895,7 +13893,7 @@ const level = {
setPos(a, b);
freeze(a);
};
- const makeLore = (x, t) => simulation.makeTextLog(`
${name}:
${x}
`, t);
+ const makeLore = (x, t) => simulation.inGameConsole(`
${name}:
${x}
`, t);
level.custom = () => {
// All the logic gets handled here. How nice!
for (const i in LogicHandler) {
@@ -13924,7 +13922,7 @@ const level = {
};
},
dripp() {
- simulation.makeTextLog(`
dripp by
M. B.`);
+ simulation.inGameConsole(`
dripp by
M. B.`);
const door = level.door(780, -350, 15, 400, 265);
const buttonDoor = level.button(420, -10);
@@ -14119,7 +14117,7 @@ const level = {
},
biohazard() {
// MAP BY INOOBBOI AND THESHWARMA
- simulation.makeTextLog(`
biohazard by
INOOBBOI and
THESHWARMA`);
+ simulation.inGameConsole(`
biohazard by
INOOBBOI and
THESHWARMA`);
// set here for the cutscene later
level.setPosToSpawn(-2800, -150)
@@ -15266,7 +15264,7 @@ const level = {
anotherBoss(0, 0) //will only spawn historyBoss if there is an additional boss
},
stereoMadness() {
- simulation.makeTextLog(`
stereoMadness by
Richard0820`);
+ simulation.inGameConsole(`
stereoMadness by
Richard0820`);
let totalCoin = 0;
const hunter = function (x, y, radius = 30) { //doesn't stop chasing until past 105000
mobs.spawn(x, y, 6, radius, "black");
@@ -15280,7 +15278,7 @@ const level = {
me.memory = Infinity;
me.seeAtDistance2 = Infinity;
Matter.Body.setDensity(me, 1)
- simulation.makeTextLog(`
Ω: Intruder Detected`);
+ simulation.inGameConsole(`
Ω: Intruder Detected`);
me.boost = 10;
me.do = function () {
if (me.boost == 1 && m.fieldMode == 3 || m.fieldMode == 9 && me.boost == 1) {
@@ -15463,7 +15461,7 @@ const level = {
innerBar.style.backgroundColor = m.eyeFillColor;
}
if (m.pos.x > 25360 && textlogOne == 0) {
- simulation.makeTextLog(`
A stong force pushes you forward...
`)
+ simulation.inGameConsole(`
A stong force pushes you forward...
`)
textlogOne++;
}
if (m.pos.x < -3000) {
@@ -15473,12 +15471,12 @@ const level = {
});
if (textlogTwo == 0)
- simulation.makeTextLog(`
A strong force pushes you away...
`);
+ simulation.inGameConsole(`
A strong force pushes you away...
`);
textlogTwo++;
}
if (m.pos.y > 1055) {
Matter.Body.setPosition(player, { x: 0, y: -150 });
- simulation.makeTextLog(`
There is nowhere to run...
`);
+ simulation.inGameConsole(`
There is nowhere to run...
`);
m.damage(0.1 * simulation.difficultyMode);
}
if (m.alive == false && barThere == true) {
@@ -16080,7 +16078,7 @@ const level = {
}
document.body.style.transitionDuration = "0ms";
document.body.style.backgroundColor = "#696969";
- simulation.makeTextLog(`
You have earned: ` + Math.min(3, totalCoin) + ` tech
`)
+ simulation.inGameConsole(`
You have earned: ` + Math.min(3, totalCoin) + ` tech
`)
if (barThere == true) { //only runs once
document.body.removeChild(bar);
for (let i = 0, len = Math.min(3, totalCoin); i < len; i++) powerUps.directSpawn(player.position.x, player.position.y, "tech");
@@ -16846,7 +16844,7 @@ const level = {
hunter(0, -1000)
},
yingYang() {
- simulation.makeTextLog(`
yingYang by
Richard0820`);
+ simulation.inGameConsole(`
yingYang by
Richard0820`);
let destroyed = false;
const lock = level.door(425, -1400, 50, 300, 300);
@@ -17198,7 +17196,7 @@ const level = {
powerUps.addResearchToLevel()
},
staircase() {
- simulation.makeTextLog(`
staircase by
ryanbear`);
+ simulation.inGameConsole(`
staircase by
ryanbear`);
level.custom = () => {
level.exit.drawAndCheck();
@@ -17286,7 +17284,7 @@ const level = {
powerUps.addResearchToLevel() //needs to run after mobs are spawned
},
fortress() {
- simulation.makeTextLog(`
fortress by
Desboot`);
+ simulation.inGameConsole(`
fortress by
Desboot`);
const boost1 = level.boost(3600, -250, 1000)
const boost2 = level.boost(60, -604, 1000)
const boost3 = level.boost(2160, -1260, 1000)
@@ -17427,7 +17425,7 @@ const level = {
powerUps.addResearchToLevel() //needs to run after mobs are spawned
},
commandeer() {
- simulation.makeTextLog(`
commandeer by
Desboot`);
+ simulation.inGameConsole(`
commandeer by
Desboot`);
let waterFallWidth = 400
let waterFallX = 15900
@@ -18030,7 +18028,7 @@ const level = {
powerUps.addResearchToLevel() //needs to run after mobs are spawned
},
clock() {
- simulation.makeTextLog(`
clock by
Cornbread 2100`);
+ simulation.inGameConsole(`
clock by
Cornbread 2100`);
function drawBackgroundGear(x, y, r1, r2, rot, color, speed, numTeeth = 5, toothWidth = 75, linew = 2) {
var vertices = getGearVertices(x, y, r1, r2, numTeeth, simulation.cycle * speed + rot, toothWidth / 100);
@@ -19768,7 +19766,7 @@ const level = {
}
},
buttonbutton() {
- simulation.makeTextLog(`
buttonbutton by
||Destabilized E||`);
+ simulation.inGameConsole(`
buttonbutton by
||Destabilized E||`);
const mover = level.mover(1425, -1949, 600, 25); //x,y,width.height,VxGoal,force
let portal
@@ -19875,7 +19873,7 @@ const level = {
spawn.randomLevelBoss(1840, 675)
},
movers() {
- simulation.makeTextLog(`
movers by
ryanbear`);
+ simulation.inGameConsole(`
movers by
ryanbear`);
level.custom = () => {
level.exit.drawAndCheck();
level.enter.draw();
@@ -20028,7 +20026,7 @@ const level = {
powerUps.addResearchToLevel() //needs to run after mobs are spawned
},
downpour() {
- simulation.makeTextLog(`
Downpour by
DesBoot`);
+ simulation.inGameConsole(`
Downpour by
DesBoot`);
let mobsspawned = 0
const laser = level.hazard(7492, -2612, 10, 500, 0.3) //laserintro
@@ -20063,7 +20061,7 @@ const level = {
// color.map = "#444" //custom map color
- //simulation.makeTextLog(stopcycle)
+ //simulation.inGameConsole(stopcycle)
level.custom = () => {
do {
@@ -20090,17 +20088,17 @@ const level = {
// }
// if (rainCount > 12) {
// rainCount = 1
- // simulation.makeTextLog(rainCount)
+ // simulation.inGameConsole(rainCount)
// } else {
// rainCount = rainCount + 1
- // simulation.makeTextLog(rainCount)
+ // simulation.inGameConsole(rainCount)
// }
} while (Math.random() < 0.8);
- //simulation.makeTextLog(stopcycle)
- //simulation.makeTextLog(m.cycle)
+ //simulation.inGameConsole(stopcycle)
+ //simulation.inGameConsole(m.cycle)
// ctx.fillStyle = "rgba(228,255,0,0.8)"
- // //simulation.makeTextLog(stopcycle)
+ // //simulation.inGameConsole(stopcycle)
// ctx.fillRect(50.4, -1210.0, 100, 100)
// stopcycle = m.cycle + Math.random * 600;
//stopcycle = m.cycles + Math.random * 600
@@ -22895,7 +22893,7 @@ const level = {
Object.assign(spawn, obj); //ez
},
superNgonBros() {
- simulation.makeTextLog(`
Super N-gon Bros by
DesBoot`);
+ simulation.inGameConsole(`
Super N-gon Bros by
DesBoot`);
let bowserKilled = 0
let flagY = -750
@@ -23019,19 +23017,19 @@ const level = {
me.onDeath = function () {
if (Math.random() < 0.1) {
spawn.randomSmallMob(me.position.x, me.position.y - 75);
- simulation.makeTextLog('mob')
+ simulation.inGameConsole('mob')
} else {
if (Math.random() < 0.07) {
powerUps.spawn(me.position.x, me.position.y + (75 * (player.velocity.y / Math.abs(player.velocity.y))), "tech", true);
- simulation.makeTextLog('tech')
+ simulation.inGameConsole('tech')
} else {
if (Math.random() < 0.4) {
powerUps.spawn(me.position.x, me.position.y + (75 * (player.velocity.y / Math.abs(player.velocity.y))), "heal", true);
- simulation.makeTextLog('heal')
+ simulation.inGameConsole('heal')
} else {
//if (Math.random() < 0.8){
powerUps.spawn(me.position.x, me.position.y + (75 * (player.velocity.y / Math.abs(player.velocity.y))), "ammo", true);
- simulation.makeTextLog('ammo')
+ simulation.inGameConsole('ammo')
//}
}
}
@@ -23079,7 +23077,7 @@ const level = {
firstElevatorY -= 5
}
- //simulation.makeTextLog(firstElevatorY)
+ //simulation.inGameConsole(firstElevatorY)
elevator1.move();
elevator2.move();
if (player.position.x > 0 && player.position.y < -9000 && player.position.y > -10000) {
@@ -23095,7 +23093,7 @@ const level = {
portal[3].query()
portal2[2].query()
portal2[3].query()
- //simulation.makeTextLog(firstBlockBroken)
+ //simulation.inGameConsole(firstBlockBroken)
level.exit.drawAndCheck();
if (player.position.x > 4100 && secondMobsReached == 0) {
secondMobsSpawned = 1
@@ -23138,7 +23136,7 @@ const level = {
level.enter.draw();
if (finalRoomReached == 0 && player.position.x > 21150) {
finalRoomReached = 1
- simulation.makeTextLog('Thank you M, but our techs are in another castle!')
+ simulation.inGameConsole('Thank you M, but our techs are in another castle!')
}
//mobs
if (firstMobsSpawned == 1 && firstMobsReached == 0) {
@@ -23414,7 +23412,7 @@ const level = {
powerUps.addResearchToLevel() //needs to run after mobs are spawned
},
underpass() {
- simulation.makeTextLog(`
underpass by
Richard0820`);
+ simulation.inGameConsole(`
underpass by
Richard0820`);
let key = false;
const door = level.door(2650, -825, 50, 250, 250, 10);
@@ -26295,7 +26293,7 @@ const level = {
},
cantilever() { // made by Eclipse#7932 on discord, (TheSpudguy)(@PurpleSunsetGames on github)
// simulation.enableConstructMode();
- simulation.makeTextLog(`
underpass by
Eclipse#7932`);
+ simulation.inGameConsole(`
underpass by
Eclipse#7932`);
level.setPosToSpawn(0, -50); //normal spawn
level.exit.x = 5500;
@@ -26358,7 +26356,7 @@ const level = {
powerUps.addResearchToLevel(); //needs to run after mobs are spawned
},
tlinat() { // _Destined_ formerly Richard0820#2652
- simulation.makeTextLog(`
tlinat by
Richard0820`);
+ simulation.inGameConsole(`
tlinat by
Richard0820`);
simulation.fallHeight = 1 / 0, level.setPosToSpawn(0, -1e3), level.exit.x = 5100, level.exit.y = 3770, spawn.mapRect(level.enter.x, level.enter.y + 20, 100, 20), spawn.mapRect(level.exit.x, level.exit.y + 20, 100, 20), level.defaultZoom = 3000, simulation.zoomTransition(level.defaultZoom), document.body.style.backgroundColor = "#d8dadf";
let e = 0,
t = 0;
@@ -26498,7 +26496,7 @@ const level = {
n(o[l], e + 250 * l - Math.abs(1.5 * e), t)
}
}
- simulation.makeTextLog(`

Look up
Walk right to tp to mazeExit is at the bottom left`), Matter.Body.scale(player.parts[3], 2, 2), level.custom = () => {
+ simulation.inGameConsole(`

Look up
Walk right to tp to mazeExit is at the bottom left`), Matter.Body.scale(player.parts[3], 2, 2), level.custom = () => {
if (level.exit.drawAndCheck(), level.enter.draw(), player.position.y > 1e5 && Matter.Body.setPosition(player, {
x: 5100,
y: -5925
@@ -26508,7 +26506,7 @@ const level = {
y: -5925
}), e++;
for (let e = 0; e < map.length; e++) Math.random() < .75 && ghoster(map[e].position.x, map[e].position.y);
- simulation.makeTextLog("Watch out for
ghostersPeace ✌️")
+ simulation.inGameConsole("Watch out for
ghostersPeace ✌️")
}
player.position.x > level.exit.x && player.position.x < level.exit.x + 100 && player.position.y > level.exit.y - 150 && player.position.y < level.exit.y - 0 && player.velocity.y < .15 && 0 == t && (t++, Matter.Body.scale(player.parts[3], .5, .5))
}, level.customTopLayer = () => {
@@ -26581,7 +26579,7 @@ const level = {
},
ruins() { // by SiddhUPe
// simulation.enableConstructMode()
- simulation.makeTextLog(`
ruins by
SiddhUPe`);
+ simulation.inGameConsole(`
ruins by
SiddhUPe`);
level.setPosToSpawn(0, -50); //normal spawn
level.exit.x = 19531;
@@ -27662,7 +27660,7 @@ const level = {
powerUps.addResearchToLevel() //needs to run after mobs are spawned
},
ace() {
- simulation.makeTextLog(`
ace by
Richard0820`);
+ simulation.inGameConsole(`
ace by
Richard0820`);
let isDestroyed = false;
const ace = {
spawnOrbitals(who, radius, chance = Math.min(0.25 + simulation.difficulty * 0.005)) {
@@ -28935,7 +28933,7 @@ const level = {
}
},
crimsonTowers() {
- simulation.makeTextLog(`crimsonTowers by Richard0820. Thank you desboot for the video:
Source`)
+ simulation.inGameConsole(`crimsonTowers by Richard0820. Thank you desboot for the video:
Source`)
const ace = {
spawnOrbitals(who, radius, chance = Math.min(0.25 + simulation.difficulty * 0.005)) {
if (Math.random() < chance) {
@@ -30070,8 +30068,8 @@ const level = {
level.exit.x = map[272].position.x;
},
LaunchSite() {
- simulation.makeTextLog(`
Launch Site by
Des Boot`);
- simulation.makeTextLog(`The rain stopped...`);
+ simulation.inGameConsole(`
Launch Site by
Des Boot`);
+ simulation.inGameConsole(`The rain stopped...`);
level.setPosToSpawn(0, -50); //normal spawn
const elevatortoggle = level.toggle(13650, 3000)
let newMobsSpawned = false;
@@ -30486,7 +30484,7 @@ const level = {
powerUps.addResearchToLevel() //needs to run after mobs are spawned
},
shipwreck() {
- simulation.makeTextLog(`
shipwreck by
3xionDev`);
+ simulation.inGameConsole(`
shipwreck by
3xionDev`);
level.setPosToSpawn(0, -50); //normal spawn
level.exit.x = 1500;
level.exit.y = -1875;
@@ -30800,7 +30798,7 @@ const level = {
level.customTopLayer = () => { };
},
unchartedCave() {
- simulation.makeTextLog(`
unchartedCave by
3xionDev`);
+ simulation.inGameConsole(`
unchartedCave by
3xionDev`);
level.setPosToSpawn(0, -50); //normal spawn
level.exit.x = 20985;
level.exit.y = 2816;
@@ -31211,7 +31209,7 @@ const level = {
level.customTopLayer = () => { };
},
dojo() { // By weird_pusheen
- simulation.makeTextLog(`
dojo by
werid_pusheen, fixed by
Cornbread 2100`)
+ simulation.inGameConsole(`
dojo by
werid_pusheen, fixed by
Cornbread 2100`)
const vanishes = [];
const smoofes = [];
const leftRotor = level.rotor(-550, 900, 950, 25);
@@ -31661,7 +31659,7 @@ const level = {
powerUps.addResearchToLevel() //needs to run after mobs are spawned
},
arena() {
- simulation.makeTextLog(`
arena by
Whyisthisnotavalable`)
+ simulation.inGameConsole(`
arena by
Whyisthisnotavalable`)
let genisis, genisisJumpSensor, genisisBody, genisisHead, genisisHeadSensor, genisisBodySensor;
let control = { left: false, right: false, up: false, down: false };
const g = {
@@ -32235,7 +32233,7 @@ const level = {
if (tech.isCollisionRealitySwitch && g.alive) {
g.switchWorlds()
simulation.trails()
- simulation.makeTextLog(`simulation.amplitude
= ${Math.random()}`);
+ simulation.inGameConsole(`simulation.amplitude
= ${Math.random()}`);
}
if (tech.isPiezo) g.energy += 20.48;
if (tech.isCouplingNoHit && g.coupling > 0) {
@@ -32706,10 +32704,10 @@ const level = {
);
b.guns = gunArray;
} else {
- simulation.makeTextLog(`Thank you for using my sword mod
I'll save you the trouble of killing genisis
g.damage(Infinity)
`);
+ simulation.inGameConsole(`Thank you for using my sword mod
I'll save you the trouble of killing genisis
g.damage(Infinity)
`);
g.damage(Infinity);
}
- simulation.makeTextLog(`
arena by
Richard0820`);
+ simulation.inGameConsole(`
arena by
Richard0820`);
let index = 0;
let index2 = 0;
let { sword: sword, bladeSegments: bladeSegments } = createSword();
@@ -32898,7 +32896,7 @@ const level = {
}
}
index2++;
- setTimeout(() => { simulation.makeTextLog(`If you want to keep this sword, visit
https://github.com/Whyisthisnotavalable/n-scythe. The sword is there.`) }, 1000)
+ setTimeout(() => { simulation.inGameConsole(`If you want to keep this sword, visit
https://github.com/Whyisthisnotavalable/n-scythe. The sword is there.`) }, 1000)
}
for (let i = 0; i < bladeSegments.length; i++) {
const blade = bladeSegments[i];
@@ -33464,9 +33462,9 @@ const level = {
}
},
soft() {
- simulation.makeTextLog(`

`);
- simulation.makeTextLog(`
soft by
Richard0820`);
- simulation.makeTextLog("
The lasers deal less damage the higher level you are")
+ simulation.inGameConsole(`

`);
+ simulation.inGameConsole(`
soft by
Richard0820`);
+ simulation.inGameConsole("
The lasers deal less damage the higher level you are")
const portals = [];
portals.push(level.portal({
x: -1525,
@@ -33943,7 +33941,7 @@ const level = {
soft.annihilate(clothArray[0]);
clothArray.splice(0, 1);
}, 1000); //prevents bugs
- simulation.makeTextLog("Couldn't be so simple, could it?", 2000 * Math.random());
+ simulation.inGameConsole("Couldn't be so simple, could it?", 2000 * Math.random());
index1++;
}
};
@@ -34021,10 +34019,10 @@ const level = {
},
flappyGon() { //community map by digin
level.announceMobTypes();
- simulation.makeTextLog(`
flappy n-gon by
Digin`);
- setTimeout(() => { simulation.makeTextLog("
gravity is a
choice"); }, 1000);
- setTimeout(() => { simulation.makeTextLog("everyone will fly"); }, 2000);
- setTimeout(() => { simulation.makeTextLog("
jump from the post and find out"); }, 3000);
+ simulation.inGameConsole(`
flappy n-gon by
Digin`);
+ setTimeout(() => { simulation.inGameConsole("
gravity is a
choice"); }, 1000);
+ setTimeout(() => { simulation.inGameConsole("everyone will fly"); }, 2000);
+ setTimeout(() => { simulation.inGameConsole("
jump from the post and find out"); }, 3000);
level.setPosToSpawn(0, -50); //normal spawn
level.exit.x = 8600;
level.exit.y = -1100;
@@ -34100,9 +34098,9 @@ const level = {
},
rings() {
level.announceMobTypes();
- simulation.makeTextLog(`
rings by
ThatLittleFrog`);
+ simulation.inGameConsole(`
rings by
ThatLittleFrog`);
setTimeout(() => {
- simulation.makeTextLog("
go up");
+ simulation.inGameConsole("
go up");
}, 2000);
level.setPosToSpawn(0, -2000); // spawn high up so you can go to the bottom of the lowest ring without tripping the too-low reset
level.exit.x = 0;
@@ -34213,7 +34211,7 @@ const level = {
powerUps.addResearchToLevel();
},
trial() { // trial, collab between Cirryn and Tarantula Hawk
- simulation.makeTextLog(`
trial by
Cirryn and Tarantula Hawk`);
+ simulation.inGameConsole(`
trial by
Cirryn and Tarantula Hawk`);
level.setPosToSpawn(0, -50);
level.exit.x = 4150;
level.exit.y = -30;
@@ -34324,40 +34322,40 @@ const level = {
door.draw();
if (!button.isUp && !didTrialBegin) {
didTrialBegin = true;
- simulation.makeTextLog('
The Trial has begun.');
+ simulation.inGameConsole('
The Trial has begun.');
setTimeout(() => {
- simulation.makeTextLog('
first wave (domitable)');
+ simulation.inGameConsole('
first wave (domitable)');
wave(randomWave(2 + simulation.difficulty * 0.1, spawn.fullPickList));
}, 3000);
setTimeout(() => {
- simulation.makeTextLog('
second wave (domitable)');
+ simulation.inGameConsole('
second wave (domitable)');
wave(randomWave(2 + simulation.difficulty * 0.1, spawn.fullPickList));
}, 13000);
setTimeout(() => {
- simulation.makeTextLog('
third wave (indomitable)');
+ simulation.inGameConsole('
third wave (indomitable)');
wave(randomWave(4, ["assassin"]));
}, 23000);
setTimeout(() => {
- simulation.makeTextLog('
fourth wave (domitable)');
+ simulation.inGameConsole('
fourth wave (domitable)');
wave(randomWave(4 + simulation.difficulty / 2, spawn.fullPickList));
}, 39000);
setTimeout(() => {
- simulation.makeTextLog('
fifth wave (domitable)');
+ simulation.inGameConsole('
fifth wave (domitable)');
wave(randomWave(4 + simulation.difficulty / 2, spawn.fullPickList));
}, 49000);
setTimeout(() => {
- simulation.makeTextLog('
sixth wave (indomitable)');
+ simulation.inGameConsole('
sixth wave (indomitable)');
wave(randomWave(7, ["mercenary"]));
}, 59000);
setTimeout(() => {
- simulation.makeTextLog('
seventh wave (boss)');
+ simulation.inGameConsole('
seventh wave (boss)');
spawn.randomLevelBoss(700, -1000);
var mainBoss = mob[mob.length - 1];
mainBoss.oldOnDeath = mainBoss.onDeath;
diff --git a/js/lore.js b/js/lore.js
index 4a3ccb3..16bccb3 100644
--- a/js/lore.js
+++ b/js/lore.js
@@ -38,7 +38,7 @@ const lore = {
if (localSettings.isAllowed) localStorage.setItem("localSettings", JSON.stringify(localSettings)); //update local storage
document.getElementById("control-testing").style.visibility = (localSettings.loreCount === 0) ? "hidden" : "visible"
// document.getElementById("experiment-button").style.visibility = (localSettings.loreCount === 0) ? "hidden" : "visible"
- simulation.makeTextLog(`
lore.unlockTesting()`, Infinity);
+ simulation.inGameConsole(`
lore.unlockTesting()`, Infinity);
sound.portamento(50)
sound.portamento(83.333)
@@ -48,7 +48,7 @@ const lore = {
color: "#f20",
voice: undefined,
text: function (say) {
- simulation.makeTextLog(`input.audio(
${(Date.now() / 1000).toFixed(0)} s)
: "
${say}"`, Infinity);
+ simulation.inGameConsole(`input.audio(
${(Date.now() / 1000).toFixed(0)} s)
: "
${say}"`, Infinity);
lore.talkingColor = this.color
const utterance = new SpeechSynthesisUtterance(say);
utterance.lang = "en-AU" //"en-IN"; //de-DE en-GB fr-FR en-US en-AU
@@ -61,7 +61,7 @@ const lore = {
voice: undefined,
text: function (say) {
if (level.levels[level.onLevel] === undefined) { //only talk if on the lore level (which is undefined because it is popped out of the level.levels array)
- simulation.makeTextLog(`input.audio(
${(Date.now() / 1000).toFixed(0)} s)
: "
${say}"`, Infinity);
+ simulation.inGameConsole(`input.audio(
${(Date.now() / 1000).toFixed(0)} s)
: "
${say}"`, Infinity);
lore.talkingColor = this.color
if (lore.isSpeech) {
const utterance = new SpeechSynthesisUtterance(say);
@@ -95,7 +95,7 @@ const lore = {
color: "#f20",
text: function (say) {
if (level.levels[level.onLevel] === undefined) { //only talk if on the lore level (which is undefined because it is popped out of the level.levels array)
- simulation.makeTextLog(`input.audio(
${(Date.now() / 1000).toFixed(0)} s)
: "
${say}"`, Infinity);
+ simulation.inGameConsole(`input.audio(
${(Date.now() / 1000).toFixed(0)} s)
: "
${say}"`, Infinity);
lore.talkingColor = this.color
if (lore.isSpeech) {
utterance = new SpeechSynthesisUtterance(say);
@@ -622,8 +622,8 @@ const lore = {
console.log(`https://www.openstreetmap.org/#map=18/${latitude}/${longitude}`)
console.log(`Latitude: ${latitude} °, Longitude: ${longitude} °`)
lore.miriam.text("We tracked the location down to this Latitude and Longitude:")
- simulation.makeTextLog(`Latitude: ${latitude} °, Longitude: ${longitude} °`, Infinity);
- simulation.makeTextLog(`https://www.openstreetmap.org/#map=18/${latitude}/${longitude}`, Infinity);
+ simulation.inGameConsole(`Latitude: ${latitude} °, Longitude: ${longitude} °`, Infinity);
+ simulation.inGameConsole(`https://www.openstreetmap.org/#map=18/${latitude}/${longitude}`, Infinity);
}
function error() {
@@ -769,13 +769,13 @@ const lore = {
},
() => {
lore.miriam.text("We can spawn power ups with this command:")
- simulation.makeTextLog(`powerUps.spawn(player.position.x, player.position.y - 100, "heal")`, Infinity);
+ simulation.inGameConsole(`powerUps.spawn(player.position.x, player.position.y - 100, "heal")`, Infinity);
powerUps.spawn(player.position.x, player.position.y - 100, "heal")
},
() => {
setTimeout(() => {
lore.miriam.text("or we can make a bunch of them:")
- simulation.makeTextLog(`for (let i = 0; i < 100; i++) powerUps.spawn(0, 500, "coupling")`, Infinity);
+ simulation.inGameConsole(`for (let i = 0; i < 100; i++) powerUps.spawn(0, 500, "coupling")`, Infinity);
for (let i = 0; i < 100; i++) powerUps.spawn(5 - 10 * Math.random(), -500 * Math.random(), "coupling")
}, 2000);
},
@@ -798,9 +798,9 @@ const lore = {
count++
if (mob.length === 0 || count > 3600 + 900 * mob.length) {
lore.miriam.text("I'll spawn some more power ups for you.")
- simulation.makeTextLog(`for (let i = 0; i < 6; i++) powerUps.spawn(player.position.x, player.position.y - 100, "heal")`, Infinity);
+ simulation.inGameConsole(`for (let i = 0; i < 6; i++) powerUps.spawn(player.position.x, player.position.y - 100, "heal")`, Infinity);
for (let i = 0; i < 6; i++) powerUps.spawn(player.position.x, player.position.y - 100 - i * 20, "heal")
- simulation.makeTextLog(`for (let i = 0; i < 10; i++) powerUps.spawn(player.position.x, player.position.y - 100, "ammo")`, Infinity);
+ simulation.inGameConsole(`for (let i = 0; i < 10; i++) powerUps.spawn(player.position.x, player.position.y - 100, "ammo")`, Infinity);
for (let i = 0; i < 10; i++) powerUps.spawn(player.position.x, player.position.y - 100 - i * 20, "ammo")
spawn.dragonFlyBoss(-1400, -300);
spawn.dragonFlyBoss(1400, -300);
@@ -820,9 +820,9 @@ const lore = {
count++
if (mob.length === 0 || count > 3600 + 900 * mob.length) {
lore.anand.text("DragonFlyBoss is my favorite.")
- simulation.makeTextLog(`for (let i = 0; i < 6; i++) powerUps.spawn(player.position.x, player.position.y - 100, "heal")`, Infinity);
+ simulation.inGameConsole(`for (let i = 0; i < 6; i++) powerUps.spawn(player.position.x, player.position.y - 100, "heal")`, Infinity);
for (let i = 0; i < 6; i++) powerUps.spawn(player.position.x, player.position.y - 100 - i * 20, "heal")
- simulation.makeTextLog(`for (let i = 0; i < 10; i++) powerUps.spawn(player.position.x, player.position.y - 100, "ammo")`, Infinity);
+ simulation.inGameConsole(`for (let i = 0; i < 10; i++) powerUps.spawn(player.position.x, player.position.y - 100, "ammo")`, Infinity);
for (let i = 0; i < 10; i++) powerUps.spawn(player.position.x, player.position.y - 100 - i * 20, "ammo")
spawn.historyBoss(0, -400);
spawn.powerUpBossBaby(-1500, -100);
@@ -841,7 +841,7 @@ const lore = {
count++
if (mob.length === 0 || count > 3600 + 900 * mob.length) {
lore.miriam.text("Here are some extra tech.")
- simulation.makeTextLog(`for (let i = 0; i < 6; i++) powerUps.spawn(player.position.x, player.position.y - 100, "tech")`, Infinity);
+ simulation.inGameConsole(`for (let i = 0; i < 6; i++) powerUps.spawn(player.position.x, player.position.y - 100, "tech")`, Infinity);
for (let i = 0; i < 6; i++) powerUps.spawn(0, -200 - i * 40, "tech")
spawn.historyBoss(0, -400);
spawn.blinkBoss(-1400, -300);
@@ -902,7 +902,7 @@ const lore = {
x: 0,
y: -500
})
- simulation.makeTextLog(`Matter.Body.setPosition(player, { x: 0, y: -500 })`, 180);
+ simulation.inGameConsole(`Matter.Body.setPosition(player, { x: 0, y: -500 })`, 180);
}, 1500);
} else if (m.alive) {
@@ -1180,7 +1180,7 @@ const lore = {
// return product_Range(r + 1, n) / product_Range(1, n - r);
// }
// }
- // simulation.makeTextLog(`n
= ${combinations(tech.tech.length + b.guns.length + m.fieldUpgrades.length, 50).toExponential(10)}`, Infinity);
+ // simulation.inGameConsole(`n
= ${combinations(tech.tech.length + b.guns.length + m.fieldUpgrades.length, 50).toExponential(10)}`, Infinity);
// lore.miriam.text(`There are roughly 5 times 10 to the 60 possible combinations. `)
// },
// () => { lore.miriam.text("Even if each simulation took 1 nano-second,") },
diff --git a/js/mob.js b/js/mob.js
index c8de2bb..1c0d185 100644
--- a/js/mob.js
+++ b/js/mob.js
@@ -1223,9 +1223,9 @@ const mobs = {
});
}
- if (tech.deathSkipTime && !m.isBodiesAsleep) {
+ if (tech.isVerlet && !m.isBodiesAsleep) {
requestAnimationFrame(() => {
- simulation.timePlayerSkip((this.isBoss ? 45 : 25) * tech.deathSkipTime)
+ simulation.timePlayerSkip(this.isBoss ? 60 : 30)
simulation.loop(); //ending with a wipe and normal loop fixes some very minor graphical issues where things are draw in the wrong locations
}); //wrapping in animation frame prevents errors, probably
}
diff --git a/js/player.js b/js/player.js
index 7402cbb..f8f1b25 100644
--- a/js/player.js
+++ b/js/player.js
@@ -442,7 +442,7 @@ const m = {
simulation.clearNow = true; //triggers a map reset
m.switchWorlds()
simulation.isTextLogOpen = true;
- simulation.makeTextLog(`simulation.amplitude
= 0.${len - i - 1}`, swapPeriod);
+ simulation.inGameConsole(`simulation.amplitude
= 0.${len - i - 1}`, swapPeriod);
simulation.isTextLogOpen = false;
simulation.wipe = function () { //set wipe to have trails
ctx.fillStyle = `rgba(255,255,255,${(i + 1) * (i + 1) * 0.006})`;
@@ -455,7 +455,7 @@ const m = {
ctx.clearRect(0, 0, canvas.width, canvas.height);
}
simulation.isTextLogOpen = true;
- simulation.makeTextLog("simulation.amplitude
= null");
+ simulation.inGameConsole("simulation.amplitude
= null");
tech.isImmortal = false //disable future immortality
}, 6 * swapPeriod);
} else if (m.alive) { //normal death code here
@@ -537,7 +537,7 @@ const m = {
setMaxHealth(isMessage) {
m.maxHealth = m.baseHealth + tech.extraMaxHealth + 4 * tech.isFallingDamage
document.getElementById("health-bg").style.width = `${Math.floor(300 * m.maxHealth)}px`
- if (isMessage) simulation.makeTextLog(`
m.
maxHealth = ${m.maxHealth.toFixed(2)}`)
+ if (isMessage) simulation.inGameConsole(`
m.
maxHealth = ${m.maxHealth.toFixed(2)}`)
if (m.health > m.maxHealth) m.health = m.maxHealth;
m.displayHealth();
},
@@ -678,7 +678,7 @@ const m = {
damage(dmg) {
if (tech.isRewindAvoidDeath && (m.energy + 0.05) > Math.min(0.95, m.maxEnergy) && dmg > 0.01) {
const steps = Math.floor(Math.min(299, 150 * m.energy))
- simulation.makeTextLog(`
m.rewind(${steps})`)
+ simulation.inGameConsole(`
m.rewind(${steps})`)
m.rewind(steps)
return
}
@@ -698,7 +698,7 @@ const m = {
if (tech.isDeathAvoid && powerUps.research.count && !tech.isDeathAvoidedThisLevel) {
tech.isDeathAvoidedThisLevel = true
powerUps.research.changeRerolls(-1)
- simulation.makeTextLog(`
m.
research--${powerUps.research.count}`)
+ simulation.inGameConsole(`
m.
research--${powerUps.research.count}`)
for (let i = 0; i < 22; i++) powerUps.spawn(m.pos.x + 100 * (Math.random() - 0.5), m.pos.y + 100 * (Math.random() - 0.5), "heal", false);
m.energy = m.maxEnergy + 0.1
if (m.immuneCycle < m.cycle + 300) m.immuneCycle = m.cycle + 300 //disable this.immuneCycle bonus seconds
@@ -726,7 +726,7 @@ const m = {
tech.isDeathAvoidedThisLevel = true
m.health = 0.05
powerUps.research.changeRerolls(-1)
- simulation.makeTextLog(`
m.
research--
+ simulation.inGameConsole(`
m.
research--
${powerUps.research.count}`)
for (let i = 0; i < 16; i++) powerUps.spawn(m.pos.x + 100 * (Math.random() - 0.5), m.pos.y + 100 * (Math.random() - 0.5), "heal", false);
if (m.immuneCycle < m.cycle + 300) m.immuneCycle = m.cycle + 300 //disable this.immuneCycle bonus seconds
@@ -886,15 +886,21 @@ const m = {
ctx.lineTo(m.knee.x, m.knee.y);
ctx.lineTo(m.foot.x, m.foot.y);
ctx.strokeStyle = stroke;
- ctx.lineWidth = 6;
+ ctx.lineWidth = 5;
ctx.stroke();
//toe lines
ctx.beginPath();
ctx.moveTo(m.foot.x, m.foot.y);
- ctx.lineTo(m.foot.x - 14, m.foot.y + 5);
- ctx.moveTo(m.foot.x, m.foot.y);
- ctx.lineTo(m.foot.x + 14, m.foot.y + 5);
+ if (m.onGround) {
+ ctx.lineTo(m.foot.x - 14, m.foot.y + 5);
+ ctx.moveTo(m.foot.x, m.foot.y);
+ ctx.lineTo(m.foot.x + 14, m.foot.y + 5);
+ } else {
+ ctx.lineTo(m.foot.x - 12, m.foot.y + 8);
+ ctx.moveTo(m.foot.x, m.foot.y);
+ ctx.lineTo(m.foot.x + 12, m.foot.y + 8);
+ }
ctx.lineWidth = 4;
ctx.stroke();
@@ -923,11 +929,6 @@ const m = {
m.yOffWhen.stand = 49
m.yOffWhen.crouch = 22
m.isAltSkin = false
- m.color = {
- hue: 0,
- sat: 0,
- light: 100,
- }
m.fillColor = `hsl(${m.color.hue},${m.color.sat}%,${m.color.light}%)`
m.fillColorDark = `hsl(${m.color.hue},${m.color.sat}%,${m.color.light - 10}%)`
@@ -971,15 +972,6 @@ const m = {
m.squirrelJump = 1.16;
m.setMovement()
- // m.yOffWhen.jump = 70
- // m.yOffWhen.stand = 49
- // m.yOffWhen.crouch = 22
- // m.color = {
- // hue: 184,
- // sat: 0,
- // light: 55,
- // }
- // m.setFillColors();
m.draw = function () {
m.walk_cycle += m.flipLegs * m.Vx;
ctx.save();
@@ -1059,11 +1051,6 @@ const m = {
},
polar() {
m.isAltSkin = true
- m.color = {
- hue: 0,
- sat: 0,
- light: 100,
- }
// m.setFillColors();
m.fillColor = `hsl(${m.color.hue},${m.color.sat}%,${m.color.light}%)`
m.fillColorDark = `hsl(${m.color.hue},${m.color.sat}%,${m.color.light - 35}%)`
@@ -1081,12 +1068,10 @@ const m = {
ctx.translate(m.pos.x, m.pos.y);
m.calcLeg(Math.PI, -3);
-
const diff = (m.lastKillCycle - m.cycle + tech.isDamageCooldownTime) / tech.isDamageCooldownTime
const color = diff < 0 ? "#fff" : "#aaa"
const hue = 220 + 20 * Math.sin(0.01 * m.cycle)
const colorInverse = diff < 0 ? `hsl(${hue}, 80%, 40%)` : "#fff"
- // const colorInverseFade = diff < 0 ? "#ccc" : "#fff"
m.drawLeg(color, colorInverse);
m.calcLeg(0, 0);
m.drawLeg(color, colorInverse);
@@ -1100,21 +1085,14 @@ const m = {
ctx.beginPath();
ctx.moveTo(15, 0)
ctx.lineTo(28, 0)
- // ctx.arc(15, 0, 4, 0, 2 * Math.PI);
ctx.strokeStyle = colorInverse;
ctx.lineWidth = 4;
ctx.stroke();
ctx.restore();
-
- // const scale = diff>0.3
- // console.log(diff.toFixed(3), scale.toFixed(3))
ctx.beginPath();
ctx.ellipse(m.pos.x, m.pos.y, 24, 18, 3.14 * Math.random(), 0, 2 * Math.PI)
- // `rgba(0,0,${100 + 30 * Math.sin(0.1 * m.cycle)},0.8)`
ctx.fillStyle = diff < 0 ? `hsl(${hue}, 80%, 40%)` : `rgba(255,255,255,${Math.min(Math.max(0, diff + 0.3), 1)})`
- // ctx.fillStyle = colorInverse
- // ctx.fillStyle = `rgba(0,0,0,${scale})`
ctx.fill();
m.yOff = m.yOff * 0.85 + m.yOffGoal * 0.15; //smoothly move leg height towards height goal
@@ -1134,15 +1112,21 @@ const m = {
ctx.lineTo(m.knee.x, m.knee.y);
ctx.lineTo(m.foot.x, m.foot.y);
ctx.strokeStyle = stroke;
- ctx.lineWidth = 6;
+ ctx.lineWidth = 5;
ctx.stroke();
//toe lines
ctx.beginPath();
ctx.moveTo(m.foot.x, m.foot.y);
- ctx.lineTo(m.foot.x - 15, m.foot.y + 5);
- ctx.moveTo(m.foot.x, m.foot.y);
- ctx.lineTo(m.foot.x + 15, m.foot.y + 5);
+ if (m.onGround) {
+ ctx.lineTo(m.foot.x - 15, m.foot.y + 5);
+ ctx.moveTo(m.foot.x, m.foot.y);
+ ctx.lineTo(m.foot.x + 15, m.foot.y + 5);
+ } else {
+ ctx.lineTo(m.foot.x - 13, m.foot.y + 8);
+ ctx.moveTo(m.foot.x, m.foot.y);
+ ctx.lineTo(m.foot.x + 13, m.foot.y + 8);
+ }
ctx.lineWidth = 3;
ctx.stroke();
@@ -1166,22 +1150,16 @@ const m = {
m.isAltSkin = true
m.yOffWhen.stand = 52
m.yOffWhen.jump = 72
- // m.yOffWhen.crouch = 22
- // m.color = {
- // hue: 184,
- // sat: 0,
- // light: 55,
- // }
- // m.setFillColors();
+
m.draw = function () {
m.walk_cycle += m.flipLegs * m.Vx;
ctx.save();
ctx.globalAlpha = (m.immuneCycle < m.cycle) ? 1 : 0.5 //|| (m.cycle % 40 > 20)
ctx.translate(m.pos.x, m.pos.y);
m.calcLeg(Math.PI, -1.25);
- m.drawLeg("#606070");
+ m.drawLeg("#606080");
m.calcLeg(0, 0);
- m.drawLeg("#445");
+ m.drawLeg("#446");
ctx.rotate(m.angle);
@@ -1193,17 +1171,14 @@ const m = {
ctx.beginPath();
const arc = 0.7 + 0.17 * Math.sin(m.cycle * 0.012)
ctx.arc(0, 0, 30, -arc, arc, true); //- Math.PI / 2
- ctx.strokeStyle = "#445";
+ ctx.strokeStyle = "#446";
ctx.lineWidth = 2;
ctx.stroke();
ctx.beginPath();
ctx.moveTo(13, 0)
ctx.lineTo(20, 0)
- // ctx.beginPath();
- // ctx.arc(15, 0, 4, 0, 2 * Math.PI);
ctx.lineWidth = 5;
- ctx.strokeStyle = "#445";
ctx.stroke();
ctx.restore();
@@ -1230,9 +1205,15 @@ const m = {
//toe lines
ctx.beginPath();
ctx.moveTo(m.foot.x, m.foot.y);
- ctx.lineTo(m.foot.x - 14, m.foot.y + 5);
- ctx.moveTo(m.foot.x, m.foot.y);
- ctx.lineTo(m.foot.x + 14, m.foot.y + 5);
+ if (m.onGround) {
+ ctx.lineTo(m.foot.x - 14, m.foot.y + 5);
+ ctx.moveTo(m.foot.x, m.foot.y);
+ ctx.lineTo(m.foot.x + 14, m.foot.y + 5);
+ } else {
+ ctx.lineTo(m.foot.x - 12, m.foot.y + 8);
+ ctx.moveTo(m.foot.x, m.foot.y);
+ ctx.lineTo(m.foot.x + 12, m.foot.y + 8);
+ }
ctx.lineWidth = 4;
ctx.stroke();
@@ -1302,16 +1283,22 @@ const m = {
ctx.lineTo(m.knee.x, m.knee.y);
ctx.lineTo(m.foot.x, m.foot.y);
ctx.strokeStyle = stroke;
- ctx.lineWidth = 6;
+ ctx.lineWidth = 5;
ctx.stroke();
//toe lines
ctx.beginPath();
ctx.moveTo(m.foot.x, m.foot.y);
- ctx.lineTo(m.foot.x - 14, m.foot.y + 5);
- ctx.moveTo(m.foot.x, m.foot.y);
- ctx.lineTo(m.foot.x + 14, m.foot.y + 5);
- ctx.lineWidth = 4;
+ if (m.onGround) {
+ ctx.lineTo(m.foot.x - 15, m.foot.y + 5);
+ ctx.moveTo(m.foot.x, m.foot.y);
+ ctx.lineTo(m.foot.x + 15, m.foot.y + 5);
+ } else {
+ ctx.lineTo(m.foot.x - 13, m.foot.y + 8);
+ ctx.moveTo(m.foot.x, m.foot.y);
+ ctx.lineTo(m.foot.x + 13, m.foot.y + 8);
+ }
+ ctx.lineWidth = 3;
ctx.stroke();
//hip joint
@@ -1324,7 +1311,7 @@ const m = {
ctx.moveTo(m.foot.x + 5, m.foot.y);
ctx.arc(m.foot.x, m.foot.y + 1, 5, 0, 2 * Math.PI);
ctx.strokeStyle = "rgba(0,255,255,0.25)";
- ctx.lineWidth = 5;
+ ctx.lineWidth = 6;
ctx.stroke();
ctx.fillStyle = m.fillColor;
ctx.fill();
@@ -1521,9 +1508,15 @@ const m = {
//toe lines
ctx.beginPath();
ctx.moveTo(m.foot.x, m.foot.y);
- ctx.lineTo(m.foot.x - 15, m.foot.y + 5);
- ctx.moveTo(m.foot.x, m.foot.y);
- ctx.lineTo(m.foot.x + 15, m.foot.y + 5);
+ if (m.onGround) {
+ ctx.lineTo(m.foot.x - 15, m.foot.y + 5);
+ ctx.moveTo(m.foot.x, m.foot.y);
+ ctx.lineTo(m.foot.x + 15, m.foot.y + 5);
+ } else {
+ ctx.lineTo(m.foot.x - 13, m.foot.y + 8);
+ ctx.moveTo(m.foot.x, m.foot.y);
+ ctx.lineTo(m.foot.x + 13, m.foot.y + 8);
+ }
ctx.lineWidth = 4;
ctx.stroke();
@@ -1641,9 +1634,15 @@ const m = {
//toe lines
ctx.beginPath();
ctx.moveTo(m.foot.x, m.foot.y);
- ctx.lineTo(m.foot.x - 15, m.foot.y + 5);
- ctx.moveTo(m.foot.x, m.foot.y);
- ctx.lineTo(m.foot.x + 15, m.foot.y + 5);
+ if (m.onGround) {
+ ctx.lineTo(m.foot.x - 15, m.foot.y + 5);
+ ctx.moveTo(m.foot.x, m.foot.y);
+ ctx.lineTo(m.foot.x + 15, m.foot.y + 5);
+ } else {
+ ctx.lineTo(m.foot.x - 13, m.foot.y + 8);
+ ctx.moveTo(m.foot.x, m.foot.y);
+ ctx.lineTo(m.foot.x + 13, m.foot.y + 8);
+ }
ctx.lineWidth = 4;
ctx.stroke();
@@ -1665,12 +1664,7 @@ const m = {
},
CPT() {
m.isAltSkin = true
- m.color = {
- hue: 0,
- sat: 0,
- light: 100,
- }
- // m.setFillColors();
+
m.fillColor = `hsl(${m.color.hue},${m.color.sat}%,${m.color.light}%)`
m.fillColorDark = `hsl(${m.color.hue},${m.color.sat}%,${m.color.light - 35}%)`
let grd = ctx.createLinearGradient(-20, 0, 15, 0);
@@ -1718,15 +1712,21 @@ const m = {
ctx.lineTo(m.knee.x, m.knee.y);
ctx.lineTo(m.foot.x, m.foot.y);
ctx.strokeStyle = stroke;
- ctx.lineWidth = 6;
+ ctx.lineWidth = 5;
ctx.stroke();
//toe lines
ctx.beginPath();
ctx.moveTo(m.foot.x, m.foot.y);
- ctx.lineTo(m.foot.x - 15, m.foot.y + 5);
- ctx.moveTo(m.foot.x, m.foot.y);
- ctx.lineTo(m.foot.x + 15, m.foot.y + 5);
+ if (m.onGround) {
+ ctx.lineTo(m.foot.x - 15, m.foot.y + 5);
+ ctx.moveTo(m.foot.x, m.foot.y);
+ ctx.lineTo(m.foot.x + 15, m.foot.y + 5);
+ } else {
+ ctx.lineTo(m.foot.x - 13, m.foot.y + 8);
+ ctx.moveTo(m.foot.x, m.foot.y);
+ ctx.lineTo(m.foot.x + 13, m.foot.y + 8);
+ }
ctx.lineWidth = 3;
ctx.stroke();
@@ -1746,14 +1746,95 @@ const m = {
ctx.restore();
}
},
+ verlet() {
+ m.isAltSkin = true
+
+ m.draw = function () {
+ ctx.fillStyle = m.fillColor;
+ m.walk_cycle += m.flipLegs * m.Vx;
+ ctx.save();
+ ctx.globalAlpha = (m.immuneCycle < m.cycle) ? 1 : 0.5 //|| (m.cycle % 40 > 20)
+ ctx.translate(m.pos.x, m.pos.y);
+ m.calcLeg(Math.PI, -2);
+ m.drawLeg("#4a4a4a");
+ m.calcLeg(0, 0);
+ m.drawLeg("#333");
+
+ ctx.beginPath();
+ ctx.arc(0, 0, 30, 0, 2 * Math.PI);
+ ctx.fillStyle = m.bodyGradient
+ ctx.fill();
+
+ const rate = 0.09
+ ctx.strokeStyle = "#000";
+ ctx.lineWidth = 1;
+ ctx.beginPath();
+ ctx.arc(0, 0, rate * (simulation.cycle + 0) % 30, 0, 2 * Math.PI);
+ ctx.stroke();
+ ctx.beginPath();
+ ctx.arc(0, 0, rate * (simulation.cycle + 15 / rate) % 30, 0, 2 * Math.PI);
+ ctx.stroke();
+ ctx.beginPath();
+ ctx.arc(0, 0, 30, 0, 2 * Math.PI);
+ ctx.stroke();
+
+ ctx.globalCompositeOperation = "difference";
+ ctx.rotate(m.angle);
+ ctx.beginPath();
+ ctx.arc(21, 0, 8, 0, 2 * Math.PI);
+ ctx.fillStyle = input.fire ? "#0ff" : input.field ? "#d30" : `#fff`
+ ctx.fill();
+ ctx.restore();
+
+ m.yOff = m.yOff * 0.85 + m.yOffGoal * 0.15; //smoothly move leg height towards height goal
+ powerUps.boost.draw()
+ }
+ m.drawLeg = function (stroke) {
+ // if (simulation.mouseInGame.x > m.pos.x) {
+ if (m.angle > -Math.PI / 2 && m.angle < Math.PI / 2) {
+ m.flipLegs = 1;
+ } else {
+ m.flipLegs = -1;
+ }
+ ctx.save();
+ ctx.scale(m.flipLegs, 1); //leg lines
+ ctx.beginPath();
+ ctx.moveTo(m.hip.x, m.hip.y);
+ ctx.lineTo(m.knee.x, m.knee.y);
+ ctx.lineTo(m.foot.x, m.foot.y);
+ ctx.strokeStyle = stroke;
+ ctx.lineWidth = 1;
+ ctx.stroke();
+
+ //toe lines
+ ctx.beginPath();
+ ctx.moveTo(m.foot.x, m.foot.y);
+ const footDrop = m.onGround ? 5 : 10
+ ctx.lineTo(m.foot.x - 15, m.foot.y + footDrop);
+ ctx.moveTo(m.foot.x, m.foot.y);
+ ctx.lineTo(m.foot.x + 15, m.foot.y + footDrop);
+ ctx.lineWidth = 1;
+ ctx.stroke();
+
+ //hip joint
+ ctx.beginPath();
+ ctx.arc(m.hip.x, m.hip.y, 9, 0, 2 * Math.PI);
+ //knee joint
+ ctx.moveTo(m.knee.x + 5, m.knee.y);
+ ctx.arc(m.knee.x, m.knee.y, 3, 0, 2 * Math.PI);
+ //foot joint
+ ctx.moveTo(m.foot.x + 5, m.foot.y);
+ ctx.arc(m.foot.x, m.foot.y, 4, 0, 2 * Math.PI);
+ ctx.fillStyle = "#000";
+ ctx.fill();
+ // ctx.lineWidth = 2;
+ // ctx.stroke();
+ ctx.restore();
+ }
+ },
hexagon() {
m.isAltSkin = true
- m.color = {
- hue: 0,
- sat: 0,
- light: 100,
- }
- // m.setFillColors();
+
m.fillColor = `hsl(${m.color.hue},${m.color.sat}%,${m.color.light}%)`
m.fillColorDark = `hsl(${m.color.hue},${m.color.sat}%,${m.color.light - 35}%)`
let grd = ctx.createLinearGradient(-30, 0, 30, 0);
@@ -1813,9 +1894,15 @@ const m = {
//toe lines
ctx.beginPath();
ctx.moveTo(m.foot.x, m.foot.y);
- ctx.lineTo(m.foot.x - 15, m.foot.y + 5);
- ctx.moveTo(m.foot.x, m.foot.y);
- ctx.lineTo(m.foot.x + 15, m.foot.y + 5);
+ if (m.onGround) {
+ ctx.lineTo(m.foot.x - 15, m.foot.y + 5);
+ ctx.moveTo(m.foot.x, m.foot.y);
+ ctx.lineTo(m.foot.x + 15, m.foot.y + 5);
+ } else {
+ ctx.lineTo(m.foot.x - 13, m.foot.y + 8);
+ ctx.moveTo(m.foot.x, m.foot.y);
+ ctx.lineTo(m.foot.x + 13, m.foot.y + 8);
+ }
ctx.lineWidth = 3;
ctx.stroke();
@@ -2188,7 +2275,7 @@ const m = {
},
setMaxEnergy(isMessage = true) {
m.maxEnergy = (tech.isMaxEnergyTech ? 0.5 : 1) + tech.bonusEnergy + tech.healMaxEnergyBonus + tech.harmonicEnergy + 3 * tech.isGroundState + 1.5 * (m.fieldMode === 1) + (m.fieldMode === 0 || m.fieldMode === 1) * 0.05 * m.coupling + 0.77 * tech.isStandingWaveExpand
- if (isMessage) simulation.makeTextLog(`
m.
maxEnergy = ${(m.maxEnergy.toFixed(2))}`)
+ if (isMessage) simulation.inGameConsole(`
m.
maxEnergy = ${(m.maxEnergy.toFixed(2))}`)
},
fieldMeterColor: "#0cf",
drawRegenEnergy(bgColor = "rgba(0, 0, 0, 0.4)", range = 60) {
@@ -2238,6 +2325,8 @@ const m = {
m.fieldRegen = 0.001667 //10 energy per second plasma torch
} else if (m.fieldMode === 8) {
m.fieldRegen = 0.001667 //10 energy per second pilot wave
+ } else if (m.fieldMode === 9) {
+ m.fieldRegen = 0.00117 //7 energy per second wormhole
} else if (m.fieldMode === 10) {
m.fieldRegen = 0.0015 //9 energy per second grappling hook
} else {
@@ -2915,7 +3004,7 @@ const m = {
}
},
couplingChange(change = 0) {
- if (change > 0 && level.onLevel !== -1) simulation.makeTextLog(`
m.coupling
+= ${change}`, 60); //level.onLevel !== -1 means not on lore level
+ if (change > 0 && level.onLevel !== -1) simulation.inGameConsole(`
m.coupling
+= ${change}`, 60); //level.onLevel !== -1 means not on lore level
m.coupling += change
if (m.coupling < 0) {
//look for coupling power ups on this level and remove them to prevent exploiting tech ejections
@@ -2953,7 +3042,7 @@ const m = {
document.getElementById("field").innerHTML = m.fieldUpgrades[index].name
m.setHoldDefaults();
m.fieldUpgrades[index].effect();
- simulation.makeTextLog(`
m.setField("
${m.fieldUpgrades[m.fieldMode].name}")
input.key.field
: ["
MouseRight"]`);
+ simulation.inGameConsole(`
m.setField("
${m.fieldUpgrades[m.fieldMode].name}")
input.key.field
: ["
MouseRight"]`);
},
fieldUpgrades: [{
name: "field emitter",
@@ -4679,7 +4768,7 @@ const m = {
{
name: "wormhole",
//
wormholes attract
blocks and power ups
- description: "use
energy to
tunnel through a
wormhole+7% chance to
duplicate spawned
power ups6 energy per second", //
bullets may also traverse
wormholes
+ description: "use
energy to
tunnel through a
wormhole+7% chance to
duplicate spawned
power ups7 energy per second", //
bullets may also traverse
wormholes
drain: 0,
effect: function () {
m.fieldMeterColor = "#bbf" //"#0c5"
diff --git a/js/powerup.js b/js/powerup.js
index 229ec6e..d855d8d 100644
--- a/js/powerup.js
+++ b/js/powerup.js
@@ -84,21 +84,21 @@ const powerUps = {
}
},
tech(num = 1) {
- return `
`
+ return `
tech
`
},
field(num = 1) {
- return `
`
+ return `
field
`
},
gun(num = 1) {
- return `
`
+ return `
gun
`
},
gunTech(num = 1) {
- return `
-
`
+ return `
guntech
+
guntech
`
},
fieldTech(num = 1) {
- return `
-
`
+ return `
fieldtech
+
fieldtech
`
},
coupling(num = 1) {
switch (num) {
@@ -246,12 +246,12 @@ const powerUps = {
if (b.inventory.length === 2) text += `
input.key.nextGun
: ["
${input.key.nextGun}","
MouseWheel"]
input.key.previousGun
: ["
${input.key.previousGun}","
MouseWheel"]`
- simulation.makeTextLog(text);
+ simulation.inGameConsole(text);
} else if (type === "field") {
m.setField(index)
} else if (type === "tech") {
// if (tech.isBanish && tech.tech[index].isBanished) tech.tech[index].isBanished = false
- simulation.makeTextLog(`
tech.giveTech("
${tech.tech[index].name}")`);
+ simulation.inGameConsole(`
tech.giveTech("
${tech.tech[index].name}")`);
tech.giveTech(index)
}
powerUps.endDraft(type);
@@ -289,7 +289,7 @@ const powerUps = {
if (tech.isCancelDuplication) {
const value = 0.05
tech.duplication += value
- simulation.makeTextLog(`tech.duplicationChance()
+= ${value}`)
+ simulation.inGameConsole(`tech.duplicationChance()
+= ${value}`)
simulation.circleFlare(value);
}
if (tech.isCancelRerolls) {
@@ -582,7 +582,7 @@ const powerUps = {
}
if (tech.isResearchDamage) {
tech.damage *= 1.05
- simulation.makeTextLog(`
1.05x damage`);
+ simulation.inGameConsole(`
1.05x damage`);
tech.addJunkTechToPool(0.01)
}
powerUps.research.currentRerollCount++
@@ -592,12 +592,12 @@ const powerUps = {
// const index = powerUps.tech.choiceLog.length - i - 1
// if (powerUps.tech.choiceLog[index] && tech.tech[powerUps.tech.choiceLog[index]]) tech.tech[powerUps.tech.choiceLog[index]].isBanished = true
// }
- // simulation.makeTextLog(`powerUps.tech.length: ${Math.max(0,powerUps.tech.lastTotalChoices - banishLength)}`)
+ // simulation.inGameConsole(`powerUps.tech.length: ${Math.max(0,powerUps.tech.lastTotalChoices - banishLength)}`)
// }
if (tech.isResearchReality) {
m.switchWorlds()
simulation.trails()
- simulation.makeTextLog(`simulation.amplitude
= ${Math.random()}`);
+ simulation.inGameConsole(`simulation.amplitude
= ${Math.random()}`);
}
powerUps[type].effect();
},
@@ -616,24 +616,35 @@ const powerUps = {
let overHeal = m.health + heal * simulation.healScale - m.maxHealth //used with tech.isOverHeal
const healOutput = Math.min(m.maxHealth - m.health, heal) * simulation.healScale
m.addHealth(heal);
- if (healOutput > 0) simulation.makeTextLog(`
m.health
+= ${(healOutput).toFixed(3)}`) //
${m.health.toFixed(3)}
+ if (healOutput > 0) simulation.inGameConsole(`
m.health
+= ${(healOutput).toFixed(3)}`) //
${m.health.toFixed(3)}
if (tech.isOverHeal && overHeal > 0) { //tech quenching
- overHeal *= 2 //double the over heal converted to max health
- //make sure overHeal doesn't kill player
- if (m.health - overHeal * m.defense() < 0) overHeal = m.health - 0.01
- if (overHeal > m.maxHealth) overHeal = m.maxHealth //just in case overHeal gets too big
- tech.extraMaxHealth += overHeal //increase max health
+ tech.extraMaxHealth += 0.3 * overHeal //increase max health
m.setMaxHealth();
- m.damage(overHeal);
- overHeal *= m.defense() // account for defense after m.damage() so the text log is accurate
- simulation.makeTextLog(`
m.health
-= ${(overHeal).toFixed(3)}`) //
${m.health.toFixed(3)}
+ simulation.inGameConsole(`
m.maxHealth
+= ${(0.3 * overHeal).toFixed(3)}`)
simulation.drawList.push({ //add dmg to draw queue
x: m.pos.x,
y: m.pos.y,
- radius: overHeal * 500 * simulation.healScale,
- color: simulation.mobDmgColor,
+ radius: overHeal * 100 * simulation.healScale,
+ color: "#0eb",
time: simulation.drawTime
});
+
+ // overHeal *= 2 //double the over heal converted to max health
+ // //make sure overHeal doesn't kill player
+ // if (m.health - overHeal * m.defense() < 0) overHeal = m.health - 0.01
+ // if (overHeal > m.maxHealth) overHeal = m.maxHealth //just in case overHeal gets too big
+ // tech.extraMaxHealth += overHeal //increase max health
+ // m.setMaxHealth();
+ // m.damage(overHeal);
+ // overHeal *= m.defense() // account for defense after m.damage() so the text log is accurate
+ // simulation.inGameConsole(`
m.health
-= ${(overHeal).toFixed(3)}`) //
${m.health.toFixed(3)}
+ // simulation.drawList.push({ //add dmg to draw queue
+ // x: m.pos.x,
+ // y: m.pos.y,
+ // radius: overHeal * 500 * simulation.healScale,
+ // color: simulation.mobDmgColor,
+ // time: simulation.drawTime
+ // });
} else if (overHeal > 0.13) { //if leftover heals spawn a new spammer heal power up
requestAnimationFrame(() => {
powerUps.directSpawn(this.position.x, this.position.y, "heal", true, null, Math.min(1, overHeal) * 40 * (simulation.healScale ** 0.25))// directSpawn(x, y, target, moving = true, mode = null, size = powerUps[target].size()) {
@@ -731,8 +742,6 @@ const powerUps = {
}
},
cancelText(type) {
- // if (localSettings.isHideImages) { }
-
if (tech.isSuperDeterminism) {
return `
`
} else if (tech.isCancelTech && tech.cancelTechCount === 0) {
@@ -873,7 +882,7 @@ const powerUps = {
- ${tech.tech[choose].name} ${techCountText}
+ ${tech.tech[choose].name} ${techCountText}
${tech.tech[choose].descriptionFunction ? tech.tech[choose].descriptionFunction() : tech.tech[choose].description}`
},
fieldTechText(choose, click) {
@@ -1186,7 +1195,7 @@ const powerUps = {
for (let i = 0, len = tech.tech.length; i < len; i++) {
if (tech.tech[i].name === "decoherence") powerUps.ejectTech(i, true)
}
- simulation.makeTextLog(`decoherence