Ejemplo n.º 1
0
    public void AddRandomStatAffixes(int affixCount)
    {
        List <string> bonusTags = new List <string>();

        foreach (Affix a in mobAffixes)
        {
            bonusTags.Add(a.Base.AffixBonusTypeString);
        }
        for (int i = 0; i < affixCount; i++)
        {
            Affix affix = new Affix(ResourceManager.Instance.GetRandomAffixBase(AffixType.MONSTERMOD, Data.Level, null, bonusTags));
            mobAffixes.Add(affix);
            bonusTags.Add(affix.Base.AffixBonusTypeString);
            for (int j = 0; j < affix.Base.affixBonuses.Count; j++)
            {
                AffixBonusProperty prop = affix.Base.affixBonuses[j];
                Data.AddStatBonus(prop.bonusType, prop.restriction, prop.modifyType, affix.GetAffixValue(j));
            }
        }
    }