0

I've been thinking recently about how cool it would be to make a rpg/text adventure game where you could fight monsters- in my case fallout3 inspired mutant hicks from the game point lookout. I have the room classes. (I can give code later in the day). how would i make a weapons class, monster class, etc for the rpg elements of the game?

Luckily, i found a post on a battle system so thats out of the way. Like i said, is there a way to make a list of weapons and monsters and append those weapons you can pick up and the monsters/hicks to a room class?

2
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by Mathhax0r
0

Yes, you make a Monster class, and a Weapons class, and in the constructor of the Room make a list of the monsters and a list of the weapons.

0

Yes, you make a Monster class, and a Weapons class, and in the constructor of the Room make a list of the monsters and a list of the weapons.

thanks MathaxOr

0

Here's some of the code that I had given you last time with a few modifications.

class Room:
 
	def __init__(self,argDesc,argDir,argMon,argPrz):
		self.desc = argDesc
		self.dir = argDir
		self.monsters = argMon
		self.prizes = argPrz

	def narrarate(self):
		print self.desc
 
	def goTo(self, argWhere):
		if self.dir.has_key(argWhere) == 0:
			return None
		else:
			return self.dir[argWhere]

closet = []
closet.append(Room("You enter the closet", \
{"south":bedroom}, \
[Monster("boogie_man"), Monster("boogie_man")], \
[Weapon("Generic Sword")]))
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.