public PAPICharacter(string _archetype, Species _species, Value _soak, ThresholdValue _health, Defense _defense, CharacteristicSet _characteristics,
                             Equipment _equipment, Inventory _inventory, List <PAPISkill> _skillSet, List <Ability> _abilities, Career _career, CharacterAppearance _appearance,
                             GenderEnum _gender, List <GenderEnum> _genderPreferences)
        {
            this._archetype       = (_archetype == null || _archetype == "") ? "Townspeople" : _archetype;
            this._species         = (_species == null) ? SpeciesHandler.GetSpecies(SpeciesEnum.HUMAN) : _species;
            this._soak            = (_soak == null) ? new Value(0, null) : _soak;
            this._characteristics = (_characteristics == null) ? new CharacteristicSet() : _characteristics;
            this._health          = (_health == null) ?
                                    new ThresholdValue(SpeciesHandler.GetInitialHealth(this._species._enum)) : _health;
            this._defense           = (_defense == null) ? new Defense(0, null, 0, null) : _defense;
            this._equipment         = (_equipment == null) ? new Equipment(null, null, null, null) : _equipment;
            this._inventory         = (_inventory == null) ? new Inventory(null, null) : _inventory;
            this._skillSet          = (_skillSet == null) ? new List <PAPISkill>() : _skillSet;
            this._abilities         = (_abilities == null) ? new List <Ability>() : _abilities;
            this._career            = _career;
            this._appearance        = (_appearance == null) ? new CharacterAppearance(SpeciesHandler.GetAverageAppearance(this._species._enum)) : _appearance;
            this._gender            = _gender;
            this._genderPreferences = (_genderPreferences == null || _genderPreferences.Count == 0) ? new List <GenderEnum>()
            {
                GenderEnum.NONE
            } : _genderPreferences;

            WfLogger.Log(this, LogLevel.DETAILED, "Created new Character (" + this._species._enum +
                         " " + this._archetype + ")");
        }
Beispiel #2
0
        public Rival(string _archetype, Species _species, Value _soak, ThresholdValue _health, Defense _defense, CharacteristicSet _characteristics,
                     Equipment _equipment, Inventory _inventory, List <PAPISkill> _skillSet, List <Ability> _abilities, Career _career, CharacterAppearance _appearance,
                     GenderEnum _gender, List <GenderEnum> _genderPreferences, int _relationshipToParty, List <CriticalInjury> _criticalInjuries) :
            base(_archetype, _species, _soak, _health, _defense, _characteristics, _equipment, _inventory, _skillSet, _abilities, _career, _appearance, _gender,
                 _genderPreferences, _relationshipToParty)
        {
            this._criticalInjuries = (_criticalInjuries == null) ? new List <CriticalInjury>() : _criticalInjuries;

            WfLogger.Log(this, LogLevel.DETAILED, "Created new Rival");
        }
Beispiel #3
0
        public MinionGroup(string _archetype, Species _species, Value _soak, ThresholdValue _health, Defense _defense, CharacteristicSet _characteristics,
                           Equipment _equipment, Inventory _inventory, List <PAPISkill> _skillSet, List <Ability> _abilities, Career _career, CharacterAppearance _appearance,
                           GenderEnum _gender, List <GenderEnum> _genderPreferences, int _relationshipToParty, uint _groupSize) :
            base(_archetype, _species, _soak, _health, _defense, _characteristics, _equipment, _inventory, _skillSet, _abilities, _career, _appearance, _gender,
                 _genderPreferences, _relationshipToParty)
        {
            this._groupSize = _groupSize;

            WfLogger.Log(this, LogLevel.DETAILED, "Created new Minion Group");
        }
Beispiel #4
0
        // --------------------------------------------------------------------------------------------------------------------------------

        /// <summary>
        /// Default CTOR creates an invalid average bald, other gendered human without any skills and a all characteristics 1
        /// </summary>
        public PlayerCharacter() : base()
        {
            _name             = "INVALID_PLAYER_CHARACTER";
            _motivationSet    = new MotivationSet();
            _criticalInjuries = new List <CriticalInjury>();
            _strain           = new ThresholdValue();
            _careerSkills     = new List <SkillEnum>();

            WfLogger.Log(this, LogLevel.DETAILED, "Created new PlayerCharacter from default");
        }
Beispiel #5
0
        public NonPlayerCharacter(string _archetype, Species _species, Value _soak, ThresholdValue _health, Defense _defense, CharacteristicSet _characteristics,
                                  Equipment _equipment, Inventory _inventory, List <PAPISkill> _skillSet, List <Ability> _abilities, Career _career, CharacterAppearance _appearance,
                                  GenderEnum _gender, List <GenderEnum> _genderPreferences, int _relationshipToParty) :
            base(_archetype, _species, _soak, _health, _defense, _characteristics, _equipment, _inventory, _skillSet, _abilities, _career, _appearance, _gender,
                 _genderPreferences)
        {
            _relationshipToParty      = (_relationshipToParty < -100) ? -100 : _relationshipToParty;
            this._relationshipToParty = (_relationshipToParty > 100) ? 100 : _relationshipToParty;

            WfLogger.Log(this, LogLevel.DETAILED, "Created new NPC (Relationship to Party = " + this._relationshipToParty + ")");
        }
        // --------------------------------------------------------------------------------------------------------------------------------

        /// <summary>
        /// Creates a copy of the given Nemesis
        /// </summary>
        /// <param name="other">if null, a default Nemesis is created</param>
        public Nemesis(Nemesis other) : this()
        {
            if (other == null)
            {
                return;
            }

            _strain = new ThresholdValue(other._strain);

            WfLogger.Log(this, LogLevel.DETAILED, "Created new Nemesis from another");
        }
        public Nemesis(string _archetype, Species _species, Value _soak, ThresholdValue _health, Defense _defense, CharacteristicSet _characteristics,
                       Equipment _equipment, Inventory _inventory, List <PAPISkill> _skillSet, List <Ability> _abilities, Career _career, CharacterAppearance _appearance,
                       GenderEnum _gender, List <GenderEnum> _genderPreferences, int _relationshipToParty, List <CriticalInjury> _criticalInjuries, string _name,
                       MotivationSet _motivationSet, ThresholdValue _strain) :
            base(_archetype, _species, _soak, _health, _defense, _characteristics, _equipment, _inventory, _skillSet, _abilities, _career, _appearance, _gender,
                 _genderPreferences, _relationshipToParty, _criticalInjuries, _name, _motivationSet)
        {
            this._strain = (_strain == null || _strain._threshold == 0) ? new ThresholdValue(SpeciesHandler.GetInitialStrain(this._species._enum)) : _strain;

            WfLogger.Log(this, LogLevel.DETAILED, "Created new Nemesis " + this._name);
        }
        public UniqueRival(string _archetype, Species _species, Value _soak, ThresholdValue _health, Defense _defense, CharacteristicSet _characteristics,
                           Equipment _equipment, Inventory _inventory, List <PAPISkill> _skillSet, List <Ability> _abilities, Career _career, CharacterAppearance _appearance,
                           GenderEnum _gender, List <GenderEnum> _genderPreferences, int _relationshipToParty, List <CriticalInjury> _criticalInjuries, string _name,
                           MotivationSet _motivationSet) :
            base(_archetype, _species, _soak, _health, _defense, _characteristics, _equipment, _inventory, _skillSet, _abilities, _career, _appearance, _gender,
                 _genderPreferences, _relationshipToParty, _criticalInjuries)
        {
            this._name          = (_name == null || _name == "") ? "NOT_VALID" : _name;
            this._motivationSet = (_motivationSet == null) ? new MotivationSet() : _motivationSet;

            WfLogger.Log(this, LogLevel.DETAILED, "Created new Unique Rival: " + this._name);
        }
Beispiel #9
0
        // -----------------------------------------------------------------------------------------------------------------------------------------------------

        private static FewsCommon.ThresholdValue _ParseThresholdValue(XmlReader reader, List <string> currentPath, string currentLocationId, string currentParameterId)
        {
            var result = new ThresholdValue();

            result.LocationId  = currentLocationId;
            result.ParameterId = currentParameterId;
            result.ThresholdId = _getRequiredAttribute(reader, "id", currentPath);
            string thresholdStrValue = _getRequiredAttribute(reader, "value", currentPath);
            double value             = double.NaN;

            double.TryParse(thresholdStrValue, out value);
            result.Value = value;
            return(result);
        }
Beispiel #10
0
        public PlayerCharacter(string _archetype, Species _species, Value _soak, ThresholdValue _health, Defense _defense, CharacteristicSet _characteristics,
                               Equipment _equipment, Inventory _inventory, List <PAPISkill> _skillSet, List <Ability> _abilities, Career _career, CharacterAppearance _appearance,
                               GenderEnum _gender, List <GenderEnum> _genderPreferences, string _name, MotivationSet _motivationSet, List <CriticalInjury> _criticalInjuries,
                               ThresholdValue _strain, List <SkillEnum> _careerSkills) :
            base(_archetype, _species, _soak, _health, _defense, _characteristics, _equipment, _inventory, _skillSet, _abilities, _career, _appearance, _gender,
                 _genderPreferences)
        {
            this._name             = (_name == null || _name == "") ? "NOT_VALID" : _name;
            this._motivationSet    = (_motivationSet == null) ? new MotivationSet() : _motivationSet;
            this._criticalInjuries = (_criticalInjuries == null) ? new List <CriticalInjury>() : _criticalInjuries;
            this._strain           = (_strain == null) ? SpeciesHandler.GetInitialStrain(this._species._enum) : _strain;
            this._careerSkills     = (_careerSkills == null) ? new List <SkillEnum>() : _careerSkills;

            WfLogger.Log(this, LogLevel.DETAILED, "Created new PlayerCharacter " + this._name);
        }
Beispiel #11
0
        // --------------------------------------------------------------------------------------------------------------------------------

        /// <summary>
        /// Creates a copy of the given PlayerCharacter
        /// </summary>
        /// <param name="other">if null, a default Player Character is created</param>
        public PlayerCharacter(PlayerCharacter other) : this()
        {
            if (other == null)
            {
                return;
            }

            _name             = other._name;
            _motivationSet    = new MotivationSet(other._motivationSet);
            _criticalInjuries = new List <CriticalInjury>(other._criticalInjuries);
            _strain           = new ThresholdValue(other._strain);
            _careerSkills     = new List <SkillEnum>(other._careerSkills);

            WfLogger.Log(this, LogLevel.DETAILED, "Created new PlayerCharacter from another");
        }
        // --------------------------------------------------------------------------------------------------------------------------------

        /// <summary>
        /// Creates a copy of the given character
        /// </summary>
        /// <param name="other">if null, a default character is created</param>
        public PAPICharacter(PAPICharacter other) : this()
        {
            if (other == null)
            {
                return;
            }

            _archetype         = other._archetype;
            _species           = new Species(other._species);
            _soak              = new Value(other._soak);
            _health            = new ThresholdValue(other._health);
            _defense           = new Defense(other._defense);
            _characteristics   = new CharacteristicSet(other._characteristics);
            _equipment         = new Equipment(other._equipment);
            _inventory         = new Inventory(other._inventory);
            _skillSet          = new List <PAPISkill>(other._skillSet);
            _abilities         = new List <Ability>(other._abilities);
            _career            = new Career(other._career);
            _appearance        = new CharacterAppearance(other._appearance);
            _gender            = other._gender;
            _genderPreferences = new List <GenderEnum>(other._genderPreferences);

            WfLogger.Log(this, LogLevel.DETAILED, "Created new Character from another");
        }
        // --------------------------------------------------------------------------------------------------------------------------------

        /// <summary>
        /// Creates a default Nemesis
        /// </summary>
        public Nemesis() : base()
        {
            _strain = new ThresholdValue();

            WfLogger.Log(this, LogLevel.DETAILED, "Created new Nemesis from default");
        }