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 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); } } }
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)); }
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); }
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); }