/// <summary> /// The main constructor for a character. All fields must be filled. /// </summary> /// <param name="_name">The name of the character</param> /// <param name="_level">The level of the character granted-</param> /// <param name="_basehp">The max amount of health the character</param> /// <param name="_curhp">The CURRENT amount of health</param> /// <param name="_charclass"> The class of the character</param> /// <param name="_curxp">The current amount of experience the character has</param> /// <param name="_str">The amount of strength the character has</param> /// <param name="_agi">The amount of agility the character has</param> /// <param name="_int">The amount of intellingence the character has</param> /// <param name="_armor">The armor of the character</param> /// <param name="_meleeattack">The melee attack damage of the character</param> /// <param name="_gear">The characters current gear</param> /// <param name="_gear">The characters inventory</param> public Character(string _name, int _level, int _basehp, int _curhp, EnumCharClass _charclass, int _curxp, int _str, int _agi, int _int, int _crit, int _armor, int _meleeattack, Gear _gear) : base(_name, _level, _basehp, _curhp) { this.charClass = _charclass; this.charCurrentXP = _curxp; this.baseStrength.IntValue = _str; this.baseAgility.IntValue = _agi; this.baseIntellingence.IntValue = _int; this.buffedStrength.IntValue = _str; this.buffedAgility.IntValue = _agi; this.buffedIntellingence.IntValue = _int; this.BaseCrit.IntValue = _crit; this.BuffedCrit.IntValue = _crit; this.BuffedAttackDamage.IntValue = _meleeattack; this.BaseArmor.IntValue = _armor; this.BaseAttackDamage.IntValue = _meleeattack; this.BuffedArmor.IntValue = _armor; this.BuffedAttackDamage.IntValue = _meleeattack; if (_gear == null) this.charGear = new Gear(); else this.charGear = _gear; this.baseTurnPoints.IntValue = (this.UnitLevel / 10) + 1; this.currentTurnPoints = this.baseTurnPoints; this.UnitBuffsAndDebuffs = new List<Abilities.BuffsAndDebuffs>(); }
private Core.Units.Gear GiveCharGear(Core.Units.Character character) { Core.Units.Gear gear = new Core.Units.Gear(); switch (character.CharClass) { case RPG.Core.EnumCharClass.Warrior: gear.AddOrRemoveWeapon(new RPG.Core.Items.Weapon("Warrior's Axe",EnumItemType.Weapon, EnumItemQuality.Normal, 1, Core.Items.EnumWeaponType.Axe, 1), true); gear.AddOrRemoveChestArmor(new RPG.Core.Items.Armor("Warrior's Chestarmor",EnumItemType.Armor, EnumItemQuality.Normal, 1, Core.Items.EnumArmorType.Chestarmor, 1), true); break; case RPG.Core.EnumCharClass.Paladin: gear.AddOrRemoveWeapon(new RPG.Core.Items.Weapon("Paladin's Sword", EnumItemType.Weapon, EnumItemQuality.Normal, 1, Core.Items.EnumWeaponType.Sword, 1), true); gear.AddOrRemoveChestArmor(new RPG.Core.Items.Armor("Paladin's Chestarmor", EnumItemType.Armor, EnumItemQuality.Normal, 1, Core.Items.EnumArmorType.Chestarmor, 1), true); break; case RPG.Core.EnumCharClass.Wizard: gear.AddOrRemoveWeapon(new RPG.Core.Items.Weapon("Wizard's Staff", EnumItemType.Weapon, EnumItemQuality.Normal, 1, Core.Items.EnumWeaponType.Staff, 1), true); gear.AddOrRemoveChestArmor(new RPG.Core.Items.Armor("Wizard's Chestarmor", EnumItemType.Armor, EnumItemQuality.Normal, 1, Core.Items.EnumArmorType.Chestarmor, 1), true); break; case RPG.Core.EnumCharClass.Thief: gear.AddOrRemoveWeapon(new RPG.Core.Items.Weapon("Thief's Dagger", EnumItemType.Weapon, EnumItemQuality.Normal, 1, Core.Items.EnumWeaponType.Dagger, 1), true); gear.AddOrRemoveChestArmor(new RPG.Core.Items.Armor("Thief's Chestarmor", EnumItemType.Armor, EnumItemQuality.Normal, 1, Core.Items.EnumArmorType.Chestarmor, 1), true); break; case RPG.Core.EnumCharClass.Caretaker: gear.AddOrRemoveWeapon(new RPG.Core.Items.Weapon("Caretaker's Mace", EnumItemType.Weapon, EnumItemQuality.Normal, 1, Core.Items.EnumWeaponType.Mace, 1), true); gear.AddOrRemoveChestArmor(new RPG.Core.Items.Armor("Caretaker's Chestarmor", EnumItemType.Armor, EnumItemQuality.Normal, 1, Core.Items.EnumArmorType.Chestarmor, 1), true); break; case RPG.Core.EnumCharClass.Synergist: gear.AddOrRemoveWeapon(new RPG.Core.Items.Weapon("Synergist's Bow", EnumItemType.Weapon, EnumItemQuality.Normal, 1, Core.Items.EnumWeaponType.Bow, 1), true); gear.AddOrRemoveChestArmor(new RPG.Core.Items.Armor("Synergist's Chestarmor", EnumItemType.Armor, EnumItemQuality.Normal, 1, Core.Items.EnumArmorType.Chestarmor, 1), true); break; default: break; } gear.AddOrRemoveBattleCharm(new Core.Items.BattleCharm("Copper Coin", EnumItemType.Battlecharm, EnumItemQuality.Normal, 1), true); gear.AddOrRemoveBattleCharm(new Core.Items.BattleCharm("Metal Coin", EnumItemType.Battlecharm, EnumItemQuality.Normal, 1), true); gear.BattleCharms[0].AddAttributeToItem(EnumAttributeType.Health, 1); gear.BattleCharms[1].AddAttributeToItem(EnumAttributeType.Health, 1); gear.AddOrRemoveHeadArmor(new Core.Items.Armor("Headcloth", EnumItemType.Armor, EnumItemQuality.Normal, 1, Core.Items.EnumArmorType.Headarmor, 0), true); gear.AddOrRemoveLegArmor(new Core.Items.Armor("Loincloth", EnumItemType.Armor, EnumItemQuality.Normal, 1, Core.Items.EnumArmorType.Legarmor, 0), true); return gear; }