--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<conversation>
+ <dialogue id="1">
+ <speech>And just who might you be, young man?</speech>
+ <response id="1" nextdialogue="2">My name is Butaba and...</response>
+ <response id="2" nextdialogue="0">Bye!</response>
+ </dialogue>
+ <dialogue id="2">
+ <speech>It doesn't really matter who you are. Can't you see I'm busy? Go away and play with your toys. I've got a lot of work
+to do!</speech>
+ <response id="3" nextdialogue="3">But, I...</response>
+ <response id="4" nextdialogue="0">Sorry, didn't mean to disturb you, sir.</response>
+ </dialogue>
+ <dialogue id="3">
+ <speech>Just go away before I lose my temper, you impertinent fellow.</speech>
+ <response id="5" nextdialogue="0">Uh... sorry!</response>
+ </dialogue>
+</conversation>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<conversation>
+ <dialogue id="1">
+ <speech>Well? Are you the young man Bulisa told me about?</speech>
+ <response id="1" nextdialogue="2">Yes, sir</response>
+ <response id="2" nextdialogue="3">No, not I!</response>
+ <response id="3" nextdialogue="0">Bye!</response>
+ </dialogue>
+ <dialogue id="2">
+ <speech>OK, well... I -am- short handed at the moment and need help. Go around town and visit people and collect as much money
+as you can and report back to me. You are doing a noble service. Be proud that I've entrusted you with such a responsibility...
+Now go! I have no time to chat...</speech>
+ <response id="missioncharityaccepted" nextdialogue="0">Yes, sir!</response>
+ </dialogue>
+ <dialogue id="3">
+ <speech>Then go away and stop bothering me! Can't you see I'm busy? Children!</speech>
+ <response id="4">Bye!</response>
+ </dialogue>
+</conversation>
\ No newline at end of file
os.path.join ("dialogues", "bulisa3.dlg"),
os.path.join ("dialogues", "bulisa4.dlg"),
os.path.join ("dialogues", "bulisa5.dlg"),
- os.path.join ("dialogues", "bulisa6.dlg") ] )
+ os.path.join ("dialogues", "bulisa6.dlg"),
+ os.path.join ("dialogues", "bulisa7.dlg") ] )
npc_mayor = npcs.Mayor (5, 4, self.img_mayorleft, self.img_mayorright,
self.img_mayorfront, self.img_mayorback,
self.img_mayor_portrait, constants.FRONT,
- (2, 2, 2, 2))
+ (2, 2, 2, 2),
+ [ os.path.join ("dialogues", "mayor1.dlg"),
+ os.path.join ("dialogues", "mayor2.dlg"),
+ os.path.join ("dialogues", "mayor3.dlg") ])
chest1.objects = [ gold50, gold25, key2, gold10 ]
if isinstance (npc, npcs.Bulisa):
# interact with Bulisa
self.interact_npc_bulisa (npc)
+ elif isinstance (npc, npcs.Mayor):
+ # interact with the Mayor
+ self.interact_npc_mayor (npc)
+
+ # interact with the mayor
+ def interact_npc_mayor (self, npc):
+ resp_id = None
+
+ if gamestate.flag["mission_charity_money"] is True:
+ npc.currentdialog = 2
+ resp_id = utility.dialogue_play (self.screen, self.img_dialogue, npc, self.butaba.portrait, 0, 90)
+ elif gamestate.flag["mission_charity_informed_mayor"] is True:
+ npc.currentdialog = 1
+ resp_id = utility.dialogue_play (self.screen, self.img_dialogue, npc, self.butaba.portrait, 0, 90)
+ else:
+ npc.currentdialog = 0
+ resp_id = utility.dialogue_play (self.screen, self.img_dialogue, npc, self.butaba.portrait, 0, 90)
+
+
+ # deal with the respnses
+ if resp_id == "missioncharityaccepted":
+ gamestate.flag["mission_charity_money"] = True
+ # response ID is none
+ elif resp_id is None:
+ self.status_message = "You cannot initiate a conversation with %s" % npc.charname
# interact with NPC Bulisa
def interact_npc_bulisa (self, npc):
# check for global game states (starting from later flags to earlier ones
+ # whether butaba is doing the mayor charity mission
+ if gamestate.flag["mission_charity_money"] is True:
+ npc.currentdialog = 6
+ resp_id = utility.dialogue_play (self.screen, self.img_dialogue, npc, self.butaba.portrait, 0, 90)
# whether the drawing water from well mission completed
- if gamestate.flag["mission_charity_informed"] is True:
+ elif gamestate.flag["mission_charity_informed"] is True:
npc.currentdialog = 5
resp_id = utility.dialogue_play (self.screen, self.img_dialogue, npc, self.butaba.portrait, 0, 90)
elif gamestate.flag['mission_bulisa_water_from_well_complete'] is True:
# Butaba is informed about the mayor's charity
elif resp_id == "informedcharitymission":
gamestate.flag["mission_charity_informed"] = True
+ # if mayor has been told about Butaba
+ elif resp_id == "mayortoldaboutbutaba":
+ gamestate.flag["mission_charity_informed_mayor"] = True
# if response ID is none
elif resp_id is None:
self.status_message = "You cannot initiate a conversation with %s" % npc.charname