Exemplo n.º 1
0
    //----------------------------------------------------------------------------

    /*!
     *          @brief			種族ID->種族ゲームテキストキー
     *          @param[in]		int		(kind)		種族ID
     *          @return			string	[対応したゲームテキストキー]
     */
    //----------------------------------------------------------------------------
    static public string GetKindToTextKey(MasterDataDefineLabel.KindType kind)
    {
        string strRaceMsgKey = "KIND_HUMAN";

        switch (kind)
        {
        case MasterDataDefineLabel.KindType.HUMAN: strRaceMsgKey = "KIND_HUMAN"; break;

        case MasterDataDefineLabel.KindType.DRAGON: strRaceMsgKey = "KIND_DRAGON"; break;

        case MasterDataDefineLabel.KindType.GOD: strRaceMsgKey = "KIND_GOD"; break;

        case MasterDataDefineLabel.KindType.DEMON: strRaceMsgKey = "KIND_DEMON"; break;

        case MasterDataDefineLabel.KindType.CREATURE: strRaceMsgKey = "KIND_CREATURE"; break;

        case MasterDataDefineLabel.KindType.BEAST: strRaceMsgKey = "KIND_BEAST"; break;

        case MasterDataDefineLabel.KindType.MACHINE: strRaceMsgKey = "KIND_MACHINE"; break;

        case MasterDataDefineLabel.KindType.EGG: strRaceMsgKey = "KIND_EGG"; break;

        default: Debug.LogError("Unit Kind Error!: kind:" + kind); break;
        }
        return(strRaceMsgKey);
    }
Exemplo n.º 2
0
    public void Copy(UnitGridParam _data)
    {
        unit_id   = _data.unit_id;
        unique_id = _data.unique_id;

        party_assign = _data.party_assign;
        favorite     = _data.favorite;
        evolve       = _data.evolve;

        get_time     = _data.get_time;
        draw_id      = _data.draw_id;
        level        = _data.level;
        hp           = _data.hp;
        pow          = _data.pow;
        plus         = _data.plus;
        cost         = _data.cost;
        rare         = _data.rare;
        element      = _data.element;
        kind         = _data.kind;
        sub_kind     = _data.sub_kind;
        limitover_lv = _data.limitover_lv;
        charm        = _data.charm;

        unit   = _data.unit;
        master = _data.master;
    }
Exemplo n.º 3
0
    //----------------------------------------------------------------------------

    /*!
     *  @brief  種族のソート順補正
     */
    //----------------------------------------------------------------------------
    static public byte GetSortNumKind(MasterDataDefineLabel.KindType nKind)
    {
        switch (nKind)
        {
        case MasterDataDefineLabel.KindType.NONE: return(0);     // 種族タイプ: -

        case MasterDataDefineLabel.KindType.HUMAN: return(1);    // 種族タイプ:種族:人間

        case MasterDataDefineLabel.KindType.DRAGON: return(2);   // 種族タイプ:種族:ドラゴン

        case MasterDataDefineLabel.KindType.GOD: return(3);      // 種族タイプ:種族:神

        case MasterDataDefineLabel.KindType.DEMON: return(4);    // 種族タイプ:種族:魔物

        case MasterDataDefineLabel.KindType.CREATURE: return(5); // 種族タイプ:種族:妖精

        case MasterDataDefineLabel.KindType.BEAST: return(6);    // 種族タイプ:種族:獣

        case MasterDataDefineLabel.KindType.MACHINE: return(7);  // 種族タイプ:種族:機械

        case MasterDataDefineLabel.KindType.EGG: return(8);      // 種族タイプ:種族:強化合成用

        default:
#if BUILD_TYPE_DEBUG
            Debug.LogWarning("Kind NG!! - " + nKind);
#endif
            break;
        }
        return(0);
    }
Exemplo n.º 4
0
    /// <summary>
    /// ソートパラメータ設定(ユニット共通)
    /// </summary>
    /// <param name="_main"></param>
    /// <param name="_mainMaster"></param>
    /// <param name="_sub"></param>
    private void setSortParamUnit(PacketStructUnit _main, MasterDataParamChara _mainMaster, PacketStructUnit _sub)
    {
        CharaOnce baseChara = new CharaOnce();

        if (_main.link_info == (uint)ServerDataDefine.CHARALINK_TYPE.CHARALINK_TYPE_BASE &&
            _sub != null)
        {
            baseChara.CharaSetupFromParam(
                _mainMaster,
                (int)_main.level,
                (int)_main.limitbreak_lv,
                (int)_main.limitover_lv,
                (int)_main.add_pow,
                (int)_main.add_hp,
                _sub.id,
                (int)_sub.level,
                (int)_sub.add_pow,
                (int)_sub.add_hp,
                (int)_main.link_point,
                (int)_sub.limitover_lv
                );
        }
        else
        {
            baseChara.CharaSetupFromParam(
                _mainMaster,
                (int)_main.level,
                (int)_main.limitbreak_lv,
                (int)_main.limitover_lv,
                (int)_main.add_pow,
                (int)_main.add_hp,
                0,
                0,
                0,
                0,
                0,
                0
                );
        }

        draw_id = (int)_mainMaster.draw_id;
        level   = (int)_main.level;
        hp      = baseChara.m_CharaHP;
        pow     = baseChara.m_CharaPow;
        plus    = baseChara.m_CharaPlusHP + baseChara.m_CharaPlusPow;
        cost    = _mainMaster.party_cost;
        if (_main.link_info == (uint)ServerDataDefine.CHARALINK_TYPE.CHARALINK_TYPE_BASE && _sub != null)
        {
            cost += CharaLinkUtil.GetLinkUnitCost(_sub.id);
        }
        rare         = (int)_mainMaster.rare;
        element      = _mainMaster.element;
        kind         = _mainMaster.kind;
        sub_kind     = _mainMaster.sub_kind;
        limitover_lv = (int)_main.limitover_lv;
        charm        = baseChara.m_CharaCharm;
    }
    public void AddFilterSwitch(MasterDataDefineLabel.KindType kindType)
    {
        SortDialogSwitchListContext filterSwitch = new SortDialogSwitchListContext();

        filterSwitch.KindType      = kindType;
        filterSwitch.NameImage     = MainMenuUtil.GetTextKindSprite(kindType, true);
        filterSwitch.IsSelect      = CheckSelectFilter(kindType, m_SortDialog.m_SortData);
        filterSwitch.DidSelectItem = OnClickSwitch;
        FilterSwitches.Add(filterSwitch);
    }
Exemplo n.º 6
0
    /// <summary>
    /// ヘイト初期値を取得
    /// </summary>
    /// <param name="element_type">キャラの属性</param>
    /// <returns></returns>
    public int getInitialHate(MasterDataDefineLabel.ElementType element_type, MasterDataDefineLabel.KindType main_kind, MasterDataDefineLabel.KindType sub_kind)
    {
        int ret_val = 0;

        if (isEnableHate())
        {
            int element_rate = getHateRatePercent(element_type, main_kind, sub_kind);
            ret_val = m_QuestBuildBattle.hate.hate_initial * element_rate / 100;
        }

        return(ret_val);
    }
 /// <summary>
 /// フィルタの選択状態をチェック
 /// </summary>
 /// <param name="kindType"></param>
 /// <returns></returns>
 bool CheckSelectFilter(MasterDataDefineLabel.KindType kindType, LocalSaveSortInfo sortInfo)
 {
     if (sortInfo == null)
     {
         return(false);
     }
     if (sortInfo.m_FilterKinds == null || sortInfo.m_FilterKinds.Length == 0)
     {
         return(false);
     }
     return(Array.IndexOf(sortInfo.m_FilterKinds, (int)kindType) >= 0);
 }
Exemplo n.º 8
0
    //----------------------------------------------------------------------------

    /*!
     *          @brief		リンクシステム:種族ボーナス:キャラID指定
     *          @param[in]	uint	(unLinkUnitID)	リンクユニット:キャラID
     *          @param[in]	int		(nBonusRace)	ボーナス種族
     *          @param[in]	int		(nBonusType)	ボーナスタイプ
     *          @return		float	(fResult)		[+%値]
     *          @note		種族・レア度毎のボーナス値を取得	※引数でまとめて受け取った方がいいかも
     *                                  この関数自体使わないかも(現在未使用)	2015/09/14 ver300
     */
    //----------------------------------------------------------------------------
    static public float GetLinkUnitBonusRace(uint unLinkUnitID, MasterDataDefineLabel.KindType nBonusRace, CharaUtil.VALUE nBonusType)
    {
        float fResult = 0.0f;

        // キャラマスターを取得
        MasterDataParamChara cCharaMaster = BattleParam.m_MasterDataCache.useCharaParam(unLinkUnitID);

        if (cCharaMaster == null)
        {
            return(fResult);
        }

        // 種族ボーナス
        fResult = GetLinkUnitBonusRace(cCharaMaster, nBonusRace, nBonusType);

        return(fResult);
    }
Exemplo n.º 9
0
    // 種族ダメージ軽減情報を取得
    public DeclineKindDamageInfo Get_DeclineKindDamageInfo(MasterDataDefineLabel.KindType kind_type)
    {
        // 個別種族指定と全種族が同時に存在するときは個別種族指定を優先する

        {
            MasterDataSkillPassive wrk_master = this;
            while (wrk_master != null)
            {
                if (wrk_master._Is_skill_decline_dmg_kind_active() &&
                    kind_type == wrk_master.skill_decline_dmg_kind_kind
                    )
                {
                    DeclineKindDamageInfo ret_val = new DeclineKindDamageInfo();
                    ret_val.m_DamagePercent = wrk_master.skill_decline_dmg_kind_rate;
                    return(ret_val);
                }

                wrk_master = BattleParam.m_MasterDataCache.useSkillPassive((uint)wrk_master.add_fix_id);
            }
        }

        // 全種族(マスターデータに種族指定が無いものは全種族に対して効果あり)
        {
            MasterDataSkillPassive wrk_master = this;
            while (wrk_master != null)
            {
                if (wrk_master._Is_skill_decline_dmg_kind_active() &&
                    MasterDataDefineLabel.KindType.NONE == wrk_master.skill_decline_dmg_kind_kind
                    )
                {
                    DeclineKindDamageInfo ret_val = new DeclineKindDamageInfo();
                    ret_val.m_DamagePercent = wrk_master.skill_decline_dmg_kind_rate;
                    return(ret_val);
                }

                wrk_master = BattleParam.m_MasterDataCache.useSkillPassive((uint)wrk_master.add_fix_id);
            }
        }

        return(null);
    }
Exemplo n.º 10
0
    /// <summary>
    /// ソートの種族テキストを取得
    /// </summary>
    /// <param name="kindType"></param>
    /// <returns></returns>
    public static string GetSortDialogKindText(MasterDataDefineLabel.KindType kindType)
    {
        string textKey = "";

        switch (kindType)
        {
        case MasterDataDefineLabel.KindType.HUMAN:
            textKey = "filter_text35";
            break;

        case MasterDataDefineLabel.KindType.DRAGON:
            textKey = "filter_text36";
            break;

        case MasterDataDefineLabel.KindType.GOD:
            textKey = "filter_text37";
            break;

        case MasterDataDefineLabel.KindType.DEMON:
            textKey = "filter_text38";
            break;

        case MasterDataDefineLabel.KindType.CREATURE:
            textKey = "filter_text39";
            break;

        case MasterDataDefineLabel.KindType.BEAST:
            textKey = "filter_text40";
            break;

        case MasterDataDefineLabel.KindType.MACHINE:
            textKey = "filter_text41";
            break;

        case MasterDataDefineLabel.KindType.EGG:
            textKey = "filter_text42";
            break;
        }
        return(GameTextUtil.GetText(textKey));
    }
Exemplo n.º 11
0
    //----------------------------------------------------------------------------

    /*!
     *          @brief		リンクシステム:リンクユニットの種族ボーナステキスト
     *          @param[in]	uint	(unLinkUnitID)	リンクユニット:キャラマスター
     *          @return		string	(strRaceMsgKey)	[対応したゲームテキスト]
     *          @note
     */
    //----------------------------------------------------------------------------
    static public string GetLinkBonusRaceText(MasterDataParamChara cCharaMaster)
    {
        string strRaceBonus = "";

        if (cCharaMaster != null)
        {
            MasterDataDefineLabel.KindType[] anKind = new MasterDataDefineLabel.KindType[2] {
                cCharaMaster.kind,
                cCharaMaster.sub_kind
            };

            for (int num = 0; num < anKind.Length; ++num)
            {
                //--------------------------------
                // 副種族チェック
                //--------------------------------
                if (num != 0)
                {
                    if (anKind[num] <= MasterDataDefineLabel.KindType.NONE ||
                        anKind[num] >= MasterDataDefineLabel.KindType.MAX)
                    {
                        break;
                    }

                    // 改行コードを追加
                    strRaceBonus += "\r\n";
                }

                //--------------------------------
                // テキスト構築
                //--------------------------------
                strRaceBonus += GetLinkBonusRaceText(cCharaMaster, anKind[num]);
            }
        }

        return(strRaceBonus);
    }
Exemplo n.º 12
0
    /// <summary>
    /// 回復ヘイト値を取得
    /// </summary>
    /// <param name="element_type">キャラの属性</param>
    /// <param name="rank">順位(1~5)</param>
    /// <returns></returns>
    public int getHealHate(MasterDataDefineLabel.ElementType element_type, MasterDataDefineLabel.KindType main_kind, MasterDataDefineLabel.KindType sub_kind, int rank)
    {
        int ret_val = 0;

        if (isEnableHate())
        {
            int heal_hate = 0;
            switch (rank)
            {
            case 1:
                heal_hate = m_QuestBuildBattle.hate.hate_heal1;
                break;

            case 2:
                heal_hate = m_QuestBuildBattle.hate.hate_heal2;
                break;

            case 3:
                heal_hate = m_QuestBuildBattle.hate.hate_heal3;
                break;

            case 4:
                heal_hate = m_QuestBuildBattle.hate.hate_heal4;
                break;

            case 5:
                heal_hate = m_QuestBuildBattle.hate.hate_heal5;
                break;
            }

            int element_rate = getHateRatePercent(element_type, main_kind, sub_kind);

            ret_val = heal_hate * element_rate / 100;
        }

        return(ret_val);
    }
Exemplo n.º 13
0
    /// <summary>
    /// 与ダメージヘイト値を取得
    /// </summary>
    /// <param name="element_type">キャラの属性</param>
    /// <param name="rank">順位(1~5)</param>
    /// <returns></returns>
    public int getGivenDamageHate(MasterDataDefineLabel.ElementType element_type, MasterDataDefineLabel.KindType main_kind, MasterDataDefineLabel.KindType sub_kind, int rank)
    {
        int ret_val = 0;

        if (isEnableHate())
        {
            int damage_hate = 0;
            switch (rank)
            {
            case 1:
                damage_hate = m_QuestBuildBattle.hate.hate_given_damage1;
                break;

            case 2:
                damage_hate = m_QuestBuildBattle.hate.hate_given_damage2;
                break;

            case 3:
                damage_hate = m_QuestBuildBattle.hate.hate_given_damage3;
                break;

            case 4:
                damage_hate = m_QuestBuildBattle.hate.hate_given_damage4;
                break;

            case 5:
                damage_hate = m_QuestBuildBattle.hate.hate_given_damage5;
                break;
            }

            int element_rate = getHateRatePercent(element_type, main_kind, sub_kind);
            ret_val = damage_hate * element_rate / 100;
        }

        return(ret_val);
    }
Exemplo n.º 14
0
    private int getHateRatePercent(MasterDataDefineLabel.ElementType element_type, MasterDataDefineLabel.KindType main_kind, MasterDataDefineLabel.KindType sub_kind)
    {
        int ret_val = 100;

        if (isEnableHate())
        {
            int element_percent   = 100;
            int main_kind_percent = 100;
            int sub_kind_percent  = 100;

            switch (element_type)
            {
            case MasterDataDefineLabel.ElementType.FIRE:
                element_percent = m_QuestBuildBattle.hate.hate_rate_fire;
                break;

            case MasterDataDefineLabel.ElementType.WATER:
                element_percent = m_QuestBuildBattle.hate.hate_rate_water;
                break;

            case MasterDataDefineLabel.ElementType.WIND:
                element_percent = m_QuestBuildBattle.hate.hate_rate_wind;
                break;

            case MasterDataDefineLabel.ElementType.LIGHT:
                element_percent = m_QuestBuildBattle.hate.hate_rate_light;
                break;

            case MasterDataDefineLabel.ElementType.DARK:
                element_percent = m_QuestBuildBattle.hate.hate_rate_dark;
                break;

            case MasterDataDefineLabel.ElementType.NAUGHT:
                element_percent = m_QuestBuildBattle.hate.hate_rate_naught;
                break;

            default:
                break;
            }

            for (int idx = 0; idx < 2; idx++)
            {
                MasterDataDefineLabel.KindType wrk_kind = MasterDataDefineLabel.KindType.NONE;
                switch (idx)
                {
                case 0:
                    wrk_kind = main_kind;
                    break;

                case 1:
                    wrk_kind = sub_kind;
                    break;
                }

                int wrk_kind_percent = 100;
                switch (wrk_kind)
                {
                case MasterDataDefineLabel.KindType.HUMAN:
                    wrk_kind_percent = m_QuestBuildBattle.hate.hate_rate_race1;
                    break;

                case MasterDataDefineLabel.KindType.DRAGON:
                    wrk_kind_percent = m_QuestBuildBattle.hate.hate_rate_race1;
                    break;

                case MasterDataDefineLabel.KindType.GOD:
                    wrk_kind_percent = m_QuestBuildBattle.hate.hate_rate_race1;
                    break;

                case MasterDataDefineLabel.KindType.DEMON:
                    wrk_kind_percent = m_QuestBuildBattle.hate.hate_rate_race1;
                    break;

                case MasterDataDefineLabel.KindType.CREATURE:
                    wrk_kind_percent = m_QuestBuildBattle.hate.hate_rate_race1;
                    break;

                case MasterDataDefineLabel.KindType.BEAST:
                    wrk_kind_percent = m_QuestBuildBattle.hate.hate_rate_race1;
                    break;

                case MasterDataDefineLabel.KindType.MACHINE:
                    wrk_kind_percent = m_QuestBuildBattle.hate.hate_rate_race1;
                    break;

                case MasterDataDefineLabel.KindType.EGG:
                    wrk_kind_percent = m_QuestBuildBattle.hate.hate_rate_race1;
                    break;

                default:
                    break;
                }

                switch (idx)
                {
                case 0:
                    main_kind_percent = wrk_kind_percent;
                    break;

                case 1:
                    sub_kind_percent = wrk_kind_percent;
                    break;
                }
            }

            if (sub_kind == MasterDataDefineLabel.KindType.NONE)
            {
                ret_val = element_percent * main_kind_percent / 100;
            }
            else
            {
                // サブ種族があるキャラは種族の倍率はメインとサブの平均
                ret_val = element_percent * (main_kind_percent + sub_kind_percent) / 2 / 100;
            }
        }

        return(ret_val);
    }
Exemplo n.º 15
0
    //----------------------------------------------------------------------------

    /*!
     *          @brief		リンクシステム:リンクユニットの種族ボーナステキスト
     *          @param[in]	uint	(unLinkUnitID)	リンクユニット:キャラマスター
     *          @param[in]	int		(nBonusRace)	ボーナス種族
     *          @return		string	(strRaceMsgKey)	[対応したゲームテキスト]
     *          @note
     */
    //----------------------------------------------------------------------------
    static public string GetLinkBonusRaceText(MasterDataParamChara cCharaMaster, MasterDataDefineLabel.KindType nBonusRace)
    {
        string strRaceBonus = "";

        //--------------------------------
        // エラーチェック
        //--------------------------------
        if (cCharaMaster == null)
        {
            Debug.LogError("GameTextManager or MasterDataParamChara Is None!");
            return(strRaceBonus);
        }

        string strKindKey   = "";
        string strBonusVal1 = "";
        string strBonusVal2 = "";

        //--------------------------------
        // 種族による分岐
        //--------------------------------
        switch (nBonusRace)
        {
        case MasterDataDefineLabel.KindType.HUMAN:
            strBonusVal1 = GetLinkUnitBonusRace(cCharaMaster, nBonusRace, CharaUtil.VALUE.HP).ToString("F0");
            strBonusVal2 = GetLinkUnitBonusRace(cCharaMaster, nBonusRace, CharaUtil.VALUE.POW).ToString("F1");
            strKindKey   = "LINK_BONUS_HUMAN";
            break;

        case MasterDataDefineLabel.KindType.DRAGON:
            strBonusVal1 = GetLinkUnitBonusRace(cCharaMaster, nBonusRace, CharaUtil.VALUE.BST_PANEL).ToString("F1");
            strKindKey   = "LINK_BONUS_DRAGON";
            break;

        case MasterDataDefineLabel.KindType.GOD:
            strBonusVal1 = GetLinkUnitBonusRace(cCharaMaster, nBonusRace, CharaUtil.VALUE.CRT).ToString("F1");
            strKindKey   = "LINK_BONUS_GOD";
            break;

        case MasterDataDefineLabel.KindType.DEMON:
            strBonusVal1 = GetLinkUnitBonusRace(cCharaMaster, nBonusRace, CharaUtil.VALUE.POW).ToString("F1");
            strKindKey   = "LINK_BONUS_DEMON";
            break;

        case MasterDataDefineLabel.KindType.CREATURE:
            strBonusVal1 = GetLinkUnitBonusRace(cCharaMaster, nBonusRace, CharaUtil.VALUE.HP).ToString("F0");
            strKindKey   = "LINK_BONUS_CREATURE";
            break;

        case MasterDataDefineLabel.KindType.BEAST:
            strBonusVal1 = GetLinkUnitBonusRace(cCharaMaster, nBonusRace, CharaUtil.VALUE.HP).ToString("F0");
            strBonusVal2 = GetLinkUnitBonusRace(cCharaMaster, nBonusRace, CharaUtil.VALUE.CRT).ToString("F1");
            strKindKey   = "LINK_BONUS_BEAST";
            break;

        case MasterDataDefineLabel.KindType.MACHINE:
            strBonusVal1 = GetLinkUnitBonusRace(cCharaMaster, nBonusRace, CharaUtil.VALUE.POW).ToString("F1");
            strBonusVal2 = GetLinkUnitBonusRace(cCharaMaster, nBonusRace, CharaUtil.VALUE.BST_PANEL).ToString("F1");
            strKindKey   = "LINK_BONUS_MACHINE";
            break;

        case MasterDataDefineLabel.KindType.EGG:
            strBonusVal1 = GetLinkUnitBonusRace(cCharaMaster, nBonusRace, CharaUtil.VALUE.CRT).ToString("F1");
            strBonusVal2 = GetLinkUnitBonusRace(cCharaMaster, nBonusRace, CharaUtil.VALUE.BST_PANEL).ToString("F1");
            strKindKey   = "LINK_BONUS_EGG";
            break;

        default:
            Debug.LogError("Unit Kind Error!: kind:" + nBonusRace);
            break;
        }

        //--------------------------------
        // テキスト構築
        //--------------------------------
        strRaceBonus = string.Format(UnityUtil.GetText(strKindKey), strBonusVal1, strBonusVal2);

        return(strRaceBonus);
    }
Exemplo n.º 16
0
    //----------------------------------------------------------------------------

    /*!
     *          @brief		リンクシステム:種族ボーナス:キャラマスター指定
     *          @param[in]	MasterDataParamChara	(cCharaMaster)	リンクユニット:キャラマスター
     *          @param[in]	int						(nBonusRace)	ボーナス種族
     *          @param[in]	int						(nBonusType)	ボーナスタイプ
     *          @return		float					(fResult)		[+%値]
     *          @note		種族・レア度毎のボーナス値を取得	※引数でまとめて受け取った方がいいかも
     */
    //----------------------------------------------------------------------------
    static public float GetLinkUnitBonusRace(MasterDataParamChara cCharaMaster, MasterDataDefineLabel.KindType nBonusRace, CharaUtil.VALUE nBonusType)
    {
        MasterDataLinkSystem[] acLinkMaster = MasterFinder <MasterDataLinkSystem> .Instance.GetAll();

        float fResult = 0.0f;

        //--------------------------------
        // エラーチェック
        //--------------------------------
        if (acLinkMaster == null ||
            cCharaMaster == null)
        {
            Debug.LogError("MasterDataLinkSystem or MasterDataParamChara Is None!");
            return(fResult);
        }

        // ボーナス種族が設定されていない場合
        if (nBonusRace <= MasterDataDefineLabel.KindType.NONE ||
            nBonusRace >= MasterDataDefineLabel.KindType.MAX)
        {
            return(fResult);
        }

        //--------------------------------
        // 副種族持ちかチェック
        //--------------------------------
        MasterDataDefineLabel.KindType[] anCharaKind = new MasterDataDefineLabel.KindType[2] {
            cCharaMaster.kind,
            cCharaMaster.sub_kind
        };
        int nStartNum = 0;
        int nEndNum   = 0;

        // 副種族が設定されていない場合
        if (anCharaKind[1] <= MasterDataDefineLabel.KindType.NONE ||
            anCharaKind[1] >= MasterDataDefineLabel.KindType.MAX)
        {
            nStartNum = LINK_BONUS_KIND;
            nEndNum   = LINK_BONUS_KIND_SUB;
        }
        else
        {
            nStartNum = LINK_BONUS_KIND_SUB;
            nEndNum   = acLinkMaster.Length;
        }

        //--------------------------------
        // ボーナス定義の確定
        //--------------------------------
        int nLinkIdx = 0;

        for (int num = nStartNum; num < nEndNum; ++num)
        {
            // ボーナス定義の種族とレア度が、リンクユニットと等しい場合
            if (acLinkMaster[num].kind == nBonusRace &&
                acLinkMaster[num].rare == cCharaMaster.rare)
            {
                nLinkIdx = num;
                break;
            }
        }

        //--------------------------------
        // ボーナス値の種類による分岐
        // ※HPは実値のため、そのまま取得する
        //--------------------------------
        switch (nBonusType)
        {
        case CharaUtil.VALUE.POW: fResult = InGameUtilBattle.GetDBRevisionValue((float)acLinkMaster[nLinkIdx].atk); break;

        case CharaUtil.VALUE.HP: fResult = (float)acLinkMaster[nLinkIdx].hp; break;

        case CharaUtil.VALUE.CRT: fResult = InGameUtilBattle.GetDBRevisionValue((float)acLinkMaster[nLinkIdx].crt); break;

        case CharaUtil.VALUE.BST_PANEL: fResult = InGameUtilBattle.GetDBRevisionValue((float)acLinkMaster[nLinkIdx].bst); break;
        }

        return(fResult);
    }
Exemplo n.º 17
0
    //----------------------------------------------------------------------------

    /*!
     *          @brief			種族ID->種族ゲームテキスト->表示種族テキスト
     *          @param[in]		int		(kind)		種族ID
     *          @param[in]		int		(kind)		副種族ID
     *          @return			string	[対応したゲームテキスト]
     */
    //----------------------------------------------------------------------------
    static public string GetKindToText(MasterDataDefineLabel.KindType kind, MasterDataDefineLabel.KindType sub_kind)
    {
        //----------------------------------------
        // キャラ種族入力
        //----------------------------------------
        string strRaceMsgKey = "KIND_HUMAN";

        switch (kind)
        {
        case MasterDataDefineLabel.KindType.HUMAN: strRaceMsgKey = "KIND_HUMAN"; break;

        case MasterDataDefineLabel.KindType.DRAGON: strRaceMsgKey = "KIND_DRAGON"; break;

        case MasterDataDefineLabel.KindType.GOD: strRaceMsgKey = "KIND_GOD"; break;

        case MasterDataDefineLabel.KindType.DEMON: strRaceMsgKey = "KIND_DEMON"; break;

        case MasterDataDefineLabel.KindType.CREATURE: strRaceMsgKey = "KIND_CREATURE"; break;

        case MasterDataDefineLabel.KindType.BEAST: strRaceMsgKey = "KIND_BEAST"; break;

        case MasterDataDefineLabel.KindType.MACHINE: strRaceMsgKey = "KIND_MACHINE"; break;

        case MasterDataDefineLabel.KindType.EGG: strRaceMsgKey = "KIND_EGG"; break;

        default: Debug.LogError("Unit Kind Error!: kind:" + kind); break;
        }
        //----------------------------------------
        // キャラ副種族入力
        //----------------------------------------
        string strSubRaceMsgKey = "";

        switch (sub_kind)
        {
        case MasterDataDefineLabel.KindType.HUMAN: strSubRaceMsgKey = "KIND_HUMAN"; break;

        case MasterDataDefineLabel.KindType.DRAGON: strSubRaceMsgKey = "KIND_DRAGON"; break;

        case MasterDataDefineLabel.KindType.GOD: strSubRaceMsgKey = "KIND_GOD"; break;

        case MasterDataDefineLabel.KindType.DEMON: strSubRaceMsgKey = "KIND_DEMON"; break;

        case MasterDataDefineLabel.KindType.CREATURE: strSubRaceMsgKey = "KIND_CREATURE"; break;

        case MasterDataDefineLabel.KindType.BEAST: strSubRaceMsgKey = "KIND_BEAST"; break;

        case MasterDataDefineLabel.KindType.MACHINE: strSubRaceMsgKey = "KIND_MACHINE"; break;

        case MasterDataDefineLabel.KindType.EGG: strSubRaceMsgKey = "KIND_EGG"; break;
        }

        if (strSubRaceMsgKey == "")
        {
            // 副種族が存在しないキャラであればベース種族のみ返す
            return(UnityUtil.GetText(strRaceMsgKey));
        }
        else
        {
            // 副種族の存在するキャラならば副種族を後ろにつけて返す
            return(UnityUtil.GetText(strRaceMsgKey) + " / " + UnityUtil.GetText(strSubRaceMsgKey));
        }
    }