AnglerStudios:Code Stats
Back to the Main Page.
Back to the Coding Discussion Page.
Class Stats
Class Name: stats
Members
Functions:
currently all the functions are of the type : get<insertstatnamehere> set<insertstatnamehere> eg: getLevel(); setLevel();
Variables:
int level // character level int experience // how close to the next level the character is int maxHP // maximum health int currHP // current health int maxMP // maximum mana int currMP // current mana int strength // will affect melee damage int agility // will affect bow damage, and possibly hit rate and dodge chance int speed // will (eventually) affect how many attacks a character can potentially get in battle int stamina // directly affects health int intelligence // will affect mana, and spell damage list status // will be a linked list containing the status effects currently affecting the character
Notes: I am thinking of not making death a status effect... simply disallow any action to be taken by a character with a currHP <= 0 - this could shorten calculations on the linked list somewhat since I am expecting dying in battle to happen a LOT. Of course... if a character has 0 health we can disallow casting of a regular healing spell to change that... anyway we'll see how much overhead this would save (if death isnt common then it'd probably be simpler to make it a status since we'd not be saving much in the way of processing)
PS: don't ask me how those cool boxes appeared for my code... I don't know :S Natoli 21:08, 6 July 2006 (PDT)