Пример #1
0
        public string GetBufText(BuffEffect effect, BuffEffect.BuffTarget target)
        {
            MasterParam   masterParam   = MonoSingleton <GameManager> .Instance.MasterParam;
            StringBuilder stringBuilder = new StringBuilder();
            ConceptCardConditionsParam conceptCardConditions = masterParam.GetConceptCardConditions(this.ConditionsIname);

            stringBuilder.Append(conceptCardConditions.GetConditionDescriptionEquip());
            UnitGroupParam unitGroup = masterParam.GetUnitGroup(effect.param.un_group);

            if (unitGroup != null)
            {
                stringBuilder.Append(unitGroup.GetName());
            }
            stringBuilder.Append(LocalizedText.Get("sys.CONCEPT_CARD_SKILL_DESCRIPTION_OF"));
            string str = LocalizedText.Get("sys." + target.paramType.ToString());

            stringBuilder.Append(str);
            bool   flag  = 0 <= (int)target.value;
            int    num   = Mathf.Abs((int)target.value);
            string empty = string.Empty;

            switch (target.calcType)
            {
            case SkillParamCalcTypes.Add:
                if (flag)
                {
                    empty = LocalizedText.Get("sys.CONCEPT_CARD_SKILL_DESCRIPTION_CALC_ADD_PLUS", new object[1]
                    {
                        (object)num.ToString()
                    });
                    break;
                }
                empty = LocalizedText.Get("sys.CONCEPT_CARD_SKILL_DESCRIPTION_CALC_ADD_MINUS", new object[1]
                {
                    (object)num.ToString()
                });
                break;

            case SkillParamCalcTypes.Scale:
                if (flag)
                {
                    empty = LocalizedText.Get("sys.CONCEPT_CARD_SKILL_DESCRIPTION_CALC_UP", new object[1]
                    {
                        (object)num.ToString()
                    });
                    break;
                }
                empty = LocalizedText.Get("sys.CONCEPT_CARD_SKILL_DESCRIPTION_CALC_DOWN", new object[1]
                {
                    (object)num.ToString()
                });
                break;
            }
            stringBuilder.Append(empty);
            return(stringBuilder.ToString());
        }
Пример #2
0
        public string GetConditionDescription()
        {
            List <string> stringList  = new List <string>();
            MasterParam   masterParam = MonoSingleton <GameManager> .Instance.MasterParam;

            if (this.birth_id != null && this.birth_id.Length > 0)
            {
                stringList.Add(LocalizedText.Get("sys.CONCEPT_CARD_SKILL_DESCRIPTION_BIRTH"));
                bool flag = false;
                for (int index = 0; index < this.birth_id.Length; ++index)
                {
                    if (flag)
                    {
                        stringList.Add(LocalizedText.Get("sys.CONCEPT_CARD_SKILL_DESCRIPTION_OR"));
                    }
                    string birthplaceName = UnitParam.GetBirthplaceName(this.birth_id[index]);
                    stringList.Add(birthplaceName);
                    flag = true;
                }
                stringList.Add(LocalizedText.Get("sys.CONCEPT_CARD_SKILL_DESCRIPTION_OF"));
            }
            UnitGroupParam unitGroup = masterParam.GetUnitGroup(this.unit_group);

            if (unitGroup != null)
            {
                stringList.Add(unitGroup.GetName());
                stringList.Add(LocalizedText.Get("sys.CONCEPT_CARD_SKILL_DESCRIPTION_OF"));
            }
            List <EElement> eelementList = new List <EElement>((IEnumerable <EElement>) this.conditions_elements.Keys);

            if (this.element_sum > 0)
            {
                bool flag = false;
                for (int index = 0; index < eelementList.Count; ++index)
                {
                    if (this.conditions_elements[eelementList[index]] == 1)
                    {
                        if (flag)
                        {
                            stringList.Add(LocalizedText.Get("sys.CONCEPT_CARD_SKILL_DESCRIPTION_OR"));
                        }
                        EElement eelement = eelementList[index];
                        stringList.Add(LocalizedText.Get("sys.UNIT_ELEMENT_" + (object)eelement));
                        stringList.Add(LocalizedText.Get("sys.CONCEPT_CARD_SKILL_DESCRIPTION_ELEMENT"));
                        flag = true;
                    }
                }
                stringList.Add(LocalizedText.Get("sys.CONCEPT_CARD_SKILL_DESCRIPTION_OF"));
            }
            if (this.sex != ESex.Unknown)
            {
                stringList.Add(LocalizedText.Get("sys.SEX_" + (object)this.sex));
                stringList.Add(LocalizedText.Get("sys.CONCEPT_CARD_SKILL_DESCRIPTION_OF"));
            }
            JobGroupParam jobGroup = masterParam.GetJobGroup(this.job_group);

            if (jobGroup != null)
            {
                bool flag = false;
                for (int index = 0; index < jobGroup.jobs.Length; ++index)
                {
                    if (flag)
                    {
                        stringList.Add(LocalizedText.Get("sys.CONCEPT_CARD_SKILL_DESCRIPTION_OR"));
                    }
                    string   job      = jobGroup.jobs[index];
                    JobParam jobParam = masterParam.GetJobParam(job);
                    stringList.Add(jobParam.name);
                    flag = true;
                }
                stringList.Add(LocalizedText.Get("sys.CONCEPT_CARD_SKILL_DESCRIPTION_OF"));
            }
            stringList.RemoveAt(stringList.Count - 1);
            return(string.Join(string.Empty, stringList.ToArray()));
        }