Commits

Anonymous committed 7c30b64

Prepared localization of most internal strings.

Comments (0)

Files changed (4)

ews/amov/Charakter.py

 import Skripte.Kernskripte.Objekt as Objekt
 
 # Und wir brauchen die Basisklasse: Object
-from Object import Object
+from Object import Object, _
 
 # Um immer die neuste Version zu haben brauchen wir die Versionsverwaltung
 from Versionsverwaltung import Versionen
         """Lade den Namen des Charakters. 
         
         Wenn der Charakter keinen Namen hat, dann erzeuge einen zufälligen."""
-        if self.daten[0][u"Name"] == " ": 
-            self.daten[0][u"Name"] = self.objekt.objekt_name()
+        if self.daten[0][_(u"Name")] == " ": 
+            self.daten[0][_(u"Name")] = self.objekt.objekt_name()
             self.objekt.write()
-        return self.daten[0][u"Name"]
+        return self.daten[0][_(u"Name")]
         
     def ladeGrunddaten(self): 
         """Lade die Grundlegenden Daten des Charakters, wie seine Beschreibung oder Herkunft. 
         
         Grunddaten enthalten im allgemeinen keine würfelrelevanten Werte."""
-        return self.daten[1][u"Grunddaten"]
+        return self.daten[1][_(u"Grunddaten")]
     
     # Daten laden
     def ladeKampfwerte(self): 
         """Lade die Kampfrelevanten Werte des Charakters."""
-        return self.daten[4][u"Kampfwerte"]
+        return self.daten[4][_(u"Kampfwerte")]
     def ladeAusruestung(self): 
         """Lade die Ausrüstung des Charakters."""
-        return self.daten[3][u"Ausrüstung"]
+        return self.daten[3][_(u"Ausrüstung")]
     def ladeBeschreibung(self): 
-        return self.ladeGrunddaten()[u"Beschreibung"]
+        return self.ladeGrunddaten()[_(u"Beschreibung")]
     def ladeHerkunft(self): 
-        return self.ladeGrunddaten()[u"Herkunft"]
+        return self.ladeGrunddaten()[_(u"Herkunft")]
     def ladeRegion(self): 
-        return self.herkunft[u"Region"]
+        return self.herkunft[_(u"Region")]
     def ladeSprache(self): 
-        return self.herkunft[u"Sprache"]
+        return self.herkunft[_(u"Sprache")]
     def ladeStimmung(self): 
-        return self.ladeGrunddaten()[u"Stimmung"]
+        return self.ladeGrunddaten()[_(u"Stimmung")]
     def ladeWerte(self): 
-        return self.daten[2][u"Werte"]
+        return self.daten[2][_(u"Werte")]
     def ladeEigenschaften(self): 
-        return self.werte[0][u"Eigenschaften"]
+        return self.werte[0][_(u"Eigenschaften")]
     def ladeFertigkeiten(self): 
-        return self.werte[1][u"Fertigkeiten"]
+        return self.werte[1][_(u"Fertigkeiten")]
     def ladeSchutz(self): 
-        return self.kampfwerte[u"Hauptrüstung"]["Schutz"]
+        return self.kampfwerte[_(u"Hauptrüstung")][_("Schutz")]
     
     # Daten in das dict speichern
     # Das ist nötig, weil sonst beim umschreiben der Attribute des charakter-objekts das strings im dict nicht geändert wird (nur die Attribute werden umgeleitet - Strings sind nicht mutable. 
     def speichereKampfwerte(self, daten): 
         """Speichere die Kampfrelevanten Werte des Charakters."""
-        self.daten[4][u"Kampfwerte"] = daten
+        self.daten[4][_(u"Kampfwerte")] = daten
     def speichereAusruestung(self, daten): 
         """Speichere die Ausrüstung des Charakters."""
-        self.daten[3][u"Ausrüstung"] = daten
+        self.daten[3][_(u"Ausrüstung")] = daten
     def speichereBeschreibung(self, daten): 
-        self.ladeGrunddaten()[u"Beschreibung"] = daten
+        self.ladeGrunddaten()[_(u"Beschreibung")] = daten
     def speichereHerkunft(self, daten): 
-        self.ladeGrunddaten()[u"Herkunft"] = daten
+        self.ladeGrunddaten()[_(u"Herkunft")] = daten
     def speichereRegion(self, daten): 
-        self.herkunft[u"Region"] = daten
+        self.herkunft[_(u"Region")] = daten
     def speichereSprache(self, daten): 
-        self.herkunft[u"Sprache"] = daten
+        self.herkunft[_(u"Sprache")] = daten
     def speichereStimmung(self, daten): 
-        self.ladeGrunddaten()[u"Stimmung"] = daten
+        self.ladeGrunddaten()[_(u"Stimmung")] = daten
     def speichereWerte(self, daten): 
-        self.daten[2][u"Werte"] = daten
+        self.daten[2][_(u"Werte")] = daten
     def speichereEigenschaften(self, daten): 
-        self.werte[0][u"Eigenschaften"] = daten
+        self.werte[0][_(u"Eigenschaften")] = daten
     def speichereFertigkeiten(self, daten): 
-        self.werte[1][u"Fertigkeiten"] = daten
+        self.werte[1][_(u"Fertigkeiten")] = daten
     def speichereSchutz(self, daten): 
-        self.kampfwerte[u"Hauptrüstung"]["Schutz"] = daten
+        self.kampfwerte[_(u"Hauptrüstung")][_("Schutz")] = daten
     def speichereName(self, daten): 
-        self.daten[0]["Name"] = daten
+        self.daten[0][_("Name")] = daten
     
     def basic_data_yaml(self):
         return self.leerer_charakterbogen_yaml()
 - Ausrüstung: 
     Waffen:
       Waffenlos: &id002
-        Name: Waffenlos
+        Name: Iron knuckles
         Schaden: 1
     Rüestung: 
         Stoffkleidung: &hauptruestung
-            Name: Stoffkleidung
+            Name: Simple garb
             Schutz: 1
 - Kampfwerte:  
     Hauptwaffe:
         @type name: String """
         # raise NotImplementedException("Not yet implemented")
         # Get the name of the loaded char or template
-        tagname = self.ID[u"ID"][self.ID[u"ID"].index(":", 4) + 1:]
+        tagname = self.ID[_(u"ID")][self.ID[_(u"ID")].index(":", 4) + 1:]
         
         # If the name changed - self.name is the saved chars name, tagname is the name stored in the tag, name is the parameter passed to this function
         if name is not None and name != tagname or tagname != self.name: 
             # change the tag-line. 
             # if name was given, use it. comparing to None is the fastest, so we do that first. 
             if name is not None: 
-                self.ID[u"ID"] = self.ID[u"ID"][:self.ID[u"ID"].index(":", 4) + 1] + name
+                self.ID[_(u"ID")] = self.ID[_(u"ID")][:self.ID[_(u"ID")].index(":", 4) + 1] + name
             else: # name is None, self.name doesn't equal tagname
-                self.ID[u"ID"] = self.ID[u"ID"][:self.ID[u"ID"].index(":", 4) + 1] + self.name
+                self.ID[_(u"ID")] = self.ID[_(u"ID")][:self.ID[_(u"ID")].index(":", 4) + 1] + self.name
         
         # Now the tagline in the ID changed. 
         
         # First get the new ID
         # self.ID ist die alte ID
         # Use Versionsverwaltung to get a version object
-        versionen = Versionen(tag=self.ID[u"ID"], kategorie=self.ID[u"Kategorie"])
+        versionen = Versionen(tag=self.ID[_(u"ID")], kategorie=self.ID[_(u"Kategorie")])
         # Now call the version object to get the ID with a version chiw is increased by one. 
         self.ID = versionen.version_minor_eins_hoeher()
         
         self.objekt = Objekt.Objekt(ID=self.ID, template=self.daten)
         # TODO: Implement save chars - add name to tag, if it changed (i.e. if the char is called as template)
     
-    
 
 ### Klassen ###
 
+
 ### Self-Test ###
 
 def _test(): 

ews/amov/Object.py

 
 ### Klassen ###
 
+### Functions ###
+
+def _(data): 
+    """Encapsulation for localization."""
+    return data
+
+### Functions ###
+
 ### Self-Test ###
 
 def _test(): 
 
 Characters act on their own now and can be imported and saved via amov module.
 
+Plans: 
+    - Every skill has two assiciated attributes, which increase its value. 
+
 Ideas: 
     - Save everything which happens to each soldier in an attribute of the soldier, so we can track his way through the battle. 
     
 
 # Obtain Charakters from yaml-files
 from amov import Charakter, Versionsverwaltung
+from amov.Object import _
 # replaced the alias with the real directory. 
 
 #### IMPORTS ####
         # and alive
         self.alive = True
         #: The damage a character can take before going down. 
-        self.bTP = self.amov.kampfwerte['Trefferpunkte']
+        self.bTP = self.amov.kampfwerte[_('Trefferpunkte')]
         #: The wound value determines, how much damage suffices to inflict a wound on the character.  It's a List containing the value for deep wounds and for critical wounds. A deep wounds weakens the character (3 points off any skill and attribute), a critical wounds disables (the character has to roll, if he keeps standing). 
-        self.WS = [self.amov.kampfwerte['Wundschwelle'],self.amov.kampfwerte['Wundschwelle'] * 3]
+        self.WS = [self.amov.kampfwerte[_('Wundschwelle')],self.amov.kampfwerte[_('Wundschwelle')] * 3]
         #: The damage which te characters main weapon inflicts. 
-        self.dam = self.amov.kampfwerte['Hauptwaffe']['Waffe']['Schaden']
+        self.dam = self.amov.kampfwerte[_('Hauptwaffe')][_('Waffe')][_('Schaden')]
         #: The attack value of the character. 
-        self.attack = self.amov.kampfwerte['Hauptwaffe']['Kampffertigkeit']['Zahlenwert']
-        #self.skill = self.amov.kampfwerte['Hauptwaffe']['Kampffertigkeit']['Name']
+        self.attack = self.amov.kampfwerte[_('Hauptwaffe')][_('Kampffertigkeit')][_('Zahlenwert')]
+        #self.skill = self.amov.kampfwerte[_('Hauptwaffe')][_('Kampffertigkeit')][_('Name')]
         #: The armor value of the character. 
         self.arm = self.amov.schutz
         
         # Make sure that we have a wounds dict
         self.amov.kampfwerte.setdefault("Wunden", {})
         # Get the physical wounds, if None are set, they are 0 each. 
-        self.wounds = [self.amov.kampfwerte["Wunden"].setdefault(u'körperlich tief', 0), self.amov.kampfwerte["Wunden"].setdefault(u'körperlich kritisch', 0)] #: deep wounds, critical wounds
+        self.wounds = [self.amov.kampfwerte[_("Wunden")].setdefault(u'körperlich tief', 0), self.amov.kampfwerte[_("Wunden")].setdefault(u'körperlich kritisch', 0)] #: deep wounds, critical wounds
         # print self.wounds
         
         # Get the experience, either from the char, if it has it, or calculate it from all other values.
         self.equipment = self.amov.ausruestung
         
         #: The main weapon of the char
-        self.weapon = self.amov.kampfwerte["Hauptwaffe"]["Waffe"]
+        self.weapon = self.amov.kampfwerte[_("Hauptwaffe")][_("Waffe")]
         
         #: The fighting skill of the char
-        self.fight_skill = self.amov.kampfwerte["Hauptwaffe"]["Kampffertigkeit"]
+        self.fight_skill = self.amov.kampfwerte[_("Hauptwaffe")][_("Kampffertigkeit")]
         
         #: The current armor of the char
-        self.armor = self.amov.kampfwerte[u"Hauptrüstung"]
+        self.armor = self.amov.kampfwerte[_(u"Hauptrüstung")]
         
         
         # Get the morale
         
-        if self.amov.eigenschaften == " " or self.amov.eigenschaften.setdefault("Morale", {"Zahlenwert": 12})["Zahlenwert"] == 12: 
+        if self.amov.eigenschaften == " " or self.amov.eigenschaften.setdefault("Morale", {"Zahlenwert": 12})[_("Zahlenwert")] == 12: 
           self.morale = [12]
         else: 
           self.morale_dict = self.amov.eigenschaften.setdefault("Morale", {})
         
         # Now on to the battle values
         # Then its basic TP
-        self.amov.kampfwerte['Trefferpunkte'] = self.bTP
+        self.amov.kampfwerte[_('Trefferpunkte')] = self.bTP
         # And its wound treshold
-        self.amov.kampfwerte['Wundschwelle'] = self.WS[0]
+        self.amov.kampfwerte[_('Wundschwelle')] = self.WS[0]
         # After that the damage of its weapon
-        self.amov.kampfwerte['Hauptwaffe']['Waffe']['Schaden'] = self.dam
+        self.amov.kampfwerte[_('Hauptwaffe')][_('Waffe')][_('Schaden')] = self.dam
         # And the attack skill 
-        self.amov.kampfwerte['Hauptwaffe']['Kampffertigkeit']['Zahlenwert'] = self.attack
+        self.amov.kampfwerte[_('Hauptwaffe')][_('Kampffertigkeit')][_('Zahlenwert')] = self.attack
         # Also the armor
         self.amov.schutz = self.arm
         # And the current TP
-        self.amov.kampfwerte['Aktuelle Trefferpunkte'] = self.TP
+        self.amov.kampfwerte[_('Aktuelle Trefferpunkte')] = self.TP
         # Also the wounds, deep and critical
-        self.amov.kampfwerte['Wunden'][u"körperlich tief"] = int(self.wounds[0])
-        self.amov.kampfwerte['Wunden'][u"körperlich kritisch"] = int(self.wounds[1])
+        self.amov.kampfwerte[_('Wunden')][_(u"körperlich tief")] = int(self.wounds[0])
+        self.amov.kampfwerte[_('Wunden')][_(u"körperlich kritisch")] = int(self.wounds[1])
         # Save experience
-        self.amov.ladeGrunddaten()["Striche"] = self.exp
+        self.amov.ladeGrunddaten()[_("Striche")] = self.exp
         
     
     def save(self): 
         """Do a skill check against a target number."""
         # If the char has skills and the skill exists, do a check on it. 
         if self.amov.fertigkeiten != " " and skill_name in self.amov.fertigkeiten.keys(): 
-            return self.check(self.amov.fertigkeiten[skill_name]["Zahlenwert"], mods=mods, MW=MW)
+            return self.check(self.amov.fertigkeiten[skill_name][_("Zahlenwert")], mods=mods, MW=MW)
         # If the skill doesn't exist in Fertigkeiten, see if we can do the check on some related skill, but with a malus of 3. 
         # TODO: Implement Jobs and background. 
         elif self.amov.fertigkeiten != " ": 
             for i in related_skills: 
                 if i in self.amov.fertigkeiten.keys(): 
-                    return self.check(self.amov.fertigkeiten[i]["Zahlenwert"] - 3, mods=mods, MW=MW)
+                    return self.check(self.amov.fertigkeiten[i][_("Zahlenwert")] - 3, mods=mods, MW=MW)
         # If the char has no skills, see if we can check against a related attribute, but with a malus of 9. 
         if self.amov.eigenschaften != " ": 
             for i in related_attributes: 
-                if i in self.amov.eigenschaften.keys() and self.amov.eigenschaften[i]["Zahlenwert"] >= 12: 
-                    return self.check(self.amov.eigenschaften[i]["Zahlenwert"] - 9, mods=mods, MW=MW)
+                if i in self.amov.eigenschaften.keys() and self.amov.eigenschaften[i][_("Zahlenwert")] >= 12: 
+                    return self.check(self.amov.eigenschaften[i][_("Zahlenwert")] - 9, mods=mods, MW=MW)
             # If none of the related Attributes fits, just use the default of 12. 
             return self.check(12 - 9, mods=mods, MW=MW)
         # If the char has no attributes or skills, just use the default attribute of 12. 
                 obj = choice(listing)
             else: obj = listing[0]
             
-        elif object[0] in ['attribute', 'skill']:
-            if object[0] == 'skill' and self.amov.fertigkeiten != " ":
+        elif object[0] in [_('attribute'), _('skill')]:
+            if object[0] == _('skill') and self.amov.fertigkeiten != " ":
                 listing = self.amov.fertigkeiten
-            elif object[0] == 'attribute' and self.amov.eigenschaften != " ":
+            elif object[0] == _('attribute') and self.amov.eigenschaften != " ":
                 listing = self.amov.eigenschaften
             else: listing = None
             # If the object is part of the Fertigkeiten or Eigenschaften, 
                 # add a new skill or attribute
                 # For this we add a new key to the respective list (eigenschaften or fertigkeiten)
                 # And map that key an an empty dictionary. The base values will be added later on. 
-                if object[0] == "skill": 
+                if object[0] == _("skill"): 
                     # First make sure that the skills are a dict. 
                     if self.amov.fertigkeiten == " ": 
                         self.amov.fertigkeiten = {}
                     # Then add object 1. 
                     self.amov.fertigkeiten.setdefault(object[1], {})
                     obj = {object: self.amov.fertigkeiten[object[1]] }
-                elif object[0] == "attribute": 
+                elif object[0] == _("attribute"): 
                     # First make sure attributes are a dict. 
                     if self.amov.eigenschaften == " ": 
                         self.amov.eigenschaften = {}
             # Add all avaible Eigenschaften and Fertigkeiten as sub-dictionaries to the valuelist. 
             if self.amov.eigenschaften != " " and self.amov.fertigkeiten != " ": 
                 for i in self.amov.fertigkeiten.keys(): 
-                    valuelist.append({("skill", i ): self.amov.fertigkeiten[i]})
+                    valuelist.append({(_("skill"), i ): self.amov.fertigkeiten[i]})
                 for i in self.amov.eigenschaften.keys(): 
-                    valuelist.append({("attribute", i ): self.amov.eigenschaften[i]})
+                    valuelist.append({(_("attribute"), i ): self.amov.eigenschaften[i]})
             elif self.amov.fertigkeiten != " ": # Just use the existing Fertigkeiten. 
                 for i in self.amov.fertigkeiten.keys(): 
-                    valuelist.append({("skill", i ): self.amov.fertigkeiten[i]})
+                    valuelist.append({(_("skill"), i ): self.amov.fertigkeiten[i]})
             elif self.amov.eigenschaften != " ": # Just use the existing Eigenschaften. 
                 for i in self.amov.eigenschaften.keys(): 
-                    valuelist.append({("skill", i): self.amov.eigenschaften[i]})
+                    valuelist.append({(_("skill"), i): self.amov.eigenschaften[i]})
             else: 
                 raise ValueError("Char has no Eigenschaften and no Fertigkeiten!")
             # Get the biasing for each value by determining how many striche have already been spent without increasing it (+1). 
                     #: The lowest number of Strichen needed to reach this value. 
                     necessary_striche = self.get_necessary_striche_for_obj(i)
                     #: Biasing determines, how much weight this value gets. 
-                    biasing = 1 + i[j].get('Striche',  necessary_striche) - necessary_striche
+                    biasing = 1 + i[j].get(_('Striche'),  necessary_striche) - necessary_striche
                     if biasing < 1: 
                         print "Biasing < 1 ! ",  i,  "necessary_striche:",  necessary_striche
                         raise ValueError("Biasing < 1 ! " + str(i) + " necessary_striche: " + str(necessary_striche))
             except: 
                     # Selected value is not in  the valuelist, so it's a skill or attribute the char doesn't yet have. 
                     # If it's a skill, add it to the skills
-                    if selected[0] == "skill": 
+                    if selected[0] == _("skill"): 
                         # If we don't yet have skills, make skills a dict. 
                         if self.amov.fertigkeiten == " ": 
                             self.amov.fertigkeiten = {}
                         # And set it as the object to raise
                         obj = {selected: self.amov.fertigkeiten[selected[1]]}
                     # If it's an attribute, add it. 
-                    if selected[0] == "attribute": 
+                    if selected[0] == _("attribute"): 
                         # If we don't yet have attributes, make attributes a dict. 
                         if self.amov.eigenschaften == " ": 
                             self.amov.eigenschaften = {}
         if self.amov.fertigkeiten != " ": 
             for i in self.amov.fertigkeiten.keys(): 
                 # Check if it has a skill key i
-                if obj.has_key(("skill", i)): 
-                    sub_obj = obj[("skill", i)]
-                    val = sub_obj.setdefault("Grundwert",  sub_obj.setdefault("Zahlenwert",  3))
+                if obj.has_key((_("skill"), i)): 
+                    sub_obj = obj[(_("skill"), i)]
+                    val = sub_obj.setdefault(_("Grundwert"),  sub_obj.setdefault(_("Zahlenwert"),  3))
                     # all skills / attributes should have a 'Striche' item
-                    striche_old = sub_obj.setdefault("Striche",  self.value_and_striche_fertigkeiten(val=sub_obj.setdefault("Grundwert",  3))[1])
-                    sub_obj.setdefault("Striche",  striche_old)
+                    striche_old = sub_obj.setdefault(_("Striche"),  self.value_and_striche_fertigkeiten(val=sub_obj.setdefault(_("Grundwert"),  3))[1])
+                    sub_obj.setdefault(_("Striche"),  striche_old)
                     # add xp, if applicable raise skill / attribute
-                    sub_obj['Striche'] += expadd
-                    sub_obj["Grundwert"] = self.value_and_striche_fertigkeiten(striche=sub_obj['Striche'] )[0]
-                    if sub_obj["Zahlenwert"] < sub_obj["Grundwert"] : 
-                        sub_obj["Zahlenwert"] = sub_obj["Grundwert"] #TODO: We need a character method, which gets the Zahlenwert from the Grundwert. 
+                    sub_obj[_('Striche')] += expadd
+                    sub_obj[_("Grundwert")] = self.value_and_striche_fertigkeiten(striche=sub_obj[_('Striche')] )[0]
+                    if sub_obj[_("Zahlenwert")] < sub_obj[_("Grundwert")] : 
+                        sub_obj[_("Zahlenwert")] = sub_obj[_("Grundwert")] #TODO: We need a character method, which gets the Zahlenwert from the Grundwert. 
     
         # If it's an attribute, get the Zahlenwert. 
         if self.amov.eigenschaften != " ": 
             for i in self.amov.eigenschaften.keys(): 
-                if obj.has_key(("attribute", i)): 
-                    sub_obj = obj[("attribute", i)]
-                    striche_old = sub_obj.setdefault("Striche",  self.value_and_striche_eigenschaften(val=sub_obj.setdefault("Zahlenwert",  12))[1])
-                    sub_obj["Striche"] = striche_old + expadd
-                    sub_obj["Zahlenwert"] = self.value_and_striche_eigenschaften(striche=sub_obj["Striche"])[0]
+                if obj.has_key((_("attribute"), i)): 
+                    sub_obj = obj[(_("attribute"), i)]
+                    striche_old = sub_obj.setdefault(_("Striche"),  self.value_and_striche_eigenschaften(val=sub_obj.setdefault(_("Zahlenwert"),  12))[1])
+                    sub_obj[_("Striche")] = striche_old + expadd
+                    sub_obj[_("Zahlenwert")] = self.value_and_striche_eigenschaften(striche=sub_obj[_("Striche")])[0]
         
         if verbose: 
             print "to",  obj # finishing upgrade line of output
-        self.attack = self.amov.kampfwerte['Hauptwaffe']['Kampffertigkeit']['Zahlenwert']
+        self.attack = self.amov.kampfwerte[_('Hauptwaffe')][_('Kampffertigkeit')][_('Zahlenwert')]
         return obj_before, obj
     
     
                 if obj.has_key(i): 
                     # Every Fertigkeit needs a Grundwert
                     obj = obj[i]
-                    val = obj.setdefault("Grundwert",  obj.setdefault("Zahlenwert",  3))
+                    val = obj.setdefault(_("Grundwert"),  obj.setdefault(_("Zahlenwert"),  3))
                     # all skills / attributes should have a 'Striche' item
-                    striche = obj.setdefault("Striche",  self.value_and_striche_fertigkeiten(val=obj.setdefault("Grundwert",  3))[1])
-                    necessary_striche = self.value_and_striche_fertigkeiten(val=obj.setdefault("Grundwert",  3))[1]
+                    striche = obj.setdefault(_("Striche"),  self.value_and_striche_fertigkeiten(val=obj.setdefault(_("Grundwert"),  3))[1])
+                    necessary_striche = self.value_and_striche_fertigkeiten(val=obj.setdefault(_("Grundwert"),  3))[1]
         if self.amov.eigenschaften != " ": 
             for i in self.amov.eigenschaften.keys(): 
                 if obj.has_key(i): 
                     obj = obj[i]
-                    striche = obj.setdefault("Striche",  self.value_and_striche_eigenschaften(val=obj.setdefault("Zahlenwert",  12))[1])
-                    necessary_striche = self.value_and_striche_eigenschaften(val=obj.setdefault("Zahlenwert",  12))[1]
+                    striche = obj.setdefault(_("Striche"),  self.value_and_striche_eigenschaften(val=obj.setdefault(_("Zahlenwert"),  12))[1])
+                    necessary_striche = self.value_and_striche_eigenschaften(val=obj.setdefault(_("Zahlenwert"),  12))[1]
         return necessary_striche
     
     
                 return 24 - effective_value,  -necessary_striche
         
         
-    def fight_round(self,  other, styles_self=[], styles_other=[], treshold_self=0, treshold_other=0, damage_multiplier_self=1.0, damage_multiplier_other=1.0):
+    def fight_round(self,  other, styles_self=[], styles_other=[]):
         """One battle action against another char.
         
     @param styles_self: The different styles the char should use (defense, pull back, escape, target: area). 
     @param styles_other: The different styles the enemy uses. 
     @type styles_other: A list of Strings. 
     
-    @param treshold_self: The treshold of the char below which no hit is scored. 
-    @type treshold_self: Int
-    
-    @param treshold_self: The treshold of the enemy below which no hit is scored. 
-    @type treshold_other: Int
-    
-    @param damage_multiplier_self: A value with which the taken damage gets multiplied after armor and similar are taken into account.
-    @type damage_multiplier_self: Float
-    
-    @param damage_multiplier_other: A value with which the taken damage gets multiplied after armor and similar are taken into account.
-    @type damage_multiplier_other: Float
-    
-	@return: [ If the char won (bool), [your new wounds, critical, taken tp damage], [the 
+    @return: [ If the char won (bool), [your new wounds, critical, taken tp damage], [the 
 enemies new wounds, critical, taken tp damage] ]
 
     Plans: 
         - pull back (+9, no damage enemy)
         - try to escape. 
         - target specific body area for additional damage. 
-        - Shield/evasion (treshold for the enemies diff, below which no hit was archieved). 
+        - Shield/evasion (treshold for the enemies diff, below which no hit was archieved).
+    
+    Ideas: 
+        - Define a damage multiplier, which shows how effective the damage type is against the specific enemy -> do that in the char itself. 
+        - Define the effectivity of the armor against the weapon. 
+        - Get the treshold directly from the char. 
 ."""
 	# Initialize all variables empty
         won = None #: Did we win this round?
 class Char(ews_char):
     def __init__(self, *args, **kwds): 
         super(Char, self).__init__(*args, **kwds)
+        self.battle_diff_treshold = 4 #: The treshold of the char below which no hit is scored. 
     
     def battle_stats(self):
         """@return: A string with battle status information, formatted as battle stats"""
         scrib += _("\n---/battle-stats---")
         return scrib
     
+    def fight_round(self, other, *args, **kwds): 
+        """Fight for one round."""
+        return super(Char, self).fight_round(other, *args, **kwds)
+