spider boss

large mods shrink on death instead of disappearing
new boss mob:  spiderBoss
mod - Bayesian interference -> determinism
   spawn 4 mods and 2 heals, future power ups are limited to one choice
mod - Leveraged investments -> Bayesian interference
   33% chance for double power ups to drop, remove all future ammo power ups
(serious progress on my level construction tools, but it's not ready yet)
This commit is contained in:
landgreen
2020-04-28 19:14:07 -07:00
parent b16105abb6
commit a7faffa8a7
11 changed files with 390 additions and 340 deletions

View File

@@ -371,7 +371,7 @@ const mech = {
if (b.mods[i].count < b.mods[i].maxCount &&
b.mods[i].name !== "quantum immortality" &&
b.mods[i].name !== "Born rule" &&
b.mods[i].name !== "leveraged investment" &&
b.mods[i].name !== "determinism" &&
b.mods[i].name !== "reallocation" &&
b.mods[i].allowed()
) options.push(i);
@@ -603,7 +603,7 @@ const mech = {
// freeze game and display a full screen red color
if (dmg > 0.05) {
if (dmg > 0.15 * mech.holdingMassScale) mech.drop(); //drop block if holding
if (dmg > 0.20 * mech.holdingMassScale) mech.drop(); //drop block if holding
game.fpsCap = 4 //40 - Math.min(25, 100 * dmg)
game.fpsInterval = 1000 / game.fpsCap;
} else {
@@ -714,6 +714,13 @@ const mech = {
mech.knee.x = (l / d) * (mech.foot.x - mech.hip.x) - (h / d) * (mech.foot.y - mech.hip.y) + mech.hip.x + offset;
mech.knee.y = (l / d) * (mech.foot.y - mech.hip.y) + (h / d) * (mech.foot.x - mech.hip.x) + mech.hip.y;
},
// collisionImmune: false,
// beginCollisionImmune() {
// },
// endCollisionImmune() {
// },
draw() {
// mech.fillColor = (mech.collisionImmuneCycle < mech.cycle) ? "#fff" : "rgba(255,255,255,0.1)" //"#cff"
ctx.fillStyle = mech.fillColor;
@@ -721,6 +728,12 @@ const mech = {
//draw body
ctx.save();
// if (mech.collisionImmuneCycle < mech.cycle) {
// ctx.globalAlpha = 1
// if (mech.collisionImmune) mech.collisionImmune = false;
// } else {
// ctx.globalAlpha = 0.7
// }
ctx.globalAlpha = (mech.collisionImmuneCycle < mech.cycle) ? 1 : 0.7
ctx.translate(mech.pos.x, mech.pos.y);
mech.calcLeg(Math.PI, -3);