aboutsummaryrefslogtreecommitdiffstats
path: root/xml
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2017-10-17 18:21:38 -0400
committerClyne Sullivan <tullivan99@gmail.com>2017-10-17 18:21:38 -0400
commit03246da32a8452e6a76ccf2f7f97cda4472d1d29 (patch)
treefe69406b677e574365d14099e3d1cd69bde586ed /xml
parent2bd1eaef1b9ec848933a40049ec8866e2b83a47d (diff)
skirl hostility
Diffstat (limited to 'xml')
-rw-r--r--xml/!town.xml3
-rw-r--r--xml/entities.xml13
2 files changed, 14 insertions, 2 deletions
diff --git a/xml/!town.xml b/xml/!town.xml
index 30adc94..07d84ac 100644
--- a/xml/!town.xml
+++ b/xml/!town.xml
@@ -27,9 +27,8 @@
<Dialog name="Bob">
<text id="0" nextid="1">
- <!--<give name="Hunters Bow" count="1"/>
+ <give name="Hunters Bow" count="1"/>
<give name="Arrow" count="50"/>
- <option name="Yes"/>-->
<give name="Wood Sword" count="1"/>
<content>
Hey there! The name's Bob. Good to see you've finally woken up from your nap by the cliff there... lol
diff --git a/xml/entities.xml b/xml/entities.xml
index 67f4fc2..16bee0f 100644
--- a/xml/entities.xml
+++ b/xml/entities.xml
@@ -80,6 +80,10 @@
countdown = 0
update = function()
+ if (velx &lt; 0 and math.abs(selfx - playerx) &lt; 150) then
+ aggro = 1
+ end
+
if (countdown == 0) then
countdown = math.random(3000, 5000)
velx = math.random(-1, 1) * 0.005
@@ -88,7 +92,15 @@
end
hostile = function()
+ if (playerx &lt;= selfx) then
+ velx = -0.01
+ else
+ velx = 0.01
+ end
+ if (math.abs(playerx - selfx) &lt; 50) then
+ attack(selfx, selfy)
+ end
end
</Wander>
<Aggro/>
@@ -110,6 +122,7 @@
<Solid />
<Physics />
<Name value="birb" />
+ <Health value="60" />
<Wander>
countdown = 0
onetime = 0