Skip to content

Commit

Permalink
Adjusted number of boat pirates and reset boat attacks
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikketer committed Jul 17, 2024
1 parent c778fc9 commit 4a0aa6b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions boatBattle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
Expand All @@ -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) => {
Expand Down
2 changes: 1 addition & 1 deletion main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const playerState = {
currentIsland: ''
}

const version: string = 'v0.10'
const version: string = 'v0.11'
const debugMode: boolean = false

let currentState: States
Expand Down

0 comments on commit 4a0aa6b

Please sign in to comment.