Commits

Anonymous committed d965cc7

renamed docs to textrpg_docs

  • Participants
  • Parent commits 2ec3e82

Comments (0)

Files changed (90)

File Changelog.txt

+textrpg 0.1: 
+
+- Added give_exp() function for scripts which calls the experience "screen". 
+- Renamed ews package to textrpg_1d6 to avoid clashes with possibly installed ews module -> useful while also working on the backend. 
+- Fertigkeiten now get increased by related attributes. Which attribute is related must be declared explicitely.
+- Added fighting styles: defensive and attack head.
+- Show base TP in battle stats.
+- A bit more 'you did great' output if at least 9 battles were won and the character lost afterwards.
+- The player is prompted to decide on a battle strategy/style each round. 
+- The experience can also be increased by simply saying char.exp = new_value. If the new value is lower than the current value, nothing happens, but it gives the return value False.
+- exp is now a property, and so it wil always be up to date.
+- added ministory scripting example.
+- simpler scripting added.
+- Prepared localization of most internal strings.
+- Text output and documentation update.
+- Ask whenever the round is for the player which action to take and many smaller changes (i.e.: tabs to spaces).
+- Added interface for different fighting styles and a hit treshold (below which the character evades the attack or the attack hits the shield).
+- Nicer Experience 'screen'.
+- Nicer battle output and output, when a skill got raised.
+- upgrade now returns what it did: (obj before, obj after).
+- Begun writing the TextRPG. 
+
+- FIX: Damage for own attacks except the first wasn't printed.
+- FIX: empty attributes to attribute dict problems -> turned attributes into a property.
+- FIX: persistent game states didn't work due to a version management bug (workdir had not been changed everywhere).
+- FIX: corrected dieing.
+
 ews 0.1
 
 - created ews as rpg backend package.

File ews/__init__.py

-#!/usr/bin/env python
-# encoding: utf-8
-
-# EWS - An RPG backend module providing character management and interaction. 
-# 
-# Copyright © 2008 Arne Babenhauserheide
-# 
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>
-
-"""The ews ("Ein Wuerfel Sytem" is german for "One Die System") is a free rpg backend which covers char interaction and char management -> http://1w6.org. 
-
-Chars have attributes, abilities, edges/flaws, equipment and battle values (directly derived from the attributes and abilities). 
-
-
-Usage from command line: 
-
-    - None yet. 
-
-
-Examples: 
-
-    - None yet. 
-
-
-Use-Cases: 
-
- - Creating Chars
-    
-    Create and print a char from a tag-string
-        >>> from char import Char
-        >>> tag_string = "tag:1w6.org,2008:Human"
-        >>> char_from_tag = Char(source=tag_string, template=False) 
-    
-    template=False says: Go with the name inside the stored file or (if None is avaible) in the tagstring. 
-    
-    Else it would create a new name for it. 
-    
-    TODO: Change the default to template=False (some checking of other libs necessary for that)
-        >>> print char_from_tag
-        Name: Human
-        Sprache: Esperanto
-    
-    TODO: Create a char from a char dict. 
-    
-    TODO: Print location of character file. 
-    
-    
- - Combat
-    
-    Create two chars and let them fight one round. 
-        >>> char1 = Char()
-        >>> char2 = Char()
-        >>> print char1.wounds, char2.wounds
-        [0, 0] [0, 0]
-        >>> char1.fight_round(char2)
-        >>> result = (char1.get_battle_result_values(), char2.get_battle_result_values())  
-        >>> # Gives TP and wounds for Char 1 and 2
-    
-    Let the two chars fight a battle with the one roll battle system. 
-        >>> char1.fight_one_roll_battle(char2)
-        >>> result = (char1.get_battle_result_values(), char2.get_battle_result_values()) 
-        >>> # Dict for char1 and for char 2
-    
-    TODO: Fight a whole battle with the complex battle system. 
-    
-    
- - Attributes
-    
-    List all attributes. If the char has None, print a single space. 
-        >>> char1.attributes
-        ' '
-    
-    
- - Skills and checks
-    
-    List all skills. If the char has None, print a single space. 
-        >>> char1.skills
-        {'Nahkampf': {'Grundwert': 12, 'Striche': 3, 'Zahlenwert': 12}}
-    
-    Do a skill test (default target number is 9)
-        >>> print "Do we manage to cook a nice meal?"
-        Do we manage to cook a nice meal?
-        >>> result = char1.check_skill("cook")
-    
-    Do a skill test against another target number. 
-        >>> print "Do we manage to cook an exceptional meal?"
-        Do we manage to cook an exceptional meal?
-        >>> result = char1.check_skill("cook", MW=18)
-    
-    TODO: Check how good we manage something. 
-    
-    TODO: Check if we manage to make a roll and how good we manage it. 
-    
-    
- - Competition (skill vs. skill and similar)
-    
-    TODO: Let two chars compete for one round. 
-    
-    TODO: Let two chars do a full competition. 
-    
-    
- - Equipment
-    
-    Get the current equipment of the char. 
-        >>> for i in char1.equipment: print char1.equipment[i] 
-        {'Stoffkleidung': {'Name': 'Stoffkleidung', 'Schutz': 1}}
-        {'Waffenlos': {'Name': 'Waffenlos', 'Schaden': 1}}
-        >>> # TODO: Fix to make it nicer to use. 
-    
-    
-    Get the current combat equipment of the char (armor and weapon). 
-        >>> char1.weapon
-        {'Name': 'Waffenlos', 'Schaden': 1}
-        >>> char1.armor
-        {'Name': 'Stoffkleidung', 'Schutz': 1}
-    
-    TODO: Change armor and weapon (and weapon skill). 
-    
-    TODO: Get the current clothes of the char. 
-    
-    TODO: Change the current clothes of the char. 
-    
-    
- - Improving Chars
-    
-    Improve a char by a 3 points at random (about the value to get for one gaming session in a hreo setting). 
-        >>> char1.upgrade(3)
-    
-    Upgrade with a weighted list of attributes and skills which could be improved additionally to known skills and attributes. 
-        >>> char1.upgrade(3, object=("weighted", [("attribute",  "sensitivity", 1), ("skill", "cooking", 2)]))
-    
-    Upgrade a specific skill or attribute. 
-        >>> char1.upgrade(3, object=("skill", "talking senslessly"))
-        
-    # TODO: Add attibute explicitely. 
-    
-    
- - Saving Chars
-    
-    Save the changed (wounded but improved) Char as new template. 
-    
-    Commented out, because this creates new files. 
-        >>> # char1.name = char1.amov.tagname
-        >>> # char1.save()
-    
-    Save the changed Char as a new char and get the new tag to call it again. 
-    
-    Commented out, because this creates new files. 
-        >>> # tagstring = char1.amov.tagstring_without_name + char1.name # The tag to call the char
-        >>> # char1.save()
-        >>> # char1_again = Char(source=tagstring, template=False)
-    
-    
- - Finishing Chars off :) 
-    
-    And in the end: Die 
-        >>> char1.die()
-
-
-Plans: 
-    - Change char file format: an empty dict shoulnd't be represented by " " anymore, but by {} (the real yaml represenation of an empty dictionary). 
-
-
-Source URL (Mercurial): U{http://rpg-1d6.sf.net/hg/1d6}
-
-PyPI URL: U{http://pypi.python.org/pypi/ews}
-"""
-
-#### Package information ###
-
-__version__ = "0.1"
-
-#### Package information ###
-
-#### Imports ####
-
-from char import Char
-
-#### Imports ####
-
-#### Self-Test ####
-
-def _test():
-    """Launch the doctests."""
-    from doctest import testmod
-    testmod()
-
-if __name__ == "__main__": 
-    _test()

File ews/amov/Armee.py

-#!/usr/bin/env python
-# encoding: utf-8
-
-# Armeenverwaltung - Verwalte Armeen im lesbaren YAML Format
-# Copyright © 2007 - 2007 Arne Babenhauserheide
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
-# MA 02110-1301 USA
-
-"""Verwalte Dateien von Armeen
-
-Beispiel: 
->>> Schlacht = Schlacht()
->>> Schlacht.schlacht
-[(('Menschen Armee', 0.5, 0.40000000000000002), [], [('tag:1w6.org,2007:Mensch', 10, -1, 'Soldat', True), ('tag:draketo.de,2007:Sskreszta', 1, -1, 'Held', False)]), (('Goblin Armee', 0.40000000000000002, 0.40000000000000002), [], [('tag:1w6.org,2007:Goblin', 15, -1, 'Soldat', True)])]
-
- """
-
-
-### Imports ###
-
-# Für das Dateiformat brauchen wir yaml
-from yaml import load as yaml_load
-
-# Um die Dateien zu laden, nutzen wir die Objekt-Klasse. 
-import Skripte.Kernskripte.Objekt as Objekt
-
-# Um immer die neuste Version zu haben brauchen wir die Versionsverwaltung
-from Versionsverwaltung import Versionen
-
-### Imports ###
-
-### Klassen ###
-
-class Armee: 
-    def __init__(self, ID=None, art=None,  tag=u"tag:1w6.org,2008:Menschen",  data=None): 
-        #: Der Identifikator der Armee-Datei
-        if ID is not None: 
-            self.ID = ID
-        elif tag is not None: 
-            # Wenn keine ID bekannt ist, lade die neuste Datei
-            versionen = Versionen(tag=tag,  kategorie=u"Armeen")
-            self.ID = versionen.neuste
-        # Wenn daten angegeben werden, sollen sie in einer neuen Version gespeichert werden. 
-        if data is not None: 
-            self.data = data #: Neue Daten, die gespeichert werden sollen. 
-            # TODO: If data is given, create a new minor version of the file. 
-        
-        #: Die Art des Charakters. Wird noch nicht verwendet. 
-        self.art = art
-        #: Das Charakterobjekt. Es bietet das dict und ein paar Methoden. 
-        self.objekt = Objekt.Objekt(ID=self.ID, template=yaml_load(self.standard_schlacht_yaml()))
-        #: Das Charakterwörterbuch mit allen Charakterdaten aus der Datei. 
-        self.armee = self.objekt.objekt
-    
-    def standard_schlacht_yaml(self): 
-    	return """# Battlefield definition: (armies)
-    # Army definition: (army_data, [groups], [chartypes])
-    # army_data definition: ('name', resignratio, fleeratio)
-    # Chartype definition: ("tag", number_of_soldiers, 'group' (-1=army), 'Type_of_chars', from_template?)
-!!python/tuple
-  - !!python/tuple
-    - Menschen Armee
-    - 0.5
-    - 0.40000000000000002
-  - []
-  - - !!python/tuple
-      - tag:1w6.org,2007:Mensch
-      - 10
-      - -1
-      - Soldat
-      - true
-
-"""
-    
-    
-
-### Klassen ###
-
-### Self-Test ###
-
-def _test(): 
-	import doctest
-	doctest.testmod()
-
-if __name__ == "__main__": 
-   _test() 
-
-if __name__ == '__main__': 
-        pass
-
-### Self-Test ###
-        

File ews/amov/Charakter.py

-#!/bin/env python
-# encoding: utf-8
-
-# Charakterverwaltung - Verwalte Charaktere im lesbaren YAML Format
-# Copyright © 2007 - 2007 Arne Babenhauserheide
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
-# MA 02110-1301 USA
-
-"""Manage Charakter-Objects. 
-
-Diese Datei ist ein Container für die klasse Charaktere. 
-
-Aufrufen mit ID-Objekt oder tag-string. 
-
-Beispiel: 
->>> Sskreszta = Charakter(tag=u"tag:draketo.de,2007:Sskreszta")
->>> Sskreszta.name
-'Sskreszta'
-
-ToDo: Größere Teile des Charaktersnicht mehr als attribut des OBjekts doppelspeichern, sondern nur durch Funktionen aufrufen. Das dict sollte nur einmal echt geladen werden. Die Eigenschaften des Charakters sollten mit Funktionen aus diesem Hauptdict herausgezogen werden. 
-Ausgenommen davon sind Werrte, sie sehr oft gebraucht und geänbdert werden (Geschwindkeit statt Ram-Verbrauch). 
-Aktuell wird er Charakter in etwa doppelt geladen.
- 
- #TODO: Sourcefile dir hinzufügen. """
-
-### Imports ###
-
-# Um die Dateien zu laden, nutzen wir die Objekt-Klasse. 
-import Skripte.Kernskripte.Objekt as Objekt
-
-# Und wir brauchen die Basisklasse: Object
-from Object import Object, _
-
-# Um immer die neuste Version zu haben brauchen wir die Versionsverwaltung
-from Versionsverwaltung import Versionen
-
-### Imports ###
-
-### Klassen ###
-
-class Charakter(Object): 
-    def __init__(self, ID=None, art=None,  tag=u"tag:draketo.de,2007:Sskreszta", kategorie="Charaktere", *args, **kwds): 
-        super(Charakter, self).__init__(ID=ID, art=art,  tag=tag, kategorie=kategorie, *args, **kwds)
-        self.beschreibung = self.ladeBeschreibung()
-        self.werte = self.ladeWerte()
-        self.eigenschaften = self.ladeEigenschaften()
-        self.fertigkeiten = self.ladeFertigkeiten()
-        self.kampfwerte = self.ladeKampfwerte()
-        self.ausruestung = self.ladeAusruestung()
-        self.schutz = self.ladeSchutz()
-        self.herkunft = self.ladeHerkunft()
-        self.sprache = self.ladeSprache()
-        self.region = self.ladeRegion()
-        self.stimmung = self.ladeStimmung()
-        self.kategorie = self.objekt.kategorie
-        # del self.daten # Wir müssen dieses Wörterbuch nicht löschen, 
-        # da Python es zu cachen scheint, so dass wir dadurch kein Ram sparen. 
-        # Vielleicht existiert es auch nur als symbolischer Link. 
-            
-    def ladeName(self): 
-        """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()
-            self.objekt.write()
-        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")]
-    
-    # Daten laden
-    def ladeKampfwerte(self): 
-        """Lade die Kampfrelevanten Werte des Charakters."""
-        return self.daten[4][_(u"Kampfwerte")]
-    def ladeAusruestung(self): 
-        """Lade die Ausrüstung des Charakters."""
-        return self.daten[3][_(u"Ausrüstung")]
-    def ladeBeschreibung(self): 
-        return self.ladeGrunddaten()[_(u"Beschreibung")]
-    def ladeHerkunft(self): 
-        return self.ladeGrunddaten()[_(u"Herkunft")]
-    def ladeRegion(self): 
-        return self.herkunft[_(u"Region")]
-    def ladeSprache(self): 
-        return self.herkunft[_(u"Sprache")]
-    def ladeStimmung(self): 
-        return self.ladeGrunddaten()[_(u"Stimmung")]
-    def ladeWerte(self): 
-        return self.daten[2][_(u"Werte")]
-    def ladeEigenschaften(self): 
-        return self.werte[0][_(u"Eigenschaften")]
-    def ladeFertigkeiten(self): 
-        return self.werte[1][_(u"Fertigkeiten")]
-    def ladeSchutz(self): 
-        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
-    def speichereAusruestung(self, daten): 
-        """Speichere die Ausrüstung des Charakters."""
-        self.daten[3][_(u"Ausrüstung")] = daten
-    def speichereBeschreibung(self, daten): 
-        self.ladeGrunddaten()[_(u"Beschreibung")] = daten
-    def speichereHerkunft(self, daten): 
-        self.ladeGrunddaten()[_(u"Herkunft")] = daten
-    def speichereRegion(self, daten): 
-        self.herkunft[_(u"Region")] = daten
-    def speichereSprache(self, daten): 
-        self.herkunft[_(u"Sprache")] = daten
-    def speichereStimmung(self, daten): 
-        self.ladeGrunddaten()[_(u"Stimmung")] = daten
-    def speichereWerte(self, daten): 
-        self.daten[2][_(u"Werte")] = daten
-    def speichereEigenschaften(self, daten): 
-        self.werte[0][_(u"Eigenschaften")] = daten
-    def speichereFertigkeiten(self, daten): 
-        self.werte[1][_(u"Fertigkeiten")] = daten
-    def speichereSchutz(self, daten): 
-        self.kampfwerte[_(u"Hauptrüstung")][_("Schutz")] = daten
-    def speichereName(self, daten): 
-        self.daten[0][_("Name")] = daten
-    
-    def basic_data_yaml(self):
-        return self.leerer_charakterbogen_yaml()
-    
-    def leerer_charakterbogen_yaml(self): 
-    	return """- Name: " "
-- Grunddaten: 
-    Beschreibung: " "
-    Herkunft: 
-        Sprache: Esperanto
-        Region: " "
-    Stimmung: ' '
-- Werte:
-    - Eigenschaften: 
-        Geschicklichkeit: &id003
-          Zahlenwert: 13
-    - Fertigkeiten: 
-        Nahkampf: &id001
-          Zahlenwert: 12
-          Grundwert: 12
-          Passende Eigenschaften: 
-          - *id003
-    - Berufe: 
-        Mensch: 
-            Zahlenwert: 9
-            Grundwert: 9
-    - Merkmale: {}
-- Ausrüstung: 
-    Waffen:
-      Waffenlos: &id002
-        Name: Iron knuckles
-        Schaden: 1
-    Rüestung: 
-        Stoffkleidung: &hauptruestung
-            Name: Simple garb
-            Schutz: 1
-- Kampfwerte:  
-    Hauptwaffe:
-      Kampffertigkeit: *id001
-      Waffe: *id002
-    Trefferpunkte: 24
-    Wundschwelle: 4
-    Wunden: 
-        körperlich tief: 0
-        körperlich kritisch: 0
-    Hauptrüstung: *hauptruestung
-"""
-    
-    def save(self, name=None): 
-        """Save the character into a file with its name. If the file already exists, increment the minor version number. 
-        
-        @param name: The name of the char (to call this function from outside - from ews).
-        @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:]
-        
-        # 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
-            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
-        
-        # 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")])
-        # Now call the version object to get the ID with a version chiw is increased by one. 
-        self.ID = versionen.version_minor_eins_hoeher()
-        
-        # Now change the basic dict below the attributes. 
-        
-        self.speichereKampfwerte(self.kampfwerte)
-        self.speichereAusruestung(self.ausruestung)
-        self.speichereBeschreibung(self.beschreibung)
-        self.speichereHerkunft(self.herkunft)
-        self.speichereRegion(self.region)
-        self.speichereSprache(self.sprache)
-        self.speichereStimmung(self.stimmung)
-        self.speichereWerte(self.werte)
-        self.speichereEigenschaften(self.eigenschaften)
-        self.speichereFertigkeiten(self.fertigkeiten)
-        self.speichereSchutz(self.schutz)
-        self.speichereName(self.name)
-        
-        # Now load and save the object at the same time. 
-        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(): 
-	import doctest
-	doctest.testmod()
-
-if __name__ == "__main__": 
-   _test() 
-
-if __name__ == '__main__': 
-        charakter = Charakter()
-        print 'Name:', charakter.name
-        print 'Art:', charakter.art
-        print '\nID:'
-        for i in charakter.ID: 
-            print '-', i + ':', charakter.ID[i]
-        #print 'Objekt:', charakter.objekt
-        #print 'Charakter:', charakter.charakter
-        #print 'Grunddaten:', charakter.grunddaten
-        #print 'Werte:', charakter.werte
-        print '\nEigenschaften:'
-        for i in charakter.eigenschaften: 
-            print '-', i + ':', charakter.eigenschaften[i]
-        print '\nFertigkeiten:'
-        for i in charakter.fertigkeiten: 
-            print '-', i + ':', charakter.fertigkeiten[i]
-        print '\nKampfwerte:'
-        for i in charakter.kampfwerte: 
-            print '-', i + ':', charakter.kampfwerte[i]
-        print '- Schutz:', charakter.schutz
-        print '\nBeschreibung:', charakter.beschreibung
-        print 'Herkunft:', charakter.herkunft
-        print 'Sprache:', charakter.sprache
-        print 'Region:', charakter.region
-        print 'Stimmung:', charakter.stimmung
-        print 'Kategorie:', charakter.kategorie
-        
-        # Test saving
-        # First change the Beschreibung
-        charakter.beschreibung += ". Zusatz 1."
-        print charakter.charakter
-        # Save the character with an incremented minor version
-        charakter.save()
-
-### Self-Test ###

File ews/amov/Lokalisierung.py

-#!/bin/env python
-# encoding: utf-8
-
-# Charakterverwaltung - Verwalte Charaktere im lesbaren YAML Format
-# Copyright © 2007 - 2007 Arne Babenhauserheide
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
-# MA 02110-1301 USA
-
-"""Manage localized strings
-
-Hier werden lokalisierte Ausgaben geladen. 
-
-"""
-
-### Imports ###
-
-# Und um Grundfunktionen zu bieten, nutzen wir Object
-import Object
-
-### Imports ###
-
-### Klassen ###
-
-class Lokalisierung(Object.Object): 
-    def __init__(self, ID=None, art=None,  tag=u"tag:1w6.org,2008:de_DE", kategorie="Text", *args, **kwds): 
-        """Lokalisierung des Skriptes"""
-        super(Lokalisierung, self).__init__(ID=ID, art=art, tag=tag, kategorie=kategorie, *args, **kwds)
-        #: Das Charakterwörterbuch mit allen Charakterdaten aus der Datei. 
-        self.locale = self.daten
-    
-    def basic_data_yaml(self): 
-    	return """Name: de_DE
-"""
-            
-
-### Self-Test ###
-
-def _test(): 
-	import doctest
-	doctest.testmod()
-
-if __name__ == "__main__": 
-   _test() 
-
-if __name__ == '__main__': 
-        
-        locale = Lokalisierung()
-        print locale.locale
-        locale.save()
-
-### Self-Test ###

File ews/amov/Namensgrammatik.py

-#!/bin/env python
-# encoding: utf-8
-
-# Charakterverwaltung - Verwalte Charaktere im lesbaren YAML Format
-# Copyright © 2007 - 2007 Arne Babenhauserheide
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
-# MA 02110-1301 USA
-
-"""Manage Grammars for Name-Generation. 
-
-This file returns a grammar-object if it is given an ID or tag. 
-Useage: 
-
->>> grammar = Grammar(ID=None, art=type, tag="tag:1w6.org,2007:Foo")
->>> print "The Grammar is:", grammar.grammar
-The Grammar is: {'nameMiddle': ['<nmCons><nmVowel>'], 'nameStart': ['<nsCons><nmVowel>', '<nsCons><nmVowel>', '<nsCons><nmVowel>', '<nsVowel>'], 'nameMiddle0to2': ['', '<nameMiddle>', '<nameMiddle><nameMiddle>'], 'name': ['<nameStart><nameMiddle0to2><nameEnd>'], 'neVowel': ['e', 'i', 'a', 'au'], 'nmCons': ['l', 'm', 'lm', 'th', 'r', 's', 'ss', 'p', 'f', 'mb', 'b', 'lb', 'd', 'lf'], 'nsVowel': ['A', 'Au', 'Ei'], 'nsCons': ['J', 'M', 'P', 'N', 'Y', 'D', 'F'], 'nmVowel': ['a', 'e', 'i', 'o', 'u', 'au', 'oa', 'ei'], 'neCons': ['r', 'n', 'm', 's', 'y', 'l', 'th', 'b', 'lb', 'f', 'lf'], 'nameEnd': ['<neCons><neVowel>', '<neCons>', '<neCons>']}
-
-
-
-You need either an ID or a tag. If you use a tag, you must set the ID to None, else teh default ID will be used: 
-
-grammar = Grammar(ID=None, art=type, tag=tag)"""
-
-### Imports ###
-
-# Für das Dateiformat brauchen wir yaml, hier müssen wir yaml nur laden können. 
-from yaml import load as yaml_load
-
-# Um die Dateien zu laden, nutzen wir die Objekt-Klasse. 
-import Skripte.Kernskripte.Objekt as Objekt
-
-# Außerdem brauchen wir die Versionsverwaltung.
-import Versionsverwaltung
-
-### Imports ###
-
-### Klassen ###
-
-class Grammar: 
-    def __init__(self, ID=None, art=None, tag="tag:1w6.org,2007:Foo"): 
-        # If we only get a tag and no ID, use Versionsverwaltung, to create an ID from the tag.
-        if ID != None: 
-            self.ID = ID
-        else: 
-            versionen = Versionsverwaltung.Versionen(tag=tag,kategorie=u"Namensgrammatiken")
-            self.ID = versionen.neuste
-        #: The kind of name we want to generate. This isn't used yet.
-        self.art = art
-        # Utilize the Objekt coremodule to load the Grammar Object from a file via the ID. Also supply a template for the case that the file doesn't exist. 
-        self.objekt = Objekt.Objekt(ID=self.ID, template=yaml_load(self.grammar_template_yaml()))
-        # Get self.grammer, the content of the object which is the attribute we use for name-generation.
-        self.grammar = self.objekt.objekt
-    
-    def grammar_template_yaml(self): 
-        """Return a grammar template."""
-        return """name: [<nameStart><nameMiddle0to2><nameEnd>]
-nameEnd: [<neCons><neVowel>, <neCons>, <neCons>]
-nameMiddle: [<nmCons><nmVowel>]
-nameMiddle0to2: ['', <nameMiddle>, <nameMiddle><nameMiddle>]
-nameStart: [<nsCons><nmVowel>, <nsCons><nmVowel>, <nsCons><nmVowel>, <nsVowel>]
-neCons: [r, n, m, s, y, l, th, b, lb, f, lf]
-neVowel: [e, i, a, au]
-nmCons: [l, m, lm, th, r, s, ss, p, f, mb, b, lb, d, lf]
-nmVowel: [a, e, i, o, u, au, oa, ei]
-nsCons: [J, M, P, N, Y, D, F]
-nsVowel: [A, Au, Ei]
-"""
-
-#### Classes ####
-
-#### Self-Test ####
-
-if __name__ == '__main__': 
-    # Erst holen wir uns das Namensgrammatik-Modul mit Standardwerten.
-    #: Das Grammatikobjekt 
-    grammar = Grammar()
-    # Dann geben wir dei Grammatik aus. 
-    print grammar.grammar
-    # Danach testen wir das Modul mittels Docstrings. (Infos im pydoc String am Anfang der Datei)
-    # Dafür holen wir uns das doctest modul. 
-    import doctest
-    # und starten dann dessen Test. 
-    doctest.testmod()
-
-#### Self-Test ####

File ews/amov/Object.py

-#!/bin/env python
-# encoding: utf-8
-
-# Charakterverwaltung - Verwalte Charaktere im lesbaren YAML Format
-# Copyright © 2007 - 2007 Arne Babenhauserheide
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
-# MA 02110-1301 USA
-
-"""Manage localized strings
-
-Hier werden lokalisierte Ausgaben geladen. 
-
-"""
-
-### Imports ###
-
-# Für das Dateiformat brauchen wir yaml, in dieser Datei müssen wir sie nur laden können. 
-from yaml import load as yaml_load
-
-# Um die Dateien zu laden, nutzen wir die Objekt-Klasse. 
-import Skripte.Kernskripte.Objekt as Objekt
-
-# Um immer die neuste Version zu haben brauchen wir die Versionsverwaltung
-from Versionsverwaltung import Versionen
-
-### Imports ###
-
-### Klassen ###
-
-class Object(object): 
-    def __init__(self, ID=None, art=None,  tag=u"tag:1w6.org,2008:de_DE", kategorie="locales", *arg, **kwds): 
-        #: Der Identifikator der Charakter-Datei
-        if ID is not None: 
-            self.ID = ID
-        elif tag is not None: 
-            # Wenn keine ID bekannt ist, lade die neuste Datei
-            versionen = Versionen(tag=tag,  kategorie=kategorie)
-            self.ID = versionen.neuste
-        # Get the name of the loaded char or template
-        self.tagname = self.ID[_(u"ID")][self.ID[_(u"ID")].index(":", 4) + 1:]
-        self.tagstring = self.ID[_(u"ID")]
-        self.tagstring_without_name = self.ID[_(u"ID")][:self.ID[_(u"ID")].index(":", 4) + 1]
-        #: Die Art der locale. Wird noch nicht verwendet. 
-        self.art = art
-        #: Das Charakterobjekt. Es bietet das dict und ein paar Methoden. 
-        self.objekt = Objekt.Objekt(ID=self.ID, template=yaml_load(self.basic_data_yaml()))
-        #: Das Charakterwörterbuch mit allen Charakterdaten aus der Datei. 
-        self.daten = self.objekt.objekt
-        #: Der Name der Datei
-        self.name = self.ladeName()
-    
-    def basic_data_yaml(self): 
-    	raise Exception("Must be implemented in subclass!")
-    
-    def ladeName(self): 
-        """Lade den Namen des Charakters. 
-        
-        Wenn der Charakter keinen Namen hat, dann erzeuge einen zufälligen."""
-        try: name = self.self.daten[_(u"Name")]
-        except: 
-            self.daten[_(u"Name")] = self.tagname
-            name = self.tagname
-        return name
-    
-    def save(self, name=None): 
-        """Save the locale into a file with its name. If the file already exists, increment the minor version number. 
-        
-        @param name: The name of the char (to call this function from outside - from ews). 
-        @type name: String """
-        
-        # 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 != self.tagname or self.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
-            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
-        
-        # 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")])
-        # Now call the version object to get the ID with a version which is increased by one. 
-        self.ID = versionen.version_minor_eins_hoeher()
-        
-        # Now change the basic dict below the attributes. 
-        
-        # Now load and save the object at the same time. 
-        self.objekt = Objekt.Objekt(ID=self.ID, template=self.daten)
-        
-    
-
-### Klassen ###
-
-### Functions ###
-
-def _(data): 
-    """Encapsulation for localization."""
-    return data
-
-### Functions ###
-
-### Self-Test ###
-
-def _test(): 
-	import doctest
-	doctest.testmod()
-
-if __name__ == "__main__": 
-   _test() 
-
-if __name__ == '__main__': 
-    pass 
-    
-### Self-Test ###

File ews/amov/Schlacht.py

-#!/bin/env python
-# encoding: utf-8
-
-# Armeenverwaltung - Verwalte Armeen im lesbaren YAML Format
-# Copyright © 2007 - 2007 Arne Babenhauserheide
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
-# MA 02110-1301 USA
-
-"""Verwalte Dateien von Armeen
-
-Beispiel: 
->>> Schlacht = Schlacht()
->>> Schlacht.schlacht
-[(('Menschen Armee', 0.5, 0.40000000000000002), [], [('tag:1w6.org,2007:Mensch', 10, -1, 'Soldat', True), ('tag:draketo.de,2007:Sskreszta', 1, -1, 'Held', False)]), (('Goblin Armee', 0.40000000000000002, 0.40000000000000002), [], [('tag:1w6.org,2007:Goblin', 15, -1, 'Soldat', True)])]
-
- """
-
-
-### Imports ###
-
-# Für das Dateiformat brauchen wir yaml
-from yaml import load as yaml_load
-
-# Um die Dateien zu laden, nutzen wir die Objekt-Klasse. 
-import Skripte.Kernskripte.Objekt as Objekt
-
-# Um immer die neuste Version zu haben brauchen wir die Versionsverwaltung
-from Versionsverwaltung import Versionen
-
-### Imports ###
-
-### Klassen ###
-
-class Schlacht: 
-    def __init__(self, ID=None, art=None,  tag=u"tag:1w6.org,2008:Menschen_gegen_Goblins",  data=None): 
-        # TODO: erstelle eine Grundklasse, die die laden-methode liefert. Diese Grundklasse sollte auch den parameter ketegorie haben, so dass sie auch __init__ komplett übernehmen kann. 
-        #: Der Identifikator der Armee-Datei
-        if ID is not None: 
-            self.ID = ID
-        elif tag is not None: 
-            # Wenn keine ID bekannt ist, lade die neuste Datei
-            versionen = Versionen(tag=tag,  kategorie=u"Schlachten")
-            self.ID = versionen.neuste
-        #: Die Art. Wird noch nicht verwendet. 
-        self.art = art
-        if data is not None: 
-            self.data = data
-            # TODO: If data is given, create a new version of the file. 
-        
-        #: Das Wörterbuch, das die Daten enthält. Kann (da vollständiges yaml) auch echte objekte enthalten. 
-        self.objekt = self.laden() 
-        
-        
-    def laden(self):
-        """Lade die benötigten Daten aus den gegebenen Parametern."""
-        
-        #: Das Objekt. Es bietet das dict und ein paar Methoden. 
-        self.objekt_tmp = Objekt.Objekt(ID=self.ID, template=yaml_load(self.standard_yaml()))
-        #: Das Wörterbuch mit allen Charakterdaten aus der Datei. 
-        return self.objekt_tmp.objekt
-    
-    def standard_yaml(self): 
-    	return """# Battlefield definition: (army, [groups], [chartypes])
-    # Army definition: ('name', resignratio, fleeratio)
-    # Chartype definition: ("tag", number_of_soldiers, 'group' (-1=army), 'Type_of_chars', from_template?)
-- !!python/tuple
-  - !!python/tuple
-    - Menschen Armee
-    - 0.5
-    - 0.40000000000000002
-  - []
-  - - !!python/tuple
-      - tag:1w6.org,2007:Mensch
-      - 10
-      - -1
-      - Soldat
-      - true
-    - !!python/tuple
-      - tag:draketo.de,2007:Sskreszta
-      - 1
-      - -1
-      - Held
-      - false
-- !!python/tuple
-  - !!python/tuple
-    - Goblin Armee
-    - 0.40000000000000002
-    - 0.40000000000000002
-  - []
-  - - !!python/tuple
-      - tag:1w6.org,2007:Goblin
-      - 15
-      - -1
-      - Soldat
-      - true
-
-"""
-    
-    
-
-### Klassen ###
-
-### Self-Test ###
-
-def _test(): 
-	import doctest
-	doctest.testmod()
-
-if __name__ == "__main__": 
-   _test() 
-
-if __name__ == '__main__': 
-        pass
-
-### Self-Test ###
-        

File ews/amov/Skripte/Kernskripte/Objekt.py

-#!/bin/env python
-# encoding: utf-8
-"""
-Read out and write out an Object from/to a yaml-file.
-
-This is a base class which gets used by other classes. 
-
-Just call it with an ID-dict and a basic template (object or dict) and get the object or dict via Objekt.objekt, or write it via Objekt.write(<dict>). 
-
-To tell it NOT to create a file, if it is missing, pass the parameter: erstellen=False
-"""
-
-
-# Charakterverwaltung - Verwalte Charaktere im lesbaren YAML Format
-# Copyright © 2007 - 2007 Arne Babenhauserheide
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
-# MA 02110-1301 USA
-
-# Diese Datei ist ein Container für die klasse Charaktere
-
-### Imports ###
-
-# Für das Dateiformat brauchen wir yaml, wir brauchen load udn dump
-from yaml import load as yaml_load
-from yaml import dump as yaml_dump
-
-# Für die Übersetzung von IDs in Dateinamen brauchen wir noch tag_zu_datei
-
-from ein_und_ausgabe import tag_zu_datei
-
-# Um Charaktere per Kommandozeile übergeben zu können brauchen wir sys
-import sys
-
-# Für die Prüfung ob Charakterdateien schon existieren brauchen wir außerdem os.path
-
-from os.path import isdir as path_isdir
-from os.path import exists as path_exists
-
-from os import makedirs
-
-from os.path import dirname
-
-### Imports ### 
-
-### Classes ###
-
-class Objekt: 
-    def __init__(self, ID=yaml_load("""# tag:1w6.org,2008:ID
-ID: tag:draketo.de,2007:Sskreszta
-Version: 0.15
-Kategorie: Charaktere
-"""), template=yaml_load("""# tag:1w6.org,2008:Charakter
-- Name: " "
-- Grunddaten: 
-    Beschreibung: " "
-    Herkunft: 
-        Sprache: ' '
-        Region: ' '
-    Stimmung: ' '
-- Werte:
-    - Eigenschaften: " "
-    - Fertigkeiten: 
-        Nahkampf: &id001
-          Zahlenwert: 12
-    - Merkmale: " "
-- Ausrüstung: 
-    Waffen:
-      Waffenlos: &id002
-        Name: Waffenlos
-        Schaden: 1
-    Rüstung: 
-        Stoffkleidung: &hauptruestung
-            Name: Stoffkleidung
-            Schutz: 1
-- Kampfwerte:  
-    Hauptwaffe:
-      Kampffertigkeit: *id001
-      Waffe: *id002
-    Trefferpunkte: 24
-    Wundschwelle: 4
-    Hauptrüstung: *hauptruestung"""),  erstellen=True): 
-        self.ID = ID
-        self.versions_tag = "tag:1w6.org,2008:Objekt"
-        self.template = template
-        self.erstellen = erstellen
-        self.template_yaml = yaml_dump(self.template, default_flow_style=False, allow_unicode=True)
-        self.objekt = self.laden()
-    
-    def laden(self):
-        """Load an object from a yaml-file."""
-        # print "Charakterbogen aus Datei", self.dateiname(), "wird geladen" 
-        # Erst sicherstellen, dass alle config-ordner existieren. 
-        if not path_isdir(dirname(self.dateiname())) and self.erstellen: 
-            makedirs(dirname(self.dateiname()))
-        
-        if path_exists(self.dateiname()): 
-          datei = open(self.dateiname(), "r")
-          charakter = yaml_load(datei.read())
-          datei.close()
-          return charakter
-        
-        elif self.erstellen: 
-          # print "Datei", self.dateiname(), "existiert nicht. Wird erstellt."
-          datei = open(self.dateiname(), "w")
-          datei.write(self.template_yaml)
-          datei.close()
-          return self.laden()
-        else: 
-           raise FileNotFoundException("Die Datei existiert nicht und konnte nicht erstellt werden.")
-    
-    def dateiname(self): 
-        """Return path and filename based on Cathegory, Version and Tag."""
-        tag_zu_dat = tag_zu_datei.Datei(self.ID) 
-        return tag_zu_dat.dateiname_ausgeben()
-    
-    def kategorie(self):
-        """Return the cathegory of the Object"""
-        tag_zu_dat = tag_zu_datei.Datei(self.ID)
-        return tag_zu_dat.kategorie_ausgeben()
-    
-    def write(self, neue_version=False): 
-        if not neue_version: 
-            # print u"öffne", self.dateiname()
-            datei = open(self.dateiname(), "w")
-            # print u"Schreibe", self.kategorie(), self.objekt_name()
-            datei.write(self.yaml())
-            datei.close()
-        else: # TODO: Direkt in eine neue Version schreiben ermöglichen. 
-            raise NotImplementedException("Direkt in eine neue Version schreiben ist noch nicht implementiert.")
-    
-    def yaml(self): 
-        return "# " + self.versions_tag + "\n" + yaml_dump(self.objekt, default_flow_style=False, allow_unicode=True)
-    
-    def objekt_name(self): 
-        tag_zu_dat = tag_zu_datei.Datei(self.ID)
-        return tag_zu_dat.name_ausgeben()
-
-### Classes ###
-
-### Selt-Test ###
-
-if __name__ == '__main__': 
-    objekt = Objekt()
-    print objekt
-    print objekt.yaml()

File ews/amov/Skripte/Kernskripte/__init__.py

-"""Scripts and modules supplying core-functionality"""

File ews/amov/Skripte/Kernskripte/ein_und_ausgabe/__init__.py

-"""Scripts and modules for file-IO"""

File ews/amov/Skripte/Kernskripte/ein_und_ausgabe/tag_zu_datei.py

-#!/bin/env python
-# This Python file uses the following encoding=utf-8
-
-# Amo - Allgemeine Modulare Objektverwaltung im lesbaren YAML Format
-# Copyright © 2007 - 2007 Arne Babenhauserheide
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
-# MA 02110-1301 USA
-
-# Dieses Skript übersetzt tag-IDs zu Dateien. 
-
-# Als Eingabe erhalten wir eine tag-ID im Format
-# tag:url,yyyy:name
-# eine Version und eine Kategorie
-# Als Ausgabe wollen wir eine Datei-Adresse im Format
-# Kategorie/name-version-yyyy-url.yml
-
-"""Read an input-object ('ID' supplies the tag) and translate it to a file-path"""
-from os.path import join
-import tag_zu_objekt
-import tag_zu_datei_von_tag
-
-class Datei: 
-        """Read a tag and return a
-corresponding file-name"""
-        def __init__(self, Eingabe, speicherordner_rel_zu_home=".amov"): 
-                self.Eingabe = Eingabe
-                self.tag_string = self.Eingabe["ID"]
-                self.version = self.Eingabe["Version"]
-                self.speicherordner_rel_zu_home = speicherordner_rel_zu_home
-                self.basisordner = join(tag_zu_datei_von_tag.BASISORDNER, speicherordner_rel_zu_home)
-                # wir holen uns das Objekt das dem tag entspricht.
-                self.tag_zum_objekt = tag_zu_objekt.tag_zu_objekt(self.tag_string)
-                self.tag_objekt = self.tag_zum_objekt.tag_objekt()
-
-        def dateipfad(self): 
-            return join(self.basisordner, self.kategorie)
-        
-        def dateiname_ausgeben(self): 
-                # Mit dem Tag_objekt und dem Eingabe-Wörterbuch können wir nun den Datei-String erzeugen. 
-                tag_zu_dat_v_t = tag_zu_datei_von_tag.Datei(tag=self.tag_string, kategorie=self.kategorie_ausgeben(), version=self.version, speicherordner_rel_zu_home=self.speicherordner_rel_zu_home)
-                datei = tag_zu_dat_v_t.dateiname_ausgeben()
-                return datei
-        
-        def kategorie_ausgeben(self):
-                return self.Eingabe['Kategorie']
-                
-        def name_ausgeben(self): 
-                return self.tag_objekt['Name']
-		
-        
-#### Self-Test ####
-
-if __name__ == "__main__": 
-    pass
-
-#### Self-Test ####

File ews/amov/Skripte/Kernskripte/ein_und_ausgabe/tag_zu_datei_von_tag.py

-#!/usr/bin/env python
-# encoding: utf-8
-
-############################################################################
-#    Copyright (C) 2007 by Achim Zien und Arne Babenhauserheide            #
-#    arne_bab@web.de                                                       #
-#                                                                          #
-#    This program is free software; you can redistribute it and#or modify  #
-#    it under the terms of the GNU General Public License as published by  #
-#    the Free Software Foundation; either version 2 of the License, or     #
-#    (at your option) any later version.                                   #
-#                                                                          #
-#    This program is distributed in the hope that it will be useful,       #
-#    but WITHOUT ANY WARRANTY; without even the implied warranty of        #
-#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         #
-#    GNU General Public License for more details.                          #
-#                                                                          #
-#    You should have received a copy of the GNU General Public License     #
-#    along with this program; if not, write to the                         #
-#    Free Software Foundation, Inc.,                                       #
-#    59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             #
-############################################################################
-
-# Wir müssen tags parsen können. 
-import tag_zu_objekt
-
-# Außerdem müssen wir Pfade Plattformunabhängig verbinden können. 
-from os.path import join
-
-# Wir brauchen noch den Nutzerordner. 
-from user import home
-
-BASISORDNER = home
-
-TRENNER_ORDNER = '/'
-TRENNER_VERSION = '-'
-TRENNER_JAHR = '-'
-TRENNER_URL = '-'
-ENDUNG_DATEI = '.yml'
-
-class Datei(): 
-    def __init__(self, tag="tag:1w6.org,2007:Menschen", kategorie="Vorlagen", version="0.1", speicherordner_rel_zu_home=".amov"):
-        self.tag = tag
-        self.kategorie = kategorie
-        self.version = version
-        self.basisordner = join(BASISORDNER, speicherordner_rel_zu_home)
-        self.tag_zum_objekt = tag_zu_objekt.tag_zu_objekt(self.tag)
-        self.tag_objekt = self.tag_zum_objekt.tag_objekt()
-
-    def dateipfad(self): 
-        return join(self.basisordner, self.kategorie)
-    
-    def dateiname_ohne_version_und_pfad(self): 
-        dateiname_ohne_version_und_pfad = self.tag_objekt['Name'] + TRENNER_URL + self.tag_objekt['URL'] + TRENNER_JAHR + self.tag_objekt['Jahr']
-        return dateiname_ohne_version_und_pfad
-
-    def dateiname_ohne_version(self): 
-        dateiname_ohne_version = join(self.dateipfad(), self.dateiname_ohne_version_und_pfad())
-        return dateiname_ohne_version
-
-    def dateiname_ohne_version_mit_trenner(self): 
-        return self.dateiname_ohne_version() + TRENNER_VERSION
-
-    def dateiname_ausgeben(self): 
-        # Mit dem Tag_objekt und dem Eingabe-Wörterbuch können wir nun den Datei-String erzeugen. 
-        datei = self.dateiname_ohne_version_mit_trenner() + str(self.version) + ENDUNG_DATEI
-        return datei
-
-#### Self-Test ####
-
-if __name__ == "__main__": 
-    datei = Datei(tag="tag:1w6.org,2007:Menschen", kategorie="Vorlagen", version="0.1")
-    print datei.dateiname_ausgeben()
-    print datei.dateiname_ohne_version_mit_trenner()
-    print datei.dateiname_ohne_version()

File ews/amov/Skripte/Kernskripte/ein_und_ausgabe/tag_zu_objekt.py

-#!/bin/env python
-# This Python file uses the following encoding=utf-8
-
-# Amo - Allgemeine Modulare Objektverwaltung im lesbaren YAML Format
-# Copyright © 2007 - 2007 Arne Babenhauserheide
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
-# MA 02110-1301 USA
-
-# Dieses Skript übersetzt tag strings der Form
-
-# tag:url,yyyy:name
-
-# zu Objekten der Form (YAML-notiert): 
-
-# tag: 
-#       Jahr: yyyy
-#       URL: url
-#       Name: Name
-
-"""Read a tag and return a dict with the
-tags information."""
-
-class tag_zu_objekt: 
-        """Read a tag and return a dict with the
-tags information."""
-        def __init__(self, tag): 
-                self.tag = tag
-        def tag_objekt(self):
-                
-                # Erstmal definieren wir Grundformate. 
-                FORMAT_JAHR = 'yyyy'
-                FORMAT_TAG = 'tag:'
-                # Und deren Längen. 
-                length_yyyy = len(FORMAT_JAHR)
-                length_tag = len(FORMAT_TAG)
-                
-                # Danach schmeißen wir den Prefix raus:'t ag:'
-                zwischenstring = self.tag[length_tag:]
-                # Dann müssen wir in der Lage sein den String zu teilen. 
-                # Dafür suchen wir erstmal das Komma im String
-                ort_des_kommas = zwischenstring.find(',')
-                # Um Fehler auszuschließen, prüfen wir noch, ob mehr als ein Komma im tag vorkommt. TODO: Sauber schreiben! 
-                anzahl_der_kommata = zwischenstring.count( ',' )
-                if anzahl_der_kommata > 1: 
-                        print 'Meldung: Mehr als ein Komma im Tag! Prüfen!'
-                else: #print 'Meldung: Nur ein Komma im Tag. Alles OK'
-                    pass 
-                # Jetzt definieren wir uns die Funktion, 
-                # die aus dem String ein Objekt macht. 
-                URL = zwischenstring[:ort_des_kommas]
-                Jahr = zwischenstring[ort_des_kommas + 1:ort_des_kommas + length_yyyy + 1] 
-                Name = zwischenstring[ort_des_kommas + length_yyyy + 2:]
-                tag_dict = {}
-                tag_dict['URL'] = URL
-                tag_dict['Jahr'] = Jahr
-                tag_dict['Name'] = Name
-                return tag_dict
-
-# und rufen sie auf. 

File ews/amov/Skripte/__init__.py

-"""Several scripts and modules used in amov."""

File ews/amov/Versionsverwaltung.py

-#!/bin/env python
-# encoding: utf-8
-
-# Charakterverwaltung - Verwalte Charaktere im lesbaren YAML Format
-# Copyright © 2007 - 2007 Arne Babenhauserheide
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
-# MA 02110-1301 USA
-
-"""Manage Versions of saved objects. 
-
-This class gets a tag and a cathegory and returns the full ID (including the version). Likely it will mostly be used to retrieve the most recent Version. """
-
-#### Imports ####
-
-import os
-
-# Um die Dateien zu laden, nutzen wir die Objekt-Klasse. 
-import Skripte.Kernskripte.ein_und_ausgabe.tag_zu_datei_von_tag as tag_zu_datei
-# Außerdem müssen wir Pfade Plattformunabhängig verbinden können. 
-from os.path import join
-
-from Skripte.Kernskripte.ein_und_ausgabe.tag_zu_datei_von_tag import BASISORDNER
-
-#### Imports ####
-
-#### Constants ####
-
-TRENNER_ORDNER = "/"
-
-#### Constants ####
-
-#### Classes ####
-
-class Versionen: 
-    """Manage Versions. 
-    
-    ToDo: Rewrite, so that data about the file-path is taken from an ID object again (self.finde_neuste_datei())."""
-    def __init__(self, tag=u"tag:1w6.org,2007:Menschen", kategorie=u"Armeen", speicherordner_rel_zu_home = ".amov"): 
-        #: the unique identifier for content, barring the cathegory. 
-        self.tag = tag 
-        #: The type of objekt we want to retrieve. 
-        self.kategorie = kategorie
-        self.BASISORDNER = join(BASISORDNER, speicherordner_rel_zu_home)
-        #: The ID including the most recent version of the objekt. 
-        self.neuste = self.neuste_version() 
-        #: The filepacth to the file with the most recent version. ToDo: Check and Remove, since this breaks the levels, which state that on this level only tag strings and ID dicts should be exchanged. 
-        self.neuste_datei = self.lade_neuste_datei()
-
-    def liste_quelldateien_auf(self, name, pfad): 
-        result_list = []
-        # print "name =", name, ", pfad =", pfad
-        # list all files. 
-        if not os.path.isdir(join(self.BASISORDNER, pfad)): 
-            os.makedirs(join(self.BASISORDNER, pfad))
-        for i in os.listdir(join(self.BASISORDNER, pfad)):
-            # If the file begins with the name and ends with ".yml" add it to the list of matching files. 
-            if i.find(name, 0, len(name)) != -1 and i[-4:] == ".yml":
-                result_list.append(join(self.BASISORDNER, pfad) + TRENNER_ORDNER + i) 
-        return result_list
-
-    def finde_neuste_datei(self, tag, pfad):
-        """Return the YAML file (suffix: ".yml") in path which begins with name which has the highest version number (sorted by [].sort )."""
-        datei = tag_zu_datei.Datei(tag=tag, kategorie=pfad)
-        name = datei.dateiname_ohne_version_und_pfad()
-        result_list = self.liste_quelldateien_auf(name, pfad)
-        #: Die neuste Datei. Wenn es keine Datei gibt: False
-        neuste_datei = False
-        # return the one with the highest version number (major.minor) from the list of matching files. 
-        #: A list containing the filepath and the major and minor versions of each file. 
-        versions_list = []
-        # create a versions array which contains the file path, the major versiona nd the minor version. 
-        for i in result_list: 
-            #: The major version of the object
-            hauptversion = self.hauptversion(self.version_von_pfad(i))
-            #: the minor version of the object
-            unterversion = self.unterversion(self.version_von_pfad(i))
-            versions_list.append((i, hauptversion, unterversion))
-        # find the file with the highest version by comparing all against a highest version array and recording always the highest version. 
-        #: The highest recorded version (major.minor). 
-        hoechste_version = [0,0]
-        for i in versions_list: 
-            # if the major version is higher than the last recorded major version, this is the most recent file and we set et as neuste_datei. 
-            if i[1] > hoechste_version[0]: 
-                hoechste_version[0] = i[1]
-                #: The most recent file. 
-                neuste_datei = i[0]
-            # if the major version is equal to the highest recorded major and the minor versino is higher than the last recorded minor version, set this as the most recent file. 
-            elif i[1] == hoechste_version[0] and i[2] > hoechste_version[1]: 
-                hoechste_version[1] = i[2]
-                neuste_datei = i[0]
-        if neuste_datei: 
-            return neuste_datei
-        else: 
-            return False
-    
-    def lade_neuste_datei(self): 
-        """Return the most recent file (by versionnumber) which matches tag and ID."""
-        #: The most recent file
-        neuste_datei = self.finde_neuste_datei(self.tag, self.kategorie)
-        return neuste_datei
-    
-    def neuste_version(self):
-        """return the most recent version in an ID dict."""
-        #: The ID dict
-        ID = {}
-        ID[u"ID"] = self.tag
-        ID[u"Kategorie"] = self.kategorie
-        neuste_datei = self.lade_neuste_datei()
-        # Set the range we found in the version-part of the filename as version. If no file exists yet, use Version 0.0
-        if neuste_datei: 
-            ID[u"Version"] = self.version_von_pfad(neuste_datei)
-        else: 
-            ID[u"Version"] = 0.0
-        return ID
-        
-    def version_minor_eins_hoeher(self): 
-        """return an ID with a minor version 1 higher than any already existing file."""
-        # First get the most recent ID
-        ID = self.neuste_version()
-        # Then get the version
-        version = ID[u"Version"]
-        # Now get the major and minor version
-        hauptvers = self.hauptversion(version)
-        untervers = self.unterversion(version)
-        # Increment the minor versino by 1
-        untervers += 1
-        # construct the version again
-        version = str(hauptvers) + "." + str(untervers)
-        # And change the ID
-        ID[u"Version"] = version
-        # And return it. 
-        return ID
-        
-    
-    def version_von_pfad(self, pfad): 
-        """Return the version of the file whoose path was referenced."""
-        # Check every char backwards from the suffix, if it is a number or a dot. 
-        i = -4
-        while self.is_number(pfad[i]) or pfad[i] == ".": 
-            i-= 1
-        return pfad[i+1:-4]
-
-    def hauptversion(self, version): 
-        """Return the major version number."""
-        vers = str(version)
-        i = 0
-        while self.is_number(vers[i]): 
-            i += 1
-        return int(vers[:i])
-
-    def unterversion(self, version): 
-        """Return the major version number."""
-        vers = str(version)
-        i = -1
-        while self.is_number(vers[i]): 
-            i -= 1
-        return int(vers[i+1:])
-    
-    def is_number(self, i): 
-        """Test if the provided char/string/int is a number."""
-        for j in str(range(10)): 
-            if i == j: 
-                return True
-        return False
-        
-        
-
-#### Classes ####
-
-#### Self-Test ####
-
-if __name__ == "__main__": 
-    from yaml import dump
-    versionen = Versionen()
-    print "Datei:", versionen.neuste_datei
-    print "ID:\n", dump(versionen.neuste, default_flow_style=False)
-
-#### Self-Test ####

File ews/amov/__init__.py

-#!/usr/bin/env python
-# encoding: utf-8
-
-"""Manage file representation of objects. Most comments in german."""

File ews/amov/charakterverwaltung.py

-#!/bin/env python
-# encoding: utf-8
-
-# Charakterverwaltung - Verwalte Charaktere im lesbaren YAML Format
-# Copyright © 2007 - 2007 Arne Babenhauserheide
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
-# MA 02110-1301 USA
-
-### Imports ###
-
-# Wir brauchen die Klasse Charakter
-import Charakter
-
-# Für die Übersetzung von IDs in Dateinamen brauchen wir noch tag_zu_datei
-from Skripte.Kernskripte.ein_und_ausgabe import tag_zu_datei
-
-# Um Charaktere per Kommandozeile übergeben zu können brauchen wir sys
-import sys
-
-# Außerdem Wollen wir einfach die neuste Version anfragen können. 
-import Versionsverwaltung
-
-
-### Imports ###
-
-
-### Klassen ###
-
-class Verwaltung: 
-    """Manage Data-Objects. Input are the tag and the Kategorie."""
-    def __init__(self, tag=u"tag:draketo.de,2007:Sskreszta", kategorie=u"Charaktere"): 
-        self.tag = tag
-        self.kategorie = kategorie
-        #: the ID of the most recent Version. 
-        self.neuste_version = self.neuste_version() 
-    def neuste_version(self): 
-        """return the ID of the most recent Version."""
-        versionsverwaltung = Versionsverwaltung
-        versionen = versionsverwaltung.Versionen(tag=tag, kategorie=u"Charaktere")
-        ID = versionen.neuste #: The ID to retrieve the file.
-        return ID
-
-### Klassen ###
-
-
-### User Input ###
-
-# Das Skript muss wie folgt aufgerufen werden: 
-# python charakterverwaltung.py <Kategorie> <Name> <Version> <URL> <Jahr>
-
-try: 
-    Kategorie = sys.argv[1]
-    Name = sys.argv[2]
-    Jahr = sys.argv[5]
-    URL = sys.argv[4]
-    Version = sys.argv[3]
-    
-    yaml_id = "ID: tag:" + URL + "," + Jahr + ":" + Name + "\n" + "Version: " + Version + "\n" + "Kategorie: " + Kategorie
-    print yaml_id
-    tag = "tag:" + URL + "," + Jahr + ":" + Name
-    print tag
-except: 
-    print "Keine Kommandozeilenargumente. Verwende Standard: Sskreszta"
-    yaml_id = """ID: tag:draketo.de,2007:Sskreszta
-Version: 0.15
-Kategorie: Charaktere
-"""
-    tag = "tag:draketo.de,2007:Sskreszta"
-
-### User Input ###
-
-
-### Testen ### 
-
-
-verwaltung = Verwaltung(tag, u"Charaktere")
-
-ID = verwaltung.neuste_version
-
-
-charakter = Charakter.Charakter(ID)
-
-print u'Wir haben den/die', charakter.kategorie, u'"' + charakter.name + u'" gelesen.'
-
-char_kampfwerte = charakter.kampfwerte
-
-print "Für das Schlachtfeld: ", char_kampfwerte
-
-try: 
-    for wert in char_kampfwerte: 
-        print wert + ":", char_kampfwerte[wert]
-    
-    char_hauptwaffe = char_kampfwerte[u"Hauptwaffe"]
-    print "\nHauptwaffe:"
-    for wert in char_hauptwaffe[u"Waffe"]: 
-        print wert + ":", char_hauptwaffe[u"Waffe"][wert]
-    
-    char_kampffertigkeit = char_hauptwaffe[u"Kampffertigkeit"]
-    
-    print u"Kampffertigkeit:", char_kampffertigkeit[u"Zahlenwert"]
-except: 
-    print "Keine Kampfwerte"
-
-### Testen ###
-
-## Jetzt definieren wie den Namen des Charakters
-## wie er im Programm verwendet wird. 
-## TODO: Beliebig viele Charakternamen 
-## akzeptieren. Aktuell geht nur einer. 
-
-
-#print "Öffne den Charakter " + argv[1]
-#char_name = argv[1]
-
-## Daraus erstellen wir den Dateinamen für diesen
-## Charakter. 
-
-#char_datei = char_name + "/" + char_name + ".yml"
-
-## Danach definieren wir ein Objekt zum 
-## Auslesen der Datei. 
-## Achtung! Diese Objekte müssen neu instanziiert
-## werden, wenn ich die Datei erneut lesen will. 
-
-#char_auslesen = file(char_datei, 'r')
-
-## Nun lesen wir den Charakter in einen String
-## und schließen die Datei. 
-
-#charakter_datei = char_auslesen.read()
-#char_auslesen.close()
-
-
-## Und übersetzen ihn mit YAML 
-## in ein Python Objekt
-## Das wird unser Grundlegendes Objekt werden. 
-
-#charakter = yaml.load(charakter_datei)
-
-## Jetzt öffnen wir eine temporäre Datei zum
-## schreiben. 
-
-#char_ausgeben = file(char_datei + '.tmp', 'w')
-
-## schreiben den Charakter
-
-#char_ausgeben.write(yaml.dump(charakter, default_flow_style=False, allow_unicode=True, indent=2))
-
-## und schließen sie gleich wieder. 
-
-#char_ausgeben.close()
-
-## Da der Test hoffentlich geklappt hat, 
-## speichern wir zum Abschluss des Programmes in 
-## der Originaldatei. 
-
-#char_speichern = file(char_datei, 'w')
-
-#char_speichern.write(yaml.dump(charakter, default_flow_style=False, allow_unicode=True, indent=2))
-
-#char_speichern.close()
-
-## Abschlussbemerkung
-
-#print "Die Bearbeitung von " + charakter[0]["Name"] + " aus der Kampagne " + charakter[2]["Grunddaten"]["Chronik"] + " ist abgeschlossen."
-
-## print "Die gespeicherten Daten sind: "
-## print yaml.dump(charakter, default_flow_style=False)

File ews/amov/useage_from_shell.sh

-#!/bin/bash
-
-./charakterverwaltung.py Spezies Menschen 0.1 1w6.org 2007

File ews/battle.py

-#!/usr/bin/env python
-# encoding: utf-8
-
-"""The battle module provides functions for battles between more than 2 participants."""
-
-#### CONTROL PARAMETERS ####
-
-# BIAS
-
-# each factor of biasfactor gives +1 to attack for superior numbers
-biasfactor = 1.4
-
-# multiplier for the bias calculation
-biasmultiplier = 2.0
-
-# the maximum biasfactor (if multiplied with biasmultiplier, approached asymptotically
-biascutoff = 8
-
-#### Imports ####
-
-# We need the Math module for the logarithm
-from math import log
-
-def bias(size_of_group_0, size_of_group_1):
-    """Return the modifier for number of fighters. 
-
-If group 0 is bigger, the modifier is positive, if group 1 is bigger, it is negative.
-"""
-    if max(size_of_group_0, size_of_group_1) < 5:
-        if size_of_group_0 > size_of_group_1: 
-            bias = int(round(3 * float(size_of_group_0 - size_of_group_1)/max(1, size_of_group_1)))
-        else: 
-            bias = (-1)*int(round(3 * float(size_of_group_1 - size_of_group_0)/max(1, size_of_group_0)))
-    else: 
-        q = log(float(max(1, size_of_group_0))/max(1, size_of_group_1),biasfactor)
-        bias = int(round(biasmultiplier * q/(1+abs(q)/biascutoff)))
-    return bias

File ews/char.py

-#!/bin/env python
-# encoding: utf-8 
-
-# Schlachtfeld - Großk�mpfe im EWS System 
-#   http://rpg-tools-1d6.sf.net
-# Copyright © 2007 - 2007 Achim Zien
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
-# MA 02110-1301 USA
-
-
-'''
-Characters and methods for use in schlachtfeld module.
-
-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. 
-    
-        This could be in the style: 
-            - Jemor won a battle against Gwarach, but got severly wounded. 
-            - Jemor lost the battle against Haske and left the battlefield. 
-            - Jemor stayed in the medics tent. 
-            - Jemor stayed in the medics tent. 
-            - Jemor started into battle again. One of his wounds didn't bother him anymore. 
-            - Jemor lost the Battle against Grishkar the beheader and left the battlefield for good. 
-
-Doctests: 
-    >>> katt = Char()
-    >>> katt.sprache
-    'Esperanto'
-    >>> katt.value_and_striche_fertigkeiten(striche=11)
-    (15, 11)
-    >>> katt.value_and_striche_fertigkeiten(striche=4*3)
-    (16, 12)
-    >>> katt.value_and_striche_fertigkeiten(striche=13)
-    (16, 13)
-    >>> katt.value_and_striche_fertigkeiten(striche=14)
-    (16, 14)
-    >>> katt.value_and_striche_fertigkeiten(striche=15)
-    (17, 15)
-    >>> katt.value_and_striche_fertigkeiten(val=15)
-    (15, 9)
-    >>> katt.value_and_striche_fertigkeiten(val=18)
-    (18, 18)
-    >>> katt.amov.eigenschaften
-    ' '
-    >>> katt.amov.eigenschaften = {"Eleganz": {"Zahlenwert": 12}}
-    >>> katt.amov.eigenschaften
-    {'Eleganz': {'Zahlenwert': 12}}
-    >>> katt.amov.fertigkeiten
-    {'Nahkampf': {'Grundwert': 12, 'Striche': 3, 'Zahlenwert': 12}}
-
-'''