superduper balls, why balance, laser mob nerf
This commit is contained in:
@@ -35,6 +35,7 @@ const b = {
|
|||||||
isModPiezo: null,
|
isModPiezo: null,
|
||||||
isModFastDrones: null,
|
isModFastDrones: null,
|
||||||
isModStomp: null,
|
isModStomp: null,
|
||||||
|
modSuperBallNumber: null,
|
||||||
setModDefaults() {
|
setModDefaults() {
|
||||||
b.modCount = 0;
|
b.modCount = 0;
|
||||||
b.modFireRate = 1;
|
b.modFireRate = 1;
|
||||||
@@ -68,6 +69,7 @@ const b = {
|
|||||||
b.isModPiezo = false;
|
b.isModPiezo = false;
|
||||||
b.isModStomp = false;
|
b.isModStomp = false;
|
||||||
b.modCollisionImmuneCycles = 30;
|
b.modCollisionImmuneCycles = 30;
|
||||||
|
b.modSuperBallNumber = 4;
|
||||||
mech.Fx = 0.015;
|
mech.Fx = 0.015;
|
||||||
mech.jumpForce = 0.38;
|
mech.jumpForce = 0.38;
|
||||||
mech.maxHealth = 1;
|
mech.maxHealth = 1;
|
||||||
@@ -173,7 +175,7 @@ const b = {
|
|||||||
{
|
{
|
||||||
name: "auto-loading heuristics",
|
name: "auto-loading heuristics",
|
||||||
description: "your <strong>delay</strong> after firing is +14% <strong>shorter</strong>",
|
description: "your <strong>delay</strong> after firing is +14% <strong>shorter</strong>",
|
||||||
maxCount: 3,
|
maxCount: 9,
|
||||||
count: 0,
|
count: 0,
|
||||||
allowed() {
|
allowed() {
|
||||||
return true
|
return true
|
||||||
@@ -289,20 +291,20 @@ const b = {
|
|||||||
{
|
{
|
||||||
name: "squirrel-cage rotor",
|
name: "squirrel-cage rotor",
|
||||||
description: "<strong>jump</strong> higher and <strong>move</strong> faster<br>reduced <strong>harm</strong> from <strong>falling</strong> ",
|
description: "<strong>jump</strong> higher and <strong>move</strong> faster<br>reduced <strong>harm</strong> from <strong>falling</strong> ",
|
||||||
maxCount: 1,
|
maxCount: 9,
|
||||||
count: 0,
|
count: 0,
|
||||||
allowed() {
|
allowed() {
|
||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
effect() { // good with melee builds, content skipping builds
|
effect() { // good with melee builds, content skipping builds
|
||||||
b.modSquirrelFx = 1.2;
|
b.modSquirrelFx += 0.2;
|
||||||
mech.Fx = 0.015 * b.modSquirrelFx;
|
mech.Fx = 0.015 * b.modSquirrelFx;
|
||||||
mech.jumpForce = 0.38 * 1.1;
|
mech.jumpForce += 0.038;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "ground stomp",
|
name: "Calvatia",
|
||||||
description: "hard landings release <strong style='letter-spacing: 2px;'>spores</strong>",
|
description: "hard landings disrupt <strong style='letter-spacing: 2px;'>spores</strong> from the ground",
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
allowed() {
|
allowed() {
|
||||||
@@ -314,7 +316,7 @@ const b = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Pauli exclusion",
|
name: "Pauli exclusion",
|
||||||
description: `unable to <strong>collide</strong> with enemies for +120 seconds<br>activates after being <strong>harmed</strong> from a collision`,
|
description: `unable to <strong>collide</strong> with enemies for +2 seconds<br>activates after being <strong>harmed</strong> from a collision`,
|
||||||
maxCount: 9,
|
maxCount: 9,
|
||||||
count: 0,
|
count: 0,
|
||||||
allowed() {
|
allowed() {
|
||||||
@@ -490,6 +492,19 @@ const b = {
|
|||||||
b.isModFastDrones = true
|
b.isModFastDrones = true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "super duper balls",
|
||||||
|
description: "your <strong>super balls</strong> fire +1 extra ball",
|
||||||
|
maxCount: 9,
|
||||||
|
count: 0,
|
||||||
|
allowed() {
|
||||||
|
return b.haveGunCheck("super balls")
|
||||||
|
},
|
||||||
|
effect() {
|
||||||
|
b.modSuperBallNumber++
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
],
|
],
|
||||||
giveMod(index = 'random') {
|
giveMod(index = 'random') {
|
||||||
if (index === 'random') {
|
if (index === 'random') {
|
||||||
@@ -907,7 +922,7 @@ const b = {
|
|||||||
angle: Math.random() * 2 * Math.PI,
|
angle: Math.random() * 2 * Math.PI,
|
||||||
friction: 0,
|
friction: 0,
|
||||||
frictionAir: 0.025,
|
frictionAir: 0.025,
|
||||||
dmg: 2.5, //damage done in addition to the damage from momentum
|
dmg: 2.2, //damage done in addition to the damage from momentum
|
||||||
classType: "bullet",
|
classType: "bullet",
|
||||||
collisionFilter: {
|
collisionFilter: {
|
||||||
category: cat.bullet,
|
category: cat.bullet,
|
||||||
@@ -1340,17 +1355,18 @@ const b = {
|
|||||||
name: "super balls", //2
|
name: "super balls", //2
|
||||||
description: "fire <strong>five</strong> balls in a wide arc<br>balls <strong>bounce</strong> with no momentum loss",
|
description: "fire <strong>five</strong> balls in a wide arc<br>balls <strong>bounce</strong> with no momentum loss",
|
||||||
ammo: 0,
|
ammo: 0,
|
||||||
ammoPack: 6,
|
ammoPack: 8,
|
||||||
have: false,
|
have: false,
|
||||||
|
num: 5,
|
||||||
isStarterGun: true,
|
isStarterGun: true,
|
||||||
fire() {
|
fire() {
|
||||||
mech.fireCDcycle = mech.cycle + Math.floor((mech.crouch ? 30 : 20) * b.modFireRate); // cool down
|
mech.fireCDcycle = mech.cycle + Math.floor((mech.crouch ? 30 : 20) * b.modFireRate); // cool down
|
||||||
b.muzzleFlash(20);
|
b.muzzleFlash(20);
|
||||||
// mobs.alert(450);
|
// mobs.alert(450);
|
||||||
const SPEED = mech.crouch ? 45 : 35
|
const SPEED = mech.crouch ? 40 : 30
|
||||||
const SPREAD = mech.crouch ? 0.04 : 0.15
|
const SPREAD = mech.crouch ? 0.04 : 0.15
|
||||||
let dir = mech.angle - SPREAD * 2;
|
let dir = mech.angle - SPREAD * (b.modSuperBallNumber - 1) / 2;
|
||||||
for (let i = 0; i < 5; i++) {
|
for (let i = 0; i < b.modSuperBallNumber; i++) {
|
||||||
const me = bullet.length;
|
const me = bullet.length;
|
||||||
bullet[me] = Bodies.polygon(mech.pos.x + 30 * Math.cos(mech.angle), mech.pos.y + 30 * Math.sin(mech.angle), 10, 7 * b.modBulletSize, b.fireAttributes(dir, false));
|
bullet[me] = Bodies.polygon(mech.pos.x + 30 * Math.cos(mech.angle), mech.pos.y + 30 * Math.sin(mech.angle), 10, 7 * b.modBulletSize, b.fireAttributes(dir, false));
|
||||||
World.add(engine.world, bullet[me]); //add bullet to world
|
World.add(engine.world, bullet[me]); //add bullet to world
|
||||||
@@ -1359,7 +1375,7 @@ const b = {
|
|||||||
y: SPEED * Math.sin(dir)
|
y: SPEED * Math.sin(dir)
|
||||||
});
|
});
|
||||||
// Matter.Body.setDensity(bullet[me], 0.0001);
|
// Matter.Body.setDensity(bullet[me], 0.0001);
|
||||||
bullet[me].endCycle = game.cycle + Math.floor(360 * b.isModBulletsLastLonger);
|
bullet[me].endCycle = game.cycle + Math.floor((300 + 60 * Math.random()) * b.isModBulletsLastLonger);
|
||||||
bullet[me].dmg = 0;
|
bullet[me].dmg = 0;
|
||||||
bullet[me].minDmgSpeed = 0;
|
bullet[me].minDmgSpeed = 0;
|
||||||
bullet[me].restitution = 0.99;
|
bullet[me].restitution = 0.99;
|
||||||
@@ -1742,7 +1758,7 @@ const b = {
|
|||||||
name: "mine", //9
|
name: "mine", //9
|
||||||
description: "toss a <strong>proximity</strong> mine that <strong>sticks</strong> to walls<br>fires <strong>nails</strong> at enemies within range",
|
description: "toss a <strong>proximity</strong> mine that <strong>sticks</strong> to walls<br>fires <strong>nails</strong> at enemies within range",
|
||||||
ammo: 0,
|
ammo: 0,
|
||||||
ammoPack: 3,
|
ammoPack: (game.difficultyMode > 3) ? 2 : 3,
|
||||||
have: false,
|
have: false,
|
||||||
isStarterGun: false,
|
isStarterGun: false,
|
||||||
fire() {
|
fire() {
|
||||||
@@ -1761,7 +1777,7 @@ const b = {
|
|||||||
name: "spores", //10
|
name: "spores", //10
|
||||||
description: "fire orbs that discharge <strong style='letter-spacing: 2px;'>spores</strong><br><strong style='letter-spacing: 2px;'>spores</strong> seek out enemies",
|
description: "fire orbs that discharge <strong style='letter-spacing: 2px;'>spores</strong><br><strong style='letter-spacing: 2px;'>spores</strong> seek out enemies",
|
||||||
ammo: 0,
|
ammo: 0,
|
||||||
ammoPack: 4,
|
ammoPack: (game.difficultyMode > 3) ? 3 : 4,
|
||||||
have: false,
|
have: false,
|
||||||
isStarterGun: false,
|
isStarterGun: false,
|
||||||
fire() {
|
fire() {
|
||||||
@@ -1806,7 +1822,7 @@ const b = {
|
|||||||
name: "drones", //11
|
name: "drones", //11
|
||||||
description: "deploy drones that <strong>crash</strong> into enemies<br>collisions reduce drone <strong>cycles</strong> by 1 second",
|
description: "deploy drones that <strong>crash</strong> into enemies<br>collisions reduce drone <strong>cycles</strong> by 1 second",
|
||||||
ammo: 0,
|
ammo: 0,
|
||||||
ammoPack: 10,
|
ammoPack: (game.difficultyMode > 3) ? 8 : 10,
|
||||||
have: false,
|
have: false,
|
||||||
isStarterGun: true,
|
isStarterGun: true,
|
||||||
fire() {
|
fire() {
|
||||||
|
|||||||
19
js/index.js
19
js/index.js
@@ -2,12 +2,16 @@
|
|||||||
/* TODO: *******************************************
|
/* TODO: *******************************************
|
||||||
*****************************************************
|
*****************************************************
|
||||||
|
|
||||||
|
phase decoherence energy drain is proportional to player speed
|
||||||
|
|
||||||
|
add recursive mod counts to pause screen
|
||||||
|
|
||||||
|
key required to open the exit to some levels
|
||||||
|
must hold key like a block
|
||||||
|
could the key be any block?
|
||||||
|
|
||||||
css transition for pause menu
|
css transition for pause menu
|
||||||
|
|
||||||
mod: bullets neutralize forward mob velocity on hit
|
|
||||||
|
|
||||||
boss: bacteria boss, duplicates when player is in range
|
|
||||||
|
|
||||||
mod: remove all guns from the game, but double health, shields, and damage
|
mod: remove all guns from the game, but double health, shields, and damage
|
||||||
|
|
||||||
mod: like Born rule, but for guns
|
mod: like Born rule, but for guns
|
||||||
@@ -18,13 +22,6 @@ field that pushes everything back, and can destroy smaller blocks
|
|||||||
mod: make player invisible when...
|
mod: make player invisible when...
|
||||||
use the flag from phase field
|
use the flag from phase field
|
||||||
|
|
||||||
mod: ground stomp on enterLand()
|
|
||||||
immunity to falling damage
|
|
||||||
triggers when you press down
|
|
||||||
maybe rewrite the function to look for down key
|
|
||||||
with added down speed
|
|
||||||
spawn spores
|
|
||||||
|
|
||||||
field: a larger radius that attracted enemies
|
field: a larger radius that attracted enemies
|
||||||
still deflected them near the robot
|
still deflected them near the robot
|
||||||
convert the health of mobs into energy when they are being attracted
|
convert the health of mobs into energy when they are being attracted
|
||||||
|
|||||||
11
js/level.js
11
js/level.js
@@ -14,10 +14,13 @@ const level = {
|
|||||||
start() {
|
start() {
|
||||||
if (level.levelsCleared === 0) {
|
if (level.levelsCleared === 0) {
|
||||||
// level.difficultyIncrease(15)
|
// level.difficultyIncrease(15)
|
||||||
// b.giveGuns("minigun")
|
b.giveGuns("super balls")
|
||||||
// mech.setField("phase decoherence field")
|
// mech.setField("phase decoherence field")
|
||||||
b.giveMod("squirrel-cage rotor");
|
// b.giveMod("squirrel-cage rotor");
|
||||||
b.giveMod("ground stomp");
|
b.giveMod("super duper balls");
|
||||||
|
b.giveMod("super duper balls");
|
||||||
|
b.giveMod("super duper balls");
|
||||||
|
|
||||||
|
|
||||||
// level.intro(); //starting level
|
// level.intro(); //starting level
|
||||||
level.testingMap();
|
level.testingMap();
|
||||||
@@ -128,7 +131,7 @@ const level = {
|
|||||||
// powerUps.spawn(450, -400, "mod", false);
|
// powerUps.spawn(450, -400, "mod", false);
|
||||||
// spawn.bodyRect(-45, -100, 40, 50);
|
// spawn.bodyRect(-45, -100, 40, 50);
|
||||||
// spawn.bomberBoss(800, -450);
|
// spawn.bomberBoss(800, -450);
|
||||||
// spawn.cellBoss(400, -750);
|
spawn.cellBoss(400, -750);
|
||||||
|
|
||||||
// spawn.randomLevelBoss(400, -750)
|
// spawn.randomLevelBoss(400, -750)
|
||||||
|
|
||||||
|
|||||||
@@ -357,7 +357,7 @@ const mobs = {
|
|||||||
if (!mech.isStealth) vertexCollision(this.position, look, [player]);
|
if (!mech.isStealth) vertexCollision(this.position, look, [player]);
|
||||||
// hitting player
|
// hitting player
|
||||||
if (best.who === player) {
|
if (best.who === player) {
|
||||||
dmg = 0.002 * game.dmgScale;
|
dmg = 0.0015 * game.dmgScale;
|
||||||
mech.damage(dmg);
|
mech.damage(dmg);
|
||||||
//draw damage
|
//draw damage
|
||||||
ctx.fillStyle = "#f00";
|
ctx.fillStyle = "#f00";
|
||||||
|
|||||||
@@ -212,9 +212,14 @@ const powerUps = {
|
|||||||
giveRandomAmmo() {
|
giveRandomAmmo() {
|
||||||
const ammoTarget = Math.floor(Math.random() * (b.guns.length));
|
const ammoTarget = Math.floor(Math.random() * (b.guns.length));
|
||||||
const ammo = Math.ceil(b.guns[ammoTarget].ammoPack * 6);
|
const ammo = Math.ceil(b.guns[ammoTarget].ammoPack * 6);
|
||||||
b.guns[ammoTarget].ammo += ammo;
|
if (ammo === Infinity) {
|
||||||
game.updateGunHUD();
|
b.guns[ammoTarget].ammo += ammo;
|
||||||
game.makeTextLog("<span style='font-size:110%;'>+" + ammo + " ammo for " + b.guns[ammoTarget].name + "</span>", 300);
|
game.makeTextLog("<span style='font-size:115%;'><span class='color-f'>+energy</span></span>", 300);
|
||||||
|
} else {
|
||||||
|
b.guns[ammoTarget].ammo += ammo;
|
||||||
|
game.updateGunHUD();
|
||||||
|
game.makeTextLog("<span style='font-size:110%;'>+" + ammo + " ammo for " + b.guns[ammoTarget].name + "</span>", 300);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
spawnRandomPowerUp(x, y) { //mostly used after mob dies
|
spawnRandomPowerUp(x, y) { //mostly used after mob dies
|
||||||
if (Math.random() * Math.random() - 0.3 > Math.sqrt(mech.health) || Math.random() < 0.035) { //spawn heal chance is higher at low health
|
if (Math.random() * Math.random() - 0.3 > Math.sqrt(mech.health) || Math.random() < 0.035) { //spawn heal chance is higher at low health
|
||||||
|
|||||||
Reference in New Issue
Block a user