From bf229beef148b9fd1457eabce6822f01cef4e764 Mon Sep 17 00:00:00 2001 From: Aneesh Dogra Date: Mon, 2 Dec 2024 18:18:37 +0100 Subject: [PATCH 1/2] Update LootGoal to make sure damagedone and damagetaken is false --- Core/Goals/LootGoal.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Core/Goals/LootGoal.cs b/Core/Goals/LootGoal.cs index b6f4523d..8478cea1 100644 --- a/Core/Goals/LootGoal.cs +++ b/Core/Goals/LootGoal.cs @@ -68,7 +68,8 @@ public LootGoal(ILogger logger, this.state = state; this.token = cts.Token; - + AddPrecondition(GoapKey.damagedone, false); + AddPrecondition(GoapKey.damagetaken, false); AddPrecondition(GoapKey.shouldloot, true); AddEffect(GoapKey.shouldloot, false); } From 303d9f99c7c0498542d265d11b8d1f9841da0fbd Mon Sep 17 00:00:00 2001 From: Aneesh Dogra Date: Mon, 2 Dec 2024 19:05:11 +0100 Subject: [PATCH 2/2] Use dangercombat for checking if mob is attacking us instead --- Core/Goals/LootGoal.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Core/Goals/LootGoal.cs b/Core/Goals/LootGoal.cs index 8478cea1..a41d4e70 100644 --- a/Core/Goals/LootGoal.cs +++ b/Core/Goals/LootGoal.cs @@ -68,8 +68,7 @@ public LootGoal(ILogger logger, this.state = state; this.token = cts.Token; - AddPrecondition(GoapKey.damagedone, false); - AddPrecondition(GoapKey.damagetaken, false); + AddPrecondition(GoapKey.dangercombat, false); AddPrecondition(GoapKey.shouldloot, true); AddEffect(GoapKey.shouldloot, false); }