From 3ef0e74749373d4cfa2a9f8cda9b536b77d8b4cd Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Thu, 26 Oct 2017 15:54:44 -0400 Subject: fight stuff --- xml/!town2.xml | 18 +++++++++++++++++- xml/entities.xml | 13 ++++++------- xml/fight.xml | 37 +++++++++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+), 8 deletions(-) create mode 100644 xml/fight.xml (limited to 'xml') diff --git a/xml/!town2.xml b/xml/!town2.xml index fcdf507..cc1953f 100644 --- a/xml/!town2.xml +++ b/xml/!town2.xml @@ -10,7 +10,23 @@ - + + x = 0 + + ground = function() + if (x == 600) then + height = -1 + else + height = 60 + math.random(0,6) / 2 + end + + x = x + 1 + end + + grass = function() + height = math.random(2, 5) + end + diff --git a/xml/entities.xml b/xml/entities.xml index b95b5a6..1759f1f 100644 --- a/xml/entities.xml +++ b/xml/entities.xml @@ -10,7 +10,7 @@ - + countdown = 0 @@ -89,7 +89,7 @@ - + @@ -97,7 +97,7 @@ - + @@ -113,7 +113,7 @@ end hostile = function() - + end @@ -226,8 +226,7 @@ - - - + + diff --git a/xml/fight.xml b/xml/fight.xml new file mode 100644 index 0000000..aaf30cd --- /dev/null +++ b/xml/fight.xml @@ -0,0 +1,37 @@ + + + + + x = 0 + + ground = function() + if (x == 240) then + height = -1 + else + height = 1 / math.cos((x / 1.19 - 100) * 3.14 / 180) + if (height < 0 or height > 800) then + height = 800 + else + height = height + 60 + end + end + + x = x + 1 + end + + grass = function() + height = math.random(2, 5) + end + + + + -- cgit v1.2.3