Adjust seend distance

This commit is contained in:
Ketchetwahmeegwun T. Southall 2022-01-30 15:25:18 -08:00
parent c1dbd15693
commit 5da4d0a3bb

View File

@ -192,7 +192,7 @@ export class AnimalEntity extends Entity {
think(delta: number) {
this.thinkTimer += delta
while (this.thinkTimer >= 100) {
if (this.seenTarget && this.isMonster && planck.Vec2.distance(planck.Vec2(this.x, this.y), planck.Vec2(this.seenTarget.x, this.seenTarget.y)) < 35) {
if (this.seenTarget && this.isMonster && planck.Vec2.distance(planck.Vec2(this.x, this.y), planck.Vec2(this.seenTarget.x, this.seenTarget.y)) < 30) {
this.desiredActions = adjustAction([], 'attack', 1)
if (Math.random() > 1 - this.mode.laziness/4) {
this.desiredActions = []