예제 #1
0
 /// <summary>
 /// 種族ボーナス設定
 /// </summary>
 /// <param name="skill_id"></param>
 public void setupRaceBonus(MasterDataParamChara cCharaMasterData)
 {
     BaseHeight  = BASE_DEFAULT_HEIGHT;
     TitleHeight = TITLE_DEFAULT_HEIGHT;
     TitleWidth  = RACE_BONUS_TITLE_WIDTH;
     MessageBgH  = MESSAGE_BG_HEIGHT;
     setLinkTitleImage("skill_name_bg0", "RACE BONUS");
     IsSkillItem  = false;
     IsViewStatus = false;
     IsViewIcon   = false;
     if (cCharaMasterData != null)
     {
         // 種族
         LinkTitleText = GameTextUtil.GetKindToText(cCharaMasterData.kind, cCharaMasterData.sub_kind);
         // 説明文
         SkillDetailText = CharaLinkUtil.GetLinkBonusRaceText(cCharaMasterData);
     }
     else
     {
         // 説明文
         SkillDetailText = EmptyStr;
     }
     MessageBgResize();
 }
예제 #2
0
    private void SetLinkEffectInfo(CharaOnce cCharaOnce, MasterDataParamChara cCharaMasterData, bool bLink)
    {
        //----------------------------------------
        // リンク効果設定
        //----------------------------------------
        //int nUnitId = (int)cCharaMasterData.fix_id;
        int    nLv      = cCharaOnce.m_CharaLevel;
        int    nPlusHp  = cCharaOnce.m_CharaPlusHP;
        int    nPlusPow = cCharaOnce.m_CharaPlusPow;
        int    nCost    = cCharaMasterData.party_cost;
        uint   unID     = cCharaMasterData.fix_id;
        double nCharm   = 0;

        //------------------------------------------------------------
        // LINK BONUS
        //------------------------------------------------------------
        //レベル
        Lv = nLv;

        //HP
        int nHp = (CharaLinkUtil.GetLinkUnitBonusElement(unID, nLv, 0, CharaUtil.VALUE.HP) +
                   CharaLinkUtil.GetLinkUnitBonusPlus(nPlusHp, CharaUtil.VALUE.HP));

        // ATK
        int nPow = (CharaLinkUtil.GetLinkUnitBonusElement(unID, nLv, 0, CharaUtil.VALUE.POW) +
                    CharaLinkUtil.GetLinkUnitBonusPlus(nPlusPow, CharaUtil.VALUE.POW));

        //COST
        Cost = nCost;

        uint nLinkPoint = 0;

        //リンクポイント
        if (bLink)
        {
            //リンク子の場合はリンクポイントを反映
            nLinkPoint = (uint)cCharaOnce.m_LinkParam.m_CharaLinkPoint;
            float fLinkPoint = nLinkPoint * 0.01f;
            Link = string.Format(GameTextUtil.GetText("unit_linkstatus4"), fLinkPoint);
        }
        else
        {
            //ハイフン表示
            Link = EmptyStr;
        }

        uint nLimitOverLevel = (uint)cCharaOnce.m_CharaLimitOver;

        if (nLimitOverLevel > 0)
        {
            // 限界突破タイプ
            int nLimitOverType = cCharaMasterData.limit_over_type;

            // 限界突破後のコスト
            //Cost = (int)CharaLimitOver.GetParam(nLimitOverLevel, nLimitOverType, (int)CharaLimitOver.EGET.ePARAM_COST);

            // 限界突破後のHp
            nHp = CharaLinkUtil.GetLinkUnitBonusElement(unID, nLv, nLimitOverLevel, CharaUtil.VALUE.HP) + CharaLinkUtil.GetLinkUnitBonusPlus(nPlusHp, CharaUtil.VALUE.HP);

            // 限界突破後のPow
            nPow = CharaLinkUtil.GetLinkUnitBonusElement(unID, nLv, nLimitOverLevel, CharaUtil.VALUE.POW) + CharaLinkUtil.GetLinkUnitBonusPlus(nPlusPow, CharaUtil.VALUE.POW);

            // CHARM
            nCharm = CharaLimitOver.GetParamCharm(nLimitOverLevel, nLimitOverType);
        }

        if (nPlusHp > 0)
        {
            Hp = string.Format(GameTextUtil.GetText("unit_linkstatus1"), nHp, nPlusHp);
        }
        else
        {
            Hp = nHp.ToString();
        }

        if (nPlusPow > 0)
        {
            Atk = string.Format(GameTextUtil.GetText("unit_linkstatus1"), nPow, nPlusPow);
        }
        else
        {
            Atk = nPow.ToString();
        }

        Charm = nCharm.ToString("F1");

        //------------------------------------------------------------
        // RACE BONUS
        //------------------------------------------------------------
        // 種族
        //RaceName = GameTextUtil.GetKindToText(cCharaOnce.kind, cCharaOnce.kind_sub);
        RaceName = GameTextUtil.GetKindToText(cCharaMasterData.kind, cCharaMasterData.sub_kind);

        // 説明文
        RaceBonusMessage = CharaLinkUtil.GetLinkBonusRaceText(cCharaMasterData);

        SetLinkEffectSkill(cCharaMasterData, nLinkPoint);
    }