# HG changeset patch # User Steve Losh # Date 1342647763 14400 # Node ID f57db9d7ccffed8a76b6ccfbaf89a191ff351b00 # Parent ae4e6a9fa90659af758f7ea88f58760efade55df Entity names. diff -r ae4e6a9fa906 -r f57db9d7ccff src/caves/entities/aspects/attacker.clj --- a/src/caves/entities/aspects/attacker.clj Wed Jul 18 17:37:46 2012 -0400 +++ b/src/caves/entities/aspects/attacker.clj Wed Jul 18 17:42:43 2012 -0400 @@ -14,9 +14,9 @@ (->> world (take-damage target damage) (send-message this "You strike the %s for %d damage!" - [(:glyph target) damage]) + [(:name target) damage]) (send-message target "The %s strikes you for %d damage!" - [(:glyph target) damage])))) + [(:name target) damage])))) (attack-value [this world] (get this :attack 1))) diff -r ae4e6a9fa906 -r f57db9d7ccff src/caves/entities/bunny.clj --- a/src/caves/entities/bunny.clj Wed Jul 18 17:37:46 2012 -0400 +++ b/src/caves/entities/bunny.clj Wed Jul 18 17:42:43 2012 -0400 @@ -5,10 +5,11 @@ [caves.world :only [find-empty-neighbor]])) -(defrecord Bunny [id glyph color location hp max-hp]) +(defrecord Bunny [id glyph color location hp max-hp name]) (defn make-bunny [location] (map->Bunny {:id (get-id) + :name "bunny" :glyph "v" :color :yellow :location location diff -r ae4e6a9fa906 -r f57db9d7ccff src/caves/entities/lichen.clj --- a/src/caves/entities/lichen.clj Wed Jul 18 17:37:46 2012 -0400 +++ b/src/caves/entities/lichen.clj Wed Jul 18 17:42:43 2012 -0400 @@ -5,10 +5,11 @@ [caves.world :only [find-empty-neighbor]])) -(defrecord Lichen [id glyph color location hp max-hp]) +(defrecord Lichen [id glyph color location hp max-hp name]) (defn make-lichen [location] (map->Lichen {:id (get-id) + :name "lichen" :glyph "F" :color :green :location location diff -r ae4e6a9fa906 -r f57db9d7ccff src/caves/entities/player.clj --- a/src/caves/entities/player.clj Wed Jul 18 17:37:46 2012 -0400 +++ b/src/caves/entities/player.clj Wed Jul 18 17:42:43 2012 -0400 @@ -9,7 +9,7 @@ [caves.world :only [get-entity-at]])) -(defrecord Player [id glyph color location hp max-hp attack]) +(defrecord Player [id glyph color location hp max-hp attack name]) (extend-type Player Entity (tick [this world] @@ -23,6 +23,7 @@ (defn make-player [location] (map->Player {:id :player + :name "player" :glyph "@" :color :white :location location diff -r ae4e6a9fa906 -r f57db9d7ccff src/caves/entities/silverfish.clj --- a/src/caves/entities/silverfish.clj Wed Jul 18 17:37:46 2012 -0400 +++ b/src/caves/entities/silverfish.clj Wed Jul 18 17:42:43 2012 -0400 @@ -6,10 +6,11 @@ [caves.coords :only [neighbors]])) -(defrecord Silverfish [id glyph color location hp max-hp]) +(defrecord Silverfish [id glyph color location hp max-hp name]) (defn make-silverfish [location] (map->Silverfish {:id (get-id) + :name "silverfish" :glyph "~" :color :white :location location