big fixes
rail gun shield leveraged investments and born rule
This commit is contained in:
@@ -815,7 +815,7 @@ const b = {
|
||||
bullet = [];
|
||||
|
||||
let count = b.modCount
|
||||
if (b.isModNoAmmo) count - 5 //remove the 5 bonus mods when getting rid of leveraged investment
|
||||
if (b.isModNoAmmo) count -= 5 //remove the 5 bonus mods when getting rid of leveraged investment
|
||||
for (let i = 0; i < count; i++) { // spawn new mods
|
||||
powerUps.spawn(mech.pos.x, mech.pos.y, "mod");
|
||||
}
|
||||
@@ -3325,11 +3325,13 @@ const b = {
|
||||
if (who.shield) {
|
||||
for (let i = 0, len = mob.length; i < len; i++) {
|
||||
if (mob[i].id === who.shieldTargetID) { //apply some knock back to shield mob before shield breaks
|
||||
const force = Matter.Vector.mult(this.velocity, 7 / mob[i].mass)
|
||||
Matter.Body.setVelocity(mob[i], {
|
||||
x: mob[i].velocity.x + force.x,
|
||||
y: mob[i].velocity.y + force.y
|
||||
});
|
||||
|
||||
Matter.Body.setVelocity(mob[i], Matter.Vector.mult(Matter.Vector.normalise(this.velocity), 10));
|
||||
|
||||
// const force = Matter.Vector.mult(this.velocity, 4 / mob[i].mass)
|
||||
// const velocity = Matter.Vector.add(force, mob[i].velocity)
|
||||
// Matter.Body.setVelocity(mob[i], velocity);
|
||||
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
11
js/level.js
11
js/level.js
@@ -15,12 +15,12 @@ const level = {
|
||||
if (build.isURLBuild && level.levelsCleared === 0) build.onLoadPowerUps();
|
||||
if (level.levelsCleared === 0) { //this code only runs on the first level
|
||||
// level.difficultyIncrease(9)
|
||||
// b.giveGuns("vacuum bomb")
|
||||
b.giveGuns("rail gun")
|
||||
// mech.setField("pilot wave")
|
||||
// b.giveMod("nonlocality");
|
||||
|
||||
level.intro(); //starting level
|
||||
// level.testing();
|
||||
// level.intro(); //starting level
|
||||
level.testing();
|
||||
// level.stronghold()
|
||||
// level.bosses();
|
||||
// level.satellite();
|
||||
@@ -148,8 +148,9 @@ const level = {
|
||||
spawn.mapRect(6700, -1800, 800, 2600); //right wall
|
||||
spawn.mapRect(level.exit.x, level.exit.y + 20, 100, 100); //exit bump
|
||||
|
||||
// spawn.laserBoss(2900, -500)
|
||||
spawn.striker(1200, -500)
|
||||
// spawn.bomberBoss(2900, -500)
|
||||
spawn.hopper(1200, -500)
|
||||
spawn.hopper(1200, -500)
|
||||
// spawn.timeSkipBoss(2900, -500)
|
||||
// spawn.randomMob(1600, -500)
|
||||
|
||||
|
||||
17
js/player.js
17
js/player.js
@@ -1828,17 +1828,22 @@ const mech = {
|
||||
const off2 = 1 - 0.06 * Math.sin(mech.fieldPhase);
|
||||
ctx.beginPath();
|
||||
ctx.ellipse(mech.pos.x, mech.pos.y, radius * off1, radius * off2, rotate, 0, 2 * Math.PI);
|
||||
ctx.fillStyle = "#fff" //`rgba(0,0,0,${0.5+0.5*mech.energy})`;
|
||||
ctx.globalCompositeOperation = "destination-in"; //in or atop
|
||||
ctx.fill();
|
||||
ctx.globalCompositeOperation = "source-over";
|
||||
ctx.clip();
|
||||
|
||||
if (mech.fireCDcycle > mech.cycle && (keys[32] || game.mouseDownRight)) {
|
||||
ctx.lineWidth = 5;
|
||||
ctx.strokeStyle = `rgba(0, 204, 255,1)`
|
||||
ctx.stroke()
|
||||
}
|
||||
if (b.modRenormalization) {
|
||||
for (let i = 0; i < bullet.length; i++) {
|
||||
ctx.moveTo(bullet[i].position.x, bullet[i].position.y)
|
||||
ctx.arc(bullet[i].position.x, bullet[i].position.y, radius, 0, 2 * Math.PI);
|
||||
}
|
||||
}
|
||||
ctx.fillStyle = "#fff" //`rgba(0,0,0,${0.5+0.5*mech.energy})`;
|
||||
ctx.globalCompositeOperation = "destination-in"; //in or atop
|
||||
ctx.fill();
|
||||
ctx.globalCompositeOperation = "source-over";
|
||||
ctx.clip();
|
||||
}
|
||||
|
||||
mech.isStealth = false //isStealth disables most uses of foundPlayer()
|
||||
|
||||
Reference in New Issue
Block a user