grappling hook 2nd update
grappling hook
added coupling effect - 4% extra ammo per coupling
doesn't destroy blocks, instead the player grabs blocks
doesn't automatically retract after hitting power ups
improved momentum conservation on yank and catching blocks, power ups
removed accidental 55% defense for grapple field
tech (no images yet)
autonomous defense - fire harpoons at nearby mobs
rupture - explosion on impact with map, block, mob
negative mass field has horizontal block motion by default
fixed tech sorting by "allowed tech" in experiment mode
This commit is contained in:
18
js/engine.js
18
js/engine.js
@@ -204,6 +204,24 @@ function collisionChecks(event) {
|
||||
// time: 25
|
||||
// });
|
||||
}
|
||||
// if (true) { //fire harpoons at mobs after getting hit
|
||||
// const countMax = 12
|
||||
// let count = countMax
|
||||
// const range = 300
|
||||
// for (let i = 0; i < mob.length; i++) {
|
||||
// if (count > 0 && Vector.magnitude(Vector.sub(m.pos, mob[i].position)) < range) {
|
||||
// count--
|
||||
// if (m.fieldCDcycle < m.cycle + 30) m.fieldCDcycle = m.cycle + 30
|
||||
// const angle = Math.atan2(mob[i].position.y - player.position.y, mob[i].position.x - player.position.x);
|
||||
// b.harpoon(m.pos, mob[i], angle, 0.75, true, 20) // harpoon(where, target, angle = m.angle, harpoonSize = 1, isReturn = false, totalCycles = 35, isReturnAmmo = true, thrust = 0.1) {
|
||||
// for (; count > 0; count--) {
|
||||
// b.harpoon(m.pos, mob[i], count * Math.PI / countMax, 0.75, true, 9) // harpoon(where, target, angle = m.angle, harpoonSize = 1, isReturn = false, totalCycles = 35, isReturnAmmo = true, thrust = 0.1) {
|
||||
// bullet[bullet.length - 1].drain = 0
|
||||
// }
|
||||
// break
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
if (tech.isStimulatedEmission) powerUps.ejectTech()
|
||||
if (mob[k].onHit) mob[k].onHit();
|
||||
if (m.immuneCycle < m.cycle + m.collisionImmuneCycles) m.immuneCycle = m.cycle + m.collisionImmuneCycles; //player is immune to damage for 30 cycles
|
||||
|
||||
Reference in New Issue
Block a user