示例#1
0
    // cInfo : 현재 주인공이 차고 있는 템. 인벤에 있는 템을 미리보기했을때 현재 착용하고 있는 템과의 비교를 해주기 위한 데이터다.

    void setStatLine(int transcendATTR, GameIDData descriptionData, int headerIndex, HeroPartsData hpd, GameIDData cInfo, int valueTypeIndex, string name, string format, bool useRound = true, string lastWord = "", int usePointNumLimit = -1)
    {
        GameValueType.Type valueType = hpd.valueTypeDic[valueTypeIndex];
        Xfloat[]           value     = hpd.getArrayValueByIndex(valueTypeIndex);

        int len = value.Length;

        if (len > 0 && value[0] > 0)
        {
            if (_statHeader[headerIndex] == false)
            {
                _statHeader[headerIndex] = true;
//				setStatHeader(headerIndex);
            }

            // 스탯 이름.
            sb1.Append("[fcd4a3]");
            sb1.Append(name);
            sb1.Append("[-]\n");

            // 현재 장비 스탯 정보.
            float defaultValue = GameValueType.getPartsApplyValue(value, valueType, descriptionData.reinforceLevel);

            if (descriptionData.totalPLevel > 0)
            {
                defaultValue = descriptionData.getTranscendValueByATTR(defaultValue, transcendATTR);
            }

            if (useRound)
            {
                defaultValue = Mathf.CeilToInt(defaultValue - 0.4f);
            }
            if (usePointNumLimit > -1 && defaultValue >= usePointNumLimit)
            {
                format = "{0:0}";
            }

            sb2.Append("[ffffff]");
            sb2.Append(string.Format(format, defaultValue));
            sb2.Append(lastWord + "[-]");

            // 강화 했을때 수치 변화를 알려주기 위한 녀석이다.
            if (_compareData != null)
            {
                Xfloat[] rValue        = _compareData.partsData.getArrayValueByIndex(valueTypeIndex);
                float    rDefaultValue = GameValueType.getPartsApplyValue(rValue, valueType, _compareData.reinforceLevel);

                if (_compareData.totalPLevel > 0)
                {
                    rDefaultValue = _compareData.getTranscendValueByATTR(rDefaultValue, transcendATTR);
                }

                if (useRound)
                {
                    rDefaultValue = Mathf.CeilToInt(rDefaultValue - 0.4f);
                }
                rDefaultValue = defaultValue - rDefaultValue;

                if (rDefaultValue > 0)
                {
                    sb2.Append("[ffe400] (↑");
                    sb2.Append(string.Format(format, rDefaultValue));
                    sb2.Append(lastWord + ")");
                }
                else if (rDefaultValue < 0)
                {
                    sb2.Append("[be1010] (↓");
                    sb2.Append(string.Format(format, rDefaultValue));
                    sb2.Append(lastWord + ")");
                }
            }

            // 비교할 스탯 정보.
            if (cInfo != null)
            {
                Xfloat[] cValue        = cInfo.partsData.getArrayValueByIndex(valueTypeIndex);
                float    cDefaultValue = GameValueType.getPartsApplyValue(cValue, valueType, cInfo.reinforceLevel);

                if (cInfo.totalPLevel > 0)
                {
                    cDefaultValue = cInfo.getTranscendValueByATTR(cDefaultValue, transcendATTR);
                }

                if (useRound)
                {
                    cDefaultValue = Mathf.CeilToInt(cDefaultValue - 0.4f);
                }
                cDefaultValue = defaultValue - cDefaultValue;

                if (cDefaultValue > 0)
                {
                    sb3.Append("[74f344]+");
                    sb3.Append(string.Format(format, cDefaultValue));
                    sb3.Append(lastWord);
                }
                else if (cDefaultValue < 0)
                {
                    sb3.Append("[f1290f]");
                    sb3.Append(string.Format(format, cDefaultValue));
                    sb3.Append(lastWord);
                }
            }

            sb2.Append("\n");
            sb3.Append("\n");
            sb4.Append("\n");

            if (name.Contains("\n"))
            {
                sb2.Append("\n");
                sb3.Append("\n");
                sb4.Append("\n");
            }
        }
    }
示例#2
0
    public void setDataToCharacter(Monster cha, GameIDData infoData)
    {
        int reinforcement = infoData.reinforceLevel;
        int rare          = infoData.rare;

        if (infoData.totalPLevel > 0)
        {
            cha.maxHp += Mathf.CeilToInt(infoData.getTranscendValueByATTR(GameValueType.getPartsApplyValue(hpMax, valueTypeDic[BaseHeroPartsDataInfo.INDEX_HP_MAX], reinforcement), WSATTR.HPMAX_I) - 0.4f);
            cha.hp    += Mathf.CeilToInt(infoData.getTranscendValueByATTR(GameValueType.getPartsApplyValue(hpMax, valueTypeDic[BaseHeroPartsDataInfo.INDEX_HP_MAX], reinforcement), WSATTR.HPMAX_I) - 0.4f);

            cha.maxSp += infoData.getTranscendValueByATTR(GameValueType.getPartsApplyValue(spMax, valueTypeDic[BaseHeroPartsDataInfo.INDEX_SP_MAX], reinforcement), WSATTR.SPMAX_I);

            cha.sp += infoData.getTranscendValueByATTR(GameValueType.getPartsApplyValue(spMax, valueTypeDic[BaseHeroPartsDataInfo.INDEX_SP_MAX], reinforcement), WSATTR.SPMAX_I);

            cha.stat.spRecovery += infoData.getTranscendValueByATTR(GameValueType.getPartsApplyValue(spRecovery, valueTypeDic[BaseHeroPartsDataInfo.INDEX_SP_RECOVERY], reinforcement), WSATTR.SP_RECOVERY_I);

            cha.maxMp += infoData.getTranscendValueByATTR(GameValueType.getPartsApplyValue(mpMax, valueTypeDic[BaseHeroPartsDataInfo.INDEX_MP_MAX], reinforcement), WSATTR.MPMAX_I);

            cha.stat.mpRecovery += infoData.getTranscendValueByATTR(GameValueType.getPartsApplyValue(mpRecovery, valueTypeDic[BaseHeroPartsDataInfo.INDEX_MP_RECOVERY], reinforcement), WSATTR.MP_RECOVERY_I);

            cha.mp += infoData.getTranscendValueByATTR(GameValueType.getPartsApplyValue(mpMax, valueTypeDic[BaseHeroPartsDataInfo.INDEX_MP_MAX], reinforcement), WSATTR.MPMAX_I);

            cha.stat.atkPhysic += infoData.getTranscendValueByATTR(GameValueType.getPartsApplyValue(atkPhysic, valueTypeDic[BaseHeroPartsDataInfo.INDEX_ATK_PHYSIC], reinforcement), WSATTR.ATK_PHYSIC_I);

            cha.stat.atkMagic += infoData.getTranscendValueByATTR(GameValueType.getPartsApplyValue(atkMagic, valueTypeDic[BaseHeroPartsDataInfo.INDEX_ATK_MAGIC], reinforcement), WSATTR.ATK_MAGIC_I);

            cha.stat.defPhysic += infoData.getTranscendValueByATTR(GameValueType.getPartsApplyValue(defPhysic, valueTypeDic[BaseHeroPartsDataInfo.INDEX_DEF_PHYSIC], reinforcement), WSATTR.DEF_PHYSIC_I);

            cha.stat.defMagic += infoData.getTranscendValueByATTR(GameValueType.getPartsApplyValue(defMagic, valueTypeDic[BaseHeroPartsDataInfo.INDEX_DEF_MAGIC], reinforcement), WSATTR.DEF_MAGIC_I);

            IFloat tempS  = GameValueType.getPartsApplyValue(speed, valueTypeDic[BaseHeroPartsDataInfo.INDEX_SPEED], reinforcement);
            IFloat tSpeed = infoData.getTranscendValueByATTR(tempS, WSATTR.SPEED_I);

            if (tempS > 0)
            {
                cha.stat.originalAtkSpeedRate = cha.stat.originalAtkSpeedRate * cha.stat.changeAnimationSpeed(tSpeed, tempS);
                cha.stat.speed += tSpeed;
            }

            /*
             * nowSummonSpPercent = infoData.getTranscendValueByATTR(GameValueType.getPartsApplyValue(summonSpPercent,valueTypeDic[BaseHeroPartsDataInfo.INDEX_SUMMON_SP_PERCENT],reinforcement) * 0.01f, WSATTR.SUMMON_SP_PER_I);
             * cha.stat.summonSpPercent += nowSummonSpPercent;
             *
             * nowUnitHpUp = infoData.getTranscendValueByATTR(GameValueType.getPartsApplyValue(unitHpUp,valueTypeDic[BaseHeroPartsDataInfo.INDEX_UNIT_HP_UP],reinforcement) * 0.01f, WSATTR.UNIT_HP_UP_I);
             * cha.stat.unitHpUp += nowUnitHpUp;
             *
             * nowUnitDefUp = infoData.getTranscendValueByATTR(GameValueType.getPartsApplyValue(unitDefUp,valueTypeDic[BaseHeroPartsDataInfo.INDEX_UNIT_DEF_UP],reinforcement) * 0.01f, WSATTR.UNIT_DEF_UP_I);
             * cha.stat.unitDefUp += nowUnitDefUp;
             *
             * nowSkillSpDiscount = infoData.getTranscendValueByATTR(GameValueType.getPartsApplyValue(skillSpDiscount,valueTypeDic[BaseHeroPartsDataInfo.INDEX_SKILL_SP_DISCOUNT],reinforcement) * 0.01f, WSATTR.SKILL_SP_DISCOUNT_I);
             * cha.stat.skillMpDiscount += nowSkillSpDiscount;
             *
             * nowSkillAtkUp = infoData.getTranscendValueByATTR(GameValueType.getPartsApplyValue(skillAtkUp,valueTypeDic[BaseHeroPartsDataInfo.INDEX_SKILL_ATK_UP],reinforcement) * 0.01f, WSATTR.SKILL_ATK_UP_I);
             * cha.stat.skillAtkUp += nowSkillAtkUp;
             *
             * nowSkillUp = infoData.getTranscendValueByATTR(GameValueType.getPartsApplyValue(skillUp,valueTypeDic[BaseHeroPartsDataInfo.INDEX_SKILL_UP],reinforcement) * 0.01f, WSATTR.SKILL_UP_I);
             * cha.stat.skillUp += nowSkillUp;
             *
             * nowSkillTimeUp = infoData.getTranscendValueByATTR(GameValueType.getPartsApplyValue(skillTimeUp,valueTypeDic[BaseHeroPartsDataInfo.INDEX_SKILL_TIME_UP],reinforcement) * 0.01f, WSATTR.SKILL_TIME_UP_I);
             * cha.stat.skillTimeUp += nowSkillTimeUp;
             */


            nowSummonSpPercent        = infoData.getTranscendValueByATTR(GameValueType.getPartsApplyValue(summonSpPercent, valueTypeDic[BaseHeroPartsDataInfo.INDEX_SUMMON_SP_PERCENT], reinforcement), WSATTR.SUMMON_SP_PER_I) * 0.01f;
            cha.stat.summonSpPercent += nowSummonSpPercent;

            nowUnitHpUp        = infoData.getTranscendValueByATTR(GameValueType.getPartsApplyValue(unitHpUp, valueTypeDic[BaseHeroPartsDataInfo.INDEX_UNIT_HP_UP], reinforcement), WSATTR.UNIT_HP_UP_I) * 0.01f;
            cha.stat.unitHpUp += nowUnitHpUp;

            nowUnitDefUp        = infoData.getTranscendValueByATTR(GameValueType.getPartsApplyValue(unitDefUp, valueTypeDic[BaseHeroPartsDataInfo.INDEX_UNIT_DEF_UP], reinforcement), WSATTR.UNIT_DEF_UP_I) * 0.01f;
            cha.stat.unitDefUp += nowUnitDefUp;

            nowSkillSpDiscount        = infoData.getTranscendValueByATTR(GameValueType.getPartsApplyValue(skillSpDiscount, valueTypeDic[BaseHeroPartsDataInfo.INDEX_SKILL_SP_DISCOUNT], reinforcement), WSATTR.SKILL_SP_DISCOUNT_I) * 0.01f;
            cha.stat.skillMpDiscount += nowSkillSpDiscount;

            nowSkillAtkUp        = infoData.getTranscendValueByATTR(GameValueType.getPartsApplyValue(skillAtkUp, valueTypeDic[BaseHeroPartsDataInfo.INDEX_SKILL_ATK_UP], reinforcement), WSATTR.SKILL_ATK_UP_I) * 0.01f;
            cha.stat.skillAtkUp += nowSkillAtkUp;

            nowSkillUp        = infoData.getTranscendValueByATTR(GameValueType.getPartsApplyValue(skillUp, valueTypeDic[BaseHeroPartsDataInfo.INDEX_SKILL_UP], reinforcement), WSATTR.SKILL_UP_I) * 0.01f;
            cha.stat.skillUp += nowSkillUp;

            nowSkillTimeUp        = infoData.getTranscendValueByATTR(GameValueType.getPartsApplyValue(skillTimeUp, valueTypeDic[BaseHeroPartsDataInfo.INDEX_SKILL_TIME_UP], reinforcement), WSATTR.SKILL_TIME_UP_I) * 0.01f;
            cha.stat.skillTimeUp += nowSkillTimeUp;



            IFloat tempAtkSpeed = GameValueType.getPartsApplyValue(atkSpeed, valueTypeDic[BaseHeroPartsDataInfo.INDEX_ATK_SPEED], reinforcement);

            if (tempAtkSpeed > 0)
            {
                IFloat tAtkSpeed = infoData.getTranscendValueByATTR(tempAtkSpeed, WSATTR.ATK_SPEED_I);
                cha.stat.originalAtkSpeedRate = cha.stat.originalAtkSpeedRate * cha.stat.changeAnimationSpeed(tAtkSpeed, tempAtkSpeed);

                cha.stat.atkSpeed += tAtkSpeed;
                cha.stat.atkSpeed  = MathUtil.Round(cha.stat.atkSpeed * 100.0f) * 0.01f;
            }

            cha.stat.atkRange = infoData.getTranscendValueByATTR(atkRange, WSATTR.ATK_RANGE_I);
        }
        else
        {
            cha.maxHp += Mathf.CeilToInt(GameValueType.getPartsApplyValue(hpMax, valueTypeDic[BaseHeroPartsDataInfo.INDEX_HP_MAX], reinforcement) - 0.4f);
            cha.hp    += Mathf.CeilToInt(GameValueType.getPartsApplyValue(hpMax, valueTypeDic[BaseHeroPartsDataInfo.INDEX_HP_MAX], reinforcement) - 0.4f);

            cha.maxSp += GameValueType.getPartsApplyValue(spMax, valueTypeDic[BaseHeroPartsDataInfo.INDEX_SP_MAX], reinforcement);

            cha.sp += GameValueType.getPartsApplyValue(spMax, valueTypeDic[BaseHeroPartsDataInfo.INDEX_SP_MAX], reinforcement);

            cha.stat.spRecovery += GameValueType.getPartsApplyValue(spRecovery, valueTypeDic[BaseHeroPartsDataInfo.INDEX_SP_RECOVERY], reinforcement);

            cha.maxMp += GameValueType.getPartsApplyValue(mpMax, valueTypeDic[BaseHeroPartsDataInfo.INDEX_MP_MAX], reinforcement);

            cha.stat.mpRecovery += GameValueType.getPartsApplyValue(mpRecovery, valueTypeDic[BaseHeroPartsDataInfo.INDEX_MP_RECOVERY], reinforcement);

            cha.mp += GameValueType.getPartsApplyValue(mpMax, valueTypeDic[BaseHeroPartsDataInfo.INDEX_MP_MAX], reinforcement);

            cha.stat.atkPhysic += GameValueType.getPartsApplyValue(atkPhysic, valueTypeDic[BaseHeroPartsDataInfo.INDEX_ATK_PHYSIC], reinforcement);

            cha.stat.atkMagic += GameValueType.getPartsApplyValue(atkMagic, valueTypeDic[BaseHeroPartsDataInfo.INDEX_ATK_MAGIC], reinforcement);

            cha.stat.defPhysic += GameValueType.getPartsApplyValue(defPhysic, valueTypeDic[BaseHeroPartsDataInfo.INDEX_DEF_PHYSIC], reinforcement);

            cha.stat.defMagic += GameValueType.getPartsApplyValue(defMagic, valueTypeDic[BaseHeroPartsDataInfo.INDEX_DEF_MAGIC], reinforcement);

            cha.stat.speed += GameValueType.getPartsApplyValue(speed, valueTypeDic[BaseHeroPartsDataInfo.INDEX_SPEED], reinforcement);

            nowSummonSpPercent        = GameValueType.getPartsApplyValue(summonSpPercent, valueTypeDic[BaseHeroPartsDataInfo.INDEX_SUMMON_SP_PERCENT], reinforcement) * 0.01f;
            cha.stat.summonSpPercent += nowSummonSpPercent;

            nowUnitHpUp        = GameValueType.getPartsApplyValue(unitHpUp, valueTypeDic[BaseHeroPartsDataInfo.INDEX_UNIT_HP_UP], reinforcement) * 0.01f;
            cha.stat.unitHpUp += nowUnitHpUp;

            nowUnitDefUp        = GameValueType.getPartsApplyValue(unitDefUp, valueTypeDic[BaseHeroPartsDataInfo.INDEX_UNIT_DEF_UP], reinforcement) * 0.01f;
            cha.stat.unitDefUp += nowUnitDefUp;

            nowSkillSpDiscount        = GameValueType.getPartsApplyValue(skillSpDiscount, valueTypeDic[BaseHeroPartsDataInfo.INDEX_SKILL_SP_DISCOUNT], reinforcement) * 0.01f;
            cha.stat.skillMpDiscount += nowSkillSpDiscount;

            nowSkillAtkUp        = GameValueType.getPartsApplyValue(skillAtkUp, valueTypeDic[BaseHeroPartsDataInfo.INDEX_SKILL_ATK_UP], reinforcement) * 0.01f;
            cha.stat.skillAtkUp += nowSkillAtkUp;

            nowSkillUp        = GameValueType.getPartsApplyValue(skillUp, valueTypeDic[BaseHeroPartsDataInfo.INDEX_SKILL_UP], reinforcement) * 0.01f;
            cha.stat.skillUp += nowSkillUp;

            nowSkillTimeUp        = GameValueType.getPartsApplyValue(skillTimeUp, valueTypeDic[BaseHeroPartsDataInfo.INDEX_SKILL_TIME_UP], reinforcement) * 0.01f;
            cha.stat.skillTimeUp += nowSkillTimeUp;

            cha.stat.atkSpeed += GameValueType.getPartsApplyValue(atkSpeed, valueTypeDic[BaseHeroPartsDataInfo.INDEX_ATK_SPEED], reinforcement);
            cha.stat.atkSpeed  = MathUtil.Round(cha.stat.atkSpeed * 100.0f) * 0.01f;

            cha.stat.atkRange = atkRange;
        }
    }