diff --git a/commands/misc.py b/commands/misc.py index 7f83fa9..51a7fbe 100755 --- a/commands/misc.py +++ b/commands/misc.py @@ -18,3 +18,18 @@ class CmdJump(Command): class CmdSetPuddle(CmdSet): def at_cmdset_creation(self): self.add(CmdJump) + + +class CmdThrow(Command): + """ + Jump or play in or around puddles. + """ + key = "throw" + + def func(self): + self.obj.do_throw(self.caller) + + +class CmdSetStick(CmdSet): + def at_cmdset_creation(self): + self.add(CmdThrow) diff --git a/typeclasses/things.py b/typeclasses/things.py index afe850c..9c9f7c9 100755 --- a/typeclasses/things.py +++ b/typeclasses/things.py @@ -14,27 +14,30 @@ from evennia.utils import logger from .objects import Object from .characters import Character -from commands.misc import CmdSetPuddle +from commands.misc import CmdSetPuddle, CmdSetStick from utils.word_list import routput from random import choice, random import re -class Unhider(Object): - """ - This thing has the ability to "unhide" other things. - The idea is .... ugh. - @set thing/ - """ - pass +class Stick(Object): + def at_object_creation(self): + self.cmdset.add_default(CmdSetStick) -class Returnable(Object): - """ - This object can't go far from one or two locations. - - """ - pass + def do_throw(self, thrower): + player.db.thrown_times = (player.db.thrown_times or 0) + 1 + if player.db.jumped_times == 1: + player.msg("The stick flies through the air, and just as you thought, it comes back to you!") + else: + player.msg(routput(choice([ + "Yer a wizard, {thrower.name.capitalize()}!", + "Did you see that? It clipped the leaf on that tree before returning.", + "This is a fun game.", + "Maybe we should get a pet beastie in here who would love to play.", + ]))) + self.location.msg_contents(f"{player.name} jumps in the puddle.", + exclude=player) class Puddle(Object): def at_object_creation(self): diff --git a/web/static/website/css/moss-styles.css b/web/static/website/css/moss-styles.css index 230d8a1..5015b7b 100644 --- a/web/static/website/css/moss-styles.css +++ b/web/static/website/css/moss-styles.css @@ -23,7 +23,7 @@ h1,h2,h3 { } h1 { - color: #B63F31; + color: ##90BE51; /* #B63F31 */ /* color: #423222; */ text-shadow: 5px 5px 5px #E3ECDE; font-size: 5.0vw; diff --git a/world/version1.ev b/world/version1.ev index b39d9de..31d94e7 100644 --- a/world/version1.ev +++ b/world/version1.ev @@ -161,6 +161,27 @@ And now, assume that character by typing: # Puddles:3 ends here +# I will have a script auto generate the sticks on a regular basis, but for now, let’s just make one that I can drop. + + +# [[file:../../../projects/mud.org::*Sticks][Sticks:1]] +@create stick : typeclasses.things.Stick +# Sticks:1 ends here + + + +# And the description … perhaps this could change for every stick? + + +# [[file:../../../projects/mud.org::*Sticks][Sticks:2]] +@desc stick = Its brown and sticky. + +Well, by sticky, we mean, stick-like. + +Maybe, by sticky, we mean, wizardly-sticky...an absolutely amazing looking stick...definitely a wizardly stick. +# Sticks:2 ends here + + # More details about the room that describes aspects of the boulder in the =desc= above. First, the symbol: # [[file:../../../projects/mud.org::*Boulder][Boulder:1]]