superduper balls, why balance, laser mob nerf

This commit is contained in:
landgreen
2020-02-07 06:05:53 -08:00
parent d3b469a7af
commit 15d8d8f34b
5 changed files with 56 additions and 35 deletions

View File

@@ -35,6 +35,7 @@ const b = {
isModPiezo: null,
isModFastDrones: null,
isModStomp: null,
modSuperBallNumber: null,
setModDefaults() {
b.modCount = 0;
b.modFireRate = 1;
@@ -68,6 +69,7 @@ const b = {
b.isModPiezo = false;
b.isModStomp = false;
b.modCollisionImmuneCycles = 30;
b.modSuperBallNumber = 4;
mech.Fx = 0.015;
mech.jumpForce = 0.38;
mech.maxHealth = 1;
@@ -173,7 +175,7 @@ const b = {
{
name: "auto-loading heuristics",
description: "your <strong>delay</strong> after firing is +14% <strong>shorter</strong>",
maxCount: 3,
maxCount: 9,
count: 0,
allowed() {
return true
@@ -289,20 +291,20 @@ const b = {
{
name: "squirrel-cage rotor",
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,
allowed() {
return true
},
effect() { // good with melee builds, content skipping builds
b.modSquirrelFx = 1.2;
b.modSquirrelFx += 0.2;
mech.Fx = 0.015 * b.modSquirrelFx;
mech.jumpForce = 0.38 * 1.1;
mech.jumpForce += 0.038;
}
},
{
name: "ground stomp",
description: "hard landings release <strong style='letter-spacing: 2px;'>spores</strong>",
name: "Calvatia",
description: "hard landings disrupt <strong style='letter-spacing: 2px;'>spores</strong> from the ground",
maxCount: 1,
count: 0,
allowed() {
@@ -314,7 +316,7 @@ const b = {
},
{
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,
count: 0,
allowed() {
@@ -490,6 +492,19 @@ const b = {
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') {
if (index === 'random') {
@@ -907,7 +922,7 @@ const b = {
angle: Math.random() * 2 * Math.PI,
friction: 0,
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",
collisionFilter: {
category: cat.bullet,
@@ -1340,17 +1355,18 @@ const b = {
name: "super balls", //2
description: "fire <strong>five</strong> balls in a wide arc<br>balls <strong>bounce</strong> with no momentum loss",
ammo: 0,
ammoPack: 6,
ammoPack: 8,
have: false,
num: 5,
isStarterGun: true,
fire() {
mech.fireCDcycle = mech.cycle + Math.floor((mech.crouch ? 30 : 20) * b.modFireRate); // cool down
b.muzzleFlash(20);
// mobs.alert(450);
const SPEED = mech.crouch ? 45 : 35
const SPEED = mech.crouch ? 40 : 30
const SPREAD = mech.crouch ? 0.04 : 0.15
let dir = mech.angle - SPREAD * 2;
for (let i = 0; i < 5; i++) {
let dir = mech.angle - SPREAD * (b.modSuperBallNumber - 1) / 2;
for (let i = 0; i < b.modSuperBallNumber; i++) {
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));
World.add(engine.world, bullet[me]); //add bullet to world
@@ -1359,7 +1375,7 @@ const b = {
y: SPEED * Math.sin(dir)
});
// 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].minDmgSpeed = 0;
bullet[me].restitution = 0.99;
@@ -1742,7 +1758,7 @@ const b = {
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",
ammo: 0,
ammoPack: 3,
ammoPack: (game.difficultyMode > 3) ? 2 : 3,
have: false,
isStarterGun: false,
fire() {
@@ -1761,7 +1777,7 @@ const b = {
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",
ammo: 0,
ammoPack: 4,
ammoPack: (game.difficultyMode > 3) ? 3 : 4,
have: false,
isStarterGun: false,
fire() {
@@ -1806,7 +1822,7 @@ const b = {
name: "drones", //11
description: "deploy drones that <strong>crash</strong> into enemies<br>collisions reduce drone <strong>cycles</strong> by 1 second",
ammo: 0,
ammoPack: 10,
ammoPack: (game.difficultyMode > 3) ? 8 : 10,
have: false,
isStarterGun: true,
fire() {

View File

@@ -2,12 +2,16 @@
/* 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
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: 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...
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
still deflected them near the robot
convert the health of mobs into energy when they are being attracted

View File

@@ -14,10 +14,13 @@ const level = {
start() {
if (level.levelsCleared === 0) {
// level.difficultyIncrease(15)
// b.giveGuns("minigun")
b.giveGuns("super balls")
// mech.setField("phase decoherence field")
b.giveMod("squirrel-cage rotor");
b.giveMod("ground stomp");
// b.giveMod("squirrel-cage rotor");
b.giveMod("super duper balls");
b.giveMod("super duper balls");
b.giveMod("super duper balls");
// level.intro(); //starting level
level.testingMap();
@@ -128,7 +131,7 @@ const level = {
// powerUps.spawn(450, -400, "mod", false);
// spawn.bodyRect(-45, -100, 40, 50);
// spawn.bomberBoss(800, -450);
// spawn.cellBoss(400, -750);
spawn.cellBoss(400, -750);
// spawn.randomLevelBoss(400, -750)

View File

@@ -357,7 +357,7 @@ const mobs = {
if (!mech.isStealth) vertexCollision(this.position, look, [player]);
// hitting player
if (best.who === player) {
dmg = 0.002 * game.dmgScale;
dmg = 0.0015 * game.dmgScale;
mech.damage(dmg);
//draw damage
ctx.fillStyle = "#f00";

View File

@@ -212,9 +212,14 @@ const powerUps = {
giveRandomAmmo() {
const ammoTarget = Math.floor(Math.random() * (b.guns.length));
const ammo = Math.ceil(b.guns[ammoTarget].ammoPack * 6);
b.guns[ammoTarget].ammo += ammo;
game.updateGunHUD();
game.makeTextLog("<span style='font-size:110%;'>+" + ammo + " ammo for " + b.guns[ammoTarget].name + "</span>", 300);
if (ammo === Infinity) {
b.guns[ammoTarget].ammo += ammo;
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
if (Math.random() * Math.random() - 0.3 > Math.sqrt(mech.health) || Math.random() < 0.035) { //spawn heal chance is higher at low health