Commits

Anonymous committed 596a899

unfinished

Comments (0)

Files changed (24)

 Plans: 
     - Simple to use functions in easy to read scriptfiles in the style of the ministory file. 
     - char.compete(other, skill_name) -> See who wins and by how much. 
+    - say() instead of story()?
 
 Ideas: 
     - Lazy loading modules, to be able to print stuff at once without having to print before the imports.
     - Add getting experience for groups and show the chars together (only one experience header instead of one per char). 
 
-The code for the TextRPG can be found at U{http://dreehg.org/ArneBab/textrpg}
+Design:
+    - revert: story() is a function, but should be heavily overloaded, so it gets 
+used for any kind of interacion with the setting. -> story(background="...", 
+show_image="...", clear_images=True, background_musi="...", play_sound="...", ...)
+
+The code for the TextRPG can be found at U{http://freehg.org/ArneBab/textrpg}
 
 """
 
     '''String function to allow localizing later on)'''
     return str(text)
 
+class Story(object): 
+    """A more complex option for telling stories."""
+    def __init__(self, *args, **kwds): 
+        pass
+    def say(text): 
+        story(text)
+
 class Char(ews_char):
     def __init__(self, template=False, *args, **kwds): 
         super(Char, self).__init__(template=template, *args, **kwds)
         return won, [deep_wounds_self, critical_wounds_self, self.damage_self], [deep_wounds_other, critical_wounds_other, self.damage_other]
     
 
-def ask(question): 
+def ask(question=None): 
     """Ask a question."""
-    return raw_input(_(question) + " ")
+    if question is not None: 
+        return raw_input(_(question) + " ")
 
-def story(data):
-    data = _(data)
-    for i in data.split("\n"): 
-        if i.strip() != "": 
-            diag(i, localize=False)
-        # If the string is empty, just add a blank line without the characters name. 
-        else: diag("...", localize=False)
+def story(data=None):
+    if data is not None: 
+        data = _(data)
+        for i in data.split("\n"): 
+            if i.strip() != "": 
+                 diag(i, localize=False)
+             # If the string is empty, just add a blank line without the characters name. 
+            else: diag("...", localize=False)
 	
 
 def save(chars=[]):

textrpg_1d6/__init__.pyc

Binary file added.

textrpg_1d6/amov/Charakter.pyc

Binary file added.

textrpg_1d6/amov/Namensgrammatik.pyc

Binary file added.

textrpg_1d6/amov/Object.pyc

Binary file added.

textrpg_1d6/amov/Skripte/Kernskripte/Objekt.pyc

Binary file added.

textrpg_1d6/amov/Skripte/Kernskripte/__init__.pyc

Binary file added.

textrpg_1d6/amov/Skripte/Kernskripte/ein_und_ausgabe/__init__.pyc

Binary file added.

textrpg_1d6/amov/Skripte/Kernskripte/ein_und_ausgabe/tag_zu_datei.pyc

Binary file added.

textrpg_1d6/amov/Skripte/Kernskripte/ein_und_ausgabe/tag_zu_datei_von_tag.pyc

Binary file added.

textrpg_1d6/amov/Skripte/Kernskripte/ein_und_ausgabe/tag_zu_objekt.pyc

Binary file added.

textrpg_1d6/amov/Skripte/__init__.pyc

Binary file added.

textrpg_1d6/amov/Versionsverwaltung.pyc

Binary file added.

textrpg_1d6/amov/__init__.pyc

Binary file added.

textrpg_1d6/char.pyc

Binary file added.

textrpg_1d6/namegen/__init__.pyc

Binary file added.

textrpg_1d6/namegen/pycfnamegen/__init__.pyc

Binary file added.

textrpg_1d6/namegen/pycfnamegen/cfnamegen.pyc

Binary file added.

textrpg_1d6/namen.pyc

Binary file added.

textrpg_1d6/pmw6.pyc

Binary file added.

textrpg_1d6/random_phonetic_name_generator_von_Pointon/__init__.pyc

Binary file added.

textrpg_1d6/random_phonetic_name_generator_von_Pointon/random_phonetic_name_generator.pyc

Binary file added.

textrpg_1d6/yould/__init__.pyc

Binary file added.

textrpg_1d6/yould/yould.pyc

Binary file added.