laser mod beam splitter
laser mod: beam splitter - laser is split into diverging beams, but does 10% less damage
This commit is contained in:
16
js/bullet.js
16
js/bullet.js
@@ -3230,8 +3230,7 @@ const b = {
|
|||||||
mech.energy -= mech.fieldRegen + mod.laserFieldDrain * mod.isLaserDiode
|
mech.energy -= mech.fieldRegen + mod.laserFieldDrain * mod.isLaserDiode
|
||||||
if (mod.isWideLaser) {
|
if (mod.isWideLaser) {
|
||||||
const off = 8
|
const off = 8
|
||||||
const dmg = 0.6 * mod.laserDamage // 5 * 0.4 = 200% more damage
|
const dmg = 0.4 * mod.laserDamage // 5 * 0.4 = 200% more damage
|
||||||
// ctx.lineCap = 'butt';
|
|
||||||
b.laser({
|
b.laser({
|
||||||
x: mech.pos.x + 20 * Math.cos(mech.angle),
|
x: mech.pos.x + 20 * Math.cos(mech.angle),
|
||||||
y: mech.pos.y + 20 * Math.sin(mech.angle)
|
y: mech.pos.y + 20 * Math.sin(mech.angle)
|
||||||
@@ -3252,7 +3251,18 @@ const b = {
|
|||||||
y: i * off * Math.sin(mech.angle - Math.PI / 2)
|
y: i * off * Math.sin(mech.angle - Math.PI / 2)
|
||||||
}), mech.angle, dmg, 0, true)
|
}), mech.angle, dmg, 0, true)
|
||||||
}
|
}
|
||||||
// ctx.lineCap = 'round';
|
} else if (mod.beamSplitter) {
|
||||||
|
let dmg = mod.laserDamage * 0.9
|
||||||
|
const where = {
|
||||||
|
x: mech.pos.x + 20 * Math.cos(mech.angle),
|
||||||
|
y: mech.pos.y + 20 * Math.sin(mech.angle)
|
||||||
|
}
|
||||||
|
b.laser(where, mech.angle, dmg)
|
||||||
|
for (let i = 1; i < 1 + mod.beamSplitter; i++) {
|
||||||
|
b.laser(where, mech.angle + i * 0.2, dmg)
|
||||||
|
b.laser(where, mech.angle - i * 0.2, dmg)
|
||||||
|
dmg *= 0.9
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
b.laser()
|
b.laser()
|
||||||
}
|
}
|
||||||
|
|||||||
26
js/mods.js
26
js/mods.js
@@ -2352,24 +2352,39 @@ const mod = {
|
|||||||
mod.laserFieldDrain = 0.0012;
|
mod.laserFieldDrain = 0.0012;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "beam splitter",
|
||||||
|
description: `your <strong>laser</strong> is <strong>split</strong> into diverging beams<br>decrease <strong class='color-d'>damage</strong> by <strong>10%</strong>`,
|
||||||
|
maxCount: 9,
|
||||||
|
count: 0,
|
||||||
|
allowed() {
|
||||||
|
return mod.haveGunCheck("laser") && !mod.isWideLaser
|
||||||
|
},
|
||||||
|
requires: "laser, not specular reflection",
|
||||||
|
effect() {
|
||||||
|
mod.beamSplitter++
|
||||||
|
},
|
||||||
|
remove() {
|
||||||
|
mod.beamSplitter = 0
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "diffuse beam",
|
name: "diffuse beam",
|
||||||
description: "<strong>laser</strong> beam is <strong>wider</strong> but doesn't <strong>reflect</strong><br>increase <strong class='color-d'>damage</strong> and <strong class='color-f'>energy</strong> drain by <strong>150%</strong>",
|
description: "<strong>laser</strong> beam is <strong>wider</strong> and doesn't <strong>reflect</strong><br>increase <strong class='color-d'>damage</strong> by <strong>100%</strong>",
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
allowed() {
|
allowed() {
|
||||||
return mod.haveGunCheck("laser") && mod.laserReflections < 3
|
return mod.haveGunCheck("laser") && mod.laserReflections < 3 && !mod.beamSplitter
|
||||||
},
|
},
|
||||||
requires: "laser, not specular reflection",
|
requires: "laser, not specular reflection",
|
||||||
effect() {
|
effect() {
|
||||||
mod.isWideLaser = true
|
mod.isWideLaser = true
|
||||||
mod.laserFieldDrain = 0.0012 * 2.5 //base is 0.002
|
|
||||||
},
|
},
|
||||||
remove() {
|
remove() {
|
||||||
mod.isWideLaser = false
|
mod.isWideLaser = false
|
||||||
mod.laserFieldDrain = 0.0012;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// {
|
// {
|
||||||
// name: "waste heat recovery",
|
// name: "waste heat recovery",
|
||||||
// description: "<strong>laser</strong> <strong class='color-d'>damage</strong> grows by <strong>400%</strong> as you fire<br>but you periodically <strong>eject</strong> your <strong class='color-h'>health</strong>",
|
// description: "<strong>laser</strong> <strong class='color-d'>damage</strong> grows by <strong>400%</strong> as you fire<br>but you periodically <strong>eject</strong> your <strong class='color-h'>health</strong>",
|
||||||
@@ -2973,5 +2988,6 @@ const mod = {
|
|||||||
aimDamage: null,
|
aimDamage: null,
|
||||||
isNoFireDefense: null,
|
isNoFireDefense: null,
|
||||||
isNoFireDamage: null,
|
isNoFireDamage: null,
|
||||||
duplicateChance: null
|
duplicateChance: null,
|
||||||
|
beamSplitter: null
|
||||||
}
|
}
|
||||||
10
todo.txt
10
todo.txt
@@ -1,11 +1,11 @@
|
|||||||
mod: stimulated emission - 8% chance to duplicate power ups
|
laser mod: beam splitter - laser is split into diverging beams, but does 10% less damage
|
||||||
laser mod: diffuse beam - laser is wide but doesn't reflect, 150% damage and energy drain
|
|
||||||
|
|
||||||
************** TODO - n-gon **************
|
************** TODO - n-gon **************
|
||||||
|
|
||||||
write a function that returns collisions
|
laser mod, increase damage, but ass some angular spread to 5 laser beam
|
||||||
mod: laser gets increased damage with each reflection
|
require diffuse
|
||||||
mod: laser is 3 thick beams that look like one, but can separate into three at corners
|
|
||||||
|
use the b.laser() function
|
||||||
|
|
||||||
mod set a max speed cap based on distance from player while field is active
|
mod set a max speed cap based on distance from player while field is active
|
||||||
mod for a field, or bot?
|
mod for a field, or bot?
|
||||||
|
|||||||
Reference in New Issue
Block a user