Esempio n. 1
0
 public PAPISkill(string _name, SkillEnum _skillEnum, SkillTypeEnum _skillTypeEnum, Value _value, CharacteristicEnum _characteristicEnum,
                  List <GenreEnum> _availableGenres, bool _isCareer)
 {
     this._skillEnum          = _skillEnum;
     this._name               = (_name == null || _name == "" || _skillEnum != SkillEnum.CUSTOM) ? ("Skill_" + _skillEnum.ToString()) : _name;
     this._skillTypeEnum      = _skillTypeEnum;
     this._value              = (_value._value <MIN_VALUE || _value._value> MAX_VALUE)? this._value = new Value(0, null) : this._value = _value;
     this._characteristicEnum = this._characteristicEnum;
     this._availableGenres    = (_availableGenres == null || _availableGenres.Count == 0) ?
                                new List <GenreEnum>(PAPIApplication.GetAllGenres()) : _availableGenres;
     this._isCareer = _isCareer;
     WfLogger.Log(this, LogLevel.DETAILED, "Skill '" + this._name + "' was created");
 }
Esempio n. 2
0
        public Ability(string _nameKey, bool _isActive, string _descriptionKey, List <GenreEnum> _availableGenres,
                       GameTimeIntervalEnum _gameTimeInterval, BookResource _bookResource, bool _isUsable)
        {
            this._nameKey         = (_nameKey == null) ? "INVALID_ABILITY" : _nameKey;
            this._isActive        = _isActive;
            this._descriptionKey  = (_descriptionKey == null) ? "INVALID_DESCRIPTION" : _descriptionKey;
            this._availableGenres = (_availableGenres == null || _availableGenres.Count == 0) ?
                                    this._availableGenres = new List <GenreEnum>(PAPIApplication.GetAllGenres()) : _availableGenres;
            this._gameTimeInterval = _gameTimeInterval;
            this._bookResource     = _bookResource;
            this._isUsable         = _isUsable;

            WfLogger.Log(this, LogLevel.DETAILED, "Ability '" + this._nameKey + "' was created");
        }
Esempio n. 3
0
        public PAPIItem(string _nameKey, uint _basePrice, uint _encumbrance, uint _rarity, ItemConditionEnum _condition, Dictionary <ItemQuality, uint> _qualities,
                        List <GenreEnum> _availableGenres, string _descriptionKey)
        {
            this._nameKey         = (_nameKey == null || _nameKey == "") ? "INVALID_ITEM" : _nameKey;
            this._basePrice       = _basePrice;
            this._encumbrance     = _encumbrance;
            this._rarity          = (_rarity > 5) ? 5 : _rarity;
            this._condition       = _condition;
            this._qualities       = (_qualities == null) ? new Dictionary <ItemQuality, uint>() : _qualities;
            this._availableGenres = (_availableGenres == null || _availableGenres.Count == 0) ?
                                    new List <GenreEnum>(PAPIApplication.GetAllGenres()) : _availableGenres;
            this._descriptionKey = (_descriptionKey == null) ? "INVALIID_DESCRIPTION" : _descriptionKey;

            WfLogger.Log(this, LogLevel.DETAILED, "PAPIItem '" + this._nameKey + "' was created");
        }
Esempio n. 4
0
        public Career(string _nameKey, List <GenreEnum> _availableGenres, List <PAPISkill> _careerSkills)
        {
            if (_nameKey == null || _nameKey == "" || _careerSkills.Count < 8)
            {
                _nameKey         = "Career_INVALID_CAREER";
                _availableGenres = new List <GenreEnum>();
                _careerSkills    = new List <PAPISkill>();
                return;
            }
            this._nameKey         = _nameKey;
            this._careerSkills    = new List <PAPISkill>(_careerSkills);
            this._availableGenres = (_availableGenres == null || _availableGenres.Count == 0) ?
                                    new List <GenreEnum>(PAPIApplication.GetAllGenres()) : new List <GenreEnum>(_availableGenres);

            WfLogger.Log(this, LogLevel.DETAILED, "Created new Career " + _nameKey);
        }
        public CriticalInjury(string _nameKey, uint _lowerBoundD100, uint _upperBoundD100, DifficultyEnum _severity, string _descriptionKey, bool _hasPermanentEffect,
                              BookResource _bookResource, List <GenreEnum> _availableGenres)
        {
            this._nameKey            = (_nameKey == null || _nameKey == "") ? "INVALID_CRITICAL_INJURY" : _nameKey;
            this._lowerBoundD100     = _lowerBoundD100;
            this._upperBoundD100     = (_upperBoundD100 < this._lowerBoundD100) ? this._lowerBoundD100 : _upperBoundD100;
            this._severity           = _severity;
            this._descriptionKey     = (_descriptionKey == null || _descriptionKey == "") ? "INVALID_DESCRIPTION" : _descriptionKey;
            this._hasPermanentEffect = _hasPermanentEffect;
            this._bookResource       = (_bookResource == null) ? new BookResource(RuleBookEnum.NO_RULE_BOOK, 0) : _bookResource;
            this._availableGenres    = (_availableGenres == null || _availableGenres.Count == 0) ? new List <GenreEnum>(PAPIApplication.GetAllGenres()) : _availableGenres;

            WfLogger.Log(this, LogLevel.DETAILED, "Created new Critical Injury " + this._nameKey);
        }
        public Motivation(MotivationTypeEnum _type, string _nameKey, string _descriptionKey, List <GenreEnum> _availableGenres)
        {
            this._type            = _type;
            this._nameKey         = (_nameKey == null || _nameKey == "") ? "INVALID_MOTIVATION" : _nameKey;
            this._descriptionKey  = (_descriptionKey == null || _descriptionKey == "") ? "INVALID_DESCRIPTION" : _descriptionKey;;
            this._availableGenres = (_availableGenres == null || _availableGenres.Count == 0) ? new List <GenreEnum>(PAPIApplication.GetAllGenres()) : _availableGenres;

            WfLogger.Log(this, LogLevel.DETAILED, "Created new Motivation " + this._type + ": " + _nameKey);
        }
Esempio n. 7
0
        public Species(SpeciesEnum _enum, string _name, List <GenreEnum> _availableGenres)
        {
            this._enum            = _enum;
            this._name            = (_name == null || _name == "" || _enum != SpeciesEnum.CUSTOM) ? EnumConverter.Convert(_enum) : _name;
            this._availableGenres = (_availableGenres == null || _availableGenres.Count == 0) ? new List <GenreEnum>(PAPIApplication.GetAllGenres()) : _availableGenres;

            WfLogger.Log(this, LogLevel.DETAILED, "Created new Species " + this._enum);
        }