Exemple #1
0
        public override void OnCast()
        {
            if (CheckSequence())
            {
                try
                {
                    BaseCreature creature = (BaseCreature)Activator.CreateInstance(m_Types[Utility.Random(m_Types.Length)]);

                    creature.RangePerception = 100;
                    creature.ControlSlots    = 5;

                    int amount1 = 2 * (int)(Caster.Skills[SkillName.EvalInt].Value / 25);

                    creature.RawStr += (Caster.RawInt) * amount1;
                    creature.RawDex += (Caster.RawInt) * amount1;
                    creature.RawInt += (Caster.RawInt) * amount1;

                    creature.Hits += (Caster.RawInt) * amount1;
                    creature.Stam += (Caster.RawInt) * amount1;
                    creature.Mana += (Caster.RawInt) * amount1;

                    int amount2 = 1 + (int)(Caster.Skills[SkillName.EvalInt].Value / 25);

                    creature.DamageMin += (Caster.FollowersMax) * amount2;
                    creature.DamageMax += (Caster.FollowersMax) * amount2;

                    int amount3 = 3 * (int)(Caster.Skills[SkillName.MagicResist].Value / 5);

                    ResistanceMod mod1 = new ResistanceMod(ResistanceType.Physical, +amount3);
                    ResistanceMod mod2 = new ResistanceMod(ResistanceType.Fire, +amount3);
                    ResistanceMod mod3 = new ResistanceMod(ResistanceType.Cold, +amount3);
                    ResistanceMod mod4 = new ResistanceMod(ResistanceType.Poison, +amount3);
                    ResistanceMod mod5 = new ResistanceMod(ResistanceType.Energy, +amount3);

                    int amount4 = 5 * (int)(Caster.Skills[SkillName.Inscribe].Value / 5);

                    SkillMod mod6 = new DefaultSkillMod(SkillName.Anatomy, true, +amount4);
                    SkillMod mod7 = new DefaultSkillMod(SkillName.MagicResist, true, +amount4);
                    SkillMod mod8 = new DefaultSkillMod(SkillName.Tactics, true, +amount4);
                    SkillMod mod9 = new DefaultSkillMod(SkillName.Wrestling, true, +amount4);

                    creature.AddResistanceMod(mod1);
                    creature.AddResistanceMod(mod2);
                    creature.AddResistanceMod(mod3);
                    creature.AddResistanceMod(mod4);
                    creature.AddResistanceMod(mod5);

                    creature.AddSkillMod(mod6);
                    creature.AddSkillMod(mod7);
                    creature.AddSkillMod(mod8);
                    creature.AddSkillMod(mod9);

                    TimeSpan duration;

                    duration = TimeSpan.FromHours(1.0);

                    SpellHelper.Summon(creature, Caster, 0x215, duration, false, false);
                }
                catch
                {
                }
            }

            FinishSequence();
        }