shape-memory alloy
tech lithium-ion - give 200 max energy when relay is ON tech shape-memory alloy - give 200 max health when flip-flop is ON NOR gate now prevents damage when in the OFF state (previously ON) to work well with shape-memory alloy harpoon crouch mode now retracts at 30% greater distance than normal with no targeting more bug fixes of course
This commit is contained in:
12
js/bullet.js
12
js/bullet.js
@@ -6315,11 +6315,11 @@ const b = {
|
||||
this.charge += 0.00001
|
||||
},
|
||||
grappleFire() {
|
||||
const where = {
|
||||
x: m.pos.x + 30 * Math.cos(m.angle),
|
||||
y: m.pos.y + 30 * Math.sin(m.angle)
|
||||
}
|
||||
const harpoonSize = (tech.isLargeHarpoon ? 1 + 0.1 * Math.sqrt(this.ammo) : 1) //* (input.down ? 0.7 : 1)
|
||||
const where = {
|
||||
x: m.pos.x + harpoonSize * 40 * Math.cos(m.angle),
|
||||
y: m.pos.y + harpoonSize * 40 * Math.sin(m.angle)
|
||||
}
|
||||
if (tech.extraHarpoons && !input.down) { //multiple harpoons
|
||||
const SPREAD = 0.06
|
||||
const len = tech.extraHarpoons + 1
|
||||
@@ -6353,7 +6353,7 @@ const b = {
|
||||
}
|
||||
//look for closest mob in player's LoS
|
||||
const harpoonSize = (tech.isLargeHarpoon ? 1 + 0.1 * Math.sqrt(this.ammo) : 1) //* (input.down ? 0.7 : 1)
|
||||
const totalCycles = 7 * (tech.isFilament ? 1 + 0.01 * Math.min(110, this.ammo) : 1) * Math.sqrt(harpoonSize)
|
||||
const totalCycles = 6 * (tech.isFilament ? 1 + 0.01 * Math.min(110, this.ammo) : 1) * Math.sqrt(harpoonSize)
|
||||
|
||||
if (tech.extraHarpoons && !input.down) { //multiple harpoons
|
||||
const SPREAD = 0.1
|
||||
@@ -6404,7 +6404,7 @@ const b = {
|
||||
}
|
||||
}
|
||||
if (input.down) {
|
||||
b.harpoon(where, closest.target, m.angle, harpoonSize, false, 70)
|
||||
b.harpoon(where, null, m.angle, harpoonSize, true, 1.5 * totalCycles)
|
||||
} else {
|
||||
b.harpoon(where, closest.target, m.angle, harpoonSize, true, totalCycles)
|
||||
}
|
||||
|
||||
@@ -117,13 +117,14 @@ function collisionChecks(event) {
|
||||
tech.isFlipFlopOn = false
|
||||
if (document.getElementById("tech-flip-flop")) document.getElementById("tech-flip-flop").innerHTML = ` = <strong>OFF</strong>`
|
||||
m.eyeFillColor = 'transparent'
|
||||
if (!tech.isFlipFlopHarm) m.damage(dmg);
|
||||
m.damage(dmg);
|
||||
} else {
|
||||
tech.isFlipFlopOn = true //immune to damage this hit, lose immunity for next hit
|
||||
if (document.getElementById("tech-flip-flop")) document.getElementById("tech-flip-flop").innerHTML = ` = <strong>ON</strong>`
|
||||
m.eyeFillColor = m.fieldMeterColor //'#0cf'
|
||||
m.damage(dmg);
|
||||
if (!tech.isFlipFlopHarm) m.damage(dmg);
|
||||
}
|
||||
m.setMaxHealth();
|
||||
} else {
|
||||
m.damage(dmg); //normal damage
|
||||
}
|
||||
|
||||
@@ -18,7 +18,8 @@ const level = {
|
||||
// m.setField("metamaterial cloaking")
|
||||
// b.giveGuns("harpoon")
|
||||
// tech.giveTech("grappling hook")
|
||||
// tech.giveTech("capacitor bank")
|
||||
// tech.giveTech("railgun")
|
||||
// tech.giveTech("shape-memory alloy")
|
||||
// for (let i = 0; i < 2; i++) powerUps.directSpawn(0, 0, "tech");
|
||||
// for (let i = 0; i < 2; i++) tech.giveTech("corona discharge")
|
||||
// for (let i = 10; i < tech.tech.length; i++) { tech.tech[i].isBanished = true }
|
||||
@@ -107,6 +108,8 @@ const level = {
|
||||
// if (tech.isFlipFlopLevelReset && !tech.isFlipFlopOn) {
|
||||
if ((tech.isRelay || tech.isFlipFlop) && !tech.isFlipFlopOn) {
|
||||
tech.isFlipFlopOn = true
|
||||
m.setMaxHealth()
|
||||
m.setMaxEnergy()
|
||||
m.eyeFillColor = m.fieldMeterColor
|
||||
simulation.makeTextLog(`tech.isFlipFlopOn <span class='color-symbol'>=</span> true`);
|
||||
}
|
||||
|
||||
@@ -491,7 +491,7 @@ const m = {
|
||||
},
|
||||
baseHealth: 1,
|
||||
setMaxHealth() {
|
||||
m.maxHealth = m.baseHealth + tech.extraMaxHealth + tech.isFallingDamage //+ tech.bonusHealth
|
||||
m.maxHealth = m.baseHealth + tech.extraMaxHealth + tech.isFallingDamage + 2 * tech.isFlipFlop * tech.isFlipFlopOn * tech.isFlipFlopHealth
|
||||
document.getElementById("health-bg").style.width = `${Math.floor(300 * m.maxHealth)}px`
|
||||
simulation.makeTextLog(`<span class='color-var'>m</span>.<span class='color-h'>maxHealth</span> <span class='color-symbol'>=</span> ${m.maxHealth.toFixed(2)}`)
|
||||
if (m.health > m.maxHealth) m.health = m.maxHealth;
|
||||
@@ -962,7 +962,7 @@ const m = {
|
||||
}
|
||||
},
|
||||
setMaxEnergy() {
|
||||
m.maxEnergy = (tech.isMaxEnergyTech ? 0.5 : 1) + tech.bonusEnergy + tech.healMaxEnergyBonus + tech.harmonicEnergy + 2 * tech.isGroundState
|
||||
m.maxEnergy = (tech.isMaxEnergyTech ? 0.5 : 1) + tech.bonusEnergy + tech.healMaxEnergyBonus + tech.harmonicEnergy + 2 * tech.isGroundState + 2 * tech.isRelay * tech.isFlipFlopOn * tech.isRelayEnergy
|
||||
simulation.makeTextLog(`<span class='color-var'>m</span>.<span class='color-f'>maxEnergy</span> <span class='color-symbol'>=</span> ${(m.maxEnergy.toFixed(2))}`)
|
||||
},
|
||||
fieldMeterColor: "#0cf",
|
||||
|
||||
@@ -889,6 +889,8 @@ const powerUps = {
|
||||
if (document.getElementById("tech-switch")) document.getElementById("tech-switch").innerHTML = ` = <strong>ON</strong>`
|
||||
m.eyeFillColor = m.fieldMeterColor //'#0cf'
|
||||
}
|
||||
m.setMaxEnergy();
|
||||
m.setMaxHealth();
|
||||
}
|
||||
},
|
||||
// giveRandomAmmo() {
|
||||
|
||||
113
js/tech.js
113
js/tech.js
@@ -1656,11 +1656,11 @@ const tech = {
|
||||
},
|
||||
{
|
||||
name: "NOR gate",
|
||||
description: "if <strong>flip-flop</strong> is in the <strong class='color-flop'>ON</strong> state<br>take <strong>0</strong> <strong class='color-harm'>harm</strong> from collisions with mobs",
|
||||
description: "if <strong>flip-flop</strong> is in the <strong class='color-flop'>OFF</strong> state<br>take <strong>0</strong> <strong class='color-harm'>harm</strong> from collisions with mobs",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 4,
|
||||
frequencyDefault: 4,
|
||||
frequency: 3,
|
||||
frequencyDefault: 3,
|
||||
allowed() {
|
||||
return tech.isFlipFlop
|
||||
},
|
||||
@@ -1672,6 +1672,26 @@ const tech = {
|
||||
tech.isFlipFlopHarm = false
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "shape-memory alloy",
|
||||
description: "if <strong>flip-flop</strong> is in the <strong class='color-flop'>ON</strong> state<br>increase your <strong>maximum</strong> <strong class='color-h'>health</strong> by <strong>200</strong>",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 3,
|
||||
frequencyDefault: 3,
|
||||
allowed() {
|
||||
return tech.isFlipFlop && !tech.isEnergyHealth
|
||||
},
|
||||
requires: "flip-flop, not mass-energy equivalence",
|
||||
effect() {
|
||||
tech.isFlipFlopHealth = true;
|
||||
m.setMaxHealth();
|
||||
},
|
||||
remove() {
|
||||
tech.isFlipFlopHealth = false;
|
||||
m.setMaxHealth();
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "flip-flop",
|
||||
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Flip-flop_(electronics)' class="link">flip-flop</a>`,
|
||||
@@ -1711,6 +1731,42 @@ const tech = {
|
||||
m.eyeFillColor = 'transparent'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "NAND gate",
|
||||
description: "if in the <strong class='color-flop'>ON</strong> state<br>do <strong>55.5%</strong> more <strong class='color-d'>damage</strong>",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 3,
|
||||
frequencyDefault: 3,
|
||||
allowed() {
|
||||
return tech.isFlipFlop || tech.isRelay
|
||||
},
|
||||
requires: "ON/OFF tech",
|
||||
effect() {
|
||||
tech.isFlipFlopDamage = true;
|
||||
},
|
||||
remove() {
|
||||
tech.isFlipFlopDamage = false;
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "transistor",
|
||||
description: "if <strong class='color-flop'>ON</strong> regen <strong>20</strong> <strong class='color-f'>energy</strong> per second<br>if <strong class='color-flop'>OFF</strong> drain <strong>1</strong> <strong class='color-f'>energy</strong> per second",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 3,
|
||||
frequencyDefault: 3,
|
||||
allowed() {
|
||||
return tech.isFlipFlop || tech.isRelay
|
||||
},
|
||||
requires: "ON/OFF tech",
|
||||
effect() {
|
||||
tech.isFlipFlopEnergy = true;
|
||||
},
|
||||
remove() {
|
||||
tech.isFlipFlopEnergy = false;
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "relay switch",
|
||||
description: `toggle <strong class="color-flop">ON</strong> and <strong class="color-flop">OFF</strong> after picking up a <strong>power up</strong><br>unlock advanced <strong class='color-m'>tech</strong> that runs if <strong class="color-flop">ON</strong>`,
|
||||
@@ -1750,39 +1806,23 @@ const tech = {
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "NAND gate",
|
||||
description: "if in the <strong class='color-flop'>ON</strong> state<br>do <strong>55.5%</strong> more <strong class='color-d'>damage</strong>",
|
||||
name: "lithium-ion",
|
||||
description: "if <strong>relay switch</strong> is in the <strong class='color-flop'>ON</strong> state<br>increase your <strong>maximum</strong> <strong class='color-f'>energy</strong> by <strong>200</strong>",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 4,
|
||||
frequencyDefault: 4,
|
||||
frequency: 3,
|
||||
frequencyDefault: 3,
|
||||
allowed() {
|
||||
return tech.isFlipFlop || tech.isRelay
|
||||
return tech.isRelay
|
||||
},
|
||||
requires: "ON/OFF tech",
|
||||
effect() {
|
||||
tech.isFlipFlopDamage = true;
|
||||
requires: "relay switch",
|
||||
effect: () => {
|
||||
tech.isRelayEnergy = true
|
||||
m.setMaxEnergy()
|
||||
},
|
||||
remove() {
|
||||
tech.isFlipFlopDamage = false;
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "transistor",
|
||||
description: "if <strong class='color-flop'>ON</strong> regen <strong>20</strong> <strong class='color-f'>energy</strong> per second<br>if <strong class='color-flop'>OFF</strong> drain <strong>1</strong> <strong class='color-f'>energy</strong> per second",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 4,
|
||||
frequencyDefault: 4,
|
||||
allowed() {
|
||||
return tech.isFlipFlop || tech.isRelay
|
||||
},
|
||||
requires: "ON/OFF tech",
|
||||
effect() {
|
||||
tech.isFlipFlopEnergy = true;
|
||||
},
|
||||
remove() {
|
||||
tech.isFlipFlopEnergy = false;
|
||||
tech.isRelayEnergy = false
|
||||
m.setMaxEnergy()
|
||||
}
|
||||
},
|
||||
// {
|
||||
@@ -1803,13 +1843,14 @@ const tech = {
|
||||
// tech.isFlipFlopLevelReset = false;
|
||||
// }
|
||||
// },
|
||||
|
||||
{
|
||||
name: "thermocouple",
|
||||
description: "if <strong>relay switch</strong> is in the <strong class='color-flop'>ON</strong> state<br>condense <strong>4-13</strong> <strong class='color-s'>ice IX</strong> crystals every second",
|
||||
maxCount: 9,
|
||||
count: 0,
|
||||
frequency: 4,
|
||||
frequencyDefault: 4,
|
||||
frequency: 3,
|
||||
frequencyDefault: 3,
|
||||
allowed() {
|
||||
return tech.isRelay
|
||||
},
|
||||
@@ -6707,9 +6748,9 @@ const tech = {
|
||||
frequency: 2,
|
||||
frequencyDefault: 2,
|
||||
allowed() {
|
||||
return m.fieldUpgrades[m.fieldMode].name === "plasma torch" && !tech.isExtruder && tech.isPlasmaRange === 1
|
||||
return m.fieldUpgrades[m.fieldMode].name === "plasma torch" && tech.isPlasmaBall
|
||||
},
|
||||
requires: "plasma torch, not extruder, plasma jet",
|
||||
requires: "plasma ball",
|
||||
effect() {
|
||||
tech.plasmaDischarge += 0.03
|
||||
},
|
||||
@@ -9556,5 +9597,7 @@ const tech = {
|
||||
isDronesTravel: null,
|
||||
isTechDebt: null,
|
||||
isPlasmaBall: null,
|
||||
plasmaDischarge: null
|
||||
plasmaDischarge: null,
|
||||
isFlipFlopHealth: null,
|
||||
isRelayEnergy: null,
|
||||
}
|
||||
39
todo.txt
39
todo.txt
@@ -1,13 +1,12 @@
|
||||
******************************************************** NEXT PATCH **************************************************
|
||||
|
||||
new community map! - islands by Richard0820
|
||||
enable community maps in settings
|
||||
tech lithium-ion - give 200 max energy when relay is ON
|
||||
tech shape-memory alloy - give 200 max health when flip-flop is ON
|
||||
NOR gate now prevents damage when in the OFF state (previously ON) to work well with shape-memory alloy
|
||||
|
||||
plasma ball
|
||||
tech: corona discharge - increase frequency and range of electric discharges
|
||||
several bug fixes
|
||||
harpoon crouch mode now retracts at 30% greater distance than normal with no targeting
|
||||
|
||||
bug fix for some people that can't store settings between reloads
|
||||
more bug fixes of course
|
||||
|
||||
******************************************************** TODO ********************************************************
|
||||
|
||||
@@ -17,13 +16,19 @@ plasma ball
|
||||
delay on returning to player is annoying
|
||||
scale float effect with ball size
|
||||
tech upgrades
|
||||
more electric arcs
|
||||
greatly improve floating effects while holding
|
||||
black hole: gives the plasma ball gravity
|
||||
suck or stun on explosion?
|
||||
stun on expansion
|
||||
plasma orb increases in size and power as it eats enemies
|
||||
while attached?
|
||||
|
||||
tech: frozen mobs die at 10% life
|
||||
|
||||
tech: harpoons stick into enemies
|
||||
detonate after a short delay
|
||||
attaches mob to wall if possible
|
||||
firing while harpoon is stuck into an enemy rips it out of them, inflicting damage and stun and pulling them towards you
|
||||
|
||||
bug: often game puts player position at NaN
|
||||
try:
|
||||
cloaking/harpoon grapple on normal, continue past beating the final boss
|
||||
@@ -49,7 +54,6 @@ bug: harpoon attack gave a mob really high levels of health
|
||||
|
||||
bug: maybe I can put in an event listener to reset inputs to false when you tab out to prevent key sticking
|
||||
|
||||
|
||||
enemies stuck with foam receive upward force over time
|
||||
only form aerogel tech?
|
||||
|
||||
@@ -61,11 +65,6 @@ Requires: foam + another gun or plasma torch or molecular assembler
|
||||
Enemies stuck with foam take 25% more damage
|
||||
should foam bots gets this also or is that too strong
|
||||
|
||||
tech: harpoons stick into enemies
|
||||
detonate after a short delay
|
||||
attaches mob to wall if possible
|
||||
firing while harpoon is stuck into an enemy rips it out of them, inflicting damage and stun and pulling them towards you
|
||||
|
||||
const ctx = canvas.getContext('2d', {‘willReadFrequently': true});
|
||||
|
||||
//deal with game crashes?
|
||||
@@ -100,11 +99,9 @@ maybe? timing QTE for charging effects, if you fire right before the charge ge
|
||||
+damage for each different bot type you have
|
||||
disables bot upgrades?
|
||||
|
||||
tech doing damage refunds up to 50% of damage take in last 10 seconds
|
||||
tech: doing damage to mobs refunds up to 50% of damage taken in last 10 seconds
|
||||
use history[] to manage this?
|
||||
|
||||
tech: frozen mobs die at 10% life
|
||||
|
||||
make a seed/hash system that controls only the tech/guns/fields shown
|
||||
URL sharing could include a seed
|
||||
seed controls:
|
||||
@@ -122,14 +119,11 @@ tech: spontaneous collapse - very low chance of something to occur
|
||||
JUNK tech
|
||||
https://bindingofisaacrebirth.fandom.com/wiki/Damocles
|
||||
|
||||
cloaking field doesn't show energy over max
|
||||
bug? cloaking field doesn't show energy over max
|
||||
|
||||
run more profiles of n-gon to fix performance issues
|
||||
|
||||
reactor
|
||||
mineBoss - bounces around and drops mines
|
||||
mines explode with a large radius that can trigger other mines
|
||||
mines have a short delay before exploding so they don't all go up in the same cycle
|
||||
life-like cellular automata boss
|
||||
https://scratch.mit.edu/projects/77724260/
|
||||
night/day?
|
||||
@@ -175,14 +169,13 @@ add anticipation to more mob attacks
|
||||
stabber
|
||||
striker
|
||||
|
||||
boss that fires giant bullets, that bounce around and chases you
|
||||
|
||||
can mob bullets damage other mob?
|
||||
maybe if they switch collisions and classType === "body" or obj.classType === "bullet"
|
||||
|
||||
path finding system
|
||||
|
||||
figure out how to get friction effects on map/body to apply to player
|
||||
also horizontal moving platform?
|
||||
|
||||
growBoss and cellBoss are too similar
|
||||
|
||||
|
||||
Reference in New Issue
Block a user