Beispiel #1
0
        public void Charakter_getTalentList_byType_TypenotExist()
        {
            Charakter charakter = new Charakter();

            InterfaceTalent        TalentRange = new TalentRange("RangeTalent", "BE", new List <TalentDeviate>(), DSA_ADVANCEDVALUES.ATTACKE_BASIS, true);
            List <InterfaceTalent> list        = charakter.getTalentList_TalentType(TalentRange);

            Assert.AreEqual(0, list.Count);
        }
Beispiel #2
0
        private static ITalent CreateTalent(string contentType, Guid guid = new Guid(), List <CharakterAttribut> probe = null, int orginalPos = -1)
        {
            ITalent talent = null;

            contentType = contentType.Trim();

            if (guid == new Guid() || guid == null)
            {
                guid = guid.GenerateNextGuid(talentGuids);
                talentGuids.Add(guid);
            }

            if (contentType == nameof(TalentWeaponless))
            {
                talent = new TalentWeaponless(guid);
            }
            else if (contentType == nameof(TalentClose))
            {
                talent = new TalentClose(guid);
            }
            else if (contentType == nameof(TalentRange))
            {
                talent = new TalentRange(guid);
            }
            else if (contentType == nameof(TalentCrafting))
            {
                talent = new TalentCrafting(guid, probe);
            }
            else if (contentType == nameof(TalentKnowldage))
            {
                talent = new TalentKnowldage(guid, probe);
            }
            else if (contentType == nameof(TalentNature))
            {
                talent = new TalentNature(guid, probe);
            }
            else if (contentType == nameof(TalentPhysical))
            {
                talent = new TalentPhysical(guid, probe);
            }
            else if (contentType == nameof(TalentSocial))
            {
                talent = new TalentSocial(guid, probe);
            }
            else if (contentType == nameof(TalentSpeaking) || contentType == "TalentLanguage")
            {
                //TalentLanguage ist ein Relikt das aber vorhanden sein muss damit man alte Save dateien Laden kann
                talent = new TalentSpeaking(guid);
            }
            else if (contentType == nameof(TalentWriting))
            {
                talent = new TalentWriting(guid);
            }
            else
            {
                throw new TalentException(
                          error: ErrorCode.Error,
                          message: Resources.ErrorUnknownTalentType);
            }
            talent.OrginalPosition = orginalPos;
            return(talent);
        }
Beispiel #3
0
        public void Charakter_getTalent_byTypeandNumber_TalentnotExistTypeNotexist()
        {
            InterfaceTalent knowldageTalent_type = new TalentRange("RangeTalent", "BE", new List <TalentDeviate>(), DSA_ADVANCEDVALUES.ATTACKE_BASIS, true);

            Assert.AreNotEqual(knowldageTalent_type, charakter.getTalent(knowldageTalent_type, 10));
        }