示例#1
0
    public static int GetExtraEffectCorrectionValue(int areaId, List <ExtraEffectStatus> extraEffectStatusList, int baseValue, MonsterData[] chipPlayers, MonsterData[] chipEnemys, MonsterData chipTarget, AffectEffectProperty affectEffectProperty, EffectStatusBase.ExtraEffectType effectType)
    {
        List <ExtraEffectStatus> list = ChipEffectStatus.CheckStageEffectInvalid(areaId, extraEffectStatusList, chipPlayers, chipEnemys, chipTarget);

        if (list.Count == 0)
        {
            return(baseValue);
        }
        bool flag = chipEnemys.Where((MonsterData item) => item.userMonster.userMonsterId == chipTarget.userMonster.userMonsterId).Any <MonsterData>();

        GameWebAPI.RespDataMA_GetMonsterMG.MonsterM         group = MonsterMaster.GetMonsterMasterByMonsterGroupId(chipTarget.monsterM.monsterGroupId).Group;
        GameWebAPI.RespDataMA_MonsterIntegrationGroupMaster responseMonsterIntegrationGroupMaster = MasterDataMng.Instance().ResponseMonsterIntegrationGroupMaster;
        GameWebAPI.RespDataMA_MonsterIntegrationGroupMaster.MonsterIntegrationGroup[] source      = responseMonsterIntegrationGroupMaster.monsterIntegrationGroupM.Where((GameWebAPI.RespDataMA_MonsterIntegrationGroupMaster.MonsterIntegrationGroup item) => item.monsterId == chipTarget.monsterM.monsterId).ToArray <GameWebAPI.RespDataMA_MonsterIntegrationGroupMaster.MonsterIntegrationGroup>();
        string[] monsterIntegrationIds = source.Select((GameWebAPI.RespDataMA_MonsterIntegrationGroupMaster.MonsterIntegrationGroup item) => item.monsterIntegrationId).ToArray <string>();
        GameWebAPI.RespDataMA_GetMonsterResistanceM.MonsterResistanceM        resistanceMaster     = MonsterResistanceData.GetResistanceMaster(chipTarget.monsterM.resistanceId);
        List <GameWebAPI.RespDataMA_GetMonsterResistanceM.MonsterResistanceM> uniqueResistanceList = MonsterResistanceData.GetUniqueResistanceList(chipTarget.GetResistanceIdList());

        GameWebAPI.RespDataMA_GetMonsterResistanceM.MonsterResistanceM data = MonsterResistanceData.AddResistanceFromMultipleTranceData(resistanceMaster, uniqueResistanceList);
        Tolerance tolerance = ServerToBattleUtility.ResistanceToTolerance(data);
        GrowStep  growStep  = MonsterGrowStepData.ToGrowStep(group.growStep);
        List <ExtraEffectStatus> totalExtraEffectStatusList = ExtraEffectStatus.GetTotalExtraEffectStatusList(list, monsterIntegrationIds, chipTarget.monsterM.monsterGroupId, tolerance, group.tribe, growStep, affectEffectProperty, null, (!flag) ? ExtraEffectStatus.ExtraTargetType.Player : ExtraEffectStatus.ExtraTargetType.Enemy, effectType);

        if (totalExtraEffectStatusList.Count > 0)
        {
            return((int)ExtraEffectStatus.GetCorrectionValue((float)baseValue, totalExtraEffectStatusList));
        }
        return(baseValue);
    }
 public void SetBossDetails(MonsterData monsterData, int resistanceId)
 {
     this.digimonNameLabel.text = monsterData.monsterMG.monsterName;
     this.tribeLabel.text       = MonsterTribeData.GetTribeName(monsterData.monsterMG.tribe);
     this.growStepLabel.text    = MonsterGrowStepData.GetGrowStepName(monsterData.monsterMG.growStep);
     GameWebAPI.RespDataMA_GetMonsterResistanceM.MonsterResistanceM resistanceMaster = MonsterResistanceData.GetResistanceMaster(resistanceId.ToString());
     this.monsterResistanceList.SetValues(resistanceMaster);
     this.monsterInvalidResistanceList.SetInvalid(resistanceMaster);
 }
        public void SetViewNextEvolutionMonster(string monsterId, GameWebAPI.RespDataUS_GetMonsterList.UserMonsterList userMonster)
        {
            GameWebAPI.RespDataMA_GetMonsterMS.MonsterM simple = MonsterMaster.GetMonsterMasterByMonsterId(monsterId).Simple;
            GameWebAPI.RespDataMA_GetMonsterMG.MonsterM group  = MonsterMaster.GetMonsterMasterByMonsterGroupId(simple.monsterGroupId).Group;
            DataMng.ExperienceInfo experienceInfo = DataMng.Instance().GetExperienceInfo(0);
            MonsterData            monsterData    = new MonsterData(new GameWebAPI.RespDataUS_GetMonsterList.UserMonsterList(userMonster)
            {
                monsterId   = monsterId,
                level       = "1",
                ex          = "0",
                levelEx     = "0",
                nextLevelEx = experienceInfo.expLevNext.ToString()
            });

            if (!string.IsNullOrEmpty(group.leaderSkillId) && "0" != group.leaderSkillId)
            {
                monsterData.userMonster.leaderSkillId = group.leaderSkillId;
                monsterData.InitSkillInfo();
            }
            StatusValue statusValue = MonsterStatusData.GetStatusValue(monsterId, "1");

            statusValue.luck = int.Parse(userMonster.luck);
            monsterData.SetStatus(statusValue);
            CMD_CharacterDetailed.DataChg = monsterData;
            GameWebAPI.RespDataMA_GetMonsterResistanceM.MonsterResistanceM resistanceMaster = MonsterResistanceData.GetResistanceMaster(monsterData.monsterM.resistanceId);
            bool active = this.AnyMatchStrongResistance(resistanceMaster, userMonster.tranceResistance, userMonster.tranceStatusAilment);

            this.nextMonsterResistanceAlert.gameObject.SetActive(active);
        }
示例#4
0
 public void ShowMATInfo(MonsterData monsterData)
 {
     if (monsterData == null)
     {
         this.ClearDigimonStatus();
     }
     else
     {
         if (null != this.monsterBasicInfo)
         {
             this.monsterBasicInfo.SetMonsterData(monsterData);
         }
         this.statusList.SetValues(monsterData, false, false);
         GameWebAPI.RespDataMA_GetMonsterResistanceM.MonsterResistanceM        resistanceMaster     = MonsterResistanceData.GetResistanceMaster(monsterData.monsterM.resistanceId);
         List <GameWebAPI.RespDataMA_GetMonsterResistanceM.MonsterResistanceM> uniqueResistanceList = MonsterResistanceData.GetUniqueResistanceList(monsterData.GetResistanceIdList());
         GameWebAPI.RespDataMA_GetMonsterResistanceM.MonsterResistanceM        values = MonsterResistanceData.AddResistanceFromMultipleTranceData(resistanceMaster, uniqueResistanceList);
         this.resistanceList.SetValues(values);
         if (this.medalList != null)
         {
             this.medalList.SetValues(monsterData.userMonster);
         }
     }
 }
示例#5
0
    public void SetValues(MonsterData monsterData)
    {
        GameWebAPI.RespDataMA_GetMonsterResistanceM.MonsterResistanceM        resistanceMaster     = MonsterResistanceData.GetResistanceMaster(monsterData.monsterM.resistanceId);
        List <GameWebAPI.RespDataMA_GetMonsterResistanceM.MonsterResistanceM> uniqueResistanceList = MonsterResistanceData.GetUniqueResistanceList(monsterData.GetResistanceIdList());

        GameWebAPI.RespDataMA_GetMonsterResistanceM.MonsterResistanceM values = MonsterResistanceData.AddResistanceFromMultipleTranceData(resistanceMaster, uniqueResistanceList);
        this.SetValues(values);
    }
    private static Tolerance ResistanceToTolerance(MonsterData monsterData)
    {
        GameWebAPI.RespDataMA_GetMonsterResistanceM.MonsterResistanceM        resistanceMaster     = MonsterResistanceData.GetResistanceMaster(monsterData.monsterM.resistanceId);
        List <GameWebAPI.RespDataMA_GetMonsterResistanceM.MonsterResistanceM> uniqueResistanceList = MonsterResistanceData.GetUniqueResistanceList(monsterData.GetResistanceIdList());

        GameWebAPI.RespDataMA_GetMonsterResistanceM.MonsterResistanceM data = MonsterResistanceData.AddResistanceFromMultipleTranceData(resistanceMaster, uniqueResistanceList);
        return(ServerToBattleUtility.ResistanceToTolerance(data));
    }
示例#7
0
        public void OnOpenWindow()
        {
            GameWebAPI.RespDataMA_GetMonsterResistanceM.MonsterResistanceM        resistanceMaster           = MonsterResistanceData.GetResistanceMaster(this.uiParam.uniqueResistanceId);
            List <GameWebAPI.RespDataMA_GetMonsterResistanceM.MonsterResistanceM> uniqueResistanceListByJson = MonsterResistanceData.GetUniqueResistanceListByJson(this.uiParam.oldResistanceIds);

            GameWebAPI.RespDataMA_GetMonsterResistanceM.MonsterResistanceM oldResistance = MonsterResistanceData.AddResistanceFromMultipleTranceData(resistanceMaster, uniqueResistanceListByJson);
            this.statusResistance.CreateResistanceCoverEffect();
            int num = this.statusResistance.CreateResistanceIconEffect(oldResistance, this.uiParam.newResistanceIds);

            this.cutinController = PartsUpperCutinController.Create(this.cutinParentObject, num + 1);
        }
    public static List <ExtraEffectStatus> CheckStageEffectInvalid(int areaId, List <ExtraEffectStatus> extraEffectStatusList, MonsterData[] chipPlayers, MonsterData[] chipEnemys, MonsterData chipTarget)
    {
        List <ExtraEffectStatus> list = new List <ExtraEffectStatus>();
        bool flag = chipEnemys.Where((MonsterData item) => item.userMonster.userMonsterId == chipTarget.userMonster.userMonsterId).Any <MonsterData>();

        GameWebAPI.RespDataMA_GetMonsterMG.MonsterM         group = MonsterMaster.GetMonsterMasterByMonsterGroupId(chipTarget.monsterM.monsterGroupId).Group;
        GameWebAPI.RespDataMA_MonsterIntegrationGroupMaster responseMonsterIntegrationGroupMaster = MasterDataMng.Instance().ResponseMonsterIntegrationGroupMaster;
        GameWebAPI.RespDataMA_MonsterIntegrationGroupMaster.MonsterIntegrationGroup[] source      = responseMonsterIntegrationGroupMaster.monsterIntegrationGroupM.Where((GameWebAPI.RespDataMA_MonsterIntegrationGroupMaster.MonsterIntegrationGroup item) => item.monsterId == chipTarget.monsterM.monsterId).ToArray <GameWebAPI.RespDataMA_MonsterIntegrationGroupMaster.MonsterIntegrationGroup>();
        string[] monsterIntegrationIds = source.Select((GameWebAPI.RespDataMA_MonsterIntegrationGroupMaster.MonsterIntegrationGroup item) => item.monsterIntegrationId).ToArray <string>();
        GameWebAPI.RespDataMA_GetMonsterResistanceM.MonsterResistanceM        resistanceMaster     = MonsterResistanceData.GetResistanceMaster(chipTarget.monsterM.resistanceId);
        List <GameWebAPI.RespDataMA_GetMonsterResistanceM.MonsterResistanceM> uniqueResistanceList = MonsterResistanceData.GetUniqueResistanceList(chipTarget.GetResistanceIdList());

        GameWebAPI.RespDataMA_GetMonsterResistanceM.MonsterResistanceM data = MonsterResistanceData.AddResistanceFromMultipleTranceData(resistanceMaster, uniqueResistanceList);
        Tolerance tolerance = ServerToBattleUtility.ResistanceToTolerance(data);
        GrowStep  growStep  = MonsterGrowStepData.ToGrowStep(group.growStep);

        foreach (ExtraEffectStatus extraEffectStatus in extraEffectStatusList)
        {
            bool flag2 = true;
            for (int i = 0; i < chipPlayers.Length; i++)
            {
                MonsterData chipActer = chipPlayers[i];
                if (chipActer != null)
                {
                    ChipEffectStatus.TargetType targetType;
                    if (chipActer.userMonster.userMonsterId == chipTarget.userMonster.userMonsterId)
                    {
                        targetType = ChipEffectStatus.TargetType.Actor;
                    }
                    else if (!chipEnemys.Where((MonsterData item) => item.userMonster.userMonsterId == chipActer.userMonster.userMonsterId).Any <MonsterData>())
                    {
                        if (!flag)
                        {
                            targetType = ChipEffectStatus.TargetType.Player;
                        }
                        else
                        {
                            targetType = ChipEffectStatus.TargetType.Enemy;
                        }
                    }
                    else if (flag)
                    {
                        targetType = ChipEffectStatus.TargetType.Player;
                    }
                    else
                    {
                        targetType = ChipEffectStatus.TargetType.Enemy;
                    }
                    foreach (int num in chipActer.GetChipEquip().GetChipIdList())
                    {
                        GameWebAPI.RespDataMA_ChipEffectM.ChipEffect[] array = ChipDataMng.GetChipEffectData(num.ToString());
                        array = ChipEffectStatus.GetStageEffectInvalidList(areaId, array, extraEffectStatus).ToArray();
                        if (array.Length > 0)
                        {
                            List <GameWebAPI.RespDataMA_ChipEffectM.ChipEffect> totalChipEffectStatusList = ChipEffectStatus.GetTotalChipEffectStatusList(array, flag, monsterIntegrationIds, chipTarget.monsterM.monsterGroupId, tolerance, group.tribe, growStep, null, null, targetType, EffectStatusBase.ExtraEffectType.StageEffextInvalid);
                            if (totalChipEffectStatusList.Count > 0)
                            {
                                flag2 = false;
                                break;
                            }
                        }
                    }
                }
            }
            if (flag2)
            {
                list.Add(extraEffectStatus);
            }
        }
        return(list);
    }