catabolism and inductive coupling update

catabolism - lowers your max health by 1 (was 3 harm) and gives 4 ammo
inductive coupling - gives max energy for leftover power ups (was max health)
  now requires mass-energy equivalence

switched to a newer copy, paste URL
  this seems to fix issues with failed text copy in the level builder if you hold mouse down for over 6 seconds
This commit is contained in:
landgreen
2021-06-19 07:23:26 -07:00
parent cb2a8e4243
commit 88f595642f
9 changed files with 415 additions and 205 deletions

View File

@@ -504,13 +504,30 @@ const build = {
if (isCustom) {
url += `&level=${Math.abs(Number(document.getElementById("starting-level").value))}`
url += `&noPower=${Number(document.getElementById("no-power-ups").checked)}`
alert('n-gon build URL copied to clipboard.\nPaste into browser address bar.')
// alert('n-gon build URL copied to clipboard.\nPaste into browser address bar.')
} else {
simulation.makeTextLog("n-gon build URL copied to clipboard.<br>Paste into browser address bar.")
}
console.log('n-gon build URL copied to clipboard.\nPaste into browser address bar.')
console.log(url)
simulation.copyToClipBoard(url)
navigator.clipboard.writeText(url).then(function() {
/* clipboard successfully set */
if (isCustom) {
setTimeout(function() {
alert('n-gon build URL copied to clipboard.\nPaste into browser address bar.')
}, 300);
}
}, function() {
/* clipboard write failed */
if (isCustom) {
setTimeout(function() {
alert('copy failed')
}, 300);
}
console.log('copy failed')
});
},
startExperiment() {
build.isExperimentSelection = false;
@@ -1165,7 +1182,6 @@ function cycle() {
simulation.clearMap();
level.start();
}
simulation.loop();
// if (isNaN(m.health) || isNaN(m.energy)) {
// console.log(`m.health = ${m.health}`)