subway stations

subway
  2 new subway stations
  more visible button graphics on subway

new constraints
  no health bars
  no pause while choosing

tech: coherence - past choices are added to all future tech
  requires decoherence
  research and cancel buttons have a sticky scroll positioning
eternalism: you can't pause while choosing, but you can otherwise pause now
  1.25->1.3 damage

bugs
  MIRV missiles now interact with time dilation properly
This commit is contained in:
landgreen
2024-08-31 08:28:05 -07:00
parent 220a6b4c15
commit ebd22741d4
10 changed files with 557 additions and 161 deletions

View File

@@ -30,6 +30,20 @@ const mobs = {
// }
}
},
defaultHealthBar() {
for (let i = 0, len = mob.length; i < len; i++) {
if (mob[i].seePlayer.recall && mob[i].showHealthBar) {
const h = mob[i].radius * 0.3;
const w = mob[i].radius * 2;
const x = mob[i].position.x - w / 2;
const y = mob[i].position.y - w * 0.7;
ctx.fillStyle = "rgba(100, 100, 100, 0.3)";
ctx.fillRect(x, y, w, h);
ctx.fillStyle = "rgba(255,0,0,0.7)";
ctx.fillRect(x, y, w * mob[i].health, h);
}
}
},
healthBar() {
for (let i = 0, len = mob.length; i < len; i++) {
if (mob[i].seePlayer.recall && mob[i].showHealthBar) {
@@ -1010,8 +1024,9 @@ const mobs = {
this.death(); //death with no power up
}
},
healthBar() { //draw health by mob //most health bars are drawn in mobs.healthbar();
if (this.seePlayer.recall) {
//draw health by mob //most health bars are drawn in mobs.healthBar(); , not this
healthBar() {
if (this.seePlayer.recall && !level.isHideHealth) {
const h = this.radius * 0.3;
const w = this.radius * 2;
const x = this.position.x - w / 2;