public bool CheckRequiredStats(UnitStatsSystem unit) { bool tmp = false; if (unit.GetCurrentStats[statRequirement] != null) { if (unit.GetCurrentStats[statRequirement].GetLevel >= statLevel) { tmp = true; } } return(tmp); }
public bool AnalyzeThisSkillRequirement(BaseCombo skill, UnitStatsSystem unitStats) { bool hasPassed = true; foreach (ComboRequirement item in skill.requirements) { if (hasPassed) { if (!item.CheckRequiredStats(unitStats)) { hasPassed = false; break; } } } return(hasPassed); }
public List <BaseCombo> ObtainFireMagicCombos(UnitBaseBehaviourComponent unit) { List <BaseCombo> fireCombo = new List <BaseCombo>(); fireCombo = unit.mySkills.fireMagic; UnitStatsSystem stat = unit.myStats; foreach (BaseCombo item in fireMagicCombos) { if (!fireCombo.Contains(item)) { // Check Requirement if (AnalyzeThisSkillRequirement(item, stat)) { fireCombo.Add(item); } } } return(fireCombo); }
public List <BaseCombo> ObtainBuffCombos(UnitBaseBehaviourComponent unit) { List <BaseCombo> availableCombo = new List <BaseCombo>(); availableCombo = unit.mySkills.buff; UnitStatsSystem stat = unit.myStats; foreach (BaseCombo item in buffCombos) { if (!availableCombo.Contains(item)) { // Check Requirement if (AnalyzeThisSkillRequirement(item, stat)) { availableCombo.Add(item); } } } return(availableCombo); }