Spaces:
Running
Running
Update game.js
Browse files
game.js
CHANGED
|
@@ -894,13 +894,15 @@ class EnemyFighter {
|
|
| 894 |
}
|
| 895 |
|
| 896 |
const distanceToPlayer = this.position.distanceTo(playerPosition);
|
| 897 |
-
|
| 898 |
-
|
| 899 |
-
|
| 900 |
-
|
| 901 |
-
|
| 902 |
-
|
| 903 |
-
|
|
|
|
|
|
|
| 904 |
|
| 905 |
// 於╇弻 須岉敿 瓿勳偘
|
| 906 |
this.calculateAvoidance();
|
|
|
|
| 894 |
}
|
| 895 |
|
| 896 |
const distanceToPlayer = this.position.distanceTo(playerPosition);
|
| 897 |
+
|
| 898 |
+
// 靸來儨 瓴办爼
|
| 899 |
+
if (this.temporaryEvadeMode) {
|
| 900 |
+
this.aiState = 'evade';
|
| 901 |
+
} else if (distanceToPlayer <= 3000) {
|
| 902 |
+
this.aiState = 'combat';
|
| 903 |
+
} else {
|
| 904 |
+
this.aiState = 'patrol';
|
| 905 |
+
}
|
| 906 |
|
| 907 |
// 於╇弻 須岉敿 瓿勳偘
|
| 908 |
this.calculateAvoidance();
|