public void SetSkill(MonsterData monsterData) { if (this.isUniqueSkill) { if (monsterData.GetUniqueSkill() != null) { this.SetSkillUI(monsterData.GetUniqueSkill().name, monsterData.GetUniqueSkill().description, monsterData.GetUniqueSkill().needPoint, monsterData.GetUniqueSkillDetail().attribute); } } else { int num = this.successionSkillSlotId; if (num == 1 || num != 2) { if (monsterData.GetCommonSkill() != null) { this.SetSkillUI(monsterData.GetCommonSkill().name, monsterData.GetCommonSkill().description, monsterData.GetCommonSkill().needPoint, monsterData.GetCommonSkillDetail().attribute); } } else if (monsterData.GetExtraCommonSkill() != null) { this.SetSkillUI(monsterData.GetExtraCommonSkill().name, monsterData.GetExtraCommonSkill().description, monsterData.GetExtraCommonSkill().needPoint, monsterData.GetExtraCommonSkillDetail().attribute); } else { this.ClearSkill(); } } }
public void SetCommonSkill(MonsterData monsterData) { this.successionSkillSlotId = 1; this.title.text = StringMaster.GetString("SkillInheritTitle1"); if (monsterData != null && monsterData.GetCommonSkill() != null) { this.SetSkillUI(monsterData.GetCommonSkill().name, monsterData.GetCommonSkill().description, monsterData.GetCommonSkill().needPoint, monsterData.GetCommonSkillDetail().attribute); } else { this.ClearSkill(); } }
private static bool CheckSkill(MonsterData monsterData, string targetValue) { bool result = false; if (monsterData.GetCommonSkill() != null && monsterData.GetCommonSkill().skillId == targetValue) { result = true; } else if (monsterData.GetLeaderSkill() != null && monsterData.GetLeaderSkill().skillId == targetValue) { result = true; } return(result); }
private int CalcClusterForSuccession(MonsterData baseDigimon, List <MonsterData> partnerDigimons) { int num = baseDigimon.monsterM.GetArousal() + ConstValue.SUCCESSION_BASE_COEFFICIENT; int num2 = 0; int num3 = 0; for (int i = 0; i < partnerDigimons.Count; i++) { MonsterData monsterData = partnerDigimons[i]; if (monsterData.GetCommonSkill() != null) { num2 += int.Parse(monsterData.GetCommonSkill().inheritancePrice); num3 += monsterData.monsterM.GetArousal() + ConstValue.SUCCESSION_PARTNER_COEFFICIENT; } } return(num * num2 * num3 + ConstValue.SUCCESSION_COEFFICIENT); }
private static bool CheckExtraParams(MonsterData monsterData, GameWebAPI.RespDataMA_EventPointBonusM.EventPointBonus eventPointBonus) { if (float.Parse(eventPointBonus.effectValue) < 0f) { return(false); } ExtraEffectUtil.EventPointBonusTargetSubType eventPointBonusTargetSubType = (ExtraEffectUtil.EventPointBonusTargetSubType) int.Parse(eventPointBonus.targetSubType); switch (eventPointBonusTargetSubType) { case ExtraEffectUtil.EventPointBonusTargetSubType.MonsterTribe: if (monsterData.monsterMG.tribe.Equals(eventPointBonus.targetValue)) { return(true); } break; case ExtraEffectUtil.EventPointBonusTargetSubType.MonsterGroup: if (monsterData.monsterMG.monsterGroupId.Equals(eventPointBonus.targetValue)) { return(true); } break; case ExtraEffectUtil.EventPointBonusTargetSubType.GrowStep: if (monsterData.monsterMG.growStep.Equals(eventPointBonus.targetValue)) { return(true); } break; case ExtraEffectUtil.EventPointBonusTargetSubType.SkillId: if (monsterData.GetCommonSkill() != null && monsterData.GetCommonSkill().skillId.Equals(eventPointBonus.targetValue)) { return(true); } if (monsterData.GetLeaderSkill() != null && monsterData.GetLeaderSkill().skillId.Equals(eventPointBonus.targetValue)) { return(true); } break; case ExtraEffectUtil.EventPointBonusTargetSubType.ChipId: { MonsterChipEquipData chipEquip = monsterData.GetChipEquip(); int[] chipIdList = chipEquip.GetChipIdList(); if (chipIdList.Where((int item) => item == eventPointBonus.targetValue.ToInt32()).Any <int>()) { return(true); } break; } default: if (eventPointBonusTargetSubType == ExtraEffectUtil.EventPointBonusTargetSubType.MonsterIntegrationGroup) { GameWebAPI.RespDataMA_MonsterIntegrationGroupMaster.MonsterIntegrationGroup[] monsterIntegrationGroupM = MasterDataMng.Instance().ResponseMonsterIntegrationGroupMaster.monsterIntegrationGroupM; for (int i = 0; i < monsterIntegrationGroupM.Length; i++) { if (eventPointBonus.targetValue.Equals(monsterIntegrationGroupM[i].monsterIntegrationId) && monsterIntegrationGroupM[i].monsterId.Equals(monsterData.monsterM.monsterId)) { return(true); } } } break; } return(false); }