From e2f50060db48d4f2cd389fccfc5f48df244736e6 Mon Sep 17 00:00:00 2001 From: Jonas Mucke Date: Mon, 20 Apr 2020 14:41:29 +0200 Subject: [PATCH] deleted h(x) and changed cost --- src/Overlap/AI/AI_Hero.gd | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Overlap/AI/AI_Hero.gd b/src/Overlap/AI/AI_Hero.gd index 131fb12..c88b2d4 100644 --- a/src/Overlap/AI/AI_Hero.gd +++ b/src/Overlap/AI/AI_Hero.gd @@ -103,17 +103,18 @@ func getCost(field): for i in grid.object_grid[field.x][field.y]: match i: Grid.Kind.DAMAGE: - cost += 100 + cost += 15 Grid.Kind.SLOW: - cost += 1 + cost += 4 return cost #return an heurestic of distance # curr - current position # targ - a target position func h_fn(curr, target): + return 0 var h = min(target[0]-curr[0],target[1]-curr[1]) - return 0 + return h # currCost - currentCost # target - position of the field to move to