diff characterstatistics.py @ 153:741d7d193bad

Changed CharacterStatistic classes to work with components.
author KarstenBock@gmx.net
date Sat, 05 Nov 2011 14:42:12 +0100
parents 7a89ea5404b1
children
line wrap: on
line diff
--- a/characterstatistics.py	Wed Oct 26 13:01:49 2011 +0200
+++ b/characterstatistics.py	Sat Nov 05 14:42:12 2011 +0100
@@ -19,6 +19,8 @@
 
 from .serializers import SerializableRegistry
 
+from components import character_statistics
+
 class AbstractCharacterStatistic(object):
     __metaclass__ = ABCMeta
     
@@ -144,7 +146,8 @@
         character = self.character()
         
         value = sum(
-            character.statistics[name].value * modifier for name, modifier in
+            character_statistics.get_statistic(character, name).value * 
+            modifier for name, modifier in
                 stat_modifiers.items()
         )
         assert 0 <= value <= 100