Exemplo n.º 1
0
        public void Target( IPoint3D p )
        {
            if ( ( Caster.Followers + 4 ) > Caster.FollowersMax )
            {
                Caster.SendLocalizedMessage( 1049645 ); // You have too many followers to summon that creature.
                return;
            }

            Map map = Caster.Map;

            SpellHelper.GetSurfaceTop( ref p );

            if ( map == null || ( Caster.IsPlayer && !map.CanSpawnMobile( p.X, p.Y, p.Z ) ) )
            {
                Caster.SendLocalizedMessage( 501942 ); // That location is blocked.
            }
            else if ( SpellHelper.CheckTown( p, Caster ) && CheckSequence() )
            {
                int level = (int) ( ( GetBaseSkill( Caster ) + GetBoostSkill( Caster ) ) / 2.0 );

                TimeSpan duration = TimeSpan.FromSeconds( 10 + level );

                BaseCreature summon = new AnimatedWeapon( Caster, level );
                BaseCreature.Summon( summon, false, Caster, new Point3D( p ), 0x212, duration );

                summon.PlaySound( 0x64A );

                Effects.SendTargetParticles( summon, 0x3728, 10, 10, 0x13AA, (EffectLayer) 255 );
            }

            FinishSequence();
        }
Exemplo n.º 2
0
		public override void OnCast()
		{
			if ( CheckSequence() )
			{
                TimeSpan duration = TimeSpan.FromSeconds((Caster.Skills[CastSkill].Fixed + Caster.Skills[DamageSkill].Fixed) / 5);

                AnimatedWeapon anim = new AnimatedWeapon();

                anim.Skills[SkillName.Anatomy].Base = Caster.Skills[SkillName.Anatomy].Base;
                anim.Skills[SkillName.Tactics].Base = Caster.Skills[SkillName.Tactics].Base;

				SpellHelper.Summon( anim, Caster, 0x216, duration, true, true, false, SkillName.Mysticism );
			}

			FinishSequence();
		}