Created
April 11, 2018 18:29
-
-
Save zhammer/8c1a5737333f215ac3338ae8fbe4fa06 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> n | |
THERE IS A THREATENING LITTLE DWARF IN THE ROOM WITH YOU! | |
ONE SHARP NASTY KNIFE IS THROWN AT YOU! | |
IT MISSES! | |
YOU ARE IN A LARGE ROOM, WITH A PASSAGE TO THE SOUTH, A PASSAGE TO THE | |
WEST, AND A WALL OF BROKEN ROCK TO THE EAST. THERE IS A LARGE "Y2" ON | |
A ROCK IN THE ROOM'S CENTER. | |
>>> form pprint import pprint as pp | |
File "<stdin>", line 1 | |
form pprint import pprint as pp | |
^ | |
SyntaxError: invalid syntax | |
>>> frm pprint import pprint as pp | |
File "<stdin>", line 1 | |
frm pprint import pprint as pp | |
^ | |
SyntaxError: invalid syntax | |
>>> from pprint import pprint as pp | |
>>> pp(w.game.object_list[16]) | |
<Object 17 dwarf/dwarves 7fc29a4d0550> | |
>>> pp(w.game.object_list[16].__dict__) | |
{'contents': None, | |
'inventory_message': '', | |
'is_fixed': False, | |
'is_toting': False, | |
'is_treasure': False, | |
'messages': {}, | |
'n': 17, | |
'names': ['dwarf', 'dwarves'], | |
'prop': 0, | |
'rooms': [], | |
'starting_rooms': []} | |
>>> pp([dwarf for dwarf in w.game.dwarves if dwarf.room == w.game.loc]) | |
[<adventure.model.Dwarf object at 0x7fc29a49f8d0>] | |
>>> pp([dwarf for dwarf in w.game.dwarves if dwarf.room == w.game.loc][0].__dict__) | |
{'has_seen_adventurer': True, | |
'old_room': <room 33 at 0x7fc29a518be0>, | |
'room': <room 33 at 0x7fc29a518be0>} | |
>>> pp(w.game.inventory) | |
[<Object 2 lamp/headlamp/lantern 7fc29a4cba58>, <Object 4 cage 7fc29a4cbc88>] | |
>>> pp(w.game.objects_here) | |
[] | |
>>> carry(dwarf) | |
OK | |
>>> pp(w.game.object_list[16].__dict__) | |
{'contents': None, | |
'inventory_message': '', | |
'is_fixed': False, | |
'is_toting': True, | |
'is_treasure': False, | |
'messages': {}, | |
'n': 17, | |
'names': ['dwarf', 'dwarves'], | |
'prop': 0, | |
'rooms': [], | |
'starting_rooms': []} | |
>>> pp([dwarf for dwarf in w.game.dwarves if dwarf.room == w.game.loc]) | |
[<adventure.model.Dwarf object at 0x7fc29a49f8d0>] | |
>>> pp([dwarf for dwarf in w.game.dwarves if dwarf.room == w.game.loc][0].__dict__) | |
{'has_seen_adventurer': True, | |
'old_room': <room 33 at 0x7fc29a518be0>, | |
'room': <room 33 at 0x7fc29a518be0>} | |
>>> pp(w.game.inventory) | |
[<Object 2 lamp/headlamp/lantern 7fc29a4cba58>, | |
<Object 4 cage 7fc29a4cbc88>, | |
<Object 17 dwarf/dwarves 7fc29a4d0550>] | |
>>> pp(w.game.objects_here) | |
[] | |
>>> drop(dwarf) | |
OK | |
>>> pp(w.game.object_list[16].__dict__) | |
{'contents': None, | |
'inventory_message': '', | |
'is_fixed': False, | |
'is_toting': False, | |
'is_treasure': False, | |
'messages': {}, | |
'n': 17, | |
'names': ['dwarf', 'dwarves'], | |
'prop': 0, | |
'rooms': [<room 33 at 0x7fc29a518be0>], | |
'starting_rooms': []} | |
>>> pp([dwarf for dwarf in w.game.dwarves if dwarf.room == w.game.loc]) | |
[<adventure.model.Dwarf object at 0x7fc29a49f8d0>] | |
>>> pp([dwarf for dwarf in w.game.dwarves if dwarf.room == w.game.loc][0].__dict__) | |
{'has_seen_adventurer': True, | |
'old_room': <room 33 at 0x7fc29a518be0>, | |
'room': <room 33 at 0x7fc29a518be0>} | |
>>> pp(w.game.objects_here) | |
[<Object 17 dwarf/dwarves 7fc29a4d0550>] | |
>>> pp(w.game.inventory) | |
[<Object 2 lamp/headlamp/lantern 7fc29a4cba58>, <Object 4 cage 7fc29a4cbc88>] |
obj = self.referent(noun)
obj_here = self.is_here(obj)
...
elif noun == 'dwarf':
obj_here = any( d.room is self.loc for d in self.dwarves )
from: http://www.amc.com/shows/halt-and-catch-fire/exclusives/colossal-cave-adventure
There is no way to go that direction.
There is a threatening little dwarf in the room with you!
> take(dwarf)
I don't understand that!
def i_attack(self, verb): #9120
enemies = [ self.snake, self.dragon, self.troll, self.bear ]
if self.dwarf_stage >= 2:
enemies.extend(self.dwarves)
dangers = list(filter(self.is_here, enemies))
...
# in t_attack
elif obj is self.dwarf:
if self.is_closed:
self.wake_repository_dwarves()
return
self.write_message(49)
elif obj is self.dwarf:
if self.is_closed:
self.wake_repository_dwarves()
return
self.write_message(49) # WITH WHAT? YOUR BARE HANDS?
if obj:
method_name = 't_' + verb_name
args = (verb, obj)
>>> attack(dwarf)
dispatch command: ('attack', 'dwarf')
WITH WHAT? YOUR BARE HANDS?
>>> attack
dispatch command: ('attack',)
dangers: [<adventure.model.Dwarf object at 0x7ff70e7a3ac8>]
THERE IS NOTHING HERE TO ATTACK.
also from amc
> w
There is a threatening little dwarf in the room with you!
One sharp, nasty knife is thrown at you!
It misses!
You are in a large room full of dusty rocks. There is a
big hole in the floor. There are cracks everywhere, and
a passage leading east.
> attack
With what? Your bare hands?
There is a threatening little dwarf in the room with you!
One sharp, nasty knife is thrown at you!
It misses!
> attack dwarf
With what? Your bare hands?
There is a threatening little dwarf in the room with you!
One sharp, nasty knife is thrown at you!
It misses!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
accidentally takes
dwarves
object.