예제 #1
0
        private IEnumerable <Spell> InitializeSpells()
        {
            var fireball = new CombatSpell
            {
                Damage      = 40,
                DamageType  = DamageType.Fire,
                MagickaCost = 133,
            };

            var invisibility = new SupportSpell
            {
                Description = "Makes caster invisible",
                MagickaCost = 334,
            };

            var silentStep = new SupportSpell
            {
                Description = "Makes caster's moves silent",
                MagickaCost = 144,
            };

            var detectLife = new SupportSpell
            {
                Description = "Detects living creatures",
                MagickaCost = 100,
            };

            var healing = new SupportSpell
            {
                Description = "Heals caster",
                MagickaCost = 12,
            };

            var manaSyphon = new SupportSpell
            {
                Description = "Converts health to mana",
                MagickaCost = -25,
            };

            // non symetric relationship
            invisibility.SynergyWith = new[] { silentStep, detectLife };
            silentStep.SynergyWith   = new[] { invisibility };

            healing.SynergyWith    = new[] { manaSyphon };
            manaSyphon.SynergyWith = new[] { healing };

            return(new Spell[] { fireball, invisibility, silentStep, detectLife, healing, manaSyphon });
        }
        private IEnumerable<Spell> InitializeSpells()
        {
            var fireball = new CombatSpell
            {
                Damage = 40,
                DamageType = DamageType.Fire,
                MagickaCost = 133,
            };

            var invisibility = new SupportSpell
            {
                Description = "Makes caster invisible",
                MagickaCost = 334,
            };

            var silentStep = new SupportSpell
            {
                Description = "Makes caster's moves silent",
                MagickaCost = 144,
            };

            var detectLife = new SupportSpell
            {
                Description = "Detects living creatures",
                MagickaCost = 100,
            };

            var healing = new SupportSpell
            {
                Description = "Heals caster",
                MagickaCost = 12,
            };

            var manaSyphon = new SupportSpell
            {
                Description = "Converts health to mana",
                MagickaCost = -25,
            };

            // non symetric relationship
            invisibility.SynergyWith = new[] { silentStep, detectLife };
            silentStep.SynergyWith = new[] { invisibility };

            healing.SynergyWith = new[] { manaSyphon };
            manaSyphon.SynergyWith = new[] { healing };

            return new Spell[] { fireball, invisibility, silentStep, detectLife, healing, manaSyphon };
        }