cyphesis/rulesets/deeds/world/statistics/Statistics.py
Erik Ogenvik 2dca4949ed Created "deeds" ruleset and made it default.
It's currently a copy of the Mason ruleset.
Where Mason focuses on letting the users create the world themselves,
Deeds instead focuses on allowing world authors to set up enticing
worlds with gameplay and stories. In contrast to Mason there are more
features available to the world authors which allow for automatic
creation of entities and so on.
2013-11-15 21:14:47 +01:00

31 lines
905 B
Python

#This file is distributed under the terms of the GNU General Public license.
#Copyright (C) 2006 Al Riddoch (See the file COPYING for details).
from random import *
class Statistics(object):
"""A very simple Statistics example."""
def __init__(self, entity=None): pass
# Set it up or sumink
def calc_attack(self):
# print "Request for attack"
return 1
def calc_defence(self):
# print "Request for defence"
return 1
def calc_strength(self):
# print "Request for strength"
if hasattr(self, 'character') and hasattr(self.character, 'mass'):
return self.character.mass
else:
return 0
def set_strength(self, val): pass
# print "Setting strength to %d" % val
attack = property(calc_attack)
defence = property(calc_defence)
strength = property(calc_strength, set_strength)