Example #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());
        }
Example #2
0
        public bool IsMatchConditions(UnitParam unit_param, JobData job_data, string conditions_iname)
        {
            if (unit_param == null)
            {
                return(false);
            }
            ConceptCardConditionsParam conceptCardConditions = MonoSingleton <GameManager> .Instance.MasterParam.GetConceptCardConditions(conditions_iname);

            return(conceptCardConditions == null || conceptCardConditions.IsMatchElement(unit_param.element) && (conceptCardConditions.sex == ESex.Unknown || conceptCardConditions.sex == unit_param.sex) && (conceptCardConditions.IsMatchBirth(unit_param.birthID) && conceptCardConditions.IsMatchUnitGroup(unit_param.iname) && conceptCardConditions.IsMatchJobGroup(job_data.JobID)));
        }
Example #3
0
        public override void Refresh()
        {
            ConceptCardConditionsParam conceptCardConditions = this.Master.GetConceptCardConditions(this.mConceptCardEquipEffect.ConditionsIname);
            ArtifactParam  artifactParam = this.Master.GetArtifactParam(this.mConceptCardEquipEffect.Skin);
            UnitGroupParam unitGroup     = this.Master.GetUnitGroup(conceptCardConditions.unit_group);

            if (unitGroup.units == null || unitGroup.units.Length != 1)
            {
                return;
            }
            UnitParam unitParam = this.Master.GetUnitParam(unitGroup.units[0]);

            this.mCardNextSkinDesc.set_text(LocalizedText.Get("sys.CONCEPT_CARD_SKIN_DESCRIPTION", (object)unitParam.name, (object)artifactParam.name));
            this.LoadImage(AssetPath.UnitSkinIconSmall(unitParam, artifactParam, (string)null), this.mCardSkinIcon);
        }
Example #4
0
        public JobParam[] GetConditionJob()
        {
            ConceptCardConditionsParam condition = this.GetCondition();

            if (condition == null)
            {
                return((JobParam[])null);
            }
            JobGroupParam jobGroupParam = condition.GetJobGroupParam();

            if (jobGroupParam == null || jobGroupParam.jobs == null)
            {
                return((JobParam[])null);
            }
            List <JobParam> jobParamList = new List <JobParam>();

            for (int index = 0; index < jobGroupParam.jobs.Length; ++index)
            {
                jobParamList.Add(MonoSingleton <GameManager> .Instance.MasterParam.GetJobParam(jobGroupParam.jobs[index]));
            }
            return(jobParamList.ToArray());
        }
Example #5
0
        public UnitParam[] GetConditionUnit()
        {
            ConceptCardConditionsParam condition = this.GetCondition();

            if (condition == null)
            {
                return((UnitParam[])null);
            }
            UnitGroupParam unitGroupParam = condition.GetUnitGroupParam();

            if (unitGroupParam == null || unitGroupParam.units == null)
            {
                return((UnitParam[])null);
            }
            List <UnitParam> unitParamList = new List <UnitParam>();

            for (int index = 0; index < unitGroupParam.units.Length; ++index)
            {
                unitParamList.Add(MonoSingleton <GameManager> .Instance.MasterParam.GetUnitParam(unitGroupParam.units[index]));
            }
            return(unitParamList.ToArray());
        }