mods for guns and fields have an extra circle in selection menus
This commit is contained in:
12
js/bullet.js
12
js/bullet.js
@@ -689,6 +689,7 @@ const b = {
|
|||||||
mech.fieldCDcycle = mech.cycle + 120;
|
mech.fieldCDcycle = mech.cycle + 120;
|
||||||
mech.energy = 0;
|
mech.energy = 0;
|
||||||
}
|
}
|
||||||
|
mech.isExtruderOn = true
|
||||||
const SPEED = 10
|
const SPEED = 10
|
||||||
const me = bullet.length;
|
const me = bullet.length;
|
||||||
const where = Vector.add(mech.pos, player.velocity)
|
const where = Vector.add(mech.pos, player.velocity)
|
||||||
@@ -740,9 +741,9 @@ const b = {
|
|||||||
this.cycle++
|
this.cycle++
|
||||||
const wiggleMag = (mech.crouch ? 6 : 12) * Math.cos(game.cycle * 0.09)
|
const wiggleMag = (mech.crouch ? 6 : 12) * Math.cos(game.cycle * 0.09)
|
||||||
const wiggle = Vector.mult(transverse, wiggleMag * Math.cos(this.cycle * 0.36)) //+ wiggleMag * Math.cos(game.cycle * 0.3))
|
const wiggle = Vector.mult(transverse, wiggleMag * Math.cos(this.cycle * 0.36)) //+ wiggleMag * Math.cos(game.cycle * 0.3))
|
||||||
const velocity = Vector.mult(player.velocity, 0.25) //move with player
|
// const velocity = Vector.mult(player.velocity, 0.25) //move with player
|
||||||
Matter.Body.setPosition(this, Vector.add(velocity, Vector.add(this.position, wiggle)))
|
// Matter.Body.setPosition(this, Vector.add(velocity, Vector.add(this.position, wiggle)))
|
||||||
// Matter.Body.setPosition(this, Vector.add(this.position, wiggle))
|
Matter.Body.setPosition(this, Vector.add(this.position, wiggle))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -755,9 +756,6 @@ const b = {
|
|||||||
if (180 - Math.abs(Math.abs(b.lastAngle - mech.angle) - 180) > 0.3) bullet[me].isBranch = true; //don't draw stroke for this bullet
|
if (180 - Math.abs(Math.abs(b.lastAngle - mech.angle) - 180) > 0.3) bullet[me].isBranch = true; //don't draw stroke for this bullet
|
||||||
b.lastAngle = mech.angle //track last angle for the above angle difference calculation
|
b.lastAngle = mech.angle //track last angle for the above angle difference calculation
|
||||||
if (!mech.wasExtruderOn) bullet[me].isBranch = true;
|
if (!mech.wasExtruderOn) bullet[me].isBranch = true;
|
||||||
mech.isExtruderOn = true
|
|
||||||
} else {
|
|
||||||
mech.isExtruderOn = false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
plasma() {
|
plasma() {
|
||||||
@@ -1338,7 +1336,7 @@ const b = {
|
|||||||
const THRUST = 0.004
|
const THRUST = 0.004
|
||||||
const dir = mech.angle + spread * (Math.random() - 0.5);
|
const dir = mech.angle + spread * (Math.random() - 0.5);
|
||||||
const RADIUS = 18
|
const RADIUS = 18
|
||||||
bullet[me] = Bodies.polygon(mech.pos.x + 30 * Math.cos(mech.angle), mech.pos.y + 30 * Math.sin(mech.angle), 3, RADIUS, {
|
bullet[me] = Bodies.polygon(mech.pos.x + 30 * Math.cos(mech.angle), mech.pos.y + 30 * Math.sin(mech.angle), 4, RADIUS, {
|
||||||
angle: dir - Math.PI,
|
angle: dir - Math.PI,
|
||||||
inertia: Infinity,
|
inertia: Infinity,
|
||||||
friction: 0,
|
friction: 0,
|
||||||
|
|||||||
39
js/index.js
39
js/index.js
@@ -212,11 +212,30 @@ const build = {
|
|||||||
text += `<div class="pause-grid-module"><div class="grid-title"><div class="circle-grid field"></div> ${mech.fieldUpgrades[mech.fieldMode].name}</div> ${mech.fieldUpgrades[mech.fieldMode].description}</div>`
|
text += `<div class="pause-grid-module"><div class="grid-title"><div class="circle-grid field"></div> ${mech.fieldUpgrades[mech.fieldMode].name}</div> ${mech.fieldUpgrades[mech.fieldMode].description}</div>`
|
||||||
for (let i = 0, len = mod.mods.length; i < len; i++) {
|
for (let i = 0, len = mod.mods.length; i < len; i++) {
|
||||||
if (mod.mods[i].count > 0) {
|
if (mod.mods[i].count > 0) {
|
||||||
if (mod.mods[i].count === 1) {
|
const isCount = mod.mods[i].count > 1 ? `(${mod.mods[i].count}x)` : "";
|
||||||
text += `<div class="pause-grid-module"><div class="grid-title"><div class="circle-grid mod"></div> ${mod.mods[i].name}</div> ${mod.mods[i].description}</div>`
|
|
||||||
|
if (mod.mods[i].isFieldMod) {
|
||||||
|
text += `<div class="pause-grid-module"><div class="grid-title">
|
||||||
|
<span style="position:relative;">
|
||||||
|
<div class="circle-grid field" style="position:absolute; top:0; left:10px;opacity:1;"></div>
|
||||||
|
<div class="circle-grid mod" style="position:absolute; top:0; left:0;opacity:0.75;"></div>
|
||||||
|
</span>
|
||||||
|
${mod.mods[i].name} ${isCount}</div>${mod.mods[i].description}</div></div>`
|
||||||
|
} else if (mod.mods[i].isGunMod) {
|
||||||
|
text += `<div class="pause-grid-module"><div class="grid-title">
|
||||||
|
<span style="position:relative;">
|
||||||
|
<div class="circle-grid gun" style="position:absolute; top:0; left:10px; opacity:0.75;"></div>
|
||||||
|
<div class="circle-grid mod" style="position:absolute; top:0; left:0;opacity:0.75;"></div>
|
||||||
|
</span>
|
||||||
|
${mod.mods[i].name} ${isCount}</div>${mod.mods[i].description}</div></div>`
|
||||||
} else {
|
} else {
|
||||||
text += `<div class="pause-grid-module"><div class="grid-title"><div class="circle-grid mod"></div> ${mod.mods[i].name} (${mod.mods[i].count}x)</div> ${mod.mods[i].description}</div>`
|
text += `<div class="pause-grid-module"><div class="grid-title"><div class="circle-grid mod"></div> ${mod.mods[i].name} ${isCount}</div>${mod.mods[i].description}</div></div>`
|
||||||
}
|
}
|
||||||
|
// if (mod.mods[i].count === 1) {
|
||||||
|
// text += `<div class="pause-grid-module"><div class="grid-title"><div class="circle-grid mod"></div> ${mod.mods[i].name}</div> ${mod.mods[i].description}</div>`
|
||||||
|
// } else {
|
||||||
|
// text += `<div class="pause-grid-module"><div class="grid-title"><div class="circle-grid mod"></div> ${mod.mods[i].name} (${mod.mods[i].count}x)</div> ${mod.mods[i].description}</div>`
|
||||||
|
// }
|
||||||
countMods++
|
countMods++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -281,14 +300,14 @@ const build = {
|
|||||||
modID.innerHTML = ` <div class="grid-title">
|
modID.innerHTML = ` <div class="grid-title">
|
||||||
<span style="position:relative;">
|
<span style="position:relative;">
|
||||||
<div class="circle-grid field" style="position:absolute; top:0; left:10px;opacity:1;"></div>
|
<div class="circle-grid field" style="position:absolute; top:0; left:10px;opacity:1;"></div>
|
||||||
<div class="circle-grid mod" style="position:absolute; top:0; left:0;opacity:0.8;"></div>
|
<div class="circle-grid mod" style="position:absolute; top:0; left:0;opacity:0.75;"></div>
|
||||||
</span>
|
</span>
|
||||||
${mod.mods[i].name} ${isCount}</div>${mod.mods[i].description}</div>`
|
${mod.mods[i].name} ${isCount}</div>${mod.mods[i].description}</div>`
|
||||||
} else if (mod.mods[i].isGunMod) {
|
} else if (mod.mods[i].isGunMod) {
|
||||||
modID.innerHTML = ` <div class="grid-title">
|
modID.innerHTML = ` <div class="grid-title">
|
||||||
<span style="position:relative;">
|
<span style="position:relative;">
|
||||||
<div class="circle-grid gun" style="position:absolute; top:0; left:10px; opacity:0.6;"></div>
|
<div class="circle-grid gun" style="position:absolute; top:0; left:10px; opacity:0.75;"></div>
|
||||||
<div class="circle-grid mod" style="position:absolute; top:0; left:0;opacity:0.8;"></div>
|
<div class="circle-grid mod" style="position:absolute; top:0; left:0;opacity:0.75;"></div>
|
||||||
</span>
|
</span>
|
||||||
${mod.mods[i].name} ${isCount}</div>${mod.mods[i].description}</div>`
|
${mod.mods[i].name} ${isCount}</div>${mod.mods[i].description}</div>`
|
||||||
} else {
|
} else {
|
||||||
@@ -349,7 +368,6 @@ const build = {
|
|||||||
for (let i = 0, len = mech.fieldUpgrades.length; i < len; i++) {
|
for (let i = 0, len = mech.fieldUpgrades.length; i < len; i++) {
|
||||||
text += `<div id ="field-${i}" class="build-grid-module" onclick="build.choosePowerUp(this,${i},'field')"><div class="grid-title"><div class="circle-grid field"></div> ${mech.fieldUpgrades[i].name}</div> ${mech.fieldUpgrades[i].description}</div>`
|
text += `<div id ="field-${i}" class="build-grid-module" onclick="build.choosePowerUp(this,${i},'field')"><div class="grid-title"><div class="circle-grid field"></div> ${mech.fieldUpgrades[i].name}</div> ${mech.fieldUpgrades[i].description}</div>`
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let i = 0, len = b.guns.length; i < len; i++) {
|
for (let i = 0, len = b.guns.length; i < len; i++) {
|
||||||
text += `<div id = "gun-${i}" class="build-grid-module" onclick="build.choosePowerUp(this,${i},'gun')"><div class="grid-title"><div class="circle-grid gun"></div> ${b.guns[i].name}</div> ${b.guns[i].description}</div>`
|
text += `<div id = "gun-${i}" class="build-grid-module" onclick="build.choosePowerUp(this,${i},'gun')"><div class="grid-title"><div class="circle-grid gun"></div> ${b.guns[i].name}</div> ${b.guns[i].description}</div>`
|
||||||
}
|
}
|
||||||
@@ -360,14 +378,7 @@ const build = {
|
|||||||
} else if (mod.mods[i].count > 1) {
|
} else if (mod.mods[i].count > 1) {
|
||||||
text += `<div id="mod-${i}" class="build-grid-module" onclick="build.choosePowerUp(this,${i},'mod')"><div class="grid-title"><div class="circle-grid mod"></div> ${mod.mods[i].name} (${mod.mods[i].count}x)</div> ${mod.mods[i].description}</div>`
|
text += `<div id="mod-${i}" class="build-grid-module" onclick="build.choosePowerUp(this,${i},'mod')"><div class="grid-title"><div class="circle-grid mod"></div> ${mod.mods[i].name} (${mod.mods[i].count}x)</div> ${mod.mods[i].description}</div>`
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
text += `<div id="mod-${i}" class="build-grid-module" onclick="build.choosePowerUp(this,${i},'mod')"><div class="grid-title"><div class="circle-grid mod"></div> ${mod.mods[i].name}</div> ${mod.mods[i].description}</div>`
|
text += `<div id="mod-${i}" class="build-grid-module" onclick="build.choosePowerUp(this,${i},'mod')"><div class="grid-title"><div class="circle-grid mod"></div> ${mod.mods[i].name}</div> ${mod.mods[i].description}</div>`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -155,12 +155,12 @@ const level = {
|
|||||||
spawn.mapRect(level.exit.x, level.exit.y + 20, 100, 100); //exit bump
|
spawn.mapRect(level.exit.x, level.exit.y + 20, 100, 100); //exit bump
|
||||||
// spawn.boost(1500, 0, 900);
|
// spawn.boost(1500, 0, 900);
|
||||||
|
|
||||||
spawn.starter(1900, -500, 200)
|
// spawn.starter(1900, -500, 200) //big boy
|
||||||
// spawn.exploder(2900, -500)
|
// spawn.exploder(2900, -500)
|
||||||
// spawn.launcherBoss(1200, -500)
|
// spawn.launcherBoss(1200, -500)
|
||||||
// spawn.laserTargetingBoss(1600, -400)
|
// spawn.laserTargetingBoss(1600, -400)
|
||||||
// spawn.striker(1600, -500)
|
// spawn.striker(1600, -500)
|
||||||
// spawn.shooter(1700, -120)
|
spawn.shooter(1700, -120)
|
||||||
// spawn.bomberBoss(1400, -500)
|
// spawn.bomberBoss(1400, -500)
|
||||||
// spawn.sniper(1800, -120)
|
// spawn.sniper(1800, -120)
|
||||||
// spawn.cellBossCulture(1600, -500)
|
// spawn.cellBossCulture(1600, -500)
|
||||||
|
|||||||
@@ -3391,7 +3391,7 @@ const mod = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "micro-extruder",
|
name: "micro-extruder",
|
||||||
description: "<strong class='color-plasma'>plasma</strong> torch ejects a thin <strong class='color-plasma'>hot</strong> wire<br>increases <strong class='color-d'>damage</strong>, and <strong class='color-f'>energy</strong> drain",
|
description: "<strong class='color-plasma'>plasma</strong> <strong>torch</strong> extrudes a thin <strong class='color-plasma'>hot</strong> wire<br>increases <strong class='color-d'>damage</strong>, and <strong class='color-f'>energy</strong> drain",
|
||||||
isFieldMod: true,
|
isFieldMod: true,
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
|
|||||||
@@ -1641,6 +1641,7 @@ const mech = {
|
|||||||
effect() {
|
effect() {
|
||||||
mech.fieldMeterColor = "#f0f"
|
mech.fieldMeterColor = "#f0f"
|
||||||
mech.hold = function() {
|
mech.hold = function() {
|
||||||
|
mech.isExtruderOn = false
|
||||||
if (mech.isHolding) {
|
if (mech.isHolding) {
|
||||||
mech.drawHold(mech.holdingTarget);
|
mech.drawHold(mech.holdingTarget);
|
||||||
mech.holding();
|
mech.holding();
|
||||||
|
|||||||
@@ -313,7 +313,27 @@ const powerUps = {
|
|||||||
|
|
||||||
if (options.length > 0) {
|
if (options.length > 0) {
|
||||||
const choose = options[Math.floor(Math.random() * options.length)]
|
const choose = options[Math.floor(Math.random() * options.length)]
|
||||||
text += `<div class="choose-grid-module" onclick="powerUps.choose('mod',${choose})"><div class="grid-title"><div class="circle-grid mod"></div> ${mod.mods[choose].name}</div> ${mod.mods[choose].description}</div>`
|
const isCount = mod.mods[choose].count > 0 ? `(${mod.mods[choose].count+1}x)` : "";
|
||||||
|
|
||||||
|
if (mod.mods[choose].isFieldMod) {
|
||||||
|
text += `<div class="choose-grid-module" onclick="powerUps.choose('mod',${choose})"><div class="grid-title">
|
||||||
|
<span style="position:relative;">
|
||||||
|
<div class="circle-grid field" style="position:absolute; top:0; left:10px;opacity:1;"></div>
|
||||||
|
<div class="circle-grid mod" style="position:absolute; top:0; left:0;opacity:0.75;"></div>
|
||||||
|
</span>
|
||||||
|
${mod.mods[choose].name} ${isCount}</div>${mod.mods[choose].description}</div></div>`
|
||||||
|
} else if (mod.mods[choose].isGunMod) {
|
||||||
|
text += `<div class="choose-grid-module" onclick="powerUps.choose('mod',${choose})"><div class="grid-title">
|
||||||
|
<span style="position:relative;">
|
||||||
|
<div class="circle-grid gun" style="position:absolute; top:0; left:10px; opacity:0.75;"></div>
|
||||||
|
<div class="circle-grid mod" style="position:absolute; top:0; left:0;opacity:0.75;"></div>
|
||||||
|
</span>
|
||||||
|
${mod.mods[choose].name} ${isCount}</div>${mod.mods[choose].description}</div></div>`
|
||||||
|
} else {
|
||||||
|
text += `<div class="choose-grid-module" onclick="powerUps.choose('mod',${choose})"><div class="grid-title"><div class="circle-grid mod"></div> ${mod.mods[choose].name} ${isCount}</div>${mod.mods[choose].description}</div>`
|
||||||
|
}
|
||||||
|
|
||||||
|
// text += `<div class="choose-grid-module" onclick="powerUps.choose('mod',${choose})"><div class="grid-title"><div class="circle-grid mod"></div> ${mod.mods[choose].name}</div> ${mod.mods[choose].description}</div>`
|
||||||
return choose
|
return choose
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -593,7 +593,7 @@ em {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.gun {
|
.gun {
|
||||||
background: rgb(15, 75, 179);
|
background: rgb(10, 79, 198);
|
||||||
}
|
}
|
||||||
|
|
||||||
.heal {
|
.heal {
|
||||||
|
|||||||
10
todo.txt
10
todo.txt
@@ -1,6 +1,8 @@
|
|||||||
******************************************************** NEXT PATCH ********************************************************
|
******************************************************** NEXT PATCH ********************************************************
|
||||||
|
|
||||||
|
|
||||||
|
mods for guns and fields have an extra circle in selection menus
|
||||||
|
|
||||||
******************************************************** BUGS ********************************************************
|
******************************************************** BUGS ********************************************************
|
||||||
|
|
||||||
entering custom, after dieing makes all mods look white (not disabled)
|
entering custom, after dieing makes all mods look white (not disabled)
|
||||||
@@ -36,16 +38,8 @@ mod and mob are too similar
|
|||||||
|
|
||||||
******************************************************** TODO ********************************************************
|
******************************************************** TODO ********************************************************
|
||||||
|
|
||||||
consider making gun color more blue and less dark
|
|
||||||
|
|
||||||
color/highlight field or gun mods in selection menu (or custom)
|
|
||||||
to show that they are special
|
|
||||||
|
|
||||||
mechanic - Your energy regen is only active when field and gun have not been used for 5 seconds.
|
mechanic - Your energy regen is only active when field and gun have not been used for 5 seconds.
|
||||||
|
|
||||||
divide supercapacitator into 2-3 stacks
|
|
||||||
smaller effect for stack 1, but overall bigger effect at 3
|
|
||||||
|
|
||||||
be able to open up custom mode in the normal game
|
be able to open up custom mode in the normal game
|
||||||
might need to be rebuilt from scratch
|
might need to be rebuilt from scratch
|
||||||
while in through testing mode?
|
while in through testing mode?
|
||||||
|
|||||||
Reference in New Issue
Block a user