public Character(string _name, Class _class, int _level, int _expToNext, int _maxHealth, int _currentHealth, int _maxMana, int _currentMana, int _money, int _strength, int _agility, int _intelligence, int _speed, IDictionary<string, Ability> _abilities, ICollection<ItemStack> _inventory, Weapon _weapon, Armour _chest, Armour _helm, Armour _gloves, Armour _boots, Armour _legs) { name = _name; charClass = _class; level = _level; expToNext = _expToNext; maxHealth = _maxHealth; currentHealth = _currentHealth; maxMana = _maxMana; currentMana = _currentMana; money = _money; strength = _strength; agility = _agility; intelligence = _intelligence; speed = _speed; type = _class.type; abilities = new Dictionary<string, Ability>(_abilities); inventory = new List<ItemStack>(_inventory); weapon = _weapon; chest = _chest; helm = _helm; gloves = _gloves; boots = _boots; legs = _legs; dice = new D20(); buffs = new Effect(); }
public static void createClass(ClassType type, Class _class) { _classes.Add(type, _class); }
public static Character createNewCharacter(string _name, Class _class, IDictionary<string, Ability> _abilities) { StatModifier mod = _class.initialMod; int _maxHealth = calculateMaxHealth(mod.strength); int _maxMana = calculateMaxMana(mod.intelligence); return new Character(_name, _class, 1, calculateExpToNextLevel(1), _maxHealth, _maxHealth, _maxMana, _maxMana, 100, mod.strength, mod.agility, mod.intelligence, mod.speed, _abilities, initialItems(), new Weapon(_class.startingWeapon.id, _class.startingWeapon, 1), new Armour(_class.startingChest.id, _class.startingChest, 1), new Armour(_class.startingHelm.id, _class.startingHelm, 1), new Armour (_class.startingGloves.id, _class.startingGloves, 1), new Armour (_class.startingBoots.id, _class.startingBoots, 1), new Armour (_class.startingLegs.id, _class.startingLegs, 1)); }