hey everyone I am making an morpg and was wondering If my Warrior basestats is good or
if I need to improve it. This is one of my classes in my game. I have two more with the same stat
names so here is my code:
var name : String;
var level : int;
var curExp : int;
var maxExp : int;
var buff : int;
var health : int;
var energy : int;
var might : int;
var defense : int;
var magic : int;
var luck : int;
function Update() {
BaseStats();
Vitals();
AddEXP();
LevelUp();
}
// These are his stats for the game
function BaseStats()
{
level = 1;
curExp = 0;
maxExp = 100;
buff = 0;
might = 75;
defense = 80;
magic = 25;
luck = 41;
}
// These are his Vitals
function Vitals()
{
health = 100;
energy = 100;
}
// exp to add to this class
function AddEXP()
{
var exp : int = 1;
curExp += exp;
}
// to level up the player
function LevelUp()
{
if(curExp >= maxExp)
{
level++;
maxExp += 10;
might += 4;
defense += 5;
magic += 2;
luck += 2;
curExp = 0;
}
}
so look it over and tell me if this good or if I need to add some thing.this also has no errors to it.