From 2bd1eaef1b9ec848933a40049ec8866e2b83a47d Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Mon, 16 Oct 2017 18:43:06 -0400 Subject: do not touch birb --- xml/!town.xml | 2 +- xml/entities.xml | 49 +++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 48 insertions(+), 3 deletions(-) (limited to 'xml') diff --git a/xml/!town.xml b/xml/!town.xml index 5c66a25..30adc94 100644 --- a/xml/!town.xml +++ b/xml/!town.xml @@ -22,7 +22,7 @@ - + diff --git a/xml/entities.xml b/xml/entities.xml index fda45b4..67f4fc2 100644 --- a/xml/entities.xml +++ b/xml/entities.xml @@ -86,9 +86,13 @@ end countdown = countdown - 1 end + + hostile = function() + + end - + + @@ -108,8 +112,18 @@ countdown = 0 + onetime = 0 update = function() + if (onetime == 0) then + onetime = 1 + selfy = playery + 300 + end + + if (math.abs(selfx - playerx) <= 150) then + aggro = 1 + end + if (countdown == 0) then countdown = math.random(3000, 5000) if (velx >= 0) then @@ -123,7 +137,38 @@ end countdown = countdown - 1 end + + dipping = 0 + oldy = 0 + + hostile = function() + if (dipping == 1) then + if (selfy >= oldy) then + dipping = 0 + aggro = 0 + vely = 0 + onetime = 0 + else + vely = vely + 0.0006 + if (math.abs(vely) < 0.01) then + attack(selfx, selfy) + end + end + else + if (selfy - playery > 200) then + if (playerx >= selfx) then + velx = 0.01 + else + velx = -0.01 + end + dipping = 1 + oldy = selfy + vely = -.2 + end + end + end + -- cgit v1.2.3