From 6446685cf0cd15cbabb7d22d34b4cc4d9a9d06d2 Mon Sep 17 00:00:00 2001 From: landgreen Date: Sun, 31 Jan 2021 11:41:42 -0800 Subject: [PATCH] bug fix dark patterns --- .DS_Store | Bin 6148 -> 6148 bytes js/index.js | 2 ++ js/powerup.js | 3 ++- js/tech.js | 31 +++++++++++++++++++++++++++---- style.css | 16 ++++++++++++++++ todo.txt | 7 ++----- 6 files changed, 49 insertions(+), 10 deletions(-) diff --git a/.DS_Store b/.DS_Store index 234726007b4b08a5d5133a196fef37d958a0e485..6a7a2b058353c5b176a832a3156198c15ededcef 100644 GIT binary patch delta 22 dcmZoMXffEJ$;>Rs96woy*^e<`b2W3P2mnP=1?m6* delta 22 dcmZoMXffEJ$;>Qpsco_jvmc|v=4$3n5dcto2Co1B diff --git a/js/index.js b/js/index.js index 241e3e3..a580807 100644 --- a/js/index.js +++ b/js/index.js @@ -234,6 +234,8 @@ const build = {         ${tech.tech[i].name} ${isCount}${tech.tech[i].description}` } else if (tech.tech[i].isLore) { text += `
  ${tech.tech[i].name} ${isCount}
${tech.tech[i].description}
` + } else if (tech.tech[i].isJunk) { + text += `
  ${tech.tech[i].name} ${isCount}
${tech.tech[i].description}
` } else { text += `
  ${tech.tech[i].name} ${isCount}
${tech.tech[i].description}
` } diff --git a/js/powerup.js b/js/powerup.js index 3165279..e9037b1 100644 --- a/js/powerup.js +++ b/js/powerup.js @@ -325,9 +325,10 @@ const powerUps = {
        ${tech.tech[choose].name} ${isCount}${tech.tech[choose].description}` - } else if (tech.tech[choose].isLore) { text += `
  ${tech.tech[choose].name} ${isCount}
${tech.tech[choose].description}
` + } else if (tech.tech[choose].isJunk) { + text += `
  ${tech.tech[choose].name} ${isCount}
${tech.tech[choose].description}
` } else { text += `
  ${tech.tech[choose].name} ${isCount}
${tech.tech[choose].description}
` } diff --git a/js/tech.js b/js/tech.js index 039a8c3..00dd0d5 100644 --- a/js/tech.js +++ b/js/tech.js @@ -711,7 +711,7 @@ const tech = { }, { name: "nail-bot", - description: "a bot fires nails at targets in line of sight", + description: "a bot fires nails at mobs in line of sight", maxCount: 9, count: 0, allowed() { @@ -750,7 +750,7 @@ const tech = { }, { name: "foam-bot", - description: "a bot fires foam at nearby targets", + description: "a bot fires foam at nearby mobs", maxCount: 9, count: 0, allowed() { @@ -1985,7 +1985,7 @@ const tech = { requires: "no research, and in the first 5 levels", effect() { level.difficultyDecrease(simulation.difficultyMode) - for (let i = 0; i < 160; i++) tech.tech.push(tech.junk[Math.floor(Math.random() * tech.junk.length)]) + for (let i = 0; i < tech.junk.length; i++) tech.tech.push(tech.junk[i]) }, remove() {} }, @@ -2811,7 +2811,7 @@ const tech = { }, { name: "missile-bot", - description: "a bot fires missiles at far away targets", + description: "a bot fires missiles at far away mobs", isGunTech: true, maxCount: 1, count: 0, @@ -4169,6 +4169,29 @@ const tech = { // }, // remove() {} // }, + { + name: "inverted input", + description: "left input becomes right and up input becomes down", + maxCount: 9, + count: 0, + isNonRefundable: true, + isCustomHide: true, + isJunk: true, + allowed() { + return true + }, + requires: "", + effect() { + const left = input.key.left + input.key.left = input.key.right + input.key.right = left + + const up = input.key.up + input.key.up = input.key.down + input.key.down = up + }, + remove() {} + }, { name: "Sleipnir", description: "grow more legs", diff --git a/style.css b/style.css index e55a7ba..5a0f003 100644 --- a/style.css +++ b/style.css @@ -635,6 +635,22 @@ summary { box-shadow: 0 0 0 3px #025; } +.junk { + background: hsl(255, 46%, 72%); + border-radius: 25%; + /* animation: 3s linear infinite alternate pulse; */ +} + +@keyframes pulse { + 0% { + border-radius: 0%; + } + + 100% { + border-radius: 50%; + } +} + /* .circle-grid-gun { width: 10px; height: 10px; diff --git a/todo.txt b/todo.txt index e5888aa..bd3010d 100644 --- a/todo.txt +++ b/todo.txt @@ -41,11 +41,8 @@ add back in gamepad support mechanic: gain damage when there are fewer bullets -mechanic: untested tech - negative effect (one time effects are better to avoid code clutter) - change the player draw to some of the dumb stuff in discord console - convert your bots to research (requires you to have some bots) - your bots are changed to random bots +junk tech + switch input keys: left-right, up-down? rename intro level to something lore related