From e758e541f1638016b5fd7b4a4f1ab1eb9596eef5 Mon Sep 17 00:00:00 2001
From: Allanis <allanis@saracraft.net>
Date: Fri, 7 Mar 2014 23:16:07 +0000
Subject: [PATCH] [Changed] Tweaked the ai decision tree slightly.

---
 scripts/ai/tpl/generic.lua | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/scripts/ai/tpl/generic.lua b/scripts/ai/tpl/generic.lua
index dfe8403..4e29671 100644
--- a/scripts/ai/tpl/generic.lua
+++ b/scripts/ai/tpl/generic.lua
@@ -23,7 +23,13 @@ function control()
 
   -- Get new task.
   if task == "none" then
-    idle()
+    -- We'll first check enemy.
+    if enemy ~= nil and aggressive then
+      taunt(enemy, true)
+      ai.pushtask(0, "attack", enemy)
+    else
+      idle()
+    end
 
   -- Think for attacking.
   elseif task == "attack" then