laser pulse balance

This commit is contained in:
landgreen
2019-12-21 13:25:12 -08:00
parent f48cd896f2
commit 720ca13f9f
4 changed files with 17 additions and 22 deletions

View File

@@ -191,18 +191,18 @@ const b = {
},
{
name: "overcharge",
description: "charge <strong class='color-f'>energy</strong> <strong>25%</strong> beyond your <strong>maximum</strong>",
description: "charge <strong class='color-f'>energy</strong> <strong>33%</strong> beyond your <strong>maximum</strong>",
have: false, //16
effect: () => {
mech.fieldEnergyMax = 1.25
mech.fieldEnergyMax = 1.33
}
},
{
name: "supersaturation",
description: "<strong class='color-h'>heal</strong> <strong>25%</strong> beyond your <strong>max health</strong>",
description: "<strong class='color-h'>heal</strong> <strong>33%</strong> beyond your <strong>max health</strong>",
have: false, //17
effect: () => {
mech.maxHealth = 1.25
mech.maxHealth = 1.33
}
},
{
@@ -215,7 +215,7 @@ const b = {
},
{
name: "mass-energy equivalence",
description: "convert the mass of <strong>power ups</strong> into <strong class='color-f'>energy</strong><br>power ups fill your <strong class='color-f'>energy</strong> and <strong class='color-h'>heal</strong> for +3%",
description: "convert the mass of <strong>power ups</strong> into <strong class='color-f'>energy</strong><br>power ups fill your <strong class='color-f'>energy</strong> and <strong class='color-h'>heal</strong> for +5%",
have: false, //19
effect: () => {
b.isModMassEnergy = true // used in mech.usePowerUp
@@ -1830,12 +1830,11 @@ const b = {
},
{
name: "pulse", //15
description: "emit a pulse of collimation coherent light<br>use <strong class='color-f'>energy</strong> to induce an <strong class='color-e'>explosion</strong>",
description: "emit an <strong class='color-e'>explosive</strong> laser pulse<br>each pulse uses 20% of your <strong class='color-f'>energy</strong>",
ammo: 0,
ammoPack: Infinity,
have: false,
isStarterGun: true,
count: 0,
fire() {
//calculate laser collision
let best;
@@ -1910,28 +1909,24 @@ const b = {
};
}
//draw blowtorch laser beam
ctx.strokeStyle = "rgba(255,0,0,0.15)"
ctx.lineWidth = 16
//draw laser beam
ctx.strokeStyle = "rgba(255,0,0,0.2)"
ctx.lineWidth = 25
ctx.beginPath();
ctx.moveTo(path[0].x, path[0].y);
ctx.lineTo(path[1].x, path[1].y);
ctx.stroke();
ctx.strokeStyle = "#f00";
ctx.lineWidth = 2.5
ctx.lineWidth = 4
ctx.beginPath();
ctx.moveTo(path[0].x, path[0].y);
ctx.lineTo(path[1].x, path[1].y);
ctx.stroke();
this.count++
if (this.count > 2) {
this.count = 0;
mech.fireCDcycle = mech.cycle + Math.floor(30 * b.modFireRate); // cool down
const energy = Math.min(0.2, mech.fieldMeter * 0.3)
if (best.who) b.explosion(path[1], 1300 * energy)
mech.fieldMeter -= energy
}
const energy = mech.fieldMeter * 0.2
mech.fieldMeter -= energy
if (best.who) b.explosion(path[1], 1300 * energy)
mech.fireCDcycle = mech.cycle + Math.floor(20 * b.modFireRate); // cool down
}
},
{

View File

@@ -14,7 +14,7 @@ const level = {
start() {
if (level.levelsCleared === 0) {
// game.difficulty = 6; //for testing to simulate possible mobs spawns
b.giveGuns(15)
// b.giveGuns(15)
// mech.fieldUpgrades[2].effect();
// b.giveMod(21)

View File

@@ -522,7 +522,7 @@ const mech = {
powerUp.splice(i, 1);
if (b.isModMassEnergy) {
mech.fieldMeter = mech.fieldEnergyMax;
mech.addHealth(0.03);
mech.addHealth(0.05);
}
},
drawLeg(stroke) {

View File

@@ -41,7 +41,7 @@ const powerUps = {
target = b.guns[Math.floor(Math.random() * b.guns.length)];
}
if (target.ammo === Infinity) {
mech.fieldMeter = 1;
mech.fieldMeter = mech.fieldEnergyMax;
if (!game.lastLogTime) game.makeTextLog("<span style='font-size:115%;'><span class='color-f'>+energy</span></span>", 300);
} else {
//ammo given scales as mobs take more hits to kill