X-Git-Url: https://harishankar.org/repos/?p=butaba-adventures.git;a=blobdiff_plain;f=npcs.py;h=d3688335e41944f082917d97d52b9262dc88a567;hp=ae781da196fcc3dd8e01ab20da7a1bd55406ed64;hb=8d8c32fdbd61956ccc4792524b621524d83b0467;hpb=4d50728c1454554fef2ad4841345d0c28101702d diff --git a/npcs.py b/npcs.py index ae781da..d368833 100644 --- a/npcs.py +++ b/npcs.py @@ -6,7 +6,7 @@ import os.path class NPC: # initalize the NPC - def __init__ (self, charname, row, col, image=None, portrait=None, dialogue_set=set(), + def __init__ (self, charname, row, col, image=None, portrait=None, dialogues=[], currentdialog=0, is_dead=False): # name of the character self.charname = charname @@ -19,7 +19,7 @@ class NPC: self.portrait = portrait # dialogue set for NPC # each dialogue in the set is a path to an XML file containing the dialogue - self.dialogue_set = dialogue_set + self.dialogues = dialogues # index of the current dialogue which will be initiated with the main # character self.currentdialog = currentdialog @@ -29,6 +29,6 @@ class NPC: # Bulisa is Butaba's friend class Bulisa (NPC): - def __init__ (self, row, col, image, portrait, dialogue_set=set(), currentdialog=0): - NPC.__init__ (self, "Bulisa", row, col, image, portrait, dialogue_set, currentdialog) + def __init__ (self, row, col, image, portrait, dialogues=[], currentdialog=0): + NPC.__init__ (self, "Bulisa", row, col, image, portrait, dialogues, currentdialog)