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 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)); }
private GameObject GetEffectRootObject(GameWebAPI.RespDataMA_GetMonsterResistanceM.MonsterResistanceM oldResistance, string newResistanceIds) { List <GameWebAPI.RespDataMA_GetMonsterResistanceM.MonsterResistanceM> uniqueResistanceListByJson = MonsterResistanceData.GetUniqueResistanceListByJson(newResistanceIds); GameObject result = null; for (int i = 0; i < uniqueResistanceListByJson.Count; i++) { if ("1" == uniqueResistanceListByJson[i].none && "1" != oldResistance.none) { result = this.resistanceNone; break; } if ("1" == uniqueResistanceListByJson[i].fire && "1" != oldResistance.fire) { result = this.resistanceFire; break; } if ("1" == uniqueResistanceListByJson[i].water && "1" != oldResistance.water) { result = this.resistanceWater; break; } if ("1" == uniqueResistanceListByJson[i].thunder && "1" != oldResistance.thunder) { result = this.resistanceThunder; break; } if ("1" == uniqueResistanceListByJson[i].nature && "1" != oldResistance.nature) { result = this.resistanceNature; break; } if ("1" == uniqueResistanceListByJson[i].dark && "1" != oldResistance.dark) { result = this.resistanceDark; break; } if ("1" == uniqueResistanceListByJson[i].light && "1" != oldResistance.light) { result = this.resistanceLight; break; } if ("1" == uniqueResistanceListByJson[i].stun && "1" != oldResistance.stun) { result = this.resistanceStun; break; } if ("1" == uniqueResistanceListByJson[i].skillLock && "1" != oldResistance.skillLock) { result = this.resistanceSkillLock; break; } if ("1" == uniqueResistanceListByJson[i].sleep && "1" != oldResistance.sleep) { result = this.resistanceSleep; break; } if ("1" == uniqueResistanceListByJson[i].paralysis && "1" != oldResistance.paralysis) { result = this.resistanceParalysis; break; } if ("1" == uniqueResistanceListByJson[i].confusion && "1" != oldResistance.confusion) { result = this.resistanceConfusion; break; } if ("1" == uniqueResistanceListByJson[i].poison && "1" != oldResistance.poison) { result = this.resistancePoison; break; } if ("1" == uniqueResistanceListByJson[i].death && "1" != oldResistance.death) { result = this.resistanceDeath; break; } } return(result); }
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); }
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 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); } } }
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); }