Add potion

This commit is contained in:
He4eT 2024-12-10 12:17:12 +01:00
commit a2ae664fcb
4 changed files with 24 additions and 0 deletions

View file

@ -55,3 +55,15 @@ dude: Person
+ AskTopic [tGames] + AskTopic [tGames]
"<q>I will later show you one of my games, dude!</q>" "<q>I will later show you one of my games, dude!</q>"
; ;
+ AskTopic [tPotion]
topicResponse() {
if (potion.location == dude) {
potion.moveInto(me);
"<q>Sure, dude! Take it.</q>\n
Now you have a potion in your inventory.";
} else {
"<q>I only had one potion. There's no more, man.</q>";
}
}
;

View file

@ -34,8 +34,10 @@ gameMain: GameMainDef
#include "items/table.t" #include "items/table.t"
#include "items/oldDoor.t" #include "items/oldDoor.t"
#include "items/brokenDoor.t" #include "items/brokenDoor.t"
#include "items/potion.t"
#include "characters/pc.t" #include "characters/pc.t"
#include "characters/dude.t" #include "characters/dude.t"
#include "topics/gamedev.t" #include "topics/gamedev.t"
#include "topics/magic.t"

9
items/potion.t Normal file
View file

@ -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
;

1
topics/magic.t Normal file
View file

@ -0,0 +1 @@
tPotion: Topic 'potion/heal/cure';