From 4a0aa6bd471e308498bca7a9130060f78cd2f659 Mon Sep 17 00:00:00 2001 From: Chris Weed Date: Wed, 17 Jul 2024 18:07:24 -0500 Subject: [PATCH] Adjusted number of boat pirates and reset boat attacks --- boatBattle.ts | 6 +++--- main.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/boatBattle.ts b/boatBattle.ts index dce649d..59c13b5 100644 --- a/boatBattle.ts +++ b/boatBattle.ts @@ -17,6 +17,7 @@ namespace BoatBattle { export function init() { scene.setBackgroundColor(6) scene.setBackgroundImage(assets.image`Boat Battle`) + _isDone = false // Spawn the players player1 = new Pirate({ control: controller.player1, playerNumber: 0, onAttack: onPirateAttack, onDie: onPirateDeath, boundaries: _boundingBox, statLocation: player1StatLocation }) @@ -36,10 +37,9 @@ namespace BoatBattle { const boatTreasure = TreasureStats.currentTreasure.onBoat let numberOfEnemies = 1 if (boatTreasure > 1000) { - numberOfEnemies = 8 + numberOfEnemies = 10 } else { - // A log curve to determine the number of enemies - numberOfEnemies = 3 + Math.min(Math.floor(boatTreasure / 1000 * 4), 4); + numberOfEnemies = 3 + Math.min(Math.floor(boatTreasure / 1000 * 4), 7); } Utils.getArrayOfLength(numberOfEnemies).forEach((index) => { diff --git a/main.ts b/main.ts index 78e6275..56d6a2c 100644 --- a/main.ts +++ b/main.ts @@ -35,7 +35,7 @@ const playerState = { currentIsland: '' } -const version: string = 'v0.10' +const version: string = 'v0.11' const debugMode: boolean = false let currentState: States