Пример #1
0
        public static Spell Generate(int input)
        {
            Random        r              = new Random(input);
            double        elementSelect  = r.NextDouble() * TotalWeightingElements;
            double        typeSelect     = r.NextDouble() * TotalWeightingTypes;
            double        modifierSelect = r.NextDouble() * TotalWeightingModifiers;
            Element       element        = Locate <Element>(Elements, elementSelect);
            SpellType     type           = Locate <SpellType>(Types, typeSelect);
            SpellModifier modifier       = Locate <SpellModifier>(Modifiers, modifierSelect);

            return(new Spell(element, type, modifier));
        }
Пример #2
0
 internal Spell(Element element, SpellType type, SpellModifier modifier)
 {
     this.Element  = element;
     this.Type     = type;
     this.Modifier = modifier;
 }