示例#1
0
    public bool CheckRequiredStats(UnitStatsSystem unit)
    {
        bool tmp = false;

        if (unit.GetCurrentStats[statRequirement] != null)
        {
            if (unit.GetCurrentStats[statRequirement].GetLevel >= statLevel)
            {
                tmp = true;
            }
        }
        return(tmp);
    }
示例#2
0
    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);
    }
示例#3
0
    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);
    }
示例#4
0
    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);
    }