cyphesis/rulesets/minimal/world/statistics/Statistics.py
Sean Ryan 9dba75e5fc Add in minimal ruleset with bare code and build.
And just for Al, I exported the xml clean from the db.
2012-08-07 10:08:15 -04: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)