aboutsummaryrefslogtreecommitdiffstats
path: root/xml
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2017-10-26 15:54:44 -0400
committerClyne Sullivan <tullivan99@gmail.com>2017-10-26 15:54:44 -0400
commit3ef0e74749373d4cfa2a9f8cda9b536b77d8b4cd (patch)
treece5d7d350aab71114024d6add712df38928e2004 /xml
parentf785f17cdb286449e8d98be747213740172629c5 (diff)
fight stuff
Diffstat (limited to 'xml')
-rw-r--r--xml/!town2.xml18
-rw-r--r--xml/entities.xml13
-rw-r--r--xml/fight.xml37
3 files changed, 60 insertions, 8 deletions
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 @@
<layer path="bg/dirt.png"/>
<layer path="bg/grass.png"/>
</style>
- <generation width="1000"/>
+ <generation>
+ 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
+ </generation>
<time>6000</time>
<link left="!town.xml"/>
</World>
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 @@
</Sprite>
<Direction />
<Solid />
- <Illuminate radius="100" />
+ <Illuminate radius="75" />
<Wander>
countdown = 0
@@ -89,7 +89,7 @@
</npc>
<skirl>
- <Position value="300.0,100.0" />
+ <Position />
<Visible value="0.2" />
<Sprite>
<frame>
@@ -97,7 +97,7 @@
</frame>
</Sprite>
<Direction />
- <Health value="50" />
+ <Health value="200" ouch="assets/sounds/badOuch.wav" />
<Solid />
<Physics />
<Name value="SKIRL" />
@@ -113,7 +113,7 @@
end
hostile = function()
-
+
end
</Wander>
<Aggro/>
@@ -226,8 +226,7 @@
</chest>
<trigger>
- <Position value="200.0,100.0" />
- <Direction />
- <Solid value="1.0,1.0" />
+ <Position value="0.0,100.0" />
+ <Solid value="1.0,500.0" />
<Trigger />
</trigger>
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 @@
+<include file="entities.xml" />
+<World>
+ <style bgm="assets/music/fight.ogg" folder="assets/style/classic/">
+ <layer path="bg/bg.png"/>
+ <layer path="bg/bgFarMountain.png"/>
+ <layer path="bg/forestTileFar.png"/>
+ <layer path="bg/forestTileBack.png"/>
+ <layer path="bg/forestTileMid.png"/>
+ <layer path="bg/forestTileFront.png"/>
+ <layer path="bg/dirt.png"/>
+ <layer path="bg/grass.png"/>
+ </style>
+ <generation>
+ x = 0
+
+ ground = function()
+ if (x == 240) then
+ height = -1
+ else
+ height = 1 / math.cos((x / 1.19 - 100) * 3.14 / 180)
+ if (height &lt; 0 or height &gt; 800) then
+ height = 800
+ else
+ height = height + 60
+ end
+ end
+
+ x = x + 1
+ end
+
+ grass = function()
+ height = math.random(2, 5)
+ end
+ </generation>
+ <time>6000</time>
+ <skirl />
+</World>