Пример #1
0
        public PlayerCharacter()
        {
            PlayerRace           chosenRace           = new PlayerRace();
            PlayerCharacterClass chosenCharacterClass = new PlayerCharacterClass();

            SetPlayerSavingThrows();
        }
Пример #2
0
 public PlayerClass(PlayerCharacterClass characterClass, string combatName, string nonCombatName, int displayName, IList <string> powers = null, IList <WeaponClassType> weapons = null, IList <string> defaultPowers = null, IList <WeaponClassType> defaultWeapons = null)
 {
     CharacterClass = characterClass;
     CombatName     = combatName;
     NonCombatName  = nonCombatName;
     DisplayName    = displayName;
     Powers         = powers ?? new List <string>();
     Weapons        = weapons ?? new List <WeaponClassType>();
     DefaultPowers  = defaultPowers ?? new List <string>();
     DefaultWeapons = defaultWeapons ?? new List <WeaponClassType>();
 }
        public static PlayerCharacter GeneratePlayerCharacter(PlayerCharacterClass playerCharacterClass)
        {
            switch (playerCharacterClass)
            {
            case PlayerCharacterClass.Warrior: return(new Warrior());

            case PlayerCharacterClass.Rogue: return(new Rogue());

            case PlayerCharacterClass.Mage: return(new Mage());

            default: throw new Exception($"No character exists of type {playerCharacterClass}");
            }
        }