示例#1
0
        public override void OnCast()
        {
            if (CheckSequence())
            {
                Caster.PlaySound(0x5C6);

                var range  = 5 + FocusLevel;
                var damage = 25 + FocusLevel;

                var skill = Caster.Skills.Spellweaving.Value;

                var duration = TimeSpan.FromSeconds((int)(skill / 24) + FocusLevel);

                var fcMalus  = FocusLevel + 1;
                var ssiMalus = 2 * (FocusLevel + 1);

                var eable = Caster.GetMobilesInRange(range);

                foreach (var m in eable)
                {
                    if (Caster == m || !Caster.InLOS(m) || !SpellHelper.ValidIndirectTarget(Caster, m) ||
                        !Caster.CanBeHarmful(m, false))
                    {
                        continue;
                    }

                    Caster.DoHarmful(m);

                    SpellHelper.Damage(this, m, damage, 0, 0, 100, 0, 0);

                    if (CheckResisted(m))
                    {
                        continue;
                    }

                    m_Table[m] = new EssenceOfWindInfo(m, fcMalus, ssiMalus, duration);

                    BuffInfo.AddBuff(
                        m,
                        new BuffInfo(
                            BuffIcon.EssenceOfWind,
                            1075802,
                            duration,
                            m,
                            $"{fcMalus.ToString()}\t{ssiMalus.ToString()}"
                            )
                        );
                }

                eable.Free();
            }

            FinishSequence();
        }
示例#2
0
        public override void OnCast()
        {
            if (CheckSequence())
            {
                Caster.PlaySound(0x5C6);

                int range  = 5 + FocusLevel;
                int damage = 10 + FocusLevel;

                double skill    = Caster.Skills[SkillName.Spellweaving].Value;
                int    dmgBonus = Math.Max((int)(skill / 24.0d), 1);
                damage += dmgBonus;

                TimeSpan duration = TimeSpan.FromSeconds((int)(skill / 24) + FocusLevel);

                int fcMalus  = FocusLevel + 1;
                int ssiMalus = 2 * (FocusLevel + 1);

                List <Mobile> targets = new List <Mobile>();

                IPooledEnumerable eable = Caster.GetMobilesInRange(range);

                foreach (Mobile m in eable)
                {
                    if (Caster != m && Caster.InLOS(m) && SpellHelper.ValidIndirectTarget(Caster, m) && Caster.CanBeHarmful(m, false))
                    {
                        targets.Add(m);
                    }
                }

                eable.Free();

                for (int i = 0; i < targets.Count; i++)
                {
                    Mobile m = targets[i];

                    Caster.DoHarmful(m);

                    SpellHelper.Damage(this, m, damage, 0, 0, 100, 0, 0);

                    if (!CheckResisted(m))      //No message on resist
                    {
                        m_Table[m] = new EssenceOfWindInfo(m, fcMalus, ssiMalus, duration);

                        BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.EssenceOfWind, 1075802, duration, m, String.Format("{0}\t{1}", fcMalus.ToString(), ssiMalus.ToString())));

                        m.Delta(MobileDelta.WeaponDamage);
                    }
                }
            }

            FinishSequence();
        }
示例#3
0
        public override void OnCast()
        {
            if (CheckSequence())
            {
                Caster.PlaySound(0x5C6);

                int focuslevel = GetFocusLevel(Caster);

                int range  = 5 + focuslevel;
                int damage = 25 + focuslevel;

                double skill = Caster.Skills[SkillName.Spellweaving].Value;

                TimeSpan duration = TimeSpan.FromSeconds((int)(skill / 24) + focuslevel);

                int fcMalus  = focuslevel + 1;
                int ssiMalus = 2 * (focuslevel + 1);

                ArrayList targets = new ArrayList();

                foreach (Mobile m in Caster.GetMobilesInRange(range))
                {
                    if (Caster != m && Caster.InLOS(m) && SpellHelper.ValidIndirectTarget(Caster, m) && Caster.CanBeHarmful(m, false))
                    {
                        targets.Add(m);
                    }
                }

                for (int i = 0; i < targets.Count; i++)
                {
                    Mobile m = (Mobile)targets[i];

                    Caster.DoHarmful(m);

                    SpellHelper.Damage(this, m, damage, 0, 0, 100, 0, 0);

                    if (!CheckResisted(m))                              //No message on resist
                    {
                        m_Table[m] = new EssenceOfWindInfo(m, fcMalus, ssiMalus, duration);

                        BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.EssenceOfWind, 1075802, duration, m, String.Format("{0}\t{1}", fcMalus.ToString(), ssiMalus.ToString())));
                    }
                }
            }

            FinishSequence();
        }
		public override void OnCast()
		{
			if( CheckSequence() )
			{
				Caster.PlaySound( 0x5C6 );

				int range = 5 + FocusLevel;
				int damage = 25 + FocusLevel;

				double skill = Caster.Skills[SkillName.Spellweaving].Value;

				TimeSpan duration = TimeSpan.FromSeconds( (int)(skill / 24) + FocusLevel );

				int fcMalus = FocusLevel + 1;
				int ssiMalus = 2 * (FocusLevel + 1);

				List<Mobile> targets = new List<Mobile>();

				foreach( Mobile m in Caster.GetMobilesInRange( range ) )
				{
					if( Caster != m && Caster.InLOS( m ) && SpellHelper.ValidIndirectTarget( Caster, m ) && Caster.CanBeHarmful( m, false ) )
						targets.Add( m );
				}

				for( int i = 0; i < targets.Count; i++ )
				{
					Mobile m = targets[i];

					Caster.DoHarmful( m );

					SpellHelper.Damage( this, m, damage, 0, 0, 100, 0, 0 );

					if( !CheckResisted( m ) )	//No message on resist
					{
						m_Table[m] = new EssenceOfWindInfo( m, fcMalus, ssiMalus, duration );

						BuffInfo.AddBuff( m, new BuffInfo( BuffIcon.EssenceOfWind, 1075802, duration, m, String.Format( "{0}\t{1}", fcMalus.ToString(), ssiMalus.ToString() ) ) );
					}
				}
			}

			FinishSequence();
		}
示例#5
0
        public override void OnCast()
        {
            if (CheckSequence())
            {
                Caster.PlaySound(0x5C6);

                int damage = 10 + FocusLevel;

                double skill    = Caster.Skills[SkillName.Spellweaving].Value;
                int    dmgBonus = Math.Max((int)(skill / 24.0d), 1);
                damage += dmgBonus;

                TimeSpan duration = TimeSpan.FromSeconds((int)(skill / 24) + FocusLevel);

                int fcMalus  = FocusLevel + 1;
                int ssiMalus = 2 * (FocusLevel + 1);

                foreach (IDamageable target in AcquireIndirectTargets(Caster.Location, 5 + FocusLevel))
                {
                    if (target is Mobile m)
                    {
                        Caster.DoHarmful(m);

                        SpellHelper.Damage(this, m, damage, 0, 0, 100, 0, 0);

                        if (!CheckResisted(m)) //No message on resist
                        {
                            m_Table[m] = new EssenceOfWindInfo(m, fcMalus, ssiMalus, duration);

                            BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.EssenceOfWind, 1075802, duration, m, $"{fcMalus.ToString()}\t{ssiMalus.ToString()}"));

                            m.Delta(MobileDelta.WeaponDamage);
                        }
                    }
                }
            }

            FinishSequence();
        }
示例#6
0
        public override void OnCast()
        {
            if (CheckSequence())
            {
                Caster.PlaySound(0x5C6);

                int range       = 5 + FocusLevel;
                int damage      = 25 + FocusLevel;
                int damageBonus = 0;

                double           inscribeSkill          = GetInscribeSkill(Caster);
                int              inscribeBonus          = (int)(inscribeSkill + (100 * (int)(inscribeSkill / 100))) / 10;
                int              intBonus               = Caster.Int / 10;
                int              ArcaneEmpowermentBonus = 0;
                int              sdiBonus               = AosAttributes.GetValue(Caster, AosAttribute.SpellDamage);
                TransformContext context = TransformationSpellHelper.GetContext(Caster);
                if (context != null && context.Spell is ReaperFormSpell)
                {
                    damageBonus += ((ReaperFormSpell)context.Spell).SpellDamageBonus;
                }

                damageBonus += inscribeBonus + intBonus + ArcaneEmpowermentBonus;

                double skill = Caster.Skills[SkillName.Spellweaving].Value;

                TimeSpan duration = TimeSpan.FromSeconds((int)(skill / 24) + FocusLevel);

                int fcMalus  = FocusLevel + 1;
                int ssiMalus = 2 * (FocusLevel + 1);

                List <Mobile> targets = new List <Mobile>();

                foreach (Mobile m in Caster.GetMobilesInRange(range))
                {
                    if (Caster != m && Caster.InLOS(m) && SpellHelper.ValidIndirectTarget(Caster, m) && Caster.CanBeHarmful(m, false))
                    {
                        targets.Add(m);
                    }
                }

                for (int i = 0; i < targets.Count; i++)
                {
                    Mobile m = targets[i];

                    Caster.DoHarmful(m);
                    ArcaneEmpowermentBonus += Spellweaving.ArcaneEmpowermentSpell.GetSpellBonus(Caster, m.Player && Caster.Player);

                    if (m.Player && Caster.Player && sdiBonus > 15 + ((int)inscribeSkill) / 10)
                    {
                        sdiBonus = 15 + ((int)inscribeSkill) / 10;
                    }

                    SpellHelper.Damage(this, m, damage * (100 + damageBonus + sdiBonus + ArcaneEmpowermentBonus) / 100, 0, 0, 100, 0, 0);

                    if (!CheckResisted(m))                              //No message on resist
                    {
                        m_Table[m] = new EssenceOfWindInfo(m, fcMalus, ssiMalus, duration);

                        BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.EssenceOfWind, 1075802, duration, m, String.Format("{0}\t{1}", fcMalus.ToString(), ssiMalus.ToString())));
                    }
                }
            }

            FinishSequence();
        }