diff --git a/ATL/atl-mode.el b/ATL/atl-mode.el new file mode 100644 index 0000000..e8ea1df --- /dev/null +++ b/ATL/atl-mode.el @@ -0,0 +1,20 @@ +;;; +;;; This is an Emacs mode for writing ATL, the descriptive language +;;; for the Atlantis RPG. +;;; +;;; author: Daniel Vedder +;;; date: 22/05/2015 +;;; + +(require 'generic-x) ;; we need this + +(define-generic-mode atl-mode + '(";") ;; comments + ;; define commands + '("define-place" "define-item" "define-monster" "define-npc" + "name-world" "load-file" "start-place") + '() ;; other commands (adjust this? + '("\\.atl$") ;; files for which to activate this mode + '(#'(lambda () (setq linum-mode T))) ;; other functions to call + "An Emacs mode for the ATL game description language" ;; doc string +) diff --git a/ATL/atl-mode.el b/ATL/atl-mode.el new file mode 100644 index 0000000..e8ea1df --- /dev/null +++ b/ATL/atl-mode.el @@ -0,0 +1,20 @@ +;;; +;;; This is an Emacs mode for writing ATL, the descriptive language +;;; for the Atlantis RPG. +;;; +;;; author: Daniel Vedder +;;; date: 22/05/2015 +;;; + +(require 'generic-x) ;; we need this + +(define-generic-mode atl-mode + '(";") ;; comments + ;; define commands + '("define-place" "define-item" "define-monster" "define-npc" + "name-world" "load-file" "start-place") + '() ;; other commands (adjust this? + '("\\.atl$") ;; files for which to activate this mode + '(#'(lambda () (setq linum-mode T))) ;; other functions to call + "An Emacs mode for the ATL game description language" ;; doc string +) diff --git a/ATL/lisp-test.atl b/ATL/lisp-test.atl index a1bc6fd..5a598d0 100644 --- a/ATL/lisp-test.atl +++ b/ATL/lisp-test.atl @@ -2,16 +2,24 @@ ; @author Daniel Vedder ; @date 04/05/2015 +; TODO change the name of this command? +name-world "Los Alamos" + 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." +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 "This is where you want to be when you are six feet under..." neighbour "Nowhere" + neighbour "Fields of Punishment" + +define-place "Fields of Punishment" + description "Precisely where you do NOT want to end up..." + neighbour "Nowhere" + neighbour "Elysium" load-file lisp-test.atl load-file lisp-test2.atl diff --git a/ATL/atl-mode.el b/ATL/atl-mode.el new file mode 100644 index 0000000..e8ea1df --- /dev/null +++ b/ATL/atl-mode.el @@ -0,0 +1,20 @@ +;;; +;;; This is an Emacs mode for writing ATL, the descriptive language +;;; for the Atlantis RPG. +;;; +;;; author: Daniel Vedder +;;; date: 22/05/2015 +;;; + +(require 'generic-x) ;; we need this + +(define-generic-mode atl-mode + '(";") ;; comments + ;; define commands + '("define-place" "define-item" "define-monster" "define-npc" + "name-world" "load-file" "start-place") + '() ;; other commands (adjust this? + '("\\.atl$") ;; files for which to activate this mode + '(#'(lambda () (setq linum-mode T))) ;; other functions to call + "An Emacs mode for the ATL game description language" ;; doc string +) diff --git a/ATL/lisp-test.atl b/ATL/lisp-test.atl index a1bc6fd..5a598d0 100644 --- a/ATL/lisp-test.atl +++ b/ATL/lisp-test.atl @@ -2,16 +2,24 @@ ; @author Daniel Vedder ; @date 04/05/2015 +; TODO change the name of this command? +name-world "Los Alamos" + 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." +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 "This is where you want to be when you are six feet under..." neighbour "Nowhere" + neighbour "Fields of Punishment" + +define-place "Fields of Punishment" + description "Precisely where you do NOT want to end up..." + neighbour "Nowhere" + neighbour "Elysium" load-file lisp-test.atl load-file lisp-test2.atl diff --git a/ATL/lisp-test2.atl b/ATL/lisp-test2.atl index 4861d59..3a4eadb 100644 --- a/ATL/lisp-test2.atl +++ b/ATL/lisp-test2.atl @@ -2,14 +2,22 @@ ; @author Daniel Vedder ; @date 18/05/2015 -define-place "Fields of Punishment" - description "Precisely where you do NOT want to end up..." - neighbour "Nowhere" - neighbour "Elysium" - 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-class "Warrior" + description "Fighting as a passion!" + +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" diff --git a/ATL/atl-mode.el b/ATL/atl-mode.el new file mode 100644 index 0000000..e8ea1df --- /dev/null +++ b/ATL/atl-mode.el @@ -0,0 +1,20 @@ +;;; +;;; This is an Emacs mode for writing ATL, the descriptive language +;;; for the Atlantis RPG. +;;; +;;; author: Daniel Vedder +;;; date: 22/05/2015 +;;; + +(require 'generic-x) ;; we need this + +(define-generic-mode atl-mode + '(";") ;; comments + ;; define commands + '("define-place" "define-item" "define-monster" "define-npc" + "name-world" "load-file" "start-place") + '() ;; other commands (adjust this? + '("\\.atl$") ;; files for which to activate this mode + '(#'(lambda () (setq linum-mode T))) ;; other functions to call + "An Emacs mode for the ATL game description language" ;; doc string +) diff --git a/ATL/lisp-test.atl b/ATL/lisp-test.atl index a1bc6fd..5a598d0 100644 --- a/ATL/lisp-test.atl +++ b/ATL/lisp-test.atl @@ -2,16 +2,24 @@ ; @author Daniel Vedder ; @date 04/05/2015 +; TODO change the name of this command? +name-world "Los Alamos" + 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." +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 "This is where you want to be when you are six feet under..." neighbour "Nowhere" + neighbour "Fields of Punishment" + +define-place "Fields of Punishment" + description "Precisely where you do NOT want to end up..." + neighbour "Nowhere" + neighbour "Elysium" load-file lisp-test.atl load-file lisp-test2.atl diff --git a/ATL/lisp-test2.atl b/ATL/lisp-test2.atl index 4861d59..3a4eadb 100644 --- a/ATL/lisp-test2.atl +++ b/ATL/lisp-test2.atl @@ -2,14 +2,22 @@ ; @author Daniel Vedder ; @date 18/05/2015 -define-place "Fields of Punishment" - description "Precisely where you do NOT want to end up..." - neighbour "Nowhere" - neighbour "Elysium" - 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-class "Warrior" + description "Fighting as a passion!" + +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" diff --git a/lisp/atlantis.lisp b/lisp/atlantis.lisp index 0cec79a..66013e0 100644 --- a/lisp/atlantis.lisp +++ b/lisp/atlantis.lisp @@ -11,7 +11,7 @@ (load 'util.lisp) (load 'interpreter.lisp) -(load 'client.lisp) +;(load 'client.lisp) (defun start-server () diff --git a/ATL/atl-mode.el b/ATL/atl-mode.el new file mode 100644 index 0000000..e8ea1df --- /dev/null +++ b/ATL/atl-mode.el @@ -0,0 +1,20 @@ +;;; +;;; This is an Emacs mode for writing ATL, the descriptive language +;;; for the Atlantis RPG. +;;; +;;; author: Daniel Vedder +;;; date: 22/05/2015 +;;; + +(require 'generic-x) ;; we need this + +(define-generic-mode atl-mode + '(";") ;; comments + ;; define commands + '("define-place" "define-item" "define-monster" "define-npc" + "name-world" "load-file" "start-place") + '() ;; other commands (adjust this? + '("\\.atl$") ;; files for which to activate this mode + '(#'(lambda () (setq linum-mode T))) ;; other functions to call + "An Emacs mode for the ATL game description language" ;; doc string +) diff --git a/ATL/lisp-test.atl b/ATL/lisp-test.atl index a1bc6fd..5a598d0 100644 --- a/ATL/lisp-test.atl +++ b/ATL/lisp-test.atl @@ -2,16 +2,24 @@ ; @author Daniel Vedder ; @date 04/05/2015 +; TODO change the name of this command? +name-world "Los Alamos" + 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." +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 "This is where you want to be when you are six feet under..." neighbour "Nowhere" + neighbour "Fields of Punishment" + +define-place "Fields of Punishment" + description "Precisely where you do NOT want to end up..." + neighbour "Nowhere" + neighbour "Elysium" load-file lisp-test.atl load-file lisp-test2.atl diff --git a/ATL/lisp-test2.atl b/ATL/lisp-test2.atl index 4861d59..3a4eadb 100644 --- a/ATL/lisp-test2.atl +++ b/ATL/lisp-test2.atl @@ -2,14 +2,22 @@ ; @author Daniel Vedder ; @date 18/05/2015 -define-place "Fields of Punishment" - description "Precisely where you do NOT want to end up..." - neighbour "Nowhere" - neighbour "Elysium" - 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-class "Warrior" + description "Fighting as a passion!" + +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" diff --git a/lisp/atlantis.lisp b/lisp/atlantis.lisp index 0cec79a..66013e0 100644 --- a/lisp/atlantis.lisp +++ b/lisp/atlantis.lisp @@ -11,7 +11,7 @@ (load 'util.lisp) (load 'interpreter.lisp) -(load 'client.lisp) +;(load 'client.lisp) (defun start-server () diff --git a/lisp/world.lisp b/lisp/world.lisp index 1f44806..0d95ce0 100644 --- a/lisp/world.lisp +++ b/lisp/world.lisp @@ -17,6 +17,7 @@ ;; each object created in this game (defstruct world + (name "") (players NIL) (character-classs NIL) ;Bad English because of parsing issues (races NIL) @@ -52,3 +53,9 @@ (dolist (object (eval `(,get-world-objects *world*)) name-list) (setf name-list (cons (eval `(,get-object-name ,object)) name-list))))) +(defun name-world (name) + "Set the name of the *world*" + (format t "~&The name of the world is ~A." name) + (setf (world-name *world*) name) + NIL) +