comparison demos/rpg/scripts/quests/basequest.py @ 560:69d50e751c9a

Lots of changes. - Added the Serializer class - Made exceptions a little more usable - Added actor attributes (not used yet but will be with the combat engine) - Made the quest dialogs more customizable - Many other small changes
author prock@33b003aa-7bff-0310-803a-e67f0ece8222
date Wed, 23 Jun 2010 19:20:24 +0000
parents d0282579668c
children
comparison
equal deleted inserted replaced
559:cccff9b04f57 560:69d50e751c9a
20 # You should have received a copy of the GNU Lesser General Public 20 # You should have received a copy of the GNU Lesser General Public
21 # License along with this library; if not, write to the 21 # License along with this library; if not, write to the
22 # Free Software Foundation, Inc., 22 # Free Software Foundation, Inc.,
23 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 23 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24 # #################################################################### 24 # ####################################################################
25 # This is the rio de hola client for FIFE.
26 25
27 import sys, os, re, math, random, shutil, time 26 import sys, os, re, math, random, shutil, time
28 from datetime import datetime 27 from datetime import datetime
29 28
30 from fife import fife 29 from fife import fife
36 def __init__(self, ownerid, questid, questtitle, questtext): 35 def __init__(self, ownerid, questid, questtitle, questtext):
37 self._ownerid = ownerid 36 self._ownerid = ownerid
38 self._questid = questid 37 self._questid = questid
39 self._name = questtitle 38 self._name = questtitle
40 self._text = questtext 39 self._text = questtext
40 self._complete_dialog = "That everything I need. Thank you!"
41 self._incomplete_dialog = "Come back when you have all the items I requested!"
41 42
42 def __eq__(self, other): 43 def __eq__(self, other):
43 return self._questid == other.id 44 return self._questid == other.id
44 45
45 def checkQuestCompleted(self, actor): 46 def checkQuestCompleted(self, actor):