diff --git a/index.html b/index.html
index 51830cf..34e37f6 100644
--- a/index.html
+++ b/index.html
@@ -4,16 +4,15 @@
-
-
Bastion: The Watcher's Lament
-
+ Bastion: The Watchers Lament
+
-
+
-
+
{
+ tower.slottedGems.forEach((gem) => {
+ gems.push(gem.definition.name);
+ });
+ });
return (
this.damageDealt * 2 +
this.hp * 10 +
(this.goldEarned - this.goldSpent) * 3 +
this.wavesSurvived * 100 +
- uniqueGems.length * 100
+ gems.length * 100 +
+ 1000
);
}
+ // Because it's a game object, must have this.
public update() {}
}
diff --git a/src/classes/game/TowerBehaviours.ts b/src/classes/game/TowerBehaviours.ts
index 0dcd6a6..735b99f 100644
--- a/src/classes/game/TowerBehaviours.ts
+++ b/src/classes/game/TowerBehaviours.ts
@@ -7,6 +7,7 @@ import Creep, { CreepEffects } from './Creep';
import Projectile, { calculateAngleToPoint, TrapProjectile, VisualLightning } from './Projectile';
import { distance, Tower } from './Tower';
import * as PIXI from 'pixi.js';
+import { TowerBehaviours } from './TowerManager';
/**
* Checks the projectiles of the tower and updates or removes them based on their state.
@@ -72,7 +73,9 @@ export function computeGemImprovements(tower: Tower) {
tower.computedDamageToDeal = tower.definition.stats.damage + gemDamage;
tower.computedCooldown = tower.definition.stats.cooldown - gemAttackSpeedUp;
tower.computedRange = tower.definition.stats.range + gemRangeUp;
- tower.computedTimeToLive = tower.definition.stats.timeToLive + gemTimeToLiveUp;
+ if (tower.behaviour != TowerBehaviours.TrapperTowerBehaviour)
+ tower.computedTimeToLive = tower.definition.stats.timeToLive + gemTimeToLiveUp;
+ else tower.computedTimeToLive = tower.definition.stats.timeToLive + gemTimeToLiveUp * 10;
tower.computedPierce = tower.definition.stats.pierce + gemPierceUp;
// Buff tower
diff --git a/src/classes/game/TowerManager.ts b/src/classes/game/TowerManager.ts
index 8f5cc6f..7b5cc2a 100644
--- a/src/classes/game/TowerManager.ts
+++ b/src/classes/game/TowerManager.ts
@@ -28,7 +28,7 @@ export default class TowerManager {
height: 64,
alpha: 0.8,
});
- private towers: Tower[] = [];
+ public towers: Tower[] = [];
constructor() {
// TODO: Unsubscribe from events once the scene is destroyed
Engine.TowerManager = this;
diff --git a/src/main.ts b/src/main.ts
index 13f012f..f460007 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -48,6 +48,23 @@ import DebrisManager from './classes/game/DebrisManager';
window.addEventListener('resize', resize);
resize();
+ const isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);
+ if (isMobile) {
+ let ttxt = new PIXI.Text({
+ text: 'Bastion: The Watchers Lament is currently unsupported on mobile.\nPlease play it on your computer instead.',
+ style: new PIXI.TextStyle({
+ fill: 0x333333,
+ fontSize: 50,
+ textBaseline: 'middle',
+ }),
+ });
+ ttxt.x = Engine.app.canvas.width / 2;
+ ttxt.y = Engine.app.canvas.height / 2 + 50;
+ ttxt.anchor.set(0.5, 0.5);
+ Engine.app.stage.addChild(ttxt);
+
+ return;
+ }
await Assets.LoadAssets();
GameUIConstants.init();
KeyboardManager.init();
diff --git a/src/scenes/Game.ts b/src/scenes/Game.ts
index 94c6484..ed1d8fc 100644
--- a/src/scenes/Game.ts
+++ b/src/scenes/Game.ts
@@ -85,6 +85,8 @@ export class GameScene extends Scene {
this.isWaveManagerFinished = true;
});
this.events.on(CreepEvents.Died, (playerAward, creepThatDied) => {
+ this.MissionStats.damageDealt += playerAward;
+ this.MissionStats.creepsKilled++;
this.MissionStats.earnGold(playerAward);
});
this.towerPanel = new TowerPanel(GameUIConstants.SidebarRect);
@@ -185,6 +187,7 @@ export class GameScene extends Scene {
this.isWaveManagerFinished = false;
this.setRoundMode(RoundMode.Purchase);
this.changeRoundButton.buttonIcon.texture = GameAssets.PlayIconTexture;
+ this.MissionStats.wavesSurvived++;
Engine.NotificationManager.Notify(
`Round ${this.currentRound + 1}/${this.mission.rounds.length} completed.`,
'info'