git @ Cat's Eye Technologies The-Swallows / f301ca3
The driveway, path, garage, and shed are not "rooms". Cat's Eye Technologies 11 years ago
1 changed file(s) with 17 addition(s) and 14 deletion(s). Raw diff Collapse all Expand all
2424 # bullets for the revolver
2525
2626 # Mechanics:
27 # have "needing a drink" be an actual goal. should it be implemented as a
28 # fancy, extensible Goal object, or just a boolean attribute?
29 # have having had the drink actually calm their nerves so they no longer
30 # need a drink
27 # they should always scream at seeing the dead body. the scream should
28 # be heard throughout the house and yard.
3129 # ...they check that the brandy is still in the liquor cabinet. is this
3230 # really necessary?
3331 # certain things can't be taken, but can be dragged (like the body)
4947 # eliminate identical duplicate sentences
5048 # Bob is in the dining room & "Bob made his way to the dining room" ->
5149 # "Bob wandered around for a bit, then came back to the dining room"
52 # the driveway is not a "room"
5350 # a better solution for "Bob was in the kitchen" at the start of a paragraph;
5451 # this might include significant memories Bob acquired in the last
5552 # paragraph -- such as finding a revolver in the bed
175172 self.events.append(event)
176173
177174
178 ### TOPICS AND MEMORIES ###
175 ### TOPICS ###
179176
180177 # a "topic" is just what a character has recently had addressed to
181178 # them. It could be anything, not just words, by another character
210207 class ThreatTellMeTopic(Topic):
211208 pass
212209
210
211 ### MEMORIES ###
213212
214213 class Memory(object):
215214 def __init__(self, subject, location, i_hid_it_there=False):
388387 if x is self:
389388 continue
390389 if x.animate():
391 x.emit("<1> saw <2> leave the room", [x, self])
390 x.emit("<1> saw <2> leave the %s" % x.location.noun(), [x, self])
392391 if self.location is not None:
393392 self.location.contents.remove(self)
394393 self.location = location
406405 memory = self.memory.get(x.name, None)
407406 if memory:
408407 amount = pick(['shudder', 'wave'])
409 emotion = pick(['fear', 'disgust', 'sickness'])
408 emotion = pick(['fear', 'disgust', 'sickness', 'loathing'])
410409 self.emit("<1> felt a %s of %s as <he-1> looked at <2>" % (amount, emotion), [self, x])
411410 self.memory[x.name] = Memory(x, self.location)
412411 else:
417416 elif x.animate():
418417 other = x
419418 self.emit("<1> saw <2>", [self, other])
420 other.emit("<1> saw <2> walk into the room", [other, self])
419 other.emit("<1> saw <2> walk into the %s" % self.location.noun(), [other, self])
421420 self.memory[x.name] = Memory(x, self.location)
422421 self.greet(x, "'Hello, <2>,' said <1>")
423422 for y in other.contents:
845844 ### LOCATIONS ###
846845
847846 class Location(Actor):
848 def __init__(self, name, enter="went to"):
847 def __init__(self, name, enter="went to", noun="room"):
849848 self.name = name
850849 self.enter = enter
851850 self.contents = []
852851 self.exits = []
852 self.noun_ = noun
853
854 def noun(self):
855 return self.noun_
853856
854857 def set_exits(self, *exits):
855858 self.exits = exits
900903 living_room = Location('living room')
901904 dining_room = Location('dining room')
902905 front_hall = Location('front hall')
903 driveway = Location('driveway')
904 garage = Location('garage')
905 path_by_the_shed = Location('path by the shed')
906 shed = Location('shed')
906 driveway = Location('driveway', noun="driveway")
907 garage = Location('garage', noun="garage")
908 path_by_the_shed = Location('path by the shed', noun="path")
909 shed = Location('shed', noun="shed")
907910 upstairs_hall = Location('upstairs hall')
908911 study = Location('study')
909912 bathroom = Location('bathroom')