Fix the 'cast' command for fishing.

This commit is contained in:
Howard Abrams 2025-05-13 17:10:32 -07:00
parent e52618fd6f
commit 4b06830680
3 changed files with 245 additions and 213 deletions

View file

@ -151,10 +151,10 @@ class Fish(CarriableNPC):
A visual way to delete the fish.
"""
if fisher.location == fisher.search("mp06"):
fisher.msg(routput("You <<toss ^ heave ^ throw>> the fish back into the <<water ^ pond>>."))
fisher.msg(routput("You <<toss ^ heave ^ throw>> the fish back into the <<water ^ sea>>."))
fisher.msg(routput("The fish says, \"Bye for now. If you want to talk again, just drop me a line!\""))
else:
fisher.msg(routput("You <<toss ^ heave ^ throw>> the fish, and an << eagle ^ hawk >> swoops << down ^ >> and snatches it. I'm sure it will carry the fish back to the pond for you."))
fisher.msg(routput("You <<toss ^ heave ^ throw>> the fish, and an << eagle ^ hawk >> swoops << down ^ >> and snatches it. I'm sure it will carry the fish back to the sea for you."))
self.delete()
def get_name():
@ -191,21 +191,21 @@ class FishingPole(Object):
"Caught nothing but a bit of weeds, yeck.",
"Caught nothing, but this sure is enjoyable.",
"Did you catch a boot? Nah, it isn't even that good.",
"Anything better that sitting on the dock of the pond?",
"Anything better that sitting on the dock of the bay?",
]
def at_object_creation(self):
self.cmdset.add_default(CmdSetFishing)
def do_cast(self, fisher):
if fisher.location != fisher.search("mp06"):
fisher.msg("You can't do that without being near the pond.")
if fisher.location != fisher.search("Lazy Dock"):
fisher.msg("You can't do that without being near the water.")
elif fisher.db.fishing == Fishing.CAST:
fisher.msg("You need to reel the line in first.")
else:
fisher.db.fishing = Fishing.CAST
fisher.msg(routput(random.choice([
"You cast out far into the <<water ^ pond>>.",
"You cast out far into the <<water ^ sea>>.",
"You cast close to the <<dock ^ shore>>.",
"You cast off to the <<right ^ left>> where you <<think you ^ >> see a dark pocket.",
])))

View file

@ -123,7 +123,7 @@ class KnockScript(Script):
waker = self.attributes.get("waker")
if waker:
waker.knocked_timed_out()
self.stop()
self.delete()
class CreateSticks(Script):

File diff suppressed because it is too large Load diff