removed junk-bot, rail gun balance and bug fixes (working on dwarf star mines)
This commit is contained in:
@@ -150,7 +150,7 @@
|
||||
<details>
|
||||
<summary>settings</summary>
|
||||
<div id="details-div">
|
||||
<label for="body-damage" title="allow damage from heavy, fast moving blocks">damage from blocks:</label>
|
||||
<label for="body-damage" title="allow damage from heavy, fast moving blocks">block collision damage:</label>
|
||||
<input type="checkbox" id="body-damage" name="body-damage" checked>
|
||||
<br><br>
|
||||
<label for="difficulty-select" title="effects: number of mobs, damage done by mobs, damage done to mobs, mob speed">combat difficulty:</label>
|
||||
|
||||
2375
js/bullets.js
2375
js/bullets.js
File diff suppressed because it is too large
Load Diff
@@ -608,7 +608,7 @@ const game = {
|
||||
}
|
||||
|
||||
if (!(mech.cycle % 420)) {
|
||||
remove = function (who) {
|
||||
fallCheck = function (who) {
|
||||
let i = who.length;
|
||||
while (i--) {
|
||||
if (who[i].position.y > game.fallHeight) {
|
||||
@@ -617,9 +617,9 @@ const game = {
|
||||
}
|
||||
}
|
||||
};
|
||||
remove(mob);
|
||||
remove(body);
|
||||
remove(powerUp);
|
||||
fallCheck(mob);
|
||||
fallCheck(body);
|
||||
fallCheck(powerUp);
|
||||
}
|
||||
},
|
||||
testingOutput() {
|
||||
|
||||
11
js/index.js
11
js/index.js
@@ -2,8 +2,15 @@
|
||||
/* TODO: *******************************************
|
||||
*****************************************************
|
||||
|
||||
gun: Spirit Bomb
|
||||
gun: like drones, but fast moving and short lived
|
||||
dies after doing damage
|
||||
|
||||
gun: Spirit Bomb (singularity)
|
||||
use charge up like rail gun
|
||||
electricity graphics like plasma torch
|
||||
suck in nearby mobs, power ups?, blocks?
|
||||
sucked in stuff increase size
|
||||
uses energy
|
||||
|
||||
left and right click mouse icons for text displays
|
||||
|
||||
@@ -17,7 +24,7 @@ mod: + move speed and jump height
|
||||
this could just slow the mobs down instead?
|
||||
how?
|
||||
|
||||
rework junk bot, or remove it
|
||||
rework junk bot
|
||||
it's behavior is too unpredictable
|
||||
range is unclear
|
||||
having the bullets last long after doing dmg isn't fun
|
||||
|
||||
@@ -14,9 +14,9 @@ const level = {
|
||||
start() {
|
||||
if (level.levelsCleared === 0) {
|
||||
// game.difficulty = 6; //for testing to simulate possible mobs spawns
|
||||
// b.giveGuns(1)
|
||||
// mech.fieldUpgrades[7].effect();
|
||||
b.giveMod(15)
|
||||
// b.giveGuns(14)
|
||||
// mech.fieldUpgrades[2].effect();
|
||||
// b.giveMod(15)
|
||||
// spawn.pickList = ["ghoster", "ghoster"]
|
||||
|
||||
this.intro(); //starting level
|
||||
|
||||
14
js/player.js
14
js/player.js
@@ -65,12 +65,13 @@ const mech = {
|
||||
},
|
||||
defaultMass: 5,
|
||||
mass: 5,
|
||||
FxNotHolding: 0.015,
|
||||
Fx: 0.015, //run Force on ground //this is reset in b.setModDefaults()
|
||||
FxAir: 0.015, //run Force in Air
|
||||
definePlayerMass(mass = mech.defaultMass) {
|
||||
Matter.Body.setMass(player, mass);
|
||||
//reduce air and ground move forces
|
||||
this.Fx = 0.075 / mass
|
||||
this.Fx = 0.075 / mass * b.modSquirrelFx
|
||||
this.FxAir = 0.375 / mass / mass
|
||||
//make player stand a bit lower when holding heavy masses
|
||||
this.yOffWhen.stand = Math.max(this.yOffWhen.crouch, Math.min(49, 49 - (mass - 5) * 6))
|
||||
@@ -212,11 +213,10 @@ const mech = {
|
||||
this.yOff = this.yOffWhen.jump;
|
||||
this.hardLandCD = mech.cycle + Math.min(momentum / 6 - 6, 40)
|
||||
|
||||
if (game.isBodyDamage && momentum > 200 && player.velocity.y > 20) { //falling damage
|
||||
if (game.isBodyDamage && player.velocity.y > 26 && momentum > 165) { //falling damage
|
||||
mech.damageImmune = mech.cycle + 30; //player is immune to collision damage for 30 cycles
|
||||
let dmg = Math.sqrt(momentum - 200) * 0.01
|
||||
console.log(dmg, momentum, player.velocity.y)
|
||||
dmg = Math.min(Math.max(dmg, 0.02), 0.15);
|
||||
let dmg = Math.sqrt(momentum - 165) * 0.01
|
||||
dmg = Math.min(Math.max(dmg, 0.02), 0.20);
|
||||
mech.damage(dmg);
|
||||
}
|
||||
} else {
|
||||
@@ -661,10 +661,6 @@ const mech = {
|
||||
this.grabRange = 175;
|
||||
this.fieldArc = 0.2; //run calculateFieldThreshold after setting fieldArc, used for powerUp grab and mobPush with lookingAt(mob)
|
||||
this.calculateFieldThreshold(); //run calculateFieldThreshold after setting fieldArc, used for powerUp grab and mobPush with lookingAt(mob)
|
||||
this.jumpForce = 0.38;
|
||||
this.Fx = 0.015; //run Force on ground
|
||||
this.FxAir = 0.015; //run Force in Air
|
||||
this.gravity = 0.0019;
|
||||
mech.isBodiesAsleep = true;
|
||||
mech.wakeCheck();
|
||||
// this.phaseBlocks(0x011111)
|
||||
|
||||
@@ -9,7 +9,7 @@ const powerUps = {
|
||||
},
|
||||
effect() {
|
||||
let heal = (this.size / 40) ** 2
|
||||
if (b.isModFullHeal) heal = Infinity
|
||||
if (b.fullHeal) heal = Infinity
|
||||
heal = Math.min(1 - mech.health, heal)
|
||||
mech.addHealth(heal);
|
||||
if (heal > 0) game.makeTextLog("<div class='circle heal'></div> <span style='font-size:115%;'> <strong style = 'letter-spacing: 2px;'>heal</strong> " + (heal * 100).toFixed(0) + "%</span>", 300)
|
||||
@@ -108,7 +108,7 @@ const powerUps = {
|
||||
effect() {
|
||||
//find what guns I don't have
|
||||
let options = [];
|
||||
if (b.activeGun === null) {
|
||||
if (b.activeGun === null && game.difficulty < 3) {
|
||||
//choose the first gun to be one that is good for the early game
|
||||
for (let i = 0; i < b.guns.length; ++i) {
|
||||
if (!b.guns[i].have && b.guns[i].isStarterGun) options.push(i);
|
||||
|
||||
Reference in New Issue
Block a user