Jofthomas HF staff commited on
Commit
1c4cbbe
1 Parent(s): f48bbd0
convex/aiTown/gameCycle.ts CHANGED
@@ -198,7 +198,7 @@ export class GameCycle {
198
  const prevState = this.cycleState;
199
  this.currentTime = 0;
200
  this.cycleIndex = (this.cycleIndex + 1) % normalCycle.length;
201
- this.cycleNumber = this.cycleNumber + 1;
202
  this.cycleState = normalCycle[this.cycleIndex];
203
  onStateChange(prevState, this.cycleState, game, tickDuration);
204
  }
 
198
  const prevState = this.cycleState;
199
  this.currentTime = 0;
200
  this.cycleIndex = (this.cycleIndex + 1) % normalCycle.length;
201
+ this.cycleNumber = Math. ceil((this.cycleNumber + 1) / normalCycle.length);
202
  this.cycleState = normalCycle[this.cycleIndex];
203
  onStateChange(prevState, this.cycleState, game, tickDuration);
204
  }
src/components/Player.tsx CHANGED
@@ -35,7 +35,7 @@ export const Player = ({
35
  }
36
  let character = characters.find((c) => c.name === playerCharacter);
37
  // If it's night, use the night version of the character
38
- if (game.world.gameCycle.cycleState === 'Night' && game.playerDescriptions.get(player.id)?.type === 'werewolf') {
39
  character = characters.find((c) => c.name === 'c1');
40
  }
41
  const locationBuffer = game.world.historicalLocations?.get(player.id);
 
35
  }
36
  let character = characters.find((c) => c.name === playerCharacter);
37
  // If it's night, use the night version of the character
38
+ if ((game.world.gameCycle.cycleState === 'Night' || game.world.gameCycle.cycleState === 'PlayerKillVoting') && game.playerDescriptions.get(player.id)?.type === 'werewolf') {
39
  character = characters.find((c) => c.name === 'c1');
40
  }
41
  const locationBuffer = game.world.historicalLocations?.get(player.id);