public void GenerateStatistics(AttributeSet att, int lvl) { //straight up set level. level = lvl; //Set up a base level. The numbers are hardcoded, i know, but ive been tinkering to get nice values out of them. //The base values let every character have at least a certain level of a statistic. //From there, add advantages from point assignation. float dg = (level * 2) + (att.dex * 3.5f); float hp = (level * 10f) + (att.sta * 7.5f); float dmg = (level * 5) + (att.str * 3.5f); float hit = (level * 4.5f) + (att.acu * 8); //Round to nearest int, computer style, not normal style. Too tired to fully comprehend that, but you understand. I hope. dodgeChance = (int)dg; health = (int)hp; damage = (int)dmg; hitChance = (int)hit; }
//Input pregenerated attributes and level for stat generation public StatisticsSet(AttributeSet att, int lvl) { GenerateStatistics(att, lvl); }
//take an int, and feed it into constructors for attributes and statistics. public Character(int lvl) { attributes = new AttributeSet(lvl); statistics = new StatisticsSet(attributes, lvl); }