def doAttack(self): try: res = dnd.resultFormat(self.top.activeCharacter.attacks[ self.attack.get().casefold()].attack( self.top.activeCharacter, self.adv.get(), self.dis.get( ), self.attackBonus.get(), self.damageBonus.get())) self.attackResult["text"] = res[0] self.damageResult["text"] = res[1] self.effects["text"] = res[2] self.top.spell.draw() except (KeyError): self.attackResult["text"] = "Attack with that name not found."