// ORC // public static Character GetBaseOrc(CharacterGender gender, bool isPlayer = false) { var tmpChar = new Character() { Race = CharacterRace.Orc, StrongAgainst = CharacterRace.Human, StrongIn = MapType.Mountains, Diet = Diet.Herbivorous, HpMax = 500, PaMax = 6, PmMax = 1, LevelingHealthPercent = 25, LevelingDamagePercent = 5, FavWeapons = new List <WeaponType> { WeaponType.GreatSword, WeaponType.Gauntlets }, Weapons = new List <Weapon> { WeaponsData.GetWeaponFromType(WeaponType.GreatSword, isPlayer), WeaponsData.GetWeaponFromType(WeaponType.Gauntlets, isPlayer) }, SkillsTypes = new List <SkillType> { SkillType.Racial, SkillType.NotRatial }, Skills = new List <Skill> { Random.Range(0, 2) == 0 ? SkillsData.GetSkillFromName(SkillsData.OrcSkillsNames[0]) : SkillsData.GetSkillFromName(SkillsData.OrcSkillsNames[1]) }, BodyParts = CreateBodyPartsFromRace(CharacterRace.Human, gender), Inventory = new List <InventoryItem> { ItemsData.GetRandomItem(isPlayer) }, InventoryPlace = 3, WeightLimit = 80, SleepHoursNeeded = 12, SleepRestorationPercent = 100, RunAwayPercent = 15, LootPercent = 15, CritChancePercent = 0 }; HandleGreatSword(tmpChar); return(tmpChar); }
// DWARF // public static Character GetBaseDwarf(CharacterGender gender, bool isPlayer = false) { var tmpChar = new Character() { Race = CharacterRace.Dwarf, StrongAgainst = CharacterRace.Orc, StrongIn = MapType.Mines, Diet = Diet.Omnivorous, HpMax = 350, PaMax = 6, PmMax = 2, LevelingHealthPercent = 10, LevelingDamagePercent = 20, FavWeapons = new List <WeaponType> { WeaponType.Hammer, WeaponType.Axe }, Weapons = new List <Weapon> { WeaponsData.GetWeaponFromType(WeaponType.Hammer, isPlayer), WeaponsData.GetWeaponFromType(WeaponType.Axe, isPlayer) }, SkillsTypes = new List <SkillType> { SkillType.Racial, SkillType.NotRatial }, Skills = new List <Skill> { Random.Range(0, 2) == 0 ? SkillsData.GetSkillFromName(SkillsData.DwarfSkillsNames[0]) : SkillsData.GetSkillFromName(SkillsData.DwarfSkillsNames[1]) }, BodyParts = CreateBodyPartsFromRace(CharacterRace.Human, gender), Inventory = new List <InventoryItem> { ItemsData.GetRandomItem(isPlayer) }, InventoryPlace = 4, WeightLimit = 60, SleepHoursNeeded = 7, SleepRestorationPercent = 75, RunAwayPercent = 10, LootPercent = 50, CritChancePercent = 0 }; HandleGreatSword(tmpChar); return(tmpChar); }
private static void HandleGreatSword(Character tmpChar) { if (tmpChar.Weapons[0].Type == WeaponType.GreatSword && !WeaponsData.IsSmallWeapon(tmpChar.Weapons[1].Type)) { if (tmpChar.Race == CharacterRace.Human || tmpChar.Race == CharacterRace.Dwarf) { tmpChar.Weapons[1] = null; tmpChar.Weapons[1] = WeaponsData.GetWeaponFromType(WeaponsData.GetRandomSmallWeaponType(), isBase: true); } else { tmpChar.Weapons[1] = null; tmpChar.Weapons[1] = WeaponsData.GetWeaponFromType(tmpChar.FavWeapons[1], isBase: true); } } else if (tmpChar.Weapons[1].Type == WeaponType.GreatSword) { tmpChar.Weapons[1] = null; tmpChar.Weapons[1] = WeaponsData.GetWeaponFromType(WeaponsData.GetRandomSmallWeaponType(), canBeAnythingAndGreatSword: false); } }