Created a wizardly stick
This commit is contained in:
parent
c4b2de2132
commit
3b378722d8
4 changed files with 54 additions and 15 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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):
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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]]
|
||||
|
|
|
|||
Loading…
Reference in a new issue