diff --git a/characters/dude.t b/characters/dude.t index b46e464..cf5d218 100644 --- a/characters/dude.t +++ b/characters/dude.t @@ -55,3 +55,15 @@ dude: Person + AskTopic [tGames] "I will later show you one of my games, dude!" ; + ++ AskTopic [tPotion] + topicResponse() { + if (potion.location == dude) { + potion.moveInto(me); + "Sure, dude! Take it.\n + Now you have a potion in your inventory."; + } else { + "I only had one potion. There's no more, man."; + } + } +; diff --git a/index.t b/index.t index f7de37a..dc94f0a 100644 --- a/index.t +++ b/index.t @@ -34,8 +34,10 @@ gameMain: GameMainDef #include "items/table.t" #include "items/oldDoor.t" #include "items/brokenDoor.t" +#include "items/potion.t" #include "characters/pc.t" #include "characters/dude.t" #include "topics/gamedev.t" +#include "topics/magic.t" diff --git a/items/potion.t b/items/potion.t new file mode 100644 index 0000000..3fde87e --- /dev/null +++ b/items/potion.t @@ -0,0 +1,9 @@ +potion: Thing + 'potion' + 'potion' + "A small glass bottle filled with a glowing green potion.\n + The liquid shimmers with an emerald hue and emits a faint, herbal scent. + It's sealed with a cork and looks both intriguing and powerful, + hinting at magical properties within. " + location = dude +; diff --git a/topics/magic.t b/topics/magic.t new file mode 100644 index 0000000..21d73e6 --- /dev/null +++ b/topics/magic.t @@ -0,0 +1 @@ +tPotion: Topic 'potion/heal/cure';