예제 #1
0
    public void SetLinkEffectSkill(MasterDataParamChara cCharaMasterData, uint nLinkPoint)
    {
        //------------------------------------------------------------
        // LINK SKILL
        //------------------------------------------------------------
        MasterDataSkillActive cSkillParamLinkActive = null;

        if (cCharaMasterData != null)
        {
            cSkillParamLinkActive = MasterDataUtil.GetActiveSkillParamFromID(cCharaMasterData.link_skill_active);
        }
        if (null != cSkillParamLinkActive)
        {
            // スキル名
            LinkSkillName = cSkillParamLinkActive.skill_link_name;

            // 説明文
            LinkSkillMessage = cSkillParamLinkActive.skill_link_detail;

            //発動率
            float fSkillOdds = CharaLinkUtil.GetLinkSkillOdds(cSkillParamLinkActive, (int)nLinkPoint) * 0.01f;
            LinkSkillRate = string.Format(GameTextUtil.GetText("unit_linkstatus2"), fSkillOdds.ToString("F1"));
        }
        else
        {
            // スキル名
            LinkSkillName = EmptyStr;
            // 説明文
            LinkSkillMessage = EmptyStr;
            // 発動率
            LinkSkillRate = "";
        }

        //------------------------------------------------------------
        // LINK PASSIVE
        //------------------------------------------------------------
        MasterDataSkillPassive cSkillParamLinkPassive = null;

        if (cCharaMasterData != null)
        {
            cSkillParamLinkPassive = MasterDataUtil.GetPassiveSkillParamFromID(cCharaMasterData.link_skill_passive);
        }
        if (null != cSkillParamLinkPassive)
        {
            // スキル名
            LinkPassiveName = cSkillParamLinkPassive.name;

            // 説明文
            LinkPassiveMessage = cSkillParamLinkPassive.detail;
        }
        else
        {
            // スキル名
            LinkPassiveName = EmptyStr;

            // 説明文
            LinkPassiveMessage = EmptyStr;
        }
    }
예제 #2
0
    /// <summary>
    /// リンクスキル設定
    /// </summary>
    /// <param name="skill_id"></param>
    public void setupLinkSkill(MasterDataParamChara cCharaMasterData, uint nLinkPoint)
    {
        BaseHeight  = BASE_DEFAULT_HEIGHT;
        TitleHeight = TITLE_DEFAULT_HEIGHT;
        TitleWidth  = LINK_SKILL_TITLE_WIDTH;
        MessageBgH  = MESSAGE_BG_HEIGHT;
        setLinkTitleImage("skill_name_bg3", "LINK SKILL");
        IsSkillItem  = false;
        IsViewStatus = false;
        IsViewIcon   = false;
        //------------------------------------------------------------
        // LINK SKILL
        //------------------------------------------------------------
        MasterDataSkillActive cSkillParamLinkActive = null;

        if (cCharaMasterData != null)
        {
            cSkillParamLinkActive = MasterDataUtil.GetActiveSkillParamFromID(cCharaMasterData.link_skill_active);
        }
        if (null != cSkillParamLinkActive)
        {
            // スキル名
            LinkTitleText = cSkillParamLinkActive.skill_link_name;

            // 説明文
            SkillDetailText = cSkillParamLinkActive.skill_link_detail;

            //発動率
            float fSkillOdds = CharaLinkUtil.GetLinkSkillOdds(cSkillParamLinkActive, (int)nLinkPoint) * 0.01f;
            LinkSkillRate = string.Format(GameTextUtil.GetText("unit_linkstatus2"), fSkillOdds.ToString("F1"));
        }
        else
        {
            // スキル名
            LinkTitleText = EmptyStr;
            // 説明文
            SkillDetailText = EmptyStr;
            // 発動率
            LinkSkillRate = "";
        }
        MessageBgResize();
    }
예제 #3
0
    //----------------------------------------------------------------------------

    /*!
     *  @brief		リンクスキルの最大発動数をチェック
     *  @param[in]	BattleSkillActivity[]	(activityArray)	ノーマルスキル発動情報
     */
    //----------------------------------------------------------------------------
    private static int CheckLinkSkillNum(SkillRequestParam skill_requeset_param, bool[] dest_skill_owner)
    {
        int ret_val = 0;

        for (int idx = 0; idx < dest_skill_owner.Length; idx++)
        {
            dest_skill_owner[idx] = false;
        }

        //--------------------------------
        // ノーマルスキル発動者を取得
        //--------------------------------
        for (int num = 0; num < skill_requeset_param.getRequestCount(); ++num)
        {
            BattleSkillActivity normalActivity = skill_requeset_param.getSkillRequestByIndex(num);
            if (normalActivity == null ||
                normalActivity.m_SkillType != ESKILLTYPE.eACTIVE ||
                normalActivity.m_SkillParamOwnerNum == GlobalDefine.PartyCharaIndex.GENERAL)
            {
                continue;
            }

            // 発動者の登録処理
            for (int ownerNum = 0; ownerNum < dest_skill_owner.Length; ++ownerNum)
            {
                if ((GlobalDefine.PartyCharaIndex)ownerNum == normalActivity.m_SkillParamOwnerNum &&
                    dest_skill_owner[ownerNum] == false)
                {
                    dest_skill_owner[ownerNum] = true;
                    break;
                }
            }
        }


        //--------------------------------
        // リンクスキル発動判定
        //--------------------------------
        for (int num = 0; num < dest_skill_owner.Length; ++num)
        {
            if (dest_skill_owner[num] == false)
            {
                continue;
            }

            // リンクキャラを取得
            CharaOnce partyChara = BattleParam.m_PlayerParty.getPartyMember((GlobalDefine.PartyCharaIndex)num, CharaParty.CharaCondition.SKILL_ACTIVE);
            if (partyChara == null)
            {
                continue;
            }

            MasterDataParamChara charaMaster = BattleParam.m_MasterDataCache.useCharaParam(partyChara.m_LinkParam.m_CharaID);
            if (charaMaster == null)
            {
                dest_skill_owner[num] = false;
                continue;
            }

            // リンクスキル発動判定(基本発動率 + リンクポイント)
            uint odds = CharaLinkUtil.GetLinkSkillOdds(charaMaster, partyChara.m_LinkParam.m_CharaLinkPoint);
            if (BattleSceneUtil.checkChancePercentSkill((int)odds, (int)CharaLinkUtil.SKILL_LINK_ODDS_MAX))
            {
                ret_val++;
            }
            else
            {
                dest_skill_owner[num] = false;
            }
        }

        return(ret_val);
    }