diff --git a/ATL/Pooh/pooh.atl b/ATL/Pooh/pooh.atl index 181995f..b0498e3 100644 --- a/ATL/Pooh/pooh.atl +++ b/ATL/Pooh/pooh.atl @@ -14,3 +14,7 @@ define-player "Winnie the Pooh" description "A small but very lovable bear of very little brain." place "Pooh's home" + +define-player "Christopher Robin" + description "Pooh's best friend." + place "Western woods" diff --git a/ATL/Pooh/pooh.atl b/ATL/Pooh/pooh.atl index 181995f..b0498e3 100644 --- a/ATL/Pooh/pooh.atl +++ b/ATL/Pooh/pooh.atl @@ -14,3 +14,7 @@ define-player "Winnie the Pooh" description "A small but very lovable bear of very little brain." place "Pooh's home" + +define-player "Christopher Robin" + description "Pooh's best friend." + place "Western woods" diff --git a/ATL/dev/creator-test.atl b/ATL/dev/creator-test.atl new file mode 100644 index 0000000..6209e7c --- /dev/null +++ b/ATL/dev/creator-test.atl @@ -0,0 +1,185 @@ +;; This code has been automatically generated by the +;; Atlantis world creator. + +define-item "Rope (20m)" + cost 5 + +define-item "Backpack" + cost 5 + +define-item "Knife" + cost 10 + +define-item "Short sword" + cost 40 + +define-item "Long sword" + cost 80 + +define-item "Dagger" + cost 20 + +define-item "Spear" + cost 25 + +define-item "Short bow" + cost 30 + +define-item "Longbow" + cost 60 + +define-item "Slingshot" + cost 15 + +define-item "Throwing knife" + cost 15 + +define-item "Quiver of arrows" + cost 20 + +define-item "Leather armour" + cost 60 + +define-item "Chain mail" + cost 120 + +define-item "Plate armour" + cost 200 + +define-item "Buckler" + cost 35 + +define-item "Full shield" + cost 45 + +define-item "Candles (3x)" + cost 5 + +define-item "Matches" + cost 1 + +define-item "Food rations (5x)" + cost 10 + +define-item "Grappling hook" + cost 15 + +define-item "Fishing net" + cost 25 + +define-item "Fishing rod" + cost 15 + +define-item "Tent (2 people)" + cost 30 + +define-item "Cloak" + cost 15 + +define-item "Hat" + cost 10 + +define-item "Water bottle" + cost 5 + +define-item "Compass" + cost 20 + +define-item "Quill and ink" + cost 5 + +define-item "Parchment" + cost 5 + +define-item "Blanket" + cost 5 + +define-item "Book of Legends" + cost 55 + +define-item "Book of Lore" + cost 55 + +define-item "Medicinal herbs" + cost 10 + +define-item "Bandages (3x)" + cost 5 + +define-item "Tea leaves" + cost 5 + +define-item "Sleeping potion" + cost 15 + +define-item "Leather pouch" + cost 2 + +define-item "Face mask" + cost 10 + +define-item "Dye" + cost 5 + +define-item "Cloth" + cost 5 + +define-item "Scissors" + cost 15 + +define-item "Needle and thread" + cost 3 + +define-item "Canvas" + cost 8 + +define-item "String" + cost 2 + +define-item "Hatchet" + cost 20 + +define-item "Map" + cost 35 + +define-item "Pony" + cost 100 + +define-item "Horse" + cost 180 + +define-item "Saddle and bridle" + cost 45 + +define-item "Saddlebag" + cost 35 + +define-item "Handmirror" + cost 20 + +define-item "Magnifying glass" + cost 20 + +define-item "Telescope" + cost 40 + +define-item "Rope ladder" + cost 15 + +define-item "Torches (3x)" + cost 10 + +define-item "Staff" + cost 10 + +define-item "Cooking pot" + cost 8 + +define-item "Soap" + cost 2 + +define-item "Towel" + cost 5 + +define-item "Boots" + cost 10 \ No newline at end of file diff --git a/ATL/Pooh/pooh.atl b/ATL/Pooh/pooh.atl index 181995f..b0498e3 100644 --- a/ATL/Pooh/pooh.atl +++ b/ATL/Pooh/pooh.atl @@ -14,3 +14,7 @@ define-player "Winnie the Pooh" description "A small but very lovable bear of very little brain." place "Pooh's home" + +define-player "Christopher Robin" + description "Pooh's best friend." + place "Western woods" diff --git a/ATL/dev/creator-test.atl b/ATL/dev/creator-test.atl new file mode 100644 index 0000000..6209e7c --- /dev/null +++ b/ATL/dev/creator-test.atl @@ -0,0 +1,185 @@ +;; This code has been automatically generated by the +;; Atlantis world creator. + +define-item "Rope (20m)" + cost 5 + +define-item "Backpack" + cost 5 + +define-item "Knife" + cost 10 + +define-item "Short sword" + cost 40 + +define-item "Long sword" + cost 80 + +define-item "Dagger" + cost 20 + +define-item "Spear" + cost 25 + +define-item "Short bow" + cost 30 + +define-item "Longbow" + cost 60 + +define-item "Slingshot" + cost 15 + +define-item "Throwing knife" + cost 15 + +define-item "Quiver of arrows" + cost 20 + +define-item "Leather armour" + cost 60 + +define-item "Chain mail" + cost 120 + +define-item "Plate armour" + cost 200 + +define-item "Buckler" + cost 35 + +define-item "Full shield" + cost 45 + +define-item "Candles (3x)" + cost 5 + +define-item "Matches" + cost 1 + +define-item "Food rations (5x)" + cost 10 + +define-item "Grappling hook" + cost 15 + +define-item "Fishing net" + cost 25 + +define-item "Fishing rod" + cost 15 + +define-item "Tent (2 people)" + cost 30 + +define-item "Cloak" + cost 15 + +define-item "Hat" + cost 10 + +define-item "Water bottle" + cost 5 + +define-item "Compass" + cost 20 + +define-item "Quill and ink" + cost 5 + +define-item "Parchment" + cost 5 + +define-item "Blanket" + cost 5 + +define-item "Book of Legends" + cost 55 + +define-item "Book of Lore" + cost 55 + +define-item "Medicinal herbs" + cost 10 + +define-item "Bandages (3x)" + cost 5 + +define-item "Tea leaves" + cost 5 + +define-item "Sleeping potion" + cost 15 + +define-item "Leather pouch" + cost 2 + +define-item "Face mask" + cost 10 + +define-item "Dye" + cost 5 + +define-item "Cloth" + cost 5 + +define-item "Scissors" + cost 15 + +define-item "Needle and thread" + cost 3 + +define-item "Canvas" + cost 8 + +define-item "String" + cost 2 + +define-item "Hatchet" + cost 20 + +define-item "Map" + cost 35 + +define-item "Pony" + cost 100 + +define-item "Horse" + cost 180 + +define-item "Saddle and bridle" + cost 45 + +define-item "Saddlebag" + cost 35 + +define-item "Handmirror" + cost 20 + +define-item "Magnifying glass" + cost 20 + +define-item "Telescope" + cost 40 + +define-item "Rope ladder" + cost 15 + +define-item "Torches (3x)" + cost 10 + +define-item "Staff" + cost 10 + +define-item "Cooking pot" + cost 8 + +define-item "Soap" + cost 2 + +define-item "Towel" + cost 5 + +define-item "Boots" + cost 10 \ No newline at end of file diff --git a/ATL/dev/example.atl b/ATL/dev/example.atl new file mode 100644 index 0000000..3101edd --- /dev/null +++ b/ATL/dev/example.atl @@ -0,0 +1,72 @@ +# This is an example Atlantis file - I use it to explore what the language +# should end up looking like. + +load races.atl +load classes.atl + + +define-quest Kill hellhound + objective kill hellhound + reward gold 300 + + +define-spell Ray of death + type kill + min-intelligence 12 + success-rate 35 + + +define-npc Hades + say Oh, amazing, you actually got here! Who did you bribe? + sell 30 Ambrosia + quest Kill hellhound + + +define-item Scroll of light + value 80 + add-experience 20 + add-spell Ray of death + +define-item Ambrosia + category Food + add-health 5 + + +define-monster Hellhound + armor-class 8 + strength 10 + melee-weapon 2 claws + experience 50 + spawn 2 + aggression 60 + +define-monster Fury + armor-class 5 + strength 8 + melee-weapon 10 fire whip + experience 74 + spawn 0.8 + aggression 30 + + +define-place Nowhere + description Welcome to Nowhere! You are in the void, the space between \ +the worlds. Around you is black. Black, except for one tiny pin-prick of light \ +to the north. + neighbour Elysium + +define-place Elysium + description Congratulations! You have achieved Elysium! + neighbour Nowhere + neighbour Fields of punishment + npc Hades + item Scroll of light + +define-place Fields of punishment + description You really, really don't want to end up here... + neighbour Elysium + monster Hellhound + monster Fury + + +start-place Elysium \ No newline at end of file diff --git a/ATL/Pooh/pooh.atl b/ATL/Pooh/pooh.atl index 181995f..b0498e3 100644 --- a/ATL/Pooh/pooh.atl +++ b/ATL/Pooh/pooh.atl @@ -14,3 +14,7 @@ define-player "Winnie the Pooh" description "A small but very lovable bear of very little brain." place "Pooh's home" + +define-player "Christopher Robin" + description "Pooh's best friend." + place "Western woods" diff --git a/ATL/dev/creator-test.atl b/ATL/dev/creator-test.atl new file mode 100644 index 0000000..6209e7c --- /dev/null +++ b/ATL/dev/creator-test.atl @@ -0,0 +1,185 @@ +;; This code has been automatically generated by the +;; Atlantis world creator. + +define-item "Rope (20m)" + cost 5 + +define-item "Backpack" + cost 5 + +define-item "Knife" + cost 10 + +define-item "Short sword" + cost 40 + +define-item "Long sword" + cost 80 + +define-item "Dagger" + cost 20 + +define-item "Spear" + cost 25 + +define-item "Short bow" + cost 30 + +define-item "Longbow" + cost 60 + +define-item "Slingshot" + cost 15 + +define-item "Throwing knife" + cost 15 + +define-item "Quiver of arrows" + cost 20 + +define-item "Leather armour" + cost 60 + +define-item "Chain mail" + cost 120 + +define-item "Plate armour" + cost 200 + +define-item "Buckler" + cost 35 + +define-item "Full shield" + cost 45 + +define-item "Candles (3x)" + cost 5 + +define-item "Matches" + cost 1 + +define-item "Food rations (5x)" + cost 10 + +define-item "Grappling hook" + cost 15 + +define-item "Fishing net" + cost 25 + +define-item "Fishing rod" + cost 15 + +define-item "Tent (2 people)" + cost 30 + +define-item "Cloak" + cost 15 + +define-item "Hat" + cost 10 + +define-item "Water bottle" + cost 5 + +define-item "Compass" + cost 20 + +define-item "Quill and ink" + cost 5 + +define-item "Parchment" + cost 5 + +define-item "Blanket" + cost 5 + +define-item "Book of Legends" + cost 55 + +define-item "Book of Lore" + cost 55 + +define-item "Medicinal herbs" + cost 10 + +define-item "Bandages (3x)" + cost 5 + +define-item "Tea leaves" + cost 5 + +define-item "Sleeping potion" + cost 15 + +define-item "Leather pouch" + cost 2 + +define-item "Face mask" + cost 10 + +define-item "Dye" + cost 5 + +define-item "Cloth" + cost 5 + +define-item "Scissors" + cost 15 + +define-item "Needle and thread" + cost 3 + +define-item "Canvas" + cost 8 + +define-item "String" + cost 2 + +define-item "Hatchet" + cost 20 + +define-item "Map" + cost 35 + +define-item "Pony" + cost 100 + +define-item "Horse" + cost 180 + +define-item "Saddle and bridle" + cost 45 + +define-item "Saddlebag" + cost 35 + +define-item "Handmirror" + cost 20 + +define-item "Magnifying glass" + cost 20 + +define-item "Telescope" + cost 40 + +define-item "Rope ladder" + cost 15 + +define-item "Torches (3x)" + cost 10 + +define-item "Staff" + cost 10 + +define-item "Cooking pot" + cost 8 + +define-item "Soap" + cost 2 + +define-item "Towel" + cost 5 + +define-item "Boots" + cost 10 \ No newline at end of file diff --git a/ATL/dev/example.atl b/ATL/dev/example.atl new file mode 100644 index 0000000..3101edd --- /dev/null +++ b/ATL/dev/example.atl @@ -0,0 +1,72 @@ +# This is an example Atlantis file - I use it to explore what the language +# should end up looking like. + +load races.atl +load classes.atl + + +define-quest Kill hellhound + objective kill hellhound + reward gold 300 + + +define-spell Ray of death + type kill + min-intelligence 12 + success-rate 35 + + +define-npc Hades + say Oh, amazing, you actually got here! Who did you bribe? + sell 30 Ambrosia + quest Kill hellhound + + +define-item Scroll of light + value 80 + add-experience 20 + add-spell Ray of death + +define-item Ambrosia + category Food + add-health 5 + + +define-monster Hellhound + armor-class 8 + strength 10 + melee-weapon 2 claws + experience 50 + spawn 2 + aggression 60 + +define-monster Fury + armor-class 5 + strength 8 + melee-weapon 10 fire whip + experience 74 + spawn 0.8 + aggression 30 + + +define-place Nowhere + description Welcome to Nowhere! You are in the void, the space between \ +the worlds. Around you is black. Black, except for one tiny pin-prick of light \ +to the north. + neighbour Elysium + +define-place Elysium + description Congratulations! You have achieved Elysium! + neighbour Nowhere + neighbour Fields of punishment + npc Hades + item Scroll of light + +define-place Fields of punishment + description You really, really don't want to end up here... + neighbour Elysium + monster Hellhound + monster Fury + + +start-place Elysium \ No newline at end of file diff --git a/ATL/dev/game-objects.atl b/ATL/dev/game-objects.atl new file mode 100644 index 0000000..0a219ea --- /dev/null +++ b/ATL/dev/game-objects.atl @@ -0,0 +1,58 @@ +; This module defines items, NPCs, monsters and weapons for my +; Atlantis test world. +; @author Daniel Vedder +; @date 02/06/2015 + +define-monster "Fury" + description "Hades' messengers, torturers, assassins. Beware!" + health 10 + dexterity 20 + strength 10 + aggression 30 + spawn 50 + armour-class 3 + weapon "fire-whip" + item "fire-whip" + +define-item "fire-whip" + description "A 10-foot long whip, blazing with magical fire" + cost 180 + weapon + +define-weapon "fire-whip" + description "A 10-foot long whip, blazing with magical fire" + type "whip" + damage 2 + +define-item "Anaklusmos" + description "Riptide, a sword for heroes!" + weapon + +define-item "Lightning bolt" + description "Zeus lightning bolt - the most powerful weapon of the universe!" + weapon + +define-weapon "Anaklusmos" + description "Riptide, a sword for heroes!" + type "sword" + damage 4 + +define-weapon "Lightning bolt" ; primarily for debugging + description "Zeus lightning bolt - the most powerful weapon of the universe!" + type "magic" + damage 40 + +define-npc "Hades" + description "Hades, Lord of the Dead!" + says "Beware, mortal - do not tempt me!" + +define-npc "Charon" + description "A robe-clad ghoul, dread ferryman of the Styx." + says "..." + +define-npc "Persephone" ;testing the shop system + description "Hades' beautiful wife, bringer of summer." + says "Welcome, my friend from the upper world!" + sells "Sleeping potion" + sells "Handmirror" + sells "Book of Lore" \ No newline at end of file diff --git a/ATL/Pooh/pooh.atl b/ATL/Pooh/pooh.atl index 181995f..b0498e3 100644 --- a/ATL/Pooh/pooh.atl +++ b/ATL/Pooh/pooh.atl @@ -14,3 +14,7 @@ define-player "Winnie the Pooh" description "A small but very lovable bear of very little brain." place "Pooh's home" + +define-player "Christopher Robin" + description "Pooh's best friend." + place "Western woods" diff --git a/ATL/dev/creator-test.atl b/ATL/dev/creator-test.atl new file mode 100644 index 0000000..6209e7c --- /dev/null +++ b/ATL/dev/creator-test.atl @@ -0,0 +1,185 @@ +;; This code has been automatically generated by the +;; Atlantis world creator. + +define-item "Rope (20m)" + cost 5 + +define-item "Backpack" + cost 5 + +define-item "Knife" + cost 10 + +define-item "Short sword" + cost 40 + +define-item "Long sword" + cost 80 + +define-item "Dagger" + cost 20 + +define-item "Spear" + cost 25 + +define-item "Short bow" + cost 30 + +define-item "Longbow" + cost 60 + +define-item "Slingshot" + cost 15 + +define-item "Throwing knife" + cost 15 + +define-item "Quiver of arrows" + cost 20 + +define-item "Leather armour" + cost 60 + +define-item "Chain mail" + cost 120 + +define-item "Plate armour" + cost 200 + +define-item "Buckler" + cost 35 + +define-item "Full shield" + cost 45 + +define-item "Candles (3x)" + cost 5 + +define-item "Matches" + cost 1 + +define-item "Food rations (5x)" + cost 10 + +define-item "Grappling hook" + cost 15 + +define-item "Fishing net" + cost 25 + +define-item "Fishing rod" + cost 15 + +define-item "Tent (2 people)" + cost 30 + +define-item "Cloak" + cost 15 + +define-item "Hat" + cost 10 + +define-item "Water bottle" + cost 5 + +define-item "Compass" + cost 20 + +define-item "Quill and ink" + cost 5 + +define-item "Parchment" + cost 5 + +define-item "Blanket" + cost 5 + +define-item "Book of Legends" + cost 55 + +define-item "Book of Lore" + cost 55 + +define-item "Medicinal herbs" + cost 10 + +define-item "Bandages (3x)" + cost 5 + +define-item "Tea leaves" + cost 5 + +define-item "Sleeping potion" + cost 15 + +define-item "Leather pouch" + cost 2 + +define-item "Face mask" + cost 10 + +define-item "Dye" + cost 5 + +define-item "Cloth" + cost 5 + +define-item "Scissors" + cost 15 + +define-item "Needle and thread" + cost 3 + +define-item "Canvas" + cost 8 + +define-item "String" + cost 2 + +define-item "Hatchet" + cost 20 + +define-item "Map" + cost 35 + +define-item "Pony" + cost 100 + +define-item "Horse" + cost 180 + +define-item "Saddle and bridle" + cost 45 + +define-item "Saddlebag" + cost 35 + +define-item "Handmirror" + cost 20 + +define-item "Magnifying glass" + cost 20 + +define-item "Telescope" + cost 40 + +define-item "Rope ladder" + cost 15 + +define-item "Torches (3x)" + cost 10 + +define-item "Staff" + cost 10 + +define-item "Cooking pot" + cost 8 + +define-item "Soap" + cost 2 + +define-item "Towel" + cost 5 + +define-item "Boots" + cost 10 \ No newline at end of file diff --git a/ATL/dev/example.atl b/ATL/dev/example.atl new file mode 100644 index 0000000..3101edd --- /dev/null +++ b/ATL/dev/example.atl @@ -0,0 +1,72 @@ +# This is an example Atlantis file - I use it to explore what the language +# should end up looking like. + +load races.atl +load classes.atl + + +define-quest Kill hellhound + objective kill hellhound + reward gold 300 + + +define-spell Ray of death + type kill + min-intelligence 12 + success-rate 35 + + +define-npc Hades + say Oh, amazing, you actually got here! Who did you bribe? + sell 30 Ambrosia + quest Kill hellhound + + +define-item Scroll of light + value 80 + add-experience 20 + add-spell Ray of death + +define-item Ambrosia + category Food + add-health 5 + + +define-monster Hellhound + armor-class 8 + strength 10 + melee-weapon 2 claws + experience 50 + spawn 2 + aggression 60 + +define-monster Fury + armor-class 5 + strength 8 + melee-weapon 10 fire whip + experience 74 + spawn 0.8 + aggression 30 + + +define-place Nowhere + description Welcome to Nowhere! You are in the void, the space between \ +the worlds. Around you is black. Black, except for one tiny pin-prick of light \ +to the north. + neighbour Elysium + +define-place Elysium + description Congratulations! You have achieved Elysium! + neighbour Nowhere + neighbour Fields of punishment + npc Hades + item Scroll of light + +define-place Fields of punishment + description You really, really don't want to end up here... + neighbour Elysium + monster Hellhound + monster Fury + + +start-place Elysium \ No newline at end of file diff --git a/ATL/dev/game-objects.atl b/ATL/dev/game-objects.atl new file mode 100644 index 0000000..0a219ea --- /dev/null +++ b/ATL/dev/game-objects.atl @@ -0,0 +1,58 @@ +; This module defines items, NPCs, monsters and weapons for my +; Atlantis test world. +; @author Daniel Vedder +; @date 02/06/2015 + +define-monster "Fury" + description "Hades' messengers, torturers, assassins. Beware!" + health 10 + dexterity 20 + strength 10 + aggression 30 + spawn 50 + armour-class 3 + weapon "fire-whip" + item "fire-whip" + +define-item "fire-whip" + description "A 10-foot long whip, blazing with magical fire" + cost 180 + weapon + +define-weapon "fire-whip" + description "A 10-foot long whip, blazing with magical fire" + type "whip" + damage 2 + +define-item "Anaklusmos" + description "Riptide, a sword for heroes!" + weapon + +define-item "Lightning bolt" + description "Zeus lightning bolt - the most powerful weapon of the universe!" + weapon + +define-weapon "Anaklusmos" + description "Riptide, a sword for heroes!" + type "sword" + damage 4 + +define-weapon "Lightning bolt" ; primarily for debugging + description "Zeus lightning bolt - the most powerful weapon of the universe!" + type "magic" + damage 40 + +define-npc "Hades" + description "Hades, Lord of the Dead!" + says "Beware, mortal - do not tempt me!" + +define-npc "Charon" + description "A robe-clad ghoul, dread ferryman of the Styx." + says "..." + +define-npc "Persephone" ;testing the shop system + description "Hades' beautiful wife, bringer of summer." + says "Welcome, my friend from the upper world!" + sells "Sleeping potion" + sells "Handmirror" + sells "Book of Lore" \ No newline at end of file diff --git a/ATL/dev/lisp-test.atl b/ATL/dev/lisp-test.atl new file mode 100644 index 0000000..c27ec79 --- /dev/null +++ b/ATL/dev/lisp-test.atl @@ -0,0 +1,53 @@ +; This is a simple ATL file to test whatever I have implemented so far. +; @author Daniel Vedder +; @date 04/05/2015 + +name-world "Underworld" + +define-player "Start" + money 200 + place "Fields of Punishment" + max-health 50 + health 50 + +define-place "Nowhere" + description "Welcome to Nowhere! +You are in the void, the space between the worlds. Around you is black. +Black, except for one tiny pin-prick of light to the north." + neighbour "Styx" + dark + +define-place "Elysium" + description "This is where you want to be when you are six feet under..." + neighbour "Styx" + neighbour "Fields of Punishment" + neighbour "Fields of Asphodel" + npc "Persephone" + +define-place "Fields of Punishment" + description "Precisely where you do NOT want to end up..." + neighbour "Styx" + neighbour "Elysium" + neighbour "Fields of Asphodel" + monster "Fury" + spawns "Fury" + +define-place "Fields of Asphodel" + description "Nothing special. Really, nothing special at all. +Just a whole load of dead people..." + neighbour "Fields of Punishment" + neighbour "Elysium" + npc "Hades" + +define-place "Styx" + description "The great river that all must cross - but woe to those who do!" + neighbour "Fields of Punishment" + neighbour "Elysium" + neighbour "Nowhere" + item "Anaklusmos" + npc "Charon" + +load-file lisp-test.atl ;Testing whether recursive loading is prevented +load-file races-classes.atl +load-file game-objects.atl +load-file creator-test.atl diff --git a/ATL/Pooh/pooh.atl b/ATL/Pooh/pooh.atl index 181995f..b0498e3 100644 --- a/ATL/Pooh/pooh.atl +++ b/ATL/Pooh/pooh.atl @@ -14,3 +14,7 @@ define-player "Winnie the Pooh" description "A small but very lovable bear of very little brain." place "Pooh's home" + +define-player "Christopher Robin" + description "Pooh's best friend." + place "Western woods" diff --git a/ATL/dev/creator-test.atl b/ATL/dev/creator-test.atl new file mode 100644 index 0000000..6209e7c --- /dev/null +++ b/ATL/dev/creator-test.atl @@ -0,0 +1,185 @@ +;; This code has been automatically generated by the +;; Atlantis world creator. + +define-item "Rope (20m)" + cost 5 + +define-item "Backpack" + cost 5 + +define-item "Knife" + cost 10 + +define-item "Short sword" + cost 40 + +define-item "Long sword" + cost 80 + +define-item "Dagger" + cost 20 + +define-item "Spear" + cost 25 + +define-item "Short bow" + cost 30 + +define-item "Longbow" + cost 60 + +define-item "Slingshot" + cost 15 + +define-item "Throwing knife" + cost 15 + +define-item "Quiver of arrows" + cost 20 + +define-item "Leather armour" + cost 60 + +define-item "Chain mail" + cost 120 + +define-item "Plate armour" + cost 200 + +define-item "Buckler" + cost 35 + +define-item "Full shield" + cost 45 + +define-item "Candles (3x)" + cost 5 + +define-item "Matches" + cost 1 + +define-item "Food rations (5x)" + cost 10 + +define-item "Grappling hook" + cost 15 + +define-item "Fishing net" + cost 25 + +define-item "Fishing rod" + cost 15 + +define-item "Tent (2 people)" + cost 30 + +define-item "Cloak" + cost 15 + +define-item "Hat" + cost 10 + +define-item "Water bottle" + cost 5 + +define-item "Compass" + cost 20 + +define-item "Quill and ink" + cost 5 + +define-item "Parchment" + cost 5 + +define-item "Blanket" + cost 5 + +define-item "Book of Legends" + cost 55 + +define-item "Book of Lore" + cost 55 + +define-item "Medicinal herbs" + cost 10 + +define-item "Bandages (3x)" + cost 5 + +define-item "Tea leaves" + cost 5 + +define-item "Sleeping potion" + cost 15 + +define-item "Leather pouch" + cost 2 + +define-item "Face mask" + cost 10 + +define-item "Dye" + cost 5 + +define-item "Cloth" + cost 5 + +define-item "Scissors" + cost 15 + +define-item "Needle and thread" + cost 3 + +define-item "Canvas" + cost 8 + +define-item "String" + cost 2 + +define-item "Hatchet" + cost 20 + +define-item "Map" + cost 35 + +define-item "Pony" + cost 100 + +define-item "Horse" + cost 180 + +define-item "Saddle and bridle" + cost 45 + +define-item "Saddlebag" + cost 35 + +define-item "Handmirror" + cost 20 + +define-item "Magnifying glass" + cost 20 + +define-item "Telescope" + cost 40 + +define-item "Rope ladder" + cost 15 + +define-item "Torches (3x)" + cost 10 + +define-item "Staff" + cost 10 + +define-item "Cooking pot" + cost 8 + +define-item "Soap" + cost 2 + +define-item "Towel" + cost 5 + +define-item "Boots" + cost 10 \ No newline at end of file diff --git a/ATL/dev/example.atl b/ATL/dev/example.atl new file mode 100644 index 0000000..3101edd --- /dev/null +++ b/ATL/dev/example.atl @@ -0,0 +1,72 @@ +# This is an example Atlantis file - I use it to explore what the language +# should end up looking like. + +load races.atl +load classes.atl + + +define-quest Kill hellhound + objective kill hellhound + reward gold 300 + + +define-spell Ray of death + type kill + min-intelligence 12 + success-rate 35 + + +define-npc Hades + say Oh, amazing, you actually got here! Who did you bribe? + sell 30 Ambrosia + quest Kill hellhound + + +define-item Scroll of light + value 80 + add-experience 20 + add-spell Ray of death + +define-item Ambrosia + category Food + add-health 5 + + +define-monster Hellhound + armor-class 8 + strength 10 + melee-weapon 2 claws + experience 50 + spawn 2 + aggression 60 + +define-monster Fury + armor-class 5 + strength 8 + melee-weapon 10 fire whip + experience 74 + spawn 0.8 + aggression 30 + + +define-place Nowhere + description Welcome to Nowhere! You are in the void, the space between \ +the worlds. Around you is black. Black, except for one tiny pin-prick of light \ +to the north. + neighbour Elysium + +define-place Elysium + description Congratulations! You have achieved Elysium! + neighbour Nowhere + neighbour Fields of punishment + npc Hades + item Scroll of light + +define-place Fields of punishment + description You really, really don't want to end up here... + neighbour Elysium + monster Hellhound + monster Fury + + +start-place Elysium \ No newline at end of file diff --git a/ATL/dev/game-objects.atl b/ATL/dev/game-objects.atl new file mode 100644 index 0000000..0a219ea --- /dev/null +++ b/ATL/dev/game-objects.atl @@ -0,0 +1,58 @@ +; This module defines items, NPCs, monsters and weapons for my +; Atlantis test world. +; @author Daniel Vedder +; @date 02/06/2015 + +define-monster "Fury" + description "Hades' messengers, torturers, assassins. Beware!" + health 10 + dexterity 20 + strength 10 + aggression 30 + spawn 50 + armour-class 3 + weapon "fire-whip" + item "fire-whip" + +define-item "fire-whip" + description "A 10-foot long whip, blazing with magical fire" + cost 180 + weapon + +define-weapon "fire-whip" + description "A 10-foot long whip, blazing with magical fire" + type "whip" + damage 2 + +define-item "Anaklusmos" + description "Riptide, a sword for heroes!" + weapon + +define-item "Lightning bolt" + description "Zeus lightning bolt - the most powerful weapon of the universe!" + weapon + +define-weapon "Anaklusmos" + description "Riptide, a sword for heroes!" + type "sword" + damage 4 + +define-weapon "Lightning bolt" ; primarily for debugging + description "Zeus lightning bolt - the most powerful weapon of the universe!" + type "magic" + damage 40 + +define-npc "Hades" + description "Hades, Lord of the Dead!" + says "Beware, mortal - do not tempt me!" + +define-npc "Charon" + description "A robe-clad ghoul, dread ferryman of the Styx." + says "..." + +define-npc "Persephone" ;testing the shop system + description "Hades' beautiful wife, bringer of summer." + says "Welcome, my friend from the upper world!" + sells "Sleeping potion" + sells "Handmirror" + sells "Book of Lore" \ No newline at end of file diff --git a/ATL/dev/lisp-test.atl b/ATL/dev/lisp-test.atl new file mode 100644 index 0000000..c27ec79 --- /dev/null +++ b/ATL/dev/lisp-test.atl @@ -0,0 +1,53 @@ +; This is a simple ATL file to test whatever I have implemented so far. +; @author Daniel Vedder +; @date 04/05/2015 + +name-world "Underworld" + +define-player "Start" + money 200 + place "Fields of Punishment" + max-health 50 + health 50 + +define-place "Nowhere" + description "Welcome to Nowhere! +You are in the void, the space between the worlds. Around you is black. +Black, except for one tiny pin-prick of light to the north." + neighbour "Styx" + dark + +define-place "Elysium" + description "This is where you want to be when you are six feet under..." + neighbour "Styx" + neighbour "Fields of Punishment" + neighbour "Fields of Asphodel" + npc "Persephone" + +define-place "Fields of Punishment" + description "Precisely where you do NOT want to end up..." + neighbour "Styx" + neighbour "Elysium" + neighbour "Fields of Asphodel" + monster "Fury" + spawns "Fury" + +define-place "Fields of Asphodel" + description "Nothing special. Really, nothing special at all. +Just a whole load of dead people..." + neighbour "Fields of Punishment" + neighbour "Elysium" + npc "Hades" + +define-place "Styx" + description "The great river that all must cross - but woe to those who do!" + neighbour "Fields of Punishment" + neighbour "Elysium" + neighbour "Nowhere" + item "Anaklusmos" + npc "Charon" + +load-file lisp-test.atl ;Testing whether recursive loading is prevented +load-file races-classes.atl +load-file game-objects.atl +load-file creator-test.atl diff --git a/ATL/dev/races-classes.atl b/ATL/dev/races-classes.atl new file mode 100644 index 0000000..659310f --- /dev/null +++ b/ATL/dev/races-classes.atl @@ -0,0 +1,40 @@ +; A file to define all the races and character classes in my test world. +; @author Daniel Vedder +; @date 18/05/2015 + +;;; RACES + +define-race "Elf" + description "The oldest and wisest race of Middle Earth" + +define-race "Dwarf" + description "Sons of the Earth, descendants of Durin" + +define-race "Hobbit" + description "Peace-loving and kind, true gentlemen" + +define-race "Human" + description "Boring, exciting, ever-changing, never-changing man..." + + +;;; CLASSES + +define-class "Warrior" + description "Fighting as a passion!" + special-item "Sword" + +define-class "Wizard" + description "Ancient, powerful, keepers of the Knowledge..." + special-item "staff" + +define-class "Burglar" + description "Breaking and entering taken to the max!" + special-item "lockpick" + special-item "torch" + +define-class "Craftsman" + description "Maker of all things beautiful and useful" + special-item "hammer" + +load-file lisp-test.atl ;Again, a test for recursive loading +load-file test-extension.lisp ;Testing whether Lisp extensions are loaded \ No newline at end of file diff --git a/ATL/Pooh/pooh.atl b/ATL/Pooh/pooh.atl index 181995f..b0498e3 100644 --- a/ATL/Pooh/pooh.atl +++ b/ATL/Pooh/pooh.atl @@ -14,3 +14,7 @@ define-player "Winnie the Pooh" description "A small but very lovable bear of very little brain." place "Pooh's home" + +define-player "Christopher Robin" + description "Pooh's best friend." + place "Western woods" diff --git a/ATL/dev/creator-test.atl b/ATL/dev/creator-test.atl new file mode 100644 index 0000000..6209e7c --- /dev/null +++ b/ATL/dev/creator-test.atl @@ -0,0 +1,185 @@ +;; This code has been automatically generated by the +;; Atlantis world creator. + +define-item "Rope (20m)" + cost 5 + +define-item "Backpack" + cost 5 + +define-item "Knife" + cost 10 + +define-item "Short sword" + cost 40 + +define-item "Long sword" + cost 80 + +define-item "Dagger" + cost 20 + +define-item "Spear" + cost 25 + +define-item "Short bow" + cost 30 + +define-item "Longbow" + cost 60 + +define-item "Slingshot" + cost 15 + +define-item "Throwing knife" + cost 15 + +define-item "Quiver of arrows" + cost 20 + +define-item "Leather armour" + cost 60 + +define-item "Chain mail" + cost 120 + +define-item "Plate armour" + cost 200 + +define-item "Buckler" + cost 35 + +define-item "Full shield" + cost 45 + +define-item "Candles (3x)" + cost 5 + +define-item "Matches" + cost 1 + +define-item "Food rations (5x)" + cost 10 + +define-item "Grappling hook" + cost 15 + +define-item "Fishing net" + cost 25 + +define-item "Fishing rod" + cost 15 + +define-item "Tent (2 people)" + cost 30 + +define-item "Cloak" + cost 15 + +define-item "Hat" + cost 10 + +define-item "Water bottle" + cost 5 + +define-item "Compass" + cost 20 + +define-item "Quill and ink" + cost 5 + +define-item "Parchment" + cost 5 + +define-item "Blanket" + cost 5 + +define-item "Book of Legends" + cost 55 + +define-item "Book of Lore" + cost 55 + +define-item "Medicinal herbs" + cost 10 + +define-item "Bandages (3x)" + cost 5 + +define-item "Tea leaves" + cost 5 + +define-item "Sleeping potion" + cost 15 + +define-item "Leather pouch" + cost 2 + +define-item "Face mask" + cost 10 + +define-item "Dye" + cost 5 + +define-item "Cloth" + cost 5 + +define-item "Scissors" + cost 15 + +define-item "Needle and thread" + cost 3 + +define-item "Canvas" + cost 8 + +define-item "String" + cost 2 + +define-item "Hatchet" + cost 20 + +define-item "Map" + cost 35 + +define-item "Pony" + cost 100 + +define-item "Horse" + cost 180 + +define-item "Saddle and bridle" + cost 45 + +define-item "Saddlebag" + cost 35 + +define-item "Handmirror" + cost 20 + +define-item "Magnifying glass" + cost 20 + +define-item "Telescope" + cost 40 + +define-item "Rope ladder" + cost 15 + +define-item "Torches (3x)" + cost 10 + +define-item "Staff" + cost 10 + +define-item "Cooking pot" + cost 8 + +define-item "Soap" + cost 2 + +define-item "Towel" + cost 5 + +define-item "Boots" + cost 10 \ No newline at end of file diff --git a/ATL/dev/example.atl b/ATL/dev/example.atl new file mode 100644 index 0000000..3101edd --- /dev/null +++ b/ATL/dev/example.atl @@ -0,0 +1,72 @@ +# This is an example Atlantis file - I use it to explore what the language +# should end up looking like. + +load races.atl +load classes.atl + + +define-quest Kill hellhound + objective kill hellhound + reward gold 300 + + +define-spell Ray of death + type kill + min-intelligence 12 + success-rate 35 + + +define-npc Hades + say Oh, amazing, you actually got here! Who did you bribe? + sell 30 Ambrosia + quest Kill hellhound + + +define-item Scroll of light + value 80 + add-experience 20 + add-spell Ray of death + +define-item Ambrosia + category Food + add-health 5 + + +define-monster Hellhound + armor-class 8 + strength 10 + melee-weapon 2 claws + experience 50 + spawn 2 + aggression 60 + +define-monster Fury + armor-class 5 + strength 8 + melee-weapon 10 fire whip + experience 74 + spawn 0.8 + aggression 30 + + +define-place Nowhere + description Welcome to Nowhere! You are in the void, the space between \ +the worlds. Around you is black. Black, except for one tiny pin-prick of light \ +to the north. + neighbour Elysium + +define-place Elysium + description Congratulations! You have achieved Elysium! + neighbour Nowhere + neighbour Fields of punishment + npc Hades + item Scroll of light + +define-place Fields of punishment + description You really, really don't want to end up here... + neighbour Elysium + monster Hellhound + monster Fury + + +start-place Elysium \ No newline at end of file diff --git a/ATL/dev/game-objects.atl b/ATL/dev/game-objects.atl new file mode 100644 index 0000000..0a219ea --- /dev/null +++ b/ATL/dev/game-objects.atl @@ -0,0 +1,58 @@ +; This module defines items, NPCs, monsters and weapons for my +; Atlantis test world. +; @author Daniel Vedder +; @date 02/06/2015 + +define-monster "Fury" + description "Hades' messengers, torturers, assassins. Beware!" + health 10 + dexterity 20 + strength 10 + aggression 30 + spawn 50 + armour-class 3 + weapon "fire-whip" + item "fire-whip" + +define-item "fire-whip" + description "A 10-foot long whip, blazing with magical fire" + cost 180 + weapon + +define-weapon "fire-whip" + description "A 10-foot long whip, blazing with magical fire" + type "whip" + damage 2 + +define-item "Anaklusmos" + description "Riptide, a sword for heroes!" + weapon + +define-item "Lightning bolt" + description "Zeus lightning bolt - the most powerful weapon of the universe!" + weapon + +define-weapon "Anaklusmos" + description "Riptide, a sword for heroes!" + type "sword" + damage 4 + +define-weapon "Lightning bolt" ; primarily for debugging + description "Zeus lightning bolt - the most powerful weapon of the universe!" + type "magic" + damage 40 + +define-npc "Hades" + description "Hades, Lord of the Dead!" + says "Beware, mortal - do not tempt me!" + +define-npc "Charon" + description "A robe-clad ghoul, dread ferryman of the Styx." + says "..." + +define-npc "Persephone" ;testing the shop system + description "Hades' beautiful wife, bringer of summer." + says "Welcome, my friend from the upper world!" + sells "Sleeping potion" + sells "Handmirror" + sells "Book of Lore" \ No newline at end of file diff --git a/ATL/dev/lisp-test.atl b/ATL/dev/lisp-test.atl new file mode 100644 index 0000000..c27ec79 --- /dev/null +++ b/ATL/dev/lisp-test.atl @@ -0,0 +1,53 @@ +; This is a simple ATL file to test whatever I have implemented so far. +; @author Daniel Vedder +; @date 04/05/2015 + +name-world "Underworld" + +define-player "Start" + money 200 + place "Fields of Punishment" + max-health 50 + health 50 + +define-place "Nowhere" + description "Welcome to Nowhere! +You are in the void, the space between the worlds. Around you is black. +Black, except for one tiny pin-prick of light to the north." + neighbour "Styx" + dark + +define-place "Elysium" + description "This is where you want to be when you are six feet under..." + neighbour "Styx" + neighbour "Fields of Punishment" + neighbour "Fields of Asphodel" + npc "Persephone" + +define-place "Fields of Punishment" + description "Precisely where you do NOT want to end up..." + neighbour "Styx" + neighbour "Elysium" + neighbour "Fields of Asphodel" + monster "Fury" + spawns "Fury" + +define-place "Fields of Asphodel" + description "Nothing special. Really, nothing special at all. +Just a whole load of dead people..." + neighbour "Fields of Punishment" + neighbour "Elysium" + npc "Hades" + +define-place "Styx" + description "The great river that all must cross - but woe to those who do!" + neighbour "Fields of Punishment" + neighbour "Elysium" + neighbour "Nowhere" + item "Anaklusmos" + npc "Charon" + +load-file lisp-test.atl ;Testing whether recursive loading is prevented +load-file races-classes.atl +load-file game-objects.atl +load-file creator-test.atl diff --git a/ATL/dev/races-classes.atl b/ATL/dev/races-classes.atl new file mode 100644 index 0000000..659310f --- /dev/null +++ b/ATL/dev/races-classes.atl @@ -0,0 +1,40 @@ +; A file to define all the races and character classes in my test world. +; @author Daniel Vedder +; @date 18/05/2015 + +;;; RACES + +define-race "Elf" + description "The oldest and wisest race of Middle Earth" + +define-race "Dwarf" + description "Sons of the Earth, descendants of Durin" + +define-race "Hobbit" + description "Peace-loving and kind, true gentlemen" + +define-race "Human" + description "Boring, exciting, ever-changing, never-changing man..." + + +;;; CLASSES + +define-class "Warrior" + description "Fighting as a passion!" + special-item "Sword" + +define-class "Wizard" + description "Ancient, powerful, keepers of the Knowledge..." + special-item "staff" + +define-class "Burglar" + description "Breaking and entering taken to the max!" + special-item "lockpick" + special-item "torch" + +define-class "Craftsman" + description "Maker of all things beautiful and useful" + special-item "hammer" + +load-file lisp-test.atl ;Again, a test for recursive loading +load-file test-extension.lisp ;Testing whether Lisp extensions are loaded \ No newline at end of file diff --git a/ATL/dev/test-extension.lisp b/ATL/dev/test-extension.lisp new file mode 100644 index 0000000..f01660a --- /dev/null +++ b/ATL/dev/test-extension.lisp @@ -0,0 +1,5 @@ +;; This file tests whether the interpreter loads Lisp files correctly. +;; author: Daniel Vedder +;; date: 21/05/2015 + +(debugging "~&Loaded Lisp extension file.") diff --git a/ATL/Pooh/pooh.atl b/ATL/Pooh/pooh.atl index 181995f..b0498e3 100644 --- a/ATL/Pooh/pooh.atl +++ b/ATL/Pooh/pooh.atl @@ -14,3 +14,7 @@ define-player "Winnie the Pooh" description "A small but very lovable bear of very little brain." place "Pooh's home" + +define-player "Christopher Robin" + description "Pooh's best friend." + place "Western woods" diff --git a/ATL/dev/creator-test.atl b/ATL/dev/creator-test.atl new file mode 100644 index 0000000..6209e7c --- /dev/null +++ b/ATL/dev/creator-test.atl @@ -0,0 +1,185 @@ +;; This code has been automatically generated by the +;; Atlantis world creator. + +define-item "Rope (20m)" + cost 5 + +define-item "Backpack" + cost 5 + +define-item "Knife" + cost 10 + +define-item "Short sword" + cost 40 + +define-item "Long sword" + cost 80 + +define-item "Dagger" + cost 20 + +define-item "Spear" + cost 25 + +define-item "Short bow" + cost 30 + +define-item "Longbow" + cost 60 + +define-item "Slingshot" + cost 15 + +define-item "Throwing knife" + cost 15 + +define-item "Quiver of arrows" + cost 20 + +define-item "Leather armour" + cost 60 + +define-item "Chain mail" + cost 120 + +define-item "Plate armour" + cost 200 + +define-item "Buckler" + cost 35 + +define-item "Full shield" + cost 45 + +define-item "Candles (3x)" + cost 5 + +define-item "Matches" + cost 1 + +define-item "Food rations (5x)" + cost 10 + +define-item "Grappling hook" + cost 15 + +define-item "Fishing net" + cost 25 + +define-item "Fishing rod" + cost 15 + +define-item "Tent (2 people)" + cost 30 + +define-item "Cloak" + cost 15 + +define-item "Hat" + cost 10 + +define-item "Water bottle" + cost 5 + +define-item "Compass" + cost 20 + +define-item "Quill and ink" + cost 5 + +define-item "Parchment" + cost 5 + +define-item "Blanket" + cost 5 + +define-item "Book of Legends" + cost 55 + +define-item "Book of Lore" + cost 55 + +define-item "Medicinal herbs" + cost 10 + +define-item "Bandages (3x)" + cost 5 + +define-item "Tea leaves" + cost 5 + +define-item "Sleeping potion" + cost 15 + +define-item "Leather pouch" + cost 2 + +define-item "Face mask" + cost 10 + +define-item "Dye" + cost 5 + +define-item "Cloth" + cost 5 + +define-item "Scissors" + cost 15 + +define-item "Needle and thread" + cost 3 + +define-item "Canvas" + cost 8 + +define-item "String" + cost 2 + +define-item "Hatchet" + cost 20 + +define-item "Map" + cost 35 + +define-item "Pony" + cost 100 + +define-item "Horse" + cost 180 + +define-item "Saddle and bridle" + cost 45 + +define-item "Saddlebag" + cost 35 + +define-item "Handmirror" + cost 20 + +define-item "Magnifying glass" + cost 20 + +define-item "Telescope" + cost 40 + +define-item "Rope ladder" + cost 15 + +define-item "Torches (3x)" + cost 10 + +define-item "Staff" + cost 10 + +define-item "Cooking pot" + cost 8 + +define-item "Soap" + cost 2 + +define-item "Towel" + cost 5 + +define-item "Boots" + cost 10 \ No newline at end of file diff --git a/ATL/dev/example.atl b/ATL/dev/example.atl new file mode 100644 index 0000000..3101edd --- /dev/null +++ b/ATL/dev/example.atl @@ -0,0 +1,72 @@ +# This is an example Atlantis file - I use it to explore what the language +# should end up looking like. + +load races.atl +load classes.atl + + +define-quest Kill hellhound + objective kill hellhound + reward gold 300 + + +define-spell Ray of death + type kill + min-intelligence 12 + success-rate 35 + + +define-npc Hades + say Oh, amazing, you actually got here! Who did you bribe? + sell 30 Ambrosia + quest Kill hellhound + + +define-item Scroll of light + value 80 + add-experience 20 + add-spell Ray of death + +define-item Ambrosia + category Food + add-health 5 + + +define-monster Hellhound + armor-class 8 + strength 10 + melee-weapon 2 claws + experience 50 + spawn 2 + aggression 60 + +define-monster Fury + armor-class 5 + strength 8 + melee-weapon 10 fire whip + experience 74 + spawn 0.8 + aggression 30 + + +define-place Nowhere + description Welcome to Nowhere! You are in the void, the space between \ +the worlds. Around you is black. Black, except for one tiny pin-prick of light \ +to the north. + neighbour Elysium + +define-place Elysium + description Congratulations! You have achieved Elysium! + neighbour Nowhere + neighbour Fields of punishment + npc Hades + item Scroll of light + +define-place Fields of punishment + description You really, really don't want to end up here... + neighbour Elysium + monster Hellhound + monster Fury + + +start-place Elysium \ No newline at end of file diff --git a/ATL/dev/game-objects.atl b/ATL/dev/game-objects.atl new file mode 100644 index 0000000..0a219ea --- /dev/null +++ b/ATL/dev/game-objects.atl @@ -0,0 +1,58 @@ +; This module defines items, NPCs, monsters and weapons for my +; Atlantis test world. +; @author Daniel Vedder +; @date 02/06/2015 + +define-monster "Fury" + description "Hades' messengers, torturers, assassins. Beware!" + health 10 + dexterity 20 + strength 10 + aggression 30 + spawn 50 + armour-class 3 + weapon "fire-whip" + item "fire-whip" + +define-item "fire-whip" + description "A 10-foot long whip, blazing with magical fire" + cost 180 + weapon + +define-weapon "fire-whip" + description "A 10-foot long whip, blazing with magical fire" + type "whip" + damage 2 + +define-item "Anaklusmos" + description "Riptide, a sword for heroes!" + weapon + +define-item "Lightning bolt" + description "Zeus lightning bolt - the most powerful weapon of the universe!" + weapon + +define-weapon "Anaklusmos" + description "Riptide, a sword for heroes!" + type "sword" + damage 4 + +define-weapon "Lightning bolt" ; primarily for debugging + description "Zeus lightning bolt - the most powerful weapon of the universe!" + type "magic" + damage 40 + +define-npc "Hades" + description "Hades, Lord of the Dead!" + says "Beware, mortal - do not tempt me!" + +define-npc "Charon" + description "A robe-clad ghoul, dread ferryman of the Styx." + says "..." + +define-npc "Persephone" ;testing the shop system + description "Hades' beautiful wife, bringer of summer." + says "Welcome, my friend from the upper world!" + sells "Sleeping potion" + sells "Handmirror" + sells "Book of Lore" \ No newline at end of file diff --git a/ATL/dev/lisp-test.atl b/ATL/dev/lisp-test.atl new file mode 100644 index 0000000..c27ec79 --- /dev/null +++ b/ATL/dev/lisp-test.atl @@ -0,0 +1,53 @@ +; This is a simple ATL file to test whatever I have implemented so far. +; @author Daniel Vedder +; @date 04/05/2015 + +name-world "Underworld" + +define-player "Start" + money 200 + place "Fields of Punishment" + max-health 50 + health 50 + +define-place "Nowhere" + description "Welcome to Nowhere! +You are in the void, the space between the worlds. Around you is black. +Black, except for one tiny pin-prick of light to the north." + neighbour "Styx" + dark + +define-place "Elysium" + description "This is where you want to be when you are six feet under..." + neighbour "Styx" + neighbour "Fields of Punishment" + neighbour "Fields of Asphodel" + npc "Persephone" + +define-place "Fields of Punishment" + description "Precisely where you do NOT want to end up..." + neighbour "Styx" + neighbour "Elysium" + neighbour "Fields of Asphodel" + monster "Fury" + spawns "Fury" + +define-place "Fields of Asphodel" + description "Nothing special. Really, nothing special at all. +Just a whole load of dead people..." + neighbour "Fields of Punishment" + neighbour "Elysium" + npc "Hades" + +define-place "Styx" + description "The great river that all must cross - but woe to those who do!" + neighbour "Fields of Punishment" + neighbour "Elysium" + neighbour "Nowhere" + item "Anaklusmos" + npc "Charon" + +load-file lisp-test.atl ;Testing whether recursive loading is prevented +load-file races-classes.atl +load-file game-objects.atl +load-file creator-test.atl diff --git a/ATL/dev/races-classes.atl b/ATL/dev/races-classes.atl new file mode 100644 index 0000000..659310f --- /dev/null +++ b/ATL/dev/races-classes.atl @@ -0,0 +1,40 @@ +; A file to define all the races and character classes in my test world. +; @author Daniel Vedder +; @date 18/05/2015 + +;;; RACES + +define-race "Elf" + description "The oldest and wisest race of Middle Earth" + +define-race "Dwarf" + description "Sons of the Earth, descendants of Durin" + +define-race "Hobbit" + description "Peace-loving and kind, true gentlemen" + +define-race "Human" + description "Boring, exciting, ever-changing, never-changing man..." + + +;;; CLASSES + +define-class "Warrior" + description "Fighting as a passion!" + special-item "Sword" + +define-class "Wizard" + description "Ancient, powerful, keepers of the Knowledge..." + special-item "staff" + +define-class "Burglar" + description "Breaking and entering taken to the max!" + special-item "lockpick" + special-item "torch" + +define-class "Craftsman" + description "Maker of all things beautiful and useful" + special-item "hammer" + +load-file lisp-test.atl ;Again, a test for recursive loading +load-file test-extension.lisp ;Testing whether Lisp extensions are loaded \ No newline at end of file diff --git a/ATL/dev/test-extension.lisp b/ATL/dev/test-extension.lisp new file mode 100644 index 0000000..f01660a --- /dev/null +++ b/ATL/dev/test-extension.lisp @@ -0,0 +1,5 @@ +;; This file tests whether the interpreter loads Lisp files correctly. +;; author: Daniel Vedder +;; date: 21/05/2015 + +(debugging "~&Loaded Lisp extension file.") diff --git a/ATL/test/creator-test.atl b/ATL/test/creator-test.atl deleted file mode 100644 index 6209e7c..0000000 --- a/ATL/test/creator-test.atl +++ /dev/null @@ -1,185 +0,0 @@ -;; This code has been automatically generated by the -;; Atlantis world creator. - -define-item "Rope (20m)" - cost 5 - -define-item "Backpack" - cost 5 - -define-item "Knife" - cost 10 - -define-item "Short sword" - cost 40 - -define-item "Long sword" - cost 80 - -define-item "Dagger" - cost 20 - -define-item "Spear" - cost 25 - -define-item "Short bow" - cost 30 - -define-item "Longbow" - cost 60 - -define-item "Slingshot" - cost 15 - -define-item "Throwing knife" - cost 15 - -define-item "Quiver of arrows" - cost 20 - -define-item "Leather armour" - cost 60 - -define-item "Chain mail" - cost 120 - -define-item "Plate armour" - cost 200 - -define-item "Buckler" - cost 35 - -define-item "Full shield" - cost 45 - -define-item "Candles (3x)" - cost 5 - -define-item "Matches" - cost 1 - -define-item "Food rations (5x)" - cost 10 - -define-item "Grappling hook" - cost 15 - -define-item "Fishing net" - cost 25 - -define-item "Fishing rod" - cost 15 - -define-item "Tent (2 people)" - cost 30 - -define-item "Cloak" - cost 15 - -define-item "Hat" - cost 10 - -define-item "Water bottle" - cost 5 - -define-item "Compass" - cost 20 - -define-item "Quill and ink" - cost 5 - -define-item "Parchment" - cost 5 - -define-item "Blanket" - cost 5 - -define-item "Book of Legends" - cost 55 - -define-item "Book of Lore" - cost 55 - -define-item "Medicinal herbs" - cost 10 - -define-item "Bandages (3x)" - cost 5 - -define-item "Tea leaves" - cost 5 - -define-item "Sleeping potion" - cost 15 - -define-item "Leather pouch" - cost 2 - -define-item "Face mask" - cost 10 - -define-item "Dye" - cost 5 - -define-item "Cloth" - cost 5 - -define-item "Scissors" - cost 15 - -define-item "Needle and thread" - cost 3 - -define-item "Canvas" - cost 8 - -define-item "String" - cost 2 - -define-item "Hatchet" - cost 20 - -define-item "Map" - cost 35 - -define-item "Pony" - cost 100 - -define-item "Horse" - cost 180 - -define-item "Saddle and bridle" - cost 45 - -define-item "Saddlebag" - cost 35 - -define-item "Handmirror" - cost 20 - -define-item "Magnifying glass" - cost 20 - -define-item "Telescope" - cost 40 - -define-item "Rope ladder" - cost 15 - -define-item "Torches (3x)" - cost 10 - -define-item "Staff" - cost 10 - -define-item "Cooking pot" - cost 8 - -define-item "Soap" - cost 2 - -define-item "Towel" - cost 5 - -define-item "Boots" - cost 10 \ No newline at end of file diff --git a/ATL/Pooh/pooh.atl b/ATL/Pooh/pooh.atl index 181995f..b0498e3 100644 --- a/ATL/Pooh/pooh.atl +++ b/ATL/Pooh/pooh.atl @@ -14,3 +14,7 @@ define-player "Winnie the Pooh" description "A small but very lovable bear of very little brain." place "Pooh's home" + +define-player "Christopher Robin" + description "Pooh's best friend." + place "Western woods" diff --git a/ATL/dev/creator-test.atl b/ATL/dev/creator-test.atl new file mode 100644 index 0000000..6209e7c --- /dev/null +++ b/ATL/dev/creator-test.atl @@ -0,0 +1,185 @@ +;; This code has been automatically generated by the +;; Atlantis world creator. + +define-item "Rope (20m)" + cost 5 + +define-item "Backpack" + cost 5 + +define-item "Knife" + cost 10 + +define-item "Short sword" + cost 40 + +define-item "Long sword" + cost 80 + +define-item "Dagger" + cost 20 + +define-item "Spear" + cost 25 + +define-item "Short bow" + cost 30 + +define-item "Longbow" + cost 60 + +define-item "Slingshot" + cost 15 + +define-item "Throwing knife" + cost 15 + +define-item "Quiver of arrows" + cost 20 + +define-item "Leather armour" + cost 60 + +define-item "Chain mail" + cost 120 + +define-item "Plate armour" + cost 200 + +define-item "Buckler" + cost 35 + +define-item "Full shield" + cost 45 + +define-item "Candles (3x)" + cost 5 + +define-item "Matches" + cost 1 + +define-item "Food rations (5x)" + cost 10 + +define-item "Grappling hook" + cost 15 + +define-item "Fishing net" + cost 25 + +define-item "Fishing rod" + cost 15 + +define-item "Tent (2 people)" + cost 30 + +define-item "Cloak" + cost 15 + +define-item "Hat" + cost 10 + +define-item "Water bottle" + cost 5 + +define-item "Compass" + cost 20 + +define-item "Quill and ink" + cost 5 + +define-item "Parchment" + cost 5 + +define-item "Blanket" + cost 5 + +define-item "Book of Legends" + cost 55 + +define-item "Book of Lore" + cost 55 + +define-item "Medicinal herbs" + cost 10 + +define-item "Bandages (3x)" + cost 5 + +define-item "Tea leaves" + cost 5 + +define-item "Sleeping potion" + cost 15 + +define-item "Leather pouch" + cost 2 + +define-item "Face mask" + cost 10 + +define-item "Dye" + cost 5 + +define-item "Cloth" + cost 5 + +define-item "Scissors" + cost 15 + +define-item "Needle and thread" + cost 3 + +define-item "Canvas" + cost 8 + +define-item "String" + cost 2 + +define-item "Hatchet" + cost 20 + +define-item "Map" + cost 35 + +define-item "Pony" + cost 100 + +define-item "Horse" + cost 180 + +define-item "Saddle and bridle" + cost 45 + +define-item "Saddlebag" + cost 35 + +define-item "Handmirror" + cost 20 + +define-item "Magnifying glass" + cost 20 + +define-item "Telescope" + cost 40 + +define-item "Rope ladder" + cost 15 + +define-item "Torches (3x)" + cost 10 + +define-item "Staff" + cost 10 + +define-item "Cooking pot" + cost 8 + +define-item "Soap" + cost 2 + +define-item "Towel" + cost 5 + +define-item "Boots" + cost 10 \ No newline at end of file diff --git a/ATL/dev/example.atl b/ATL/dev/example.atl new file mode 100644 index 0000000..3101edd --- /dev/null +++ b/ATL/dev/example.atl @@ -0,0 +1,72 @@ +# This is an example Atlantis file - I use it to explore what the language +# should end up looking like. + +load races.atl +load classes.atl + + +define-quest Kill hellhound + objective kill hellhound + reward gold 300 + + +define-spell Ray of death + type kill + min-intelligence 12 + success-rate 35 + + +define-npc Hades + say Oh, amazing, you actually got here! Who did you bribe? + sell 30 Ambrosia + quest Kill hellhound + + +define-item Scroll of light + value 80 + add-experience 20 + add-spell Ray of death + +define-item Ambrosia + category Food + add-health 5 + + +define-monster Hellhound + armor-class 8 + strength 10 + melee-weapon 2 claws + experience 50 + spawn 2 + aggression 60 + +define-monster Fury + armor-class 5 + strength 8 + melee-weapon 10 fire whip + experience 74 + spawn 0.8 + aggression 30 + + +define-place Nowhere + description Welcome to Nowhere! You are in the void, the space between \ +the worlds. Around you is black. Black, except for one tiny pin-prick of light \ +to the north. + neighbour Elysium + +define-place Elysium + description Congratulations! You have achieved Elysium! + neighbour Nowhere + neighbour Fields of punishment + npc Hades + item Scroll of light + +define-place Fields of punishment + description You really, really don't want to end up here... + neighbour Elysium + monster Hellhound + monster Fury + + +start-place Elysium \ No newline at end of file diff --git a/ATL/dev/game-objects.atl b/ATL/dev/game-objects.atl new file mode 100644 index 0000000..0a219ea --- /dev/null +++ b/ATL/dev/game-objects.atl @@ -0,0 +1,58 @@ +; This module defines items, NPCs, monsters and weapons for my +; Atlantis test world. +; @author Daniel Vedder +; @date 02/06/2015 + +define-monster "Fury" + description "Hades' messengers, torturers, assassins. Beware!" + health 10 + dexterity 20 + strength 10 + aggression 30 + spawn 50 + armour-class 3 + weapon "fire-whip" + item "fire-whip" + +define-item "fire-whip" + description "A 10-foot long whip, blazing with magical fire" + cost 180 + weapon + +define-weapon "fire-whip" + description "A 10-foot long whip, blazing with magical fire" + type "whip" + damage 2 + +define-item "Anaklusmos" + description "Riptide, a sword for heroes!" + weapon + +define-item "Lightning bolt" + description "Zeus lightning bolt - the most powerful weapon of the universe!" + weapon + +define-weapon "Anaklusmos" + description "Riptide, a sword for heroes!" + type "sword" + damage 4 + +define-weapon "Lightning bolt" ; primarily for debugging + description "Zeus lightning bolt - the most powerful weapon of the universe!" + type "magic" + damage 40 + +define-npc "Hades" + description "Hades, Lord of the Dead!" + says "Beware, mortal - do not tempt me!" + +define-npc "Charon" + description "A robe-clad ghoul, dread ferryman of the Styx." + says "..." + +define-npc "Persephone" ;testing the shop system + description "Hades' beautiful wife, bringer of summer." + says "Welcome, my friend from the upper world!" + sells "Sleeping potion" + sells "Handmirror" + sells "Book of Lore" \ No newline at end of file diff --git a/ATL/dev/lisp-test.atl b/ATL/dev/lisp-test.atl new file mode 100644 index 0000000..c27ec79 --- /dev/null +++ b/ATL/dev/lisp-test.atl @@ -0,0 +1,53 @@ +; This is a simple ATL file to test whatever I have implemented so far. +; @author Daniel Vedder +; @date 04/05/2015 + +name-world "Underworld" + +define-player "Start" + money 200 + place "Fields of Punishment" + max-health 50 + health 50 + +define-place "Nowhere" + description "Welcome to Nowhere! +You are in the void, the space between the worlds. Around you is black. +Black, except for one tiny pin-prick of light to the north." + neighbour "Styx" + dark + +define-place "Elysium" + description "This is where you want to be when you are six feet under..." + neighbour "Styx" + neighbour "Fields of Punishment" + neighbour "Fields of Asphodel" + npc "Persephone" + +define-place "Fields of Punishment" + description "Precisely where you do NOT want to end up..." + neighbour "Styx" + neighbour "Elysium" + neighbour "Fields of Asphodel" + monster "Fury" + spawns "Fury" + +define-place "Fields of Asphodel" + description "Nothing special. Really, nothing special at all. +Just a whole load of dead people..." + neighbour "Fields of Punishment" + neighbour "Elysium" + npc "Hades" + +define-place "Styx" + description "The great river that all must cross - but woe to those who do!" + neighbour "Fields of Punishment" + neighbour "Elysium" + neighbour "Nowhere" + item "Anaklusmos" + npc "Charon" + +load-file lisp-test.atl ;Testing whether recursive loading is prevented +load-file races-classes.atl +load-file game-objects.atl +load-file creator-test.atl diff --git a/ATL/dev/races-classes.atl b/ATL/dev/races-classes.atl new file mode 100644 index 0000000..659310f --- /dev/null +++ b/ATL/dev/races-classes.atl @@ -0,0 +1,40 @@ +; A file to define all the races and character classes in my test world. +; @author Daniel Vedder +; @date 18/05/2015 + +;;; RACES + +define-race "Elf" + description "The oldest and wisest race of Middle Earth" + +define-race "Dwarf" + description "Sons of the Earth, descendants of Durin" + +define-race "Hobbit" + description "Peace-loving and kind, true gentlemen" + +define-race "Human" + description "Boring, exciting, ever-changing, never-changing man..." + + +;;; CLASSES + +define-class "Warrior" + description "Fighting as a passion!" + special-item "Sword" + +define-class "Wizard" + description "Ancient, powerful, keepers of the Knowledge..." + special-item "staff" + +define-class "Burglar" + description "Breaking and entering taken to the max!" + special-item "lockpick" + special-item "torch" + +define-class "Craftsman" + description "Maker of all things beautiful and useful" + special-item "hammer" + +load-file lisp-test.atl ;Again, a test for recursive loading +load-file test-extension.lisp ;Testing whether Lisp extensions are loaded \ No newline at end of file diff --git a/ATL/dev/test-extension.lisp b/ATL/dev/test-extension.lisp new file mode 100644 index 0000000..f01660a --- /dev/null +++ b/ATL/dev/test-extension.lisp @@ -0,0 +1,5 @@ +;; This file tests whether the interpreter loads Lisp files correctly. +;; author: Daniel Vedder +;; date: 21/05/2015 + +(debugging "~&Loaded Lisp extension file.") diff --git a/ATL/test/creator-test.atl b/ATL/test/creator-test.atl deleted file mode 100644 index 6209e7c..0000000 --- a/ATL/test/creator-test.atl +++ /dev/null @@ -1,185 +0,0 @@ -;; This code has been automatically generated by the -;; Atlantis world creator. - -define-item "Rope (20m)" - cost 5 - -define-item "Backpack" - cost 5 - -define-item "Knife" - cost 10 - -define-item "Short sword" - cost 40 - -define-item "Long sword" - cost 80 - -define-item "Dagger" - cost 20 - -define-item "Spear" - cost 25 - -define-item "Short bow" - cost 30 - -define-item "Longbow" - cost 60 - -define-item "Slingshot" - cost 15 - -define-item "Throwing knife" - cost 15 - -define-item "Quiver of arrows" - cost 20 - -define-item "Leather armour" - cost 60 - -define-item "Chain mail" - cost 120 - -define-item "Plate armour" - cost 200 - -define-item "Buckler" - cost 35 - -define-item "Full shield" - cost 45 - -define-item "Candles (3x)" - cost 5 - -define-item "Matches" - cost 1 - -define-item "Food rations (5x)" - cost 10 - -define-item "Grappling hook" - cost 15 - -define-item "Fishing net" - cost 25 - -define-item "Fishing rod" - cost 15 - -define-item "Tent (2 people)" - cost 30 - -define-item "Cloak" - cost 15 - -define-item "Hat" - cost 10 - -define-item "Water bottle" - cost 5 - -define-item "Compass" - cost 20 - -define-item "Quill and ink" - cost 5 - -define-item "Parchment" - cost 5 - -define-item "Blanket" - cost 5 - -define-item "Book of Legends" - cost 55 - -define-item "Book of Lore" - cost 55 - -define-item "Medicinal herbs" - cost 10 - -define-item "Bandages (3x)" - cost 5 - -define-item "Tea leaves" - cost 5 - -define-item "Sleeping potion" - cost 15 - -define-item "Leather pouch" - cost 2 - -define-item "Face mask" - cost 10 - -define-item "Dye" - cost 5 - -define-item "Cloth" - cost 5 - -define-item "Scissors" - cost 15 - -define-item "Needle and thread" - cost 3 - -define-item "Canvas" - cost 8 - -define-item "String" - cost 2 - -define-item "Hatchet" - cost 20 - -define-item "Map" - cost 35 - -define-item "Pony" - cost 100 - -define-item "Horse" - cost 180 - -define-item "Saddle and bridle" - cost 45 - -define-item "Saddlebag" - cost 35 - -define-item "Handmirror" - cost 20 - -define-item "Magnifying glass" - cost 20 - -define-item "Telescope" - cost 40 - -define-item "Rope ladder" - cost 15 - -define-item "Torches (3x)" - cost 10 - -define-item "Staff" - cost 10 - -define-item "Cooking pot" - cost 8 - -define-item "Soap" - cost 2 - -define-item "Towel" - cost 5 - -define-item "Boots" - cost 10 \ No newline at end of file diff --git a/ATL/test/example.atl b/ATL/test/example.atl deleted file mode 100644 index 3101edd..0000000 --- a/ATL/test/example.atl +++ /dev/null @@ -1,72 +0,0 @@ -# This is an example Atlantis file - I use it to explore what the language -# should end up looking like. - -load races.atl -load classes.atl - - -define-quest Kill hellhound - objective kill hellhound - reward gold 300 - - -define-spell Ray of death - type kill - min-intelligence 12 - success-rate 35 - - -define-npc Hades - say Oh, amazing, you actually got here! Who did you bribe? - sell 30 Ambrosia - quest Kill hellhound - - -define-item Scroll of light - value 80 - add-experience 20 - add-spell Ray of death - -define-item Ambrosia - category Food - add-health 5 - - -define-monster Hellhound - armor-class 8 - strength 10 - melee-weapon 2 claws - experience 50 - spawn 2 - aggression 60 - -define-monster Fury - armor-class 5 - strength 8 - melee-weapon 10 fire whip - experience 74 - spawn 0.8 - aggression 30 - - -define-place Nowhere - description Welcome to Nowhere! You are in the void, the space between \ -the worlds. Around you is black. Black, except for one tiny pin-prick of light \ -to the north. - neighbour Elysium - -define-place Elysium - description Congratulations! You have achieved Elysium! - neighbour Nowhere - neighbour Fields of punishment - npc Hades - item Scroll of light - -define-place Fields of punishment - description You really, really don't want to end up here... - neighbour Elysium - monster Hellhound - monster Fury - - -start-place Elysium \ No newline at end of file diff --git a/ATL/Pooh/pooh.atl b/ATL/Pooh/pooh.atl index 181995f..b0498e3 100644 --- a/ATL/Pooh/pooh.atl +++ b/ATL/Pooh/pooh.atl @@ -14,3 +14,7 @@ define-player "Winnie the Pooh" description "A small but very lovable bear of very little brain." place "Pooh's home" + +define-player "Christopher Robin" + description "Pooh's best friend." + place "Western woods" diff --git a/ATL/dev/creator-test.atl b/ATL/dev/creator-test.atl new file mode 100644 index 0000000..6209e7c --- /dev/null +++ b/ATL/dev/creator-test.atl @@ -0,0 +1,185 @@ +;; This code has been automatically generated by the +;; Atlantis world creator. + +define-item "Rope (20m)" + cost 5 + +define-item "Backpack" + cost 5 + +define-item "Knife" + cost 10 + +define-item "Short sword" + cost 40 + +define-item "Long sword" + cost 80 + +define-item "Dagger" + cost 20 + +define-item "Spear" + cost 25 + +define-item "Short bow" + cost 30 + +define-item "Longbow" + cost 60 + +define-item "Slingshot" + cost 15 + +define-item "Throwing knife" + cost 15 + +define-item "Quiver of arrows" + cost 20 + +define-item "Leather armour" + cost 60 + +define-item "Chain mail" + cost 120 + +define-item "Plate armour" + cost 200 + +define-item "Buckler" + cost 35 + +define-item "Full shield" + cost 45 + +define-item "Candles (3x)" + cost 5 + +define-item "Matches" + cost 1 + +define-item "Food rations (5x)" + cost 10 + +define-item "Grappling hook" + cost 15 + +define-item "Fishing net" + cost 25 + +define-item "Fishing rod" + cost 15 + +define-item "Tent (2 people)" + cost 30 + +define-item "Cloak" + cost 15 + +define-item "Hat" + cost 10 + +define-item "Water bottle" + cost 5 + +define-item "Compass" + cost 20 + +define-item "Quill and ink" + cost 5 + +define-item "Parchment" + cost 5 + +define-item "Blanket" + cost 5 + +define-item "Book of Legends" + cost 55 + +define-item "Book of Lore" + cost 55 + +define-item "Medicinal herbs" + cost 10 + +define-item "Bandages (3x)" + cost 5 + +define-item "Tea leaves" + cost 5 + +define-item "Sleeping potion" + cost 15 + +define-item "Leather pouch" + cost 2 + +define-item "Face mask" + cost 10 + +define-item "Dye" + cost 5 + +define-item "Cloth" + cost 5 + +define-item "Scissors" + cost 15 + +define-item "Needle and thread" + cost 3 + +define-item "Canvas" + cost 8 + +define-item "String" + cost 2 + +define-item "Hatchet" + cost 20 + +define-item "Map" + cost 35 + +define-item "Pony" + cost 100 + +define-item "Horse" + cost 180 + +define-item "Saddle and bridle" + cost 45 + +define-item "Saddlebag" + cost 35 + +define-item "Handmirror" + cost 20 + +define-item "Magnifying glass" + cost 20 + +define-item "Telescope" + cost 40 + +define-item "Rope ladder" + cost 15 + +define-item "Torches (3x)" + cost 10 + +define-item "Staff" + cost 10 + +define-item "Cooking pot" + cost 8 + +define-item "Soap" + cost 2 + +define-item "Towel" + cost 5 + +define-item "Boots" + cost 10 \ No newline at end of file diff --git a/ATL/dev/example.atl b/ATL/dev/example.atl new file mode 100644 index 0000000..3101edd --- /dev/null +++ b/ATL/dev/example.atl @@ -0,0 +1,72 @@ +# This is an example Atlantis file - I use it to explore what the language +# should end up looking like. + +load races.atl +load classes.atl + + +define-quest Kill hellhound + objective kill hellhound + reward gold 300 + + +define-spell Ray of death + type kill + min-intelligence 12 + success-rate 35 + + +define-npc Hades + say Oh, amazing, you actually got here! Who did you bribe? + sell 30 Ambrosia + quest Kill hellhound + + +define-item Scroll of light + value 80 + add-experience 20 + add-spell Ray of death + +define-item Ambrosia + category Food + add-health 5 + + +define-monster Hellhound + armor-class 8 + strength 10 + melee-weapon 2 claws + experience 50 + spawn 2 + aggression 60 + +define-monster Fury + armor-class 5 + strength 8 + melee-weapon 10 fire whip + experience 74 + spawn 0.8 + aggression 30 + + +define-place Nowhere + description Welcome to Nowhere! You are in the void, the space between \ +the worlds. Around you is black. Black, except for one tiny pin-prick of light \ +to the north. + neighbour Elysium + +define-place Elysium + description Congratulations! You have achieved Elysium! + neighbour Nowhere + neighbour Fields of punishment + npc Hades + item Scroll of light + +define-place Fields of punishment + description You really, really don't want to end up here... + neighbour Elysium + monster Hellhound + monster Fury + + +start-place Elysium \ No newline at end of file diff --git a/ATL/dev/game-objects.atl b/ATL/dev/game-objects.atl new file mode 100644 index 0000000..0a219ea --- /dev/null +++ b/ATL/dev/game-objects.atl @@ -0,0 +1,58 @@ +; This module defines items, NPCs, monsters and weapons for my +; Atlantis test world. +; @author Daniel Vedder +; @date 02/06/2015 + +define-monster "Fury" + description "Hades' messengers, torturers, assassins. Beware!" + health 10 + dexterity 20 + strength 10 + aggression 30 + spawn 50 + armour-class 3 + weapon "fire-whip" + item "fire-whip" + +define-item "fire-whip" + description "A 10-foot long whip, blazing with magical fire" + cost 180 + weapon + +define-weapon "fire-whip" + description "A 10-foot long whip, blazing with magical fire" + type "whip" + damage 2 + +define-item "Anaklusmos" + description "Riptide, a sword for heroes!" + weapon + +define-item "Lightning bolt" + description "Zeus lightning bolt - the most powerful weapon of the universe!" + weapon + +define-weapon "Anaklusmos" + description "Riptide, a sword for heroes!" + type "sword" + damage 4 + +define-weapon "Lightning bolt" ; primarily for debugging + description "Zeus lightning bolt - the most powerful weapon of the universe!" + type "magic" + damage 40 + +define-npc "Hades" + description "Hades, Lord of the Dead!" + says "Beware, mortal - do not tempt me!" + +define-npc "Charon" + description "A robe-clad ghoul, dread ferryman of the Styx." + says "..." + +define-npc "Persephone" ;testing the shop system + description "Hades' beautiful wife, bringer of summer." + says "Welcome, my friend from the upper world!" + sells "Sleeping potion" + sells "Handmirror" + sells "Book of Lore" \ No newline at end of file diff --git a/ATL/dev/lisp-test.atl b/ATL/dev/lisp-test.atl new file mode 100644 index 0000000..c27ec79 --- /dev/null +++ b/ATL/dev/lisp-test.atl @@ -0,0 +1,53 @@ +; This is a simple ATL file to test whatever I have implemented so far. +; @author Daniel Vedder +; @date 04/05/2015 + +name-world "Underworld" + +define-player "Start" + money 200 + place "Fields of Punishment" + max-health 50 + health 50 + +define-place "Nowhere" + description "Welcome to Nowhere! +You are in the void, the space between the worlds. Around you is black. +Black, except for one tiny pin-prick of light to the north." + neighbour "Styx" + dark + +define-place "Elysium" + description "This is where you want to be when you are six feet under..." + neighbour "Styx" + neighbour "Fields of Punishment" + neighbour "Fields of Asphodel" + npc "Persephone" + +define-place "Fields of Punishment" + description "Precisely where you do NOT want to end up..." + neighbour "Styx" + neighbour "Elysium" + neighbour "Fields of Asphodel" + monster "Fury" + spawns "Fury" + +define-place "Fields of Asphodel" + description "Nothing special. Really, nothing special at all. +Just a whole load of dead people..." + neighbour "Fields of Punishment" + neighbour "Elysium" + npc "Hades" + +define-place "Styx" + description "The great river that all must cross - but woe to those who do!" + neighbour "Fields of Punishment" + neighbour "Elysium" + neighbour "Nowhere" + item "Anaklusmos" + npc "Charon" + +load-file lisp-test.atl ;Testing whether recursive loading is prevented +load-file races-classes.atl +load-file game-objects.atl +load-file creator-test.atl diff --git a/ATL/dev/races-classes.atl b/ATL/dev/races-classes.atl new file mode 100644 index 0000000..659310f --- /dev/null +++ b/ATL/dev/races-classes.atl @@ -0,0 +1,40 @@ +; A file to define all the races and character classes in my test world. +; @author Daniel Vedder +; @date 18/05/2015 + +;;; RACES + +define-race "Elf" + description "The oldest and wisest race of Middle Earth" + +define-race "Dwarf" + description "Sons of the Earth, descendants of Durin" + +define-race "Hobbit" + description "Peace-loving and kind, true gentlemen" + +define-race "Human" + description "Boring, exciting, ever-changing, never-changing man..." + + +;;; CLASSES + +define-class "Warrior" + description "Fighting as a passion!" + special-item "Sword" + +define-class "Wizard" + description "Ancient, powerful, keepers of the Knowledge..." + special-item "staff" + +define-class "Burglar" + description "Breaking and entering taken to the max!" + special-item "lockpick" + special-item "torch" + +define-class "Craftsman" + description "Maker of all things beautiful and useful" + special-item "hammer" + +load-file lisp-test.atl ;Again, a test for recursive loading +load-file test-extension.lisp ;Testing whether Lisp extensions are loaded \ No newline at end of file diff --git a/ATL/dev/test-extension.lisp b/ATL/dev/test-extension.lisp new file mode 100644 index 0000000..f01660a --- /dev/null +++ b/ATL/dev/test-extension.lisp @@ -0,0 +1,5 @@ +;; This file tests whether the interpreter loads Lisp files correctly. +;; author: Daniel Vedder +;; date: 21/05/2015 + +(debugging "~&Loaded Lisp extension file.") diff --git a/ATL/test/creator-test.atl b/ATL/test/creator-test.atl deleted file mode 100644 index 6209e7c..0000000 --- a/ATL/test/creator-test.atl +++ /dev/null @@ -1,185 +0,0 @@ -;; This code has been automatically generated by the -;; Atlantis world creator. - -define-item "Rope (20m)" - cost 5 - -define-item "Backpack" - cost 5 - -define-item "Knife" - cost 10 - -define-item "Short sword" - cost 40 - -define-item "Long sword" - cost 80 - -define-item "Dagger" - cost 20 - -define-item "Spear" - cost 25 - -define-item "Short bow" - cost 30 - -define-item "Longbow" - cost 60 - -define-item "Slingshot" - cost 15 - -define-item "Throwing knife" - cost 15 - -define-item "Quiver of arrows" - cost 20 - -define-item "Leather armour" - cost 60 - -define-item "Chain mail" - cost 120 - -define-item "Plate armour" - cost 200 - -define-item "Buckler" - cost 35 - -define-item "Full shield" - cost 45 - -define-item "Candles (3x)" - cost 5 - -define-item "Matches" - cost 1 - -define-item "Food rations (5x)" - cost 10 - -define-item "Grappling hook" - cost 15 - -define-item "Fishing net" - cost 25 - -define-item "Fishing rod" - cost 15 - -define-item "Tent (2 people)" - cost 30 - -define-item "Cloak" - cost 15 - -define-item "Hat" - cost 10 - -define-item "Water bottle" - cost 5 - -define-item "Compass" - cost 20 - -define-item "Quill and ink" - cost 5 - -define-item "Parchment" - cost 5 - -define-item "Blanket" - cost 5 - -define-item "Book of Legends" - cost 55 - -define-item "Book of Lore" - cost 55 - -define-item "Medicinal herbs" - cost 10 - -define-item "Bandages (3x)" - cost 5 - -define-item "Tea leaves" - cost 5 - -define-item "Sleeping potion" - cost 15 - -define-item "Leather pouch" - cost 2 - -define-item "Face mask" - cost 10 - -define-item "Dye" - cost 5 - -define-item "Cloth" - cost 5 - -define-item "Scissors" - cost 15 - -define-item "Needle and thread" - cost 3 - -define-item "Canvas" - cost 8 - -define-item "String" - cost 2 - -define-item "Hatchet" - cost 20 - -define-item "Map" - cost 35 - -define-item "Pony" - cost 100 - -define-item "Horse" - cost 180 - -define-item "Saddle and bridle" - cost 45 - -define-item "Saddlebag" - cost 35 - -define-item "Handmirror" - cost 20 - -define-item "Magnifying glass" - cost 20 - -define-item "Telescope" - cost 40 - -define-item "Rope ladder" - cost 15 - -define-item "Torches (3x)" - cost 10 - -define-item "Staff" - cost 10 - -define-item "Cooking pot" - cost 8 - -define-item "Soap" - cost 2 - -define-item "Towel" - cost 5 - -define-item "Boots" - cost 10 \ No newline at end of file diff --git a/ATL/test/example.atl b/ATL/test/example.atl deleted file mode 100644 index 3101edd..0000000 --- a/ATL/test/example.atl +++ /dev/null @@ -1,72 +0,0 @@ -# This is an example Atlantis file - I use it to explore what the language -# should end up looking like. - -load races.atl -load classes.atl - - -define-quest Kill hellhound - objective kill hellhound - reward gold 300 - - -define-spell Ray of death - type kill - min-intelligence 12 - success-rate 35 - - -define-npc Hades - say Oh, amazing, you actually got here! Who did you bribe? - sell 30 Ambrosia - quest Kill hellhound - - -define-item Scroll of light - value 80 - add-experience 20 - add-spell Ray of death - -define-item Ambrosia - category Food - add-health 5 - - -define-monster Hellhound - armor-class 8 - strength 10 - melee-weapon 2 claws - experience 50 - spawn 2 - aggression 60 - -define-monster Fury - armor-class 5 - strength 8 - melee-weapon 10 fire whip - experience 74 - spawn 0.8 - aggression 30 - - -define-place Nowhere - description Welcome to Nowhere! You are in the void, the space between \ -the worlds. Around you is black. Black, except for one tiny pin-prick of light \ -to the north. - neighbour Elysium - -define-place Elysium - description Congratulations! You have achieved Elysium! - neighbour Nowhere - neighbour Fields of punishment - npc Hades - item Scroll of light - -define-place Fields of punishment - description You really, really don't want to end up here... - neighbour Elysium - monster Hellhound - monster Fury - - -start-place Elysium \ No newline at end of file diff --git a/ATL/test/game-objects.atl b/ATL/test/game-objects.atl deleted file mode 100644 index 0a219ea..0000000 --- a/ATL/test/game-objects.atl +++ /dev/null @@ -1,58 +0,0 @@ -; This module defines items, NPCs, monsters and weapons for my -; Atlantis test world. -; @author Daniel Vedder -; @date 02/06/2015 - -define-monster "Fury" - description "Hades' messengers, torturers, assassins. Beware!" - health 10 - dexterity 20 - strength 10 - aggression 30 - spawn 50 - armour-class 3 - weapon "fire-whip" - item "fire-whip" - -define-item "fire-whip" - description "A 10-foot long whip, blazing with magical fire" - cost 180 - weapon - -define-weapon "fire-whip" - description "A 10-foot long whip, blazing with magical fire" - type "whip" - damage 2 - -define-item "Anaklusmos" - description "Riptide, a sword for heroes!" - weapon - -define-item "Lightning bolt" - description "Zeus lightning bolt - the most powerful weapon of the universe!" - weapon - -define-weapon "Anaklusmos" - description "Riptide, a sword for heroes!" - type "sword" - damage 4 - -define-weapon "Lightning bolt" ; primarily for debugging - description "Zeus lightning bolt - the most powerful weapon of the universe!" - type "magic" - damage 40 - -define-npc "Hades" - description "Hades, Lord of the Dead!" - says "Beware, mortal - do not tempt me!" - -define-npc "Charon" - description "A robe-clad ghoul, dread ferryman of the Styx." - says "..." - -define-npc "Persephone" ;testing the shop system - description "Hades' beautiful wife, bringer of summer." - says "Welcome, my friend from the upper world!" - sells "Sleeping potion" - sells "Handmirror" - sells "Book of Lore" \ No newline at end of file diff --git a/ATL/Pooh/pooh.atl b/ATL/Pooh/pooh.atl index 181995f..b0498e3 100644 --- a/ATL/Pooh/pooh.atl +++ b/ATL/Pooh/pooh.atl @@ -14,3 +14,7 @@ define-player "Winnie the Pooh" description "A small but very lovable bear of very little brain." place "Pooh's home" + +define-player "Christopher Robin" + description "Pooh's best friend." + place "Western woods" diff --git a/ATL/dev/creator-test.atl b/ATL/dev/creator-test.atl new file mode 100644 index 0000000..6209e7c --- /dev/null +++ b/ATL/dev/creator-test.atl @@ -0,0 +1,185 @@ +;; This code has been automatically generated by the +;; Atlantis world creator. + +define-item "Rope (20m)" + cost 5 + +define-item "Backpack" + cost 5 + +define-item "Knife" + cost 10 + +define-item "Short sword" + cost 40 + +define-item "Long sword" + cost 80 + +define-item "Dagger" + cost 20 + +define-item "Spear" + cost 25 + +define-item "Short bow" + cost 30 + +define-item "Longbow" + cost 60 + +define-item "Slingshot" + cost 15 + +define-item "Throwing knife" + cost 15 + +define-item "Quiver of arrows" + cost 20 + +define-item "Leather armour" + cost 60 + +define-item "Chain mail" + cost 120 + +define-item "Plate armour" + cost 200 + +define-item "Buckler" + cost 35 + +define-item "Full shield" + cost 45 + +define-item "Candles (3x)" + cost 5 + +define-item "Matches" + cost 1 + +define-item "Food rations (5x)" + cost 10 + +define-item "Grappling hook" + cost 15 + +define-item "Fishing net" + cost 25 + +define-item "Fishing rod" + cost 15 + +define-item "Tent (2 people)" + cost 30 + +define-item "Cloak" + cost 15 + +define-item "Hat" + cost 10 + +define-item "Water bottle" + cost 5 + +define-item "Compass" + cost 20 + +define-item "Quill and ink" + cost 5 + +define-item "Parchment" + cost 5 + +define-item "Blanket" + cost 5 + +define-item "Book of Legends" + cost 55 + +define-item "Book of Lore" + cost 55 + +define-item "Medicinal herbs" + cost 10 + +define-item "Bandages (3x)" + cost 5 + +define-item "Tea leaves" + cost 5 + +define-item "Sleeping potion" + cost 15 + +define-item "Leather pouch" + cost 2 + +define-item "Face mask" + cost 10 + +define-item "Dye" + cost 5 + +define-item "Cloth" + cost 5 + +define-item "Scissors" + cost 15 + +define-item "Needle and thread" + cost 3 + +define-item "Canvas" + cost 8 + +define-item "String" + cost 2 + +define-item "Hatchet" + cost 20 + +define-item "Map" + cost 35 + +define-item "Pony" + cost 100 + +define-item "Horse" + cost 180 + +define-item "Saddle and bridle" + cost 45 + +define-item "Saddlebag" + cost 35 + +define-item "Handmirror" + cost 20 + +define-item "Magnifying glass" + cost 20 + +define-item "Telescope" + cost 40 + +define-item "Rope ladder" + cost 15 + +define-item "Torches (3x)" + cost 10 + +define-item "Staff" + cost 10 + +define-item "Cooking pot" + cost 8 + +define-item "Soap" + cost 2 + +define-item "Towel" + cost 5 + +define-item "Boots" + cost 10 \ No newline at end of file diff --git a/ATL/dev/example.atl b/ATL/dev/example.atl new file mode 100644 index 0000000..3101edd --- /dev/null +++ b/ATL/dev/example.atl @@ -0,0 +1,72 @@ +# This is an example Atlantis file - I use it to explore what the language +# should end up looking like. + +load races.atl +load classes.atl + + +define-quest Kill hellhound + objective kill hellhound + reward gold 300 + + +define-spell Ray of death + type kill + min-intelligence 12 + success-rate 35 + + +define-npc Hades + say Oh, amazing, you actually got here! Who did you bribe? + sell 30 Ambrosia + quest Kill hellhound + + +define-item Scroll of light + value 80 + add-experience 20 + add-spell Ray of death + +define-item Ambrosia + category Food + add-health 5 + + +define-monster Hellhound + armor-class 8 + strength 10 + melee-weapon 2 claws + experience 50 + spawn 2 + aggression 60 + +define-monster Fury + armor-class 5 + strength 8 + melee-weapon 10 fire whip + experience 74 + spawn 0.8 + aggression 30 + + +define-place Nowhere + description Welcome to Nowhere! You are in the void, the space between \ +the worlds. Around you is black. Black, except for one tiny pin-prick of light \ +to the north. + neighbour Elysium + +define-place Elysium + description Congratulations! You have achieved Elysium! + neighbour Nowhere + neighbour Fields of punishment + npc Hades + item Scroll of light + +define-place Fields of punishment + description You really, really don't want to end up here... + neighbour Elysium + monster Hellhound + monster Fury + + +start-place Elysium \ No newline at end of file diff --git a/ATL/dev/game-objects.atl b/ATL/dev/game-objects.atl new file mode 100644 index 0000000..0a219ea --- /dev/null +++ b/ATL/dev/game-objects.atl @@ -0,0 +1,58 @@ +; This module defines items, NPCs, monsters and weapons for my +; Atlantis test world. +; @author Daniel Vedder +; @date 02/06/2015 + +define-monster "Fury" + description "Hades' messengers, torturers, assassins. Beware!" + health 10 + dexterity 20 + strength 10 + aggression 30 + spawn 50 + armour-class 3 + weapon "fire-whip" + item "fire-whip" + +define-item "fire-whip" + description "A 10-foot long whip, blazing with magical fire" + cost 180 + weapon + +define-weapon "fire-whip" + description "A 10-foot long whip, blazing with magical fire" + type "whip" + damage 2 + +define-item "Anaklusmos" + description "Riptide, a sword for heroes!" + weapon + +define-item "Lightning bolt" + description "Zeus lightning bolt - the most powerful weapon of the universe!" + weapon + +define-weapon "Anaklusmos" + description "Riptide, a sword for heroes!" + type "sword" + damage 4 + +define-weapon "Lightning bolt" ; primarily for debugging + description "Zeus lightning bolt - the most powerful weapon of the universe!" + type "magic" + damage 40 + +define-npc "Hades" + description "Hades, Lord of the Dead!" + says "Beware, mortal - do not tempt me!" + +define-npc "Charon" + description "A robe-clad ghoul, dread ferryman of the Styx." + says "..." + +define-npc "Persephone" ;testing the shop system + description "Hades' beautiful wife, bringer of summer." + says "Welcome, my friend from the upper world!" + sells "Sleeping potion" + sells "Handmirror" + sells "Book of Lore" \ No newline at end of file diff --git a/ATL/dev/lisp-test.atl b/ATL/dev/lisp-test.atl new file mode 100644 index 0000000..c27ec79 --- /dev/null +++ b/ATL/dev/lisp-test.atl @@ -0,0 +1,53 @@ +; This is a simple ATL file to test whatever I have implemented so far. +; @author Daniel Vedder +; @date 04/05/2015 + +name-world "Underworld" + +define-player "Start" + money 200 + place "Fields of Punishment" + max-health 50 + health 50 + +define-place "Nowhere" + description "Welcome to Nowhere! +You are in the void, the space between the worlds. Around you is black. +Black, except for one tiny pin-prick of light to the north." + neighbour "Styx" + dark + +define-place "Elysium" + description "This is where you want to be when you are six feet under..." + neighbour "Styx" + neighbour "Fields of Punishment" + neighbour "Fields of Asphodel" + npc "Persephone" + +define-place "Fields of Punishment" + description "Precisely where you do NOT want to end up..." + neighbour "Styx" + neighbour "Elysium" + neighbour "Fields of Asphodel" + monster "Fury" + spawns "Fury" + +define-place "Fields of Asphodel" + description "Nothing special. Really, nothing special at all. +Just a whole load of dead people..." + neighbour "Fields of Punishment" + neighbour "Elysium" + npc "Hades" + +define-place "Styx" + description "The great river that all must cross - but woe to those who do!" + neighbour "Fields of Punishment" + neighbour "Elysium" + neighbour "Nowhere" + item "Anaklusmos" + npc "Charon" + +load-file lisp-test.atl ;Testing whether recursive loading is prevented +load-file races-classes.atl +load-file game-objects.atl +load-file creator-test.atl diff --git a/ATL/dev/races-classes.atl b/ATL/dev/races-classes.atl new file mode 100644 index 0000000..659310f --- /dev/null +++ b/ATL/dev/races-classes.atl @@ -0,0 +1,40 @@ +; A file to define all the races and character classes in my test world. +; @author Daniel Vedder +; @date 18/05/2015 + +;;; RACES + +define-race "Elf" + description "The oldest and wisest race of Middle Earth" + +define-race "Dwarf" + description "Sons of the Earth, descendants of Durin" + +define-race "Hobbit" + description "Peace-loving and kind, true gentlemen" + +define-race "Human" + description "Boring, exciting, ever-changing, never-changing man..." + + +;;; CLASSES + +define-class "Warrior" + description "Fighting as a passion!" + special-item "Sword" + +define-class "Wizard" + description "Ancient, powerful, keepers of the Knowledge..." + special-item "staff" + +define-class "Burglar" + description "Breaking and entering taken to the max!" + special-item "lockpick" + special-item "torch" + +define-class "Craftsman" + description "Maker of all things beautiful and useful" + special-item "hammer" + +load-file lisp-test.atl ;Again, a test for recursive loading +load-file test-extension.lisp ;Testing whether Lisp extensions are loaded \ No newline at end of file diff --git a/ATL/dev/test-extension.lisp b/ATL/dev/test-extension.lisp new file mode 100644 index 0000000..f01660a --- /dev/null +++ b/ATL/dev/test-extension.lisp @@ -0,0 +1,5 @@ +;; This file tests whether the interpreter loads Lisp files correctly. +;; author: Daniel Vedder +;; date: 21/05/2015 + +(debugging "~&Loaded Lisp extension file.") diff --git a/ATL/test/creator-test.atl b/ATL/test/creator-test.atl deleted file mode 100644 index 6209e7c..0000000 --- a/ATL/test/creator-test.atl +++ /dev/null @@ -1,185 +0,0 @@ -;; This code has been automatically generated by the -;; Atlantis world creator. - -define-item "Rope (20m)" - cost 5 - -define-item "Backpack" - cost 5 - -define-item "Knife" - cost 10 - -define-item "Short sword" - cost 40 - -define-item "Long sword" - cost 80 - -define-item "Dagger" - cost 20 - -define-item "Spear" - cost 25 - -define-item "Short bow" - cost 30 - -define-item "Longbow" - cost 60 - -define-item "Slingshot" - cost 15 - -define-item "Throwing knife" - cost 15 - -define-item "Quiver of arrows" - cost 20 - -define-item "Leather armour" - cost 60 - -define-item "Chain mail" - cost 120 - -define-item "Plate armour" - cost 200 - -define-item "Buckler" - cost 35 - -define-item "Full shield" - cost 45 - -define-item "Candles (3x)" - cost 5 - -define-item "Matches" - cost 1 - -define-item "Food rations (5x)" - cost 10 - -define-item "Grappling hook" - cost 15 - -define-item "Fishing net" - cost 25 - -define-item "Fishing rod" - cost 15 - -define-item "Tent (2 people)" - cost 30 - -define-item "Cloak" - cost 15 - -define-item "Hat" - cost 10 - -define-item "Water bottle" - cost 5 - -define-item "Compass" - cost 20 - -define-item "Quill and ink" - cost 5 - -define-item "Parchment" - cost 5 - -define-item "Blanket" - cost 5 - -define-item "Book of Legends" - cost 55 - -define-item "Book of Lore" - cost 55 - -define-item "Medicinal herbs" - cost 10 - -define-item "Bandages (3x)" - cost 5 - -define-item "Tea leaves" - cost 5 - -define-item "Sleeping potion" - cost 15 - -define-item "Leather pouch" - cost 2 - -define-item "Face mask" - cost 10 - -define-item "Dye" - cost 5 - -define-item "Cloth" - cost 5 - -define-item "Scissors" - cost 15 - -define-item "Needle and thread" - cost 3 - -define-item "Canvas" - cost 8 - -define-item "String" - cost 2 - -define-item "Hatchet" - cost 20 - -define-item "Map" - cost 35 - -define-item "Pony" - cost 100 - -define-item "Horse" - cost 180 - -define-item "Saddle and bridle" - cost 45 - -define-item "Saddlebag" - cost 35 - -define-item "Handmirror" - cost 20 - -define-item "Magnifying glass" - cost 20 - -define-item "Telescope" - cost 40 - -define-item "Rope ladder" - cost 15 - -define-item "Torches (3x)" - cost 10 - -define-item "Staff" - cost 10 - -define-item "Cooking pot" - cost 8 - -define-item "Soap" - cost 2 - -define-item "Towel" - cost 5 - -define-item "Boots" - cost 10 \ No newline at end of file diff --git a/ATL/test/example.atl b/ATL/test/example.atl deleted file mode 100644 index 3101edd..0000000 --- a/ATL/test/example.atl +++ /dev/null @@ -1,72 +0,0 @@ -# This is an example Atlantis file - I use it to explore what the language -# should end up looking like. - -load races.atl -load classes.atl - - -define-quest Kill hellhound - objective kill hellhound - reward gold 300 - - -define-spell Ray of death - type kill - min-intelligence 12 - success-rate 35 - - -define-npc Hades - say Oh, amazing, you actually got here! Who did you bribe? - sell 30 Ambrosia - quest Kill hellhound - - -define-item Scroll of light - value 80 - add-experience 20 - add-spell Ray of death - -define-item Ambrosia - category Food - add-health 5 - - -define-monster Hellhound - armor-class 8 - strength 10 - melee-weapon 2 claws - experience 50 - spawn 2 - aggression 60 - -define-monster Fury - armor-class 5 - strength 8 - melee-weapon 10 fire whip - experience 74 - spawn 0.8 - aggression 30 - - -define-place Nowhere - description Welcome to Nowhere! You are in the void, the space between \ -the worlds. Around you is black. Black, except for one tiny pin-prick of light \ -to the north. - neighbour Elysium - -define-place Elysium - description Congratulations! You have achieved Elysium! - neighbour Nowhere - neighbour Fields of punishment - npc Hades - item Scroll of light - -define-place Fields of punishment - description You really, really don't want to end up here... - neighbour Elysium - monster Hellhound - monster Fury - - -start-place Elysium \ No newline at end of file diff --git a/ATL/test/game-objects.atl b/ATL/test/game-objects.atl deleted file mode 100644 index 0a219ea..0000000 --- a/ATL/test/game-objects.atl +++ /dev/null @@ -1,58 +0,0 @@ -; This module defines items, NPCs, monsters and weapons for my -; Atlantis test world. -; @author Daniel Vedder -; @date 02/06/2015 - -define-monster "Fury" - description "Hades' messengers, torturers, assassins. Beware!" - health 10 - dexterity 20 - strength 10 - aggression 30 - spawn 50 - armour-class 3 - weapon "fire-whip" - item "fire-whip" - -define-item "fire-whip" - description "A 10-foot long whip, blazing with magical fire" - cost 180 - weapon - -define-weapon "fire-whip" - description "A 10-foot long whip, blazing with magical fire" - type "whip" - damage 2 - -define-item "Anaklusmos" - description "Riptide, a sword for heroes!" - weapon - -define-item "Lightning bolt" - description "Zeus lightning bolt - the most powerful weapon of the universe!" - weapon - -define-weapon "Anaklusmos" - description "Riptide, a sword for heroes!" - type "sword" - damage 4 - -define-weapon "Lightning bolt" ; primarily for debugging - description "Zeus lightning bolt - the most powerful weapon of the universe!" - type "magic" - damage 40 - -define-npc "Hades" - description "Hades, Lord of the Dead!" - says "Beware, mortal - do not tempt me!" - -define-npc "Charon" - description "A robe-clad ghoul, dread ferryman of the Styx." - says "..." - -define-npc "Persephone" ;testing the shop system - description "Hades' beautiful wife, bringer of summer." - says "Welcome, my friend from the upper world!" - sells "Sleeping potion" - sells "Handmirror" - sells "Book of Lore" \ No newline at end of file diff --git a/ATL/test/lisp-test.atl b/ATL/test/lisp-test.atl deleted file mode 100644 index c27ec79..0000000 --- a/ATL/test/lisp-test.atl +++ /dev/null @@ -1,53 +0,0 @@ -; This is a simple ATL file to test whatever I have implemented so far. -; @author Daniel Vedder -; @date 04/05/2015 - -name-world "Underworld" - -define-player "Start" - money 200 - place "Fields of Punishment" - max-health 50 - health 50 - -define-place "Nowhere" - description "Welcome to Nowhere! -You are in the void, the space between the worlds. Around you is black. -Black, except for one tiny pin-prick of light to the north." - neighbour "Styx" - dark - -define-place "Elysium" - description "This is where you want to be when you are six feet under..." - neighbour "Styx" - neighbour "Fields of Punishment" - neighbour "Fields of Asphodel" - npc "Persephone" - -define-place "Fields of Punishment" - description "Precisely where you do NOT want to end up..." - neighbour "Styx" - neighbour "Elysium" - neighbour "Fields of Asphodel" - monster "Fury" - spawns "Fury" - -define-place "Fields of Asphodel" - description "Nothing special. Really, nothing special at all. -Just a whole load of dead people..." - neighbour "Fields of Punishment" - neighbour "Elysium" - npc "Hades" - -define-place "Styx" - description "The great river that all must cross - but woe to those who do!" - neighbour "Fields of Punishment" - neighbour "Elysium" - neighbour "Nowhere" - item "Anaklusmos" - npc "Charon" - -load-file lisp-test.atl ;Testing whether recursive loading is prevented -load-file races-classes.atl -load-file game-objects.atl -load-file creator-test.atl diff --git a/ATL/Pooh/pooh.atl b/ATL/Pooh/pooh.atl index 181995f..b0498e3 100644 --- a/ATL/Pooh/pooh.atl +++ b/ATL/Pooh/pooh.atl @@ -14,3 +14,7 @@ define-player "Winnie the Pooh" description "A small but very lovable bear of very little brain." place "Pooh's home" + +define-player "Christopher Robin" + description "Pooh's best friend." + place "Western woods" diff --git a/ATL/dev/creator-test.atl b/ATL/dev/creator-test.atl new file mode 100644 index 0000000..6209e7c --- /dev/null +++ b/ATL/dev/creator-test.atl @@ -0,0 +1,185 @@ +;; This code has been automatically generated by the +;; Atlantis world creator. + +define-item "Rope (20m)" + cost 5 + +define-item "Backpack" + cost 5 + +define-item "Knife" + cost 10 + +define-item "Short sword" + cost 40 + +define-item "Long sword" + cost 80 + +define-item "Dagger" + cost 20 + +define-item "Spear" + cost 25 + +define-item "Short bow" + cost 30 + +define-item "Longbow" + cost 60 + +define-item "Slingshot" + cost 15 + +define-item "Throwing knife" + cost 15 + +define-item "Quiver of arrows" + cost 20 + +define-item "Leather armour" + cost 60 + +define-item "Chain mail" + cost 120 + +define-item "Plate armour" + cost 200 + +define-item "Buckler" + cost 35 + +define-item "Full shield" + cost 45 + +define-item "Candles (3x)" + cost 5 + +define-item "Matches" + cost 1 + +define-item "Food rations (5x)" + cost 10 + +define-item "Grappling hook" + cost 15 + +define-item "Fishing net" + cost 25 + +define-item "Fishing rod" + cost 15 + +define-item "Tent (2 people)" + cost 30 + +define-item "Cloak" + cost 15 + +define-item "Hat" + cost 10 + +define-item "Water bottle" + cost 5 + +define-item "Compass" + cost 20 + +define-item "Quill and ink" + cost 5 + +define-item "Parchment" + cost 5 + +define-item "Blanket" + cost 5 + +define-item "Book of Legends" + cost 55 + +define-item "Book of Lore" + cost 55 + +define-item "Medicinal herbs" + cost 10 + +define-item "Bandages (3x)" + cost 5 + +define-item "Tea leaves" + cost 5 + +define-item "Sleeping potion" + cost 15 + +define-item "Leather pouch" + cost 2 + +define-item "Face mask" + cost 10 + +define-item "Dye" + cost 5 + +define-item "Cloth" + cost 5 + +define-item "Scissors" + cost 15 + +define-item "Needle and thread" + cost 3 + +define-item "Canvas" + cost 8 + +define-item "String" + cost 2 + +define-item "Hatchet" + cost 20 + +define-item "Map" + cost 35 + +define-item "Pony" + cost 100 + +define-item "Horse" + cost 180 + +define-item "Saddle and bridle" + cost 45 + +define-item "Saddlebag" + cost 35 + +define-item "Handmirror" + cost 20 + +define-item "Magnifying glass" + cost 20 + +define-item "Telescope" + cost 40 + +define-item "Rope ladder" + cost 15 + +define-item "Torches (3x)" + cost 10 + +define-item "Staff" + cost 10 + +define-item "Cooking pot" + cost 8 + +define-item "Soap" + cost 2 + +define-item "Towel" + cost 5 + +define-item "Boots" + cost 10 \ No newline at end of file diff --git a/ATL/dev/example.atl b/ATL/dev/example.atl new file mode 100644 index 0000000..3101edd --- /dev/null +++ b/ATL/dev/example.atl @@ -0,0 +1,72 @@ +# This is an example Atlantis file - I use it to explore what the language +# should end up looking like. + +load races.atl +load classes.atl + + +define-quest Kill hellhound + objective kill hellhound + reward gold 300 + + +define-spell Ray of death + type kill + min-intelligence 12 + success-rate 35 + + +define-npc Hades + say Oh, amazing, you actually got here! Who did you bribe? + sell 30 Ambrosia + quest Kill hellhound + + +define-item Scroll of light + value 80 + add-experience 20 + add-spell Ray of death + +define-item Ambrosia + category Food + add-health 5 + + +define-monster Hellhound + armor-class 8 + strength 10 + melee-weapon 2 claws + experience 50 + spawn 2 + aggression 60 + +define-monster Fury + armor-class 5 + strength 8 + melee-weapon 10 fire whip + experience 74 + spawn 0.8 + aggression 30 + + +define-place Nowhere + description Welcome to Nowhere! You are in the void, the space between \ +the worlds. Around you is black. Black, except for one tiny pin-prick of light \ +to the north. + neighbour Elysium + +define-place Elysium + description Congratulations! You have achieved Elysium! + neighbour Nowhere + neighbour Fields of punishment + npc Hades + item Scroll of light + +define-place Fields of punishment + description You really, really don't want to end up here... + neighbour Elysium + monster Hellhound + monster Fury + + +start-place Elysium \ No newline at end of file diff --git a/ATL/dev/game-objects.atl b/ATL/dev/game-objects.atl new file mode 100644 index 0000000..0a219ea --- /dev/null +++ b/ATL/dev/game-objects.atl @@ -0,0 +1,58 @@ +; This module defines items, NPCs, monsters and weapons for my +; Atlantis test world. +; @author Daniel Vedder +; @date 02/06/2015 + +define-monster "Fury" + description "Hades' messengers, torturers, assassins. Beware!" + health 10 + dexterity 20 + strength 10 + aggression 30 + spawn 50 + armour-class 3 + weapon "fire-whip" + item "fire-whip" + +define-item "fire-whip" + description "A 10-foot long whip, blazing with magical fire" + cost 180 + weapon + +define-weapon "fire-whip" + description "A 10-foot long whip, blazing with magical fire" + type "whip" + damage 2 + +define-item "Anaklusmos" + description "Riptide, a sword for heroes!" + weapon + +define-item "Lightning bolt" + description "Zeus lightning bolt - the most powerful weapon of the universe!" + weapon + +define-weapon "Anaklusmos" + description "Riptide, a sword for heroes!" + type "sword" + damage 4 + +define-weapon "Lightning bolt" ; primarily for debugging + description "Zeus lightning bolt - the most powerful weapon of the universe!" + type "magic" + damage 40 + +define-npc "Hades" + description "Hades, Lord of the Dead!" + says "Beware, mortal - do not tempt me!" + +define-npc "Charon" + description "A robe-clad ghoul, dread ferryman of the Styx." + says "..." + +define-npc "Persephone" ;testing the shop system + description "Hades' beautiful wife, bringer of summer." + says "Welcome, my friend from the upper world!" + sells "Sleeping potion" + sells "Handmirror" + sells "Book of Lore" \ No newline at end of file diff --git a/ATL/dev/lisp-test.atl b/ATL/dev/lisp-test.atl new file mode 100644 index 0000000..c27ec79 --- /dev/null +++ b/ATL/dev/lisp-test.atl @@ -0,0 +1,53 @@ +; This is a simple ATL file to test whatever I have implemented so far. +; @author Daniel Vedder +; @date 04/05/2015 + +name-world "Underworld" + +define-player "Start" + money 200 + place "Fields of Punishment" + max-health 50 + health 50 + +define-place "Nowhere" + description "Welcome to Nowhere! +You are in the void, the space between the worlds. Around you is black. +Black, except for one tiny pin-prick of light to the north." + neighbour "Styx" + dark + +define-place "Elysium" + description "This is where you want to be when you are six feet under..." + neighbour "Styx" + neighbour "Fields of Punishment" + neighbour "Fields of Asphodel" + npc "Persephone" + +define-place "Fields of Punishment" + description "Precisely where you do NOT want to end up..." + neighbour "Styx" + neighbour "Elysium" + neighbour "Fields of Asphodel" + monster "Fury" + spawns "Fury" + +define-place "Fields of Asphodel" + description "Nothing special. Really, nothing special at all. +Just a whole load of dead people..." + neighbour "Fields of Punishment" + neighbour "Elysium" + npc "Hades" + +define-place "Styx" + description "The great river that all must cross - but woe to those who do!" + neighbour "Fields of Punishment" + neighbour "Elysium" + neighbour "Nowhere" + item "Anaklusmos" + npc "Charon" + +load-file lisp-test.atl ;Testing whether recursive loading is prevented +load-file races-classes.atl +load-file game-objects.atl +load-file creator-test.atl diff --git a/ATL/dev/races-classes.atl b/ATL/dev/races-classes.atl new file mode 100644 index 0000000..659310f --- /dev/null +++ b/ATL/dev/races-classes.atl @@ -0,0 +1,40 @@ +; A file to define all the races and character classes in my test world. +; @author Daniel Vedder +; @date 18/05/2015 + +;;; RACES + +define-race "Elf" + description "The oldest and wisest race of Middle Earth" + +define-race "Dwarf" + description "Sons of the Earth, descendants of Durin" + +define-race "Hobbit" + description "Peace-loving and kind, true gentlemen" + +define-race "Human" + description "Boring, exciting, ever-changing, never-changing man..." + + +;;; CLASSES + +define-class "Warrior" + description "Fighting as a passion!" + special-item "Sword" + +define-class "Wizard" + description "Ancient, powerful, keepers of the Knowledge..." + special-item "staff" + +define-class "Burglar" + description "Breaking and entering taken to the max!" + special-item "lockpick" + special-item "torch" + +define-class "Craftsman" + description "Maker of all things beautiful and useful" + special-item "hammer" + +load-file lisp-test.atl ;Again, a test for recursive loading +load-file test-extension.lisp ;Testing whether Lisp extensions are loaded \ No newline at end of file diff --git a/ATL/dev/test-extension.lisp b/ATL/dev/test-extension.lisp new file mode 100644 index 0000000..f01660a --- /dev/null +++ b/ATL/dev/test-extension.lisp @@ -0,0 +1,5 @@ +;; This file tests whether the interpreter loads Lisp files correctly. +;; author: Daniel Vedder +;; date: 21/05/2015 + +(debugging "~&Loaded Lisp extension file.") diff --git a/ATL/test/creator-test.atl b/ATL/test/creator-test.atl deleted file mode 100644 index 6209e7c..0000000 --- a/ATL/test/creator-test.atl +++ /dev/null @@ -1,185 +0,0 @@ -;; This code has been automatically generated by the -;; Atlantis world creator. - -define-item "Rope (20m)" - cost 5 - -define-item "Backpack" - cost 5 - -define-item "Knife" - cost 10 - -define-item "Short sword" - cost 40 - -define-item "Long sword" - cost 80 - -define-item "Dagger" - cost 20 - -define-item "Spear" - cost 25 - -define-item "Short bow" - cost 30 - -define-item "Longbow" - cost 60 - -define-item "Slingshot" - cost 15 - -define-item "Throwing knife" - cost 15 - -define-item "Quiver of arrows" - cost 20 - -define-item "Leather armour" - cost 60 - -define-item "Chain mail" - cost 120 - -define-item "Plate armour" - cost 200 - -define-item "Buckler" - cost 35 - -define-item "Full shield" - cost 45 - -define-item "Candles (3x)" - cost 5 - -define-item "Matches" - cost 1 - -define-item "Food rations (5x)" - cost 10 - -define-item "Grappling hook" - cost 15 - -define-item "Fishing net" - cost 25 - -define-item "Fishing rod" - cost 15 - -define-item "Tent (2 people)" - cost 30 - -define-item "Cloak" - cost 15 - -define-item "Hat" - cost 10 - -define-item "Water bottle" - cost 5 - -define-item "Compass" - cost 20 - -define-item "Quill and ink" - cost 5 - -define-item "Parchment" - cost 5 - -define-item "Blanket" - cost 5 - -define-item "Book of Legends" - cost 55 - -define-item "Book of Lore" - cost 55 - -define-item "Medicinal herbs" - cost 10 - -define-item "Bandages (3x)" - cost 5 - -define-item "Tea leaves" - cost 5 - -define-item "Sleeping potion" - cost 15 - -define-item "Leather pouch" - cost 2 - -define-item "Face mask" - cost 10 - -define-item "Dye" - cost 5 - -define-item "Cloth" - cost 5 - -define-item "Scissors" - cost 15 - -define-item "Needle and thread" - cost 3 - -define-item "Canvas" - cost 8 - -define-item "String" - cost 2 - -define-item "Hatchet" - cost 20 - -define-item "Map" - cost 35 - -define-item "Pony" - cost 100 - -define-item "Horse" - cost 180 - -define-item "Saddle and bridle" - cost 45 - -define-item "Saddlebag" - cost 35 - -define-item "Handmirror" - cost 20 - -define-item "Magnifying glass" - cost 20 - -define-item "Telescope" - cost 40 - -define-item "Rope ladder" - cost 15 - -define-item "Torches (3x)" - cost 10 - -define-item "Staff" - cost 10 - -define-item "Cooking pot" - cost 8 - -define-item "Soap" - cost 2 - -define-item "Towel" - cost 5 - -define-item "Boots" - cost 10 \ No newline at end of file diff --git a/ATL/test/example.atl b/ATL/test/example.atl deleted file mode 100644 index 3101edd..0000000 --- a/ATL/test/example.atl +++ /dev/null @@ -1,72 +0,0 @@ -# This is an example Atlantis file - I use it to explore what the language -# should end up looking like. - -load races.atl -load classes.atl - - -define-quest Kill hellhound - objective kill hellhound - reward gold 300 - - -define-spell Ray of death - type kill - min-intelligence 12 - success-rate 35 - - -define-npc Hades - say Oh, amazing, you actually got here! Who did you bribe? - sell 30 Ambrosia - quest Kill hellhound - - -define-item Scroll of light - value 80 - add-experience 20 - add-spell Ray of death - -define-item Ambrosia - category Food - add-health 5 - - -define-monster Hellhound - armor-class 8 - strength 10 - melee-weapon 2 claws - experience 50 - spawn 2 - aggression 60 - -define-monster Fury - armor-class 5 - strength 8 - melee-weapon 10 fire whip - experience 74 - spawn 0.8 - aggression 30 - - -define-place Nowhere - description Welcome to Nowhere! You are in the void, the space between \ -the worlds. Around you is black. Black, except for one tiny pin-prick of light \ -to the north. - neighbour Elysium - -define-place Elysium - description Congratulations! You have achieved Elysium! - neighbour Nowhere - neighbour Fields of punishment - npc Hades - item Scroll of light - -define-place Fields of punishment - description You really, really don't want to end up here... - neighbour Elysium - monster Hellhound - monster Fury - - -start-place Elysium \ No newline at end of file diff --git a/ATL/test/game-objects.atl b/ATL/test/game-objects.atl deleted file mode 100644 index 0a219ea..0000000 --- a/ATL/test/game-objects.atl +++ /dev/null @@ -1,58 +0,0 @@ -; This module defines items, NPCs, monsters and weapons for my -; Atlantis test world. -; @author Daniel Vedder -; @date 02/06/2015 - -define-monster "Fury" - description "Hades' messengers, torturers, assassins. Beware!" - health 10 - dexterity 20 - strength 10 - aggression 30 - spawn 50 - armour-class 3 - weapon "fire-whip" - item "fire-whip" - -define-item "fire-whip" - description "A 10-foot long whip, blazing with magical fire" - cost 180 - weapon - -define-weapon "fire-whip" - description "A 10-foot long whip, blazing with magical fire" - type "whip" - damage 2 - -define-item "Anaklusmos" - description "Riptide, a sword for heroes!" - weapon - -define-item "Lightning bolt" - description "Zeus lightning bolt - the most powerful weapon of the universe!" - weapon - -define-weapon "Anaklusmos" - description "Riptide, a sword for heroes!" - type "sword" - damage 4 - -define-weapon "Lightning bolt" ; primarily for debugging - description "Zeus lightning bolt - the most powerful weapon of the universe!" - type "magic" - damage 40 - -define-npc "Hades" - description "Hades, Lord of the Dead!" - says "Beware, mortal - do not tempt me!" - -define-npc "Charon" - description "A robe-clad ghoul, dread ferryman of the Styx." - says "..." - -define-npc "Persephone" ;testing the shop system - description "Hades' beautiful wife, bringer of summer." - says "Welcome, my friend from the upper world!" - sells "Sleeping potion" - sells "Handmirror" - sells "Book of Lore" \ No newline at end of file diff --git a/ATL/test/lisp-test.atl b/ATL/test/lisp-test.atl deleted file mode 100644 index c27ec79..0000000 --- a/ATL/test/lisp-test.atl +++ /dev/null @@ -1,53 +0,0 @@ -; This is a simple ATL file to test whatever I have implemented so far. -; @author Daniel Vedder -; @date 04/05/2015 - -name-world "Underworld" - -define-player "Start" - money 200 - place "Fields of Punishment" - max-health 50 - health 50 - -define-place "Nowhere" - description "Welcome to Nowhere! -You are in the void, the space between the worlds. Around you is black. -Black, except for one tiny pin-prick of light to the north." - neighbour "Styx" - dark - -define-place "Elysium" - description "This is where you want to be when you are six feet under..." - neighbour "Styx" - neighbour "Fields of Punishment" - neighbour "Fields of Asphodel" - npc "Persephone" - -define-place "Fields of Punishment" - description "Precisely where you do NOT want to end up..." - neighbour "Styx" - neighbour "Elysium" - neighbour "Fields of Asphodel" - monster "Fury" - spawns "Fury" - -define-place "Fields of Asphodel" - description "Nothing special. Really, nothing special at all. -Just a whole load of dead people..." - neighbour "Fields of Punishment" - neighbour "Elysium" - npc "Hades" - -define-place "Styx" - description "The great river that all must cross - but woe to those who do!" - neighbour "Fields of Punishment" - neighbour "Elysium" - neighbour "Nowhere" - item "Anaklusmos" - npc "Charon" - -load-file lisp-test.atl ;Testing whether recursive loading is prevented -load-file races-classes.atl -load-file game-objects.atl -load-file creator-test.atl diff --git a/ATL/test/races-classes.atl b/ATL/test/races-classes.atl deleted file mode 100644 index 659310f..0000000 --- a/ATL/test/races-classes.atl +++ /dev/null @@ -1,40 +0,0 @@ -; A file to define all the races and character classes in my test world. -; @author Daniel Vedder -; @date 18/05/2015 - -;;; RACES - -define-race "Elf" - description "The oldest and wisest race of Middle Earth" - -define-race "Dwarf" - description "Sons of the Earth, descendants of Durin" - -define-race "Hobbit" - description "Peace-loving and kind, true gentlemen" - -define-race "Human" - description "Boring, exciting, ever-changing, never-changing man..." - - -;;; CLASSES - -define-class "Warrior" - description "Fighting as a passion!" - special-item "Sword" - -define-class "Wizard" - description "Ancient, powerful, keepers of the Knowledge..." - special-item "staff" - -define-class "Burglar" - description "Breaking and entering taken to the max!" - special-item "lockpick" - special-item "torch" - -define-class "Craftsman" - description "Maker of all things beautiful and useful" - special-item "hammer" - -load-file lisp-test.atl ;Again, a test for recursive loading -load-file test-extension.lisp ;Testing whether Lisp extensions are loaded \ No newline at end of file diff --git a/ATL/Pooh/pooh.atl b/ATL/Pooh/pooh.atl index 181995f..b0498e3 100644 --- a/ATL/Pooh/pooh.atl +++ b/ATL/Pooh/pooh.atl @@ -14,3 +14,7 @@ define-player "Winnie the Pooh" description "A small but very lovable bear of very little brain." place "Pooh's home" + +define-player "Christopher Robin" + description "Pooh's best friend." + place "Western woods" diff --git a/ATL/dev/creator-test.atl b/ATL/dev/creator-test.atl new file mode 100644 index 0000000..6209e7c --- /dev/null +++ b/ATL/dev/creator-test.atl @@ -0,0 +1,185 @@ +;; This code has been automatically generated by the +;; Atlantis world creator. + +define-item "Rope (20m)" + cost 5 + +define-item "Backpack" + cost 5 + +define-item "Knife" + cost 10 + +define-item "Short sword" + cost 40 + +define-item "Long sword" + cost 80 + +define-item "Dagger" + cost 20 + +define-item "Spear" + cost 25 + +define-item "Short bow" + cost 30 + +define-item "Longbow" + cost 60 + +define-item "Slingshot" + cost 15 + +define-item "Throwing knife" + cost 15 + +define-item "Quiver of arrows" + cost 20 + +define-item "Leather armour" + cost 60 + +define-item "Chain mail" + cost 120 + +define-item "Plate armour" + cost 200 + +define-item "Buckler" + cost 35 + +define-item "Full shield" + cost 45 + +define-item "Candles (3x)" + cost 5 + +define-item "Matches" + cost 1 + +define-item "Food rations (5x)" + cost 10 + +define-item "Grappling hook" + cost 15 + +define-item "Fishing net" + cost 25 + +define-item "Fishing rod" + cost 15 + +define-item "Tent (2 people)" + cost 30 + +define-item "Cloak" + cost 15 + +define-item "Hat" + cost 10 + +define-item "Water bottle" + cost 5 + +define-item "Compass" + cost 20 + +define-item "Quill and ink" + cost 5 + +define-item "Parchment" + cost 5 + +define-item "Blanket" + cost 5 + +define-item "Book of Legends" + cost 55 + +define-item "Book of Lore" + cost 55 + +define-item "Medicinal herbs" + cost 10 + +define-item "Bandages (3x)" + cost 5 + +define-item "Tea leaves" + cost 5 + +define-item "Sleeping potion" + cost 15 + +define-item "Leather pouch" + cost 2 + +define-item "Face mask" + cost 10 + +define-item "Dye" + cost 5 + +define-item "Cloth" + cost 5 + +define-item "Scissors" + cost 15 + +define-item "Needle and thread" + cost 3 + +define-item "Canvas" + cost 8 + +define-item "String" + cost 2 + +define-item "Hatchet" + cost 20 + +define-item "Map" + cost 35 + +define-item "Pony" + cost 100 + +define-item "Horse" + cost 180 + +define-item "Saddle and bridle" + cost 45 + +define-item "Saddlebag" + cost 35 + +define-item "Handmirror" + cost 20 + +define-item "Magnifying glass" + cost 20 + +define-item "Telescope" + cost 40 + +define-item "Rope ladder" + cost 15 + +define-item "Torches (3x)" + cost 10 + +define-item "Staff" + cost 10 + +define-item "Cooking pot" + cost 8 + +define-item "Soap" + cost 2 + +define-item "Towel" + cost 5 + +define-item "Boots" + cost 10 \ No newline at end of file diff --git a/ATL/dev/example.atl b/ATL/dev/example.atl new file mode 100644 index 0000000..3101edd --- /dev/null +++ b/ATL/dev/example.atl @@ -0,0 +1,72 @@ +# This is an example Atlantis file - I use it to explore what the language +# should end up looking like. + +load races.atl +load classes.atl + + +define-quest Kill hellhound + objective kill hellhound + reward gold 300 + + +define-spell Ray of death + type kill + min-intelligence 12 + success-rate 35 + + +define-npc Hades + say Oh, amazing, you actually got here! Who did you bribe? + sell 30 Ambrosia + quest Kill hellhound + + +define-item Scroll of light + value 80 + add-experience 20 + add-spell Ray of death + +define-item Ambrosia + category Food + add-health 5 + + +define-monster Hellhound + armor-class 8 + strength 10 + melee-weapon 2 claws + experience 50 + spawn 2 + aggression 60 + +define-monster Fury + armor-class 5 + strength 8 + melee-weapon 10 fire whip + experience 74 + spawn 0.8 + aggression 30 + + +define-place Nowhere + description Welcome to Nowhere! You are in the void, the space between \ +the worlds. Around you is black. Black, except for one tiny pin-prick of light \ +to the north. + neighbour Elysium + +define-place Elysium + description Congratulations! You have achieved Elysium! + neighbour Nowhere + neighbour Fields of punishment + npc Hades + item Scroll of light + +define-place Fields of punishment + description You really, really don't want to end up here... + neighbour Elysium + monster Hellhound + monster Fury + + +start-place Elysium \ No newline at end of file diff --git a/ATL/dev/game-objects.atl b/ATL/dev/game-objects.atl new file mode 100644 index 0000000..0a219ea --- /dev/null +++ b/ATL/dev/game-objects.atl @@ -0,0 +1,58 @@ +; This module defines items, NPCs, monsters and weapons for my +; Atlantis test world. +; @author Daniel Vedder +; @date 02/06/2015 + +define-monster "Fury" + description "Hades' messengers, torturers, assassins. Beware!" + health 10 + dexterity 20 + strength 10 + aggression 30 + spawn 50 + armour-class 3 + weapon "fire-whip" + item "fire-whip" + +define-item "fire-whip" + description "A 10-foot long whip, blazing with magical fire" + cost 180 + weapon + +define-weapon "fire-whip" + description "A 10-foot long whip, blazing with magical fire" + type "whip" + damage 2 + +define-item "Anaklusmos" + description "Riptide, a sword for heroes!" + weapon + +define-item "Lightning bolt" + description "Zeus lightning bolt - the most powerful weapon of the universe!" + weapon + +define-weapon "Anaklusmos" + description "Riptide, a sword for heroes!" + type "sword" + damage 4 + +define-weapon "Lightning bolt" ; primarily for debugging + description "Zeus lightning bolt - the most powerful weapon of the universe!" + type "magic" + damage 40 + +define-npc "Hades" + description "Hades, Lord of the Dead!" + says "Beware, mortal - do not tempt me!" + +define-npc "Charon" + description "A robe-clad ghoul, dread ferryman of the Styx." + says "..." + +define-npc "Persephone" ;testing the shop system + description "Hades' beautiful wife, bringer of summer." + says "Welcome, my friend from the upper world!" + sells "Sleeping potion" + sells "Handmirror" + sells "Book of Lore" \ No newline at end of file diff --git a/ATL/dev/lisp-test.atl b/ATL/dev/lisp-test.atl new file mode 100644 index 0000000..c27ec79 --- /dev/null +++ b/ATL/dev/lisp-test.atl @@ -0,0 +1,53 @@ +; This is a simple ATL file to test whatever I have implemented so far. +; @author Daniel Vedder +; @date 04/05/2015 + +name-world "Underworld" + +define-player "Start" + money 200 + place "Fields of Punishment" + max-health 50 + health 50 + +define-place "Nowhere" + description "Welcome to Nowhere! +You are in the void, the space between the worlds. Around you is black. +Black, except for one tiny pin-prick of light to the north." + neighbour "Styx" + dark + +define-place "Elysium" + description "This is where you want to be when you are six feet under..." + neighbour "Styx" + neighbour "Fields of Punishment" + neighbour "Fields of Asphodel" + npc "Persephone" + +define-place "Fields of Punishment" + description "Precisely where you do NOT want to end up..." + neighbour "Styx" + neighbour "Elysium" + neighbour "Fields of Asphodel" + monster "Fury" + spawns "Fury" + +define-place "Fields of Asphodel" + description "Nothing special. Really, nothing special at all. +Just a whole load of dead people..." + neighbour "Fields of Punishment" + neighbour "Elysium" + npc "Hades" + +define-place "Styx" + description "The great river that all must cross - but woe to those who do!" + neighbour "Fields of Punishment" + neighbour "Elysium" + neighbour "Nowhere" + item "Anaklusmos" + npc "Charon" + +load-file lisp-test.atl ;Testing whether recursive loading is prevented +load-file races-classes.atl +load-file game-objects.atl +load-file creator-test.atl diff --git a/ATL/dev/races-classes.atl b/ATL/dev/races-classes.atl new file mode 100644 index 0000000..659310f --- /dev/null +++ b/ATL/dev/races-classes.atl @@ -0,0 +1,40 @@ +; A file to define all the races and character classes in my test world. +; @author Daniel Vedder +; @date 18/05/2015 + +;;; RACES + +define-race "Elf" + description "The oldest and wisest race of Middle Earth" + +define-race "Dwarf" + description "Sons of the Earth, descendants of Durin" + +define-race "Hobbit" + description "Peace-loving and kind, true gentlemen" + +define-race "Human" + description "Boring, exciting, ever-changing, never-changing man..." + + +;;; CLASSES + +define-class "Warrior" + description "Fighting as a passion!" + special-item "Sword" + +define-class "Wizard" + description "Ancient, powerful, keepers of the Knowledge..." + special-item "staff" + +define-class "Burglar" + description "Breaking and entering taken to the max!" + special-item "lockpick" + special-item "torch" + +define-class "Craftsman" + description "Maker of all things beautiful and useful" + special-item "hammer" + +load-file lisp-test.atl ;Again, a test for recursive loading +load-file test-extension.lisp ;Testing whether Lisp extensions are loaded \ No newline at end of file diff --git a/ATL/dev/test-extension.lisp b/ATL/dev/test-extension.lisp new file mode 100644 index 0000000..f01660a --- /dev/null +++ b/ATL/dev/test-extension.lisp @@ -0,0 +1,5 @@ +;; This file tests whether the interpreter loads Lisp files correctly. +;; author: Daniel Vedder +;; date: 21/05/2015 + +(debugging "~&Loaded Lisp extension file.") diff --git a/ATL/test/creator-test.atl b/ATL/test/creator-test.atl deleted file mode 100644 index 6209e7c..0000000 --- a/ATL/test/creator-test.atl +++ /dev/null @@ -1,185 +0,0 @@ -;; This code has been automatically generated by the -;; Atlantis world creator. - -define-item "Rope (20m)" - cost 5 - -define-item "Backpack" - cost 5 - -define-item "Knife" - cost 10 - -define-item "Short sword" - cost 40 - -define-item "Long sword" - cost 80 - -define-item "Dagger" - cost 20 - -define-item "Spear" - cost 25 - -define-item "Short bow" - cost 30 - -define-item "Longbow" - cost 60 - -define-item "Slingshot" - cost 15 - -define-item "Throwing knife" - cost 15 - -define-item "Quiver of arrows" - cost 20 - -define-item "Leather armour" - cost 60 - -define-item "Chain mail" - cost 120 - -define-item "Plate armour" - cost 200 - -define-item "Buckler" - cost 35 - -define-item "Full shield" - cost 45 - -define-item "Candles (3x)" - cost 5 - -define-item "Matches" - cost 1 - -define-item "Food rations (5x)" - cost 10 - -define-item "Grappling hook" - cost 15 - -define-item "Fishing net" - cost 25 - -define-item "Fishing rod" - cost 15 - -define-item "Tent (2 people)" - cost 30 - -define-item "Cloak" - cost 15 - -define-item "Hat" - cost 10 - -define-item "Water bottle" - cost 5 - -define-item "Compass" - cost 20 - -define-item "Quill and ink" - cost 5 - -define-item "Parchment" - cost 5 - -define-item "Blanket" - cost 5 - -define-item "Book of Legends" - cost 55 - -define-item "Book of Lore" - cost 55 - -define-item "Medicinal herbs" - cost 10 - -define-item "Bandages (3x)" - cost 5 - -define-item "Tea leaves" - cost 5 - -define-item "Sleeping potion" - cost 15 - -define-item "Leather pouch" - cost 2 - -define-item "Face mask" - cost 10 - -define-item "Dye" - cost 5 - -define-item "Cloth" - cost 5 - -define-item "Scissors" - cost 15 - -define-item "Needle and thread" - cost 3 - -define-item "Canvas" - cost 8 - -define-item "String" - cost 2 - -define-item "Hatchet" - cost 20 - -define-item "Map" - cost 35 - -define-item "Pony" - cost 100 - -define-item "Horse" - cost 180 - -define-item "Saddle and bridle" - cost 45 - -define-item "Saddlebag" - cost 35 - -define-item "Handmirror" - cost 20 - -define-item "Magnifying glass" - cost 20 - -define-item "Telescope" - cost 40 - -define-item "Rope ladder" - cost 15 - -define-item "Torches (3x)" - cost 10 - -define-item "Staff" - cost 10 - -define-item "Cooking pot" - cost 8 - -define-item "Soap" - cost 2 - -define-item "Towel" - cost 5 - -define-item "Boots" - cost 10 \ No newline at end of file diff --git a/ATL/test/example.atl b/ATL/test/example.atl deleted file mode 100644 index 3101edd..0000000 --- a/ATL/test/example.atl +++ /dev/null @@ -1,72 +0,0 @@ -# This is an example Atlantis file - I use it to explore what the language -# should end up looking like. - -load races.atl -load classes.atl - - -define-quest Kill hellhound - objective kill hellhound - reward gold 300 - - -define-spell Ray of death - type kill - min-intelligence 12 - success-rate 35 - - -define-npc Hades - say Oh, amazing, you actually got here! Who did you bribe? - sell 30 Ambrosia - quest Kill hellhound - - -define-item Scroll of light - value 80 - add-experience 20 - add-spell Ray of death - -define-item Ambrosia - category Food - add-health 5 - - -define-monster Hellhound - armor-class 8 - strength 10 - melee-weapon 2 claws - experience 50 - spawn 2 - aggression 60 - -define-monster Fury - armor-class 5 - strength 8 - melee-weapon 10 fire whip - experience 74 - spawn 0.8 - aggression 30 - - -define-place Nowhere - description Welcome to Nowhere! You are in the void, the space between \ -the worlds. Around you is black. Black, except for one tiny pin-prick of light \ -to the north. - neighbour Elysium - -define-place Elysium - description Congratulations! You have achieved Elysium! - neighbour Nowhere - neighbour Fields of punishment - npc Hades - item Scroll of light - -define-place Fields of punishment - description You really, really don't want to end up here... - neighbour Elysium - monster Hellhound - monster Fury - - -start-place Elysium \ No newline at end of file diff --git a/ATL/test/game-objects.atl b/ATL/test/game-objects.atl deleted file mode 100644 index 0a219ea..0000000 --- a/ATL/test/game-objects.atl +++ /dev/null @@ -1,58 +0,0 @@ -; This module defines items, NPCs, monsters and weapons for my -; Atlantis test world. -; @author Daniel Vedder -; @date 02/06/2015 - -define-monster "Fury" - description "Hades' messengers, torturers, assassins. Beware!" - health 10 - dexterity 20 - strength 10 - aggression 30 - spawn 50 - armour-class 3 - weapon "fire-whip" - item "fire-whip" - -define-item "fire-whip" - description "A 10-foot long whip, blazing with magical fire" - cost 180 - weapon - -define-weapon "fire-whip" - description "A 10-foot long whip, blazing with magical fire" - type "whip" - damage 2 - -define-item "Anaklusmos" - description "Riptide, a sword for heroes!" - weapon - -define-item "Lightning bolt" - description "Zeus lightning bolt - the most powerful weapon of the universe!" - weapon - -define-weapon "Anaklusmos" - description "Riptide, a sword for heroes!" - type "sword" - damage 4 - -define-weapon "Lightning bolt" ; primarily for debugging - description "Zeus lightning bolt - the most powerful weapon of the universe!" - type "magic" - damage 40 - -define-npc "Hades" - description "Hades, Lord of the Dead!" - says "Beware, mortal - do not tempt me!" - -define-npc "Charon" - description "A robe-clad ghoul, dread ferryman of the Styx." - says "..." - -define-npc "Persephone" ;testing the shop system - description "Hades' beautiful wife, bringer of summer." - says "Welcome, my friend from the upper world!" - sells "Sleeping potion" - sells "Handmirror" - sells "Book of Lore" \ No newline at end of file diff --git a/ATL/test/lisp-test.atl b/ATL/test/lisp-test.atl deleted file mode 100644 index c27ec79..0000000 --- a/ATL/test/lisp-test.atl +++ /dev/null @@ -1,53 +0,0 @@ -; This is a simple ATL file to test whatever I have implemented so far. -; @author Daniel Vedder -; @date 04/05/2015 - -name-world "Underworld" - -define-player "Start" - money 200 - place "Fields of Punishment" - max-health 50 - health 50 - -define-place "Nowhere" - description "Welcome to Nowhere! -You are in the void, the space between the worlds. Around you is black. -Black, except for one tiny pin-prick of light to the north." - neighbour "Styx" - dark - -define-place "Elysium" - description "This is where you want to be when you are six feet under..." - neighbour "Styx" - neighbour "Fields of Punishment" - neighbour "Fields of Asphodel" - npc "Persephone" - -define-place "Fields of Punishment" - description "Precisely where you do NOT want to end up..." - neighbour "Styx" - neighbour "Elysium" - neighbour "Fields of Asphodel" - monster "Fury" - spawns "Fury" - -define-place "Fields of Asphodel" - description "Nothing special. Really, nothing special at all. -Just a whole load of dead people..." - neighbour "Fields of Punishment" - neighbour "Elysium" - npc "Hades" - -define-place "Styx" - description "The great river that all must cross - but woe to those who do!" - neighbour "Fields of Punishment" - neighbour "Elysium" - neighbour "Nowhere" - item "Anaklusmos" - npc "Charon" - -load-file lisp-test.atl ;Testing whether recursive loading is prevented -load-file races-classes.atl -load-file game-objects.atl -load-file creator-test.atl diff --git a/ATL/test/races-classes.atl b/ATL/test/races-classes.atl deleted file mode 100644 index 659310f..0000000 --- a/ATL/test/races-classes.atl +++ /dev/null @@ -1,40 +0,0 @@ -; A file to define all the races and character classes in my test world. -; @author Daniel Vedder -; @date 18/05/2015 - -;;; RACES - -define-race "Elf" - description "The oldest and wisest race of Middle Earth" - -define-race "Dwarf" - description "Sons of the Earth, descendants of Durin" - -define-race "Hobbit" - description "Peace-loving and kind, true gentlemen" - -define-race "Human" - description "Boring, exciting, ever-changing, never-changing man..." - - -;;; CLASSES - -define-class "Warrior" - description "Fighting as a passion!" - special-item "Sword" - -define-class "Wizard" - description "Ancient, powerful, keepers of the Knowledge..." - special-item "staff" - -define-class "Burglar" - description "Breaking and entering taken to the max!" - special-item "lockpick" - special-item "torch" - -define-class "Craftsman" - description "Maker of all things beautiful and useful" - special-item "hammer" - -load-file lisp-test.atl ;Again, a test for recursive loading -load-file test-extension.lisp ;Testing whether Lisp extensions are loaded \ No newline at end of file diff --git a/ATL/test/test-extension.lisp b/ATL/test/test-extension.lisp deleted file mode 100644 index f01660a..0000000 --- a/ATL/test/test-extension.lisp +++ /dev/null @@ -1,5 +0,0 @@ -;; This file tests whether the interpreter loads Lisp files correctly. -;; author: Daniel Vedder -;; date: 21/05/2015 - -(debugging "~&Loaded Lisp extension file.") diff --git a/ATL/Pooh/pooh.atl b/ATL/Pooh/pooh.atl index 181995f..b0498e3 100644 --- a/ATL/Pooh/pooh.atl +++ b/ATL/Pooh/pooh.atl @@ -14,3 +14,7 @@ define-player "Winnie the Pooh" description "A small but very lovable bear of very little brain." place "Pooh's home" + +define-player "Christopher Robin" + description "Pooh's best friend." + place "Western woods" diff --git a/ATL/dev/creator-test.atl b/ATL/dev/creator-test.atl new file mode 100644 index 0000000..6209e7c --- /dev/null +++ b/ATL/dev/creator-test.atl @@ -0,0 +1,185 @@ +;; This code has been automatically generated by the +;; Atlantis world creator. + +define-item "Rope (20m)" + cost 5 + +define-item "Backpack" + cost 5 + +define-item "Knife" + cost 10 + +define-item "Short sword" + cost 40 + +define-item "Long sword" + cost 80 + +define-item "Dagger" + cost 20 + +define-item "Spear" + cost 25 + +define-item "Short bow" + cost 30 + +define-item "Longbow" + cost 60 + +define-item "Slingshot" + cost 15 + +define-item "Throwing knife" + cost 15 + +define-item "Quiver of arrows" + cost 20 + +define-item "Leather armour" + cost 60 + +define-item "Chain mail" + cost 120 + +define-item "Plate armour" + cost 200 + +define-item "Buckler" + cost 35 + +define-item "Full shield" + cost 45 + +define-item "Candles (3x)" + cost 5 + +define-item "Matches" + cost 1 + +define-item "Food rations (5x)" + cost 10 + +define-item "Grappling hook" + cost 15 + +define-item "Fishing net" + cost 25 + +define-item "Fishing rod" + cost 15 + +define-item "Tent (2 people)" + cost 30 + +define-item "Cloak" + cost 15 + +define-item "Hat" + cost 10 + +define-item "Water bottle" + cost 5 + +define-item "Compass" + cost 20 + +define-item "Quill and ink" + cost 5 + +define-item "Parchment" + cost 5 + +define-item "Blanket" + cost 5 + +define-item "Book of Legends" + cost 55 + +define-item "Book of Lore" + cost 55 + +define-item "Medicinal herbs" + cost 10 + +define-item "Bandages (3x)" + cost 5 + +define-item "Tea leaves" + cost 5 + +define-item "Sleeping potion" + cost 15 + +define-item "Leather pouch" + cost 2 + +define-item "Face mask" + cost 10 + +define-item "Dye" + cost 5 + +define-item "Cloth" + cost 5 + +define-item "Scissors" + cost 15 + +define-item "Needle and thread" + cost 3 + +define-item "Canvas" + cost 8 + +define-item "String" + cost 2 + +define-item "Hatchet" + cost 20 + +define-item "Map" + cost 35 + +define-item "Pony" + cost 100 + +define-item "Horse" + cost 180 + +define-item "Saddle and bridle" + cost 45 + +define-item "Saddlebag" + cost 35 + +define-item "Handmirror" + cost 20 + +define-item "Magnifying glass" + cost 20 + +define-item "Telescope" + cost 40 + +define-item "Rope ladder" + cost 15 + +define-item "Torches (3x)" + cost 10 + +define-item "Staff" + cost 10 + +define-item "Cooking pot" + cost 8 + +define-item "Soap" + cost 2 + +define-item "Towel" + cost 5 + +define-item "Boots" + cost 10 \ No newline at end of file diff --git a/ATL/dev/example.atl b/ATL/dev/example.atl new file mode 100644 index 0000000..3101edd --- /dev/null +++ b/ATL/dev/example.atl @@ -0,0 +1,72 @@ +# This is an example Atlantis file - I use it to explore what the language +# should end up looking like. + +load races.atl +load classes.atl + + +define-quest Kill hellhound + objective kill hellhound + reward gold 300 + + +define-spell Ray of death + type kill + min-intelligence 12 + success-rate 35 + + +define-npc Hades + say Oh, amazing, you actually got here! Who did you bribe? + sell 30 Ambrosia + quest Kill hellhound + + +define-item Scroll of light + value 80 + add-experience 20 + add-spell Ray of death + +define-item Ambrosia + category Food + add-health 5 + + +define-monster Hellhound + armor-class 8 + strength 10 + melee-weapon 2 claws + experience 50 + spawn 2 + aggression 60 + +define-monster Fury + armor-class 5 + strength 8 + melee-weapon 10 fire whip + experience 74 + spawn 0.8 + aggression 30 + + +define-place Nowhere + description Welcome to Nowhere! You are in the void, the space between \ +the worlds. Around you is black. Black, except for one tiny pin-prick of light \ +to the north. + neighbour Elysium + +define-place Elysium + description Congratulations! You have achieved Elysium! + neighbour Nowhere + neighbour Fields of punishment + npc Hades + item Scroll of light + +define-place Fields of punishment + description You really, really don't want to end up here... + neighbour Elysium + monster Hellhound + monster Fury + + +start-place Elysium \ No newline at end of file diff --git a/ATL/dev/game-objects.atl b/ATL/dev/game-objects.atl new file mode 100644 index 0000000..0a219ea --- /dev/null +++ b/ATL/dev/game-objects.atl @@ -0,0 +1,58 @@ +; This module defines items, NPCs, monsters and weapons for my +; Atlantis test world. +; @author Daniel Vedder +; @date 02/06/2015 + +define-monster "Fury" + description "Hades' messengers, torturers, assassins. Beware!" + health 10 + dexterity 20 + strength 10 + aggression 30 + spawn 50 + armour-class 3 + weapon "fire-whip" + item "fire-whip" + +define-item "fire-whip" + description "A 10-foot long whip, blazing with magical fire" + cost 180 + weapon + +define-weapon "fire-whip" + description "A 10-foot long whip, blazing with magical fire" + type "whip" + damage 2 + +define-item "Anaklusmos" + description "Riptide, a sword for heroes!" + weapon + +define-item "Lightning bolt" + description "Zeus lightning bolt - the most powerful weapon of the universe!" + weapon + +define-weapon "Anaklusmos" + description "Riptide, a sword for heroes!" + type "sword" + damage 4 + +define-weapon "Lightning bolt" ; primarily for debugging + description "Zeus lightning bolt - the most powerful weapon of the universe!" + type "magic" + damage 40 + +define-npc "Hades" + description "Hades, Lord of the Dead!" + says "Beware, mortal - do not tempt me!" + +define-npc "Charon" + description "A robe-clad ghoul, dread ferryman of the Styx." + says "..." + +define-npc "Persephone" ;testing the shop system + description "Hades' beautiful wife, bringer of summer." + says "Welcome, my friend from the upper world!" + sells "Sleeping potion" + sells "Handmirror" + sells "Book of Lore" \ No newline at end of file diff --git a/ATL/dev/lisp-test.atl b/ATL/dev/lisp-test.atl new file mode 100644 index 0000000..c27ec79 --- /dev/null +++ b/ATL/dev/lisp-test.atl @@ -0,0 +1,53 @@ +; This is a simple ATL file to test whatever I have implemented so far. +; @author Daniel Vedder +; @date 04/05/2015 + +name-world "Underworld" + +define-player "Start" + money 200 + place "Fields of Punishment" + max-health 50 + health 50 + +define-place "Nowhere" + description "Welcome to Nowhere! +You are in the void, the space between the worlds. Around you is black. +Black, except for one tiny pin-prick of light to the north." + neighbour "Styx" + dark + +define-place "Elysium" + description "This is where you want to be when you are six feet under..." + neighbour "Styx" + neighbour "Fields of Punishment" + neighbour "Fields of Asphodel" + npc "Persephone" + +define-place "Fields of Punishment" + description "Precisely where you do NOT want to end up..." + neighbour "Styx" + neighbour "Elysium" + neighbour "Fields of Asphodel" + monster "Fury" + spawns "Fury" + +define-place "Fields of Asphodel" + description "Nothing special. Really, nothing special at all. +Just a whole load of dead people..." + neighbour "Fields of Punishment" + neighbour "Elysium" + npc "Hades" + +define-place "Styx" + description "The great river that all must cross - but woe to those who do!" + neighbour "Fields of Punishment" + neighbour "Elysium" + neighbour "Nowhere" + item "Anaklusmos" + npc "Charon" + +load-file lisp-test.atl ;Testing whether recursive loading is prevented +load-file races-classes.atl +load-file game-objects.atl +load-file creator-test.atl diff --git a/ATL/dev/races-classes.atl b/ATL/dev/races-classes.atl new file mode 100644 index 0000000..659310f --- /dev/null +++ b/ATL/dev/races-classes.atl @@ -0,0 +1,40 @@ +; A file to define all the races and character classes in my test world. +; @author Daniel Vedder +; @date 18/05/2015 + +;;; RACES + +define-race "Elf" + description "The oldest and wisest race of Middle Earth" + +define-race "Dwarf" + description "Sons of the Earth, descendants of Durin" + +define-race "Hobbit" + description "Peace-loving and kind, true gentlemen" + +define-race "Human" + description "Boring, exciting, ever-changing, never-changing man..." + + +;;; CLASSES + +define-class "Warrior" + description "Fighting as a passion!" + special-item "Sword" + +define-class "Wizard" + description "Ancient, powerful, keepers of the Knowledge..." + special-item "staff" + +define-class "Burglar" + description "Breaking and entering taken to the max!" + special-item "lockpick" + special-item "torch" + +define-class "Craftsman" + description "Maker of all things beautiful and useful" + special-item "hammer" + +load-file lisp-test.atl ;Again, a test for recursive loading +load-file test-extension.lisp ;Testing whether Lisp extensions are loaded \ No newline at end of file diff --git a/ATL/dev/test-extension.lisp b/ATL/dev/test-extension.lisp new file mode 100644 index 0000000..f01660a --- /dev/null +++ b/ATL/dev/test-extension.lisp @@ -0,0 +1,5 @@ +;; This file tests whether the interpreter loads Lisp files correctly. +;; author: Daniel Vedder +;; date: 21/05/2015 + +(debugging "~&Loaded Lisp extension file.") diff --git a/ATL/test/creator-test.atl b/ATL/test/creator-test.atl deleted file mode 100644 index 6209e7c..0000000 --- a/ATL/test/creator-test.atl +++ /dev/null @@ -1,185 +0,0 @@ -;; This code has been automatically generated by the -;; Atlantis world creator. - -define-item "Rope (20m)" - cost 5 - -define-item "Backpack" - cost 5 - -define-item "Knife" - cost 10 - -define-item "Short sword" - cost 40 - -define-item "Long sword" - cost 80 - -define-item "Dagger" - cost 20 - -define-item "Spear" - cost 25 - -define-item "Short bow" - cost 30 - -define-item "Longbow" - cost 60 - -define-item "Slingshot" - cost 15 - -define-item "Throwing knife" - cost 15 - -define-item "Quiver of arrows" - cost 20 - -define-item "Leather armour" - cost 60 - -define-item "Chain mail" - cost 120 - -define-item "Plate armour" - cost 200 - -define-item "Buckler" - cost 35 - -define-item "Full shield" - cost 45 - -define-item "Candles (3x)" - cost 5 - -define-item "Matches" - cost 1 - -define-item "Food rations (5x)" - cost 10 - -define-item "Grappling hook" - cost 15 - -define-item "Fishing net" - cost 25 - -define-item "Fishing rod" - cost 15 - -define-item "Tent (2 people)" - cost 30 - -define-item "Cloak" - cost 15 - -define-item "Hat" - cost 10 - -define-item "Water bottle" - cost 5 - -define-item "Compass" - cost 20 - -define-item "Quill and ink" - cost 5 - -define-item "Parchment" - cost 5 - -define-item "Blanket" - cost 5 - -define-item "Book of Legends" - cost 55 - -define-item "Book of Lore" - cost 55 - -define-item "Medicinal herbs" - cost 10 - -define-item "Bandages (3x)" - cost 5 - -define-item "Tea leaves" - cost 5 - -define-item "Sleeping potion" - cost 15 - -define-item "Leather pouch" - cost 2 - -define-item "Face mask" - cost 10 - -define-item "Dye" - cost 5 - -define-item "Cloth" - cost 5 - -define-item "Scissors" - cost 15 - -define-item "Needle and thread" - cost 3 - -define-item "Canvas" - cost 8 - -define-item "String" - cost 2 - -define-item "Hatchet" - cost 20 - -define-item "Map" - cost 35 - -define-item "Pony" - cost 100 - -define-item "Horse" - cost 180 - -define-item "Saddle and bridle" - cost 45 - -define-item "Saddlebag" - cost 35 - -define-item "Handmirror" - cost 20 - -define-item "Magnifying glass" - cost 20 - -define-item "Telescope" - cost 40 - -define-item "Rope ladder" - cost 15 - -define-item "Torches (3x)" - cost 10 - -define-item "Staff" - cost 10 - -define-item "Cooking pot" - cost 8 - -define-item "Soap" - cost 2 - -define-item "Towel" - cost 5 - -define-item "Boots" - cost 10 \ No newline at end of file diff --git a/ATL/test/example.atl b/ATL/test/example.atl deleted file mode 100644 index 3101edd..0000000 --- a/ATL/test/example.atl +++ /dev/null @@ -1,72 +0,0 @@ -# This is an example Atlantis file - I use it to explore what the language -# should end up looking like. - -load races.atl -load classes.atl - - -define-quest Kill hellhound - objective kill hellhound - reward gold 300 - - -define-spell Ray of death - type kill - min-intelligence 12 - success-rate 35 - - -define-npc Hades - say Oh, amazing, you actually got here! Who did you bribe? - sell 30 Ambrosia - quest Kill hellhound - - -define-item Scroll of light - value 80 - add-experience 20 - add-spell Ray of death - -define-item Ambrosia - category Food - add-health 5 - - -define-monster Hellhound - armor-class 8 - strength 10 - melee-weapon 2 claws - experience 50 - spawn 2 - aggression 60 - -define-monster Fury - armor-class 5 - strength 8 - melee-weapon 10 fire whip - experience 74 - spawn 0.8 - aggression 30 - - -define-place Nowhere - description Welcome to Nowhere! You are in the void, the space between \ -the worlds. Around you is black. Black, except for one tiny pin-prick of light \ -to the north. - neighbour Elysium - -define-place Elysium - description Congratulations! You have achieved Elysium! - neighbour Nowhere - neighbour Fields of punishment - npc Hades - item Scroll of light - -define-place Fields of punishment - description You really, really don't want to end up here... - neighbour Elysium - monster Hellhound - monster Fury - - -start-place Elysium \ No newline at end of file diff --git a/ATL/test/game-objects.atl b/ATL/test/game-objects.atl deleted file mode 100644 index 0a219ea..0000000 --- a/ATL/test/game-objects.atl +++ /dev/null @@ -1,58 +0,0 @@ -; This module defines items, NPCs, monsters and weapons for my -; Atlantis test world. -; @author Daniel Vedder -; @date 02/06/2015 - -define-monster "Fury" - description "Hades' messengers, torturers, assassins. Beware!" - health 10 - dexterity 20 - strength 10 - aggression 30 - spawn 50 - armour-class 3 - weapon "fire-whip" - item "fire-whip" - -define-item "fire-whip" - description "A 10-foot long whip, blazing with magical fire" - cost 180 - weapon - -define-weapon "fire-whip" - description "A 10-foot long whip, blazing with magical fire" - type "whip" - damage 2 - -define-item "Anaklusmos" - description "Riptide, a sword for heroes!" - weapon - -define-item "Lightning bolt" - description "Zeus lightning bolt - the most powerful weapon of the universe!" - weapon - -define-weapon "Anaklusmos" - description "Riptide, a sword for heroes!" - type "sword" - damage 4 - -define-weapon "Lightning bolt" ; primarily for debugging - description "Zeus lightning bolt - the most powerful weapon of the universe!" - type "magic" - damage 40 - -define-npc "Hades" - description "Hades, Lord of the Dead!" - says "Beware, mortal - do not tempt me!" - -define-npc "Charon" - description "A robe-clad ghoul, dread ferryman of the Styx." - says "..." - -define-npc "Persephone" ;testing the shop system - description "Hades' beautiful wife, bringer of summer." - says "Welcome, my friend from the upper world!" - sells "Sleeping potion" - sells "Handmirror" - sells "Book of Lore" \ No newline at end of file diff --git a/ATL/test/lisp-test.atl b/ATL/test/lisp-test.atl deleted file mode 100644 index c27ec79..0000000 --- a/ATL/test/lisp-test.atl +++ /dev/null @@ -1,53 +0,0 @@ -; This is a simple ATL file to test whatever I have implemented so far. -; @author Daniel Vedder -; @date 04/05/2015 - -name-world "Underworld" - -define-player "Start" - money 200 - place "Fields of Punishment" - max-health 50 - health 50 - -define-place "Nowhere" - description "Welcome to Nowhere! -You are in the void, the space between the worlds. Around you is black. -Black, except for one tiny pin-prick of light to the north." - neighbour "Styx" - dark - -define-place "Elysium" - description "This is where you want to be when you are six feet under..." - neighbour "Styx" - neighbour "Fields of Punishment" - neighbour "Fields of Asphodel" - npc "Persephone" - -define-place "Fields of Punishment" - description "Precisely where you do NOT want to end up..." - neighbour "Styx" - neighbour "Elysium" - neighbour "Fields of Asphodel" - monster "Fury" - spawns "Fury" - -define-place "Fields of Asphodel" - description "Nothing special. Really, nothing special at all. -Just a whole load of dead people..." - neighbour "Fields of Punishment" - neighbour "Elysium" - npc "Hades" - -define-place "Styx" - description "The great river that all must cross - but woe to those who do!" - neighbour "Fields of Punishment" - neighbour "Elysium" - neighbour "Nowhere" - item "Anaklusmos" - npc "Charon" - -load-file lisp-test.atl ;Testing whether recursive loading is prevented -load-file races-classes.atl -load-file game-objects.atl -load-file creator-test.atl diff --git a/ATL/test/races-classes.atl b/ATL/test/races-classes.atl deleted file mode 100644 index 659310f..0000000 --- a/ATL/test/races-classes.atl +++ /dev/null @@ -1,40 +0,0 @@ -; A file to define all the races and character classes in my test world. -; @author Daniel Vedder -; @date 18/05/2015 - -;;; RACES - -define-race "Elf" - description "The oldest and wisest race of Middle Earth" - -define-race "Dwarf" - description "Sons of the Earth, descendants of Durin" - -define-race "Hobbit" - description "Peace-loving and kind, true gentlemen" - -define-race "Human" - description "Boring, exciting, ever-changing, never-changing man..." - - -;;; CLASSES - -define-class "Warrior" - description "Fighting as a passion!" - special-item "Sword" - -define-class "Wizard" - description "Ancient, powerful, keepers of the Knowledge..." - special-item "staff" - -define-class "Burglar" - description "Breaking and entering taken to the max!" - special-item "lockpick" - special-item "torch" - -define-class "Craftsman" - description "Maker of all things beautiful and useful" - special-item "hammer" - -load-file lisp-test.atl ;Again, a test for recursive loading -load-file test-extension.lisp ;Testing whether Lisp extensions are loaded \ No newline at end of file diff --git a/ATL/test/test-extension.lisp b/ATL/test/test-extension.lisp deleted file mode 100644 index f01660a..0000000 --- a/ATL/test/test-extension.lisp +++ /dev/null @@ -1,5 +0,0 @@ -;; This file tests whether the interpreter loads Lisp files correctly. -;; author: Daniel Vedder -;; date: 21/05/2015 - -(debugging "~&Loaded Lisp extension file.") diff --git a/lisp/atlantis.lisp b/lisp/atlantis.lisp index 4401088..afa9bf2 100644 --- a/lisp/atlantis.lisp +++ b/lisp/atlantis.lisp @@ -19,6 +19,12 @@ (defvar *debugging* NIL) +;; Game worlds must be registered in this list with a display name +;; and a path relative to ../ATL +(defvar *games* '(("Lugwey" "Lugwey/lugwey.atl") + ("Winnie the Pooh" "Pooh/pooh.atl") + ("Development" "dev/test.atl"))) + (defun development () "A method to easily test whatever feature I am currently developing" (setf *debugging* T) @@ -49,26 +55,33 @@ (setf options '("Start a new game" "Load a game" "Create worlds" "Develop" "About" "Exit")) (case (choose-number-option options) + (0 (format t "~&Which world do you want to play?") + ;; let the player choose one of the game worlds + (let ((world (choose-option + (append (keys *games*) '("Other" "Back"))))) + (cond ((equalp world "Back") (start-menu)) + ((equalp world "Other") + (format t "~&What world file do you want to load?") + (input-string world-file)) + (T (setf world-file (cassoc world *games*)))) + (setf world-file (concatenate 'string "../ATL/" world-file)) + (load-file world-file) + ;; let the player choose a character + (format t "~&Which character do you want to play?") + (let* ((char-nr (choose-number-option + (list-world-objects 'player))) + (char-name (nth char-nr (list-world-objects 'player)))) + (set-main-player char-name) + (play-game)))) ;;FIXME Present the player with a choice of saved games - (0 (format t "~&What world file do you want to load?") - (input-string world-file) - ;;FIXME Allowing only one player per world eliminates the need - ;; to ask for a player name - (format t "~&What is your name?") - (input-string name) - (load-file world-file) - (play-game name)) - ;;FIXME Present the player with a choice of game worlds - (1 (format t "~&What game file do you want to load?") + (1 ;(choose-number-option *games*) ;;XXXXXX + (format t "~&What game file do you want to load?") (input-string game) (setf game (concatenate 'string "../saves/" game)) (load-game game) - ;;FIXME Present the player with a choice of predefined characters - (format t "~&What is your name?") - (input-string name) - (play-game name)) + (play-game)) (2 (world-creator)) - (3 (development)) + (3 (development)) ;; XXX Remove this (4 (print-version) (when (y-or-n-p "Show the license text?") (print-text-file "../LICENSE")) diff --git a/ATL/Pooh/pooh.atl b/ATL/Pooh/pooh.atl index 181995f..b0498e3 100644 --- a/ATL/Pooh/pooh.atl +++ b/ATL/Pooh/pooh.atl @@ -14,3 +14,7 @@ define-player "Winnie the Pooh" description "A small but very lovable bear of very little brain." place "Pooh's home" + +define-player "Christopher Robin" + description "Pooh's best friend." + place "Western woods" diff --git a/ATL/dev/creator-test.atl b/ATL/dev/creator-test.atl new file mode 100644 index 0000000..6209e7c --- /dev/null +++ b/ATL/dev/creator-test.atl @@ -0,0 +1,185 @@ +;; This code has been automatically generated by the +;; Atlantis world creator. + +define-item "Rope (20m)" + cost 5 + +define-item "Backpack" + cost 5 + +define-item "Knife" + cost 10 + +define-item "Short sword" + cost 40 + +define-item "Long sword" + cost 80 + +define-item "Dagger" + cost 20 + +define-item "Spear" + cost 25 + +define-item "Short bow" + cost 30 + +define-item "Longbow" + cost 60 + +define-item "Slingshot" + cost 15 + +define-item "Throwing knife" + cost 15 + +define-item "Quiver of arrows" + cost 20 + +define-item "Leather armour" + cost 60 + +define-item "Chain mail" + cost 120 + +define-item "Plate armour" + cost 200 + +define-item "Buckler" + cost 35 + +define-item "Full shield" + cost 45 + +define-item "Candles (3x)" + cost 5 + +define-item "Matches" + cost 1 + +define-item "Food rations (5x)" + cost 10 + +define-item "Grappling hook" + cost 15 + +define-item "Fishing net" + cost 25 + +define-item "Fishing rod" + cost 15 + +define-item "Tent (2 people)" + cost 30 + +define-item "Cloak" + cost 15 + +define-item "Hat" + cost 10 + +define-item "Water bottle" + cost 5 + +define-item "Compass" + cost 20 + +define-item "Quill and ink" + cost 5 + +define-item "Parchment" + cost 5 + +define-item "Blanket" + cost 5 + +define-item "Book of Legends" + cost 55 + +define-item "Book of Lore" + cost 55 + +define-item "Medicinal herbs" + cost 10 + +define-item "Bandages (3x)" + cost 5 + +define-item "Tea leaves" + cost 5 + +define-item "Sleeping potion" + cost 15 + +define-item "Leather pouch" + cost 2 + +define-item "Face mask" + cost 10 + +define-item "Dye" + cost 5 + +define-item "Cloth" + cost 5 + +define-item "Scissors" + cost 15 + +define-item "Needle and thread" + cost 3 + +define-item "Canvas" + cost 8 + +define-item "String" + cost 2 + +define-item "Hatchet" + cost 20 + +define-item "Map" + cost 35 + +define-item "Pony" + cost 100 + +define-item "Horse" + cost 180 + +define-item "Saddle and bridle" + cost 45 + +define-item "Saddlebag" + cost 35 + +define-item "Handmirror" + cost 20 + +define-item "Magnifying glass" + cost 20 + +define-item "Telescope" + cost 40 + +define-item "Rope ladder" + cost 15 + +define-item "Torches (3x)" + cost 10 + +define-item "Staff" + cost 10 + +define-item "Cooking pot" + cost 8 + +define-item "Soap" + cost 2 + +define-item "Towel" + cost 5 + +define-item "Boots" + cost 10 \ No newline at end of file diff --git a/ATL/dev/example.atl b/ATL/dev/example.atl new file mode 100644 index 0000000..3101edd --- /dev/null +++ b/ATL/dev/example.atl @@ -0,0 +1,72 @@ +# This is an example Atlantis file - I use it to explore what the language +# should end up looking like. + +load races.atl +load classes.atl + + +define-quest Kill hellhound + objective kill hellhound + reward gold 300 + + +define-spell Ray of death + type kill + min-intelligence 12 + success-rate 35 + + +define-npc Hades + say Oh, amazing, you actually got here! Who did you bribe? + sell 30 Ambrosia + quest Kill hellhound + + +define-item Scroll of light + value 80 + add-experience 20 + add-spell Ray of death + +define-item Ambrosia + category Food + add-health 5 + + +define-monster Hellhound + armor-class 8 + strength 10 + melee-weapon 2 claws + experience 50 + spawn 2 + aggression 60 + +define-monster Fury + armor-class 5 + strength 8 + melee-weapon 10 fire whip + experience 74 + spawn 0.8 + aggression 30 + + +define-place Nowhere + description Welcome to Nowhere! You are in the void, the space between \ +the worlds. Around you is black. Black, except for one tiny pin-prick of light \ +to the north. + neighbour Elysium + +define-place Elysium + description Congratulations! You have achieved Elysium! + neighbour Nowhere + neighbour Fields of punishment + npc Hades + item Scroll of light + +define-place Fields of punishment + description You really, really don't want to end up here... + neighbour Elysium + monster Hellhound + monster Fury + + +start-place Elysium \ No newline at end of file diff --git a/ATL/dev/game-objects.atl b/ATL/dev/game-objects.atl new file mode 100644 index 0000000..0a219ea --- /dev/null +++ b/ATL/dev/game-objects.atl @@ -0,0 +1,58 @@ +; This module defines items, NPCs, monsters and weapons for my +; Atlantis test world. +; @author Daniel Vedder +; @date 02/06/2015 + +define-monster "Fury" + description "Hades' messengers, torturers, assassins. Beware!" + health 10 + dexterity 20 + strength 10 + aggression 30 + spawn 50 + armour-class 3 + weapon "fire-whip" + item "fire-whip" + +define-item "fire-whip" + description "A 10-foot long whip, blazing with magical fire" + cost 180 + weapon + +define-weapon "fire-whip" + description "A 10-foot long whip, blazing with magical fire" + type "whip" + damage 2 + +define-item "Anaklusmos" + description "Riptide, a sword for heroes!" + weapon + +define-item "Lightning bolt" + description "Zeus lightning bolt - the most powerful weapon of the universe!" + weapon + +define-weapon "Anaklusmos" + description "Riptide, a sword for heroes!" + type "sword" + damage 4 + +define-weapon "Lightning bolt" ; primarily for debugging + description "Zeus lightning bolt - the most powerful weapon of the universe!" + type "magic" + damage 40 + +define-npc "Hades" + description "Hades, Lord of the Dead!" + says "Beware, mortal - do not tempt me!" + +define-npc "Charon" + description "A robe-clad ghoul, dread ferryman of the Styx." + says "..." + +define-npc "Persephone" ;testing the shop system + description "Hades' beautiful wife, bringer of summer." + says "Welcome, my friend from the upper world!" + sells "Sleeping potion" + sells "Handmirror" + sells "Book of Lore" \ No newline at end of file diff --git a/ATL/dev/lisp-test.atl b/ATL/dev/lisp-test.atl new file mode 100644 index 0000000..c27ec79 --- /dev/null +++ b/ATL/dev/lisp-test.atl @@ -0,0 +1,53 @@ +; This is a simple ATL file to test whatever I have implemented so far. +; @author Daniel Vedder +; @date 04/05/2015 + +name-world "Underworld" + +define-player "Start" + money 200 + place "Fields of Punishment" + max-health 50 + health 50 + +define-place "Nowhere" + description "Welcome to Nowhere! +You are in the void, the space between the worlds. Around you is black. +Black, except for one tiny pin-prick of light to the north." + neighbour "Styx" + dark + +define-place "Elysium" + description "This is where you want to be when you are six feet under..." + neighbour "Styx" + neighbour "Fields of Punishment" + neighbour "Fields of Asphodel" + npc "Persephone" + +define-place "Fields of Punishment" + description "Precisely where you do NOT want to end up..." + neighbour "Styx" + neighbour "Elysium" + neighbour "Fields of Asphodel" + monster "Fury" + spawns "Fury" + +define-place "Fields of Asphodel" + description "Nothing special. Really, nothing special at all. +Just a whole load of dead people..." + neighbour "Fields of Punishment" + neighbour "Elysium" + npc "Hades" + +define-place "Styx" + description "The great river that all must cross - but woe to those who do!" + neighbour "Fields of Punishment" + neighbour "Elysium" + neighbour "Nowhere" + item "Anaklusmos" + npc "Charon" + +load-file lisp-test.atl ;Testing whether recursive loading is prevented +load-file races-classes.atl +load-file game-objects.atl +load-file creator-test.atl diff --git a/ATL/dev/races-classes.atl b/ATL/dev/races-classes.atl new file mode 100644 index 0000000..659310f --- /dev/null +++ b/ATL/dev/races-classes.atl @@ -0,0 +1,40 @@ +; A file to define all the races and character classes in my test world. +; @author Daniel Vedder +; @date 18/05/2015 + +;;; RACES + +define-race "Elf" + description "The oldest and wisest race of Middle Earth" + +define-race "Dwarf" + description "Sons of the Earth, descendants of Durin" + +define-race "Hobbit" + description "Peace-loving and kind, true gentlemen" + +define-race "Human" + description "Boring, exciting, ever-changing, never-changing man..." + + +;;; CLASSES + +define-class "Warrior" + description "Fighting as a passion!" + special-item "Sword" + +define-class "Wizard" + description "Ancient, powerful, keepers of the Knowledge..." + special-item "staff" + +define-class "Burglar" + description "Breaking and entering taken to the max!" + special-item "lockpick" + special-item "torch" + +define-class "Craftsman" + description "Maker of all things beautiful and useful" + special-item "hammer" + +load-file lisp-test.atl ;Again, a test for recursive loading +load-file test-extension.lisp ;Testing whether Lisp extensions are loaded \ No newline at end of file diff --git a/ATL/dev/test-extension.lisp b/ATL/dev/test-extension.lisp new file mode 100644 index 0000000..f01660a --- /dev/null +++ b/ATL/dev/test-extension.lisp @@ -0,0 +1,5 @@ +;; This file tests whether the interpreter loads Lisp files correctly. +;; author: Daniel Vedder +;; date: 21/05/2015 + +(debugging "~&Loaded Lisp extension file.") diff --git a/ATL/test/creator-test.atl b/ATL/test/creator-test.atl deleted file mode 100644 index 6209e7c..0000000 --- a/ATL/test/creator-test.atl +++ /dev/null @@ -1,185 +0,0 @@ -;; This code has been automatically generated by the -;; Atlantis world creator. - -define-item "Rope (20m)" - cost 5 - -define-item "Backpack" - cost 5 - -define-item "Knife" - cost 10 - -define-item "Short sword" - cost 40 - -define-item "Long sword" - cost 80 - -define-item "Dagger" - cost 20 - -define-item "Spear" - cost 25 - -define-item "Short bow" - cost 30 - -define-item "Longbow" - cost 60 - -define-item "Slingshot" - cost 15 - -define-item "Throwing knife" - cost 15 - -define-item "Quiver of arrows" - cost 20 - -define-item "Leather armour" - cost 60 - -define-item "Chain mail" - cost 120 - -define-item "Plate armour" - cost 200 - -define-item "Buckler" - cost 35 - -define-item "Full shield" - cost 45 - -define-item "Candles (3x)" - cost 5 - -define-item "Matches" - cost 1 - -define-item "Food rations (5x)" - cost 10 - -define-item "Grappling hook" - cost 15 - -define-item "Fishing net" - cost 25 - -define-item "Fishing rod" - cost 15 - -define-item "Tent (2 people)" - cost 30 - -define-item "Cloak" - cost 15 - -define-item "Hat" - cost 10 - -define-item "Water bottle" - cost 5 - -define-item "Compass" - cost 20 - -define-item "Quill and ink" - cost 5 - -define-item "Parchment" - cost 5 - -define-item "Blanket" - cost 5 - -define-item "Book of Legends" - cost 55 - -define-item "Book of Lore" - cost 55 - -define-item "Medicinal herbs" - cost 10 - -define-item "Bandages (3x)" - cost 5 - -define-item "Tea leaves" - cost 5 - -define-item "Sleeping potion" - cost 15 - -define-item "Leather pouch" - cost 2 - -define-item "Face mask" - cost 10 - -define-item "Dye" - cost 5 - -define-item "Cloth" - cost 5 - -define-item "Scissors" - cost 15 - -define-item "Needle and thread" - cost 3 - -define-item "Canvas" - cost 8 - -define-item "String" - cost 2 - -define-item "Hatchet" - cost 20 - -define-item "Map" - cost 35 - -define-item "Pony" - cost 100 - -define-item "Horse" - cost 180 - -define-item "Saddle and bridle" - cost 45 - -define-item "Saddlebag" - cost 35 - -define-item "Handmirror" - cost 20 - -define-item "Magnifying glass" - cost 20 - -define-item "Telescope" - cost 40 - -define-item "Rope ladder" - cost 15 - -define-item "Torches (3x)" - cost 10 - -define-item "Staff" - cost 10 - -define-item "Cooking pot" - cost 8 - -define-item "Soap" - cost 2 - -define-item "Towel" - cost 5 - -define-item "Boots" - cost 10 \ No newline at end of file diff --git a/ATL/test/example.atl b/ATL/test/example.atl deleted file mode 100644 index 3101edd..0000000 --- a/ATL/test/example.atl +++ /dev/null @@ -1,72 +0,0 @@ -# This is an example Atlantis file - I use it to explore what the language -# should end up looking like. - -load races.atl -load classes.atl - - -define-quest Kill hellhound - objective kill hellhound - reward gold 300 - - -define-spell Ray of death - type kill - min-intelligence 12 - success-rate 35 - - -define-npc Hades - say Oh, amazing, you actually got here! Who did you bribe? - sell 30 Ambrosia - quest Kill hellhound - - -define-item Scroll of light - value 80 - add-experience 20 - add-spell Ray of death - -define-item Ambrosia - category Food - add-health 5 - - -define-monster Hellhound - armor-class 8 - strength 10 - melee-weapon 2 claws - experience 50 - spawn 2 - aggression 60 - -define-monster Fury - armor-class 5 - strength 8 - melee-weapon 10 fire whip - experience 74 - spawn 0.8 - aggression 30 - - -define-place Nowhere - description Welcome to Nowhere! You are in the void, the space between \ -the worlds. Around you is black. Black, except for one tiny pin-prick of light \ -to the north. - neighbour Elysium - -define-place Elysium - description Congratulations! You have achieved Elysium! - neighbour Nowhere - neighbour Fields of punishment - npc Hades - item Scroll of light - -define-place Fields of punishment - description You really, really don't want to end up here... - neighbour Elysium - monster Hellhound - monster Fury - - -start-place Elysium \ No newline at end of file diff --git a/ATL/test/game-objects.atl b/ATL/test/game-objects.atl deleted file mode 100644 index 0a219ea..0000000 --- a/ATL/test/game-objects.atl +++ /dev/null @@ -1,58 +0,0 @@ -; This module defines items, NPCs, monsters and weapons for my -; Atlantis test world. -; @author Daniel Vedder -; @date 02/06/2015 - -define-monster "Fury" - description "Hades' messengers, torturers, assassins. Beware!" - health 10 - dexterity 20 - strength 10 - aggression 30 - spawn 50 - armour-class 3 - weapon "fire-whip" - item "fire-whip" - -define-item "fire-whip" - description "A 10-foot long whip, blazing with magical fire" - cost 180 - weapon - -define-weapon "fire-whip" - description "A 10-foot long whip, blazing with magical fire" - type "whip" - damage 2 - -define-item "Anaklusmos" - description "Riptide, a sword for heroes!" - weapon - -define-item "Lightning bolt" - description "Zeus lightning bolt - the most powerful weapon of the universe!" - weapon - -define-weapon "Anaklusmos" - description "Riptide, a sword for heroes!" - type "sword" - damage 4 - -define-weapon "Lightning bolt" ; primarily for debugging - description "Zeus lightning bolt - the most powerful weapon of the universe!" - type "magic" - damage 40 - -define-npc "Hades" - description "Hades, Lord of the Dead!" - says "Beware, mortal - do not tempt me!" - -define-npc "Charon" - description "A robe-clad ghoul, dread ferryman of the Styx." - says "..." - -define-npc "Persephone" ;testing the shop system - description "Hades' beautiful wife, bringer of summer." - says "Welcome, my friend from the upper world!" - sells "Sleeping potion" - sells "Handmirror" - sells "Book of Lore" \ No newline at end of file diff --git a/ATL/test/lisp-test.atl b/ATL/test/lisp-test.atl deleted file mode 100644 index c27ec79..0000000 --- a/ATL/test/lisp-test.atl +++ /dev/null @@ -1,53 +0,0 @@ -; This is a simple ATL file to test whatever I have implemented so far. -; @author Daniel Vedder -; @date 04/05/2015 - -name-world "Underworld" - -define-player "Start" - money 200 - place "Fields of Punishment" - max-health 50 - health 50 - -define-place "Nowhere" - description "Welcome to Nowhere! -You are in the void, the space between the worlds. Around you is black. -Black, except for one tiny pin-prick of light to the north." - neighbour "Styx" - dark - -define-place "Elysium" - description "This is where you want to be when you are six feet under..." - neighbour "Styx" - neighbour "Fields of Punishment" - neighbour "Fields of Asphodel" - npc "Persephone" - -define-place "Fields of Punishment" - description "Precisely where you do NOT want to end up..." - neighbour "Styx" - neighbour "Elysium" - neighbour "Fields of Asphodel" - monster "Fury" - spawns "Fury" - -define-place "Fields of Asphodel" - description "Nothing special. Really, nothing special at all. -Just a whole load of dead people..." - neighbour "Fields of Punishment" - neighbour "Elysium" - npc "Hades" - -define-place "Styx" - description "The great river that all must cross - but woe to those who do!" - neighbour "Fields of Punishment" - neighbour "Elysium" - neighbour "Nowhere" - item "Anaklusmos" - npc "Charon" - -load-file lisp-test.atl ;Testing whether recursive loading is prevented -load-file races-classes.atl -load-file game-objects.atl -load-file creator-test.atl diff --git a/ATL/test/races-classes.atl b/ATL/test/races-classes.atl deleted file mode 100644 index 659310f..0000000 --- a/ATL/test/races-classes.atl +++ /dev/null @@ -1,40 +0,0 @@ -; A file to define all the races and character classes in my test world. -; @author Daniel Vedder -; @date 18/05/2015 - -;;; RACES - -define-race "Elf" - description "The oldest and wisest race of Middle Earth" - -define-race "Dwarf" - description "Sons of the Earth, descendants of Durin" - -define-race "Hobbit" - description "Peace-loving and kind, true gentlemen" - -define-race "Human" - description "Boring, exciting, ever-changing, never-changing man..." - - -;;; CLASSES - -define-class "Warrior" - description "Fighting as a passion!" - special-item "Sword" - -define-class "Wizard" - description "Ancient, powerful, keepers of the Knowledge..." - special-item "staff" - -define-class "Burglar" - description "Breaking and entering taken to the max!" - special-item "lockpick" - special-item "torch" - -define-class "Craftsman" - description "Maker of all things beautiful and useful" - special-item "hammer" - -load-file lisp-test.atl ;Again, a test for recursive loading -load-file test-extension.lisp ;Testing whether Lisp extensions are loaded \ No newline at end of file diff --git a/ATL/test/test-extension.lisp b/ATL/test/test-extension.lisp deleted file mode 100644 index f01660a..0000000 --- a/ATL/test/test-extension.lisp +++ /dev/null @@ -1,5 +0,0 @@ -;; This file tests whether the interpreter loads Lisp files correctly. -;; author: Daniel Vedder -;; date: 21/05/2015 - -(debugging "~&Loaded Lisp extension file.") diff --git a/lisp/atlantis.lisp b/lisp/atlantis.lisp index 4401088..afa9bf2 100644 --- a/lisp/atlantis.lisp +++ b/lisp/atlantis.lisp @@ -19,6 +19,12 @@ (defvar *debugging* NIL) +;; Game worlds must be registered in this list with a display name +;; and a path relative to ../ATL +(defvar *games* '(("Lugwey" "Lugwey/lugwey.atl") + ("Winnie the Pooh" "Pooh/pooh.atl") + ("Development" "dev/test.atl"))) + (defun development () "A method to easily test whatever feature I am currently developing" (setf *debugging* T) @@ -49,26 +55,33 @@ (setf options '("Start a new game" "Load a game" "Create worlds" "Develop" "About" "Exit")) (case (choose-number-option options) + (0 (format t "~&Which world do you want to play?") + ;; let the player choose one of the game worlds + (let ((world (choose-option + (append (keys *games*) '("Other" "Back"))))) + (cond ((equalp world "Back") (start-menu)) + ((equalp world "Other") + (format t "~&What world file do you want to load?") + (input-string world-file)) + (T (setf world-file (cassoc world *games*)))) + (setf world-file (concatenate 'string "../ATL/" world-file)) + (load-file world-file) + ;; let the player choose a character + (format t "~&Which character do you want to play?") + (let* ((char-nr (choose-number-option + (list-world-objects 'player))) + (char-name (nth char-nr (list-world-objects 'player)))) + (set-main-player char-name) + (play-game)))) ;;FIXME Present the player with a choice of saved games - (0 (format t "~&What world file do you want to load?") - (input-string world-file) - ;;FIXME Allowing only one player per world eliminates the need - ;; to ask for a player name - (format t "~&What is your name?") - (input-string name) - (load-file world-file) - (play-game name)) - ;;FIXME Present the player with a choice of game worlds - (1 (format t "~&What game file do you want to load?") + (1 ;(choose-number-option *games*) ;;XXXXXX + (format t "~&What game file do you want to load?") (input-string game) (setf game (concatenate 'string "../saves/" game)) (load-game game) - ;;FIXME Present the player with a choice of predefined characters - (format t "~&What is your name?") - (input-string name) - (play-game name)) + (play-game)) (2 (world-creator)) - (3 (development)) + (3 (development)) ;; XXX Remove this (4 (print-version) (when (y-or-n-p "Show the license text?") (print-text-file "../LICENSE")) diff --git a/lisp/interpreter.lisp b/lisp/interpreter.lisp index 04ab683..439e27f 100644 --- a/lisp/interpreter.lisp +++ b/lisp/interpreter.lisp @@ -99,8 +99,8 @@ (first options) T)) (2 (set-object-attribute current-object (first options) (second options))) - ;; FIXME gives problems with lines like this: - ;; " ;commented" - should be fixed + ;; XXX gives problems with lines like this: + ;; " ;commented" - should be fixed now ? (t (error "~&ERROR: too many arguments: '~A'" line))))) (T ;; can't happen diff --git a/ATL/Pooh/pooh.atl b/ATL/Pooh/pooh.atl index 181995f..b0498e3 100644 --- a/ATL/Pooh/pooh.atl +++ b/ATL/Pooh/pooh.atl @@ -14,3 +14,7 @@ define-player "Winnie the Pooh" description "A small but very lovable bear of very little brain." place "Pooh's home" + +define-player "Christopher Robin" + description "Pooh's best friend." + place "Western woods" diff --git a/ATL/dev/creator-test.atl b/ATL/dev/creator-test.atl new file mode 100644 index 0000000..6209e7c --- /dev/null +++ b/ATL/dev/creator-test.atl @@ -0,0 +1,185 @@ +;; This code has been automatically generated by the +;; Atlantis world creator. + +define-item "Rope (20m)" + cost 5 + +define-item "Backpack" + cost 5 + +define-item "Knife" + cost 10 + +define-item "Short sword" + cost 40 + +define-item "Long sword" + cost 80 + +define-item "Dagger" + cost 20 + +define-item "Spear" + cost 25 + +define-item "Short bow" + cost 30 + +define-item "Longbow" + cost 60 + +define-item "Slingshot" + cost 15 + +define-item "Throwing knife" + cost 15 + +define-item "Quiver of arrows" + cost 20 + +define-item "Leather armour" + cost 60 + +define-item "Chain mail" + cost 120 + +define-item "Plate armour" + cost 200 + +define-item "Buckler" + cost 35 + +define-item "Full shield" + cost 45 + +define-item "Candles (3x)" + cost 5 + +define-item "Matches" + cost 1 + +define-item "Food rations (5x)" + cost 10 + +define-item "Grappling hook" + cost 15 + +define-item "Fishing net" + cost 25 + +define-item "Fishing rod" + cost 15 + +define-item "Tent (2 people)" + cost 30 + +define-item "Cloak" + cost 15 + +define-item "Hat" + cost 10 + +define-item "Water bottle" + cost 5 + +define-item "Compass" + cost 20 + +define-item "Quill and ink" + cost 5 + +define-item "Parchment" + cost 5 + +define-item "Blanket" + cost 5 + +define-item "Book of Legends" + cost 55 + +define-item "Book of Lore" + cost 55 + +define-item "Medicinal herbs" + cost 10 + +define-item "Bandages (3x)" + cost 5 + +define-item "Tea leaves" + cost 5 + +define-item "Sleeping potion" + cost 15 + +define-item "Leather pouch" + cost 2 + +define-item "Face mask" + cost 10 + +define-item "Dye" + cost 5 + +define-item "Cloth" + cost 5 + +define-item "Scissors" + cost 15 + +define-item "Needle and thread" + cost 3 + +define-item "Canvas" + cost 8 + +define-item "String" + cost 2 + +define-item "Hatchet" + cost 20 + +define-item "Map" + cost 35 + +define-item "Pony" + cost 100 + +define-item "Horse" + cost 180 + +define-item "Saddle and bridle" + cost 45 + +define-item "Saddlebag" + cost 35 + +define-item "Handmirror" + cost 20 + +define-item "Magnifying glass" + cost 20 + +define-item "Telescope" + cost 40 + +define-item "Rope ladder" + cost 15 + +define-item "Torches (3x)" + cost 10 + +define-item "Staff" + cost 10 + +define-item "Cooking pot" + cost 8 + +define-item "Soap" + cost 2 + +define-item "Towel" + cost 5 + +define-item "Boots" + cost 10 \ No newline at end of file diff --git a/ATL/dev/example.atl b/ATL/dev/example.atl new file mode 100644 index 0000000..3101edd --- /dev/null +++ b/ATL/dev/example.atl @@ -0,0 +1,72 @@ +# This is an example Atlantis file - I use it to explore what the language +# should end up looking like. + +load races.atl +load classes.atl + + +define-quest Kill hellhound + objective kill hellhound + reward gold 300 + + +define-spell Ray of death + type kill + min-intelligence 12 + success-rate 35 + + +define-npc Hades + say Oh, amazing, you actually got here! Who did you bribe? + sell 30 Ambrosia + quest Kill hellhound + + +define-item Scroll of light + value 80 + add-experience 20 + add-spell Ray of death + +define-item Ambrosia + category Food + add-health 5 + + +define-monster Hellhound + armor-class 8 + strength 10 + melee-weapon 2 claws + experience 50 + spawn 2 + aggression 60 + +define-monster Fury + armor-class 5 + strength 8 + melee-weapon 10 fire whip + experience 74 + spawn 0.8 + aggression 30 + + +define-place Nowhere + description Welcome to Nowhere! You are in the void, the space between \ +the worlds. Around you is black. Black, except for one tiny pin-prick of light \ +to the north. + neighbour Elysium + +define-place Elysium + description Congratulations! You have achieved Elysium! + neighbour Nowhere + neighbour Fields of punishment + npc Hades + item Scroll of light + +define-place Fields of punishment + description You really, really don't want to end up here... + neighbour Elysium + monster Hellhound + monster Fury + + +start-place Elysium \ No newline at end of file diff --git a/ATL/dev/game-objects.atl b/ATL/dev/game-objects.atl new file mode 100644 index 0000000..0a219ea --- /dev/null +++ b/ATL/dev/game-objects.atl @@ -0,0 +1,58 @@ +; This module defines items, NPCs, monsters and weapons for my +; Atlantis test world. +; @author Daniel Vedder +; @date 02/06/2015 + +define-monster "Fury" + description "Hades' messengers, torturers, assassins. Beware!" + health 10 + dexterity 20 + strength 10 + aggression 30 + spawn 50 + armour-class 3 + weapon "fire-whip" + item "fire-whip" + +define-item "fire-whip" + description "A 10-foot long whip, blazing with magical fire" + cost 180 + weapon + +define-weapon "fire-whip" + description "A 10-foot long whip, blazing with magical fire" + type "whip" + damage 2 + +define-item "Anaklusmos" + description "Riptide, a sword for heroes!" + weapon + +define-item "Lightning bolt" + description "Zeus lightning bolt - the most powerful weapon of the universe!" + weapon + +define-weapon "Anaklusmos" + description "Riptide, a sword for heroes!" + type "sword" + damage 4 + +define-weapon "Lightning bolt" ; primarily for debugging + description "Zeus lightning bolt - the most powerful weapon of the universe!" + type "magic" + damage 40 + +define-npc "Hades" + description "Hades, Lord of the Dead!" + says "Beware, mortal - do not tempt me!" + +define-npc "Charon" + description "A robe-clad ghoul, dread ferryman of the Styx." + says "..." + +define-npc "Persephone" ;testing the shop system + description "Hades' beautiful wife, bringer of summer." + says "Welcome, my friend from the upper world!" + sells "Sleeping potion" + sells "Handmirror" + sells "Book of Lore" \ No newline at end of file diff --git a/ATL/dev/lisp-test.atl b/ATL/dev/lisp-test.atl new file mode 100644 index 0000000..c27ec79 --- /dev/null +++ b/ATL/dev/lisp-test.atl @@ -0,0 +1,53 @@ +; This is a simple ATL file to test whatever I have implemented so far. +; @author Daniel Vedder +; @date 04/05/2015 + +name-world "Underworld" + +define-player "Start" + money 200 + place "Fields of Punishment" + max-health 50 + health 50 + +define-place "Nowhere" + description "Welcome to Nowhere! +You are in the void, the space between the worlds. Around you is black. +Black, except for one tiny pin-prick of light to the north." + neighbour "Styx" + dark + +define-place "Elysium" + description "This is where you want to be when you are six feet under..." + neighbour "Styx" + neighbour "Fields of Punishment" + neighbour "Fields of Asphodel" + npc "Persephone" + +define-place "Fields of Punishment" + description "Precisely where you do NOT want to end up..." + neighbour "Styx" + neighbour "Elysium" + neighbour "Fields of Asphodel" + monster "Fury" + spawns "Fury" + +define-place "Fields of Asphodel" + description "Nothing special. Really, nothing special at all. +Just a whole load of dead people..." + neighbour "Fields of Punishment" + neighbour "Elysium" + npc "Hades" + +define-place "Styx" + description "The great river that all must cross - but woe to those who do!" + neighbour "Fields of Punishment" + neighbour "Elysium" + neighbour "Nowhere" + item "Anaklusmos" + npc "Charon" + +load-file lisp-test.atl ;Testing whether recursive loading is prevented +load-file races-classes.atl +load-file game-objects.atl +load-file creator-test.atl diff --git a/ATL/dev/races-classes.atl b/ATL/dev/races-classes.atl new file mode 100644 index 0000000..659310f --- /dev/null +++ b/ATL/dev/races-classes.atl @@ -0,0 +1,40 @@ +; A file to define all the races and character classes in my test world. +; @author Daniel Vedder +; @date 18/05/2015 + +;;; RACES + +define-race "Elf" + description "The oldest and wisest race of Middle Earth" + +define-race "Dwarf" + description "Sons of the Earth, descendants of Durin" + +define-race "Hobbit" + description "Peace-loving and kind, true gentlemen" + +define-race "Human" + description "Boring, exciting, ever-changing, never-changing man..." + + +;;; CLASSES + +define-class "Warrior" + description "Fighting as a passion!" + special-item "Sword" + +define-class "Wizard" + description "Ancient, powerful, keepers of the Knowledge..." + special-item "staff" + +define-class "Burglar" + description "Breaking and entering taken to the max!" + special-item "lockpick" + special-item "torch" + +define-class "Craftsman" + description "Maker of all things beautiful and useful" + special-item "hammer" + +load-file lisp-test.atl ;Again, a test for recursive loading +load-file test-extension.lisp ;Testing whether Lisp extensions are loaded \ No newline at end of file diff --git a/ATL/dev/test-extension.lisp b/ATL/dev/test-extension.lisp new file mode 100644 index 0000000..f01660a --- /dev/null +++ b/ATL/dev/test-extension.lisp @@ -0,0 +1,5 @@ +;; This file tests whether the interpreter loads Lisp files correctly. +;; author: Daniel Vedder +;; date: 21/05/2015 + +(debugging "~&Loaded Lisp extension file.") diff --git a/ATL/test/creator-test.atl b/ATL/test/creator-test.atl deleted file mode 100644 index 6209e7c..0000000 --- a/ATL/test/creator-test.atl +++ /dev/null @@ -1,185 +0,0 @@ -;; This code has been automatically generated by the -;; Atlantis world creator. - -define-item "Rope (20m)" - cost 5 - -define-item "Backpack" - cost 5 - -define-item "Knife" - cost 10 - -define-item "Short sword" - cost 40 - -define-item "Long sword" - cost 80 - -define-item "Dagger" - cost 20 - -define-item "Spear" - cost 25 - -define-item "Short bow" - cost 30 - -define-item "Longbow" - cost 60 - -define-item "Slingshot" - cost 15 - -define-item "Throwing knife" - cost 15 - -define-item "Quiver of arrows" - cost 20 - -define-item "Leather armour" - cost 60 - -define-item "Chain mail" - cost 120 - -define-item "Plate armour" - cost 200 - -define-item "Buckler" - cost 35 - -define-item "Full shield" - cost 45 - -define-item "Candles (3x)" - cost 5 - -define-item "Matches" - cost 1 - -define-item "Food rations (5x)" - cost 10 - -define-item "Grappling hook" - cost 15 - -define-item "Fishing net" - cost 25 - -define-item "Fishing rod" - cost 15 - -define-item "Tent (2 people)" - cost 30 - -define-item "Cloak" - cost 15 - -define-item "Hat" - cost 10 - -define-item "Water bottle" - cost 5 - -define-item "Compass" - cost 20 - -define-item "Quill and ink" - cost 5 - -define-item "Parchment" - cost 5 - -define-item "Blanket" - cost 5 - -define-item "Book of Legends" - cost 55 - -define-item "Book of Lore" - cost 55 - -define-item "Medicinal herbs" - cost 10 - -define-item "Bandages (3x)" - cost 5 - -define-item "Tea leaves" - cost 5 - -define-item "Sleeping potion" - cost 15 - -define-item "Leather pouch" - cost 2 - -define-item "Face mask" - cost 10 - -define-item "Dye" - cost 5 - -define-item "Cloth" - cost 5 - -define-item "Scissors" - cost 15 - -define-item "Needle and thread" - cost 3 - -define-item "Canvas" - cost 8 - -define-item "String" - cost 2 - -define-item "Hatchet" - cost 20 - -define-item "Map" - cost 35 - -define-item "Pony" - cost 100 - -define-item "Horse" - cost 180 - -define-item "Saddle and bridle" - cost 45 - -define-item "Saddlebag" - cost 35 - -define-item "Handmirror" - cost 20 - -define-item "Magnifying glass" - cost 20 - -define-item "Telescope" - cost 40 - -define-item "Rope ladder" - cost 15 - -define-item "Torches (3x)" - cost 10 - -define-item "Staff" - cost 10 - -define-item "Cooking pot" - cost 8 - -define-item "Soap" - cost 2 - -define-item "Towel" - cost 5 - -define-item "Boots" - cost 10 \ No newline at end of file diff --git a/ATL/test/example.atl b/ATL/test/example.atl deleted file mode 100644 index 3101edd..0000000 --- a/ATL/test/example.atl +++ /dev/null @@ -1,72 +0,0 @@ -# This is an example Atlantis file - I use it to explore what the language -# should end up looking like. - -load races.atl -load classes.atl - - -define-quest Kill hellhound - objective kill hellhound - reward gold 300 - - -define-spell Ray of death - type kill - min-intelligence 12 - success-rate 35 - - -define-npc Hades - say Oh, amazing, you actually got here! Who did you bribe? - sell 30 Ambrosia - quest Kill hellhound - - -define-item Scroll of light - value 80 - add-experience 20 - add-spell Ray of death - -define-item Ambrosia - category Food - add-health 5 - - -define-monster Hellhound - armor-class 8 - strength 10 - melee-weapon 2 claws - experience 50 - spawn 2 - aggression 60 - -define-monster Fury - armor-class 5 - strength 8 - melee-weapon 10 fire whip - experience 74 - spawn 0.8 - aggression 30 - - -define-place Nowhere - description Welcome to Nowhere! You are in the void, the space between \ -the worlds. Around you is black. Black, except for one tiny pin-prick of light \ -to the north. - neighbour Elysium - -define-place Elysium - description Congratulations! You have achieved Elysium! - neighbour Nowhere - neighbour Fields of punishment - npc Hades - item Scroll of light - -define-place Fields of punishment - description You really, really don't want to end up here... - neighbour Elysium - monster Hellhound - monster Fury - - -start-place Elysium \ No newline at end of file diff --git a/ATL/test/game-objects.atl b/ATL/test/game-objects.atl deleted file mode 100644 index 0a219ea..0000000 --- a/ATL/test/game-objects.atl +++ /dev/null @@ -1,58 +0,0 @@ -; This module defines items, NPCs, monsters and weapons for my -; Atlantis test world. -; @author Daniel Vedder -; @date 02/06/2015 - -define-monster "Fury" - description "Hades' messengers, torturers, assassins. Beware!" - health 10 - dexterity 20 - strength 10 - aggression 30 - spawn 50 - armour-class 3 - weapon "fire-whip" - item "fire-whip" - -define-item "fire-whip" - description "A 10-foot long whip, blazing with magical fire" - cost 180 - weapon - -define-weapon "fire-whip" - description "A 10-foot long whip, blazing with magical fire" - type "whip" - damage 2 - -define-item "Anaklusmos" - description "Riptide, a sword for heroes!" - weapon - -define-item "Lightning bolt" - description "Zeus lightning bolt - the most powerful weapon of the universe!" - weapon - -define-weapon "Anaklusmos" - description "Riptide, a sword for heroes!" - type "sword" - damage 4 - -define-weapon "Lightning bolt" ; primarily for debugging - description "Zeus lightning bolt - the most powerful weapon of the universe!" - type "magic" - damage 40 - -define-npc "Hades" - description "Hades, Lord of the Dead!" - says "Beware, mortal - do not tempt me!" - -define-npc "Charon" - description "A robe-clad ghoul, dread ferryman of the Styx." - says "..." - -define-npc "Persephone" ;testing the shop system - description "Hades' beautiful wife, bringer of summer." - says "Welcome, my friend from the upper world!" - sells "Sleeping potion" - sells "Handmirror" - sells "Book of Lore" \ No newline at end of file diff --git a/ATL/test/lisp-test.atl b/ATL/test/lisp-test.atl deleted file mode 100644 index c27ec79..0000000 --- a/ATL/test/lisp-test.atl +++ /dev/null @@ -1,53 +0,0 @@ -; This is a simple ATL file to test whatever I have implemented so far. -; @author Daniel Vedder -; @date 04/05/2015 - -name-world "Underworld" - -define-player "Start" - money 200 - place "Fields of Punishment" - max-health 50 - health 50 - -define-place "Nowhere" - description "Welcome to Nowhere! -You are in the void, the space between the worlds. Around you is black. -Black, except for one tiny pin-prick of light to the north." - neighbour "Styx" - dark - -define-place "Elysium" - description "This is where you want to be when you are six feet under..." - neighbour "Styx" - neighbour "Fields of Punishment" - neighbour "Fields of Asphodel" - npc "Persephone" - -define-place "Fields of Punishment" - description "Precisely where you do NOT want to end up..." - neighbour "Styx" - neighbour "Elysium" - neighbour "Fields of Asphodel" - monster "Fury" - spawns "Fury" - -define-place "Fields of Asphodel" - description "Nothing special. Really, nothing special at all. -Just a whole load of dead people..." - neighbour "Fields of Punishment" - neighbour "Elysium" - npc "Hades" - -define-place "Styx" - description "The great river that all must cross - but woe to those who do!" - neighbour "Fields of Punishment" - neighbour "Elysium" - neighbour "Nowhere" - item "Anaklusmos" - npc "Charon" - -load-file lisp-test.atl ;Testing whether recursive loading is prevented -load-file races-classes.atl -load-file game-objects.atl -load-file creator-test.atl diff --git a/ATL/test/races-classes.atl b/ATL/test/races-classes.atl deleted file mode 100644 index 659310f..0000000 --- a/ATL/test/races-classes.atl +++ /dev/null @@ -1,40 +0,0 @@ -; A file to define all the races and character classes in my test world. -; @author Daniel Vedder -; @date 18/05/2015 - -;;; RACES - -define-race "Elf" - description "The oldest and wisest race of Middle Earth" - -define-race "Dwarf" - description "Sons of the Earth, descendants of Durin" - -define-race "Hobbit" - description "Peace-loving and kind, true gentlemen" - -define-race "Human" - description "Boring, exciting, ever-changing, never-changing man..." - - -;;; CLASSES - -define-class "Warrior" - description "Fighting as a passion!" - special-item "Sword" - -define-class "Wizard" - description "Ancient, powerful, keepers of the Knowledge..." - special-item "staff" - -define-class "Burglar" - description "Breaking and entering taken to the max!" - special-item "lockpick" - special-item "torch" - -define-class "Craftsman" - description "Maker of all things beautiful and useful" - special-item "hammer" - -load-file lisp-test.atl ;Again, a test for recursive loading -load-file test-extension.lisp ;Testing whether Lisp extensions are loaded \ No newline at end of file diff --git a/ATL/test/test-extension.lisp b/ATL/test/test-extension.lisp deleted file mode 100644 index f01660a..0000000 --- a/ATL/test/test-extension.lisp +++ /dev/null @@ -1,5 +0,0 @@ -;; This file tests whether the interpreter loads Lisp files correctly. -;; author: Daniel Vedder -;; date: 21/05/2015 - -(debugging "~&Loaded Lisp extension file.") diff --git a/lisp/atlantis.lisp b/lisp/atlantis.lisp index 4401088..afa9bf2 100644 --- a/lisp/atlantis.lisp +++ b/lisp/atlantis.lisp @@ -19,6 +19,12 @@ (defvar *debugging* NIL) +;; Game worlds must be registered in this list with a display name +;; and a path relative to ../ATL +(defvar *games* '(("Lugwey" "Lugwey/lugwey.atl") + ("Winnie the Pooh" "Pooh/pooh.atl") + ("Development" "dev/test.atl"))) + (defun development () "A method to easily test whatever feature I am currently developing" (setf *debugging* T) @@ -49,26 +55,33 @@ (setf options '("Start a new game" "Load a game" "Create worlds" "Develop" "About" "Exit")) (case (choose-number-option options) + (0 (format t "~&Which world do you want to play?") + ;; let the player choose one of the game worlds + (let ((world (choose-option + (append (keys *games*) '("Other" "Back"))))) + (cond ((equalp world "Back") (start-menu)) + ((equalp world "Other") + (format t "~&What world file do you want to load?") + (input-string world-file)) + (T (setf world-file (cassoc world *games*)))) + (setf world-file (concatenate 'string "../ATL/" world-file)) + (load-file world-file) + ;; let the player choose a character + (format t "~&Which character do you want to play?") + (let* ((char-nr (choose-number-option + (list-world-objects 'player))) + (char-name (nth char-nr (list-world-objects 'player)))) + (set-main-player char-name) + (play-game)))) ;;FIXME Present the player with a choice of saved games - (0 (format t "~&What world file do you want to load?") - (input-string world-file) - ;;FIXME Allowing only one player per world eliminates the need - ;; to ask for a player name - (format t "~&What is your name?") - (input-string name) - (load-file world-file) - (play-game name)) - ;;FIXME Present the player with a choice of game worlds - (1 (format t "~&What game file do you want to load?") + (1 ;(choose-number-option *games*) ;;XXXXXX + (format t "~&What game file do you want to load?") (input-string game) (setf game (concatenate 'string "../saves/" game)) (load-game game) - ;;FIXME Present the player with a choice of predefined characters - (format t "~&What is your name?") - (input-string name) - (play-game name)) + (play-game)) (2 (world-creator)) - (3 (development)) + (3 (development)) ;; XXX Remove this (4 (print-version) (when (y-or-n-p "Show the license text?") (print-text-file "../LICENSE")) diff --git a/lisp/interpreter.lisp b/lisp/interpreter.lisp index 04ab683..439e27f 100644 --- a/lisp/interpreter.lisp +++ b/lisp/interpreter.lisp @@ -99,8 +99,8 @@ (first options) T)) (2 (set-object-attribute current-object (first options) (second options))) - ;; FIXME gives problems with lines like this: - ;; " ;commented" - should be fixed + ;; XXX gives problems with lines like this: + ;; " ;commented" - should be fixed now ? (t (error "~&ERROR: too many arguments: '~A'" line))))) (T ;; can't happen diff --git a/lisp/player.lisp b/lisp/player.lisp index 08cf181..42f1081 100644 --- a/lisp/player.lisp +++ b/lisp/player.lisp @@ -39,6 +39,10 @@ (change-player-location player (player-place player)) (add-game-object player)) +(defun set-main-player (player-name) + "Set the main player for this game" + (setf (world-main-player *world*) player-name)) + (defun change-player-location (player location) "Change the player's location and do housekeeping" (setf location (to-string location)) diff --git a/ATL/Pooh/pooh.atl b/ATL/Pooh/pooh.atl index 181995f..b0498e3 100644 --- a/ATL/Pooh/pooh.atl +++ b/ATL/Pooh/pooh.atl @@ -14,3 +14,7 @@ define-player "Winnie the Pooh" description "A small but very lovable bear of very little brain." place "Pooh's home" + +define-player "Christopher Robin" + description "Pooh's best friend." + place "Western woods" diff --git a/ATL/dev/creator-test.atl b/ATL/dev/creator-test.atl new file mode 100644 index 0000000..6209e7c --- /dev/null +++ b/ATL/dev/creator-test.atl @@ -0,0 +1,185 @@ +;; This code has been automatically generated by the +;; Atlantis world creator. + +define-item "Rope (20m)" + cost 5 + +define-item "Backpack" + cost 5 + +define-item "Knife" + cost 10 + +define-item "Short sword" + cost 40 + +define-item "Long sword" + cost 80 + +define-item "Dagger" + cost 20 + +define-item "Spear" + cost 25 + +define-item "Short bow" + cost 30 + +define-item "Longbow" + cost 60 + +define-item "Slingshot" + cost 15 + +define-item "Throwing knife" + cost 15 + +define-item "Quiver of arrows" + cost 20 + +define-item "Leather armour" + cost 60 + +define-item "Chain mail" + cost 120 + +define-item "Plate armour" + cost 200 + +define-item "Buckler" + cost 35 + +define-item "Full shield" + cost 45 + +define-item "Candles (3x)" + cost 5 + +define-item "Matches" + cost 1 + +define-item "Food rations (5x)" + cost 10 + +define-item "Grappling hook" + cost 15 + +define-item "Fishing net" + cost 25 + +define-item "Fishing rod" + cost 15 + +define-item "Tent (2 people)" + cost 30 + +define-item "Cloak" + cost 15 + +define-item "Hat" + cost 10 + +define-item "Water bottle" + cost 5 + +define-item "Compass" + cost 20 + +define-item "Quill and ink" + cost 5 + +define-item "Parchment" + cost 5 + +define-item "Blanket" + cost 5 + +define-item "Book of Legends" + cost 55 + +define-item "Book of Lore" + cost 55 + +define-item "Medicinal herbs" + cost 10 + +define-item "Bandages (3x)" + cost 5 + +define-item "Tea leaves" + cost 5 + +define-item "Sleeping potion" + cost 15 + +define-item "Leather pouch" + cost 2 + +define-item "Face mask" + cost 10 + +define-item "Dye" + cost 5 + +define-item "Cloth" + cost 5 + +define-item "Scissors" + cost 15 + +define-item "Needle and thread" + cost 3 + +define-item "Canvas" + cost 8 + +define-item "String" + cost 2 + +define-item "Hatchet" + cost 20 + +define-item "Map" + cost 35 + +define-item "Pony" + cost 100 + +define-item "Horse" + cost 180 + +define-item "Saddle and bridle" + cost 45 + +define-item "Saddlebag" + cost 35 + +define-item "Handmirror" + cost 20 + +define-item "Magnifying glass" + cost 20 + +define-item "Telescope" + cost 40 + +define-item "Rope ladder" + cost 15 + +define-item "Torches (3x)" + cost 10 + +define-item "Staff" + cost 10 + +define-item "Cooking pot" + cost 8 + +define-item "Soap" + cost 2 + +define-item "Towel" + cost 5 + +define-item "Boots" + cost 10 \ No newline at end of file diff --git a/ATL/dev/example.atl b/ATL/dev/example.atl new file mode 100644 index 0000000..3101edd --- /dev/null +++ b/ATL/dev/example.atl @@ -0,0 +1,72 @@ +# This is an example Atlantis file - I use it to explore what the language +# should end up looking like. + +load races.atl +load classes.atl + + +define-quest Kill hellhound + objective kill hellhound + reward gold 300 + + +define-spell Ray of death + type kill + min-intelligence 12 + success-rate 35 + + +define-npc Hades + say Oh, amazing, you actually got here! Who did you bribe? + sell 30 Ambrosia + quest Kill hellhound + + +define-item Scroll of light + value 80 + add-experience 20 + add-spell Ray of death + +define-item Ambrosia + category Food + add-health 5 + + +define-monster Hellhound + armor-class 8 + strength 10 + melee-weapon 2 claws + experience 50 + spawn 2 + aggression 60 + +define-monster Fury + armor-class 5 + strength 8 + melee-weapon 10 fire whip + experience 74 + spawn 0.8 + aggression 30 + + +define-place Nowhere + description Welcome to Nowhere! You are in the void, the space between \ +the worlds. Around you is black. Black, except for one tiny pin-prick of light \ +to the north. + neighbour Elysium + +define-place Elysium + description Congratulations! You have achieved Elysium! + neighbour Nowhere + neighbour Fields of punishment + npc Hades + item Scroll of light + +define-place Fields of punishment + description You really, really don't want to end up here... + neighbour Elysium + monster Hellhound + monster Fury + + +start-place Elysium \ No newline at end of file diff --git a/ATL/dev/game-objects.atl b/ATL/dev/game-objects.atl new file mode 100644 index 0000000..0a219ea --- /dev/null +++ b/ATL/dev/game-objects.atl @@ -0,0 +1,58 @@ +; This module defines items, NPCs, monsters and weapons for my +; Atlantis test world. +; @author Daniel Vedder +; @date 02/06/2015 + +define-monster "Fury" + description "Hades' messengers, torturers, assassins. Beware!" + health 10 + dexterity 20 + strength 10 + aggression 30 + spawn 50 + armour-class 3 + weapon "fire-whip" + item "fire-whip" + +define-item "fire-whip" + description "A 10-foot long whip, blazing with magical fire" + cost 180 + weapon + +define-weapon "fire-whip" + description "A 10-foot long whip, blazing with magical fire" + type "whip" + damage 2 + +define-item "Anaklusmos" + description "Riptide, a sword for heroes!" + weapon + +define-item "Lightning bolt" + description "Zeus lightning bolt - the most powerful weapon of the universe!" + weapon + +define-weapon "Anaklusmos" + description "Riptide, a sword for heroes!" + type "sword" + damage 4 + +define-weapon "Lightning bolt" ; primarily for debugging + description "Zeus lightning bolt - the most powerful weapon of the universe!" + type "magic" + damage 40 + +define-npc "Hades" + description "Hades, Lord of the Dead!" + says "Beware, mortal - do not tempt me!" + +define-npc "Charon" + description "A robe-clad ghoul, dread ferryman of the Styx." + says "..." + +define-npc "Persephone" ;testing the shop system + description "Hades' beautiful wife, bringer of summer." + says "Welcome, my friend from the upper world!" + sells "Sleeping potion" + sells "Handmirror" + sells "Book of Lore" \ No newline at end of file diff --git a/ATL/dev/lisp-test.atl b/ATL/dev/lisp-test.atl new file mode 100644 index 0000000..c27ec79 --- /dev/null +++ b/ATL/dev/lisp-test.atl @@ -0,0 +1,53 @@ +; This is a simple ATL file to test whatever I have implemented so far. +; @author Daniel Vedder +; @date 04/05/2015 + +name-world "Underworld" + +define-player "Start" + money 200 + place "Fields of Punishment" + max-health 50 + health 50 + +define-place "Nowhere" + description "Welcome to Nowhere! +You are in the void, the space between the worlds. Around you is black. +Black, except for one tiny pin-prick of light to the north." + neighbour "Styx" + dark + +define-place "Elysium" + description "This is where you want to be when you are six feet under..." + neighbour "Styx" + neighbour "Fields of Punishment" + neighbour "Fields of Asphodel" + npc "Persephone" + +define-place "Fields of Punishment" + description "Precisely where you do NOT want to end up..." + neighbour "Styx" + neighbour "Elysium" + neighbour "Fields of Asphodel" + monster "Fury" + spawns "Fury" + +define-place "Fields of Asphodel" + description "Nothing special. Really, nothing special at all. +Just a whole load of dead people..." + neighbour "Fields of Punishment" + neighbour "Elysium" + npc "Hades" + +define-place "Styx" + description "The great river that all must cross - but woe to those who do!" + neighbour "Fields of Punishment" + neighbour "Elysium" + neighbour "Nowhere" + item "Anaklusmos" + npc "Charon" + +load-file lisp-test.atl ;Testing whether recursive loading is prevented +load-file races-classes.atl +load-file game-objects.atl +load-file creator-test.atl diff --git a/ATL/dev/races-classes.atl b/ATL/dev/races-classes.atl new file mode 100644 index 0000000..659310f --- /dev/null +++ b/ATL/dev/races-classes.atl @@ -0,0 +1,40 @@ +; A file to define all the races and character classes in my test world. +; @author Daniel Vedder +; @date 18/05/2015 + +;;; RACES + +define-race "Elf" + description "The oldest and wisest race of Middle Earth" + +define-race "Dwarf" + description "Sons of the Earth, descendants of Durin" + +define-race "Hobbit" + description "Peace-loving and kind, true gentlemen" + +define-race "Human" + description "Boring, exciting, ever-changing, never-changing man..." + + +;;; CLASSES + +define-class "Warrior" + description "Fighting as a passion!" + special-item "Sword" + +define-class "Wizard" + description "Ancient, powerful, keepers of the Knowledge..." + special-item "staff" + +define-class "Burglar" + description "Breaking and entering taken to the max!" + special-item "lockpick" + special-item "torch" + +define-class "Craftsman" + description "Maker of all things beautiful and useful" + special-item "hammer" + +load-file lisp-test.atl ;Again, a test for recursive loading +load-file test-extension.lisp ;Testing whether Lisp extensions are loaded \ No newline at end of file diff --git a/ATL/dev/test-extension.lisp b/ATL/dev/test-extension.lisp new file mode 100644 index 0000000..f01660a --- /dev/null +++ b/ATL/dev/test-extension.lisp @@ -0,0 +1,5 @@ +;; This file tests whether the interpreter loads Lisp files correctly. +;; author: Daniel Vedder +;; date: 21/05/2015 + +(debugging "~&Loaded Lisp extension file.") diff --git a/ATL/test/creator-test.atl b/ATL/test/creator-test.atl deleted file mode 100644 index 6209e7c..0000000 --- a/ATL/test/creator-test.atl +++ /dev/null @@ -1,185 +0,0 @@ -;; This code has been automatically generated by the -;; Atlantis world creator. - -define-item "Rope (20m)" - cost 5 - -define-item "Backpack" - cost 5 - -define-item "Knife" - cost 10 - -define-item "Short sword" - cost 40 - -define-item "Long sword" - cost 80 - -define-item "Dagger" - cost 20 - -define-item "Spear" - cost 25 - -define-item "Short bow" - cost 30 - -define-item "Longbow" - cost 60 - -define-item "Slingshot" - cost 15 - -define-item "Throwing knife" - cost 15 - -define-item "Quiver of arrows" - cost 20 - -define-item "Leather armour" - cost 60 - -define-item "Chain mail" - cost 120 - -define-item "Plate armour" - cost 200 - -define-item "Buckler" - cost 35 - -define-item "Full shield" - cost 45 - -define-item "Candles (3x)" - cost 5 - -define-item "Matches" - cost 1 - -define-item "Food rations (5x)" - cost 10 - -define-item "Grappling hook" - cost 15 - -define-item "Fishing net" - cost 25 - -define-item "Fishing rod" - cost 15 - -define-item "Tent (2 people)" - cost 30 - -define-item "Cloak" - cost 15 - -define-item "Hat" - cost 10 - -define-item "Water bottle" - cost 5 - -define-item "Compass" - cost 20 - -define-item "Quill and ink" - cost 5 - -define-item "Parchment" - cost 5 - -define-item "Blanket" - cost 5 - -define-item "Book of Legends" - cost 55 - -define-item "Book of Lore" - cost 55 - -define-item "Medicinal herbs" - cost 10 - -define-item "Bandages (3x)" - cost 5 - -define-item "Tea leaves" - cost 5 - -define-item "Sleeping potion" - cost 15 - -define-item "Leather pouch" - cost 2 - -define-item "Face mask" - cost 10 - -define-item "Dye" - cost 5 - -define-item "Cloth" - cost 5 - -define-item "Scissors" - cost 15 - -define-item "Needle and thread" - cost 3 - -define-item "Canvas" - cost 8 - -define-item "String" - cost 2 - -define-item "Hatchet" - cost 20 - -define-item "Map" - cost 35 - -define-item "Pony" - cost 100 - -define-item "Horse" - cost 180 - -define-item "Saddle and bridle" - cost 45 - -define-item "Saddlebag" - cost 35 - -define-item "Handmirror" - cost 20 - -define-item "Magnifying glass" - cost 20 - -define-item "Telescope" - cost 40 - -define-item "Rope ladder" - cost 15 - -define-item "Torches (3x)" - cost 10 - -define-item "Staff" - cost 10 - -define-item "Cooking pot" - cost 8 - -define-item "Soap" - cost 2 - -define-item "Towel" - cost 5 - -define-item "Boots" - cost 10 \ No newline at end of file diff --git a/ATL/test/example.atl b/ATL/test/example.atl deleted file mode 100644 index 3101edd..0000000 --- a/ATL/test/example.atl +++ /dev/null @@ -1,72 +0,0 @@ -# This is an example Atlantis file - I use it to explore what the language -# should end up looking like. - -load races.atl -load classes.atl - - -define-quest Kill hellhound - objective kill hellhound - reward gold 300 - - -define-spell Ray of death - type kill - min-intelligence 12 - success-rate 35 - - -define-npc Hades - say Oh, amazing, you actually got here! Who did you bribe? - sell 30 Ambrosia - quest Kill hellhound - - -define-item Scroll of light - value 80 - add-experience 20 - add-spell Ray of death - -define-item Ambrosia - category Food - add-health 5 - - -define-monster Hellhound - armor-class 8 - strength 10 - melee-weapon 2 claws - experience 50 - spawn 2 - aggression 60 - -define-monster Fury - armor-class 5 - strength 8 - melee-weapon 10 fire whip - experience 74 - spawn 0.8 - aggression 30 - - -define-place Nowhere - description Welcome to Nowhere! You are in the void, the space between \ -the worlds. Around you is black. Black, except for one tiny pin-prick of light \ -to the north. - neighbour Elysium - -define-place Elysium - description Congratulations! You have achieved Elysium! - neighbour Nowhere - neighbour Fields of punishment - npc Hades - item Scroll of light - -define-place Fields of punishment - description You really, really don't want to end up here... - neighbour Elysium - monster Hellhound - monster Fury - - -start-place Elysium \ No newline at end of file diff --git a/ATL/test/game-objects.atl b/ATL/test/game-objects.atl deleted file mode 100644 index 0a219ea..0000000 --- a/ATL/test/game-objects.atl +++ /dev/null @@ -1,58 +0,0 @@ -; This module defines items, NPCs, monsters and weapons for my -; Atlantis test world. -; @author Daniel Vedder -; @date 02/06/2015 - -define-monster "Fury" - description "Hades' messengers, torturers, assassins. Beware!" - health 10 - dexterity 20 - strength 10 - aggression 30 - spawn 50 - armour-class 3 - weapon "fire-whip" - item "fire-whip" - -define-item "fire-whip" - description "A 10-foot long whip, blazing with magical fire" - cost 180 - weapon - -define-weapon "fire-whip" - description "A 10-foot long whip, blazing with magical fire" - type "whip" - damage 2 - -define-item "Anaklusmos" - description "Riptide, a sword for heroes!" - weapon - -define-item "Lightning bolt" - description "Zeus lightning bolt - the most powerful weapon of the universe!" - weapon - -define-weapon "Anaklusmos" - description "Riptide, a sword for heroes!" - type "sword" - damage 4 - -define-weapon "Lightning bolt" ; primarily for debugging - description "Zeus lightning bolt - the most powerful weapon of the universe!" - type "magic" - damage 40 - -define-npc "Hades" - description "Hades, Lord of the Dead!" - says "Beware, mortal - do not tempt me!" - -define-npc "Charon" - description "A robe-clad ghoul, dread ferryman of the Styx." - says "..." - -define-npc "Persephone" ;testing the shop system - description "Hades' beautiful wife, bringer of summer." - says "Welcome, my friend from the upper world!" - sells "Sleeping potion" - sells "Handmirror" - sells "Book of Lore" \ No newline at end of file diff --git a/ATL/test/lisp-test.atl b/ATL/test/lisp-test.atl deleted file mode 100644 index c27ec79..0000000 --- a/ATL/test/lisp-test.atl +++ /dev/null @@ -1,53 +0,0 @@ -; This is a simple ATL file to test whatever I have implemented so far. -; @author Daniel Vedder -; @date 04/05/2015 - -name-world "Underworld" - -define-player "Start" - money 200 - place "Fields of Punishment" - max-health 50 - health 50 - -define-place "Nowhere" - description "Welcome to Nowhere! -You are in the void, the space between the worlds. Around you is black. -Black, except for one tiny pin-prick of light to the north." - neighbour "Styx" - dark - -define-place "Elysium" - description "This is where you want to be when you are six feet under..." - neighbour "Styx" - neighbour "Fields of Punishment" - neighbour "Fields of Asphodel" - npc "Persephone" - -define-place "Fields of Punishment" - description "Precisely where you do NOT want to end up..." - neighbour "Styx" - neighbour "Elysium" - neighbour "Fields of Asphodel" - monster "Fury" - spawns "Fury" - -define-place "Fields of Asphodel" - description "Nothing special. Really, nothing special at all. -Just a whole load of dead people..." - neighbour "Fields of Punishment" - neighbour "Elysium" - npc "Hades" - -define-place "Styx" - description "The great river that all must cross - but woe to those who do!" - neighbour "Fields of Punishment" - neighbour "Elysium" - neighbour "Nowhere" - item "Anaklusmos" - npc "Charon" - -load-file lisp-test.atl ;Testing whether recursive loading is prevented -load-file races-classes.atl -load-file game-objects.atl -load-file creator-test.atl diff --git a/ATL/test/races-classes.atl b/ATL/test/races-classes.atl deleted file mode 100644 index 659310f..0000000 --- a/ATL/test/races-classes.atl +++ /dev/null @@ -1,40 +0,0 @@ -; A file to define all the races and character classes in my test world. -; @author Daniel Vedder -; @date 18/05/2015 - -;;; RACES - -define-race "Elf" - description "The oldest and wisest race of Middle Earth" - -define-race "Dwarf" - description "Sons of the Earth, descendants of Durin" - -define-race "Hobbit" - description "Peace-loving and kind, true gentlemen" - -define-race "Human" - description "Boring, exciting, ever-changing, never-changing man..." - - -;;; CLASSES - -define-class "Warrior" - description "Fighting as a passion!" - special-item "Sword" - -define-class "Wizard" - description "Ancient, powerful, keepers of the Knowledge..." - special-item "staff" - -define-class "Burglar" - description "Breaking and entering taken to the max!" - special-item "lockpick" - special-item "torch" - -define-class "Craftsman" - description "Maker of all things beautiful and useful" - special-item "hammer" - -load-file lisp-test.atl ;Again, a test for recursive loading -load-file test-extension.lisp ;Testing whether Lisp extensions are loaded \ No newline at end of file diff --git a/ATL/test/test-extension.lisp b/ATL/test/test-extension.lisp deleted file mode 100644 index f01660a..0000000 --- a/ATL/test/test-extension.lisp +++ /dev/null @@ -1,5 +0,0 @@ -;; This file tests whether the interpreter loads Lisp files correctly. -;; author: Daniel Vedder -;; date: 21/05/2015 - -(debugging "~&Loaded Lisp extension file.") diff --git a/lisp/atlantis.lisp b/lisp/atlantis.lisp index 4401088..afa9bf2 100644 --- a/lisp/atlantis.lisp +++ b/lisp/atlantis.lisp @@ -19,6 +19,12 @@ (defvar *debugging* NIL) +;; Game worlds must be registered in this list with a display name +;; and a path relative to ../ATL +(defvar *games* '(("Lugwey" "Lugwey/lugwey.atl") + ("Winnie the Pooh" "Pooh/pooh.atl") + ("Development" "dev/test.atl"))) + (defun development () "A method to easily test whatever feature I am currently developing" (setf *debugging* T) @@ -49,26 +55,33 @@ (setf options '("Start a new game" "Load a game" "Create worlds" "Develop" "About" "Exit")) (case (choose-number-option options) + (0 (format t "~&Which world do you want to play?") + ;; let the player choose one of the game worlds + (let ((world (choose-option + (append (keys *games*) '("Other" "Back"))))) + (cond ((equalp world "Back") (start-menu)) + ((equalp world "Other") + (format t "~&What world file do you want to load?") + (input-string world-file)) + (T (setf world-file (cassoc world *games*)))) + (setf world-file (concatenate 'string "../ATL/" world-file)) + (load-file world-file) + ;; let the player choose a character + (format t "~&Which character do you want to play?") + (let* ((char-nr (choose-number-option + (list-world-objects 'player))) + (char-name (nth char-nr (list-world-objects 'player)))) + (set-main-player char-name) + (play-game)))) ;;FIXME Present the player with a choice of saved games - (0 (format t "~&What world file do you want to load?") - (input-string world-file) - ;;FIXME Allowing only one player per world eliminates the need - ;; to ask for a player name - (format t "~&What is your name?") - (input-string name) - (load-file world-file) - (play-game name)) - ;;FIXME Present the player with a choice of game worlds - (1 (format t "~&What game file do you want to load?") + (1 ;(choose-number-option *games*) ;;XXXXXX + (format t "~&What game file do you want to load?") (input-string game) (setf game (concatenate 'string "../saves/" game)) (load-game game) - ;;FIXME Present the player with a choice of predefined characters - (format t "~&What is your name?") - (input-string name) - (play-game name)) + (play-game)) (2 (world-creator)) - (3 (development)) + (3 (development)) ;; XXX Remove this (4 (print-version) (when (y-or-n-p "Show the license text?") (print-text-file "../LICENSE")) diff --git a/lisp/interpreter.lisp b/lisp/interpreter.lisp index 04ab683..439e27f 100644 --- a/lisp/interpreter.lisp +++ b/lisp/interpreter.lisp @@ -99,8 +99,8 @@ (first options) T)) (2 (set-object-attribute current-object (first options) (second options))) - ;; FIXME gives problems with lines like this: - ;; " ;commented" - should be fixed + ;; XXX gives problems with lines like this: + ;; " ;commented" - should be fixed now ? (t (error "~&ERROR: too many arguments: '~A'" line))))) (T ;; can't happen diff --git a/lisp/player.lisp b/lisp/player.lisp index 08cf181..42f1081 100644 --- a/lisp/player.lisp +++ b/lisp/player.lisp @@ -39,6 +39,10 @@ (change-player-location player (player-place player)) (add-game-object player)) +(defun set-main-player (player-name) + "Set the main player for this game" + (setf (world-main-player *world*) player-name)) + (defun change-player-location (player location) "Change the player's location and do housekeeping" (setf location (to-string location)) diff --git a/lisp/ui.lisp b/lisp/ui.lisp index 406322d..3c8b8ba 100644 --- a/lisp/ui.lisp +++ b/lisp/ui.lisp @@ -14,15 +14,9 @@ ;; (This module should be purely UI) -(defun play-game (player-name) +(defun play-game () "The main game loop" - (let ((player (get-game-object 'player player-name))) - (clear-screen) - ;; Initialize the player if necessary - ;; FIXME Shouldn't be necessary after the adjustment - (unless player - (setf player (create-player player-name)) - (add-player player)) + (let ((player (get-game-object 'player (world-main-player *world*)))) ;; The actual game loop (clear-screen) (let ((place (get-game-object 'place (player-place player)))) @@ -34,46 +28,6 @@ (input-string command)) (format t "~&Goodbye!")))) -(defun create-player (player-name) - "The user creates a new player" - ;; FIXME Remove this entirely. Game authors should define all playable characters. - (let* ((start-player (get-game-object 'player "Start")) - (player (if start-player (copy-player start-player) ;FIXME adjust the name - (make-player :name player-name - :place (random-elt (list-world-objects 'place))))) - (char-attr - '((strength 0) (dexterity 0) - (constitution 0) (intelligence 0))) - (item NIL) (weapon "") - (character-points NIL)) - (format t "~&The name you have chosen is not registered on this game.") - (unless (y-or-n-p "~&Create a new player?") (start-menu) (quit)) - ;; Set character attributes - (while (or (< (reduce #'+ character-points) 24) ; XXX magic number! - (not (set-p character-points))) - (set-list (1+ (random 20)) a b c d) - (setf character-points (list a b c d))) - (setf text " -Now distribute your attribute points. Random numbers have been chosen, -you may assign one number to each of the following attributes:") - (format t "~&~A~%~A~%~%The numbers are:" - text (string-from-list (keys char-attr))) - ;; XXX I should replace simple-input with something offering 'magic' (?) - (do* ((i 0 (1+ i)) (attr (safe-nth i (keys char-attr)) - (safe-nth i (keys char-attr))) - (val (cassoc attr char-attr) (cassoc attr char-attr))) - ((= i (length char-attr)) player) - (format t "~&~A" (string-from-list character-points)) - (simple-input val (concatenate 'string (symbol-name attr) ":")) - (while (not (member val character-points)) - (format t "~&Sorry, invalid number chosen. Please reenter:") - (simple-input val (concatenate 'string (symbol-name attr) ":"))) - (let ((player-fn (build-symbol "player-" attr))) - ;; XXX Kludge ?! - (eval `(setf (,player-fn ,player) ,val))) - (setf character-points - (remove-if #'(lambda (x) (= x val)) character-points))))) - (defun describe-place (p) "Print out a complete description of place p" (when (stringp p) (setf p (get-game-object 'place p))) diff --git a/ATL/Pooh/pooh.atl b/ATL/Pooh/pooh.atl index 181995f..b0498e3 100644 --- a/ATL/Pooh/pooh.atl +++ b/ATL/Pooh/pooh.atl @@ -14,3 +14,7 @@ define-player "Winnie the Pooh" description "A small but very lovable bear of very little brain." place "Pooh's home" + +define-player "Christopher Robin" + description "Pooh's best friend." + place "Western woods" diff --git a/ATL/dev/creator-test.atl b/ATL/dev/creator-test.atl new file mode 100644 index 0000000..6209e7c --- /dev/null +++ b/ATL/dev/creator-test.atl @@ -0,0 +1,185 @@ +;; This code has been automatically generated by the +;; Atlantis world creator. + +define-item "Rope (20m)" + cost 5 + +define-item "Backpack" + cost 5 + +define-item "Knife" + cost 10 + +define-item "Short sword" + cost 40 + +define-item "Long sword" + cost 80 + +define-item "Dagger" + cost 20 + +define-item "Spear" + cost 25 + +define-item "Short bow" + cost 30 + +define-item "Longbow" + cost 60 + +define-item "Slingshot" + cost 15 + +define-item "Throwing knife" + cost 15 + +define-item "Quiver of arrows" + cost 20 + +define-item "Leather armour" + cost 60 + +define-item "Chain mail" + cost 120 + +define-item "Plate armour" + cost 200 + +define-item "Buckler" + cost 35 + +define-item "Full shield" + cost 45 + +define-item "Candles (3x)" + cost 5 + +define-item "Matches" + cost 1 + +define-item "Food rations (5x)" + cost 10 + +define-item "Grappling hook" + cost 15 + +define-item "Fishing net" + cost 25 + +define-item "Fishing rod" + cost 15 + +define-item "Tent (2 people)" + cost 30 + +define-item "Cloak" + cost 15 + +define-item "Hat" + cost 10 + +define-item "Water bottle" + cost 5 + +define-item "Compass" + cost 20 + +define-item "Quill and ink" + cost 5 + +define-item "Parchment" + cost 5 + +define-item "Blanket" + cost 5 + +define-item "Book of Legends" + cost 55 + +define-item "Book of Lore" + cost 55 + +define-item "Medicinal herbs" + cost 10 + +define-item "Bandages (3x)" + cost 5 + +define-item "Tea leaves" + cost 5 + +define-item "Sleeping potion" + cost 15 + +define-item "Leather pouch" + cost 2 + +define-item "Face mask" + cost 10 + +define-item "Dye" + cost 5 + +define-item "Cloth" + cost 5 + +define-item "Scissors" + cost 15 + +define-item "Needle and thread" + cost 3 + +define-item "Canvas" + cost 8 + +define-item "String" + cost 2 + +define-item "Hatchet" + cost 20 + +define-item "Map" + cost 35 + +define-item "Pony" + cost 100 + +define-item "Horse" + cost 180 + +define-item "Saddle and bridle" + cost 45 + +define-item "Saddlebag" + cost 35 + +define-item "Handmirror" + cost 20 + +define-item "Magnifying glass" + cost 20 + +define-item "Telescope" + cost 40 + +define-item "Rope ladder" + cost 15 + +define-item "Torches (3x)" + cost 10 + +define-item "Staff" + cost 10 + +define-item "Cooking pot" + cost 8 + +define-item "Soap" + cost 2 + +define-item "Towel" + cost 5 + +define-item "Boots" + cost 10 \ No newline at end of file diff --git a/ATL/dev/example.atl b/ATL/dev/example.atl new file mode 100644 index 0000000..3101edd --- /dev/null +++ b/ATL/dev/example.atl @@ -0,0 +1,72 @@ +# This is an example Atlantis file - I use it to explore what the language +# should end up looking like. + +load races.atl +load classes.atl + + +define-quest Kill hellhound + objective kill hellhound + reward gold 300 + + +define-spell Ray of death + type kill + min-intelligence 12 + success-rate 35 + + +define-npc Hades + say Oh, amazing, you actually got here! Who did you bribe? + sell 30 Ambrosia + quest Kill hellhound + + +define-item Scroll of light + value 80 + add-experience 20 + add-spell Ray of death + +define-item Ambrosia + category Food + add-health 5 + + +define-monster Hellhound + armor-class 8 + strength 10 + melee-weapon 2 claws + experience 50 + spawn 2 + aggression 60 + +define-monster Fury + armor-class 5 + strength 8 + melee-weapon 10 fire whip + experience 74 + spawn 0.8 + aggression 30 + + +define-place Nowhere + description Welcome to Nowhere! You are in the void, the space between \ +the worlds. Around you is black. Black, except for one tiny pin-prick of light \ +to the north. + neighbour Elysium + +define-place Elysium + description Congratulations! You have achieved Elysium! + neighbour Nowhere + neighbour Fields of punishment + npc Hades + item Scroll of light + +define-place Fields of punishment + description You really, really don't want to end up here... + neighbour Elysium + monster Hellhound + monster Fury + + +start-place Elysium \ No newline at end of file diff --git a/ATL/dev/game-objects.atl b/ATL/dev/game-objects.atl new file mode 100644 index 0000000..0a219ea --- /dev/null +++ b/ATL/dev/game-objects.atl @@ -0,0 +1,58 @@ +; This module defines items, NPCs, monsters and weapons for my +; Atlantis test world. +; @author Daniel Vedder +; @date 02/06/2015 + +define-monster "Fury" + description "Hades' messengers, torturers, assassins. Beware!" + health 10 + dexterity 20 + strength 10 + aggression 30 + spawn 50 + armour-class 3 + weapon "fire-whip" + item "fire-whip" + +define-item "fire-whip" + description "A 10-foot long whip, blazing with magical fire" + cost 180 + weapon + +define-weapon "fire-whip" + description "A 10-foot long whip, blazing with magical fire" + type "whip" + damage 2 + +define-item "Anaklusmos" + description "Riptide, a sword for heroes!" + weapon + +define-item "Lightning bolt" + description "Zeus lightning bolt - the most powerful weapon of the universe!" + weapon + +define-weapon "Anaklusmos" + description "Riptide, a sword for heroes!" + type "sword" + damage 4 + +define-weapon "Lightning bolt" ; primarily for debugging + description "Zeus lightning bolt - the most powerful weapon of the universe!" + type "magic" + damage 40 + +define-npc "Hades" + description "Hades, Lord of the Dead!" + says "Beware, mortal - do not tempt me!" + +define-npc "Charon" + description "A robe-clad ghoul, dread ferryman of the Styx." + says "..." + +define-npc "Persephone" ;testing the shop system + description "Hades' beautiful wife, bringer of summer." + says "Welcome, my friend from the upper world!" + sells "Sleeping potion" + sells "Handmirror" + sells "Book of Lore" \ No newline at end of file diff --git a/ATL/dev/lisp-test.atl b/ATL/dev/lisp-test.atl new file mode 100644 index 0000000..c27ec79 --- /dev/null +++ b/ATL/dev/lisp-test.atl @@ -0,0 +1,53 @@ +; This is a simple ATL file to test whatever I have implemented so far. +; @author Daniel Vedder +; @date 04/05/2015 + +name-world "Underworld" + +define-player "Start" + money 200 + place "Fields of Punishment" + max-health 50 + health 50 + +define-place "Nowhere" + description "Welcome to Nowhere! +You are in the void, the space between the worlds. Around you is black. +Black, except for one tiny pin-prick of light to the north." + neighbour "Styx" + dark + +define-place "Elysium" + description "This is where you want to be when you are six feet under..." + neighbour "Styx" + neighbour "Fields of Punishment" + neighbour "Fields of Asphodel" + npc "Persephone" + +define-place "Fields of Punishment" + description "Precisely where you do NOT want to end up..." + neighbour "Styx" + neighbour "Elysium" + neighbour "Fields of Asphodel" + monster "Fury" + spawns "Fury" + +define-place "Fields of Asphodel" + description "Nothing special. Really, nothing special at all. +Just a whole load of dead people..." + neighbour "Fields of Punishment" + neighbour "Elysium" + npc "Hades" + +define-place "Styx" + description "The great river that all must cross - but woe to those who do!" + neighbour "Fields of Punishment" + neighbour "Elysium" + neighbour "Nowhere" + item "Anaklusmos" + npc "Charon" + +load-file lisp-test.atl ;Testing whether recursive loading is prevented +load-file races-classes.atl +load-file game-objects.atl +load-file creator-test.atl diff --git a/ATL/dev/races-classes.atl b/ATL/dev/races-classes.atl new file mode 100644 index 0000000..659310f --- /dev/null +++ b/ATL/dev/races-classes.atl @@ -0,0 +1,40 @@ +; A file to define all the races and character classes in my test world. +; @author Daniel Vedder +; @date 18/05/2015 + +;;; RACES + +define-race "Elf" + description "The oldest and wisest race of Middle Earth" + +define-race "Dwarf" + description "Sons of the Earth, descendants of Durin" + +define-race "Hobbit" + description "Peace-loving and kind, true gentlemen" + +define-race "Human" + description "Boring, exciting, ever-changing, never-changing man..." + + +;;; CLASSES + +define-class "Warrior" + description "Fighting as a passion!" + special-item "Sword" + +define-class "Wizard" + description "Ancient, powerful, keepers of the Knowledge..." + special-item "staff" + +define-class "Burglar" + description "Breaking and entering taken to the max!" + special-item "lockpick" + special-item "torch" + +define-class "Craftsman" + description "Maker of all things beautiful and useful" + special-item "hammer" + +load-file lisp-test.atl ;Again, a test for recursive loading +load-file test-extension.lisp ;Testing whether Lisp extensions are loaded \ No newline at end of file diff --git a/ATL/dev/test-extension.lisp b/ATL/dev/test-extension.lisp new file mode 100644 index 0000000..f01660a --- /dev/null +++ b/ATL/dev/test-extension.lisp @@ -0,0 +1,5 @@ +;; This file tests whether the interpreter loads Lisp files correctly. +;; author: Daniel Vedder +;; date: 21/05/2015 + +(debugging "~&Loaded Lisp extension file.") diff --git a/ATL/test/creator-test.atl b/ATL/test/creator-test.atl deleted file mode 100644 index 6209e7c..0000000 --- a/ATL/test/creator-test.atl +++ /dev/null @@ -1,185 +0,0 @@ -;; This code has been automatically generated by the -;; Atlantis world creator. - -define-item "Rope (20m)" - cost 5 - -define-item "Backpack" - cost 5 - -define-item "Knife" - cost 10 - -define-item "Short sword" - cost 40 - -define-item "Long sword" - cost 80 - -define-item "Dagger" - cost 20 - -define-item "Spear" - cost 25 - -define-item "Short bow" - cost 30 - -define-item "Longbow" - cost 60 - -define-item "Slingshot" - cost 15 - -define-item "Throwing knife" - cost 15 - -define-item "Quiver of arrows" - cost 20 - -define-item "Leather armour" - cost 60 - -define-item "Chain mail" - cost 120 - -define-item "Plate armour" - cost 200 - -define-item "Buckler" - cost 35 - -define-item "Full shield" - cost 45 - -define-item "Candles (3x)" - cost 5 - -define-item "Matches" - cost 1 - -define-item "Food rations (5x)" - cost 10 - -define-item "Grappling hook" - cost 15 - -define-item "Fishing net" - cost 25 - -define-item "Fishing rod" - cost 15 - -define-item "Tent (2 people)" - cost 30 - -define-item "Cloak" - cost 15 - -define-item "Hat" - cost 10 - -define-item "Water bottle" - cost 5 - -define-item "Compass" - cost 20 - -define-item "Quill and ink" - cost 5 - -define-item "Parchment" - cost 5 - -define-item "Blanket" - cost 5 - -define-item "Book of Legends" - cost 55 - -define-item "Book of Lore" - cost 55 - -define-item "Medicinal herbs" - cost 10 - -define-item "Bandages (3x)" - cost 5 - -define-item "Tea leaves" - cost 5 - -define-item "Sleeping potion" - cost 15 - -define-item "Leather pouch" - cost 2 - -define-item "Face mask" - cost 10 - -define-item "Dye" - cost 5 - -define-item "Cloth" - cost 5 - -define-item "Scissors" - cost 15 - -define-item "Needle and thread" - cost 3 - -define-item "Canvas" - cost 8 - -define-item "String" - cost 2 - -define-item "Hatchet" - cost 20 - -define-item "Map" - cost 35 - -define-item "Pony" - cost 100 - -define-item "Horse" - cost 180 - -define-item "Saddle and bridle" - cost 45 - -define-item "Saddlebag" - cost 35 - -define-item "Handmirror" - cost 20 - -define-item "Magnifying glass" - cost 20 - -define-item "Telescope" - cost 40 - -define-item "Rope ladder" - cost 15 - -define-item "Torches (3x)" - cost 10 - -define-item "Staff" - cost 10 - -define-item "Cooking pot" - cost 8 - -define-item "Soap" - cost 2 - -define-item "Towel" - cost 5 - -define-item "Boots" - cost 10 \ No newline at end of file diff --git a/ATL/test/example.atl b/ATL/test/example.atl deleted file mode 100644 index 3101edd..0000000 --- a/ATL/test/example.atl +++ /dev/null @@ -1,72 +0,0 @@ -# This is an example Atlantis file - I use it to explore what the language -# should end up looking like. - -load races.atl -load classes.atl - - -define-quest Kill hellhound - objective kill hellhound - reward gold 300 - - -define-spell Ray of death - type kill - min-intelligence 12 - success-rate 35 - - -define-npc Hades - say Oh, amazing, you actually got here! Who did you bribe? - sell 30 Ambrosia - quest Kill hellhound - - -define-item Scroll of light - value 80 - add-experience 20 - add-spell Ray of death - -define-item Ambrosia - category Food - add-health 5 - - -define-monster Hellhound - armor-class 8 - strength 10 - melee-weapon 2 claws - experience 50 - spawn 2 - aggression 60 - -define-monster Fury - armor-class 5 - strength 8 - melee-weapon 10 fire whip - experience 74 - spawn 0.8 - aggression 30 - - -define-place Nowhere - description Welcome to Nowhere! You are in the void, the space between \ -the worlds. Around you is black. Black, except for one tiny pin-prick of light \ -to the north. - neighbour Elysium - -define-place Elysium - description Congratulations! You have achieved Elysium! - neighbour Nowhere - neighbour Fields of punishment - npc Hades - item Scroll of light - -define-place Fields of punishment - description You really, really don't want to end up here... - neighbour Elysium - monster Hellhound - monster Fury - - -start-place Elysium \ No newline at end of file diff --git a/ATL/test/game-objects.atl b/ATL/test/game-objects.atl deleted file mode 100644 index 0a219ea..0000000 --- a/ATL/test/game-objects.atl +++ /dev/null @@ -1,58 +0,0 @@ -; This module defines items, NPCs, monsters and weapons for my -; Atlantis test world. -; @author Daniel Vedder -; @date 02/06/2015 - -define-monster "Fury" - description "Hades' messengers, torturers, assassins. Beware!" - health 10 - dexterity 20 - strength 10 - aggression 30 - spawn 50 - armour-class 3 - weapon "fire-whip" - item "fire-whip" - -define-item "fire-whip" - description "A 10-foot long whip, blazing with magical fire" - cost 180 - weapon - -define-weapon "fire-whip" - description "A 10-foot long whip, blazing with magical fire" - type "whip" - damage 2 - -define-item "Anaklusmos" - description "Riptide, a sword for heroes!" - weapon - -define-item "Lightning bolt" - description "Zeus lightning bolt - the most powerful weapon of the universe!" - weapon - -define-weapon "Anaklusmos" - description "Riptide, a sword for heroes!" - type "sword" - damage 4 - -define-weapon "Lightning bolt" ; primarily for debugging - description "Zeus lightning bolt - the most powerful weapon of the universe!" - type "magic" - damage 40 - -define-npc "Hades" - description "Hades, Lord of the Dead!" - says "Beware, mortal - do not tempt me!" - -define-npc "Charon" - description "A robe-clad ghoul, dread ferryman of the Styx." - says "..." - -define-npc "Persephone" ;testing the shop system - description "Hades' beautiful wife, bringer of summer." - says "Welcome, my friend from the upper world!" - sells "Sleeping potion" - sells "Handmirror" - sells "Book of Lore" \ No newline at end of file diff --git a/ATL/test/lisp-test.atl b/ATL/test/lisp-test.atl deleted file mode 100644 index c27ec79..0000000 --- a/ATL/test/lisp-test.atl +++ /dev/null @@ -1,53 +0,0 @@ -; This is a simple ATL file to test whatever I have implemented so far. -; @author Daniel Vedder -; @date 04/05/2015 - -name-world "Underworld" - -define-player "Start" - money 200 - place "Fields of Punishment" - max-health 50 - health 50 - -define-place "Nowhere" - description "Welcome to Nowhere! -You are in the void, the space between the worlds. Around you is black. -Black, except for one tiny pin-prick of light to the north." - neighbour "Styx" - dark - -define-place "Elysium" - description "This is where you want to be when you are six feet under..." - neighbour "Styx" - neighbour "Fields of Punishment" - neighbour "Fields of Asphodel" - npc "Persephone" - -define-place "Fields of Punishment" - description "Precisely where you do NOT want to end up..." - neighbour "Styx" - neighbour "Elysium" - neighbour "Fields of Asphodel" - monster "Fury" - spawns "Fury" - -define-place "Fields of Asphodel" - description "Nothing special. Really, nothing special at all. -Just a whole load of dead people..." - neighbour "Fields of Punishment" - neighbour "Elysium" - npc "Hades" - -define-place "Styx" - description "The great river that all must cross - but woe to those who do!" - neighbour "Fields of Punishment" - neighbour "Elysium" - neighbour "Nowhere" - item "Anaklusmos" - npc "Charon" - -load-file lisp-test.atl ;Testing whether recursive loading is prevented -load-file races-classes.atl -load-file game-objects.atl -load-file creator-test.atl diff --git a/ATL/test/races-classes.atl b/ATL/test/races-classes.atl deleted file mode 100644 index 659310f..0000000 --- a/ATL/test/races-classes.atl +++ /dev/null @@ -1,40 +0,0 @@ -; A file to define all the races and character classes in my test world. -; @author Daniel Vedder -; @date 18/05/2015 - -;;; RACES - -define-race "Elf" - description "The oldest and wisest race of Middle Earth" - -define-race "Dwarf" - description "Sons of the Earth, descendants of Durin" - -define-race "Hobbit" - description "Peace-loving and kind, true gentlemen" - -define-race "Human" - description "Boring, exciting, ever-changing, never-changing man..." - - -;;; CLASSES - -define-class "Warrior" - description "Fighting as a passion!" - special-item "Sword" - -define-class "Wizard" - description "Ancient, powerful, keepers of the Knowledge..." - special-item "staff" - -define-class "Burglar" - description "Breaking and entering taken to the max!" - special-item "lockpick" - special-item "torch" - -define-class "Craftsman" - description "Maker of all things beautiful and useful" - special-item "hammer" - -load-file lisp-test.atl ;Again, a test for recursive loading -load-file test-extension.lisp ;Testing whether Lisp extensions are loaded \ No newline at end of file diff --git a/ATL/test/test-extension.lisp b/ATL/test/test-extension.lisp deleted file mode 100644 index f01660a..0000000 --- a/ATL/test/test-extension.lisp +++ /dev/null @@ -1,5 +0,0 @@ -;; This file tests whether the interpreter loads Lisp files correctly. -;; author: Daniel Vedder -;; date: 21/05/2015 - -(debugging "~&Loaded Lisp extension file.") diff --git a/lisp/atlantis.lisp b/lisp/atlantis.lisp index 4401088..afa9bf2 100644 --- a/lisp/atlantis.lisp +++ b/lisp/atlantis.lisp @@ -19,6 +19,12 @@ (defvar *debugging* NIL) +;; Game worlds must be registered in this list with a display name +;; and a path relative to ../ATL +(defvar *games* '(("Lugwey" "Lugwey/lugwey.atl") + ("Winnie the Pooh" "Pooh/pooh.atl") + ("Development" "dev/test.atl"))) + (defun development () "A method to easily test whatever feature I am currently developing" (setf *debugging* T) @@ -49,26 +55,33 @@ (setf options '("Start a new game" "Load a game" "Create worlds" "Develop" "About" "Exit")) (case (choose-number-option options) + (0 (format t "~&Which world do you want to play?") + ;; let the player choose one of the game worlds + (let ((world (choose-option + (append (keys *games*) '("Other" "Back"))))) + (cond ((equalp world "Back") (start-menu)) + ((equalp world "Other") + (format t "~&What world file do you want to load?") + (input-string world-file)) + (T (setf world-file (cassoc world *games*)))) + (setf world-file (concatenate 'string "../ATL/" world-file)) + (load-file world-file) + ;; let the player choose a character + (format t "~&Which character do you want to play?") + (let* ((char-nr (choose-number-option + (list-world-objects 'player))) + (char-name (nth char-nr (list-world-objects 'player)))) + (set-main-player char-name) + (play-game)))) ;;FIXME Present the player with a choice of saved games - (0 (format t "~&What world file do you want to load?") - (input-string world-file) - ;;FIXME Allowing only one player per world eliminates the need - ;; to ask for a player name - (format t "~&What is your name?") - (input-string name) - (load-file world-file) - (play-game name)) - ;;FIXME Present the player with a choice of game worlds - (1 (format t "~&What game file do you want to load?") + (1 ;(choose-number-option *games*) ;;XXXXXX + (format t "~&What game file do you want to load?") (input-string game) (setf game (concatenate 'string "../saves/" game)) (load-game game) - ;;FIXME Present the player with a choice of predefined characters - (format t "~&What is your name?") - (input-string name) - (play-game name)) + (play-game)) (2 (world-creator)) - (3 (development)) + (3 (development)) ;; XXX Remove this (4 (print-version) (when (y-or-n-p "Show the license text?") (print-text-file "../LICENSE")) diff --git a/lisp/interpreter.lisp b/lisp/interpreter.lisp index 04ab683..439e27f 100644 --- a/lisp/interpreter.lisp +++ b/lisp/interpreter.lisp @@ -99,8 +99,8 @@ (first options) T)) (2 (set-object-attribute current-object (first options) (second options))) - ;; FIXME gives problems with lines like this: - ;; " ;commented" - should be fixed + ;; XXX gives problems with lines like this: + ;; " ;commented" - should be fixed now ? (t (error "~&ERROR: too many arguments: '~A'" line))))) (T ;; can't happen diff --git a/lisp/player.lisp b/lisp/player.lisp index 08cf181..42f1081 100644 --- a/lisp/player.lisp +++ b/lisp/player.lisp @@ -39,6 +39,10 @@ (change-player-location player (player-place player)) (add-game-object player)) +(defun set-main-player (player-name) + "Set the main player for this game" + (setf (world-main-player *world*) player-name)) + (defun change-player-location (player location) "Change the player's location and do housekeeping" (setf location (to-string location)) diff --git a/lisp/ui.lisp b/lisp/ui.lisp index 406322d..3c8b8ba 100644 --- a/lisp/ui.lisp +++ b/lisp/ui.lisp @@ -14,15 +14,9 @@ ;; (This module should be purely UI) -(defun play-game (player-name) +(defun play-game () "The main game loop" - (let ((player (get-game-object 'player player-name))) - (clear-screen) - ;; Initialize the player if necessary - ;; FIXME Shouldn't be necessary after the adjustment - (unless player - (setf player (create-player player-name)) - (add-player player)) + (let ((player (get-game-object 'player (world-main-player *world*)))) ;; The actual game loop (clear-screen) (let ((place (get-game-object 'place (player-place player)))) @@ -34,46 +28,6 @@ (input-string command)) (format t "~&Goodbye!")))) -(defun create-player (player-name) - "The user creates a new player" - ;; FIXME Remove this entirely. Game authors should define all playable characters. - (let* ((start-player (get-game-object 'player "Start")) - (player (if start-player (copy-player start-player) ;FIXME adjust the name - (make-player :name player-name - :place (random-elt (list-world-objects 'place))))) - (char-attr - '((strength 0) (dexterity 0) - (constitution 0) (intelligence 0))) - (item NIL) (weapon "") - (character-points NIL)) - (format t "~&The name you have chosen is not registered on this game.") - (unless (y-or-n-p "~&Create a new player?") (start-menu) (quit)) - ;; Set character attributes - (while (or (< (reduce #'+ character-points) 24) ; XXX magic number! - (not (set-p character-points))) - (set-list (1+ (random 20)) a b c d) - (setf character-points (list a b c d))) - (setf text " -Now distribute your attribute points. Random numbers have been chosen, -you may assign one number to each of the following attributes:") - (format t "~&~A~%~A~%~%The numbers are:" - text (string-from-list (keys char-attr))) - ;; XXX I should replace simple-input with something offering 'magic' (?) - (do* ((i 0 (1+ i)) (attr (safe-nth i (keys char-attr)) - (safe-nth i (keys char-attr))) - (val (cassoc attr char-attr) (cassoc attr char-attr))) - ((= i (length char-attr)) player) - (format t "~&~A" (string-from-list character-points)) - (simple-input val (concatenate 'string (symbol-name attr) ":")) - (while (not (member val character-points)) - (format t "~&Sorry, invalid number chosen. Please reenter:") - (simple-input val (concatenate 'string (symbol-name attr) ":"))) - (let ((player-fn (build-symbol "player-" attr))) - ;; XXX Kludge ?! - (eval `(setf (,player-fn ,player) ,val))) - (setf character-points - (remove-if #'(lambda (x) (= x val)) character-points))))) - (defun describe-place (p) "Print out a complete description of place p" (when (stringp p) (setf p (get-game-object 'place p))) diff --git a/lisp/world.lisp b/lisp/world.lisp index eee42dd..7176cd7 100644 --- a/lisp/world.lisp +++ b/lisp/world.lisp @@ -18,6 +18,7 @@ (defstruct world (name "") + (main-player "") (players NIL) (places NIL) (monsters NIL) diff --git a/ATL/Pooh/pooh.atl b/ATL/Pooh/pooh.atl index 181995f..b0498e3 100644 --- a/ATL/Pooh/pooh.atl +++ b/ATL/Pooh/pooh.atl @@ -14,3 +14,7 @@ define-player "Winnie the Pooh" description "A small but very lovable bear of very little brain." place "Pooh's home" + +define-player "Christopher Robin" + description "Pooh's best friend." + place "Western woods" diff --git a/ATL/dev/creator-test.atl b/ATL/dev/creator-test.atl new file mode 100644 index 0000000..6209e7c --- /dev/null +++ b/ATL/dev/creator-test.atl @@ -0,0 +1,185 @@ +;; This code has been automatically generated by the +;; Atlantis world creator. + +define-item "Rope (20m)" + cost 5 + +define-item "Backpack" + cost 5 + +define-item "Knife" + cost 10 + +define-item "Short sword" + cost 40 + +define-item "Long sword" + cost 80 + +define-item "Dagger" + cost 20 + +define-item "Spear" + cost 25 + +define-item "Short bow" + cost 30 + +define-item "Longbow" + cost 60 + +define-item "Slingshot" + cost 15 + +define-item "Throwing knife" + cost 15 + +define-item "Quiver of arrows" + cost 20 + +define-item "Leather armour" + cost 60 + +define-item "Chain mail" + cost 120 + +define-item "Plate armour" + cost 200 + +define-item "Buckler" + cost 35 + +define-item "Full shield" + cost 45 + +define-item "Candles (3x)" + cost 5 + +define-item "Matches" + cost 1 + +define-item "Food rations (5x)" + cost 10 + +define-item "Grappling hook" + cost 15 + +define-item "Fishing net" + cost 25 + +define-item "Fishing rod" + cost 15 + +define-item "Tent (2 people)" + cost 30 + +define-item "Cloak" + cost 15 + +define-item "Hat" + cost 10 + +define-item "Water bottle" + cost 5 + +define-item "Compass" + cost 20 + +define-item "Quill and ink" + cost 5 + +define-item "Parchment" + cost 5 + +define-item "Blanket" + cost 5 + +define-item "Book of Legends" + cost 55 + +define-item "Book of Lore" + cost 55 + +define-item "Medicinal herbs" + cost 10 + +define-item "Bandages (3x)" + cost 5 + +define-item "Tea leaves" + cost 5 + +define-item "Sleeping potion" + cost 15 + +define-item "Leather pouch" + cost 2 + +define-item "Face mask" + cost 10 + +define-item "Dye" + cost 5 + +define-item "Cloth" + cost 5 + +define-item "Scissors" + cost 15 + +define-item "Needle and thread" + cost 3 + +define-item "Canvas" + cost 8 + +define-item "String" + cost 2 + +define-item "Hatchet" + cost 20 + +define-item "Map" + cost 35 + +define-item "Pony" + cost 100 + +define-item "Horse" + cost 180 + +define-item "Saddle and bridle" + cost 45 + +define-item "Saddlebag" + cost 35 + +define-item "Handmirror" + cost 20 + +define-item "Magnifying glass" + cost 20 + +define-item "Telescope" + cost 40 + +define-item "Rope ladder" + cost 15 + +define-item "Torches (3x)" + cost 10 + +define-item "Staff" + cost 10 + +define-item "Cooking pot" + cost 8 + +define-item "Soap" + cost 2 + +define-item "Towel" + cost 5 + +define-item "Boots" + cost 10 \ No newline at end of file diff --git a/ATL/dev/example.atl b/ATL/dev/example.atl new file mode 100644 index 0000000..3101edd --- /dev/null +++ b/ATL/dev/example.atl @@ -0,0 +1,72 @@ +# This is an example Atlantis file - I use it to explore what the language +# should end up looking like. + +load races.atl +load classes.atl + + +define-quest Kill hellhound + objective kill hellhound + reward gold 300 + + +define-spell Ray of death + type kill + min-intelligence 12 + success-rate 35 + + +define-npc Hades + say Oh, amazing, you actually got here! Who did you bribe? + sell 30 Ambrosia + quest Kill hellhound + + +define-item Scroll of light + value 80 + add-experience 20 + add-spell Ray of death + +define-item Ambrosia + category Food + add-health 5 + + +define-monster Hellhound + armor-class 8 + strength 10 + melee-weapon 2 claws + experience 50 + spawn 2 + aggression 60 + +define-monster Fury + armor-class 5 + strength 8 + melee-weapon 10 fire whip + experience 74 + spawn 0.8 + aggression 30 + + +define-place Nowhere + description Welcome to Nowhere! You are in the void, the space between \ +the worlds. Around you is black. Black, except for one tiny pin-prick of light \ +to the north. + neighbour Elysium + +define-place Elysium + description Congratulations! You have achieved Elysium! + neighbour Nowhere + neighbour Fields of punishment + npc Hades + item Scroll of light + +define-place Fields of punishment + description You really, really don't want to end up here... + neighbour Elysium + monster Hellhound + monster Fury + + +start-place Elysium \ No newline at end of file diff --git a/ATL/dev/game-objects.atl b/ATL/dev/game-objects.atl new file mode 100644 index 0000000..0a219ea --- /dev/null +++ b/ATL/dev/game-objects.atl @@ -0,0 +1,58 @@ +; This module defines items, NPCs, monsters and weapons for my +; Atlantis test world. +; @author Daniel Vedder +; @date 02/06/2015 + +define-monster "Fury" + description "Hades' messengers, torturers, assassins. Beware!" + health 10 + dexterity 20 + strength 10 + aggression 30 + spawn 50 + armour-class 3 + weapon "fire-whip" + item "fire-whip" + +define-item "fire-whip" + description "A 10-foot long whip, blazing with magical fire" + cost 180 + weapon + +define-weapon "fire-whip" + description "A 10-foot long whip, blazing with magical fire" + type "whip" + damage 2 + +define-item "Anaklusmos" + description "Riptide, a sword for heroes!" + weapon + +define-item "Lightning bolt" + description "Zeus lightning bolt - the most powerful weapon of the universe!" + weapon + +define-weapon "Anaklusmos" + description "Riptide, a sword for heroes!" + type "sword" + damage 4 + +define-weapon "Lightning bolt" ; primarily for debugging + description "Zeus lightning bolt - the most powerful weapon of the universe!" + type "magic" + damage 40 + +define-npc "Hades" + description "Hades, Lord of the Dead!" + says "Beware, mortal - do not tempt me!" + +define-npc "Charon" + description "A robe-clad ghoul, dread ferryman of the Styx." + says "..." + +define-npc "Persephone" ;testing the shop system + description "Hades' beautiful wife, bringer of summer." + says "Welcome, my friend from the upper world!" + sells "Sleeping potion" + sells "Handmirror" + sells "Book of Lore" \ No newline at end of file diff --git a/ATL/dev/lisp-test.atl b/ATL/dev/lisp-test.atl new file mode 100644 index 0000000..c27ec79 --- /dev/null +++ b/ATL/dev/lisp-test.atl @@ -0,0 +1,53 @@ +; This is a simple ATL file to test whatever I have implemented so far. +; @author Daniel Vedder +; @date 04/05/2015 + +name-world "Underworld" + +define-player "Start" + money 200 + place "Fields of Punishment" + max-health 50 + health 50 + +define-place "Nowhere" + description "Welcome to Nowhere! +You are in the void, the space between the worlds. Around you is black. +Black, except for one tiny pin-prick of light to the north." + neighbour "Styx" + dark + +define-place "Elysium" + description "This is where you want to be when you are six feet under..." + neighbour "Styx" + neighbour "Fields of Punishment" + neighbour "Fields of Asphodel" + npc "Persephone" + +define-place "Fields of Punishment" + description "Precisely where you do NOT want to end up..." + neighbour "Styx" + neighbour "Elysium" + neighbour "Fields of Asphodel" + monster "Fury" + spawns "Fury" + +define-place "Fields of Asphodel" + description "Nothing special. Really, nothing special at all. +Just a whole load of dead people..." + neighbour "Fields of Punishment" + neighbour "Elysium" + npc "Hades" + +define-place "Styx" + description "The great river that all must cross - but woe to those who do!" + neighbour "Fields of Punishment" + neighbour "Elysium" + neighbour "Nowhere" + item "Anaklusmos" + npc "Charon" + +load-file lisp-test.atl ;Testing whether recursive loading is prevented +load-file races-classes.atl +load-file game-objects.atl +load-file creator-test.atl diff --git a/ATL/dev/races-classes.atl b/ATL/dev/races-classes.atl new file mode 100644 index 0000000..659310f --- /dev/null +++ b/ATL/dev/races-classes.atl @@ -0,0 +1,40 @@ +; A file to define all the races and character classes in my test world. +; @author Daniel Vedder +; @date 18/05/2015 + +;;; RACES + +define-race "Elf" + description "The oldest and wisest race of Middle Earth" + +define-race "Dwarf" + description "Sons of the Earth, descendants of Durin" + +define-race "Hobbit" + description "Peace-loving and kind, true gentlemen" + +define-race "Human" + description "Boring, exciting, ever-changing, never-changing man..." + + +;;; CLASSES + +define-class "Warrior" + description "Fighting as a passion!" + special-item "Sword" + +define-class "Wizard" + description "Ancient, powerful, keepers of the Knowledge..." + special-item "staff" + +define-class "Burglar" + description "Breaking and entering taken to the max!" + special-item "lockpick" + special-item "torch" + +define-class "Craftsman" + description "Maker of all things beautiful and useful" + special-item "hammer" + +load-file lisp-test.atl ;Again, a test for recursive loading +load-file test-extension.lisp ;Testing whether Lisp extensions are loaded \ No newline at end of file diff --git a/ATL/dev/test-extension.lisp b/ATL/dev/test-extension.lisp new file mode 100644 index 0000000..f01660a --- /dev/null +++ b/ATL/dev/test-extension.lisp @@ -0,0 +1,5 @@ +;; This file tests whether the interpreter loads Lisp files correctly. +;; author: Daniel Vedder +;; date: 21/05/2015 + +(debugging "~&Loaded Lisp extension file.") diff --git a/ATL/test/creator-test.atl b/ATL/test/creator-test.atl deleted file mode 100644 index 6209e7c..0000000 --- a/ATL/test/creator-test.atl +++ /dev/null @@ -1,185 +0,0 @@ -;; This code has been automatically generated by the -;; Atlantis world creator. - -define-item "Rope (20m)" - cost 5 - -define-item "Backpack" - cost 5 - -define-item "Knife" - cost 10 - -define-item "Short sword" - cost 40 - -define-item "Long sword" - cost 80 - -define-item "Dagger" - cost 20 - -define-item "Spear" - cost 25 - -define-item "Short bow" - cost 30 - -define-item "Longbow" - cost 60 - -define-item "Slingshot" - cost 15 - -define-item "Throwing knife" - cost 15 - -define-item "Quiver of arrows" - cost 20 - -define-item "Leather armour" - cost 60 - -define-item "Chain mail" - cost 120 - -define-item "Plate armour" - cost 200 - -define-item "Buckler" - cost 35 - -define-item "Full shield" - cost 45 - -define-item "Candles (3x)" - cost 5 - -define-item "Matches" - cost 1 - -define-item "Food rations (5x)" - cost 10 - -define-item "Grappling hook" - cost 15 - -define-item "Fishing net" - cost 25 - -define-item "Fishing rod" - cost 15 - -define-item "Tent (2 people)" - cost 30 - -define-item "Cloak" - cost 15 - -define-item "Hat" - cost 10 - -define-item "Water bottle" - cost 5 - -define-item "Compass" - cost 20 - -define-item "Quill and ink" - cost 5 - -define-item "Parchment" - cost 5 - -define-item "Blanket" - cost 5 - -define-item "Book of Legends" - cost 55 - -define-item "Book of Lore" - cost 55 - -define-item "Medicinal herbs" - cost 10 - -define-item "Bandages (3x)" - cost 5 - -define-item "Tea leaves" - cost 5 - -define-item "Sleeping potion" - cost 15 - -define-item "Leather pouch" - cost 2 - -define-item "Face mask" - cost 10 - -define-item "Dye" - cost 5 - -define-item "Cloth" - cost 5 - -define-item "Scissors" - cost 15 - -define-item "Needle and thread" - cost 3 - -define-item "Canvas" - cost 8 - -define-item "String" - cost 2 - -define-item "Hatchet" - cost 20 - -define-item "Map" - cost 35 - -define-item "Pony" - cost 100 - -define-item "Horse" - cost 180 - -define-item "Saddle and bridle" - cost 45 - -define-item "Saddlebag" - cost 35 - -define-item "Handmirror" - cost 20 - -define-item "Magnifying glass" - cost 20 - -define-item "Telescope" - cost 40 - -define-item "Rope ladder" - cost 15 - -define-item "Torches (3x)" - cost 10 - -define-item "Staff" - cost 10 - -define-item "Cooking pot" - cost 8 - -define-item "Soap" - cost 2 - -define-item "Towel" - cost 5 - -define-item "Boots" - cost 10 \ No newline at end of file diff --git a/ATL/test/example.atl b/ATL/test/example.atl deleted file mode 100644 index 3101edd..0000000 --- a/ATL/test/example.atl +++ /dev/null @@ -1,72 +0,0 @@ -# This is an example Atlantis file - I use it to explore what the language -# should end up looking like. - -load races.atl -load classes.atl - - -define-quest Kill hellhound - objective kill hellhound - reward gold 300 - - -define-spell Ray of death - type kill - min-intelligence 12 - success-rate 35 - - -define-npc Hades - say Oh, amazing, you actually got here! Who did you bribe? - sell 30 Ambrosia - quest Kill hellhound - - -define-item Scroll of light - value 80 - add-experience 20 - add-spell Ray of death - -define-item Ambrosia - category Food - add-health 5 - - -define-monster Hellhound - armor-class 8 - strength 10 - melee-weapon 2 claws - experience 50 - spawn 2 - aggression 60 - -define-monster Fury - armor-class 5 - strength 8 - melee-weapon 10 fire whip - experience 74 - spawn 0.8 - aggression 30 - - -define-place Nowhere - description Welcome to Nowhere! You are in the void, the space between \ -the worlds. Around you is black. Black, except for one tiny pin-prick of light \ -to the north. - neighbour Elysium - -define-place Elysium - description Congratulations! You have achieved Elysium! - neighbour Nowhere - neighbour Fields of punishment - npc Hades - item Scroll of light - -define-place Fields of punishment - description You really, really don't want to end up here... - neighbour Elysium - monster Hellhound - monster Fury - - -start-place Elysium \ No newline at end of file diff --git a/ATL/test/game-objects.atl b/ATL/test/game-objects.atl deleted file mode 100644 index 0a219ea..0000000 --- a/ATL/test/game-objects.atl +++ /dev/null @@ -1,58 +0,0 @@ -; This module defines items, NPCs, monsters and weapons for my -; Atlantis test world. -; @author Daniel Vedder -; @date 02/06/2015 - -define-monster "Fury" - description "Hades' messengers, torturers, assassins. Beware!" - health 10 - dexterity 20 - strength 10 - aggression 30 - spawn 50 - armour-class 3 - weapon "fire-whip" - item "fire-whip" - -define-item "fire-whip" - description "A 10-foot long whip, blazing with magical fire" - cost 180 - weapon - -define-weapon "fire-whip" - description "A 10-foot long whip, blazing with magical fire" - type "whip" - damage 2 - -define-item "Anaklusmos" - description "Riptide, a sword for heroes!" - weapon - -define-item "Lightning bolt" - description "Zeus lightning bolt - the most powerful weapon of the universe!" - weapon - -define-weapon "Anaklusmos" - description "Riptide, a sword for heroes!" - type "sword" - damage 4 - -define-weapon "Lightning bolt" ; primarily for debugging - description "Zeus lightning bolt - the most powerful weapon of the universe!" - type "magic" - damage 40 - -define-npc "Hades" - description "Hades, Lord of the Dead!" - says "Beware, mortal - do not tempt me!" - -define-npc "Charon" - description "A robe-clad ghoul, dread ferryman of the Styx." - says "..." - -define-npc "Persephone" ;testing the shop system - description "Hades' beautiful wife, bringer of summer." - says "Welcome, my friend from the upper world!" - sells "Sleeping potion" - sells "Handmirror" - sells "Book of Lore" \ No newline at end of file diff --git a/ATL/test/lisp-test.atl b/ATL/test/lisp-test.atl deleted file mode 100644 index c27ec79..0000000 --- a/ATL/test/lisp-test.atl +++ /dev/null @@ -1,53 +0,0 @@ -; This is a simple ATL file to test whatever I have implemented so far. -; @author Daniel Vedder -; @date 04/05/2015 - -name-world "Underworld" - -define-player "Start" - money 200 - place "Fields of Punishment" - max-health 50 - health 50 - -define-place "Nowhere" - description "Welcome to Nowhere! -You are in the void, the space between the worlds. Around you is black. -Black, except for one tiny pin-prick of light to the north." - neighbour "Styx" - dark - -define-place "Elysium" - description "This is where you want to be when you are six feet under..." - neighbour "Styx" - neighbour "Fields of Punishment" - neighbour "Fields of Asphodel" - npc "Persephone" - -define-place "Fields of Punishment" - description "Precisely where you do NOT want to end up..." - neighbour "Styx" - neighbour "Elysium" - neighbour "Fields of Asphodel" - monster "Fury" - spawns "Fury" - -define-place "Fields of Asphodel" - description "Nothing special. Really, nothing special at all. -Just a whole load of dead people..." - neighbour "Fields of Punishment" - neighbour "Elysium" - npc "Hades" - -define-place "Styx" - description "The great river that all must cross - but woe to those who do!" - neighbour "Fields of Punishment" - neighbour "Elysium" - neighbour "Nowhere" - item "Anaklusmos" - npc "Charon" - -load-file lisp-test.atl ;Testing whether recursive loading is prevented -load-file races-classes.atl -load-file game-objects.atl -load-file creator-test.atl diff --git a/ATL/test/races-classes.atl b/ATL/test/races-classes.atl deleted file mode 100644 index 659310f..0000000 --- a/ATL/test/races-classes.atl +++ /dev/null @@ -1,40 +0,0 @@ -; A file to define all the races and character classes in my test world. -; @author Daniel Vedder -; @date 18/05/2015 - -;;; RACES - -define-race "Elf" - description "The oldest and wisest race of Middle Earth" - -define-race "Dwarf" - description "Sons of the Earth, descendants of Durin" - -define-race "Hobbit" - description "Peace-loving and kind, true gentlemen" - -define-race "Human" - description "Boring, exciting, ever-changing, never-changing man..." - - -;;; CLASSES - -define-class "Warrior" - description "Fighting as a passion!" - special-item "Sword" - -define-class "Wizard" - description "Ancient, powerful, keepers of the Knowledge..." - special-item "staff" - -define-class "Burglar" - description "Breaking and entering taken to the max!" - special-item "lockpick" - special-item "torch" - -define-class "Craftsman" - description "Maker of all things beautiful and useful" - special-item "hammer" - -load-file lisp-test.atl ;Again, a test for recursive loading -load-file test-extension.lisp ;Testing whether Lisp extensions are loaded \ No newline at end of file diff --git a/ATL/test/test-extension.lisp b/ATL/test/test-extension.lisp deleted file mode 100644 index f01660a..0000000 --- a/ATL/test/test-extension.lisp +++ /dev/null @@ -1,5 +0,0 @@ -;; This file tests whether the interpreter loads Lisp files correctly. -;; author: Daniel Vedder -;; date: 21/05/2015 - -(debugging "~&Loaded Lisp extension file.") diff --git a/lisp/atlantis.lisp b/lisp/atlantis.lisp index 4401088..afa9bf2 100644 --- a/lisp/atlantis.lisp +++ b/lisp/atlantis.lisp @@ -19,6 +19,12 @@ (defvar *debugging* NIL) +;; Game worlds must be registered in this list with a display name +;; and a path relative to ../ATL +(defvar *games* '(("Lugwey" "Lugwey/lugwey.atl") + ("Winnie the Pooh" "Pooh/pooh.atl") + ("Development" "dev/test.atl"))) + (defun development () "A method to easily test whatever feature I am currently developing" (setf *debugging* T) @@ -49,26 +55,33 @@ (setf options '("Start a new game" "Load a game" "Create worlds" "Develop" "About" "Exit")) (case (choose-number-option options) + (0 (format t "~&Which world do you want to play?") + ;; let the player choose one of the game worlds + (let ((world (choose-option + (append (keys *games*) '("Other" "Back"))))) + (cond ((equalp world "Back") (start-menu)) + ((equalp world "Other") + (format t "~&What world file do you want to load?") + (input-string world-file)) + (T (setf world-file (cassoc world *games*)))) + (setf world-file (concatenate 'string "../ATL/" world-file)) + (load-file world-file) + ;; let the player choose a character + (format t "~&Which character do you want to play?") + (let* ((char-nr (choose-number-option + (list-world-objects 'player))) + (char-name (nth char-nr (list-world-objects 'player)))) + (set-main-player char-name) + (play-game)))) ;;FIXME Present the player with a choice of saved games - (0 (format t "~&What world file do you want to load?") - (input-string world-file) - ;;FIXME Allowing only one player per world eliminates the need - ;; to ask for a player name - (format t "~&What is your name?") - (input-string name) - (load-file world-file) - (play-game name)) - ;;FIXME Present the player with a choice of game worlds - (1 (format t "~&What game file do you want to load?") + (1 ;(choose-number-option *games*) ;;XXXXXX + (format t "~&What game file do you want to load?") (input-string game) (setf game (concatenate 'string "../saves/" game)) (load-game game) - ;;FIXME Present the player with a choice of predefined characters - (format t "~&What is your name?") - (input-string name) - (play-game name)) + (play-game)) (2 (world-creator)) - (3 (development)) + (3 (development)) ;; XXX Remove this (4 (print-version) (when (y-or-n-p "Show the license text?") (print-text-file "../LICENSE")) diff --git a/lisp/interpreter.lisp b/lisp/interpreter.lisp index 04ab683..439e27f 100644 --- a/lisp/interpreter.lisp +++ b/lisp/interpreter.lisp @@ -99,8 +99,8 @@ (first options) T)) (2 (set-object-attribute current-object (first options) (second options))) - ;; FIXME gives problems with lines like this: - ;; " ;commented" - should be fixed + ;; XXX gives problems with lines like this: + ;; " ;commented" - should be fixed now ? (t (error "~&ERROR: too many arguments: '~A'" line))))) (T ;; can't happen diff --git a/lisp/player.lisp b/lisp/player.lisp index 08cf181..42f1081 100644 --- a/lisp/player.lisp +++ b/lisp/player.lisp @@ -39,6 +39,10 @@ (change-player-location player (player-place player)) (add-game-object player)) +(defun set-main-player (player-name) + "Set the main player for this game" + (setf (world-main-player *world*) player-name)) + (defun change-player-location (player location) "Change the player's location and do housekeeping" (setf location (to-string location)) diff --git a/lisp/ui.lisp b/lisp/ui.lisp index 406322d..3c8b8ba 100644 --- a/lisp/ui.lisp +++ b/lisp/ui.lisp @@ -14,15 +14,9 @@ ;; (This module should be purely UI) -(defun play-game (player-name) +(defun play-game () "The main game loop" - (let ((player (get-game-object 'player player-name))) - (clear-screen) - ;; Initialize the player if necessary - ;; FIXME Shouldn't be necessary after the adjustment - (unless player - (setf player (create-player player-name)) - (add-player player)) + (let ((player (get-game-object 'player (world-main-player *world*)))) ;; The actual game loop (clear-screen) (let ((place (get-game-object 'place (player-place player)))) @@ -34,46 +28,6 @@ (input-string command)) (format t "~&Goodbye!")))) -(defun create-player (player-name) - "The user creates a new player" - ;; FIXME Remove this entirely. Game authors should define all playable characters. - (let* ((start-player (get-game-object 'player "Start")) - (player (if start-player (copy-player start-player) ;FIXME adjust the name - (make-player :name player-name - :place (random-elt (list-world-objects 'place))))) - (char-attr - '((strength 0) (dexterity 0) - (constitution 0) (intelligence 0))) - (item NIL) (weapon "") - (character-points NIL)) - (format t "~&The name you have chosen is not registered on this game.") - (unless (y-or-n-p "~&Create a new player?") (start-menu) (quit)) - ;; Set character attributes - (while (or (< (reduce #'+ character-points) 24) ; XXX magic number! - (not (set-p character-points))) - (set-list (1+ (random 20)) a b c d) - (setf character-points (list a b c d))) - (setf text " -Now distribute your attribute points. Random numbers have been chosen, -you may assign one number to each of the following attributes:") - (format t "~&~A~%~A~%~%The numbers are:" - text (string-from-list (keys char-attr))) - ;; XXX I should replace simple-input with something offering 'magic' (?) - (do* ((i 0 (1+ i)) (attr (safe-nth i (keys char-attr)) - (safe-nth i (keys char-attr))) - (val (cassoc attr char-attr) (cassoc attr char-attr))) - ((= i (length char-attr)) player) - (format t "~&~A" (string-from-list character-points)) - (simple-input val (concatenate 'string (symbol-name attr) ":")) - (while (not (member val character-points)) - (format t "~&Sorry, invalid number chosen. Please reenter:") - (simple-input val (concatenate 'string (symbol-name attr) ":"))) - (let ((player-fn (build-symbol "player-" attr))) - ;; XXX Kludge ?! - (eval `(setf (,player-fn ,player) ,val))) - (setf character-points - (remove-if #'(lambda (x) (= x val)) character-points))))) - (defun describe-place (p) "Print out a complete description of place p" (when (stringp p) (setf p (get-game-object 'place p))) diff --git a/lisp/world.lisp b/lisp/world.lisp index eee42dd..7176cd7 100644 --- a/lisp/world.lisp +++ b/lisp/world.lisp @@ -18,6 +18,7 @@ (defstruct world (name "") + (main-player "") (players NIL) (places NIL) (monsters NIL) diff --git a/lugwey.world b/lugwey.world deleted file mode 100644 index 8081fc7..0000000 --- a/lugwey.world +++ /dev/null @@ -1,38 +0,0 @@ -(0 1 4) -#S(WORLD :NAME "Lugwey" - :PLAYERS - (#S(PLAYER :NAME "Start" :RACE "" :CLASS "" :STRENGTH 0 :DEXTERITY 0 :CONSTITUTION 0 :INTELLIGENCE 0 :MONEY 50 :ITEM NIL :WEAPON "" :ARMOUR-CLASS 0 :PLACE "Gate" - :EXPERIENCE 0 :LEVEL 0 :MAX-HEALTH 50 :HEALTH 50 :GAME-ADMIN NIL) - #S(PLAYER :NAME "Leonardo" :RACE "Human" :CLASS "Scholar" :STRENGTH 0 :DEXTERITY 0 :CONSTITUTION 0 :INTELLIGENCE 0 :MONEY 60 :ITEM ("Dagger") :WEAPON "Dagger" - :ARMOUR-CLASS 0 :PLACE "Gate" :EXPERIENCE 0 :LEVEL 0 :MAX-HEALTH 50 :HEALTH 50 :GAME-ADMIN NIL)) - :CHARACTER-CLASSS (#S(CHARACTER-CLASS :NAME "Scholar" :DESCRIPTION "Dubio ergo corgito, corgito ergo sum" :SPECIAL-ITEM ("Paper" "Quill") :SPECIAL-ABILITY NIL)) - :RACES - (#S(RACE :NAME "Human" :DESCRIPTION "Errare humanum est" :STRENGTH-BONUS 0 :DEXTERITY-BONUS 0 :CONSTITUTION-BONUS 0 :INTELLIGENCE-BONUS 1 :SPECIAL-ABILITY NIL)) - :PLACES - (#S(PLACE :NAME "Gate" - :DESCRIPTION - "An old, partly moss-covered stone wall rises up in front of -you. Set in it, a wooden gate, reinforced with rusty iron strips. -One wing is open, permitting a view into the space beyond. -Behind you, the dusty track leads off into the forest. - -A monk is sitting in the gate house, obviously bored." - :NEIGHBOUR ("Forest track" "Monastery grounds") :PLAYER NIL :ITEM NIL :MONSTER NIL :NPC ("Gatekeeper")) - #S(PLACE :NAME "Monastery grounds" - :DESCRIPTION - "Paths criss-cross well-kept lawns. Here and there, roses bloom -in a flower bed. On one side stand the monastery buildings with -their calm, ancient dignity. On the other, the gardens, stables -and agricultural outhouses speak of a simple working life." - :NEIGHBOUR ("Gate" "Chapel" "Dormitory" "Gardens" "Stable") :PLAYER NIL :ITEM NIL :MONSTER NIL :NPC NIL) - #S(PLACE :NAME "Forest track" - :DESCRIPTION - "A rutted track, scarred by the wheels of many carts, leads -through the forest from the monastery to the village." - :NEIGHBOUR ("Gate") :PLAYER NIL :ITEM ("Signet ring") :MONSTER NIL :NPC NIL)) - :MONSTERS NIL :NPCS NIL - :ITEMS - (#S(ITEM :NAME "Parchment" :DESCRIPTION "Dried animal skins used as paper." :COST 5 :WEAPON "no" :FUNCTION NIL) - #S(ITEM :NAME "Quill" :DESCRIPTION "A goose-feather, sharpened at one end to make a pen." :COST 5 :WEAPON "no" :FUNCTION NIL) - #S(ITEM :NAME "Dagger" :DESCRIPTION "A long, sharp knife, useful for self defence." :COST 20 :WEAPON "Yes" :FUNCTION NIL)) - :WEAPONS (#S(WEAPON :NAME "Dagger" :DESCRIPTION "A long, sharp knife, useful for self defence." :TYPE "Knife" :DAMAGE 3)) :STARTING-PLACE "" :STARTING-MONEY 0) diff --git a/ATL/Pooh/pooh.atl b/ATL/Pooh/pooh.atl index 181995f..b0498e3 100644 --- a/ATL/Pooh/pooh.atl +++ b/ATL/Pooh/pooh.atl @@ -14,3 +14,7 @@ define-player "Winnie the Pooh" description "A small but very lovable bear of very little brain." place "Pooh's home" + +define-player "Christopher Robin" + description "Pooh's best friend." + place "Western woods" diff --git a/ATL/dev/creator-test.atl b/ATL/dev/creator-test.atl new file mode 100644 index 0000000..6209e7c --- /dev/null +++ b/ATL/dev/creator-test.atl @@ -0,0 +1,185 @@ +;; This code has been automatically generated by the +;; Atlantis world creator. + +define-item "Rope (20m)" + cost 5 + +define-item "Backpack" + cost 5 + +define-item "Knife" + cost 10 + +define-item "Short sword" + cost 40 + +define-item "Long sword" + cost 80 + +define-item "Dagger" + cost 20 + +define-item "Spear" + cost 25 + +define-item "Short bow" + cost 30 + +define-item "Longbow" + cost 60 + +define-item "Slingshot" + cost 15 + +define-item "Throwing knife" + cost 15 + +define-item "Quiver of arrows" + cost 20 + +define-item "Leather armour" + cost 60 + +define-item "Chain mail" + cost 120 + +define-item "Plate armour" + cost 200 + +define-item "Buckler" + cost 35 + +define-item "Full shield" + cost 45 + +define-item "Candles (3x)" + cost 5 + +define-item "Matches" + cost 1 + +define-item "Food rations (5x)" + cost 10 + +define-item "Grappling hook" + cost 15 + +define-item "Fishing net" + cost 25 + +define-item "Fishing rod" + cost 15 + +define-item "Tent (2 people)" + cost 30 + +define-item "Cloak" + cost 15 + +define-item "Hat" + cost 10 + +define-item "Water bottle" + cost 5 + +define-item "Compass" + cost 20 + +define-item "Quill and ink" + cost 5 + +define-item "Parchment" + cost 5 + +define-item "Blanket" + cost 5 + +define-item "Book of Legends" + cost 55 + +define-item "Book of Lore" + cost 55 + +define-item "Medicinal herbs" + cost 10 + +define-item "Bandages (3x)" + cost 5 + +define-item "Tea leaves" + cost 5 + +define-item "Sleeping potion" + cost 15 + +define-item "Leather pouch" + cost 2 + +define-item "Face mask" + cost 10 + +define-item "Dye" + cost 5 + +define-item "Cloth" + cost 5 + +define-item "Scissors" + cost 15 + +define-item "Needle and thread" + cost 3 + +define-item "Canvas" + cost 8 + +define-item "String" + cost 2 + +define-item "Hatchet" + cost 20 + +define-item "Map" + cost 35 + +define-item "Pony" + cost 100 + +define-item "Horse" + cost 180 + +define-item "Saddle and bridle" + cost 45 + +define-item "Saddlebag" + cost 35 + +define-item "Handmirror" + cost 20 + +define-item "Magnifying glass" + cost 20 + +define-item "Telescope" + cost 40 + +define-item "Rope ladder" + cost 15 + +define-item "Torches (3x)" + cost 10 + +define-item "Staff" + cost 10 + +define-item "Cooking pot" + cost 8 + +define-item "Soap" + cost 2 + +define-item "Towel" + cost 5 + +define-item "Boots" + cost 10 \ No newline at end of file diff --git a/ATL/dev/example.atl b/ATL/dev/example.atl new file mode 100644 index 0000000..3101edd --- /dev/null +++ b/ATL/dev/example.atl @@ -0,0 +1,72 @@ +# This is an example Atlantis file - I use it to explore what the language +# should end up looking like. + +load races.atl +load classes.atl + + +define-quest Kill hellhound + objective kill hellhound + reward gold 300 + + +define-spell Ray of death + type kill + min-intelligence 12 + success-rate 35 + + +define-npc Hades + say Oh, amazing, you actually got here! Who did you bribe? + sell 30 Ambrosia + quest Kill hellhound + + +define-item Scroll of light + value 80 + add-experience 20 + add-spell Ray of death + +define-item Ambrosia + category Food + add-health 5 + + +define-monster Hellhound + armor-class 8 + strength 10 + melee-weapon 2 claws + experience 50 + spawn 2 + aggression 60 + +define-monster Fury + armor-class 5 + strength 8 + melee-weapon 10 fire whip + experience 74 + spawn 0.8 + aggression 30 + + +define-place Nowhere + description Welcome to Nowhere! You are in the void, the space between \ +the worlds. Around you is black. Black, except for one tiny pin-prick of light \ +to the north. + neighbour Elysium + +define-place Elysium + description Congratulations! You have achieved Elysium! + neighbour Nowhere + neighbour Fields of punishment + npc Hades + item Scroll of light + +define-place Fields of punishment + description You really, really don't want to end up here... + neighbour Elysium + monster Hellhound + monster Fury + + +start-place Elysium \ No newline at end of file diff --git a/ATL/dev/game-objects.atl b/ATL/dev/game-objects.atl new file mode 100644 index 0000000..0a219ea --- /dev/null +++ b/ATL/dev/game-objects.atl @@ -0,0 +1,58 @@ +; This module defines items, NPCs, monsters and weapons for my +; Atlantis test world. +; @author Daniel Vedder +; @date 02/06/2015 + +define-monster "Fury" + description "Hades' messengers, torturers, assassins. Beware!" + health 10 + dexterity 20 + strength 10 + aggression 30 + spawn 50 + armour-class 3 + weapon "fire-whip" + item "fire-whip" + +define-item "fire-whip" + description "A 10-foot long whip, blazing with magical fire" + cost 180 + weapon + +define-weapon "fire-whip" + description "A 10-foot long whip, blazing with magical fire" + type "whip" + damage 2 + +define-item "Anaklusmos" + description "Riptide, a sword for heroes!" + weapon + +define-item "Lightning bolt" + description "Zeus lightning bolt - the most powerful weapon of the universe!" + weapon + +define-weapon "Anaklusmos" + description "Riptide, a sword for heroes!" + type "sword" + damage 4 + +define-weapon "Lightning bolt" ; primarily for debugging + description "Zeus lightning bolt - the most powerful weapon of the universe!" + type "magic" + damage 40 + +define-npc "Hades" + description "Hades, Lord of the Dead!" + says "Beware, mortal - do not tempt me!" + +define-npc "Charon" + description "A robe-clad ghoul, dread ferryman of the Styx." + says "..." + +define-npc "Persephone" ;testing the shop system + description "Hades' beautiful wife, bringer of summer." + says "Welcome, my friend from the upper world!" + sells "Sleeping potion" + sells "Handmirror" + sells "Book of Lore" \ No newline at end of file diff --git a/ATL/dev/lisp-test.atl b/ATL/dev/lisp-test.atl new file mode 100644 index 0000000..c27ec79 --- /dev/null +++ b/ATL/dev/lisp-test.atl @@ -0,0 +1,53 @@ +; This is a simple ATL file to test whatever I have implemented so far. +; @author Daniel Vedder +; @date 04/05/2015 + +name-world "Underworld" + +define-player "Start" + money 200 + place "Fields of Punishment" + max-health 50 + health 50 + +define-place "Nowhere" + description "Welcome to Nowhere! +You are in the void, the space between the worlds. Around you is black. +Black, except for one tiny pin-prick of light to the north." + neighbour "Styx" + dark + +define-place "Elysium" + description "This is where you want to be when you are six feet under..." + neighbour "Styx" + neighbour "Fields of Punishment" + neighbour "Fields of Asphodel" + npc "Persephone" + +define-place "Fields of Punishment" + description "Precisely where you do NOT want to end up..." + neighbour "Styx" + neighbour "Elysium" + neighbour "Fields of Asphodel" + monster "Fury" + spawns "Fury" + +define-place "Fields of Asphodel" + description "Nothing special. Really, nothing special at all. +Just a whole load of dead people..." + neighbour "Fields of Punishment" + neighbour "Elysium" + npc "Hades" + +define-place "Styx" + description "The great river that all must cross - but woe to those who do!" + neighbour "Fields of Punishment" + neighbour "Elysium" + neighbour "Nowhere" + item "Anaklusmos" + npc "Charon" + +load-file lisp-test.atl ;Testing whether recursive loading is prevented +load-file races-classes.atl +load-file game-objects.atl +load-file creator-test.atl diff --git a/ATL/dev/races-classes.atl b/ATL/dev/races-classes.atl new file mode 100644 index 0000000..659310f --- /dev/null +++ b/ATL/dev/races-classes.atl @@ -0,0 +1,40 @@ +; A file to define all the races and character classes in my test world. +; @author Daniel Vedder +; @date 18/05/2015 + +;;; RACES + +define-race "Elf" + description "The oldest and wisest race of Middle Earth" + +define-race "Dwarf" + description "Sons of the Earth, descendants of Durin" + +define-race "Hobbit" + description "Peace-loving and kind, true gentlemen" + +define-race "Human" + description "Boring, exciting, ever-changing, never-changing man..." + + +;;; CLASSES + +define-class "Warrior" + description "Fighting as a passion!" + special-item "Sword" + +define-class "Wizard" + description "Ancient, powerful, keepers of the Knowledge..." + special-item "staff" + +define-class "Burglar" + description "Breaking and entering taken to the max!" + special-item "lockpick" + special-item "torch" + +define-class "Craftsman" + description "Maker of all things beautiful and useful" + special-item "hammer" + +load-file lisp-test.atl ;Again, a test for recursive loading +load-file test-extension.lisp ;Testing whether Lisp extensions are loaded \ No newline at end of file diff --git a/ATL/dev/test-extension.lisp b/ATL/dev/test-extension.lisp new file mode 100644 index 0000000..f01660a --- /dev/null +++ b/ATL/dev/test-extension.lisp @@ -0,0 +1,5 @@ +;; This file tests whether the interpreter loads Lisp files correctly. +;; author: Daniel Vedder +;; date: 21/05/2015 + +(debugging "~&Loaded Lisp extension file.") diff --git a/ATL/test/creator-test.atl b/ATL/test/creator-test.atl deleted file mode 100644 index 6209e7c..0000000 --- a/ATL/test/creator-test.atl +++ /dev/null @@ -1,185 +0,0 @@ -;; This code has been automatically generated by the -;; Atlantis world creator. - -define-item "Rope (20m)" - cost 5 - -define-item "Backpack" - cost 5 - -define-item "Knife" - cost 10 - -define-item "Short sword" - cost 40 - -define-item "Long sword" - cost 80 - -define-item "Dagger" - cost 20 - -define-item "Spear" - cost 25 - -define-item "Short bow" - cost 30 - -define-item "Longbow" - cost 60 - -define-item "Slingshot" - cost 15 - -define-item "Throwing knife" - cost 15 - -define-item "Quiver of arrows" - cost 20 - -define-item "Leather armour" - cost 60 - -define-item "Chain mail" - cost 120 - -define-item "Plate armour" - cost 200 - -define-item "Buckler" - cost 35 - -define-item "Full shield" - cost 45 - -define-item "Candles (3x)" - cost 5 - -define-item "Matches" - cost 1 - -define-item "Food rations (5x)" - cost 10 - -define-item "Grappling hook" - cost 15 - -define-item "Fishing net" - cost 25 - -define-item "Fishing rod" - cost 15 - -define-item "Tent (2 people)" - cost 30 - -define-item "Cloak" - cost 15 - -define-item "Hat" - cost 10 - -define-item "Water bottle" - cost 5 - -define-item "Compass" - cost 20 - -define-item "Quill and ink" - cost 5 - -define-item "Parchment" - cost 5 - -define-item "Blanket" - cost 5 - -define-item "Book of Legends" - cost 55 - -define-item "Book of Lore" - cost 55 - -define-item "Medicinal herbs" - cost 10 - -define-item "Bandages (3x)" - cost 5 - -define-item "Tea leaves" - cost 5 - -define-item "Sleeping potion" - cost 15 - -define-item "Leather pouch" - cost 2 - -define-item "Face mask" - cost 10 - -define-item "Dye" - cost 5 - -define-item "Cloth" - cost 5 - -define-item "Scissors" - cost 15 - -define-item "Needle and thread" - cost 3 - -define-item "Canvas" - cost 8 - -define-item "String" - cost 2 - -define-item "Hatchet" - cost 20 - -define-item "Map" - cost 35 - -define-item "Pony" - cost 100 - -define-item "Horse" - cost 180 - -define-item "Saddle and bridle" - cost 45 - -define-item "Saddlebag" - cost 35 - -define-item "Handmirror" - cost 20 - -define-item "Magnifying glass" - cost 20 - -define-item "Telescope" - cost 40 - -define-item "Rope ladder" - cost 15 - -define-item "Torches (3x)" - cost 10 - -define-item "Staff" - cost 10 - -define-item "Cooking pot" - cost 8 - -define-item "Soap" - cost 2 - -define-item "Towel" - cost 5 - -define-item "Boots" - cost 10 \ No newline at end of file diff --git a/ATL/test/example.atl b/ATL/test/example.atl deleted file mode 100644 index 3101edd..0000000 --- a/ATL/test/example.atl +++ /dev/null @@ -1,72 +0,0 @@ -# This is an example Atlantis file - I use it to explore what the language -# should end up looking like. - -load races.atl -load classes.atl - - -define-quest Kill hellhound - objective kill hellhound - reward gold 300 - - -define-spell Ray of death - type kill - min-intelligence 12 - success-rate 35 - - -define-npc Hades - say Oh, amazing, you actually got here! Who did you bribe? - sell 30 Ambrosia - quest Kill hellhound - - -define-item Scroll of light - value 80 - add-experience 20 - add-spell Ray of death - -define-item Ambrosia - category Food - add-health 5 - - -define-monster Hellhound - armor-class 8 - strength 10 - melee-weapon 2 claws - experience 50 - spawn 2 - aggression 60 - -define-monster Fury - armor-class 5 - strength 8 - melee-weapon 10 fire whip - experience 74 - spawn 0.8 - aggression 30 - - -define-place Nowhere - description Welcome to Nowhere! You are in the void, the space between \ -the worlds. Around you is black. Black, except for one tiny pin-prick of light \ -to the north. - neighbour Elysium - -define-place Elysium - description Congratulations! You have achieved Elysium! - neighbour Nowhere - neighbour Fields of punishment - npc Hades - item Scroll of light - -define-place Fields of punishment - description You really, really don't want to end up here... - neighbour Elysium - monster Hellhound - monster Fury - - -start-place Elysium \ No newline at end of file diff --git a/ATL/test/game-objects.atl b/ATL/test/game-objects.atl deleted file mode 100644 index 0a219ea..0000000 --- a/ATL/test/game-objects.atl +++ /dev/null @@ -1,58 +0,0 @@ -; This module defines items, NPCs, monsters and weapons for my -; Atlantis test world. -; @author Daniel Vedder -; @date 02/06/2015 - -define-monster "Fury" - description "Hades' messengers, torturers, assassins. Beware!" - health 10 - dexterity 20 - strength 10 - aggression 30 - spawn 50 - armour-class 3 - weapon "fire-whip" - item "fire-whip" - -define-item "fire-whip" - description "A 10-foot long whip, blazing with magical fire" - cost 180 - weapon - -define-weapon "fire-whip" - description "A 10-foot long whip, blazing with magical fire" - type "whip" - damage 2 - -define-item "Anaklusmos" - description "Riptide, a sword for heroes!" - weapon - -define-item "Lightning bolt" - description "Zeus lightning bolt - the most powerful weapon of the universe!" - weapon - -define-weapon "Anaklusmos" - description "Riptide, a sword for heroes!" - type "sword" - damage 4 - -define-weapon "Lightning bolt" ; primarily for debugging - description "Zeus lightning bolt - the most powerful weapon of the universe!" - type "magic" - damage 40 - -define-npc "Hades" - description "Hades, Lord of the Dead!" - says "Beware, mortal - do not tempt me!" - -define-npc "Charon" - description "A robe-clad ghoul, dread ferryman of the Styx." - says "..." - -define-npc "Persephone" ;testing the shop system - description "Hades' beautiful wife, bringer of summer." - says "Welcome, my friend from the upper world!" - sells "Sleeping potion" - sells "Handmirror" - sells "Book of Lore" \ No newline at end of file diff --git a/ATL/test/lisp-test.atl b/ATL/test/lisp-test.atl deleted file mode 100644 index c27ec79..0000000 --- a/ATL/test/lisp-test.atl +++ /dev/null @@ -1,53 +0,0 @@ -; This is a simple ATL file to test whatever I have implemented so far. -; @author Daniel Vedder -; @date 04/05/2015 - -name-world "Underworld" - -define-player "Start" - money 200 - place "Fields of Punishment" - max-health 50 - health 50 - -define-place "Nowhere" - description "Welcome to Nowhere! -You are in the void, the space between the worlds. Around you is black. -Black, except for one tiny pin-prick of light to the north." - neighbour "Styx" - dark - -define-place "Elysium" - description "This is where you want to be when you are six feet under..." - neighbour "Styx" - neighbour "Fields of Punishment" - neighbour "Fields of Asphodel" - npc "Persephone" - -define-place "Fields of Punishment" - description "Precisely where you do NOT want to end up..." - neighbour "Styx" - neighbour "Elysium" - neighbour "Fields of Asphodel" - monster "Fury" - spawns "Fury" - -define-place "Fields of Asphodel" - description "Nothing special. Really, nothing special at all. -Just a whole load of dead people..." - neighbour "Fields of Punishment" - neighbour "Elysium" - npc "Hades" - -define-place "Styx" - description "The great river that all must cross - but woe to those who do!" - neighbour "Fields of Punishment" - neighbour "Elysium" - neighbour "Nowhere" - item "Anaklusmos" - npc "Charon" - -load-file lisp-test.atl ;Testing whether recursive loading is prevented -load-file races-classes.atl -load-file game-objects.atl -load-file creator-test.atl diff --git a/ATL/test/races-classes.atl b/ATL/test/races-classes.atl deleted file mode 100644 index 659310f..0000000 --- a/ATL/test/races-classes.atl +++ /dev/null @@ -1,40 +0,0 @@ -; A file to define all the races and character classes in my test world. -; @author Daniel Vedder -; @date 18/05/2015 - -;;; RACES - -define-race "Elf" - description "The oldest and wisest race of Middle Earth" - -define-race "Dwarf" - description "Sons of the Earth, descendants of Durin" - -define-race "Hobbit" - description "Peace-loving and kind, true gentlemen" - -define-race "Human" - description "Boring, exciting, ever-changing, never-changing man..." - - -;;; CLASSES - -define-class "Warrior" - description "Fighting as a passion!" - special-item "Sword" - -define-class "Wizard" - description "Ancient, powerful, keepers of the Knowledge..." - special-item "staff" - -define-class "Burglar" - description "Breaking and entering taken to the max!" - special-item "lockpick" - special-item "torch" - -define-class "Craftsman" - description "Maker of all things beautiful and useful" - special-item "hammer" - -load-file lisp-test.atl ;Again, a test for recursive loading -load-file test-extension.lisp ;Testing whether Lisp extensions are loaded \ No newline at end of file diff --git a/ATL/test/test-extension.lisp b/ATL/test/test-extension.lisp deleted file mode 100644 index f01660a..0000000 --- a/ATL/test/test-extension.lisp +++ /dev/null @@ -1,5 +0,0 @@ -;; This file tests whether the interpreter loads Lisp files correctly. -;; author: Daniel Vedder -;; date: 21/05/2015 - -(debugging "~&Loaded Lisp extension file.") diff --git a/lisp/atlantis.lisp b/lisp/atlantis.lisp index 4401088..afa9bf2 100644 --- a/lisp/atlantis.lisp +++ b/lisp/atlantis.lisp @@ -19,6 +19,12 @@ (defvar *debugging* NIL) +;; Game worlds must be registered in this list with a display name +;; and a path relative to ../ATL +(defvar *games* '(("Lugwey" "Lugwey/lugwey.atl") + ("Winnie the Pooh" "Pooh/pooh.atl") + ("Development" "dev/test.atl"))) + (defun development () "A method to easily test whatever feature I am currently developing" (setf *debugging* T) @@ -49,26 +55,33 @@ (setf options '("Start a new game" "Load a game" "Create worlds" "Develop" "About" "Exit")) (case (choose-number-option options) + (0 (format t "~&Which world do you want to play?") + ;; let the player choose one of the game worlds + (let ((world (choose-option + (append (keys *games*) '("Other" "Back"))))) + (cond ((equalp world "Back") (start-menu)) + ((equalp world "Other") + (format t "~&What world file do you want to load?") + (input-string world-file)) + (T (setf world-file (cassoc world *games*)))) + (setf world-file (concatenate 'string "../ATL/" world-file)) + (load-file world-file) + ;; let the player choose a character + (format t "~&Which character do you want to play?") + (let* ((char-nr (choose-number-option + (list-world-objects 'player))) + (char-name (nth char-nr (list-world-objects 'player)))) + (set-main-player char-name) + (play-game)))) ;;FIXME Present the player with a choice of saved games - (0 (format t "~&What world file do you want to load?") - (input-string world-file) - ;;FIXME Allowing only one player per world eliminates the need - ;; to ask for a player name - (format t "~&What is your name?") - (input-string name) - (load-file world-file) - (play-game name)) - ;;FIXME Present the player with a choice of game worlds - (1 (format t "~&What game file do you want to load?") + (1 ;(choose-number-option *games*) ;;XXXXXX + (format t "~&What game file do you want to load?") (input-string game) (setf game (concatenate 'string "../saves/" game)) (load-game game) - ;;FIXME Present the player with a choice of predefined characters - (format t "~&What is your name?") - (input-string name) - (play-game name)) + (play-game)) (2 (world-creator)) - (3 (development)) + (3 (development)) ;; XXX Remove this (4 (print-version) (when (y-or-n-p "Show the license text?") (print-text-file "../LICENSE")) diff --git a/lisp/interpreter.lisp b/lisp/interpreter.lisp index 04ab683..439e27f 100644 --- a/lisp/interpreter.lisp +++ b/lisp/interpreter.lisp @@ -99,8 +99,8 @@ (first options) T)) (2 (set-object-attribute current-object (first options) (second options))) - ;; FIXME gives problems with lines like this: - ;; " ;commented" - should be fixed + ;; XXX gives problems with lines like this: + ;; " ;commented" - should be fixed now ? (t (error "~&ERROR: too many arguments: '~A'" line))))) (T ;; can't happen diff --git a/lisp/player.lisp b/lisp/player.lisp index 08cf181..42f1081 100644 --- a/lisp/player.lisp +++ b/lisp/player.lisp @@ -39,6 +39,10 @@ (change-player-location player (player-place player)) (add-game-object player)) +(defun set-main-player (player-name) + "Set the main player for this game" + (setf (world-main-player *world*) player-name)) + (defun change-player-location (player location) "Change the player's location and do housekeeping" (setf location (to-string location)) diff --git a/lisp/ui.lisp b/lisp/ui.lisp index 406322d..3c8b8ba 100644 --- a/lisp/ui.lisp +++ b/lisp/ui.lisp @@ -14,15 +14,9 @@ ;; (This module should be purely UI) -(defun play-game (player-name) +(defun play-game () "The main game loop" - (let ((player (get-game-object 'player player-name))) - (clear-screen) - ;; Initialize the player if necessary - ;; FIXME Shouldn't be necessary after the adjustment - (unless player - (setf player (create-player player-name)) - (add-player player)) + (let ((player (get-game-object 'player (world-main-player *world*)))) ;; The actual game loop (clear-screen) (let ((place (get-game-object 'place (player-place player)))) @@ -34,46 +28,6 @@ (input-string command)) (format t "~&Goodbye!")))) -(defun create-player (player-name) - "The user creates a new player" - ;; FIXME Remove this entirely. Game authors should define all playable characters. - (let* ((start-player (get-game-object 'player "Start")) - (player (if start-player (copy-player start-player) ;FIXME adjust the name - (make-player :name player-name - :place (random-elt (list-world-objects 'place))))) - (char-attr - '((strength 0) (dexterity 0) - (constitution 0) (intelligence 0))) - (item NIL) (weapon "") - (character-points NIL)) - (format t "~&The name you have chosen is not registered on this game.") - (unless (y-or-n-p "~&Create a new player?") (start-menu) (quit)) - ;; Set character attributes - (while (or (< (reduce #'+ character-points) 24) ; XXX magic number! - (not (set-p character-points))) - (set-list (1+ (random 20)) a b c d) - (setf character-points (list a b c d))) - (setf text " -Now distribute your attribute points. Random numbers have been chosen, -you may assign one number to each of the following attributes:") - (format t "~&~A~%~A~%~%The numbers are:" - text (string-from-list (keys char-attr))) - ;; XXX I should replace simple-input with something offering 'magic' (?) - (do* ((i 0 (1+ i)) (attr (safe-nth i (keys char-attr)) - (safe-nth i (keys char-attr))) - (val (cassoc attr char-attr) (cassoc attr char-attr))) - ((= i (length char-attr)) player) - (format t "~&~A" (string-from-list character-points)) - (simple-input val (concatenate 'string (symbol-name attr) ":")) - (while (not (member val character-points)) - (format t "~&Sorry, invalid number chosen. Please reenter:") - (simple-input val (concatenate 'string (symbol-name attr) ":"))) - (let ((player-fn (build-symbol "player-" attr))) - ;; XXX Kludge ?! - (eval `(setf (,player-fn ,player) ,val))) - (setf character-points - (remove-if #'(lambda (x) (= x val)) character-points))))) - (defun describe-place (p) "Print out a complete description of place p" (when (stringp p) (setf p (get-game-object 'place p))) diff --git a/lisp/world.lisp b/lisp/world.lisp index eee42dd..7176cd7 100644 --- a/lisp/world.lisp +++ b/lisp/world.lisp @@ -18,6 +18,7 @@ (defstruct world (name "") + (main-player "") (players NIL) (places NIL) (monsters NIL) diff --git a/lugwey.world b/lugwey.world deleted file mode 100644 index 8081fc7..0000000 --- a/lugwey.world +++ /dev/null @@ -1,38 +0,0 @@ -(0 1 4) -#S(WORLD :NAME "Lugwey" - :PLAYERS - (#S(PLAYER :NAME "Start" :RACE "" :CLASS "" :STRENGTH 0 :DEXTERITY 0 :CONSTITUTION 0 :INTELLIGENCE 0 :MONEY 50 :ITEM NIL :WEAPON "" :ARMOUR-CLASS 0 :PLACE "Gate" - :EXPERIENCE 0 :LEVEL 0 :MAX-HEALTH 50 :HEALTH 50 :GAME-ADMIN NIL) - #S(PLAYER :NAME "Leonardo" :RACE "Human" :CLASS "Scholar" :STRENGTH 0 :DEXTERITY 0 :CONSTITUTION 0 :INTELLIGENCE 0 :MONEY 60 :ITEM ("Dagger") :WEAPON "Dagger" - :ARMOUR-CLASS 0 :PLACE "Gate" :EXPERIENCE 0 :LEVEL 0 :MAX-HEALTH 50 :HEALTH 50 :GAME-ADMIN NIL)) - :CHARACTER-CLASSS (#S(CHARACTER-CLASS :NAME "Scholar" :DESCRIPTION "Dubio ergo corgito, corgito ergo sum" :SPECIAL-ITEM ("Paper" "Quill") :SPECIAL-ABILITY NIL)) - :RACES - (#S(RACE :NAME "Human" :DESCRIPTION "Errare humanum est" :STRENGTH-BONUS 0 :DEXTERITY-BONUS 0 :CONSTITUTION-BONUS 0 :INTELLIGENCE-BONUS 1 :SPECIAL-ABILITY NIL)) - :PLACES - (#S(PLACE :NAME "Gate" - :DESCRIPTION - "An old, partly moss-covered stone wall rises up in front of -you. Set in it, a wooden gate, reinforced with rusty iron strips. -One wing is open, permitting a view into the space beyond. -Behind you, the dusty track leads off into the forest. - -A monk is sitting in the gate house, obviously bored." - :NEIGHBOUR ("Forest track" "Monastery grounds") :PLAYER NIL :ITEM NIL :MONSTER NIL :NPC ("Gatekeeper")) - #S(PLACE :NAME "Monastery grounds" - :DESCRIPTION - "Paths criss-cross well-kept lawns. Here and there, roses bloom -in a flower bed. On one side stand the monastery buildings with -their calm, ancient dignity. On the other, the gardens, stables -and agricultural outhouses speak of a simple working life." - :NEIGHBOUR ("Gate" "Chapel" "Dormitory" "Gardens" "Stable") :PLAYER NIL :ITEM NIL :MONSTER NIL :NPC NIL) - #S(PLACE :NAME "Forest track" - :DESCRIPTION - "A rutted track, scarred by the wheels of many carts, leads -through the forest from the monastery to the village." - :NEIGHBOUR ("Gate") :PLAYER NIL :ITEM ("Signet ring") :MONSTER NIL :NPC NIL)) - :MONSTERS NIL :NPCS NIL - :ITEMS - (#S(ITEM :NAME "Parchment" :DESCRIPTION "Dried animal skins used as paper." :COST 5 :WEAPON "no" :FUNCTION NIL) - #S(ITEM :NAME "Quill" :DESCRIPTION "A goose-feather, sharpened at one end to make a pen." :COST 5 :WEAPON "no" :FUNCTION NIL) - #S(ITEM :NAME "Dagger" :DESCRIPTION "A long, sharp knife, useful for self defence." :COST 20 :WEAPON "Yes" :FUNCTION NIL)) - :WEAPONS (#S(WEAPON :NAME "Dagger" :DESCRIPTION "A long, sharp knife, useful for self defence." :TYPE "Knife" :DAMAGE 3)) :STARTING-PLACE "" :STARTING-MONEY 0) diff --git a/saves/pooh2 b/saves/pooh2 new file mode 100644 index 0000000..168c39f --- /dev/null +++ b/saves/pooh2 @@ -0,0 +1,53 @@ +(0 2 1) +#S(WORLD :NAME "100 Acre Wood" :MAIN-PLAYER "Christopher Robin" + :PLAYERS + (#S(PLAYER :NAME "Winnie the Pooh" :DESCRIPTION "A small but very lovable bear of very little brain." :STRENGTH 0 :DEXTERITY 0 :CONSTITUTION 0 :INTELLIGENCE 0 + :MONEY 0 :ABILITY NIL :ITEM NIL :WEAPON "" :ARMOUR-CLASS 0 :PLACE "Pooh's home" :EXPERIENCE 0 :LEVEL 0 :MAX-HEALTH 50 :HEALTH 50) + #S(PLAYER :NAME "Christopher Robin" :DESCRIPTION "Pooh's best friend." :STRENGTH 0 :DEXTERITY 0 :CONSTITUTION 0 :INTELLIGENCE 0 :MONEY 0 :ABILITY NIL :ITEM NIL + :WEAPON "" :ARMOUR-CLASS 0 :PLACE "Pooh's porch" :EXPERIENCE 1 :LEVEL 0 :MAX-HEALTH 50 :HEALTH 50)) + :PLACES + (#S(PLACE :NAME "Pooh's home" + :DESCRIPTION + "Welcome home! This is what you call comfort: your bed, your +chair, your table. Not to forget your larder, filled with +delicious honey..." + :NEIGHBOUR ("Pooh's porch" "Pooh's branch") :ITEM ("Hunny") :MONSTER NIL :NPC NIL :SPAWNS NIL :REQUIRES "" :FUNCTION "") + #S(PLACE :NAME "Pooh's porch" + :DESCRIPTION + "You are standing in front of Pooh's home. Here he lives under +the name 'Sanders', as anyone can see by the old sign planted +beside the door. A comfy-looking bench stands in the sun, inviting +you to a well-earned rest." + :NEIGHBOUR ("Pooh's home" "Western woods") :ITEM ("Pooh's sign") :MONSTER NIL :NPC NIL :SPAWNS NIL :REQUIRES "" :FUNCTION "") + #S(PLACE :NAME "Pooh's branch" + :DESCRIPTION + "This is a thick branch above Pooh's home. Once, on a very +blustery day, Pooh had to escape to up here. Since then, he +keeps an emergency ration of honey handy." + :NEIGHBOUR ("Pooh's home" "Pooh's porch") :ITEM ("Hunny") :MONSTER NIL :NPC NIL :SPAWNS NIL :REQUIRES "" :FUNCTION "") + #S(PLACE :NAME "Western woods" + :DESCRIPTION + "This is the western part of the 100 Acre Wood. As you would +expect in a wood, it is full of trees. Here, however, there are +not quite that many - mainly young birches." + :NEIGHBOUR ("Pooh's porch" "Central woods" "Northern woods" "Southern woods" "Piglet's porch") :ITEM NIL :MONSTER NIL :NPC NIL :SPAWNS NIL :REQUIRES "" + :FUNCTION "")) + :MONSTERS NIL :NPCS NIL + :ITEMS + (#S(ITEM :NAME "Hunny" :DESCRIPTION "A jar full to the brim of delicious, golden honey. Hmmmm..." :COST 0 :WEAPON NIL :FUNCTION NIL :ABILITY NIL) + #S(ITEM :NAME "Pooh's sign" + :DESCRIPTION + " +SANDERS +" + :COST 0 :WEAPON NIL :FUNCTION NIL :ABILITY NIL) + #S(ITEM :NAME "Piglet's sign" + :DESCRIPTION + " +____________________ +| \\_ +| TRESPASSERS WILL > +|____________________< +" + :COST 0 :WEAPON NIL :FUNCTION NIL :ABILITY NIL)) + :WEAPONS NIL :QUESTS NIL :GAME-FUNCTIONS NIL)