예제 #1
0
    def createNewChar(self):
        self.doc = Document()
        self.saveData = self.doc.createElement('SaveData')
        self.charElem = self.doc.createElement(CharSaveData.char)
        self.lvlElem = self.doc.createElement(CharSaveData.leveling)
        self.inventElem = self.doc.createElement('Inventory')
        
        self.doc.appendChild(self.saveData)
        self.saveData.appendChild(self.charElem)
        self.saveData.appendChild(self.inventElem)
        self.saveData.appendChild(self.lvlElem)
        
        self.strength = 3
        self.intel = 3
        self.dex= 3
        self.wis = 3 
        self.con = 3
        self.cha = 3
        self.level = 1
        self.injury = 0

        self.name ="Name Me"
        self.charClass = Class.createClass(None)
        self.align = "Select Align"
        self.race = "Select Race"
예제 #2
0
    def __init__(self, guiObj):
        '''
        '''
        self.savedata = CharSaveData(None)
        
#        self.baseAbilites = {}
#        for x in Abilities.fullList:
#            self.baseAbilites[x] = 3
        
        self._strTab = StrTab()
        self._intTab = IntTab()
        self._conTab = ConTab()
        self._dexTab = DexTab()
        self._wisTab = WisTab()
        self._chaTab = ChaTab()
        
        self._guiObj = guiObj
        
        self._race = Race.createRace("human")
        
        self._class = Class.createClass("fighter")
예제 #3
0
 def cls(self, val):
     self._class = Class.createClass(val)
     self.savedata.charClass = self._class
     self._guiObj.updateCharAbilities()