bug fixes
This commit is contained in:
15
js/bullet.js
15
js/bullet.js
@@ -1143,18 +1143,19 @@ const b = {
|
|||||||
|
|
||||||
//fire plasma at target
|
//fire plasma at target
|
||||||
|
|
||||||
const DRAIN = 0.002
|
|
||||||
if (this.lockedOn && this.lockedOn.alive && mech.energy > DRAIN && mech.fieldCDcycle < mech.cycle) {
|
if (this.lockedOn && this.lockedOn.alive && mech.fieldCDcycle < mech.cycle) {
|
||||||
|
const sub = Vector.sub(this.lockedOn.position, this.position)
|
||||||
|
const DIST = Vector.magnitude(sub);
|
||||||
|
const unit = Vector.normalise(sub)
|
||||||
|
|
||||||
|
const DRAIN = 0.0022
|
||||||
|
if (DIST < mod.isPlasmaRange * 550 && mech.energy > DRAIN) {
|
||||||
mech.energy -= DRAIN;
|
mech.energy -= DRAIN;
|
||||||
if (mech.energy < 0) {
|
if (mech.energy < 0) {
|
||||||
mech.fieldCDcycle = mech.cycle + 120;
|
mech.fieldCDcycle = mech.cycle + 120;
|
||||||
mech.energy = 0;
|
mech.energy = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const sub = Vector.sub(this.lockedOn.position, this.position)
|
|
||||||
const DIST = Vector.magnitude(sub);
|
|
||||||
const unit = Vector.normalise(sub)
|
|
||||||
if (DIST < mod.isPlasmaRange * 600) {
|
|
||||||
//calculate laser collision
|
//calculate laser collision
|
||||||
let best;
|
let best;
|
||||||
let range = mod.isPlasmaRange * (140 + 300 * Math.sqrt(Math.random()))
|
let range = mod.isPlasmaRange * (140 + 300 * Math.sqrt(Math.random()))
|
||||||
|
|||||||
15
js/index.js
15
js/index.js
@@ -93,17 +93,20 @@ const build = {
|
|||||||
<span style="font-size:1.5em;font-weight: 600;">PAUSED</span> press P to resume
|
<span style="font-size:1.5em;font-weight: 600;">PAUSED</span> press P to resume
|
||||||
</div>
|
</div>
|
||||||
<div class="pause-grid-module" style = "font-size: 13px;line-height: 120%;padding: 5px;">
|
<div class="pause-grid-module" style = "font-size: 13px;line-height: 120%;padding: 5px;">
|
||||||
level: ${level.levelsCleared} - ${level.levels[level.onLevel]} (${level.difficultyText()})
|
<strong>damage increase: ${((mod.damageFromMods()-1)*100).toFixed(0)}%
|
||||||
<br>${mob.length} mobs, ${body.length} blocks, ${bullet.length} bullets, ${powerUp.length} power ups
|
<br>harm reduction: ${((1-mech.harmReduction())*100).toFixed(0)}%
|
||||||
<br>mouse: (${game.mouseInGame.x.toFixed(1)}, ${game.mouseInGame.y.toFixed(1)}) ${mech.cycle} cycles
|
<br>fire delay decrease: ${((1-b.fireCD)*100).toFixed(0)}%</strong>
|
||||||
<br>
|
<br>
|
||||||
<br>health: (${(mech.health*100).toFixed(0)} / ${(mech.maxHealth*100).toFixed(0)}) energy: (${(mech.energy*100).toFixed(0)} / ${(mech.maxEnergy*100).toFixed(0)})
|
<br>health: (${(mech.health*100).toFixed(0)} / ${(mech.maxHealth*100).toFixed(0)}) energy: (${(mech.energy*100).toFixed(0)} / ${(mech.maxEnergy*100).toFixed(0)})
|
||||||
<br>mass: ${player.mass.toFixed(1)} rerolls: ${powerUps.reroll.rerolls}
|
<br>mass: ${player.mass.toFixed(1)} rerolls: ${powerUps.reroll.rerolls}
|
||||||
<br>position: (${player.position.x.toFixed(1)}, ${player.position.y.toFixed(1)}) velocity: (${player.velocity.x.toFixed(1)}, ${player.velocity.y.toFixed(1)})
|
<br>position: (${player.position.x.toFixed(1)}, ${player.position.y.toFixed(1)}) velocity: (${player.velocity.x.toFixed(1)}, ${player.velocity.y.toFixed(1)})
|
||||||
<br>
|
<br>
|
||||||
<br>damage increase: ${((mod.damageFromMods()-1)*100).toFixed(0)}%
|
<br>level: ${level.levelsCleared} - ${level.levels[level.onLevel]} (${level.difficultyText()})
|
||||||
<br>harm reduction: ${((1-mech.harmReduction())*100).toFixed(0)}%
|
<br>${mob.length} mobs, ${body.length} blocks, ${bullet.length} bullets, ${powerUp.length} power ups
|
||||||
<br>fire delay decrease: ${((1-b.fireCD)*100).toFixed(0)}%
|
<br>mouse: (${game.mouseInGame.x.toFixed(1)}, ${game.mouseInGame.y.toFixed(1)}) ${mech.cycle} cycles
|
||||||
|
<br>harm difficulty scale: ${(game.dmgScale*100).toFixed(0)}%
|
||||||
|
<br>damage difficulty scale: ${(b.dmgScale*100).toFixed(0) }%
|
||||||
|
<br>heal difficulty scale: ${(game.healScale*100).toFixed(0)}%
|
||||||
</div>`;
|
</div>`;
|
||||||
let countGuns = 0
|
let countGuns = 0
|
||||||
let countMods = 0
|
let countMods = 0
|
||||||
|
|||||||
35
js/level.js
35
js/level.js
@@ -14,7 +14,7 @@ const level = {
|
|||||||
// level.difficultyIncrease(4)
|
// level.difficultyIncrease(4)
|
||||||
// game.enableConstructMode() //used to build maps in testing mode
|
// game.enableConstructMode() //used to build maps in testing mode
|
||||||
// mech.isStealth = true;
|
// mech.isStealth = true;
|
||||||
// mod.giveMod("superfluidity");
|
// mod.giveMod("bot fabrication");
|
||||||
// b.giveGuns("ice IX")
|
// b.giveGuns("ice IX")
|
||||||
// mech.setField("plasma torch")
|
// mech.setField("plasma torch")
|
||||||
|
|
||||||
@@ -64,8 +64,8 @@ const level = {
|
|||||||
mech.maxHealth += 0.05 * powerUps.totalPowerUps
|
mech.maxHealth += 0.05 * powerUps.totalPowerUps
|
||||||
if (powerUps.totalPowerUps) game.makeTextLog("<span style='font-size:115%;'> max health increased by " + (0.05 * powerUps.totalPowerUps * 100).toFixed(0) + "%</span>", 300)
|
if (powerUps.totalPowerUps) game.makeTextLog("<span style='font-size:115%;'> max health increased by " + (0.05 * powerUps.totalPowerUps * 100).toFixed(0) + "%</span>", 300)
|
||||||
}
|
}
|
||||||
if (mod.isHealLowHealth && mech.health < mech.maxHealth * 0.5 * game.healScale) {
|
if (mod.isHealLowHealth && mech.health < mech.maxHealth * 0.66 * game.healScale) {
|
||||||
mech.health = mech.maxHealth * 0.5 * game.healScale
|
mech.health = mech.maxHealth * 0.66 * game.healScale
|
||||||
mech.displayHealth();
|
mech.displayHealth();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -133,20 +133,20 @@ const level = {
|
|||||||
composite[composite.length] = rotor
|
composite[composite.length] = rotor
|
||||||
return rotor
|
return rotor
|
||||||
},
|
},
|
||||||
button(x, y, width = 70, height = 20) {
|
button(x, y, width = 70) {
|
||||||
spawn.mapVertex(x + 35, y + 27, "70 10 -70 10 -40 -10 40 -10");
|
spawn.mapVertex(x + 35, y + 2, "70 10 -70 10 -40 -10 40 -10");
|
||||||
return {
|
return {
|
||||||
isUp: false,
|
isUp: false,
|
||||||
min: {
|
min: {
|
||||||
x: x,
|
x: x,
|
||||||
y: y
|
y: y - 15
|
||||||
},
|
},
|
||||||
max: {
|
max: {
|
||||||
x: x + width,
|
x: x + width,
|
||||||
y: y + height
|
y: y - 5
|
||||||
},
|
},
|
||||||
width: width,
|
width: width,
|
||||||
height: height,
|
height: 20,
|
||||||
query() {
|
query() {
|
||||||
if (Matter.Query.region(body, this).length === 0 && Matter.Query.region([player], this).length === 0) {
|
if (Matter.Query.region(body, this).length === 0 && Matter.Query.region([player], this).length === 0) {
|
||||||
this.isUp = true;
|
this.isUp = true;
|
||||||
@@ -156,11 +156,10 @@ const level = {
|
|||||||
},
|
},
|
||||||
draw() {
|
draw() {
|
||||||
ctx.fillStyle = "hsl(0, 100%, 70%)"
|
ctx.fillStyle = "hsl(0, 100%, 70%)"
|
||||||
// ctx.fillStyle = "hsl(287, 30%, 65%)"
|
|
||||||
if (this.isUp) {
|
if (this.isUp) {
|
||||||
ctx.fillRect(this.min.x, this.min.y, this.width, 20)
|
ctx.fillRect(this.min.x, this.min.y - 10, this.width, 20)
|
||||||
} else {
|
} else {
|
||||||
ctx.fillRect(this.min.x, this.min.y + 10, this.width, 25)
|
ctx.fillRect(this.min.x, this.min.y, this.width, 25)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -207,7 +206,7 @@ const level = {
|
|||||||
},
|
},
|
||||||
sewers() {
|
sewers() {
|
||||||
const rotor = level.rotor(5100, 2425, -0.001)
|
const rotor = level.rotor(5100, 2425, -0.001)
|
||||||
const button = level.button(6600, 2650)
|
const button = level.button(6600, 2675)
|
||||||
const hazard = level.hazard(4550, 2750, 4550, 150)
|
const hazard = level.hazard(4550, 2750, 4550, 150)
|
||||||
|
|
||||||
level.custom = () => {
|
level.custom = () => {
|
||||||
@@ -324,6 +323,7 @@ const level = {
|
|||||||
spawn.randomMob(2075, 2025, 0.8);
|
spawn.randomMob(2075, 2025, 0.8);
|
||||||
spawn.randomMob(3475, 2175, 0.8);
|
spawn.randomMob(3475, 2175, 0.8);
|
||||||
if (game.difficulty > 3) spawn.randomLevelBoss(6000, 2300, ["spiderBoss", "launcherBoss", "laserTargetingBoss"]);
|
if (game.difficulty > 3) spawn.randomLevelBoss(6000, 2300, ["spiderBoss", "launcherBoss", "laserTargetingBoss"]);
|
||||||
|
powerUps.addRerollToLevel() //needs to run after mobs are spawned
|
||||||
},
|
},
|
||||||
template() {
|
template() {
|
||||||
level.custom = () => {
|
level.custom = () => {
|
||||||
@@ -360,6 +360,7 @@ const level = {
|
|||||||
// spawn.randomMob(2650, -975, 0.8);
|
// spawn.randomMob(2650, -975, 0.8);
|
||||||
// spawn.randomBoss(1700, -900, 0.4);
|
// spawn.randomBoss(1700, -900, 0.4);
|
||||||
// if (game.difficulty > 3) spawn.randomLevelBoss(2200, -1300);
|
// if (game.difficulty > 3) spawn.randomLevelBoss(2200, -1300);
|
||||||
|
powerUps.addRerollToLevel() //needs to run after mobs are spawned
|
||||||
},
|
},
|
||||||
testing() {
|
testing() {
|
||||||
level.custom = () => {
|
level.custom = () => {
|
||||||
@@ -495,6 +496,7 @@ const level = {
|
|||||||
spawn.randomBoss(5000 + 500 * (Math.random() - 0.5), -800 + 200 * (Math.random() - 0.5), Infinity);
|
spawn.randomBoss(5000 + 500 * (Math.random() - 0.5), -800 + 200 * (Math.random() - 0.5), Infinity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
powerUps.addRerollToLevel() //needs to run after mobs are spawned
|
||||||
},
|
},
|
||||||
intro() {
|
intro() {
|
||||||
level.custom = () => {
|
level.custom = () => {
|
||||||
@@ -814,6 +816,7 @@ const level = {
|
|||||||
spawn.laserBoss(600 + 200 * Math.random(), -2150 + 250 * Math.random());
|
spawn.laserBoss(600 + 200 * Math.random(), -2150 + 250 * Math.random());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
powerUps.addRerollToLevel() //needs to run after mobs are spawned
|
||||||
},
|
},
|
||||||
rooftops() {
|
rooftops() {
|
||||||
level.custom = () => {
|
level.custom = () => {
|
||||||
@@ -1016,6 +1019,7 @@ const level = {
|
|||||||
spawn.randomBoss(2225, -1325, 0.4);
|
spawn.randomBoss(2225, -1325, 0.4);
|
||||||
spawn.randomBoss(4900, -1200, 0);
|
spawn.randomBoss(4900, -1200, 0);
|
||||||
if (game.difficulty > 3) spawn.randomLevelBoss(3200, -2050);
|
if (game.difficulty > 3) spawn.randomLevelBoss(3200, -2050);
|
||||||
|
powerUps.addRerollToLevel() //needs to run after mobs are spawned
|
||||||
},
|
},
|
||||||
aerie() {
|
aerie() {
|
||||||
level.custom = () => {
|
level.custom = () => {
|
||||||
@@ -1208,7 +1212,7 @@ const level = {
|
|||||||
spawn.suckerBoss(4500, -400);
|
spawn.suckerBoss(4500, -400);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//add mini boss, giant hopper? or a black hole that spawns hoppers?
|
powerUps.addRerollToLevel() //needs to run after mobs are spawned
|
||||||
},
|
},
|
||||||
skyscrapers() {
|
skyscrapers() {
|
||||||
level.custom = () => {
|
level.custom = () => {
|
||||||
@@ -1367,6 +1371,7 @@ const level = {
|
|||||||
spawn.randomBoss(3700, -1500, 0.4);
|
spawn.randomBoss(3700, -1500, 0.4);
|
||||||
spawn.randomBoss(1700, -900, 0.4);
|
spawn.randomBoss(1700, -900, 0.4);
|
||||||
if (game.difficulty > 3) spawn.randomLevelBoss(2200, -1300);
|
if (game.difficulty > 3) spawn.randomLevelBoss(2200, -1300);
|
||||||
|
powerUps.addRerollToLevel() //needs to run after mobs are spawned
|
||||||
},
|
},
|
||||||
highrise() {
|
highrise() {
|
||||||
level.custom = () => {
|
level.custom = () => {
|
||||||
@@ -1529,6 +1534,7 @@ const level = {
|
|||||||
spawn.randomBoss(-3250, -2700, 0.2);
|
spawn.randomBoss(-3250, -2700, 0.2);
|
||||||
spawn.randomBoss(-2450, -1100, 0);
|
spawn.randomBoss(-2450, -1100, 0);
|
||||||
if (game.difficulty > 4) spawn.randomLevelBoss(-3400, -2800);
|
if (game.difficulty > 4) spawn.randomLevelBoss(-3400, -2800);
|
||||||
|
powerUps.addRerollToLevel() //needs to run after mobs are spawned
|
||||||
},
|
},
|
||||||
warehouse() {
|
warehouse() {
|
||||||
level.custom = () => {
|
level.custom = () => {
|
||||||
@@ -1698,6 +1704,7 @@ const level = {
|
|||||||
spawn.snakeBoss(-1300 + Math.random() * 2000, -2200); //boss snake with head
|
spawn.snakeBoss(-1300 + Math.random() * 2000, -2200); //boss snake with head
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
powerUps.addRerollToLevel() //needs to run after mobs are spawned
|
||||||
},
|
},
|
||||||
office() {
|
office() {
|
||||||
level.custom = () => {
|
level.custom = () => {
|
||||||
@@ -1881,6 +1888,7 @@ const level = {
|
|||||||
spawn.shooterBoss(2200, -650);
|
spawn.shooterBoss(2200, -650);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
powerUps.addRerollToLevel() //needs to run after mobs are spawned
|
||||||
},
|
},
|
||||||
stronghold() { // player made level by Francois 👑 from discord
|
stronghold() { // player made level by Francois 👑 from discord
|
||||||
level.custom = () => {
|
level.custom = () => {
|
||||||
@@ -2116,6 +2124,7 @@ const level = {
|
|||||||
spawn.randomBoss(100, -450, 0.9);
|
spawn.randomBoss(100, -450, 0.9);
|
||||||
|
|
||||||
if (game.difficulty > 3) spawn.randomLevelBoss(1850, -1400);
|
if (game.difficulty > 3) spawn.randomLevelBoss(1850, -1400);
|
||||||
|
powerUps.addRerollToLevel() //needs to run after mobs are spawned
|
||||||
},
|
},
|
||||||
//******************************************************************************************************************
|
//******************************************************************************************************************
|
||||||
//******************************************************************************************************************
|
//******************************************************************************************************************
|
||||||
|
|||||||
@@ -973,19 +973,19 @@ const mobs = {
|
|||||||
if (!this.isShielded || isBypassShield) {
|
if (!this.isShielded || isBypassShield) {
|
||||||
dmg *= mod.damageFromMods()
|
dmg *= mod.damageFromMods()
|
||||||
//mobs specific damage changes
|
//mobs specific damage changes
|
||||||
dmg /= Math.sqrt(this.mass)
|
|
||||||
if (this.shield) dmg *= 0.05
|
|
||||||
if (mod.isFarAwayDmg) dmg *= 1 + Math.sqrt(Math.max(500, Math.min(3000, this.distanceToPlayer())) - 500) * 0.0067 //up to 50% dmg at max range of 3500
|
if (mod.isFarAwayDmg) dmg *= 1 + Math.sqrt(Math.max(500, Math.min(3000, this.distanceToPlayer())) - 500) * 0.0067 //up to 50% dmg at max range of 3500
|
||||||
|
if (this.shield) dmg *= 0.05
|
||||||
|
|
||||||
//energy and heal drain should be calculated after damage boosts
|
//energy and heal drain should be calculated after damage boosts
|
||||||
if (mod.energySiphon && dmg !== Infinity) {
|
if (mod.energySiphon && dmg !== Infinity && this.dropPowerUp) {
|
||||||
mech.energy += Math.min(this.health, dmg) * mod.energySiphon
|
mech.energy += Math.min(this.health, dmg) * mod.energySiphon
|
||||||
if (mech.energy > mech.maxEnergy) mech.energy = mech.maxEnergy
|
if (mech.energy > mech.maxEnergy) mech.energy = mech.maxEnergy
|
||||||
}
|
}
|
||||||
if (mod.healthDrain && dmg !== Infinity) {
|
if (mod.healthDrain && dmg !== Infinity && this.dropPowerUp) {
|
||||||
mech.addHealth(Math.min(this.health, dmg) * mod.healthDrain)
|
mech.addHealth(Math.min(this.health, dmg) * mod.healthDrain)
|
||||||
if (mech.health > mech.maxHealth) mech.health = mech.maxHealth
|
if (mech.health > mech.maxHealth) mech.health = mech.maxHealth
|
||||||
}
|
}
|
||||||
|
dmg /= Math.sqrt(this.mass)
|
||||||
this.health -= dmg
|
this.health -= dmg
|
||||||
//this.fill = this.color + this.health + ')';
|
//this.fill = this.color + this.health + ')';
|
||||||
this.onDamage(dmg); //custom damage effects
|
this.onDamage(dmg); //custom damage effects
|
||||||
|
|||||||
16
js/mods.js
16
js/mods.js
@@ -468,10 +468,11 @@ const mod = {
|
|||||||
},
|
},
|
||||||
requires: "at least 3 rerolls",
|
requires: "at least 3 rerolls",
|
||||||
effect() {
|
effect() {
|
||||||
mob.isRerollBots = true;
|
mod.isRerollBots = true;
|
||||||
|
powerUps.reroll.changeRerolls(0)
|
||||||
},
|
},
|
||||||
remove() {
|
remove() {
|
||||||
mob.isRerollBots = false;
|
mod.isRerollBots = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -523,6 +524,7 @@ const mod = {
|
|||||||
b.guns[i].ammo = Math.floor(b.guns[i].ammo * 0.1);
|
b.guns[i].ammo = Math.floor(b.guns[i].ammo * 0.1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
game.updateGunHUD();
|
||||||
//double bots
|
//double bots
|
||||||
for (let i = 0; i < mod.nailBotCount; i++) {
|
for (let i = 0; i < mod.nailBotCount; i++) {
|
||||||
b.nailBot();
|
b.nailBot();
|
||||||
@@ -753,7 +755,7 @@ const mod = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "energy conservation",
|
name: "energy conservation",
|
||||||
description: "<strong>13%</strong> of <strong class='color-d'>damage</strong> done recovered as <strong class='color-f'>energy</strong>",
|
description: "<strong>10%</strong> of <strong class='color-d'>damage</strong> done recovered as <strong class='color-f'>energy</strong>",
|
||||||
maxCount: 9,
|
maxCount: 9,
|
||||||
count: 0,
|
count: 0,
|
||||||
allowed() {
|
allowed() {
|
||||||
@@ -761,7 +763,7 @@ const mod = {
|
|||||||
},
|
},
|
||||||
requires: "",
|
requires: "",
|
||||||
effect() {
|
effect() {
|
||||||
mod.energySiphon += 0.13;
|
mod.energySiphon += 0.1;
|
||||||
},
|
},
|
||||||
remove() {
|
remove() {
|
||||||
mod.energySiphon = 0;
|
mod.energySiphon = 0;
|
||||||
@@ -818,7 +820,7 @@ const mod = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "entropy exchange",
|
name: "entropy exchange",
|
||||||
description: "<strong class='color-h'>heal</strong> for <strong>1.5%</strong> of <strong class='color-d'>damage</strong> done",
|
description: "<strong class='color-h'>heal</strong> for <strong>1%</strong> of <strong class='color-d'>damage</strong> done",
|
||||||
maxCount: 9,
|
maxCount: 9,
|
||||||
count: 0,
|
count: 0,
|
||||||
allowed() {
|
allowed() {
|
||||||
@@ -826,7 +828,7 @@ const mod = {
|
|||||||
},
|
},
|
||||||
requires: "not mass-energy equivalence",
|
requires: "not mass-energy equivalence",
|
||||||
effect() {
|
effect() {
|
||||||
mod.healthDrain += 0.015;
|
mod.healthDrain += 0.01;
|
||||||
},
|
},
|
||||||
remove() {
|
remove() {
|
||||||
mod.healthDrain = 0;
|
mod.healthDrain = 0;
|
||||||
@@ -852,7 +854,7 @@ const mod = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "negentropy",
|
name: "negentropy",
|
||||||
description: "at the start of each <strong>level</strong><br><strong class='color-h'>heal</strong> up to <strong>50%</strong> of <strong>maximum health</strong>",
|
description: "at the start of each <strong>level</strong><br><strong class='color-h'>heal</strong> up to <strong>66%</strong> of <strong>maximum health</strong>",
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
allowed() {
|
allowed() {
|
||||||
|
|||||||
@@ -472,7 +472,7 @@ const mech = {
|
|||||||
mech.energy = mech.maxEnergy
|
mech.energy = mech.maxEnergy
|
||||||
// if (mech.energy < 0.05) mech.energy = 0.05
|
// if (mech.energy < 0.05) mech.energy = 0.05
|
||||||
mech.immuneCycle = mech.cycle + 120 //disable this.immuneCycle bonus seconds
|
mech.immuneCycle = mech.cycle + 120 //disable this.immuneCycle bonus seconds
|
||||||
game.makeTextLog("<span style='font-size:115%;'> <strong>death</strong> avoided<br><strong>1</strong> <strong class='color-r'>reroll</strong> consumed</span>", 420)
|
game.makeTextLog(`<span style='font-size:115%;'> <strong>death</strong> avoided<br><strong>1/${powerUps.reroll.rerolls}</strong> <strong class='color-r'>rerolls</strong> consumed</span>`, 420)
|
||||||
|
|
||||||
game.wipe = function () { //set wipe to have trails
|
game.wipe = function () { //set wipe to have trails
|
||||||
ctx.fillStyle = "rgba(255,255,255,0.03)";
|
ctx.fillStyle = "rgba(255,255,255,0.03)";
|
||||||
@@ -501,7 +501,8 @@ const mech = {
|
|||||||
mech.health = mech.maxHealth * game.healScale
|
mech.health = mech.maxHealth * game.healScale
|
||||||
// if (mech.health < 0.05) mech.health = 0.05
|
// if (mech.health < 0.05) mech.health = 0.05
|
||||||
mech.immuneCycle = mech.cycle + 120 //disable this.immuneCycle bonus seconds
|
mech.immuneCycle = mech.cycle + 120 //disable this.immuneCycle bonus seconds
|
||||||
game.makeTextLog("<span style='font-size:115%;'> <strong>death</strong> avoided<br><strong>1</strong> <strong class='color-r'>reroll</strong> consumed</span>", 420)
|
game.makeTextLog(`<span style='font-size:115%;'> <strong>death</strong> avoided<br><strong>1/${powerUps.reroll.rerolls}</strong> <strong class='color-r'>rerolls</strong> consumed</span>`, 420)
|
||||||
|
// game.makeTextLog("<span style='font-size:115%;'> <strong>death</strong> avoided<br><strong>1</strong> <strong class='color-r'>reroll</strong> consumed</span>", 420)
|
||||||
|
|
||||||
game.wipe = function () { //set wipe to have trails
|
game.wipe = function () { //set wipe to have trails
|
||||||
ctx.fillStyle = "rgba(255,255,255,0.03)";
|
ctx.fillStyle = "rgba(255,255,255,0.03)";
|
||||||
|
|||||||
@@ -55,14 +55,12 @@ const powerUps = {
|
|||||||
powerUps.reroll.rerolls += amount
|
powerUps.reroll.rerolls += amount
|
||||||
if (powerUps.reroll.rerolls < 0) powerUps.reroll.rerolls = 0
|
if (powerUps.reroll.rerolls < 0) powerUps.reroll.rerolls = 0
|
||||||
|
|
||||||
if (mob.isRerollBots) {
|
if (mod.isRerollBots) {
|
||||||
const limit = 3
|
const limit = 3
|
||||||
for (; powerUps.reroll.rerolls > limit - 1; powerUps.reroll.rerolls -= limit) {
|
for (; powerUps.reroll.rerolls > limit - 1; powerUps.reroll.rerolls -= limit) {
|
||||||
b.randomBot()
|
b.randomBot()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (mod.isDeathAvoid && document.getElementById("mod-anthropic")) {
|
if (mod.isDeathAvoid && document.getElementById("mod-anthropic")) {
|
||||||
document.getElementById("mod-anthropic").innerHTML = `(${powerUps.reroll.rerolls})`
|
document.getElementById("mod-anthropic").innerHTML = `(${powerUps.reroll.rerolls})`
|
||||||
}
|
}
|
||||||
@@ -405,11 +403,11 @@ const powerUps = {
|
|||||||
if (Math.random() < mod.bayesian) powerUps.spawn(x, y, "field");
|
if (Math.random() < mod.bayesian) powerUps.spawn(x, y, "field");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (Math.random() < 0.01) {
|
// if (Math.random() < 0.01) {
|
||||||
powerUps.spawn(x, y, "reroll");
|
// powerUps.spawn(x, y, "reroll");
|
||||||
if (Math.random() < mod.bayesian) powerUps.spawn(x, y, "reroll");
|
// if (Math.random() < mod.bayesian) powerUps.spawn(x, y, "reroll");
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
randomPowerUpCounter: 0,
|
randomPowerUpCounter: 0,
|
||||||
spawnBossPowerUp(x, y) { //boss spawns field and gun mod upgrades
|
spawnBossPowerUp(x, y) { //boss spawns field and gun mod upgrades
|
||||||
@@ -465,14 +463,23 @@ const powerUps = {
|
|||||||
|
|
||||||
},
|
},
|
||||||
chooseRandomPowerUp(x, y) { //100% chance to drop a random power up //used in spawn.debris
|
chooseRandomPowerUp(x, y) { //100% chance to drop a random power up //used in spawn.debris
|
||||||
if (Math.random() < 0.05) {
|
if (Math.random() < 0.01) {
|
||||||
powerUps.spawn(x, y, "reroll");
|
powerUps.spawn(x, y, "reroll");
|
||||||
|
if (Math.random() < mod.bayesian) powerUps.spawn(x, y, "reroll");
|
||||||
} else if (Math.random() < 0.5) {
|
} else if (Math.random() < 0.5) {
|
||||||
powerUps.spawn(x, y, "heal", false);
|
powerUps.spawn(x, y, "heal", false);
|
||||||
|
if (Math.random() < mod.bayesian) powerUps.spawn(x, y, "heal", false);
|
||||||
} else if (!mod.bayesian) {
|
} else if (!mod.bayesian) {
|
||||||
powerUps.spawn(x, y, "ammo", false);
|
powerUps.spawn(x, y, "ammo", false);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
addRerollToLevel() { //add a random power up to a location that has a mob, mostly used to give each level one randomly placed reroll
|
||||||
|
if (mob.length) {
|
||||||
|
const index = Math.floor(Math.random() * mob.length)
|
||||||
|
powerUps.spawn(mob[index].position.x, mob[index].position.y, "reroll");
|
||||||
|
if (Math.random() < mod.bayesian) powerUps.spawn(mob[index].position.x, mob[index].position.y, "reroll");
|
||||||
|
}
|
||||||
|
},
|
||||||
spawnStartingPowerUps(x, y) { //used for map specific power ups, mostly to give player a starting gun
|
spawnStartingPowerUps(x, y) { //used for map specific power ups, mostly to give player a starting gun
|
||||||
if (level.levelsCleared < 5) {
|
if (level.levelsCleared < 5) {
|
||||||
if (b.inventory.length === 0) {
|
if (b.inventory.length === 0) {
|
||||||
|
|||||||
11
todo.txt
11
todo.txt
@@ -1,14 +1,5 @@
|
|||||||
|
|
||||||
bubble fusion drops 2-3 power ups (down from 3)
|
rerolls now spawn at about 1 per level
|
||||||
perturbation theory: damage is 5% (down from 6%) per reroll
|
|
||||||
but the mod will not show up until you have 4 rerolls stockpiled
|
|
||||||
sporeangium grow faster when stuck to a mob
|
|
||||||
|
|
||||||
mod: liquid cooling - freeze all mobs for 6 seconds after receiving harm
|
|
||||||
mod: perimeter defense - gain 6% harm reduction for each bot
|
|
||||||
mod: bot fabrication - anytime you have 3 rerolls, convert them into a random bot
|
|
||||||
mod: Ψ(x) collapse - 33% haste, if you have no rerolls
|
|
||||||
mod: mine synthesis - drop a mine after picking up a power up
|
|
||||||
|
|
||||||
************** TODO - n-gon **************
|
************** TODO - n-gon **************
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user