Ejemplo 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);
            }
        }
    }
Ejemplo n.º 2
0
    static public void setupCharaParty(ref CharaParty _party, PacketStructUnit[] unitList, PacketStructUnit[] linkUnitList = null)
    {
        if (_party == null || unitList == null)
        {
            return;
        }

        CharaOnce[] acCharaList = new CharaOnce[(int)GlobalDefine.PartyCharaIndex.MAX];

        for (int j = 0; j < unitList.Length; j++)
        {
            if (unitList[j] == null)
            {
                continue;
            }
            PacketStructUnit cBaseUnit = unitList[j];

            // リンクの情報
            int  nLinkLimitOverLV = 0;
            uint nLinkId          = 0;
            int  nLinkLevel       = 0;
            int  nLinkPlusPow     = 0;
            int  nLinkPlusHp      = 0;

            PacketStructUnit cLinkUnit;
            if (linkUnitList != null && linkUnitList.IsRange(j))
            {
                cLinkUnit = linkUnitList[j];
            }
            else
            {
                cLinkUnit = CharaLinkUtil.GetLinkUnit(cBaseUnit.link_unique_id);
            }

            if (cLinkUnit != null)
            {
                nLinkId          = cLinkUnit.id;
                nLinkLevel       = (int)cLinkUnit.level;
                nLinkPlusPow     = (int)cLinkUnit.add_pow;
                nLinkPlusHp      = (int)cLinkUnit.add_hp;
                nLinkLimitOverLV = (int)cLinkUnit.limitover_lv;
            }


            acCharaList[j] = new CharaOnce();
            acCharaList[j].CharaSetupFromID(cBaseUnit.id, (int)cBaseUnit.level, (int)cBaseUnit.limitbreak_lv, (int)cBaseUnit.limitover_lv, (int)cBaseUnit.add_pow, (int)cBaseUnit.add_hp,
                                            nLinkId, nLinkLevel, nLinkPlusPow, nLinkPlusHp, (int)cBaseUnit.link_point, nLinkLimitOverLV);
        }

        _party.PartySetupMenu(acCharaList, false);
    }
Ejemplo n.º 3
0
    private static void initBattleParam(SceneModeContinuousBattle continuous_battle)
    {
        if (continuous_battle != null)
        {
            m_QuestAreaID    = continuous_battle.m_QuestAreaID;
            m_QuestMissionID = continuous_battle.m_QuestMissionID;
            m_PlayerParty    = continuous_battle.m_PlayerParty;

            m_QuestFloor = continuous_battle.m_QuestFloor;
            m_AcquireKey = continuous_battle.m_AcquireKey;

            m_LBSCharaIdx            = continuous_battle.m_LBSCharaIdx;
            m_SkillRequestLimitBreak = continuous_battle.m_SkillRequestLimitBreak;

            m_QuestTotalTurn = continuous_battle.m_QuestTotalTurn;

            m_BattleRound   = continuous_battle.battleCount;
            m_QuestRandSeed = continuous_battle.m_QuestRandSeed;
        }
    }
Ejemplo n.º 4
0
    //----------------------------------------------------------------------------

    /*!
     *          @brief	パーティー情報設定処理:
     */
    //----------------------------------------------------------------------------
    public void setup(CharaParty playerParty, CharaOnce[] playerPartyChara, bool newBattle, bool[] balloon)
    {
        m_NewBattle = newBattle;
        if (m_PartyUnit.IsNullOrEmpty())
        {
            m_PartyUnit = new InGamePartyUnit[(int)GlobalDefine.PartyCharaIndex.MAX];
        }
        //------------------------------
        //	パーティ全員分処理
        //------------------------------
        if (playerPartyChara != null)
        {
            InGamePlayerParty.m_PlayerPartyChara = playerPartyChara;

            for (int i = 0; i < (int)GlobalDefine.PartyCharaIndex.MAX; i++)
            {
                m_PartyUnit[i] = m_UnitBase[i].GetComponent <InGamePartyUnit>() as InGamePartyUnit;
                if (m_PartyUnit[i] != null)
                {
                    m_PartyUnit[i].SetCharaID(InGamePlayerParty.m_PlayerPartyChara[i], newBattle, unit_pos_x[i], unit_pos_y[i], (GlobalDefine.PartyCharaIndex)i, balloon[i]);
                    if (LocalSaveManager.Instance.LoadFuncOption().m_OptionBattleSkillTurn == (int)LocalSaveDefine.OptionBattleSkillTurn.ON)
                    {
                        m_PartyUnit[i].openASTurnInfo();
                    }
                    if (LocalSaveManager.Instance.LoadFuncOption().m_OptionBattleSkillCost == (int)LocalSaveDefine.OptionBattleSkillCost.ON)
                    {
                        m_PartyUnit[i].openNormalSkillInfo();
                    }
                }
            }
        }
        if (playerParty != null)
        {
            InGamePlayerParty.m_PlayerParty = playerParty;
        }
        m_InGamePartyManager.setupHero();
        if (LocalSaveManager.Instance.LoadFuncOption().m_OptionBattleSkillTurn == (int)LocalSaveDefine.OptionBattleSkillTurn.ON)
        {
            m_InfoOpen = true;
        }
    }
Ejemplo n.º 5
0
 /// <summary>
 /// 変数の内容を初期化(クエスト終了時に初期化しておく)
 /// </summary>
 public static void clearValues()
 {
     m_QuestAreaID    = 0;
     m_QuestMissionID = 0;
     m_PlayerParty    = null;
     m_MasterDataCache.clearCachePlayerAll();
     m_MasterDataCache.clearCacheEnemyAll();
     m_QuestFloor  = 0;
     m_AcquireKey  = false;
     m_LBSCharaIdx = GlobalDefine.PartyCharaIndex.ERROR;
     m_SkillRequestLimitBreak.clearRequest();
     m_QuestTotalTurn              = 0;
     m_BattleRequest               = null;
     m_QuestBuild                  = null;
     m_EnemyParam                  = null;
     m_TargetEnemyCurrent          = InGameDefine.SELECT_NONE;
     m_TargetEnemyWindow           = InGameDefine.SELECT_NONE;
     m_PlayScoreInfo               = null;
     m_AchievementTotalingInBattle = null;
     m_IsKobetsuHP                 = true;
     m_BattleRound                 = 0;
     m_QuestRandSeed               = 0;
     for (int idx = 0; idx < m_PartyMemberHands.Length; idx++)
     {
         m_PartyMemberHands[idx] = 0;
     }
     for (int idx = 0; idx < m_FieldSkillCounts.Length; idx++)
     {
         m_FieldSkillCounts[idx] = 0;
     }
     for (int skill_idx = 0; skill_idx < m_FormedSkillCounts.GetLength(0); skill_idx++)
     {
         for (int member_idx = 0; member_idx < m_FormedSkillCounts.GetLength(1); member_idx++)
         {
             m_FormedSkillCounts[skill_idx, member_idx] = 0;
         }
     }
     m_EnemyToPlayerTarget = GlobalDefine.PartyCharaIndex.ERROR;
     m_AutoPlayState       = AutoPlayState.OFF;
     m_IsUsedAutoPlay      = false;
 }
Ejemplo n.º 6
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);
                    }
                }
            }
        }
    }
Ejemplo n.º 7
0
    /*==========================================================================*/
    /*		func																*/
    /*==========================================================================*/

    protected override void Awake()
    {
        base.Awake();
        m_PlayerParty = null;
    }
Ejemplo n.º 8
0
    //------------------------------------------------------------------------

    /*!
     *      @brief		更新処理
     */
    //------------------------------------------------------------------------
    private void initPanel()
    {
        if (m_CharaIdx == GlobalDefine.PartyCharaIndex.ERROR)
        {
            return;
        }
        PacketStructUnit _unit     = null;
        PacketStructUnit _linkunit = null;
        {
            _unit               = new PacketStructUnit();
            _unit.id            = m_CharaId;
            _unit.level         = (uint)InGamePlayerParty.m_PlayerPartyChara[(int)m_CharaIdx].m_CharaLevel;
            _unit.unique_id     = 1;         // ダミー
            _unit.add_pow       = (uint)InGamePlayerParty.m_PlayerPartyChara[(int)m_CharaIdx].m_CharaPlusPow;
            _unit.add_def       = (uint)InGamePlayerParty.m_PlayerPartyChara[(int)m_CharaIdx].m_CharaPlusDef;
            _unit.add_hp        = (uint)InGamePlayerParty.m_PlayerPartyChara[(int)m_CharaIdx].m_CharaPlusHP;
            _unit.limitbreak_lv = (uint)InGamePlayerParty.m_PlayerPartyChara[(int)m_CharaIdx].m_CharaLBSLv;
            _unit.limitover_lv  = (uint)InGamePlayerParty.m_PlayerPartyChara[(int)m_CharaIdx].m_CharaLimitOver;
            _unit.link_info     = (uint)ServerDataDefine.CHARALINK_TYPE.CHARALINK_TYPE_NONE;
            if (InGamePlayerParty.m_PlayerPartyChara[(int)m_CharaIdx].m_LinkParam.m_CharaID != 0)
            {
                _unit.link_info        = (uint)ServerDataDefine.CHARALINK_TYPE.CHARALINK_TYPE_BASE;
                _linkunit              = new PacketStructUnit();
                _linkunit.id           = InGamePlayerParty.m_PlayerPartyChara[(int)m_CharaIdx].m_LinkParam.m_CharaID;
                _linkunit.level        = (uint)InGamePlayerParty.m_PlayerPartyChara[(int)m_CharaIdx].m_LinkParam.m_CharaLv;
                _linkunit.add_pow      = (uint)InGamePlayerParty.m_PlayerPartyChara[(int)m_CharaIdx].m_LinkParam.m_CharaPlusPow;
                _linkunit.add_hp       = (uint)InGamePlayerParty.m_PlayerPartyChara[(int)m_CharaIdx].m_LinkParam.m_CharaPlusHP;
                _unit.link_point       = (uint)InGamePlayerParty.m_PlayerPartyChara[(int)m_CharaIdx].m_LinkParam.m_CharaLinkPoint;
                _linkunit.limitover_lv = (uint)InGamePlayerParty.m_PlayerPartyChara[(int)m_CharaIdx].m_LinkParam.m_CharaLOLevel;
                _linkunit.link_info    = (uint)ServerDataDefine.CHARALINK_TYPE.CHARALINK_TYPE_LINK;
            }
        }
        MasterDataParamChara _master = InGamePlayerParty.m_PlayerPartyChara[(int)m_CharaIdx].m_CharaMasterDataParam;

        // 名前パネル設定
        unitNamePanel.setup(_master);
        unitNamePanel.IsViewPremiumButton = false;

        // スキルパネル設定
        unitSkillPanel.AllClear();
        unitSkillPanel.AddLeaderSkill(_master.skill_leader);
        unitSkillPanel.AddLimitBreakSkill(_master.skill_limitbreak, (int)_unit.limitbreak_lv);
        unitSkillPanel.AddActiveSkill(_master.skill_active0);
        if (_master.skill_passive == 0)
        {
            unitSkillPanel.AddActiveSkill(_master.skill_active1);
        }
        if (_master.skill_passive != 0)
        {
            unitSkillPanel.AddPassiveSkill(_master.skill_passive);
        }

        // ステータスパネル設定
        CharaParty party      = BattleParam.m_PlayerParty;
        CharaOnce  party_unit = party.getPartyMember(m_CharaIdx, CharaParty.CharaCondition.EXIST);
        int        pow        = (int)((float)party_unit.m_CharaPow * InGameUtil.getCharaAttakPowScale(party_unit, BattleParam.m_PlayerParty.m_Ailments.getAilment(m_CharaIdx)));

        unitParamPanel.setupUnit(_unit, _linkunit, false, party.m_HPCurrent.getValue(m_CharaIdx), party.m_HPMax.getValue(m_CharaIdx), pow);
        unitParamPanel.IsViewExp = false;

        if (_linkunit != null)
        {
            // リンクパネル設定
            unitLinkPanel.setupUnit(_unit, _linkunit, UnitLinkPanel.LinkParamType.Link);
            skillWindowTag.Link_tag_active = true;
        }
        else
        {
            skillWindowTag.Link_tag_active = false;
        }

        // 状態異常パネル設定
        unitAilmentPanel.AllClear();
        unitAilmentPanel.setupCharaAilmentInfo(SceneModeContinuousBattle.Instance.m_PlayerParty.m_Ailments.getAilment(m_CharaIdx));

        UnityUtil.SetObjectEnabledOnce(heroDetailPanel.gameObject, false);

        Label_text = GameTextUtil.GetText("battle_infotext3");
    }
Ejemplo n.º 9
0
    public void SkillCutinLeader(GlobalDefine.PartyCharaIndex charaIdx, CharaParty PlayerParty)
    {
        BattleSkillActivity activity = getLeaderSkillActivity(charaIdx, PlayerParty);

        SetSkillCutin(activity);
    }
Ejemplo n.º 10
0
    private static BattleSkillActivity getLeaderSkillActivity(GlobalDefine.PartyCharaIndex charaIdx, CharaParty PlayerParty)
    {
        BattleSkillActivity activity = new BattleSkillActivity();

        if (activity == null)
        {
            return(null);
        }

        if (charaIdx < 0 || charaIdx >= GlobalDefine.PartyCharaIndex.MAX)
        {
            return(null);
        }

        if (PlayerParty == null)
        {
            return(null);
        }
        // パーティリーダーキャラ情報を取得
        CharaOnce chara = PlayerParty.getPartyMember(charaIdx, CharaParty.CharaCondition.EXIST);

        if (chara == null)
        {
            return(null);
        }

        if (chara == null)
        {
            return(null);
        }

        if (!chara.m_bHasCharaMasterDataParam)
        {
            return(null);
        }

        MasterDataSkillLeader skill = BattleParam.m_MasterDataCache.useSkillLeader(chara.m_CharaMasterDataParam.skill_leader);

        if (skill == null)
        {
            return(null);
        }

        //--------------------------------------------------------------------
        // スキル発動情報設定
        //--------------------------------------------------------------------
        activity.m_SkillParamOwnerNum = charaIdx;
        activity.m_SkillParamFieldID  = 0;
        activity.m_SkillParamSkillID  = chara.m_CharaMasterDataParam.skill_leader;
        activity.m_SkillType          = ESKILLTYPE.eLEADER;

        return(activity);
    }