FightActor - JayhawkZombie/EECS581Project GitHub Wiki
##Note: in actual implementation, this class is called BattleActor
Abstract
Basically a FightActor is just an actor that will be involved with battle
Extends
- RPGActor
Dependencies
- Damage //member m_thorns is of type Damage
- Skill //for use by skillsets
- Element enum //Has an element
- RPGActor //Derived from RPGActor
Member Variables (private)
- Element m_primary
- Used to determine offense/defense bonuses
- Damage m_thorns
- executed on an enemy that attacks the FightActor
- int m_hpCur
- The user's current Health Points - if this is <0, dies
- int m_hpMax
- The user's maximum Health Points - the user cannot be healed above this amount
- int m_mpCur
- The user's current magic points - this will be checked and decreased when someone wants to use a skill, if they dont have enough m_mpCur, they can't execute
- int m_mpMax
- The user's maximum magic points - the user cannot gain magic above this amount
- int m_mpRegen
- The amount that the User Regenerates each turn
- bool skillset[i]
- Quantity i will be the number of possible skills. Each index begins by being set to false
- int level
- the level of the actor
- int exp
- For enemies this is the exp that will be gained by killing them
- For allies this is the exp that will be needed for levelling up ##functions
###virtual bool TakeDamage(const Damage recieved) = 0
- This is the function that will handle recieving damage from any source, returns true if the character died false else
###virtual Damage baseDamage() = 0
- Every derived type from this class should have a base damage that it deals to opponents
###virtual bool Levelup()=0
- Levels up the actor if exp>1000 and subtracts 1000 from exp
###virtual bool gainExp()=0
- Adds to the actors exp
###bool isAlive() const
- Returns a boolean: true if the actor is alive, false else. This gets checked by the Battle class to see if this character gets loaded into the m_turnQueue and when they check isBattleOver()
###getters and setters for member variables
##Principles in construction
###Leveling Principle 1 An average (perfectly balanced) fightActor will have the following attributes for the given levels
Level | HP | MP |
---|---|---|
1 | 20 | 10 |
5 | 40 | 30 |
10 | 100 | 50 |
20 | 250 | 90 |
30 | 450 | 130 |
40 | 700 | 170 |
>40 | 700+10n | 17+2n |
- where n is level-40
##Cooresponding Java version 1.GenericRPG
#FuturePlans None for right now, There are a lot of plans for the classes derived from this.