builds, drone balance, recursive heal mod fixed
This commit is contained in:
@@ -100,7 +100,7 @@ const b = {
|
||||
},
|
||||
{
|
||||
name: "ceramic plating",
|
||||
description: "<strong>immune</strong> to <strong class='color-e'>explosions</strong> and enemy fields",
|
||||
description: "<strong>immune</strong> to <strong class='color-e'>explosions</strong><br> <strong>immune</strong> to enemy field effects",
|
||||
have: false, //5
|
||||
effect: () => {
|
||||
b.isModAoEImmunity = true; //good for guns with explosions
|
||||
@@ -167,6 +167,7 @@ const b = {
|
||||
description: "<strong class='color-h'>healing</strong> power ups bring you to <strong>full health</strong>",
|
||||
have: false, //13
|
||||
effect: () => { // good with ablative synthesis, melee builds
|
||||
b.isModFullHeal = true
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -174,7 +175,6 @@ const b = {
|
||||
description: "<strong>launch blocks</strong> at much higher speeds<br>carry more massive blocks",
|
||||
have: false, //14
|
||||
effect: () => { // good with guns that run out of ammo
|
||||
b.isModFullHeal = true
|
||||
mech.throwChargeRate = 4;
|
||||
mech.throwChargeMax = 150;
|
||||
mech.holdingMassScale = 0.05; //can hold heavier blocks with lower cost to jumping
|
||||
@@ -200,7 +200,7 @@ const b = {
|
||||
},
|
||||
{
|
||||
name: "kinetic bombardment",
|
||||
description: "do extra <strong class='color-d'>damage</strong> from farther away<br><em>up to 50% increase at about 30 steps away</em>",
|
||||
description: "do extra <strong class='color-d'>damage</strong> from a distance<br><em>up to 50% increase at about 30 steps away</em>",
|
||||
have: false, //17
|
||||
effect: () => { // good with annihilation, melee builds
|
||||
b.isModFarAwayDmg = true; //used in mob.damage()
|
||||
@@ -224,7 +224,7 @@ const b = {
|
||||
},
|
||||
{
|
||||
name: "monogamy",
|
||||
description: "equipping your first gun reduces <strong class='color-d'>damage</strong> taken<br>scales by <strong>7%</strong> for each gun in your inventory",
|
||||
description: "using your first gun reduces <strong class='color-d'>damage</strong> taken<br>scales by <strong>7%</strong> for each gun in your inventory",
|
||||
have: false, //20
|
||||
effect: () => { // good with long term planning
|
||||
b.isModMonogamy = true
|
||||
@@ -1563,9 +1563,9 @@ const b = {
|
||||
friction: 0.05,
|
||||
frictionAir: 0.0005,
|
||||
restitution: 1,
|
||||
dmg: 0.14 + b.modExtraDmg, //damage done in addition to the damage from momentum
|
||||
lookFrequency: 79 + Math.floor(37 * Math.random()),
|
||||
endCycle: game.cycle + Math.floor((960 + 360 * Math.random()) * b.isModBulletsLastLonger),
|
||||
dmg: 0.13 + b.modExtraDmg, //damage done in addition to the damage from momentum
|
||||
lookFrequency: 83 + Math.floor(41 * Math.random()),
|
||||
endCycle: game.cycle + Math.floor((900 + 360 * Math.random()) * b.isModBulletsLastLonger),
|
||||
classType: "bullet",
|
||||
collisionFilter: {
|
||||
category: 0x000100,
|
||||
@@ -1641,7 +1641,7 @@ const b = {
|
||||
}
|
||||
}
|
||||
})
|
||||
b.fireProps(mech.crouch ? 19 : 15, mech.crouch ? 35 : 1, dir, me); //cd , speed
|
||||
b.fireProps(mech.crouch ? 14 : 10, mech.crouch ? 40 : 1, dir, me); //cd , speed
|
||||
b.drawOneBullet(bullet[me].vertices);
|
||||
}
|
||||
},
|
||||
|
||||
48
js/level.js
48
js/level.js
@@ -14,10 +14,10 @@ const level = {
|
||||
start() {
|
||||
if (level.levelsCleared === 0) {
|
||||
// game.difficulty = 6; //for testing to simulate possible mobs spawns
|
||||
// level.startBuildRun(6)
|
||||
// level.startBuildRun(2)
|
||||
// b.giveGuns(11)
|
||||
// mech.fieldUpgrades[2].effect();
|
||||
// b.giveMod(20)
|
||||
// b.giveMod(13)
|
||||
// spawn.pickList = ["ghoster", "ghoster"]
|
||||
|
||||
this.intro(); //starting level
|
||||
@@ -41,30 +41,39 @@ const level = {
|
||||
builds: [ // choose 5 total: guns, mods, and field
|
||||
() => {
|
||||
mech.fieldUpgrades[2].effect();
|
||||
b.giveMod(6)
|
||||
b.giveMod(8)
|
||||
b.giveMod(9)
|
||||
b.giveMod(5)
|
||||
b.giveMod(12)
|
||||
b.giveMod(15)
|
||||
b.giveMod(18)
|
||||
game.replaceTextLog = true;
|
||||
game.makeTextLog("<h2>build: melee</h2>", 300);
|
||||
game.makeTextLog("<h2>build: wild melee</h2>", 300);
|
||||
},
|
||||
() => {
|
||||
b.giveGuns(13)
|
||||
mech.fieldUpgrades[5].effect();
|
||||
b.giveMod(8)
|
||||
b.giveMod(3)
|
||||
b.giveMod(11)
|
||||
// mech.fieldUpgrades[5].effect();
|
||||
b.giveMod(7)
|
||||
b.giveMod(16)
|
||||
b.giveMod(17)
|
||||
game.replaceTextLog = true;
|
||||
game.makeTextLog("<h2>build: drones</h2>", 300);
|
||||
game.makeTextLog("<h2>build: hive master</h2><em>zoom in and out with +/-</em>", 300);
|
||||
},
|
||||
() => {
|
||||
// b.giveGuns(13)
|
||||
mech.fieldUpgrades[5].effect();
|
||||
b.giveMod(6)
|
||||
b.giveMod(8)
|
||||
b.giveMod(9)
|
||||
game.replaceTextLog = true;
|
||||
game.makeTextLog("<h2>build: drone close range</h2>", 300);
|
||||
},
|
||||
() => {
|
||||
b.giveGuns(8)
|
||||
mech.fieldUpgrades[4].effect();
|
||||
b.giveMod(4)
|
||||
b.giveMod(5)
|
||||
b.giveMod(16)
|
||||
b.giveMod(19)
|
||||
game.replaceTextLog = true;
|
||||
game.makeTextLog("<h2>build: flak</h2>", 300);
|
||||
game.makeTextLog("<h2>build: anti-air</h2>", 300);
|
||||
},
|
||||
() => {
|
||||
b.giveMod(6)
|
||||
@@ -73,7 +82,7 @@ const level = {
|
||||
b.giveMod(13)
|
||||
b.giveMod(14)
|
||||
game.replaceTextLog = true;
|
||||
game.makeTextLog("<h2>build: block thrower</h2>", 300);
|
||||
game.makeTextLog("<h2>build: fastball</h2>", 300);
|
||||
},
|
||||
() => {
|
||||
b.giveGuns(5)
|
||||
@@ -82,7 +91,7 @@ const level = {
|
||||
b.giveMod(8)
|
||||
b.giveMod(15)
|
||||
game.replaceTextLog = true;
|
||||
game.makeTextLog("<h2>build: stealth shotgun</h2>", 300);
|
||||
game.makeTextLog("<h2>build: stealth</h2>", 300);
|
||||
},
|
||||
() => {
|
||||
b.giveGuns(2)
|
||||
@@ -102,6 +111,15 @@ const level = {
|
||||
game.replaceTextLog = true;
|
||||
game.makeTextLog("<h2>build: laser tag</h2>", 300);
|
||||
},
|
||||
() => {
|
||||
b.giveGuns(12)
|
||||
mech.fieldUpgrades[6].effect();
|
||||
b.giveMod(3)
|
||||
b.giveMod(6)
|
||||
b.giveMod(7)
|
||||
game.replaceTextLog = true;
|
||||
game.makeTextLog("<h2>build: phased spores</h2>", 300);
|
||||
},
|
||||
],
|
||||
startBuildRun(build) {
|
||||
level.builds[build]()
|
||||
|
||||
@@ -234,7 +234,6 @@ const mobs = {
|
||||
if (!b.isModAoEImmunity) {
|
||||
mech.damage(0.0003 * game.dmgScale);
|
||||
if (mech.fieldMeter > 0.1) mech.fieldMeter -= 0.005
|
||||
}
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(this.position.x, this.position.y);
|
||||
ctx.lineTo(mech.pos.x, mech.pos.y);
|
||||
@@ -248,6 +247,7 @@ const mobs = {
|
||||
ctx.fillStyle = "rgba(255,0,170,0.15)";
|
||||
ctx.fill();
|
||||
}
|
||||
}
|
||||
ctx.beginPath();
|
||||
ctx.arc(this.position.x, this.position.y, this.laserRange * 0.9, 0, 2 * Math.PI);
|
||||
ctx.strokeStyle = "rgba(255,0,170,0.5)";
|
||||
|
||||
@@ -431,7 +431,7 @@ const mech = {
|
||||
},
|
||||
addHealth(heal) {
|
||||
this.health += heal;
|
||||
if (this.health > 1) this.health = 1;
|
||||
if (this.health > 1 || b.isModFullHeal) this.health = 1;
|
||||
this.displayHealth();
|
||||
},
|
||||
defaultFPSCycle: 0, //tracks when to return to normal fps
|
||||
@@ -1445,6 +1445,7 @@ const mech = {
|
||||
if (mech.fieldMeter === 1) {
|
||||
mech.fieldMeter -= 0.43;
|
||||
b.guns[gunIndex].fire() //spawn drone
|
||||
mech.fireCDcycle = mech.cycle + 25; // set fire cool down to prevent +energy from making huge numbers of drones
|
||||
}
|
||||
if (mech.isHolding) {
|
||||
mech.drawHold(mech.holdingTarget);
|
||||
|
||||
@@ -456,11 +456,9 @@ const spawn = {
|
||||
|
||||
this.healthBar();
|
||||
//when player is inside event horizon
|
||||
if (Matter.Vector.magnitude(Matter.Vector.sub(this.position, player.position)) < eventHorizon) {
|
||||
if (!b.isModAoEImmunity) {
|
||||
if (Matter.Vector.magnitude(Matter.Vector.sub(this.position, player.position)) < eventHorizon && !b.isModAoEImmunity) {
|
||||
mech.damage(0.00015 * game.dmgScale);
|
||||
if (mech.fieldMeter > 0.1) mech.fieldMeter -= 0.01
|
||||
}
|
||||
const angle = Math.atan2(player.position.y - this.position.y, player.position.x - this.position.x);
|
||||
player.force.x -= 1.25 * Math.cos(angle) * player.mass * game.g * (mech.onGround ? 1.8 : 1);
|
||||
player.force.y -= 0.96 * player.mass * game.g * Math.sin(angle);
|
||||
@@ -547,11 +545,9 @@ const spawn = {
|
||||
ctx.fillStyle = "rgba(0,0,0,0.05)";
|
||||
ctx.fill();
|
||||
//when player is inside event horizon
|
||||
if (Matter.Vector.magnitude(Matter.Vector.sub(this.position, player.position)) < eventHorizon) {
|
||||
if (!b.isModAoEImmunity) {
|
||||
if (Matter.Vector.magnitude(Matter.Vector.sub(this.position, player.position)) < eventHorizon && !b.isModAoEImmunity) {
|
||||
mech.damage(0.00015 * game.dmgScale);
|
||||
if (mech.fieldMeter > 0.1) mech.fieldMeter -= 0.01
|
||||
}
|
||||
const angle = Math.atan2(player.position.y - this.position.y, player.position.x - this.position.x);
|
||||
player.force.x -= 1.3 * Math.cos(angle) * player.mass * game.g * (mech.onGround ? 1.7 : 1);
|
||||
player.force.y -= 1.2 * Math.sin(angle) * player.mass * game.g;
|
||||
|
||||
Reference in New Issue
Block a user