[ os.path.join ("dialogues", "bulisa1.dlg"),
os.path.join ("dialogues", "bulisa2.dlg"),
os.path.join ("dialogues", "bulisa3.dlg"),
- os.path.join ("dialogues", "bulisa4.dlg") ] )
+ os.path.join ("dialogues", "bulisa4.dlg"),
+ os.path.join ("dialogues", "bulisa5.dlg") ] )
chest1.objects = [ gold50, gold25, key2, gold10 ]
# set initial response ID to none
resp_id = None
# not yet started mission drawing water from well and not refused it
- if (gamestate.mission_bulisa_water_from_well is False
- and gamestate.mission_bulisa_water_from_well_refused is False):
+ if (gamestate.flag["mission_bulisa_water_from_well"] is False
+ and gamestate.flag["mission_bulisa_water_from_well_refused"] is False):
# set the current dialogue
npc.currentdialog = 0
# get the response ID
resp_id = utility.dialogue_play (self.screen, self.img_dialogue, npc, self.butaba.portrait, 0, 90)
- if (gamestate.mission_bulisa_water_from_well_refused is True and
- gamestate.mission_bulisa_water_from_well is False):
+ if (gamestate.flag["mission_bulisa_water_from_well_refused"] is True and
+ gamestate.flag["mission_bulisa_water_from_well"] is False):
# set the current dialog
npc.currentdialog = 2
resp_id = utility.dialogue_play (self.screen, self.img_dialogue, npc, self.butaba.portrait, 0, 90)
# mission accepted but not completed - check if completed and set value
# accordingly
- elif (gamestate.mission_bulisa_water_from_well is True
- and gamestate.mission_bulisa_water_from_well_complete is False):
+ elif (gamestate.flag["mission_bulisa_water_from_well"] is True
+ and gamestate.flag["mission_bulisa_water_from_well_complete"] is False):
for invobj in self.butaba.objects:
if isinstance (invobj, gameobjects.Bucket) is True:
if invobj.liquid == "water":
- gamestate.mission_bulisa_water_from_well_complete = True
+ gamestate.flag["mission_bulisa_water_from_well_complete"] = True
self.butaba.objects.remove (invobj)
key1 = gameobjects.Key (5, 3, "a chest key", self.img_key2, constants.KEY_CHEST1)
self.butaba.objects.append (key1)
break
# water mission is not completed yet
- if gamestate.mission_bulisa_water_from_well_complete is False:
+ if gamestate.flag["mission_bulisa_water_from_well_complete"] is False:
npc.currentdialog = 1
else:
npc.currentdialog = 3
-
# get the response ID
resp_id = utility.dialogue_play (self.screen, self.img_dialogue, npc, self.butaba.portrait, 0, 90)
+ # water from well mission is completed
+ elif (gamestate.flag["mission_bulisa_water_from_well_complete"]) is True:
+ npc.currentdialog = 4
+ resp_id = utility.dialogue_play (self.screen, self.img_dialogue, npc, self.butaba.portrait, 0, 90)
# if response ID is 12, then drawing water from well mission is refused
if resp_id == "12" or resp_id == "18":
- gamestate.mission_bulisa_water_from_well_refused = True
+ gamestate.flag["mission_bulisa_water_from_well_refused"] = True
# if response ID is 13: that is accepted the drawing water from well mission begins
if resp_id == "13" or resp_id == "17":
- gamestate.mission_bulisa_water_from_well = True
+ gamestate.flag["mission_bulisa_water_from_well"] = True
# if response ID is none
elif resp_id is None:
self.status_message = "You cannot initiate a conversation with %s" % npc.charname