Skip to content

Commit db641fd

Browse files
authored
Merge pull request #11 from joycedfan/joycedfan-character-instructions
Update README.md
2 parents e9b3ae0 + 9322bb0 commit db641fd

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,29 @@ kitchen.link_room(dining_hall, "south")
2929

3030
dining_hall.link_room(kitchen, "north")
3131

32+
---
33+
Add Enemies by adding the following code to main.py:
34+
name = Enemy("Name", "description of character.")
35+
name.set_conversation("What you want the character to say!")
36+
dave.set_weakness("item that will be the enemy's weakness")
37+
room_where_enemy_should_be.set_character(name)
38+
39+
Add Friends by adding the following code to main.py:
40+
name = Friend("Name", "description of character.")
41+
name.set_conversation("What you want the character to say!")
42+
room_where_enemy_should_be.set_character(name)
43+
#Note, friends don't fight friends so they don't have any weaknesses.
44+
45+
Example:
46+
47+
dave = Enemy("Dave", "a smelly, hungry zombie.")
48+
dave.set_conversation("Brrlgrh... rgrhl... braaains...")
49+
dave.set_weakness("brains")
50+
dining_hall.set_character(dave)
51+
52+
catrina = Friend("Catrina", "a tall friendly skeleton.")
53+
catrina.set_conversation("Why hello there, friend!")
54+
ballroom.set_character(catrina)
55+
3256

3357
Move through the house here: https://trinket.io/python/c0bf3c7c32

0 commit comments

Comments
 (0)