Esempio n. 1
0
    public static void outputPlayerParty(CharaParty chara_party)
    {
        for (int idx = 0; idx < chara_party.getPartyMemberMaxCount(); idx++)
        {
            CharaOnce chara_once = chara_party.getPartyMember((GlobalDefine.PartyCharaIndex)idx, CharaParty.CharaCondition.EXIST);
            if (chara_once != null)
            {
                DebugBattleLog.writeText(DebugBattleLog.StrOpe + "プレイヤー情報(" + ((GlobalDefine.PartyCharaIndex)idx).ToString() + ")"
                                         + " FixID:" + chara_once.m_CharaMasterDataParam.fix_id.ToString()
                                         + " DrawID:" + chara_once.m_CharaMasterDataParam.draw_id.ToString()
                                         + " LV:" + chara_once.m_CharaLevel.ToString()
                                         + " 属性:" + chara_once.m_CharaMasterDataParam.element.ToString()
                                         + " 種族1:" + chara_once.m_CharaMasterDataParam.kind.ToString()
                                         + " 種族2:" + chara_once.m_CharaMasterDataParam.sub_kind.ToString()
                                         + " [" + chara_once.m_CharaMasterDataParam.name.ToString() + "]"
                                         );
                DebugBattleLog.writeText(DebugBattleLog.StrOpe + "  "
                                         + " HP:" + chara_party.m_HPCurrent.getValue((GlobalDefine.PartyCharaIndex)idx).ToString() + "/" + chara_party.m_HPMax.getValue((GlobalDefine.PartyCharaIndex)idx).ToString()
                                         + " SkillTurn:" + chara_once.GetTrunToLimitBreak().ToString() + "/" + chara_once.GetMaxTurn().ToString()
                                         + " Hate:" + chara_party.m_Hate.getValue((GlobalDefine.PartyCharaIndex)idx).ToString()
                                         );

                // 状態変化
                StatusAilmentChara ailment = chara_party.m_Ailments.getAilment((GlobalDefine.PartyCharaIndex)idx);
                outputAilment(ailment);
            }
        }
    }
Esempio n. 2
0
    /**
     * プレイヤー側で使用しているマスターデータをキャッシュ.
     */
    public void CachePlayerMasterData(CharaParty player_party)
    {
        clearCachePlayerAll();

        // 常駐スキル.
        MasterDataSkillActive[] master_data_skill_active_array = null;
#if BUILD_TYPE_DEBUG && USE_DEBUG_JSON_MASTER_DATA
        if (BattleParam.m_IsUseDebugJsonMasterData)
        {
            master_data_skill_active_array = BattleMasterDataFromJson.Instance.getMasterDataAll <MasterDataSkillActive>();
            for (int idx = 0; idx < master_data_skill_active_array.Length; idx++)
            {
                MasterDataSkillActive master_data_skill_active = master_data_skill_active_array[idx];
                if (master_data_skill_active.always == MasterDataDefineLabel.BoolType.ENABLE)
                {
                    useSkillActive(master_data_skill_active.fix_id);
                }
            }
        }
        else
#endif    //USE_DEBUG_JSON_MASTER_DATA
        {
            MasterDataSkillActive[] resMasterDataSkillActiveArray = MasterFinder <MasterDataSkillActive> .Instance.SelectWhere("where always = ? ", MasterDataDefineLabel.BoolType.ENABLE).ToArray();

            if (resMasterDataSkillActiveArray != null)
            {
                foreach (MasterDataSkillActive resMasterDataSkillActive in resMasterDataSkillActiveArray)
                {
                    useSkillActive(resMasterDataSkillActive.fix_id);
                }
            }
        }

        for (int i = 0; i < player_party.getPartyMemberMaxCount(); i++)
        {
            CharaOnce chara = player_party.getPartyMember((GlobalDefine.PartyCharaIndex)i, CharaParty.CharaCondition.EXIST);
            if (chara == null)
            {
                continue;
            }

            if (!chara.m_bHasCharaMasterDataParam)
            {
                continue;
            }

            // キャラ情報を保存
            MasterDataParamChara master_data_param_chara = chara.m_CharaMasterDataParam;
            addCharaParam(master_data_param_chara);

            // リンクキャラを保存
            MasterDataParamChara master_data_param_link_chara = null;
            if (chara.m_LinkParam != null)
            {
                master_data_param_link_chara = useCharaParam(chara.m_LinkParam.m_CharaID);
            }

            //--------------------------------
            // スキル情報を保存		<アクティブ1>
            //--------------------------------
            {
                MasterDataSkillActive master_data_skill_active = useSkillActive(master_data_param_chara.skill_active0);
                if (master_data_skill_active != null)
                {
                    useSkillBoost(master_data_skill_active.skill_boost_id);
                }
            }

            //--------------------------------
            // スキル情報を保存		<アクティブ2>
            //--------------------------------
            {
                MasterDataSkillActive master_data_skill_active = useSkillActive(master_data_param_chara.skill_active1);
                if (master_data_skill_active != null)
                {
                    useSkillBoost(master_data_skill_active.skill_boost_id);
                }
            }

            //--------------------------------
            // スキル情報を保存		<リーダー>
            //--------------------------------
            {
                int loop_counter = 0;
                MasterDataSkillLeader master_data_skill_leader = useSkillLeader(master_data_param_chara.skill_leader);
                while (master_data_skill_leader != null)
                {
                    // 無限ループ検出
                    if (_checkinfiniteLoop(ref loop_counter))
                    {
                        master_data_skill_leader.add_fix_id = 0;
                        break;
                    }

                    master_data_skill_leader = useSkillLeader(master_data_skill_leader.add_fix_id);
                }
            }

            //--------------------------------
            // スキル情報を保存		<パッシブ>
            //--------------------------------
            {
                int loop_counter = 0;
                MasterDataSkillPassive master_data_skill_passive = useSkillPassive(master_data_param_chara.skill_passive);
                while (master_data_skill_passive != null)
                {
                    // 無限ループ検出
                    if (_checkinfiniteLoop(ref loop_counter))
                    {
                        master_data_skill_passive.add_fix_id = 0;
                        break;
                    }

                    master_data_skill_passive = useSkillPassive((uint)master_data_skill_passive.add_fix_id);
                }
            }

            //--------------------------------
            // スキル情報を保存		<リンクパッシブ>
            //--------------------------------
            // バトル中の判定には使わないが、ダイアログの表示に使われるので保存.
            useSkillPassive(master_data_param_chara.link_skill_passive);

            //--------------------------------
            // スキル情報を保存		<リミブレ>
            //--------------------------------
            {
                int loop_counter = 0;
                MasterDataSkillLimitBreak master_data_skill_limit_break = useSkillLimitBreak(master_data_param_chara.skill_limitbreak);
                while (master_data_skill_limit_break != null)
                {
                    // 無限ループ検出
                    if (_checkinfiniteLoop(ref loop_counter))
                    {
                        master_data_skill_limit_break.add_fix_id = 0;
                        break;
                    }

                    master_data_skill_limit_break = useSkillLimitBreak((uint)master_data_skill_limit_break.add_fix_id);
                }
            }

            //--------------------------------
            // スキル情報を保存		<リンク>
            //--------------------------------
            if (master_data_param_link_chara != null)
            {
                //--------------------------------
                // スキル情報を保存		<リンクスキル>
                //--------------------------------
                useSkillActive(master_data_param_link_chara.skill_active0);

                //--------------------------------
                // スキル情報を保存		<リンクパッシブ>
                //--------------------------------
                {
                    int loop_counter = 0;
                    MasterDataSkillPassive master_data_skill_passive = useSkillPassive(master_data_param_link_chara.link_skill_passive);
                    while (master_data_skill_passive != null)
                    {
                        // 無限ループ検出
                        if (_checkinfiniteLoop(ref loop_counter))
                        {
                            master_data_skill_passive.add_fix_id = 0;
                            break;
                        }

                        master_data_skill_passive = useSkillPassive((uint)master_data_skill_passive.add_fix_id);
                    }
                }
            }
        }
    }
Esempio n. 3
0
    public static void QuestInitialize(SceneModeContinuousBattle continuous_battle)
    {
        if (SceneGoesParam.HasInstance &&
            SceneGoesParam.Instance.m_SceneGoesParamToQuest2Build != null &&
            SceneGoesParam.Instance.m_SceneGoesParamToQuest2Build.m_QuestBuild != null)
        {
            m_QuestBuild = SceneGoesParam.Instance.m_SceneGoesParamToQuest2Build.m_QuestBuild;
        }

        loadBattlePrefab();

        m_AchievementTotalingInBattle = new AchievementTotalingInBattle();
        m_AchievementTotalingInBattle.initQuset();

        initBattleParam(continuous_battle);

        for (int idx = 0; idx < m_PlayerParty.getPartyMemberMaxCount(); idx++)
        {
            CharaOnce chara_once = m_PlayerParty.getPartyMember((GlobalDefine.PartyCharaIndex)idx, CharaParty.CharaCondition.EXIST);
            if (chara_once != null)
            {
                chara_once.m_PartyCharaIndex = (GlobalDefine.PartyCharaIndex)idx;
            }
        }

        // プレイスコア
        m_PlayScoreInfo = new ServerDataDefine.PlayScoreInfo();
#if false //v5.1.0ではプレイスコアの機能を無効にする
        {
            // クエストスコア補正値
            int quest_base_score      = 0;
            int quest_play_score_rate = 0;

            MasterDataQuest2 master_data_quest = MasterDataUtil.GetQuest2ParamFromID(continuous_battle.m_QuestMissionID);

            // プレイスコア計算対象クエストかどうかを調べる
            if (master_data_quest != null)
            {
                uint quest_score_fix_id = master_data_quest.quest_score_id;
                MasterDataRenewQuestScore master_data_quest_score = MasterFinder <MasterDataRenewQuestScore> .Instance.Find((int)quest_score_fix_id);

                if (master_data_quest_score != null)
                {
                    quest_base_score      = master_data_quest_score.base_score;
                    quest_play_score_rate = master_data_quest_score.play_score_rate;
                }

                if (quest_play_score_rate > 0)
                {
                    if (master_data_quest.consume_type == 1)
                    {
                        if (master_data_quest.consume_value > 0)
                        {
                            m_PlayScoreInfo.setPlayScoreQuestFlag(true);
                        }
                    }
                }
            }

            // 中断復帰していない時だけ有効(なので中断復帰用のローカル保存もしていない)
            if (getRestoreData() == null &&
                m_PlayScoreInfo.isPlayScoreQuest()
                )
            {
                // プレイスコア設定値取得
                MasterDataPlayScore[] master_data_play_score_array = MasterFinder <MasterDataPlayScore> .Instance.GetAll();

                if (master_data_play_score_array.IsNullOrEmpty() == false &&
                    quest_base_score > 0 &&
                    quest_play_score_rate > 0
                    )
                {
                    m_PlayScoreInfo.init(master_data_play_score_array, quest_base_score, quest_play_score_rate);
                }
            }
        }
#endif

        BattleParam.m_MasterDataCache.CachePlayerMasterData(BattleParam.m_PlayerParty);
        BattleSceneManager.Instance.setShowHandAreaAlways(true);

        BattleSceneManager.Instance.PRIVATE_FIELD.QuestInitialize();

        return;
    }