diff options
author | Philipp Sehmisch <tmw@crushnet.org> | 2007-03-11 21:38:08 +0000 |
---|---|---|
committer | Philipp Sehmisch <tmw@crushnet.org> | 2007-03-11 21:38:08 +0000 |
commit | 99f34a8a72f63b4bd9fc2f3c370c8cbe9b9127cf (patch) | |
tree | c075dcc834e0720e6de819c7514f4fdfa7cfe554 /src/controller.h | |
parent | 0a74cd8c92844e730cf6f56bdc3dd578c65a10d0 (diff) | |
download | manaserv-99f34a8a72f63b4bd9fc2f3c370c8cbe9b9127cf.tar.gz manaserv-99f34a8a72f63b4bd9fc2f3c370c8cbe9b9127cf.tar.bz2 manaserv-99f34a8a72f63b4bd9fc2f3c370c8cbe9b9127cf.tar.xz manaserv-99f34a8a72f63b4bd9fc2f3c370c8cbe9b9127cf.zip |
Implemented stat handling infrastructure and basic damage calculation.
Diffstat (limited to 'src/controller.h')
-rw-r--r-- | src/controller.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/controller.h b/src/controller.h index 40e4b22b..f99a2b74 100644 --- a/src/controller.h +++ b/src/controller.h @@ -34,10 +34,7 @@ class Controlled: public Being /** * Constructor. */ - Controlled(int type): - Being(type, 65535), - mCountDown(0) - {} + Controlled(int type); /** * Performs one step of controller logic. @@ -49,6 +46,13 @@ class Controlled: public Being */ virtual void die(); + /** + * Recalculates all stats of the being that are derived from others. + * Call whenever you change something that affects a derived stat. + * Called automatically when you manipulate a stat using setBaseStat() + */ + virtual void calculateStats(); + private: /** Count down till next random movement (temporary). */ unsigned int mCountDown; |