Ejemplo n.º 1
0
        public static Entity MakeRelic()
        {
            Entity         item;
            RelicArchetype archetype = RandomUtils.EnumRandom <RelicArchetype>();

            switch (archetype)
            {
            default:
            case RelicArchetype.MeleeWeapon:
            case RelicArchetype.TossingWeapon:
                item = TossingWeaponFunctions.Random().Invoke();
                break;

            case RelicArchetype.RangedWeapon:
            case RelicArchetype.Wearable:
            case RelicArchetype.Utility:
            case RelicArchetype.MagicWeapon:
                item = MagicWeaponFunctions.Random().Invoke();
                break;
            }
            Components.Relic comp = new Components.Relic();
            item.AddComponent(comp);
            NameRelic(item, comp);
            return(item);
        }