def PLAYER_SWAP(self, line): """ PLAYER_SWAP player:6 oldhero:"Hero_FlintBeastwood" newhero:"Hero_WitchSlayer" PLAYER_SWAP player:1 oldhero:"Hero_WitchSlayer" newhero:"Hero_FlintBeastwood" """ l = line.split() self.hero[int(l[1].split(':')[1])] = hero(l[3].split('"')[1])
def PLAYER_RANDOM(self, line): """ PLAYER_RANDOM player:5 hero:"Hero_Engineer" """ l = line.split() self.hero[int(l[1].split(':')[1])] = hero(l[2].split('"')[1])
def PLAYER_SELECT(self, line): """ PLAYER_SELECT player:6 hero:"Hero_Krixi" """ l = line.split() self.hero[int(l[1].split(':')[1])] = hero(l[2].split('"')[1])