File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,13 +44,14 @@ export class BotBehavior {
4444 this . game . addExecution ( new EmojiExecution ( this . player , player . id ( ) , emoji ) ) ;
4545 }
4646
47- // Prevent attacking of humans on lower difficulties
47+ // Prevent attacking of humans on lower difficulties (or if we are a bot)
4848 private shouldAttack ( other : Player | TerraNullius ) : boolean {
4949 // Always attack Terra Nullius, non-humans and traitors
5050 if (
5151 other . isPlayer ( ) === false ||
5252 other . type ( ) !== PlayerType . Human ||
53- other . isTraitor ( )
53+ other . isTraitor ( ) ||
54+ this . player . type ( ) === PlayerType . Bot
5455 ) {
5556 return true ;
5657 }
@@ -374,7 +375,6 @@ export class BotBehavior {
374375 }
375376
376377 // Choose a new enemy randomly
377- const { difficulty } = this . game . config ( ) . gameConfig ( ) ;
378378 const neighbors = this . player . neighbors ( ) ;
379379 for ( const neighbor of this . random . shuffleArray ( neighbors ) ) {
380380 if ( ! neighbor . isPlayer ( ) ) continue ;
@@ -383,7 +383,7 @@ export class BotBehavior {
383383 neighbor . type ( ) === PlayerType . FakeHuman ||
384384 neighbor . type ( ) === PlayerType . Human
385385 ) {
386- if ( this . random . chance ( 2 ) || difficulty === Difficulty . Easy ) {
386+ if ( this . random . chance ( 2 ) ) {
387387 continue ;
388388 }
389389 }
You can’t perform that action at this time.
0 commit comments