Anonymous committed 0cfeff5 Merge

merge from bach.

  • Participants
  • Parent commits 2600ddd, f88a0bf

Comments (0)

Files changed (5)

 0cb91702e697064067af4cca4dd3e2a00508a535 v0.2
+2c4e2b230e055ec75ce68e8d9a95f2f1f29c7ed9 v0.3

File Changelog.txt

+textrpg 0.3 (2008-07-07)
+- FIX: Answering Yes in battle screen didn't work. 
 - Now experience is spent incrementally.
 - Added check_skill(name_of_skill).


File contents unchanged.
       packages = find_packages('.'), 
-      scripts=["", ""]
+      scripts=["", "", ""]
     - 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). 
+Basic design principles for the scripting language: 
+    - The action is character centered wherever possible and useful. 
+       -> char.say(text) instead of dialog(char, text)
+    - Anything which affects only one character or any interaction between only a few characters which is initiated by one of them gets called from the character via char.action(). 
+       -> char.compete_skill(char2, skill_name) instead of competition_skill(char1, char2, skill_name)
+    - Anything which affects the whole scene, or a whole group of not necessarily interacting characters gets called as basic function via action() or as class in its own right via class.action(). 
+       -> save([char1, char2]) instead of
+    - The seperate class way should only be chosen, if the class can feel like a character in its own right and needs seperate states which may or may not be persistent over subsequent runs. 
+       -> For example AI.choose_the_way(players_answer) or music.action()
+    - Data should be stored inside the chars wherever possible. If a script gets started with the same character again, the situation should resemble the previous one as much as possible, except where dictated otherwise by the story. 
+       -> instead of 'on quit' store_char_data(char) + 'on start' load_char_data(char)
+    - Actions should be written as verb_noun or simply verb. 
+       -> char.say() and char.compete_skill() instead of char.text() and char.skill_compete()
     - revert: story() is a function, but should be heavily overloaded, so it gets 
 used for any kind of interacion with the setting. -> story(background="...", 
   MA 02110-1301 USA
-__version__   = '0.2' 
+__version__   = '0.3' 
 __author__    = 'Arne Babenhauserheide' 
 # __date__      = '7th March 2007' 
 __url__       = '' 
 from textrpg_1d6.char import Char as ews_char
 def _(text):
-    '''String function to allow localizing later on)'''
+    '''String function to allow localizing later on. '''
     return str(text)
 class Story(object): 
     @return: The result of the battle (won or lost, wounds)."""
-    if ask('Do you want to attack ' + + '? (Yes, no) ').lower() in ['Yes', 'y', '']: 
+    if ask('Do you want to attack ' + + '? (Yes, no) ').lower() in ['yes', 'y', '']: 
         diag("You attack " + + ".")
         won, injuries_self, injuries_other = select_battle_style(me, other, attacker=True)