added graphics to phase field and mod

This commit is contained in:
landgreen
2020-03-05 18:01:13 -08:00
parent c2b77579f7
commit 76105ea77f
4 changed files with 29 additions and 6 deletions

View File

@@ -241,7 +241,6 @@ document.getElementById("build-button").addEventListener("click", () => { //setu
let localSettings = JSON.parse(localStorage.getItem("localSettings")); let localSettings = JSON.parse(localStorage.getItem("localSettings"));
// console.log(localSettings) // console.log(localSettings)
if (localSettings) { if (localSettings) {
console.log('exist')
game.isBodyDamage = localSettings.isBodyDamage game.isBodyDamage = localSettings.isBodyDamage
document.getElementById("body-damage").checked = localSettings.isBodyDamage document.getElementById("body-damage").checked = localSettings.isBodyDamage

View File

@@ -15,8 +15,8 @@ const level = {
if (level.levelsCleared === 0) { if (level.levelsCleared === 0) {
// level.difficultyIncrease(9) // level.difficultyIncrease(9)
// b.giveGuns("wave beam") // b.giveGuns("wave beam")
// mech.setField("phase decoherence field") mech.setField("phase decoherence field")
// b.giveMod("wave phase velocity"); b.giveMod("quantum dissipation");
// b.giveMod("reflective cavity"); // b.giveMod("reflective cavity");
level.intro(); //starting level level.intro(); //starting level

View File

@@ -1615,9 +1615,31 @@ const mech = {
for (let i = 0; i < inPlayer.length; i++) { for (let i = 0; i < inPlayer.length; i++) {
if (inPlayer[i].shield) { if (inPlayer[i].shield) {
mech.energy -= 0.01; //shields drain player energy mech.energy -= 0.01; //shields drain player energy
//draw outline of shield
ctx.fillStyle = `rgba(0, 204, 255,0.6)`
ctx.fill()
} else if (b.isModPhaseFieldDamage && mech.energy > 0.006 && inPlayer[i].dropPowerUp && !inPlayer[i].isShielded) { } else if (b.isModPhaseFieldDamage && mech.energy > 0.006 && inPlayer[i].dropPowerUp && !inPlayer[i].isShielded) {
inPlayer[i].damage(0.2 * b.dmgScale); //damage mobs inside the player inPlayer[i].damage(0.4 * b.dmgScale); //damage mobs inside the player
mech.energy -= 0.002; mech.energy -= 0.002;
//draw outline of mob in a few random locations to show blurriness
const vertices = inPlayer[i].vertices;
const off = 30
for (let k = 0; k < 3; k++) {
const xOff = off * (Math.random() - 0.5)
const yOff = off * (Math.random() - 0.5)
ctx.beginPath();
ctx.moveTo(xOff + vertices[0].x, yOff + vertices[0].y);
for (let j = 1, len = vertices.length; j < len; ++j) {
ctx.lineTo(xOff + vertices[j].x, yOff + vertices[j].y);
}
ctx.lineTo(xOff + vertices[0].x, yOff + vertices[0].y);
// ctx.strokeStyle = "#000"
// ctx.lineWidth = 1
// ctx.stroke()
ctx.fillStyle = "rgba(0,0,0,0.3)"
ctx.fill()
}
break; break;
} }
} }

View File

@@ -2,8 +2,10 @@
mod - vacuum bomb pulls shields off the mob mod - vacuum bomb pulls shields off the mob
or just greatly damages shields during the suck phase if the pulling doesn't work or just greatly damages shields during the suck phase if the pulling doesn't work
mod - vacuum bomb stuns after the explosion
maybe it also does DoT damage
mod - blocking with nano-scale is more efficient mod - blocking with nano-scale is more efficient, like perfect diamagnetism
mod - time dilation - Quantum Recovery mod - time dilation - Quantum Recovery
Expending all your energy while using the field will Expending all your energy while using the field will
@@ -26,7 +28,7 @@ mobs - add in a function to the main loops that does injected code for each mob
stun - blind, slow, but increased gravity effects stun - blind, slow, but increased gravity effects
mod - flechettes mod for DoT poison damage mod - flechettes mod for DoT poison damage
mod - grenade explosions stun enemies mod - grenade explosions stun enemies
mod - give crystal minigun a slowing effect and rename it ice crystals
mod - get your next recursive mod 3 times mod - get your next recursive mod 3 times
are players aware of what a recursive mod is? are players aware of what a recursive mod is?